public int read  ( InputStream is ) throws IOException { init ( ) ; if ( is != null ) { byte [ ] buffer = GifUtils . streamToBytes ( is ) ; mGifHeader = new GifHeader ( buffer , mOffset ) ; mOffset += mGifHeader . size ; mWidth = mGifHeader . getWidth ( ) ; mHeight = mGifHeader . getHeight ( ) ; if ( ! mGifHeader . getSignature ( ) . equals ( "GIF" ) ) { return STATUS_FORMAT_ERROR ; } while ( buffer [ mOffset ] != TRR_CODE ) { if ( buffer [ mOffset ] == IMG_CODE ) { mImageBlock = new ImageBlock ( buffer , mOffset ) ; mOffset += mImageBlock . size ; mFrameCount ++ ; mCurrentImage = extractImage ( ) ; if ( mLastDispose > 0 ) { if ( mLastDispose == 3 ) { int n = mFrameCount - 2 ; if ( n > 0 ) { mLastImage = getFrame ( n - 1 ) ; } else { mLastImage = null ; } } } mGifFrames . add ( new GifFrame ( mCurrentImage , mDelay ) ) ; resetFrame ( ) ; } else if ( buffer [ mOffset ] == EXT_CODE ) { if ( buffer [ mOffset + 1 ] == GC_EXT ) { mGcExt = new GraphicControlExtension ( buffer , mOffset ) ; mOffset += mGcExt . size ; mDispose = mGcExt . getDisposalMothod ( ) ; if ( mDispose == 0 ) { mDispose = 1 ; } mDelay = mGcExt . getDelayTime ( ) * 10 ; } else if ( buffer [ mOffset + 1 ] == APP_EXT ) { ApplicationExtension appExt = new ApplicationExtension ( buffer , mOffset ) ; mOffset += appExt . size ; } else if ( buffer [ mOffset + 1 ] == CMT_EXT ) { CommentExtension cmtExt = new CommentExtension ( buffer , mOffset ) ; mOffset += cmtExt . size ; } else if ( buffer [ mOffset + 1 ] == TXT_EXT ) { PlainTextExtension txtExt = new PlainTextExtension ( buffer , mOffset ) ; mOffset += txtExt . size ; } else { throw new IOException ( ) ; } } else { throw new IOException ( ) ; } } } else { mStatus = STATUS_OPEN_ERROR ; } return mStatus ; }


private String parseIpToPingFromPing  ( String ping ) { String ip = "" ; if ( ping . contains ( PING ) ) { int indexOpen = ping . indexOf ( PARENTHESE_OPEN_PING ) ; int indexClose = ping . indexOf ( PARENTHESE_CLOSE_PING ) ; ip = ping . substring ( indexOpen + 1 , indexClose ) ; } return ip ; }

Obtiene la IP final que queremos hacer ping (ejemplo: si el usuario se transformó Google.fr, Final IP podría ser 8.8.8.8)


public static SM_SYSTEM_MESSAGE STR_SKILL_SUCC_MPAttack_Instant_A_TO_ME  ( int num0 , String skillcaster , String skillname ) { return new SM_SYSTEM_MESSAGE ( 1200686 , num0 , skillcaster , skillname ) ; }

Su MP ha disminuido en% NUM0 porque [% Skillcaster] usó [% de habilidad].


private void calcActualRenews  ( long now ) { int maxThreads = taskManager . getMaxThreads ( ) - 1 ; if ( calcList == null ) { calcList = new ArrayList ( maxThreads ) ; } for ( Iterator < Entry > iter = leases . values ( ) . iterator ( ) ; iter . hasNext ( ) ; ) { Entry e = iter . next ( ) ; e . actualRenew = e . renew ; if ( e . renewalsDone ( ) ) { if ( now >= e . expiration && e . desiredExpirationListener ( ) == null ) { logExpiration ( e ) ; iter . remove ( ) ; } continue ; } if ( e . endTime <= now && e . listener == null ) { logExpiration ( e ) ; iter . remove ( ) ; continue ; } if ( ! canBatch ( e ) ) { for ( Iterator < Entry > listIter = calcList . iterator ( ) ; listIter . hasNext ( ) ; ) { if ( e . renew >= listIter . next ( ) . actualRenew - renewalRTT ) { break ; } listIter . remove ( ) ; } if ( calcList . size ( ) == maxThreads ) { Entry e1 = calcList . remove ( 0 ) ; e . actualRenew = e1 . actualRenew - renewalRTT ; } calcList . add ( e ) ; } } calcList . clear ( ) ; long newWakeup = wakeupTime ( ) ; if ( queuer == null ) { if ( newWakeup < Long . MAX_VALUE ) { queuer = new QueuerTask ( newWakeup ) ; taskManager . add ( queuer ) ; } } else if ( newWakeup < queuer . wakeup || ( newWakeup == Long . MAX_VALUE && leaseInRenew . isEmpty ( ) ) ) { notifyAll ( ) ; } }

Calcule los tiempos de renovación reales y empuje / reinicie el queuer


public DatabaseGetCitiesQuery regionId  ( Integer value ) { return unsafeParam ( "region_id" , value ) ; }


@ Override public int read  ( ) throws IOException  { int c = fSurrogate ; if ( fSurrogate == - 1 ) { int index = 0 ; int b0 = index == fOffset ? fInputStream . read ( ) : fBuffer [ index ++ ] & 0x00FF ; if ( b0 == - 1 ) { return - 1 ; } if ( b0 < 0x80 ) { c = ( char ) b0 ; } else if ( ( b0 & 0xE0 ) == 0xC0 && ( b0 & 0x1E ) != 0 ) { int b1 = index == fOffset ? fInputStream . read ( ) : fBuffer [ index ++ ] & 0x00FF ; if ( b1 == - 1 ) { expectedByte ( 2 , 2 ) ; } if ( ( b1 & 0xC0 ) != 0x80 ) { invalidByte ( 2 , 2 , b1 ) ; } c = ( ( b0 << 6 ) & 0x07C0 ) | ( b1 & 0x003F ) ; } else if ( ( b0 & 0xF0 ) == 0xE0 ) { int b1 = index == fOffset ? fInputStream . read ( ) : fBuffer [ index ++ ] & 0x00FF ; if ( b1 == - 1 ) { expectedByte ( 2 , 3 ) ; } if ( ( b1 & 0xC0 ) != 0x80 || ( b0 == 0xED && b1 >= 0xA0 ) || ( ( b0 & 0x0F ) == 0 && ( b1 & 0x20 ) == 0 ) ) { invalidByte ( 2 , 3 , b1 ) ; } int b2 = index == fOffset ? fInputStream . read ( ) : fBuffer [ index ++ ] & 0x00FF ; if ( b2 == - 1 ) { expectedByte ( 3 , 3 ) ; } if ( ( b2 & 0xC0 ) != 0x80 ) { invalidByte ( 3 , 3 , b2 ) ; } c = ( ( b0 << 12 ) & 0xF000 ) | ( ( b1 << 6 ) & 0x0FC0 ) | ( b2 & 0x003F ) ; } else if ( ( b0 & 0xF8 ) == 0xF0 ) { int b1 = index == fOffset ? fInputStream . read ( ) : fBuffer [ index ++ ] & 0x00FF ; if ( b1 == - 1 ) { expectedByte ( 2 , 4 ) ; } if ( ( b1 & 0xC0 ) != 0x80 || ( ( b1 & 0x30 ) == 0 && ( b0 & 0x07 ) == 0 ) ) { invalidByte ( 2 , 3 , b1 ) ; } int b2 = index == fOffset ? fInputStream . read ( ) : fBuffer [ index ++ ] & 0x00FF ; if ( b2 == - 1 ) { expectedByte ( 3 , 4 ) ; } if ( ( b2 & 0xC0 ) != 0x80 ) { invalidByte ( 3 , 3 , b2 ) ; } int b3 = index == fOffset ? fInputStream . read ( ) : fBuffer [ index ++ ] & 0x00FF ; if ( b3 == - 1 ) { expectedByte ( 4 , 4 ) ; } if ( ( b3 & 0xC0 ) != 0x80 ) { invalidByte ( 4 , 4 , b3 ) ; } int uuuuu = ( ( b0 << 2 ) & 0x001C ) | ( ( b1 >> 4 ) & 0x0003 ) ; if ( uuuuu > 0x10 ) { invalidSurrogate ( uuuuu ) ; } int wwww = uuuuu - 1 ; int hs = 0xD800 | ( ( wwww << 6 ) & 0x03C0 ) | ( ( b1 << 2 ) & 0x003C ) | ( ( b2 >> 4 ) & 0x0003 ) ; int ls = 0xDC00 | ( ( b2 << 6 ) & 0x03C0 ) | ( b3 & 0x003F ) ; c = hs ; fSurrogate = ls ; } else { invalidByte ( 1 , 1 , b0 ) ; } } else { fSurrogate = - 1 ; } if ( DEBUG_READ ) { System . out . println ( "read(): 0x" + Integer . toHexString ( c ) ) ; } return c ; }

Lea un solo carácter.Este método bloqueará hasta que se disponga de un carácter, se produce un error de E / S, o se alcanza el final del flujo.<P /> <P> Subclasses que tienen la intención de admitir una entrada eficiente de un solo carácter deben anular este método.


public void addAll  ( final Iterable < BSPTree < S > > iterator ) { for ( final BSPTree < S > node : iterator ) { add ( node ) ; } }


private int klattRule4  ( Element segment ) { Element syllable = getSyllable ( segment ) ; if ( ! isWordFinal ( syllable ) ) { if ( isInNucleus ( segment ) ) { return getPropertyAsInteger ( "rule4.nucleus" ) ; } } return 100 ; }

Regla de Klatt 4: acortamiento no palabra final.


public RegexSearchTupleSet ( boolean caseSensitive ) { m_caseSensitive = caseSensitive ; }

Crea un nuevo conjunto de tuplas de búsqueda de expresión regular.


public PhotosGetAlbumsCountQuery groupId  ( Integer value ) { return unsafeParam ( "group_id" , value ) ; }


public void treeWillExpand  ( TreeExpansionEvent event ) throws ExpandVetoException { if ( classificationViewer . isLocked ( ) ) { throw new ExpandVetoException ( event ) ; } jTree . addChildren ( ( ViewerJTree . MyJTreeNode ) event . getPath ( ) . getLastPathComponent ( ) ) ; }

Se invoca cada vez que un nodo en el árbol está a punto de ser expandido.


public void loadDataStringFromFile  ( String sFilename ) throws java . io . IOException , java . io . FileNotFoundException  { String sDataString = utils . loadFileToStringWithNewlines ( sFilename ) ; setDataString ( sDataString ) ; }

Crea el gráfico basado en una cadena de datos cargada de un archivo dado.


public static boolean useDarkTheme  ( ) { return sDarkTheme ; }

Dado que no podemos usar el contexto de la aplicación para recuperar el tema actual, recuperamos el tema del contexto de la actividad cuando se inicializa el objeto.


public static int addAndCheck  ( int x , int y ) throws MathRuntimeException  { long s = ( long ) x + ( long ) y ; if ( s < Integer . MIN_VALUE || s > Integer . MAX_VALUE ) { throw new MathRuntimeException ( LocalizedCoreFormats . OVERFLOW_IN_ADDITION , x , y ) ; } return ( int ) s ; }

Añadir dos enteros, comprobando el desbordamiento.


public void show  ( ) { if ( ! isVisible ) { textView . setVisibility ( VISIBLE ) ; textView . startAnimation ( fadeIn ) ; isVisible = true ; } }

Inicia Fade en animación y muestra la vista de texto.


@ Override public void apply  ( NexusStreamParser np ) throws Exception { np . matchIgnoreCase ( "detach remoteServer=" ) ; final String url = np . getWordFileNamePunctuation ( ) ; np . matchIgnoreCase ( ";" ) ; if ( ( ( megan . remote . RemoteServiceBrowser ) getViewer ( ) ) . closeRemoteService ( url ) ) System . err . println ( "Service closed: " + url ) ; else NotificationsInSwing . showError ( getViewer ( ) . getFrame ( ) , "Failed to close service: " + url ) ; }


private String convertToBoxItemName  ( String string ) { return string . replace ( "/" , "_" ) . replace ( "\\" , "_" ) ; }

Convierte una cadena en un nombre de elemento de caja válido.


static private void runUnconstrainedLS  ( int n , double [ ] d , double [ ] x ) { int index = 0 ; for ( int i = 0 ; i <= n - 3 ; i ++ ) { x [ index ] = ( d [ index ] + d [ index + ( n - i - 2 ) + 1 ] - d [ index + 1 ] ) / 2.0 ; index ++ ; for ( int j = i + 2 ; j <= n - 2 ; j ++ ) { x [ index ] = ( d [ index ] + d [ index + ( n - i - 2 ) + 1 ] - d [ index + 1 ] - d [ index + ( n - i - 2 ) ] ) / 2.0 ; index ++ ; } if ( i == 0 ) x [ index ] = ( d [ 0 ] + d [ n - 2 ] - d [ 2 * n - 4 ] ) / 2.0 ; else x [ index ] = ( d [ index ] + d [ i ] - d [ i - 1 ] - d [ index + ( n - i - 2 ) ] ) / 2.0 ; index ++ ; } x [ index ] = ( d [ index ] + d [ n - 2 ] - d [ n - 3 ] ) / 2.0 ; }

Calcule las longitudes de la rama para los mínimos cuadrados sin restricciones con la fórmula de CHEPOI y Fichet (¡esto requiere o (n ^ 2) solo!).


