public static boolean parseBooleanParam  ( String value ) { if ( value == null ) { return false ; } if ( value . equalsIgnoreCase ( "false" ) || value . equals ( "0" ) ) { return false ; } return true ; }

Analizar un valor de parámetros de consulta boolean, a diferencia de Boolean.ParseBoolean, esto tratará cualquier valor, excepto NULL, FALSE y 0 como verdadero.


protected void processSceneActivationSet  ( SerialMessage serialMessage , int offset , int endpoint ) throws ZWaveSerialMessageException { int sceneId = serialMessage . getMessagePayloadByte ( offset + 1 ) ; int sceneTime = 0 ; if ( serialMessage . getMessagePayload ( ) . length > ( offset + 2 ) ) { sceneTime = serialMessage . getMessagePayloadByte ( offset + 2 ) ; } logger . debug ( String . format ( "Scene activation node from node %d: Scene %d, Time %d" , this . getNode ( ) . getNodeId ( ) , sceneId , sceneTime ) ) ; ZWaveCommandClassValueEvent zEvent = new ZWaveCommandClassValueEvent ( this . getNode ( ) . getNodeId ( ) , endpoint , this . getCommandClass ( ) , sceneId ) ; this . getController ( ) . notifyEventListeners ( zEvent ) ; }

Procesa un mensaje ScenereStivation_Set.


public String readString  ( ) throws IOException  { int size = readInt ( ) ; if ( Math . abs ( size ) > 100000000 ) throw new IOException ( "Unreasonable string length: " + Math . abs ( size ) ) ; byte [ ] bytes = new byte [ Math . abs ( size ) ] ; int got = in . read ( bytes , 0 , Math . abs ( size ) ) ; if ( got != Math . abs ( size ) ) throw new IOException ( "Bytes read: " + got + ", expected: " + Math . abs ( size ) ) ; if ( size < 0 ) { try { return compressor . inflateByteArray2String ( - size , bytes ) ; } catch ( DataFormatException e ) { throw new IOException ( e . getMessage ( ) ) ; } } else { return Compressor . convertUncompressedByteArray2String ( size , bytes ) ; } }


public static TangoPoseData matrixToTangoPose  ( Matrix4 transform ) { Vector3 p = transform . getTranslation ( ) ; Quaternion q = new Quaternion ( ) ; q . fromMatrix ( transform ) ; TangoPoseData tangoPose = new TangoPoseData ( ) ; double [ ] t = tangoPose . translation = new double [ 3 ] ; t [ 0 ] = p . x ; t [ 1 ] = p . y ; t [ 2 ] = p . z ; double [ ] r = tangoPose . rotation = new double [ 4 ] ; r [ 0 ] = q . x ; r [ 1 ] = q . y ; r [ 2 ] = q . z ; r [ 3 ] = q . w ; return tangoPose ; }

Convierte una transformación en formato Matrix4 a Tangoposedata.


public boolean canEvolve  ( ) { return ! EvolutionInfo . isFullyEvolved ( getPokemonId ( ) ) && ( getCandy ( ) >= getCandiesToEvolve ( ) ) ; }

Compruebe si puede evolucionar este pokemon


public DynamicTemplateParameterContext appendParameter  ( DynamicContextParameters param , String paramValue , boolean deleteOnExit ) { return appendParameter ( param , paramValue , deleteOnExit , ContextInfo . EMPTY ) ; }

Anexa un valor de parámetro dinámico.<ul> <li> No espera ningún parámetro de plantilla dentro del valor del parámetro. </ li> <li> El valor del parámetro se adjunta al valor del parámetro anterior. </ li> </ ul>


public MullerSolver ( double relativeAccuracy , double absoluteAccuracy ) { super ( relativeAccuracy , absoluteAccuracy ) ; }


Llamado después del objeto fue colocado en el mundo


protected long doRenew  ( long duration ) throws UnknownLeaseException , RemoteException  { return server . renewEventLease ( eventID , leaseID , duration ) ; }

Renueva el arrendamiento del evento asociado con una instancia de esta clase.Cada instancia de esta clase corresponde a un contrato de arrendamiento en un registro de eventos para un cliente en particular.Este método renueva ese arrendamiento en nombre del cliente.


public void moveToRecordId  ( RecordId rid ) { moveTo ( rid . block ( ) . number ( ) ) ; rp . moveToId ( rid . id ( ) ) ; }

Posiciona el registro actual según lo indicado por el ID de registro especificado.


public static String serveImage  ( HttpServletRequest request , HttpServletResponse response ) { HttpSession session = request . getSession ( ) ; ServletContext application = session . getServletContext ( ) ; Delegator delegator = ( Delegator ) request . getAttribute ( "delegator" ) ; Map < String , Object > parameters = UtilHttp . getParameterMap ( request ) ; Debug . logInfo ( "Img UserAgent - " + request . getHeader ( "User-Agent" ) , module ) ; String dataResourceId = ( String ) parameters . get ( "imgId" ) ; if ( UtilValidate . isEmpty ( dataResourceId ) ) { String errorMsg = "Error getting image record from db: " + " dataResourceId is empty" ; Debug . logError ( errorMsg , module ) ; request . setAttribute ( "_ERROR_MESSAGE_" , errorMsg ) ; return "error" ; } try { GenericValue dataResource = EntityQuery . use ( delegator ) . from ( "DataResource" ) . where ( "dataResourceId" , dataResourceId ) . cache ( ) . queryOne ( ) ; if ( ! "Y" . equals ( dataResource . getString ( "isPublic" ) ) ) { GenericValue userLogin = ( GenericValue ) session . getAttribute ( "userLogin" ) ; if ( userLogin == null ) { String errorMsg = "You must be logged in to download the Data Resource with ID [" + dataResourceId + "]" ; Debug . logError ( errorMsg , module ) ; request . setAttribute ( "_ERROR_MESSAGE_" , errorMsg ) ; return "error" ; } long contentAndRoleCount = EntityQuery . use ( delegator ) . from ( "ContentAndRole" ) . where ( "partyId" , userLogin . get ( "partyId" ) , "dataResourceId" , dataResourceId ) . queryCount ( ) ; if ( contentAndRoleCount == 0 ) { String errorMsg = "You do not have permission to download the Data Resource with ID [" + dataResourceId + "], ie you are not associated with it." ; Debug . logError ( errorMsg , module ) ; request . setAttribute ( "_ERROR_MESSAGE_" , errorMsg ) ; return "error" ; } } String mimeType = DataResourceWorker . getMimeType ( dataResource ) ; String userAgent = request . getHeader ( "User-Agent" ) ; if ( userAgent . indexOf ( "MSIE" ) > - 1 ) { Debug . logInfo ( "Found MSIE changing mime type from - " + mimeType , module ) ; mimeType = "application/octet-stream" ; } if ( mimeType != null ) { response . setContentType ( mimeType ) ; } OutputStream os = response . getOutputStream ( ) ; Map < String , Object > resourceData = DataResourceWorker . getDataResourceStream ( dataResource , "" , application . getInitParameter ( "webSiteId" ) , UtilHttp . getLocale ( request ) , application . getRealPath ( "/" ) , false ) ; os . write ( IOUtils . toByteArray ( ( ByteArrayInputStream ) resourceData . get ( "stream" ) ) ) ; os . flush ( ) ; } catch ( GenericEntityException e ) { String errMsg = "Error downloading digital product content: " + e . toString ( ) ; Debug . logError ( e , errMsg , module ) ; request . setAttribute ( "_ERROR_MESSAGE_" , errMsg ) ; return "error" ; } catch ( GeneralException e ) { String errMsg = "Error downloading digital product content: " + e . toString ( ) ; Debug . logError ( e , errMsg , module ) ; request . setAttribute ( "_ERROR_MESSAGE_" , errMsg ) ; return "error" ; } catch ( IOException e ) { String errMsg = "Error downloading digital product content: " + e . toString ( ) ; Debug . logError ( e , errMsg , module ) ; request . setAttribute ( "_ERROR_MESSAGE_" , errMsg ) ; return "error" ; } return "success" ; }

Streams Imagedataresource Data a la salida.


public static Aggregate < Object , Long > count  ( ) { return Aggregates . count ( ) ; }

Cree un agregado que contará los resultados de una consulta.


public boolean hasBOM  ( ) throws IOException  { return getBOM ( ) != null ; }

Indica si la corriente contiene uno de los boms especificados.


public Iterator < E > iterator  ( ) { return map . keySet ( ) . iterator ( ) ; }

Devuelve un iterador sobre los elementos en este conjunto.Los elementos se devuelven en ningún orden en particular.


@ SuppressWarnings ( "rawtypes" ) public Value newBoundVariable  ( String name , Class type ) { return new Variable ( name , type ) ; }

Este método se llamará solo una vez por vinculación de la variable en una cláusula </ código> contiene </ código>, y el valor devuelto se reutilizará para cualquier instancia adicional de la variable en subexpresión de la cadena de filtro.El tipo puede ser <código> objeto </ código> si la variable no se declara.


public static FrozenNativePage freeze  ( NativePage nativePage ) { FrozenNativePage fnp = new FrozenNativePage ( nativePage ) ; nativePage . destroy ( ) ; return fnp ; }

Crea una Page Frozennative para reemplazar la nativa dada y destruye la nativa.


public NewsfeedUnsubscribeQuery ownerId  ( Integer value ) { return unsafeParam ( "owner_id" , value ) ; }

Identificación del propietario del objeto.


@ Override public void onCreateOptionsMenu  ( Menu menu , MenuInflater inflater ) { super . onCreateOptionsMenu ( menu , inflater ) ; mOptionsMenu = menu ; inflater . inflate ( R . menu . list , menu ) ; }


public void addPermission  ( String permissionName ) { AXmlNode permission = new AXmlNode ( "uses-permission" , null , manifest ) ; AXmlAttribute < String > permissionNameAttr = new AXmlAttribute < String > ( "name" , permissionName , AXmlHandler . ANDROID_NAMESPACE ) ; permission . addAttribute ( permissionNameAttr ) ; }


private void updateTableMetadata  ( String table , Delta delta , Audit audit , @ Nullable InvalidationScope scope ) { _backingStore . update ( _systemTable , table , TimeUUIDs . newUUID ( ) , delta , audit , scope == InvalidationScope . GLOBAL ? WriteConsistency . GLOBAL : WriteConsistency . STRONG ) ; if ( scope != null ) { _tableCacheHandle . invalidate ( scope , table ) ; } }

Escriba el Delta a la tabla del sistema e invalida en cachés en el alcance especificado.


protected ODEStateAndDerivative initIntegration  ( final ExpandableODE eqn , final ODEState s0 , final double t ) { this . equations = eqn ; evaluations = evaluations . withCount ( 0 ) ; eqn . init ( s0 , t ) ; final double t0 = s0 . getTime ( ) ; final double [ ] y0 = s0 . getCompleteState ( ) ; final double [ ] y0Dot = computeDerivatives ( t0 , y0 ) ; final ODEStateAndDerivative s0WithDerivatives = eqn . getMapper ( ) . mapStateAndDerivative ( t0 , y0 , y0Dot ) ; for ( final EventState state : eventsStates ) { state . getEventHandler ( ) . init ( s0WithDerivatives , t ) ; } for ( ODEStepHandler handler : stepHandlers ) { handler . init ( s0WithDerivatives , t ) ; } setStateInitialized ( false ) ; return s0WithDerivatives ; }


private void estimateLoadPercentage  ( ) { double cpuUsed = this . systemResourceUsage . cpu . usage ; double cpuAllocated = cpuUsageByMsgRate * ( this . allocatedQuota . getMsgRateIn ( ) + this . allocatedQuota . getMsgRateOut ( ) ) ; double cpuPreAllocated = cpuUsageByMsgRate * ( this . preAllocatedQuota . getMsgRateIn ( ) + this . preAllocatedQuota . getMsgRateOut ( ) ) ; this . allocatedLoadPercentageCPU = ( this . systemResourceUsage . cpu . limit <= 0 ) ? 0 : Math . min ( 100 , 100 * cpuAllocated / this . systemResourceUsage . cpu . limit ) ; this . estimatedLoadPercentageCPU = ( this . systemResourceUsage . cpu . limit <= 0 ) ? 0 : Math . min ( 100 , 100 * ( Math . max ( cpuUsed , cpuAllocated ) + cpuPreAllocated ) / this . systemResourceUsage . cpu . limit ) ; double memUsed = this . systemResourceUsage . memory . usage ; double memAllocated = this . allocatedQuota . getMemory ( ) ; double memPreAllocated = this . preAllocatedQuota . getMemory ( ) ; this . allocatedLoadPercentageMemory = ( this . systemResourceUsage . memory . limit <= 0 ) ? 0 : Math . min ( 100 , 100 * memAllocated / this . systemResourceUsage . memory . limit ) ; this . estimatedLoadPercentageMemory = ( this . systemResourceUsage . memory . limit <= 0 ) ? 0 : Math . min ( 100 , 100 * ( Math . max ( memUsed , memAllocated ) + memPreAllocated ) / this . systemResourceUsage . memory . limit ) ; double bandwidthInUsed = this . systemResourceUsage . bandwidthIn . usage ; double bandwidthInAllocated = this . allocatedQuota . getBandwidthIn ( ) / KBITS_TO_BYTES ; double bandwidthInPreAllocated = this . preAllocatedQuota . getBandwidthIn ( ) / KBITS_TO_BYTES ; this . allocatedLoadPercentageBandwidthIn = ( this . systemResourceUsage . bandwidthIn . limit <= 0 ) ? 0 : Math . min ( 100 , 100 * bandwidthInAllocated / this . systemResourceUsage . bandwidthIn . limit ) ; this . estimatedLoadPercentageBandwidthIn = ( this . systemResourceUsage . bandwidthIn . limit <= 0 ) ? 0 : Math . min ( 100 , 100 * ( Math . max ( bandwidthInUsed , bandwidthInAllocated ) + bandwidthInPreAllocated ) / this . systemResourceUsage . bandwidthIn . limit ) ; double bandwidthOutUsed = this . systemResourceUsage . bandwidthOut . usage ; double bandwidthOutAllocated = this . allocatedQuota . getBandwidthOut ( ) / KBITS_TO_BYTES ; double bandwidthOutPreAllocated = this . preAllocatedQuota . getBandwidthOut ( ) / KBITS_TO_BYTES ; this . allocatedLoadPercentageBandwidthOut = ( this . systemResourceUsage . bandwidthOut . limit <= 0 ) ? 0 : Math . min ( 100 , 100 * bandwidthOutAllocated / this . systemResourceUsage . bandwidthOut . limit ) ; this . estimatedLoadPercentageBandwidthOut = ( this . systemResourceUsage . bandwidthOut . limit <= 0 ) ? 0 : Math . min ( 100 , 100 * ( Math . max ( bandwidthOutUsed , bandwidthOutAllocated ) + bandwidthOutPreAllocated ) / this . systemResourceUsage . bandwidthOut . limit ) ; double directMemoryUsed = this . systemResourceUsage . directMemory . usage ; this . estimatedLoadPercentageDirectMemory = ( this . systemResourceUsage . directMemory . limit <= 0 ) ? 0 : Math . min ( 100 , 100 * directMemoryUsed / this . systemResourceUsage . directMemory . limit ) ; this . estimatedLoadPercentage = Math . max ( this . estimatedLoadPercentageCPU , Math . max ( this . estimatedLoadPercentageMemory , Math . max ( this . estimatedLoadPercentageDirectMemory , Math . max ( this . estimatedLoadPercentageBandwidthIn , this . estimatedLoadPercentageBandwidthOut ) ) ) ) ; }

