public static double parseDouble  ( char [ ] chars , int start , int length ) throws NumberFormatException { if ( length == 0 ) { throw new NumberFormatException ( "cannot parse empty string as double" ) ; } int end = start + length ; int i = start ; char c = chars [ i ] ; if ( c == 'N' ) { if ( match ( "NaN" , chars , i , end ) ) { return Double . NaN ; } else { throw newNumberFormatException ( "cannot parse string as double" , chars , start , length ) ; } } double sigNum ; if ( c == '-' ) { sigNum = - 1D ; i ++ ; c = chars [ i ] ; } else if ( c == '+' ) { sigNum = 1D ; i ++ ; c = chars [ i ] ; } else { sigNum = 1D ; } if ( c == 'I' ) { if ( match ( "Infinity" , chars , i , end ) ) { return sigNum == - 1 ? Double . NEGATIVE_INFINITY : Double . POSITIVE_INFINITY ; } else { throw newNumberFormatException ( "cannot parse string as double" , chars , start , length ) ; } } if ( ( c < '0' || c > '9' ) && c != '.' ) { throw newNumberFormatException ( "leading digit or '.' required" , chars , start , length ) ; } long decimal = 0 ; int decimalPoint = - 1 ; while ( true ) { int digit = c - '0' ; if ( digit >= 0 && digit < 10 ) { long tmp = decimal * 10 + digit ; if ( decimal > LONG_MAX_DIV10 || tmp < decimal ) { return Double . parseDouble ( new String ( chars , start , length ) ) ; } decimal = tmp ; } else if ( c == '.' && decimalPoint == - 1 ) { decimalPoint = i ; } else { break ; } if ( ++ i >= end ) { break ; } c = chars [ i ] ; } int fractionLength = ( decimalPoint >= 0 ) ? i - decimalPoint - 1 : 0 ; int exp = 0 ; if ( i < end ) { if ( c == 'E' || c == 'e' ) { c = chars [ ++ i ] ; boolean isNegativeExp = ( c == '-' ) ; if ( ( isNegativeExp || ( c == '+' ) ) && ( ++ i < end ) ) { c = chars [ i ] ; } if ( ( c < '0' ) || ( c > '9' ) ) { throw newNumberFormatException ( "invalid exponent" , chars , start , length ) ; } while ( true ) { int digit = c - '0' ; if ( ( digit >= 0 ) && ( digit < 10 ) ) { int tmp = exp * 10 + digit ; if ( ( exp > INT_MAX_DIV10 ) || ( tmp < exp ) ) { return Double . parseDouble ( new String ( chars , start , length ) ) ; } exp = tmp ; } else break ; if ( ++ i >= end ) { break ; } c = chars [ i ] ; } if ( isNegativeExp ) { exp = - exp ; } } else { throw newNumberFormatException ( "extra characters" , chars , start , length ) ; } } return sigNum * toDoublePow10 ( decimal , exp - fractionLength ) ; }

Analiza la cortadora de caracteres especificada [] como un doble </ código>.


public WallGetByIdQueryWithExtended ( VkApiClient client , UserActor actor , List < String > posts ) { super ( client , "wall.getById" , GetByIdExtendedResponse . class ) ; accessToken ( actor . getAccessToken ( ) ) ; posts ( posts ) ; extended ( true ) ; }

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


public static String timeFormat  ( long duration ) { long value = duration ; value = value / 1000 ; long seconds = value % 60 ; value = value / 60 ; long minutes = value % 60 ; value = value / 60 ; long hours = value % 24 ; long days = value / 24 ; String result = "" ; if ( days > 0 ) result = days + ( days > 1 ? " days" : " day" ) + ( hours > 0 ? ", " + hours + getHoursText ( hours ) : "" ) + ( minutes > 0 ? ", " + minutes + getMinutesText ( minutes ) : "" ) + ( seconds > 0 ? ", " + seconds + getSecondsText ( seconds ) : "" ) ; else if ( hours > 0 ) result = hours + getHoursText ( hours ) + ( minutes > 0 ? ", " + minutes + getMinutesText ( minutes ) : "" ) + ( seconds > 0 ? ", " + seconds + getSecondsText ( seconds ) : "" ) ; else if ( minutes > 0 ) result = minutes + getMinutesText ( minutes ) + ( seconds > 0 ? ", " + seconds + getSecondsText ( seconds ) : "" ) ; else if ( seconds > 0 ) result = seconds + getSecondsText ( seconds ) ; else result = "0" ; return ( result ) ; }

Formatear un tiempo en una cadena legible


public boolean textToSpeech  ( String text ) { return voice . speak ( text ) ; }

Convierte el texto dado a voz basado con las opciones de procesamiento actualmente establecidas en Freetts.


private static byte readByte  ( boolean [ ] rawbits , int startIndex ) { int n = rawbits . length - startIndex ; if ( n >= 8 ) { return ( byte ) readCode ( rawbits , startIndex , 8 ) ; } return ( byte ) ( readCode ( rawbits , startIndex , n ) << ( 8 - n ) ) ; }

Lee un código de longitud 8 en una matriz de bits, relleno con ceros


PileupLocus ( LocusInfo locus , char ref )  { this . chrom = locus . getSequenceName ( ) ; this . pos = locus . getPosition ( ) ; this . ref = ref ; this . baseCount = new LinkedHashMap < Character , Integer > ( ) ; this . baseCount . put ( 'A' , 0 ) ; this . baseCount . put ( 'C' , 0 ) ; this . baseCount . put ( 'G' , 0 ) ; this . baseCount . put ( 'T' , 0 ) ; this . baseCount . put ( 'N' , 0 ) ; for ( RecordAndOffset recOff : locus . getRecordAndPositions ( ) ) { if ( ( ( int ) recOff . getBaseQuality ( ) ) > PileupLocus . MIN_BASE_QUAL ) { char base = Character . toUpperCase ( ( char ) recOff . getReadBase ( ) ) ; int count = this . baseCount . get ( base ) + 1 ; this . baseCount . put ( base , count ) ; } } }

Poja los recuentos de ACTG para la información de locus dada.Ref es la base de referencia si está disponible.Se espera que el objeto LocusInfo ya se haya filtrado para las banderas deseadas.Nota Umbral para mapear la calidad para contar las bases.


protected AbstractWell ( final int k , final int seed ) { this ( k , new int [ ] { seed } ) ; }

Crea un nuevo generador de números aleatorios usando una sola semilla INT.


public static _Fields findByThriftIdOrThrow  ( int fieldId ) { _Fields fields = findByThriftId ( fieldId ) ; if ( fields == null ) throw new IllegalArgumentException ( "Field " + fieldId + " doesn't exist!" ) ; return fields ; }

Encuentre la constante _fields que coincida con FieldID, lanzando una excepción si no se encuentra.


public String message  ( ) { return message ; }


public boolean hasLdapId  ( ) { return ldapId != null && ! ldapId . isEmpty ( ) ; }

Indica si se establece un identificador LDAP.


public FileWriterWithEncoding ( String filename , String encoding ) throws IOException { this ( new File ( filename ) , encoding , false ) ; }

Construye un archivo de archivos con codificación de archivos.


private UInteger ( int value ) { this . value = value & MAX_VALUE ; }

Cree un <código> insigned int </ code> mediante enmascararlo con <code> 0xffffffff </ code> i.e. <code> (int) -1 </ code> se convierte en <código> (uint) 4294967295 </ código>


@ Override protected void showCallbackNonExistentError  ( String error ) { Activity activity = getActivity ( ) . get ( ) ; Tab tab = activity != null ? ( ( ChromeActivity ) activity ) . getActivityTab ( ) : null ; if ( tab != null ) { String message = ( error ) ; MessageInfoBar infobar = new MessageInfoBar ( message ) ; infobar . setExpireOnNavigation ( false ) ; tab . getInfoBarContainer ( ) . addInfoBar ( infobar ) ; } else { super . showCallbackNonExistentError ( error ) ; } }

Muestra un mensaje de error de infobar que anula la implementación de WindowsAndroid.


public boolean isSelected  ( ) { ClusterViewer viewer = getViewer ( ) ; return viewer . getEcologicalIndex ( ) . equalsIgnoreCase ( CalculateEcologicalIndices . HELLINGER ) ; }


public RepositoryChanged updateGitRepository  ( String repoName , String repoRemoteLocation , String repoUserName , String repoPassword , String repoLocations , String branch , boolean useCredentials ) { boolean changed = false ; List < String > changedFiles = new ArrayList < > ( ) ; List < String > deletedFiles = new ArrayList < > ( ) ; Singleton . getLogger ( ) . info ( "Attempting to pull latest from " + repoRemoteLocation + " for " + repoName ) ; try { Repository localRepository = new FileRepository ( new File ( repoLocations + "/" + repoName + "/.git" ) ) ; Ref head = localRepository . getRef ( "HEAD" ) ; Git git = new Git ( localRepository ) ; git . reset ( ) ; git . clean ( ) ; PullCommand pullCmd = git . pull ( ) ; if ( useCredentials ) { pullCmd . setCredentialsProvider ( new UsernamePasswordCredentialsProvider ( repoUserName , repoPassword ) ) ; } pullCmd . call ( ) ; Ref newHEAD = localRepository . getRef ( "HEAD" ) ; if ( ! head . toString ( ) . equals ( newHEAD . toString ( ) ) ) { changed = true ; ObjectId oldHead = localRepository . resolve ( head . getObjectId ( ) . getName ( ) + "^{tree}" ) ; ObjectId newHead = localRepository . resolve ( newHEAD . getObjectId ( ) . getName ( ) + "^{tree}" ) ; ObjectReader reader = localRepository . newObjectReader ( ) ; CanonicalTreeParser oldTreeIter = new CanonicalTreeParser ( ) ; oldTreeIter . reset ( reader , oldHead ) ; CanonicalTreeParser newTreeIter = new CanonicalTreeParser ( ) ; newTreeIter . reset ( reader , newHead ) ; List < DiffEntry > entries = git . diff ( ) . setNewTree ( newTreeIter ) . setOldTree ( oldTreeIter ) . call ( ) ; for ( DiffEntry entry : entries ) { if ( "DELETE" . equals ( entry . getChangeType ( ) . name ( ) ) ) { deletedFiles . add ( FilenameUtils . separatorsToUnix ( entry . getOldPath ( ) ) ) ; } else { changedFiles . add ( FilenameUtils . separatorsToUnix ( entry . getNewPath ( ) ) ) ; } } } } catch ( IOException | GitAPIException | InvalidPathException ex ) { changed = false ; Singleton . getLogger ( ) . warning ( "ERROR - caught a " + ex . getClass ( ) + " in " + this . getClass ( ) + " updateGitRepository for " + repoName + "\n with message: " + ex . getMessage ( ) ) ; } return new RepositoryChanged ( changed , changedFiles , deletedFiles ) ; }

Actualice un repositorio de git y devuelva si ha cambiado y las diferencias.


public T remove  ( ServletRequest request , Map < String , Object > expandContext ) { AttributeAccessor < T > aa = new AttributeAccessor < T > ( name , expandContext , this . attributeName , this . fma , this . needsExpand ) ; return aa . remove ( request ) ; }

Basado en Nombre Eliminar de ServleReRequest o de la lista en ServleReRequest


@ Override public void attributeSelection  ( String field ) { }


public GigaSpaceConfigurer ( IJSpace space ) { gigaSpaceFactoryBean = new GigaSpaceFactoryBean ( ) ; gigaSpaceFactoryBean . setSpace ( space ) ; }

Construye un nuevo configurador basado en el espacio.


@ Override public Filter createFilter  ( ) { return new IsLessThanOrEqualToExtended ( ) ; }


@ Override public boolean onPassphraseEntered  ( String passphrase ) { if ( ! passphrase . isEmpty ( ) && ProfileSyncService . get ( ) . setDecryptionPassphrase ( passphrase ) ) { finish ( ) ; return true ; } return false ; }

Devolución de llamada para passphrasedialogfragment.listener


protected void advanceToNextPage  ( ) { getPageDelegate ( ) . advanceToNextPage ( ) ; }


public MarketGetCommentsQuery count  ( Integer value ) { return unsafeParam ( "count" , value ) ; }


protected WallRestoreCommentQuery commentId  ( int value ) { return unsafeParam ( "comment_id" , value ) ; }


public boolean isApplicable  ( ) { return true ; }

¿El comando es actualmente aplicable?Utilizado para establecer habilitar el estado de comando


private static Font decodeFontElement  ( Document document , Node child ) { String name = child . getTextContent ( ) ; NamedNodeMap attributes = child . getAttributes ( ) ; Node sizeNode = attributes . getNamedItem ( FONT_SIZE ) ; Node styleNode = attributes . getNamedItem ( FONT_STYLE ) ; int size = Integer . valueOf ( sizeNode . getNodeValue ( ) ) . intValue ( ) ; int style = Integer . valueOf ( styleNode . getNodeValue ( ) ) . intValue ( ) ; Font font = new Font ( name , style , size ) ; return font ; }


public static String decodePassword  ( final String value ) { return ConversionUtils . base64ToString ( value ) ; }

Decodifica la contraseña dada de la base 64.


public static boolean isValidName  ( String name ) { return NameConfig . CHAR_NAME_PATTERN . matcher ( name ) . matches ( ) ; }

Verifica si un nombre es válido.Sólo debe contener letras inglesas.


public Object findTemplatesByIndex  ( Context context , IServerTypeDesc typeDesc , IEntryHolder entry , MatchTarget matchTarget ) { TypeData typeData = _typeDataMap . get ( typeDesc ) ; if ( typeData == null ) return null ; return findTemplatesByIndex ( context , typeData , entry , matchTarget ) ; }

Dado que un nombre de clase devuelva la SL de plantillas correspondientes.Esta API es más eficiente que el uso directo del iterador de plantillas.


public boolean isHidden  ( final String bySelector , int timeout ) { return isConditionMet ( not ( visibilityOfElementLocated ( By . cssSelector ( bySelector ) ) ) , timeout ) ; }

Los cheques si los webelementos especificados por el selector de CSS se ocultan dentro del tiempo de espera especificado.


public void pausePlaying  ( ) { if ( this . state == STATE . MEDIA_RUNNING && this . player != null ) { this . player . pause ( ) ; this . setState ( STATE . MEDIA_PAUSED ) ; } else { Log . d ( LOG_TAG , "AudioPlayer Error: pausePlaying() called during invalid state: " + this . state . ordinal ( ) ) ; sendErrorStatus ( MEDIA_ERR_NONE_ACTIVE ) ; } }