protected void configureXML11Pipeline  ( ) { if ( fCurrentDVFactory != fXML11DatatypeFactory ) { fCurrentDVFactory = fXML11DatatypeFactory ; setProperty ( DATATYPE_VALIDATOR_FACTORY , fCurrentDVFactory ) ; } if ( fCurrentDTDScanner != fXML11DTDScanner ) { fCurrentDTDScanner = fXML11DTDScanner ; setProperty ( DTD_SCANNER , fCurrentDTDScanner ) ; setProperty ( DTD_PROCESSOR , fXML11DTDProcessor ) ; } fXML11DTDScanner . setDTDHandler ( fXML11DTDProcessor ) ; fXML11DTDProcessor . setDTDSource ( fXML11DTDScanner ) ; fXML11DTDProcessor . setDTDHandler ( fDTDHandler ) ; if ( fDTDHandler != null ) { fDTDHandler . setDTDSource ( fXML11DTDProcessor ) ; } fXML11DTDScanner . setDTDContentModelHandler ( fXML11DTDProcessor ) ; fXML11DTDProcessor . setDTDContentModelSource ( fXML11DTDScanner ) ; fXML11DTDProcessor . setDTDContentModelHandler ( fDTDContentModelHandler ) ; if ( fDTDContentModelHandler != null ) { fDTDContentModelHandler . setDTDContentModelSource ( fXML11DTDProcessor ) ; } if ( fFeatures . get ( NAMESPACES ) == Boolean . TRUE ) { if ( fCurrentScanner != fXML11NSDocScanner ) { fCurrentScanner = fXML11NSDocScanner ; setProperty ( DOCUMENT_SCANNER , fXML11NSDocScanner ) ; setProperty ( DTD_VALIDATOR , fXML11NSDTDValidator ) ; } fXML11NSDocScanner . setDTDValidator ( fXML11NSDTDValidator ) ; fXML11NSDocScanner . setDocumentHandler ( fXML11NSDTDValidator ) ; fXML11NSDTDValidator . setDocumentSource ( fXML11NSDocScanner ) ; fXML11NSDTDValidator . setDocumentHandler ( fDocumentHandler ) ; if ( fDocumentHandler != null ) { fDocumentHandler . setDocumentSource ( fXML11NSDTDValidator ) ; } fLastComponent = fXML11NSDTDValidator ; } else { if ( fXML11DocScanner == null ) { fXML11DocScanner = new XML11DocumentScannerImpl ( ) ; addXML11Component ( fXML11DocScanner ) ; fXML11DTDValidator = new XML11DTDValidator ( ) ; addXML11Component ( fXML11DTDValidator ) ; } if ( fCurrentScanner != fXML11DocScanner ) { fCurrentScanner = fXML11DocScanner ; setProperty ( DOCUMENT_SCANNER , fXML11DocScanner ) ; setProperty ( DTD_VALIDATOR , fXML11DTDValidator ) ; } fXML11DocScanner . setDocumentHandler ( fXML11DTDValidator ) ; fXML11DTDValidator . setDocumentSource ( fXML11DocScanner ) ; fXML11DTDValidator . setDocumentHandler ( fDocumentHandler ) ; if ( fDocumentHandler != null ) { fDocumentHandler . setDocumentSource ( fXML11DTDValidator ) ; } fLastComponent = fXML11DTDValidator ; } }

Configura la tubería XML 1.1.Nota: Este método también restablece los nuevos componentes XML11.


private XSParticleDecl traverseSeqChoice  ( Element decl , XSDocumentInfo schemaDoc , SchemaGrammar grammar , int allContextFlags , boolean choice , XSObject parent ) { Object [ ] attrValues = fAttrChecker . checkAttributes ( decl , false , schemaDoc ) ; Element child = DOMUtil . getFirstChildElement ( decl ) ; XSAnnotationImpl annotation = null ; if ( child != null && DOMUtil . getLocalName ( child ) . equals ( SchemaSymbols . ELT_ANNOTATION ) ) { annotation = traverseAnnotationDecl ( child , attrValues , false , schemaDoc ) ; child = DOMUtil . getNextSiblingElement ( child ) ; } else { String text = DOMUtil . getSyntheticAnnotation ( decl ) ; if ( text != null ) { annotation = traverseSyntheticAnnotation ( decl , text , attrValues , false , schemaDoc ) ; } } String childName = null ; XSParticleDecl particle ; fPArray . pushContext ( ) ; for ( ; child != null ; child = DOMUtil . getNextSiblingElement ( child ) ) { particle = null ; childName = DOMUtil . getLocalName ( child ) ; if ( childName . equals ( SchemaSymbols . ELT_ELEMENT ) ) { particle = fSchemaHandler . fElementTraverser . traverseLocal ( child , schemaDoc , grammar , NOT_ALL_CONTEXT , parent ) ; } else if ( childName . equals ( SchemaSymbols . ELT_GROUP ) ) { particle = fSchemaHandler . fGroupTraverser . traverseLocal ( child , schemaDoc , grammar ) ; if ( hasAllContent ( particle ) ) { particle = null ; reportSchemaError ( "cos-all-limited.1.2" , null , child ) ; } } else if ( childName . equals ( SchemaSymbols . ELT_CHOICE ) ) { particle = traverseChoice ( child , schemaDoc , grammar , NOT_ALL_CONTEXT , parent ) ; } else if ( childName . equals ( SchemaSymbols . ELT_SEQUENCE ) ) { particle = traverseSequence ( child , schemaDoc , grammar , NOT_ALL_CONTEXT , parent ) ; } else if ( childName . equals ( SchemaSymbols . ELT_ANY ) ) { particle = fSchemaHandler . fWildCardTraverser . traverseAny ( child , schemaDoc , grammar ) ; } else { Object [ ] args ; if ( choice ) { args = new Object [ ] { "choice" , "(annotation?, (element | group | choice | sequence | any)*)" , DOMUtil . getLocalName ( child ) } ; } else { args = new Object [ ] { "sequence" , "(annotation?, (element | group | choice | sequence | any)*)" , DOMUtil . getLocalName ( child ) } ; } reportSchemaError ( "s4s-elt-must-match.1" , args , child ) ; } if ( particle != null ) fPArray . addParticle ( particle ) ; } particle = null ; XInt minAtt = ( XInt ) attrValues [ XSAttributeChecker . ATTIDX_MINOCCURS ] ; XInt maxAtt = ( XInt ) attrValues [ XSAttributeChecker . ATTIDX_MAXOCCURS ] ; Long defaultVals = ( Long ) attrValues [ XSAttributeChecker . ATTIDX_FROMDEFAULT ] ; XSModelGroupImpl group = new XSModelGroupImpl ( ) ; group . fCompositor = choice ? XSModelGroupImpl . MODELGROUP_CHOICE : XSModelGroupImpl . MODELGROUP_SEQUENCE ; group . fParticleCount = fPArray . getParticleCount ( ) ; group . fParticles = fPArray . popContext ( ) ; XSObjectList annotations ; if ( annotation != null ) { annotations = new XSObjectListImpl ( ) ; ( ( XSObjectListImpl ) annotations ) . addXSObject ( annotation ) ; } else { annotations = XSObjectListImpl . EMPTY_LIST ; } group . fAnnotations = annotations ; particle = new XSParticleDecl ( ) ; particle . fType = XSParticleDecl . PARTICLE_MODELGROUP ; particle . fMinOccurs = minAtt . intValue ( ) ; particle . fMaxOccurs = maxAtt . intValue ( ) ; particle . fValue = group ; particle . fAnnotations = annotations ; particle = checkOccurrences ( particle , choice ? SchemaSymbols . ELT_CHOICE : SchemaSymbols . ELT_SEQUENCE , ( Element ) decl . getParentNode ( ) , allContextFlags , defaultVals . longValue ( ) ) ; fAttrChecker . returnAttrArray ( attrValues , schemaDoc ) ; return particle ; }

Traversal común para <Choice> y <Secuencia>


private static double [ ] computeSimpsonReciprocal  ( ClassificationViewer viewer , ProgressListener progressListener ) throws IOException , CanceledException { progressListener . setMaximum ( 2 * viewer . getSelectedNodes ( ) . size ( ) ) ; progressListener . setProgress ( 0 ) ; int numberOfDatasets = viewer . getDocument ( ) . getNumberOfSamples ( ) ; double [ ] total = new double [ numberOfDatasets ] ; for ( Node v : viewer . getSelectedNodes ( ) ) { int [ ] summarized = viewer . getNodeData ( v ) . getSummarized ( ) ; for ( int i = 0 ; i < summarized . length ; i ++ ) total [ i ] += summarized [ i ] ; progressListener . incrementProgress ( ) ; } double [ ] result = new double [ numberOfDatasets ] ; for ( Node v : viewer . getSelectedNodes ( ) ) { int [ ] summarized = viewer . getNodeData ( v ) . getSummarized ( ) ; for ( int i = 0 ; i < summarized . length ; i ++ ) { double p = summarized [ i ] / total [ i ] ; result [ i ] += p * p ; } progressListener . incrementProgress ( ) ; } for ( int i = 0 ; i < result . length ; i ++ ) result [ i ] = result [ i ] > 0 ? 1.0 / result [ i ] : 0 ; return result ; }

calcular el índice de diversidad de Shannon-Weaver en bits


@ Override public void warning  ( SAXParseException exception ) { warningCount ++ ; if ( showWarnings && ( errorCount + warningCount < maxMessages ) ) { message ( "Warning" , exception ) ; } }


private void drawResultPoints  ( Bitmap barcode , float scaleFactor , Result rawResult ) { ResultPoint [ ] points = rawResult . getResultPoints ( ) ; if ( points != null && points . length > 0 ) { Canvas canvas = new Canvas ( barcode ) ; Paint paint = new Paint ( ) ; paint . setColor ( getResources ( ) . getColor ( R . color . result_points ) ) ; if ( points . length == 2 ) { paint . setStrokeWidth ( 4.0f ) ; drawLine ( canvas , paint , points [ 0 ] , points [ 1 ] , scaleFactor ) ; } else if ( points . length == 4 && ( rawResult . getBarcodeFormat ( ) == BarcodeFormat . UPC_A || rawResult . getBarcodeFormat ( ) == BarcodeFormat . EAN_13 ) ) { drawLine ( canvas , paint , points [ 0 ] , points [ 1 ] , scaleFactor ) ; drawLine ( canvas , paint , points [ 2 ] , points [ 3 ] , scaleFactor ) ; } else { paint . setStrokeWidth ( 10.0f ) ; for ( ResultPoint point : points ) { if ( point != null ) { canvas . drawPoint ( scaleFactor * point . getX ( ) , scaleFactor * point . getY ( ) , paint ) ; } } } } }

Superponga una línea para 1D o puntos para 2D para resaltar las características clave del código de barras.


public CM_MAY_LOGIN_INTO_GAME ( int opcode , State state , State ... restStates ) { super ( opcode , state , restStates ) ; }

Construye nueva instancia de <tt> cm_may_login_into_game </ tt> Packet


private void validate  ( AddFavoriteResourceRQ addFavoriteResourceRQ , String userName , String projectName ) { Project project = projectRepository . findOne ( projectName ) ; expect ( project , notNull ( ) ) . verify ( PROJECT_NOT_FOUND , projectName ) ; UserConfig assigned = project . getUsers ( ) . get ( userName ) ; expect ( assigned , notNull ( ) ) . verify ( ACCESS_DENIED , formattedSupplier ( "User '{}' not assigned to target project" , userName ) ) ; ReportPortalRepository < ? extends Shareable , String > repository = repositories . get ( addFavoriteResourceRQ . getType ( ) ) ; expect ( repository , notNull ( ) ) . verify ( UNABLE_ADD_TO_FAVORITE , formattedSupplier ( "Unknown resource type '{}'." , addFavoriteResourceRQ . getType ( ) ) ) ; Shareable shareable = repository . findOne ( addFavoriteResourceRQ . getResourceId ( ) ) ; expect ( shareable , notNull ( ) ) . verify ( UNABLE_ADD_TO_FAVORITE , formattedSupplier ( "Incorrect resource id '{}'." , addFavoriteResourceRQ . getResourceId ( ) ) ) ; expect ( shareable . getAcl ( ) . getEntries ( ) , contains ( hasACLPermission ( projectName , AclPermissions . READ ) ) ) . verify ( UNABLE_ADD_TO_FAVORITE , formattedSupplier ( "Resource with id '{}' isn't shared to project." , addFavoriteResourceRQ . getResourceId ( ) , projectName ) ) ; expect ( shareable . getAcl ( ) . getOwnerUserId ( ) , not ( equalTo ( userName . toLowerCase ( ) ) ) ) . verify ( UNABLE_ADD_TO_FAVORITE , formattedSupplier ( "User can't add own resource to favorites" ) ) ; List < FavoriteResource > resources = favoriteResourceRepository . findByFilter ( Utils . getUniqueFavoriteFilter ( userName , addFavoriteResourceRQ . getType ( ) . name ( ) , addFavoriteResourceRQ . getResourceId ( ) ) ) ; expect ( resources , not ( NOT_EMPTY_COLLECTION ) ) . verify ( UNABLE_ADD_TO_FAVORITE , formattedSupplier ( "Favorite resource with resource id '{}', type '{}' have already exist for user '{}'." , addFavoriteResourceRQ . getResourceId ( ) , addFavoriteResourceRQ . getType ( ) , userName ) ) ; }

Validar es ADDFOREITERESOURCERQ contiene el tipo de recurso y el ID de recurso correctos, y está ahorrando que ya existen un recurso favorito.


public static SM_SYSTEM_MESSAGE STR_MSG_CANNOT_ENTER_INSTANCE_COOL_TIME_HOUR  ( String worldname0 , String value1 ) { return new SM_SYSTEM_MESSAGE ( 1400029 , worldname0 , value1 ) ; }

Puede ingresar a% WorldName0 nuevamente después de% 1 hora (s).


public static byte [ ] decodeWebSafe  ( byte [ ] source , int off , int len ) throws Base64DecoderException { return decode ( source , off , len , WEBSAFE_DECODABET ) ; }

Decodishes Web Safe Base64 contenido en formato de matriz de bytes y devuelve la matriz de bytes decodificados.Los usos de codificación de la caja web web '-' en lugar de '+', '_' en lugar de '/'


public static int compareResourceFiles  ( @ Nullable PsiFile file1 , @ Nullable PsiFile file2 ) { if ( file1 == file2 ) { return 0 ; } else if ( file1 != null && file2 != null ) { boolean xml1 = file1 . getFileType ( ) == StdFileTypes . XML ; boolean xml2 = file2 . getFileType ( ) == StdFileTypes . XML ; if ( xml1 != xml2 ) { return xml1 ? - 1 : 1 ; } PsiDirectory parent1 = file1 . getParent ( ) ; PsiDirectory parent2 = file2 . getParent ( ) ; if ( parent1 != null && parent2 != null && parent1 != parent2 ) { String parentName1 = parent1 . getName ( ) ; String parentName2 = parent2 . getName ( ) ; boolean qualifier1 = parentName1 . indexOf ( '-' ) != - 1 ; boolean qualifier2 = parentName2 . indexOf ( '-' ) != - 1 ; if ( qualifier1 != qualifier2 ) { return qualifier1 ? 1 : - 1 ; } if ( qualifier1 ) { FolderConfiguration config1 = FolderConfiguration . getConfigForFolder ( parentName1 ) ; FolderConfiguration config2 = FolderConfiguration . getConfigForFolder ( parentName2 ) ; if ( config1 != null && config2 != null ) { return config1 . compareTo ( config2 ) ; } else if ( config1 != null ) { return - 1 ; } else if ( config2 != null ) { return 1 ; } int delta = parentName1 . compareTo ( parentName2 ) ; if ( delta != 0 ) { return delta ; } } } return file1 . getName ( ) . compareTo ( file2 . getName ( ) ) ; } else if ( file1 != null ) { return - 1 ; } else { return 1 ; } }