Estimar el porcentaje de carga, que es el porcentaje máximo de todos los usos de recursos


private boolean expect  ( ProjectViewTokenType kind ) { if ( matches ( kind ) ) { return true ; } builder . error ( String . format ( "'%s' expected" , kind ) ) ; return false ; }

Consume el token actual si es del tipo esperado.De lo contrario, devuelve falso e informa un error.


public void testMinApiParent  ( ) { doTestForParentApi ( "android:Theme.Holo" , "apiParentTestAfter3" ) ; }

Pruebas Configuración de un padre con API = ProjectMinAPI


public static boolean isAnyCard  ( String ccPassed ) { if ( isEmpty ( ccPassed ) ) return defaultEmptyOK ; String cc = stripCharsInBag ( ccPassed , creditCardDelimiters ) ; if ( ! isCreditCard ( cc ) ) return false ; if ( isMasterCard ( cc ) || isVisa ( cc ) || isAmericanExpress ( cc ) || isDinersClub ( cc ) || isDiscover ( cc ) || isEnRoute ( cc ) || isJCB ( cc ) || isSolo ( cc ) || isswitch ( cc ) || isVisaElectron ( cc ) ) return true ; return false ; }

Los cheques para ver si el número de CC es un número válido para cualquier tarjeta de crédito aceptada


public void close  ( ) { mSocket . close ( ) ; }


void checkForDuplicateNames  ( String qName , int declType , Hashtable registry , Hashtable registry_sub , Element currComp , XSDocumentInfo currSchema ) { Object objElem = null ; if ( ( objElem = registry . get ( qName ) ) == null ) { if ( fNamespaceGrowth && ! fTolerateDuplicates ) { checkForDuplicateNames ( qName , declType , currComp ) ; } registry . put ( qName , currComp ) ; registry_sub . put ( qName , currSchema ) ; } else { Element collidingElem = ( Element ) objElem ; XSDocumentInfo collidingElemSchema = ( XSDocumentInfo ) registry_sub . get ( qName ) ; if ( collidingElem == currComp ) return ; Element elemParent = null ; XSDocumentInfo redefinedSchema = null ; boolean collidedWithRedefine = true ; if ( ( DOMUtil . getLocalName ( ( elemParent = DOMUtil . getParent ( collidingElem ) ) ) . equals ( SchemaSymbols . ELT_REDEFINE ) ) ) { redefinedSchema = ( XSDocumentInfo ) ( fRedefine2XSDMap . get ( elemParent ) ) ; } else if ( ( DOMUtil . getLocalName ( DOMUtil . getParent ( currComp ) ) . equals ( SchemaSymbols . ELT_REDEFINE ) ) ) { redefinedSchema = collidingElemSchema ; collidedWithRedefine = false ; } if ( redefinedSchema != null ) { if ( collidingElemSchema == currSchema ) { reportSchemaError ( "sch-props-correct.2" , new Object [ ] { qName } , currComp ) ; return ; } String newName = qName . substring ( qName . lastIndexOf ( ',' ) + 1 ) + REDEF_IDENTIFIER ; if ( redefinedSchema == currSchema ) { currComp . setAttribute ( SchemaSymbols . ATT_NAME , newName ) ; if ( currSchema . fTargetNamespace == null ) { registry . put ( "," + newName , currComp ) ; registry_sub . put ( "," + newName , currSchema ) ; } else { registry . put ( currSchema . fTargetNamespace + "," + newName , currComp ) ; registry_sub . put ( currSchema . fTargetNamespace + "," + newName , currSchema ) ; } if ( currSchema . fTargetNamespace == null ) checkForDuplicateNames ( "," + newName , declType , registry , registry_sub , currComp , currSchema ) ; else checkForDuplicateNames ( currSchema . fTargetNamespace + "," + newName , declType , registry , registry_sub , currComp , currSchema ) ; } else { if ( collidedWithRedefine ) { if ( currSchema . fTargetNamespace == null ) checkForDuplicateNames ( "," + newName , declType , registry , registry_sub , currComp , currSchema ) ; else checkForDuplicateNames ( currSchema . fTargetNamespace + "," + newName , declType , registry , registry_sub , currComp , currSchema ) ; } else { reportSchemaError ( "sch-props-correct.2" , new Object [ ] { qName } , currComp ) ; } } } else { if ( ! fTolerateDuplicates || fUnparsedRegistriesExt [ declType ] . get ( qName ) == currSchema ) { reportSchemaError ( "sch-props-correct.2" , new Object [ ] { qName } , currComp ) ; } } } if ( fTolerateDuplicates ) { fUnparsedRegistriesExt [ declType ] . put ( qName , currSchema ) ; } }

Este método se asegura de que si este componente se está redefiniendo que vive en el esquema correcto.Luego cambia el componente correctamente.Si detecta una colisión, una definición duplicada, entonces se queja.Tenga en cuenta que los redefines deben manejarse con cuidado: si hay una colisión, puede ser porque estamos redefiniendo algo que conocemos o porque hemos encontrado lo que estamos redefiniendo.


public void update  ( ) { if ( mProfile == null ) return ; Account [ ] accounts = AccountManagerHelper . get ( mContext ) . getGoogleAccounts ( ) ; for ( int i = 0 ; i < accounts . length ; i ++ ) { if ( mCacheEntries . get ( accounts [ i ] . name ) == null ) { ProfileDownloader . startFetchingAccountInfoFor ( mContext , mProfile , accounts [ i ] . name , mImageSizePx , true ) ; } } }

Iniciar buscar datos de cuentas de usuario (imágenes y el nombre completo).Los datos recuperados se enviarán a los observadores de Profiledownloader.


public void tag  ( JavaRDD < Row > sentences , String outputFileName , OutputFormat outputFormat ) { StructType schema = new StructType ( new StructField [ ] { new StructField ( "sentence" , DataTypes . StringType , false , Metadata . empty ( ) ) } ) ; SQLContext sqlContext = new SQLContext ( jsc ) ; DataFrame input = sqlContext . createDataFrame ( sentences , schema ) ; tag ( input , outputFileName , outputFormat ) ; }

Etiquetas una lista distribuida de oraciones y escribe el resultado a un archivo de salida con un formato de salida deseado.


protected void addLanguageVariables  ( BundleContext context ) { Language defaultLanguage = APILocator . getLanguageAPI ( ) . getLanguage ( "en" , "US" ) ; addLanguageVariables ( context , defaultLanguage ) ; }

Registra las variables de idioma que se guardan en el archivo CONF / LANGERY-ext.properties en el idioma inglés (EN_US)


@ Override public boolean equals  ( Object that ) { if ( this == that ) { return true ; } if ( that == null ) { return false ; } if ( getClass ( ) != that . getClass ( ) ) { return false ; } SysRole other = ( SysRole ) that ; return ( this . getId ( ) == null ? other . getId ( ) == null : this . getId ( ) . equals ( other . getId ( ) ) ) && ( this . getRoleName ( ) == null ? other . getRoleName ( ) == null : this . getRoleName ( ) . equals ( other . getRoleName ( ) ) ) && ( this . getDeptId ( ) == null ? other . getDeptId ( ) == null : this . getDeptId ( ) . equals ( other . getDeptId ( ) ) ) && ( this . getRoleType ( ) == null ? other . getRoleType ( ) == null : this . getRoleType ( ) . equals ( other . getRoleType ( ) ) ) && ( this . getEnable ( ) == null ? other . getEnable ( ) == null : this . getEnable ( ) . equals ( other . getEnable ( ) ) ) && ( this . getRemark ( ) == null ? other . getRemark ( ) == null : this . getRemark ( ) . equals ( other . getRemark ( ) ) ) && ( this . getCreateBy ( ) == null ? other . getCreateBy ( ) == null : this . getCreateBy ( ) . equals ( other . getCreateBy ( ) ) ) && ( this . getCreateTime ( ) == null ? other . getCreateTime ( ) == null : this . getCreateTime ( ) . equals ( other . getCreateTime ( ) ) ) && ( this . getUpdateBy ( ) == null ? other . getUpdateBy ( ) == null : this . getUpdateBy ( ) . equals ( other . getUpdateBy ( ) ) ) && ( this . getUpdateTime ( ) == null ? other . getUpdateTime ( ) == null : this . getUpdateTime ( ) . equals ( other . getUpdateTime ( ) ) ) ; }

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


public boolean containsKey  ( Object key ) { int hash = hash ( key . hashCode ( ) ) ; return segmentFor ( hash ) . containsKey ( key , hash ) ; }

Pruebas Si el objeto especificado es una clave en esta tabla.


private void readObjectNoData  ( ) throws ObjectStreamException  { throw new InvalidObjectException ( "no data" ) ; }

Lanza inválido invalidobjectException, ya que se requieren datos para esta clase.


public final boolean isOnline  ( ) { return gscHandler != null && gscHandler . getState ( ) == State . AUTHED ; }


public void removeFence  ( @ NonNull String id ) { Set < String > fenceIdSet = mPrefs . getStringSet ( mPrefix + FENCE_ID_SET_KEY , null ) ; if ( ( fenceIdSet != null ) && fenceIdSet . contains ( id ) ) { SharedPreferences . Editor editor = mPrefs . edit ( ) ; editor . remove ( mPrefix + id ) ; fenceIdSet . remove ( id ) ; editor . putStringSet ( FENCE_ID_SET_KEY , fenceIdSet ) ; editor . apply ( ) ; } }

Retire una cerca de la tienda en función de su ID


public int hash  ( String symbol ) { return symbol . hashCode ( ) & 0x7FFFFFFF ; }

Devuelve un valor de hashcode para el símbolo especificado.El valor devuelto por este método debe ser idéntico al valor devuelto por el método <code> hash (char [], int, int) </ código> cuando se llama con la matriz de caracteres que comprende la cadena de símbolos.


private static void processColumnData  ( List < Column > colList , Packages pkg , String tbName ) { Set < String > set = new HashSet < String > ( ) ; StringBuilder initBuilder = new StringBuilder ( ) ; StringBuilder pkConditionBuilder = new StringBuilder ( ) ; StringBuilder insertBuilder = new StringBuilder ( ) ; StringBuilder updateBuilder = new StringBuilder ( ) ; for ( Column col : colList ) { col . setColName ( StringUtil . parseHumpName ( col . getDbColName ( ) , false , isHumpColumn ) ) ; col . setImportClass ( ColumnUtil . parseColumnType ( col . getClassName ( ) , col . getColSize ( ) , col . getScale ( ) ) ) ; String importClass = col . getImportClass ( ) ; col . setClassName ( importClass . indexOf ( "." ) == - 1 ? importClass : importClass . substring ( importClass . lastIndexOf ( "." ) + 1 ) ) ; col . setImportClass ( importClass . indexOf ( "." ) == - 1 ? "" : importClass ) ; if ( col . getImportClass ( ) != null && ! "" . equals ( col . getImportClass ( ) ) ) { set . add ( col . getImportClass ( ) ) ; } col . setSetMethod ( "set" + StringUtil . upperFirst ( col . getColName ( ) ) ) ; col . setGetMethod ( "get" + StringUtil . upperFirst ( col . getColName ( ) ) ) ; initBuilder . append ( col . getDbColName ( ) ) . append ( "," ) ; if ( col . getIsPk ( ) == 1 ) { if ( pkConditionBuilder . length ( ) > 0 ) { pkConditionBuilder . append ( " AND " ) ; } pkConditionBuilder . append ( col . getDbColName ( ) ) . append ( "=#{" ) . append ( col . getColName ( ) ) . append ( "} " ) ; } insertBuilder . append ( "#{" ) . append ( col . getColName ( ) ) . append ( "}," ) ; updateBuilder . append ( col . getDbColName ( ) ) . append ( "=#{" ) . append ( col . getColName ( ) ) . append ( "}," ) ; } pkg . setInitSql ( initBuilder . deleteCharAt ( initBuilder . length ( ) - 1 ) . toString ( ) ) ; pkg . setPkCondition ( pkConditionBuilder . toString ( ) ) ; pkg . setInsertStatements ( insertBuilder . deleteCharAt ( insertBuilder . length ( ) - 1 ) . toString ( ) ) ; pkg . setUpdateStatements ( updateBuilder . deleteCharAt ( updateBuilder . length ( ) - 1 ) . toString ( ) ) ; pkg . setImportSet ( set ) ; pkg . setColumnList ( colList ) ; }


@ Override public Histogram histogram  ( ) { return p . histogram ( ) ; }