@ Override public void redoAction  ( UndoInterface undoRedoObject ) { if ( ( spinner != null ) && ( undoRedoObject != null ) ) { if ( undoRedoObject . getNewValue ( ) instanceof Double ) { Double newValue = ( Double ) undoRedoObject . getNewValue ( ) ; internalSetValue ( newValue ) ; } } }


private void internal_populateDoubleField  ( Map < String , String > options , FieldIdEnum fieldId , String key ) { if ( ( options != null ) && options . containsKey ( key ) ) { String storedValue = options . get ( key ) ; Double value = Double . valueOf ( storedValue ) ; fieldConfigVisitor . populateDoubleField ( fieldId , value ) ; } else { setDefaultValue ( fieldId ) ; } }


public WallGetQueryWithExtended ( VkApiClient client , UserActor actor ) { super ( client , "wall.get" , GetExtendedResponse . class ) ; accessToken ( actor . getAccessToken ( ) ) ; extended ( true ) ; }

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


public SpaceCleanedException ( String spaceName , String s ) { super ( spaceName , s ) ; }

Construye un <código> spacecleedexception </ code> con el mensaje de detalle especificado.


@ Override protected void onCreate  ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( R . layout . activity_update_me ) ; }


public static boolean compare  ( Object o1 , Object o2 ) { if ( o1 == null || o2 == null ) return o1 == o2 ; if ( ! ( o1 instanceof ReferentUuid ) ) return false ; if ( ! ( o2 instanceof ReferentUuid ) ) return false ; return ( ( ReferentUuid ) o1 ) . getReferentUuid ( ) . equals ( ( ( ReferentUuid ) o2 ) . getReferentUuid ( ) ) ; }

Devuelve <código> Verdadero </ code> Si los dos objetos pasados no son <codificados> null </ code>, implementan <código> referencuiUd </ code> y su <codect> UUID </ CODE> S, o si son ambos <código> NULL </ CODE>.De lo contrario, devuelve <código> FALSO </ CODE>.


public boolean isApplicable  ( ) { return getDoc ( ) . getNumberOfReads ( ) > 0 ; }


public IpLogsExample ( ) { oredCriteria = new ArrayList < Criteria > ( ) ; }

Este método fue generado por MyBatis Generator.Este método corresponde a la tabla de la base de datos Public.ip_logs


public double [ ] generatePolynomialValues  ( int numSamples , double a , double b ) { return generatePolynomialValues ( coeffs , numSamples , a , b ) ; }

