text
stringlengths
2
99.9k
meta
dict
msm8952 { 617 ... msm8976: { 650 652 653 660 } }
{ "pile_set_name": "Github" }
/** @file Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef _FSP_COMMON_LIB_H_ #define _FSP_COMMON_LIB_H_ #include <FspGlobalData.h> #include <FspMeasurePointId.h> /** This function sets the FSP global data pointer. @param[in] FspData Fsp global data pointer. **/ VOID EFIAPI SetFspGlobalDataPointer ( IN FSP_GLOBAL_DATA *FspData ); /** This function gets the FSP global data pointer. **/ FSP_GLOBAL_DATA * EFIAPI GetFspGlobalDataPointer ( VOID ); /** This function gets back the FSP API first parameter passed by the bootloader. @retval ApiParameter FSP API first parameter passed by the bootloader. **/ UINT32 EFIAPI GetFspApiParameter ( VOID ); /** This function gets back the FSP API second parameter passed by the bootloader. @retval ApiParameter FSP API second parameter passed by the bootloader. **/ UINT32 EFIAPI GetFspApiParameter2 ( VOID ); /** This function returns the FSP entry stack pointer from address of the first API parameter. @retval FSP entry stack pointer. **/ VOID* EFIAPI GetFspEntryStack ( VOID ); /** This function sets the FSP API parameter in the stack. @param[in] Value New parameter value. **/ VOID EFIAPI SetFspApiParameter ( IN UINT32 Value ); /** This function set the API status code returned to the BootLoader. @param[in] ReturnStatus Status code to return. **/ VOID EFIAPI SetFspApiReturnStatus ( IN UINT32 ReturnStatus ); /** This function sets the context switching stack to a new stack frame. @param[in] NewStackTop New core stack to be set. **/ VOID EFIAPI SetFspCoreStackPointer ( IN VOID *NewStackTop ); /** This function sets the platform specific data pointer. @param[in] PlatformData Fsp platform specific data pointer. **/ VOID EFIAPI SetFspPlatformDataPointer ( IN VOID *PlatformData ); /** This function gets the platform specific data pointer. @param[in] PlatformData Fsp platform specific data pointer. **/ VOID * EFIAPI GetFspPlatformDataPointer ( VOID ); /** This function sets the UPD data pointer. @param[in] UpdDataPtr UPD data pointer. **/ VOID EFIAPI SetFspUpdDataPointer ( IN VOID *UpdDataPtr ); /** This function gets the UPD data pointer. @return UpdDataPtr UPD data pointer. **/ VOID * EFIAPI GetFspUpdDataPointer ( VOID ); /** This function sets the memory init UPD data pointer. @param[in] MemoryInitUpdPtr memory init UPD data pointer. **/ VOID EFIAPI SetFspMemoryInitUpdDataPointer ( IN VOID *MemoryInitUpdPtr ); /** This function gets the memory init UPD data pointer. @return memory init UPD data pointer. **/ VOID * EFIAPI GetFspMemoryInitUpdDataPointer ( VOID ); /** This function sets the silicon init UPD data pointer. @param[in] SiliconInitUpdPtr silicon init UPD data pointer. **/ VOID EFIAPI SetFspSiliconInitUpdDataPointer ( IN VOID *SiliconInitUpdPtr ); /** This function gets the silicon init UPD data pointer. @return silicon init UPD data pointer. **/ VOID * EFIAPI GetFspSiliconInitUpdDataPointer ( VOID ); /** Set FSP measurement point timestamp. @param[in] Id Measurement point ID. @return performance timestamp. **/ UINT64 EFIAPI SetFspMeasurePoint ( IN UINT8 Id ); /** This function gets the FSP info header pointer. @retval FspInfoHeader FSP info header pointer **/ FSP_INFO_HEADER * EFIAPI GetFspInfoHeader ( VOID ); /** This function sets the FSP info header pointer. @param[in] FspInfoHeader FSP info header pointer **/ VOID EFIAPI SetFspInfoHeader ( FSP_INFO_HEADER *FspInfoHeader ); /** This function gets the FSP info header pointer from the API context. @retval FspInfoHeader FSP info header pointer **/ FSP_INFO_HEADER * EFIAPI GetFspInfoHeaderFromApiContext ( VOID ); /** This function gets the CfgRegion data pointer. @return CfgRegion data pointer. **/ VOID * EFIAPI GetFspCfgRegionDataPointer ( VOID ); /** This function gets FSP API calling mode. @retval API calling mode **/ UINT8 EFIAPI GetFspApiCallingIndex ( VOID ); /** This function sets FSP API calling mode. @param[in] Index API calling index **/ VOID EFIAPI SetFspApiCallingIndex ( UINT8 Index ); /** This function gets FSP Phase StatusCode. @retval StatusCode **/ UINT32 EFIAPI GetPhaseStatusCode ( VOID ); /** This function sets FSP Phase StatusCode. @param[in] Mode Phase StatusCode **/ VOID EFIAPI SetPhaseStatusCode ( UINT32 StatusCode ); /** This function updates the return status of the FSP API with requested reset type and returns to Boot Loader. @param[in] FspResetType Reset type that needs to returned as API return status **/ VOID EFIAPI FspApiReturnStatusReset ( IN UINT32 FspResetType ); #endif
{ "pile_set_name": "Github" }
--- id: 5900f4031000cf542c50ff16 challengeType: 5 title: 'Problem 151: Paper sheets of standard sizes: an expected-value problem' videoUrl: '' localeTitle: '' --- ## Description undefined ## Instructions undefined ## Tests <section id='tests'> ```yml tests: - text: '' testString: 'assert.strictEqual(euler151(), 0.464399, "<code>euler151()</code> should return 0.464399.");' ``` </section> ## Challenge Seed <section id='challengeSeed'> <div id='js-seed'> ```js function euler151() { // Good luck! return true; } euler151(); ``` </div> </section> ## Solution <section id='solution'> ```js // solution required ``` </section>
{ "pile_set_name": "Github" }
/* www.sourceforge.net/projects/tinyxml Original code (2.0 and earlier )copyright (c) 2000-2002 Lee Thomason (www.grinninglizard.com) This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ #include "tinyxml.h" #include <ctype.h> #include <stddef.h> //#define DEBUG_PARSER // Note tha "PutString" hardcodes the same list. This // is less flexible than it appears. Changing the entries // or order will break putstring. TiXmlBase::Entity TiXmlBase::entity[ NUM_ENTITY ] = { { "&amp;", 5, '&' }, { "&lt;", 4, '<' }, { "&gt;", 4, '>' }, { "&quot;", 6, '\"' }, { "&apos;", 6, '\'' } }; // Bunch of unicode info at: // http://www.unicode.org/faq/utf_bom.html // Including the basic of this table, which determines the #bytes in the // sequence from the lead byte. 1 placed for invalid sequences -- // although the result will be junk, pass it through as much as possible. // Beware of the non-characters in UTF-8: // ef bb bf (Microsoft "lead bytes") // ef bf be // ef bf bf const unsigned char TIXML_UTF_LEAD_0 = 0xefU; const unsigned char TIXML_UTF_LEAD_1 = 0xbbU; const unsigned char TIXML_UTF_LEAD_2 = 0xbfU; const int TiXmlBase::utf8ByteTable[256] = { // 0 1 2 3 4 5 6 7 8 9 a b c d e f 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x00 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x10 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x20 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x30 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x40 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x50 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x60 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x70 End of ASCII range 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x80 0x80 to 0xc1 invalid 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x90 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xa0 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xb0 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xc0 0xc2 to 0xdf 2 byte 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xd0 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 0xe0 0xe0 to 0xef 3 byte 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // 0xf0 0xf0 to 0xf4 4 byte, 0xf5 and higher invalid }; void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* length ) { const unsigned long BYTE_MASK = 0xBF; const unsigned long BYTE_MARK = 0x80; const unsigned long FIRST_BYTE_MARK[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; if (input < 0x80) *length = 1; else if ( input < 0x800 ) *length = 2; else if ( input < 0x10000 ) *length = 3; else if ( input < 0x200000 ) *length = 4; else { *length = 0; return; } // This code won't covert this correctly anyway. output += *length; // Scary scary fall throughs. switch (*length) { case 4: --output; *output = (char)((input | BYTE_MARK) & BYTE_MASK); input >>= 6; case 3: --output; *output = (char)((input | BYTE_MARK) & BYTE_MASK); input >>= 6; case 2: --output; *output = (char)((input | BYTE_MARK) & BYTE_MASK); input >>= 6; case 1: --output; *output = (char)(input | FIRST_BYTE_MARK[*length]); } } /*static*/ int TiXmlBase::IsAlpha( unsigned char anyByte, TiXmlEncoding /*encoding*/ ) { // This will only work for low-ascii, everything else is assumed to be a valid // letter. I'm not sure this is the best approach, but it is quite tricky trying // to figure out alhabetical vs. not across encoding. So take a very // conservative approach. // if ( encoding == TIXML_ENCODING_UTF8 ) // { if ( anyByte < 127 ) return isalpha( anyByte ); else return 1; // What else to do? The unicode set is huge...get the english ones right. // } // else // { // return isalpha( anyByte ); // } } /*static*/ int TiXmlBase::IsAlphaNum( unsigned char anyByte, TiXmlEncoding /*encoding*/ ) { // This will only work for low-ascii, everything else is assumed to be a valid // letter. I'm not sure this is the best approach, but it is quite tricky trying // to figure out alhabetical vs. not across encoding. So take a very // conservative approach. // if ( encoding == TIXML_ENCODING_UTF8 ) // { if ( anyByte < 127 ) return isalnum( anyByte ); else return 1; // What else to do? The unicode set is huge...get the english ones right. // } // else // { // return isalnum( anyByte ); // } } class TiXmlParsingData { friend class TiXmlDocument; public: void Stamp( const char* now, TiXmlEncoding encoding ); const TiXmlCursor& Cursor() { return cursor; } private: // Only used by the document! TiXmlParsingData( const char* start, int _tabsize, int row, int col ) { assert( start ); stamp = start; tabsize = _tabsize; cursor.row = row; cursor.col = col; } TiXmlCursor cursor; const char* stamp; int tabsize; }; void TiXmlParsingData::Stamp( const char* now, TiXmlEncoding encoding ) { assert( now ); // Do nothing if the tabsize is 0. if ( tabsize < 1 ) { return; } // Get the current row, column. int row = cursor.row; int col = cursor.col; const char* p = stamp; assert( p ); while ( p < now ) { // Treat p as unsigned, so we have a happy compiler. const unsigned char* pU = (const unsigned char*)p; // Code contributed by Fletcher Dunn: (modified by lee) switch (*pU) { case 0: // We *should* never get here, but in case we do, don't // advance past the terminating null character, ever return; case '\r': // bump down to the next line ++row; col = 0; // Eat the character ++p; // Check for \r\n sequence, and treat this as a single character if (*p == '\n') { ++p; } break; case '\n': // bump down to the next line ++row; col = 0; // Eat the character ++p; // Check for \n\r sequence, and treat this as a single // character. (Yes, this bizarre thing does occur still // on some arcane platforms...) if (*p == '\r') { ++p; } break; case '\t': // Eat the character ++p; // Skip to next tab stop col = (col / tabsize + 1) * tabsize; break; case TIXML_UTF_LEAD_0: if ( encoding == TIXML_ENCODING_UTF8 ) { if ( *(p+1) && *(p+2) ) { // In these cases, don't advance the column. These are // 0-width spaces. if ( *(pU+1)==TIXML_UTF_LEAD_1 && *(pU+2)==TIXML_UTF_LEAD_2 ) p += 3; else if ( *(pU+1)==0xbfU && *(pU+2)==0xbeU ) p += 3; else if ( *(pU+1)==0xbfU && *(pU+2)==0xbfU ) p += 3; else { p +=3; ++col; } // A normal character. } } else { ++p; ++col; } break; default: if ( encoding == TIXML_ENCODING_UTF8 ) { // Eat the 1 to 4 byte utf8 character. int step = TiXmlBase::utf8ByteTable[*((unsigned char*)p)]; if ( step == 0 ) step = 1; // Error case from bad encoding, but handle gracefully. p += step; // Just advance one column, of course. ++col; } else { ++p; ++col; } break; } } cursor.row = row; cursor.col = col; assert( cursor.row >= -1 ); assert( cursor.col >= -1 ); stamp = p; assert( stamp ); } const char* TiXmlBase::SkipWhiteSpace( const char* p, TiXmlEncoding encoding ) { if ( !p || !*p ) { return 0; } if ( encoding == TIXML_ENCODING_UTF8 ) { while ( *p ) { const unsigned char* pU = (const unsigned char*)p; // Skip the stupid Microsoft UTF-8 Byte order marks if ( *(pU+0)==TIXML_UTF_LEAD_0 && *(pU+1)==TIXML_UTF_LEAD_1 && *(pU+2)==TIXML_UTF_LEAD_2 ) { p += 3; continue; } else if(*(pU+0)==TIXML_UTF_LEAD_0 && *(pU+1)==0xbfU && *(pU+2)==0xbeU ) { p += 3; continue; } else if(*(pU+0)==TIXML_UTF_LEAD_0 && *(pU+1)==0xbfU && *(pU+2)==0xbfU ) { p += 3; continue; } if ( IsWhiteSpace( *p ) || *p == '\n' || *p =='\r' ) // Still using old rules for white space. ++p; else break; } } else { while ( *p && IsWhiteSpace( *p ) || *p == '\n' || *p =='\r' ) ++p; } return p; } #ifdef TIXML_USE_STL /*static*/ bool TiXmlBase::StreamWhiteSpace( TIXML_ISTREAM * in, TIXML_STRING * tag ) { for( ;; ) { if ( !in->good() ) return false; int c = in->peek(); // At this scope, we can't get to a document. So fail silently. if ( !IsWhiteSpace( c ) || c <= 0 ) return true; *tag += (char) in->get(); } } /*static*/ bool TiXmlBase::StreamTo( TIXML_ISTREAM * in, int character, TIXML_STRING * tag ) { //assert( character > 0 && character < 128 ); // else it won't work in utf-8 while ( in->good() ) { int c = in->peek(); if ( c == character ) return true; if ( c <= 0 ) // Silent failure: can't get document at this scope return false; in->get(); *tag += (char) c; } return false; } #endif const char* TiXmlBase::ReadName( const char* p, TIXML_STRING * name, TiXmlEncoding encoding ) { *name = ""; assert( p ); // Names start with letters or underscores. // Of course, in unicode, tinyxml has no idea what a letter *is*. The // algorithm is generous. // // After that, they can be letters, underscores, numbers, // hyphens, or colons. (Colons are valid ony for namespaces, // but tinyxml can't tell namespaces from names.) if ( p && *p && ( IsAlpha( (unsigned char) *p, encoding ) || *p == '_' ) ) { while( p && *p && ( IsAlphaNum( (unsigned char ) *p, encoding ) || *p == '_' || *p == '-' || *p == '.' || *p == ':' ) ) { (*name) += *p; ++p; } return p; } return 0; } const char* TiXmlBase::GetEntity( const char* p, char* value, int* length, TiXmlEncoding encoding ) { // Presume an entity, and pull it out. TIXML_STRING ent; int i; *length = 0; if ( *(p+1) && *(p+1) == '#' && *(p+2) ) { unsigned long ucs = 0; ptrdiff_t delta = 0; unsigned mult = 1; if ( *(p+2) == 'x' ) { // Hexadecimal. if ( !*(p+3) ) return 0; const char* q = p+3; q = strchr( q, ';' ); if ( !q || !*q ) return 0; delta = q-p; --q; while ( *q != 'x' ) { if ( *q >= '0' && *q <= '9' ) ucs += mult * (*q - '0'); else if ( *q >= 'a' && *q <= 'f' ) ucs += mult * (*q - 'a' + 10); else if ( *q >= 'A' && *q <= 'F' ) ucs += mult * (*q - 'A' + 10 ); else return 0; mult *= 16; --q; } } else { // Decimal. if ( !*(p+2) ) return 0; const char* q = p+2; q = strchr( q, ';' ); if ( !q || !*q ) return 0; delta = q-p; --q; while ( *q != '#' ) { if ( *q >= '0' && *q <= '9' ) ucs += mult * (*q - '0'); else return 0; mult *= 10; --q; } } if ( encoding == TIXML_ENCODING_UTF8 ) { // convert the UCS to UTF-8 ConvertUTF32ToUTF8( ucs, value, length ); } else { *value = (char)ucs; *length = 1; } return p + delta + 1; } // Now try to match it. for( i=0; i<NUM_ENTITY; ++i ) { if ( strncmp( entity[i].str, p, entity[i].strLength ) == 0 ) { assert( strlen( entity[i].str ) == entity[i].strLength ); *value = entity[i].chr; *length = 1; return ( p + entity[i].strLength ); } } // So it wasn't an entity, its unrecognized, or something like that. *value = *p; // Don't put back the last one, since we return it! return p+1; } bool TiXmlBase::StringEqual( const char* p, const char* tag, bool ignoreCase, TiXmlEncoding encoding ) { assert( p ); assert( tag ); if ( !p || !*p ) { assert( 0 ); return false; } const char* q = p; if ( ignoreCase ) { while ( *q && *tag && ToLower( *q, encoding ) == ToLower( *tag, encoding ) ) { ++q; ++tag; } if ( *tag == 0 ) return true; } else { while ( *q && *tag && *q == *tag ) { ++q; ++tag; } if ( *tag == 0 ) // Have we found the end of the tag, and everything equal? return true; } return false; } const char* TiXmlBase::ReadText( const char* p, TIXML_STRING * text, bool trimWhiteSpace, const char* endTag, bool caseInsensitive, TiXmlEncoding encoding ) { *text = ""; if ( !trimWhiteSpace // certain tags always keep whitespace || !condenseWhiteSpace ) // if true, whitespace is always kept { // Keep all the white space. while ( p && *p && !StringEqual( p, endTag, caseInsensitive, encoding ) ) { int len; char cArr[4] = { 0, 0, 0, 0 }; p = GetChar( p, cArr, &len, encoding ); text->append( cArr, len ); } } else { bool whitespace = false; // Remove leading white space: p = SkipWhiteSpace( p, encoding ); while ( p && *p && !StringEqual( p, endTag, caseInsensitive, encoding ) ) { if ( *p == '\r' || *p == '\n' ) { whitespace = true; ++p; } else if ( IsWhiteSpace( *p ) ) { whitespace = true; ++p; } else { // If we've found whitespace, add it before the // new character. Any whitespace just becomes a space. if ( whitespace ) { (*text) += ' '; whitespace = false; } int len; char cArr[4] = { 0, 0, 0, 0 }; p = GetChar( p, cArr, &len, encoding ); if ( len == 1 ) (*text) += cArr[0]; // more efficient else text->append( cArr, len ); } } } return p + strlen( endTag ); } #ifdef TIXML_USE_STL void TiXmlDocument::StreamIn( TIXML_ISTREAM * in, TIXML_STRING * tag ) { // The basic issue with a document is that we don't know what we're // streaming. Read something presumed to be a tag (and hope), then // identify it, and call the appropriate stream method on the tag. // // This "pre-streaming" will never read the closing ">" so the // sub-tag can orient itself. if ( !StreamTo( in, '<', tag ) ) { SetError( TIXML_ERROR_PARSING_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); return; } while ( in->good() ) { int tagIndex = (int) tag->length(); while ( in->good() && in->peek() != '>' ) { int c = in->get(); if ( c <= 0 ) { SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN ); break; } (*tag) += (char) c; } if ( in->good() ) { // We now have something we presume to be a node of // some sort. Identify it, and call the node to // continue streaming. TiXmlNode* node = Identify( tag->c_str() + tagIndex, TIXML_DEFAULT_ENCODING ); if ( node ) { node->StreamIn( in, tag ); bool isElement = node->ToElement() != 0; delete node; node = 0; // If this is the root element, we're done. Parsing will be // done by the >> operator. if ( isElement ) { return; } } else { SetError( TIXML_ERROR, 0, 0, TIXML_ENCODING_UNKNOWN ); return; } } } // We should have returned sooner. SetError( TIXML_ERROR, 0, 0, TIXML_ENCODING_UNKNOWN ); } #endif const char* TiXmlDocument::Parse( const char* p, TiXmlParsingData* prevData, TiXmlEncoding encoding ) { ClearError(); // Parse away, at the document level. Since a document // contains nothing but other tags, most of what happens // here is skipping white space. if ( !p || !*p ) { SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); return 0; } // Note that, for a document, this needs to come // before the while space skip, so that parsing // starts from the pointer we are given. location.Clear(); if ( prevData ) { location.row = prevData->cursor.row; location.col = prevData->cursor.col; } else { location.row = 0; location.col = 0; } TiXmlParsingData data( p, TabSize(), location.row, location.col ); location = data.Cursor(); if ( encoding == TIXML_ENCODING_UNKNOWN ) { // Check for the Microsoft UTF-8 lead bytes. const unsigned char* pU = (const unsigned char*)p; if ( *(pU+0) && *(pU+0) == TIXML_UTF_LEAD_0 && *(pU+1) && *(pU+1) == TIXML_UTF_LEAD_1 && *(pU+2) && *(pU+2) == TIXML_UTF_LEAD_2 ) { encoding = TIXML_ENCODING_UTF8; } } p = SkipWhiteSpace( p, encoding ); if ( !p ) { SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); return 0; } while ( p && *p ) { TiXmlNode* node = Identify( p, encoding ); if ( node ) { p = node->Parse( p, &data, encoding ); LinkEndChild( node ); } else { break; } // Did we get encoding info? if ( encoding == TIXML_ENCODING_UNKNOWN && node->ToDeclaration() ) { TiXmlDeclaration* dec = node->ToDeclaration(); const char* enc = dec->Encoding(); assert( enc ); if ( *enc == 0 ) encoding = TIXML_ENCODING_UTF8; else if ( StringEqual( enc, "UTF-8", true, TIXML_ENCODING_UNKNOWN ) ) encoding = TIXML_ENCODING_UTF8; else if ( StringEqual( enc, "UTF8", true, TIXML_ENCODING_UNKNOWN ) ) encoding = TIXML_ENCODING_UTF8; // incorrect, but be nice else encoding = TIXML_ENCODING_LEGACY; } p = SkipWhiteSpace( p, encoding ); } // Was this empty? if ( !firstChild ) { SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, encoding ); return 0; } // All is well. return p; } void TiXmlDocument::SetError( int err, const char* pError, TiXmlParsingData* data, TiXmlEncoding encoding ) { // The first error in a chain is more accurate - don't set again! if ( error ) return; assert( err > 0 && err < TIXML_ERROR_STRING_COUNT ); error = true; errorId = err; errorDesc = errorString[ errorId ]; errorLocation.Clear(); if ( pError && data ) { //TiXmlParsingData data( pError, prevData ); data->Stamp( pError, encoding ); errorLocation = data->Cursor(); } } TiXmlNode* TiXmlNode::Identify( const char* p, TiXmlEncoding encoding ) { TiXmlNode* returnNode = 0; p = SkipWhiteSpace( p, encoding ); if( !p || !*p || *p != '<' ) { return 0; } TiXmlDocument* doc = GetDocument(); p = SkipWhiteSpace( p, encoding ); if ( !p || !*p ) { return 0; } // What is this thing? // - Elements start with a letter or underscore, but xml is reserved. // - Comments: <!-- // - Decleration: <?xml // - Everthing else is unknown to tinyxml. // const char* xmlHeader = { "<?xml" }; const char* commentHeader = { "<!--" }; const char* dtdHeader = { "<!" }; if ( StringEqual( p, xmlHeader, true, encoding ) ) { #ifdef DEBUG_PARSER TIXML_LOG( "XML parsing Declaration\n" ); #endif returnNode = new TiXmlDeclaration(); } else if ( StringEqual( p, commentHeader, false, encoding ) ) { #ifdef DEBUG_PARSER TIXML_LOG( "XML parsing Comment\n" ); #endif returnNode = new TiXmlComment(); } else if ( StringEqual( p, dtdHeader, false, encoding ) ) { #ifdef DEBUG_PARSER TIXML_LOG( "XML parsing Unknown(1)\n" ); #endif returnNode = new TiXmlUnknown(); } else if ( IsAlpha( *(p+1), encoding ) || *(p+1) == '_' ) { #ifdef DEBUG_PARSER TIXML_LOG( "XML parsing Element\n" ); #endif returnNode = new TiXmlElement( "" ); } else { #ifdef DEBUG_PARSER TIXML_LOG( "XML parsing Unknown(2)\n" ); #endif returnNode = new TiXmlUnknown(); } if ( returnNode ) { // Set the parent, so it can report errors returnNode->parent = this; } else { if ( doc ) doc->SetError( TIXML_ERROR_OUT_OF_MEMORY, 0, 0, TIXML_ENCODING_UNKNOWN ); } return returnNode; } #ifdef TIXML_USE_STL void TiXmlElement::StreamIn (TIXML_ISTREAM * in, TIXML_STRING * tag) { // We're called with some amount of pre-parsing. That is, some of "this" // element is in "tag". Go ahead and stream to the closing ">" while( in->good() ) { int c = in->get(); if ( c <= 0 ) { TiXmlDocument* document = GetDocument(); if ( document ) document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN ); return; } (*tag) += (char) c ; if ( c == '>' ) break; } if ( tag->length() < 3 ) return; // Okay...if we are a "/>" tag, then we're done. We've read a complete tag. // If not, identify and stream. if ( tag->at( tag->length() - 1 ) == '>' && tag->at( tag->length() - 2 ) == '/' ) { // All good! return; } else if ( tag->at( tag->length() - 1 ) == '>' ) { // There is more. Could be: // text // closing tag // another node. for ( ;; ) { StreamWhiteSpace( in, tag ); // Do we have text? if ( in->good() && in->peek() != '<' ) { // Yep, text. TiXmlText text( "" ); text.StreamIn( in, tag ); // What follows text is a closing tag or another node. // Go around again and figure it out. continue; } // We now have either a closing tag...or another node. // We should be at a "<", regardless. if ( !in->good() ) return; assert( in->peek() == '<' ); int tagIndex = tag->length(); bool closingTag = false; bool firstCharFound = false; for( ;; ) { if ( !in->good() ) return; int c = in->peek(); if ( c <= 0 ) { TiXmlDocument* document = GetDocument(); if ( document ) document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN ); return; } if ( c == '>' ) break; *tag += (char) c; in->get(); if ( !firstCharFound && c != '<' && !IsWhiteSpace( c ) ) { firstCharFound = true; if ( c == '/' ) closingTag = true; } } // If it was a closing tag, then read in the closing '>' to clean up the input stream. // If it was not, the streaming will be done by the tag. if ( closingTag ) { if ( !in->good() ) return; int c = in->get(); if ( c <= 0 ) { TiXmlDocument* document = GetDocument(); if ( document ) document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN ); return; } assert( c == '>' ); *tag += (char) c; // We are done, once we've found our closing tag. return; } else { // If not a closing tag, id it, and stream. const char* tagloc = tag->c_str() + tagIndex; TiXmlNode* node = Identify( tagloc, TIXML_DEFAULT_ENCODING ); if ( !node ) return; node->StreamIn( in, tag ); delete node; node = 0; // No return: go around from the beginning: text, closing tag, or node. } } } } #endif const char* TiXmlElement::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) { p = SkipWhiteSpace( p, encoding ); TiXmlDocument* document = GetDocument(); if ( !p || !*p ) { if ( document ) document->SetError( TIXML_ERROR_PARSING_ELEMENT, 0, 0, encoding ); return 0; } // TiXmlParsingData data( p, prevData ); if ( data ) { data->Stamp( p, encoding ); location = data->Cursor(); } if ( *p != '<' ) { if ( document ) document->SetError( TIXML_ERROR_PARSING_ELEMENT, p, data, encoding ); return 0; } p = SkipWhiteSpace( p+1, encoding ); // Read the name. const char* pErr = p; p = ReadName( p, &value, encoding ); if ( !p || !*p ) { if ( document ) document->SetError( TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME, pErr, data, encoding ); return 0; } TIXML_STRING endTag ("</"); endTag += value; endTag += ">"; // Check for and read attributes. Also look for an empty // tag or an end tag. while ( p && *p ) { pErr = p; p = SkipWhiteSpace( p, encoding ); if ( !p || !*p ) { if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, pErr, data, encoding ); return 0; } if ( *p == '/' ) { ++p; // Empty tag. if ( *p != '>' ) { if ( document ) document->SetError( TIXML_ERROR_PARSING_EMPTY, p, data, encoding ); return 0; } return (p+1); } else if ( *p == '>' ) { // Done with attributes (if there were any.) // Read the value -- which can include other // elements -- read the end tag, and return. ++p; p = ReadValue( p, data, encoding ); // Note this is an Element method, and will set the error if one happens. if ( !p || !*p ) return 0; // We should find the end tag now if ( StringEqual( p, endTag.c_str(), false, encoding ) ) { p += endTag.length(); return p; } else { if ( document ) document->SetError( TIXML_ERROR_READING_END_TAG, p, data, encoding ); return 0; } } else { // Try to read an attribute: TiXmlAttribute* attrib = new TiXmlAttribute(); if ( !attrib ) { if ( document ) document->SetError( TIXML_ERROR_OUT_OF_MEMORY, pErr, data, encoding ); return 0; } attrib->SetDocument( document ); const char* pErr = p; p = attrib->Parse( p, data, encoding ); if ( !p || !*p ) { if ( document ) document->SetError( TIXML_ERROR_PARSING_ELEMENT, pErr, data, encoding ); delete attrib; return 0; } // Handle the strange case of double attributes: TiXmlAttribute* node = attributeSet.Find( attrib->Name() ); if ( node ) { node->SetValue( attrib->Value() ); delete attrib; return 0; } attributeSet.Add( attrib ); } } return p; } const char* TiXmlElement::ReadValue( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) { TiXmlDocument* document = GetDocument(); const char* pWithWhiteSpace = p; // Read in text and elements in any order. p = SkipWhiteSpace( p, encoding ); while ( p && *p ) { if ( *p != '<' ) { // Take what we have, make a text element. TiXmlText* textNode = new TiXmlText( "" ); if ( !textNode ) { if ( document ) document->SetError( TIXML_ERROR_OUT_OF_MEMORY, 0, 0, encoding ); return 0; } if ( TiXmlBase::IsWhiteSpaceCondensed() ) { p = textNode->Parse( p, data, encoding ); } else { // Special case: we want to keep the white space // so that leading spaces aren't removed. p = textNode->Parse( pWithWhiteSpace, data, encoding ); } if ( !textNode->Blank() ) LinkEndChild( textNode ); else delete textNode; } else { // We hit a '<' // Have we hit a new element or an end tag? if ( StringEqual( p, "</", false, encoding ) ) { return p; } else { TiXmlNode* node = Identify( p, encoding ); if ( node ) { p = node->Parse( p, data, encoding ); LinkEndChild( node ); } else { return 0; } } } p = SkipWhiteSpace( p, encoding ); } if ( !p ) { if ( document ) document->SetError( TIXML_ERROR_READING_ELEMENT_VALUE, 0, 0, encoding ); } return p; } #ifdef TIXML_USE_STL void TiXmlUnknown::StreamIn( TIXML_ISTREAM * in, TIXML_STRING * tag ) { while ( in->good() ) { int c = in->get(); if ( c <= 0 ) { TiXmlDocument* document = GetDocument(); if ( document ) document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN ); return; } (*tag) += (char) c; if ( c == '>' ) { // All is well. return; } } } #endif const char* TiXmlUnknown::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) { TiXmlDocument* document = GetDocument(); p = SkipWhiteSpace( p, encoding ); // TiXmlParsingData data( p, prevData ); if ( data ) { data->Stamp( p, encoding ); location = data->Cursor(); } if ( !p || !*p || *p != '<' ) { if ( document ) document->SetError( TIXML_ERROR_PARSING_UNKNOWN, p, data, encoding ); return 0; } ++p; value = ""; while ( p && *p && *p != '>' ) { value += *p; ++p; } if ( !p ) { if ( document ) document->SetError( TIXML_ERROR_PARSING_UNKNOWN, 0, 0, encoding ); } if ( *p == '>' ) return p+1; return p; } #ifdef TIXML_USE_STL void TiXmlComment::StreamIn( TIXML_ISTREAM * in, TIXML_STRING * tag ) { while ( in->good() ) { int c = in->get(); if ( c <= 0 ) { TiXmlDocument* document = GetDocument(); if ( document ) document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN ); return; } (*tag) += (char) c; if ( c == '>' && tag->at( tag->length() - 2 ) == '-' && tag->at( tag->length() - 3 ) == '-' ) { // All is well. return; } } } #endif const char* TiXmlComment::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) { TiXmlDocument* document = GetDocument(); value = ""; p = SkipWhiteSpace( p, encoding ); // TiXmlParsingData data( p, prevData ); if ( data ) { data->Stamp( p, encoding ); location = data->Cursor(); } const char* startTag = "<!--"; const char* endTag = "-->"; if ( !StringEqual( p, startTag, false, encoding ) ) { document->SetError( TIXML_ERROR_PARSING_COMMENT, p, data, encoding ); return 0; } p += strlen( startTag ); p = ReadText( p, &value, false, endTag, false, encoding ); return p; } const char* TiXmlAttribute::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) { p = SkipWhiteSpace( p, encoding ); if ( !p || !*p ) return 0; int tabsize = 4; if ( document ) tabsize = document->TabSize(); // TiXmlParsingData data( p, prevData ); if ( data ) { data->Stamp( p, encoding ); location = data->Cursor(); } // Read the name, the '=' and the value. const char* pErr = p; p = ReadName( p, &name, encoding ); if ( !p || !*p ) { if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, pErr, data, encoding ); return 0; } p = SkipWhiteSpace( p, encoding ); if ( !p || !*p || *p != '=' ) { if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding ); return 0; } ++p; // skip '=' p = SkipWhiteSpace( p, encoding ); if ( !p || !*p ) { if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding ); return 0; } const char* end; if ( *p == '\'' ) { ++p; end = "\'"; p = ReadText( p, &value, false, end, false, encoding ); } else if ( *p == '"' ) { ++p; end = "\""; p = ReadText( p, &value, false, end, false, encoding ); } else { // All attribute values should be in single or double quotes. // But this is such a common error that the parser will try // its best, even without them. value = ""; while ( p && *p // existence && !IsWhiteSpace( *p ) && *p != '\n' && *p != '\r' // whitespace && *p != '/' && *p != '>' ) // tag end { value += *p; ++p; } } return p; } #ifdef TIXML_USE_STL void TiXmlText::StreamIn( TIXML_ISTREAM * in, TIXML_STRING * tag ) { while ( in->good() ) { int c = in->peek(); if ( c == '<' ) return; if ( c <= 0 ) { TiXmlDocument* document = GetDocument(); if ( document ) document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN ); return; } (*tag) += (char) c; in->get(); } } #endif const char* TiXmlText::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) { value = ""; // TiXmlParsingData data( p, prevData ); if ( data ) { data->Stamp( p, encoding ); location = data->Cursor(); } bool ignoreWhite = true; const char* end = "<"; p = ReadText( p, &value, ignoreWhite, end, false, encoding ); if ( p ) return p-1; // don't truncate the '<' return 0; } #ifdef TIXML_USE_STL void TiXmlDeclaration::StreamIn( TIXML_ISTREAM * in, TIXML_STRING * tag ) { while ( in->good() ) { int c = in->get(); if ( c <= 0 ) { TiXmlDocument* document = GetDocument(); if ( document ) document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN ); return; } (*tag) += (char) c; if ( c == '>' ) { // All is well. return; } } } #endif const char* TiXmlDeclaration::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding _encoding ) { p = SkipWhiteSpace( p, _encoding ); // Find the beginning, find the end, and look for // the stuff in-between. TiXmlDocument* document = GetDocument(); if ( !p || !*p || !StringEqual( p, "<?xml", true, _encoding ) ) { if ( document ) document->SetError( TIXML_ERROR_PARSING_DECLARATION, 0, 0, _encoding ); return 0; } // TiXmlParsingData data( p, prevData ); if ( data ) { data->Stamp( p, _encoding ); location = data->Cursor(); } p += 5; version = ""; encoding = ""; standalone = ""; while ( p && *p ) { if ( *p == '>' ) { ++p; return p; } p = SkipWhiteSpace( p, _encoding ); if ( StringEqual( p, "version", true, _encoding ) ) { TiXmlAttribute attrib; p = attrib.Parse( p, data, _encoding ); version = attrib.Value(); } else if ( StringEqual( p, "encoding", true, _encoding ) ) { TiXmlAttribute attrib; p = attrib.Parse( p, data, _encoding ); encoding = attrib.Value(); } else if ( StringEqual( p, "standalone", true, _encoding ) ) { TiXmlAttribute attrib; p = attrib.Parse( p, data, _encoding ); standalone = attrib.Value(); } else { // Read over whatever it is. while( p && *p && *p != '>' && !IsWhiteSpace( *p ) ) ++p; } } return 0; } bool TiXmlText::Blank() const { for ( unsigned i=0; i<value.length(); i++ ) if ( !IsWhiteSpace( value[i] ) ) return false; return true; }
{ "pile_set_name": "Github" }
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2006-2010 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_NUMTRAITS_H #define EIGEN_NUMTRAITS_H namespace Eigen { /** \class NumTraits * \ingroup Core_Module * * \brief Holds information about the various numeric (i.e. scalar) types allowed by Eigen. * * \param T the numeric type at hand * * This class stores enums, typedefs and static methods giving information about a numeric type. * * The provided data consists of: * \li A typedef \a Real, giving the "real part" type of \a T. If \a T is already real, * then \a Real is just a typedef to \a T. If \a T is \c std::complex<U> then \a Real * is a typedef to \a U. * \li A typedef \a NonInteger, giving the type that should be used for operations producing non-integral values, * such as quotients, square roots, etc. If \a T is a floating-point type, then this typedef just gives * \a T again. Note however that many Eigen functions such as internal::sqrt simply refuse to * take integers. Outside of a few cases, Eigen doesn't do automatic type promotion. Thus, this typedef is * only intended as a helper for code that needs to explicitly promote types. * \li A typedef \a Nested giving the type to use to nest a value inside of the expression tree. If you don't know what * this means, just use \a T here. * \li An enum value \a IsComplex. It is equal to 1 if \a T is a \c std::complex * type, and to 0 otherwise. * \li An enum value \a IsInteger. It is equal to \c 1 if \a T is an integer type such as \c int, * and to \c 0 otherwise. * \li Enum values ReadCost, AddCost and MulCost representing a rough estimate of the number of CPU cycles needed * to by move / add / mul instructions respectively, assuming the data is already stored in CPU registers. * Stay vague here. No need to do architecture-specific stuff. * \li An enum value \a IsSigned. It is equal to \c 1 if \a T is a signed type and to 0 if \a T is unsigned. * \li An enum value \a RequireInitialization. It is equal to \c 1 if the constructor of the numeric type \a T must * be called, and to 0 if it is safe not to call it. Default is 0 if \a T is an arithmetic type, and 1 otherwise. * \li An epsilon() function which, unlike std::numeric_limits::epsilon(), returns a \a Real instead of a \a T. * \li A dummy_precision() function returning a weak epsilon value. It is mainly used as a default * value by the fuzzy comparison operators. * \li highest() and lowest() functions returning the highest and lowest possible values respectively. */ template<typename T> struct GenericNumTraits { enum { IsInteger = std::numeric_limits<T>::is_integer, IsSigned = std::numeric_limits<T>::is_signed, IsComplex = 0, RequireInitialization = internal::is_arithmetic<T>::value ? 0 : 1, ReadCost = 1, AddCost = 1, MulCost = 1 }; typedef T Real; typedef typename internal::conditional< IsInteger, typename internal::conditional<sizeof(T)<=2, float, double>::type, T >::type NonInteger; typedef T Nested; static inline Real epsilon() { return std::numeric_limits<T>::epsilon(); } static inline Real dummy_precision() { // make sure to override this for floating-point types return Real(0); } static inline T highest() { return (std::numeric_limits<T>::max)(); } static inline T lowest() { return IsInteger ? (std::numeric_limits<T>::min)() : (-(std::numeric_limits<T>::max)()); } #ifdef EIGEN2_SUPPORT enum { HasFloatingPoint = !IsInteger }; typedef NonInteger FloatingPoint; #endif }; template<typename T> struct NumTraits : GenericNumTraits<T> {}; template<> struct NumTraits<float> : GenericNumTraits<float> { static inline float dummy_precision() { return 1e-5f; } }; template<> struct NumTraits<double> : GenericNumTraits<double> { static inline double dummy_precision() { return 1e-12; } }; template<> struct NumTraits<long double> : GenericNumTraits<long double> { static inline long double dummy_precision() { return 1e-15l; } }; template<typename _Real> struct NumTraits<std::complex<_Real> > : GenericNumTraits<std::complex<_Real> > { typedef _Real Real; enum { IsComplex = 1, RequireInitialization = NumTraits<_Real>::RequireInitialization, ReadCost = 2 * NumTraits<_Real>::ReadCost, AddCost = 2 * NumTraits<Real>::AddCost, MulCost = 4 * NumTraits<Real>::MulCost + 2 * NumTraits<Real>::AddCost }; static inline Real epsilon() { return NumTraits<Real>::epsilon(); } static inline Real dummy_precision() { return NumTraits<Real>::dummy_precision(); } }; template<typename Scalar, int Rows, int Cols, int Options, int MaxRows, int MaxCols> struct NumTraits<Array<Scalar, Rows, Cols, Options, MaxRows, MaxCols> > { typedef Array<Scalar, Rows, Cols, Options, MaxRows, MaxCols> ArrayType; typedef typename NumTraits<Scalar>::Real RealScalar; typedef Array<RealScalar, Rows, Cols, Options, MaxRows, MaxCols> Real; typedef typename NumTraits<Scalar>::NonInteger NonIntegerScalar; typedef Array<NonIntegerScalar, Rows, Cols, Options, MaxRows, MaxCols> NonInteger; typedef ArrayType & Nested; enum { IsComplex = NumTraits<Scalar>::IsComplex, IsInteger = NumTraits<Scalar>::IsInteger, IsSigned = NumTraits<Scalar>::IsSigned, RequireInitialization = 1, ReadCost = ArrayType::SizeAtCompileTime==Dynamic ? Dynamic : ArrayType::SizeAtCompileTime * NumTraits<Scalar>::ReadCost, AddCost = ArrayType::SizeAtCompileTime==Dynamic ? Dynamic : ArrayType::SizeAtCompileTime * NumTraits<Scalar>::AddCost, MulCost = ArrayType::SizeAtCompileTime==Dynamic ? Dynamic : ArrayType::SizeAtCompileTime * NumTraits<Scalar>::MulCost }; static inline RealScalar epsilon() { return NumTraits<RealScalar>::epsilon(); } static inline RealScalar dummy_precision() { return NumTraits<RealScalar>::dummy_precision(); } }; } // end namespace Eigen #endif // EIGEN_NUMTRAITS_H
{ "pile_set_name": "Github" }
/* * Copyright (c) 2019. JetBrains s.r.o. * Use of this source code is governed by the MIT license that can be found in the LICENSE file. */ package jetbrains.datalore.plotDemo.model.plotConfig import jetbrains.datalore.plot.parsePlotSpec import jetbrains.datalore.plotDemo.model.PlotConfigDemoBase import jetbrains.datalore.plotDemo.model.SharedPieces open class ABLine : PlotConfigDemoBase() { fun plotSpecList(): List<Map<String, Any>> { return listOf( lineDefaultAlone(), lineDefault(), negativeSlope(), zeroSlope(), variableInterceptAndSlope() ) } companion object { private fun lineDefaultAlone(): Map<String, Any> { val spec = " {" + " 'kind': 'plot'," + " 'layers': [" + " {" + " 'geom': 'abline'," + " 'size': 3" + " }" + " ]" + "}" return HashMap(parsePlotSpec(spec)) } private fun lineDefault(): Map<String, Any> { val abLine = " {" + " 'geom': 'abline'," + " 'size': 3" + " }" return SharedPieces.samplePolyAndPointsPlotWith(abLine, emptyMap()) } private fun negativeSlope(): Map<String, Any> { val abLine = " {" + " 'geom': 'abline'," + " 'slope': '-2'," + " 'size': 3" + " }" return SharedPieces.samplePolyAndPointsPlotWith(abLine, emptyMap()) } private fun zeroSlope(): Map<String, Any> { val abLine = " {" + " 'geom': 'abline'," + " 'intercept': '1'," + " 'slope': '0'," + " 'size': 3" + " }" return SharedPieces.samplePolyAndPointsPlotWith(abLine, emptyMap()) } private fun variableInterceptAndSlope(): Map<String, Any> { val intercept = ArrayList<Double>() val slope = ArrayList<Double>() for (i in 0..9) { intercept.add(i * 0.1) slope.add(i * 0.2) } val abLine = " {" + " 'geom': 'abline'," + " 'size': 2," + " 'mapping': {" + " 'intercept': 'intercept'," + " 'slope': 'slope'," + " 'color': 'intercept'" + " }" + " }" return SharedPieces.samplePolyAndPointsPlotWith(abLine, mapOf( "intercept" to intercept, "slope" to slope )) } } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <ProjectOpt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_optx.xsd"> <SchemaVersion>1.0</SchemaVersion> <Header>### uVision Project, (C) Keil Software</Header> <Extensions> <cExt>*.c</cExt> <aExt>*.s*; *.src; *.a*</aExt> <oExt>*.obj; *.o</oExt> <lExt>*.lib</lExt> <tExt>*.txt; *.h; *.inc</tExt> <pExt>*.plm</pExt> <CppX>*.cpp</CppX> <nMigrate>0</nMigrate> </Extensions> <DaveTm> <dwLowDateTime>0</dwLowDateTime> <dwHighDateTime>0</dwHighDateTime> </DaveTm> <Target> <TargetName>rt-thread</TargetName> <ToolsetNumber>0x4</ToolsetNumber> <ToolsetName>ARM-ADS</ToolsetName> <TargetOption> <CLKADS>12000000</CLKADS> <OPTTT> <gFlags>1</gFlags> <BeepAtEnd>1</BeepAtEnd> <RunSim>0</RunSim> <RunTarget>1</RunTarget> <RunAbUc>0</RunAbUc> </OPTTT> <OPTHX> <HexSelection>1</HexSelection> <FlashByte>65535</FlashByte> <HexRangeLowAddress>0</HexRangeLowAddress> <HexRangeHighAddress>0</HexRangeHighAddress> <HexOffset>0</HexOffset> </OPTHX> <OPTLEX> <PageWidth>79</PageWidth> <PageLength>66</PageLength> <TabStop>8</TabStop> <ListingPath>.\build\keil\List\</ListingPath> </OPTLEX> <ListingPage> <CreateCListing>1</CreateCListing> <CreateAListing>1</CreateAListing> <CreateLListing>1</CreateLListing> <CreateIListing>0</CreateIListing> <AsmCond>1</AsmCond> <AsmSymb>1</AsmSymb> <AsmXref>0</AsmXref> <CCond>1</CCond> <CCode>0</CCode> <CListInc>0</CListInc> <CSymb>0</CSymb> <LinkerCodeListing>0</LinkerCodeListing> </ListingPage> <OPTXL> <LMap>1</LMap> <LComments>1</LComments> <LGenerateSymbols>1</LGenerateSymbols> <LLibSym>1</LLibSym> <LLines>1</LLines> <LLocSym>1</LLocSym> <LPubSym>1</LPubSym> <LXref>0</LXref> <LExpSel>0</LExpSel> </OPTXL> <OPTFL> <tvExp>1</tvExp> <tvExpOptDlg>0</tvExpOptDlg> <IsCurrentTarget>1</IsCurrentTarget> </OPTFL> <CpuCode>18</CpuCode> <DebugOpt> <uSim>0</uSim> <uTrg>1</uTrg> <sLdApp>1</sLdApp> <sGomain>1</sGomain> <sRbreak>1</sRbreak> <sRwatch>1</sRwatch> <sRmem>1</sRmem> <sRfunc>1</sRfunc> <sRbox>1</sRbox> <tLdApp>1</tLdApp> <tGomain>1</tGomain> <tRbreak>1</tRbreak> <tRwatch>1</tRwatch> <tRmem>1</tRmem> <tRfunc>0</tRfunc> <tRbox>1</tRbox> <tRtrace>1</tRtrace> <sRSysVw>1</sRSysVw> <tRSysVw>1</tRSysVw> <sRunDeb>0</sRunDeb> <sLrtime>0</sLrtime> <bEvRecOn>1</bEvRecOn> <bSchkAxf>0</bSchkAxf> <bTchkAxf>0</bTchkAxf> <nTsel>4</nTsel> <sDll></sDll> <sDllPa></sDllPa> <sDlgDll></sDlgDll> <sDlgPa></sDlgPa> <sIfile></sIfile> <tDll></tDll> <tDllPa></tDllPa> <tDlgDll></tDlgDll> <tDlgPa></tDlgPa> <tIfile></tIfile> <pMon>Segger\JL2CM3.dll</pMon> </DebugOpt> <TargetDriverDllRegistry> <SetRegEntry> <Number>0</Number> <Key>UL2CM3</Key> <Name>UL2CM3(-S0 -C0 -P0 ) -FN1 -FC1000 -FD20000000 -FF0STM32F10x_512 -FL080000 -FS08000000 -FP0($$Device:STM32F103ZE$Flash\STM32F10x_512.FLM)</Name> </SetRegEntry> <SetRegEntry> <Number>0</Number> <Key>JL2CM3</Key> <Name>-U30000299 -O78 -S2 -ZTIFSpeedSel5000 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_512 -FS08000000 -FL080000 -FP0($$Device:STM32F103ZE$Flash\STM32F10x_512.FLM)</Name> </SetRegEntry> </TargetDriverDllRegistry> <Breakpoint/> <Tracepoint> <THDelay>0</THDelay> </Tracepoint> <DebugFlag> <trace>0</trace> <periodic>0</periodic> <aLwin>0</aLwin> <aCover>0</aCover> <aSer1>0</aSer1> <aSer2>0</aSer2> <aPa>0</aPa> <viewmode>0</viewmode> <vrSel>0</vrSel> <aSym>0</aSym> <aTbox>0</aTbox> <AscS1>0</AscS1> <AscS2>0</AscS2> <AscS3>0</AscS3> <aSer3>0</aSer3> <eProf>0</eProf> <aLa>0</aLa> <aPa1>0</aPa1> <AscS4>0</AscS4> <aSer4>0</aSer4> <StkLoc>0</StkLoc> <TrcWin>0</TrcWin> <newCpu>0</newCpu> <uProt>0</uProt> </DebugFlag> <LintExecutable></LintExecutable> <LintConfigFile></LintConfigFile> <bLintAuto>0</bLintAuto> <bAutoGenD>0</bAutoGenD> <LntExFlags>0</LntExFlags> <pMisraName></pMisraName> <pszMrule></pszMrule> <pSingCmds></pSingCmds> <pMultCmds></pMultCmds> <pMisraNamep></pMisraNamep> <pszMrulep></pszMrulep> <pSingCmdsp></pSingCmdsp> <pMultCmdsp></pMultCmdsp> <DebugDescription> <Enable>1</Enable> <EnableLog>0</EnableLog> <Protocol>2</Protocol> <DbgClock>10000000</DbgClock> </DebugDescription> </TargetOption> </Target> <Group> <GroupName>Source Group 1</GroupName> <tvExp>0</tvExp> <tvExpOptDlg>0</tvExpOptDlg> <cbSel>0</cbSel> <RteFlg>0</RteFlg> </Group> </ProjectOpt>
{ "pile_set_name": "Github" }
<?php /** * Copyright © OXID eSales AG. All rights reserved. * See LICENSE file for license details. */ namespace OxidEsales\EshopCommunity\Migrations; use Doctrine\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; use OxidEsales\Eshop\Core\Config; use OxidEsales\Eshop\Core\ConfigFile; use OxidEsales\Facts\Facts; /** * Auto-generated Migration: Please modify to your needs! */ class Version20180703135728 extends AbstractMigration { /** * @param Schema $schema */ public function up(Schema $schema): void { $varName = 'contactFormRequiredFields'; $varType = 'arr'; $rawValue = serialize(['email']); $query = "INSERT INTO `oxconfig` ( `OXID`, `OXSHOPID`, `OXVARNAME`, `OXVARTYPE`, `OXVARVALUE` ) SELECT REPLACE(UUID( ) , '-', '' ), `OXID`, ?, ?, ? FROM `oxshops` WHERE NOT EXISTS ( SELECT `OXVARNAME` FROM `oxconfig` WHERE `OXVARNAME` = ? AND `oxconfig`.OXSHOPID = `oxshops`.OXID )"; $this->addSql( $query, [$varName, $varType, $rawValue, $varName] ); } /** * @param Schema $schema */ public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs } }
{ "pile_set_name": "Github" }
#!/bin/sh # SPDX-License-Identifier: GPL-2.0 # # Loading a kernel image via the kexec_file_load syscall can verify either # the IMA signature stored in the security.ima xattr or the PE signature, # both signatures depending on the IMA policy, or none. # # To determine whether the kernel image is signed, this test depends # on pesign and getfattr. This test also requires the kernel to be # built with CONFIG_IKCONFIG enabled and either CONFIG_IKCONFIG_PROC # enabled or access to the extract-ikconfig script. TEST="KEXEC_FILE_LOAD" . ./kexec_common_lib.sh trap "{ rm -f $IKCONFIG ; }" EXIT # Some of the IMA builtin policies may require the kexec kernel image to # be signed, but these policy rules may be replaced with a custom # policy. Only CONFIG_IMA_APPRAISE_REQUIRE_KEXEC_SIGS persists after # loading a custom policy. Check if it is enabled, before reading the # IMA runtime sysfs policy file. # Return 1 for IMA signature required and 0 for not required. is_ima_sig_required() { local ret=0 kconfig_enabled "CONFIG_IMA_APPRAISE_REQUIRE_KEXEC_SIGS=y" \ "IMA kernel image signature required" if [ $? -eq 1 ]; then log_info "IMA signature required" return 1 fi # The architecture specific or a custom policy may require the # kexec kernel image be signed. Policy rules are walked # sequentially. As a result, a policy rule may be defined, but # might not necessarily be used. This test assumes if a policy # rule is specified, that is the intent. # First check for appended signature (modsig), then xattr if [ $ima_read_policy -eq 1 ]; then check_ima_policy "appraise" "func=KEXEC_KERNEL_CHECK" \ "appraise_type=imasig|modsig" ret=$? if [ $ret -eq 1 ]; then log_info "IMA or appended(modsig) signature required" else check_ima_policy "appraise" "func=KEXEC_KERNEL_CHECK" \ "appraise_type=imasig" ret=$? [ $ret -eq 1 ] && log_info "IMA signature required"; fi fi return $ret } # The kexec_file_load_test() is complicated enough, require pesign. # Return 1 for PE signature found and 0 for not found. check_for_pesig() { which pesign > /dev/null 2>&1 || log_skip "pesign not found" pesign -i $KERNEL_IMAGE --show-signature | grep -q "No signatures" local ret=$? if [ $ret -eq 1 ]; then log_info "kexec kernel image PE signed" else log_info "kexec kernel image not PE signed" fi return $ret } # The kexec_file_load_test() is complicated enough, require getfattr. # Return 1 for IMA signature found and 0 for not found. check_for_imasig() { local ret=0 which getfattr > /dev/null 2>&1 if [ $? -eq 1 ]; then log_skip "getfattr not found" fi line=$(getfattr -n security.ima -e hex --absolute-names $KERNEL_IMAGE 2>&1) echo $line | grep -q "security.ima=0x03" if [ $? -eq 0 ]; then ret=1 log_info "kexec kernel image IMA signed" else log_info "kexec kernel image not IMA signed" fi return $ret } # Return 1 for appended signature (modsig) found and 0 for not found. check_for_modsig() { local module_sig_string="~Module signature appended~" local sig="$(tail --bytes $((${#module_sig_string} + 1)) $KERNEL_IMAGE)" local ret=0 if [ "$sig" == "$module_sig_string" ]; then ret=1 log_info "kexec kernel image modsig signed" else log_info "kexec kernel image not modsig signed" fi return $ret } kexec_file_load_test() { local succeed_msg="kexec_file_load succeeded" local failed_msg="kexec_file_load failed" local key_msg="try enabling the CONFIG_INTEGRITY_PLATFORM_KEYRING" line=$(kexec --load --kexec-file-syscall $KERNEL_IMAGE 2>&1) if [ $? -eq 0 ]; then kexec --unload --kexec-file-syscall # In secureboot mode with an architecture specific # policy, make sure either an IMA or PE signature exists. if [ $secureboot -eq 1 ] && [ $arch_policy -eq 1 ] && \ [ $ima_signed -eq 0 ] && [ $pe_signed -eq 0 ] \ && [ $ima_modsig -eq 0 ]; then log_fail "$succeed_msg (missing sig)" fi if [ $kexec_sig_required -eq 1 -o $pe_sig_required -eq 1 ] \ && [ $pe_signed -eq 0 ]; then log_fail "$succeed_msg (missing PE sig)" fi if [ $ima_sig_required -eq 1 ] && [ $ima_signed -eq 0 ] \ && [ $ima_modsig -eq 0 ]; then log_fail "$succeed_msg (missing IMA sig)" fi if [ $pe_sig_required -eq 0 ] && [ $ima_appraise -eq 1 ] \ && [ $ima_sig_required -eq 0 ] && [ $ima_signed -eq 0 ] \ && [ $ima_read_policy -eq 0 ]; then log_fail "$succeed_msg (possibly missing IMA sig)" fi if [ $pe_sig_required -eq 0 ] && [ $ima_appraise -eq 0 ]; then log_info "No signature verification required" elif [ $pe_sig_required -eq 0 ] && [ $ima_appraise -eq 1 ] \ && [ $ima_sig_required -eq 0 ] && [ $ima_signed -eq 0 ] \ && [ $ima_read_policy -eq 1 ]; then log_info "No signature verification required" fi log_pass "$succeed_msg" fi # Check the reason for the kexec_file_load failure echo $line | grep -q "Required key not available" if [ $? -eq 0 ]; then if [ $platform_keyring -eq 0 ]; then log_pass "$failed_msg (-ENOKEY), $key_msg" else log_pass "$failed_msg (-ENOKEY)" fi fi if [ $kexec_sig_required -eq 1 -o $pe_sig_required -eq 1 ] \ && [ $pe_signed -eq 0 ]; then log_pass "$failed_msg (missing PE sig)" fi if [ $ima_sig_required -eq 1 ] && [ $ima_signed -eq 0 ]; then log_pass "$failed_msg (missing IMA sig)" fi if [ $pe_sig_required -eq 0 ] && [ $ima_appraise -eq 1 ] \ && [ $ima_sig_required -eq 0 ] && [ $ima_read_policy -eq 0 ] \ && [ $ima_signed -eq 0 ]; then log_pass "$failed_msg (possibly missing IMA sig)" fi log_pass "$failed_msg" return 0 } # kexec requires root privileges require_root_privileges # get the kernel config get_kconfig kconfig_enabled "CONFIG_KEXEC_FILE=y" "kexec_file_load is enabled" if [ $? -eq 0 ]; then log_skip "kexec_file_load is not enabled" fi # Determine which kernel config options are enabled kconfig_enabled "CONFIG_IMA_APPRAISE=y" "IMA enabled" ima_appraise=$? kconfig_enabled "CONFIG_IMA_ARCH_POLICY=y" \ "architecture specific policy enabled" arch_policy=$? kconfig_enabled "CONFIG_INTEGRITY_PLATFORM_KEYRING=y" \ "platform keyring enabled" platform_keyring=$? kconfig_enabled "CONFIG_IMA_READ_POLICY=y" "reading IMA policy permitted" ima_read_policy=$? kconfig_enabled "CONFIG_KEXEC_SIG_FORCE=y" \ "kexec signed kernel image required" kexec_sig_required=$? kconfig_enabled "CONFIG_KEXEC_BZIMAGE_VERIFY_SIG=y" \ "PE signed kernel image required" pe_sig_required=$? is_ima_sig_required ima_sig_required=$? get_secureboot_mode secureboot=$? # Are there pe and ima signatures check_for_pesig pe_signed=$? check_for_imasig ima_signed=$? check_for_modsig ima_modsig=$? # Test loading the kernel image via kexec_file_load syscall kexec_file_load_test
{ "pile_set_name": "Github" }
while (foo) { }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:int="http://www.springframework.org/schema/integration" xmlns:int-jms="http://www.springframework.org/schema/integration/jms" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation="http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd http://www.springframework.org/schema/integration/jms https://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/util https://www.springframework.org/schema/util/spring-util.xsd"> <int:gateway default-request-channel="pipeline09" default-request-timeout="10000" default-reply-timeout="10000"/> <int-jms:outbound-gateway request-channel="pipeline09" connection-factory="jmsConnectionFactory" request-destination-name="pipeline09-queue-01" receive-timeout="10000" correlation-key="foo"> <int-jms:reply-listener /> </int-jms:outbound-gateway> <int-jms:inbound-gateway request-channel="jmsIn" request-destination-name="pipeline09-queue-01" connection-factory="jmsConnectionFactory" concurrent-consumers="10" reply-timeout="10000" correlation-key="foo"/> <int:chain input-channel="jmsIn" output-channel="anotherGatewayChannel"> <int:header-enricher> <int:header name="delay" expression="new java.util.Random().nextInt(3000)"/> </int:header-enricher> <int:delayer id="foo" default-delay="0" expression="headers.delay"/> <int:transformer expression="payload"/> </int:chain> <int-jms:outbound-gateway request-channel="anotherGatewayChannel" connection-factory="jmsConnectionFactory" request-destination-name="pipeline09-queue-02" receive-timeout="10000" correlation-key="bar"> <int-jms:reply-listener /> </int-jms:outbound-gateway> <int-jms:inbound-gateway request-channel="anotherIn" request-destination-name="pipeline09-queue-02" connection-factory="jmsConnectionFactory" concurrent-consumers="10" reply-timeout="10000" correlation-key="bar"/> <int:transformer input-channel="anotherIn" expression="payload"/> <util:constant id="jmsConnectionFactory" static-field="org.springframework.integration.jms.ActiveMQMultiContextTests.connectionFactory"/> </beans>
{ "pile_set_name": "Github" }
SET @start_rpl_read_size = @@global.rpl_read_size; SELECT @start_rpl_read_size; @start_rpl_read_size 8192 '#--------------------TEST 01------------------------#' SET @@global.rpl_read_size = 102400; SET @@global.rpl_read_size = DEFAULT; SELECT @@global.rpl_read_size; @@global.rpl_read_size 8192 '#---------------------TEST_02-------------------------#' SET @@global.rpl_read_size = @start_rpl_read_size; SELECT @@global.rpl_read_size = 8192; @@global.rpl_read_size = 8192 1 '#--------------------TEST_03------------------------#' SET @@global.rpl_read_size = 81920; SELECT @@global.rpl_read_size; @@global.rpl_read_size 81920 SET @@global.rpl_read_size = 102400; SELECT @@global.rpl_read_size; @@global.rpl_read_size 102400 '#--------------------TEST_04-------------------------#' SET @@global.rpl_read_size = -1; Warnings: Warning 1292 Truncated incorrect rpl_read_size value: '-1' SELECT @@global.rpl_read_size; @@global.rpl_read_size 8192 SET @@global.rpl_read_size = 4096; Warnings: Warning 1292 Truncated incorrect rpl_read_size value: '4096' SELECT @@global.rpl_read_size; @@global.rpl_read_size 8192 SET @@global.rpl_read_size = 18446744073709551616; ERROR 42000: Incorrect argument type to variable 'rpl_read_size' SELECT @@global.rpl_read_size; @@global.rpl_read_size 8192 SET @@global.rpl_read_size = 10000.01; ERROR 42000: Incorrect argument type to variable 'rpl_read_size' SELECT @@global.rpl_read_size; @@global.rpl_read_size 8192 SET @@global.rpl_read_size = ON; ERROR 42000: Incorrect argument type to variable 'rpl_read_size' SELECT @@global.rpl_read_size; @@global.rpl_read_size 8192 SET @@global.rpl_read_size = 'test'; ERROR 42000: Incorrect argument type to variable 'rpl_read_size' SELECT @@global.rpl_read_size; @@global.rpl_read_size 8192 '#-------------------TEST_05----------------------------#' SET @@session.rpl_read_size = 8192; ERROR HY000: Variable 'rpl_read_size' is a GLOBAL variable and should be set with SET GLOBAL SELECT @@session.rpl_read_size; ERROR HY000: Variable 'rpl_read_size' is a GLOBAL variable '#----------------------TEST_06------------------------#' SELECT @@global.rpl_read_size = VARIABLE_VALUE FROM performance_schema.global_variables WHERE VARIABLE_NAME='rpl_read_size'; @@global.rpl_read_size = VARIABLE_VALUE 1 SELECT @@rpl_read_size = VARIABLE_VALUE FROM performance_schema.session_variables WHERE VARIABLE_NAME='rpl_read_size'; @@rpl_read_size = VARIABLE_VALUE 1 '#---------------------TEST_07----------------------#' SET @@global.rpl_read_size = 16384; SELECT @@rpl_read_size = @@global.rpl_read_size; @@rpl_read_size = @@global.rpl_read_size 1 '#---------------------TEST_08----------------------#' SET rpl_read_size = 8192; ERROR HY000: Variable 'rpl_read_size' is a GLOBAL variable and should be set with SET GLOBAL SELECT @@rpl_read_size; @@rpl_read_size 16384 SET local.rpl_read_size = 8192 --Error ER_UNKNOWN_TABLE SELECT local.rpl_read_size; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'local.rpl_read_size = 8192 --Error ER_UNKNOWN_TABLE SELECT local.rpl_read_size' at line 1 SET global.rpl_read_size = 8192; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'global.rpl_read_size = 8192' at line 1 SELECT global.rpl_read_size; ERROR 42S02: Unknown table 'global' in field list SELECT rpl_read_size = @@session.rpl_read_size; ERROR 42S22: Unknown column 'rpl_read_size' in 'field list' SET @@global.rpl_read_size = @start_rpl_read_size; SELECT @@global.rpl_read_size; @@global.rpl_read_size 8192
{ "pile_set_name": "Github" }
package top.androidman.internal.superline /** * @author yanjie * @date 2019-12-25 23:40 * @version 1.0 * SuperLine的粉刷匠行为 */ interface ISuperLinePlastererAction { }
{ "pile_set_name": "Github" }
net: "VGG16_bbox_reg_train_test.prototxt" test_iter: 1 test_interval: 5000 momentum: 0.9 weight_decay: 0.0005 base_lr: 0.002 lr_policy: "step" gamma: 0.1 stepsize: 50000 display: 5000 max_iter: 150000 snapshot: 5000 snapshot_prefix: "model" solver_mode: 1
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>The source code</title> <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" /> <script type="text/javascript" src="../resources/prettify/prettify.js"></script> <style type="text/css"> .highlight { display: block; background-color: #ddd; } </style> <script type="text/javascript"> function highlight() { document.getElementById(location.hash.replace(/#/, "")).className = "highlight"; } </script> </head> <body onload="prettyPrint(); highlight();"> <pre class="prettyprint lang-js"><span id='Ext-data-Response'>/** </span> * @class Ext.data.Response * A generic response class to normalize response-handling internally to the framework. */ Ext.data.Response = function(params) { Ext.apply(this, params); }; Ext.data.Response.prototype = { <span id='Ext-data-Response-cfg-action'> /** </span> * @cfg {String} action {@link Ext.data.Api#actions} */ action: undefined, <span id='Ext-data-Response-cfg-success'> /** </span> * @cfg {Boolean} success */ success : undefined, <span id='Ext-data-Response-cfg-message'> /** </span> * @cfg {String} message */ message : undefined, <span id='Ext-data-Response-cfg-data'> /** </span> * @cfg {Array/Object} data */ data: undefined, <span id='Ext-data-Response-cfg-raw'> /** </span> * @cfg {Object} raw The raw response returned from server-code */ raw: undefined, <span id='Ext-data-Response-cfg-records'> /** </span> * @cfg {Ext.data.Record/Ext.data.Record[]} records related to the Request action */ records: undefined }; </pre> </body> </html>
{ "pile_set_name": "Github" }
<?xml version="1.0"?> <!--Phoronix Test Suite v8.2.0m1--> <PhoronixTestSuite> <TestInformation> <Title>Hierarchical INTegration</Title> <AppVersion>1.0</AppVersion> <Description>This test runs the U.S. Department of Energy's Ames Laboratory Hierarchical INTegration (HINT) benchmark.</Description> <ResultScale>QUIPs</ResultScale> <Proportion>HIB</Proportion> <TimesToRun>3</TimesToRun> </TestInformation> <TestProfile> <Version>1.0.2</Version> <SupportedPlatforms>Linux, Solaris, BSD, MacOSX</SupportedPlatforms> <SoftwareType>Utility</SoftwareType> <TestType>System</TestType> <License>Free</License> <Status>Verified</Status> <ExternalDependencies>build-utilities</ExternalDependencies> <EnvironmentSize>0.2</EnvironmentSize> <ProjectURL>http://www.ima.umn.edu/~coult/hint.tar.gz</ProjectURL> <Maintainer>Michael Larabel</Maintainer> </TestProfile> <TestSettings> <Option> <DisplayName>Test</DisplayName> <Identifier>test</Identifier> <Menu> <Entry> <Name>DOUBLE</Name> <Value>DOUBLE</Value> </Entry> <Entry> <Name>FLOAT</Name> <Value>FLOAT</Value> </Entry> </Menu> </Option> </TestSettings> </PhoronixTestSuite>
{ "pile_set_name": "Github" }
/* Gulp file to create dist */ var gulp = require("gulp"); var concat = require("gulp-concat"); var minify = require("gulp-minify") var header = require('gulp-header'); var autoprefixer = require('gulp-autoprefixer'); const cssmin = require('gulp-cssmin'); /* Prevent error for reload */ function swallowError (error) { // Show error in the console console.log(error.toString()) this.emit('end') } /* Transform ES6 to create the ./dist */ var PluginError = require('plugin-error'); var through = require('through2'); function transform() { return through.obj(function(file, encoding, callback) { if (file.isNull()) { // nothing to do return callback(null, file); } if (file.isStream()) { // file.contents is a Stream - https://nodejs.org/api/stream.html this.emit('error', new PluginError("BUILD", 'Streams not supported!')); } else if (file.isBuffer()) { // file content content = file.contents.toString(); if (content) { // Prevent ol_has_DEVICE_PIXEL_RATIO //content = content.replace(/ol_has_DEVICE_PIXEL_RATIO/g,"ol.has.DEVICE_PIXEL_RATIO"); // change ol_namespace_Class_Att => ol.namespace.Class.Att content = content.replace(/(\bol_([a-z,A-Z]*)_([a-z,A-Z,4]*)_([a-z,A-Z]*)\b)/g,"ol.$2.$3.$4"); // change ol_namespace_Class => ol.namespace.Class content = content.replace(/(\bol_([a-z,A-Z]*)_([a-z,A-Z]*))/g,"ol.$2.$3"); // change ol_Class => ol.namespace.Class content = content.replace(/(\bol_([a-z,A-Z]*))/g,"ol.$2"); // change var ol.Class => ol.Class content = content.replace(/(\bvar ol\.([a-z,A-Z]*))/g,"ol.$2"); // remove import / export content = content.replace(/\bimport (.*)|\bexport (.*)/g,""); // remove empty lines content = content.replace(/\r/gm, ''); content = content.replace(/^\s*[\n]/gm, ''); // let and const => var (for IE) content = content.replace(/\blet\b/g, 'var'); content = content.replace(/\bconst\b/g, 'var'); // return content file.contents = Buffer.from(content);// new Buffer(content); } return callback(null, file); } }); }; // Retrieve option (--debug for css) var options = require("minimist")(process.argv.slice(2)); var name = "ol-ext"; // using data from package.json var pkg = require('./package.json'); var banner = ['/**', ' * <%= pkg.name %> - <%= pkg.description %>', ' * @description <%= pkg.keywords %>', ' * @version v<%= pkg.version %>', ' * @author <%= pkg.author.name %>', ' * @see <%= pkg.homepage %>', ' * @license <%= pkg.license %>', ' */', ''].join('\n'); // Build css. Use --debug to build in debug mode gulp.task('css0', function () { return gulp.src([ "./src/control/*.css", "!./src/control/PirateMap.css", "./src/featureanimation/*.css", "./src/filter/*.css", "./src/interaction/*.css", "./src/layer/*.css", "./src/map/*.css", "./src/overlay/*.css", "./src/style/*.css", "./src/util/*.css", "./src/utils/*.css" ]) .pipe(autoprefixer('last 2 versions')) .pipe(concat(name+'.css')) .pipe(gulp.dest('./dist')); }); gulp.task('cssmin', function () { return gulp.src([ "./src/control/*.css", "!./src/control/PirateMap.css", "./src/featureanimation/*.css", "./src/filter/*.css", "./src/interaction/*.css", "./src/layer/*.css", "./src/map/*.css", "./src/overlay/*.css", "./src/style/*.css", "./src/util/*.css", "./src/utils/*.css" ]) .pipe(autoprefixer('last 2 versions')) .pipe(concat(name+'.min.css')) .pipe(cssmin()) .pipe(gulp.dest('./dist')); }); gulp.task('css', gulp.parallel('css0','cssmin')); // Build js gulp.task("js", function() { return gulp.src([ "./src/util/ext.js", "./src/util/*.js", "!./src/util/getVectorContext.js", "./src/control/CanvasBase.js","./src/control/SelectBase.js","./src/control/Search.js","./src/control/SearchJSON.js","./src/control/SearchPhoton.js","./src/control/SearchGeoportail.js", "./src/control/LayerSwitcher.js", "./src/control/*.js", "!./src/control/PirateMap.js", "!./src/control/Cloud.js", "./src/featureanimation/FeatureAnimation.js", "./src/featureanimation/*.js", "./src/filter/Base.js", "./src/filter/Mask.js", "./src/filter/*.js", "./src/format/GeoJSONX.js", "./src/format/*.js", "./src/interaction/*.js", "./src/source/*.js", "./src/layer/*.js", "./src/map/*.js", "./src/particule/*.js", "./src/overlay/Popup.js", "./src/overlay/*.js", "./src/geom/*.js", "./src/render/*.js", "./src/style/*.js", "!./src/style/FontMakiDef.js", "!./src/style/FontMaki2Def.js", "!./src/style/FontAwesomeDef.js", // Export utils in extrajs //"./src/utils/*.js", "!./src/render/Pulse.js", "!./src/render/Markup.js", "!./*/*.min.js", "!./src/filter/TextureImage.js" ]) .pipe(transform()) .pipe(concat(name+".js")) .pipe(minify( { ext: { src:".js", min:".min.js" } })) .on('error', swallowError) .pipe(header(banner, { pkg : pkg } )) .pipe(gulp.dest("dist")) .on('end', function(){ console.log('\x1b[32m','\n>>> Terminated...','\x1b[0m')}); }); /* Watch for modification to recreate the dist */ gulp.task('watch', function() { gulp.watch(['./src/*/*.js','./src/*/*.css'], ['default']); }); /* Start a server and watch for modification for live reload */ gulp.task('serve', function() { var liveServer = require("live-server"); var params = { port: 8181, // Set the server port. Defaults to 8080. host: "0.0.0.0", // Set the address to bind to. Defaults to 0.0.0.0 or process.env.IP. open: false, // When false, it won't load your browser by default. watch: ['dist','examples'], // comma-separated string for paths to watch // ignore: '', // comma-separated string for paths to ignore file: "index.html", // When set, serve this file (server root relative) for every 404 (useful for single-page applications) wait: 1000, // Waits for all changes, before reloading. Defaults to 0 sec. logLevel: 2 // 0 = errors only, 1 = some, 2 = lots }; liveServer.start(params); //return gulp.watch(['./src/*/*.js','./src/*/*.css'], gulp.series('default')); return gulp.watch('src/*/*', gulp.series('default')); }); // Build extra js files to be used individually gulp.task("extrajs", function() { return gulp.src([ "./src/control/Cloud.js", "./src/style/FontMakiDef.js", "./src/style/FontMaki2Def.js", "./src/style/FontAwesomeDef.js", "./src/utils/*.js", "./src/filter/TextureImage.js" ]) .pipe(transform()) .pipe(gulp.dest("dist/extra")) }); // Build files to be used individually gulp.task("lib", function() { var src = ['control','featureanimation','filter','format','geom','interaction','layer','overlay','render','source','style','util','utils']; for (var i=0; i<src.length; i++) { gulp.src("./src/"+src[i]+"/*.js") .pipe(transform()) .pipe(gulp.dest("lib/"+src[i])); gulp.src("./src/"+src[i]+"/*.css") .pipe(autoprefixer('last 2 versions')) .pipe(gulp.dest("lib/"+src[i])); } }); /** * Move the files into root * for packaging */ gulp.task ("prepublish", function(){ return gulp.src(["./src/*/*.*"], { base: './src' }) .pipe(gulp.dest('./')); }); /** * Remove files after packaging */ gulp.task ("postpublish", function(){ var clean = require('gulp-clean'); return gulp.src([ "./control", "./featureanimation", "./filter", "./format", "./geom", "./interaction", "./layer", "./map", "./overlay", "./particule", "./render", "./source", "./style", "./util", "./utils" ]) .pipe(clean()); }); /** Build the doc */ gulp.task('doc', function (cb) { var jsdoc = require('gulp-jsdoc3'); var config = require('./doc/jsdoc.json'); return gulp.src([ "doc/doc.md", "doc/namespace.js", "./dist/ol-ext.js" ], {read: false}) .pipe(jsdoc(config, cb)); }); // build the dist gulp.task("dist", gulp.parallel("js","extrajs","css")); // The default task that will be run if no task is supplied gulp.task("default", gulp.parallel("js","extrajs","css"));
{ "pile_set_name": "Github" }
/* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors * Licensed under the New BSD license. See LICENSE or: * http://opensource.org/licenses/BSD-3-Clause */ exports.GREATEST_LOWER_BOUND = 1; exports.LEAST_UPPER_BOUND = 2; /** * Recursive implementation of binary search. * * @param aLow Indices here and lower do not contain the needle. * @param aHigh Indices here and higher do not contain the needle. * @param aNeedle The element being searched for. * @param aHaystack The non-empty array being searched. * @param aCompare Function which takes two elements and returns -1, 0, or 1. * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the * closest element that is smaller than or greater than the one we are * searching for, respectively, if the exact element cannot be found. */ function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { // This function terminates when one of the following is true: // // 1. We find the exact element we are looking for. // // 2. We did not find the exact element, but we can return the index of // the next-closest element. // // 3. We did not find the exact element, and there is no next-closest // element than the one we are searching for, so we return -1. var mid = Math.floor((aHigh - aLow) / 2) + aLow; var cmp = aCompare(aNeedle, aHaystack[mid], true); if (cmp === 0) { // Found the element we are looking for. return mid; } else if (cmp > 0) { // Our needle is greater than aHaystack[mid]. if (aHigh - mid > 1) { // The element is in the upper half. return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); } // The exact needle element was not found in this haystack. Determine if // we are in termination case (3) or (2) and return the appropriate thing. if (aBias == exports.LEAST_UPPER_BOUND) { return aHigh < aHaystack.length ? aHigh : -1; } else { return mid; } } else { // Our needle is less than aHaystack[mid]. if (mid - aLow > 1) { // The element is in the lower half. return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); } // we are in termination case (3) or (2) and return the appropriate thing. if (aBias == exports.LEAST_UPPER_BOUND) { return mid; } else { return aLow < 0 ? -1 : aLow; } } } /** * This is an implementation of binary search which will always try and return * the index of the closest element if there is no exact hit. This is because * mappings between original and generated line/col pairs are single points, * and there is an implicit region between each of them, so a miss just means * that you aren't on the very start of a region. * * @param aNeedle The element you are looking for. * @param aHaystack The array that is being searched. * @param aCompare A function which takes the needle and an element in the * array and returns -1, 0, or 1 depending on whether the needle is less * than, equal to, or greater than the element, respectively. * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the * closest element that is smaller than or greater than the one we are * searching for, respectively, if the exact element cannot be found. * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. */ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { if (aHaystack.length === 0) { return -1; } var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias || exports.GREATEST_LOWER_BOUND); if (index < 0) { return -1; } // We have found either the exact element, or the next-closest element than // the one we are searching for. However, there may be more than one such // element. Make sure we always return the smallest of these. while (index - 1 >= 0) { if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { break; } --index; } return index; };
{ "pile_set_name": "Github" }
//! Properties: //! GTK2.RadioToolButton group //! //! inherit GTK2.ToggleToolButton; protected GTK2.RadioToolButton create( GTK2.RadioToolButton groupmember ); //! Create a GTK2.RadioToolButton. //! Use without a parameter for a new group. //! Use with another GTK2.RadioToolButton to add another //! button to the same group as a previous button. //! //! array get_group( ); //! Get the group this button belongs to. //! //!
{ "pile_set_name": "Github" }
package org.stagemonitor.core.util; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.stagemonitor.core.metrics.metrics2.MetricName.name; import com.codahale.metrics.Gauge; import org.junit.Test; import org.stagemonitor.core.metrics.metrics2.Metric2Registry; public class MBeanUtilsTest { private Metric2Registry metricRegistry = new Metric2Registry(); @Test public void testRegisterMBean() throws Exception { MBeanUtils.registerMBean(MBeanUtils.queryMBean("java.lang:type=ClassLoading"), "LoadedClassCount", name("jvm_class_count").build(), metricRegistry); final Gauge classLoadingGauge = metricRegistry.getGauges().get(name("jvm_class_count").build()); assertNotNull(classLoadingGauge); assertTrue(((Integer) classLoadingGauge.getValue()) > 1); } }
{ "pile_set_name": "Github" }
--- title: "crf++" layout: formula --- {{ content }}
{ "pile_set_name": "Github" }
<?php $this->load->view("partial/header"); ?> <div id="receipt_wrapper"> <div id="receipt_header"> <div id="company_name"><?php echo $this->config->item('company'); ?></div> <div id="company_address"><?php echo nl2br($this->config->item('address')); ?></div> <div id="company_phone"><?php echo $this->config->item('phone'); ?></div> <div id="sale_receipt"><?php echo $receipt_title; ?></div> <div id="sale_time"><?php echo $transaction_time ?></div> </div> <div id="receipt_general_info"> <?php if(isset($customer)) { ?> <div id="customer"><?php echo $this->lang->line('customers_customer').": ".$customer; ?></div> <?php } ?> <div id="sale_id"><?php echo $this->lang->line('sales_id').": ".$sale_id; ?></div> <div id="employee"><?php echo $this->lang->line('employees_employee').": ".$employee; ?></div> </div> <table id="receipt_items"> <tr> <th style="width:50%;"><?php echo $this->lang->line('items_item'); ?></th> <th style="width:17%;"><?php echo $this->lang->line('common_price'); ?></th> <th style="width:16%;text-align:center;"><?php echo $this->lang->line('sales_quantity'); ?></th> <th style="width:16%;text-align:center;"><?php echo $this->lang->line('sales_discount'); ?></th> <th style="width:17%;text-align:right;"><?php echo $this->lang->line('sales_total'); ?></th> </tr> <?php foreach($cart as $item_id=>$item) { ?> <tr> <td><span class='long_name'><?php echo $item['name']; ?></span><span class='short_name'><?php echo character_limiter($item['name'],10); ?></span></td> <td><?php echo to_currency($item['price']); ?></td> <td style='text-align:center;'><?php echo $item['quantity']; ?></td> <td style='text-align:center;'><?php echo $item['discount']; ?></td> <td style='text-align:right;'><?php echo to_currency($item['price']*$item['quantity']-$item['price']*$item['quantity']*$item['discount']/100); ?></td> </tr> <?php } ?> <tr> <td colspan="3" style='text-align:right;border-top:2px solid #000000;'><?php echo $this->lang->line('sales_sub_total'); ?></td> <td colspan="2" style='text-align:right;border-top:2px solid #000000;'><?php echo to_currency($subtotal); ?></td> </tr> <?php foreach($taxes as $name=>$value) { ?> <tr> <td colspan="3" style='text-align:right;'><?php echo $name; ?>:</td> <td colspan="2" style='text-align:right;'><?php echo to_currency($value); ?></td> </tr> <?php }; ?> <tr> <td colspan="3" style='text-align:right;'><?php echo $this->lang->line('sales_total'); ?></td> <td colspan="2" style='text-align:right'><?php echo to_currency($total); ?></td> </tr> <tr> <td colspan="3" style='text-align:right;'><?php echo $this->lang->line('sales_payment'); ?></td> <td colspan="2" style='text-align:right'><?php echo $payment_type; ?></td> </tr> <?php if(isset($amount_change)) { ?> <tr> <td colspan="3" style='text-align:right;'><?php echo $this->lang->line('sales_amount_tendered'); ?></td> <td colspan="2" style='text-align:right'><?php echo to_currency($amount_tendered); ?></td> </tr> <tr> <td colspan="3" style='text-align:right;'><?php echo $this->lang->line('sales_change_due'); ?></td> <td colspan="2" style='text-align:right'><?php echo $amount_change; ?></td> </tr> <?php } ?> </table> <div id="sale_return_policy"> <?php echo nl2br($this->config->item('return_policy')); ?> </div> <div id='barcode'> <?php echo "<img src='index.php?c=barcode&barcode=$sale_id&text=$sale_id&width=250&height=50' />"; ?> </div> </div> <?php $this->load->view("partial/footer"); ?> <?php if ($this->Appconfig->get('print_after_sale')) { ?> <script type="text/javascript"> $(window).load(function() { window.print(); }); </script> <?php } ?>
{ "pile_set_name": "Github" }
/** * PANDA 3D SOFTWARE * Copyright (c) Carnegie Mellon University. All rights reserved. * * All use of this software is subject to the terms of the revised BSD * license. You should have received a copy of this license along * with this source code in a file named "LICENSE." * * @file vector_uchar.h * @author drose * @date 2000-05-10 */ #ifndef VECTOR_UCHAR_H #define VECTOR_UCHAR_H #include "dtoolbase.h" /** * A vector of uchars. This class is defined once here, and exported to * DTOOL.DLL; other packages that want to use a vector of this type * (whether they need to export it or not) should include this header file, * rather than defining the vector again. */ #define EXPCL EXPCL_DTOOL_DTOOLUTIL #define EXPTP EXPTP_DTOOL_DTOOLUTIL #define TYPE unsigned char #define NAME vector_uchar #include "vector_src.h" #endif
{ "pile_set_name": "Github" }
<component name="libraryTable"> <library name="Maven: oracle:ojdbc14:10.2.0.2"> <CLASSES> <root url="jar://$MAVEN_REPOSITORY$/oracle/ojdbc14/10.2.0.2/ojdbc14-10.2.0.2.jar!/" /> </CLASSES> <JAVADOC> <root url="jar://$MAVEN_REPOSITORY$/oracle/ojdbc14/10.2.0.2/ojdbc14-10.2.0.2-javadoc.jar!/" /> </JAVADOC> <SOURCES> <root url="jar://$MAVEN_REPOSITORY$/oracle/ojdbc14/10.2.0.2/ojdbc14-10.2.0.2-sources.jar!/" /> </SOURCES> </library> </component>
{ "pile_set_name": "Github" }
import { Debugout } from './debugout'; describe('Debugout', () => { let debugout; const subjects = { string: 'A string', number: 26.2, boolean: false, date: new Date('2020-06-26T10:33:15Z'), array: [0, 'string', {}], object: { a: 'apple', b: 2, c: {}, d: [] }, function: () => 'it works', regex: new RegExp(/debugout/gi), null: null, undef: undefined }; describe('# determineType', () => { beforeEach(() => { debugout = new Debugout({ realTimeLoggingOn: false }); }); it('should properly type a string', () => { expect(debugout.determineType(subjects.string)).toEqual('string'); }); it('should properly type a number', () => { expect(debugout.determineType(subjects.number)).toEqual('number'); }); it('should properly type a boolean', () => { expect(debugout.determineType(subjects.boolean)).toEqual('boolean'); }); it('should properly type a date', () => { expect(debugout.determineType(subjects.date)).toEqual('Date'); }); it('should properly type an array', () => { expect(debugout.determineType(subjects.array)).toEqual('Array'); }); it('should properly type an object', () => { expect(debugout.determineType(subjects.object)).toEqual('Object'); }); it('should properly type a function', () => { expect(debugout.determineType(subjects.function)).toEqual('function'); }); it('should properly type a regex', () => { expect(debugout.determineType(subjects.regex)).toEqual('RegExp'); }); it('should properly type null', () => { expect(debugout.determineType(subjects.null)).toEqual('null'); }); it('should properly type undefined', () => { expect(debugout.determineType(subjects.undef)).toEqual('undefined'); }); }); describe('# indentsForDepth', () => { beforeEach(() => { debugout = new Debugout({ realTimeLoggingOn: false }); }); it('should work', () => { expect(debugout.indentsForDepth(1)).toEqual(' '); expect(debugout.indentsForDepth(2)).toEqual(' '); expect(debugout.indentsForDepth(3)).toEqual(' '); }); }); describe('# stringify', () => { beforeEach(() => { debugout = new Debugout({ realTimeLoggingOn: false }); }); it('should properly stringify a string', () => { expect(debugout.stringify(subjects.string)).toEqual('"A string"'); }); it('should properly stringify a number', () => { expect(debugout.stringify(subjects.number)).toEqual('26.2'); }); it('should properly stringify a boolean', () => { expect(debugout.stringify(subjects.boolean)).toEqual('false'); }); it('should properly stringify a date', () => { const result = debugout.stringify(subjects.date); expect(result.substring(0, 16)).toEqual('"Fri Jun 26 2020'); }); it('should properly stringify a regex', () => { expect(debugout.stringify(subjects.regex)).toEqual('/debugout/gi'); }); it('should properly stringify null', () => { expect(debugout.stringify(subjects.null)).toEqual('null'); }); it('should properly stringify undefined', () => { expect(debugout.stringify(subjects.undef)).toEqual('undefined'); }); it('should detect itself', () => { expect(debugout.stringify(debugout)).toEqual('... (Debugout)'); }); describe('Stringifying arrays', () => { it('should properly stringify an array', () => { const expected = '[0, "string", {}]'; expect(debugout.stringify(subjects.array)).toEqual(expected); }); it('can handle arrays nested in arrays', () => { const subj = [subjects.array]; const nested = '[0, "string", {}]'; const expected = `[\n ${nested}\n]`; expect(debugout.stringify(subj)).toEqual(expected); }); it('can handle objects nested in arrays', () => { const subj = [subjects.object]; const nested = '{\n a: "apple",\n b: 2,\n c: {},\n d: []\n }'; const expected = `[\n ${nested}\n]`; expect(debugout.stringify(subj)).toEqual(expected); }); it('properly stringifies an array of objects', () => { const obj = { apple: 'red', banana: 'yellow' }; const expectedObj = ' {\n apple: "red",\n banana: "yellow"\n }'; expect(debugout.stringify([obj, obj])).toEqual('[\n' + expectedObj + ', \n' + expectedObj + '\n]'); }); }); describe('Stringifying objects', () => { it('should properly stringify an object', () => { const expected = '{\n a: "apple",\n b: 2,\n c: {},\n d: []\n}'; expect(debugout.stringify(subjects.object)).toEqual(expected); }); it('can handle objects nested in objects', () => { const subj = { nested: subjects.object }; const nested = '{\n a: "apple",\n b: 2,\n c: {},\n d: []\n }'; const expected = `{\n nested: ${nested}\n}`; expect(debugout.stringify(subj)).toEqual(expected); }); it('can handle arrays nested in objects', () => { const subj = { nested: subjects.array }; const nested = '[0, "string", {}]'; const expected = `{\n nested: ${nested}\n}`; expect(debugout.stringify(subj)).toEqual(expected); }); }); describe('Stringifying functions', () => { it('should properly stringify a 1-line function', () => { expect(debugout.stringify(subjects.function)).toEqual('function () { return \'it works\'; }'); }); it('should properly stringify a multi-line function', () => { /* tslist:disable */ function objectSize(obj) { var size = 0; for (var key in obj) { if (obj.hasOwnProperty(key)) size++; } return size; } /* tslint:enable */ const expected = 'function objectSize(obj) {\n' + ' var size = 0;\n' + ' for (var key in obj) {\n' + ' if (obj.hasOwnProperty(key))\n' + ' size++;\n' + ' }\n' + ' return size;\n' + '}'; expect(debugout.stringify(objectSize)).toEqual(expected); }); }); }); describe('# log', () => { it('caches logs in memory', () => { debugout = new Debugout({ includeSessionMetadata: false, realTimeLoggingOn: false }); debugout.log('a test'); const result = debugout.getLog(); expect(result).toEqual('"a test"\n'); }); it('can handle multiple args', () => { debugout = new Debugout({ includeSessionMetadata: false, realTimeLoggingOn: false }); debugout.log('a string', subjects.string); debugout.log('2 numbers', 26.2, 98.6); const results = debugout.getLog().split('\n'); expect(results[0]).toEqual('"a string" "A string"'); expect(results[1]).toEqual('"2 numbers" 26.2 98.6'); }); }); describe('# getLog', () => { it('gets the log', () => { debugout = new Debugout({ includeSessionMetadata: false, realTimeLoggingOn: false }); debugout.log('a string', subjects.string); const result = debugout.getLog(); expect(result.length).toBeGreaterThan(0); }); }); describe('# clear', () => { it('clears the log', () => { debugout = new Debugout({ includeSessionMetadata: false, realTimeLoggingOn: false }); debugout.log('a string', subjects.string); debugout.clear(); const result = debugout.getLog(); expect(result.length).toEqual(0); }); }); describe('# tail', () => { it('gets the tail', () => { debugout = new Debugout({ includeSessionMetadata: false, realTimeLoggingOn: false }); debugout.log('a string', subjects.string); debugout.log('a number', 26.2); debugout.log('a number', 98.6); expect(debugout.tail(2)).toEqual('"a number" 26.2\n"a number" 98.6\n'); }); }); describe('# search', () => { it('finds all occurences of a search term', () => { debugout = new Debugout({ includeSessionMetadata: false, realTimeLoggingOn: false }); debugout.log('zebra, giraffe, gorilla'); debugout.log('jeep, moab, utah'); debugout.log('apple, orange, banana'); debugout.log('hells revenge, fins n things, moab'); expect(debugout.search('Moab')).toEqual('[1] "jeep, moab, utah"\n[3] "hells revenge, fins n things, moab"'); }); }); describe('# slice', () => { it('gets a slice', () => { debugout.log('zebra, giraffe, gorilla'); debugout.log('jeep, moab, utah'); debugout.log('apple, orange, banana'); debugout.log('hells revenge, fins n things, moab'); expect(debugout.slice(1, 3)).toEqual('"jeep, moab, utah"\n"apple, orange, banana"'); }); }); describe('options', () => { let consoleSpy; beforeEach(() => { debugout = new Debugout({ includeSessionMetadata: false }); consoleSpy = jest.spyOn(console, 'log'); }); it('should respect "realTimeLoggingOn"', () => { debugout.realTimeLoggingOn = true; debugout.log('zebra'); expect(consoleSpy).toHaveBeenCalled(); consoleSpy.mockReset(); debugout.realTimeLoggingOn = false; debugout.log('zebra'); expect(consoleSpy).not.toHaveBeenCalled(); consoleSpy.mockReset(); }); it('should respect "useTimestamps"', () => { debugout = new Debugout({ useTimestamps: true, includeSessionMetadata: false }); debugout.log('zebra'); expect(debugout.getLog().length).toBeGreaterThan(15); debugout = new Debugout({ useTimestamps: false, includeSessionMetadata: false }); debugout.log('zebra'); expect(debugout.getLog()).toEqual('"zebra"\n'); }); it('should respect "includeSessionMetadata"', () => { debugout = new Debugout({ includeSessionMetadata: true, realTimeLoggingOn: false }); debugout.log('zebra'); expect(debugout.getLog().match(/^---- Session/)).toBeTruthy(); }); it('should respect "recordLogs"', () => { debugout.recordLogs = false; debugout.log('zebra'); expect(debugout.getLog().length).toEqual(0); }); it('should respect "maxLines"', () => { debugout.maxLines = 1; debugout.log('a string', subjects.string); debugout.log('a number', 26.2); debugout.log('a number', 98.6); expect(debugout.getLog()).toEqual('"a number" 98.6\n'); }); it('should respect "maxDepth"', () => { debugout.maxDepth = 1; debugout.log({ nested: { nested: { nested: { nested: 'hi' }}}}); const expected = '{\n nested: ... (max-depth reached)\n}\n'; expect(debugout.getLog()).toEqual(expected); }); it('should respect "indent"', () => { debugout.indent = '--'; debugout.log({ nested: { message: 'hi' }}); const expected = '{\n--nested: {\n----message: "hi"\n--}\n}\n'; expect(debugout.getLog()).toEqual(expected); }); it('should respect "quoteStrings"', () => { debugout.quoteStrings = false; debugout.log('zebra'); expect(debugout.getLog()).toEqual('zebra\n'); }); }); });
{ "pile_set_name": "Github" }
/* * Copyright 2017 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ package org.webrtc; import android.graphics.Matrix; import android.opengl.GLES11Ext; import android.opengl.GLES20; import androidx.annotation.Nullable; import java.nio.ByteBuffer; /** * Java version of webrtc::VideoFrame and webrtc::VideoFrameBuffer. A difference from the C++ * version is that no explicit tag is used, and clients are expected to use 'instanceof' to find the * right subclass of the buffer. This allows clients to create custom VideoFrame.Buffer in * arbitrary format in their custom VideoSources, and then cast it back to the correct subclass in * their custom VideoSinks. All implementations must also implement the toI420() function, * converting from the underlying representation if necessary. I420 is the most widely accepted * format and serves as a fallback for video sinks that can only handle I420, e.g. the internal * WebRTC software encoders. */ public class VideoFrame implements RefCounted { /** * Implements image storage medium. Might be for example an OpenGL texture or a memory region * containing I420-data. * * <p>Reference counting is needed since a video buffer can be shared between multiple VideoSinks, * and the buffer needs to be returned to the VideoSource as soon as all references are gone. */ public interface Buffer extends RefCounted { /** * Resolution of the buffer in pixels. */ @CalledByNative("Buffer") int getWidth(); @CalledByNative("Buffer") int getHeight(); /** * Returns a memory-backed frame in I420 format. If the pixel data is in another format, a * conversion will take place. All implementations must provide a fallback to I420 for * compatibility with e.g. the internal WebRTC software encoders. */ @CalledByNative("Buffer") I420Buffer toI420(); @Override @CalledByNative("Buffer") void retain(); @Override @CalledByNative("Buffer") void release(); /** * Crops a region defined by |cropx|, |cropY|, |cropWidth| and |cropHeight|. Scales it to size * |scaleWidth| x |scaleHeight|. */ @CalledByNative("Buffer") Buffer cropAndScale( int cropX, int cropY, int cropWidth, int cropHeight, int scaleWidth, int scaleHeight); } /** * Interface for I420 buffers. */ public interface I420Buffer extends Buffer { /** * Returns a direct ByteBuffer containing Y-plane data. The buffer capacity is at least * getStrideY() * getHeight() bytes. The position of the returned buffer is ignored and must * be 0. Callers may mutate the ByteBuffer (eg. through relative-read operations), so * implementations must return a new ByteBuffer or slice for each call. */ @CalledByNative("I420Buffer") ByteBuffer getDataY(); /** * Returns a direct ByteBuffer containing U-plane data. The buffer capacity is at least * getStrideU() * ((getHeight() + 1) / 2) bytes. The position of the returned buffer is ignored * and must be 0. Callers may mutate the ByteBuffer (eg. through relative-read operations), so * implementations must return a new ByteBuffer or slice for each call. */ @CalledByNative("I420Buffer") ByteBuffer getDataU(); /** * Returns a direct ByteBuffer containing V-plane data. The buffer capacity is at least * getStrideV() * ((getHeight() + 1) / 2) bytes. The position of the returned buffer is ignored * and must be 0. Callers may mutate the ByteBuffer (eg. through relative-read operations), so * implementations must return a new ByteBuffer or slice for each call. */ @CalledByNative("I420Buffer") ByteBuffer getDataV(); @CalledByNative("I420Buffer") int getStrideY(); @CalledByNative("I420Buffer") int getStrideU(); @CalledByNative("I420Buffer") int getStrideV(); } /** * Interface for buffers that are stored as a single texture, either in OES or RGB format. */ public interface TextureBuffer extends Buffer { enum Type { OES(GLES11Ext.GL_TEXTURE_EXTERNAL_OES), RGB(GLES20.GL_TEXTURE_2D); private final int glTarget; private Type(final int glTarget) { this.glTarget = glTarget; } public int getGlTarget() { return glTarget; } } Type getType(); int getTextureId(); /** * Retrieve the transform matrix associated with the frame. This transform matrix maps 2D * homogeneous coordinates of the form (s, t, 1) with s and t in the inclusive range [0, 1] to * the coordinate that should be used to sample that location from the buffer. */ Matrix getTransformMatrix(); } private final Buffer buffer; private final int rotation; private final long timestampNs; /** * Constructs a new VideoFrame backed by the given {@code buffer}. * * @note Ownership of the buffer object is tranferred to the new VideoFrame. */ @CalledByNative public VideoFrame(Buffer buffer, int rotation, long timestampNs) { if (buffer == null) { throw new IllegalArgumentException("buffer not allowed to be null"); } if (rotation % 90 != 0) { throw new IllegalArgumentException("rotation must be a multiple of 90"); } this.buffer = buffer; this.rotation = rotation; this.timestampNs = timestampNs; } @CalledByNative public Buffer getBuffer() { return buffer; } /** * Rotation of the frame in degrees. */ @CalledByNative public int getRotation() { return rotation; } /** * Timestamp of the frame in nano seconds. */ @CalledByNative public long getTimestampNs() { return timestampNs; } public int getRotatedWidth() { if (rotation % 180 == 0) { return buffer.getWidth(); } return buffer.getHeight(); } public int getRotatedHeight() { if (rotation % 180 == 0) { return buffer.getHeight(); } return buffer.getWidth(); } @Override public void retain() { buffer.retain(); } @Override @CalledByNative public void release() { buffer.release(); } }
{ "pile_set_name": "Github" }
/************************************************************* * * MathJax/jax/output/SVG/fonts/Neo-Euler/Arrows/Regular/Main.js * * Copyright (c) 2013-2017 The MathJax Consortium * * 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. */ MathJax.OutputJax['SVG'].FONTDATA.FONTS['NeoEulerMathJax_Arrows'] = { directory: 'Arrows/Regular', family: 'NeoEulerMathJax_Arrows', id: 'NEOEULERARROWS', 0x20: [0,0,333,0,0,''], 0xA0: [0,0,333,0,0,''], 0x21A4: [500,0,1000,56,944,'944 50v400h-40v-180h-778c38 47 90 126 115 230h-40c-31 -130 -113 -220 -145 -250c30 -28 114 -119 145 -250h40c-25 105 -78 184 -115 230h778v-180h40'], 0x27FB: [500,0,1690,56,1634,'1634 50v400h-40v-180h-1468c38 47 90 126 115 230h-40c-31 -130 -113 -220 -145 -250c30 -28 114 -119 145 -250h40c-25 105 -78 184 -115 230h1468v-180h40'], 0x27FD: [598,98,1700,76,1643,'1603 328v-156h-1352c-31 29 -64 55 -99 78c35 23 68 49 99 78h1352zM76 250c145 -72 257 -196 312 -348h40c-31 85 -78 163 -138 230h1313v-182h40v600h-40v-182h-1313c60 67 107 145 138 230h-40c-55 -152 -167 -276 -312 -348'], 0x27FE: [598,98,1700,75,1643,'1643 250c-146 -72 -258 -196 -313 -348h-40c31 85 78 163 138 230h-1313v-182h-40v600h40v-182h1313c-60 67 -107 145 -138 230h40c55 -152 167 -276 313 -348zM115 328v-156h1352c31 29 64 55 99 78c-35 23 -68 49 -99 78h-1352'] }; MathJax.Ajax.loadComplete(MathJax.OutputJax.SVG.fontDir+"/Arrows/Regular/Main.js");
{ "pile_set_name": "Github" }
/* * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package sun.text; /** * SupplementaryCharacterData is an SMI-private class which was written for * RuleBasedBreakIterator and BreakDictionary. */ public final class SupplementaryCharacterData implements Cloneable { /** * An array for supplementary characters and values. * Lower one byte is used to keep a byte-value. * Upper three bytes are used to keep the first supplementary character * which has the value. The value is also valid for the following * supplementary characters until the next supplementary character in * the array <code>dataTable</code>. * For example, if the value of <code>dataTable[2]</code> is * <code>0x01000123</code> and the value of <code>dataTable[3]</code> is * <code>0x01000567</code>, supplementary characters from * <code>0x10001</code> to <code>0x10004</code> has the value * <code>0x23</code>. And, <code>getValue(0x10003)</code> returns the value. */ private int[] dataTable; /** * Creates a new SupplementaryCharacterData object with the given table. */ public SupplementaryCharacterData(int[] table) { dataTable = table; } /** * Returns a corresponding value for the given supplementary code-point. */ public int getValue(int index) { // Index should be a valid supplementary character. assert index >= Character.MIN_SUPPLEMENTARY_CODE_POINT && index <= Character.MAX_CODE_POINT : "Invalid code point:" + Integer.toHexString(index); int i = 0; int j = dataTable.length - 1; int k; for (;;) { k = (i + j) / 2; int start = dataTable[k] >> 8; int end = dataTable[k+1] >> 8; if (index < start) { j = k; } else if (index > (end-1)) { i = k; } else { return dataTable[k] & 0xFF; } } } /** * Returns the data array. */ public int[] getArray() { return dataTable; } }
{ "pile_set_name": "Github" }
{ "eth0": { "address_family": "inet", "down": [], "method": "dhcp", "post-up": [], "pre-up": [], "up": [] }, "lo": { "address_family": "inet", "down": [], "method": "loopback", "post-up": [], "pre-up": [], "up": [] } }
{ "pile_set_name": "Github" }
/* * JBoss, Home of Professional Open Source. * Copyright 2019, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This 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 software 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 software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package io.narayana.lra.client.internal.proxy.nonjaxrs; import io.narayana.lra.client.internal.proxy.nonjaxrs.jandex.DotNames; import io.narayana.lra.client.internal.proxy.nonjaxrs.jandex.JandexAnnotationResolver; import io.narayana.lra.logging.LRALogger; import org.jboss.jandex.AnnotationInstance; import org.jboss.jandex.AnnotationTarget; import org.jboss.jandex.ClassInfo; import org.jboss.jandex.DotName; import org.jboss.jandex.Index; import javax.enterprise.context.ApplicationScoped; import javax.enterprise.event.Observes; import javax.enterprise.inject.Any; import javax.enterprise.inject.spi.AfterBeanDiscovery; import javax.enterprise.inject.spi.Bean; import javax.enterprise.inject.spi.BeanManager; import javax.enterprise.inject.spi.Extension; import javax.enterprise.util.AnnotationLiteral; import java.io.IOException; import java.lang.reflect.Modifier; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; /** * This CDI extension collects all LRA participants that contain * one or more non-JAX-RS participant methods. The collected classes are stored * in {@link LRAParticipantRegistry}. */ public class LRACDIExtension implements Extension { private ClassPathIndexer classPathIndexer = new ClassPathIndexer(); private Index index; private final Map<String, LRAParticipant> participants = new HashMap<>(); public void observe(@Observes AfterBeanDiscovery event, BeanManager beanManager) throws IOException, ClassNotFoundException { index = classPathIndexer.createIndex(); List<AnnotationInstance> annotations = index.getAnnotations(DotName.createSimple("javax.ws.rs.Path")); for (AnnotationInstance annotation : annotations) { ClassInfo classInfo; AnnotationTarget target = annotation.target(); if (target.kind().equals(AnnotationTarget.Kind.CLASS)) { classInfo = target.asClass(); } else if (target.kind().equals(AnnotationTarget.Kind.METHOD)) { classInfo = target.asMethod().declaringClass(); } else { continue; } LRAParticipant participant = getAsParticipant(classInfo); if (participant != null) { participants.put(participant.getJavaClass().getName(), participant); Set<Bean<?>> participantBeans = beanManager.getBeans(participant.getJavaClass(), new AnnotationLiteral<Any>() {}); if (participantBeans.isEmpty()) { // resource is not registered as managed bean so register a custom managed instance try { participant.setInstance(participant.getJavaClass().newInstance()); } catch (InstantiationException | IllegalAccessException e) { LRALogger.i18NLogger.error_cannotProcessParticipant(e); } } } } event.addBean() .read(beanManager.createAnnotatedType(LRAParticipantRegistry.class)) .beanClass(LRAParticipantRegistry.class) .scope(ApplicationScoped.class) .createWith(context -> new LRAParticipantRegistry(participants)); } /** * Collects all non-JAX-RS participant methods in the defined Java class * * @param classInfo a Jandex class info of the class to be scanned * @return Collected methods wrapped in {@link LRAParticipant} class or null if no non-JAX-RS methods have been found */ private LRAParticipant getAsParticipant(ClassInfo classInfo) throws ClassNotFoundException { Class<?> javaClass = getClass().getClassLoader().loadClass(classInfo.name().toString()); if (javaClass.isInterface() || Modifier.isAbstract(javaClass.getModifiers()) || !isLRAParticipant(classInfo)) { return null; } LRAParticipant participant = new LRAParticipant(javaClass); return participant.hasNonJaxRsMethods() ? participant : null; } /** * Returns whether the classinfo represents an LRA participant -- * Class contains LRA method and either one or both of Compensate and/or AfterLRA methods. * * @param classInfo Jandex class object to scan for annotations * * @return true if the class is a valid LRA participant, false otherwise * @throws IllegalStateException if there is LRA annotation but no Compensate or AfterLRA is found */ private boolean isLRAParticipant(ClassInfo classInfo) { Map<DotName, List<AnnotationInstance>> annotations = JandexAnnotationResolver.getAllAnnotationsFromClassInfoHierarchy(classInfo.name(), index); if (!annotations.containsKey(DotNames.LRA)) { return false; } else if (!annotations.containsKey(DotNames.COMPENSATE) && !annotations.containsKey(DotNames.AFTER_LRA)) { throw new IllegalStateException(String.format("%s: %s", classInfo.name(), "The class contains an LRA method and no Compensate or AfterLRA method was found.")); } else { return true; } } }
{ "pile_set_name": "Github" }
import * as React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92c0-1.61-1.31-2.92-2.92-2.92zM18 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM6 13c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm12 7.02c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z" /> , 'ShareOutlined');
{ "pile_set_name": "Github" }
// Copyright 2014 The Prometheus Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package prometheus_test import ( "net/http" "github.com/prometheus/client_golang/prometheus" ) var ( // apiRequestDuration tracks the duration separate for each HTTP status // class (1xx, 2xx, ...). This creates a fair amount of time series on // the Prometheus server. Usually, you would track the duration of // serving HTTP request without partitioning by outcome. Do something // like this only if needed. Also note how only status classes are // tracked, not every single status code. The latter would create an // even larger amount of time series. Request counters partitioned by // status code are usually OK as each counter only creates one time // series. Histograms are way more expensive, so partition with care and // only where you really need separate latency tracking. Partitioning by // status class is only an example. In concrete cases, other partitions // might make more sense. apiRequestDuration = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Name: "api_request_duration_seconds", Help: "Histogram for the request duration of the public API, partitioned by status class.", Buckets: prometheus.ExponentialBuckets(0.1, 1.5, 5), }, []string{"status_class"}, ) ) func handler(w http.ResponseWriter, r *http.Request) { status := http.StatusOK // The ObserverFunc gets called by the deferred ObserveDuration and // decides wich Histogram's Observe method is called. timer := prometheus.NewTimer(prometheus.ObserverFunc(func(v float64) { switch { case status >= 500: // Server error. apiRequestDuration.WithLabelValues("5xx").Observe(v) case status >= 400: // Client error. apiRequestDuration.WithLabelValues("4xx").Observe(v) case status >= 300: // Redirection. apiRequestDuration.WithLabelValues("3xx").Observe(v) case status >= 200: // Success. apiRequestDuration.WithLabelValues("2xx").Observe(v) default: // Informational. apiRequestDuration.WithLabelValues("1xx").Observe(v) } })) defer timer.ObserveDuration() // Handle the request. Set status accordingly. // ... } func ExampleTimer_complex() { http.HandleFunc("/api", handler) }
{ "pile_set_name": "Github" }
// /*************************************************************************** // Aaru Data Preservation Suite // ---------------------------------------------------------------------------- // // Filename : Delegates.cs // Author(s) : Natalia Portillo <claunia@claunia.com> // // Component : Core algorithms. // // --[ Description ] ---------------------------------------------------------- // // Delegates to communicate with user interface. // // --[ License ] -------------------------------------------------------------- // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // // ---------------------------------------------------------------------------- // Copyright © 2011-2020 Natalia Portillo // ****************************************************************************/ namespace Aaru.Core { /// <summary>Initializes a progress indicator (e.g. makes a progress bar visible)</summary> public delegate void InitProgressHandler(); /// <summary>Updates a progress indicator with text</summary> public delegate void UpdateProgressHandler(string text, long current, long maximum); /// <summary>Pulses a progress indicator with indeterminate boundaries</summary> public delegate void PulseProgressHandler(string text); /// <summary>Uninitializes a progress indicator (e.g. adds a newline to the console)</summary> public delegate void EndProgressHandler(); /// <summary>Initializes a secondary progress indicator (e.g. makes a progress bar visible)</summary> public delegate void InitProgressHandler2(); /// <summary>Updates a secondary progress indicator with text</summary> public delegate void UpdateProgressHandler2(string text, long current, long maximum); /// <summary>Pulses a secondary progress indicator with indeterminate boundaries</summary> public delegate void PulseProgressHandler2(string text); /// <summary>Uninitializes a secondary progress indicator (e.g. adds a newline to the console)</summary> public delegate void EndProgressHandler2(); /// <summary>Initializes two progress indicators (e.g. makes a progress bar visible)</summary> public delegate void InitTwoProgressHandler(); /// <summary>Updates two progress indicators with text</summary> public delegate void UpdateTwoProgressHandler(string text, long current, long maximum, string text2, long current2, long maximum2); /// <summary>Pulses a progress indicator with indeterminate boundaries</summary> public delegate void PulseTwoProgressHandler(string text, string text2); /// <summary>Uninitializes a progress indicator (e.g. adds a newline to the console)</summary> public delegate void EndTwoProgressHandler(); /// <summary>Updates a status indicator</summary> public delegate void UpdateStatusHandler(string text); /// <summary>Shows an error message</summary> public delegate void ErrorMessageHandler(string text); public delegate void InitBlockMapHandler(ulong blocks, ulong blockSize, ulong blocksToRead, ushort currentProfile); /// <summary>Updates lists of time taken on scanning from the specified sector</summary> /// <param name="duration">Time in milliseconds</param> public delegate void ScanTimeHandler(ulong sector, double duration); /// <summary>Specified a number of blocks could not be read on scan</summary> public delegate void ScanUnreadableHandler(ulong sector); public delegate void ScanSpeedHandler(ulong sector, double currentSpeed); }
{ "pile_set_name": "Github" }
Type.registerNamespace("Sys.Extended.UI.HtmlEditor.ToolbarButtons"); Sys.Extended.UI.HtmlEditor.ToolbarButtons.StrikeThrough = function(element) { Sys.Extended.UI.HtmlEditor.ToolbarButtons.StrikeThrough.initializeBase(this, [element]); } Sys.Extended.UI.HtmlEditor.ToolbarButtons.StrikeThrough.prototype = { callMethod: function() { if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.StrikeThrough.callBaseMethod(this, "callMethod")) return false; this._designPanel._execCommand("strikeThrough", false, null); }, checkState: function() { if(!Sys.Extended.UI.HtmlEditor.ToolbarButtons.StrikeThrough.callBaseMethod(this, "checkState")) return false; return this._designPanel._queryCommandState("strikeThrough"); } } Sys.Extended.UI.HtmlEditor.ToolbarButtons.StrikeThrough.registerClass("Sys.Extended.UI.HtmlEditor.ToolbarButtons.StrikeThrough", Sys.Extended.UI.HtmlEditor.ToolbarButtons.EditorToggleButton);
{ "pile_set_name": "Github" }
name "Demo" button "Open/Close", pin: 4 sensor "Door", pin: 17, high: "Open", low: "Closed" switch "Light", pin: 18 sensor "Ruby Version" do RUBY_VERSION end
{ "pile_set_name": "Github" }
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc < %s -mattr=+avx512f | FileCheck %s ; RUN: llc < %s -mattr=+avx512f,+avx512vl,+avx512bw,+avx512dq | FileCheck %s target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" define void @test() local_unnamed_addr { ; CHECK-LABEL: test: ; CHECK: # %bb.0: ; CHECK-NEXT: vmovdqa {{.*#+}} xmm0 = [2,3] ; CHECK-NEXT: vpextrq $1, %xmm0, %rax ; CHECK-NEXT: vmovq %xmm0, %rcx ; CHECK-NEXT: negq %rdx ; CHECK-NEXT: fld1 ; CHECK-NEXT: fldz ; CHECK-NEXT: fld %st(0) ; CHECK-NEXT: fcmove %st(2), %st(0) ; CHECK-NEXT: cmpq %rax, %rcx ; CHECK-NEXT: fld %st(1) ; CHECK-NEXT: fcmove %st(3), %st(0) ; CHECK-NEXT: cmpq %rax, %rax ; CHECK-NEXT: fld %st(2) ; CHECK-NEXT: fcmove %st(4), %st(0) ; CHECK-NEXT: movl $1, %eax ; CHECK-NEXT: cmpq %rax, %rax ; CHECK-NEXT: fld %st(3) ; CHECK-NEXT: fcmove %st(5), %st(0) ; CHECK-NEXT: fstp %st(5) ; CHECK-NEXT: fxch %st(2) ; CHECK-NEXT: fadd %st(3) ; CHECK-NEXT: fxch %st(4) ; CHECK-NEXT: fadd %st(3) ; CHECK-NEXT: fxch %st(2) ; CHECK-NEXT: fadd %st(3) ; CHECK-NEXT: fxch %st(1) ; CHECK-NEXT: faddp %st(3) ; CHECK-NEXT: fxch %st(3) ; CHECK-NEXT: fstpt (%rax) ; CHECK-NEXT: fxch %st(1) ; CHECK-NEXT: fstpt (%rax) ; CHECK-NEXT: fxch %st(1) ; CHECK-NEXT: fstpt (%rax) ; CHECK-NEXT: fstpt (%rax) %1 = icmp eq <4 x i64> <i64 0, i64 1, i64 2, i64 3>, undef %2 = select <4 x i1> %1, <4 x x86_fp80> <x86_fp80 0xK3FFF8000000000000000, x86_fp80 0xK3FFF8000000000000000, x86_fp80 0xK3FFF8000000000000000, x86_fp80 0xK3FFF8000000000000000>, <4 x x86_fp80> zeroinitializer %3 = fadd <4 x x86_fp80> undef, %2 %4 = shufflevector <4 x x86_fp80> %3, <4 x x86_fp80> undef, <8 x i32> <i32 0, i32 4, i32 1, i32 5, i32 2, i32 6, i32 3, i32 7> store <8 x x86_fp80> %4, <8 x x86_fp80>* undef, align 16 unreachable }
{ "pile_set_name": "Github" }
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); tslib_1.__exportStar(require("./node"), exports); tslib_1.__exportStar(require("./type"), exports); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxpREFBdUI7QUFDdkIsaURBQXVCIn0=
{ "pile_set_name": "Github" }
/* * Copyright 2016-present Open Networking Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * Server-side modeling of UI entities. * <p> * The classes in this package are thin wrappers around core model objects * (where possible). Together, they provide a model of what the user can * "see" in the UI, and how the user can interact with that (visual) model. */ package org.onosproject.ui.model;
{ "pile_set_name": "Github" }
<?php /** * @file * Contains rules integration for the path module needed during evaluation. * * @addtogroup rules * @{ */ /** * Action implementation: Path alias. */ function rules_action_path_alias($source, $alias, $langcode = LANGUAGE_NONE) { if (!$alias) { path_delete(array('source' => $source, 'language' => $langcode)); } elseif (!$source) { path_delete(array('alias' => $alias, 'language' => $langcode)); } // Only set the alias if the alias is not taken yet. elseif (!path_load(array('alias' => $alias, 'language' => $langcode))) { // Update the existing path or create a new one. if ($path = path_load(array('source' => $source, 'language' => $langcode))) { $path['alias'] = $alias; } else { $path = array('source' => $source, 'alias' => $alias, 'language' => $langcode); } path_save($path); } else { rules_log('The configured alias %alias already exists. Aborting.', array('%alias' => $alias)); } } /** * Action Implementation: Set the URL alias for a node. */ function rules_action_node_path_alias($node, $alias) { $langcode = isset($node->language) ? $node->language : LANGUAGE_NONE; // Only set the alias if the alias is not taken yet. if (($path = path_load(array('alias' => $alias, 'language' => $langcode))) && (empty($node->path['pid']) || $node->path['pid'] != $path['pid'])) { rules_log('The configured alias %alias already exists. Aborting.', array('%alias' => $alias)); return FALSE; } $node->path['alias'] = $alias; } /** * Action Implementation: Set the URL alias for a node. */ function rules_action_taxonomy_term_path_alias($term, $alias) { // Only set the alias if the alias is not taken yet. if (($path = path_load(array('alias' => $alias, 'language' => LANGUAGE_NONE))) && (empty($term->path['pid']) || $term->path['pid'] != $path['pid'])) { rules_log('The configured alias %alias already exists. Aborting.', array('%alias' => $alias)); return FALSE; } $term->path['alias'] = $alias; } /** * Condition implementation: Check if the path has an alias. */ function rules_condition_path_has_alias($source, $langcode = LANGUAGE_NONE) { return (bool) drupal_lookup_path('alias', $source, $langcode); } /** * Condition implementation: Check if the URL alias exists. */ function rules_condition_path_alias_exists($alias, $langcode = LANGUAGE_NONE) { return (bool) drupal_lookup_path('source', $alias, $langcode); } /** * Cleans the given path by replacing non ASCII characters with the replacment character. * * Path cleaning may be adapted by overriding the configuration variables * @code rules_clean_path @endcode, * @code rules_path_replacement_char @endcode and * @code rules_path_transliteration @endcode * in the site's settings.php file. */ function rules_path_default_cleaning_method($path) { $replace = variable_get('rules_path_replacement_char', '-'); if ($replace) { // If the transliteration module is enabled, transliterate the alias first. if (module_exists('transliteration') && variable_get('rules_path_transliteration', TRUE)) { $path = transliteration_get($path); } $array = variable_get('rules_clean_path', array('/[^a-zA-Z0-9\-_]+/', $replace)); $array[2] = $path; // Replace it and remove trailing and leading replacement characters. $output = trim(call_user_func_array('preg_replace', $array), $replace); if (variable_get('rules_path_lower_case', TRUE)) { $output = drupal_strtolower($output); } return $output; } else { return $path; } } /** * Cleans the given string so it can be used as part of a URL path. */ function rules_clean_path($path) { $function = variable_get('rules_path_cleaning_callback', 'rules_path_default_cleaning_method'); if (!function_exists($function)) { rules_log('An invalid URL path cleaning callback has been configured. Falling back to the default cleaning method.', array(), RulesLog::WARN); $function = 'rules_path_default_cleaning_method'; } return $function($path); } /** * CTools path cleaning callback. * * @see rules_admin_settings() */ function rules_path_clean_ctools($path) { // Make use of the CTools cleanstring implementation. ctools_include('cleanstring'); $settings = array( 'separator' => variable_get('rules_path_replacement_char', '-'), 'transliterate' => module_exists('transliteration') && variable_get('rules_path_transliteration', TRUE), 'lower case' => variable_get('rules_path_lower_case', TRUE), ); return ctools_cleanstring($path, $settings); } /** * Pathauto path cleaning callback. * * @see rules_admin_settings() */ function rules_path_clean_pathauto($path) { module_load_include('inc', 'pathauto'); return pathauto_cleanstring($path); } /** * @} */
{ "pile_set_name": "Github" }
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; namespace Pulumi.Aws.WafV2.Inputs { public sealed class RuleGroupRuleStatementOrStatementStatementOrStatementStatementXssMatchStatementFieldToMatchMethodArgs : Pulumi.ResourceArgs { public RuleGroupRuleStatementOrStatementStatementOrStatementStatementXssMatchStatementFieldToMatchMethodArgs() { } } }
{ "pile_set_name": "Github" }
'use strict' var process = require('./process') try { module.exports = setImmediate } catch (ex) { module.exports = process.nextTick }
{ "pile_set_name": "Github" }
/* SPDX-License-Identifier: GPL-2.0 */ #ifdef DEFINE_DWARF_REGSTR_TABLE /* This is included in perf/util/dwarf-regs.c */ static const char * const aarch64_regstr_tbl[] = { "%x0", "%x1", "%x2", "%x3", "%x4", "%x5", "%x6", "%x7", "%x8", "%x9", "%x10", "%x11", "%x12", "%x13", "%x14", "%x15", "%x16", "%x17", "%x18", "%x19", "%x20", "%x21", "%x22", "%x23", "%x24", "%x25", "%x26", "%x27", "%x28", "%x29", "%lr", "%sp", }; #endif
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <Workspace version = "1.0"> <FileRef location = "self:"> </FileRef> </Workspace>
{ "pile_set_name": "Github" }
/* * Copyright (C) 2016 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.caliper.model; /** Enumeration of the available types of instruments for running benchmarks. */ public enum InstrumentType { /** Runtime microbenchmark instrument. */ RUNTIME_MICRO, /** Runtime macrobenchmark instrument. */ RUNTIME_MACRO, /** Runtime picobenchmark instrument. */ RUNTIME_PICO, /** Allocation microbenchmark instrument. */ ALLOCATION_MICRO, /** Allocation macrobenchmark instrument. */ ALLOCATION_MACRO, /** Arbitrary measurement instrument. */ ARBITRARY_MEASUREMENT, }
{ "pile_set_name": "Github" }
<html dir="ltr"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Цветовые палитры</title> </head> <style> @import "manual.css"; </style> <body> <h3>Цветовые палитры</h3> <p><strong><em>Обратите внимание: эта глава посвящена не управлению цветом, а изменению и управлению цветными <a href="WwFill.html">заливками</a>. Управление цветом описано в <a href="cms.html">отдельной главе</a>.</em></strong> <p>В Scribus есть несколько методов для создания, импортирования и изменения сплошных цветов и цветовых наборов. Более того, в Scribus имеется хорошо развитый инструмент — <a href="colorwheel.html">модуль цветового круга</a>, — который помогает создавать и даже тестировать цветовые сочетания для людей с дальтонизмом.</p> <h3>Почему наборы цветов?</h3> <p>Ответ на вопрос в заголовке тесно связан с ответом на более простой вопрос, а именно: &#171;Что такое цвет?&#187; Правда в том, что на этот вопрос нет простого ответа, поскольку &#171;цвет&#187; может быть описан сотнями способов, например, как комбинация длин волн, как комбинация значений цвета в рамках определённой &#171;цветовой модели&#187;, как категория в структуре, основанной на эстетических правилах, и так далее. В результате с течением времени было разработано много различных так называемых &#171;цветовых моделей&#187;, многие из которых стали частью дисциплины под названием &#171;цветоведение&#187; — науки, которая сама по себе является &#171;метанаукой&#187;, поскольку требует вклада со стороны многих различных дисциплин, включая физику, нейронауку, биологию, математику, технику и даже искусство, ремесло или литературу. На самом деле, понятие &#171;цвета&#187; относится к одним из немногих случаев, когда художники, такие как Иоганн Вольфганг фон Гёте или Альберт Генри Манселл, внесли значительный вклад в научный прогресс.</p> <p>Пользователи графических программ, таких как Scribus, не обязаны изучать все тонкости науки о цвете, хотя кое-какие знания теории не помешают. На начальном уровне, однако, некоторое представление о проблемах, упомянутых выше, сильно помогает при работе с цветами, а карикатура ниже может быть первым шагом к пониманию того, о чём идёт речь:</p> <p><img src="images/colrs-caricature.png" title="Названия цветов &ndash; Любезно предоставлено сайтом http://www.thedoghousediaries.com" alt="Названия цветов &ndash; Любезно предоставлено сайтом http://www.thedoghousediaries.com" hspace="20"></p> <p>Как и в любой хорошей карикатуре, здесь есть доля истины, а именно — в том, что существуют различные уровни дифференциации и категоризации цветов, которые часто бывают крайне субъективны. Представьте себе двух человек, мужчину и женщину, обсуждающих по телефону выбор цвета для проекта — это будет практически невозможной задачей, поскольку и названия (субъективные) цветов, и восприятие цвета у них совершенно разные. Таким образом, заранее определённые наборы цветов на самом деле являются способом <b><i>взаимодействия</i></b> при работе с цветами, при этом исключается и обращение к субъективной цветовой модели, и сложная наука о цвете, а использование осмысленных названий для цветов в рамках данного набора цветов может ещё сильнее облегчить общение на тему цветов.</p> <p>Создание наборов цветов также помогает поставщикам или проектам задавать ограниченный набор цветов, разрешённых для использования, что помогает поддерживать визуальное единообразие публикаций.</p> <p>На практике цвета, доступные в цветовой палитре, или те, которые вы создаёте сами (и, таким образом, добавляете к существующей палитре), являются единственными, которые можно использовать в качестве цветов текста, заливки, линии или градиента.</p> <h4>Цвета в цветовых палитрах Scribus</h4> <p>Scribus поставляется с огромной коллекцией, содержащей более чем 150 полезных цветовых наборов, также называемых &#171;палитрами&#187; или &#171;образчиками&#187; (что может слегка вводить в заблуждение). Эти палитры служат для разных целей, каждая из которых будет описана в <a href="color3.html">отдельном документе</a>. Существуют палитры различных размеров, начиная от &#171;Scribus Basic&#187;, коллекции основных цветов RGB и CMYK, до, например, &#171;X11&#187;, которая включает в себя огромное количество цветов (RGB).</p> <p>Цветовые палитры в Scribus могут содержать четыре различных типа цветов, каждый из которых использует различные визуальные индикаторы в диалоговых окнах цвета Scribus:</p> <table width="80%" align="center" border="0" cellpadding="8" cellspacing="0"> <col width="2*"> <col width="2*"> <col width="auto"> <tbody> <tr valign="top"> <td><img src="images/rgb.png"></td> <td><p><b>Цвета RGB</b>: эти цвета определены в цветовой модели RGB. Каждый цвет описывается тремя основными цветами: красным, зелёным и синим.</p></td> </tr> <tr valign="top"> <td><img src="images/cmyk.png" align="top"></td> <td><p><b>Цвета CMYK</b>: эти цвета описаны в цветовой модели CMYK. Каждый цвет описывается четырьмя цветами чернил, используемых в цветной печати: голубой, пурпурный, жёлтый и ключевой (=чёрный).</p></td> </tr> <tr valign="top"> <td><img src="images/spot.png"></td> <td><p><b>Плашечные цвета</b>: они также называются &#171;именованными цветами&#187;, но, поскольку другие цвета (RGB/CMYK) также могут иметь названия, термин &#171;плашечный цвет&#187; должен быть предпочтительным для однозначности. Хотя плашечный цвет может быть определён в цветовой модели RGB или CMYK, его основная цель — сохранение его <i>названия</i> в файле PDF или PostScript (отсюда и термин — &#171;именованный цвет&#187;). Название ссылается на реальный цвет, а полиграфическая компания может смешивать или покупать специальные чернила, которые будут соответствовать цвету в точности так, как определено ссылкой. Для каждого плашечного цвета требуется отдельная печатная форма, поэтому использовать плашечные цвета необходимо осторожно, ведь их использование делает процесс печати более дорогим. Типичными случаями использования плашечных цветов являются крайне специфичные оттенки корпоративных логотипов. Красная точка рядом со значком цветовой модели (RGB или CMYK) означает, что соответствующий цвет является плашечным.</p></td> </tr> <tr valign="top"> <td><img src="images/register.png"></td> <td><p><b>Цвет совмещения</b>: это особый &#171;цвет&#187;, используемый для меток приводки. Последние используются принтерами для определения успешности выполнения четырехцветной печати. Отображаемый как цвет CMYK, он фактически будет состоять из стольких цветов, сколько существует цветовых разграничений для одной или всех печатных форм. Каждая палитра может иметь только один цвет совмещения, обозначаемый значком мишени.</p></td> </tr> <tr valign="top"> <td><img src="images/alert.png"></td> <td><p>Если вы работаете со всключенным <a href="cms.html">управлением цветом</a>, некоторые или даже все цвета в палитре могут находиться &#171;вне гаммы&#187;, то есть, в зависимости от выбранного профиля ICC, цвет не может быть &#171;переведён&#187; из одной цветовой модели в другую, и может произойти сдвиг цвета. В таком случае вы увидите предупреждающий знак, расположенный рядом с цветом в списке.</p></td> </tr> </tbody> </table> </body> </html>
{ "pile_set_name": "Github" }
/** ****************************************************************************** * @file stm32f7xx_hal_eth.c * @author MCD Application Team * @version V1.0.0 * @date 12-May-2015 * @brief ETH HAL module driver. * This file provides firmware functions to manage the following * functionalities of the Ethernet (ETH) peripheral: * + Initialization and de-initialization functions * + IO operation functions * + Peripheral Control functions * + Peripheral State and Errors functions * @verbatim ============================================================================== ##### How to use this driver ##### ============================================================================== [..] (#)Declare a ETH_HandleTypeDef handle structure, for example: ETH_HandleTypeDef heth; (#)Fill parameters of Init structure in heth handle (#)Call HAL_ETH_Init() API to initialize the Ethernet peripheral (MAC, DMA, ...) (#)Initialize the ETH low level resources through the HAL_ETH_MspInit() API: (##) Enable the Ethernet interface clock using (+++) __HAL_RCC_ETHMAC_CLK_ENABLE(); (+++) __HAL_RCC_ETHMACTX_CLK_ENABLE(); (+++) __HAL_RCC_ETHMACRX_CLK_ENABLE(); (##) Initialize the related GPIO clocks (##) Configure Ethernet pin-out (##) Configure Ethernet NVIC interrupt (IT mode) (#)Initialize Ethernet DMA Descriptors in chain mode and point to allocated buffers: (##) HAL_ETH_DMATxDescListInit(); for Transmission process (##) HAL_ETH_DMARxDescListInit(); for Reception process (#)Enable MAC and DMA transmission and reception: (##) HAL_ETH_Start(); (#)Prepare ETH DMA TX Descriptors and give the hand to ETH DMA to transfer the frame to MAC TX FIFO: (##) HAL_ETH_TransmitFrame(); (#)Poll for a received frame in ETH RX DMA Descriptors and get received frame parameters (##) HAL_ETH_GetReceivedFrame(); (should be called into an infinite loop) (#) Get a received frame when an ETH RX interrupt occurs: (##) HAL_ETH_GetReceivedFrame_IT(); (called in IT mode only) (#) Communicate with external PHY device: (##) Read a specific register from the PHY HAL_ETH_ReadPHYRegister(); (##) Write data to a specific RHY register: HAL_ETH_WritePHYRegister(); (#) Configure the Ethernet MAC after ETH peripheral initialization HAL_ETH_ConfigMAC(); all MAC parameters should be filled. (#) Configure the Ethernet DMA after ETH peripheral initialization HAL_ETH_ConfigDMA(); all DMA parameters should be filled. @endverbatim ****************************************************************************** * @attention * * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2> * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. Neither the name of STMicroelectronics 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 HOLDER 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. * ****************************************************************************** */ /* Includes ------------------------------------------------------------------*/ #include "stm32f7xx_hal.h" /** @addtogroup STM32F7xx_HAL_Driver * @{ */ /** @defgroup ETH ETH * @brief ETH HAL module driver * @{ */ #ifdef HAL_ETH_MODULE_ENABLED /* Private typedef -----------------------------------------------------------*/ /* Private define ------------------------------------------------------------*/ /** @defgroup ETH_Private_Constants ETH Private Constants * @{ */ #define LINKED_STATE_TIMEOUT_VALUE ((uint32_t)2000) /* 2000 ms */ #define AUTONEGO_COMPLETED_TIMEOUT_VALUE ((uint32_t)1000) /* 1000 ms */ /** * @} */ /* Private macro -------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ /* Private function prototypes -----------------------------------------------*/ /** @defgroup ETH_Private_Functions ETH Private Functions * @{ */ static void ETH_MACDMAConfig(ETH_HandleTypeDef *heth, uint32_t err); static void ETH_MACAddressConfig(ETH_HandleTypeDef *heth, uint32_t MacAddr, uint8_t *Addr); static void ETH_MACReceptionEnable(ETH_HandleTypeDef *heth); static void ETH_MACReceptionDisable(ETH_HandleTypeDef *heth); static void ETH_MACTransmissionEnable(ETH_HandleTypeDef *heth); static void ETH_MACTransmissionDisable(ETH_HandleTypeDef *heth); static void ETH_DMATransmissionEnable(ETH_HandleTypeDef *heth); static void ETH_DMATransmissionDisable(ETH_HandleTypeDef *heth); static void ETH_DMAReceptionEnable(ETH_HandleTypeDef *heth); static void ETH_DMAReceptionDisable(ETH_HandleTypeDef *heth); static void ETH_FlushTransmitFIFO(ETH_HandleTypeDef *heth); /** * @} */ /* Private functions ---------------------------------------------------------*/ /** @defgroup ETH_Exported_Functions ETH Exported Functions * @{ */ /** @defgroup ETH_Exported_Functions_Group1 Initialization and de-initialization functions * @brief Initialization and Configuration functions * @verbatim =============================================================================== ##### Initialization and de-initialization functions ##### =============================================================================== [..] This section provides functions allowing to: (+) Initialize and configure the Ethernet peripheral (+) De-initialize the Ethernet peripheral @endverbatim * @{ */ /** * @brief Initializes the Ethernet MAC and DMA according to default * parameters. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_Init(ETH_HandleTypeDef *heth) { uint32_t tempreg = 0, phyreg = 0; uint32_t hclk = 60000000; uint32_t tickstart = 0; uint32_t err = ETH_SUCCESS; /* Check the ETH peripheral state */ if(heth == NULL) { return HAL_ERROR; } /* Check parameters */ assert_param(IS_ETH_AUTONEGOTIATION(heth->Init.AutoNegotiation)); assert_param(IS_ETH_RX_MODE(heth->Init.RxMode)); assert_param(IS_ETH_CHECKSUM_MODE(heth->Init.ChecksumMode)); assert_param(IS_ETH_MEDIA_INTERFACE(heth->Init.MediaInterface)); if(heth->State == HAL_ETH_STATE_RESET) { /* Allocate lock resource and initialize it */ heth->Lock = HAL_UNLOCKED; /* Init the low level hardware : GPIO, CLOCK, NVIC. */ HAL_ETH_MspInit(heth); } /* Enable SYSCFG Clock */ __HAL_RCC_SYSCFG_CLK_ENABLE(); /* Select MII or RMII Mode*/ SYSCFG->PMC &= ~(SYSCFG_PMC_MII_RMII_SEL); SYSCFG->PMC |= (uint32_t)heth->Init.MediaInterface; /* Ethernet Software reset */ /* Set the SWR bit: resets all MAC subsystem internal registers and logic */ /* After reset all the registers holds their respective reset values */ (heth->Instance)->DMABMR |= ETH_DMABMR_SR; /* Wait for software reset */ while (((heth->Instance)->DMABMR & ETH_DMABMR_SR) != (uint32_t)RESET) { } /*-------------------------------- MAC Initialization ----------------------*/ /* Get the ETHERNET MACMIIAR value */ tempreg = (heth->Instance)->MACMIIAR; /* Clear CSR Clock Range CR[2:0] bits */ tempreg &= ETH_MACMIIAR_CR_MASK; /* Get hclk frequency value */ hclk = HAL_RCC_GetHCLKFreq(); /* Set CR bits depending on hclk value */ if((hclk >= 20000000)&&(hclk < 35000000)) { /* CSR Clock Range between 20-35 MHz */ tempreg |= (uint32_t)ETH_MACMIIAR_CR_Div16; } else if((hclk >= 35000000)&&(hclk < 60000000)) { /* CSR Clock Range between 35-60 MHz */ tempreg |= (uint32_t)ETH_MACMIIAR_CR_Div26; } else if((hclk >= 60000000)&&(hclk < 100000000)) { /* CSR Clock Range between 60-100 MHz */ tempreg |= (uint32_t)ETH_MACMIIAR_CR_Div42; } else if((hclk >= 100000000)&&(hclk < 150000000)) { /* CSR Clock Range between 100-150 MHz */ tempreg |= (uint32_t)ETH_MACMIIAR_CR_Div62; } else /* ((hclk >= 150000000)&&(hclk <= 200000000)) */ { /* CSR Clock Range between 150-216 MHz */ tempreg |= (uint32_t)ETH_MACMIIAR_CR_Div102; } /* Write to ETHERNET MAC MIIAR: Configure the ETHERNET CSR Clock Range */ (heth->Instance)->MACMIIAR = (uint32_t)tempreg; /*-------------------- PHY initialization and configuration ----------------*/ /* Put the PHY in reset mode */ if((HAL_ETH_WritePHYRegister(heth, PHY_BCR, PHY_RESET)) != HAL_OK) { /* In case of write timeout */ err = ETH_ERROR; /* Config MAC and DMA */ ETH_MACDMAConfig(heth, err); /* Set the ETH peripheral state to READY */ heth->State = HAL_ETH_STATE_READY; /* Return HAL_ERROR */ return HAL_ERROR; } /* Delay to assure PHY reset */ HAL_Delay(PHY_RESET_DELAY); if((heth->Init).AutoNegotiation != ETH_AUTONEGOTIATION_DISABLE) { /* Get tick */ tickstart = HAL_GetTick(); /* We wait for linked status */ do { HAL_ETH_ReadPHYRegister(heth, PHY_BSR, &phyreg); /* Check for the Timeout */ if((HAL_GetTick() - tickstart ) > LINKED_STATE_TIMEOUT_VALUE) { /* In case of write timeout */ err = ETH_ERROR; /* Config MAC and DMA */ ETH_MACDMAConfig(heth, err); heth->State= HAL_ETH_STATE_READY; /* Process Unlocked */ __HAL_UNLOCK(heth); return HAL_TIMEOUT; } } while (((phyreg & PHY_LINKED_STATUS) != PHY_LINKED_STATUS)); /* Enable Auto-Negotiation */ if((HAL_ETH_WritePHYRegister(heth, PHY_BCR, PHY_AUTONEGOTIATION)) != HAL_OK) { /* In case of write timeout */ err = ETH_ERROR; /* Config MAC and DMA */ ETH_MACDMAConfig(heth, err); /* Set the ETH peripheral state to READY */ heth->State = HAL_ETH_STATE_READY; /* Return HAL_ERROR */ return HAL_ERROR; } /* Get tick */ tickstart = HAL_GetTick(); /* Wait until the auto-negotiation will be completed */ do { HAL_ETH_ReadPHYRegister(heth, PHY_BSR, &phyreg); /* Check for the Timeout */ if((HAL_GetTick() - tickstart ) > AUTONEGO_COMPLETED_TIMEOUT_VALUE) { /* In case of write timeout */ err = ETH_ERROR; /* Config MAC and DMA */ ETH_MACDMAConfig(heth, err); heth->State= HAL_ETH_STATE_READY; /* Process Unlocked */ __HAL_UNLOCK(heth); return HAL_TIMEOUT; } } while (((phyreg & PHY_AUTONEGO_COMPLETE) != PHY_AUTONEGO_COMPLETE)); /* Read the result of the auto-negotiation */ if((HAL_ETH_ReadPHYRegister(heth, PHY_SR, &phyreg)) != HAL_OK) { /* In case of write timeout */ err = ETH_ERROR; /* Config MAC and DMA */ ETH_MACDMAConfig(heth, err); /* Set the ETH peripheral state to READY */ heth->State = HAL_ETH_STATE_READY; /* Return HAL_ERROR */ return HAL_ERROR; } /* Configure the MAC with the Duplex Mode fixed by the auto-negotiation process */ if((phyreg & PHY_DUPLEX_STATUS) != (uint32_t)RESET) { /* Set Ethernet duplex mode to Full-duplex following the auto-negotiation */ (heth->Init).DuplexMode = ETH_MODE_FULLDUPLEX; } else { /* Set Ethernet duplex mode to Half-duplex following the auto-negotiation */ (heth->Init).DuplexMode = ETH_MODE_HALFDUPLEX; } /* Configure the MAC with the speed fixed by the auto-negotiation process */ if((phyreg & PHY_SPEED_STATUS) == PHY_SPEED_STATUS) { /* Set Ethernet speed to 10M following the auto-negotiation */ (heth->Init).Speed = ETH_SPEED_10M; } else { /* Set Ethernet speed to 100M following the auto-negotiation */ (heth->Init).Speed = ETH_SPEED_100M; } } else /* AutoNegotiation Disable */ { /* Check parameters */ assert_param(IS_ETH_SPEED(heth->Init.Speed)); assert_param(IS_ETH_DUPLEX_MODE(heth->Init.DuplexMode)); /* Set MAC Speed and Duplex Mode */ if(HAL_ETH_WritePHYRegister(heth, PHY_BCR, ((uint16_t)((heth->Init).DuplexMode >> 3) | (uint16_t)((heth->Init).Speed >> 1))) != HAL_OK) { /* In case of write timeout */ err = ETH_ERROR; /* Config MAC and DMA */ ETH_MACDMAConfig(heth, err); /* Set the ETH peripheral state to READY */ heth->State = HAL_ETH_STATE_READY; /* Return HAL_ERROR */ return HAL_ERROR; } /* Delay to assure PHY configuration */ HAL_Delay(PHY_CONFIG_DELAY); } /* Config MAC and DMA */ ETH_MACDMAConfig(heth, err); /* Set ETH HAL State to Ready */ heth->State= HAL_ETH_STATE_READY; /* Return function status */ return HAL_OK; } /** * @brief De-Initializes the ETH peripheral. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_DeInit(ETH_HandleTypeDef *heth) { /* Set the ETH peripheral state to BUSY */ heth->State = HAL_ETH_STATE_BUSY; /* De-Init the low level hardware : GPIO, CLOCK, NVIC. */ HAL_ETH_MspDeInit(heth); /* Set ETH HAL state to Disabled */ heth->State= HAL_ETH_STATE_RESET; /* Release Lock */ __HAL_UNLOCK(heth); /* Return function status */ return HAL_OK; } /** * @brief Initializes the DMA Tx descriptors in chain mode. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @param DMATxDescTab: Pointer to the first Tx desc list * @param TxBuff: Pointer to the first TxBuffer list * @param TxBuffCount: Number of the used Tx desc in the list * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_DMATxDescListInit(ETH_HandleTypeDef *heth, ETH_DMADescTypeDef *DMATxDescTab, uint8_t *TxBuff, uint32_t TxBuffCount) { uint32_t i = 0; ETH_DMADescTypeDef *dmatxdesc; /* Process Locked */ __HAL_LOCK(heth); /* Set the ETH peripheral state to BUSY */ heth->State = HAL_ETH_STATE_BUSY; /* Set the DMATxDescToSet pointer with the first one of the DMATxDescTab list */ heth->TxDesc = DMATxDescTab; /* Fill each DMATxDesc descriptor with the right values */ for(i=0; i < TxBuffCount; i++) { /* Get the pointer on the ith member of the Tx Desc list */ dmatxdesc = DMATxDescTab + i; /* Set Second Address Chained bit */ dmatxdesc->Status = ETH_DMATXDESC_TCH; /* Set Buffer1 address pointer */ dmatxdesc->Buffer1Addr = (uint32_t)(&TxBuff[i*ETH_TX_BUF_SIZE]); if ((heth->Init).ChecksumMode == ETH_CHECKSUM_BY_HARDWARE) { /* Set the DMA Tx descriptors checksum insertion */ dmatxdesc->Status |= ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL; } /* Initialize the next descriptor with the Next Descriptor Polling Enable */ if(i < (TxBuffCount-1)) { /* Set next descriptor address register with next descriptor base address */ dmatxdesc->Buffer2NextDescAddr = (uint32_t)(DMATxDescTab+i+1); } else { /* For last descriptor, set next descriptor address register equal to the first descriptor base address */ dmatxdesc->Buffer2NextDescAddr = (uint32_t) DMATxDescTab; } } /* Set Transmit Descriptor List Address Register */ (heth->Instance)->DMATDLAR = (uint32_t) DMATxDescTab; /* Set ETH HAL State to Ready */ heth->State= HAL_ETH_STATE_READY; /* Process Unlocked */ __HAL_UNLOCK(heth); /* Return function status */ return HAL_OK; } /** * @brief Initializes the DMA Rx descriptors in chain mode. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @param DMARxDescTab: Pointer to the first Rx desc list * @param RxBuff: Pointer to the first RxBuffer list * @param RxBuffCount: Number of the used Rx desc in the list * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_DMARxDescListInit(ETH_HandleTypeDef *heth, ETH_DMADescTypeDef *DMARxDescTab, uint8_t *RxBuff, uint32_t RxBuffCount) { uint32_t i = 0; ETH_DMADescTypeDef *DMARxDesc; /* Process Locked */ __HAL_LOCK(heth); /* Set the ETH peripheral state to BUSY */ heth->State = HAL_ETH_STATE_BUSY; /* Set the Ethernet RxDesc pointer with the first one of the DMARxDescTab list */ heth->RxDesc = DMARxDescTab; /* Fill each DMARxDesc descriptor with the right values */ for(i=0; i < RxBuffCount; i++) { /* Get the pointer on the ith member of the Rx Desc list */ DMARxDesc = DMARxDescTab+i; /* Set Own bit of the Rx descriptor Status */ DMARxDesc->Status = ETH_DMARXDESC_OWN; /* Set Buffer1 size and Second Address Chained bit */ DMARxDesc->ControlBufferSize = ETH_DMARXDESC_RCH | ETH_RX_BUF_SIZE; /* Set Buffer1 address pointer */ DMARxDesc->Buffer1Addr = (uint32_t)(&RxBuff[i*ETH_RX_BUF_SIZE]); if((heth->Init).RxMode == ETH_RXINTERRUPT_MODE) { /* Enable Ethernet DMA Rx Descriptor interrupt */ DMARxDesc->ControlBufferSize &= ~ETH_DMARXDESC_DIC; } /* Initialize the next descriptor with the Next Descriptor Polling Enable */ if(i < (RxBuffCount-1)) { /* Set next descriptor address register with next descriptor base address */ DMARxDesc->Buffer2NextDescAddr = (uint32_t)(DMARxDescTab+i+1); } else { /* For last descriptor, set next descriptor address register equal to the first descriptor base address */ DMARxDesc->Buffer2NextDescAddr = (uint32_t)(DMARxDescTab); } } /* Set Receive Descriptor List Address Register */ (heth->Instance)->DMARDLAR = (uint32_t) DMARxDescTab; /* Set ETH HAL State to Ready */ heth->State= HAL_ETH_STATE_READY; /* Process Unlocked */ __HAL_UNLOCK(heth); /* Return function status */ return HAL_OK; } /** * @brief Initializes the ETH MSP. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ __weak void HAL_ETH_MspInit(ETH_HandleTypeDef *heth) { /* NOTE : This function Should not be modified, when the callback is needed, the HAL_ETH_MspInit could be implemented in the user file */ } /** * @brief DeInitializes ETH MSP. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ __weak void HAL_ETH_MspDeInit(ETH_HandleTypeDef *heth) { /* NOTE : This function Should not be modified, when the callback is needed, the HAL_ETH_MspDeInit could be implemented in the user file */ } /** * @} */ /** @defgroup ETH_Exported_Functions_Group2 IO operation functions * @brief Data transfers functions * @verbatim ============================================================================== ##### IO operation functions ##### ============================================================================== [..] This section provides functions allowing to: (+) Transmit a frame HAL_ETH_TransmitFrame(); (+) Receive a frame HAL_ETH_GetReceivedFrame(); HAL_ETH_GetReceivedFrame_IT(); (+) Read from an External PHY register HAL_ETH_ReadPHYRegister(); (+) Write to an External PHY register HAL_ETH_WritePHYRegister(); @endverbatim * @{ */ /** * @brief Sends an Ethernet frame. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @param FrameLength: Amount of data to be sent * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameLength) { uint32_t bufcount = 0, size = 0, i = 0; /* Process Locked */ __HAL_LOCK(heth); /* Set the ETH peripheral state to BUSY */ heth->State = HAL_ETH_STATE_BUSY; if (FrameLength == 0) { /* Set ETH HAL state to READY */ heth->State = HAL_ETH_STATE_READY; /* Process Unlocked */ __HAL_UNLOCK(heth); return HAL_ERROR; } /* Check if the descriptor is owned by the ETHERNET DMA (when set) or CPU (when reset) */ if(((heth->TxDesc)->Status & ETH_DMATXDESC_OWN) != (uint32_t)RESET) { /* OWN bit set */ heth->State = HAL_ETH_STATE_BUSY_TX; /* Process Unlocked */ __HAL_UNLOCK(heth); return HAL_ERROR; } /* Get the number of needed Tx buffers for the current frame */ if (FrameLength > ETH_TX_BUF_SIZE) { bufcount = FrameLength/ETH_TX_BUF_SIZE; if (FrameLength % ETH_TX_BUF_SIZE) { bufcount++; } } else { bufcount = 1; } if (bufcount == 1) { /* Set LAST and FIRST segment */ heth->TxDesc->Status |=ETH_DMATXDESC_FS|ETH_DMATXDESC_LS; /* Set frame size */ heth->TxDesc->ControlBufferSize = (FrameLength & ETH_DMATXDESC_TBS1); /* Set Own bit of the Tx descriptor Status: gives the buffer back to ETHERNET DMA */ heth->TxDesc->Status |= ETH_DMATXDESC_OWN; /* Point to next descriptor */ heth->TxDesc= (ETH_DMADescTypeDef *)(heth->TxDesc->Buffer2NextDescAddr); } else { for (i=0; i< bufcount; i++) { /* Clear FIRST and LAST segment bits */ heth->TxDesc->Status &= ~(ETH_DMATXDESC_FS | ETH_DMATXDESC_LS); if (i == 0) { /* Setting the first segment bit */ heth->TxDesc->Status |= ETH_DMATXDESC_FS; } /* Program size */ heth->TxDesc->ControlBufferSize = (ETH_TX_BUF_SIZE & ETH_DMATXDESC_TBS1); if (i == (bufcount-1)) { /* Setting the last segment bit */ heth->TxDesc->Status |= ETH_DMATXDESC_LS; size = FrameLength - (bufcount-1)*ETH_TX_BUF_SIZE; heth->TxDesc->ControlBufferSize = (size & ETH_DMATXDESC_TBS1); } /* Set Own bit of the Tx descriptor Status: gives the buffer back to ETHERNET DMA */ heth->TxDesc->Status |= ETH_DMATXDESC_OWN; /* point to next descriptor */ heth->TxDesc = (ETH_DMADescTypeDef *)(heth->TxDesc->Buffer2NextDescAddr); } } /* When Tx Buffer unavailable flag is set: clear it and resume transmission */ if (((heth->Instance)->DMASR & ETH_DMASR_TBUS) != (uint32_t)RESET) { /* Clear TBUS ETHERNET DMA flag */ (heth->Instance)->DMASR = ETH_DMASR_TBUS; /* Resume DMA transmission*/ (heth->Instance)->DMATPDR = 0; } /* Set ETH HAL State to Ready */ heth->State = HAL_ETH_STATE_READY; /* Process Unlocked */ __HAL_UNLOCK(heth); /* Return function status */ return HAL_OK; } /** * @brief Checks for received frames. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame(ETH_HandleTypeDef *heth) { uint32_t framelength = 0; /* Process Locked */ __HAL_LOCK(heth); /* Check the ETH state to BUSY */ heth->State = HAL_ETH_STATE_BUSY; /* Check if segment is not owned by DMA */ /* (((heth->RxDesc->Status & ETH_DMARXDESC_OWN) == (uint32_t)RESET) && ((heth->RxDesc->Status & ETH_DMARXDESC_LS) != (uint32_t)RESET)) */ if(((heth->RxDesc->Status & ETH_DMARXDESC_OWN) == (uint32_t)RESET)) { /* Check if last segment */ if(((heth->RxDesc->Status & ETH_DMARXDESC_LS) != (uint32_t)RESET)) { /* increment segment count */ (heth->RxFrameInfos).SegCount++; /* Check if last segment is first segment: one segment contains the frame */ if ((heth->RxFrameInfos).SegCount == 1) { (heth->RxFrameInfos).FSRxDesc =heth->RxDesc; } heth->RxFrameInfos.LSRxDesc = heth->RxDesc; /* Get the Frame Length of the received packet: substruct 4 bytes of the CRC */ framelength = (((heth->RxDesc)->Status & ETH_DMARXDESC_FL) >> ETH_DMARXDESC_FRAMELENGTHSHIFT) - 4; heth->RxFrameInfos.length = framelength; /* Get the address of the buffer start address */ heth->RxFrameInfos.buffer = ((heth->RxFrameInfos).FSRxDesc)->Buffer1Addr; /* point to next descriptor */ heth->RxDesc = (ETH_DMADescTypeDef*) ((heth->RxDesc)->Buffer2NextDescAddr); /* Set HAL State to Ready */ heth->State = HAL_ETH_STATE_READY; /* Process Unlocked */ __HAL_UNLOCK(heth); /* Return function status */ return HAL_OK; } /* Check if first segment */ else if((heth->RxDesc->Status & ETH_DMARXDESC_FS) != (uint32_t)RESET) { (heth->RxFrameInfos).FSRxDesc = heth->RxDesc; (heth->RxFrameInfos).LSRxDesc = NULL; (heth->RxFrameInfos).SegCount = 1; /* Point to next descriptor */ heth->RxDesc = (ETH_DMADescTypeDef*) (heth->RxDesc->Buffer2NextDescAddr); } /* Check if intermediate segment */ else { (heth->RxFrameInfos).SegCount++; /* Point to next descriptor */ heth->RxDesc = (ETH_DMADescTypeDef*) (heth->RxDesc->Buffer2NextDescAddr); } } /* Set ETH HAL State to Ready */ heth->State = HAL_ETH_STATE_READY; /* Process Unlocked */ __HAL_UNLOCK(heth); /* Return function status */ return HAL_ERROR; } /** * @brief Gets the Received frame in interrupt mode. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame_IT(ETH_HandleTypeDef *heth) { uint32_t descriptorscancounter = 0; /* Process Locked */ __HAL_LOCK(heth); /* Set ETH HAL State to BUSY */ heth->State = HAL_ETH_STATE_BUSY; /* Scan descriptors owned by CPU */ while (((heth->RxDesc->Status & ETH_DMARXDESC_OWN) == (uint32_t)RESET) && (descriptorscancounter < ETH_RXBUFNB)) { /* Just for security */ descriptorscancounter++; /* Check if first segment in frame */ /* ((heth->RxDesc->Status & ETH_DMARXDESC_FS) != (uint32_t)RESET) && ((heth->RxDesc->Status & ETH_DMARXDESC_LS) == (uint32_t)RESET)) */ if((heth->RxDesc->Status & (ETH_DMARXDESC_FS | ETH_DMARXDESC_LS)) == (uint32_t)ETH_DMARXDESC_FS) { heth->RxFrameInfos.FSRxDesc = heth->RxDesc; heth->RxFrameInfos.SegCount = 1; /* Point to next descriptor */ heth->RxDesc = (ETH_DMADescTypeDef*) (heth->RxDesc->Buffer2NextDescAddr); } /* Check if intermediate segment */ /* ((heth->RxDesc->Status & ETH_DMARXDESC_LS) == (uint32_t)RESET)&& ((heth->RxDesc->Status & ETH_DMARXDESC_FS) == (uint32_t)RESET)) */ else if ((heth->RxDesc->Status & (ETH_DMARXDESC_LS | ETH_DMARXDESC_FS)) == (uint32_t)RESET) { /* Increment segment count */ (heth->RxFrameInfos.SegCount)++; /* Point to next descriptor */ heth->RxDesc = (ETH_DMADescTypeDef*)(heth->RxDesc->Buffer2NextDescAddr); } /* Should be last segment */ else { /* Last segment */ heth->RxFrameInfos.LSRxDesc = heth->RxDesc; /* Increment segment count */ (heth->RxFrameInfos.SegCount)++; /* Check if last segment is first segment: one segment contains the frame */ if ((heth->RxFrameInfos.SegCount) == 1) { heth->RxFrameInfos.FSRxDesc = heth->RxDesc; } /* Get the Frame Length of the received packet: substruct 4 bytes of the CRC */ heth->RxFrameInfos.length = (((heth->RxDesc)->Status & ETH_DMARXDESC_FL) >> ETH_DMARXDESC_FRAMELENGTHSHIFT) - 4; /* Get the address of the buffer start address */ heth->RxFrameInfos.buffer =((heth->RxFrameInfos).FSRxDesc)->Buffer1Addr; /* Point to next descriptor */ heth->RxDesc = (ETH_DMADescTypeDef*) (heth->RxDesc->Buffer2NextDescAddr); /* Set HAL State to Ready */ heth->State = HAL_ETH_STATE_READY; /* Process Unlocked */ __HAL_UNLOCK(heth); /* Return function status */ return HAL_OK; } } /* Set HAL State to Ready */ heth->State = HAL_ETH_STATE_READY; /* Process Unlocked */ __HAL_UNLOCK(heth); /* Return function status */ return HAL_ERROR; } /** * @brief This function handles ETH interrupt request. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval HAL status */ void HAL_ETH_IRQHandler(ETH_HandleTypeDef *heth) { /* Frame received */ if (__HAL_ETH_DMA_GET_FLAG(heth, ETH_DMA_FLAG_R)) { /* Receive complete callback */ HAL_ETH_RxCpltCallback(heth); /* Clear the Eth DMA Rx IT pending bits */ __HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMA_IT_R); /* Set HAL State to Ready */ heth->State = HAL_ETH_STATE_READY; /* Process Unlocked */ __HAL_UNLOCK(heth); } /* Frame transmitted */ else if (__HAL_ETH_DMA_GET_FLAG(heth, ETH_DMA_FLAG_T)) { /* Transfer complete callback */ HAL_ETH_TxCpltCallback(heth); /* Clear the Eth DMA Tx IT pending bits */ __HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMA_IT_T); /* Set HAL State to Ready */ heth->State = HAL_ETH_STATE_READY; /* Process Unlocked */ __HAL_UNLOCK(heth); } /* Clear the interrupt flags */ __HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMA_IT_NIS); /* ETH DMA Error */ if(__HAL_ETH_DMA_GET_FLAG(heth, ETH_DMA_FLAG_AIS)) { /* Ethernet Error callback */ HAL_ETH_ErrorCallback(heth); /* Clear the interrupt flags */ __HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMA_FLAG_AIS); /* Set HAL State to Ready */ heth->State = HAL_ETH_STATE_READY; /* Process Unlocked */ __HAL_UNLOCK(heth); } } /** * @brief Tx Transfer completed callbacks. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ __weak void HAL_ETH_TxCpltCallback(ETH_HandleTypeDef *heth) { /* NOTE : This function Should not be modified, when the callback is needed, the HAL_ETH_TxCpltCallback could be implemented in the user file */ } /** * @brief Rx Transfer completed callbacks. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ __weak void HAL_ETH_RxCpltCallback(ETH_HandleTypeDef *heth) { /* NOTE : This function Should not be modified, when the callback is needed, the HAL_ETH_TxCpltCallback could be implemented in the user file */ } /** * @brief Ethernet transfer error callbacks * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ __weak void HAL_ETH_ErrorCallback(ETH_HandleTypeDef *heth) { /* NOTE : This function Should not be modified, when the callback is needed, the HAL_ETH_TxCpltCallback could be implemented in the user file */ } /** * @brief Reads a PHY register * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @param PHYReg: PHY register address, is the index of one of the 32 PHY register. * This parameter can be one of the following values: * PHY_BCR: Transceiver Basic Control Register, * PHY_BSR: Transceiver Basic Status Register. * More PHY register could be read depending on the used PHY * @param RegValue: PHY register value * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t *RegValue) { uint32_t tmpreg = 0; uint32_t tickstart = 0; /* Check parameters */ assert_param(IS_ETH_PHY_ADDRESS(heth->Init.PhyAddress)); /* Check the ETH peripheral state */ if(heth->State == HAL_ETH_STATE_BUSY_RD) { return HAL_BUSY; } /* Set ETH HAL State to BUSY_RD */ heth->State = HAL_ETH_STATE_BUSY_RD; /* Get the ETHERNET MACMIIAR value */ tmpreg = heth->Instance->MACMIIAR; /* Keep only the CSR Clock Range CR[2:0] bits value */ tmpreg &= ~ETH_MACMIIAR_CR_MASK; /* Prepare the MII address register value */ tmpreg |=(((uint32_t)heth->Init.PhyAddress << 11) & ETH_MACMIIAR_PA); /* Set the PHY device address */ tmpreg |=(((uint32_t)PHYReg<<6) & ETH_MACMIIAR_MR); /* Set the PHY register address */ tmpreg &= ~ETH_MACMIIAR_MW; /* Set the read mode */ tmpreg |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */ /* Write the result value into the MII Address register */ heth->Instance->MACMIIAR = tmpreg; /* Get tick */ tickstart = HAL_GetTick(); /* Check for the Busy flag */ while((tmpreg & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB) { /* Check for the Timeout */ if((HAL_GetTick() - tickstart ) > PHY_READ_TO) { heth->State= HAL_ETH_STATE_READY; /* Process Unlocked */ __HAL_UNLOCK(heth); return HAL_TIMEOUT; } tmpreg = heth->Instance->MACMIIAR; } /* Get MACMIIDR value */ *RegValue = (uint16_t)(heth->Instance->MACMIIDR); /* Set ETH HAL State to READY */ heth->State = HAL_ETH_STATE_READY; /* Return function status */ return HAL_OK; } /** * @brief Writes to a PHY register. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @param PHYReg: PHY register address, is the index of one of the 32 PHY register. * This parameter can be one of the following values: * PHY_BCR: Transceiver Control Register. * More PHY register could be written depending on the used PHY * @param RegValue: the value to write * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_WritePHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t RegValue) { uint32_t tmpreg = 0; uint32_t tickstart = 0; /* Check parameters */ assert_param(IS_ETH_PHY_ADDRESS(heth->Init.PhyAddress)); /* Check the ETH peripheral state */ if(heth->State == HAL_ETH_STATE_BUSY_WR) { return HAL_BUSY; } /* Set ETH HAL State to BUSY_WR */ heth->State = HAL_ETH_STATE_BUSY_WR; /* Get the ETHERNET MACMIIAR value */ tmpreg = heth->Instance->MACMIIAR; /* Keep only the CSR Clock Range CR[2:0] bits value */ tmpreg &= ~ETH_MACMIIAR_CR_MASK; /* Prepare the MII register address value */ tmpreg |=(((uint32_t)heth->Init.PhyAddress<<11) & ETH_MACMIIAR_PA); /* Set the PHY device address */ tmpreg |=(((uint32_t)PHYReg<<6) & ETH_MACMIIAR_MR); /* Set the PHY register address */ tmpreg |= ETH_MACMIIAR_MW; /* Set the write mode */ tmpreg |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */ /* Give the value to the MII data register */ heth->Instance->MACMIIDR = (uint16_t)RegValue; /* Write the result value into the MII Address register */ heth->Instance->MACMIIAR = tmpreg; /* Get tick */ tickstart = HAL_GetTick(); /* Check for the Busy flag */ while((tmpreg & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB) { /* Check for the Timeout */ if((HAL_GetTick() - tickstart ) > PHY_WRITE_TO) { heth->State= HAL_ETH_STATE_READY; /* Process Unlocked */ __HAL_UNLOCK(heth); return HAL_TIMEOUT; } tmpreg = heth->Instance->MACMIIAR; } /* Set ETH HAL State to READY */ heth->State = HAL_ETH_STATE_READY; /* Return function status */ return HAL_OK; } /** * @} */ /** @defgroup ETH_Exported_Functions_Group3 Peripheral Control functions * @brief Peripheral Control functions * @verbatim =============================================================================== ##### Peripheral Control functions ##### =============================================================================== [..] This section provides functions allowing to: (+) Enable MAC and DMA transmission and reception. HAL_ETH_Start(); (+) Disable MAC and DMA transmission and reception. HAL_ETH_Stop(); (+) Set the MAC configuration in runtime mode HAL_ETH_ConfigMAC(); (+) Set the DMA configuration in runtime mode HAL_ETH_ConfigDMA(); @endverbatim * @{ */ /** * @brief Enables Ethernet MAC and DMA reception/transmission * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_Start(ETH_HandleTypeDef *heth) { /* Process Locked */ __HAL_LOCK(heth); /* Set the ETH peripheral state to BUSY */ heth->State = HAL_ETH_STATE_BUSY; /* Enable transmit state machine of the MAC for transmission on the MII */ ETH_MACTransmissionEnable(heth); /* Enable receive state machine of the MAC for reception from the MII */ ETH_MACReceptionEnable(heth); /* Flush Transmit FIFO */ ETH_FlushTransmitFIFO(heth); /* Start DMA transmission */ ETH_DMATransmissionEnable(heth); /* Start DMA reception */ ETH_DMAReceptionEnable(heth); /* Set the ETH state to READY*/ heth->State= HAL_ETH_STATE_READY; /* Process Unlocked */ __HAL_UNLOCK(heth); /* Return function status */ return HAL_OK; } /** * @brief Stop Ethernet MAC and DMA reception/transmission * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_Stop(ETH_HandleTypeDef *heth) { /* Process Locked */ __HAL_LOCK(heth); /* Set the ETH peripheral state to BUSY */ heth->State = HAL_ETH_STATE_BUSY; /* Stop DMA transmission */ ETH_DMATransmissionDisable(heth); /* Stop DMA reception */ ETH_DMAReceptionDisable(heth); /* Disable receive state machine of the MAC for reception from the MII */ ETH_MACReceptionDisable(heth); /* Flush Transmit FIFO */ ETH_FlushTransmitFIFO(heth); /* Disable transmit state machine of the MAC for transmission on the MII */ ETH_MACTransmissionDisable(heth); /* Set the ETH state*/ heth->State = HAL_ETH_STATE_READY; /* Process Unlocked */ __HAL_UNLOCK(heth); /* Return function status */ return HAL_OK; } /** * @brief Set ETH MAC Configuration. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @param macconf: MAC Configuration structure * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_ConfigMAC(ETH_HandleTypeDef *heth, ETH_MACInitTypeDef *macconf) { uint32_t tmpreg = 0; /* Process Locked */ __HAL_LOCK(heth); /* Set the ETH peripheral state to BUSY */ heth->State= HAL_ETH_STATE_BUSY; assert_param(IS_ETH_SPEED(heth->Init.Speed)); assert_param(IS_ETH_DUPLEX_MODE(heth->Init.DuplexMode)); if (macconf != NULL) { /* Check the parameters */ assert_param(IS_ETH_WATCHDOG(macconf->Watchdog)); assert_param(IS_ETH_JABBER(macconf->Jabber)); assert_param(IS_ETH_INTER_FRAME_GAP(macconf->InterFrameGap)); assert_param(IS_ETH_CARRIER_SENSE(macconf->CarrierSense)); assert_param(IS_ETH_RECEIVE_OWN(macconf->ReceiveOwn)); assert_param(IS_ETH_LOOPBACK_MODE(macconf->LoopbackMode)); assert_param(IS_ETH_CHECKSUM_OFFLOAD(macconf->ChecksumOffload)); assert_param(IS_ETH_RETRY_TRANSMISSION(macconf->RetryTransmission)); assert_param(IS_ETH_AUTOMATIC_PADCRC_STRIP(macconf->AutomaticPadCRCStrip)); assert_param(IS_ETH_BACKOFF_LIMIT(macconf->BackOffLimit)); assert_param(IS_ETH_DEFERRAL_CHECK(macconf->DeferralCheck)); assert_param(IS_ETH_RECEIVE_ALL(macconf->ReceiveAll)); assert_param(IS_ETH_SOURCE_ADDR_FILTER(macconf->SourceAddrFilter)); assert_param(IS_ETH_CONTROL_FRAMES(macconf->PassControlFrames)); assert_param(IS_ETH_BROADCAST_FRAMES_RECEPTION(macconf->BroadcastFramesReception)); assert_param(IS_ETH_DESTINATION_ADDR_FILTER(macconf->DestinationAddrFilter)); assert_param(IS_ETH_PROMISCUOUS_MODE(macconf->PromiscuousMode)); assert_param(IS_ETH_MULTICAST_FRAMES_FILTER(macconf->MulticastFramesFilter)); assert_param(IS_ETH_UNICAST_FRAMES_FILTER(macconf->UnicastFramesFilter)); assert_param(IS_ETH_PAUSE_TIME(macconf->PauseTime)); assert_param(IS_ETH_ZEROQUANTA_PAUSE(macconf->ZeroQuantaPause)); assert_param(IS_ETH_PAUSE_LOW_THRESHOLD(macconf->PauseLowThreshold)); assert_param(IS_ETH_UNICAST_PAUSE_FRAME_DETECT(macconf->UnicastPauseFrameDetect)); assert_param(IS_ETH_RECEIVE_FLOWCONTROL(macconf->ReceiveFlowControl)); assert_param(IS_ETH_TRANSMIT_FLOWCONTROL(macconf->TransmitFlowControl)); assert_param(IS_ETH_VLAN_TAG_COMPARISON(macconf->VLANTagComparison)); assert_param(IS_ETH_VLAN_TAG_IDENTIFIER(macconf->VLANTagIdentifier)); /*------------------------ ETHERNET MACCR Configuration --------------------*/ /* Get the ETHERNET MACCR value */ tmpreg = (heth->Instance)->MACCR; /* Clear WD, PCE, PS, TE and RE bits */ tmpreg &= ETH_MACCR_CLEAR_MASK; tmpreg |= (uint32_t)(macconf->Watchdog | macconf->Jabber | macconf->InterFrameGap | macconf->CarrierSense | (heth->Init).Speed | macconf->ReceiveOwn | macconf->LoopbackMode | (heth->Init).DuplexMode | macconf->ChecksumOffload | macconf->RetryTransmission | macconf->AutomaticPadCRCStrip | macconf->BackOffLimit | macconf->DeferralCheck); /* Write to ETHERNET MACCR */ (heth->Instance)->MACCR = (uint32_t)tmpreg; /* Wait until the write operation will be taken into account : at least four TX_CLK/RX_CLK clock cycles */ tmpreg = (heth->Instance)->MACCR; HAL_Delay(ETH_REG_WRITE_DELAY); (heth->Instance)->MACCR = tmpreg; /*----------------------- ETHERNET MACFFR Configuration --------------------*/ /* Write to ETHERNET MACFFR */ (heth->Instance)->MACFFR = (uint32_t)(macconf->ReceiveAll | macconf->SourceAddrFilter | macconf->PassControlFrames | macconf->BroadcastFramesReception | macconf->DestinationAddrFilter | macconf->PromiscuousMode | macconf->MulticastFramesFilter | macconf->UnicastFramesFilter); /* Wait until the write operation will be taken into account : at least four TX_CLK/RX_CLK clock cycles */ tmpreg = (heth->Instance)->MACFFR; HAL_Delay(ETH_REG_WRITE_DELAY); (heth->Instance)->MACFFR = tmpreg; /*--------------- ETHERNET MACHTHR and MACHTLR Configuration ---------------*/ /* Write to ETHERNET MACHTHR */ (heth->Instance)->MACHTHR = (uint32_t)macconf->HashTableHigh; /* Write to ETHERNET MACHTLR */ (heth->Instance)->MACHTLR = (uint32_t)macconf->HashTableLow; /*----------------------- ETHERNET MACFCR Configuration --------------------*/ /* Get the ETHERNET MACFCR value */ tmpreg = (heth->Instance)->MACFCR; /* Clear xx bits */ tmpreg &= ETH_MACFCR_CLEAR_MASK; tmpreg |= (uint32_t)((macconf->PauseTime << 16) | macconf->ZeroQuantaPause | macconf->PauseLowThreshold | macconf->UnicastPauseFrameDetect | macconf->ReceiveFlowControl | macconf->TransmitFlowControl); /* Write to ETHERNET MACFCR */ (heth->Instance)->MACFCR = (uint32_t)tmpreg; /* Wait until the write operation will be taken into account : at least four TX_CLK/RX_CLK clock cycles */ tmpreg = (heth->Instance)->MACFCR; HAL_Delay(ETH_REG_WRITE_DELAY); (heth->Instance)->MACFCR = tmpreg; /*----------------------- ETHERNET MACVLANTR Configuration -----------------*/ (heth->Instance)->MACVLANTR = (uint32_t)(macconf->VLANTagComparison | macconf->VLANTagIdentifier); /* Wait until the write operation will be taken into account : at least four TX_CLK/RX_CLK clock cycles */ tmpreg = (heth->Instance)->MACVLANTR; HAL_Delay(ETH_REG_WRITE_DELAY); (heth->Instance)->MACVLANTR = tmpreg; } else /* macconf == NULL : here we just configure Speed and Duplex mode */ { /*------------------------ ETHERNET MACCR Configuration --------------------*/ /* Get the ETHERNET MACCR value */ tmpreg = (heth->Instance)->MACCR; /* Clear FES and DM bits */ tmpreg &= ~((uint32_t)0x00004800); tmpreg |= (uint32_t)(heth->Init.Speed | heth->Init.DuplexMode); /* Write to ETHERNET MACCR */ (heth->Instance)->MACCR = (uint32_t)tmpreg; /* Wait until the write operation will be taken into account: at least four TX_CLK/RX_CLK clock cycles */ tmpreg = (heth->Instance)->MACCR; HAL_Delay(ETH_REG_WRITE_DELAY); (heth->Instance)->MACCR = tmpreg; } /* Set the ETH state to Ready */ heth->State= HAL_ETH_STATE_READY; /* Process Unlocked */ __HAL_UNLOCK(heth); /* Return function status */ return HAL_OK; } /** * @brief Sets ETH DMA Configuration. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @param dmaconf: DMA Configuration structure * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_ConfigDMA(ETH_HandleTypeDef *heth, ETH_DMAInitTypeDef *dmaconf) { uint32_t tmpreg = 0; /* Process Locked */ __HAL_LOCK(heth); /* Set the ETH peripheral state to BUSY */ heth->State= HAL_ETH_STATE_BUSY; /* Check parameters */ assert_param(IS_ETH_DROP_TCPIP_CHECKSUM_FRAME(dmaconf->DropTCPIPChecksumErrorFrame)); assert_param(IS_ETH_RECEIVE_STORE_FORWARD(dmaconf->ReceiveStoreForward)); assert_param(IS_ETH_FLUSH_RECEIVE_FRAME(dmaconf->FlushReceivedFrame)); assert_param(IS_ETH_TRANSMIT_STORE_FORWARD(dmaconf->TransmitStoreForward)); assert_param(IS_ETH_TRANSMIT_THRESHOLD_CONTROL(dmaconf->TransmitThresholdControl)); assert_param(IS_ETH_FORWARD_ERROR_FRAMES(dmaconf->ForwardErrorFrames)); assert_param(IS_ETH_FORWARD_UNDERSIZED_GOOD_FRAMES(dmaconf->ForwardUndersizedGoodFrames)); assert_param(IS_ETH_RECEIVE_THRESHOLD_CONTROL(dmaconf->ReceiveThresholdControl)); assert_param(IS_ETH_SECOND_FRAME_OPERATE(dmaconf->SecondFrameOperate)); assert_param(IS_ETH_ADDRESS_ALIGNED_BEATS(dmaconf->AddressAlignedBeats)); assert_param(IS_ETH_FIXED_BURST(dmaconf->FixedBurst)); assert_param(IS_ETH_RXDMA_BURST_LENGTH(dmaconf->RxDMABurstLength)); assert_param(IS_ETH_TXDMA_BURST_LENGTH(dmaconf->TxDMABurstLength)); assert_param(IS_ETH_ENHANCED_DESCRIPTOR_FORMAT(dmaconf->EnhancedDescriptorFormat)); assert_param(IS_ETH_DMA_DESC_SKIP_LENGTH(dmaconf->DescriptorSkipLength)); assert_param(IS_ETH_DMA_ARBITRATION_ROUNDROBIN_RXTX(dmaconf->DMAArbitration)); /*----------------------- ETHERNET DMAOMR Configuration --------------------*/ /* Get the ETHERNET DMAOMR value */ tmpreg = (heth->Instance)->DMAOMR; /* Clear xx bits */ tmpreg &= ETH_DMAOMR_CLEAR_MASK; tmpreg |= (uint32_t)(dmaconf->DropTCPIPChecksumErrorFrame | dmaconf->ReceiveStoreForward | dmaconf->FlushReceivedFrame | dmaconf->TransmitStoreForward | dmaconf->TransmitThresholdControl | dmaconf->ForwardErrorFrames | dmaconf->ForwardUndersizedGoodFrames | dmaconf->ReceiveThresholdControl | dmaconf->SecondFrameOperate); /* Write to ETHERNET DMAOMR */ (heth->Instance)->DMAOMR = (uint32_t)tmpreg; /* Wait until the write operation will be taken into account: at least four TX_CLK/RX_CLK clock cycles */ tmpreg = (heth->Instance)->DMAOMR; HAL_Delay(ETH_REG_WRITE_DELAY); (heth->Instance)->DMAOMR = tmpreg; /*----------------------- ETHERNET DMABMR Configuration --------------------*/ (heth->Instance)->DMABMR = (uint32_t)(dmaconf->AddressAlignedBeats | dmaconf->FixedBurst | dmaconf->RxDMABurstLength | /* !! if 4xPBL is selected for Tx or Rx it is applied for the other */ dmaconf->TxDMABurstLength | dmaconf->EnhancedDescriptorFormat | (dmaconf->DescriptorSkipLength << 2) | dmaconf->DMAArbitration | ETH_DMABMR_USP); /* Enable use of separate PBL for Rx and Tx */ /* Wait until the write operation will be taken into account: at least four TX_CLK/RX_CLK clock cycles */ tmpreg = (heth->Instance)->DMABMR; HAL_Delay(ETH_REG_WRITE_DELAY); (heth->Instance)->DMABMR = tmpreg; /* Set the ETH state to Ready */ heth->State= HAL_ETH_STATE_READY; /* Process Unlocked */ __HAL_UNLOCK(heth); /* Return function status */ return HAL_OK; } /** * @} */ /** @defgroup ETH_Exported_Functions_Group4 Peripheral State functions * @brief Peripheral State functions * @verbatim =============================================================================== ##### Peripheral State functions ##### =============================================================================== [..] This subsection permits to get in run-time the status of the peripheral and the data flow. (+) Get the ETH handle state: HAL_ETH_GetState(); @endverbatim * @{ */ /** * @brief Return the ETH HAL state * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval HAL state */ HAL_ETH_StateTypeDef HAL_ETH_GetState(ETH_HandleTypeDef *heth) { /* Return ETH state */ return heth->State; } /** * @} */ /** * @} */ /** @addtogroup ETH_Private_Functions * @{ */ /** * @brief Configures Ethernet MAC and DMA with default parameters. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @param err: Ethernet Init error * @retval HAL status */ static void ETH_MACDMAConfig(ETH_HandleTypeDef *heth, uint32_t err) { ETH_MACInitTypeDef macinit; ETH_DMAInitTypeDef dmainit; uint32_t tmpreg = 0; if (err != ETH_SUCCESS) /* Auto-negotiation failed */ { /* Set Ethernet duplex mode to Full-duplex */ (heth->Init).DuplexMode = ETH_MODE_FULLDUPLEX; /* Set Ethernet speed to 100M */ (heth->Init).Speed = ETH_SPEED_100M; } /* Ethernet MAC default initialization **************************************/ macinit.Watchdog = ETH_WATCHDOG_ENABLE; macinit.Jabber = ETH_JABBER_ENABLE; macinit.InterFrameGap = ETH_INTERFRAMEGAP_96BIT; macinit.CarrierSense = ETH_CARRIERSENCE_ENABLE; macinit.ReceiveOwn = ETH_RECEIVEOWN_ENABLE; macinit.LoopbackMode = ETH_LOOPBACKMODE_DISABLE; if(heth->Init.ChecksumMode == ETH_CHECKSUM_BY_HARDWARE) { macinit.ChecksumOffload = ETH_CHECKSUMOFFLAOD_ENABLE; } else { macinit.ChecksumOffload = ETH_CHECKSUMOFFLAOD_DISABLE; } macinit.RetryTransmission = ETH_RETRYTRANSMISSION_DISABLE; macinit.AutomaticPadCRCStrip = ETH_AUTOMATICPADCRCSTRIP_DISABLE; macinit.BackOffLimit = ETH_BACKOFFLIMIT_10; macinit.DeferralCheck = ETH_DEFFERRALCHECK_DISABLE; macinit.ReceiveAll = ETH_RECEIVEAll_DISABLE; macinit.SourceAddrFilter = ETH_SOURCEADDRFILTER_DISABLE; macinit.PassControlFrames = ETH_PASSCONTROLFRAMES_BLOCKALL; macinit.BroadcastFramesReception = ETH_BROADCASTFRAMESRECEPTION_ENABLE; macinit.DestinationAddrFilter = ETH_DESTINATIONADDRFILTER_NORMAL; macinit.PromiscuousMode = ETH_PROMISCUOUS_MODE_DISABLE; macinit.MulticastFramesFilter = ETH_MULTICASTFRAMESFILTER_PERFECT; macinit.UnicastFramesFilter = ETH_UNICASTFRAMESFILTER_PERFECT; macinit.HashTableHigh = 0x0; macinit.HashTableLow = 0x0; macinit.PauseTime = 0x0; macinit.ZeroQuantaPause = ETH_ZEROQUANTAPAUSE_DISABLE; macinit.PauseLowThreshold = ETH_PAUSELOWTHRESHOLD_MINUS4; macinit.UnicastPauseFrameDetect = ETH_UNICASTPAUSEFRAMEDETECT_DISABLE; macinit.ReceiveFlowControl = ETH_RECEIVEFLOWCONTROL_DISABLE; macinit.TransmitFlowControl = ETH_TRANSMITFLOWCONTROL_DISABLE; macinit.VLANTagComparison = ETH_VLANTAGCOMPARISON_16BIT; macinit.VLANTagIdentifier = 0x0; /*------------------------ ETHERNET MACCR Configuration --------------------*/ /* Get the ETHERNET MACCR value */ tmpreg = (heth->Instance)->MACCR; /* Clear WD, PCE, PS, TE and RE bits */ tmpreg &= ETH_MACCR_CLEAR_MASK; /* Set the WD bit according to ETH Watchdog value */ /* Set the JD: bit according to ETH Jabber value */ /* Set the IFG bit according to ETH InterFrameGap value */ /* Set the DCRS bit according to ETH CarrierSense value */ /* Set the FES bit according to ETH Speed value */ /* Set the DO bit according to ETH ReceiveOwn value */ /* Set the LM bit according to ETH LoopbackMode value */ /* Set the DM bit according to ETH Mode value */ /* Set the IPCO bit according to ETH ChecksumOffload value */ /* Set the DR bit according to ETH RetryTransmission value */ /* Set the ACS bit according to ETH AutomaticPadCRCStrip value */ /* Set the BL bit according to ETH BackOffLimit value */ /* Set the DC bit according to ETH DeferralCheck value */ tmpreg |= (uint32_t)(macinit.Watchdog | macinit.Jabber | macinit.InterFrameGap | macinit.CarrierSense | (heth->Init).Speed | macinit.ReceiveOwn | macinit.LoopbackMode | (heth->Init).DuplexMode | macinit.ChecksumOffload | macinit.RetryTransmission | macinit.AutomaticPadCRCStrip | macinit.BackOffLimit | macinit.DeferralCheck); /* Write to ETHERNET MACCR */ (heth->Instance)->MACCR = (uint32_t)tmpreg; /* Wait until the write operation will be taken into account: at least four TX_CLK/RX_CLK clock cycles */ tmpreg = (heth->Instance)->MACCR; HAL_Delay(ETH_REG_WRITE_DELAY); (heth->Instance)->MACCR = tmpreg; /*----------------------- ETHERNET MACFFR Configuration --------------------*/ /* Set the RA bit according to ETH ReceiveAll value */ /* Set the SAF and SAIF bits according to ETH SourceAddrFilter value */ /* Set the PCF bit according to ETH PassControlFrames value */ /* Set the DBF bit according to ETH BroadcastFramesReception value */ /* Set the DAIF bit according to ETH DestinationAddrFilter value */ /* Set the PR bit according to ETH PromiscuousMode value */ /* Set the PM, HMC and HPF bits according to ETH MulticastFramesFilter value */ /* Set the HUC and HPF bits according to ETH UnicastFramesFilter value */ /* Write to ETHERNET MACFFR */ (heth->Instance)->MACFFR = (uint32_t)(macinit.ReceiveAll | macinit.SourceAddrFilter | macinit.PassControlFrames | macinit.BroadcastFramesReception | macinit.DestinationAddrFilter | macinit.PromiscuousMode | macinit.MulticastFramesFilter | macinit.UnicastFramesFilter); /* Wait until the write operation will be taken into account: at least four TX_CLK/RX_CLK clock cycles */ tmpreg = (heth->Instance)->MACFFR; HAL_Delay(ETH_REG_WRITE_DELAY); (heth->Instance)->MACFFR = tmpreg; /*--------------- ETHERNET MACHTHR and MACHTLR Configuration --------------*/ /* Write to ETHERNET MACHTHR */ (heth->Instance)->MACHTHR = (uint32_t)macinit.HashTableHigh; /* Write to ETHERNET MACHTLR */ (heth->Instance)->MACHTLR = (uint32_t)macinit.HashTableLow; /*----------------------- ETHERNET MACFCR Configuration -------------------*/ /* Get the ETHERNET MACFCR value */ tmpreg = (heth->Instance)->MACFCR; /* Clear xx bits */ tmpreg &= ETH_MACFCR_CLEAR_MASK; /* Set the PT bit according to ETH PauseTime value */ /* Set the DZPQ bit according to ETH ZeroQuantaPause value */ /* Set the PLT bit according to ETH PauseLowThreshold value */ /* Set the UP bit according to ETH UnicastPauseFrameDetect value */ /* Set the RFE bit according to ETH ReceiveFlowControl value */ /* Set the TFE bit according to ETH TransmitFlowControl value */ tmpreg |= (uint32_t)((macinit.PauseTime << 16) | macinit.ZeroQuantaPause | macinit.PauseLowThreshold | macinit.UnicastPauseFrameDetect | macinit.ReceiveFlowControl | macinit.TransmitFlowControl); /* Write to ETHERNET MACFCR */ (heth->Instance)->MACFCR = (uint32_t)tmpreg; /* Wait until the write operation will be taken into account: at least four TX_CLK/RX_CLK clock cycles */ tmpreg = (heth->Instance)->MACFCR; HAL_Delay(ETH_REG_WRITE_DELAY); (heth->Instance)->MACFCR = tmpreg; /*----------------------- ETHERNET MACVLANTR Configuration ----------------*/ /* Set the ETV bit according to ETH VLANTagComparison value */ /* Set the VL bit according to ETH VLANTagIdentifier value */ (heth->Instance)->MACVLANTR = (uint32_t)(macinit.VLANTagComparison | macinit.VLANTagIdentifier); /* Wait until the write operation will be taken into account: at least four TX_CLK/RX_CLK clock cycles */ tmpreg = (heth->Instance)->MACVLANTR; HAL_Delay(ETH_REG_WRITE_DELAY); (heth->Instance)->MACVLANTR = tmpreg; /* Ethernet DMA default initialization ************************************/ dmainit.DropTCPIPChecksumErrorFrame = ETH_DROPTCPIPCHECKSUMERRORFRAME_ENABLE; dmainit.ReceiveStoreForward = ETH_RECEIVESTOREFORWARD_ENABLE; dmainit.FlushReceivedFrame = ETH_FLUSHRECEIVEDFRAME_ENABLE; dmainit.TransmitStoreForward = ETH_TRANSMITSTOREFORWARD_ENABLE; dmainit.TransmitThresholdControl = ETH_TRANSMITTHRESHOLDCONTROL_64BYTES; dmainit.ForwardErrorFrames = ETH_FORWARDERRORFRAMES_DISABLE; dmainit.ForwardUndersizedGoodFrames = ETH_FORWARDUNDERSIZEDGOODFRAMES_DISABLE; dmainit.ReceiveThresholdControl = ETH_RECEIVEDTHRESHOLDCONTROL_64BYTES; dmainit.SecondFrameOperate = ETH_SECONDFRAMEOPERARTE_ENABLE; dmainit.AddressAlignedBeats = ETH_ADDRESSALIGNEDBEATS_ENABLE; dmainit.FixedBurst = ETH_FIXEDBURST_ENABLE; dmainit.RxDMABurstLength = ETH_RXDMABURSTLENGTH_32BEAT; dmainit.TxDMABurstLength = ETH_TXDMABURSTLENGTH_32BEAT; dmainit.EnhancedDescriptorFormat = ETH_DMAENHANCEDDESCRIPTOR_ENABLE; dmainit.DescriptorSkipLength = 0x0; dmainit.DMAArbitration = ETH_DMAARBITRATION_ROUNDROBIN_RXTX_1_1; /* Get the ETHERNET DMAOMR value */ tmpreg = (heth->Instance)->DMAOMR; /* Clear xx bits */ tmpreg &= ETH_DMAOMR_CLEAR_MASK; /* Set the DT bit according to ETH DropTCPIPChecksumErrorFrame value */ /* Set the RSF bit according to ETH ReceiveStoreForward value */ /* Set the DFF bit according to ETH FlushReceivedFrame value */ /* Set the TSF bit according to ETH TransmitStoreForward value */ /* Set the TTC bit according to ETH TransmitThresholdControl value */ /* Set the FEF bit according to ETH ForwardErrorFrames value */ /* Set the FUF bit according to ETH ForwardUndersizedGoodFrames value */ /* Set the RTC bit according to ETH ReceiveThresholdControl value */ /* Set the OSF bit according to ETH SecondFrameOperate value */ tmpreg |= (uint32_t)(dmainit.DropTCPIPChecksumErrorFrame | dmainit.ReceiveStoreForward | dmainit.FlushReceivedFrame | dmainit.TransmitStoreForward | dmainit.TransmitThresholdControl | dmainit.ForwardErrorFrames | dmainit.ForwardUndersizedGoodFrames | dmainit.ReceiveThresholdControl | dmainit.SecondFrameOperate); /* Write to ETHERNET DMAOMR */ (heth->Instance)->DMAOMR = (uint32_t)tmpreg; /* Wait until the write operation will be taken into account: at least four TX_CLK/RX_CLK clock cycles */ tmpreg = (heth->Instance)->DMAOMR; HAL_Delay(ETH_REG_WRITE_DELAY); (heth->Instance)->DMAOMR = tmpreg; /*----------------------- ETHERNET DMABMR Configuration ------------------*/ /* Set the AAL bit according to ETH AddressAlignedBeats value */ /* Set the FB bit according to ETH FixedBurst value */ /* Set the RPBL and 4*PBL bits according to ETH RxDMABurstLength value */ /* Set the PBL and 4*PBL bits according to ETH TxDMABurstLength value */ /* Set the Enhanced DMA descriptors bit according to ETH EnhancedDescriptorFormat value*/ /* Set the DSL bit according to ETH DesciptorSkipLength value */ /* Set the PR and DA bits according to ETH DMAArbitration value */ (heth->Instance)->DMABMR = (uint32_t)(dmainit.AddressAlignedBeats | dmainit.FixedBurst | dmainit.RxDMABurstLength | /* !! if 4xPBL is selected for Tx or Rx it is applied for the other */ dmainit.TxDMABurstLength | dmainit.EnhancedDescriptorFormat | (dmainit.DescriptorSkipLength << 2) | dmainit.DMAArbitration | ETH_DMABMR_USP); /* Enable use of separate PBL for Rx and Tx */ /* Wait until the write operation will be taken into account: at least four TX_CLK/RX_CLK clock cycles */ tmpreg = (heth->Instance)->DMABMR; HAL_Delay(ETH_REG_WRITE_DELAY); (heth->Instance)->DMABMR = tmpreg; if((heth->Init).RxMode == ETH_RXINTERRUPT_MODE) { /* Enable the Ethernet Rx Interrupt */ __HAL_ETH_DMA_ENABLE_IT((heth), ETH_DMA_IT_NIS | ETH_DMA_IT_R); } /* Initialize MAC address in ethernet MAC */ ETH_MACAddressConfig(heth, ETH_MAC_ADDRESS0, heth->Init.MACAddr); } /** * @brief Configures the selected MAC address. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @param MacAddr: The MAC address to configure * This parameter can be one of the following values: * @arg ETH_MAC_Address0: MAC Address0 * @arg ETH_MAC_Address1: MAC Address1 * @arg ETH_MAC_Address2: MAC Address2 * @arg ETH_MAC_Address3: MAC Address3 * @param Addr: Pointer to MAC address buffer data (6 bytes) * @retval HAL status */ static void ETH_MACAddressConfig(ETH_HandleTypeDef *heth, uint32_t MacAddr, uint8_t *Addr) { uint32_t tmpreg; /* Check the parameters */ assert_param(IS_ETH_MAC_ADDRESS0123(MacAddr)); /* Calculate the selected MAC address high register */ tmpreg = ((uint32_t)Addr[5] << 8) | (uint32_t)Addr[4]; /* Load the selected MAC address high register */ (*(__IO uint32_t *)((uint32_t)(ETH_MAC_ADDR_HBASE + MacAddr))) = tmpreg; /* Calculate the selected MAC address low register */ tmpreg = ((uint32_t)Addr[3] << 24) | ((uint32_t)Addr[2] << 16) | ((uint32_t)Addr[1] << 8) | Addr[0]; /* Load the selected MAC address low register */ (*(__IO uint32_t *)((uint32_t)(ETH_MAC_ADDR_LBASE + MacAddr))) = tmpreg; } /** * @brief Enables the MAC transmission. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ static void ETH_MACTransmissionEnable(ETH_HandleTypeDef *heth) { __IO uint32_t tmpreg = 0; /* Enable the MAC transmission */ (heth->Instance)->MACCR |= ETH_MACCR_TE; /* Wait until the write operation will be taken into account: at least four TX_CLK/RX_CLK clock cycles */ tmpreg = (heth->Instance)->MACCR; HAL_Delay(ETH_REG_WRITE_DELAY); (heth->Instance)->MACCR = tmpreg; } /** * @brief Disables the MAC transmission. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ static void ETH_MACTransmissionDisable(ETH_HandleTypeDef *heth) { __IO uint32_t tmpreg = 0; /* Disable the MAC transmission */ (heth->Instance)->MACCR &= ~ETH_MACCR_TE; /* Wait until the write operation will be taken into account: at least four TX_CLK/RX_CLK clock cycles */ tmpreg = (heth->Instance)->MACCR; HAL_Delay(ETH_REG_WRITE_DELAY); (heth->Instance)->MACCR = tmpreg; } /** * @brief Enables the MAC reception. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ static void ETH_MACReceptionEnable(ETH_HandleTypeDef *heth) { __IO uint32_t tmpreg = 0; /* Enable the MAC reception */ (heth->Instance)->MACCR |= ETH_MACCR_RE; /* Wait until the write operation will be taken into account: at least four TX_CLK/RX_CLK clock cycles */ tmpreg = (heth->Instance)->MACCR; HAL_Delay(ETH_REG_WRITE_DELAY); (heth->Instance)->MACCR = tmpreg; } /** * @brief Disables the MAC reception. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ static void ETH_MACReceptionDisable(ETH_HandleTypeDef *heth) { __IO uint32_t tmpreg = 0; /* Disable the MAC reception */ (heth->Instance)->MACCR &= ~ETH_MACCR_RE; /* Wait until the write operation will be taken into account: at least four TX_CLK/RX_CLK clock cycles */ tmpreg = (heth->Instance)->MACCR; HAL_Delay(ETH_REG_WRITE_DELAY); (heth->Instance)->MACCR = tmpreg; } /** * @brief Enables the DMA transmission. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ static void ETH_DMATransmissionEnable(ETH_HandleTypeDef *heth) { /* Enable the DMA transmission */ (heth->Instance)->DMAOMR |= ETH_DMAOMR_ST; } /** * @brief Disables the DMA transmission. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ static void ETH_DMATransmissionDisable(ETH_HandleTypeDef *heth) { /* Disable the DMA transmission */ (heth->Instance)->DMAOMR &= ~ETH_DMAOMR_ST; } /** * @brief Enables the DMA reception. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ static void ETH_DMAReceptionEnable(ETH_HandleTypeDef *heth) { /* Enable the DMA reception */ (heth->Instance)->DMAOMR |= ETH_DMAOMR_SR; } /** * @brief Disables the DMA reception. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ static void ETH_DMAReceptionDisable(ETH_HandleTypeDef *heth) { /* Disable the DMA reception */ (heth->Instance)->DMAOMR &= ~ETH_DMAOMR_SR; } /** * @brief Clears the ETHERNET transmit FIFO. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ static void ETH_FlushTransmitFIFO(ETH_HandleTypeDef *heth) { __IO uint32_t tmpreg = 0; /* Set the Flush Transmit FIFO bit */ (heth->Instance)->DMAOMR |= ETH_DMAOMR_FTF; /* Wait until the write operation will be taken into account: at least four TX_CLK/RX_CLK clock cycles */ tmpreg = (heth->Instance)->DMAOMR; HAL_Delay(ETH_REG_WRITE_DELAY); (heth->Instance)->DMAOMR = tmpreg; } /** * @} */ #endif /* HAL_ETH_MODULE_ENABLED */ /** * @} */ /** * @} */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
{ "pile_set_name": "Github" }
{ "description": "User Input", "basePath": "src/", "files": [ "!**/*.d.ts", "!**/*.js" ], "tags": ["input"] }
{ "pile_set_name": "Github" }
.. _extracting-text-from-figures: Extracting Text From Figures ---------------------------- PDFs are structured documents, and can contain Figures. By default, PDFMiner.six and hence py-pdf-parser does not extract text from figures. You can :download:`download an example here </example_files/figure.pdf>`. In the example, there is figure which contains a red square, and some text. Below the figure there is some more text. By default, the text in the figure will not be included: .. code-block:: python from py_pdf_parser import load_file document = load_file("figure.pdf") print([element.text() for element in document.elements]) which results in: :: ["Here is some text outside of an image"] To include the text inside the figure, we must pass the ``all_texts`` layout parameter. This is documented in the PDFMiner.six documentation, `here <https://pdfminersix.readthedocs.io/en/latest/reference/composable.html#laparams>`_. The layout parameters can be passed to both :meth:`~py_pdf_parser.loaders.load` and :meth:`~py-pdf-parser.loaders.load_file` as a dictionary to the ``la_params`` argument. In our case: .. code-block:: python from py_pdf_parser import load_file document = load_file("figure.pdf", la_params={"all_texts": True}) print([element.text() for element in document.elements]) which results in: :: ["This is some text in an image", "Here is some text outside of an image"]
{ "pile_set_name": "Github" }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Android.App; using Android.Content; using Android.OS; using Android.Runtime; using Android.Views; using Android.Widget; using GalaSoft.MvvmLight.Helpers; using MALClient.Android.Activities; using MALClient.Android.BindingConverters; using MALClient.Android.Flyouts; using MALClient.Android.Listeners; using MALClient.Android.Resources; using MALClient.Android.ViewModels; using MALClient.Models.Enums; using MALClient.XShared.Utils; using MALClient.XShared.ViewModels; namespace MALClient.Android.Fragments.SettingsFragments { public partial class SettingsCalendarFragment : MalFragmentBase { private SettingsViewModel ViewModel; protected override void Init(Bundle savedInstanceState) { ViewModel = AndroidViewModelLocator.Settings; } protected override void InitBindings() { Bindings.Add( this.SetBinding(() => ViewModel.CalendarIncludeWatching, () => SettingsPageCalendarBuildOptionsWatchingCheckBox.Checked, BindingMode.TwoWay)); Bindings.Add( this.SetBinding(() => ViewModel.CalendarIncludePlanned, () => SettingsPageCalendarBuildOptionsPlanToWatchCheckBox.Checked, BindingMode.TwoWay)); // SettingsPageCalendarStartPageRadioGroup.Check(Settings.CalendarStartOnToday ? SettingsPageCalendarStartPageRadioToday.Id : SettingsPageCalendarStartPageRadioSummary.Id); SettingsPageCalendarStartPageRadioGroup.SetOnCheckedChangeListener(new OnCheckedListener(i => { Settings.CalendarStartOnToday = i == SettingsPageCalendarStartPageRadioToday.Id; })); // Bindings.Add( this.SetBinding(() => ViewModel.CalendarSwitchMonSun, () => SettingsPageCalendarMiscFirstDaySwitch.Checked, BindingMode.TwoWay)); Bindings.Add( this.SetBinding(() => ViewModel.CalendarRemoveEmptyDays, () => SettingsPageCalendarMiscRemoveEmptyDaysSwitch.Checked, BindingMode.TwoWay)); //Bindings.Add( // this.SetBinding(() => ViewModel.CalendarPullExactAiringTime, // () => SettingsPageCalendarMiscExactAiringTimeSwitch.Checked, BindingMode.TwoWay)); } public override int LayoutResourceId => Resource.Layout.SettingsPageCalendar; } }
{ "pile_set_name": "Github" }
--- layout: default --- ## Centralized Logging Semantic Logger directly supports a centralized logging system consisting of: * Semantic Logger * Elasticsearch * Distributed, scalable, and highly available data store * Kibana * Analytics and search dashboard for Elasticsearch ### Installation For simplicity these installation notes use [homebrew](http://brew.sh) on Mac OSX. Following the product links for information on installing on other platforms. #### Elasticsearch Install [Elasticsearch](https://www.elastic.co/downloads/elasticsearch): ``` brew install elasticsearch ``` Follow the on-screen instructions to auto-start elasticsearch. #### Kibana Install [Kibana](https://www.elastic.co/downloads/kibana): ``` brew install kibana ``` Follow the on-screen instructions to auto-start kibana. #### Semantic Logger Configure the application to forward all log messages to Elasticsearch. Add the following code to a Rails initializer if running rails with the `rails_semantic_logger` gem, or add the code directly to your application: ~~~ruby SemanticLogger.add_appender( appender: :elasticsearch, url: 'http://localhost:9200' ) ~~~ Restart the application and let it run to generate several log messages. Check the text file for any errors. For example: `log/development.log` #### Configure Kibana Assuming Kibana was installed locally with its default port. Open a browser for Kibana [http://localhost:5601/](http://localhost:5601/). Add a new index pattern to view in Kibana: Select `Settings` -> `Indices` -> `Add New` Select checkbox `Index contains time-based events`. Enter Index name: `semantic_logger-*` Give Kibana a moment to scan the index, then select `Time-field name` and choose `timestamp`, then press the `Create` button. #### View logs in browser If not already open, open Kibana in the browser [http://localhost:5601/](http://localhost:5601/). Select `Discover`. The log entries generated by the application should now be displayed. If not, change the time interval on the top right of the screen. On the left under `Available Fields` add the following columns to the view: * host * level * name * message ### Example Searches Some example searches: Only show `error` level messages: ``` level: error ``` Only show messages from host `mymachine` ``` host: mymachine ``` Search logging tags for the string `17262353` ``` tags: 17262353 ``` ### Other solutions Semantic Logger also supports several other centralized logging solutions: * Logstash * Graylog * Splunk * Loggly * Syslog See [appenders](appenders.html) to configure appenders to forward log messages to the centralized logging solutions / log aggregrators. ### [Next: Programmers Guide ==>](api.html)
{ "pile_set_name": "Github" }
:107E000001C0B7C0112484B790E89093610010922C :107E10006100882361F0982F9A70923041F081FFC1 :107E200002C097EF94BF282E80E0C6D0E9C085E05D :107E30008093810082E08093C00088E18093C1003C :107E40008FEE8093C40086E08093C2008EE0B4D0B1 :107E5000259A84E02BE93BEF91E030938500209355 :107E6000840096BBB09BFECF1D9AA8954091C000A0 :107E700047FD02C0815089F793D0813479F490D0C6 :107E8000182FA0D0123811F480E004C088E0113817 :107E900009F083E07ED080E17CD0EECF823419F40B :107EA00084E198D0F8CF853411F485E0FACF853598 :107EB00041F476D0C82F74D0D82FCC0FDD1F82D0DC :107EC000EACF863519F484E085D0DECF843691F58B :107ED00067D066D0F82E64D0D82E00E011E05801AB :107EE0008FEFA81AB80A5CD0F80180838501FA10D8 :107EF000F6CF68D0F5E4DF1201C0FFCF50E040E0DC :107F000063E0CE0136D08E01E0E0F1E06F0182E067 :107F1000C80ED11C4081518161E0C8012AD00E5F9A :107F20001F4FF601FC10F2CF50E040E065E0CE01BB :107F300020D0B1CF843771F433D032D0F82E30D086 :107F400041D08E01F80185918F0123D0FA94F11070 :107F5000F9CFA1CF853739F435D08EE11AD085E934 :107F600018D086E197CF813509F0A9CF88E024D0D9 :107F7000A6CFFC010A0167BFE895112407B600FCF3 :107F8000FDCF667029F0452B19F481E187BFE89594 :107F900008959091C00095FFFCCF8093C60008958E :107FA0008091C00087FFFCCF8091C00084FD01C09C :107FB000A8958091C6000895E0E6F0E098E19083EE :107FC00080830895EDDF803219F088E0F5DFFFCF80 :107FD00084E1DFCFCF93C82FE3DFC150E9F7CF9122 :027FE000F1CFDF :027FFE00000879 :0400000300007E007B :00000001FF
{ "pile_set_name": "Github" }
This is an attempt to make the utilities specified in POSIX 1002.3 available, assuming /$objtype/ape/bin and /lib/rc/ape are bound to /bin before the regular bin directories. Here's a brief description of the status of these commands. EXECUTION ENVIRONMENT UTILITIES awk Plan 9 awk. system() uses rc instead of sh. basename POSIX conforming bc Plan 9 bc. cat Plan 9 cat. no -u option (for byte-at-at-time) cd shell builtins doesn't use $HOME or $CDPATH chgrp Plan 9 chgrp. no -R option (for recursive chgrp). only takes name, not number chmod Plan 9 chmod. no -R option (for recursive chmod). no s (setuid) and X (conditional x) perms. nonstandard a,l perms. chown Always prints 'Permission denied' and fails. cksum not implemented cmp Plan 9 cmp. nonstandard -L option no line number printed; hex instead of octal for bytes comm Plan 9 comm. command not implemented cp Plan 9 cp. no -R and -r (recursive), -i (interactive), -p (preserve) options nonstandard -z option cut not implemented date Plan 9 date. no format option nonstandard -n option dd Plan 9 dd. diff Plan 9 diff. can't have both files directories no -r (recursive) option -c<n> instead of -c and -C <n> for context dirname POSIX conforming echo Plan 9 echo ed Plan 9 ed nonstandard b,wq commands env not implemented expr V10 expr (seems to be like POSIX) false POSIX conforming find not implemented fold not implemented getconf not implemented getopts not implemented grep script calling Plan 9 grep -G s means q, should mean forget nonexistent files nonstandard 1,b,L,q options head not implemented id not implemented join not implemented kill V10 kill no -s signalname, no -l arg ln not implemented locale not implemented localedef not implemented logger not implemented logname not implemented lp Plan 9 lp ls Plan 9 ls mailx not implemented mkdir Plan 9 mkdir mkfifo not implemented mv Plan 9 mv nohup not implemented od not implemented paste not implemented pathchk not implemented pax implemented pr Plan 9 pr printf not implemented pwd Plan 9 pwd read shell builtin rm Plan 9 rm rmdir script no -p option sed v10 sed sh ksh93 -- POSIX compliant sleep Plan 9 sleep sort Plan 9 sort stty POSIX compliant (sort of) tail Plan 9 tail tee Plan 9 tee test Plan 9 test (POSIX compliant); copied as [ touch Plan 9 touch tr Plan 9 tr true POSIX compliant umask noop SOFTWARE DEVELOPMENT UTILITIES (OPTIONAL) ar script to call Plan9 ar, after arg conversion make V10 make strip not implemented C LANGUAGE DEVELOPMENT UTILITIES OPTION c89 script to APE environment cc (also avaiable as cc) lex Plan 9 lex yacc script to Plan 9 yacc General Bugs: The environment variables LANG, LC_ALL, LC_CTYPE, and LC_MESSAGES are ignored. The use of -- as an argument to stop option processing is generally not done. The many 'not implemented' functions will be implemented as scripts using them show up.
{ "pile_set_name": "Github" }
// <auto-generated /> using System; using Heavy.Web.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace Heavy.Web.Migrations { [DbContext(typeof(HeavyContext))] [Migration("20190101064807_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "2.2.0-rtm-35687") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("Heavy.Web.Models.Album", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<string>("Artist") .IsRequired() .HasMaxLength(100); b.Property<string>("CoverUrl") .IsRequired() .HasMaxLength(200); b.Property<decimal>("Price") .HasColumnType("decimal(6,2)"); b.Property<DateTime>("ReleaseDate") .HasColumnType("date"); b.Property<string>("Title") .IsRequired() .HasMaxLength(100); b.HasKey("Id"); b.ToTable("Albums"); }); #pragma warning restore 612, 618 } } }
{ "pile_set_name": "Github" }
class UserDrop < BaseDrop liquid_attributes << :login << :email end
{ "pile_set_name": "Github" }
//////////////////////////////////////////////////////////////////////////// // Module : editor_environment_suns_sun.cpp // Created : 13.12.2007 // Modified : 04.01.2008 // Author : Dmitriy Iassenev // Description : editor environment suns sun class //////////////////////////////////////////////////////////////////////////// #include "pch.hpp" #include "editor_environment_suns_sun.hpp" #include "Include/editor/ide.hpp" #include "editor_environment_manager.hpp" #include "ide.hpp" #include "editor_environment_detail.hpp" #include "editor_environment_suns_manager.hpp" using editor::environment::suns::sun; using editor::environment::suns::flare; using editor::environment::suns::manager; sun::sun(manager const& manager, shared_str const& id) : m_manager(manager), m_id(id), m_use(false), m_ignore_color(false), m_radius(0.f), m_shader(""), m_texture(""), m_property_holder(0) { } sun::~sun() { if (!Device.editor()) return; ::ide().destroy(m_property_holder); } void sun::load(CInifile& config) { m_use = config.read_if_exists<bool>(m_id, "sun", true); m_ignore_color = config.read_if_exists<bool>(m_id, "sun_ignore_color", false); m_radius = config.read_if_exists<float>(m_id, "sun_radius", .15f); m_shader = READ_IF_EXISTS(&config, r_string, m_id, "sun_shader", "effects" DELIMITER "sun"); m_texture = READ_IF_EXISTS(&config, r_string, m_id, "sun_texture", "fx" DELIMITER "fx_sun.tga"); } void sun::save(CInifile& config) { config.w_bool(m_id.c_str(), "sun", m_use); config.w_bool(m_id.c_str(), "sun_ignore_color", m_ignore_color); config.w_float(m_id.c_str(), "sun_radius", m_radius); config.w_string(m_id.c_str(), "sun_shader", m_shader.c_str()); config.w_string(m_id.c_str(), "sun_texture", m_texture.c_str()); } pcstr sun::id_getter() const { return (m_id.c_str()); } void sun::id_setter(pcstr value_) { shared_str value = value_; if (m_id._get() == value._get()) return; m_id = m_manager.unique_id(value); } void sun::fill(XRay::Editor::property_holder_collection* collection) { VERIFY(!m_property_holder); m_property_holder = ::ide().create_property_holder(m_id.c_str(), collection, this); XRay::Editor::property_holder_base* properties = m_property_holder; VERIFY(properties); typedef XRay::Editor::property_holder_base::string_getter_type string_getter_type; string_getter_type string_getter; string_getter.bind(this, &sun::id_getter); typedef XRay::Editor::property_holder_base::string_setter_type string_setter_type; string_setter_type string_setter; string_setter.bind(this, &sun::id_setter); properties->add_property( "id", "common", "this option is responsible for sun identifier", m_id.c_str(), string_getter, string_setter); properties->add_property("use", "sun", "this option is responsible for sun usage", m_use, m_use); properties->add_property( "ignore color", "sun", "this option is responsible for sun ignore color", m_ignore_color, m_ignore_color); properties->add_property("radius", "sun", "this option is responsible for sun radius", m_radius, m_radius); properties->add_property("shader", "sun", "this option is responsible for sun shader", m_shader.c_str(), m_shader, &*m_manager.m_environment.shader_ids().begin(), m_manager.m_environment.shader_ids().size(), XRay::Editor::property_holder_base::value_editor_tree_view, XRay::Editor::property_holder_base::cannot_enter_text); properties->add_property("texture", "sun", "this option is responsible for sun texture", m_texture.c_str(), m_texture, ".dds", "Texture files (*.dds)|*.dds", detail::real_path("$game_textures$", "").c_str(), "Select texture...", XRay::Editor::property_holder_base::cannot_enter_text, XRay::Editor::property_holder_base::remove_extension); } XRay::Editor::property_holder_base* sun::object() { return (m_property_holder); }
{ "pile_set_name": "Github" }
# Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at https://discordapp.com/invite/faud6Fx. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html [homepage]: https://www.contributor-covenant.org For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq
{ "pile_set_name": "Github" }
// (C) Copyright Eric Friedman 2002-2003. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org for most recent version including documentation. #ifndef BOOST_VARIANT_DETAIL_HAS_TRIVIAL_MOVE_HPP_INCLUDED #define BOOST_VARIANT_DETAIL_HAS_TRIVIAL_MOVE_HPP_INCLUDED #include "boost/config.hpp" // for STATIC_CONSTANT #include "boost/type_traits/has_trivial_copy.hpp" #include "boost/type_traits/has_trivial_assign.hpp" #include "boost/mpl/and.hpp" #include "boost/mpl/or.hpp" // should be the last #include #include "boost/variant/detail/bool_trait_def.hpp" namespace boost { namespace detail { namespace variant { // TRAIT: has_trivial_move template <typename T> struct has_trivial_move_impl { BOOST_STATIC_CONSTANT( bool, value = ( ::boost::mpl::and_< has_trivial_copy<T> , has_trivial_assign<T> >::type::value ) ); }; BOOST_VARIANT_TT_AUX_BOOL_TRAIT_DEF1( has_trivial_move , T , (::boost::detail::variant::has_trivial_move_impl<T>::value) ) // TRAIT: has_trivial_move_constructor template <typename T> struct has_trivial_move_constructor_impl { BOOST_STATIC_CONSTANT( bool, value = ( ::boost::mpl::or_< has_trivial_move<T> , has_trivial_copy<T> >::type::value ) ); }; BOOST_VARIANT_TT_AUX_BOOL_TRAIT_DEF1( has_trivial_move_constructor , T , (::boost::detail::variant::has_trivial_move_constructor_impl<T>::value) ) // TRAIT: has_trivial_move_assign template <typename T> struct has_trivial_move_assign_impl { BOOST_STATIC_CONSTANT( bool, value = ( ::boost::mpl::or_< has_trivial_move<T> , has_trivial_assign<T> >::type::value ) ); }; BOOST_VARIANT_TT_AUX_BOOL_TRAIT_DEF1( has_trivial_move_assign , T , (::boost::detail::variant::has_trivial_move_assign_impl<T>::value) ) }} // namespace detail::variant BOOST_VARIANT_TT_AUX_TRAIT_SUFFIX(1,::boost::detail::variant::has_trivial_move) BOOST_VARIANT_TT_AUX_TRAIT_SUFFIX(1,::boost::detail::variant::has_trivial_move_constructor) BOOST_VARIANT_TT_AUX_TRAIT_SUFFIX(1,::boost::detail::variant::has_trivial_move_assign) } // namespace boost #include "boost/variant/detail/bool_trait_undef.hpp" #endif // BOOST_VARIANT_DETAIL_HAS_TRIVIAL_MOVE_HPP_INCLUDED
{ "pile_set_name": "Github" }
/* rnaGene.c was originally generated by the autoSql program, which also * generated rnaGene.h and rnaGene.sql. This module links the database and the RAM * representation of objects. */ /* Copyright (C) 2014 The Regents of the University of California * See README in this or parent directory for licensing information. */ #include "common.h" #include "jksql.h" #include "rnaGene.h" void rnaGeneStaticLoad(char **row, struct rnaGene *ret) /* Load a row from rnaGene table into ret. The contents of ret will * be replaced at the next call to this function. */ { ret->chrom = row[0]; ret->chromStart = sqlUnsigned(row[1]); ret->chromEnd = sqlUnsigned(row[2]); ret->name = row[3]; ret->score = sqlUnsigned(row[4]); strcpy(ret->strand, row[5]); ret->source = row[6]; ret->type = row[7]; ret->fullScore = atof(row[8]); ret->isPsuedo = sqlUnsigned(row[9]); } struct rnaGene *rnaGeneLoad(char **row) /* Load a rnaGene from row fetched with select * from rnaGene * from database. Dispose of this with rnaGeneFree(). */ { struct rnaGene *ret; AllocVar(ret); ret->chrom = cloneString(row[0]); ret->chromStart = sqlUnsigned(row[1]); ret->chromEnd = sqlUnsigned(row[2]); ret->name = cloneString(row[3]); ret->score = sqlUnsigned(row[4]); strcpy(ret->strand, row[5]); ret->source = cloneString(row[6]); ret->type = cloneString(row[7]); ret->fullScore = atof(row[8]); ret->isPsuedo = sqlUnsigned(row[9]); return ret; } struct rnaGene *rnaGeneCommaIn(char **pS, struct rnaGene *ret) /* Create a rnaGene out of a comma separated string. * This will fill in ret if non-null, otherwise will * return a new rnaGene */ { char *s = *pS; if (ret == NULL) AllocVar(ret); ret->chrom = sqlStringComma(&s); ret->chromStart = sqlUnsignedComma(&s); ret->chromEnd = sqlUnsignedComma(&s); ret->name = sqlStringComma(&s); ret->score = sqlUnsignedComma(&s); sqlFixedStringComma(&s, ret->strand, sizeof(ret->strand)); ret->source = sqlStringComma(&s); ret->type = sqlStringComma(&s); ret->fullScore = sqlSignedComma(&s); ret->isPsuedo = sqlUnsignedComma(&s); *pS = s; return ret; } void rnaGeneFree(struct rnaGene **pEl) /* Free a single dynamically allocated rnaGene such as created * with rnaGeneLoad(). */ { struct rnaGene *el; if ((el = *pEl) == NULL) return; freeMem(el->chrom); freeMem(el->name); freeMem(el->source); freeMem(el->type); freez(pEl); } void rnaGeneFreeList(struct rnaGene **pList) /* Free a list of dynamically allocated rnaGene's */ { struct rnaGene *el, *next; for (el = *pList; el != NULL; el = next) { next = el->next; rnaGeneFree(&el); } *pList = NULL; } void rnaGeneOutput(struct rnaGene *el, FILE *f, char sep, char lastSep) /* Print out rnaGene. Separate fields with sep. Follow last field with lastSep. */ { if (sep == ',') fputc('"',f); fprintf(f, "%s", el->chrom); if (sep == ',') fputc('"',f); fputc(sep,f); fprintf(f, "%u", el->chromStart); fputc(sep,f); fprintf(f, "%u", el->chromEnd); fputc(sep,f); if (sep == ',') fputc('"',f); fprintf(f, "%s", el->name); if (sep == ',') fputc('"',f); fputc(sep,f); fprintf(f, "%u", el->score); fputc(sep,f); if (sep == ',') fputc('"',f); fprintf(f, "%s", el->strand); if (sep == ',') fputc('"',f); fputc(sep,f); if (sep == ',') fputc('"',f); fprintf(f, "%s", el->source); if (sep == ',') fputc('"',f); fputc(sep,f); if (sep == ',') fputc('"',f); fprintf(f, "%s", el->type); if (sep == ',') fputc('"',f); fputc(sep,f); fprintf(f, "%f", el->fullScore); fputc(sep,f); fprintf(f, "%u", el->isPsuedo); fputc(lastSep,f); }
{ "pile_set_name": "Github" }
/* * Copyright (c) 2009 Wind River Systems, Inc. * Tom Rix <Tom.Rix@windriver.com> * * SPDX-License-Identifier: GPL-2.0+ */ /* Define MUSB_DEBUG before including this file to get debug macros */ #ifdef MUSB_DEBUG #define MUSB_FLAGS_PRINT(v, x, y) \ if (((v) & MUSB_##x##_##y)) \ serial_printf("\t\t"#y"\n") static inline void musb_print_pwr(u8 b) { serial_printf("\tpower 0x%2.2x\n", b); MUSB_FLAGS_PRINT(b, POWER, ISOUPDATE); MUSB_FLAGS_PRINT(b, POWER, SOFTCONN); MUSB_FLAGS_PRINT(b, POWER, HSENAB); MUSB_FLAGS_PRINT(b, POWER, HSMODE); MUSB_FLAGS_PRINT(b, POWER, RESET); MUSB_FLAGS_PRINT(b, POWER, RESUME); MUSB_FLAGS_PRINT(b, POWER, SUSPENDM); MUSB_FLAGS_PRINT(b, POWER, ENSUSPEND); } static inline void musb_print_csr0(u16 w) { serial_printf("\tcsr0 0x%4.4x\n", w); MUSB_FLAGS_PRINT(w, CSR0, FLUSHFIFO); MUSB_FLAGS_PRINT(w, CSR0_P, SVDSETUPEND); MUSB_FLAGS_PRINT(w, CSR0_P, SVDRXPKTRDY); MUSB_FLAGS_PRINT(w, CSR0_P, SENDSTALL); MUSB_FLAGS_PRINT(w, CSR0_P, SETUPEND); MUSB_FLAGS_PRINT(w, CSR0_P, DATAEND); MUSB_FLAGS_PRINT(w, CSR0_P, SENTSTALL); MUSB_FLAGS_PRINT(w, CSR0, TXPKTRDY); MUSB_FLAGS_PRINT(w, CSR0, RXPKTRDY); } static inline void musb_print_intrusb(u8 b) { serial_printf("\tintrusb 0x%2.2x\n", b); MUSB_FLAGS_PRINT(b, INTR, VBUSERROR); MUSB_FLAGS_PRINT(b, INTR, SESSREQ); MUSB_FLAGS_PRINT(b, INTR, DISCONNECT); MUSB_FLAGS_PRINT(b, INTR, CONNECT); MUSB_FLAGS_PRINT(b, INTR, SOF); MUSB_FLAGS_PRINT(b, INTR, RESUME); MUSB_FLAGS_PRINT(b, INTR, SUSPEND); if (b & MUSB_INTR_BABBLE) serial_printf("\t\tMUSB_INTR_RESET or MUSB_INTR_BABBLE\n"); } static inline void musb_print_intrtx(u16 w) { serial_printf("\tintrtx 0x%4.4x\n", w); } static inline void musb_print_intrrx(u16 w) { serial_printf("\tintrx 0x%4.4x\n", w); } static inline void musb_print_devctl(u8 b) { serial_printf("\tdevctl 0x%2.2x\n", b); if (b & MUSB_DEVCTL_BDEVICE) serial_printf("\t\tB device\n"); else serial_printf("\t\tA device\n"); if (b & MUSB_DEVCTL_FSDEV) serial_printf("\t\tFast Device -(host mode)\n"); if (b & MUSB_DEVCTL_LSDEV) serial_printf("\t\tSlow Device -(host mode)\n"); if (b & MUSB_DEVCTL_HM) serial_printf("\t\tHost mode\n"); else serial_printf("\t\tPeripherial mode\n"); if (b & MUSB_DEVCTL_HR) serial_printf("\t\tHost request started(B device)\n"); else serial_printf("\t\tHost request finished(B device)\n"); if (b & MUSB_DEVCTL_BDEVICE) { if (b & MUSB_DEVCTL_SESSION) serial_printf("\t\tStart of session(B device)\n"); else serial_printf("\t\tEnd of session(B device)\n"); } else { if (b & MUSB_DEVCTL_SESSION) serial_printf("\t\tStart of session(A device)\n"); else serial_printf("\t\tEnd of session(A device)\n"); } } static inline void musb_print_config(u8 b) { serial_printf("\tconfig 0x%2.2x\n", b); if (b & MUSB_CONFIGDATA_MPRXE) serial_printf("\t\tAuto combine rx bulk packets\n"); if (b & MUSB_CONFIGDATA_MPTXE) serial_printf("\t\tAuto split tx bulk packets\n"); if (b & MUSB_CONFIGDATA_BIGENDIAN) serial_printf("\t\tBig Endian ordering\n"); else serial_printf("\t\tLittle Endian ordering\n"); if (b & MUSB_CONFIGDATA_HBRXE) serial_printf("\t\tHigh speed rx iso endpoint\n"); if (b & MUSB_CONFIGDATA_HBTXE) serial_printf("\t\tHigh speed tx iso endpoint\n"); if (b & MUSB_CONFIGDATA_DYNFIFO) serial_printf("\t\tDynamic fifo sizing\n"); if (b & MUSB_CONFIGDATA_SOFTCONE) serial_printf("\t\tSoft Connect\n"); if (b & MUSB_CONFIGDATA_UTMIDW) serial_printf("\t\t16 bit data width\n"); else serial_printf("\t\t8 bit data width\n"); } static inline void musb_print_rxmaxp(u16 w) { serial_printf("\trxmaxp 0x%4.4x\n", w); } static inline void musb_print_rxcsr(u16 w) { serial_printf("\trxcsr 0x%4.4x\n", w); MUSB_FLAGS_PRINT(w, RXCSR, AUTOCLEAR); MUSB_FLAGS_PRINT(w, RXCSR, DMAENAB); MUSB_FLAGS_PRINT(w, RXCSR, DISNYET); MUSB_FLAGS_PRINT(w, RXCSR, PID_ERR); MUSB_FLAGS_PRINT(w, RXCSR, DMAMODE); MUSB_FLAGS_PRINT(w, RXCSR, CLRDATATOG); MUSB_FLAGS_PRINT(w, RXCSR, FLUSHFIFO); MUSB_FLAGS_PRINT(w, RXCSR, DATAERROR); MUSB_FLAGS_PRINT(w, RXCSR, FIFOFULL); MUSB_FLAGS_PRINT(w, RXCSR, RXPKTRDY); MUSB_FLAGS_PRINT(w, RXCSR_P, SENTSTALL); MUSB_FLAGS_PRINT(w, RXCSR_P, SENDSTALL); MUSB_FLAGS_PRINT(w, RXCSR_P, OVERRUN); if (w & MUSB_RXCSR_P_ISO) serial_printf("\t\tiso mode\n"); else serial_printf("\t\tbulk mode\n"); } static inline void musb_print_txmaxp(u16 w) { serial_printf("\ttxmaxp 0x%4.4x\n", w); } static inline void musb_print_txcsr(u16 w) { serial_printf("\ttxcsr 0x%4.4x\n", w); MUSB_FLAGS_PRINT(w, TXCSR, TXPKTRDY); MUSB_FLAGS_PRINT(w, TXCSR, FIFONOTEMPTY); MUSB_FLAGS_PRINT(w, TXCSR, FLUSHFIFO); MUSB_FLAGS_PRINT(w, TXCSR, CLRDATATOG); MUSB_FLAGS_PRINT(w, TXCSR_P, UNDERRUN); MUSB_FLAGS_PRINT(w, TXCSR_P, SENTSTALL); MUSB_FLAGS_PRINT(w, TXCSR_P, SENDSTALL); if (w & MUSB_TXCSR_MODE) serial_printf("\t\tTX mode\n"); else serial_printf("\t\tRX mode\n"); } #else /* stubs */ #define musb_print_pwr(b) #define musb_print_csr0(w) #define musb_print_intrusb(b) #define musb_print_intrtx(w) #define musb_print_intrrx(w) #define musb_print_devctl(b) #define musb_print_config(b) #define musb_print_rxmaxp(w) #define musb_print_rxcsr(w) #define musb_print_txmaxp(w) #define musb_print_txcsr(w) #endif /* MUSB_DEBUG */
{ "pile_set_name": "Github" }
// // SCWebSocketDefines.h // SocketCraft // // Created by yangxiao on 2017/2/21. // Copyright © 2017年 Alipay. All rights reserved. // #ifndef SCWebSocketDefines_h #define SCWebSocketDefines_h #define DEFAULT_TIMEOUT_MILLSECOND 30000 #define DISPATCH_QUEUE_NAME "com.portal.websocket" @class SCWebSocketHandler; @protocol SCWebSocketLogDelegate,SCWebSocketStorageDelegate; extern id<SCWebSocketStorageDelegate> scWebSocketStorage; typedef void (^openWebSocketCompetionHandler)(NSString* appid, NSString *socketTaskID, NSError* error); typedef void (^sendWebSocketMessageCompletionHandler)(NSString* appid, NSString *socketTaskID, NSError* error); typedef void (^connectSCWebSocketCompletionHandler)(NSString* appid, NSString *socketTaskID,NSError* error); typedef void (^sendSCWebSocketMessageCompletionHandler)(NSString* appid, NSString *socketTaskID,NSError* error); typedef void (^callBackOnSCWebSocketOpen)(NSString* appid, NSString *socketTaskID); typedef void (^callBackOnSCWebSocketRecieveMessage)(NSString* appid, NSString *socketTaskID,id data); typedef void (^callBackOnSCWebSocketError)(NSString* appid, NSString *socketTaskID,NSError* error); typedef void (^callBackOnSCWebSocketClose)(NSString* appid, NSString *socketTaskID,NSString* reason); typedef NS_ENUM(NSInteger,SCWebSocketErrorCode) { SCErrorCodeSendUnopen = -10001, SCErrorCodeMsgNotStringOrData = -10002, SCErrorCodeMsgSendToNoSocket = -10003, }; #define SC_DOMAIN @"scWebSocket" #define SC_ERROR(errorcode) [[NSError alloc] initWithDomain:SC_DOMAIN code:errorcode userInfo:nil] #endif /* SCWebSocketDefines_h */
{ "pile_set_name": "Github" }
/* Copyright The containerd Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package sys import ( "unsafe" "golang.org/x/sys/unix" ) // If arg2 is nonzero, set the "child subreaper" attribute of the // calling process; if arg2 is zero, unset the attribute. When a // process is marked as a child subreaper, all of the children // that it creates, and their descendants, will be marked as // having a subreaper. In effect, a subreaper fulfills the role // of init(1) for its descendant processes. Upon termination of // a process that is orphaned (i.e., its immediate parent has // already terminated) and marked as having a subreaper, the // nearest still living ancestor subreaper will receive a SIGCHLD // signal and be able to wait(2) on the process to discover its // termination status. const setChildSubreaper = 36 // SetSubreaper sets the value i as the subreaper setting for the calling process func SetSubreaper(i int) error { return unix.Prctl(setChildSubreaper, uintptr(i), 0, 0, 0) } // GetSubreaper returns the subreaper setting for the calling process func GetSubreaper() (int, error) { var i uintptr if err := unix.Prctl(unix.PR_GET_CHILD_SUBREAPER, uintptr(unsafe.Pointer(&i)), 0, 0, 0); err != nil { return -1, err } return int(i), nil }
{ "pile_set_name": "Github" }
/-- These DFA tests are for the handling of characters greater than 255 in 16- or 32-bit, non-UTF mode. --/ /^\x{ffff}+/i \x{ffff} 0: \x{ffff} /^\x{ffff}?/i \x{ffff} 0: \x{ffff} /^\x{ffff}*/i \x{ffff} 0: \x{ffff} /^\x{ffff}{3}/i \x{ffff}\x{ffff}\x{ffff} 0: \x{ffff}\x{ffff}\x{ffff} /^\x{ffff}{0,3}/i \x{ffff} 0: \x{ffff} /-- End of testinput20 --/
{ "pile_set_name": "Github" }
/* * Copyright (C) 2013-2015 RoboVM AB * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.robovm.apple.foundation; /*<imports>*/ import java.io.*; import java.nio.*; import java.util.*; import org.robovm.objc.*; import org.robovm.objc.annotation.*; import org.robovm.objc.block.*; import org.robovm.rt.*; import org.robovm.rt.annotation.*; import org.robovm.rt.bro.*; import org.robovm.rt.bro.annotation.*; import org.robovm.rt.bro.ptr.*; import org.robovm.apple.corefoundation.*; import org.robovm.apple.uikit.*; import org.robovm.apple.coretext.*; import org.robovm.apple.coreanimation.*; import org.robovm.apple.coredata.*; import org.robovm.apple.coregraphics.*; import org.robovm.apple.coremedia.*; import org.robovm.apple.security.*; import org.robovm.apple.dispatch.*; /*</imports>*/ /*<javadoc>*/ /** * @since Available in iOS 10.0 and later. */ /*</javadoc>*/ /*<annotations>*/@Library("Foundation") @NativeClass/*</annotations>*/ /*<visibility>*/public/*</visibility>*/ class /*<name>*/NSUnitDuration/*</name>*/ extends /*<extends>*/NSDimension/*</extends>*/ /*<implements>*/implements NSSecureCoding/*</implements>*/ { /*<ptr>*/public static class NSUnitDurationPtr extends Ptr<NSUnitDuration, NSUnitDurationPtr> {}/*</ptr>*/ /*<bind>*/static { ObjCRuntime.bind(NSUnitDuration.class); }/*</bind>*/ /*<constants>*//*</constants>*/ /*<constructors>*/ protected NSUnitDuration() {} protected NSUnitDuration(Handle h, long handle) { super(h, handle); } protected NSUnitDuration(SkipInit skipInit) { super(skipInit); } @Method(selector = "initWithSymbol:converter:") public NSUnitDuration(String symbol, NSUnitConverter converter) { super(symbol, converter); } @Method(selector = "initWithSymbol:") public NSUnitDuration(String symbol) { super(symbol); } /*</constructors>*/ /*<properties>*/ @Property(selector = "hours") public static native NSUnitDuration getHours(); @Property(selector = "minutes") public static native NSUnitDuration getMinutes(); @Property(selector = "seconds") public static native NSUnitDuration getSeconds(); /** * @since Available in iOS 13.0 and later. */ @Property(selector = "milliseconds") public static native NSUnitDuration getMilliseconds(); /** * @since Available in iOS 13.0 and later. */ @Property(selector = "microseconds") public static native NSUnitDuration getMicroseconds(); /** * @since Available in iOS 13.0 and later. */ @Property(selector = "nanoseconds") public static native NSUnitDuration getNanoseconds(); /** * @since Available in iOS 13.0 and later. */ @Property(selector = "picoseconds") public static native NSUnitDuration getPicoseconds(); /*</properties>*/ /*<members>*//*</members>*/ /*<methods>*/ /*</methods>*/ }
{ "pile_set_name": "Github" }
rule k3e9_15e119925ee311b2 { meta: copyright="Copyright (c) 2014-2018 Support Intelligence Inc, All Rights Reserved." engine="saphire/1.3.1 divinorum/0.998 icewater/0.4" viz_url="http://icewater.io/en/cluster/query?h64=k3e9.15e119925ee311b2" cluster="k3e9.15e119925ee311b2" cluster_size="18" filetype = "application/x-dosexec" tlp = "amber" version = "icewater snowflake" author = "Rick Wesson (@wessorh) rick@support-intelligence.com" date = "20171122" license = "RIL-1.0 [Rick's Internet License] " family="virut virtob virux" md5_hashes="['a36356291ba497d79727fa54c68de875','a4d37818b39ee607b4e901a7fc0a721d','f989f7e7f2e7d23a2cb9a3ed2222225b']" strings: $hex_string = { 8082ccc87777777800867c687044447800867f7870ccc4780087f7b8b0bcc478008fffc8bb0000780087f7bbfbb7777800087f22bb8888880008f76bb2b22220 } condition: filesize > 16384 and filesize < 65536 and $hex_string }
{ "pile_set_name": "Github" }
'use strict'; var isRelative = require('is-relative'); var isWindows = require('is-windows'); /** * Expose `isAbsolute` */ module.exports = isAbsolute; /** * Returns true if a file path is absolute. * * @param {String} `fp` * @return {Boolean} */ function isAbsolute(fp) { if (typeof fp !== 'string') { throw new TypeError('isAbsolute expects a string.'); } return isWindows() ? isAbsolute.win32(fp) : isAbsolute.posix(fp); } /** * Test posix paths. */ isAbsolute.posix = function posixPath(fp) { return fp.charAt(0) === '/'; }; /** * Test windows paths. */ isAbsolute.win32 = function win32(fp) { if (/[a-z]/i.test(fp.charAt(0)) && fp.charAt(1) === ':' && fp.charAt(2) === '\\') { return true; } // Microsoft Azure absolute filepath if (fp.slice(0, 2) === '\\\\') { return true; } return !isRelative(fp); };
{ "pile_set_name": "Github" }
<html> <head> <title>libogg - Decoding</title> <link rel=stylesheet href="style.css" type="text/css"> </head> <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff"> <table border=0 width=100%> <tr> <td><p class=tiny>libogg documentation</p></td> <td align=right><p class=tiny>libogg release 1.3.1 - 20130512</p></td> </tr> </table> <h1>Decoding</h1> <p>Libogg contains a set of functions used in the decoding process. <p> All the <b>libogg</b> specific functions are declared in "ogg/ogg.h". <p> <p>Decoding is based around the ogg synchronization layer. The <a href="ogg_sync_state.html">ogg_sync_state</a> struct coordinates between incoming data and the decoder. We read data into the synchronization layer, submit the data to the stream, and output raw packets to the decoder. <p>Decoding through the Ogg layer follows a specific logical sequence. A read loop follows these logical steps: <ul> <li>Expose a buffer using <a href="ogg_sync_buffer.html">ogg_sync_buffer()</a>. <li>Read data into the buffer, using fread() or a similar function. <li>Call <a href="ogg_sync_wrote.html">ogg_sync_wrote()</a> to tell the synchronization layer how many bytes you wrote into the buffer. <li>Write out the data using <a href="ogg_sync_pageout.html">ogg_sync_pageout</a>. <li>Submit the completed page to the streaming layer with <a href="ogg_stream_pagein.html">ogg_stream_pagein</a>. <li>Output a packet of data to the codec-specific decoding layer using <a href="ogg_stream_packetout.html">ogg_stream_packetout</a>. </ul> <p>In practice, streams are more complex, and Ogg also must handle headers, incomplete or dropped pages, and other errors in input. <br><br> <table border=1 color=black width=50% cellspacing=0 cellpadding=7> <tr bgcolor=#cccccc> <td><b>function</b></td> <td><b>purpose</b></td> </tr> <tr valign=top> <td><a href="ogg_sync_init.html">ogg_sync_init</a></td> <td>Initializes an Ogg bitstream.</td> </tr> <tr valign=top> <td><a href="ogg_sync_clear.html">ogg_sync_clear</a></td> <td>Clears the status information from the synchronization struct.<td> </tr> <tr valign=top> <td><a href="ogg_sync_reset.html">ogg_sync_reset</a></td> <td>Resets the synchronization status to initial values.</td> </tr> <tr valign=top> <td><a href="ogg_sync_destroy.html">ogg_sync_destroy</a></td> <td>Frees the synchronization struct.</td> </tr> <tr valign=top> <td><a href="ogg_sync_check.html">ogg_sync_check</a></td> <td>Check for asynchronous errors.</td> </tr> <tr valign=top> <td><a href="ogg_sync_buffer.html">ogg_sync_buffer</a></td> <td>Exposes a buffer from the synchronization layer in order to read data.</td> </tr> <tr valign=top> <td><a href="ogg_sync_wrote.html">ogg_sync_wrote</a></td> <td>Tells the synchronization layer how many bytes were written into the buffer.</td> </tr> <tr valign=top> <td><a href="ogg_sync_pageseek.html">ogg_sync_pageseek</a></td> <td>Finds the borders of pages and resynchronizes the stream.</td> </tr> <tr valign=top> <td><a href="ogg_sync_pageout.html">ogg_sync_pageout</a></td> <td>Outputs a page from the synchronization layer.</td> </tr> <tr valign=top> <td><a href="ogg_stream_pagein.html">ogg_stream_pagein</a></td> <td>Submits a complete page to the stream layer.</td> </tr> <tr valign=top> <td><a href="ogg_stream_packetout.html">ogg_stream_packetout</a></td> <td>Outputs a packet to the codec-specific decoding engine.</td> </tr> <tr valign=top> <td><a href="ogg_stream_packetpeek.html">ogg_stream_packetpeek</a></td> <td>Provides access to the next packet in the bitstream without advancing decoding.</td> </tr> </table> <br><br> <hr noshade> <table border=0 width=100%> <tr valign=top> <td><p class=tiny>copyright &copy; 2000-2013 Xiph.Org</p></td> <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td> </tr><tr> <td><p class=tiny>libogg documentation</p></td> <td align=right><p class=tiny>libogg release 1.3.1 - 20130512</p></td> </tr> </table> </body> </html>
{ "pile_set_name": "Github" }
/* * ATLauncher - https://github.com/ATLauncher/ATLauncher * Copyright (C) 2013-2020 ATLauncher * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.atlauncher.evnt.manager; import java.util.LinkedList; import java.util.List; import javax.swing.SwingUtilities; import com.atlauncher.evnt.listener.RelocalizationListener; public final class RelocalizationManager { private static final List<RelocalizationListener> listeners = new LinkedList<>(); public static synchronized void addListener(RelocalizationListener listener) { listeners.add(listener); } public static synchronized void removeListener(RelocalizationListener listener) { listeners.remove(listener); } public static synchronized void post() { SwingUtilities.invokeLater(() -> { for (RelocalizationListener listener : listeners) { listener.onRelocalization(); } }); } }
{ "pile_set_name": "Github" }
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // #import <UIKit/UIImageView.h> @class UILabel; @interface FailureBarView : UIImageView { UILabel *_titleLabel; } - (void).cxx_destruct; - (void)setFailureCount:(long long)arg1; - (id)initWithFrame:(struct CGRect)arg1; @end
{ "pile_set_name": "Github" }
# Contributing Prometheus uses GitHub to manage reviews of pull requests. * If you have a trivial fix or improvement, go ahead and create a pull request, addressing (with `@...`) the maintainer of this repository (see [MAINTAINERS.md](MAINTAINERS.md)) in the description of the pull request. * If you plan to do something more involved, first discuss your ideas on our [mailing list](https://groups.google.com/forum/?fromgroups#!forum/prometheus-developers). This will avoid unnecessary work and surely give you and us a good deal of inspiration. * Relevant coding style guidelines are the [Go Code Review Comments](https://code.google.com/p/go-wiki/wiki/CodeReviewComments) and the _Formatting and style_ section of Peter Bourgon's [Go: Best Practices for Production Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style).
{ "pile_set_name": "Github" }
{ "cells": [ { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import scipy.io as scio\n", "import matplotlib.pyplot as plt\n", "from matplotlib.lines import Line2D\n", "import pylab\n", "%matplotlib inline\n", "pylab.rcParams['figure.figsize']=(15,10) # 设置图表的大小" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "data数据类型为:<class 'dict'>,\n", "data中包含的键为:dict_keys(['xtrain', '__globals__', 'xtest', 'vocab', 'ytest', '__header__', 'ytrain', '__version__'])\n" ] } ], "source": [ "# 载入数据集,并查看数据集基本信息\n", "matfilepath='XwindowsDocData.mat'\n", "data=scio.loadmat(matfilepath)\n", "print('data数据类型为:{0},\\ndata中包含的键为:{1}'.format(type(data),data.keys()))" ] }, { "cell_type": "code", "execution_count": 272, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "X的数据类型为:<class 'scipy.sparse.csc.csc_matrix'>,\n", "X的形状为:(100, 16242)\n" ] } ], "source": [ "# 查看文本的基本信息,X的形状为(100,16242),其中100为单词数量,16242为文本数量\n", "X = data['documents']\n", "print('X的数据类型为:{0},\\nX的形状为:{1}'.format(type(X),X.shape))" ] }, { "cell_type": "code", "execution_count": 273, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(16242, 100) <class 'scipy.sparse.csr.csr_matrix'>\n" ] } ], "source": [ "# 对X进行转置,形成(16242,100)的矩阵\n", "X = X.T # 对X进行转置\n", "print(X.shape,type(X))" ] }, { "cell_type": "code", "execution_count": 274, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "所有文本对应的标签向量y类型为:<class 'numpy.ndarray'>,形状为:(1, 16242)\n", "<class 'numpy.ndarray'> (1, 4)\n" ] } ], "source": [ "# 查看所有文本对应的标签向量y\n", "y = data['newsgroups']\n", "print('所有文本对应的标签向量y类型为:{0},形状为:{1}'.format(type(y),y.shape))\n", "# 查看所有文本中具有的类的数量\n", "classlabels = data['groupnames']\n", "print(type(classlabels),classlabels.shape)" ] }, { "cell_type": "code", "execution_count": 275, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(16242, 1) \n", " [[5]\n", " [1]\n", " [3]\n", " [3]\n", " [4]] <class 'numpy.matrixlib.defmatrix.matrix'>\n" ] } ], "source": [ "# 对每个文本中的单词数量进行统计\n", "nwords=np.sum(X,1) # 统计每个文档中的单词数量\n", "print(nwords.shape,'\\n',nwords[:5],type(nwords)) # 打印前5个数据" ] }, { "cell_type": "code", "execution_count": 276, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(16242, 1) <class 'numpy.matrixlib.defmatrix.matrix'>\n", "(1000, 1) <class 'numpy.ndarray'>\n" ] } ], "source": [ "# 根据统计的文本单词数量,提取单词数量最多的前1000个文本\n", "word_num_index = np.argsort(-nwords,axis=0) # 获取降序排序后的索引值\n", "print(word_num_index.shape,type(word_num_index))\n", "index_1000 = np.array(word_num_index[:1000]) # 提取前1000个单词的索引值\n", "print(index_1000.shape,type(index_1000))" ] }, { "cell_type": "code", "execution_count": 277, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "<class 'numpy.ndarray'> (1000, 100)\n", "<class 'numpy.ndarray'> (1000, 1)\n", "(1000, 100)\n" ] } ], "source": [ "XX=X[index_1000.flatten()].toarray() #根据提取的1000个索引值,对X进行花式索引\n", "yy=y.T[index_1000.flatten()] #同样对每个文本的标签值进行花式索引\n", "print(type(XX),XX.shape) # 输出查看相关结果的数据类型\n", "print(type(yy),yy.shape)\n", "new_yy=np.sort(yy,axis=0) # 对yy进行升序排列,将不同的类归置到一起\n", "index_of_yy=np.argsort(yy,axis=0) # 获取排序后的索引值\n", "XX=XX[index_of_yy.flatten()] # 根据获得的索引值对XX进行花式索引\n", "print(XX.shape)" ] }, { "cell_type": "code", "execution_count": 278, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[1 2 3 4]\n" ] } ], "source": [ "yy_unique=np.unique(new_yy) # 获取标签中的不重合类别\n", "print(yy_unique)" ] }, { "cell_type": "code", "execution_count": 279, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAA3cAAAJCCAYAAABj8z68AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3W+sbetV3/fx2A5JICHGpFD32rcGxQpFkVI4R0BDFSFIU3BQ3Bc4OKTUuEZ+A4SkiYLhTdI2kUCKAq5SObJwEjtCGOIg2WpRUmRAbaVgcY6JSoJLsQjCFzsYAjhpSetYmX2x17nz3Hv32WuuNZ811u83xvcjWfY9PnfvMZ///+Yzx7IsAQAAAADw9qJrBwAAAAAA2I/JHQAAAAAUwOQOAAAAAApgcgcAAAAABTC5AwAAAIACmNwBAAAAQAHpk7sxxlePMX5+jPHhMcZbsn8/AAAAAFQ0Mr9zN8Z4cUT8XxHxn0XEMxHx0xHxp5dl+bm0IAAAAACgoOyduy+JiA8vy/KLy7J8MiLeHRGvTY4BAAAAAMp5SfLveyoiPvLYPz8TEV/6+F8YY7w5It4cEfEZn/EZ977gC74gL7oLefjw4e6fce/ePYk4jlGIMyOGLb9DJd/3UkiLrPSeEccxM9Lz0jFsoVA2VWSkZ0Y93BtD1s+YQaFN6tSezC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oIv6f4AgmBBze83xtRHxeRPwHEfEZcfMq0PPRdkKey+TumYh45WP//IqI+OiVYgFijPE74mZi9wPLsvzI4Y9/dYzx8sP///KI+Pi14kNbXx4Rf3KM8Utxc3z9K+NmJ++lh6NGEbSfuJ5nIuKZZVk+cPjn98TNZI+2E9f2xyLiny/L8mvLsvzbiPiRiPgjQdsJQy6Tu5+OiFcfbi36tLh5yfV9V44JTR3eYXpHRHxoWZa/8dj/9b6IeMPhf78hIt6bHRt6W5blO5dlecWyLK+Km3byx5dl+TMR8RMR8XWHv0bZxFUsy/IvIuIjY4w/ePijr4qInwvaTlzfL0fEl40xPv3Qxz8qm7SdsDOWxWOHeYzxmrhZgX5xRPztZVn+2pVDQlNjjP80Iv63iPjZWN9r+q64ee/uhyPi6bjpKF63LMtvXCVItDfG+IqI+IvLsnztGOPz42Yn72UR8TMR8V8uy/L/XTM+9DTG+I/j5rKfT4uIX4yIN8bNQjNtJ65qjPHfRsTXx82N2D8TEd8cN+/Y0XbCis3kDgAAAADwZC7HMgEAAAAAd2ByBwAAAAAFMLkDAAAAgAKY3AEAAABAAUzuAAAAAKAAJncAAAAAUACTOwAAAAAo4P8HkYiGonLGmA4AAAAASUVORK5CYII=\n", "text/plain": [ "<Figure size 1080x720 with 1 Axes>" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "ax = plt.gca()\n", "ax.imshow(XX,cmap=plt.cm.gray_r,aspect='auto') # 根据矩阵绘制灰度图\n", "# 绘制划分类别的分界线\n", "for label in yy_unique[:-1]:\n", " label_index = np.where(new_yy.flatten()==label)[-1][-1]\n", " line1 = [(0, label_index), (XX.shape[1],label_index)]\n", " (line1_xs, line1_ys) = zip(*line1)\n", " ax.add_line(Line2D(line1_xs, line1_ys, linewidth=5, color='red'))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.5.2" } }, "nbformat": 4, "nbformat_minor": 2 }
{ "pile_set_name": "Github" }
- basic - meridian - seconds - spinners - steps - validation - config + localization
{ "pile_set_name": "Github" }
http://localhost
{ "pile_set_name": "Github" }
package io.quarkus.hibernate.orm.deployment; import java.util.Collection; import org.hibernate.MultiTenancyStrategy; import org.hibernate.jpa.boot.internal.ParsedPersistenceXmlDescriptor; import io.quarkus.builder.item.MultiBuildItem; import io.quarkus.datasource.common.runtime.DataSourceUtil; import io.quarkus.hibernate.orm.runtime.boot.QuarkusPersistenceUnitDefinition; /** * Not to be confused with PersistenceXmlDescriptorBuildItem, which holds * items of the same type. * This build item represents a later phase, and might include the implicit * configuration definitions that are automatically defined by Quarkus. */ public final class PersistenceUnitDescriptorBuildItem extends MultiBuildItem { private final ParsedPersistenceXmlDescriptor descriptor; private final String dataSource; private final MultiTenancyStrategy multiTenancyStrategy; private final String multiTenancySchemaDataSource; private final boolean isReactive; public PersistenceUnitDescriptorBuildItem(ParsedPersistenceXmlDescriptor descriptor, boolean isReactive) { this.descriptor = descriptor; this.dataSource = DataSourceUtil.DEFAULT_DATASOURCE_NAME; this.multiTenancyStrategy = MultiTenancyStrategy.NONE; this.multiTenancySchemaDataSource = null; this.isReactive = isReactive; } public PersistenceUnitDescriptorBuildItem(ParsedPersistenceXmlDescriptor descriptor, MultiTenancyStrategy multiTenancyStrategy, String multiTenancySchemaDataSource, boolean isReactive) { this.descriptor = descriptor; this.dataSource = DataSourceUtil.DEFAULT_DATASOURCE_NAME; this.multiTenancyStrategy = multiTenancyStrategy; this.multiTenancySchemaDataSource = multiTenancySchemaDataSource; this.isReactive = isReactive; } public PersistenceUnitDescriptorBuildItem(ParsedPersistenceXmlDescriptor descriptor, String dataSource, boolean isReactive) { this.descriptor = descriptor; this.dataSource = dataSource; this.multiTenancyStrategy = MultiTenancyStrategy.NONE; this.multiTenancySchemaDataSource = null; this.isReactive = isReactive; } public PersistenceUnitDescriptorBuildItem(ParsedPersistenceXmlDescriptor descriptor, String dataSource, MultiTenancyStrategy multiTenancyStrategy, String multiTenancySchemaDataSource, boolean isReactive) { this.descriptor = descriptor; this.dataSource = dataSource; this.multiTenancyStrategy = multiTenancyStrategy; this.multiTenancySchemaDataSource = multiTenancySchemaDataSource; this.isReactive = isReactive; } public Collection<String> getManagedClassNames() { return descriptor.getManagedClassNames(); } public String getExplicitSqlImportScriptResourceName() { return descriptor.getProperties().getProperty("javax.persistence.sql-load-script-source"); } public String getPersistenceUnitName() { return descriptor.getName(); } public String getDataSource() { return dataSource; } public MultiTenancyStrategy getMultiTenancyStrategy() { return multiTenancyStrategy; } public String getMultiTenancySchemaDataSource() { return multiTenancySchemaDataSource; } public QuarkusPersistenceUnitDefinition asOutputPersistenceUnitDefinition() { return new QuarkusPersistenceUnitDefinition(descriptor, dataSource, multiTenancyStrategy, isReactive); } }
{ "pile_set_name": "Github" }
import $ from 'cheerio'; module.exports = function (input) { var page = $.load(input); var formFields = page('input[type="hidden"]'); var data = {}; formFields.each(function(i, elem) { data[$(this).attr('name')] = $(this).attr('value'); }); return data; };
{ "pile_set_name": "Github" }
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.pinot.core.operator.dociditerators; import org.apache.pinot.core.common.BlockDocIdIterator; import org.roaringbitmap.buffer.ImmutableRoaringBitmap; import org.roaringbitmap.buffer.MutableRoaringBitmap; /** * All scan-based filter iterators should implement this interface to allow intersection (AND operation) to be * optimized. * <p>When there are at least one index-base BlockDocIdIterator (SortedDocIdIterator or BitmapBasedDocIdIterator) and at * least one ScanBasedDocIdIterator, instead of iterating on each BlockDocIdIterator (we should avoid iterating on * ScanBasedDocIdIterator because that requires a lot of document scans), it can be optimized by first constructing a * bitmap of matching document ids from the index-based BlockDocIdIterators, and let ScanBasedDocIdIterator only scan * the matching document ids from the index-base BlockDocIdIterators. */ public interface ScanBasedDocIdIterator extends BlockDocIdIterator { /** * Applies AND operation to the given bitmap of document ids, returns a bitmap of the matching document ids. */ MutableRoaringBitmap applyAnd(ImmutableRoaringBitmap docIds); /** * Returns the number of entries (SV value contains one entry, MV value contains multiple entries) scanned during the * iteration. This method should be called after the iteration is done. */ long getNumEntriesScanned(); }
{ "pile_set_name": "Github" }
#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // detail/sp_counted_base.hpp // // Copyright 2005-2013 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #include <boost/config.hpp> #include <boost/smart_ptr/detail/sp_has_sync.hpp> #if defined( __clang__ ) && defined( __has_extension ) # if __has_extension( __c_atomic__ ) # define BOOST_SP_HAS_CLANG_C11_ATOMICS # endif #endif #if defined( BOOST_SP_DISABLE_THREADS ) # include <boost/smart_ptr/detail/sp_counted_base_nt.hpp> #elif defined( BOOST_SP_USE_STD_ATOMIC ) # include <boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp> #elif defined( BOOST_SP_USE_SPINLOCK ) # include <boost/smart_ptr/detail/sp_counted_base_spin.hpp> #elif defined( BOOST_SP_USE_PTHREADS ) # include <boost/smart_ptr/detail/sp_counted_base_pt.hpp> #elif defined( BOOST_DISABLE_THREADS ) && !defined( BOOST_SP_ENABLE_THREADS ) && !defined( BOOST_DISABLE_WIN32 ) # include <boost/smart_ptr/detail/sp_counted_base_nt.hpp> #elif defined( BOOST_SP_HAS_CLANG_C11_ATOMICS ) # include <boost/smart_ptr/detail/sp_counted_base_clang.hpp> #elif !defined( BOOST_NO_CXX11_HDR_ATOMIC ) # include <boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp> #elif defined( __SNC__ ) # include <boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp> #elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) ) && !defined(__PATHSCALE__) # include <boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp> #elif defined(__HP_aCC) && defined(__ia64) # include <boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp> #elif defined( __GNUC__ ) && defined( __ia64__ ) && !defined( __INTEL_COMPILER ) && !defined(__PATHSCALE__) # include <boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp> #elif defined( __IBMCPP__ ) && defined( __powerpc ) # include <boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp> #elif defined( __MWERKS__ ) && defined( __POWERPC__ ) # include <boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp> #elif defined( __GNUC__ ) && ( defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc ) ) && !defined(__PATHSCALE__) && !defined( _AIX ) # include <boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp> #elif defined( __GNUC__ ) && ( defined( __mips__ ) || defined( _mips ) ) && !defined(__PATHSCALE__) && !defined( __mips16 ) # include <boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp> #elif defined( BOOST_SP_HAS_SYNC ) # include <boost/smart_ptr/detail/sp_counted_base_sync.hpp> #elif defined(__GNUC__) && ( defined( __sparcv9 ) || ( defined( __sparcv8 ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 402 ) ) ) # include <boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp> #elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined(__CYGWIN__) # include <boost/smart_ptr/detail/sp_counted_base_w32.hpp> #elif defined( _AIX ) # include <boost/smart_ptr/detail/sp_counted_base_aix.hpp> #elif !defined( BOOST_HAS_THREADS ) # include <boost/smart_ptr/detail/sp_counted_base_nt.hpp> #else # include <boost/smart_ptr/detail/sp_counted_base_spin.hpp> #endif #undef BOOST_SP_HAS_CLANG_C11_ATOMICS #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED
{ "pile_set_name": "Github" }
Manifest-Version: 1.0 Class-Path:
{ "pile_set_name": "Github" }
/* This work is licensed under a Creative Commons CCZero 1.0 Universal License. * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. * * Copyright 2016 (c) Fraunhofer IOSB (Author: Julius Pfrommer) */ #ifndef UA_NETWORK_WS_H_ #define UA_NETWORK_WS_H_ #include <open62541/client.h> #include <open62541/plugin/log.h> #include <open62541/server.h> _UA_BEGIN_DECLS UA_ServerNetworkLayer UA_EXPORT UA_ServerNetworkLayerWS(UA_ConnectionConfig config, UA_UInt16 port, UA_Logger *logger, const UA_ByteString* certificate, const UA_ByteString* privateKey); _UA_END_DECLS #endif /* UA_NETWORK_WS_H_ */
{ "pile_set_name": "Github" }
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Jun 9 2015 22:53:21). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2014 by Steve Nygard. // #import "TSizePropertyExtractor.h" @interface TPropertyLogicalSizeExtractor : TSizePropertyExtractor { } + (id)extractor; @end
{ "pile_set_name": "Github" }
/* * Written by Solar Designer and placed in the public domain. * See crypt_blowfish.c for more information. * * contrib/pgcrypto/crypt-gensalt.c * * This file contains salt generation functions for the traditional and * other common crypt(3) algorithms, except for bcrypt which is defined * entirely in crypt_blowfish.c. * * Put bcrypt generator also here as crypt-blowfish.c * may not be compiled always. -- marko */ #include "postgres.h" #include "px-crypt.h" typedef unsigned int BF_word; static unsigned char _crypt_itoa64[64 + 1] = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; char * _crypt_gensalt_traditional_rn(unsigned long count, const char *input, int size, char *output, int output_size) { if (size < 2 || output_size < 2 + 1 || (count && count != 25)) { if (output_size > 0) output[0] = '\0'; return NULL; } output[0] = _crypt_itoa64[(unsigned int) input[0] & 0x3f]; output[1] = _crypt_itoa64[(unsigned int) input[1] & 0x3f]; output[2] = '\0'; return output; } char * _crypt_gensalt_extended_rn(unsigned long count, const char *input, int size, char *output, int output_size) { unsigned long value; /* Even iteration counts make it easier to detect weak DES keys from a look * at the hash, so they should be avoided */ if (size < 3 || output_size < 1 + 4 + 4 + 1 || (count && (count > 0xffffff || !(count & 1)))) { if (output_size > 0) output[0] = '\0'; return NULL; } if (!count) count = 725; output[0] = '_'; output[1] = _crypt_itoa64[count & 0x3f]; output[2] = _crypt_itoa64[(count >> 6) & 0x3f]; output[3] = _crypt_itoa64[(count >> 12) & 0x3f]; output[4] = _crypt_itoa64[(count >> 18) & 0x3f]; value = (unsigned long) (unsigned char) input[0] | ((unsigned long) (unsigned char) input[1] << 8) | ((unsigned long) (unsigned char) input[2] << 16); output[5] = _crypt_itoa64[value & 0x3f]; output[6] = _crypt_itoa64[(value >> 6) & 0x3f]; output[7] = _crypt_itoa64[(value >> 12) & 0x3f]; output[8] = _crypt_itoa64[(value >> 18) & 0x3f]; output[9] = '\0'; return output; } char * _crypt_gensalt_md5_rn(unsigned long count, const char *input, int size, char *output, int output_size) { unsigned long value; if (size < 3 || output_size < 3 + 4 + 1 || (count && count != 1000)) { if (output_size > 0) output[0] = '\0'; return NULL; } output[0] = '$'; output[1] = '1'; output[2] = '$'; value = (unsigned long) (unsigned char) input[0] | ((unsigned long) (unsigned char) input[1] << 8) | ((unsigned long) (unsigned char) input[2] << 16); output[3] = _crypt_itoa64[value & 0x3f]; output[4] = _crypt_itoa64[(value >> 6) & 0x3f]; output[5] = _crypt_itoa64[(value >> 12) & 0x3f]; output[6] = _crypt_itoa64[(value >> 18) & 0x3f]; output[7] = '\0'; if (size >= 6 && output_size >= 3 + 4 + 4 + 1) { value = (unsigned long) (unsigned char) input[3] | ((unsigned long) (unsigned char) input[4] << 8) | ((unsigned long) (unsigned char) input[5] << 16); output[7] = _crypt_itoa64[value & 0x3f]; output[8] = _crypt_itoa64[(value >> 6) & 0x3f]; output[9] = _crypt_itoa64[(value >> 12) & 0x3f]; output[10] = _crypt_itoa64[(value >> 18) & 0x3f]; output[11] = '\0'; } return output; } static unsigned char BF_itoa64[64 + 1] = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; static void BF_encode(char *dst, const BF_word *src, int size) { const unsigned char *sptr = (const unsigned char *) src; const unsigned char *end = sptr + size; unsigned char *dptr = (unsigned char *) dst; unsigned int c1, c2; do { c1 = *sptr++; *dptr++ = BF_itoa64[c1 >> 2]; c1 = (c1 & 0x03) << 4; if (sptr >= end) { *dptr++ = BF_itoa64[c1]; break; } c2 = *sptr++; c1 |= c2 >> 4; *dptr++ = BF_itoa64[c1]; c1 = (c2 & 0x0f) << 2; if (sptr >= end) { *dptr++ = BF_itoa64[c1]; break; } c2 = *sptr++; c1 |= c2 >> 6; *dptr++ = BF_itoa64[c1]; *dptr++ = BF_itoa64[c2 & 0x3f]; } while (sptr < end); } char * _crypt_gensalt_blowfish_rn(unsigned long count, const char *input, int size, char *output, int output_size) { if (size < 16 || output_size < 7 + 22 + 1 || (count && (count < 4 || count > 31))) { if (output_size > 0) output[0] = '\0'; return NULL; } if (!count) count = 5; output[0] = '$'; output[1] = '2'; output[2] = 'a'; output[3] = '$'; output[4] = '0' + count / 10; output[5] = '0' + count % 10; output[6] = '$'; BF_encode(&output[7], (const BF_word *) input, 16); output[7 + 22] = '\0'; return output; }
{ "pile_set_name": "Github" }
# pwn-env-init **blog**:https://www.giantbranch.cn/ CTF PWN 做题环境一键搭建脚本 CTF PWN environment one-click build script 理论上适用于debian系的linux x64系统,但强烈建议在Ubuntu x64系统上安装使用 **如果怕麻烦的,可以直接下载我配置好的Ubuntu 16.04,为VMware导出的ovf格式** 链接:https://pan.baidu.com/s/1Ia8NPcXy414QOaiH14T3sQ 提取码:kypa **账号密码:** giantbranch:giantbranch (root密码可以通过sudo passwd root自行修改) 截图: ![](https://raw.githubusercontent.com/giantbranch/pwn-env-init/master/img/png.png) **虚拟机的源码不能源码调试有bug,可通过以下命令修复:** ``` rm glibc-2.23* -rf sudo apt update sudo apt source libc6-dev ``` # Use 用python2的选py2,用python3的选py3 ### python2 pwn env ``` wget https://raw.githubusercontent.com/giantbranch/pwn-env-init/master/pwn_init_py2.sh chmod +x pwn_init_py2.sh sudo ./pwn_init_py2.sh ``` ### python3 pwn env ``` wget https://raw.githubusercontent.com/giantbranch/pwn-env-init/master/pwn_init_py3.sh chmod +x pwn_init_py3.sh sudo ./pwn_init_py3.sh ``` 而pwn_init.sh就作为备份文件吧 # Instructions 1. 为64位系统提供32位运行环境支撑 2. 下载了libc6的源码,方便源码调试( 可看这https://blog.csdn.net/u012763794/article/details/78457973 ) 3. 给gdb装上pwndbg和peda插件 4. 安装pwntools 5. 安装one_gadget 6. 下载libc-database # Update 20200114: 最近在Ubuntu 19.04运行脚本,安装pwntools有问题,more-itertools已经不支持python2了,所以分成py2和py3版本,python2的解决方案是先安装支持python2的more-itertools 5.0.0 20181105: 竟然忘了安装one_gadget 20181027: 增加下载libc-database 20181003: 修改pip源为豆瓣源,加快pip的安装速度,假如安装的地方不在中国,可以注释掉! 20180606: 初始化仓库,上传第一版 # Attention I suggest you modify the /etc/apt/sources.list file to speed up the download. # Reward paypal: https://www.paypal.me/giantbranch ![自愿打赏][1] [1]: http://pic.giantbranch.cn/pic/1551450728861.jpg
{ "pile_set_name": "Github" }
# Event 4 - Personalization_HubPageInit ###### Version: 0 ## Description None ## Data Dictionary |Standard Name|Field Name|Type|Description|Sample Value| |---|---|---|---|---| |TBD|SqmSessionGuid|GUID|None|`None`| |TBD|SqmID|UInt32|None|`None`| |TBD|SqmType|UInt32|None|`None`| |TBD|SqmDWORDDatapointValue|UInt32|None|`None`| ## Tags * etw_level_Informational * etw_opcode_Start * etw_task_Personalization_HubPageInit
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//testMybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="me.zhyd.springboot.mybatis.mapper.MessageMapper"> <resultMap id="message_map" type="me.zhyd.springboot.mybatis.bean.Message"> <id property="id" column="ID" jdbcType="INTEGER"></id> <result property="ip" column="IP" jdbcType="VARCHAR"></result> <result property="insertTime" column="INSERT_TIME" jdbcType="DATE"></result> <result property="nickName" column="NICK_NAME" jdbcType="VARCHAR"></result> </resultMap> <select id="listByMapperXml" resultMap="message_map"> select * from message </select> </mapper>
{ "pile_set_name": "Github" }
/*! @file Forward declares `boost::hana::fuse`. @copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_HANA_FWD_FUSE_HPP #define BOOST_HANA_FWD_FUSE_HPP #include <boost/hana/config.hpp> BOOST_HANA_NAMESPACE_BEGIN //! Transform a function taking multiple arguments into a function that //! can be called with a compile-time `Foldable`. //! @ingroup group-Foldable //! //! //! This function is provided for convenience as a different way of //! calling `unpack`. Specifically, `fuse(f)` is a function such that //! @code //! fuse(f)(foldable) == unpack(foldable, f) //! == f(x...) //! @endcode //! where `x...` are the elements in the foldable. This function is //! useful when one wants to create a function that accepts a foldable //! which is not known yet. //! //! @note //! This function is not tag-dispatched; customize `unpack` instead. //! //! //! Example //! ------- //! @include example/fuse.cpp #ifdef BOOST_HANA_DOXYGEN_INVOKED constexpr auto fuse = [](auto&& f) { return [perfect-capture](auto&& xs) -> decltype(auto) { return unpack(forwarded(xs), forwarded(f)); }; }; #else struct fuse_t { template <typename F> constexpr auto operator()(F&& f) const; }; constexpr fuse_t fuse{}; #endif BOOST_HANA_NAMESPACE_END #endif // !BOOST_HANA_FWD_FUSE_HPP
{ "pile_set_name": "Github" }
namespace $.$$ { export class $mol_svg extends $.$mol_svg { @$mol_mem computed_style() { const win = this.$.$mol_dom_context const style = win.getComputedStyle(this.dom_node()) if(!style['font-size']) $mol_state_time.now() return style } @$mol_mem font_size(): number { return parseInt(this.computed_style()['font-size']) || 16 } @$mol_mem font_family() { return this.computed_style()['font-family'] } } }
{ "pile_set_name": "Github" }
include Stdlib.Sys let linux = match Io.String_path.read_file "/proc/sys/kernel/ostype" |> String.trim with | "Linux" -> true | _ -> false | exception _ -> false let force_remove = if win32 then ( fun fn -> try remove fn with Sys_error _ -> (* Try to remove the "read-only" attribute, then retry. *) (try Unix.chmod fn 0o666 with Unix.Unix_error _ -> ()); remove fn ) else remove
{ "pile_set_name": "Github" }
input CreateMessageInput { text: String! roomId: ID! } type Message { _id: ID! text: String roomId: ID! createdBy: User createdAt: Float! updatedAt: Float! } type Query { messages(roomId: ID!): [Message] } type Mutation { sendMessage(input: CreateMessageInput!): Message } type Subscription { newMessages(roomId: ID!): Room }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <window> <!-- ID format AA-B-C-DD [group/subgroup/layer/item] eg: 990105 = group 99 / subgroup 0 / layer 1 / item 05 --> <define property="true" evaluateNow="true">#image.posx:779</define> <define property="true" evaluateNow="true">#image.posy:700</define> <define property="true" evaluateNow="true">#image.width:380</define> <define property="true" evaluateNow="true">#image.height:271</define> <define property="true" evaluateNow="true">#label.posx:804</define> <define property="true" evaluateNow="true">#label.posy:928</define> <define property="true" evaluateNow="true">#label.width:322</define> <define property="true" evaluateNow="true">#focus.posy:700</define> <define>#label.font:font12</define> <define property="true" evaluateNow="true">#scroll.delay:3</define> <define property="true" evaluateNow="true">#scroll.wrap: · </define> <define property="true" evaluateNow="true">#hedit.main.return.backward:810211</define> <define property="true" evaluateNow="true">#hedit.main.return.forward:810212</define> <controls> <!-- Initial focus --> <control> <description>default button</description> <type>button</type> <id>810000</id> <posX>-999</posX> <posY>-999</posY> <label>-</label> <onfocus> #(skin.setstring('#hedit.main.calc.nav','')) #(skin.setfocus(cint(#currentmoduleid),810101)) </onfocus> </control> <!-- Input control --> <control> <description>Key control</description> <id>810101</id> <type>button</type> <posX>-999</posX> <posY>-999</posY> <label>#hedit.main.use.4</label> <textXOff>2000</textXOff> <textureFocus></textureFocus> <textureNoFocus></textureNoFocus> <hyperlink>#(string.format('{0}.hyperlink',#hedit.main.use.4))</hyperlink> <hyperlinkParameter>#(string.format('{0}.parameter',#hedit.main.use.4))</hyperlinkParameter> <action>#(string.format('{0}.action',#hedit.main.use.4))</action> <onleft>#hedit.main.backward</onleft> <onright>#hedit.main.forward</onright> <onup>820000</onup> <ondown>1111</ondown> <onfocus> #(skin.setstring('#hedit.inuse','main')) #(skin.setstring('#hedit.main.return',810101)) #(skin.setstring('#hedit.sub.1',choose(cint(#hedit.main.pos.4),'#NONE',#hedit.button.1.1,#hedit.button.2.1,#hedit.button.3.1,#hedit.button.4.1,#hedit.button.5.1,#hedit.button.6.1,#hedit.button.7.1,#hedit.button.8.1,#hedit.button.9.1,#hedit.button.10.1))) #(skin.setstring('#hedit.sub.2',choose(cint(#hedit.main.pos.4),'#NONE',#hedit.button.1.2,#hedit.button.2.2,#hedit.button.3.2,#hedit.button.4.2,#hedit.button.5.2,#hedit.button.6.2,#hedit.button.7.2,#hedit.button.8.2,#hedit.button.9.2,#hedit.button.10.2))) #(skin.setstring('#hedit.sub.3',choose(cint(#hedit.main.pos.4),'#NONE',#hedit.button.1.3,#hedit.button.2.3,#hedit.button.3.3,#hedit.button.4.3,#hedit.button.5.3,#hedit.button.6.3,#hedit.button.7.3,#hedit.button.8.3,#hedit.button.9.3,#hedit.button.10.3))) #(skin.setstring('#hedit.sub.4',choose(cint(#hedit.main.pos.4),'#NONE',#hedit.button.1.4,#hedit.button.2.4,#hedit.button.3.4,#hedit.button.4.4,#hedit.button.5.4,#hedit.button.6.4,#hedit.button.7.4,#hedit.button.8.4,#hedit.button.9.4,#hedit.button.10.4))) #(skin.setstring('#hedit.sub.5',choose(cint(#hedit.main.pos.4),'#NONE',#hedit.button.1.5,#hedit.button.2.5,#hedit.button.3.5,#hedit.button.4.5,#hedit.button.5.5,#hedit.button.6.5,#hedit.button.7.5,#hedit.button.8.5,#hedit.button.9.5,#hedit.button.10.5))) #(skin.setstring('#hedit.sub.6',choose(cint(#hedit.main.pos.4),'#NONE',#hedit.button.1.6,#hedit.button.2.6,#hedit.button.3.6,#hedit.button.4.6,#hedit.button.5.6,#hedit.button.6.6,#hedit.button.7.6,#hedit.button.8.6,#hedit.button.9.6,#hedit.button.10.6))) #(skin.setstring('#hedit.sub.7',choose(cint(#hedit.main.pos.4),'#NONE',#hedit.button.1.7,#hedit.button.2.7,#hedit.button.3.7,#hedit.button.4.7,#hedit.button.5.7,#hedit.button.6.7,#hedit.button.7.7,#hedit.button.8.7,#hedit.button.9.7,#hedit.button.10.7))) #(skin.setstring(#(string.format('{0}.latestmedia',#hedit.main.use.4)))) </onfocus> </control> <control> <description>Mouse control - Click Center</description> <id>810201</id> <type>button</type> <posX>770</posX> <posY>#image.posy</posY> <width>390</width> <height>260</height> <label>#hedit.main.use.4</label> <textXOff>2000</textXOff> <textureFocus>#(iif(eq(#hedit.debug.mouse,'1'),'settingsUICalibration.png','-'))</textureFocus> <textureNoFocus>#(iif(eq(#hedit.debug.mouse,'1'),'settingsUICalibration.png','-'))</textureNoFocus> <hyperlink>#(string.format('{0}.hyperlink',#hedit.main.use.4))</hyperlink> <hyperlinkParameter>#(string.format('{0}.parameter',#hedit.main.use.4))</hyperlinkParameter> <action>#(string.format('{0}.action',#hedit.main.use.4))</action> <onleft>810211</onleft> <onright>810212</onright> <onup>#hedit.main.backward</onup> <ondown>#hedit.main.forward</ondown> <onfocus> #(skin.setstring('#hedit.inuse','main')) #(skin.setstring('#hedit.main.return',810201)) #(skin.setstring('#hedit.sub.1',choose(cint(#hedit.main.pos.4),'#NONE',#hedit.button.1.1,#hedit.button.2.1,#hedit.button.3.1,#hedit.button.4.1,#hedit.button.5.1,#hedit.button.6.1,#hedit.button.7.1,#hedit.button.8.1,#hedit.button.9.1,#hedit.button.10.1))) #(skin.setstring('#hedit.sub.2',choose(cint(#hedit.main.pos.4),'#NONE',#hedit.button.1.2,#hedit.button.2.2,#hedit.button.3.2,#hedit.button.4.2,#hedit.button.5.2,#hedit.button.6.2,#hedit.button.7.2,#hedit.button.8.2,#hedit.button.9.2,#hedit.button.10.2))) #(skin.setstring('#hedit.sub.3',choose(cint(#hedit.main.pos.4),'#NONE',#hedit.button.1.3,#hedit.button.2.3,#hedit.button.3.3,#hedit.button.4.3,#hedit.button.5.3,#hedit.button.6.3,#hedit.button.7.3,#hedit.button.8.3,#hedit.button.9.3,#hedit.button.10.3))) #(skin.setstring('#hedit.sub.4',choose(cint(#hedit.main.pos.4),'#NONE',#hedit.button.1.4,#hedit.button.2.4,#hedit.button.3.4,#hedit.button.4.4,#hedit.button.5.4,#hedit.button.6.4,#hedit.button.7.4,#hedit.button.8.4,#hedit.button.9.4,#hedit.button.10.4))) #(skin.setstring('#hedit.sub.5',choose(cint(#hedit.main.pos.4),'#NONE',#hedit.button.1.5,#hedit.button.2.5,#hedit.button.3.5,#hedit.button.4.5,#hedit.button.5.5,#hedit.button.6.5,#hedit.button.7.5,#hedit.button.8.5,#hedit.button.9.5,#hedit.button.10.5))) #(skin.setstring('#hedit.sub.6',choose(cint(#hedit.main.pos.4),'#NONE',#hedit.button.1.6,#hedit.button.2.6,#hedit.button.3.6,#hedit.button.4.6,#hedit.button.5.6,#hedit.button.6.6,#hedit.button.7.6,#hedit.button.8.6,#hedit.button.9.6,#hedit.button.10.6))) #(skin.setstring('#hedit.sub.7',choose(cint(#hedit.main.pos.4),'#NONE',#hedit.button.1.7,#hedit.button.2.7,#hedit.button.3.7,#hedit.button.4.7,#hedit.button.5.7,#hedit.button.6.7,#hedit.button.7.7,#hedit.button.8.7,#hedit.button.9.7,#hedit.button.10.7))) </onfocus> </control> <control> <description>Mouse control - Click Backward</description> <type>button</type> <id>810202</id> <posX>270</posX> <posY>#image.posy</posY> <width>501</width> <height>260</height> <label>-</label> <textureFocus>#(iif(eq(#hedit.debug.mouse,'1'),'settingsUICalibration.png','-'))</textureFocus> <textureNoFocus>#(iif(eq(#hedit.debug.mouse,'1'),'settingsUICalibration.png','-'))</textureNoFocus> <onleft>810211</onleft> <onright>810212</onright> <onup>#hedit.main.backward</onup> <ondown>#hedit.main.forward</ondown> <onfocus> #(skin.setstring('#hedit.inuse','main')) </onfocus> <onclick> #(skin.setstring('#hedit.main.return',810201)) #(skin.setfocus(cint(#currentmoduleid),cint(#hedit.main.backward))) </onclick> </control> <control> <description>Mouse control - Click Forward</description> <type>button</type> <id>810203</id> <posX>1160</posX> <posY>#image.posy</posY> <width>500</width> <height>260</height> <label>-</label> <textureFocus>#(iif(eq(#hedit.debug.mouse,'1'),'settingsUICalibration.png','-'))</textureFocus> <textureNoFocus>#(iif(eq(#hedit.debug.mouse,'1'),'settingsUICalibration.png','-'))</textureNoFocus> <onleft>810211</onleft> <onright>810212</onright> <onup>#hedit.main.backward</onup> <ondown>#hedit.main.forward</ondown> <onfocus> #(skin.setstring('#hedit.inuse','main')) </onfocus> <onclick> #(skin.setstring('#hedit.main.return',810201)) #(skin.setfocus(cint(#currentmoduleid),cint(#hedit.main.forward))) </onclick> </control> <control> <description>Move backward and return to key control</description> <id>810211</id> <type>button</type> <posX>-999</posX> <posY>-999</posY> <label>-</label> <textureFocus></textureFocus> <textureNoFocus></textureNoFocus> <onfocus> #(skin.setstring('#hedit.main.return',810101)) #(skin.setfocus(cint(#currentmoduleid),cint(#hedit.main.backward))) </onfocus> </control> <control> <description>Move forward and return to key control</description> <id>810212</id> <type>button</type> <posX>-999</posX> <posY>-999</posY> <label>-</label> <textureFocus></textureFocus> <textureNoFocus></textureNoFocus> <onfocus> #(skin.setstring('#hedit.main.return',810101)) #(skin.setfocus(cint(#currentmoduleid),cint(#hedit.main.forward))) </onfocus> </control> <!-- Render button images and labels --> <control> <type>group</type> <dimColor>FFFFFFFF</dimColor> <animation effect="rotatey" start="100" end="0" center="960,1500" time="800" acceleration="-0.6" reversible="false">windowopen</animation> <animation effect="fade" start="0" end="100" time="700" reversible="false">windowopen</animation> <animation effect="fade" start="100" end="0" time="250" acceleration="-0.6" reversible="false">windowclose</animation> <animation effect="rotatex" start="0" end="25" center="960,0" time="250" acceleration="-1" condition="string.contains(#hedit.inuse,sub)|control.hasfocus(1111)">conditional</animation> <animation effect="fade" start="100" end="60" time="250" acceleration="-1" condition="string.contains(#hedit.inuse,sub)|control.hasfocus(1111)">conditional</animation> <control> <type>image</type> <posX>#image.posx</posX> <posY>#image.posy</posY> <width>#image.width</width> <height>#image.height</height> <texture mask="basichome_button_mask.png">#(string.format('{0}.hover',#hedit.main.use.1))</texture> <animation effect="rotatey" start="48" end="48" center="960,1500" time="0" condition="true">conditional</animation> <animation effect="fade" start="0" end="100" time="250" reversible="false" condition="string.contains(#hedit.main.calc.nav,b0)">conditional</animation> <animation effect="fade" start="0" end="100" time="250" reversible="false" condition="string.contains(#hedit.main.calc.nav,b1)">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b0)">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b1)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f0)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f1)">conditional</animation> <animation effect="rotatey" start="0" end="60" center="960,1500" time="250" acceleration="-0.6" reversible="false">windowclose</animation> </control> <control> <type>fadelabel</type> <posX>#label.posx</posX> <posY>#label.posy</posY> <width>#label.width</width> <align>center</align> <font>#label.font</font> <wrapString>#scroll.wrap</wrapString> <scrollStartDelaySec>#scroll.delay</scrollStartDelaySec> <label>#(string.format('{0}.name',#hedit.main.use.1))</label> <animation effect="rotatey" start="48" end="48" center="960,1500" time="0" condition="true">conditional</animation> <animation effect="fade" start="0" end="100" time="250" delay="50" reversible="false" condition="string.contains(#hedit.main.calc.nav,b0)">conditional</animation> <animation effect="fade" start="0" end="100" time="250" delay="50" reversible="false" condition="string.contains(#hedit.main.calc.nav,b1)">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b0)">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b1)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f0)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f1)">conditional</animation> <animation effect="rotatey" start="0" end="60" center="960,1500" time="250" acceleration="-0.6" reversible="false">windowclose</animation> </control> <control> <type>image</type> <posX>#image.posx</posX> <posY>#image.posy</posY> <width>#image.width</width> <height>#image.height</height> <texture mask="basichome_button_mask.png">#(string.format('{0}.hover',#hedit.main.use.2))</texture> <animation effect="rotatey" start="32" end="32" center="960,1500" time="0" condition="true">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b0)">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b1)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f0)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f1)">conditional</animation> <animation effect="rotatey" start="0" end="60" center="960,1500" time="250" acceleration="-0.6" reversible="false">windowclose</animation> </control> <control> <type>fadelabel</type> <posX>#label.posx</posX> <posY>#label.posy</posY> <width>#label.width</width> <align>center</align> <font>#label.font</font> <wrapString>#scroll.wrap</wrapString> <scrollStartDelaySec>#scroll.delay</scrollStartDelaySec> <label>#(string.format('{0}.name',#hedit.main.use.2))</label> <animation effect="rotatey" start="32" end="32" center="960,1500" time="0" condition="true">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b0)">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b1)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f0)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f1)">conditional</animation> <animation effect="rotatey" start="0" end="60" center="960,1500" time="250" acceleration="-0.6" reversible="false">windowclose</animation> </control> <control> <type>image</type> <posX>#image.posx</posX> <posY>#image.posy</posY> <width>#image.width</width> <height>#image.height</height> <texture mask="basichome_button_mask.png">#(string.format('{0}.hover',#hedit.main.use.3))</texture> <animation effect="rotatey" start="16" end="16" center="960,1500" time="0" condition="true">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b0)">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b1)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f0)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f1)">conditional</animation> <animation effect="rotatey" start="0" end="60" center="960,1500" time="250" acceleration="-0.6" reversible="false">windowclose</animation> </control> <control> <type>fadelabel</type> <posX>#label.posx</posX> <posY>#label.posy</posY> <width>#label.width</width> <align>center</align> <font>#label.font</font> <wrapString>#scroll.wrap</wrapString> <scrollStartDelaySec>#scroll.delay</scrollStartDelaySec> <label>#(string.format('{0}.name',#hedit.main.use.3))</label> <animation effect="rotatey" start="16" end="16" center="960,1500" time="0" condition="true">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b0)">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b1)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f0)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f1)">conditional</animation> <animation effect="rotatey" start="0" end="60" center="960,1500" time="250" acceleration="-0.6" reversible="false">windowclose</animation> </control> <control> <type>image</type> <posX>#image.posx</posX> <posY>#image.posy</posY> <width>#image.width</width> <height>#image.height</height> <texture mask="basichome_button_mask.png">#(string.format('{0}.hover',#hedit.main.use.4))</texture> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b0)">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b1)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f0)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f1)">conditional</animation> <animation effect="zoom" start="100,100" end="200,200" time="250" acceleration="-0.6" reversible="false" condition="!string.contains(#hedit.inuse,sub)">windowclose</animation> </control> <control> <type>fadelabel</type> <posX>#label.posx</posX> <posY>#label.posy</posY> <width>#label.width</width> <align>center</align> <font>#label.font</font> <wrapString>#scroll.wrap</wrapString> <scrollStartDelaySec>#scroll.delay</scrollStartDelaySec> <label>#(string.format('{0}.name',#hedit.main.use.4))</label> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b0)">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b1)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f0)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f1)">conditional</animation> <animation effect="zoom" start="100,100" end="200,200" center="960,750" time="250" acceleration="-0.6" reversible="false" condition="!string.contains(#hedit.inuse,sub)">windowclose</animation> </control> <control> <type>image</type> <posX>#image.posx</posX> <posY>#image.posy</posY> <width>#image.width</width> <height>#image.height</height> <texture mask="basichome_button_mask.png">#(string.format('{0}.hover',#hedit.main.use.5))</texture> <animation effect="rotatey" start="-16" end="-16" center="960,1500" time="0" condition="true">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b0)">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b1)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f0)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f1)">conditional</animation> <animation effect="rotatey" start="0" end="-60" center="960,1500" time="250" acceleration="-0.6" reversible="false">windowclose</animation> </control> <control> <type>fadelabel</type> <posX>#label.posx</posX> <posY>#label.posy</posY> <width>#label.width</width> <align>center</align> <font>#label.font</font> <wrapString>#scroll.wrap</wrapString> <scrollStartDelaySec>#scroll.delay</scrollStartDelaySec> <label>#(string.format('{0}.name',#hedit.main.use.5))</label> <animation effect="rotatey" start="-16" end="-16" center="960,1500" time="0" condition="true">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b0)">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b1)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f0)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f1)">conditional</animation> <animation effect="rotatey" start="0" end="-60" center="960,1500" time="250" acceleration="-0.6" reversible="false">windowclose</animation> </control> <control> <type>image</type> <posX>#image.posx</posX> <posY>#image.posy</posY> <width>#image.width</width> <height>#image.height</height> <texture mask="basichome_button_mask.png">#(string.format('{0}.hover',#hedit.main.use.6))</texture> <animation effect="rotatey" start="-32" end="-32" center="960,1500" time="0" condition="true">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b0)">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b1)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f0)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f1)">conditional</animation> <animation effect="rotatey" start="0" end="-60" center="960,1500" time="250" acceleration="-0.6" reversible="false">windowclose</animation> </control> <control> <type>fadelabel</type> <posX>#label.posx</posX> <posY>#label.posy</posY> <width>#label.width</width> <align>center</align> <font>#label.font</font> <wrapString>#scroll.wrap</wrapString> <scrollStartDelaySec>#scroll.delay</scrollStartDelaySec> <label>#(string.format('{0}.name',#hedit.main.use.6))</label> <animation effect="rotatey" start="-32" end="-32" center="960,1500" time="0" condition="true">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b0)">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b1)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f0)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f1)">conditional</animation> <animation effect="rotatey" start="0" end="-60" center="960,1500" time="250" acceleration="-0.6" reversible="false">windowclose</animation> </control> <control> <type>image</type> <posX>#image.posx</posX> <posY>#image.posy</posY> <width>#image.width</width> <height>#image.height</height> <hyperlink>#(string.format('{0}.hyperlink',#hedit.main.use.7))</hyperlink> <texture mask="basichome_button_mask.png">#(string.format('{0}.hover',#hedit.main.use.7))</texture> <animation effect="rotatey" start="-48" end="-48" center="960,1500" time="0" condition="true">conditional</animation> <animation effect="fade" start="0" end="100" time="250" delay="50" reversible="false" condition="string.contains(#hedit.main.calc.nav,f0)">conditional</animation> <animation effect="fade" start="0" end="100" time="250" delay="50" reversible="false" condition="string.contains(#hedit.main.calc.nav,f1)">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b0)">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b1)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f0)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f1)">conditional</animation> <animation effect="rotatey" start="0" end="-60" center="960,1500" time="250" acceleration="-0.6" reversible="false">windowclose</animation> </control> <control> <type>fadelabel</type> <posX>#label.posx</posX> <posY>#label.posy</posY> <width>#label.width</width> <font>#label.font</font> <align>center</align> <wrapString>#scroll.wrap</wrapString> <scrollStartDelaySec>#scroll.delay</scrollStartDelaySec> <label>#(string.format('{0}.name',#hedit.main.use.7))</label> <animation effect="rotatey" start="-48" end="-48" center="960,1500" time="0" condition="true">conditional</animation> <animation effect="fade" start="0" end="100" time="250" delay="50" reversible="false" condition="string.contains(#hedit.main.calc.nav,f0)">conditional</animation> <animation effect="fade" start="0" end="100" time="250" delay="50" reversible="false" condition="string.contains(#hedit.main.calc.nav,f1)">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b0)">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b1)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f0)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f1)">conditional</animation> <animation effect="rotatey" start="0" end="-60" center="960,1500" time="250" acceleration="-0.6" reversible="false">windowclose</animation> </control> <control> <type>image</type> <posX>#image.posx</posX> <posY>#image.posy</posY> <width>#image.width</width> <height>#image.height</height> <texture>#('basichome_label_overlay.png',#hedit.main.use.1))</texture> <animation effect="rotatey" start="48" end="48" center="960,1500" time="0" condition="true">conditional</animation> <animation effect="fade" start="0" end="100" time="250" reversible="false" condition="string.contains(#hedit.main.calc.nav,b0)">conditional</animation> <animation effect="fade" start="0" end="100" time="250" reversible="false" condition="string.contains(#hedit.main.calc.nav,b1)">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b0)">conditional</animation> <animation effect="rotatey" start="16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,b1)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f0)">conditional</animation> <animation effect="rotatey" start="-16" end="0" center="960,1500" time="250" acceleration="-0.6" reversible="false" condition="string.contains(#hedit.main.calc.nav,f1)">conditional</animation> <animation effect="rotatey" start="0" end="60" center="960,1500" time="250" acceleration="-0.6" reversible="false">windowclose</animation> </control> </control> <!-- Focus image and label overlay --> <control> <posX>#image.posx</posX> <posY>#image.posy</posY> <width>#image.width</width> <height>#image.height</height> <type>image</type> <texture>basichome_button_focus.png</texture> <animation effect="fade" start="0" end="100" time="250" delay="150" reversible="false" condition="string.contains(#hedit.main.calc.nav,0)">conditional</animation> <animation effect="fade" start="0" end="100" time="250" delay="150" reversible="false" condition="string.contains(#hedit.main.calc.nav,1)">conditional</animation> <animation effect="fade" start="0" end="100" time="250" delay="150" reversible="false">visible</animation> <animation effect="fade" time="0">hidden</animation> <animation effect="fade" start="0" end="100" time="250" delay="800">WindowOpen</animation> <animation effect="fade" time="0">WindowClose</animation> <visible>!string.contains(#hedit.inuse,sub)+!control.hasfocus(1111)</visible> </control> <control> <posX>#image.posx</posX> <posY>#image.posy</posY> <width>#image.width</width> <height>#image.height</height> <type>image</type> <texture>basichome_label_overlay.png</texture> <animation effect="rotatey" start="100" end="0" center="960,1500" time="800" acceleration="-0.6" reversible="false">windowopen</animation> <animation effect="fade" start="0" end="100" time="700" reversible="false">windowopen</animation> <animation effect="fade" start="100" end="0" time="250" acceleration="-0.6" reversible="false">windowclose</animation> <animation effect="rotatex" start="0" end="25" center="960,0" time="250" acceleration="-1" condition="string.contains(#hedit.inuse,sub)">conditional</animation> <animation effect="fade" start="100" end="70" time="250" acceleration="-1" condition="string.contains(#hedit.inuse,sub)">conditional</animation> <animation effect="fade" start="0" end="100" time="250" delay="150" reversible="false" condition="string.contains(#hedit.main.calc.nav,0)">conditional</animation> <animation effect="fade" start="0" end="100" time="250" delay="150" reversible="false" condition="string.contains(#hedit.main.calc.nav,1)">conditional</animation> <animation effect="fade" start="0" end="100" time="250" delay="150" reversible="false">visible</animation> <animation effect="fade" time="0">hidden</animation> <animation effect="fade" start="0" end="100" time="250" delay="800">WindowOpen</animation> <animation effect="fade" time="0">WindowClose</animation> <visible>!string.contains(#hedit.inuse,sub)+!control.hasfocus(1111)</visible> </control> <!-- Submenu indicator --> <control> <description>Indicator</description> <type>image</type> <posX>949</posX> <posY>640</posY> <width>36</width> <height>52</height> <texture>submenu_indicator.png</texture> <animation effect="fade" start="0" end="100" time="800" delay="500" reversible="false" condition="string.contains(#hedit.main.calc.nav,0)">conditional</animation> <animation effect="fade" start="0" end="100" time="800" delay="500" reversible="false" condition="string.contains(#hedit.main.calc.nav,1)">conditional</animation> <animation effect="fade" start="0" end="100" time="800" delay="500" reversible="false">visible</animation> <animation effect="fade" time="0" reversible="false">hidden</animation> <animation effect="fade" time="250">WindowOpen</animation> <animation effect="fade" time="0">WindowClose</animation> <visible>!string.contains(#hedit.inuse,sub)+control.isvisible(920900)+!control.hasfocus(1111)</visible> </control> </controls> </window>
{ "pile_set_name": "Github" }
// 7zFolderInStream.cpp #include "StdAfx.h" #include "7zFolderInStream.h" namespace NArchive { namespace N7z { CFolderInStream::CFolderInStream() { _inStreamWithHashSpec = new CSequentialInStreamWithCRC; _inStreamWithHash = _inStreamWithHashSpec; } void CFolderInStream::Init(IArchiveUpdateCallback *updateCallback, const UInt32 *fileIndices, UInt32 numFiles) { _updateCallback = updateCallback; _numFiles = numFiles; _fileIndex = 0; _fileIndices = fileIndices; Processed.Clear(); CRCs.Clear(); Sizes.Clear(); _fileIsOpen = false; _currentSizeIsDefined = false; } HRESULT CFolderInStream::OpenStream() { _filePos = 0; while (_fileIndex < _numFiles) { _currentSizeIsDefined = false; CMyComPtr<ISequentialInStream> stream; HRESULT result = _updateCallback->GetStream(_fileIndices[_fileIndex], &stream); if (result != S_OK && result != S_FALSE) return result; _fileIndex++; _inStreamWithHashSpec->SetStream(stream); _inStreamWithHashSpec->Init(); if (!stream) { RINOK(_updateCallback->SetOperationResult(NArchive::NUpdate::NOperationResult::kOK)); Sizes.Add(0); Processed.Add(result == S_OK); AddDigest(); continue; } CMyComPtr<IStreamGetSize> streamGetSize; if (stream.QueryInterface(IID_IStreamGetSize, &streamGetSize) == S_OK) { if(streamGetSize) { _currentSizeIsDefined = true; RINOK(streamGetSize->GetSize(&_currentSize)); } } _fileIsOpen = true; return S_OK; } return S_OK; } void CFolderInStream::AddDigest() { CRCs.Add(_inStreamWithHashSpec->GetCRC()); } HRESULT CFolderInStream::CloseStream() { RINOK(_updateCallback->SetOperationResult(NArchive::NUpdate::NOperationResult::kOK)); _inStreamWithHashSpec->ReleaseStream(); _fileIsOpen = false; Processed.Add(true); Sizes.Add(_filePos); AddDigest(); return S_OK; } STDMETHODIMP CFolderInStream::Read(void *data, UInt32 size, UInt32 *processedSize) { UInt32 realProcessedSize = 0; while ((_fileIndex < _numFiles || _fileIsOpen) && size > 0) { if (_fileIsOpen) { UInt32 localProcessedSize; RINOK(_inStreamWithHash->Read( ((Byte *)data) + realProcessedSize, size, &localProcessedSize)); if (localProcessedSize == 0) { RINOK(CloseStream()); continue; } realProcessedSize += localProcessedSize; _filePos += localProcessedSize; size -= localProcessedSize; break; } else { RINOK(OpenStream()); } } if (processedSize != 0) *processedSize = realProcessedSize; return S_OK; } STDMETHODIMP CFolderInStream::GetSubStreamSize(UInt64 subStream, UInt64 *value) { *value = 0; int subStreamIndex = (int)subStream; if (subStreamIndex < 0 || subStream > Sizes.Size()) return E_FAIL; if (subStreamIndex < Sizes.Size()) { *value= Sizes[subStreamIndex]; return S_OK; } if (!_currentSizeIsDefined) return S_FALSE; *value = _currentSize; return S_OK; } }}
{ "pile_set_name": "Github" }
Dummy::Application.configure do # Settings specified here will take precedence over those in config/application.rb # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated between test runs. Don't rely on the data there! config.cache_classes = true # Configure static asset server for tests with Cache-Control for performance config.serve_static_assets = true config.static_cache_control = "public, max-age=3600" # Log error messages when you accidentally call methods on nil config.whiny_nils = true # Show full error reports and disable caching config.consider_all_requests_local = true config.action_controller.perform_caching = false # Raise exceptions instead of rendering exception templates config.action_dispatch.show_exceptions = false # Disable request forgery protection in test environment config.action_controller.allow_forgery_protection = false # Tell Action Mailer not to deliver emails to the real world. # The :test delivery method accumulates sent emails in the # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test # Use SQL instead of Active Record's schema dumper when creating the test database. # This is necessary if your schema can't be completely dumped by the schema dumper, # like if you have constraints or database-specific column types # config.active_record.schema_format = :sql # Print deprecation notices to the stderr config.active_support.deprecation = :stderr end
{ "pile_set_name": "Github" }
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context="com.hmkcode.nearpime.activities.NewPostActivity" android:weightSum="2" android:orientation="vertical" > <RelativeLayout android:layout_weight="1.5" android:layout_width="match_parent" android:layout_height="0dp"> <ImageView android:layout_width="match_parent" android:layout_height="match_parent" android:src="@drawable/balloon" android:scaleType="fitXY" android:contentDescription="Main Image" android:padding="1dp"/> <ImageView android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/image_border" android:contentDescription="Image Border" android:padding="0dp"/> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:contentDescription="image" android:clickable="true" android:padding="4dp" android:layout_margin="8dp" android:scaleType="fitXY" android:background="@drawable/edit_states" android:src="@drawable/ic_action_edit" android:layout_alignParentBottom="true" android:layout_alignParentRight="true"/> </RelativeLayout> <RelativeLayout android:layout_width="wrap_content" android:layout_height="0dp" android:layout_weight="0.25" android:layout_marginTop="@dimen/activity_vertical_margin"> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/textview_border" android:hint="Enter sample text..." android:paddingTop="6dp" android:paddingBottom="8dp" android:paddingLeft="6dp" android:textSize="18sp" android:gravity="center_vertical"/> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:contentDescription="Edit image icon" android:clickable="true" android:padding="4dp" android:layout_margin="8dp" android:scaleType="fitXY" android:background="@drawable/edit_states" android:src="@drawable/ic_action_edit" android:layout_alignParentBottom="true" android:layout_alignParentRight="true"/> </RelativeLayout> </LinearLayout>
{ "pile_set_name": "Github" }
/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule shallowEqual * @typechecks * @flow */ /*eslint-disable no-self-compare */ 'use strict'; const hasOwnProperty = Object.prototype.hasOwnProperty; /** * inlined Object.is polyfill to avoid requiring consumers ship their own * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is */ function is(x: mixed, y: mixed): boolean { // SameValue algorithm if (x === y) { // Steps 1-5, 7-10 // Steps 6.b-6.e: +0 != -0 // Added the nonzero y check to make Flow happy, but it is redundant return x !== 0 || y !== 0 || 1 / x === 1 / y; } else { // Step 6.a: NaN == NaN return x !== x && y !== y; } } /** * Performs equality by iterating through keys on an object and returning false * when any key has values which are not strictly equal between the arguments. * Returns true when the values of all keys are strictly equal. */ function shallowEqual(objA: mixed, objB: mixed): boolean { if (is(objA, objB)) { return true; } if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { return false; } const keysA = Object.keys(objA); const keysB = Object.keys(objB); if (keysA.length !== keysB.length) { return false; } // Test for A's keys different from B. for (let i = 0; i < keysA.length; i++) { if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { return false; } } return true; } module.exports = shallowEqual;
{ "pile_set_name": "Github" }
# Change Log ## [v0.4.0](https://github.com/akeru-inc/xcnotary/releases/tag/v0.4.0) * Added support for .dmg file notarization. [#3](https://github.com/akeru-inc/xcnotary/issues/3) * Handle "Unnotarized Developer ID" spctl response for new Developer accounts. [#4](https://github.com/akeru-inc/xcnotary/issues/4) ## [v0.3.0](https://github.com/akeru-inc/xcnotary/releases/tag/v0.3.0) * New `--provider` flag to support for account associated with more than one developer team. [#2](https://github.com/akeru-inc/xcnotary/issues/2) ## [v0.2.0](https://github.com/akeru-inc/xcnotary/releases/tag/v0.2.0) * Added support for .pkg file notarization. [#1](https://github.com/akeru-inc/xcnotary/issues/1) * Revised command line interface for additional flexibility, breaking backward-compatibility from 0.1.0. Command argument now needs to be specified, i.e. `xcnotary precheck` or `xcnotary notarize`. * Code signing checks are now tested using generated bundles and packages of various levels of code signing correctness. ## [v0.1.0](https://github.com/akeru-inc/xcnotary/releases/tag/v0.1.0) Initial release.
{ "pile_set_name": "Github" }
// Boost.Signals library // Copyright Douglas Gregor 2003-2004. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // For more information, see http://www.boost.org/libs/signals #include <boost/signal.hpp>
{ "pile_set_name": "Github" }
/// Copyright (c) 2009 Microsoft Corporation /// /// 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 Microsoft 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. ES5Harness.registerTest({ id: "15.4.4.20-9-c-i-22", path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-22.js", description: "Array.prototype.filter - element to be retrieved is inherited accessor property without a get function on an Array", test: function testcase() { function callbackfn(val, idx, obj) { return undefined === val && idx === 0; } try { Object.defineProperty(Array.prototype, "0", { set: function () { }, configurable: true }); var newArr = [, ].filter(callbackfn); return newArr.length === 1 && newArr[0] === undefined; } finally { delete Array.prototype[0]; } }, precondition: function prereq() { return fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays(); } });
{ "pile_set_name": "Github" }
# created by tools/tclZIC.tcl - do not edit if {![info exists TZData(Australia/Perth)]} { LoadTimeZoneFile Australia/Perth } set TZData(:Australia/West) $TZData(:Australia/Perth)
{ "pile_set_name": "Github" }
{% set zun_log_dir = '/var/log/kolla/zun' %} Listen {{ api_interface_address | put_address_in_context('url') }}:{{ zun_api_port }} ServerSignature Off ServerTokens Prod TraceEnable off KeepAliveTimeout {{ kolla_httpd_keep_alive }} ErrorLog "{{ zun_log_dir }}/apache-error.log" <IfModule log_config_module> CustomLog "{{ zun_log_dir }}/apache-access.log" common </IfModule> {% if zun_logging_debug | bool %} LogLevel info {% endif %} <VirtualHost *:{{ zun_api_port }}> ## Vhost docroot DocumentRoot "/var/www/cgi-bin/zun" ## Directories, there should at least be a declaration for /var/www/cgi-bin/zun <Directory "/var/www/cgi-bin/zun"> Options Indexes FollowSymLinks MultiViews AllowOverride None Require all granted </Directory> ## Logging ErrorLog "{{ zun_log_dir }}/zun_api_wsgi_error.log" ServerSignature Off LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat CustomLog "{{ zun_log_dir }}/zun_api_wsgi_access.log" logformat WSGIApplicationGroup %{GLOBAL} WSGIDaemonProcess zun group=zun processes={{ openstack_service_workers }} threads=1 user=zun WSGIProcessGroup zun WSGIScriptAlias / "/var/www/cgi-bin/zun/app.wsgi" </VirtualHost>
{ "pile_set_name": "Github" }
--- title: Document your app list (Windows 10) description: This planning topic describes the app information that you should document when you create a list of apps for AppLocker policies. ms.assetid: b155284b-f75d-4405-aecf-b74221622dc0 ms.reviewer: ms.author: dansimp ms.prod: w10 ms.mktglfcycl: deploy ms.sitesec: library ms.pagetype: security ms.localizationpriority: medium author: dansimp manager: dansimp audience: ITPro ms.collection: M365-security-compliance ms.topic: conceptual ms.date: 09/21/2017 --- # Document your app list **Applies to** - Windows 10 - Windows Server This planning topic describes the app information that you should document when you create a list of apps for AppLocker policies. ## Record your findings **Apps** Record the name of the app, whether it is signed as indicated by the publisher's name, and whether it is a mission critical, business productivity, optional, or personal app. Later, as you manage your rules, AppLocker displays this information in the format shown in the following example: *MICROSOFT OFFICE INFOPATH signed by O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US*. **Installation path** Record the installation path of the apps. For example, Microsoft Office 2016 installs files to *%programfiles%\\Microsoft Office\\Office16\\*, which is *C:\\Program Files\\Microsoft Office\\Office16\\* on most devices. The following table provides an example of how to list applications for each business group at the early stage of designing your application control policies. Eventually, as more planning information is added to the list, the information can be used to build AppLocker rules. <table> <colgroup> <col width="20%" /> <col width="20%" /> <col width="20%" /> <col width="20%" /> <col width="20%" /> </colgroup> <thead> <tr class="header"> <th align="left">Business group</th> <th align="left">Organizational unit</th> <th align="left">Implement AppLocker?</th> <th align="left">Apps</th> <th align="left">Installation path</th> </tr> </thead> <tbody> <tr class="odd"> <td align="left"><p>Bank Tellers</p></td> <td align="left"><p>Teller-East and Teller-West</p></td> <td align="left"><p>Yes</p></td> <td align="left"><p>Teller Software</p></td> <td align="left"><p>C:\Program Files\Woodgrove\Teller.exe</p></td> </tr> <tr class="even"> <td align="left"><p></p></td> <td align="left"><p></p></td> <td align="left"><p></p></td> <td align="left"><p>Windows files</p></td> <td align="left"><p>C:\Windows</p></td> </tr> <tr class="odd"> <td align="left"><p>Human Resources</p></td> <td align="left"><p>HR-All</p></td> <td align="left"><p>Yes</p></td> <td align="left"><p>Check Payout</p></td> <td align="left"><p>C:\Program Files\Woodgrove\HR\Checkcut.exe</p></td> </tr> <tr class="even"> <td align="left"><p></p></td> <td align="left"><p></p></td> <td align="left"><p></p></td> <td align="left"><p>Time Sheet Organizer</p></td> <td align="left"><p>C:\Program Files\Woodgrove\HR\Timesheet.exe</p></td> </tr> <tr class="odd"> <td align="left"><p></p></td> <td align="left"><p></p></td> <td align="left"><p></p></td> <td align="left"><p>Internet Explorer 7</p></td> <td align="left"><p>C:\Program Files\Internet Explorer&lt;/p&gt;</td> </tr> <tr class="even"> <td align="left"><p></p></td> <td align="left"><p></p></td> <td align="left"><p></p></td> <td align="left"><p>Windows files</p></td> <td align="left"><p>C:\Windows</p></td> </tr> </tbody> </table> &gt;<b>Note:</b> AppLocker only supports publisher rules for Universal Windows apps. Therefore, collecting the installation path information for Universal Windows apps is not necessary. <b>Event processing</b> As you create your list of apps, you need to consider how to manage the events that are generated by user access, or you need to deny running those apps to make your users as productive as possible. The following list is an example of what to consider and what to record: - Will event forwarding be implemented for AppLocker events? - What is the location of the AppLocker event collection? - Should an event archival policy be implemented? - Will the events be analyzed and how often? - Should a security policy be in place for event collection? **Policy maintenance** As you create your list of apps, you need to consider how to manage and maintain the policies that you will eventually create. The following list is an example of what to consider and what to record: - How will rules be updated for emergency app access and permanent access? - How will apps be removed? - How many older versions of the same app will be maintained? - How will new apps be introduced? ## Next steps After you have created the list of applications, the next step is to identify the rule collections, which will become the application control policies. This information can be added to the table under the following columns: - Use default rule or define new rule condition - Allow or deny - GPO name To identify the rule collections, see the following topics: - [Select the types of rules to create](select-types-of-rules-to-create.md) - [Determine Group Policy structure and rule enforcement](determine-group-policy-structure-and-rule-enforcement.md)
{ "pile_set_name": "Github" }
$color: #F00; #scsserror { background: $color; }
{ "pile_set_name": "Github" }
train_net: "models/pascal_voc/ZF/fast_rcnn/train.prototxt" base_lr: 0.001 lr_policy: "step" gamma: 0.1 stepsize: 30000 display: 20 average_loss: 100 momentum: 0.9 weight_decay: 0.0005 # We disable standard caffe solver snapshotting and implement our own snapshot # function snapshot: 0 # We still use the snapshot prefix, though snapshot_prefix: "zf_fast_rcnn" #debug_info: true #iter_size: 2
{ "pile_set_name": "Github" }