Devuelve el histograma que se aproxima a la distribución de unión de los valores de campo de los resultados de la consulta.


public static void enableConsoleLogging  ( ) { consoleLoggingEnabled = true ; }

Encienda el registro de la consola.Siempre debe estar encendido y simplemente apagado temporalmente cuando sea necesario.Por lo general, esto es cuando se ejecuta un comando que espera fallar, como verificar si algo existe, y no desea insultar al usuario con errores esperados.


private void addSegmentsIfEmpty  ( JobContext job , AbsoluteTableIdentifier absoluteTableIdentifier ) throws IOException { if ( getSegmentsFromConfiguration ( job ) . length == 0 ) { SegmentStatusManager . ValidAndInvalidSegmentsInfo validAndInvalidSegments = new SegmentStatusManager ( absoluteTableIdentifier ) . getValidAndInvalidSegments ( ) ; setSegmentsToAccess ( job . getConfiguration ( ) , validAndInvalidSegments . getValidSegments ( ) ) ; } }

Se utilizará por debajo del método para establecer los detalles de los segmentos si los segmentos no se agregan en la configuración.


public static boolean isFileOlder  ( File file , Date date ) { if ( date == null ) { throw new IllegalArgumentException ( "No specified date" ) ; } return isFileOlder ( file , date . getTime ( ) ) ; }

Pruebas Si el archivo <código> especificado </ el código> es más antiguo que la fecha <código> especificada </ codigo>.


private static double exp  ( double x , double extra , double [ ] hiPrec ) { double intPartA ; double intPartB ; int intVal = ( int ) x ; if ( x < 0.0 ) { if ( x < - 746d ) { if ( hiPrec != null ) { hiPrec [ 0 ] = 0.0 ; hiPrec [ 1 ] = 0.0 ; } return 0.0 ; } if ( intVal < - 709 ) { final double result = exp ( x + 40.19140625 , extra , hiPrec ) / 285040095144011776.0 ; if ( hiPrec != null ) { hiPrec [ 0 ] /= 285040095144011776.0 ; hiPrec [ 1 ] /= 285040095144011776.0 ; } return result ; } if ( intVal == - 709 ) { final double result = exp ( x + 1.494140625 , extra , hiPrec ) / 4.455505956692756620 ; if ( hiPrec != null ) { hiPrec [ 0 ] /= 4.455505956692756620 ; hiPrec [ 1 ] /= 4.455505956692756620 ; } return result ; } intVal -- ; } else { if ( intVal > 709 ) { if ( hiPrec != null ) { hiPrec [ 0 ] = Double . POSITIVE_INFINITY ; hiPrec [ 1 ] = 0.0 ; } return Double . POSITIVE_INFINITY ; } } intPartA = ExpIntTable . EXP_INT_TABLE_A [ EXP_INT_TABLE_MAX_INDEX + intVal ] ; intPartB = ExpIntTable . EXP_INT_TABLE_B [ EXP_INT_TABLE_MAX_INDEX + intVal ] ; final int intFrac = ( int ) ( ( x - intVal ) * 1024.0 ) ; final double fracPartA = ExpFracTable . EXP_FRAC_TABLE_A [ intFrac ] ; final double fracPartB = ExpFracTable . EXP_FRAC_TABLE_B [ intFrac ] ; final double epsilon = x - ( intVal + intFrac / 1024.0 ) ; double z = 0.04168701738764507 ; z = z * epsilon + 0.1666666505023083 ; z = z * epsilon + 0.5000000000042687 ; z = z * epsilon + 1.0 ; z = z * epsilon + - 3.940510424527919E-20 ; double tempA = intPartA * fracPartA ; double tempB = intPartA * fracPartB + intPartB * fracPartA + intPartB * fracPartB ; final double tempC = tempB + tempA ; if ( tempC == Double . POSITIVE_INFINITY ) { return Double . POSITIVE_INFINITY ; } final double result ; if ( extra != 0.0 ) { result = tempC * extra * z + tempC * extra + tempC * z + tempB + tempA ; } else { result = tempC * z + tempB + tempA ; } if ( hiPrec != null ) { hiPrec [ 0 ] = tempA ; hiPrec [ 1 ] = tempC * extra * z + tempC * extra + tempC * z + tempB ; } return result ; }

Método de ayudante interno para la función exponencial.


@ Override public void xml  ( String xml ) { if ( TextUtils . isEmpty ( xml ) ) { d ( "Empty/Null xml content" ) ; return ; } try { Source xmlInput = new StreamSource ( new StringReader ( xml ) ) ; StreamResult xmlOutput = new StreamResult ( new StringWriter ( ) ) ; Transformer transformer = TransformerFactory . newInstance ( ) . newTransformer ( ) ; transformer . setOutputProperty ( OutputKeys . INDENT , "yes" ) ; transformer . setOutputProperty ( "{http://xml.apache.org/xslt}indent-amount" , "2" ) ; transformer . transform ( xmlInput , xmlOutput ) ; d ( xmlOutput . getWriter ( ) . toString ( ) . replaceFirst ( ">" , ">\n" ) ) ; } catch ( TransformerException e ) { e ( e . getCause ( ) . getMessage ( ) + "\n" + xml ) ; } }

Formatos del contenido de JSON e imprimiéndolo.


public static SM_SYSTEM_MESSAGE STR_CANNOT_USE_ITEM_TOO_LOW_GUILD_LEVEL  ( String value1 , String value0 ) { return new SM_SYSTEM_MESSAGE ( 1400906 , value1 , value0 ) ; }

No puede utilizar% 1 hasta que alcance el nivel% 0.


private static String preencode  ( String contents ) { int length = contents . length ( ) ; if ( length == 11 ) { int sum = 0 ; for ( int i = 0 ; i < 11 ; ++ i ) { sum += ( contents . charAt ( i ) - '0' ) * ( i % 2 == 0 ? 3 : 1 ) ; } contents += ( 1000 - sum ) % 10 ; } else if ( length != 12 ) { throw new IllegalArgumentException ( "Requested contents should be 11 or 12 digits long, but got " + contents . length ( ) ) ; } return '0' + contents ; }

Transforme un código UPC: un código equivalente a EAN-13, y agregue un dígito de verificación si aún no está presente.


public static String formatQuantity  ( float quantity ) { return formatQuantity ( ( double ) quantity ) ; }

Formatos de un flotador que representa una cantidad en una cadena


public MapleQuestStatus ( final MapleQuest quest , final int status ) { this . quest = quest ; this . setStatus ( ( byte ) status ) ; this . completionTime = System . currentTimeMillis ( ) ; if ( status == 1 ) { if ( ! quest . getRelevantMobs ( ) . isEmpty ( ) ) { registerMobs ( ) ; } } }

Crea una nueva instancia de MaplequestStatus.


public void deepFill  ( MaryNode specTree ) { tree = specTree ; numberOfLeaves = 0 ; sortNode ( 0 , tree ) ; }

Llene un árbol que especifica una jerarquía de características, pero no hay unidades correspondientes.


@ Deployment public void testSignalBoundaryOnSubProcess  ( ) { ProcessInstance pi = runtimeService . startProcessInstanceByKey ( "signalEventOnSubprocess" ) ; runtimeService . signalEventReceived ( "stopSignal" ) ; assertProcessEnded ( pi . getProcessInstanceId ( ) ) ; }

Verifica la solución de https://jira.codehaus.org/browse/act-1309


public void monitorMemoryUsage  ( boolean isWriteTypeOperation ) throws MemoryShortageException { MemoryEvictionDecision res ; if ( _enabled && ( ( res = monitorMemoryUsageWithNoEviction_Impl ( isWriteTypeOperation ) ) != MemoryEvictionDecision . NO_EVICTION ) ) { _evictor . evict ( isWriteTypeOperation , res == MemoryEvictionDecision . SYNC_EVICTION ) ; } }

Compruebe si llegamos a la memoria "Watermark".Si el uso de la memoria no está habilitado, no haga nada.


private static void print  ( String header , String prefix , Object [ ] array ) { System . out . print ( header ) ; if ( array . length > 0 ) { System . out . println ( ) ; for ( int i = 0 ; i < array . length ; i ++ ) { System . out . print ( "  " ) ; System . out . print ( prefix ) ; System . out . println ( array [ i ] ) ; } } else { System . out . println ( " none." ) ; } }

Imprime una lista de características / propiedades.


protected void startBKCluster  ( ) throws Exception  { baseClientConf . setZkServers ( zkUtil . getZooKeeperConnectString ( ) ) ; baseClientConf . setUseV2WireProtocol ( true ) ; if ( numBookies > 0 ) { bkc = new BookKeeperTestClient ( baseClientConf ) ; } for ( int i = 0 ; i < numBookies ; i ++ ) { startNewBookie ( ) ; } }

Iniciar cluster.Además, inicia el proceso de recuperación de automóviles para cada bookie, si IsautorecoveryEnabled es verdadero.


public static SM_SYSTEM_MESSAGE STR_SKILL_SUCC_FPATK_INTERVAL_TO_ME  ( int num0 , String skillname ) { return new SM_SYSTEM_MESSAGE ( 1201055 , num0 , skillname ) ; }

Su tiempo de vuelo disminuyó en% NUM0 debido al efecto de [% de habilidad].


public void onDirectoryChange  ( final File directory ) { }


public boolean containsListener  ( Listener listener ) { return this . listeners . contains ( listener ) ; }

Devuelve verdadero si el oyente dado ya está adjunto a este mundo.


public boolean isError  ( ) { return state . equals ( ERROR ) ; }

Compruebe si se muestra el estado de error


public void mousePressed  ( MouseEvent e ) { mIsControlDown = e . isControlDown ( ) ; mIsShiftDown = e . isShiftDown ( ) ; mIsAltDown = e . isAltDown ( ) ; float x = mViewTransform . getAndroidFX ( e . getX ( ) ) ; float y = mViewTransform . getAndroidFY ( e . getY ( ) ) ; mousePressed ( x , y , SwingUtilities . isRightMouseButton ( e ) ) ; }


public void add  ( int [ ] vals , int offset , int length ) { ensureCapacity ( _pos + length ) ; System . arraycopy ( vals , offset , _data , _pos , length ) ; _pos += length ; }

Agrega un subconjunto de los valores en la matriz <tt> vals </ tt> al final de la lista, en orden.


public static boolean isWifiEnabled  ( Context context ) { ConnectivityManager mgrConn = ( ConnectivityManager ) context . getSystemService ( Context . CONNECTIVITY_SERVICE ) ; TelephonyManager mgrTel = ( TelephonyManager ) context . getSystemService ( Context . TELEPHONY_SERVICE ) ; return ( ( mgrConn . getActiveNetworkInfo ( ) != null && mgrConn . getActiveNetworkInfo ( ) . getState ( ) == NetworkInfo . State . CONNECTED ) || mgrTel . getNetworkType ( ) == TelephonyManager . NETWORK_TYPE_UMTS ) ; }


public boolean equalTo  ( Highlight h ) { if ( h == null ) return false ; else { if ( this . mDataSetIndex == h . mDataSetIndex && this . mX == h . mX && this . mStackIndex == h . mStackIndex && this . mDataIndex == h . mDataIndex ) return true ; else return false ; } }

Devuelve VERDADERO si este objeto de resalte es igual al otro (compara Xindex y DataSetIndex)


public void addEventListener  ( ZWaveEventListener eventListener ) { synchronized ( zwaveEventListeners ) { if ( zwaveEventListeners . contains ( eventListener ) ) { logger . debug ( "Event Listener {} already registered" , eventListener ) ; return ; } zwaveEventListeners . add ( eventListener ) ; } }

Agregue un oyente para los eventos de Zwave a este controlador.


protected Label createWrappingLabel  ( Composite parent , String text , int indent ) { return createWrappingLabel ( parent , text , indent , 1 ) ; }

Método de utilidad que crea una instancia de etiqueta con Word Wrap y establece los datos de diseño predeterminados.


public PolyEntry ( String name , String desc , StructType type ) { this . name = name ; this . desc = desc ; this . type = type ; }


private Item newString  ( final String value ) { key2 . set ( STR , value , null , null ) ; Item result = get ( key2 ) ; if ( result == null ) { pool . put12 ( STR , newUTF8 ( value ) ) ; result = new Item ( index ++ , key2 ) ; put ( result ) ; } return result ; }

Agrega una cadena al grupo constante de la clase que se está construyendo.No hace nada si el grupo constante ya contiene un artículo similar.


public void shuffle  ( Random rand ) { for ( int i = _pos ; i -- > 1 ; ) { swap ( i , rand . nextInt ( i ) ) ; } }

Baraja los elementos de la lista con el generador de números aleatorios especificado.


public Storage ( File directory ) { this ( directory , null ) ; }


public static String compatibleFieldName  ( String original ) { if ( ! original . matches ( "^[A-Za-z_].*" ) ) { return "_" + original ; } else { return original ; } }

El nombre de campo original ajustado, si es necesario, para ajustarse a los requisitos del nombre del campo de AVRO al prefijarse con un subrayado.


public static SM_SYSTEM_MESSAGE STR_MSG_CAPTCHA_RESTRICTED  ( String durationtime0 ) { return new SM_SYSTEM_MESSAGE ( 1400268 , durationtime0 ) ; }

Usted fue envenenado durante la extracción y no puede extraer por% de Duración0.


protected final boolean isLoadFooterVisible  ( ) { return mLoadFooter == getChildAt ( getChildCount ( ) - 1 ) ; }


public void delete  ( @ NonNull Key key ) { final ReentrantReadWriteLock . WriteLock lock = guard . writeLock ( ) ; lock . lock ( ) ; try { if ( ! readKeys . remove ( key ) ) throw new IllegalArgumentException ( "key does not exist" ) ; Files . delete ( key . getFile ( ) ) ; } catch ( IOException ex ) { LOG . log ( Level . WARNING , "unable to remove file " + key . getFile ( ) , ex ) ; } finally { lock . unlock ( ) ; } }

Elimina el archivo asociado con la clave dada.