Para un polinomio con los coeficientes dados, calcule <código> numsamples </ code> valores, igualmente espaciados en el intervalo [A, B [.


public static void reportStatus  ( int status ) { RecordHistogram . recordEnumeratedHistogram ( "Search.IcingContextReportingStatus" , status , STATUS_BOUNDARY ) ; }

Registra el estado dado a través de UMA.Use una de las constantes de estado_ * arriba.


public Bundler putLongArray  ( String key , long [ ] value ) { bundle . putLongArray ( key , value ) ; return this ; }

Inserta un valor de matriz largo en el mapeo de este paquete, reemplazando cualquier valor existente para la clave dada.Cualquier clave o valor puede ser nulo.


public void rectValueToPixel  ( RectF r , float phaseY ) { r . top *= phaseY ; r . bottom *= phaseY ; mMatrixValueToPx . mapRect ( r ) ; mViewPortHandler . getMatrixTouch ( ) . mapRect ( r ) ; mMatrixOffset . mapRect ( r ) ; }

Transforme un rectángulo con todas las matrices con fases de animación potenciales.


public static boolean isExtension  ( String filename , String extension ) { if ( filename == null ) { return false ; } if ( extension == null || extension . length ( ) == 0 ) { return indexOfExtension ( filename ) == - 1 ; } String fileExt = getExtension ( filename ) ; return fileExt . equals ( extension ) ; }

Comprueba si la extensión del nombre de archivo es la especificada.<p> Este método obtiene la extensión como la parte textual del nombre de archivo después del último punto.No debe haber separador de directorio después del punto.La verificación de extensión distingue entre mayúsculas y minúsculas en todas las plataformas.


public boolean isInterface  ( ) { checkLevel ( HIERARCHY ) ; return Modifier . isInterface ( this . getModifiers ( ) ) ; }

Método de conveniencia;Devuelve VERDADERO si esta clase es una interfaz.


public ImageSize scaleDown  ( int sampleSize ) { return new ImageSize ( width / sampleSize , height / sampleSize ) ; }

Escalas en las dimensiones en <b> Samplesize </ b> veces.Devuelve nuevo objeto.


public Builder useExpiredDataWhenNoLoaderAvailable  ( ) { this . useExpiredDataIfLoaderNotAvailable = true ; return this ; }

Si se llama ReactiveCache Dispatches Records ya caducados en lugar de lanzar una excepción.


public Cleaner ( String parentName , ReferenceQueue < V > queue , Map < K , ValueHolder < K , V > > entryInfos ) { super ( parentName + "$Cleaner" ) ; _queue = queue ; _table = entryInfos ; setDaemon ( true ) ; }


public synchronized void remove  ( Lease lease ) throws UnknownLeaseException  { Entry e = findEntry ( lease ) ; if ( ! removeLeaseInRenew ( e ) ) leases . remove ( e ) ; calcActualRenews ( ) ; logger . log ( Level . FINE , "Removed lease {0}" , lease ) ; }

Elimina un contrato de arrendamiento dado del conjunto administrado de arrendamientos;Pero no cancela el contrato de arrendamiento dado.


public void assertion  ( AssertionError e ) { fail ( ) ; logEntries . add ( new AssertionFailedEntry ( e ) ) ; }

Marque la prueba como falló y registra una afirmación dura fallida.


public static boolean isInstantRunCapableDeviceVersion  ( @ NotNull AndroidVersion version ) { return version . getApiLevel ( ) >= 15 ; }

Devuelve VERDADERO si el dispositivo es capaz de ejecutar la ejecución instantánea


public static long copyLarge  ( InputStream input , OutputStream output , final long inputOffset , final long length , byte [ ] buffer ) throws IOException { if ( inputOffset > 0 ) { skipFully ( input , inputOffset ) ; } if ( length == 0 ) { return 0 ; } final int bufferLength = buffer . length ; int bytesToRead = bufferLength ; if ( length > 0 && length < bufferLength ) { bytesToRead = ( int ) length ; } int read ; long totalRead = 0 ; while ( bytesToRead > 0 && EOF != ( read = input . read ( buffer , 0 , bytesToRead ) ) ) { output . write ( buffer , 0 , read ) ; totalRead += read ; if ( length > 0 ) { bytesToRead = ( int ) Math . min ( length - totalRead , bufferLength ) ; } } return totalRead ; }

Copie algunos o todos los bytes de un gran (más de 2 GB) <CÓDIGO> ENTRADA </ CÓDIGO> a un <CÓDIGO> SURODSTREAM </ CODE>, opcionalmente omitiendo los bytes de entrada.<P /> Este método utiliza el búfer proporcionado, por lo que no es necesario usar un <código> tamponputStream </ Code>.<p />


public final boolean canSetDouble  ( String field ) { return m_table . canSetDouble ( field ) ; }

Compruebe si el método <código> setdouble </ code> puede usarse de forma segura para el campo de datos dado.


private static boolean deleteResolveEBUSY  ( File file ) { final File to = new File ( file . getAbsolutePath ( ) + System . currentTimeMillis ( ) ) ; file . renameTo ( to ) ; return to . delete ( ) ; }

Error: Abrir fallido: EBUSY (dispositivo o recurso ocupado) Fix: http://stackoverflow.com/questions/11539657/open-failed-ebusy-device-or-resource-busy


public BasicProxyPreparer ( boolean verify , MethodConstraints methodConstraints , Permission [ ] permissions ) { this . verify = verify ; this . methodConstraintsSpecified = true ; this . methodConstraints = methodConstraints ; this . permissions = checkPermissions ( permissions ) ; }

Crea un preparador de proxy que especifica si se deben verificar los proxies, especifica permisos para otorgarlos, y especifica qué restricciones de métodos deben usar al verificar y establecer restricciones.


public static JsonArray array  ( String ... strings ) { if ( strings == null ) { throw new NullPointerException ( "values is null" ) ; } JsonArray array = new JsonArray ( ) ; for ( String value : strings ) { array . add ( value ) ; } return array ; }

Crea un nuevo jsonarray que contiene las representaciones de JSON de las cadenas dadas.


public SootMethodRef makeMethodRef  ( SootClass declaringClass , String name , List < Type > parameterTypes , Type returnType , boolean isStatic ) { return new SootMethodRefImpl ( declaringClass , name , parameterTypes , returnType , isStatic ) ; }

Crea una referencia no resuelta a un método.


private void computeNJ  ( Taxa taxa , Distances dist , PhyloTree tree ) { tree . clear ( ) ; try { HashMap < String , Node > TaxaHashMap = new HashMap < > ( ) ; int nbNtax = dist . getNtax ( ) ; StringBuffer tax [ ] = new StringBuffer [ nbNtax + 1 ] ; for ( int i = 1 ; i <= nbNtax ; i ++ ) { tax [ i ] = new StringBuffer ( ) ; tax [ i ] . append ( taxa . getLabel ( i ) ) ; Node v = tree . newNode ( ) ; tree . setLabel ( v , tax [ i ] . toString ( ) ) ; TaxaHashMap . put ( tax [ i ] . toString ( ) , v ) ; } double h [ ] [ ] = new double [ nbNtax + 1 ] [ nbNtax + 1 ] ; double b [ ] = new double [ nbNtax + 1 ] ; int i_min = 0 , j_min = 0 ; double temp , dist_e = 0.0 , dist_f = 0.0 ; StringBuffer tax_old_i ; StringBuffer tax_old_j ; Node v ; Edge e , f ; for ( int i = 0 ; i <= nbNtax ; i ++ ) { h [ 0 ] [ i ] = 1.0 ; h [ i ] [ 0 ] = 1.0 ; } for ( int i = 1 ; i <= nbNtax ; i ++ ) { for ( int j = 1 ; j <= nbNtax ; j ++ ) { if ( i < j ) h [ i ] [ j ] = dist . get ( i , j ) ; else h [ i ] [ j ] = dist . get ( j , i ) ; } } for ( int i = 1 ; i <= nbNtax ; i ++ ) { for ( int j = 1 ; j <= nbNtax ; j ++ ) { b [ i ] += h [ i ] [ j ] ; } } for ( int actual = nbNtax ; actual > 2 ; actual -- ) { double d_min = Double . MAX_VALUE ; for ( int i = 1 ; i < nbNtax ; i ++ ) { if ( h [ 0 ] [ i ] == 0.0 ) continue ; for ( int j = i + 1 ; j <= nbNtax ; j ++ ) { if ( h [ 0 ] [ j ] == 0.0 ) continue ; if ( h [ i ] [ j ] - ( ( b [ i ] + b [ j ] ) / ( actual - 2 ) ) < d_min ) { d_min = h [ i ] [ j ] - ( ( b [ i ] + b [ j ] ) / ( actual - 2 ) ) ; i_min = i ; j_min = j ; } } } dist_e = 0.5 * ( h [ i_min ] [ j_min ] + b [ i_min ] / ( actual - 2 ) - b [ j_min ] / ( actual - 2 ) ) ; dist_f = 0.5 * ( h [ i_min ] [ j_min ] + b [ j_min ] / ( actual - 2 ) - b [ i_min ] / ( actual - 2 ) ) ; h [ j_min ] [ 0 ] = 0.0 ; h [ 0 ] [ j_min ] = 0.0 ; tax_old_i = new StringBuffer ( tax [ i_min ] . toString ( ) ) ; tax_old_j = new StringBuffer ( tax [ j_min ] . toString ( ) ) ; tax [ i_min ] . insert ( 0 , "(" ) ; tax [ i_min ] . append ( "," ) ; tax [ i_min ] . append ( tax [ j_min ] ) ; tax [ i_min ] . append ( ")" ) ; tax [ j_min ] . delete ( 0 , tax [ j_min ] . length ( ) ) ; b [ i_min ] = 0.0 ; b [ j_min ] = 0.0 ; for ( int i = 1 ; i <= nbNtax ; i ++ ) { if ( h [ 0 ] [ i ] == 0.0 ) continue ; temp = ( h [ i ] [ i_min ] + h [ i ] [ j_min ] - dist_e - dist_f ) / 2 ; if ( i != i_min ) { b [ i ] = b [ i ] - h [ i ] [ i_min ] - h [ i ] [ j_min ] + temp ; } b [ i_min ] += temp ; h [ i ] [ i_min ] = temp ; b [ j_min ] = 0.0 ; } for ( int i = 0 ; i <= nbNtax ; i ++ ) { h [ i_min ] [ i ] = h [ i ] [ i_min ] ; h [ i ] [ j_min ] = 0.0 ; h [ j_min ] [ i ] = 0.0 ; } v = tree . newNode ( ) ; TaxaHashMap . put ( tax [ i_min ] . toString ( ) , v ) ; e = tree . newEdge ( TaxaHashMap . get ( tax_old_i . toString ( ) ) , v ) ; tree . setWeight ( e , Math . max ( dist_e , 0.0 ) ) ; f = tree . newEdge ( TaxaHashMap . get ( tax_old_j . toString ( ) ) , v ) ; tree . setWeight ( f , Math . max ( dist_f , 0.0 ) ) ; } for ( int i = 1 ; i <= nbNtax ; i ++ ) { if ( h [ 0 ] [ i ] == 1.0 ) { i_min = i ; i ++ ; for ( ; i <= nbNtax ; i ++ ) { if ( h [ 0 ] [ i ] == 1.0 ) { j_min = i ; } } } } tax_old_i = new StringBuffer ( tax [ i_min ] . toString ( ) ) ; tax_old_j = new StringBuffer ( tax [ j_min ] . toString ( ) ) ; tax [ i_min ] . insert ( 0 , "(" ) ; tax [ i_min ] . append ( "," ) ; tax [ i_min ] . append ( tax [ j_min ] ) ; tax [ i_min ] . append ( ")" ) ; tax [ j_min ] . delete ( 0 , tax [ j_min ] . length ( ) ) ; e = tree . newEdge ( TaxaHashMap . get ( tax_old_i . toString ( ) ) , TaxaHashMap . get ( tax_old_j . toString ( ) ) ) ; tree . setWeight ( e , Math . max ( h [ i_min ] [ j_min ] , 0.0 ) ) ; } catch ( Exception ex ) { Basic . caught ( ex ) ; } }


private void recordPushLog  ( String configName ) { PushLog pushLog = new PushLog ( ) ; pushLog . setAppId ( client . getAppId ( ) ) ; pushLog . setConfig ( configName ) ; pushLog . setClient ( IP4s . intToIp ( client . getIp ( ) ) + ":" + client . getPid ( ) ) ; pushLog . setServer ( serverHost . get ( ) ) ; pushLog . setCtime ( new Date ( ) ) ; pushLogService . add ( pushLog ) ; }

Registre el registro de inserción de configuración


public static Uuid read  ( InputStream in ) throws IOException { long bits0 = readLong ( in ) ; long bits1 = readLong ( in ) ; return create ( bits0 , bits1 ) ; }

Crea un nuevo <código> UUID </ CODE> con el valor de 128 bits obtenido por UNMARSHAlling una representación binaria del suministrado <código> inputstream </ code>.<p> Específicamente, este método lee 16 bytes de la transmisión, y luego crea un nuevo <código> uuid </ code> con el valor de 128 bits representado por los bytes interpretados en la red de bytes de la red (Big-endedian).


public boolean needsHighlight  ( int index ) { if ( ! valuesToHighlight ( ) ) return false ; for ( int i = 0 ; i < mIndicesToHighlight . length ; i ++ ) if ( ( int ) mIndicesToHighlight [ i ] . getX ( ) == index ) return true ; return false ; }

Comprueba si se establece el índice dado para resaltar.


public WatchedObject addResponseWatch  ( SocketChannel sock , ConnectionResource client ) { return addWatch ( new ResponseWatchedObject ( this , sock , client ) ) ; }

Agregue Dado Socket y Cpeeer a los objetos observados (grupo de respuesta)


protected void addPointer  ( String tag , AXmlNode node ) { if ( ! this . nodesWithTag . containsKey ( tag ) ) this . nodesWithTag . put ( tag , new ArrayList < AXmlNode > ( ) ) ; this . nodesWithTag . get ( tag ) . add ( node ) ; }

Agrega un puntero al nodo <código> dado </ código> con la tecla <código> Etiqueta </ código>.


public TypeVariable typeVariable  ( ) { int id = typeVariableList . size ( ) ; typeVariableList . add ( null ) ; TypeVariable result = new TypeVariable ( id , this ) ; typeVariableList . set ( id , result ) ; return result ; }


void addFillComponents  ( Container panel , int [ ] cols , int [ ] rows ) { Dimension filler = new Dimension ( 10 , 10 ) ; boolean filled_cell_11 = false ; CellConstraints cc = new CellConstraints ( ) ; if ( cols . length > 0 && rows . length > 0 ) { if ( cols [ 0 ] == 1 && rows [ 0 ] == 1 ) { panel . add ( Box . createRigidArea ( filler ) , cc . xy ( 1 , 1 ) ) ; filled_cell_11 = true ; } } for ( int index = 0 ; index < cols . length ; index ++ ) { if ( cols [ index ] == 1 && filled_cell_11 ) { continue ; } panel . add ( Box . createRigidArea ( filler ) , cc . xy ( cols [ index ] , 1 ) ) ; } for ( int index = 0 ; index < rows . length ; index ++ ) { if ( rows [ index ] == 1 && filled_cell_11 ) { continue ; } panel . add ( Box . createRigidArea ( filler ) , cc . xy ( 1 , rows [ index ] ) ) ; } }

Agrega componentes de llenado para vaciar las celdas en la primera fila y la primera columna de la cuadrícula.Esto asegura que el espaciado de la red sea el mismo que se muestra en el diseñador.


public static boolean hasICS  ( ) { return Build . VERSION . SDK_INT >= Build . VERSION_CODES . ICE_CREAM_SANDWICH ; }


public Target ( String name , Element maryxmlElement ) { this . name = name ; this . maryxmlElement = maryxmlElement ; }

Cree un objetivo asociado al elemento dado en el árbol de MaryXML.


protected void removeAt  ( int index ) { _values [ index ] = ( long ) 0 ; super . removeAt ( index ) ; }

Elimina el mapeo en el índice </ tt> del mapa.


public void replaceWithUpdate  ( ) { if ( availableUpdate == null ) { return ; } this . name = availableUpdate . name ; this . locale = availableUpdate . locale ; this . version = availableUpdate . version ; this . description = availableUpdate . description ; this . license = availableUpdate . license ; this . locations = availableUpdate . locations ; this . packageFilename = availableUpdate . packageFilename ; this . packageSize = availableUpdate . packageSize ; this . packageMD5 = availableUpdate . packageMD5 ; this . isSelected = availableUpdate . isSelected ; this . status = availableUpdate . status ; this . archiveFile = availableUpdate . archiveFile ; this . infoFile = availableUpdate . infoFile ; this . downloaded = availableUpdate . downloaded ; this . size = availableUpdate . size ; this . installedFilesNames = availableUpdate . installedFilesNames ; this . availableUpdate = null ; stateChanged ( ) ; }

Reemplace esta definición de componente con su actualización disponible.El objeto permanecerá igual, pero todos los datos se sobrescribirán con el contenido de la actualización.Después de que se devuelva este método, IsUpDateApable () devolverá FALSO.


@ Override public String resolveURI  ( String uri ) throws IOException { String resolved = super . resolveURI ( uri ) ; if ( resolved != null ) { return resolved ; } Enumeration en = catalogEntries . elements ( ) ; while ( en . hasMoreElements ( ) ) { CatalogEntry e = ( CatalogEntry ) en . nextElement ( ) ; if ( e . getEntryType ( ) == RESOLVER ) { resolved = resolveExternalSystem ( uri , e . getEntryArg ( 0 ) ) ; if ( resolved != null ) { return resolved ; } } else if ( e . getEntryType ( ) == URISUFFIX ) { String suffix = e . getEntryArg ( 0 ) ; String result = e . getEntryArg ( 1 ) ; if ( suffix . length ( ) <= uri . length ( ) && uri . substring ( uri . length ( ) - suffix . length ( ) ) . equals ( suffix ) ) { return result ; } } } return resolveSubordinateCatalogs ( Catalog . URI , null , null , uri ) ; }

Devuelve el URI aplicable.<p /> <p> Si existe una entrada de URI en el catálogo para el URI especificado, devuelva el valor asignado. </ P> <p /> <p> en la clase de resolución (a diferencia del catálogo), si elURI no es encontrado por el algoritmo habitual, se consideran las entradas de Urisuff. </ P> <p /> <p> La comparación de URI es distingue entre mayúsculas y minúsculas. </ P>


public NotesAddQuery privacyComment  ( List < String > value ) { return unsafeParam ( "privacy_comment" , value ) ; }


public void emitWithGravity  ( View emiter , int gravity , int particlesPerSecond , int emitingTime ) { configureEmiter ( emiter , gravity ) ; startEmiting ( particlesPerSecond , emitingTime ) ; }

Comienza a emitir partículas de una vista específica.Si en algún momento el número pasa por encima de la cantidad de partículas disponibles en Crear, no se crearán nuevas partículas


public final Observable < T > read  ( ) { return Observable . defer ( null ) ; }

Lea de caché y lanza si no hay datos disponibles.


public static Map < String , Object > rebuildSolrIndex  ( DispatchContext dctx , Map < String , Object > context ) throws GenericEntityException { HttpSolrClient client = null ; Map < String , Object > result ; GenericDelegator delegator = ( GenericDelegator ) dctx . getDelegator ( ) ; LocalDispatcher dispatcher = dctx . getDispatcher ( ) ; GenericValue userLogin = ( GenericValue ) context . get ( "userLogin" ) ; Locale locale = new Locale ( "de_DE" ) ; Boolean onlyIfDirty = ( Boolean ) context . get ( "onlyIfDirty" ) ; if ( Boolean . TRUE . equals ( onlyIfDirty ) ) { String dataStatusId = SolrUtil . getSolrDataStatusId ( delegator ) ; if ( "SOLR_DATA_OK" . equals ( dataStatusId ) ) { result = ServiceUtil . returnSuccess ( "SOLR data is already marked OK; not rebuilding" ) ; result . put ( "numDocs" , ( int ) 0 ) ; result . put ( "executed" , Boolean . FALSE ) ; return result ; } } Boolean treatConnectErrorNonFatal = ( Boolean ) context . get ( "treatConnectErrorNonFatal" ) ; int numDocs = 0 ; try { if ( UtilValidate . isNotEmpty ( context . get ( "core" ) ) ) client = new HttpSolrClient ( SolrUtil . solrUrl + "/" + context . get ( "core" ) ) ; else client = new HttpSolrClient ( SolrUtil . solrFullUrl ) ; List < Map < String , Object > > solrDocs = FastList . newInstance ( ) ; List < GenericValue > products = delegator . findList ( "Product" , null , null , null , null , true ) ; if ( products != null ) { numDocs = products . size ( ) ; } Debug . logInfo ( "Solr: Clearing solr index and rebuilding with " + numDocs + " found products" , module ) ; Iterator < GenericValue > productIterator = products . iterator ( ) ; while ( productIterator . hasNext ( ) ) { GenericValue product = productIterator . next ( ) ; Map < String , Object > dispatchContext = ProductUtil . getProductContent ( product , dctx , context ) ; solrDocs . add ( dispatchContext ) ; } client . deleteByQuery ( "*:*" ) ; client . commit ( ) ; Map < String , Object > runResult = dispatcher . runSync ( "addListToSolrIndex" , UtilMisc . toMap ( "fieldList" , solrDocs , "userLogin" , userLogin , "locale" , locale , "treatConnectErrorNonFatal" , treatConnectErrorNonFatal ) ) ; String runMsg = ServiceUtil . getErrorMessage ( runResult ) ; if ( UtilValidate . isEmpty ( runMsg ) ) { runMsg = null ; } if ( ServiceUtil . isError ( runResult ) ) { result = ServiceUtil . returnError ( runMsg ) ; } else if ( ServiceUtil . isFailure ( runResult ) ) { result = ServiceUtil . returnFailure ( runMsg ) ; } else { final String statusMsg = "Cleared solr index and reindexed " + numDocs + " documents" ; result = ServiceUtil . returnSuccess ( statusMsg ) ; } } catch ( MalformedURLException e ) { Debug . logError ( e , e . getMessage ( ) , module ) ; result = ServiceUtil . returnError ( e . toString ( ) ) ; } catch ( SolrServerException e ) { if ( e . getCause ( ) != null && e . getCause ( ) instanceof ConnectException ) { final String statusStr = "Failure connecting to solr server to rebuild index; index not updated" ; if ( Boolean . TRUE . equals ( treatConnectErrorNonFatal ) ) { Debug . logWarning ( e , "Solr: " + statusStr , module ) ; result = ServiceUtil . returnFailure ( statusStr ) ; } else { Debug . logError ( e , "Solr: " + statusStr , module ) ; result = ServiceUtil . returnError ( statusStr ) ; } } else { Debug . logError ( e , e . getMessage ( ) , module ) ; result = ServiceUtil . returnError ( e . toString ( ) ) ; } } catch ( IOException e ) { Debug . logError ( e , e . getMessage ( ) , module ) ; result = ServiceUtil . returnError ( e . toString ( ) ) ; } catch ( ServiceAuthException e ) { Debug . logError ( e , e . getMessage ( ) , module ) ; result = ServiceUtil . returnError ( e . toString ( ) ) ; } catch ( ServiceValidationException e ) { Debug . logError ( e , e . getMessage ( ) , module ) ; result = ServiceUtil . returnError ( e . toString ( ) ) ; } catch ( GenericServiceException e ) { Debug . logError ( e , e . getMessage ( ) , module ) ; result = ServiceUtil . returnError ( e . toString ( ) ) ; } catch ( Exception e ) { Debug . logError ( e , e . getMessage ( ) , module ) ; result = ServiceUtil . returnError ( e . toString ( ) ) ; } if ( ServiceUtil . isSuccess ( result ) ) { SolrUtil . setSolrDataStatusId ( delegator , "SOLR_DATA_OK" ) ; } result . put ( "numDocs" , numDocs ) ; result . put ( "executed" , Boolean . TRUE ) ; return result ; }


@ Override public void onUIRefreshPrepare  ( PtrFrameLayout frame ) { }


public Vector3D toSpace  ( Vector < Euclidean2D > vector ) { return toSpace ( ( Point < Euclidean2D > ) vector ) ; }

Transforme un punto sub-espacio en un punto de espacio.


protected void drawGuiContainerForegroundLayer  ( int mouseX , int mouseY ) { this . fontRendererObj . drawString ( this . archive . getDisplayName ( ) . getUnformattedText ( ) , 8 , 6 , 4210752 ) ; this . fontRendererObj . drawString ( this . playerInventory . getDisplayName ( ) . getUnformattedText ( ) , 8 , this . ySize - 96 + 2 , 4210752 ) ; }

Dibuja la capa de primer plano para el Guicontainer (todo delante de los artículos)


public final int yylength  ( ) { return zzMarkedPos - zzStartRead ; }

Devuelve la longitud de la región de texto correspondiente.


protected void fireEvent  ( HashSet < RegistryEntry > entries , Object event ) { if ( entries != null ) { for ( RegistryEntry registryEntry : entries ) { try { if ( registryEntry . method . getParameterTypes ( ) . length == 0 ) { registryEntry . method . invoke ( registryEntry . object ) ; } else { registryEntry . method . invoke ( registryEntry . object , event ) ; } } catch ( InvocationTargetException e ) { logger . error ( "Target invocation method threw an exception. Bean: " + registryEntry . object + ", Method: " + registryEntry . method , e ) ; } catch ( Exception e ) { logger . error ( "Failed to invoke target invocation method. Bean: " + registryEntry . object + ", Method: " + registryEntry . method , e ) ; } } } }

Invoca los métodos de los frijoles registrados que los pasan el evento de cambio de modo espacial.


public HashDataCache ( DataCache < Pair < String , T > > cache ) { this ( cache , "SHA-512" ) ; }

Crea el hash de caché con algoritmo SHA-512 predeterminado.


public static SM_SYSTEM_MESSAGE STR_SKILL_SUCC_BoostSkillToggleCost_A_TO_ME  ( String skillcaster , String skillname ) { return new SM_SYSTEM_MESSAGE ( 1200640 , skillcaster , skillname ) ; }

Su habilidad Mantra MP El consumo ha cambiado porque [% Skillcaster] usó [% de habilidad].


public InverseHilbertMatrix ( final int n ) { this . n = n ; }


@ Nullable E tryReceive  ( ) { int start = startIndex ( ) ; E e = scanAndMatch ( start ) ; return ( e == null ) ? awaitMatch ( start ) : e ; }

Intenta recibir un elemento de un proveedor de espera.


@ SuppressWarnings ( "resource" ) public boolean connectServer  ( ServerInfo server ) { Socket sock ; if ( server . sock != null ) { return true ; } try { sock = new Socket ( ) ; sock . setReuseAddress ( true ) ; sock . setSoTimeout ( ClientGlobal . g_network_timeout ) ; sock . connect ( server . address , ClientGlobal . g_network_timeout ) ; server . sock = sock ; return true ; } catch ( IOException ex ) { System . err . println ( "connect to server " + server . address . getAddress ( ) . getHostAddress ( ) + ":" + server . address . getPort ( ) + " fail, error info: " + ex . getMessage ( ) ) ; return false ; } }


public static List < String > delete  ( long uid ) { List < String > list = new ArrayList < String > ( ) ; W q = W . create ( "uid" , uid ) ; int s = 0 ; Beans < AuthToken > bs = load ( q , s , 10 ) ; while ( bs != null && bs . getList ( ) != null && bs . getList ( ) . size ( ) > 0 ) { for ( AuthToken t : bs . getList ( ) ) { String sid = t . getSid ( ) ; list . add ( sid ) ; } s += bs . getList ( ) . size ( ) ; bs = load ( q , s , 10 ) ; } Helper . delete ( W . create ( "uid" , uid ) , AuthToken . class ) ; return list ; }

Retire toda la sesión y token para el UID, y devuelva toda la ID de sesión para el usuario.


private void prepareNextSentence  ( ) { if ( nextSentence != null ) { return ; } if ( i >= len ) { return ; } while ( i < len && ! isSentenceStart ( i ) ) { i ++ ; } if ( i >= len ) { return ; } int iSentenceStart = i ; while ( i < len && ! isSentenceEnd ( i ) ) { i ++ ; } if ( i >= len ) { return ; } int iSentenceEnd = i ; nextSentence = new Sentence ( features , iSentenceStart , iSentenceEnd ) ; }

Encuentre la siguiente oración en el archivo de características, si es posible.


public Vec2d scale  ( double scalar ) { this . x *= scalar ; this . y *= scalar ; return this ; }

Escala los valores de este vector por una constante.


public DerivativeStructure ( final int parameters , final int order , final double value ) throws MathIllegalArgumentException { this ( parameters , order ) ; this . data [ 0 ] = value ; }

Construir una instancia que representa un valor constante.


@ Autowired public EquipmentSenderInvalid ( final EquipmentSenderFilterModule equipmentSenderFilterModule , final IProcessMessageSender processMessageSender , final EquipmentTimeDeadband equipmentTimeDeadband , final IDynamicTimeDeadbandFilterer dynamicTimeDeadbandFilterer , final EquipmentLoggerFactory equipmentLoggerFactory ) { this . equipmentSenderFilterModule = equipmentSenderFilterModule ; this . processMessageSender = processMessageSender ; this . equipmentTimeDeadband = equipmentTimeDeadband ; this . dynamicTimeDeadbandFilterer = dynamicTimeDeadbandFilterer ; this . equipmentLogger = equipmentLoggerFactory . getEquipmentLogger ( getClass ( ) ) ; this . dataTagValueFilter = new DataTagValueFilter ( equipmentLoggerFactory ) ; }


public static BigInteger pow  ( final BigInteger k , long e ) throws MathIllegalArgumentException  { if ( e < 0 ) { throw new MathIllegalArgumentException ( LocalizedCoreFormats . EXPONENT , e ) ; } BigInteger result = BigInteger . ONE ; BigInteger k2p = k ; while ( e != 0 ) { if ( ( e & 0x1 ) != 0 ) { result = result . multiply ( k2p ) ; } k2p = k2p . multiply ( k2p ) ; e >>= 1 ; } return result ; }


public static void o  ( int k , int w ) { System . out . print ( "\n" ) ; String num = Integer . toString ( k ) ; while ( num . length ( ) < w ) num = " " + num ; System . out . print ( num ) ; System . out . print ( "\n" ) ; }


public static void loadTestbed  ( ) { if ( ! checkIfTestbedLoaded ( ) ) { if ( logger . isLoggable ( Level . INFO ) ) logger . info ( "loading data" ) ; CatalogMgr md = VanillaDb . catalogMgr ( ) ; StatMgr stat = VanillaDb . statMgr ( ) ; Transaction tx = VanillaDb . txMgr ( ) . newTransaction ( Connection . TRANSACTION_SERIALIZABLE , false ) ; Schema sch = new Schema ( ) ; sch . addField ( "cid" , INTEGER ) ; sch . addField ( "title" , VARCHAR ( 20 ) ) ; sch . addField ( "deptid" , INTEGER ) ; md . createTable ( "course" , sch , tx ) ; TableInfo ti = md . getTableInfo ( "course" , tx ) ; RecordFile rf = ti . open ( tx , true ) ; rf . beforeFirst ( ) ; while ( rf . next ( ) ) rf . delete ( ) ; rf . close ( ) ; rf = ti . open ( tx , true ) ; for ( int id = 0 ; id < courseMax ; id ++ ) { rf . insert ( ) ; IntegerConstant cid = new IntegerConstant ( id ) ; rf . setVal ( "cid" , cid ) ; rf . setVal ( "title" , new VarcharConstant ( "course" + id ) ) ; rf . setVal ( "deptid" , new IntegerConstant ( id % deptMax ) ) ; } rf . close ( ) ; stat . getTableStatInfo ( ti , tx ) ; sch = new Schema ( ) ; sch . addField ( "sid" , INTEGER ) ; sch . addField ( "sname" , VARCHAR ( 10 ) ) ; sch . addField ( "majorid" , INTEGER ) ; sch . addField ( "gradyear" , INTEGER ) ; md . createTable ( "student" , sch , tx ) ; ti = md . getTableInfo ( "student" , tx ) ; rf = ti . open ( tx , true ) ; rf . beforeFirst ( ) ; while ( rf . next ( ) ) rf . delete ( ) ; rf . close ( ) ; rf = ti . open ( tx , true ) ; for ( int id = 0 ; id < studentMax ; id ++ ) { rf . insert ( ) ; IntegerConstant sid = new IntegerConstant ( id ) ; rf . setVal ( "sid" , sid ) ; rf . setVal ( "sname" , new VarcharConstant ( "student" + id ) ) ; rf . setVal ( "majorid" , new IntegerConstant ( id % deptMax ) ) ; rf . setVal ( "gradyear" , new IntegerConstant ( ( id % 50 ) + 1960 ) ) ; } rf . close ( ) ; stat . getTableStatInfo ( ti , tx ) ; sch = new Schema ( ) ; sch . addField ( "did" , INTEGER ) ; sch . addField ( "dname" , VARCHAR ( 8 ) ) ; md . createTable ( "dept" , sch , tx ) ; ti = md . getTableInfo ( "dept" , tx ) ; rf = ti . open ( tx , true ) ; rf . beforeFirst ( ) ; while ( rf . next ( ) ) rf . delete ( ) ; rf . close ( ) ; rf = ti . open ( tx , true ) ; for ( int id = 0 ; id < deptMax ; id ++ ) { rf . insert ( ) ; IntegerConstant did = new IntegerConstant ( id ) ; rf . setVal ( "did" , did ) ; rf . setVal ( "dname" , new VarcharConstant ( "dept" + id ) ) ; } rf . close ( ) ; stat . getTableStatInfo ( ti , tx ) ; sch = new Schema ( ) ; sch . addField ( "sectid" , INTEGER ) ; sch . addField ( "prof" , VARCHAR ( 8 ) ) ; sch . addField ( "courseid" , INTEGER ) ; sch . addField ( "yearoffered" , INTEGER ) ; md . createTable ( "section" , sch , tx ) ; ti = md . getTableInfo ( "section" , tx ) ; rf = ti . open ( tx , true ) ; rf . beforeFirst ( ) ; while ( rf . next ( ) ) rf . delete ( ) ; rf . close ( ) ; rf = ti . open ( tx , true ) ; for ( int id = 0 ; id < sectMax ; id ++ ) { rf . insert ( ) ; IntegerConstant sectid = new IntegerConstant ( id ) ; rf . setVal ( "sectid" , sectid ) ; int profnum = id % 20 ; rf . setVal ( "prof" , new VarcharConstant ( "prof" + profnum ) ) ; rf . setVal ( "courseid" , new IntegerConstant ( id % courseMax ) ) ; rf . setVal ( "yearoffered" , new IntegerConstant ( ( id % 50 ) + 1960 ) ) ; } rf . close ( ) ; stat . getTableStatInfo ( ti , tx ) ; sch = new Schema ( ) ; sch . addField ( "eid" , INTEGER ) ; sch . addField ( "grade" , VARCHAR ( 2 ) ) ; sch . addField ( "studentid" , INTEGER ) ; sch . addField ( "sectionid" , INTEGER ) ; md . createTable ( "enroll" , sch , tx ) ; ti = md . getTableInfo ( "enroll" , tx ) ; rf = ti . open ( tx , true ) ; rf . beforeFirst ( ) ; while ( rf . next ( ) ) rf . delete ( ) ; rf . close ( ) ; rf = ti . open ( tx , true ) ; String [ ] grades = new String [ ] { "A" , "B" , "C" , "D" , "F" } ; for ( int id = 0 ; id < enrollMax ; id ++ ) { rf . insert ( ) ; IntegerConstant eid = new IntegerConstant ( id ) ; rf . setVal ( "eid" , eid ) ; rf . setVal ( "grade" , new VarcharConstant ( grades [ id % 5 ] ) ) ; rf . setVal ( "studentid" , new IntegerConstant ( id % studentMax ) ) ; rf . setVal ( "sectionid" , new IntegerConstant ( id % sectMax ) ) ; } rf . close ( ) ; stat . getTableStatInfo ( ti , tx ) ; tx . commit ( ) ; tx = VanillaDb . txMgr ( ) . newTransaction ( Connection . TRANSACTION_SERIALIZABLE , false ) ; RecoveryMgr . recover ( tx ) ; tx . commit ( ) ; setFlagAsLoaded ( ) ; } }

Configure una base de datos para la prueba.


public static void v  ( String tag , String msg ) { if ( sLevel > LEVEL_VERBOSE ) { return ; } Log . v ( tag , msg ) ; }


public LoggingContext ( RequestLog logCtx ) { this . logCtx = logCtx ; }

Construye un contenedor para solicitarlog.


ConfigurationError ( String msg , Exception x )  { super ( msg ) ; this . exception = x ; }

Construya una nueva instancia con la cadena de detalles especificada y la excepción.


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


public String resolveDocument  ( ) throws IOException  { catalogManager . debug . message ( 3 , "resolveDocument" ) ; Enumeration en = catalogEntries . elements ( ) ; while ( en . hasMoreElements ( ) ) { CatalogEntry e = ( CatalogEntry ) en . nextElement ( ) ; if ( e . getEntryType ( ) == DOCUMENT ) { return e . getEntryArg ( 0 ) ; } } return resolveSubordinateCatalogs ( DOCUMENT , null , null , null ) ; }

Devuelva la entrada de documento aplicable.


public synchronized void load  ( JSONObject o ) throws IOException { try { JSONObject fieldsState = ( JSONObject ) o . get ( "fields" ) ; JSONObject top = new JSONObject ( ) ; top . put ( "fields" , fieldsState ) ; Request r = new Request ( null , null , top , RegisterFieldHandler . TYPE ) ; FinishRequest fr = ( ( RegisterFieldHandler ) globalState . getHandler ( "registerFields" ) ) . handle ( this , r , null ) ; assert ! Request . anythingLeft ( top ) : top ; fr . finish ( ) ; JSONObject settingsState = ( JSONObject ) o . get ( "settings" ) ; r = new Request ( null , null , settingsState , SettingsHandler . TYPE ) ; fr = ( ( SettingsHandler ) globalState . getHandler ( "settings" ) ) . handle ( this , r , null ) ; fr . finish ( ) ; assert ! Request . anythingLeft ( settingsState ) : settingsState . toString ( ) ; JSONObject liveSettingsState = ( JSONObject ) o . get ( "settings" ) ; r = new Request ( null , null , liveSettingsState , LiveSettingsHandler . TYPE ) ; fr = ( ( LiveSettingsHandler ) globalState . getHandler ( "liveSettings" ) ) . handle ( this , r , null ) ; fr . finish ( ) ; assert ! Request . anythingLeft ( liveSettingsState ) : liveSettingsState . toString ( ) ; suggesterSettings = ( JSONObject ) o . get ( "suggest" ) ; } catch ( Exception e ) { throw new IOException ( e ) ; } }

Cargue todo el estado previamente guardado.


public static HouseObject < ? > createNew  ( House house , int objectId , int objectTemplateId ) { PlaceableHouseObject template = DataManager . HOUSING_OBJECT_DATA . getTemplateById ( objectTemplateId ) ; if ( template instanceof HousingChair ) { return new ChairObject ( house , objectId , template . getTemplateId ( ) ) ; } else if ( template instanceof HousingJukeBox ) { return new JukeBoxObject ( house , objectId , template . getTemplateId ( ) ) ; } else if ( template instanceof HousingMoveableItem ) { return new MoveableObject ( house , objectId , template . getTemplateId ( ) ) ; } else if ( template instanceof HousingNpc ) { return new NpcObject ( house , objectId , template . getTemplateId ( ) ) ; } else if ( template instanceof HousingPicture ) { return new PictureObject ( house , objectId , template . getTemplateId ( ) ) ; } else if ( template instanceof HousingPostbox ) { return new PostboxObject ( house , objectId , template . getTemplateId ( ) ) ; } else if ( template instanceof HousingStorage ) { return new StorageObject ( house , objectId , template . getTemplateId ( ) ) ; } else if ( template instanceof HousingUseableItem ) { return new UseableItemObject ( house , objectId , template . getTemplateId ( ) ) ; } else if ( template instanceof HousingEmblem ) { return new EmblemObject ( house , objectId , template . getTemplateId ( ) ) ; } return new PassiveObject ( house , objectId , template . getTemplateId ( ) ) ; }


public JsonElement parse  ( String json ) throws JsonSyntaxException  { return parse ( new StringReader ( json ) ) ; }

Analiza la cadena JSON especificada en un árbol de parse


@ ObjectiveCName ( "add:action:name:timeout:" ) void add  ( Topic topic , Actions action , String name , int timeout ) { this . add ( topic , action , name , Event . ACK_TIMEOUT , this , timeout ) ; }

Cheques para ver si un temporizador de ACK ya existe en el Registro para el nombre y la acción dados.Si lo hace, lo acecha, luego comienza uno nuevo.


public static SM_SYSTEM_MESSAGE STR_SKILL_CANT_CAST  ( String value0 ) { return new SM_SYSTEM_MESSAGE ( 1300026 , value0 ) ; }

No puedes hacer eso mientras estás en% 0.


public GroupsGetQueryWithExtended count  ( Integer value ) { return unsafeParam ( "count" , value ) ; }


public void addDatatransferProgressListener  ( OnDatatransferProgressListener listener , OCUpload ocUpload ) { if ( ocUpload == null || listener == null ) return ; String targetKey = buildRemoteName ( ocUpload . getAccountName ( ) , ocUpload . getRemotePath ( ) ) ; mBoundListeners . put ( targetKey , listener ) ; }

Agrega a un oyente interesado en el progreso de la carga para un archivo de concreto.


public void requestRemoveFailedNode  ( int nodeId ) { enqueue ( new RemoveFailedNodeMessageClass ( ) . doRequest ( nodeId ) ) ; }

Elimina un nodo fallido de la red.Tenga en cuenta que esto no eliminará los nodos que no han fallado.


public LogRecord ( long txid , byte [ ] payload ) { this . txid = txid ; this . payload = payload ; this . metadata = 0 ; }

Construya un registro de registro con <i> TRANSACHIDED </ I> y la carga útil.<p> generalmente el escritor construiría el registro de registro para escribir.


public void loadData  ( ProgressListener progressListener ) throws CanceledException , IOException { className = "Total sample" ; int totalReads = 0 ; int totalReadsUsed = 0 ; reference2ReadMatchPairs . clear ( ) ; Set < String > matchesSeenForGivenRead = new HashSet < > ( ) ; progressListener . setSubtask ( "Processing total dataset" ) ; try ( IReadBlockIterator it = doc . getMeganFile ( ) . getDataConnector ( ) . getAllReadsIterator ( doc . getMinScore ( ) , doc . getMaxExpected ( ) , true , true ) ) { progressListener . setMaximum ( it . getMaximumProgress ( ) ) ; progressListener . setProgress ( 0 ) ; while ( it . hasNext ( ) ) { IReadBlock readBlock = it . next ( ) ; totalReads ++ ; boolean readUsed = false ; for ( IMatchBlock matchBlock : readBlock . getMatchBlocks ( ) ) { if ( matchBlock . getBitScore ( ) >= doc . getMinScore ( ) && matchBlock . getExpected ( ) <= doc . getMaxExpected ( ) && matchBlock . getPercentIdentity ( ) >= doc . getMinPercentIdentity ( ) ) { String key = Basic . getFirstLine ( matchBlock . getText ( ) ) ; if ( ! matchesSeenForGivenRead . contains ( key ) ) { matchesSeenForGivenRead . add ( key ) ; List < Pair < IReadBlock , IMatchBlock > > pairs = reference2ReadMatchPairs . get ( key ) ; if ( pairs == null ) { pairs = new LinkedList < > ( ) ; reference2ReadMatchPairs . put ( key , pairs ) ; } pairs . add ( new Pair < > ( readBlock , matchBlock ) ) ; readUsed = true ; } } } matchesSeenForGivenRead . clear ( ) ; progressListener . incrementProgress ( ) ; if ( readUsed ) totalReadsUsed ++ ; } } System . err . println ( "Reads total: " + totalReads ) ; System . err . println ( "Reads used:  " + totalReadsUsed ) ; System . err . println ( "References:  " + reference2ReadMatchPairs . keySet ( ) . size ( ) ) ; }

Cargar datos para el conjunto de datos completo


public static char [ ] encode  ( byte [ ] in , int iOff , int iLen ) { int oDataLen = ( iLen * 4 + 2 ) / 3 ; int oLen = ( ( iLen + 2 ) / 3 ) * 4 ; char [ ] out = new char [ oLen ] ; int ip = iOff ; int iEnd = iOff + iLen ; int op = 0 ; while ( ip < iEnd ) { int i0 = in [ ip ++ ] & 0xff ; int i1 = ip < iEnd ? in [ ip ++ ] & 0xff : 0 ; int i2 = ip < iEnd ? in [ ip ++ ] & 0xff : 0 ; int o0 = i0 >>> 2 ; int o1 = ( ( i0 & 3 ) << 4 ) | ( i1 >>> 4 ) ; int o2 = ( ( i1 & 0xf ) << 2 ) | ( i2 >>> 6 ) ; int o3 = i2 & 0x3F ; out [ op ++ ] = map1 [ o0 ] ; out [ op ++ ] = map1 [ o1 ] ; out [ op ] = op < oDataLen ? map1 [ o2 ] : '=' ; op ++ ; out [ op ] = op < oDataLen ? map1 [ o3 ] : '=' ; op ++ ; } return out ; }

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


public boolean isExtended  ( ) { return extended ; }

Comprueba si la poción está en un estado extendido.Esto se refiere a las pociones de duración extendida.


private void degreesAndPersist  ( String resourceType ) { if ( ! Sets . intersection ( subtypes , CommonOLAP . analyticsElements ) . isEmpty ( ) ) { throw new IllegalStateException ( ErrorMessage . ILLEGAL_ARGUMENT_EXCEPTION . getMessage ( this . getClass ( ) . toString ( ) ) ) ; } MindmapsComputer computer = Mindmaps . factory ( Mindmaps . DEFAULT_URI , keySpace ) . getGraphComputer ( ) ; computer . compute ( new DegreeAndPersistVertexProgram ( keySpace , subtypes ) ) ; }

Calcule el número de relaciones que cada instancia participa y persiste esta información en el gráfico.El grado se almacena como un recurso adjunto a la instancia relevante.


protected void gameLoop  ( ) { Graphics2D g = ( Graphics2D ) this . canvas . getBufferStrategy ( ) . getDrawGraphics ( ) ; AffineTransform yFlip = AffineTransform . getScaleInstance ( 1 , - 1 ) ; AffineTransform move = AffineTransform . getTranslateInstance ( 400 , - 300 ) ; g . transform ( yFlip ) ; g . transform ( move ) ; this . render ( g ) ; g . dispose ( ) ; BufferStrategy strategy = this . canvas . getBufferStrategy ( ) ; if ( ! strategy . contentsLost ( ) ) { strategy . show ( ) ; } Toolkit . getDefaultToolkit ( ) . sync ( ) ; long time = System . nanoTime ( ) ; long diff = time - this . last ; this . last = time ; double elapsedTime = diff / NANO_TO_BASE ; this . world . update ( elapsedTime ) ; }

El método que llama a los métodos necesarios para actualizar el juego, los gráficos y la encuesta para la entrada.


@ Override public void endGeneralEntity  ( String name , Augmentations augs ) throws XNIException { if ( DEBUG_EVENTS ) { System . out . println ( "==>endGeneralEntity: (" + name + ")" ) ; } if ( ! fDeferNodeExpansion ) { if ( fFilterReject ) { return ; } setCharacterData ( true ) ; if ( fDocumentType != null ) { NamedNodeMap entities = fDocumentType . getEntities ( ) ; fCurrentEntityDecl = ( EntityImpl ) entities . getNamedItem ( name ) ; if ( fCurrentEntityDecl != null ) { if ( fCurrentEntityDecl != null && fCurrentEntityDecl . getFirstChild ( ) == null ) { fCurrentEntityDecl . setReadOnly ( false , true ) ; Node child = fCurrentNode . getFirstChild ( ) ; while ( child != null ) { Node copy = child . cloneNode ( true ) ; fCurrentEntityDecl . appendChild ( copy ) ; child = child . getNextSibling ( ) ; } fCurrentEntityDecl . setReadOnly ( true , true ) ; } fCurrentEntityDecl = null ; } } fInEntityRef = false ; boolean removeEntityRef = false ; if ( fCreateEntityRefNodes ) { if ( fDocumentImpl != null ) { ( ( NodeImpl ) fCurrentNode ) . setReadOnly ( true , true ) ; } if ( fDOMFilter != null && ( fDOMFilter . getWhatToShow ( ) & NodeFilter . SHOW_ENTITY_REFERENCE ) != 0 ) { short code = fDOMFilter . acceptNode ( fCurrentNode ) ; switch ( code ) { case LSParserFilter . FILTER_INTERRUPT : { throw Abort . INSTANCE ; } case LSParserFilter . FILTER_REJECT : { Node parent = fCurrentNode . getParentNode ( ) ; parent . removeChild ( fCurrentNode ) ; fCurrentNode = parent ; return ; } case LSParserFilter . FILTER_SKIP : { fFirstChunk = true ; removeEntityRef = true ; break ; } default : { fCurrentNode = fCurrentNode . getParentNode ( ) ; } } } else { fCurrentNode = fCurrentNode . getParentNode ( ) ; } } if ( ! fCreateEntityRefNodes || removeEntityRef ) { NodeList children = fCurrentNode . getChildNodes ( ) ; Node parent = fCurrentNode . getParentNode ( ) ; int length = children . getLength ( ) ; if ( length > 0 ) { Node node = fCurrentNode . getPreviousSibling ( ) ; Node child = children . item ( 0 ) ; if ( node != null && node . getNodeType ( ) == Node . TEXT_NODE && child . getNodeType ( ) == Node . TEXT_NODE ) { ( ( Text ) node ) . appendData ( child . getNodeValue ( ) ) ; fCurrentNode . removeChild ( child ) ; } else { node = parent . insertBefore ( child , fCurrentNode ) ; handleBaseURI ( node ) ; } for ( int i = 1 ; i < length ; i ++ ) { node = parent . insertBefore ( children . item ( 0 ) , fCurrentNode ) ; handleBaseURI ( node ) ; } } parent . removeChild ( fCurrentNode ) ; fCurrentNode = parent ; } } else { if ( fDocumentTypeIndex != - 1 ) { int node = fDeferredDocumentImpl . getLastChild ( fDocumentTypeIndex , false ) ; while ( node != - 1 ) { short nodeType = fDeferredDocumentImpl . getNodeType ( node , false ) ; if ( nodeType == Node . ENTITY_NODE ) { String nodeName = fDeferredDocumentImpl . getNodeName ( node , false ) ; if ( nodeName . equals ( name ) ) { fDeferredEntityDecl = node ; break ; } } node = fDeferredDocumentImpl . getRealPrevSibling ( node , false ) ; } } if ( fDeferredEntityDecl != - 1 && fDeferredDocumentImpl . getLastChild ( fDeferredEntityDecl , false ) == - 1 ) { int prevIndex = - 1 ; int childIndex = fDeferredDocumentImpl . getLastChild ( fCurrentNodeIndex , false ) ; while ( childIndex != - 1 ) { int cloneIndex = fDeferredDocumentImpl . cloneNode ( childIndex , true ) ; fDeferredDocumentImpl . insertBefore ( fDeferredEntityDecl , cloneIndex , prevIndex ) ; prevIndex = cloneIndex ; childIndex = fDeferredDocumentImpl . getRealPrevSibling ( childIndex , false ) ; } } if ( fCreateEntityRefNodes ) { fCurrentNodeIndex = fDeferredDocumentImpl . getParentNode ( fCurrentNodeIndex , false ) ; } else { int childIndex = fDeferredDocumentImpl . getLastChild ( fCurrentNodeIndex , false ) ; int parentIndex = fDeferredDocumentImpl . getParentNode ( fCurrentNodeIndex , false ) ; int prevIndex = fCurrentNodeIndex ; int lastChild = childIndex ; int sibling = - 1 ; while ( childIndex != - 1 ) { handleBaseURI ( childIndex ) ; sibling = fDeferredDocumentImpl . getRealPrevSibling ( childIndex , false ) ; fDeferredDocumentImpl . insertBefore ( parentIndex , childIndex , prevIndex ) ; prevIndex = childIndex ; childIndex = sibling ; } if ( lastChild != - 1 ) fDeferredDocumentImpl . setAsLastChild ( parentIndex , lastChild ) ; else { sibling = fDeferredDocumentImpl . getRealPrevSibling ( prevIndex , false ) ; fDeferredDocumentImpl . setAsLastChild ( parentIndex , sibling ) ; } fCurrentNodeIndex = parentIndex ; } fDeferredEntityDecl = - 1 ; } }

Este método notifica al final de una entidad general.<p /> <strong> Nota: </ strong> Este método no se le llama a las referencias de la entidad que aparecen como parte de los valores de atributos.


@ Override public void commit  ( ) throws MindmapsValidationException  { validateGraph ( ) ; Map < Schema . BaseType , Set < String > > modifiedConcepts = new HashMap < > ( ) ; Set < String > castings = getModifiedCastingIds ( ) ; Set < String > resources = getModifiedResourceIds ( ) ; if ( castings . size ( ) > 0 ) modifiedConcepts . put ( Schema . BaseType . CASTING , castings ) ; if ( resources . size ( ) > 0 ) modifiedConcepts . put ( Schema . BaseType . RESOURCE , resources ) ; LOG . debug ( "Graph is valid. Committing graph . . . " ) ; commitTx ( ) ; LOG . debug ( "Graph committed." ) ; getConceptLog ( ) . clearTransaction ( ) ; if ( modifiedConcepts . size ( ) > 0 ) submitCommitLogs ( modifiedConcepts ) ; }


public synchronized void animateZoom  ( final Point2D p , double scale , long duration ) { Point2D pp = new Point2D . Double ( ) ; m_itransform . transform ( p , pp ) ; animateZoomAbs ( pp , scale , duration ) ; }

Animar un zoom centrado en una ubicación dada en la pantalla (Pixel) coordenada por la escala dada utilizando la duración proporcionada.


public byte [ ] generateMwk  ( ) { KeyGenerator keyGen = null ; try { keyGen = KeyGenerator . getInstance ( "DES" ) ; } catch ( NoSuchAlgorithmException e ) { Debug . logError ( e , module ) ; } SecretKey des1 = keyGen . generateKey ( ) ; SecretKey des2 = keyGen . generateKey ( ) ; if ( des1 != null && des2 != null ) { byte [ ] desByte1 = des1 . getEncoded ( ) ; byte [ ] desByte2 = des2 . getEncoded ( ) ; byte [ ] desByte3 = des1 . getEncoded ( ) ; try { if ( DESKeySpec . isWeak ( des1 . getEncoded ( ) , 0 ) || DESKeySpec . isWeak ( des2 . getEncoded ( ) , 0 ) ) { return generateMwk ( ) ; } } catch ( Exception e ) { Debug . logError ( e , module ) ; } byte [ ] des3 = copyBytes ( desByte1 , copyBytes ( desByte2 , desByte3 , 0 ) , 0 ) ; return generateMwk ( des3 ) ; } else { Debug . logInfo ( "Null DES keys returned" , module ) ; } return null ; }


public boolean canFindAll  ( ) { return true ; }


public UpdateLeaseSpaceOperationRequest ( ) { }


private Map < String , ArrayList < Integer > > beforeChange  ( ) { if ( this . listChangedListeners . isEmpty ( ) ) { return null ; } return this . getStructure ( ) ; }

Establece la estructura actual de la lista, siempre que el cliente haya adjuntado cualquier oyente Agregar / Mover / Eliminar, se llamará antes de cualquier cambio en la lista, desequilibrado si el cambio se activó por un mensaje entrante del servidor o por el cliente.


@ Override public void beforeFirst  ( ) { ss1 . beforeFirst ( ) ; ss2 . beforeFirst ( ) ; }

Posiciona la exploración antes del primer registro, posicionando cada escaneo subyacente antes de sus primeros registros.


public static void main  ( String [ ] args ) { try { UIManager . setLookAndFeel ( UIManager . getSystemLookAndFeelClassName ( ) ) ; } catch ( ClassNotFoundException e ) { e . printStackTrace ( ) ; } catch ( InstantiationException e ) { e . printStackTrace ( ) ; } catch ( IllegalAccessException e ) { e . printStackTrace ( ) ; } catch ( UnsupportedLookAndFeelException e ) { e . printStackTrace ( ) ; } ExampleGraphics2D window = new ExampleGraphics2D ( ) ; window . setVisible ( true ) ; window . start ( ) ; }

Punto de entrada para la aplicación de ejemplo.


private void handleAlreadyClosedException  ( AlreadyClosedException ace ) { unexpectedExceptions . inc ( ) ; logger . error ( "Encountered unexpected exception when writing data into stream {} : " , name , ace ) ; fatalErrorHandler . notifyFatalError ( ) ; }


public boolean findHighestTile  ( int x ) { for ( int y = CHUNK_SIZE - 1 ; y >= highestBlocks [ x ] ; y -- ) { if ( blocks [ x ] [ y ] != null && blocks [ x ] [ y ] != BlockType . AIR ) { highestBlocks [ x ] = MathUtils . clamp ( y + 1 , 0 , Chunk . CHUNK_SIZE - 1 ) ; return true ; } } return false ; }

Encuentra la teja más alta en una columna específica.


public ScaleImageTransform ( Random random , float dx , float dy ) { super ( random ) ; this . dx = dx ; this . dy = dy ; converter = new OpenCVFrameConverter . ToMat ( ) ; }

Construye una instancia de ImageTransform.


public List < T > nearest  ( final double [ ] key , int n , final Checker < T > checker ) throws KeySizeException , IllegalArgumentException { if ( n <= 0 ) { return new LinkedList < T > ( ) ; } final NearestNeighborList < KDNode < T > > nnl = getnbrs ( key , n , checker ) ; n = nnl . getSize ( ) ; final Stack < T > nbrs = new Stack < T > ( ) ; for ( int i = 0 ; i < n ; ++ i ) { final KDNode < T > kd = nnl . removeHighest ( ) ; nbrs . push ( kd . v ) ; } return nbrs ; }

Encuentre nodos de árboles kd-árboles cuyas llaves son <i> n </ i> vecinos más cercanos para clave.Usa algoritmo arriba.Los vecinos se devuelven en orden ascendente de distancia a la clave.


public ArenaRewardCursor queryArenaRewardItem  ( long id ) { return mHelper . queryArenaRewardItem ( id ) ; }


boolean writeClass  ( DataOutputStream dd ) { try { dd . writeInt ( ( int ) magic ) ; dd . writeShort ( minor_version ) ; dd . writeShort ( major_version ) ; dd . writeShort ( constant_pool_count ) ; if ( ! writeConstantPool ( dd ) ) return false ; dd . writeShort ( access_flags ) ; dd . writeShort ( this_class ) ; dd . writeShort ( super_class ) ; dd . writeShort ( interfaces_count ) ; if ( interfaces_count > 0 ) { int j ; for ( j = 0 ; j < interfaces_count ; j ++ ) dd . writeShort ( interfaces [ j ] ) ; } dd . writeShort ( fields_count ) ; writeFields ( dd ) ; dd . writeShort ( methods_count ) ; writeMethods ( dd ) ; dd . writeShort ( attributes_count ) ; if ( attributes_count > 0 ) { writeAttributes ( dd , attributes_count , attributes ) ; } } catch ( IOException e ) { G . v ( ) . out . println ( "IOException with " + fn + ": " + e . getMessage ( ) ) ; return false ; } return true ; }

Escribe todo este objeto ClassFile a la corriente dada.


@ Override public double [ ] nextVector  ( ) { double [ ] random = new double [ mean . length ] ; for ( int i = 0 ; i < random . length ; ++ i ) { random [ i ] = mean [ i ] + standardDeviation [ i ] * generator . nextNormalizedDouble ( ) ; } return random ; }

Generar un vector aleatorio sin correlación.


public static String makeUrlFull  ( HttpServletRequest request , HttpServletResponse response , String url ) { return makeUrl ( request , response , url , true , null , null ) ; }

Scipio: construye un enlace de ruta completa (HTTPS según sea necesario).


public static String uuid  ( ) { return UUID . randomUUID ( ) . toString ( ) ; }


@ Override public boolean isPlaying  ( ) { if ( pmInterface == null ) { if ( ! ConnectPlayMediaService ( ) ) { ServiceBackedMediaPlayer . this . error ( MediaPlayer . MEDIA_ERROR_UNKNOWN , 0 ) ; } } if ( pmInterface != null ) { try { return pmInterface . isPlaying ( ServiceBackedMediaPlayer . this . sessionId ) ; } catch ( RemoteException e ) { e . printStackTrace ( ) ; ServiceBackedMediaPlayer . this . error ( MediaPlayer . MEDIA_ERROR_UNKNOWN , 0 ) ; } } return false ; }

Funciona idénticamente a Android.Media.MediaPlayer.Splaying ()


public void initGui  ( ) { this . buttonList . clear ( ) ; this . buttonList . add ( new GuiButtonEx ( ID_GENERIC_DEFAULTS , this . width / 2 - 155 , this . height - 25 , 150 , 20 , "Reset To Defaults" ) ) ; this . buttonList . add ( new GuiButtonEx ( ID_GENERIC_DONE , this . width / 2 - 155 + 160 , this . height - 25 , 150 , 20 , "Done" ) ) ; VRSettings . VrOptions [ ] buttons = locomotionSettings ; addButtons ( buttons , 0 ) ; GuiSmallButtonEx mode = new GuiSmallButtonEx ( VRSettings . VrOptions . MOVE_MODE . returnEnumOrdinal ( ) , this . width / 2 - 68 , this . height / 6 + 102 , VRSettings . VrOptions . MOVE_MODE , this . guivrSettings . getKeyBinding ( VRSettings . VrOptions . MOVE_MODE ) ) ; mode . setEventHandler ( this ) ; this . buttonList . add ( mode ) ; if ( mc . vrSettings . vrFreeMove ) addButtons ( freeMoveSettings , 134 ) ; else addButtons ( teleportSettings , 134 ) ; }

Agrega los botones (y otros controles) a la pantalla en cuestión.


public void add  ( String key , String value ) { if ( key == null ) { throw new NullPointerException ( "key" ) ; } if ( value == null ) { throw new NullPointerException ( "value" ) ; } synchronized ( contexts ) { contexts . add ( Maps . immutableEntry ( key , value ) ) ; } }

Agrega un nuevo par de valor de clave al conjunto


@ Override public void onAttach  ( Context context ) { super . onAttach ( context ) ; if ( mTask != null ) { if ( context instanceof ReceiveExternalFilesActivity ) { mTask . setListener ( ( CopyAndUploadContentUrisTask . OnCopyTmpFilesTaskListener ) context ) ; } else { mTask . setListener ( null ) ; } } }

Actualiza al oyente de la tarea retenida cada vez que se adjunta la actividad principal.Dado que se realiza en el hilo principal, y siempre que la SInctSk solo acceda al oyente en el hilo principal (debe), no debe ocurrir un problema de sincronización.


public Builder weight  ( Number weight ) { this . weight = weight ; return this ; }

Ancho del accidente cerebrovascular en píxeles.</BR> Predeterminado 5


public void zoom  ( float factorX , float factorY , Point center ) { if ( getChartDrawer ( ) . isXYLocked ( ) ) { if ( factorX == 1 ) factorX = factorY ; else if ( factorY == 1 ) factorY = factorX ; } if ( getChartDrawer ( ) . getScrollBackReferenceRect ( ) != null ) { if ( center == null ) center = new Point ( ( int ) contentPanel . getBounds ( ) . getCenterX ( ) , ( int ) contentPanel . getBounds ( ) . getCenterY ( ) ) ; getChartDrawer ( ) . setScrollBackWindowPoint ( center ) ; getChartDrawer ( ) . setScrollBackReferencePoint ( getChartDrawer ( ) . convertWindowToReference ( center ) ) ; } Dimension size = contentPanel . getSize ( ) ; int newWidth = Math . max ( 100 , ( Math . round ( factorX * size . width ) ) ) ; int newHeight = Math . max ( 100 , ( Math . round ( factorY * size . height ) ) ) ; size = new Dimension ( newWidth , newHeight ) ; contentPanel . setSize ( size ) ; contentPanel . setPreferredSize ( size ) ; contentPanel . validate ( ) ; updateScrollPane ( ) ; }

Acercar o alejar (hacer panel más grande o más pequeño)


@ Override public boolean hasFixedPropertiesArray  ( ) { return false ; }

Verdadero si el paquete de entrada tiene una matriz de propiedades fijas.


public static String timeStampToString  ( Timestamp stamp , TimeZone tz , Locale locale ) { return timeStampToString ( stamp , null , tz , locale ) ; }

Timestamp localizada a la conversión de cadenas.Para ser utilizado en tándem con StringTotimestamp ().


@ Deployment ( resources = { "org/activiti/engine/test/api/runtime/oneTaskProcess.bpmn20.xml" } ) public void testProcessInstanceEvents  ( ) throws Exception  { ProcessInstance processInstance = runtimeService . startProcessInstanceByKey ( "oneTaskProcess" ) ; assertNotNull ( processInstance ) ; assertEquals ( 6 , listener . getEventsReceived ( ) . size ( ) ) ; assertTrue ( listener . getEventsReceived ( ) . get ( 0 ) instanceof ActivitiEntityEvent ) ; ActivitiEntityEvent event = ( ActivitiEntityEvent ) listener . getEventsReceived ( ) . get ( 0 ) ; assertEquals ( ActivitiEventType . ENTITY_CREATED , event . getType ( ) ) ; assertEquals ( processInstance . getId ( ) , ( ( ProcessInstance ) event . getEntity ( ) ) . getId ( ) ) ; assertEquals ( processInstance . getId ( ) , event . getProcessInstanceId ( ) ) ; assertEquals ( processInstance . getId ( ) , event . getExecutionId ( ) ) ; assertEquals ( processInstance . getProcessDefinitionId ( ) , event . getProcessDefinitionId ( ) ) ; event = ( ActivitiEntityEvent ) listener . getEventsReceived ( ) . get ( 1 ) ; assertEquals ( ActivitiEventType . PROCESS_CREATED , event . getType ( ) ) ; assertEquals ( processInstance . getId ( ) , event . getProcessInstanceId ( ) ) ; assertEquals ( processInstance . getId ( ) , event . getExecutionId ( ) ) ; assertEquals ( processInstance . getProcessDefinitionId ( ) , event . getProcessDefinitionId ( ) ) ; event = ( ActivitiEntityEvent ) listener . getEventsReceived ( ) . get ( 2 ) ; assertEquals ( ActivitiEventType . ENTITY_INITIALIZED , event . getType ( ) ) ; assertEquals ( processInstance . getId ( ) , event . getProcessInstanceId ( ) ) ; assertEquals ( processInstance . getId ( ) , event . getExecutionId ( ) ) ; assertEquals ( processInstance . getProcessDefinitionId ( ) , event . getProcessDefinitionId ( ) ) ; event = ( ActivitiEntityEvent ) listener . getEventsReceived ( ) . get ( 3 ) ; assertEquals ( ActivitiEventType . ENTITY_CREATED , event . getType ( ) ) ; assertEquals ( processInstance . getId ( ) , event . getProcessInstanceId ( ) ) ; assertNotEquals ( processInstance . getId ( ) , event . getExecutionId ( ) ) ; assertEquals ( processInstance . getProcessDefinitionId ( ) , event . getProcessDefinitionId ( ) ) ; event = ( ActivitiEntityEvent ) listener . getEventsReceived ( ) . get ( 4 ) ; assertEquals ( ActivitiEventType . ENTITY_INITIALIZED , event . getType ( ) ) ; assertEquals ( processInstance . getId ( ) , event . getProcessInstanceId ( ) ) ; assertNotEquals ( processInstance . getId ( ) , event . getExecutionId ( ) ) ; assertEquals ( processInstance . getProcessDefinitionId ( ) , event . getProcessDefinitionId ( ) ) ; event = ( ActivitiEntityEvent ) listener . getEventsReceived ( ) . get ( 5 ) ; assertEquals ( ActivitiEventType . PROCESS_STARTED , event . getType ( ) ) ; assertEquals ( processInstance . getId ( ) , event . getProcessInstanceId ( ) ) ; assertEquals ( processInstance . getProcessDefinitionId ( ) , event . getProcessDefinitionId ( ) ) ; assertTrue ( event instanceof ActivitiProcessStartedEvent ) ; assertNull ( ( ( ActivitiProcessStartedEvent ) event ) . getNestedProcessDefinitionId ( ) ) ; assertNull ( ( ( ActivitiProcessStartedEvent ) event ) . getNestedProcessInstanceId ( ) ) ; listener . clearEventsReceived ( ) ; runtimeService . suspendProcessInstanceById ( processInstance . getId ( ) ) ; runtimeService . activateProcessInstanceById ( processInstance . getId ( ) ) ; assertEquals ( 4 , listener . getEventsReceived ( ) . size ( ) ) ; event = ( ActivitiEntityEvent ) listener . getEventsReceived ( ) . get ( 0 ) ; assertEquals ( processInstance . getId ( ) , ( ( ProcessInstance ) event . getEntity ( ) ) . getId ( ) ) ; assertEquals ( ActivitiEventType . ENTITY_SUSPENDED , event . getType ( ) ) ; assertEquals ( processInstance . getId ( ) , event . getProcessInstanceId ( ) ) ; assertEquals ( processInstance . getId ( ) , event . getExecutionId ( ) ) ; assertEquals ( processInstance . getProcessDefinitionId ( ) , event . getProcessDefinitionId ( ) ) ; event = ( ActivitiEntityEvent ) listener . getEventsReceived ( ) . get ( 1 ) ; assertEquals ( ActivitiEventType . ENTITY_SUSPENDED , event . getType ( ) ) ; assertEquals ( processInstance . getId ( ) , event . getProcessInstanceId ( ) ) ; assertNotEquals ( processInstance . getId ( ) , event . getExecutionId ( ) ) ; assertEquals ( processInstance . getProcessDefinitionId ( ) , event . getProcessDefinitionId ( ) ) ; event = ( ActivitiEntityEvent ) listener . getEventsReceived ( ) . get ( 2 ) ; assertEquals ( ActivitiEventType . ENTITY_ACTIVATED , event . getType ( ) ) ; assertEquals ( processInstance . getId ( ) , ( ( ProcessInstance ) event . getEntity ( ) ) . getId ( ) ) ; assertEquals ( processInstance . getId ( ) , event . getProcessInstanceId ( ) ) ; assertEquals ( processInstance . getId ( ) , event . getExecutionId ( ) ) ; assertEquals ( processInstance . getProcessDefinitionId ( ) , event . getProcessDefinitionId ( ) ) ; event = ( ActivitiEntityEvent ) listener . getEventsReceived ( ) . get ( 3 ) ; assertEquals ( ActivitiEventType . ENTITY_ACTIVATED , event . getType ( ) ) ; assertEquals ( processInstance . getId ( ) , event . getProcessInstanceId ( ) ) ; assertNotEquals ( processInstance . getId ( ) , event . getExecutionId ( ) ) ; assertEquals ( processInstance . getProcessDefinitionId ( ) , event . getProcessDefinitionId ( ) ) ; listener . clearEventsReceived ( ) ; repositoryService . suspendProcessDefinitionById ( processInstance . getProcessDefinitionId ( ) , true , null ) ; repositoryService . activateProcessDefinitionById ( processInstance . getProcessDefinitionId ( ) , true , null ) ; assertEquals ( 4 , listener . getEventsReceived ( ) . size ( ) ) ; event = ( ActivitiEntityEvent ) listener . getEventsReceived ( ) . get ( 0 ) ; assertEquals ( processInstance . getId ( ) , ( ( ProcessInstance ) event . getEntity ( ) ) . getId ( ) ) ; assertEquals ( ActivitiEventType . ENTITY_SUSPENDED , event . getType ( ) ) ; assertEquals ( processInstance . getId ( ) , event . getProcessInstanceId ( ) ) ; assertEquals ( processInstance . getId ( ) , event . getExecutionId ( ) ) ; assertEquals ( processInstance . getProcessDefinitionId ( ) , event . getProcessDefinitionId ( ) ) ; event = ( ActivitiEntityEvent ) listener . getEventsReceived ( ) . get ( 1 ) ; assertEquals ( ActivitiEventType . ENTITY_SUSPENDED , event . getType ( ) ) ; assertEquals ( processInstance . getId ( ) , event . getProcessInstanceId ( ) ) ; assertNotEquals ( processInstance . getId ( ) , event . getExecutionId ( ) ) ; assertEquals ( processInstance . getProcessDefinitionId ( ) , event . getProcessDefinitionId ( ) ) ; event = ( ActivitiEntityEvent ) listener . getEventsReceived ( ) . get ( 2 ) ; assertEquals ( ActivitiEventType . ENTITY_ACTIVATED , event . getType ( ) ) ; assertEquals ( processInstance . getId ( ) , ( ( ProcessInstance ) event . getEntity ( ) ) . getId ( ) ) ; assertEquals ( processInstance . getId ( ) , event . getProcessInstanceId ( ) ) ; assertEquals ( processInstance . getId ( ) , event . getExecutionId ( ) ) ; assertEquals ( processInstance . getProcessDefinitionId ( ) , event . getProcessDefinitionId ( ) ) ; event = ( ActivitiEntityEvent ) listener . getEventsReceived ( ) . get ( 3 ) ; assertEquals ( ActivitiEventType . ENTITY_ACTIVATED , event . getType ( ) ) ; assertEquals ( processInstance . getId ( ) , event . getProcessInstanceId ( ) ) ; assertNotEquals ( processInstance . getId ( ) , event . getExecutionId ( ) ) ; assertEquals ( processInstance . getProcessDefinitionId ( ) , event . getProcessDefinitionId ( ) ) ; listener . clearEventsReceived ( ) ; runtimeService . updateBusinessKey ( processInstance . getId ( ) , "thekey" ) ; assertEquals ( 1 , listener . getEventsReceived ( ) . size ( ) ) ; event = ( ActivitiEntityEvent ) listener . getEventsReceived ( ) . get ( 0 ) ; assertEquals ( processInstance . getId ( ) , ( ( ProcessInstance ) event . getEntity ( ) ) . getId ( ) ) ; assertEquals ( ActivitiEventType . ENTITY_UPDATED , event . getType ( ) ) ; assertEquals ( processInstance . getId ( ) , event . getProcessInstanceId ( ) ) ; assertEquals ( processInstance . getId ( ) , event . getExecutionId ( ) ) ; assertEquals ( processInstance . getProcessDefinitionId ( ) , event . getProcessDefinitionId ( ) ) ; listener . clearEventsReceived ( ) ; runtimeService . deleteProcessInstance ( processInstance . getId ( ) , "Testing events" ) ; List < ActivitiEvent > processCancelledEvents = listener . filterEvents ( ActivitiEventType . PROCESS_CANCELLED ) ; assertEquals ( 1 , processCancelledEvents . size ( ) ) ; ActivitiCancelledEvent cancelledEvent = ( ActivitiCancelledEvent ) processCancelledEvents . get ( 0 ) ; assertEquals ( ActivitiEventType . PROCESS_CANCELLED , cancelledEvent . getType ( ) ) ; assertEquals ( processInstance . getId ( ) , cancelledEvent . getProcessInstanceId ( ) ) ; assertEquals ( processInstance . getId ( ) , cancelledEvent . getExecutionId ( ) ) ; listener . clearEventsReceived ( ) ; }

Prueba Crear, actualizar y eliminar eventos de instancias de proceso.


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


@ Override public BKSyncLogWriter startLogSegmentNonPartitioned  ( ) throws IOException  { checkClosedOrInError ( "startLogSegmentNonPartitioned" ) ; BKSyncLogWriter writer = new BKSyncLogWriter ( conf , dynConf , this ) ; boolean success = false ; try { writer . createAndCacheWriteHandler ( ) ; BKLogWriteHandler writeHandler = writer . getWriteHandler ( ) ; FutureUtils . result ( writeHandler . lockHandler ( ) ) ; success = true ; return writer ; } finally { if ( ! success ) { writer . abort ( ) ; } } }

Comience a escribir en el flujo de registro identificado por el nombre


@ Override public boolean truncate  ( String fileName , long validDataEndOffset ) { FileChannel source = null ; FileChannel destination = null ; boolean fileTruncatedSuccessfully = false ; String tempWriteFilePath = fileName + CarbonCommonConstants . TEMPWRITEFILEEXTENSION ; FileFactory . FileType fileType = FileFactory . getFileType ( fileName ) ; try { CarbonFile tempFile = null ; if ( FileFactory . isFileExist ( tempWriteFilePath , fileType ) ) { tempFile = FileFactory . getCarbonFile ( tempWriteFilePath , fileType ) ; tempFile . delete ( ) ; } FileFactory . createNewFile ( tempWriteFilePath , fileType ) ; tempFile = FileFactory . getCarbonFile ( tempWriteFilePath , fileType ) ; source = new FileInputStream ( fileName ) . getChannel ( ) ; destination = new FileOutputStream ( tempWriteFilePath ) . getChannel ( ) ; long read = destination . transferFrom ( source , 0 , validDataEndOffset ) ; long totalBytesRead = read ; long remaining = validDataEndOffset - totalBytesRead ; while ( remaining > 0 ) { read = destination . transferFrom ( source , totalBytesRead , remaining ) ; totalBytesRead = totalBytesRead + read ; remaining = remaining - totalBytesRead ; } CarbonUtil . closeStreams ( source , destination ) ; tempFile . renameForce ( fileName ) ; fileTruncatedSuccessfully = true ; } catch ( IOException e ) { LOGGER . error ( "Exception occured while truncating the file " + e . getMessage ( ) ) ; } finally { CarbonUtil . closeStreams ( source , destination ) ; } return fileTruncatedSuccessfully ; }

Este método eliminará los datos en los datos de archivos de un desplazamiento determinado


public boolean hasInit  ( ) { return getInitOpt ( ) . getNumChild ( ) != 0 ; }

Compruebe si existe el menor de inicio opcional.


public int geom_runs  ( ) { return soot . PhaseOptions . getInt ( options , "geom-runs" ) ; }

Iteraciones - iteraciones de análisis.Podemos ejecutar varias veces del análisis geométrico para mejorar continuamente la precisión del análisis.


public static String collectionToDelimitedString  ( Collection < String > coll , String delim , String prefix , String suffix ) { if ( coll == null ) { return "" ; } StringBuilder sb = new StringBuilder ( ) ; Iterator < String > it = coll . iterator ( ) ; int i = 0 ; while ( it . hasNext ( ) ) { if ( i > 0 ) { sb . append ( delim ) ; } sb . append ( prefix ) . append ( it . next ( ) ) . append ( suffix ) ; i ++ ; } return sb . toString ( ) ; }

Método de conveniencia para devolver una colección como una cadena delimitada (por ejemplo, CSV).P.ej.Útil para las implementaciones de Tostring ().


public void refresh  ( ) { getCurrentSubPolicy ( ) . refresh ( ) ; }

Actualiza la subpectativa actualmente activa al delegar a su método <código> Actualizar </ código>.


public boolean isSpawned  ( ) { return isSpawned ; }


public AttributesImpl ( ) { length = 0 ; data = null ; }

Construya un nuevo objeto AttributesImpl vacío.


public PhotosRestoreCommentQuery ( VkApiClient client , UserActor actor , int commentId ) { super ( client , "photos.restoreComment" , BoolInt . class ) ; accessToken ( actor . getAccessToken ( ) ) ; commentId ( commentId ) ; }

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


public void close  ( ) { synchronized ( lock ) { if ( closed ) { return ; } if ( cluster != null ) { HFactory . shutdownCluster ( cluster ) ; } closed = true ; } }

Cierra el grupo de conexiones de Héctor.


public DocumentNGramGaussNormGraph ( int iMinSize , int iMaxSize , int iCorrelationWindow ) { MinSize = iMinSize ; MaxSize = iMaxSize ; CorrelationWindow = iCorrelationWindow ; InitGraphs ( ) ; }

Crea una nueva instancia de insectdocummaph.


public static void drawWidgetFrame  ( ViewTransform transform , Graphics2D g , ConstraintWidget widget , EnumSet < ANCHORS_DISPLAY > showAnchors , boolean showResizeHandles , boolean showSizeIndicator , boolean isSelected ) { g . setStroke ( SnapDraw . sNormalStroke ) ; int l = transform . getSwingX ( widget . getDrawX ( ) ) ; int t = transform . getSwingY ( widget . getDrawY ( ) ) ; int w = transform . getSwingDimension ( widget . getDrawWidth ( ) ) ; int h = transform . getSwingDimension ( widget . getDrawHeight ( ) ) ; int r = transform . getSwingX ( widget . getDrawX ( ) + widget . getDrawWidth ( ) ) ; int b = transform . getSwingY ( widget . getDrawY ( ) + widget . getDrawHeight ( ) ) ; int radius = ConnectionDraw . CONNECTION_ANCHOR_SIZE ; int radiusRect = ConnectionDraw . CONNECTION_RESIZE_SIZE ; int rectDimension = radiusRect * 2 ; int midX = transform . getSwingX ( ( int ) ( widget . getDrawX ( ) + widget . getDrawWidth ( ) / 2f ) ) ; int midY = transform . getSwingY ( ( int ) ( widget . getDrawY ( ) + widget . getDrawHeight ( ) / 2f ) ) ; if ( widget . getParent ( ) instanceof ConstraintWidgetContainer ) { ConstraintWidgetContainer parent = ( ConstraintWidgetContainer ) widget . getParent ( ) ; if ( widget instanceof Guideline ) { if ( parent . isRootContainer ( ) ) { drawRootGuideline ( transform , g , parent , ( Guideline ) widget , isSelected ) ; } return ; } } if ( widget . getVisibility ( ) == ConstraintWidget . INVISIBLE ) { g . setStroke ( SnapDraw . sDashedStroke ) ; } ConstraintAnchor leftAnchor = widget . getAnchor ( ConstraintAnchor . Type . LEFT ) ; ConstraintAnchor rightAnchor = widget . getAnchor ( ConstraintAnchor . Type . RIGHT ) ; ConstraintAnchor topAnchor = widget . getAnchor ( ConstraintAnchor . Type . TOP ) ; ConstraintAnchor bottomAnchor = widget . getAnchor ( ConstraintAnchor . Type . BOTTOM ) ; boolean leftAnchorIsConnected = leftAnchor . isConnected ( ) ; boolean rightAnchorIsConnected = rightAnchor . isConnected ( ) ; boolean topAnchorIsConnected = topAnchor . isConnected ( ) ; boolean bottomAnchorIsConnected = bottomAnchor . isConnected ( ) ; boolean baselineAnchorIsConnected = widget . getAnchor ( ConstraintAnchor . Type . BASELINE ) . isConnected ( ) ; boolean centerAnchorIsConnected = ( leftAnchorIsConnected && rightAnchorIsConnected && leftAnchor . getTarget ( ) == rightAnchor . getTarget ( ) ) || ( topAnchorIsConnected && bottomAnchorIsConnected && topAnchor . getTarget ( ) == bottomAnchor . getTarget ( ) ) ; if ( showResizeHandles ) { g . fillRect ( l - radiusRect , t - radiusRect , rectDimension , rectDimension ) ; g . fillRect ( r - radiusRect , t - radiusRect , rectDimension , rectDimension ) ; g . fillRect ( l - radiusRect , b - radiusRect , rectDimension , rectDimension ) ; g . fillRect ( r - radiusRect , b - radiusRect , rectDimension , rectDimension ) ; if ( showSizeIndicator ) { ConnectionDraw . drawHorizontalMarginIndicator ( g , String . valueOf ( widget . getWidth ( ) ) , l , r , t - 20 ) ; ConnectionDraw . drawVerticalMarginIndicator ( g , String . valueOf ( widget . getHeight ( ) ) , l - 20 , t , b ) ; } } boolean displayAllAnchors = showAnchors . contains ( ANCHORS_DISPLAY . ALL ) ; boolean showLeftAnchor = displayAllAnchors || showAnchors . contains ( ANCHORS_DISPLAY . LEFT ) || showAnchors . contains ( ANCHORS_DISPLAY . HORIZONTAL ) ; boolean showRightAnchor = displayAllAnchors || showAnchors . contains ( ANCHORS_DISPLAY . RIGHT ) || showAnchors . contains ( ANCHORS_DISPLAY . HORIZONTAL ) ; boolean showTopAnchor = displayAllAnchors || showAnchors . contains ( ANCHORS_DISPLAY . TOP ) || showAnchors . contains ( ANCHORS_DISPLAY . VERTICAL ) ; boolean showBottomAnchor = displayAllAnchors || showAnchors . contains ( ANCHORS_DISPLAY . BOTTOM ) || showAnchors . contains ( ANCHORS_DISPLAY . VERTICAL ) ; boolean showCenterAnchor = displayAllAnchors || showAnchors . contains ( ANCHORS_DISPLAY . CENTER ) ; boolean showBaselineAnchor = displayAllAnchors || showAnchors . contains ( ANCHORS_DISPLAY . BASELINE ) ; if ( ! showAnchors . contains ( ANCHORS_DISPLAY . NONE ) && showAnchors . contains ( ANCHORS_DISPLAY . CONNECTED ) ) { showLeftAnchor |= leftAnchorIsConnected ; showRightAnchor |= rightAnchorIsConnected ; showTopAnchor |= topAnchorIsConnected ; showBottomAnchor |= bottomAnchorIsConnected ; showCenterAnchor |= centerAnchorIsConnected ; showBaselineAnchor |= baselineAnchorIsConnected ; } if ( showBaselineAnchor && ! ( widget instanceof ConstraintWidgetContainer ) && widget . getBaselineDistance ( ) > 0 ) { int baselineY = transform . getSwingY ( WidgetInteractionTargets . constraintHandle ( widget . getAnchor ( ConstraintAnchor . Type . BASELINE ) ) . getDrawY ( ) ) ; g . drawLine ( l , baselineY , r , baselineY ) ; } boolean horizontalSpring = widget . getHorizontalDimensionBehaviour ( ) == ConstraintWidget . DimensionBehaviour . ANY ; boolean verticalSpring = widget . getVerticalDimensionBehaviour ( ) == ConstraintWidget . DimensionBehaviour . ANY ; Graphics2D g2 = ( Graphics2D ) g . create ( ) ; if ( widget instanceof ConstraintWidgetContainer ) { g2 . setStroke ( SnapDraw . sLongDashedStroke ) ; if ( widget instanceof ConstraintTableLayout ) { drawTableLayoutGuidelines ( transform , g2 , ( ConstraintTableLayout ) widget ) ; } } if ( ! widget . isRootContainer ( ) && ( horizontalSpring || verticalSpring ) ) { int x = l ; int y = t ; Stroke previousStroke = g . getStroke ( ) ; if ( baselineAnchorIsConnected ) { g2 . setStroke ( ConnectionDraw . sSpreadDashedStroke ) ; } if ( horizontalSpring ) { if ( showTopAnchor ) { drawHorizontalZigZagLine ( g2 , l , midX - radius , t , ZIGZAG , 0 ) ; drawHorizontalZigZagLine ( g2 , midX + radius , r , t , ZIGZAG , 0 ) ; } else { drawHorizontalZigZagLine ( g2 , l , r , t , ZIGZAG , 0 ) ; } if ( showBottomAnchor ) { drawHorizontalZigZagLine ( g2 , l , midX - radius , b , - ZIGZAG , 0 ) ; drawHorizontalZigZagLine ( g2 , midX + radius , r , b , - ZIGZAG , 0 ) ; } else { drawHorizontalZigZagLine ( g2 , l , r , b , - ZIGZAG , 0 ) ; } } else { g2 . drawLine ( x , y , x + w , y ) ; g2 . drawLine ( x , y + h , x + w , y + h ) ; } g2 . setStroke ( previousStroke ) ; if ( verticalSpring ) { if ( showLeftAnchor ) { drawVerticalZigZagLine ( g2 , l , t , midY - radius , ZIGZAG , 0 ) ; drawVerticalZigZagLine ( g2 , l , midY + radius , b , ZIGZAG , 0 ) ; } else { drawVerticalZigZagLine ( g2 , l , t , b , ZIGZAG , 0 ) ; } if ( showRightAnchor ) { drawVerticalZigZagLine ( g2 , r , t , midY - radius , - ZIGZAG , 0 ) ; drawVerticalZigZagLine ( g2 , r , midY + radius , b , - ZIGZAG , 0 ) ; } else { drawVerticalZigZagLine ( g2 , r , t , b , - ZIGZAG , 0 ) ; } } else { g2 . drawLine ( x , y , x , y + h ) ; g2 . drawLine ( x + w , y , x + w , y + h ) ; } } else { Stroke previousStroke = g . getStroke ( ) ; if ( baselineAnchorIsConnected ) { g2 . setStroke ( ConnectionDraw . sSpreadDashedStroke ) ; } if ( showTopAnchor ) { g2 . drawLine ( l , t , midX - radius , t ) ; g2 . drawLine ( midX + radius , t , r , t ) ; } else { g2 . drawLine ( l , t , r , t ) ; } if ( showBottomAnchor ) { g2 . drawLine ( l , b , midX - radius , b ) ; g2 . drawLine ( midX + radius , b , r , b ) ; } else { g2 . drawLine ( l , b , r , b ) ; } g2 . setStroke ( previousStroke ) ; if ( showLeftAnchor ) { g2 . drawLine ( l , t , l , midY - radius ) ; g2 . drawLine ( l , midY + radius , l , b ) ; } else { g2 . drawLine ( l , t , l , b ) ; } if ( showRightAnchor ) { g2 . drawLine ( r , t , r , midY - radius ) ; g2 . drawLine ( r , midY + radius , r , b ) ; } else { g2 . drawLine ( r , t , r , b ) ; } } g2 . dispose ( ) ; if ( DEBUG ) { g . drawLine ( l , t , r , b ) ; g . drawLine ( l , b , r , t ) ; } g . setStroke ( SnapDraw . sNormalStroke ) ; }

Dibuje el marco del widget (área resistible ...), así como los anclajes de restricciones y su estado.El color y el estilo utilizado para el dibujo serán los actuales en el contexto de los gráficos.


@ Nullable private static String guessBinaryPath  ( ) { ByteArrayOutputStream stdout = new ByteArrayOutputStream ( ) ; int retVal = ExternalTask . builder ( ) . args ( "which" , "bazel" ) . stdout ( stdout ) . build ( ) . run ( ) ; if ( retVal != 0 ) { return null ; } return stdout . toString ( ) . trim ( ) ; }

Trate de adivinar un camino binario inicial


public int readInt  ( ) { return ( readShort ( ) << 16 ) | ( readShort ( ) & 0xFFFF ) ; }


private void onInbox  ( int resultCode , Intent data ) { if ( resultCode != Activity . RESULT_OK ) { if ( data != null && data . hasExtra ( Multiplayer . EXTRA_INVITATION ) ) { Invitation invitation = data . getExtras ( ) . getParcelable ( Multiplayer . EXTRA_INVITATION ) ; onInvitationRemoved ( invitation . getInvitationId ( ) ) ; } if ( future != null ) { future . happen ( ) ; future = null ; } updateInvites ( ) ; return ; } final RoomController c = controller ; if ( c != null ) { throw new IllegalStateException ( "tried to create new game, but there was already another!" ) ; } Invitation invitation = data . getExtras ( ) . getParcelable ( Multiplayer . EXTRA_INVITATION ) ; joinRoom ( invitation ) ; updateInvites ( ) ; }


public void train  ( Set < String > sFileNames ) { Iterator < String > iFile = sFileNames . iterator ( ) ; while ( iFile . hasNext ( ) ) { String sText = utils . loadFileToString ( iFile . next ( ) ) ; train ( sText ) ; } }

Entrena las estadísticas del chunker de un conjunto de archivos dado.


private Map < String , SpaceConfig > createSpaceSchemasMap  ( ) { if ( _allSpaceSchemasMap == null ) { final HashMap < String , SpaceConfig > allSpaceSchemasMap = new HashMap < String , SpaceConfig > ( ) ; try { for ( int i = 0 ; i < ALL_SCHEMAS_ARRAY . length ; i ++ ) { SchemaProperties schemaProperties = ResourceLoader . findSpaceSchema ( ALL_SCHEMAS_ARRAY [ i ] ) ; InputStream predefinedSchemaIs = schemaProperties . getInputStream ( ) ; Properties props = JProperties . convertXML ( predefinedSchemaIs ) ; SpaceConfig spaceConfig = null ; try { spaceConfig = SpaceConfigFactory . createSpaceConfig ( props , null , _containerName , true , schemaProperties . getFullPath ( ) ) ; } catch ( SpaceConfigurationException exc ) { if ( _logger . isLoggable ( Level . SEVERE ) ) { _logger . log ( Level . SEVERE , "An exception occurred while loading space configuration for container: " + _containerName , exc ) ; } } if ( spaceConfig != null ) allSpaceSchemasMap . put ( spaceConfig . getSchemaName ( ) , spaceConfig ) ; } String schemasDirPath = SystemInfo . singleton ( ) . locations ( ) . config ( ) + File . separator + SCHEMAS_FOLDER ; File schemasDir = new File ( schemasDirPath ) ; String [ ] allSchemaFiles = schemasDir . list ( ) ; if ( allSchemaFiles != null ) { int filesNum = allSchemaFiles . length ; for ( int i = 0 ; i < filesNum ; i ++ ) { String fileName = allSchemaFiles [ i ] ; if ( fileName . endsWith ( SPACE_SCHEMA_FILE_SUFFIX ) ) { String schemaName = fileName . substring ( 0 , fileName . indexOf ( SPACE_SCHEMA_FILE_SUFFIX ) ) ; if ( ! allSpaceSchemasMap . containsKey ( schemaName ) ) { String schemaFilePath = schemasDirPath + File . separator + fileName ; String fullSpaceSchemaLocation = "[" + SchemaProperties . getHostName ( ) + "] " + schemaFilePath ; File schemaFile = new File ( schemaFilePath ) ; FileInputStream fis = new FileInputStream ( schemaFile ) ; Properties props = JProperties . convertXML ( fis , true , _customProperties ) ; SpaceConfig spaceConfig = null ; try { spaceConfig = SpaceConfigFactory . createSpaceConfig ( props , null , _containerName , true , fullSpaceSchemaLocation ) ; } catch ( SpaceConfigurationException exc ) { if ( _logger . isLoggable ( Level . SEVERE ) ) { _logger . log ( Level . SEVERE , "An exception occurred while loading space configuration for container: " + _containerName , exc ) ; } } if ( spaceConfig != null ) { spaceConfig . setSchemaName ( schemaName ) ; allSpaceSchemasMap . put ( schemaName , spaceConfig ) ; } } } } } } catch ( Exception ex ) { if ( _logger . isLoggable ( Level . SEVERE ) ) { _logger . log ( Level . SEVERE , ex . toString ( ) , ex ) ; } } _allSpaceSchemasMap = allSpaceSchemasMap ; } return _allSpaceSchemasMap ; }

Crea y devuelve el mapa de instancias de Spaceconfig.La tecla en este mapa es el nombre del esquema, el valor es la instancia de Spaceconfig apropiada.Al principio, el mapa está lleno de todos los archivos de esquema desde el paquete de recursos, después de que todos los esquemas aún no cargados se carguen de la carpeta [gigaspaces_home] \ config \ esquemas en el disco.


public SecurityConfiguration ( SymbolTable symbolTable ) { this ( symbolTable , null , null ) ; }

Construye una configuración de analizador con la tabla de símbolos especificada.


public Builder addColumnsString  ( String ... columnNames ) { for ( String s : columnNames ) addColumnString ( s ) ; return this ; }

Agregue columnas de cadena sin restricciones en los valores permitidos


public static String toString  ( URI uri , Charset encoding ) throws IOException { return toString ( uri . toURL ( ) , Charsets . toCharset ( encoding ) ) ; }


private int klattRule0  ( Element segment ) { return getPropertyAsInteger ( "rule0.all" ) ; }

Regla de Klatt 0: Velocidad predeterminada general.


private void addHandler  ( Object handler ) { if ( handler == null ) return ; if ( handler instanceof IVideoProducer ) addVideoProducer ( ( IVideoProducer ) handler ) ; else if ( handler instanceof IAudioProducer ) addAudioProducer ( ( IAudioProducer ) handler ) ; else if ( handler instanceof ICommandHandler ) addCommandHandler ( ( ICommandHandler ) handler ) ; else if ( handler instanceof IObservationProducer ) addObservationProducer ( ( IObservationProducer ) handler ) ; else if ( handler instanceof IRewardProducer ) addRewardProducer ( ( IRewardProducer ) handler ) ; else if ( handler instanceof IWorldGenerator ) addWorldGenerator ( ( IWorldGenerator ) handler ) ; else if ( handler instanceof IWorldDecorator ) addWorldDecorator ( ( IWorldDecorator ) handler ) ; else if ( handler instanceof IWantToQuit ) addQuitProducer ( ( IWantToQuit ) handler ) ; else this . failedHandlers += handler . getClass ( ) . getSimpleName ( ) + " isn't of a recognised handler type.\n" ; }

Agregue este controlador a nuestro set, creando contenedores según sea necesario.