Método de utilidad Adecuado para las implementaciones de comparación que ordenan los archivos de recursos, que ordenarán archivos por carpeta base seguido de configuraciones alfabéticas.Prioriza los archivos XML más altos que los archivos no XML.(Las carpetas de archivos de recursos se clasifican por orden de configuración de la carpeta).


public SegmentInfo ( DataSegment segment ) { this . dataSource = segment . getDataSource ( ) ; this . interval = segment . getInterval ( ) ; this . version = segment . getVersion ( ) ; ShardSpec spec = segment . getShardSpec ( ) ; this . shardSpec = spec instanceof NumberedShardSpec ? ( NumberedShardSpec ) spec : new NumberedShardSpec ( ( NoneShardSpec ) spec ) ; this . size = segment . getSize ( ) ; this . identifier = segment . getIdentifier ( ) ; }

Dado que un segmento de datos druidas construye un objeto para mantener la información de esta partición.


public MicrosphereProjectionInterpolator ( InterpolatingMicrosphere microsphere , double exponent , boolean sharedSphere , double noInterpolationTolerance ) throws MathIllegalArgumentException { if ( exponent < 0 ) { throw new MathIllegalArgumentException ( LocalizedCoreFormats . NUMBER_TOO_SMALL , exponent , 0 ) ; } this . microsphere = microsphere ; this . exponent = exponent ; this . sharedSphere = sharedSphere ; this . noInterpolationTolerance = noInterpolationTolerance ; }


public static S2LatLngRect empty  ( ) { return new S2LatLngRect ( R1Interval . empty ( ) , S1Interval . empty ( ) ) ; }


public PhotosSaveMarketAlbumPhotoQuery ( VkApiClient client , UserActor actor , int groupId , String photo , int server , String hash ) { super ( client , "photos.saveMarketAlbumPhoto" , Utils . buildParametrizedType ( List . class , Photo . class ) ) ; accessToken ( actor . getAccessToken ( ) ) ; groupId ( groupId ) ; photo ( photo ) ; server ( server ) ; hash ( hash ) ; }

Crea una instancia abstractQueryBuilder que se puede usar para construir una solicitud API con varios parámetros


public static List < double [ ] > coordSplit  ( double [ ] vector ) { if ( vector == null ) return null ; List < double [ ] > ret = new ArrayList < double [ ] > ( ) ; double [ ] xVals = new double [ vector . length / 2 ] ; double [ ] yVals = new double [ vector . length / 2 ] ; int xTracker = 0 ; int yTracker = 0 ; for ( int i = 0 ; i < vector . length ; i ++ ) { if ( i % 2 == 0 ) xVals [ xTracker ++ ] = vector [ i ] ; else yVals [ yTracker ++ ] = vector [ i ] ; } ret . add ( xVals ) ; ret . add ( yVals ) ; return ret ; }

Esto devuelve la división de coordenadas en una lista de coordenadas de manera que los valores para RET [0] son los valores X y los [1] son los valores y


public static ValueGetterSpacePredicate < ServerEntry > pathIn  ( String path , Object ... values ) { return path ( path , in ( values ) ) ; }

Atajo para la ruta (camino, en (valores)).


private static void doCopyFile  ( File srcFile , File destFile , boolean preserveFileDate ) throws IOException { if ( destFile . exists ( ) && destFile . isDirectory ( ) ) { throw new IOException ( "Destination '" + destFile + "' exists but is a directory" ) ; } FileInputStream fis = null ; FileOutputStream fos = null ; FileChannel input = null ; FileChannel output = null ; try { fis = new FileInputStream ( srcFile ) ; fos = new FileOutputStream ( destFile ) ; input = fis . getChannel ( ) ; output = fos . getChannel ( ) ; long size = input . size ( ) ; long pos = 0 ; long count = 0 ; while ( pos < size ) { count = size - pos > FILE_COPY_BUFFER_SIZE ? FILE_COPY_BUFFER_SIZE : size - pos ; pos += output . transferFrom ( input , pos , count ) ; } } finally { IOUtils . closeQuietly ( output ) ; IOUtils . closeQuietly ( fos ) ; IOUtils . closeQuietly ( input ) ; IOUtils . closeQuietly ( fis ) ; } if ( srcFile . length ( ) != destFile . length ( ) ) { throw new IOException ( "Failed to copy full contents from '" + srcFile + "' to '" + destFile + "'" ) ; } if ( preserveFileDate ) { destFile . setLastModified ( srcFile . lastModified ( ) ) ; } }


public UnrevealBuilder withEndAction  ( @ NonNull final Runnable endAction ) { this . mEndAction = endAction ; return this ; }

Define la devolución de llamada de acción final.


static boolean isExceptionCaughtAt  ( SootClass e , Stmt stmt , Body b ) { Hierarchy h = new Hierarchy ( ) ; Iterator < Trap > trapsIt = b . getTraps ( ) . iterator ( ) ; while ( trapsIt . hasNext ( ) ) { Trap t = trapsIt . next ( ) ; if ( h . isClassSubclassOfIncluding ( e , t . getException ( ) ) ) { Iterator < Unit > it = b . getUnits ( ) . iterator ( t . getBeginUnit ( ) , t . getEndUnit ( ) ) ; while ( it . hasNext ( ) ) if ( stmt . equals ( it . next ( ) ) ) return true ; } } return false ; }

Si la excepción E se captura en STMT S en el cuerpo B, devuelva el controlador;De lo contrario, volverá nulo.


public String syllabify  ( String phoneString ) { LinkedList < String > phoneList = splitIntoAllophones ( phoneString ) ; syllabify ( phoneList ) ; StringBuilder sb = new StringBuilder ( ) ; for ( String p : phoneList ) { if ( sb . length ( ) > 0 ) sb . append ( " " ) ; sb . append ( p ) ; } return sb . toString ( ) ; }

