text
stringlengths
2
100k
meta
dict
<?php /** * Zend Framework * * LICENSE * * This source file is subject to the new BSD license that is bundled * with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://framework.zend.com/license/new-bsd * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * @category Zend * @package Zend_Validate * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** * @see Zend_Validate_Abstract */ #require_once 'Zend/Validate/Abstract.php'; /** * @category Zend * @package Zend_Validate * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_CreditCard extends Zend_Validate_Abstract { /** * Detected CCI list * * @var string */ const ALL = 'All'; const AMERICAN_EXPRESS = 'American_Express'; const UNIONPAY = 'Unionpay'; const DINERS_CLUB = 'Diners_Club'; const DINERS_CLUB_US = 'Diners_Club_US'; const DISCOVER = 'Discover'; const JCB = 'JCB'; const LASER = 'Laser'; const MAESTRO = 'Maestro'; const MASTERCARD = 'Mastercard'; const SOLO = 'Solo'; const VISA = 'Visa'; const CHECKSUM = 'creditcardChecksum'; const CONTENT = 'creditcardContent'; const INVALID = 'creditcardInvalid'; const LENGTH = 'creditcardLength'; const PREFIX = 'creditcardPrefix'; const SERVICE = 'creditcardService'; const SERVICEFAILURE = 'creditcardServiceFailure'; /** * Validation failure message template definitions * * @var array */ protected $_messageTemplates = array( self::CHECKSUM => "'%value%' seems to contain an invalid checksum", self::CONTENT => "'%value%' must contain only digits", self::INVALID => "Invalid type given. String expected", self::LENGTH => "'%value%' contains an invalid amount of digits", self::PREFIX => "'%value%' is not from an allowed institute", self::SERVICE => "'%value%' seems to be an invalid creditcard number", self::SERVICEFAILURE => "An exception has been raised while validating '%value%'", ); /** * List of allowed CCV lengths * * @var array */ protected $_cardLength = array( self::AMERICAN_EXPRESS => array(15), self::DINERS_CLUB => array(14), self::DINERS_CLUB_US => array(16), self::DISCOVER => array(16), self::JCB => array(16), self::LASER => array(16, 17, 18, 19), self::MAESTRO => array(12, 13, 14, 15, 16, 17, 18, 19), self::MASTERCARD => array(16), self::SOLO => array(16, 18, 19), self::UNIONPAY => array(16, 17, 18, 19), self::VISA => array(16), ); /** * List of accepted CCV provider tags * * @var array */ protected $_cardType = array( self::AMERICAN_EXPRESS => array('34', '37'), self::DINERS_CLUB => array('300', '301', '302', '303', '304', '305', '36'), self::DINERS_CLUB_US => array('54', '55'), self::DISCOVER => array('6011', '622126', '622127', '622128', '622129', '62213', '62214', '62215', '62216', '62217', '62218', '62219', '6222', '6223', '6224', '6225', '6226', '6227', '6228', '62290', '62291', '622920', '622921', '622922', '622923', '622924', '622925', '644', '645', '646', '647', '648', '649', '65'), self::JCB => array('3528', '3529', '353', '354', '355', '356', '357', '358'), self::LASER => array('6304', '6706', '6771', '6709'), self::MAESTRO => array('5018', '5020', '5038', '6304', '6759', '6761', '6763'), self::MASTERCARD => array('51', '52', '53', '54', '55'), self::SOLO => array('6334', '6767'), self::UNIONPAY => array('622126', '622127', '622128', '622129', '62213', '62214', '62215', '62216', '62217', '62218', '62219', '6222', '6223', '6224', '6225', '6226', '6227', '6228', '62290', '62291', '622920', '622921', '622922', '622923', '622924', '622925'), self::VISA => array('4'), ); /** * CCIs which are accepted by validation * * @var array */ protected $_type = array(); /** * Service callback for additional validation * * @var callback */ protected $_service; /** * Constructor * * @param string|array|Zend_Config $options OPTIONAL Type of CCI to allow */ public function __construct($options = array()) { if ($options instanceof Zend_Config) { $options = $options->toArray(); } else if (!is_array($options)) { $options = func_get_args(); $temp['type'] = array_shift($options); if (!empty($options)) { $temp['service'] = array_shift($options); } $options = $temp; } if (!array_key_exists('type', $options)) { $options['type'] = self::ALL; } $this->setType($options['type']); if (array_key_exists('service', $options)) { $this->setService($options['service']); } } /** * Returns a list of accepted CCIs * * @return array */ public function getType() { return $this->_type; } /** * Sets CCIs which are accepted by validation * * @param string|array $type Type to allow for validation * @return Zend_Validate_CreditCard Provides a fluent interface */ public function setType($type) { $this->_type = array(); return $this->addType($type); } /** * Adds a CCI to be accepted by validation * * @param string|array $type Type to allow for validation * @return Zend_Validate_CreditCard Provides a fluent interface */ public function addType($type) { if (is_string($type)) { $type = array($type); } foreach($type as $typ) { if (defined('self::' . strtoupper($typ)) && !in_array($typ, $this->_type)) { $this->_type[] = $typ; } if (($typ == self::ALL)) { $this->_type = array_keys($this->_cardLength); } } return $this; } /** * Returns the actual set service * * @return callback */ public function getService() { return $this->_service; } /** * Sets a new callback for service validation * * @param mixed $service * @throws Zend_Validate_Exception * @return $this */ public function setService($service) { if (!is_callable($service)) { #require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('Invalid callback given'); } $this->_service = $service; return $this; } /** * Defined by Zend_Validate_Interface * * Returns true if and only if $value follows the Luhn algorithm (mod-10 checksum) * * @param string $value * @return boolean */ public function isValid($value) { $this->_setValue($value); if (!is_string($value)) { $this->_error(self::INVALID, $value); return false; } if (!ctype_digit($value)) { $this->_error(self::CONTENT, $value); return false; } $length = strlen($value); $types = $this->getType(); $foundp = false; $foundl = false; foreach ($types as $type) { foreach ($this->_cardType[$type] as $prefix) { if (substr($value, 0, strlen($prefix)) == $prefix) { $foundp = true; if (in_array($length, $this->_cardLength[$type])) { $foundl = true; break 2; } } } } if ($foundp == false){ $this->_error(self::PREFIX, $value); return false; } if ($foundl == false) { $this->_error(self::LENGTH, $value); return false; } $sum = 0; $weight = 2; for ($i = $length - 2; $i >= 0; $i--) { $digit = $weight * $value[$i]; $sum += floor($digit / 10) + $digit % 10; $weight = $weight % 2 + 1; } if ((10 - $sum % 10) % 10 != $value[$length - 1]) { $this->_error(self::CHECKSUM, $value); return false; } if (!empty($this->_service)) { try { #require_once 'Zend/Validate/Callback.php'; $callback = new Zend_Validate_Callback($this->_service); $callback->setOptions($this->_type); if (!$callback->isValid($value)) { $this->_error(self::SERVICE, $value); return false; } } catch (Zend_Exception $e) { $this->_error(self::SERVICEFAILURE, $value); return false; } } return true; } }
{ "pile_set_name": "Github" }
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package cldr import ( "bufio" "encoding/xml" "errors" "fmt" "strconv" "strings" "unicode" "unicode/utf8" ) // RuleProcessor can be passed to Collator's Process method, which // parses the rules and calls the respective method for each rule found. type RuleProcessor interface { Reset(anchor string, before int) error Insert(level int, str, context, extend string) error Index(id string) } const ( // cldrIndex is a Unicode-reserved sentinel value used to mark the start // of a grouping within an index. // We ignore any rule that starts with this rune. // See https://unicode.org/reports/tr35/#Collation_Elements for details. cldrIndex = "\uFDD0" // specialAnchor is the format in which to represent logical reset positions, // such as "first tertiary ignorable". specialAnchor = "<%s/>" ) // Process parses the rules for the tailorings of this collation // and calls the respective methods of p for each rule found. func (c Collation) Process(p RuleProcessor) (err error) { if len(c.Cr) > 0 { if len(c.Cr) > 1 { return fmt.Errorf("multiple cr elements, want 0 or 1") } return processRules(p, c.Cr[0].Data()) } if c.Rules.Any != nil { return c.processXML(p) } return errors.New("no tailoring data") } // processRules parses rules in the Collation Rule Syntax defined in // https://www.unicode.org/reports/tr35/tr35-collation.html#Collation_Tailorings. func processRules(p RuleProcessor, s string) (err error) { chk := func(s string, e error) string { if err == nil { err = e } return s } i := 0 // Save the line number for use after the loop. scanner := bufio.NewScanner(strings.NewReader(s)) for ; scanner.Scan() && err == nil; i++ { for s := skipSpace(scanner.Text()); s != "" && s[0] != '#'; s = skipSpace(s) { level := 5 var ch byte switch ch, s = s[0], s[1:]; ch { case '&': // followed by <anchor> or '[' <key> ']' if s = skipSpace(s); consume(&s, '[') { s = chk(parseSpecialAnchor(p, s)) } else { s = chk(parseAnchor(p, 0, s)) } case '<': // sort relation '<'{1,4}, optionally followed by '*'. for level = 1; consume(&s, '<'); level++ { } if level > 4 { err = fmt.Errorf("level %d > 4", level) } fallthrough case '=': // identity relation, optionally followed by *. if consume(&s, '*') { s = chk(parseSequence(p, level, s)) } else { s = chk(parseOrder(p, level, s)) } default: chk("", fmt.Errorf("illegal operator %q", ch)) break } } } if chk("", scanner.Err()); err != nil { return fmt.Errorf("%d: %v", i, err) } return nil } // parseSpecialAnchor parses the anchor syntax which is either of the form // ['before' <level>] <anchor> // or // [<label>] // The starting should already be consumed. func parseSpecialAnchor(p RuleProcessor, s string) (tail string, err error) { i := strings.IndexByte(s, ']') if i == -1 { return "", errors.New("unmatched bracket") } a := strings.TrimSpace(s[:i]) s = s[i+1:] if strings.HasPrefix(a, "before ") { l, err := strconv.ParseUint(skipSpace(a[len("before "):]), 10, 3) if err != nil { return s, err } return parseAnchor(p, int(l), s) } return s, p.Reset(fmt.Sprintf(specialAnchor, a), 0) } func parseAnchor(p RuleProcessor, level int, s string) (tail string, err error) { anchor, s, err := scanString(s) if err != nil { return s, err } return s, p.Reset(anchor, level) } func parseOrder(p RuleProcessor, level int, s string) (tail string, err error) { var value, context, extend string if value, s, err = scanString(s); err != nil { return s, err } if strings.HasPrefix(value, cldrIndex) { p.Index(value[len(cldrIndex):]) return } if consume(&s, '|') { if context, s, err = scanString(s); err != nil { return s, errors.New("missing string after context") } } if consume(&s, '/') { if extend, s, err = scanString(s); err != nil { return s, errors.New("missing string after extension") } } return s, p.Insert(level, value, context, extend) } // scanString scans a single input string. func scanString(s string) (str, tail string, err error) { if s = skipSpace(s); s == "" { return s, s, errors.New("missing string") } buf := [16]byte{} // small but enough to hold most cases. value := buf[:0] for s != "" { if consume(&s, '\'') { i := strings.IndexByte(s, '\'') if i == -1 { return "", "", errors.New(`unmatched single quote`) } if i == 0 { value = append(value, '\'') } else { value = append(value, s[:i]...) } s = s[i+1:] continue } r, sz := utf8.DecodeRuneInString(s) if unicode.IsSpace(r) || strings.ContainsRune("&<=#", r) { break } value = append(value, s[:sz]...) s = s[sz:] } return string(value), skipSpace(s), nil } func parseSequence(p RuleProcessor, level int, s string) (tail string, err error) { if s = skipSpace(s); s == "" { return s, errors.New("empty sequence") } last := rune(0) for s != "" { r, sz := utf8.DecodeRuneInString(s) s = s[sz:] if r == '-' { // We have a range. The first element was already written. if last == 0 { return s, errors.New("range without starter value") } r, sz = utf8.DecodeRuneInString(s) s = s[sz:] if r == utf8.RuneError || r < last { return s, fmt.Errorf("invalid range %q-%q", last, r) } for i := last + 1; i <= r; i++ { if err := p.Insert(level, string(i), "", ""); err != nil { return s, err } } last = 0 continue } if unicode.IsSpace(r) || unicode.IsPunct(r) { break } // normal case if err := p.Insert(level, string(r), "", ""); err != nil { return s, err } last = r } return s, nil } func skipSpace(s string) string { return strings.TrimLeftFunc(s, unicode.IsSpace) } // consumes returns whether the next byte is ch. If so, it gobbles it by // updating s. func consume(s *string, ch byte) (ok bool) { if *s == "" || (*s)[0] != ch { return false } *s = (*s)[1:] return true } // The following code parses Collation rules of CLDR version 24 and before. var lmap = map[byte]int{ 'p': 1, 's': 2, 't': 3, 'i': 5, } type rulesElem struct { Rules struct { Common Any []*struct { XMLName xml.Name rule } `xml:",any"` } `xml:"rules"` } type rule struct { Value string `xml:",chardata"` Before string `xml:"before,attr"` Any []*struct { XMLName xml.Name rule } `xml:",any"` } var emptyValueError = errors.New("cldr: empty rule value") func (r *rule) value() (string, error) { // Convert hexadecimal Unicode codepoint notation to a string. s := charRe.ReplaceAllStringFunc(r.Value, replaceUnicode) r.Value = s if s == "" { if len(r.Any) != 1 { return "", emptyValueError } r.Value = fmt.Sprintf(specialAnchor, r.Any[0].XMLName.Local) r.Any = nil } else if len(r.Any) != 0 { return "", fmt.Errorf("cldr: XML elements found in collation rule: %v", r.Any) } return r.Value, nil } func (r rule) process(p RuleProcessor, name, context, extend string) error { v, err := r.value() if err != nil { return err } switch name { case "p", "s", "t", "i": if strings.HasPrefix(v, cldrIndex) { p.Index(v[len(cldrIndex):]) return nil } if err := p.Insert(lmap[name[0]], v, context, extend); err != nil { return err } case "pc", "sc", "tc", "ic": level := lmap[name[0]] for _, s := range v { if err := p.Insert(level, string(s), context, extend); err != nil { return err } } default: return fmt.Errorf("cldr: unsupported tag: %q", name) } return nil } // processXML parses the format of CLDR versions 24 and older. func (c Collation) processXML(p RuleProcessor) (err error) { // Collation is generated and defined in xml.go. var v string for _, r := range c.Rules.Any { switch r.XMLName.Local { case "reset": level := 0 switch r.Before { case "primary", "1": level = 1 case "secondary", "2": level = 2 case "tertiary", "3": level = 3 case "": default: return fmt.Errorf("cldr: unknown level %q", r.Before) } v, err = r.value() if err == nil { err = p.Reset(v, level) } case "x": var context, extend string for _, r1 := range r.Any { v, err = r1.value() switch r1.XMLName.Local { case "context": context = v case "extend": extend = v } } for _, r1 := range r.Any { if t := r1.XMLName.Local; t == "context" || t == "extend" { continue } r1.rule.process(p, r1.XMLName.Local, context, extend) } default: err = r.rule.process(p, r.XMLName.Local, "", "") } if err != nil { return err } } return nil }
{ "pile_set_name": "Github" }
// Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package cpu implements processor feature detection for // various CPU architectures. package cpu // CacheLinePad is used to pad structs to avoid false sharing. type CacheLinePad struct{ _ [cacheLineSize]byte } // X86 contains the supported CPU features of the // current X86/AMD64 platform. If the current platform // is not X86/AMD64 then all feature flags are false. // // X86 is padded to avoid false sharing. Further the HasAVX // and HasAVX2 are only set if the OS supports XMM and YMM // registers in addition to the CPUID feature bit being set. var X86 struct { _ CacheLinePad HasAES bool // AES hardware implementation (AES NI) HasADX bool // Multi-precision add-carry instruction extensions HasAVX bool // Advanced vector extension HasAVX2 bool // Advanced vector extension 2 HasBMI1 bool // Bit manipulation instruction set 1 HasBMI2 bool // Bit manipulation instruction set 2 HasERMS bool // Enhanced REP for MOVSB and STOSB HasFMA bool // Fused-multiply-add instructions HasOSXSAVE bool // OS supports XSAVE/XRESTOR for saving/restoring XMM registers. HasPCLMULQDQ bool // PCLMULQDQ instruction - most often used for AES-GCM HasPOPCNT bool // Hamming weight instruction POPCNT. HasRDRAND bool // RDRAND instruction (on-chip random number generator) HasRDSEED bool // RDSEED instruction (on-chip random number generator) HasSSE2 bool // Streaming SIMD extension 2 (always available on amd64) HasSSE3 bool // Streaming SIMD extension 3 HasSSSE3 bool // Supplemental streaming SIMD extension 3 HasSSE41 bool // Streaming SIMD extension 4 and 4.1 HasSSE42 bool // Streaming SIMD extension 4 and 4.2 _ CacheLinePad } // ARM64 contains the supported CPU features of the // current ARMv8(aarch64) platform. If the current platform // is not arm64 then all feature flags are false. var ARM64 struct { _ CacheLinePad HasFP bool // Floating-point instruction set (always available) HasASIMD bool // Advanced SIMD (always available) HasEVTSTRM bool // Event stream support HasAES bool // AES hardware implementation HasPMULL bool // Polynomial multiplication instruction set HasSHA1 bool // SHA1 hardware implementation HasSHA2 bool // SHA2 hardware implementation HasCRC32 bool // CRC32 hardware implementation HasATOMICS bool // Atomic memory operation instruction set HasFPHP bool // Half precision floating-point instruction set HasASIMDHP bool // Advanced SIMD half precision instruction set HasCPUID bool // CPUID identification scheme registers HasASIMDRDM bool // Rounding double multiply add/subtract instruction set HasJSCVT bool // Javascript conversion from floating-point to integer HasFCMA bool // Floating-point multiplication and addition of complex numbers HasLRCPC bool // Release Consistent processor consistent support HasDCPOP bool // Persistent memory support HasSHA3 bool // SHA3 hardware implementation HasSM3 bool // SM3 hardware implementation HasSM4 bool // SM4 hardware implementation HasASIMDDP bool // Advanced SIMD double precision instruction set HasSHA512 bool // SHA512 hardware implementation HasSVE bool // Scalable Vector Extensions HasASIMDFHM bool // Advanced SIMD multiplication FP16 to FP32 _ CacheLinePad } // PPC64 contains the supported CPU features of the current ppc64/ppc64le platforms. // If the current platform is not ppc64/ppc64le then all feature flags are false. // // For ppc64/ppc64le, it is safe to check only for ISA level starting on ISA v3.00, // since there are no optional categories. There are some exceptions that also // require kernel support to work (DARN, SCV), so there are feature bits for // those as well. The minimum processor requirement is POWER8 (ISA 2.07). // The struct is padded to avoid false sharing. var PPC64 struct { _ CacheLinePad HasDARN bool // Hardware random number generator (requires kernel enablement) HasSCV bool // Syscall vectored (requires kernel enablement) IsPOWER8 bool // ISA v2.07 (POWER8) IsPOWER9 bool // ISA v3.00 (POWER9) _ CacheLinePad }
{ "pile_set_name": "Github" }
// __BEGIN_LICENSE__ // Copyright (c) 2006-2013, United States Government as represented by the // Administrator of the National Aeronautics and Space Administration. All // rights reserved. // // The NASA Vision Workbench is 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. // __END_LICENSE__ #ifndef GPU_EdgeExtend_H #define GPU_EdgeExtend_H #include <vw/Image/EdgeExtension.h> namespace vw { namespace GPU { enum EdgeExtensionType { ZERO_EDGE_EXTENSION, CONSTANT_EDGE_EXTENSION }; template <class EdgeT> struct TraitsForEdgeT { }; template <> struct TraitsForEdgeT<ZeroEdgeExtension> { static const EdgeExtensionType type = ZERO_EDGE_EXTENSION; }; template <> struct TraitsForEdgeT<ConstantEdgeExtension> { static const EdgeExtensionType type = CONSTANT_EDGE_EXTENSION; }; inline void EdgeExtension_SetupTexture(EdgeExtensionType type) { GLuint gl_wrap_type; if(type == ZERO_EDGE_EXTENSION) { gl_wrap_type = GL_CLAMP_TO_BORDER_ARB; } else if(type == CONSTANT_EDGE_EXTENSION) { gl_wrap_type = GL_CLAMP; } glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_S, gl_wrap_type); glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_T, gl_wrap_type); } inline void EdgeExtension_RestoreTexture(EdgeExtensionType type) { glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER_ARB); glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER_ARB); } typedef ZeroEdgeExtension DefaultEdgeExtension; } } // namespaces GPU, vw #endif
{ "pile_set_name": "Github" }
({ name: "date.timezone.Asia-Sakhalin", runTest: function(t){ var tz = "Asia/Sakhalin"; doh.checkDate({tzOffset: -570.8, tzAbbr: "LMT"}, -2147483648000, tz, 1); doh.checkDate({tzOffset: -570.8, tzAbbr: "LMT"}, -2147397248000, tz, 1); doh.checkDate({tzOffset: -570.8, tzAbbr: "LMT"}, -2031039049000, tz, 1); doh.checkDate({tzOffset: -540, tzAbbr: "CJT"}, -2031039048000, tz, 1); doh.checkDate({tzOffset: -540, tzAbbr: "CJT"}, -1009875601000, tz, 1); doh.checkDate({tzOffset: -540, tzAbbr: "JST"}, -1009875600000, tz, 1); doh.checkDate({tzOffset: -540, tzAbbr: "JST"}, -768560401000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, -768560400000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 354891599000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 354891600000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 370699199000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 370699200000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 386427599000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 386427600000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 402235199000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 402235200000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 417963599000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 417963600000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 433771199000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 433771200000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 449585999000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 449586000000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 465317999000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 465318000000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 481042799000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 481042800000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 496767599000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 496767600000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 512492399000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 512492400000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 528217199000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 528217200000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 543941999000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 543942000000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 559666799000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 559666800000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 575391599000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 575391600000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 591116399000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 591116400000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 606841199000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 606841200000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 622565999000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 622566000000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 638290799000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 638290800000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 654620399000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 654620400000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 670345199000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 670345200000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 686073599000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 686073600000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 695750399000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 695750400000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 701783999000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 701784000000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 717505199000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 717505200000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 733244399000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 733244400000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 748969199000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 748969200000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 764693999000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 764694000000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 780418799000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 780418800000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 796143599000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 796143600000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 811868399000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 811868400000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 828197999000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 828198000000, tz, 1); doh.checkDate({tzOffset: -720, tzAbbr: "SAKST"}, 846341999000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 846342000000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKT"}, 859647599000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 859647600000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 877795199000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 877795200000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 891100799000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 891100800000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 909244799000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 909244800000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 922550399000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 922550400000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 941299199000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 941299200000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 953999999000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 954000000000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 972748799000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 972748800000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 985449599000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 985449600000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1004198399000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1004198400000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1017503999000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1017504000000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1035647999000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1035648000000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1048953599000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1048953600000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1067097599000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1067097600000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1080403199000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1080403200000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1099151999000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1099152000000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1111852799000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1111852800000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1130601599000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1130601600000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1143302399000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1143302400000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1162051199000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1162051200000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1174751999000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1174752000000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1193500799000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1193500800000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1206806399000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1206806400000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1224950399000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1224950400000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1238255999000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1238256000000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1256399999000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1256400000000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1269705599000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1269705600000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1288454399000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1288454400000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1301155199000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1301155200000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1319903999000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1319904000000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1332604799000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1332604800000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1351353599000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1351353600000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1364659199000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1364659200000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1382803199000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1382803200000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1396108799000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1396108800000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1414252799000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1414252800000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1427558399000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1427558400000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1445702399000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1445702400000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1459007999000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1459008000000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1477756799000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1477756800000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1490457599000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1490457600000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1509206399000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1509206400000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1521907199000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1521907200000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1540655999000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1540656000000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1553961599000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1553961600000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1572105599000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1572105600000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1585411199000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1585411200000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1603555199000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1603555200000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1616860799000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1616860800000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1635609599000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1635609600000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1648310399000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1648310400000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1667059199000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1667059200000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1679759999000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1679760000000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1698508799000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1698508800000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1711814399000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1711814400000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1729958399000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1729958400000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1743263999000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1743264000000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1761407999000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1761408000000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1774713599000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1774713600000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1792857599000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1792857600000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1806163199000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1806163200000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1824911999000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1824912000000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1837612799000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1837612800000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1856361599000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1856361600000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1869062399000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1869062400000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1887811199000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1887811200000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1901116799000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1901116800000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1919260799000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1919260800000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1932566399000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1932566400000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1950710399000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1950710400000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1964015999000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1964016000000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1982764799000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1982764800000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1995465599000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1995465600000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 2014214399000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 2014214400000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 2026915199000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 2026915200000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 2045663999000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 2045664000000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 2058364799000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 2058364800000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 2077113599000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 2077113600000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 2090419199000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 2090419200000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 2108563199000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 2108563200000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 2121868799000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 2121868800000, tz, 1); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 2140012799000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 2140012800000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 2147397247000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 2147483647000, tz, 1); doh.checkDate({tzOffset: -600, tzAbbr: "SAKT"}, 1231151400000, tz, 0); doh.checkDate({tzOffset: -660, tzAbbr: "SAKST"}, 1246789800000, tz, 0); } })
{ "pile_set_name": "Github" }
[General] Version=DrumSynth v2.0 Comment=Remember to send any good .ds files to [email protected] Tuning=0 Stretch=100 Level=0 Filter=0 HighPass=0 Resonance=5 FilterEnv=0,96 1299,30 1999,14 3198,8 23785,0 444000,100 444000,0 [Tone] On=0 Level=128 F1=5000 F2=50 Droop=45 Phase=65 Envelope=0,100 1750,20 5250,0 [Noise] On=0 Level=96 Slope=60 Envelope=0,100 949,14 19888,0 FixedSeq=0 [Overtones] On=1 Level=74 F1=55 Wave1=4 Track1=1 F2=220 Wave2=2 Track2=0 Method=1 Param=70 Envelope1=0,100 2439,95 19888,0 Envelope2=0,100 2439,95 17489,89 19888,0 Filter=0 [NoiseBand] On=0 Level=65 F=6000 dF=75 Envelope=0,100 1949,19 7445,0 [NoiseBand2] On=0 Level=128 F=8503 dF=80 Envelope=0,100 1500,20 4500,0 [Distortion] On=1 Clipping=9 Bits=2 Rate=0
{ "pile_set_name": "Github" }
#define REDIS_GIT_SHA1 "d859d85f" #define REDIS_GIT_DIRTY "523"
{ "pile_set_name": "Github" }
<!DOCTYPE HTML> <html lang="" > <head> <meta charset="UTF-8"> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> <title>睡眠按键和_LID更名.plist · GitBook</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="description" content=""> <meta name="generator" content="GitBook 3.2.3"> <link rel="stylesheet" href="../gitbook/style.css"> <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css"> <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css"> <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css"> <meta name="HandheldFriendly" content="true"/> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png"> <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon"> <link rel="next" href="../12-060D补丁/" /> <link rel="prev" href="SSDT-LIDpatch.html" /> </head> <body> <div class="book"> <div class="book-summary"> <div id="book-search-input" role="search"> <input type="text" placeholder="Type to search" /> </div> <nav role="navigation"> <ul class="summary"> <li class="chapter " data-level="1.1" data-path="../"> <a href="../"> OpenCore 部件 </a> </li> <li class="chapter " data-level="1.2" data-path="../00-总述/"> <a href="../00-总述/"> 00-总述 </a> <ul class="articles"> <li class="chapter " data-level="1.2.1" data-path="../00-总述/00-1-ASL语法基础/"> <a href="../00-总述/00-1-ASL语法基础/"> 00-1-ASL语法基础 </a> </li> <li class="chapter " data-level="1.2.2" data-path="../00-总述/00-2-SSDT补丁加载顺序/"> <a href="../00-总述/00-2-SSDT补丁加载顺序/"> 00-2-SSDT补丁加载顺序 </a> <ul class="articles"> <li class="chapter " data-level="1.2.2.1" data-path="../00-总述/00-2-SSDT补丁加载顺序/SSDT-XXXX-1.html"> <a href="../00-总述/00-2-SSDT补丁加载顺序/SSDT-XXXX-1.html"> SSDT-XXXX-1.dsl </a> </li> <li class="chapter " data-level="1.2.2.2" data-path="../00-总述/00-2-SSDT补丁加载顺序/SSDT-XXXX-2.html"> <a href="../00-总述/00-2-SSDT补丁加载顺序/SSDT-XXXX-2.html"> SSDT-XXXX-2.dsl </a> </li> </ul> </li> <li class="chapter " data-level="1.2.3" data-path="../00-总述/00-3-ACPI表单/"> <a href="../00-总述/00-3-ACPI表单/"> 00-3-ACPI表单 </a> </li> <li class="chapter " data-level="1.2.4" data-path="../03-二进制更名与预置变量/03-2-ASL-AML对照表/ASL-AML对照表.md"> <span> 00-4-ASL-AML对照表 </a> </li> </ul> </li> <li class="chapter " data-level="1.3" data-path="../01-关于AOAC/"> <a href="../01-关于AOAC/"> 01-关于AOAC </a> <ul class="articles"> <li class="chapter " data-level="1.3.1" data-path="../01-关于AOAC/01-1-禁止S3睡眠/"> <a href="../01-关于AOAC/01-1-禁止S3睡眠/"> 01-1-禁止S3睡眠 </a> <ul class="articles"> <li class="chapter " data-level="1.3.1.1" data-path="../01-关于AOAC/01-1-禁止S3睡眠/_S3更名XS3.html"> <a href="../01-关于AOAC/01-1-禁止S3睡眠/_S3更名XS3.html"> _S3更名XS3.plist </a> </li> <li class="chapter " data-level="1.3.1.2" data-path="../01-关于AOAC/01-1-禁止S3睡眠/SSDT-MethodS3-disable.html"> <a href="../01-关于AOAC/01-1-禁止S3睡眠/SSDT-MethodS3-disable.html"> SSDT-MethodS3-disable.dsl </a> </li> <li class="chapter " data-level="1.3.1.3" data-path="../01-关于AOAC/01-1-禁止S3睡眠/SSDT-NameS3-disable.html"> <a href="../01-关于AOAC/01-1-禁止S3睡眠/SSDT-NameS3-disable.html"> SSDT-NameS3-disable.dsl </a> </li> </ul> </li> <li class="chapter " data-level="1.3.2" data-path="../01-关于AOAC/01-2-AOAC禁止独显/"> <a href="../01-关于AOAC/01-2-AOAC禁止独显/"> 01-2-AOAC禁止独显 </a> <ul class="articles"> <li class="chapter " data-level="1.3.2.1" data-path="../01-关于AOAC/01-2-AOAC禁止独显/SSDT-NDGP_OFF-AOAC.html"> <a href="../01-关于AOAC/01-2-AOAC禁止独显/SSDT-NDGP_OFF-AOAC.html"> SSDT-NDGP_OFF-AOAC.dsl </a> </li> <li class="chapter " data-level="1.3.2.2" data-path="../01-关于AOAC/01-2-AOAC禁止独显/SSDT-NDGP_PS3-AOAC.html"> <a href="../01-关于AOAC/01-2-AOAC禁止独显/SSDT-NDGP_PS3-AOAC.html"> SSDT-NDGP_PS3-AOAC.dsl </a> </li> </ul> </li> <li class="chapter " data-level="1.3.3" data-path="../01-关于AOAC/01-3-电源空闲管理/"> <a href="../01-关于AOAC/01-3-电源空闲管理/"> 01-3-电源空闲管理 </a> <ul class="articles"> <li class="chapter " data-level="1.3.3.1" data-path="../01-关于AOAC/01-3-电源空闲管理/SSDT-DeepIdle.html"> <a href="../01-关于AOAC/01-3-电源空闲管理/SSDT-DeepIdle.html"> SSDT-DeepIdle.dsl </a> </li> </ul> </li> <li class="chapter " data-level="1.3.4" data-path="../01-关于AOAC/01-4-AOAC唤醒方法/"> <a href="../01-关于AOAC/01-4-AOAC唤醒方法/"> 01-4-AOAC唤醒方法 </a> <ul class="articles"> <li class="chapter " data-level="1.3.4.1" data-path="../01-关于AOAC/01-4-AOAC唤醒方法/SSDT-LIDpatch-AOAC.html"> <a href="../01-关于AOAC/01-4-AOAC唤醒方法/SSDT-LIDpatch-AOAC.html"> SSDT-LIDpatch-AOAC.dsl </a> </li> <li class="chapter " data-level="1.3.4.2" data-path="../01-关于AOAC/01-4-AOAC唤醒方法/SSDT-PCI0.LPCB-Wake-AOAC.html"> <a href="../01-关于AOAC/01-4-AOAC唤醒方法/SSDT-PCI0.LPCB-Wake-AOAC.html"> SSDT-PCI0.LPCB-Wake-AOAC.dsl </a> </li> </ul> </li> <li class="chapter " data-level="1.3.5" data-path="../01-关于AOAC/01-5-设置ASPM工作模式/"> <a href="../01-关于AOAC/01-5-设置ASPM工作模式/"> 01-5-设置ASPM工作模式 </a> <ul class="articles"> <li class="chapter " data-level="1.3.5.1" data-path="../01-关于AOAC/01-5-设置ASPM工作模式/SSDT-PCI0.RPXX-ASPM.html"> <a href="../01-关于AOAC/01-5-设置ASPM工作模式/SSDT-PCI0.RPXX-ASPM.html"> SSDT-PCI0.RPXX-ASPM.dsl </a> </li> </ul> </li> <li class="chapter " data-level="1.3.6" data-path="../01-关于AOAC/01-6-睡眠自动关闭蓝牙WIFI/"> <a href="../01-关于AOAC/01-6-睡眠自动关闭蓝牙WIFI/"> 01-6-睡眠自动关闭蓝牙WIFI </a> </li> </ul> </li> <li class="chapter " data-level="1.4" data-path="../02-仿冒设备/"> <a href="../02-仿冒设备/"> 02-仿冒设备 </a> <ul class="articles"> <li class="chapter " data-level="1.4.1" data-path="../02-仿冒设备/02-1-仿冒EC/"> <a href="../02-仿冒设备/02-1-仿冒EC/"> 02-1-仿冒EC </a> <ul class="articles"> <li class="chapter " data-level="1.4.1.1" data-path="../02-仿冒设备/02-1-仿冒EC/SSDT-EC.html"> <a href="../02-仿冒设备/02-1-仿冒EC/SSDT-EC.html"> SSDT-EC.dsl </a> </li> </ul> </li> <li class="chapter " data-level="1.4.2" data-path="../02-仿冒设备/02-2-RTC0/"> <a href="../02-仿冒设备/02-2-RTC0/"> 02-2-RTC0 </a> <ul class="articles"> <li class="chapter " data-level="1.4.2.1" data-path="../02-仿冒设备/02-2-RTC0/SSDT-RTC0.html"> <a href="../02-仿冒设备/02-2-RTC0/SSDT-RTC0.html"> SSDT-RTC0.dsl </a> </li> </ul> </li> <li class="chapter " data-level="1.4.3" data-path="../02-仿冒设备/02-3-仿冒环境光传感器/"> <a href="../02-仿冒设备/02-3-仿冒环境光传感器/"> 02-3-仿冒环境光传感器 </a> <ul class="articles"> <li class="chapter " data-level="1.4.3.1" data-path="../02-仿冒设备/02-3-仿冒环境光传感器/SSDT-ALS0.html"> <a href="../02-仿冒设备/02-3-仿冒环境光传感器/SSDT-ALS0.html"> SSDT-ALS0.dsl </a> </li> <li class="chapter " data-level="1.4.3.2" data-path="../02-仿冒设备/02-3-仿冒环境光传感器/SSDT-ALSD.html"> <a href="../02-仿冒设备/02-3-仿冒环境光传感器/SSDT-ALSD.html"> SSDT-ALSD.dsl </a> </li> </ul> </li> </ul> </li> <li class="chapter " data-level="1.5" data-path="../03-二进制更名与预置变量/"> <a href="../03-二进制更名与预置变量/"> 03-二进制更名与预置变量 </a> <ul class="articles"> <li class="chapter " data-level="1.5.1" data-path="../03-二进制更名与预置变量/03-1-OCI2C-GPIO补丁/"> <a href="../03-二进制更名与预置变量/03-1-OCI2C-GPIO补丁/"> 03-1-OCI2C-GPIO补丁 </a> <ul class="articles"> <li class="chapter " data-level="1.5.1.1" data-path="../03-二进制更名与预置变量/03-1-OCI2C-GPIO补丁/SSDT-OCGPI0-GPEN.html"> <a href="../03-二进制更名与预置变量/03-1-OCI2C-GPIO补丁/SSDT-OCGPI0-GPEN.html"> SSDT-OCGPI0-GPEN.dsl </a> </li> <li class="chapter " data-level="1.5.1.2" data-path="../03-二进制更名与预置变量/03-1-OCI2C-GPIO补丁/SSDT-OCGPI0-GPHD.html"> <a href="../03-二进制更名与预置变量/03-1-OCI2C-GPIO补丁/SSDT-OCGPI0-GPHD.html"> SSDT-OCGPI0-GPHD.dsl </a> </li> </ul> </li> <li class="chapter " data-level="1.5.2" > <span> 补丁库 </span> <ul class="articles"> <li class="chapter " data-level="1.5.2.1" data-path="../03-二进制更名与预置变量/补丁库/SSDT-AWAC.html"> <a href="../03-二进制更名与预置变量/补丁库/SSDT-AWAC.html"> SSDT-AWAC.dsl </a> </li> <li class="chapter " data-level="1.5.2.2" data-path="../03-二进制更名与预置变量/补丁库/SSDT-RTC_Y-AWAC_N.html"> <a href="../03-二进制更名与预置变量/补丁库/SSDT-RTC_Y-AWAC_N.html"> SSDT-RTC_Y-AWAC_N.dsl </a> </li> </ul> </li> </ul> </li> <li class="chapter " data-level="1.6" data-path="../04-操作系统补丁/"> <a href="../04-操作系统补丁/"> 04-操作系统补丁 </a> <ul class="articles"> <li class="chapter " data-level="1.6.1" data-path="../04-操作系统补丁/操作系统补丁前置更名.html"> <a href="../04-操作系统补丁/操作系统补丁前置更名.html"> 操作系统补丁前置更名.plist </a> </li> <li class="chapter " data-level="1.6.2" data-path="../04-操作系统补丁/操作系统更名.html"> <a href="../04-操作系统补丁/操作系统更名.html"> 操作系统更名.plist </a> </li> <li class="chapter " data-level="1.6.3" data-path="../04-操作系统补丁/SSDT-OC-XOSI.html"> <a href="../04-操作系统补丁/SSDT-OC-XOSI.html"> SSDT-OC-XOSI.dsl </a> </li> </ul> </li> <li class="chapter " data-level="1.7" data-path="../05-注入设备/"> <a href="../05-注入设备/"> 05-注入设备 </a> <ul class="articles"> <li class="chapter " data-level="1.7.1" data-path="../05-注入设备/05-1-注入X86/"> <a href="../05-注入设备/05-1-注入X86/"> 05-1-注入X86 </a> <ul class="articles"> <li class="chapter " data-level="1.7.1.1" data-path="../05-注入设备/05-1-注入X86/SSDT-PLUG-_PR.CPU0.html"> <a href="../05-注入设备/05-1-注入X86/SSDT-PLUG-_PR.CPU0.html"> SSDT-PLUG-_PR.CPU0.dsl </a> </li> <li class="chapter " data-level="1.7.1.2" data-path="../05-注入设备/05-1-注入X86/SSDT-PLUG-_PR.P000.html"> <a href="../05-注入设备/05-1-注入X86/SSDT-PLUG-_PR.P000.html"> SSDT-PLUG-_PR.P000.dsl </a> </li> <li class="chapter " data-level="1.7.1.3" data-path="../05-注入设备/05-1-注入X86/SSDT-PLUG-_PR.PR00.html"> <a href="../05-注入设备/05-1-注入X86/SSDT-PLUG-_PR.PR00.html"> SSDT-PLUG-_PR.PR00.dsl </a> </li> <li class="chapter " data-level="1.7.1.4" data-path="../05-注入设备/05-1-注入X86/SSDT-PLUG-_SB.CPU0.html"> <a href="../05-注入设备/05-1-注入X86/SSDT-PLUG-_SB.CPU0.html"> SSDT-PLUG-_SB.CPU0.dsl </a> </li> <li class="chapter " data-level="1.7.1.5" data-path="../05-注入设备/05-1-注入X86/SSDT-PLUG-_SB.P000.html"> <a href="../05-注入设备/05-1-注入X86/SSDT-PLUG-_SB.P000.html"> SSDT-PLUG-_SB.P000.dsl </a> </li> <li class="chapter " data-level="1.7.1.6" data-path="../05-注入设备/05-1-注入X86/SSDT-PLUG-_SB.PR00.html"> <a href="../05-注入设备/05-1-注入X86/SSDT-PLUG-_SB.PR00.html"> SSDT-PLUG-_SB.PR00.dsl </a> </li> <li class="chapter " data-level="1.7.1.7" data-path="../05-注入设备/05-1-注入X86/SSDT-PLUG-SCK0.C000.html"> <a href="../05-注入设备/05-1-注入X86/SSDT-PLUG-SCK0.C000.html"> SSDT-PLUG-SCK0.C000.dsl </a> </li> <li class="chapter " data-level="1.7.1.8" data-path="../05-注入设备/05-1-注入X86/SSDT-PLUG-SCK0.CPU0.html"> <a href="../05-注入设备/05-1-注入X86/SSDT-PLUG-SCK0.CPU0.html"> SSDT-PLUG-SCK0.CPU0.dsl </a> </li> </ul> </li> <li class="chapter " data-level="1.7.2" data-path="../05-注入设备/05-2-PNLF注入方法/"> <a href="../05-注入设备/05-2-PNLF注入方法/"> 05-2-PNLF注入方法 </a> <ul class="articles"> <li class="chapter " data-level="1.7.2.1" data-path="../05-注入设备/05-2-PNLF注入方法/ACPI亮度补丁/ACPI亮度补丁.html"> <a href="../05-注入设备/05-2-PNLF注入方法/ACPI亮度补丁/ACPI亮度补丁.html"> ACPI亮度补丁 </a> <ul class="articles"> <li class="chapter " data-level="1.7.2.1.1" data-path="../05-注入设备/05-2-PNLF注入方法/ACPI亮度补丁/SSDT-PNLF-ACPI.html"> <a href="../05-注入设备/05-2-PNLF注入方法/ACPI亮度补丁/SSDT-PNLF-ACPI.html"> SSDT-PNLF-ACPI.dsl </a> </li> <li class="chapter " data-level="1.7.2.1.2" data-path="../05-注入设备/05-2-PNLF注入方法/ACPI亮度补丁/修改图示.html"> <a href="../05-注入设备/05-2-PNLF注入方法/ACPI亮度补丁/修改图示.html"> 修改图示 </a> </li> </ul> </li> <li class="chapter " data-level="1.7.2.2" > <span> 定制亮度补丁 </span> <ul class="articles"> <li class="chapter " data-level="1.7.2.2.1" data-path="../05-注入设备/05-2-PNLF注入方法/定制亮度补丁/SSDT-PNLF-CFL.html"> <a href="../05-注入设备/05-2-PNLF注入方法/定制亮度补丁/SSDT-PNLF-CFL.html"> SSDT-PNLF-CFL.dsl </a> </li> <li class="chapter " data-level="1.7.2.2.2" data-path="../05-注入设备/05-2-PNLF注入方法/定制亮度补丁/SSDT-PNLF-Haswell_Broadwell.html"> <a href="../05-注入设备/05-2-PNLF注入方法/定制亮度补丁/SSDT-PNLF-Haswell_Broadwell.html"> SSDT-PNLF-Haswell_Broadwell.dsl </a> </li> <li class="chapter " data-level="1.7.2.2.3" data-path="../05-注入设备/05-2-PNLF注入方法/定制亮度补丁/SSDT-PNLF-SKL_KBL.html"> <a href="../05-注入设备/05-2-PNLF注入方法/定制亮度补丁/SSDT-PNLF-SKL_KBL.html"> SSDT-PNLF-SKL_KBL.dsl </a> </li> <li class="chapter " data-level="1.7.2.2.4" data-path="../05-注入设备/05-2-PNLF注入方法/定制亮度补丁/SSDT-PNLF-SNB_IVY.html"> <a href="../05-注入设备/05-2-PNLF注入方法/定制亮度补丁/SSDT-PNLF-SNB_IVY.html"> SSDT-PNLF-SNB_IVY.dsl </a> </li> </ul> </li> </ul> </li> <li class="chapter " data-level="1.7.3" data-path="../05-注入设备/05-3-SBUS_SMBU补丁/"> <a href="../05-注入设备/05-3-SBUS_SMBU补丁/"> 05-3-SBUS/SMBU补丁 </a> <ul class="articles"> <li class="chapter " data-level="1.7.3.1" data-path="../05-注入设备/05-3-SBUS_SMBU补丁/SSDT-SBUS.html"> <a href="../05-注入设备/05-3-SBUS_SMBU补丁/SSDT-SBUS.html"> SSDT-SBUS.dsl </a> </li> <li class="chapter " data-level="1.7.3.2" data-path="../05-注入设备/05-3-SBUS_SMBU补丁/SSDT-SMBU.html"> <a href="../05-注入设备/05-3-SBUS_SMBU补丁/SSDT-SMBU.html"> SSDT-SMBU.dsl </a> </li> </ul> </li> </ul> </li> <li class="chapter " data-level="1.8" data-path="../06-添加缺失的部件/"> <a href="../06-添加缺失的部件/"> 06-添加缺失的部件 </a> <ul class="articles"> <li class="chapter " data-level="1.8.1" data-path="../06-添加缺失的部件/SSDT-DMAC.html"> <a href="../06-添加缺失的部件/SSDT-DMAC.html"> SSDT-DMAC.dsl </a> </li> <li class="chapter " data-level="1.8.2" data-path="../06-添加缺失的部件/SSDT-IMEI.html"> <a href="../06-添加缺失的部件/SSDT-IMEI.html"> SSDT-IMEI.dsl </a> </li> <li class="chapter " data-level="1.8.3" data-path="../06-添加缺失的部件/SSDT-MCHC.html"> <a href="../06-添加缺失的部件/SSDT-MCHC.html"> SSDT-MCHC.dsl </a> </li> <li class="chapter " data-level="1.8.4" data-path="../06-添加缺失的部件/SSDT-MEM2.html"> <a href="../06-添加缺失的部件/SSDT-MEM2.html"> SSDT-MEM2.dsl </a> </li> <li class="chapter " data-level="1.8.5" data-path="../06-添加缺失的部件/SSDT-PMCR.html"> <a href="../06-添加缺失的部件/SSDT-PMCR.html"> SSDT-PMCR.dsl </a> </li> <li class="chapter " data-level="1.8.6" data-path="../06-添加缺失的部件/SSDT-PPMC.html"> <a href="../06-添加缺失的部件/SSDT-PPMC.html"> SSDT-PPMC.dsl </a> </li> <li class="chapter " data-level="1.8.7" data-path="../06-添加缺失的部件/SSDT-PWRB.html"> <a href="../06-添加缺失的部件/SSDT-PWRB.html"> SSDT-PWRB.dsl </a> </li> <li class="chapter " data-level="1.8.8" data-path="../06-添加缺失的部件/SSDT-SLPB.html"> <a href="../06-添加缺失的部件/SSDT-SLPB.html"> SSDT-SLPB.dsl </a> </li> </ul> </li> <li class="chapter " data-level="1.9" data-path="../07-PS2键盘映射及亮度快捷键/"> <a href="../07-PS2键盘映射及亮度快捷键/"> 07-PS2键盘映射及亮度快捷键 </a> <ul class="articles"> <li class="chapter " data-level="1.9.1" data-path="../07-PS2键盘映射及亮度快捷键/ApplePS2ToADBMap.html"> <a href="../07-PS2键盘映射及亮度快捷键/ApplePS2ToADBMap.html"> ApplePS2ToADBMap.h </a> </li> <li class="chapter " data-level="1.9.2" data-path="../07-PS2键盘映射及亮度快捷键/SSDT-RMCF-MouseAsTrackpad.html"> <a href="../07-PS2键盘映射及亮度快捷键/SSDT-RMCF-MouseAsTrackpad.html"> SSDT-RMCF-MouseAsTrackpad.dsl </a> </li> <li class="chapter " data-level="1.9.3" data-path="../07-PS2键盘映射及亮度快捷键/SSDT-RMCF-PS2Map-AtoZ.html"> <a href="../07-PS2键盘映射及亮度快捷键/SSDT-RMCF-PS2Map-AtoZ.html"> SSDT-RMCF-PS2Map-AtoZ.dsl </a> </li> <li class="chapter " data-level="1.9.4" data-path="../07-PS2键盘映射及亮度快捷键/SSDT-RMCF-PS2Map-dell.html"> <a href="../07-PS2键盘映射及亮度快捷键/SSDT-RMCF-PS2Map-dell.html"> SSDT-RMCF-PS2Map-dell.dsl </a> </li> <li class="chapter " data-level="1.9.5" data-path="../07-PS2键盘映射及亮度快捷键/SSDT-RMCF-PS2Map-LenovoIWL.html"> <a href="../07-PS2键盘映射及亮度快捷键/SSDT-RMCF-PS2Map-LenovoIWL.html"> SSDT-RMCF-PS2Map-LenovoIWL.dsl </a> </li> </ul> </li> <li class="chapter " data-level="1.10" data-path="../08-电池补丁/"> <a href="../08-电池补丁/"> 08-电池补丁 </a> <ul class="articles"> <li class="chapter " data-level="1.10.1" data-path="../08-电池补丁/08-1-Thinkpad/"> <a href="../08-电池补丁/08-1-Thinkpad/"> 08-1-Thinkpad </a> <ul class="articles"> <li class="chapter " data-level="1.10.1.1" > <span> 各机型电池补丁 </span> <ul class="articles"> <li class="chapter " data-level="1.10.1.1.1" data-path="../08-电池补丁/08-1-Thinkpad/各机型电池补丁/SSDT-Notify-LPC.html"> <a href="../08-电池补丁/08-1-Thinkpad/各机型电池补丁/SSDT-Notify-LPC.html"> SSDT-Notify-LPC.dsl </a> </li> <li class="chapter " data-level="1.10.1.1.2" data-path="../08-电池补丁/08-1-Thinkpad/各机型电池补丁/SSDT-Notify-LPCB.html"> <a href="../08-电池补丁/08-1-Thinkpad/各机型电池补丁/SSDT-Notify-LPCB.html"> SSDT-Notify-LPCB.dsl </a> </li> <li class="chapter " data-level="1.10.1.1.3" data-path="../08-电池补丁/08-1-Thinkpad/各机型电池补丁/SSDT-OCBAT0-TP_e30_s30.html"> <a href="../08-电池补丁/08-1-Thinkpad/各机型电池补丁/SSDT-OCBAT0-TP_e30_s30.html"> SSDT-OCBAT0-TP_e30_s30.dsl </a> </li> <li class="chapter " data-level="1.10.1.1.4" data-path="../08-电池补丁/08-1-Thinkpad/各机型电池补丁/SSDT-OCBAT0-TP_re80_tx70_x1c5th_s12017_p51.html"> <a href="../08-电池补丁/08-1-Thinkpad/各机型电池补丁/SSDT-OCBAT0-TP_re80_tx70_x1c5th_s12017_p51.html"> SSDT-OCBAT0-TP_re80_tx70_x1c5th_s12017_p51.dsl </a> </li> <li class="chapter " data-level="1.10.1.1.5" data-path="../08-电池补丁/08-1-Thinkpad/各机型电池补丁/SSDT-OCBAT0-TP_tx80_x1c6th.html"> <a href="../08-电池补丁/08-1-Thinkpad/各机型电池补丁/SSDT-OCBAT0-TP_tx80_x1c6th.html"> SSDT-OCBAT0-TP_tx80_x1c6th.dsl </a> </li> <li class="chapter " data-level="1.10.1.1.6" data-path="../08-电池补丁/08-1-Thinkpad/各机型电池补丁/SSDT-OCBAT0-TP_wtx20-60_e40-70_x1c1th-3th.html"> <a href="../08-电池补丁/08-1-Thinkpad/各机型电池补丁/SSDT-OCBAT0-TP_wtx20-60_e40-70_x1c1th-3th.html"> SSDT-OCBAT0-TP_wtx20-60_e40-70_x1c1th-3th.dsl </a> </li> <li class="chapter " data-level="1.10.1.1.7" data-path="../08-电池补丁/08-1-Thinkpad/各机型电池补丁/SSDT-OCBAT1-disable-LPC.html"> <a href="../08-电池补丁/08-1-Thinkpad/各机型电池补丁/SSDT-OCBAT1-disable-LPC.html"> SSDT-OCBAT1-disable-LPC.dsl </a> </li> <li class="chapter " data-level="1.10.1.1.8" data-path="../08-电池补丁/08-1-Thinkpad/各机型电池补丁/SSDT-OCBAT1-disable-LPCB.html"> <a href="../08-电池补丁/08-1-Thinkpad/各机型电池补丁/SSDT-OCBAT1-disable-LPCB.html"> SSDT-OCBAT1-disable-LPCB.dsl </a> </li> <li class="chapter " data-level="1.10.1.1.9" data-path="../08-电池补丁/08-1-Thinkpad/各机型电池补丁/SSDT-OCBATC-TP-_BIX.html"> <a href="../08-电池补丁/08-1-Thinkpad/各机型电池补丁/SSDT-OCBATC-TP-_BIX.html"> SSDT-OCBATC-TP-_BIX.dsl </a> </li> <li class="chapter " data-level="1.10.1.1.10" data-path="../08-电池补丁/08-1-Thinkpad/各机型电池补丁/SSDT-OCBATC-TP-LPC.html"> <a href="../08-电池补丁/08-1-Thinkpad/各机型电池补丁/SSDT-OCBATC-TP-LPC.html"> SSDT-OCBATC-TP-LPC.dsl </a> </li> <li class="chapter " data-level="1.10.1.1.11" data-path="../08-电池补丁/08-1-Thinkpad/各机型电池补丁/SSDT-OCBATC-TP-LPCB.html"> <a href="../08-电池补丁/08-1-Thinkpad/各机型电池补丁/SSDT-OCBATC-TP-LPCB.html"> SSDT-OCBATC-TP-LPCB.dsl </a> </li> </ul> </li> <li class="chapter " data-level="1.10.1.2" > <span> 更名样本 </span> <ul class="articles"> <li class="chapter " data-level="1.10.1.2.1" data-path="../08-电池补丁/08-1-Thinkpad/更名样本/TP电池基本更名.html"> <a href="../08-电池补丁/08-1-Thinkpad/更名样本/TP电池基本更名.html"> TP电池基本更名.plist </a> </li> <li class="chapter " data-level="1.10.1.2.2" data-path="../08-电池补丁/08-1-Thinkpad/更名样本/TP电池Mutex置0更名.html"> <a href="../08-电池补丁/08-1-Thinkpad/更名样本/TP电池Mutex置0更名.html"> TP电池Mutex置0更名.plist </a> </li> <li class="chapter " data-level="1.10.1.2.3" data-path="../08-电池补丁/08-1-Thinkpad/更名样本/BAT1禁用更名_STA to XSTA.html"> <a href="../08-电池补丁/08-1-Thinkpad/更名样本/BAT1禁用更名_STA to XSTA.html"> BAT1禁用更名_STA to XSTA.plist </a> </li> <li class="chapter " data-level="1.10.1.2.4" data-path="../08-电池补丁/08-1-Thinkpad/更名样本/Notify更名.html"> <a href="../08-电池补丁/08-1-Thinkpad/更名样本/Notify更名.html"> Notify更名.plist </a> </li> </ul> </li> </ul> </li> <li class="chapter " data-level="1.10.2" > <span> 08-2-其它品牌 </span> <ul class="articles"> <li class="chapter " data-level="1.10.2.1" data-path="../08-电池补丁/08-2-其它品牌/SSDT-OCBAT0-ASUS_FL5900U.html"> <a href="../08-电池补丁/08-2-其它品牌/SSDT-OCBAT0-ASUS_FL5900U.html"> SSDT-OCBAT0-ASUS_FL5900U.dsl </a> </li> <li class="chapter " data-level="1.10.2.2" data-path="../08-电池补丁/08-2-其它品牌/SSDT-OCBAT0-HP_840_G3.html"> <a href="../08-电池补丁/08-2-其它品牌/SSDT-OCBAT0-HP_840_G3.html"> SSDT-OCBAT0-HP_840_G3.dsl </a> </li> <li class="chapter " data-level="1.10.2.3" data-path="../08-电池补丁/08-2-其它品牌/SSDT-OCBAT0-HP_Pavilion-15.html"> <a href="../08-电池补丁/08-2-其它品牌/SSDT-OCBAT0-HP_Pavilion-15.html"> SSDT-OCBAT0-HP_Pavilion-15.dsl </a> </li> <li class="chapter " data-level="1.10.2.4" data-path="../08-电池补丁/08-2-其它品牌/SSDT-OCBAT0-HP_Z66-14ProG2.html"> <a href="../08-电池补丁/08-2-其它品牌/SSDT-OCBAT0-HP_Z66-14ProG2.html"> SSDT-OCBAT0-HP_Z66-14ProG2.dsl </a> </li> <li class="chapter " data-level="1.10.2.5" data-path="../08-电池补丁/08-2-其它品牌/SSDT-OCBAT0-Thunderobot-Air2-911-9750h.html"> <a href="../08-电池补丁/08-2-其它品牌/SSDT-OCBAT0-Thunderobot-Air2-911-9750h.html"> SSDT-OCBAT0-Thunderobot-Air2-911-9750h.dsl </a> </li> <li class="chapter " data-level="1.10.2.6" data-path="../08-电池补丁/08-2-其它品牌/SSDT-OCBAT1-lenovoPRO13.html"> <a href="../08-电池补丁/08-2-其它品牌/SSDT-OCBAT1-lenovoPRO13.html"> SSDT-OCBAT1-lenovoPRO13.dsl </a> </li> </ul> </li> </ul> </li> <li class="chapter " data-level="1.11" data-path="../09-禁用EHCx/"> <a href="../09-禁用EHCx/"> 09-禁用EHCx </a> <ul class="articles"> <li class="chapter " data-level="1.11.1" data-path="../09-禁用EHCx/SSDT-EHC1_OFF.html"> <a href="../09-禁用EHCx/SSDT-EHC1_OFF.html"> SSDT-EHC1_OFF.dsl </a> </li> <li class="chapter " data-level="1.11.2" data-path="../09-禁用EHCx/SSDT-EHC2_OFF.html"> <a href="../09-禁用EHCx/SSDT-EHC2_OFF.html"> SSDT-EHC2_OFF.dsl </a> </li> <li class="chapter " data-level="1.11.3" data-path="../09-禁用EHCx/SSDT-EHCx_OFF.html"> <a href="../09-禁用EHCx/SSDT-EHCx_OFF.html"> SSDT-EHCx_OFF.dsl </a> </li> </ul> </li> <li class="chapter " data-level="1.12" data-path="../10-PTSWAK综合扩展补丁/"> <a href="../10-PTSWAK综合扩展补丁/"> 10-PTSWAK综合扩展补丁 </a> <ul class="articles"> <li class="chapter " data-level="1.12.1" data-path="../10-PTSWAK综合扩展补丁/SSDT-EXT3-LedReset-TP.md"> <span> SSDT-EXT3-LedReset-TP.dsl </a> </li> <li class="chapter " data-level="1.12.2" data-path="../10-PTSWAK综合扩展补丁/SSDT-EXT4-WakeScreen.html"> <a href="../10-PTSWAK综合扩展补丁/SSDT-EXT4-WakeScreen.html"> SSDT-EXT4-WakeScreen.dsl </a> </li> <li class="chapter " data-level="1.12.3" data-path="../10-PTSWAK综合扩展补丁/SSDT-PTSWAK.md"> <span> SSDT-PTSWAK.dsl </a> </li> <li class="chapter " data-level="1.12.4" data-path="../10-PTSWAK综合扩展补丁/综合补丁更名.html"> <a href="../10-PTSWAK综合扩展补丁/综合补丁更名.html"> 综合补丁更名.plist </a> </li> </ul> </li> <li class="chapter " data-level="1.13" data-path="./"> <a href="./"> 11-PNP0C0E睡眠修正方法 </a> <ul class="articles"> <li class="chapter " data-level="1.13.1" data-path="SSDT-FnF4_Q13-X1C5th.html"> <a href="SSDT-FnF4_Q13-X1C5th.html"> SSDT-FnF4_Q13-X1C5th.dsl </a> </li> <li class="chapter " data-level="1.13.2" data-path="SSDT-FnInsert_BTNV-dell.html"> <a href="SSDT-FnInsert_BTNV-dell.html"> SSDT-FnInsert_BTNV-dell.dsl </a> </li> <li class="chapter " data-level="1.13.3" data-path="SSDT-LIDpatch.html"> <a href="SSDT-LIDpatch.html"> SSDT-LIDpatch.dsl </a> </li> <li class="chapter active" data-level="1.13.4" data-path="睡眠按键和_LID更名.html"> <a href="睡眠按键和_LID更名.html"> 睡眠按键和_LID更名.plist </a> </li> </ul> </li> <li class="chapter " data-level="1.14" data-path="../12-060D补丁/"> <a href="../12-060D补丁/"> 12-060D补丁 </a> <ul class="articles"> <li class="chapter " data-level="1.14.1" data-path="../12-060D补丁/12-1-普通的060D补丁/"> <a href="../12-060D补丁/12-1-普通的060D补丁/"> 12-1-普通的060D补丁 </a> <ul class="articles"> <li class="chapter " data-level="1.14.1.1" data-path="../12-060D补丁/12-1-普通的060D补丁/SSDT-GPRW.html"> <a href="../12-060D补丁/12-1-普通的060D补丁/SSDT-GPRW.html"> SSDT-GPRW.dsl </a> </li> <li class="chapter " data-level="1.14.1.2" data-path="../12-060D补丁/12-1-普通的060D补丁/SSDT-UPRW.html"> <a href="../12-060D补丁/12-1-普通的060D补丁/SSDT-UPRW.html"> SSDT-UPRW.dsl </a> </li> <li class="chapter " data-level="1.14.1.3" data-path="../12-060D补丁/12-1-普通的060D补丁/Name-0D更名.html"> <a href="../12-060D补丁/12-1-普通的060D补丁/Name-0D更名.html"> Name-0D更名.plist </a> </li> <li class="chapter " data-level="1.14.1.4" data-path="../12-060D补丁/12-1-普通的060D补丁/Name-6D更名.html"> <a href="../12-060D补丁/12-1-普通的060D补丁/Name-6D更名.html"> Name-6D更名.plist </a> </li> </ul> </li> <li class="chapter " data-level="1.14.2" data-path="../12-060D补丁/12-2-惠普特殊的060D补丁/"> <a href="../12-060D补丁/12-2-惠普特殊的060D补丁/"> 12-2-惠普特殊的060D补丁 </a> <ul class="articles"> <li class="chapter " data-level="1.14.2.1" data-path="../12-060D补丁/12-2-惠普特殊的060D补丁/SSDT-0D6D-HP.html"> <a href="../12-060D补丁/12-2-惠普特殊的060D补丁/SSDT-0D6D-HP.html"> SSDT-0D6D-HP.dsl </a> </li> </ul> </li> </ul> </li> <li class="chapter " data-level="1.15" data-path="../13-仿冒以太网和重置以太网BSD Name/"> <a href="../13-仿冒以太网和重置以太网BSD Name/"> 13-仿冒以太网和重置以太网BSD Name </a> <ul class="articles"> <li class="chapter " data-level="1.15.1" data-path="../13-仿冒以太网和重置以太网BSD Name/SSDT-LAN.html"> <a href="../13-仿冒以太网和重置以太网BSD Name/SSDT-LAN.html"> SSDT-LAN.dsl </a> </li> <li class="chapter " data-level="1.15.2" data-path="../13-仿冒以太网和重置以太网BSD Name/清除所有网络.md"> <span> 清除所有网络 </a> </li> </ul> </li> <li class="chapter " data-level="1.16" data-path="../14-CMOS相关/"> <a href="../14-CMOS相关/"> 14-CMOS相关 </a> <ul class="articles"> <li class="chapter " data-level="1.16.1" data-path="../14-CMOS相关/14-1-CMOS内存和RTCMemoryFixup/"> <a href="../14-CMOS相关/14-1-CMOS内存和RTCMemoryFixup/"> 14-1-CMOS内存和RTCMemoryFixup </a> </li> </ul> </li> <li class="chapter " data-level="1.17" data-path="../15-ACPI定制USB端口/"> <a href="../15-ACPI定制USB端口/"> 15-ACPI定制USB端口 </a> <ul class="articles"> <li class="chapter " data-level="1.17.1" data-path="../15-ACPI定制USB端口/SSDT-CB-01_XHC.html"> <a href="../15-ACPI定制USB端口/SSDT-CB-01_XHC.html"> SSDT-CB-01_XHC.dsl </a> </li> <li class="chapter " data-level="1.17.2" data-path="../15-ACPI定制USB端口/SSDT-xh_OEMBD_XHC.html"> <a href="../15-ACPI定制USB端口/SSDT-xh_OEMBD_XHC.html"> SSDT-xh_OEMBD_XHC.dsl </a> </li> </ul> </li> <li class="chapter " data-level="1.18" data-path="../16-禁止PCI设备/"> <a href="../16-禁止PCI设备/"> 16-禁止PCI设备 </a> <ul class="articles"> <li class="chapter " data-level="1.18.1" data-path="../16-禁止PCI设备/SSDT-RP01.PXSX-disbale.html"> <a href="../16-禁止PCI设备/SSDT-RP01.PXSX-disbale.html"> SSDT-RP01.PXSX-disbale.dsl </a> </li> </ul> </li> <li class="chapter " data-level="1.19" data-path="../17-ACPIDebug/"> <a href="../17-ACPIDebug/"> 17-ACPIDebug </a> <ul class="articles"> <li class="chapter " data-level="1.19.1" data-path="../17-ACPIDebug/SSDT-BKeyQxx-Debug.html"> <a href="../17-ACPIDebug/SSDT-BKeyQxx-Debug.html"> SSDT-BKeyQxx-Debug.dsl </a> </li> <li class="chapter " data-level="1.19.2" data-path="../17-ACPIDebug/SSDT-RMDT.html"> <a href="../17-ACPIDebug/SSDT-RMDT.html"> SSDT-RMDT.dsl </a> </li> </ul> </li> <li class="chapter " data-level="1.20" data-path="../18-品牌机器特殊补丁/"> <a href="../18-品牌机器特殊补丁/"> 18-品牌机器特殊补丁 </a> <ul class="articles"> <li class="chapter " data-level="1.20.1" data-path="../18-品牌机器特殊补丁/18-1-Dell机器特殊补丁/"> <a href="../18-品牌机器特殊补丁/18-1-Dell机器特殊补丁/"> 18-1-Dell机器特殊补丁 </a> <ul class="articles"> <li class="chapter " data-level="1.20.1.1" data-path="../18-品牌机器特殊补丁/18-1-Dell机器特殊补丁/SSDT-OCWork-dell.html"> <a href="../18-品牌机器特殊补丁/18-1-Dell机器特殊补丁/SSDT-OCWork-dell.html"> SSDT-OCWork-dell.dsl </a> </li> </ul> </li> <li class="chapter " data-level="1.20.2" data-path="../18-品牌机器特殊补丁/18-2-小新PRO13特殊补丁/"> <a href="../18-品牌机器特殊补丁/18-2-小新PRO13特殊补丁/"> 18-2-小新PRO13特殊补丁 </a> <ul class="articles"> <li class="chapter " data-level="1.20.2.1" data-path="../18-品牌机器特殊补丁/18-1-Dell机器特殊补丁/SSDT-OCPublic-Merge.md"> <span> SSDT-OCPublic-Merge.dsl </a> </li> <li class="chapter " data-level="1.20.2.2" data-path="../18-品牌机器特殊补丁/18-1-Dell机器特殊补丁/SSDT-RMCF-PS2Map-LenovoPRO13.md"> <span> SSDT-RMCF-PS2Map-LenovoPRO13.dsl </a> </li> </ul> </li> </ul> </li> <li class="chapter " data-level="1.21" data-path="../19-I2C专用部件/"> <a href="../19-I2C专用部件/"> 19-I2C专用部件 </a> <ul class="articles"> <li class="chapter " data-level="1.21.1" data-path="../19-I2C专用部件/SSDT-OCI2C-TPXX-chao7000.html"> <a href="../19-I2C专用部件/SSDT-OCI2C-TPXX-chao7000.html"> SSDT-OCI2C-TPXX-chao7000.dsl </a> </li> <li class="chapter " data-level="1.21.2" data-path="../19-I2C专用部件/SSDT-OCI2C-TPXX-dell5480.html"> <a href="../19-I2C专用部件/SSDT-OCI2C-TPXX-dell5480.html"> SSDT-OCI2C-TPXX-dell5480.dsl </a> </li> <li class="chapter " data-level="1.21.3" data-path="../19-I2C专用部件/SSDT-OCI2C-TPXX-LenovoIWL.html"> <a href="../19-I2C专用部件/SSDT-OCI2C-TPXX-LenovoIWL.html"> SSDT-OCI2C-TPXX-LenovoIWL.dsl </a> </li> <li class="chapter " data-level="1.21.4" data-path="../19-I2C专用部件/SSDT-OCI2C-TPXX-lenovoPRO13.html"> <a href="../19-I2C专用部件/SSDT-OCI2C-TPXX-lenovoPRO13.html"> SSDT-OCI2C-TPXX-lenovoPRO13.dsl </a> </li> <li class="chapter " data-level="1.21.5" data-path="../19-I2C专用部件/SSDT-OCGPI0-GPEN.html"> <a href="../19-I2C专用部件/SSDT-OCGPI0-GPEN.html"> SSDT-OCGPI0-GPEN.dsl </a> </li> <li class="chapter " data-level="1.21.6" data-path="../19-I2C专用部件/SSDT-I2CxConf.html"> <a href="../19-I2C专用部件/SSDT-I2CxConf.html"> SSDT-I2CxConf.dsl </a> </li> <li class="chapter " data-level="1.21.7" data-path="../19-I2C专用部件/SSDT-OCGPI0-GPHD.html"> <a href="../19-I2C专用部件/SSDT-OCGPI0-GPHD.html"> SSDT-OCGPI0-GPHD.dsl </a> </li> </ul> </li> <li class="chapter " data-level="1.22" data-path="../20-SSDT屏蔽独显方法/"> <a href="../20-SSDT屏蔽独显方法/"> 20-SSDT屏蔽独显方法 </a> <ul class="articles"> <li class="chapter " data-level="1.22.1" data-path="../20-SSDT屏蔽独显方法/SSDT-NDGP_OFF.html"> <a href="../20-SSDT屏蔽独显方法/SSDT-NDGP_OFF.html"> SSDT-NDGP_OFF.dsl </a> </li> <li class="chapter " data-level="1.22.2" data-path="../20-SSDT屏蔽独显方法/SSDT-NDGP_PS3.html"> <a href="../20-SSDT屏蔽独显方法/SSDT-NDGP_PS3.html"> SSDT-NDGP_PS3.dsl </a> </li> </ul> </li> <li class="chapter " data-level="1.23" data-path="../保留部件/"> <a href="../保留部件/"> 保留部件 </a> <ul class="articles"> <li class="chapter " data-level="1.23.1" data-path="../保留部件/声卡IRQ补丁/"> <a href="../保留部件/声卡IRQ补丁/"> 声卡IRQ补丁 </a> <ul class="articles"> <li class="chapter " data-level="1.23.1.1" data-path="../保留部件/声卡IRQ补丁/SSDT-HPET_RTC_TIMR-fix.html"> <a href="../保留部件/声卡IRQ补丁/SSDT-HPET_RTC_TIMR-fix.html"> SSDT-HPET_RTC_TIMR-fix.dsl </a> </li> <li class="chapter " data-level="1.23.1.2" data-path="../保留部件/声卡IRQ补丁/SSDT-IPIC.html"> <a href="../保留部件/声卡IRQ补丁/SSDT-IPIC.html"> SSDT-IPIC.dsl </a> </li> </ul> </li> <li class="chapter " data-level="1.23.2" data-path="../保留部件/CMOS重置补丁/"> <a href="../保留部件/CMOS重置补丁/"> CMOS重置补丁 </a> <ul class="articles"> <li class="chapter " data-level="1.23.2.1" data-path="../保留部件/CMOS重置补丁/SSDT-RTC0-NoFlags.html"> <a href="../保留部件/CMOS重置补丁/SSDT-RTC0-NoFlags.html"> SSDT-RTC0-NoFlags.dsl </a> </li> </ul> </li> </ul> </li> <li class="chapter " data-level="1.24" data-path="../常见驱动加载顺序/"> <a href="../常见驱动加载顺序/"> 常见驱动加载顺序 </a> <ul class="articles"> <li class="chapter " data-level="1.24.1" data-path="../常见驱动加载顺序/config-1-Lilu-SMC-WEG-ALC驱动列表.html"> <a href="../常见驱动加载顺序/config-1-Lilu-SMC-WEG-ALC驱动列表.html"> config-1-Lilu-SMC-WEG-ALC驱动列表.plist </a> </li> <li class="chapter " data-level="1.24.2" data-path="../常见驱动加载顺序/config-2-PS2键盘驱动列表.html"> <a href="../常见驱动加载顺序/config-2-PS2键盘驱动列表.html"> config-2-PS2键盘驱动列表.plist </a> </li> <li class="chapter " data-level="1.24.3" data-path="../常见驱动加载顺序/config-3-BCM无线和蓝牙驱动列表.html"> <a href="../常见驱动加载顺序/config-3-BCM无线和蓝牙驱动列表.html"> config-3-BCM无线和蓝牙驱动列表.plist </a> </li> <li class="chapter " data-level="1.24.4" data-path="../常见驱动加载顺序/config-4-I2C驱动列表.html"> <a href="../常见驱动加载顺序/config-4-I2C驱动列表.html"> config-4-I2C驱动列表.plist </a> </li> <li class="chapter " data-level="1.24.5" data-path="../常见驱动加载顺序/config-5-PS2Smart键盘驱动列表.html"> <a href="../常见驱动加载顺序/config-5-PS2Smart键盘驱动列表.html"> config-5-PS2Smart键盘驱动列表.plist </a> </li> <li class="chapter " data-level="1.24.6" data-path="../常见驱动加载顺序/config-6-Intel无线和蓝牙驱动列表.html"> <a href="../常见驱动加载顺序/config-6-Intel无线和蓝牙驱动列表.html"> config-6-Intel无线和蓝牙驱动列表.plist </a> </li> </ul> </li> <li class="divider"></li> <li> <a href="https://www.gitbook.com" target="blank" class="gitbook-link"> Published with GitBook </a> </li> </ul> </nav> </div> <div class="book-body"> <div class="body-inner"> <div class="book-header" role="navigation"> <!-- Title --> <h1> <i class="fa fa-circle-o-notch fa-spin"></i> <a href=".." >睡眠按键和_LID更名.plist</a> </h1> </div> <div class="page-wrapper" tabindex="-1" role="main"> <div class="page-inner"> <div id="book-search-results"> <div class="search-noresults"> <section class="normal markdown-section"> <pre><code class="lang-properties">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt; &lt;plist version=&quot;1.0&quot;&gt; &lt;dict&gt; &lt;key&gt;ACPI&lt;/key&gt; &lt;dict&gt; &lt;key&gt;Patch&lt;/key&gt; &lt;array&gt; &lt;dict&gt; &lt;key&gt;Comment&lt;/key&gt; &lt;string&gt;_LID to XLID&lt;/string&gt; &lt;key&gt;Count&lt;/key&gt; &lt;integer&gt;0&lt;/integer&gt; &lt;key&gt;Enabled&lt;/key&gt; &lt;true/&gt; &lt;key&gt;Find&lt;/key&gt; &lt;data&gt; X0xJRAA= &lt;/data&gt; &lt;key&gt;Limit&lt;/key&gt; &lt;integer&gt;0&lt;/integer&gt; &lt;key&gt;Mask&lt;/key&gt; &lt;data&gt; &lt;/data&gt; &lt;key&gt;OemTableId&lt;/key&gt; &lt;data&gt; &lt;/data&gt; &lt;key&gt;Replace&lt;/key&gt; &lt;data&gt; WExJRAA= &lt;/data&gt; &lt;key&gt;ReplaceMask&lt;/key&gt; &lt;data&gt; &lt;/data&gt; &lt;key&gt;Skip&lt;/key&gt; &lt;integer&gt;0&lt;/integer&gt; &lt;key&gt;TableLength&lt;/key&gt; &lt;integer&gt;0&lt;/integer&gt; &lt;key&gt;TableSignature&lt;/key&gt; &lt;data&gt; &lt;/data&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;Comment&lt;/key&gt; &lt;string&gt;BTNV to XTNV(dell-Fn+Insert)&lt;/string&gt; &lt;key&gt;Count&lt;/key&gt; &lt;integer&gt;0&lt;/integer&gt; &lt;key&gt;Enabled&lt;/key&gt; &lt;true/&gt; &lt;key&gt;Find&lt;/key&gt; &lt;data&gt; QlROVgI= &lt;/data&gt; &lt;key&gt;Limit&lt;/key&gt; &lt;integer&gt;0&lt;/integer&gt; &lt;key&gt;Mask&lt;/key&gt; &lt;data&gt; &lt;/data&gt; &lt;key&gt;OemTableId&lt;/key&gt; &lt;data&gt; &lt;/data&gt; &lt;key&gt;Replace&lt;/key&gt; &lt;data&gt; WFROVgI= &lt;/data&gt; &lt;key&gt;ReplaceMask&lt;/key&gt; &lt;data&gt; &lt;/data&gt; &lt;key&gt;Skip&lt;/key&gt; &lt;integer&gt;0&lt;/integer&gt; &lt;key&gt;TableLength&lt;/key&gt; &lt;integer&gt;0&lt;/integer&gt; &lt;key&gt;TableSignature&lt;/key&gt; &lt;data&gt; &lt;/data&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;Comment&lt;/key&gt; &lt;string&gt;_Q13 to XQ13(TP-Fn+F4)&lt;/string&gt; &lt;key&gt;Count&lt;/key&gt; &lt;integer&gt;0&lt;/integer&gt; &lt;key&gt;Enabled&lt;/key&gt; &lt;true/&gt; &lt;key&gt;Find&lt;/key&gt; &lt;data&gt; X1ExMw== &lt;/data&gt; &lt;key&gt;Limit&lt;/key&gt; &lt;integer&gt;0&lt;/integer&gt; &lt;key&gt;Mask&lt;/key&gt; &lt;data&gt; &lt;/data&gt; &lt;key&gt;OemTableId&lt;/key&gt; &lt;data&gt; &lt;/data&gt; &lt;key&gt;Replace&lt;/key&gt; &lt;data&gt; WFExMw== &lt;/data&gt; &lt;key&gt;ReplaceMask&lt;/key&gt; &lt;data&gt; &lt;/data&gt; &lt;key&gt;Skip&lt;/key&gt; &lt;integer&gt;0&lt;/integer&gt; &lt;key&gt;TableLength&lt;/key&gt; &lt;integer&gt;0&lt;/integer&gt; &lt;key&gt;TableSignature&lt;/key&gt; &lt;data&gt; &lt;/data&gt; &lt;/dict&gt; &lt;/array&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;/plist&gt; </code></pre> </section> </div> <div class="search-results"> <div class="has-results"> <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1> <ul class="search-results-list"></ul> </div> <div class="no-results"> <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1> </div> </div> </div> </div> </div> </div> <a href="SSDT-LIDpatch.html" class="navigation navigation-prev " aria-label="Previous page: SSDT-LIDpatch.dsl"> <i class="fa fa-angle-left"></i> </a> <a href="../12-060D补丁/" class="navigation navigation-next " aria-label="Next page: 12-060D补丁"> <i class="fa fa-angle-right"></i> </a> </div> <script> var gitbook = gitbook || []; gitbook.push(function() { gitbook.page.hasChanged({"page":{"title":"睡眠按键和_LID更名.plist","level":"1.13.4","depth":2,"next":{"title":"12-060D补丁","level":"1.14","depth":1,"path":"12-060D补丁/README.md","ref":"12-060D补丁/README.md","articles":[{"title":"12-1-普通的060D补丁","level":"1.14.1","depth":2,"path":"12-060D补丁/12-1-普通的060D补丁/README.md","ref":"12-060D补丁/12-1-普通的060D补丁/README.md","articles":[{"title":"SSDT-GPRW.dsl","level":"1.14.1.1","depth":3,"path":"12-060D补丁/12-1-普通的060D补丁/SSDT-GPRW.md","ref":"12-060D补丁/12-1-普通的060D补丁/SSDT-GPRW.md","articles":[]},{"title":"SSDT-UPRW.dsl","level":"1.14.1.2","depth":3,"path":"12-060D补丁/12-1-普通的060D补丁/SSDT-UPRW.md","ref":"12-060D补丁/12-1-普通的060D补丁/SSDT-UPRW.md","articles":[]},{"title":"Name-0D更名.plist","level":"1.14.1.3","depth":3,"path":"12-060D补丁/12-1-普通的060D补丁/Name-0D更名.md","ref":"12-060D补丁/12-1-普通的060D补丁/Name-0D更名.md","articles":[]},{"title":"Name-6D更名.plist","level":"1.14.1.4","depth":3,"path":"12-060D补丁/12-1-普通的060D补丁/Name-6D更名.md","ref":"12-060D补丁/12-1-普通的060D补丁/Name-6D更名.md","articles":[]}]},{"title":"12-2-惠普特殊的060D补丁","level":"1.14.2","depth":2,"path":"12-060D补丁/12-2-惠普特殊的060D补丁/README.md","ref":"12-060D补丁/12-2-惠普特殊的060D补丁/README.md","articles":[{"title":"SSDT-0D6D-HP.dsl","level":"1.14.2.1","depth":3,"path":"12-060D补丁/12-2-惠普特殊的060D补丁/SSDT-0D6D-HP.md","ref":"12-060D补丁/12-2-惠普特殊的060D补丁/SSDT-0D6D-HP.md","articles":[]}]}]},"previous":{"title":"SSDT-LIDpatch.dsl","level":"1.13.3","depth":2,"path":"11-PNP0C0E睡眠修正方法/SSDT-LIDpatch.md","ref":"11-PNP0C0E睡眠修正方法/SSDT-LIDpatch.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"11-PNP0C0E睡眠修正方法/睡眠按键和_LID更名.md","mtime":"2020-09-19T06:09:20.607Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-09-19T06:10:45.526Z"},"basePath":"..","book":{"language":""}}); }); </script> </div> <script src="../gitbook/gitbook.js"></script> <script src="../gitbook/theme.js"></script> <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script> <script src="../gitbook/gitbook-plugin-search/search.js"></script> <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script> <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script> <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script> <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script> </body> </html>
{ "pile_set_name": "Github" }
/* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "GrPathRenderer.h" GrPathRenderer::GrPathRenderer() : fPath(NULL) , fTarget(NULL) { } void GrPathRenderer::setPath(GrDrawTarget* target, const SkPath* path, GrPathFill fill, bool antiAlias, const GrPoint* translate) { GrAssert(NULL == fPath); GrAssert(NULL == fTarget); GrAssert(NULL != target); fTarget = target; fPath = path; fFill = fill; fAntiAlias = antiAlias; if (NULL != translate) { fTranslate = *translate; } else { fTranslate.fX = fTranslate.fY = 0; } this->pathWasSet(); } void GrPathRenderer::clearPath() { this->pathWillClear(); fTarget->resetVertexSource(); fTarget->resetIndexSource(); fTarget = NULL; fPath = NULL; }
{ "pile_set_name": "Github" }
package com.waylau.spring.cloud.weather.service; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; /** * HelloController Test. * * @since 1.0.0 2017年9月27日 * @author <a href="https://waylau.com">Way Lau</a> */ @RunWith(SpringRunner.class) @SpringBootTest public class CityDataServiceTest { @Autowired private CityDataService cityDataServiceImpl; @Test public void testListCity() throws Exception { cityDataServiceImpl.listCity(); } }
{ "pile_set_name": "Github" }
<?php declare(strict_types = 1); /* * Copyright 2012-2019 Damien Seguy – Exakat SAS <contact(at)exakat.io> * This file is part of Exakat. * * Exakat is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Exakat is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Exakat. If not, see <http://www.gnu.org/licenses/>. * * The latest code can be found at <http://exakat.io/>. * */ namespace Exakat\Analyzer\Extensions; use Exakat\Analyzer\Common\Extension; class Exticonv extends Extension { public function analyze(): void { $this->source = 'iconv.ini'; parent::analyze(); } } ?>
{ "pile_set_name": "Github" }
{{ ? _ : _ ? _ : _ ]}
{ "pile_set_name": "Github" }
:shadowd-listen "127.0.0.1:60002" tests:ensure :shadowd -G --no-confirm --length 100 a/b/c/d '<<<' 'password' tests:ensure curl -k "https://127.0.0.1:60002/t/a/b/c/d" tests:assert-stdout-re '^.{63}$' tests:value secret cat $(tests:get-stdout-file) tests:describe "secret: $secret" tests:ensure curl -k "https://127.0.0.1:60002/t/a/b/c/d" tests:not tests:assert-stdout "$secret" tests:value stub cat $(tests:get-stdout-file) tests:ensure curl -k "https://127.0.0.1:60002/t/a/b/c/d" tests:assert-no-diff stdout <<< "$stub"
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8" ?> <ContentPage x:Class="EssentialUIKit.Views.Profile.MasterPage" xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:border="clr-namespace:Syncfusion.XForms.Border;assembly=Syncfusion.Core.XForms" xmlns:helper="clr-namespace:EssentialUIKit.Helpers" xmlns:viewModel="clr-namespace:EssentialUIKit.ViewModels.Profile" BackgroundColor="{DynamicResource Gray-White}" NavigationPage.HasNavigationBar="False"> <ContentPage.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Styles.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </ContentPage.Resources> <ContentPage.BindingContext> <viewModel:MasterPageViewModel /> </ContentPage.BindingContext> <ContentPage.Content> <ScrollView> <StackLayout Spacing="0"> <!-- profile view --> <Grid Padding="16,24,16,8" BackgroundColor="{DynamicResource Gray-White}" ColumnSpacing="8" RowSpacing="2"> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <!-- Rounded Profile Image --> <border:SfBorder Grid.RowSpan="2" Style="{StaticResource ProfileBorderStyle}"> <Image BackgroundColor="{DynamicResource Gray-200}" HeightRequest="48" WidthRequest="48"> <Image.Source> <UriImageSource CacheValidity="14" CachingEnabled="true" Uri="{Binding ProfileImage}" /> </Image.Source> </Image> </border:SfBorder> <!-- Profile Name --> <Label Grid.Column="1" Margin="0,4,0,0" FontFamily="{StaticResource Montserrat-SemiBold}" FontSize="14" HorizontalOptions="Start" LineBreakMode="TailTruncation" LineHeight="{OnPlatform Default=-1, Android=1.25}" MaxLines="2" Text="{Binding ProfileName}" TextColor="{DynamicResource Gray-900}" /> <!-- Email --> <Label Grid.Row="1" Grid.Column="1" FontFamily="{StaticResource Montserrat-Medium}" FontSize="12" HorizontalOptions="Start" LineBreakMode="TailTruncation" LineHeight="{OnPlatform Default=-1, Android=1.25}" MaxLines="2" Text="{Binding Email}" TextColor="{DynamicResource Gray-700}" /> </Grid> <BoxView Margin="0,0,0,8" Style="{StaticResource SeparatorStyle}" /> <!-- Grid for home label and icon --> <Grid x:Name="HomeGrid" BackgroundColor="{DynamicResource Gray-White}"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <Label Grid.Column="0" helper:RTLHelper.Margin="16, 0, 8, 0" Style="{StaticResource ProfileIconLabelStyle}" Text="{StaticResource Home}" TextColor="{DynamicResource PrimaryColor}" /> <Label Grid.Column="1" Margin="0,14" FontFamily="{StaticResource Montserrat-SemiBold}" FontSize="14" Style="{StaticResource ProfileLabelStyle}" Text="Home" TextColor="{DynamicResource PrimaryColor}" /> <Grid.GestureRecognizers> <TapGestureRecognizer Command="{Binding HomeCommand}" CommandParameter="{x:Reference HomeGrid}" /> </Grid.GestureRecognizers> </Grid> <BoxView Style="{StaticResource SeparatorStyle}" /> <!-- Grid for interests label and icon --> <Grid x:Name="InterestsGrid" BackgroundColor="{DynamicResource Gray-White}"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <Label Grid.Column="0" helper:RTLHelper.Margin="16, 0, 8, 0" Style="{StaticResource ProfileIconLabelStyle}" Text="{StaticResource Interests}" /> <Label Grid.Column="1" Margin="0,14" FontFamily="{StaticResource Montserrat-SemiBold}" FontSize="14" Style="{StaticResource ProfileLabelStyle}" Text="Interests" /> <Grid.GestureRecognizers> <TapGestureRecognizer Command="{Binding InterestsCommand}" CommandParameter="{x:Reference InterestsGrid}" /> </Grid.GestureRecognizers> </Grid> <BoxView Style="{StaticResource SeparatorStyle}" /> <!-- Grid for bookmark label and icon --> <Grid x:Name="BookmarkGrid" BackgroundColor="{DynamicResource Gray-White}"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <Label Grid.Column="0" helper:RTLHelper.Margin="16, 0, 8, 0" Style="{StaticResource ProfileIconLabelStyle}" Text="{StaticResource ClearBookmark}" /> <Label Grid.Column="1" Margin="0,14" FontFamily="{StaticResource Montserrat-SemiBold}" FontSize="14" Style="{StaticResource ProfileLabelStyle}" Text="Bookmarks" /> <Grid.GestureRecognizers> <TapGestureRecognizer Command="{Binding BookmarkCommand}" CommandParameter="{x:Reference BookmarkGrid}" /> </Grid.GestureRecognizers> </Grid> <BoxView Style="{StaticResource SeparatorStyle}" /> <!-- Grid for activity label and icon --> <Grid x:Name="ActivityGrid" BackgroundColor="{DynamicResource Gray-White}"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <Label Grid.Column="0" helper:RTLHelper.Margin="16, 0, 8, 0" Style="{StaticResource ProfileIconLabelStyle}" Text="{StaticResource Activity}" /> <Label Grid.Column="1" Margin="0,14" FontFamily="{StaticResource Montserrat-SemiBold}" FontSize="14" Style="{StaticResource ProfileLabelStyle}" Text="Activity" /> <Grid.GestureRecognizers> <TapGestureRecognizer Command="{Binding ActivityCommand}" CommandParameter="{x:Reference ActivityGrid}" /> </Grid.GestureRecognizers> </Grid> <BoxView Style="{StaticResource SeparatorStyle}" /> <!-- Grid for profile label and icon --> <Grid x:Name="ProfileGrid" BackgroundColor="{DynamicResource Gray-White}"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <Label Grid.Column="0" helper:RTLHelper.Margin="16, 0, 8, 0" Style="{StaticResource ProfileIconLabelStyle}" Text="{StaticResource Profile}" /> <Label Grid.Column="1" Margin="0,14" FontFamily="{StaticResource Montserrat-SemiBold}" FontSize="14" Style="{StaticResource ProfileLabelStyle}" Text="Profile" /> <Grid.GestureRecognizers> <TapGestureRecognizer Command="{Binding ProfileCommand}" CommandParameter="{x:Reference ProfileGrid}" /> </Grid.GestureRecognizers> </Grid> <BoxView Style="{StaticResource SeparatorStyle}" /> </StackLayout> </ScrollView> </ContentPage.Content> </ContentPage>
{ "pile_set_name": "Github" }
<div id="content-history-layer" class="history-layer"> <div class="history-layer-content"> <div class="history-layer-layout"> <div class="history-layer-panel-1 hidden-xs"> <div id="history-layer-slider" class="history-layer-slider"></div> </div> <div class="history-layer-panel-2"> <div class="row"> <div class="col-lg-6 text-center hidden-xs hidden-sm hidden-md"> <div class="btn-group history-select-group"> <div class="rex-select-style"><?= $this->getVar('content1select'); ?></div> </div> </div> <div class="col-lg-6 text-center"> <div class="btn-group history-select-group"> <button class="btn btn-default" data-history-layer="prev"><i class="fa fa-chevron-left" aria-hidden="true"></i></button> <div class="rex-select-style"><?= $this->getVar('content2select'); ?></div> <button class="btn btn-default" data-history-layer="next"><i class="fa fa-chevron-right" aria-hidden="true"></i></button> </div> </div> </div> </div> <div class="history-layer-panel-3"> <div class="row"> <div class="col-lg-6 hidden-xs hidden-sm hidden-md"> <div class="history-responsive-container"> <?= $this->getVar('content1iframe'); ?> </div> </div> <div class="col-lg-6"> <div class="history-responsive-container"> <?= $this->getVar('content2iframe'); ?> </div> </div> </div> </div> <div class="history-layer-panel-4"> <div class="row"> <div class="col-lg-6 col-lg-push-6 text-center"> <button class="btn btn-apply" data-history-layer="snap"><?= rex_i18n::msg('structure_history_snapshot_reactivate'); ?></button> <button class="btn btn-abort" data-history-layer="cancel"><?= rex_i18n::msg('structure_history_close'); ?></button> </div> </div> </div> </div> </div> <div class="history-layer-background"></div> </div>
{ "pile_set_name": "Github" }
Topologies: Sub-topology: 0 Source: KSTREAM-SOURCE-0000000000 (topics: [test_topic]) --> KSTREAM-TRANSFORMVALUES-0000000001 Processor: KSTREAM-TRANSFORMVALUES-0000000001 (stores: []) --> Project <-- KSTREAM-SOURCE-0000000000 Processor: Project (stores: []) --> KSTREAM-SINK-0000000003 <-- KSTREAM-TRANSFORMVALUES-0000000001 Sink: KSTREAM-SINK-0000000003 (topic: TS) <-- Project
{ "pile_set_name": "Github" }
/* * Copyright (C) 2007-2010 Júlio Vilmar Gesser. * Copyright (C) 2011, 2013-2016 The JavaParser Team. * * This file is part of JavaParser. * * JavaParser can be used either under the terms of * a) 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. * b) the terms of the Apache License * * You should have received a copy of both licenses in LICENCE.LGPL and * LICENCE.APACHE. Please refer to those files for details. * * JavaParser is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. */ package com.github.javaparser.ast.stmt; import com.github.javaparser.Range; import com.github.javaparser.ast.Modifier; import com.github.javaparser.ast.Node; import com.github.javaparser.ast.body.Parameter; import com.github.javaparser.ast.body.VariableDeclaratorId; import com.github.javaparser.ast.expr.AnnotationExpr; import com.github.javaparser.ast.nodeTypes.NodeWithBlockStmt; import com.github.javaparser.ast.type.ReferenceType; import com.github.javaparser.ast.type.Type; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; import java.util.EnumSet; import java.util.List; /** * @author Julio Vilmar Gesser */ public final class CatchClause extends Node implements NodeWithBlockStmt<CatchClause> { private Parameter param; private BlockStmt catchBlock; public CatchClause() { } public CatchClause(final Parameter param, final BlockStmt catchBlock) { setParam(param); setBody(catchBlock); } public CatchClause(final Range range, final EnumSet<Modifier> exceptModifier, final List<AnnotationExpr> exceptAnnotations, final Type exceptType, final VariableDeclaratorId exceptId, final BlockStmt catchBlock) { super(range); setParam(new Parameter(range, exceptModifier, exceptAnnotations, exceptType, null, false, exceptId)); setBody(catchBlock); } @Override public <R, A> R accept(final GenericVisitor<R, A> v, final A arg) { return v.visit(this, arg); } @Override public <A> void accept(final VoidVisitor<A> v, final A arg) { v.visit(this, arg); } /** * Use {@link #getBody()} instead */ @Deprecated public BlockStmt getCatchBlock() { return catchBlock; } /** * Note that the type of the Parameter can be a UnionType. In this case, any annotations found at the start of the catch(@X A a |...) * are found directly in the Parameter. Annotations that are on the second or later type - catch(A a | @X B b ...) are found on those types. */ public Parameter getParam() { return param; } /** * Use {@link #setBody(BlockStmt)} instead * * @param catchBlock */ @Deprecated public CatchClause setCatchBlock(final BlockStmt catchBlock) { this.catchBlock = catchBlock; setAsParentNodeOf(this.catchBlock); return this; } public CatchClause setParam(final Parameter param) { this.param = param; setAsParentNodeOf(this.param); return this; } @Override public BlockStmt getBody() { return catchBlock; } @Override public CatchClause setBody(BlockStmt block) { this.catchBlock = block; setAsParentNodeOf(this.catchBlock); return this; } }
{ "pile_set_name": "Github" }
.rdata glabel D_80BA28E0 .asciz "\x1b[41;37m" .balign 4 glabel D_80BA28EC .asciz "Error : 時のブロック(ワープ2)が対でセットされていません(%s %d)\n" .balign 4 glabel D_80BA2930 .asciz "../z_obj_warp2block.c" .balign 4 glabel D_80BA2948 .asciz "\x1b[m" .balign 4 .text glabel func_80BA24F8 /* 00708 80BA24F8 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 /* 0070C 80BA24FC AFBF001C */ sw $ra, 0x001C($sp) /* 00710 80BA2500 AFB00018 */ sw $s0, 0x0018($sp) /* 00714 80BA2504 8CA21C6C */ lw $v0, 0x1C6C($a1) ## 00001C6C /* 00718 80BA2508 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 /* 0071C 80BA250C 00A03025 */ or $a2, $a1, $zero ## $a2 = 00000000 /* 00720 80BA2510 10400021 */ beq $v0, $zero, .L80BA2598 /* 00724 80BA2514 240401D6 */ addiu $a0, $zero, 0x01D6 ## $a0 = 000001D6 /* 00728 80BA2518 844E0000 */ lh $t6, 0x0000($v0) ## 00000000 .L80BA251C: /* 0072C 80BA251C 548E001C */ bnel $a0, $t6, .L80BA2590 /* 00730 80BA2520 8C420124 */ lw $v0, 0x0124($v0) ## 00000124 /* 00734 80BA2524 8443001C */ lh $v1, 0x001C($v0) ## 0000001C /* 00738 80BA2528 00037BC3 */ sra $t7, $v1, 15 /* 0073C 80BA252C 31F80001 */ andi $t8, $t7, 0x0001 ## $t8 = 00000000 /* 00740 80BA2530 57000017 */ bnel $t8, $zero, .L80BA2590 /* 00744 80BA2534 8C420124 */ lw $v0, 0x0124($v0) ## 00000124 /* 00748 80BA2538 8605001C */ lh $a1, 0x001C($s0) ## 0000001C /* 0074C 80BA253C 3079003F */ andi $t9, $v1, 0x003F ## $t9 = 00000000 /* 00750 80BA2540 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 /* 00754 80BA2544 57250012 */ bnel $t9, $a1, .L80BA2590 /* 00758 80BA2548 8C420124 */ lw $v0, 0x0124($v0) ## 00000124 /* 0075C 80BA254C AE02011C */ sw $v0, 0x011C($s0) ## 0000011C /* 00760 80BA2550 AFA60024 */ sw $a2, 0x0024($sp) /* 00764 80BA2554 0C00B2D0 */ jal Flags_GetSwitch /* 00768 80BA2558 00C02025 */ or $a0, $a2, $zero ## $a0 = 00000000 /* 0076C 80BA255C 10400007 */ beq $v0, $zero, .L80BA257C /* 00770 80BA2560 8FA60024 */ lw $a2, 0x0024($sp) /* 00774 80BA2564 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 /* 00778 80BA2568 0C2E8812 */ jal func_80BA2048 /* 0077C 80BA256C 00C02825 */ or $a1, $a2, $zero ## $a1 = 00000000 /* 00780 80BA2570 3C0880BA */ lui $t0, %hi(ObjWarp2block_Draw) ## $t0 = 80BA0000 /* 00784 80BA2574 250826F4 */ addiu $t0, $t0, %lo(ObjWarp2block_Draw) ## $t0 = 80BA26F4 /* 00788 80BA2578 AE080134 */ sw $t0, 0x0134($s0) ## 00000134 .L80BA257C: /* 0078C 80BA257C 0C2E8980 */ jal func_80BA2600 /* 00790 80BA2580 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 /* 00794 80BA2584 1000001A */ beq $zero, $zero, .L80BA25F0 /* 00798 80BA2588 8FBF001C */ lw $ra, 0x001C($sp) /* 0079C 80BA258C 8C420124 */ lw $v0, 0x0124($v0) ## 00000124 .L80BA2590: /* 007A0 80BA2590 5440FFE2 */ bnel $v0, $zero, .L80BA251C /* 007A4 80BA2594 844E0000 */ lh $t6, 0x0000($v0) ## 00000000 .L80BA2598: /* 007A8 80BA2598 86090174 */ lh $t1, 0x0174($s0) ## 00000174 /* 007AC 80BA259C 3C0480BA */ lui $a0, %hi(D_80BA28E0) ## $a0 = 80BA0000 /* 007B0 80BA25A0 252A0001 */ addiu $t2, $t1, 0x0001 ## $t2 = 00000001 /* 007B4 80BA25A4 A60A0174 */ sh $t2, 0x0174($s0) ## 00000174 /* 007B8 80BA25A8 860B0174 */ lh $t3, 0x0174($s0) ## 00000174 /* 007BC 80BA25AC 2961003D */ slti $at, $t3, 0x003D /* 007C0 80BA25B0 5420000F */ bnel $at, $zero, .L80BA25F0 /* 007C4 80BA25B4 8FBF001C */ lw $ra, 0x001C($sp) /* 007C8 80BA25B8 0C00084C */ jal osSyncPrintf /* 007CC 80BA25BC 248428E0 */ addiu $a0, $a0, %lo(D_80BA28E0) ## $a0 = 80BA28E0 /* 007D0 80BA25C0 3C0480BA */ lui $a0, %hi(D_80BA28EC) ## $a0 = 80BA0000 /* 007D4 80BA25C4 3C0580BA */ lui $a1, %hi(D_80BA2930) ## $a1 = 80BA0000 /* 007D8 80BA25C8 24A52930 */ addiu $a1, $a1, %lo(D_80BA2930) ## $a1 = 80BA2930 /* 007DC 80BA25CC 248428EC */ addiu $a0, $a0, %lo(D_80BA28EC) ## $a0 = 80BA28EC /* 007E0 80BA25D0 0C00084C */ jal osSyncPrintf /* 007E4 80BA25D4 240601F9 */ addiu $a2, $zero, 0x01F9 ## $a2 = 000001F9 /* 007E8 80BA25D8 3C0480BA */ lui $a0, %hi(D_80BA2948) ## $a0 = 80BA0000 /* 007EC 80BA25DC 0C00084C */ jal osSyncPrintf /* 007F0 80BA25E0 24842948 */ addiu $a0, $a0, %lo(D_80BA2948) ## $a0 = 80BA2948 /* 007F4 80BA25E4 0C00B55C */ jal Actor_Kill /* 007F8 80BA25E8 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 /* 007FC 80BA25EC 8FBF001C */ lw $ra, 0x001C($sp) .L80BA25F0: /* 00800 80BA25F0 8FB00018 */ lw $s0, 0x0018($sp) /* 00804 80BA25F4 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 /* 00808 80BA25F8 03E00008 */ jr $ra /* 0080C 80BA25FC 00000000 */ nop
{ "pile_set_name": "Github" }
package servergroups import ( "github.com/TeaWeb/build/internal/teaconfigs" "github.com/iwind/TeaGo/actions" ) type AddAction actions.Action // 添加分组 func (this *AddAction) RunGet(params struct{}) { this.Data["selectedMenu"] = "add" this.Show() } func (this *AddAction) RunPost(params struct { Name string Must *actions.Must }) { params.Must. Field("name", params.Name). Require("请输入分组名称") group := teaconfigs.NewServerGroup() group.Name = params.Name groupList := teaconfigs.SharedServerGroupList() groupList.Add(group) err := groupList.Save() if err != nil { this.Fail("保存失败:" + err.Error()) } this.Success() }
{ "pile_set_name": "Github" }
\i setup.sql SELECT plan(6); -- input: 1 <-> 2, forbidden = 20 -- output: 2{1} --Checking dead end contraction with invalid forbidden vertices PREPARE q1 AS SELECT * FROM pgr_contraction( 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1', ARRAY[1]::integer[], 1, ARRAY[20]::BIGINT[], true); SELECT set_eq('q1', $$SELECT 'v'::CHAR AS type, 2::BIGINT AS id, ARRAY[1]::BIGINT[] AS contracted_vertices, -1::BIGINT AS source, -1::BIGINT AS target, -1::FLOAT AS cost$$); -- Checking dead end contraction with no dead end node -- input: 3->2, 2<->5, 5<->6, 3->6 --q1 -- output: PREPARE q2 AS SELECT * FROM pgr_contraction( 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 2 OR id = 4 OR id = 5 OR id = 8', ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); SELECT is_empty('q2'); -- input: 1 <-> 2 -- outputt: 2{1} --Checking dead end contraction for single dead end node PREPARE q3 AS SELECT * FROM pgr_contraction( 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1', ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); SELECT set_eq('q3', $$SELECT 'v'::CHAR AS type, 2::BIGINT AS id, ARRAY[1]::BIGINT[] AS contracted_vertices, -1::BIGINT AS source, -1::BIGINT AS target, -1::FLOAT AS cost$$); -- Checking dead end contraction for two dead end nodes -- input: 2 <- 3 <- 4 -- output: 4{2, 3} PREPARE q4 AS SELECT * FROM pgr_contraction( 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 2 or id = 3', ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); SELECT set_eq('q4', $$SELECT 'v'::CHAR AS type, 4::BIGINT AS id, ARRAY[2,3]::BIGINT[] AS contracted_vertices, -1::BIGINT AS source, -1::BIGINT AS target, -1::FLOAT AS cost$$); --Checking dead end contraction for multiple dead end nodes -- input: 1 <-> 2 <- 3 <- 4 -- step: 2{1} <- 3 <- 4 -- output: 4{1, 2, 3} PREPARE q5 AS SELECT * FROM pgr_contraction( 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 OR id = 2 or id = 3', ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); PREPARE sol5 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES ('v'::CHAR, 4::BIGINT, ARRAY[1, 2, 3]::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('q5', 'sol5'); -- all table -- 15{14} -- 16{17} -- 10{13} -- 5{7,8} -- 2{1} -- Checking dead end contraction for sample data PREPARE q6 AS SELECT * FROM pgr_contraction( 'SELECT id, source, target, cost, reverse_cost FROM edge_table', ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); PREPARE sol6 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES ('v'::CHAR, 2::BIGINT, ARRAY[1]::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT), ('v', 5, ARRAY[7,8], -1, -1, -1), ('v', 10, ARRAY[13], -1, -1, -1), ('v', 15, ARRAY[14], -1, -1, -1), ('v', 17, ARRAY[16], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('q6', 'sol6'); SELECT finish();
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <!-- Wire Copyright (C) 2018 Wire Swiss GmbH 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/>. --> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <corners android:radius="12dp" /> <size android:width="@dimen/wire__otr__switch_height" android:height="@dimen/wire__otr__switch_height" /> <solid android:color="@color/wire__otr__not_verified_secondary_light" /> <stroke android:width="4dp" android:color="#00000000" /> </shape>
{ "pile_set_name": "Github" }
/******************************************************************************* * KindEditor - WYSIWYG HTML Editor for Internet * Copyright (C) 2006-2011 kindsoft.net * * @author Roddy <[email protected]> * @site http://www.kindsoft.net/ * @licence http://www.kindsoft.net/license.php *******************************************************************************/ KindEditor.plugin('wordpaste', function(K) { var self = this, name = 'wordpaste'; self.clickToolbar(name, function() { var lang = self.lang(name + '.'), html = '<div style="padding:10px 20px;">' + '<div style="margin-bottom:10px;">' + lang.comment + '</div>' + '<iframe class="ke-textarea" frameborder="0" style="width:408px;height:260px;"></iframe>' + '</div>', dialog = self.createDialog({ name : name, width : 450, title : self.lang(name), body : html, yesBtn : { name : self.lang('yes'), click : function(e) { var str = doc.body.innerHTML; str = K.clearMsWord(str, self.filterMode ? self.htmlTags : K.options.htmlTags); self.insertHtml(str).hideDialog().focus(); } } }), div = dialog.div, iframe = K('iframe', div), doc = K.iframeDoc(iframe); if (!K.IE) { doc.designMode = 'on'; } doc.open(); doc.write('<!doctype html><html><head><title>WordPaste</title></head>'); doc.write('<body style="background-color:#FFF;font-size:12px;margin:2px;">'); if (!K.IE) { doc.write('<br />'); } doc.write('</body></html>'); doc.close(); if (K.IE) { doc.body.contentEditable = 'true'; } iframe[0].contentWindow.focus(); }); });
{ "pile_set_name": "Github" }
/* * Mainly by David Woodhouse, somewhat modified by Jordan Crouse * * Copyright © 2006-2007 Red Hat, Inc. * Copyright © 2006-2007 Advanced Micro Devices, Inc. * Copyright © 2009 VIA Technology, Inc. * Copyright (c) 2010 Andres Salomon <[email protected]> * * This program is free software. You can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public * License as published by the Free Software Foundation. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include <linux/cs5535.h> #include <linux/gpio.h> #include <linux/delay.h> #include <asm/olpc.h> #include "olpc_dcon.h" static int dcon_init_xo_1(struct dcon_priv *dcon) { unsigned char lob; if (gpio_request(OLPC_GPIO_DCON_STAT0, "OLPC-DCON")) { pr_err("failed to request STAT0 GPIO\n"); return -EIO; } if (gpio_request(OLPC_GPIO_DCON_STAT1, "OLPC-DCON")) { pr_err("failed to request STAT1 GPIO\n"); goto err_gp_stat1; } if (gpio_request(OLPC_GPIO_DCON_IRQ, "OLPC-DCON")) { pr_err("failed to request IRQ GPIO\n"); goto err_gp_irq; } if (gpio_request(OLPC_GPIO_DCON_LOAD, "OLPC-DCON")) { pr_err("failed to request LOAD GPIO\n"); goto err_gp_load; } if (gpio_request(OLPC_GPIO_DCON_BLANK, "OLPC-DCON")) { pr_err("failed to request BLANK GPIO\n"); goto err_gp_blank; } /* Turn off the event enable for GPIO7 just to be safe */ cs5535_gpio_clear(OLPC_GPIO_DCON_IRQ, GPIO_EVENTS_ENABLE); /* * Determine the current state by reading the GPIO bit; earlier * stages of the boot process have established the state. * * Note that we read GPIO_OUPUT_VAL rather than GPIO_READ_BACK here; * this is because OFW will disable input for the pin and set a value.. * READ_BACK will only contain a valid value if input is enabled and * then a value is set. So, future readings of the pin can use * READ_BACK, but the first one cannot. Awesome, huh? */ dcon->curr_src = cs5535_gpio_isset(OLPC_GPIO_DCON_LOAD, GPIO_OUTPUT_VAL) ? DCON_SOURCE_CPU : DCON_SOURCE_DCON; dcon->pending_src = dcon->curr_src; /* Set the directions for the GPIO pins */ gpio_direction_input(OLPC_GPIO_DCON_STAT0); gpio_direction_input(OLPC_GPIO_DCON_STAT1); gpio_direction_input(OLPC_GPIO_DCON_IRQ); gpio_direction_input(OLPC_GPIO_DCON_BLANK); gpio_direction_output(OLPC_GPIO_DCON_LOAD, dcon->curr_src == DCON_SOURCE_CPU); /* Set up the interrupt mappings */ /* Set the IRQ to pair 2 */ cs5535_gpio_setup_event(OLPC_GPIO_DCON_IRQ, 2, 0); /* Enable group 2 to trigger the DCON interrupt */ cs5535_gpio_set_irq(2, DCON_IRQ); /* Select edge level for interrupt (in PIC) */ lob = inb(0x4d0); lob &= ~(1 << DCON_IRQ); outb(lob, 0x4d0); /* Register the interrupt handler */ if (request_irq(DCON_IRQ, &dcon_interrupt, 0, "DCON", dcon)) { pr_err("failed to request DCON's irq\n"); goto err_req_irq; } /* Clear INV_EN for GPIO7 (DCONIRQ) */ cs5535_gpio_clear(OLPC_GPIO_DCON_IRQ, GPIO_INPUT_INVERT); /* Enable filter for GPIO12 (DCONBLANK) */ cs5535_gpio_set(OLPC_GPIO_DCON_BLANK, GPIO_INPUT_FILTER); /* Disable filter for GPIO7 */ cs5535_gpio_clear(OLPC_GPIO_DCON_IRQ, GPIO_INPUT_FILTER); /* Disable event counter for GPIO7 (DCONIRQ) and GPIO12 (DCONBLANK) */ cs5535_gpio_clear(OLPC_GPIO_DCON_IRQ, GPIO_INPUT_EVENT_COUNT); cs5535_gpio_clear(OLPC_GPIO_DCON_BLANK, GPIO_INPUT_EVENT_COUNT); /* Add GPIO12 to the Filter Event Pair #7 */ cs5535_gpio_set(OLPC_GPIO_DCON_BLANK, GPIO_FE7_SEL); /* Turn off negative Edge Enable for GPIO12 */ cs5535_gpio_clear(OLPC_GPIO_DCON_BLANK, GPIO_NEGATIVE_EDGE_EN); /* Enable negative Edge Enable for GPIO7 */ cs5535_gpio_set(OLPC_GPIO_DCON_IRQ, GPIO_NEGATIVE_EDGE_EN); /* Zero the filter amount for Filter Event Pair #7 */ cs5535_gpio_set(0, GPIO_FLTR7_AMOUNT); /* Clear the negative edge status for GPIO7 and GPIO12 */ cs5535_gpio_set(OLPC_GPIO_DCON_IRQ, GPIO_NEGATIVE_EDGE_STS); cs5535_gpio_set(OLPC_GPIO_DCON_BLANK, GPIO_NEGATIVE_EDGE_STS); /* FIXME: Clear the positive status as well, just to be sure */ cs5535_gpio_set(OLPC_GPIO_DCON_IRQ, GPIO_POSITIVE_EDGE_STS); cs5535_gpio_set(OLPC_GPIO_DCON_BLANK, GPIO_POSITIVE_EDGE_STS); /* Enable events for GPIO7 (DCONIRQ) and GPIO12 (DCONBLANK) */ cs5535_gpio_set(OLPC_GPIO_DCON_IRQ, GPIO_EVENTS_ENABLE); cs5535_gpio_set(OLPC_GPIO_DCON_BLANK, GPIO_EVENTS_ENABLE); return 0; err_req_irq: gpio_free(OLPC_GPIO_DCON_BLANK); err_gp_blank: gpio_free(OLPC_GPIO_DCON_LOAD); err_gp_load: gpio_free(OLPC_GPIO_DCON_IRQ); err_gp_irq: gpio_free(OLPC_GPIO_DCON_STAT1); err_gp_stat1: gpio_free(OLPC_GPIO_DCON_STAT0); return -EIO; } static void dcon_wiggle_xo_1(void) { int x; /* * According to HiMax, when powering the DCON up we should hold * SMB_DATA high for 8 SMB_CLK cycles. This will force the DCON * state machine to reset to a (sane) initial state. Mitch Bradley * did some testing and discovered that holding for 16 SMB_CLK cycles * worked a lot more reliably, so that's what we do here. * * According to the cs5536 spec, to set GPIO14 to SMB_CLK we must * simultaneously set AUX1 IN/OUT to GPIO14; ditto for SMB_DATA and * GPIO15. */ cs5535_gpio_set(OLPC_GPIO_SMB_CLK, GPIO_OUTPUT_VAL); cs5535_gpio_set(OLPC_GPIO_SMB_DATA, GPIO_OUTPUT_VAL); cs5535_gpio_set(OLPC_GPIO_SMB_CLK, GPIO_OUTPUT_ENABLE); cs5535_gpio_set(OLPC_GPIO_SMB_DATA, GPIO_OUTPUT_ENABLE); cs5535_gpio_clear(OLPC_GPIO_SMB_CLK, GPIO_OUTPUT_AUX1); cs5535_gpio_clear(OLPC_GPIO_SMB_DATA, GPIO_OUTPUT_AUX1); cs5535_gpio_clear(OLPC_GPIO_SMB_CLK, GPIO_OUTPUT_AUX2); cs5535_gpio_clear(OLPC_GPIO_SMB_DATA, GPIO_OUTPUT_AUX2); cs5535_gpio_clear(OLPC_GPIO_SMB_CLK, GPIO_INPUT_AUX1); cs5535_gpio_clear(OLPC_GPIO_SMB_DATA, GPIO_INPUT_AUX1); for (x = 0; x < 16; x++) { udelay(5); cs5535_gpio_clear(OLPC_GPIO_SMB_CLK, GPIO_OUTPUT_VAL); udelay(5); cs5535_gpio_set(OLPC_GPIO_SMB_CLK, GPIO_OUTPUT_VAL); } udelay(5); cs5535_gpio_set(OLPC_GPIO_SMB_CLK, GPIO_OUTPUT_AUX1); cs5535_gpio_set(OLPC_GPIO_SMB_DATA, GPIO_OUTPUT_AUX1); cs5535_gpio_set(OLPC_GPIO_SMB_CLK, GPIO_INPUT_AUX1); cs5535_gpio_set(OLPC_GPIO_SMB_DATA, GPIO_INPUT_AUX1); } static void dcon_set_dconload_1(int val) { gpio_set_value(OLPC_GPIO_DCON_LOAD, val); } static int dcon_read_status_xo_1(u8 *status) { *status = gpio_get_value(OLPC_GPIO_DCON_STAT0); *status |= gpio_get_value(OLPC_GPIO_DCON_STAT1) << 1; /* Clear the negative edge status for GPIO7 */ cs5535_gpio_set(OLPC_GPIO_DCON_IRQ, GPIO_NEGATIVE_EDGE_STS); return 0; } struct dcon_platform_data dcon_pdata_xo_1 = { .init = dcon_init_xo_1, .bus_stabilize_wiggle = dcon_wiggle_xo_1, .set_dconload = dcon_set_dconload_1, .read_status = dcon_read_status_xo_1, };
{ "pile_set_name": "Github" }
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.flink.streaming.connectors.kafka.table; import org.apache.flink.api.common.serialization.DeserializationSchema; import org.apache.flink.api.common.serialization.SerializationSchema; import org.apache.flink.configuration.Configuration; import org.apache.flink.streaming.api.functions.sink.SinkFunction; import org.apache.flink.streaming.api.functions.source.SourceFunction; import org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumerBase; import org.apache.flink.streaming.connectors.kafka.config.StartupMode; import org.apache.flink.streaming.connectors.kafka.internals.KafkaTopicPartition; import org.apache.flink.streaming.connectors.kafka.partitioner.FlinkFixedPartitioner; import org.apache.flink.streaming.connectors.kafka.partitioner.FlinkKafkaPartitioner; import org.apache.flink.table.api.DataTypes; import org.apache.flink.table.api.TableSchema; import org.apache.flink.table.api.ValidationException; import org.apache.flink.table.catalog.CatalogTable; import org.apache.flink.table.catalog.CatalogTableImpl; import org.apache.flink.table.catalog.ObjectIdentifier; import org.apache.flink.table.connector.format.DecodingFormat; import org.apache.flink.table.connector.format.EncodingFormat; import org.apache.flink.table.connector.sink.DynamicTableSink; import org.apache.flink.table.connector.sink.SinkFunctionProvider; import org.apache.flink.table.connector.source.DynamicTableSource; import org.apache.flink.table.connector.source.ScanTableSource; import org.apache.flink.table.connector.source.SourceFunctionProvider; import org.apache.flink.table.data.RowData; import org.apache.flink.table.factories.FactoryUtil; import org.apache.flink.table.factories.TestFormatFactory; import org.apache.flink.table.runtime.connector.sink.SinkRuntimeProviderContext; import org.apache.flink.table.runtime.connector.source.ScanRuntimeProviderContext; import org.apache.flink.table.types.DataType; import org.apache.flink.util.TestLogger; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.Properties; import java.util.function.Consumer; import java.util.regex.Pattern; import static org.apache.flink.core.testutils.FlinkMatchers.containsCause; import static org.hamcrest.CoreMatchers.instanceOf; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; /** * Abstract test base for {@link KafkaDynamicTableFactoryBase}. */ public abstract class KafkaDynamicTableFactoryTestBase extends TestLogger { @Rule public ExpectedException thrown = ExpectedException.none(); private static final String TOPIC = "myTopic"; private static final String TOPICS = "myTopic-1;myTopic-2;myTopic-3"; private static final String TOPIC_REGEX = "myTopic-\\d+"; private static final List<String> TOPIC_LIST = Arrays.asList("myTopic-1", "myTopic-2", "myTopic-3"); private static final int PARTITION_0 = 0; private static final long OFFSET_0 = 100L; private static final int PARTITION_1 = 1; private static final long OFFSET_1 = 123L; private static final String NAME = "name"; private static final String COUNT = "count"; private static final String TIME = "time"; private static final String WATERMARK_EXPRESSION = TIME + " - INTERVAL '5' SECOND"; private static final DataType WATERMARK_DATATYPE = DataTypes.TIMESTAMP(3); private static final String COMPUTED_COLUMN_NAME = "computed-column"; private static final String COMPUTED_COLUMN_EXPRESSION = COUNT + " + 1.0"; private static final DataType COMPUTED_COLUMN_DATATYPE = DataTypes.DECIMAL(10, 3); private static final String SEMANTIC = "exactly-once"; private static final String DISCOVERY_INTERVAL = "1000 ms"; private static final Properties KAFKA_SOURCE_PROPERTIES = new Properties(); private static final Properties KAFKA_SINK_PROPERTIES = new Properties(); static { KAFKA_SOURCE_PROPERTIES.setProperty("group.id", "dummy"); KAFKA_SOURCE_PROPERTIES.setProperty("bootstrap.servers", "dummy"); KAFKA_SOURCE_PROPERTIES.setProperty("flink.partition-discovery.interval-millis", "1000"); KAFKA_SINK_PROPERTIES.setProperty("group.id", "dummy"); KAFKA_SINK_PROPERTIES.setProperty("bootstrap.servers", "dummy"); } private static final String PROPS_SCAN_OFFSETS = String.format("partition:%d,offset:%d;partition:%d,offset:%d", PARTITION_0, OFFSET_0, PARTITION_1, OFFSET_1); private static final TableSchema SOURCE_SCHEMA = TableSchema.builder() .field(NAME, DataTypes.STRING()) .field(COUNT, DataTypes.DECIMAL(38, 18)) .field(TIME, DataTypes.TIMESTAMP(3)) .field(COMPUTED_COLUMN_NAME, COMPUTED_COLUMN_DATATYPE, COMPUTED_COLUMN_EXPRESSION) .watermark(TIME, WATERMARK_EXPRESSION, WATERMARK_DATATYPE) .build(); private static final TableSchema SINK_SCHEMA = TableSchema.builder() .field(NAME, DataTypes.STRING()) .field(COUNT, DataTypes.DECIMAL(38, 18)) .field(TIME, DataTypes.TIMESTAMP(3)) .build(); @Test @SuppressWarnings("unchecked") public void testTableSource() { // prepare parameters for Kafka table source final DataType producedDataType = SOURCE_SCHEMA.toPhysicalRowDataType(); final Map<KafkaTopicPartition, Long> specificOffsets = new HashMap<>(); specificOffsets.put(new KafkaTopicPartition(TOPIC, PARTITION_0), OFFSET_0); specificOffsets.put(new KafkaTopicPartition(TOPIC, PARTITION_1), OFFSET_1); DecodingFormat<DeserializationSchema<RowData>> decodingFormat = new TestFormatFactory.DecodingFormatMock(",", true); // Construct table source using options and table source factory ObjectIdentifier objectIdentifier = ObjectIdentifier.of( "default", "default", "scanTable"); CatalogTable catalogTable = createKafkaSourceCatalogTable(); final DynamicTableSource actualSource = FactoryUtil.createTableSource(null, objectIdentifier, catalogTable, new Configuration(), Thread.currentThread().getContextClassLoader()); // Test scan source equals final KafkaDynamicSourceBase expectedKafkaSource = getExpectedScanSource( producedDataType, Collections.singletonList(TOPIC), null, KAFKA_SOURCE_PROPERTIES, decodingFormat, StartupMode.SPECIFIC_OFFSETS, specificOffsets, 0); final KafkaDynamicSourceBase actualKafkaSource = (KafkaDynamicSourceBase) actualSource; assertEquals(actualKafkaSource, expectedKafkaSource); // Test Kafka consumer ScanTableSource.ScanRuntimeProvider provider = actualKafkaSource.getScanRuntimeProvider(ScanRuntimeProviderContext.INSTANCE); assertThat(provider, instanceOf(SourceFunctionProvider.class)); final SourceFunctionProvider sourceFunctionProvider = (SourceFunctionProvider) provider; final SourceFunction<RowData> sourceFunction = sourceFunctionProvider.createSourceFunction(); assertThat(sourceFunction, instanceOf(getExpectedConsumerClass())); // Test commitOnCheckpoints flag should be true when set consumer group assertTrue(((FlinkKafkaConsumerBase) sourceFunction).getEnableCommitOnCheckpoints()); } @Test public void testTableSourceCommitOnCheckpointsDisabled() { //Construct table source using options and table source factory ObjectIdentifier objectIdentifier = ObjectIdentifier.of( "default", "default", "scanTable"); Map<String, String> tableOptions = getFullSourceOptions(); tableOptions.remove("properties.group.id"); CatalogTable catalogTable = createKafkaSourceCatalogTable(tableOptions); final DynamicTableSource tableSource = FactoryUtil.createTableSource(null, objectIdentifier, catalogTable, new Configuration(), Thread.currentThread().getContextClassLoader()); // Test commitOnCheckpoints flag should be false when do not set consumer group. assertThat(tableSource, instanceOf(KafkaDynamicSourceBase.class)); ScanTableSource.ScanRuntimeProvider providerWithoutGroupId = ((KafkaDynamicSourceBase) tableSource) .getScanRuntimeProvider(ScanRuntimeProviderContext.INSTANCE); assertThat(providerWithoutGroupId, instanceOf(SourceFunctionProvider.class)); final SourceFunctionProvider functionProviderWithoutGroupId = (SourceFunctionProvider) providerWithoutGroupId; final SourceFunction<RowData> function = functionProviderWithoutGroupId.createSourceFunction(); assertFalse(((FlinkKafkaConsumerBase) function).getEnableCommitOnCheckpoints()); } @Test public void testTableSourceWithPattern() { // prepare parameters for Kafka table source final DataType producedDataType = SOURCE_SCHEMA.toPhysicalRowDataType(); final Map<KafkaTopicPartition, Long> specificOffsets = new HashMap<>(); DecodingFormat<DeserializationSchema<RowData>> decodingFormat = new TestFormatFactory.DecodingFormatMock(",", true); // Construct table source using options and table source factory ObjectIdentifier objectIdentifier = ObjectIdentifier.of( "default", "default", "scanTable"); final Map<String, String> modifiedOptions = getModifiedOptions( getFullSourceOptions(), options -> { options.remove("topic"); options.put("topic-pattern", TOPIC_REGEX); options.put("scan.startup.mode", KafkaOptions.SCAN_STARTUP_MODE_VALUE_EARLIEST); options.remove("scan.startup.specific-offsets"); }); CatalogTable catalogTable = createKafkaSourceCatalogTable(modifiedOptions); final DynamicTableSource actualSource = FactoryUtil.createTableSource(null, objectIdentifier, catalogTable, new Configuration(), Thread.currentThread().getContextClassLoader()); // Test scan source equals final KafkaDynamicSourceBase expectedKafkaSource = getExpectedScanSource( producedDataType, null, Pattern.compile(TOPIC_REGEX), KAFKA_SOURCE_PROPERTIES, decodingFormat, StartupMode.EARLIEST, specificOffsets, 0); final KafkaDynamicSourceBase actualKafkaSource = (KafkaDynamicSourceBase) actualSource; assertEquals(actualKafkaSource, expectedKafkaSource); // Test Kafka consumer ScanTableSource.ScanRuntimeProvider provider = actualKafkaSource.getScanRuntimeProvider(ScanRuntimeProviderContext.INSTANCE); assertThat(provider, instanceOf(SourceFunctionProvider.class)); final SourceFunctionProvider sourceFunctionProvider = (SourceFunctionProvider) provider; final SourceFunction<RowData> sourceFunction = sourceFunctionProvider.createSourceFunction(); assertThat(sourceFunction, instanceOf(getExpectedConsumerClass())); } @Test public void testTableSink() { final DataType consumedDataType = SINK_SCHEMA.toPhysicalRowDataType(); EncodingFormat<SerializationSchema<RowData>> encodingFormat = new TestFormatFactory.EncodingFormatMock(","); // Construct table sink using options and table sink factory. ObjectIdentifier objectIdentifier = ObjectIdentifier.of( "default", "default", "sinkTable"); final CatalogTable sinkTable = createKafkaSinkCatalogTable(); final DynamicTableSink actualSink = FactoryUtil.createTableSink( null, objectIdentifier, sinkTable, new Configuration(), Thread.currentThread().getContextClassLoader()); final DynamicTableSink expectedSink = getExpectedSink( consumedDataType, TOPIC, KAFKA_SINK_PROPERTIES, Optional.of(new FlinkFixedPartitioner<>()), encodingFormat, KafkaSinkSemantic.EXACTLY_ONCE ); assertEquals(expectedSink, actualSink); // Test sink format. final KafkaDynamicSinkBase actualKafkaSink = (KafkaDynamicSinkBase) actualSink; assertEquals(encodingFormat, actualKafkaSink.encodingFormat); // Test kafka producer. DynamicTableSink.SinkRuntimeProvider provider = actualKafkaSink.getSinkRuntimeProvider(new SinkRuntimeProviderContext(false)); assertThat(provider, instanceOf(SinkFunctionProvider.class)); final SinkFunctionProvider sinkFunctionProvider = (SinkFunctionProvider) provider; final SinkFunction<RowData> sinkFunction = sinkFunctionProvider.createSinkFunction(); assertThat(sinkFunction, instanceOf(getExpectedProducerClass())); } // -------------------------------------------------------------------------------------------- // Negative tests // -------------------------------------------------------------------------------------------- @Test public void testInvalidScanStartupMode() { // Construct table source using DDL and table source factory ObjectIdentifier objectIdentifier = ObjectIdentifier.of( "default", "default", "scanTable"); final Map<String, String> modifiedOptions = getModifiedOptions( getFullSourceOptions(), options -> { options.put("scan.startup.mode", "abc"); }); CatalogTable catalogTable = createKafkaSourceCatalogTable(modifiedOptions); thrown.expect(ValidationException.class); thrown.expect(containsCause(new ValidationException("Invalid value for option 'scan.startup.mode'. " + "Supported values are [earliest-offset, latest-offset, group-offsets, specific-offsets, timestamp], " + "but was: abc"))); FactoryUtil.createTableSource(null, objectIdentifier, catalogTable, new Configuration(), Thread.currentThread().getContextClassLoader()); } @Test public void testSourceTableWithTopicAndTopicPattern() { // Construct table source using DDL and table source factory ObjectIdentifier objectIdentifier = ObjectIdentifier.of( "default", "default", "scanTable"); final Map<String, String> modifiedOptions = getModifiedOptions( getFullSourceOptions(), options -> { options.put("topic", TOPICS); options.put("topic-pattern", TOPIC_REGEX); }); CatalogTable catalogTable = createKafkaSourceCatalogTable(modifiedOptions); thrown.expect(ValidationException.class); thrown.expect(containsCause(new ValidationException("Option 'topic' and 'topic-pattern' shouldn't be set together."))); FactoryUtil.createTableSource(null, objectIdentifier, catalogTable, new Configuration(), Thread.currentThread().getContextClassLoader()); } @Test public void testMissingStartupTimestamp() { // Construct table source using DDL and table source factory ObjectIdentifier objectIdentifier = ObjectIdentifier.of( "default", "default", "scanTable"); final Map<String, String> modifiedOptions = getModifiedOptions( getFullSourceOptions(), options -> { options.put("scan.startup.mode", "timestamp"); }); CatalogTable catalogTable = createKafkaSourceCatalogTable(modifiedOptions); thrown.expect(ValidationException.class); thrown.expect(containsCause(new ValidationException("'scan.startup.timestamp-millis' " + "is required in 'timestamp' startup mode but missing."))); FactoryUtil.createTableSource(null, objectIdentifier, catalogTable, new Configuration(), Thread.currentThread().getContextClassLoader()); } @Test public void testMissingSpecificOffsets() { // Construct table source using DDL and table source factory ObjectIdentifier objectIdentifier = ObjectIdentifier.of( "default", "default", "scanTable"); final Map<String, String> modifiedOptions = getModifiedOptions( getFullSourceOptions(), options -> { options.remove("scan.startup.specific-offsets"); }); CatalogTable catalogTable = createKafkaSourceCatalogTable(modifiedOptions); thrown.expect(ValidationException.class); thrown.expect(containsCause(new ValidationException("'scan.startup.specific-offsets' " + "is required in 'specific-offsets' startup mode but missing."))); FactoryUtil.createTableSource(null, objectIdentifier, catalogTable, new Configuration(), Thread.currentThread().getContextClassLoader()); } @Test public void testInvalidSinkPartitioner() { ObjectIdentifier objectIdentifier = ObjectIdentifier.of( "default", "default", "sinkTable"); final Map<String, String> modifiedOptions = getModifiedOptions( getFullSourceOptions(), options -> { options.put("sink.partitioner", "abc"); }); final CatalogTable sinkTable = createKafkaSinkCatalogTable(modifiedOptions); thrown.expect(ValidationException.class); thrown.expect(containsCause(new ValidationException("Could not find and instantiate partitioner class 'abc'"))); FactoryUtil.createTableSink( null, objectIdentifier, sinkTable, new Configuration(), Thread.currentThread().getContextClassLoader()); } @Test public void testInvalidSinkSemantic(){ ObjectIdentifier objectIdentifier = ObjectIdentifier.of( "default", "default", "sinkTable"); final Map<String, String> modifiedOptions = getModifiedOptions( getFullSourceOptions(), options -> { options.put("sink.semantic", "xyz"); }); final CatalogTable sinkTable = createKafkaSinkCatalogTable(modifiedOptions); thrown.expect(ValidationException.class); thrown.expect(containsCause(new ValidationException("Unsupported value 'xyz' for 'sink.semantic'. Supported values are ['at-least-once', 'exactly-once', 'none']."))); FactoryUtil.createTableSink( null, objectIdentifier, sinkTable, new Configuration(), Thread.currentThread().getContextClassLoader()); } @Test public void testSinkWithTopicListOrTopicPattern(){ ObjectIdentifier objectIdentifier = ObjectIdentifier.of( "default", "default", "sinkTable"); Map<String, String> modifiedOptions = getModifiedOptions( getFullSourceOptions(), options -> { options.put("topic", TOPICS); options.put("scan.startup.mode", "earliest-offset"); options.remove("specific-offsets"); }); CatalogTable sinkTable = createKafkaSinkCatalogTable(modifiedOptions); String errorMessageTemp = "Flink Kafka sink currently only supports single topic, but got %s: %s."; try { FactoryUtil.createTableSink( null, objectIdentifier, sinkTable, new Configuration(), Thread.currentThread().getContextClassLoader()); } catch (Throwable t) { assertEquals(String.format(errorMessageTemp, "'topic'", String.format("[%s]", String.join(", ", TOPIC_LIST))), t.getCause().getMessage()); } modifiedOptions = getModifiedOptions( getFullSourceOptions(), options -> { options.put("topic-pattern", TOPIC_REGEX); }); sinkTable = createKafkaSinkCatalogTable(modifiedOptions); try { FactoryUtil.createTableSink( null, objectIdentifier, sinkTable, new Configuration(), Thread.currentThread().getContextClassLoader()); } catch (Throwable t) { assertEquals(String.format(errorMessageTemp, "'topic-pattern'", TOPIC_REGEX), t.getCause().getMessage()); } } // -------------------------------------------------------------------------------------------- // Utilities // -------------------------------------------------------------------------------------------- private CatalogTable createKafkaSourceCatalogTable() { return createKafkaSourceCatalogTable(getFullSourceOptions()); } private CatalogTable createKafkaSinkCatalogTable() { return createKafkaSinkCatalogTable(getFullSinkOptions()); } private CatalogTable createKafkaSourceCatalogTable(Map<String, String> options) { return new CatalogTableImpl(SOURCE_SCHEMA, options, "scanTable"); } protected CatalogTable createKafkaSinkCatalogTable(Map<String, String> options) { return new CatalogTableImpl(SINK_SCHEMA, options, "sinkTable"); } /** * Returns the full options modified by the given consumer {@code optionModifier}. * * @param optionModifier Consumer to modify the options */ protected static Map<String, String> getModifiedOptions( Map<String, String> options, Consumer<Map<String, String>> optionModifier) { optionModifier.accept(options); return options; } protected Map<String, String> getFullSourceOptions() { Map<String, String> tableOptions = new HashMap<>(); // Kafka specific options. tableOptions.put("connector", factoryIdentifier()); tableOptions.put("topic", TOPIC); tableOptions.put("properties.group.id", "dummy"); tableOptions.put("properties.bootstrap.servers", "dummy"); tableOptions.put("scan.startup.mode", "specific-offsets"); tableOptions.put("scan.startup.specific-offsets", PROPS_SCAN_OFFSETS); tableOptions.put("scan.topic-partition-discovery.interval", DISCOVERY_INTERVAL); // Format options. tableOptions.put("format", TestFormatFactory.IDENTIFIER); final String formatDelimiterKey = String.format("%s.%s", TestFormatFactory.IDENTIFIER, TestFormatFactory.DELIMITER.key()); final String failOnMissingKey = String.format("%s.%s", TestFormatFactory.IDENTIFIER, TestFormatFactory.FAIL_ON_MISSING.key()); tableOptions.put(formatDelimiterKey, ","); tableOptions.put(failOnMissingKey, "true"); return tableOptions; } protected Map<String, String> getFullSinkOptions() { Map<String, String> tableOptions = new HashMap<>(); // Kafka specific options. tableOptions.put("connector", factoryIdentifier()); tableOptions.put("topic", TOPIC); tableOptions.put("properties.group.id", "dummy"); tableOptions.put("properties.bootstrap.servers", "dummy"); tableOptions.put("sink.partitioner", KafkaOptions.SINK_PARTITIONER_VALUE_FIXED); tableOptions.put("sink.semantic", KafkaOptions.SINK_SEMANTIC_VALUE_EXACTLY_ONCE); // Format options. tableOptions.put("format", TestFormatFactory.IDENTIFIER); final String formatDelimiterKey = String.format("%s.%s", TestFormatFactory.IDENTIFIER, TestFormatFactory.DELIMITER.key()); tableOptions.put(formatDelimiterKey, ","); return tableOptions; } // -------------------------------------------------------------------------------------------- // For version-specific tests // -------------------------------------------------------------------------------------------- protected abstract String factoryIdentifier(); protected abstract Class<?> getExpectedConsumerClass(); protected abstract Class<?> getExpectedProducerClass(); protected abstract KafkaDynamicSourceBase getExpectedScanSource( DataType producedDataType, List<String> topics, Pattern topicPattern, Properties properties, DecodingFormat<DeserializationSchema<RowData>> decodingFormat, StartupMode startupMode, Map<KafkaTopicPartition, Long> specificStartupOffsets, long startupTimestamp ); protected abstract KafkaDynamicSinkBase getExpectedSink( DataType consumedDataType, String topic, Properties properties, Optional<FlinkKafkaPartitioner<RowData>> partitioner, EncodingFormat<SerializationSchema<RowData>> encodingFormat, KafkaSinkSemantic semantic ); }
{ "pile_set_name": "Github" }
<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN"> <html> <!--(==============================================================)--> <!--(Document created with RoboEditor. )============================--> <!--(==============================================================)--> <head> <title>Multiply 64 bit Command</title> <!--(Meta)==========================================================--> <meta http-equiv=content-type content="text/html; charset=windows-1252"> <meta name=generator content="RoboHELP by eHelp Corporation - www.ehelp.com"> <meta name=generator-major-version content=0.1> <meta name=generator-minor-version content=1> <meta name=filetype content=kadov> <meta name=filetype-version content=1> <meta name=page-count content=1> <meta name=layout-height content=849> <meta name=layout-width content=1212> <!--(Links)=========================================================--> <link rel="StyleSheet" href="..\Hexedit.css"> </head> <!--(Body)==========================================================--> <body> <h2 style="font-family: Arial;">Multiply Quad Word command (Operations menu)</h2> <p style="margin-top: 0; margin-bottom: 0;">&nbsp;</p> <p>This command multiplies the quad word at the cursor by the value in the calculator. If there is a selection then it operates on all quad words of the selection.</p> <p>&nbsp;</p> <p>This command is not available if the number of bytes selected is not a multiple of 8, there is no active window or the cursor is too close to the end of the file.</p> <p>&nbsp;</p> <p>Also see the <a HREF="HID_DIV_64BIT.htm">Divide 64 bit Command</a>.</p> <p>&nbsp;</p> <p> <!--Metadata type="DesignerControl" startspan <object CLASSID="clsid:FF80F713-5DC6-11d0-A7B4-00AADC53E937" BORDER=0 id=object1 style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; vertical-align: baseline;" align=bottom> <param name="_Version" value="65536" > <param name="_ExtentX" value="2117" > <param name="_ExtentY" value="556" > <param name="_StockProps" value="13" > <param name="ForeColor" value="0" > <param name="BackColor" value="12632256" > <param name="UseButton" value="-1" > <param name="ControlLabel" value="Related Topics" > <param name="UseIcon" value="0" > <param name="Items" value="Calculator;..\overviewtools\calc.htm$$**$$Calculator command;..\cmd_tools\HID_CALCULATOR.htm$$**$$Multiply 16 bit Command;HID_MUL_16BIT.htm$$**$$Multiply 32 bit Command;HID_MUL_32BIT.htm$$**$$Multiply Byte Command;HID_MUL_BYTE.htm$$**$$" > <param name="Image" value="" > <param name="FontInfo" value="MS Sans Serif,8,0,," > <param name="_CURRENTFILEPATH" value="D:\work\andrew\cpp\HexEdit\HTMLHelp\cmd_operations\HID_MUL_64BIT.htm" > <param name="_ID" value="object1" > <param name="UseMenu" value="-1" > <param name="Frame" value="" > <param name="Window" value="" > </object>--> <OBJECT CLASSID="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11" ID="object1" TYPE="application/x-oleobject" > <PARAM NAME="Command" VALUE="Related Topics,MENU"> <PARAM NAME="Button" VALUE="Text:Related Topics"> <PARAM NAME="Font" VALUE="MS Sans Serif,8,0,,"> <PARAM NAME="Item1" VALUE="Calculator;..\overviewtools\calc.htm"> <PARAM NAME="Item2" VALUE="Calculator command;..\cmd_tools\HID_CALCULATOR.htm"> <PARAM NAME="Item3" VALUE="Multiply 16 bit Command;HID_MUL_16BIT.htm"> <PARAM NAME="Item4" VALUE="Multiply 32 bit Command;HID_MUL_32BIT.htm"> <PARAM NAME="Item5" VALUE="Multiply Byte Command;HID_MUL_BYTE.htm"> </OBJECT> <!--Metadata type="DesignerControl" endspan--> </p> <p>&nbsp;</p> <p>&nbsp;</p> </body> </html>
{ "pile_set_name": "Github" }
; RUN: opt -S -mergefunc < %s | not grep "functions merged" target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" declare void @stuff() define void @f0(i64 addrspace(0)* %p0) { entry: call void @stuff() call void @stuff() call void @stuff() ret void } define void @f2(i64 addrspace(1)* %p0) { entry: call void @stuff() call void @stuff() call void @stuff() ret void }
{ "pile_set_name": "Github" }
// // Manta - Structural Variant and Indel Caller // Copyright (c) 2013-2019 Illumina, Inc. // // 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/>. // // #include "TestAssembler.hpp" static void runTestAssembler(const TestAssemblerOptions& opt) { // check that we have write permission on the output file early: { OutStream outs(opt.outputFilename); } const ReadScannerOptions scanOpt; const AssemblerOptions asmOpt; AssemblyReadInput reads; for (const std::string& alignmentFilename : opt.alignFileOpt.alignmentFilenames) { log_os << "[INFO] Extracting reads from file: '" << alignmentFilename << "'\n"; extractAssemblyReadsFromBam(scanOpt, asmOpt, opt.referenceFilename, alignmentFilename, reads); } AssemblyReadOutput readInfo; Assembly contigs; log_os << "[INFO] Assmbling read input.\n"; runIterativeAssembler(asmOpt, reads, readInfo, contigs); OutStream outs(opt.outputFilename); std::ostream& os(outs.getStream()); const unsigned contigCount(contigs.size()); log_os << "[INFO] Assembly complete. Contig count: " << contigCount << "\n"; for (unsigned contigIndex(0); contigIndex < contigCount; ++contigIndex) { os << ">Contig" << contigIndex << "\n"; os << contigs[contigIndex].seq << "\n"; } } void TestAssembler::runInternal(int argc, char* argv[]) const { TestAssemblerOptions opt; parseTestAssemblerOptions(*this, argc, argv, opt); runTestAssembler(opt); }
{ "pile_set_name": "Github" }
################################################################################ # # This COOLFluiD CFcase file tests: # # Finite Volume, NavierStokes3D, Backward Euler, parallel CFmesh extruder from # 2D to 3D with parallel binary writer, mesh with hexa, second-order reconstruction # without limiter, subsonic inlet and outlet, adiabatic noslip wall # ################################################################################ # # Comments begin with "#" # Meta Comments begin with triple "#" # ### Residual = -4.1525189 # #CFEnv.OnlyCPU0Writes = false # Simulation Modules Simulator.Modules.Libs = libCFmeshFileWriter libCFmeshFileReader libTecplotWriter libPetscI libNavierStokes libFiniteVolume libNewtonMethod libFiniteVolumeNavierStokes libForwardEuler libAeroCoefFVM libCFmeshExtruder # Simulation Parameters Simulator.Paths.WorkingDir = plugins/NavierStokes/testcases/FlatPlate/ Simulator.Paths.ResultsDir = ./ Simulator.SubSystem.Default.PhysicalModelType = NavierStokes3D Simulator.SubSystem.NavierStokes3D.refValues = 1.0 0.414125584 0.414125584 0.414125584 1.0 Simulator.SubSystem.NavierStokes3D.refLength = 1.0 Simulator.SubSystem.NavierStokes3D.DiffTerm.Reynolds = 76000. Simulator.SubSystem.NavierStokes3D.ConvTerm.tempRef = 298.15 Simulator.SubSystem.NavierStokes3D.ConvTerm.machInf = 0.35 Simulator.SubSystem.OutputFormat = Tecplot CFmesh Simulator.SubSystem.CFmesh.FileName = flatPlate3D_sol.CFmesh Simulator.SubSystem.Tecplot.FileName = flatPlate3D_sol.plt Simulator.SubSystem.Tecplot.SaveRate = 50 Simulator.SubSystem.CFmesh.SaveRate = 50 Simulator.SubSystem.Tecplot.AppendTime = false Simulator.SubSystem.CFmesh.AppendTime = false Simulator.SubSystem.Tecplot.AppendIter = false Simulator.SubSystem.CFmesh.AppendIter = false #Simulator.SubSystem.StopCondition = MaxNumberSteps #Simulator.SubSystem.MaxNumberSteps.nbSteps = 2 Simulator.SubSystem.StopCondition = Norm Simulator.SubSystem.Norm.valueNorm = -4.0 Simulator.SubSystem.Default.listTRS = InnerFaces SlipWall NoSlipWall Inlet Outlet Top Bottom Simulator.SubSystem.MeshCreator = CFmeshFileReader Simulator.SubSystem.CFmeshFileReader.Data.FileName = flatPlate3D.CFmesh Simulator.SubSystem.CFmeshFileReader.ReadCFmesh = ParReadCFmeshBinary Simulator.SubSystem.CFmeshFileReader.ParReadCFmeshBinary.ParCFmeshFileReader.ParMetis.NCommonNodes = 4 Simulator.SubSystem.CFmeshFileReader.Data.convertFromFile = flatPlateQD.CFmesh Simulator.SubSystem.CFmeshFileReader.convertFrom = Extruder2DFVMMPI Simulator.SubSystem.CFmeshFileReader.Extruder2DFVMMPI.NbLayers = 10 Simulator.SubSystem.CFmeshFileReader.Extruder2DFVMMPI.ExtrudeSize = 0.1 Simulator.SubSystem.CFmeshFileReader.Extruder2DFVMMPI.Split = false Simulator.SubSystem.CFmeshFileReader.Extruder2DFVMMPI.CFmeshBinaryFileWriter.NbWriters = 8 Simulator.SubSystem.LinearSystemSolver = PETSC Simulator.SubSystem.LSSNames = NewtonIteratorLSS #Simulator.SubSystem.NewtonIteratorLSS.SetupCom = ParMFSetup #Simulator.SubSystem.NewtonIteratorLSS.SysSolver = ParMFSolveSys #Simulator.SubSystem.NewtonIteratorLSS.Data.PCType = PCSHELL #Simulator.SubSystem.NewtonIteratorLSS.Data.ShellPreconditioner = BSOR Simulator.SubSystem.NewtonIteratorLSS.Data.PCType = PCASM Simulator.SubSystem.NewtonIteratorLSS.Data.KSPType = KSPGMRES Simulator.SubSystem.NewtonIteratorLSS.Data.MatOrderingType = MATORDERING_RCM Simulator.SubSystem.NewtonIteratorLSS.Data.MaxIter = 500 Simulator.SubSystem.NewtonIteratorLSS.Data.RelativeTolerance = 1e-4 Simulator.SubSystem.ConvergenceMethod = NewtonIterator Simulator.SubSystem.NewtonIterator.Data.CFL.Value = 1e12 Simulator.SubSystem.NewtonIterator.AbsoluteNormAndMaxIter.MaxIter = 1 Simulator.SubSystem.SpaceMethod = CellCenterFVM Simulator.SubSystem.CellCenterFVM.ComputeRHS = NumJacob Simulator.SubSystem.CellCenterFVM.ComputeTimeRHS = PseudoSteadyTimeRhs Simulator.SubSystem.CellCenterFVM.SetupCom = LeastSquareP1Setup Simulator.SubSystem.CellCenterFVM.SetupNames = Setup1 Simulator.SubSystem.CellCenterFVM.Setup1.stencil = FaceVertexPlusGhost Simulator.SubSystem.CellCenterFVM.UnSetupCom = LeastSquareP1UnSetup Simulator.SubSystem.CellCenterFVM.UnSetupNames = UnSetup1 Simulator.SubSystem.CellCenterFVM.Data.FluxSplitter = Roe Simulator.SubSystem.CellCenterFVM.Data.UpdateVar = Pvt Simulator.SubSystem.CellCenterFVM.Data.SolutionVar = Cons Simulator.SubSystem.CellCenterFVM.Data.LinearVar = Roe Simulator.SubSystem.CellCenterFVM.Data.DiffusiveVar = Pvt Simulator.SubSystem.CellCenterFVM.Data.DiffusiveFlux = NavierStokes #Simulator.SubSystem.CellCenterFVM.Data.NodalExtrapolation = HolmesConnell Simulator.SubSystem.CellCenterFVM.Data.PolyRec = LinearLS3D Simulator.SubSystem.CellCenterFVM.InitComds = InitState Simulator.SubSystem.CellCenterFVM.InitNames = InField Simulator.SubSystem.CellCenterFVM.InField.applyTRS = InnerFaces Simulator.SubSystem.CellCenterFVM.InField.Vars = x y z Simulator.SubSystem.CellCenterFVM.InField.Def = 986.369 121.151 0.0 0.0 298.15 Simulator.SubSystem.CellCenterFVM.BcComds = NoSlipWallAdiabaticNSPvtFVMCC \ MirrorVelocityFVMCC \ SubInletEulerPvtVTFVMCC \ SubOutletEuler3DPvtFVMCC Simulator.SubSystem.CellCenterFVM.BcNames = Wall \ Mirror \ BcInlet \ BcOutlet Simulator.SubSystem.CellCenterFVM.Mirror.applyTRS = SlipWall Top Bottom Simulator.SubSystem.CellCenterFVM.Mirror.ZeroGradientFlags = 1 0 0 0 1 Simulator.SubSystem.CellCenterFVM.Wall.applyTRS = NoSlipWall Simulator.SubSystem.CellCenterFVM.Wall.ZeroGradientFlags = 1 0 0 0 1 Simulator.SubSystem.CellCenterFVM.BcInlet.applyTRS = Inlet Simulator.SubSystem.CellCenterFVM.BcInlet.Def = 121.151 0.0 0.0 298.15 Simulator.SubSystem.CellCenterFVM.BcOutlet.applyTRS = Outlet Simulator.SubSystem.CellCenterFVM.BcOutlet.P = 986.369 Simulator.SubSystem.CellCenterFVM.BcOutlet.ZeroGradientFlags = 0 1 1 1 1 # Post process the data to compute the skin friction #Simulator.SubSystem.DataPostProcessing = DataProcessing #Simulator.SubSystem.DataPostProcessingNames = DataProcessing2 #Simulator.SubSystem.DataProcessing2.Comds = NavierStokesSkinFrictionHeatFluxCC3D #Simulator.SubSystem.DataProcessing2.Names = SkinFriction #Simulator.SubSystem.DataProcessing2.SkinFriction.applyTRS = NoSlipWall #Simulator.SubSystem.DataProcessing2.SkinFriction.rhoInf = 0.01152 #Simulator.SubSystem.DataProcessing2.SkinFriction.uInf = 121.151 #Simulator.SubSystem.DataProcessing2.SkinFriction.pInf = 986.369 #Simulator.SubSystem.DataProcessing2.SkinFriction.RefArea = 1.
{ "pile_set_name": "Github" }
/* BOSS A "one-click" program for users that quickly optimises and avoids detrimental conflicts in their TES IV: Oblivion, Nehrim - At Fate's Edge, TES V: Skyrim, Fallout 3 and Fallout: New Vegas mod load orders. Copyright (C) 2009-2012 BOSS Development Team. This file is part of BOSS. BOSS 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. BOSS 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 BOSS. If not, see <http://www.gnu.org/licenses/>. $Revision: 2488 $, $Date: 2011-03-27 14:31:33 +0100 (Sun, 27 Mar 2011) $ */ #ifndef SUPPORT_MOD_FORMAT_H_ #define SUPPORT_MOD_FORMAT_H_ #include <cstdint> #include <string> #include <boost/filesystem.hpp> namespace boss { // Structure for grouping the information gathered from each mod's header. struct ModHeader { std::string Name; std::string Description; std::string Author; std::string Version; bool IsMaster; }; struct Record { // MCP Note: Changed from unsigned long to std::uint32_t static const std::uint32_t TES4 = '4SET'; static const std::uint32_t HEDR = 'RDEH'; static const std::uint32_t OFST = 'TSFO'; static const std::uint32_t DELE = 'ELED'; static const std::uint32_t CNAM = 'MANC'; static const std::uint32_t SNAM = 'MANS'; }; ModHeader ReadHeader(boost::filesystem::path filename); bool IsPluginMaster(boost::filesystem::path filename); // Shorter version of the above, to only get master flag. } // namespace boss #endif // SUPPORT_MOD_FORMAT_H_
{ "pile_set_name": "Github" }
{ "kind": "Template", "apiVersion": "v1", "metadata": { "name": "httpd-example", "creationTimestamp": null, "annotations": { "description": "An example Apache HTTP Server (httpd) application that serves static content. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/httpd-ex/blob/master/README.md.", "iconClass": "icon-apache", "openshift.io/display-name": "Apache HTTP Server", "openshift.io/documentation-url": "https://github.com/sclorg/httpd-ex", "openshift.io/long-description": "This template defines resources needed to develop a static application served by Apache HTTP Server (httpd), including a build configuration and application deployment configuration.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "quickstart,httpd", "template.openshift.io/bindable": "false" } }, "message": "The following service(s) have been created in your project: ${NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/httpd-ex/blob/master/README.md.", "objects": [ { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes and load balances the application pods" }, "name": "${NAME}" }, "spec": { "ports": [ { "name": "web", "port": 8080, "targetPort": 8080 } ], "selector": { "name": "${NAME}" } } }, { "apiVersion": "v1", "kind": "Route", "metadata": { "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", "name": "${NAME}" } } }, { "apiVersion": "v1", "kind": "ImageStream", "metadata": { "annotations": { "description": "Keeps track of changes in the application image" }, "name": "${NAME}" } }, { "apiVersion": "v1", "kind": "BuildConfig", "metadata": { "annotations": { "description": "Defines how to build the application", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "output": { "to": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "source": { "contextDir": "${CONTEXT_DIR}", "git": { "ref": "${SOURCE_REPOSITORY_REF}", "uri": "${SOURCE_REPOSITORY_URL}" }, "type": "Git" }, "strategy": { "sourceStrategy": { "from": { "kind": "ImageStreamTag", "name": "httpd:2.4-el8", "namespace": "${NAMESPACE}" } }, "type": "Source" }, "triggers": [ { "type": "ImageChange" }, { "type": "ConfigChange" }, { "github": { "secret": "${GITHUB_WEBHOOK_SECRET}" }, "type": "GitHub" }, { "generic": { "secret": "${GENERIC_WEBHOOK_SECRET}" }, "type": "Generic" } ] } }, { "apiVersion": "v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the application server", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${NAME}" }, "strategy": { "type": "Rolling" }, "template": { "metadata": { "labels": { "name": "${NAME}" }, "name": "${NAME}" }, "spec": { "containers": [ { "env": [], "image": " ", "livenessProbe": { "httpGet": { "path": "/", "port": 8080 }, "initialDelaySeconds": 30, "timeoutSeconds": 3 }, "name": "httpd-example", "ports": [ { "containerPort": 8080 } ], "readinessProbe": { "httpGet": { "path": "/", "port": 8080 }, "initialDelaySeconds": 3, "timeoutSeconds": 3 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "httpd-example" ], "from": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } } ], "parameters": [ { "name": "NAME", "displayName": "Name", "description": "The name assigned to all of the frontend objects defined in this template.", "value": "httpd-example", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift", "required": true }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the container can use.", "value": "512Mi", "required": true }, { "name": "SOURCE_REPOSITORY_URL", "displayName": "Git Repository URL", "description": "The URL of the repository with your application source code.", "value": "https://github.com/sclorg/httpd-ex.git", "required": true }, { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", "displayName": "Context Directory", "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", "displayName": "Application Hostname", "description": "The exposed hostname that will route to the httpd service, if left blank a value will be defaulted." }, { "name": "GITHUB_WEBHOOK_SECRET", "displayName": "GitHub Webhook Secret", "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "GENERIC_WEBHOOK_SECRET", "displayName": "Generic Webhook Secret", "description": "A secret string used to configure the Generic webhook.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" } ], "labels": { "app": "httpd-example", "template": "httpd-example" } }
{ "pile_set_name": "Github" }
/* * Copyright 2015 Red Hat, Inc. and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * * 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.drools.compiler; public class EmergencyTeam { public EmergencyTeam() { } public String toString() { return "[EmergencyTeam]"; } }
{ "pile_set_name": "Github" }
fileFormatVersion: 2 guid: f1a05e68326796748ab83b5471b957db TextureImporter: serializedVersion: 2 mipmaps: mipMapMode: 0 enableMipMap: 0 linearTexture: 1 correctGamma: 0 fadeOut: 0 borderMipMap: 0 mipMapFadeDistanceStart: 1 mipMapFadeDistanceEnd: 3 bumpmap: convertToNormalMap: 0 externalNormalMap: 0 heightScale: .25 normalMapFilter: 0 isReadable: 1 grayScaleToAlpha: 0 generateCubemap: 0 seamlessCubemap: 0 textureFormat: -3 maxTextureSize: 1024 textureSettings: filterMode: -1 aniso: -1 mipBias: -1 wrapMode: -1 nPOTScale: 1 lightmap: 0 compressionQuality: 50 spriteMode: 0 spriteExtrude: 1 spriteMeshType: 1 alignment: 0 spritePivot: {x: .5, y: .5} spritePixelsToUnits: 100 alphaIsTransparency: 1 textureType: 5 buildTargetSettings: [] spriteSheet: sprites: [] spritePackingTag: userData:
{ "pile_set_name": "Github" }
'\" '\" Copyright (c) 1993 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" '\" RCS: @(#) $Id: list.n,v 1.1 2003/12/20 03:31:54 bbbush Exp $ '\" '\" The definitions below are for supplemental macros used in Tcl/Tk '\" manual entries. '\" '\" .AP type name in/out ?indent? '\" Start paragraph describing an argument to a library procedure. '\" type is type of argument (int, etc.), in/out is either "in", "out", '\" or "in/out" to describe whether procedure reads or modifies arg, '\" and indent is equivalent to second arg of .IP (shouldn't ever be '\" needed; use .AS below instead) '\" '\" .AS ?type? ?name? '\" Give maximum sizes of arguments for setting tab stops. Type and '\" name are examples of largest possible arguments that will be passed '\" to .AP later. If args are omitted, default tab stops are used. '\" '\" .BS '\" Start box enclosure. From here until next .BE, everything will be '\" enclosed in one large box. '\" '\" .BE '\" End of box enclosure. '\" '\" .CS '\" Begin code excerpt. '\" '\" .CE '\" End code excerpt. '\" '\" .VS ?version? ?br? '\" Begin vertical sidebar, for use in marking newly-changed parts '\" of man pages. The first argument is ignored and used for recording '\" the version when the .VS was added, so that the sidebars can be '\" found and removed when they reach a certain age. If another argument '\" is present, then a line break is forced before starting the sidebar. '\" '\" .VE '\" End of vertical sidebar. '\" '\" .DS '\" Begin an indented unfilled display. '\" '\" .DE '\" End of indented unfilled display. '\" '\" .SO '\" Start of list of standard options for a Tk widget. The '\" options follow on successive lines, in four columns separated '\" by tabs. '\" '\" .SE '\" End of list of standard options for a Tk widget. '\" '\" .OP cmdName dbName dbClass '\" Start of description of a specific option. cmdName gives the '\" option's name as specified in the class command, dbName gives '\" the option's name in the option database, and dbClass gives '\" the option's class in the option database. '\" '\" .UL arg1 arg2 '\" Print arg1 underlined, then print arg2 normally. '\" '\" RCS: @(#) $Id: list.n,v 1.1 2003/12/20 03:31:54 bbbush Exp $ '\" '\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b '\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. '\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out '\" # BS - start boxed text '\" # ^y = starting y location '\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. '\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. '\" # VS - start vertical sidebar '\" # ^Y = starting y location '\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. '\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. '\" # Special macro to handle page bottom: finish off current '\" # box/sidebar if in box/sidebar mode, then invoked standard '\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. '\" # DS - begin display .de DS .RS .nf .sp .. '\" # DE - end display .de DE .fi .RE .sp .. '\" # SO - start of list of standard options .de SO .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. '\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\fBoptions\\fR manual entry for details on the standard options. .. '\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. '\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. '\" # CE - end code excerpt .de CE .fi .RE .. .de UL \\$1\l'|0\(ul'\\$2 .. .TH list n "" Tcl "Tcl Built-In Commands" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME list \- Create a list .SH SYNOPSIS \fBlist \fR?\fIarg arg ...\fR? .BE .SH DESCRIPTION .PP This command returns a list comprised of all the \fIarg\fRs, or an empty string if no \fIarg\fRs are specified. Braces and backslashes get added as necessary, so that the \fBlindex\fR command may be used on the result to re-extract the original arguments, and also so that \fBeval\fR may be used to execute the resulting list, with \fIarg1\fR comprising the command's name and the other \fIarg\fRs comprising its arguments. \fBList\fR produces slightly different results than \fBconcat\fR: \fBconcat\fR removes one level of grouping before forming the list, while \fBlist\fR works directly from the original arguments. For example, the command .CS \fBlist a b {c d e} {f {g h}}\fR .CE will return .CS \fBa b {c d e} {f {g h}}\fR .CE while \fBconcat\fR with the same arguments will return .CS \fBa b c d e f {g h}\fR .CE .SH "SEE ALSO" lappend(n), lindex(n), linsert(n), llength(n), lsearch(n), lsort(n), lrange(n), lreplace(n) .SH KEYWORDS element, list
{ "pile_set_name": "Github" }
// Copyright 2015 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. // Binary package import. // See bexport.go for the export data format and how // to make a format change. package gc import ( "bufio" "encoding/binary" "fmt" "math/big" "strconv" "strings" ) // The overall structure of Import is symmetric to Export: For each // export method in bexport.go there is a matching and symmetric method // in bimport.go. Changing the export format requires making symmetric // changes to bimport.go and bexport.go. type importer struct { in *bufio.Reader buf []byte // reused for reading strings version int // export format version // object lists, in order of deserialization strList []string pkgList []*Pkg typList []*Type funcList []*Node // nil entry means already declared trackAllTypes bool // for delayed type verification cmpList []struct{ pt, t *Type } // position encoding posInfoFormat bool prevFile string prevLine int // debugging support debugFormat bool read int // bytes read } // Import populates importpkg from the serialized package data. func Import(in *bufio.Reader) { p := importer{ in: in, version: -1, // unknown version strList: []string{""}, // empty string is mapped to 0 } // read version info var versionstr string if b := p.rawByte(); b == 'c' || b == 'd' { // Go1.7 encoding; first byte encodes low-level // encoding format (compact vs debug). // For backward-compatibility only (avoid problems with // old installed packages). Newly compiled packages use // the extensible format string. // TODO(gri) Remove this support eventually; after Go1.8. if b == 'd' { p.debugFormat = true } p.trackAllTypes = p.rawByte() == 'a' p.posInfoFormat = p.bool() versionstr = p.string() if versionstr == "v1" { p.version = 0 } } else { // Go1.8 extensible encoding // read version string and extract version number (ignore anything after the version number) versionstr = p.rawStringln(b) if s := strings.SplitN(versionstr, " ", 3); len(s) >= 2 && s[0] == "version" { if v, err := strconv.Atoi(s[1]); err == nil && v > 0 { p.version = v } } } // read version specific flags - extend as necessary switch p.version { // case 5: // ... // fallthrough case 4, 3, 2, 1: p.debugFormat = p.rawStringln(p.rawByte()) == "debug" p.trackAllTypes = p.bool() p.posInfoFormat = p.bool() case 0: // Go1.7 encoding format - nothing to do here default: formatErrorf("unknown export format version %d (%q)", p.version, versionstr) } // --- generic export data --- // populate typList with predeclared "known" types p.typList = append(p.typList, predeclared()...) // read package data p.pkg() // defer some type-checking until all types are read in completely tcok := typecheckok typecheckok = true defercheckwidth() // read objects // phase 1 objcount := 0 for { tag := p.tagOrIndex() if tag == endTag { break } p.obj(tag) objcount++ } // self-verification if count := p.int(); count != objcount { formatErrorf("got %d objects; want %d", objcount, count) } // --- compiler-specific export data --- // read compiler-specific flags // phase 2 objcount = 0 for { tag := p.tagOrIndex() if tag == endTag { break } p.obj(tag) objcount++ } // self-verification if count := p.int(); count != objcount { formatErrorf("got %d objects; want %d", objcount, count) } // read inlineable functions bodies if dclcontext != PEXTERN { formatErrorf("unexpected context %d", dclcontext) } objcount = 0 for i0 := -1; ; { i := p.int() // index of function with inlineable body if i < 0 { break } // don't process the same function twice if i <= i0 { formatErrorf("index not increasing: %d <= %d", i, i0) } i0 = i if funcdepth != 0 { formatErrorf("unexpected Funcdepth %d", funcdepth) } // Note: In the original code, funchdr and funcbody are called for // all functions (that were not yet imported). Now, we are calling // them only for functions with inlineable bodies. funchdr does // parameter renaming which doesn't matter if we don't have a body. if f := p.funcList[i]; f != nil { // function not yet imported - read body and set it funchdr(f) body := p.stmtList() if body == nil { // Make sure empty body is not interpreted as // no inlineable body (see also parser.fnbody) // (not doing so can cause significant performance // degradation due to unnecessary calls to empty // functions). body = []*Node{nod(OEMPTY, nil, nil)} } f.Func.Inl.Set(body) funcbody(f) } else { // function already imported - read body but discard declarations dclcontext = PDISCARD // throw away any declarations p.stmtList() dclcontext = PEXTERN } objcount++ } // self-verification if count := p.int(); count != objcount { formatErrorf("got %d functions; want %d", objcount, count) } if dclcontext != PEXTERN { formatErrorf("unexpected context %d", dclcontext) } p.verifyTypes() // --- end of export data --- typecheckok = tcok resumecheckwidth() if debug_dclstack != 0 { testdclstack() } } func formatErrorf(format string, args ...interface{}) { if debugFormat { Fatalf(format, args...) } yyerror("cannot import %q due to version skew - reinstall package (%s)", importpkg.Path, fmt.Sprintf(format, args...)) errorexit() } func (p *importer) verifyTypes() { for _, pair := range p.cmpList { pt := pair.pt t := pair.t if !eqtype(pt.Orig, t) { formatErrorf("inconsistent definition for type %v during import\n\t%L (in %q)\n\t%L (in %q)", pt.Sym, pt, pt.Sym.Importdef.Path, t, importpkg.Path) } } } // numImport tracks how often a package with a given name is imported. // It is used to provide a better error message (by using the package // path to disambiguate) if a package that appears multiple times with // the same name appears in an error message. var numImport = make(map[string]int) func (p *importer) pkg() *Pkg { // if the package was seen before, i is its index (>= 0) i := p.tagOrIndex() if i >= 0 { return p.pkgList[i] } // otherwise, i is the package tag (< 0) if i != packageTag { formatErrorf("expected package tag, found tag = %d", i) } // read package data name := p.string() path := p.string() // we should never see an empty package name if name == "" { formatErrorf("empty package name for path %q", path) } // we should never see a bad import path if isbadimport(path) { formatErrorf("bad package path %q for package %s", path, name) } // an empty path denotes the package we are currently importing; // it must be the first package we see if (path == "") != (len(p.pkgList) == 0) { formatErrorf("package path %q for pkg index %d", path, len(p.pkgList)) } // add package to pkgList pkg := importpkg if path != "" { pkg = mkpkg(path) } if pkg.Name == "" { pkg.Name = name numImport[name]++ } else if pkg.Name != name { yyerror("conflicting package names %s and %s for path %q", pkg.Name, name, path) } if myimportpath != "" && path == myimportpath { yyerror("import %q: package depends on %q (import cycle)", importpkg.Path, path) errorexit() } p.pkgList = append(p.pkgList, pkg) return pkg } func idealType(typ *Type) *Type { if typ.IsUntyped() { // canonicalize ideal types typ = Types[TIDEAL] } return typ } func (p *importer) obj(tag int) { switch tag { case constTag: p.pos() sym := p.qualifiedName() typ := p.typ() val := p.value(typ) importconst(sym, idealType(typ), nodlit(val)) case aliasTag: p.pos() sym := p.qualifiedName() typ := p.typ() importalias(sym, typ) case typeTag: p.typ() case varTag: p.pos() sym := p.qualifiedName() typ := p.typ() importvar(sym, typ) case funcTag: p.pos() sym := p.qualifiedName() params := p.paramList() result := p.paramList() sig := functypefield(nil, params, result) importsym(sym, ONAME) if sym.Def != nil && sym.Def.Op == ONAME { // function was imported before (via another import) if !eqtype(sig, sym.Def.Type) { formatErrorf("inconsistent definition for func %v during import\n\t%v\n\t%v", sym, sym.Def.Type, sig) } p.funcList = append(p.funcList, nil) break } n := newfuncname(sym) n.Type = sig declare(n, PFUNC) p.funcList = append(p.funcList, n) importlist = append(importlist, n) if Debug['E'] > 0 { fmt.Printf("import [%q] func %v \n", importpkg.Path, n) if Debug['m'] > 2 && n.Func.Inl.Len() != 0 { fmt.Printf("inl body: %v\n", n.Func.Inl) } } default: formatErrorf("unexpected object (tag = %d)", tag) } } func (p *importer) pos() { if !p.posInfoFormat { return } file := p.prevFile line := p.prevLine if delta := p.int(); delta != 0 { // line changed line += delta } else if n := p.int(); n >= 0 { // file changed file = p.prevFile[:n] + p.string() p.prevFile = file line = p.int() } p.prevLine = line // TODO(gri) register new position } func (p *importer) newtyp(etype EType) *Type { t := typ(etype) if p.trackAllTypes { p.typList = append(p.typList, t) } return t } // importtype declares that pt, an imported named type, has underlying type t. func (p *importer) importtype(pt, t *Type) { if pt.Etype == TFORW { n := pt.nod copytype(pt.nod, t) pt.nod = n // unzero nod pt.Sym.Importdef = importpkg pt.Sym.Lastlineno = lineno declare(n, PEXTERN) checkwidth(pt) } else { // pt.Orig and t must be identical. if p.trackAllTypes { // If we track all types, t may not be fully set up yet. // Collect the types and verify identity later. p.cmpList = append(p.cmpList, struct{ pt, t *Type }{pt, t}) } else if !eqtype(pt.Orig, t) { yyerror("inconsistent definition for type %v during import\n\t%L (in %q)\n\t%L (in %q)", pt.Sym, pt, pt.Sym.Importdef.Path, t, importpkg.Path) } } if Debug['E'] != 0 { fmt.Printf("import type %v %L\n", pt, t) } } func (p *importer) typ() *Type { // if the type was seen before, i is its index (>= 0) i := p.tagOrIndex() if i >= 0 { return p.typList[i] } // otherwise, i is the type tag (< 0) var t *Type switch i { case namedTag: p.pos() tsym := p.qualifiedName() t = pkgtype(tsym) p.typList = append(p.typList, t) // read underlying type t0 := p.typ() p.importtype(t, t0) // interfaces don't have associated methods if t0.IsInterface() { break } // set correct import context (since p.typ() may be called // while importing the body of an inlined function) savedContext := dclcontext dclcontext = PEXTERN // read associated methods for i := p.int(); i > 0; i-- { p.pos() sym := p.fieldSym() // during import unexported method names should be in the type's package if !exportname(sym.Name) && sym.Pkg != tsym.Pkg { Fatalf("imported method name %+v in wrong package %s\n", sym, tsym.Pkg.Name) } recv := p.paramList() // TODO(gri) do we need a full param list for the receiver? params := p.paramList() result := p.paramList() nointerface := p.bool() n := newfuncname(methodname(sym, recv[0].Type)) n.Type = functypefield(recv[0], params, result) checkwidth(n.Type) addmethod(sym, n.Type, false, nointerface) p.funcList = append(p.funcList, n) importlist = append(importlist, n) // (comment from parser.go) // inl.C's inlnode in on a dotmeth node expects to find the inlineable body as // (dotmeth's type).Nname.Inl, and dotmeth's type has been pulled // out by typecheck's lookdot as this $$.ttype. So by providing // this back link here we avoid special casing there. n.Type.SetNname(n) if Debug['E'] > 0 { fmt.Printf("import [%q] meth %v \n", importpkg.Path, n) if Debug['m'] > 2 && n.Func.Inl.Len() != 0 { fmt.Printf("inl body: %v\n", n.Func.Inl) } } } dclcontext = savedContext case arrayTag: t = p.newtyp(TARRAY) bound := p.int64() elem := p.typ() t.Extra = &ArrayType{Elem: elem, Bound: bound} case sliceTag: t = p.newtyp(TSLICE) elem := p.typ() t.Extra = SliceType{Elem: elem} case dddTag: t = p.newtyp(TDDDFIELD) t.Extra = DDDFieldType{T: p.typ()} case structTag: t = p.newtyp(TSTRUCT) t.SetFields(p.fieldList()) checkwidth(t) case pointerTag: t = p.newtyp(Tptr) t.Extra = PtrType{Elem: p.typ()} case signatureTag: t = p.newtyp(TFUNC) params := p.paramList() result := p.paramList() functypefield0(t, nil, params, result) case interfaceTag: t = p.newtyp(TINTER) if p.int() != 0 { formatErrorf("unexpected embedded interface") } t.SetFields(p.methodList()) checkwidth(t) case mapTag: t = p.newtyp(TMAP) mt := t.MapType() mt.Key = p.typ() mt.Val = p.typ() case chanTag: t = p.newtyp(TCHAN) ct := t.ChanType() ct.Dir = ChanDir(p.int()) ct.Elem = p.typ() default: formatErrorf("unexpected type (tag = %d)", i) } if t == nil { formatErrorf("nil type (type tag = %d)", i) } return t } func (p *importer) qualifiedName() *Sym { name := p.string() pkg := p.pkg() return pkg.Lookup(name) } func (p *importer) fieldList() (fields []*Field) { if n := p.int(); n > 0 { fields = make([]*Field, n) for i := range fields { fields[i] = p.field() } } return } func (p *importer) field() *Field { p.pos() sym, alias := p.fieldName() typ := p.typ() note := p.string() f := newField() if sym.Name == "" { // anonymous field: typ must be T or *T and T must be a type name s := typ.Sym if s == nil && typ.IsPtr() { s = typ.Elem().Sym // deref } sym = sym.Pkg.Lookup(s.Name) f.Embedded = 1 } else if alias { // anonymous field: we have an explicit name because it's a type alias f.Embedded = 1 } f.Sym = sym f.Nname = newname(sym) f.Type = typ f.Note = note return f } func (p *importer) methodList() (methods []*Field) { if n := p.int(); n > 0 { methods = make([]*Field, n) for i := range methods { methods[i] = p.method() } } return } func (p *importer) method() *Field { p.pos() sym := p.methodName() params := p.paramList() result := p.paramList() f := newField() f.Sym = sym f.Nname = newname(sym) f.Type = functypefield(fakethisfield(), params, result) return f } func (p *importer) fieldName() (*Sym, bool) { name := p.string() if p.version == 0 && name == "_" { // version 0 didn't export a package for _ field names // but used the builtin package instead return builtinpkg.Lookup(name), false } pkg := localpkg alias := false switch name { case "": // 1) field name matches base type name and is exported: nothing to do case "?": // 2) field name matches base type name and is not exported: need package name = "" pkg = p.pkg() case "@": // 3) field name doesn't match base type name (alias name): need name and possibly package name = p.string() alias = true fallthrough default: if !exportname(name) { pkg = p.pkg() } } return pkg.Lookup(name), alias } func (p *importer) methodName() *Sym { name := p.string() if p.version == 0 && name == "_" { // version 0 didn't export a package for _ method names // but used the builtin package instead return builtinpkg.Lookup(name) } pkg := localpkg if !exportname(name) { pkg = p.pkg() } return pkg.Lookup(name) } func (p *importer) paramList() []*Field { i := p.int() if i == 0 { return nil } // negative length indicates unnamed parameters named := true if i < 0 { i = -i named = false } // i > 0 fs := make([]*Field, i) for i := range fs { fs[i] = p.param(named) } return fs } func (p *importer) param(named bool) *Field { f := newField() f.Type = p.typ() if f.Type.Etype == TDDDFIELD { // TDDDFIELD indicates wrapped ... slice type f.Type = typSlice(f.Type.DDDField()) f.Isddd = true } if named { name := p.string() if name == "" { formatErrorf("expected named parameter") } // TODO(gri) Supply function/method package rather than // encoding the package for each parameter repeatedly. pkg := localpkg if name != "_" { pkg = p.pkg() } f.Sym = pkg.Lookup(name) f.Nname = newname(f.Sym) } // TODO(gri) This is compiler-specific (escape info). // Move into compiler-specific section eventually? f.Note = p.string() return f } func (p *importer) value(typ *Type) (x Val) { switch tag := p.tagOrIndex(); tag { case falseTag: x.U = false case trueTag: x.U = true case int64Tag: u := new(Mpint) u.SetInt64(p.int64()) u.Rune = typ == idealrune x.U = u case floatTag: f := newMpflt() p.float(f) if typ == idealint || typ.IsInteger() { // uncommon case: large int encoded as float u := new(Mpint) u.SetFloat(f) x.U = u break } x.U = f case complexTag: u := new(Mpcplx) p.float(&u.Real) p.float(&u.Imag) x.U = u case stringTag: x.U = p.string() case unknownTag: formatErrorf("unknown constant (importing package with errors)") case nilTag: x.U = new(NilVal) default: formatErrorf("unexpected value tag %d", tag) } // verify ideal type if typ.IsUntyped() && untype(x.Ctype()) != typ { formatErrorf("value %v and type %v don't match", x, typ) } return } func (p *importer) float(x *Mpflt) { sign := p.int() if sign == 0 { x.SetFloat64(0) return } exp := p.int() mant := new(big.Int).SetBytes([]byte(p.string())) m := x.Val.SetInt(mant) m.SetMantExp(m, exp-mant.BitLen()) if sign < 0 { m.Neg(m) } } // ---------------------------------------------------------------------------- // Inlined function bodies // Approach: Read nodes and use them to create/declare the same data structures // as done originally by the (hidden) parser by closely following the parser's // original code. In other words, "parsing" the import data (which happens to // be encoded in binary rather textual form) is the best way at the moment to // re-establish the syntax tree's invariants. At some future point we might be // able to avoid this round-about way and create the rewritten nodes directly, // possibly avoiding a lot of duplicate work (name resolution, type checking). // // Refined nodes (e.g., ODOTPTR as a refinement of OXDOT) are exported as their // unrefined nodes (since this is what the importer uses). The respective case // entries are unreachable in the importer. func (p *importer) stmtList() []*Node { var list []*Node for { n := p.node() if n == nil { break } // OBLOCK nodes may be created when importing ODCL nodes - unpack them if n.Op == OBLOCK { list = append(list, n.List.Slice()...) } else { list = append(list, n) } } return list } func (p *importer) exprList() []*Node { var list []*Node for { n := p.expr() if n == nil { break } list = append(list, n) } return list } func (p *importer) elemList() []*Node { c := p.int() list := make([]*Node, c) for i := range list { s := p.fieldSym() list[i] = nodSym(OSTRUCTKEY, p.expr(), s) } return list } func (p *importer) expr() *Node { n := p.node() if n != nil && n.Op == OBLOCK { Fatalf("unexpected block node: %v", n) } return n } // TODO(gri) split into expr and stmt func (p *importer) node() *Node { switch op := p.op(); op { // expressions // case OPAREN: // unreachable - unpacked by exporter // case ODDDARG: // unimplemented case OLITERAL: typ := p.typ() n := nodlit(p.value(typ)) if !typ.IsUntyped() { // Type-checking simplifies unsafe.Pointer(uintptr(c)) // to unsafe.Pointer(c) which then cannot type-checked // again. Re-introduce explicit uintptr(c) conversion. // (issue 16317). if typ.IsUnsafePtr() { conv := nod(OCALL, typenod(Types[TUINTPTR]), nil) conv.List.Set1(n) n = conv } conv := nod(OCALL, typenod(typ), nil) conv.List.Set1(n) n = conv } return n case ONAME: return mkname(p.sym()) // case OPACK, ONONAME: // unreachable - should have been resolved by typechecking case OTYPE: if p.bool() { return mkname(p.sym()) } return typenod(p.typ()) // case OTARRAY, OTMAP, OTCHAN, OTSTRUCT, OTINTER, OTFUNC: // unreachable - should have been resolved by typechecking // case OCLOSURE: // unimplemented case OPTRLIT: n := p.expr() if !p.bool() /* !implicit, i.e. '&' operator */ { if n.Op == OCOMPLIT { // Special case for &T{...}: turn into (*T){...}. n.Right = nod(OIND, n.Right, nil) n.Right.Implicit = true } else { n = nod(OADDR, n, nil) } } return n case OSTRUCTLIT: n := nod(OCOMPLIT, nil, typenod(p.typ())) n.List.Set(p.elemList()) // special handling of field names return n // case OARRAYLIT, OSLICELIT, OMAPLIT: // unreachable - mapped to case OCOMPLIT below by exporter case OCOMPLIT: n := nod(OCOMPLIT, nil, typenod(p.typ())) n.List.Set(p.exprList()) return n case OKEY: left, right := p.exprsOrNil() return nod(OKEY, left, right) // case OSTRUCTKEY: // unreachable - handled in case OSTRUCTLIT by elemList // case OCALLPART: // unimplemented // case OXDOT, ODOT, ODOTPTR, ODOTINTER, ODOTMETH: // unreachable - mapped to case OXDOT below by exporter case OXDOT: // see parser.new_dotname return nodSym(OXDOT, p.expr(), p.fieldSym()) // case ODOTTYPE, ODOTTYPE2: // unreachable - mapped to case ODOTTYPE below by exporter case ODOTTYPE: n := nod(ODOTTYPE, p.expr(), nil) if p.bool() { n.Right = p.expr() } else { n.Right = typenod(p.typ()) } return n // case OINDEX, OINDEXMAP, OSLICE, OSLICESTR, OSLICEARR, OSLICE3, OSLICE3ARR: // unreachable - mapped to cases below by exporter case OINDEX: return nod(op, p.expr(), p.expr()) case OSLICE, OSLICE3: n := nod(op, p.expr(), nil) low, high := p.exprsOrNil() var max *Node if n.Op.IsSlice3() { max = p.expr() } n.SetSliceBounds(low, high, max) return n // case OCONV, OCONVIFACE, OCONVNOP, OARRAYBYTESTR, OARRAYRUNESTR, OSTRARRAYBYTE, OSTRARRAYRUNE, ORUNESTR: // unreachable - mapped to OCONV case below by exporter case OCONV: n := nod(OCALL, typenod(p.typ()), nil) n.List.Set(p.exprList()) return n case OCOPY, OCOMPLEX, OREAL, OIMAG, OAPPEND, OCAP, OCLOSE, ODELETE, OLEN, OMAKE, ONEW, OPANIC, ORECOVER, OPRINT, OPRINTN: n := builtinCall(op) n.List.Set(p.exprList()) if op == OAPPEND { n.Isddd = p.bool() } return n // case OCALL, OCALLFUNC, OCALLMETH, OCALLINTER, OGETG: // unreachable - mapped to OCALL case below by exporter case OCALL: n := nod(OCALL, p.expr(), nil) n.List.Set(p.exprList()) n.Isddd = p.bool() return n case OMAKEMAP, OMAKECHAN, OMAKESLICE: n := builtinCall(OMAKE) n.List.Append(typenod(p.typ())) n.List.Append(p.exprList()...) return n // unary expressions case OPLUS, OMINUS, OADDR, OCOM, OIND, ONOT, ORECV: return nod(op, p.expr(), nil) // binary expressions case OADD, OAND, OANDAND, OANDNOT, ODIV, OEQ, OGE, OGT, OLE, OLT, OLSH, OMOD, OMUL, ONE, OOR, OOROR, ORSH, OSEND, OSUB, OXOR: return nod(op, p.expr(), p.expr()) case OADDSTR: list := p.exprList() x := list[0] for _, y := range list[1:] { x = nod(OADD, x, y) } return x // case OCMPSTR, OCMPIFACE: // unreachable - mapped to std comparison operators by exporter case ODCLCONST: // TODO(gri) these should not be exported in the first place return nod(OEMPTY, nil, nil) // -------------------------------------------------------------------- // statements case ODCL: if p.version < 2 { // versions 0 and 1 exported a bool here but it // was always false - simply ignore in this case p.bool() } lhs := dclname(p.sym()) typ := typenod(p.typ()) return liststmt(variter([]*Node{lhs}, typ, nil)) // TODO(gri) avoid list creation // case ODCLFIELD: // unimplemented // case OAS, OASWB: // unreachable - mapped to OAS case below by exporter case OAS: return nod(OAS, p.expr(), p.expr()) case OASOP: n := nod(OASOP, nil, nil) n.Etype = EType(p.int()) n.Left = p.expr() if !p.bool() { n.Right = nodintconst(1) n.Implicit = true } else { n.Right = p.expr() } return n // case OAS2DOTTYPE, OAS2FUNC, OAS2MAPR, OAS2RECV: // unreachable - mapped to OAS2 case below by exporter case OAS2: n := nod(OAS2, nil, nil) n.List.Set(p.exprList()) n.Rlist.Set(p.exprList()) return n case ORETURN: n := nod(ORETURN, nil, nil) n.List.Set(p.exprList()) return n // case ORETJMP: // unreachable - generated by compiler for trampolin routines (not exported) case OPROC, ODEFER: return nod(op, p.expr(), nil) case OIF: markdcl() n := nod(OIF, nil, nil) n.Ninit.Set(p.stmtList()) n.Left = p.expr() n.Nbody.Set(p.stmtList()) n.Rlist.Set(p.stmtList()) popdcl() return n case OFOR: markdcl() n := nod(OFOR, nil, nil) n.Ninit.Set(p.stmtList()) n.Left, n.Right = p.exprsOrNil() n.Nbody.Set(p.stmtList()) popdcl() return n case ORANGE: markdcl() n := nod(ORANGE, nil, nil) n.List.Set(p.stmtList()) n.Right = p.expr() n.Nbody.Set(p.stmtList()) popdcl() return n case OSELECT, OSWITCH: markdcl() n := nod(op, nil, nil) n.Ninit.Set(p.stmtList()) n.Left, _ = p.exprsOrNil() n.List.Set(p.stmtList()) popdcl() return n // case OCASE, OXCASE: // unreachable - mapped to OXCASE case below by exporter case OXCASE: markdcl() n := nod(OXCASE, nil, nil) n.Xoffset = int64(block) n.List.Set(p.exprList()) // TODO(gri) eventually we must declare variables for type switch // statements (type switch statements are not yet exported) n.Nbody.Set(p.stmtList()) popdcl() return n // case OFALL: // unreachable - mapped to OXFALL case below by exporter case OXFALL: n := nod(OXFALL, nil, nil) n.Xoffset = int64(block) return n case OBREAK, OCONTINUE: left, _ := p.exprsOrNil() if left != nil { left = newname(left.Sym) } return nod(op, left, nil) // case OEMPTY: // unreachable - not emitted by exporter case OGOTO, OLABEL: n := nod(op, newname(p.expr().Sym), nil) n.Sym = dclstack // context, for goto restrictions return n case OEND: return nil default: Fatalf("cannot import %v (%d) node\n"+ "==> please file an issue and assign to gri@\n", op, int(op)) panic("unreachable") // satisfy compiler } } func builtinCall(op Op) *Node { return nod(OCALL, mkname(builtinpkg.Lookup(goopnames[op])), nil) } func (p *importer) exprsOrNil() (a, b *Node) { ab := p.int() if ab&1 != 0 { a = p.expr() } if ab&2 != 0 { b = p.expr() } return } func (p *importer) fieldSym() *Sym { name := p.string() pkg := localpkg if !exportname(name) { pkg = p.pkg() } return pkg.Lookup(name) } func (p *importer) sym() *Sym { name := p.string() pkg := localpkg if name != "_" { pkg = p.pkg() } return pkg.Lookup(name) } func (p *importer) bool() bool { return p.int() != 0 } func (p *importer) op() Op { return Op(p.int()) } // ---------------------------------------------------------------------------- // Low-level decoders func (p *importer) tagOrIndex() int { if p.debugFormat { p.marker('t') } return int(p.rawInt64()) } func (p *importer) int() int { x := p.int64() if int64(int(x)) != x { formatErrorf("exported integer too large") } return int(x) } func (p *importer) int64() int64 { if p.debugFormat { p.marker('i') } return p.rawInt64() } func (p *importer) string() string { if p.debugFormat { p.marker('s') } // if the string was seen before, i is its index (>= 0) // (the empty string is at index 0) i := p.rawInt64() if i >= 0 { return p.strList[i] } // otherwise, i is the negative string length (< 0) if n := int(-i); n <= cap(p.buf) { p.buf = p.buf[:n] } else { p.buf = make([]byte, n) } for i := range p.buf { p.buf[i] = p.rawByte() } s := string(p.buf) p.strList = append(p.strList, s) return s } func (p *importer) marker(want byte) { if got := p.rawByte(); got != want { formatErrorf("incorrect marker: got %c; want %c (pos = %d)", got, want, p.read) } pos := p.read if n := int(p.rawInt64()); n != pos { formatErrorf("incorrect position: got %d; want %d", n, pos) } } // rawInt64 should only be used by low-level decoders. func (p *importer) rawInt64() int64 { i, err := binary.ReadVarint(p) if err != nil { formatErrorf("read error: %v", err) } return i } // rawStringln should only be used to read the initial version string. func (p *importer) rawStringln(b byte) string { p.buf = p.buf[:0] for b != '\n' { p.buf = append(p.buf, b) b = p.rawByte() } return string(p.buf) } // needed for binary.ReadVarint in rawInt64 func (p *importer) ReadByte() (byte, error) { return p.rawByte(), nil } // rawByte is the bottleneck interface for reading from p.in. // It unescapes '|' 'S' to '$' and '|' '|' to '|'. // rawByte should only be used by low-level decoders. func (p *importer) rawByte() byte { c, err := p.in.ReadByte() p.read++ if err != nil { formatErrorf("read error: %v", err) } if c == '|' { c, err = p.in.ReadByte() p.read++ if err != nil { formatErrorf("read error: %v", err) } switch c { case 'S': c = '$' case '|': // nothing to do default: formatErrorf("unexpected escape sequence in export data") } } return c }
{ "pile_set_name": "Github" }
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280 stf0: flags=0<> mtu 1280 en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet6 fe80::217:f2ff:fe06:e42e%en0 prefixlen 64 scopeid 0x4 inet 100.100.107.4 netmask 0xffffff00 broadcast 100.100.107.255 ether 00:17:f2:06:e4:2e media: autoselect (1000baseT <full-duplex>) status: active supported media: autoselect 10baseT/UTP <half-duplex> 10baseT/UTP <full-duplex> 10baseT/UTP <full-duplex,hw-loopback> 10baseT/UTP <full-duplex,flow-control> 100baseTX <half-duplex> 100baseTX <full-duplex> 100baseTX <full-duplex,hw-loopback> 100baseTX <full-duplex,flow-control> 1000baseT <full-duplex> 1000baseT <full-duplex,hw-loopback> 1000baseT <full-duplex,flow-control> en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 ether 00:17:f2:06:e4:2f media: autoselect status: inactive supported media: autoselect 10baseT/UTP <half-duplex> 10baseT/UTP <full-duplex> 10baseT/UTP <full-duplex,hw-loopback> 10baseT/UTP <full-duplex,flow-control> 100baseTX <half-duplex> 100baseTX <full-duplex> 100baseTX <full-duplex,hw-loopback> 100baseTX <full-duplex,flow-control> 1000baseT <full-duplex> 1000baseT <full-duplex,hw-loopback> 1000baseT <full-duplex,flow-control> fw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 2030 lladdr 00:16:cb:ff:fe:76:66:f2 media: autoselect <full-duplex> status: inactive supported media: autoselect <full-duplex> vmnet8: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet 192.168.210.1 netmask 0xffffff00 broadcast 192.168.210.255 ether 00:50:56:c0:00:08 vmnet1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet 192.168.61.1 netmask 0xffffff00 broadcast 192.168.61.255 ether 00:50:56:c0:00:01
{ "pile_set_name": "Github" }
_ 20136 e 6892 i 5604 a 5443 u 4581 t 4552 s 4354 r 3923 n 3375 m 3063 o 2921 c 2224 l 1805 e_ 1625 s_ 1503 p 1424 d 1397 , 1285 ,_ 1276 er 1077 qu 1028 q 1028 a_ 1019 t_ 1018 is 942 _a 921 re 902 m_ 891 v 858 b 821 um 808 _s 773 us 772 en 766 nt 733 in 729 ue 727 te 720 g 718 _i 710 _p 679 it 676 _c 669 et 653 que 652 _e 643 at 643 ue_ 616 ra 614 que_ 611 f 601 or 598 ri 576 ti 572 ta 559 tu 552 an 551 ae 527 _m 513 am 501 _t 493 us_ 488 is_ 487 es 479 em 479 _f 451 um_ 443 _v 442 ia 442 li 438 _d 436 . 432 i_ 430 et_ 429 ni 412 ne 409 h 406 de 404 ur 396 ._ 392 ar 388 os 388 mi 382 pe 382 la 376 st 371 s, 368 di 367 _et 366 s,_ 365 _in 363 on 360 o_ 359 _n 351 _et_ 351 as 346 im 336 na 327 se 320 ma 315 cu 307 vi 306 si 303 ro 303 r_ 302 su 299 un 295 _l 291 to 291 ec 290 ci 288 co 287 _r 287 ere 286 ce 284 tr 280 re_ 278 ent 275 x 275 ct 274 ve 271 ru 259 ul 256 me 255 ui 255 c_ 252 _o 250 ic 249 ns 247 _qu 242 _q 242 no 241 ant 235 am_ 235 _co 233 sa 231 ca 230 t, 226 mu 225 t,_ 225 _re 223 el 222 ib 222 id 218 om 212 _te 211 al 209 le 209 it_ 208 mo 208 ol 206 _u 203 ; 199 _h 199 ac 198 ;_ 198 bu 197 nu 196 ua 195 n_ 195 ll 194 tis 191 A 189 rt 188 ge 188 nd 187 au 187 lu 186 iu 185 squ 185 per 185 sq 185 ter 185 pa 183 _A 183 em_ 183 ia_ 180 ed 179 _pe 178 m, 176 sque 175 _su 175 ae_ 175 m,_ 175 pr 175 bi 175 bus 174 _vi 174 os_ 173 ta_ 172 mqu 171 mq 171 ss 170 sque_ 169 ibu 167 ad 166 ibus 165 I 164 nte 163 ra_ 163 mque 162 _de 162 po 161 _se 160 ere_ 160 nc 160 qua 159 T 159 lo 157 oc 156 mque_ 156 _T 155 _pa 155 _pr 155 tem 154 bus_ 152 nti 149 rum 149 er_ 149 ab 148 ir 148 da 147 _ve 146 ibus_ 146 ex 146 ut 145 pi 145 tur 145 _ca 143 _me 142 es_ 142 gi 142 te_ 141 _I 141 vo 141 do 141 _si 140 tus 139 il 137 _ar 136 du 133 nt_ 133 uc 133 fa 132 as_ 132 rr 131 ba 130 _ad 128 ne_ 127 _ma 127 ens 127 gn 126 s. 126 y 126 min 125 ris 124 in_ 123 tum 123 P 123 _g 123 mp 123 e, 122 io 122 _P 122 ea 122 hi 122 e,_ 121 era 120 sc 120 _la 120 qui 120 unt 120 fe 119 _in_ 118 _no 118 ore 118 iam 118 va 117 tis_ 117 s._ 117 at_ 117 eri 116 d_ 116 con 115 fu 115 pu 114 cum 114 ub 114 ng 114 ine 113 _au 113 : 113 _di 112 ag 111 _con 111 ect 111 i, 111 equ 111 i,_ 111 be 111 eq 111 _po 110 so 110 :_ 110 nis 109 ha 109 uo 109 _fa 108 na_ 107 ip 107 is, 107 _cu 106 cr 106 ate 105 is,_ 105 ig 105 tor 105 rat 104 _qua 103 eg 103 a, 103 a,_ 102 tra 102 _mo 101 sp 101 mis 100 itu 100 D 99 ali 99 eb 99 eni 99 _sa 98 ie 98 imu 98 _ex 97 _D 96 res 95 est 94 tri 94 ene 94 _mi 94 str 94 enti 93 t. 92 av 92 _per 91 ur_ 91 ora 91 lt 91 umqu 90 _vo 90 umq 90 up 89 t._ 88 quo 88 _ne 88 gen 88 rum_ 87 tqu 87 tq 87 _fu 86 ep 86 ma_ 86 umque 86 it,_ 85 ine_ 85 it, 85 men 85 mus 84 ort 83 ven 83 ina 83 us,_ 83 us, 83 tque 82 _ge 82 per_ 82 mor 82 inc 82 are 81 tus_ 81 _an 81 rim 81 tque_ 81 ot 81 ani 80 H 80 _tu 80 ho 80 tem_ 80 u_ 80 ser 79 um,_ 79 um, 79 S 79 ten 79 ver 79 sti 79 ntu 78 fer 78
{ "pile_set_name": "Github" }
// !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; 00E356F31AD99517003FC87E /* exampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* exampleTests.m */; }; 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */; }; 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */; }; 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */; }; 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */; }; 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */; }; 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */; }; 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */; }; 2D02E4C91E0B4AEC006451C7 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; }; 2DCD954D1E0B4F2C00145EB5 /* exampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* exampleTests.m */; }; 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; proxyType = 2; remoteGlobalIDString = 134814201AA4EA6300B7C361; remoteInfo = RCTActionSheet; }; 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; proxyType = 2; remoteGlobalIDString = 134814201AA4EA6300B7C361; remoteInfo = RCTGeolocation; }; 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; proxyType = 2; remoteGlobalIDString = 58B5115D1A9E6B3D00147676; remoteInfo = RCTImage; }; 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; proxyType = 2; remoteGlobalIDString = 58B511DB1A9E6C8500147676; remoteInfo = RCTNetwork; }; 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; proxyType = 2; remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; remoteInfo = RCTVibration; }; 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; proxyType = 1; remoteGlobalIDString = 13B07F861A680F5B00A75B9A; remoteInfo = example; }; 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; proxyType = 2; remoteGlobalIDString = 134814201AA4EA6300B7C361; remoteInfo = RCTSettings; }; 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; proxyType = 2; remoteGlobalIDString = 3C86DF461ADF2C930047B81A; remoteInfo = RCTWebSocket; }; 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; remoteInfo = React; }; 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; proxyType = 1; remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7; remoteInfo = "example-tvOS"; }; 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; proxyType = 2; remoteGlobalIDString = 2D2A283A1D9B042B00D4039D; remoteInfo = "RCTImage-tvOS"; }; 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; proxyType = 2; remoteGlobalIDString = 2D2A28471D9B043800D4039D; remoteInfo = "RCTLinking-tvOS"; }; 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; proxyType = 2; remoteGlobalIDString = 2D2A28541D9B044C00D4039D; remoteInfo = "RCTNetwork-tvOS"; }; 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; proxyType = 2; remoteGlobalIDString = 2D2A28611D9B046600D4039D; remoteInfo = "RCTSettings-tvOS"; }; 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; proxyType = 2; remoteGlobalIDString = 2D2A287B1D9B048500D4039D; remoteInfo = "RCTText-tvOS"; }; 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; proxyType = 2; remoteGlobalIDString = 2D2A28881D9B049200D4039D; remoteInfo = "RCTWebSocket-tvOS"; }; 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = 2D2A28131D9B038B00D4039D; remoteInfo = "React-tvOS"; }; 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = 3D3C059A1DE3340900C268FA; remoteInfo = yoga; }; 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = 3D3C06751DE3340C00C268FA; remoteInfo = "yoga-tvOS"; }; 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = 3D3CD9251DE5FBEC00167DC4; remoteInfo = cxxreact; }; 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4; remoteInfo = "cxxreact-tvOS"; }; 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4; remoteInfo = jschelpers; }; 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4; remoteInfo = "jschelpers-tvOS"; }; 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; proxyType = 2; remoteGlobalIDString = 134814201AA4EA6300B7C361; remoteInfo = RCTAnimation; }; 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; proxyType = 2; remoteGlobalIDString = 2D2A28201D9B03D100D4039D; remoteInfo = "RCTAnimation-tvOS"; }; 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; proxyType = 2; remoteGlobalIDString = 134814201AA4EA6300B7C361; remoteInfo = RCTLinking; }; 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; proxyType = 2; remoteGlobalIDString = 58B5119B1A9E6C1200147676; remoteInfo = RCTText; }; ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; proxyType = 2; remoteGlobalIDString = 358F4ED71D1E81A9004DF814; remoteInfo = RCTBlob; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = "<group>"; }; 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = "<group>"; }; 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = "<group>"; }; 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = "<group>"; }; 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = "<group>"; }; 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = "<group>"; }; 00E356EE1AD99517003FC87E /* exampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = exampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 00E356F21AD99517003FC87E /* exampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = exampleTests.m; sourceTree = "<group>"; }; 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = "<group>"; }; 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = "<group>"; }; 13B07F961A680F5B00A75B9A /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = example/AppDelegate.h; sourceTree = "<group>"; }; 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = example/AppDelegate.m; sourceTree = "<group>"; }; 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; }; 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = example/Images.xcassets; sourceTree = "<group>"; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = example/Info.plist; sourceTree = "<group>"; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = example/main.m; sourceTree = "<group>"; }; 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; }; 2D02E47B1E0B4A5D006451C7 /* example-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "example-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 2D02E4901E0B4A5D006451C7 /* example-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "example-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; }; 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; }; 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; }; ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 00E356EB1AD99517003FC87E /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */, 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */, 146834051AC3E58100842450 /* libReact.a in Frameworks */, 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */, 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; 2D02E4781E0B4A5D006451C7 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 2D02E4C91E0B4AEC006451C7 /* libReact.a in Frameworks */, 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation-tvOS.a in Frameworks */, 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */, 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */, 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */, 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */, 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */, 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; 2D02E48D1E0B4A5D006451C7 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 00C302A81ABCB8CE00DB3ED1 /* Products */ = { isa = PBXGroup; children = ( 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, ); name = Products; sourceTree = "<group>"; }; 00C302B61ABCB90400DB3ED1 /* Products */ = { isa = PBXGroup; children = ( 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, ); name = Products; sourceTree = "<group>"; }; 00C302BC1ABCB91800DB3ED1 /* Products */ = { isa = PBXGroup; children = ( 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */, ); name = Products; sourceTree = "<group>"; }; 00C302D41ABCB9D200DB3ED1 /* Products */ = { isa = PBXGroup; children = ( 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */, ); name = Products; sourceTree = "<group>"; }; 00C302E01ABCB9EE00DB3ED1 /* Products */ = { isa = PBXGroup; children = ( 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, ); name = Products; sourceTree = "<group>"; }; 00E356EF1AD99517003FC87E /* exampleTests */ = { isa = PBXGroup; children = ( 00E356F21AD99517003FC87E /* exampleTests.m */, 00E356F01AD99517003FC87E /* Supporting Files */, ); path = exampleTests; sourceTree = "<group>"; }; 00E356F01AD99517003FC87E /* Supporting Files */ = { isa = PBXGroup; children = ( 00E356F11AD99517003FC87E /* Info.plist */, ); name = "Supporting Files"; sourceTree = "<group>"; }; 139105B71AF99BAD00B5F7CC /* Products */ = { isa = PBXGroup; children = ( 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */, ); name = Products; sourceTree = "<group>"; }; 139FDEE71B06529A00C62182 /* Products */ = { isa = PBXGroup; children = ( 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */, ); name = Products; sourceTree = "<group>"; }; 13B07FAE1A68108700A75B9A /* example */ = { isa = PBXGroup; children = ( 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 13B07FB01A68108700A75B9A /* AppDelegate.m */, 13B07FB51A68108700A75B9A /* Images.xcassets */, 13B07FB61A68108700A75B9A /* Info.plist */, 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 13B07FB71A68108700A75B9A /* main.m */, ); name = example; sourceTree = "<group>"; }; 146834001AC3E56700842450 /* Products */ = { isa = PBXGroup; children = ( 146834041AC3E56700842450 /* libReact.a */, 3DAD3EA31DF850E9000B6D8A /* libReact.a */, 3DAD3EA51DF850E9000B6D8A /* libyoga.a */, 3DAD3EA71DF850E9000B6D8A /* libyoga.a */, 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */, 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */, 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */, 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */, 3DAD3EA31DF850E9000B6D8A /* libReact-tvOS.a */, ); name = Products; sourceTree = "<group>"; }; 5E91572E1DD0AC6500FF2AA8 /* Products */ = { isa = PBXGroup; children = ( 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */, 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */, ); name = Products; sourceTree = "<group>"; }; 78C398B11ACF4ADC00677621 /* Products */ = { isa = PBXGroup; children = ( 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */, ); name = Products; sourceTree = "<group>"; }; 832341AE1AAA6A7D00B99B32 /* Libraries */ = { isa = PBXGroup; children = ( 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */, 146833FF1AC3E56700842450 /* React.xcodeproj */, 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */, 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, ); name = Libraries; sourceTree = "<group>"; }; 832341B11AAA6A8300B99B32 /* Products */ = { isa = PBXGroup; children = ( 832341B51AAA6A8300B99B32 /* libRCTText.a */, 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */, ); name = Products; sourceTree = "<group>"; }; 83CBB9F61A601CBA00E9B192 = { isa = PBXGroup; children = ( 13B07FAE1A68108700A75B9A /* example */, 832341AE1AAA6A7D00B99B32 /* Libraries */, 00E356EF1AD99517003FC87E /* exampleTests */, 83CBBA001A601CBA00E9B192 /* Products */, ); indentWidth = 2; sourceTree = "<group>"; tabWidth = 2; usesTabs = 0; }; 83CBBA001A601CBA00E9B192 /* Products */ = { isa = PBXGroup; children = ( 13B07F961A680F5B00A75B9A /* example.app */, 00E356EE1AD99517003FC87E /* exampleTests.xctest */, 2D02E47B1E0B4A5D006451C7 /* example-tvOS.app */, 2D02E4901E0B4A5D006451C7 /* example-tvOSTests.xctest */, ); name = Products; sourceTree = "<group>"; }; ADBDB9201DFEBF0600ED6528 /* Products */ = { isa = PBXGroup; children = ( ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */, ); name = Products; sourceTree = "<group>"; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ 00E356ED1AD99517003FC87E /* exampleTests */ = { isa = PBXNativeTarget; buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "exampleTests" */; buildPhases = ( 00E356EA1AD99517003FC87E /* Sources */, 00E356EB1AD99517003FC87E /* Frameworks */, 00E356EC1AD99517003FC87E /* Resources */, ); buildRules = ( ); dependencies = ( 00E356F51AD99517003FC87E /* PBXTargetDependency */, ); name = exampleTests; productName = exampleTests; productReference = 00E356EE1AD99517003FC87E /* exampleTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; 13B07F861A680F5B00A75B9A /* example */ = { isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */; buildPhases = ( 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, ); buildRules = ( ); dependencies = ( ); name = example; productName = "Hello World"; productReference = 13B07F961A680F5B00A75B9A /* example.app */; productType = "com.apple.product-type.application"; }; 2D02E47A1E0B4A5D006451C7 /* example-tvOS */ = { isa = PBXNativeTarget; buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "example-tvOS" */; buildPhases = ( 2D02E4771E0B4A5D006451C7 /* Sources */, 2D02E4781E0B4A5D006451C7 /* Frameworks */, 2D02E4791E0B4A5D006451C7 /* Resources */, 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */, ); buildRules = ( ); dependencies = ( ); name = "example-tvOS"; productName = "example-tvOS"; productReference = 2D02E47B1E0B4A5D006451C7 /* example-tvOS.app */; productType = "com.apple.product-type.application"; }; 2D02E48F1E0B4A5D006451C7 /* example-tvOSTests */ = { isa = PBXNativeTarget; buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "example-tvOSTests" */; buildPhases = ( 2D02E48C1E0B4A5D006451C7 /* Sources */, 2D02E48D1E0B4A5D006451C7 /* Frameworks */, 2D02E48E1E0B4A5D006451C7 /* Resources */, ); buildRules = ( ); dependencies = ( 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */, ); name = "example-tvOSTests"; productName = "example-tvOSTests"; productReference = 2D02E4901E0B4A5D006451C7 /* example-tvOSTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 83CBB9F71A601CBA00E9B192 /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 0610; ORGANIZATIONNAME = Facebook; TargetAttributes = { 00E356ED1AD99517003FC87E = { CreatedOnToolsVersion = 6.2; TestTargetID = 13B07F861A680F5B00A75B9A; }; 2D02E47A1E0B4A5D006451C7 = { CreatedOnToolsVersion = 8.2.1; ProvisioningStyle = Automatic; }; 2D02E48F1E0B4A5D006451C7 = { CreatedOnToolsVersion = 8.2.1; ProvisioningStyle = Automatic; TestTargetID = 2D02E47A1E0B4A5D006451C7; }; }; }; buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, Base, ); mainGroup = 83CBB9F61A601CBA00E9B192; productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; projectDirPath = ""; projectReferences = ( { ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; }, { ProductGroup = 5E91572E1DD0AC6500FF2AA8 /* Products */; ProjectRef = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; }, { ProductGroup = ADBDB9201DFEBF0600ED6528 /* Products */; ProjectRef = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; }, { ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; }, { ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; }, { ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; }, { ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; }, { ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; }, { ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; }, { ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; }, { ProductGroup = 139FDEE71B06529A00C62182 /* Products */; ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; }, { ProductGroup = 146834001AC3E56700842450 /* Products */; ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; }, ); projectRoot = ""; targets = ( 13B07F861A680F5B00A75B9A /* example */, 00E356ED1AD99517003FC87E /* exampleTests */, 2D02E47A1E0B4A5D006451C7 /* example-tvOS */, 2D02E48F1E0B4A5D006451C7 /* example-tvOSTests */, ); }; /* End PBXProject section */ /* Begin PBXReferenceProxy section */ 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libRCTActionSheet.a; remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libRCTGeolocation.a; remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libRCTImage.a; remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libRCTNetwork.a; remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libRCTVibration.a; remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libRCTSettings.a; remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libRCTWebSocket.a; remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 146834041AC3E56700842450 /* libReact.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libReact.a; remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libRCTImage-tvOS.a"; remoteRef = 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libRCTLinking-tvOS.a"; remoteRef = 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libRCTNetwork-tvOS.a"; remoteRef = 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libRCTSettings-tvOS.a"; remoteRef = 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libRCTText-tvOS.a"; remoteRef = 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libRCTWebSocket-tvOS.a"; remoteRef = 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3EA31DF850E9000B6D8A /* libReact-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libReact-tvOS.a"; remoteRef = 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3EA51DF850E9000B6D8A /* libyoga.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libyoga.a; remoteRef = 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3EA71DF850E9000B6D8A /* libyoga.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libyoga.a; remoteRef = 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libcxxreact.a; remoteRef = 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libcxxreact.a; remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libjschelpers.a; remoteRef = 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libjschelpers.a; remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libRCTAnimation.a; remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libRCTAnimation-tvOS.a"; remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libRCTLinking.a; remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libRCTText.a; remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libRCTBlob.a; remoteRef = ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ 00E356EC1AD99517003FC87E /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; 13B07F8E1A680F5B00A75B9A /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; 2D02E4791E0B4A5D006451C7 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; 2D02E48E1E0B4A5D006451C7 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); name = "Bundle React Native code and images"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; }; 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); name = "Bundle React Native Code And Images"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 00E356EA1AD99517003FC87E /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 00E356F31AD99517003FC87E /* exampleTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 13B07F871A680F5B00A75B9A /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 13B07FC11A68108700A75B9A /* main.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 2D02E4771E0B4A5D006451C7 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */, 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 2D02E48C1E0B4A5D006451C7 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 2DCD954D1E0B4F2C00145EB5 /* exampleTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 13B07F861A680F5B00A75B9A /* example */; targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; }; 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 2D02E47A1E0B4A5D006451C7 /* example-tvOS */; targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { isa = PBXVariantGroup; children = ( 13B07FB21A68108700A75B9A /* Base */, ); name = LaunchScreen.xib; path = example; sourceTree = "<group>"; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ 00E356F61AD99517003FC87E /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); INFOPLIST_FILE = exampleTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; OTHER_LDFLAGS = ( "-ObjC", "-lc++", ); PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/example"; }; name = Debug; }; 00E356F71AD99517003FC87E /* Release */ = { isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; COPY_PHASE_STRIP = NO; INFOPLIST_FILE = exampleTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; OTHER_LDFLAGS = ( "-ObjC", "-lc++", ); PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/example"; }; name = Release; }; 13B07F941A680F5B00A75B9A /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CURRENT_PROJECT_VERSION = 1; DEAD_CODE_STRIPPING = NO; INFOPLIST_FILE = example/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", "-lc++", ); PRODUCT_NAME = example; VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; }; 13B07F951A680F5B00A75B9A /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CURRENT_PROJECT_VERSION = 1; INFOPLIST_FILE = example/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", "-lc++", ); PRODUCT_NAME = example; VERSIONING_SYSTEM = "apple-generic"; }; name = Release; }; 2D02E4971E0B4A5E006451C7 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CLANG_ANALYZER_NONNULL = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_TESTABILITY = YES; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "example-tvOS/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( "-ObjC", "-lc++", ); PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.example-tvOS"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.2; }; name = Debug; }; 2D02E4981E0B4A5E006451C7 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CLANG_ANALYZER_NONNULL = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "example-tvOS/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( "-ObjC", "-lc++", ); PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.example-tvOS"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.2; }; name = Release; }; 2D02E4991E0B4A5E006451C7 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NONNULL = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_TESTABILITY = YES; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "example-tvOSTests/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.example-tvOSTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example-tvOS.app/example-tvOS"; TVOS_DEPLOYMENT_TARGET = 10.1; }; name = Debug; }; 2D02E49A1E0B4A5E006451C7 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NONNULL = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "example-tvOSTests/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.example-tvOSTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example-tvOS.app/example-tvOS"; TVOS_DEPLOYMENT_TARGET = 10.1; }; name = Release; }; 83CBBA201A601CBA00E9B192 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; name = Debug; }; 83CBBA211A601CBA00E9B192 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "exampleTests" */ = { isa = XCConfigurationList; buildConfigurations = ( 00E356F61AD99517003FC87E /* Debug */, 00E356F71AD99517003FC87E /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */ = { isa = XCConfigurationList; buildConfigurations = ( 13B07F941A680F5B00A75B9A /* Debug */, 13B07F951A680F5B00A75B9A /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "example-tvOS" */ = { isa = XCConfigurationList; buildConfigurations = ( 2D02E4971E0B4A5E006451C7 /* Debug */, 2D02E4981E0B4A5E006451C7 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "example-tvOSTests" */ = { isa = XCConfigurationList; buildConfigurations = ( 2D02E4991E0B4A5E006451C7 /* Debug */, 2D02E49A1E0B4A5E006451C7 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */ = { isa = XCConfigurationList; buildConfigurations = ( 83CBBA201A601CBA00E9B192 /* Debug */, 83CBBA211A601CBA00E9B192 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; }
{ "pile_set_name": "Github" }
//********************************* bs::framework - Copyright 2018-2019 Marko Pintera ************************************// //*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********// #pragma once #include "BsScriptEnginePrerequisites.h" #include "BsScriptObject.h" #include "Image/BsColor.h" namespace bs { /** @addtogroup ScriptInteropEngine * @{ */ /** Interop class between C++ & CLR for ScriptColor. */ class BS_SCR_BE_EXPORT ScriptColor : public ScriptObject <ScriptColor> { public: SCRIPT_OBJ(ENGINE_ASSEMBLY, ENGINE_NS, "Color") /** Unboxes a boxed managed Color struct and returns the native version of the structure. */ static Color unbox(MonoObject* obj); /** Boxes a native Color struct and returns a managed object containing it. */ static MonoObject* box(const Color& value); private: ScriptColor(MonoObject* instance); }; /** @} */ }
{ "pile_set_name": "Github" }
{ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "groupLocation": { "type": "string", "metadata": { "description": "Specifies the location of the Resource Group." } }, "groupName": { "type": "string", "metadata": { "description": "Specifies the name of the Resource Group." } }, "appId": { "type": "string", "metadata": { "description": "Active Directory App ID, set as MicrosoftAppId in the Web App's Application Settings." } }, "appSecret": { "type": "string", "metadata": { "description": "Active Directory App Password, set as MicrosoftAppPassword in the Web App's Application Settings." } }, "botId": { "type": "string", "metadata": { "description": "The globally unique and immutable bot ID. Also used to configure the displayName of the bot, which is mutable." } }, "botSku": { "type": "string", "metadata": { "description": "The pricing tier of the Bot Service Registration. Acceptable values are F0 and S1." } }, "newAppServicePlanName": { "type": "string", "metadata": { "description": "The name of the App Service Plan." } }, "newAppServicePlanSku": { "type": "object", "defaultValue": { "name": "S1", "tier": "Standard", "size": "S1", "family": "S", "capacity": 1 }, "metadata": { "description": "The SKU of the App Service Plan. Defaults to Standard values." } }, "newAppServicePlanLocation": { "type": "string", "metadata": { "description": "The location of the App Service Plan. Defaults to \"westus\"." } }, "newWebAppName": { "type": "string", "defaultValue": "", "metadata": { "description": "The globally unique name of the Web App. Defaults to the value passed in for \"botId\"." } } }, "variables": { "appServicePlanName": "[parameters('newAppServicePlanName')]", "resourcesLocation": "[parameters('newAppServicePlanLocation')]", "webAppName": "[if(empty(parameters('newWebAppName')), parameters('botId'), parameters('newWebAppName'))]", "siteHost": "[concat(variables('webAppName'), '.azurewebsites.net')]", "botEndpoint": "[concat('https://', variables('siteHost'), '/api/messages')]", "resourceGroupId": "[concat(subscription().id, '/resourceGroups/', parameters('groupName'))]" }, "resources": [ { "name": "[parameters('groupName')]", "type": "Microsoft.Resources/resourceGroups", "apiVersion": "2018-05-01", "location": "[parameters('groupLocation')]", "properties": {} }, { "type": "Microsoft.Resources/deployments", "apiVersion": "2018-05-01", "name": "storageDeployment", "resourceGroup": "[parameters('groupName')]", "dependsOn": [ "[resourceId('Microsoft.Resources/resourceGroups/', parameters('groupName'))]" ], "properties": { "mode": "Incremental", "template": { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": {}, "variables": {}, "resources": [ { "comments": "Create a new App Service Plan", "type": "Microsoft.Web/serverfarms", "name": "[variables('appServicePlanName')]", "apiVersion": "2018-02-01", "location": "[variables('resourcesLocation')]", "sku": "[parameters('newAppServicePlanSku')]", "properties": { "name": "[variables('appServicePlanName')]" } }, { "comments": "Create a Web App using the new App Service Plan", "type": "Microsoft.Web/sites", "apiVersion": "2015-08-01", "location": "[variables('resourcesLocation')]", "kind": "app", "dependsOn": [ "[concat(variables('resourceGroupId'), '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]" ], "name": "[variables('webAppName')]", "properties": { "name": "[variables('webAppName')]", "serverFarmId": "[variables('appServicePlanName')]", "siteConfig": { "appSettings": [ { "name": "WEBSITE_NODE_DEFAULT_VERSION", "value": "10.14.1" }, { "name": "MicrosoftAppId", "value": "[parameters('appId')]" }, { "name": "MicrosoftAppPassword", "value": "[parameters('appSecret')]" } ], "cors": { "allowedOrigins": [ "https://botservice.hosting.portal.azure.net", "https://hosting.onecloud.azure-test.net/" ] }, "webSocketsEnabled": true } } }, { "apiVersion": "2017-12-01", "type": "Microsoft.BotService/botServices", "name": "[parameters('botId')]", "location": "global", "kind": "bot", "sku": { "name": "[parameters('botSku')]" }, "properties": { "name": "[parameters('botId')]", "displayName": "[parameters('botId')]", "endpoint": "[variables('botEndpoint')]", "msaAppId": "[parameters('appId')]", "developerAppInsightsApplicationId": null, "developerAppInsightKey": null, "publishingCredentials": null, "storageResourceId": null }, "dependsOn": [ "[concat(variables('resourceGroupId'), '/providers/Microsoft.Web/sites/', variables('webAppName'))]" ] } ], "outputs": {} } } } ] }
{ "pile_set_name": "Github" }
/* * Copyright (C) 2012 Freescale Semiconductor, Inc. * * SPDX-License-Identifier: GPL-2.0+ * * Refer doc/README.imximage for more details about how-to configure * and create imximage boot image * * The syntax is taken as close as possible with the kwbimage */ /* image version */ IMAGE_VERSION 2 /* * Boot Device : one of * spi, sd (the board has no nand neither onenand) */ BOOT_FROM sd /* * Device Configuration Data (DCD) * * Each entry must have the format: * Addr-type Address Value * * where: * Addr-type register length (1,2 or 4 bytes) * Address absolute address of the register * value value to be stored in the register */ DATA 4 0x020e0798 0x000C0000 DATA 4 0x020e0758 0x00000000 DATA 4 0x020e0588 0x00000030 DATA 4 0x020e0594 0x00000030 DATA 4 0x020e056c 0x00000030 DATA 4 0x020e0578 0x00000030 DATA 4 0x020e074c 0x00000030 DATA 4 0x020e057c 0x00000030 DATA 4 0x020e058c 0x00000000 DATA 4 0x020e059c 0x00000030 DATA 4 0x020e05a0 0x00000030 DATA 4 0x020e078c 0x00000030 DATA 4 0x020e0750 0x00020000 DATA 4 0x020e05a8 0x00000028 DATA 4 0x020e05b0 0x00000028 DATA 4 0x020e0524 0x00000028 DATA 4 0x020e051c 0x00000028 DATA 4 0x020e0518 0x00000028 DATA 4 0x020e050c 0x00000028 DATA 4 0x020e05b8 0x00000028 DATA 4 0x020e05c0 0x00000028 DATA 4 0x020e0774 0x00020000 DATA 4 0x020e0784 0x00000028 DATA 4 0x020e0788 0x00000028 DATA 4 0x020e0794 0x00000028 DATA 4 0x020e079c 0x00000028 DATA 4 0x020e07a0 0x00000028 DATA 4 0x020e07a4 0x00000028 DATA 4 0x020e07a8 0x00000028 DATA 4 0x020e0748 0x00000028 DATA 4 0x020e05ac 0x00000028 DATA 4 0x020e05b4 0x00000028 DATA 4 0x020e0528 0x00000028 DATA 4 0x020e0520 0x00000028 DATA 4 0x020e0514 0x00000028 DATA 4 0x020e0510 0x00000028 DATA 4 0x020e05bc 0x00000028 DATA 4 0x020e05c4 0x00000028 DATA 4 0x021b0800 0xa1390003 DATA 4 0x021b080c 0x001F001F DATA 4 0x021b0810 0x001F001F DATA 4 0x021b480c 0x001F001F DATA 4 0x021b4810 0x001F001F DATA 4 0x021b083c 0x43260335 DATA 4 0x021b0840 0x031A030B DATA 4 0x021b483c 0x4323033B DATA 4 0x021b4840 0x0323026F DATA 4 0x021b0848 0x483D4545 DATA 4 0x021b4848 0x44433E48 DATA 4 0x021b0850 0x41444840 DATA 4 0x021b4850 0x4835483E DATA 4 0x021b081c 0x33333333 DATA 4 0x021b0820 0x33333333 DATA 4 0x021b0824 0x33333333 DATA 4 0x021b0828 0x33333333 DATA 4 0x021b481c 0x33333333 DATA 4 0x021b4820 0x33333333 DATA 4 0x021b4824 0x33333333 DATA 4 0x021b4828 0x33333333 DATA 4 0x021b08b8 0x00000800 DATA 4 0x021b48b8 0x00000800 DATA 4 0x021b0004 0x00020036 DATA 4 0x021b0008 0x09444040 DATA 4 0x021b000c 0x8A8F7955 DATA 4 0x021b0010 0xFF328F64 DATA 4 0x021b0014 0x01FF00DB DATA 4 0x021b0018 0x00001740 DATA 4 0x021b001c 0x00008000 DATA 4 0x021b002c 0x000026d2 DATA 4 0x021b0030 0x008F1023 DATA 4 0x021b0040 0x00000047 DATA 4 0x021b0000 0x841A0000 DATA 4 0x021b001c 0x04088032 DATA 4 0x021b001c 0x00008033 DATA 4 0x021b001c 0x00048031 DATA 4 0x021b001c 0x09408030 DATA 4 0x021b001c 0x04008040 DATA 4 0x021b0020 0x00005800 DATA 4 0x021b0818 0x00011117 DATA 4 0x021b4818 0x00011117 DATA 4 0x021b0004 0x00025576 DATA 4 0x021b0404 0x00011006 DATA 4 0x021b001c 0x00000000 /* set the default clock gate to save power */ DATA 4 0x020c4068 0x00C03F3F DATA 4 0x020c406c 0x0030FC03 DATA 4 0x020c4070 0x0FFFC000 DATA 4 0x020c4074 0x3FF00000 DATA 4 0x020c4078 0xFFFFF300 DATA 4 0x020c407c 0x0F0000F3 DATA 4 0x020c4080 0x00000FFF /* enable AXI cache for VDOA/VPU/IPU */ DATA 4 0x020e0010 0xF00000CF /* set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7 */ DATA 4 0x020e0018 0x007F007F DATA 4 0x020e001c 0x007F007F
{ "pile_set_name": "Github" }
#!/usr/bin/env python import os,sys from ctypes import * EDIT_DISTANCE_MODULE_EXISTS = True EDIT_DISTANCE_CTYPES_LOADED = False # try load editdistance built-in module first # if editdistance built-in module not exist, try to load editdistance/libed.so, which is made by make in AfterQC folder try: import editdistance except ImportError: EDIT_DISTANCE_MODULE_EXISTS = False ed_lib_file = os.path.join(sys.path[0], "editdistance/libed.so") if os.path.exists(ed_lib_file): try: ed_ctypes = cdll.LoadLibrary(ed_lib_file) except Exception: EDIT_DISTANCE_CTYPES_LOADED = False else: EDIT_DISTANCE_CTYPES_LOADED = True else: EDIT_DISTANCE_MODULE_EXISTS = True COMP = {"A" : "T", "T" : "A", "C" : "G", "G" : "C", "a" : "t", "t" : "a", "c" : "g", "g" : "c", "N":"N", "\n":"\n"} def parseBool(str): str = str.lower() if str=="true" or str=="yes" or str=="on": return True else: return False def complement(base): return COMP[base] def qualNum(q): return ord(q) - 33 def reverseComplement(origin): length = len(origin) revCompArr = ['' for x in xrange(length)] for i in xrange(length): orig = origin[length - i -1] if orig in COMP: revCompArr[i] = COMP[orig] else: revCompArr[i] = 'N' return ''.join(revCompArr) def reverse(origin): return origin[::-1] def hammingDistance(s1, s2): length = min(len(s1), len(s2)) d = 0 for i in xrange(length): if s1[i] != s2[i]: d += 1 return d #simple edit distance def editDistance(s1, s2): # check if editdistance module loaded if EDIT_DISTANCE_MODULE_EXISTS: return editdistance.eval(s1, s2) elif EDIT_DISTANCE_CTYPES_LOADED: return ed_ctypes.edit_distance(s1, len(s1), s2, len(s2)) m=len(s1)+1 n=len(s2)+1 tbl = [([0] * n) for i in xrange(m)] for i in xrange(m):tbl[i][0]=i for j in xrange(n):tbl[0][j]=j for i in xrange(1, m): for j in xrange(1, n): cost = 0 if s1[i-1] == s2[j-1] else 1 tbl[i][j] = min(tbl[i][j-1]+1, tbl[i-1][j]+1, tbl[i-1][j-1]+cost) return tbl[i][j] def distance_threshold(overlap_len): return min(3, overlap_len/10.0) def overlap(r1, r2): return overlap_hm(r1, r2) def overlap_ed(r1, r2): len1 = len(r1) len2 = len(r2) reverse_r2 = reverseComplement(r2) overlapped = False overlap_len = 0 offset = 0 distance = 0 offset_0_is_min = True # a match of less than 10 is considered as unconfident while offset < len1-10 and overlapped==False: # the overlap length of r1 & r2 when r2 is move right for offset overlap_len = min(len1-offset, len2) # remind that Julia is a 1-based coordination system distance = editDistance(r1[offset : offset+overlap_len], reverse_r2[0 : overlap_len]) threshold = distance_threshold(overlap_len) if distance <= threshold: # now we find a good candidate # we verify it by moving r2 one more base to see if the distance is getting longer # if yes, then current is the best match, otherwise it's not while offset < len1-10: next_offset = offset + 1 next_overlap_len = min(len1-next_offset, len2) next_distance = editDistance(r1[next_offset : next_offset+next_overlap_len], reverse_r2[0 : next_overlap_len]) if distance <= next_distance: overlapped = True break else: offset_0_is_min = False offset = next_offset distance = next_distance overlap_len = next_overlap_len break else: offset += max(1, (distance - int(threshold))/2 ) if offset_0_is_min: # in this case, the adapter is sequenced since TEMPLATE_LEN < SEQ_LEN # check if distance can get smaller if offset goes negative # this only happens when insert DNA is shorter than sequencing read length, and some adapter/primer is sequenced but not trimmed cleanly # we go reversely offset = 0 while offset > -(len2-10): # the overlap length of r1 & r2 when r2 is move right for offset overlap_len = min(len1, len2- abs(offset)) distance = editDistance(r1[0:overlap_len], reverse_r2[-offset : -offset + overlap_len]) threshold = distance_threshold(overlap_len) if distance <= threshold: while offset > -(len2-10): next_offset = offset - 1 next_overlap_len = min(len1, len2- abs(next_offset)) next_distance = editDistance(r1[0:next_overlap_len], reverse_r2[-next_offset : -next_offset + next_overlap_len]) if distance <= next_distance: return (offset, overlap_len, distance) else: distance = next_distance overlap_len = next_overlap_len offset = next_offset else: offset -= max(1, (distance - int(threshold))/2 ) elif overlapped: return (offset, overlap_len, distance) return (0,0,0) # calculate overlap by hamming distance def overlap_hm(r1, r2): len1 = len(r1) len2 = len(r2) reverse_r2 = reverseComplement(r2) limit_distance = 3 overlap_require = 30 complete_compare_require = 50 overlap_len = 0 offset = 0 # forward # a match of less than 10 is considered as unconfident while offset < len1-overlap_require: # the overlap length of r1 & r2 when r2 is move right for offset overlap_len = min(len1-offset, len2) diff = 0 for i in xrange(overlap_len): if r1[offset + i] != reverse_r2[i]: diff += 1 if diff >= limit_distance and i < complete_compare_require: break if diff < limit_distance or (diff >= limit_distance and i>complete_compare_require): return (offset, overlap_len, diff) offset += 1 # reverse # in this case, the adapter is sequenced since TEMPLATE_LEN < SEQ_LEN # check if distance can get smaller if offset goes negative # this only happens when insert DNA is shorter than sequencing read length, and some adapter/primer is sequenced but not trimmed cleanly # we go reversely offset = 0 while offset > -(len2-overlap_require): # the overlap length of r1 & r2 when r2 is move right for offset overlap_len = min(len1, len2- abs(offset)) diff = 0 for i in xrange(overlap_len): if r1[i] != reverse_r2[-offset + i]: diff += 1 if diff >= limit_distance and i < complete_compare_require: break if diff < limit_distance or (diff >= limit_distance and i>complete_compare_require): return (offset, overlap_len, diff) offset -= 1 # not matched return (0,0,0) def overlap_hm_cpp(r1, r2): len1 = len(r1) len2 = len(r2) reverse_r2 = reverseComplement(r2) limit_distance = 3 overlap_require = 30 complete_compare_require = 50 ret = ed_ctypes.seek_overlap(r1, len1, reverse_r2, len2, limit_distance, overlap_require, complete_compare_require) offset = ret >> 8 diff = ret & (0xFF) if ret == 0x7FFFFFFF: return (0,0,0) elif offset >=0: overlap_len = min(len1-offset, len2) else: overlap_len = min(len1, len2- abs(offset)) return (offset, overlap_len, diff) def changeString(str, pos, val): lst = list(str) lst[pos] = val return ''.join(lst) if __name__ == "__main__": r1 = "CAGCGCCTACGGGCCCCTTTTTCTGCGCGACCGCGTGGCTGTGGGCGCGGATGCCTTTGAGCGCGGTGACTTCTCACTGCGTATCGAGCCGCTGGAGGTCTCCC" r2 = "ACCTCCAGCGGCTCGATACGCAGTGAGAAGTCACCGCGCTCAAAGGCATCCGCGCCCACAGCCACGCGGTCGCGCAGAAAAAGGGGCCCGTAGGCGCGGCTCCC" r1 = "CAGCGCCTACGGGCCCCTTTTTCTGCGCGACCGCGTGGCTGTGGGCGCGGATGCCTTTGAGCGCGGTGACTTCTCACTGCGTATCGAGC" r2 = "ACCTCCAGCGGCTCGATACGCAGTGAGAAGTCACCGCGCTCAAAGGCATCCGCGCCCACAGCCACGCGGTCGCGCAGAAAAAGGGGTCC" print(overlap_ed(r1, r2)) print(overlap_hm(r1, r2)) print(overlap_hm_cpp(r1, r2)) for i in xrange(10000): overlap_ed(r1, r2)
{ "pile_set_name": "Github" }
-- =================================================================== -- Copyright (C) 2003 Rodolphe Quiedeville <[email protected]> -- Copyright (C) 2007-2015 Laurent Destailleur <[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 <https://www.gnu.org/licenses/>. -- -- =================================================================== create table llx_bank_url ( rowid integer AUTO_INCREMENT PRIMARY KEY, fk_bank integer, url_id integer, url varchar(255), label varchar(255), type varchar(24) NOT NULL )ENGINE=innodb;
{ "pile_set_name": "Github" }
// CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: https://codemirror.net/LICENSE (function() { var mode = CodeMirror.getMode({indentUnit: 2}, "swift"); function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } // Ensure all number types are properly represented. MT("numbers", "[keyword var] [def a] [operator =] [number 17]", "[keyword var] [def b] [operator =] [number -0.5]", "[keyword var] [def c] [operator =] [number 0.3456e-4]", "[keyword var] [def d] [operator =] [number 345e2]", "[keyword var] [def e] [operator =] [number 0o7324]", "[keyword var] [def f] [operator =] [number 0b10010]", "[keyword var] [def g] [operator =] [number -0x35ade]", "[keyword var] [def h] [operator =] [number 0xaea.ep-13]", "[keyword var] [def i] [operator =] [number 0x13ep6]"); // Variable/class/etc definition. MT("definition", "[keyword var] [def a] [operator =] [number 5]", "[keyword let] [def b][punctuation :] [variable-2 Int] [operator =] [number 10]", "[keyword class] [def C] [punctuation {] [punctuation }]", "[keyword struct] [def D] [punctuation {] [punctuation }]", "[keyword enum] [def E] [punctuation {] [punctuation }]", "[keyword extension] [def F] [punctuation {] [punctuation }]", "[keyword protocol] [def G] [punctuation {] [punctuation }]", "[keyword func] [def h][punctuation ()] [punctuation {] [punctuation }]", "[keyword import] [def Foundation]", "[keyword typealias] [def NewString] [operator =] [variable-2 String]", "[keyword associatedtype] [def I]", "[keyword for] [def j] [keyword in] [number 0][punctuation ..][operator <][number 3] [punctuation {] [punctuation }]"); // Strings and string interpolation. MT("strings", "[keyword var] [def a][punctuation :] [variable-2 String] [operator =] [string \"test\"]", "[keyword var] [def b][punctuation :] [variable-2 String] [operator =] [string \"\\(][variable a][string )\"]", "[keyword var] [def c] [operator =] [string \"\"\"]", "[string multi]", "[string line]", "[string \"test\"]", "[string \"\"\"]", "[variable print][punctuation (][string \"\"][punctuation )]"); // Comments. MT("comments", "[comment // This is a comment]", "[comment /* This is another comment */]", "[keyword var] [def a] [operator =] [number 5] [comment // Third comment]"); // Atoms. MT("atoms", "[keyword class] [def FooClass] [punctuation {]", " [keyword let] [def fooBool][punctuation :] [variable-2 Bool][operator ?]", " [keyword let] [def fooInt][punctuation :] [variable-2 Int][operator ?]", " [keyword func] [keyword init][punctuation (][variable fooBool][punctuation :] [variable-2 Bool][punctuation ,] [variable barBool][punctuation :] [variable-2 Bool][punctuation )] [punctuation {]", " [atom super][property .init][punctuation ()]", " [atom self][property .fooBool] [operator =] [variable fooBool]", " [variable fooInt] [operator =] [atom nil]", " [keyword if] [variable barBool] [operator ==] [atom true] [punctuation {]", " [variable print][punctuation (][string \"True!\"][punctuation )]", " [punctuation }] [keyword else] [keyword if] [variable barBool] [operator ==] [atom false] [punctuation {]", " [keyword for] [atom _] [keyword in] [number 0][punctuation ...][number 5] [punctuation {]", " [variable print][punctuation (][string \"False!\"][punctuation )]", " [punctuation }]", " [punctuation }]", " [punctuation }]", "[punctuation }]"); // Types. MT("types", "[keyword var] [def a] [operator =] [variable-2 Array][operator <][variable-2 Int][operator >]", "[keyword var] [def b] [operator =] [variable-2 Set][operator <][variable-2 Bool][operator >]", "[keyword var] [def c] [operator =] [variable-2 Dictionary][operator <][variable-2 String][punctuation ,][variable-2 Character][operator >]", "[keyword var] [def d][punctuation :] [variable-2 Int64][operator ?] [operator =] [variable-2 Optional][punctuation (][number 8][punctuation )]", "[keyword func] [def e][punctuation ()] [operator ->] [variable-2 Void] [punctuation {]", " [keyword var] [def e1][punctuation :] [variable-2 Float] [operator =] [number 1.2]", "[punctuation }]", "[keyword func] [def f][punctuation ()] [operator ->] [variable-2 Never] [punctuation {]", " [keyword var] [def f1][punctuation :] [variable-2 Double] [operator =] [number 2.4]", "[punctuation }]"); // Operators. MT("operators", "[keyword var] [def a] [operator =] [number 1] [operator +] [number 2]", "[keyword var] [def b] [operator =] [number 1] [operator -] [number 2]", "[keyword var] [def c] [operator =] [number 1] [operator *] [number 2]", "[keyword var] [def d] [operator =] [number 1] [operator /] [number 2]", "[keyword var] [def e] [operator =] [number 1] [operator %] [number 2]", "[keyword var] [def f] [operator =] [number 1] [operator |] [number 2]", "[keyword var] [def g] [operator =] [number 1] [operator &] [number 2]", "[keyword var] [def h] [operator =] [number 1] [operator <<] [number 2]", "[keyword var] [def i] [operator =] [number 1] [operator >>] [number 2]", "[keyword var] [def j] [operator =] [number 1] [operator ^] [number 2]", "[keyword var] [def k] [operator =] [operator ~][number 1]", "[keyword var] [def l] [operator =] [variable foo] [operator ?] [number 1] [punctuation :] [number 2]", "[keyword var] [def m][punctuation :] [variable-2 Int] [operator =] [variable-2 Optional][punctuation (][number 8][punctuation )][operator !]"); // Punctuation. MT("punctuation", "[keyword let] [def a] [operator =] [number 1][punctuation ;] [keyword let] [def b] [operator =] [number 2]", "[keyword let] [def testArr][punctuation :] [punctuation [[][variable-2 Int][punctuation ]]] [operator =] [punctuation [[][variable a][punctuation ,] [variable b][punctuation ]]]", "[keyword for] [def i] [keyword in] [number 0][punctuation ..][operator <][variable testArr][property .count] [punctuation {]", " [variable print][punctuation (][variable testArr][punctuation [[][variable i][punctuation ]])]", "[punctuation }]"); // Identifiers. MT("identifiers", "[keyword let] [def abc] [operator =] [number 1]", "[keyword let] [def ABC] [operator =] [number 2]", "[keyword let] [def _123] [operator =] [number 3]", "[keyword let] [def _$1$2$3] [operator =] [number 4]", "[keyword let] [def A1$_c32_$_] [operator =] [number 5]", "[keyword let] [def `var`] [operator =] [punctuation [[][number 1][punctuation ,] [number 2][punctuation ,] [number 3][punctuation ]]]", "[keyword let] [def square$] [operator =] [variable `var`][property .map] [punctuation {][variable $0] [operator *] [variable $0][punctuation }]", "$$ [number 1][variable a] $[atom _] [variable _$] [variable __] `[variable a] [variable b]`"); // Properties. MT("properties", "[variable print][punctuation (][variable foo][property .abc][punctuation )]", "[variable print][punctuation (][variable foo][property .ABC][punctuation )]", "[variable print][punctuation (][variable foo][property ._123][punctuation )]", "[variable print][punctuation (][variable foo][property ._$1$2$3][punctuation )]", "[variable print][punctuation (][variable foo][property .A1$_c32_$_][punctuation )]", "[variable print][punctuation (][variable foo][property .`var`][punctuation )]", "[variable print][punctuation (][variable foo][property .__][punctuation )]"); // Instructions or other things that start with #. MT("instructions", "[keyword if] [builtin #available][punctuation (][variable iOS] [number 9][punctuation ,] [operator *][punctuation )] [punctuation {}]", "[variable print][punctuation (][builtin #file][punctuation ,] [builtin #function][punctuation )]", "[variable print][punctuation (][builtin #line][punctuation ,] [builtin #column][punctuation )]", "[builtin #if] [atom true]", "[keyword import] [def A]", "[builtin #elseif] [atom false]", "[keyword import] [def B]", "[builtin #endif]", "[builtin #sourceLocation][punctuation (][variable file][punctuation :] [string \"file.swift\"][punctuation ,] [variable line][punctuation :] [number 2][punctuation )]"); // Attributes; things that start with @. MT("attributes", "[attribute @objc][punctuation (][variable objcFoo][punctuation :)]", "[attribute @available][punctuation (][variable iOS][punctuation )]"); // Property/number edge case. MT("property_number", "[variable print][punctuation (][variable foo][property ._123][punctuation )]", "[variable print][punctuation (]") MT("nested_comments", "[comment /*]", "[comment But wait /* this is a nested comment */ for real]", "[comment /**** let * me * show * you ****/]", "[comment ///// let / me / show / you /////]", "[comment */]"); // TODO: correctly identify when multiple variables are being declared // by use of a comma-separated list. // TODO: correctly identify when variables are being declared in a tuple. // TODO: identify protocols as types when used before an extension? })();
{ "pile_set_name": "Github" }
/**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2008-2010 Ricardo Quesada Copyright (c) 2009 Valentin Milea Copyright (c) 2011 Zynga Inc. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "cocoa/CCString.h" #include "CCNode.h" #include "support/CCPointExtension.h" #include "support/TransformUtils.h" #include "CCCamera.h" #include "effects/CCGrid.h" #include "CCDirector.h" #include "CCScheduler.h" #include "touch_dispatcher/CCTouch.h" #include "touch_dispatcher/CCTouchDispatcher.h" #include "actions/CCActionManager.h" #include "script_support/CCScriptSupport.h" #include "shaders/CCGLProgram.h" #include "layers_scenes_transitions_nodes/CCScene.h" // externals #include "kazmath/GL/matrix.h" #include "support/component/CCComponent.h" #include "support/component/CCComponentContainer.h" #if CC_NODE_RENDER_SUBPIXEL #define RENDER_IN_SUBPIXEL #else #define RENDER_IN_SUBPIXEL(__ARGS__) (ceil(__ARGS__)) #endif NS_CC_BEGIN // XXX: Yes, nodes might have a sort problem once every 15 days if the game runs at 60 FPS and each frame sprites are reordered. static int s_globalOrderOfArrival = 1; unsigned int CCNode::g_drawOrder = 0; CCNode::CCNode(void) : m_fRotationX(0.0f) , m_fRotationY(0.0f) , m_fScaleX(1.0f) , m_fScaleY(1.0f) , m_fVertexZ(0.0f) , m_obPosition(CCPointZero) , m_fSkewX(0.0f) , m_fSkewY(0.0f) , m_obAnchorPointInPoints(CCPointZero) , m_obAnchorPoint(CCPointZero) , m_obContentSize(CCSizeZero) , m_sAdditionalTransform(CCAffineTransformMakeIdentity()) , m_pCamera(NULL) // children (lazy allocs) // lazy alloc , m_pGrid(NULL) , m_nZOrder(0) , m_pChildren(NULL) , m_pParent(NULL) // "whole screen" objects. like Scenes and Layers, should set m_bIgnoreAnchorPointForPosition to true , m_nTag(kCCNodeTagInvalid) // userData is always inited as nil , m_pUserData(NULL) , m_pUserObject(NULL) , m_pShaderProgram(NULL) , m_eGLServerState(ccGLServerState(0)) , m_uOrderOfArrival(0) , m_bRunning(false) , m_bTransformDirty(true) , m_bInverseDirty(true) , m_bAdditionalTransformDirty(false) , m_bVisible(true) , m_bIgnoreAnchorPointForPosition(false) , m_bReorderChildDirty(false) , m_pComponentContainer(NULL) // merge CCNodeRGBA , m_displayedOpacity(255) , m_realOpacity(255) , m_isOpacityModifyRGB(false) , m_displayedColor(ccWHITE) , m_realColor(ccWHITE) , m_cascadeColorEnabled(false) , m_cascadeOpacityEnabled(false) , m_drawOrder(0) // touch , m_bTouchCaptureEnabled(true) , m_bTouchSwallowEnabled(true) , m_bTouchEnabled(false) , m_eTouchMode(kCCTouchesOneByOne) { // set default scheduler and actionManager CCDirector *director = CCDirector::sharedDirector(); m_pActionManager = director->getActionManager(); m_pActionManager->retain(); m_pScheduler = director->getScheduler(); m_pScheduler->retain(); m_pComponentContainer = new CCComponentContainer(this); } CCNode::~CCNode(void) { CCLOGINFO( "cocos2d: deallocing" ); CC_SAFE_RELEASE(m_pActionManager); CC_SAFE_RELEASE(m_pScheduler); // attributes CC_SAFE_RELEASE(m_pCamera); CC_SAFE_RELEASE(m_pGrid); CC_SAFE_RELEASE(m_pShaderProgram); CC_SAFE_RELEASE(m_pUserObject); // m_pComsContainer m_pComponentContainer->removeAll(); CC_SAFE_DELETE(m_pComponentContainer); if(m_pChildren && m_pChildren->count() > 0) { CCObject* child; CCARRAY_FOREACH(m_pChildren, child) { CCNode* pChild = (CCNode*) child; if (pChild) { pChild->m_pParent = NULL; } } } // children CC_SAFE_RELEASE(m_pChildren); } bool CCNode::init() { return true; } float CCNode::getSkewX() { return m_fSkewX; } void CCNode::setSkewX(float newSkewX) { m_fSkewX = newSkewX; m_bTransformDirty = m_bInverseDirty = true; } float CCNode::getSkewY() { return m_fSkewY; } void CCNode::setSkewY(float newSkewY) { m_fSkewY = newSkewY; m_bTransformDirty = m_bInverseDirty = true; } /// zOrder getter int CCNode::getZOrder() { return m_nZOrder; } /// zOrder setter : private method /// used internally to alter the zOrder variable. DON'T call this method manually void CCNode::_setZOrder(int z) { m_nZOrder = z; } void CCNode::setZOrder(int z) { _setZOrder(z); if (m_pParent) { m_pParent->reorderChild(this, z); } } /// vertexZ getter float CCNode::getVertexZ() { return m_fVertexZ; } /// vertexZ setter void CCNode::setVertexZ(float var) { m_fVertexZ = var; } /// rotation getter float CCNode::getRotation() { CCAssert(m_fRotationX == m_fRotationY, "CCNode#rotation. RotationX != RotationY. Don't know which one to return"); return m_fRotationX; } /// rotation setter void CCNode::setRotation(float newRotation) { m_fRotationX = m_fRotationY = newRotation; m_bTransformDirty = m_bInverseDirty = true; } float CCNode::getRotationX() { return m_fRotationX; } void CCNode::setRotationX(float fRotationX) { m_fRotationX = fRotationX; m_bTransformDirty = m_bInverseDirty = true; } float CCNode::getRotationY() { return m_fRotationY; } void CCNode::setRotationY(float fRotationY) { m_fRotationY = fRotationY; m_bTransformDirty = m_bInverseDirty = true; } /// scale getter float CCNode::getScale(void) { CCAssert( m_fScaleX == m_fScaleY, "CCNode#scale. ScaleX != ScaleY. Don't know which one to return"); return m_fScaleX; } /// scale setter void CCNode::setScale(float scale) { m_fScaleX = m_fScaleY = scale; m_bTransformDirty = m_bInverseDirty = true; } /// scale setter void CCNode::setScale(float fScaleX,float fScaleY) { m_fScaleX = fScaleX; m_fScaleY = fScaleY; m_bTransformDirty = m_bInverseDirty = true; } /// scaleX getter float CCNode::getScaleX() { return m_fScaleX; } /// scaleX setter void CCNode::setScaleX(float newScaleX) { m_fScaleX = newScaleX; m_bTransformDirty = m_bInverseDirty = true; } /// scaleY getter float CCNode::getScaleY() { return m_fScaleY; } /// scaleY setter void CCNode::setScaleY(float newScaleY) { m_fScaleY = newScaleY; m_bTransformDirty = m_bInverseDirty = true; } /// position getter const CCPoint& CCNode::getPosition() { return m_obPosition; } /// position setter void CCNode::setPosition(const CCPoint& newPosition) { m_obPosition = newPosition; m_bTransformDirty = m_bInverseDirty = true; } void CCNode::getPosition(float* x, float* y) { *x = m_obPosition.x; *y = m_obPosition.y; } void CCNode::setPosition(float x, float y) { setPosition(ccp(x, y)); } float CCNode::getPositionX(void) { return m_obPosition.x; } float CCNode::getPositionY(void) { return m_obPosition.y; } void CCNode::setPositionX(float x) { setPosition(ccp(x, m_obPosition.y)); } void CCNode::setPositionY(float y) { setPosition(ccp(m_obPosition.x, y)); } /// children getter CCArray* CCNode::getChildren() { return m_pChildren; } unsigned int CCNode::getChildrenCount(void) const { return m_pChildren ? m_pChildren->count() : 0; } /// camera getter: lazy alloc CCCamera* CCNode::getCamera() { if (!m_pCamera) { m_pCamera = new CCCamera(); } return m_pCamera; } /// grid getter CCGridBase* CCNode::getGrid() { return m_pGrid; } /// grid setter void CCNode::setGrid(CCGridBase* pGrid) { CC_SAFE_RETAIN(pGrid); CC_SAFE_RELEASE(m_pGrid); m_pGrid = pGrid; } /// isVisible getter bool CCNode::isVisible() { return m_bVisible; } /// isVisible setter void CCNode::setVisible(bool var) { m_bVisible = var; } const CCPoint& CCNode::getAnchorPointInPoints() { return m_obAnchorPointInPoints; } /// anchorPoint getter const CCPoint& CCNode::getAnchorPoint() { return m_obAnchorPoint; } void CCNode::setAnchorPoint(const CCPoint& point) { if( ! point.equals(m_obAnchorPoint)) { m_obAnchorPoint = point; m_obAnchorPointInPoints = ccp(m_obContentSize.width * m_obAnchorPoint.x, m_obContentSize.height * m_obAnchorPoint.y ); m_bTransformDirty = m_bInverseDirty = true; } } /// contentSize getter const CCSize& CCNode::getContentSize() const { return m_obContentSize; } void CCNode::setContentSize(const CCSize & size) { if ( ! size.equals(m_obContentSize)) { m_obContentSize = size; m_obAnchorPointInPoints = ccp(m_obContentSize.width * m_obAnchorPoint.x, m_obContentSize.height * m_obAnchorPoint.y ); m_bTransformDirty = m_bInverseDirty = true; } } // isRunning getter bool CCNode::isRunning() { return m_bRunning; } /// parent getter CCNode * CCNode::getParent() { return m_pParent; } /// parent setter void CCNode::setParent(CCNode * var) { if (var == NULL) { if (m_bTouchEnabled) { CCScene *scene = getScene(); if (scene) { scene->removeTouchableNode(this); } m_bTouchEnabled = false; } } m_pParent = var; } /// isRelativeAnchorPoint getter bool CCNode::isIgnoreAnchorPointForPosition() { return m_bIgnoreAnchorPointForPosition; } /// isRelativeAnchorPoint setter void CCNode::ignoreAnchorPointForPosition(bool newValue) { if (newValue != m_bIgnoreAnchorPointForPosition) { m_bIgnoreAnchorPointForPosition = newValue; m_bTransformDirty = m_bInverseDirty = true; } } /// tag getter int CCNode::getTag() const { return m_nTag; } /// tag setter void CCNode::setTag(int var) { m_nTag = var; } /// userData getter void * CCNode::getUserData() { return m_pUserData; } /// userData setter void CCNode::setUserData(void *var) { m_pUserData = var; } unsigned int CCNode::getOrderOfArrival() { return m_uOrderOfArrival; } void CCNode::setOrderOfArrival(unsigned int uOrderOfArrival) { m_uOrderOfArrival = uOrderOfArrival; } CCGLProgram* CCNode::getShaderProgram() { return m_pShaderProgram; } CCObject* CCNode::getUserObject() { return m_pUserObject; } ccGLServerState CCNode::getGLServerState() { return m_eGLServerState; } void CCNode::setGLServerState(ccGLServerState glServerState) { m_eGLServerState = glServerState; } void CCNode::setUserObject(CCObject *pUserObject) { CC_SAFE_RETAIN(pUserObject); CC_SAFE_RELEASE(m_pUserObject); m_pUserObject = pUserObject; } void CCNode::setShaderProgram(CCGLProgram *pShaderProgram) { CC_SAFE_RETAIN(pShaderProgram); CC_SAFE_RELEASE(m_pShaderProgram); m_pShaderProgram = pShaderProgram; } CCRect CCNode::boundingBox() { CCRect rect = CCRectMake(0, 0, m_obContentSize.width, m_obContentSize.height); return CCRectApplyAffineTransform(rect, nodeToParentTransform()); } CCRect CCNode::getCascadeBoundingBox(void) { CCRect cbb; if (m_cascadeBoundingBox.size.width > 0 && m_cascadeBoundingBox.size.height > 0) { // if cascade bounding box set by user, ignore all childrens bounding box cbb = m_cascadeBoundingBox; } else { // check all childrens bounding box, get maximize box CCObject *object = NULL; CCNode* child = NULL; bool merge = false; CCARRAY_FOREACH(m_pChildren, object) { child = dynamic_cast<CCNode*>(object); if (!child->isVisible()) continue; const CCRect box = child->getCascadeBoundingBox(); if (box.size.width <= 0 || box.size.height <= 0) continue; if (!merge) { cbb = box; merge = true; } else { cbb.merge(box); } } // merge content size if (m_obContentSize.width > 0 && m_obContentSize.height > 0) { const CCRect box = CCRectApplyAffineTransform(CCRect(0, 0, m_obContentSize.width, m_obContentSize.height), nodeToWorldTransform()); if (!merge) { cbb = box; } else { cbb.merge(box); } } } return cbb; } void CCNode::setCascadeBoundingBox(const cocos2d::CCRect &boundingBox) { m_cascadeBoundingBox = boundingBox; } void CCNode::resetCascadeBoundingBox(void) { m_cascadeBoundingBox = CCRectZero; } CCNode * CCNode::create(void) { CCNode * pRet = new CCNode(); if (pRet && pRet->init()) { pRet->autorelease(); } else { CC_SAFE_DELETE(pRet); } return pRet; } void CCNode::cleanup() { // actions this->stopAllActions(); this->unscheduleAllSelectors(); // timers arrayMakeObjectsPerformSelector(m_pChildren, cleanup, CCNode*); if (m_scriptEventListeners) { CCScriptEngineManager::sharedManager()->getScriptEngine()->executeNodeEvent(this, kCCNodeOnCleanup); } } const char* CCNode::description() { return CCString::createWithFormat("<CCNode | Tag = %d>", m_nTag)->getCString(); } // lazy allocs void CCNode::childrenAlloc(void) { m_pChildren = CCArray::createWithCapacity(4); m_pChildren->retain(); } CCNode* CCNode::getChildByTag(int aTag) { CCAssert( aTag != kCCNodeTagInvalid, "Invalid tag"); if(m_pChildren && m_pChildren->count() > 0) { CCObject* child; CCARRAY_FOREACH(m_pChildren, child) { CCNode* pNode = (CCNode*) child; if(pNode && pNode->m_nTag == aTag) return pNode; } } return NULL; } /* "add" logic MUST only be on this method * If a class want's to extend the 'addChild' behavior it only needs * to override this method */ void CCNode::addChild(CCNode *child, int zOrder, int tag) { CCAssert( child != NULL, "Argument must be non-nil"); CCAssert( child->m_pParent == NULL, "child already added. It can't be added again"); if( ! m_pChildren ) { this->childrenAlloc(); } this->insertChild(child, zOrder); child->m_nTag = tag; child->setParent(this); child->setOrderOfArrival(s_globalOrderOfArrival++); if( m_bRunning ) { child->onEnter(); child->onEnterTransitionDidFinish(); } } void CCNode::addChild(CCNode *child, int zOrder) { CCAssert( child != NULL, "Argument must be non-nil"); this->addChild(child, zOrder, child->m_nTag); } void CCNode::addChild(CCNode *child) { CCAssert( child != NULL, "Argument must be non-nil"); this->addChild(child, child->m_nZOrder, child->m_nTag); } void CCNode::removeSelf() { this->removeFromParentAndCleanup(true); } void CCNode::removeFromParent() { this->removeFromParentAndCleanup(true); } void CCNode::removeFromParentAndCleanup(bool cleanup) { if (m_pParent != NULL) { m_pParent->removeChild(this,cleanup); } } void CCNode::removeChild(CCNode* child) { this->removeChild(child, true); } /* "remove" logic MUST only be on this method * If a class want's to extend the 'removeChild' behavior it only needs * to override this method */ void CCNode::removeChild(CCNode* child, bool cleanup) { // explicit nil handling if (m_pChildren == NULL) { return; } if ( m_pChildren->containsObject(child) ) { this->detachChild(child,cleanup); } } void CCNode::removeChildByTag(int tag) { this->removeChildByTag(tag, true); } void CCNode::removeChildByTag(int tag, bool cleanup) { CCAssert( tag != kCCNodeTagInvalid, "Invalid tag"); CCNode *child = this->getChildByTag(tag); if (child == NULL) { CCLOG("cocos2d: removeChildByTag(tag = %d): child not found!", tag); } else { this->removeChild(child, cleanup); } } void CCNode::removeAllChildren() { this->removeAllChildrenWithCleanup(true); } void CCNode::removeAllChildrenWithCleanup(bool cleanup) { // not using detachChild improves speed here if ( m_pChildren && m_pChildren->count() > 0 ) { CCObject* child; CCARRAY_FOREACH(m_pChildren, child) { CCNode* pNode = (CCNode*) child; if (pNode) { // IMPORTANT: // -1st do onExit // -2nd cleanup if(m_bRunning) { pNode->onExitTransitionDidStart(); pNode->onExit(); } if (cleanup) { pNode->cleanup(); } // set parent nil at the end pNode->setParent(NULL); } } m_pChildren->removeAllObjects(); } } void CCNode::detachChild(CCNode *child, bool doCleanup) { // IMPORTANT: // -1st do onExit // -2nd cleanup if (m_bRunning) { child->onExitTransitionDidStart(); child->onExit(); } // If you don't do cleanup, the child's actions will not get removed and the // its scheduledSelectors_ dict will not get released! if (doCleanup) { child->cleanup(); } // set parent nil at the end child->setParent(NULL); m_pChildren->removeObject(child); } // helper used by reorderChild & add void CCNode::insertChild(CCNode* child, int z) { m_bReorderChildDirty = true; ccArrayAppendObjectWithResize(m_pChildren->data, child); child->_setZOrder(z); } void CCNode::reorderChild(CCNode *child, int zOrder) { CCAssert( child != NULL, "Child must be non-nil"); m_bReorderChildDirty = true; child->setOrderOfArrival(s_globalOrderOfArrival++); child->_setZOrder(zOrder); } void CCNode::sortAllChildren() { if (m_bReorderChildDirty) { int i,j,length = m_pChildren->data->num; CCNode ** x = (CCNode**)m_pChildren->data->arr; CCNode *tempItem; // insertion sort for(i=1; i<length; i++) { tempItem = x[i]; j = i-1; //continue moving element downwards while zOrder is smaller or when zOrder is the same but mutatedIndex is smaller while(j>=0 && ( tempItem->m_nZOrder < x[j]->m_nZOrder || ( tempItem->m_nZOrder== x[j]->m_nZOrder && tempItem->m_uOrderOfArrival < x[j]->m_uOrderOfArrival ) ) ) { x[j+1] = x[j]; j = j-1; } x[j+1] = tempItem; } //don't need to check children recursively, that's done in visit of each child m_bReorderChildDirty = false; } } void CCNode::draw() { //CCAssert(0); // override me // Only use- this function to draw your stuff. // DON'T draw your stuff outside this method } void CCNode::visit() { m_drawOrder = ++g_drawOrder; // quick return if not visible. children won't be drawn. if (!m_bVisible) { return; } kmGLPushMatrix(); if (m_pGrid && m_pGrid->isActive()) { m_pGrid->beforeDraw(); } this->transform(); CCNode* pNode = NULL; unsigned int i = 0; if(m_pChildren && m_pChildren->count() > 0) { sortAllChildren(); // draw children zOrder < 0 ccArray *arrayData = m_pChildren->data; for( ; i < arrayData->num; i++ ) { pNode = (CCNode*) arrayData->arr[i]; if ( pNode && pNode->m_nZOrder < 0 ) { pNode->visit(); } else { break; } } // self draw this->draw(); for( ; i < arrayData->num; i++ ) { pNode = (CCNode*) arrayData->arr[i]; if (pNode) { pNode->visit(); } } } else { this->draw(); } // reset for next frame m_uOrderOfArrival = 0; if (m_pGrid && m_pGrid->isActive()) { m_pGrid->afterDraw(this); } kmGLPopMatrix(); } void CCNode::transformAncestors() { if( m_pParent != NULL ) { m_pParent->transformAncestors(); m_pParent->transform(); } } void CCNode::transform() { kmMat4 transfrom4x4; // Convert 3x3 into 4x4 matrix CCAffineTransform tmpAffine = this->nodeToParentTransform(); CGAffineToGL(&tmpAffine, transfrom4x4.mat); // Update Z vertex manually transfrom4x4.mat[14] = m_fVertexZ; kmGLMultMatrix( &transfrom4x4 ); // XXX: Expensive calls. Camera should be integrated into the cached affine matrix if ( m_pCamera != NULL && !(m_pGrid != NULL && m_pGrid->isActive()) ) { bool translate = (m_obAnchorPointInPoints.x != 0.0f || m_obAnchorPointInPoints.y != 0.0f); if( translate ) kmGLTranslatef(RENDER_IN_SUBPIXEL(m_obAnchorPointInPoints.x), RENDER_IN_SUBPIXEL(m_obAnchorPointInPoints.y), 0 ); m_pCamera->locate(); if( translate ) kmGLTranslatef(RENDER_IN_SUBPIXEL(-m_obAnchorPointInPoints.x), RENDER_IN_SUBPIXEL(-m_obAnchorPointInPoints.y), 0 ); } } void CCNode::onEnter() { //fix setTouchEnabled not take effect when called the function in onEnter in JSBinding. m_bRunning = true; if (m_bTouchEnabled) { registerWithTouchDispatcher(); } if (m_scriptEventListeners) { CCScriptEngineManager::sharedManager()->getScriptEngine()->executeNodeEvent(this, kCCNodeOnEnter); } //Judge the running state for prevent called onEnter method more than once,it's possible that this function called by addChild if (m_pChildren && m_pChildren->count() > 0) { CCObject* child; CCNode* node; CCARRAY_FOREACH(m_pChildren, child) { node = (CCNode*)child; if (!node->isRunning()) { node->onEnter(); } } } this->resumeSchedulerAndActions(); } void CCNode::onEnterTransitionDidFinish() { arrayMakeObjectsPerformSelector(m_pChildren, onEnterTransitionDidFinish, CCNode*); if (m_scriptEventListeners) { CCScriptEngineManager::sharedManager()->getScriptEngine()->executeNodeEvent(this, kCCNodeOnEnterTransitionDidFinish); } } void CCNode::onExitTransitionDidStart() { if (m_scriptEventListeners) { CCScriptEngineManager::sharedManager()->getScriptEngine()->executeNodeEvent(this, kCCNodeOnExitTransitionDidStart); } arrayMakeObjectsPerformSelector(m_pChildren, onExitTransitionDidStart, CCNode*); } void CCNode::onExit() { this->pauseSchedulerAndActions(); if( m_bTouchEnabled ) { unregisterWithTouchDispatcher(); } m_bRunning = false; arrayMakeObjectsPerformSelector(m_pChildren, onExit, CCNode*); if (m_scriptEventListeners) { CCScriptEngineManager::sharedManager()->getScriptEngine()->executeNodeEvent(this, kCCNodeOnExit); } } void CCNode::setActionManager(CCActionManager* actionManager) { if( actionManager != m_pActionManager ) { this->stopAllActions(); CC_SAFE_RETAIN(actionManager); CC_SAFE_RELEASE(m_pActionManager); m_pActionManager = actionManager; } } CCActionManager* CCNode::getActionManager() { return m_pActionManager; } CCAction * CCNode::runAction(CCAction* action) { CCAssert( action != NULL, "Argument must be non-nil"); m_pActionManager->addAction(action, this, !m_bRunning); return action; } void CCNode::stopAllActions() { m_pActionManager->removeAllActionsFromTarget(this); } void CCNode::stopAction(CCAction* action) { m_pActionManager->removeAction(action); } void CCNode::stopActionByTag(int tag) { CCAssert( tag != kCCActionTagInvalid, "Invalid tag"); m_pActionManager->removeActionByTag(tag, this); } CCAction * CCNode::getActionByTag(int tag) { CCAssert( tag != kCCActionTagInvalid, "Invalid tag"); return m_pActionManager->getActionByTag(tag, this); } unsigned int CCNode::numberOfRunningActions() { return m_pActionManager->numberOfRunningActionsInTarget(this); } // CCNode - Callbacks void CCNode::setScheduler(CCScheduler* scheduler) { if( scheduler != m_pScheduler ) { this->unscheduleAllSelectors(); CC_SAFE_RETAIN(scheduler); CC_SAFE_RELEASE(m_pScheduler); m_pScheduler = scheduler; } } CCScheduler* CCNode::getScheduler() { return m_pScheduler; } void CCNode::scheduleUpdate() { scheduleUpdateWithPriority(0); } void CCNode::scheduleUpdateWithPriority(int priority) { m_pScheduler->scheduleUpdateForTarget(this, priority, !m_bRunning); } void CCNode::unscheduleUpdate() { m_pScheduler->unscheduleUpdateForTarget(this); } void CCNode::schedule(SEL_SCHEDULE selector) { this->schedule(selector, 0.0f, kCCRepeatForever, 0.0f); } void CCNode::schedule(SEL_SCHEDULE selector, float interval) { this->schedule(selector, interval, kCCRepeatForever, 0.0f); } void CCNode::schedule(SEL_SCHEDULE selector, float interval, unsigned int repeat, float delay) { CCAssert( selector, "Argument must be non-nil"); CCAssert( interval >=0, "Argument must be positive"); m_pScheduler->scheduleSelector(selector, this, interval , repeat, delay, !m_bRunning); } void CCNode::scheduleOnce(SEL_SCHEDULE selector, float delay) { this->schedule(selector, 0.0f, 0, delay); } void CCNode::unschedule(SEL_SCHEDULE selector) { // explicit nil handling if (selector == 0) return; m_pScheduler->unscheduleSelector(selector, this); } void CCNode::unscheduleAllSelectors() { m_pScheduler->unscheduleAllForTarget(this); } void CCNode::resumeSchedulerAndActions() { m_pScheduler->resumeTarget(this); m_pActionManager->resumeTarget(this); } void CCNode::pauseSchedulerAndActions() { m_pScheduler->pauseTarget(this); m_pActionManager->pauseTarget(this); } // override me void CCNode::update(float fDelta) { if (m_scriptEventListeners) { CCScriptEngineManager::sharedManager()->getScriptEngine()->executeNodeEnterFrameEvent(this, fDelta); } if (m_pComponentContainer && !m_pComponentContainer->isEmpty()) { m_pComponentContainer->visit(fDelta); } } CCAffineTransform CCNode::nodeToParentTransform(void) { if (m_bTransformDirty) { // Translate values float x = m_obPosition.x; float y = m_obPosition.y; if (m_bIgnoreAnchorPointForPosition) { x += m_obAnchorPointInPoints.x; y += m_obAnchorPointInPoints.y; } // Rotation values // Change rotation code to handle X and Y // If we skew with the exact same value for both x and y then we're simply just rotating float cx = 1, sx = 0, cy = 1, sy = 0; if (m_fRotationX || m_fRotationY) { float radiansX = -CC_DEGREES_TO_RADIANS(m_fRotationX); float radiansY = -CC_DEGREES_TO_RADIANS(m_fRotationY); cx = cosf(radiansX); sx = sinf(radiansX); cy = cosf(radiansY); sy = sinf(radiansY); } bool needsSkewMatrix = ( m_fSkewX || m_fSkewY ); // optimization: // inline anchor point calculation if skew is not needed // Adjusted transform calculation for rotational skew if (! needsSkewMatrix && !m_obAnchorPointInPoints.equals(CCPointZero)) { x += cy * -m_obAnchorPointInPoints.x * m_fScaleX + -sx * -m_obAnchorPointInPoints.y * m_fScaleY; y += sy * -m_obAnchorPointInPoints.x * m_fScaleX + cx * -m_obAnchorPointInPoints.y * m_fScaleY; } // Build Transform Matrix // Adjusted transform calculation for rotational skew m_sTransform = CCAffineTransformMake( cy * m_fScaleX, sy * m_fScaleX, -sx * m_fScaleY, cx * m_fScaleY, x, y ); // XXX: Try to inline skew // If skew is needed, apply skew and then anchor point if (needsSkewMatrix) { CCAffineTransform skewMatrix = CCAffineTransformMake(1.0f, tanf(CC_DEGREES_TO_RADIANS(m_fSkewY)), tanf(CC_DEGREES_TO_RADIANS(m_fSkewX)), 1.0f, 0.0f, 0.0f ); m_sTransform = CCAffineTransformConcat(skewMatrix, m_sTransform); // adjust anchor point if (!m_obAnchorPointInPoints.equals(CCPointZero)) { m_sTransform = CCAffineTransformTranslate(m_sTransform, -m_obAnchorPointInPoints.x, -m_obAnchorPointInPoints.y); } } if (m_bAdditionalTransformDirty) { m_sTransform = CCAffineTransformConcat(m_sTransform, m_sAdditionalTransform); m_bAdditionalTransformDirty = false; } m_bTransformDirty = false; } return m_sTransform; } void CCNode::setAdditionalTransform(const CCAffineTransform& additionalTransform) { m_sAdditionalTransform = additionalTransform; m_bTransformDirty = true; m_bAdditionalTransformDirty = true; } CCAffineTransform CCNode::parentToNodeTransform(void) { if ( m_bInverseDirty ) { m_sInverse = CCAffineTransformInvert(this->nodeToParentTransform()); m_bInverseDirty = false; } return m_sInverse; } CCAffineTransform CCNode::nodeToWorldTransform() { CCAffineTransform t = this->nodeToParentTransform(); for (CCNode *p = m_pParent; p != NULL; p = p->getParent()) t = CCAffineTransformConcat(t, p->nodeToParentTransform()); return t; } CCAffineTransform CCNode::worldToNodeTransform(void) { return CCAffineTransformInvert(this->nodeToWorldTransform()); } CCPoint CCNode::convertToNodeSpace(const CCPoint& worldPoint) { CCPoint ret = CCPointApplyAffineTransform(worldPoint, worldToNodeTransform()); return ret; } CCPoint CCNode::convertToWorldSpace(const CCPoint& nodePoint) { CCPoint ret = CCPointApplyAffineTransform(nodePoint, nodeToWorldTransform()); return ret; } CCPoint CCNode::convertToNodeSpaceAR(const CCPoint& worldPoint) { CCPoint nodePoint = convertToNodeSpace(worldPoint); return ccpSub(nodePoint, m_obAnchorPointInPoints); } CCPoint CCNode::convertToWorldSpaceAR(const CCPoint& nodePoint) { CCPoint pt = ccpAdd(nodePoint, m_obAnchorPointInPoints); return convertToWorldSpace(pt); } CCPoint CCNode::convertToWindowSpace(const CCPoint& nodePoint) { CCPoint worldPoint = this->convertToWorldSpace(nodePoint); return CCDirector::sharedDirector()->convertToUI(worldPoint); } // convenience methods which take a CCTouch instead of CCPoint CCPoint CCNode::convertTouchToNodeSpace(CCTouch *touch) { CCPoint point = touch->getLocation(); return this->convertToNodeSpace(point); } CCPoint CCNode::convertTouchToNodeSpaceAR(CCTouch *touch) { CCPoint point = touch->getLocation(); return this->convertToNodeSpaceAR(point); } void CCNode::updateTransform() { m_drawOrder = ++g_drawOrder; // Recursively iterate over children arrayMakeObjectsPerformSelector(m_pChildren, updateTransform, CCNode*); } CCComponent* CCNode::getComponent(const char *pName) const { return m_pComponentContainer->get(pName); } bool CCNode::addComponent(CCComponent *pComponent) { return m_pComponentContainer->add(pComponent); } bool CCNode::removeComponent(const char *pName) { return m_pComponentContainer->remove(pName); } bool CCNode::removeComponent(CCComponent *pComponent) { return m_pComponentContainer->remove(pComponent); } void CCNode::removeAllComponents() { m_pComponentContainer->removeAll(); } // merge CCNodeRGBA to CCNode GLubyte CCNode::getOpacity(void) { return m_realOpacity; } GLubyte CCNode::getDisplayedOpacity(void) { return m_displayedOpacity; } void CCNode::setOpacity(GLubyte opacity) { m_displayedOpacity = m_realOpacity = opacity; if (m_cascadeOpacityEnabled) { GLubyte parentOpacity = 255; if (m_pParent && m_pParent->isCascadeOpacityEnabled()) { parentOpacity = m_pParent->getDisplayedOpacity(); } this->updateDisplayedOpacity(parentOpacity); } } void CCNode::setOpacityModifyRGB(bool var) { m_isOpacityModifyRGB = var; if (m_pChildren && m_pChildren->count() != 0) { CCObject* child; CCARRAY_FOREACH(m_pChildren, child) { dynamic_cast<CCNode*>(child)->setOpacityModifyRGB(var); } } } bool CCNode::isOpacityModifyRGB(void) { return m_isOpacityModifyRGB; } void CCNode::updateDisplayedOpacity(GLubyte parentOpacity) { m_displayedOpacity = (GLubyte)(m_realOpacity * parentOpacity/255.0); if (m_cascadeOpacityEnabled) { CCObject* pObj; CCARRAY_FOREACH(m_pChildren, pObj) { dynamic_cast<CCNode*>(pObj)->updateDisplayedOpacity(m_displayedOpacity); } } } bool CCNode::isCascadeOpacityEnabled(void) { return m_cascadeOpacityEnabled; } void CCNode::setCascadeOpacityEnabled(bool cascadeOpacityEnabled) { m_cascadeOpacityEnabled = cascadeOpacityEnabled; } const ccColor3B& CCNode::getColor(void) { return m_realColor; } const ccColor3B& CCNode::getDisplayedColor() { return m_displayedColor; } void CCNode::setColor(const ccColor3B& color) { m_displayedColor = m_realColor = color; if (m_cascadeColorEnabled) { ccColor3B parentColor = ccWHITE; if (m_pParent && m_pParent->isCascadeColorEnabled()) { parentColor = m_pParent->getDisplayedColor(); } updateDisplayedColor(parentColor); } } void CCNode::updateDisplayedColor(const ccColor3B& parentColor) { m_displayedColor.r = (GLubyte)(m_realColor.r * (float)parentColor.r/255.0f); m_displayedColor.g = (GLubyte)(m_realColor.g * (float)parentColor.g/255.0f); m_displayedColor.b = (GLubyte)(m_realColor.b * (float)parentColor.b/255.0f); if (m_cascadeColorEnabled) { CCObject *obj = NULL; CCARRAY_FOREACH(m_pChildren, obj) { dynamic_cast<CCNode*>(obj)->updateDisplayedColor(m_displayedColor); } } } bool CCNode::isCascadeColorEnabled(void) { return m_cascadeColorEnabled; } void CCNode::setCascadeColorEnabled(bool cascadeColorEnabled) { m_cascadeColorEnabled = cascadeColorEnabled; } // ---------------------------------------- CCScene *CCNode::getScene() { if (!m_bRunning) return NULL; CCNode *parent = getParent(); if (!parent) return NULL; CCNode *scene = parent; while (parent) { parent = parent->getParent(); if (parent) scene = parent; } return dynamic_cast<CCScene*>(scene); } void CCNode::registerWithTouchDispatcher() { // CCLOG("CCNODE: REGISTER WITH TOUCH DISPATHCER <%p>", this); CCScene *scene = getScene(); if (scene) { scene->addTouchableNode(this); } } void CCNode::unregisterWithTouchDispatcher() { // CCLOG("CCNODE: UNREGISTER WITH TOUCH DISPATHCER <%p>", this); CCScene *scene = getScene(); if (scene) { scene->removeTouchableNode(this); } } bool CCNode::isTouchCaptureEnabled() { return m_bTouchCaptureEnabled; } void CCNode::setTouchCaptureEnabled(bool value) { m_bTouchCaptureEnabled = value; } bool CCNode::isTouchSwallowEnabled() { return m_bTouchSwallowEnabled; } void CCNode::setTouchSwallowEnabled(bool value) { m_bTouchSwallowEnabled = value; } bool CCNode::ccTouchCaptureBegan(CCTouch *pTouch, CCNode *pTarget) { CC_UNUSED_PARAM(pTouch); CC_UNUSED_PARAM(pTarget); if (m_scriptEventListeners) { return executeScriptTouchHandler(CCTOUCHBEGAN, pTouch, NODE_TOUCH_CAPTURING_PHASE); } else { return true; } } bool CCNode::ccTouchCaptureMoved(CCTouch *pTouch, CCNode *pTarget) { CC_UNUSED_PARAM(pTouch); CC_UNUSED_PARAM(pTarget); if (m_scriptEventListeners) { return executeScriptTouchHandler(CCTOUCHMOVED, pTouch, NODE_TOUCH_CAPTURING_PHASE); } else { return true; } } void CCNode::ccTouchCaptureEnded(CCTouch *pTouch, CCNode *pTarget) { CC_UNUSED_PARAM(pTouch); CC_UNUSED_PARAM(pTarget); if (m_scriptEventListeners) { executeScriptTouchHandler(CCTOUCHENDED, pTouch, NODE_TOUCH_CAPTURING_PHASE); } } void CCNode::ccTouchCaptureCancelled(CCTouch *pTouch, CCNode *pTarget) { CC_UNUSED_PARAM(pTouch); CC_UNUSED_PARAM(pTarget); if (m_scriptEventListeners) { executeScriptTouchHandler(CCTOUCHCANCELLED, pTouch, NODE_TOUCH_CAPTURING_PHASE); } } void CCNode::ccTouchesCaptureBegan(CCSet *pTouches, CCNode *pTarget) { CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pTarget); if (m_scriptEventListeners) { executeScriptTouchHandler(CCTOUCHBEGAN, pTouches, NODE_TOUCH_CAPTURING_PHASE); } } void CCNode::ccTouchesCaptureMoved(CCSet *pTouches, CCNode *pTarget) { CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pTarget); if (m_scriptEventListeners) { executeScriptTouchHandler(CCTOUCHMOVED, pTouches, NODE_TOUCH_CAPTURING_PHASE); } } void CCNode::ccTouchesCaptureEnded(CCSet *pTouches, CCNode *pTarget) { CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pTarget); if (m_scriptEventListeners) { executeScriptTouchHandler(CCTOUCHENDED, pTouches, NODE_TOUCH_CAPTURING_PHASE); } } void CCNode::ccTouchesCaptureCancelled(CCSet *pTouches, CCNode *pTarget) { CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pTarget); if (m_scriptEventListeners) { executeScriptTouchHandler(CCTOUCHCANCELLED, pTouches, NODE_TOUCH_CAPTURING_PHASE); } } void CCNode::ccTouchesCaptureAdded(CCSet *pTouches, CCNode *pTarget) { CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pTarget); if (m_scriptEventListeners) { executeScriptTouchHandler(CCTOUCHADDED, pTouches, NODE_TOUCH_CAPTURING_PHASE); } } void CCNode::ccTouchesCaptureRemoved(CCSet *pTouches, CCNode *pTarget) { CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pTarget); if (m_scriptEventListeners) { executeScriptTouchHandler(CCTOUCHREMOVED, pTouches, NODE_TOUCH_CAPTURING_PHASE); } } bool CCNode::isTouchEnabled() { return m_bTouchEnabled; } void CCNode::setTouchEnabled(bool enabled) { if (m_bTouchEnabled != enabled) { m_bTouchEnabled = enabled; if (m_bRunning) { if (enabled) { registerWithTouchDispatcher(); } else { unregisterWithTouchDispatcher(); } } } } void CCNode::setTouchMode(int mode) { if(m_eTouchMode != mode) { m_eTouchMode = mode; if( m_bTouchEnabled) { setTouchEnabled(false); setTouchEnabled(true); } } } int CCNode::getTouchMode() { return m_eTouchMode; } bool CCNode::ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent) { CC_UNUSED_PARAM(pTouch); CC_UNUSED_PARAM(pEvent); if (m_scriptEventListeners) { executeScriptTouchHandler(CCTOUCHBEGAN, pTouch); } return true; } void CCNode::ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent) { CC_UNUSED_PARAM(pTouch); CC_UNUSED_PARAM(pEvent); if (m_scriptEventListeners) { executeScriptTouchHandler(CCTOUCHMOVED, pTouch); } } void CCNode::ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent) { CC_UNUSED_PARAM(pTouch); CC_UNUSED_PARAM(pEvent); if (m_scriptEventListeners) { executeScriptTouchHandler(CCTOUCHENDED, pTouch); } } void CCNode::ccTouchCancelled(CCTouch *pTouch, CCEvent *pEvent) { CC_UNUSED_PARAM(pTouch); CC_UNUSED_PARAM(pEvent); if (m_scriptEventListeners) { executeScriptTouchHandler(CCTOUCHCANCELLED, pTouch); } } void CCNode::ccTouchesBegan(CCSet *pTouches, CCEvent *pEvent) { CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent); if (m_scriptEventListeners) { executeScriptTouchHandler(CCTOUCHBEGAN, pTouches); } } void CCNode::ccTouchesMoved(CCSet *pTouches, CCEvent *pEvent) { CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent); if (m_scriptEventListeners) { executeScriptTouchHandler(CCTOUCHMOVED, pTouches); } } void CCNode::ccTouchesEnded(CCSet *pTouches, CCEvent *pEvent) { CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent); if (m_scriptEventListeners) { executeScriptTouchHandler(CCTOUCHENDED, pTouches); } } void CCNode::ccTouchesCancelled(CCSet *pTouches, CCEvent *pEvent) { CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent); if (m_scriptEventListeners) { executeScriptTouchHandler(CCTOUCHCANCELLED, pTouches); } } void CCNode::ccTouchesAdded(CCSet *pTouches, CCEvent *pEvent) { CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent); if (m_scriptEventListeners) { executeScriptTouchHandler(CCTOUCHADDED, pTouches); } } void CCNode::ccTouchesRemoved(CCSet *pTouches, CCEvent *pEvent) { CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent); if (m_scriptEventListeners) { executeScriptTouchHandler(CCTOUCHREMOVED, pTouches); } } int CCNode::executeScriptTouchHandler(int nEventType, CCTouch *pTouch, int phase /* = NODE_TOUCH_TARGETING_PHASE */) { return CCScriptEngineManager::sharedManager()->getScriptEngine()->executeNodeTouchEvent(this, nEventType, pTouch, phase); } int CCNode::executeScriptTouchHandler(int nEventType, CCSet *pTouches, int phase /* = NODE_TOUCH_TARGETING_PHASE */) { return CCScriptEngineManager::sharedManager()->getScriptEngine()->executeNodeTouchesEvent(this, nEventType, pTouches, phase); } NS_CC_END
{ "pile_set_name": "Github" }
# 题意 题目描述 输入n个整数,找出其中最小的K个数。 例如输入4,5,1,6,2,7,3,8这8个数字, 则最小的4个数字是1,2,3,4,。 # 分析 ## 方法一--排序 要求一个序列中最小的K个数,按照惯有的思维方式,很简单,先对这个序列从小到大排序,然后输出前面的最小的K个数即可; 至于选取什么样的排序方法,第一时间应该想到的是快速排序,我们知道,快速排序平均时间复杂度为O(nlogn),然后再遍历序列中前K个元素输出,即可,总的时间复杂度为O(nlogn + k) = O(nlogn);——方法一 ## 方法二--选择或者交换排序 再进一步想想,题目并没有要求要查找的k个数,甚至是后面的n-k个数是有序的,既然这样,咱们又何必对所有的n个数都进行排序呢? 这个时候,想到了选择或交换排序,即遍历n个数,先把最先遍历到的K个数存入大小为k的数组之中,对这k个数,利用选择或交换排序,找到k个数中的最大数Kmax(Kmax为这K个元素的数组中最大的元素),用时间为O(k)(你应该知道,插入或选择排序查找操作需要O(k)的时间),后再继续遍历后n-k个数,x与Kmax比较:如果x< Kmax,则x代替Kmax,并再次重新找出K个元素的数组中的最大元素Kmax';如果x>Kmax,则不更新数组。这样每次更新和不更新数组所用的时间为O(k)或O(0),整趟下来,总的时间复杂度平均下来为:nO(k) = O(nk);——方法二 ## 方法三--最大堆 当然,更好的办法是维护k个元素的最大堆,原理与上述第2个方案一致,即用容量为K的最大堆存储最先遍历的K个数,并假设它们即是最小的K个数,建堆需要O(k)后,有k1)。继续遍历数列,每次遍历一个元素x,与堆顶元素比较,x),否则不更新堆。这样下来,总费时O(k+(n-k)logk) = O(nlogk)。此方法得益于在堆中,查找等各项操作时间复杂度均为logk(不然,就如上述思路2所述:直接用数组也可以找出前k个小的元素,用时O(nk)); ## 方法四--快速排序的分治划分(中位数作为枢轴) 按编程之美第141页上解法二的所述,类似快速排序的划分方法,N个数存储在数组S中,再从数组中随机选取一个数X(随机选取枢纽元,可做到线性期望时间O(N)的复杂度),把数组划分为Sa和Sb两部分,Sa<= X <=Sb,如果要查找的K个小的元素小于Sa中的元素个数,则返回Sa中较小的K个元素,否则返回Sa中K个小的元素 + Sb中小的K-|Sa|个元素。像上述过程一样,这个运用类似快速排序的partition的快速选择Select算法寻找最小的K个元素,在最坏的情况下亦能做到O(N)的复杂度。 不过值得一提的是,这个快速选择Select算法是选择数组中“中位数的中位数”作为枢纽元,而非随机选择枢纽元; ## 方法五--快速排序的分治划分(随机枢轴) Randomized-Select,每次都是随机选择数列中的一个元素作为主元,在O(n)的时间内找到第K小的元素,然后遍历输出前面的K个小的元素。如果能的话,那么总的时间复杂度为线性期望时间:O(n+k) = O(n)(当n比较小时); ## 方法六--线性排序 线性时间的排序,即计数排序,时间复杂度虽能达到O(n),但是,限制条件太多了,不常用; ## 方法七--最小堆与优先队列 ”可以用最小堆初始化数组,然后取这个优先队列前k个值。复杂度为O(n)+kO(logn)“。意思是针对整个数组序列建立最小堆,建堆所用时间为O(n),然后取堆中的前k个数,即总的时间复杂度为:O(n+klogn)。 ## 方法八--提取最小堆的元素 与上述思路7类似,不同的是在对元素数组原地建立最小堆O(n)后,然后提取K次,但是每次提取时,换到顶部的元素只需要下移顶多K次就足够了,下移次数逐次减少(而上述思路7每次提取都需要logn,所有提取K次,思路7需要K*logn,而本思路8只需要K^2);
{ "pile_set_name": "Github" }
/* * Driver for USB Attached SCSI devices - Unusual Devices File * * (c) 2013 Hans de Goede <[email protected]> * * Based on the same file for the usb-storage driver, which is: * (c) 2000-2002 Matthew Dharm ([email protected]) * (c) 2000 Adam J. Richter ([email protected]), Yggdrasil Computing, Inc. * * 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 this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * IMPORTANT NOTE: This file must be included in another file which defines * a UNUSUAL_DEV macro before this file is included. */ /* * If you edit this file, please try to keep it sorted first by VendorID, * then by ProductID. * * If you want to add an entry for this file, be sure to include the * following information: * - a patch that adds the entry for your device, including your * email address right above the entry (plus maybe a brief * explanation of the reason for the entry), * - lsusb -v output for the device * Send your submission to Hans de Goede <[email protected]> * and don't forget to CC: the USB development list <[email protected]> */ /* * Apricorn USB3 dongle sometimes returns "USBSUSBSUSBS" in response to SCSI * commands in UAS mode. Observed with the 1.28 firmware; are there others? */ UNUSUAL_DEV(0x0984, 0x0301, 0x0128, 0x0128, "Apricorn", "", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_UAS), /* https://bugzilla.kernel.org/show_bug.cgi?id=79511 */ UNUSUAL_DEV(0x0bc2, 0x2312, 0x0000, 0x9999, "Seagate", "Expansion Desk", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_ATA_1X), /* https://bbs.archlinux.org/viewtopic.php?id=183190 */ UNUSUAL_DEV(0x0bc2, 0x3312, 0x0000, 0x9999, "Seagate", "Expansion Desk", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_ATA_1X), /* Reported-by: David Webb <[email protected]> */ UNUSUAL_DEV(0x0bc2, 0x331a, 0x0000, 0x9999, "Seagate", "Expansion Desk", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_REPORT_LUNS), /* Reported-by: Hans de Goede <[email protected]> */ UNUSUAL_DEV(0x0bc2, 0x3320, 0x0000, 0x9999, "Seagate", "Expansion Desk", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_ATA_1X), /* Reported-by: Bogdan Mihalcea <[email protected]> */ UNUSUAL_DEV(0x0bc2, 0xa003, 0x0000, 0x9999, "Seagate", "Backup Plus", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_ATA_1X), /* Reported-by: Marcin Zajączkowski <[email protected]> */ UNUSUAL_DEV(0x0bc2, 0xa013, 0x0000, 0x9999, "Seagate", "Backup Plus", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_ATA_1X), /* Reported-by: Hans de Goede <[email protected]> */ UNUSUAL_DEV(0x0bc2, 0xa0a4, 0x0000, 0x9999, "Seagate", "Backup Plus Desk", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_ATA_1X), /* https://bbs.archlinux.org/viewtopic.php?id=183190 */ UNUSUAL_DEV(0x0bc2, 0xab20, 0x0000, 0x9999, "Seagate", "Backup+ BK", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_ATA_1X), /* https://bbs.archlinux.org/viewtopic.php?id=183190 */ UNUSUAL_DEV(0x0bc2, 0xab21, 0x0000, 0x9999, "Seagate", "Backup+ BK", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_ATA_1X), /* Reported-by: G. Richard Bellamy <[email protected]> */ UNUSUAL_DEV(0x0bc2, 0xab2a, 0x0000, 0x9999, "Seagate", "BUP Fast HDD", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_ATA_1X), /* Reported-by: Benjamin Tissoires <[email protected]> */ UNUSUAL_DEV(0x13fd, 0x3940, 0x0000, 0x9999, "Initio Corporation", "INIC-3069", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_ATA_1X | US_FL_IGNORE_RESIDUE), /* Reported-by: Tom Arild Naess <[email protected]> */ UNUSUAL_DEV(0x152d, 0x0539, 0x0000, 0x9999, "JMicron", "JMS539", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_REPORT_OPCODES), /* Reported-by: Claudio Bizzarri <[email protected]> */ UNUSUAL_DEV(0x152d, 0x0567, 0x0000, 0x9999, "JMicron", "JMS567", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_BROKEN_FUA | US_FL_NO_REPORT_OPCODES), /* Reported-by: David Kozub <[email protected]> */ UNUSUAL_DEV(0x152d, 0x0578, 0x0000, 0x9999, "JMicron", "JMS567", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_BROKEN_FUA), /* Reported-by: Hans de Goede <[email protected]> */ UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999, "VIA", "VL711", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_ATA_1X), /* Reported-by: Icenowy Zheng <[email protected]> */ UNUSUAL_DEV(0x2537, 0x1068, 0x0000, 0x9999, "Norelsys", "NS1068X", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_UAS), /* Reported-by: Takeo Nakayama <[email protected]> */ UNUSUAL_DEV(0x357d, 0x7788, 0x0000, 0x9999, "JMicron", "JMS566", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_REPORT_OPCODES), /* Reported-by: Hans de Goede <[email protected]> */ UNUSUAL_DEV(0x4971, 0x1012, 0x0000, 0x9999, "Hitachi", "External HDD", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_UAS), /* Reported-by: Richard Henderson <[email protected]> */ UNUSUAL_DEV(0x4971, 0x8017, 0x0000, 0x9999, "SimpleTech", "External HDD", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_REPORT_OPCODES), /* "G-DRIVE" external HDD hangs on write without these. * Patch submitted by Alexander Kappner <[email protected]> */ UNUSUAL_DEV(0x4971, 0x8024, 0x0000, 0x9999, "SimpleTech", "External HDD", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_ALWAYS_SYNC),
{ "pile_set_name": "Github" }
/* ================================================================ * JSQLParser : java based sql parser * ================================================================ * * Project Info: http://jsqlparser.sourceforge.net * Project Lead: Leonardo Francalanci ([email protected]); * * (C) Copyright 2004, by Leonardo Francalanci * * This library is free software; you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Foundation; * either version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License along with this * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307, USA. */ package net.sf.jsqlparser; /** * An exception class with stack trace informations */ public class JSQLParserException extends Exception { private Throwable cause = null; public JSQLParserException() { super(); } public JSQLParserException(String arg0) { super(arg0); } public JSQLParserException(Throwable arg0) { this.cause = arg0; } public JSQLParserException(String arg0, Throwable arg1) { super(arg0); this.cause = arg1; } public Throwable getCause() { return cause; } public void printStackTrace() { printStackTrace(System.err); } public void printStackTrace(java.io.PrintWriter pw) { super.printStackTrace(pw); if (cause != null) { pw.println("Caused by:"); cause.printStackTrace(pw); } } public void printStackTrace(java.io.PrintStream ps) { super.printStackTrace(ps); if (cause != null) { ps.println("Caused by:"); cause.printStackTrace(ps); } } }
{ "pile_set_name": "Github" }
; RUN: opt -S -wholeprogramdevirt %s | FileCheck %s target datalayout = "e-p:64:64" target triple = "x86_64-unknown-linux-gnu" @vt1 = constant [1 x i8*] [i8* bitcast (i64 (i8*, i128)* @vf1 to i8*)], !type !0 @vt2 = constant [1 x i8*] [i8* bitcast (i64 (i8*, i128)* @vf2 to i8*)], !type !0 @vt3 = constant [1 x i8*] [i8* bitcast (i128 (i8*, i64)* @vf3 to i8*)], !type !1 @vt4 = constant [1 x i8*] [i8* bitcast (i128 (i8*, i64)* @vf4 to i8*)], !type !1 define i64 @vf1(i8* %this, i128 %arg) readnone { %argtrunc = trunc i128 %arg to i64 ret i64 %argtrunc } define i64 @vf2(i8* %this, i128 %arg) readnone { %argtrunc = trunc i128 %arg to i64 ret i64 %argtrunc } define i128 @vf3(i8* %this, i64 %arg) readnone { %argzext = zext i64 %arg to i128 ret i128 %argzext } define i128 @vf4(i8* %this, i64 %arg) readnone { %argzext = zext i64 %arg to i128 ret i128 %argzext } ; CHECK: define i64 @call1 define i64 @call1(i8* %obj) { %vtableptr = bitcast i8* %obj to [1 x i8*]** %vtable = load [1 x i8*]*, [1 x i8*]** %vtableptr %vtablei8 = bitcast [1 x i8*]* %vtable to i8* %p = call i1 @llvm.type.test(i8* %vtablei8, metadata !"typeid1") call void @llvm.assume(i1 %p) %fptrptr = getelementptr [1 x i8*], [1 x i8*]* %vtable, i32 0, i32 0 %fptr = load i8*, i8** %fptrptr %fptr_casted = bitcast i8* %fptr to i64 (i8*, i128)* ; CHECK: call i64 % %result = call i64 %fptr_casted(i8* %obj, i128 1) ret i64 %result } ; CHECK: define i128 @call2 define i128 @call2(i8* %obj) { %vtableptr = bitcast i8* %obj to [1 x i8*]** %vtable = load [1 x i8*]*, [1 x i8*]** %vtableptr %vtablei8 = bitcast [1 x i8*]* %vtable to i8* %p = call i1 @llvm.type.test(i8* %vtablei8, metadata !"typeid2") call void @llvm.assume(i1 %p) %fptrptr = getelementptr [1 x i8*], [1 x i8*]* %vtable, i32 0, i32 0 %fptr = load i8*, i8** %fptrptr %fptr_casted = bitcast i8* %fptr to i128 (i8*, i64)* ; CHECK: call i128 % %result = call i128 %fptr_casted(i8* %obj, i64 1) ret i128 %result } declare i1 @llvm.type.test(i8*, metadata) declare void @llvm.assume(i1) !0 = !{i32 0, !"typeid1"} !1 = !{i32 0, !"typeid2"}
{ "pile_set_name": "Github" }
package org.telegram.telegrambots.meta.api.objects.media.serialization; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import org.telegram.telegrambots.meta.api.objects.media.*; import java.io.IOException; /** * @author Ruben Bermudez * @version 1.0 */ public class InputMediaDeserializer extends StdDeserializer<InputMedia> { private final ObjectMapper objectMapper; public InputMediaDeserializer() { this(null); } public InputMediaDeserializer(Class<?> vc) { super(vc); this.objectMapper = new ObjectMapper(); } @Override public InputMedia deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException { JsonNode node = jsonParser.getCodec().readTree(jsonParser); switch (node.get("type").asText()) { case "photo": return objectMapper.readValue(node.toString(), new com.fasterxml.jackson.core.type.TypeReference<InputMediaPhoto>(){}); case "video": return objectMapper.readValue(node.toString(), new com.fasterxml.jackson.core.type.TypeReference<InputMediaVideo>(){}); case "animation": return objectMapper.readValue(node.toString(), new com.fasterxml.jackson.core.type.TypeReference<InputMediaAnimation>(){}); case "audio": return objectMapper.readValue(node.toString(), new com.fasterxml.jackson.core.type.TypeReference<InputMediaAudio>(){}); case "document": return objectMapper.readValue(node.toString(), new com.fasterxml.jackson.core.type.TypeReference<InputMediaDocument>(){}); } return null; } }
{ "pile_set_name": "Github" }
{ "name": "b_", "version": "1.3.4", "author": "Mikhail Davydov <[email protected]>", "description": "BEM class name generator", "license": "MIT", "contributors": [ { "name": "Mikhail Davydov", "email": "[email protected]" } ], "keywords": [ "bem", "naming", "className", "class", "generator" ], "repository": { "type": "git", "url": "git://github.com/azproduction/b_.git" }, "engines": { "node": ">= 0.8.0" }, "dependencies": {}, "devDependencies": { "jshint": "2.1.3", "mocha": "~1.11.0", "jscs": "~1.4.5", "istanbul": "~0.2.11", "chai": "*", "husky": "~0.5.1" }, "scripts": { "test": "jshint . && jscs . && mocha -R spec", "coverage": "istanbul cover node_modules/.bin/_mocha --report html -- -R spec", "precommit": "npm test", "prepush": "npm test" } }
{ "pile_set_name": "Github" }
//===--- InfoByHwMode.cpp -------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // Classes that implement data parameterized by HW modes for instruction // selection. Currently it is ValueTypeByHwMode (parameterized ValueType), // and RegSizeInfoByHwMode (parameterized register/spill size and alignment // data). //===----------------------------------------------------------------------===// #include "CodeGenTarget.h" #include "InfoByHwMode.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/Twine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" #include <set> #include <string> using namespace llvm; std::string llvm::getModeName(unsigned Mode) { if (Mode == DefaultMode) return "*"; return (Twine('m') + Twine(Mode)).str(); } ValueTypeByHwMode::ValueTypeByHwMode(Record *R, const CodeGenHwModes &CGH) { const HwModeSelect &MS = CGH.getHwModeSelect(R); for (const HwModeSelect::PairType &P : MS.Items) { auto I = Map.insert({P.first, MVT(llvm::getValueType(P.second))}); assert(I.second && "Duplicate entry?"); (void)I; } } bool ValueTypeByHwMode::operator== (const ValueTypeByHwMode &T) const { assert(isValid() && T.isValid() && "Invalid type in assignment"); bool Simple = isSimple(); if (Simple != T.isSimple()) return false; if (Simple) return getSimple() == T.getSimple(); return Map == T.Map; } bool ValueTypeByHwMode::operator< (const ValueTypeByHwMode &T) const { assert(isValid() && T.isValid() && "Invalid type in comparison"); // Default order for maps. return Map < T.Map; } MVT &ValueTypeByHwMode::getOrCreateTypeForMode(unsigned Mode, MVT Type) { auto F = Map.find(Mode); if (F != Map.end()) return F->second; // If Mode is not in the map, look up the default mode. If it exists, // make a copy of it for Mode and return it. auto D = Map.find(DefaultMode); if (D != Map.end()) return Map.insert(std::make_pair(Mode, D->second)).first->second; // If default mode is not present either, use provided Type. return Map.insert(std::make_pair(Mode, Type)).first->second; } StringRef ValueTypeByHwMode::getMVTName(MVT T) { StringRef N = llvm::getEnumName(T.SimpleTy); N.consume_front("MVT::"); return N; } void ValueTypeByHwMode::writeToStream(raw_ostream &OS) const { if (isSimple()) { OS << getMVTName(getSimple()); return; } std::vector<const PairType*> Pairs; for (const auto &P : Map) Pairs.push_back(&P); std::sort(Pairs.begin(), Pairs.end(), deref<std::less<PairType>>()); OS << '{'; for (unsigned i = 0, e = Pairs.size(); i != e; ++i) { const PairType *P = Pairs[i]; OS << '(' << getModeName(P->first) << ':' << getMVTName(P->second).str() << ')'; if (i != e-1) OS << ','; } OS << '}'; } LLVM_DUMP_METHOD void ValueTypeByHwMode::dump() const { dbgs() << *this << '\n'; } ValueTypeByHwMode llvm::getValueTypeByHwMode(Record *Rec, const CodeGenHwModes &CGH) { #ifndef NDEBUG if (!Rec->isSubClassOf("ValueType")) Rec->dump(); #endif assert(Rec->isSubClassOf("ValueType") && "Record must be derived from ValueType"); if (Rec->isSubClassOf("HwModeSelect")) return ValueTypeByHwMode(Rec, CGH); return ValueTypeByHwMode(llvm::getValueType(Rec)); } RegSizeInfo::RegSizeInfo(Record *R, const CodeGenHwModes &CGH) { RegSize = R->getValueAsInt("RegSize"); SpillSize = R->getValueAsInt("SpillSize"); SpillAlignment = R->getValueAsInt("SpillAlignment"); } bool RegSizeInfo::operator< (const RegSizeInfo &I) const { return std::tie(RegSize, SpillSize, SpillAlignment) < std::tie(I.RegSize, I.SpillSize, I.SpillAlignment); } bool RegSizeInfo::isSubClassOf(const RegSizeInfo &I) const { return RegSize <= I.RegSize && SpillAlignment && I.SpillAlignment % SpillAlignment == 0 && SpillSize <= I.SpillSize; } void RegSizeInfo::writeToStream(raw_ostream &OS) const { OS << "[R=" << RegSize << ",S=" << SpillSize << ",A=" << SpillAlignment << ']'; } RegSizeInfoByHwMode::RegSizeInfoByHwMode(Record *R, const CodeGenHwModes &CGH) { const HwModeSelect &MS = CGH.getHwModeSelect(R); for (const HwModeSelect::PairType &P : MS.Items) { auto I = Map.insert({P.first, RegSizeInfo(P.second, CGH)}); assert(I.second && "Duplicate entry?"); (void)I; } } bool RegSizeInfoByHwMode::operator< (const RegSizeInfoByHwMode &I) const { unsigned M0 = Map.begin()->first; return get(M0) < I.get(M0); } bool RegSizeInfoByHwMode::operator== (const RegSizeInfoByHwMode &I) const { unsigned M0 = Map.begin()->first; return get(M0) == I.get(M0); } bool RegSizeInfoByHwMode::isSubClassOf(const RegSizeInfoByHwMode &I) const { unsigned M0 = Map.begin()->first; return get(M0).isSubClassOf(I.get(M0)); } bool RegSizeInfoByHwMode::hasStricterSpillThan(const RegSizeInfoByHwMode &I) const { unsigned M0 = Map.begin()->first; const RegSizeInfo &A0 = get(M0); const RegSizeInfo &B0 = I.get(M0); return std::tie(A0.SpillSize, A0.SpillAlignment) > std::tie(B0.SpillSize, B0.SpillAlignment); } void RegSizeInfoByHwMode::writeToStream(raw_ostream &OS) const { typedef typename decltype(Map)::value_type PairType; std::vector<const PairType*> Pairs; for (const auto &P : Map) Pairs.push_back(&P); std::sort(Pairs.begin(), Pairs.end(), deref<std::less<PairType>>()); OS << '{'; for (unsigned i = 0, e = Pairs.size(); i != e; ++i) { const PairType *P = Pairs[i]; OS << '(' << getModeName(P->first) << ':' << P->second << ')'; if (i != e-1) OS << ','; } OS << '}'; } namespace llvm { raw_ostream &operator<<(raw_ostream &OS, const ValueTypeByHwMode &T) { T.writeToStream(OS); return OS; } raw_ostream &operator<<(raw_ostream &OS, const RegSizeInfo &T) { T.writeToStream(OS); return OS; } raw_ostream &operator<<(raw_ostream &OS, const RegSizeInfoByHwMode &T) { T.writeToStream(OS); return OS; } }
{ "pile_set_name": "Github" }
/** * Copyright (c) 2013-2020 Contributors to the Eclipse Foundation * * <p> See the NOTICE file distributed with this work for additional information regarding copyright * ownership. All rights reserved. This program and the accompanying materials are made available * under the terms of the Apache License, Version 2.0 which accompanies this distribution and is * available at http://www.apache.org/licenses/LICENSE-2.0.txt */ package org.locationtech.geowave.core.index; import static org.junit.Assert.assertEquals; import org.junit.Test; public class StringUtilsTest { @Test public void testFull() { final String[] result = StringUtils.stringsFromBinary(StringUtils.stringsToBinary(new String[] {"12", "34"})); assertEquals(2, result.length); assertEquals("12", result[0]); assertEquals("34", result[1]); } @Test public void testEmpty() { final String[] result = StringUtils.stringsFromBinary(StringUtils.stringsToBinary(new String[] {})); assertEquals(0, result.length); } }
{ "pile_set_name": "Github" }
<html> <head> <title>Doppler</title> <!--script type="text/javascript" src="sce.js"></script--> <script type = "text/javascript" src="../../glge-compiled.js"></script> <!--Incluindo o motor GLGE--> <script type = "text/javascript" src="audio3d.js"></script> <script> var doc = new GLGE.Document(); var mundo; var box; var car; var som = new GLGE.Audio3D("som"); function debug(a) { document.getElementById("debug").innerHTML = a; } doc.onLoad = function() { //create the renderer var gameRenderer=new GLGE.Renderer(document.getElementById('canvas')); gameScene=new GLGE.Scene(); gameScene=doc.getElement("mainscene"); gameRenderer.setScene(gameScene); var mouse=new GLGE.MouseInput(document.getElementById('canvas')); var keys=new GLGE.KeyInput(); var mouseovercanvas; var hoverobj; var camera = doc.getElement("MCamera"); var duckSource = doc.getElement("duck"); var lookAt=function(origin,point,up){ if(!up) up=[0,1,0]; var coord=[origin[0]-point[0],origin[1]-point[1],origin[2]-point[2]]; var zvec=GLGE.toUnitVec3(coord); var xvec=GLGE.toUnitVec3(GLGE.crossVec3(up,zvec)); var yvec=GLGE.toUnitVec3(GLGE.crossVec3(zvec,xvec)); return [xvec[0], yvec[0], zvec[0], 0, xvec[1], yvec[1], zvec[1], 0, xvec[2], yvec[2], zvec[2], 0, 0, 0, 0, 1]; } function InitSound() { GLGE.Audio3D.loadIR(); // Load Impulse Response(IR) files GLGE.Audio3D.initListener(camera); som.setFiles(["holdin_back.ogg","horn.ogg"]);//set audio files som.initSource(duckSource); som.setEffect(GLGE.AudioIR_NONE); som.setVolumeEffect(0); som.setVolumeMain(5); som.setAudioSource(1); //horn.ogg GLGE.Audio3D.setDopplerFactor(5); duckSource.setLocX(-60); som.play(true); //true = loop } InitSound(); var p = 0; function moveDuck() { duckSource.setLocX(duckSource.getLocX()+Math.sin(p)*2); p+=0.005; if(p>3.14) p = -3.14; } setInterval(moveDuck,10); function mouselook(){ if(mouseovercanvas){ var mousepos=mouse.getMousePosition(); mousepos.x=mousepos.x-document.getElementById("container").offsetLeft; mousepos.y=mousepos.y-document.getElementById("container").offsetTop; var camera=gameScene.camera; camerarot=camera.getRotation(); inc=(mousepos.y-(document.getElementById('canvas').offsetHeight/2))/500; // var trans=camera.getRotMatrix().x([0,0,-1,1]); var trans=GLGE.mulMat4Vec4(camera.getRotMatrix(),[0,0,-1,1]); var mag=Math.pow(Math.pow(trans[0],2)+Math.pow(trans[1],2),0.5); trans[0]=trans[0]/mag; trans[1]=trans[1]/mag; camera.setRotX(1.56-trans[1]*inc); camera.setRotZ(-trans[0]*inc); var width=document.getElementById('canvas').offsetWidth; if(mousepos.x<width*0.3){ var turn=Math.pow((mousepos.x-width*0.3)/(width*0.3),2)*0.005*(now-lasttime); camera.setRotY(camerarot.y+turn); } if(mousepos.x>width*0.7){ var turn=Math.pow((mousepos.x-width*0.7)/(width*0.3),2)*0.005*(now-lasttime); camera.setRotY(camerarot.y-turn); } } } function checkkeys(){ var camera=gameScene.camera; camerapos=camera.getPosition(); camerarot=camera.getRotation(); var mat=camera.getRotMatrix(); // var trans=mat.x([0,0,-1]); var trans=GLGE.mulMat4Vec4(mat,[0,0,-1,1]); var mag=Math.pow(Math.pow(trans[0],2)+Math.pow(trans[1],2),0.5); trans[0]=trans[0]/mag; trans[1]=trans[1]/mag; var yinc=0; var xinc=0; if(keys.isKeyPressed(GLGE.KI_M)) {addduck();} if(keys.isKeyPressed(GLGE.KI_W)) {yinc=yinc+parseFloat(trans[1]);xinc=xinc+parseFloat(trans[0]);} if(keys.isKeyPressed(GLGE.KI_S)) {yinc=yinc-parseFloat(trans[1]);xinc=xinc-parseFloat(trans[0]);} if(keys.isKeyPressed(GLGE.KI_A)) {yinc=yinc+parseFloat(trans[0]);xinc=xinc-parseFloat(trans[1]);} if(keys.isKeyPressed(GLGE.KI_D)) {yinc=yinc-parseFloat(trans[0]);xinc=xinc+parseFloat(trans[1]);} if(keys.isKeyPressed(GLGE.KI_LEFT_ARROW)) {camera.setRotZ(0.5);} if(levelmap.getHeightAt(camerapos.x+xinc,camerapos.y)>30) xinc=0; if(levelmap.getHeightAt(camerapos.x,camerapos.y+yinc)>30) yinc=0; if(levelmap.getHeightAt(camerapos.x+xinc,camerapos.y+yinc)>30){yinc=0;xinc=0;} else{ camera.setLocZ(levelmap.getHeightAt(camerapos.x+xinc,camerapos.y+yinc)+8); } if(xinc!=0 || yinc!=0){ camera.setLocY(camerapos.y+yinc*0.05*(now-lasttime));camera.setLocX(camerapos.x+xinc*0.05*(now-lasttime)); } } levelmap=new GLGE.HeightMap("images/map.png",120,120,-50,50,-50,50,0,50); var lasttime=0; var frameratebuffer=60; start=parseInt(new Date().getTime()); var now; function Render(){ now=parseInt(new Date().getTime()); frameratebuffer=Math.round(((frameratebuffer*9)+1000/(now-lasttime))/10); mouselook(); checkkeys(); gameRenderer.render(); lasttime=now; requestAnimationFrame(Render); } Render(); var inc=0.2; document.getElementById("canvas").onmouseover=function(e){mouseovercanvas=true;} document.getElementById("canvas").onmouseout=function(e){mouseovercanvas=false;} } doc.load("cena.xml"); </script> </head> <body> <div id="dump"></div> <div> <div style="width:900px;margin:auto;position:relative" id="container"> <canvas id="canvas" width="900" height="500"></canvas> <img src="images/glgelogo.png" alt="GLGElogo" style="position:absolute;top: 450px; left: 750px;" /> <div id="debug" style="padding: 5px"></div> <a href="http://freeplaymusic.com/search/category_search.php?t=f&i=10">Music(freeplaymusic.com)</a> <p>WebAudio: work chrome and safari</p> <a onclick="som.stop(5)">Stop</a> <a onclick="som.play(true,1)">Play</a> </div> </div> </body> </html>
{ "pile_set_name": "Github" }
// Copyright Contributors to the OpenVDB Project // SPDX-License-Identifier: MPL-2.0 #include "DelayedLoadMetadata.h" #include <openvdb/points/StreamCompression.h> #ifdef OPENVDB_USE_BLOSC #include <blosc.h> namespace { inline size_t padMask(size_t bytes) { return size_t(std::ceil(static_cast<float>(bytes+1) / sizeof(openvdb::io::DelayedLoadMetadata::MaskType))); } inline size_t padCompressedSize(size_t bytes) { return size_t(std::ceil(static_cast<float>(bytes+1) / sizeof(openvdb::io::DelayedLoadMetadata::CompressedSizeType))); } } // namespace #endif namespace openvdb { OPENVDB_USE_VERSION_NAMESPACE namespace OPENVDB_VERSION_NAME { namespace io { DelayedLoadMetadata::DelayedLoadMetadata(const DelayedLoadMetadata& other) : Metadata() , mMask(other.mMask) , mCompressedSize(other.mCompressedSize) { } Name DelayedLoadMetadata::typeName() const { return DelayedLoadMetadata::staticTypeName(); } Metadata::Ptr DelayedLoadMetadata::copy() const { Metadata::Ptr metadata(new DelayedLoadMetadata()); metadata->copy(*this); return metadata; } void DelayedLoadMetadata::copy(const Metadata& other) { const DelayedLoadMetadata* t = dynamic_cast<const DelayedLoadMetadata*>(&other); if (t == nullptr) OPENVDB_THROW(TypeError, "Incompatible type during copy"); mMask = t->mMask; mCompressedSize = t->mCompressedSize; } std::string DelayedLoadMetadata::str() const { return ""; } bool DelayedLoadMetadata::asBool() const { return false; } Index32 DelayedLoadMetadata::size() const { if (mMask.empty() && mCompressedSize.empty()) return Index32(0); // count size_t size = sizeof(Index32); { // mask size += sizeof(Index32); size_t compressedSize = compression::bloscCompressedSize( reinterpret_cast<const char*>(mMask.data()), mMask.size()*sizeof(MaskType)); if (compressedSize > 0) size += compressedSize; else size += mMask.size()*sizeof(MaskType); } { // compressed size size += sizeof(Index32); if (!mCompressedSize.empty()) { size_t compressedSize = compression::bloscCompressedSize( reinterpret_cast<const char*>(mCompressedSize.data()), mCompressedSize.size()*sizeof(CompressedSizeType)); if (compressedSize > 0) size += compressedSize; else size += mCompressedSize.size()*sizeof(CompressedSizeType); } } return static_cast<Index32>(size); } void DelayedLoadMetadata::clear() { mMask.clear(); mCompressedSize.clear(); } bool DelayedLoadMetadata::empty() const { return mMask.empty() && mCompressedSize.empty(); } void DelayedLoadMetadata::resizeMask(size_t size) { mMask.resize(size); } void DelayedLoadMetadata::resizeCompressedSize(size_t size) { mCompressedSize.resize(size); } DelayedLoadMetadata::MaskType DelayedLoadMetadata::getMask(size_t index) const { assert(DelayedLoadMetadata::isRegisteredType()); assert(index < mMask.size()); return mMask[index]; } void DelayedLoadMetadata::setMask(size_t index, const MaskType& value) { assert(index < mMask.size()); mMask[index] = value; } DelayedLoadMetadata::CompressedSizeType DelayedLoadMetadata::getCompressedSize(size_t index) const { assert(DelayedLoadMetadata::isRegisteredType()); assert(index < mCompressedSize.size()); return mCompressedSize[index]; } void DelayedLoadMetadata::setCompressedSize(size_t index, const CompressedSizeType& value) { assert(index < mCompressedSize.size()); mCompressedSize[index] = value; } void DelayedLoadMetadata::readValue(std::istream& is, Index32 numBytes) { if (numBytes == 0) return; // initial header size size_t total = sizeof(Index32); Index32 count = 0; is.read(reinterpret_cast<char*>(&count), sizeof(Index32)); total += sizeof(Index32); Index32 bytes = 0; is.read(reinterpret_cast<char*>(&bytes), sizeof(Index32)); total += sizeof(Index32); if (bytes > Index32(0)) { std::unique_ptr<char[]> compressedBuffer(new char[bytes]); is.read(reinterpret_cast<char*>(compressedBuffer.get()), bytes); total += bytes; #ifdef OPENVDB_USE_BLOSC // pad to include BLOSC_MAX_OVERHEAD size_t uncompressedBytes = openvdb::compression::bloscUncompressedSize(compressedBuffer.get()); const size_t paddedCount = padMask(uncompressedBytes + BLOSC_MAX_OVERHEAD); mMask.reserve(paddedCount); mMask.resize(count); // resize should never modify capacity for smaller vector sizes assert(mMask.capacity() >= paddedCount); compression::bloscDecompress(reinterpret_cast<char*>(mMask.data()), count*sizeof(MaskType), mMask.capacity()*sizeof(MaskType), compressedBuffer.get()); #endif } else { mMask.resize(count); is.read(reinterpret_cast<char*>(mMask.data()), count*sizeof(MaskType)); total += count*sizeof(MaskType); } is.read(reinterpret_cast<char*>(&bytes), sizeof(Index32)); if (bytes != std::numeric_limits<Index32>::max()) { if (bytes > Index32(0)) { std::unique_ptr<char[]> compressedBuffer(new char[bytes]); is.read(reinterpret_cast<char*>(compressedBuffer.get()), bytes); total += size_t(bytes); #ifdef OPENVDB_USE_BLOSC // pad to include BLOSC_MAX_OVERHEAD size_t uncompressedBytes = openvdb::compression::bloscUncompressedSize(compressedBuffer.get()); const size_t paddedCount = padCompressedSize(uncompressedBytes + BLOSC_MAX_OVERHEAD); mCompressedSize.reserve(paddedCount); mCompressedSize.resize(count); // resize should never modify capacity for smaller vector sizes assert(mCompressedSize.capacity() >= paddedCount); compression::bloscDecompress(reinterpret_cast<char*>(mCompressedSize.data()), count*sizeof(CompressedSizeType), mCompressedSize.capacity()*sizeof(CompressedSizeType), compressedBuffer.get()); #endif } else { mCompressedSize.resize(count); is.read(reinterpret_cast<char*>(mCompressedSize.data()), count*sizeof(CompressedSizeType)); total += count*sizeof(CompressedSizeType); } } Index32 totalBytes = static_cast<Index32>(total); if (totalBytes < numBytes) { // Read and discard any unknown bytes at the end of the metadata for forwards-compatibility // (without seeking, because the stream might not be seekable). const size_t BUFFER_SIZE = 1024; std::vector<char> buffer(BUFFER_SIZE); for (Index32 bytesRemaining = numBytes - totalBytes; bytesRemaining > 0; ) { const Index32 bytesToSkip = std::min<Index32>(bytesRemaining, BUFFER_SIZE); is.read(&buffer[0], bytesToSkip); bytesRemaining -= bytesToSkip; } } } void DelayedLoadMetadata::writeValue(std::ostream& os) const { // metadata has a limit of 2^32 bytes assert(mMask.size() < std::numeric_limits<Index32>::max()); assert(mCompressedSize.size() < std::numeric_limits<Index32>::max()); if (mMask.empty() && mCompressedSize.empty()) return; assert(mCompressedSize.empty() || (mMask.size() == mCompressedSize.size())); Index32 count = static_cast<Index32>(mMask.size()); os.write(reinterpret_cast<const char*>(&count), sizeof(Index32)); const Index32 zeroSize(0); const Index32 maxSize(std::numeric_limits<Index32>::max()); { // mask buffer size_t compressedBytes(0); std::unique_ptr<char[]> compressedBuffer; if (compression::bloscCanCompress()) { compressedBuffer = compression::bloscCompress( reinterpret_cast<const char*>(mMask.data()), mMask.size()*sizeof(MaskType), compressedBytes, /*resize=*/false); } if (compressedBuffer) { assert(compressedBytes < std::numeric_limits<Index32>::max()); Index32 bytes(static_cast<Index32>(compressedBytes)); os.write(reinterpret_cast<const char*>(&bytes), sizeof(Index32)); os.write(reinterpret_cast<const char*>(compressedBuffer.get()), compressedBytes); } else { os.write(reinterpret_cast<const char*>(&zeroSize), sizeof(Index32)); os.write(reinterpret_cast<const char*>(mMask.data()), mMask.size()*sizeof(MaskType)); } } // compressed size buffer if (mCompressedSize.empty()) { // write out maximum Index32 value to denote no compressed sizes stored os.write(reinterpret_cast<const char*>(&maxSize), sizeof(Index32)); } else { size_t compressedBytes(0); std::unique_ptr<char[]> compressedBuffer; if (compression::bloscCanCompress()) { compressedBuffer = compression::bloscCompress( reinterpret_cast<const char*>(mCompressedSize.data()), mCompressedSize.size()*sizeof(CompressedSizeType), compressedBytes, /*resize=*/false); } if (compressedBuffer) { assert(compressedBytes < std::numeric_limits<Index32>::max()); Index32 bytes(static_cast<Index32>(compressedBytes)); os.write(reinterpret_cast<const char*>(&bytes), sizeof(Index32)); os.write(reinterpret_cast<const char*>(compressedBuffer.get()), compressedBytes); } else { os.write(reinterpret_cast<const char*>(&zeroSize), sizeof(Index32)); os.write(reinterpret_cast<const char*>(mCompressedSize.data()), mCompressedSize.size()*sizeof(CompressedSizeType)); } } } } // namespace io } // namespace OPENVDB_VERSION_NAME } // namespace openvdb
{ "pile_set_name": "Github" }
package printer import ( "fmt" "github.com/haya14busa/go-vimlparser/ast" "github.com/haya14busa/go-vimlparser/token" ) // opprec returns operator precedence. See also go/gocompiler.vim func opprec(op ast.Expr) int { switch n := op.(type) { case *ast.TernaryExpr, *ast.ParenExpr: return 1 case *ast.BinaryExpr: switch n.Op { case token.OROR: return 2 case token.ANDAND: return 3 case token.EQEQ, token.EQEQCI, token.EQEQCS, token.NEQ, token.NEQCI, token.NEQCS, token.GT, token.GTCI, token.GTCS, token.GTEQ, token.GTEQCI, token.GTEQCS, token.LT, token.LTCI, token.LTCS, token.LTEQ, token.LTEQCI, token.LTEQCS, token.MATCHCS, token.NOMATCH, token.NOMATCHCI, token.NOMATCHCS, token.IS, token.ISCI, token.ISCS, token.ISNOT, token.ISNOTCI, token.ISNOTCS: return 4 case token.PLUS, token.MINUS, token.DOT: return 5 case token.STAR, token.SLASH, token.PERCENT: return 6 default: panic(fmt.Errorf("unexpected token of BinaryExpr: %v", n.Op)) } case *ast.UnaryExpr: switch n.Op { case token.NOT, token.MINUS, token.PLUS: return 7 default: panic(fmt.Errorf("unexpected token of UnaryExpr: %v", n.Op)) } case *ast.SubscriptExpr, *ast.SliceExpr, *ast.CallExpr, *ast.DotExpr: return 8 case *ast.BasicLit, *ast.Ident, *ast.List, *ast.Dict, *ast.CurlyName: return 9 case *ast.CurlyNameExpr, *ast.CurlyNameLit, *ast.LambdaExpr: panic(fmt.Errorf("precedence is undefined for expr: %T", n)) default: panic(fmt.Errorf("unexpected expr: %T", n)) } }
{ "pile_set_name": "Github" }
/* * Copyright (c) 2020 Ubique Innovation AG <https://www.ubique.ch> * * 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 https://mozilla.org/MPL/2.0/. * * SPDX-License-Identifier: MPL-2.0 */ #import "UIScrollView+UBKeyboardObserver.h" #import "UBKeyboardObserver.h" #import <objc/runtime.h> @implementation UIScrollView (UBKeyboardObserver) - (void)ub_enableDefaultKeyboardObserver { UBKeyboardObserver *observer = [[UBKeyboardObserver alloc] init]; __weak typeof(self) weakSelf = self; observer.callback = ^(CGFloat height) { UIEdgeInsets insets = weakSelf.contentInset; insets.bottom = [UBKeyboardObserver height:height intoView:weakSelf]; weakSelf.contentInset = insets; weakSelf.scrollIndicatorInsets = insets; }; objc_setAssociatedObject(self, @"keyboardObserver", observer, OBJC_ASSOCIATION_RETAIN_NONATOMIC); } @end
{ "pile_set_name": "Github" }
path: "tensorflow.errors.InternalError" tf_class { is_instance: "<class \'tensorflow.python.framework.errors_impl.InternalError\'>" is_instance: "<class \'tensorflow.python.framework.errors_impl.OpError\'>" is_instance: "<type \'exceptions.Exception\'>" member { name: "args" mtype: "<type \'getset_descriptor\'>" } member { name: "error_code" mtype: "<type \'property\'>" } member { name: "message" mtype: "<type \'property\'>" } member { name: "node_def" mtype: "<type \'property\'>" } member { name: "op" mtype: "<type \'property\'>" } member_method { name: "__init__" argspec: "args=[\'self\', \'node_def\', \'op\', \'message\'], varargs=None, keywords=None, defaults=None" } }
{ "pile_set_name": "Github" }
David,Storey Dominic,Giles Peter,Thompson Constantin,Welles Harrison,Pacino Manisha,Taylor Harrison,Sutherland Matthias,MacGraw Matthias,Hannah Matthias,Cruise Meenakshi,Mason Christian,Cage Charlie,Sutherland Charlie,Pacino Guillaume,Jackson Daniel,Costner Dianne,Derek Geraldine,Schneider Geraldine,Martin Guillaume,Edwards Maurice,Mahoney Maurice,Hasan Diane,Higgins Dianne,Sen Maurice,Daltrey Elizabeth,Brown Diane,Mason Dianne,Andrews Charles,Field Charles,Broderick Isabella,Reed Louis,Jackson Louis,Edwards Doris,Dutt Doris,Spacek Kristin,Malden Sissy,Puri Doris,Bel Geddes Sissy,Warden Elia,Brando Mani,Fonda Placido,Kubrick Claudia,Kurosawa Maximilian,Henner Sachin,Spielberg Sachin,Neeson Sivaji,Landis Mammutti,Pacino Elia,Fawcett Ishwarya,Roberts Gustav,Steenburgen Markus,Rampling Goldie,Slater Divine,Aykroyd Dieter,Matthau Divine,Sheen Frederic,Grodin Frederico,Romero Goldie,Montand Sidney,Capshaw Frederico,Lyon Eddie,Boyer Eddie,Stern Ernest,Weaver Ernest,George Ernest,Chandar Charlotte,Kazan Charlotte,Fonda Dheeraj,Alexander Gerard,Hershey Hema,Voight Dheeraj,Davis Harry Dean,Fonda Hema,Powell Harry Mean,Peckinpah Kathleen,Walken Blake,Seignier Claude,Powell Faye,Glenn Gerhard,Seignier Grace,Belushi Harry dean,Forrest Harry dean,Cage Lauren,Hershey Lauren,Dench Lauren,Altman Mary Beth,Roberts Matthew,Wright Meena,Alexander Grace,Dvrrie Charlotte,Buckley Gena,Harris Gena,Curtis Maureen,Sanders Sean,Stockwell Harry dean,Kinski Kathleen,Garcia Sean,Olin Gerard,Dench Gerard,Altman Maureen,de Funes Clint,Chapman Clint,Gielgud Eric,Prashant Ingrid,Welles Ingrid,Rampling Cliff,Puri Emily,Pollack Fritz,Hackman Cybill,Laughton Cyndi,Griem Cyndi,Collins Cybill,Clapton Luchino,Jordan Luchino,Falk Luchino,Bradford Robin,Danson Orson,Perkins Orson,Koirala Bryan,Huston Bryan,Dvrrie Ajay,Sen Carol,Jordan Carol,Bradford Cary,Stockwell Cary,Olin Clara,Krige Clara,Ganesan Ajay,Andrews Kathy,Prashant Graham,Neeson Ian,Chapman Danny,Wright Danny,Rourke Donald,Hunter Graham,Spielberg Dan,Roberts Edward,Oates Edward,Julius Farrah,Quinlan Farrah,Lange Hal,Stockwell Malcolm,Kanth Malcolm,Broderick Mary,Lemmon Mary,Collins Matt,Gueney Max,von Sydow Max,Schell Cynda,Whitcraft Donald,Minnelli Hannah,Broderick Dan,Williams Raul,Wilder Shah Rukh,Field Sally,Bogart Bruce,Bates Brooke,Shepherd Ben,de Niro Emmet,Walken Ellen,Palin Denholm,von Sydow Ellen,Khan Emmet,Garcia Fred,Reynolds Fred,Lithgow George,Adjani Irene,Laughton Prem,Cardinale Prem,Walken Kyle,Schneider Kyle,Martin Meg,Derek Shelley,Peckinpah Prem,Garcia Bo,Hitchcock Bob,McCarthy Dom,McQueen Dom,Hoskins Don,Siegel Gvtz,Bradford Holly,Kurosawa Rob,MacLaine Don,Barkin Kurt,Danson Kurt,Heard Glenda,Dunaway Glenda,Bates Gtz,Falk Hal,Olin Hannah,Kanth Hannah,Field Margret,Powell Harry Mean,Taylor Margrit,Garner Maria,Warden Marilou,Landis Marilou,Chapman Kathy,Lambert Helmut,Capshaw Keir,George Marlon,Laughton Keir,Chandar Marlon,Godard Keir,Weaver Marlon,Clapton Kelly,Quinlan Kelly,Lange Ken,Glenn Ken,Chopra Ken,Wenders Kenneth,Redford Meg,Sen Meryl,Holden Richard,Coppola Richard,Winters Rick,Romero Rick,Lyon Ridley,Hackman Ridley,Coyote Ridley,Young Rob,Russell Robert,de Niro Robin,Adjani Rodolfo,Hershey Rodolfo,Dench Rodolfo,Altman Roger,Mastroianni Rolf,Ashby Romy,Sharif Romy,McCarthy Rosanne,Hopkins Rosanne,Douglas Rosanne,Baldwin Roxanne,Shepherd Roxanne,Michalkow Roy,Hulce Roy,Dunaway Roy,Bates Rufus,Dvrrie Rufus,Belushi Sally,Edwards Scott,Jordan Shammi,Pacino Sharmila,Kazan Sharmila,Fonda Shelley,Taylor Shyam,Plummer Silk,Kurosawa Sivaji,Gielgud M. Emmet,Stockwell M. Emmet,Olin Malcolm,Field Mammutti,Sutherland Mani,Kazan Mani,Buckley Margaret,Ustinov Margaux,Krige Margaux,Capshaw Kevin,Goodman Kevin,Cleveland Kevin,Wilder Kiefer,Reynolds Klaus,Young Klaus Maria,Russell Klaus Maria,MacLaine Kris,Harris Kris,Curtis Kris,de Niro Kristin,Savage Laurence,Seignier Alain,Dreyfuss Alain,Barkin Alain,Siegel Alan,Minnelli Alan,Hunter Albert,Dutt Albert,Bel Geddes Albert,Spacek Alec,Moranis Alec,Idle Alexander,Eastwood Alexander,Berenger Alexander,Stanton Alfred,Nicholson Alfred,Johnson Ali,Elliott Ali,Boyer Ali,Stern Alice,Oates Alice,Julius Ally,Fawcett Ally,Brando Ally,Streep Alonso,Olmos Alonso,Kaurusmdki Amanda,Finney Amanda,Brown Amanda,Tanner Amrish,Palin Billy,Hershey Billy,Dench Blake,Mastroianni Bo,Dickinson Bo,Ashby Bob,Sharif Brian,Douglas Brian,Baldwin Brooke,Michalkow Bruce,Hulce Bruce,Dunaway Bruno,Slater Bruno,Montand Bryan,Belushi Burt,Spielberg Burt,Neeson Buster,Jackson Buster,Edwards Buster,Bogart C. Thomas,Nolte Daniel,Loren Daniel,Gueney
{ "pile_set_name": "Github" }
<!-- ~ Copyright (c) 2016-2020 VMware, Inc. All Rights Reserved. ~ This software is released under MIT license. ~ The full license information can be found in LICENSE in the root directory of this project. --> <div class="clr-example nomargin"> <div class="clr-row"> <div class="clr-col-lg-6 clr-col-12"> <div class="card"> <div class="card-header"> Header </div> <div class="card-block"> <div class="card-media-block"> <img src="assets/placeholder_60x60.png" /> <div class="card-media-description"> <span class="card-media-title"> Project A </span> <span class="card-media-text"> Owner: John Doe </span> </div> </div> <div class="card-text"> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sunt excepturi labore explicabo temporibus, enim voluptate saepe corrupti illum earum eveniet ab veniam vel nisi fugit accusantium perferendis quas facilis quod. </div> </div> <div class="card-footer"> <button class="btn btn-sm btn-link">Action</button> </div> </div> </div> <div class="clr-col-lg-6 clr-col-12"> <div class="card"> <div class="card-header"> Header </div> <div class="card-block"> <div class="card-media-block wrap"> <img src="assets/placeholder_60x60.png" class="card-media-image" /> <div class="card-media-description"> <span class="card-media-title"> Project B </span> <span class="card-media-text"> Owner: Jane Doe </span> </div> </div> <div class="card-text"> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Laborum, ipsum? </div> </div> <div class="card-footer"> <button class="btn btn-sm btn-link">Action</button> </div> </div> </div> </div> </div>
{ "pile_set_name": "Github" }
--loose-caching_sha2_password_private_key_path=$MYSQL_TEST_DIR/std_data/rsa_private_key.pem --loose-caching_sha2_password_public_key_path=$MYSQL_TEST_DIR/std_data/rsa_public_key.pem --default_authentication_plugin=caching_sha2_password --loose-shared-memory=1
{ "pile_set_name": "Github" }
-each c in contentlist a(href="/content/info/#{c._id}", title="#{c.title}", target="wujb") span.pbg #{c.title} b 关注(#{c.love}) img(src="#{c.thumb}", width="150", height="150")
{ "pile_set_name": "Github" }
<HTML> <HEAD> <meta charset="UTF-8"> <title>MediaUpload - tock</title> <link rel="stylesheet" href="../../../style.css"> </HEAD> <BODY> <a href="../../index.html">tock</a>&nbsp;/&nbsp;<a href="../index.html">ai.tock.bot.connector.twitter.model</a>&nbsp;/&nbsp;<a href="./index.html">MediaUpload</a><br/> <br/> <h1>MediaUpload</h1> <code><span class="keyword">data</span> <span class="keyword">class </span><span class="identifier">MediaUpload</span></code> <a href="https://github.com/theopenconversationkit/tock/blob/master/bot/connector-twitter/src/main/kotlin/model/MediaUpload.kt#L21">(source)</a> <h3>Constructors</h3> <table> <tbody> <tr> <td> <h4><a href="-init-.html">&lt;init&gt;</a></h4> </td> <td> <code><span class="identifier">MediaUpload</span><span class="symbol">(</span><span class="identifier" id="ai.tock.bot.connector.twitter.model.MediaUpload$<init>(kotlin.Long, kotlin.String, kotlin.Long, kotlin.Long, ai.tock.bot.connector.twitter.model.Media)/mediaId">mediaId</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html"><span class="identifier">Long</span></a><span class="symbol">, </span><span class="identifier" id="ai.tock.bot.connector.twitter.model.MediaUpload$<init>(kotlin.Long, kotlin.String, kotlin.Long, kotlin.Long, ai.tock.bot.connector.twitter.model.Media)/mediaIdString">mediaIdString</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a><span class="symbol">, </span><span class="identifier" id="ai.tock.bot.connector.twitter.model.MediaUpload$<init>(kotlin.Long, kotlin.String, kotlin.Long, kotlin.Long, ai.tock.bot.connector.twitter.model.Media)/size">size</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html"><span class="identifier">Long</span></a><span class="symbol">?</span><span class="symbol">, </span><span class="identifier" id="ai.tock.bot.connector.twitter.model.MediaUpload$<init>(kotlin.Long, kotlin.String, kotlin.Long, kotlin.Long, ai.tock.bot.connector.twitter.model.Media)/expiresAfterSecs">expiresAfterSecs</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html"><span class="identifier">Long</span></a><span class="symbol">, </span><span class="identifier" id="ai.tock.bot.connector.twitter.model.MediaUpload$<init>(kotlin.Long, kotlin.String, kotlin.Long, kotlin.Long, ai.tock.bot.connector.twitter.model.Media)/media">media</span><span class="symbol">:</span>&nbsp;<a href="../-media/index.html"><span class="identifier">Media</span></a><span class="symbol">?</span><span class="symbol">)</span></code></td> </tr> </tbody> </table> <h3>Properties</h3> <table> <tbody> <tr> <td> <h4><a href="expires-after-secs.html">expiresAfterSecs</a></h4> </td> <td> <code><span class="keyword">val </span><span class="identifier">expiresAfterSecs</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html"><span class="identifier">Long</span></a></code></td> </tr> <tr> <td> <h4><a href="media.html">media</a></h4> </td> <td> <code><span class="keyword">val </span><span class="identifier">media</span><span class="symbol">: </span><a href="../-media/index.html"><span class="identifier">Media</span></a><span class="symbol">?</span></code></td> </tr> <tr> <td> <h4><a href="media-id.html">mediaId</a></h4> </td> <td> <code><span class="keyword">val </span><span class="identifier">mediaId</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html"><span class="identifier">Long</span></a></code></td> </tr> <tr> <td> <h4><a href="media-id-string.html">mediaIdString</a></h4> </td> <td> <code><span class="keyword">val </span><span class="identifier">mediaIdString</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a></code></td> </tr> <tr> <td> <h4><a href="size.html">size</a></h4> </td> <td> <code><span class="keyword">val </span><span class="identifier">size</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html"><span class="identifier">Long</span></a><span class="symbol">?</span></code></td> </tr> </tbody> </table> </BODY> </HTML>
{ "pile_set_name": "Github" }
# This source code was written by the Go contributors. # The master list of contributors is in the main Go distribution, # visible at http://tip.golang.org/CONTRIBUTORS.
{ "pile_set_name": "Github" }
# Tests for electric vehicle powered from overhead wires elechybrid
{ "pile_set_name": "Github" }
--- title: カスタム プロバイダーの C# RESTful エンドポイント リファレンス description: Azure カスタム プロバイダーの C# RESTful エンドポイントの基本リファレンスを提供します。 エンドポイントは Azure 関数アプリ経由で提供されます。 ms.topic: conceptual ms.custom: devx-track-csharp ms.author: jobreen author: jjbfour ms.date: 06/20/2019 ms.openlocfilehash: ce329e7cd8db73e217162fa0bc1bb433d57e9971 ms.sourcegitcommit: 62e1884457b64fd798da8ada59dbf623ef27fe97 ms.translationtype: HT ms.contentlocale: ja-JP ms.lasthandoff: 08/26/2020 ms.locfileid: "88935638" --- # <a name="custom-provider-c-restful-endpoint-reference"></a>カスタム プロバイダーの C# RESTful エンドポイント リファレンス この記事は、カスタム プロバイダーの C# RESTful エンドポイントの基本リファレンスです。 Azure カスタム プロバイダーについてなじみがない場合は、[カスタム リソースプロバイダーの概要](overview.md)に関するページを参照してください。 ## <a name="azure-function-app-restful-endpoint"></a>Azure 関数アプリの RESTful エンドポイント 次のコードは、Azure 関数アプリで動作します。 Azure カスタム プロバイダーで動作するように Azure 関数アプリを設定する方法については、[Azure カスタム プロバイダー用の Azure 関数の設定に関するチュートリアル](./tutorial-custom-providers-function-setup.md)をご覧ください ```csharp #r "Newtonsoft.Json" #r "Microsoft.WindowsAzure.Storage" #r "../bin/Microsoft.Azure.Management.ResourceManager.Fluent.dll" using System; using System.Net; using System.Net.Http; using System.Net.Http.Headers; using System.Configuration; using System.Text; using System.Threading; using System.Globalization; using System.Collections.Generic; using Microsoft.Azure.WebJobs; using Microsoft.Azure.WebJobs.Host; using Microsoft.WindowsAzure.Storage.Table; using Microsoft.Azure.Management.ResourceManager.Fluent.Core; using Newtonsoft.Json; using Newtonsoft.Json.Linq; // Custom Resource Table Entity public class CustomResource : TableEntity { public string Data { get; set; } } /// <summary> /// Entry point for the Azure Function webhook that acts as the service behind a custom provider. /// </summary> /// <param name="requestMessage">The HTTP request message.</param> /// <param name="log">The logger.</param> /// <param name="tableStorage">The Azure Table storage account.</param> /// <returns>The HTTP response for the custom Azure API.</returns> public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, ILogger log, CloudTable tableStorage) { // Get the unique Azure request path from request headers. var requestPath = req.Headers.GetValues("x-ms-customproviders-requestpath").FirstOrDefault(); if (requestPath == null) { var missingHeaderResponse = req.CreateResponse(HttpStatusCode.BadRequest); missingHeaderResponse.Content = new StringContent( new JObject(new JProperty("error", "missing 'x-ms-customproviders-requestpath' header")).ToString(), System.Text.Encoding.UTF8, "application/json"); } log.LogInformation($"The Custom Provider Function received a request '{req.Method}' for resource '{requestPath}'."); // Determines if it is a collection level call or action. var isResourceRequest = requestPath.Split('/').Length % 2 == 1; var azureResourceId = isResourceRequest ? ResourceId.FromString(requestPath) : ResourceId.FromString($"{requestPath}/"); // Create the Partition Key and Row Key var partitionKey = $"{azureResourceId.SubscriptionId}:{azureResourceId.ResourceGroupName}:{azureResourceId.Parent.Name}"; var rowKey = $"{azureResourceId.FullResourceType.Replace('/', ':')}:{azureResourceId.Name}"; switch (req.Method) { // Action request for a custom action. case HttpMethod m when m == HttpMethod.Post && !isResourceRequest: return await TriggerCustomAction( requestMessage: req); // Enumerate request for all custom resources. case HttpMethod m when m == HttpMethod.Get && !isResourceRequest: return await EnumerateAllCustomResources( requestMessage: req, tableStorage: tableStorage, partitionKey: partitionKey, resourceType: rowKey); // Retrieve request for a custom resource. case HttpMethod m when m == HttpMethod.Get && isResourceRequest: return await RetrieveCustomResource( requestMessage: req, tableStorage: tableStorage, partitionKey: partitionKey, rowKey: rowKey); // Create request for a custom resource. case HttpMethod m when m == HttpMethod.Put && isResourceRequest: return await CreateCustomResource( requestMessage: req, tableStorage: tableStorage, azureResourceId: azureResourceId, partitionKey: partitionKey, rowKey: rowKey); // Remove request for a custom resource. case HttpMethod m when m == HttpMethod.Delete && isResourceRequest: return await RemoveCustomResource( requestMessage: req, tableStorage: tableStorage, partitionKey: partitionKey, rowKey: rowKey); // Invalid request received. default: return req.CreateResponse(HttpStatusCode.BadRequest); } } /// <summary> /// Triggers a custom action with some side effects. /// </summary> /// <param name="requestMessage">The HTTP request message.</param> /// <returns>The HTTP response result of the custom action.</returns> public static async Task<HttpResponseMessage> TriggerCustomAction(HttpRequestMessage requestMessage) { var myCustomActionRequest = await requestMessage.Content.ReadAsStringAsync(); var actionResponse = requestMessage.CreateResponse(HttpStatusCode.OK); actionResponse.Content = myCustomActionRequest != string.Empty ? new StringContent(JObject.Parse(myCustomActionRequest).ToString(), System.Text.Encoding.UTF8, "application/json") : null; return actionResponse; } /// <summary> /// Enumerates all the stored custom resources for a given type. /// </summary> /// <param name="requestMessage">The HTTP request message.</param> /// <param name="tableStorage">The Azure Table storage account.</param> /// <param name="partitionKey">The partition key for storage. This is the custom provider ID.</param> /// <param name="resourceType">The resource type of the enumeration.</param> /// <returns>The HTTP response containing a list of resources stored under 'value'.</returns> public static async Task<HttpResponseMessage> EnumerateAllCustomResources(HttpRequestMessage requestMessage, CloudTable tableStorage, string partitionKey, string resourceType) { // Generate upper bound of the query. var rowKeyUpperBound = new StringBuilder(resourceType); rowKeyUpperBound[rowKeyUpperBound.Length - 1]++; // Create the enumeration query. var enumerationQuery = new TableQuery<CustomResource>().Where( TableQuery.CombineFilters( TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, partitionKey), TableOperators.And, TableQuery.CombineFilters( TableQuery.GenerateFilterCondition("RowKey", QueryComparisons.GreaterThan, resourceType), TableOperators.And, TableQuery.GenerateFilterCondition("RowKey", QueryComparisons.LessThan, rowKeyUpperBound.ToString())))); var customResources = (await tableStorage.ExecuteQuerySegmentedAsync(enumerationQuery, null)) .ToList().Select(customResource => JToken.Parse(customResource.Data)); var enumerationResponse = requestMessage.CreateResponse(HttpStatusCode.OK); enumerationResponse.Content = new StringContent(new JObject(new JProperty("value", customResources)).ToString(), System.Text.Encoding.UTF8, "application/json"); return enumerationResponse; } /// <summary> /// Retrieves a custom resource. /// </summary> /// <param name="requestMessage">The HTTP request message.</param> /// <param name="tableStorage">The Azure Table storage account.</param> /// <param name="partitionKey">The partition key for storage. This is the custom provider ID.</param> /// <param name="rowKey">The row key for storage. This is '{resourceType}:{customResourceName}'.</param> /// <returns>The HTTP response containing the existing custom resource.</returns> public static async Task<HttpResponseMessage> RetrieveCustomResource(HttpRequestMessage requestMessage, CloudTable tableStorage, string partitionKey, string rowKey) { // Attempt to retrieve the Existing Stored Value var tableQuery = TableOperation.Retrieve<CustomResource>(partitionKey, rowKey); var existingCustomResource = (CustomResource)(await tableStorage.ExecuteAsync(tableQuery)).Result; var retrieveResponse = requestMessage.CreateResponse( existingCustomResource != null ? HttpStatusCode.OK : HttpStatusCode.NotFound); retrieveResponse.Content = existingCustomResource != null ? new StringContent(existingCustomResource.Data, System.Text.Encoding.UTF8, "application/json"): null; return retrieveResponse; } /// <summary> /// Creates a custom resource and saves it to Table storage. /// </summary> /// <param name="requestMessage">The HTTP request message.</param> /// <param name="tableStorage">The Azure Table storage account.</param> /// <param name="azureResourceId">The parsed Azure resource ID.</param> /// <param name="partitionKey">The partition key for storage. This is the custom provider ID.</param> /// <param name="rowKey">The row key for storage. This is '{resourceType}:{customResourceName}'.</param> /// <returns>The HTTP response containing the created custom resource.</returns> public static async Task<HttpResponseMessage> CreateCustomResource(HttpRequestMessage requestMessage, CloudTable tableStorage, ResourceId azureResourceId, string partitionKey, string rowKey) { // Constructs the new resource from the request body and adds the Azure Resource Manager fields. var myCustomResource = JObject.Parse(await requestMessage.Content.ReadAsStringAsync()); myCustomResource["name"] = azureResourceId.Name; myCustomResource["type"] = azureResourceId.FullResourceType; myCustomResource["id"] = azureResourceId.Id; // Save the resource into storage. var insertOperation = TableOperation.InsertOrReplace( new CustomResource { PartitionKey = partitionKey, RowKey = rowKey, Data = myCustomResource.ToString(), }); await tableStorage.ExecuteAsync(insertOperation); var createResponse = requestMessage.CreateResponse(HttpStatusCode.OK); createResponse.Content = new StringContent(myCustomResource.ToString(), System.Text.Encoding.UTF8, "application/json"); return createResponse; } /// <summary> /// Removes an existing custom resource. /// </summary> /// <param name="requestMessage">The HTTP request message.</param> /// <param name="tableStorage">The Azure Table storage account.</param> /// <param name="partitionKey">The partition key for storage. This is the custom provider ID.</param> /// <param name="rowKey">The row key for storage. This is '{resourceType}:{customResourceName}'.</param> /// <returns>The HTTP response containing the result of the deletion.</returns> public static async Task<HttpResponseMessage> RemoveCustomResource(HttpRequestMessage requestMessage, CloudTable tableStorage, string partitionKey, string rowKey) { // Attempt to retrieve the existing stored value var tableQuery = TableOperation.Retrieve<CustomResource>(partitionKey, rowKey); var existingCustomResource = (CustomResource)(await tableStorage.ExecuteAsync(tableQuery)).Result; if (existingCustomResource != null) { var deleteOperation = TableOperation.Delete(existingCustomResource); await tableStorage.ExecuteAsync(deleteOperation); } return requestMessage.CreateResponse( existingCustomResource != null ? HttpStatusCode.OK : HttpStatusCode.NoContent); } ``` ## <a name="next-steps"></a>次のステップ - [Azure カスタム リソース プロバイダーの概要](overview.md) - [チュートリアル:Azure カスタム リソースプロバイダーの作成とカスタム リソースのデプロイ](./create-custom-provider.md) - [方法: カスタム アクションを Azure REST API に追加する](./custom-providers-action-endpoint-how-to.md) - [リファレンス: カスタム リソースのキャッシュのリファレンス](proxy-cache-resource-endpoint-reference.md)
{ "pile_set_name": "Github" }
# Test file for TOML # Only this one tries to emulate a TOML file written by a user of the kind of parser writers probably hate # This part you'll really hate [the] test_string = "You'll hate me after this - #" # " Annoying, isn't it? [the.hard] test_array = [ "] ", " # "] # ] There you go, parse this! test_array2 = [ "Test #11 ]proved that", "Experiment #9 was a success" ] # You didn't think it'd as easy as chucking out the last #, did you? another_test_string = " Same thing, but with a string #" harder_test_string = " And when \"'s are in the string, along with # \"" # "and comments are there too" # Things will get harder [the.hard."bit#"] "what?" = "You don't think some user won't do that?" multi_line_array = [ "]", # ] Oh yes I did ] # Each of the following keygroups/key value pairs should produce an error. Uncomment to them to test [error] if you didn't catch this, your parser is broken #string = "Anything other than tabs, spaces and newline after a keygroup or key value pair has ended should produce an error unless it is a comment" like this #array = [ #"This might most likely happen in multiline arrays", #Like here, #"or here, #and here" #] End of array comment, forgot the # #number = 3.14 pi <--again forgot the #
{ "pile_set_name": "Github" }
<?xml version='1.0' encoding='UTF-8'?> <!-- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. Copyright (c) 1997-2017 Oracle and/or its affiliates. All rights reserved. The contents of this file are subject to the terms of either the GNU General Public License Version 2 only ("GPL") or the Common Development and Distribution License("CDDL") (collectively, the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html or packager/legal/LICENSE.txt. See the License for the specific language governing permissions and limitations under the License. When distributing the software, include this License Header Notice in each file and include the License file at packager/legal/LICENSE.txt. GPL Classpath Exception: Oracle designates this particular file as subject to the "Classpath" exception as provided by Oracle in the GPL Version 2 section of the License file that accompanied this code. Modifications: If applicable, add the following below the License Header, with the fields enclosed by brackets [] replaced by your own identifying information: "Portions Copyright [year] [name of copyright owner]" Contributor(s): If you wish your version of this file to be governed by only the CDDL or only the GPL Version 2, indicate your decision by adding "[Contributor] elects to include this software in this distribution under the [CDDL or GPL Version 2] license." If you don't indicate a single choice of license, a recipient has the option to distribute your version of this file under either the CDDL, the GPL Version 2 or to extend the choice of license to its licensees as provided above. However, if you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the option applies only if the new code is made subject to such option by the copyright holder. --> <faces-config xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd" version="1.2"> <managed-bean> <managed-bean-name>dataSource</managed-bean-name> <managed-bean-class>com.sun.faces.test.servlet30.wcagdatatable.WindowsCodePageData</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean> </faces-config>
{ "pile_set_name": "Github" }
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: koubei.marketing.campaign.retail.dm.modify response. * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class KoubeiMarketingCampaignRetailDmModifyResponse extends AlipayResponse { private static final long serialVersionUID = 4314878948826672381L; /** * 内容id:该活动/商品入库成功之后,会将该活动/商品的id返回,作为商品/活动的内容id */ @ApiField("content_id") private String contentId; public void setContentId(String contentId) { this.contentId = contentId; } public String getContentId( ) { return this.contentId; } }
{ "pile_set_name": "Github" }
# IO::Dir.pm # # Copyright (c) 1997-8 Graham Barr <[email protected]>. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. package IO::Dir; use 5.008_001; use strict; use Symbol; use Exporter; use IO::File; use Tie::Hash; use File::stat; use File::Spec; our @ISA = qw(Tie::Hash Exporter); our $VERSION = "1.40"; our @EXPORT_OK = qw(DIR_UNLINK); BEGIN { sub croak($) { require Carp; Carp::croak(@_) } } sub DIR_UNLINK () { 1 } sub new { @_ >= 1 && @_ <= 2 or croak 'usage: IO::Dir->new([DIRNAME])'; my $class = shift; my $dh = gensym; if (@_) { IO::Dir::open($dh, $_[0]) or return undef; } bless $dh, $class; } sub DESTROY { my ($dh) = @_; local($., $@, $!, $^E, $?); no warnings 'io'; closedir($dh); } sub open { @_ == 2 or croak 'usage: $dh->open(DIRNAME)'; my ($dh, $dirname) = @_; return undef unless opendir($dh, $dirname); # a dir name should always have a ":" in it; assume dirname is # in current directory $dirname = ':' . $dirname if ( ($^O eq 'MacOS') && ($dirname !~ /:/) ); ${*$dh}{io_dir_path} = $dirname; 1; } sub close { @_ == 1 or croak 'usage: $dh->close()'; my ($dh) = @_; closedir($dh); } sub read { @_ == 1 or croak 'usage: $dh->read()'; my ($dh) = @_; readdir($dh); } sub seek { @_ == 2 or croak 'usage: $dh->seek(POS)'; my ($dh,$pos) = @_; seekdir($dh,$pos); } sub tell { @_ == 1 or croak 'usage: $dh->tell()'; my ($dh) = @_; telldir($dh); } sub rewind { @_ == 1 or croak 'usage: $dh->rewind()'; my ($dh) = @_; rewinddir($dh); } sub TIEHASH { my($class,$dir,$options) = @_; my $dh = $class->new($dir) or return undef; $options ||= 0; ${*$dh}{io_dir_unlink} = $options & DIR_UNLINK; $dh; } sub FIRSTKEY { my($dh) = @_; $dh->rewind; scalar $dh->read; } sub NEXTKEY { my($dh) = @_; scalar $dh->read; } sub EXISTS { my($dh,$key) = @_; -e File::Spec->catfile(${*$dh}{io_dir_path}, $key); } sub FETCH { my($dh,$key) = @_; &lstat(File::Spec->catfile(${*$dh}{io_dir_path}, $key)); } sub STORE { my($dh,$key,$data) = @_; my($atime,$mtime) = ref($data) ? @$data : ($data,$data); my $file = File::Spec->catfile(${*$dh}{io_dir_path}, $key); unless(-e $file) { my $io = IO::File->new($file,O_CREAT | O_RDWR); $io->close if $io; } utime($atime,$mtime, $file); } sub DELETE { my($dh,$key) = @_; # Only unlink if unlink-ing is enabled return 0 unless ${*$dh}{io_dir_unlink}; my $file = File::Spec->catfile(${*$dh}{io_dir_path}, $key); -d $file ? rmdir($file) : unlink($file); } 1; __END__ =head1 NAME IO::Dir - supply object methods for directory handles =head1 SYNOPSIS use IO::Dir; $d = IO::Dir->new("."); if (defined $d) { while (defined($_ = $d->read)) { something($_); } $d->rewind; while (defined($_ = $d->read)) { something_else($_); } undef $d; } tie %dir, 'IO::Dir', "."; foreach (keys %dir) { print $_, " " , $dir{$_}->size,"\n"; } =head1 DESCRIPTION The C<IO::Dir> package provides two interfaces to perl's directory reading routines. The first interface is an object approach. C<IO::Dir> provides an object constructor and methods, which are just wrappers around perl's built in directory reading routines. =over 4 =item new ( [ DIRNAME ] ) C<new> is the constructor for C<IO::Dir> objects. It accepts one optional argument which, if given, C<new> will pass to C<open> =back The following methods are wrappers for the directory related functions built into perl (the trailing 'dir' has been removed from the names). See L<perlfunc> for details of these functions. =over 4 =item open ( DIRNAME ) =item read () =item seek ( POS ) =item tell () =item rewind () =item close () =back C<IO::Dir> also provides an interface to reading directories via a tied hash. The tied hash extends the interface beyond just the directory reading routines by the use of C<lstat>, from the C<File::stat> package, C<unlink>, C<rmdir> and C<utime>. =over 4 =item tie %hash, 'IO::Dir', DIRNAME [, OPTIONS ] =back The keys of the hash will be the names of the entries in the directory. Reading a value from the hash will be the result of calling C<File::stat::lstat>. Deleting an element from the hash will delete the corresponding file or subdirectory, provided that C<DIR_UNLINK> is included in the C<OPTIONS>. Assigning to an entry in the hash will cause the time stamps of the file to be modified. If the file does not exist then it will be created. Assigning a single integer to a hash element will cause both the access and modification times to be changed to that value. Alternatively a reference to an array of two values can be passed. The first array element will be used to set the access time and the second element will be used to set the modification time. =head1 SEE ALSO L<File::stat> =head1 AUTHOR Graham Barr. Currently maintained by the Perl Porters. Please report all bugs to <[email protected]>. =head1 COPYRIGHT Copyright (c) 1997-2003 Graham Barr <[email protected]>. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut
{ "pile_set_name": "Github" }
/* * 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/. */ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; namespace FSO.LotView.Utils { /// <summary> /// Represents a vertex making up a 2D sprite in the game. /// </summary> [StructLayout(LayoutKind.Sequential)] public struct ParticleVertex : IVertexType { public Vector3 Position; public Vector3 ModelPosition; public Vector3 TextureCoordinate; /// <summary> /// Creates a new ParticleVertex instance. /// </summary> /// <param name="position">Position of particle.</param> /// <param name="modelPosition">Position of this vertex within the particle.</param> /// <param name="textureCoords">Texture coordinate for this vertex.</param> public ParticleVertex(Vector3 position, Vector3 modelPosition, Vector3 textureCoords) { this.Position = position; this.ModelPosition = modelPosition; this.TextureCoordinate = textureCoords; } public static int SizeInBytes = sizeof(float) * 9; public static VertexDeclaration VertexElements = new VertexDeclaration ( new VertexElement(0, VertexElementFormat.Vector3, VertexElementUsage.Position, 0), new VertexElement(sizeof(float) * 3, VertexElementFormat.Vector3, VertexElementUsage.TextureCoordinate, 0), new VertexElement(sizeof(float) * 6, VertexElementFormat.Vector3, VertexElementUsage.TextureCoordinate, 1) ); VertexDeclaration IVertexType.VertexDeclaration { get { return VertexElements; } } } }
{ "pile_set_name": "Github" }
/****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA * * ******************************************************************************/ #ifndef __INC_ODM_REGCONFIG_H_8812A #define __INC_ODM_REGCONFIG_H_8812A #if (RTL8812A_SUPPORT == 1) void odm_ConfigRFReg_8812A( IN PDM_ODM_T pDM_Odm, IN u4Byte Addr, IN u4Byte Data, IN ODM_RF_RADIO_PATH_E RF_PATH, IN u4Byte RegAddr ); void odm_ConfigRF_RadioA_8812A( IN PDM_ODM_T pDM_Odm, IN u4Byte Addr, IN u4Byte Data ); void odm_ConfigRF_RadioB_8812A( IN PDM_ODM_T pDM_Odm, IN u4Byte Addr, IN u4Byte Data ); void odm_ConfigMAC_8812A( IN PDM_ODM_T pDM_Odm, IN u4Byte Addr, IN u1Byte Data ); void odm_ConfigBB_AGC_8812A( IN PDM_ODM_T pDM_Odm, IN u4Byte Addr, IN u4Byte Bitmask, IN u4Byte Data ); void odm_ConfigBB_PHY_REG_PG_8812A( IN PDM_ODM_T pDM_Odm, IN u4Byte Addr, IN u4Byte Bitmask, IN u4Byte Data ); void odm_ConfigBB_PHY_8812A( IN PDM_ODM_T pDM_Odm, IN u4Byte Addr, IN u4Byte Bitmask, IN u4Byte Data ); void odm_ConfigBB_TXPWR_LMT_8812A( IN PDM_ODM_T pDM_Odm, IN pu1Byte Regulation, IN pu1Byte Band, IN pu1Byte Bandwidth, IN pu1Byte RateSection, IN pu1Byte RfPath, IN pu1Byte Channel, IN pu1Byte PowerLimit ); #endif #endif // end of SUPPORT
{ "pile_set_name": "Github" }
{ "format_version": "1.10", "minecraft:item": { "description": { "identifier": "minecraft:leather_boots" }, "components": { "minecraft:max_stack_size": 1, "minecraft:enchantable": { "value": 15, "slot": "armor_feet" }, "minecraft:damageable": { "max_damage": 65, "damage_chance": { "min": 60, "max": 100 } }, "minecraft:armor": { "protection": 1 }, "minecraft:wearable": { "slot": "slot.armor.feet" }, "minecraft:dyeable": { "default_color": "FFA06540" } } } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <layout onLaunch="launch" onVolumeUp="volume_up" onVolumeDown="volume_down" color="FF6600"> <grid> <row> <button icon="vdown" onTap="volume_down" /> <button icon="vup" onTap="volume_up" /> </row> <row> <button icon="rwd" onTap="left" /> <button icon="ff" onTap="right" /> </row> <row> <button icon="fullscreen" onTap="fullscreen" /> <button icon="playpause" onTap="play_pause" /> </row> </grid> </layout>
{ "pile_set_name": "Github" }
/* * Copyright 2007-2017 Charles du Jeu - Abstrium SAS <team (at) pyd.io> * This file is part of Pydio. * * Pydio is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Pydio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Pydio. If not, see <http://www.gnu.org/licenses/>. * * The latest code can be found at <https://pydio.com>. */ 'use strict'; exports.__esModule = true; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var React = require('react'); var _require = require('material-ui'); var ListItem = _require.ListItem; var Avatar = _require.Avatar; var FontIcon = _require.FontIcon; var _require2 = require('material-ui/styles'); var muiThemeable = _require2.muiThemeable; var Color = require('color'); var Pydio = require('pydio'); var Repository = require('pydio/model/repository'); var WorkspaceEntryMaterial = (function (_React$Component) { _inherits(WorkspaceEntryMaterial, _React$Component); function WorkspaceEntryMaterial() { _classCallCheck(this, WorkspaceEntryMaterial); _React$Component.apply(this, arguments); } WorkspaceEntryMaterial.prototype.onClick = function onClick() { if (this.props.onWorkspaceTouchTap) { this.props.onWorkspaceTouchTap(this.props.workspace.getId()); return; } if (this.props.workspace.getId() === this.props.pydio.user.activeRepository && this.props.showFoldersTree) { this.props.pydio.goTo('/'); } else { this.props.pydio.triggerRepositoryChange(this.props.workspace.getId()); } }; WorkspaceEntryMaterial.prototype.render = function render() { var _props = this.props; var workspace = _props.workspace; var muiTheme = _props.muiTheme; var leftAvatar = undefined, leftIcon = undefined; var color = muiTheme.palette.primary1Color; //let backgroundColor = new Color(muiTheme.palette.primary1Color).lightness(96).rgb().toString(); var backgroundColor = '#ECEFF1'; if (workspace.getOwner() || workspace.getAccessType() === 'inbox') { color = MaterialUI.Style.colors.teal500; var icon = workspace.getAccessType() === 'inbox' ? 'file-multiple' : 'folder-outline'; if (workspace.getRepositoryType() === 'remote') icon = 'cloud-outline'; leftAvatar = React.createElement(Avatar, { backgroundColor: backgroundColor, color: color, icon: React.createElement(FontIcon, { className: 'mdi mdi-' + icon }) }); } else { leftAvatar = React.createElement( Avatar, { style: { fontSize: 18 }, backgroundColor: backgroundColor, color: color }, workspace.getLettersBadge() ); } return React.createElement(ListItem, { leftAvatar: leftAvatar, leftIcon: leftIcon, primaryText: workspace.getLabel(), secondaryText: workspace.getDescription(), onTouchTap: this.onClick.bind(this) }); }; return WorkspaceEntryMaterial; })(React.Component); WorkspaceEntryMaterial.propTypes = { pydio: React.PropTypes.instanceOf(Pydio).isRequired, workspace: React.PropTypes.instanceOf(Repository).isRequired, muiTheme: React.PropTypes.object }; exports['default'] = WorkspaceEntryMaterial = muiThemeable()(WorkspaceEntryMaterial); exports['default'] = WorkspaceEntryMaterial; module.exports = exports['default'];
{ "pile_set_name": "Github" }
/* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 2008 Axel Gembe <[email protected]> * Copyright (C) 2009-2010 Daniel Dickinson <[email protected]> */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdint.h> #include <unistd.h> #include <sys/stat.h> #include <netinet/in.h> #include <inttypes.h> #include "bcm_tag.h" #include "imagetag_cmdline.h" #include "cyg_crc.h" #define DEADCODE 0xDEADC0DE /* Kernel header */ struct kernelhdr { uint32_t loadaddr; /* Kernel load address */ uint32_t entry; /* Kernel entry point address */ uint32_t lzmalen; /* Compressed length of the LZMA data that follows */ }; static char pirellitab[NUM_PIRELLI][BOARDID_LEN] = PIRELLI_BOARDS; void int2tag(char *tag, uint32_t value) { uint32_t network = htonl(value); memcpy(tag, (char *)(&network), 4); } uint32_t compute_crc32(uint32_t crc, FILE *binfile, size_t compute_start, size_t compute_len) { uint8_t readbuf[1024]; size_t read; fseek(binfile, compute_start, SEEK_SET); /* read block of 1024 bytes */ while (binfile && !feof(binfile) && !ferror(binfile) && (compute_len >= sizeof(readbuf))) { read = fread(readbuf, sizeof(uint8_t), sizeof(readbuf), binfile); crc = cyg_crc32_accumulate(crc, readbuf, read); compute_len = compute_len - read; } /* Less than 1024 bytes remains, read compute_len bytes */ if (binfile && !feof(binfile) && !ferror(binfile) && (compute_len > 0)) { read = fread(readbuf, sizeof(uint8_t), compute_len, binfile); crc = cyg_crc32_accumulate(crc, readbuf, read); } return crc; } size_t getlen(FILE *fp) { size_t retval, curpos; if (!fp) return 0; curpos = ftell(fp); fseek(fp, 0, SEEK_END); retval = ftell(fp); fseek(fp, curpos, SEEK_SET); return retval; } int tagfile(const char *kernel, const char *rootfs, const char *bin, \ const struct gengetopt_args_info *args, \ uint32_t flash_start, uint32_t image_offset, \ uint32_t block_size, uint32_t load_address, uint32_t entry) { struct bcm_tag tag; struct kernelhdr khdr; FILE *kernelfile = NULL, *rootfsfile = NULL, *binfile = NULL, *cfefile = NULL; size_t cfeoff, cfelen, kerneloff, kernellen, rootfsoff, rootfslen, \ read, imagelen, rootfsoffpadlen = 0, kernelfslen, kerneloffpadlen = 0, oldrootfslen, \ rootfsend; uint8_t readbuf[1024]; uint32_t imagecrc = IMAGETAG_CRC_START; uint32_t kernelcrc = IMAGETAG_CRC_START; uint32_t rootfscrc = IMAGETAG_CRC_START; uint32_t kernelfscrc = IMAGETAG_CRC_START; uint32_t fwaddr = 0; uint8_t crc_val; const uint32_t deadcode = htonl(DEADCODE); int i; int is_pirelli = 0; memset(&tag, 0, sizeof(struct bcm_tag)); if (!kernel || !rootfs) { fprintf(stderr, "imagetag can't create an image without both kernel and rootfs\n"); } if (kernel && !(kernelfile = fopen(kernel, "rb"))) { fprintf(stderr, "Unable to open kernel \"%s\"\n", kernel); return 1; } if (rootfs && !(rootfsfile = fopen(rootfs, "rb"))) { fprintf(stderr, "Unable to open rootfs \"%s\"\n", rootfs); return 1; } if (!bin || !(binfile = fopen(bin, "wb+"))) { fprintf(stderr, "Unable to open output file \"%s\"\n", bin); return 1; } if ((args->cfe_given) && (args->cfe_arg)) { if (!(cfefile = fopen(args->cfe_arg, "rb"))) { fprintf(stderr, "Unable to open CFE file \"%s\"\n", args->cfe_arg); } } fwaddr = flash_start + image_offset; if (cfefile) { cfeoff = flash_start; cfelen = getlen(cfefile); /* Seek to the start of the file after tag */ fseek(binfile, sizeof(tag), SEEK_SET); /* Write the cfe */ while (cfefile && !feof(cfefile) && !ferror(cfefile)) { read = fread(readbuf, sizeof(uint8_t), sizeof(readbuf), cfefile); fwrite(readbuf, sizeof(uint8_t), read, binfile); } } else { cfeoff = 0; cfelen = 0; } if (!args->root_first_flag) { /* Build the kernel address and length (doesn't need to be aligned, read only) */ kerneloff = fwaddr + sizeof(tag); kernellen = getlen(kernelfile); if (!args->kernel_file_has_header_flag) { /* Build the kernel header */ khdr.loadaddr = htonl(load_address); khdr.entry = htonl(entry); khdr.lzmalen = htonl(kernellen); /* Increase the kernel size by the header size */ kernellen += sizeof(khdr); } /* Build the rootfs address and length */ rootfsoff = kerneloff + kernellen; /* align the start if requested */ if (args->align_rootfs_flag) rootfsoff = (rootfsoff % block_size) > 0 ? (((rootfsoff / block_size) + 1) * block_size) : rootfsoff; else rootfsoff = (rootfsoff % 4) > 0 ? (((rootfsoff / 4) + 1) * 4) : rootfsoff; /* align the end */ rootfsend = rootfsoff + getlen(rootfsfile); if ((rootfsend % block_size) > 0) rootfsend = (((rootfsend / block_size) + 1) * block_size); rootfslen = rootfsend - rootfsoff; imagelen = rootfsoff + rootfslen - kerneloff + sizeof(deadcode); rootfsoffpadlen = rootfsoff - (kerneloff + kernellen); /* Seek to the start of the kernel */ fseek(binfile, kerneloff - fwaddr + cfelen, SEEK_SET); /* Write the kernel header */ fwrite(&khdr, sizeof(khdr), 1, binfile); /* Write the kernel */ while (kernelfile && !feof(kernelfile) && !ferror(kernelfile)) { read = fread(readbuf, sizeof(uint8_t), sizeof(readbuf), kernelfile); fwrite(readbuf, sizeof(uint8_t), read, binfile); } /* Write the RootFS */ fseek(binfile, rootfsoff - fwaddr + cfelen, SEEK_SET); while (rootfsfile && !feof(rootfsfile) && !ferror(rootfsfile)) { read = fread(readbuf, sizeof(uint8_t), sizeof(readbuf), rootfsfile); fwrite(readbuf, sizeof(uint8_t), read, binfile); } /* Align image to specified erase block size and append deadc0de */ printf("Data alignment to %dk with 'deadc0de' appended\n", block_size/1024); fseek(binfile, rootfsoff + rootfslen - fwaddr + cfelen, SEEK_SET); fwrite(&deadcode, sizeof(uint32_t), 1, binfile); oldrootfslen = rootfslen; if (args->pad_given) { uint32_t allfs = 0xffffffff; uint32_t pad_size = args->pad_arg * 1024 * 1024; printf("Padding image to %d bytes ...\n", pad_size); while (imagelen < pad_size) { fwrite(&allfs, sizeof(uint32_t), 1, binfile); imagelen += 4; rootfslen += 4; } } /* Flush the binfile buffer so that when we read from file, it contains * everything in the buffer */ fflush(binfile); /* Compute the crc32 of the entire image (deadC0de included) */ imagecrc = compute_crc32(imagecrc, binfile, kerneloff - fwaddr + cfelen, imagelen); /* Compute the crc32 of the kernel and padding between kernel and rootfs) */ kernelcrc = compute_crc32(kernelcrc, binfile, kerneloff - fwaddr + cfelen, kernellen + rootfsoffpadlen); /* Compute the crc32 of the kernel and padding between kernel and rootfs) */ kernelfscrc = compute_crc32(kernelfscrc, binfile, kerneloff - fwaddr + cfelen, kernellen + rootfsoffpadlen + rootfslen + sizeof(deadcode)); /* Compute the crc32 of the flashImageStart to rootLength. * The broadcom firmware assumes the rootfs starts the image, * therefore uses the rootfs start to determine where to flash * the image. Since we have the kernel first we have to give * it the kernel address, but the crc uses the length * associated with this address, which is added to the kernel * length to determine the length of image to flash and thus * needs to be rootfs + deadcode */ rootfscrc = compute_crc32(rootfscrc, binfile, kerneloff - fwaddr + cfelen, rootfslen + sizeof(deadcode)); } else { /* Build the kernel address and length (doesn't need to be aligned, read only) */ rootfsoff = fwaddr + sizeof(tag); oldrootfslen = getlen(rootfsfile); rootfslen = oldrootfslen; rootfslen = ( (rootfslen % block_size) > 0 ? (((rootfslen / block_size) + 1) * block_size) : rootfslen ); kerneloffpadlen = rootfslen - oldrootfslen; oldrootfslen = rootfslen; kerneloff = rootfsoff + rootfslen; kernellen = getlen(kernelfile); imagelen = cfelen + rootfslen + kernellen; /* Seek to the start of the kernel */ fseek(binfile, kerneloff - fwaddr + cfelen, SEEK_SET); if (!args->kernel_file_has_header_flag) { /* Build the kernel header */ khdr.loadaddr = htonl(load_address); khdr.entry = htonl(entry); khdr.lzmalen = htonl(kernellen); /* Write the kernel header */ fwrite(&khdr, sizeof(khdr), 1, binfile); /* Increase the kernel size by the header size */ kernellen += sizeof(khdr); } /* Write the kernel */ while (kernelfile && !feof(kernelfile) && !ferror(kernelfile)) { read = fread(readbuf, sizeof(uint8_t), sizeof(readbuf), kernelfile); fwrite(readbuf, sizeof(uint8_t), read, binfile); } /* Write the RootFS */ fseek(binfile, rootfsoff - fwaddr + cfelen, SEEK_SET); while (rootfsfile && !feof(rootfsfile) && !ferror(rootfsfile)) { read = fread(readbuf, sizeof(uint8_t), sizeof(readbuf), rootfsfile); fwrite(readbuf, sizeof(uint8_t), read, binfile); } /* Flush the binfile buffer so that when we read from file, it contains * everything in the buffer */ fflush(binfile); /* Compute the crc32 of the entire image (deadC0de included) */ imagecrc = compute_crc32(imagecrc, binfile, sizeof(tag), imagelen); /* Compute the crc32 of the kernel and padding between kernel and rootfs) */ kernelcrc = compute_crc32(kernelcrc, binfile, kerneloff - fwaddr + cfelen, kernellen + rootfsoffpadlen); kernelfscrc = compute_crc32(kernelfscrc, binfile, rootfsoff - fwaddr + cfelen, kernellen + rootfslen); rootfscrc = compute_crc32(rootfscrc, binfile, rootfsoff - fwaddr + cfelen, rootfslen); } /* Close the files */ if (cfefile) { fclose(cfefile); } fclose(kernelfile); fclose(rootfsfile); /* Build the tag */ strncpy(tag.tagVersion, args->tag_version_arg, sizeof(tag.tagVersion) - 1); strncpy(tag.sig_1, args->signature_arg, sizeof(tag.sig_1) - 1); strncpy(tag.sig_2, args->signature2_arg, sizeof(tag.sig_2) - 1); strncpy(tag.chipid, args->chipid_arg, sizeof(tag.chipid) - 1); strncpy(tag.boardid, args->boardid_arg, sizeof(tag.boardid) - 1); strcpy(tag.big_endian, "1"); sprintf(tag.totalLength, "%lu", imagelen); if (args->cfe_given) { sprintf(tag.cfeAddress, "%" PRIu32, flash_start); sprintf(tag.cfeLength, "%lu", cfelen); } else { /* We don't include CFE */ strcpy(tag.cfeAddress, "0"); strcpy(tag.cfeLength, "0"); } sprintf(tag.kernelAddress, "%lu", kerneloff); sprintf(tag.kernelLength, "%lu", kernellen + rootfsoffpadlen); if (args->root_first_flag) { sprintf(tag.flashImageStart, "%lu", rootfsoff); sprintf(tag.flashRootLength, "%lu", rootfslen); } else { sprintf(tag.flashImageStart, "%lu", kerneloff); sprintf(tag.flashRootLength, "%lu", rootfslen + sizeof(deadcode)); } int2tag(tag.rootLength, oldrootfslen + sizeof(deadcode)); if (args->rsa_signature_given) { strncpy(tag.rsa_signature, args->rsa_signature_arg, RSASIG_LEN); } if (args->layoutver_given) { strncpy(tag.flashLayoutVer, args->layoutver_arg, TAGLAYOUT_LEN); } if (args->info1_given) { strncpy(tag.information1, args->info1_arg, TAGINFO1_LEN); } if (args->info2_given) { strncpy(tag.information2, args->info2_arg, TAGINFO2_LEN); } if (args->reserved2_given) { strncpy(tag.reserved2, args->reserved2_arg, 16); } if (args->altinfo_given) { strncpy(tag.information1, args->altinfo_arg, TAGINFO1_LEN); } if (args->second_image_flag_given) { if (strncmp(args->second_image_flag_arg, "2", DUALFLAG_LEN) != 0) { strncpy(tag.dualImage, args->second_image_flag_arg, DUALFLAG_LEN); } } if (args->inactive_given) { if (strncmp(args->inactive_arg, "2", INACTIVEFLAG_LEN) != 0) { strncpy(tag.inactiveFlag, args->second_image_flag_arg, INACTIVEFLAG_LEN); } } for (i = 0; i < NUM_PIRELLI; i++) { if (strncmp(args->boardid_arg, pirellitab[i], BOARDID_LEN) == 0) { is_pirelli = 1; break; } } if ( !is_pirelli ) { int2tag(tag.imageCRC, kernelfscrc); } else { int2tag(tag.imageCRC, kernelcrc); } int2tag(&(tag.rootfsCRC[0]), rootfscrc); int2tag(tag.kernelCRC, kernelcrc); int2tag(tag.fskernelCRC, kernelfscrc); int2tag(tag.headerCRC, cyg_crc32_accumulate(IMAGETAG_CRC_START, (uint8_t*)&tag, sizeof(tag) - 20)); fseek(binfile, 0L, SEEK_SET); fwrite(&tag, sizeof(uint8_t), sizeof(tag), binfile); fflush(binfile); fclose(binfile); return 0; } int main(int argc, char **argv) { int c, i; char *kernel, *rootfs, *bin; uint32_t flash_start, image_offset, block_size, load_address, entry; flash_start = image_offset = block_size = load_address = entry = 0; struct gengetopt_args_info parsed_args; kernel = rootfs = bin = NULL; if (imagetag_cmdline(argc, argv, &parsed_args)) { exit(1); } printf("Broadcom 63xx image tagger - v2.0.0\n"); printf("Copyright (C) 2008 Axel Gembe\n"); printf("Copyright (C) 2009-2010 Daniel Dickinson\n"); printf("Licensed under the terms of the Gnu General Public License\n"); kernel = parsed_args.kernel_arg; rootfs = parsed_args.rootfs_arg; bin = parsed_args.output_arg; if (strlen(parsed_args.tag_version_arg) >= TAGVER_LEN) { fprintf(stderr, "Error: Tag Version (tag_version,v) too long.\n"); exit(1); } if (strlen(parsed_args.boardid_arg) >= BOARDID_LEN) { fprintf(stderr, "Error: Board ID (boardid,b) too long.\n"); exit(1); } if (strlen(parsed_args.chipid_arg) >= CHIPID_LEN) { fprintf(stderr, "Error: Chip ID (chipid,c) too long.\n"); exit(1); } if (strlen(parsed_args.signature_arg) >= SIG1_LEN) { fprintf(stderr, "Error: Magic string (signature,a) too long.\n"); exit(1); } if (strlen(parsed_args.signature2_arg) >= SIG2_LEN) { fprintf(stderr, "Error: Second magic string (signature2,m) too long.\n"); exit(1); } if (parsed_args.layoutver_given) { if (strlen(parsed_args.layoutver_arg) > FLASHLAYOUTVER_LEN) { fprintf(stderr, "Error: Flash layout version (layoutver,y) too long.\n"); exit(1); } } if (parsed_args.rsa_signature_given) { if (strlen(parsed_args.rsa_signature_arg) > RSASIG_LEN) { fprintf(stderr, "Error: RSA Signature (rsa_signature,r) too long.\n"); exit(1); } } if (parsed_args.info1_given) { if (strlen(parsed_args.info1_arg) >= TAGINFO1_LEN) { fprintf(stderr, "Error: Vendor Information 1 (info1) too long.\n"); exit(1); } } if (parsed_args.info2_given) { if (strlen(parsed_args.info2_arg) >= TAGINFO2_LEN) { fprintf(stderr, "Error: Vendor Information 2 (info2) too long.\n"); exit(1); } } if (parsed_args.altinfo_given) { if (strlen(parsed_args.altinfo_arg) >= ALTTAGINFO_LEN) { fprintf(stderr, "Error: Vendor Information 1 (info1) too long.\n"); exit(1); } } if (parsed_args.pad_given) { if (parsed_args.pad_arg < 0) { fprintf(stderr, "Error: pad size must be positive.\r"); exit(1); } } flash_start = strtoul(parsed_args.flash_start_arg, NULL, 16); image_offset = strtoul(parsed_args.image_offset_arg, NULL, 16); block_size = strtoul(parsed_args.block_size_arg, NULL, 16); if (!parsed_args.kernel_file_has_header_flag) { load_address = strtoul(parsed_args.load_addr_arg, NULL, 16); entry = strtoul(parsed_args.entry_arg, NULL, 16); if (load_address == 0) { fprintf(stderr, "Error: Invalid value for load address\n"); } if (entry == 0) { fprintf(stderr, "Error: Invalid value for entry\n"); } } return tagfile(kernel, rootfs, bin, &parsed_args, flash_start, image_offset, block_size, load_address, entry); }
{ "pile_set_name": "Github" }
/* * ZLint Copyright 2020 Regents of the University of Michigan * * 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 etsi import ( "github.com/zmap/zcrypto/x509" "github.com/zmap/zlint/v2/lint" "github.com/zmap/zlint/v2/util" ) type qcStatemQcEtsiPresentQcsCritical struct{} func (l *qcStatemQcEtsiPresentQcsCritical) Initialize() error { return nil } func (l *qcStatemQcEtsiPresentQcsCritical) CheckApplies(c *x509.Certificate) bool { if !util.IsExtInCert(c, util.QcStateOid) { return false } if util.IsAnyEtsiQcStatementPresent(util.GetExtFromCert(c, util.QcStateOid).Value) { return true } return false } func (l *qcStatemQcEtsiPresentQcsCritical) Execute(c *x509.Certificate) *lint.LintResult { errString := "" ext := util.GetExtFromCert(c, util.QcStateOid) if ext.Critical { errString = "ETSI QC Statement is present and QC Statements extension is marked critical" } if len(errString) == 0 { return &lint.LintResult{Status: lint.Pass} } else { return &lint.LintResult{Status: lint.Error, Details: errString} } } func init() { lint.RegisterLint(&lint.Lint{ Name: "e_qcstatem_etsi_present_qcs_critical", Description: "Checks that a QC Statement which contains any of the id-etsi-qcs-... QC Statements is not marked critical", Citation: "ETSI EN 319 412 - 5 V2.2.1 (2017 - 11) / Section 4.1", Source: lint.EtsiEsi, EffectiveDate: util.EtsiEn319_412_5_V2_2_1_Date, Lint: &qcStatemQcEtsiPresentQcsCritical{}, }) }
{ "pile_set_name": "Github" }
// © 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html /* ******************************************************************************* * * Copyright (C) 2003-2014, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* * file name: ucol_swp.h * encoding: UTF-8 * tab size: 8 (not used) * indentation:4 * * created on: 2003sep10 * created by: Markus W. Scherer * * Swap collation binaries. */ #ifndef __UCOL_SWP_H__ #define __UCOL_SWP_H__ #include "unicode/utypes.h" #if !UCONFIG_NO_COLLATION #include "udataswp.h" /* * Does the data look like a collation binary? * @internal */ U_INTERNAL UBool U_EXPORT2 ucol_looksLikeCollationBinary(const UDataSwapper *ds, const void *inData, int32_t length); /** * Swap ICU collation data like ucadata.icu. See udataswp.h. * @internal */ U_CAPI int32_t U_EXPORT2 ucol_swap(const UDataSwapper *ds, const void *inData, int32_t length, void *outData, UErrorCode *pErrorCode); /** * Swap inverse UCA collation data (invuca.icu). See udataswp.h. * @internal */ U_CAPI int32_t U_EXPORT2 ucol_swapInverseUCA(const UDataSwapper *ds, const void *inData, int32_t length, void *outData, UErrorCode *pErrorCode); #endif /* #if !UCONFIG_NO_COLLATION */ #endif
{ "pile_set_name": "Github" }
/* SPDX-License-Identifier: MIT */ #ifndef __NVIF_CLIENT_H__ #define __NVIF_CLIENT_H__ #include <nvif/object.h> struct nvif_client { struct nvif_object object; const struct nvif_driver *driver; u64 version; u8 route; bool super; }; int nvif_client_ctor(struct nvif_client *parent, const char *name, u64 device, struct nvif_client *); void nvif_client_dtor(struct nvif_client *); int nvif_client_ioctl(struct nvif_client *, void *, u32); int nvif_client_suspend(struct nvif_client *); int nvif_client_resume(struct nvif_client *); /*XXX*/ #include <core/client.h> #define nvxx_client(a) ({ \ struct nvif_client *_client = (a); \ (struct nvkm_client *)_client->object.priv; \ }) #endif
{ "pile_set_name": "Github" }
fails:Dir#seek returns the Dir instance fails:Dir#seek moves the read position to a previously obtained position
{ "pile_set_name": "Github" }
# IEEE 802.1aq - Shorest Path Bridging Mac-in-mac (SPBM): # Ethernet based link state protocol that enables Layer 2 Unicast, Layer 2 Multicast, Layer 3 Unicast, and Layer 3 Multicast virtualized services # https://en.wikipedia.org/wiki/IEEE_802.1aq # Modeled after the scapy VXLAN contribution # ############################################################# # Example SPB Frame Creation # # Note the outer Dot1Q Ethertype marking (0x88e7) ############################################################# # backboneEther = Ether(dst='00:bb:00:00:90:00', src='00:bb:00:00:40:00', type=0x8100) # backboneDot1Q = Dot1Q(vlan=4051,type=0x88e7) # backboneServiceID = SPBM(prio=1,isid=20011) # customerEther = Ether(dst='00:1b:4f:5e:ca:00',src='00:00:00:00:00:01',type=0x8100) # customerDot1Q = Dot1Q(prio=1,vlan=11,type=0x0800) # customerIP = IP(src='10.100.11.10',dst='10.100.12.10',id=0x0629,len=106) # customerUDP = UDP(sport=1024,dport=1025,chksum=0,len=86) # # spb_example = backboneEther/backboneDot1Q/backboneServiceID/customerEther/customerDot1Q/customerIP/customerUDP/"Payload" from scapy.packet import Packet, bind_layers from scapy.layers.l2 import Ether from scapy.fields import * class SPBM(Packet): name = "SPBM" fields_desc = [ BitField("prio", 0, 3), BitField("dei", 0, 1), BitField("nca", 0, 1), BitField("res1", 0, 1), BitField("res2", 0, 2), ThreeBytesField("isid", 0)] def mysummary(self): return self.sprintf("SPBM (isid=%SPBM.isid%") bind_layers(Dot1Q, SPBM, type=0x88e7) bind_layers(SPBM, Ether)
{ "pile_set_name": "Github" }
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Vim indent file " " Language: javascript.jsx " Maintainer: MaxMellon <[email protected]> " """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" if exists('b:did_indent') let s:did_indent = b:did_indent unlet b:did_indent endif let s:keepcpo = &cpo set cpo&vim if exists('s:did_indent') let b:did_indent = s:did_indent endif setlocal indentexpr=GetJsxIndent() setlocal indentkeys=0.,0{,0},0),0],0?,0\*,0\,,!^F,:,<:>,o,O,e,<>>,=*/ function! GetJsxIndent() return jsx_pretty#indent#get(function('GetJavascriptIndent')) endfunction let &cpo = s:keepcpo unlet s:keepcpo
{ "pile_set_name": "Github" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="de"> <head> <!-- Generated by javadoc (1.8.0_231) on Sun Nov 17 02:10:52 CET 2019 --> <title>Uses of Class org.deidentifier.arx.aggregates.classification.MultiClassRandomForestClassificationResult</title> <meta name="date" content="2019-11-17"> <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.deidentifier.arx.aggregates.classification.MultiClassRandomForestClassificationResult"; } } catch(err) { } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../org/deidentifier/arx/aggregates/classification/MultiClassRandomForestClassificationResult.html" title="class in org.deidentifier.arx.aggregates.classification">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?org/deidentifier/arx/aggregates/classification/class-use/MultiClassRandomForestClassificationResult.html" target="_top">Frames</a></li> <li><a href="MultiClassRandomForestClassificationResult.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h2 title="Uses of Class org.deidentifier.arx.aggregates.classification.MultiClassRandomForestClassificationResult" class="title">Uses of Class<br>org.deidentifier.arx.aggregates.classification.MultiClassRandomForestClassificationResult</h2> </div> <div class="classUseContainer">No usage of org.deidentifier.arx.aggregates.classification.MultiClassRandomForestClassificationResult</div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../org/deidentifier/arx/aggregates/classification/MultiClassRandomForestClassificationResult.html" title="class in org.deidentifier.arx.aggregates.classification">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?org/deidentifier/arx/aggregates/classification/class-use/MultiClassRandomForestClassificationResult.html" target="_top">Frames</a></li> <li><a href="MultiClassRandomForestClassificationResult.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
{ "pile_set_name": "Github" }
/** * @file negative_log_likelihood.hpp * @author Marcus Edel * * Definition of the NegativeLogLikelihood class. * * mlpack is free software; you may redistribute it and/or modify it under the * terms of the 3-clause BSD license. You should have received a copy of the * 3-clause BSD license along with mlpack. If not, see * http://www.opensource.org/licenses/BSD-3-Clause for more information. */ #ifndef MLPACK_METHODS_ANN_LAYER_NEGATIVE_LOG_LIKELIHOOD_HPP #define MLPACK_METHODS_ANN_LAYER_NEGATIVE_LOG_LIKELIHOOD_HPP #include <mlpack/prereqs.hpp> namespace mlpack { namespace ann /** Artificial Neural Network. */ { /** * Implementation of the negative log likelihood layer. The negative log * likelihood layer expectes that the input contains log-probabilities for each * class. The layer also expects a class index, in the range between 1 and the * number of classes, as target when calling the Forward function. * * @tparam InputDataType Type of the input data (arma::colvec, arma::mat, * arma::sp_mat or arma::cube). * @tparam OutputDataType Type of the output data (arma::colvec, arma::mat, * arma::sp_mat or arma::cube). */ template < typename InputDataType = arma::mat, typename OutputDataType = arma::mat > class NegativeLogLikelihood { public: /** * Create the NegativeLogLikelihoodLayer object. */ NegativeLogLikelihood(); /* * Computes the Negative log likelihood. * * @param input Input data used for evaluating the specified function. * @param target The target vector, that contains the class index in the range * between 1 and the number of classes. */ template<typename InputType, typename TargetType> double Forward(const InputType&& input, TargetType&& target); /** * Ordinary feed backward pass of a neural network. The negative log * likelihood layer expectes that the input contains log-probabilities for * each class. The layer also expects a class index, in the range between 1 * and the number of classes, as target when calling the Forward function. * * @param input The propagated input activation. * @param target The target vector, that contains the class index in the range * between 1 and the number of classes. * @param output The calculated error. */ template<typename InputType, typename TargetType, typename OutputType> void Backward(const InputType&& input, const TargetType&& target, OutputType&& output); //! Get the input parameter. InputDataType& InputParameter() const { return inputParameter; } //! Modify the input parameter. InputDataType& InputParameter() { return inputParameter; } //! Get the output parameter. OutputDataType& OutputParameter() const { return outputParameter; } //! Modify the output parameter. OutputDataType& OutputParameter() { return outputParameter; } //! Get the delta. OutputDataType& Delta() const { return delta; } //! Modify the delta. OutputDataType& Delta() { return delta; } /** * Serialize the layer */ template<typename Archive> void serialize(Archive& /* ar */, const unsigned int /* version */); private: //! Locally-stored delta object. OutputDataType delta; //! Locally-stored input parameter object. InputDataType inputParameter; //! Locally-stored output parameter object. OutputDataType outputParameter; }; // class NegativeLogLikelihood } // namespace ann } // namespace mlpack // Include implementation. #include "negative_log_likelihood_impl.hpp" #endif
{ "pile_set_name": "Github" }
// crypto_stream_xchacha20.h use libsodium_sys::*; #[test] fn test_crypto_stream_xchacha20_keybytes() { assert!( unsafe { crypto_stream_xchacha20_keybytes() } == crypto_stream_xchacha20_KEYBYTES as usize ) } #[test] fn test_crypto_stream_xchacha20_noncebytes() { assert!( unsafe { crypto_stream_xchacha20_noncebytes() } == crypto_stream_xchacha20_NONCEBYTES as usize ) }
{ "pile_set_name": "Github" }
<?php /** * This file is part of the TwigBridge package. * * @copyright Robert Crowe <[email protected]> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace TwigBridge\Command; use Illuminate\Console\Command; use InvalidArgumentException; use RuntimeException; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Finder\Finder; use Twig\Error\Error; use Twig\Error\LoaderError; use Twig\Source; /** * Artisan command to check the syntax of Twig templates. * * Adapted from the Symfony TwigBundle: * https://github.com/symfony/TwigBundle/blob/master/Command/LintCommand.php * * @author Fabien Potencier <[email protected]> */ class Lint extends Command { /** * {@inheritdoc} */ protected $name = 'twig:lint'; /** * {@inheritdoc} */ protected $description = 'Lints Twig templates'; /** * @var \TwigBridge\Bridge */ protected $twig; /** * @var \Symfony\Component\Finder\Finder */ protected $finder; /** * Get a finder instance of Twig files in the specified directories. * * @param array $paths Paths to search for files in. * * @return \Symfony\Component\Finder\Finder */ public function getFinder(array $paths) { $finder = (empty($this->finder)) ? Finder::create() : $this->finder; return $finder->files()->in($paths)->name('*.'.$this->laravel['twig.extension']); } /** * Set the finder used to search for Twig files. * * @param \Symfony\Component\Finder\Finder $finder * * @return void */ public function setFinder(Finder $finder) { $this->finder = $finder; } /** * {@inheritdoc} */ public function handle() { $this->twig = $this->laravel['twig']; $format = $this->option('format'); // Check STDIN for the template if (ftell(STDIN) === 0) { // Read template in $template = ''; while (!feof(STDIN)) { $template .= fread(STDIN, 1024); } if (!empty($template)) { return $this->display([$this->validate($template)], $format); } } $files = $this->getFiles($this->argument('filename'), $this->option('file'), $this->option('directory')); $details = []; foreach ($files as $file) { try { $template = $this->getContents($file); } catch (LoaderError $e) { throw new RuntimeException(sprintf('File or directory "%s" is not readable', $file)); } $details[] = $this->validate($template, $file); } return $this->display($details, $format); } /** * Gets an array of files to lint. * * @param string $filename Single file to check. * @param array $files Array of files to check. * @param array $directories Array of directories to get the files from. * * @return array */ protected function getFiles($filename, array $files, array $directories) { // Get files from passed in options $search = $files; $paths = $this->laravel['view']->getFinder()->getPaths(); if (!empty($filename)) { $search[] = $filename; } if (!empty($directories)) { $search_directories = []; foreach ($directories as $directory) { foreach ($paths as $path) { if (is_dir($path.'/'.$directory)) { $search_directories[] = $path.'/'.$directory; } } } if (!empty($search_directories)) { // Get those files from the search directory foreach ($this->getFinder($search_directories) as $file) { $search[] = $file->getRealPath(); } } } // If no files passed, use the view paths if (empty($search)) { foreach ($this->getFinder($paths) as $file) { $search[] = $file->getRealPath(); } } return $search; } /** * Get the contents of the template. * * @param string $file * * @return string */ protected function getContents($file) { return $this->laravel['twig.loader']->getSourceContext($file); } /** * Validate the template. * * @param string $template Twig template. * @param string $file Filename of the template. * * @return array */ protected function validate($template, $file = null) { try { $this->twig->parse($this->twig->tokenize($template, $file)); } catch (Error $e) { return [ 'template' => $template, 'file' => $file, 'valid' => false, 'exception' => $e, ]; } return [ 'template' => $template, 'file' => $file, 'valid' => true, ]; } /** * Output the results of the linting. * * @param array $details Validation results from all linted files. * @param string $format Format to output the results in. Supports text or json. * * @throws \InvalidArgumentException Thrown for an unknown format. * * @return int */ protected function display(array $details, $format = 'text') { $verbose = $this->getOutput()->isVerbose(); switch ($format) { case 'text': return $this->displayText($details, $verbose); case 'json': return $this->displayJson($details, $verbose); default: throw new InvalidArgumentException(sprintf('The format "%s" is not supported.', $format)); } } /** * Output the results as text. * * @param array $details Validation results from all linted files. * @param bool $verbose * * @return int */ protected function displayText(array $details, $verbose = false) { $errors = 0; foreach ($details as $info) { if ($info['valid'] && $verbose) { $file = ($info['file']) ? ' in '.$info['file'] : ''; $this->line('<info>OK</info>'.$file); } elseif (!$info['valid']) { $errors++; $this->renderException($info); } } // Output total number of successful files $success = count($details) - $errors; $total = count($details); $this->comment(sprintf('%d/%d valid files', $success, $total)); return min($errors, 1); } /** * Output the results as json. * * @param array $details Validation results from all linted files. * * @return int */ protected function displayJson(array $details) { $errors = 0; array_walk( $details, function (&$info) use (&$errors) { $info['file'] = (string) $info['file']; unset($info['template']); if (!$info['valid']) { $info['message'] = $info['exception']->getMessage(); unset($info['exception']); $errors++; } } ); $this->line(json_encode($details, JSON_PRETTY_PRINT)); return min($errors, 1); } /** * Output the error to the console. * * @param array Details for the file that failed to be linted. * * @return void */ protected function renderException(array $info) { $file = $info['file']; $exception = $info['exception']; $line = $exception->getTemplateLine(); $lines = $this->getContext($info['template'], $line); if ($file) { $this->line(sprintf('<error>Fail</error> in %s (line %s)', $file, $line)); } else { $this->line(sprintf('<error>Fail</error> (line %s)', $line)); } foreach ($lines as $no => $code) { $this->line( sprintf( "%s %-6s %s", $no == $line ? '<error>>></error>' : ' ', $no, $code ) ); if ($no == $line) { $this->line(sprintf('<error>>> %s</error> ', $exception->getRawMessage())); } } } /** * Grabs the surrounding lines around the exception. * * @param \Twig\Source $template Contents of Twig template. * @param string|int $line Line where the exception occurred. * @param int $context Number of lines around the line where the exception occurred. * * @return array */ protected function getContext(Source $template, $line, $context = 3) { $lines = explode("\n", $template->getCode()); $position = max(0, $line - $context); $max = min(count($lines), $line - 1 + $context); $result = []; while ($position < $max) { $result[$position + 1] = $lines[$position]; $position++; } return $result; } /** * {@inheritdoc} */ protected function getArguments() { return [ [ 'filename', InputArgument::OPTIONAL, 'Filename or directory to lint. If none supplied, all views will be checked.', ], ]; } /** * {@inheritdoc} */ protected function getOptions() { return [ [ 'file', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'Lint multiple files. Relative to the view path. Supports the dot syntax.', ], [ 'directory', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'Lint multiple directories. Relative to the view path. Does not support the dot syntax.', ], [ 'format', null, InputOption::VALUE_REQUIRED, 'Format to ouput the result in. Supports `text` or `json`.', 'text', ], ]; } public function fire() { return $this->handle(); } }
{ "pile_set_name": "Github" }
--- title: clone sidebar_label: clone id: version-1.x-clone original_id: clone --- Clone a repository | param | type [= default] | description | | -------------------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | | [**fs**](./fs) | FsClient | a file system implementation | | [**http**](./http) | HttpClient | an HTTP client | | [onProgress](./onProgress) | ProgressCallback | optional progress event callback | | [onMessage](./onMessage) | MessageCallback | optional message event callback | | [onAuth](./onAuth) | AuthCallback | optional auth fill callback | | [onAuthFailure](./onAuthFailure) | AuthFailureCallback | optional auth rejected callback | | [onAuthSuccess](./onAuthSuccess) | AuthSuccessCallback | optional auth approved callback | | **dir** | string | The [working tree](dir-vs-gitdir.md) directory path | | **gitdir** | string = join(dir,'.git') | The [git directory](dir-vs-gitdir.md) path | | **url** | string | The URL of the remote repository | | corsProxy | string | Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Value is stored in the git config file for that repo. | | ref | string | Which branch to checkout. By default this is the designated "main branch" of the repository. | | singleBranch | boolean = false | Instead of the default behavior of fetching all the branches, only fetch a single branch. | | noCheckout | boolean = false | If true, clone will only fetch the repo, not check out a branch. Skipping checkout can save a lot of time normally spent writing files to disk. | | noTags | boolean = false | By default clone will fetch all tags. `noTags` disables that behavior. | | remote | string = 'origin' | What to name the remote that is created. | | depth | number | Integer. Determines how much of the git repository's history to retrieve | | since | Date | Only fetch commits created after the given date. Mutually exclusive with `depth`. | | exclude | Array\<string\> = [] | A list of branches or tags. Instructs the remote server not to send us any commits reachable from these refs. | | relative | boolean = false | Changes the meaning of `depth` to be measured from the current shallow depth rather than from the branch tip. | | [headers](./headers) | Object\<string, string\> = {} | Additional headers to include in HTTP requests, similar to git's `extraHeader` config | | return | Promise\<void\> | Resolves successfully when clone completes | Example Code: ```js live await git.clone({ fs, http, dir: '/tutorial', corsProxy: 'https://cors.isomorphic-git.org', url: 'https://github.com/isomorphic-git/isomorphic-git', singleBranch: true, depth: 1 }) console.log('done') ``` --- <details> <summary><i>Tip: If you need a clean slate, expand and run this snippet to clean up the file system.</i></summary> ```js live window.fs = new LightningFS('fs', { wipe: true }) window.pfs = window.fs.promises console.log('done') ``` </details> <script> (function rewriteEditLink() { const el = document.querySelector('a.edit-page-link.button'); if (el) { el.href = 'https://github.com/isomorphic-git/isomorphic-git/edit/main/src/api/clone.js'; } })(); </script>
{ "pile_set_name": "Github" }
//! Bitcoind blockchain database importer #[macro_use] extern crate log; extern crate primitives; extern crate serialization as ser; extern crate chain; mod blk; mod block; mod fs; pub use primitives::{hash, bytes}; pub use blk::{open_blk_dir, BlkDir};
{ "pile_set_name": "Github" }
# Chart.js [![Build Status](https://travis-ci.org/nnnick/Chart.js.svg?branch=master)](https://travis-ci.org/nnnick/Chart.js) [![Code Climate](https://codeclimate.com/github/nnnick/Chart.js/badges/gpa.svg)](https://codeclimate.com/github/nnnick/Chart.js) *Simple HTML5 Charts using the canvas element* [chartjs.org](http://www.chartjs.org) ## Documentation You can find documentation at [chartjs.org/docs](http://www.chartjs.org/docs/). The markdown files that build the site are available under `/docs`. Please note - in some of the json examples of configuration you might notice some liquid tags - this is just for the generating the site html, please disregard. ## Bugs, issues and contributing Before submitting an issue or a pull request to the project, please take a moment to look over the [contributing guidelines](https://github.com/nnnick/Chart.js/blob/master/CONTRIBUTING.md) first. For support using Chart.js, please post questions with the [`chartjs` tag on Stack Overflow](http://stackoverflow.com/questions/tagged/chartjs). ## License Chart.js is available under the [MIT license](http://opensource.org/licenses/MIT).
{ "pile_set_name": "Github" }
/*** term.c ******************************************************************** ** ** This file is part of BibTool. ** It is distributed under the GNU General Public License. ** See the file COPYING for details. ** ** (c) 2015-2018 Gerd Neugebauer ** ** Net: [email protected] ** ******************************************************************************/ #include <bibtool/general.h> #include <bibtool/error.h> #include "term.h" #include "binding.h" /*****************************************************************************/ /* Internal Programs */ /*===========================================================================*/ #ifdef __STDC__ #define _ARG(A) A #else #define _ARG(A) () #endif Term new_term _ARG((short int type, Term car, Term cdr)); Term new_term_num _ARG((long value)); Term new_t_string _ARG((short int type, unsigned char* s)); void free_term _ARG((Term term)); void print _ARG((FILE* file, Term term)); String token_type _ARG((int c)); static void prn_args _ARG((FILE *file, Term term, char* pre, char* sep, char*post, int in, int q)); /*****************************************************************************/ /* External Programs */ /*===========================================================================*/ #define DEBUG_MEM #undef DEBUG_MEM /*---------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------- ** Function: token_type() ** Type: String ** Purpose: Get a printable representation of a token code. ** Arguments: ** c The token code ** Returns: the printable string **___________________________________________________ */ String token_type(c) /* */ int c; /* */ { static Uchar buffer[2]; /* */ /* */ switch (c) /* */ { case 0: /* */ case EOF: return (String)"end of file"; /* */ case L_AND: return (String)"and"; /* */ case L_CONS: return (String)"cons"; /* */ case L_CLASS: return (String)"Class"; /* */ case L_DEFUN: return (String)"defun"; /* */ case L_DIV: return (String)"/"; /* */ case L_EACH: return (String)"each"; /* */ case L_EQ: return (String)"=="; /* */ case L_FALSE: return (String)"false"; /* */ case L_VAR: return (String)"var"; /* */ case L_FIELD: return (String)"field"; /* */ case L_FUNCALL: return (String)"funcall"; /* */ case L_FUNCTION: return (String)"Function"; /* */ case L_GE: return (String)">="; /* */ case L_GROUP: return (String)"group"; /* */ case L_GT: return (String)">"; /* */ case L_IF: return (String)"if"; /* */ case L_ILIKE: return (String)"ilike"; /* */ case L_LE: return (String)"<="; /* */ case L_LIKE: return (String)"like"; /* */ case L_LT: return (String)"<"; /* */ case L_METHOD: return (String)":"; /* */ case L_MINUS: return (String)"-"; /* */ case L_MOD: return (String)"mod"; /* */ case L_NE: return (String)"!="; /* */ case L_NOT: return (String)"not"; /* */ case L_NUMBER: return (String)"number"; /* */ case L_OR: return (String)"or"; /* */ case L_PLUS: return (String)"+"; /* */ case L_QUOTE: return (String)"'"; /* */ case L_RETURN: return (String)"return"; /* */ case L_SET: return (String)"="; /* */ case L_STRING: return (String)"string"; /* */ case L_TIMES: return (String)"*"; /* */ case L_TRUE: return (String)"true"; /* */ case L_UMINUS: return (String)"-"; /* */ case L_WHILE: return (String)"while"; /* */ case L_WITH: return (String)"with"; /* */ } /* */ buffer[0] = c; /* */ buffer[1] = 0; /* */ return buffer; /* */ } /*------------------------*/ /*----------------------------------------------------------------------------- ** Function: term_type() ** Type: String ** Purpose: ** ** Arguments: ** term the term ** Returns: **___________________________________________________ */ String term_type(term) /* */ Term term; /* */ { return term == NIL /* */ ? (String)"[]" /* */ : token_type(TType(term)); /* */ } /*------------------------*/ /*---------------------------------------------------------------------------*/ static Term terms = NIL; /* */ #ifdef DEBUG_MEM static Term *t_map = NULL; static size_t t_map_size = 0; static size_t t_map_ptr = 0; #endif /*----------------------------------------------------------------------------- ** Function: new__t() ** Type: Term ** Purpose: Allocate a new term and initialize it. ** ** Arguments: ** type the term type ** cdr the cdr ** Returns: the new term **___________________________________________________ */ static Term new__t(type, cdr) /* */ short int type; /* */ Term cdr; /* */ { register Term t = terms; /* */ /* */ if (t) { terms = Car(t); } /* */ else /* */ { t = (Term)malloc(sizeof(STerm)); /* */ if (t == NIL) OUT_OF_MEMORY("term"); /* */ /* */ #ifdef DEBUG_MEM if (t_map_ptr >= t_map_size) /* */ { t_map_size += 8192; /* */ t_map = (t_map /* */ ? calloc(t_map_size, sizeof(Term)) /* */ : malloc(t_map_size*sizeof(Term))); /* */ } /* */ t_map[t_map_ptr++] = t; /* */ #endif } /* */ TType(t) = type; /* */ Cdr(t) = cdr; /* */ TRefCount(t) = 1L; /* */ return t; /* */ } /*------------------------*/ /*----------------------------------------------------------------------------- ** Function: dump_terms() ** Type: void ** Purpose: Visualize the memory allocated and freed for terms. ** Arguments: ** file the output stream ** Returns: nothing **___________________________________________________ */ void dump_terms(file) /* */ FILE* file; /* */ { /* */ #ifdef DEBUG_MEM size_t i; /* */ register int c; /* */ /* */ fputs("\n\t", file); /* */ for (i = 0; i < t_map_ptr; i++) /* */ { c = TType(t_map[i]); /* */ fputc(c ? *token_type(c) : '_', file); /* */ if (i%64 == 63) fputc('\n', file); /* */ } /* */ fputs("\n\t", file); /* */ #endif } /*------------------------*/ /*----------------------------------------------------------------------------- ** Function: new_term() ** Type: Term ** Purpose: Allocate a new term and initialize it. ** Arguments: ** type the term type ** car the initial car ** cdr the initial cdr ** Returns: the new term **___________________________________________________ */ Term new_term(type, car, cdr) /* */ short int type; /* */ Term car; /* */ Term cdr; /* */ { register Term t = new__t(type, cdr); /* */ Car(t) = car; /* */ return t; /* */ } /*------------------------*/ /*----------------------------------------------------------------------------- ** Function: new_class() ** Type: Term ** Purpose: Make a new class term. ** ** Arguments: ** name the name term of NIL ** Returns: the new class **___________________________________________________ */ Term new_class(name) /* */ Term name; /* */ { register Term t = new__t(L_CLASS, NIL); /* */ TBinding(t) = binding(127, NULL); /* */ LinkTerm(name); /* */ Cdr(t) = name; /* */ return t; /* */ } /*------------------------*/ /*----------------------------------------------------------------------------- ** Function: new_term_num() ** Type: Term ** Purpose: Allocate a new term and initialize it as number. ** Arguments: ** n the numeric value ** Returns: **___________________________________________________ */ Term new_term_num(n) /* */ long n; /* */ { register Term t = new__t(L_NUMBER, NIL); /* */ TNumber(t) = n; /* */ return t; /* */ } /*------------------------*/ /*----------------------------------------------------------------------------- ** Function: new_t_string() ** Type: Term ** Purpose: Allocate a new term and initialize it as string type. ** Arguments: ** sym the symdef ** s the string value, i.e. a symbol ** Returns: the new term **___________________________________________________ */ Term new_t_string(type, s) /* */ short int type; /* */ String s; /* */ { register Term t = new__t(type, NIL); /* */ TString(t) = s; /* */ return t; /* */ } /*------------------------*/ /*----------------------------------------------------------------------------- ** Function: new_t_db() ** Type: Term ** Purpose: Allocate a new databse term. ** Arguments: ** db the database ** Returns: the new database term **___________________________________________________ */ Term new_t_db(db) /* */ DB db; /* */ { register Term t = new__t(L_DB, NIL); /* */ TDB(t) = db; /* */ return t; /* */ } /*------------------------*/ /*----------------------------------------------------------------------------- ** Function: new_t_rec() ** Type: Term ** Purpose: Allocate a new reacord term. ** Arguments: ** rec the record ** Returns: the new record term **___________________________________________________ */ Term new_t_rec(rec) /* */ Record rec; /* */ { register Term t = new__t(L_RECORD, NIL); /* */ TRecord(t) = rec; /* */ return t; /* */ } /*------------------------*/ /*----------------------------------------------------------------------------- ** Function: free_term() ** Type: void ** Purpose: Free the memory of a term and arrange for reuse. ** The term nodes are linked into the |terms| list to be reused. ** This happens only for those term nodes which are not locked. ** Arguments: ** t the term be freed ** Returns: nothing **___________________________________________________ */ void free_term(t) /* */ register Term t; /* */ { register Term cdr; /* */ /* */ for( ; t /* */ && TRefCount(t) <= 0 /* */ && TType(t) > 0 ; t = cdr) /* */ { /* */ /* */ #ifdef DEBUG_MEM fprintf( stderr, "free: %p %x ", t, TType(t)); /* */ print(stderr, t); /* */ fputc('\n', stderr); /* */ #endif /* */ switch (TType(t)) /* */ { case L_TRUE: /* */ case L_FALSE: /* */ return; /* */ case L_VAR: /* */ case L_FIELD: /* */ case L_STRING: /* */ case L_FUNCALL: /* */ /* */ case L_DB: /* */ case L_RECORD: /* */ case L_NUMBER: /* */ break; /* */ default: /* */ if (Car(t)) { UnlinkTerm(Car(t)); } /* */ break; /* */ } /* */ /* */ cdr = Cdr(t); /* */ if (cdr) /* */ { TRefCount(cdr)--; /* */ Cdr(t) = NIL; /* */ } /* */ /* */ Car(t) = terms; /* */ terms = t; /* */ TType(t) = 0; /* */ } /* */ } /* */ /*------------------------*/ /*----------------------------------------------------------------------------- ** Function: prn_quoted() ** Type: void ** Purpose: ** ** Arguments: ** file the output stream ** c the delimiting character ** s the string to be printed ** Returns: nothing **___________________________________________________ */ static void prn_quoted(file, c, s) /* */ FILE * file; /* */ char c; /* */ String s; /* */ { if (c) fputc(c, file); /* */ for (; *s; s++) /* */ { switch (*s) /* */ { case '\n': fputs("\\n", file); break; /* */ case '\r': fputs("\\r", file); break; /* */ case '\t': fputs("\\t", file); break; /* */ case '\b': fputs("\\b", file); break; /* */ case '\f': fputs("\\f", file); break; /* */ case '"': fputs("\\\"", file); break; /* */ case '`': fputs("\\`", file); break; /* */ case '\'': fputs("\\'", file); break; /* */ case '\\': fputs("\\\\", file); break; /* */ default: fputc((char)*s, file); /* */ } /* */ } /* */ if (c) fputc(c, file); /* */ } /*------------------------*/ /*----------------------------------------------------------------------------- ** Function: prn_field() ** Type: int ** Purpose: ** ** Arguments: ** file the output file ** t the term ** Returns: **___________________________________________________ */ static void prn_field(file, t, quoted) /* */ FILE * file; /* */ Term t; /* */ int quoted; /* */ { char q = 0; /* */ String s = TString(t); /* */ if (*s >= '0' && *s <= '9') { /* */ q = '`'; /* */ } else { /* */ for (; *s; s++) /* */ { if (!( (*s >='a' && *s <='z') /* */ || (*s >='A' && *s <='Z') /* */ || (*s >='0' && *s <='9') /* */ || *s == '@' /* */ || *s == '$' /* */ || *s == '_' /* */ || *s == '.')) /* */ { q = '`'; /* */ break; /* */ } /* */ } /* */ } /* */ prn_quoted(file, q, TString(t)); /* */ /* */ if (Cdr(t)) /* */ { fputs(": ", file); /* */ prn_term(file, Cdr(t), 0, quoted, FALSE); /* */ } /* */ } /*------------------------*/ /*----------------------------------------------------------------------------- ** Function: indent() ** Type: void ** Purpose: ** ** Arguments: ** file the outptu file ** s the inital string to print ** in the indentation level ** Returns: nothing **___________________________________________________ */ static void indent(file, s, in) /* */ FILE * file; /* */ char * s; /* */ int in; /* */ { fputs(s, file); /* */ while (in-- > 0) fputs(" ", file); /* */ } /*------------------------*/ /*----------------------------------------------------------------------------- ** Function: prn_args() ** Type: void ** Purpose: ** ** Arguments: ** file the output stream ** term the term ** prefix the prefix ** sep the separator ** postfix the postfix ** in the indentation ** quote ** Returns: nothing **___________________________________________________ */ static void prn_args(file, term, prefix, sep, postfix, in, quote)/* */ FILE *file; /* */ Term term; /* */ char *prefix; /* */ char *sep; /* */ char *postfix; /* */ int in; /* */ int quote; /* */ { /* */ fputs(prefix, file); /* */ if (term) /* */ { prn_term(file, Car(term), in, quote, TRUE); /* */ for (term = Cdr(term); term; term = Cdr(term)) /* */ { indent(file, sep, in); /* */ prn_term(file, Car(term), in, quote, TRUE); /* */ } /* */ } /* */ fputs(postfix, file); /* */ } /*------------------------*/ /*----------------------------------------------------------------------------- ** Function: prn_function() ** Type: void ** Purpose: ** ** Arguments: ** file the output file ** prefix ** term ** in the indentation level ** quote ** Returns: nothing **___________________________________________________ */ static void prn_function(file, prefix, term, in, quote)/* */ FILE *file; /* */ char * prefix; /* */ Term term; /* */ int in; /* */ int quote; /* */ { /* */ prn_args(file, Car(term), prefix, ", ", ") ", 0, quote);/* */ if (Cddr(term)) /* */ prn_term(file, Cdr(term), in, quote, TRUE); /* */ else /* */ fputs("{}", file); /* */ } /*------------------------*/ /*----------------------------------------------------------------------------- ** Function: prn_term() ** Type: void ** Purpose: Produce a printed representation of a term and write it to ** the output stream. ** Arguments: ** file the output stream ** t the term to print ** in the indentation level ** quote the indicator for quoting ** outer the indicator for ... ** Returns: nothing **___________________________________________________ */ void prn_term(file, term, in, quote, outer) /* */ FILE * file; /* */ Term term; /* */ int in; /* */ int quote; /* */ int outer; /* */ { char * key; /* */ Term t; /* */ if (term == NIL) { /* */ fputs("[]", file); /* */ return; /* */ } /* */ switch (TType(term)) /* */ { case 0: /* */ case EOF: /* */ return; /* */ /* */ case L_CLASS: /* */ fputs("class ", file); /* */ if (Car(term)) /* */ { fputs((char*)TString(Car(term)), file); /* */ for (t = Cdar(term); t; t = Cdr(t)) /* */ { fputs(" : ", file); /* */ fputs((char*)TString(Car(t)), file); /* */ } /* */ fputc('\n', file); /* */ } /* */ if (Cdr(term)) /* */ { prn_term(file, Cdr(term), /* */ in, FALSE, FALSE); } /* */ else /* */ { fputs("CLASS", file); } /* */ return; /* */ /* */ case L_CONS: /* */ prn_args(file, term, "[", ", ", "]", 0, quote);/* */ return; /* */ /* */ case L_DB: /* */ fputs("<DB>", file); /* */ return; /* */ /* */ case L_DEFUN: /* */ fputs("defun ", file); /* */ fputs((char*)TString(term), file); /* */ prn_function(file, "(", Cdr(term), in); /* */ return; /* */ /* */ case L_DEFVAR: /* */ fputs("defvar ", file); /* */ prn_args(file, term, "(", ", ", ") ", 0, quote);/* */ return; /* */ /* */ case L_EACH: /* */ fputs("each (", file); /* */ prn_field(file, Car(term), quote); /* */ fputs(") ", file); /* */ prn_term(file, Cdr(term), in, quote, FALSE); /* */ return; /* */ /* */ case L_FALSE: /* */ fputs("false", file); /* */ return; /* */ /* */ case L_VAR: /* */ case L_FIELD: /* */ prn_field(file, term, quote); /* */ return; /* */ /* */ case L_FUNCTION: /* */ prn_function(file, "function (", term, in); /* */ return; /* */ /* */ case L_GROUP: /* */ if (Cdr(term)) /* */ { indent(file, "{\n", in + 1); /* */ prn_args(file, Cdr(term), "", ";\n", "", in + 1, quote);/* */ indent(file, "\n", in); /* */ } else { /* */ fputs("{\n", file); /* */ } /* */ fputs("}", file); /* */ return; /* */ /* */ case L_IF: /* */ prn_args(file, Cdar(term), "if (", "", ") ", in + 1, quote);/* */ prn_term(file, Cadr(term), in, quote, FALSE);/* */ if (Cddr(term)) /* */ { fputs(" else ", file); /* */ prn_term(file, Cddr(term), in, quote, FALSE);/* */ } /* */ return; /* */ /* */ case L_METHOD: /* */ prn_term(file, Car(term), in, quote, FALSE); /* */ fputc(':', file); /* */ prn_term(file, Cdr(term), in, quote, FALSE); /* */ return; /* */ /* */ case L_NUMBER: /* */ fprintf(file, "%ld", TNumber(term)); /* */ return; /* */ /* */ case L_RECORD: /* */ fputs("<REC>", file); /* */ return; /* */ /* */ case L_RETURN: /* */ fputs("return ", file); /* */ prn_term(file, Cdr(term), in, quote, FALSE); /* */ return; /* */ /* */ case L_STRING: /* */ if (quote) /* */ { prn_quoted(file, '"', TString(term)); } /* */ else /* */ { fputs((char*)TString(term), file); } /* */ return; /* */ /* */ case L_TRUE: /* */ fputs("true", file); /* */ return; /* */ /* */ case L_UMINUS: /* */ fputs("-", file); /* */ prn_term(file, Cadr(term), in, quote, FALSE);/* */ return; /* */ /* */ case L_WHILE: /* */ prn_args(file, /* */ Cdar(term), /* */ "while (", "", ") ", in + 1, quote);/* */ prn_term(file, Cdr(term), in, quote, FALSE); /* */ return; /* */ /* */ case L_WITH: /* */ prn_args(file, /* */ Car(term), /* */ "with (", ",", ") ", in + 1, quote);/* */ prn_term(file, Cdr(term), in, quote, FALSE); /* */ return; /* */ /* */ case L_FUNCALL: key = (char*)TString(term);break;/* */ case L_QUOTE: key = "'"; break;/* */ case L_MINUS: key = " - "; break;/* */ case L_PLUS: key = " + "; break;/* */ case L_TIMES: key = " * "; break;/* */ case L_DIV: key = " / "; break;/* */ case L_MOD: key = " mod "; break;/* */ case L_SET: key = " = "; break;/* */ case L_LIKE: key = " like "; break;/* */ case L_ILIKE: key = " ilike "; break;/* */ case L_EQ: key = " == "; break;/* */ case L_NE: key = " != "; break;/* */ case L_GT: key = " > "; break;/* */ case L_GE: key = " >= "; break;/* */ case L_LT: key = " < "; break;/* */ case L_LE: key = " <= "; break;/* */ case L_NOT: key = "not"; break;/* */ case L_AND: key = " and "; break;/* */ case L_OR: key = " or "; break;/* */ default: /* */ fprintf(file, "?0x%x?", TType(term)); /* */ return; /* */ } /* */ /* */ if (L_IS_BINARY(TType(term)) ) /* */ { term = Cdr(term); /* */ if (term == NIL) return; /* */ if (!outer) fputc('(', file); /* */ prn_term(file, Car(term), in, quote, FALSE); /* */ fputs(key, file); /* */ prn_term(file, Cadr(term), in, quote, FALSE); /* */ if (!outer) fputc(')', file); /* */ } else { /* */ fputs(key, file); /* */ fputc('(', file); /* */ if (term) /* */ prn_args(file, Cdr(term), "", ", ", "", in, quote);/* */ fputc(')', file); /* */ } /* */ } /* */ /*------------------------*/ /*----------------------------------------------------------------------------- ** Function: print() ** Type: void ** Purpose: Produce a printed representation of a term and write it to ** the output stream. ** Arguments: ** file the output stream ** t the term to print ** Returns: nothing **___________________________________________________ */ void print(file, term) /* */ register FILE * file; /* */ register Term term; /* */ { prn_term(file, term, 0, TRUE, TRUE); /* */ } /*------------------------*/ /*----------------------------------------------------------------------------- ** Function: list_length() ** Type: int ** Purpose: Determine the length of a list, i.e. a cons sequence. ** Arguments: ** list the list ** Returns: the length **___________________________________________________ */ int list_length(list) /* */ register Term list; /* */ { register int i = 0; /* */ while (list && IsList(list)) /* */ { i++; /* */ list = Cdr(list); /* */ } /* */ return i; /* */ } /*------------------------*/ /*----------------------------------------------------------------------------- ** Function: hash() ** Type: int ** Purpose: Compute the has value of a string as sum of shifted characters. ** Arguments: ** s the string ** Returns: the hash value **___________________________________________________ */ unsigned int hash(s) /* */ register String s; /* */ { register unsigned int hash = 0; /* */ unsigned int i = 0; /* */ /* */ while (*s) /* */ { hash += (*s++) >> ((i++)&7); } /* */ /* */ return hash; /* */ } /*------------------------*/ /*----------------------------------------------------------------------------- ** Function: symdef() ** Type: SymDef ** Purpose: Allocate a new SymDef and fill it with initial values. ** Arguments: ** name the name of the symdef ** op the op code ** flags the flags ** get the getter function ** set the setter function ** Returns: the new SymDef **___________________________________________________ */ SymDef symdef(name, op, flags, get, set) /* */ String name; /* */ short int op; /* */ short int flags; /* */ Term (*get)_ARG((Binding, Term)); /* */ Term (*set)_ARG((Binding, Term)); /* */ { /* */ SymDef sym = (SymDef) malloc(sizeof(SSymDef));/* */ if (sym == SymDefNULL) OUT_OF_MEMORY("symdef"); /* */ SymName(sym) = name; /* */ SymOp(sym) = op; /* */ SymFlags(sym) = flags; /* */ SymHash(sym) = hash(name); /* */ SymTerm(sym) = NIL; /* */ SymValue(sym) = NIL; /* */ SymGet(sym) = get; /* */ SymSet(sym) = set; /* */ return sym; /* */ } /*------------------------*/ /*----------------------------------------------------------------------------- ** Function: free_sym() ** Type: void ** Purpose: Release the memory occupied by a symbol definition. ** Arguments: ** sym the symbol definition ** Returns: nothing **___________________________________________________ */ void free_sym(sym) /* */ SymDef sym; /* */ { /* */ if (SymValue(sym)) free_term(SymValue(sym)); /* */ free(sym); /* */ } /*------------------------*/ /*---------------------------------------------------------------------------*/
{ "pile_set_name": "Github" }
// Copyright (C) 2016 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. // This module is visited two times: // First when resolving the "x" binding and then another time to resolve the // "y" binding. export { y as x } from './instn-iee-star-cycle-2_FIXTURE.js'; export var y = 45;
{ "pile_set_name": "Github" }
describe("when matching a string that should match", function () { var mapping = Bifrost.StringMapping.create({ format: "{something}/{else}", mappedFormat: "whatevva" }); var result = mapping.matches("hello/there"); it("should match", function () { expect(result).toBe(true); }); });
{ "pile_set_name": "Github" }
using UnityEngine; using System.Collections; using LuaInterface; public class ToLua_UnityEngine_RectTransform { public static string GetLocalCornersDefined = @" if (count == 1) { UnityEngine.RectTransform obj = (UnityEngine.RectTransform)ToLua.CheckObject(L, 1, typeof(UnityEngine.RectTransform)); UnityEngine.Vector3[] arg0 = new UnityEngine.Vector3[4]; obj.GetLocalCorners(arg0); ToLua.Push(L, arg0); return 1; }"; public static string GetWorldCornersDefined = @" if (count == 1) { UnityEngine.RectTransform obj = (UnityEngine.RectTransform)ToLua.CheckObject(L, 1, typeof(UnityEngine.RectTransform)); UnityEngine.Vector3[] arg0 = new UnityEngine.Vector3[4]; obj.GetWorldCorners(arg0); ToLua.Push(L, arg0); return 1; }"; [OverrideDefinedAttribute] public Vector3[] GetLocalCorners() { return null; } [OverrideDefinedAttribute] public Vector3[] GetWorldCorners() { return null; } }
{ "pile_set_name": "Github" }
{ "type": "bundle", "id": "bundle--c51e81d2-3735-4d75-8f38-1bf96763e170", "spec_version": "2.0", "objects": [ { "external_references": [ { "source_name": "mitre-attack", "external_id": "T1500", "url": "https://attack.mitre.org/techniques/T1500" }, { "description": "ClearSky Cyber Security. (2018, November). MuddyWater Operations in Lebanon and Oman: Using an Israeli compromised domain for a two-stage campaign. Retrieved November 29, 2018.", "url": "https://www.clearskysec.com/wp-content/uploads/2018/11/MuddyWater-Operations-in-Lebanon-and-Oman.pdf", "source_name": "ClearSky MuddyWater Nov 2018" }, { "source_name": "TrendMicro WindowsAppMac", "url": "https://blog.trendmicro.com/trendlabs-security-intelligence/windows-app-runs-on-mac-downloads-info-stealer-and-adware/", "description": "Trend Micro. (2019, February 11). Windows App Runs on Mac, Downloads Info Stealer and Adware. Retrieved April 25, 2019." } ], "name": "Compile After Delivery", "id": "attack-pattern--cf7b3a06-8b42-4c33-bbe9-012120027925", "revoked": true, "type": "attack-pattern", "modified": "2020-03-16T15:38:37.650Z", "created": "2019-04-25T20:53:07.719Z" } ] }
{ "pile_set_name": "Github" }
I am a single file
{ "pile_set_name": "Github" }
<?php /* * This file is part of the Symfony package. * * (c) Vincent Bouzeran <[email protected]> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Elao\WebProfilerExtraBundle\DataCollector; use Symfony\Component\HttpKernel\DataCollector\DataCollector; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\RouterInterface; /** * RoutingDataCollector. * * @author Vincent Bouzeran <[email protected]> */ class RoutingDataCollector extends DataCollector { protected $router; /** * Constructor for the Router Datacollector * * @param Router $router The Router Object * @param boolean $displayInWdt True if the shortcut should be displayed */ public function __construct(RouterInterface $router, $displayInWdt) { $this->router = $router; $this->data['display_in_wdt'] = $displayInWdt; } /** * Collects the Information on the Route * * @param Request $request The Request Object * @param Response $response The Response Object * @param \Exception $exception The Exception */ public function collect(Request $request, Response $response, \Exception $exception = null) { $collection = $this->router->getRouteCollection(); $_ressources = $collection->getResources(); $_routes = $collection->all(); $routes = array(); $ressources = array(); foreach ($_ressources as $ressource) { $ressources[] = array( 'type' => get_class($ressource), 'path' => $ressource->__toString() ); } foreach ($_routes as $routeName => $route) { $defaults = $route->getDefaults(); $requirements = $route->getRequirements(); $controller = isset($defaults['_controller']) ? $defaults['_controller'] : 'unknown'; $routes[$routeName] = array( 'name' => $routeName, 'pattern' => $route->getPath(), 'controller' => $controller, 'method' => isset($requirements['_method']) ? $requirements['_method'] : 'ANY', ); } ksort($routes); $this->data['matchRoute'] = $request->attributes->get('_route'); $this->data['routes'] = $routes; $this->data['ressources'] = $ressources; } /** * Resets this data collector to its initial state. */ public function reset() { $this->data = ['display_in_wdt' => $this->data['display_in_wdt']]; } /** * Returns the Amount of Routes * * @return integer Amount of Routes */ public function getRouteCount() { return count($this->data['routes']); } /** * Returns the Matched Routes Information * * @return array Matched Routes Collection */ public function getMatchRoute() { return $this->data['matchRoute']; } /** * Returns the Ressources Information * * @return array Ressources Information */ public function getRessources() { return $this->data['ressources']; } /** * Returns the Amount of Ressources * * @return integer Amount of Ressources */ public function getRessourceCount() { return count($this->data['ressources']); } /** * Returns all the Routes * * @return array Route Information */ public function getRoutes() { return $this->data['routes']; } /** * Returns the Time * * @return int Time */ public function getTime() { $time = 0; return $time; } public function getDisplayInWdt() { return $this->data['display_in_wdt']; } /** * {@inheritdoc} */ public function getName() { return 'elao_routing'; } }
{ "pile_set_name": "Github" }
[android-components](../../../index.md) / [mozilla.components.feature.pwa.feature](../../index.md) / [SiteControlsBuilder](../index.md) / [Default](./index.md) # Default `open class Default : `[`SiteControlsBuilder`](../index.md) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/feature/pwa/src/main/java/mozilla/components/feature/pwa/feature/SiteControlsBuilder.kt#L48) Default implementation of [SiteControlsBuilder](../index.md) that copies the URL of the site when tapped. ### Constructors | Name | Summary | |---|---| | [&lt;init&gt;](-init-.md) | `Default()`<br>Default implementation of [SiteControlsBuilder](../index.md) that copies the URL of the site when tapped. | ### Functions | Name | Summary | |---|---| | [buildNotification](build-notification.md) | `open fun buildNotification(context: <ERROR CLASS>, builder: <ERROR CLASS>): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)<br>Create the notification to be displayed. Initial values are set in the provided [builder](../build-notification.md#mozilla.components.feature.pwa.feature.SiteControlsBuilder$buildNotification(, )/builder) and additional actions can be added here. Actions should be represented as [PendingIntent](#) that are filtered by [getFilter](../get-filter.md) and handled in [onReceiveBroadcast](../on-receive-broadcast.md). | | [createPendingIntent](create-pending-intent.md) | `fun createPendingIntent(context: <ERROR CLASS>, action: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, requestCode: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`): <ERROR CLASS>` | | [getFilter](get-filter.md) | `open fun getFilter(): <ERROR CLASS>`<br>Return an intent filter that matches the actions specified in [buildNotification](../build-notification.md). | | [onReceiveBroadcast](on-receive-broadcast.md) | `open fun onReceiveBroadcast(context: <ERROR CLASS>, session: `[`Session`](../../../mozilla.components.browser.session/-session/index.md)`, intent: <ERROR CLASS>): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)<br>Handle actions the user selected in the site controls notification. | ### Inheritors | Name | Summary | |---|---| | [CopyAndRefresh](../-copy-and-refresh/index.md) | `class CopyAndRefresh : `[`Default`](./index.md)<br>Implementation of [SiteControlsBuilder](../index.md) that adds a Refresh button and copies the URL of the site when tapped. |
{ "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 // //===----------------------------------------------------------------------===// // <chrono> // duration // template <class Rep1, class Period1, class Rep2, class Period2> // constexpr // bool // operator==(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs); // template <class Rep1, class Period1, class Rep2, class Period2> // constexpr // bool // operator!=(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs); #include <chrono> #include <cassert> #include "test_macros.h" int main(int, char**) { { std::chrono::seconds s1(3); std::chrono::seconds s2(3); assert(s1 == s2); assert(!(s1 != s2)); } { std::chrono::seconds s1(3); std::chrono::seconds s2(4); assert(!(s1 == s2)); assert(s1 != s2); } { std::chrono::milliseconds s1(3); std::chrono::microseconds s2(3000); assert(s1 == s2); assert(!(s1 != s2)); } { std::chrono::milliseconds s1(3); std::chrono::microseconds s2(4000); assert(!(s1 == s2)); assert(s1 != s2); } { std::chrono::duration<int, std::ratio<2, 3> > s1(9); std::chrono::duration<int, std::ratio<3, 5> > s2(10); assert(s1 == s2); assert(!(s1 != s2)); } { std::chrono::duration<int, std::ratio<2, 3> > s1(10); std::chrono::duration<int, std::ratio<3, 5> > s2(9); assert(!(s1 == s2)); assert(s1 != s2); } { std::chrono::duration<int, std::ratio<2, 3> > s1(9); std::chrono::duration<double, std::ratio<3, 5> > s2(10); assert(s1 == s2); assert(!(s1 != s2)); } #if TEST_STD_VER >= 11 { constexpr std::chrono::seconds s1(3); constexpr std::chrono::seconds s2(3); static_assert(s1 == s2, ""); static_assert(!(s1 != s2), ""); } { constexpr std::chrono::seconds s1(3); constexpr std::chrono::seconds s2(4); static_assert(!(s1 == s2), ""); static_assert(s1 != s2, ""); } { constexpr std::chrono::milliseconds s1(3); constexpr std::chrono::microseconds s2(3000); static_assert(s1 == s2, ""); static_assert(!(s1 != s2), ""); } { constexpr std::chrono::milliseconds s1(3); constexpr std::chrono::microseconds s2(4000); static_assert(!(s1 == s2), ""); static_assert(s1 != s2, ""); } { constexpr std::chrono::duration<int, std::ratio<2, 3> > s1(9); constexpr std::chrono::duration<int, std::ratio<3, 5> > s2(10); static_assert(s1 == s2, ""); static_assert(!(s1 != s2), ""); } { constexpr std::chrono::duration<int, std::ratio<2, 3> > s1(10); constexpr std::chrono::duration<int, std::ratio<3, 5> > s2(9); static_assert(!(s1 == s2), ""); static_assert(s1 != s2, ""); } { constexpr std::chrono::duration<int, std::ratio<2, 3> > s1(9); constexpr std::chrono::duration<double, std::ratio<3, 5> > s2(10); static_assert(s1 == s2, ""); static_assert(!(s1 != s2), ""); } #endif return 0; }
{ "pile_set_name": "Github" }
define( function() { return window.document; } );
{ "pile_set_name": "Github" }
/obj/structure/sign icon = 'icons/obj/decals.dmi' anchored = 1 opacity = 0 density = 0 layer = ABOVE_WINDOW_LAYER w_class = ITEM_SIZE_NORMAL /obj/structure/sign/ex_act(severity) switch(severity) if(1.0) qdel(src) return if(2.0) qdel(src) return if(3.0) qdel(src) return else return /obj/structure/sign/attackby(obj/item/tool as obj, mob/user as mob) //deconstruction if(isScrewdriver(tool) && !istype(src, /obj/structure/sign/double)) to_chat(user, "You unfasten the sign with your [tool.name].") var/obj/item/sign/S = new(src.loc) S.SetName(name) S.desc = desc S.icon_state = icon_state S.sign_state = icon_state qdel(src) else ..() /obj/item/sign name = "sign" desc = "" icon = 'icons/obj/decals.dmi' w_class = ITEM_SIZE_NORMAL //big var/sign_state = "" /obj/item/sign/attackby(obj/item/tool as obj, mob/user as mob) //construction if(istype(tool, /obj/item/weapon/screwdriver) && isturf(user.loc)) var/direction = input("In which direction?", "Select direction.") in list("North", "East", "South", "West", "Cancel") if(direction == "Cancel") return var/obj/structure/sign/S = new(user.loc) switch(direction) if("North") S.pixel_y = 32 if("East") S.pixel_x = 32 if("South") S.pixel_y = -32 if("West") S.pixel_x = -32 else return S.SetName(name) S.desc = desc S.icon_state = sign_state to_chat(user, "You fasten \the [S] with your [tool].") qdel(src) else ..() /obj/structure/sign/double/map name = "map" desc = "A framed map." /obj/structure/sign/double/map/New() ..() desc = "A framed map of the [station_name()]." /obj/structure/sign/double/map/left icon_state = "map-left" /obj/structure/sign/double/map/right icon_state = "map-right" /obj/structure/sign/monkey_painting name = "\improper Mr. Deempisi portrait" desc = "Under the painting a plaque reads: 'While the meat grinder may not have spared you, fear not. Not one part of you has gone to waste... You were delicious.'" icon_state = "monkey_painting" /obj/structure/sign/warning name = "\improper WARNING" icon_state = "securearea" /obj/structure/sign/warning/detailed icon_state = "securearea2" /obj/structure/sign/warning/New() ..() desc = "A warning sign which reads '[sanitize(name)]'." /obj/structure/sign/thera icon_state = "thera" name = "\improper THERA SAFE ROOM" desc = "A detailed sign that reads 'Temporary Housing for Emergency, Radioactive, Atmospheric. This location is unsuitable for extended Habitation. Do not shelter here beyond immediate need.'" /obj/structure/sign/warning/airlock name = "\improper EXTERNAL AIRLOCK" icon_state = "doors" /obj/structure/sign/warning/biohazard name = "\improper BIOHAZARD" icon_state = "bio" /obj/structure/sign/warning/bomb_range name = "\improper BOMB RANGE" icon_state = "blast" /obj/structure/sign/warning/caution name = "\improper CAUTION" /obj/structure/sign/warning/compressed_gas name = "\improper COMPRESSED GAS" icon_state = "hikpa" /obj/structure/sign/warning/deathsposal name = "\improper DISPOSAL LEADS TO SPACE" icon_state = "deathsposal" /obj/structure/sign/warning/docking_area name = "\improper KEEP CLEAR: DOCKING AREA" /obj/structure/sign/warning/engineering_access name = "\improper ENGINEERING ACCESS" /obj/structure/sign/warning/fall name = "\improper FALL HAZARD" icon_state = "falling" /obj/structure/sign/warning/fire name = "\improper DANGER: FIRE" icon_state = "fire" /obj/structure/sign/warning/high_voltage name = "\improper HIGH VOLTAGE" icon_state = "shock" /obj/structure/sign/warning/hot_exhaust name = "\improper HOT EXHAUST" icon_state = "fire" /obj/structure/sign/warning/internals_required name = "\improper INTERNALS REQUIRED" /obj/structure/sign/warning/lethal_turrets name = "\improper LETHAL TURRETS" icon_state = "turrets" /obj/structure/sign/warning/lethal_turrets/New() ..() desc += " Enter at own risk!" /obj/structure/sign/warning/mail_delivery name = "\improper MAIL DELIVERY" icon_state = "mail" /obj/structure/sign/warning/moving_parts name = "\improper MOVING PARTS" icon_state = "movingparts" /obj/structure/sign/warning/nosmoking_1 name = "\improper NO SMOKING" icon_state = "nosmoking" /obj/structure/sign/warning/nosmoking_2 name = "\improper NO SMOKING" icon_state = "nosmoking2" /obj/structure/sign/warning/nosmoking_burned name = "\improper NO SMOKING" icon_state = "nosmoking2_b" /obj/structure/sign/warning/nosmoking_burned/Initialize() . = ..() desc += " It looks charred." /obj/structure/sign/warning/smoking name = "\improper SMOKING" icon_state = "smoking" /obj/structure/sign/warning/smoking/Initialize() . = ..() desc += " Hell yeah." /obj/structure/sign/warning/pods name = "\improper ESCAPE PODS" icon_state = "podsnorth" /obj/structure/sign/warning/pods/south name = "\improper ESCAPE PODS" icon_state = "podssouth" /obj/structure/sign/warning/pods/east name = "\improper ESCAPE PODS" icon_state = "podseast" /obj/structure/sign/warning/pods/west name = "\improper ESCAPE PODS" icon_state = "podswest" /obj/structure/sign/warning/radioactive name = "\improper RADIOACTIVE AREA" icon_state = "radiation" /obj/structure/sign/warning/secure_area name = "\improper SECURE AREA" /obj/structure/sign/warning/secure_area/armory name = "\improper ARMORY" icon_state = "armory" /obj/structure/sign/warning/server_room name = "\improper SERVER ROOM" icon_state = "server" /obj/structure/sign/warning/siphon_valve name = "\improper SIPHON VALVE" /obj/structure/sign/warning/vacuum name = "\improper HARD VACUUM AHEAD" icon_state = "space" /obj/structure/sign/warning/vent_port name = "\improper EJECTION/VENTING PORT" /obj/structure/sign/redcross name = "medbay" desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here." icon_state = "redcross" /obj/structure/sign/greencross name = "medbay" desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here." icon_state = "greencross" /obj/structure/sign/bluecross_1 name = "infirmary" desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here." icon_state = "bluecross" /obj/structure/sign/bluecross_2 name = "infirmary" desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here." icon_state = "bluecross2" /obj/structure/sign/goldenplaque name = "The Most Robust Men Award for Robustness" desc = "To be Robust is not an action or a way of life, but a mental state. Only those with the force of Will strong enough to act during a crisis, saving friend from foe, are truly Robust. Stay Robust my friends." icon_state = "goldenplaque" /obj/structure/sign/goldenplaque/security name = "motivational plaque" desc = "A plaque engraved with a generic motivational quote and picture. ' Greater love hath no man than this, that a man lay down his life for his friends. John 15:13 " /obj/structure/sign/goldenplaque/medical name = "medical certificate" desc = "A picture next to a long winded description of medical certifications and degrees." /obj/structure/sign/kiddieplaque name = "\improper AI developers plaque" desc = "An extremely long list of names and job titles and a picture of the design team responsible for building this AI Core." icon_state = "kiddieplaque" /obj/structure/sign/atmosplaque name = "\improper engineering memorial plaque" desc = "This plaque memorializes those engineers and technicians who made the ultimate sacrifice to save their vessel and its crew." icon_state = "atmosplaque" /obj/structure/sign/emergonly name = "\improper EMERGENCY ONLY" desc = "A warning sign which reads 'EMERGENCY ONLY!'." icon_state = "emerg" /obj/structure/sign/noidle name = "\improper NO IDLING" desc = "A warning sign which reads 'NO IDLING!'." icon_state = "noidle" /obj/structure/sign/double/maltesefalcon //The sign is 64x32, so it needs two tiles. ;3 name = "The Maltese Falcon" desc = "The Maltese Falcon, Space Bar and Grill." /obj/structure/sign/double/maltesefalcon/left icon_state = "maltesefalcon-left" /obj/structure/sign/double/maltesefalcon/right icon_state = "maltesefalcon-right" /obj/structure/sign/warning/science name = "\improper SCIENCE!" icon_state = "science" /obj/structure/sign/warning/science/anomalous_materials name = "\improper ANOMALOUS MATERIALS" /obj/structure/sign/warning/science/mass_spectrometry name = "\improper MASS SPECTROMETRY" /obj/structure/sign/science_1 name = "\improper RESEARCH WING" desc = "A sign labelling the research wing." icon_state = "science" /obj/structure/sign/science_2 name = "\improper RESEARCH" desc = "A sign labelling an area where research is performed." icon_state = "science2" /obj/structure/sign/xenobio_1 name = "\improper XENOBIOLOGY" desc = "A sign labelling an area as a place where xenobiological entites are researched." icon_state = "xenobio" /obj/structure/sign/xenobio_2 name = "\improper XENOBIOLOGY" desc = "A sign labelling an area as a place where xenobiological entites are researched." icon_state = "xenobio2" /obj/structure/sign/xenobio_3 name = "\improper XENOBIOLOGY" desc = "A sign labelling an area as a place where xenobiological entites are researched." icon_state = "xenobio3" /obj/structure/sign/xenobio_4 name = "\improper XENOBIOLOGY" desc = "A sign labelling an area as a place where xenobiological entites are researched." icon_state = "xenobio4" /obj/structure/sign/xenoarch name = "\improper XENOARCHAEOLOGY" desc = "A sign labelling an area as a place where xenoarchaeological finds are researched." icon_state = "xenobio4" /obj/structure/sign/chemistry name = "\improper CHEMISTRY" desc = "A sign labelling an area containing chemical equipment." icon_state = "chemistry" /obj/structure/sign/xenoflora name = "\improper XENOFLORA" desc = "A sign labelling an area as a place where xenobiological plants are researched." icon_state = "hydro4" /obj/structure/sign/botany name = "\improper BOTANY" desc = "A warning sign which reads 'BOTANY!'." icon_state = "hydro3" /obj/structure/sign/hydro name = "\improper HYDROPONICS" desc = "A sign labelling an area as a place where plants are grown." icon_state = "hydro" /obj/structure/sign/hydrostorage name = "\improper HYDROPONICS STORAGE" desc = "A sign labelling an area as a place where plant growing supplies are kept." icon_state = "hydro3" /obj/structure/sign/directions name = "direction sign" desc = "A direction sign, claiming to know the way." icon_state = "direction" /obj/structure/sign/directions/New() ..() desc = "A direction sign, pointing out which way \the [src] is." /obj/structure/sign/directions/science name = "\improper Research Division" icon_state = "direction_sci" /obj/structure/sign/directions/engineering name = "\improper Engineering Bay" icon_state = "direction_eng" /obj/structure/sign/directions/security name = "\improper Security Wing" icon_state = "direction_sec" /obj/structure/sign/directions/medical name = "\improper Medical Bay" icon_state = "direction_med" /obj/structure/sign/directions/evac name = "\improper Evacuation Wing" icon_state = "direction_evac" /obj/structure/sign/directions/bridge name = "\improper Bridge" icon_state = "direction_bridge" /obj/structure/sign/directions/supply name = "\improper Supply Office" icon_state = "direction_supply" /obj/structure/sign/directions/infirmary name = "\improper Infirmary" icon_state = "direction_infirm" /obj/structure/sign/directions/examroom name = "\improper Exam Room" icon_state = "examroom" /obj/structure/sign/directions/infm name = "\improper Infirmary" icon_state = "infm" /obj/structure/sign/directions/med name = "\improper Medbay" icon_state = "med" /obj/structure/sign/deck/bridge name = "\improper Bridge Deck" icon_state = "deck-b" /obj/structure/sign/deck/first name = "\improper First Deck" icon_state = "deck-1" /obj/structure/sign/deck/second name = "\improper Second Deck" icon_state = "deck-2" /obj/structure/sign/deck/third name = "\improper Third Deck" icon_state = "deck-3" /obj/structure/sign/deck/fourth name = "\improper Fourth Deck" icon_state = "deck-4" /obj/structure/sign/deck/fifth name = "\improper Fifth Deck" icon_state = "deck-5" /obj/item/sign/medipolma name = "medical diploma" desc = "A fancy print laminated paper that certifies that its bearer is indeed a Doctor of Medicine, graduated from a medical school in one of fringe systems. You don't recognize the name though, and half of latin words they used do not actually exist." icon = 'icons/obj/decals.dmi' icon_state = "goldenplaque" sign_state = "goldenplaque" var/claimant /obj/item/sign/medipolma/attack_self(mob/user) if(!claimant) to_chat(user, "<span class='notice'>You fill in your name in the blanks with a permanent marker.</span>") claimant = user.real_name ..() /obj/item/sign/medipolma/examine(mob/user) . = ..() if(claimant) to_chat(user,"This one belongs to Dr.[claimant], MD.") else to_chat(user,"The name is left blank for some reason.")
{ "pile_set_name": "Github" }
/** * Copyright (c) 2005-2012 by Appcelerator, Inc. All Rights Reserved. * Licensed under the terms of the Eclipse Public License (EPL). * Please see the license.txt included with this distribution for details. * Any modifications to this file must keep this entire header intact. */ package org.python.pydev.debug.pyunit; import java.lang.ref.WeakReference; import org.eclipse.jface.action.Action; import org.python.pydev.pyunit.preferences.PyUnitPrefsPage2; public class ShowTestRunnerPreferencesAction extends Action { private WeakReference<PyUnitView> pyUnitView; public ShowTestRunnerPreferencesAction(PyUnitView pyUnitView) { this.pyUnitView = new WeakReference<PyUnitView>(pyUnitView); this.setText("Configure test runner preferences"); this.setToolTipText("Opens preferences for configuring the test runner default parameters."); } @Override public void run() { PyUnitPrefsPage2.showPage(); } }
{ "pile_set_name": "Github" }