public List < ProcessFunctionParameterValue > extractParameters  ( ProcessDescriptionType selectedCustomFunction ) { List < ProcessFunctionParameterValue > valueList = new ArrayList < ProcessFunctionParameterValue > ( ) ; if ( dataTypeMap . isEmpty ( ) ) { populateDataMap ( ) ; } if ( selectedCustomFunction != null ) { for ( int index = 0 ; index < selectedCustomFunction . getDataInputs ( ) . getInput ( ) . size ( ) ; index ++ ) { InputDescriptionType input = ( InputDescriptionType ) selectedCustomFunction . getDataInputs ( ) . getInput ( ) . get ( index ) ; ProcessFunctionParameterValue value = new ProcessFunctionParameterValue ( ) ; value . name = input . getIdentifier ( ) . getValue ( ) ; getType ( input , value ) ; value . optional = isOptional ( input ) ; value . type = dataTypeMap . get ( value . dataType ) ; value . minOccurences = input . getMinOccurs ( ) . intValue ( ) ; value . maxOccurences = input . getMaxOccurs ( ) . intValue ( ) ; valueList . add ( value ) ; } } return valueList ; }


public boolean isIgnoreInactive  ( ) { return this . ignoreInactive ; }

Devuelve VERDADERO si los cuerpos inactivos deben ser ignorados.


public VideoGetAlbumsQuery ( VkApiClient client , UserActor actor ) { super ( client , "video.getAlbums" , GetAlbumsResponse . class ) ; accessToken ( actor . getAccessToken ( ) ) ; }

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


public static String convertUPCEtoUPCA  ( String upce ) { char [ ] upceChars = new char [ 6 ] ; upce . getChars ( 1 , 7 , upceChars , 0 ) ; StringBuilder result = new StringBuilder ( 12 ) ; result . append ( upce . charAt ( 0 ) ) ; char lastChar = upceChars [ 5 ] ; switch ( lastChar ) { case '0' : case '1' : case '2' : result . append ( upceChars , 0 , 2 ) ; result . append ( lastChar ) ; result . append ( "0000" ) ; result . append ( upceChars , 2 , 3 ) ; break ; case '3' : result . append ( upceChars , 0 , 3 ) ; result . append ( "00000" ) ; result . append ( upceChars , 3 , 2 ) ; break ; case '4' : result . append ( upceChars , 0 , 4 ) ; result . append ( "00000" ) ; result . append ( upceChars [ 4 ] ) ; break ; default : result . append ( upceChars , 0 , 5 ) ; result . append ( "0000" ) ; result . append ( lastChar ) ; break ; } result . append ( upce . charAt ( 7 ) ) ; return result . toString ( ) ; }

Amplía un valor UPC-E de nuevo en su valor de código UPC-A completo y equivalente.


public static BloomSpecification computeBloomSpec  ( int bucketsPerElement ) { assert bucketsPerElement >= 1 ; assert bucketsPerElement <= probs . length - 1 ; return new BloomSpecification ( optKPerBuckets [ bucketsPerElement ] , bucketsPerElement ) ; }

Dado el número de cubos que se pueden usar por elemento, devuelva una especificación que minimiza la tasa falsa positiva.


public boolean equals  ( Object other ) { if ( other == null ) return false ; if ( other == this ) return true ; if ( CPtr . class != other . getClass ( ) ) return false ; return peer == ( ( CPtr ) other ) . peer ; }

Compara este <código> CPTR </ código> en el objeto especificado.


public static Map < String , Object > searchDuplicatedAncestor  ( DispatchContext dctx , Map < String , ? extends Object > context ) { Map < String , Object > result = FastMap . newInstance ( ) ; Delegator delegator = dctx . getDelegator ( ) ; LocalDispatcher dispatcher = dctx . getDispatcher ( ) ; GenericValue userLogin = ( GenericValue ) context . get ( "userLogin" ) ; Locale locale = ( Locale ) context . get ( "locale" ) ; String productId = ( String ) context . get ( "productId" ) ; String productIdKey = ( String ) context . get ( "productIdTo" ) ; Timestamp fromDate = ( Timestamp ) context . get ( "fromDate" ) ; String bomType = ( String ) context . get ( "productAssocTypeId" ) ; if ( fromDate == null ) { fromDate = Timestamp . valueOf ( ( new Date ( ) ) . toString ( ) ) ; } GenericValue duplicatedProductAssoc = null ; try { duplicatedProductAssoc = BOMHelper . searchDuplicatedAncestor ( productId , productIdKey , bomType , fromDate , delegator , dispatcher , userLogin ) ; } catch ( GenericEntityException gee ) { return ServiceUtil . returnError ( UtilProperties . getMessage ( resource , "ManufacturingBomErrorRunningDuplicatedAncestorSearch" , UtilMisc . toMap ( "errorString" , gee . getMessage ( ) ) , locale ) ) ; } result . put ( "duplicatedProductAssoc" , duplicatedProductAssoc ) ; return result ; }

Devuelve el valor genérico de ProductAsoc para un antepasado de productos duplicados del producto si está presente, nulo de otra manera.Útil para evitar los bucles al agregar nuevas asociadas (componentes) a una factura de materiales.


public static SM_SYSTEM_MESSAGE STR_MSG_TOYPET_FEED_START_EATING  ( String value0 , String value1 ) { return new SM_SYSTEM_MESSAGE ( 1400616 , value0 , value1 ) ; }


private boolean hasNext  ( ) { return currentToken != null ; }


public CatchResult catchPokemon  ( double normalizedHitPosition , double normalizedReticleSize , double spinModifier , Pokeball type , int amount , int razberriesLimit ) throws LoginFailedException , RemoteServerException { Item razzberriesInventory = api . getInventories ( ) . getItemBag ( ) . getItem ( ItemId . ITEM_RAZZ_BERRY ) ; int razzberriesCountInventory = razzberriesInventory . getCount ( ) ; int razberries = 0 ; int numThrows = 0 ; CatchResult result ; if ( razzberriesCountInventory < razberriesLimit ) { razberriesLimit = razzberriesCountInventory ; } do { if ( ( razberries < razberriesLimit || razberriesLimit == - 1 ) && useItem ( ItemId . ITEM_RAZZ_BERRY ) . getSuccess ( ) ) { razberries ++ ; razzberriesCountInventory -- ; razzberriesInventory . setCount ( razzberriesCountInventory ) ; } result = AsyncHelper . toBlocking ( catchPokemonAsync ( normalizedHitPosition , normalizedReticleSize , spinModifier , type ) ) ; if ( result == null ) { Log . wtf ( TAG , "Got a null result after catch attempt" ) ; break ; } if ( result . getStatus ( ) == CatchStatus . CATCH_FLEE || result . getStatus ( ) == CatchStatus . CATCH_SUCCESS ) { Log . v ( TAG , "Pokemon caught/or flee" ) ; break ; } if ( result . getStatus ( ) == CatchStatus . CATCH_ERROR || result . getStatus ( ) == CatchStatus . UNRECOGNIZED ) { Log . wtf ( TAG , "Got an error or unrecognized catch attempt" ) ; Log . wtf ( TAG , "Proto:" + result ) ; break ; } numThrows ++ ; } while ( amount < 0 || numThrows < amount ) ; return result ; }


public PokemonGo ( OkHttpClient client , Time time , long seed ) { this . time = time ; this . seed = seed ; sessionHash = new byte [ 32 ] ; new Random ( ) . nextBytes ( sessionHash ) ; client = client . newBuilder ( ) . addNetworkInterceptor ( new ClientInterceptor ( ) ) . build ( ) ; requestHandler = new RequestHandler ( this , client ) ; map = new Map ( this ) ; longitude = Double . NaN ; latitude = Double . NaN ; altitude = Double . NaN ; }


private void trigger  ( int position , float positionOffset ) { CircleIndicator . this . mCurItemPosition = position ; CircleIndicator . this . mCurItemPositionOffset = positionOffset ; Log . e ( "CircleIndicator" , "onPageScrolled()" + position + ":" + positionOffset ) ; requestLayout ( ) ; invalidate ( ) ; }

¡Dispare a redibujar el indicador cuando el elemento seleccionado del viewpager cambió!


private boolean journalRebuildRequired  ( ) { final int REDUNDANT_OP_COMPACT_THRESHOLD = 2000 ; return redundantOpCount >= REDUNDANT_OP_COMPACT_THRESHOLD && redundantOpCount >= lruEntries . size ( ) ; }

Solo reconstruimos la revista cuando reducirá el tamaño del tamaño de la revista y eliminará al menos 2000 operadores.


static protected boolean isVowel  ( String phone ) { return VOWELS . indexOf ( phone . substring ( 0 , 1 ) ) != - 1 ; }

Determina si el teléfono dado es una vocal.


public boolean isJsInject  ( ) { return isOptionEnabled ( UrlFilterRuleOption . JS_INJECT ) ; }

No se inyecta a Adguard JavaScript en la página


public static RotateBitmapResult rotateBitmapByExif  ( Bitmap bitmap , Context context , Uri uri ) { try { File file = getFileFromUri ( context , uri ) ; if ( file . exists ( ) ) { ExifInterface ei = new ExifInterface ( file . getAbsolutePath ( ) ) ; return rotateBitmapByExif ( bitmap , ei ) ; } } catch ( Exception ignored ) { } return new RotateBitmapResult ( bitmap , 0 ) ; }

Gire la imagen dada leyendo el valor EXIV de la imagen (URI). <br> Si no se requiere rotación, la imagen no se girará. Se crea un nuevo mapa de bits y el viejo está reciclado.


protected static String appendLinkParams  ( String url , Object paramsObj ) throws IOException { if ( paramsObj == null ) { return url ; } String params = paramsObj . toString ( ) ; if ( params . isEmpty ( ) ) { return url ; } if ( params . startsWith ( "?" ) ) { url += params ; } else { url += "?" + params ; } return url ; }

Anexa los parámetros para las URL de catálogo.<P> Advertencia: esto actualmente asume que la URL no contiene paramantes, podría cambiar en el futuro


public static SM_SYSTEM_MESSAGE STR_SKILL_SUCC_MPAttack_Instant_A_TO_B  ( String skilltarget , int num0 , String skillcaster , String skillname ) { return new SM_SYSTEM_MESSAGE ( 1200992 , skilltarget , num0 , skillcaster , skillname ) ; }

[% SkillTarget] 's MP se redujo en% NUM0 porque [% Skillcaster] usó [% de habilidad].


public static SM_SYSTEM_MESSAGE STR_SKILL_SUCC_ProcATK_Instant_ME_TO_SELF  ( int num0 , String skillname ) { return new SM_SYSTEM_MESSAGE ( 1200390 , num0 , skillname ) ; }

Recibió% de daño NUM0 debido a [% de habilidad].


public void run  ( ) { filterMessageSender . connect ( ) ; }

El método que se ejecuta cuando se inicia el hilo.


public static double [ ] convolve_FD  ( final double [ ] signal1 , final double [ ] fft2 ) { if ( signal1 == null || fft2 == null ) throw new NullPointerException ( "Received null argument" ) ; if ( signal1 . length != fft2 . length ) throw new IllegalArgumentException ( "Arrays must be equal length" ) ; int N = signal1 . length ; assert MathUtils . isPowerOfTwo ( N ) ; double [ ] fft1 = new double [ N ] ; System . arraycopy ( signal1 , 0 , fft1 , 0 , N ) ; realTransform ( fft1 , false ) ; fft1 [ 0 ] = fft1 [ 0 ] * fft2 [ 0 ] ; fft1 [ 1 ] = fft1 [ 1 ] * fft2 [ 1 ] ; for ( int i = 2 ; i < N ; i += 2 ) { double tmp = fft1 [ i ] ; fft1 [ i ] = fft1 [ i ] * fft2 [ i ] - fft1 [ i + 1 ] * fft2 [ i + 1 ] ; fft1 [ i + 1 ] = tmp * fft2 [ i + 1 ] + fft1 [ i + 1 ] * fft2 [ i ] ; } realTransform ( fft1 , true ) ; return fft1 ; }

Calcule la convolución de dos señales, multiplicándolas en el dominio de frecuencia.Esta es una versión especializada del método central, que requiere dos señales de igual longitud, que debe ser una potencia de dos, y no verificar la contaminación derivada de la periodicidad asumida de ambas señales.En esta versión, la primera señal se proporciona en el dominio de tiempo, mientras que el segundo ya se transforma en el dominio de frecuencia.


public void updateUnreadLabel  ( ) { int count = getUnreadMsgCountTotal ( ) ; if ( count > 0 ) { unreadLabel . setText ( String . valueOf ( count ) ) ; unreadLabel . setVisibility ( View . VISIBLE ) ; } else { unreadLabel . setVisibility ( View . INVISIBLE ) ; } }

Actualizar el conteo de mensajes no leídos


public void removeCookie  ( String url ) { cookieJar . remove ( url ) ; }

Este método permite eliminar la cookie de autenticación en caché para una URL dada


@ Override public Grammar [ ] retrieveInitialGrammarSet  ( String grammarType ) { Grammar [ ] grammars = super . retrieveInitialGrammarSet ( grammarType ) ; if ( grammars != null ) return grammars ; return fGrammarPool . retrieveInitialGrammarSet ( grammarType ) ; }

Recupere el conjunto inicial de gramáticas para que el validador funcione con.Revisit: ¿Es necesario sincronizar esto ya que está leyendo?