Silabificar una cadena fonética, marcando límites de sílaba con caracteres de guión en la salida.Si las marcas de entrada se destacan las vocales con un sufijo "1", se eliminan estas marcas y se insertan comillas simples (') al principio de la sílaba correspondiente.


public ACQUAINT2DocumentSet ( String sTACXMLFile ) { DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory . newInstance ( ) ; XMLDoc = null ; Categories = null ; hsDocs = null ; hmDocsToCategories = null ; try { DocumentBuilder docBuilder = docBuilderFactory . newDocumentBuilder ( ) ; XMLDoc = docBuilder . parse ( new File ( sTACXMLFile ) ) ; } catch ( ParserConfigurationException ex ) { System . err . println ( "Invalid XML file. Details:" ) ; ex . printStackTrace ( System . err ) ; } catch ( SAXException ex ) { System . err . println ( "Invalid XML file. Details:" ) ; ex . printStackTrace ( System . err ) ; } catch ( IOException ex ) { System . err . println ( "Could not read XML file. Cause:" ) ; ex . printStackTrace ( System . err ) ; } if ( XMLDoc == null ) return ; hmDocsToCategories = new HashMap < String , String > ( ) ; XMLDoc . getDocumentElement ( ) . normalize ( ) ; }

Crea una nueva instancia de tacdocorest, dado un archivo formateado TAC08 correspondiente.


public void init$Children  ( ) { children = new ASTNode [ 3 ] ; setChild ( new Opt ( ) , 2 ) ; }

Inicializa la matriz de niños al tamaño correcto.Inicializa la lista y opta a los niños NTA.


public void drag  ( long time , float x , float y , float amountX , float amountY ) { float scrollDrag , discardDrag ; if ( mCurrentMode == Orientation . PORTRAIT ) { discardDrag = amountX ; scrollDrag = amountY ; } else { discardDrag = amountY ; scrollDrag = LocalizationUtils . isLayoutRtl ( ) ? - amountX : amountX ; } DragLock hintLock = computeDragLock ( scrollDrag , discardDrag ) ; if ( hintLock == DragLock . DISCARD ) { discard ( x , y , amountX , amountY ) ; } else { if ( mDragLock == DragLock . SCROLL && mDiscardingTab != null ) { commitDiscard ( time , false ) ; } scroll ( x , y , LocalizationUtils . isLayoutRtl ( ) ? - amountX : amountX , amountY , false ) ; } requestUpdate ( ) ; }

Llamado en el evento de arrastre (desde eventos de desplazamiento en el detector de gesto).


public void makeCurrentReadFrom  ( EglSurfaceBase readSurface ) { eglCore . makeCurrent ( eGLSurface , readSurface . eGLSurface ) ; }

Hace que nuestro contexto EGL y la corriente de superficie para dibujar, utilizando la superficie suministrada para la lectura.


public FileProcessor addInputSuffix  ( String ... suffixes ) { for ( String suffix : suffixes ) addInputRegex ( "(?i).*" + Pattern . quote ( suffix ) ) ; return this ; }

Agrega un sufijo insensible de casos para coincidir los archivos de entrada.


public static SpaceTypeDescriptor fromSerializableForm  ( Serializable versionedSerializableForm ) { if ( ! ( versionedSerializableForm instanceof TypeDescVersionedSerializable ) ) throw new IllegalArgumentException ( "wrapper must be an instance of " + TypeDescVersionedSerializable . class . getName ( ) ) ; return ( ( TypeDescVersionedSerializable ) versionedSerializableForm ) . getTypeDesc ( ) ; }

Lee el encabezado de la versión para el formulario serializable dado y devolvió un spacetypedenscriptor que coincide con esa versión


public CountDailyIntegrationTest ( ) { setResponseLogLengthLimit  ( 1000 ) ; dateFormat = new SimpleDateFormat ( "yyyy-MM-dd" ) ; Calendar cal = Calendar . getInstance ( ) ; cal . add ( Calendar . DATE , - 1 ) ; yesterday = dateFormat . format ( cal . getTime ( ) ) ; yesterday += "T00:00:00+0000" ; cal = Calendar . getInstance ( ) ; cal . add ( Calendar . DATE , 0 ) ; today = dateFormat . format ( cal . getTime ( ) ) ; today += "T00:00:00+0000" ; cal = Calendar . getInstance ( ) ; cal . add ( Calendar . DATE , 1 ) ; tomorrow = dateFormat . format ( cal . getTime ( ) ) ; tomorrow += "T00:00:00+0000" ; cal = Calendar . getInstance ( ) ; cal . add ( Calendar . DATE , 4 ) ; tomorrowPlus3 = dateFormat . format ( cal . getTime ( ) ) ; tomorrowPlus3 += "T00:00:00+0000" ; experiment = ExperimentFactory . createExperiment ( ) ; experiment . startTime = yesterday ; experiment . endTime = tomorrowPlus3 ; experiment . samplingPercent = 1.0 ; experiment . label = "experiment" ; experiment . applicationName = QBO + UUID . randomUUID ( ) ; DefaultNameExclusionStrategy experimentComparisonStrategy = new DefaultNameExclusionStrategy ( "creationTime" , "modificationTime" , "ruleJson" ) ; experiment . setSerializationStrategy ( experimentComparisonStrategy ) ; }

Inicializa un experimento predeterminado.


public ProjectPlan ( Plan p , Set < String > fldNames ) { this . p = p ; for ( String fldname : fldNames ) schema . add ( fldname , p . schema ( ) ) ; hist = projectHistogram ( p . histogram ( ) , fldNames ) ; }

Crea un nuevo nodo de proyecto en el árbol de consulta, que tiene la licenciatura en Subquerica y Campo especificada.


Crea una nueva instancia de ngrgrhistogrammparator.


private LinkedHashSet < DimensionField > calculateDefaultDimensionFields  ( @ NotNull LinkedHashSet < DimensionField > dimensionFields , @ NotNull LinkedHashSet < DimensionField > defaultDimensionFields ) { if ( defaultDimensionFields . isEmpty ( ) ) { return dimensionFields . stream ( ) . limit ( 2 ) . collect ( Collectors . toCollection ( null ) ) ; } else { return defaultDimensionFields ; } }

Use los campos de 1er 2 dimensiones como los campos predeterminados si el conjunto de campos predeterminado real está vacío.


static void registerLintRuleNames  ( HttpConfigAspect aspect ) { aspect . registerLintRuleName ( REST_STYLE_RULE_NAME , METHOD_SHADOWED_RULE_NAME ) ; }

Registra nombres de reglas de pelusa utilizadas por el analizador.


public static boolean different  ( GenericRecord first , GenericRecord second , List < String > valueFieldNames ) { for ( String valueFieldName : valueFieldNames ) { Object firstValue = first . get ( valueFieldName ) ; Object secondValue = second . get ( valueFieldName ) ; if ( firstValue != null && secondValue != null && ! firstValue . equals ( secondValue ) ) { return true ; } if ( ( firstValue != null && secondValue == null ) || ( firstValue == null && secondValue != null ) ) { return true ; } } return false ; }

Si los dos registros se consideran diferentes, según los valores de los campos que se han proporcionado para verificar las diferencias.


public VisualTable ( Table parent , Visualization vis , String group , Predicate rowFilter , Schema schema ) { super ( parent , rowFilter , null , TableVisualItem . class ) ; init ( vis , group , schema ) ; }


public ResultSet parse  ( JsonNode jsonResult , ZonedSchema schema , QueryType queryType ) { LOG . trace ( "Parsing druid query {} by json result: {} using schema: {}" , queryType , jsonResult , schema ) ; if ( ! ( queryType instanceof DefaultQueryType ) ) { unsupportedQueryType ( queryType ) ; } DefaultQueryType defaultQueryType = ( DefaultQueryType ) queryType ; Set < DimensionColumn > dimensionColumns = schema . getColumns ( DimensionColumn . class ) ; Set < MetricColumn > metricColumns = schema . getColumns ( MetricColumn . class ) ; List < Result > results = null ; switch ( defaultQueryType ) { case GROUP_BY : results = makeGroupByResults ( jsonResult , dimensionColumns , metricColumns , schema . getDateTimeZone ( ) ) ; break ; case TOP_N : results = makeTopNResults ( jsonResult , dimensionColumns , metricColumns , schema . getDateTimeZone ( ) ) ; break ; case TIMESERIES : results = makeTimeSeriesResults ( jsonResult , metricColumns , schema . getDateTimeZone ( ) ) ; break ; case LOOKBACK : results = makeLookbackResults ( jsonResult , dimensionColumns , metricColumns , schema . getDateTimeZone ( ) ) ; break ; default : unsupportedQueryType ( queryType ) ; } LOG . trace ( "Parsed druid query {} results: {}" , queryType , results ) ; return new ResultSet ( results , schema ) ; }

Parse el resultado del goupby Druid en el resultado.


public static String createXmlString  ( AnnotatedString input ) { Document doc = createXmlDocument ( input ) ; StringWriter out = new StringWriter ( ) ; try { Transformer transformer = TransformerFactory . newInstance ( ) . newTransformer ( ) ; transformer . setOutputProperty ( OutputKeys . INDENT , "yes" ) ; DOMSource source = new DOMSource ( doc ) ; StreamResult result = new StreamResult ( out ) ; transformer . transform ( source , result ) ; } catch ( TransformerException te ) { throw new ProcessingException ( te . getLocalizedMessage ( ) , te ) ; } return out . toString ( ) ; }

Crea una cadena XML de la cadena anotada dada.


public void writeInt  ( int value ) throws JMSException  { initializeWriting ( ) ; try { this . dataOut . write ( _INT ) ; this . dataOut . writeInt ( value ) ; } catch ( IOException ioe ) { raise ( ioe ) ; } }

Escribe un <código> int </ code> al mensaje de transmisión.


@ Override public Object invoke  ( Object proxy , Method method , Object [ ] args ) throws InvocationTargetException , IllegalAccessException { if ( list == null || ! cacheResults ) { List < WebElement > webElements = locator . findElements ( ) ; list = new ArrayList < > ( webElements . size ( ) ) ; for ( WebElement item : webElements ) { Object myItem = injector . inject ( type , item , framePath ) ; list . add ( myItem ) ; } list = Collections . unmodifiableList ( list ) ; } return method . invoke ( list , args ) ; }

Este método intercepta todos los métodos en el objeto proxiado.Primero construye la lista de solicitudes de pagos (o reusiones existente si se permite el almacenamiento en caché), luego se realiza con el método original.


public static List < String > parseStringGroup  ( final String string , final String regex , final String firstRegex , final String firstRegexReplace , final int lastRegexStringLength ) { List < String > list = null ; if ( string != null ) { list = new ArrayList < String > ( ) ; int lastRegexLength = lastRegexStringLength < 0 ? 0 : lastRegexStringLength ; Pattern pattern = Pattern . compile ( regex ) ; Matcher matcher = pattern . matcher ( string ) ; String group = null ; int start = 0 ; while ( matcher . find ( start ) ) { start = matcher . end ( ) ; group = matcher . group ( ) ; group = group . replaceFirst ( firstRegex , firstRegexReplace ) ; group = group . substring ( 0 , group . length ( ) - lastRegexLength ) ; list . add ( group ) ; } } return list ; }

Método: marque la cadena coincida con la regulación o no y devuelva el valor del campo de coincidencia como {xxxx} puede encontrar xxxx


public static SM_SYSTEM_MESSAGE STR_PARTY_HE_LEAVE_PARTY  ( String value0 ) { return new SM_SYSTEM_MESSAGE ( 1300168 , value0 ) ; }


protected void handleTargetTextUnit  ( ITextUnit textUnit ) { if ( ! textUnit . isTranslatable ( ) ) { return ; } Locale targetLocale = localeService . findByBcp47Tag ( targetLocaleId . toBCP47 ( ) ) ; String name = textUnit . getName ( ) ; String sourceContent = textUnit . getSource ( ) . toString ( ) ; String translation = textUnit . getTarget ( targetLocaleId ) . toString ( ) ; ImportExportNote importExportNote = textUnitUtils . getImportExportNote ( textUnit ) ; if ( ! Strings . isNullOrEmpty ( translation ) ) { Long tmTextUnitId = tmTextUnitIdsByMd5ForAsset . get ( tmService . computeTMTextUnitMD5 ( name , sourceContent , importExportNote . getSourceComment ( ) ) ) ; if ( tmTextUnitId == null ) { String msg = "Trying to add a translation to an non existing text unit, name: " + name + ", comment: " + importExportNote . getSourceComment ( ) + ", source: " + sourceContent ; logger . error ( msg ) ; throw new RuntimeException ( msg ) ; } TMTextUnitVariant addTMTextUnitVariant = null ; if ( updateTM ) { logger . debug ( "Import assuming there is already some translations in the TM" ) ; addTMTextUnitVariant = tmService . addCurrentTMTextUnitVariant ( tmTextUnitId , targetLocale . getId ( ) , translation , importExportNote . getStatus ( ) , importExportNote . isIncludedInLocalizedFile ( ) , importExportNote . getCreatedDate ( ) ) ; } else { logger . debug ( "Import assuming there is no translation in the TM yet (optimized, don't check for update)" ) ; addTMTextUnitVariant = tmService . addTMTextUnitVariant ( tmTextUnitId , targetLocale . getId ( ) , translation , importExportNote . getTargetComment ( ) , importExportNote . getStatus ( ) , importExportNote . isIncludedInLocalizedFile ( ) , importExportNote . getCreatedDate ( ) ) ; tmService . makeTMTextUnitVariantCurrent ( asset . getRepository ( ) . getTm ( ) . getId ( ) , tmTextUnitId , targetLocale . getId ( ) , addTMTextUnitVariant . getId ( ) ) ; } for ( TMTextUnitVariantComment variantComment : importExportNote . getVariantComments ( ) ) { tmTextUnitVariantCommentService . addComment ( addTMTextUnitVariant . getId ( ) , variantComment . getType ( ) , variantComment . getSeverity ( ) , variantComment . getContent ( ) ) ; } } else { logger . debug ( "Empty translation for name: {}, skip it" , name ) ; } }

Importar unidades de texto objetivo en el TM


public AudioGetPopularQuery genreId  ( AudioGenre value ) { return unsafeParam ( "genre_id" , value ) ; }

ID de género.Ver la lista de géneros de audio.


private float [ ] loadBitmapData  ( Bitmap bitmap ) { final int [ ] pixels = new int [ width * height ] ; bitmap . getPixels ( pixels , 0 , width , 0 , 0 , width , height ) ; bitmap . recycle ( ) ; final float [ ] heightmapVertices = new float [ width * height * TOTAL_COMPONENT_COUNT ] ; int offset = 0 ; for ( int row = 0 ; row < height ; row ++ ) { for ( int col = 0 ; col < width ; col ++ ) { final Point point = getPoint ( pixels , row , col ) ; heightmapVertices [ offset ++ ] = point . x ; heightmapVertices [ offset ++ ] = point . y ; heightmapVertices [ offset ++ ] = point . z ; final Point top = getPoint ( pixels , row - 1 , col ) ; final Point left = getPoint ( pixels , row , col - 1 ) ; final Point right = getPoint ( pixels , row , col + 1 ) ; final Point bottom = getPoint ( pixels , row + 1 , col ) ; final Vector rightToLeft = Geometry . vectorBetween ( right , left ) ; final Vector topToBottom = Geometry . vectorBetween ( top , bottom ) ; final Vector normal = rightToLeft . crossProduct ( topToBottom ) . normalize ( ) ; heightmapVertices [ offset ++ ] = normal . x ; heightmapVertices [ offset ++ ] = normal . y ; heightmapVertices [ offset ++ ] = normal . z ; } } return heightmapVertices ; }

Copie los datos de MAYMAP en un objeto de búfer de vértices.


public String toString  ( ) { SimpleDateFormat formatter = getFormatter ( ) ; FieldPosition pos = new FieldPosition ( 0 ) ; StringBuffer buf = new StringBuffer ( 95 ) ; buf . append ( "DelegationAbsoluteTime[start: " ) ; format ( minStart , maxStart , formatter , buf , pos ) ; buf . append ( ", stop: " ) ; format ( minStop , maxStop , formatter , buf , pos ) ; buf . append ( ']' ) ; return buf . toString ( ) ; }

Devuelve una representación de cadena de este objeto.


public static int exportTaxon2TotalLength  ( String format , Director dir , File file , char separator , ProgressListener progressListener ) throws IOException { int totalLines = 0 ; try { final MainViewer viewer = dir . getMainViewer ( ) ; try ( BufferedWriter w = new BufferedWriter ( new FileWriter ( file ) ) ) { final IConnector connector = viewer . getDir ( ) . getDocument ( ) . getConnector ( ) ; final IClassificationBlock classificationBlock = connector . getClassificationBlock ( ClassificationType . Taxonomy . toString ( ) ) ; final java . util . Collection < Integer > taxonIds = viewer . getSelectedIds ( ) ; progressListener . setSubtask ( "Taxa to total length" ) ; progressListener . setMaximum ( taxonIds . size ( ) ) ; progressListener . setProgress ( 0 ) ; for ( int taxonId : taxonIds ) { Set < Integer > allBelow ; Node v = viewer . getTaxId2Node ( taxonId ) ; if ( v . getOutDegree ( ) == 0 ) allBelow = TaxonomyData . getTree ( ) . getAllDescendants ( taxonId ) ; else { allBelow = new HashSet < > ( ) ; allBelow . add ( taxonId ) ; } final String name = getTaxonLabelSource ( dir , format , taxonId ) ; if ( name != null ) { w . write ( name ) ; long length = 0L ; for ( int id : allBelow ) { if ( classificationBlock . getSum ( id ) > 0 ) { try ( IReadBlockIterator it = connector . getReadsIterator ( viewer . getClassName ( ) , id , 0 , 10000 , true , false ) ) { while ( it . hasNext ( ) ) { length += it . next ( ) . getReadLength ( ) ; } } totalLines ++ ; progressListener . checkForCancel ( ) ; } } w . write ( separator + "" + length + "\n" ) ; } progressListener . incrementProgress ( ) ; } } } catch ( CanceledException canceled ) { System . err . println ( "USER CANCELED" ) ; } return totalLines ; }

Nombre del taxón de exportación para contar el mapeo


public Hurt ( EntityLivingBase living , DamageSource source , float damage ) { super ( living ) ; this . source = source ; this . damage = damage ; }


@ Override public void apply  ( NexusStreamParser np ) throws Exception { }


public void removeSegment  ( int shapeIndex , int segmentIndex ) { List < WKTSegmentList > shapeList = segmentList . get ( shapeIndex ) ; if ( ( segmentIndex >= 0 ) && ( segmentIndex < shapeList . size ( ) ) ) { shapeList . remove ( segmentIndex ) ; } }

Elimina el segmento en el índice especificado.


public static boolean isOrSubOf  ( Class < ? > objectClass , Object parentObject ) { Class < ? > parentClass = parentObject . getClass ( ) ; return isOrSubOf ( objectClass , parentClass ) ; }

Pruebas si una clase es una clase de o una subclase del padre.


public ArrayFieldVector ( T [ ] v1 , FieldVector < T > v2 ) throws NullArgumentException { MathUtils . checkNotNull ( v1 ) ; MathUtils . checkNotNull ( v2 ) ; field = v2 . getField ( ) ; final T [ ] v2Data = ( v2 instanceof ArrayFieldVector ) ? ( ( ArrayFieldVector < T > ) v2 ) . data : v2 . toArray ( ) ; data = MathArrays . buildArray ( field , v1 . length + v2Data . length ) ; System . arraycopy ( v1 , 0 , data , 0 , v1 . length ) ; System . arraycopy ( v2Data , 0 , data , v1 . length , v2Data . length ) ; }

Construye un vector anexando un vector a otro vector.


@ Override public void close  ( ) throws IOException  { fInputStream . close ( ) ; }

Cierre la corriente.Una vez que se ha cerrado un flujo, lea más (), listo (), marca () o reinicio () Las invocaciones lanzarán una excepción IOException.Sin embargo, cerrar una corriente previamente cerrada no tiene efecto.


public static < R > Observable < R > ifThen  ( BooleanSupplier condition , ObservableSource < ? extends R > then ) { return ifThen ( condition , then , Observable . < R > empty ( ) ) ; }

Devuelva un observable que emite las emisiones de un observable específico si una condición se evalúa con verdadera, de lo contrario, devolverá un observable vacío.<p> <img anchth = "640" src = "https://raw.github.com/wiki/reactivex/rxjava/images/rx- operadores/ifthen.png" alt = "">


public boolean naive_side_effect  ( ) { return soot . PhaseOptions . getBoolean ( options , "naive-side-effect" ) ; }

Probador de efecto secundario ingenuo: use un análisis de efecto secundario ingenuo, incluso si hay información interprociural disponible. Si el probador de efectos secundarios ingenuo se establece en verdadero, el movimiento de código perezoso utiliza la información conservadora del efecto secundario proporcionado por la clase de NAIFESIDEEFECTTTERSTER, incluso si está disponible la información intergocedional sobre efectos secundarios. El análisis de efecto secundario ingenuo se basa únicamente en la información disponible localmente sobre una declaración. Asume, por ejemplo, que cualquier llamada de método tiene el potencial de escribir y leer todos los campos de instancia y estáticos en el programa. Si el probador de efectos secundarios ingenuo se establece en FALSO y el hollín está en el modo de programa completo, luego el movimiento de código perezoso utiliza la información del efecto secundario proporcionado por la clase PasideSeFectTester. PasideSeFectTester utiliza un análisis de puntos para determinar qué campos y estática pueden ser escritas o leer por una declaración determinada. Si no se realiza un análisis de programa completo, la información de efecto secundario ingenuo se usa independientemente de la configuración del probador de efectos secundarios ingenuo.


public AlreadyClosedException ( ) { super ( "Environment has already been closed" ) ; }


public static int determineConsecutiveDigitCount  ( CharSequence msg , int startpos ) { int count = 0 ; int len = msg . length ( ) ; int idx = startpos ; if ( idx < len ) { char ch = msg . charAt ( idx ) ; while ( isDigit ( ch ) && idx < len ) { count ++ ; idx ++ ; if ( idx < len ) { ch = msg . charAt ( idx ) ; } } } return count ; }

Determina el número de caracteres consecutivos que están codificables con compactación numérica.


public boolean resourceClosingException  ( TypeDecl catchType ) { ASTNode$State state = state ( ) ; try { for ( ResourceDeclaration resource : getResourceList ( ) ) { MethodDecl close = lookupClose ( resource ) ; if ( close == null ) continue ; for ( Access exception : close . getExceptionList ( ) ) { TypeDecl exceptionType = exception . type ( ) ; if ( catchType . mayCatch ( exception . type ( ) ) ) return true ; } } return false ; } finally { } }

Es cierto si el cierre automático de los recursos en esta declaración de prueba de recursos puede lanzar una excepción de tipo CatchType.


public static char [ ] encode  ( byte [ ] in , int iLen ) { return encode ( in , 0 , iLen ) ; }

Codifica una matriz de bytes en formato base64.No se insertan espacios en blanco o salidas de línea en la salida.


public Matrix ( double [ ] [ ] A ) { m = A . length ; n = A [ 0 ] . length ; for ( int i = 0 ; i < m ; i ++ ) { if ( A [ i ] . length != n ) { throw new IllegalArgumentException ( "All rows must have the same length." ) ; } } this . A = A ; }


private static DecoderResult createDecoderResultFromAmbiguousValues  ( int ecLevel , int [ ] codewords , int [ ] erasureArray , int [ ] ambiguousIndexes , int [ ] [ ] ambiguousIndexValues ) throws FormatException , ChecksumException { int [ ] ambiguousIndexCount = new int [ ambiguousIndexes . length ] ; int tries = 100 ; while ( tries -- > 0 ) { for ( int i = 0 ; i < ambiguousIndexCount . length ; i ++ ) { codewords [ ambiguousIndexes [ i ] ] = ambiguousIndexValues [ i ] [ ambiguousIndexCount [ i ] ] ; } try { return decodeCodewords ( codewords , ecLevel , erasureArray ) ; } catch ( ChecksumException ignored ) { } if ( ambiguousIndexCount . length == 0 ) { throw ChecksumException . getChecksumInstance ( ) ; } for ( int i = 0 ; i < ambiguousIndexCount . length ; i ++ ) { if ( ambiguousIndexCount [ i ] < ambiguousIndexValues [ i ] . length - 1 ) { ambiguousIndexCount [ i ] ++ ; break ; } else { ambiguousIndexCount [ i ] = 0 ; if ( i == ambiguousIndexCount . length - 1 ) { throw ChecksumException . getChecksumInstance ( ) ; } } } } throw ChecksumException . getChecksumInstance ( ) ; }

Este método se ocupa del hecho de que el proceso de decodificación no siempre produce un valor más probable.La implementación de corrección de errores actuales no se ocupa de los borrones muy bien, por lo que es mejor proporcionar un valor para estas palabras de código ambiguo en lugar de tratarla como un borrado.El problema es que no sabemos cuál de los valores ambiguos para elegir.Intentamos decodificar usando el primer valor, y si eso falla, usamos otro de los valores ambiguos e intentamos decodificar nuevamente.Por lo general, esto solo ocurre en códigos de barras muy difíciles de leer y decodificar, por lo que la decodificación de los códigos de barras normales no se ve afectada por esto.


@ Override public final void writeChar  ( int v ) throws IOException  { work [ 0 ] = ( byte ) v ; work [ 1 ] = ( byte ) ( v >> 8 ) ; dis . write ( work , 0 , 2 ) ; }

Escribe un char.Como DataOutputStream.Writechar.Nota El PARM es un INT a pesar de esto como un WritTechar


public double [ ] [ ] toCartesianHessian  ( final double [ ] [ ] sHessian , final double [ ] sGradient ) { computeJacobian ( ) ; computeHessians ( ) ; final double [ ] [ ] hj = new double [ 3 ] [ 3 ] ; final double [ ] [ ] cHessian = new double [ 3 ] [ 3 ] ; hj [ 0 ] [ 0 ] = sHessian [ 0 ] [ 0 ] * jacobian [ 0 ] [ 0 ] + sHessian [ 1 ] [ 0 ] * jacobian [ 1 ] [ 0 ] + sHessian [ 2 ] [ 0 ] * jacobian [ 2 ] [ 0 ] ; hj [ 0 ] [ 1 ] = sHessian [ 0 ] [ 0 ] * jacobian [ 0 ] [ 1 ] + sHessian [ 1 ] [ 0 ] * jacobian [ 1 ] [ 1 ] + sHessian [ 2 ] [ 0 ] * jacobian [ 2 ] [ 1 ] ; hj [ 0 ] [ 2 ] = sHessian [ 0 ] [ 0 ] * jacobian [ 0 ] [ 2 ] + sHessian [ 2 ] [ 0 ] * jacobian [ 2 ] [ 2 ] ; hj [ 1 ] [ 0 ] = sHessian [ 1 ] [ 0 ] * jacobian [ 0 ] [ 0 ] + sHessian [ 1 ] [ 1 ] * jacobian [ 1 ] [ 0 ] + sHessian [ 2 ] [ 1 ] * jacobian [ 2 ] [ 0 ] ; hj [ 1 ] [ 1 ] = sHessian [ 1 ] [ 0 ] * jacobian [ 0 ] [ 1 ] + sHessian [ 1 ] [ 1 ] * jacobian [ 1 ] [ 1 ] + sHessian [ 2 ] [ 1 ] * jacobian [ 2 ] [ 1 ] ; hj [ 2 ] [ 0 ] = sHessian [ 2 ] [ 0 ] * jacobian [ 0 ] [ 0 ] + sHessian [ 2 ] [ 1 ] * jacobian [ 1 ] [ 0 ] + sHessian [ 2 ] [ 2 ] * jacobian [ 2 ] [ 0 ] ; hj [ 2 ] [ 1 ] = sHessian [ 2 ] [ 0 ] * jacobian [ 0 ] [ 1 ] + sHessian [ 2 ] [ 1 ] * jacobian [ 1 ] [ 1 ] + sHessian [ 2 ] [ 2 ] * jacobian [ 2 ] [ 1 ] ; hj [ 2 ] [ 2 ] = sHessian [ 2 ] [ 0 ] * jacobian [ 0 ] [ 2 ] + sHessian [ 2 ] [ 2 ] * jacobian [ 2 ] [ 2 ] ; cHessian [ 0 ] [ 0 ] = jacobian [ 0 ] [ 0 ] * hj [ 0 ] [ 0 ] + jacobian [ 1 ] [ 0 ] * hj [ 1 ] [ 0 ] + jacobian [ 2 ] [ 0 ] * hj [ 2 ] [ 0 ] ; cHessian [ 1 ] [ 0 ] = jacobian [ 0 ] [ 1 ] * hj [ 0 ] [ 0 ] + jacobian [ 1 ] [ 1 ] * hj [ 1 ] [ 0 ] + jacobian [ 2 ] [ 1 ] * hj [ 2 ] [ 0 ] ; cHessian [ 2 ] [ 0 ] = jacobian [ 0 ] [ 2 ] * hj [ 0 ] [ 0 ] + jacobian [ 2 ] [ 2 ] * hj [ 2 ] [ 0 ] ; cHessian [ 1 ] [ 1 ] = jacobian [ 0 ] [ 1 ] * hj [ 0 ] [ 1 ] + jacobian [ 1 ] [ 1 ] * hj [ 1 ] [ 1 ] + jacobian [ 2 ] [ 1 ] * hj [ 2 ] [ 1 ] ; cHessian [ 2 ] [ 1 ] = jacobian [ 0 ] [ 2 ] * hj [ 0 ] [ 1 ] + jacobian [ 2 ] [ 2 ] * hj [ 2 ] [ 1 ] ; cHessian [ 2 ] [ 2 ] = jacobian [ 0 ] [ 2 ] * hj [ 0 ] [ 2 ] + jacobian [ 2 ] [ 2 ] * hj [ 2 ] [ 2 ] ; cHessian [ 0 ] [ 0 ] += sGradient [ 0 ] * rHessian [ 0 ] [ 0 ] + sGradient [ 1 ] * thetaHessian [ 0 ] [ 0 ] + sGradient [ 2 ] * phiHessian [ 0 ] [ 0 ] ; cHessian [ 1 ] [ 0 ] += sGradient [ 0 ] * rHessian [ 1 ] [ 0 ] + sGradient [ 1 ] * thetaHessian [ 1 ] [ 0 ] + sGradient [ 2 ] * phiHessian [ 1 ] [ 0 ] ; cHessian [ 2 ] [ 0 ] += sGradient [ 0 ] * rHessian [ 2 ] [ 0 ] + sGradient [ 2 ] * phiHessian [ 2 ] [ 0 ] ; cHessian [ 1 ] [ 1 ] += sGradient [ 0 ] * rHessian [ 1 ] [ 1 ] + sGradient [ 1 ] * thetaHessian [ 1 ] [ 1 ] + sGradient [ 2 ] * phiHessian [ 1 ] [ 1 ] ; cHessian [ 2 ] [ 1 ] += sGradient [ 0 ] * rHessian [ 2 ] [ 1 ] + sGradient [ 2 ] * phiHessian [ 2 ] [ 1 ] ; cHessian [ 2 ] [ 2 ] += sGradient [ 0 ] * rHessian [ 2 ] [ 2 ] + sGradient [ 2 ] * phiHessian [ 2 ] [ 2 ] ; cHessian [ 0 ] [ 1 ] = cHessian [ 1 ] [ 0 ] ; cHessian [ 0 ] [ 2 ] = cHessian [ 2 ] [ 0 ] ; cHessian [ 1 ] [ 2 ] = cHessian [ 2 ] [ 1 ] ; return cHessian ; }

Convierta a un Hesse con respecto a las coordenadas esféricas en un Hessian con respecto a las coordenadas cartesianas.<p> Como Hessian siempre son simétricos, usamos solo la parte inferior izquierda del Hessian esférico proporcionado, por lo que la parte superior puede no ser inicializada.Sin embargo, todavía plomamos la matriz completa que creamos, con la simetría garantizada.</ p>


public static IOFileFilter ageFileFilter  ( Date cutoffDate , boolean acceptOlder ) { return new AgeFileFilter ( cutoffDate , acceptOlder ) ; }

Devuelve un filtro que filtra los archivos según la fecha de corte.


public void clear  ( ) { for ( List < Buffer > bufferList : bufferMap . values ( ) ) { bufferList . clear ( ) ; } bufferMap . clear ( ) ; count = 0 ; }


@ Override public Object clone  ( ) { return new QName ( this ) ; }


public CholeskyDecomposition ( Matrix Arg ) { double [ ] [ ] A = Arg . getArray ( ) ; n = Arg . getRowDimension ( ) ; L = new double [ n ] [ n ] ; isspd = ( Arg . getColumnDimension ( ) == n ) ; for ( int j = 0 ; j < n ; j ++ ) { double [ ] Lrowj = L [ j ] ; double d = 0.0 ; for ( int k = 0 ; k < j ; k ++ ) { double [ ] Lrowk = L [ k ] ; double s = 0.0 ; for ( int i = 0 ; i < k ; i ++ ) { s += Lrowk [ i ] * Lrowj [ i ] ; } Lrowj [ k ] = s = ( A [ j ] [ k ] - s ) / L [ k ] [ k ] ; d = d + s * s ; isspd = isspd & ( A [ k ] [ j ] == A [ j ] [ k ] ) ; } d = A [ j ] [ j ] - d ; isspd = isspd & ( d > 0.0 ) ; L [ j ] [ j ] = Math . sqrt ( Math . max ( d , 0.0 ) ) ; for ( int k = j + 1 ; k < n ; k ++ ) { L [ j ] [ k ] = 0.0 ; } } }

Algoritmo cholesky para una matriz definitiva simétrica y positiva.


public WithinExtended ( Expression expression1 , Expression expression2 ) { super ( expression1 , expression2 ) ; }

Instantánea un nuevo dentro de extendido.


public static boolean isDUCDoc  ( String sDocName ) { return ( new File ( sDocName ) . getName ( ) . split ( "[.]" ) . length == 5 ) ; }

Devuelve VERDADERO si el documento es un documento DUC nombrado.


public void attachShield  ( SiegeLocation location ) { List < SiegeShield > mapShields = registeredShields . get ( location . getTemplate ( ) . getWorldId ( ) ) ; if ( mapShields == null ) { return ; } ZoneInstance zone = location . getZone ( ) . get ( 0 ) ; List < SiegeShield > shields = new ArrayList < SiegeShield > ( ) ; for ( int index = mapShields . size ( ) - 1 ; index >= 0 ; index -- ) { SiegeShield shield = mapShields . get ( index ) ; Vector3f center = shield . getGeometry ( ) . getWorldBound ( ) . getCenter ( ) ; if ( zone . getAreaTemplate ( ) . isInside3D ( center . x , center . y , center . z ) ) { shields . add ( shield ) ; mapShields . remove ( index ) ; Shield sphereShield = sphereShields . get ( location . getLocationId ( ) ) ; if ( sphereShield != null ) { sphereShields . remove ( location . getLocationId ( ) ) ; } shield . setSiegeLocationId ( location . getLocationId ( ) ) ; } } if ( shields . size ( ) == 0 ) { } else { location . setShields ( shields ) ; } }

Adjunta Geo Shield y elimina el escudo de esfera obsoleto si tal existe.Se debe llamar cuando se crearon escudos GEO y SiegezoneInstance.


public static float [ ] centroid  ( float pts [ ] , int len ) { float [ ] c = new float [ ] { 0 , 0 } ; for ( int i = 0 ; i < len ; i += 2 ) { c [ 0 ] += pts [ i ] ; c [ 1 ] += pts [ i + 1 ] ; } c [ 0 ] /= len / 2 ; c [ 1 ] /= len / 2 ; return c ; }

Calcula la media, o centroide, de un conjunto de puntos.


public NewsfeedGetListsQuery listIds  ( List < Integer > value ) { return unsafeParam ( "list_ids" , value ) ; }


@ Override public boolean layoutDependsOn  ( CoordinatorLayout parent , V child , View dependency ) { if ( dependency instanceof NestedScrollView ) { ( ( NestedScrollView ) dependency ) . setOnScrollChangeListener ( this ) ; this . parent = parent ; } return false ; }


public static boolean hasNode  ( String url ) { return url2node . containsKey ( url ) ; }


public static < E > Stream < E > gate  ( Stream < E > stream , Predicate < ? super E > validator ) { Objects . requireNonNull ( stream ) ; Objects . requireNonNull ( validator ) ; GatingSpliterator < E > spliterator = GatingSpliterator . of ( stream . spliterator ( ) , validator ) ; return StreamSupport . stream ( spliterator , stream . isParallel ( ) ) . onClose ( null ) ; }

 Genera una corriente que no genera ningún elemento, hasta que el validador se haga realidad para un elemento del flujo provisto.Desde este punto, la corriente de devoluciones es idéntica al flujo proporcionado.

 Si está utilizando Java 9, entonces debería usar  Stream.Dropwhile (Predicate) .

 A <CÓDIGO> NULLPointerException  Se lanzará si el flujo provisto del predicado del validador es NULL.


public void createColumnFamilyIfNecessary  ( ColumnFamilyMetadata metadata , boolean shouldPersist ) { ReentrantLock lockForType = namedLock . forName ( metadata . getTypeName ( ) ) ; lockForType . lock ( ) ; try { final boolean columnFamilyExists = isColumnFamilyExists ( metadata ) ; if ( columnFamilyExists ) { if ( metadata != ColumnFamilyMetadataMetadata . INSTANCE ) { metadataCache . addColumnFamilyMetadata ( metadata . getTypeName ( ) , metadata ) ; if ( shouldPersist ) { persistColumnFamilyMetadata ( metadata ) ; } } return ; } ThriftCfDef cfDef = ( ThriftCfDef ) HFactory . createColumnFamilyDefinition ( keyspace . getKeyspaceName ( ) , metadata . getColumnFamilyName ( ) ) ; cfDef . setColumnMetadata ( new ArrayList < ColumnDefinition > ( ) ) ; cfDef . setDefaultValidationClass ( ValidatorClassInferer . getBytesTypeValidationClass ( ) ) ; cfDef . setComparatorType ( StringSerializer . get ( ) . getComparatorType ( ) ) ; cfDef . setKeyAlias ( StringSerializer . get ( ) . toByteBuffer ( metadata . getKeyName ( ) ) ) ; cfDef . setKeyValidationClass ( ValidatorClassInferer . infer ( metadata . getKeyType ( ) ) ) ; cfDef . setComment ( metadata . getTypeName ( ) ) ; if ( columnFamilyGcGraceSeconds != null ) { cfDef . setGcGraceSeconds ( columnFamilyGcGraceSeconds ) ; } for ( TypedColumnMetadata columnMetadata : metadata . getColumns ( ) . values ( ) ) { String validationClass = ValidatorClassInferer . infer ( columnMetadata . getType ( ) ) ; addColumnDefinitionToColumnFamilyDefinition ( metadata , cfDef , columnMetadata . getFullName ( ) , validationClass ) ; } for ( String index : metadata . getIndexes ( ) ) { if ( metadata . getColumns ( ) . containsKey ( index ) ) { continue ; } String validationClass = ValidatorClassInferer . getBytesTypeValidationClass ( ) ; addColumnDefinitionToColumnFamilyDefinition ( metadata , cfDef , index , validationClass ) ; } if ( logger . isInfoEnabled ( ) ) { logger . info ( "Creating column family: " + metadata ) ; } try { try { cluster . addColumnFamily ( cfDef , true ) ; } catch ( Exception e ) { if ( logger . isInfoEnabled ( ) ) { logger . info ( "Column family creation failed, " + "waiting " + ( SLEEP_BEFORE_RETRY / 1000 ) + " seconds and then testing to see whether " + "the column family was already created." , e ) ; } Thread . sleep ( SLEEP_BEFORE_RETRY ) ; if ( ! isColumnFamilyExists ( metadata ) ) { throw e ; } } if ( metadata != ColumnFamilyMetadataMetadata . INSTANCE ) { metadataCache . addColumnFamilyMetadata ( metadata . getTypeName ( ) , metadata ) ; if ( shouldPersist ) { persistColumnFamilyMetadata ( metadata ) ; } } } catch ( Exception e ) { throw new SpaceCassandraSchemaUpdateException ( "Failed adding column family definition to cassandra" , e , true ) ; } } finally { lockForType . unlock ( ) ; } }

Crea una familia de columnas en el espacio de acceso configurado si no existe uno.


public boolean isValidSymbol  ( ) { return ! validSymbolMap . values ( ) . contains ( false ) ; }


synchronized protected boolean removeFromPendingCacheIfEqual  ( IResource resource , byte [ ] syncBytes ) { byte [ ] old = ( byte [ ] ) pendingCacheWrites . get ( resource ) ; if ( equals ( old , syncBytes ) ) { pendingCacheWrites . remove ( resource ) ; return true ; } return false ; }

Retire el recurso de la memoria caché si los bytes almacenados en caché son iguales a <código> syncbytes <code> Esto se debe a que la persona que llama de este método no está sincronizada, por lo que si se modificó el caché, no retire el recurso ...


public static void dropTable  ( SQLiteDatabase db , boolean ifExists ) { String sql = "DROP TABLE " + ( ifExists ? "IF EXISTS " : "" ) + "\"TRANSLATE\"" ; db . execSQL ( sql ) ; }

Drops la tabla de base de datos subyacente.


public static Style amber  ( ) { final Style style = new Style ( ) ; style . color = PaletteUtils . getSolidColor ( PaletteUtils . MATERIAL_AMBER ) ; return style ; }

Material predeterminado de estilo transparente ámbar para supertoasts.


public double [ ] [ ] extractMainSetJacobian  ( final ODEState state ) { final double [ ] p = state . getSecondaryState ( index ) ; final double [ ] [ ] dYdY0 = new double [ jode . getDimension ( ) ] [ jode . getDimension ( ) ] ; int j = 0 ; for ( int i = 0 ; i < jode . getDimension ( ) ; i ++ ) { System . arraycopy ( p , j , dYdY0 [ i ] , 0 , jode . getDimension ( ) ) ; j += jode . getDimension ( ) ; } return dYdY0 ; }

Extraiga la matriz jacobiana con respecto al estado.


public boolean isLocked  ( int key ) { return toolkit . getLockingKeyState ( key ) ; }

Compruebe si una clave está activada (en estado bloqueado).


@ Override public String addSymbol  ( String symbol ) { clean ( ) ; int bucket = hash ( symbol ) % fTableSize ; for ( SREntry entry = fBuckets [ bucket ] ; entry != null ; entry = entry . next ) { SREntryData data = ( SREntryData ) entry . get ( ) ; if ( data == null ) { continue ; } if ( data . symbol . equals ( symbol ) ) { return data . symbol ; } } if ( fCount >= fThreshold ) { rehash ( ) ; bucket = hash ( symbol ) % fTableSize ; } symbol = symbol . intern ( ) ; SREntry entry = new SREntry ( symbol , fBuckets [ bucket ] , bucket , fReferenceQueue ) ; fBuckets [ bucket ] = entry ; ++ fCount ; return symbol ; }

Agrega el símbolo especificado a la tabla de símbolos y devuelve una referencia al símbolo único.Si el símbolo ya existe, la referencia del símbolo anterior se devuelve en su lugar, en orden de garantía de que las referencias de símbolos siguen siendo únicas.


public static String makeEnumHumanReadable  ( final String enumName ) { StringBuilder builder = new StringBuilder ( enumName . length ( ) + 1 ) ; for ( String word : enumName . split ( "_" ) ) { if ( word . length ( ) <= 2 ) { builder . append ( word ) ; } else { builder . append ( word . charAt ( 0 ) ) ; builder . append ( word . substring ( 1 ) . toLowerCase ( ) ) ; } builder . append ( ' ' ) ; } return builder . substring ( 0 , enumName . length ( ) ) ; }

Hace un nombre de enumeración legible humano (arregla espacios, capitalización, etc.)


public ProxyReader ( Reader proxy ) { super ( proxy ) ; }


protected GroupsEditPlaceQuery groupId  ( int value ) { return unsafeParam ( "group_id" , value ) ; }


public static long nextPowerOfTwo  ( long x ) { if ( x == 0 ) return 1 ; x -- ; x |= x >> 1 ; x |= x >> 2 ; x |= x >> 4 ; x |= x >> 8 ; x |= x >> 16 ; return ( x | x >> 32 ) + 1 ; }

Devuelva la potencia mínima de dos mayores que o igualeshorterofboth al valor especificado.<p /> <p> Tenga en cuenta que esta función volverá 1 cuando el argumento es 0.


private boolean processWidgets  ( List < WidgetObject > widgets , String searchingId , boolean isRemove ) { Iterator < WidgetObject > iterator = widgets . iterator ( ) ; boolean isFound = false ; while ( iterator . hasNext ( ) ) { WidgetObject widget = iterator . next ( ) ; if ( widget . getWidgetId ( ) . equalsIgnoreCase ( searchingId ) ) { if ( isRemove ) { iterator . remove ( ) ; } isFound = true ; break ; } } return isFound ; }

ITERATE sobre el conjunto de widgets Buscar widget con ID especificado y elimínelo si es necesario


public static double distance  ( S1Point p1 , S1Point p2 ) { return Vector2D . angle ( p1 . vector , p2 . vector ) ; }

Calcular la distancia (separación angular) entre dos puntos.


public boolean matchNumericConstant  ( ) { return tok . ttype == StreamTokenizer . TT_NUMBER ; }

Devuelve VERDADERO si el token actual es un valor numérico.


public ConsistencyLevel clamp  ( ConsistencyLevel consistencyLevel ) { return _topologyAdapter . clamp ( consistencyLevel ) ; }

Baja el nivel de consistencia especificado para ser compatible con la topología real del anillo de Cassandra.Útil para escribir código que se ejecuta contra los anillos que varían entre los servidores de prueba de un solo nodo y el centro de datos multiplacas, las topologías de red altamente replicadas.


private boolean isValidItemIndex  ( int index ) { return viewAdapter != null && viewAdapter . getItemsCount ( ) > 0 && ( isCyclic || index >= 0 && index < viewAdapter . getItemsCount ( ) ) ; }


public TransitionClassifierParams ( ) { minFF = new DoubleParam ( this , "minFF" , "min feature frequency" , ParamValidators . gt ( 0 ) ) ; setDefault ( minFF , 2.0 ) ; numFeatures = new IntParam ( this , "numFeatures" , "number of features used in feature hashing" , ParamValidators . gt ( 0 ) ) ; setDefault ( numFeatures , 1000 ) ; regParam = new DoubleParam ( this , "regParam" , "regularization parameter" , ParamValidators . gtEq ( 0d ) ) ; setDefault ( regParam , 0.0 ) ; maxIter = new IntParam ( this , "maxIter" , "max number of iterations" , ParamValidators . gt ( 0 ) ) ; setDefault ( maxIter , 100 ) ; tolerance = new DoubleParam ( this , "tolerance" , "convergence tolerance of iterations" , ParamValidators . gt ( 0 ) ) ; setDefault ( tolerance , 1E-5 ) ; }


public E claimAndGetPreallocated  ( long sequence ) { sequencer . claim ( sequence ) ; return get ( sequence ) ; }

Establece el cursor a una secuencia específica y devuelve la entrada preemitada que se almacena allí.Esto puede causar una carrera de datos y solo debe hacerse en circunstancias controladas, por ejemplo.durante la inicialización.


@ Override public void actionPerformed  ( ActionEvent ev ) { execute ( "compute diversityRatio kmer=25 step=25 mindepth=10;" ) ; }


public void enableDashedLine  ( float lineLength , float spaceLength , float phase ) { mDashPathEffect = new DashPathEffect ( new float [ ] { lineLength , spaceLength } , phase ) ; }

Permite que la línea se dibuje en modo discontinuo, por ejemplo.Me gusta esto "- - - - - -"


protected void solvePhase1  ( final SimplexTableau tableau ) throws MathIllegalStateException , MathIllegalStateException , MathIllegalStateException { if ( tableau . getNumArtificialVariables ( ) == 0 ) { return ; } while ( ! tableau . isOptimal ( ) ) { doIteration ( tableau ) ; } if ( ! Precision . equals ( tableau . getEntry ( 0 , tableau . getRhsOffset ( ) ) , 0d , epsilon ) ) { throw new MathIllegalStateException ( LocalizedOptimFormats . NO_FEASIBLE_SOLUTION ) ; } }


public SwipeBackImplementor ( SwipeBackView view ) { this . view = view ; }


public static SM_SYSTEM_MESSAGE STR_MSG_MENTOR_END_BANISH_PARTYMSG  ( String value0 , String worldname1 ) { return new SM_SYSTEM_MESSAGE ( 1400768 , value0 , worldname1 ) ; }

% 0 se vio obligado a abandonar% worldname1 porque él o ella detuvo la mentoría.


@ Nullable public static Bitmap toBitmap  ( @ Nullable final View view ) { if ( view == null ) { return null ; } final int width = view . getWidth ( ) ; final int height = view . getHeight ( ) ; final Bitmap bitmapToExport = Bitmap . createBitmap ( width > 0 ? width : DEFAULT_BITMAP_WIDTH , height > 0 ? height : DEFAULT_BITMAP_HEIGHT , Bitmap . Config . ARGB_8888 ) ; final Canvas canvas = new Canvas ( bitmapToExport ) ; view . draw ( canvas ) ; return bitmapToExport ; }

Convertir la vista especificada a un funcionamiento, si es posible


public static void d  ( String logMsg ) { if ( isEnable ( ) ) { log ( getCurrentClassName ( ) , getCurrentMethodName ( ) + "(): " + logMsg ) ; } }

Registre un mensaje de depuración con el nombre de la clase y el nombre del método con Logy.


protected void handleResultsResponse  ( Observable < PreResponse > preResponseObservable , AsyncResponse asyncResponse , ApiRequest apiRequest ) { HttpResponseMaker httpResponseMaker = new HttpResponseMaker ( objectMappers , dimensionDictionary ) ; preResponseObservable . flatMap ( null ) . subscribe ( new HttpResponseChannel ( asyncResponse , httpResponseMaker , apiRequest . getFormat ( ) , apiRequest . getUriInfo ( ) ) ) ; }

Procesar una solicitud para obtener resultados de trabajo.


protected DocsGetByIdQuery docs  ( String ... value ) { return unsafeParam ( "docs" , value ) ; }


@ Override public void onTxEndStatement  ( Transaction tx ) { lockTbl . releaseAll ( txNum , true ) ; }

Libera todas las gravas obtenidas hasta ahora.


private void initializeReader  ( ) throws IOException  { close ( ) ; String path = this . csvParserVo . getBlockDetailsList ( ) . get ( blockCounter ) . getFilePath ( ) ; FileType fileType = FileFactory . getFileType ( path ) ; if ( path . endsWith ( ".gz" ) || path . endsWith ( ".bz2" ) ) { DataInputStream dataInputStream = FileFactory . getDataInputStream ( path , fileType , bufferSize ) ; inputStreamReader = new BufferedReader ( new InputStreamReader ( dataInputStream ) ) ; } else { long startOffset = this . csvParserVo . getBlockDetailsList ( ) . get ( blockCounter ) . getBlockOffset ( ) ; long blockLength = this . csvParserVo . getBlockDetailsList ( ) . get ( blockCounter ) . getBlockLength ( ) ; long endOffset = blockLength + startOffset ; DataInputStream dataInputStream = FileFactory . getDataInputStream ( path , fileType , bufferSize , startOffset ) ; if ( startOffset != 0 ) { LineReader lineReader = new LineReader ( dataInputStream , 1 ) ; startOffset += lineReader . readLine ( new Text ( ) , 0 ) ; } inputStreamReader = new BufferedReader ( new InputStreamReader ( new BoundedDataStream ( dataInputStream , endOffset - startOffset ) ) ) ; } }

Se utilizará por debajo del método para inicializar al lector.


public String toString  ( cp_info constant_pool [ ] ) { return Integer . toString ( ( int ) bytes ) ; }

Devuelve una representación de cadena de esta entrada.


public int size  ( ) { return _count ; }


protected AdsGetDemographicsQuery ids  ( String value ) { return unsafeParam ( "ids" , value ) ; }

IDS solicitó anuncios o campañas, separados con una coma, dependiendo del valor establecido en "IDS_TYPE".Máximo de 2000 objetos.


public void removeAllSliders  ( ) { if ( getRealAdapter ( ) != null ) { int count = getRealAdapter ( ) . getCount ( ) ; getRealAdapter ( ) . removeAllSliders ( ) ; mViewPager . setCurrentItem ( mViewPager . getCurrentItem ( ) + count , false ) ; } }

Retire todos los deslizadores.AVISO: Es un método no perfecto, todavía existe un error muy pequeño.


@ Override public void releaseScan  ( ) throws SAException  { try { if ( iterator != null ) iterator . close ( ) ; } catch ( Exception ex ) { throw new SAException ( ex ) ; } }


public void removeObserver  ( AppMenuObserver observer ) { mObservers . remove ( observer ) ; }

Elimina al observador del menú de la aplicación.


public static boolean isScaleEnabled  ( ) { return scaleEnabled ; }

Devuelve VERDADERO si la escala debe ser representada.


public Iterator tuples  ( ) { return m_tuples . iterator ( rows ( ) ) ; }

Obtenga un iterador sobre las tuplas en esta tabla.


@ Override public void publish  ( String topic , byte [ ] payload , long timeout ) throws AWSIotException , AWSIotTimeoutException { super . publish ( topic , payload , timeout ) ; }

Publica la carga útil en bruto a un tema determinado.Esta es una llamada de bloqueo, por lo que el hilo de llamada está bloqueado hasta que la operación de publicación haya tenido éxito, falló o el tiempo de espera especificado ha transcurrido.MQTT QOS0 se utiliza para publicar la carga útil.


@ DataProvider public Object [ ] [ ] dates  ( ) { String identicalTime = TestUtils . relativeTimeString ( 5 ) ; return new Object [ ] [ ] { new Object [ ] { "present" , TestUtils . relativeTimeString ( - 1 ) , TestUtils . relativeTimeString ( 1 ) } , new Object [ ] { "future" , TestUtils . relativeTimeString ( 2 ) , TestUtils . relativeTimeString ( 4 ) } , new Object [ ] { "same" , identicalTime , identicalTime } , new Object [ ] { "past" , TestUtils . relativeTimeString ( - 4 ) , TestUtils . relativeTimeString ( - 2 ) } , new Object [ ] { "endBeforeStart" , TestUtils . relativeTimeString ( 3 ) , TestUtils . relativeTimeString ( 1 ) } } ; }

Proporciona fechas de inicio, intermedias y finales.


public TimeColumn selectIf  ( IntPredicate predicate ) { TimeColumn column = emptyCopy ( ) ; IntIterator iterator = intIterator ( ) ; while ( iterator . hasNext ( ) ) { int next = iterator . nextInt ( ) ; if ( predicate . test ( next ) ) { column . add ( next ) ; } } return column ; }

Esta versión opera en predicados que tratan el intredicado dado que operan en una hora local envasada, esto es mucho más eficiente que use un desempeño local, pero requiere que el desarrollador entienda la semántica de los libros empacados.


public FieldVector3D < T > add  ( final T factor , final Vector3D v ) { return new FieldVector3D < T > ( x . add ( factor . multiply ( v . getX ( ) ) ) , y . add ( factor . multiply ( v . getY ( ) ) ) , z . add ( factor . multiply ( v . getZ ( ) ) ) ) ; }

Añadir un vector escalado a la instancia.


void checkNormalizationAfterRemove  ( ChildNode previousSibling ) { if ( previousSibling != null && previousSibling . getNodeType ( ) == Node . TEXT_NODE ) { ChildNode next = previousSibling . nextSibling ; if ( next != null && next . getNodeType ( ) == Node . TEXT_NODE ) { isNormalized ( false ) ; } } }

Comprueba el normalizado de este nodo después de eliminar a un niño.Si el niño eliminado causa que este nodo no sea normalizado, entonces este nodo está marcado en consecuencia.Las condiciones para cambiar el estado normalizado son: <ul> <li> El niño eliminado tenía dos hermanos adyacentes que eran nodos de texto.</ ul>


@ Override public void actionPerformed  ( ActionEvent ev ) { execute ( "show gapBetweenBars=" + ( ! isSelected ( ) ) + ";" ) ; }


public static void i  ( String tag , String msg ) { i ( tag , msg , null ) ; }

Imprime un mensaje en la prioridad de la información.


static public int encode_vA_vM  ( float vArc , float vMag ) { float vArc_nor = vArc / TWO_PI ; int vArc_I16 = ( int ) ( vArc_nor * ( 0xFFFF - 1 ) ) & 0xFFFF ; int vMag_I16 = ( int ) ( vMag ) & 0xFFFF ; return vMag_I16 << 16 | vArc_I16 ; }

codifica un vector, dado en coordenadas polares, en un entero de 32 bits sin firmar.

 0xmmmmaaaa (arco de 16 bits, magnitud de 16 bits


@ Override public int hashCode  ( ) { final int prime = 31 ; int result = 1 ; long temp ; temp = Double . doubleToLongBits ( x ) ; result = prime * result + ( int ) ( temp ^ ( temp >>> 32 ) ) ; temp = Double . doubleToLongBits ( y ) ; result = prime * result + ( int ) ( temp ^ ( temp >>> 32 ) ) ; return result ; }


public boolean contains  ( E comparable ) { if ( comparable == null ) return false ; if ( this . root == null ) return false ; return this . contains ( this . root , comparable ) != null ; }

Intenta encontrar el objeto comparable dado dentro del árbol.


private IJSpace findSpace  ( String spaceURL ) throws JMSException { IJSpace spaceProxy = null ; try { spaceProxy = ( IJSpace ) SpaceFinder . find ( spaceURL ) ; if ( _logger . isLoggable ( Level . INFO ) ) { _logger . info ( "GSJMSAdmin.findSpace() Found space <" + spaceProxy . getName ( ) + "> " + " using SpaceURL: " + spaceURL ) ; } } catch ( FinderException ex ) { ResourceAllocationException rae = new ResourceAllocationException ( "GSJMSAdmin - ERROR: Could not find space: " + spaceURL + ex . toString ( ) + "\n" ) ; rae . setLinkedException ( ex ) ; throw rae ; } return spaceProxy ; }

Encuentra un proxy espacial en la URL especificada.


public void actionPerformed  ( ActionEvent ev ) { execute ( "set nodeShape=circle;" ) ; }


public PSVIElementNSImpl ( CoreDocumentImpl ownerDocument , String namespaceURI , String qualifiedName ) { super ( ownerDocument , namespaceURI , qualifiedName ) ; }


public static int randomNumberBetween  ( double begin , double end , RandomGenerator rng ) { if ( begin > end ) throw new IllegalArgumentException ( "Begin must not be less than end" ) ; return ( int ) begin + ( int ) ( rng . nextDouble ( ) * ( ( end - begin ) + 1 ) ) ; }

Genera un entero aleatorio entre los números especificados


public static SM_SYSTEM_MESSAGE STR_GUILD_CHANGE_MASTER_DONE  ( String value0 ) { return new SM_SYSTEM_MESSAGE ( 1300273 , value0 ) ; }

% 0 se ha convertido en la Brigada General de la Legión.


public UnsupportedConstraintException ( String s ) { super ( s ) ; }

Crea una instancia con el mensaje de detalle especificado.


protected boolean scanSurrogates  ( XMLStringBuffer buf ) throws IOException , XNIException { int high = fEntityScanner . scanChar ( ) ; int low = fEntityScanner . peekChar ( ) ; if ( ! XMLChar . isLowSurrogate ( low ) ) { reportFatalError ( "InvalidCharInContent" , new Object [ ] { Integer . toString ( high , 16 ) } ) ; return false ; } fEntityScanner . scanChar ( ) ; int c = XMLChar . supplemental ( ( char ) high , ( char ) low ) ; if ( isInvalid ( c ) ) { reportFatalError ( "InvalidCharInContent" , new Object [ ] { Integer . toString ( c , 16 ) } ) ; return false ; } buf . append ( ( char ) high ) ; buf . append ( ( char ) low ) ; return true ; }

Los escaneos sustitutos se sustituyen y los agregan al búfer especificado.<p /> <strong> Nota: </ strong> Esto supone que el Char actual ya se ha identificado como un sustituto alto.


public void addNewConnectionNode  ( GeoServerConnection connection , GeoServerNode node ) { nodeMap . put ( connection , node ) ; populateStateMap . put ( connection , new PopulateState ( ) ) ; }


public static boolean isNCNameStart  ( int c ) { return c < 0x10000 && ( CHARS [ c ] & MASK_NCNAME_START ) != 0 ; }

Devuelve VERDADERO si el carácter especificado es un carácter de inicio NCNAME válido, tal como se define por la producción [4] en los espacios de nombres en la Recomendación XML.


public TerminationStatus ( int waitResult ) { this . waitResult = waitResult ; }

Construya una instancia de TerminationStatus de un código de proceso de espera.


ServerRequest ( RequestTypeOuterClass . RequestType type , RequestOuterClass . Request request )  { this . request = request ; this . type = type ; }

Instantánea una nueva solicitud de servidor.


@ Override public LSInput item  ( int index ) { if ( index < 0 || index >= fLength ) { return null ; } return fArray [ index ] ; }

Devuelve el índice <CÓDIGO> ÍNDICE </ CODE> TH en la colección o <CÓDIGO> NULL </ CODE> Si <code> índice </ code> es mayor que o igual al número de objetos en la lista.El índice comienza a los 0.


public void onDown  ( long time , float x , float y , boolean fromMouse , int buttons ) { if ( mModelSelectorButton . onDown ( x , y ) ) return ; getActiveStripLayoutHelper ( ) . onDown ( time , x , y , fromMouse , buttons ) ; }


@ Override public void apply  ( NexusStreamParser np ) throws Exception { }


public static void main  ( String [ ] sArgs ) { TAC2008UpdateSummarizationFileSet t = new TAC2008UpdateSummarizationFileSet ( "/home/ggianna/JInsect/TAC2008/UpdateSumm08_test_docs_files/" ) ; t . createSets ( ) ; System . err . println ( "Training set:" ) ; System . err . println ( utils . printIterable ( t . getTrainingSet ( ) , "\n" ) ) ; System . err . println ( "Training set:" ) ; System . err . println ( utils . printIterable ( t . getTestSet ( ) , "\n" ) ) ; System . err . println ( "Per category:" ) ; for ( String sCategory : ( List < String > ) t . getCategories ( ) ) { System . err . println ( utils . printIterable ( t . getFilesFromCategory ( sCategory ) , "\n" ) ) ; } String sLastCat = ( String ) t . getCategories ( ) . get ( t . getCategories ( ) . size ( ) - 1 ) ; String sFile = ( ( CategorizedFileEntry ) t . getFilesFromCategory ( sLastCat ) . get ( 0 ) ) . getFileName ( ) ; System . out . println ( t . loadFile ( sFile ) ) ; }


public boolean selectedPicture  ( String headerName ) { Intent intent = new Intent ( Intent . ACTION_PICK , android . provider . MediaStore . Images . Media . EXTERNAL_CONTENT_URI ) ; intent . setType ( "image/*" ) ; this . activity . startActivityForResult ( Intent . createChooser ( intent , ( ! headerName . equals ( "" ) ? headerName : "Magical Camera" ) ) , SELECT_PHOTO ) ; return true ; }

Esto llame a la intención de seleccionar la imagen.


private void calcStackSize  ( List < BarEntry > yVals ) { for ( int i = 0 ; i < yVals . size ( ) ; i ++ ) { float [ ] vals = yVals . get ( i ) . getVals ( ) ; if ( vals != null && vals . length > mStackSize ) mStackSize = vals . length ; } }

Calcula el tamaño máximo de apilamiento que se produce en la matriz de entradas de este conjunto de datos


private void initSpring  ( ServletContext servletContext , AnnotationConfigWebApplicationContext rootContext ) { log . debug ( "Configuring Spring Web application context" ) ; AnnotationConfigWebApplicationContext dispatcherServletConfiguration = new AnnotationConfigWebApplicationContext ( ) ; dispatcherServletConfiguration . setParent ( rootContext ) ; dispatcherServletConfiguration . register ( DispatcherServletConfiguration . class ) ; log . debug ( "Registering Spring MVC Servlet" ) ; ServletRegistration . Dynamic dispatcherServlet = servletContext . addServlet ( "dispatcher" , new DispatcherServlet ( dispatcherServletConfiguration ) ) ; dispatcherServlet . addMapping ( "/app/*" ) ; dispatcherServlet . setLoadOnStartup ( 1 ) ; }

Inicializa el MVC de primavera y primavera.


@ Override public BigDecimal unmarshal  ( final String v ) throws Exception { if ( v != null && v . trim ( ) . length ( ) > 0 ) { return new BigDecimal ( v ) ; } { return null ; } }

Parse BigDecimal basado en el valor de cadena proporcionado.NULL-SEA: Si el argumento es nulo, se devuelve NULL


public static Color toColour  ( String htmlColour ) { Color colour = null ; if ( validColourString ( htmlColour ) ) { colour = SLD . toColor ( htmlColour ) ; } return colour ; }


public static SM_SYSTEM_MESSAGE STR_SKILL_SUCC_Search_A_TO_B  ( String skilltarget , String skillcaster , String skillname ) { return new SM_SYSTEM_MESSAGE ( 1201017 , skilltarget , skillcaster , skillname ) ; }

[% SkillTarget] está en el estado transparente porque [% Skillcaster] usó [% de habilidad].


@ Override public void actionPerformed  ( ActionEvent ev ) { final ChartViewer viewer = ( ChartViewer ) getViewer ( ) ; final LabelsJList list = viewer . getActiveLabelsJList ( ) ; previousValue = Math . min ( list . getAllLabels ( ) . size ( ) , previousValue ) ; final String result = JOptionPane . showInputDialog ( viewer . getFrame ( ) , "Set number of top items to select" , previousValue ) ; if ( result != null && Basic . isInteger ( result ) ) { execute ( "select top='" + result + "';" ) ; previousValue = Basic . parseInt ( result ) ; } }


public void releaseAll  ( ) { controller . mouseRelease ( InputEvent . BUTTON1_MASK ) ; controller . mouseRelease ( InputEvent . BUTTON2_MASK ) ; controller . mouseRelease ( InputEvent . BUTTON3_MASK ) ; }

Lanzamiento 3 Máscaras de ratón primario: 1, 2 y 3


public boolean avoid_deadlock  ( ) { return soot . PhaseOptions . getBoolean ( options , "avoid-deadlock" ) ; }

Realice la evitación de punto muerto: realice la evitación de punto muerto.Realice la evitación de punto muerto haciendo cumplir un orden de bloqueo donde sea necesario.


public boolean isDrawSlicesUnderHoleEnabled  ( ) { return mDrawSlicesUnderHole ; }

Devuelve VERDADERO si las puntas interiores de las rodajas son visibles detrás del agujero, Falso si no.


public void makeOneTimeUse  ( ) { used = new AtomicBoolean ( false ) ; }

Haz que este observador se pueda usar exactamente una vez.


@ ObjectiveCName ( "join:" ) private static String join  ( String [ ] list ) { StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 ; i < list . length ; i ++ ) { if ( i == list . length - 1 ) { sb . append ( list [ i ] ) ; } else { sb . append ( list [ i ] ) ; sb . append ( MessageBuilder . MPS ) ; } } return sb . toString ( ) ; }

Se une a todos los elementos de la lista junto con la secuencia dada.


public static void pickImage  ( Context context , android . support . v4 . app . Fragment fragment ) { pickImage ( context , fragment , REQUEST_PICK ) ; }

Elija la imagen de un fragmento de la biblioteca de soporte


protected void cancelButtonPressed  ( ) { setVisible ( false ) ; }


public static SM_SYSTEM_MESSAGE STR_SKILL_SUCC_Blind_END_A_TO_B  ( String skilltarget ) { return new SM_SYSTEM_MESSAGE ( 1200901 , skilltarget ) ; }


public boolean isCritical  ( ) { return true ; }

¿Es este un comando crítico que solo se puede ejecutar cuando no se está ejecutando otro comando?


protected T [ ] [ ] copy  ( final T [ ] [ ] original ) { if ( original == null ) { return null ; } final T [ ] [ ] copied = MathArrays . buildArray ( time . getField ( ) , original . length , - 1 ) ; for ( int i = 0 ; i < original . length ; ++ i ) { copied [ i ] = original [ i ] . clone ( ) ; } return copied ; }


public long writeTo  ( DataOutput output ) throws IOException { long nBytes = 0 ; assert this . hasLegalType ( ) : "Unknown Mary file type [" + type + "]." ; output . writeInt ( magic ) ; nBytes += 4 ; output . writeInt ( version ) ; nBytes += 4 ; output . writeInt ( type ) ; nBytes += 4 ; return ( nBytes ) ; }


public static ByteBuffer readFile  ( File file ) throws IOException { FileInputStream fis = new FileInputStream ( file ) ; FileChannel fc = fis . getChannel ( ) ; ByteBuffer readBuffer = ByteBuffer . allocate ( ( int ) fc . size ( ) ) ; fc . read ( readBuffer ) ; fis . close ( ) ; readBuffer . rewind ( ) ; return readBuffer ; }

Nuevo método basado en NIO para leer los contenidos de un archivo como matriz de bytes.Solo se pueden leer archivos hasta el tamaño.El búfer de byte se reborza cuando se devuelve.


@ Override public Class < ? extends Task > taskClass  ( ) { return PostgreSQLSinkTask . class ; }


private void doIndent  ( ) throws XMLStreamException  { if ( depth > 0 ) { for ( int i = 0 ; i < depth ; i ++ ) super . writeCharacters ( indentStep ) ; } }

Indentación de impresión para el nivel actual.


public static Bitmap punchARoundedHoleInABitmap  ( Context context , int screenWidth , int screenHeight , int x , int y , int holeDiameter , int backgroundColor ) { Bitmap bitmap = Bitmap . createBitmap ( screenWidth , screenHeight , Bitmap . Config . ARGB_8888 ) ; Canvas canvas = new Canvas ( bitmap ) ; Paint paint = new Paint ( ) ; paint . setAntiAlias ( true ) ; canvas . drawColor ( context . getResources ( ) . getColor ( backgroundColor ) ) ; paint . setXfermode ( new PorterDuffXfermode ( PorterDuff . Mode . CLEAR ) ) ; canvas . drawCircle ( x + holeDiameter / 2 , y + holeDiameter / 2 , holeDiameter / 2 , paint ) ; return bitmap ; }

Crea una imagen de pantalla completa y punzando un agujero dentro


public boolean endOfStream  ( ) { return finished ; }

Averigüe si se ha alcanzado el final de la corriente.


@ NonNull public Optional < T > or  ( @ NonNull Optional < T > alternative ) { return isDefined ( ) ? this : alternative ; }

Cambia esto a la alternativa, si no existe el valor, solo se devuelve si existe el valor.


public static SM_SYSTEM_MESSAGE STR_CANT_USE_ITEM  ( DescriptionId value0 ) { return new SM_SYSTEM_MESSAGE ( 1300393 , value0 ) ; }


public AxisLabelLayout ( String group , int axis , ValuedRangeModel values ) { this ( group , axis , values , null ) ; }

Crea un nuevo diseño de Axislabellayout.


public static SM_SYSTEM_MESSAGE STR_SKILL_SUCC_InteralSkill_A_TO_SELF  ( String skillcaster , String skillname ) { return new SM_SYSTEM_MESSAGE ( 1201273 , skillcaster , skillname ) ; }

[% Skillcaster] usó [% de habilidad] y recibió un efecto de cadena periódico.


private boolean subsumes  ( String selector , String other ) { if ( selector . equals ( "*" ) ) { return true ; } if ( other . equals ( "*" ) ) { return false ; } if ( selector . endsWith ( ".*" ) ) { selector = selector . substring ( 0 , selector . length ( ) - 1 ) ; if ( other . endsWith ( ".*" ) ) { other = other . substring ( 0 , other . length ( ) - 1 ) ; } if ( ConfigRuleSet . this . maintainSelectorMinimizationBugExperimentEnabled ( ) ) { return selector . startsWith ( other ) ; } else { return other . startsWith ( selector ) ; } } return selector . equals ( other ) ; }

Compruebe si el selector subsume otro selector, es decir, cada nombre que coincida con el otro selector también coincidirá con este selector.


public static LikesAttributesImpl empty  ( ) { return new LikesAttributesImpl ( ) ; }


public Infoflow ( String androidPath , boolean forceAndroidJar , BiDirICFGFactory icfgFactory , IPathBuilderFactory pathBuilderFactory ) { super ( icfgFactory ) ; this . androidPath = androidPath ; this . forceAndroidJar = forceAndroidJar ; this . pathBuilderFactory = pathBuilderFactory ; }

Crea una nueva instancia de la clase INFOFLOW para analizar archivos APK de Android.


public SDTTimeDeadbandScheduler ( final SourceDataTag sourceDataTag , final IProcessMessageSender processMessageSender , final EquipmentSenderFilterModule equipmentSenderFilterModule , final Timer timeDeadbandTimer , final DataTagValueFilter dataTagValueFilter , final IDynamicTimeDeadbandFilterer dynamicTimeDeadbandFilterer ) { this . dataTagValueFilter = dataTagValueFilter ; this . processMessageSender = processMessageSender ; this . equipmentSenderFilterModule = equipmentSenderFilterModule ; this . dynamicTimeDeadbandFilterer = dynamicTimeDeadbandFilterer ; this . timeDeadbandTimer = timeDeadbandTimer ; if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "creating time-deadband scheduler for tag : " + sourceDataTag . getId ( ) ) ; } this . sourceDataTag = sourceDataTag ; }

