text
stringlengths
2
14k
meta
dict
<?php $type = 'Core'; $name = 'ZapfDingbats'; $up = -100; $ut = 50; $cw = array( chr(0)=>0,chr(1)=>0,chr(2)=>0,chr(3)=>0,chr(4)=>0,chr(5)=>0,chr(6)=>0,chr(7)=>0,chr(8)=>0,chr(9)=>0,chr(10)=>0,chr(11)=>0,chr(12)=>0,chr(13)=>0,chr(14)=>0,chr(15)=>0,chr(16)=>0,chr(17)=>0,chr(18)=>0,chr(19)=>0,chr(20)=>0,chr(21)=>0, chr(22)=>0,chr(23)=>0,chr(24)=>0,chr(25)=>0,chr(26)=>0,chr(27)=>0,chr(28)=>0,chr(29)=>0,chr(30)=>0,chr(31)=>0,' '=>278,'!'=>974,'"'=>961,'#'=>974,'$'=>980,'%'=>719,'&'=>789,'\''=>790,'('=>791,')'=>690,'*'=>960,'+'=>939, ','=>549,'-'=>855,'.'=>911,'/'=>933,'0'=>911,'1'=>945,'2'=>974,'3'=>755,'4'=>846,'5'=>762,'6'=>761,'7'=>571,'8'=>677,'9'=>763,':'=>760,';'=>759,'<'=>754,'='=>494,'>'=>552,'?'=>537,'@'=>577,'A'=>692, 'B'=>786,'C'=>788,'D'=>788,'E'=>790,'F'=>793,'G'=>794,'H'=>816,'I'=>823,'J'=>789,'K'=>841,'L'=>823,'M'=>833,'N'=>816,'O'=>831,'P'=>923,'Q'=>744,'R'=>723,'S'=>749,'T'=>790,'U'=>792,'V'=>695,'W'=>776, 'X'=>768,'Y'=>792,'Z'=>759,'['=>707,'\\'=>708,']'=>682,'^'=>701,'_'=>826,'`'=>815,'a'=>789,'b'=>789,'c'=>707,'d'=>687,'e'=>696,'f'=>689,'g'=>786,'h'=>787,'i'=>713,'j'=>791,'k'=>785,'l'=>791,'m'=>873, 'n'=>761,'o'=>762,'p'=>762,'q'=>759,'r'=>759,'s'=>892,'t'=>892,'u'=>788,'v'=>784,'w'=>438,'x'=>138,'y'=>277,'z'=>415,'{'=>392,'|'=>392,'}'=>668,'~'=>668,chr(127)=>0,chr(128)=>390,chr(129)=>390,chr(130)=>317,chr(131)=>317, chr(132)=>276,chr(133)=>276,chr(134)=>509,chr(135)=>509,chr(136)=>410,chr(137)=>410,chr(138)=>234,chr(139)=>234,chr(140)=>334,chr(141)=>334,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0, chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>0,chr(161)=>732,chr(162)=>544,chr(163)=>544,chr(164)=>910,chr(165)=>667,chr(166)=>760,chr(167)=>760,chr(168)=>776,chr(169)=>595,chr(170)=>694,chr(171)=>626,chr(172)=>788,chr(173)=>788,chr(174)=>788,chr(175)=>788, chr(176)=>788,chr(177)=>788,chr(178)=>788,chr(179)=>788,chr(180)=>788,chr(181)=>788,chr(182)=>788,chr(183)=>788,chr(184)=>788,chr(185)=>788,chr(186)=>788,chr(187)=>788,chr(188)=>788,chr(189)=>788,chr(190)=>788,chr(191)=>788,chr(192)=>788,chr(193)=>788,chr(194)=>788,chr(195)=>788,chr(196)=>788,chr(197)=>788, chr(198)=>788,chr(199)=>788,chr(200)=>788,chr(201)=>788,chr(202)=>788,chr(203)=>788,chr(204)=>788,chr(205)=>788,chr(206)=>788,chr(207)=>788,chr(208)=>788,chr(209)=>788,chr(210)=>788,chr(211)=>788,chr(212)=>894,chr(213)=>838,chr(214)=>1016,chr(215)=>458,chr(216)=>748,chr(217)=>924,chr(218)=>748,chr(219)=>918, chr(220)=>927,chr(221)=>928,chr(222)=>928,chr(223)=>834,chr(224)=>873,chr(225)=>828,chr(226)=>924,chr(227)=>924,chr(228)=>917,chr(229)=>930,chr(230)=>931,chr(231)=>463,chr(232)=>883,chr(233)=>836,chr(234)=>836,chr(235)=>867,chr(236)=>867,chr(237)=>696,chr(238)=>696,chr(239)=>874,chr(240)=>0,chr(241)=>874, chr(242)=>760,chr(243)=>946,chr(244)=>771,chr(245)=>865,chr(246)=>771,chr(247)=>888,chr(248)=>967,chr(249)=>888,chr(250)=>831,chr(251)=>873,chr(252)=>927,chr(253)=>970,chr(254)=>918,chr(255)=>0); $uv = array(32=>32,33=>array(9985,4),37=>9742,38=>array(9990,4),42=>9755,43=>9758,44=>array(9996,28),72=>9733,73=>array(10025,35),108=>9679,109=>10061,110=>9632,111=>array(10063,4),115=>9650,116=>9660,117=>9670,118=>10070,119=>9687,120=>array(10072,7),128=>array(10088,14),161=>array(10081,7),168=>9827,169=>9830,170=>9829,171=>9824,172=>array(9312,10),182=>array(10102,31),213=>8594,214=>array(8596,2),216=>array(10136,24),241=>array(10161,14)); ?>
{ "pile_set_name": "Github" }
static GtUwordPair gt_radixsort_ulongpair_bin_get( const GtRadixbuffer *rbuf, GtUword binnum) { return rbuf->values.ulongpairptr[ (binnum << rbuf->log_bufsize) + (GtUword) rbuf->nextidx[binnum]]; } static inline void gt_radixsort_ulongpair_bin_update( GtUwordPair *source, GtRadixbuffer *rbuf, GtUword binnum, GtUwordPair value) { GtUword binoffset = binnum << rbuf->log_bufsize; rbuf->values.ulongpairptr [binoffset + (GtUword) rbuf->nextidx[binnum]]= value; if ((GtUword) rbuf->nextidx[binnum] < rbuf->buf_size - 1) { rbuf->nextidx[binnum]++; } else { GtUword j; GtUwordPair *wsourceptr, *rsourceptr, *rend, *valptr; wsourceptr = source + (rbuf->endofbin[binnum] - (rbuf->buf_size - 1)) ; rsourceptr = wsourceptr + rbuf->buf_size; rend = source + rbuf->startofbin[binnum+1]; valptr = rbuf->values.ulongpairptr + binoffset; for (j=0; j<rbuf->buf_size; j++) { *wsourceptr = *valptr; wsourceptr++; if (rsourceptr < rend) { *valptr = *rsourceptr; rsourceptr++; } valptr++; } rbuf->nextidx[binnum] = 0; } rbuf->endofbin[binnum]++; } static void gt_radixsort_ulongpair_cached_shuffle(GtRadixbuffer *rbuf, GtUwordPair *source, GtCountbasetype len, size_t rightshift) { GtUword binoffset, binnum, bufoffset, nextbin, firstnonemptybin = UINT8_MAX+1; GtCountbasetype *count, previouscount, currentidx; GtUwordPair *sourceptr, *sourceend = source + len; rbuf->countcached++; count = rbuf->startofbin; /* use same memory for count and startofbin */ for (binnum = 0; binnum <= UINT8_MAX; binnum++) { count[binnum] = 0; rbuf->nextidx[binnum] = 0; } for (sourceptr = source; sourceptr < sourceend; sourceptr++) { count[GT_RADIX_KEY(UINT8_MAX,rightshift,sourceptr->a)]++; } for (bufoffset = 0, binoffset = 0, binnum = 0; binnum <= UINT8_MAX; bufoffset += rbuf->buf_size, binoffset += count[binnum], binnum++) { const GtUword elems2copy = GT_MIN(rbuf->buf_size,(GtUword) count[binnum]); if (elems2copy > 0) { if (firstnonemptybin == UINT8_MAX+1) { firstnonemptybin = binnum; } memcpy(rbuf->values. ulongpairptr + bufoffset, source + binoffset, (sizeof *source * elems2copy)); } } previouscount = count[0]; rbuf->startofbin[0] = rbuf->endofbin[0] = 0; nextbin = 0; for (binnum = 1UL; binnum <= UINT8_MAX; binnum++) { GtCountbasetype temp = rbuf->startofbin[binnum-1] + previouscount; previouscount = count[binnum]; rbuf->startofbin[binnum] = rbuf->endofbin[binnum] = temp; } /* to simplify compution of bin end */ rbuf->startofbin[UINT8_MAX+1] = len; for (currentidx = 0, binnum = firstnonemptybin; currentidx < len; binnum = nextbin - 1) { GtUwordPair tmpvalue; tmpvalue = gt_radixsort_ulongpair_bin_get(rbuf,binnum); while (true) { binnum = GT_RADIX_KEY(UINT8_MAX,rightshift,tmpvalue.a); if (currentidx != rbuf->endofbin[binnum]) { GtUwordPair tmpswap; tmpswap = tmpvalue; tmpvalue = gt_radixsort_ulongpair_bin_get(rbuf,binnum); gt_radixsort_ulongpair_bin_update (source,rbuf,binnum, tmpswap); } else { break; } } gt_radixsort_ulongpair_bin_update(source,rbuf,binnum, tmpvalue); currentidx++; /* skip over empty bins */ while (nextbin <= UINT8_MAX && currentidx >= rbuf->startofbin[nextbin]) { nextbin++; } /* skip over full bins */ while (nextbin <= UINT8_MAX && rbuf->endofbin[nextbin-1] == rbuf->startofbin[nextbin]) { nextbin++; } if (currentidx < rbuf->endofbin[nextbin-1]) { currentidx = rbuf->endofbin[nextbin-1]; } } for (binnum = 0; binnum <= UINT8_MAX; binnum++) { GtUword bufleft = (GtUword) rbuf->nextidx[binnum]; if (bufleft > 0) { GtUwordPair *sourceptr, *valptr; valptr = rbuf->values.ulongpairptr + (binnum << rbuf->log_bufsize); sourceptr = source + (rbuf->startofbin[binnum+1] - bufleft); memcpy(sourceptr,valptr,(sizeof *sourceptr * bufleft)); } } } static void gt_radixsort_ulongpair_uncached_shuffle( GtRadixbuffer *rbuf, GtUwordPair *source, GtCountbasetype len, size_t rightshift) { GtUword binnum, nextbin; GtCountbasetype currentidx, previouscount, *count; GtUwordPair *sourceptr, *sourceend = source + len; rbuf->countuncached++; count = rbuf->startofbin; /* use same memory for count and startofbin */ for (binnum = 0; binnum <= UINT8_MAX; binnum++) { count[binnum] = 0; rbuf->nextidx[binnum] = 0; } for (sourceptr = source; sourceptr < sourceend; sourceptr++) { count[GT_RADIX_KEY(UINT8_MAX,rightshift,sourceptr->a)]++; } previouscount = count[0]; rbuf->startofbin[0] = rbuf->endofbin[0] = 0; nextbin = 0; for (binnum = 1UL; binnum <= UINT8_
{ "pile_set_name": "Github" }
#!/usr/bin/env bash export PATH=~/tools/emacswin/bin/:/bin:/usr/bin:"$PATH" rm TAGS find . \( '-path' '*/CVS' \ '-o' '-path' '*/.svn' \ '-o' '-path' '*/autom4te.cache' \ '-o' '-path' '*/{arch}' \ '-o' '-path' '*/.hg' \ '-o' '-path' '*/_darcs' \ '-o' '-path' '*/.git' \ '-o' '-path' '*/.bzr' \ '-o' '-path' '*~*' \ '-o' '-path' '*#' \ '-o' '-path' '*/TAGS' \ '-o' '-path' '*/semantic.cache' \ '-o' '-iname' '*.o' \ '-o' '-iname' '*.class' \ '-o' '-iname' '*.obj' \ '-o' '-iname' '*.pyc' \ '-o' '-path' '*/.ignore' \) -prune \ -o -type f \( -iname '*.cpp' \ -o -iname '*.hpp' \ -o -iname '*.s' \ -o -iname '*.h' \ -o -iname '*.c' \ -o -iname '*.cc' \ -o -iname '*.py' \ -o -iname '*.java' \ -o -iname '*.el' \ -o -iname '*.pl' \ -o -iname '*.inl' \ -o -iname '*.aidl' \ \) -print0 |xargs -0 etags -a "$@"
{ "pile_set_name": "Github" }
/** * Sinhala translation * @author CodeLyokoXtEAM <XcodeLyokoTEAM@gmail.com> * @version 2018-03-26 */ (function(root, factory) { if (typeof define === 'function' && define.amd) { define(['elfinder'], factory); } else if (typeof exports !== 'undefined') { module.exports = factory(require('elfinder')); } else { factory(root.elFinder); } }(this, function(elFinder) { elFinder.prototype.i18.si = { translator : 'CodeLyokoXtEAM &lt;XcodeLyokoTEAM@gmail.com&gt;', language : 'Sinhala', direction : 'ltr', dateFormat : 'Y.m.d h:i A', // Mar 13, 2012 05:27 PM fancyDateFormat : '$1 h:i A', // will produce smth like: Today 12:25 PM nonameDateFormat : 'Ymd-His', // to apply if upload file is noname: 120513172700 messages : { /********************************** errors **********************************/ 'error' : 'දෝෂයකි.', 'errUnknown' : 'නොදන්නා දෝෂයකි.', 'errUnknownCmd' : 'නොදන්නා විධානයකි.', 'errJqui' : 'වලංගු නොවන jQuery UI සැකැස්මකි. තේරිය හැකි, ඇදගෙන යාම සහ ඇද දැමිය හැකි කොටස් ඇතුළත් කළ යුතුය.', 'errNode' : 'ElFinder විසින් DOM Element නිර්මාණය කිරීමට අවශ්‍යව අැත.', 'errURL' : 'වලංගු නොවන elFinder සැකැස්මකි! URL විකල්පය සැකසා නැත.', 'errAccess' : 'භාවිතය අත්හිටුවා ඇත.', 'errConnect' : 'පසුබිම(Backend) වෙත සම්බන්ධ වීමට නොහැකිය.', 'errAbort' : 'සම්බන්ධතාවය වසාදමා ඇත.', 'errTimeout' : 'සම්බන්ධතා කල් ඉකුත්වී ඇත.', 'errNotFound' : 'පසුබිම(Backend) සොයාගත නොහැකි විය.', 'errResponse' : 'වලංගු නොවන පසුබිම(Backend) ප්‍රතිචාරය.', 'errConf' : 'වලංගු නොවන Backend සැකැස්මකි.', 'errJSON' : 'PHP JSON මොඩියුලය ස්ථාපනය කර නැත.', 'errNoVolumes' : 'කියවිය හැකි එ්කක(volumes) නොමැත.', 'errCmdParams' : '"$1" නම් විධානය වලංගු නොවන පරාමිතියකි.', 'errDataNotJSON' : 'JSON දත්ත නොවේ.', 'errDataEmpty' : 'හිස් දත්තයකි.', 'errCmdReq' : 'Backend සඳහා ඉල්ලන ලද විධානයේ නම අවශ්‍ය වේ.', 'errOpen' : '"$1" විවෘත කළ නොහැක.', 'errNotFolder' : 'අායිත්තම(object) ෆොල්ඩරයක් නොවේ.', 'errNotFile' : 'අායිත්තම(object) ගොනුව
{ "pile_set_name": "Github" }
/** * Internal dependencies */ import SVGArrow from './images/arrow.svg' /** * External dependencies */ import { range } from '~stackable/util' import classnames from 'classnames' import { i18n } from 'stackable' /** * WordPress dependencies */ import { __ } from '@wordpress/i18n' import { applyFilters } from '@wordpress/hooks' import { RichText } from '@wordpress/block-editor' const deprecatedSchema_1_17_3 = { align: { type: 'string', }, columns: { type: 'number', default: 3, }, titleColor: { type: 'string', default: '#ffffff', }, subtitleColor: { type: 'string', default: '#ffffff', }, overlayColor: { type: 'string', }, width: { type: 'number', default: 400, }, height: { type: 'number', default: 400, }, verticalAlign: { type: 'string', default: 'center', }, horizontalAlign: { type: 'string', default: 'center', }, design: { type: 'string', default: 'basic', }, borderRadius: { type: 'number', default: 12, }, shadow: { type: 'number', default: 3, }, overlayOpacity: { type: 'number', default: 7, }, imageHoverEffect: { type: 'string', default: '', }, arrow: { type: 'string', default: '', }, hoverEffect: { type: 'string', default: '', }, // Keep the old attributes. Gutenberg issue https://github.com/WordPress/gutenberg/issues/10406 full: { type: 'boolean', }, title: { type: 'string', }, subtitle: { type: 'string', }, id: { type: 'number', }, url: { type: 'string', }, href: { type: 'string', }, // Custom CSS attributes. customCSSUniqueID: { type: 'string', default: '', }, customCSS: { type: 'string', default: '', }, customCSSCompiled: { type: 'string', default: '', }, } // Wrap in curly or else statement will merge with the previous one and will error out. { [ 1, 2, 3, 4 ].forEach( i => { deprecatedSchema_1_17_3[ `title${ i }` ] = { source: 'html', selector: `.ugb-image-box__item:nth-of-type(${ i }) .ugb-image-box__title`, default: __( 'Title', i18n ), } deprecatedSchema_1_17_3[ `description${ i }` ] = { source: 'html', selector: `.ugb-image-box__item:nth-of-type(${ i }) .ugb-image-box__description`, default: __( 'Description', i18n ), } deprecatedSchema_1_17_3[ `imageURL${ i }` ] = { type: 'string', } deprecatedSchema_1_17_3[ `imageID${ i }` ] = { type: 'number', } deprecatedSchema_1_17_3[ `link${ i }` ] = { type: 'string', source: 'attribute', selector: `.ugb-image-box__item:nth-of-type(${ i }) .ugb-image-box__overlay`, attribute: 'href', default: '', } deprecatedSchema_1_17_3[ `newTab${ i }` ] = { type: 'boolean', source: 'attribute', selector: `.ugb-image-box__item:nth-of-type(${ i }) .ugb-image-box__overlay`, attribute: 'target', default: false, } } ) } const deprecatedSave_1_17_3 = props => { const { className, attributes } = props const { titleColor, subtitleColor, overlayColor, height, width, verticalAlign, horizontalAlign, align, columns, design = 'basic', borderRadius = 12, shadow = 3, imageHoverEffect = '', overlayOpacity = 7, arrow = '', } = props.attributes const mainClasses = classnames( [ className, 'ugb-image-box', 'ugb-image-box--v3', `ugb-image-box--columns-${ columns }`, ], applyFilters( 'stackable.image-box.mainclasses_1_17_3', { [ `ugb-image-box--design-${ design }` ]: design !== 'basic', [ `ugb-image-box--effect-${ imageHoverEffect }` ]: imageHoverEffect, [ `ugb-image-box--overlay-${ overlayOpacity }` ]: overlayOpacity !== 7, 'ugb-image-box--arrow': arrow, }, design, props ) ) const mainStyles = { textAlign: horizontalAlign ? horizontalAlign : undefined, '--overlay-color': overlayColor, } return ( <div className={ mainClasses } style={ mainStyles }> { applyFilters( 'stackable.image-box.save.output.before_1_17_3', null, design, props ) } { range( 1, columns + 1 ).map( i => { const imageURL = attributes[ `imageURL${ i }` ] const title = attributes[ `title${ i }` ] const description = attributes[ `description${ i }` ] const link = attributes[ `link${ i }` ] const newTab = attributes[ `newTab${ i }` ] const boxStyles = { backgroundImage: imageURL ? `url(${ imageURL })` : undefined, maxWidth: align !== 'wide' && align !== 'full' && columns === 1 ? width : undefined, height, textAlign: horizontalAlign, justifyContent: verticalAlign, borderRadius, } const boxClasses = classnames( [ 'ugb-image-box__item', ], applyFilters( 'stackable.image-box.itemclasses_1_17_3', { [ `ugb--shadow-${ shadow }` ]: shadow !== 3, }, design, i, props ) ) const arrowClasses = classnames( [ 'ugb-image-box__arrow', `ugb-image-box__arrow--align-${ arrow }`, ] ) return ( <div className={ boxClasses } style={ boxStyles } key={ i }> { imageHoverEffect && <div className="ugb-image-box__image-effect" style={ { backgroundImage: imageURL ? `url(${ imageURL })` : undefined, } } /> } { /* eslint-disable-next-line */ } <a className="ugb-image-box__overlay" href={ link } target={ newTab ? '_blank' : undefined } /> <div className="ugb-image-box__content"> { ! RichText.isEmpty( title ) && ( <RichText.Content tagName="h4" className="ugb-image-box__title" style={ { color: titleColor } } value={ title } /> ) } { ! RichText.isEmpty( description ) && ( <RichText.Content tagName="p" className="ugb-image-box__description" style={ { color: subtitleColor } } value={ description }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <!-- DEPRECATED!!! PLEASE USE "org/springframework/cloud/gcp/logging/logback-appender.xml" --> <!-- Stackdriver appender logback configuration provided for import. --> <included> <property name="STACKDRIVER_LOG_NAME" value="${STACKDRIVER_LOG_NAME:-spring.log}"/> <property name="STACKDRIVER_LOG_FLUSH_LEVEL" value="${STACKDRIVER_LOG_FLUSH_LEVEL:-WARN}"/> <appender name="STACKDRIVER" class="org.springframework.cloud.gcp.logging.LoggingAppender"> <log>${STACKDRIVER_LOG_NAME}</log> <!-- Optional : default java.log --> <enhancer>org.springframework.cloud.gcp.logging.TraceIdLoggingEnhancer</enhancer> <flushLevel>${STACKDRIVER_LOG_FLUSH_LEVEL}</flushLevel> <!-- Optional : default ERROR --> </appender> </included>
{ "pile_set_name": "Github" }
namespace StrumpyShaderEditor { public enum TypeEnum { Float, Float2, Float3, Float4, Sampler2D, SamplerCube, Matrix } public static class TypeExtensions{ public static string ShaderString(this TypeEnum typeEnum) { switch (typeEnum) { case TypeEnum.Float: return "float"; case TypeEnum.Float2: return "float2"; case TypeEnum.Float3: return "float3"; case TypeEnum.Float4: return "float4"; case TypeEnum.Sampler2D: return "Sampler2d"; case TypeEnum.Matrix: return "float4x4"; case TypeEnum.SamplerCube: return "SamplerCube"; default: return "Invalid Type"; } } } }
{ "pile_set_name": "Github" }
<!DOCTYPE HTML> <html> <head> <style> p { float:left; white-space:pre; border:1px solid black; clear:both; } .space { padding:0 2px; } table { clear:both; } </style> </head> <body> <p> a </p> <div style="width:0"> <p> a </p> </div> <p> <span class="space">a</span> </p> <div style="width:0"> <p class="letterspace"> <span class="space">a</span> </p> </div> <table><tr> <td style="background-color:#808080;"><pre> test abcdefg hijklm nopqr stuv wxy z0 1 </pre></td> <td style="background-color:#c08080;">cell 2</td> </tr></table> </body> </html>
{ "pile_set_name": "Github" }
/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org> * @license MIT */ /* eslint-disable no-proto */ 'use strict' var base64 = require('base64-js') var ieee754 = require('ieee754') var isArray = require('isarray') exports.Buffer = Buffer exports.SlowBuffer = SlowBuffer exports.INSPECT_MAX_BYTES = 50 /** * If `Buffer.TYPED_ARRAY_SUPPORT`: * === true Use Uint8Array implementation (fastest) * === false Use Object implementation (most compatible, even IE6) * * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, * Opera 11.6+, iOS 4.2+. * * Due to various browser bugs, sometimes the Object implementation will be used even * when the browser supports typed arrays. * * Note: * * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. * * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. * * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of * incorrect length in some situations. * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they * get the Object implementation, which is slower but behaves correctly. */ Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined ? global.TYPED_ARRAY_SUPPORT : typedArraySupport() /* * Export kMaxLength after typed array support is determined. */ exports.kMaxLength = kMaxLength() function typedArraySupport () { try { var arr = new Uint8Array(1) arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }} return arr.foo() === 42 && // typed array instances can be augmented typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` } catch (e) { return false } } function kMaxLength () { return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff } function createBuffer (that, length) { if (kMaxLength() < length) { throw new RangeError('Invalid typed array length') } if (Buffer.TYPED_ARRAY_SUPPORT) { // Return an augmented `Uint8Array` instance, for best performance that = new Uint8Array(length) that.__proto__ = Buffer.prototype } else { // Fallback: Return an object instance of the Buffer class if (that === null) { that = new Buffer(length) } that.length = length } return that } /** * The Buffer constructor returns instances of `Uint8Array` that have their * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of * `Uint8Array`, so the returned instances will have all the node `Buffer` methods * and the `Uint8Array` methods. Square bracket notation works as expected -- it * returns a single octet. * * The `Uint8Array` prototype remains unmodified. */ function Buffer (arg, encodingOrOffset, length) { if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { return new Buffer(arg, encodingOrOffset, length) } // Common case. if (typeof arg === 'number') { if (typeof encodingOrOffset === 'string') { throw new Error( 'If encoding is specified then the first argument must be a string' ) } return allocUnsafe(this, arg) } return from(this, arg, encodingOrOffset, length) } Buffer.poolSize = 8192 // not used by this implementation // TODO: Legacy, not needed anymore. Remove in next major version. Buffer._augment = function (arr) { arr.__proto__ = Buffer.prototype return arr } function from (that, value, encodingOrOffset, length) { if (typeof value === 'number') { throw new TypeError('"value" argument must not be a number') } if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { return fromArrayBuffer(that, value, encodingOrOffset, length) } if (typeof value === 'string') { return fromString(that, value, encodingOrOffset) } return fromObject(that, value) } /** * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError * if value is a number. * Buffer.from(str[, encoding]) * Buffer.from(array) * Buffer.from(buffer) * Buffer.from(arrayBuffer[, byteOffset[, length]]) **/ Buffer.from = function (value, encodingOrOffset, length) { return from(null, value, encodingOrOffset, length) } if (Buffer.TYPED_ARRAY_SUPPORT) { Buffer.prototype.__proto__ = Uint8Array.prototype Buffer.__proto__ = Uint8Array if (typeof Symbol !== 'undefined' && Symbol.species && Buffer[Symbol.species] === Buffer) { // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 Object.defineProperty(Buffer, Symbol.species, { value: null, configurable: true }) } } function assertSize (size) { if (typeof size !== 'number') { throw new TypeError('"size" argument must be a number') } else if (size < 0) { throw new RangeError('"size" argument must not be negative') } } function alloc (that, size, fill, encoding) { assertSize(size) if (size <= 0) { return createBuffer(that, size) } if (fill !== undefined) { // Only pay attention to encoding if it's a string. This // prevents accidentally sending in a number that would // be interpretted as a start offset. return typeof encoding === 'string' ? createBuffer(that, size).fill(fill, encoding) : createBuffer(that, size).fill(fill) } return createBuffer(that, size) } /** * Creates a new filled Buffer instance. * alloc(size[, fill[, encoding]]) **/ Buffer.alloc = function (size, fill, encoding) { return alloc(null, size, fill, encoding) } function allocUnsafe (that, size) { assertSize(size) that = createBuffer(that, size < 0 ? 0 : checked(size) | 0) if (!Buffer.TYPED_ARRAY_SUPPORT) { for (var i = 0; i < size; ++i) { that[i] = 0 } } return that } /** * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. * */ Buffer.allocUnsafe = function (size) { return allocUnsafe(null, size) } /** * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. */ Buffer.allocUnsafeSlow = function (size) { return allocUnsafe(null, size) } function fromString (that, string, encoding) { if (typeof encoding !== 'string' || encoding === '') { encoding = 'utf8' } if (!Buffer.isEncoding(encoding)) { throw new TypeError('"encoding" must be a valid string encoding') } var length = byteLength(string, encoding) | 0 that = createBuffer(that, length) var actual = that.write(string, encoding) if (actual !== length) { // Writing a hex string, for example,
{ "pile_set_name": "Github" }
;link l 58 I 55 0 230 80 213 100 213 N 68 100 196 k_h 84 _ 25 ;not n 58 A 120 0 221 80 204 100 204 t_h 93 _ 25 ;active { 98 0 206 80 152 100 152 k_h 84 t_h 93 I 57 0 158 80 152 100 152 v 58 ;to t_h 78 u 200 0 154 80 147 100 147 _ 203 _ 1
{ "pile_set_name": "Github" }
/* * Copyright 2017 Google * * 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. */ #import <Foundation/Foundation.h> @class FIRInstallations; // A class for wrapping the interactions for retrieving client side info to be used in // request parameter for interacting with Firebase iam servers. NS_ASSUME_NONNULL_BEGIN @interface FIRIAMClientInfoFetcher : NSObject - (instancetype)initWithFirebaseInstallations:(nullable FIRInstallations *)installations; - (instancetype)init NS_UNAVAILABLE; // Fetch the up-to-date Firebase Installation ID (FID) and Firebase Installation Service (FIS) token // data. Since it involves a server interaction, completion callback is provided for receiving the // result. - (void)fetchFirebaseInstallationDataWithProjectNumber:(NSString *)projectNumber withCompletion: (void (^)(NSString *_Nullable FID, NSString *_Nullable FISToken, NSError *_Nullable error))completion; // Following are synchronous methods for fetching data - (nullable NSString *)getDeviceLanguageCode; - (nullable NSString *)getAppVersion; - (nullable NSString *)getOSVersion; - (nullable NSString *)getOSMajorVersion; - (nullable NSString *)getTimezone; - (NSString *)getIAMSDKVersion; @end NS_ASSUME_NONNULL_END
{ "pile_set_name": "Github" }
package me.saket.dank.utils; import android.graphics.Point; import android.text.Spannable; import android.text.style.ClickableSpan; import android.view.MotionEvent; import android.widget.TextView; import me.saket.bettermovementmethod.BetterLinkMovementMethod; import me.saket.dank.utils.markdown.markwon.SpoilerRevealClickListenerSpan; /** * Extension of BetterLinkMovementMethod that also tracks the coordinates of a clicked link. */ public class DankLinkMovementMethod extends BetterLinkMovementMethod { private Point clickedUrlCoordinates; public static DankLinkMovementMethod newInstance() { return new DankLinkMovementMethod(); } public Point getLastUrlClickCoordinates() { return clickedUrlCoordinates; } @Override public boolean onTouchEvent(TextView view, Spannable text, MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_UP) { // A link is potentially going to be clicked. clickedUrlCoordinates = new Point((int) event.getRawX(), (int) event.getRawY()); } return super.onTouchEvent(view, text, event); } @Override protected void highlightUrl(TextView textView, ClickableSpan clickableSpan, Spannable text) { if (clickableSpan instanceof SpoilerRevealClickListenerSpan) { return; } super.highlightUrl(textView, clickableSpan, text); } @Override protected void dispatchUrlClick(TextView textView, ClickableSpan clickableSpan) { if (clickableSpan instanceof SpoilerRevealClickListenerSpan) { clickableSpan.onClick(textView); return; } super.dispatchUrlClick(textView, clickableSpan); } @Override protected void dispatchUrlLongClick(TextView textView, ClickableSpan clickableSpan) { if (!(clickableSpan instanceof SpoilerRevealClickListenerSpan)) { super.dispatchUrlLongClick(textView, clickableSpan); } } }
{ "pile_set_name": "Github" }
// not "use strict" so we can declare global "Promise" var asap = require('asap'); if (typeof Promise === 'undefined') { Promise = require('./lib/core.js') require('./lib/es6-extensions.js') } require('./polyfill-done.js');
{ "pile_set_name": "Github" }
a 1
{ "pile_set_name": "Github" }
<annotation> <folder>widerface</folder> <filename>22--Picnic_22_Picnic_Picnic_22_68.jpg</filename> <source> <database>wider face Database</database> <annotation>PASCAL VOC2007</annotation> <image>flickr</image> <flickrid>-1</flickrid> </source> <owner> <flickrid>yanyu</flickrid> <name>yanyu</name> </owner> <size> <width>1024</width> <height>1366</height> <depth>3</depth> </size> <segmented>0</segmented> <object> <name>face</name> <pose>Unspecified</pose> <truncated>1</truncated> <difficult>0</difficult> <bndbox> <xmin>393</xmin> <ymin>806</ymin> <xmax>456</xmax> <ymax>881</ymax> </bndbox> <lm> <x1>420.75</x1> <y1>831.25</y1> <x2>445.594</x2> <y2>836.406</y2> <x3>431.531</x3> <y3>852.344</y3> <x4>417.938</x4> <y4>860.312</y4> <x5>438.094</x5> <y5>864.531</y5> <visible>0</visible> <blur>0.71</blur> </lm> <has_lm>1</has_lm> </object> <object> <name>face</name> <pose>Unspecified</pose> <truncated>1</truncated> <difficult>0</difficult> <bndbox> <xmin>487</xmin> <ymin>757</ymin> <xmax>530</xmax> <ymax>817</ymax> </bndbox> <lm> <x1>501.929</x1> <y1>781.946</y1> <x2>521.661</x2> <y2>782.326</y2> <x3>510.656</x3> <y3>786.5</y3> <x4>503.446</x4> <y4>800.161</y4> <x5>515.589</x5> <y5>799.402</y5> <visible>0</visible> <blur>0.66</blur> </lm> <has_lm>1</has_lm> </object> <object> <name>face</name> <pose>Unspecified</pose> <truncated>1</truncated> <difficult>0</difficult> <bndbox> <xmin>563</xmin> <ymin>717</ymin> <xmax>621</xmax> <ymax>787</ymax> </bndbox> <lm> <x1>566.75</x1> <y1>738.241</y1> <x2>589.29</x2> <y2>740.893</y2> <x3>571.17</x3> <y3>752.826</y3> <x4>574.263</x4> <y4>766.527</y4> <x5>588.406</x5> <y5>766.969</y5> <visible>0</visible> <blur>0.66</blur> </lm> <has_lm>1</has_lm> </object> <object> <name>face</name> <pose>Unspecified</pose> <truncated>1</truncated> <difficult>0</difficult> <bndbox> <xmin>771</xmin> <ymin>812</ymin> <xmax>815</xmax> <ymax>882</ymax> </bndbox> <lm> <x1>777.915</x1> <y1>836.335</y1> <x2>781.451</x2> <y2>838.545</y2> <x3>770.844</x3> <y3>850.92</y3> <x4>778.357</x4> <y4>862.853</y4> <x5>780.567</x5> <y5>865.504</y5> <visible>0</visible> <blur>0.63</blur> </lm> <has_lm>1</has_lm> </object> </annotation>
{ "pile_set_name": "Github" }
// +build fixtures package servers import ( "fmt" "net/http" "testing" th "github.com/rackspace/gophercloud/testhelper" "github.com/rackspace/gophercloud/testhelper/client" ) // ServerListBody contains the canned body of a servers.List response. const ServerListBody = ` { "servers": [ { "status": "ACTIVE", "updated": "2014-09-25T13:10:10Z", "hostId": "29d3c8c896a45aa4c34e52247875d7fefc3d94bbcc9f622b5d204362", "OS-EXT-SRV-ATTR:host": "devstack", "addresses": { "private": [ { "OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:7c:1b:2b", "version": 4, "addr": "10.0.0.32", "OS-EXT-IPS:type": "fixed" } ] }, "links": [ { "href": "http://104.130.131.164:8774/v2/fcad67a6189847c4aecfa3c81a05783b/servers/ef079b0c-e610-4dfb-b1aa-b49f07ac48e5", "rel": "self" }, { "href": "http://104.130.131.164:8774/fcad67a6189847c4aecfa3c81a05783b/servers/ef079b0c-e610-4dfb-b1aa-b49f07ac48e5", "rel": "bookmark" } ], "key_name": null, "image": { "id": "f90f6034-2570-4974-8351-6b49732ef2eb", "links": [ { "href": "http://104.130.131.164:8774/fcad67a6189847c4aecfa3c81a05783b/images/f90f6034-2570-4974-8351-6b49732ef2eb", "rel": "bookmark" } ] }, "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", "OS-EXT-SRV-ATTR:instance_name": "instance-0000001e", "OS-SRV-USG:launched_at": "2014-09-25T13:10:10.000000", "OS-EXT-SRV-ATTR:hypervisor_hostname": "devstack", "flavor": { "id": "1", "links": [ { "href": "http://104.130.131.164:8774/fcad67a6189847c4aecfa3c81a05783b/flavors/1", "rel": "bookmark" } ] }, "id": "ef079b0c-e610-4dfb-b1aa-b49f07ac48e5", "security_groups": [ { "name": "default" } ], "OS-SRV-USG:terminated_at": null, "OS-EXT-AZ:availability_zone": "nova", "user_id": "9349aff8be7545ac9d2f1d00999a23cd", "name": "herp", "created": "2014-09-25T13:10:02Z", "tenant_id": "fcad67a6189847c4aecfa3c81a05783b", "OS-DCF:diskConfig": "MANUAL", "os-extended-volumes:volumes_attached": [], "accessIPv4": "", "accessIPv6": "", "progress": 0, "OS-EXT-STS:power_state": 1, "config_drive": "", "metadata": {} }, { "status": "ACTIVE", "updated": "2014-09-25T13:04:49Z", "hostId": "29d3c8c896a45aa4c34e52247875d7fefc3d94bbcc9f622b5d204362", "OS-EXT-SRV-ATTR:host": "devstack", "addresses": { "private": [ { "OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:9e:89:be", "version": 4, "addr": "10.0.0.31", "OS-EXT-IPS:type": "fixed" } ] }, "links": [ { "href": "http://104.130.131.164:8774/v2/fcad67a6189847c4aecfa3c81a05783b/servers/9e5476bd-a4ec-4653-93d6-72c93aa682ba", "rel": "self" }, { "href": "http://104.130.131.164:8774/fcad67a6189847c4aecfa3c81a05783b/servers/9e5476bd-a4ec-4653-93d6-72c93aa682ba", "rel": "bookmark" } ], "key_name": null, "image": { "id": "f90f6034-2570-4974-8351-6b49732ef2eb", "links": [ { "href": "http://104.130.131.164:8774/fcad67a6189847c4aecfa3c81a05783b/images/f90f6034-2570-4974-8351-6b49732ef2eb", "rel": "bookmark" } ] }, "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", "OS-EXT-SRV-ATTR:instance_name": "instance-0000001d", "OS-SRV-USG:launched_at": "2014-09-25T13:04:49.000000", "OS-EXT-SRV-ATTR:hypervisor_hostname": "devstack", "flavor": { "id": "1", "links": [ { "href": "http://104.130.131.164:8774/fcad67a6189847c4aecfa3c81a05783b/flavors/1", "rel": "bookmark" } ] }, "id": "9e5476bd-a4ec-4653-93d6-72c93aa682ba", "security_groups": [ { "name": "default" } ], "OS-SRV-USG:terminated_at": null, "OS-EXT-AZ:availability_zone": "nova", "user_id": "9349aff8be7545ac9d2f1d00999a23cd", "name": "derp", "created": "2014-09-25T13:04:41Z", "tenant_id": "fcad67a6189847c4aecfa3c81a05783b", "OS-DCF:diskConfig": "MANUAL", "os-extended-volumes:volumes_attached": [], "accessIPv4": "", "accessIPv6": "", "progress": 0, "OS-EXT-STS:power_state": 1, "config_drive": "", "metadata": {} } ] } ` // SingleServerBody is the canned body of a Get request on an existing server. const SingleServerBody = ` { "server": {
{ "pile_set_name": "Github" }
/** @header Uniform defines the type and data associated with a custom fragment shader, SKShader. @copyright 2013 Apple, Inc. All rights reserved. */ #import <SpriteKit/SpriteKitBase.h> #import <SpriteKit/SKTexture.h> #import <GLKit/GLKMath.h> typedef NS_ENUM(NSInteger, SKUniformType) { SKUniformTypeNone = 0, SKUniformTypeFloat = 1, SKUniformTypeFloatVector2 = 2, SKUniformTypeFloatVector3 = 3, SKUniformTypeFloatVector4 = 4, SKUniformTypeFloatMatrix2 = 5, SKUniformTypeFloatMatrix3 = 6, SKUniformTypeFloatMatrix4 = 7, SKUniformTypeTexture = 8, } NS_ENUM_AVAILABLE(10_10, 8_0); NS_ASSUME_NONNULL_BEGIN NS_CLASS_AVAILABLE(10_10, 8_0) SK_EXPORT @interface SKUniform : NSObject <NSCopying, NSCoding> /** Create a shader uniform with a given name. @param name the name of the shader uniform. */ + (instancetype)uniformWithName:(NSString *)name; /** Create a shader uniform with a given name, and texture data @param name the name of the shader uniform. @param texture the texture data associated with this uniform. */ + (instancetype)uniformWithName:(NSString *)name texture:(SKTexture*)texture; /** Create a shader uniform with a given name, and a float value @param name the name of the shader uniform. @param value the floating point value associated with this uniform. */ + (instancetype)uniformWithName:(NSString *)name float:(float)value; /** Create a shader uniform with a given name, and a float vector2 value @param name the name of the shader uniform. @param value the float vector2 value associated with this uniform. */ + (instancetype)uniformWithName:(NSString *)name floatVector2:(GLKVector2)value; /** Create a shader uniform with a given name, and a float vector3 value @param name the name of the shader uniform. @param value the float vector3 value associated with this uniform. */ + (instancetype)uniformWithName:(NSString *)name floatVector3:(GLKVector3)value; /** Create a shader uniform with a given name, and a float vector4 value @param name the name of the shader uniform. @param value the float vector4 value associated with this uniform. */ + (instancetype)uniformWithName:(NSString *)name floatVector4:(GLKVector4)value; /** Create a shader uniform with a given name, and a 2x2 matrix value @param name the name of the shader uniform. @param value the 2x2 matrix value associated with this uniform. */ + (instancetype)uniformWithName:(NSString *)name floatMatrix2:(GLKMatrix2)value; /** Create a shader uniform with a given name, and a 3x3 matrix value @param name the name of the shader uniform. @param value the 3x3 matrix value associated with this uniform. */ + (instancetype)uniformWithName:(NSString *)name floatMatrix3:(GLKMatrix3)value; /** Create a shader uniform with a given name, and a 4x4 matrix value @param name the name of the shader uniform. @param value the 4x4 matrix value associated with this uniform. */ + (instancetype)uniformWithName:(NSString *)name floatMatrix4:(GLKMatrix4)value; /* The name by which this uniform will be referenced in a shader */ @property (nonatomic, readonly) NSString *name; /* Once created, a uniform is locked to a specific type, you may only access the property of this type */ @property (nonatomic, readonly) SKUniformType uniformType; /* Access to the texture data associated with the current uniform */ @property (nonatomic, retain, nullable) SKTexture *textureValue; /* Access to the float value associated with the current uniform */ @property float floatValue; /* Access to the float vector 2 value associated with the current uniform */ @property GLKVector2 floatVector2Value; /* Access to the float vector 3 value associated with the current uniform */ @property GLKVector3 floatVector3Value; /* Access to the float vector 4 value associated with the current uniform */ @property GLKVector4 floatVector4Value; /* Access to the 2x2 matrix value associated with the current uniform */ @property GLKMatrix2 floatMatrix2Value; /* Access to the 3x3 matrix value associated with the current uniform */ @property GLKMatrix3 floatMatrix3Value; /* Access to the 4x4 matrix value associated with the current uniform */ @property GLKMatrix4 floatMatrix4Value; - (instancetype)initWithName:(NSString *)name; - (instancetype)initWithName:(NSString *)name texture:(nullable SKTexture*)texture; - (instancetype)initWithName:(NSString *)name float:(float)value; - (instancetype)initWithName:(NSString *)name floatVector2:(GLKVector2)value; - (instancetype)initWithName:(NSString *)name floatVector3:(GLKVector3)value; - (instancetype)initWithName:(NSString *)name floatVector4:(GLKVector4)value; - (instancetype)initWithName:(NSString *)name floatMatrix2:(GLKMatrix2)value; - (instancetype)initWithName:(NSString *)name floatMatrix3:(GLKMatrix3)value; - (instancetype)initWithName:(NSString *)name floatMatrix4:(GLKMatrix4)value; @end NS_ASSUME_NONNULL_END
{ "pile_set_name": "Github" }
![Vector Icons for React Native](https://cloud.githubusercontent.com/assets/378279/12009887/33f4ae1c-ac8d-11e5-8666-7a87458753ee.png) [![Travis](https://img.shields.io/travis/oblador/react-native-vector-icons.svg)](https://travis-ci.org/oblador/react-native-vector-icons) [![npm](https://img.shields.io/npm/v/react-native-vector-icons.svg)](https://npmjs.com/package/react-native-vector-icons) [![npm](https://img.shields.io/npm/dm/react-native-vector-icons.svg)](https://npmjs.com/package/react-native-vector-icons) Perfect for buttons, logos and nav/tab bars. Easy to extend, style and integrate into your project. ## Table of Contents - [Bundled Icon Sets](#bundled-icon-sets) - [Installation](#installation) - [iOS](#ios) - [Android](#android) - [OSX](#osx-via-react-native-desktop) - [Windows](#windows-via-react-native-windows) - [Web](#web-with-webpack) - [Upgrading](#upgrading) - [Icon Component](#icon-component) - [Icon.Button Component](#iconbutton-component) - [Usage as PNG image/source object](#usage-as-png-imagesource-object) - [Usage with TabBarIOS](#usage-with-tabbarios) - [Multi-style fonts](#multi-style-fonts) - [Custom Fonts](#custom-fonts) - [Animation](#animation) - [Examples](#examples) - [Generating your own icon set from a CSS file](#generating-your-own-icon-set-from-a-css-file) - [Changelog](#changelog) - [Troubleshooting](#troubleshooting) - [License](#license) ## Sponsoring If you find the library useful, please consider [sponsoring](https://github.com/sponsors/oblador). Things I have planned is to split up the repo into a monorepo, that would enable individual versioning of icon sets, better performance, smaller bundle and easier for the community to publish their own. ## Bundled Icon Sets [Browse all](https://oblador.github.io/react-native-vector-icons/). - [`AntDesign`](https://ant.design/) by AntFinance (**297** icons) - [`Entypo`](http://entypo.com) by Daniel Bruce (**411** icons) - [`EvilIcons`](http://evil-icons.io) by Alexander Madyankin & Roman Shamin (v1.10.1, **70** icons) - [`Feather`](http://feathericons.com) by Cole Bemis & Contributors (v4.28.0, **285** icons) - [`FontAwesome`](http://fortawesome.github.io/Font-Awesome/icons/) by Dave Gandy (v4.7.0, **675** icons) - [`FontAwesome 5`](https://fontawesome.com) by Fonticons, Inc. (v5.13.0, 1588 (free) **7842** (pro) icons) - [`Fontisto`](https://github.com/kenangundogan/fontisto) by Kenan Gündoğan (v3.0.4, **615** icons) - [`Foundation`](http://zurb.com/playground/foundation-icon-fonts-3) by ZURB, Inc. (v3.0, **283** icons) - [`Ionicons`](https://ionicons.com/) by Iconic Framework (v5.0.1, **1227** icons) - [`MaterialIcons`](https://www.google.com/design/icons/) by Google, Inc. (v4.0.0, **1547** icons) - [`MaterialCommunityIcons`](https://materialdesignicons.com/) by MaterialDesignIcons.com (v5.3.45, **5346** icons) - [`Octicons`](http://octicons.github.com) by Github, Inc. (v8.4.1, **184** icons) - [`Zocial`](http://zocial.smcllns.com/) by Sam Collins (v1.0, **100** icons) - [`SimpleLineIcons`](https://simplelineicons.github.io/) by Sabbir & Contributors (v2.4.1, **189** icons) ## Installation 1. Run: `$ npm install --save react-native-vector-icons` 2. For each platform (iOS/Android/Windows) you plan to use, follow one of the options for the corresponding platform. 3. If you intend to use FontAwesome 5, check out [`this guide`](FONTAWESOME5.md) to get you started. ### iOS #### Option: Manually If you want to use any of the bundled icons, you need to add the icon fonts to your Xcode project. Just follow these steps: - Browse to `node_modules/react-native-vector-icons` and drag the folder `Fonts` (or just the ones you want) to your project in Xcode. **Make sure your app is checked under "Add to targets" and that "Create groups" is checked if you add the whole folder**. Not familiar with Xcode? Try [this article](https://medium.com/@vimniky/how-to-use-vector-icons-in-your-react-native-project-8212ac6a8f06) - Edit `Info.plist` and add a property called **Fonts provided by application** (or `UIAppFonts` if Xcode won't autocomplete/not using Xcode) and type in the files you just added. It will look something like this: ![XCode screenshot](https://cloud.githubusercontent.com/assets/378279/12421498/2db1f93a-be88-11e5-89c8-2e563ba6251a.png) <details><summary>List of all available fonts to copy & paste in info.plist</summary> ```xml <key>UIAppFonts</key> <array> <string>AntDesign.ttf</string> <string>Entypo.ttf</string> <string>EvilIcons.ttf</string> <string>Feather.ttf</string> <string>FontAwesome.ttf</string> <string>FontAwesome5_Brands.ttf</string> <string>FontAwesome5_Regular.ttf</string> <string>FontAwesome5_Solid.ttf</string> <string>Foundation.ttf</string> <string>Ionicons.ttf</string> <string>MaterialIcons.ttf</string> <string>MaterialCommunityIcons.ttf</string> <string>SimpleLineIcons.ttf</string> <string>Octicons.ttf</string> <string>Zocial.ttf</string> <string>Fontisto.ttf</string> </array> ``` </details> <br> _Note: you need to recompile your project after adding new fonts, also ensure that they also appear under **Copy Bundle Resources** in **Build Phases**._ If you want to use the TabBar/NavigatorIOS integration or use `getImageSource`/`getImageSourceSync`, then you need to add `RNVectorIcons.xcodeproj` to **Libraries** and add `libRNVectorIcons.a` to **Link Binary With Libraries** under **Build Phases**. [More info and screenshots about how to do this is available in the React Native documentation](https://reactnative.dev/docs/linking-libraries-ios.html#content). #### Option: With `react-native link` `$ react-native link react-native-vector-icons` _Note: Some users are having trouble using this method, try one of the others if you are too._ #### Option: With [CocoaPods](https://cocoapods.org/) Add the following to your `Podfile` and run `pod update`: ``` pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons' ``` Edit `Info.plist`
{ "pile_set_name": "Github" }
# ------------------------------------------------------------------------------ # NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "update_multiarch.sh" # # PLEASE DO NOT EDIT IT DIRECTLY. # ------------------------------------------------------------------------------ # # 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 # # https://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. # FROM mcr.microsoft.com/windows/servercore:1909 # $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] ENV JAVA_VERSION jdk8u RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u-2020-09-26-11-07/OpenJDK8U-jre_x64_windows_openj9_2020-09-26-11-07.msi ...'); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ wget https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u-2020-09-26-11-07/OpenJDK8U-jre_x64_windows_openj9_2020-09-26-11-07.msi -O 'openjdk.msi'; \ Write-Host ('Verifying sha256 (6da5207d7a068baf849bd7af591a915425bf5010e63652f9be45bdea3158a81f) ...'); \ if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '6da5207d7a068baf849bd7af591a915425bf5010e63652f9be45bdea3158a81f') { \ Write-Host 'FAILED!'; \ exit 1; \ }; \ \ New-Item -ItemType Directory -Path C:\temp | Out-Null; \ \ Write-Host 'Installing using MSI ...'; \ Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \ Remove-Item -Path C:\temp -Recurse | Out-Null; \ Write-Host 'Removing openjdk.msi ...'; \ Remove-Item openjdk.msi -Force ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+UseContainerSupport -XX:+IdleTuningCompactOnIdle -XX:+IdleTuningGcOnIdle"
{ "pile_set_name": "Github" }
fileFormatVersion: 2 guid: 973c73f34132a1a4bbad8414c56117de folderAsset: yes timeCreated: 1435661090 licenseType: Store DefaultImporter: userData: assetBundleName: assetBundleVariant:
{ "pile_set_name": "Github" }
/* Public key algorithm internals * * See Documentation/crypto/asymmetric-keys.txt * * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public Licence * as published by the Free Software Foundation; either version * 2 of the Licence, or (at your option) any later version. */ #include <crypto/public_key.h> extern struct asymmetric_key_subtype public_key_subtype; /* * Public key algorithm definition. */ struct public_key_algorithm { const char *name; u8 n_pub_mpi; /* Number of MPIs in public key */ u8 n_sec_mpi; /* Number of MPIs in secret key */ u8 n_sig_mpi; /* Number of MPIs in a signature */ int (*verify_signature)(const struct public_key *key, const struct public_key_signature *sig); }; extern const struct public_key_algorithm RSA_public_key_algorithm;
{ "pile_set_name": "Github" }
ARG ARCH FROM ${ARCH}ubuntu:bionic WORKDIR /workdir RUN sed -i s,http://archive.ubuntu.com/ubuntu/,mirror://mirrors.ubuntu.com/mirrors.txt, /etc/apt/sources.list \ && apt-get update \ && apt-get -qyy --no-install-recommends install git gcc-4.8 gcc-5 gcc-6 gcc-7 gcc-8 clang-3.9 clang-4.0 clang-5.0 clang-6.0 clang-7 gcc-mingw-w64-x86-64 gcc-mingw-w64-i686 make ca-certificates autoconf automake libtool pkg-config libhdf5-dev \ && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /workdir/* RUN apt-get update \ && apt-get -qyy --install-recommends install gcc-arm-linux-gnueabi \ && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /workdir/*
{ "pile_set_name": "Github" }
/* BEGIN_COMMON_COPYRIGHT_HEADER * (c)LGPL2+ * * LXQt - a lightweight, Qt based, desktop toolset * https://lxqt.org * * Copyright: 2013 Razor team * Authors: * Alexander Sokoloff <sokoloff.a@gmail.com> * * This program or 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., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA * * END_COMMON_COPYRIGHT_HEADER */ #ifndef LXQT_PLUGIN_MOUNT_DEVICEACTION_INFO_H #define LXQT_PLUGIN_MOUNT_DEVICEACTION_INFO_H #include "deviceaction.h" #include <QWidget> #include <QTimer> class Popup; class DeviceActionInfo : public DeviceAction { Q_OBJECT public: explicit DeviceActionInfo(LXQtMountPlugin *plugin, QObject *parent = nullptr); virtual ActionId Type() const throw () { return ActionInfo; } protected: void doDeviceAdded(Solid::Device device); void doDeviceRemoved(Solid::Device device); private: void showMessage(const QString &text); }; #endif // DEVICEACTION_INFO_H
{ "pile_set_name": "Github" }
try { Object.assign(global, require('../build.config')); // tslint:disable-next-line const modules = require('./modules').default; (async () => { await modules.createApp(module); })(); } catch (e) { if (typeof ErrorUtils !== 'undefined') { (ErrorUtils as any).reportFatalError(e); } else { console.error(e); } }
{ "pile_set_name": "Github" }
ks.type = "sparql" ks.url = "http://live.dbpedia.org/sparql" ks.defaultGraphURIs = {"http://dbpedia.org"} alg.type = "objectproperty range learner" alg.source = component:ks alg.propertyToDescribe = "http://dbpedia.org/ontology/leader"
{ "pile_set_name": "Github" }
/* Soot - a Java Optimization Framework * Copyright (C) 2012 Michael Markert, Frank Hartmann * * (c) 2012 University of Luxembourg - Interdisciplinary Centre for * Security Reliability and Trust (SnT) - All rights reserved * Alexandre Bartel * * * 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 soot.dexpler.instructions; import org.jf.dexlib2.iface.instruction.Instruction; import org.jf.dexlib2.iface.instruction.formats.Instruction11x; import soot.Local; import soot.dexpler.Debug; import soot.dexpler.DexBody; import soot.dexpler.IDalvikTyper; import soot.dexpler.typing.DalvikTyper; import soot.jimple.Jimple; import soot.jimple.ReturnStmt; public class ReturnInstruction extends DexlibAbstractInstruction { ReturnStmt returnStmt = null; public ReturnInstruction (Instruction instruction, int codeAdress) { super(instruction, codeAdress); } public void jimplify (DexBody body) { Instruction11x returnInstruction = (Instruction11x) this.instruction; Local l = body.getRegisterLocal(returnInstruction.getRegisterA()); returnStmt = Jimple.v().newReturnStmt(l); setUnit(returnStmt); addTags(returnStmt); body.add(returnStmt); if (IDalvikTyper.ENABLE_DVKTYPER) { Debug.printDbg(IDalvikTyper.DEBUG, "constraint: "+ returnStmt); DalvikTyper.v().setType(returnStmt.getOpBox(), body.getBody().getMethod().getReturnType(), true); } } }
{ "pile_set_name": "Github" }
from conans.errors import ConanException from conans.util.config_parser import ConfigParser class ConanFileTextLoader(object): """Parse a conanfile.txt file""" def __init__(self, input_text): # Prefer composition over inheritance, the __getattr__ was breaking things self._config_parser = ConfigParser(input_text, ["requires", "generators", "options", "imports", "build_requires"], parse_lines=True) @property def requirements(self): """returns a list of requires EX: "OpenCV/2.4.10@phil/stable" """ return [r.strip() for r in self._config_parser.requires.splitlines()] @property def build_requirements(self): """returns a list of build_requires EX: "OpenCV/2.4.10@phil/stable" """ return [r.strip() for r in self._config_parser.build_requires.splitlines()] @property def options(self): return self._config_parser.options @property def _import_parameters(self): def _parse_args(param_string): root_package, ignore_case, folder, excludes, keep_path = None, False, False, None, True params = param_string.split(",") params = [p.strip() for p in params if p.strip()] for param in params: try: var, value = param.split("=") except ValueError: raise ConanException("Wrong imports argument '%s'. " "Need a 'arg=value' pair." % param) var = var.strip() value = value.strip() if var == "root_package": root_package = value elif var == "ignore_case": ignore_case = (value.lower() == "true") elif var == "folder": folder = (value.lower() == "true") elif var == "excludes": excludes = value.split() elif var == "keep_path": keep_path = (value.lower() == "true") else: raise Exception("Invalid imports. Unknown argument %s" % var) return root_package, ignore_case, folder, excludes, keep_path def _parse_import(line): try: pair = line.split("->", 1) source = pair[0].strip().split(',', 1) dest = pair[1].strip() src, pattern = source[0].strip(), source[1].strip() return pattern, dest, src except Exception: raise ConanException("Wrong imports line: %s\n" "Use syntax: path, pattern -> local-folder" % line) ret = [] local_install_text = self._config_parser.imports for line in local_install_text.splitlines(): # discard blanks, comments, and discard trailing comments line = line.strip() if not line or line.startswith("#"): continue line = line.split("#", 1)[0] invalid_line_msg = "Invalid imports line: %s\nEX: OpenCV/lib, * -> ./lib" % line if line.startswith("/") or line.startswith(".."): raise ConanException("%s\n%s" % (invalid_line_msg, "Import's paths can't begin with '/' or '..'")) try: tokens = line.rsplit("@", 1) if len(tokens) > 1: line = tokens[0] params = tokens[1] else: params = "" root_package, ignore_case, folder, excludes, keep_path = _parse_args(params) pattern, dest, src = _parse_import(line) ret.append((pattern, dest, src, root_package, folder, ignore_case, excludes, keep_path)) except Exception as e: raise ConanException("%s\n%s" % (invalid_line_msg, str(e))) return ret @property def generators(self): return self._config_parser.generators.splitlines() def imports_method(self, conan_file): parameters = self._import_parameters def imports(): for import_params in parameters: conan_file.copy(*import_params) return imports
{ "pile_set_name": "Github" }
// // HomeRowReminderTests.swift // DuckDuckGo // // Copyright © 2018 DuckDuckGo. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // import XCTest @testable import Core @testable import DuckDuckGo class HomeRowReminderTests: XCTestCase { var storage: MockHomeRowReminderStorage! override func setUp() { storage = MockHomeRowReminderStorage() } func testWhenFeatureFirstAccessedThenDateIsStored() { let feature = HomeRowReminder(storage: storage) _ = feature.showNow(isDefaultBrowserSupported: false) XCTAssertNotNil(storage.firstAccessDate) } func testWhenTimeHasElapseAndAlreadyShownThenDontShow() { setReminderTimeElapsed() let feature = HomeRowReminder(storage: storage) feature.setShown() XCTAssertFalse(feature.showNow(isDefaultBrowserSupported: false)) } func testWhenIsNewAndTimeHasElapsedThenShow() { setReminderTimeElapsed() let feature = HomeRowReminder(storage: storage) XCTAssertTrue(feature.showNow(isDefaultBrowserSupported: false)) } func testWhenIsNewAndTimeNotElapsedThenDontShow() { let feature = HomeRowReminder(storage: storage) XCTAssertFalse(feature.showNow(isDefaultBrowserSupported: false)) } private func setReminderTimeElapsed() { let threeAndABitDaysAgo = -(60 * 60 * 24 * HomeRowReminder.Constants.reminderTimeInDays * 1.1) storage.firstAccessDate = Date(timeIntervalSinceNow: threeAndABitDaysAgo) } } class MockHomeRowReminderStorage: HomeRowReminderStorage { var firstAccessDate: Date? var shown: Bool = false }
{ "pile_set_name": "Github" }
@REM ---------------------------------------------------------------------------- @REM Licensed to the Apache Software Foundation (ASF) under one @REM or more contributor license agreements. See the NOTICE file @REM distributed with this work for additional information @REM regarding copyright ownership. The ASF licenses this file @REM to you under the Apache License, Version 2.0 (the @REM "License"); you may not use this file except in compliance @REM with the License. You may obtain a copy of the License at @REM @REM https://www.apache.org/licenses/LICENSE-2.0 @REM @REM Unless required by applicable law or agreed to in writing, @REM software distributed under the License is distributed on an @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @REM KIND, either express or implied. See the License for the @REM specific language governing permissions and limitations @REM under the License. @REM ---------------------------------------------------------------------------- @REM ---------------------------------------------------------------------------- @REM Maven2 Start Up Batch script @REM @REM Required ENV vars: @REM JAVA_HOME - location of a JDK home dir @REM @REM Optional ENV vars @REM M2_HOME - location of maven2's installed home dir @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven @REM e.g. to debug Maven itself, use @REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files @REM ---------------------------------------------------------------------------- @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' @echo off @REM set title of command window title %0 @REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% @REM set %HOME% to equivalent of $HOME if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") @REM Execute a user defined script before this one if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre @REM check for pre script, once with legacy .bat ending and once with .cmd ending if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" :skipRcPre @setlocal set ERROR_CODE=0 @REM To isolate internal variables from possible post scripts, we use another setlocal @setlocal @REM ==== START VALIDATION ==== if not "%JAVA_HOME%" == "" goto OkJHome echo. echo Error: JAVA_HOME not found in your environment. >&2 echo Please set the JAVA_HOME variable in your environment to match the >&2 echo location of your Java installation. >&2 echo. goto error :OkJHome if exist "%JAVA_HOME%\bin\java.exe" goto init echo. echo Error: JAVA_HOME is set to an invalid directory. >&2 echo JAVA_HOME = "%JAVA_HOME%" >&2 echo Please set the JAVA_HOME variable in your environment to match the >&2 echo location of your Java installation. >&2 echo. goto error @REM ==== END VALIDATION ==== :init @REM Find the project base dir, i.e. the directory that contains the folder ".mvn". @REM Fallback to current working directory if not found. set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir set EXEC_DIR=%CD% set WDIR=%EXEC_DIR% :findBaseDir IF EXIST "%WDIR%"\.mvn goto baseDirFound cd .. IF "%WDIR%"=="%CD%" goto baseDirNotFound set WDIR=%CD% goto findBaseDir :baseDirFound set MAVEN_PROJECTBASEDIR=%WDIR% cd "%EXEC_DIR%" goto endDetectBaseDir :baseDirNotFound set MAVEN_PROJECTBASEDIR=%EXEC_DIR% cd "%EXEC_DIR%" :endDetectBaseDir IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig @setlocal EnableExtensions EnableDelayedExpansion for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% :endReadAdditionalConfig SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO ( IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B ) @REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central @REM This allows using the maven wrapper in projects that prohibit checking in binary data. if exist %WRAPPER_JAR% ( echo Found %WRAPPER_JAR% ) else ( echo Couldn't find %WRAPPER_JAR%, downloading it ... echo Downloading from: %DOWNLOAD_URL% powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')" echo Finished downloading %WRAPPER_JAR% ) @REM End of extension %MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* if ERRORLEVEL 1 goto error goto end :error set ERROR_CODE=1 :end @endlocal & set ERROR_CODE=%ERROR_CODE% if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost @REM check for post script, once with legacy .bat ending and once with .cmd ending if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" :skipRcPost @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' if "%MAVEN_BATCH_PAUSE%" == "on" pause if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% exit /B %ERROR_CODE%
{ "pile_set_name": "Github" }
package com.earth2me.essentials.storage; import net.ess3.api.IEssentials; import org.bukkit.Bukkit; import java.io.File; import java.io.FileNotFoundException; import java.io.PrintWriter; import java.util.logging.Level; public abstract class AbstractDelayedYamlFileWriter implements Runnable { private final transient File file; public AbstractDelayedYamlFileWriter(IEssentials ess, File file) { this.file = file; ess.runTaskAsynchronously(this); } public abstract StorageObject getObject(); @Override public void run() { PrintWriter pw = null; try { final StorageObject object = getObject(); final File folder = file.getParentFile(); if (!folder.exists()) { folder.mkdirs(); } pw = new PrintWriter(file); new YamlStorageWriter(pw).save(object); } catch (FileNotFoundException ex) { Bukkit.getLogger().log(Level.SEVERE, file.toString(), ex); } finally { onFinish(); if (pw != null) { pw.close(); } } } public abstract void onFinish(); }
{ "pile_set_name": "Github" }
export * from "./cosmos-hub-mainnet.js"
{ "pile_set_name": "Github" }
# Define working variables $octopusURL = "https://youroctourl" $octopusAPIKey = "API-YOURAPIKEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $projectName = "MyProject" $librarySetName = "MyLibrarySet" try { # Get space $space = (Invoke-RestMethod -Method Get -Uri "$octopusURL/api/spaces/all" -Headers $header) | Where-Object {$_.Name -eq $spaceName} # Get project $project = (Invoke-RestMethod -Method Get -Uri "$octopusURL/api/$($space.Id)/projects/all" -Headers $header) | Where-Object {$_.Name -eq $projectName} # Get library set $librarySet = (Invoke-RestMethod -Method Get -Uri "$octopusURL/api/$($space.Id)/libraryvariablesets/all" -Headers $header) | Where-Object {$_.Name -eq $librarySetName} # Add the libarary set $project.IncludedLibraryVariableSetIds += $librarySet.Id # Update the project Invoke-RestMethod -Method Put -Uri "$octopusURL/api/$($space.Id)/projects/$($project.Id)" -Headers $header -Body ($project | ConvertTo-Json -Depth 10) } catch { Write-Host $_.Exception.Message }
{ "pile_set_name": "Github" }
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchdefinition.processing; import com.yahoo.document.DataType; import com.yahoo.document.Field; import com.yahoo.document.ReferenceDataType; import com.yahoo.searchdefinition.DocumentGraphValidator; import com.yahoo.searchdefinition.Search; import com.yahoo.searchdefinition.SearchBuilder; import com.yahoo.searchdefinition.document.SDDocumentType; import com.yahoo.searchdefinition.parser.ParseException; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import static org.hamcrest.Matchers.instanceOf; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertThat; /** * @author bjorncs */ public class ReferenceFieldTestCase { @Rule public final ExpectedException exceptionRule = ExpectedException.none(); @Test public void reference_fields_are_parsed_from_search_definition() throws ParseException { SearchBuilder builder = new SearchBuilder(); String campaignSdContent = "search campaign {\n" + " document campaign {\n" + " }\n" + "}"; String salespersonSdContent = "search salesperson {\n" + " document salesperson {\n" + " }\n" + "}"; String adSdContent = "search ad {\n" + " document ad {\n" + " field campaign_ref type reference<campaign> { indexing: attribute }\n" + " field salesperson_ref type reference<salesperson> { indexing: attribute }\n" + " }\n" + "}"; builder.importString(campaignSdContent); builder.importString(salespersonSdContent); builder.importString(adSdContent); builder.build(); Search search = builder.getSearch("ad"); assertSearchContainsReferenceField("campaign_ref", "campaign", search.getDocument()); assertSearchContainsReferenceField("salesperson_ref", "salesperson", search.getDocument()); } @Test public void cyclic_document_dependencies_are_detected() throws ParseException { SearchBuilder builder = new SearchBuilder(); String campaignSdContent = "search campaign {\n" + " document campaign {\n" + " field ad_ref type reference<ad> { indexing: attribute }\n" + " }\n" + "}"; String adSdContent = "search ad {\n" + " document ad {\n" + " field campaign_ref type reference<campaign> { indexing: attribute }\n" + " }\n" + "}"; builder.importString(campaignSdContent); builder.importString(adSdContent); exceptionRule.expect(DocumentGraphValidator.DocumentGraphException.class); exceptionRule.expectMessage("Document dependency cycle detected: campaign->ad->campaign."); builder.build(); } private static void assertSearchContainsReferenceField(String expectedFieldname, String referencedDocType, SDDocumentType documentType) { Field field = documentType.getDocumentType().getField(expectedFieldname); assertNotNull("Field does not exist in document type: " + expectedFieldname, field); DataType dataType = field.getDataType(); assertThat(dataType, instanceOf(ReferenceDataType.class)); ReferenceDataType refField = (ReferenceDataType) dataType; assertEquals(referencedDocType, refField.getTargetType().getName()); } }
{ "pile_set_name": "Github" }
<?php declare(strict_types=1); // @codeCoverageIgnore use Evenement\EventEmitterInterface; use Peridot\Console\Environment; use Peridot\Reporter\CodeCoverage\AbstractCodeCoverageReporter; use Peridot\Reporter\CodeCoverageReporters; use Recoil\Dev\Peridot\Plugin; use Recoil\ReferenceKernel\ReferenceKernel; require __DIR__ . '/vendor/autoload.php'; return function (EventEmitterInterface $emitter) { (new CodeCoverageReporters($emitter))->register(); Plugin::install($emitter, function () { return ReferenceKernel::create(); }); $emitter->on('peridot.start', function (Environment $environment) { $environment->getDefinition()->getArgument('path')->setDefault('test/suite'); }); $emitter->on('code-coverage.start', function (AbstractCodeCoverageReporter $reporter) { $reporter->addDirectoryToWhitelist(__DIR__ . '/src'); }); };
{ "pile_set_name": "Github" }
void test(bool x) { if (x) {} // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:2:7 %s | FileCheck %s // CHECK: PREFERRED-TYPE: _Bool while (x) {} // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:6:10 %s | FileCheck %s for (; x;) {} // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:9:10 %s | FileCheck %s // FIXME(ibiryukov): the condition in do-while is parsed as expression, so we // fail to detect it should be converted to bool. // do {} while (x); }
{ "pile_set_name": "Github" }
Alex Chapman Daniel Ehrenberg
{ "pile_set_name": "Github" }
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Controls="clr-namespace:System.Windows.Controls"> <Style TargetType="{x:Type Controls:EditTextBox}"> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/> <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/> <Setter Property="BorderBrush" Value="Black"/> <Setter Property="BorderThickness" Value="0"/> <Setter Property="Padding" Value="1"/> <Setter Property="AllowDrop" Value="true"/> <Setter Property="FocusVisualStyle" Value="{x:Null}"/> <Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TextBox}"> <Border Name="Bd" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> <ScrollViewer Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Top"/> </Border> <ControlTemplate.Triggers> <Trigger Property="IsEnabled" Value="false"> <Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> </ResourceDictionary>
{ "pile_set_name": "Github" }
require 'bundler/setup' require 'bundler/gem_tasks' require 'rake/testtask' require 'yard' require 'llvm/version' require 'llvm/config' YARD::Rake::YardocTask.new do |t| yardlib = File.join(File.dirname(__FILE__), "yardlib/llvm.rb") t.options = %W[-e #{yardlib} --no-private] t.files = Dir['lib/**/*.rb'] end Rake::TestTask.new do |t| t.libs = %w(test) t.test_files = FileList["test/**/*_test.rb"] end desc 'Regenerate FFI bindings' task :generate_ffi do require 'ffi_gen' mappings = { # Core 'core_ffi.rb' => %w(Support.h Core.h), 'core/bitcode_ffi.rb' => %w(BitReader.h BitWriter.h), # Transformations 'analysis_ffi.rb' => %w(Analysis.h), 'transforms/ipo_ffi.rb' => %w(Transforms/IPO.h), 'transforms/scalar_ffi.rb' => %w(Transforms/Scalar.h), 'transforms/vectorize_ffi.rb' => %w(Transforms/Vectorize.h), 'transforms/builder_ffi.rb' => %w(Transforms/PassManagerBuilder.h), # Code generation 'target_ffi.rb' => %w(Target.h TargetMachine.h), 'linker_ffi.rb' => %w(Linker.h), 'execution_engine_ffi.rb' => %w(ExecutionEngine.h), } mappings.each do |ruby_file, headers| FFIGen.generate( module_name: 'LLVM::C', ffi_lib: ["libLLVM-#{LLVM::LLVM_VERSION}.so.1", "LLVM-#{LLVM::LLVM_VERSION}"], headers: headers.map { |header| "llvm-c/#{header}" }, cflags: LLVM::CONFIG::CFLAGS.split(/\s/), prefixes: %w(LLVM), output: "lib/llvm/#{ruby_file}" ) end end task :default => [:test]
{ "pile_set_name": "Github" }
package com.shreyaspatil.MaterialNavigationDrawer.example.ui.home import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.TextView import androidx.fragment.app.Fragment import androidx.lifecycle.Observer import androidx.lifecycle.ViewModelProviders import com.shreyaspatil.MaterialNavigationDrawer.example.R class HomeFragment : Fragment() { private lateinit var homeViewModel: HomeViewModel override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? ): View? { homeViewModel = ViewModelProviders.of(this).get(HomeViewModel::class.java) val root = inflater.inflate(R.layout.fragment_home, container, false) val textView: TextView = root.findViewById(R.id.text_home) homeViewModel.text.observe(this, Observer { textView.text = it }) return root } }
{ "pile_set_name": "Github" }
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. # For additional information regarding the format and rule options, please see: # https://github.com/browserslist/browserslist#queries # You can see what browsers were selected by your queries by running: # npx browserslist > 0.5% last 2 versions Firefox ESR not dead IE 9-11
{ "pile_set_name": "Github" }
interface I {} @:cs.using("System") class Main2 { public static function main():Void { trace('ko'); } }
{ "pile_set_name": "Github" }
#include <unittest/runtime_static_assert.h> #include <unittest/unittest.h> #include <thrust/generate.h> template<typename T> struct dependent_false { enum { value = false }; }; template<typename T> struct static_assertion { __host__ __device__ int operator()() const { THRUST_STATIC_ASSERT(dependent_false<T>::value); return 0; } }; template<typename V> void TestStaticAssertAssert() { #if THRUST_DEVICE_SYSTEM != THRUST_DEVICE_SYSTEM_OMP && THRUST_HOST_SYSTEM != THRUST_HOST_SYSTEM_OMP V test(10); ASSERT_STATIC_ASSERT(thrust::generate(test.begin(), test.end(), static_assertion<int>())); #endif } DECLARE_VECTOR_UNITTEST(TestStaticAssertAssert);
{ "pile_set_name": "Github" }
.. TorchSat documentation master file, created by sphinx-quickstart on Sat Sep 14 10:56:23 2019. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Welcome to TorchSat's documentation! ==================================== TorchSat is an open-source deep learning framework for satellite imagery analysis based on PyTorch_. This project is still **work in progress**. If you want to know more about it, please refer to the Roadmap_ . **Hightlight** - Support multi-channels(> 3 channels, e.g. 8 channels) images and TIFF file as input. - Convenient data augmentation method for classification, sementic segmentation and object detection. - Lots of models for satellite vision tasks, such as ResNet, DenseNet, UNet, PSPNet, SSD, FasterRCNN ... - Lots of common satellite datasets loader. - Training script for common satellite vision tasks. .. toctree:: :maxdepth: 2 :caption: Contents: installation.md core-conception.md tutorials/image-classification.md tutorials/semantic-segmentation.md tutorials/object-detection.md tutorials/change-detection.md tutorials/data-augumentation.md tools.md api/api.rst Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` .. _Roadmap: https://github.com/sshuair/torchsat/wiki/Roadmap .. _PyTorch: https://pytorch.org/
{ "pile_set_name": "Github" }
/* Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl> Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /*jslint node: true */ /*global document: true, window:true, esprima: true, testReflect: true */ var runTests; function getContext(esprima, reportCase, reportFailure) { 'use strict'; var Reflect, Pattern; // Maps Mozilla Reflect object to our Esprima parser. Reflect = { parse: function (code) { var result; reportCase(code); try { result = esprima.parse(code); } catch (error) { result = error; } return result; } }; // This is used by Reflect test suite to match a syntax tree. Pattern = function (obj) { var pattern; // Poor man's deep object cloning. pattern = JSON.parse(JSON.stringify(obj)); // Special handling for regular expression literal since we need to // convert it to a string literal, otherwise it will be decoded // as object "{}" and the regular expression would be lost. if (obj.type && obj.type === 'Literal') { if (obj.value instanceof RegExp) { pattern = { type: obj.type, value: obj.value.toString() }; } } // Special handling for branch statement because SpiderMonkey // prefers to put the 'alternate' property before 'consequent'. if (obj.type && obj.type === 'IfStatement') { pattern = { type: pattern.type, test: pattern.test, consequent: pattern.consequent, alternate: pattern.alternate }; } // Special handling for do while statement because SpiderMonkey // prefers to put the 'test' property before 'body'. if (obj.type && obj.type === 'DoWhileStatement') { pattern = { type: pattern.type, body: pattern.body, test: pattern.test }; } function adjustRegexLiteralAndRaw(key, value) { if (key === 'value' && value instanceof RegExp) { value = value.toString(); } else if (key === 'raw' && typeof value === "string") { // Ignore Esprima-specific 'raw' property. return undefined; } return value; } if (obj.type && (obj.type === 'Program')) { pattern.assert = function (tree) { var actual, expected; actual = JSON.stringify(tree, adjustRegexLiteralAndRaw, 4); expected = JSON.stringify(obj, null, 4); if (expected !== actual) { reportFailure(expected, actual); } }; } return pattern; }; return { Reflect: Reflect, Pattern: Pattern }; } if (typeof window !== 'undefined') { // Run all tests in a browser environment. runTests = function () { 'use strict'; var total = 0, failures = 0; function setText(el, str) { if (typeof el.innerText === 'string') { el.innerText = str; } else { el.textContent = str; } } function reportCase(code) { var report, e; report = document.getElementById('report'); e = document.createElement('pre'); e.setAttribute('class', 'code'); setText(e, code); report.appendChild(e); total += 1; } function reportFailure(expected, actual) { var report, e; failures += 1; report = document.getElementById('report'); e = document.createElement('p'); setText(e, 'Expected'); report.appendChild(e); e = document.createElement('pre'); e.setAttribute('class', 'expected'); setText(e, expected); report.appendChild(e); e = document.createElement('p'); setText(e, 'Actual'); report.appendChild(e); e = document.createElement('pre'); e.setAttribute('class', 'actual'); setText(e, actual); report.appendChild(e); } setText(document.getElementById('version'), esprima.version); window.setTimeout(function () { var tick, context = getContext(esprima, reportCase, reportFailure); tick = new Date(); testReflect(context.Reflect, context.Pattern); tick = (new Date()) - tick; if (failures > 0) { document.getElementById('status').className = 'alert-box alert'; setText(document.getElementById('status'), total + ' tests. ' + 'Failures: ' + failures + '. ' + tick + ' ms'); } else { document.getElementById('status').className = 'alert-box success'; setText(document.getElementById('status'), total + ' tests. ' + 'No failure. ' + tick + ' ms'); } }, 11); }; } else { (function (global) { 'use strict'; var esprima = require('../esprima'), tick, total = 0, failures = [], header, current, context; function reportCase(code) { total += 1; current = code; } function reportFailure(expected, actual) { failures.push({ source: current, expected: expected.toString(), actual: actual.toString() }); } context = getContext(esprima, reportCase, reportFailure); tick = new Date(); require('./reflect').testReflect(context.Reflect, context.Pattern); tick = (new Date()) - tick; header = total + ' tests. ' + failures.length + ' failures. ' + tick + ' ms'; if (failures.length) { console.error(header); failures.forEach(function (failure) { console.error(failure.source + ': Expected\n ' + failure.expected.split('\n').join('\n ') + '\nto match\n ' + failure.actual); }); } else { console.log(header); } process.exit(failures.length === 0 ? 0 : 1); }(this)); } /* vim: set sw=4 ts=4 et tw=80 : */
{ "pile_set_name": "Github" }
# The first scenario that fails, we want to save and launch the page in the Browser. # We don't want to to open subsequent failures, as that can be HIGHLY annoying when running from the command line. # # Also, this https://gist.github.com/398643 # has good info on how to save Assets/CSS so we can see the full version of the page. # module LaunchOnFirstFailure class << self attr_accessor :failed_tests def failure_occurred self.failed_tests = 0 unless failed_tests self.failed_tests += 1 end def failed_tests? failed_tests && failed_tests >= 0 end end end After('~@cli')do |scenario| if scenario.failed? && !LaunchOnFirstFailure.failed_tests? && ENV['launch_on_failure'] != 'false' LaunchOnFirstFailure.failure_occurred save_and_open_page end end
{ "pile_set_name": "Github" }
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: DependencyTestProto.proto package io.confluent.kafka.serializers.protobuf.test; public final class DependencyTestProto { private DependencyTestProto() {} public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { registerAllExtensions( (com.google.protobuf.ExtensionRegistryLite) registry); } public interface DependencyMessageOrBuilder extends // @@protoc_insertion_point(interface_extends:io.confluent.kafka.serializers.protobuf.test.DependencyMessage) com.google.protobuf.MessageOrBuilder { /** * <code>.io.confluent.kafka.serializers.protobuf.test.NestedMessage nested_message = 1;</code> * @return Whether the nestedMessage field is set. */ boolean hasNestedMessage(); /** * <code>.io.confluent.kafka.serializers.protobuf.test.NestedMessage nested_message = 1;</code> * @return The nestedMessage. */ io.confluent.kafka.serializers.protobuf.test.NestedTestProto.NestedMessage getNestedMessage(); /** * <code>.io.confluent.kafka.serializers.protobuf.test.NestedMessage nested_message = 1;</code> */ io.confluent.kafka.serializers.protobuf.test.NestedTestProto.NestedMessageOrBuilder getNestedMessageOrBuilder(); /** * <code>bool is_active = 2;</code> * @return The isActive. */ boolean getIsActive(); /** * <code>.io.confluent.kafka.serializers.protobuf.test.TestMessage test_messsage = 3;</code> * @return Whether the testMesssage field is set. */ boolean hasTestMesssage(); /** * <code>.io.confluent.kafka.serializers.protobuf.test.TestMessage test_messsage = 3;</code> * @return The testMesssage. */ io.confluent.kafka.serializers.protobuf.test.TestMessageProtos.TestMessage getTestMesssage(); /** * <code>.io.confluent.kafka.serializers.protobuf.test.TestMessage test_messsage = 3;</code> */ io.confluent.kafka.serializers.protobuf.test.TestMessageProtos.TestMessageOrBuilder getTestMesssageOrBuilder(); } /** * Protobuf type {@code io.confluent.kafka.serializers.protobuf.test.DependencyMessage} */ public static final class DependencyMessage extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:io.confluent.kafka.serializers.protobuf.test.DependencyMessage) DependencyMessageOrBuilder { private static final long serialVersionUID = 0L; // Use DependencyMessage.newBuilder() to construct. private DependencyMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private DependencyMessage() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new DependencyMessage(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private DependencyMessage( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { io.confluent.kafka.serializers.protobuf.test.NestedTestProto.NestedMessage.Builder subBuilder = null; if (nestedMessage_ != null) { subBuilder = nestedMessage_.toBuilder(); } nestedMessage_ = input.readMessage(io.confluent.kafka.serializers.protobuf.test.NestedTestProto.NestedMessage.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(nestedMessage_); nestedMessage_ = subBuilder.buildPartial(); } break; } case 16: { isActive_ = input.readBool(); break; } case 26: { io.confluent.kafka.serializers.protobuf.test.TestMessageProtos.TestMessage.Builder subBuilder = null; if (testMesssage_ != null) { subBuilder = testMesssage_.toBuilder(); } testMesssage_ = input.readMessage(io.confluent.kafka.serializers.protobuf.test.TestMessageProtos.TestMessage.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(testMesssage_); testMesssage_ = subBuilder.buildPartial(); } break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.DependencyTestProto.internal_static_io_confluent_kafka_serializers_protobuf_test_DependencyMessage_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.confluent.kafka.serializers.protobuf.test.DependencyTestProto.internal_static_io_confluent_kafka_serializers_protobuf_test_DependencyMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( io.confluent.kafka.serializers.protobuf.test.DependencyTestProto.DependencyMessage.class, io.confluent.kafka.serializers.protobuf.test.DependencyTestProto.DependencyMessage.Builder.class); } public static final int NESTED_MESSAGE_FIELD_NUMBER = 1; private io.confluent.kafka.serializers.protobuf.test.NestedTestProto.NestedMessage nestedMessage_; /** * <code>.io.confluent.kafka.serializers.protobuf.test.NestedMessage nested_message = 1;</code> * @return Whether the nestedMessage field is set. */ public boolean hasNestedMessage() { return nestedMessage_ != null; } /** * <code>.io.confluent.kafka.serializers.protobuf.test.NestedMessage nested_message = 1;</code> * @return The nestedMessage. */ public io.confluent.kafka.serializers.protobuf.test.NestedTestProto.NestedMessage getNestedMessage() { return nestedMessage_ == null ? io.confluent.kafka.serializers.protobuf.test.NestedTestProto.NestedMessage.getDefaultInstance() : nestedMessage_; } /** * <code>.io.confluent.
{ "pile_set_name": "Github" }
well-respected_JJ difficult_JJ simple_JJ powerful_JJ fearless_JJ post-traumatic_JJ now-tired_JJ underrated_JJ aware_JJ voyeuristic_JJ genuine_JJ fictitious_JJ hometown_JJ fake_JJ given_JJ free_JJ sunny_JJ long_JJ lost_JJ trying_JJ hard_JJ seahaven_JJ intact_JJ broad_JJ convincing_JJ good_JJ human_JJ nice_JJ interactive_JJ surrealistic_JJ plausible_JJ tight_JJ sympathetic_JJ facial_JJ credible_JJ wide-eyed_JJ impeccable_JJ symbolic_JJ kilar_JJ incomplete_JJ stupendous_JJ wonderful_JJ loyal_JJ inspired_JJ
{ "pile_set_name": "Github" }
// // YYSentinel.m // YYKit <https://github.com/ibireme/YYKit> // // Created by ibireme on 15/4/13. // Copyright (c) 2015 ibireme. // // This source code is licensed under the MIT-style license found in the // LICENSE file in the root directory of this source tree. // #import "YYSentinel.h" #import <libkern/OSAtomic.h> @implementation YYSentinel { int32_t _value; } - (int32_t)value { return _value; } - (int32_t)increase { return OSAtomicIncrement32(&_value); } @end
{ "pile_set_name": "Github" }
/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.setupwizardlib.view; import android.annotation.TargetApi; import android.content.Context; import android.os.Build.VERSION_CODES; import android.util.AttributeSet; import android.widget.Checkable; import android.widget.LinearLayout; import androidx.annotation.Nullable; /** * A LinearLayout which is checkable. This will set the checked state when * {@link #onCreateDrawableState(int)} is called, and can be used with * {@code android:duplicateParentState} to propagate the drawable state to child views. */ public class CheckableLinearLayout extends LinearLayout implements Checkable { private boolean mChecked = false; public CheckableLinearLayout(Context context) { super(context); } public CheckableLinearLayout(Context context, @Nullable AttributeSet attrs) { super(context, attrs); } @TargetApi(VERSION_CODES.HONEYCOMB) public CheckableLinearLayout( Context context, @Nullable AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } @TargetApi(VERSION_CODES.LOLLIPOP) public CheckableLinearLayout( Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); } { setFocusable(true); } @Override protected int[] onCreateDrawableState(int extraSpace) { if (mChecked) { final int[] superStates = super.onCreateDrawableState(extraSpace + 1); final int[] checked = new int[] { android.R.attr.state_checked }; return mergeDrawableStates(superStates, checked); } else { return super.onCreateDrawableState(extraSpace); } } @Override public void setChecked(boolean checked) { mChecked = checked; refreshDrawableState(); } @Override public boolean isChecked() { return mChecked; } @Override public void toggle() { setChecked(!isChecked()); } }
{ "pile_set_name": "Github" }
<font face="verdana"> <table border="1" width="100%" bordercolor="#FFFFFF"> <tr> <td width="61%" bgcolor="#6097C9"><font face="verdana"> <h1 align="left"><font color="#FFFFFF">&nbsp;Vertexes</font></h1> <p align="left"><b>&nbsp;Aim</b>: To edit a meshes vertexes in Real-time<br> &nbsp;<b>Skill level</b>: Intermediate<br> &nbsp;<b>Files Needed</b>: vertex.bb / plane.3ds</font> <p>&nbsp;</td> <td width="5%">&nbsp;</td> <td width="34%"> <p align="center"><font face="verdana"> <img src="10c.jpg" alt="Movement" width="167" height="127" align="right"> </font> </p> </td> </tr> </table> <p> If you've already read the section on Meshes beforehand then hopefully you'll know most of what we will be doing already in this tutorial, if not - go away and read it first !.</p> <p> let's recap:</p> <ul> <li>Each <b>MESH</b> (a 3d object), is made up of SURFACES.<br> </li> <li>Each <b>SURFACE</b> has a BRUSH.<br> </li> <li>Each <b>BRUSH</b> can be assigned 8 different texturemaps.<br> (which can be overlaid on each other to create new effects)<br> </li> <li>Each SURFACE is made up of TRIANGLES.<br> </li> <li>Each <b>TRIANGLE</b> is made up of 3 VERTEXES.</li> </ul> <p>So, armed with that info - you should know what makes a 3d object tick !. Lets take a flat square as an example, it is made up of 4 vertexes and 2 triangles. What we are planning of doing is to take 2 of those vertexes and change their coordinates.<br> </p> <p>Infact as mentioned in the Introduction to Meshes, we can even change the colour of the vertexes in realtime too. Run the example - what you can hopefully see is a square object (which is slowly spinning on the Z plane), being pulled out of shape in 2 corners - while every-so-often the colours change.</p> <p>It's a very easy effect to create, I wont go into great detail about how/why the program works - but here's a quick rundown if your interested:</p> <p>We setup the variable 'COUNTER', which does exactly that.. to be used as a counter. Every time the program runs through its main loop, it is incremented. Based on what value the counter is equal to, corresponds to what direction we should pull the vertexes. If the counter reaches 1000 then change the colour of each vertex to a random selection, before resetting the counter value.</p> <p>Let's take a look:</p> <table border="1" width="86%" bordercolor="#FFFFFF"> <tr> <td width="14%">&nbsp;</td> <td width="72%" bordercolor="#000000" bgcolor="#C0C0C0">&nbsp;<br> &nbsp; </font> <font face="arial">Graphics3D 800,600<br> <br> &nbsp;&nbsp; SetBuffer BackBuffer()<br> <br> &nbsp;&nbsp; camera=CreateCamera()<br> &nbsp;&nbsp; CameraViewport camera,0,0,800,600<br> <br> &nbsp;&nbsp; light=CreateLight()<br> <br> &nbsp;&nbsp; plane=LoadMesh(&quot;plane.3ds&quot;)<br> &nbsp;&nbsp; PositionEntity plane,0,0,25<br> &nbsp;&nbsp; EntityFX plane,2<br> <br> &nbsp;&nbsp; surface=GetSurface(plane,CountSurfaces(plane))<br> <br> &nbsp;&nbsp; VertexColor surface,0,255,0,0<br> &nbsp;&nbsp; VertexColor surface,1,0,255,0<br> &nbsp;&nbsp; VertexColor surface,2,0,0,255<br> &nbsp;&nbsp; VertexColor surface,3,255,0,255<br> <br> &nbsp;&nbsp; While Not KeyHit(1)<br> <br> &nbsp;&nbsp; TurnEntity plane,0,0,.3<br> <br> &nbsp;&nbsp; counter=counter+1<br> <br> &nbsp;&nbsp; If counter&lt;500 Then&nbsp;<br> &nbsp;&nbsp; x1#=-.01<br> &nbsp;&nbsp; y1#=-.01<br> &nbsp;&nbsp; x2#=+.01<br> &nbsp;&nbsp; EndIf<br> <br> &nbsp;&nbsp; If counter>499 Then<br> &nbsp;&nbsp; x1#=+.01<br> &nbsp;&nbsp; y1#=+.01<br> &nbsp;&nbsp; x2#=-.01<br> &nbsp;&nbsp; EndIf<br> <br> &nbsp;&nbsp; xx#=VertexX(surface,0)<br> &nbsp;&nbsp; yy#=VertexY(surface,0)<br> &nbsp;&nbsp; zz#=VertexZ(surface,0)<br> <br> &nbsp;&nbsp; VertexCoords surface,0,xx+x1,yy+y1,zz<br> <br> &nbsp;&nbsp; xx#=VertexX(surface,2)<br> &nbsp;&nbsp; yy#=VertexY(surface,2)<br> &nbsp;&nbsp; zz#=VertexZ(surface,2)<br> <br> &nbsp;&nbsp; VertexCoords surface,2,xx+x2,yy+y1,zz<br> <br> &nbsp;&nbsp; If counter=1000 Then<br> &nbsp;&nbsp; counter=0<br> &nbsp;&nbsp; VertexColor surface,0,Rnd#(0,255),Rnd#(0,255),Rnd#(0,255)<br> &nbsp;&nbsp; VertexColor surface,1,Rnd#(0,255),Rnd#(0,255),Rnd#(0,255)<br> &nbsp;&nbsp; VertexColor surface,2,Rnd#(0,255),Rnd#(0,255),Rnd#(0,255)<br> &nbsp;&nbsp; VertexColor surface,3,Rnd#(0,255),Rnd#(0,255),Rnd#(0,255)<br> &nbsp;&nbsp; EndIf<br> <br> &nbsp;&nbsp; UpdateWorld<br> &nbsp;&nbsp; RenderWorld<br> <br> &nbsp;&nbsp; Text 350,500,"Vertex Control"<br> <br> &nbsp;&nbsp; Flip<br> <br> &nbsp;&nbsp; Wend<br> &nbsp;&nbsp; End<br><br></font> </td> <td width="14%">&nbsp;</td> </tr> </table> <p> So how do we get at the vertexes of the object ?</p> <p> Well for starters we load the object with the LoadMesh command, the object we are loading is of course called Plane.3ds.</p> <table border="0" width="100%" bgcolor="#6097C9"> <tr> <td width="100%"> <b><font face="Arial">EntityFX plane,2</font></b></td> </tr> </table> <font face="verdana"> <p>Now here's a new command we haven't seen before !, this command is really more of mode switch than anything else. But setting values we can access the entity
{ "pile_set_name": "Github" }
FROM couchdb:3 COPY local.ini /opt/couchdb/etc/
{ "pile_set_name": "Github" }
//------------------------------------------------------------------------------ // File: TransIP.cpp // // Desc: DirectShow base classes - implements class for simple Transform- // In-Place filters such as audio. // // Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ // How allocators are decided. // // An in-place transform tries to do its work in someone else's buffers. // It tries to persuade the filters on either side to use the same allocator // (and for that matter the same media type). In desperation, if the downstream // filter refuses to supply an allocator and the upstream filter offers only // a read-only one then it will provide an allocator. // if the upstream filter insists on a read-only allocator then the transform // filter will (reluctantly) copy the data before transforming it. // // In order to pass an allocator through it needs to remember the one it got // from the first connection to pass it on to the second one. // // It is good if we can avoid insisting on a particular order of connection // (There is a precedent for insisting on the input // being connected first. Insisting on the output being connected first is // not allowed. That would break RenderFile.) // // The base pin classes (CBaseOutputPin and CBaseInputPin) both have a // m_pAllocator member which is used in places like // CBaseOutputPin::GetDeliveryBuffer and CBaseInputPin::Inactive. // To avoid lots of extra overriding, we should keep these happy // by using these pointers. // // When each pin is connected, it will set the corresponding m_pAllocator // and will have a single ref-count on that allocator. // // Refcounts are acquired by GetAllocator calls which return AddReffed // allocators and are released in one of: // CBaseInputPin::Disconnect // CBaseOutputPin::BreakConect // In each case m_pAllocator is set to NULL after the release, so this // is the last chance to ever release it. If there should ever be // multiple refcounts associated with the same pointer, this had better // be cleared up before that happens. To avoid such problems, we'll // stick with one per pointer. // RECONNECTING and STATE CHANGES // // Each pin could be disconnected, connected with a read-only allocator, // connected with an upstream read/write allocator, connected with an // allocator from downstream or connected with its own allocator. // Five states for each pin gives a data space of 25 states. // // Notation: // // R/W == read/write // R-O == read-only // // <input pin state> <output pin state> <comments> // // 00 means an unconnected pin. // <- means using a R/W allocator from the upstream filter // <= means using a R-O allocator from an upstream filter // || means using our own (R/W) allocator. // -> means using a R/W allocator from a downstream filter // (a R-O allocator from downstream is nonsense, it can't ever work). // // // That makes 25 possible states. Some states are nonsense (two different // allocators from the same place). These are just an artifact of the notation. // <= <- Nonsense. // <- <= Nonsense // Some states are illegal (the output pin never accepts a R-O allocator): // 00 <= !! Error !! // <= <= !! Error !! // || <= !! Error !! // -> <= !! Error !! // Three states appears to be inaccessible: // -> || Inaccessible // || -> Inaccessible // || <- Inaccessible // Some states only ever occur as intermediates with a pending reconnect which // is guaranteed to finish in another state. // -> 00 ?? unstable goes to || 00 // 00 <- ?? unstable goes to 00 || // -> <- ?? unstable goes to -> -> // <- || ?? unstable goes to <- <- // <- -> ?? unstable goes to <- <- // And that leaves 11 possible resting states: // 1 00 00 Nothing connected. // 2 <- 00 Input pin connected. // 3 <= 00 Input pin connected using R-O allocator. // 4 || 00 Needs several state changes to get here. // 5 00 || Output pin connected using our allocator // 6 00 -> Downstream only connected // 7 || || Undesirable but can be forced upon us. // 8 <= || Copy forced. <= -> is preferable // 9 <= -> OK - forced to copy. // 10 <- <- Transform in place (ideal) // 11 -> -> Transform in place (ideal) // // The object of the exercise is to ensure that we finish up in states // 10 or 11 whenever possible. State 10 is only possible if the upstream // filter has a R/W allocator (the AVI splitter notoriously // doesn't) and state 11 is only possible if the downstream filter does // offer an allocator. // // The transition table (entries marked * go via a reconnect) // // There are 8 possible transitions: // A: Connect upstream to filter with R-O allocator that insists on using it. // B: Connect upstream to filter with R-O allocator but chooses not to use it. // C: Connect upstream to filter with R/W allocator and insists on using it. // D: Connect upstream to filter with R/W allocator but chooses not to use it. // E: Connect downstream to a filter that offers an allocator // F: Connect downstream to a filter that does not offer an allocator // G: disconnect upstream // H: Disconnect downstream // // A B C D E F G H // --------------------------------------------------------- // 00 00 1 | 3 3 2 2 6 5 . . |1 00 00 // <- 00 2 | . . . . *10/11 10 1 . |2 <- 00 // <= 00 3 | . . . . *9/11 *7/8 1 . |3 <= 00 // || 00 4 | . . . . *8 *7 1 . |4 || 00 // 00 || 5 | 8 7 *10 7 . . . 1 |5 00 || // 00 -> 6 | 9 11 *10 11 . . . 1 |6 00 -> // || || 7 | . . . . . . 5 4 |7 || || // <= || 8 | . . . . . . 5 3 |8 <= || // <= -> 9 | . . . . . . 6 3 |9 <= -> // <- <- 10| . . . . . . *5/6 2 |10 <- <- // -> -> 11| . . . . . . 6 *2/3 |11 -> -> // --------------------------------------------------------- // A B C D E F G H // // All these states are accessible without requiring any filter to // change its behaviour but not all transitions are accessible, for // instance a transition from state 4 to anywhere other than // state 8 requires that the upstream filter first offer a R-O allocator // and then changes its mind and offer R/W. This is NOT allowable - it // leads to things like the output pin getting a R/W allocator from // upstream and then the input pin being told it can only have a R-O one. // Note that you CAN change (say) the upstream filter for a different one, but // only as a disconnect / connect, not as a Reconnect. (Exercise for // the reader is to see how you get into state 4). // // The reconnection stuff goes as follows (some of the cases shown here as // "no reconnect" may get one to finalise media type - an old story). // If there is a reconnect where it says "no reconnect" here then the // reconnection must not change the allocator choice. // // state 2: <- 00 transition E <- <- case C <- <- (no change) // case D -> <- and then to -> -> // // state 2: <- 00 transition F <- <- (
{ "pile_set_name": "Github" }
/* A fairly versatile primitive capable of representing circles, fans, hoops, and arcs. Contains a great sin/cos trick learned from Iñigo Quílez's site http://www.iquilezles.org/www/articles/sincos/sincos.htm */ package starling.display.graphics { import flash.geom.Matrix; import flash.geom.Point; import starling.core.Starling; import starling.display.graphics.util.TriangleUtil; public class NGon extends Graphic { private const DEGREES_TO_RADIANS :Number = Math.PI / 180; private var _radius :Number; private var _innerRadius :Number; private var _startAngle :Number; private var _endAngle :Number; private var _numSides :int; private var _color :uint = 0xFFFFFF; private static var _uv :Point; public function NGon( radius:Number = 100, numSides:int = 10, innerRadius:Number = 0, startAngle:Number = 0, endAngle:Number = 360 ) { this.radius = radius; this.numSides = numSides; this.innerRadius = innerRadius; this.startAngle = startAngle; this.endAngle = endAngle; minBounds.x = minBounds.y = -radius; maxBounds.x = maxBounds.y = radius; if ( !_uv ) { _uv = new Point(); } } public function get endAngle():Number { return _endAngle; } public function set endAngle(value:Number):void { _endAngle = value; setGeometryInvalid(); } public function get startAngle():Number { return _startAngle; } public function set startAngle(value:Number):void { _startAngle = value; setGeometryInvalid(); } public function get radius():Number { return _radius; } public function set color(value:uint) : void { _color = value; setGeometryInvalid(); } public function set radius(value:Number):void { value = value < 0 ? 0 : value; _radius = value; var maxRadius:Number = Math.max(_radius, _innerRadius); minBounds.x = minBounds.y = -maxRadius; maxBounds.x = maxBounds.y = maxRadius; setGeometryInvalid(); } public function get innerRadius():Number { return _innerRadius; } public function set innerRadius(value:Number):void { value = value < 0 ? 0 : value; _innerRadius = value; var maxRadius:Number = Math.max(_radius, _innerRadius); minBounds.x = minBounds.y = -maxRadius; maxBounds.x = maxBounds.y = maxRadius; setGeometryInvalid(); } public function get numSides():int { return _numSides; } public function set numSides(value:int):void { value = value < 3 ? 3 : value; _numSides = value; setGeometryInvalid(); } override protected function buildGeometry():void { vertices = new Vector.<Number>(); indices = new Vector.<uint>(); // Manipulate the input startAngle and endAngle values // into sa and ea. sa will always end up less than // ea, and ea-sa is the shortest clockwise distance // between them. var sa:Number = _startAngle; var ea:Number = _endAngle; var isEqual:Boolean = sa == ea; var sSign:int = sa < 0 ? -1 : 1; var eSign:int = ea < 0 ? -1 : 1; sa *= sSign; ea *= eSign; ea = ea % 360; ea *= eSign; sa = sa % 360; if ( ea < sa ) { ea += 360; } sa *= sSign * DEGREES_TO_RADIANS; ea *= DEGREES_TO_RADIANS; if ( ea - sa > Math.PI*2 ) { ea -= Math.PI*2; } // Manipulate innerRadius and outRadius in r and ir. // ir will always be less than r. var innerRadius:Number = _innerRadius < _radius ? _innerRadius : _radius; var radius:Number = _radius > _innerRadius ? _radius : _innerRadius; // Based upon the input values, choose from // 4 primitive types. Each more complex than the next. var isSegment:Boolean = (sa != 0 || ea != 0); if ( isSegment == false ) isSegment = isEqual; // if sa and ea are equal, treat that as a segment, not a full lap around a circle. if ( innerRadius == 0 && !isSegment ) { buildSimpleNGon(radius, _numSides, vertices, indices, _uvMatrix , _color); } else if ( innerRadius != 0 && !isSegment ) { buildHoop(innerRadius, radius, _numSides, vertices, indices, _uvMatrix , _color); } else if ( innerRadius == 0 ) { buildFan(radius, sa, ea, _numSides, vertices, indices, _uvMatrix , _color); } else { buildArc( innerRadius, radius, sa, ea, _numSides, vertices, indices, _uvMatrix , _color); } } override protected function shapeHitTestLocalInternal( localX:Number, localY:Number ):Boolean { var numIndices:int = indices.length; if ( numIndices < 2 ) { validateNow(); numIndices = indices.length; if ( numIndices < 2 ) return false; } if ( _innerRadius == 0 && _radius > 0 && _startAngle == 0 && _endAngle == 360 && _numSides > 20 ) { // simple - faster - if ngon is circle shape and numsides more than 20, assume circle is desired. if ( Math.sqrt( localX * localX + localY * localY ) < _radius ) return true; return false; } for ( var i:int = 2; i < numIndices; i+=3 ) { // slower version - should be complete though. For all triangles, check if point is in triangle var i0:int = indices[(i - 2)]; var i1:int = indices[(i - 1)]; var i2:int = indices[(i - 0)]; var v0x:Number = vertices[VERTEX_STRIDE * i0 + 0]; var v0y:Number = vertices[VERTEX_STRIDE * i0 + 1]; var v1x:Number = vertices[VERTEX_STRIDE * i1 + 0]; var v1y:Number = vertices[VERTEX_STRIDE * i1 + 1]; var v2x:Number = vertices[VERTEX_STRIDE * i2 + 0]; var v2y:Number = vertices[VERTEX_STRIDE * i2 + 1]; if ( TriangleUtil.isPointInTriangle(v0x, v0y, v1x, v1y, v2x, v2y, localX, localY) ) return true; } return false; } private static function buildSimpleNGon( radius:Number, numSides:int, vertices:Vector.<Number>, indices:Vector.<uint>, uvMatrix:Matrix, color:uint ):void { var numVertices:int = 0; _uv.x = 0; _uv.y = 0; if ( uvMatrix ) _uv = uvMatrix.transformPoint(_uv); var r:Number = (color >> 16) / 255; var g:Number =
{ "pile_set_name": "Github" }
/* Copyright 2017, 2018 Ankyra 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 state import ( . "gopkg.in/check.v1" ) func (s *suite) Test_GetDeploymentStateDAG_empty_env(c *C) { prj, _ := NewProjectState("my-project") env, err := prj.GetEnvironmentStateOrMakeNew("my-env") c.Assert(err, IsNil) dag, err := env.GetDeploymentStateDAG(BuildStage) c.Assert(err, IsNil) c.Assert(dag, HasLen, 0) } func (s *suite) Test_GetDeploymentStateDAG_one_deployment(c *C) { stage := DeployStage prj, _ := NewProjectState("my-project") env, err := prj.GetEnvironmentStateOrMakeNew("my-env") c.Assert(err, IsNil) depl1, err := env.GetOrCreateDeploymentState("depl1") c.Assert(err, IsNil) depl1.GetStageOrCreateNew(stage) dag, err := env.GetDeploymentStateDAG(stage) c.Assert(err, IsNil) c.Assert(dag, HasLen, 1) c.Assert(dag[0].Node, DeepEquals, depl1) c.Assert(dag[0].AndThen, HasLen, 0) } func (s *suite) Test_GetDeploymentStateDAG_two_deployments_one_provider(c *C) { stage := DeployStage prj, _ := NewProjectState("my-project") env, err := prj.GetEnvironmentStateOrMakeNew("my-env") c.Assert(err, IsNil) depl1, err := env.GetOrCreateDeploymentState("depl1") c.Assert(err, IsNil) depl2, err := env.GetOrCreateDeploymentState("depl2") c.Assert(err, IsNil) st := depl1.GetStageOrCreateNew(stage) st.Providers["whatever"] = "depl2" depl2.GetStageOrCreateNew(stage) dag, err := env.GetDeploymentStateDAG(stage) c.Assert(err, IsNil) c.Assert(dag, HasLen, 1) c.Assert(dag[0].Node, DeepEquals, depl2) c.Assert(dag[0].AndThen, HasLen, 1) c.Assert(dag[0].AndThen[0].Node, DeepEquals, depl1) c.Assert(dag[0].AndThen[0].AndThen, HasLen, 0) tsort, err := env.GetDeploymentStateTopologicalSort(stage) c.Assert(err, IsNil) c.Assert(tsort, HasLen, 2) c.Assert(tsort[0], DeepEquals, depl2) c.Assert(tsort[1], DeepEquals, depl1) } func (s *suite) Test_GetDeploymentStateDAG(c *C) { // For deployment graph: // // A -> B, E // B -> C, D // C -> D // D // E stage := DeployStage prj, _ := NewProjectState("my-project") env, err := prj.GetEnvironmentStateOrMakeNew("my-env") c.Assert(err, IsNil) deplA, err := env.GetOrCreateDeploymentState("deplA") c.Assert(err, IsNil) deplB, err := env.GetOrCreateDeploymentState("deplB") c.Assert(err, IsNil) deplC, err := env.GetOrCreateDeploymentState("deplC") c.Assert(err, IsNil) deplD, err := env.GetOrCreateDeploymentState("deplD") c.Assert(err, IsNil) deplE, err := env.GetOrCreateDeploymentState("deplE") c.Assert(err, IsNil) stA := deplA.GetStageOrCreateNew(stage) stA.Providers["b"] = "deplB" stA.Providers["e"] = "deplE" stB := deplB.GetStageOrCreateNew(stage) stB.Providers["c"] = "deplC" stB.Providers["d"] = "deplD" stC := deplC.GetStageOrCreateNew(stage) stC.Providers["d"] = "deplD" deplD.GetStageOrCreateNew(stage) deplE.GetStageOrCreateNew(stage) dag, err := env.GetDeploymentStateDAG(stage) c.Assert(err, IsNil) c.Assert(dag, HasLen, 2) var bDag, cDag, dDag, eDag *DAGNode if dag[0].Node.Name == "deplD" { dDag = dag[0] eDag = dag[1] } else { dDag = dag[1] eDag = dag[0] } c.Assert(dDag.Node, DeepEquals, deplD) c.Assert(dDag.AndThen, HasLen, 2) if dDag.AndThen[0].Node.Name == "deplB" { bDag = dDag.AndThen[0] cDag = dDag.AndThen[1] } else { bDag = dDag.AndThen[1] cDag = dDag.AndThen[0] } c.Assert(bDag.Node, DeepEquals, deplB) c.Assert(bDag.AndThen, HasLen, 1) c.Assert(bDag.AndThen[0].Node, DeepEquals, deplA) c.Assert(cDag.Node, DeepEquals, deplC) c.Assert(cDag.AndThen, HasLen, 1) c.Assert(cDag.AndThen[0].Node, DeepEquals, deplB) c.Assert(eDag.Node, DeepEquals, deplE) c.Assert(eDag.AndThen, HasLen, 1) c.Assert(eDag.AndThen[0].Node, DeepEquals, deplA) i := 0 for i < 1000 { tsort, err := env.GetDeploymentStateTopologicalSort(stage) c.Assert(err, IsNil) for ix, depl := range tsort { st := depl.GetStageOrCreateNew(stage) for _, deplName := range st.Providers { found := false for depIx, depDepl := range tsort { if depDepl.Name == deplName { found = true c.Assert(depIx < ix, Equals, true, Commentf("Deployment '%s' should happen before '%s'", deplName, depl.Name)) } } c.Assert(found, Equals, true, Commentf("Missing deployment '%s' in topological sort", depl.Name)) } } i += 1 } } type hasItemChecker struct{} var HasItem = &hasItemChecker{} func (*hasItemChecker) Info() *CheckerInfo { return &CheckerInfo{Name: "HasItem", Params: []string{"obtained", "expected to have item"}} } func (*hasItemChecker) Check(params []interface{}, names []string) (bool, string) { obtained := params[0] expectedItem
{ "pile_set_name": "Github" }
StartChar: delta.sc Encoding: 1114211 -1 892 Width: 434 Flags: MW LayerCount: 2 Fore SplineSet 116 2 m 2 96 2 63 -3 40 -3 c 0 26 -3 17 9 17 17 c 0 17 26 32 49 50 92 c 2 166 360 l 2 180 393 175 407 178 410 c 0 187 419 211 444 217 451 c 0 225 460 230 463 233 463 c 0 237 463 238 460 240 454 c 2 375 107 l 2 386 79 410 30 410 17 c 0 410 10 395 -3 381 -3 c 0 359 -3 325 2 290 2 c 2 116 2 l 2 311 58 m 2 207 337 l 2 201 352 199 352 193 337 c 2 83 65 l 2 76 48 86 48 86 48 c 1 294 48 l 1 294 48 315 47 311 58 c 2 EndSplineSet Validated: 1 EndChar
{ "pile_set_name": "Github" }
<html> <head> <title>Test</title> <script src="example_output.js"></script> <script> init = function() { var person = Person.createFrom({ "name": "Ovo Ono", "nicknames": ["aaa", "bbb"], "personal_info": { "hobby": ["1", "2"], "pet_name": "nera" }, "addresses": [ { "city": "aaa", "number": 13 }, { "city": "bbb", "number": 14 } ]}); if (person.getInfo() != "name:Ovo Ono") { alert("Person method not there"); return; } if (person.personal_info.hobby.length != 2) { alert("No hobbies found"); return; } if (person.addresses.length != 2) { alert("No addresses found"); return; } if (person.addresses[1].getAddressString() != "bbb 14") { alert("Address methodincorrect"); return; } alert("OK"); Person.createFrom({ "name": "Ovo Ono", "nicknames": ["aaa", "bbb"], "personal_info": { "hobby": ["1", "2"], "pet_name": "nera" }}); alert("OK"); var person = Person.createFrom({ "name": "Ovo Ono", "nicknames": ["aaa", "bbb"], "personal_info": {} }); alert("OK"); var person = Person.createFrom({ }); alert("OK"); }; </script> </head> <body onload="init()"> <h1>Test</h1> <h2>OK (check browser console for errors)?<h2> </body> </html>
{ "pile_set_name": "Github" }
{ "acno": "D03930", "acquisitionYear": 1856, "all_artists": "Joseph Mallord William Turner", "catalogueGroup": { "accessionRanges": "D03833-D03973; D40780", "completeStatus": "COMPLETE", "finbergNumber": "LXVI", "groupType": "Turner Sketchbook", "id": 65716, "shortTitle": "Egyptian Details Sketchbook" }, "classification": "on paper, unique", "contributorCount": 1, "contributors": [ { "birthYear": 1775, "date": "1775\u20131851", "displayOrder": 1, "fc": "Joseph Mallord William Turner", "gender": "Male", "id": 558, "mda": "Turner, Joseph Mallord William", "role": "artist", "startLetter": "T" } ], "creditLine": "Accepted by the nation as part of the Turner Bequest 1856", "dateRange": { "endYear": 1800, "startYear": 1799, "text": "c.1799-1800" }, "dateText": "c.1799\u20131800", "depth": "", "dimensions": "support: 166 x 82 mm", "finberg": "LXVI 94", "foreignTitle": null, "groupTitle": "Egyptian Details Sketchbook", "height": "82", "id": 31325, "inscription": null, "medium": null, "movementCount": 0, "pageNumber": 191, "subjectCount": 0, "thumbnailCopyright": null, "thumbnailUrl": null, "title": "[blank]", "units": "mm", "url": "http://www.tate.org.uk/art/artworks/turner-blank-d03930", "width": "166" }
{ "pile_set_name": "Github" }
package jetbrains.mps.lang.plugin.standalone.editor; /*Generated by MPS */ import jetbrains.mps.editor.runtime.descriptor.AbstractEditorBuilder; import org.jetbrains.annotations.NotNull; import org.jetbrains.mps.openapi.model.SNode; import jetbrains.mps.openapi.editor.EditorContext; import jetbrains.mps.openapi.editor.cells.EditorCell; import jetbrains.mps.nodeEditor.cells.EditorCell_Collection; import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Vertical; import jetbrains.mps.openapi.editor.style.Style; import jetbrains.mps.editor.runtime.style.StyleImpl; import jetbrains.mps.editor.runtime.style.StyleAttributes; import jetbrains.mps.nodeEditor.BlockCells; import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Horizontal; import jetbrains.mps.nodeEditor.cells.EditorCell_Constant; import org.jetbrains.mps.openapi.language.SProperty; import jetbrains.mps.openapi.editor.menus.transformation.SPropertyInfo; import jetbrains.mps.nodeEditor.cells.EditorCell_Property; import jetbrains.mps.nodeEditor.cells.SPropertyAccessor; import jetbrains.mps.nodeEditor.cellMenu.SPropertySubstituteInfo; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; import jetbrains.mps.lang.smodel.generator.smodelAdapter.IAttributeDescriptor; import jetbrains.mps.internal.collections.runtime.Sequence; import jetbrains.mps.internal.collections.runtime.IWhereFilter; import java.util.Objects; import jetbrains.mps.lang.core.behavior.PropertyAttribute__BehaviorDescriptor; import jetbrains.mps.nodeEditor.EditorManager; import jetbrains.mps.openapi.editor.update.AttributeKind; import jetbrains.mps.nodeEditor.MPSFonts; import jetbrains.mps.nodeEditor.cells.EditorCell_Indent; import jetbrains.mps.nodeEditor.cellProviders.AbstractCellListHandler; import jetbrains.mps.lang.editor.cellProviders.RefNodeListHandler; import org.jetbrains.mps.openapi.language.SContainmentLink; import org.jetbrains.mps.openapi.language.SAbstractConcept; import jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation; import jetbrains.mps.openapi.editor.cells.DefaultSubstituteInfo; import jetbrains.mps.nodeEditor.cellMenu.SEmptyContainmentSubstituteInfo; import jetbrains.mps.nodeEditor.cellMenu.SChildSubstituteInfo; import jetbrains.mps.openapi.editor.cells.CellActionType; import jetbrains.mps.nodeEditor.cellActions.CellAction_DeleteNode; import jetbrains.mps.lang.editor.cellProviders.SingleRoleCellProvider; import jetbrains.mps.editor.runtime.impl.cellActions.CellAction_DeleteSmart; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; import org.jetbrains.mps.openapi.language.SConcept; /*package*/ class ApplicationPluginDeclaration_EditorBuilder_a extends AbstractEditorBuilder { @NotNull private SNode myNode; public ApplicationPluginDeclaration_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) { super(context); myNode = node; } @NotNull @Override public SNode getNode() { return myNode; } /*package*/ EditorCell createCell() { return createCollection_0(); } private EditorCell createCollection_0() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Vertical()); editorCell.setCellId("Collection_n7kiqy_a"); editorCell.setBig(true); setCellContext(editorCell); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createCollection_1()); editorCell.addEditorCell(createCollection_3()); if (nodeCondition_n7kiqy_a2a()) { editorCell.addEditorCell(createConstant_4()); } return editorCell; } private boolean nodeCondition_n7kiqy_a2a() { return BlockCells.useBraces(); } private EditorCell createCollection_1() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal()); editorCell.setCellId("Collection_n7kiqy_a0"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createCollection_2()); if (nodeCondition_n7kiqy_a1a0()) { editorCell.addEditorCell(createConstant_1()); } return editorCell; } private boolean nodeCondition_n7kiqy_a1a0() { return BlockCells.useBraces(); } private EditorCell createCollection_2() { EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal()); editorCell.setCellId("Collection_n7kiqy_a0a"); Style style = new StyleImpl(); style.set(StyleAttributes.SELECTABLE, false); editorCell.getStyle().putAll(style); editorCell.addEditorCell(createConstant_0()); editorCell.addEditorCell(createProperty_0()); return editorCell; } private EditorCell createConstant_0() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "application plugin"); editorCell.setCellId("Constant_n7kiqy_a0a0"); editorCell.setDefaultText(""); return editorCell; } private EditorCell createProperty_0() { getCellFactory().pushCellContext(); try { final SProperty property = PROPS.name$MnvL; getCellFactory().setPropertyInfo(new SPropertyInfo(myNode, property)); EditorCell_Property editorCell = EditorCell_Property.create(getEditorContext(), new SPropertyAccessor(myNode, property, false, false), myNode); editorCell.setDefaultText("<name>"); editorCell.setCellId("property_name"); editorCell.setSubstituteInfo(new SPropertySubstituteInfo(editorCell, property)); setCellContext(editorCell); Iterable<SNode> propertyAttributes = SNodeOperations.ofConcept(new IAttributeDescriptor.AllAttributes().list(myNode), CONCEPTS.PropertyAttribute$Gb); Iterable<SNode> currentPropertyAttributes = Sequence.fromIterable(propertyAttributes).where(new IWhereFilter<SNode>() { public boolean accept(SNode it) { return Objects.equals(PropertyAttribute__BehaviorDescriptor.getProperty_id1avfQ4BBzOo.invoke(it), property); } }); if (Sequence.fromIterable(currentPropertyAttributes).isNotEmpty()) { EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentPropertyAttributes).first(), AttributeKind.PROPERTY, editorCell); } else return editorCell; } finally { getCellFactory().popCellContext(); } } private EditorCell createConstant_1() { EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "{"); editorCell.setCellId("Constant_n7kiqy_b0a"); Style style = new StyleImpl(); style.set(StyleAttributes.MATCHING_LABEL, "brace"); style.set(StyleAttributes.INDENT_LAYOUT_NO_WRAP, true); style.set(StyleAttributes.FONT_STYLE, MPSFonts.PLAIN);
{ "pile_set_name": "Github" }
page.title=Draw 9-patch page.tags="NinePatch" @jd:body <p>The Draw 9-patch tool allows you to easily create a {@link android.graphics.NinePatch} graphic using a WYSIWYG editor.</p> <p>For an introduction to Nine-patch graphics and how they work, please read the section about Nine-patch in the <a href="{@docRoot}guide/topics/graphics/2d-graphics.html#nine-patch">2D Graphics</a> document.</p> <img src="{@docRoot}images/draw9patch-norm.png" style="float:right" alt="" height="300" width="341" /> <p>Here's a quick guide to create a Nine-patch graphic using the Draw 9-patch tool. You'll need the PNG image with which you'd like to create a NinePatch.</p> <ol> <li>From a terminal, launch the <code>draw9patch</code> application from your SDK <code>/tools</code> directory. </li> <li>Drag your PNG image into the Draw 9-patch window (or <strong>File</strong> > <strong>Open 9-patch...</strong> to locate the file). Your workspace will now open. <p>The left pane is your drawing area, in which you can edit the lines for the stretchable patches and content area. The right pane is the preview area, where you can preview your graphic when stretched.</p> </li> <li>Click within the 1-pixel perimeter to draw the lines that define the stretchable patches and (optional) content area. Right-click (or hold Shift and click, on Mac) to erase previously drawn lines. </li> <li>When done, select <strong>File</strong> > <strong>Save 9-patch...</strong> <p>Your image will be saved with the <code>.9.png</code> file name.</p> </li> </ol> <p class="note"><strong>Note:</strong> A normal PNG file (<code>*.png</code>) will be loaded with an empty one-pixel border added around the image, in which you can draw the stretchable patches and content area. A previously saved 9-patch file (<code>*.9.png</code>) will be loaded as-is, with no drawing area added, because it already exists.</p> <img src="{@docRoot}images/draw9patch-bad.png" style="float:right;clear:both" alt="" height="300" width="341" /> <p>Optional controls include:</p> <ul> <li><strong>Zoom</strong>: Adjust the zoom level of the graphic in the drawing area.</li> <li><strong>Patch scale</strong>: Adjust the scale of the images in the preview area.</li> <li><strong>Show lock</strong>: Visualize the non-drawable area of the graphic on mouse-over.</li> <li><strong>Show patches</strong>: Preview the stretchable patches in the drawing area (pink is a stretchable patch).</li> <li><strong>Show content</strong>: Highlight the content area in the preview images (purple is the area in which content is allowed).</li> <li><strong>Show bad patches</strong>: Adds a red border around patch areas that may produce artifacts in the graphic when stretched. Visual coherence of your stretched image will be maintained if you eliminate all bad patches.</li> <ul>
{ "pile_set_name": "Github" }
package de.vogella.rcp.commands.enable; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.osgi.framework.BundleContext; /** * The activator class controls the plug-in life cycle */ public class Activator extends AbstractUIPlugin { // The plug-in ID public static final String PLUGIN_ID = "de.vogella.rcp.commands.enable"; // The shared instance private static Activator plugin; /** * The constructor */ public Activator() { } /* * (non-Javadoc) * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) */ public void start(BundleContext context) throws Exception { super.start(context); plugin = this; } /* * (non-Javadoc) * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) */ public void stop(BundleContext context) throws Exception { plugin = null; super.stop(context); } /** * Returns the shared instance * * @return the shared instance */ public static Activator getDefault() { return plugin; } /** * Returns an image descriptor for the image file at the given * plug-in relative path * * @param path the path * @return the image descriptor */ public static ImageDescriptor getImageDescriptor(String path) { return imageDescriptorFromPlugin(PLUGIN_ID, path); } }
{ "pile_set_name": "Github" }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>CSS Test: First-letter with the 'right white curly bracket' punctuation character</title> <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#first-letter" /> <link rel="match" href="first-letter-punctuation-023-ref.xht" /> <meta name="flags" content="" /> <meta name="assert" content="Punctuation characters defined in Unicode [UNICODE] in (Ps),(Pe),(Pi),(Pf) and (Po) punctuation classes that precede or follow the first letter are included in first-letter selection - 'right white curly bracket'." /> <style type="text/css"> div:first-letter { color: green; font-size: 36px; line-height: 2; } </style> </head> <body> <p>Test passes if the "T" and surrounding punctuation below are green.</p> <div>&#x2984;T&#x2984;est</div> </body> </html>
{ "pile_set_name": "Github" }
#include "main.h" #include "mainctrl.h" #include "utility.h" #include "ircgate.h" /* NICK Ago USER Ago ago irc.secsup.uu.net :Ago NOTICE AUTH :*** Looking up your hostname... NOTICE AUTH :*** Checking Ident NOTICE AUTH :*** Found your hostname :irc.secsup.org 001 Ago :Welcome to the Internet Relay Network Ago :irc.secsup.org 002 Ago :Your host is irc.secsup.org[63.98.19.242/6667], running version 2.8/hybrid-6.3.1 NOTICE Ago :*** Your host is irc.secsup.org[63.98.19.242/6667], running version 2.8/hybrid-6.3.1 :irc.secsup.org 003 Ago :This server was created Tue Jan 21 2003 at 16:57:32 GMT :irc.secsup.org 004 Ago irc.secsup.org 2.8/hybrid-6.3.1 oOiwszcrkfydnxb biklmnopstve :irc.secsup.org 005 Ago WALLCHOPS PREFIX=(ov)@+ CHANTYPES=#& MAXCHANNELS=100 MAXBANS=25 NICKLEN=9 TOPICLEN=120 KICKLEN=90 NETWORK=EFnet CHANMODES=b,k,l,imnpst KNOCK MODES=4 :are supported by this server :irc.secsup.org 251 Ago :There are 5968 users and 105973 invisible on 57 servers :irc.secsup.org 252 Ago 434 :IRC Operators online :irc.secsup.org 254 Ago 43934 :channels formed :irc.secsup.org 255 Ago :I have 2919 clients and 1 servers :irc.secsup.org 265 Ago :Current local users: 2919 Max: 4026 :irc.secsup.org 266 Ago :Current global users: 111941 Max: 125618 :irc.secsup.org 250 Ago :Highest connection count: 4027 (4026 clients) (151553 since server was (re)started) :irc.secsup.org 375 Ago :- irc.secsup.org Message of the Day - :irc.secsup.org 372 Ago :- This is a server :irc.secsup.org 372 Ago :- like many others :irc.secsup.org 372 Ago :- it is serving :irc.secsup.org 372 Ago :- :irc.secsup.org 372 Ago :- please don't abuse it :irc.secsup.org 372 Ago :- or I will be mad :irc.secsup.org 376 Ago :End of /MOTD command. :Ago MODE Ago :+i JOIN #bla :irc.secsup.org 475 Ago #bla :Cannot join channel (+k) JOIN #bla0r :Ago!~Ago@frb9-d9bb4a80.pool.mediaWays.net JOIN :#bla0r :irc.secsup.org MODE #bla0r +nt :irc.secsup.org 353 Ago = #bla0r :@Ago :irc.secsup.org 366 Ago #bla0r :End of /NAMES list. MODE #bla0r WHO #bla0r :irc.secsup.org 324 Ago #bla0r +tn :irc.secsup.org 329 Ago #bla0r 1059462330 :irc.secsup.org 352 Ago #bla0r ~Ago frb9-d9bb4a80.pool.mediaWays.net irc.secsup.org Ago H@ :0 Ago :irc.secsup.org 315 Ago #bla0r :End of /WHO list. PART #bla0r :Client exiting :Ago!~Ago@frb9-d9bb4a80.pool.mediaWays.net PART #bla0r PRIVMSG #bla0r :.login Ago bunghole :[Ago]cnns!~woinggg@AGrenoble-203-1-1-126.w80-15.abo.wanadoo.fr PRIVMSG #bla0r :Password accepted. :[Ago]vzta!~woinggg@4.22.139.57 PRIVMSG #bla0r :Password accepted. :[Ago]ffrp!~woinggg@node-d1d4a28b.mdw.onnet.us.uu.net PRIVMSG #bla0r :Password accepted. :[Ago]pdak!~woinggg@CPE00e018f32af5-CM014400121364.cpe.net.cable.rogers.com PRIVMSG #bla0r :Password accepted. :[Ago]uquc!~woinggg@24-90-163-103.nj.rr.com PRIVMSG #bla0r :Password accepted. :[Ago]ifgu!~woinggg@12-224-69-181.client.attbi.com PRIVMSG #bla0r :Password accepted. :[Ago]osaw!~woinggg@h24-65-104-107.ed.shawcable.net PRIVMSG #bla0r :Password accepted. :aizs!~hznge@133.43.174.38 PRIVMSG #bla0r :Password accepted. :[Ago]tzgx!zxdcc@cm61-18-166-86.hkcable.com.hk PRIVMSG #bla0r :Password accepted. */ CIRCGate::CIRCGate() { m_bRunning=true; m_sListenSock=-1; m_sServerSock=-1; } CIRCGate::~CIRCGate() throw() { m_bRunning=false; if(m_sListenSock!=-1) xClose(m_sListenSock); if(m_sServerSock!=-1) xClose(m_sServerSock); } void CIRCGate::run() throw() { // Create the shared listen socket on IRC port sockaddr_in issin; memset(&issin, 0, sizeof(issin)); issin.sin_family=AF_INET; issin.sin_addr.s_addr=INADDR_ANY; issin.sin_port=htons(6667); m_sListenSock=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if(m_sListenSock!=-1) { #ifdef WIN32 WSAAsyncSelect(m_sListenSock, 0, WM_USER + 1, FD_READ); #endif bind(m_sListenSock, (sockaddr *)&issin, sizeof(issin)); listen(m_sListenSock, 10); } else // Uuhhh, spew something { g_cMainCtrl.m_cConsDbg.Log(1, "CIRCGate(0x%8.8Xh): Port %d is already bound, or something wicked happened!\n", this, 6667); m_bRunning=false; return; } while(m_bRunning) { // Accept an incoming connection from the shared listen socket sockaddr_in cssin; socklen_t cssin_len=sizeof(cssin); m_sServerSock=accept(m_sListenSock, (sockaddr *)&cssin, &cssin_len); if(m_sServerSock!=-1) // We got a client { // Get the remote ip via getpeername, and store it in m_sClientIp sockaddr sa; socklen_t sas=sizeof(sa); memset(&sa, 0, sizeof(sa)); getpeername(m_sServerSock, &sa, &sas); char szTemp[32]; sprintf(szTemp, "%d.%d.%d.%d", (unsigned char)sa.sa_data[2], (unsigned char)sa.sa_data[3], \ (unsigned char)sa.sa_data[4], (unsigned char)sa.sa_data[5]); m_sClientIp.Assign(szTemp); g_cMainCtrl.m_cConsDbg.Log(3, "CIRCGate(
{ "pile_set_name": "Github" }
! { dg-do run } program asyncwait integer, parameter :: N = 64 real, allocatable :: a(:), b(:), c(:) integer i allocate (a(N)) allocate (b(N)) allocate (c(N)) !$acc parallel async (0) !$acc loop do i = 1, N a(i) = 1 end do !$acc end parallel !$acc parallel async (1) !$acc loop do i = 1, N b(i) = 1 end do !$acc end parallel !$acc parallel wait (0, 1) !$acc loop do i = 1, N c(i) = a(i) + b(i) end do !$acc end parallel do i = 1, N if (c(i) .ne. 2.0) STOP 1 end do !$acc kernels async (0) !$acc loop do i = 1, N a(i) = 1 end do !$acc end kernels !$acc kernels async (1) !$acc loop do i = 1, N b(i) = 1 end do !$acc end kernels !$acc kernels wait (0, 1) !$acc loop do i = 1, N c(i) = a(i) + b(i) end do !$acc end kernels do i = 1, N if (c(i) .ne. 2.0) STOP 2 end do deallocate (a) deallocate (b) deallocate (c) end program asyncwait
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>ConfigureWeb</class> <widget class="QWidget" name="ConfigureWeb"> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>926</width> <height>561</height> </rect> </property> <property name="windowTitle"> <string>Form</string> </property> <layout class="QVBoxLayout" name="verticalLayout"> <item> <layout class="QVBoxLayout" name="verticalLayout_3"> <item> <widget class="QGroupBox" name="groupBoxWebConfig"> <property name="title"> <string>yuzu Web Service</string> </property> <layout class="QVBoxLayout" name="verticalLayoutYuzuWebService"> <item> <widget class="QLabel" name="web_credentials_disclaimer"> <property name="text"> <string>By providing your username and token, you agree to allow yuzu to collect additional usage data, which may include user identifying information.</string> </property> </widget> </item> <item> <layout class="QGridLayout" name="gridLayoutYuzuUsername"> <item row="2" column="3"> <widget class="QPushButton" name="button_verify_login"> <property name="sizePolicy"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="layoutDirection"> <enum>Qt::RightToLeft</enum> </property> <property name="text"> <string>Verify</string> </property> </widget> </item> <item row="2" column="0"> <widget class="QLabel" name="web_signup_link"> <property name="text"> <string>Sign up</string> </property> </widget> </item> <item row="0" column="1" colspan="3"> <widget class="QLabel" name="username" /> </item> <item row="1" column="0"> <widget class="QLabel" name="label_token"> <property name="text"> <string>Token: </string> </property> </widget> </item> <item row="1" column="4"> <widget class="QLabel" name="label_token_verified"> </widget> </item> <item row="0" column="0"> <widget class="QLabel" name="label_username"> <property name="text"> <string>Username: </string> </property> </widget> </item> <item row="1" column="1" colspan="3"> <widget class="QLineEdit" name="edit_token"> <property name="maxLength"> <number>80</number> </property> <property name="echoMode"> <enum>QLineEdit::Password</enum> </property> </widget> </item> <item row="2" column="1"> <widget class="QLabel" name="web_token_info_link"> <property name="text"> <string>What is my token?</string> </property> </widget> </item> <item row="2" column="2"> <spacer name="horizontalSpacer"> <property name="orientation"> <enum>Qt::Horizontal</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>40</width> <height>20</height> </size> </property> </spacer> </item> </layout> </item> </layout> </widget> </item> <item> <widget class="QGroupBox" name="groupBox"> <property name="title"> <string>Telemetry</string> </property> <layout class="QVBoxLayout" name="verticalLayout_2"> <item> <widget class="QCheckBox" name="toggle_telemetry"> <property name="text"> <string>Share anonymous usage data with the yuzu team</string> </property> </widget> </item> <item> <widget class="QLabel" name="telemetry_learn_more"> <property name="text"> <string>Learn more</string> </property> </widget> </item> <item> <layout class="QGridLayout" name="gridLayoutTelemetryId"> <item row="0" column="0"> <widget class="QLabel" name="label_telemetry_id"> <property name="text"> <string>Telemetry ID:</string> </property> </widget> </item> <item row="0" column="1"> <widget class="QPushButton" name="button_regenerate_telemetry_id"> <property name="sizePolicy"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="layoutDirection"> <enum>Qt::RightToLeft</enum> </property> <property name="text"> <string>Regenerate</string> </property> </widget> </item> </layout> </item> </layout> </widget> </item> </layout> </item> <item> <widget class="QGroupBox" name="discord_group"> <property name="title"> <string>Discord Presence</string> </property> <layout class="QVBoxLayout" name="verticalLayout_21"> <item> <widget class="QCheckBox" name="toggle_discordrpc"> <property name="text"> <string>Show Current Game in your Discord Status</string> </property> </widget> </item> </layout> </widget> </item> <item> <spacer name="verticalSpacer"> <property name="orientation"> <enum>Qt::Vertical</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>20</width> <height>40</height> </size> </property> </spacer> </item> </layout> </widget> <resources/> <connections/> </ui>
{ "pile_set_name": "Github" }
- name: network.interface.name overwrite: true type: keyword default_field: false description: > Name of the network interface where the traffic has been observed. - name: rsa overwrite: true type: group default_field: false fields: - name: internal overwrite: true type: group fields: - name: msg overwrite: true type: keyword description: This key is used to capture the raw message that comes into the Log Decoder - name: messageid overwrite: true type: keyword - name: event_desc overwrite: true type: keyword - name: message overwrite: true type: keyword description: This key captures the contents of instant messages - name: time overwrite: true type: date description: This is the time at which a session hits a NetWitness Decoder. This key should never be used to parse Meta data from a session (Logs/Packets) Directly, this is a Reserved key in NetWitness. - name: level overwrite: true type: long description: Deprecated key defined only in table map. - name: msg_id overwrite: true type: keyword description: This is the Message ID1 value that identifies the exact log parser definition which parses a particular log session. This key should never be used to parse Meta data from a session (Logs/Packets) Directly, this is a Reserved key in NetWitness - name: msg_vid overwrite: true type: keyword description: This is the Message ID2 value that identifies the exact log parser definition which parses a particular log session. This key should never be used to parse Meta data from a session (Logs/Packets) Directly, this is a Reserved key in NetWitness - name: data overwrite: true type: keyword description: Deprecated key defined only in table map. - name: obj_server overwrite: true type: keyword description: Deprecated key defined only in table map. - name: obj_val overwrite: true type: keyword description: Deprecated key defined only in table map. - name: resource overwrite: true type: keyword description: Deprecated key defined only in table map. - name: obj_id overwrite: true type: keyword description: Deprecated key defined only in table map. - name: statement overwrite: true type: keyword description: Deprecated key defined only in table map. - name: audit_class overwrite: true type: keyword description: Deprecated key defined only in table map. - name: entry overwrite: true type: keyword description: Deprecated key defined only in table map. - name: hcode overwrite: true type: keyword description: Deprecated key defined only in table map. - name: inode overwrite: true type: long description: Deprecated key defined only in table map. - name: resource_class overwrite: true type: keyword description: Deprecated key defined only in table map. - name: dead overwrite: true type: long description: Deprecated key defined only in table map. - name: feed_desc overwrite: true type: keyword description: This is used to capture the description of the feed. This key should never be used to parse Meta data from a session (Logs/Packets) Directly, this is a Reserved key in NetWitness - name: feed_name overwrite: true type: keyword description: This is used to capture the name of the feed. This key should never be used to parse Meta data from a session (Logs/Packets) Directly, this is a Reserved key in NetWitness - name: cid overwrite: true type: keyword description: This is the unique identifier used to identify a NetWitness Concentrator. This key should never be used to parse Meta data from a session (Logs/Packets) Directly, this is a Reserved key in NetWitness - name: device_class overwrite: true type: keyword description: This is the Classification of the Log Event Source under a predefined fixed set of Event Source Classifications. This key should never be used to parse Meta data from a session (Logs/Packets) Directly, this is a Reserved key in NetWitness - name: device_group overwrite: true type: keyword description: This key should never be used to parse Meta data from a session (Logs/Packets) Directly, this is a Reserved key in NetWitness - name: device_host overwrite: true type: keyword description: This is the Hostname of the log Event Source sending the logs to NetWitness. This key should never be used to parse Meta data from a session (Logs/Packets) Directly, this is a Reserved key in NetWitness - name: device_ip overwrite: true type: ip description: This is the IPv4 address of the Log Event Source sending the logs to NetWitness. This key should never be used to parse Meta data from a session (Logs/Packets) Directly, this is a Reserved key in NetWitness - name: device_ipv6 overwrite: true type: ip description: This is the IPv6 address of the Log Event Source sending the logs to NetWitness. This key should never be used to parse Meta data from a session (Logs/Packets) Directly, this is a Reserved key in NetWitness - name: device_type overwrite: true type: keyword description: This is the name of the log parser which parsed a given session. This key should never be used to parse Meta data from a session (Logs/Packets) Directly, this is a Reserved key in NetWitness - name: device_type_id overwrite: true type: long description: Deprecated key defined only in table map. - name: did overwrite: true type: keyword description: This is the unique identifier used to identify a NetWitness Decoder. This key should never be used to parse Meta data from a session (Logs/Packets) Directly, this is a Reserved key in NetWitness - name: entropy_req overwrite: true type: long description: This key is only used by the Entropy Parser, the Meta Type can be either UInt16 or Float32 based on the configuration - name: entropy_res overwrite: true type: long description: This key is only used by the Entropy Parser, the Meta Type can be either UInt16 or Float32 based on the configuration - name: event_name overwrite: true type: keyword description: Deprecated key defined only in table map. - name: feed_category overwrite: true type: keyword description: This is used to capture the category of the feed. This key should never be used to parse Meta data from a session (Logs/Packets) Directly, this is a Reserved key in NetWitness - name: forward_ip overwrite: true type: ip description: This key should be used to capture the IPV4 address of a relay system which forwarded the events from the original system to NetWitness. - name: forward_ipv6 overwrite: true type: ip description: This key is used to capture the IPV6 address of a relay system which forwarded the events from the original system to NetWitness. This key should never be used to parse Meta data from a session (Logs/Packets) Directly, this is a Reserved key in NetWitness - name: header_id overwrite: true type: keyword description: This is the Header ID value that identifies the exact log parser header definition that parses a particular log session. This key should never be used to parse Meta data from a session (Logs/Packets) Directly, this is a Reserved key in NetWitness - name
{ "pile_set_name": "Github" }
{ "config": { "abort": { "already_setup": "\u50c5\u80fd\u8a2d\u5b9a\u4e00\u7d44 Heos \u9023\u7dda\uff0c\u5c07\u652f\u63f4\u7db2\u8def\u4e2d\u6240\u6709\u5c0d\u61c9\u8a2d\u5099\u3002" }, "error": { "connection_failure": "\u7121\u6cd5\u9023\u7dda\u81f3\u6307\u5b9a\u4e3b\u6a5f\u7aef\u3002" }, "step": { "user": { "data": { "host": "\u4e3b\u6a5f\u7aef" }, "description": "\u8acb\u8f38\u5165\u4e3b\u6a5f\u6bb5\u540d\u7a31\u6216 Heos \u8a2d\u5099 IP \u4f4d\u5740\uff08\u5df2\u900f\u904e\u6709\u7dda\u7db2\u8def\u9023\u7dda\uff09\u3002", "title": "\u9023\u7dda\u81f3 Heos" } } } }
{ "pile_set_name": "Github" }
/* How to Hook with Logos Hooks are written with syntax similar to that of an Objective-C @implementation. You don't need to #include <substrate.h>, it will be done automatically, as will the generation of a class list and an automatic constructor. %hook ClassName // Hooking a class method + (id)sharedInstance { return %orig; } // Hooking an instance method with an argument. - (void)messageName:(int)argument { %log; // Write a message about this call, including its class, name and arguments, to the system log. %orig; // Call through to the original function with its original arguments. %orig(nil); // Call through to the original function with a custom argument. // If you use %orig(), you MUST supply all arguments (except for self and _cmd, the automatically generated ones.) } // Hooking an instance method with no arguments. - (id)noArguments { %log; id awesome = %orig; [awesome doSomethingElse]; return awesome; } // Always make sure you clean up after yourself; Not doing so could have grave consequences! %end */
{ "pile_set_name": "Github" }
// // Copyright 2016 Pixar // // Licensed under the Apache License, Version 2.0 (the "Apache License") // with the following modification; you may not use this file except in // compliance with the Apache License and the following modification to it: // Section 6. Trademarks. is deleted and replaced with: // // 6. Trademarks. This License does not grant permission to use the trade // names, trademarks, service marks, or product names of the Licensor // and its affiliates, except as required to comply with Section 4(c) of // the License and to reproduce the content of the NOTICE file. // // You may obtain a copy of the Apache License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the Apache License with the above modification is // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the Apache License for the specific // language governing permissions and limitations under the Apache License. // #include "pxr/pxr.h" #include "pxr/usd/pcp/layerPrefetchRequest.h" #include "pxr/usd/pcp/layerStackRegistry.h" #include "pxr/usd/sdf/layerUtils.h" #include "pxr/base/work/arenaDispatcher.h" #include "pxr/base/work/threadLimits.h" #include <tbb/spin_mutex.h> PXR_NAMESPACE_OPEN_SCOPE namespace { struct _Opener { explicit _Opener(const Pcp_MutedLayers& mutedLayers, std::set<SdfLayerRefPtr> *retainedLayers) : _mutedLayers(mutedLayers) , _retainedLayers(retainedLayers) {} ~_Opener() { _dispatcher.Wait(); } void OpenSublayers(const SdfLayerRefPtr &layer, const SdfLayer::FileFormatArguments &layerArgs) { TF_FOR_ALL(path, layer->GetSubLayerPaths()) { _dispatcher.Run( &_Opener::_OpenSublayer, this, *path, layer, layerArgs); } } private: void _OpenSublayer(std::string path, const SdfLayerRefPtr &anchorLayer, const SdfLayer::FileFormatArguments &layerArgs) { if (_mutedLayers.IsLayerMuted(anchorLayer, path)) { return; } // Open this specific sublayer path. // The call to SdfFindOrOpenRelativeToLayer() may take some time, // potentially multiple seconds. if (SdfLayerRefPtr sublayer = SdfFindOrOpenRelativeToLayer(anchorLayer, &path, layerArgs)) { // Retain this sublayer. bool didInsert; { tbb::spin_mutex::scoped_lock lock(_retainedLayersMutex); didInsert = _retainedLayers->insert(sublayer).second; } // Open the nested sublayers. Only do this if we haven't seen this // layer before, i.e. didInsert is true. if (didInsert) OpenSublayers(sublayer, layerArgs); } } WorkArenaDispatcher _dispatcher; const Pcp_MutedLayers& _mutedLayers; std::set<SdfLayerRefPtr> *_retainedLayers; mutable tbb::spin_mutex _retainedLayersMutex; }; } // anon void PcpLayerPrefetchRequest::RequestSublayerStack( const SdfLayerRefPtr &layer, const SdfLayer::FileFormatArguments &args) { _sublayerRequests.insert(std::make_pair(layer, args)); } void PcpLayerPrefetchRequest::Run(const Pcp_MutedLayers& mutedLayers) { if (WorkGetConcurrencyLimit() <= 1) { // Do not bother pre-fetching if we do not have extra threads // available. return; } // Release the GIL so we don't deadlock when Sd tries to get a path // resolver (which does ref-counting on the resolver, which requires // the GIL to manage TfRefBase identity-uniqueness). TF_PY_ALLOW_THREADS_IN_SCOPE(); std::set<_Request> requests; requests.swap(_sublayerRequests); // Open all the sublayers in the request. _Opener opener(mutedLayers, &_retainedLayers); TF_FOR_ALL(req, requests) opener.OpenSublayers(req->first, req->second); } PXR_NAMESPACE_CLOSE_SCOPE
{ "pile_set_name": "Github" }
; ; ANSI Video handling for the MSX ; ; Handles colors ; ; Scrollup ; ; Stefano Bodrato - Sept. 2017 ; ; $Id: f_ansi_scrollup_nobios.asm $ ; SECTION code_clib PUBLIC ansi_SCROLLUP PUBLIC __tms9918_scroll_buffer EXTERN __tms9918_attribute EXTERN LDIRVM EXTERN LDIRMV EXTERN FILVRM .ansi_SCROLLUP push ix ld b,23 ld hl,256 .scloop push bc push hl ld de,__tms9918_scroll_buffer ld bc,256 call LDIRMV pop hl push hl ld de,-256 add hl,de ld de,__tms9918_scroll_buffer ld bc,256 ex de,hl call LDIRVM pop hl push hl ld de,8192 add hl,de push hl ld de,__tms9918_scroll_buffer ld bc,256 call LDIRMV pop hl ld de,-256 add hl,de ld de,__tms9918_scroll_buffer ld bc,256 ex de,hl call LDIRVM pop hl inc h pop bc djnz scloop dec h xor a ld bc,256 call FILVRM pop ix ret SECTION bss_clib .__tms9918_scroll_buffer defs 256
{ "pile_set_name": "Github" }
// mkerrors.sh -Wall -Werror -static -I/tmp/include -m64 // Code generated by the command above; see README.md. DO NOT EDIT. // +build amd64,linux // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 _const.go package unix import "syscall" const ( AF_ALG = 0x26 AF_APPLETALK = 0x5 AF_ASH = 0x12 AF_ATMPVC = 0x8 AF_ATMSVC = 0x14 AF_AX25 = 0x3 AF_BLUETOOTH = 0x1f AF_BRIDGE = 0x7 AF_CAIF = 0x25 AF_CAN = 0x1d AF_DECnet = 0xc AF_ECONET = 0x13 AF_FILE = 0x1 AF_IB = 0x1b AF_IEEE802154 = 0x24 AF_INET = 0x2 AF_INET6 = 0xa AF_IPX = 0x4 AF_IRDA = 0x17 AF_ISDN = 0x22 AF_IUCV = 0x20 AF_KCM = 0x29 AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 AF_MAX = 0x2c AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 AF_NETROM = 0x6 AF_NFC = 0x27 AF_PACKET = 0x11 AF_PHONET = 0x23 AF_PPPOX = 0x18 AF_QIPCRTR = 0x2a AF_RDS = 0x15 AF_ROSE = 0xb AF_ROUTE = 0x10 AF_RXRPC = 0x21 AF_SECURITY = 0xe AF_SMC = 0x2b AF_SNA = 0x16 AF_TIPC = 0x1e AF_UNIX = 0x1 AF_UNSPEC = 0x0 AF_VSOCK = 0x28 AF_WANPIPE = 0x19 AF_X25 = 0x9 ALG_OP_DECRYPT = 0x0 ALG_OP_ENCRYPT = 0x1 ALG_SET_AEAD_ASSOCLEN = 0x4 ALG_SET_AEAD_AUTHSIZE = 0x5 ALG_SET_IV = 0x2 ALG_SET_KEY = 0x1 ALG_SET_OP = 0x3 ARPHRD_6LOWPAN = 0x339 ARPHRD_ADAPT = 0x108 ARPHRD_APPLETLK = 0x8 ARPHRD_ARCNET = 0x7 ARPHRD_ASH = 0x30d ARPHRD_ATM = 0x13 ARPHRD_AX25 = 0x3 ARPHRD_BIF = 0x307 ARPHRD_CAIF = 0x336 ARPHRD_CAN = 0x118 ARPHRD_CHAOS = 0x5 ARPHRD_CISCO = 0x201 ARPHRD_CSLIP = 0x101 ARPHRD_CSLIP6 = 0x103 ARPHRD_DDCMP = 0x205 ARPHRD_DLCI = 0xf ARPHRD_ECONET = 0x30e ARPHRD_EETHER = 0x2 ARPHRD_ETHER = 0x1 ARPHRD_EUI64 = 0x1b ARPHRD_FCAL = 0x311 ARPHRD_FCFABRIC = 0x313 ARPHRD_FCPL = 0x312 ARPHRD_FCPP = 0x310 ARPHRD_FDDI = 0x306 ARPHRD_FRAD = 0x302 ARPHRD_HDLC = 0x201 ARPHRD_HIPPI = 0x30c ARPHRD_HWX25 = 0x110 ARPHRD_IEEE1394 = 0x18 ARPHRD_IEEE802 = 0x6 ARPHRD_IEEE80211 = 0x321 ARPHRD_IEEE80211_PRISM = 0x322 ARPHRD_IEEE80211_RADIOTAP = 0x323 ARPHRD_IEEE802154 = 0x324 ARPHRD_IEEE802154_MONITOR = 0x325 ARPHRD_IEEE802_TR = 0x320 ARPHRD_INFINIBAND = 0x20 ARPHRD_IP6GRE = 0x337 ARPHRD_IPDDP = 0x309 ARPHRD_IPGRE = 0x30a ARPHRD_IRDA = 0x30f ARPHRD_LAPB = 0x204 ARPHRD_LOCALTLK = 0x305 ARPHRD_LOOPBACK = 0x304 ARPHRD_METRICOM = 0x17 ARPHRD_NETLINK = 0x338 ARPHRD_NETROM = 0x0 ARPHRD_NONE = 0xfffe ARPHRD_PHONET = 0x334 ARPHRD_PHONET_PIPE = 0x335 ARPHRD_PIMREG = 0x30b ARPHRD_PPP = 0x200 ARPHRD_PRONET = 0x4 ARPHRD_RAWHDLC = 0x206 ARPHRD_ROSE = 0x10e ARPHRD_RSRVD = 0x104 ARPHRD_SIT = 0x308 ARPHRD_SKIP = 0x303 ARPHRD_SLIP = 0x100 ARPHRD_SLIP6 = 0x102 ARPHRD_TUNNEL = 0x300 ARPHRD_TUNNEL6 = 0x301 ARPHRD_VOID = 0xffff ARPHRD_VSOCKMON = 0x33a ARPHRD_X25 = 0x10f B0 = 0x0 B1000000 = 0x1008 B110 = 0x3 B115200 = 0x1002 B1152000 = 0x1009 B1200 = 0x9 B134 = 0x4 B150 = 0x5 B1500000 = 0x100a B1800 = 0xa B19200 = 0xe B200 = 0x6 B2000000 = 0x100b B230400 = 0x1003 B2400 = 0xb B2500000 = 0x100c B300 = 0x7 B3000000 = 0x100d B3500000 = 0x100e B38400 = 0xf B4000000 = 0x100f B460800 = 0x1004 B4800 = 0xc B50 = 0x1 B500000 = 0x1005 B57600 = 0x1001 B576000 = 0x1006 B600 =
{ "pile_set_name": "Github" }
// Copyright 2005 Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // ---- // Author: lar@google.com (Laramie Leavitt) // // Template metaprogramming utility functions. // // This code is compiled directly on many platforms, including client // platforms like Windows, Mac, and embedded systems. Before making // any changes here, make sure that you're not breaking any platforms. // // // The names chosen here reflect those used in tr1 and the boost::mpl // library, there are similar operations used in the Loki library as // well. I prefer the boost names for 2 reasons: // 1. I think that portions of the Boost libraries are more likely to // be included in the c++ standard. // 2. It is not impossible that some of the boost libraries will be // included in our own build in the future. // Both of these outcomes means that we may be able to directly replace // some of these with boost equivalents. // #ifndef GOOGLE_PROTOBUF_TEMPLATE_UTIL_H_ #define GOOGLE_PROTOBUF_TEMPLATE_UTIL_H_ namespace google { namespace protobuf { namespace internal { // Types small_ and big_ are guaranteed such that sizeof(small_) < // sizeof(big_) typedef char small_; struct big_ { char dummy[2]; }; // Identity metafunction. template <class T> struct identity_ { typedef T type; }; // integral_constant, defined in tr1, is a wrapper for an integer // value. We don't really need this generality; we could get away // with hardcoding the integer type to bool. We use the fully // general integer_constant for compatibility with tr1. template<class T, T v> struct integral_constant { static const T value = v; typedef T value_type; typedef integral_constant<T, v> type; }; template <class T, T v> const T integral_constant<T, v>::value; // Abbreviations: true_type and false_type are structs that represent boolean // true and false values. Also define the boost::mpl versions of those names, // true_ and false_. typedef integral_constant<bool, true> true_type; typedef integral_constant<bool, false> false_type; typedef true_type true_; typedef false_type false_; // if_ is a templatized conditional statement. // if_<cond, A, B> is a compile time evaluation of cond. // if_<>::type contains A if cond is true, B otherwise. template<bool cond, typename A, typename B> struct if_{ typedef A type; }; template<typename A, typename B> struct if_<false, A, B> { typedef B type; }; // type_equals_ is a template type comparator, similar to Loki IsSameType. // type_equals_<A, B>::value is true iff "A" is the same type as "B". // // New code should prefer base::is_same, defined in base/type_traits.h. // It is functionally identical, but is_same is the standard spelling. template<typename A, typename B> struct type_equals_ : public false_ { }; template<typename A> struct type_equals_<A, A> : public true_ { }; // and_ is a template && operator. // and_<A, B>::value evaluates "A::value && B::value". template<typename A, typename B> struct and_ : public integral_constant<bool, (A::value && B::value)> { }; // or_ is a template || operator. // or_<A, B>::value evaluates "A::value || B::value". template<typename A, typename B> struct or_ : public integral_constant<bool, (A::value || B::value)> { }; } // namespace internal } // namespace protobuf } // namespace google #endif // GOOGLE_PROTOBUF_TEMPLATE_UTIL_H_
{ "pile_set_name": "Github" }
/** * +--------------------------------------------------------------------+ * | This HTML_CodeSniffer file is Copyright (c) | * | Squiz Australia Pty Ltd ABN 53 131 581 247 | * +--------------------------------------------------------------------+ * | IMPORTANT: Your use of this Software is subject to the terms of | * | the Licence provided in the file licence.txt. If you cannot find | * | this file please contact Squiz (www.squiz.com.au) so we may | * | provide you a copy. | * +--------------------------------------------------------------------+ * */ _global.HTMLCS_Section508_Sniffs_I = { /** * Determines the elements to register for processing. * * Each element of the returned array can either be an element name, or "_top" * which is the top element of the tested code. * * @returns {Array} The list of elements. */ register: function() { return [ 'frame', 'iframe', 'object' ]; }, /** * Process the registered element. * * @param {DOMNode} element The element registered. * @param {DOMNode} top The top element of the tested code. */ process: function(element, top) { var nodeName = element.nodeName.toLowerCase(); var hasTitle = element.hasAttribute('title'); var titleEmpty = true; if (hasTitle === true) { titleEmpty = HTMLCS.util.isStringEmpty(element.getAttribute('title')); } if (titleEmpty === true) { HTMLCS.addMessage(HTMLCS.ERROR, top, 'This ' + nodeName + ' element is missing title text. Frames should be titled with text that facilitates frame identification and navigation.', 'Frames'); } } };
{ "pile_set_name": "Github" }
using System; using System.ComponentModel; using WinForms = System.Windows.Forms; namespace StarryEyes.Nightmare.Windows { public static class SystemInformation { public static string ComputerName { get { return WinForms.SystemInformation.ComputerName; } } public static string UserName { get { return WinForms.SystemInformation.UserName; } } public static bool MouseButtonsSwapped { get { return WinForms.SystemInformation.MouseButtonsSwapped; } } public static int MouseWheelScrollDelta { get { return WinForms.SystemInformation.MouseWheelScrollDelta; } } public static uint DesktopHeapSize { get { var hDesktop = NativeMethods.OpenInputDesktop(0, false, NativeMethods.GENERIC_READ); if (hDesktop == IntPtr.Zero) { throw new Win32Exception(); } try { var buffer = new byte[4]; // unsigned long(32bit) uint n; if (!NativeMethods.GetUserObjectInformation(hDesktop, NativeMethods.UOI_HEAPSIZE, buffer, sizeof(byte) * 4, out n)) { throw new Win32Exception(); } return BitConverter.ToUInt32(buffer, 0); } finally { NativeMethods.CloseDesktop(hDesktop); } } } } }
{ "pile_set_name": "Github" }
package command import ( "flag" "fmt" "strings" "github.com/mitchellh/cli" ) // RTTCommand is a Command implementation that allows users to query the // estimated round trip time between nodes using network coordinates. type RTTCommand struct { Ui cli.Ui } func (c *RTTCommand) Help() string { helpText := ` Usage: serf rtt [options] node1 [node2] Estimates the round trip time between two nodes using Serf's network coordinate model of the cluster. At least one node name is required. If the second node name isn't given, it is set to the agent's node name. Note that these are node names as known to Serf as "serf members" would show, not IP addresses. Options: -rpc-addr=127.0.0.1:7373 RPC address of the Serf agent. -rpc-auth="" RPC auth token of the Serf agent. ` return strings.TrimSpace(helpText) } func (c *RTTCommand) Run(args []string) int { cmdFlags := flag.NewFlagSet("rtt", flag.ContinueOnError) cmdFlags.Usage = func() { c.Ui.Output(c.Help()) } rpcAddr := RPCAddrFlag(cmdFlags) rpcAuth := RPCAuthFlag(cmdFlags) if err := cmdFlags.Parse(args); err != nil { return 1 } // Create the RPC client. client, err := RPCClient(*rpcAddr, *rpcAuth) if err != nil { c.Ui.Error(fmt.Sprintf("Error connecting to Serf agent: %s", err)) return 1 } defer client.Close() // They must provide at least one node. nodes := cmdFlags.Args() if len(nodes) == 1 { stats, err := client.Stats() if err != nil { c.Ui.Error(fmt.Sprintf("Error querying agent: %s", err)) return 1 } nodes = append(nodes, stats["agent"]["name"]) } else if len(nodes) != 2 { c.Ui.Error("One or two node names must be specified") c.Ui.Error("") c.Ui.Error(c.Help()) return 1 } // Get the coordinates. coord1, err := client.GetCoordinate(nodes[0]) if err != nil { c.Ui.Error(fmt.Sprintf("Error getting coordinates: %s", err)) return 1 } if coord1 == nil { c.Ui.Error(fmt.Sprintf("Could not find a coordinate for node %q", nodes[0])) return 1 } coord2, err := client.GetCoordinate(nodes[1]) if err != nil { c.Ui.Error(fmt.Sprintf("Error getting coordinates: %s", err)) return 1 } if coord2 == nil { c.Ui.Error(fmt.Sprintf("Could not find a coordinate for node %q", nodes[1])) return 1 } // Report the round trip time. dist := fmt.Sprintf("%.3f ms", coord1.DistanceTo(coord2).Seconds()*1000.0) c.Ui.Output(fmt.Sprintf("Estimated %s <-> %s rtt: %s", nodes[0], nodes[1], dist)) return 0 } func (c *RTTCommand) Synopsis() string { return "Estimates network round trip time between nodes" }
{ "pile_set_name": "Github" }
load( "//lingvo:lingvo.bzl", "lingvo_py_binary", ) package( default_visibility = ["//visibility:public"], ) licenses(["notice"]) exports_files(["LICENSE"]) config_setting( name = "cuda", values = {"define": "using_cuda=true"}, ) py_library( name = "base_runner", srcs = ["base_runner.py"], srcs_version = "PY3", deps = [ ":base_trial", ":compat", "//lingvo/core:cluster_factory", "//lingvo/core:early_stop", "//lingvo/core:py_utils", # Implicit tensorflow py proto dependency. ], ) py_library( name = "base_trial", srcs = ["base_trial.py"], srcs_version = "PY3", deps = [ "//lingvo/core:hyperparams", ], ) py_library( name = "compat", srcs = ["compat.py"], srcs_version = "PY3", deps = [ # Implicit absl.flags dependency. # Implicit absl.logging dependency. # Implicit tensorflow dependency. ], ) py_test( name = "compat_test", srcs = ["compat_test.py"], python_version = "PY3", srcs_version = "PY3", deps = [ ":compat", ], ) py_library( name = "model_imports_no_params", srcs = ["model_imports.py"], srcs_version = "PY3", ) # Depend on this for access to the model registry with params for all tasks as # transitive deps. Only py_binary should depend on this target. py_library( name = "model_imports", srcs_version = "PY3", deps = [ ":model_imports_no_params", "//lingvo/tasks:all_params", ], ) py_test( name = "model_import_test", srcs = ["model_import_test.py"], python_version = "PY3", srcs_version = "PY3", deps = [ ":compat", ":model_imports_no_params", ], ) py_library( name = "models_test_helper", testonly = 1, srcs = ["models_test_helper.py"], srcs_version = "PY3", deps = [ ":compat", "//lingvo/core:base_input_generator", "//lingvo/core:base_model", "//lingvo/core:bn_layers", "//lingvo/core:py_utils", "//lingvo/core:test_utils", ], ) py_test( name = "models_test", srcs = ["models_test.py"], python_version = "PY3", srcs_version = "PY3", deps = [ ":compat", ":model_imports", ":model_registry", ":model_registry_test_lib", ":models_test_helper", "//lingvo/core:base_model", ], ) py_library( name = "model_registry", srcs = ["model_registry.py"], srcs_version = "PY3", deps = [ ":compat", ":model_imports_no_params", "//lingvo/core:base_model_params", ], ) py_test( name = "model_registry_test", srcs = ["model_registry_test.py"], python_version = "PY3", srcs_version = "PY3", deps = [":model_registry_test_lib"], ) py_library( name = "model_registry_test_lib", testonly = 1, srcs = ["model_registry_test.py"], srcs_version = "PY3", deps = [ ":compat", ":model_registry", "//lingvo/core:base_input_generator", "//lingvo/core:base_model", "//lingvo/core:base_model_params", "//lingvo/core:test_utils", ], ) py_library( name = "datasets_lib", srcs = ["datasets.py"], srcs_version = "PY3", ) py_test( name = "datasets_test", srcs = ["datasets_test.py"], python_version = "PY3", srcs_version = "PY3", deps = [ ":compat", ":datasets_lib", "//lingvo/core:test_utils", ], ) py_library( name = "trainer_lib", srcs = ["trainer.py"], srcs_version = "PY3", deps = [ ":base_trial", ":compat", ":datasets_lib", ":executor_lib", ":model_imports_no_params", ":model_registry", # Implicit network file system dependency. "//lingvo:base_runner", # Implicit IPython dependency. "//lingvo/core:base_layer", "//lingvo/core:base_model", "//lingvo/core:base_model_params", "//lingvo/core:checkpointer_lib", "//lingvo/core:cluster_factory", "//lingvo/core:inference_graph_exporter", "//lingvo/core:metrics", "//lingvo/core:py_utils", "//lingvo/core:summary_utils", # Implicit numpy dependency. # Implicit tensorflow grpc dependency. ], ) lingvo_py_binary( name = "trainer", srcs = [":trainer_lib"], python_version = "PY3", srcs_version = "PY3", deps = [ ":model_imports", ":trainer_lib", ], ) py_test( name = "trainer_test", size = "large", timeout = "long", srcs = ["trainer_test.py"], python_version = "PY3", shard_count = 12, srcs_version = "PY3", tags = [ "noasan", "nomsan", "notsan", "optonly", ], deps = [ ":base_trial", ":compat", ":model_registry", ":trainer_lib", # Implicit absl.testing.flagsaver dependency. "//lingvo/core:base_input_generator", "//lingvo/core:base_model", "//lingvo/core:base_model_params", "//lingvo/core:hyperparams", "//lingvo/core:inference_graph_py_pb2", "//lingvo/core:test_utils", "//lingvo/core:trainer_test_utils", "//lingvo/tasks/image:input_generator", "//lingvo/tasks/image/params:mnist", # build_cleaner: keep "//lingvo/tasks/punctuator/params:codelab", # build_cleaner: keep # Implicit numpy dependency. ], ) py_library( name = "trainer_test_lib", testonly = 1, srcs = ["trainer_test.py"], srcs_version = "PY3", tags = [ "noasan", "nomsan", "notsan", "optonly", ], deps
{ "pile_set_name": "Github" }
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr> // Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com> // // 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/. #ifndef EIGEN_GENERIC_PACKET_MATH_H #define EIGEN_GENERIC_PACKET_MATH_H namespace Eigen { namespace internal { /** \internal * \file GenericPacketMath.h * * Default implementation for types not supported by the vectorization. * In practice these functions are provided to make easier the writing * of generic vectorized code. */ #ifndef EIGEN_DEBUG_ALIGNED_LOAD #define EIGEN_DEBUG_ALIGNED_LOAD #endif #ifndef EIGEN_DEBUG_UNALIGNED_LOAD #define EIGEN_DEBUG_UNALIGNED_LOAD #endif #ifndef EIGEN_DEBUG_ALIGNED_STORE #define EIGEN_DEBUG_ALIGNED_STORE #endif #ifndef EIGEN_DEBUG_UNALIGNED_STORE #define EIGEN_DEBUG_UNALIGNED_STORE #endif struct default_packet_traits { enum { HasHalfPacket = 0, HasAdd = 1, HasSub = 1, HasMul = 1, HasNegate = 1, HasAbs = 1, HasArg = 0, HasAbs2 = 1, HasMin = 1, HasMax = 1, HasConj = 1, HasSetLinear = 1, HasBlend = 0, HasDiv = 0, HasSqrt = 0, HasRsqrt = 0, HasExp = 0, HasLog = 0, HasLog1p = 0, HasLog10 = 0, HasPow = 0, HasSin = 0, HasCos = 0, HasTan = 0, HasASin = 0, HasACos = 0, HasATan = 0, HasSinh = 0, HasCosh = 0, HasTanh = 0, HasLGamma = 0, HasDiGamma = 0, HasZeta = 0, HasPolygamma = 0, HasErf = 0, HasErfc = 0, HasIGamma = 0, HasIGammac = 0, HasBetaInc = 0, HasRound = 0, HasFloor = 0, HasCeil = 0, HasSign = 0 }; }; template<typename T> struct packet_traits : default_packet_traits { typedef T type; typedef T half; enum { Vectorizable = 0, size = 1, AlignedOnScalar = 0, HasHalfPacket = 0 }; enum { HasAdd = 0, HasSub = 0, HasMul = 0, HasNegate = 0, HasAbs = 0, HasAbs2 = 0, HasMin = 0, HasMax = 0, HasConj = 0, HasSetLinear = 0 }; }; template<typename T> struct packet_traits<const T> : packet_traits<T> { }; template <typename Src, typename Tgt> struct type_casting_traits { enum { VectorizedCast = 0, SrcCoeffRatio = 1, TgtCoeffRatio = 1 }; }; /** \internal \returns static_cast<TgtType>(a) (coeff-wise) */ template <typename SrcPacket, typename TgtPacket> EIGEN_DEVICE_FUNC inline TgtPacket pcast(const SrcPacket& a) { return static_cast<TgtPacket>(a); } template <typename SrcPacket, typename TgtPacket> EIGEN_DEVICE_FUNC inline TgtPacket pcast(const SrcPacket& a, const SrcPacket& /*b*/) { return static_cast<TgtPacket>(a); } template <typename SrcPacket, typename TgtPacket> EIGEN_DEVICE_FUNC inline TgtPacket pcast(const SrcPacket& a, const SrcPacket& /*b*/, const SrcPacket& /*c*/, const SrcPacket& /*d*/) { return static_cast<TgtPacket>(a); } /** \internal \returns a + b (coeff-wise) */ template<typename Packet> EIGEN_DEVICE_FUNC inline Packet padd(const Packet& a, const Packet& b) { return a+b; } /** \internal \returns a - b (coeff-wise) */ template<typename Packet> EIGEN_DEVICE_FUNC inline Packet psub(const Packet& a, const Packet& b) { return a-b; } /** \internal \returns -a (coeff-wise) */ template<typename Packet> EIGEN_DEVICE_FUNC inline Packet pnegate(const Packet& a) { return -a; } /** \internal \returns conj(a) (coeff-wise) */ template<typename Packet> EIGEN_DEVICE_FUNC inline Packet pconj(const Packet& a) { return numext::conj(a); } /** \internal \returns a * b (coeff-wise) */ template<typename Packet> EIGEN_DEVICE_FUNC inline Packet pmul(const Packet& a, const Packet& b) { return a*b; } /** \internal \returns a / b (coeff-wise) */ template<typename Packet> EIGEN_DEVICE_FUNC inline Packet pdiv(const Packet& a, const Packet& b) { return a/b; } /** \internal \returns the min of \a a and \a b (coeff-wise) */ template<typename Packet> EIGEN_DEVICE_FUNC inline Packet pmin(const Packet& a, const Packet& b) { return numext::mini(a, b); } /** \internal \returns the max of \a a and \a b (coeff-wise) */ template<typename Packet> EIGEN_DEVICE_FUNC inline Packet pmax(const Packet& a, const Packet& b) { return numext::maxi(a, b); } /** \internal \returns the absolute value of \a a */ template<typename Packet> EIGEN_DEVICE_FUNC inline Packet pabs(const Packet& a) { using std::abs; return abs(a); } /** \internal \returns the phase angle of \a a */ template<typename Packet> EIGEN_DEVICE_FUNC inline Packet parg(const Packet& a) { using numext::arg; return arg(a); } /** \internal \returns the bitwise and of \a a and \a b */ template<typename Packet> EIGEN_DEVICE_FUNC inline Packet pand(const Packet& a, const Packet& b) { return a & b; } /** \internal \returns the bitwise or of \a a and \a b */ template<typename Packet> EIGEN_DEVICE_FUNC inline Packet por(const Packet& a, const Packet& b) { return a | b; } /** \internal \returns the bitwise xor of \a a and \a b */ template<typename Packet> EIGEN_DEVICE_FUNC inline Packet pxor(const Packet& a, const Packet& b) { return a ^ b; } /** \internal \returns the bitwise andnot of \a a and \a b */ template<typename Packet> EIGEN_DEVICE_FUNC inline Packet pandnot(const Packet& a, const Packet& b) { return a & (!b); } /** \internal \returns a packet version of \a *from, from must be 16 bytes aligned */ template<typename Packet> EIGEN_DEVICE_FUNC inline Packet pload(const typename unpacket_traits<Packet>::type* from) { return *from; } /** \internal \returns a packet version of \a *from, (un-aligned load) */ template<typename Packet> EIGEN_DEVICE_FUNC inline Packet ploadu(const typename unpacket_traits<Packet>::type* from
{ "pile_set_name": "Github" }
package com.jojoldu.blogcode.springbootjpa.querydsl.store; import com.jojoldu.blogcode.springbootjpa.domain.QStore; import com.jojoldu.blogcode.springbootjpa.domain.Store; import com.querydsl.jpa.impl.JPAQueryFactory; import lombok.RequiredArgsConstructor; import java.util.List; import static com.jojoldu.blogcode.springbootjpa.domain.QStore.store; /** * Created by jojoldu@gmail.com on 03/11/2019 * Blog : http://jojoldu.tistory.com * Github : http://github.com/jojoldu */ @RequiredArgsConstructor public class StoreQuerydslRepositoryImpl implements StoreQuerydslRepositoryCustom { private final JPAQueryFactory queryFactory; @Override public List<Store> findAllByQuerydsl () { return queryFactory.selectFrom(store) .join(store.employees).fetchJoin() .join(store.products).fetchJoin() .fetch(); } }
{ "pile_set_name": "Github" }
<?php use Illuminate\Foundation\Inspiring; use Illuminate\Support\Facades\Artisan; /* |-------------------------------------------------------------------------- | Console Routes |-------------------------------------------------------------------------- | | This file is where you may define all of your Closure based console | commands. Each Closure is bound to a command instance allowing a | simple approach to interacting with each command's IO methods. | */ Artisan::command('inspire', function () { $this->comment(Inspiring::quote()); })->purpose('Display an inspiring quote');
{ "pile_set_name": "Github" }
// Copyright 2012 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 bn256 // For details of the algorithms used, see "Multiplication and Squaring on // Pairing-Friendly Fields, Devegili et al. // http://eprint.iacr.org/2006/471.pdf. import ( "math/big" ) // gfP6 implements the field of size p⁶ as a cubic extension of gfP2 where τ³=ξ // and ξ=i+3. type gfP6 struct { x, y, z *gfP2 // value is xτ² + yτ + z } func newGFp6(pool *bnPool) *gfP6 { return &gfP6{newGFp2(pool), newGFp2(pool), newGFp2(pool)} } func (e *gfP6) String() string { return "(" + e.x.String() + "," + e.y.String() + "," + e.z.String() + ")" } func (e *gfP6) Put(pool *bnPool) { e.x.Put(pool) e.y.Put(pool) e.z.Put(pool) } func (e *gfP6) Set(a *gfP6) *gfP6 { e.x.Set(a.x) e.y.Set(a.y) e.z.Set(a.z) return e } func (e *gfP6) SetZero() *gfP6 { e.x.SetZero() e.y.SetZero() e.z.SetZero() return e } func (e *gfP6) SetOne() *gfP6 { e.x.SetZero() e.y.SetZero() e.z.SetOne() return e } func (e *gfP6) Minimal() { e.x.Minimal() e.y.Minimal() e.z.Minimal() } func (e *gfP6) IsZero() bool { return e.x.IsZero() && e.y.IsZero() && e.z.IsZero() } func (e *gfP6) IsOne() bool { return e.x.IsZero() && e.y.IsZero() && e.z.IsOne() } func (e *gfP6) Negative(a *gfP6) *gfP6 { e.x.Negative(a.x) e.y.Negative(a.y) e.z.Negative(a.z) return e } func (e *gfP6) Frobenius(a *gfP6, pool *bnPool) *gfP6 { e.x.Conjugate(a.x) e.y.Conjugate(a.y) e.z.Conjugate(a.z) e.x.Mul(e.x, xiTo2PMinus2Over3, pool) e.y.Mul(e.y, xiToPMinus1Over3, pool) return e } // FrobeniusP2 computes (xτ²+yτ+z)^(p²) = xτ^(2p²) + yτ^(p²) + z func (e *gfP6) FrobeniusP2(a *gfP6) *gfP6 { // τ^(2p²) = τ²τ^(2p²-2) = τ²ξ^((2p²-2)/3) e.x.MulScalar(a.x, xiTo2PSquaredMinus2Over3) // τ^(p²) = ττ^(p²-1) = τξ^((p²-1)/3) e.y.MulScalar(a.y, xiToPSquaredMinus1Over3) e.z.Set(a.z) return e } func (e *gfP6) Add(a, b *gfP6) *gfP6 { e.x.Add(a.x, b.x) e.y.Add(a.y, b.y) e.z.Add(a.z, b.z) return e } func (e *gfP6) Sub(a, b *gfP6) *gfP6 { e.x.Sub(a.x, b.x) e.y.Sub(a.y, b.y) e.z.Sub(a.z, b.z) return e } func (e *gfP6) Double(a *gfP6) *gfP6 { e.x.Double(a.x) e.y.Double(a.y) e.z.Double(a.z) return e } func (e *gfP6) Mul(a, b *gfP6, pool *bnPool) *gfP6 { // "Multiplication and Squaring on Pairing-Friendly Fields" // Section 4, Karatsuba method. // http://eprint.iacr.org/2006/471.pdf v0 := newGFp2(pool) v0.Mul(a.z, b.z, pool) v1 := newGFp2(pool) v1.Mul(a.y, b.y, pool) v2 := newGFp2(pool) v2.Mul(a.x, b.x, pool) t0 := newGFp2(pool) t0.Add(a.x, a.y) t1 := newGFp2(pool) t1.Add(b.x, b.y) tz := newGFp2(pool) tz.Mul(t0, t1, pool) tz.Sub(tz, v1) tz.Sub(tz, v2) tz.MulXi(tz, pool) tz.Add(tz, v0) t0.Add(a.y, a.z) t1.Add(b.y, b.z) ty := newGFp2(pool) ty.Mul(t0, t1, pool) ty.Sub(ty, v0) ty.Sub(ty, v1) t0.MulXi(v2, pool) ty.Add(ty, t0) t0.Add(a.x, a.z) t1.Add(b.x, b.z) tx := newGFp2(pool) tx.Mul(t0, t1, pool) tx.Sub(tx, v0) tx.Add(tx, v1) tx.Sub(tx, v2) e.x.Set(tx) e.y.Set(ty) e.z.Set(tz) t0.Put(pool) t1.Put(pool) tx.Put(pool) ty.Put(pool) tz.Put(pool) v0.Put(pool) v1.Put(pool) v2.Put(pool) return e } func (e *gfP6) MulScalar(a *gfP6, b *gfP2, pool *bnPool) *gfP6 { e.x.Mul(a.x, b, pool) e.y.Mul(a.y, b, pool) e.z.Mul(a.z, b, pool) return e } func (e *gfP6) MulGFP(a *gfP6, b *big.Int) *gfP6 { e.x.MulScalar(a.x, b) e.y.MulScalar(a.y, b) e.z.MulScalar(a.z, b) return e } // MulTau computes τ·(aτ²+bτ+c) = bτ²+cτ+aξ func (e *gfP6) MulTau(a *
{ "pile_set_name": "Github" }
##Package: StdCtrls ##Status: Completed (I) ---------------------------------------------------------------------------------------------------- @@JvSystemPopup.pas Summary Contains the TJvSystemPopup component. Author Sébastien Buysse ---------------------------------------------------------------------------------------------------- @@TJvSystemPopup.PositionInMenu Summary Specifies where in the system menu the popup menu items are inserted. Description Use PositionInMenu to specify whether the menu items of the popup menu specified by Popup are inserted at the top or of the system menu, or at the bottom. See Also TJvSystemPopup.Position ---------------------------------------------------------------------------------------------------- @@TJvSystemPopup.Position Summary Specifies in which system menu the popup menu items are inserted. Description Use Position to specify whether the popup menu is inserted in the forms system menu, the application's system menu, or isn't inserted at all. These are the possible values of Position: <TABLE> Value Meaning ------------- --------------------------------------------------------------------------- ppNone The popup menu isn't inserted in a system menu. ppForm The popup menu is inserted in the system menu of the form. Access this system menu by right-clicking on the forms title bar. ppApplication The popup menu is inserted in the system menu of the application. Access this system menu by right-clicking the window button on the taskbar that is associated with the application. </TABLE> See Also TJvSystemPopup.Popup, TJvSystemPopup.PositionInMenu ---------------------------------------------------------------------------------------------------- @@TJvSystemPopup.Popup Summary Identifies a pop-up menu associated with the component. Description Use Popup to associate a pop-up menu with TJvSystemPopup. The component adds the menu items of the pop-up menu to the system menu. See Also TJvSystemPopup.Position ---------------------------------------------------------------------------------------------------- @@TJvSystemPopup.Notification Summary Responds to notifications when objects are about to be created or destroyed. Description Notification is called automatically when components are created or destroyed. After calling the inherited method, Notification checks whether the component specified by the Popup property is about to be destroyed. If the component is going away, Notification sets the Popup property to nil. Parameters AComponent - Identifies the component that is about to be created or destroyed. Operation - Specifies whether the component is about to be created or destroyed. See Also TJvSystemPopup.Popup ---------------------------------------------------------------------------------------------------- @@TJvSystemPopup.Destroy Summary Destroys an instance of TJvSystemPopup Description Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TJvSystemPopup object is not nil and only then calls Destroy. See Also TJvSystemPopup.Create ---------------------------------------------------------------------------------------------------- @@TJvSystemPopup.Create Summary Creates and initializes a new TJvSystemPopup object. Description Use \Create to create and initialize a new TJvSystemPopup object. \Create calls the inherited \Create method, then sets the initial values for the component as follows: * Position is set to ppNone. * PositionInMenu is set to pmTop. Parameters AOwner - A component, typically the form, that is responsible for freeing the component. See Also TJvSystemPopup.Position, TJvSystemPopup.PositionInMenu ---------------------------------------------------------------------------------------------------- @@TJvPositionInMenu.pmBottom Inserts the menu items of the popup menu at the bottom of the system menu. ---------------------------------------------------------------------------------------------------- @@TJvSystemPopup <TITLEIMG TJvSystemPopup> #JVCLInfo <GROUP JVCL.FormsAndApp.Application> <FLAG Component> Summary Adds menu items to the system menu. Description Use TJvSystemPopup to add menu items to the system menu (also known as the system menu or the control menu). Use Popup to associate a pop-up menu with TJvSystemPopup. TJvSystemPopup adds the menu items of the pop-up menu to the system menu. Use Position to specify whether the popup menu is inserted in the forms system menu, the application's system menu, or isn't inserted at all. Use PositionInMenu to specify where the menu items are inserted in the system menu: at the bottom or at the top. ---------------------------------------------------------------------------------------------------- @@TJvPositionInMenu <TITLE TJvPositionInMenu type> Summary Represents different kinds of positions in a system menu. Description Use the TJvPositionInMenu type to specify a position in a system menu. ---------------------------------------------------------------------------------------------------- @@TJvPositionInMenu.pmTop Inserts the menu items of the popup menu at the top of the system menu. ---------------------------------------------------------------------------------------------------- @@TJvSystemPopup.Refresh Summary Refreshes the system menu. Description Call Refresh to refresh the system menu. Refresh resets the window menu back to the default state, Parameters SystemReset - Specifies whether to reset the system menu.
{ "pile_set_name": "Github" }
/* * Copyright 2014 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.spinnaker.cats.cache; import com.netflix.spinnaker.kork.annotations.Beta; import java.util.Collection; import java.util.Map; /** * CacheData is stored in a Cache. Attributes are facts about the CacheData that can be updated by * CachingAgents. Relationships are links to other CacheData. * * <p>Note: Not all caches may support a per record ttl */ @Beta public interface CacheData { String getId(); /** @return The ttl (in seconds) for this CacheData */ int getTtlSeconds(); Map<String, Object> getAttributes(); /** * @return relationships for this CacheData, keyed by type returning a collection of ids for that * type */ Map<String, Collection<String>> getRelationships(); }
{ "pile_set_name": "Github" }
{ "navigationBarTitleText": "打电话" }
{ "pile_set_name": "Github" }
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24.0" android:viewportHeight="24.0"> <path android:fillColor="#FF000000" android:pathData="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8zM15.5,11c0.83,0 1.5,-0.67 1.5,-1.5S16.33,8 15.5,8 14,8.67 14,9.5s0.67,1.5 1.5,1.5zM8.5,11c0.83,0 1.5,-0.67 1.5,-1.5S9.33,8 8.5,8 7,8.67 7,9.5 7.67,11 8.5,11zM12,14c-2.33,0 -4.31,1.46 -5.11,3.5h10.22c-0.8,-2.04 -2.78,-3.5 -5.11,-3.5z"/> </vector>
{ "pile_set_name": "Github" }
// // Copyright (c) ZeroC, Inc. All rights reserved. // package Ice; /** * Instantiates user exceptions. * * @see InputStream#throwException **/ public interface UserExceptionFactory { /** * Instantiate a user exception with the given Slice type ID (such as <code>::Module::MyException</code>) * and throw it. If the implementation does not throw an exception, the Ice run time will fall back * to using its default behavior for instantiating the user exception. * * @param typeId The Slice type ID of the user exception to be created. * @throws UserException A user exception instance corresponding to the type ID. **/ void createAndThrow(String typeId) throws UserException; }
{ "pile_set_name": "Github" }
/* * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.tencentcloudapi.mps.v20190612.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class DescribeSampleSnapshotTemplatesResponse extends AbstractModel{ /** * 符合过滤条件的记录总数。 */ @SerializedName("TotalCount") @Expose private Long TotalCount; /** * 采样截图模板详情列表。 */ @SerializedName("SampleSnapshotTemplateSet") @Expose private SampleSnapshotTemplate [] SampleSnapshotTemplateSet; /** * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 */ @SerializedName("RequestId") @Expose private String RequestId; /** * Get 符合过滤条件的记录总数。 * @return TotalCount 符合过滤条件的记录总数。 */ public Long getTotalCount() { return this.TotalCount; } /** * Set 符合过滤条件的记录总数。 * @param TotalCount 符合过滤条件的记录总数。 */ public void setTotalCount(Long TotalCount) { this.TotalCount = TotalCount; } /** * Get 采样截图模板详情列表。 * @return SampleSnapshotTemplateSet 采样截图模板详情列表。 */ public SampleSnapshotTemplate [] getSampleSnapshotTemplateSet() { return this.SampleSnapshotTemplateSet; } /** * Set 采样截图模板详情列表。 * @param SampleSnapshotTemplateSet 采样截图模板详情列表。 */ public void setSampleSnapshotTemplateSet(SampleSnapshotTemplate [] SampleSnapshotTemplateSet) { this.SampleSnapshotTemplateSet = SampleSnapshotTemplateSet; } /** * Get 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 * @return RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 */ public String getRequestId() { return this.RequestId; } /** * Set 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 * @param RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 */ public void setRequestId(String RequestId) { this.RequestId = RequestId; } /** * Internal implementation, normal users should not use it. */ public void toMap(HashMap<String, String> map, String prefix) { this.setParamSimple(map, prefix + "TotalCount", this.TotalCount); this.setParamArrayObj(map, prefix + "SampleSnapshotTemplateSet.", this.SampleSnapshotTemplateSet); this.setParamSimple(map, prefix + "RequestId", this.RequestId); } }
{ "pile_set_name": "Github" }
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2014-2019 Satpy developers # # This file is part of satpy. # # satpy 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. # # satpy 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 # satpy. If not, see <http://www.gnu.org/licenses/>. """Header and trailer records of SEVIRI native format. """ import numpy as np from satpy.readers.eum_base import (time_cds_short, time_cds, time_cds_expanded) class GSDTRecords(object): """MSG Ground Segment Data Type records. Reference Document (EUM/MSG/SPE/055): MSG Ground Segment Design Specification (GSDS) """ gp_fac_env = np.uint8 gp_fac_id = np.uint8 gp_sc_id = np.uint16 gp_su_id = np.uint32 gp_svce_type = np.uint8 # 4 bytes gp_cpu_address = [ ('Qualifier_1', np.uint8), ('Qualifier_2', np.uint8), ('Qualifier_3', np.uint8), ('Qualifier_4', np.uint8) ] # 22 bytes gp_pk_header = [ ('HeaderVersionNo', np.uint8), ('PacketType', np.uint8), ('SubHeaderType', np.uint8), ('SourceFacilityId', gp_fac_id), ('SourceEnvId', gp_fac_env), ('SourceInstanceId', np.uint8), ('SourceSUId', gp_su_id), ('SourceCPUId', gp_cpu_address), ('DestFacilityId', gp_fac_id), ('DestEnvId', gp_fac_env), ('SequenceCount', np.uint16), ('PacketLength', np.int32) ] # 16 bytes gp_pk_sh1 = [ ('SubHeaderVersionNo', np.uint8), ('ChecksumFlag', np.bool), ('Acknowledgement', (np.uint8, 4)), ('ServiceType', gp_svce_type), ('ServiceSubtype', np.uint8), ('PacketTime', time_cds_short), ('SpacecraftId', gp_sc_id) ] class Msg15NativeHeaderRecord(object): """ SEVIRI Level 1.5 header for native-format """ def get(self): # 450400 bytes record = [ ('15_MAIN_PRODUCT_HEADER', L15MainProductHeaderRecord().get()), ('15_SECONDARY_PRODUCT_HEADER', L15SecondaryProductHeaderRecord().get()), ('GP_PK_HEADER', GSDTRecords.gp_pk_header), ('GP_PK_SH1', GSDTRecords.gp_pk_sh1), ('15_DATA_HEADER', L15DataHeaderRecord().get()) ] return np.dtype(record).newbyteorder('>') class L15PhData(object): # 80 bytes l15_ph_data = [ ('Name', 'S30'), ('Value', 'S50') ] class L15MainProductHeaderRecord(object): """ Reference Document: MSG Level 1.5 Native Format File Definition """ def get(self): l15_ph_data = L15PhData.l15_ph_data l15_ph_data_identification = [ ('Name', 'S30'), ('Size', 'S16'), ('Address', 'S16') ] # 3674 bytes record = [ ('FormatName', l15_ph_data), ('FormatDocumentName', l15_ph_data), ('FormatDocumentMajorVersion', l15_ph_data), ('FormatDocumentMinorVersion', l15_ph_data), ('CreationDateTime', l15_ph_data), ('CreatingCentre', l15_ph_data), ('DataSetIdentification', (l15_ph_data_identification, 27)), ('TotalFileSize', l15_ph_data), ('GORT', l15_ph_data), ('ASTI', l15_ph_data), ('LLOS', l15_ph_data), ('SNIT', l15_ph_data), ('AIID', l15_ph_data), ('SSBT', l15_ph_data), ('SSST', l15_ph_data), ('RRCC', l15_ph_data), ('RRBT', l15_ph_data), ('RRST', l15_ph_data), ('PPRC', l15_ph_data), ('PPDT', l15_ph_data), ('GPLV', l15_ph_data), ('APNM', l15_ph_data), ('AARF', l15_ph_data), ('UUDT', l15_ph_data), ('QQOV', l15_ph_data), ('UDSP', l15_ph_data) ] return record class L15SecondaryProductHeaderRecord(object): """ Reference Document: MSG Level 1.5 Native Format File Definition """ def get(self): l15_ph_data = L15PhData.l15_ph_data # 1440 bytes record = [ ('ABID', l15_ph_data), ('SMOD', l15_ph_data), ('APXS', l15_ph_data), ('AVPA', l15_ph_data), ('LSCD', l15_ph_data), ('LMAP', l15_ph_data), ('QDLC', l15_ph_data), ('QDLP', l15_ph_data), ('QQAI', l15_ph_data), ('SelectedBandIDs', l15_ph_data), ('SouthLineSelectedRectangle', l15_ph_data), ('NorthLineSelectedRectangle', l15_ph_data), ('EastColumnSelectedRectangle', l15_ph_data), ('WestColumnSelectedRectangle', l15_ph_data), ('NumberLinesVISIR', l15_ph_data), ('NumberColumnsVISIR', l15_ph_data), ('NumberLinesHRV', l15_ph_data), ('NumberColumnsHRV', l15_ph_data) ] return record class L15DataHeaderRecord(object): """ Reference Document (EUM/MSG/ICD/105): MSG Level 1.5 Image Data Format Description """ def get(self): # 445248 bytes record = [ ('15HeaderVersion', np.uint8), ('SatelliteStatus', self.satellite_status), ('ImageAcquisition', self.image_acquisition), ('CelestialEvents', self.celestial_events), ('ImageDescription', self.image_description), ('RadiometricProcessing', self.radiometric_processing), ('GeometricProcessing', self.geometric_processing), ('IMPFConfiguration', self.impf_configuration)] return record @property def satellite_status(self): # 7 bytes satellite_definition = [ ('SatelliteId', np.uint16), ('NominalLongitude', np.float32), ('SatelliteStatus', np.uint8)] # 28 bytes satellite_operations = [ ('LastManoeuvreFlag', np.bool), ('LastManoeuvreStartTime', time_cds_short), ('LastManoeuvreEndTime', time_cds_short), ('LastManoeuvreType
{ "pile_set_name": "Github" }
# include "fbcunit.bi" #if (__FB_BACKEND__ = "gas") #define DOTEST #endif '' for other targets, see va_int_and_ptrs-gcc.bas #ifdef DOTEST SUITE( fbc_tests.functions.va_int_and_ptrs ) sub varints cdecl ( byval n as integer, ... ) dim va as any ptr dim i as integer va = va_first( ) for i = 1 to n CU_ASSERT( va_arg( va, integer ) = i ) va = va_next( va, integer ) next end sub sub varintptrs cdecl ( byval n as integer, ... ) dim va as any ptr dim i as integer va = va_first( ) for i = 1 to n CU_ASSERT( *va_arg( va, integer ptr ) ) va = va_next( va, integer ptr ) next end sub sub vaints_test( d as integer ) dim as integer a, b, c dim as integer ptr pa, pb, pc dim as integer ptr ptr ppc a = 1 b = 2 c = 3 pa = @a pb = @b pc = @c ppc = @pc varints 4, a, *pb, **ppc, d varintptrs 4, pa, pb, pc, @d end sub TEST( varIntegerArgs ) vaints_test 4 END_TEST END_SUITE #endif
{ "pile_set_name": "Github" }
package peering // Copyright (c) Microsoft and contributors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // // See the License for the specific language governing permissions and // limitations under the License. // // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/tracing" "net/http" ) // OperationsClient is the peering Client type OperationsClient struct { BaseClient } // NewOperationsClient creates an instance of the OperationsClient client. func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this // when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } // List lists all of the available API operations for peering resources. func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") defer func() { sc := -1 if result.olr.Response.Response != nil { sc = result.olr.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() } result.fn = client.listNextResults req, err := client.ListPreparer(ctx) if err != nil { err = autorest.NewErrorWithError(err, "peering.OperationsClient", "List", nil, "Failure preparing request") return } resp, err := client.ListSender(req) if err != nil { result.olr.Response = autorest.Response{Response: resp} err = autorest.NewErrorWithError(err, "peering.OperationsClient", "List", resp, "Failure sending request") return } result.olr, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "peering.OperationsClient", "List", resp, "Failure responding to request") } if result.olr.hasNextLink() && result.olr.IsEmpty() { err = result.NextWithContext(ctx) } return } // ListPreparer prepares the List request. func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { const APIVersion = "2020-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), autorest.WithPath("/providers/Microsoft.Peering/operations"), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // ListResponder handles the response to the List request. The method always // closes the http.Response Body. func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { err = autorest.Respond( resp, azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } // listNextResults retrieves the next set of results, if any. func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) { req, err := lastResults.operationListResultPreparer(ctx) if err != nil { return result, autorest.NewErrorWithError(err, "peering.OperationsClient", "listNextResults", nil, "Failure preparing next results request") } if req == nil { return } resp, err := client.ListSender(req) if err != nil { result.Response = autorest.Response{Response: resp} return result, autorest.NewErrorWithError(err, "peering.OperationsClient", "listNextResults", resp, "Failure sending next results request") } result, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "peering.OperationsClient", "listNextResults", resp, "Failure responding to next results request") } return } // ListComplete enumerates all values, automatically crossing page boundaries as required. func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") defer func() { sc := -1 if result.Response().Response.Response != nil { sc = result.page.Response().Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() } result.page, err = client.List(ctx) return }
{ "pile_set_name": "Github" }
<?php class DBProcess extends Unit { const DB_HOST='localhost'; const DB_USER='root'; const DB_PASS='root'; const DB_DBNAME='testDB'; public function stimulate(&$hash){ $db = new MYSQL; $db->connect(self::DB_HOST, self::DB_USER, self::DB_PASS, self::DB_DBNAME); $db->query("SET NAMES 'UTF8'"); //must have a string parameter 'action' LINB::checkArgs($hash, array( 'string' => array( 'action' => NULL ) )); //handle the process switch($hash->action) { case 'getlist': return $db->query("select `key`,`value` from `tbl_test`"); case 'update': //must have string parameters 'key' and 'value' LINB::checkArgs($hash, array( 'string' => array( 'key' => NULL, 'value' => NULL ) )); $db->update("tbl_test",array("key"=>$hash->key, "value"=>$hash->value), "`key`='".$hash->key."'"); return 'ok'; case 'delete': //must have a string parameter 'key' LINB::checkArgs($hash, array( 'string' => array( 'key' => NULL ) )); $db->delete("tbl_test", "`key`='".$hash->key."'"); return 'ok'; case 'create': //must have string parameters 'key' and 'value' LINB::checkArgs($hash, array( 'string' => array( 'key' => NULL, 'value' => NULL ) )); $db->insert("tbl_test", array("key"=>$hash->key, "value"=>$hash->value)); return 'ok'; } } } ?>
{ "pile_set_name": "Github" }
<?xml version="1.0"?> <!DOCTYPE eparcel [ <!-- EVERY REQUEST CONTAIN THE eparcel TAG --> <!ELEMENT eparcel (ratesAndServicesResponse)> <!-- ********************************************************* --> <!-- * Standard response for request for rates and services * --> <!-- ********************************************************* --> <!ELEMENT ratesAndServicesResponse (statusCode , statusMessage+ , requestID , handling , language , product+ , packing* , emptySpace* , shippingOptions , comment , nearestPostalOutlet*)> <!ELEMENT statusCode (#PCDATA)> <!ELEMENT statusMessage (#PCDATA)> <!ELEMENT requestID (#PCDATA)> <!ELEMENT handling (#PCDATA)> <!ELEMENT language (#PCDATA)> <!ELEMENT product (name , rate , shippingDate , deliveryDate , deliveryDayOfWeek , nextDayAM? , packingID)> <!ATTLIST product id CDATA #REQUIRED> <!ATTLIST product sequence CDATA #REQUIRED> <!ELEMENT name (#PCDATA)> <!ELEMENT rate (#PCDATA)> <!ELEMENT shippingDate (#PCDATA)> <!ELEMENT deliveryDate (#PCDATA)> <!ELEMENT deliveryDayOfWeek (#PCDATA)> <!ELEMENT nextDayAM (#PCDATA)> <!ELEMENT packingID (#PCDATA)> <!ELEMENT packing (packingID , box+)> <!ELEMENT box (name , weight , expediterWeight , length , width , height , packedItem+)> <!ELEMENT weight (#PCDATA)> <!ELEMENT expediterWeight (#PCDATA)> <!ELEMENT length (#PCDATA)> <!ELEMENT width (#PCDATA)> <!ELEMENT height (#PCDATA)> <!ELEMENT packedItem (quantity , description)> <!ELEMENT quantity (#PCDATA)> <!ELEMENT description (#PCDATA)> <!ELEMENT emptySpace (length , width , height , weight)> <!ELEMENT shippingOptions (insurance , deliveryConfirmation , signature , flexiblePaymentAvailable?)> <!ELEMENT insurance (#PCDATA)> <!ELEMENT deliveryConfirmation (#PCDATA)> <!ELEMENT signature (#PCDATA)> <!ELEMENT flexiblePaymentAvailable EMPTY> <!ELEMENT comment (#PCDATA)> <!-- ********************************************************* --> <!-- * 'nearestPostalOutlet' is optional and is returned * --> <!-- * only if the merchant profile has this option enabled * --> <!-- ********************************************************* --> <!ELEMENT nearestPostalOutlet (postalOutletSequenceNo , distance , outletName , businessName , postalAddress , phoneNumber , businessHours+)> <!ELEMENT postalOutletSequenceNo (#PCDATA)> <!ELEMENT distance (#PCDATA)> <!ELEMENT outletName (#PCDATA)> <!ELEMENT businessName (#PCDATA)> <!ELEMENT postalAddress (addressLine+ , postalCode , municipality , province?)> <!ELEMENT addressLine (#PCDATA)> <!ELEMENT postalCode (#PCDATA)> <!ELEMENT municipality (#PCDATA)> <!ELEMENT province (#PCDATA)> <!ELEMENT phoneNumber (#PCDATA)> <!ELEMENT businessHours (dayId , dayOfWeek , time)> <!ELEMENT dayId (#PCDATA)> <!ELEMENT dayOfWeek (#PCDATA)> <!ELEMENT time (#PCDATA)> ]> <eparcel> <ratesAndServicesResponse> <statusCode>1</statusCode> <statusMessage>OK</statusMessage> <requestID>6877575</requestID> <handling>0.0</handling> <language>0</language> <product id="1040" sequence="1"> <name>Priority Courier</name> <rate>40.28</rate> <shippingDate>2010-08-03</shippingDate> <deliveryDate>2010-08-04</deliveryDate> <deliveryDayOfWeek>4</deliveryDayOfWeek> <nextDayAM>true</nextDayAM> <packingID>P_0</packingID> </product> <product id="1020" sequence="2"> <name>Expedited</name> <rate>17.16</rate> <shippingDate>2010-08-03</shippingDate> <deliveryDate>2010-08-04</deliveryDate> <deliveryDayOfWeek>4</deliveryDayOfWeek> <nextDayAM>false</nextDayAM> <packingID>P_0</packingID> </product> <product id="1010" sequence="3"> <name>Regular</name> <rate>17.16</rate> <shippingDate>2010-08-03</shippingDate> <deliveryDate>2010-08-06</deliveryDate> <deliveryDayOfWeek>6</deliveryDayOfWeek> <nextDayAM>false</nextDayAM> <packingID>P_0</packingID> </product> <packing> <packingID>P_0</packingID> <box> <name>Small Box</name> <weight>1.691</weight> <expediterWeight>1.691</expediterWeight> <length>25.0</length> <width>17.0</width> <height>16.0</height> <packedItem> <quantity>1</quantity> <description>KAO Diskettes</description> </packedItem> </box> <box> <name>My Ready To Ship Item</name> <weight>2.0</weight> <expediterWeight>1.5</expediterWeight> <length>30.0</length> <width>20.0</width> <height>20.0</height> <packedItem> <quantity>1</quantity> <description>My Ready To Ship Item</description> </packedItem> </box> </packing> <shippingOptions> <insurance>No</insurance> <deliveryConfirmation>No</deliveryConfirmation> <signature>No</signature> </shippingOptions> <comment/> </ratesAndServicesResponse> </eparcel> <!--END_OF_EPARCEL-->
{ "pile_set_name": "Github" }
/*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #include "mitkTemporalJoinImagesFilter.h" #include <numeric> #include "mitkArbitraryTimeGeometry.h" #include "mitkImageReadAccessor.h" #include "mitkTemporoSpatialStringProperty.h" void mitk::TemporalJoinImagesFilter::SetMaxTimeBounds(const TimeBoundsVectorType& timeBounds) { m_MaxTimeBounds = timeBounds; this->Modified(); } void mitk::TemporalJoinImagesFilter::GenerateInputRequestedRegion() { Superclass::GenerateInputRequestedRegion(); const auto nrOfInputs = this->GetNumberOfInputs(); for (DataObjectPointerArraySizeType pos = 0; pos < nrOfInputs; ++pos) { this->GetInput(pos)->SetRequestedRegionToLargestPossibleRegion(); } } void mitk::TemporalJoinImagesFilter::GenerateOutputInformation() { mitk::Image::ConstPointer input = this->GetInput(); mitk::Image::Pointer output = this->GetOutput(); const auto nrOfInputs = this->GetNumberOfInputs(); auto timeBounds = m_MaxTimeBounds; if (timeBounds.empty()) { timeBounds.resize(nrOfInputs); std::iota(timeBounds.begin(), timeBounds.end(), 1.0); } else if(timeBounds.size() != nrOfInputs) { mitkThrow() << "User defined max time bounds do not match the number if inputs (" << nrOfInputs << "). Size of max timebounds is " << timeBounds.size() << ", but it should be " << nrOfInputs << "."; } timeBounds.insert(timeBounds.begin(), m_FirstMinTimeBound); auto timeGeo = mitk::ArbitraryTimeGeometry::New(); timeGeo->ReserveSpaceForGeometries(nrOfInputs); for (DataObjectPointerArraySizeType pos = 0; pos < nrOfInputs; ++pos) { timeGeo->AppendNewTimeStepClone(this->GetInput(pos)->GetGeometry(), timeBounds[pos], timeBounds[pos + 1]); } output->Initialize(input->GetPixelType(), *timeGeo); auto newPropList = input->GetPropertyList()->Clone(); for (DataObjectPointerArraySizeType pos = 1; pos < nrOfInputs; ++pos) { const auto otherList = this->GetInput(pos)->GetPropertyList(); for (const auto& key : otherList->GetPropertyKeys()) { auto prop = newPropList->GetProperty(key); if (prop == nullptr) { newPropList->SetProperty(key, otherList->GetProperty(key)->Clone()); } else { auto tempoSpatialProp = dynamic_cast<mitk::TemporoSpatialStringProperty*>(prop); auto oTempoSpatialProp = dynamic_cast<mitk::TemporoSpatialStringProperty*>(otherList->GetProperty(key)); if (prop != nullptr && oTempoSpatialProp != nullptr) { auto availabelSlices = oTempoSpatialProp->GetAvailableSlices(0); for (const auto& sliceID : availabelSlices) { tempoSpatialProp->SetValue(pos, sliceID, oTempoSpatialProp->GetValueBySlice(sliceID)); } } //other prop types can be ignored, we only use the values of the first frame. } } } output->SetPropertyList(newPropList); } void mitk::TemporalJoinImagesFilter::GenerateData() { mitk::Image::Pointer output = this->GetOutput(); mitk::Image::ConstPointer refInput = this->GetInput(); const auto nrOfInputs = this->GetNumberOfInputs(); for (DataObjectPointerArraySizeType pos = 0; pos < nrOfInputs; ++pos) { if (!Equal(*(refInput->GetGeometry()), *(this->GetInput(pos)->GetGeometry()), mitk::eps, false)) { mitkThrow() << "Cannot fuse images. At least image #" << pos << " has another geometry than the first image."; } if (refInput->GetPixelType() != this->GetInput(pos)->GetPixelType()) { mitkThrow() << "Cannot fuse images. At least image #" << pos << " has another pixeltype than the first image."; } } for (DataObjectPointerArraySizeType pos = 0; pos < nrOfInputs; ++pos) { mitk::ImageReadAccessor accessor(this->GetInput(pos)); output->SetVolume(accessor.GetData(), pos); } }
{ "pile_set_name": "Github" }
/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Rob Day - 11 May 2014 */ #define GLOBALS_FULL_DEFINITION #include "sipp.hpp" #include "gtest/gtest.h" #include "gmock/gmock.h" #include <string.h> namespace testing { std::string FLAGS_gmock_verbose = "verbose"; } int main(int argc, char* argv[]) { globalVariables = new AllocVariableTable(NULL); userVariables = new AllocVariableTable(globalVariables); main_scenario = new scenario(0, 0); ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } /* Quickfix to fix unittests that depend on sipp_exit availability, * now that sipp_exit has been moved into sipp.cpp which is not * included. */ void sipp_exit(int rc, int rtp_errors, int echo_errors) { exit(rc); }
{ "pile_set_name": "Github" }
# Locally calculated sha256 756e291d4f557d88cd50c4fe3b8454ec238362d22cedb3e6173240d90f0a80fa webrtc-audio-processing-0.3.tar.xz
{ "pile_set_name": "Github" }
#!/usr/bin/env python3 import unittest import random import sys sys.path.append('../pybingwallpaper') import config from config import ConfigParameter from config import ConfigDatabase from config import CommandLineArgumentsLoader from config import DefaultValueLoader from config import ConfigFileLoader from config import ConfigFileDumper from config import Namespace def getdb(): return ConfigDatabase('test1', description='test desc') # TODO: Add cases to test loader_srcs option class TestConfigureParameter(unittest.TestCase): def setUp(self): pass def test_import_config_module(self): self.assertIsNotNone(ConfigParameter) self.assertIsNotNone(ConfigDatabase) def test_init_param(self): p = ConfigParameter('test1') self.assertIsNotNone(p) def test_name(self): names = ['klb', '1ab', 's#a'] for n in names: p = ConfigParameter(name = n) self.assertEqual(p.name, n) def test_invalid_name(self): names = ['k b', '\tab', 's\na'] for n in names: with self.assertRaises(ValueError, msg="parameter name can't contain space"): ConfigParameter(name = n) class TestConfigureDatabase(unittest.TestCase): def setUp(self): pass def test_prog(self): db = getdb() self.assertEqual(db.prog, 'test1') def test_desc(self): db = ConfigDatabase('test1', 'a test database') self.assertEqual(db.prog, 'test1') self.assertEqual(db.description, 'a test database') def test_parameter_init(self): params = [ ConfigParameter('123'), ConfigParameter('456') ] db = ConfigDatabase('test1', parameters=params) self.assertListEqual(db.parameters, params) def test_repr(self): params = [ ConfigParameter('123', type=''), ConfigParameter('456', type='') ] db = ConfigDatabase('test1', description='test desc', parameters=params) dbcopy = eval(repr(db)) self.assertEqual(db.prog, dbcopy.prog) self.assertEqual(db.description, dbcopy.description) self.assertListEqual(db.parameters, dbcopy.parameters) def test_add_parameters(self): params = [ ConfigParameter('123'), ConfigParameter('456') ] new_param = ConfigParameter('789') db = ConfigDatabase('test1', description='test desc', parameters=params) self.assertListEqual(db.parameters, params) db.add_param(new_param) self.assertListEqual(db.parameters, params+[new_param,]) def test_no_dup_param(self): params = [ ConfigParameter('123', type=int), ConfigParameter('456', defaults=9) ] new_param = ConfigParameter('123') db = ConfigDatabase('test1', description='test desc', parameters=params) self.assertListEqual(db.parameters, params) with self.assertRaises(NameError, msg='duplicated parameter name "%s" found'%(new_param.name,)): db.add_param(new_param) self.assertListEqual(db.parameters, params) class TestCliLoader(unittest.TestCase): def getdb(self): return ConfigDatabase('test1', description='test desc') def getloader(self): return CommandLineArgumentsLoader() def test_invalid_arg(self): loader = self.getloader() db = getdb() p = ConfigParameter(name='param1', type=int) db.add_param(p) with self.assertRaises(SystemExit) as se: loader.load(db, ['--not-exist']) self.assertEqual(se.exception.code, 2) def test_version(self): loader = self.getloader() db = getdb() p = ConfigParameter(name='notused', loader_opts={'cli':{ 'action': 'version', 'flags':('-v','--version'), 'version': 'test-version-1234' }}) db.add_param(p) with self.assertRaises(SystemExit) as se: loader.load(db, ['-v']) self.assertEqual(se.exception.code, 0) with self.assertRaises(SystemExit) as se: loader.load(db, ['--version']) self.assertEqual(se.exception.code, 0) def test_name(self): db = getdb() cli_opts = {'flags':['-p']} p = ConfigParameter(name='param1', type=lambda s:int(s,0), loader_opts={'cli':cli_opts}) db.add_param(p) loader = self.getloader() with self.assertRaises(SystemExit) as se: loader.load(db, ['--param1', '1']) self.assertEqual(se.exception.code, 2) ans = loader.load(db, ['-p', '1']) self.assertEqual(getattr(ans, p.name), 1) def test_load_int(self): ds = [ ('0', 0), ('0x1aedead0b', 0x1aedead0b), ('0b0011', 3), ('-9571293', -9571293), ] db = getdb() p = ConfigParameter(name='param1', type=lambda s:int(s,0)) db.add_param(p) loader = self.getloader() for s, d in ds: ans = loader.load(db, ['--param1', s]) self.assertEqual(getattr(ans, p.name), d) def test_load_str(self): ds = [ ' ', '#123', 'as_', '9 9' ] db = getdb() p = ConfigParameter(name='param1') db.add_param(p) loader = self.getloader() for s in ds: ans = loader.load(db, ['--param1', s]) self.assertEqual(getattr(ans, p.name), s) def test_load_choice(self): good = ['c1', 'c3', 'c2'] choices = ('c0', 'c1', 'c2', 'c3') db = getdb() p = ConfigParameter(name='param1', defaults='c1', choices=choices) db.add_param(p) loader = self.getloader() # try legal ones for s in good: ans = loader.load(db, ['--param1', s], generate_default=True) self.assertEqual(getattr(ans, p.name), s) # test use default ans = loader.load(db, [], generate_default=True) self.assertEqual(getattr(ans, p.name), good[0]) # test illegal value with self.assertRaises(SystemExit) as se: loader.load(db, ['--param1', 'no-good'], generate_default=True) self.assertEqual(se.exception.code, 2) def test_load_true(self): cli_opts = {'action':'store_true'} db = getdb() p = ConfigParameter(name='param1', defaults=False, loader_opts={'cli':cli_opts}) db.add_param(p) loader = self.getloader() ans = loader.load(db, ['--param1']) self.assertTrue(getattr(ans, p.name)) ans = loader.load(db, []) self.assertFalse(hasattr(ans, p.name)) ans = loader.load(db, [], generate_default=True) self.assertFalse
{ "pile_set_name": "Github" }
// Created by cgo -godefs - DO NOT EDIT // cgo -godefs defs_linux.go package ipv6 const ( sysIPV6_ADDRFORM = 0x1 sysIPV6_2292PKTINFO = 0x2 sysIPV6_2292HOPOPTS = 0x3 sysIPV6_2292DSTOPTS = 0x4 sysIPV6_2292RTHDR = 0x5 sysIPV6_2292PKTOPTIONS = 0x6 sysIPV6_CHECKSUM = 0x7 sysIPV6_2292HOPLIMIT = 0x8 sysIPV6_NEXTHOP = 0x9 sysIPV6_FLOWINFO = 0xb sysIPV6_UNICAST_HOPS = 0x10 sysIPV6_MULTICAST_IF = 0x11 sysIPV6_MULTICAST_HOPS = 0x12 sysIPV6_MULTICAST_LOOP = 0x13 sysIPV6_ADD_MEMBERSHIP = 0x14 sysIPV6_DROP_MEMBERSHIP = 0x15 sysMCAST_JOIN_GROUP = 0x2a sysMCAST_LEAVE_GROUP = 0x2d sysMCAST_JOIN_SOURCE_GROUP = 0x2e sysMCAST_LEAVE_SOURCE_GROUP = 0x2f sysMCAST_BLOCK_SOURCE = 0x2b sysMCAST_UNBLOCK_SOURCE = 0x2c sysMCAST_MSFILTER = 0x30 sysIPV6_ROUTER_ALERT = 0x16 sysIPV6_MTU_DISCOVER = 0x17 sysIPV6_MTU = 0x18 sysIPV6_RECVERR = 0x19 sysIPV6_V6ONLY = 0x1a sysIPV6_JOIN_ANYCAST = 0x1b sysIPV6_LEAVE_ANYCAST = 0x1c sysIPV6_FLOWLABEL_MGR = 0x20 sysIPV6_FLOWINFO_SEND = 0x21 sysIPV6_IPSEC_POLICY = 0x22 sysIPV6_XFRM_POLICY = 0x23 sysIPV6_RECVPKTINFO = 0x31 sysIPV6_PKTINFO = 0x32 sysIPV6_RECVHOPLIMIT = 0x33 sysIPV6_HOPLIMIT = 0x34 sysIPV6_RECVHOPOPTS = 0x35 sysIPV6_HOPOPTS = 0x36 sysIPV6_RTHDRDSTOPTS = 0x37 sysIPV6_RECVRTHDR = 0x38 sysIPV6_RTHDR = 0x39 sysIPV6_RECVDSTOPTS = 0x3a sysIPV6_DSTOPTS = 0x3b sysIPV6_RECVPATHMTU = 0x3c sysIPV6_PATHMTU = 0x3d sysIPV6_DONTFRAG = 0x3e sysIPV6_RECVTCLASS = 0x42 sysIPV6_TCLASS = 0x43 sysIPV6_ADDR_PREFERENCES = 0x48 sysIPV6_PREFER_SRC_TMP = 0x1 sysIPV6_PREFER_SRC_PUBLIC = 0x2 sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 sysIPV6_PREFER_SRC_COA = 0x4 sysIPV6_PREFER_SRC_HOME = 0x400 sysIPV6_PREFER_SRC_CGA = 0x8 sysIPV6_PREFER_SRC_NONCGA = 0x800 sysIPV6_MINHOPCOUNT = 0x49 sysIPV6_ORIGDSTADDR = 0x4a sysIPV6_RECVORIGDSTADDR = 0x4a sysIPV6_TRANSPARENT = 0x4b sysIPV6_UNICAST_IF = 0x4c sysICMPV6_FILTER = 0x1 sysICMPV6_FILTER_BLOCK = 0x1 sysICMPV6_FILTER_PASS = 0x2 sysICMPV6_FILTER_BLOCKOTHERS = 0x3 sysICMPV6_FILTER_PASSONLY = 0x4 sysSOL_SOCKET = 0x1 sysSO_ATTACH_FILTER = 0x1a sizeofKernelSockaddrStorage = 0x80 sizeofSockaddrInet6 = 0x1c sizeofInet6Pktinfo = 0x14 sizeofIPv6Mtuinfo = 0x20 sizeofIPv6FlowlabelReq = 0x20 sizeofIPv6Mreq = 0x14 sizeofGroupReq = 0x88 sizeofGroupSourceReq = 0x108 sizeofICMPv6Filter = 0x20 sizeofSockFprog = 0x10 ) type kernelSockaddrStorage struct { Family uint16 X__data [126]int8 } type sockaddrInet6 struct { Family uint16 Port uint16 Flowinfo uint32 Addr [16]byte /* in6_addr */ Scope_id uint32 } type inet6Pktinfo struct { Addr [16]byte /* in6_addr */ Ifindex int32 } type ipv6Mtuinfo struct { Addr sockaddrInet6 Mtu uint32 } type ipv6FlowlabelReq struct { Dst [16]byte /* in6_addr */ Label uint32 Action uint8 Share uint8 Flags uint16 Expires uint16 Linger uint16 X__flr_pad uint32 } type ipv6Mreq struct { Multiaddr [16]byte /* in6_addr */ Ifindex int32 } type groupReq struct { Interface uint32 Pad_cgo_0 [4]byte Group kernelSockaddrStorage } type groupSourceReq struct { Interface uint32 Pad_cgo_0 [4]byte Group kernelSockaddrStorage Source kernelSockaddrStorage } type icmpv6Filter struct { Data [8]uint32 } type sockFProg struct { Len uint16 Pad_cgo_0 [6]byte Filter *sockFilter } type sockFilter struct { Code uint16 Jt uint8 Jf uint8 K uint32 }
{ "pile_set_name": "Github" }
-------- @implements E -------- { "type": { "name": "implements-json.E", "pos": "testdata/src/implements-json/main.go:10:6", "kind": "interface" } } -------- @implements F -------- { "type": { "name": "implements-json.F", "pos": "testdata/src/implements-json/main.go:12:6", "kind": "interface" }, "to": [ { "name": "*implements-json.C", "pos": "testdata/src/implements-json/main.go:21:6", "kind": "pointer" }, { "name": "implements-json.D", "pos": "testdata/src/implements-json/main.go:22:6", "kind": "struct" }, { "name": "implements-json.FG", "pos": "testdata/src/implements-json/main.go:16:6", "kind": "interface" } ] } -------- @implements FG -------- { "type": { "name": "implements-json.FG", "pos": "testdata/src/implements-json/main.go:16:6", "kind": "interface" }, "to": [ { "name": "*implements-json.D", "pos": "testdata/src/implements-json/main.go:22:6", "kind": "pointer" } ], "from": [ { "name": "implements-json.F", "pos": "testdata/src/implements-json/main.go:12:6", "kind": "interface" } ] } -------- @implements slice -------- { "type": { "name": "[]int", "pos": "-", "kind": "slice" } } -------- @implements C -------- { "type": { "name": "implements-json.C", "pos": "testdata/src/implements-json/main.go:21:6", "kind": "basic" }, "fromptr": [ { "name": "implements-json.F", "pos": "testdata/src/implements-json/main.go:12:6", "kind": "interface" } ] } -------- @implements starC -------- { "type": { "name": "*implements-json.C", "pos": "testdata/src/implements-json/main.go:21:6", "kind": "pointer" }, "from": [ { "name": "implements-json.F", "pos": "testdata/src/implements-json/main.go:12:6", "kind": "interface" } ] } -------- @implements D -------- { "type": { "name": "implements-json.D", "pos": "testdata/src/implements-json/main.go:22:6", "kind": "struct" }, "from": [ { "name": "implements-json.F", "pos": "testdata/src/implements-json/main.go:12:6", "kind": "interface" } ], "fromptr": [ { "name": "implements-json.FG", "pos": "testdata/src/implements-json/main.go:16:6", "kind": "interface" } ] } -------- @implements starD -------- { "type": { "name": "*implements-json.D", "pos": "testdata/src/implements-json/main.go:22:6", "kind": "pointer" }, "from": [ { "name": "implements-json.F", "pos": "testdata/src/implements-json/main.go:12:6", "kind": "interface" }, { "name": "implements-json.FG", "pos": "testdata/src/implements-json/main.go:16:6", "kind": "interface" } ] }
{ "pile_set_name": "Github" }
from gunicorn.config import Config from gunicorn.http.errors import LimitRequestHeaders request = LimitRequestHeaders cfg = Config() cfg.set('limit_request_field_size', 98)
{ "pile_set_name": "Github" }
using System.Web; using System.Web.Mvc; namespace Sample.WebApp { public class FilterConfig { public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); } } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>IBClasses</key> <array> <dict> <key>CLASS</key> <string>SUWindowController</string> <key>LANGUAGE</key> <string>ObjC</string> <key>SUPERCLASS</key> <string>NSWindowController</string> </dict> <dict> <key>CLASS</key> <string>NSApplication</string> <key>LANGUAGE</key> <string>ObjC</string> <key>SUPERCLASS</key> <string>NSResponder</string> </dict> <dict> <key>ACTIONS</key> <dict> <key>installUpdate</key> <string>id</string> <key>remindMeLater</key> <string>id</string> <key>skipThisVersion</key> <string>id</string> </dict> <key>CLASS</key> <string>SUUpdateAlert</string> <key>LANGUAGE</key> <string>ObjC</string> <key>OUTLETS</key> <dict> <key>delegate</key> <string>id</string> <key>description</key> <string>NSTextField</string> <key>releaseNotesView</key> <string>WebView</string> </dict> <key>SUPERCLASS</key> <string>SUWindowController</string> </dict> <dict> <key>CLASS</key> <string>FirstResponder</string> <key>LANGUAGE</key> <string>ObjC</string> <key>SUPERCLASS</key> <string>NSObject</string> </dict> <dict> <key>CLASS</key> <string>NSObject</string> <key>LANGUAGE</key> <string>ObjC</string> </dict> </array> <key>IBVersion</key> <string>1</string> </dict> </plist>
{ "pile_set_name": "Github" }
/Sequence fib:{<0;1> {x,<x[-1]+x[-2]>}/ range[x]} /nth fibn:{fib[x][x]}
{ "pile_set_name": "Github" }