protected String insertSyllable  ( Item syllableItem , Element token , boolean deep ) { if ( syllableItem == null || token == null ) { throw new NullPointerException ( "Null arguments to insertSyllable()" ) ; } if ( ! token . getTagName ( ) . equals ( MaryXML . TOKEN ) ) { throw new IllegalArgumentException ( "Syllables can only be inserted in <t> elements" ) ; } Document doc = token . getOwnerDocument ( ) ; Element syllable = null ; StringBuilder sampa = new StringBuilder ( ) ; if ( deep ) { syllable = MaryXML . createElement ( doc , MaryXML . SYLLABLE ) ; token . appendChild ( syllable ) ; } if ( syllableItem . getFeatures ( ) . isPresent ( "accent" ) ) { String accentString = syllableItem . getFeatures ( ) . getString ( "accent" ) ; if ( deep ) syllable . setAttribute ( "accent" , accentString ) ; token . setAttribute ( "accent" , accentString ) ; } if ( syllableItem . getFeatures ( ) . isPresent ( "stress" ) ) { String stressString = syllableItem . getFeatures ( ) . getString ( "stress" ) ; if ( ! stressString . equals ( "0" ) ) { if ( deep ) syllable . setAttribute ( "stress" , stressString ) ; if ( stressString . equals ( "1" ) ) sampa . append ( "'" ) ; else if ( stressString . equals ( "2" ) ) sampa . append ( "," ) ; } } Item segmentItem = syllableItem . getDaughter ( ) ; while ( segmentItem != null ) { if ( sampa . length ( ) > 0 ) sampa . append ( " " ) ; sampa . append ( insertSegment ( segmentItem , syllable , deep ) ) ; segmentItem = segmentItem . getNext ( ) ; } String sampaString = sampa . toString ( ) ; if ( deep ) syllable . setAttribute ( "ph" , sampaString ) ; if ( syllableItem . getFeatures ( ) . isPresent ( "endtone" ) && ! tokenItemHasFollowingBoundary ( syllableItem . getParent ( ) . getItemAs ( Relation . TOKEN ) . getParent ( ) ) ) { String endtone = syllableItem . getFeatures ( ) . getString ( "endtone" ) ; if ( ! endtone . equals ( "" ) ) { Element boundary = MaryXML . createElement ( doc , MaryXML . BOUNDARY ) ; boundary . setAttribute ( "tone" , endtone ) ; boundary . setAttribute ( "breakindex" , "4" ) ; boundary . setAttribute ( "duration" , "200" ) ; token . getParentNode ( ) . appendChild ( boundary ) ; } } return sampaString ; }

Convierta un elemento en la relación una sílaba en XML, insertándolo en la ubicación especificada en el árbol XML.


public boolean isClassSuperclassOfIncluding  ( SootClass parent , SootClass possibleChild ) { parent . checkLevel ( SootClass . HIERARCHY ) ; possibleChild . checkLevel ( SootClass . HIERARCHY ) ; return getSubclassesOfIncluding ( parent ) . contains ( possibleChild ) ; }

Devuelve VERDADERO si el padre es, o es una superclase, POSSIBLECHILL.


public NGramCorrelationForm ( ) { initComponents  ( ) ; }

Crea nueva forma de ngramcorrelationform


public V put  ( R rowKey , C columnKey , V value ) { if ( rowKey != null && columnKey != null ) { Map < C , V > row = row ( rowKey ) ; if ( row == null ) { row = new HashMap < > ( ) ; dataMap . put ( rowKey , row ) ; } V oldValue = row . get ( columnKey ) ; row . put ( columnKey , value ) ; if ( oldValue != null ) return oldValue ; else return value ; } return null ; }


public boolean drawShadows  ( ) { return drawShadows ; }


public boolean adjustValue  ( K key , long amount ) { int index = index ( key ) ; if ( index < 0 ) { return false ; } else { _values [ index ] += amount ; return true ; } }

Ajusta el valor primitivo asignado a la tecla.


protected VideoGetTagsQuery videoId  ( int value ) { return unsafeParam ( "video_id" , value ) ; }


public SwitchPreference ( Context context ) { this ( context , null ) ; }

Construya una nueva pantalla de interrupciones con las opciones de estilo predeterminadas.


@ Override public void saveSLDData  ( SLDDataInterface sldData ) { boolean saved = false ; for ( ExtensionInterface extension : extensionList ) { if ( saved == false ) { saved = extension . save ( sldData ) ; } } }


protected void moveToBackup  ( ) { beforeSpaceModeChange ( SpaceMode . BACKUP ) ; setSpaceMode ( SpaceMode . BACKUP ) ; afterSpaceModeChange ( SpaceMode . BACKUP ) ; }

Cambiar el modo de espacio a la copia de seguridad


public Grammar parseGrammar  ( String type , String uri ) throws XNIException , IOException { XMLInputSource source = new XMLInputSource ( null , uri , null ) ; return parseGrammar ( type , source ) ; }

Analice una gramática de una ubicación identificada por un URI.Este método también agrega esta gramática al XMLGrammarPool.


private void extendTail  ( int count ) { if ( terminated || count < 1 ) { return ; } while ( -- count >= 0 ) { final Slot inserted = insertSlotAt ( size , lastSlot ) ; inserted . withTags ( TAG_EXTENSION ) ; } }

Inserta las ranuras en la máscara y marque la ranura recién insertada como 'extensión' (cola extendida de la máscara no terminada).Las ranuras 'extendidas' se eliminarán cuando se eliminan sus valores.


private void updateAfterDisbandLegion  ( Legion legion ) { for ( Player onlineLegionMember : legion . getOnlineLegionMembers ( ) ) { PacketSendUtility . broadcastPacket ( onlineLegionMember , new SM_LEGION_UPDATE_TITLE ( onlineLegionMember . getObjectId ( ) , 0 , "" , 0 ) , true ) ; PacketSendUtility . sendPacket ( onlineLegionMember , new SM_LEGION_LEAVE_MEMBER ( 1300302 , 0 , legion . getLegionName ( ) ) ) ; onlineLegionMember . resetLegionMember ( ) ; } }

Este método eliminará la Legión de todos los miembros de Legión en línea después de que una Legión haya sido disuelta


public boolean isExplain  ( ) { return isExplain ; }

Devuelve VERDADERO si la consulta es una declaración de explicación.


@ GET @ Path ( "{table}" ) @ RequiresPermissions ( "blob|read|{table}" ) @ Timed ( name = "bv.emodb.blob.BlobStoreResource1.scanMetadata" , absolute = true ) @ ApiOperation ( value = "Retrieves a list of content items in a particular table." , notes = "Retuns BlobMetadata." , response = BlobMetadata . class ) public Iterator < BlobMetadata > scanMetadata  ( @ PathParam ( "table" ) String table , @ QueryParam ( "from" ) String blobId , @ QueryParam ( "limit" ) @ DefaultValue ( "10" ) LongParam limit ) { return streamingIterator ( _blobStore . scanMetadata ( table , Strings . emptyToNull ( blobId ) , limit . get ( ) ) ) ; }

Recupera una lista de elementos de contenido en una tabla en particular.


private static boolean hasSelfPermission  ( Context context , String permission ) { switch ( Build . MANUFACTURER ) { case "Xiaomi" : { return checkSelfPermissionForXiaomi ( context , permission ) ; } default : { try { return checkSelfPermission ( context , permission ) == PackageManager . PERMISSION_GRANTED ; } catch ( RuntimeException t ) { return false ; } } } }

Determinar el contexto tiene acceso al permiso dado.<P> Esta es una solución para RunTimeException of Parcel # ReaxException.Para obtener más detalles, marque este problema https://github.com/hotchemi/permissionsdispatcher/issues/107


public long readLong  ( ) { return scanner . nextLong ( ) ; }

Lee el siguiente token de este flujo de entrada, lo analiza como un <tt> long </ tt> y devuelve el <tt> long </ tt>.


public static String u8  ( long v ) { char [ ] result = new char [ 16 ] ; for ( int i = 0 ; i < 16 ; i ++ ) { result [ 15 - i ] = Character . forDigit ( ( int ) v & 0x0f , 16 ) ; v >>= 4 ; } return new String ( result ) ; }

Formatos A <CÓDIGO> LARGO </ CÓDIGO> Como valor hexagonal sin signo de 8 bytes.


public Record updateRecord  ( List < DataType > values , RecordID rid ) throws DatabaseException { return null ; }

Actualizar un registro existente con nuevos valores.Asegúrese de actualizar esto.stats según sea necesario.


public boolean optimizeScanForSingleObject  ( ) { return true ; }

Devuelve verdadero si podemos guardar la creación del iterador y obtener una sola entrada


@ Override public Result decode  ( BinaryBitmap image ) throws NotFoundException , FormatException , ChecksumException { return decode ( image , null ) ; }

Localiza y decodifica un código PDF417 en una imagen.


public void collectTags  ( SootClass sc , boolean includeBodies ) { collectClassTags ( sc ) ; for ( SootField sf : sc . getFields ( ) ) { collectFieldTags ( sf ) ; } for ( SootMethod sm : sc . getMethods ( ) ) { collectMethodTags ( sm ) ; if ( ! includeBodies || ! sm . hasActiveBody ( ) ) continue ; Body b = sm . getActiveBody ( ) ; collectBodyTags ( b ) ; } }

Recoge las etiquetas de todos los campos y métodos de <código> SC </ CODE>.Si <CÓDIGO> incluyebodies </ code> es verdadero, las etiquetas también se recopilan de los organismos de método.


private RequestLog ( ) { logId = null ; info = null ; mostRecentTimer = null ; times = new LinkedHashMap < > ( ) ; threadIds = new LinkedHashSet < > ( ) ; mapper . registerModule ( ( new JodaModule ( ) ) . addSerializer ( Interval . class , new ToStringSerializer ( ) ) ) ; mapper . registerModule ( new Jdk8Module ( ) . configureAbsentsAsNulls ( false ) ) ; MDC . remove ( ID_KEY ) ; }

Esta clase tiene solo métodos estáticos y se supone que no debe estar directamente instanciada.


public static BigInteger pow  ( final BigInteger k , BigInteger e ) throws IllegalArgumentException { if ( e . compareTo ( BigInteger . ZERO ) < 0 ) { throw MathRuntimeException . createIllegalArgumentException ( "cannot raise an integral value to a negative power ({0}^{1})" , k , e ) ; } BigInteger result = BigInteger . ONE ; BigInteger k2p = k ; while ( ! BigInteger . ZERO . equals ( e ) ) { if ( e . testBit ( 0 ) ) { result = result . multiply ( k2p ) ; } k2p = k2p . multiply ( k2p ) ; e = e . shiftRight ( 1 ) ; } return result ; }

Levante un biginteger a un poder de Biginteger.


void receiveDeletedText  ( CharacterDataImpl node , int offset , int count ) { if ( node == null ) return ; if ( fDeleteNode == node ) return ; if ( node == fStartContainer ) { if ( fStartOffset > offset + count ) { fStartOffset = offset + ( fStartOffset - ( offset + count ) ) ; } else if ( fStartOffset > offset ) { fStartOffset = offset ; } } if ( node == fEndContainer ) { if ( fEndOffset > offset + count ) { fEndOffset = offset + ( fEndOffset - ( offset + count ) ) ; } else if ( fEndOffset > offset ) { fEndOffset = offset ; } } }

Esta función se llama desde DOM.El texto ya se ha insertado.Corrección de cualquier compensación.


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

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


public V remove  ( int key ) { V prev = null ; int index = index ( key ) ; if ( index >= 0 ) { prev = _values [ index ] ; removeAt ( index ) ; } return prev ; }

Borra un par de claves / valor del mapa.


public CronExpression ( String cronExpression , ClockReader clockReader ) throws ParseException { if ( cronExpression == null ) { throw new IllegalArgumentException ( "cronExpression cannot be null" ) ; } this . clockReader = clockReader ; this . cronExpression = cronExpression . toUpperCase ( Locale . US ) ; buildExpression ( this . cronExpression ) ; }

Construye un nuevo <código> CronexPression </ Code> basado en el parámetro especificado.


public static File extractArchive  ( File archive , File destination ) { File directory = getUniqueFile ( destination , archive . getName ( ) ) ; ZipFile zipFile = null ; try { prepareDirectory ( directory ) ; zipFile = new ZipFile ( archive ) ; Enumeration < ? extends ZipEntry > entries = zipFile . entries ( ) ; while ( entries . hasMoreElements ( ) ) { ZipEntry entry = entries . nextElement ( ) ; FileOutputStream fos = null ; InputStream is = null ; try { is = zipFile . getInputStream ( entry ) ; fos = new FileOutputStream ( new File ( directory , entry . getName ( ) ) ) ; int bytes ; byte [ ] packet = new byte [ COPY_PACKET_SIZE ] ; while ( ( bytes = is . read ( packet , 0 , COPY_PACKET_SIZE ) ) != - 1 ) fos . write ( packet , 0 , bytes ) ; } finally { try { if ( fos != null ) fos . close ( ) ; } catch ( Exception e ) { LOGGER . log ( Level . SEVERE , "Problem closing extracted file stream" , e ) ; } try { if ( is != null ) is . close ( ) ; } catch ( Exception e ) { LOGGER . log ( Level . SEVERE , "Problem closing zipentry stream" , e ) ; } } } } catch ( Exception e ) { LOGGER . log ( Level . SEVERE , "Error extracting archive" , e ) ; return null ; } finally { try { if ( zipFile != null ) zipFile . close ( ) ; } catch ( Exception e ) { LOGGER . log ( Level . SEVERE , "Problem closing archive" , e ) ; } } return directory ; }

Extractos Dados el archivo ZIP, devuelve el directorio extraído.Actualmente no admite la extracción de subdirectorios, (solo extrae archivos Toplevel).


public InputStreamInputSplit ( InputStream is , File path ) { this . is = is ; this . location = new URI [ ] { path . toURI ( ) } ; }

Instantiate con el archivo dado como uri.


public FileWriterWithEncoding ( File file , String encoding , boolean append ) throws IOException { super ( ) ; this . out = initWriter ( file , encoding , append ) ; }

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


public Type buildArrayOrAddDimension  ( Type type ) { if ( type instanceof ArrayType ) { ArrayType array = ( ArrayType ) type ; return array . makeArrayType ( ) ; } else return ArrayType . v ( type , 1 ) ; }

Construye una nueva matriz del tipo dado si es un tipo de base o incrementa las dimensiones de la matriz dada en 1 de lo contrario.