Crea un nuevo sdttimededeadbandscheduler


private List < EnvVar > extractEnvironmentVariables  ( Document document , String elementName ) { List < EnvVar > list = new ArrayList < EnvVar > ( ) ; NodeList nodeList = document . getElementsByTagName ( elementName ) ; for ( int index = 0 ; index < nodeList . getLength ( ) ; index ++ ) { Element element = ( Element ) nodeList . item ( index ) ; Class < ? > type = null ; try { type = Class . forName ( element . getAttribute ( ENVVAR_TYPE_ATTRIBUTE ) ) ; } catch ( ClassNotFoundException e ) { ConsoleManager . getInstance ( ) . exception ( this , e ) ; } EnvVar envVar = new EnvVar ( element . getAttribute ( ENVVAR_NAME_ATTRIBUTE ) , type , false ) ; if ( element . hasAttribute ( ENVVAR_VALUE_ATTRIBUTE ) ) { envVar . setValue ( element . getAttribute ( ENVVAR_VALUE_ATTRIBUTE ) ) ; } list . add ( envVar ) ; } return list ; }


public DocumentProperties ( Map < String , Object > properties ) { this . _map = CollectionsFactory . getInstance ( ) . createMap ( properties != null ? properties : EMPTY_PROPERTIES ) ; }

