text
stringlengths
2
99.9k
meta
dict
/* * 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.hadoop.mapreduce.util; import java.text.ParseException; import java.util.List; import com.google.common.collect.Lists; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.io.IntWritable; import org.apache.hadoop.mapreduce.counters.AbstractCounters; import org.apache.hadoop.mapreduce.Counter; import org.apache.hadoop.mapreduce.counters.CounterGroupBase; import org.apache.hadoop.util.StringInterner; import org.apache.hadoop.util.StringUtils; /** * String conversion utilities for counters. * Candidate for deprecation since we start to use JSON in 0.21+ */ @InterfaceAudience.Private public class CountersStrings { private static final char GROUP_OPEN = '{'; private static final char GROUP_CLOSE = '}'; private static final char COUNTER_OPEN = '['; private static final char COUNTER_CLOSE = ']'; private static final char UNIT_OPEN = '('; private static final char UNIT_CLOSE = ')'; private static char[] charsToEscape = {GROUP_OPEN, GROUP_CLOSE, COUNTER_OPEN, COUNTER_CLOSE, UNIT_OPEN, UNIT_CLOSE}; /** * Make the pre 0.21 counter string (for e.g. old job history files) * [(actual-name)(display-name)(value)] * @param counter to stringify * @return the stringified result */ public static String toEscapedCompactString(Counter counter) { // First up, obtain the strings that need escaping. This will help us // determine the buffer length apriori. String escapedName, escapedDispName; long currentValue; synchronized(counter) { escapedName = escape(counter.getName()); escapedDispName = escape(counter.getDisplayName()); currentValue = counter.getValue(); } int length = escapedName.length() + escapedDispName.length() + 4; length += 8; // For the following delimiting characters StringBuilder builder = new StringBuilder(length); builder.append(COUNTER_OPEN); // Add the counter name builder.append(UNIT_OPEN); builder.append(escapedName); builder.append(UNIT_CLOSE); // Add the display name builder.append(UNIT_OPEN); builder.append(escapedDispName); builder.append(UNIT_CLOSE); // Add the value builder.append(UNIT_OPEN); builder.append(currentValue); builder.append(UNIT_CLOSE); builder.append(COUNTER_CLOSE); return builder.toString(); } /** * Make the 0.21 counter group string. * format: {(actual-name)(display-name)(value)[][][]} * where [] are compact strings for the counters within. * @param <G> type of the group * @param group to stringify * @return the stringified result */ public static <G extends CounterGroupBase<?>> String toEscapedCompactString(G group) { List<String> escapedStrs = Lists.newArrayList(); int length; String escapedName, escapedDispName; synchronized(group) { // First up, obtain the strings that need escaping. This will help us // determine the buffer length apriori. escapedName = escape(group.getName()); escapedDispName = escape(group.getDisplayName()); int i = 0; length = escapedName.length() + escapedDispName.length(); for (Counter counter : group) { String escapedStr = toEscapedCompactString(counter); escapedStrs.add(escapedStr); length += escapedStr.length(); } } length += 6; // for all the delimiting characters below StringBuilder builder = new StringBuilder(length); builder.append(GROUP_OPEN); // group start // Add the group name builder.append(UNIT_OPEN); builder.append(escapedName); builder.append(UNIT_CLOSE); // Add the display name builder.append(UNIT_OPEN); builder.append(escapedDispName); builder.append(UNIT_CLOSE); // write the value for(String escaped : escapedStrs) { builder.append(escaped); } builder.append(GROUP_CLOSE); // group end return builder.toString(); } /** * Make the pre 0.21 counters string * @param <C> type of the counter * @param <G> type of the counter group * @param <T> type of the counters object * @param counters the object to stringify * @return the string in the following format * {(groupName)(group-displayName)[(counterName)(displayName)(value)]*}* */ public static <C extends Counter, G extends CounterGroupBase<C>, T extends AbstractCounters<C, G>> String toEscapedCompactString(T counters) { StringBuilder builder = new StringBuilder(); synchronized(counters) { for (G group : counters) { builder.append(toEscapedCompactString(group)); } } return builder.toString(); } // Escapes all the delimiters for counters i.e {,[,(,),],} private static String escape(String string) { return StringUtils.escapeString(string, StringUtils.ESCAPE_CHAR, charsToEscape); } // Unescapes all the delimiters for counters i.e {,[,(,),],} private static String unescape(String string) { return StringUtils.unEscapeString(string, StringUtils.ESCAPE_CHAR, charsToEscape); } // Extracts a block (data enclosed within delimeters) ignoring escape // sequences. Throws ParseException if an incomplete block is found else // returns null. private static String getBlock(String str, char open, char close, IntWritable index) throws ParseException { StringBuilder split = new StringBuilder(); int next = StringUtils.findNext(str, open, StringUtils.ESCAPE_CHAR, index.get(), split); split.setLength(0); // clear the buffer if (next >= 0) { ++next; // move over '(' next = StringUtils.findNext(str, close, StringUtils.ESCAPE_CHAR, next, split); if (next >= 0) { ++next; // move over ')' index.set(next); return split.toString(); // found a block } else { throw new ParseException("Unexpected end of block", next); } } return null; // found nothing } /** * Parse a pre 0.21 counters string into a counter object. * @param <C> type of the counter * @param <G> type of the counter group * @param <T> type of the counters object * @param compactString to parse * @param counters an empty counters object to hold the result * @return the counters object holding the result * @throws ParseException */ @SuppressWarnings("deprecation") public static <C extends Counter, G extends CounterGroupBase<C>, T extends AbstractCounters<C, G>> T parseEscapedCompactString(String compactString, T counters) throws ParseException { IntWritable index = new IntWritable(0); // Get the group to work on String groupString = getBlock(compactString, GROUP_OPEN, GROUP_CLOSE, index); while (groupString != null) { IntWritable groupIndex = new IntWritable(0); // Get the actual name String groupName = StringInterner.weakIntern(getBlock(groupString, UNIT_OPEN, UNIT_CLOSE, groupIndex)); groupName = StringInterner.weakIntern(unescape(groupName)); // Get the display name String groupDisplayName = StringInterner.weakIntern(getBlock(groupString, UNIT_OPEN, UNIT_CLOSE, groupIndex)); groupDisplayName = StringInterner.weakIntern(unescape(groupDisplayName)); // Get the counters G group = counters.getGroup(groupName); group.setDisplayName(groupDisplayName); String counterString = getBlock(groupString, COUNTER_OPEN, COUNTER_CLOSE, groupIndex); while (counterString != null) { IntWritable counterIndex = new IntWritable(0); // Get the actual name String counterName = StringInterner.weakIntern(getBlock(counterString, UNIT_OPEN, UNIT_CLOSE, counterIndex)); counterName = StringInterner.weakIntern(unescape(counterName)); // Get the display name String counterDisplayName = StringInterner.weakIntern(getBlock(counterString, UNIT_OPEN, UNIT_CLOSE, counterIndex)); counterDisplayName = StringInterner.weakIntern(unescape(counterDisplayName)); // Get the value long value = Long.parseLong(getBlock(counterString, UNIT_OPEN, UNIT_CLOSE, counterIndex)); // Add the counter Counter counter = group.findCounter(counterName); counter.setDisplayName(counterDisplayName); counter.increment(value); // Get the next counter counterString = getBlock(groupString, COUNTER_OPEN, COUNTER_CLOSE, groupIndex); } groupString = getBlock(compactString, GROUP_OPEN, GROUP_CLOSE, index); } return counters; } }
{ "pile_set_name": "Github" }
c This Formular is generated by mcnf c c horn? no c forced? no c mixed sat? no c clause length = 3 c p cnf 20 91 -14 -10 5 0 3 -5 -10 0 14 -15 13 0 1 4 -17 0 6 12 -20 0 -8 16 9 0 17 -9 6 0 -4 -9 -19 0 4 14 17 0 -20 -9 -13 0 19 -2 -10 0 -8 -10 6 0 -18 -20 10 0 9 -20 17 0 -7 -20 10 0 13 17 -6 0 19 12 7 0 -5 -3 -2 0 -18 -7 -15 0 -19 -17 5 0 -11 -13 15 0 -18 -15 -11 0 -1 -14 -11 0 -16 -5 10 0 9 -4 -6 0 14 -4 9 0 14 -12 -15 0 16 12 -8 0 -4 -5 3 0 2 -5 8 0 1 -20 -13 0 2 -6 8 0 1 -7 9 0 11 -1 -10 0 -5 1 -16 0 16 -9 12 0 20 19 11 0 -8 -5 14 0 -4 2 10 0 5 11 -7 0 12 18 4 0 -9 -5 20 0 -7 -19 -8 0 -9 -20 1 0 3 -17 -16 0 4 -9 16 0 8 1 -5 0 -11 7 -15 0 -17 -14 10 0 -4 14 -19 0 -17 -6 -4 0 -13 1 -16 0 14 -18 3 0 19 12 -2 0 11 -13 6 0 4 8 14 0 -2 -14 -7 0 -14 -5 11 0 4 -11 18 0 18 -10 19 0 11 2 -17 0 -12 10 11 0 12 -1 -6 0 8 20 9 0 11 2 -17 0 -18 16 17 0 13 12 15 0 4 1 -3 0 -7 -11 18 0 -2 -6 4 0 14 13 4 0 15 20 16 0 -12 -6 5 0 -13 -2 -18 0 -13 -18 -19 0 -5 -10 -9 0 14 -11 -8 0 16 -18 17 0 -3 14 -2 0 7 13 3 0 -12 10 16 0 4 13 16 0 3 -13 16 0 -9 18 -4 0 18 -7 -1 0 2 -9 13 0 -5 20 -10 0 14 15 -8 0 -9 -19 -14 0 8 -11 5 0 -20 17 11 0 % 0
{ "pile_set_name": "Github" }
# RUN: llvm-mc --disassemble %s -triple powerpc64-unknown-unknown -mcpu=pwr7 | FileCheck %s # FIXME: decode as beqlr 0 # CHECK: bclr 12, 2, 0 0x4d 0x82 0x00 0x20 # FIXME: decode as beqlr 1 # CHECK: bclr 12, 6, 0 0x4d 0x86 0x00 0x20 # FIXME: decode as beqlr 2 # CHECK: bclr 12, 10, 0 0x4d 0x8a 0x00 0x20 # FIXME: decode as beqlr 3 # CHECK: bclr 12, 14, 0 0x4d 0x8e 0x00 0x20 # FIXME: decode as beqlr 4 # CHECK: bclr 12, 18, 0 0x4d 0x92 0x00 0x20 # FIXME: decode as beqlr 5 # CHECK: bclr 12, 22, 0 0x4d 0x96 0x00 0x20 # FIXME: decode as beqlr 6 # CHECK: bclr 12, 26, 0 0x4d 0x9a 0x00 0x20 # FIXME: decode as beqlr 7 # CHECK: bclr 12, 30, 0 0x4d 0x9e 0x00 0x20 # CHECK: bclr 12, 0, 0 0x4d 0x80 0x00 0x20 # CHECK: bclr 12, 1, 0 0x4d 0x81 0x00 0x20 # CHECK: bclr 12, 2, 0 0x4d 0x82 0x00 0x20 # CHECK: bclr 12, 3, 0 0x4d 0x83 0x00 0x20 # CHECK: bclr 12, 3, 0 0x4d 0x83 0x00 0x20 # CHECK: bclr 12, 4, 0 0x4d 0x84 0x00 0x20 # CHECK: bclr 12, 5, 0 0x4d 0x85 0x00 0x20 # CHECK: bclr 12, 6, 0 0x4d 0x86 0x00 0x20 # CHECK: bclr 12, 7, 0 0x4d 0x87 0x00 0x20 # CHECK: bclr 12, 7, 0 0x4d 0x87 0x00 0x20 # CHECK: bclr 12, 8, 0 0x4d 0x88 0x00 0x20 # CHECK: bclr 12, 9, 0 0x4d 0x89 0x00 0x20 # CHECK: bclr 12, 10, 0 0x4d 0x8a 0x00 0x20 # CHECK: bclr 12, 11, 0 0x4d 0x8b 0x00 0x20 # CHECK: bclr 12, 11, 0 0x4d 0x8b 0x00 0x20 # CHECK: bclr 12, 12, 0 0x4d 0x8c 0x00 0x20 # CHECK: bclr 12, 13, 0 0x4d 0x8d 0x00 0x20 # CHECK: bclr 12, 14, 0 0x4d 0x8e 0x00 0x20 # CHECK: bclr 12, 15, 0 0x4d 0x8f 0x00 0x20 # CHECK: bclr 12, 15, 0 0x4d 0x8f 0x00 0x20 # CHECK: bclr 12, 16, 0 0x4d 0x90 0x00 0x20 # CHECK: bclr 12, 17, 0 0x4d 0x91 0x00 0x20 # CHECK: bclr 12, 18, 0 0x4d 0x92 0x00 0x20 # CHECK: bclr 12, 19, 0 0x4d 0x93 0x00 0x20 # CHECK: bclr 12, 19, 0 0x4d 0x93 0x00 0x20 # CHECK: bclr 12, 20, 0 0x4d 0x94 0x00 0x20 # CHECK: bclr 12, 21, 0 0x4d 0x95 0x00 0x20 # CHECK: bclr 12, 22, 0 0x4d 0x96 0x00 0x20 # CHECK: bclr 12, 23, 0 0x4d 0x97 0x00 0x20 # CHECK: bclr 12, 23, 0 0x4d 0x97 0x00 0x20 # CHECK: bclr 12, 24, 0 0x4d 0x98 0x00 0x20 # CHECK: bclr 12, 25, 0 0x4d 0x99 0x00 0x20 # CHECK: bclr 12, 26, 0 0x4d 0x9a 0x00 0x20 # CHECK: bclr 12, 27, 0 0x4d 0x9b 0x00 0x20 # CHECK: bclr 12, 27, 0 0x4d 0x9b 0x00 0x20 # CHECK: bclr 12, 28, 0 0x4d 0x9c 0x00 0x20 # CHECK: bclr 12, 29, 0 0x4d 0x9d 0x00 0x20 # CHECK: bclr 12, 30, 0 0x4d 0x9e 0x00 0x20 # CHECK: bclr 12, 31, 0 0x4d 0x9f 0x00 0x20 # CHECK: bclr 12, 31, 0 0x4d 0x9f 0x00 0x20 # CHECK: blr 0x4e 0x80 0x00 0x20 # CHECK: bctr 0x4e 0x80 0x04 0x20 # CHECK: blrl 0x4e 0x80 0x00 0x21 # CHECK: bctrl 0x4e 0x80 0x04 0x21 # CHECK: bclr 12, 2, 0 0x4d 0x82 0x00 0x20 # CHECK: bcctr 12, 2, 0 0x4d 0x82 0x04 0x20 # CHECK: bclrl 12, 2, 0 0x4d 0x82 0x00 0x21 # CHECK: bcctrl 12, 2, 0 0x4d 0x82 0x04 0x21 # CHECK: bclr 15, 2, 0 0x4d 0xe2 0x00 0x20 # CHECK: bcctr 15, 2, 0 0x4d 0xe2 0x04 0x20 # CHECK: bclrl 15, 2, 0 0x4d 0xe2 0x00 0x21 # CHECK: bcctrl 15, 2, 0 0x4d 0xe2 0x04 0x21 # CHECK: bclr 14, 2, 0 0x4d 0xc2 0x00 0x20 # CHECK: bcctr 14, 2, 0 0x4d 0xc2 0x04 0x20 # CHECK: bclrl 14, 2, 0 0x4d 0xc2 0x00 0x21 # CHECK: bcctrl 14, 2, 0 0x4d 0xc2 0x04 0x21 # CHECK: bclr 4, 2, 0 0x4c 0x82 0x00 0x20 # CHECK: bcctr 4, 2, 0 0x4c 0x82 0x04 0x20 # CHECK: bclrl 4, 2, 0 0x4c 0x82 0x00 0x21 # CHECK: bcctrl 4, 2, 0 0x4c 0x82 0x04 0x21 # CHECK: bclr 7, 2, 0 0x4c 0xe2 0x00 0x20 # CHECK: bcctr 7, 2, 0 0x4c 0xe2 0x04 0x20 # CHECK: bclrl 7, 2, 0 0x4c 0xe2 0x00 0x21 # CHECK: bcctrl 7, 2, 0 0x4c 0xe2 0x04 0x21 # CHECK: bclr 6, 2, 0 0x4c 0xc2 0x00 0x20 # CHECK: bcctr 6, 2, 0 0x4c 0xc2 0x04 0x20 # CHECK: bclrl 6, 2, 0 0x4c 0xc2 0x00 0x21 # CHECK: bcctrl 6, 2, 0 0x4c 0xc2 0x04 0x21 # CHECK: bdnzlr 0x4e 0x00 0x00 0x20 # CHECK: bdnzlrl 0x4e 0x00 0x00 0x21 # CHECK: bdnzlr+ 0x4f 0x20 0x00 0x20 # CHECK: bdnzlrl+ 0x4f 0x20 0x00 0x21 # CHECK: bdnzlr- 0x4f 0x00 0x00 0x20 # CHECK: bdnzlrl- 0x4f 0x00 0x00 0x21 # CHECK: bclr 8, 2, 0 0x4d 0x02 0x00 0x20 # CHECK: bclrl 8, 2, 0 0x4d 0x02 0x00 0x21 # CHECK: bclr 0, 2, 0 0x4c 0x02 0x00 0x20 # CHECK: bclrl 0, 2, 0 0x4c 0x02 0x00 0x21 # CHECK: bdzlr 0x4e 0x40 0x00 0x20 # CHECK: bdzlrl 0x4e 0x40 0x00 0x21 # CHECK: bdzlr+ 0x4f 0x60 0x00 0x20 # CHECK: bdzlrl+ 0x4f 0x60 0x00 0x21 # CHECK: bdzlr- 0x4f 0x40 0x00 0x20 # CHECK: bdzlrl- 0x4f 0x40 0x00 0x21 # CHECK: bclr 10, 2, 0 0x4d 0x42 0x00 0x20 # CHECK: bclrl 10, 2, 0 0x4d 0x42 0x00 0x21 # CHECK: bclr 2, 2, 0 0x4c 0x42 0x00 0x20 # CHECK: bclrl 2, 2, 0 0x4c 0x42 0x00 0x21 # FIXME: decode as bltlr 2 # CHECK: bclr 12, 8, 0 0x4d 0x88 0x00 0x20 # FIXME: decode as bltlr 0 # CHECK: bclr 12, 0, 0 0x4d 0x80 0x00 0x20 # FIXME: decode as bltctr 2 # CHECK: bcctr 12, 8, 0 0x4d 0x88 0x04 0x20 # FIXME: decode as bltctr 0 # CHECK: bcctr 12, 0, 0 0x4d 0x80 0x04 0x20 # FIXME: decode as bltlrl 2 # CHECK: bclrl 12, 8, 0 0x4d 0x88 0x00 0x21 # FIXME: decode as bltlrl 0 # CHECK: bclrl 12, 0, 0 0x4d 0x80 0x00 0x21 # FIXME: decode as bltctrl 2 # CHECK: bcctrl 12, 8, 0 0x4d 0x88 0x04 0x21 # FIXME: decode as bltctrl 0 # CHECK: bcctrl 12, 0, 0 0x4d 0x80 0x04 0x21 # FIXME: decode as bltlr+ 2 # CHECK: bclr 15, 8, 0 0x4d 0xe8 0x00 0x20 # FIXME: decode as bltlr+ 0 # CHECK: bclr 15, 0, 0 0x4d 0xe0 0x00 0x20 # FIXME: decode as bltctr+ 2 # CHECK: bcctr 15, 8, 0 0x4d 0xe8 0x04 0x20 # FIXME: decode as bltctr+ 0 # CHECK: bcctr 15, 0, 0 0x4d 0xe0 0x04 0x20 # FIXME: decode as bltlrl+ 2 # CHECK: bclrl 15, 8, 0 0x4d 0xe8 0x00 0x21 # FIXME: decode as bltlrl+ 0 # CHECK: bclrl 15, 0, 0 0x4d 0xe0 0x00 0x21 # FIXME: decode as bltctrl+ 2 # CHECK: bcctrl 15, 8, 0 0x4d 0xe8 0x04 0x21 # FIXME: decode as bltctrl+ 0 # CHECK: bcctrl 15, 0, 0 0x4d 0xe0 0x04 0x21 # FIXME: decode as bltlr- 2 # CHECK: bclr 14, 8, 0 0x4d 0xc8 0x00 0x20 # FIXME: decode as bltlr- 0 # CHECK: bclr 14, 0, 0 0x4d 0xc0 0x00 0x20 # FIXME: decode as bltctr- 2 # CHECK: bcctr 14, 8, 0 0x4d 0xc8 0x04 0x20 # FIXME: decode as bltctr- 0 # CHECK: bcctr 14, 0, 0 0x4d 0xc0 0x04 0x20 # FIXME: decode as bltlrl- 2 # CHECK: bclrl 14, 8, 0 0x4d 0xc8 0x00 0x21 # FIXME: decode as bltlrl- 0 # CHECK: bclrl 14, 0, 0 0x4d 0xc0 0x00 0x21 # FIXME: decode as bltctrl- 2 # CHECK: bcctrl 14, 8, 0 0x4d 0xc8 0x04 0x21 # FIXME: decode as bltctrl- 0 # CHECK: bcctrl 14, 0, 0 0x4d 0xc0 0x04 0x21 # FIXME: decode as blelr 2 # CHECK: bclr 4, 9, 0 0x4c 0x89 0x00 0x20 # FIXME: decode as blelr 0 # CHECK: bclr 4, 1, 0 0x4c 0x81 0x00 0x20 # FIXME: decode as blectr 2 # CHECK: bcctr 4, 9, 0 0x4c 0x89 0x04 0x20 # FIXME: decode as blectr 0 # CHECK: bcctr 4, 1, 0 0x4c 0x81 0x04 0x20 # FIXME: decode as blelrl 2 # CHECK: bclrl 4, 9, 0 0x4c 0x89 0x00 0x21 # FIXME: decode as blelrl 0 # CHECK: bclrl 4, 1, 0 0x4c 0x81 0x00 0x21 # FIXME: decode as blectrl 2 # CHECK: bcctrl 4, 9, 0 0x4c 0x89 0x04 0x21 # FIXME: decode as blectrl 0 # CHECK: bcctrl 4, 1, 0 0x4c 0x81 0x04 0x21 # FIXME: decode as blelr+ 2 # CHECK: bclr 7, 9, 0 0x4c 0xe9 0x00 0x20 # FIXME: decode as blelr+ 0 # CHECK: bclr 7, 1, 0 0x4c 0xe1 0x00 0x20 # FIXME: decode as blectr+ 2 # CHECK: bcctr 7, 9, 0 0x4c 0xe9 0x04 0x20 # FIXME: decode as blectr+ 0 # CHECK: bcctr 7, 1, 0 0x4c 0xe1 0x04 0x20 # FIXME: decode as blelrl+ 2 # CHECK: bclrl 7, 9, 0 0x4c 0xe9 0x00 0x21 # FIXME: decode as blelrl+ 0 # CHECK: bclrl 7, 1, 0 0x4c 0xe1 0x00 0x21 # FIXME: decode as blectrl+ 2 # CHECK: bcctrl 7, 9, 0 0x4c 0xe9 0x04 0x21 # FIXME: decode as blectrl+ 0 # CHECK: bcctrl 7, 1, 0 0x4c 0xe1 0x04 0x21 # FIXME: decode as blelr- 2 # CHECK: bclr 6, 9, 0 0x4c 0xc9 0x00 0x20 # FIXME: decode as blelr- 0 # CHECK: bclr 6, 1, 0 0x4c 0xc1 0x00 0x20 # FIXME: decode as blectr- 2 # CHECK: bcctr 6, 9, 0 0x4c 0xc9 0x04 0x20 # FIXME: decode as blectr- 0 # CHECK: bcctr 6, 1, 0 0x4c 0xc1 0x04 0x20 # FIXME: decode as blelrl- 2 # CHECK: bclrl 6, 9, 0 0x4c 0xc9 0x00 0x21 # FIXME: decode as blelrl- 0 # CHECK: bclrl 6, 1, 0 0x4c 0xc1 0x00 0x21 # FIXME: decode as blectrl- 2 # CHECK: bcctrl 6, 9, 0 0x4c 0xc9 0x04 0x21 # FIXME: decode as blectrl- 0 # CHECK: bcctrl 6, 1, 0 0x4c 0xc1 0x04 0x21 # FIXME: decode as beqlr 2 # CHECK: bclr 12, 10, 0 0x4d 0x8a 0x00 0x20 # FIXME: decode as beqlr 0 # CHECK: bclr 12, 2, 0 0x4d 0x82 0x00 0x20 # FIXME: decode as beqctr 2 # CHECK: bcctr 12, 10, 0 0x4d 0x8a 0x04 0x20 # FIXME: decode as beqctr 0 # CHECK: bcctr 12, 2, 0 0x4d 0x82 0x04 0x20 # FIXME: decode as beqlrl 2 # CHECK: bclrl 12, 10, 0 0x4d 0x8a 0x00 0x21 # FIXME: decode as beqlrl 0 # CHECK: bclrl 12, 2, 0 0x4d 0x82 0x00 0x21 # FIXME: decode as beqctrl 2 # CHECK: bcctrl 12, 10, 0 0x4d 0x8a 0x04 0x21 # FIXME: decode as beqctrl 0 # CHECK: bcctrl 12, 2, 0 0x4d 0x82 0x04 0x21 # FIXME: decode as beqlr+ 2 # CHECK: bclr 15, 10, 0 0x4d 0xea 0x00 0x20 # FIXME: decode as beqlr+ 0 # CHECK: bclr 15, 2, 0 0x4d 0xe2 0x00 0x20 # FIXME: decode as beqctr+ 2 # CHECK: bcctr 15, 10, 0 0x4d 0xea 0x04 0x20 # FIXME: decode as beqctr+ 0 # CHECK: bcctr 15, 2, 0 0x4d 0xe2 0x04 0x20 # FIXME: decode as beqlrl+ 2 # CHECK: bclrl 15, 10, 0 0x4d 0xea 0x00 0x21 # FIXME: decode as beqlrl+ 0 # CHECK: bclrl 15, 2, 0 0x4d 0xe2 0x00 0x21 # FIXME: decode as beqctrl+ 2 # CHECK: bcctrl 15, 10, 0 0x4d 0xea 0x04 0x21 # FIXME: decode as beqctrl+ 0 # CHECK: bcctrl 15, 2, 0 0x4d 0xe2 0x04 0x21 # FIXME: decode as beqlr- 2 # CHECK: bclr 14, 10, 0 0x4d 0xca 0x00 0x20 # FIXME: decode as beqlr- 0 # CHECK: bclr 14, 2, 0 0x4d 0xc2 0x00 0x20 # FIXME: decode as beqctr- 2 # CHECK: bcctr 14, 10, 0 0x4d 0xca 0x04 0x20 # FIXME: decode as beqctr- 0 # CHECK: bcctr 14, 2, 0 0x4d 0xc2 0x04 0x20 # FIXME: decode as beqlrl- 2 # CHECK: bclrl 14, 10, 0 0x4d 0xca 0x00 0x21 # FIXME: decode as beqlrl- 0 # CHECK: bclrl 14, 2, 0 0x4d 0xc2 0x00 0x21 # FIXME: decode as beqctrl- 2 # CHECK: bcctrl 14, 10, 0 0x4d 0xca 0x04 0x21 # FIXME: decode as beqctrl- 0 # CHECK: bcctrl 14, 2, 0 0x4d 0xc2 0x04 0x21 # FIXME: decode as bgelr 2 # CHECK: bclr 4, 8, 0 0x4c 0x88 0x00 0x20 # FIXME: decode as bgelr 0 # CHECK: bclr 4, 0, 0 0x4c 0x80 0x00 0x20 # FIXME: decode as bgectr 2 # CHECK: bcctr 4, 8, 0 0x4c 0x88 0x04 0x20 # FIXME: decode as bgectr 0 # CHECK: bcctr 4, 0, 0 0x4c 0x80 0x04 0x20 # FIXME: decode as bgelrl 2 # CHECK: bclrl 4, 8, 0 0x4c 0x88 0x00 0x21 # FIXME: decode as bgelrl 0 # CHECK: bclrl 4, 0, 0 0x4c 0x80 0x00 0x21 # FIXME: decode as bgectrl 2 # CHECK: bcctrl 4, 8, 0 0x4c 0x88 0x04 0x21 # FIXME: decode as bgectrl 0 # CHECK: bcctrl 4, 0, 0 0x4c 0x80 0x04 0x21 # FIXME: decode as bgelr+ 2 # CHECK: bclr 7, 8, 0 0x4c 0xe8 0x00 0x20 # FIXME: decode as bgelr+ 0 # CHECK: bclr 7, 0, 0 0x4c 0xe0 0x00 0x20 # FIXME: decode as bgectr+ 2 # CHECK: bcctr 7, 8, 0 0x4c 0xe8 0x04 0x20 # FIXME: decode as bgectr+ 0 # CHECK: bcctr 7, 0, 0 0x4c 0xe0 0x04 0x20 # FIXME: decode as bgelrl+ 2 # CHECK: bclrl 7, 8, 0 0x4c 0xe8 0x00 0x21 # FIXME: decode as bgelrl+ 0 # CHECK: bclrl 7, 0, 0 0x4c 0xe0 0x00 0x21 # FIXME: decode as bgectrl+ 2 # CHECK: bcctrl 7, 8, 0 0x4c 0xe8 0x04 0x21 # FIXME: decode as bgectrl+ 0 # CHECK: bcctrl 7, 0, 0 0x4c 0xe0 0x04 0x21 # FIXME: decode as bgelr- 2 # CHECK: bclr 6, 8, 0 0x4c 0xc8 0x00 0x20 # FIXME: decode as bgelr- 0 # CHECK: bclr 6, 0, 0 0x4c 0xc0 0x00 0x20 # FIXME: decode as bgectr- 2 # CHECK: bcctr 6, 8, 0 0x4c 0xc8 0x04 0x20 # FIXME: decode as bgectr- 0 # CHECK: bcctr 6, 0, 0 0x4c 0xc0 0x04 0x20 # FIXME: decode as bgelrl- 2 # CHECK: bclrl 6, 8, 0 0x4c 0xc8 0x00 0x21 # FIXME: decode as bgelrl- 0 # CHECK: bclrl 6, 0, 0 0x4c 0xc0 0x00 0x21 # FIXME: decode as bgectrl- 2 # CHECK: bcctrl 6, 8, 0 0x4c 0xc8 0x04 0x21 # FIXME: decode as bgectrl- 0 # CHECK: bcctrl 6, 0, 0 0x4c 0xc0 0x04 0x21 # FIXME: decode as bgtlr 2 # CHECK: bclr 12, 9, 0 0x4d 0x89 0x00 0x20 # FIXME: decode as bgtlr 0 # CHECK: bclr 12, 1, 0 0x4d 0x81 0x00 0x20 # FIXME: decode as bgtctr 2 # CHECK: bcctr 12, 9, 0 0x4d 0x89 0x04 0x20 # FIXME: decode as bgtctr 0 # CHECK: bcctr 12, 1, 0 0x4d 0x81 0x04 0x20 # FIXME: decode as bgtlrl 2 # CHECK: bclrl 12, 9, 0 0x4d 0x89 0x00 0x21 # FIXME: decode as bgtlrl 0 # CHECK: bclrl 12, 1, 0 0x4d 0x81 0x00 0x21 # FIXME: decode as bgtctrl 2 # CHECK: bcctrl 12, 9, 0 0x4d 0x89 0x04 0x21 # FIXME: decode as bgtctrl 0 # CHECK: bcctrl 12, 1, 0 0x4d 0x81 0x04 0x21 # FIXME: decode as bgtlr+ 2 # CHECK: bclr 15, 9, 0 0x4d 0xe9 0x00 0x20 # FIXME: decode as bgtlr+ 0 # CHECK: bclr 15, 1, 0 0x4d 0xe1 0x00 0x20 # FIXME: decode as bgtctr+ 2 # CHECK: bcctr 15, 9, 0 0x4d 0xe9 0x04 0x20 # FIXME: decode as bgtctr+ 0 # CHECK: bcctr 15, 1, 0 0x4d 0xe1 0x04 0x20 # FIXME: decode as bgtlrl+ 2 # CHECK: bclrl 15, 9, 0 0x4d 0xe9 0x00 0x21 # FIXME: decode as bgtlrl+ 0 # CHECK: bclrl 15, 1, 0 0x4d 0xe1 0x00 0x21 # FIXME: decode as bgtctrl+ 2 # CHECK: bcctrl 15, 9, 0 0x4d 0xe9 0x04 0x21 # FIXME: decode as bgtctrl+ 0 # CHECK: bcctrl 15, 1, 0 0x4d 0xe1 0x04 0x21 # FIXME: decode as bgtlr- 2 # CHECK: bclr 14, 9, 0 0x4d 0xc9 0x00 0x20 # FIXME: decode as bgtlr- 0 # CHECK: bclr 14, 1, 0 0x4d 0xc1 0x00 0x20 # FIXME: decode as bgtctr- 2 # CHECK: bcctr 14, 9, 0 0x4d 0xc9 0x04 0x20 # FIXME: decode as bgtctr- 0 # CHECK: bcctr 14, 1, 0 0x4d 0xc1 0x04 0x20 # FIXME: decode as bgtlrl- 2 # CHECK: bclrl 14, 9, 0 0x4d 0xc9 0x00 0x21 # FIXME: decode as bgtlrl- 0 # CHECK: bclrl 14, 1, 0 0x4d 0xc1 0x00 0x21 # FIXME: decode as bgtctrl- 2 # CHECK: bcctrl 14, 9, 0 0x4d 0xc9 0x04 0x21 # FIXME: decode as bgtctrl- 0 # CHECK: bcctrl 14, 1, 0 0x4d 0xc1 0x04 0x21 # FIXME: decode as bgelr 2 # CHECK: bclr 4, 8, 0 0x4c 0x88 0x00 0x20 # FIXME: decode as bgelr 0 # CHECK: bclr 4, 0, 0 0x4c 0x80 0x00 0x20 # FIXME: decode as bgectr 2 # CHECK: bcctr 4, 8, 0 0x4c 0x88 0x04 0x20 # FIXME: decode as bgectr 0 # CHECK: bcctr 4, 0, 0 0x4c 0x80 0x04 0x20 # FIXME: decode as bgelrl 2 # CHECK: bclrl 4, 8, 0 0x4c 0x88 0x00 0x21 # FIXME: decode as bgelrl 0 # CHECK: bclrl 4, 0, 0 0x4c 0x80 0x00 0x21 # FIXME: decode as bgectrl 2 # CHECK: bcctrl 4, 8, 0 0x4c 0x88 0x04 0x21 # FIXME: decode as bgectrl 0 # CHECK: bcctrl 4, 0, 0 0x4c 0x80 0x04 0x21 # FIXME: decode as bgelr+ 2 # CHECK: bclr 7, 8, 0 0x4c 0xe8 0x00 0x20 # FIXME: decode as bgelr+ 0 # CHECK: bclr 7, 0, 0 0x4c 0xe0 0x00 0x20 # FIXME: decode as bgectr+ 2 # CHECK: bcctr 7, 8, 0 0x4c 0xe8 0x04 0x20 # FIXME: decode as bgectr+ 0 # CHECK: bcctr 7, 0, 0 0x4c 0xe0 0x04 0x20 # FIXME: decode as bgelrl+ 2 # CHECK: bclrl 7, 8, 0 0x4c 0xe8 0x00 0x21 # FIXME: decode as bgelrl+ 0 # CHECK: bclrl 7, 0, 0 0x4c 0xe0 0x00 0x21 # FIXME: decode as bgectrl+ 2 # CHECK: bcctrl 7, 8, 0 0x4c 0xe8 0x04 0x21 # FIXME: decode as bgectrl+ 0 # CHECK: bcctrl 7, 0, 0 0x4c 0xe0 0x04 0x21 # FIXME: decode as bgelr- 2 # CHECK: bclr 6, 8, 0 0x4c 0xc8 0x00 0x20 # FIXME: decode as bgelr- 0 # CHECK: bclr 6, 0, 0 0x4c 0xc0 0x00 0x20 # FIXME: decode as bgectr- 2 # CHECK: bcctr 6, 8, 0 0x4c 0xc8 0x04 0x20 # FIXME: decode as bgectr- 0 # CHECK: bcctr 6, 0, 0 0x4c 0xc0 0x04 0x20 # FIXME: decode as bgelrl- 2 # CHECK: bclrl 6, 8, 0 0x4c 0xc8 0x00 0x21 # FIXME: decode as bgelrl- 0 # CHECK: bclrl 6, 0, 0 0x4c 0xc0 0x00 0x21 # FIXME: decode as bgectrl- 2 # CHECK: bcctrl 6, 8, 0 0x4c 0xc8 0x04 0x21 # FIXME: decode as bgectrl- 0 # CHECK: bcctrl 6, 0, 0 0x4c 0xc0 0x04 0x21 # FIXME: decode as bnelr 2 # CHECK: bclr 4, 10, 0 0x4c 0x8a 0x00 0x20 # FIXME: decode as bnelr 0 # CHECK: bclr 4, 2, 0 0x4c 0x82 0x00 0x20 # FIXME: decode as bnectr 2 # CHECK: bcctr 4, 10, 0 0x4c 0x8a 0x04 0x20 # FIXME: decode as bnectr 0 # CHECK: bcctr 4, 2, 0 0x4c 0x82 0x04 0x20 # FIXME: decode as bnelrl 2 # CHECK: bclrl 4, 10, 0 0x4c 0x8a 0x00 0x21 # FIXME: decode as bnelrl 0 # CHECK: bclrl 4, 2, 0 0x4c 0x82 0x00 0x21 # FIXME: decode as bnectrl 2 # CHECK: bcctrl 4, 10, 0 0x4c 0x8a 0x04 0x21 # FIXME: decode as bnectrl 0 # CHECK: bcctrl 4, 2, 0 0x4c 0x82 0x04 0x21 # FIXME: decode as bnelr+ 2 # CHECK: bclr 7, 10, 0 0x4c 0xea 0x00 0x20 # FIXME: decode as bnelr+ 0 # CHECK: bclr 7, 2, 0 0x4c 0xe2 0x00 0x20 # FIXME: decode as bnectr+ 2 # CHECK: bcctr 7, 10, 0 0x4c 0xea 0x04 0x20 # FIXME: decode as bnectr+ 0 # CHECK: bcctr 7, 2, 0 0x4c 0xe2 0x04 0x20 # FIXME: decode as bnelrl+ 2 # CHECK: bclrl 7, 10, 0 0x4c 0xea 0x00 0x21 # FIXME: decode as bnelrl+ 0 # CHECK: bclrl 7, 2, 0 0x4c 0xe2 0x00 0x21 # FIXME: decode as bnectrl+ 2 # CHECK: bcctrl 7, 10, 0 0x4c 0xea 0x04 0x21 # FIXME: decode as bnectrl+ 0 # CHECK: bcctrl 7, 2, 0 0x4c 0xe2 0x04 0x21 # FIXME: decode as bnelr- 2 # CHECK: bclr 6, 10, 0 0x4c 0xca 0x00 0x20 # FIXME: decode as bnelr- 0 # CHECK: bclr 6, 2, 0 0x4c 0xc2 0x00 0x20 # FIXME: decode as bnectr- 2 # CHECK: bcctr 6, 10, 0 0x4c 0xca 0x04 0x20 # FIXME: decode as bnectr- 0 # CHECK: bcctr 6, 2, 0 0x4c 0xc2 0x04 0x20 # FIXME: decode as bnelrl- 2 # CHECK: bclrl 6, 10, 0 0x4c 0xca 0x00 0x21 # FIXME: decode as bnelrl- 0 # CHECK: bclrl 6, 2, 0 0x4c 0xc2 0x00 0x21 # FIXME: decode as bnectrl- 2 # CHECK: bcctrl 6, 10, 0 0x4c 0xca 0x04 0x21 # FIXME: decode as bnectrl- 0 # CHECK: bcctrl 6, 2, 0 0x4c 0xc2 0x04 0x21 # FIXME: decode as blelr 2 # CHECK: bclr 4, 9, 0 0x4c 0x89 0x00 0x20 # FIXME: decode as blelr 0 # CHECK: bclr 4, 1, 0 0x4c 0x81 0x00 0x20 # FIXME: decode as blectr 2 # CHECK: bcctr 4, 9, 0 0x4c 0x89 0x04 0x20 # FIXME: decode as blectr 0 # CHECK: bcctr 4, 1, 0 0x4c 0x81 0x04 0x20 # FIXME: decode as blelrl 2 # CHECK: bclrl 4, 9, 0 0x4c 0x89 0x00 0x21 # FIXME: decode as blelrl 0 # CHECK: bclrl 4, 1, 0 0x4c 0x81 0x00 0x21 # FIXME: decode as blectrl 2 # CHECK: bcctrl 4, 9, 0 0x4c 0x89 0x04 0x21 # FIXME: decode as blectrl 0 # CHECK: bcctrl 4, 1, 0 0x4c 0x81 0x04 0x21 # FIXME: decode as blelr+ 2 # CHECK: bclr 7, 9, 0 0x4c 0xe9 0x00 0x20 # FIXME: decode as blelr+ 0 # CHECK: bclr 7, 1, 0 0x4c 0xe1 0x00 0x20 # FIXME: decode as blectr+ 2 # CHECK: bcctr 7, 9, 0 0x4c 0xe9 0x04 0x20 # FIXME: decode as blectr+ 0 # CHECK: bcctr 7, 1, 0 0x4c 0xe1 0x04 0x20 # FIXME: decode as blelrl+ 2 # CHECK: bclrl 7, 9, 0 0x4c 0xe9 0x00 0x21 # FIXME: decode as blelrl+ 0 # CHECK: bclrl 7, 1, 0 0x4c 0xe1 0x00 0x21 # FIXME: decode as blectrl+ 2 # CHECK: bcctrl 7, 9, 0 0x4c 0xe9 0x04 0x21 # FIXME: decode as blectrl+ 0 # CHECK: bcctrl 7, 1, 0 0x4c 0xe1 0x04 0x21 # FIXME: decode as blelr- 2 # CHECK: bclr 6, 9, 0 0x4c 0xc9 0x00 0x20 # FIXME: decode as blelr- 0 # CHECK: bclr 6, 1, 0 0x4c 0xc1 0x00 0x20 # FIXME: decode as blectr- 2 # CHECK: bcctr 6, 9, 0 0x4c 0xc9 0x04 0x20 # FIXME: decode as blectr- 0 # CHECK: bcctr 6, 1, 0 0x4c 0xc1 0x04 0x20 # FIXME: decode as blelrl- 2 # CHECK: bclrl 6, 9, 0 0x4c 0xc9 0x00 0x21 # FIXME: decode as blelrl- 0 # CHECK: bclrl 6, 1, 0 0x4c 0xc1 0x00 0x21 # FIXME: decode as blectrl- 2 # CHECK: bcctrl 6, 9, 0 0x4c 0xc9 0x04 0x21 # FIXME: decode as blectrl- 0 # CHECK: bcctrl 6, 1, 0 0x4c 0xc1 0x04 0x21 # FIXME: decode as bunlr 2 # CHECK: bclr 12, 11, 0 0x4d 0x8b 0x00 0x20 # FIXME: decode as bunlr 0 # CHECK: bclr 12, 3, 0 0x4d 0x83 0x00 0x20 # FIXME: decode as bunctr 2 # CHECK: bcctr 12, 11, 0 0x4d 0x8b 0x04 0x20 # FIXME: decode as bunctr 0 # CHECK: bcctr 12, 3, 0 0x4d 0x83 0x04 0x20 # FIXME: decode as bunlrl 2 # CHECK: bclrl 12, 11, 0 0x4d 0x8b 0x00 0x21 # FIXME: decode as bunlrl 0 # CHECK: bclrl 12, 3, 0 0x4d 0x83 0x00 0x21 # FIXME: decode as bunctrl 2 # CHECK: bcctrl 12, 11, 0 0x4d 0x8b 0x04 0x21 # FIXME: decode as bunctrl 0 # CHECK: bcctrl 12, 3, 0 0x4d 0x83 0x04 0x21 # FIXME: decode as bunlr+ 2 # CHECK: bclr 15, 11, 0 0x4d 0xeb 0x00 0x20 # FIXME: decode as bunlr+ 0 # CHECK: bclr 15, 3, 0 0x4d 0xe3 0x00 0x20 # FIXME: decode as bunctr+ 2 # CHECK: bcctr 15, 11, 0 0x4d 0xeb 0x04 0x20 # FIXME: decode as bunctr+ 0 # CHECK: bcctr 15, 3, 0 0x4d 0xe3 0x04 0x20 # FIXME: decode as bunlrl+ 2 # CHECK: bclrl 15, 11, 0 0x4d 0xeb 0x00 0x21 # FIXME: decode as bunlrl+ 0 # CHECK: bclrl 15, 3, 0 0x4d 0xe3 0x00 0x21 # FIXME: decode as bunctrl+ 2 # CHECK: bcctrl 15, 11, 0 0x4d 0xeb 0x04 0x21 # FIXME: decode as bunctrl+ 0 # CHECK: bcctrl 15, 3, 0 0x4d 0xe3 0x04 0x21 # FIXME: decode as bunlr- 2 # CHECK: bclr 14, 11, 0 0x4d 0xcb 0x00 0x20 # FIXME: decode as bunlr- 0 # CHECK: bclr 14, 3, 0 0x4d 0xc3 0x00 0x20 # FIXME: decode as bunctr- 2 # CHECK: bcctr 14, 11, 0 0x4d 0xcb 0x04 0x20 # FIXME: decode as bunctr- 0 # CHECK: bcctr 14, 3, 0 0x4d 0xc3 0x04 0x20 # FIXME: decode as bunlrl- 2 # CHECK: bclrl 14, 11, 0 0x4d 0xcb 0x00 0x21 # FIXME: decode as bunlrl- 0 # CHECK: bclrl 14, 3, 0 0x4d 0xc3 0x00 0x21 # FIXME: decode as bunctrl- 2 # CHECK: bcctrl 14, 11, 0 0x4d 0xcb 0x04 0x21 # FIXME: decode as bunctrl- 0 # CHECK: bcctrl 14, 3, 0 0x4d 0xc3 0x04 0x21 # FIXME: decode as bnulr 2 # CHECK: bclr 4, 11, 0 0x4c 0x8b 0x00 0x20 # FIXME: decode as bnulr 0 # CHECK: bclr 4, 3, 0 0x4c 0x83 0x00 0x20 # FIXME: decode as bnuctr 2 # CHECK: bcctr 4, 11, 0 0x4c 0x8b 0x04 0x20 # FIXME: decode as bnuctr 0 # CHECK: bcctr 4, 3, 0 0x4c 0x83 0x04 0x20 # FIXME: decode as bnulrl 2 # CHECK: bclrl 4, 11, 0 0x4c 0x8b 0x00 0x21 # FIXME: decode as bnulrl 0 # CHECK: bclrl 4, 3, 0 0x4c 0x83 0x00 0x21 # FIXME: decode as bnuctrl 2 # CHECK: bcctrl 4, 11, 0 0x4c 0x8b 0x04 0x21 # FIXME: decode as bnuctrl 0 # CHECK: bcctrl 4, 3, 0 0x4c 0x83 0x04 0x21 # FIXME: decode as bnulr+ 2 # CHECK: bclr 7, 11, 0 0x4c 0xeb 0x00 0x20 # FIXME: decode as bnulr+ 0 # CHECK: bclr 7, 3, 0 0x4c 0xe3 0x00 0x20 # FIXME: decode as bnuctr+ 2 # CHECK: bcctr 7, 11, 0 0x4c 0xeb 0x04 0x20 # FIXME: decode as bnuctr+ 0 # CHECK: bcctr 7, 3, 0 0x4c 0xe3 0x04 0x20 # FIXME: decode as bnulrl+ 2 # CHECK: bclrl 7, 11, 0 0x4c 0xeb 0x00 0x21 # FIXME: decode as bnulrl+ 0 # CHECK: bclrl 7, 3, 0 0x4c 0xe3 0x00 0x21 # FIXME: decode as bnuctrl+ 2 # CHECK: bcctrl 7, 11, 0 0x4c 0xeb 0x04 0x21 # FIXME: decode as bnuctrl+ 0 # CHECK: bcctrl 7, 3, 0 0x4c 0xe3 0x04 0x21 # FIXME: decode as bnulr- 2 # CHECK: bclr 6, 11, 0 0x4c 0xcb 0x00 0x20 # FIXME: decode as bnulr- 0 # CHECK: bclr 6, 3, 0 0x4c 0xc3 0x00 0x20 # FIXME: decode as bnuctr- 2 # CHECK: bcctr 6, 11, 0 0x4c 0xcb 0x04 0x20 # FIXME: decode as bnuctr- 0 # CHECK: bcctr 6, 3, 0 0x4c 0xc3 0x04 0x20 # FIXME: decode as bnulrl- 2 # CHECK: bclrl 6, 11, 0 0x4c 0xcb 0x00 0x21 # FIXME: decode as bnulrl- 0 # CHECK: bclrl 6, 3, 0 0x4c 0xc3 0x00 0x21 # FIXME: decode as bnuctrl- 2 # CHECK: bcctrl 6, 11, 0 0x4c 0xcb 0x04 0x21 # FIXME: decode as bnuctrl- 0 # CHECK: bcctrl 6, 3, 0 0x4c 0xc3 0x04 0x21 # FIXME: decode as bunlr 2 # CHECK: bclr 12, 11, 0 0x4d 0x8b 0x00 0x20 # FIXME: decode as bunlr 0 # CHECK: bclr 12, 3, 0 0x4d 0x83 0x00 0x20 # FIXME: decode as bunctr 2 # CHECK: bcctr 12, 11, 0 0x4d 0x8b 0x04 0x20 # FIXME: decode as bunctr 0 # CHECK: bcctr 12, 3, 0 0x4d 0x83 0x04 0x20 # FIXME: decode as bunlrl 2 # CHECK: bclrl 12, 11, 0 0x4d 0x8b 0x00 0x21 # FIXME: decode as bunlrl 0 # CHECK: bclrl 12, 3, 0 0x4d 0x83 0x00 0x21 # FIXME: decode as bunctrl 2 # CHECK: bcctrl 12, 11, 0 0x4d 0x8b 0x04 0x21 # FIXME: decode as bunctrl 0 # CHECK: bcctrl 12, 3, 0 0x4d 0x83 0x04 0x21 # FIXME: decode as bunlr+ 2 # CHECK: bclr 15, 11, 0 0x4d 0xeb 0x00 0x20 # FIXME: decode as bunlr+ 0 # CHECK: bclr 15, 3, 0 0x4d 0xe3 0x00 0x20 # FIXME: decode as bunctr+ 2 # CHECK: bcctr 15, 11, 0 0x4d 0xeb 0x04 0x20 # FIXME: decode as bunctr+ 0 # CHECK: bcctr 15, 3, 0 0x4d 0xe3 0x04 0x20 # FIXME: decode as bunlrl+ 2 # CHECK: bclrl 15, 11, 0 0x4d 0xeb 0x00 0x21 # FIXME: decode as bunlrl+ 0 # CHECK: bclrl 15, 3, 0 0x4d 0xe3 0x00 0x21 # FIXME: decode as bunctrl+ 2 # CHECK: bcctrl 15, 11, 0 0x4d 0xeb 0x04 0x21 # FIXME: decode as bunctrl+ 0 # CHECK: bcctrl 15, 3, 0 0x4d 0xe3 0x04 0x21 # FIXME: decode as bunlr- 2 # CHECK: bclr 14, 11, 0 0x4d 0xcb 0x00 0x20 # FIXME: decode as bunlr- 0 # CHECK: bclr 14, 3, 0 0x4d 0xc3 0x00 0x20 # FIXME: decode as bunctr- 2 # CHECK: bcctr 14, 11, 0 0x4d 0xcb 0x04 0x20 # FIXME: decode as bunctr- 0 # CHECK: bcctr 14, 3, 0 0x4d 0xc3 0x04 0x20 # FIXME: decode as bunlrl- 2 # CHECK: bclrl 14, 11, 0 0x4d 0xcb 0x00 0x21 # FIXME: decode as bunlrl- 0 # CHECK: bclrl 14, 3, 0 0x4d 0xc3 0x00 0x21 # FIXME: decode as bunctrl- 2 # CHECK: bcctrl 14, 11, 0 0x4d 0xcb 0x04 0x21 # FIXME: decode as bunctrl- 0 # CHECK: bcctrl 14, 3, 0 0x4d 0xc3 0x04 0x21 # FIXME: decode as bnulr 2 # CHECK: bclr 4, 11, 0 0x4c 0x8b 0x00 0x20 # FIXME: decode as bnulr 0 # CHECK: bclr 4, 3, 0 0x4c 0x83 0x00 0x20 # FIXME: decode as bnuctr 2 # CHECK: bcctr 4, 11, 0 0x4c 0x8b 0x04 0x20 # FIXME: decode as bnuctr 0 # CHECK: bcctr 4, 3, 0 0x4c 0x83 0x04 0x20 # FIXME: decode as bnulrl 2 # CHECK: bclrl 4, 11, 0 0x4c 0x8b 0x00 0x21 # FIXME: decode as bnulrl 0 # CHECK: bclrl 4, 3, 0 0x4c 0x83 0x00 0x21 # FIXME: decode as bnuctrl 2 # CHECK: bcctrl 4, 11, 0 0x4c 0x8b 0x04 0x21 # FIXME: decode as bnuctrl 0 # CHECK: bcctrl 4, 3, 0 0x4c 0x83 0x04 0x21 # FIXME: decode as bnulr+ 2 # CHECK: bclr 7, 11, 0 0x4c 0xeb 0x00 0x20 # FIXME: decode as bnulr+ 0 # CHECK: bclr 7, 3, 0 0x4c 0xe3 0x00 0x20 # FIXME: decode as bnuctr+ 2 # CHECK: bcctr 7, 11, 0 0x4c 0xeb 0x04 0x20 # FIXME: decode as bnuctr+ 0 # CHECK: bcctr 7, 3, 0 0x4c 0xe3 0x04 0x20 # FIXME: decode as bnulrl+ 2 # CHECK: bclrl 7, 11, 0 0x4c 0xeb 0x00 0x21 # FIXME: decode as bnulrl+ 0 # CHECK: bclrl 7, 3, 0 0x4c 0xe3 0x00 0x21 # FIXME: decode as bnuctrl+ 2 # CHECK: bcctrl 7, 11, 0 0x4c 0xeb 0x04 0x21 # FIXME: decode as bnuctrl+ 0 # CHECK: bcctrl 7, 3, 0 0x4c 0xe3 0x04 0x21 # FIXME: decode as bnulr- 2 # CHECK: bclr 6, 11, 0 0x4c 0xcb 0x00 0x20 # FIXME: decode as bnulr- 0 # CHECK: bclr 6, 3, 0 0x4c 0xc3 0x00 0x20 # FIXME: decode as bnuctr- 2 # CHECK: bcctr 6, 11, 0 0x4c 0xcb 0x04 0x20 # FIXME: decode as bnuctr- 0 # CHECK: bcctr 6, 3, 0 0x4c 0xc3 0x04 0x20 # FIXME: decode as bnulrl- 2 # CHECK: bclrl 6, 11, 0 0x4c 0xcb 0x00 0x21 # FIXME: decode as bnulrl- 0 # CHECK: bclrl 6, 3, 0 0x4c 0xc3 0x00 0x21 # FIXME: decode as bnuctrl- 2 # CHECK: bcctrl 6, 11, 0 0x4c 0xcb 0x04 0x21 # FIXME: decode as bnuctrl- 0 # CHECK: bcctrl 6, 3, 0 0x4c 0xc3 0x04 0x21 # FIXME: test bc 12, 2, target # FIXME: test bca 12, 2, target # FIXME: test bcl 12, 2, target # FIXME: test bcla 12, 2, target # FIXME: test bc 15, 2, target # FIXME: test bca 15, 2, target # FIXME: test bcl 15, 2, target # FIXME: test bcla 15, 2, target # FIXME: test bc 14, 2, target # FIXME: test bca 14, 2, target # FIXME: test bcl 14, 2, target # FIXME: test bcla 14, 2, target # FIXME: test bc 4, 2, target # FIXME: test bca 4, 2, target # FIXME: test bcl 4, 2, target # FIXME: test bcla 4, 2, target # FIXME: test bc 7, 2, target # FIXME: test bca 7, 2, target # FIXME: test bcl 7, 2, target # FIXME: test bcla 7, 2, target # FIXME: test bc 6, 2, target # FIXME: test bca 6, 2, target # FIXME: test bcl 6, 2, target # FIXME: test bcla 6, 2, target # FIXME: test bdnz target # FIXME: test bdnza target # FIXME: test bdnzl target # FIXME: test bdnzla target # FIXME: test bdnz+ target # FIXME: test bdnza+ target # FIXME: test bdnzl+ target # FIXME: test bdnzla+ target # FIXME: test bdnz- target # FIXME: test bdnza- target # FIXME: test bdnzl- target # FIXME: test bdnzla- target # FIXME: test bc 8, 2, target # FIXME: test bca 8, 2, target # FIXME: test bcl 8, 2, target # FIXME: test bcla 8, 2, target # FIXME: test bc 0, 2, target # FIXME: test bca 0, 2, target # FIXME: test bcl 0, 2, target # FIXME: test bcla 0, 2, target # FIXME: test bdz target # FIXME: test bdza target # FIXME: test bdzl target # FIXME: test bdzla target # FIXME: test bdz+ target # FIXME: test bdza+ target # FIXME: test bdzl+ target # FIXME: test bdzla+ target # FIXME: test bdz- target # FIXME: test bdza- target # FIXME: test bdzl- target # FIXME: test bdzla- target # FIXME: test bc 10, 2, target # FIXME: test bca 10, 2, target # FIXME: test bcl 10, 2, target # FIXME: test bcla 10, 2, target # FIXME: test bc 2, 2, target # FIXME: test bca 2, 2, target # FIXME: test bcl 2, 2, target # FIXME: test bcla 2, 2, target # FIXME: test blt 2, target # FIXME: test blt 0, target # FIXME: test blta 2, target # FIXME: test blta 0, target # FIXME: test bltl 2, target # FIXME: test bltl 0, target # FIXME: test bltla 2, target # FIXME: test bltla 0, target # FIXME: test blt+ 2, target # FIXME: test blt+ 0, target # FIXME: test blta+ 2, target # FIXME: test blta+ 0, target # FIXME: test bltl+ 2, target # FIXME: test bltl+ 0, target # FIXME: test bltla+ 2, target # FIXME: test bltla+ 0, target # FIXME: test blt- 2, target # FIXME: test blt- 0, target # FIXME: test blta- 2, target # FIXME: test blta- 0, target # FIXME: test bltl- 2, target # FIXME: test bltl- 0, target # FIXME: test bltla- 2, target # FIXME: test bltla- 0, target # FIXME: test ble 2, target # FIXME: test ble 0, target # FIXME: test blea 2, target # FIXME: test blea 0, target # FIXME: test blel 2, target # FIXME: test blel 0, target # FIXME: test blela 2, target # FIXME: test blela 0, target # FIXME: test ble+ 2, target # FIXME: test ble+ 0, target # FIXME: test blea+ 2, target # FIXME: test blea+ 0, target # FIXME: test blel+ 2, target # FIXME: test blel+ 0, target # FIXME: test blela+ 2, target # FIXME: test blela+ 0, target # FIXME: test ble- 2, target # FIXME: test ble- 0, target # FIXME: test blea- 2, target # FIXME: test blea- 0, target # FIXME: test blel- 2, target # FIXME: test blel- 0, target # FIXME: test blela- 2, target # FIXME: test blela- 0, target # FIXME: test beq 2, target # FIXME: test beq 0, target # FIXME: test beqa 2, target # FIXME: test beqa 0, target # FIXME: test beql 2, target # FIXME: test beql 0, target # FIXME: test beqla 2, target # FIXME: test beqla 0, target # FIXME: test beq+ 2, target # FIXME: test beq+ 0, target # FIXME: test beqa+ 2, target # FIXME: test beqa+ 0, target # FIXME: test beql+ 2, target # FIXME: test beql+ 0, target # FIXME: test beqla+ 2, target # FIXME: test beqla+ 0, target # FIXME: test beq- 2, target # FIXME: test beq- 0, target # FIXME: test beqa- 2, target # FIXME: test beqa- 0, target # FIXME: test beql- 2, target # FIXME: test beql- 0, target # FIXME: test beqla- 2, target # FIXME: test beqla- 0, target # FIXME: test bge 2, target # FIXME: test bge 0, target # FIXME: test bgea 2, target # FIXME: test bgea 0, target # FIXME: test bgel 2, target # FIXME: test bgel 0, target # FIXME: test bgela 2, target # FIXME: test bgela 0, target # FIXME: test bge+ 2, target # FIXME: test bge+ 0, target # FIXME: test bgea+ 2, target # FIXME: test bgea+ 0, target # FIXME: test bgel+ 2, target # FIXME: test bgel+ 0, target # FIXME: test bgela+ 2, target # FIXME: test bgela+ 0, target # FIXME: test bge- 2, target # FIXME: test bge- 0, target # FIXME: test bgea- 2, target # FIXME: test bgea- 0, target # FIXME: test bgel- 2, target # FIXME: test bgel- 0, target # FIXME: test bgela- 2, target # FIXME: test bgela- 0, target # FIXME: test bgt 2, target # FIXME: test bgt 0, target # FIXME: test bgta 2, target # FIXME: test bgta 0, target # FIXME: test bgtl 2, target # FIXME: test bgtl 0, target # FIXME: test bgtla 2, target # FIXME: test bgtla 0, target # FIXME: test bgt+ 2, target # FIXME: test bgt+ 0, target # FIXME: test bgta+ 2, target # FIXME: test bgta+ 0, target # FIXME: test bgtl+ 2, target # FIXME: test bgtl+ 0, target # FIXME: test bgtla+ 2, target # FIXME: test bgtla+ 0, target # FIXME: test bgt- 2, target # FIXME: test bgt- 0, target # FIXME: test bgta- 2, target # FIXME: test bgta- 0, target # FIXME: test bgtl- 2, target # FIXME: test bgtl- 0, target # FIXME: test bgtla- 2, target # FIXME: test bgtla- 0, target # FIXME: test bge 2, target # FIXME: test bge 0, target # FIXME: test bgea 2, target # FIXME: test bgea 0, target # FIXME: test bgel 2, target # FIXME: test bgel 0, target # FIXME: test bgela 2, target # FIXME: test bgela 0, target # FIXME: test bge+ 2, target # FIXME: test bge+ 0, target # FIXME: test bgea+ 2, target # FIXME: test bgea+ 0, target # FIXME: test bgel+ 2, target # FIXME: test bgel+ 0, target # FIXME: test bgela+ 2, target # FIXME: test bgela+ 0, target # FIXME: test bge- 2, target # FIXME: test bge- 0, target # FIXME: test bgea- 2, target # FIXME: test bgea- 0, target # FIXME: test bgel- 2, target # FIXME: test bgel- 0, target # FIXME: test bgela- 2, target # FIXME: test bgela- 0, target # FIXME: test bne 2, target # FIXME: test bne 0, target # FIXME: test bnea 2, target # FIXME: test bnea 0, target # FIXME: test bnel 2, target # FIXME: test bnel 0, target # FIXME: test bnela 2, target # FIXME: test bnela 0, target # FIXME: test bne+ 2, target # FIXME: test bne+ 0, target # FIXME: test bnea+ 2, target # FIXME: test bnea+ 0, target # FIXME: test bnel+ 2, target # FIXME: test bnel+ 0, target # FIXME: test bnela+ 2, target # FIXME: test bnela+ 0, target # FIXME: test bne- 2, target # FIXME: test bne- 0, target # FIXME: test bnea- 2, target # FIXME: test bnea- 0, target # FIXME: test bnel- 2, target # FIXME: test bnel- 0, target # FIXME: test bnela- 2, target # FIXME: test bnela- 0, target # FIXME: test ble 2, target # FIXME: test ble 0, target # FIXME: test blea 2, target # FIXME: test blea 0, target # FIXME: test blel 2, target # FIXME: test blel 0, target # FIXME: test blela 2, target # FIXME: test blela 0, target # FIXME: test ble+ 2, target # FIXME: test ble+ 0, target # FIXME: test blea+ 2, target # FIXME: test blea+ 0, target # FIXME: test blel+ 2, target # FIXME: test blel+ 0, target # FIXME: test blela+ 2, target # FIXME: test blela+ 0, target # FIXME: test ble- 2, target # FIXME: test ble- 0, target # FIXME: test blea- 2, target # FIXME: test blea- 0, target # FIXME: test blel- 2, target # FIXME: test blel- 0, target # FIXME: test blela- 2, target # FIXME: test blela- 0, target # FIXME: test bun 2, target # FIXME: test bun 0, target # FIXME: test buna 2, target # FIXME: test buna 0, target # FIXME: test bunl 2, target # FIXME: test bunl 0, target # FIXME: test bunla 2, target # FIXME: test bunla 0, target # FIXME: test bun+ 2, target # FIXME: test bun+ 0, target # FIXME: test buna+ 2, target # FIXME: test buna+ 0, target # FIXME: test bunl+ 2, target # FIXME: test bunl+ 0, target # FIXME: test bunla+ 2, target # FIXME: test bunla+ 0, target # FIXME: test bun- 2, target # FIXME: test bun- 0, target # FIXME: test buna- 2, target # FIXME: test buna- 0, target # FIXME: test bunl- 2, target # FIXME: test bunl- 0, target # FIXME: test bunla- 2, target # FIXME: test bunla- 0, target # FIXME: test bnu 2, target # FIXME: test bnu 0, target # FIXME: test bnua 2, target # FIXME: test bnua 0, target # FIXME: test bnul 2, target # FIXME: test bnul 0, target # FIXME: test bnula 2, target # FIXME: test bnula 0, target # FIXME: test bnu+ 2, target # FIXME: test bnu+ 0, target # FIXME: test bnua+ 2, target # FIXME: test bnua+ 0, target # FIXME: test bnul+ 2, target # FIXME: test bnul+ 0, target # FIXME: test bnula+ 2, target # FIXME: test bnula+ 0, target # FIXME: test bnu- 2, target # FIXME: test bnu- 0, target # FIXME: test bnua- 2, target # FIXME: test bnua- 0, target # FIXME: test bnul- 2, target # FIXME: test bnul- 0, target # FIXME: test bnula- 2, target # FIXME: test bnula- 0, target # FIXME: test bun 2, target # FIXME: test bun 0, target # FIXME: test buna 2, target # FIXME: test buna 0, target # FIXME: test bunl 2, target # FIXME: test bunl 0, target # FIXME: test bunla 2, target # FIXME: test bunla 0, target # FIXME: test bun+ 2, target # FIXME: test bun+ 0, target # FIXME: test buna+ 2, target # FIXME: test buna+ 0, target # FIXME: test bunl+ 2, target # FIXME: test bunl+ 0, target # FIXME: test bunla+ 2, target # FIXME: test bunla+ 0, target # FIXME: test bun- 2, target # FIXME: test bun- 0, target # FIXME: test buna- 2, target # FIXME: test buna- 0, target # FIXME: test bunl- 2, target # FIXME: test bunl- 0, target # FIXME: test bunla- 2, target # FIXME: test bunla- 0, target # FIXME: test bnu 2, target # FIXME: test bnu 0, target # FIXME: test bnua 2, target # FIXME: test bnua 0, target # FIXME: test bnul 2, target # FIXME: test bnul 0, target # FIXME: test bnula 2, target # FIXME: test bnula 0, target # FIXME: test bnu+ 2, target # FIXME: test bnu+ 0, target # FIXME: test bnua+ 2, target # FIXME: test bnua+ 0, target # FIXME: test bnul+ 2, target # FIXME: test bnul+ 0, target # FIXME: test bnula+ 2, target # FIXME: test bnula+ 0, target # FIXME: test bnu- 2, target # FIXME: test bnu- 0, target # FIXME: test bnua- 2, target # FIXME: test bnua- 0, target # FIXME: test bnul- 2, target # FIXME: test bnul- 0, target # FIXME: test bnula- 2, target # FIXME: test bnula- 0, target # CHECK: creqv 2, 2, 2 0x4c 0x42 0x12 0x42 # CHECK: crxor 2, 2, 2 0x4c 0x42 0x11 0x82 # CHECK: cror 2, 3, 3 0x4c 0x43 0x1b 0x82 # CHECK: crnor 2, 3, 3 0x4c 0x43 0x18 0x42 # CHECK: addi 2, 3, -128 0x38 0x43 0xff 0x80 # CHECK: addis 2, 3, -128 0x3c 0x43 0xff 0x80 # CHECK: addic 2, 3, -128 0x30 0x43 0xff 0x80 # CHECK: addic. 2, 3, -128 0x34 0x43 0xff 0x80 # CHECK: subf 2, 4, 3 0x7c 0x44 0x18 0x50 # CHECK: subf. 2, 4, 3 0x7c 0x44 0x18 0x51 # CHECK: subfc 2, 4, 3 0x7c 0x44 0x18 0x10 # CHECK: subfc. 2, 4, 3 0x7c 0x44 0x18 0x11 # CHECK: cmpdi 2, 3, 128 0x2d 0x23 0x00 0x80 # CHECK: cmpdi 0, 3, 128 0x2c 0x23 0x00 0x80 # CHECK: cmpd 2, 3, 4 0x7d 0x23 0x20 0x00 # CHECK: cmpd 0, 3, 4 0x7c 0x23 0x20 0x00 # CHECK: cmpldi 2, 3, 128 0x29 0x23 0x00 0x80 # CHECK: cmpldi 0, 3, 128 0x28 0x23 0x00 0x80 # CHECK: cmpld 2, 3, 4 0x7d 0x23 0x20 0x40 # CHECK: cmpld 0, 3, 4 0x7c 0x23 0x20 0x40 # CHECK: cmpwi 2, 3, 128 0x2d 0x03 0x00 0x80 # CHECK: cmpwi 0, 3, 128 0x2c 0x03 0x00 0x80 # CHECK: cmpw 2, 3, 4 0x7d 0x03 0x20 0x00 # CHECK: cmpw 0, 3, 4 0x7c 0x03 0x20 0x00 # CHECK: cmplwi 2, 3, 128 0x29 0x03 0x00 0x80 # CHECK: cmplwi 0, 3, 128 0x28 0x03 0x00 0x80 # CHECK: cmplw 2, 3, 4 0x7d 0x03 0x20 0x40 # CHECK: cmplw 0, 3, 4 0x7c 0x03 0x20 0x40 # CHECK: twi 16, 3, 4 0x0e 0x03 0x00 0x04 # CHECK: tw 16, 3, 4 0x7e 0x03 0x20 0x08 # CHECK: tdi 16, 3, 4 0x0a 0x03 0x00 0x04 # CHECK: td 16, 3, 4 0x7e 0x03 0x20 0x88 # CHECK: twi 20, 3, 4 0x0e 0x83 0x00 0x04 # CHECK: tw 20, 3, 4 0x7e 0x83 0x20 0x08 # CHECK: tdi 20, 3, 4 0x0a 0x83 0x00 0x04 # CHECK: td 20, 3, 4 0x7e 0x83 0x20 0x88 # CHECK: twi 4, 3, 4 0x0c 0x83 0x00 0x04 # CHECK: tw 4, 3, 4 0x7c 0x83 0x20 0x08 # CHECK: tdi 4, 3, 4 0x08 0x83 0x00 0x04 # CHECK: td 4, 3, 4 0x7c 0x83 0x20 0x88 # CHECK: twi 12, 3, 4 0x0d 0x83 0x00 0x04 # CHECK: tw 12, 3, 4 0x7d 0x83 0x20 0x08 # CHECK: tdi 12, 3, 4 0x09 0x83 0x00 0x04 # CHECK: td 12, 3, 4 0x7d 0x83 0x20 0x88 # CHECK: twi 8, 3, 4 0x0d 0x03 0x00 0x04 # CHECK: tw 8, 3, 4 0x7d 0x03 0x20 0x08 # CHECK: tdi 8, 3, 4 0x09 0x03 0x00 0x04 # CHECK: td 8, 3, 4 0x7d 0x03 0x20 0x88 # CHECK: twi 12, 3, 4 0x0d 0x83 0x00 0x04 # CHECK: tw 12, 3, 4 0x7d 0x83 0x20 0x08 # CHECK: tdi 12, 3, 4 0x09 0x83 0x00 0x04 # CHECK: td 12, 3, 4 0x7d 0x83 0x20 0x88 # CHECK: twi 24, 3, 4 0x0f 0x03 0x00 0x04 # CHECK: tw 24, 3, 4 0x7f 0x03 0x20 0x08 # CHECK: tdi 24, 3, 4 0x0b 0x03 0x00 0x04 # CHECK: td 24, 3, 4 0x7f 0x03 0x20 0x88 # CHECK: twi 20, 3, 4 0x0e 0x83 0x00 0x04 # CHECK: tw 20, 3, 4 0x7e 0x83 0x20 0x08 # CHECK: tdi 20, 3, 4 0x0a 0x83 0x00 0x04 # CHECK: td 20, 3, 4 0x7e 0x83 0x20 0x88 # CHECK: twi 2, 3, 4 0x0c 0x43 0x00 0x04 # CHECK: tw 2, 3, 4 0x7c 0x43 0x20 0x08 # CHECK: tdi 2, 3, 4 0x08 0x43 0x00 0x04 # CHECK: td 2, 3, 4 0x7c 0x43 0x20 0x88 # CHECK: twi 6, 3, 4 0x0c 0xc3 0x00 0x04 # CHECK: tw 6, 3, 4 0x7c 0xc3 0x20 0x08 # CHECK: tdi 6, 3, 4 0x08 0xc3 0x00 0x04 # CHECK: td 6, 3, 4 0x7c 0xc3 0x20 0x88 # CHECK: twi 5, 3, 4 0x0c 0xa3 0x00 0x04 # CHECK: tw 5, 3, 4 0x7c 0xa3 0x20 0x08 # CHECK: tdi 5, 3, 4 0x08 0xa3 0x00 0x04 # CHECK: td 5, 3, 4 0x7c 0xa3 0x20 0x88 # CHECK: twi 1, 3, 4 0x0c 0x23 0x00 0x04 # CHECK: tw 1, 3, 4 0x7c 0x23 0x20 0x08 # CHECK: tdi 1, 3, 4 0x08 0x23 0x00 0x04 # CHECK: td 1, 3, 4 0x7c 0x23 0x20 0x88 # CHECK: twi 5, 3, 4 0x0c 0xa3 0x00 0x04 # CHECK: tw 5, 3, 4 0x7c 0xa3 0x20 0x08 # CHECK: tdi 5, 3, 4 0x08 0xa3 0x00 0x04 # CHECK: td 5, 3, 4 0x7c 0xa3 0x20 0x88 # CHECK: twi 6, 3, 4 0x0c 0xc3 0x00 0x04 # CHECK: tw 6, 3, 4 0x7c 0xc3 0x20 0x08 # CHECK: tdi 6, 3, 4 0x08 0xc3 0x00 0x04 # CHECK: td 6, 3, 4 0x7c 0xc3 0x20 0x88 # CHECK: twi 31, 3, 4 0x0f 0xe3 0x00 0x04 # CHECK: tw 31, 3, 4 0x7f 0xe3 0x20 0x08 # CHECK: tdi 31, 3, 4 0x0b 0xe3 0x00 0x04 # CHECK: td 31, 3, 4 0x7f 0xe3 0x20 0x88 # CHECK: trap 0x7f 0xe0 0x00 0x08 # CHECK: rldicr 2, 3, 5, 3 0x78 0x62 0x28 0xc4 # CHECK: rldicr. 2, 3, 5, 3 0x78 0x62 0x28 0xc5 # CHECK: rldicl 2, 3, 9, 60 0x78 0x62 0x4f 0x20 # CHECK: rldicl. 2, 3, 9, 60 0x78 0x62 0x4f 0x21 # CHECK: rldimi 2, 3, 55, 5 0x78 0x62 0xb9 0x4e # CHECK: rldimi. 2, 3, 55, 5 0x78 0x62 0xb9 0x4f # CHECK: rldicl 2, 3, 4, 0 0x78 0x62 0x20 0x00 # CHECK: rldicl. 2, 3, 4, 0 0x78 0x62 0x20 0x01 # CHECK: rldicl 2, 3, 60, 0 0x78 0x62 0xe0 0x02 # CHECK: rldicl. 2, 3, 60, 0 0x78 0x62 0xe0 0x03 # CHECK: rldcl 2, 3, 4, 0 0x78 0x62 0x20 0x10 # CHECK: rldcl. 2, 3, 4, 0 0x78 0x62 0x20 0x11 # CHECK: sldi 2, 3, 4 0x78 0x62 0x26 0xe4 # CHECK: rldicr. 2, 3, 4, 59 0x78 0x62 0x26 0xe5 # CHECK: rldicl 2, 3, 60, 4 0x78 0x62 0xe1 0x02 # CHECK: rldicl. 2, 3, 60, 4 0x78 0x62 0xe1 0x03 # CHECK: rldicl 2, 3, 0, 4 0x78 0x62 0x01 0x00 # CHECK: rldicl. 2, 3, 0, 4 0x78 0x62 0x01 0x01 # CHECK: rldicr 2, 3, 0, 59 0x78 0x62 0x06 0xe4 # CHECK: rldicr. 2, 3, 0, 59 0x78 0x62 0x06 0xe5 # CHECK: rldic 2, 3, 4, 1 0x78 0x62 0x20 0x48 # CHECK: rldic. 2, 3, 4, 1 0x78 0x62 0x20 0x49 # CHECK: rlwinm 2, 3, 5, 0, 3 0x54 0x62 0x28 0x06 # CHECK: rlwinm. 2, 3, 5, 0, 3 0x54 0x62 0x28 0x07 # CHECK: rlwinm 2, 3, 9, 28, 31 0x54 0x62 0x4f 0x3e # CHECK: rlwinm. 2, 3, 9, 28, 31 0x54 0x62 0x4f 0x3f # CHECK: rlwimi 2, 3, 27, 5, 8 0x50 0x62 0xd9 0x50 # CHECK: rlwimi. 2, 3, 27, 5, 8 0x50 0x62 0xd9 0x51 # CHECK: rlwimi 2, 3, 23, 5, 8 0x50 0x62 0xb9 0x50 # CHECK: rlwimi. 2, 3, 23, 5, 8 0x50 0x62 0xb9 0x51 # CHECK: rlwinm 2, 3, 4, 0, 31 0x54 0x62 0x20 0x3e # CHECK: rlwinm. 2, 3, 4, 0, 31 0x54 0x62 0x20 0x3f # CHECK: rlwinm 2, 3, 28, 0, 31 0x54 0x62 0xe0 0x3e # CHECK: rlwinm. 2, 3, 28, 0, 31 0x54 0x62 0xe0 0x3f # CHECK: rlwnm 2, 3, 4, 0, 31 0x5c 0x62 0x20 0x3e # CHECK: rlwnm. 2, 3, 4, 0, 31 0x5c 0x62 0x20 0x3f # CHECK: slwi 2, 3, 4 0x54 0x62 0x20 0x36 # CHECK: rlwinm. 2, 3, 4, 0, 27 0x54 0x62 0x20 0x37 # CHECK: srwi 2, 3, 4 0x54 0x62 0xe1 0x3e # CHECK: rlwinm. 2, 3, 28, 4, 31 0x54 0x62 0xe1 0x3f # CHECK: rlwinm 2, 3, 0, 4, 31 0x54 0x62 0x01 0x3e # CHECK: rlwinm. 2, 3, 0, 4, 31 0x54 0x62 0x01 0x3f # CHECK: rlwinm 2, 3, 0, 0, 27 0x54 0x62 0x00 0x36 # CHECK: rlwinm. 2, 3, 0, 0, 27 0x54 0x62 0x00 0x37 # CHECK: rlwinm 2, 3, 4, 1, 27 0x54 0x62 0x20 0x76 # CHECK: rlwinm. 2, 3, 4, 1, 27 0x54 0x62 0x20 0x77 # CHECK: mtspr 1, 2 0x7c 0x41 0x03 0xa6 # CHECK: mfspr 2, 1 0x7c 0x41 0x02 0xa6 # CHECK: mtlr 2 0x7c 0x48 0x03 0xa6 # CHECK: mflr 2 0x7c 0x48 0x02 0xa6 # CHECK: mtctr 2 0x7c 0x49 0x03 0xa6 # CHECK: mfctr 2 0x7c 0x49 0x02 0xa6 # CHECK: nop 0x60 0x00 0x00 0x00 # CHECK: xori 0, 0, 0 0x68 0x00 0x00 0x00 # CHECK: li 2, 128 0x38 0x40 0x00 0x80 # CHECK: lis 2, 128 0x3c 0x40 0x00 0x80 # CHECK: mr 2, 3 0x7c 0x62 0x1b 0x78 # CHECK: or. 2, 3, 3 0x7c 0x62 0x1b 0x79 # CHECK: nor 2, 3, 3 0x7c 0x62 0x18 0xf8 # CHECK: nor. 2, 3, 3 0x7c 0x62 0x18 0xf9 # CHECK: mtcrf 255, 2 0x7c 0x4f 0xf1 0x20
{ "pile_set_name": "Github" }
臼井さと美最新番号 【OKAX-304】パンモロで勃起させられ!まんモロで手コかれる!竿いじりを楽しむフェロモン全開お姉さん 【UMSO-157】媚薬近親相姦 4時間16人ベスト 【JUSD-742】ぴったり尻に張り付くむっちむちジーパン美熟女BEST 【BDA-031】縛り拷問 奴隷市場の宴 其ノ貮 【MUJG-002】不妊治療クリニックで孕まされて…BEST 4時間 【XRW-248】鬼縛り 全身縛られた極限状態の交尾! 【SDMU-424】美熟女が誘うサインを見逃すな これを見逃すとあなたも性犯罪者 【MOND-099】もう1発だけアイツとSEXしてきてイイからかわりに盗撮してきなさい… 臼井さと美 【XRW-228】イカセ拷問 鬼犯02 【UMSO-102】媚薬近親相姦 02 姉さんと母さんを極秘ルートで入手したバイアグラを飲ませて身動き出来なくしてからそのまま生挿入して犯してしまった… 【JUSD-729】浮きブラ奥さんが年下男を誘惑する無意識チラリズム8時間 【KUSR-022】中出し媚薬近親相姦 愛しい息子に縛られた母… 【JUSD-724】年下男の荒々しいセックスに溺れる美熟女430分 【JUSD-721】吐息を漏らしながら、目を合わせながら、舌を絡せ求め合うベロキス性交。 【JUSD-720】たぎる性欲を抑えきれず…今夜、夜這いしてみました8時間 【DNZR-001】女体絶頂陵辱ショー 恥辱の淫獄見世物痙攣 臼井さと美 【NDRA-021】女性が一番ムラムラしている月に一度の排卵日を狙われ、スケベな管理人の濃厚精液を膣内射精されて寝盗られたウチの妻 臼井さと美 【JUX-872】解禁真性中出し 人妻女教師 膣内射精授業 臼井さと美 【BDA-015】花と蠍 美しすぎる母を縄責め獄門調教 臼井さと美 【NTR-038】跨り淫語母 ~制欲を抑えきれないうちの妻~ 臼井さと美 【MUNJ-011】不妊治療クリニックで孕まされて… 臼井さと美 【ARM-512】シコらないから気持ち良過ぎるスローな手コキ 【PYM-186】自画撮り愛液べっちょりオマ○コに激しく指をズボズボ!!大開脚エロポーズで痙攣イキ激情オナニー 【JUX-818】寝取られた義姉~兄貴の分も俺がイカせてやるよ!~ 臼井さと美 【WA-307】夫以外のチ○ポでイキ狂う人妻24人 8時間 【VOSS-015】デカチンのせいでチ○コのポジションが定まらない僕は無意識にポジションを整える癖を義母さんに気づかれてしまい怒られるかと焦ったが『お父さんより立派ね」とヨダレをたらして欲情しはじめた。 臼井さと美 【AUKG-327】レズの教室~女教師2人、不純同性交遊のすゝめ~ 羽田璃子 臼井さと美 【VENU-575】近親[無言]相姦 隣にお父さんがいるのよ… 臼井さと美 【WPE-033】妻を生で寝取らせて… 臼井さと美 【JUX-705】毎朝ゴミ出し場ですれ違う浮きブラ奥さん 臼井さと美 【JUX-680】初撮り本物人妻 AV出演ドキュメント ~留学経験があるパティシエ奥様34歳~ 臼井さと美</a>2015-09-05マドンナ$$$Madonna160分钟
{ "pile_set_name": "Github" }
// eccrypto.cpp - originally written and placed in the public domain by Wei Dai #include "pch.h" #include "config.h" #if CRYPTOPP_MSC_VERSION # pragma warning(push) # pragma warning(disable: 4127 4189 4505) #endif #if CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wunused-function" #endif #ifndef CRYPTOPP_IMPORTS #include "eccrypto.h" #include "integer.h" #include "nbtheory.h" #include "filters.h" #include "argnames.h" #include "smartptr.h" #include "oids.h" #include "asn.h" #include "hex.h" #include "ec2n.h" #include "misc.h" // Squash MS LNK4221 and libtool warnings #ifndef CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES extern const char ECCRYPTO_FNAME[] = __FILE__; #endif NAMESPACE_BEGIN(CryptoPP) #if 0 #if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING) static void ECDSA_TestInstantiations() { ECDSA<EC2N>::Signer t1; ECDSA<EC2N>::Verifier t2(t1); ECNR<ECP>::Signer t3; ECNR<ECP>::Verifier t4(t3); ECIES<ECP>::Encryptor t5; ECIES<EC2N>::Decryptor t6; ECDH<ECP>::Domain t7; ECMQV<ECP>::Domain t8; } #endif #endif ANONYMOUS_NAMESPACE_BEGIN inline Integer ConvertToInteger(const PolynomialMod2 &x) { unsigned int l = x.ByteCount(); SecByteBlock temp(l); x.Encode(temp, l); return Integer(temp, l); } inline Integer ConvertToInteger(const Integer &x) { return x; } inline bool CheckMOVCondition(const Integer &q, const Integer &r) { // see "Updated standards for validating elliptic curves", http://eprint.iacr.org/2007/343 Integer t = 1; unsigned int n = q.IsEven() ? 1 : q.BitCount(), m = r.BitCount(); for (unsigned int i=n; DiscreteLogWorkFactor(i)<m/2; i+=n) { if (q.IsEven()) t = (t+t)%r; else t = (t*q)%r; if (t == 1) return false; } return true; } ANONYMOUS_NAMESPACE_END // ****************************************************************** template <class T> struct EcRecommendedParameters; template<> struct EcRecommendedParameters<EC2N> { EcRecommendedParameters(const OID &oid, unsigned int t2, unsigned int t3, unsigned int t4, const char *a, const char *b, const char *g, const char *n, unsigned int h) : oid(oid), a(a), b(b), g(g), n(n), h(h), t0(0), t1(0), t2(t2), t3(t3), t4(t4) {} EcRecommendedParameters(const OID &oid, unsigned int t0, unsigned int t1, unsigned int t2, unsigned int t3, unsigned int t4, const char *a, const char *b, const char *g, const char *n, unsigned int h) : oid(oid), a(a), b(b), g(g), n(n), h(h), t0(t0), t1(t1), t2(t2), t3(t3), t4(t4) {} EC2N *NewEC() const { StringSource ssA(a, true, new HexDecoder); StringSource ssB(b, true, new HexDecoder); if (t0 == 0) { if (t2 == 233 && t3 == 74 && t4 == 0) return new EC2N(GF2NT233(233, 74, 0), EC2N::FieldElement(ssA, (size_t)ssA.MaxRetrievable()), EC2N::FieldElement(ssB, (size_t)ssB.MaxRetrievable())); else return new EC2N(GF2NT(t2, t3, t4), EC2N::FieldElement(ssA, (size_t)ssA.MaxRetrievable()), EC2N::FieldElement(ssB, (size_t)ssB.MaxRetrievable())); } else return new EC2N(GF2NPP(t0, t1, t2, t3, t4), EC2N::FieldElement(ssA, (size_t)ssA.MaxRetrievable()), EC2N::FieldElement(ssB, (size_t)ssB.MaxRetrievable())); }; OID oid; const char *a, *b, *g, *n; unsigned int h, t0, t1, t2, t3, t4; }; template<> struct EcRecommendedParameters<ECP> { EcRecommendedParameters(const OID &oid, const char *p, const char *a, const char *b, const char *g, const char *n, unsigned int h) : oid(oid), p(p), a(a), b(b), g(g), n(n), h(h) {} ECP *NewEC() const { StringSource ssP(p, true, new HexDecoder); StringSource ssA(a, true, new HexDecoder); StringSource ssB(b, true, new HexDecoder); return new ECP(Integer(ssP, (size_t)ssP.MaxRetrievable()), ECP::FieldElement(ssA, (size_t)ssA.MaxRetrievable()), ECP::FieldElement(ssB, (size_t)ssB.MaxRetrievable())); }; OID oid; const char *p, *a, *b, *g, *n; unsigned int h; }; struct OIDLessThan { template <typename T> inline bool operator()(const EcRecommendedParameters<T>& a, const OID& b) {return a.oid < b;} template <typename T> inline bool operator()(const OID& a, const EcRecommendedParameters<T>& b) {return a < b.oid;} template <typename T> inline bool operator()(const EcRecommendedParameters<T>& a, const EcRecommendedParameters<T>& b) {return a.oid < b.oid;} }; static void GetRecommendedParameters(const EcRecommendedParameters<EC2N> *&begin, const EcRecommendedParameters<EC2N> *&end) { // this array must be sorted by OID static const EcRecommendedParameters<EC2N> rec[] = { EcRecommendedParameters<EC2N>(ASN1::sect163k1(), 163, 7, 6, 3, 0, "000000000000000000000000000000000000000001", "000000000000000000000000000000000000000001", "0402FE13C0537BBC11ACAA07D793DE4E6D5E5C94EEE80289070FB05D38FF58321F2E800536D538CCDAA3D9", "04000000000000000000020108A2E0CC0D99F8A5EF", 2), EcRecommendedParameters<EC2N>(ASN1::sect163r1(), 163, 7, 6, 3, 0, "07B6882CAAEFA84F9554FF8428BD88E246D2782AE2", "0713612DCDDCB40AAB946BDA29CA91F73AF958AFD9", "040369979697AB43897789566789567F787A7876A65400435EDB42EFAFB2989D51FEFCE3C80988F41FF883", "03FFFFFFFFFFFFFFFFFFFF48AAB689C29CA710279B", 2), EcRecommendedParameters<EC2N>(ASN1::sect239k1(), 239, 158, 0, "000000000000000000000000000000000000000000000000000000000000", "000000000000000000000000000000000000000000000000000000000001", "0429A0B6A887A983E9730988A68727A8B2D126C44CC2CC7B2A6555193035DC76310804F12E549BDB011C103089E73510ACB275FC312A5DC6B76553F0CA", "2000000000000000000000000000005A79FEC67CB6E91F1C1DA800E478A5", 4), EcRecommendedParameters<EC2N>(ASN1::sect113r1(), 113, 9, 0, "003088250CA6E7C7FE649CE85820F7", "00E8BEE4D3E2260744188BE0E9C723", "04009D73616F35F4AB1407D73562C10F00A52830277958EE84D1315ED31886", "0100000000000000D9CCEC8A39E56F", 2), EcRecommendedParameters<EC2N>(ASN1::sect113r2(), 113, 9, 0, "00689918DBEC7E5A0DD6DFC0AA55C7", "0095E9A9EC9B297BD4BF36E059184F", "0401A57A6A7B26CA5EF52FCDB816479700B3ADC94ED1FE674C06E695BABA1D", "010000000000000108789B2496AF93", 2), EcRecommendedParameters<EC2N>(ASN1::sect163r2(), 163, 7, 6, 3, 0, "000000000000000000000000000000000000000001", "020A601907B8C953CA1481EB10512F78744A3205FD", "0403F0EBA16286A2D57EA0991168D4994637E8343E3600D51FBC6C71A0094FA2CDD545B11C5C0C797324F1", "040000000000000000000292FE77E70C12A4234C33", 2), EcRecommendedParameters<EC2N>(ASN1::sect283k1(), 283, 12, 7, 5, 0, "000000000000000000000000000000000000000000000000000000000000000000000000", "000000000000000000000000000000000000000000000000000000000000000000000001", "040503213F78CA44883F1A3B8162F188E553CD265F23C1567A16876913B0C2AC245849283601CCDA380F1C9E318D90F95D07E5426FE87E45C0E8184698E45962364E34116177DD2259", "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE9AE2ED07577265DFF7F94451E061E163C61", 4), EcRecommendedParameters<EC2N>(ASN1::sect283r1(), 283, 12, 7, 5, 0, "000000000000000000000000000000000000000000000000000000000000000000000001", "027B680AC8B8596DA5A4AF8A19A0303FCA97FD7645309FA2A581485AF6263E313B79A2F5", "0405F939258DB7DD90E1934F8C70B0DFEC2EED25B8557EAC9C80E2E198F8CDBECD86B1205303676854FE24141CB98FE6D4B20D02B4516FF702350EDDB0826779C813F0DF45BE8112F4", "03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF90399660FC938A90165B042A7CEFADB307", 2), EcRecommendedParameters<EC2N>(ASN1::sect131r1(), 131, 8, 3, 2, 0, "07A11B09A76B562144418FF3FF8C2570B8", "0217C05610884B63B9C6C7291678F9D341", "040081BAF91FDF9833C40F9C181343638399078C6E7EA38C001F73C8134B1B4EF9E150", "0400000000000000023123953A9464B54D", 2), EcRecommendedParameters<EC2N>(ASN1::sect131r2(), 131, 8, 3, 2, 0, "03E5A88919D7CAFCBF415F07C2176573B2", "04B8266A46C55657AC734CE38F018F2192", "040356DCD8F2F95031AD652D23951BB366A80648F06D867940A5366D9E265DE9EB240F", "0400000000000000016954A233049BA98F", 2), EcRecommendedParameters<EC2N>(ASN1::sect193r1(), 193, 15, 0, "0017858FEB7A98975169E171F77B4087DE098AC8A911DF7B01", "00FDFB49BFE6C3A89FACADAA7A1E5BBC7CC1C2E5D831478814", "0401F481BC5F0FF84A74AD6CDF6FDEF4BF6179625372D8C0C5E10025E399F2903712CCF3EA9E3A1AD17FB0B3201B6AF7CE1B05", "01000000000000000000000000C7F34A778F443ACC920EBA49", 2), EcRecommendedParameters<EC2N>(ASN1::sect193r2(), 193, 15, 0, "0163F35A5137C2CE3EA6ED8667190B0BC43ECD69977702709B", "00C9BB9E8927D4D64C377E2AB2856A5B16E3EFB7F61D4316AE", "0400D9B67D192E0367C803F39E1A7E82CA14A651350AAE617E8F01CE94335607C304AC29E7DEFBD9CA01F596F927224CDECF6C", "010000000000000000000000015AAB561B005413CCD4EE99D5", 2), EcRecommendedParameters<EC2N>(ASN1::sect233k1(), 233, 74, 0, "000000000000000000000000000000000000000000000000000000000000", "000000000000000000000000000000000000000000000000000000000001", "04017232BA853A7E731AF129F22FF4149563A419C26BF50A4C9D6EEFAD612601DB537DECE819B7F70F555A67C427A8CD9BF18AEB9B56E0C11056FAE6A3", "8000000000000000000000000000069D5BB915BCD46EFB1AD5F173ABDF", 4), EcRecommendedParameters<EC2N>(ASN1::sect233r1(), 233, 74, 0, "000000000000000000000000000000000000000000000000000000000001", "0066647EDE6C332C7F8C0923BB58213B333B20E9CE4281FE115F7D8F90AD", "0400FAC9DFCBAC8313BB2139F1BB755FEF65BC391F8B36F8F8EB7371FD558B01006A08A41903350678E58528BEBF8A0BEFF867A7CA36716F7E01F81052", "01000000000000000000000000000013E974E72F8A6922031D2603CFE0D7", 2), EcRecommendedParameters<EC2N>(ASN1::sect409k1(), 409, 87, 0, "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", "040060F05F658F49C1AD3AB1890F7184210EFD0987E307C84C27ACCFB8F9F67CC2C460189EB5AAAA62EE222EB1B35540CFE902374601E369050B7C4E42ACBA1DACBF04299C3460782F918EA427E6325165E9EA10E3DA5F6C42E9C55215AA9CA27A5863EC48D8E0286B", "7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE5F83B2D4EA20400EC4557D5ED3E3E7CA5B4B5C83B8E01E5FCF", 4), EcRecommendedParameters<EC2N>(ASN1::sect409r1(), 409, 87, 0, "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", "0021A5C2C8EE9FEB5C4B9A753B7B476B7FD6422EF1F3DD674761FA99D6AC27C8A9A197B272822F6CD57A55AA4F50AE317B13545F", "04015D4860D088DDB3496B0C6064756260441CDE4AF1771D4DB01FFE5B34E59703DC255A868A1180515603AEAB60794E54BB7996A70061B1CFAB6BE5F32BBFA78324ED106A7636B9C5A7BD198D0158AA4F5488D08F38514F1FDF4B4F40D2181B3681C364BA0273C706", "010000000000000000000000000000000000000000000000000001E2AAD6A612F33307BE5FA47C3C9E052F838164CD37D9A21173", 2), EcRecommendedParameters<EC2N>(ASN1::sect571k1(), 571, 10, 5, 2, 0, "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", "04026EB7A859923FBC82189631F8103FE4AC9CA2970012D5D46024804801841CA44370958493B205E647DA304DB4CEB08CBBD1BA39494776FB988B47174DCA88C7E2945283A01C89720349DC807F4FBF374F4AEADE3BCA95314DD58CEC9F307A54FFC61EFC006D8A2C9D4979C0AC44AEA74FBEBBB9F772AEDCB620B01A7BA7AF1B320430C8591984F601CD4C143EF1C7A3", "020000000000000000000000000000000000000000000000000000000000000000000000131850E1F19A63E4B391A8DB917F4138B630D84BE5D639381E91DEB45CFE778F637C1001", 4), EcRecommendedParameters<EC2N>(ASN1::sect571r1(), 571, 10, 5, 2, 0, "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", "02F40E7E2221F295DE297117B7F3D62F5C6A97FFCB8CEFF1CD6BA8CE4A9A18AD84FFABBD8EFA59332BE7AD6756A66E294AFD185A78FF12AA520E4DE739BACA0C7FFEFF7F2955727A", "040303001D34B856296C16C0D40D3CD7750A93D1D2955FA80AA5F40FC8DB7B2ABDBDE53950F4C0D293CDD711A35B67FB1499AE60038614F1394ABFA3B4C850D927E1E7769C8EEC2D19037BF27342DA639B6DCCFFFEB73D69D78C6C27A6009CBBCA1980F8533921E8A684423E43BAB08A576291AF8F461BB2A8B3531D2F0485C19B16E2F1516E23DD3C1A4827AF1B8AC15B", "03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE661CE18FF55987308059B186823851EC7DD9CA1161DE93D5174D66E8382E9BB2FE84E47", 2), }; begin = rec; end = rec + sizeof(rec)/sizeof(rec[0]); } // See https://www.cryptopp.com/wiki/SM2 for details on sm2p256v1 and sm2encrypt_recommendedParameters static void GetRecommendedParameters(const EcRecommendedParameters<ECP> *&begin, const EcRecommendedParameters<ECP> *&end) { // this array must be sorted by OID static const EcRecommendedParameters<ECP> rec[] = { EcRecommendedParameters<ECP>(ASN1::sm2p256v1(), "FFFFFFFE FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00000000 FFFFFFFF FFFFFFFF", "FFFFFFFE FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00000000 FFFFFFFF FFFFFFFC", "28E9FA9E 9D9F5E34 4D5A9E4B CF6509A7 F39789F5 15AB8F92 DDBCBD41 4D940E93", "04" "32C4AE2C 1F198119 5F990446 6A39C994 8FE30BBF F2660BE1 715A4589 334C74C7" "BC3736A2 F4F6779C 59BDCEE3 6B692153 D0A9877C C62A4740 02DF32E5 2139F0A0", "FFFFFFFE FFFFFFFF FFFFFFFF FFFFFFFF 7203DF6B 21C6052B 53BBF409 39D54123", 1), EcRecommendedParameters<ECP>(ASN1::sm2encrypt_recommendedParameters(), "FFFFFFFE FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00000000 FFFFFFFF FFFFFFFF", "FFFFFFFE FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00000000 FFFFFFFF FFFFFFFC", "28E9FA9E 9D9F5E34 4D5A9E4B CF6509A7 F39789F5 15AB8F92 DDBCBD41 4D940E93", "04" "32C4AE2C 1F198119 5F990446 6A39C994 8FE30BBF F2660BE1 715A4589 334C74C7" "BC3736A2 F4F6779C 59BDCEE3 6B692153 D0A9877C C62A4740 02DF32E5 2139F0A0", "FFFFFFFE FFFFFFFF FFFFFFFF FFFFFFFF 7203DF6B 21C6052B 53BBF409 39D54123", 1), EcRecommendedParameters<ECP>(ASN1::secp192r1(), "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC", "64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1", "04188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF101207192B95FFC8DA78631011ED6B24CDD573F977A11E794811", "FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831", 1), EcRecommendedParameters<ECP>(ASN1::secp256r1(), "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF", "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC", "5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B", "046B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C2964FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5", "FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551", 1), EcRecommendedParameters<ECP>(ASN1::brainpoolP160r1(), "E95E4A5F737059DC60DFC7AD95B3D8139515620F", "340E7BE2A280EB74E2BE61BADA745D97E8F7C300", "1E589A8595423412134FAA2DBDEC95C8D8675E58", "04BED5AF16EA3F6A4F62938C4631EB5AF7BDBCDBC31667CB477A1A8EC338F94741669C976316DA6321", "E95E4A5F737059DC60DF5991D45029409E60FC09", 1), EcRecommendedParameters<ECP>(ASN1::brainpoolP192r1(), "C302F41D932A36CDA7A3463093D18DB78FCE476DE1A86297", "6A91174076B1E0E19C39C031FE8685C1CAE040E5C69A28EF", "469A28EF7C28CCA3DC721D044F4496BCCA7EF4146FBF25C9", "04C0A0647EAAB6A48753B033C56CB0F0900A2F5C4853375FD614B690866ABD5BB88B5F4828C1490002E6773FA2FA299B8F", "C302F41D932A36CDA7A3462F9E9E916B5BE8F1029AC4ACC1", 1), EcRecommendedParameters<ECP>(ASN1::brainpoolP224r1(), "D7C134AA264366862A18302575D1D787B09F075797DA89F57EC8C0FF", "68A5E62CA9CE6C1C299803A6C1530B514E182AD8B0042A59CAD29F43", "2580F63CCFE44138870713B1A92369E33E2135D266DBB372386C400B", "040D9029AD2C7E5CF4340823B2A87DC68C9E4CE3174C1E6EFDEE12C07D58AA56F772C0726F24C6B89E4ECDAC24354B9E99CAA3F6D3761402CD", "D7C134AA264366862A18302575D0FB98D116BC4B6DDEBCA3A5A7939F", 1), EcRecommendedParameters<ECP>(ASN1::brainpoolP256r1(), "A9FB57DBA1EEA9BC3E660A909D838D726E3BF623D52620282013481D1F6E5377", "7D5A0975FC2C3057EEF67530417AFFE7FB8055C126DC5C6CE94A4B44F330B5D9", "26DC5C6CE94A4B44F330B5D9BBD77CBF958416295CF7E1CE6BCCDC18FF8C07B6", "048BD2AEB9CB7E57CB2C4B482FFC81B7AFB9DE27E1E3BD23C23A4453BD9ACE3262547EF835C3DAC4FD97F8461A14611DC9C27745132DED8E545C1D54C72F046997", "A9FB57DBA1EEA9BC3E660A909D838D718C397AA3B561A6F7901E0E82974856A7", 1), EcRecommendedParameters<ECP>(ASN1::brainpoolP320r1(), "D35E472036BC4FB7E13C785ED201E065F98FCFA6F6F40DEF4F92B9EC7893EC28FCD412B1F1B32E27", "3EE30B568FBAB0F883CCEBD46D3F3BB8A2A73513F5EB79DA66190EB085FFA9F492F375A97D860EB4", "520883949DFDBC42D3AD198640688A6FE13F41349554B49ACC31DCCD884539816F5EB4AC8FB1F1A6", "0443BD7E9AFB53D8B85289BCC48EE5BFE6F20137D10A087EB6E7871E2A10A599C710AF8D0D39E2061114FDD05545EC1CC8AB4093247F77275E0743FFED117182EAA9C77877AAAC6AC7D35245D1692E8EE1", "D35E472036BC4FB7E13C785ED201E065F98FCFA5B68F12A32D482EC7EE8658E98691555B44C59311", 1), EcRecommendedParameters<ECP>(ASN1::brainpoolP384r1(), "8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B412B1DA197FB71123ACD3A729901D1A71874700133107EC53", "7BC382C63D8C150C3C72080ACE05AFA0C2BEA28E4FB22787139165EFBA91F90F8AA5814A503AD4EB04A8C7DD22CE2826", "04A8C7DD22CE28268B39B55416F0447C2FB77DE107DCD2A62E880EA53EEB62D57CB4390295DBC9943AB78696FA504C11", "041D1C64F068CF45FFA2A63A81B7C13F6B8847A3E77EF14FE3DB7FCAFE0CBD10E8E826E03436D646AAEF87B2E247D4AF1E8ABE1D7520F9C2A45CB1EB8E95CFD55262B70B29FEEC5864E19C054FF99129280E4646217791811142820341263C5315", "8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B31F166E6CAC0425A7CF3AB6AF6B7FC3103B883202E9046565", 1), EcRecommendedParameters<ECP>(ASN1::brainpoolP512r1(), "AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA703308717D4D9B009BC66842AECDA12AE6A380E62881FF2F2D82C68528AA6056583A48F3", "7830A3318B603B89E2327145AC234CC594CBDD8D3DF91610A83441CAEA9863BC2DED5D5AA8253AA10A2EF1C98B9AC8B57F1117A72BF2C7B9E7C1AC4D77FC94CA", "3DF91610A83441CAEA9863BC2DED5D5AA8253AA10A2EF1C98B9AC8B57F1117A72BF2C7B9E7C1AC4D77FC94CADC083E67984050B75EBAE5DD2809BD638016F723", "0481AEE4BDD82ED9645A21322E9C4C6A9385ED9F70B5D916C1B43B62EEF4D0098EFF3B1F78E2D0D48D50D1687B93B97D5F7C6D5047406A5E688B352209BCB9F8227DDE385D566332ECC0EABFA9CF7822FDF209F70024A57B1AA000C55B881F8111B2DCDE494A5F485E5BCA4BD88A2763AED1CA2B2FA8F0540678CD1E0F3AD80892", "AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA70330870553E5C414CA92619418661197FAC10471DB1D381085DDADDB58796829CA90069", 1), EcRecommendedParameters<ECP>(ASN1::secp112r1(), "DB7C2ABF62E35E668076BEAD208B", "DB7C2ABF62E35E668076BEAD2088", "659EF8BA043916EEDE8911702B22", "0409487239995A5EE76B55F9C2F098A89CE5AF8724C0A23E0E0FF77500", "DB7C2ABF62E35E7628DFAC6561C5", 1), EcRecommendedParameters<ECP>(ASN1::secp112r2(), "DB7C2ABF62E35E668076BEAD208B", "6127C24C05F38A0AAAF65C0EF02C", "51DEF1815DB5ED74FCC34C85D709", "044BA30AB5E892B4E1649DD0928643ADCD46F5882E3747DEF36E956E97", "36DF0AAFD8B8D7597CA10520D04B", 4), EcRecommendedParameters<ECP>(ASN1::secp160r1(), "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC", "1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45", "044A96B5688EF573284664698968C38BB913CBFC8223A628553168947D59DCC912042351377AC5FB32", "0100000000000000000001F4C8F927AED3CA752257", 1), EcRecommendedParameters<ECP>(ASN1::secp160k1(), "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73", "0000000000000000000000000000000000000000", "0000000000000000000000000000000000000007", "043B4C382CE37AA192A4019E763036F4F5DD4D7EBB938CF935318FDCED6BC28286531733C3F03C4FEE", "0100000000000000000001B8FA16DFAB9ACA16B6B3", 1), EcRecommendedParameters<ECP>(ASN1::secp256k1(), "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F", "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000007", "0479BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141", 1), EcRecommendedParameters<ECP>(ASN1::secp128r1(), "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF", "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC", "E87579C11079F43DD824993C2CEE5ED3", "04161FF7528B899B2D0C28607CA52C5B86CF5AC8395BAFEB13C02DA292DDED7A83", "FFFFFFFE0000000075A30D1B9038A115", 1), EcRecommendedParameters<ECP>(ASN1::secp128r2(), "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF", "D6031998D1B3BBFEBF59CC9BBFF9AEE1", "5EEEFCA380D02919DC2C6558BB6D8A5D", "047B6AA5D85E572983E6FB32A7CDEBC14027B6916A894D3AEE7106FE805FC34B44", "3FFFFFFF7FFFFFFFBE0024720613B5A3", 4), EcRecommendedParameters<ECP>(ASN1::secp160r2(), "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC70", "B4E134D3FB59EB8BAB57274904664D5AF50388BA", "0452DCB034293A117E1F4FF11B30F7199D3144CE6DFEAFFEF2E331F296E071FA0DF9982CFEA7D43F2E", "0100000000000000000000351EE786A818F3A1A16B", 1), EcRecommendedParameters<ECP>(ASN1::secp192k1(), "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37", "000000000000000000000000000000000000000000000000", "000000000000000000000000000000000000000000000003", "04DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D", "FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D", 1), EcRecommendedParameters<ECP>(ASN1::secp224k1(), "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFE56D", "00000000000000000000000000000000000000000000000000000000", "00000000000000000000000000000000000000000000000000000005", "04A1455B334DF099DF30FC28A169A467E9E47075A90F7E650EB6B7A45C7E089FED7FBA344282CAFBD6F7E319F7C0B0BD59E2CA4BDB556D61A5", "010000000000000000000000000001DCE8D2EC6184CAF0A971769FB1F7", 1), EcRecommendedParameters<ECP>(ASN1::secp224r1(), "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE", "B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4", "04B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34", "FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D", 1), EcRecommendedParameters<ECP>(ASN1::secp384r1(), "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC", "B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF", "04AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB73617DE4A96262C6F5D9E98BF9292DC29F8F41DBD289A147CE9DA3113B5F0B8C00A60B1CE1D7E819D7A431D7C90EA0E5F", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973", 1), EcRecommendedParameters<ECP>(ASN1::secp521r1(), "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC", "0051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00", "0400C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66011839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD16650", "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409", 1), }; begin = rec; end = rec + sizeof(rec)/sizeof(rec[0]); } template <class EC> OID DL_GroupParameters_EC<EC>::GetNextRecommendedParametersOID(const OID &oid) { const EcRecommendedParameters<EllipticCurve> *begin, *end; GetRecommendedParameters(begin, end); const EcRecommendedParameters<EllipticCurve> *it = std::upper_bound(begin, end, oid, OIDLessThan()); return (it == end ? OID() : it->oid); } template <class EC> void DL_GroupParameters_EC<EC>::Initialize(const OID &oid) { const EcRecommendedParameters<EllipticCurve> *begin, *end; GetRecommendedParameters(begin, end); const EcRecommendedParameters<EllipticCurve> *it = std::lower_bound(begin, end, oid, OIDLessThan()); if (it == end || it->oid != oid) throw UnknownOID(); const EcRecommendedParameters<EllipticCurve> &param = *it; m_oid = oid; member_ptr<EllipticCurve> ec(param.NewEC()); this->m_groupPrecomputation.SetCurve(*ec); StringSource ssG(param.g, true, new HexDecoder); Element G; bool result = GetCurve().DecodePoint(G, ssG, (size_t)ssG.MaxRetrievable()); this->SetSubgroupGenerator(G); // TODO: this fails in practice. Should it throw? CRYPTOPP_UNUSED(result); CRYPTOPP_ASSERT(result); StringSource ssN(param.n, true, new HexDecoder); m_n.Decode(ssN, (size_t)ssN.MaxRetrievable()); m_k = param.h; } template <class EC> bool DL_GroupParameters_EC<EC>::GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const { if (strcmp(name, Name::GroupOID()) == 0) { if (m_oid.Empty()) return false; this->ThrowIfTypeMismatch(name, typeid(OID), valueType); *reinterpret_cast<OID *>(pValue) = m_oid; return true; } else return GetValueHelper<DL_GroupParameters<Element> >(this, name, valueType, pValue).Assignable() CRYPTOPP_GET_FUNCTION_ENTRY(Curve); } template <class EC> void DL_GroupParameters_EC<EC>::AssignFrom(const NameValuePairs &source) { OID oid; if (source.GetValue(Name::GroupOID(), oid)) Initialize(oid); else { EllipticCurve ec; Point G; Integer n; source.GetRequiredParameter("DL_GroupParameters_EC<EC>", Name::Curve(), ec); source.GetRequiredParameter("DL_GroupParameters_EC<EC>", Name::SubgroupGenerator(), G); source.GetRequiredParameter("DL_GroupParameters_EC<EC>", Name::SubgroupOrder(), n); Integer k = source.GetValueWithDefault(Name::Cofactor(), Integer::Zero()); Initialize(ec, G, n, k); } } template <class EC> void DL_GroupParameters_EC<EC>::GenerateRandom(RandomNumberGenerator &rng, const NameValuePairs &alg) { try { CRYPTOPP_UNUSED(rng); AssignFrom(alg); } catch (InvalidArgument &) { throw NotImplemented("DL_GroupParameters_EC<EC>: curve generation is not implemented yet"); } } template <class EC> void DL_GroupParameters_EC<EC>::BERDecode(BufferedTransformation &bt) { byte b; if (!bt.Peek(b)) BERDecodeError(); if (b == OBJECT_IDENTIFIER) Initialize(OID(bt)); else { BERSequenceDecoder seq(bt); word32 version; BERDecodeUnsigned<word32>(seq, version, INTEGER, 1, 1); // check version EllipticCurve ec(seq); Point G = ec.BERDecodePoint(seq); Integer n(seq); Integer k; bool cofactorPresent = !seq.EndReached(); if (cofactorPresent) k.BERDecode(seq); else k = Integer::Zero(); seq.MessageEnd(); Initialize(ec, G, n, k); } } template <class EC> void DL_GroupParameters_EC<EC>::DEREncode(BufferedTransformation &bt) const { if (m_encodeAsOID && !m_oid.Empty()) m_oid.DEREncode(bt); else { DERSequenceEncoder seq(bt); DEREncodeUnsigned<word32>(seq, 1); // version GetCurve().DEREncode(seq); GetCurve().DEREncodePoint(seq, this->GetSubgroupGenerator(), m_compress); m_n.DEREncode(seq); if (m_k.NotZero()) m_k.DEREncode(seq); seq.MessageEnd(); } } template <class EC> Integer DL_GroupParameters_EC<EC>::GetCofactor() const { if (!m_k) { Integer q = GetCurve().FieldSize(); Integer qSqrt = q.SquareRoot(); m_k = (q+2*qSqrt+1)/m_n; } return m_k; } template <class EC> Integer DL_GroupParameters_EC<EC>::ConvertElementToInteger(const Element &element) const { return ConvertToInteger(element.x); } template <class EC> bool DL_GroupParameters_EC<EC>::ValidateGroup(RandomNumberGenerator &rng, unsigned int level) const { bool pass = GetCurve().ValidateParameters(rng, level); CRYPTOPP_ASSERT(pass); Integer q = GetCurve().FieldSize(); pass = pass && m_n!=q; CRYPTOPP_ASSERT(pass); if (level >= 2) { Integer qSqrt = q.SquareRoot(); pass = pass && m_n>4*qSqrt; CRYPTOPP_ASSERT(pass); pass = pass && VerifyPrime(rng, m_n, level-2); CRYPTOPP_ASSERT(pass); pass = pass && (m_k.IsZero() || m_k == (q+2*qSqrt+1)/m_n); CRYPTOPP_ASSERT(pass); pass = pass && CheckMOVCondition(q, m_n); CRYPTOPP_ASSERT(pass); } return pass; } template <class EC> bool DL_GroupParameters_EC<EC>::ValidateElement(unsigned int level, const Element &g, const DL_FixedBasePrecomputation<Element> *gpc) const { bool pass = !IsIdentity(g); CRYPTOPP_ASSERT(pass); pass = pass && GetCurve().VerifyPoint(g); CRYPTOPP_ASSERT(pass); if (level >= 1) { if (gpc) { pass = pass && gpc->Exponentiate(this->GetGroupPrecomputation(), Integer::One()) == g; CRYPTOPP_ASSERT(pass); } } if (level >= 2 && pass) { const Integer &q = GetSubgroupOrder(); Element gq = gpc ? gpc->Exponentiate(this->GetGroupPrecomputation(), q) : this->ExponentiateElement(g, q); pass = pass && IsIdentity(gq); CRYPTOPP_ASSERT(pass); } return pass; } template <class EC> void DL_GroupParameters_EC<EC>::SimultaneousExponentiate(Element *results, const Element &base, const Integer *exponents, unsigned int exponentsCount) const { GetCurve().SimultaneousMultiply(results, base, exponents, exponentsCount); } template <class EC> typename DL_GroupParameters_EC<EC>::Element DL_GroupParameters_EC<EC>::MultiplyElements(const Element &a, const Element &b) const { return GetCurve().Add(a, b); } template <class EC> typename DL_GroupParameters_EC<EC>::Element DL_GroupParameters_EC<EC>::CascadeExponentiate(const Element &element1, const Integer &exponent1, const Element &element2, const Integer &exponent2) const { return GetCurve().CascadeMultiply(exponent1, element1, exponent2, element2); } template <class EC> OID DL_GroupParameters_EC<EC>::GetAlgorithmID() const { return ASN1::id_ecPublicKey(); } // ****************************************************************** template <class EC> void DL_PublicKey_EC<EC>::BERDecodePublicKey(BufferedTransformation &bt, bool parametersPresent, size_t size) { CRYPTOPP_UNUSED(parametersPresent); typename EC::Point P; if (!this->GetGroupParameters().GetCurve().DecodePoint(P, bt, size)) BERDecodeError(); this->SetPublicElement(P); } template <class EC> void DL_PublicKey_EC<EC>::DEREncodePublicKey(BufferedTransformation &bt) const { this->GetGroupParameters().GetCurve().EncodePoint(bt, this->GetPublicElement(), this->GetGroupParameters().GetPointCompression()); } // ****************************************************************** template <class EC> void DL_PrivateKey_EC<EC>::BERDecodePrivateKey(BufferedTransformation &bt, bool parametersPresent, size_t size) { CRYPTOPP_UNUSED(size); BERSequenceDecoder seq(bt); word32 version; BERDecodeUnsigned<word32>(seq, version, INTEGER, 1, 1); // check version BERGeneralDecoder dec(seq, OCTET_STRING); if (!dec.IsDefiniteLength()) BERDecodeError(); Integer x; x.Decode(dec, (size_t)dec.RemainingLength()); dec.MessageEnd(); if (!parametersPresent && seq.PeekByte() != (CONTEXT_SPECIFIC | CONSTRUCTED | 0)) BERDecodeError(); if (!seq.EndReached() && seq.PeekByte() == (CONTEXT_SPECIFIC | CONSTRUCTED | 0)) { BERGeneralDecoder parameters(seq, CONTEXT_SPECIFIC | CONSTRUCTED | 0); this->AccessGroupParameters().BERDecode(parameters); parameters.MessageEnd(); } if (!seq.EndReached()) { // skip over the public element SecByteBlock subjectPublicKey; unsigned int unusedBits; BERGeneralDecoder publicKey(seq, CONTEXT_SPECIFIC | CONSTRUCTED | 1); BERDecodeBitString(publicKey, subjectPublicKey, unusedBits); publicKey.MessageEnd(); Element Q; if (!(unusedBits == 0 && this->GetGroupParameters().GetCurve().DecodePoint(Q, subjectPublicKey, subjectPublicKey.size()))) BERDecodeError(); } seq.MessageEnd(); this->SetPrivateExponent(x); } template <class EC> void DL_PrivateKey_EC<EC>::DEREncodePrivateKey(BufferedTransformation &bt) const { DERSequenceEncoder privateKey(bt); DEREncodeUnsigned<word32>(privateKey, 1); // version // SEC 1 ver 1.0 says privateKey (m_d) has the same length as order of the curve // this will be changed to order of base point in a future version this->GetPrivateExponent().DEREncodeAsOctetString(privateKey, this->GetGroupParameters().GetSubgroupOrder().ByteCount()); privateKey.MessageEnd(); } // ****************************************************************** template <class EC> void DL_PublicKey_ECGDSA<EC>::BERDecodePublicKey(BufferedTransformation &bt, bool parametersPresent, size_t size) { CRYPTOPP_UNUSED(parametersPresent); typename EC::Point P; if (!this->GetGroupParameters().GetCurve().DecodePoint(P, bt, size)) BERDecodeError(); this->SetPublicElement(P); } template <class EC> void DL_PublicKey_ECGDSA<EC>::DEREncodePublicKey(BufferedTransformation &bt) const { this->GetGroupParameters().GetCurve().EncodePoint(bt, this->GetPublicElement(), this->GetGroupParameters().GetPointCompression()); } // ****************************************************************** template <class EC> void DL_PrivateKey_ECGDSA<EC>::BERDecodePrivateKey(BufferedTransformation &bt, bool parametersPresent, size_t size) { CRYPTOPP_UNUSED(size); BERSequenceDecoder seq(bt); word32 version; BERDecodeUnsigned<word32>(seq, version, INTEGER, 1, 1); // check version BERGeneralDecoder dec(seq, OCTET_STRING); if (!dec.IsDefiniteLength()) BERDecodeError(); Integer x; x.Decode(dec, (size_t)dec.RemainingLength()); dec.MessageEnd(); if (!parametersPresent && seq.PeekByte() != (CONTEXT_SPECIFIC | CONSTRUCTED | 0)) BERDecodeError(); if (!seq.EndReached() && seq.PeekByte() == (CONTEXT_SPECIFIC | CONSTRUCTED | 0)) { BERGeneralDecoder parameters(seq, CONTEXT_SPECIFIC | CONSTRUCTED | 0); this->AccessGroupParameters().BERDecode(parameters); parameters.MessageEnd(); } if (!seq.EndReached()) { // skip over the public element SecByteBlock subjectPublicKey; unsigned int unusedBits; BERGeneralDecoder publicKey(seq, CONTEXT_SPECIFIC | CONSTRUCTED | 1); BERDecodeBitString(publicKey, subjectPublicKey, unusedBits); publicKey.MessageEnd(); Element Q; if (!(unusedBits == 0 && this->GetGroupParameters().GetCurve().DecodePoint(Q, subjectPublicKey, subjectPublicKey.size()))) BERDecodeError(); } seq.MessageEnd(); this->SetPrivateExponent(x); } template <class EC> void DL_PrivateKey_ECGDSA<EC>::DEREncodePrivateKey(BufferedTransformation &bt) const { DERSequenceEncoder privateKey(bt); DEREncodeUnsigned<word32>(privateKey, 1); // version // SEC 1 ver 1.0 says privateKey (m_d) has the same length as order of the curve // this will be changed to order of base point in a future version this->GetPrivateExponent().DEREncodeAsOctetString(privateKey, this->GetGroupParameters().GetSubgroupOrder().ByteCount()); privateKey.MessageEnd(); } NAMESPACE_END #endif
{ "pile_set_name": "Github" }
// CANAPE Network Testing Tool // Copyright (C) 2014 Context Information Security // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. using System; using CANAPE.Nodes; using CANAPE.Utils; using System.Collections.Generic; namespace CANAPE.NodeFactories { /// <summary> /// Factory for a pipeline endpoint node /// </summary> public abstract class PipelineEndpointFactory : BaseNodeFactory { /// <summary> /// Constructor /// </summary> /// <param name="label"></param> /// <param name="guid"></param> public PipelineEndpointFactory(string label, Guid guid) : base(label, guid) { } /// <summary> /// Create the node /// </summary> /// <returns></returns> protected override BasePipelineNode OnCreate(Logger logger, NetGraph graph, Dictionary<string, object> stateDictionary) { return new PipelineEndpoint(); } } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <module type="JAVA_MODULE" version="4"> <component name="NewModuleRootManager" inherit-compiler-output="true"> <exclude-output /> <content url="file://$MODULE_DIR$"> <sourceFolder url="file://$MODULE_DIR$/compiler/ir/backend.native/src" isTestSource="false" /> </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="library" name="KotlinJavaRuntime" level="project" /> <orderEntry type="module" module-name="backend" /> <orderEntry type="module" module-name="frontend" /> </component> </module>
{ "pile_set_name": "Github" }
############################################## # Test instant ADD COLUMN for REDUNDANT format ############################################## # # Scenario 1: # Create a normal table, rebuild and truncate will clear the instant # information # CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT) ROW_FORMAT=REDUNDANT; INSERT INTO t1 VALUES(0, 1), (0, 2), (0, 3), (0, 4), (0, 5); ALTER TABLE t1 ADD COLUMN c1 INT DEFAULT 10; Table id did not change count(*) = 1 1 CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK ALTER TABLE t1 ADD COLUMN c2 INT DEFAULT 20, ADD KEY(c2); Table ID differed SELECT 2 = instant_cols AS `Instant columns equal` FROM information_schema.innodb_tables WHERE name like '%t1%'; Instant columns equal 0 CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK SELECT count(*) FROM information_schema.innodb_tables WHERE instant_cols != 0; count(*) 0 SELECT count(*) FROM information_schema.innodb_columns WHERE has_default = 1; count(*) 0 INSERT INTO t1(a, b) VALUES(0, 1), (0, 2), (0, 3), (0, 4), (0, 5); ALTER TABLE t1 ADD COLUMN c3 INT DEFAULT 10; Table id did not change count(*) = 1 1 CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK TRUNCATE TABLE t1; Table ID differed SELECT 4 = instant_cols AS `Instant columns equal` FROM information_schema.innodb_tables WHERE name like '%t1%'; Instant columns equal 0 CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK SELECT count(*) FROM information_schema.innodb_tables WHERE instant_cols != 0; count(*) 0 SELECT count(*) FROM information_schema.innodb_columns WHERE has_default = 1; count(*) 0 CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int NOT NULL AUTO_INCREMENT, `b` int DEFAULT NULL, `c1` int DEFAULT '10', `c2` int DEFAULT '20', `c3` int DEFAULT '10', PRIMARY KEY (`a`), KEY `c2` (`c2`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=REDUNDANT DROP TABLE t1; # # Scenario 2: # Create a partitioned table, rebuild and truncate will clear the instant # information # CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT) ROW_FORMAT=REDUNDANT PARTITION BY HASH(a) PARTITIONS 3;; INSERT INTO t1 VALUES(0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (0, 7), (0, 8); SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 ALTER TABLE t1 ADD COLUMN c1 INT DEFAULT 10; SELECT count(*) AS `Expect 3` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 3 3 SELECT count(*) AS `Expect 3` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 3 3 ALTER TABLE t1 ADD COLUMN c2 INT DEFAULT 20, ALGORITHM = COPY; SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 INSERT INTO t1(b, c1, c2) SELECT b, c1, c2 FROM t1; ALTER TABLE t1 ADD COLUMN c3 INT DEFAULT 30; SELECT count(*) AS `Expect 3` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 3 3 SELECT count(*) AS `Expect 3` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 3 3 TRUNCATE TABLE t1; SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int NOT NULL AUTO_INCREMENT, `b` int DEFAULT NULL, `c1` int DEFAULT '10', `c2` int DEFAULT '20', `c3` int DEFAULT '30', PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=REDUNDANT /*!50100 PARTITION BY HASH (`a`) PARTITIONS 3 */ DROP TABLE t1; # # Scenario 3: # Create a partitioned table, ALTER TABLE ... PARTITION will clear the # instant information # CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b INT) ROW_FORMAT=REDUNDANT PARTITION BY RANGE (a) (PARTITION p1 VALUES LESS THAN (10), PARTITION p2 VALUES LESS THAN (20), PARTITION p3 VALUES LESS THAN (30));; INSERT INTO t1 VALUES(1, 1), (2, 2), (11, 11), (12, 12), (21, 21), (22, 22), (26, 26), (27, 27); SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 ALTER TABLE t1 ADD COLUMN c INT DEFAULT 100; SELECT count(*) AS `Expect 3` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 3 3 SELECT count(*) AS `Expect 3` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 3 3 ALTER TABLE t1 ADD PARTITION (PARTITION p4 VALUES LESS THAN(40)); SELECT count(*) AS `Expect 3` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 3 3 SELECT count(*) AS `Expect 3` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 3 3 SELECT instant_cols FROM information_schema.innodb_tables WHERE name LIKE '%p4%'; instant_cols 0 ALTER TABLE t1 REORGANIZE PARTITION p3 INTO (PARTITION p31 VALUES LESS THAN(25), PARTITION p32 VALUES LESS THAN(30)); SELECT * FROM t1 WHERE a > 20 AND a < 30; a b c 21 21 100 22 22 100 26 26 100 27 27 100 SELECT * FROM t1 WHERE a > 10 AND a < 20; a b c 11 11 100 12 12 100 SELECT count(*) AS `Expect 2` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 2 2 SELECT count(*) AS `Expect 2` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 2 2 SELECT instant_cols FROM information_schema.innodb_tables WHERE name LIKE '%p3%'; instant_cols 0 0 ALTER TABLE t1 TRUNCATE PARTITION p1; SELECT * FROM t1 WHERE a < 10; a b c SELECT count(*) AS `Expect 1` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 1 1 SELECT count(*) AS `Expect 1` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 1 1 SELECT instant_cols FROM information_schema.innodb_tables WHERE name LIKE '%p1%'; instant_cols 0 ALTER TABLE t1 TRUNCATE PARTITION p1, p2, p31, p32, p4; SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 INSERT INTO t1(a, b) VALUES(1, 1), (2, 2), (11, 11), (12, 12), (21, 21), (22, 22), (26, 26), (27, 27); SELECT c FROM t1 GROUP BY c; c 100 ALTER TABLE t1 ADD COLUMN d INT DEFAULT 100; SELECT count(*) AS `Expect 5` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 5 5 SELECT count(*) AS `Expect 5` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 5 5 ALTER TABLE t1 TRUNCATE PARTITION p1; SELECT count(*) AS `Expect 4` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 4 4 SELECT count(*) AS `Expect 4` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 4 4 SELECT instant_cols FROM information_schema.innodb_tables WHERE name LIKE '%p1%'; instant_cols 0 ALTER TABLE t1 DROP PARTITION p2, p4; SELECT count(*) AS `Expect 2` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 2 2 SELECT count(*) AS `Expect 2` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 2 2 ALTER TABLE t1 DROP PARTITION p31, p32; SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int NOT NULL, `b` int DEFAULT NULL, `c` int DEFAULT '100', `d` int DEFAULT '100', PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=REDUNDANT /*!50100 PARTITION BY RANGE (`a`) (PARTITION p1 VALUES LESS THAN (10) ENGINE = InnoDB) */ DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT) ROW_FORMAT=REDUNDANT PARTITION BY HASH(a) PARTITIONS 3;; INSERT INTO t1 VALUES(0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (0, 7), (0, 8); SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 ALTER TABLE t1 ADD COLUMN c1 INT DEFAULT 10; SELECT count(*) AS `Expect 3` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 3 3 SELECT count(*) AS `Expect 3` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 3 3 ALTER TABLE t1 ADD PARTITION PARTITIONS 2; SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 ALTER TABLE t1 ADD COLUMN c2 INT DEFAULT 20; SELECT count(*) AS `Expect 5` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 5 5 SELECT count(*) AS `Expect 5` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 5 5 ALTER TABLE t1 COALESCE PARTITION 2; SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 ALTER TABLE t1 ADD COLUMN c3 INT DEFAULT 30; SELECT count(*) AS `Expect 3` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 3 3 SELECT count(*) AS `Expect 3` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 3 3 ALTER TABLE t1 ADD PARTITION PARTITIONS 2; SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 SELECT * FROM t1; a b c1 c2 c3 5 5 10 20 30 1 1 10 20 30 6 6 10 20 30 2 2 10 20 30 7 7 10 20 30 3 3 10 20 30 8 8 10 20 30 4 4 10 20 30 CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int NOT NULL AUTO_INCREMENT, `b` int DEFAULT NULL, `c1` int DEFAULT '10', `c2` int DEFAULT '20', `c3` int DEFAULT '30', PRIMARY KEY (`a`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=REDUNDANT /*!50100 PARTITION BY HASH (`a`) PARTITIONS 5 */ DROP TABLE t1; ############################################ # Test instant ADD COLUMN for DYNAMIC format ############################################ # # Scenario 1: # Create a normal table, rebuild and truncate will clear the instant # information # CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT) ROW_FORMAT=DYNAMIC; INSERT INTO t1 VALUES(0, 1), (0, 2), (0, 3), (0, 4), (0, 5); ALTER TABLE t1 ADD COLUMN c1 INT DEFAULT 10; Table id did not change count(*) = 1 1 CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK ALTER TABLE t1 ADD COLUMN c2 INT DEFAULT 20, ADD KEY(c2); Table ID differed SELECT 2 = instant_cols AS `Instant columns equal` FROM information_schema.innodb_tables WHERE name like '%t1%'; Instant columns equal 0 CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK SELECT count(*) FROM information_schema.innodb_tables WHERE instant_cols != 0; count(*) 0 SELECT count(*) FROM information_schema.innodb_columns WHERE has_default = 1; count(*) 0 INSERT INTO t1(a, b) VALUES(0, 1), (0, 2), (0, 3), (0, 4), (0, 5); ALTER TABLE t1 ADD COLUMN c3 INT DEFAULT 10; Table id did not change count(*) = 1 1 CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK TRUNCATE TABLE t1; Table ID differed SELECT 4 = instant_cols AS `Instant columns equal` FROM information_schema.innodb_tables WHERE name like '%t1%'; Instant columns equal 0 CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK SELECT count(*) FROM information_schema.innodb_tables WHERE instant_cols != 0; count(*) 0 SELECT count(*) FROM information_schema.innodb_columns WHERE has_default = 1; count(*) 0 CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int NOT NULL AUTO_INCREMENT, `b` int DEFAULT NULL, `c1` int DEFAULT '10', `c2` int DEFAULT '20', `c3` int DEFAULT '10', PRIMARY KEY (`a`), KEY `c2` (`c2`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC DROP TABLE t1; # # Scenario 2: # Create a partitioned table, rebuild and truncate will clear the instant # information # CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT) ROW_FORMAT=DYNAMIC PARTITION BY HASH(a) PARTITIONS 3;; INSERT INTO t1 VALUES(0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (0, 7), (0, 8); SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 ALTER TABLE t1 ADD COLUMN c1 INT DEFAULT 10; SELECT count(*) AS `Expect 3` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 3 3 SELECT count(*) AS `Expect 3` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 3 3 ALTER TABLE t1 ADD COLUMN c2 INT DEFAULT 20, ALGORITHM = COPY; SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 INSERT INTO t1(b, c1, c2) SELECT b, c1, c2 FROM t1; ALTER TABLE t1 ADD COLUMN c3 INT DEFAULT 30; SELECT count(*) AS `Expect 3` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 3 3 SELECT count(*) AS `Expect 3` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 3 3 TRUNCATE TABLE t1; SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int NOT NULL AUTO_INCREMENT, `b` int DEFAULT NULL, `c1` int DEFAULT '10', `c2` int DEFAULT '20', `c3` int DEFAULT '30', PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC /*!50100 PARTITION BY HASH (`a`) PARTITIONS 3 */ DROP TABLE t1; # # Scenario 3: # Create a partitioned table, ALTER TABLE ... PARTITION will clear the # instant information # CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b INT) ROW_FORMAT=DYNAMIC PARTITION BY RANGE (a) (PARTITION p1 VALUES LESS THAN (10), PARTITION p2 VALUES LESS THAN (20), PARTITION p3 VALUES LESS THAN (30));; INSERT INTO t1 VALUES(1, 1), (2, 2), (11, 11), (12, 12), (21, 21), (22, 22), (26, 26), (27, 27); SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 ALTER TABLE t1 ADD COLUMN c INT DEFAULT 100; SELECT count(*) AS `Expect 3` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 3 3 SELECT count(*) AS `Expect 3` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 3 3 ALTER TABLE t1 ADD PARTITION (PARTITION p4 VALUES LESS THAN(40)); SELECT count(*) AS `Expect 3` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 3 3 SELECT count(*) AS `Expect 3` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 3 3 SELECT instant_cols FROM information_schema.innodb_tables WHERE name LIKE '%p4%'; instant_cols 0 ALTER TABLE t1 REORGANIZE PARTITION p3 INTO (PARTITION p31 VALUES LESS THAN(25), PARTITION p32 VALUES LESS THAN(30)); SELECT * FROM t1 WHERE a > 20 AND a < 30; a b c 21 21 100 22 22 100 26 26 100 27 27 100 SELECT * FROM t1 WHERE a > 10 AND a < 20; a b c 11 11 100 12 12 100 SELECT count(*) AS `Expect 2` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 2 2 SELECT count(*) AS `Expect 2` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 2 2 SELECT instant_cols FROM information_schema.innodb_tables WHERE name LIKE '%p3%'; instant_cols 0 0 ALTER TABLE t1 TRUNCATE PARTITION p1; SELECT * FROM t1 WHERE a < 10; a b c SELECT count(*) AS `Expect 1` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 1 1 SELECT count(*) AS `Expect 1` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 1 1 SELECT instant_cols FROM information_schema.innodb_tables WHERE name LIKE '%p1%'; instant_cols 0 ALTER TABLE t1 TRUNCATE PARTITION p1, p2, p31, p32, p4; SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 INSERT INTO t1(a, b) VALUES(1, 1), (2, 2), (11, 11), (12, 12), (21, 21), (22, 22), (26, 26), (27, 27); SELECT c FROM t1 GROUP BY c; c 100 ALTER TABLE t1 ADD COLUMN d INT DEFAULT 100; SELECT count(*) AS `Expect 5` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 5 5 SELECT count(*) AS `Expect 5` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 5 5 ALTER TABLE t1 TRUNCATE PARTITION p1; SELECT count(*) AS `Expect 4` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 4 4 SELECT count(*) AS `Expect 4` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 4 4 SELECT instant_cols FROM information_schema.innodb_tables WHERE name LIKE '%p1%'; instant_cols 0 ALTER TABLE t1 DROP PARTITION p2, p4; SELECT count(*) AS `Expect 2` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 2 2 SELECT count(*) AS `Expect 2` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 2 2 ALTER TABLE t1 DROP PARTITION p31, p32; SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int NOT NULL, `b` int DEFAULT NULL, `c` int DEFAULT '100', `d` int DEFAULT '100', PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC /*!50100 PARTITION BY RANGE (`a`) (PARTITION p1 VALUES LESS THAN (10) ENGINE = InnoDB) */ DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT) ROW_FORMAT=DYNAMIC PARTITION BY HASH(a) PARTITIONS 3;; INSERT INTO t1 VALUES(0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (0, 7), (0, 8); SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 ALTER TABLE t1 ADD COLUMN c1 INT DEFAULT 10; SELECT count(*) AS `Expect 3` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 3 3 SELECT count(*) AS `Expect 3` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 3 3 ALTER TABLE t1 ADD PARTITION PARTITIONS 2; SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 ALTER TABLE t1 ADD COLUMN c2 INT DEFAULT 20; SELECT count(*) AS `Expect 5` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 5 5 SELECT count(*) AS `Expect 5` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 5 5 ALTER TABLE t1 COALESCE PARTITION 2; SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 ALTER TABLE t1 ADD COLUMN c3 INT DEFAULT 30; SELECT count(*) AS `Expect 3` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 3 3 SELECT count(*) AS `Expect 3` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 3 3 ALTER TABLE t1 ADD PARTITION PARTITIONS 2; SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 SELECT * FROM t1; a b c1 c2 c3 5 5 10 20 30 1 1 10 20 30 6 6 10 20 30 2 2 10 20 30 7 7 10 20 30 3 3 10 20 30 8 8 10 20 30 4 4 10 20 30 CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int NOT NULL AUTO_INCREMENT, `b` int DEFAULT NULL, `c1` int DEFAULT '10', `c2` int DEFAULT '20', `c3` int DEFAULT '30', PRIMARY KEY (`a`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC /*!50100 PARTITION BY HASH (`a`) PARTITIONS 5 */ DROP TABLE t1; ############################################ # Test instant ADD COLUMN for COMPACT format ############################################ # # Scenario 1: # Create a normal table, rebuild and truncate will clear the instant # information # CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT) ROW_FORMAT=COMPACT; INSERT INTO t1 VALUES(0, 1), (0, 2), (0, 3), (0, 4), (0, 5); ALTER TABLE t1 ADD COLUMN c1 INT DEFAULT 10; Table id did not change count(*) = 1 1 CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK ALTER TABLE t1 ADD COLUMN c2 INT DEFAULT 20, ADD KEY(c2); Table ID differed SELECT 2 = instant_cols AS `Instant columns equal` FROM information_schema.innodb_tables WHERE name like '%t1%'; Instant columns equal 0 CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK SELECT count(*) FROM information_schema.innodb_tables WHERE instant_cols != 0; count(*) 0 SELECT count(*) FROM information_schema.innodb_columns WHERE has_default = 1; count(*) 0 INSERT INTO t1(a, b) VALUES(0, 1), (0, 2), (0, 3), (0, 4), (0, 5); ALTER TABLE t1 ADD COLUMN c3 INT DEFAULT 10; Table id did not change count(*) = 1 1 CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK TRUNCATE TABLE t1; Table ID differed SELECT 4 = instant_cols AS `Instant columns equal` FROM information_schema.innodb_tables WHERE name like '%t1%'; Instant columns equal 0 CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK SELECT count(*) FROM information_schema.innodb_tables WHERE instant_cols != 0; count(*) 0 SELECT count(*) FROM information_schema.innodb_columns WHERE has_default = 1; count(*) 0 CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int NOT NULL AUTO_INCREMENT, `b` int DEFAULT NULL, `c1` int DEFAULT '10', `c2` int DEFAULT '20', `c3` int DEFAULT '10', PRIMARY KEY (`a`), KEY `c2` (`c2`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT DROP TABLE t1; # # Scenario 2: # Create a partitioned table, rebuild and truncate will clear the instant # information # CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT) ROW_FORMAT=COMPACT PARTITION BY HASH(a) PARTITIONS 3;; INSERT INTO t1 VALUES(0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (0, 7), (0, 8); SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 ALTER TABLE t1 ADD COLUMN c1 INT DEFAULT 10; SELECT count(*) AS `Expect 3` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 3 3 SELECT count(*) AS `Expect 3` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 3 3 ALTER TABLE t1 ADD COLUMN c2 INT DEFAULT 20, ALGORITHM = COPY; SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 INSERT INTO t1(b, c1, c2) SELECT b, c1, c2 FROM t1; ALTER TABLE t1 ADD COLUMN c3 INT DEFAULT 30; SELECT count(*) AS `Expect 3` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 3 3 SELECT count(*) AS `Expect 3` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 3 3 TRUNCATE TABLE t1; SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int NOT NULL AUTO_INCREMENT, `b` int DEFAULT NULL, `c1` int DEFAULT '10', `c2` int DEFAULT '20', `c3` int DEFAULT '30', PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT /*!50100 PARTITION BY HASH (`a`) PARTITIONS 3 */ DROP TABLE t1; # # Scenario 3: # Create a partitioned table, ALTER TABLE ... PARTITION will clear the # instant information # CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b INT) ROW_FORMAT=COMPACT PARTITION BY RANGE (a) (PARTITION p1 VALUES LESS THAN (10), PARTITION p2 VALUES LESS THAN (20), PARTITION p3 VALUES LESS THAN (30));; INSERT INTO t1 VALUES(1, 1), (2, 2), (11, 11), (12, 12), (21, 21), (22, 22), (26, 26), (27, 27); SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 ALTER TABLE t1 ADD COLUMN c INT DEFAULT 100; SELECT count(*) AS `Expect 3` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 3 3 SELECT count(*) AS `Expect 3` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 3 3 ALTER TABLE t1 ADD PARTITION (PARTITION p4 VALUES LESS THAN(40)); SELECT count(*) AS `Expect 3` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 3 3 SELECT count(*) AS `Expect 3` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 3 3 SELECT instant_cols FROM information_schema.innodb_tables WHERE name LIKE '%p4%'; instant_cols 0 ALTER TABLE t1 REORGANIZE PARTITION p3 INTO (PARTITION p31 VALUES LESS THAN(25), PARTITION p32 VALUES LESS THAN(30)); SELECT * FROM t1 WHERE a > 20 AND a < 30; a b c 21 21 100 22 22 100 26 26 100 27 27 100 SELECT * FROM t1 WHERE a > 10 AND a < 20; a b c 11 11 100 12 12 100 SELECT count(*) AS `Expect 2` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 2 2 SELECT count(*) AS `Expect 2` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 2 2 SELECT instant_cols FROM information_schema.innodb_tables WHERE name LIKE '%p3%'; instant_cols 0 0 ALTER TABLE t1 TRUNCATE PARTITION p1; SELECT * FROM t1 WHERE a < 10; a b c SELECT count(*) AS `Expect 1` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 1 1 SELECT count(*) AS `Expect 1` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 1 1 SELECT instant_cols FROM information_schema.innodb_tables WHERE name LIKE '%p1%'; instant_cols 0 ALTER TABLE t1 TRUNCATE PARTITION p1, p2, p31, p32, p4; SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 INSERT INTO t1(a, b) VALUES(1, 1), (2, 2), (11, 11), (12, 12), (21, 21), (22, 22), (26, 26), (27, 27); SELECT c FROM t1 GROUP BY c; c 100 ALTER TABLE t1 ADD COLUMN d INT DEFAULT 100; SELECT count(*) AS `Expect 5` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 5 5 SELECT count(*) AS `Expect 5` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 5 5 ALTER TABLE t1 TRUNCATE PARTITION p1; SELECT count(*) AS `Expect 4` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 4 4 SELECT count(*) AS `Expect 4` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 4 4 SELECT instant_cols FROM information_schema.innodb_tables WHERE name LIKE '%p1%'; instant_cols 0 ALTER TABLE t1 DROP PARTITION p2, p4; SELECT count(*) AS `Expect 2` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 2 2 SELECT count(*) AS `Expect 2` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 2 2 ALTER TABLE t1 DROP PARTITION p31, p32; SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int NOT NULL, `b` int DEFAULT NULL, `c` int DEFAULT '100', `d` int DEFAULT '100', PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT /*!50100 PARTITION BY RANGE (`a`) (PARTITION p1 VALUES LESS THAN (10) ENGINE = InnoDB) */ DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT) ROW_FORMAT=COMPACT PARTITION BY HASH(a) PARTITIONS 3;; INSERT INTO t1 VALUES(0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (0, 7), (0, 8); SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 ALTER TABLE t1 ADD COLUMN c1 INT DEFAULT 10; SELECT count(*) AS `Expect 3` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 3 3 SELECT count(*) AS `Expect 3` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 3 3 ALTER TABLE t1 ADD PARTITION PARTITIONS 2; SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 ALTER TABLE t1 ADD COLUMN c2 INT DEFAULT 20; SELECT count(*) AS `Expect 5` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 5 5 SELECT count(*) AS `Expect 5` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 5 5 ALTER TABLE t1 COALESCE PARTITION 2; SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 ALTER TABLE t1 ADD COLUMN c3 INT DEFAULT 30; SELECT count(*) AS `Expect 3` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 3 3 SELECT count(*) AS `Expect 3` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 3 3 ALTER TABLE t1 ADD PARTITION PARTITIONS 2; SELECT count(*) AS `Expect 0` FROM information_schema.innodb_tables WHERE instant_cols != 0; Expect 0 0 SELECT count(*) AS `Expect 0` FROM information_schema.innodb_columns WHERE has_default = 1; Expect 0 0 SELECT * FROM t1; a b c1 c2 c3 5 5 10 20 30 1 1 10 20 30 6 6 10 20 30 2 2 10 20 30 7 7 10 20 30 3 3 10 20 30 8 8 10 20 30 4 4 10 20 30 CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int NOT NULL AUTO_INCREMENT, `b` int DEFAULT NULL, `c1` int DEFAULT '10', `c2` int DEFAULT '20', `c3` int DEFAULT '30', PRIMARY KEY (`a`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT /*!50100 PARTITION BY HASH (`a`) PARTITIONS 5 */ DROP TABLE t1;
{ "pile_set_name": "Github" }
/***************************************************************************//** * @file * @brief EFM32GG11B_ETM register and bit field definitions ******************************************************************************* * # License * <b>Copyright 2020 Silicon Laboratories Inc. www.silabs.com</b> ******************************************************************************* * * SPDX-License-Identifier: Zlib * * The licensor of this software is Silicon Laboratories Inc. * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. * ******************************************************************************/ #if defined(__ICCARM__) #pragma system_include /* Treat file as system include file. */ #elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) #pragma clang system_header /* Treat file as system include file. */ #endif /***************************************************************************//** * @addtogroup Parts * @{ ******************************************************************************/ /***************************************************************************//** * @defgroup EFM32GG11B_ETM ETM * @{ * @brief EFM32GG11B_ETM Register Declaration ******************************************************************************/ /** ETM Register Declaration */ typedef struct { __IOM uint32_t ETMCR; /**< Main Control Register */ __IM uint32_t ETMCCR; /**< Configuration Code Register */ __IOM uint32_t ETMTRIGGER; /**< ETM Trigger Event Register */ uint32_t RESERVED0[1U]; /**< Reserved for future use **/ __IOM uint32_t ETMSR; /**< ETM Status Register */ __IM uint32_t ETMSCR; /**< ETM System Configuration Register */ uint32_t RESERVED1[2U]; /**< Reserved for future use **/ __IOM uint32_t ETMTEEVR; /**< ETM TraceEnable Event Register */ __IOM uint32_t ETMTECR1; /**< ETM Trace control Register */ uint32_t RESERVED2[1U]; /**< Reserved for future use **/ __IOM uint32_t ETMFFLR; /**< ETM Fifo Full Level Register */ uint32_t RESERVED3[68U]; /**< Reserved for future use **/ __IOM uint32_t ETMCNTRLDVR1; /**< Counter Reload Value */ uint32_t RESERVED4[39U]; /**< Reserved for future use **/ __IOM uint32_t ETMSYNCFR; /**< Synchronisation Frequency Register */ __IM uint32_t ETMIDR; /**< ID Register */ __IM uint32_t ETMCCER; /**< Configuration Code Extension Register */ uint32_t RESERVED5[1U]; /**< Reserved for future use **/ __IOM uint32_t ETMTESSEICR; /**< TraceEnable Start/Stop EmbeddedICE Control Register */ uint32_t RESERVED6[1U]; /**< Reserved for future use **/ __IOM uint32_t ETMTSEVR; /**< Timestamp Event Register */ uint32_t RESERVED7[1U]; /**< Reserved for future use **/ __IOM uint32_t ETMTRACEIDR; /**< CoreSight Trace ID Register */ uint32_t RESERVED8[1U]; /**< Reserved for future use **/ __IM uint32_t ETMIDR2; /**< ETM ID Register 2 */ uint32_t RESERVED9[66U]; /**< Reserved for future use **/ __IM uint32_t ETMPDSR; /**< Device Power-down Status Register */ uint32_t RESERVED10[754U]; /**< Reserved for future use **/ __IOM uint32_t ETMISCIN; /**< Integration Test Miscellaneous Inputs Register */ uint32_t RESERVED11[1U]; /**< Reserved for future use **/ __IOM uint32_t ITTRIGOUT; /**< Integration Test Trigger Out Register */ uint32_t RESERVED12[1U]; /**< Reserved for future use **/ __IM uint32_t ETMITATBCTR2; /**< ETM Integration Test ATB Control 2 Register */ uint32_t RESERVED13[1U]; /**< Reserved for future use **/ __IOM uint32_t ETMITATBCTR0; /**< ETM Integration Test ATB Control 0 Register */ uint32_t RESERVED14[1U]; /**< Reserved for future use **/ __IOM uint32_t ETMITCTRL; /**< ETM Integration Control Register */ uint32_t RESERVED15[39U]; /**< Reserved for future use **/ __IOM uint32_t ETMCLAIMSET; /**< ETM Claim Tag Set Register */ __IOM uint32_t ETMCLAIMCLR; /**< ETM Claim Tag Clear Register */ uint32_t RESERVED16[2U]; /**< Reserved for future use **/ __IOM uint32_t ETMLAR; /**< ETM Lock Access Register */ __IM uint32_t ETMLSR; /**< Lock Status Register */ __IM uint32_t ETMAUTHSTATUS; /**< ETM Authentication Status Register */ uint32_t RESERVED17[4U]; /**< Reserved for future use **/ __IM uint32_t ETMDEVTYPE; /**< CoreSight Device Type Register */ __IM uint32_t ETMPIDR4; /**< Peripheral ID4 Register */ __OM uint32_t ETMPIDR5; /**< Peripheral ID5 Register */ __OM uint32_t ETMPIDR6; /**< Peripheral ID6 Register */ __OM uint32_t ETMPIDR7; /**< Peripheral ID7 Register */ __IM uint32_t ETMPIDR0; /**< Peripheral ID0 Register */ __IM uint32_t ETMPIDR1; /**< Peripheral ID1 Register */ __IM uint32_t ETMPIDR2; /**< Peripheral ID2 Register */ __IM uint32_t ETMPIDR3; /**< Peripheral ID3 Register */ __IM uint32_t ETMCIDR0; /**< Component ID0 Register */ __IM uint32_t ETMCIDR1; /**< Component ID1 Register */ __IM uint32_t ETMCIDR2; /**< Component ID2 Register */ __IM uint32_t ETMCIDR3; /**< Component ID3 Register */ } ETM_TypeDef; /** @} */ /***************************************************************************//** * @addtogroup EFM32GG11B_ETM * @{ * @defgroup EFM32GG11B_ETM_BitFields ETM Bit Fields * @{ ******************************************************************************/ /* Bit fields for ETM ETMCR */ #define _ETM_ETMCR_RESETVALUE 0x00000411UL /**< Default value for ETM_ETMCR */ #define _ETM_ETMCR_MASK 0x10632FF1UL /**< Mask for ETM_ETMCR */ #define ETM_ETMCR_POWERDWN (0x1UL << 0) /**< ETM Control in low power mode */ #define _ETM_ETMCR_POWERDWN_SHIFT 0 /**< Shift value for ETM_POWERDWN */ #define _ETM_ETMCR_POWERDWN_MASK 0x1UL /**< Bit mask for ETM_POWERDWN */ #define _ETM_ETMCR_POWERDWN_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMCR */ #define ETM_ETMCR_POWERDWN_DEFAULT (_ETM_ETMCR_POWERDWN_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMCR */ #define _ETM_ETMCR_PORTSIZE_SHIFT 4 /**< Shift value for ETM_PORTSIZE */ #define _ETM_ETMCR_PORTSIZE_MASK 0x70UL /**< Bit mask for ETM_PORTSIZE */ #define _ETM_ETMCR_PORTSIZE_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMCR */ #define ETM_ETMCR_PORTSIZE_DEFAULT (_ETM_ETMCR_PORTSIZE_DEFAULT << 4) /**< Shifted mode DEFAULT for ETM_ETMCR */ #define ETM_ETMCR_STALL (0x1UL << 7) /**< Stall Processor */ #define _ETM_ETMCR_STALL_SHIFT 7 /**< Shift value for ETM_STALL */ #define _ETM_ETMCR_STALL_MASK 0x80UL /**< Bit mask for ETM_STALL */ #define _ETM_ETMCR_STALL_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMCR */ #define ETM_ETMCR_STALL_DEFAULT (_ETM_ETMCR_STALL_DEFAULT << 7) /**< Shifted mode DEFAULT for ETM_ETMCR */ #define ETM_ETMCR_BRANCHOUTPUT (0x1UL << 8) /**< Branch Output */ #define _ETM_ETMCR_BRANCHOUTPUT_SHIFT 8 /**< Shift value for ETM_BRANCHOUTPUT */ #define _ETM_ETMCR_BRANCHOUTPUT_MASK 0x100UL /**< Bit mask for ETM_BRANCHOUTPUT */ #define _ETM_ETMCR_BRANCHOUTPUT_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMCR */ #define ETM_ETMCR_BRANCHOUTPUT_DEFAULT (_ETM_ETMCR_BRANCHOUTPUT_DEFAULT << 8) /**< Shifted mode DEFAULT for ETM_ETMCR */ #define ETM_ETMCR_DBGREQCTRL (0x1UL << 9) /**< Debug Request Control */ #define _ETM_ETMCR_DBGREQCTRL_SHIFT 9 /**< Shift value for ETM_DBGREQCTRL */ #define _ETM_ETMCR_DBGREQCTRL_MASK 0x200UL /**< Bit mask for ETM_DBGREQCTRL */ #define _ETM_ETMCR_DBGREQCTRL_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMCR */ #define ETM_ETMCR_DBGREQCTRL_DEFAULT (_ETM_ETMCR_DBGREQCTRL_DEFAULT << 9) /**< Shifted mode DEFAULT for ETM_ETMCR */ #define ETM_ETMCR_ETMPROG (0x1UL << 10) /**< ETM Programming */ #define _ETM_ETMCR_ETMPROG_SHIFT 10 /**< Shift value for ETM_ETMPROG */ #define _ETM_ETMCR_ETMPROG_MASK 0x400UL /**< Bit mask for ETM_ETMPROG */ #define _ETM_ETMCR_ETMPROG_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMCR */ #define ETM_ETMCR_ETMPROG_DEFAULT (_ETM_ETMCR_ETMPROG_DEFAULT << 10) /**< Shifted mode DEFAULT for ETM_ETMCR */ #define ETM_ETMCR_ETMPORTSEL (0x1UL << 11) /**< ETM Port Selection */ #define _ETM_ETMCR_ETMPORTSEL_SHIFT 11 /**< Shift value for ETM_ETMPORTSEL */ #define _ETM_ETMCR_ETMPORTSEL_MASK 0x800UL /**< Bit mask for ETM_ETMPORTSEL */ #define _ETM_ETMCR_ETMPORTSEL_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMCR */ #define _ETM_ETMCR_ETMPORTSEL_ETMLOW 0x00000000UL /**< Mode ETMLOW for ETM_ETMCR */ #define _ETM_ETMCR_ETMPORTSEL_ETMHIGH 0x00000001UL /**< Mode ETMHIGH for ETM_ETMCR */ #define ETM_ETMCR_ETMPORTSEL_DEFAULT (_ETM_ETMCR_ETMPORTSEL_DEFAULT << 11) /**< Shifted mode DEFAULT for ETM_ETMCR */ #define ETM_ETMCR_ETMPORTSEL_ETMLOW (_ETM_ETMCR_ETMPORTSEL_ETMLOW << 11) /**< Shifted mode ETMLOW for ETM_ETMCR */ #define ETM_ETMCR_ETMPORTSEL_ETMHIGH (_ETM_ETMCR_ETMPORTSEL_ETMHIGH << 11) /**< Shifted mode ETMHIGH for ETM_ETMCR */ #define ETM_ETMCR_PORTMODE2 (0x1UL << 13) /**< Port Mode[2] */ #define _ETM_ETMCR_PORTMODE2_SHIFT 13 /**< Shift value for ETM_PORTMODE2 */ #define _ETM_ETMCR_PORTMODE2_MASK 0x2000UL /**< Bit mask for ETM_PORTMODE2 */ #define _ETM_ETMCR_PORTMODE2_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMCR */ #define ETM_ETMCR_PORTMODE2_DEFAULT (_ETM_ETMCR_PORTMODE2_DEFAULT << 13) /**< Shifted mode DEFAULT for ETM_ETMCR */ #define _ETM_ETMCR_PORTMODE_SHIFT 16 /**< Shift value for ETM_PORTMODE */ #define _ETM_ETMCR_PORTMODE_MASK 0x30000UL /**< Bit mask for ETM_PORTMODE */ #define _ETM_ETMCR_PORTMODE_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMCR */ #define ETM_ETMCR_PORTMODE_DEFAULT (_ETM_ETMCR_PORTMODE_DEFAULT << 16) /**< Shifted mode DEFAULT for ETM_ETMCR */ #define _ETM_ETMCR_EPORTSIZE_SHIFT 21 /**< Shift value for ETM_EPORTSIZE */ #define _ETM_ETMCR_EPORTSIZE_MASK 0x600000UL /**< Bit mask for ETM_EPORTSIZE */ #define _ETM_ETMCR_EPORTSIZE_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMCR */ #define ETM_ETMCR_EPORTSIZE_DEFAULT (_ETM_ETMCR_EPORTSIZE_DEFAULT << 21) /**< Shifted mode DEFAULT for ETM_ETMCR */ #define ETM_ETMCR_TSTAMPEN (0x1UL << 28) /**< Time Stamp Enable */ #define _ETM_ETMCR_TSTAMPEN_SHIFT 28 /**< Shift value for ETM_TSTAMPEN */ #define _ETM_ETMCR_TSTAMPEN_MASK 0x10000000UL /**< Bit mask for ETM_TSTAMPEN */ #define _ETM_ETMCR_TSTAMPEN_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMCR */ #define ETM_ETMCR_TSTAMPEN_DEFAULT (_ETM_ETMCR_TSTAMPEN_DEFAULT << 28) /**< Shifted mode DEFAULT for ETM_ETMCR */ /* Bit fields for ETM ETMCCR */ #define _ETM_ETMCCR_RESETVALUE 0x8C802000UL /**< Default value for ETM_ETMCCR */ #define _ETM_ETMCCR_MASK 0x8FFFFFFFUL /**< Mask for ETM_ETMCCR */ #define _ETM_ETMCCR_ADRCMPPAIR_SHIFT 0 /**< Shift value for ETM_ADRCMPPAIR */ #define _ETM_ETMCCR_ADRCMPPAIR_MASK 0xFUL /**< Bit mask for ETM_ADRCMPPAIR */ #define _ETM_ETMCCR_ADRCMPPAIR_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMCCR */ #define ETM_ETMCCR_ADRCMPPAIR_DEFAULT (_ETM_ETMCCR_ADRCMPPAIR_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMCCR */ #define _ETM_ETMCCR_DATACMPNUM_SHIFT 4 /**< Shift value for ETM_DATACMPNUM */ #define _ETM_ETMCCR_DATACMPNUM_MASK 0xF0UL /**< Bit mask for ETM_DATACMPNUM */ #define _ETM_ETMCCR_DATACMPNUM_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMCCR */ #define ETM_ETMCCR_DATACMPNUM_DEFAULT (_ETM_ETMCCR_DATACMPNUM_DEFAULT << 4) /**< Shifted mode DEFAULT for ETM_ETMCCR */ #define _ETM_ETMCCR_MMDECCNT_SHIFT 8 /**< Shift value for ETM_MMDECCNT */ #define _ETM_ETMCCR_MMDECCNT_MASK 0x1F00UL /**< Bit mask for ETM_MMDECCNT */ #define _ETM_ETMCCR_MMDECCNT_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMCCR */ #define ETM_ETMCCR_MMDECCNT_DEFAULT (_ETM_ETMCCR_MMDECCNT_DEFAULT << 8) /**< Shifted mode DEFAULT for ETM_ETMCCR */ #define _ETM_ETMCCR_COUNTNUM_SHIFT 13 /**< Shift value for ETM_COUNTNUM */ #define _ETM_ETMCCR_COUNTNUM_MASK 0xE000UL /**< Bit mask for ETM_COUNTNUM */ #define _ETM_ETMCCR_COUNTNUM_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMCCR */ #define ETM_ETMCCR_COUNTNUM_DEFAULT (_ETM_ETMCCR_COUNTNUM_DEFAULT << 13) /**< Shifted mode DEFAULT for ETM_ETMCCR */ #define ETM_ETMCCR_SEQPRES (0x1UL << 16) /**< Sequencer Present */ #define _ETM_ETMCCR_SEQPRES_SHIFT 16 /**< Shift value for ETM_SEQPRES */ #define _ETM_ETMCCR_SEQPRES_MASK 0x10000UL /**< Bit mask for ETM_SEQPRES */ #define _ETM_ETMCCR_SEQPRES_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMCCR */ #define ETM_ETMCCR_SEQPRES_DEFAULT (_ETM_ETMCCR_SEQPRES_DEFAULT << 16) /**< Shifted mode DEFAULT for ETM_ETMCCR */ #define _ETM_ETMCCR_EXTINPNUM_SHIFT 17 /**< Shift value for ETM_EXTINPNUM */ #define _ETM_ETMCCR_EXTINPNUM_MASK 0xE0000UL /**< Bit mask for ETM_EXTINPNUM */ #define _ETM_ETMCCR_EXTINPNUM_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMCCR */ #define _ETM_ETMCCR_EXTINPNUM_ZERO 0x00000000UL /**< Mode ZERO for ETM_ETMCCR */ #define _ETM_ETMCCR_EXTINPNUM_ONE 0x00000001UL /**< Mode ONE for ETM_ETMCCR */ #define _ETM_ETMCCR_EXTINPNUM_TWO 0x00000002UL /**< Mode TWO for ETM_ETMCCR */ #define ETM_ETMCCR_EXTINPNUM_DEFAULT (_ETM_ETMCCR_EXTINPNUM_DEFAULT << 17) /**< Shifted mode DEFAULT for ETM_ETMCCR */ #define ETM_ETMCCR_EXTINPNUM_ZERO (_ETM_ETMCCR_EXTINPNUM_ZERO << 17) /**< Shifted mode ZERO for ETM_ETMCCR */ #define ETM_ETMCCR_EXTINPNUM_ONE (_ETM_ETMCCR_EXTINPNUM_ONE << 17) /**< Shifted mode ONE for ETM_ETMCCR */ #define ETM_ETMCCR_EXTINPNUM_TWO (_ETM_ETMCCR_EXTINPNUM_TWO << 17) /**< Shifted mode TWO for ETM_ETMCCR */ #define _ETM_ETMCCR_EXTOUTNUM_SHIFT 20 /**< Shift value for ETM_EXTOUTNUM */ #define _ETM_ETMCCR_EXTOUTNUM_MASK 0x700000UL /**< Bit mask for ETM_EXTOUTNUM */ #define _ETM_ETMCCR_EXTOUTNUM_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMCCR */ #define ETM_ETMCCR_EXTOUTNUM_DEFAULT (_ETM_ETMCCR_EXTOUTNUM_DEFAULT << 20) /**< Shifted mode DEFAULT for ETM_ETMCCR */ #define ETM_ETMCCR_FIFOFULLPRES (0x1UL << 23) /**< FIFIO FULL present */ #define _ETM_ETMCCR_FIFOFULLPRES_SHIFT 23 /**< Shift value for ETM_FIFOFULLPRES */ #define _ETM_ETMCCR_FIFOFULLPRES_MASK 0x800000UL /**< Bit mask for ETM_FIFOFULLPRES */ #define _ETM_ETMCCR_FIFOFULLPRES_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMCCR */ #define ETM_ETMCCR_FIFOFULLPRES_DEFAULT (_ETM_ETMCCR_FIFOFULLPRES_DEFAULT << 23) /**< Shifted mode DEFAULT for ETM_ETMCCR */ #define _ETM_ETMCCR_IDCOMPNUM_SHIFT 24 /**< Shift value for ETM_IDCOMPNUM */ #define _ETM_ETMCCR_IDCOMPNUM_MASK 0x3000000UL /**< Bit mask for ETM_IDCOMPNUM */ #define _ETM_ETMCCR_IDCOMPNUM_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMCCR */ #define ETM_ETMCCR_IDCOMPNUM_DEFAULT (_ETM_ETMCCR_IDCOMPNUM_DEFAULT << 24) /**< Shifted mode DEFAULT for ETM_ETMCCR */ #define ETM_ETMCCR_TRACESS (0x1UL << 26) /**< Trace Start/Stop Block Present */ #define _ETM_ETMCCR_TRACESS_SHIFT 26 /**< Shift value for ETM_TRACESS */ #define _ETM_ETMCCR_TRACESS_MASK 0x4000000UL /**< Bit mask for ETM_TRACESS */ #define _ETM_ETMCCR_TRACESS_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMCCR */ #define ETM_ETMCCR_TRACESS_DEFAULT (_ETM_ETMCCR_TRACESS_DEFAULT << 26) /**< Shifted mode DEFAULT for ETM_ETMCCR */ #define ETM_ETMCCR_MMACCESS (0x1UL << 27) /**< Coprocessor and Memeory Access */ #define _ETM_ETMCCR_MMACCESS_SHIFT 27 /**< Shift value for ETM_MMACCESS */ #define _ETM_ETMCCR_MMACCESS_MASK 0x8000000UL /**< Bit mask for ETM_MMACCESS */ #define _ETM_ETMCCR_MMACCESS_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMCCR */ #define ETM_ETMCCR_MMACCESS_DEFAULT (_ETM_ETMCCR_MMACCESS_DEFAULT << 27) /**< Shifted mode DEFAULT for ETM_ETMCCR */ #define ETM_ETMCCR_ETMID (0x1UL << 31) /**< ETM ID Register Present */ #define _ETM_ETMCCR_ETMID_SHIFT 31 /**< Shift value for ETM_ETMID */ #define _ETM_ETMCCR_ETMID_MASK 0x80000000UL /**< Bit mask for ETM_ETMID */ #define _ETM_ETMCCR_ETMID_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMCCR */ #define ETM_ETMCCR_ETMID_DEFAULT (_ETM_ETMCCR_ETMID_DEFAULT << 31) /**< Shifted mode DEFAULT for ETM_ETMCCR */ /* Bit fields for ETM ETMTRIGGER */ #define _ETM_ETMTRIGGER_RESETVALUE 0x00000000UL /**< Default value for ETM_ETMTRIGGER */ #define _ETM_ETMTRIGGER_MASK 0x0001FFFFUL /**< Mask for ETM_ETMTRIGGER */ #define _ETM_ETMTRIGGER_RESA_SHIFT 0 /**< Shift value for ETM_RESA */ #define _ETM_ETMTRIGGER_RESA_MASK 0x7FUL /**< Bit mask for ETM_RESA */ #define _ETM_ETMTRIGGER_RESA_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMTRIGGER */ #define ETM_ETMTRIGGER_RESA_DEFAULT (_ETM_ETMTRIGGER_RESA_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMTRIGGER */ #define _ETM_ETMTRIGGER_RESB_SHIFT 7 /**< Shift value for ETM_RESB */ #define _ETM_ETMTRIGGER_RESB_MASK 0x3F80UL /**< Bit mask for ETM_RESB */ #define _ETM_ETMTRIGGER_RESB_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMTRIGGER */ #define ETM_ETMTRIGGER_RESB_DEFAULT (_ETM_ETMTRIGGER_RESB_DEFAULT << 7) /**< Shifted mode DEFAULT for ETM_ETMTRIGGER */ #define _ETM_ETMTRIGGER_ETMFCN_SHIFT 14 /**< Shift value for ETM_ETMFCN */ #define _ETM_ETMTRIGGER_ETMFCN_MASK 0x1C000UL /**< Bit mask for ETM_ETMFCN */ #define _ETM_ETMTRIGGER_ETMFCN_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMTRIGGER */ #define ETM_ETMTRIGGER_ETMFCN_DEFAULT (_ETM_ETMTRIGGER_ETMFCN_DEFAULT << 14) /**< Shifted mode DEFAULT for ETM_ETMTRIGGER */ /* Bit fields for ETM ETMSR */ #define _ETM_ETMSR_RESETVALUE 0x00000002UL /**< Default value for ETM_ETMSR */ #define _ETM_ETMSR_MASK 0x0000000FUL /**< Mask for ETM_ETMSR */ #define ETM_ETMSR_ETHOF (0x1UL << 0) /**< ETM Overflow */ #define _ETM_ETMSR_ETHOF_SHIFT 0 /**< Shift value for ETM_ETHOF */ #define _ETM_ETMSR_ETHOF_MASK 0x1UL /**< Bit mask for ETM_ETHOF */ #define _ETM_ETMSR_ETHOF_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMSR */ #define ETM_ETMSR_ETHOF_DEFAULT (_ETM_ETMSR_ETHOF_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMSR */ #define ETM_ETMSR_ETMPROGBIT (0x1UL << 1) /**< ETM Programming Bit Status */ #define _ETM_ETMSR_ETMPROGBIT_SHIFT 1 /**< Shift value for ETM_ETMPROGBIT */ #define _ETM_ETMSR_ETMPROGBIT_MASK 0x2UL /**< Bit mask for ETM_ETMPROGBIT */ #define _ETM_ETMSR_ETMPROGBIT_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMSR */ #define ETM_ETMSR_ETMPROGBIT_DEFAULT (_ETM_ETMSR_ETMPROGBIT_DEFAULT << 1) /**< Shifted mode DEFAULT for ETM_ETMSR */ #define ETM_ETMSR_TRACESTAT (0x1UL << 2) /**< Trace Start/Stop Status */ #define _ETM_ETMSR_TRACESTAT_SHIFT 2 /**< Shift value for ETM_TRACESTAT */ #define _ETM_ETMSR_TRACESTAT_MASK 0x4UL /**< Bit mask for ETM_TRACESTAT */ #define _ETM_ETMSR_TRACESTAT_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMSR */ #define ETM_ETMSR_TRACESTAT_DEFAULT (_ETM_ETMSR_TRACESTAT_DEFAULT << 2) /**< Shifted mode DEFAULT for ETM_ETMSR */ #define ETM_ETMSR_TRIGBIT (0x1UL << 3) /**< Trigger Bit */ #define _ETM_ETMSR_TRIGBIT_SHIFT 3 /**< Shift value for ETM_TRIGBIT */ #define _ETM_ETMSR_TRIGBIT_MASK 0x8UL /**< Bit mask for ETM_TRIGBIT */ #define _ETM_ETMSR_TRIGBIT_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMSR */ #define ETM_ETMSR_TRIGBIT_DEFAULT (_ETM_ETMSR_TRIGBIT_DEFAULT << 3) /**< Shifted mode DEFAULT for ETM_ETMSR */ /* Bit fields for ETM ETMSCR */ #define _ETM_ETMSCR_RESETVALUE 0x00020D09UL /**< Default value for ETM_ETMSCR */ #define _ETM_ETMSCR_MASK 0x00027F0FUL /**< Mask for ETM_ETMSCR */ #define _ETM_ETMSCR_MAXPORTSIZE_SHIFT 0 /**< Shift value for ETM_MAXPORTSIZE */ #define _ETM_ETMSCR_MAXPORTSIZE_MASK 0x7UL /**< Bit mask for ETM_MAXPORTSIZE */ #define _ETM_ETMSCR_MAXPORTSIZE_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMSCR */ #define ETM_ETMSCR_MAXPORTSIZE_DEFAULT (_ETM_ETMSCR_MAXPORTSIZE_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMSCR */ #define ETM_ETMSCR_FIFOFULL (0x1UL << 8) /**< FIFO FULL Supported */ #define _ETM_ETMSCR_FIFOFULL_SHIFT 8 /**< Shift value for ETM_FIFOFULL */ #define _ETM_ETMSCR_FIFOFULL_MASK 0x100UL /**< Bit mask for ETM_FIFOFULL */ #define _ETM_ETMSCR_FIFOFULL_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMSCR */ #define ETM_ETMSCR_FIFOFULL_DEFAULT (_ETM_ETMSCR_FIFOFULL_DEFAULT << 8) /**< Shifted mode DEFAULT for ETM_ETMSCR */ #define ETM_ETMSCR_MAXPORTSIZE3 (0x1UL << 9) /**< Max Port Size[3] */ #define _ETM_ETMSCR_MAXPORTSIZE3_SHIFT 9 /**< Shift value for ETM_MAXPORTSIZE3 */ #define _ETM_ETMSCR_MAXPORTSIZE3_MASK 0x200UL /**< Bit mask for ETM_MAXPORTSIZE3 */ #define _ETM_ETMSCR_MAXPORTSIZE3_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMSCR */ #define ETM_ETMSCR_MAXPORTSIZE3_DEFAULT (_ETM_ETMSCR_MAXPORTSIZE3_DEFAULT << 9) /**< Shifted mode DEFAULT for ETM_ETMSCR */ #define ETM_ETMSCR_PORTSIZE (0x1UL << 10) /**< Port Size Supported */ #define _ETM_ETMSCR_PORTSIZE_SHIFT 10 /**< Shift value for ETM_PORTSIZE */ #define _ETM_ETMSCR_PORTSIZE_MASK 0x400UL /**< Bit mask for ETM_PORTSIZE */ #define _ETM_ETMSCR_PORTSIZE_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMSCR */ #define ETM_ETMSCR_PORTSIZE_DEFAULT (_ETM_ETMSCR_PORTSIZE_DEFAULT << 10) /**< Shifted mode DEFAULT for ETM_ETMSCR */ #define ETM_ETMSCR_PORTMODE (0x1UL << 11) /**< Port Mode Supported */ #define _ETM_ETMSCR_PORTMODE_SHIFT 11 /**< Shift value for ETM_PORTMODE */ #define _ETM_ETMSCR_PORTMODE_MASK 0x800UL /**< Bit mask for ETM_PORTMODE */ #define _ETM_ETMSCR_PORTMODE_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMSCR */ #define ETM_ETMSCR_PORTMODE_DEFAULT (_ETM_ETMSCR_PORTMODE_DEFAULT << 11) /**< Shifted mode DEFAULT for ETM_ETMSCR */ #define _ETM_ETMSCR_PROCNUM_SHIFT 12 /**< Shift value for ETM_PROCNUM */ #define _ETM_ETMSCR_PROCNUM_MASK 0x7000UL /**< Bit mask for ETM_PROCNUM */ #define _ETM_ETMSCR_PROCNUM_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMSCR */ #define ETM_ETMSCR_PROCNUM_DEFAULT (_ETM_ETMSCR_PROCNUM_DEFAULT << 12) /**< Shifted mode DEFAULT for ETM_ETMSCR */ #define ETM_ETMSCR_NOFETCHCOMP (0x1UL << 17) /**< No Fetch Comparison */ #define _ETM_ETMSCR_NOFETCHCOMP_SHIFT 17 /**< Shift value for ETM_NOFETCHCOMP */ #define _ETM_ETMSCR_NOFETCHCOMP_MASK 0x20000UL /**< Bit mask for ETM_NOFETCHCOMP */ #define _ETM_ETMSCR_NOFETCHCOMP_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMSCR */ #define ETM_ETMSCR_NOFETCHCOMP_DEFAULT (_ETM_ETMSCR_NOFETCHCOMP_DEFAULT << 17) /**< Shifted mode DEFAULT for ETM_ETMSCR */ /* Bit fields for ETM ETMTEEVR */ #define _ETM_ETMTEEVR_RESETVALUE 0x00000000UL /**< Default value for ETM_ETMTEEVR */ #define _ETM_ETMTEEVR_MASK 0x0001FFFFUL /**< Mask for ETM_ETMTEEVR */ #define _ETM_ETMTEEVR_RESA_SHIFT 0 /**< Shift value for ETM_RESA */ #define _ETM_ETMTEEVR_RESA_MASK 0x7FUL /**< Bit mask for ETM_RESA */ #define _ETM_ETMTEEVR_RESA_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMTEEVR */ #define ETM_ETMTEEVR_RESA_DEFAULT (_ETM_ETMTEEVR_RESA_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMTEEVR */ #define _ETM_ETMTEEVR_RESB_SHIFT 7 /**< Shift value for ETM_RESB */ #define _ETM_ETMTEEVR_RESB_MASK 0x3F80UL /**< Bit mask for ETM_RESB */ #define _ETM_ETMTEEVR_RESB_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMTEEVR */ #define ETM_ETMTEEVR_RESB_DEFAULT (_ETM_ETMTEEVR_RESB_DEFAULT << 7) /**< Shifted mode DEFAULT for ETM_ETMTEEVR */ #define _ETM_ETMTEEVR_ETMFCNEN_SHIFT 14 /**< Shift value for ETM_ETMFCNEN */ #define _ETM_ETMTEEVR_ETMFCNEN_MASK 0x1C000UL /**< Bit mask for ETM_ETMFCNEN */ #define _ETM_ETMTEEVR_ETMFCNEN_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMTEEVR */ #define ETM_ETMTEEVR_ETMFCNEN_DEFAULT (_ETM_ETMTEEVR_ETMFCNEN_DEFAULT << 14) /**< Shifted mode DEFAULT for ETM_ETMTEEVR */ /* Bit fields for ETM ETMTECR1 */ #define _ETM_ETMTECR1_RESETVALUE 0x00000000UL /**< Default value for ETM_ETMTECR1 */ #define _ETM_ETMTECR1_MASK 0x03FFFFFFUL /**< Mask for ETM_ETMTECR1 */ #define _ETM_ETMTECR1_ADRCMP_SHIFT 0 /**< Shift value for ETM_ADRCMP */ #define _ETM_ETMTECR1_ADRCMP_MASK 0xFFUL /**< Bit mask for ETM_ADRCMP */ #define _ETM_ETMTECR1_ADRCMP_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMTECR1 */ #define ETM_ETMTECR1_ADRCMP_DEFAULT (_ETM_ETMTECR1_ADRCMP_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMTECR1 */ #define _ETM_ETMTECR1_MEMMAP_SHIFT 8 /**< Shift value for ETM_MEMMAP */ #define _ETM_ETMTECR1_MEMMAP_MASK 0xFFFF00UL /**< Bit mask for ETM_MEMMAP */ #define _ETM_ETMTECR1_MEMMAP_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMTECR1 */ #define ETM_ETMTECR1_MEMMAP_DEFAULT (_ETM_ETMTECR1_MEMMAP_DEFAULT << 8) /**< Shifted mode DEFAULT for ETM_ETMTECR1 */ #define ETM_ETMTECR1_INCEXCTL (0x1UL << 24) /**< Trace Include/Exclude Flag */ #define _ETM_ETMTECR1_INCEXCTL_SHIFT 24 /**< Shift value for ETM_INCEXCTL */ #define _ETM_ETMTECR1_INCEXCTL_MASK 0x1000000UL /**< Bit mask for ETM_INCEXCTL */ #define _ETM_ETMTECR1_INCEXCTL_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMTECR1 */ #define _ETM_ETMTECR1_INCEXCTL_INC 0x00000000UL /**< Mode INC for ETM_ETMTECR1 */ #define _ETM_ETMTECR1_INCEXCTL_EXC 0x00000001UL /**< Mode EXC for ETM_ETMTECR1 */ #define ETM_ETMTECR1_INCEXCTL_DEFAULT (_ETM_ETMTECR1_INCEXCTL_DEFAULT << 24) /**< Shifted mode DEFAULT for ETM_ETMTECR1 */ #define ETM_ETMTECR1_INCEXCTL_INC (_ETM_ETMTECR1_INCEXCTL_INC << 24) /**< Shifted mode INC for ETM_ETMTECR1 */ #define ETM_ETMTECR1_INCEXCTL_EXC (_ETM_ETMTECR1_INCEXCTL_EXC << 24) /**< Shifted mode EXC for ETM_ETMTECR1 */ #define ETM_ETMTECR1_TCE (0x1UL << 25) /**< Trace Control Enable */ #define _ETM_ETMTECR1_TCE_SHIFT 25 /**< Shift value for ETM_TCE */ #define _ETM_ETMTECR1_TCE_MASK 0x2000000UL /**< Bit mask for ETM_TCE */ #define _ETM_ETMTECR1_TCE_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMTECR1 */ #define _ETM_ETMTECR1_TCE_EN 0x00000000UL /**< Mode EN for ETM_ETMTECR1 */ #define _ETM_ETMTECR1_TCE_DIS 0x00000001UL /**< Mode DIS for ETM_ETMTECR1 */ #define ETM_ETMTECR1_TCE_DEFAULT (_ETM_ETMTECR1_TCE_DEFAULT << 25) /**< Shifted mode DEFAULT for ETM_ETMTECR1 */ #define ETM_ETMTECR1_TCE_EN (_ETM_ETMTECR1_TCE_EN << 25) /**< Shifted mode EN for ETM_ETMTECR1 */ #define ETM_ETMTECR1_TCE_DIS (_ETM_ETMTECR1_TCE_DIS << 25) /**< Shifted mode DIS for ETM_ETMTECR1 */ /* Bit fields for ETM ETMFFLR */ #define _ETM_ETMFFLR_RESETVALUE 0x00000000UL /**< Default value for ETM_ETMFFLR */ #define _ETM_ETMFFLR_MASK 0x000000FFUL /**< Mask for ETM_ETMFFLR */ #define _ETM_ETMFFLR_BYTENUM_SHIFT 0 /**< Shift value for ETM_BYTENUM */ #define _ETM_ETMFFLR_BYTENUM_MASK 0xFFUL /**< Bit mask for ETM_BYTENUM */ #define _ETM_ETMFFLR_BYTENUM_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMFFLR */ #define ETM_ETMFFLR_BYTENUM_DEFAULT (_ETM_ETMFFLR_BYTENUM_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMFFLR */ /* Bit fields for ETM ETMCNTRLDVR1 */ #define _ETM_ETMCNTRLDVR1_RESETVALUE 0x00000000UL /**< Default value for ETM_ETMCNTRLDVR1 */ #define _ETM_ETMCNTRLDVR1_MASK 0x0000FFFFUL /**< Mask for ETM_ETMCNTRLDVR1 */ #define _ETM_ETMCNTRLDVR1_COUNT_SHIFT 0 /**< Shift value for ETM_COUNT */ #define _ETM_ETMCNTRLDVR1_COUNT_MASK 0xFFFFUL /**< Bit mask for ETM_COUNT */ #define _ETM_ETMCNTRLDVR1_COUNT_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMCNTRLDVR1 */ #define ETM_ETMCNTRLDVR1_COUNT_DEFAULT (_ETM_ETMCNTRLDVR1_COUNT_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMCNTRLDVR1 */ /* Bit fields for ETM ETMSYNCFR */ #define _ETM_ETMSYNCFR_RESETVALUE 0x00000400UL /**< Default value for ETM_ETMSYNCFR */ #define _ETM_ETMSYNCFR_MASK 0x00000FFFUL /**< Mask for ETM_ETMSYNCFR */ #define _ETM_ETMSYNCFR_FREQ_SHIFT 0 /**< Shift value for ETM_FREQ */ #define _ETM_ETMSYNCFR_FREQ_MASK 0xFFFUL /**< Bit mask for ETM_FREQ */ #define _ETM_ETMSYNCFR_FREQ_DEFAULT 0x00000400UL /**< Mode DEFAULT for ETM_ETMSYNCFR */ #define ETM_ETMSYNCFR_FREQ_DEFAULT (_ETM_ETMSYNCFR_FREQ_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMSYNCFR */ /* Bit fields for ETM ETMIDR */ #define _ETM_ETMIDR_RESETVALUE 0x4114F253UL /**< Default value for ETM_ETMIDR */ #define _ETM_ETMIDR_MASK 0xFF1DFFFFUL /**< Mask for ETM_ETMIDR */ #define _ETM_ETMIDR_IMPVER_SHIFT 0 /**< Shift value for ETM_IMPVER */ #define _ETM_ETMIDR_IMPVER_MASK 0xFUL /**< Bit mask for ETM_IMPVER */ #define _ETM_ETMIDR_IMPVER_DEFAULT 0x00000003UL /**< Mode DEFAULT for ETM_ETMIDR */ #define ETM_ETMIDR_IMPVER_DEFAULT (_ETM_ETMIDR_IMPVER_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMIDR */ #define _ETM_ETMIDR_ETMMINVER_SHIFT 4 /**< Shift value for ETM_ETMMINVER */ #define _ETM_ETMIDR_ETMMINVER_MASK 0xF0UL /**< Bit mask for ETM_ETMMINVER */ #define _ETM_ETMIDR_ETMMINVER_DEFAULT 0x00000005UL /**< Mode DEFAULT for ETM_ETMIDR */ #define ETM_ETMIDR_ETMMINVER_DEFAULT (_ETM_ETMIDR_ETMMINVER_DEFAULT << 4) /**< Shifted mode DEFAULT for ETM_ETMIDR */ #define _ETM_ETMIDR_ETMMAJVER_SHIFT 8 /**< Shift value for ETM_ETMMAJVER */ #define _ETM_ETMIDR_ETMMAJVER_MASK 0xF00UL /**< Bit mask for ETM_ETMMAJVER */ #define _ETM_ETMIDR_ETMMAJVER_DEFAULT 0x00000002UL /**< Mode DEFAULT for ETM_ETMIDR */ #define ETM_ETMIDR_ETMMAJVER_DEFAULT (_ETM_ETMIDR_ETMMAJVER_DEFAULT << 8) /**< Shifted mode DEFAULT for ETM_ETMIDR */ #define _ETM_ETMIDR_PROCFAM_SHIFT 12 /**< Shift value for ETM_PROCFAM */ #define _ETM_ETMIDR_PROCFAM_MASK 0xF000UL /**< Bit mask for ETM_PROCFAM */ #define _ETM_ETMIDR_PROCFAM_DEFAULT 0x0000000FUL /**< Mode DEFAULT for ETM_ETMIDR */ #define ETM_ETMIDR_PROCFAM_DEFAULT (_ETM_ETMIDR_PROCFAM_DEFAULT << 12) /**< Shifted mode DEFAULT for ETM_ETMIDR */ #define ETM_ETMIDR_LPCF (0x1UL << 16) /**< Load PC First */ #define _ETM_ETMIDR_LPCF_SHIFT 16 /**< Shift value for ETM_LPCF */ #define _ETM_ETMIDR_LPCF_MASK 0x10000UL /**< Bit mask for ETM_LPCF */ #define _ETM_ETMIDR_LPCF_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMIDR */ #define ETM_ETMIDR_LPCF_DEFAULT (_ETM_ETMIDR_LPCF_DEFAULT << 16) /**< Shifted mode DEFAULT for ETM_ETMIDR */ #define ETM_ETMIDR_THUMBT (0x1UL << 18) /**< 32-bit Thumb Instruction Tracing */ #define _ETM_ETMIDR_THUMBT_SHIFT 18 /**< Shift value for ETM_THUMBT */ #define _ETM_ETMIDR_THUMBT_MASK 0x40000UL /**< Bit mask for ETM_THUMBT */ #define _ETM_ETMIDR_THUMBT_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMIDR */ #define ETM_ETMIDR_THUMBT_DEFAULT (_ETM_ETMIDR_THUMBT_DEFAULT << 18) /**< Shifted mode DEFAULT for ETM_ETMIDR */ #define ETM_ETMIDR_SECEXT (0x1UL << 19) /**< Security Extension Support */ #define _ETM_ETMIDR_SECEXT_SHIFT 19 /**< Shift value for ETM_SECEXT */ #define _ETM_ETMIDR_SECEXT_MASK 0x80000UL /**< Bit mask for ETM_SECEXT */ #define _ETM_ETMIDR_SECEXT_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMIDR */ #define ETM_ETMIDR_SECEXT_DEFAULT (_ETM_ETMIDR_SECEXT_DEFAULT << 19) /**< Shifted mode DEFAULT for ETM_ETMIDR */ #define ETM_ETMIDR_BPE (0x1UL << 20) /**< Branch Packet Encoding */ #define _ETM_ETMIDR_BPE_SHIFT 20 /**< Shift value for ETM_BPE */ #define _ETM_ETMIDR_BPE_MASK 0x100000UL /**< Bit mask for ETM_BPE */ #define _ETM_ETMIDR_BPE_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMIDR */ #define ETM_ETMIDR_BPE_DEFAULT (_ETM_ETMIDR_BPE_DEFAULT << 20) /**< Shifted mode DEFAULT for ETM_ETMIDR */ #define _ETM_ETMIDR_IMPCODE_SHIFT 24 /**< Shift value for ETM_IMPCODE */ #define _ETM_ETMIDR_IMPCODE_MASK 0xFF000000UL /**< Bit mask for ETM_IMPCODE */ #define _ETM_ETMIDR_IMPCODE_DEFAULT 0x00000041UL /**< Mode DEFAULT for ETM_ETMIDR */ #define ETM_ETMIDR_IMPCODE_DEFAULT (_ETM_ETMIDR_IMPCODE_DEFAULT << 24) /**< Shifted mode DEFAULT for ETM_ETMIDR */ /* Bit fields for ETM ETMCCER */ #define _ETM_ETMCCER_RESETVALUE 0x18541800UL /**< Default value for ETM_ETMCCER */ #define _ETM_ETMCCER_MASK 0x387FFFFBUL /**< Mask for ETM_ETMCCER */ #define _ETM_ETMCCER_EXTINPSEL_SHIFT 0 /**< Shift value for ETM_EXTINPSEL */ #define _ETM_ETMCCER_EXTINPSEL_MASK 0x3UL /**< Bit mask for ETM_EXTINPSEL */ #define _ETM_ETMCCER_EXTINPSEL_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMCCER */ #define ETM_ETMCCER_EXTINPSEL_DEFAULT (_ETM_ETMCCER_EXTINPSEL_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMCCER */ #define _ETM_ETMCCER_EXTINPBUS_SHIFT 3 /**< Shift value for ETM_EXTINPBUS */ #define _ETM_ETMCCER_EXTINPBUS_MASK 0x7F8UL /**< Bit mask for ETM_EXTINPBUS */ #define _ETM_ETMCCER_EXTINPBUS_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMCCER */ #define ETM_ETMCCER_EXTINPBUS_DEFAULT (_ETM_ETMCCER_EXTINPBUS_DEFAULT << 3) /**< Shifted mode DEFAULT for ETM_ETMCCER */ #define ETM_ETMCCER_READREGS (0x1UL << 11) /**< Readable Registers */ #define _ETM_ETMCCER_READREGS_SHIFT 11 /**< Shift value for ETM_READREGS */ #define _ETM_ETMCCER_READREGS_MASK 0x800UL /**< Bit mask for ETM_READREGS */ #define _ETM_ETMCCER_READREGS_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMCCER */ #define ETM_ETMCCER_READREGS_DEFAULT (_ETM_ETMCCER_READREGS_DEFAULT << 11) /**< Shifted mode DEFAULT for ETM_ETMCCER */ #define ETM_ETMCCER_DADDRCMP (0x1UL << 12) /**< Data Address comparisons */ #define _ETM_ETMCCER_DADDRCMP_SHIFT 12 /**< Shift value for ETM_DADDRCMP */ #define _ETM_ETMCCER_DADDRCMP_MASK 0x1000UL /**< Bit mask for ETM_DADDRCMP */ #define _ETM_ETMCCER_DADDRCMP_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMCCER */ #define ETM_ETMCCER_DADDRCMP_DEFAULT (_ETM_ETMCCER_DADDRCMP_DEFAULT << 12) /**< Shifted mode DEFAULT for ETM_ETMCCER */ #define _ETM_ETMCCER_INSTRES_SHIFT 13 /**< Shift value for ETM_INSTRES */ #define _ETM_ETMCCER_INSTRES_MASK 0xE000UL /**< Bit mask for ETM_INSTRES */ #define _ETM_ETMCCER_INSTRES_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMCCER */ #define ETM_ETMCCER_INSTRES_DEFAULT (_ETM_ETMCCER_INSTRES_DEFAULT << 13) /**< Shifted mode DEFAULT for ETM_ETMCCER */ #define _ETM_ETMCCER_EICEWPNT_SHIFT 16 /**< Shift value for ETM_EICEWPNT */ #define _ETM_ETMCCER_EICEWPNT_MASK 0xF0000UL /**< Bit mask for ETM_EICEWPNT */ #define _ETM_ETMCCER_EICEWPNT_DEFAULT 0x00000004UL /**< Mode DEFAULT for ETM_ETMCCER */ #define ETM_ETMCCER_EICEWPNT_DEFAULT (_ETM_ETMCCER_EICEWPNT_DEFAULT << 16) /**< Shifted mode DEFAULT for ETM_ETMCCER */ #define ETM_ETMCCER_TEICEWPNT (0x1UL << 20) /**< Trace Sart/Stop Block Uses EmbeddedICE watchpoint inputs */ #define _ETM_ETMCCER_TEICEWPNT_SHIFT 20 /**< Shift value for ETM_TEICEWPNT */ #define _ETM_ETMCCER_TEICEWPNT_MASK 0x100000UL /**< Bit mask for ETM_TEICEWPNT */ #define _ETM_ETMCCER_TEICEWPNT_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMCCER */ #define ETM_ETMCCER_TEICEWPNT_DEFAULT (_ETM_ETMCCER_TEICEWPNT_DEFAULT << 20) /**< Shifted mode DEFAULT for ETM_ETMCCER */ #define ETM_ETMCCER_EICEIMP (0x1UL << 21) /**< EmbeddedICE Behavior control Implemented */ #define _ETM_ETMCCER_EICEIMP_SHIFT 21 /**< Shift value for ETM_EICEIMP */ #define _ETM_ETMCCER_EICEIMP_MASK 0x200000UL /**< Bit mask for ETM_EICEIMP */ #define _ETM_ETMCCER_EICEIMP_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMCCER */ #define ETM_ETMCCER_EICEIMP_DEFAULT (_ETM_ETMCCER_EICEIMP_DEFAULT << 21) /**< Shifted mode DEFAULT for ETM_ETMCCER */ #define ETM_ETMCCER_TIMP (0x1UL << 22) /**< Timestamping Implemented */ #define _ETM_ETMCCER_TIMP_SHIFT 22 /**< Shift value for ETM_TIMP */ #define _ETM_ETMCCER_TIMP_MASK 0x400000UL /**< Bit mask for ETM_TIMP */ #define _ETM_ETMCCER_TIMP_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMCCER */ #define ETM_ETMCCER_TIMP_DEFAULT (_ETM_ETMCCER_TIMP_DEFAULT << 22) /**< Shifted mode DEFAULT for ETM_ETMCCER */ #define ETM_ETMCCER_RFCNT (0x1UL << 27) /**< Reduced Function Counter */ #define _ETM_ETMCCER_RFCNT_SHIFT 27 /**< Shift value for ETM_RFCNT */ #define _ETM_ETMCCER_RFCNT_MASK 0x8000000UL /**< Bit mask for ETM_RFCNT */ #define _ETM_ETMCCER_RFCNT_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMCCER */ #define ETM_ETMCCER_RFCNT_DEFAULT (_ETM_ETMCCER_RFCNT_DEFAULT << 27) /**< Shifted mode DEFAULT for ETM_ETMCCER */ #define ETM_ETMCCER_TENC (0x1UL << 28) /**< Timestamp Encoding */ #define _ETM_ETMCCER_TENC_SHIFT 28 /**< Shift value for ETM_TENC */ #define _ETM_ETMCCER_TENC_MASK 0x10000000UL /**< Bit mask for ETM_TENC */ #define _ETM_ETMCCER_TENC_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMCCER */ #define ETM_ETMCCER_TENC_DEFAULT (_ETM_ETMCCER_TENC_DEFAULT << 28) /**< Shifted mode DEFAULT for ETM_ETMCCER */ #define ETM_ETMCCER_TSIZE (0x1UL << 29) /**< Timestamp Size */ #define _ETM_ETMCCER_TSIZE_SHIFT 29 /**< Shift value for ETM_TSIZE */ #define _ETM_ETMCCER_TSIZE_MASK 0x20000000UL /**< Bit mask for ETM_TSIZE */ #define _ETM_ETMCCER_TSIZE_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMCCER */ #define ETM_ETMCCER_TSIZE_DEFAULT (_ETM_ETMCCER_TSIZE_DEFAULT << 29) /**< Shifted mode DEFAULT for ETM_ETMCCER */ /* Bit fields for ETM ETMTESSEICR */ #define _ETM_ETMTESSEICR_RESETVALUE 0x00000000UL /**< Default value for ETM_ETMTESSEICR */ #define _ETM_ETMTESSEICR_MASK 0x000F000FUL /**< Mask for ETM_ETMTESSEICR */ #define _ETM_ETMTESSEICR_STARTRSEL_SHIFT 0 /**< Shift value for ETM_STARTRSEL */ #define _ETM_ETMTESSEICR_STARTRSEL_MASK 0xFUL /**< Bit mask for ETM_STARTRSEL */ #define _ETM_ETMTESSEICR_STARTRSEL_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMTESSEICR */ #define ETM_ETMTESSEICR_STARTRSEL_DEFAULT (_ETM_ETMTESSEICR_STARTRSEL_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMTESSEICR */ #define _ETM_ETMTESSEICR_STOPRSEL_SHIFT 16 /**< Shift value for ETM_STOPRSEL */ #define _ETM_ETMTESSEICR_STOPRSEL_MASK 0xF0000UL /**< Bit mask for ETM_STOPRSEL */ #define _ETM_ETMTESSEICR_STOPRSEL_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMTESSEICR */ #define ETM_ETMTESSEICR_STOPRSEL_DEFAULT (_ETM_ETMTESSEICR_STOPRSEL_DEFAULT << 16) /**< Shifted mode DEFAULT for ETM_ETMTESSEICR */ /* Bit fields for ETM ETMTSEVR */ #define _ETM_ETMTSEVR_RESETVALUE 0x00000000UL /**< Default value for ETM_ETMTSEVR */ #define _ETM_ETMTSEVR_MASK 0x0001FFFFUL /**< Mask for ETM_ETMTSEVR */ #define _ETM_ETMTSEVR_RESAEVT_SHIFT 0 /**< Shift value for ETM_RESAEVT */ #define _ETM_ETMTSEVR_RESAEVT_MASK 0x7FUL /**< Bit mask for ETM_RESAEVT */ #define _ETM_ETMTSEVR_RESAEVT_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMTSEVR */ #define ETM_ETMTSEVR_RESAEVT_DEFAULT (_ETM_ETMTSEVR_RESAEVT_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMTSEVR */ #define _ETM_ETMTSEVR_RESBEVT_SHIFT 7 /**< Shift value for ETM_RESBEVT */ #define _ETM_ETMTSEVR_RESBEVT_MASK 0x3F80UL /**< Bit mask for ETM_RESBEVT */ #define _ETM_ETMTSEVR_RESBEVT_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMTSEVR */ #define ETM_ETMTSEVR_RESBEVT_DEFAULT (_ETM_ETMTSEVR_RESBEVT_DEFAULT << 7) /**< Shifted mode DEFAULT for ETM_ETMTSEVR */ #define _ETM_ETMTSEVR_ETMFCNEVT_SHIFT 14 /**< Shift value for ETM_ETMFCNEVT */ #define _ETM_ETMTSEVR_ETMFCNEVT_MASK 0x1C000UL /**< Bit mask for ETM_ETMFCNEVT */ #define _ETM_ETMTSEVR_ETMFCNEVT_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMTSEVR */ #define ETM_ETMTSEVR_ETMFCNEVT_DEFAULT (_ETM_ETMTSEVR_ETMFCNEVT_DEFAULT << 14) /**< Shifted mode DEFAULT for ETM_ETMTSEVR */ /* Bit fields for ETM ETMTRACEIDR */ #define _ETM_ETMTRACEIDR_RESETVALUE 0x00000000UL /**< Default value for ETM_ETMTRACEIDR */ #define _ETM_ETMTRACEIDR_MASK 0x0000007FUL /**< Mask for ETM_ETMTRACEIDR */ #define _ETM_ETMTRACEIDR_TRACEID_SHIFT 0 /**< Shift value for ETM_TRACEID */ #define _ETM_ETMTRACEIDR_TRACEID_MASK 0x7FUL /**< Bit mask for ETM_TRACEID */ #define _ETM_ETMTRACEIDR_TRACEID_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMTRACEIDR */ #define ETM_ETMTRACEIDR_TRACEID_DEFAULT (_ETM_ETMTRACEIDR_TRACEID_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMTRACEIDR */ /* Bit fields for ETM ETMIDR2 */ #define _ETM_ETMIDR2_RESETVALUE 0x00000000UL /**< Default value for ETM_ETMIDR2 */ #define _ETM_ETMIDR2_MASK 0x00000003UL /**< Mask for ETM_ETMIDR2 */ #define ETM_ETMIDR2_RFE (0x1UL << 0) /**< RFE Transfer Order */ #define _ETM_ETMIDR2_RFE_SHIFT 0 /**< Shift value for ETM_RFE */ #define _ETM_ETMIDR2_RFE_MASK 0x1UL /**< Bit mask for ETM_RFE */ #define _ETM_ETMIDR2_RFE_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMIDR2 */ #define _ETM_ETMIDR2_RFE_PC 0x00000000UL /**< Mode PC for ETM_ETMIDR2 */ #define _ETM_ETMIDR2_RFE_CPSR 0x00000001UL /**< Mode CPSR for ETM_ETMIDR2 */ #define ETM_ETMIDR2_RFE_DEFAULT (_ETM_ETMIDR2_RFE_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMIDR2 */ #define ETM_ETMIDR2_RFE_PC (_ETM_ETMIDR2_RFE_PC << 0) /**< Shifted mode PC for ETM_ETMIDR2 */ #define ETM_ETMIDR2_RFE_CPSR (_ETM_ETMIDR2_RFE_CPSR << 0) /**< Shifted mode CPSR for ETM_ETMIDR2 */ #define ETM_ETMIDR2_SWP (0x1UL << 1) /**< SWP Transfer Order */ #define _ETM_ETMIDR2_SWP_SHIFT 1 /**< Shift value for ETM_SWP */ #define _ETM_ETMIDR2_SWP_MASK 0x2UL /**< Bit mask for ETM_SWP */ #define _ETM_ETMIDR2_SWP_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMIDR2 */ #define _ETM_ETMIDR2_SWP_LOAD 0x00000000UL /**< Mode LOAD for ETM_ETMIDR2 */ #define _ETM_ETMIDR2_SWP_STORE 0x00000001UL /**< Mode STORE for ETM_ETMIDR2 */ #define ETM_ETMIDR2_SWP_DEFAULT (_ETM_ETMIDR2_SWP_DEFAULT << 1) /**< Shifted mode DEFAULT for ETM_ETMIDR2 */ #define ETM_ETMIDR2_SWP_LOAD (_ETM_ETMIDR2_SWP_LOAD << 1) /**< Shifted mode LOAD for ETM_ETMIDR2 */ #define ETM_ETMIDR2_SWP_STORE (_ETM_ETMIDR2_SWP_STORE << 1) /**< Shifted mode STORE for ETM_ETMIDR2 */ /* Bit fields for ETM ETMPDSR */ #define _ETM_ETMPDSR_RESETVALUE 0x00000001UL /**< Default value for ETM_ETMPDSR */ #define _ETM_ETMPDSR_MASK 0x00000001UL /**< Mask for ETM_ETMPDSR */ #define ETM_ETMPDSR_ETMUP (0x1UL << 0) /**< ETM Powered Up */ #define _ETM_ETMPDSR_ETMUP_SHIFT 0 /**< Shift value for ETM_ETMUP */ #define _ETM_ETMPDSR_ETMUP_MASK 0x1UL /**< Bit mask for ETM_ETMUP */ #define _ETM_ETMPDSR_ETMUP_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMPDSR */ #define ETM_ETMPDSR_ETMUP_DEFAULT (_ETM_ETMPDSR_ETMUP_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMPDSR */ /* Bit fields for ETM ETMISCIN */ #define _ETM_ETMISCIN_RESETVALUE 0x00000000UL /**< Default value for ETM_ETMISCIN */ #define _ETM_ETMISCIN_MASK 0x00000013UL /**< Mask for ETM_ETMISCIN */ #define _ETM_ETMISCIN_EXTIN_SHIFT 0 /**< Shift value for ETM_EXTIN */ #define _ETM_ETMISCIN_EXTIN_MASK 0x3UL /**< Bit mask for ETM_EXTIN */ #define _ETM_ETMISCIN_EXTIN_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMISCIN */ #define ETM_ETMISCIN_EXTIN_DEFAULT (_ETM_ETMISCIN_EXTIN_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMISCIN */ #define ETM_ETMISCIN_COREHALT (0x1UL << 4) /**< Core Halt */ #define _ETM_ETMISCIN_COREHALT_SHIFT 4 /**< Shift value for ETM_COREHALT */ #define _ETM_ETMISCIN_COREHALT_MASK 0x10UL /**< Bit mask for ETM_COREHALT */ #define _ETM_ETMISCIN_COREHALT_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMISCIN */ #define ETM_ETMISCIN_COREHALT_DEFAULT (_ETM_ETMISCIN_COREHALT_DEFAULT << 4) /**< Shifted mode DEFAULT for ETM_ETMISCIN */ /* Bit fields for ETM ITTRIGOUT */ #define _ETM_ITTRIGOUT_RESETVALUE 0x00000000UL /**< Default value for ETM_ITTRIGOUT */ #define _ETM_ITTRIGOUT_MASK 0x00000001UL /**< Mask for ETM_ITTRIGOUT */ #define ETM_ITTRIGOUT_TRIGGEROUT (0x1UL << 0) /**< Trigger output value */ #define _ETM_ITTRIGOUT_TRIGGEROUT_SHIFT 0 /**< Shift value for ETM_TRIGGEROUT */ #define _ETM_ITTRIGOUT_TRIGGEROUT_MASK 0x1UL /**< Bit mask for ETM_TRIGGEROUT */ #define _ETM_ITTRIGOUT_TRIGGEROUT_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ITTRIGOUT */ #define ETM_ITTRIGOUT_TRIGGEROUT_DEFAULT (_ETM_ITTRIGOUT_TRIGGEROUT_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ITTRIGOUT */ /* Bit fields for ETM ETMITATBCTR2 */ #define _ETM_ETMITATBCTR2_RESETVALUE 0x00000001UL /**< Default value for ETM_ETMITATBCTR2 */ #define _ETM_ETMITATBCTR2_MASK 0x00000001UL /**< Mask for ETM_ETMITATBCTR2 */ #define ETM_ETMITATBCTR2_ATREADY (0x1UL << 0) /**< ATREADY Input Value */ #define _ETM_ETMITATBCTR2_ATREADY_SHIFT 0 /**< Shift value for ETM_ATREADY */ #define _ETM_ETMITATBCTR2_ATREADY_MASK 0x1UL /**< Bit mask for ETM_ATREADY */ #define _ETM_ETMITATBCTR2_ATREADY_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMITATBCTR2 */ #define ETM_ETMITATBCTR2_ATREADY_DEFAULT (_ETM_ETMITATBCTR2_ATREADY_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMITATBCTR2 */ /* Bit fields for ETM ETMITATBCTR0 */ #define _ETM_ETMITATBCTR0_RESETVALUE 0x00000000UL /**< Default value for ETM_ETMITATBCTR0 */ #define _ETM_ETMITATBCTR0_MASK 0x00000001UL /**< Mask for ETM_ETMITATBCTR0 */ #define ETM_ETMITATBCTR0_ATVALID (0x1UL << 0) /**< ATVALID Output Value */ #define _ETM_ETMITATBCTR0_ATVALID_SHIFT 0 /**< Shift value for ETM_ATVALID */ #define _ETM_ETMITATBCTR0_ATVALID_MASK 0x1UL /**< Bit mask for ETM_ATVALID */ #define _ETM_ETMITATBCTR0_ATVALID_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMITATBCTR0 */ #define ETM_ETMITATBCTR0_ATVALID_DEFAULT (_ETM_ETMITATBCTR0_ATVALID_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMITATBCTR0 */ /* Bit fields for ETM ETMITCTRL */ #define _ETM_ETMITCTRL_RESETVALUE 0x00000000UL /**< Default value for ETM_ETMITCTRL */ #define _ETM_ETMITCTRL_MASK 0x00000001UL /**< Mask for ETM_ETMITCTRL */ #define ETM_ETMITCTRL_ITEN (0x1UL << 0) /**< Integration Mode Enable */ #define _ETM_ETMITCTRL_ITEN_SHIFT 0 /**< Shift value for ETM_ITEN */ #define _ETM_ETMITCTRL_ITEN_MASK 0x1UL /**< Bit mask for ETM_ITEN */ #define _ETM_ETMITCTRL_ITEN_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMITCTRL */ #define ETM_ETMITCTRL_ITEN_DEFAULT (_ETM_ETMITCTRL_ITEN_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMITCTRL */ /* Bit fields for ETM ETMCLAIMSET */ #define _ETM_ETMCLAIMSET_RESETVALUE 0x0000000FUL /**< Default value for ETM_ETMCLAIMSET */ #define _ETM_ETMCLAIMSET_MASK 0x000000FFUL /**< Mask for ETM_ETMCLAIMSET */ #define _ETM_ETMCLAIMSET_SETTAG_SHIFT 0 /**< Shift value for ETM_SETTAG */ #define _ETM_ETMCLAIMSET_SETTAG_MASK 0xFFUL /**< Bit mask for ETM_SETTAG */ #define _ETM_ETMCLAIMSET_SETTAG_DEFAULT 0x0000000FUL /**< Mode DEFAULT for ETM_ETMCLAIMSET */ #define ETM_ETMCLAIMSET_SETTAG_DEFAULT (_ETM_ETMCLAIMSET_SETTAG_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMCLAIMSET */ /* Bit fields for ETM ETMCLAIMCLR */ #define _ETM_ETMCLAIMCLR_RESETVALUE 0x00000000UL /**< Default value for ETM_ETMCLAIMCLR */ #define _ETM_ETMCLAIMCLR_MASK 0x00000001UL /**< Mask for ETM_ETMCLAIMCLR */ #define ETM_ETMCLAIMCLR_CLRTAG (0x1UL << 0) /**< Tag Bits */ #define _ETM_ETMCLAIMCLR_CLRTAG_SHIFT 0 /**< Shift value for ETM_CLRTAG */ #define _ETM_ETMCLAIMCLR_CLRTAG_MASK 0x1UL /**< Bit mask for ETM_CLRTAG */ #define _ETM_ETMCLAIMCLR_CLRTAG_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMCLAIMCLR */ #define ETM_ETMCLAIMCLR_CLRTAG_DEFAULT (_ETM_ETMCLAIMCLR_CLRTAG_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMCLAIMCLR */ /* Bit fields for ETM ETMLAR */ #define _ETM_ETMLAR_RESETVALUE 0x00000000UL /**< Default value for ETM_ETMLAR */ #define _ETM_ETMLAR_MASK 0x00000001UL /**< Mask for ETM_ETMLAR */ #define ETM_ETMLAR_KEY (0x1UL << 0) /**< Key Value */ #define _ETM_ETMLAR_KEY_SHIFT 0 /**< Shift value for ETM_KEY */ #define _ETM_ETMLAR_KEY_MASK 0x1UL /**< Bit mask for ETM_KEY */ #define _ETM_ETMLAR_KEY_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMLAR */ #define ETM_ETMLAR_KEY_DEFAULT (_ETM_ETMLAR_KEY_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMLAR */ /* Bit fields for ETM ETMLSR */ #define _ETM_ETMLSR_RESETVALUE 0x00000003UL /**< Default value for ETM_ETMLSR */ #define _ETM_ETMLSR_MASK 0x00000003UL /**< Mask for ETM_ETMLSR */ #define ETM_ETMLSR_LOCKIMP (0x1UL << 0) /**< ETM Locking Implemented */ #define _ETM_ETMLSR_LOCKIMP_SHIFT 0 /**< Shift value for ETM_LOCKIMP */ #define _ETM_ETMLSR_LOCKIMP_MASK 0x1UL /**< Bit mask for ETM_LOCKIMP */ #define _ETM_ETMLSR_LOCKIMP_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMLSR */ #define ETM_ETMLSR_LOCKIMP_DEFAULT (_ETM_ETMLSR_LOCKIMP_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMLSR */ #define ETM_ETMLSR_LOCKED (0x1UL << 1) /**< ETM locked */ #define _ETM_ETMLSR_LOCKED_SHIFT 1 /**< Shift value for ETM_LOCKED */ #define _ETM_ETMLSR_LOCKED_MASK 0x2UL /**< Bit mask for ETM_LOCKED */ #define _ETM_ETMLSR_LOCKED_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMLSR */ #define ETM_ETMLSR_LOCKED_DEFAULT (_ETM_ETMLSR_LOCKED_DEFAULT << 1) /**< Shifted mode DEFAULT for ETM_ETMLSR */ /* Bit fields for ETM ETMAUTHSTATUS */ #define _ETM_ETMAUTHSTATUS_RESETVALUE 0x000000C0UL /**< Default value for ETM_ETMAUTHSTATUS */ #define _ETM_ETMAUTHSTATUS_MASK 0x000000FFUL /**< Mask for ETM_ETMAUTHSTATUS */ #define _ETM_ETMAUTHSTATUS_NONSECINVDBG_SHIFT 0 /**< Shift value for ETM_NONSECINVDBG */ #define _ETM_ETMAUTHSTATUS_NONSECINVDBG_MASK 0x3UL /**< Bit mask for ETM_NONSECINVDBG */ #define _ETM_ETMAUTHSTATUS_NONSECINVDBG_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMAUTHSTATUS */ #define ETM_ETMAUTHSTATUS_NONSECINVDBG_DEFAULT (_ETM_ETMAUTHSTATUS_NONSECINVDBG_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMAUTHSTATUS */ #define _ETM_ETMAUTHSTATUS_NONSECNONINVDBG_SHIFT 2 /**< Shift value for ETM_NONSECNONINVDBG */ #define _ETM_ETMAUTHSTATUS_NONSECNONINVDBG_MASK 0xCUL /**< Bit mask for ETM_NONSECNONINVDBG */ #define _ETM_ETMAUTHSTATUS_NONSECNONINVDBG_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMAUTHSTATUS */ #define _ETM_ETMAUTHSTATUS_NONSECNONINVDBG_DISABLE 0x00000002UL /**< Mode DISABLE for ETM_ETMAUTHSTATUS */ #define _ETM_ETMAUTHSTATUS_NONSECNONINVDBG_ENABLE 0x00000003UL /**< Mode ENABLE for ETM_ETMAUTHSTATUS */ #define ETM_ETMAUTHSTATUS_NONSECNONINVDBG_DEFAULT (_ETM_ETMAUTHSTATUS_NONSECNONINVDBG_DEFAULT << 2) /**< Shifted mode DEFAULT for ETM_ETMAUTHSTATUS */ #define ETM_ETMAUTHSTATUS_NONSECNONINVDBG_DISABLE (_ETM_ETMAUTHSTATUS_NONSECNONINVDBG_DISABLE << 2) /**< Shifted mode DISABLE for ETM_ETMAUTHSTATUS */ #define ETM_ETMAUTHSTATUS_NONSECNONINVDBG_ENABLE (_ETM_ETMAUTHSTATUS_NONSECNONINVDBG_ENABLE << 2) /**< Shifted mode ENABLE for ETM_ETMAUTHSTATUS */ #define _ETM_ETMAUTHSTATUS_SECINVDBG_SHIFT 4 /**< Shift value for ETM_SECINVDBG */ #define _ETM_ETMAUTHSTATUS_SECINVDBG_MASK 0x30UL /**< Bit mask for ETM_SECINVDBG */ #define _ETM_ETMAUTHSTATUS_SECINVDBG_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMAUTHSTATUS */ #define ETM_ETMAUTHSTATUS_SECINVDBG_DEFAULT (_ETM_ETMAUTHSTATUS_SECINVDBG_DEFAULT << 4) /**< Shifted mode DEFAULT for ETM_ETMAUTHSTATUS */ #define _ETM_ETMAUTHSTATUS_SECNONINVDBG_SHIFT 6 /**< Shift value for ETM_SECNONINVDBG */ #define _ETM_ETMAUTHSTATUS_SECNONINVDBG_MASK 0xC0UL /**< Bit mask for ETM_SECNONINVDBG */ #define _ETM_ETMAUTHSTATUS_SECNONINVDBG_DEFAULT 0x00000003UL /**< Mode DEFAULT for ETM_ETMAUTHSTATUS */ #define ETM_ETMAUTHSTATUS_SECNONINVDBG_DEFAULT (_ETM_ETMAUTHSTATUS_SECNONINVDBG_DEFAULT << 6) /**< Shifted mode DEFAULT for ETM_ETMAUTHSTATUS */ /* Bit fields for ETM ETMDEVTYPE */ #define _ETM_ETMDEVTYPE_RESETVALUE 0x00000013UL /**< Default value for ETM_ETMDEVTYPE */ #define _ETM_ETMDEVTYPE_MASK 0x000000FFUL /**< Mask for ETM_ETMDEVTYPE */ #define _ETM_ETMDEVTYPE_TRACESRC_SHIFT 0 /**< Shift value for ETM_TRACESRC */ #define _ETM_ETMDEVTYPE_TRACESRC_MASK 0xFUL /**< Bit mask for ETM_TRACESRC */ #define _ETM_ETMDEVTYPE_TRACESRC_DEFAULT 0x00000003UL /**< Mode DEFAULT for ETM_ETMDEVTYPE */ #define ETM_ETMDEVTYPE_TRACESRC_DEFAULT (_ETM_ETMDEVTYPE_TRACESRC_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMDEVTYPE */ #define _ETM_ETMDEVTYPE_PROCTRACE_SHIFT 4 /**< Shift value for ETM_PROCTRACE */ #define _ETM_ETMDEVTYPE_PROCTRACE_MASK 0xF0UL /**< Bit mask for ETM_PROCTRACE */ #define _ETM_ETMDEVTYPE_PROCTRACE_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMDEVTYPE */ #define ETM_ETMDEVTYPE_PROCTRACE_DEFAULT (_ETM_ETMDEVTYPE_PROCTRACE_DEFAULT << 4) /**< Shifted mode DEFAULT for ETM_ETMDEVTYPE */ /* Bit fields for ETM ETMPIDR4 */ #define _ETM_ETMPIDR4_RESETVALUE 0x00000004UL /**< Default value for ETM_ETMPIDR4 */ #define _ETM_ETMPIDR4_MASK 0x000000FFUL /**< Mask for ETM_ETMPIDR4 */ #define _ETM_ETMPIDR4_CONTCODE_SHIFT 0 /**< Shift value for ETM_CONTCODE */ #define _ETM_ETMPIDR4_CONTCODE_MASK 0xFUL /**< Bit mask for ETM_CONTCODE */ #define _ETM_ETMPIDR4_CONTCODE_DEFAULT 0x00000004UL /**< Mode DEFAULT for ETM_ETMPIDR4 */ #define ETM_ETMPIDR4_CONTCODE_DEFAULT (_ETM_ETMPIDR4_CONTCODE_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMPIDR4 */ #define _ETM_ETMPIDR4_COUNT_SHIFT 4 /**< Shift value for ETM_COUNT */ #define _ETM_ETMPIDR4_COUNT_MASK 0xF0UL /**< Bit mask for ETM_COUNT */ #define _ETM_ETMPIDR4_COUNT_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMPIDR4 */ #define ETM_ETMPIDR4_COUNT_DEFAULT (_ETM_ETMPIDR4_COUNT_DEFAULT << 4) /**< Shifted mode DEFAULT for ETM_ETMPIDR4 */ /* Bit fields for ETM ETMPIDR5 */ #define _ETM_ETMPIDR5_RESETVALUE 0x00000000UL /**< Default value for ETM_ETMPIDR5 */ #define _ETM_ETMPIDR5_MASK 0x00000000UL /**< Mask for ETM_ETMPIDR5 */ /* Bit fields for ETM ETMPIDR6 */ #define _ETM_ETMPIDR6_RESETVALUE 0x00000000UL /**< Default value for ETM_ETMPIDR6 */ #define _ETM_ETMPIDR6_MASK 0x00000000UL /**< Mask for ETM_ETMPIDR6 */ /* Bit fields for ETM ETMPIDR7 */ #define _ETM_ETMPIDR7_RESETVALUE 0x00000000UL /**< Default value for ETM_ETMPIDR7 */ #define _ETM_ETMPIDR7_MASK 0x00000000UL /**< Mask for ETM_ETMPIDR7 */ /* Bit fields for ETM ETMPIDR0 */ #define _ETM_ETMPIDR0_RESETVALUE 0x00000025UL /**< Default value for ETM_ETMPIDR0 */ #define _ETM_ETMPIDR0_MASK 0x000000FFUL /**< Mask for ETM_ETMPIDR0 */ #define _ETM_ETMPIDR0_PARTNUM_SHIFT 0 /**< Shift value for ETM_PARTNUM */ #define _ETM_ETMPIDR0_PARTNUM_MASK 0xFFUL /**< Bit mask for ETM_PARTNUM */ #define _ETM_ETMPIDR0_PARTNUM_DEFAULT 0x00000025UL /**< Mode DEFAULT for ETM_ETMPIDR0 */ #define ETM_ETMPIDR0_PARTNUM_DEFAULT (_ETM_ETMPIDR0_PARTNUM_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMPIDR0 */ /* Bit fields for ETM ETMPIDR1 */ #define _ETM_ETMPIDR1_RESETVALUE 0x000000B9UL /**< Default value for ETM_ETMPIDR1 */ #define _ETM_ETMPIDR1_MASK 0x000000FFUL /**< Mask for ETM_ETMPIDR1 */ #define _ETM_ETMPIDR1_PARTNUM_SHIFT 0 /**< Shift value for ETM_PARTNUM */ #define _ETM_ETMPIDR1_PARTNUM_MASK 0xFUL /**< Bit mask for ETM_PARTNUM */ #define _ETM_ETMPIDR1_PARTNUM_DEFAULT 0x00000009UL /**< Mode DEFAULT for ETM_ETMPIDR1 */ #define ETM_ETMPIDR1_PARTNUM_DEFAULT (_ETM_ETMPIDR1_PARTNUM_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMPIDR1 */ #define _ETM_ETMPIDR1_IDCODE_SHIFT 4 /**< Shift value for ETM_IDCODE */ #define _ETM_ETMPIDR1_IDCODE_MASK 0xF0UL /**< Bit mask for ETM_IDCODE */ #define _ETM_ETMPIDR1_IDCODE_DEFAULT 0x0000000BUL /**< Mode DEFAULT for ETM_ETMPIDR1 */ #define ETM_ETMPIDR1_IDCODE_DEFAULT (_ETM_ETMPIDR1_IDCODE_DEFAULT << 4) /**< Shifted mode DEFAULT for ETM_ETMPIDR1 */ /* Bit fields for ETM ETMPIDR2 */ #define _ETM_ETMPIDR2_RESETVALUE 0x0000000BUL /**< Default value for ETM_ETMPIDR2 */ #define _ETM_ETMPIDR2_MASK 0x000000FFUL /**< Mask for ETM_ETMPIDR2 */ #define _ETM_ETMPIDR2_IDCODE_SHIFT 0 /**< Shift value for ETM_IDCODE */ #define _ETM_ETMPIDR2_IDCODE_MASK 0x7UL /**< Bit mask for ETM_IDCODE */ #define _ETM_ETMPIDR2_IDCODE_DEFAULT 0x00000003UL /**< Mode DEFAULT for ETM_ETMPIDR2 */ #define ETM_ETMPIDR2_IDCODE_DEFAULT (_ETM_ETMPIDR2_IDCODE_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMPIDR2 */ #define ETM_ETMPIDR2_ALWAYS1 (0x1UL << 3) /**< Always 1 */ #define _ETM_ETMPIDR2_ALWAYS1_SHIFT 3 /**< Shift value for ETM_ALWAYS1 */ #define _ETM_ETMPIDR2_ALWAYS1_MASK 0x8UL /**< Bit mask for ETM_ALWAYS1 */ #define _ETM_ETMPIDR2_ALWAYS1_DEFAULT 0x00000001UL /**< Mode DEFAULT for ETM_ETMPIDR2 */ #define ETM_ETMPIDR2_ALWAYS1_DEFAULT (_ETM_ETMPIDR2_ALWAYS1_DEFAULT << 3) /**< Shifted mode DEFAULT for ETM_ETMPIDR2 */ #define _ETM_ETMPIDR2_REV_SHIFT 4 /**< Shift value for ETM_REV */ #define _ETM_ETMPIDR2_REV_MASK 0xF0UL /**< Bit mask for ETM_REV */ #define _ETM_ETMPIDR2_REV_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMPIDR2 */ #define ETM_ETMPIDR2_REV_DEFAULT (_ETM_ETMPIDR2_REV_DEFAULT << 4) /**< Shifted mode DEFAULT for ETM_ETMPIDR2 */ /* Bit fields for ETM ETMPIDR3 */ #define _ETM_ETMPIDR3_RESETVALUE 0x00000000UL /**< Default value for ETM_ETMPIDR3 */ #define _ETM_ETMPIDR3_MASK 0x000000FFUL /**< Mask for ETM_ETMPIDR3 */ #define _ETM_ETMPIDR3_CUSTMOD_SHIFT 0 /**< Shift value for ETM_CUSTMOD */ #define _ETM_ETMPIDR3_CUSTMOD_MASK 0xFUL /**< Bit mask for ETM_CUSTMOD */ #define _ETM_ETMPIDR3_CUSTMOD_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMPIDR3 */ #define ETM_ETMPIDR3_CUSTMOD_DEFAULT (_ETM_ETMPIDR3_CUSTMOD_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMPIDR3 */ #define _ETM_ETMPIDR3_REVAND_SHIFT 4 /**< Shift value for ETM_REVAND */ #define _ETM_ETMPIDR3_REVAND_MASK 0xF0UL /**< Bit mask for ETM_REVAND */ #define _ETM_ETMPIDR3_REVAND_DEFAULT 0x00000000UL /**< Mode DEFAULT for ETM_ETMPIDR3 */ #define ETM_ETMPIDR3_REVAND_DEFAULT (_ETM_ETMPIDR3_REVAND_DEFAULT << 4) /**< Shifted mode DEFAULT for ETM_ETMPIDR3 */ /* Bit fields for ETM ETMCIDR0 */ #define _ETM_ETMCIDR0_RESETVALUE 0x0000000DUL /**< Default value for ETM_ETMCIDR0 */ #define _ETM_ETMCIDR0_MASK 0x000000FFUL /**< Mask for ETM_ETMCIDR0 */ #define _ETM_ETMCIDR0_PREAMB_SHIFT 0 /**< Shift value for ETM_PREAMB */ #define _ETM_ETMCIDR0_PREAMB_MASK 0xFFUL /**< Bit mask for ETM_PREAMB */ #define _ETM_ETMCIDR0_PREAMB_DEFAULT 0x0000000DUL /**< Mode DEFAULT for ETM_ETMCIDR0 */ #define ETM_ETMCIDR0_PREAMB_DEFAULT (_ETM_ETMCIDR0_PREAMB_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMCIDR0 */ /* Bit fields for ETM ETMCIDR1 */ #define _ETM_ETMCIDR1_RESETVALUE 0x00000090UL /**< Default value for ETM_ETMCIDR1 */ #define _ETM_ETMCIDR1_MASK 0x000000FFUL /**< Mask for ETM_ETMCIDR1 */ #define _ETM_ETMCIDR1_PREAMB_SHIFT 0 /**< Shift value for ETM_PREAMB */ #define _ETM_ETMCIDR1_PREAMB_MASK 0xFFUL /**< Bit mask for ETM_PREAMB */ #define _ETM_ETMCIDR1_PREAMB_DEFAULT 0x00000090UL /**< Mode DEFAULT for ETM_ETMCIDR1 */ #define ETM_ETMCIDR1_PREAMB_DEFAULT (_ETM_ETMCIDR1_PREAMB_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMCIDR1 */ /* Bit fields for ETM ETMCIDR2 */ #define _ETM_ETMCIDR2_RESETVALUE 0x00000005UL /**< Default value for ETM_ETMCIDR2 */ #define _ETM_ETMCIDR2_MASK 0x000000FFUL /**< Mask for ETM_ETMCIDR2 */ #define _ETM_ETMCIDR2_PREAMB_SHIFT 0 /**< Shift value for ETM_PREAMB */ #define _ETM_ETMCIDR2_PREAMB_MASK 0xFFUL /**< Bit mask for ETM_PREAMB */ #define _ETM_ETMCIDR2_PREAMB_DEFAULT 0x00000005UL /**< Mode DEFAULT for ETM_ETMCIDR2 */ #define ETM_ETMCIDR2_PREAMB_DEFAULT (_ETM_ETMCIDR2_PREAMB_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMCIDR2 */ /* Bit fields for ETM ETMCIDR3 */ #define _ETM_ETMCIDR3_RESETVALUE 0x000000B1UL /**< Default value for ETM_ETMCIDR3 */ #define _ETM_ETMCIDR3_MASK 0x000000FFUL /**< Mask for ETM_ETMCIDR3 */ #define _ETM_ETMCIDR3_PREAMB_SHIFT 0 /**< Shift value for ETM_PREAMB */ #define _ETM_ETMCIDR3_PREAMB_MASK 0xFFUL /**< Bit mask for ETM_PREAMB */ #define _ETM_ETMCIDR3_PREAMB_DEFAULT 0x000000B1UL /**< Mode DEFAULT for ETM_ETMCIDR3 */ #define ETM_ETMCIDR3_PREAMB_DEFAULT (_ETM_ETMCIDR3_PREAMB_DEFAULT << 0) /**< Shifted mode DEFAULT for ETM_ETMCIDR3 */ /** @} */ /** @} End of group EFM32GG11B_ETM */ /** @} End of group Parts */
{ "pile_set_name": "Github" }
/** * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * */ #ifndef WMLSetvarElement_h #define WMLSetvarElement_h #if ENABLE(WML) #include "WMLElement.h" namespace WebCore { class WMLSetvarElement : public WMLElement { public: WMLSetvarElement(const QualifiedName& tagName, Document*); virtual ~WMLSetvarElement(); virtual void parseMappedAttribute(MappedAttribute*); virtual void insertedIntoDocument(); virtual void removedFromDocument(); String name() const; String value() const; }; } #endif #endif
{ "pile_set_name": "Github" }
/* * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. * */ package sun.jvm.hotspot.jdi; import com.sun.jdi.*; abstract class PrimitiveTypeImpl extends TypeImpl implements PrimitiveType { PrimitiveTypeImpl(VirtualMachine vm) { super(vm); } /* * Converts the given primitive value to a value of this type. */ abstract PrimitiveValue convert(PrimitiveValue value) throws InvalidTypeException; public String toString() { return name(); } }
{ "pile_set_name": "Github" }
menuconfig BR2_PACKAGE_TIFF bool "tiff" help Library for handling TIFF (Tag Image File Format) images. http://simplesystems.org/libtiff/ if BR2_PACKAGE_TIFF config BR2_PACKAGE_TIFF_CCITT bool "CCITT Group 3 & 4 support" default y config BR2_PACKAGE_TIFF_PACKBITS bool "Macintosh PackBits algorithm" default y config BR2_PACKAGE_TIFF_LZW bool "LZW algorithm" default y config BR2_PACKAGE_TIFF_THUNDER bool "ThunderScan 4-bit RLE algorithm" default y config BR2_PACKAGE_TIFF_NEXT bool "NeXT 2-bit RLE algorithm" default y config BR2_PACKAGE_TIFF_LOGLUV bool "LogLuv high dynamic range encoding" default y config BR2_PACKAGE_TIFF_MDI bool "Microsoft Document Imaging" default y config BR2_PACKAGE_TIFF_ZLIB bool "Zlib usage (required for Deflate compression)" default y select BR2_PACKAGE_ZLIB config BR2_PACKAGE_TIFF_XZ bool "XZ compression" select BR2_PACKAGE_XZ config BR2_PACKAGE_TIFF_PIXARLOG bool "Pixar log-format algorithm (requires Zlib)" default y select BR2_PACKAGE_TIFF_ZLIB config BR2_PACKAGE_TIFF_JPEG bool "JPEG compression" default y select BR2_PACKAGE_JPEG config BR2_PACKAGE_TIFF_OLD_JPEG bool "Old JPEG decompression" default y config BR2_PACKAGE_TIFF_JBIG bool "JBIG compression" default y config BR2_PACKAGE_TIFF_UTILITIES bool "tiff utilities" help Install all tiff utilities. endif
{ "pile_set_name": "Github" }
--TEST-- ReflectionClass::getMethods() --CREDITS-- Robin Fernandes <[email protected]> Steve Seear <[email protected]> --FILE-- <?php class C { public function pubf1() {} public function pubf2() {} private function privf1() {} private function privf2() {} static public function pubsf1() {} static public function pubsf2() {} static private function privsf1() {} static private function privsf2() {} } $rc = new ReflectionClass("C"); $StaticFlag = 0x01; $pubFlag = 0x100; $privFlag = 0x400; echo "No methods:"; var_dump($rc->getMethods(0)); echo "Public methods:"; var_dump($rc->getMethods($pubFlag)); echo "Private methods:"; var_dump($rc->getMethods($privFlag)); echo "Public or static methods:"; var_dump($rc->getMethods($StaticFlag | $pubFlag)); echo "Private or static methods:"; var_dump($rc->getMethods($StaticFlag | $privFlag)); ?> --EXPECTF-- No methods:array(0) { } Public methods:array(4) { [0]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(5) "pubf1" ["class"]=> string(1) "C" } [1]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(5) "pubf2" ["class"]=> string(1) "C" } [2]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(6) "pubsf1" ["class"]=> string(1) "C" } [3]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(6) "pubsf2" ["class"]=> string(1) "C" } } Private methods:array(4) { [0]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(6) "privf1" ["class"]=> string(1) "C" } [1]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(6) "privf2" ["class"]=> string(1) "C" } [2]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(7) "privsf1" ["class"]=> string(1) "C" } [3]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(7) "privsf2" ["class"]=> string(1) "C" } } Public or static methods:array(6) { [0]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(5) "pubf1" ["class"]=> string(1) "C" } [1]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(5) "pubf2" ["class"]=> string(1) "C" } [2]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(6) "pubsf1" ["class"]=> string(1) "C" } [3]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(6) "pubsf2" ["class"]=> string(1) "C" } [4]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(7) "privsf1" ["class"]=> string(1) "C" } [5]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(7) "privsf2" ["class"]=> string(1) "C" } } Private or static methods:array(6) { [0]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(6) "privf1" ["class"]=> string(1) "C" } [1]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(6) "privf2" ["class"]=> string(1) "C" } [2]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(6) "pubsf1" ["class"]=> string(1) "C" } [3]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(6) "pubsf2" ["class"]=> string(1) "C" } [4]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(7) "privsf1" ["class"]=> string(1) "C" } [5]=> object(ReflectionMethod)#%d (2) { ["name"]=> string(7) "privsf2" ["class"]=> string(1) "C" } }
{ "pile_set_name": "Github" }
write('GitHub is for everyone').
{ "pile_set_name": "Github" }
Miek Gieben <[email protected]>
{ "pile_set_name": "Github" }
use quartz; use std::{io, ops, mem}; use std::marker::PhantomData; use std::sync::{Arc, Mutex, TryLockError}; pub struct Capturer { inner: quartz::Capturer, frame: Arc<Mutex<Option<quartz::Frame>>> } impl Capturer { pub fn new(display: Display) -> io::Result<Capturer> { let frame = Arc::new(Mutex::new(None)); let f = frame.clone(); let inner = quartz::Capturer::new( display.0, display.width(), display.height(), quartz::PixelFormat::Argb8888, Default::default(), move |inner| { if let Ok(mut f) = f.lock() { *f = Some(inner); } } ).map_err(|_| io::Error::from(io::ErrorKind::Other))?; Ok(Capturer { inner, frame }) } pub fn width(&self) -> usize { self.inner.width() } pub fn height(&self) -> usize { self.inner.height() } pub fn frame<'a>(&'a mut self) -> io::Result<Frame<'a>> { match self.frame.try_lock() { Ok(mut handle) => { let mut frame = None; mem::swap(&mut frame, &mut handle); match frame { Some(frame) => Ok(Frame(frame, PhantomData)), None => Err(io::ErrorKind::WouldBlock.into()) } } Err(TryLockError::WouldBlock) => Err(io::ErrorKind::WouldBlock.into()), Err(TryLockError::Poisoned(..)) => Err(io::ErrorKind::Other.into()) } } } pub struct Frame<'a>( quartz::Frame, PhantomData<&'a [u8]> ); impl<'a> ops::Deref for Frame<'a> { type Target = [u8]; fn deref(&self) -> &[u8] { &*self.0 } } pub struct Display(quartz::Display); impl Display { pub fn primary() -> io::Result<Display> { Ok(Display(quartz::Display::primary())) } pub fn all() -> io::Result<Vec<Display>> { Ok( quartz::Display::online() .map_err(|_| io::Error::from(io::ErrorKind::Other))? .into_iter() .map(Display) .collect() ) } pub fn width(&self) -> usize { self.0.width() } pub fn height(&self) -> usize { self.0.height() } }
{ "pile_set_name": "Github" }
/* Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov * * 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. */ using System; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace AlphaFS.UnitTest { public partial class AlphaFS_Shell32Test { [TestMethod] public void AlphaFS_Shell32_UrlIs() { var urlPath = Alphaleonis.Win32.Filesystem.Shell32.UrlCreateFromPath(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)); var filePath = Alphaleonis.Win32.Filesystem.Shell32.PathCreateFromUrlAlloc(urlPath); Assert.IsTrue(Alphaleonis.Win32.Filesystem.Shell32.UrlIsFileUrl(urlPath)); Assert.IsFalse(Alphaleonis.Win32.Filesystem.Shell32.UrlIsFileUrl(filePath)); } } }
{ "pile_set_name": "Github" }
/* * Copyright 2014, Michael Ellerman, IBM Corp. * Licensed under GPLv2. */ #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <sys/types.h> #include <sys/wait.h> #include <unistd.h> #include "ebb.h" /* * Tests we can setup an EBB on our child. Nothing interesting happens, because * even though the event is enabled and running the child hasn't enabled the * actual delivery of the EBBs. */ static int victim_child(union pipe read_pipe, union pipe write_pipe) { int i; FAIL_IF(wait_for_parent(read_pipe)); FAIL_IF(notify_parent(write_pipe)); /* Parent creates EBB event */ FAIL_IF(wait_for_parent(read_pipe)); FAIL_IF(notify_parent(write_pipe)); /* Check the EBB is enabled by writing PMC1 */ write_pmc1(); /* EBB event is enabled here */ for (i = 0; i < 1000000; i++) ; return 0; } int ebb_on_child(void) { union pipe read_pipe, write_pipe; struct event event; pid_t pid; SKIP_IF(!ebb_is_supported()); FAIL_IF(pipe(read_pipe.fds) == -1); FAIL_IF(pipe(write_pipe.fds) == -1); pid = fork(); if (pid == 0) { /* NB order of pipes looks reversed */ exit(victim_child(write_pipe, read_pipe)); } FAIL_IF(sync_with_child(read_pipe, write_pipe)); /* Child is running now */ event_init_named(&event, 0x1001e, "cycles"); event_leader_ebb_init(&event); event.attr.exclude_kernel = 1; event.attr.exclude_hv = 1; event.attr.exclude_idle = 1; FAIL_IF(event_open_with_pid(&event, pid)); FAIL_IF(ebb_event_enable(&event)); FAIL_IF(sync_with_child(read_pipe, write_pipe)); /* Child should just exit happily */ FAIL_IF(wait_for_child(pid)); event_close(&event); return 0; } int main(void) { return test_harness(ebb_on_child, "ebb_on_child"); }
{ "pile_set_name": "Github" }
<?php namespace Composer\Installers\Test; use Composer\Installers\PimcoreInstaller; use Composer\Package\Package; use Composer\Composer; class PimcoreInstallerTest extends TestCase { private $composer; private $io; /** * setUp * * @return void */ public function setUp() { $this->package = new Package('CamelCased', '1.0', '1.0'); $this->io = $this->getMock('Composer\IO\PackageInterface'); $this->composer = new Composer(); } /** * testInflectPackageVars * * @return void */ public function testInflectPackageVars() { $installer = new PimcoreInstaller($this->package, $this->composer); $result = $installer->inflectPackageVars(array('name' => 'CamelCased')); $this->assertEquals($result, array('name' => 'CamelCased')); $installer = new PimcoreInstaller($this->package, $this->composer); $result = $installer->inflectPackageVars(array('name' => 'with-dash')); $this->assertEquals($result, array('name' => 'WithDash')); $installer = new PimcoreInstaller($this->package, $this->composer); $result = $installer->inflectPackageVars(array('name' => 'with_underscore')); $this->assertEquals($result, array('name' => 'WithUnderscore')); } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <style xmlns="http://purl.org/net/xbiblio/csl" version="1.0" default-locale="en-US"> <!-- Elsevier, generated from "elsevier" metadata at https://github.com/citation-style-language/journals --> <info> <title>The Arts in Psychotherapy</title> <id>http://www.zotero.org/styles/the-arts-in-psychotherapy</id> <link href="http://www.zotero.org/styles/the-arts-in-psychotherapy" rel="self"/> <link href="http://www.zotero.org/styles/apa" rel="independent-parent"/> <category citation-format="author-date"/> <issn>0197-4556</issn> <updated>2018-02-16T12:00:00+00:00</updated> <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights> </info> </style>
{ "pile_set_name": "Github" }
/* * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package java.lang; /** * Thrown when the Java Virtual Machine detects a circularity in the * superclass hierarchy of a class being loaded. * * @author unascribed * @since 1.0 */ public class ClassCircularityError extends LinkageError { private static final long serialVersionUID = 1054362542914539689L; /** * Constructs a {@code ClassCircularityError} with no detail message. */ public ClassCircularityError() { super(); } /** * Constructs a {@code ClassCircularityError} with the specified detail * message. * * @param s * The detail message */ public ClassCircularityError(String s) { super(s); } }
{ "pile_set_name": "Github" }
# notes for this course can be found at: # https://deeplearningcourses.com/c/data-science-linear-regression-in-python # https://www.udemy.com/data-science-linear-regression-in-python from __future__ import print_function, division from builtins import range # Note: you may need to update your version of future # sudo pip install -U future import numpy as np import matplotlib.pyplot as plt N = 50 D = 50 # uniformly distributed numbers between -5, +5 X = (np.random.random((N, D)) - 0.5)*10 # true weights - only the first 3 dimensions of X affect Y true_w = np.array([1, 0.5, -0.5] + [0]*(D - 3)) # generate Y - add noise Y = X.dot(true_w) + np.random.randn(N)*0.5 # perform gradient descent to find w costs = [] # keep track of squared error cost w = np.random.randn(D) / np.sqrt(D) # randomly initialize w learning_rate = 0.001 l1 = 10.0 # Also try 5.0, 2.0, 1.0, 0.1 - what effect does it have on w? for t in range(500): # update w Yhat = X.dot(w) delta = Yhat - Y w = w - learning_rate*(X.T.dot(delta) + l1*np.sign(w)) # find and store the cost mse = delta.dot(delta) / N costs.append(mse) # plot the costs plt.plot(costs) plt.show() print("final w:", w) # plot our w vs true w plt.plot(true_w, label='true w') plt.plot(w, label='w_map') plt.legend() plt.show()
{ "pile_set_name": "Github" }
0 val_0 2008-04-08 11 0 val_0 2008-04-08 11 0 val_0 2008-04-08 11 0 val_0 2008-04-08 12 0 val_0 2008-04-08 12 0 val_0 2008-04-08 12 2 val_2 2008-04-08 11 2 val_2 2008-04-08 12 4 val_4 2008-04-08 11 4 val_4 2008-04-08 12 5 val_5 2008-04-08 11 5 val_5 2008-04-08 11 5 val_5 2008-04-08 11 5 val_5 2008-04-08 12 5 val_5 2008-04-08 12 5 val_5 2008-04-08 12 8 val_8 2008-04-08 11 8 val_8 2008-04-08 12 9 val_9 2008-04-08 11 9 val_9 2008-04-08 12 10 val_10 2008-04-08 11 10 val_10 2008-04-08 12 11 val_11 2008-04-08 11 11 val_11 2008-04-08 12 12 val_12 2008-04-08 11 12 val_12 2008-04-08 11 12 val_12 2008-04-08 12 12 val_12 2008-04-08 12 15 val_15 2008-04-08 11 15 val_15 2008-04-08 11 15 val_15 2008-04-08 12 15 val_15 2008-04-08 12 17 val_17 2008-04-08 11 17 val_17 2008-04-08 12 18 val_18 2008-04-08 11 18 val_18 2008-04-08 11 18 val_18 2008-04-08 12 18 val_18 2008-04-08 12 19 val_19 2008-04-08 11 19 val_19 2008-04-08 12 20 val_20 2008-04-08 11 20 val_20 2008-04-08 12 24 val_24 2008-04-08 11 24 val_24 2008-04-08 11 24 val_24 2008-04-08 12 24 val_24 2008-04-08 12 26 val_26 2008-04-08 11 26 val_26 2008-04-08 11 26 val_26 2008-04-08 12 26 val_26 2008-04-08 12 27 val_27 2008-04-08 11 27 val_27 2008-04-08 12 28 val_28 2008-04-08 11 28 val_28 2008-04-08 12 30 val_30 2008-04-08 11 30 val_30 2008-04-08 12 33 val_33 2008-04-08 11 33 val_33 2008-04-08 12 34 val_34 2008-04-08 11 34 val_34 2008-04-08 12 35 val_35 2008-04-08 11 35 val_35 2008-04-08 11 35 val_35 2008-04-08 11 35 val_35 2008-04-08 12 35 val_35 2008-04-08 12 35 val_35 2008-04-08 12 37 val_37 2008-04-08 11 37 val_37 2008-04-08 11 37 val_37 2008-04-08 12 37 val_37 2008-04-08 12 41 val_41 2008-04-08 11 41 val_41 2008-04-08 12 42 val_42 2008-04-08 11 42 val_42 2008-04-08 11 42 val_42 2008-04-08 12 42 val_42 2008-04-08 12 43 val_43 2008-04-08 11 43 val_43 2008-04-08 12 44 val_44 2008-04-08 11 44 val_44 2008-04-08 12 47 val_47 2008-04-08 11 47 val_47 2008-04-08 12 51 val_51 2008-04-08 11 51 val_51 2008-04-08 11 51 val_51 2008-04-08 12 51 val_51 2008-04-08 12 53 val_53 2008-04-08 11 53 val_53 2008-04-08 12 54 val_54 2008-04-08 11 54 val_54 2008-04-08 12 57 val_57 2008-04-08 11 57 val_57 2008-04-08 12 58 val_58 2008-04-08 11 58 val_58 2008-04-08 11 58 val_58 2008-04-08 12 58 val_58 2008-04-08 12 64 val_64 2008-04-08 11 64 val_64 2008-04-08 12 65 val_65 2008-04-08 11 65 val_65 2008-04-08 12 66 val_66 2008-04-08 11 66 val_66 2008-04-08 12 67 val_67 2008-04-08 11 67 val_67 2008-04-08 11 67 val_67 2008-04-08 12 67 val_67 2008-04-08 12 69 val_69 2008-04-08 11 69 val_69 2008-04-08 12 70 val_70 2008-04-08 11 70 val_70 2008-04-08 11 70 val_70 2008-04-08 11 70 val_70 2008-04-08 12 70 val_70 2008-04-08 12 70 val_70 2008-04-08 12 72 val_72 2008-04-08 11 72 val_72 2008-04-08 11 72 val_72 2008-04-08 12 72 val_72 2008-04-08 12 74 val_74 2008-04-08 11 74 val_74 2008-04-08 12 76 val_76 2008-04-08 11 76 val_76 2008-04-08 11 76 val_76 2008-04-08 12 76 val_76 2008-04-08 12 77 val_77 2008-04-08 11 77 val_77 2008-04-08 12 78 val_78 2008-04-08 11 78 val_78 2008-04-08 12 80 val_80 2008-04-08 11 80 val_80 2008-04-08 12 82 val_82 2008-04-08 11 82 val_82 2008-04-08 12 83 val_83 2008-04-08 11 83 val_83 2008-04-08 11 83 val_83 2008-04-08 12 83 val_83 2008-04-08 12 84 val_84 2008-04-08 11 84 val_84 2008-04-08 11 84 val_84 2008-04-08 12 84 val_84 2008-04-08 12 85 val_85 2008-04-08 11 85 val_85 2008-04-08 12 86 val_86 2008-04-08 11 86 val_86 2008-04-08 12 87 val_87 2008-04-08 11 87 val_87 2008-04-08 12 90 val_90 2008-04-08 11 90 val_90 2008-04-08 11 90 val_90 2008-04-08 11 90 val_90 2008-04-08 12 90 val_90 2008-04-08 12 90 val_90 2008-04-08 12 92 val_92 2008-04-08 11 92 val_92 2008-04-08 12 95 val_95 2008-04-08 11 95 val_95 2008-04-08 11 95 val_95 2008-04-08 12 95 val_95 2008-04-08 12 96 val_96 2008-04-08 11 96 val_96 2008-04-08 12 97 val_97 2008-04-08 11 97 val_97 2008-04-08 11 97 val_97 2008-04-08 12 97 val_97 2008-04-08 12 98 val_98 2008-04-08 11 98 val_98 2008-04-08 11 98 val_98 2008-04-08 12 98 val_98 2008-04-08 12 100 val_100 2008-04-08 11 100 val_100 2008-04-08 11 100 val_100 2008-04-08 12 100 val_100 2008-04-08 12 103 val_103 2008-04-08 11 103 val_103 2008-04-08 11 103 val_103 2008-04-08 12 103 val_103 2008-04-08 12 104 val_104 2008-04-08 11 104 val_104 2008-04-08 11 104 val_104 2008-04-08 12 104 val_104 2008-04-08 12 105 val_105 2008-04-08 11 105 val_105 2008-04-08 12 111 val_111 2008-04-08 11 111 val_111 2008-04-08 12 113 val_113 2008-04-08 11 113 val_113 2008-04-08 11 113 val_113 2008-04-08 12 113 val_113 2008-04-08 12 114 val_114 2008-04-08 11 114 val_114 2008-04-08 12 116 val_116 2008-04-08 11 116 val_116 2008-04-08 12 118 val_118 2008-04-08 11 118 val_118 2008-04-08 11 118 val_118 2008-04-08 12 118 val_118 2008-04-08 12 119 val_119 2008-04-08 11 119 val_119 2008-04-08 11 119 val_119 2008-04-08 11 119 val_119 2008-04-08 12 119 val_119 2008-04-08 12 119 val_119 2008-04-08 12 120 val_120 2008-04-08 11 120 val_120 2008-04-08 11 120 val_120 2008-04-08 12 120 val_120 2008-04-08 12 125 val_125 2008-04-08 11 125 val_125 2008-04-08 11 125 val_125 2008-04-08 12 125 val_125 2008-04-08 12 126 val_126 2008-04-08 11 126 val_126 2008-04-08 12 128 val_128 2008-04-08 11 128 val_128 2008-04-08 11 128 val_128 2008-04-08 11 128 val_128 2008-04-08 12 128 val_128 2008-04-08 12 128 val_128 2008-04-08 12 129 val_129 2008-04-08 11 129 val_129 2008-04-08 11 129 val_129 2008-04-08 12 129 val_129 2008-04-08 12 131 val_131 2008-04-08 11 131 val_131 2008-04-08 12 133 val_133 2008-04-08 11 133 val_133 2008-04-08 12 134 val_134 2008-04-08 11 134 val_134 2008-04-08 11 134 val_134 2008-04-08 12 134 val_134 2008-04-08 12 136 val_136 2008-04-08 11 136 val_136 2008-04-08 12 137 val_137 2008-04-08 11 137 val_137 2008-04-08 11 137 val_137 2008-04-08 12 137 val_137 2008-04-08 12 138 val_138 2008-04-08 11 138 val_138 2008-04-08 11 138 val_138 2008-04-08 11 138 val_138 2008-04-08 11 138 val_138 2008-04-08 12 138 val_138 2008-04-08 12 138 val_138 2008-04-08 12 138 val_138 2008-04-08 12 143 val_143 2008-04-08 11 143 val_143 2008-04-08 12 145 val_145 2008-04-08 11 145 val_145 2008-04-08 12 146 val_146 2008-04-08 11 146 val_146 2008-04-08 11 146 val_146 2008-04-08 12 146 val_146 2008-04-08 12 149 val_149 2008-04-08 11 149 val_149 2008-04-08 11 149 val_149 2008-04-08 12 149 val_149 2008-04-08 12 150 val_150 2008-04-08 11 150 val_150 2008-04-08 12 152 val_152 2008-04-08 11 152 val_152 2008-04-08 11 152 val_152 2008-04-08 12 152 val_152 2008-04-08 12 153 val_153 2008-04-08 11 153 val_153 2008-04-08 12 155 val_155 2008-04-08 11 155 val_155 2008-04-08 12 156 val_156 2008-04-08 11 156 val_156 2008-04-08 12 157 val_157 2008-04-08 11 157 val_157 2008-04-08 12 158 val_158 2008-04-08 11 158 val_158 2008-04-08 12 160 val_160 2008-04-08 11 160 val_160 2008-04-08 12 162 val_162 2008-04-08 11 162 val_162 2008-04-08 12 163 val_163 2008-04-08 11 163 val_163 2008-04-08 12 164 val_164 2008-04-08 11 164 val_164 2008-04-08 11 164 val_164 2008-04-08 12 164 val_164 2008-04-08 12 165 val_165 2008-04-08 11 165 val_165 2008-04-08 11 165 val_165 2008-04-08 12 165 val_165 2008-04-08 12 166 val_166 2008-04-08 11 166 val_166 2008-04-08 12 167 val_167 2008-04-08 11 167 val_167 2008-04-08 11 167 val_167 2008-04-08 11 167 val_167 2008-04-08 12 167 val_167 2008-04-08 12 167 val_167 2008-04-08 12 168 val_168 2008-04-08 11 168 val_168 2008-04-08 12 169 val_169 2008-04-08 11 169 val_169 2008-04-08 11 169 val_169 2008-04-08 11 169 val_169 2008-04-08 11 169 val_169 2008-04-08 12 169 val_169 2008-04-08 12 169 val_169 2008-04-08 12 169 val_169 2008-04-08 12 170 val_170 2008-04-08 11 170 val_170 2008-04-08 12 172 val_172 2008-04-08 11 172 val_172 2008-04-08 11 172 val_172 2008-04-08 12 172 val_172 2008-04-08 12 174 val_174 2008-04-08 11 174 val_174 2008-04-08 11 174 val_174 2008-04-08 12 174 val_174 2008-04-08 12 175 val_175 2008-04-08 11 175 val_175 2008-04-08 11 175 val_175 2008-04-08 12 175 val_175 2008-04-08 12 176 val_176 2008-04-08 11 176 val_176 2008-04-08 11 176 val_176 2008-04-08 12 176 val_176 2008-04-08 12 177 val_177 2008-04-08 11 177 val_177 2008-04-08 12 178 val_178 2008-04-08 11 178 val_178 2008-04-08 12 179 val_179 2008-04-08 11 179 val_179 2008-04-08 11 179 val_179 2008-04-08 12 179 val_179 2008-04-08 12 180 val_180 2008-04-08 11 180 val_180 2008-04-08 12 181 val_181 2008-04-08 11 181 val_181 2008-04-08 12 183 val_183 2008-04-08 11 183 val_183 2008-04-08 12 186 val_186 2008-04-08 11 186 val_186 2008-04-08 12 187 val_187 2008-04-08 11 187 val_187 2008-04-08 11 187 val_187 2008-04-08 11 187 val_187 2008-04-08 12 187 val_187 2008-04-08 12 187 val_187 2008-04-08 12 189 val_189 2008-04-08 11 189 val_189 2008-04-08 12 190 val_190 2008-04-08 11 190 val_190 2008-04-08 12 191 val_191 2008-04-08 11 191 val_191 2008-04-08 11 191 val_191 2008-04-08 12 191 val_191 2008-04-08 12 192 val_192 2008-04-08 11 192 val_192 2008-04-08 12 193 val_193 2008-04-08 11 193 val_193 2008-04-08 11 193 val_193 2008-04-08 11 193 val_193 2008-04-08 12 193 val_193 2008-04-08 12 193 val_193 2008-04-08 12 194 val_194 2008-04-08 11 194 val_194 2008-04-08 12 195 val_195 2008-04-08 11 195 val_195 2008-04-08 11 195 val_195 2008-04-08 12 195 val_195 2008-04-08 12 196 val_196 2008-04-08 11 196 val_196 2008-04-08 12 197 val_197 2008-04-08 11 197 val_197 2008-04-08 11 197 val_197 2008-04-08 12 197 val_197 2008-04-08 12 199 val_199 2008-04-08 11 199 val_199 2008-04-08 11 199 val_199 2008-04-08 11 199 val_199 2008-04-08 12 199 val_199 2008-04-08 12 199 val_199 2008-04-08 12 200 val_200 2008-04-08 11 200 val_200 2008-04-08 11 200 val_200 2008-04-08 12 200 val_200 2008-04-08 12 201 val_201 2008-04-08 11 201 val_201 2008-04-08 12 202 val_202 2008-04-08 11 202 val_202 2008-04-08 12 203 val_203 2008-04-08 11 203 val_203 2008-04-08 11 203 val_203 2008-04-08 12 203 val_203 2008-04-08 12 205 val_205 2008-04-08 11 205 val_205 2008-04-08 11 205 val_205 2008-04-08 12 205 val_205 2008-04-08 12 207 val_207 2008-04-08 11 207 val_207 2008-04-08 11 207 val_207 2008-04-08 12 207 val_207 2008-04-08 12 208 val_208 2008-04-08 11 208 val_208 2008-04-08 11 208 val_208 2008-04-08 11 208 val_208 2008-04-08 12 208 val_208 2008-04-08 12 208 val_208 2008-04-08 12 209 val_209 2008-04-08 11 209 val_209 2008-04-08 11 209 val_209 2008-04-08 12 209 val_209 2008-04-08 12 213 val_213 2008-04-08 11 213 val_213 2008-04-08 11 213 val_213 2008-04-08 12 213 val_213 2008-04-08 12 214 val_214 2008-04-08 11 214 val_214 2008-04-08 12 216 val_216 2008-04-08 11 216 val_216 2008-04-08 11 216 val_216 2008-04-08 12 216 val_216 2008-04-08 12 217 val_217 2008-04-08 11 217 val_217 2008-04-08 11 217 val_217 2008-04-08 12 217 val_217 2008-04-08 12 218 val_218 2008-04-08 11 218 val_218 2008-04-08 12 219 val_219 2008-04-08 11 219 val_219 2008-04-08 11 219 val_219 2008-04-08 12 219 val_219 2008-04-08 12 221 val_221 2008-04-08 11 221 val_221 2008-04-08 11 221 val_221 2008-04-08 12 221 val_221 2008-04-08 12 222 val_222 2008-04-08 11 222 val_222 2008-04-08 12 223 val_223 2008-04-08 11 223 val_223 2008-04-08 11 223 val_223 2008-04-08 12 223 val_223 2008-04-08 12 224 val_224 2008-04-08 11 224 val_224 2008-04-08 11 224 val_224 2008-04-08 12 224 val_224 2008-04-08 12 226 val_226 2008-04-08 11 226 val_226 2008-04-08 12 228 val_228 2008-04-08 11 228 val_228 2008-04-08 12 229 val_229 2008-04-08 11 229 val_229 2008-04-08 11 229 val_229 2008-04-08 12 229 val_229 2008-04-08 12 230 val_230 2008-04-08 11 230 val_230 2008-04-08 11 230 val_230 2008-04-08 11 230 val_230 2008-04-08 11 230 val_230 2008-04-08 11 230 val_230 2008-04-08 12 230 val_230 2008-04-08 12 230 val_230 2008-04-08 12 230 val_230 2008-04-08 12 230 val_230 2008-04-08 12 233 val_233 2008-04-08 11 233 val_233 2008-04-08 11 233 val_233 2008-04-08 12 233 val_233 2008-04-08 12 235 val_235 2008-04-08 11 235 val_235 2008-04-08 12 237 val_237 2008-04-08 11 237 val_237 2008-04-08 11 237 val_237 2008-04-08 12 237 val_237 2008-04-08 12 238 val_238 2008-04-08 11 238 val_238 2008-04-08 11 238 val_238 2008-04-08 12 238 val_238 2008-04-08 12 239 val_239 2008-04-08 11 239 val_239 2008-04-08 11 239 val_239 2008-04-08 12 239 val_239 2008-04-08 12 241 val_241 2008-04-08 11 241 val_241 2008-04-08 12 242 val_242 2008-04-08 11 242 val_242 2008-04-08 11 242 val_242 2008-04-08 12 242 val_242 2008-04-08 12 244 val_244 2008-04-08 11 244 val_244 2008-04-08 12 247 val_247 2008-04-08 11 247 val_247 2008-04-08 12 248 val_248 2008-04-08 11 248 val_248 2008-04-08 12 249 val_249 2008-04-08 11 249 val_249 2008-04-08 12 252 val_252 2008-04-08 11 252 val_252 2008-04-08 12 255 val_255 2008-04-08 11 255 val_255 2008-04-08 11 255 val_255 2008-04-08 12 255 val_255 2008-04-08 12 256 val_256 2008-04-08 11 256 val_256 2008-04-08 11 256 val_256 2008-04-08 12 256 val_256 2008-04-08 12 257 val_257 2008-04-08 11 257 val_257 2008-04-08 12 258 val_258 2008-04-08 11 258 val_258 2008-04-08 12 260 val_260 2008-04-08 11 260 val_260 2008-04-08 12 262 val_262 2008-04-08 11 262 val_262 2008-04-08 12 263 val_263 2008-04-08 11 263 val_263 2008-04-08 12 265 val_265 2008-04-08 11 265 val_265 2008-04-08 11 265 val_265 2008-04-08 12 265 val_265 2008-04-08 12 266 val_266 2008-04-08 11 266 val_266 2008-04-08 12 272 val_272 2008-04-08 11 272 val_272 2008-04-08 11 272 val_272 2008-04-08 12 272 val_272 2008-04-08 12 273 val_273 2008-04-08 11 273 val_273 2008-04-08 11 273 val_273 2008-04-08 11 273 val_273 2008-04-08 12 273 val_273 2008-04-08 12 273 val_273 2008-04-08 12 274 val_274 2008-04-08 11 274 val_274 2008-04-08 12 275 val_275 2008-04-08 11 275 val_275 2008-04-08 12 277 val_277 2008-04-08 11 277 val_277 2008-04-08 11 277 val_277 2008-04-08 11 277 val_277 2008-04-08 11 277 val_277 2008-04-08 12 277 val_277 2008-04-08 12 277 val_277 2008-04-08 12 277 val_277 2008-04-08 12 278 val_278 2008-04-08 11 278 val_278 2008-04-08 11 278 val_278 2008-04-08 12 278 val_278 2008-04-08 12 280 val_280 2008-04-08 11 280 val_280 2008-04-08 11 280 val_280 2008-04-08 12 280 val_280 2008-04-08 12 281 val_281 2008-04-08 11 281 val_281 2008-04-08 11 281 val_281 2008-04-08 12 281 val_281 2008-04-08 12 282 val_282 2008-04-08 11 282 val_282 2008-04-08 11 282 val_282 2008-04-08 12 282 val_282 2008-04-08 12 283 val_283 2008-04-08 11 283 val_283 2008-04-08 12 284 val_284 2008-04-08 11 284 val_284 2008-04-08 12 285 val_285 2008-04-08 11 285 val_285 2008-04-08 12 286 val_286 2008-04-08 11 286 val_286 2008-04-08 12 287 val_287 2008-04-08 11 287 val_287 2008-04-08 12 288 val_288 2008-04-08 11 288 val_288 2008-04-08 11 288 val_288 2008-04-08 12 288 val_288 2008-04-08 12 289 val_289 2008-04-08 11 289 val_289 2008-04-08 12 291 val_291 2008-04-08 11 291 val_291 2008-04-08 12 292 val_292 2008-04-08 11 292 val_292 2008-04-08 12 296 val_296 2008-04-08 11 296 val_296 2008-04-08 12 298 val_298 2008-04-08 11 298 val_298 2008-04-08 11 298 val_298 2008-04-08 11 298 val_298 2008-04-08 12 298 val_298 2008-04-08 12 298 val_298 2008-04-08 12 302 val_302 2008-04-08 11 302 val_302 2008-04-08 12 305 val_305 2008-04-08 11 305 val_305 2008-04-08 12 306 val_306 2008-04-08 11 306 val_306 2008-04-08 12 307 val_307 2008-04-08 11 307 val_307 2008-04-08 11 307 val_307 2008-04-08 12 307 val_307 2008-04-08 12 308 val_308 2008-04-08 11 308 val_308 2008-04-08 12 309 val_309 2008-04-08 11 309 val_309 2008-04-08 11 309 val_309 2008-04-08 12 309 val_309 2008-04-08 12 310 val_310 2008-04-08 11 310 val_310 2008-04-08 12 311 val_311 2008-04-08 11 311 val_311 2008-04-08 11 311 val_311 2008-04-08 11 311 val_311 2008-04-08 12 311 val_311 2008-04-08 12 311 val_311 2008-04-08 12 315 val_315 2008-04-08 11 315 val_315 2008-04-08 12 316 val_316 2008-04-08 11 316 val_316 2008-04-08 11 316 val_316 2008-04-08 11 316 val_316 2008-04-08 12 316 val_316 2008-04-08 12 316 val_316 2008-04-08 12 317 val_317 2008-04-08 11 317 val_317 2008-04-08 11 317 val_317 2008-04-08 12 317 val_317 2008-04-08 12 318 val_318 2008-04-08 11 318 val_318 2008-04-08 11 318 val_318 2008-04-08 11 318 val_318 2008-04-08 12 318 val_318 2008-04-08 12 318 val_318 2008-04-08 12 321 val_321 2008-04-08 11 321 val_321 2008-04-08 11 321 val_321 2008-04-08 12 321 val_321 2008-04-08 12 322 val_322 2008-04-08 11 322 val_322 2008-04-08 11 322 val_322 2008-04-08 12 322 val_322 2008-04-08 12 323 val_323 2008-04-08 11 323 val_323 2008-04-08 12 325 val_325 2008-04-08 11 325 val_325 2008-04-08 11 325 val_325 2008-04-08 12 325 val_325 2008-04-08 12 327 val_327 2008-04-08 11 327 val_327 2008-04-08 11 327 val_327 2008-04-08 11 327 val_327 2008-04-08 12 327 val_327 2008-04-08 12 327 val_327 2008-04-08 12 331 val_331 2008-04-08 11 331 val_331 2008-04-08 11 331 val_331 2008-04-08 12 331 val_331 2008-04-08 12 332 val_332 2008-04-08 11 332 val_332 2008-04-08 12 333 val_333 2008-04-08 11 333 val_333 2008-04-08 11 333 val_333 2008-04-08 12 333 val_333 2008-04-08 12 335 val_335 2008-04-08 11 335 val_335 2008-04-08 12 336 val_336 2008-04-08 11 336 val_336 2008-04-08 12 338 val_338 2008-04-08 11 338 val_338 2008-04-08 12 339 val_339 2008-04-08 11 339 val_339 2008-04-08 12 341 val_341 2008-04-08 11 341 val_341 2008-04-08 12 342 val_342 2008-04-08 11 342 val_342 2008-04-08 11 342 val_342 2008-04-08 12 342 val_342 2008-04-08 12 344 val_344 2008-04-08 11 344 val_344 2008-04-08 11 344 val_344 2008-04-08 12 344 val_344 2008-04-08 12 345 val_345 2008-04-08 11 345 val_345 2008-04-08 12 348 val_348 2008-04-08 11 348 val_348 2008-04-08 11 348 val_348 2008-04-08 11 348 val_348 2008-04-08 11 348 val_348 2008-04-08 11 348 val_348 2008-04-08 12 348 val_348 2008-04-08 12 348 val_348 2008-04-08 12 348 val_348 2008-04-08 12 348 val_348 2008-04-08 12 351 val_351 2008-04-08 11 351 val_351 2008-04-08 12 353 val_353 2008-04-08 11 353 val_353 2008-04-08 11 353 val_353 2008-04-08 12 353 val_353 2008-04-08 12 356 val_356 2008-04-08 11 356 val_356 2008-04-08 12 360 val_360 2008-04-08 11 360 val_360 2008-04-08 12 362 val_362 2008-04-08 11 362 val_362 2008-04-08 12 364 val_364 2008-04-08 11 364 val_364 2008-04-08 12 365 val_365 2008-04-08 11 365 val_365 2008-04-08 12 366 val_366 2008-04-08 11 366 val_366 2008-04-08 12 367 val_367 2008-04-08 11 367 val_367 2008-04-08 11 367 val_367 2008-04-08 12 367 val_367 2008-04-08 12 368 val_368 2008-04-08 11 368 val_368 2008-04-08 12 369 val_369 2008-04-08 11 369 val_369 2008-04-08 11 369 val_369 2008-04-08 11 369 val_369 2008-04-08 12 369 val_369 2008-04-08 12 369 val_369 2008-04-08 12 373 val_373 2008-04-08 11 373 val_373 2008-04-08 12 374 val_374 2008-04-08 11 374 val_374 2008-04-08 12 375 val_375 2008-04-08 11 375 val_375 2008-04-08 12 377 val_377 2008-04-08 11 377 val_377 2008-04-08 12 378 val_378 2008-04-08 11 378 val_378 2008-04-08 12 379 val_379 2008-04-08 11 379 val_379 2008-04-08 12 382 val_382 2008-04-08 11 382 val_382 2008-04-08 11 382 val_382 2008-04-08 12 382 val_382 2008-04-08 12 384 val_384 2008-04-08 11 384 val_384 2008-04-08 11 384 val_384 2008-04-08 11 384 val_384 2008-04-08 12 384 val_384 2008-04-08 12 384 val_384 2008-04-08 12 386 val_386 2008-04-08 11 386 val_386 2008-04-08 12 389 val_389 2008-04-08 11 389 val_389 2008-04-08 12 392 val_392 2008-04-08 11 392 val_392 2008-04-08 12 393 val_393 2008-04-08 11 393 val_393 2008-04-08 12 394 val_394 2008-04-08 11 394 val_394 2008-04-08 12 395 val_395 2008-04-08 11 395 val_395 2008-04-08 11 395 val_395 2008-04-08 12 395 val_395 2008-04-08 12 396 val_396 2008-04-08 11 396 val_396 2008-04-08 11 396 val_396 2008-04-08 11 396 val_396 2008-04-08 12 396 val_396 2008-04-08 12 396 val_396 2008-04-08 12 397 val_397 2008-04-08 11 397 val_397 2008-04-08 11 397 val_397 2008-04-08 12 397 val_397 2008-04-08 12 399 val_399 2008-04-08 11 399 val_399 2008-04-08 11 399 val_399 2008-04-08 12 399 val_399 2008-04-08 12 400 val_400 2008-04-08 11 400 val_400 2008-04-08 12 401 val_401 2008-04-08 11 401 val_401 2008-04-08 11 401 val_401 2008-04-08 11 401 val_401 2008-04-08 11 401 val_401 2008-04-08 11 401 val_401 2008-04-08 12 401 val_401 2008-04-08 12 401 val_401 2008-04-08 12 401 val_401 2008-04-08 12 401 val_401 2008-04-08 12 402 val_402 2008-04-08 11 402 val_402 2008-04-08 12 403 val_403 2008-04-08 11 403 val_403 2008-04-08 11 403 val_403 2008-04-08 11 403 val_403 2008-04-08 12 403 val_403 2008-04-08 12 403 val_403 2008-04-08 12 404 val_404 2008-04-08 11 404 val_404 2008-04-08 11 404 val_404 2008-04-08 12 404 val_404 2008-04-08 12 406 val_406 2008-04-08 11 406 val_406 2008-04-08 11 406 val_406 2008-04-08 11 406 val_406 2008-04-08 11 406 val_406 2008-04-08 12 406 val_406 2008-04-08 12 406 val_406 2008-04-08 12 406 val_406 2008-04-08 12 407 val_407 2008-04-08 11 407 val_407 2008-04-08 12 409 val_409 2008-04-08 11 409 val_409 2008-04-08 11 409 val_409 2008-04-08 11 409 val_409 2008-04-08 12 409 val_409 2008-04-08 12 409 val_409 2008-04-08 12 411 val_411 2008-04-08 11 411 val_411 2008-04-08 12 413 val_413 2008-04-08 11 413 val_413 2008-04-08 11 413 val_413 2008-04-08 12 413 val_413 2008-04-08 12 414 val_414 2008-04-08 11 414 val_414 2008-04-08 11 414 val_414 2008-04-08 12 414 val_414 2008-04-08 12 417 val_417 2008-04-08 11 417 val_417 2008-04-08 11 417 val_417 2008-04-08 11 417 val_417 2008-04-08 12 417 val_417 2008-04-08 12 417 val_417 2008-04-08 12 418 val_418 2008-04-08 11 418 val_418 2008-04-08 12 419 val_419 2008-04-08 11 419 val_419 2008-04-08 12 421 val_421 2008-04-08 11 421 val_421 2008-04-08 12 424 val_424 2008-04-08 11 424 val_424 2008-04-08 11 424 val_424 2008-04-08 12 424 val_424 2008-04-08 12 427 val_427 2008-04-08 11 427 val_427 2008-04-08 12 429 val_429 2008-04-08 11 429 val_429 2008-04-08 11 429 val_429 2008-04-08 12 429 val_429 2008-04-08 12 430 val_430 2008-04-08 11 430 val_430 2008-04-08 11 430 val_430 2008-04-08 11 430 val_430 2008-04-08 12 430 val_430 2008-04-08 12 430 val_430 2008-04-08 12 431 val_431 2008-04-08 11 431 val_431 2008-04-08 11 431 val_431 2008-04-08 11 431 val_431 2008-04-08 12 431 val_431 2008-04-08 12 431 val_431 2008-04-08 12 432 val_432 2008-04-08 11 432 val_432 2008-04-08 12 435 val_435 2008-04-08 11 435 val_435 2008-04-08 12 436 val_436 2008-04-08 11 436 val_436 2008-04-08 12 437 val_437 2008-04-08 11 437 val_437 2008-04-08 12 438 val_438 2008-04-08 11 438 val_438 2008-04-08 11 438 val_438 2008-04-08 11 438 val_438 2008-04-08 12 438 val_438 2008-04-08 12 438 val_438 2008-04-08 12 439 val_439 2008-04-08 11 439 val_439 2008-04-08 11 439 val_439 2008-04-08 12 439 val_439 2008-04-08 12 443 val_443 2008-04-08 11 443 val_443 2008-04-08 12 444 val_444 2008-04-08 11 444 val_444 2008-04-08 12 446 val_446 2008-04-08 11 446 val_446 2008-04-08 12 448 val_448 2008-04-08 11 448 val_448 2008-04-08 12 449 val_449 2008-04-08 11 449 val_449 2008-04-08 12 452 val_452 2008-04-08 11 452 val_452 2008-04-08 12 453 val_453 2008-04-08 11 453 val_453 2008-04-08 12 454 val_454 2008-04-08 11 454 val_454 2008-04-08 11 454 val_454 2008-04-08 11 454 val_454 2008-04-08 12 454 val_454 2008-04-08 12 454 val_454 2008-04-08 12 455 val_455 2008-04-08 11 455 val_455 2008-04-08 12 457 val_457 2008-04-08 11 457 val_457 2008-04-08 12 458 val_458 2008-04-08 11 458 val_458 2008-04-08 11 458 val_458 2008-04-08 12 458 val_458 2008-04-08 12 459 val_459 2008-04-08 11 459 val_459 2008-04-08 11 459 val_459 2008-04-08 12 459 val_459 2008-04-08 12 460 val_460 2008-04-08 11 460 val_460 2008-04-08 12 462 val_462 2008-04-08 11 462 val_462 2008-04-08 11 462 val_462 2008-04-08 12 462 val_462 2008-04-08 12 463 val_463 2008-04-08 11 463 val_463 2008-04-08 11 463 val_463 2008-04-08 12 463 val_463 2008-04-08 12 466 val_466 2008-04-08 11 466 val_466 2008-04-08 11 466 val_466 2008-04-08 11 466 val_466 2008-04-08 12 466 val_466 2008-04-08 12 466 val_466 2008-04-08 12 467 val_467 2008-04-08 11 467 val_467 2008-04-08 12 468 val_468 2008-04-08 11 468 val_468 2008-04-08 11 468 val_468 2008-04-08 11 468 val_468 2008-04-08 11 468 val_468 2008-04-08 12 468 val_468 2008-04-08 12 468 val_468 2008-04-08 12 468 val_468 2008-04-08 12 469 val_469 2008-04-08 11 469 val_469 2008-04-08 11 469 val_469 2008-04-08 11 469 val_469 2008-04-08 11 469 val_469 2008-04-08 11 469 val_469 2008-04-08 12 469 val_469 2008-04-08 12 469 val_469 2008-04-08 12 469 val_469 2008-04-08 12 469 val_469 2008-04-08 12 470 val_470 2008-04-08 11 470 val_470 2008-04-08 12 472 val_472 2008-04-08 11 472 val_472 2008-04-08 12 475 val_475 2008-04-08 11 475 val_475 2008-04-08 12 477 val_477 2008-04-08 11 477 val_477 2008-04-08 12 478 val_478 2008-04-08 11 478 val_478 2008-04-08 11 478 val_478 2008-04-08 12 478 val_478 2008-04-08 12 479 val_479 2008-04-08 11 479 val_479 2008-04-08 12 480 val_480 2008-04-08 11 480 val_480 2008-04-08 11 480 val_480 2008-04-08 11 480 val_480 2008-04-08 12 480 val_480 2008-04-08 12 480 val_480 2008-04-08 12 481 val_481 2008-04-08 11 481 val_481 2008-04-08 12 482 val_482 2008-04-08 11 482 val_482 2008-04-08 12 483 val_483 2008-04-08 11 483 val_483 2008-04-08 12 484 val_484 2008-04-08 11 484 val_484 2008-04-08 12 485 val_485 2008-04-08 11 485 val_485 2008-04-08 12 487 val_487 2008-04-08 11 487 val_487 2008-04-08 12 489 val_489 2008-04-08 11 489 val_489 2008-04-08 11 489 val_489 2008-04-08 11 489 val_489 2008-04-08 11 489 val_489 2008-04-08 12 489 val_489 2008-04-08 12 489 val_489 2008-04-08 12 489 val_489 2008-04-08 12 490 val_490 2008-04-08 11 490 val_490 2008-04-08 12 491 val_491 2008-04-08 11 491 val_491 2008-04-08 12 492 val_492 2008-04-08 11 492 val_492 2008-04-08 11 492 val_492 2008-04-08 12 492 val_492 2008-04-08 12 493 val_493 2008-04-08 11 493 val_493 2008-04-08 12 494 val_494 2008-04-08 11 494 val_494 2008-04-08 12 495 val_495 2008-04-08 11 495 val_495 2008-04-08 12 496 val_496 2008-04-08 11 496 val_496 2008-04-08 12 497 val_497 2008-04-08 11 497 val_497 2008-04-08 12 498 val_498 2008-04-08 11 498 val_498 2008-04-08 11 498 val_498 2008-04-08 11 498 val_498 2008-04-08 12 498 val_498 2008-04-08 12 498 val_498 2008-04-08 12
{ "pile_set_name": "Github" }
<?php /** * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. * * WindowsDeviceHealthState File * PHP version 7 * * @category Library * @package Microsoft.Graph * @copyright © Microsoft Corporation. All rights reserved. * @license https://opensource.org/licenses/MIT MIT License * @link https://graph.microsoft.com */ namespace Beta\Microsoft\Graph\Model; use Microsoft\Graph\Core\Enum; /** * WindowsDeviceHealthState class * * @category Model * @package Microsoft.Graph * @copyright © Microsoft Corporation. All rights reserved. * @license https://opensource.org/licenses/MIT MIT License * @link https://graph.microsoft.com */ class WindowsDeviceHealthState extends Enum { /** * The Enum WindowsDeviceHealthState */ const CLEAN = "clean"; const FULL_SCAN_PENDING = "fullScanPending"; const REBOOT_PENDING = "rebootPending"; const MANUAL_STEPS_PENDING = "manualStepsPending"; const OFFLINE_SCAN_PENDING = "offlineScanPending"; const CRITICAL = "critical"; }
{ "pile_set_name": "Github" }
# This code is supporting material for the book # Building Machine Learning Systems with Python # by Willi Richert and Luis Pedro Coelho # published by PACKT Publishing # # It is made available under the MIT License import milksets.seeds def save_as_tsv(fname, module): features, labels = module.load() nlabels = [module.label_names[ell] for ell in labels] with open(fname, 'w') as ofile: for f, n in zip(features, nlabels): print >>ofile, "\t".join(map(str, f) + [n]) save_as_tsv('seeds.tsv', milksets.seeds)
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:apollo="http://www.ctrip.com/schema/apollo" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.ctrip.com/schema/apollo http://www.ctrip.com/schema/apollo.xsd"> <apollo:config namespaces="FX.apollo,application"/> <bean class="com.ctrip.framework.apollo.spring.XmlConfigPlaceholderTest.TestXmlBean"> <property name="timeout" value="${timeout:100}"/> <property name="batch" value="${batch:200}"/> </bean> </beans>
{ "pile_set_name": "Github" }
<section class="insight-carousel"> {{#each this.sortedInsights as |insight|}} {{component insight.name options=insight.options entity=@entity }} {{/each}} </section>
{ "pile_set_name": "Github" }
<?php namespace Emtudo\Domains\Courses; use DB; use Emtudo\Domains\Courses\Resources\Rules\GroupRules; use Emtudo\Domains\Courses\Transformers\GroupTransformer; use Emtudo\Domains\TenantModel; use Emtudo\Domains\Tenants\Tenant; use Emtudo\Domains\Users\Student; use Emtudo\Domains\Users\Teacher; use Emtudo\Support\Shield\HasRules; use Illuminate\Database\Eloquent\SoftDeletes; /** * Class Group. */ class Group extends TenantModel { use HasRules, SoftDeletes; /** * @var string */ protected static $rulesFrom = GroupRules::class; /** * @var string */ protected $transformerClass = GroupTransformer::class; /** * The attributes that are mass assignable. * * @var array */ protected $fillable = [ 'course_id', 'label', 'year', 'max_students', 'pass_score', 'period', ]; public function tenant() { return $this->hasOneThroughSeveral([ Course::class, ]); } public function course() { return $this->belongsTo(Course::class); } public function enrollments() { return $this->hasMany(Enrollment::class); } public function getQuizzes($userId = null) { return Quiz::whereHas('schedule', function ($query) use ($userId) { $query->when($userId, function ($query) use ($userId) { $query->whereHas('skill', function ($query) use ($userId) { $query->where('teacher_id', $userId); }); }) ->whereHas('group', function ($query) { $query->where('id', $this->id); }); })->get(); } public function schedules() { return $this->hasMany(Schedule::class); } public function schedulesFromUser($user = null) { if ($user) { $userId = $user; } if ($user instanceof User) { $userId = $user->id; } if (!$user) { $userId = auth()->user()->id; } return $this->schedules() ->whereHas('skill', function ($query) use ($userId) { $query->where('teacher_id', $userId); }) ->with(['skill' => function ($query) use ($userId) { $query->where('teacher_id', $userId); }]) ->get(); } public function skills($where = []) { // model = group // groups.id = schedules.group_id // skills.id = schedules.skill_id $query = $this->belongsToMany( Skill::class, 'schedules' ); if (!empty($where)) { $query->where($where); } return $query; } public function skillsFromUser($user = null) { if ($user) { $userId = $user; } if ($user instanceof User) { $userId = $user->id; } if (!$user) { $userId = auth()->user()->id; } return $this->skills(['skills.teacher_id' => $userId])->get(); } public function subjects() { return $this->hasManyThroughSeveral([ Subject::class, Skill::class, Schedule::class => [ 'schedules.group_id' => 'groups.id', ], ]); } // public function subjects() // { // return $this->hasManyThroughSeveral( // Subject::class, // Skill::class, // Schedule::class, // null, // options -> group_id [schedules.group_id] (foreighKey from group) // null, // options -> group_id [schedules.group_id] (where schedules.group_id = ?) // null, // options -> subject_id [skills.subject_id] // null, // options -> id [groups.id] // true, // options -> distinct subjects [default: true] // []// options -> filters's subjects ['name' => 'Leandro'] // ); // } public function students() { return $this->belongsToMany(Student::class, 'enrollments') ->withTimestamps(); } public function teachers() { // model = group // groups.id = schedules.group_id // skills.id = schedules.skill_id // teachers.id = skills.teacher_id // $throughSecond = new $throughSecond(); // $through = new $through(); // // // $firstKey = $firstKey ?: $this->getForeignKey(); // // // $secondKey = $secondKey ?: $throughSecond->getForeignKey(); // // // $thirdKey = $thirdKey ?: ($through->getTable().'.'.$instance->getForeignKey()); // // // $localKey = $localKey ?: $this->getKeyName(); // // // $secondLocalKey = $secondLocalKey ?: $throughSecond->getKeyName(); // // $thirdLocalKey = $thirdLocalKey ?: ($instance->getTable().'.'.$instance->getKeyName()); return $this->hasManyThroughSeveral([ Teacher::class, Skill::class, Schedule::class => [ 'schedules.group_id' => 'groups.id', ], ]); } public function getAvailabelVacancies() { return (int) DB::SELECT( " select sum(available) as available from ( select (groups.max_students - count(enrollments.group_id)) as available from groups LEFT JOIN enrollments ON enrollments.group_id = groups.id WHERE groups.id = {$this->id} GROUP by groups.id) as groups " )[0]->available ?? 0; } // public function teachers() // { // // model = group // // groups.id = schedules.group_id // // skills.id = schedules.skill_id // // teachers.id = skills.teacher_id // // // $throughSecond = new $throughSecond(); // // $through = new $through(); // // // // // $firstKey = $firstKey ?: $this->getForeignKey(); // // // // // $secondKey = $secondKey ?: $throughSecond->getForeignKey(); // // // // // $thirdKey = $thirdKey ?: ($through->getTable().'.'.$instance->getForeignKey()); // // // // // $localKey = $localKey ?: $this->getKeyName(); // // // // // $secondLocalKey = $secondLocalKey ?: $throughSecond->getKeyName(); // // // // $thirdLocalKey = $thirdLocalKey ?: ($instance->getTable().'.'.$instance->getKeyName()); // // return $this->hasManyThroughSeveral( // Teacher::class, // Skill::class, // Schedule::class, // null, // options -> group_id [schedules.group_id] (foreighKey from group) // null, // options -> group_id [schedules.group_id] (where schedules.group_id = ?) // null, // options -> teacher_id [skills.teacher_id] // null, // options -> id [groups.id] // true, // options -> distinct teachers [default: true] // []// options -> filters's teachers ['name' => 'Leandro'] // ); // } }
{ "pile_set_name": "Github" }
// Code generated by zanzibar // @generated // Copyright (c) 2018 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // 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. package contactsendpoint import ( "context" "encoding/json" "fmt" "net/http" "runtime/debug" "github.com/opentracing/opentracing-go" "github.com/pkg/errors" zanzibar "github.com/uber/zanzibar/runtime" "go.uber.org/zap" "go.uber.org/zap/zapcore" endpointsIDlEndpointsContactsContacts "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/endpoints-idl/endpoints/contacts/contacts" customContacts "github.com/uber/zanzibar/examples/example-gateway/endpoints/contacts" defaultExample "github.com/uber/zanzibar/examples/example-gateway/middlewares/default/default_example" defaultExample2 "github.com/uber/zanzibar/examples/example-gateway/middlewares/default/default_example2" module "github.com/uber/zanzibar/examples/example-gateway/build/endpoints/contacts/module" ) // ContactsSaveContactsHandler is the handler for "/contacts/:userUUID/contacts" type ContactsSaveContactsHandler struct { Dependencies *module.Dependencies endpoint *zanzibar.RouterEndpoint } // NewContactsSaveContactsHandler creates a handler func NewContactsSaveContactsHandler(deps *module.Dependencies) *ContactsSaveContactsHandler { handler := &ContactsSaveContactsHandler{ Dependencies: deps, } handler.endpoint = zanzibar.NewRouterEndpoint( deps.Default.ContextExtractor, deps.Default, "contacts", "saveContacts", zanzibar.NewStack([]zanzibar.MiddlewareHandle{ deps.Middleware.DefaultExample2.NewMiddlewareHandle( defaultExample2.Options{}, ), deps.Middleware.DefaultExample.NewMiddlewareHandle( defaultExample.Options{}, ), }, handler.HandleRequest).Handle, ) return handler } // Register adds the http handler to the gateway's http router func (h *ContactsSaveContactsHandler) Register(g *zanzibar.Gateway) error { return g.HTTPRouter.Handle( "POST", "/contacts/:userUUID/contacts", http.HandlerFunc(h.endpoint.HandleRequest), ) } // HandleRequest handles "/contacts/:userUUID/contacts". func (h *ContactsSaveContactsHandler) HandleRequest( ctx context.Context, req *zanzibar.ServerHTTPRequest, res *zanzibar.ServerHTTPResponse, ) { defer func() { if r := recover(); r != nil { stacktrace := string(debug.Stack()) e := errors.Errorf("enpoint panic: %v, stacktrace: %v", r, stacktrace) h.Dependencies.Default.ContextLogger.Error( ctx, "Endpoint failure: endpoint panic", zap.Error(e), zap.String("stacktrace", stacktrace), zap.String("endpoint", h.endpoint.EndpointName)) h.Dependencies.Default.ContextMetrics.IncCounter(ctx, zanzibar.MetricEndpointPanics, 1) res.SendError(502, "Unexpected workflow panic, recovered at endpoint.", nil) } }() var requestBody endpointsIDlEndpointsContactsContacts.Contacts_SaveContacts_Args if ok := req.ReadAndUnmarshalBody(&requestBody); !ok { return } if requestBody.SaveContactsRequest == nil { requestBody.SaveContactsRequest = &endpointsIDlEndpointsContactsContacts.SaveContactsRequest{} } requestBody.SaveContactsRequest.UserUUID = req.Params.Get("userUUID") // log endpoint request to downstream services if ce := h.Dependencies.Default.ContextLogger.Check(zapcore.DebugLevel, "stub"); ce != nil { zfields := []zapcore.Field{ zap.String("endpoint", h.endpoint.EndpointName), } zfields = append(zfields, zap.String("body", fmt.Sprintf("%s", req.GetRawBody()))) for _, k := range req.Header.Keys() { if val, ok := req.Header.Get(k); ok { zfields = append(zfields, zap.String(k, val)) } } h.Dependencies.Default.ContextLogger.Debug(ctx, "endpoint request to downstream", zfields...) } w := customContacts.NewContactsSaveContactsWorkflow(h.Dependencies) if span := req.GetSpan(); span != nil { ctx = opentracing.ContextWithSpan(ctx, span) } response, cliRespHeaders, err := w.Handle(ctx, req.Header, &requestBody) // log downstream response to endpoint if ce := h.Dependencies.Default.ContextLogger.Check(zapcore.DebugLevel, "stub"); ce != nil { zfields := []zapcore.Field{ zap.String("endpoint", h.endpoint.EndpointName), } if body, err := json.Marshal(response); err == nil { zfields = append(zfields, zap.String("body", fmt.Sprintf("%s", body))) } if cliRespHeaders != nil { for _, k := range cliRespHeaders.Keys() { if val, ok := cliRespHeaders.Get(k); ok { zfields = append(zfields, zap.String(k, val)) } } } if traceKey, ok := req.Header.Get("x-trace-id"); ok { zfields = append(zfields, zap.String("x-trace-id", traceKey)) } h.Dependencies.Default.ContextLogger.Debug(ctx, "downstream service response", zfields...) } if err != nil { switch err.(type) { case *endpointsIDlEndpointsContactsContacts.BadRequest: res.WriteJSONBytes(400, cliRespHeaders, nil) return case *endpointsIDlEndpointsContactsContacts.NotFound: res.WriteJSONBytes(404, cliRespHeaders, nil) return default: res.SendError(500, "Unexpected server error", err) return } } res.WriteJSON(202, cliRespHeaders, response) }
{ "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 com.cd826dong.clouddemo.user.entity; import com.google.common.base.MoreObjects; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; import java.io.Serializable; /** * 用户信息定义 * * @author CD826([email protected]) * @since 1.0.0 */ @Entity @Table(name = "tbUser") public class User implements Serializable { private static final long serialVersionUID = 1L; // ======================================================================== // fields ================================================================= @Id @GeneratedValue /** 用户数据库主键 */ private Long id; /** 用户昵称 */ private String nickname; /** 用户头像 */ private String avatar; @Override public String toString() { return MoreObjects.toStringHelper(this) .add("id", getId()) .add("nickname", getNickname()).toString(); } protected MoreObjects.ToStringHelper toStringHelper() { return MoreObjects.toStringHelper(this) .add("id", getId()) .add("nickname", getNickname()); } // ======================================================================== // setter/getter ========================================================== public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getNickname() { return nickname; } public void setNickname(String nickname) { this.nickname = nickname; } public String getAvatar() { return avatar; } public void setAvatar(String avatar) { this.avatar = avatar; } }
{ "pile_set_name": "Github" }
/* * Copyright 2017 Andrey Semashev * * Distributed under the Boost Software License, Version 1.0. * See http://www.boost.org/LICENSE_1_0.txt * * This header is deprecated, use boost/winapi/get_current_thread_id.hpp instead. */ #ifndef BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_ID_HPP #define BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_ID_HPP #include <boost/winapi/get_current_thread_id.hpp> #include <boost/detail/winapi/detail/deprecated_namespace.hpp> #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #endif // BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_ID_HPP
{ "pile_set_name": "Github" }
/* * Copyright (c) 2000-2003 Fabrice Bellard * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef AVUTIL_TIME_H #define AVUTIL_TIME_H #include <stdint.h> /** * Get the current time in microseconds. */ int64_t av_gettime(void); /** * Get the current time in microseconds since some unspecified starting point. * On platforms that support it, the time comes from a monotonic clock * This property makes this time source ideal for measuring relative time. * The returned values may not be monotonic on platforms where a monotonic * clock is not available. */ int64_t av_gettime_relative(void); /** * Indicates with a boolean result if the av_gettime_relative() time source * is monotonic. */ int av_gettime_relative_is_monotonic(void); /** * Sleep for a period of time. Although the duration is expressed in * microseconds, the actual delay may be rounded to the precision of the * system timer. * * @param usec Number of microseconds to sleep. * @return zero on success or (negative) error code. */ int av_usleep(unsigned usec); #endif /* AVUTIL_TIME_H */
{ "pile_set_name": "Github" }
Input name=data C=3 H=24 W=24 Convolution name=conv1 bottom=data top=conv1 num_output=16 kernel_H=3 kernel_W=3 bias PReLU name=prelu1 bottom=conv1 top=conv1 Pooling name=pool1 bottom=conv1 top=pool1 pool=MAX kernel_size=3 stride=2 Convolution name=conv2_sep bottom=pool1 top=conv2_sep num_output=32 kernel_H=1 kernel_W=1 bias PReLU name=prelu2 bottom=conv2_sep top=conv2_sep Pooling name=pool2 bottom=conv2_sep top=pool2 pool=MAX kernel_size=3 stride=2 Convolution name=conv3_sep bottom=pool2 top=conv3_sep num_output=64 kernel_H=1 kernel_W=1 bias PReLU name=prelu3 bottom=conv3_sep top=conv3_sep DepthwiseConvolution name=conv4_dw bottom=conv3_sep top=conv4_dw num_output=64 kernel_H=3 kernel_W=3 bias PReLU name=prelu4_dw bottom=conv4_dw top=conv4_dw Convolution name=conv4_sep bottom=conv4_dw top=conv4_sep num_output=128 kernel_H=1 kernel_W=1 bias PReLU name=prelu4 bottom=conv4_sep top=conv4_sep DepthwiseConvolution name=conv5_dw bottom=conv4_sep top=conv5_dw num_output=128 kernel_H=3 kernel_W=3 bias PReLU name=prelu5_dw bottom=conv5_dw top=conv5_dw InnerProduct name=conv5_1 bottom=conv5_dw top=conv5-1 num_output=2 bias BatchNormScale name=bn5_1 bottom=conv5-1 top=conv5-1 bias Softmax name=cls_prob bottom=conv5-1 top=prob1 InnerProduct name=conv5_2 bottom=conv5_dw top=conv5-2 num_output=4 bias BatchNormScale name=bn5_2 bottom=conv5-2 top=conv5-2 bias
{ "pile_set_name": "Github" }
import {merge as simpleMerge, MergeOptions} from 'simple-forking'; import type {Component} from './component'; import {isComponentClass, isComponentInstance} from './utilities'; export {MergeOptions}; /** * Deeply merge any type of forks including objects, arrays, and components (using Component's `merge()` [class method](https://liaison.dev/docs/v1/reference/component#merge-class-method) and [instance method](https://liaison.dev/docs/v1/reference/component#merge-instance-method)) into their original values. * * @param value An original value of any type. * @param forkedValue A fork of `value`. * * @returns The original value. * * @example * ``` * import {fork, merge} from '﹫liaison/component'; * * const data = { * token: 'xyz123', * timestamp: 1596600889609, * movie: new Movie({title: 'Inception'}) * }; * * const dataFork = fork(data); * dataFork.token = 'xyz456'; * dataFork.movie.title = 'Inception 2'; * * data.token; // => 'xyz123' * data.movie.title; // => 'Inception' * merge(data, dataFork); * data.token; // => 'xyz456' * data.movie.title; // => 'Inception 2' * ``` * * @category Merging */ export function merge(value: any, forkedValue: any, options: MergeOptions = {}) { const { objectMerger: originalObjectMerger, objectCloner: originalObjectCloner, ...otherOptions } = options; const objectMerger = function (object: object, forkedObject: object): object | void { if (originalObjectMerger !== undefined) { const mergedObject = originalObjectMerger(object, forkedObject); if (mergedObject !== undefined) { return mergedObject; } } if (isComponentClass(object)) { return object.merge(forkedObject as typeof Component, options); } if (isComponentInstance(object)) { return object.merge(forkedObject as Component, options); } }; const objectCloner = function (object: object): object | void { if (originalObjectCloner !== undefined) { const clonedObject = originalObjectCloner(object); if (clonedObject !== undefined) { return clonedObject; } } if (isComponentClass(object)) { return object.clone(); } if (isComponentInstance(object)) { return object.clone(options); } }; return simpleMerge(value, forkedValue, {...otherOptions, objectMerger, objectCloner}); }
{ "pile_set_name": "Github" }
(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 10.4' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 10445, 351] NotebookOptionsPosition[ 7198, 255] NotebookOutlinePosition[ 9451, 313] CellTagsIndexPosition[ 9367, 308] WindowTitle->FCSplit WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[BoxData[GridBox[{ {Cell["FEYN CALC SYMBOL", "PacletNameCell"], Cell[TextData[Cell[BoxData[ ActionMenuBox[ FrameBox[ InterpretationBox[Cell[TextData[{ "URL", StyleBox[" \[FilledDownTriangle]", "AnchorBarArrow", StripOnInput->False] }]], TextCell[ Row[{"URL", Style[" \[FilledDownTriangle]", "AnchorBarArrow"]}]]], StripOnInput->False], {"\<\"FeynCalc/ref/FCSplit\"\>":> None, "\<\"Copy Wolfram Documentation Center URL\"\>":> Module[{DocumentationSearch`Private`nb$}, DocumentationSearch`Private`nb$ = NotebookPut[ Notebook[{ Cell["FeynCalc/ref/FCSplit"]}, Visible -> False]]; SelectionMove[DocumentationSearch`Private`nb$, All, Notebook]; FrontEndTokenExecute[DocumentationSearch`Private`nb$, "Copy"]; NotebookClose[DocumentationSearch`Private`nb$]; Null], Delimiter, "\<\"Copy web URL\"\>":> Module[{DocumentationSearch`Private`nb$}, DocumentationSearch`Private`nb$ = NotebookPut[ Notebook[{ Cell[ BoxData[ MakeBoxes[ Hyperlink[ "http://reference.wolfram.com/language/FeynCalc/ref/FCSplit.\ html"], StandardForm]], "Input", TextClipboardType -> "PlainText"]}, Visible -> False]]; SelectionMove[ DocumentationSearch`Private`nb$, All, Notebook]; FrontEndTokenExecute[DocumentationSearch`Private`nb$, "Copy"]; NotebookClose[DocumentationSearch`Private`nb$]; Null], "\<\"Go to web URL\"\>":>FrontEndExecute[{ NotebookLocate[{ URL[ StringJoin[ If[ TrueQ[DocumentationBuild`Make`Private`wsmlinkQ$127295], "http://reference.wolfram.com/system-modeler/", "http://reference.wolfram.com/language/"], "FeynCalc/ref/FCSplit", ".html"]], None}]}]}, Appearance->None, MenuAppearance->Automatic, MenuStyle->"URLMenu"]], LineSpacing->{1.4, 0}]], "AnchorBar"]} }]], "AnchorBarGrid", GridBoxOptions->{GridBoxItemSize->{"Columns" -> { Scaled[0.65], { Scaled[0.34]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}}, CellID->1], Cell[TextData[{ Cell["FCSplit", "ObjectName"], Cell[BoxData[ InterpretationBox[ StyleBox[ GraphicsBox[{}, BaselinePosition->Baseline, ImageSize->{8, 0}], CacheGraphics->False], Spacer[8]]]], Cell[BoxData[""], "ObjectNameTranslation"] }], "ObjectNameGrid"], Cell[CellGroupData[{ Cell[BoxData[GridBox[{ {"", Cell[TextData[{ Cell[BoxData[ RowBox[{"FCSplit", "[", RowBox[{"exp", ",", RowBox[{"{", RowBox[{"v1", ",", "v2", ",", "..."}], "}"}]}], "]"}]], "InlineFormula"], " \[LineSeparator]splits expr into pieces that are free of any occurence \ of v1, v2, ... and pieces that contain those variables. This works both on \ sums and products. The output is provided in the form of a two element list. \ One can recover the original expression by applying Total to that list." }]]} }]], "Usage", GridBoxOptions->{ GridBoxBackground->{ "Columns" -> {{None}}, "ColumnsIndexed" -> {}, "Rows" -> {{None}}, "RowsIndexed" -> {}}}, CellID->982511436], Cell[CellGroupData[{ Cell[TextData[Cell[BoxData[ ButtonBox[Cell[TextData[{ Cell[BoxData[ InterpretationBox[ StyleBox[ GraphicsBox[{}, BaselinePosition->Baseline, ImageSize->{6, 0}], CacheGraphics->False], Spacer[6]]]], "Details" }], "NotesFrameText"], Appearance->{Automatic, None}, BaseStyle->None, ButtonFunction:>(FrontEndExecute[{ FrontEnd`SelectionMove[ FrontEnd`SelectedNotebook[], All, ButtonCell], FrontEndToken["OpenCloseGroup"], FrontEnd`SelectionMove[ FrontEnd`SelectedNotebook[], After, CellContents]}]& ), Evaluator->None, Method->"Preemptive"]]]], "NotesSection", WholeCellGroupOpener->True, CellGroupingRules->{"SectionGrouping", 50}, CellID->2027175993], Cell["", "SectionHeaderSpacer"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Options", "[", "FCSplit", "]"}]], "Input", CellLabel->"In[158]:=", CellID->516520341], Cell[BoxData[ FormBox[ RowBox[{"{", RowBox[{"Expanding", "\[Rule]", "True"}], "}"}], TraditionalForm]], "Output", ImageSize->{124, 16}, ImageMargins->{{0, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, CellLabel->"Out[158]=", CellID->791302016] }, Open ]] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ Cell[BoxData[ InterpretationBox[ StyleBox[ GraphicsBox[{}, BaselinePosition->Baseline, ImageSize->{6, 0}], CacheGraphics->False], Spacer[6]]]], "Examples", "\[NonBreakingSpace]\[NonBreakingSpace]", Cell["(1)", "ExampleCount"] }], "PrimaryExamplesSection", WholeCellGroupOpener->True, CellTags->"PrimaryExamplesSection", CellID->1702993599], Cell[CellGroupData[{ Cell[TextData[{ "Basic Examples", "\[NonBreakingSpace]\[NonBreakingSpace]", Cell["(1)", "ExampleCount"] }], "ExampleSection", "ExampleSection", WholeCellGroupOpener->True, CellID->359754168], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"FCSplit", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"a", "+", "b"}], ")"}], "^", "2"}], ",", RowBox[{"{", "a", "}"}]}], "]"}]], "Input", CellLabel->"In[1]:=", CellID->1633798001], Cell[BoxData[ FormBox[ RowBox[{"{", RowBox[{ SuperscriptBox["b", "2"], ",", RowBox[{ SuperscriptBox["a", "2"], "+", RowBox[{"2", " ", "a", " ", "b"}]}]}], "}"}], TraditionalForm]], "Output",\ ImageSize->{117, 21}, ImageMargins->{{0, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, CellLabel->"Out[1]=", CellID->1044001596] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"FCSplit", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"a", "+", "b", "+", "c"}], ")"}], "^", "2"}], ",", RowBox[{"{", RowBox[{"a", ",", "b"}], "}"}]}], "]"}]], "Input", CellLabel->"In[2]:=", CellID->25854671], Cell[BoxData[ FormBox[ RowBox[{"{", RowBox[{ SuperscriptBox["c", "2"], ",", RowBox[{ SuperscriptBox["a", "2"], "+", RowBox[{"2", " ", "a", " ", "b"}], "+", RowBox[{"2", " ", "a", " ", "c"}], "+", SuperscriptBox["b", "2"], "+", RowBox[{"2", " ", "b", " ", "c"}]}]}], "}"}], TraditionalForm]], "Output",\ ImageSize->{255, 21}, ImageMargins->{{0, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, CellLabel->"Out[2]=", CellID->803702257] }, Open ]] }, Open ]] }, Open ]], Cell[" ", "FooterCell"] }, Saveable->False, ScreenStyleEnvironment->"Working", WindowSize->{725, 750}, WindowMargins->{{-10, Automatic}, {Automatic, -8}}, WindowTitle->"FCSplit", TaggingRules->{ "ModificationHighlight" -> False, "ColorType" -> "SymbolColor", "LinkTrails" -> GridBox[{{ RowBox[{ ButtonBox[ "FeynCalc", ButtonData -> "paclet:FeynCalc/guide/FeynCalc", BaseStyle -> {"Link", "DockedLinkTrail"}]}]}}, ColumnAlignments -> Left], "HasOptions" -> False, "ExampleCounter" -> 1, "NeedPlatMsgIn" -> None, "RootCaptions" -> "", "Metadata" -> { "built" -> "{2020, 6, 20, 19, 6, 25.399695}", "history" -> {"9.3", "", "", ""}, "context" -> "FeynCalc`", "keywords" -> {}, "specialkeywords" -> {}, "tutorialcollectionlinks" -> {}, "index" -> True, "label" -> "Feyn Calc Symbol", "language" -> "en", "paclet" -> "FeynCalc", "status" -> "None", "summary" -> "FCSplit[exp, {v1, v2, ...}] splits expr into pieces that are free of any \ occurence of v1, v2, ... and pieces that contain those variables. This works \ both on sums and products. The output is provided in the form of a two \ element list. One can recover the original expression by applying Total to \ that list.", "synonyms" -> {}, "tabletags" -> {}, "title" -> "FCSplit", "titlemodifier" -> "", "windowtitle" -> "FCSplit", "type" -> "Symbol", "uri" -> "FeynCalc/ref/FCSplit"}, "SearchTextTranslated" -> ""}, CellContext->"Global`", FrontEndVersion->"10.4 for Linux x86 (64-bit) (April 11, 2016)", StyleDefinitions->Notebook[{ Cell[ StyleData[ StyleDefinitions -> FrontEnd`FileName[{"Wolfram"}, "Reference.nb"]]], Cell[ StyleData["Input"], CellContext -> "Global`"], Cell[ StyleData["Output"], CellContext -> "Global`"]}, Visible -> False, FrontEndVersion -> "10.4 for Linux x86 (64-bit) (April 11, 2016)", StyleDefinitions -> "Default.nb"] ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{ "PrimaryExamplesSection"->{ Cell[5141, 164, 388, 15, 31, "PrimaryExamplesSection", CellTags->"PrimaryExamplesSection", CellID->1702993599]} } *) (*CellTagsIndex CellTagsIndex->{ {"PrimaryExamplesSection", 9223, 301} } *) (*NotebookFileOutline Notebook[{ Cell[579, 21, 2269, 53, 53, "AnchorBarGrid", CellID->1], Cell[2851, 76, 284, 11, 45, "ObjectNameGrid"], Cell[CellGroupData[{ Cell[3160, 91, 727, 18, 119, "Usage", CellID->982511436], Cell[CellGroupData[{ Cell[3912, 113, 739, 24, 31, "NotesSection", CellGroupingRules->{"SectionGrouping", 50}, CellID->2027175993], Cell[4654, 139, 31, 0, 70, "SectionHeaderSpacer"], Cell[CellGroupData[{ Cell[4710, 143, 111, 3, 70, "Input", CellID->516520341], Cell[4824, 148, 256, 9, 37, "Output", CellID->791302016] }, Open ]] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell[5141, 164, 388, 15, 31, "PrimaryExamplesSection", CellTags->"PrimaryExamplesSection", CellID->1702993599], Cell[CellGroupData[{ Cell[5554, 183, 195, 6, 26, "ExampleSection", CellID->359754168], Cell[CellGroupData[{ Cell[5774, 193, 226, 8, 27, "Input", CellID->1633798001], Cell[6003, 203, 351, 13, 42, "Output", CellID->1044001596] }, Open ]], Cell[CellGroupData[{ Cell[6391, 221, 259, 9, 27, "Input", CellID->25854671], Cell[6653, 232, 479, 16, 42, "Output", CellID->803702257] }, Open ]] }, Open ]] }, Open ]], Cell[7171, 253, 23, 0, 41, "FooterCell"] } ] *) (* End of internal cache information *)
{ "pile_set_name": "Github" }
# www.robotstxt.org/ # www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449 User-agent: *
{ "pile_set_name": "Github" }
/** * Aptana Studio * Copyright (c) 2005-2012 by Appcelerator, Inc. All Rights Reserved. * Licensed under the terms of the GNU Public License (GPL) v3 (with exceptions). * Please see the license.html included with this distribution for details. * Any modifications to this file must keep this entire header intact. */ package com.aptana.samples; /** * A interface to capture the various scopes available during debugging. These need to match the items in the .options * file at the root of the plugin * * @author Ingo Muschenetz */ public interface IDebugScopes { /** * Items related to the sample manager */ String MANAGER = SamplesPlugin.PLUGIN_ID + "/debug/manager"; //$NON-NLS-1$ }
{ "pile_set_name": "Github" }
#!/bin/bash # # SPDX-License-Identifier: GPL-2.0 # Copyright (c) 2018 Jesper Dangaard Brouer, Red Hat Inc. # # Bash-shell example on using iproute2 tools 'tc' and 'ip' to load # eBPF programs, both for XDP and clsbpf. Shell script function # wrappers and even long options parsing is illustrated, for ease of # use. # # Related to sample/bpf/xdp2skb_meta_kern.c, which contains BPF-progs # that need to collaborate between XDP and TC hooks. Thus, it is # convenient that the same tool load both programs that need to work # together. # BPF_FILE=xdp2skb_meta_kern.o DIR=$(dirname $0) [ -z "$TC" ] && TC=tc [ -z "$IP" ] && IP=ip function usage() { echo "" echo "Usage: $0 [-vfh] --dev ethX" echo " -d | --dev : Network device (required)" echo " --flush : Cleanup flush TC and XDP progs" echo " --list : (\$LIST) List TC and XDP progs" echo " -v | --verbose : (\$VERBOSE) Verbose" echo " --dry-run : (\$DRYRUN) Dry-run only (echo commands)" echo "" } ## -- General shell logging cmds -- function err() { local exitcode=$1 shift echo "ERROR: $@" >&2 exit $exitcode } function info() { if [[ -n "$VERBOSE" ]]; then echo "# $@" fi } ## -- Helper function calls -- # Wrapper call for TC and IP # - Will display the offending command on failure function _call_cmd() { local cmd="$1" local allow_fail="$2" shift 2 if [[ -n "$VERBOSE" ]]; then echo "$cmd $@" fi if [[ -n "$DRYRUN" ]]; then return fi $cmd "$@" local status=$? if (( $status != 0 )); then if [[ "$allow_fail" == "" ]]; then err 2 "Exec error($status) occurred cmd: \"$cmd $@\"" fi fi } function call_tc() { _call_cmd "$TC" "" "$@" } function call_tc_allow_fail() { _call_cmd "$TC" "allow_fail" "$@" } function call_ip() { _call_cmd "$IP" "" "$@" } ## --- Parse command line arguments / parameters --- # Using external program "getopt" to get --long-options OPTIONS=$(getopt -o vfhd: \ --long verbose,flush,help,list,dev:,dry-run -- "$@") if (( $? != 0 )); then err 4 "Error calling getopt" fi eval set -- "$OPTIONS" unset DEV unset FLUSH while true; do case "$1" in -d | --dev ) # device DEV=$2 info "Device set to: DEV=$DEV" >&2 shift 2 ;; -v | --verbose) VERBOSE=yes # info "Verbose mode: VERBOSE=$VERBOSE" >&2 shift ;; --dry-run ) DRYRUN=yes VERBOSE=yes info "Dry-run mode: enable VERBOSE and don't call TC+IP" >&2 shift ;; -f | --flush ) FLUSH=yes shift ;; --list ) LIST=yes shift ;; -- ) shift break ;; -h | --help ) usage; exit 0 ;; * ) shift break ;; esac done FILE="$DIR/$BPF_FILE" if [[ ! -e $FILE ]]; then err 3 "Missing BPF object file ($FILE)" fi if [[ -z $DEV ]]; then usage err 2 "Please specify network device -- required option --dev" fi ## -- Function calls -- function list_tc() { local device="$1" shift info "Listing current TC ingress rules" call_tc filter show dev $device ingress } function list_xdp() { local device="$1" shift info "Listing current XDP device($device) setting" call_ip link show dev $device | grep --color=auto xdp } function flush_tc() { local device="$1" shift info "Flush TC on device: $device" call_tc_allow_fail filter del dev $device ingress call_tc_allow_fail qdisc del dev $device clsact } function flush_xdp() { local device="$1" shift info "Flush XDP on device: $device" call_ip link set dev $device xdp off } function attach_tc_mark() { local device="$1" local file="$2" local prog="tc_mark" shift 2 # Re-attach clsact to clear/flush existing role call_tc_allow_fail qdisc del dev $device clsact 2> /dev/null call_tc qdisc add dev $device clsact # Attach BPF prog call_tc filter add dev $device ingress \ prio 1 handle 1 bpf da obj $file sec $prog } function attach_xdp_mark() { local device="$1" local file="$2" local prog="xdp_mark" shift 2 # Remove XDP prog in-case it's already loaded # TODO: Need ip-link option to override/replace existing XDP prog flush_xdp $device # Attach XDP/BPF prog call_ip link set dev $device xdp obj $file sec $prog } if [[ -n $FLUSH ]]; then flush_tc $DEV flush_xdp $DEV exit 0 fi if [[ -n $LIST ]]; then list_tc $DEV list_xdp $DEV exit 0 fi attach_tc_mark $DEV $FILE attach_xdp_mark $DEV $FILE
{ "pile_set_name": "Github" }
#tb 0: 1001/30000 #media_type 0: video #codec_id 0: rawvideo #dimensions 0: 640x480 #sar 0: 0/1 0, 0, 0, 1, 614400, 0x9a6b8802 0, 1, 1, 1, 614400, 0xaa8687e2 0, 2, 2, 1, 614400, 0x2fe5bd40 0, 3, 3, 1, 614400, 0x1c8f3737
{ "pile_set_name": "Github" }
""" compatibility module for various versions of python (2.4/3+/jython) and various platforms (posix/windows) """ __all__ = ( 'is_py3k', 'BYTES_LITERAL', 'maxint', 'Struct', 'BytesIO', 'pickle', 'callable', 'select_module', 'select', 'get_exc_errno', 'select_error', 'poll' ) import sys import time is_py3k = (sys.version_info[0] >= 3) if is_py3k: exec("execute = exec") def BYTES_LITERAL(text): return bytes(text, "utf8") maxint = sys.maxsize else: exec("""def execute(code, globals = None, locals = None): exec code in globals, locals""") def BYTES_LITERAL(text): return text maxint = sys.maxint try: from struct import Struct except ImportError: import struct class Struct(object): __slots__ = ["format", "size"] def __init__(self, format): self.format = format self.size = struct.calcsize(format) def pack(self, *args): return struct.pack(self.format, *args) def unpack(self, data): return struct.unpack(self.format, data) try: from cStringIO import StringIO as BytesIO except ImportError: from io import BytesIO try: next = next except NameError: def next(iterator): return iterator.next() try: import cPickle as pickle except ImportError: import pickle try: callable = callable except NameError: def callable(obj): return hasattr(obj, "__call__") try: import select as select_module except ImportError: select_module = None def select(*args): raise ImportError("select not supported on this platform") else: # jython if hasattr(select_module, 'cpython_compatible_select'): from select import cpython_compatible_select as select else: from select import select def get_exc_errno(exc): if hasattr(exc, "errno"): return exc.errno else: return exc[0] if select_module: select_error = select_module.error else: select_error = IOError if hasattr(select_module, "poll"): class PollingPoll(object): def __init__(self): self._poll = select_module.poll() def register(self, fd, mode): flags = 0 if "r" in mode: flags |= select_module.POLLIN | select_module.POLLPRI if "w" in mode: flags |= select_module.POLLOUT if "e" in mode: flags |= select_module.POLLERR if "h" in mode: # POLLRDHUP is a linux only extension, not known to python, but nevertheless # used and thus needed in the flags POLLRDHUP = 0x2000 flags |= select_module.POLLHUP | select_module.POLLNVAL | POLLRDHUP self._poll.register(fd, flags) modify = register def unregister(self, fd): self._poll.unregister(fd) def poll(self, timeout = None): if timeout: # the real poll takes milliseconds while we have seconds here timeout = 1000*timeout events = self._poll.poll(timeout) processed = [] for fd, evt in events: mask = "" if evt & (select_module.POLLIN | select_module.POLLPRI): mask += "r" if evt & select_module.POLLOUT: mask += "w" if evt & select_module.POLLERR: mask += "e" if evt & select_module.POLLHUP: mask += "h" if evt & select_module.POLLNVAL: mask += "n" processed.append((fd, mask)) return processed poll = PollingPoll else: class SelectingPoll(object): def __init__(self): self.rlist = set() self.wlist = set() def register(self, fd, mode): if "r" in mode: self.rlist.add(fd) if "w" in mode: self.wlist.add(fd) modify = register def unregister(self, fd): self.rlist.discard(fd) self.wlist.discard(fd) def poll(self, timeout = None): if not self.rlist and not self.wlist: time.sleep(timeout) return [] # need to return an empty array in this case else: rl, wl, _ = select(self.rlist, self.wlist, (), timeout) return [(fd, "r") for fd in rl] + [(fd, "w") for fd in wl] poll = SelectingPoll
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <ResourceDictionary xmlns="www.team-mediaportal.com/2008/mpf/directx" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:collections="clr-namespace:MediaPortal.UI.Presentation.DataObjects;assembly=MediaPortal.UI" xmlns:mp_special_controls="clr-namespace:MediaPortal.UI.SkinEngine.SpecialElements.Controls;assembly=SkinEngine" xmlns:navitems="clr-namespace:MediaPortal.Plugins.SlimTv.Client.Models.Navigation;assembly=SlimTv.Client" xmlns:tv="clr-namespace:MediaPortal.Plugins.SlimTv.Client.Controls;assembly=SlimTv.Client" xmlns:aspect="clr-namespace:MediaPortal.Common.MediaManagement.DefaultItemAspects;assembly=MediaPortal.Common" xmlns:fanart="clr-namespace:MediaPortal.Extensions.UserServices.FanArtService.Client;assembly=FanArtService.Client" DependsOnStyleResources="SlimTvColors,SlimTvConsts,FullScreenContentConsts,MediaButtons,MediaColors,Consts,Colors,Buttons,OtherControls,MediaStyles,OSD" > <!-- SlimTvClient model --> <Model x:Key="SlimTvClient" Id="8BEC1372-1C76-484c-8A69-C7F3103708EC"/> <Model x:Key="SlimTvMultiChannelGuide" Id="5054408D-C2A9-451f-A702-E84AFCD29C10"/> <Model x:Key="SlimTvSettings" Id="F5D4AA07-8469-46A7-8FD0-E1CD1E8F5898"/> <Model x:Key="SlimTvExtSchedule" Id="EB9CB370-9CD6-4D72-8354-73E446104438"/> <Model x:Key="TimeModel" Id="E821B1C8-0666-4339-8027-AA45A4F6F107"/> <Model x:Key="VideoPlayerModel" Id="4E2301B4-3C17-4a1d-8DE5-2CEA169A0256"/> <tv:SlimTvDateFormatConverter x:Key="SlimTvDateFormatConverter" /> <!-- Program duration control style --> <Style x:Key="ProgramDurationControlStyle" TargetType="{x:Type Control}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate> <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" > <Label x:Name="ProgramStart" Margin="0,0,0,0" Color="{ThemeResource TextColor}" Content="{Binding Path=StartTime, Converter={StaticResource SlimTvDateFormatConverter}}"/> <Label x:Name="Delimiter" Margin="10,0,10,0" Color="{ThemeResource TextColor}" Content="-" IsVisible="{Binding ElementName=ProgramStart, Path=Content, Converter={StaticResource EmptyStringToFalseConverter}}"/> <Label x:Name="ProgramEnd" Content="{Binding Path=EndTime, Converter={StaticResource SlimTvDateFormatConverter},ConverterParameter=Time}" Color="{ThemeResource TextColor}"/> </StackPanel> </ControlTemplate> </Setter.Value> </Setter> </Style> <ControlTemplate x:Key="GenericTVOSDControlsControl"> <DockPanel x:Name="PlayControlsPanel" VerticalAlignment="Top" HorizontalAlignment="Stretch" LastChildFill="True"> <StackPanel DockPanel.Dock="Left" Orientation="Horizontal" HorizontalAlignment="Left"> <Button x:Name="PowerButton" Style="{ThemeResource PowerButtonStyle}" Margin="0,0,5,0" Height="71" HorizontalAlignment="Right" Command="{Command Source={Service WorkflowManager},Path=NavigatePush,Parameters=BBFA7DB7-5055-48D5-A904-0F0C79849369}" IsEnabled="{Binding IsEnabled}"/> <Button x:Name="BackButton" Style="{ThemeResource NavigateBackButtonStyle}" Margin="{ThemeResource PlayerControlButtonMargins}" HorizontalAlignment="Left" Command="{Command Source={Service WorkflowManager},Path=NavigatePop,Parameters=1}" IsEnabled="{Binding IsEnabled}"/> </StackPanel> <StackPanel DockPanel.Dock="Right" Orientation="Horizontal"> <Button x:Name="VolUpButton" Style="{ThemeResource VolUpButtonStyle}" Margin="{ThemeResource PlayerControlButtonMargins}" Command="{Command Source={StaticResource GeneralPlayerModel},Path=VolumeUp}" VerticalAlignment="Top" IsEnabled="{Binding IsEnabled}"/> <Button x:Name="VolDownButton" Style="{ThemeResource VolDownButtonStyle}" Margin="{ThemeResource PlayerControlButtonMargins}" Command="{Command Source={StaticResource GeneralPlayerModel},Path=VolumeDown}" VerticalAlignment="Top" IsEnabled="{Binding IsEnabled}"/> <Button x:Name="AudioActiveButton" IsVisible="{Binding IsAudio}" Style="{ThemeResource AudioActiveButtonStyle}" Command="{Command AudioButtonPressed}" IsEnabled="{Binding IsEnabled}" VerticalAlignment="Top"/> <Button x:Name="AudioInactiveButton" IsVisible="{Binding !IsAudio}" Style="{ThemeResource AudioInactiveButtonStyle}" Command="{Command AudioButtonPressed}" IsEnabled="{Binding IsEnabled}" VerticalAlignment="Top"/> </StackPanel> <DockPanel LastChildFill="False" Margin="80,0,80,0"> <StackPanel Orientation="Horizontal" VerticalAlignment="Top" DockPanel.Dock="Left" Margin="0,0,40,0"> <Button x:Name="SkipBackButton" Style="{ThemeResource SkipBackButtonStyle}" Margin="{ThemeResource PlayerControlButtonMargins}" IsVisible="{Binding CanSkipBack}" Command="{Command Previous}" IsEnabled="{Binding IsEnabled}"/> <Button x:Name="RewindButton" Style="{ThemeResource RewindButtonStyle}" Margin="{ThemeResource PlayerControlButtonMargins}" IsVisible="{Binding CanSeekBackward}" Command="{Command SeekBackward}" IsEnabled="{Binding IsEnabled}"/> <Button x:Name="PlayButton" Style="{ThemeResource PlayButtonStyle}" Margin="{ThemeResource PlayerControlButtonMargins}" IsVisible="{Binding CanPlay}" Command="{Command Play}" IsEnabled="{Binding IsEnabled}"/> <Button x:Name="PauseButton" Style="{ThemeResource PauseButtonStyle}" Margin="{ThemeResource PlayerControlButtonMargins}" IsVisible="{Binding CanPause}" Command="{Command Pause}" IsEnabled="{Binding IsEnabled}"/> <Button x:Name="StopButton" Style="{ThemeResource StopButtonStyle}" Margin="{ThemeResource PlayerControlButtonMargins}" IsVisible="{Binding CanStop}" Command="{Command Stop}" IsEnabled="{Binding IsEnabled}"/> <Button x:Name="ForwardButton" Style="{ThemeResource ForwardButtonStyle}" Margin="{ThemeResource PlayerControlButtonMargins}" IsVisible="{Binding CanSeekForward}" Command="{Command SeekForward}" IsEnabled="{Binding IsEnabled}"/> <Button x:Name="SkipForwardButton" Style="{ThemeResource SkipForwardButtonStyle}" Margin="{ThemeResource PlayerControlButtonMargins}" IsVisible="{Binding CanSkipForward}" Command="{Command Next}" IsEnabled="{Binding IsEnabled}"/> <DockPanel LastChildFill="False"> <Label DockPanel.Dock="Top" x:Name="EndTimeLabel" Color="{ThemeResource TextColor}" FontSize="28" FontFamily="DefaultBold" Margin="10,10,20,0" Content="{Binding Source={StaticResource SlimTvClient}, Path=CurrentProgram.EndTime, Converter={StaticResource SlimTvDateFormatConverter}, ConverterParameter=Time}"/> <Label DockPanel.Dock="Bottom" x:Name="CurrentTimeLabel" Margin="10,0,20,10" Color="{ThemeResource OSDProgressBarFillColor}" FontSize="28" FontFamily="DefaultBold" Content="{Binding Source={StaticResource TimeModel}, Path=CurrentTime}"/> </DockPanel> </StackPanel> <StackPanel Orientation="Horizontal" VerticalAlignment="Top" DockPanel.Dock="Right" Margin="40,0,0,0"> <Button x:Name="PreviousChannelButton" Style="{ThemeResource ChannelDownButtonStyle}" Command="{Command Source={StaticResource SlimTvClient},Path=ZapPrevChannel}" IsEnabled="{Binding IsEnabled}"/> <Button x:Name="NextChannelButton" Style="{ThemeResource ChannelUpButtonStyle}" Command="{Command Source={StaticResource SlimTvClient},Path=ZapNextChannel}" IsEnabled="{Binding IsEnabled}"/> <Button x:Name="RecordButton" Style="{ThemeResource RecordButtonStyle}" Command="{Command Source={StaticResource SlimTvClient},Path=RecordDialog}" Margin="{ThemeResource PlayerControlButtonMargins}" IsEnabled="{Binding IsEnabled}"/> <Button x:Name="SelectSubtitleButton" Style="{ThemeResource SelectSubtitleButtonStyle}" Margin="{ThemeResource PlayerControlButtonMargins}" IsVisible="{Binding Source={StaticResource VideoPlayerModel},Path=PlayerUIContributor.SubtitlesAvailable}" Command="{Command Source={StaticResource VideoPlayerModel},Path=PlayerUIContributor.OpenChooseSubtitleDialog}" IsEnabled="{Binding IsEnabled}"/> </StackPanel> </DockPanel> </DockPanel> </ControlTemplate> <Style x:Key="PrimarySlimTvOSDStyle" TargetType="{x:Type mp_special_controls:PlayerControl}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type mp_special_controls:PlayerControl}"> <ControlTemplate.Resources> <Model x:Key="VideoPlayerModel" Id="4E2301B4-3C17-4a1d-8DE5-2CEA169A0256"/> </ControlTemplate.Resources> <Control Style="{ThemeResource OSDContainer}" Width="{ThemeResource FullScreenContentVideoPrimaryPlayerOSDWidth}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}"> <Control.Resources> <ControlTemplate x:Key="OSD_Cover_Template"> <Image x:Name="ChannelLogo" Stretch="Uniform" Width="280" Margin="8" VerticalAlignment="Top"> <Image.Source> <fanart:FanArtImageSource fanart:FanArtMediaType="{Binding Source={StaticResource SlimTvClient}, Path=ChannelLogoType}" fanart:FanArtType="Banner" fanart:FanArtName="{Binding Source={StaticResource SlimTvClient}, Path=ChannelName}" fanart:MaxWidth="280" fanart:MaxHeight="0"/> </Image.Source> </Image> </ControlTemplate> <ControlTemplate x:Key="OSD_InfoArea_Template"> <Grid x:Name="InfoGrid" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0,-10,0,0"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="20"/> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Grid Grid.Row="1" DataContext="{Binding Source={StaticResource SlimTvClient}}" MaxWidth="900"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Label Grid.Column="0" x:Name="CurrentProgramTitleLabel" Content="{Binding Path=CurrentProgram.Title}" FontFamily="DefaultBold" Color="{ThemeResource TextColor}"/> <Label Grid.Column="1" x:Name="CurrentProgramSeriesLabel" Color="{ThemeResource TextColor}" IsVisible="{Binding Path=CurrentProgram.Series, Converter={StaticResource EmptyStringToFalseConverter}}"> <Label.Content> <Binding Path="CurrentProgram.Series" Converter="{StaticResource StringFormatConverter}" ConverterParameter="{} ({0})"/> </Label.Content> </Label> </Grid> <Grid Grid.Column="0" Grid.Row="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,20"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="320"/> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="15"/> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Label x:Name="Channel" Grid.Row="0" Grid.Column="0" Scroll="Auto" Content="{Binding Source={StaticResource SlimTvClient},Path=ChannelName}" Color="{ThemeResource TextColor}"/> <Label x:Name="ProgramStart" Grid.Row="0" Grid.Column="1" Margin="5,0,5,0" HorizontalAlignment="Right" Content="{Binding Source={StaticResource SlimTvClient},Path=CurrentProgram.StartTime, Converter={StaticResource SlimTvDateFormatConverter}}" Color="{ThemeResource TextColor}"/> <Label Grid.Row="0" Grid.Column="2" Content="-" Color="{ThemeResource TextColor}" HorizontalAlignment="Center"/> <Label x:Name="ProgramEnd" Grid.Row="0" Grid.Column="3" Margin="5,0,5,0" HorizontalAlignment="Left" Content="{Binding Source={StaticResource SlimTvClient},Path=CurrentProgram.EndTime, Converter={StaticResource SlimTvDateFormatConverter}}" Color="{ThemeResource TextColor}"/> <Label x:Name="Genre" Grid.Row="0" Grid.Column="4" Margin="5,0,0,0" Content="{Binding Source={StaticResource SlimTvClient},Path=CurrentProgram.Genre}" Color="{ThemeResource TextColor}"/> <Label Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="5" x:Name="Description" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Wrap="True" Scroll="Auto" Color="{ThemeResource TextColor}" Content="{Binding Source={StaticResource SlimTvClient},Path=CurrentProgram.Description}"/> </Grid> </Grid> </ControlTemplate> <ControlTemplate x:Key="OSD_Progress_Template"> <DockPanel LastChildFill="true"> <Grid DockPanel.Dock="Center" HorizontalAlignment="Stretch"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <ProgressBar x:Name="CurrentProgramProgress" Grid.Column="1" Height="18" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="0,5,0,0" Style="{ThemeResource OSDProgressBarStyle}" Value="{Binding Source={StaticResource SlimTvClient},Path=ProgramProgress}" /> </Grid> </DockPanel> </ControlTemplate> <ControlTemplate x:Key="OSD_Controls_Template"> <Control Template="{ThemeResource GenericTVOSDControlsControl}" /> </ControlTemplate> </Control.Resources> </Control> <ControlTemplate.Triggers> <Trigger Property="IsCurrentPlayer" Value="True"> <Trigger.EnterActions> <BeginStoryboard x:Name="CurrentPlayer_BeginStoryboard" Storyboard="{ThemeResource OSDCurrentPlayerControlStoryboard}"/> </Trigger.EnterActions> <Trigger.ExitActions> <StopStoryboard BeginStoryboardName="CurrentPlayer_BeginStoryboard"/> </Trigger.ExitActions> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="PlayerContext" Value="PrimaryPlayer"/> </Style> <Style x:Key="PrimaryRadioOSDStyle" TargetType="{x:Type mp_special_controls:PlayerControl}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type mp_special_controls:PlayerControl}"> <Control Style="{ThemeResource OSDAudioContainer}" Width="{ThemeResource FullScreenContentAudioPrimaryPlayerOSDWidth}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}"> <Control.Resources> <ControlTemplate x:Key="OSD_Progress_Template"> <DockPanel LastChildFill="true"> <Grid DockPanel.Dock="Center" HorizontalAlignment="Stretch"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <ProgressBar x:Name="CurrentProgramProgress" Height="18" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="0,5,0,0" Style="{ThemeResource OSDProgressBarStyle}" Value="{Binding Source={StaticResource SlimTvClient},Path=ProgramProgress}" /> </Grid> </DockPanel> </ControlTemplate> <ControlTemplate x:Key="OSD_Controls_Template"> <Control Template="{ThemeResource GenericTVOSDControlsControl}" /> </ControlTemplate> </Control.Resources> </Control> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="PlayerContext" Value="PrimaryPlayer"/> </Style> <!-- RecordingItem --> <ControlTemplate x:Key="GridViewRecordingItemTemplate"> <Grid Margin="3,2,3,2" HorizontalAlignment="Center" VerticalAlignment="Center" Width="{ThemeResource MEDIA_THUMB_WIDTH}" Height="{ThemeResource MEDIA_THUMB_HEIGHT}"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Border Grid.Column="0" Grid.Row="0" CornerRadius="0" Background="Black" Opacity="0.2" Margin="0" BorderThickness="0"> </Border> <Grid HorizontalAlignment="Center" VerticalAlignment="Center"> <Image Source="{Binding MediaItem}" Stretch="Uniform" FallbackSource="VideoNormal.png" HorizontalAlignment="Center" VerticalAlignment="Center"> <Image.Opacity> <MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}" ConverterParameter="{}{0} ? {1} : {2}"> <Binding RelativeSource="{RelativeSource Mode=FindAncestor,AncestorType={x:Type Button}}" Path="HasFocus"/> <Binding Source="1.0"/> <Binding Source="0.7"/> </MultiBinding> </Image.Opacity> </Image> <Image HorizontalAlignment="Right" VerticalAlignment="Top" > <Image.Source> <MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}" ConverterParameter="{}{0} == 0 ? {1} : {2}"> <Binding Path="PlayCount"/> <Binding Source="UnwatchedTab_small.png"/> <Binding Source=""/> </MultiBinding> </Image.Source> </Image> </Grid> </Grid> </ControlTemplate> <ControlTemplate x:Key="RecordingCoverTemplate"> <Grid Grid.Row="0" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center"> <Image Height="128" Stretch="Uniform" FallbackSource="VideoNormal.png" HorizontalAlignment="Center" VerticalAlignment="Center" Source="{Binding MediaItem}" > </Image> </Grid> </ControlTemplate> <ControlTemplate x:Key="ListViewRecordingItemTemplate"> <Grid x:Name="ItemControl" Margin="0,0,43,0"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="*"/> <ColumnDefinition Width="40"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Label x:Name="ItemLabel" Grid.Row="0" Grid.Column="1" Content="{Binding SimpleTitle}" FontSize="{ThemeResource SmallFontSize}" Color="{ThemeResource TextColor}" FontFamily="DefaultBold"> <Label.Opacity> <MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}" ConverterParameter="{}{0} ? {1} : {2}"> <Binding RelativeSource="{RelativeSource Mode=FindAncestor,AncestorType={x:Type Button}}" Path="HasFocus"/> <Binding Source="1.0"/> <Binding Source="0.7"/> </MultiBinding> </Label.Opacity> </Label> <Label x:Name="Duration" Grid.Row="0" Grid.Column="2" Content="{Binding Duration}" Margin="-30,0,0,0" Color="{ThemeResource TextColor}" FontSize="{ThemeResource SmallFontSize}" HorizontalAlignment="Right"> <Label.Opacity> <MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}" ConverterParameter="{}{0} ? {1} : {2}"> <Binding RelativeSource="{RelativeSource Mode=FindAncestor,AncestorType={x:Type Button}}" Path="HasFocus"/> <Binding Source="1.0"/> <Binding Source="0"/> </MultiBinding> </Label.Opacity> </Label> <Image HorizontalAlignment="Right" VerticalAlignment="Center" Stretch="Fill" Width="37" Height="24" Grid.Row="0" Grid.Column="2" > <Image.Opacity> <MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}" ConverterParameter="{}{0} ? {1} : {2}"> <Binding RelativeSource="{RelativeSource Mode=FindAncestor,AncestorType={x:Type Button}}" Path="HasFocus"/> <Binding Source="0"/> <Binding Source="0.5"/> </MultiBinding> </Image.Opacity> <Image.Source> <MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}" ConverterParameter="{}{0} ? {1} : {2}"> <Binding Path="PlayCount"/> <Binding Source=""/> <Binding Source="unwatched_icon.png"/> </MultiBinding> </Image.Source> </Image> <Control x:Name="ListViewCover" Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Margin="0,0,8,0" Template="{ThemeResource RecordingCoverTemplate}" RenderTransformOrigin="0.5,0.5" IsVisible="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Button}},Path=HasFocus}"> <Control.LayoutTransform> <ScaleTransform> <ScaleTransform.ScaleX> <MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}" ConverterParameter="{}{0} == {LayoutSize}.{Small} ? {1} : ({0} == {LayoutSize}.{Medium} ? {2}: {3})"> <Binding Source="{StaticResource ViewModeModel}" Path="LayoutSize"/> <Binding Source="0.5"/> <Binding Source="0.7"/> <Binding Source="1"/> </MultiBinding> </ScaleTransform.ScaleX> <ScaleTransform.ScaleY> <MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}" ConverterParameter="{}{0} == {LayoutSize}.{Small} ? {1} : ({0} == {LayoutSize}.{Medium} ? {2}: {3})"> <Binding Source="{StaticResource ViewModeModel}" Path="LayoutSize"/> <Binding Source="0.5"/> <Binding Source="0.7"/> <Binding Source="1"/> </MultiBinding> </ScaleTransform.ScaleY> </ScaleTransform> </Control.LayoutTransform> </Control> <Grid x:Name="FocusDetails" Grid.Row="1" Grid.Column="1" Margin="0,0,20,0" HorizontalAlignment="Stretch" IsVisible="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Button}},Path=HasFocus}"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="40"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Image HorizontalAlignment="Right" VerticalAlignment="Center" Stretch="Fill" Width="37" Height="24" Grid.Row="0" Grid.Column="2" Margin="60,0,-60,0" > <Image.Source> <MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}" ConverterParameter="{}{0} ? {1} : {2}"> <Binding Path="PlayCount"/> <Binding Source=""/> <Binding Source="unwatched_icon.png"/> </MultiBinding> </Image.Source> </Image> <Grid x:Name="Details" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Stretch"> <Grid.IsVisible> <Binding Source="{StaticResource ViewModeModel}" Path="LayoutSize" Converter="{StaticResource ExpressionValueConverter}" ConverterParameter="{}{0} != {LayoutSize}.{Small}"/> </Grid.IsVisible> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <!--Label x:Name="VideoEncoding" Grid.Column="0" Content="{Binding VideoEncoding}" FontSize="{ThemeResource SmallFontSize}" Color="{ThemeResource TextColor}"/--> <Label x:Name="StartTime" Grid.Column="1" Content="{Binding Path=StartTime, Converter={StaticResource SlimTvDateFormatConverter}, ConverterParameter=g}" FontSize="{ThemeResource SmallFontSize}" Color="{ThemeResource TextColor}" HorizontalAlignment="Right"/> </Grid> </Grid> </Grid> </ControlTemplate> <DataTemplate DataType="{x:Type navitems:RecordingItem}"> <Control> <Control.Template> <MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}" ConverterParameter="{}{0} == {LayoutType}.{ListLayout} ? {1} : ({0} == {LayoutType}.{GridLayout} ? {2} : {3})"> <Binding Source="{StaticResource ViewModeModel}" Path="LayoutType"/> <Binding Source="{StaticResource ListViewVideoItemTemplate}"/> <Binding Source="{StaticResource GridViewVideoItemTemplate}"/> <Binding Source="{StaticResource CoverViewVideoItemTemplate}"/> </MultiBinding> </Control.Template> </Control> </DataTemplate> <Style x:Key="ProgramGuideButtonControlStyle" TargetType="{x:Type Control}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate> <DockPanel Name="ButtonControlRectangle"> <Rectangle DockPanel.Dock="Center" Name="ButtonBase" Fill="{ThemeResource ProgramBaseFill}" Stroke="Transparent"/> <Rectangle DockPanel.Dock="Center" Name="ButtonHover" Fill="" IsVisible="{Binding Source={StaticResource SlimTvSettings}, Path=!ShowGenreColors}"/> <Rectangle DockPanel.Dock="Center" Name="ButtonGenre" Fill="{Binding Program.EpgGenreColor}" IsVisible="{Binding Source={StaticResource SlimTvSettings}, Path=ShowGenreColors}"/> <Rectangle DockPanel.Dock="Center" Name="ButtonOverlay" Fill=""/> <Rectangle DockPanel.Dock="Center" Name="ButtonFocusFrame" StrokeThickness="3" Margin="0" Stroke="White" Fill="" IsVisible="False"/> </DockPanel> </ControlTemplate> </Setter.Value> </Setter> </Style> <!-- ProgramGuideButtonStyle is used as style for a single Program in MultiChannelGuide It's basically the DefaultButtonStyle without the Margin for ButtonControlStyle, which would lead to incorrect Layout for short Programs (minimum Width). --> <Style x:Key="ProgramGuideButtonStyle" TargetType="{x:Type Button}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate> <Grid x:Name="GrowControl" RenderTransformOrigin="0.5,0.5" Margin="2,2,2,2"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Grid.RenderTransform> <TransformGroup> <ScaleTransform ScaleX="1" ScaleY="1"/> </TransformGroup> </Grid.RenderTransform> <Control Grid.ColumnSpan="2" Style="{ThemeResource ProgramGuideButtonControlStyle}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/> <ContentPresenter Grid.ColumnSpan="2" x:Name="ButtonContentPresenter" Margin="3,5,0,5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/> <Image Grid.Column="1" x:Name="RecIndicator" Source="RECORD.SINGLE.PNG" IsVisible="False" Height="32" Stretch="Uniform" Margin="0,4,2,4" HorizontalAlignment="Right"/> <Image Grid.Column="1" x:Name="SeriesRecIndicator" Source="RECORD.SERIES.PNG" IsVisible="False" Height="32" Stretch="Uniform" Margin="0,4,2,4" HorizontalAlignment="Right"/> </Grid> <ControlTemplate.Triggers> <MultiTrigger> <MultiTrigger.Conditions> <Condition Binding="{Binding IsRunning}" Value="True" /> <Condition Binding="{Binding Source={StaticResource SlimTvSettings}, Path=ShowGenreColors}" Value="False" /> </MultiTrigger.Conditions> <Setter TargetName="ButtonBase" Property="Fill" Value="{ThemeResource ProgramRunningFill}"/> </MultiTrigger> <MultiTrigger> <MultiTrigger.Conditions> <Condition Binding="{Binding Program.IsScheduled}" Value="True" /> <Condition Binding="{Binding Source={StaticResource SlimTvSettings}, Path=ShowGenreColors}" Value="False" /> </MultiTrigger.Conditions> <Setter TargetName="ButtonBase" Property="Fill" Value="{ThemeResource ProgramScheduledFill}"/> </MultiTrigger> <MultiTrigger> <MultiTrigger.Conditions> <Condition Binding="{Binding Program.IsScheduled}" Value="True" /> <Condition Binding="{Binding Program.IsSeriesScheduled}" Value="False" /> <Condition Binding="{Binding Source={StaticResource SlimTvSettings}, Path=ShowGenreColors}" Value="True" /> </MultiTrigger.Conditions> <Setter TargetName="RecIndicator" Property="IsVisible" Value="True"/> </MultiTrigger> <MultiTrigger> <MultiTrigger.Conditions> <Condition Binding="{Binding Program.IsSeriesScheduled}" Value="True" /> <Condition Binding="{Binding Source={StaticResource SlimTvSettings}, Path=ShowGenreColors}" Value="True" /> </MultiTrigger.Conditions> <Setter TargetName="SeriesRecIndicator" Property="IsVisible" Value="True"/> </MultiTrigger> <MultiTrigger> <MultiTrigger.Conditions> <Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Button}, Path=HasFocus}" Value="True"/> <Condition Binding="{Binding Source={StaticResource SlimTvSettings}, Path=ShowGenreColors}" Value="True" /> </MultiTrigger.Conditions> <Setter TargetName="ButtonFocusFrame" Property="IsVisible" Value="True"/> </MultiTrigger> <Trigger Property="HasFocus" Value="True"> <Setter TargetName="ButtonHover" Property="Fill" Value="{ThemeResource ProgramFocusedFill}"/> <Trigger.EnterActions> <BeginStoryboard x:Name="Focused_BeginStoryboard" Storyboard="{ThemeResource FocusedButtonWideStoryboard}"/> <SoundPlayerAction Source="navigate.wav" DisableOnAudioOutput="True"/> </Trigger.EnterActions> <Trigger.ExitActions> <StopStoryboard BeginStoryboardName="Focused_BeginStoryboard"/> </Trigger.ExitActions> </Trigger> <Trigger Property="IsPressed" Value="True"> <Trigger.EnterActions> <BeginStoryboard x:Name="Pressed_BeginStoryboard" Storyboard="{ThemeResource PressedButtonWideStoryboard}" HandoffBehavior="TemporaryReplace"/> <SoundPlayerAction Source="click.wav" DisableOnAudioOutput="True"/> </Trigger.EnterActions> <Trigger.ExitActions> <StopStoryboard BeginStoryboardName="Pressed_BeginStoryboard"/> </Trigger.ExitActions> </Trigger> <Trigger Property="IsEnabled" Value="False"> <Trigger.EnterActions> <BeginStoryboard x:Name="Disabled_BeginStoryBoard" Storyboard="{ThemeResource DisabledButtonStoryboard}"/> </Trigger.EnterActions> <Trigger.ExitActions> <StopStoryboard BeginStoryboardName="Disabled_BeginStoryBoard"/> </Trigger.ExitActions> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <!-- Style definition for EpgGrid defining header and program item styles --> <Style x:Key="EpgGridStyle" TargetType="{x:Type tv:EpgGrid}"> <Setter Property="GroupButtonWidth" Value="{ThemeResource GroupButtonWidth}"/> <Setter Property="GroupButtonTemplate"> <Setter.Value> <ControlTemplate> <Button Style="{ThemeResource ProgramGuideButtonStyle}" Command="{Command Source={StaticResource SlimTvMultiChannelGuide}, Path=SelectGroup}"> <StackPanel Orientation="Horizontal" Margin="0,0,10,0"> <Label x:Name="GroupNameLabel" Color="{ThemeResource TextColor}" FontSize="{ThemeResource SmallFontSize}" Opacity="0.6" Content="{Binding GroupName}" VerticalAlignment="Center"/> <StackPanel.LayoutTransform> <RotateTransform CenterX="0.5" CenterY="0.5" Angle="-90" /> </StackPanel.LayoutTransform> </StackPanel> </Button> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="HeaderTemplate"> <Setter.Value> <ControlTemplate> <Button Style="{ThemeResource ProgramGuideButtonStyle}" Command="{Binding Command}" Margin="0,0,30,0"> <Grid x:Name="ChannelHeader" Margin="2,2,2,2"> <Grid.ColumnDefinitions> <!-- Channel Logo --> <ColumnDefinition Width="Auto"/> <!-- Channel Number --> <ColumnDefinition Width="Auto"/> <!-- Channel Name --> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Label x:Name="ChannelNumber" Grid.Column="0" Content="{Binding Channel.ChannelNumber}" VerticalAlignment="Center" FontFamily="DefaultBold" Opacity="0.4" Color="{ThemeResource TextColor}" FontSize="{ThemeResource SmallFontSize}" Margin="5,-2,0,-2" MinWidth="50"> <Label.IsVisible> <Binding Source="{StaticResource SlimTvSettings}" Path="ShowChannelNumbers" /> </Label.IsVisible> </Label> <Image x:Name="ChannelLogo" Grid.Column="1" Stretch="Uniform" Margin="5,-1,0,-1" Width="{ThemeResource ChannelLogoWidth}" HorizontalAlignment="Center" Height="{Binding ElementName=ChannelHeader,Path=ActualHeight}"> <Image.Source> <fanart:FanArtImageSource fanart:FanArtMediaType="{Binding ChannelLogoType}" fanart:FanArtType="Banner" fanart:FanArtName="{Binding ChannelLogoPath}" fanart:MaxWidth="0" fanart:MaxHeight="0"/> </Image.Source> <Image.IsVisible> <Binding Source="{StaticResource SlimTvSettings}" Path="ShowChannelLogos" /> </Image.IsVisible> </Image> <Label Grid.Column="2" x:Name="NameLabel" Content="{Binding [Name]}" VerticalAlignment="Center" Margin="5,0,0,0" ScrollDelay="0" Color="{ThemeResource TextColor}" FontSize="{ThemeResource SmallerFontSize}"> <Label.IsVisible> <Binding Source="{StaticResource SlimTvSettings}" Path="ShowChannelNames" /> </Label.IsVisible> <Label.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Button}, Path=HasFocus}" Value="True"> <Setter TargetName="NameLabel" Property="Scroll" Value="Auto"/> </DataTrigger> </Label.Triggers> </Label> </Grid> </Button> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="ProgramTemplate"> <Setter.Value> <ControlTemplate> <Button Style="{ThemeResource ProgramGuideButtonStyle}" IsEnabled="{Binding Enabled}" SetFocus="{Binding Path=Selected,Mode=OneTime}" Command="{Binding Command}" > <Button.ContextMenuCommand> <Command Source="{StaticResource SlimTvMultiChannelGuide}" Path="ShowProgramContextMenu" Parameters="{LateBoundValue BindingValue={Binding}}"/> </Button.ContextMenuCommand> <Button.Triggers> <Trigger Property="HasFocus" Value="True"> <Setter TargetName="ItemLabel" Property="Scroll" Value="Auto"/> <Trigger.EnterActions> <TriggerCommand> <TriggerCommand.Command> <Command x:Key="SelectionChanged_Command" Source="{StaticResource SlimTvMultiChannelGuide}" Path="UpdateProgram" Parameters="{LateBoundValue BindingValue={Binding}}" /> </TriggerCommand.Command> </TriggerCommand> </Trigger.EnterActions> <Trigger.ExitActions> <TriggerCommand> <TriggerCommand.Command> <Command x:Key="SelectionChanged_Command" Source="{StaticResource SlimTvMultiChannelGuide}" Path="ClearItem" /> </TriggerCommand.Command> </TriggerCommand> </Trigger.ExitActions> </Trigger> </Button.Triggers> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Label x:Name="ItemLabel" Content="{Binding [Name]}" VerticalAlignment="Center" Color="{ThemeResource TextColor}" FontSize="{ThemeResource SmallFontSize}" Margin="2,0,0,0" Opacity="0.8" IsVisible="{Binding !IsRunning}"/> <Label x:Name="ItemLabel2" Content="{Binding [Name]}" VerticalAlignment="Center" Color="{ThemeResource TextColor}" FontSize="{ThemeResource SmallFontSize}" Margin="2,0,0,0" FontFamily="DefaultBold" IsVisible="{Binding IsRunning}"/> <Label x:Name="SeriesLabel" Grid.Column="1" Content="{Binding [Series]}" VerticalAlignment="Center" Color="{ThemeResource TextColor}" FontSize="{ThemeResource SmallFontSize}" Margin="5,0,0,0"/> </Grid> </Button> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="TimeIndicatorTemplate"> <Setter.Value> <ControlTemplate> <Rectangle x:Name="TimeIndicator" Width="4" HorizontalAlignment="Left" VerticalAlignment="Stretch" Margin="0,0,10,0"> <Rectangle.Fill> <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5"> <GradientStop Offset="0" Color="#20A0A0A0"/> <GradientStop Offset="1" Color="#A0F0F0F0"/> </LinearGradientBrush > </Rectangle.Fill> </Rectangle> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="TVButtonSimpleWideStyle" TargetType="{x:Type Button}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate> <Grid x:Name="GrowControl" RenderTransformOrigin="0.5,0.5" Margin="2"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Grid.RenderTransform> <TransformGroup> <ScaleTransform ScaleX="1" ScaleY="1"/> </TransformGroup> </Grid.RenderTransform> <Control x:Name="ButtonControlBackground" Style="{ThemeResource ButtonControlStyle}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/> <ContentPresenter x:Name="ButtonContentPresenter" Margin="10,5,10,5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="TVButtonWideStyle" TargetType="{x:Type Button}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate> <Grid x:Name="GrowControl" RenderTransformOrigin="0.5,0.5" Margin="2"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Grid.RenderTransform> <TransformGroup> <ScaleTransform ScaleX="1" ScaleY="1"/> </TransformGroup> </Grid.RenderTransform> <Control x:Name="ButtonControlBackground" Style="{ThemeResource ButtonControlStyle}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/> <ContentPresenter x:Name="ButtonContentPresenter" Margin="10,5,10,5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/> </Grid> <ControlTemplate.Triggers> <DataTrigger Binding="{Binding IsRunning}" Value="True"> <Setter TargetName="Item1" Property="Background" Value="{ThemeResource ProgramRunningFill}"/> <Setter TargetName="Item2" Property="Background" Value="{ThemeResource ProgramRunningFill}"/> <Setter TargetName="Item3" Property="Background" Value="{ThemeResource ProgramRunningFill}"/> </DataTrigger> <DataTrigger Binding="{Binding Program.IsScheduled}" Value="True"> <Setter TargetName="Item2_record" Property="Background" Value="{ThemeResource ProgramScheduledFill}"/> <Setter TargetName="Item3_record" Property="Background" Value="{ThemeResource ProgramRecordFill}"/> </DataTrigger> <DataTrigger Binding="{Binding Program.IsSeriesScheduled}" Value="True"> <Setter TargetName="SeriesRecIndicator" Property="IsVisible" Value="True"/> </DataTrigger> <Trigger Property="HasFocus" Value="True"> <Setter TargetName="Item1_overlay" Property="Background" Value="{ThemeResource ProgramFocusedFill}"/> <Setter TargetName="Item2_overlay" Property="Background" Value="{ThemeResource ProgramFocusedFill}"/> <Setter TargetName="Item3_overlay" Property="Background" Value="{ThemeResource ProgramFocusedFill}"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="TVItemContainerStyle" TargetType="{x:Type ListViewItem}"> <Style.Triggers> <Trigger Property="Selected" Value="True"> <!-- Hack: It is sufficient to set the attached ZIndex property for one panel type; the MP2 SkinEngine maps it to the same internal property for all panel types --> <Setter Property="StackPanel.ZIndex" Value="100.0"/> </Trigger> </Style.Triggers> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ListViewItem}"> <Button Margin="50,0,20,0" Style="{ThemeResource TVButtonWideStyle}" Command="{DynamicResource ResourceKey=Menu_Command}" IsEnabled="{Binding Enabled}" SetFocus="{Binding Path=Selected,Mode=OneTime}"> <!--Button.Triggers> <Trigger Property="HasFocus" Value="True"> <Setter TargetName="Item1" Property="Background" Value="#003366"/> <Setter TargetName="Item2" Property="Background" Value="#003366"/> <Setter TargetName="Item3" Property="Background" Value="#003366"/> </Trigger> </Button.Triggers--> </Button> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="TVButtonWideStyle2" TargetType="{x:Type Button}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate> <Grid x:Name="GrowControl" RenderTransformOrigin="0.5,0.5" Margin="2"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Grid.RenderTransform> <TransformGroup> <ScaleTransform ScaleX="1" ScaleY="1"/> </TransformGroup> </Grid.RenderTransform> <Control x:Name="ButtonControlBackground" Style="{ThemeResource ButtonControlStyle}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/> <ContentPresenter x:Name="ButtonContentPresenter" Margin="10,5,10,5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/> </Grid> <ControlTemplate.Triggers> <DataTrigger Binding="{Binding IsRunning}" Value="True"> <Setter TargetName="Item1" Property="Background" Value="{ThemeResource ProgramRunningFill}"/> <Setter TargetName="Item2" Property="Background" Value="{ThemeResource ProgramRunningFill}"/> <Setter TargetName="Item3" Property="Background" Value="{ThemeResource ProgramRunningFill}"/> <Setter TargetName="Item4" Property="Background" Value="{ThemeResource ProgramRunningFill}"/> </DataTrigger> <DataTrigger Binding="{Binding Program.IsScheduled}" Value="True"> <Setter TargetName="Item3_record" Property="Background" Value="{ThemeResource ProgramScheduledFill}"/> <Setter TargetName="Item4_record" Property="Background" Value="{ThemeResource ProgramRecordFill}"/> </DataTrigger> <DataTrigger Binding="{Binding Program.IsSeriesScheduled}" Value="True"> <Setter TargetName="SeriesRecIndicator" Property="IsVisible" Value="True"/> </DataTrigger> <Trigger Property="HasFocus" Value="True"> <Setter TargetName="Item1_overlay" Property="Background" Value="{ThemeResource ProgramFocusedFill}"/> <Setter TargetName="Item2_overlay" Property="Background" Value="{ThemeResource ProgramFocusedFill}"/> <Setter TargetName="Item3_overlay" Property="Background" Value="{ThemeResource ProgramFocusedFill}"/> <Setter TargetName="Item4_overlay" Property="Background" Value="{ThemeResource ProgramFocusedFill}"/> <Setter TargetName="CurrentProgramLabel" Property="Scroll" Value="Auto"/> <Setter TargetName="NextProgramLabel" Property="Scroll" Value="Auto"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="TVItemContainerStyle2" TargetType="{x:Type ListViewItem}"> <Style.Triggers> <Trigger Property="Selected" Value="True"> <!-- Hack: It is sufficient to set the attached ZIndex property for one panel type; the MP2 SkinEngine maps it to the same internal property for all panel types --> <Setter Property="StackPanel.ZIndex" Value="100.0"/> </Trigger> </Style.Triggers> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ListViewItem}"> <Button Margin="50,0,20,0" Style="{ThemeResource TVButtonWideStyle2}" Command="{DynamicResource ResourceKey=Menu_Command}" IsEnabled="{Binding Enabled}" SetFocus="{Binding Path=Selected,Mode=OneTime}"> </Button> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="ScheduleItemContainerStyle" TargetType="{x:Type ListViewItem}"> <Style.Triggers> <Trigger Property="Selected" Value="True"> <!-- Hack: It is sufficient to set the attached ZIndex property for one panel type; the MP2 SkinEngine maps it to the same internal property for all panel types --> <Setter Property="StackPanel.ZIndex" Value="100.0"/> </Trigger> </Style.Triggers> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ListViewItem}"> <Button Margin="0,0,0,0" Style="{ThemeResource TVButtonSimpleWideStyle}" Command="{DynamicResource ResourceKey=Menu_Command}" IsEnabled="{Binding Enabled}" SetFocus="{Binding Path=Selected,Mode=OneTime}"> <Button.Triggers> <Trigger Property="HasFocus" Value="True"> <Setter TargetName="Item1" Property="Background" Value="#003366"/> <Setter TargetName="Item2" Property="Background" Value="#003366"/> <Setter TargetName="Item3" Property="Background" Value="#003366"/> <Setter TargetName="Item4" Property="Background" Value="#003366"/> <Setter TargetName="ChannelText" Property="Scroll" Value="Auto"/> <Setter TargetName="ItemLabel" Property="Scroll" Value="Auto"/> <Setter TargetName="TypeLabel" Property="Scroll" Value="Auto"/> <Setter TargetName="ProgramStartEnd" Property="Scroll" Value="Auto"/> </Trigger> </Button.Triggers> </Button> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="ExtScheduleItemContainerStyle" TargetType="{x:Type ListViewItem}"> <Style.Triggers> <Trigger Property="Selected" Value="True"> <!-- Hack: It is sufficient to set the attached ZIndex property for one panel type; the MP2 SkinEngine maps it to the same internal property for all panel types --> <Setter Property="StackPanel.ZIndex" Value="100.0"/> </Trigger> </Style.Triggers> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ListViewItem}"> <Button Margin="0,0,0,0" Style="{ThemeResource TVButtonWideStyle}" Command="{DynamicResource ResourceKey=Menu_Command}" IsEnabled="{Binding Enabled}" SetFocus="{Binding Path=Selected,Mode=OneTime}"> <Button.Triggers> <Trigger Property="HasFocus" Value="True"> <Setter TargetName="ChannelText" Property="Scroll" Value="Auto"/> <Setter TargetName="ItemLabel" Property="Scroll" Value="Auto"/> <Setter TargetName="ProgramStartEnd" Property="Scroll" Value="Auto"/> <!--Setter TargetName="Item1" Property="Background" Value="#003366"/> <Setter TargetName="Item2" Property="Background" Value="#003366"/> <Setter TargetName="Item3" Property="Background" Value="#003366"/--> </Trigger> </Button.Triggers> </Button> </ControlTemplate> </Setter.Value> </Setter> </Style> <!-- Default ListView style. The properties "ItemTemplate", "ItemContainerStyle" and "DataStringProvider" should be exchanged for custom ListView styles. --> <Style x:Key="TVListViewStyle" TargetType="{x:Type ListView}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ListView}"> <ScrollViewer CanContentScroll="True"> <ItemsPresenter VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/> </ScrollViewer> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="ItemsPanel"> <Setter.Value> <ItemsPanelTemplate> <VirtualizingStackPanel x:Name="ListItemsHost" IsItemsHost="True"/> </ItemsPanelTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="TVProgressBarStyle" TargetType="{x:Type ProgressBar}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ProgressBar}"> <Grid x:Name="ProgressBarGrid" UIElement.MouseClick="{CommandStencil RelativeSource={RelativeSource TemplatedParent}, Path=OnMouseClick}"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Rectangle x:Name="ProgressBarTrack" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Fill="#999999"/> <Rectangle x:Name="ProgressBarIndicator" Width="{TemplateBinding PartIndicatorWidth}" HorizontalAlignment="Left" Fill="{ThemeResource ProgressBarFillColor}"/> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> <DataTemplate x:Key="SingleChannelWithCurrentProgramDataTemplate" DataType="{x:Type collections:ListItem}"> <Grid x:Name="ItemControl" VerticalAlignment="Center" HorizontalAlignment="Stretch" RenderTransformOrigin="0.5,0.5" Margin="-80,0,0,0"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <!-- Channel Logo --> <ColumnDefinition Width="400"/> <!-- Channel Name --> <ColumnDefinition Width="*"/> <!-- Program Title --> <ColumnDefinition Width="300"/> <!-- Program Time --> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Grid.RenderTransform> <TransformGroup> <ScaleTransform ScaleX="1" ScaleY="1"/> </TransformGroup> </Grid.RenderTransform> <Border x:Name="Item1" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="#33000000" BorderThickness="0" Margin="0,-5,5,-5"/> <Border x:Name="Item2" Grid.Row="0" Grid.Column="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="#33000000" BorderThickness="0" Margin="0,-5,15,-5"/> <Border x:Name="Item3" Grid.Row="0" Grid.Column="3" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="#33000000" BorderThickness="0" Margin="-10,-5,-15,-5"/> <Border x:Name="Item2_record" Grid.Row="0" Grid.Column="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" BorderThickness="0" Margin="0,-5,15,-5"/> <Border x:Name="Item3_record" Grid.Row="0" Grid.Column="3" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" BorderThickness="0" Margin="-10,-5,-15,-5"/> <Border x:Name="Item1_overlay" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" BorderThickness="0" Margin="0,-5,5,-5"/> <Border x:Name="Item2_overlay" Grid.Row="0" Grid.Column="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" BorderThickness="0" Margin="0,-5,15,-5"/> <Border x:Name="Item3_overlay" Grid.Row="0" Grid.Column="3" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" BorderThickness="0" Margin="-10,-5,-15,-5"/> <Image x:Name="ChannelLogo" Grid.Column="0" Grid.Row="0" Width="{ThemeResource ChannelLogoMedium}" Stretch="Uniform" Margin="10,0,10,0" VerticalAlignment="Center"> <Image.Source> <fanart:FanArtImageSource fanart:FanArtMediaType="{Binding Program.ChannelLogoType}" fanart:FanArtType="Banner" fanart:FanArtName="{Binding Program.ChannelName}" fanart:MaxWidth="0" fanart:MaxHeight="0"/> </Image.Source> </Image> <Label Grid.Column="1" Grid.Row="0" x:Name="NameLabel" Margin="3,5,0,5" Content="{Binding Program.ChannelName}" Color="{ThemeResource TextColor}" VerticalAlignment="Center" FontSize="{ThemeResource SmallFontSize}"/> <Label Grid.Column="2" Grid.Row="0" x:Name="CurrentProgramLabel" Margin="5,5,0,5" VerticalAlignment="Center" Content="{Binding [Title]}" FontSize="{ThemeResource SmallFontSize}" Color="{ThemeResource TextColor}"/> <!-- Shows the progress of current time in relation to the current playing program --> <Label Grid.Column="3" Grid.Row="0" x:Name="ProgramLabel" Margin="5,5,0,5" VerticalAlignment="Center" Content="{Binding [StartTime]}" FontSize="{ThemeResource SmallFontSize}" Color="{ThemeResource TextColor}"/> </Grid> </DataTemplate> <DataTemplate x:Key="ChannelWithCurrentProgramDataTemplate" DataType="{x:Type collections:ListItem}"> <Grid x:Name="ItemControl" VerticalAlignment="Center" HorizontalAlignment="Stretch" RenderTransformOrigin="0.5,0.5" Margin="-80,0,-10,0"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <!-- Channel Logo --> <ColumnDefinition Width="400"/> <!-- Channel Name --> <ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/> <!-- Program Title --> <ColumnDefinition Width="200"/> <!-- Program Time --> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Grid.RenderTransform> <TransformGroup> <ScaleTransform ScaleX="1" ScaleY="1"/> </TransformGroup> </Grid.RenderTransform> <Border x:Name="Item1" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="#33000000" BorderThickness="0" Margin="0,-5,5,-5"/> <Border x:Name="Item2" Grid.Row="0" Grid.Column="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="#33000000" BorderThickness="0" Margin="0,-5,5,-5"/> <Border x:Name="Item3" Grid.Row="0" Grid.Column="3" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="#33000000" BorderThickness="0" Margin="0,-5,15,-5"/> <Border x:Name="Item4" Grid.Row="0" Grid.Column="4" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="#33000000" BorderThickness="0" Margin="-10,-5,-15,-5"/> <Border x:Name="Item3_record" Grid.Row="0" Grid.Column="3" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" BorderThickness="0" Margin="0,-5,15,-5"/> <Border x:Name="Item4_record" Grid.Row="0" Grid.Column="4" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" BorderThickness="0" Margin="-10,-5,-15,-5"/> <Border x:Name="Item1_overlay" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" BorderThickness="0" Margin="0,-5,5,-5"/> <Border x:Name="Item2_overlay" Grid.Row="0" Grid.Column="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" BorderThickness="0" Margin="0,-5,5,-5"/> <Border x:Name="Item3_overlay" Grid.Row="0" Grid.Column="3" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" BorderThickness="0" Margin="0,-5,15,-5"/> <Border x:Name="Item4_overlay" Grid.Row="0" Grid.Column="4" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" BorderThickness="0" Margin="-10,-5,-15,-5"/> <Label Grid.Column="1" Grid.Row="0" x:Name="NameLabel" Margin="3,5,0,5" Content="{Binding [Name]}" Color="{ThemeResource TextColor}" VerticalAlignment="Center" FontSize="{ThemeResource SmallFontSize}"/> <Image x:Name="ChannelLogo" Grid.Column="0" Grid.Row="0" Width="{ThemeResource ChannelLogoMedium}" Stretch="Uniform" Margin="10,0,10,0" VerticalAlignment="Center"> <Image.Source> <fanart:FanArtImageSource fanart:FanArtMediaType="{Binding ChannelLogoType}" fanart:FanArtType="Banner" fanart:FanArtName="{Binding ChannelLogoPath}" fanart:MaxWidth="0" fanart:MaxHeight="0"/> </Image.Source> </Image> <Label Grid.Column="2" Grid.Row="0" x:Name="CurrentProgramLabel" Margin="5,5,5,5" Content="{Binding Programs[0].Program.Title}" FontSize="{ThemeResource SmallFontSize}" Color="{ThemeResource TextColor}"/> <Label Grid.Column="3" Grid.Row="0" x:Name="NextProgramLabel" Margin="5,4,15,4" Content="{Binding Programs[1].Program.Title}" FontSize="{ThemeResource SmallFontSize}" Color="{ThemeResource TextColor}"/> <!-- Shows the progress of current time in relation to the current playing program --> <ProgressBar x:Name="CurrentProgramProgress" Grid.Column="4" Grid.Row="0" Height="20" HorizontalAlignment="Stretch" VerticalAlignment="Center" Value="{Binding Programs[0].Progress}" Style="{ThemeResource TVProgressBarStyle}"/> </Grid> </DataTemplate> <DataTemplate x:Key="SearchProgramDataTemplate" DataType="{x:Type collections:ListItem}"> <Grid x:Name="ItemControl" VerticalAlignment="Center" HorizontalAlignment="Stretch" RenderTransformOrigin="0.5,0.5" Margin="-80,0,-15,0"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <!-- Channel Logo --> <ColumnDefinition Width="350"/> <!-- Channel Name --> <ColumnDefinition Width="*"/> <!-- Program Title --> <ColumnDefinition Width="400"/> <!-- Program Time --> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Grid.RenderTransform> <TransformGroup> <ScaleTransform ScaleX="1" ScaleY="1"/> </TransformGroup> </Grid.RenderTransform> <Image Grid.Column="2" x:Name="SeriesRecIndicator" Source="tvguide_recordserie_button.png" IsVisible="False" Height="{ThemeResource SeriesRecIndicatorHeight}" Stretch="Uniform" HorizontalAlignment="Right"/> <Border x:Name="Item1" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="#33000000" BorderThickness="0" Margin="0,-5,5,-5"/> <Border x:Name="Item2" Grid.Row="0" Grid.Column="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="#33000000" BorderThickness="0" Margin="0,-5,15,-5"/> <Border x:Name="Item3" Grid.Row="0" Grid.Column="3" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="#33000000" BorderThickness="0" Margin="-10,-5,-15,-5"/> <Border x:Name="Item2_record" Grid.Row="0" Grid.Column="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" BorderThickness="0" Margin="0,-5,15,-5"/> <Border x:Name="Item3_record" Grid.Row="0" Grid.Column="3" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" BorderThickness="0" Margin="-10,-5,-15,-5"/> <Border x:Name="Item1_overlay" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" BorderThickness="0" Margin="0,-5,5,-5"/> <Border x:Name="Item2_overlay" Grid.Row="0" Grid.Column="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" BorderThickness="0" Margin="0,-5,15,-5"/> <Border x:Name="Item3_overlay" Grid.Row="0" Grid.Column="3" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" BorderThickness="0" Margin="-10,-5,-15,-5"/> <Label Grid.Column="1" Grid.Row="0" x:Name="NameLabel" Margin="3,5,20,5" Content="{Binding Program.ChannelName}" Color="{ThemeResource TextColor}" VerticalAlignment="Center" FontSize="{ThemeResource SmallFontSize}"/> <Image x:Name="ChannelLogo" Grid.Column="0" Grid.Row="0" Width="{ThemeResource ChannelLogoMedium}" Stretch="Uniform" Margin="10,0,10,0" VerticalAlignment="Center"> <Image.Source> <fanart:FanArtImageSource fanart:FanArtMediaType="{Binding Program.ChannelLogoType}" fanart:FanArtType="Banner" fanart:FanArtName="{Binding Program.ChannelName}" fanart:MaxWidth="0" fanart:MaxHeight="0"/> </Image.Source> </Image> <Label Grid.Column="2" Grid.Row="0" x:Name="CurrentProgramLabel" Margin="5,5,20,5" Content="{Binding [Name]}" FontSize="{ThemeResource SmallFontSize}" Color="{ThemeResource TextColor}"/> <StackPanel Orientation="Horizontal" Grid.Column="3" Grid.Row="0" Margin="5,5,15,5"> <Label x:Name="ProgramStart" Margin="0,0,0,0" Color="{ThemeResource TextColor}" FontSize="{ThemeResource SmallFontSize}" Content="{Binding [StartTime]}"/> <Label Margin="5,0,5,0" Content="—" Color="{ThemeResource TextColor}" FontSize="{ThemeResource SmallFontSize}"/> <Label x:Name="ProgramEnd" Content="{Binding [EndTime]}" FontSize="{ThemeResource SmallFontSize}" Color="{ThemeResource TextColor}"/> </StackPanel> </Grid> </DataTemplate> <Style x:Key="ChannelWithLogoAndProgramListViewStyle" BasedOn="{ThemeResource TVListViewStyle}"> <Setter Property="ItemTemplate" Value="{ThemeResource ChannelWithCurrentProgramDataTemplate}"/> <Setter Property="ItemContainerStyle" Value="{ThemeResource TVItemContainerStyle2}"/> </Style> <Style x:Key="SingleChannelWithLogoAndProgramListViewStyle" BasedOn="{ThemeResource TVListViewStyle}"> <Setter Property="ItemTemplate" Value="{ThemeResource SingleChannelWithCurrentProgramDataTemplate}"/> <Setter Property="ItemContainerStyle" Value="{ThemeResource TVItemContainerStyle}"/> </Style> <Style x:Key="SearchProgramListViewStyle" BasedOn="{ThemeResource TVListViewStyle}"> <Setter Property="ItemTemplate" Value="{ThemeResource SearchProgramDataTemplate}"/> <Setter Property="ItemContainerStyle" Value="{ThemeResource TVItemContainerStyle}"/> </Style> <DataTemplate x:Key="ExtScheduleItemDataTemplate" DataType="{x:Type collections:ListItem}"> <Grid x:Name="ItemControl" VerticalAlignment="Center" HorizontalAlignment="Stretch"> <Grid.ColumnDefinitions> <ColumnDefinition Width="480"/> <ColumnDefinition Width="780"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Border x:Name="Item1" Grid.Row="0" Grid.Column="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="#33000000" BorderThickness="0" Margin="0,-5,2,-5"/> <Border x:Name="Item2" Grid.Row="0" Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="#33000000" BorderThickness="0" Margin="2,-5,2,-5"/> <Border x:Name="Item3" Grid.Row="0" Grid.Column="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="#33000000" BorderThickness="0" Margin="2,-5,-2,-5"/> <Border x:Name="Item1_overlay" Grid.Row="0" Grid.Column="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" BorderThickness="0" Margin="0,-5,2,-5"/> <Border x:Name="Item2_overlay" Grid.Row="0" Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" BorderThickness="0" Margin="2,-5,2,-5"/> <Border x:Name="Item3_overlay" Grid.Row="0" Grid.Column="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" BorderThickness="0" Margin="2,-5,-2,-5"/> <Border x:Name="Item2_record" Grid.Row="0" Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" BorderThickness="0" Margin="2,-5,2,-5"/> <Border x:Name="Item3_record" Grid.Row="0" Grid.Column="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" BorderThickness="0" Margin="2,-5,-2,-5"/> <StackPanel Orientation="Horizontal" Grid.Column="0" x:Name="Channel"> <Image x:Name="ChannelLogo" Height="40" Stretch="Uniform" Margin="5,2,5,2"> <Image.Source> <fanart:FanArtImageSource fanart:FanArtMediaType="{Binding [ChannelLogoType]}" fanart:FanArtType="Banner" fanart:FanArtName="{Binding [ChannelName]}" fanart:MaxWidth="0" fanart:MaxHeight="0"/> </Image.Source> </Image> <Label x:Name="ChannelText" Scroll="Auto" Content="{Binding [ChannelName]}" Color="{ThemeResource TextColor}" FontSize="{ThemeResource SmallFontSize}" Margin="5,0,10,0" VerticalAlignment="Center"/> </StackPanel> <Label x:Name="ItemLabel" Grid.Column="1" Color="{ThemeResource TextColor}" Scroll="Auto" FontSize="{ThemeResource SmallFontSize}" Margin="10,0,10,0" VerticalAlignment="Center"> <Label.Content> <MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}" ConverterParameter="{}{0}+{1}+{2}"> <Binding Path="[Name]" Converter="{StaticResource StringFormatConverter}" ConverterParameter="{}{0}"/> <Binding Source=" "/> <Binding Path="[Series]" Converter="{StaticResource StringFormatConverter}" ConverterParameter="{}{0}"/> </MultiBinding> </Label.Content> </Label> <Label Grid.Column="2" x:Name="ProgramStartEnd" Margin="10,0,10,0" Color="{ThemeResource TextColor}" VerticalAlignment="Center" FontSize="{ThemeResource SmallFontSize}"> <Label.Content> <MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}" ConverterParameter="{}{0}+{1}+{2}"> <Binding Path="[StartTime]"/> <Binding Source=" — "/> <Binding Path="[EndTime]"/> </MultiBinding> </Label.Content> </Label> </Grid> </DataTemplate> <!-- ScheduleDataTemplate contains channel logo, title, recording type --> <DataTemplate x:Key="ScheduleDataTemplate" DataType="{x:Type collections:ListItem}"> <Grid x:Name="ItemControl" VerticalAlignment="Center" HorizontalAlignment="Stretch"> <Grid.ColumnDefinitions> <ColumnDefinition Width="430"/> <ColumnDefinition Width="550"/> <ColumnDefinition Width="*"/> <ColumnDefinition Width="400"/> </Grid.ColumnDefinitions> <Border x:Name="Item1" Grid.Row="0" Grid.Column="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="#33000000" BorderThickness="0" Margin="-2,-5,2,-5"/> <Border x:Name="Item2" Grid.Row="0" Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="#33000000" BorderThickness="0" Margin="2,-5,2,-5"/> <Border x:Name="Item3" Grid.Row="0" Grid.Column="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="#33000000" BorderThickness="0" Margin="2,-5,2,-5"/> <Border x:Name="Item4" Grid.Row="0" Grid.Column="3" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="#33000000" BorderThickness="0" Margin="2,-5,0,-5"/> <StackPanel Orientation="Horizontal" Grid.Column="0" x:Name="Channel"> <Image x:Name="ChannelLogo" Height="40" Stretch="Uniform" Margin="5,2,5,2"> <Image.Source> <fanart:FanArtImageSource fanart:FanArtMediaType="{Binding [ChannelLogoType]}" fanart:FanArtType="Banner" fanart:FanArtName="{Binding [ChannelName]}" fanart:MaxWidth="0" fanart:MaxHeight="0"/> </Image.Source> </Image> <Label x:Name="ChannelText" Content="{Binding [ChannelName]}" Color="{ThemeResource TextColor}" FontSize="{ThemeResource SmallFontSize}" Margin="5,0,10,0" VerticalAlignment="Center" HorizontalAlignment="Stretch"/> </StackPanel> <Label x:Name="ItemLabel" Grid.Column="1" Content="{Binding [Name]}" Color="{ThemeResource TextColor}" FontSize="{ThemeResource SmallFontSize}" Margin="10,0,10,0" VerticalAlignment="Center" HorizontalAlignment="Stretch"/> <Label x:Name="TypeLabel" Grid.Column="2" Content="{Binding [ScheduleType]}" VerticalAlignment="Center" Color="{ThemeResource TextColor}" FontSize="{ThemeResource SmallFontSize}" Margin="10,0,10,0" HorizontalAlignment="Stretch" /> <Label Grid.Column="3" x:Name="ProgramStartEnd" Margin="10,0,10,0" Color="{ThemeResource TextColor}" VerticalAlignment="Center" FontSize="{ThemeResource SmallFontSize}"> <Label.Content> <MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}" ConverterParameter="{}{0}+{1}+{2}"> <Binding Path="[StartTime]"/> <Binding Source=" — "/> <Binding Path="[EndTime]"/> </MultiBinding> </Label.Content> </Label> </Grid> </DataTemplate> <!-- ScheduleListViewStyle is used for schedule list, including channel, program and recording type --> <Style x:Key="ScheduleListViewStyle" BasedOn="{ThemeResource TVListViewStyle}"> <Setter Property="ItemTemplate" Value="{ThemeResource ScheduleDataTemplate}"/> <Setter Property="ItemContainerStyle" Value="{ThemeResource ScheduleItemContainerStyle}"/> </Style> <Style x:Key="ExtScheduleListViewStyle" BasedOn="{ThemeResource TVListViewStyle}"> <Setter Property="ItemTemplate" Value="{ThemeResource ExtScheduleItemDataTemplate}"/> <Setter Property="ItemContainerStyle" Value="{ThemeResource ExtScheduleItemContainerStyle}"/> </Style> </ResourceDictionary>
{ "pile_set_name": "Github" }
// Copyright 2014 The gocui Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "fmt" "log" "github.com/jroimartin/gocui" ) func main() { g, err := gocui.NewGui(gocui.OutputNormal) if err != nil { log.Panicln(err) } defer g.Close() g.SetManagerFunc(layout) if err := g.SetKeybinding("", gocui.KeyCtrlC, gocui.ModNone, quit); err != nil { log.Panicln(err) } if err := g.MainLoop(); err != nil && err != gocui.ErrQuit { log.Panicln(err) } } func layout(g *gocui.Gui) error { maxX, maxY := g.Size() if v, err := g.SetView("hello", maxX/2-7, maxY/2, maxX/2+7, maxY/2+2); err != nil { if err != gocui.ErrUnknownView { return err } fmt.Fprintln(v, "Hello world!") } return nil } func quit(g *gocui.Gui, v *gocui.View) error { return gocui.ErrQuit }
{ "pile_set_name": "Github" }
/* * Copyright (C) 2012-2013 Team XBMC * http://xbmc.org * * This Program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This Program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with XBMC; see the file COPYING. If not, see * <http://www.gnu.org/licenses/>. * */ #define USE_DEMUX // enable including of the demuxer packet structure #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <string> #include "../../../lib/addons/library.xbmc.pvr/libXBMC_pvr.h" #include "addons/AddonCallbacks.h" #include "cores/dvdplayer/DVDDemuxers/DVDDemuxPacket.h" #ifdef _WIN32 #include <windows.h> #define DLLEXPORT __declspec(dllexport) #else #define DLLEXPORT #endif using namespace std; extern "C" { DLLEXPORT void* PVR_register_me(void *hdl) { CB_PVRLib *cb = NULL; if (!hdl) fprintf(stderr, "libXBMC_pvr-ERROR: PVRLib_register_me is called with NULL handle !!!\n"); else { cb = ((AddonCB*)hdl)->PVRLib_RegisterMe(((AddonCB*)hdl)->addonData); if (!cb) fprintf(stderr, "libXBMC_pvr-ERROR: PVRLib_register_me can't get callback table from XBMC !!!\n"); } return cb; } DLLEXPORT void PVR_unregister_me(void *hdl, void* cb) { if (hdl && cb) ((AddonCB*)hdl)->PVRLib_UnRegisterMe(((AddonCB*)hdl)->addonData, (CB_PVRLib*)cb); } DLLEXPORT void PVR_transfer_epg_entry(void *hdl, void* cb, const ADDON_HANDLE handle, const EPG_TAG *epgentry) { if (cb == NULL) return; ((CB_PVRLib*)cb)->TransferEpgEntry(((AddonCB*)hdl)->addonData, handle, epgentry); } DLLEXPORT void PVR_transfer_channel_entry(void *hdl, void* cb, const ADDON_HANDLE handle, const PVR_CHANNEL *chan) { if (cb == NULL) return; ((CB_PVRLib*)cb)->TransferChannelEntry(((AddonCB*)hdl)->addonData, handle, chan); } DLLEXPORT void PVR_transfer_timer_entry(void *hdl, void* cb, const ADDON_HANDLE handle, const PVR_TIMER *timer) { if (cb == NULL) return; ((CB_PVRLib*)cb)->TransferTimerEntry(((AddonCB*)hdl)->addonData, handle, timer); } DLLEXPORT void PVR_transfer_recording_entry(void *hdl, void* cb, const ADDON_HANDLE handle, const PVR_RECORDING *recording) { if (cb == NULL) return; ((CB_PVRLib*)cb)->TransferRecordingEntry(((AddonCB*)hdl)->addonData, handle, recording); } DLLEXPORT void PVR_add_menu_hook(void *hdl, void* cb, PVR_MENUHOOK *hook) { if (cb == NULL) return; ((CB_PVRLib*)cb)->AddMenuHook(((AddonCB*)hdl)->addonData, hook); } DLLEXPORT void PVR_recording(void *hdl, void* cb, const char *Name, const char *FileName, bool On) { if (cb == NULL) return; ((CB_PVRLib*)cb)->Recording(((AddonCB*)hdl)->addonData, Name, FileName, On); } DLLEXPORT void PVR_trigger_channel_update(void *hdl, void* cb) { if (cb == NULL) return; ((CB_PVRLib*)cb)->TriggerChannelUpdate(((AddonCB*)hdl)->addonData); } DLLEXPORT void PVR_trigger_channel_groups_update(void *hdl, void* cb) { if (cb == NULL) return; ((CB_PVRLib*)cb)->TriggerChannelGroupsUpdate(((AddonCB*)hdl)->addonData); } DLLEXPORT void PVR_trigger_timer_update(void *hdl, void* cb) { if (cb == NULL) return; ((CB_PVRLib*)cb)->TriggerTimerUpdate(((AddonCB*)hdl)->addonData); } DLLEXPORT void PVR_trigger_recording_update(void *hdl, void* cb) { if (cb == NULL) return; ((CB_PVRLib*)cb)->TriggerRecordingUpdate(((AddonCB*)hdl)->addonData); } DLLEXPORT void PVR_trigger_epg_update(void* hdl, void* cb, unsigned int iChannelUid) { if (cb == NULL) return; ((CB_PVRLib*)cb)->TriggerEpgUpdate(((AddonCB*)hdl)->addonData, iChannelUid); } DLLEXPORT void PVR_free_demux_packet(void *hdl, void* cb, DemuxPacket* pPacket) { if (cb == NULL) return; ((CB_PVRLib*)cb)->FreeDemuxPacket(((AddonCB*)hdl)->addonData, pPacket); } DLLEXPORT DemuxPacket* PVR_allocate_demux_packet(void *hdl, void* cb, int iDataSize) { if (cb == NULL) return NULL; return ((CB_PVRLib*)cb)->AllocateDemuxPacket(((AddonCB*)hdl)->addonData, iDataSize); } DLLEXPORT void PVR_transfer_channel_group(void *hdl, void* cb, const ADDON_HANDLE handle, const PVR_CHANNEL_GROUP *group) { if (cb == NULL) return; ((CB_PVRLib*)cb)->TransferChannelGroup(((AddonCB*)hdl)->addonData, handle, group); } DLLEXPORT void PVR_transfer_channel_group_member(void *hdl, void* cb, const ADDON_HANDLE handle, const PVR_CHANNEL_GROUP_MEMBER *member) { if (cb == NULL) return; ((CB_PVRLib*)cb)->TransferChannelGroupMember(((AddonCB*)hdl)->addonData, handle, member); } };
{ "pile_set_name": "Github" }
.class public final Lcom/google/android/gms/drive/events/TransferProgressEvent; .super Ljava/lang/Object; # interfaces .implements Lcom/google/android/gms/drive/events/DriveEvent; # static fields .field public static final CREATOR:Landroid/os/Parcelable$Creator; .annotation system Ldalvik/annotation/Signature; value = { "Landroid/os/Parcelable$Creator", "<", "Lcom/google/android/gms/drive/events/TransferProgressEvent;", ">;" } .end annotation .end field # instance fields .field final a:I .field public final b:Lcom/google/android/gms/drive/events/internal/TransferProgressData; # direct methods .method static constructor <clinit>()V .locals 1 new-instance v0, Lcom/google/android/gms/drive/events/l; invoke-direct {v0}, Lcom/google/android/gms/drive/events/l;-><init>()V sput-object v0, Lcom/google/android/gms/drive/events/TransferProgressEvent;->CREATOR:Landroid/os/Parcelable$Creator; return-void .end method .method constructor <init>(ILcom/google/android/gms/drive/events/internal/TransferProgressData;)V .locals 0 invoke-direct {p0}, Ljava/lang/Object;-><init>()V iput p1, p0, Lcom/google/android/gms/drive/events/TransferProgressEvent;->a:I iput-object p2, p0, Lcom/google/android/gms/drive/events/TransferProgressEvent;->b:Lcom/google/android/gms/drive/events/internal/TransferProgressData; return-void .end method # virtual methods .method public final a()I .locals 1 const/16 v0, 0x8 return v0 .end method .method public final describeContents()I .locals 1 const/4 v0, 0x0 return v0 .end method .method public final equals(Ljava/lang/Object;)Z .locals 2 if-eqz p1, :cond_0 invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class; move-result-object v0 invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class; move-result-object v1 if-eq v0, v1, :cond_1 :cond_0 const/4 v0, 0x0 :goto_0 return v0 :cond_1 if-ne p1, p0, :cond_2 const/4 v0, 0x1 goto :goto_0 :cond_2 check-cast p1, Lcom/google/android/gms/drive/events/TransferProgressEvent; iget-object v0, p0, Lcom/google/android/gms/drive/events/TransferProgressEvent;->b:Lcom/google/android/gms/drive/events/internal/TransferProgressData; iget-object v1, p1, Lcom/google/android/gms/drive/events/TransferProgressEvent;->b:Lcom/google/android/gms/drive/events/internal/TransferProgressData; invoke-static {v0, v1}, Lcom/google/android/gms/common/internal/aw;->a(Ljava/lang/Object;Ljava/lang/Object;)Z move-result v0 goto :goto_0 .end method .method public final hashCode()I .locals 3 const/4 v0, 0x1 new-array v0, v0, [Ljava/lang/Object; const/4 v1, 0x0 iget-object v2, p0, Lcom/google/android/gms/drive/events/TransferProgressEvent;->b:Lcom/google/android/gms/drive/events/internal/TransferProgressData; aput-object v2, v0, v1 invoke-static {v0}, Ljava/util/Arrays;->hashCode([Ljava/lang/Object;)I move-result v0 return v0 .end method .method public final toString()Ljava/lang/String; .locals 4 const-string/jumbo v0, "TransferProgressEvent[%s]" const/4 v1, 0x1 new-array v1, v1, [Ljava/lang/Object; const/4 v2, 0x0 iget-object v3, p0, Lcom/google/android/gms/drive/events/TransferProgressEvent;->b:Lcom/google/android/gms/drive/events/internal/TransferProgressData; invoke-virtual {v3}, Lcom/google/android/gms/drive/events/internal/TransferProgressData;->toString()Ljava/lang/String; move-result-object v3 aput-object v3, v1, v2 invoke-static {v0, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; move-result-object v0 return-object v0 .end method .method public final writeToParcel(Landroid/os/Parcel;I)V .locals 0 invoke-static {p0, p1, p2}, Lcom/google/android/gms/drive/events/l;->a(Lcom/google/android/gms/drive/events/TransferProgressEvent;Landroid/os/Parcel;I)V return-void .end method
{ "pile_set_name": "Github" }
<?php /** * System messages translation for CodeIgniter(tm) * * @author CodeIgniter community * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com */ defined('BASEPATH') OR exit('No direct script access allowed'); $lang['pagination_first_link'] = '&lsaquo; První'; $lang['pagination_next_link'] = '&gt;'; $lang['pagination_prev_link'] = '&lt;'; $lang['pagination_last_link'] = 'Poslední &rsaquo;';
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="iso-8859-1"?> <project> <fileVersion>2</fileVersion> <configuration> <name>HT32</name> <toolchain> <name>ARM</name> </toolchain> <debug>1</debug> <settings> <name>C-SPY</name> <archiveVersion>2</archiveVersion> <data> <version>25</version> <wantNonLocal>1</wantNonLocal> <debug>1</debug> <option> <name>CInput</name> <state>1</state> </option> <option> <name>CEndian</name> <state>1</state> </option> <option> <name>CProcessor</name> <state>1</state> </option> <option> <name>OCVariant</name> <state>0</state> </option> <option> <name>MacOverride</name> <state>0</state> </option> <option> <name>MacFile</name> <state>$PROJ_DIR$\FlashMacro.mac</state> </option> <option> <name>MemOverride</name> <state>0</state> </option> <option> <name>MemFile</name> <state>$TOOLKIT_DIR$\CONFIG\debugger\Holtek\HT32F57352.ddf</state> </option> <option> <name>RunToEnable</name> <state>0</state> </option> <option> <name>RunToName</name> <state>main</state> </option> <option> <name>CExtraOptionsCheck</name> <state>0</state> </option> <option> <name>CExtraOptions</name> <state></state> </option> <option> <name>CFpuProcessor</name> <state>1</state> </option> <option> <name>OCDDFArgumentProducer</name> <state></state> </option> <option> <name>OCDownloadSuppressDownload</name> <state>0</state> </option> <option> <name>OCDownloadVerifyAll</name> <state>1</state> </option> <option> <name>OCProductVersion</name> <state>5.41.0.51757</state> </option> <option> <name>OCDynDriverList</name> <state>CMSISDAP_ID</state> </option> <option> <name>OCLastSavedByProductVersion</name> <state>6.50.6.4952</state> </option> <option> <name>OCDownloadAttachToProgram</name> <state>0</state> </option> <option> <name>UseFlashLoader</name> <state>1</state> </option> <option> <name>CLowLevel</name> <state>1</state> </option> <option> <name>OCBE8Slave</name> <state>1</state> </option> <option> <name>MacFile2</name> <state></state> </option> <option> <name>CDevice</name> <state>1</state> </option> <option> <name>FlashLoadersV3</name> <state>$TOOLKIT_DIR$\config\flashloader\Holtek\FlashHT32F57352.board</state> </option> <option> <name>OCImagesSuppressCheck1</name> <state>1</state> </option> <option> <name>OCImagesPath1</name> <state>$PROJ_DIR$\HT32\57352\IAP\Exe\IAP_AP.out</state> </option> <option> <name>OCImagesSuppressCheck2</name> <state>0</state> </option> <option> <name>OCImagesPath2</name> <state></state> </option> <option> <name>OCImagesSuppressCheck3</name> <state>0</state> </option> <option> <name>OCImagesPath3</name> <state></state> </option> <option> <name>OverrideDefFlashBoard</name> <state>0</state> </option> <option> <name>OCImagesOffset1</name> <state>0x0</state> </option> <option> <name>OCImagesOffset2</name> <state></state> </option> <option> <name>OCImagesOffset3</name> <state></state> </option> <option> <name>OCImagesUse1</name> <state>1</state> </option> <option> <name>OCImagesUse2</name> <state>0</state> </option> <option> <name>OCImagesUse3</name> <state>0</state> </option> <option> <name>OCDeviceConfigMacroFile</name> <state>1</state> </option> <option> <name>OCDebuggerExtraOption</name> <state>1</state> </option> <option> <name>OCAllMTBOptions</name> <state>1</state> </option> </data> </settings> <settings> <name>ARMSIM_ID</name> <archiveVersion>2</archiveVersion> <data> <version>1</version> <wantNonLocal>1</wantNonLocal> <debug>1</debug> <option> <name>OCSimDriverInfo</name> <state>1</state> </option> <option> <name>OCSimEnablePSP</name> <state>0</state> </option> <option> <name>OCSimPspOverrideConfig</name> <state>0</state> </option> <option> <name>OCSimPspConfigFile</name> <state></state> </option> </data> </settings> <settings> <name>ANGEL_ID</name> <archiveVersion>2</archiveVersion> <data> <version>0</version> <wantNonLocal>1</wantNonLocal> <debug>1</debug> <option> <name>CCAngelHeartbeat</name> <state>1</state> </option> <option> <name>CAngelCommunication</name> <state>1</state> </option> <option> <name>CAngelCommBaud</name> <version>0</version> <state>3</state> </option> <option> <name>CAngelCommPort</name> <version>0</version> <state>0</state> </option> <option> <name>ANGELTCPIP</name> <state>aaa.bbb.ccc.ddd</state> </option> <option> <name>DoAngelLogfile</name> <state>0</state> </option> <option> <name>AngelLogFile</name> <state>$PROJ_DIR$\cspycomm.log</state> </option> <option> <name>OCDriverInfo</name> <state>1</state> </option> </data> </settings> <settings> <name>CMSISDAP_ID</name> <archiveVersion>2</archiveVersion> <data> <version>0</version> <wantNonLocal>1</wantNonLocal> <debug>1</debug> <option> <name>OCDriverInfo</name> <state>1</state> </option> <option> <name>CMSISDAPAttachSlave</name> <state>1</state> </option> <option> <name>OCIarProbeScriptFile</name> <state>1</state> </option> <option> <name>CMSISDAPResetList</name> <version>1</version> <state>4</state> </option> <option> <name>CMSISDAPHWResetDuration</name> <state>300</state> </option> <option> <name>CMSISDAPHWResetDelay</name> <state>200</state> </option> <option> <name>CMSISDAPDoLogfile</name> <state>0</state> </option> <option> <name>CMSISDAPLogFile</name> <state>$PROJ_DIR$\cspycomm.log</state> </option> <option> <name>CMSISDAPInterfaceRadio</name> <state>1</state> </option> <option> <name>CMSISDAPInterfaceCmdLine</name> <state>0</state> </option> <option> <name>CMSISDAPMultiTargetEnable</name> <state>0</state> </option> <option> <name>CMSISDAPMultiTarget</name> <state>0</state> </option> <option> <name>CMSISDAPJtagSpeedList</name> <version>0</version> <state>0</state> </option> <option> <name>CMSISDAPBreakpointRadio</name> <state>0</state> </option> <option> <name>CMSISDAPRestoreBreakpointsCheck</name> <state>0</state> </option> <option> <name>CMSISDAPUpdateBreakpointsEdit</name> <state>_call_main</state> </option> <option> <name>RDICatchReset</name> <state>0</state> </option> <option> <name>RDICatchUndef</name> <state>0</state> </option> <option> <name>RDICatchSWI</name> <state>0</state> </option> <option> <name>RDICatchData</name> <state>0</state> </option> <option> <name>RDICatchPrefetch</name> <state>0</state> </option> <option> <name>RDICatchIRQ</name> <state>0</state> </option> <option> <name>RDICatchFIQ</name> <state>0</state> </option> <option> <name>CatchCORERESET</name> <state>0</state> </option> <option> <name>CatchMMERR</name> <state>0</state> </option> <option> <name>CatchNOCPERR</name> <state>0</state> </option> <option> <name>CatchCHKERR</name> <state>0</state> </option> <option> <name>CatchSTATERR</name> <state>0</state> </option> <option> <name>CatchBUSERR</name> <state>0</state> </option> <option> <name>CatchINTERR</name> <state>0</state> </option> <option> <name>CatchHARDERR</name> <state>0</state> </option> <option> <name>CatchDummy</name> <state>0</state> </option> <option> <name>CMSISDAPMultiCPUEnable</name> <state>0</state> </option> <option> <name>CMSISDAPMultiCPUNumber</name> <state>0</state> </option> </data> </settings> <settings> <name>GDBSERVER_ID</name> <archiveVersion>2</archiveVersion> <data> <version>0</version> <wantNonLocal>1</wantNonLocal> <debug>1</debug> <option> <name>OCDriverInfo</name> <state>1</state> </option> <option> <name>TCPIP</name> <state>aaa.bbb.ccc.ddd</state> </option> <option> <name>DoLogfile</name> <state>0</state> </option> <option> <name>LogFile</name> <state>$PROJ_DIR$\cspycomm.log</state> </option> <option> <name>CCJTagBreakpointRadio</name> <state>0</state> </option> <option> <name>CCJTagDoUpdateBreakpoints</name> <state>0</state> </option> <option> <name>CCJTagUpdateBreakpoints</name> <state>main</state> </option> </data> </settings> <settings> <name>IARROM_ID</name> <archiveVersion>2</archiveVersion> <data> <version>1</version> <wantNonLocal>1</wantNonLocal> <debug>1</debug> <option> <name>CRomLogFileCheck</name> <state>0</state> </option> <option> <name>CRomLogFileEditB</name> <state>$PROJ_DIR$\cspycomm.log</state> </option> <option> <name>CRomCommPort</name> <version>0</version> <state>0</state> </option> <option> <name>CRomCommBaud</name> <version>0</version> <state>7</state> </option> <option> <name>OCDriverInfo</name> <state>1</state> </option> </data> </settings> <settings> <name>IJET_ID</name> <archiveVersion>2</archiveVersion> <data> <version>2</version> <wantNonLocal>1</wantNonLocal> <debug>1</debug> <option> <name>OCDriverInfo</name> <state>1</state> </option> <option> <name>IjetAttachSlave</name> <state>1</state> </option> <option> <name>OCIarProbeScriptFile</name> <state>1</state> </option> <option> <name>IjetResetList</name> <version>1</version> <state>10</state> </option> <option> <name>IjetHWResetDuration</name> <state>300</state> </option> <option> <name>IjetHWResetDelay</name> <state>200</state> </option> <option> <name>IjetPowerFromProbe</name> <state>1</state> </option> <option> <name>IjetPowerRadio</name> <state>1</state> </option> <option> <name>IjetDoLogfile</name> <state>0</state> </option> <option> <name>IjetLogFile</name> <state>$PROJ_DIR$\cspycomm.log</state> </option> <option> <name>IjetInterfaceRadio</name> <state>0</state> </option> <option> <name>IjetInterfaceCmdLine</name> <state>0</state> </option> <option> <name>IjetMultiTargetEnable</name> <state>0</state> </option> <option> <name>IjetMultiTarget</name> <state>0</state> </option> <option> <name>IjetScanChainNonARMDevices</name> <state>0</state> </option> <option> <name>IjetIRLength</name> <state>0</state> </option> <option> <name>IjetJtagSpeedList</name> <version>0</version> <state>0</state> </option> <option> <name>IjetProtocolRadio</name> <state>0</state> </option> <option> <name>IjetSwoPin</name> <state>0</state> </option> <option> <name>IjetCpuClockEdit</name> <state>72.0</state> </option> <option> <name>IjetSwoPrescalerList</name> <version>1</version> <state>0</state> </option> <option> <name>IjetBreakpointRadio</name> <state>0</state> </option> <option> <name>IjetRestoreBreakpointsCheck</name> <state>0</state> </option> <option> <name>IjetUpdateBreakpointsEdit</name> <state>_call_main</state> </option> <option> <name>RDICatchReset</name> <state>0</state> </option> <option> <name>RDICatchUndef</name> <state>0</state> </option> <option> <name>RDICatchSWI</name> <state>0</state> </option> <option> <name>RDICatchData</name> <state>0</state> </option> <option> <name>RDICatchPrefetch</name> <state>0</state> </option> <option> <name>RDICatchIRQ</name> <state>0</state> </option> <option> <name>RDICatchFIQ</name> <state>0</state> </option> <option> <name>CatchCORERESET</name> <state>0</state> </option> <option> <name>CatchMMERR</name> <state>0</state> </option> <option> <name>CatchNOCPERR</name> <state>0</state> </option> <option> <name>CatchCHKERR</name> <state>0</state> </option> <option> <name>CatchSTATERR</name> <state>0</state> </option> <option> <name>CatchBUSERR</name> <state>0</state> </option> <option> <name>CatchINTERR</name> <state>0</state> </option> <option> <name>CatchHARDERR</name> <state>0</state> </option> <option> <name>CatchDummy</name> <state>0</state> </option> <option> <name>OCProbeCfgOverride</name> <state>0</state> </option> <option> <name>OCProbeConfig</name> <state></state> </option> <option> <name>IjetProbeConfigRadio</name> <state>0</state> </option> <option> <name>IjetMultiCPUEnable</name> <state>0</state> </option> <option> <name>IjetMultiCPUNumber</name> <state>0</state> </option> <option> <name>IjetSelectedCPUBehaviour</name> <state>0</state> </option> <option> <name>ICpuName</name> <state></state> </option> </data> </settings> <settings> <name>JLINK_ID</name> <archiveVersion>2</archiveVersion> <data> <version>15</version> <wantNonLocal>1</wantNonLocal> <debug>1</debug> <option> <name>JLinkSpeed</name> <state>32</state> </option> <option> <name>CCJLinkDoLogfile</name> <state>0</state> </option> <option> <name>CCJLinkLogFile</name> <state>$PROJ_DIR$\cspycomm.log</state> </option> <option> <name>CCJLinkHWResetDelay</name> <state>0</state> </option> <option> <name>OCDriverInfo</name> <state>1</state> </option> <option> <name>JLinkInitialSpeed</name> <state>32</state> </option> <option> <name>CCDoJlinkMultiTarget</name> <state>0</state> </option> <option> <name>CCScanChainNonARMDevices</name> <state>0</state> </option> <option> <name>CCJLinkMultiTarget</name> <state>0</state> </option> <option> <name>CCJLinkIRLength</name> <state>0</state> </option> <option> <name>CCJLinkCommRadio</name> <state>0</state> </option> <option> <name>CCJLinkTCPIP</name> <state>aaa.bbb.ccc.ddd</state> </option> <option> <name>CCJLinkSpeedRadioV2</name> <state>0</state> </option> <option> <name>CCUSBDevice</name> <version>1</version> <state>1</state> </option> <option> <name>CCRDICatchReset</name> <state>0</state> </option> <option> <name>CCRDICatchUndef</name> <state>0</state> </option> <option> <name>CCRDICatchSWI</name> <state>0</state> </option> <option> <name>CCRDICatchData</name> <state>0</state> </option> <option> <name>CCRDICatchPrefetch</name> <state>0</state> </option> <option> <name>CCRDICatchIRQ</name> <state>0</state> </option> <option> <name>CCRDICatchFIQ</name> <state>0</state> </option> <option> <name>CCJLinkBreakpointRadio</name> <state>0</state> </option> <option> <name>CCJLinkDoUpdateBreakpoints</name> <state>0</state> </option> <option> <name>CCJLinkUpdateBreakpoints</name> <state>main</state> </option> <option> <name>CCJLinkInterfaceRadio</name> <state>1</state> </option> <option> <name>OCJLinkAttachSlave</name> <state>1</state> </option> <option> <name>CCJLinkResetList</name> <version>6</version> <state>7</state> </option> <option> <name>CCJLinkInterfaceCmdLine</name> <state>0</state> </option> <option> <name>CCCatchCORERESET</name> <state>0</state> </option> <option> <name>CCCatchMMERR</name> <state>0</state> </option> <option> <name>CCCatchNOCPERR</name> <state>0</state> </option> <option> <name>CCCatchCHRERR</name> <state>0</state> </option> <option> <name>CCCatchSTATERR</name> <state>0</state> </option> <option> <name>CCCatchBUSERR</name> <state>0</state> </option> <option> <name>CCCatchINTERR</name> <state>0</state> </option> <option> <name>CCCatchHARDERR</name> <state>0</state> </option> <option> <name>CCCatchDummy</name> <state>0</state> </option> <option> <name>OCJLinkScriptFile</name> <state>1</state> </option> <option> <name>CCJLinkUsbSerialNo</name> <state></state> </option> <option> <name>CCTcpIpAlt</name> <version>0</version> <state>0</state> </option> <option> <name>CCJLinkTcpIpSerialNo</name> <state></state> </option> <option> <name>CCCpuClockEdit</name> <state>72.0</state> </option> <option> <name>CCSwoClockAuto</name> <state>0</state> </option> <option> <name>CCSwoClockEdit</name> <state>2000</state> </option> <option> <name>OCJLinkTraceSource</name> <state>0</state> </option> <option> <name>OCJLinkTraceSourceDummy</name> <state>0</state> </option> <option> <name>OCJLinkDeviceName</name> <state>1</state> </option> </data> </settings> <settings> <name>LMIFTDI_ID</name> <archiveVersion>2</archiveVersion> <data> <version>2</version> <wantNonLocal>1</wantNonLocal> <debug>1</debug> <option> <name>OCDriverInfo</name> <state>1</state> </option> <option> <name>LmiftdiSpeed</name> <state>500</state> </option> <option> <name>CCLmiftdiDoLogfile</name> <state>0</state> </option> <option> <name>CCLmiftdiLogFile</name> <state>$PROJ_DIR$\cspycomm.log</state> </option> <option> <name>CCLmiFtdiInterfaceRadio</name> <state>0</state> </option> <option> <name>CCLmiFtdiInterfaceCmdLine</name> <state>0</state> </option> </data> </settings> <settings> <name>MACRAIGOR_ID</name> <archiveVersion>2</archiveVersion> <data> <version>3</version> <wantNonLocal>1</wantNonLocal> <debug>1</debug> <option> <name>jtag</name> <version>0</version> <state>0</state> </option> <option> <name>EmuSpeed</name> <state>1</state> </option> <option> <name>TCPIP</name> <state>aaa.bbb.ccc.ddd</state> </option> <option> <name>DoLogfile</name> <state>0</state> </option> <option> <name>LogFile</name> <state>$PROJ_DIR$\cspycomm.log</state> </option> <option> <name>DoEmuMultiTarget</name> <state>0</state> </option> <option> <name>EmuMultiTarget</name> <state>0@ARM7TDMI</state> </option> <option> <name>EmuHWReset</name> <state>0</state> </option> <option> <name>CEmuCommBaud</name> <version>0</version> <state>4</state> </option> <option> <name>CEmuCommPort</name> <version>0</version> <state>4</state> </option> <option> <name>jtago</name> <version>0</version> <state>0</state> </option> <option> <name>OCDriverInfo</name> <state>1</state> </option> <option> <name>UnusedAddr</name> <state>0x00800000</state> </option> <option> <name>CCMacraigorHWResetDelay</name> <state></state> </option> <option> <name>CCJTagBreakpointRadio</name> <state>0</state> </option> <option> <name>CCJTagDoUpdateBreakpoints</name> <state>0</state> </option> <option> <name>CCJTagUpdateBreakpoints</name> <state>main</state> </option> <option> <name>CCMacraigorInterfaceRadio</name> <state>0</state> </option> <option> <name>CCMacraigorInterfaceCmdLine</name> <state>0</state> </option> </data> </settings> <settings> <name>PEMICRO_ID</name> <archiveVersion>2</archiveVersion> <data> <version>1</version> <wantNonLocal>1</wantNonLocal> <debug>1</debug> <option> <name>OCDriverInfo</name> <state>1</state> </option> <option> <name>OCPEMicroAttachSlave</name> <state>1</state> </option> <option> <name>CCPEMicroInterfaceList</name> <version>0</version> <state>0</state> </option> <option> <name>CCPEMicroResetDelay</name> <state></state> </option> <option> <name>CCPEMicroJtagSpeed</name> <state>1000</state> </option> <option> <name>CCJPEMicroShowSettings</name> <state>0</state> </option> <option> <name>DoLogfile</name> <state>0</state> </option> <option> <name>LogFile</name> <state>$PROJ_DIR$\cspycomm.log</state> </option> <option> <name>CCPEMicroUSBDevice</name> <version>0</version> <state>0</state> </option> <option> <name>CCPEMicroSerialPort</name> <version>0</version> <state>0</state> </option> <option> <name>CCJPEMicroTCPIPAutoScanNetwork</name> <state>1</state> </option> <option> <name>CCPEMicroTCPIP</name> <state>10.0.0.1</state> </option> <option> <name>CCPEMicroCommCmdLineProducer</name> <state>0</state> </option> <option> <name>CCSTLinkInterfaceRadio</name> <state>0</state> </option> <option> <name>CCSTLinkInterfaceCmdLine</name> <state>0</state> </option> </data> </settings> <settings> <name>RDI_ID</name> <archiveVersion>2</archiveVersion> <data> <version>2</version> <wantNonLocal>1</wantNonLocal> <debug>1</debug> <option> <name>CRDIDriverDll</name> <state>C:\Program Files\Holtek HT32 Series\e-Link32 IAR Plugin\e-Link32_rdi.dll</state> </option> <option> <name>CRDILogFileCheck</name> <state>0</state> </option> <option> <name>CRDILogFileEdit</name> <state>$PROJ_DIR$\cspycomm.log</state> </option> <option> <name>CCRDIHWReset</name> <state>0</state> </option> <option> <name>CCRDICatchReset</name> <state>0</state> </option> <option> <name>CCRDICatchUndef</name> <state>0</state> </option> <option> <name>CCRDICatchSWI</name> <state>0</state> </option> <option> <name>CCRDICatchData</name> <state>0</state> </option> <option> <name>CCRDICatchPrefetch</name> <state>0</state> </option> <option> <name>CCRDICatchIRQ</name> <state>0</state> </option> <option> <name>CCRDICatchFIQ</name> <state>0</state> </option> <option> <name>OCDriverInfo</name> <state>1</state> </option> </data> </settings> <settings> <name>STLINK_ID</name> <archiveVersion>2</archiveVersion> <data> <version>2</version> <wantNonLocal>1</wantNonLocal> <debug>1</debug> <option> <name>OCDriverInfo</name> <state>1</state> </option> <option> <name>CCSTLinkInterfaceRadio</name> <state>0</state> </option> <option> <name>CCSTLinkInterfaceCmdLine</name> <state>0</state> </option> <option> <name>CCSTLinkResetList</name> <version>1</version> <state>0</state> </option> <option> <name>CCCpuClockEdit</name> <state>72.0</state> </option> <option> <name>CCSwoClockAuto</name> <state>0</state> </option> <option> <name>CCSwoClockEdit</name> <state>2000</state> </option> </data> </settings> <settings> <name>THIRDPARTY_ID</name> <archiveVersion>2</archiveVersion> <data> <version>0</version> <wantNonLocal>1</wantNonLocal> <debug>1</debug> <option> <name>CThirdPartyDriverDll</name> <state>Browse to your third-party driver</state> </option> <option> <name>CThirdPartyLogFileCheck</name> <state>0</state> </option> <option> <name>CThirdPartyLogFileEditB</name> <state>$PROJ_DIR$\cspycomm.log</state> </option> <option> <name>OCDriverInfo</name> <state>1</state> </option> </data> </settings> <settings> <name>XDS100_ID</name> <archiveVersion>2</archiveVersion> <data> <version>2</version> <wantNonLocal>1</wantNonLocal> <debug>1</debug> <option> <name>OCDriverInfo</name> <state>1</state> </option> <option> <name>OCXDS100AttachSlave</name> <state>1</state> </option> <option> <name>TIPackageOverride</name> <state>0</state> </option> <option> <name>TIPackage</name> <state></state> </option> <option> <name>CCXds100InterfaceList</name> <version>1</version> <state>0</state> </option> <option> <name>BoardFile</name> <state></state> </option> <option> <name>DoLogfile</name> <state>0</state> </option> <option> <name>LogFile</name> <state>$PROJ_DIR$\cspycomm.log</state> </option> </data> </settings> <debuggerPlugins> <plugin> <file>$TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin</file> <loadFlag>0</loadFlag> </plugin> <plugin> <file>$TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin</file> <loadFlag>0</loadFlag> </plugin> <plugin> <file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin</file> <loadFlag>0</loadFlag> </plugin> <plugin> <file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin</file> <loadFlag>0</loadFlag> </plugin> <plugin> <file>$TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin</file> <loadFlag>0</loadFlag> </plugin> <plugin> <file>$TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin</file> <loadFlag>0</loadFlag> </plugin> <plugin> <file>$TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin</file> <loadFlag>0</loadFlag> </plugin> <plugin> <file>$TOOLKIT_DIR$\plugins\rtos\PowerPac\PowerPacRTOS.ewplugin</file> <loadFlag>0</loadFlag> </plugin> <plugin> <file>$TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB6_Plugin.ewplugin</file> <loadFlag>0</loadFlag> </plugin> <plugin> <file>$TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin</file> <loadFlag>0</loadFlag> </plugin> <plugin> <file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin</file> <loadFlag>0</loadFlag> </plugin> <plugin> <file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin</file> <loadFlag>0</loadFlag> </plugin> <plugin> <file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin</file> <loadFlag>0</loadFlag> </plugin> <plugin> <file>$TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin</file> <loadFlag>0</loadFlag> </plugin> <plugin> <file>$EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin</file> <loadFlag>1</loadFlag> </plugin> <plugin> <file>$EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin</file> <loadFlag>0</loadFlag> </plugin> <plugin> <file>$EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin</file> <loadFlag>1</loadFlag> </plugin> <plugin> <file>$EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin</file> <loadFlag>0</loadFlag> </plugin> </debuggerPlugins> </configuration> </project>
{ "pile_set_name": "Github" }
/* * Copyright (C) 2011-2012 Dr. John Lindsay <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package plugins; import java.util.Date; import whitebox.geospatialfiles.WhiteboxRaster; import whitebox.interfaces.WhiteboxPlugin; import whitebox.interfaces.WhiteboxPluginHost; /** * This tool calculates the maximum length of the flowpaths that run through each grid cell (in map horizontal units) in a flow pointer grid. * * @author Dr. John Lindsay email: [email protected] */ public class MaxUpslopeFlowpathLength implements WhiteboxPlugin { private WhiteboxPluginHost myHost = null; private String[] args; // Constants private static final double LnOf2 = 0.693147180559945; /** * Used to retrieve the plugin tool's name. This is a short, unique name * containing no spaces. * * @return String containing plugin name. */ @Override public String getName() { return "MaxUpslopeFlowpathLength"; } /** * Used to retrieve the plugin tool's descriptive name. This can be a longer * name (containing spaces) and is used in the interface to list the tool. * * @return String containing the plugin descriptive name. */ @Override public String getDescriptiveName() { return "Maximum Upslope Flowpath Length"; } /** * Used to retrieve a short description of what the plugin tool does. * * @return String containing the plugin's description. */ @Override public String getToolDescription() { return "Measures the maximum length of all upslope flowpaths draining " + "to each grid cell."; } /** * Used to identify which toolboxes this plugin tool should be listed in. * * @return Array of Strings. */ @Override public String[] getToolbox() { String[] ret = { "FlowpathTAs" }; return ret; } /** * Sets the WhiteboxPluginHost to which the plugin tool is tied. This is the * class that the plugin will send all feedback messages, progress updates, * and return objects. * * @param host The WhiteboxPluginHost that called the plugin tool. */ @Override public void setPluginHost(WhiteboxPluginHost host) { myHost = host; } /** * Used to communicate feedback pop-up messages between a plugin tool and * the main Whitebox user-interface. * * @param feedback String containing the text to display. */ private void showFeedback(String message) { if (myHost != null) { myHost.showFeedback(message); } else { System.out.println(message); } } /** * Used to communicate a return object from a plugin tool to the main * Whitebox user-interface. * * @return Object, such as an output WhiteboxRaster. */ private void returnData(Object ret) { if (myHost != null) { myHost.returnData(ret); } } private int previousProgress = 0; private String previousProgressLabel = ""; /** * Used to communicate a progress update between a plugin tool and the main * Whitebox user interface. * * @param progressLabel A String to use for the progress label. * @param progress Float containing the progress value (between 0 and 100). */ private void updateProgress(String progressLabel, int progress) { if (myHost != null && ((progress != previousProgress) || (!progressLabel.equals(previousProgressLabel)))) { myHost.updateProgress(progressLabel, progress); } previousProgress = progress; previousProgressLabel = progressLabel; } /** * Used to communicate a progress update between a plugin tool and the main * Whitebox user interface. * * @param progress Float containing the progress value (between 0 and 100). */ private void updateProgress(int progress) { if (myHost != null && progress != previousProgress) { myHost.updateProgress(progress); } previousProgress = progress; } /** * Sets the arguments (parameters) used by the plugin. * * @param args An array of string arguments. */ @Override public void setArgs(String[] args) { this.args = args.clone(); } private boolean cancelOp = false; /** * Used to communicate a cancel operation from the Whitebox GUI. * * @param cancel Set to true if the plugin should be canceled. */ @Override public void setCancelOp(boolean cancel) { cancelOp = cancel; } private void cancelOperation() { showFeedback("Operation cancelled."); updateProgress("Progress: ", 0); } private boolean amIActive = false; /** * Used by the Whitebox GUI to tell if this plugin is still running. * * @return a boolean describing whether or not the plugin is actively being * used. */ @Override public boolean isActive() { return amIActive; } /** * Used to execute this plugin tool. */ @Override public void run() { amIActive = true; String inputHeader = null; String outputHeader = null; int row, col, x, y; float progress = 0; double z; double currentVal; int i; int[] dX = new int[]{1, 1, 1, 0, -1, -1, -1, 0}; int[] dY = new int[]{-1, 0, 1, 1, 1, 0, -1, -1}; double[] inflowingVals = new double[]{16, 32, 64, 128, 1, 2, 4, 8}; double numInNeighbours; boolean flag = false; double flowDir = 0; double flowLength = 0; if (args.length <= 0) { showFeedback("Plugin parameters have not been set."); return; } for (i = 0; i < args.length; i++) { if (i == 0) { inputHeader = args[i]; } else if (i == 1) { outputHeader = args[i]; } } // check to see that the inputHeader and outputHeader are not null. if ((inputHeader == null) || (outputHeader == null)) { showFeedback("One or more of the input parameters have not been set properly."); return; } try { WhiteboxRaster pntr = new WhiteboxRaster(inputHeader, "r"); int rows = pntr.getNumberRows(); int cols = pntr.getNumberColumns(); double noData = pntr.getNoDataValue(); double gridResX = pntr.getCellSizeX(); double gridResY = pntr.getCellSizeY(); double diagGridRes = Math.sqrt(gridResX * gridResX + gridResY * gridResY); double[] gridLengths = new double[]{diagGridRes, gridResX, diagGridRes, gridResY, diagGridRes, gridResX, diagGridRes, gridResY}; WhiteboxRaster output = new WhiteboxRaster(outputHeader, "rw", inputHeader, WhiteboxRaster.DataType.FLOAT, 0); output.setPreferredPalette("blueyellow.pal"); output.setDataScale(WhiteboxRaster.DataScale.CONTINUOUS); output.setZUnits("dimensionless"); WhiteboxRaster tmpGrid = new WhiteboxRaster(outputHeader.replace(".dep", "_temp.dep"), "rw", inputHeader, WhiteboxRaster.DataType.FLOAT, noData); tmpGrid.isTemporaryFile = true; updateProgress("Loop 1 of 2:", 0); for (row = 0; row < rows; row++) { for (col = 0; col < cols; col++) { if (pntr.getValue(row, col) != noData) { z = 0; for (i = 0; i < 8; i++) { if (pntr.getValue(row + dY[i], col + dX[i]) == inflowingVals[i]) { z++; } } tmpGrid.setValue(row, col, z); } else { output.setValue(row, col, noData); } } if (cancelOp) { cancelOperation(); return; } progress = (float) (100f * row / (rows - 1)); updateProgress("Loop 1 of 2:", (int) progress); } updateProgress("Loop 2 of 2:", 0); for (row = 0; row < rows; row++) { for (col = 0; col < cols; col++) { if (tmpGrid.getValue(row, col) == 0) { //there are no //remaining inflowing neighbours, send it's current //flow accum val downslope tmpGrid.setValue(row, col, -1); flag = false; x = col; y = row; do { flowLength = output.getValue(y, x); flowDir = pntr.getValue(y, x); if (flowDir > 0) { i = (int) (Math.log(flowDir) / LnOf2); flowLength += gridLengths[i]; x += dX[i]; y += dY[i]; //update the output grids currentVal = output.getValue(y, x); if (flowLength > currentVal) { output.setValue(y, x, flowLength); } //update the inflowing cells grid numInNeighbours = tmpGrid.getValue(y, x) - 1; tmpGrid.setValue(y, x, numInNeighbours); //see if you can progress further downslope if (numInNeighbours == 0) { tmpGrid.setValue(y, x, -1); flag = true; } else { flag = false; } } else { flag = false; } } while (flag); } } if (cancelOp) { cancelOperation(); return; } progress = (float) (100f * row / (rows - 1)); updateProgress("Loop 2 of 2:", (int) progress); } output.addMetadataEntry("Created by the " + getDescriptiveName() + " tool."); output.addMetadataEntry("Created on " + new Date()); pntr.close(); tmpGrid.close(); output.close(); // returning a header file string displays the image. returnData(outputHeader); } catch (OutOfMemoryError oe) { myHost.showFeedback("An out-of-memory error has occurred during operation."); } catch (Exception e) { myHost.showFeedback("An error has occurred during operation. See log file for details."); myHost.logException("Error in " + getDescriptiveName(), e); } finally { updateProgress("Progress: ", 0); // tells the main application that this process is completed. amIActive = false; myHost.pluginComplete(); } } }
{ "pile_set_name": "Github" }
// Copyright 2015 Joyent, Inc. module.exports = { Verifier: Verifier, Signer: Signer }; var nacl; var stream = require('stream'); var util = require('util'); var assert = require('assert-plus'); var Signature = require('./signature'); function Verifier(key, hashAlgo) { if (nacl === undefined) nacl = require('tweetnacl'); if (hashAlgo.toLowerCase() !== 'sha512') throw (new Error('ED25519 only supports the use of ' + 'SHA-512 hashes')); this.key = key; this.chunks = []; stream.Writable.call(this, {}); } util.inherits(Verifier, stream.Writable); Verifier.prototype._write = function (chunk, enc, cb) { this.chunks.push(chunk); cb(); }; Verifier.prototype.update = function (chunk) { if (typeof (chunk) === 'string') chunk = new Buffer(chunk, 'binary'); this.chunks.push(chunk); }; Verifier.prototype.verify = function (signature, fmt) { var sig; if (Signature.isSignature(signature, [2, 0])) { if (signature.type !== 'ed25519') return (false); sig = signature.toBuffer('raw'); } else if (typeof (signature) === 'string') { sig = new Buffer(signature, 'base64'); } else if (Signature.isSignature(signature, [1, 0])) { throw (new Error('signature was created by too old ' + 'a version of sshpk and cannot be verified')); } assert.buffer(sig); return (nacl.sign.detached.verify( new Uint8Array(Buffer.concat(this.chunks)), new Uint8Array(sig), new Uint8Array(this.key.part.R.data))); }; function Signer(key, hashAlgo) { if (nacl === undefined) nacl = require('tweetnacl'); if (hashAlgo.toLowerCase() !== 'sha512') throw (new Error('ED25519 only supports the use of ' + 'SHA-512 hashes')); this.key = key; this.chunks = []; stream.Writable.call(this, {}); } util.inherits(Signer, stream.Writable); Signer.prototype._write = function (chunk, enc, cb) { this.chunks.push(chunk); cb(); }; Signer.prototype.update = function (chunk) { if (typeof (chunk) === 'string') chunk = new Buffer(chunk, 'binary'); this.chunks.push(chunk); }; Signer.prototype.sign = function () { var sig = nacl.sign.detached( new Uint8Array(Buffer.concat(this.chunks)), new Uint8Array(this.key.part.r.data)); var sigBuf = new Buffer(sig); var sigObj = Signature.parse(sigBuf, 'ed25519', 'raw'); sigObj.hashAlgorithm = 'sha512'; return (sigObj); };
{ "pile_set_name": "Github" }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <style type="text/css" media="screen"> body { font-family: Arial, Helvetica, sans-serif; font-size: 80%; margin: 12px 12px 12px 12px; color: #000000; background-color: #FFFFFF; width: 800px; } h1 { font-size: 160%; font-weight: bold; } h2 { font-size: 120%; } a.t3 { color: #5A5A5A; text-decoration: none; } a.t4 { color: #6C6C6C; text-decoration: none; } a.t5 { color: #7C7C7C; text-decoration: none; } a.tb { color: #3333FF; text-decoration: none; } a.ty { color: #5E5E00; text-decoration: none; } a:hover, a:focus { text-decoration: underline; } td { font-size: 100%; text-align: left; padding: 4px 4px 4px 12px; } blockquote { border: thin solid #333333; padding: 1em; } </style> <title>Links with a 3:1 contrast ratio with surrounding text</title> </head> <body> <h1>Links with a 3:1 contrast ratio with surrounding text</h1> <h2>Link color #3333FF (3.1:1 vs. black)</h2> <p>The following paragraph shows essentially what this blue color would look like to most people, including most people with limited color vision. When color is used, a blue color is recommended because it is affected very little by red and green color blindness (Protanopia and Deuteranopia).</p> <blockquote><p>In the early evening of 16 December 1997, episode 38 of the hugely popular children&rsquo;s animation series <a href="#" class='tb'>Pocket Monsters</a> was broadcast over much of Japan on a commercial TV network. The program had around 10 million <a href="#" class='tb'>viewers</a>, and was viewed by no less than 80% of the 7-10 age group in the <a href="#" class='tb'>Tokyo</a> area according to a government survey. During and after the broadcast, some viewers experienced distressing symptoms ranging from nausea and dizziness to <a href="#" class='tb'>epileptic seizures</a>. A wave of emergency calls and hospital admissions suggested a single environmental <a href="#" class='tb'>cause</a> which was soon identified as the animation, and in particular one sequence in which red and cyan colors flashed in an alternation at around 12Hz covering much of the screen area. Before the cause had been pinpointed this <a href="#" class='tb'>sequence</a> was shown on a news bulletin about the <a href="#" class='tb'>incident</a>, resulting in further casualties. Altogether 685 people, most of them children, were hospitalized although most were discharged quickly.</p></blockquote> <h2>Link color #5E5E00 (3.1:1 vs. black)</h2> <p>The following paragraph gives an idea of what red or green links with a 3:1 contrast ratio might look like to people with protanopia and deuteranopia.</p> <blockquote><p>In the early evening of 16 December 1997, episode 38 of the hugely popular children&rsquo;s animation series <a href="#" class='ty'>Pocket Monsters</a> was broadcast over much of Japan on a commercial TV network. The program had around 10 million <a href="#" class='ty'>viewers</a>, and was viewed by no less than 80% of the 7-10 age group in the <a href="#" class='ty'>Tokyo</a> area according to a government survey. During and after the broadcast, some viewers experienced distressing symptoms ranging from nausea and dizziness to <a href="#" class='ty'>epileptic seizures</a>. A wave of emergency calls and hospital admissions suggested a single environmental <a href="#" class='ty'>cause</a> which was soon identified as the animation, and in particular one sequence in which red and cyan colors flashed in an alternation at around 12Hz covering much of the screen area. Before the cause had been pinpointed this <a href="#" class='ty'>sequence</a> was shown on a news bulletin about the <a href="#" class='ty'>incident</a>, resulting in further casualties. Altogether 685 people, most of them children, were hospitalized although most were discharged quickly.</p></blockquote> <h2>Link color #5A5A5A (3:1 vs. black)</h2> <p>A very small portion of the population has total color blindness. For these users, a 3:1 contrast ratio would be less usable (no color difference) but can still be seen. For example, try to count the links in the paragraph below. You can see that it is possible to differentiate them from the rest of the text.</p> <blockquote><p>In the early evening of 16 December 1997, episode 38 of the hugely popular children's animation series <a href="#" class='t3'>Pocket Monsters</a> was broadcast over much of Japan on a commercial TV network. The program had around 10 million <a href="#" class='t3'>viewers</a>, and was viewed by no less than 80% of the 7-10 age group in the <a href="#" class='t3'>Tokyo</a> area according to a government survey. During and after the broadcast, some viewers experienced distressing symptoms ranging from nausea and dizziness to <a href="#" class='t3'>epileptic seizures</a>. A wave of emergency calls and hospital admissions suggested a single environmental <a href="#" class='t3'>cause</a> which was soon identified as the animation, and in particular one sequence in which red and cyan colors flashed in an alternation at around 12Hz covering much of the screen area. Before the cause had been pinpointed this <a href="#" class='t3'>sequence</a> was shown on a news bulletin about the <a href="#" class='t3'>incident</a>, resulting in further casualties. Altogether 685 people, most of them children, were hospitalized although most were discharged quickly.</p></blockquote> <p><strong>Note: </strong>The use of color plus luminosity is used in this technique while luminsity alone is used for contrast. This is because this technique is about telling the difference (a noticable difference) between pieces of text whereas the contrast measure is about the readability of the text with its background for different color and vision disabilities.</p> <h2>The following 26 web-safe colors pass at 3:1 vs black and 5:1 vs. white</h2> <table summary='Table shows 26 web-safe colors that pass at 3:1 vs black and 5:1 vs. white. Each row contains the Hex color, a cell styled to show the color swatch and a cell containing sample text rendered in the sample color.'> <colgroup span='1' width='60'/> <colgroup span='1' width='60'/> <colgroup span='1' width='150'/> <thead> <tr> <th colspan='1'>Color Value</th> <th colspan='1'>Color Swatch</th> <th colspan='1'>Colored Text Sample</th> </tr> </thead> <tbody> <tr> <td>#CC0000</td> <td style='background-color: #CC0000;'>&nbsp;</td> <td style='color: #CC0000;'>The quick brown fox</td> </tr> <tr> <td>#CC0033</td> <td style='background-color: #CC0033;'>&nbsp;</td> <td style='color: #CC0033;'>The quick brown fox</td> </tr> <tr> <td>#CC0066</td> <td style='background-color: #CC0066;'>&nbsp;</td> <td style='color: #CC0066;'>The quick brown fox</td> </tr> <tr> <td>#CC0099</td> <td style='background-color: #CC0099;'>&nbsp;</td> <td style='color: #CC0099;'>The quick brown fox</td> </tr> <tr> <td>#9900CC</td> <td style='background-color: #9900CC;'>&nbsp;</td> <td style='color: #9900CC;'>The quick brown fox</td> </tr> <tr> <td>#6600FF</td> <td style='background-color: #6600FF;'>&nbsp;</td> <td style='color: #6600FF;'>The quick brown fox</td> </tr> <tr> <td>#9900FF</td> <td style='background-color: #9900FF;'>&nbsp;</td> <td style='color: #9900FF;'>The quick brown fox</td> </tr> <tr> <td>#CC3300</td> <td style='background-color: #CC3300;'>&nbsp;</td> <td style='color: #CC3300;'>The quick brown fox</td> </tr> <tr> <td>#CC3333</td> <td style='background-color: #CC3333;'>&nbsp;</td> <td style='color: #CC3333;'>The quick brown fox</td> </tr> <tr> <td>#993366</td> <td style='background-color: #993366;'>&nbsp;</td> <td style='color: #993366;'>The quick brown fox</td> </tr> <tr> <td>#993399</td> <td style='background-color: #993399;'>&nbsp;</td> <td style='color: #993399;'>The quick brown fox</td> </tr> <tr> <td>#9933CC</td> <td style='background-color: #9933CC;'>&nbsp;</td> <td style='color: #9933CC;'>The quick brown fox</td> </tr> <tr> <td>#3333FF</td> <td style='background-color: #3333FF;'>&nbsp;</td> <td style='color: #3333FF;'>The quick brown fox</td> </tr> <tr> <td>#6633FF</td> <td style='background-color: #6633FF;'>&nbsp;</td> <td style='color: #6633FF;'>The quick brown fox</td> </tr> <tr> <td>#336600</td> <td style='background-color: #336600;'>&nbsp;</td> <td style='color: #336600;'>The quick brown fox</td> </tr> <tr> <td>#666600</td> <td style='background-color: #666600;'>&nbsp;</td> <td style='color: #666600;'>The quick brown fox</td> </tr> <tr> <td>#336633</td> <td style='background-color: #336633;'>&nbsp;</td> <td style='color: #336633;'>The quick brown fox</td> </tr> <tr> <td>#666633</td> <td style='background-color: #666633;'>&nbsp;</td> <td style='color: #666633;'>The quick brown fox</td> </tr> <tr> <td>#006666</td> <td style='background-color: #006666;'>&nbsp;</td> <td style='color: #006666;'>The quick brown fox</td> </tr> <tr> <td>#336666</td> <td style='background-color: #336666;'>&nbsp;</td> <td style='color: #336666;'>The quick brown fox</td> </tr> <tr> <td>#666666</td> <td style='background-color: #666666;'>&nbsp;</td> <td style='color: #666666;'>The quick brown fox</td> </tr> <tr> <td>#006699</td> <td style='background-color: #006699;'>&nbsp;</td> <td style='color: #006699;'>The quick brown fox</td> </tr> <tr> <td>#336699</td> <td style='background-color: #336699;'>&nbsp;</td> <td style='color: #336699;'>The quick brown fox</td> </tr> <tr> <td>#666699</td> <td style='background-color: #666699;'>&nbsp;</td> <td style='color: #666699;'>The quick brown fox</td> </tr> <tr> <td>#0066CC</td> <td style='background-color: #0066CC;'>&nbsp;</td> <td style='color: #0066CC;'>The quick brown fox</td> </tr> <tr> <td>#3366CC</td> <td style='background-color: #3366CC;'>&nbsp;</td> <td style='color: #3366CC;'>The quick brown fox</td> </tr> </tbody> </table> </body> </html>
{ "pile_set_name": "Github" }
/** * * Copyright 2017 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ const noCache = (req, res, next) => { // Set the item to not cache. res.set({ 'cache': 'private, no-cache' }); next(); }; module.exports = noCache;
{ "pile_set_name": "Github" }
{ "content": { "blockly": { "content": "<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"@3AJ_cQ8/7d(q_o_9C?x\">y</variable>\n <variable type=\"\" id=\"mOdk:/87{RLjfR3X.$k7\">x</variable>\n </variables>\n <block type=\"simple_draw_circle\" x=\"-90\" y=\"-230\">\n <value name=\"x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">50</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">50</field>\n </shadow>\n </value>\n <value name=\"radius\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">100</field>\n </shadow>\n </value>\n <value name=\"fillColor\">\n <shadow type=\"colour_picker\">\n <field name=\"COLOUR\">#ff0000</field>\n </shadow>\n </value>\n <value name=\"borderColor\">\n <shadow type=\"colour_picker\">\n <field name=\"COLOUR\">#990000</field>\n </shadow>\n </value>\n <value name=\"borderSize\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1</field>\n </shadow>\n </value>\n <next>\n <block type=\"controls_for\">\n <field name=\"VAR\" id=\"@3AJ_cQ8/7d(q_o_9C?x\" variabletype=\"\">y</field>\n <value name=\"FROM\">\n <block type=\"math_number\">\n <field name=\"NUM\">0</field>\n </block>\n </value>\n <value name=\"TO\">\n <block type=\"math_number\">\n <field name=\"NUM\">800</field>\n </block>\n </value>\n <value name=\"BY\">\n <block type=\"math_number\">\n <field name=\"NUM\">10</field>\n </block>\n </value>\n <statement name=\"DO\">\n <block type=\"controls_for\">\n <field name=\"VAR\" id=\"mOdk:/87{RLjfR3X.$k7\" variabletype=\"\">x</field>\n <value name=\"FROM\">\n <block type=\"math_number\">\n <field name=\"NUM\">0</field>\n </block>\n </value>\n <value name=\"TO\">\n <block type=\"math_number\">\n <field name=\"NUM\">800</field>\n </block>\n </value>\n <value name=\"BY\">\n <block type=\"math_number\">\n <field name=\"NUM\">15</field>\n </block>\n </value>\n <statement name=\"DO\">\n <block type=\"simple_draw_line\">\n <value name=\"start_x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <value name=\"start_y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <value name=\"end_x\">\n <shadow type=\"math_number\" id=\"VQ6-urk2eD=^CbvaO74]\">\n <field name=\"NUM\">400</field>\n </shadow>\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"mOdk:/87{RLjfR3X.$k7\" variabletype=\"\">x</field>\n </block>\n </value>\n <value name=\"end_y\">\n <shadow type=\"math_number\" id=\"($3C4]88(iZ@V#Bmb6KR\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"@3AJ_cQ8/7d(q_o_9C?x\" variabletype=\"\">y</field>\n </block>\n </value>\n <value name=\"fillColor\">\n <shadow type=\"colour_picker\">\n <field name=\"COLOUR\">#ffcc33</field>\n </shadow>\n </value>\n <value name=\"borderSize\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0.1</field>\n </shadow>\n </value>\n </block>\n </statement>\n </block>\n </statement>\n </block>\n </next>\n </block>\n</xml>", "name": "blockly", "size": 3926, "type": "application/blockly+xml", "version": 1 }, "__javascript__": { "content": "", "name": "__javascript__", "size": 180, "type": "application/javascript", "version": 1 } }, "files": {}, "flags": {}, "format": "Coding with Chrome File Format 3", "frameworks": {}, "history": "", "metadata": { "__default__": { "author": "Markus Bordihn", "description": "The sun is created with an simple circle. The sun rays are several lines created over two nested loops.", "title": "Sunlights", "version": "1.0" } }, "mode": "basic_blockly", "ui": "blockly" }
{ "pile_set_name": "Github" }
<?php namespace Ecjia\App\Comment; use Royalcms\Component\App\AppParentServiceProvider; class CommentServiceProvider extends AppParentServiceProvider { public function boot() { $this->package('ecjia/app-comment'); } public function register() { } }
{ "pile_set_name": "Github" }
rule TreasureHunter { meta: description = "Detects generic unpacked TreasureHunter POS" author = "@VK_Intel" reference = "TreasureHunter POS" date = "2018-07-08" hash = "f4ba09a65d5e0a72677580646c670d739c323c3bca9f4ff29aa88f58057557ba" cape_type = "TreasureHunter Payload" strings: $magic = { 4d 5a } $s0 = "Error - Treasure Hunter is already running on this computer! To re-install, close the jucheck.exe process and try again" fullword wide $s1 = "C:\\Users\\user\\Desktop\\trhutt34C\\cSources\\treasureHunter\\Release\\treasureHunter.pdb" fullword ascii $s2 = "Couldn't get a snapshot of the memory processes!" fullword wide $s3 = "TreasureHunter version 0.1 Alpha, created by Jolly Roger ([email protected]) for BearsInc. Greets to Xylitol and co." fullword wide $s4 = "Couldn't get debug privileges" fullword wide $s5 = "Failed to execute the file" fullword wide $s6 = "ssuccessfully sent the dumps!" fullword wide $s7 = "Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; ." ascii $s8 = "Successfully executed the file" fullword wide $s9 = "Cannot find %AppData%!" fullword wide $s10 = "\\Windows\\explorer.exe" fullword ascii $s11 = "\\jucheck.exe" fullword ascii condition: $magic at 0 and filesize < 235KB and 9 of ($s*) }
{ "pile_set_name": "Github" }
/* * Driver for the remote control of SAA7146 based AV7110 cards * * Copyright (C) 1999-2003 Holger Waechtler <[email protected]> * Copyright (C) 2003-2007 Oliver Endriss <[email protected]> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * To obtain the license, point your browser to * http://www.gnu.org/copyleft/gpl.html * */ #include <linux/types.h> #include <linux/init.h> #include <linux/module.h> #include <linux/proc_fs.h> #include <linux/kernel.h> #include <linux/bitops.h> #include "av7110.h" #include "av7110_hw.h" #define AV_CNT 4 #define IR_RC5 0 #define IR_RCMM 1 #define IR_RC5_EXT 2 /* internal only */ #define IR_ALL 0xffffffff #define UP_TIMEOUT (HZ*7/25) /* Note: enable ir debugging by or'ing debug with 16 */ static int ir_protocol[AV_CNT] = { IR_RCMM, IR_RCMM, IR_RCMM, IR_RCMM}; module_param_array(ir_protocol, int, NULL, 0644); MODULE_PARM_DESC(ir_protocol, "Infrared protocol: 0 RC5, 1 RCMM (default)"); static int ir_inversion[AV_CNT]; module_param_array(ir_inversion, int, NULL, 0644); MODULE_PARM_DESC(ir_inversion, "Inversion of infrared signal: 0 not inverted (default), 1 inverted"); static uint ir_device_mask[AV_CNT] = { IR_ALL, IR_ALL, IR_ALL, IR_ALL }; module_param_array(ir_device_mask, uint, NULL, 0644); MODULE_PARM_DESC(ir_device_mask, "Bitmask of infrared devices: bit 0..31 = device 0..31 (default: all)"); static int av_cnt; static struct av7110 *av_list[AV_CNT]; static u16 default_key_map [256] = { KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, KEY_BACK, 0, KEY_POWER, KEY_MUTE, 0, KEY_INFO, KEY_VOLUMEUP, KEY_VOLUMEDOWN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, KEY_CHANNELUP, KEY_CHANNELDOWN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, KEY_TEXT, 0, 0, KEY_TV, 0, 0, 0, 0, 0, KEY_SETUP, 0, 0, 0, 0, 0, KEY_SUBTITLE, 0, 0, KEY_LANGUAGE, 0, KEY_RADIO, 0, 0, 0, 0, KEY_EXIT, 0, 0, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_OK, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, KEY_RED, KEY_GREEN, KEY_YELLOW, KEY_BLUE, 0, 0, 0, 0, 0, 0, 0, KEY_MENU, KEY_LIST, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, KEY_UP, KEY_UP, KEY_DOWN, KEY_DOWN, 0, 0, 0, 0, KEY_EPG, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, KEY_VCR }; /* key-up timer */ static void av7110_emit_keyup(unsigned long parm) { struct infrared *ir = (struct infrared *) parm; if (!ir || !test_bit(ir->last_key, ir->input_dev->key)) return; input_report_key(ir->input_dev, ir->last_key, 0); input_sync(ir->input_dev); } /* tasklet */ static void av7110_emit_key(unsigned long parm) { struct infrared *ir = (struct infrared *) parm; u32 ircom = ir->ir_command; u8 data; u8 addr; u16 toggle; u16 keycode; /* extract device address and data */ switch (ir->protocol) { case IR_RC5: /* RC5: 5 bits device address, 6 bits data */ data = ircom & 0x3f; addr = (ircom >> 6) & 0x1f; toggle = ircom & 0x0800; break; case IR_RCMM: /* RCMM: ? bits device address, ? bits data */ data = ircom & 0xff; addr = (ircom >> 8) & 0x1f; toggle = ircom & 0x8000; break; case IR_RC5_EXT: /* extended RC5: 5 bits device address, 7 bits data */ data = ircom & 0x3f; addr = (ircom >> 6) & 0x1f; /* invert 7th data bit for backward compatibility with RC5 keymaps */ if (!(ircom & 0x1000)) data |= 0x40; toggle = ircom & 0x0800; break; default: printk("%s invalid protocol %x\n", __func__, ir->protocol); return; } input_event(ir->input_dev, EV_MSC, MSC_RAW, (addr << 16) | data); input_event(ir->input_dev, EV_MSC, MSC_SCAN, data); keycode = ir->key_map[data]; dprintk(16, "%s: code %08x -> addr %i data 0x%02x -> keycode %i\n", __func__, ircom, addr, data, keycode); /* check device address */ if (!(ir->device_mask & (1 << addr))) return; if (!keycode) { printk ("%s: code %08x -> addr %i data 0x%02x -> unknown key!\n", __func__, ircom, addr, data); return; } if (timer_pending(&ir->keyup_timer)) { del_timer(&ir->keyup_timer); if (ir->last_key != keycode || toggle != ir->last_toggle) { ir->delay_timer_finished = 0; input_event(ir->input_dev, EV_KEY, ir->last_key, 0); input_event(ir->input_dev, EV_KEY, keycode, 1); input_sync(ir->input_dev); } else if (ir->delay_timer_finished) { input_event(ir->input_dev, EV_KEY, keycode, 2); input_sync(ir->input_dev); } } else { ir->delay_timer_finished = 0; input_event(ir->input_dev, EV_KEY, keycode, 1); input_sync(ir->input_dev); } ir->last_key = keycode; ir->last_toggle = toggle; ir->keyup_timer.expires = jiffies + UP_TIMEOUT; add_timer(&ir->keyup_timer); } /* register with input layer */ static void input_register_keys(struct infrared *ir) { int i; set_bit(EV_KEY, ir->input_dev->evbit); set_bit(EV_REP, ir->input_dev->evbit); set_bit(EV_MSC, ir->input_dev->evbit); set_bit(MSC_RAW, ir->input_dev->mscbit); set_bit(MSC_SCAN, ir->input_dev->mscbit); memset(ir->input_dev->keybit, 0, sizeof(ir->input_dev->keybit)); for (i = 0; i < ARRAY_SIZE(ir->key_map); i++) { if (ir->key_map[i] > KEY_MAX) ir->key_map[i] = 0; else if (ir->key_map[i] > KEY_RESERVED) set_bit(ir->key_map[i], ir->input_dev->keybit); } ir->input_dev->keycode = ir->key_map; ir->input_dev->keycodesize = sizeof(ir->key_map[0]); ir->input_dev->keycodemax = ARRAY_SIZE(ir->key_map); } /* called by the input driver after rep[REP_DELAY] ms */ static void input_repeat_key(unsigned long parm) { struct infrared *ir = (struct infrared *) parm; ir->delay_timer_finished = 1; } /* check for configuration changes */ int av7110_check_ir_config(struct av7110 *av7110, int force) { int i; int modified = force; int ret = -ENODEV; for (i = 0; i < av_cnt; i++) if (av7110 == av_list[i]) break; if (i < av_cnt && av7110) { if ((av7110->ir.protocol & 1) != ir_protocol[i] || av7110->ir.inversion != ir_inversion[i]) modified = true; if (modified) { /* protocol */ if (ir_protocol[i]) { ir_protocol[i] = 1; av7110->ir.protocol = IR_RCMM; av7110->ir.ir_config = 0x0001; } else if (FW_VERSION(av7110->arm_app) >= 0x2620) { av7110->ir.protocol = IR_RC5_EXT; av7110->ir.ir_config = 0x0002; } else { av7110->ir.protocol = IR_RC5; av7110->ir.ir_config = 0x0000; } /* inversion */ if (ir_inversion[i]) { ir_inversion[i] = 1; av7110->ir.ir_config |= 0x8000; } av7110->ir.inversion = ir_inversion[i]; /* update ARM */ ret = av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, SetIR, 1, av7110->ir.ir_config); } else ret = 0; /* address */ if (av7110->ir.device_mask != ir_device_mask[i]) av7110->ir.device_mask = ir_device_mask[i]; } return ret; } /* /proc/av7110_ir interface */ static ssize_t av7110_ir_proc_write(struct file *file, const char __user *buffer, size_t count, loff_t *pos) { char *page; u32 ir_config; int size = sizeof ir_config + sizeof av_list[0]->ir.key_map; int i; if (count < size) return -EINVAL; page = vmalloc(size); if (!page) return -ENOMEM; if (copy_from_user(page, buffer, size)) { vfree(page); return -EFAULT; } memcpy(&ir_config, page, sizeof ir_config); for (i = 0; i < av_cnt; i++) { /* keymap */ memcpy(av_list[i]->ir.key_map, page + sizeof ir_config, sizeof(av_list[i]->ir.key_map)); /* protocol, inversion, address */ ir_protocol[i] = ir_config & 0x0001; ir_inversion[i] = ir_config & 0x8000 ? 1 : 0; if (ir_config & 0x4000) ir_device_mask[i] = 1 << ((ir_config >> 16) & 0x1f); else ir_device_mask[i] = IR_ALL; /* update configuration */ av7110_check_ir_config(av_list[i], false); input_register_keys(&av_list[i]->ir); } vfree(page); return count; } static const struct file_operations av7110_ir_proc_fops = { .owner = THIS_MODULE, .write = av7110_ir_proc_write, .llseek = noop_llseek, }; /* interrupt handler */ static void ir_handler(struct av7110 *av7110, u32 ircom) { dprintk(4, "ir command = %08x\n", ircom); av7110->ir.ir_command = ircom; tasklet_schedule(&av7110->ir.ir_tasklet); } int av7110_ir_init(struct av7110 *av7110) { struct input_dev *input_dev; static struct proc_dir_entry *e; int err; if (av_cnt >= ARRAY_SIZE(av_list)) return -ENOSPC; av_list[av_cnt++] = av7110; av7110_check_ir_config(av7110, true); init_timer(&av7110->ir.keyup_timer); av7110->ir.keyup_timer.function = av7110_emit_keyup; av7110->ir.keyup_timer.data = (unsigned long) &av7110->ir; input_dev = input_allocate_device(); if (!input_dev) return -ENOMEM; av7110->ir.input_dev = input_dev; snprintf(av7110->ir.input_phys, sizeof(av7110->ir.input_phys), "pci-%s/ir0", pci_name(av7110->dev->pci)); input_dev->name = "DVB on-card IR receiver"; input_dev->phys = av7110->ir.input_phys; input_dev->id.bustype = BUS_PCI; input_dev->id.version = 2; if (av7110->dev->pci->subsystem_vendor) { input_dev->id.vendor = av7110->dev->pci->subsystem_vendor; input_dev->id.product = av7110->dev->pci->subsystem_device; } else { input_dev->id.vendor = av7110->dev->pci->vendor; input_dev->id.product = av7110->dev->pci->device; } input_dev->dev.parent = &av7110->dev->pci->dev; /* initial keymap */ memcpy(av7110->ir.key_map, default_key_map, sizeof av7110->ir.key_map); input_register_keys(&av7110->ir); err = input_register_device(input_dev); if (err) { input_free_device(input_dev); return err; } input_dev->timer.function = input_repeat_key; input_dev->timer.data = (unsigned long) &av7110->ir; if (av_cnt == 1) { e = proc_create("av7110_ir", S_IWUSR, NULL, &av7110_ir_proc_fops); if (e) proc_set_size(e, 4 + 256 * sizeof(u16)); } tasklet_init(&av7110->ir.ir_tasklet, av7110_emit_key, (unsigned long) &av7110->ir); av7110->ir.ir_handler = ir_handler; return 0; } void av7110_ir_exit(struct av7110 *av7110) { int i; if (av_cnt == 0) return; del_timer_sync(&av7110->ir.keyup_timer); av7110->ir.ir_handler = NULL; tasklet_kill(&av7110->ir.ir_tasklet); for (i = 0; i < av_cnt; i++) if (av_list[i] == av7110) { av_list[i] = av_list[av_cnt-1]; av_list[av_cnt-1] = NULL; break; } if (av_cnt == 1) remove_proc_entry("av7110_ir", NULL); input_unregister_device(av7110->ir.input_dev); av_cnt--; } //MODULE_AUTHOR("Holger Waechtler <[email protected]>, Oliver Endriss <[email protected]>"); //MODULE_LICENSE("GPL");
{ "pile_set_name": "Github" }
# coding: utf-8 """ OEML - REST API This section will provide necessary information about the `CoinAPI OEML REST API` protocol. This API is also available in the Postman application: <a href=\"https://postman.coinapi.io/\" target=\"_blank\">https://postman.coinapi.io/</a> # noqa: E501 The version of the OpenAPI document: v1 Contact: [email protected] Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from openapi_client.configuration import Configuration class OrdSide(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ allowed enum values """ BUY = "BUY" SELL = "SELL" allowable_values = [BUY, SELL] # noqa: E501 """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { } attribute_map = { } def __init__(self, local_vars_configuration=None): # noqa: E501 """OrdSide - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, OrdSide): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, OrdSide): return True return self.to_dict() != other.to_dict()
{ "pile_set_name": "Github" }
// moment.js language configuration // language : chinese // author : suupic : https://github.com/suupic // author : Zeno Zeng : https://github.com/zenozeng (function (factory) { if (typeof define === 'function' && define.amd) { define(['moment'], factory); // AMD } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { factory(window.moment); // Browser global } }(function (moment) { return moment.lang('zh-cn', { months : "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"), monthsShort : "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), weekdays : "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"), weekdaysShort : "周日_周一_周二_周三_周四_周五_周六".split("_"), weekdaysMin : "日_一_二_三_四_五_六".split("_"), longDateFormat : { LT : "Ah点mm", L : "YYYY-MM-DD", LL : "YYYY年MMMD日", LLL : "YYYY年MMMD日LT", LLLL : "YYYY年MMMD日ddddLT", l : "YYYY-MM-DD", ll : "YYYY年MMMD日", lll : "YYYY年MMMD日LT", llll : "YYYY年MMMD日ddddLT" }, meridiem : function (hour, minute, isLower) { var hm = hour * 100 + minute; if (hm < 600) { return "凌晨"; } else if (hm < 900) { return "早上"; } else if (hm < 1130) { return "上午"; } else if (hm < 1230) { return "中午"; } else if (hm < 1800) { return "下午"; } else { return "晚上"; } }, calendar : { sameDay : function () { return this.minutes() === 0 ? "[今天]Ah[点整]" : "[今天]LT"; }, nextDay : function () { return this.minutes() === 0 ? "[明天]Ah[点整]" : "[明天]LT"; }, lastDay : function () { return this.minutes() === 0 ? "[昨天]Ah[点整]" : "[昨天]LT"; }, nextWeek : function () { var startOfWeek, prefix; startOfWeek = moment().startOf('week'); prefix = this.unix() - startOfWeek.unix() >= 7 * 24 * 3600 ? '[下]' : '[本]'; return this.minutes() === 0 ? prefix + "dddAh点整" : prefix + "dddAh点mm"; }, lastWeek : function () { var startOfWeek, prefix; startOfWeek = moment().startOf('week'); prefix = this.unix() < startOfWeek.unix() ? '[上]' : '[本]'; return this.minutes() === 0 ? prefix + "dddAh点整" : prefix + "dddAh点mm"; }, sameElse : 'LL' }, ordinal : function (number, period) { switch (period) { case "d": case "D": case "DDD": return number + "日"; case "M": return number + "月"; case "w": case "W": return number + "周"; default: return number; } }, relativeTime : { future : "%s内", past : "%s前", s : "几秒", m : "1分钟", mm : "%d分钟", h : "1小时", hh : "%d小时", d : "1天", dd : "%d天", M : "1个月", MM : "%d个月", y : "1年", yy : "%d年" }, week : { // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 dow : 1, // Monday is the first day of the week. doy : 4 // The week that contains Jan 4th is the first week of the year. } }); }));
{ "pile_set_name": "Github" }
<?php namespace Drupal\user\Plugin\Action; use Drupal\Core\Action\ActionBase; use Drupal\Core\Session\AccountInterface; /** * Blocks a user. * * @Action( * id = "user_block_user_action", * label = @Translation("Block the selected users"), * type = "user" * ) */ class BlockUser extends ActionBase { /** * {@inheritdoc} */ public function execute($account = NULL) { // Skip blocking user if they are already blocked. if ($account !== FALSE && $account->isActive()) { // For efficiency manually save the original account before applying any // changes. $account->original = clone $account; $account->block(); $account->save(); } } /** * {@inheritdoc} */ public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) { /** @var \Drupal\user\UserInterface $object */ $access = $object->status->access('edit', $account, TRUE) ->andIf($object->access('update', $account, TRUE)); return $return_as_object ? $access : $access->isAllowed(); } }
{ "pile_set_name": "Github" }
/* Copyright 2006-2009 Joaquin M Lopez Munoz. * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * See http://www.boost.org/libs/flyweight for library home page. */ #ifndef BOOST_FLYWEIGHT_ASSOC_CONTAINER_FACTORY_HPP #define BOOST_FLYWEIGHT_ASSOC_CONTAINER_FACTORY_HPP #if defined(_MSC_VER)&&(_MSC_VER>=1200) #pragma once #endif #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */ #include <boost/flyweight/assoc_container_factory_fwd.hpp> #include <boost/flyweight/detail/is_placeholder_expr.hpp> #include <boost/flyweight/detail/nested_xxx_if_not_ph.hpp> #include <boost/flyweight/factory_tag.hpp> #include <boost/mpl/apply.hpp> #include <boost/mpl/aux_/lambda_support.hpp> #include <boost/mpl/if.hpp> namespace boost{namespace flyweights{namespace detail{ BOOST_FLYWEIGHT_NESTED_XXX_IF_NOT_PLACEHOLDER_EXPRESSION_DEF(iterator); BOOST_FLYWEIGHT_NESTED_XXX_IF_NOT_PLACEHOLDER_EXPRESSION_DEF(value_type); }}} /* namespace boost::flyweights::detail */ /* Factory class using a given associative container. */ namespace boost{ namespace flyweights{ template<typename Container> class assoc_container_factory_class:public factory_marker { public: /* When assoc_container_factory_class<Container> is an MPL placeholder * expression, referring to Container::iterator and Container::value_type * force the MPL placeholder expression Container to be instantiated, which * is wasteful and can fail in concept-checked STL implementations. * We protect ourselves against this circumstance. */ typedef typename detail::nested_iterator_if_not_placeholder_expression< Container >::type handle_type; typedef typename detail::nested_value_type_if_not_placeholder_expression< Container >::type entry_type; handle_type insert(const entry_type& x) { return cont.insert(x).first; } void erase(handle_type h) { cont.erase(h); } static const entry_type& entry(handle_type h){return *h;} private: /* As above, avoid instantiating Container if it is an * MPL placeholder expression. */ typedef typename mpl::if_< detail::is_placeholder_expression<Container>, int, Container >::type container_type; container_type cont; public: typedef assoc_container_factory_class type; BOOST_MPL_AUX_LAMBDA_SUPPORT(1,assoc_container_factory_class,(Container)) }; /* assoc_container_factory_class specifier */ template< typename ContainerSpecifier BOOST_FLYWEIGHT_NOT_A_PLACEHOLDER_EXPRESSION_DEF > struct assoc_container_factory:factory_marker { template<typename Entry,typename Key> struct apply { typedef assoc_container_factory_class< typename mpl::apply2<ContainerSpecifier,Entry,Key>::type > type; }; }; } /* namespace flyweights */ } /* namespace boost */ #endif
{ "pile_set_name": "Github" }
package com.lsqidsd.hodgepodge.utils; import android.app.Notification; import android.app.NotificationChannel; import android.app.NotificationManager; import android.content.Context; import android.graphics.Color; import android.os.Build; import android.support.annotation.DrawableRes; public class NotificationUtil { private static final String channel_id = "channel_id"; private static final String channel_name = "channel_name"; private NotificationManager manager; private Context context; private static Notification.Builder builder; private static final int notification_id = 1; public NotificationUtil(Context context) { this.manager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); this.context = context; } public Notification.Builder getBuilder(@DrawableRes int id) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { builder = new Notification.Builder(context, channel_id); NotificationChannel channel = new NotificationChannel(channel_id, channel_name, manager.IMPORTANCE_DEFAULT); channel.canBypassDnd();//是否可以绕过请勿打扰模式 channel.canShowBadge();//是否可以显示icon角标 channel.enableLights(true);//是否显示通知闪灯 channel.enableVibration(true);//收到小时时震动提示 channel.setBypassDnd(true);//设置绕过免打扰 channel.setLightColor(Color.RED);//设置闪光灯颜色 channel.getAudioAttributes();//获取设置铃声设置 channel.setVibrationPattern(new long[]{0});//设置震动模式 channel.shouldShowLights();//是否会闪光 manager.createNotificationChannel(channel); } else { builder = new Notification.Builder(context); } builder.setSmallIcon(id); builder.setOngoing(true); builder.setAutoCancel(false); return builder; } public void sendNotification() { manager.notify(notification_id, builder.build()); } public void cancelNotification() { manager.cancel(notification_id); } }
{ "pile_set_name": "Github" }
#format: frame checksums #version: 2 #hash: MD5 #tb 0: 1001/30000 #media_type 0: video #codec_id 0: rawvideo #dimensions 0: 352x288 #sar 0: 1/1 #stream#, dts, pts, duration, size, hash 0, 0, 0, 1, 152064, a2e5c820fd9733e18f9349fb658ca281 0, 1, 1, 1, 152064, 0d487a146393a0b8b84b4be1b371b507 0, 2, 2, 1, 152064, 68372e191eba620a431cfff226026ac3 0, 3, 3, 1, 152064, de7fd274460e36b983fe93acc208d72f 0, 4, 4, 1, 152064, afbd36c61bab65b98ff9acf08e215721 0, 5, 5, 1, 152064, e1e9fc2ab4e7a187a8d8d84aae48d6b9 0, 6, 6, 1, 152064, 11d95de6a9cc5e00511e99534779faac 0, 7, 7, 1, 152064, cd2f5539fdfc2d8eefe6b6da28c13398 0, 8, 8, 1, 152064, a8b3aeed41da7aeb8d5b962ee4a4af93 0, 9, 9, 1, 152064, 4283670bd1c1c506ef18d3dafca22035
{ "pile_set_name": "Github" }
:020000021000EC :10FC000001C0F2C0112484B790E890936100109273 :10FC10006100882369F0982F9A70923049F081FF33 :10FC200002C097EF94BF282E80E001D10C94000011 :10FC300085E08093810082E08093C00088E180931A :10FC4000C10087E18093C40086E08093C2008EE00B :10FC5000EED0279A84E020E93FEF91E030938500D1 :10FC60002093840096BBB09BFECF1F9AA89540912D :10FC7000C00047FD02C0815089F7CDD0813479F4AE :10FC8000CAD0C82FDAD0C23811F480E004C088E0AE :10FC9000C13809F083E0B8D080E1B6D0EECF82342D :10FCA00019F484E1D2D0F8CF853411F485E0FACF8D :10FCB000853581F4B0D0E82EAED0F82E87FF07C08E :10FCC0008BB781608BBFEE0CFF1CB7D0E5CF8BB735 :10FCD0008E7FF8CF863579F49ED08D3451F49BD049 :10FCE000CBB799D0C170880F8C2B8BBF81E0ADD082 :10FCF000CCCF83E0FCCF843609F045C08CD0C82F30 :10FD0000D0E0DC2FCC2787D0C82B85D0D82E5E0141 :10FD1000B39400E011E04801EFEF8E1A9E0A7BD009 :10FD2000F801808384018A149B04A9F786D0F5E446 :10FD300010E000E0DF1609F150E040E063E0C701A9 :10FD400053D08701C12CDD24D394F6014191519108 :10FD50006F0161E0C80148D00E5F1F4F2297A9F7DD :10FD600050E040E065E0C7013FD096CF6081C80118 :10FD70008E0D9F1D79D00F5F1F4FF801F395C017AF :10FD8000D107A1F789CF843701F545D0C82FD0E03E :10FD9000DC2FCC2740D0C82B3ED0D82E4ED08701A8 :10FDA000F5E4DF120BC0CE0DDF1DC80155D02CD0FD :10FDB0000F5F1F4FC017D107C1F76ECFF8018791B2 :10FDC0008F0122D02197D1F767CF853739F435D00D :10FDD0008EE11AD087E918D085E05DCF813509F032 :10FDE00074CF88E024D071CFFC010A0167BFE89589 :10FDF000112407B600FCFDCF667029F0452B19F4DD :10FE000081E187BFE89508959091C00095FFFCCFF0 :10FE10008093C60008958091C00087FFFCCF809139 :10FE2000C00084FD01C0A8958091C6000895E0E659 :10FE3000F0E098E1908380830895EDDF803219F03F :10FE400088E0F5DFFFCF84E1DFCFCF93C82FE3DF7A :10FE5000C150E9F7CF91F1CFF999FECF92BD81BDA5 :10FE6000F89A992780B50895262FF999FECF1FBAE1 :10FE700092BD81BD20BD0FB6F894FA9AF99A0FBED3 :04FE8000019608954A :02FFFE000008F9 :040000031000FC00ED :00000001FF
{ "pile_set_name": "Github" }
<?php $this->beginContent('gii.views.layouts.main'); ?> <div class="container"> <div class="span-4"> <div id="sidebar"> <?php $this->beginWidget('zii.widgets.CPortlet', array( 'title'=>'Generators', )); ?> <ul> <?php foreach($this->module->controllerMap as $name=>$config): ?> <li><?php echo CHtml::link(ucwords(CHtml::encode($name).' generator'),array('/gii/'.$name));?></li> <?php endforeach; ?> </ul> <?php $this->endWidget(); ?> </div><!-- sidebar --> </div> <div class="span-16"> <div id="content"> <?php echo $content; ?> </div><!-- content --> </div> <div class="span-4 last"> &nbsp; </div> </div> <?php $this->endContent(); ?>
{ "pile_set_name": "Github" }
;(function(global, CSSwhat){ "use strict"; //functions that make porting the library to another DOM easy function isElement(elem){ return elem.type === "tag" || elem.type === "style" || elem.type === "script"; } function getChildren(elem){ return elem.children; } function getParent(elem){ return elem.parent; } function getAttributeValue(elem, name){ return elem.attribs[name]; } function hasAttrib(elem, name){ return elem.attribs && name in elem.attribs; } function getName(elem){ return elem.name; } function getText(elem){ var text = "", childs = getChildren(elem); if(!childs) return text; for(var i = 0, j = childs.length; i < j; i++){ if(isElement(childs[i])) text += getText(childs[i]); else text += childs[i].data; } return text; } /* pseudo selectors --- they are available in two forms: * filters called when the selector is compiled and return a function that needs to return next() * pseudos get called on execution they need to return a boolean */ var filters = { not: function(next, select){ var func = parse(select); if(func === falseFunc){ if(next === rootFunc) return trueFunc; else return next; } if(func === trueFunc) return falseFunc; if(func === rootFunc) return falseFunc; return function(elem){ if(!func(elem)) return next(elem); }; }, contains: function(next, text){ if( (text.charAt(0) === "\"" || text.charAt(0) === "'") && text.charAt(0) === text.substr(-1) ){ text = text.slice(1, -1); } return function(elem){ if(getText(elem).indexOf(text) !== -1) return next(elem); }; }, has: function(next, select){ var func = parse(select); if(func === rootFunc || func === trueFunc) return next; if(func === falseFunc) return falseFunc; var proc = function(elem){ var children = getChildren(elem); if(!children) return; for(var i = 0, j = children.length; i < j; i++){ if(!isElement(children[i])) continue; if(func(children[i])) return true; if(proc(children[i])) return true; } }; return function proc(elem){ if(proc(elem)) return next(elem); }; }, root: function(next){ return function(elem){ if(!getParent(elem)) return next(elem); }; }, empty: function(next){ return function(elem){ var children = getChildren(elem); if(!children || children.length === 0) return next(elem); }; }, parent: function(next){ //:parent is the inverse of :empty return function(elem){ var children = getChildren(elem); if(children && children.length !== 0) return next(elem); }; }, //location specific methods //first- and last-child methods return as soon as they find another element "first-child": function(next){ return function(elem){ if(getFirstElement(getSiblings(elem)) === elem) return next(elem); }; }, "last-child": function(next){ return function(elem){ var siblings = getSiblings(elem); if(!siblings) return; for(var i = siblings.length-1; i >= 0; i--){ if(siblings[i] === elem) return next(elem); if(isElement(siblings[i])) return; } }; }, "first-of-type": function(next){ return function(elem){ var siblings = getSiblings(elem); if(!siblings) return; for(var i = 0, j = siblings.length; i < j; i++){ if(siblings[i] === elem) return next(elem); if(getName(siblings[i]) === getName(elem)) return; } }; }, "last-of-type": function(next){ return function(elem){ var siblings = getSiblings(elem); if(!siblings) return; for(var i = siblings.length-1; i >= 0; i--){ if(siblings[i] === elem) return next(elem); if(getName(siblings[i]) === getName(elem)) return; } }; }, "only-of-type": function(next){ return function(elem){ var siblings = getSiblings(elem); if(!siblings) return; for(var i = 0, j = siblings.length; i < j; i++){ if(siblings[i] === elem) continue; if(getName(siblings[i]) === getName(elem)) return; } return next(elem); }; }, "only-child": function(next){ return function(elem){ var siblings = getSiblings(elem); if(!siblings) return; if(siblings.length === 1) return next(elem); for(var i = 0, j = siblings.length; i < j; i++){ if(isElement(siblings[i]) && siblings[i] !== elem) return; } return next(elem); }; }, "nth-child": function(next, rule){ var func = getNCheck(rule); if(func === falseFunc) return func; if(func === trueFunc){ if(next === rootFunc) return func; else return next; } return function(elem){ if(func(getIndex(elem))) return next(elem); }; }, "nth-last-child": function(next, rule){ var func = getNCheck(rule); if(func === falseFunc) return func; if(func === trueFunc){ if(next === rootFunc) return func; else return next; } return function(elem){ var siblings = getSiblings(elem); if(!siblings) return; for(var pos = 0, i = siblings.length - 1; i >= 0; i--){ if(siblings[i] === elem){ if(func(pos)) return next(elem); return; } if(isElement(siblings[i])) pos++; } }; }, "nth-of-type": function(next, rule){ var func = getNCheck(rule); if(func === falseFunc) return func; if(func === trueFunc){ if(next === rootFunc) return func; else return next; } return function(elem){ var siblings = getSiblings(elem); if(!siblings) return; for(var pos = 0, i = 0, j = siblings.length; i < j; i++){ if(siblings[i] === elem){ if(func(pos)) return next(elem); return; } if(getName(siblings[i]) === getName(elem)) pos++; } }; }, "nth-last-of-type": function(next, rule){ var func = getNCheck(rule); if(func === falseFunc) return func; if(func === trueFunc){ if(next === rootFunc) return func; else return next; } return function(elem){ var siblings = getSiblings(elem); if(!siblings) return; for(var pos = 0, i = siblings.length-1; i >= 0; i--){ if(siblings[i] === elem){ if(func(pos)) return next(elem); return; } if(getName(siblings[i]) === getName(elem)) pos++; } }; }, //forms //to consider: :target, :enabled selected: function(next){ return function(elem){ if(hasAttrib(elem, "selected")) return next(elem); //the first <option> in a <select> is also selected //TODO this only works for direct descendents if(getName(getParent(elem)) !== "option") return; if(getFirstElement(getSiblings(elem)) === elem) return next(elem); }; }, disabled: function(next){ return function(elem){ if(hasAttrib(elem, "disabled")) return next(elem); }; }, enabled: function(next){ return function(elem){ if(!hasAttrib(elem, "disabled")) return next(elem); }; }, checked: function(next){ return function(elem){ if(hasAttrib(elem, "checked")) return next(elem); }; }, //jQuery extensions header: function(next){ return function(elem){ var name = getName(elem); if( name === "h1" || name === "h2" || name === "h3" || name === "h4" || name === "h5" || name === "h6" ) return next(elem); }; }, button: function(next){ return function(elem){ if( getName(elem) === "button" || getName(elem) === "input" && hasAttrib(elem, "type") && getAttributeValue(elem, "type") === "button" ) return next(elem); }; }, input: function(next){ return function(elem){ var name = getName(elem); if( name === "input" || name === "textarea" || name === "select" || name === "button" ) return next(elem); }; }, text: function(next){ return function(elem){ if(getName(elem) !== "input") return; if( !hasAttrib(elem, "type") || getAttributeValue(elem, "type") === "text" ) return next(elem); }; }, checkbox: getAttribFunc("type", "checkbox"), file: getAttribFunc("type", "file"), password: getAttribFunc("type", "password"), radio: getAttribFunc("type", "radio"), reset: getAttribFunc("type", "reset"), image: getAttribFunc("type", "image"), submit: getAttribFunc("type", "submit") }; //while filters are precompiled, pseudos get called when they are needed var pseudos = {}; //helper methods function getSiblings(elem){ return getParent(elem) && getChildren(getParent(elem)); } /* finds the position of an element among its siblings */ function getIndex(elem){ var siblings = getSiblings(elem); if(!siblings) return -1; for(var count = 0, i = 0, j = siblings.length; i < j; i++){ if(siblings[i] === elem) return count; if(isElement(siblings[i])) count++; } return -1; } function getFirstElement(elems){ if(!elems) return; for(var i = 0, j = elems.length; i < j; i++){ if(isElement(elems[i])) return elems[i]; } } /* returns a function that checks if an elements index matches the given rule highly optimized to return the fastest solution */ var re_nthElement = /^([+\-]?\d*n)?\s*(?:([+\-]?)\s*(\d+))?$/; function getNCheck(formula){ var a, b; //parse the formula //b is lowered by 1 as the rule uses index 1 as the start formula = formula.trim().toLowerCase(); if(formula === "even"){ a = 2; b = -1; } else if(formula === "odd"){ a = 2; b = 0; } else { formula = formula.match(re_nthElement); if(!formula){ //TODO forward rule to error throw new SyntaxError("n-th rule couldn't be parsed"); } if(formula[1]){ a = parseInt(formula[1], 10); if(!a){ if(formula[1].charAt(0) === "-") a = -1; else a = 1; } } else a = 0; if(formula[3]) b = parseInt((formula[2] || "") + formula[3], 10) - 1; else b = -1; } //when b <= 0, a*n won't be possible for any matches when a < 0 //besides, the specification says that no element is matched when a and b are 0 if(b < 0 && a <= 0) return falseFunc; //when b <= 0 and a === 1, they match any element if(b < 0 && a === 1) return trueFunc; //when a is in the range -1..1, it matches any element (so only b is checked) if(a ===-1) return function(pos){ return pos <= b; }; if(a === 1) return function(pos){ return pos >= b; }; if(a === 0) return function(pos){ return pos === b; }; //when a > 0, modulo can be used to check if there is a match //TODO: needs to be checked if(a > 1) return function(pos){ return pos >= 0 && (pos -= b) >= 0 && (pos % a) === 0; }; a *= -1; //make a positive return function(pos){ return pos >= 0 && (pos -= b) >= 0 && (pos % a) === 0 && pos/a < b; }; } function getAttribFunc(name, value){ return function(next){ return checkAttrib(next, name, value); }; } function checkAttrib(next, name, value){ return function(elem){ if(hasAttrib(elem, name) && getAttributeValue(elem, name) === value){ return next(elem); } }; } function rootFunc(){ return true; } function trueFunc(){ return true; } function falseFunc(){ return false; } /* all available rules */ var generalRules = { __proto__: null, //tags tag: function(next, data){ var name = data.name; return function(elem){ if(getName(elem) === name) return next(elem); }; }, //traversal descendant: function(next){ return function(elem){ while(elem = getParent(elem)){ if(next(elem)) return true; } }; }, child: function(next){ return function(elem){ var parent = getParent(elem); if(parent) return next(parent); }; }, sibling: function(next){ return function(elem){ var siblings = getSiblings(elem); if(!siblings) return; for(var i = 0, j = siblings.length; i < j; i++){ if(!isElement(siblings[i])) continue; if(siblings[i] === elem) return; if(next(siblings[i])) return true; } }; }, adjacent: function(next){ return function(elem){ var siblings = getSiblings(elem), lastElement; if(!siblings) return; for(var i = 0, j = siblings.length; i < j; i++){ if(isElement(siblings[i])){ if(siblings[i] === elem){ if(lastElement) return next(lastElement); return; } lastElement = siblings[i]; } } }; }, universal: function(next){ if(next === rootFunc) return trueFunc; return next; }, //attributes attribute: function(next, data){ if(data.ignoreCase){ return noCaseAttributeRules[data.action](next, data.name, data.value, data.ignoreCase); } else { return attributeRules[data.action](next, data.name, data.value, data.ignoreCase); } }, //pseudos pseudo: function(next, data){ var name = data.name, subselect = data.data; if(name in filters) return filters[name](next, subselect); else if(name in pseudos){ return function(elem){ if(pseudos[name](elem, subselect)) return next(elem); }; } else { throw new SyntaxError("unmatched pseudo-class: " + name); } } }; /* attribute selectors */ var reChars = /[-[\]{}()*+?.,\\^$|#\s]/g; //https://github.com/slevithan/XRegExp/blob/master/src/xregexp.js#L469 function escapeRe(str){ return str.replace(reChars, "\\$&"); } function wrapReRule(pre, post){ return function(next, name, value, ignoreCase){ var regex = new RegExp(pre + escapeRe(value) + post, ignoreCase ? "i" : ""); return function(elem){ if(hasAttrib(elem, name) && regex.test(getAttributeValue(elem, name))) return next(elem); }; }; } var noCaseAttributeRules = { __proto__: null, exists: function(next, name){ return function(elem){ if(hasAttrib(elem, name)) return next(elem); }; }, element: wrapReRule("(?:^|\\s)", "(?:$|\\s)"), equals: wrapReRule("^", "$"), hyphen: wrapReRule("^", "(?:$|-)"), start: wrapReRule("^", ""), end: wrapReRule("", "$"), any: wrapReRule("", ""), not: wrapReRule("^(?!^", "$)") }; var attributeRules = { __proto__: null, equals: checkAttrib, exists: noCaseAttributeRules.exists, hyphen: noCaseAttributeRules.hyphen, element: noCaseAttributeRules.element, start: function(next, name, value){ var len = value.length; return function(elem){ if( hasAttrib(elem, name) && getAttributeValue(elem, name).substr(0, len) === value ) return next(elem); }; }, end: function(next, name, value){ var len = -value.length; return function(elem){ if( hasAttrib(elem, name) && getAttributeValue(elem, name).substr(len) === value ) return next(elem); }; }, any: function(next, name, value){ return function(elem){ if( hasAttrib(elem, name) && getAttributeValue(elem, name).indexOf(value) >= 0 ) return next(elem); }; }, not: function(next, name, value){ if(value === ""){ return function(elem){ if(hasAttrib(elem, name) && getAttributeValue(elem, name) !== "") return next(elem); }; } return function(elem){ if(!hasAttrib(elem, name) || getAttributeValue(elem, name) !== value){ return next(elem); } }; } }; /* sort the parts of the passed selector, as there is potential for optimization */ var procedure = { __proto__: null, universal: 5, //should be last so that it can be ignored tag: 3, //very quick test attribute: 1, //can be faster than class pseudo: 0, //can be pretty expensive (especially :has) //everything else shouldn't be moved descendant: -1, child: -1, sibling: -1, adjacent: -1 }; function sortByProcedure(arr){ //TODO optimize, sort individual attribute selectors var parts = [], last = 0, end = false; for(var i = 0, j = arr.length-1; i <= j; i++){ if(procedure[arr[i].type] === -1 || (end = i === j)){ if(end) i++; parts = parts.concat(arr.slice(last, i).sort(function(a, b){ return procedure[a.type] - procedure[b.type]; })); if(!end) last = parts.push(arr[i]); } } return parts; } function parse(selector){ var functions = CSSwhat(selector).map(function(arr){ var func = rootFunc; arr = sortByProcedure(arr); for(var i = 0, j = arr.length; i < j; i++){ func = generalRules[arr[i].type](func, arr[i]); if(func === falseFunc) return func; } return func; }).filter(function(func){ return func !== rootFunc && func !== falseFunc; }); var num = functions.length; if(num === 0) return falseFunc; if(num === 1) return functions[0]; if(functions.indexOf(trueFunc) >= 0) return trueFunc; return function(elem){ for(var i = 0; i < num; i++){ if(functions[i](elem)) return true; } return false; }; } /* the exported interface */ var CSSselect = function(query, elems){ if(typeof query !== "function") query = parse(query); if(arguments.length === 1) return query; return CSSselect.iterate(query, elems); }; CSSselect.parse = parse; CSSselect.filters = filters; CSSselect.pseudos = pseudos; CSSselect.iterate = function(query, elems){ if(typeof query !== "function") query = parse(query); if(query === falseFunc) return []; if(!Array.isArray(elems)) elems = getChildren(elems); return iterate(query, elems); }; CSSselect.is = function(elem, query){ if(typeof query !== "function") query = parse(query); return query(elem); }; function iterate(query, elems){ var result = []; for(var i = 0, j = elems.length; i < j; i++){ if(!isElement(elems[i])) continue; if(query(elems[i])) result.push(elems[i]); if(getChildren(elems[i])) result = result.concat(iterate(query, getChildren(elems[i]))); } return result; } /* export CSSselect */ if(typeof module !== "undefined" && "exports" in module){ module.exports = CSSselect; } else { if(typeof define === "function" && define.amd){ define("CSSselect", function(){ return CSSselect; }); } global.CSSselect = CSSselect; } })( typeof window === "object" ? window : this, typeof CSSwhat === "undefined" ? require("CSSwhat") : CSSwhat );
{ "pile_set_name": "Github" }
// // Prefix header // // The contents of this file are implicitly included at the beginning of every source file. // #import <Availability.h> #ifndef __IPHONE_5_0 #warning "This project uses features only available in iOS SDK 5.0 and later." #endif #ifdef __OBJC__ @import UIKit; @import Foundation; #endif
{ "pile_set_name": "Github" }
fileFormatVersion: 2 guid: 8d268f48e28034e498a927bb0e47c59e folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant:
{ "pile_set_name": "Github" }
/* * Backpack - Skyscanner's Design System * * Copyright 2016-2020 Skyscanner Ltd * * 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. */ /* @flow strict */ import BpkSpinner from './src/BpkSpinner'; import SPINNER_TYPES from './src/spinnerTypes'; import BpkLargeSpinner from './src/BpkLargeSpinner'; import BpkExtraLargeSpinner from './src/BpkExtraLargeSpinner'; import themeAttributes from './src/themeAttributes'; export { BpkSpinner, BpkLargeSpinner, BpkExtraLargeSpinner, SPINNER_TYPES, themeAttributes, };
{ "pile_set_name": "Github" }
#define SENSOR_ID "arduino-RANDOM-SECRET-"
{ "pile_set_name": "Github" }
body.admin-login, body.customer-registration, body.customer_panel_registration, body.customer_panel_registration_from_invitation, body.customer_panel_registration_success, body.customer_panel_registration_activate_sms, body.customer-login, body.customer-terms-conditions, body.seller-login, body.forgot-password-request, body.customer-forgot-password-reset, body.seller-forgot-password-reset, body.forgot-password-reset, body.forgot-password-request-customer, body.forgot-password-request-seller, body.forgot-password-request-admin, body.forgot-password-reset-customer, body.forgot-password-reset-seller, body.forgot-password-reset-admin { background-color: $darkest; } section { .registration-form { width: 680px; max-width: 100%; margin: 0 auto; } .customer-terms-conditions { .forgot { margin-top: 0 !important; } } .login-form { margin-top: 0 !important; } &.login { &.admin { margin-top: 0; h1 { color: $dark; font-size: 20px; margin-bottom: 24px; } .logo { display: block; text-align: center; font-size: 30px; .logo-part { font-family: 'Open Sans', sans-serif; text-transform: uppercase; } .logo-part-1 { @extend .logo-part; font-weight: bold; } .logo-part-2 { @extend .logo-part; } #openLoyaltyLogo { max-width: 313px; } } .form-box { display: inline-block; margin: 0 auto 15px auto; max-width: 340px; padding: 30px 30px 20px; background-color: $white; border: $default-border solid darken($senary, 5%); checkbox.checked span.fi { top: -3px; left: 1px; } &.request { min-height: 0; padding-bottom: 30px; } .request-description { font-size: 13px; } input { border-color: $gray !important } .input-group-label { border-color: $gray !important; background-color: lighten($gray, 7%); } label { color: $dark; display: inline; vertical-align: top; > span:not(.fi) { position: relative; top: -14px; } } button.login-button { font-size: 16px; min-height: 45px !important; margin: 0; } .forgot { margin-top: 20px; a { text-decoration: underline; font-size: 13px; color: lighten($black, 40%); &:hover { color: $septenary; } } } } .registration-box { vertical-align: top; width: 340px; display: inline-block; background-color: lighten($darkest, 7%); padding: 30px 30px 20px; position: relative; .registration-description { font-size: 13px; } .check-list { font-size: 13px; } .registration { position: absolute; width: calc(100% - 60px); font-size: 16px; bottom: 64px; min-height: 45px !important; margin: 0; } } } &.customer { margin-top: 15vh; input { background-color: lighten($dark, 20%); color: $white !important; border: 0; } .input-group-label { background-color: lighten($dark, 25%); border: 0; .fa { color: $white; opacity: 0.7; } } .form-box { padding: 15px 25px; border-radius: 3px; background-color: lighten($dark, 10%); border: $default-border solid darken($senary, 5%); .logo { display: block; text-align: center; margin-bottom: 2em; margin-top: 1em; .logo-part { font-family: 'Lobster Two', cursive; font-size: 2.25em; } .logo-part-1 { @extend .logo-part; color: $secondary; } .logo-part-2 { @extend .logo-part; color: $white; } } } } } } .customer-login { section.login.admin .form-box checkbox.checked span.fi { left: 2px; } } .login { form { margin-top: 0 !important; } .small-centered.columns { margin-top: calc(50vh - 286px); } } .login { .alert { &[ng-show="showError"] { span { font-size: 13px; } } } } .logo-header { text-align: center; display: block; img { width: 100%; max-width: 260px; } }
{ "pile_set_name": "Github" }
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // Can't test the system lib because this test enables debug mode // UNSUPPORTED: with_system_cxx_lib // <list> // Call erase(const_iterator first, const_iterator last); with first iterator from another container #define _LIBCPP_DEBUG 1 #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) #include <list> #include <cassert> #include <cstdlib> #include "test_macros.h" int main(int, char**) { int a1[] = {1, 2, 3}; std::list<int> l1(a1, a1+3); std::list<int> l2(a1, a1+3); std::list<int>::iterator i = l1.erase(l2.cbegin(), next(l1.cbegin())); assert(false); return 0; }
{ "pile_set_name": "Github" }
BaseName: fwd_zero Version: 1.0 Description: Test for zero byte UDP reply assertion fail CreationDate: Tue Jan 6 10:39:28 CET 2009 Maintainer: dr. W.C.A. Wijngaards Category: Component: CmdDepends: Depends: Help: Pre: fwd_zero.pre Post: fwd_zero.post Test: fwd_zero.test AuxFiles: Passed: Failure:
{ "pile_set_name": "Github" }
<html> <head> <title>libvorbis - function - vorbis_block_clear</title> <link rel=stylesheet href="style.css" type="text/css"> </head> <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff"> <table border=0 width=100%> <tr> <td><p class=tiny>libvorbis documentation</p></td> <td align=right><p class=tiny>libvorbis version 1.3.2 - 20101101</p></td> </tr> </table> <h1>vorbis_block_clear</h1> <p><i>declared in "vorbis/codec.h";</i></p> <p>This function frees the internal storage for a vorbis_block structure.</p> <table border=0 color=black cellspacing=0 cellpadding=7> <tr bgcolor=#cccccc> <td> <pre><b> extern int vorbis_block_clear(vorbis_block *vb); </b></pre> </td> </tr> </table> <h3>Parameters</h3> <dl> <dt><i>vb</i></dt> <dd>Pointer to a vorbis_block struct to be cleared.</dd> </dl> <h3>Return Values</h3> <blockquote> <li> 0 for success</li> </blockquote> <p> <br><br> <hr noshade> <table border=0 width=100%> <tr valign=top> <td><p class=tiny>copyright &copy; 2010 Xiph.Org</p></td> <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a></p></td> </tr><tr> <td><p class=tiny>libvorbis documentation</p></td> <td align=right><p class=tiny>libvorbis version 1.3.2 - 20101101</p></td> </tr> </table> </body> </html>
{ "pile_set_name": "Github" }
/** * This file is part of FNLP (formerly FudanNLP). * * FNLP is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * FNLP is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License * along with FudanNLP. If not, see <http://www.gnu.org/licenses/>. * * Copyright 2009-2014 www.fnlp.org. All rights reserved. */ package org.fnlp.nlp.corpus; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.util.Set; import org.fnlp.nlp.cn.Chars; import org.fnlp.nlp.cn.Chars.StringType; import org.fnlp.util.UnicodeReader; public class Tags { /** * 字符串文件转换为序列标注文件 * @param infile * @param outfile * @throws IOException */ public static void processFile(String infile, String outfile,String delimer,int tagnum) throws IOException { BufferedReader in = new BufferedReader(new UnicodeReader(new FileInputStream(infile), "utf8")); BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream( outfile), "utf8")); String line = null; while ((line = in.readLine()) != null) { line = line.trim(); String newline; newline= genSegSequence(line,delimer,tagnum); out.write(newline); // out.newLine(); } in.close(); out.close(); } /** * 将序列标签转为BMES * @param wordArray * @return */ public static String genSequence4Tags(String[] wordArray){ StringBuilder sb = new StringBuilder(); for(int i=0; i<wordArray.length; i++) { String word = wordArray[i]; for(int j=0; j<word.length(); j++) { char c = word.charAt(j); if(Chars.getType(c)==Chars.CharType.B){ System.err.println(word + " :包含空格(将序列标签转为BMES)"); } sb.append(c); sb.append('\t'); if(j == 0) { if(word.length() == 1) sb.append('S'); else sb.append('B'); } else if(j == word.length()-1) { sb.append('E'); } else { sb.append('M'); } sb.append('\n'); } } sb.append('\n'); return sb.toString(); } /** * 将序列标签转为BMES * @param wordArray * @return */ public static String genSequence6Tags(String[] wordArray){ StringBuilder sb = new StringBuilder(); for(int i=0; i<wordArray.length; i++) { String word = wordArray[i]; String tag = null; int len = word.length(); switch(len){ case 1: tag = "S";break; case 2: tag = "BE";break; case 3: tag = "B2E";break; case 4: tag = "B23E";break; default : tag = "B23"; int rest = len-4; while(rest-->0){ tag+="M"; } tag+="E"; } assert tag.length() ==len; for(int j=0; j<word.length(); j++) { char c = word.charAt(j); sb.append(c); sb.append('\t'); sb.append(tag.charAt(j)); sb.append('\n'); } } sb.append('\n'); return sb.toString(); } /** * 将分好词的字符串转换为标注序列 * @param sent * @param delimer * @param tagnum * @return */ public static String genSegSequence(String sent,String delimer,int tagnum){ String[] wordArray = sent.split(delimer); if(tagnum ==4 ) return genSequence4Tags(wordArray); else if (tagnum == 6) return genSequence6Tags(wordArray); else return null; } /** * 生成Cross-Label序列 * @param sent * @param delim * @param delimTag * @param filter * @return */ public static String genCrossLabel(String sent,String delim,String delimTag,Set<String> filter){ sent = sent.trim(); if(sent.length()==0) return sent; StringBuilder sb = new StringBuilder(); String[] wordArray = sent.split(delim); for(int i=0; i<wordArray.length; i++) { //得到tag int idx = wordArray[i].lastIndexOf(delimTag); if(idx==-1||idx==wordArray[i].length()-1){ System.err.println(wordArray[i]); } String word = wordArray[i].substring(0,idx); String tag = wordArray[i].substring(idx+1); for(int j=0; j<word.length(); j++) { char c = word.charAt(j); sb.append(c); sb.append('\t'); if(filter==null||filter.contains(tag)){//不过滤或是保留项 if(j == 0) { if(word.length() == 1) sb.append("S-"+tag); else sb.append("B-"+tag); } else if(j == word.length()-1) { sb.append("E-"+tag); } else { sb.append("M-"+tag); } }else{//过滤项 sb.append("O"); } sb.append('\n'); } } sb.append('\n'); return sb.toString(); } }
{ "pile_set_name": "Github" }
# # acpidump - ACPI table dump utility (binary to ascii hex) # # # Note: This makefile is intended to be used from within the native # ACPICA directory structure, from under generate/unix. It specifically # places all object files in a generate/unix subdirectory, not within # the various ACPICA source directories. This prevents collisions # between different compilations of the same source file with different # compile options, and prevents pollution of the source code. # include ../Makefile.config FINAL_PROG = ../$(BINDIR)/acpidump PROG = $(OBJDIR)/acpidump # # Search paths for source files # vpath %.c \ $(ACPIDUMP)\ $(ACPICA_TABLES)\ $(ACPICA_UTILITIES)\ $(ACPICA_COMMON)\ $(ACPICA_OSL) HEADERS = \ $(wildcard $(ACPIDUMP)/*.h) OBJECTS = \ $(OBJDIR)/apdump.o\ $(OBJDIR)/apfiles.o\ $(OBJDIR)/apmain.o\ $(OBJDIR)/cmfsize.o\ $(OBJDIR)/getopt.o\ $(OBJDIR)/osunixdir.o\ $(OBJDIR)/osunixmap.o\ $(OBJDIR)/osunixxf.o\ $(OBJDIR)/tbprint.o\ $(OBJDIR)/tbxfroot.o\ $(OBJDIR)/utascii.o\ $(OBJDIR)/utbuffer.o\ $(OBJDIR)/utdebug.o\ $(OBJDIR)/utexcep.o\ $(OBJDIR)/utglobal.o\ $(OBJDIR)/uthex.o\ $(OBJDIR)/utmath.o\ $(OBJDIR)/utnonansi.o\ $(OBJDIR)/utstring.o\ $(OBJDIR)/utstrsuppt.o\ $(OBJDIR)/utstrtoul64.o\ $(OBJDIR)/utxferror.o # # Per-host interfaces # ifeq ($(ACPI_HOST), _DragonFly) HOST_FAMILY = BSD endif ifeq ($(ACPI_HOST), _FreeBSD) HOST_FAMILY = BSD endif ifeq ($(ACPI_HOST), _NetBSD) HOST_FAMILY = BSD endif ifeq ($(ACPI_HOST), _QNX) HOST_FAMILY = BSD endif ifeq ($(HOST_FAMILY), BSD) OBJECTS += \ $(OBJDIR)/osbsdtbl.o else OBJECTS += \ $(OBJDIR)/oslinuxtbl.o endif # # Flags specific to acpidump # CFLAGS += \ -DACPI_DUMP_APP\ -I$(ACPIDUMP) # # Common Rules # include ../Makefile.rules
{ "pile_set_name": "Github" }
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build go1.7 package testtext import "testing" func Run(t *testing.T, name string, fn func(t *testing.T)) bool { return t.Run(name, fn) } func Bench(b *testing.B, name string, fn func(b *testing.B)) bool { return b.Run(name, fn) }
{ "pile_set_name": "Github" }
titus.producer.tools.findRef ============================ .. autofunction:: titus.producer.tools.findRef
{ "pile_set_name": "Github" }
function pc(x) { let sw = $device.info.screen.width return x * sw / 100 } module.exports = { pc: pc }
{ "pile_set_name": "Github" }
/* ****************************************************************************** * * Copyright (C) 1999-2010, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** * file name: umachine.h * encoding: US-ASCII * tab size: 8 (not used) * indentation:4 * * created on: 1999sep13 * created by: Markus W. Scherer * * This file defines basic types and constants for utf.h to be * platform-independent. umachine.h and utf.h are included into * utypes.h to provide all the general definitions for ICU. * All of these definitions used to be in utypes.h before * the UTF-handling macros made this unmaintainable. */ #ifndef __UMACHINE_H__ #define __UMACHINE_H__ /** * \file * \brief Basic types and constants for UTF * * <h2> Basic types and constants for UTF </h2> * This file defines basic types and constants for utf.h to be * platform-independent. umachine.h and utf.h are included into * utypes.h to provide all the general definitions for ICU. * All of these definitions used to be in utypes.h before * the UTF-handling macros made this unmaintainable. * */ /*==========================================================================*/ /* Include platform-dependent definitions */ /* which are contained in the platform-specific file platform.h */ /*==========================================================================*/ #if defined(U_PALMOS) # include "unicode/ppalmos.h" #elif !defined(__MINGW32__) && (defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)) #ifdef CYGWINMSVC # include "unicode/platform.h" #endif # include "unicode/pwin32.h" #else # include "unicode/ptypes.h" /* platform.h is included in ptypes.h */ #endif /* * ANSI C headers: * stddef.h defines wchar_t */ #include <stddef.h> /*==========================================================================*/ /* XP_CPLUSPLUS is a cross-platform symbol which should be defined when */ /* using C++. It should not be defined when compiling under C. */ /*==========================================================================*/ #ifdef __cplusplus # ifndef XP_CPLUSPLUS # define XP_CPLUSPLUS # endif #else # undef XP_CPLUSPLUS #endif /*==========================================================================*/ /* For C wrappers, we use the symbol U_STABLE. */ /* This works properly if the includer is C or C++. */ /* Functions are declared U_STABLE return-type U_EXPORT2 function-name()... */ /*==========================================================================*/ /** * \def U_CFUNC * This is used in a declaration of a library private ICU C function. * @stable ICU 2.4 */ /** * \def U_CDECL_BEGIN * This is used to begin a declaration of a library private ICU C API. * @stable ICU 2.4 */ /** * \def U_CDECL_END * This is used to end a declaration of a library private ICU C API * @stable ICU 2.4 */ #ifdef XP_CPLUSPLUS # define U_CFUNC extern "C" # define U_CDECL_BEGIN extern "C" { # define U_CDECL_END } #else # define U_CFUNC extern # define U_CDECL_BEGIN # define U_CDECL_END #endif /** * \def U_ATTRIBUTE_DEPRECATED * This is used for GCC specific attributes * @internal */ #if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)) # define U_ATTRIBUTE_DEPRECATED __attribute__ ((deprecated)) /** * \def U_ATTRIBUTE_DEPRECATED * This is used for Visual C++ specific attributes * @internal */ #elif defined(U_WINDOWS) && defined(_MSC_VER) && (_MSC_VER >= 1400) # define U_ATTRIBUTE_DEPRECATED __declspec(deprecated) #else # define U_ATTRIBUTE_DEPRECATED #endif /** This is used to declare a function as a public ICU C API @stable ICU 2.0*/ #define U_CAPI U_CFUNC U_EXPORT /** This is used to declare a function as a stable public ICU C API*/ #define U_STABLE U_CAPI /** This is used to declare a function as a draft public ICU C API */ #define U_DRAFT U_CAPI /** This is used to declare a function as a deprecated public ICU C API */ #define U_DEPRECATED U_CAPI U_ATTRIBUTE_DEPRECATED /** This is used to declare a function as an obsolete public ICU C API */ #define U_OBSOLETE U_CAPI /** This is used to declare a function as an internal ICU C API */ #define U_INTERNAL U_CAPI /*==========================================================================*/ /* limits for int32_t etc., like in POSIX inttypes.h */ /*==========================================================================*/ #ifndef INT8_MIN /** The smallest value an 8 bit signed integer can hold @stable ICU 2.0 */ # define INT8_MIN ((int8_t)(-128)) #endif #ifndef INT16_MIN /** The smallest value a 16 bit signed integer can hold @stable ICU 2.0 */ # define INT16_MIN ((int16_t)(-32767-1)) #endif #ifndef INT32_MIN /** The smallest value a 32 bit signed integer can hold @stable ICU 2.0 */ # define INT32_MIN ((int32_t)(-2147483647-1)) #endif #ifndef INT8_MAX /** The largest value an 8 bit signed integer can hold @stable ICU 2.0 */ # define INT8_MAX ((int8_t)(127)) #endif #ifndef INT16_MAX /** The largest value a 16 bit signed integer can hold @stable ICU 2.0 */ # define INT16_MAX ((int16_t)(32767)) #endif #ifndef INT32_MAX /** The largest value a 32 bit signed integer can hold @stable ICU 2.0 */ # define INT32_MAX ((int32_t)(2147483647)) #endif #ifndef UINT8_MAX /** The largest value an 8 bit unsigned integer can hold @stable ICU 2.0 */ # define UINT8_MAX ((uint8_t)(255U)) #endif #ifndef UINT16_MAX /** The largest value a 16 bit unsigned integer can hold @stable ICU 2.0 */ # define UINT16_MAX ((uint16_t)(65535U)) #endif #ifndef UINT32_MAX /** The largest value a 32 bit unsigned integer can hold @stable ICU 2.0 */ # define UINT32_MAX ((uint32_t)(4294967295U)) #endif #if defined(U_INT64_T_UNAVAILABLE) # error int64_t is required for decimal format and rule-based number format. #else # ifndef INT64_C /** * Provides a platform independent way to specify a signed 64-bit integer constant. * note: may be wrong for some 64 bit platforms - ensure your compiler provides INT64_C * @stable ICU 2.8 */ # define INT64_C(c) c ## LL # endif # ifndef UINT64_C /** * Provides a platform independent way to specify an unsigned 64-bit integer constant. * note: may be wrong for some 64 bit platforms - ensure your compiler provides UINT64_C * @stable ICU 2.8 */ # define UINT64_C(c) c ## ULL # endif # ifndef U_INT64_MIN /** The smallest value a 64 bit signed integer can hold @stable ICU 2.8 */ # define U_INT64_MIN ((int64_t)(INT64_C(-9223372036854775807)-1)) # endif # ifndef U_INT64_MAX /** The largest value a 64 bit signed integer can hold @stable ICU 2.8 */ # define U_INT64_MAX ((int64_t)(INT64_C(9223372036854775807))) # endif # ifndef U_UINT64_MAX /** The largest value a 64 bit unsigned integer can hold @stable ICU 2.8 */ # define U_UINT64_MAX ((uint64_t)(UINT64_C(18446744073709551615))) # endif #endif /*==========================================================================*/ /* Boolean data type */ /*==========================================================================*/ /** The ICU boolean type @stable ICU 2.0 */ typedef int8_t UBool; #ifndef TRUE /** The TRUE value of a UBool @stable ICU 2.0 */ # define TRUE 1 #endif #ifndef FALSE /** The FALSE value of a UBool @stable ICU 2.0 */ # define FALSE 0 #endif /*==========================================================================*/ /* Unicode data types */ /*==========================================================================*/ /* wchar_t-related definitions -------------------------------------------- */ /** * \def U_HAVE_WCHAR_H * Indicates whether <wchar.h> is available (1) or not (0). Set to 1 by default. * * @stable ICU 2.0 */ #ifndef U_HAVE_WCHAR_H # define U_HAVE_WCHAR_H 1 #endif /** * \def U_SIZEOF_WCHAR_T * U_SIZEOF_WCHAR_T==sizeof(wchar_t) (0 means it is not defined or autoconf could not set it) * * @stable ICU 2.0 */ #if U_SIZEOF_WCHAR_T==0 # undef U_SIZEOF_WCHAR_T # define U_SIZEOF_WCHAR_T 4 #endif /* * \def U_WCHAR_IS_UTF16 * Defined if wchar_t uses UTF-16. * * @stable ICU 2.0 */ /* * \def U_WCHAR_IS_UTF32 * Defined if wchar_t uses UTF-32. * * @stable ICU 2.0 */ #if !defined(U_WCHAR_IS_UTF16) && !defined(U_WCHAR_IS_UTF32) # ifdef __STDC_ISO_10646__ # if (U_SIZEOF_WCHAR_T==2) # define U_WCHAR_IS_UTF16 # elif (U_SIZEOF_WCHAR_T==4) # define U_WCHAR_IS_UTF32 # endif # elif defined __UCS2__ # if (__OS390__ || __OS400__) && (U_SIZEOF_WCHAR_T==2) # define U_WCHAR_IS_UTF16 # endif # elif defined __UCS4__ # if (U_SIZEOF_WCHAR_T==4) # define U_WCHAR_IS_UTF32 # endif # elif defined(U_WINDOWS) # define U_WCHAR_IS_UTF16 # endif #endif /* UChar and UChar32 definitions -------------------------------------------- */ /** Number of bytes in a UChar. @stable ICU 2.0 */ #define U_SIZEOF_UCHAR 2 /** * \var UChar * Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned. * If wchar_t is not 16 bits wide, then define UChar to be uint16_t or char16_t because GCC >=4.4 * can handle UTF16 string literals. * This makes the definition of UChar platform-dependent * but allows direct string type compatibility with platforms with * 16-bit wchar_t types. * * @draft ICU 4.4 */ /* Define UChar to be compatible with wchar_t if possible. */ #if U_SIZEOF_WCHAR_T==2 typedef wchar_t UChar; #elif U_GNUC_UTF16_STRING #if defined _GCC_ typedef __CHAR16_TYPE__ char16_t; #endif typedef char16_t UChar; #else typedef uint16_t UChar; #endif /** * Define UChar32 as a type for single Unicode code points. * UChar32 is a signed 32-bit integer (same as int32_t). * * The Unicode code point range is 0..0x10ffff. * All other values (negative or >=0x110000) are illegal as Unicode code points. * They may be used as sentinel values to indicate "done", "error" * or similar non-code point conditions. * * Before ICU 2.4 (Jitterbug 2146), UChar32 was defined * to be wchar_t if that is 32 bits wide (wchar_t may be signed or unsigned) * or else to be uint32_t. * That is, the definition of UChar32 was platform-dependent. * * @see U_SENTINEL * @stable ICU 2.4 */ typedef int32_t UChar32; /*==========================================================================*/ /* U_INLINE and U_ALIGN_CODE Set default values if these are not already */ /* defined. Definitions normally are in */ /* platform.h or the corresponding file for */ /* the OS in use. */ /*==========================================================================*/ #ifndef U_HIDE_INTERNAL_API /** * \def U_ALIGN_CODE * This is used to align code fragments to a specific byte boundary. * This is useful for getting consistent performance test results. * @internal */ #ifndef U_ALIGN_CODE # define U_ALIGN_CODE(n) #endif #endif /* U_HIDE_INTERNAL_API */ /** * \def U_INLINE * This is used to request inlining of a function, on platforms and languages which support it. */ #ifndef U_INLINE # ifdef XP_CPLUSPLUS # define U_INLINE inline # else # define U_INLINE # endif #endif #include "unicode/urename.h" #endif
{ "pile_set_name": "Github" }
// go run mksyscall.go -l32 -tags darwin,arm,go1.13 syscall_darwin.1_13.go // Code generated by the command above; see README.md. DO NOT EDIT. // +build darwin,arm,go1.13 package unix import ( "syscall" "unsafe" ) var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func closedir(dir uintptr) (err error) { _, _, e1 := syscall_syscall(funcPC(libc_closedir_trampoline), uintptr(dir), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } func libc_closedir_trampoline() //go:linkname libc_closedir libc_closedir //go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) { r0, _, _ := syscall_syscall(funcPC(libc_readdir_r_trampoline), uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result))) res = Errno(r0) return } func libc_readdir_r_trampoline() //go:linkname libc_readdir_r libc_readdir_r //go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
{ "pile_set_name": "Github" }
libavcodec/msrledec.o: libavcodec/msrledec.c libavutil/intreadwrite.h \ libavutil/avconfig.h libavutil/attributes.h libavutil/bswap.h config.h \ libavcodec/avcodec.h libavutil/samplefmt.h libavutil/avutil.h \ libavutil/common.h libavutil/macros.h libavutil/version.h \ libavutil/intmath.h libavutil/mem.h libavutil/error.h \ libavutil/internal.h libavutil/timer.h libavutil/log.h libavutil/cpu.h \ libavutil/dict.h libavutil/pixfmt.h libavutil/libm.h \ libavutil/intfloat.h libavutil/mathematics.h libavutil/rational.h \ libavutil/attributes.h libavutil/avutil.h libavutil/buffer.h \ libavutil/cpu.h libavutil/channel_layout.h libavutil/dict.h \ libavutil/frame.h libavutil/buffer.h libavutil/samplefmt.h \ libavutil/log.h libavutil/pixfmt.h libavutil/rational.h \ libavcodec/version.h libavutil/version.h libavcodec/msrledec.h \ libavcodec/bytestream.h libavutil/avassert.h libavutil/common.h
{ "pile_set_name": "Github" }
set current_schema=vector_engine; set enable_nestloop=off; set enable_vector_engine=off; explain (costs off) select o_orderpriority, count(*) as order_count from orders where o_orderdate >= '1993-07-01'::date and o_orderdate < '1993-07-01'::date + interval '3 month' and exists ( select * from lineitem where l_orderkey = o_orderkey and l_commitdate < l_receiptdate ) group by o_orderpriority order by order_count; select o_orderpriority, count(*) as order_count from orders where o_orderdate >= '1993-07-01'::date and o_orderdate < '1993-07-01'::date + interval '3 month' and exists ( select * from lineitem where l_orderkey = o_orderkey and l_commitdate < l_receiptdate ) group by o_orderpriority order by order_count;
{ "pile_set_name": "Github" }
program Test implicit none integer sf_gettype integer type, n1, i logical sf_histint integer*8 in, out, sf_input, sf_output character*100 sf_histstring, label1 real trace(100) call sf_init() in = sf_input("in") out = sf_output("out") type = sf_gettype(in) call sf_putint(out,"n2",5) call sf_floatread(trace,100,in) do 10 i=1,5 call sf_floatwrite(trace,100,out) 10 continue stop end C $Id: Testfile.f 982 2005-01-30 23:38:22Z shan $
{ "pile_set_name": "Github" }
:; set -e :; node ./scripts/esy-prepublish.js $1.json :; rm -rf ./_release :; exit 0 node ./scripts/esy-prepublish.js %1.json || exit 1 rd /S /Q _release
{ "pile_set_name": "Github" }
/* * Copyright 2015 The WebRTC Project Authors. All rights reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ // This file is only needed to make ninja happy on some platforms. // On some platforms it is not possible to link an rtc_static_library // without any source file listed in the GN target.
{ "pile_set_name": "Github" }
/* * Copyright (C) 2012 Igalia S.L * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "config.h" #if USE(GSTREAMER) #include "GStreamerUtilities.h" #include "IntSize.h" #include <gst/audio/audio.h> #include <gst/gst.h> #include <wtf/gobject/GOwnPtr.h> namespace WebCore { const char* webkitGstMapInfoQuarkString = "webkit-gst-map-info"; GstPad* webkitGstGhostPadFromStaticTemplate(GstStaticPadTemplate* staticPadTemplate, const gchar* name, GstPad* target) { GstPad* pad; GstPadTemplate* padTemplate = gst_static_pad_template_get(staticPadTemplate); if (target) pad = gst_ghost_pad_new_from_template(name, target, padTemplate); else pad = gst_ghost_pad_new_no_target_from_template(name, padTemplate); gst_object_unref(padTemplate); return pad; } #if ENABLE(VIDEO) bool getVideoSizeAndFormatFromCaps(GstCaps* caps, WebCore::IntSize& size, GstVideoFormat& format, int& pixelAspectRatioNumerator, int& pixelAspectRatioDenominator, int& stride) { GstVideoInfo info; if (!gst_caps_is_fixed(caps) || !gst_video_info_from_caps(&info, caps)) return false; format = GST_VIDEO_INFO_FORMAT(&info); size.setWidth(GST_VIDEO_INFO_WIDTH(&info)); size.setHeight(GST_VIDEO_INFO_HEIGHT(&info)); pixelAspectRatioNumerator = GST_VIDEO_INFO_PAR_N(&info); pixelAspectRatioDenominator = GST_VIDEO_INFO_PAR_D(&info); stride = GST_VIDEO_INFO_PLANE_STRIDE(&info, 0); return true; } #endif GstBuffer* createGstBuffer(GstBuffer* buffer) { gsize bufferSize = gst_buffer_get_size(buffer); GstBuffer* newBuffer = gst_buffer_new_and_alloc(bufferSize); if (!newBuffer) return 0; gst_buffer_copy_into(newBuffer, buffer, static_cast<GstBufferCopyFlags>(GST_BUFFER_COPY_METADATA), 0, bufferSize); return newBuffer; } GstBuffer* createGstBufferForData(const char* data, int length) { GstBuffer* buffer = gst_buffer_new_and_alloc(length); gst_buffer_fill(buffer, 0, data, length); return buffer; } char* getGstBufferDataPointer(GstBuffer* buffer) { GstMiniObject* miniObject = reinterpret_cast<GstMiniObject*>(buffer); GstMapInfo* mapInfo = static_cast<GstMapInfo*>(gst_mini_object_get_qdata(miniObject, g_quark_from_static_string(webkitGstMapInfoQuarkString))); return reinterpret_cast<char*>(mapInfo->data); } void mapGstBuffer(GstBuffer* buffer) { GstMapInfo* mapInfo = g_slice_new(GstMapInfo); if (!gst_buffer_map(buffer, mapInfo, GST_MAP_WRITE)) { g_slice_free(GstMapInfo, mapInfo); gst_buffer_unref(buffer); return; } GstMiniObject* miniObject = reinterpret_cast<GstMiniObject*>(buffer); gst_mini_object_set_qdata(miniObject, g_quark_from_static_string(webkitGstMapInfoQuarkString), mapInfo, 0); } void unmapGstBuffer(GstBuffer* buffer) { GstMiniObject* miniObject = reinterpret_cast<GstMiniObject*>(buffer); GstMapInfo* mapInfo = static_cast<GstMapInfo*>(gst_mini_object_steal_qdata(miniObject, g_quark_from_static_string(webkitGstMapInfoQuarkString))); if (!mapInfo) return; gst_buffer_unmap(buffer, mapInfo); g_slice_free(GstMapInfo, mapInfo); } bool initializeGStreamer() { #if GST_CHECK_VERSION(0, 10, 31) if (gst_is_initialized()) return true; #endif GOwnPtr<GError> error; // FIXME: We should probably pass the arguments from the command line. bool gstInitialized = gst_init_check(0, 0, &error.outPtr()); ASSERT_WITH_MESSAGE(gstInitialized, "GStreamer initialization failed: %s", error ? error->message : "unknown error occurred"); return gstInitialized; } } #endif // USE(GSTREAMER)
{ "pile_set_name": "Github" }
/* jshint node: true */ module.exports = function(grunt) { 'use strict'; var path = require('path'); grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), meta: { banner: { dist: '/*!\n'+ ' * <%= pkg.name %> v<%= pkg.version %> - <%= pkg.description %>\n'+ ' * <%= pkg.homepage %>\n'+ ' * <%= pkg.repository.url %>\n'+ ' */\n' }, outputDir: 'dist', output : '<%= meta.outputDir %>/<%= pkg.name %>' }, concat: { options: { separator: '' }, dist: { src: [ 'src/polyfills/*.js', 'src/Helpers.js', 'src/Grid.js', 'src/GridHandler.js', 'src/GridDispatch.js' ], dest: '<%= meta.output %>.js' } }, uglify: { dist: { options: { banner: '<%= meta.banner.dist %>' }, files: { '<%= meta.outputDir %>/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>'] } } }, jshint: { options: { jshintrc : '.jshintrc' }, files: [ './*.js', 'src/**/*.js', '!src/polyfills/*', 'tests/**/*Spec.js' ] }, jasmine: { options: { specs: ['tests/*Spec.js'], vendor: [ require.resolve('enquire.js'), require.resolve('jquery'), path.join(__dirname, 'node_modules', 'jasmine-jquery', 'lib', 'jasmine-jquery.js') ], keepRunner: true }, coverage: { src: ['src/**/*.js'], options: { summary: true, outfile: 'tests/SpecRunner.html', template: require('grunt-template-jasmine-istanbul'), templateOptions: { files: ['src/**/*.js', '!src/polyfills/*'], report: [ { type: 'lcov', options: { dir: 'coverage' } }, { type: 'text-summary' } ], coverage: 'coverage/coverage.json' } } } }, umd: { dist: { src: '<%= concat.dist.dest %>', amdModuleId: '<%= pkg.name %>', objectToExport: 'new GridDispatch()', globalAlias: '<%= pkg.name %>', indent: ' ', deps: { 'default': ['enquire'], amd: ['enquire.js'], cjs: ['enquire.js'] } }, }, bytesize: { dist: { src: '<%= meta.output %>.min.js' } }, watch: { files: ['<%= jshint.files %>', 'tests/**/*.js', 'tests/**/*.tmpl'], tasks: ['default'] }, clean: { dist: [ '.grunt', 'coverage', 'tests/SpecRunner.html', ] } }); grunt.loadNpmTasks('grunt-bytesize'); grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-jasmine'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-umd'); grunt.registerTask('pre-build', [ 'test' ]); grunt.registerTask('build', [ 'concat', 'umd', 'uglify' ]); grunt.registerTask('post-build', [ 'bytesize' ]); grunt.registerTask('test', [ 'jshint', 'jasmine' ]); // Meta tasks grunt.registerTask('default', [ 'pre-build', 'build', 'post-build' ]); };
{ "pile_set_name": "Github" }
# Code derived from https://github.com/openai/improved-gan/tree/master/inception_score from __future__ import absolute_import from __future__ import division from __future__ import print_function import os.path import sys import tarfile import numpy as np from six.moves import urllib import tensorflow as tf import glob import scipy.misc import math import sys import chainer from chainer import functions as F MODEL_DIR = '/tmp/imagenet' DATA_URL = 'http://download.tensorflow.org/models/image/imagenet/inception-2015-12-05.tgz' softmax = None last_layer = None config = tf.ConfigProto() config.gpu_options.per_process_gpu_memory_fraction = 0.3 def inception_forward(images, layer): assert (type(images[0]) == np.ndarray) assert (len(images[0].shape) == 3) assert (np.max(images[0]) > 10) assert (np.min(images[0]) >= 0.0) bs = 100 images = images.transpose(0, 2, 3, 1) with tf.Session(config=config) as sess: preds = [] n_batches = int(math.ceil(float(len(images)) / float(bs))) for i in range(n_batches): sys.stdout.write(".") sys.stdout.flush() inp = images[(i * bs):min((i + 1) * bs, len(images))] pred = sess.run(layer, {'ExpandDims:0': inp}) preds.append(pred) preds = np.concatenate(preds, 0) return preds def get_mean_and_cov(images): before_preds = inception_forward(images, last_layer) m = np.mean(before_preds, 0) cov = np.cov(before_preds, rowvar=False) return m, cov def get_fid(images, ref_stats=None, images_ref=None, splits=10): before_preds = inception_forward(images, last_layer) if ref_stats is None: if images_ref is None: raise ValueError('images_ref should be provided if ref_stats is None') m_ref, cov_ref = get_mean_and_cov(images_ref) fids = [] for i in range(splits): part = before_preds[(i * before_preds.shape[0] // splits):((i + 1) * before_preds.shape[0] // splits), :] m_gen = np.mean(part, 0) cov_gen = np.cov(part, rowvar=False) fid = np.sum((m_ref - m_gen) ** 2) + np.trace( cov_ref + cov_gen - 2 * scipy.linalg.sqrtm(np.dot(cov_ref, cov_gen))) fids.append(fid) return np.mean(fids), np.std(fids) # Call this function with list of images. Each of elements should be a # numpy array with values ranging from 0 to 255. def get_inception_score(images, splits=10): preds = inception_forward(images, softmax) scores = [] for i in range(splits): part = preds[(i * preds.shape[0] // splits):((i + 1) * preds.shape[0] // splits), :] kl = part * (np.log(part) - np.log(np.expand_dims(np.mean(part, 0), 0))) kl = np.mean(np.sum(kl, 1)) scores.append(np.exp(kl)) return np.mean(scores), np.std(scores) # Call this function with list of images. Each of elements should be a # numpy array with values ranging from 0 to 255. def get_inception_accuracy(images, labels): batch_size = 100 if isinstance(images, (list, tuple)): ims_list = images ys_list = [] for ims in ims_list: n, _, _, _ = ims.shape n_batches = int(math.ceil(float(n) / float(batch_size))) print('batch_size:{}, n_ims{}, n_batches{}'.format(batch_size, n, n_batches)) print('Calculating inception accuracy...') ys = inception_forward(ims, softmax)[:, 1:1001] ys_list.append(ys) ys = sum(ys_list) / len(ys_list) else: n, _, _, _, = images.shape n_batches = int(math.ceil(float(n) / float(batch_size))) print('batch_size:{}, n_ims{}, n_batches{}'.format(batch_size, n, n_batches)) print('Calculating inception accuracy...') ys = inception_forward(images, softmax)[:, 1:1001] return F.accuracy(ys, labels).data # This function is called automatically. def _init_inception(): global softmax global last_layer if not os.path.exists(MODEL_DIR): os.makedirs(MODEL_DIR) filename = DATA_URL.split('/')[-1] filepath = os.path.join(MODEL_DIR, filename) if not os.path.exists(filepath): def _progress(count, block_size, total_size): sys.stdout.write('\r>> Downloading %s %.1f%%' % ( filename, float(count * block_size) / float(total_size) * 100.0)) sys.stdout.flush() filepath, _ = urllib.request.urlretrieve(DATA_URL, filepath, _progress) print() statinfo = os.stat(filepath) print('Succesfully downloaded', filename, statinfo.st_size, 'bytes.') tarfile.open(filepath, 'r:gz').extractall(MODEL_DIR) with tf.gfile.FastGFile(os.path.join( MODEL_DIR, 'classify_image_graph_def.pb'), 'rb') as f: graph_def = tf.GraphDef() graph_def.ParseFromString(f.read()) _ = tf.import_graph_def(graph_def, name='') # Works with an arbitrary minibatch size. with tf.Session(config=config) as sess: pool3 = sess.graph.get_tensor_by_name('pool_3:0') ops = pool3.graph.get_operations() for op_idx, op in enumerate(ops): for o in op.outputs: shape = o.get_shape() shape = [s.value for s in shape] new_shape = [] for j, s in enumerate(shape): if s == 1 and j == 0: new_shape.append(None) else: new_shape.append(s) o._shape = tf.TensorShape(new_shape) w = sess.graph.get_operation_by_name("softmax/logits/MatMul").inputs[1] last_layer = tf.squeeze(pool3) logits = tf.matmul(last_layer, w) softmax = tf.nn.softmax(logits) if softmax is None: _init_inception()
{ "pile_set_name": "Github" }
// Copyright (c) 2010-2020 The Open-Transactions developers // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #include "opentxs/protobuf/verify/VerificationOffer.hpp" // IWYU pragma: associated #include <stdexcept> #include <string> #include <utility> #include "opentxs/protobuf/Basic.hpp" #include "opentxs/protobuf/Check.hpp" #include "opentxs/protobuf/Claim.pb.h" #include "opentxs/protobuf/Verification.pb.h" #include "opentxs/protobuf/VerificationOffer.pb.h" #include "opentxs/protobuf/verify/Claim.hpp" #include "opentxs/protobuf/verify/Verification.hpp" #include "opentxs/protobuf/verify/VerifyContacts.hpp" #include "protobuf/Check.hpp" #define PROTO_NAME "verification offer" namespace opentxs { namespace proto { auto CheckProto_1(const VerificationOffer& input, const bool silent) -> bool { UNDEFINED_VERSION(1) } auto CheckProto_2(const VerificationOffer& input, const bool silent) -> bool { UNDEFINED_VERSION(2) } auto CheckProto_3(const VerificationOffer& input, const bool silent) -> bool { if (!input.has_offeringnym()) { FAIL_1("missing sender nym id") } if (MIN_PLAUSIBLE_IDENTIFIER > input.offeringnym().size()) { FAIL_1("invalid sender nym id") } if (MAX_PLAUSIBLE_IDENTIFIER < input.offeringnym().size()) { FAIL_1("invalid sender nym id") } if (!input.has_recipientnym()) { FAIL_1("missing recipient nym id") } if (MIN_PLAUSIBLE_IDENTIFIER > input.recipientnym().size()) { FAIL_1("invalid recipient nym id") } if (MAX_PLAUSIBLE_IDENTIFIER < input.recipientnym().size()) { FAIL_1("invalid recipient nym id") } try { const bool validClaim = Check( input.claim(), VerificationOfferAllowedClaim().at(input.version()).first, VerificationOfferAllowedClaim().at(input.version()).second, silent); if (!validClaim) { FAIL_1("invalid claim") } } catch (const std::out_of_range&) { FAIL_2("allowed claim version not defined for version", input.version()) } if (input.claim().nymid() != input.recipientnym()) { FAIL_1("claim nym does not match recipient nym") } try { const bool validVerification = Check( input.verification(), VerificationOfferAllowedVerification().at(input.version()).first, VerificationOfferAllowedVerification().at(input.version()).second, silent, VerificationType::Normal); if (!validVerification) { FAIL_1("invalid verification") } } catch (const std::out_of_range&) { FAIL_2( "allowed verification version not defined for version", input.version()) } return true; } auto CheckProto_4(const VerificationOffer& input, const bool silent) -> bool { return CheckProto_3(input, silent); } auto CheckProto_5(const VerificationOffer& input, const bool silent) -> bool { UNDEFINED_VERSION(5) } auto CheckProto_6(const VerificationOffer& input, const bool silent) -> bool { UNDEFINED_VERSION(6) } auto CheckProto_7(const VerificationOffer& input, const bool silent) -> bool { UNDEFINED_VERSION(7) } auto CheckProto_8(const VerificationOffer& input, const bool silent) -> bool { UNDEFINED_VERSION(8) } auto CheckProto_9(const VerificationOffer& input, const bool silent) -> bool { UNDEFINED_VERSION(9) } auto CheckProto_10(const VerificationOffer& input, const bool silent) -> bool { UNDEFINED_VERSION(10) } auto CheckProto_11(const VerificationOffer& input, const bool silent) -> bool { UNDEFINED_VERSION(11) } auto CheckProto_12(const VerificationOffer& input, const bool silent) -> bool { UNDEFINED_VERSION(12) } auto CheckProto_13(const VerificationOffer& input, const bool silent) -> bool { UNDEFINED_VERSION(13) } auto CheckProto_14(const VerificationOffer& input, const bool silent) -> bool { UNDEFINED_VERSION(14) } auto CheckProto_15(const VerificationOffer& input, const bool silent) -> bool { UNDEFINED_VERSION(15) } auto CheckProto_16(const VerificationOffer& input, const bool silent) -> bool { UNDEFINED_VERSION(16) } auto CheckProto_17(const VerificationOffer& input, const bool silent) -> bool { UNDEFINED_VERSION(17) } auto CheckProto_18(const VerificationOffer& input, const bool silent) -> bool { UNDEFINED_VERSION(18) } auto CheckProto_19(const VerificationOffer& input, const bool silent) -> bool { UNDEFINED_VERSION(19) } auto CheckProto_20(const VerificationOffer& input, const bool silent) -> bool { UNDEFINED_VERSION(20) } } // namespace proto } // namespace opentxs
{ "pile_set_name": "Github" }
{ "packages": ["packages/*", "docs", "framer"], "npmClient": "yarn", "useWorkspaces": true, "version": "independent" }
{ "pile_set_name": "Github" }
/* * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or * its licensors. * * For complete copyright and license terms please see the LICENSE at the root of this * distribution (the "License"). All use of this software is governed by the License, * or, if provided, by the license below or the license accompanying this file. Do not * remove or modify any license notices. This file is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * */ #include "MotionListWindow.h" #include "MotionWindowPlugin.h" #include <QMenu> #include <QTableWidget> #include <QContextMenuEvent> #include <QAction> #include <QPushButton> #include <QApplication> #include <QApplication> #include <QVBoxLayout> #include <QFileDialog> #include <QMimeData> #include <QLineEdit> #include <QMessageBox> #include <QHeaderView> #include <MCore/Source/CommandGroup.h> #include <EMotionFX/CommandSystem/Source/MotionCommands.h> #include <EMotionFX/CommandSystem/Source/MetaData.h> #include <EMotionFX/CommandSystem/Source/MotionSetCommands.h> #include <EMotionFX/Source/MotionManager.h> #include "../../../../EMStudioSDK/Source/NotificationWindow.h" #include "../../../../EMStudioSDK/Source/EMStudioManager.h" #include "../../../../EMStudioSDK/Source/FileManager.h" #include "../../../../EMStudioSDK/Source/MainWindow.h" #include "../../../../EMStudioSDK/Source/SaveChangedFilesManager.h" #include "../MotionSetsWindow/MotionSetsWindowPlugin.h" #include <AzQtComponents/Utilities/DesktopUtilities.h> namespace EMStudio { // constructor MotionListRemoveMotionsFailedWindow::MotionListRemoveMotionsFailedWindow(QWidget* parent, const AZStd::vector<EMotionFX::Motion*>& motions) : QDialog(parent) { // set the window title setWindowTitle("Remove Motions Failed"); // resize the window resize(720, 405); // create the layout QVBoxLayout* layout = new QVBoxLayout(); // add the top text layout->addWidget(new QLabel("The following motions failed to get removed because they are used by a motion set:")); // create the table widget QTableWidget* tableWidget = new QTableWidget(); tableWidget->setAlternatingRowColors(true); tableWidget->setGridStyle(Qt::SolidLine); tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows); tableWidget->setSelectionMode(QAbstractItemView::SingleSelection); tableWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); tableWidget->setCornerButtonEnabled(false); tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers); // set the table widget columns tableWidget->setColumnCount(2); QStringList headerLabels; headerLabels.append("Name"); headerLabels.append("FileName"); tableWidget->setHorizontalHeaderLabels(headerLabels); tableWidget->horizontalHeader()->setStretchLastSection(true); tableWidget->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); tableWidget->horizontalHeader()->setSortIndicator(0, Qt::AscendingOrder); tableWidget->verticalHeader()->setVisible(false); // set the number of rows const int numMotions = static_cast<int>(motions.size()); tableWidget->setRowCount(numMotions); // add each motion in the table for (int i = 0; i < numMotions; ++i) { // get the motion EMotionFX::Motion* motion = motions[i]; // create the name table widget item QTableWidgetItem* nameTableWidgetItem = new QTableWidgetItem(motion->GetName()); nameTableWidgetItem->setToolTip(motion->GetName()); // create the filename table widget item QTableWidgetItem* fileNameTableWidgetItem = new QTableWidgetItem(motion->GetFileName()); fileNameTableWidgetItem->setToolTip(motion->GetFileName()); // set the text of the row tableWidget->setItem(i, 0, nameTableWidgetItem); tableWidget->setItem(i, 1, fileNameTableWidgetItem); // set the row height tableWidget->setRowHeight(i, 21); } // resize the first column to contents tableWidget->resizeColumnToContents(0); // add the table widget in the layout layout->addWidget(tableWidget); // add the button to close the window QPushButton* okButton = new QPushButton("OK"); connect(okButton, &QPushButton::clicked, this, &MotionListRemoveMotionsFailedWindow::accept); QHBoxLayout* buttonLayout = new QHBoxLayout(); buttonLayout->setAlignment(Qt::AlignRight); buttonLayout->addWidget(okButton); layout->addLayout(buttonLayout); // set the layout setLayout(layout); } // constructor MotionListWindow::MotionListWindow(QWidget* parent, MotionWindowPlugin* motionWindowPlugin) : QWidget(parent) { setObjectName("MotionListWindow"); mMotionTable = nullptr; mMotionWindowPlugin = motionWindowPlugin; } // destructor MotionListWindow::~MotionListWindow() { } void MotionListWindow::Init() { mVLayout = new QVBoxLayout(); mVLayout->setMargin(3); mVLayout->setSpacing(2); mMotionTable = new MotionTableWidget(mMotionWindowPlugin, this); mMotionTable->setObjectName("EMFX.MotionListWindow.MotionTable"); mMotionTable->setAlternatingRowColors(true); connect(mMotionTable, &MotionTableWidget::cellDoubleClicked, this, &MotionListWindow::cellDoubleClicked); connect(mMotionTable, &MotionTableWidget::itemSelectionChanged, this, &MotionListWindow::itemSelectionChanged); // set the table to row single selection mMotionTable->setSelectionBehavior(QAbstractItemView::SelectRows); mMotionTable->setSelectionMode(QAbstractItemView::ExtendedSelection); // make the table items read only mMotionTable->setEditTriggers(QAbstractItemView::NoEditTriggers); // disable the corner button between the row and column selection thingies mMotionTable->setCornerButtonEnabled(false); // enable the custom context menu for the motion table mMotionTable->setContextMenuPolicy(Qt::DefaultContextMenu); // set the column count mMotionTable->setColumnCount(5); // add the name column QTableWidgetItem* nameHeaderItem = new QTableWidgetItem("Name"); nameHeaderItem->setTextAlignment(Qt::AlignVCenter | Qt::AlignLeft); mMotionTable->setHorizontalHeaderItem(0, nameHeaderItem); // add the length column QTableWidgetItem* lengthHeaderItem = new QTableWidgetItem("Duration"); lengthHeaderItem->setTextAlignment(Qt::AlignVCenter | Qt::AlignLeft); mMotionTable->setHorizontalHeaderItem(1, lengthHeaderItem); // add the sub column QTableWidgetItem* subHeaderItem = new QTableWidgetItem("Joints"); subHeaderItem->setToolTip("Number of joints inside the motion"); subHeaderItem->setTextAlignment(Qt::AlignVCenter | Qt::AlignLeft); mMotionTable->setHorizontalHeaderItem(2, subHeaderItem); // add the msub column QTableWidgetItem* msubHeaderItem = new QTableWidgetItem("Morphs"); msubHeaderItem->setToolTip("Number of morph targets inside the motion"); msubHeaderItem->setTextAlignment(Qt::AlignVCenter | Qt::AlignLeft); mMotionTable->setHorizontalHeaderItem(3, msubHeaderItem); // add the type column QTableWidgetItem* typeHeaderItem = new QTableWidgetItem("Type"); typeHeaderItem->setTextAlignment(Qt::AlignVCenter | Qt::AlignLeft); mMotionTable->setHorizontalHeaderItem(4, typeHeaderItem); // set the sorting order on the first column mMotionTable->horizontalHeader()->setSortIndicator(0, Qt::AscendingOrder); // hide the vertical columns QHeaderView* verticalHeader = mMotionTable->verticalHeader(); verticalHeader->setVisible(false); // set the last column to take the whole available space mMotionTable->horizontalHeader()->setStretchLastSection(true); // set the column width mMotionTable->setColumnWidth(0, 300); mMotionTable->setColumnWidth(1, 55); mMotionTable->setColumnWidth(2, 45); mMotionTable->setColumnWidth(3, 50); mMotionTable->setColumnWidth(4, 100); mVLayout->addWidget(mMotionTable); setLayout(mVLayout); ReInit(); } // called when the filter string changed void MotionListWindow::OnTextFilterChanged(const QString& text) { m_searchWidgetText = text.toLower().toUtf8().data(); ReInit(); } bool MotionListWindow::AddMotionByID(uint32 motionID) { // find the motion entry based on the id MotionWindowPlugin::MotionTableEntry* motionEntry = mMotionWindowPlugin->FindMotionEntryByID(motionID); if (motionEntry == nullptr) { return false; } // if the motion is not visible at all skip it completely if (CheckIfIsMotionVisible(motionEntry) == false) { return true; } // get the motion EMotionFX::Motion* motion = motionEntry->mMotion; // disable the sorting mMotionTable->setSortingEnabled(false); // insert the new row const uint32 rowIndex = 0; mMotionTable->insertRow(rowIndex); mMotionTable->setRowHeight(rowIndex, 21); // create the name item QTableWidgetItem* nameTableItem = new QTableWidgetItem(motion->GetName()); // store the motion ID on this item nameTableItem->setData(Qt::UserRole, motion->GetID()); // set the tooltip to the filename nameTableItem->setToolTip(motion->GetFileName()); // set the item in the motion table mMotionTable->setItem(rowIndex, 0, nameTableItem); // create the length item AZStd::string length; length = AZStd::string::format("%.2f sec", motion->GetMaxTime()); QTableWidgetItem* lengthTableItem = new QTableWidgetItem(length.c_str()); // set the item in the motion table mMotionTable->setItem(rowIndex, 1, lengthTableItem); // set the sub and msub text AZStd::string sub, msub; if ((motion->GetType() != EMotionFX::SkeletalMotion::TYPE_ID) && (motion->GetType() != EMotionFX::WaveletSkeletalMotion::TYPE_ID)) { sub = ""; msub = ""; } else { EMotionFX::SkeletalMotion* skeletalMotion = static_cast<EMotionFX::SkeletalMotion*>(motion); sub = AZStd::string::format("%d", skeletalMotion->GetNumSubMotions()); msub = AZStd::string::format("%d", skeletalMotion->GetNumMorphSubMotions()); } // create the sub and msub item QTableWidgetItem* subTableItem = new QTableWidgetItem(sub.c_str()); QTableWidgetItem* msubTableItem = new QTableWidgetItem(msub.c_str()); // set the items in the motion table mMotionTable->setItem(rowIndex, 2, subTableItem); mMotionTable->setItem(rowIndex, 3, msubTableItem); // create and set the type item QTableWidgetItem* typeTableItem = new QTableWidgetItem(motion->GetTypeString()); mMotionTable->setItem(rowIndex, 4, typeTableItem); // set the items italic if the motion is dirty if (motion->GetDirtyFlag()) { // create the font italic, all columns use the same font QFont font = subTableItem->font(); font.setItalic(true); // set the font for each item nameTableItem->setFont(font); lengthTableItem->setFont(font); subTableItem->setFont(font); msubTableItem->setFont(font); typeTableItem->setFont(font); } // enable the sorting mMotionTable->setSortingEnabled(true); // update the interface UpdateInterface(); // return true because the row is correctly added return true; } uint32 MotionListWindow::FindRowByMotionID(uint32 motionID) { // iterate through the rows and compare the motion IDs const uint32 rowCount = mMotionTable->rowCount(); for (uint32 i = 0; i < rowCount; ++i) { if (GetMotionID(i) == motionID) { return i; } } // failure, motion id not found in any of the rows return MCORE_INVALIDINDEX32; } bool MotionListWindow::RemoveMotionByID(uint32 motionID) { // find the row for the motion const uint32 rowIndex = FindRowByMotionID(motionID); if (rowIndex == MCORE_INVALIDINDEX32) { return false; } // remove the row mMotionTable->removeRow(rowIndex); // update the interface UpdateInterface(); // return true because the row is correctly removed return true; } bool MotionListWindow::CheckIfIsMotionVisible(MotionWindowPlugin::MotionTableEntry* entry) { if (entry->mMotion->GetIsOwnedByRuntime()) { return false; } AZStd::string motionNameLowered = entry->mMotion->GetNameString(); AZStd::to_lower(motionNameLowered.begin(), motionNameLowered.end()); if (m_searchWidgetText.empty() || motionNameLowered.find(m_searchWidgetText) != AZStd::string::npos) { return true; } return false; } void MotionListWindow::ReInit() { const CommandSystem::SelectionList selection = GetCommandManager()->GetCurrentSelection(); size_t numMotions = mMotionWindowPlugin->GetNumMotionEntries(); mShownMotionEntries.clear(); mShownMotionEntries.reserve(numMotions); for (size_t i = 0; i < numMotions; ++i) { MotionWindowPlugin::MotionTableEntry* entry = mMotionWindowPlugin->GetMotionEntry(i); if (CheckIfIsMotionVisible(entry)) { mShownMotionEntries.push_back(entry); } } numMotions = mShownMotionEntries.size(); // set the number of rows mMotionTable->setRowCount(static_cast<int>(numMotions)); // set the sorting disabled mMotionTable->setSortingEnabled(false); // iterate through the motions and fill in the table for (int i = 0; i < numMotions; ++i) { EMotionFX::Motion* motion = mShownMotionEntries[static_cast<size_t>(i)]->mMotion; // set the row height mMotionTable->setRowHeight(i, 21); // create the name item QTableWidgetItem* nameTableItem = new QTableWidgetItem(motion->GetName()); // store the motion ID on this item nameTableItem->setData(Qt::UserRole, motion->GetID()); // set tooltip to filename nameTableItem->setToolTip(motion->GetFileName()); // set the item in the motion table mMotionTable->setItem(i, 0, nameTableItem); // create the length item AZStd::string length; length = AZStd::string::format("%.2f sec", motion->GetMaxTime()); QTableWidgetItem* lengthTableItem = new QTableWidgetItem(length.c_str()); // set the item in the motion table mMotionTable->setItem(i, 1, lengthTableItem); // set the sub and msub text AZStd::string sub, msub; if ((motion->GetType() != EMotionFX::SkeletalMotion::TYPE_ID) && (motion->GetType() != EMotionFX::WaveletSkeletalMotion::TYPE_ID)) { sub = ""; msub = ""; } else { EMotionFX::SkeletalMotion* skeletalMotion = static_cast<EMotionFX::SkeletalMotion*>(motion); sub = AZStd::string::format("%d", skeletalMotion->GetNumSubMotions()); msub = AZStd::string::format("%d", skeletalMotion->GetNumMorphSubMotions()); } // create the sub and msub item QTableWidgetItem* subTableItem = new QTableWidgetItem(sub.c_str()); QTableWidgetItem* msubTableItem = new QTableWidgetItem(msub.c_str()); // set the items in the motion table mMotionTable->setItem(i, 2, subTableItem); mMotionTable->setItem(i, 3, msubTableItem); // create and set the type item QTableWidgetItem* typeTableItem = new QTableWidgetItem(motion->GetTypeString()); mMotionTable->setItem(i, 4, typeTableItem); // set the items italic if the motion is dirty if (motion->GetDirtyFlag()) { // create the font italic, all columns use the same font QFont font = subTableItem->font(); font.setItalic(true); // set the font for each item nameTableItem->setFont(font); lengthTableItem->setFont(font); subTableItem->setFont(font); msubTableItem->setFont(font); typeTableItem->setFont(font); } } // set the sorting enabled mMotionTable->setSortingEnabled(true); // set the old selection as before the reinit UpdateSelection(selection); } // update the selection void MotionListWindow::UpdateSelection(const CommandSystem::SelectionList& selectionList) { // block signals to not have the motion table events when selection changed mMotionTable->blockSignals(true); // clear the selection mMotionTable->clearSelection(); // iterate through the selected motions and select the corresponding rows in the table widget const uint32 numSelectedMotions = selectionList.GetNumSelectedMotions(); for (uint32 i = 0; i < numSelectedMotions; ++i) { // get the index of the motion inside the motion manager (which is equal to the row in the motion table) and select the row at the motion index EMotionFX::Motion* selectedMotion = selectionList.GetMotion(i); const uint32 row = FindRowByMotionID(selectedMotion->GetID()); if (row != MCORE_INVALIDINDEX32) { // select the entire row const int columnCount = mMotionTable->columnCount(); for (int c = 0; c < columnCount; ++c) { QTableWidgetItem* tableWidgetItem = mMotionTable->item(row, c); mMotionTable->setItemSelected(tableWidgetItem, true); } } } // enable the signals now all rows are selected mMotionTable->blockSignals(false); // call the selection changed itemSelectionChanged(); } void MotionListWindow::UpdateInterface() { } uint32 MotionListWindow::GetMotionID(uint32 rowIndex) { QTableWidgetItem* tableItem = mMotionTable->item(rowIndex, 0); if (tableItem) { return tableItem->data(Qt::UserRole).toInt(); } return MCORE_INVALIDINDEX32; } void MotionListWindow::cellDoubleClicked(int row, int column) { MCORE_UNUSED(column); const uint32 motionID = GetMotionID(row); EMotionFX::Motion* motion = EMotionFX::GetMotionManager().FindMotionByID(motionID); if (motion) { mMotionWindowPlugin->PlayMotion(motion); } } void MotionListWindow::itemSelectionChanged() { // get the current selection const QList<QTableWidgetItem*> selectedItems = mMotionTable->selectedItems(); // get the number of selected items const uint32 numSelectedItems = selectedItems.count(); // filter the items AZStd::vector<uint32> rowIndices; rowIndices.reserve(numSelectedItems); for (size_t i = 0; i < numSelectedItems; ++i) { const uint32 rowIndex = selectedItems[static_cast<uint32>(i)]->row(); if (AZStd::find(rowIndices.begin(), rowIndices.end(), rowIndex) == rowIndices.end()) { rowIndices.push_back(rowIndex); } } // clear the selected motion IDs mSelectedMotionIDs.clear(); // get the number of selected items and iterate through them const size_t numSelectedRows = rowIndices.size(); mSelectedMotionIDs.reserve(numSelectedRows); for (size_t i = 0; i < numSelectedRows; ++i) { mSelectedMotionIDs.push_back(GetMotionID(rowIndices[i])); } // unselect all motions GetCommandManager()->GetCurrentSelection().ClearMotionSelection(); // get the number of selected motions and iterate through them const size_t numSelectedMotions = mSelectedMotionIDs.size(); for (size_t i = 0; i < numSelectedMotions; ++i) { // find the motion by name in the motion library and select it EMotionFX::Motion* motion = EMotionFX::GetMotionManager().FindMotionByID(mSelectedMotionIDs[i]); if (motion) { GetCommandManager()->GetCurrentSelection().AddMotion(motion); } } // update the interface mMotionWindowPlugin->UpdateInterface(); // emit signal that tells other windows that the motion selection changed emit MotionSelectionChanged(); } // add the selected motions in the selected motion sets void MotionListWindow::OnAddMotionsInSelectedMotionSets() { // get the current selection const CommandSystem::SelectionList& selection = GetCommandManager()->GetCurrentSelection(); const uint32 numSelectedMotions = selection.GetNumSelectedMotions(); if (numSelectedMotions == 0) { return; } // get the motion sets window plugin EMStudioPlugin* motionWindowPlugin = EMStudio::GetPluginManager()->FindActivePlugin(MotionSetsWindowPlugin::CLASS_ID); if (motionWindowPlugin == nullptr) { return; } // Get the selected motion sets. AZStd::vector<EMotionFX::MotionSet*> selectedMotionSets; MotionSetsWindowPlugin* motionSetsWindowPlugin = static_cast<MotionSetsWindowPlugin*>(motionWindowPlugin); motionSetsWindowPlugin->GetManagementWindow()->GetSelectedMotionSets(selectedMotionSets); if (selectedMotionSets.empty()) { return; } // Set the command group name based on the number of motions to add. AZStd::string groupName; const size_t numSelectedMotionSets = selectedMotionSets.size(); if (numSelectedMotions > 1) { groupName = "Add motions in motion sets"; } else { groupName = "Add motion in motion sets"; } MCore::CommandGroup commandGroup(groupName); // add in each selected motion set AZStd::string motionName; for (uint32 m = 0; m < numSelectedMotionSets; ++m) { EMotionFX::MotionSet* motionSet = selectedMotionSets[m]; // Build a list of unique string id values from all motion set entries. AZStd::vector<AZStd::string> idStrings; motionSet->BuildIdStringList(idStrings); // add each selected motion in the motion set for (uint32 i = 0; i < numSelectedMotions; ++i) { // remove the media root folder from the absolute motion filename so that we get the relative one to the media root folder motionName = selection.GetMotion(i)->GetFileName(); EMotionFX::GetEMotionFX().GetFilenameRelativeToMediaRoot(&motionName); // construct and call the command for actually adding it CommandSystem::AddMotionSetEntry(motionSet->GetID(), "", idStrings, motionName.c_str(), &commandGroup); } } AZStd::string result; if (!EMStudio::GetCommandManager()->ExecuteCommandGroup(commandGroup, result)) { AZ_Error("EMotionFX", false, result.c_str()); } } void MotionListWindow::OnOpenInFileBrowser() { const CommandSystem::SelectionList& selection = GetCommandManager()->GetCurrentSelection(); // iterate through the selected motions and show them for (uint32 i = 0; i < selection.GetNumSelectedMotions(); ++i) { EMotionFX::Motion* motion = selection.GetMotion(i); AzQtComponents::ShowFileOnDesktop(motion->GetFileName()); } } void MotionListWindow::keyPressEvent(QKeyEvent* event) { // delete key if (event->key() == Qt::Key_Delete) { emit RemoveMotionsRequested(); event->accept(); return; } // base class QWidget::keyPressEvent(event); } void MotionListWindow::keyReleaseEvent(QKeyEvent* event) { // delete key if (event->key() == Qt::Key_Delete) { event->accept(); return; } // base class QWidget::keyReleaseEvent(event); } void MotionListWindow::contextMenuEvent(QContextMenuEvent* event) { // get the current selection const CommandSystem::SelectionList& selection = GetCommandManager()->GetCurrentSelection(); // create the context menu QMenu menu(this); // add the motion related menus if (selection.GetNumSelectedMotions() > 0) { // get the motion sets window plugin EMStudioPlugin* motionWindowPlugin = EMStudio::GetPluginManager()->FindActivePlugin(MotionSetsWindowPlugin::CLASS_ID); if (motionWindowPlugin) { // Get the selected motion sets. AZStd::vector<EMotionFX::MotionSet*> selectedMotionSets; MotionSetsWindowPlugin* motionSetsWindowPlugin = static_cast<MotionSetsWindowPlugin*>(motionWindowPlugin); motionSetsWindowPlugin->GetManagementWindow()->GetSelectedMotionSets(selectedMotionSets); // add the menu if at least one motion set is selected if (!selectedMotionSets.empty()) { // add the menu to add in motion sets QAction* addInSelectedMotionSetsAction = menu.addAction("Add To Selected Motion Sets"); connect(addInSelectedMotionSetsAction, &QAction::triggered, this, &MotionListWindow::OnAddMotionsInSelectedMotionSets); menu.addSeparator(); } } // add the remove menu QAction* removeAction = menu.addAction("Remove Selected Motions"); connect(removeAction, &QAction::triggered, this, &MotionListWindow::RemoveMotionsRequested); menu.addSeparator(); // add the save menu QAction* saveAction = menu.addAction("Save Selected Motions"); connect(saveAction, &QAction::triggered, this, &MotionListWindow::SaveRequested); menu.addSeparator(); // browse in explorer option QAction* browserAction = menu.addAction(AzQtComponents::fileBrowserActionName()); connect(browserAction, &QAction::triggered, this, &MotionListWindow::OnOpenInFileBrowser); } // show the menu at the given position if (menu.isEmpty() == false) { menu.exec(event->globalPos()); } } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // constructor MotionTableWidget::MotionTableWidget(MotionWindowPlugin* parentPlugin, QWidget* parent) : QTableWidget(parent) { mPlugin = parentPlugin; // enable dragging setDragEnabled(true); setDragDropMode(QAbstractItemView::DragOnly); } // destructor MotionTableWidget::~MotionTableWidget() { } // return the mime data QMimeData* MotionTableWidget::mimeData(const QList<QTableWidgetItem*> items) const { MCORE_UNUSED(items); // get the current selection list const CommandSystem::SelectionList& selectionList = GetCommandManager()->GetCurrentSelection(); // get the number of selected motions and return directly if there are no motions selected AZStd::string textData, command; const uint32 numMotions = selectionList.GetNumSelectedMotions(); for (uint32 i = 0; i < numMotions; ++i) { EMotionFX::Motion* motion = selectionList.GetMotion(i); // construct the drag&drop data string command = AZStd::string::format("-window \"MotionWindow\" -motionID %i\n", motion->GetID()); textData += command; } // create the data, set the text and return it QMimeData* mimeData = new QMimeData(); mimeData->setText(textData.c_str()); return mimeData; } // return the supported mime types QStringList MotionTableWidget::mimeTypes() const { QStringList result; result.append("text/plain"); return result; } // get the allowed drop actions Qt::DropActions MotionTableWidget::supportedDropActions() const { return Qt::CopyAction; } } // namespace EMStudio #include <EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionListWindow.moc>
{ "pile_set_name": "Github" }
/* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.example.android.apis.animation; // Need the following import to get access to the app resources, since this // class is in a sub-package. import android.animation.Animator; import android.animation.ObjectAnimator; import android.widget.LinearLayout; import com.example.android.apis.R; import android.animation.AnimatorListenerAdapter; import android.animation.Keyframe; import android.animation.LayoutTransition; import android.animation.PropertyValuesHolder; import android.view.View; import android.view.ViewGroup; import android.widget.CheckBox; import android.widget.CompoundButton; import android.app.Activity; import android.os.Bundle; import android.widget.Button; /** * This application demonstrates how to use LayoutTransition to automate transition animations * as items are hidden or shown in a container. */ public class LayoutAnimationsHideShow extends Activity { private int numButtons = 1; ViewGroup container = null; private LayoutTransition mTransitioner; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.layout_animations_hideshow); final CheckBox hideGoneCB = (CheckBox) findViewById(R.id.hideGoneCB); container = new LinearLayout(this); container.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); // Add a slew of buttons to the container. We won't add any more buttons at runtime, but // will just show/hide the buttons we've already created for (int i = 0; i < 4; ++i) { Button newButton = new Button(this); newButton.setText(String.valueOf(i)); container.addView(newButton); newButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { v.setVisibility(hideGoneCB.isChecked() ? View.GONE : View.INVISIBLE); } }); } resetTransition(); ViewGroup parent = (ViewGroup) findViewById(R.id.parent); parent.addView(container); Button addButton = (Button) findViewById(R.id.addNewButton); addButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { for (int i = 0; i < container.getChildCount(); ++i) { View view = (View) container.getChildAt(i); view.setVisibility(View.VISIBLE); } } }); CheckBox customAnimCB = (CheckBox) findViewById(R.id.customAnimCB); customAnimCB.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { long duration; if (isChecked) { mTransitioner.setStagger(LayoutTransition.CHANGE_APPEARING, 30); mTransitioner.setStagger(LayoutTransition.CHANGE_DISAPPEARING, 30); setupCustomAnimations(); duration = 500; } else { resetTransition(); duration = 300; } mTransitioner.setDuration(duration); } }); } private void resetTransition() { mTransitioner = new LayoutTransition(); container.setLayoutTransition(mTransitioner); } private void setupCustomAnimations() { // Changing while Adding PropertyValuesHolder pvhLeft = PropertyValuesHolder.ofInt("left", 0, 1); PropertyValuesHolder pvhTop = PropertyValuesHolder.ofInt("top", 0, 1); PropertyValuesHolder pvhRight = PropertyValuesHolder.ofInt("right", 0, 1); PropertyValuesHolder pvhBottom = PropertyValuesHolder.ofInt("bottom", 0, 1); PropertyValuesHolder pvhScaleX = PropertyValuesHolder.ofFloat("scaleX", 1f, 0f, 1f); PropertyValuesHolder pvhScaleY = PropertyValuesHolder.ofFloat("scaleY", 1f, 0f, 1f); final ObjectAnimator changeIn = ObjectAnimator.ofPropertyValuesHolder( this, pvhLeft, pvhTop, pvhRight, pvhBottom, pvhScaleX, pvhScaleY). setDuration(mTransitioner.getDuration(LayoutTransition.CHANGE_APPEARING)); mTransitioner.setAnimator(LayoutTransition.CHANGE_APPEARING, changeIn); changeIn.addListener(new AnimatorListenerAdapter() { public void onAnimationEnd(Animator anim) { View view = (View) ((ObjectAnimator) anim).getTarget(); view.setScaleX(1f); view.setScaleY(1f); } }); // Changing while Removing Keyframe kf0 = Keyframe.ofFloat(0f, 0f); Keyframe kf1 = Keyframe.ofFloat(.9999f, 360f); Keyframe kf2 = Keyframe.ofFloat(1f, 0f); PropertyValuesHolder pvhRotation = PropertyValuesHolder.ofKeyframe("rotation", kf0, kf1, kf2); final ObjectAnimator changeOut = ObjectAnimator.ofPropertyValuesHolder( this, pvhLeft, pvhTop, pvhRight, pvhBottom, pvhRotation). setDuration(mTransitioner.getDuration(LayoutTransition.CHANGE_DISAPPEARING)); mTransitioner.setAnimator(LayoutTransition.CHANGE_DISAPPEARING, changeOut); changeOut.addListener(new AnimatorListenerAdapter() { public void onAnimationEnd(Animator anim) { View view = (View) ((ObjectAnimator) anim).getTarget(); view.setRotation(0f); } }); // Adding ObjectAnimator animIn = ObjectAnimator.ofFloat(null, "rotationY", 90f, 0f). setDuration(mTransitioner.getDuration(LayoutTransition.APPEARING)); mTransitioner.setAnimator(LayoutTransition.APPEARING, animIn); animIn.addListener(new AnimatorListenerAdapter() { public void onAnimationEnd(Animator anim) { View view = (View) ((ObjectAnimator) anim).getTarget(); view.setRotationY(0f); } }); // Removing ObjectAnimator animOut = ObjectAnimator.ofFloat(null, "rotationX", 0f, 90f). setDuration(mTransitioner.getDuration(LayoutTransition.DISAPPEARING)); mTransitioner.setAnimator(LayoutTransition.DISAPPEARING, animOut); animOut.addListener(new AnimatorListenerAdapter() { public void onAnimationEnd(Animator anim) { View view = (View) ((ObjectAnimator) anim).getTarget(); view.setRotationX(0f); } }); } }
{ "pile_set_name": "Github" }
# 2017 January 9 # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: # # May you do good and not evil. # May you find forgiveness for yourself and forgive others. # May you share freely, never taking more than you give. # #*********************************************************************** # set testdir [file dirname $argv0] source $testdir/tester.tcl set testprefix update2 db func repeat [list string repeat] #------------------------------------------------------------------------- # 1.1.* A one-pass UPDATE that does balance() operations on the IPK index # that it is scanning. # # 1.2.* Same again, but with a WITHOUT ROWID table. # set nrow [expr 10] do_execsql_test 1.1.0 { CREATE TABLE t1(a INTEGER PRIMARY KEY, b); CREATE TABLE t2(a INTEGER PRIMARY KEY, b); WITH s(i) AS ( SELECT 0 UNION ALL SELECT i+1 FROM s WHERE i<$nrow ) INSERT INTO t1(b) SELECT char((i % 26) + 65) FROM s; INSERT INTO t2 SELECT * FROM t1; } do_execsql_test 1.1.1 { UPDATE t1 SET b = repeat(b, 100) } do_execsql_test 1.1.2 { SELECT * FROM t1; } [db eval { SELECT a, repeat(b, 100) FROM t2 }] do_execsql_test 1.2.0 { DROP TABLE t1; CREATE TABLE t1(a INT PRIMARY KEY, b) WITHOUT ROWID; WITH s(i) AS ( SELECT 0 UNION ALL SELECT i+1 FROM s WHERE i<$nrow ) INSERT INTO t1(a, b) SELECT i+1, char((i % 26) + 65) FROM s; } #explain_i { UPDATE t1 SET b = repeat(b, 100) } do_execsql_test 1.2.1 { UPDATE t1 SET b = repeat(b, 100) } do_execsql_test 1.2.2 { SELECT * FROM t1; } [db eval { SELECT a, repeat(b, 100) FROM t2 }] #------------------------------------------------------------------------- # A one-pass UPDATE that does balance() operations on the IPK index # that it is scanning. # do_execsql_test 2.1 { CREATE TABLE t3(a PRIMARY KEY, b, c); CREATE INDEX t3i ON t3(b); } {} do_execsql_test 2.2 { UPDATE t3 SET c=1 WHERE b=? } {} do_execsql_test 2.3 { UPDATE t3 SET c=1 WHERE rowid=? } {} #------------------------------------------------------------------------- # do_execsql_test 3.0 { CREATE TABLE t4(a PRIMARY KEY, b, c) WITHOUT ROWID; CREATE INDEX t4c ON t4(c); INSERT INTO t4 VALUES(1, 2, 3); INSERT INTO t4 VALUES(2, 3, 4); } do_execsql_test 3.1 { UPDATE t4 SET c=c+2 WHERE c>2; SELECT a, c FROM t4 ORDER BY a; } {1 5 2 6} #------------------------------------------------------------------------- # foreach {tn sql} { 1 { CREATE TABLE b1(a INTEGER PRIMARY KEY, b, c); CREATE TABLE c1(a INTEGER PRIMARY KEY, b, c, d) } 2 { CREATE TABLE b1(a INT PRIMARY KEY, b, c) WITHOUT ROWID; CREATE TABLE c1(a INT PRIMARY KEY, b, c, d) WITHOUT ROWID; } } { execsql { DROP TABLE IF EXISTS b1; DROP TABLE IF EXISTS c1; } execsql $sql do_execsql_test 4.$tn.0 { CREATE UNIQUE INDEX b1c ON b1(c); INSERT INTO b1 VALUES(1, 'a', 1); INSERT INTO b1 VALUES(2, 'b', 15); INSERT INTO b1 VALUES(3, 'c', 3); INSERT INTO b1 VALUES(4, 'd', 4); INSERT INTO b1 VALUES(5, 'e', 5); INSERT INTO b1 VALUES(6, 'f', 6); INSERT INTO b1 VALUES(7, 'g', 7); } do_execsql_test 4.$tn.1 { UPDATE OR REPLACE b1 SET c=c+10 WHERE a BETWEEN 4 AND 7; SELECT * FROM b1 ORDER BY a; } { 1 a 1 3 c 3 4 d 14 5 e 15 6 f 16 7 g 17 } do_execsql_test 4.$tn.2 { CREATE INDEX c1d ON c1(d, b); CREATE UNIQUE INDEX c1c ON c1(c, b); INSERT INTO c1 VALUES(1, 'a', 1, 1); INSERT INTO c1 VALUES(2, 'a', 15, 2); INSERT INTO c1 VALUES(3, 'a', 3, 3); INSERT INTO c1 VALUES(4, 'a', 4, 4); INSERT INTO c1 VALUES(5, 'a', 5, 5); INSERT INTO c1 VALUES(6, 'a', 6, 6); INSERT INTO c1 VALUES(7, 'a', 7, 7); } do_execsql_test 4.$tn.3 { UPDATE OR REPLACE c1 SET c=c+10 WHERE d BETWEEN 4 AND 7; SELECT * FROM c1 ORDER BY a; } { 1 a 1 1 3 a 3 3 4 a 14 4 5 a 15 5 6 a 16 6 7 a 17 7 } do_execsql_test 4.$tn.4 { PRAGMA integrity_check } ok do_execsql_test 4.$tn.5 { DROP INDEX c1d; DROP INDEX c1c; DELETE FROM c1; INSERT INTO c1 VALUES(1, 'a', 1, 1); INSERT INTO c1 VALUES(2, 'a', 15, 2); INSERT INTO c1 VALUES(3, 'a', 3, 3); INSERT INTO c1 VALUES(4, 'a', 4, 4); INSERT INTO c1 VALUES(5, 'a', 5, 5); INSERT INTO c1 VALUES(6, 'a', 6, 6); INSERT INTO c1 VALUES(7, 'a', 7, 7); CREATE INDEX c1d ON c1(d); CREATE UNIQUE INDEX c1c ON c1(c); } do_execsql_test 4.$tn.6 { UPDATE OR REPLACE c1 SET c=c+10 WHERE d BETWEEN 4 AND 7; SELECT * FROM c1 ORDER BY a; } { 1 a 1 1 3 a 3 3 4 a 14 4 5 a 15 5 6 a 16 6 7 a 17 7 } } #------------------------------------------------------------------------- # do_execsql_test 5.0 { CREATE TABLE x1(a INTEGER PRIMARY KEY, b, c); CREATE INDEX x1c ON x1(b, c); INSERT INTO x1 VALUES(1, 'a', 1); INSERT INTO x1 VALUES(2, 'a', 2); INSERT INTO x1 VALUES(3, 'a', 3); } do_execsql_test 5.1.1 { UPDATE x1 SET c=c+1 WHERE b='a'; } do_execsql_test 5.1.2 { SELECT * FROM x1; } {1 a 2 2 a 3 3 a 4} do_test 5.2 { catch { array unset A } db eval { EXPLAIN UPDATE x1 SET c=c+1 WHERE b='a' } { incr A($opcode) } set A(NotExists) } {1} #------------------------------------------------------------------------- do_execsql_test 6.0 { CREATE TABLE d1(a,b); CREATE INDEX d1b ON d1(a); CREATE INDEX d1c ON d1(b); INSERT INTO d1 VALUES(1,2); } do_execsql_test 6.1 { UPDATE d1 SET a = a+2 WHERE a>0 OR b>0; } do_execsql_test 6.2 { SELECT * FROM d1; } {3 2} # 2019-01-22 Bug in UPDATE OR REPLACE discovered by the # Matt Denton's LPM fuzzer # do_execsql_test 7.100 { DROP TABLE IF EXISTS t1; CREATE TABLE t1(x,y); CREATE UNIQUE INDEX t1x1 ON t1(x) WHERE x IS NOT NULL; INSERT INTO t1(x) VALUES(NULL),(NULL); CREATE INDEX t1x2 ON t1(y); SELECT quote(x), quote(y), '|' FROM t1; } {NULL NULL | NULL NULL |} do_execsql_test 7.110 { UPDATE OR REPLACE t1 SET x=1; SELECT quote(x), quote(y), '|' FROM t1; } {1 NULL |} finish_test
{ "pile_set_name": "Github" }
/* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by client-gen. DO NOT EDIT. // This package has the automatically generated typed clients. package v1alpha1
{ "pile_set_name": "Github" }
# Work around CentOS/RHEL umask override of file permissions # Note: This is a global rsyslog setting, you probably do not want to set # this outside of testing! $umask 0000 # provides UDP syslog reception module(load="imudp") input(type="imudp" port=["%ADMIN_PORT%", "%TENANT_PORT%"]) if ($inputname == "imudp" and $syslogfacility-text == "local0" and $syslogseverity-text == "info") then { action(type="omfile" FileCreateMode="0644" File="/var/log/octavia-tenant-traffic.log")&stop } if ($inputname == "imudp" and $syslogfacility-text != "local0") then { action(type="omfile" FileCreateMode="0644" File="/var/log/octavia-amphora.log")&stop }
{ "pile_set_name": "Github" }
<?php /* * This file is part of the Monolog package. * * (c) Jordi Boggiano <[email protected]> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Monolog\Formatter; use Monolog\Logger; use Gelf\Message; /** * Serializes a log message to GELF * @see http://www.graylog2.org/about/gelf * * @author Matt Lehner <[email protected]> */ class GelfMessageFormatter extends NormalizerFormatter { /** * @var string the name of the system for the Gelf log message */ protected $systemName; /** * @var string a prefix for 'extra' fields from the Monolog record (optional) */ protected $extraPrefix; /** * @var string a prefix for 'context' fields from the Monolog record (optional) */ protected $contextPrefix; /** * Translates Monolog log levels to Graylog2 log priorities. */ private $logLevels = array( Logger::DEBUG => 7, Logger::INFO => 6, Logger::NOTICE => 5, Logger::WARNING => 4, Logger::ERROR => 3, Logger::CRITICAL => 2, Logger::ALERT => 1, Logger::EMERGENCY => 0, ); public function __construct($systemName = null, $extraPrefix = null, $contextPrefix = 'ctxt_') { parent::__construct('U.u'); $this->systemName = $systemName ?: gethostname(); $this->extraPrefix = $extraPrefix; $this->contextPrefix = $contextPrefix; } /** * {@inheritdoc} */ public function format(array $record) { $record = parent::format($record); $message = new Message(); $message ->setTimestamp($record['datetime']) ->setShortMessage((string) $record['message']) ->setFacility($record['channel']) ->setHost($this->systemName) ->setLine(isset($record['extra']['line']) ? $record['extra']['line'] : null) ->setFile(isset($record['extra']['file']) ? $record['extra']['file'] : null) ->setLevel($this->logLevels[$record['level']]); // Do not duplicate these values in the additional fields unset($record['extra']['line']); unset($record['extra']['file']); foreach ($record['extra'] as $key => $val) { $message->setAdditional($this->extraPrefix . $key, is_scalar($val) ? $val : $this->toJson($val)); } foreach ($record['context'] as $key => $val) { $message->setAdditional($this->contextPrefix . $key, is_scalar($val) ? $val : $this->toJson($val)); } if (null === $message->getFile() && isset($record['context']['exception']['file'])) { if (preg_match("/^(.+):([0-9]+)$/", $record['context']['exception']['file'], $matches)) { $message->setFile($matches[1]); $message->setLine($matches[2]); } } return $message; } }
{ "pile_set_name": "Github" }
Ultrasphinx Ruby on Rails configurator and client to the Sphinx full text search engine. == DEPRECATED Please use {Thinking Sphinx}[http://freelancing-god.github.com/ts/en/] instead. == License Copyright 2007-2008 Cloudburst, LLC. Licensed under the AFL 3. See the included LICENSE file. Some portions copyright Pat Allan, distributed under the MIT license, and used with permission. Some portions copyright PJ Hyett and Mislav Marohnić, distributed under the MIT license, and used with permission. == Requirements * MySQL 5.0, or PostgreSQL 8.2 * Sphinx 0.9.8-rc2 * Rails 2.0.2 More recent versions than listed are usually ok. == Features Sphinx/Ultrasphinx is the fastest and most stable Rails fulltext search solution. Features include: * searching and ranking across multiple models * delta index support * excerpt highlighting * Google-style query parser * spellcheck * faceting on text, date, and numeric fields * field weighting, merging, and aliasing * geodistance * <tt>belongs_to</tt> and <tt>has_many</tt> includes * drop-in compatibility with will_paginate[http://err.lighthouseapp.com/projects/466/home] * drop-in compatibility with Interlock[http://blog.evanweaver.com/files/doc/fauna/interlock/] * multiple deployment environments * comprehensive Rake tasks And some other things. = Usage == Installation First, install Sphinx itself. Get the {0.9.8 snapshot}[http://www.sphinxsearch.com/downloads.html], then run <tt>./configure</tt>, <tt>make</tt>, and <tt>sudo make install</tt>. Make sure to set your <tt>./configure</tt> flags: <tt>----prefix</tt> if necessary, and also <tt>----with-pgsql</tt> if you need Postgres support. You also need the <tt>chronic</tt> gem: sudo gem install chronic Then, install the plugin: script/plugin install git://github.com/fauna/ultrasphinx.git Next, copy the <tt>examples/default.base</tt> file to <tt>RAILS_ROOT/config/ultrasphinx/default.base</tt>. This file sets up the Sphinx daemon options such as port, host, and index location. If you need per-environment configuration, you can use <tt>RAILS_ROOT/config/ultrasphinx/development.base</tt>, etc. Note that ERb is also allowed within the <tt>.base</tt> files, and can be an alternative way to DRY up multiple configurations. Now, in your models, use the <tt>is_indexed</tt> method to configure a model as searchable. For example: class Post is_indexed :fields => ['created_at', 'title', 'body'] end For more index options, see ActiveRecord::Base .is_indexed. == Building the index Now run: rake ultrasphinx:configure rake ultrasphinx:index rake ultrasphinx:daemon:start To rotate the index, just rerun <tt>rake ultrasphinx:index</tt>. If the search daemon is running, it will have its index rotated live. Otherwise the new index will be installed but the daemon will remain stopped. == Running queries Query the daemon as so: @search = Ultrasphinx::Search.new(:query => @query) @search.run @search.results For more query options, including excerpt mode, see Ultrasphinx::Search. = Extras == Pagination Once the <tt>@search</tt> object has been <tt>run</tt>, it is directly compatible with the <tt>will_paginate</tt> view helper. In your view, just do: <%= will_paginate(@search) %> == Spell checking See Ultrasphinx::Spell. == Delta indexing Delta indexing speeds up your updates by not reindexing the entire dataset every time. First, in your <tt>.base</tt> file, set the indexer option <tt>delta</tt> to your maximum interval between full reindexes. A day or a week is good, depending. Add a little bit to account for the time it takes the actual index to run: delta = <%= 1.day + 30.minutes %> Now, configure your models for delta indexing in the <tt>is_indexed</tt> call: is_indexed :fields => ['created_at', 'title', 'body'], :delta => true Now you can run <tt>rake ultrasphinx:index:delta</tt> frequently, and only records that were changed within 1 day will be reindexed. You will need to run <tt>rake ultrasphinx:index:main</tt> once a day to move the delta contents into the main index. See ActiveRecord::Base .is_indexed and DEPLOYMENT_NOTES[link:files/DEPLOYMENT_NOTES.html] for more. == Available Rake tasks See RAKE_TASKS[link:files/RAKE_TASKS.html]. == Deployment notes See DEPLOYMENT_NOTES[link:files/DEPLOYMENT_NOTES.html]. == Gotchas Note that since Ultrasphinx preloads indexed models, you need to make sure those models have their own dependencies in place early in the boot process. This may require adjusting the general plugin load order or moving monkey-patches from <tt>lib/</tt> to <tt>vendor/plugins/</tt>. PostgreSQL 8.2 and higher are well supported. However, make sure the stored procedure migration gets generated correctly. If you did not install the plugin via <tt>script/install</tt>, run <tt>script/generate ultrasphinx_migration</tt> by hand. == Reporting problems The support forum is here[http://github.com/fauna/ultrasphinx/issues]. Patches and contributions are very welcome. Please note that contributors are required to assign copyright for their additions to Cloudburst, LLC. == Further resources * http://sphinxsearch.com/doc.html * http://sphinxsearch.com/forum/forum.html?id=1 * http://blog.evanweaver.com/articles/2007/07/09/ultrasphinx-searching-the-world-in-231-seconds
{ "pile_set_name": "Github" }
/* * Copyright 2014 NAVER Corp. * * 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.navercorp.pinpoint.bootstrap.plugin.jdbc.interceptor; import com.navercorp.pinpoint.bootstrap.context.DatabaseInfo; import com.navercorp.pinpoint.bootstrap.context.MethodDescriptor; import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder; import com.navercorp.pinpoint.bootstrap.context.TraceContext; import com.navercorp.pinpoint.bootstrap.interceptor.SpanEventSimpleAroundInterceptorForPlugin; import com.navercorp.pinpoint.bootstrap.plugin.jdbc.DatabaseInfoAccessor; import com.navercorp.pinpoint.bootstrap.plugin.jdbc.UnKnownDatabaseInfo; import com.navercorp.pinpoint.common.util.ArrayUtils; /** * protected int executeUpdate(String sql, boolean isBatch, boolean returnGeneratedKeys) * * @author netspider * @author emeroad */ // #1375 Workaround java level Deadlock // https://oss.navercorp.com/pinpoint/pinpoint-naver/issues/1375 //@TargetMethods({ // @TargetMethod(name="executeUpdate", paramTypes={ "java.lang.String" }), // @TargetMethod(name="executeUpdate", paramTypes={ "java.lang.String", "int" }), // @TargetMethod(name="execute", paramTypes={ "java.lang.String" }), // @TargetMethod(name="execute", paramTypes={ "java.lang.String", "int" }) //}) public class StatementExecuteUpdateInterceptor extends SpanEventSimpleAroundInterceptorForPlugin { public StatementExecuteUpdateInterceptor(TraceContext traceContext, MethodDescriptor descriptor) { super(traceContext, descriptor); } @Override public void doInBeforeTrace(SpanEventRecorder recorder, Object target, Object[] args) { DatabaseInfo databaseInfo = (target instanceof DatabaseInfoAccessor) ? ((DatabaseInfoAccessor)target)._$PINPOINT$_getDatabaseInfo() : null; if (databaseInfo == null) { databaseInfo = UnKnownDatabaseInfo.INSTANCE; } recorder.recordServiceType(databaseInfo.getExecuteQueryType()); recorder.recordEndPoint(databaseInfo.getMultipleHost()); recorder.recordDestinationId(databaseInfo.getDatabaseId()); recorder.recordApi(methodDescriptor); if (ArrayUtils.hasLength(args)) { Object arg = args[0]; if (arg instanceof String) { recorder.recordSqlInfo((String) arg); } } } @Override public void doInAfterTrace(SpanEventRecorder recorder, Object target, Object[] args, Object result, Throwable throwable) { recorder.recordException(throwable); } }
{ "pile_set_name": "Github" }
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ var gTestfile = 'regress-476869.js'; //----------------------------------------------------------------------------- var BUGNUMBER = 476869; var summary = 'Do not assert: v != JSVAL_ERROR_COOKIE'; var actual = ''; var expect = ''; //----------------------------------------------------------------------------- test(); //----------------------------------------------------------------------------- function test() { enterFunc ('test'); printBugNumber(BUGNUMBER); printStatus (summary); if (typeof gczeal == 'undefined') { gczeal = (function (){}); } jit(true); function f() { (new Function("gczeal(1); for each (let y in [/x/,'',new Boolean(false),new Boolean(false),new Boolean(false),'',/x/,new Boolean(false),new Boolean(false)]){}"))(); } __proto__.__iterator__ = this.__defineGetter__("", function(){}) f(); jit(false); delete __proto__.__iterator__; reportCompare(expect, actual, summary); exitFunc ('test'); }
{ "pile_set_name": "Github" }
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Amazon SageMaker Debugger - Using built-in rule\n", "[Amazon SageMaker](https://aws.amazon.com/sagemaker/) is managed platform to build, train and host maching learning models. Amazon SageMaker Debugger is a new feature which offers the capability to debug machine learning models during training by identifying and detecting problems with the models in near real-time. \n", "\n", "In this notebook you'll be looking at how to use a SageMaker provided built in rule during a TensorFlow training job.\n", "\n", "## How does Amazon SageMaker Debugger work?\n", "\n", "Amazon SageMaker Debugger lets you go beyond just looking at scalars like losses and accuracies during training and gives you full visibility into all tensors 'flowing through the graph' during training. Furthermore, it helps you monitor your training in near real-time using rules and provides you alerts, once it has detected inconsistency in training flow.\n", "\n", "### Concepts\n", "* **Tensors**: These represent the state of the training network at intermediate points during its execution\n", "* **Debug Hook**: Hook is the construct with which Amazon SageMaker Debugger looks into the training process and captures the tensors requested at the desired step intervals\n", "* **Rule**: A logical construct, implemented as Python code, which helps analyze the tensors captured by the hook and report anomalies, if at all\n", "\n", "With these concepts in mind, let's understand the overall flow of things that Amazon SageMaker Debugger uses to orchestrate debugging\n", "\n", "### Saving tensors during training\n", "\n", "The tensors captured by the debug hook are stored in the S3 location specified by you. There are two ways you can configure Amazon SageMaker Debugger to save tensors:\n", "\n", "#### With no changes to your training script\n", "If you use one of Amazon SageMaker provided [Deep Learning Containers](https://docs.aws.amazon.com/sagemaker/latest/dg/pre-built-containers-frameworks-deep-learning.html) for 1.15, then you don't need to make any changes to your training script for the tensors to be stored. Amazon SageMaker Debugger will use the configuration you provide through Amazon SageMaker SDK's Tensorflow `Estimator` when creating your job to save the tensors in the fashion you specify. You can review the script we are going to use at [src/mnist_zerocodechange.py](src/mnist_zerocodechange.py). You will note that this is an untouched TensorFlow script which uses the `tf.estimator` interface. Please note that Amazon SageMaker Debugger only supports `tf.keras`, `tf.Estimator` and `tf.MonitoredSession` interfaces. Full description of support is available at [Amazon SageMaker Debugger with TensorFlow ](https://github.com/awslabs/sagemaker-debugger/tree/master/docs/tensorflow.md)\n", "\n", "#### Orchestrating your script to store tensors\n", "For other containers, you need to make couple of lines of changes to your training script. The Amazon SageMaker Debugger exposes a library `smdebug` which allows you to capture these tensors and save them for analysis. It's highly customizable and allows to save the specific tensors you want at different frequencies and possibly with other configurations. Refer [DeveloperGuide](https://github.com/awslabs/sagemaker-debugger/tree/master/docs) for details on how to use the Debugger library with your choice of framework in your training script. Here we have an example script orchestrated at [src/mnist_byoc](src/mnist_byoc.py). You also need to ensure that your container has the `smdebug` library installed.\n", "\n", "### Analysis of tensors\n", "\n", "Once the tensors are saved, Amazon SageMaker Debugger can be configured to run debugging ***Rules*** on them. At a very broad level, a rule is python code used to detect certain conditions during training. Some of the conditions that a data scientist training an algorithm may care about are monitoring for gradients getting too large or too small, detecting overfitting, and so on. Amazon Sagemaker Debugger will come pre-packaged with certain first-party (1P) rules. Users can write their own rules using Amazon Sagemaker Debugger APIs. You can also analyze raw tensor data outside of the Rules construct in say, a Sagemaker notebook, using Amazon Sagemaker Debugger's full set of APIs. This notebook will show you how to use a built in SageMaker Rule with your training job as well as provide a sneak peak into these APIs for interactive exploration. Please refer [Analysis Developer Guide](https://github.com/awslabs/sagemaker-debugger/blob/master/docs/api.md) for more on these APIs.\n", "\n", "## Setup\n", "\n", "Follow this one time setup to get your notebook up and running to use Amazon SageMaker Debugger. This is only needed because we plan to perform interactive analysis using this library in the notebook. " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "! pip install smdebug" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "With the setup out of the way let's start training our TensorFlow model in SageMaker with the debugger enabled.\n", "\n", "## Training TensorFlow models in SageMaker with Amazon SageMaker Debugger\n", "\n", "### SageMaker TensorFlow as a framework\n", "\n", "We'll train a TensorFlow model in this notebook with Amazon Sagemaker Debugger enabled and monitor the training jobs with Amazon Sagemaker Debugger Rules. This will be done using Amazon SageMaker [TensorFlow 1.15.0](https://docs.aws.amazon.com/sagemaker/latest/dg/pre-built-containers-frameworks-deep-learning.html) Container as a framework.\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import boto3\n", "import os\n", "import sagemaker\n", "from sagemaker.tensorflow import TensorFlow" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's import the libraries needed for our demo of Amazon SageMaker Debugger." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from sagemaker.debugger import Rule, DebuggerHookConfig, TensorBoardOutputConfig, CollectionConfig, rule_configs" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now we'll define the configuration for our training to run. We'll using image recognition using MNIST dataset as our training example." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# define the entrypoint script\n", "entrypoint_script='src/mnist_zerocodechange.py'\n", "\n", "hyperparameters = {\n", " \"num_epochs\": 3\n", "}" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Setting up the Estimator\n", "\n", "Now it's time to setup our TensorFlow estimator. We've added new parameters to the estimator to enable your training job for debugging through Amazon SageMaker Debugger. These new parameters are explained below.\n", "\n", "* **debugger_hook_config**: This new parameter accepts a local path where you wish your tensors to be written to and also accepts the S3 URI where you wish your tensors to be uploaded to. SageMaker will take care of uploading these tensors transparently during execution.\n", "* **rules**: This new parameter will accept a list of rules you wish to evaluate against the tensors output by this training job. For rules, Amazon SageMaker Debugger supports two types:\n", " * **SageMaker Rules**: These are rules specially curated by the data science and engineering teams in Amazon SageMaker which you can opt to evaluate against your training job.\n", " * **Custom Rules**: You can optionally choose to write your own rule as a Python source file and have it evaluated against your training job. To provide Amazon SageMaker Debugger to evaluate this rule, you would have to provide the S3 location of the rule source and the evaluator image.\n", " \n", "#### Using Amazon SageMaker Rules\n", " \n", "In this example we'll demonstrate how to use SageMaker rules to be evaluated against your training. You can find the list of SageMaker rules and the configurations best suited for using them [here](https://github.com/awslabs/sagemaker-debugger-rulesconfig).\n", "\n", "The rules we'll use are **VanishingGradient** and **LossNotDecreasing**. As the names suggest, the rules will attempt to evaluate if there are vanishing gradients in the tensors captured by the debugging hook during training and also if the loss is not decreasing." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "rules = [\n", " Rule.sagemaker(rule_configs.vanishing_gradient()), \n", " Rule.sagemaker(rule_configs.loss_not_decreasing())\n", "]\n", "\n", "estimator = TensorFlow(\n", " role=sagemaker.get_execution_role(),\n", " base_job_name='smdebugger-demo-mnist-tensorflow',\n", " train_instance_count=1,\n", " train_instance_type='ml.m4.xlarge',\n", " train_volume_size=400,\n", " entry_point=entrypoint_script,\n", " framework_version='1.15',\n", " py_version='py3',\n", " train_max_run=3600,\n", " script_mode=True,\n", " hyperparameters=hyperparameters,\n", " ## New parameter\n", " rules = rules\n", ")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "*Note that Amazon Sagemaker Debugger is only supported for py_version='py3' currently.*\n", "\n", "Let's start the training by calling `fit()` on the TensorFlow estimator." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "estimator.fit(wait=True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Result \n", "\n", "As a result of calling the `fit()` Amazon SageMaker Debugger kicked off two rule evaluation jobs to monitor vanishing gradient and loss decrease, in parallel with the training job. The rule evaluation status(es) will be visible in the training logs at regular intervals. As you can see, in the summary, there was no step in the training which reported vanishing gradients in the tensors. Although, the loss was not found to be decreasing at step 1900." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[{'RuleConfigurationName': 'VanishingGradient',\n", " 'RuleEvaluationJobArn': 'arn:aws:sagemaker:us-west-2:072677473360:processing-job/smdebugger-demo-mnist-tens-vanishinggradient-1db16b4d',\n", " 'RuleEvaluationStatus': 'NoIssuesFound',\n", " 'LastModifiedTime': datetime.datetime(2019, 12, 1, 23, 47, 32, 186000, tzinfo=tzlocal())},\n", " {'RuleConfigurationName': 'LossNotDecreasing',\n", " 'RuleEvaluationJobArn': 'arn:aws:sagemaker:us-west-2:072677473360:processing-job/smdebugger-demo-mnist-tens-lossnotdecreasing-d6176866',\n", " 'RuleEvaluationStatus': 'NoIssuesFound',\n", " 'LastModifiedTime': datetime.datetime(2019, 12, 1, 23, 47, 32, 186000, tzinfo=tzlocal())}]" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "estimator.latest_training_job.rule_job_summary()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's try and look at the logs of the rule job for loss not decreasing. To do that, we'll use this utlity function to get a link to the rule job logs." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'VanishingGradient': 'https://us-west-2.console.aws.amazon.com/cloudwatch/home?region=us-west-2#logStream:group=/aws/sagemaker/ProcessingJobs;prefix=smdebugger-demo-mnist-tens-VanishingGradient-1db16b4d;streamFilter=typeLogStreamPrefix',\n", " 'LossNotDecreasing': 'https://us-west-2.console.aws.amazon.com/cloudwatch/home?region=us-west-2#logStream:group=/aws/sagemaker/ProcessingJobs;prefix=smdebugger-demo-mnist-tens-LossNotDecreasing-d6176866;streamFilter=typeLogStreamPrefix'}" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "def _get_rule_job_name(training_job_name, rule_configuration_name, rule_job_arn):\n", " \"\"\"Helper function to get the rule job name with correct casing\"\"\"\n", " return \"{}-{}-{}\".format(\n", " training_job_name[:26], rule_configuration_name[:26], rule_job_arn[-8:]\n", " )\n", " \n", "def _get_cw_url_for_rule_job(rule_job_name, region):\n", " return \"https://{}.console.aws.amazon.com/cloudwatch/home?region={}#logStream:group=/aws/sagemaker/ProcessingJobs;prefix={};streamFilter=typeLogStreamPrefix\".format(region, region, rule_job_name)\n", "\n", "\n", "def get_rule_jobs_cw_urls(estimator):\n", " region = boto3.Session().region_name\n", " training_job = estimator.latest_training_job\n", " training_job_name = training_job.describe()[\"TrainingJobName\"]\n", " rule_eval_statuses = training_job.describe()[\"DebugRuleEvaluationStatuses\"]\n", " \n", " result={}\n", " for status in rule_eval_statuses:\n", " if status.get(\"RuleEvaluationJobArn\", None) is not None:\n", " rule_job_name = _get_rule_job_name(training_job_name, status[\"RuleConfigurationName\"], status[\"RuleEvaluationJobArn\"])\n", " result[status[\"RuleConfigurationName\"]] = _get_cw_url_for_rule_job(rule_job_name, region)\n", " return result\n", "\n", "get_rule_jobs_cw_urls(estimator)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Data Analysis - Interactive Exploration\n", "Now that we have trained a job, and looked at automated analysis through rules, let us also look at another aspect of Amazon SageMaker Debugger. It allows us to perform interactive exploration of the tensors saved in real time or after the job. Here we focus on after-the-fact analysis of the above job. We import the `smdebug` library, which defines a concept of Trial that represents a single training run. Note how we fetch the path to debugger artifacts for the above job." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[2019-12-01 23:47:58.201 ip-172-16-62-176:30695 INFO s3_trial.py:42] Loading trial debug-output at path s3://sagemaker-us-west-2-072677473360/smdebugger-demo-mnist-tensorflow-2019-12-01-23-41-02-486/debug-output\n" ] } ], "source": [ "from smdebug.trials import create_trial\n", "trial = create_trial(estimator.latest_job_debugger_artifacts_path())" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can list all the tensors that were recorded to know what we want to plot. Each one of these names is the name of a tensor, which is auto-assigned by TensorFlow. In some frameworks where such names are not available, we try to create a name based on the layer's name and whether it is weight, bias, gradient, input or output." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[2019-12-01 23:49:10.433 ip-172-16-62-176:30695 INFO trial.py:197] Training has ended, will refresh one final time in 1 sec.\n", "[2019-12-01 23:49:11.471 ip-172-16-62-176:30695 INFO trial.py:209] Loaded all steps\n" ] }, { "data": { "text/plain": [ "['gradients/conv2d/BiasAdd_grad/tuple/control_dependency_1:0',\n", " 'gradients/conv2d/Conv2D_grad/tuple/control_dependency_1:0',\n", " 'gradients/conv2d_1/BiasAdd_grad/tuple/control_dependency_1:0',\n", " 'gradients/conv2d_1/Conv2D_grad/tuple/control_dependency_1:0',\n", " 'gradients/dense/BiasAdd_grad/tuple/control_dependency_1:0',\n", " 'gradients/dense/MatMul_grad/tuple/control_dependency_1:0',\n", " 'gradients/dense_1/BiasAdd_grad/tuple/control_dependency_1:0',\n", " 'gradients/dense_1/MatMul_grad/tuple/control_dependency_1:0',\n", " 'sparse_softmax_cross_entropy_loss/value:0']" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "trial.tensor_names()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can also retrieve tensors by some default collections that `smdebug` creates from your training job. Here we are interested in the losses collection, so we can retrieve the names of tensors in losses collection as follows. Amazon SageMaker Debugger creates default collections such as weights, gradients, biases, losses automatically. You can also create custom collections from your tensors." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['sparse_softmax_cross_entropy_loss/value:0']" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "trial.tensor_names(collection=\"losses\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "image/png": "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dOzY0bBarVf9+fryyy+N3r17V+935MiRxgcffHDV43khS10eL6vVakRHRxsFBQVGcXGxERQUZGRlZRmGYRhr1qwxunXrZhiGcc3fh8TERMMwDOObb74x4uLiqh9nz549RsuWLQ3DMIy0tDSjV69eRn5+vmEYhnHo0CGjWbNmRmlpqWEYhhEXF2ccP37cMAzDiImJqf49MAzDeOutt4zx48dfckwu93rzY7wxBQAAcAjvP9TD7AiKi4vT999/ryeeeEI333yzhg0bJkmKiorS7bffLkkaO3asHnvsMR07dkzBwcH6xS9+ofXr18swDGVnZysmJkbjxo2TJPXp00ft27eXJPn5+alt27Z64IEHdMcdd2j48OEKDw/XmjVrdPjwYQ0dOvSiLAcOHFCLFi0um/P222/XM888o9GjR+uOO+5QfHy8zp07p507d1afxWjbtq369eundevWqWXLljV6/omJifLw8JAkdenSRYMHD5arq6tcXV3VqVMnHTp0SJ07d9auXbv0xz/+Ubm5uXJxcdGBAwdUUlIiT09P9e/fXw8//LD69OmjDz74QO3atbvqYy5fvlxbtmypfn+kkJCQ6vuGDRum0NDQ6uPh5OSkwYMHS5L69eun0NBQJScnq1evXnrttdf03HPPacCAARoyZIgk6dZbb9Uf/vAHHTp0SLfddpv69et3xRwbN2684vchOjpaHh4eGjVqlCSpd+/eSktLu+rzGjNmjHx9fSVJW7ZsUZcuXdSlSxdJ0v33368nn3xSx48fl3Tln69BgwZpypQp2rVrlwIDA7V161Z9/PHHV33cH+euq+O1bds2dejQofr53HPPPfrwww/185//XLNnz64+Q2a1Wq/6+1ATn3/+uVJTUzVgwIDqzzk5Oeno0aNq27Zt9dm/usSUQgAAgHoSHR2tffv2aciQIdqwYYNiYmJ09uzZS7azWCyyWCxKSkpSdna2tmzZot27d+u+++676FoeHx+f6r87Oztr8+bNmjJlirKzs9WrVy+tW7dOhmGoc+fOSk5Orr4dPXpUt9122xVzJiUladasWfLy8tJDDz2kv/zlL5fdrrbvc3ahbF3I+78fV1ZWqry8XKNGjdL06dO1d+9effvtt5KksrKy6m137dqlkJAQHTt2rFaP/79+fPwu58Lz6927t5KTk3XTTTdp8eLF6tGjh6qqqjRlyhStWLFCzZs314svvqgnnnjiivu61vfB3d29+vGcnZ2veU3etbJf63ldeKzJkyfrzTff1DvvvKOJEyfK3d39hvYr1f54ffrppxcteDFx4kTNmjVLhYWFWr58ue677z5JuubvwwUuLi4XHb8fb2MYhgYNGnTR9+H48eNq27btJfuJjIysnpYrnZ/6GRkZWevjQuECAACoJ5mZmbJYLBo5cqSmT58uwzB07NgxpaenV19HsmjRIoWGhio8PFxnz55Vs2bN5OHhoZMnT1712qtz587p1KlT6t+/v37729+qX79+2rVrl/r06aMjR45o9erV1dsmJydfdTW4/fv3V18j87Of/UybN2+Wr6+vunXrplmzZkk6fz3X+vXrLzpT8GO+vr7Kz8+v9TEqLS1VeXl59T9s33zzzYvunzlzps6ePauUlBS9++671WfcruTCsb5wrc/p06cvu1379u1ltVr11VdfSTp/RurkyZOKj4/XkSNH5OPjo7Fjx+rNN9/UwYMHVVhYqAMHDqhVq1Z69NFH9eKLL1ZfW3Y51/N9uOBax7JXr17as2eP9u7dK0maP3++WrRoUX0G80o/X5I0fvx4ffHFF5o1a1b19WI1UZfHa+nSpUpMTKze94XryJ5//nkNHDhQgYGBklTj34fo6GhlZGRUf68//PDD6vsGDx6s1atXa/fu3dWf27p162X3M2bMGP3jH/9QVVWVzpw5owULFujee++t8TG6gCmFAAAA9WTPnj361a9+JcMwVFlZqfHjxys2NladO3fW7NmzNXnyZLm5uWnevHmyWCzV0/o6d+6ssLAwDRw48Ir7zs/P1+jRo1VUVCSLxaK2bdvqoYcekr+/v1asWKHnn39ezz33nCoqKhQZGVm94MXlvPjiizpw4IDc3Nzk5eVVvbjBnDlzNGnSJM2cOVMWi0Xvv//+Ff/H/7nnntOgQYPk5eWlL7/8ssbHyM/PTy+//LJ69uyp4ODgi6aL7dy5U9OnT9eWLVvUtGlTffTRR3rggQe0bds2BQUFXXZ/r732mp599ll16dJFrq6u6tGjh/7xj39csp2bm5sWL16syZMn67nnnpOHh4cWLVokHx8fLVy4UElJSdVn4f7617/K399fv/nNb7RmzRq5ubnJ2dlZf/vb3674vJo0aVLr78MF1zqWISEhmjNnjh588EFVVlaqSZMmWrhwYfUZpyv9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\n", "text/plain": [ "<Figure size 640x640 with 1 Axes>" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import matplotlib.pyplot as plt\n", "import re\n", "\n", "# Define a function that, for the given tensor name, walks through all \n", "# the iterations for which we have data and fetches the value.\n", "# Returns the set of steps and the values\n", "def get_data(trial, tname):\n", " tensor = trial.tensor(tname)\n", " steps = tensor.steps()\n", " vals = [tensor.value(s) for s in steps]\n", " return steps, vals\n", "\n", "def plot_tensors(trial, collection_name, ylabel=''):\n", " \"\"\"\n", " Takes a `trial` and plots all tensors that match the given regex.\n", " \"\"\"\n", " plt.figure(\n", " num=1, figsize=(8, 8), dpi=80,\n", " facecolor='w', edgecolor='k')\n", "\n", " tensors = trial.tensor_names(collection=collection_name)\n", "\n", " for tensor_name in sorted(tensors):\n", " steps, data = get_data(trial, tensor_name)\n", " plt.plot(steps, data, label=tensor_name)\n", "\n", " plt.legend(bbox_to_anchor=(1.04,1), loc='upper left')\n", " plt.xlabel('Iteration')\n", " plt.ylabel(ylabel)\n", " plt.show()\n", " \n", "plot_tensors(trial, \"losses\", ylabel=\"Loss\")" ] } ], "metadata": { "kernelspec": { "display_name": "conda_tensorflow_p36", "language": "python", "name": "conda_tensorflow_p36" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.5" } }, "nbformat": 4, "nbformat_minor": 4 }
{ "pile_set_name": "Github" }
#import <Foundation/Foundation.h> #import "CLPUIObject.h" @class CLPMediaControl; @interface CLPCore : CLPUIObject @property (nonatomic, copy, readonly) NSArray *sources; @property (nonatomic, copy, readonly) NSArray *containers; @property (nonatomic, strong, readonly) CLPMediaControl *mediaControl; @property (nonatomic, copy, readonly) NSSet *plugins; - (instancetype)initWithSources:(NSArray *)sources; - (void)loadSources:(NSArray *)sources; - (void)addPlugin:(id)plugin; - (BOOL)hasPlugin:(Class)pluginClass; @end
{ "pile_set_name": "Github" }
<?php /** * @see https://github.com/zendframework/zend-diactoros for the canonical source repository * @copyright Copyright (c) 2018 Zend Technologies USA Inc. (https://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ declare(strict_types=1); namespace Zend\Diactoros\Exception; use UnexpectedValueException; use function sprintf; class UnrecognizedProtocolVersionException extends UnexpectedValueException implements ExceptionInterface { public static function forVersion(string $version) : self { return new self(sprintf('Unrecognized protocol version (%s)', $version)); } }
{ "pile_set_name": "Github" }