public void deleteDirectory  ( String path ) throws IllegalStateException , IOException , FTPIllegalReplyException , FTPException  { synchronized ( lock ) { if ( ! connected ) { throw new IllegalStateException ( "Client not connected" ) ; } if ( ! authenticated ) { throw new IllegalStateException ( "Client not authenticated" ) ; } communication . sendFTPCommand ( "RMD " + path ) ; FTPReply r = communication . readFTPReply ( ) ; touchAutoNoopTimer ( ) ; if ( ! r . isSuccessCode ( ) ) { throw new FTPException ( r ) ; } } }

Este método elimina un directorio remoto.


@ SuppressLint ( "DefaultLocale" ) public static String doublePrecision  ( int time ) { return String . format ( "%02d" , time ) ; }

Cubiertas int a caden con precisión a dos lugares.


private boolean isContainedInRectangles  ( SegmentNode pnew ) { SegmentNode p = header [ GeometricManager . MANY_TO_MANY ] ; while ( p != null ) { if ( pnew . I1 >= p . I1 && pnew . I2 >= p . I2 ) { if ( ( pnew . I1 + pnew . L ) <= ( p . I1 + p . L ) && ( pnew . I2 + pnew . L ) <= ( p . I2 + ( ( RectangleNode ) p ) . L_prime ) ) return true ; } p = p . next ; } return false ; }

¿Está la línea de entrada cubierta por cualquier rectángulo?


public void drawAsOneDot  ( String prefix , String name ) { DotGraph dot = new DotGraph ( name ) ; dot . setGraphLabel ( name ) ; dot . setGraphAttribute ( "compound" , "true" ) ; dot . setGraphAttribute ( "rankdir" , "LR" ) ; Map < Unit , Integer > node = new HashMap < Unit , Integer > ( ) ; int id = 0 ; Iterator it = graph . iterator ( ) ; while ( it . hasNext ( ) ) { Unit stmt = ( Unit ) it . next ( ) ; PurityGraphBox ref = ( PurityGraphBox ) getFlowAfter ( stmt ) ; DotGraph sub = dot . createSubGraph ( "cluster" + id ) ; DotGraphNode label = sub . drawNode ( "head" + id ) ; String lbl = stmt . toString ( ) ; if ( lbl . startsWith ( "lookupswitch" ) ) lbl = "lookupswitch..." ; if ( lbl . startsWith ( "tableswitch" ) ) lbl = "tableswitch..." ; sub . setGraphLabel ( " " ) ; label . setLabel ( lbl ) ; label . setAttribute ( "fontsize" , "18" ) ; label . setShape ( "box" ) ; ref . g . fillDotGraph ( "X" + id , sub ) ; node . put ( stmt , new Integer ( id ) ) ; id ++ ; } it = graph . iterator ( ) ; while ( it . hasNext ( ) ) { Object src = it . next ( ) ; Iterator itt = graph . getSuccsOf ( src ) . iterator ( ) ; while ( itt . hasNext ( ) ) { Object dst = itt . next ( ) ; DotGraphEdge edge = dot . drawEdge ( "head" + node . get ( src ) , "head" + node . get ( dst ) ) ; edge . setAttribute ( "ltail" , "cluster" + node . get ( src ) ) ; edge . setAttribute ( "lhead" , "cluster" + node . get ( dst ) ) ; } } File f = new File ( SourceLocator . v ( ) . getOutputDir ( ) , prefix + name + DotGraph . DOT_EXTENSION ) ; dot . plot ( f . getPath ( ) ) ; }

Dibuje el resultado del análisis intra-procesal como un archivo de punto grande, denominado ClassName.MethodName.dot, que contiene un gráfico de pureza para cada declaración en el método.


public int read  ( long position , InputReader reader , int classId ) throws IOException { reader . seek ( position ) ; map2Weight . clear ( ) ; final int numberOfClasses = reader . readInt ( ) ; for ( int i = 0 ; i < numberOfClasses ; i ++ ) { final int currentId = reader . readInt ( ) ; final int weight = reader . readInt ( ) ; final int count = reader . readInt ( ) ; reader . skipBytes ( count * 8 ) ; if ( currentId == classId ) { map2Weight . put ( currentId , weight ) ; break ; } } return map2Weight . size ( ) ; }

Lee el bloque de clasificación con nombre


public static Map < String , Object > generateReqsFromCancelledPOItems  ( DispatchContext dctx , Map < String , ? extends Object > context ) { Delegator delegator = dctx . getDelegator ( ) ; LocalDispatcher dispatcher = dctx . getDispatcher ( ) ; GenericValue userLogin = ( GenericValue ) context . get ( "userLogin" ) ; Locale locale = ( Locale ) context . get ( "locale" ) ; String orderId = ( String ) context . get ( "orderId" ) ; String facilityId = ( String ) context . get ( "facilityId" ) ; try { GenericValue orderHeader = EntityQuery . use ( delegator ) . from ( "OrderHeader" ) . where ( "orderId" , orderId ) . queryOne ( ) ; if ( UtilValidate . isEmpty ( orderHeader ) ) { String errorMessage = UtilProperties . getMessage ( resource_error , "OrderErrorOrderIdNotFound" , UtilMisc . toMap ( "orderId" , orderId ) , locale ) ; Debug . logError ( errorMessage , module ) ; return ServiceUtil . returnError ( errorMessage ) ; } if ( ! "PURCHASE_ORDER" . equals ( orderHeader . getString ( "orderTypeId" ) ) ) { String errorMessage = UtilProperties . getMessage ( resource_error , "ProductErrorOrderNotPurchaseOrder" , UtilMisc . toMap ( "orderId" , orderId ) , locale ) ; Debug . logError ( errorMessage , module ) ; return ServiceUtil . returnError ( errorMessage ) ; } Map < String , Object > productRequirementQuantities = new HashMap < String , Object > ( ) ; List < GenericValue > orderItems = orderHeader . getRelated ( "OrderItem" , null , null , false ) ; for ( GenericValue orderItem : orderItems ) { if ( ! "PRODUCT_ORDER_ITEM" . equals ( orderItem . getString ( "orderItemTypeId" ) ) ) continue ; BigDecimal orderItemCancelQuantity = BigDecimal . ZERO ; if ( ! UtilValidate . isEmpty ( orderItem . get ( "cancelQuantity" ) ) ) { orderItemCancelQuantity = orderItem . getBigDecimal ( "cancelQuantity" ) ; } if ( orderItemCancelQuantity . compareTo ( BigDecimal . ZERO ) <= 0 ) continue ; String productId = orderItem . getString ( "productId" ) ; if ( productRequirementQuantities . containsKey ( productId ) ) { orderItemCancelQuantity = orderItemCancelQuantity . add ( ( BigDecimal ) productRequirementQuantities . get ( productId ) ) ; } productRequirementQuantities . put ( productId , orderItemCancelQuantity ) ; } for ( String productId : productRequirementQuantities . keySet ( ) ) { BigDecimal requiredQuantity = ( BigDecimal ) productRequirementQuantities . get ( productId ) ; Map < String , Object > createRequirementResult = dispatcher . runSync ( "createRequirement" , UtilMisc . < String , Object > toMap ( "requirementTypeId" , "PRODUCT_REQUIREMENT" , "facilityId" , facilityId , "productId" , productId , "quantity" , requiredQuantity , "userLogin" , userLogin ) ) ; if ( ServiceUtil . isError ( createRequirementResult ) ) return createRequirementResult ; } } catch ( GenericEntityException e ) { Debug . logError ( e , module ) ; return ServiceUtil . returnError ( e . getMessage ( ) ) ; } catch ( GenericServiceException se ) { Debug . logError ( se , module ) ; return ServiceUtil . returnError ( se . getMessage ( ) ) ; } return ServiceUtil . returnSuccess ( ) ; }

Genera un requisito de producto para la cantidad cancelada total sobre todos los artículos de pedido para cada producto


public byte readByte  ( ) throws IOException  { return dis . readByte ( ) ; }


Crea una nueva unidad de equipo Eliminar evento Esto se usa internamente.


private static void toText  ( ByteBuffer data , StringBuilder result , int cnt ) { int charPos = data . position ( ) - cnt ; for ( int a = 0 ; a < cnt ; a ++ ) { int c = data . get ( charPos ++ ) ; if ( c > 0x1f && c < 0x80 ) { result . append ( ( char ) c ) ; } else { result . append ( '.' ) ; } } }

Obtiene la última <tt> CNT </ TT> Lea bytes de la <tt> data </ tt> buffer y coloca en el búfer </ tt> en formato especial: <ul> <li> Si el byte representa a Char departición 0x1F a 0x80 (que son caracteres ASCII normales) Luego, se coloca en tampón, ya que es </ li> <li>, de lo contrario, se coloca en búfer </ li> </ ul>


public float [ ] toFloatArray  ( ) { float [ ] faRes = new float [ 3 ] ; faRes [ 0 ] = ( float ) ValueSimilarity ; faRes [ 1 ] = ( float ) ContainmentSimilarity ; faRes [ 2 ] = ( float ) SizeSimilarity ; return faRes ; }

Devuelve una matriz de flotadores de 3 elementos correspondiente a los aspectos de la implanda.


public static List < Integer > createColors  ( int [ ] colors ) { List < Integer > result = new ArrayList < Integer > ( ) ; for ( int i : colors ) { result . add ( i ) ; } return result ; }

Convierte una matriz de colores (valores de color entero) en un conjunto de colores.


private static BitMatrix bitMatrixFromEncoder  ( PDF417 encoder , String contents , int errorCorrectionLevel , int width , int height , int margin ) throws WriterException { encoder . generateBarcodeLogic ( contents , errorCorrectionLevel ) ; int aspectRatio = 4 ; byte [ ] [ ] originalScale = encoder . getBarcodeMatrix ( ) . getScaledMatrix ( 1 , aspectRatio ) ; boolean rotated = false ; if ( ( height > width ) ^ ( originalScale [ 0 ] . length < originalScale . length ) ) { originalScale = rotateArray ( originalScale ) ; rotated = true ; } int scaleX = width / originalScale [ 0 ] . length ; int scaleY = height / originalScale . length ; int scale ; if ( scaleX < scaleY ) { scale = scaleX ; } else { scale = scaleY ; } if ( scale > 1 ) { byte [ ] [ ] scaledMatrix = encoder . getBarcodeMatrix ( ) . getScaledMatrix ( scale , scale * aspectRatio ) ; if ( rotated ) { scaledMatrix = rotateArray ( scaledMatrix ) ; } return bitMatrixFrombitArray ( scaledMatrix , margin ) ; } return bitMatrixFrombitArray ( originalScale , margin ) ; }

Toma el codificador, explica la anchura / altura, y recupera la matriz de bits


private void acquire  ( ) throws IOException  { char [ ] four = new char [ 4 ] ; int i = 0 ; do { int b = inputStream . read ( ) ; if ( b == - 1 ) { if ( i != 0 ) { throw new IOException ( "Bad base64 stream" ) ; } else { buffer = new int [ 0 ] ; eof = true ; return ; } } char c = ( char ) b ; if ( Base64 . chars . indexOf ( c ) != - 1 || c == Base64 . pad ) { four [ i ++ ] = c ; } else if ( c != '\r' && c != '\n' ) { throw new IOException ( "Bad base64 stream" ) ; } } while ( i < 4 ) ; boolean padded = false ; for ( i = 0 ; i < 4 ; i ++ ) { if ( four [ i ] != Base64 . pad ) { if ( padded ) { throw new IOException ( "Bad base64 stream" ) ; } } else { if ( ! padded ) { padded = true ; } } } int l ; if ( four [ 3 ] == Base64 . pad ) { if ( inputStream . read ( ) != - 1 ) { throw new IOException ( "Bad base64 stream" ) ; } eof = true ; if ( four [ 2 ] == Base64 . pad ) { l = 1 ; } else { l = 2 ; } } else { l = 3 ; } int aux = 0 ; for ( i = 0 ; i < 4 ; i ++ ) { if ( four [ i ] != Base64 . pad ) { aux = aux | ( Base64 . chars . indexOf ( four [ i ] ) << ( 6 * ( 3 - i ) ) ) ; } } buffer = new int [ l ] ; for ( i = 0 ; i < l ; i ++ ) { buffer [ i ] = ( aux >>> ( 8 * ( 2 - i ) ) ) & 0xFF ; } }

Lee desde la corriente subyacente, decodifica los datos y pone los bytes descodificados en el búfer.


public void resourceCopied  ( ISVNRemoteResource source , ISVNRemoteFolder destination ) { Iterator it = listeners . iterator ( ) ; while ( it . hasNext ( ) ) { IRepositoryListener listener = ( IRepositoryListener ) it . next ( ) ; listener . remoteResourceCopied ( source , destination ) ; } }


public boolean isSimpleTypeOrSimpleObject  ( final Field field ) { Class < ? > type = field . getType ( ) ; boolean simpleType = ( type . isAssignableFrom ( Short . class ) || type . isAssignableFrom ( Short . TYPE ) || type . isAssignableFrom ( Integer . class ) || type . isAssignableFrom ( Integer . TYPE ) || type . isAssignableFrom ( Float . class ) || type . isAssignableFrom ( Float . TYPE ) || type . isAssignableFrom ( Double . class ) || type . isAssignableFrom ( Double . TYPE ) || type . isAssignableFrom ( Long . class ) || type . isAssignableFrom ( Long . TYPE ) || type . isAssignableFrom ( Byte . class ) || type . isAssignableFrom ( Byte . TYPE ) || type . isAssignableFrom ( Character . class ) || type . isAssignableFrom ( Character . TYPE ) || type . isAssignableFrom ( Boolean . class ) || type . isAssignableFrom ( Boolean . TYPE ) || type . isAssignableFrom ( String . class ) ) || type . isEnum ( ) ; return simpleType ; }

Comprueba si el campo proporcionado es un campo de tipo simple o un objeto como este.


public static SM_SYSTEM_MESSAGE STR_MSG_ASK_OTHER_HAS_LOGOUT  ( String value0 ) { return new SM_SYSTEM_MESSAGE ( 1300148 , value0 ) ; }


public static void checkArgument  ( boolean expression , @ Nullable String errorMessageTemplate , @ Nullable Object ... errorMessageArgs ) { if ( ! expression ) { throw new IllegalArgumentException ( format ( errorMessageTemplate , errorMessageArgs ) ) ; } }