Construye una nueva <tt> documentProperties </ tt> con las mismas propiedades que el MAP </ TT> especificado </ tt>.


public AemContentFinder resize  ( int widthInPixels ) { if ( widthInPixels <= 0 ) { collapse ( ) ; } else { if ( isCollapsed ( ) ) { expand ( ) ; } Draggable dragable = factory . createDraggable ( resizerDiv , framePath ) ; dragable . dropByOffset ( widthInPixels - getCurrentWidth ( ) , 0 ) ; bobcatWait . withTimeout ( Timeouts . MEDIUM ) . until ( ExpectedConditions . invisibilityOfElementLocated ( By . xpath ( SHOWN_DURING_MOUSE_DRAG_DIV ) ) ) ; } return this ; }

Cambia de tamaño de contentfinder.Si los anchospixeles son más bajos o iguales 0, luego se invoca el método de colapso ().Puede ser útil seleccionar la pestaña en la barra de iconos.En Selenium, solo los elementos visibles son clicables, por lo que a veces el usuario tiene que cambiar el tamaño de ContentFinder antes de hacer clic en la pestaña.


public void __setDaoSession  ( DaoSession daoSession ) { this . daoSession = daoSession ; myDao = daoSession != null ? daoSession . getFileModelDao ( ) : null ; }

Llamado por mecanismos internos, no te llamen.


public boolean isCritical  ( ) { return true ; }


public static byte [ ] decode  ( byte [ ] source , int off , int len ) throws Base64DecoderException { return decode ( source , off , len , DECODABET ) ; }

Decodifica contenido base64 en formato de matriz de bytes y devuelve la matriz de bytes decodificados.


public void toggleSelection  ( final int position ) { if ( mSelectedItems . get ( position , false ) ) { mSelectedItems . delete ( position ) ; } else { mSelectedItems . put ( position , true ) ; } notifyItemChanged ( position ) ; }

Alternar el estado de selección del elemento en una posición determinada


private static void inferConstraints  ( WidgetContainer base ) { if ( base == null ) { return ; } if ( base instanceof ConstraintWidgetContainer && ( ( ConstraintWidgetContainer ) base ) . handlesInternalConstraints ( ) ) { return ; } int preX = base . getX ( ) ; int preY = base . getY ( ) ; base . setX ( 0 ) ; base . setY ( 0 ) ; for ( ConstraintWidget constraintWidget : base . getChildren ( ) ) { if ( constraintWidget instanceof ConstraintWidgetContainer ) { ConstraintWidgetContainer container = ( ConstraintWidgetContainer ) constraintWidget ; if ( ! container . getChildren ( ) . isEmpty ( ) ) { inferConstraints ( container ) ; } } } ArrayList < ConstraintWidget > list = new ArrayList < > ( base . getChildren ( ) ) ; list . add ( 0 , base ) ; ConstraintWidget [ ] widgets = list . toArray ( new ConstraintWidget [ list . size ( ) ] ) ; ScoutWidget . computeConstraints ( ScoutWidget . create ( widgets ) ) ; base . setX ( preX ) ; base . setY ( preY ) ; }