Asegura la verdad de una expresión que involucre uno o más parámetros al método de llamada.


public FriendsGetRequestsQueryWithExtended offset  ( Integer value ) { return unsafeParam ( "offset" , value ) ; }

Offset se necesita para devolver un subconjunto específico de solicitudes de amistad.


protected MarketAddQuery name  ( String value ) { return unsafeParam ( "name" , value ) ; }


public PhotosCreateCommentQuery fromGroup  ( Boolean value ) { return unsafeParam ( "from_group" , value ) ; }


public ModelMenuItem mergeOverrideModelMenuItem  ( ModelMenuItem overrideMenuItem , BuildArgs buildArgs ) { return new ModelMenuItem ( this , overrideMenuItem , buildArgs ) ; }

Fusiona los artículos.<P> Scipio: modificado para una mejor clonación en profundidad.<p> NOTA: Las referencias se toman siempre de Overrideremenuitem.


@ Override public InputSource resolveEntity  ( String publicId , String systemId ) { allowXMLCatalogPI = false ; String resolved = catalogResolver . getResolvedEntity ( publicId , systemId ) ; if ( resolved == null && piCatalogResolver != null ) { resolved = piCatalogResolver . getResolvedEntity ( publicId , systemId ) ; } if ( resolved != null ) { try { InputSource iSource = new InputSource ( resolved ) ; iSource . setPublicId ( publicId ) ; URL url = new URL ( resolved ) ; InputStream iStream = url . openStream ( ) ; iSource . setByteStream ( iStream ) ; return iSource ; } catch ( Exception e ) { catalogManager . debug . message ( 1 , "Failed to create InputSource (" + e . toString ( ) + ")" , resolved ) ; return null ; } } else { return null ; } }

Implementa el método <código> de la resolución </ código> para la interfaz SAX, utilizando un catalogreolver subyacente para hacer el trabajo real.


public static int createAndLinkProgram  ( final int vertexShaderHandle , final int fragmentShaderHandle , final String [ ] attributes ) { int programHandle = GLES20 . glCreateProgram ( ) ; if ( programHandle != 0 ) { GLES20 . glAttachShader ( programHandle , vertexShaderHandle ) ; GLES20 . glAttachShader ( programHandle , fragmentShaderHandle ) ; if ( attributes != null ) { final int size = attributes . length ; for ( int i = 0 ; i < size ; i ++ ) { GLES20 . glBindAttribLocation ( programHandle , i , attributes [ i ] ) ; } } GLES20 . glLinkProgram ( programHandle ) ; final int [ ] linkStatus = new int [ 1 ] ; GLES20 . glGetProgramiv ( programHandle , GLES20 . GL_LINK_STATUS , linkStatus , 0 ) ; if ( linkStatus [ 0 ] == 0 ) { Log . e ( TAG , "Error compiling program: " + GLES20 . glGetProgramInfoLog ( programHandle ) ) ; GLES20 . glDeleteProgram ( programHandle ) ; programHandle = 0 ; } } if ( programHandle == 0 ) { throw new RuntimeException ( "Error creating program." ) ; } return programHandle ; }

Función auxiliar para compilar y vincular un programa.


protected MarketSearchQueryWithExtended ownerId  ( int value ) { return unsafeParam ( "owner_id" , value ) ; }

Identificador de una comunidad de propietario de artículos


public static float calculateHeight  ( float width , float targetAspectRatio ) { return width / targetAspectRatio ; }

Calcula la altura de un rectángulo dados los bordes izquierdo y derecho y una relación de aspecto.


public SM_AUTH_GG ( int sessionId ) { super ( 0x0b ) ; this . sessionId = sessionId ; }

Construye nueva instancia de <tt> sm_auth_gg </ tt> paquete


public void writeInt  ( int a ) throws IOException  { outs . write ( ( byte ) ( a ) ) ; outs . write ( ( byte ) ( a >> 8 ) ) ; outs . write ( ( byte ) ( a >> 16 ) ) ; outs . write ( ( byte ) ( a >> 24 ) ) ; }


@ NotNull public NlConfigurationToolbarFixture requireApi  ( int apiLevel ) { Wait . seconds ( 30 ) . expecting ( "configuration to be updated" ) . until ( null ) ; return this ; }

Requiere que el nivel API sea el nivel de API dado


protected void processThermostatFanModeReport  ( SerialMessage serialMessage , int offset , int endpoint ) throws ZWaveSerialMessageException { int value = serialMessage . getMessagePayloadByte ( offset + 1 ) ; logger . debug ( "NODE {}: Thermostat Fan Mode report value = {}" , this . getNode ( ) . getNodeId ( ) , value ) ; FanModeType fanModeType = FanModeType . getFanModeType ( value ) ; if ( fanModeType == null ) { logger . error ( "NODE {}: Unknown Fan Mode Type = {}, ignoring report." , this . getNode ( ) . getNodeId ( ) , value ) ; return ; } if ( ! fanModeTypes . contains ( fanModeType ) ) { fanModeTypes . add ( fanModeType ) ; } dynamicDone = true ; logger . debug ( "NODE {}: Thermostat Fan Mode Report value = {}" , this . getNode ( ) . getNodeId ( ) , fanModeType . getLabel ( ) ) ; ZWaveCommandClassValueEvent zEvent = new ZWaveCommandClassValueEvent ( this . getNode ( ) . getNodeId ( ) , endpoint , this . getCommandClass ( ) , value ) ; this . getController ( ) . notifyEventListeners ( zEvent ) ; }

Procesa un mensaje termostat_fan_mode_report.


@ Override public void onClick  ( View view ) { switch ( view . getId ( ) ) { case R . id . container_loading_view_mini_retryButton : photosPresenter . initRefresh ( getContext ( ) ) ; break ; } }


public PageLabel ( String label , int s , int n , int seq ) { this . label = label ; this . s = s ; this . n = n ; this . seq = seq ; }

Instantánea una nueva etiqueta de página.


public boolean isSelected  ( ) { ClusterViewer viewer = getViewer ( ) ; return viewer . getDataType ( ) . equalsIgnoreCase ( "KEGG" ) ; }


public void addSoundEvent  ( State event , int resId ) { mSoundMap . put ( event , resId ) ; }

Establezca los sonidos que se reproducen cuando ocurre un evento de tracción.Usted especifica qué sonido se reproduce para qué eventos llamando a este método varias veces para cada evento.<p /> Si ya ha establecido un sonido para un evento determinado, y agregue otro sonido para ese evento, solo se reproducirá el nuevo sonido.


public SourceAsset sendSourceAsset  ( SourceAsset sourceAsset ) { return authenticatedRestTemplate . postForObject ( getBasePathForEntity ( ) , sourceAsset , SourceAsset . class ) ; }

Envíe el activo de origen al servidor e inicie el proceso de extracción.


public synchronized void flush  ( ) throws IOException  { checkNotClosed ( ) ; trimToSize ( ) ; journalWriter . flush ( ) ; }

Forzar las operaciones tamponadas al sistema de archivos.


public void onStop  ( final FileAlterationObserver observer ) { }

Observador del sistema de archivos terminó el evento de comprobación.


public void press  ( int mask ) { controller . mousePress ( mask ) ; }


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 Builder color  ( String color ) { this . color = color ; return this ; }

Color del trazo.</BR> Predeterminado "# 03F"


public SimpsonIntegrator ( final double relativeAccuracy , final double absoluteAccuracy , final int minimalIterationCount , final int maximalIterationCount ) throws MathIllegalArgumentException { super ( relativeAccuracy , absoluteAccuracy , minimalIterationCount , maximalIterationCount ) ; if ( maximalIterationCount > SIMPSON_MAX_ITERATIONS_COUNT ) { throw new MathIllegalArgumentException ( LocalizedCoreFormats . NUMBER_TOO_LARGE_BOUND_EXCLUDED , maximalIterationCount , SIMPSON_MAX_ITERATIONS_COUNT ) ; } }

Construye un integrador de Simpson con las precisiones y los recuentos de iteraciones dadas.


private static void loadPackageData  ( Context context ) { if ( context != null ) { try { PackageManager packageManager = context . getPackageManager ( ) ; PackageInfo packageInfo = packageManager . getPackageInfo ( context . getPackageName ( ) , 0 ) ; Constants . APP_PACKAGE = packageInfo . packageName ; Constants . APP_VERSION = "" + packageInfo . versionCode ; Constants . APP_VERSION_NAME = packageInfo . versionName ; int buildNumber = loadBuildNumber ( context , packageManager ) ; if ( ( buildNumber != 0 ) && ( buildNumber > packageInfo . versionCode ) ) { Constants . APP_VERSION = "" + buildNumber ; } } catch ( Exception e ) { Log . e ( TAG , "Exception thrown when accessing the package info:" ) ; e . printStackTrace ( ) ; } } }

Método de ayuda para establecer el nombre del paquete y el código de la versión.Si ocurre una excepción, estos valores serán nulos!


public static String checkEmpty  ( String string1 , String string2 ) { if ( UtilValidate . isNotEmpty ( string1 ) ) return string1 ; else if ( UtilValidate . isNotEmpty ( string2 ) ) return string2 ; else return "" ; }

Devuelve la primera cadena pasada, si no está vacía, de lo contrario, si no está vacía, de lo contrario, una cuerda vacía pero no nula.


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

Imprime un mensaje en la prioridad verbosa.


@ Override public void reset  ( XMLComponentManager componentManager ) throws XNIException { try { fNamespaces = componentManager . getFeature ( NAMESPACES ) ; } catch ( XMLConfigurationException e ) { fNamespaces = true ; } fSymbolTable = ( SymbolTable ) componentManager . getProperty ( SYMBOL_TABLE ) ; fErrorReporter = ( XMLErrorReporter ) componentManager . getProperty ( ERROR_REPORTER ) ; }

Restablece el componente.El componente puede consultar al Administrador de componentes sobre cualquier característica y propiedades que afectan el funcionamiento del componente.


public static Window windowForWordInPosition  ( int windowSize , int wordPos , List < String > sentence ) { List < String > window = new ArrayList < > ( ) ; List < String > onlyTokens = new ArrayList < > ( ) ; int contextSize = ( int ) Math . floor ( ( windowSize - 1 ) / 2 ) ; for ( int i = wordPos - contextSize ; i <= wordPos + contextSize ; i ++ ) { if ( i < 0 ) window . add ( "<s>" ) ; else if ( i >= sentence . size ( ) ) window . add ( "</s>" ) ; else { onlyTokens . add ( sentence . get ( i ) ) ; window . add ( sentence . get ( i ) ) ; } } String wholeSentence = StringUtils . join ( sentence ) ; String window2 = StringUtils . join ( onlyTokens ) ; int begin = wholeSentence . indexOf ( window2 ) ; int end = begin + window2 . length ( ) ; return new Window ( window , begin , end ) ; }


@ Override public void populateField  ( Double value ) { if ( slider != null ) { double ratio = value / this . maxValue ; int sliderRatio = ( int ) ( ratio * slider . getMaximum ( ) ) ; slider . setValue ( sliderRatio ) ; oldValueObj = Integer . valueOf ( sliderRatio ) ; } }


public static boolean equals  ( double x , double y ) { return ( Double . isNaN ( x ) && Double . isNaN ( y ) ) || x == y ; }

Devuelve el verdadero IFF Ambos argumentos son NAN o tampoco es NAN y son iguales


public Spanned build  ( ) { SpannableStringBuilder builder = new SpannableStringBuilder ( mText ) ; RoundedCornersBackgroundSpan span = new RoundedCornersBackgroundSpan ( this ) ; builder . setSpan ( span , 0 , builder . length ( ) , Spanned . SPAN_EXCLUSIVE_EXCLUSIVE ) ; return builder ; }

Crea una cadena abrainada que contenga ROVEEDCORNERRERSBOUNTSSPAN.


public DefaultRetryPolicy ( int initialTimeoutMs , int maxNumRetries , float backoffMultiplier ) { mCurrentTimeoutMs = initialTimeoutMs ; mMaxNumRetries = maxNumRetries ; mBackoffMultiplier = backoffMultiplier ; }

Construye una nueva política de reintento.


public Builder withPhysical  ( boolean physical ) { this . physical = physical ; return this ; }

Establezca la solicitud compacta para esperar hasta que se aplique físicamente la compactación.


private boolean containsBlackPoint  ( int a , int b , int fixed , boolean horizontal ) { if ( horizontal ) { for ( int x = a ; x <= b ; x ++ ) { if ( image . get ( x , fixed ) ) { return true ; } } } else { for ( int y = a ; y <= b ; y ++ ) { if ( image . get ( fixed , y ) ) { return true ; } } } return false ; }

Determina si un segmento contiene un punto negro


protected boolean isValidAuthority  ( String authority ) { if ( authority == null ) { return false ; } if ( authorityValidator != null && authorityValidator . isValid ( authority ) ) { return true ; } final String authorityASCII = DomainValidator . unicodeToASCII ( authority ) ; Matcher authorityMatcher = AUTHORITY_PATTERN . matcher ( authorityASCII ) ; if ( ! authorityMatcher . matches ( ) ) { return false ; } String hostLocation = authorityMatcher . group ( PARSE_AUTHORITY_HOST_IP ) ; DomainValidator domainValidator = DomainValidator . getInstance ( isOn ( ALLOW_LOCAL_URLS ) ) ; if ( ! domainValidator . isValid ( hostLocation ) ) { InetAddressValidator inetAddressValidator = InetAddressValidator . getInstance ( ) ; if ( ! inetAddressValidator . isValid ( hostLocation ) ) { return false ; } } String port = authorityMatcher . group ( PARSE_AUTHORITY_PORT ) ; if ( port != null && ! PORT_PATTERN . matcher ( port ) . matches ( ) ) { return false ; } String extra = authorityMatcher . group ( PARSE_AUTHORITY_EXTRA ) ; if ( extra != null && extra . trim ( ) . length ( ) > 0 ) { return false ; } return true ; }