Descenso recursivo del árbol de widget que infiere restricciones en el contenedor de widgets restringidos


public static final void main  ( String [ ] args ) { System . out . println ( "dyn4j v" + Version . getVersion ( ) ) ; }

Clase principal para imprimir la versión a la consola.


static double logBinomialProbability  ( int x , int n , double p , double q ) { if ( n == 0 ) { return x == 0 ? 0d : Double . NEGATIVE_INFINITY ; } if ( x == 0 ) { if ( p < 0.1 ) { return - getDeviancePart ( n , n * q ) - n * p ; } else { return n * FastMath . log ( q ) ; } } else if ( x == n ) { if ( q < 0.1 ) { return - getDeviancePart ( n , n * p ) - n * q ; } else { return n * FastMath . log ( p ) ; } } else { double ret = getStirlingError ( n ) - getStirlingError ( x ) - getStirlingError ( n - x ) - getDeviancePart ( x , n * p ) - getDeviancePart ( n - x , n * q ) ; double f = ( MathUtils . TWO_PI * x * ( n - x ) ) / n ; ret = - 0.5 * FastMath . log ( f ) + ret ; return ret ; } }

Calcule el logaritmo del PMF para una distribución binomial utilizando la expansión del punto de montar.


@ Override public void decl  ( char [ ] buff , int offset , int length ) throws SAXException { String s = new String ( buff , offset , length ) ; String name = null ; String systemid = null ; String publicid = null ; String [ ] v = split ( s ) ; if ( v . length > 0 && "DOCTYPE" . equalsIgnoreCase ( v [ 0 ] ) ) { if ( theDoctypeIsPresent ) return ; theDoctypeIsPresent = true ; if ( v . length > 1 ) { name = v [ 1 ] ; if ( v . length > 3 && "SYSTEM" . equals ( v [ 2 ] ) ) { systemid = v [ 3 ] ; } else if ( v . length > 3 && "PUBLIC" . equals ( v [ 2 ] ) ) { publicid = v [ 3 ] ; if ( v . length > 4 ) { systemid = v [ 4 ] ; } else { systemid = "" ; } } } } publicid = trimquotes ( publicid ) ; systemid = trimquotes ( systemid ) ; if ( name != null ) { publicid = cleanPublicid ( publicid ) ; theLexicalHandler . startDTD ( name , publicid , systemid ) ; theLexicalHandler . endDTD ( ) ; theDoctypeName = name ; theDoctypePublicId = publicid ; if ( theScanner instanceof Locator ) { theDoctypeSystemId = ( ( Locator ) theScanner ) . getSystemId ( ) ; try { theDoctypeSystemId = new URL ( new URL ( theDoctypeSystemId ) , systemid ) . toString ( ) ; } catch ( Exception ignore ) { } } } }

El análisis de la definición completa del tipo de documento XML es demasiado complejo, pero para muchos casos simples podemos extraer algo útil a partir de él.<p> DOCTYPEECL :: = '<! ¡El nombre de DOCTYPE (S EXTERENERS)?¿S?('[' intsubset ']' s?)?'>' Decsección :: = PERREREFERENCIA |S intsubset :: = (markupdecl | declarepsp) * markupdecl :: = elementdecl |Attlistdecl |Entitydecl |NotationDecl |PI |Comentario ExternalID :: = 'System' s Systemliteral |'Public' s Pubidliteral Systemliteral