Devuelve VERDADERO si la autoridad está formateada correctamente.Una autoridad es la combinación de nombre de host y puerto.Un valor de autoridad </ código> NULL> se considera inválido.Nota: Esta implementación valida el dominio a menos que se proporcionó un regeoxvalidador.Si se suministró un regexvalidador y coincide, entonces la autoridad se considera válida sin otras verificaciones, de lo contrario, el método se comprueba contra la Autoridad_PATTN y el DomainValidator (Permitir_local_urls)


Cree una instancia de formato incorrecto con el formato de número predeterminado para el numerador y el denominador.


public static int loadCubeMap  ( Context context , int [ ] cubeResources ) { final int [ ] textureObjectIds = new int [ 1 ] ; glGenTextures ( 1 , textureObjectIds , 0 ) ; if ( textureObjectIds [ 0 ] == 0 ) { if ( LoggerConfig . ON ) { Log . w ( TAG , "Could not generate a new OpenGL texture object." ) ; } return 0 ; } final BitmapFactory . Options options = new BitmapFactory . Options ( ) ; options . inScaled = false ; final Bitmap [ ] cubeBitmaps = new Bitmap [ 6 ] ; for ( int i = 0 ; i < 6 ; i ++ ) { cubeBitmaps [ i ] = BitmapFactory . decodeResource ( context . getResources ( ) , cubeResources [ i ] , options ) ; if ( cubeBitmaps [ i ] == null ) { if ( LoggerConfig . ON ) { Log . w ( TAG , "Resource ID " + cubeResources [ i ] + " could not be decoded." ) ; } glDeleteTextures ( 1 , textureObjectIds , 0 ) ; return 0 ; } } glBindTexture ( GL_TEXTURE_CUBE_MAP , textureObjectIds [ 0 ] ) ; glTexParameteri ( GL_TEXTURE_CUBE_MAP , GL_TEXTURE_MIN_FILTER , GL_LINEAR ) ; glTexParameteri ( GL_TEXTURE_CUBE_MAP , GL_TEXTURE_MAG_FILTER , GL_LINEAR ) ; texImage2D ( GL_TEXTURE_CUBE_MAP_NEGATIVE_X , 0 , cubeBitmaps [ 0 ] , 0 ) ; texImage2D ( GL_TEXTURE_CUBE_MAP_POSITIVE_X , 0 , cubeBitmaps [ 1 ] , 0 ) ; texImage2D ( GL_TEXTURE_CUBE_MAP_NEGATIVE_Y , 0 , cubeBitmaps [ 2 ] , 0 ) ; texImage2D ( GL_TEXTURE_CUBE_MAP_POSITIVE_Y , 0 , cubeBitmaps [ 3 ] , 0 ) ; texImage2D ( GL_TEXTURE_CUBE_MAP_NEGATIVE_Z , 0 , cubeBitmaps [ 4 ] , 0 ) ; texImage2D ( GL_TEXTURE_CUBE_MAP_POSITIVE_Z , 0 , cubeBitmaps [ 5 ] , 0 ) ; glBindTexture ( GL_TEXTURE_2D , 0 ) ; for ( Bitmap bitmap : cubeBitmaps ) { bitmap . recycle ( ) ; } return textureObjectIds [ 0 ] ; }

Carga una textura CUBEMAP de los recursos proporcionados y devuelve la ID de textura.Devuelve 0 si la carga falló.


private void openMenuDrawer  ( ) { if ( mDrawerLayout != null ) { mDrawerLayout . openDrawer ( MENU_DRAWER_GRAVITY ) ; } }

Se utiliza para abrir el cajón del menú.


public GroupFacesAction groupFaces  ( List < String > faceIds ) { Validation . validateArray ( faceIds , 1 , 1000 , new ParameterValidationException ( "faceIds" , "length must be between 1 & 1000" ) ) ; return new GroupFacesAction ( cognitiveContext , faceIds ) ; }

Divide el candidato se enfrenta a grupos en función de la similitud facial.La salida es uno o más grupos faciales inconexos y un grupo desordenado.Un grupo facial contiene caras que tienen un aspecto similar, a menudo de la misma persona.Los grupos faciales están clasificados por el tamaño del grupo, es decir, el número de caras.Observe que las caras que pertenecen a una misma persona pueden dividirse en varios grupos en el resultado.MessyGroup es un grupo de cara especial que contiene caras que no pueden encontrar ninguna cara de contraparte similar de las caras originales.El MessyGroup no aparecerá en el resultado, si todas las caras encontrarán sus contrapartes.El grupo API necesita al menos 2 caras candidatas y 1000 como máximo.Sugerimos probar la cara: verifique cuando solo tenga 2 caras candidatas.


public List < String > listACL  ( int from , int to ) { AmazonEC2 client = null ; try { client = getEc2Client ( ) ; List < String > ipPermissions = new ArrayList < String > ( ) ; if ( this . insEnvIdentity . isClassic ( ) ) { DescribeSecurityGroupsRequest req = new DescribeSecurityGroupsRequest ( ) . withGroupNames ( Arrays . asList ( config . getACLGroupName ( ) ) ) ; DescribeSecurityGroupsResult result = client . describeSecurityGroups ( req ) ; for ( SecurityGroup group : result . getSecurityGroups ( ) ) for ( IpPermission perm : group . getIpPermissions ( ) ) if ( perm . getFromPort ( ) == from && perm . getToPort ( ) == to ) ipPermissions . addAll ( perm . getIpRanges ( ) ) ; logger . info ( "Fetch current permissions for classic env of running instance" ) ; } else { Filter nameFilter = new Filter ( ) . withName ( "group-name" ) . withValues ( config . getACLGroupName ( ) ) ; String vpcid = config . getVpcId ( ) ; if ( vpcid == null || vpcid . isEmpty ( ) ) { throw new IllegalStateException ( "vpcid is null even though instance is running in vpc." ) ; } Filter vpcFilter = new Filter ( ) . withName ( "vpc-id" ) . withValues ( vpcid ) ; DescribeSecurityGroupsRequest req = new DescribeSecurityGroupsRequest ( ) . withFilters ( nameFilter , vpcFilter ) ; DescribeSecurityGroupsResult result = client . describeSecurityGroups ( req ) ; for ( SecurityGroup group : result . getSecurityGroups ( ) ) for ( IpPermission perm : group . getIpPermissions ( ) ) if ( perm . getFromPort ( ) == from && perm . getToPort ( ) == to ) ipPermissions . addAll ( perm . getIpRanges ( ) ) ; logger . info ( "Fetch current permissions for vpc env of running instance" ) ; } return ipPermissions ; } finally { if ( client != null ) client . shutdown ( ) ; } }


public LibraryHolder ( View itemView , LibraryObject object ) { super ( itemView ) ; itemView . findViewById ( R . id . item_about_library_container ) . setOnClickListener ( this ) ; TextView title = ( TextView ) itemView . findViewById ( R . id . item_about_library_title ) ; title . setText ( object . title ) ; DisplayUtils . setTypeface ( itemView . getContext ( ) , title ) ; TextView content = ( TextView ) itemView . findViewById ( R . id . item_about_library_content ) ; content . setText ( object . subtitle ) ; DisplayUtils . setTypeface ( itemView . getContext ( ) , content ) ; this . uri = object . uri ; }


@ SuppressWarnings ( { "unchecked" , "cast" } ) public InstanceInitializer fullCopy  ( ) { InstanceInitializer tree = ( InstanceInitializer ) copy ( ) ; if ( children != null ) { for ( int i = 0 ; i < children . length ; ++ i ) { ASTNode child = ( ASTNode ) children [ i ] ; if ( child != null ) { child = child . fullCopy ( ) ; tree . setChild ( child , i ) ; } } } return tree ; }

Cree una copia profunda del subárbol AST en este nodo.La copia está colgando, es decir, no tiene padre.


private static String readFile  ( File file , Charset encoding ) throws IOException { byte [ ] encoded = Files . readAllBytes ( Paths . get ( file . getAbsolutePath ( ) ) ) ; return new String ( encoded , encoding ) ; }


private static Website mergePermissionInfoForTopLevelOrigin  ( WebsiteAddress address , List < Set < Website > > websiteSets ) { String origin = address . getOrigin ( ) ; String host = Uri . parse ( origin ) . getHost ( ) ; Website merged = new Website ( address ) ; for ( Set < Website > websiteSet : websiteSets ) { for ( Website other : websiteSet ) { if ( merged . getCookieInfo ( ) == null && other . getCookieInfo ( ) != null && permissionInfoIsForTopLevelOrigin ( other . getCookieInfo ( ) , origin ) ) { merged . setCookieInfo ( other . getCookieInfo ( ) ) ; } if ( merged . getFullscreenInfo ( ) == null && other . getFullscreenInfo ( ) != null && permissionInfoIsForTopLevelOrigin ( other . getFullscreenInfo ( ) , origin ) ) { merged . setFullscreenInfo ( other . getFullscreenInfo ( ) ) ; } if ( merged . getGeolocationInfo ( ) == null && other . getGeolocationInfo ( ) != null && permissionInfoIsForTopLevelOrigin ( other . getGeolocationInfo ( ) , origin ) ) { merged . setGeolocationInfo ( other . getGeolocationInfo ( ) ) ; } if ( merged . getMidiInfo ( ) == null && other . getMidiInfo ( ) != null && permissionInfoIsForTopLevelOrigin ( other . getMidiInfo ( ) , origin ) ) { merged . setMidiInfo ( other . getMidiInfo ( ) ) ; } if ( merged . getProtectedMediaIdentifierInfo ( ) == null && other . getProtectedMediaIdentifierInfo ( ) != null && permissionInfoIsForTopLevelOrigin ( other . getProtectedMediaIdentifierInfo ( ) , origin ) ) { merged . setProtectedMediaIdentifierInfo ( other . getProtectedMediaIdentifierInfo ( ) ) ; } if ( merged . getPushNotificationInfo ( ) == null && other . getPushNotificationInfo ( ) != null && permissionInfoIsForTopLevelOrigin ( other . getPushNotificationInfo ( ) , origin ) ) { merged . setPushNotificationInfo ( other . getPushNotificationInfo ( ) ) ; } if ( merged . getCameraInfo ( ) == null && other . getCameraInfo ( ) != null ) { if ( origin . equals ( other . getCameraInfo ( ) . getOrigin ( ) ) && ( origin . equals ( other . getCameraInfo ( ) . getEmbedderSafe ( ) ) || "*" . equals ( other . getCameraInfo ( ) . getEmbedderSafe ( ) ) ) ) { merged . setCameraInfo ( other . getCameraInfo ( ) ) ; } } if ( merged . getMicrophoneInfo ( ) == null && other . getMicrophoneInfo ( ) != null ) { if ( origin . equals ( other . getMicrophoneInfo ( ) . getOrigin ( ) ) && ( origin . equals ( other . getMicrophoneInfo ( ) . getEmbedderSafe ( ) ) || "*" . equals ( other . getMicrophoneInfo ( ) . getEmbedderSafe ( ) ) ) ) { merged . setMicrophoneInfo ( other . getMicrophoneInfo ( ) ) ; } } if ( merged . getLocalStorageInfo ( ) == null && other . getLocalStorageInfo ( ) != null && origin . equals ( other . getLocalStorageInfo ( ) . getOrigin ( ) ) ) { merged . setLocalStorageInfo ( other . getLocalStorageInfo ( ) ) ; } for ( StorageInfo storageInfo : other . getStorageInfo ( ) ) { if ( host . equals ( storageInfo . getHost ( ) ) ) { merged . addStorageInfo ( storageInfo ) ; } } } } return merged ; }

Dada una dirección y una lista de conjuntos de sitios web, devuelve un nuevo sitio con el mismo origen que | dirección |que se ha fusionado en ello los permisos de los sitios de entrada coincidentes.Si se encuentra un permiso más de una vez, el que se encuentra primero se encuentra primero y se ignoran los últimos.Esto no debe reducir los datos relevantes, ya que no debe haber duplicado así en primer lugar.


private static void attemptRetryOnException  ( String logPrefix , Request < ? > request , VolleyError exception ) throws VolleyError { RetryPolicy retryPolicy = request . getRetryPolicy ( ) ; int oldTimeout = request . getTimeoutMs ( ) ; try { retryPolicy . retry ( exception ) ; } catch ( VolleyError e ) { request . addMarker ( String . format ( "%s-timeout-giveup [timeout=%s]" , logPrefix , oldTimeout ) ) ; throw e ; } request . addMarker ( String . format ( "%s-retry [timeout=%s]" , logPrefix , oldTimeout ) ) ; }

Intenta preparar la solicitud de reintento.Si no hay más intentos restantes en la política de reintento de la solicitud, se lanza una excepción de tiempo de espera.


public JsonElement parse  ( Reader json ) throws JsonIOException , JsonSyntaxException  { try { JsonReader jsonReader = new JsonReader ( json ) ; JsonElement element = parse ( jsonReader ) ; if ( ! element . isJsonNull ( ) && jsonReader . peek ( ) != JsonToken . END_DOCUMENT ) { throw new JsonSyntaxException ( "Did not consume the entire document." ) ; } return element ; } catch ( MalformedJsonException e ) { throw new JsonSyntaxException ( e ) ; } catch ( IOException e ) { throw new JsonIOException ( e ) ; } catch ( NumberFormatException e ) { throw new JsonSyntaxException ( e ) ; } }

Analiza la cadena JSON especificada en un árbol de parse


protected MessagesGetChatQueryWithChatIdsFields chatIds  ( Integer ... value ) { return unsafeParam ( "chat_ids" , value ) ; }


public static boolean isExtension  ( String filename , Collection < String > extensions ) { if ( filename == null ) { return false ; } if ( extensions == null || extensions . isEmpty ( ) ) { return indexOfExtension ( filename ) == - 1 ; } String fileExt = getExtension ( filename ) ; for ( String extension : extensions ) { if ( fileExt . equals ( extension ) ) { return true ; } } return false ; }

Comprueba si la extensión del nombre de archivo es una de las especificadas.<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.