@ SuppressLint ( "NewApi" ) static private void findSupportedColorFormats  ( String mimeType ) { SparseArray < ArrayList < String > > softwareCodecs = new SparseArray < ArrayList < String > > ( ) ; SparseArray < ArrayList < String > > hardwareCodecs = new SparseArray < ArrayList < String > > ( ) ; if ( sSoftwareCodecs . containsKey ( mimeType ) ) { return ; } Log . v ( TAG , "Searching supported color formats for mime type \"" + mimeType + "\"..." ) ; for ( int j = MediaCodecList . getCodecCount ( ) - 1 ; j >= 0 ; j -- ) { MediaCodecInfo codecInfo = MediaCodecList . getCodecInfoAt ( j ) ; if ( ! codecInfo . isEncoder ( ) ) continue ; String [ ] types = codecInfo . getSupportedTypes ( ) ; for ( int i = 0 ; i < types . length ; i ++ ) { if ( types [ i ] . equalsIgnoreCase ( mimeType ) ) { MediaCodecInfo . CodecCapabilities capabilities = codecInfo . getCapabilitiesForType ( mimeType ) ; boolean software = false ; for ( int k = 0 ; k < SOFTWARE_ENCODERS . length ; k ++ ) { if ( codecInfo . getName ( ) . equalsIgnoreCase ( SOFTWARE_ENCODERS [ i ] ) ) { software = true ; } } for ( int k = 0 ; k < capabilities . colorFormats . length ; k ++ ) { int format = capabilities . colorFormats [ k ] ; if ( software ) { if ( softwareCodecs . get ( format ) == null ) softwareCodecs . put ( format , new ArrayList < String > ( ) ) ; softwareCodecs . get ( format ) . add ( codecInfo . getName ( ) ) ; } else { if ( hardwareCodecs . get ( format ) == null ) hardwareCodecs . put ( format , new ArrayList < String > ( ) ) ; hardwareCodecs . get ( format ) . add ( codecInfo . getName ( ) ) ; } } } } } StringBuilder e = new StringBuilder ( ) ; e . append ( "Supported color formats on this phone: " ) ; for ( int i = 0 ; i < softwareCodecs . size ( ) ; i ++ ) e . append ( softwareCodecs . keyAt ( i ) + ", " ) ; for ( int i = 0 ; i < hardwareCodecs . size ( ) ; i ++ ) e . append ( hardwareCodecs . keyAt ( i ) + ( i == hardwareCodecs . size ( ) - 1 ? "." : ", " ) ) ; Log . v ( TAG , e . toString ( ) ) ; sSoftwareCodecs . put ( mimeType , softwareCodecs ) ; sHardwareCodecs . put ( mimeType , hardwareCodecs ) ; return ; }

Devuelve una matriz asociativa de los formatos de color soportados y los nombres de los codificadores para un tipo MIME dado, esto puede tomar hasta la SEC en ciertos teléfonos la primera vez que lo ejecuta ...


private int findInsertionIndex  ( final int key ) { return findInsertionIndex ( keys , states , key , mask ) ; }

Encuentre el índice en el que se debe insertar una tecla


private void startObservation  ( ) { Log_OC . d ( TAG , "Loading all kept-in-sync files from database to start watching them" ) ; Cursor cursorOnKeptInSync = getContentResolver ( ) . query ( ProviderTableMeta . CONTENT_URI , null , ProviderTableMeta . FILE_KEEP_IN_SYNC + " = ?" , new String [ ] { String . valueOf ( 1 ) } , null ) ; if ( cursorOnKeptInSync != null ) { if ( cursorOnKeptInSync . moveToFirst ( ) ) { String localPath = "" ; String accountName = "" ; Account account = null ; do { localPath = cursorOnKeptInSync . getString ( cursorOnKeptInSync . getColumnIndex ( ProviderTableMeta . FILE_STORAGE_PATH ) ) ; accountName = cursorOnKeptInSync . getString ( cursorOnKeptInSync . getColumnIndex ( ProviderTableMeta . FILE_ACCOUNT_OWNER ) ) ; account = new Account ( accountName , MainApp . getAccountType ( ) ) ; if ( ! AccountUtils . exists ( account , this ) || localPath == null || localPath . length ( ) <= 0 ) { continue ; } addObservedFile ( localPath , account ) ; } while ( cursorOnKeptInSync . moveToNext ( ) ) ; } cursorOnKeptInSync . close ( ) ; } }

Lea de la base de datos local la lista de archivos que deben para mantenerse sincronizados y comienza a observadores para monitorear los cambios locales en ellos.Actualiza la lista de archivos actualmente observados si se llama varias veces.


public < X extends  DataSource > boolean hasProperties ( Class < X > type )  { return hasProperties ( null , type ) ; }

Devuelve VERDADERO si hay al menos un proyecto de propiedades que proporciona propiedades para el tipo de DataSource, falso de lo contrario.


public static boolean audit  ( ) { return audit . get ( ) == null ? true : audit . get ( ) ; }

¿Se habilita la auditoría?Por defecto es verdadero.


public boolean isDurableWriteEnabled  ( ) { return getBoolean ( SERVER_DURABLE_WRITE_ENABLED , SERVER_DURABLE_WRITE_ENABLED_DEFAULT ) ; }


public static boolean isTrue  ( boolean expression , String message ) { if ( ! expression ) throw new AssertionFailedException ( "assertion failed: " + message ) ; return expression ; }

Afirma que el booleano dado es <codigo> verdadero </ código>.Si este no es el caso, se lanza algún tipo de excepción sin marcar.El mensaje dado se incluye en esa excepción, para ayudar a la depuración.


@ SuppressWarnings ( { "unchecked" , "cast" } ) public ExprStmt fullCopy  ( ) { ExprStmt tree = ( ExprStmt ) 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.


public void install  ( Intent intentResult , Class < ? extends AbstractResultService > serviceClass , AbstractPatch upgradePatch , AbstractPatch repairPatch ) { sInstalled = true ; AbstractResultService . setResultServiceClass ( serviceClass ) ; TinkerPatchService . setPatchProcessor ( upgradePatch , repairPatch ) ; if ( ! isTinkerEnabled ( ) ) { TinkerLog . e ( TAG , "tinker is disabled" ) ; return ; } if ( intentResult == null ) { throw new TinkerRuntimeException ( "intentResult must not be null." ) ; } tinkerLoadResult = new TinkerLoadResult ( ) ; tinkerLoadResult . parseTinkerResult ( getContext ( ) , intentResult ) ; loadReporter . onLoadResult ( patchDirectory , tinkerLoadResult . loadCode , tinkerLoadResult . costTime ) ; if ( ! loaded ) { TinkerLog . w ( TAG , "tinker load fail!" ) ; } }


public void disableDashedHighlightLine  ( ) { mHighlightDashPathEffect = null ; }

Desactiva que la línea resalta se dibuje en modo discontinuo.


public MessagesGetChatUsersQueryWithChatIds nameCase  ( UsersNameCase value ) { return unsafeParam ( "name_case" , value ) ; }

Estuche para la declinación del nombre de usuario y el apellido


public static SM_SYSTEM_MESSAGE STR_FIND_POS_NPC_FOUND_DEV  ( String value0 , String value1 ) { return new SM_SYSTEM_MESSAGE ( 1400548 , value0 , value1 ) ; }


@ Override public final void processValue  ( final SourceDataTagValue sourceDataTagValue ) { LOGGER . debug ( "entering processValue().." ) ; ProcessConfiguration processConfiguration = configurationController . getProcessConfiguration ( ) ; DataTagValueUpdate dataTagValueUpdate ; dataTagValueUpdate = new DataTagValueUpdate ( processConfiguration . getProcessID ( ) , processConfiguration . getprocessPIK ( ) ) ; dataTagValueUpdate . addValue ( sourceDataTagValue ) ; LOGGER . trace ( "value added to value update message" ) ; if ( this . isEnabled ) { LOGGER . trace ( "not in test mode." ) ; jmsTemplate . setPriority ( sourceDataTagValue . getPriority ( ) ) ; jmsTemplate . setTimeToLive ( sourceDataTagValue . getTimeToLive ( ) ) ; if ( sourceDataTagValue . isGuaranteedDelivery ( ) ) { if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "\t sending PERSISTENT message" ) ; } jmsTemplate . setDeliveryMode ( javax . jms . DeliveryMode . PERSISTENT ) ; } else { if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "\t sending NON-PERSISTENT message" ) ; } jmsTemplate . setDeliveryMode ( javax . jms . DeliveryMode . NON_PERSISTENT ) ; } jmsTemplate . convertAndSend ( dataTagValueUpdate ) ; } if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "leaving processValue()" ) ; } }

Envía un solo valor de actualización a los corredores.


public static Map < String , String > strToMap  ( String str , String delim , boolean trim ) { return strToMap ( str , delim , trim , null ) ; }

Crea un mapa de un nombre codificado / cadena de par de valor


public boolean isEnum  ( ) { return kind == Type . TYPE_ENUM ; }

Devuelve VERDADERO de esto es un tipo enumio.


public SM_PET ( int actionId , PetCommonData commonData ) { this . actionId = actionId ; this . commonData = commonData ; }


public static Object calculateGenericExpression  ( String expression ) { final JEP parser = getJep ( ) ; parser . parseExpression ( expression ) ; Object result = parser . getValueAsObject ( ) ; return result ; }

Calcula una expresión matemática regular.


public static boolean isNamedProcess  ( Context context , String processName ) { if ( context == null ) { return false ; } int pid = android . os . Process . myPid ( ) ; ActivityManager manager = ( ActivityManager ) context . getSystemService ( Context . ACTIVITY_SERVICE ) ; List < RunningAppProcessInfo > processInfoList = manager . getRunningAppProcesses ( ) ; if ( ListUtils . isEmpty ( processInfoList ) ) { return false ; } for ( RunningAppProcessInfo processInfo : processInfoList ) { if ( processInfo != null && processInfo . pid == pid && ObjectUtils . isEquals ( processName , processInfo . processName ) ) { return true ; } } return false ; }

Si este proceso se nombra con el nombre de proceso


@ Override public void revertToDefaultValue  ( ) { populateField ( defaultValue ) ; }


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 GroupsIsMemberQueryWithUserIds ( VkApiClient client , UserActor actor , String groupId , List < Integer > userIds ) { super ( client , "groups.isMember" , Utils . buildParametrizedType ( List . class , MemberStatus . class ) ) ; accessToken ( actor . getAccessToken ( ) ) ; groupId ( groupId ) ; userIds ( userIds ) ; }

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


public double lngRadians  ( ) { return lngRadians ; }

Devuelve la longitud de este punto como radianes.


protected String toString  ( AXmlNode node , int depth ) { StringBuilder sb = new StringBuilder ( ) ; StringBuilder padding = new StringBuilder ( ) ; for ( int i = 0 ; i < depth ; i ++ ) padding . append ( "	" ) ; sb . append ( padding ) . append ( node . getTag ( ) ) ; for ( AXmlAttribute < ? > attr : node . getAttributes ( ) . values ( ) ) { sb . append ( "\n" ) . append ( padding ) . append ( "- " ) . append ( attr . getName ( ) ) . append ( ": " ) . append ( attr . getValue ( ) ) ; } for ( AXmlNode n : node . getChildren ( ) ) { sb . append ( "\n" ) . append ( this . toString ( n , depth + 1 ) ) ; } return sb . toString ( ) ; }

Devuelve una representación textual del nodo dado y sus datos.


@ Override public void updateList  ( Set < GeoServerConnection > keySet ) { int count = 1 ; for ( GeoServerConnection connection : keySet ) { PropertyManagerFactory . getInstance ( ) . updateValue ( GEOSERVER_CONNECTION_FIELD , count , connection . encodeAsString ( ) ) ; } }


public static String decode  ( byte [ ] utf8 ) throws CharacterCodingException  { return decode ( ByteBuffer . wrap ( utf8 ) , true ) ; }

Convierte la matriz de bytes proporcionados a una cadena con la codificación UTF-8.Si la entrada está mal formada, reemplácela por un valor predeterminado.


public AppsSendRequestQuery appId  ( Integer value ) { return unsafeParam ( "app_id" , value ) ; }


protected MessagesGetByIdQuery messageIds  ( int ... value ) { return unsafeParam ( "message_ids" , value ) ; }


public static int sumFromTo  ( int iStart , int iEnd ) { int iRes = 0 ; for ( int iCnt = iStart ; iCnt <= iEnd ; iRes += iCnt ++ ) ; return iRes ; }

Devuelve la suma de una secuencia de números en un rango específico


public HeapDump ( File file ) { this ( file , null ) ; }

Crea nueva instancia de Heapdump con los datos almacenados en un archivo.


protected void resetInternalState  ( ) { setStepStart ( null ) ; setStepSize ( FastMath . sqrt ( minStep * maxStep ) ) ; }

Restablecer el estado interno a los valores ficticios.


public static String createGuestShoppingListCookies  ( HttpServletRequest request , HttpServletResponse response ) { Delegator delegator = ( Delegator ) request . getAttribute ( "delegator" ) ; LocalDispatcher dispatcher = ( LocalDispatcher ) request . getAttribute ( "dispatcher" ) ; HttpSession session = request . getSession ( true ) ; ShoppingCart cart = ( ShoppingCart ) session . getAttribute ( "shoppingCart" ) ; GenericValue userLogin = ( GenericValue ) session . getAttribute ( "userLogin" ) ; Properties systemProps = System . getProperties ( ) ; String guestShoppingUserName = "GuestShoppingListId_" + systemProps . getProperty ( "user.name" ) . replace ( " " , "_" ) ; String productStoreId = ProductStoreWorker . getProductStoreId ( request ) ; int cookieAge = ( 60 * 60 * 24 * 30 ) ; String autoSaveListId = null ; Cookie [ ] cookies = request . getCookies ( ) ; if ( UtilValidate . isNotEmpty ( userLogin ) ) { String partyId = userLogin . getString ( "partyId" ) ; if ( UtilValidate . isEmpty ( partyId ) ) { return "success" ; } } if ( cookies != null ) { for ( Cookie cookie : cookies ) { if ( cookie . getName ( ) . equals ( guestShoppingUserName ) ) { autoSaveListId = cookie . getValue ( ) ; break ; } } } if ( ProductStoreWorker . autoSaveCart ( delegator , productStoreId ) ) { if ( UtilValidate . isEmpty ( autoSaveListId ) ) { try { Map < String , Object > listFields = UtilMisc . < String , Object > toMap ( "userLogin" , userLogin , "productStoreId" , productStoreId , "shoppingListTypeId" , "SLT_SPEC_PURP" , "listName" , PERSISTANT_LIST_NAME ) ; Map < String , Object > newListResult = dispatcher . runSync ( "createShoppingList" , listFields ) ; if ( newListResult != null ) { autoSaveListId = ( String ) newListResult . get ( "shoppingListId" ) ; } } catch ( GeneralException e ) { Debug . logError ( e , module ) ; } Cookie guestShoppingListCookie = new Cookie ( guestShoppingUserName , autoSaveListId ) ; guestShoppingListCookie . setMaxAge ( cookieAge ) ; guestShoppingListCookie . setPath ( "/" ) ; response . addCookie ( guestShoppingListCookie ) ; } } if ( UtilValidate . isNotEmpty ( autoSaveListId ) ) { if ( UtilValidate . isNotEmpty ( cart ) ) { cart . setAutoSaveListId ( autoSaveListId ) ; } else { cart = ShoppingCartEvents . getCartObject ( request ) ; cart . setAutoSaveListId ( autoSaveListId ) ; } } return "success" ; }

Crea las cookies de invitados para una lista de compras.


public void addEmojiconGroup  ( List < EaseEmojiconGroupEntity > groupEntitieList ) { for ( int i = 0 ; i < groupEntitieList . size ( ) ; i ++ ) { EaseEmojiconGroupEntity groupEntity = groupEntitieList . get ( i ) ; emojiconGroupList . add ( groupEntity ) ; pagerView . addEmojiconGroup ( groupEntity , i == groupEntitieList . size ( ) - 1 ? true : false ) ; tabBar . addTab ( groupEntity . getIcon ( ) ) ; } }


public void fireJavascriptEvent  ( String action ) { sendEventMessage ( action ) ; }

Envíe un evento para ser despedido en el lado de JavaScript.


protected ArrayList computeNames  ( AbstractTextEditor editor ) { IJavaElement jElem = getJavaElement ( editor ) ; ArrayList names = new ArrayList ( ) ; if ( jElem instanceof ICompilationUnit ) { ICompilationUnit cu = ( ICompilationUnit ) jElem ; return getNames ( cu ) ; } else { return names ; } }


public synchronized String toXML  ( final ConfigurationRequest configurationRequest ) throws ParserConfigurationException , TransformerException { DocumentBuilderFactory builderFactory = DocumentBuilderFactory . newInstance ( ) ; DocumentBuilder builder = builderFactory . newDocumentBuilder ( ) ; Document dom = builder . newDocument ( ) ; Element rootElt = dom . createElement ( CONFIGURATION_XML_ROOT ) ; rootElt . setAttribute ( CONFIGURATION_ID_ATTRIBUTE , Integer . toString ( configurationRequest . getConfigId ( ) ) ) ; dom . appendChild ( rootElt ) ; TransformerFactory transformerFactory = TransformerFactory . newInstance ( ) ; Transformer transformer = transformerFactory . newTransformer ( ) ; StringWriter writer = new StringWriter ( ) ; Result result = new StreamResult ( writer ) ; Source source = new DOMSource ( dom ) ; transformer . transform ( source , result ) ; return writer . getBuffer ( ) . toString ( ) ; }

Cree una representación de cadena XML del objeto ProcessConnectionRequest.


public V put  ( long key , V value ) { int index = insertionIndex ( key ) ; return doPut ( key , value , index ) ; }

Inserta un par de claves / valor en el mapa.


public static int exportReadName2Taxon  ( String format , Director dir , File file , char separator , ProgressListener progressListener ) throws IOException { int totalLines = 0 ; try { final MainViewer viewer = dir . getMainViewer ( ) ; try ( BufferedWriter w = new BufferedWriter ( new FileWriter ( file ) ) ) { final IConnector connector = viewer . getDir ( ) . getDocument ( ) . getConnector ( ) ; final IClassificationBlock classificationBlock = connector . getClassificationBlock ( ClassificationType . Taxonomy . toString ( ) ) ; final java . util . Collection < Integer > taxonIds = viewer . getSelectedIds ( ) ; progressListener . setSubtask ( "Read names to taxa" ) ; progressListener . setMaximum ( taxonIds . size ( ) ) ; progressListener . setProgress ( 0 ) ; final boolean wantMatches = ( format . endsWith ( "PathPercent" ) ) ; for ( int taxonId : taxonIds ) { Set < String > seen = new HashSet < > ( ) ; Set < Integer > allBelow ; Node v = viewer . getTaxId2Node ( taxonId ) ; if ( v . getOutDegree ( ) == 0 ) allBelow = TaxonomyData . getTree ( ) . getAllDescendants ( taxonId ) ; else { allBelow = new HashSet < > ( ) ; allBelow . add ( taxonId ) ; } for ( int id : allBelow ) { if ( classificationBlock . getSum ( id ) > 0 ) { try ( IReadBlockIterator it = connector . getReadsIterator ( viewer . getClassName ( ) , id , 0 , 10000 , true , wantMatches ) ) { while ( it . hasNext ( ) ) { final IReadBlock readBlock = it . next ( ) ; final String readId = readBlock . getReadName ( ) ; if ( ! seen . contains ( readId ) ) { seen . add ( readId ) ; w . write ( readId + separator + getTaxonLabelTarget ( dir , format , taxonId , readBlock ) + "\n" ) ; totalLines ++ ; } } } progressListener . checkForCancel ( ) ; } } progressListener . incrementProgress ( ) ; } } } catch ( CanceledException canceled ) { System . err . println ( "USER CANCELED" ) ; } return totalLines ; }

Exportar ReaDIG a los nombres de taxones Mapeo


XSElementDecl traverseGlobal  ( Element elmDecl , XSDocumentInfo schemaDoc , SchemaGrammar grammar ) { Object [ ] attrValues = fAttrChecker . checkAttributes ( elmDecl , true , schemaDoc ) ; XSElementDecl element = traverseNamedElement ( elmDecl , attrValues , schemaDoc , grammar , true , null ) ; fAttrChecker . returnAttrArray ( attrValues , schemaDoc ) ; return element ; }

Traverse un elemento declarado globalmente.


protected final void fireColumnEvent  ( int idx , double prev ) { Object [ ] lstnrs = m_listeners . getArray ( ) ; for ( int i = 0 ; i < lstnrs . length ; ++ i ) ( ( ColumnListener ) lstnrs [ i ] ) . columnChanged ( this , idx , prev ) ; }

Notifica a todos los oyentes registrados de un evento de actualización de columnas


public PhotosGetCommentsQuery startCommentId  ( Integer value ) { return unsafeParam ( "start_comment_id" , value ) ; }


@ Override public void undoAction  ( UndoInterface undoRedoObject ) { String oldValueObj = ( String ) undoRedoObject . getOldValue ( ) ; functionComboBox . setSelectedItem ( oldValueObj ) ; }


protected LinkedHashSet < OrderByColumn > generateSortColumns  ( String apiSortQuery , Set < LogicalMetric > logicalMetrics , MetricDictionary metricDictionary ) throws BadApiRequestException { String sortMetricName ; List < String > metricWithDirection ; LinkedHashSet < OrderByColumn > metricSortColumns = new LinkedHashSet < > ( ) ; if ( "" . equals ( apiSortQuery ) || apiSortQuery == null ) { return metricSortColumns ; } List < String > requestedSorts = Arrays . asList ( apiSortQuery . split ( "," ) ) ; List < String > unknownMetrics = new ArrayList < > ( ) ; List < String > unmatchedMetrics = new ArrayList < > ( ) ; List < String > unsortableMetrics = new ArrayList < > ( ) ; for ( String sort : requestedSorts ) { metricWithDirection = Arrays . asList ( sort . split ( "\\|" ) ) ; sortMetricName = metricWithDirection . get ( 0 ) ; SortDirection sortDirection ; try { sortDirection = metricWithDirection . size ( ) == 2 ? SortDirection . valueOf ( metricWithDirection . get ( 1 ) . toUpperCase ( Locale . ENGLISH ) ) : SortDirection . DESC ; } catch ( IllegalArgumentException ignored ) { String sortDirectionName = metricWithDirection . get ( 1 ) ; LOG . debug ( SORT_DIRECTION_INVALID . logFormat ( sortDirectionName ) ) ; throw new BadApiRequestException ( SORT_DIRECTION_INVALID . format ( sortDirectionName ) ) ; } LogicalMetric logicalMetric = metricDictionary . get ( sortMetricName ) ; if ( logicalMetric == null ) { unknownMetrics . add ( sortMetricName ) ; continue ; } if ( ! logicalMetrics . contains ( logicalMetric ) ) { unmatchedMetrics . add ( sortMetricName ) ; continue ; } if ( logicalMetric . getTemplateDruidQuery ( ) == null ) { unsortableMetrics . add ( sortMetricName ) ; continue ; } metricSortColumns . add ( new OrderByColumn ( logicalMetric , sortDirection ) ) ; } if ( ! unknownMetrics . isEmpty ( ) ) { LOG . debug ( SORT_METRICS_UNDEFINED . logFormat ( unknownMetrics . toString ( ) ) ) ; throw new BadApiRequestException ( SORT_METRICS_UNDEFINED . format ( unknownMetrics . toString ( ) ) ) ; } if ( ! unmatchedMetrics . isEmpty ( ) ) { LOG . debug ( SORT_METRICS_NOT_IN_QUERY_FORMAT . logFormat ( unmatchedMetrics . toString ( ) ) ) ; throw new BadApiRequestException ( SORT_METRICS_NOT_IN_QUERY_FORMAT . format ( unmatchedMetrics . toString ( ) ) ) ; } if ( ! unsortableMetrics . isEmpty ( ) ) { LOG . debug ( SORT_METRICS_NOT_SORTABLE_FORMAT . logFormat ( unsortableMetrics . toString ( ) ) ) ; throw new BadApiRequestException ( SORT_METRICS_NOT_SORTABLE_FORMAT . format ( unsortableMetrics . toString ( ) ) ) ; } return metricSortColumns ; }


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

Usted sufrió un daño NUM0 y perdió algunos de sus aficionados mágicos porque [% Skillcaster] usó [% de habilidad] en usted.


public static SM_SYSTEM_MESSAGE STR_MERCENARY_FOLLOWING_CANCELED_BY_TOO_DISTANCE  ( String value0 ) { return new SM_SYSTEM_MESSAGE ( 1400458 , value0 ) ; }

% 0 ha renunciado a seguirse porque la distancia entre usted es demasiado grande.


@ Override public void initiaize  ( File file , int entryCount ) throws CarbonSortKeyAndGroupByException  { try { stream = new DataOutputStream ( new BufferedOutputStream ( new FileOutputStream ( file ) , writeBufferSize ) ) ; stream . writeInt ( entryCount ) ; } catch ( FileNotFoundException e1 ) { throw new CarbonSortKeyAndGroupByException ( e1 ) ; } catch ( IOException e ) { throw new CarbonSortKeyAndGroupByException ( e ) ; } }

Debajo se utilizará el método para inicializar el flujo y escribir el recuento de entrada


public void execute  ( InnerQueryNode innerQueryNode , ISpaceProxy space , Transaction txn , int readModifier , int max ) throws SQLException { SelectQuery innerQuery = innerQueryNode . getInnerQuery ( ) ; innerQuery . validateQuery ( space ) ; innerQuery . setPreparedValues ( query . getPreparedValues ( ) ) ; innerQuery . setRouting ( query . getRouting ( ) ) ; if ( ! innerQuery . isPrepared ( ) && ! innerQuery . containsSubQueries ( ) ) innerQuery . build ( ) ; ResponsePacket innerResponse = innerQuery . executeOnSpace ( space , txn ) ; innerQueryNode . setResults ( innerResponse . getResultEntry ( ) ) ; }


public static SM_SYSTEM_MESSAGE STR_SKILL_SUCC_PROCMPHeal_Instant_HEAL_ME_TO_SELF  ( int num0 , String skillname ) { return new SM_SYSTEM_MESSAGE ( 1200394 , num0 , skillname ) ; }

Usted recuperó% NUM0 MP después de usar [% SkillName].


private void throwCloseConnection  ( ) throws ClosedChannelException  { ClosedChannelException closeEx = new ClosedChannelException ( ) ; closeEx . initCause ( new IOException ( "Connection has been closed by peer" ) ) ; throw closeEx ; }

arroja cerradaChannelException si se cerró el zócalo de pares remoto


public void updateWithItemHandler  ( String key ) { remove ( key ) ; put ( key , itemHandler . get ( key ) ) ; }

Actualiza el caché para la clave dada utilizando el valor de la fuente


public static void writeStringToFile  ( File file , String data , String encoding ) throws IOException { writeStringToFile ( file , data , encoding , false ) ; }

Escribe una cadena a un archivo que crea el archivo si no existe.<P /> Nota: A partir de V1.3, los directorios de los padres del archivo se crearán si no existen.


public static void main  ( String [ ] sArgs ) { if ( sArgs . length > 0 ) { SymbolicGraph sg = new SymbolicGraph ( 1 , 7 ) ; sg . setDataString ( sArgs [ 0 ] ) ; System . out . println ( utils . graphToDot ( sg , true ) ) ; } else try { SymbolicGraph sg = new SymbolicGraph ( 1 , 1 ) ; sg . addEdge ( new VertexImpl ( "a" ) , new VertexImpl ( "b" ) ) ; sg . addEdge ( new VertexImpl ( "b" ) , new VertexImpl ( "c" ) ) ; sg . addEdge ( new VertexImpl ( "b" ) , new VertexImpl ( "d" ) ) ; sg . addEdge ( new VertexImpl ( "e" ) , new VertexImpl ( "d" ) ) ; sg . addEdge ( new VertexImpl ( "f" ) , new VertexImpl ( "e" ) ) ; sg . addEdge ( new VertexImpl ( "f" ) , new VertexImpl ( "g" ) ) ; sg . addEdge ( new VertexImpl ( "f" ) , new VertexImpl ( "h" ) ) ; sg . addEdge ( new VertexImpl ( "c" ) , new VertexImpl ( "h" ) ) ; for ( int iCnt = 0 ; iCnt < 100 ; iCnt ++ ) System . err . println ( sg . getShortestLinkBetween ( new VertexImpl ( "a" ) , new VertexImpl ( "h" ) ) ) ; } catch ( Exception ex ) { ex . printStackTrace ( System . err ) ; } }

Función auxiliar.Comprueba la funcionalidad de la clase.


protected void fireTupleEvent  ( Table t , int start , int end , int type ) { if ( m_tupleListeners != null && m_tupleListeners . size ( ) > 0 ) { Object [ ] lstnrs = m_tupleListeners . getArray ( ) ; Tuple [ ] tuples = new Tuple [ end - start + 1 ] ; for ( int i = 0 , r = start ; r <= end ; ++ r , ++ i ) { tuples [ i ] = t . getTuple ( r ) ; } for ( int i = 0 ; i < lstnrs . length ; ++ i ) { TupleSetListener tsl = ( TupleSetListener ) lstnrs [ i ] ; if ( type == EventConstants . INSERT ) { tsl . tupleSetChanged ( this , tuples , EMPTY_ARRAY ) ; } else { tsl . tupleSetChanged ( this , EMPTY_ARRAY , tuples ) ; } } } }


public TreeNodeIterator ( Node root , boolean preorder ) { m_preorder = preorder ; m_root = root ; m_stack = new ArrayList ( ) ; m_stack . add ( root ) ; if ( ! preorder ) { for ( Node n = root . getChild ( 0 ) ; n != null ; n = n . getChild ( 0 ) ) m_stack . add ( n ) ; } }

Cree un nuevo trenedeiterator sobre el subárbol dado.


protected void captureResponseSize  ( HttpContent httpContent ) { ByteBuf bufferedContent = httpContent . content ( ) ; int contentSize = bufferedContent . readableBytes ( ) ; responseBodySize . addAndGet ( contentSize ) ; }

Agrega el tamaño de este httpcontent a la respuesta de respuesta.


public String [ ] upload_file  ( String group_name , byte [ ] file_buff , String file_ext_name , NameValuePair [ ] meta_list ) throws IOException , MyException { return this . do_upload_file ( ProtoCommon . STORAGE_PROTO_CMD_UPLOAD_FILE , group_name , null , null , file_ext_name , file_buff . length , new UploadBuff ( file_buff , 0 , file_buff . length ) , meta_list ) ; }

Subir archivo en el servidor de almacenamiento (por archivo Buff)


public static void readFully  ( InputStream in , byte [ ] dst ) throws IOException { readFully ( in , dst , 0 , dst . length ) ; }

Rellena 'DST' con bytes de 'in', lanzando eofexception si hay disponibles bytes insuficientes.


private void printGrantedAuthorities  ( final Auth0JWTToken principal ) { for ( final GrantedAuthority grantedAuthority : principal . getAuthorities ( ) ) { final String authority = grantedAuthority . getAuthority ( ) ; logger . info ( authority ) ; } }

Demostración simple de cómo se puede acceder a la información principal


@ Override public void onEviction  ( ResourceKey < K > resourceKey ) { for ( ; ; ) { Status status = resourceKey . getStatus ( ) ; switch ( status ) { case IDLE : if ( resourceKey . goFromIdleToRetired ( ) ) { cache . remove ( resourceKey ) ; return ; } break ; default : return ; } } }

Transiciones atómicas El recurso a un estado donde ya no se puede usar.Si el recurso está inactivo, entonces se descarta inmediatamente invalidándolo en el caché primario.


public void addPaging  ( Integer pageSize , Integer pageIndex ) { ParamValidationUtil . validateParamNotNull ( pageSize , "pageSize" ) ; ParamValidationUtil . validateParamNotNull ( pageIndex , "pageIndex" ) ; int offset = pageIndex * pageSize ; this . offset = offset ; this . limit = pageSize ; this . usePaging = true ; }


public JSONObject accumulate  ( String key , Object value ) throws JSONException { testValidity ( value ) ; Object o = opt ( key ) ; if ( o == null ) { put ( key , value instanceof JSONArray ? new JSONArray ( ) . put ( value ) : value ) ; } else if ( o instanceof JSONArray ) { ( ( JSONArray ) o ) . put ( value ) ; } else { put ( key , new JSONArray ( ) . put ( o ) . put ( value ) ) ; } return this ; }

Acumula valores bajo una llave.Es similar al método de PUT, excepto que si ya hay un objeto almacenado debajo de la tecla, se almacena un JSONARRAY debajo de la tecla para mantener todos los valores acumulados.Si ya hay un jsonarray, entonces se adjunta el nuevo valor.En contraste, el método PUT reemplaza el valor anterior.


public void pow  ( final double [ ] x , final int xOffset , final double [ ] y , final int yOffset , final double [ ] result , final int resultOffset ) { final double [ ] logX = new double [ getSize ( ) ] ; log ( x , xOffset , logX , 0 ) ; final double [ ] yLogX = new double [ getSize ( ) ] ; multiply ( logX , 0 , y , yOffset , yLogX , 0 ) ; exp ( yLogX , 0 , result , resultOffset ) ; }

Potencia de cómputo de una estructura derivada.


public void updateConfiguration  ( @ NotNull Configuration configuration ) { myConfiguration = configuration ; invalidateGraphicsRenderer ( ) ; }

Actualiza la configuración actual.Debe llamar a este método si cambia la configuración y desea actualizar la vista renderizada.<P /> <P /> Esto volverá a inflar la vista de muestra con los nuevos parámetros en la configuración.


public static SM_SYSTEM_MESSAGE STR_ABYSS_DOOR_BROKEN  ( String value1 , String value0 ) { return new SM_SYSTEM_MESSAGE ( 1301049 , value1 , value0 ) ; }

% 1 del% 0 destruyó la puerta del castillo.


public Response ( ) { this  ( 1024 ) ; offset = 0 ; }


@ DataProvider public Object [ ] [ ] badExperimentsPOST  ( ) { Experiment experiment = new Experiment ( ) . setDescription ( "Sample hypothesis." ) ; return new Object [ ] [ ] { new Object [ ] { new Experiment ( experiment . setSamplingPercent ( completeExperiment . samplingPercent ) ) , "Experiment application name cannot be null or an empty string" , HttpStatus . SC_BAD_REQUEST } , new Object [ ] { new Experiment ( experiment . setStartTime ( completeExperiment . startTime ) ) , "Experiment application name cannot be null or an empty string" , HttpStatus . SC_BAD_REQUEST } , new Object [ ] { new Experiment ( experiment . setEndTime ( completeExperiment . endTime ) ) , "Experiment application name cannot be null or an empty string" , HttpStatus . SC_BAD_REQUEST } , new Object [ ] { new Experiment ( experiment . setLabel ( completeExperiment . label ) ) , "Experiment application name cannot be null or an empty string" , HttpStatus . SC_BAD_REQUEST } , new Object [ ] { new Experiment ( experiment . setApplication ( ApplicationFactory . defaultApplication ( ) ) ) , "An unique constraint was violated: An active experiment with label \"SW50ZWdyVGVzdA_1461232889078App_PRIMARY\".\"SW50ZWdyVGVzdA_Experiment_14612328892453\" already exists (id = 70139a10-489b-49bd-ac4c-c7c92ec79917) (null)" , HttpStatus . SC_BAD_REQUEST } , new Object [ ] { ExperimentFactory . createExperiment ( ) . setState ( Constants . EXPERIMENT_STATE_DRAFT ) , "Unrecognized property \"state\"" , HttpStatus . SC_BAD_REQUEST } , new Object [ ] { ExperimentFactory . createCompleteExperiment ( ) . setStartTime ( ( String ) null ) , "Could not create experiment \"NewExperiment[id=20533222-2a3f-459d-b6b6-5e05ad1104e3,label=SW50ZWdyVGVzdA_Experiment_146123290282853,applicationName=SW50ZWdyVGVzdA_1461232889078App_PRIMARY,startTime=<null>,endTime=Thu Jun 02 10:01:42 UTC 2016,samplingPercent=1.0,description=A sample Experiment description.,rule=(salary < 10000) && (state = 'VA'),isPersonalizationEnabled=false,modelName=,modelVersion=,isRapidExperiment=false,userCap=0,creatorID=" + userName + "]\"" , HttpStatus . SC_INTERNAL_SERVER_ERROR } , new Object [ ] { ExperimentFactory . createCompleteExperiment ( ) . setEndTime ( ( String ) null ) , "Could not create experiment \"NewExperiment[id=97daea3b-1523-43e7-8d7c-d7eba2c18ff5,label=SW50ZWdyVGVzdA_Experiment_146123290282954,applicationName=SW50ZWdyVGVzdA_1461232889078App_PRIMARY,startTime=Thu Apr 21 10:01:42 UTC 2016,endTime=<null>,samplingPercent=1.0,description=A sample Experiment description.,rule=(salary < 10000) && (state = 'VA'),isPersonalizationEnabled=false,modelName=,modelVersion=,isRapidExperiment=false,userCap=0,creatorID=" + userName + "]\"" , HttpStatus . SC_INTERNAL_SERVER_ERROR } , new Object [ ] { null , "null" , HttpStatus . SC_INTERNAL_SERVER_ERROR } } ; }

Devuelve experimentos con formato o incompleto en mal estado y sus mensajes de error para solicitudes de publicación.


public int hashCode  ( ) { return Float . floatToIntBits ( value ) ; }

Devuelve un código hash para este objeto flotante.


public static void moveFile  ( String sourceFilePath , String destFilePath ) { if ( TextUtils . isEmpty ( sourceFilePath ) || TextUtils . isEmpty ( destFilePath ) ) { throw new RuntimeException ( "Both sourceFilePath and destFilePath cannot be null." ) ; } moveFile ( new File ( sourceFilePath ) , new File ( destFilePath ) ) ; }


public Vector3D applyInverseTo  ( Vector3D u ) { double x = u . getX ( ) ; double y = u . getY ( ) ; double z = u . getZ ( ) ; double s = q1 * x + q2 * y + q3 * z ; double m0 = - q0 ; return new Vector3D ( 2 * ( m0 * ( x * m0 - ( q2 * z - q3 * y ) ) + s * q1 ) - x , 2 * ( m0 * ( y * m0 - ( q3 * x - q1 * z ) ) + s * q2 ) - y , 2 * ( m0 * ( z * m0 - ( q1 * y - q2 * x ) ) + s * q3 ) - z ) ; }

Aplicar el inverso de la rotación a un vector.


@ Override protected void parseOptimizationData  ( OptimizationData ... optData ) { super . parseOptimizationData ( optData ) ; for ( OptimizationData data : optData ) { if ( data instanceof Sigma ) { inputSigma = ( ( Sigma ) data ) . getSigma ( ) ; continue ; } if ( data instanceof PopulationSize ) { lambda = ( ( PopulationSize ) data ) . getPopulationSize ( ) ; continue ; } } checkParameters ( ) ; }

Escanea la lista de datos de optimización (requeridos y opcionales) que caracterizan el problema.


protected final boolean isUpdateHeaderVisible  ( ) { return mUpdateHeader == getChildAt ( 0 ) ; }

¿Está visible la actualización del encabezado?


Node internalInsertBefore  ( Node newChild , Node refChild , boolean replace ) throws DOMException { CoreDocumentImpl ownerDocument = ownerDocument ( ) ; boolean errorChecking = ownerDocument . errorChecking ; if ( newChild . getNodeType ( ) == Node . DOCUMENT_FRAGMENT_NODE ) { if ( errorChecking ) { for ( Node kid = newChild . getFirstChild ( ) ; kid != null ; kid = kid . getNextSibling ( ) ) { if ( ! ownerDocument . isKidOK ( this , kid ) ) { String msg = DOMMessageFormatter . formatMessage ( DOMMessageFormatter . DOM_DOMAIN , "HIERARCHY_REQUEST_ERR" , null ) ; throw new DOMException ( DOMException . HIERARCHY_REQUEST_ERR , msg ) ; } } } while ( newChild . hasChildNodes ( ) ) { insertBefore ( newChild . getFirstChild ( ) , refChild ) ; } return newChild ; } if ( newChild == refChild ) { refChild = refChild . getNextSibling ( ) ; removeChild ( newChild ) ; insertBefore ( newChild , refChild ) ; return newChild ; } if ( needsSyncChildren ( ) ) { synchronizeChildren ( ) ; } if ( errorChecking ) { if ( isReadOnly ( ) ) { String msg = DOMMessageFormatter . formatMessage ( DOMMessageFormatter . DOM_DOMAIN , "NO_MODIFICATION_ALLOWED_ERR" , null ) ; throw new DOMException ( DOMException . NO_MODIFICATION_ALLOWED_ERR , msg ) ; } if ( newChild . getOwnerDocument ( ) != ownerDocument ) { String msg = DOMMessageFormatter . formatMessage ( DOMMessageFormatter . DOM_DOMAIN , "WRONG_DOCUMENT_ERR" , null ) ; throw new DOMException ( DOMException . WRONG_DOCUMENT_ERR , msg ) ; } if ( ! ownerDocument . isKidOK ( this , newChild ) ) { String msg = DOMMessageFormatter . formatMessage ( DOMMessageFormatter . DOM_DOMAIN , "HIERARCHY_REQUEST_ERR" , null ) ; throw new DOMException ( DOMException . HIERARCHY_REQUEST_ERR , msg ) ; } if ( refChild != null && refChild . getParentNode ( ) != this ) { String msg = DOMMessageFormatter . formatMessage ( DOMMessageFormatter . DOM_DOMAIN , "NOT_FOUND_ERR" , null ) ; throw new DOMException ( DOMException . NOT_FOUND_ERR , msg ) ; } boolean treeSafe = true ; for ( NodeImpl a = this ; treeSafe && a != null ; a = a . parentNode ( ) ) { treeSafe = newChild != a ; } if ( ! treeSafe ) { String msg = DOMMessageFormatter . formatMessage ( DOMMessageFormatter . DOM_DOMAIN , "HIERARCHY_REQUEST_ERR" , null ) ; throw new DOMException ( DOMException . HIERARCHY_REQUEST_ERR , msg ) ; } } makeChildNode ( ) ; ownerDocument . insertingNode ( this , replace ) ; ChildNode newInternal = ( ChildNode ) newChild ; Node oldparent = newInternal . parentNode ( ) ; if ( oldparent != null ) { oldparent . removeChild ( newInternal ) ; } ChildNode refInternal = ( ChildNode ) refChild ; newInternal . ownerNode = this ; newInternal . isOwned ( true ) ; ChildNode firstChild = ( ChildNode ) value ; if ( firstChild == null ) { value = newInternal ; newInternal . isFirstChild ( true ) ; newInternal . previousSibling = newInternal ; } else { if ( refInternal == null ) { ChildNode lastChild = firstChild . previousSibling ; lastChild . nextSibling = newInternal ; newInternal . previousSibling = lastChild ; firstChild . previousSibling = newInternal ; } else { if ( refChild == firstChild ) { firstChild . isFirstChild ( false ) ; newInternal . nextSibling = firstChild ; newInternal . previousSibling = firstChild . previousSibling ; firstChild . previousSibling = newInternal ; value = newInternal ; newInternal . isFirstChild ( true ) ; } else { ChildNode prev = refInternal . previousSibling ; newInternal . nextSibling = refInternal ; prev . nextSibling = newInternal ; refInternal . previousSibling = newInternal ; newInternal . previousSibling = prev ; } } } changed ( ) ; ownerDocument . insertedNode ( this , newInternal , replace ) ; checkNormalizationAfterInsert ( newInternal ) ; return newChild ; }

Non-DOM Interno: dentro de las acciones dom, a veces necesitamos poder controlar qué eventos de mutación se generan.Esta versión de la operación insertar antes nos permite hacerlo.No está diseñado para su uso por programas de aplicaciones.


public void refreshZoneImpl  ( ) { getOwner ( ) . revalidateZones ( ) ; }

Actualizar completamente la zona independientemente de la zona actual.


public void configureDialog  ( List < ConfigurationEntry > config ) { String currentTab = null ; for ( ConfigurationEntry entry : config ) { currentTab = changeTab ( entry . getTab ( ) , currentTab ) ; if ( isNestedComponentDefined ( entry ) ) { NestedFieldTypes type = parseType ( entry ) ; switch ( type ) { case FIELDSET : FieldsetConfig fieldsetConfig = new FieldsetConfig ( entry , dialogFieldMap ) ; setFieldsetValue ( fieldsetConfig ) ; break ; case MULTIFIELD : MultifieldConfig multifieldConfig = new MultifieldConfig ( entry , dialogFieldMap ) ; setMultifieldValue ( multifieldConfig ) ; break ; default : return ; } } else { setDialogValue ( entry ) ; } } }

Actualiza los campos en un diálogo con datos desde una sola fila de la tabla de datos, representados por una lista de configurationries.


public void mainDistancesPerFile  ( String folder1 , String folder2 ) throws IOException { long startTime = System . currentTimeMillis ( ) ; RmsLsfDistortionComputer r = new RmsLsfDistortionComputer ( ) ; folder1 = StringUtils . checkLastSlash ( folder1 ) ; folder2 = StringUtils . checkLastSlash ( folder2 ) ; BaselineAdaptationSet set1 = new BaselineAdaptationSet ( folder1 ) ; BaselineAdaptationSet set2 = new BaselineAdaptationSet ( folder2 ) ; boolean isBark = true ; double upperFreqInHz = 8000 ; int [ ] map = new int [ set1 . items . length ] ; for ( int i = 0 ; i < map . length ; i ++ ) { if ( ! StringUtils . getFileName ( set1 . items [ i ] . audioFile ) . equals ( StringUtils . getFileName ( set2 . items [ i ] . audioFile ) ) ) { throw new IOException ( "Audio files in folders do not match:\n" + set1 . items [ i ] . audioFile + " doesn't match " + set2 . items [ i ] . audioFile ) ; } map [ i ] = i ; } double [ ] [ ] allDistances = r . getDistancesPerFile ( set1 , set2 , isBark , upperFreqInHz , map ) ; assert allDistances . length == map . length ; System . out . println ( "RMSE Bark-scaled LSF distances between " + folder1 + " and " + folder2 ) ; double allMean = 0 ; double allPrevMean = 0 ; double allVariance = 0 ; long allN = 0 ; for ( int i = 0 ; i < map . length ; i ++ ) { double oneMean = 0 ; double onePrevMean = 0 ; double oneVariance = 0 ; int oneN = 0 ; for ( int j = 0 ; j < allDistances [ i ] . length ; j ++ ) { double x = allDistances [ i ] [ j ] ; allN ++ ; allPrevMean = allMean ; allMean += ( x - allPrevMean ) / allN ; allVariance += ( x - allPrevMean ) * ( x - allMean ) ; oneN ++ ; onePrevMean = oneMean ; oneMean += ( x - onePrevMean ) / oneN ; oneVariance += ( x - onePrevMean ) * ( x - oneMean ) ; } double oneStddev = Math . sqrt ( oneVariance / oneN ) ; System . out . println ( StringUtils . getFileName ( set1 . items [ i ] . audioFile ) + " mean " + oneMean + " stddev " + oneStddev ) ; } double allStddev = Math . sqrt ( allVariance / allN ) ; System . out . println ( "Global mean " + allMean + " stddev " + allStddev ) ; long timeNeeded = System . currentTimeMillis ( ) - startTime ; System . err . println ( "Computed distances between " + map . length + " files in " + timeNeeded + " ms" ) ; }

Comparar distancias entre dos carpetas;Se espera que cada carpeta contenga archivos WAV con los mismos nombres y los archivos de laboratorio acompañantes.


public void put  ( String key , InputStream stream , String name ) { put ( key , stream , name , null ) ; }

Agrega un flujo de entrada a la solicitud.


private boolean regionDialingFromMatchesNumber  ( PhoneNumber number , String regionDialingFrom ) { List < String > regionCodes = getRegionCodesForCountryCode ( number . getCountryCode ( ) ) ; return regionCodes . contains ( regionDialingFrom ) ; }

Método de ayuda para verificar que el código de llamadas del país del número coincida con la región en la que se está marcando.


public TIntHash ( int initialCapacity , float loadFactor , TIntHashingStrategy strategy ) { super ( initialCapacity , loadFactor ) ; this . _hashingStrategy = strategy ; }

Crea una nueva instancia de <código> tinthash </ código> con un valor principal en o cerca de la capacidad y el factor de carga especificados.


@ Override public boolean equals  ( Object other ) { if ( this == other ) { return true ; } if ( other instanceof SparseGradient ) { final SparseGradient rhs = ( SparseGradient ) other ; if ( ! Precision . equals ( value , rhs . value , 1 ) ) { return false ; } if ( derivatives . size ( ) != rhs . derivatives . size ( ) ) { return false ; } for ( final Map . Entry < Integer , Double > entry : derivatives . entrySet ( ) ) { if ( ! rhs . derivatives . containsKey ( entry . getKey ( ) ) ) { return false ; } if ( ! Precision . equals ( entry . getValue ( ) , rhs . derivatives . get ( entry . getKey ( ) ) , 1 ) ) { return false ; } } return true ; } return false ; }

Prueba para la igualdad de dos gradientes escasos.<P> Los gradientes escasos se consideran iguales si tienen el mismo valor y los mismos derivados.</ p>


public static DocumentObjectConverter instance  ( ) { return _instance ; }

Devuelve una instancia de Singleton de DocumentObjectConverter.


private float crossCheckVertical  ( int startI , int centerJ , int maxCount , int originalStateCountTotal ) { BitMatrix image = this . image ; int maxI = image . getHeight ( ) ; int [ ] stateCount = getCrossCheckStateCount ( ) ; int i = startI ; while ( i >= 0 && image . get ( centerJ , i ) ) { stateCount [ 2 ] ++ ; i -- ; } if ( i < 0 ) { return Float . NaN ; } while ( i >= 0 && ! image . get ( centerJ , i ) && stateCount [ 1 ] <= maxCount ) { stateCount [ 1 ] ++ ; i -- ; } if ( i < 0 || stateCount [ 1 ] > maxCount ) { return Float . NaN ; } while ( i >= 0 && image . get ( centerJ , i ) && stateCount [ 0 ] <= maxCount ) { stateCount [ 0 ] ++ ; i -- ; } if ( stateCount [ 0 ] > maxCount ) { return Float . NaN ; } i = startI + 1 ; while ( i < maxI && image . get ( centerJ , i ) ) { stateCount [ 2 ] ++ ; i ++ ; } if ( i == maxI ) { return Float . NaN ; } while ( i < maxI && ! image . get ( centerJ , i ) && stateCount [ 3 ] < maxCount ) { stateCount [ 3 ] ++ ; i ++ ; } if ( i == maxI || stateCount [ 3 ] >= maxCount ) { return Float . NaN ; } while ( i < maxI && image . get ( centerJ , i ) && stateCount [ 4 ] < maxCount ) { stateCount [ 4 ] ++ ; i ++ ; } if ( stateCount [ 4 ] >= maxCount ) { return Float . NaN ; } int stateCountTotal = stateCount [ 0 ] + stateCount [ 1 ] + stateCount [ 2 ] + stateCount [ 3 ] + stateCount [ 4 ] ; if ( 5 * Math . abs ( stateCountTotal - originalStateCountTotal ) >= 2 * originalStateCountTotal ) { return Float . NaN ; } return foundPatternCross ( stateCount ) ? centerFromEnd ( stateCount , i ) : Float . NaN ; }

Después de una exploración horizontal, encuentra un patrón de buscador potencial, este método "comprueba cruzando" escaneando verticalmente a través del centro del posible patrón de buscador para ver si se detecta la misma proporción.


public void adjustBeginLineColumn  ( int newLine , int newCol ) { int start = tokenBegin ; int len ; if ( bufpos >= tokenBegin ) { len = bufpos - tokenBegin + inBuf + 1 ; } else { len = bufsize - tokenBegin + bufpos + 1 + inBuf ; } int i = 0 , j = 0 , k = 0 ; int nextColDiff = 0 , columnDiff = 0 ; while ( i < len && bufline [ j = start % bufsize ] == bufline [ k = ++ start % bufsize ] ) { bufline [ j ] = newLine ; nextColDiff = columnDiff + bufcolumn [ k ] - bufcolumn [ j ] ; bufcolumn [ j ] = newCol + columnDiff ; columnDiff = nextColDiff ; i ++ ; } if ( i < len ) { bufline [ j ] = newLine ++ ; bufcolumn [ j ] = newCol + columnDiff ; while ( i ++ < len ) { if ( bufline [ j = start % bufsize ] != bufline [ ++ start % bufsize ] ) bufline [ j ] = newLine ++ ; else bufline [ j ] = newLine ; } } line = bufline [ j ] ; column = bufcolumn [ j ] ; }

Método para ajustar los números de línea y columna para el inicio de un token.


@ Override public void onTokenRefresh  ( ) { startService ( new Intent ( this , SaveFCMIdService . class ) ) ; }

Llamado si se actualiza FLAXID TOKEN.Esto puede ocurrir si la seguridad del token anterior se había comprometido.Tenga en cuenta que esto se llama cuando se genera inicialmente el token de IglyID, así que aquí es donde recuperaría el token.


protected void handleIOException  ( IOException e ) throws IOException { throw e ; }

Manejar cualquier ioxceptions lanzado.<P> Este método proporciona un punto para implementar el manejo de excepciones personalizados.El comportamiento predeterminado es volver a lanzar la excepción.


public boolean isSynchronized  ( ) { return Modifier . isSynchronized ( this . getModifiers ( ) ) ; }

Método de conveniencia que se devuelve VERDADERO si este método está sincronizado.


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

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


public static CacheHeader readHeader  ( InputStream is ) throws IOException { CacheHeader entry = new CacheHeader ( ) ; int magic = readInt ( is ) ; if ( magic != CACHE_MAGIC ) { throw new IOException ( ) ; } entry . key = readString ( is ) ; entry . etag = readString ( is ) ; if ( entry . etag . equals ( "" ) ) { entry . etag = null ; } entry . serverDate = readLong ( is ) ; entry . lastModified = readLong ( is ) ; entry . ttl = readLong ( is ) ; entry . softTtl = readLong ( is ) ; entry . responseHeaders = readStringStringMap ( is ) ; return entry ; }

Lea el encabezado de un ingreso de entrada y devuelve un objeto CacheHeader.


public float computeDistanceTo  ( float x , float y ) { final RectF bounds = getClickTargetBounds ( ) ; float dx = Math . max ( bounds . left - x , x - bounds . right ) ; float dy = Math . max ( bounds . top - y , y - bounds . bottom ) ; return Math . max ( 0.0f , Math . max ( dx , dy ) ) ; }

Calcula la distancia manhattan-ish al borde de la pestaña.Esta distancia es lo suficientemente buena para la detección de clics.


public boolean isSensor  ( ) { return this . sensor ; }

Devuelve VERDADERO si este accesorio es un sensor.<p /> Un accesorio de sensor es un accesorio que participa en la detección de colisiones, pero no participa en la resolución de colisiones (respuesta).


public static ValueCompressonHolder . UnCompressValue unCompressMaxMin  ( DataType compDataType , DataType actualDataType ) { switch ( compDataType ) { case DATA_BYTE : return new UnCompressMaxMinByte ( ) ; case DATA_SHORT : return new UnCompressMaxMinShort ( ) ; case DATA_INT : return new UnCompressMaxMinInt ( ) ; case DATA_LONG : return new UnCompressMaxMinLong ( ) ; case DATA_FLOAT : return new UnCompressMaxMinFloat ( ) ; default : return new UnCompressMaxMinDefault ( ) ; } }

Datos de descompresión 1. Valor = MAXVALUE - Subvalimue 2. Valor: int-> doble


public final boolean contains  ( Node n ) { return s . contains ( n ) ; }

Devuelve VERDADERO IFF El conjunto contiene n.


public void closeAllTabs  ( boolean animate , boolean uponExit , boolean canUndo ) { for ( int i = 0 ; i < getCount ( ) ; i ++ ) getTabAt ( i ) . setClosing ( true ) ; ArrayList < Integer > closedTabs = new ArrayList < Integer > ( ) ; while ( getCount ( ) > 0 ) { Tab tab = getTabAt ( 0 ) ; closedTabs . add ( tab . getId ( ) ) ; closeTab ( tab , animate , uponExit , canUndo , false ) ; } if ( ! uponExit && canUndo && supportsPendingClosures ( ) ) { for ( TabModelObserver obs : mObservers ) obs . allTabsPendingClosure ( closedTabs ) ; } }

Cierre todas las pestañas en este modelo sin notificar a los observadores sobre los cierres de pestañas pendientes.


public PhotosGetUserPhotosQuery extended  ( Boolean value ) { return unsafeParam ( "extended" , value ) ; }

Devuelve un campo adicional de "le gusta"


@ Override protected void runImpl  ( ) { AionConnection client = getConnection ( ) ; Account account = client . getAccount ( ) ; if ( client . getActivePlayer ( ) != null ) { return ; } if ( ! this . isCreate ) { client . sendPacket ( new SM_CREATE_CHARACTER ( null , SM_CREATE_CHARACTER . RESPONSE_CREATE_CHAR ) ) ; IDFactory . getInstance ( ) . releaseId ( this . playerCommonData . getPlayerObjId ( ) ) ; return ; } if ( account . getMembership ( ) >= MembershipConfig . CHARACTER_ADDITIONAL_ENABLE ) { if ( MembershipConfig . CHARACTER_ADDITIONAL_COUNT <= account . size ( ) ) { client . sendPacket ( new SM_CREATE_CHARACTER ( null , SM_CREATE_CHARACTER . RESPONSE_SERVER_LIMIT_EXCEEDED ) ) ; IDFactory . getInstance ( ) . releaseId ( playerCommonData . getPlayerObjId ( ) ) ; return ; } } else if ( GSConfig . CHARACTER_LIMIT_COUNT <= account . size ( ) ) { client . sendPacket ( new SM_CREATE_CHARACTER ( null , SM_CREATE_CHARACTER . RESPONSE_SERVER_LIMIT_EXCEEDED ) ) ; IDFactory . getInstance ( ) . releaseId ( playerCommonData . getPlayerObjId ( ) ) ; return ; } if ( ! PlayerService . isFreeName ( playerCommonData . getName ( ) ) ) { if ( GSConfig . CHARACTER_CREATION_MODE == 2 ) { client . sendPacket ( new SM_CREATE_CHARACTER ( null , SM_CREATE_CHARACTER . RESPONSE_NAME_RESERVED ) ) ; } else { client . sendPacket ( new SM_CREATE_CHARACTER ( null , SM_CREATE_CHARACTER . RESPONSE_NAME_ALREADY_USED ) ) ; } IDFactory . getInstance ( ) . releaseId ( playerCommonData . getPlayerObjId ( ) ) ; return ; } if ( PlayerService . isOldName ( playerCommonData . getName ( ) ) ) { client . sendPacket ( new SM_CREATE_CHARACTER ( null , SM_CREATE_CHARACTER . RESPONSE_NAME_ALREADY_USED ) ) ; IDFactory . getInstance ( ) . releaseId ( playerCommonData . getPlayerObjId ( ) ) ; return ; } if ( ! NameRestrictionService . isValidName ( playerCommonData . getName ( ) ) ) { client . sendPacket ( new SM_CREATE_CHARACTER ( null , SM_CREATE_CHARACTER . RESPONSE_INVALID_NAME ) ) ; IDFactory . getInstance ( ) . releaseId ( playerCommonData . getPlayerObjId ( ) ) ; return ; } if ( NameRestrictionService . isForbiddenWord ( playerCommonData . getName ( ) ) ) { client . sendPacket ( new SM_CREATE_CHARACTER ( null , SM_CREATE_CHARACTER . RESPONSE_FORBIDDEN_CHAR_NAME ) ) ; IDFactory . getInstance ( ) . releaseId ( playerCommonData . getPlayerObjId ( ) ) ; return ; } if ( ! playerCommonData . getPlayerClass ( ) . isStartingClass ( ) ) { client . sendPacket ( new SM_CREATE_CHARACTER ( null , SM_CREATE_CHARACTER . FAILED_TO_CREATE_THE_CHARACTER ) ) ; IDFactory . getInstance ( ) . releaseId ( playerCommonData . getPlayerObjId ( ) ) ; return ; } if ( GSConfig . CHARACTER_CREATION_MODE == 0 ) { for ( PlayerAccountData data : account . getSortedAccountsList ( ) ) { if ( data . getPlayerCommonData ( ) . getRace ( ) != playerCommonData . getRace ( ) ) { client . sendPacket ( new SM_CREATE_CHARACTER ( null , SM_CREATE_CHARACTER . FAILED_TO_CREATE_THE_CHARACTER ) ) ; IDFactory . getInstance ( ) . releaseId ( playerCommonData . getPlayerObjId ( ) ) ; return ; } } } AccountService . removeDeletedCharacters ( account ) ; Player player = PlayerService . newPlayer ( playerCommonData , playerAppearance , account ) ; if ( ! PlayerService . storeNewPlayer ( player , account . getName ( ) , account . getId ( ) ) ) { client . sendPacket ( new SM_CREATE_CHARACTER ( null , SM_CREATE_CHARACTER . RESPONSE_DB_ERROR ) ) ; IDFactory . getInstance ( ) . releaseId ( playerCommonData . getPlayerObjId ( ) ) ; } else { List < Item > equipment = DAOManager . getDAO ( InventoryDAO . class ) . loadEquipment ( player . getObjectId ( ) ) ; PlayerAccountData accPlData = new PlayerAccountData ( playerCommonData , null , playerAppearance , equipment , null ) ; accPlData . setCreationDate ( new Timestamp ( System . currentTimeMillis ( ) ) ) ; PlayerService . storeCreationTime ( player . getObjectId ( ) , accPlData . getCreationDate ( ) ) ; account . addPlayerAccountData ( accPlData ) ; client . sendPacket ( new SM_CREATE_CHARACTER ( accPlData , SM_CREATE_CHARACTER . RESPONSE_OK ) ) ; } }


static int [ ] sortUnique  ( int [ ] list ) { Arrays . sort ( list ) ; int count = 1 ; for ( int i = 1 ; i < list . length ; i ++ ) { if ( list [ i ] != list [ i - 1 ] ) { count ++ ; } } int [ ] ret = new int [ count ] ; count = 1 ; ret [ 0 ] = list [ 0 ] ; for ( int i = 1 ; i < list . length ; i ++ ) { if ( list [ i ] != list [ i - 1 ] ) { ret [ count ++ ] = list [ i ] ; } } return ret ; }

Ordenar una lista de enteros y eliminar duplicados


public XmlStreamWriter ( File file , String defaultEncoding ) throws FileNotFoundException { this ( new FileOutputStream ( file ) , defaultEncoding ) ; }

Construya un nuevo escritor XML Stream para el archivo especificado con la codificación predeterminada especificada.


public static Map < String , Object > cleanSyncRemoveInfo  ( DispatchContext dctx , Map < String , ? extends Object > context ) { Debug . logInfo ( "Running cleanSyncRemoveInfo" , module ) ; Delegator delegator = dctx . getDelegator ( ) ; Locale locale = ( Locale ) context . get ( "locale" ) ; try { double keepRemoveInfoHours = 24 ; List < GenericValue > entitySyncRemoveList = EntityQuery . use ( delegator ) . from ( "EntitySync" ) . queryList ( ) ; for ( GenericValue entitySyncRemove : entitySyncRemoveList ) { Double curKrih = entitySyncRemove . getDouble ( "keepRemoveInfoHours" ) ; if ( curKrih != null ) { double curKrihVal = curKrih . doubleValue ( ) ; if ( curKrihVal > keepRemoveInfoHours ) { keepRemoveInfoHours = curKrihVal ; } } } int keepSeconds = ( int ) Math . floor ( keepRemoveInfoHours * 3600 ) ; Calendar nowCal = Calendar . getInstance ( ) ; nowCal . setTimeInMillis ( System . currentTimeMillis ( ) ) ; nowCal . add ( Calendar . SECOND , - keepSeconds ) ; Timestamp keepAfterStamp = new Timestamp ( nowCal . getTimeInMillis ( ) ) ; int numRemoved = delegator . removeByCondition ( "EntitySyncRemove" , EntityCondition . makeCondition ( ModelEntity . STAMP_TX_FIELD , EntityOperator . LESS_THAN , keepAfterStamp ) ) ; Debug . logInfo ( "In cleanSyncRemoveInfo removed [" + numRemoved + "] values with TX timestamp before [" + keepAfterStamp + "]" , module ) ; return ServiceUtil . returnSuccess ( ) ; } catch ( GenericEntityException e ) { Debug . logError ( e , "Error cleaning out EntitySyncRemove info: " + e . toString ( ) , module ) ; return ServiceUtil . returnError ( UtilProperties . getMessage ( resource , "EntityExtErrorCleaningEntitySyncRemove" , UtilMisc . toMap ( "errorString" , e . toString ( ) ) , locale ) ) ; } }


@ Override public void apply  ( NexusStreamParser np ) throws Exception { np . matchIgnoreCase ( "set contract-gaps=" ) ; boolean collapse = np . getBoolean ( ) ; np . matchIgnoreCase ( ";" ) ; AlignmentViewer viewer = ( AlignmentViewer ) getViewer ( ) ; viewer . getAlignmentViewerPanel ( ) . getSelectedBlock ( ) . clear ( ) ; viewer . setContractGaps ( collapse ) ; }


@ Nullable public Object loadClass  ( String className , Class < ? > [ ] constructorSignature , Object [ ] constructorArgs ) throws ClassNotFoundException { if ( RecyclerViewHelper . CN_RV_ADAPTER . equals ( className ) ) { className = RecyclerViewHelper . CN_CUSTOM_ADAPTER ; constructorSignature = ArrayUtil . EMPTY_CLASS_ARRAY ; constructorArgs = ArrayUtil . EMPTY_OBJECT_ARRAY ; } return loadClass ( className , constructorSignature , constructorArgs , false ) ; }

Al igual que LoadView, pero no registra las excepciones si falla y no intenta crear una vista simulada.


void ack  ( ) { this . ackTimeoutRegistry . clear ( Topic . RPC , Actions . REQUEST , this . uid ) ; }

Llamado una vez que se recibe un mensaje ACK del servidor. <br/>


public void onButtonClick  ( View v ) { if ( mBound ) { int num = mService . getRandomNumber ( ) ; Toast . makeText ( this , "number: " + num , Toast . LENGTH_SHORT ) . show ( ) ; } }

Llamado cuando se hace clic en un botón (el botón en el archivo de diseño se adhiere a este método con Android: ONCLICK ATTRIBT)


public List < Object > splitByTextualElems  ( String text , Map < String , Map < String , Object > > entryMap , Map < String , Map < String , Object > > libMap , Map < String , Object > libInfo ) { List < Object > res ; Map < String , Object > modelMap ; List < Object > prevSplit ; msgHandler . logDebug ( "====================================\n" + "splitByTextualElems: " + ( text . length ( ) > 400 ? text . substring ( 0 , 399 ) : text ) + "\n" + "====================================" ) ; modelMap = FtlDocFileParser . makeObjectMap ( ) ; modelMap . put ( "type" , "text-raw" ) ; res = splitByPat ( text , rawTextPat , modelMap , "origText" , "value" ) ; prevSplit = res ; res = new ArrayList < > ( ) ; modelMap = FtlDocFileParser . makeObjectMap ( ) ; modelMap . put ( "type" , "text-plain" ) ; for ( Object part : prevSplit ) { if ( part instanceof String ) { List < Object > listSplit = splitByPat ( ( String ) part , plainTextPat , modelMap , "origText" , "value" ) ; res . addAll ( listSplit ) ; } else { res . add ( part ) ; } } prevSplit = res ; res = new ArrayList < > ( ) ; modelMap = FtlDocFileParser . makeObjectMap ( ) ; modelMap . put ( "type" , "text-code" ) ; for ( Object part : prevSplit ) { if ( part instanceof String ) { List < Object > listSplit = splitByPat ( ( String ) part , codeTextPat , modelMap , "origText" , "value" ) ; res . addAll ( listSplit ) ; } else { res . add ( part ) ; } } prevSplit = res ; res = new ArrayList < > ( ) ; for ( Object part : prevSplit ) { if ( part instanceof String ) { List < Object > listSplit = splitByLibEntryRefs ( ( String ) part , entryMap , libMap ) ; res . addAll ( listSplit ) ; } else { res . add ( part ) ; } } prevSplit = res ; res = new ArrayList < > ( ) ; modelMap = FtlDocFileParser . makeObjectMap ( ) ; modelMap . put ( "type" , "link" ) ; for ( Object part : prevSplit ) { if ( part instanceof String ) { List < Object > listSplit = splitByPat ( ( String ) part , linkManualPat , modelMap , "origText" , "value" ) ; List < Object > fixupListSplit = new ArrayList < Object > ( ) ; for ( Object listObj : listSplit ) { fixupListSplit . add ( fixupLink ( listObj , entryMap , libMap , libInfo ) ) ; } res . addAll ( fixupListSplit ) ; } else { res . add ( part ) ; } } prevSplit = res ; res = new ArrayList < > ( ) ; modelMap = FtlDocFileParser . makeObjectMap ( ) ; modelMap . put ( "type" , "link" ) ; for ( Object part : prevSplit ) { if ( part instanceof String ) { List < Object > listSplit = splitByPat ( ( String ) part , linkAutoPat , modelMap , "origText" , null , "value" ) ; List < Object > fixupListSplit = new ArrayList < Object > ( ) ; for ( Object listObj : listSplit ) { fixupListSplit . add ( fixupLink ( listObj , entryMap , libMap , libInfo ) ) ; } res . addAll ( fixupListSplit ) ; } else { res . add ( part ) ; } } return res ; }


public CombiningCursor queryCombinings  ( ) { QueryHelper qh = new QueryHelper ( ) ; qh . Columns = null ; qh . Table = S . TABLE_COMBINING ; qh . Selection = null ; qh . SelectionArgs = null ; qh . GroupBy = null ; qh . Having = null ; qh . OrderBy = null ; qh . Limit = null ; return new CombiningCursor ( wrapJoinHelper ( builderCursor ( ) , qh ) ) ; }


public static String toString  ( InputStream input , Charset encoding ) throws IOException { StringBuilderWriter sw = new StringBuilderWriter ( ) ; copy ( input , sw , encoding ) ; return sw . toString ( ) ; }

Obtenga los contenidos de un <código> inputstream </ code> como una cadena usando la codificación de caracteres especificada.<p> Este método almacena la entrada internamente, por lo que no es necesario usar un <código> tamponputStream </ Code>.</ p>


public int apply  ( ProgressListener progress ) throws CanceledException { final Graph overlapGraphWorkingCopy = new Graph ( ) ; final NodeMap < Node > new2oldNode = new NodeMap < > ( overlapGraphWorkingCopy ) ; final EdgeMap < Edge > new2oldEdge = new EdgeMap < > ( overlapGraphWorkingCopy ) ; { progress . setSubtask ( "Copying graph" ) ; progress . setMaximum ( overlapGraph . getNumberOfNodes ( ) + overlapGraph . getNumberOfEdges ( ) ) ; progress . setProgress ( 0 ) ; NodeMap < Node > old2newNode = new NodeMap < > ( this . overlapGraph ) ; for ( Node v = this . overlapGraph . getFirstNode ( ) ; v != null ; v = this . overlapGraph . getNextNode ( v ) ) { final Node w = overlapGraphWorkingCopy . newNode ( v . getInfo ( ) ) ; w . setData ( v . getData ( ) ) ; new2oldNode . set ( w , v ) ; old2newNode . set ( v , w ) ; progress . incrementProgress ( ) ; } for ( Edge e = this . overlapGraph . getFirstEdge ( ) ; e != null ; e = this . overlapGraph . getNextEdge ( e ) ) { final Edge f = overlapGraphWorkingCopy . newEdge ( old2newNode . get ( e . getSource ( ) ) , old2newNode . get ( e . getTarget ( ) ) , e . getInfo ( ) ) ; new2oldEdge . set ( f , e ) ; progress . incrementProgress ( ) ; } } if ( progress instanceof ProgressPercentage ) ( ( ProgressPercentage ) progress ) . reportTaskCompleted ( ) ; progress . setSubtask ( "Extracting paths" ) ; progress . setMaximum ( overlapGraphWorkingCopy . getNumberOfNodes ( ) ) ; progress . setProgress ( 0 ) ; final List < Node > toDelete = new ArrayList < > ( overlapGraphWorkingCopy . getNumberOfNodes ( ) ) ; final EdgeMap < Integer > edgeWeights = new EdgeMap < > ( overlapGraphWorkingCopy ) ; for ( Node v = overlapGraphWorkingCopy . getFirstNode ( ) ; v != null ; v = v . getNext ( ) ) { if ( v . getInDegree ( ) == 0 ) { visitNodesRec ( v , edgeWeights ) ; } progress . incrementProgress ( ) ; } if ( progress instanceof ProgressPercentage ) ( ( ProgressPercentage ) progress ) . reportTaskCompleted ( ) ; final List < Node [ ] > pathsList = new ArrayList < > ( ) ; progress . setSubtask ( "Extracting paths" ) ; final int initialNumberOfEdges = overlapGraphWorkingCopy . getNumberOfEdges ( ) ; progress . setMaximum ( initialNumberOfEdges ) ; progress . setProgress ( 0 ) ; while ( overlapGraphWorkingCopy . getNumberOfEdges ( ) > 0 ) { Edge bestEdge = overlapGraphWorkingCopy . getFirstEdge ( ) ; for ( Edge e = overlapGraphWorkingCopy . getFirstEdge ( ) ; e != null ; e = overlapGraphWorkingCopy . getNextEdge ( e ) ) { if ( edgeWeights . get ( e ) > edgeWeights . get ( bestEdge ) ) bestEdge = e ; } Node v = bestEdge . getSource ( ) ; final List < Node > path = new ArrayList < > ( ) ; path . add ( new2oldNode . get ( bestEdge . getSource ( ) ) ) ; int weight = edgeWeights . get ( bestEdge ) ; while ( v . getOutDegree ( ) > 0 ) { Node w = null ; for ( Edge f = v . getFirstOutEdge ( ) ; f != null ; f = v . getNextOutEdge ( f ) ) { int eWeight = edgeWeights . get ( f ) ; if ( eWeight == weight ) { w = f . getTarget ( ) ; weight -= ( Integer ) f . getInfo ( ) ; break ; } } if ( w == null ) throw new RuntimeException ( "w==null" ) ; path . add ( new2oldNode . get ( w ) ) ; toDelete . add ( v ) ; v = w ; } toDelete . add ( v ) ; for ( Node z : toDelete ) { overlapGraphWorkingCopy . deleteNode ( z ) ; } toDelete . clear ( ) ; for ( Edge z = overlapGraphWorkingCopy . getFirstEdge ( ) ; z != null ; z = z . getNext ( ) ) { edgeWeights . set ( z , null ) ; } for ( Node z = overlapGraphWorkingCopy . getFirstNode ( ) ; z != null ; z = z . getNext ( ) ) { if ( z . getInDegree ( ) == 0 ) { visitNodesRec ( z , edgeWeights ) ; } } pathsList . add ( path . toArray ( new Node [ path . size ( ) ] ) ) ; progress . setProgress ( initialNumberOfEdges - overlapGraphWorkingCopy . getNumberOfEdges ( ) ) ; } if ( progress instanceof ProgressPercentage ) ( ( ProgressPercentage ) progress ) . reportTaskCompleted ( ) ; final List < Node > singletonList = new ArrayList < > ( ) ; for ( Node v = overlapGraphWorkingCopy . getFirstNode ( ) ; v != null ; v = overlapGraphWorkingCopy . getNextNode ( v ) ) { int readId = ( Integer ) v . getInfo ( ) ; if ( readId2ContainedReads != null && readId < readId2ContainedReads . length && readId2ContainedReads [ readId ] != null && readId2ContainedReads [ readId ] . size ( ) > 0 ) pathsList . add ( new Node [ ] { v } ) ; else singletonList . add ( new2oldNode . get ( v ) ) ; } paths = pathsList . toArray ( new Node [ pathsList . size ( ) ] [ ] ) ; singletons = singletonList . toArray ( new Node [ singletonList . size ( ) ] ) ; return paths . length ; }

Determina las rutas a través del gráfico El algoritmo determina la ruta más larga entre cualquier lectura de inicio y cualquier lectura final, donde la longitud está dada por el número total de bases superpuestas en pares en la ruta


public Vector2f zero  ( ) { x = y = 0 ; return this ; }

<CÓDIGO> Cero </ code> restablece los datos de este vector a cero internamente.


@ Override public double cost  ( Target target , Unit unit ) { if ( ! ( target instanceof HalfPhoneTarget ) ) throw new IllegalArgumentException ( "This target cost function can only be called for half-phone targets!" ) ; HalfPhoneTarget hpTarget = ( HalfPhoneTarget ) target ; boolean isLeftHalf = hpTarget . isLeftHalf ( ) ; FeatureDefinition weights = isLeftHalf ? leftWeights : rightWeights ; WeightFunc [ ] weightFunctions = isLeftHalf ? leftWeightFunction : rightWeightFunction ; return cost ( target , unit , weights , weightFunctions ) ; }

Calcular la bondad de ajuste de una unidad dada para un objetivo determinado.


protected Criteria createCriteriaInternal  ( ) { Criteria criteria = new Criteria ( ) ; return criteria ; }

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


@ SuppressWarnings ( { "unchecked" , "cast" } ) public MinusExpr fullCopy  ( ) { MinusExpr tree = ( MinusExpr ) 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.


@ Override public void addDictionaryChunk  ( List < byte [ ] > newDictionaryChunk ) { if ( dictionaryChunks . size ( ) > 0 ) { List < byte [ ] > lastDictionaryChunk = dictionaryChunks . get ( dictionaryChunks . size ( ) - 1 ) ; int dictionaryOneChunkSize = CarbonUtil . getDictionaryChunkSize ( ) ; int differenceInLastDictionaryAndOneChunkSize = dictionaryOneChunkSize - lastDictionaryChunk . size ( ) ; if ( differenceInLastDictionaryAndOneChunkSize > 0 ) { if ( differenceInLastDictionaryAndOneChunkSize >= newDictionaryChunk . size ( ) ) { lastDictionaryChunk . addAll ( newDictionaryChunk ) ; } else { List < byte [ ] > subListOfNewDictionaryChunk = newDictionaryChunk . subList ( 0 , differenceInLastDictionaryAndOneChunkSize ) ; lastDictionaryChunk . addAll ( subListOfNewDictionaryChunk ) ; List < byte [ ] > remainingNewDictionaryChunk = newDictionaryChunk . subList ( differenceInLastDictionaryAndOneChunkSize , newDictionaryChunk . size ( ) ) ; dictionaryChunks . add ( remainingNewDictionaryChunk ) ; } } else { dictionaryChunks . add ( newDictionaryChunk ) ; } } else { dictionaryChunks . add ( newDictionaryChunk ) ; } }

Este método agregará un nuevo trozo de diccionario a la lista existente de trozos del diccionario


private FilterType isDifferentArrayValue  ( final SourceDataTag currentTag , final Object newValue ) { FilterType filtering = null ; SourceDataTagValue currentSDValue = currentTag . getCurrentValue ( ) ; if ( currentSDValue . getValue ( ) == null && newValue != null ) { this . equipmentLogger . trace ( "isCandidateForFiltering - Tag " + currentSDValue . getId ( ) + " - Current Value null but we have a New value. Not candidate for filtering" ) ; return FilterType . NO_FILTERING ; } else if ( currentSDValue . getValue ( ) != null && currentSDValue . getValue ( ) . getClass ( ) . isArray ( ) && newValue . getClass ( ) . isArray ( ) ) { if ( ! Arrays . equals ( ( Object [ ] ) currentSDValue . getValue ( ) , ( Object [ ] ) newValue ) ) { this . equipmentLogger . trace ( "isCandidateForFiltering - Tag " + currentSDValue . getId ( ) + " - Both Values are different (Current vs New) = (" + currentSDValue . getValue ( ) + " vs " + newValue + "). Not candidate for filtering" ) ; return FilterType . NO_FILTERING ; } } else if ( currentSDValue . getValue ( ) != null ) { if ( ! currentSDValue . getValue ( ) . equals ( newValue ) ) { this . equipmentLogger . trace ( "isCandidateForFiltering - Tag " + currentSDValue . getId ( ) + " - Both Values are different (Current vs New) = (" + currentSDValue . getValue ( ) + " vs " + newValue + "). Not candidate for filtering" ) ; return FilterType . NO_FILTERING ; } } return filtering ; }

Método de ayuda que compara los valores de la nueva DataTag y el Vale de la anterior.El tipo de valor es complejo, lo que significa que es una matriz o un objeto arbitrario.


public void cancelCurrentSkill  ( ) { if ( getOwner ( ) . getCastingSkill ( ) == null ) { return ; } Creature creature = getOwner ( ) ; Skill castingSkill = creature . getCastingSkill ( ) ; castingSkill . cancelCast ( ) ; creature . removeSkillCoolDown ( castingSkill . getSkillTemplate ( ) . getCooldownId ( ) ) ; creature . setCasting ( null ) ; PacketSendUtility . broadcastPacketAndReceive ( creature , new SM_SKILL_CANCEL ( creature , castingSkill . getSkillTemplate ( ) . getSkillId ( ) ) ) ; if ( getOwner ( ) . getAi2 ( ) instanceof NpcAI2 ) { NpcAI2 npcAI = ( NpcAI2 ) getOwner ( ) . getAi2 ( ) ; npcAI . setSubStateIfNot ( AISubState . NONE ) ; npcAI . onGeneralEvent ( AIEventType . ATTACK_COMPLETE ) ; if ( creature . getSkillNumber ( ) > 0 ) { creature . setSkillNumber ( creature . getSkillNumber ( ) - 1 ) ; } } }

Cancelar la habilidad actual y eliminar el tiempo de reutilización


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

Calcule la distancia entre dos vectores de acuerdo con la norma L <SUB> 2 </ SUB>.<p> Llamar a este método es equivalente a llamar: <CÓDIGO> P1.SUBTRAT (P2) .getnorm () </ código> Excepto que no se construye un vector intermedio </ P>


private static String replaceAll  ( String source , String search , String replace ) { if ( USE_REPLACE_ALL ) { return source . replaceAll ( search , replace ) ; } else { Pattern p = Pattern . compile ( search ) ; Matcher m = p . matcher ( source ) ; StringBuffer sb = new StringBuffer ( ) ; boolean atLeastOneFound = false ; while ( m . find ( ) ) { m . appendReplacement ( sb , replace ) ; atLeastOneFound = true ; } if ( atLeastOneFound ) { m . appendTail ( sb ) ; return sb . toString ( ) ; } else { return source ; } } }

Un algoritmo optimizado de memoria para string.replaceall


public static boolean clearIfNotModified  ( HttpServletRequest request , HttpServletResponse response , Collection < ? extends IdentifiableObject > objects ) { String tag = QUOTE + IdentifiableObjectUtils . getLastUpdatedTag ( objects ) + QUOTE ; response . setHeader ( HEADER_ETAG , tag ) ; String inputTag = request . getHeader ( HEADER_IF_NONE_MATCH ) ; if ( objects != null && inputTag != null && inputTag . equals ( tag ) ) { response . setStatus ( HttpServletResponse . SC_NOT_MODIFIED ) ; objects . clear ( ) ; return true ; } return false ; }

Borra la colección dada si no se modifica de acuerdo con la validación HTTP Cache.Este método busca la ETAG enviada en la solicitud del valor del encabezado "IF-None-Match", genera una ETAG en función de la colección de identificaciones identificadas y las compara para la igualdad.Si esto se evalúa a VERDADERO, establecerá el código de estado 304 no modificado en la respuesta y eliminará todos los elementos de la lista dada.Establecerá el encabezado ETAG en cualquier caso.


public SVNChangeSetCollector ( ISynchronizePageConfiguration configuration ) { super ( configuration ) ; }

Construye un nuevo SVNCHGESETCollector utilizado para recopilar conjuntos de cambios entrantes


protected AuthRestoreQuery phone  ( String value ) { return unsafeParam ( "phone" , value ) ; }


public static Map < String , Object > createFile  ( DispatchContext dctx , Map < String , ? extends Object > context ) { return createFileMethod ( dctx , context ) ; }

Una envoltura de servicio para el método CreateFileTethod.Permisos de las fuerzas a verificar.


public static void shareProject  ( ISVNRepositoryLocation location , IProject project , String remoteDirName , String comment , boolean createDirectory , IProgressMonitor monitor ) throws TeamException { ShareProjectCommand command = new ShareProjectCommand ( location , project , remoteDirName , createDirectory ) ; command . setComment ( comment ) ; command . run ( monitor ) ; }

Cree un directorio remoto en el repositorio SVN y vincule el directorio del proyecto a este directorio remoto.Los contenidos del proyecto no se importan.Si REMOTEDIRNAME es nulo, el nombre del proyecto se usa si la ubicación no está en los repositorios, se agrega


public static void forceDeleteOnExit  ( File file ) throws IOException { if ( file . isDirectory ( ) ) { deleteDirectoryOnExit ( file ) ; } else { file . deleteOnExit ( ) ; } }

Horarios un archivo que se eliminará cuando salga JVM.Si el archivo es directorio, elimínelo y todos los subdirectorios.


public final void yybegin  ( int newState ) { zzLexicalState = newState ; }


private void needNewBuffer  ( int newcount ) { if ( currentBufferIndex < buffers . size ( ) - 1 ) { filledBufferSum += currentBuffer . length ; currentBufferIndex ++ ; currentBuffer = buffers . get ( currentBufferIndex ) ; } else { int newBufferSize ; if ( currentBuffer == null ) { newBufferSize = newcount ; filledBufferSum = 0 ; } else { newBufferSize = Math . max ( currentBuffer . length << 1 , newcount - filledBufferSum ) ; filledBufferSum += currentBuffer . length ; } currentBufferIndex ++ ; currentBuffer = new byte [ newBufferSize ] ; buffers . add ( currentBuffer ) ; } }

Hace un nuevo búfer disponible ya sea al asignar uno nuevo o reciclando uno existente.


public LogControllerTest ( ) { testLines = new String [ numOfLines ] ; for ( int i = 0 ; i < numOfLines ; i ++ ) { testLines [ i ] = "Test Line " + i ; } }

Instanciate un LogControllertest y genera las líneas de prueba.


public void endScope  ( ) { if ( isEnding || holdCount > 0 ) { return ; } isEnding = true ; for ( int i = scopes . size ( ) - 1 ; i >= 0 ; i -- ) { scopes . get ( i ) . onScopeEnd ( this ) ; } if ( parentContext != null && hasErrors && propagatesErrors ) { parentContext . setHasError ( ) ; } }


protected boolean enabledForChrome  ( Context context ) { if ( mAndroidPermission . isEmpty ( ) ) return true ; return permissionOnInAndroid ( mAndroidPermission , context ) ; }

Devuelve si un permiso está habilitado para Chrome específicamente.


@ SuppressWarnings ( "rawtypes" ) public static void validateField  ( Param param , Object value ) { if ( value == null ) { return ; } Class acceptingClass = ACCEPTING_FIELDS . get ( param ) ; if ( ! acceptingClass . isInstance ( value ) ) { String message = String . format ( "%s expects type %s but found %s" , param . getName ( ) , acceptingClass . getName ( ) , value . getClass ( ) . getName ( ) ) ; throw new IllegalArgumentException ( message ) ; } }

Validar que el campo y el valor dado se permiten en el contexto.


public OpenMapRealVector subtract  ( OpenMapRealVector v ) throws MathIllegalArgumentException  { checkVectorDimensions ( v . getDimension ( ) ) ; OpenMapRealVector res = copy ( ) ; Iterator iter = v . getEntries ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { iter . advance ( ) ; int key = iter . key ( ) ; if ( entries . containsKey ( key ) ) { res . setEntry ( key , entries . get ( key ) - iter . value ( ) ) ; } else { res . setEntry ( key , - iter . value ( ) ) ; } } return res ; }

Método optimizado para restar OpenMaprealvectores.


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 static IndeterminateProgressDialog newInstance  ( int messageId , boolean cancelable ) { IndeterminateProgressDialog fragment = new IndeterminateProgressDialog ( ) ; fragment . setStyle ( DialogFragment . STYLE_NO_FRAME , R . style . ownCloud_AlertDialog ) ; Bundle args = new Bundle ( ) ; args . putInt ( ARG_MESSAGE_ID , messageId ) ; args . putBoolean ( ARG_CANCELABLE , cancelable ) ; fragment . setArguments ( args ) ; return fragment ; }

Método de fábrica pública para obtener instancias de diálogo.


private void createField  ( String key , String labelString ) { int row = textFieldMap . size ( ) ; int y = row * ROW_HEIGHT ; JLabel label = new JLabel ( labelString ) ; label . setBounds ( LABEL_X , y , LABEL_WIDTH , FIELD_HEIGHT ) ; panel . add ( label ) ; JTextField textField = new JTextField ( ) ; textField . setBounds ( FIELD_X , y , FIELD_WIDTH , FIELD_HEIGHT ) ; textFieldMap . put ( key , textField ) ; panel . add ( textField ) ; }


public boolean isHighlightEnabled  ( ) { for ( int i = 0 , size = mDataSets . size ( ) ; i < size ; i ++ ) { T set = mDataSets . get ( i ) ; if ( ! set . isHighlightEnabled ( ) ) { return false ; } } return true ; }

Devuelve VERDADERO Si resaltar todos los valores subyacentes está habilitado, Falso, si no.


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

Número de zoom mínimo.</BR> Predeterminado 0


public void invalidateWheel  ( boolean clearCaches ) { if ( clearCaches ) { recycle . clearAll ( ) ; if ( itemsLayout != null ) { itemsLayout . removeAllViews ( ) ; } scrollingOffset = 0 ; } else if ( itemsLayout != null ) { recycle . recycleItems ( itemsLayout , firstItem , new ItemsRange ( ) ) ; } invalidate ( ) ; }


protected MessagesGetChatUsersQueryWithFields fields  ( UserField ... value ) { return unsafeParam ( "fields" , value ) ; }


public static double sinh  ( double x ) { boolean negate = false ; if ( Double . isNaN ( x ) ) { return x ; } if ( x > 20 ) { if ( x >= LOG_MAX_VALUE ) { final double t = exp ( 0.5 * x ) ; return ( 0.5 * t ) * t ; } else { return 0.5 * exp ( x ) ; } } else if ( x < - 20 ) { if ( x <= - LOG_MAX_VALUE ) { final double t = exp ( - 0.5 * x ) ; return ( - 0.5 * t ) * t ; } else { return - 0.5 * exp ( - x ) ; } } if ( x == 0 ) { return x ; } if ( x < 0.0 ) { x = - x ; negate = true ; } double result ; if ( x > 0.25 ) { double hiPrec [ ] = new double [ 2 ] ; exp ( x , 0.0 , hiPrec ) ; double ya = hiPrec [ 0 ] + hiPrec [ 1 ] ; double yb = - ( ya - hiPrec [ 0 ] - hiPrec [ 1 ] ) ; double temp = ya * HEX_40000000 ; double yaa = ya + temp - temp ; double yab = ya - yaa ; double recip = 1.0 / ya ; temp = recip * HEX_40000000 ; double recipa = recip + temp - temp ; double recipb = recip - recipa ; recipb += ( 1.0 - yaa * recipa - yaa * recipb - yab * recipa - yab * recipb ) * recip ; recipb += - yb * recip * recip ; recipa = - recipa ; recipb = - recipb ; temp = ya + recipa ; yb += - ( temp - ya - recipa ) ; ya = temp ; temp = ya + recipb ; yb += - ( temp - ya - recipb ) ; ya = temp ; result = ya + yb ; result *= 0.5 ; } else { double hiPrec [ ] = new double [ 2 ] ; expm1 ( x , hiPrec ) ; double ya = hiPrec [ 0 ] + hiPrec [ 1 ] ; double yb = - ( ya - hiPrec [ 0 ] - hiPrec [ 1 ] ) ; double denom = 1.0 + ya ; double denomr = 1.0 / denom ; double denomb = - ( denom - 1.0 - ya ) + yb ; double ratio = ya * denomr ; double temp = ratio * HEX_40000000 ; double ra = ratio + temp - temp ; double rb = ratio - ra ; temp = denom * HEX_40000000 ; double za = denom + temp - temp ; double zb = denom - za ; rb += ( ya - za * ra - za * rb - zb * ra - zb * rb ) * denomr ; rb += yb * denomr ; rb += - ya * denomb * denomr * denomr ; temp = ya + ra ; yb += - ( temp - ya - ra ) ; ya = temp ; temp = ya + rb ; yb += - ( temp - ya - rb ) ; ya = temp ; result = ya + yb ; result *= 0.5 ; } if ( negate ) { result = - result ; } return result ; }

Calcular el seno hiperbólico de un número.


public void store  ( String pathName , Storable value ) throws IOException { store ( new Path ( pathName ) , value ) ; }

Almacene el objeto dado en el sistema de archivos HDFS en el nombre de la ruta dado.


protected void readConfigFileNoScrollPane  ( VendorOptionFactoryInterface vendorOptionFactory , UpdateSymbolInterface parent , String filename ) { internal_readConfigFile ( vendorOptionFactory , parent . getClass ( ) , parent , filename , false , false ) ; }

Archivo de configuración del panel de lectura No hay panel de desplazamiento.


public void addChangingListener  ( OnWheelChangedListener listener ) { changingListeners . add ( listener ) ; }


@ Override public void clearSelection  ( ) { selectedPhotos . clear ( ) ; }

Borre el estado de selección para todos los artículos


public static Map < String , Object > startNextDay  ( GenericValue techDataCalendar , Timestamp dateFrom ) { Map < String , Object > result = FastMap . newInstance ( ) ; Timestamp dateTo = null ; GenericValue techDataCalendarWeek = null ; try { techDataCalendarWeek = techDataCalendar . getRelatedOne ( "TechDataCalendarWeek" , true ) ; } catch ( GenericEntityException e ) { Debug . logError ( "Pb reading Calendar Week associated with calendar" + e . getMessage ( ) , module ) ; return ServiceUtil . returnError ( "Pb reading Calendar Week associated with calendar" ) ; } Calendar cDateTrav = Calendar . getInstance ( ) ; cDateTrav . setTime ( dateFrom ) ; Map < String , Object > position = dayStartCapacityAvailable ( techDataCalendarWeek , cDateTrav . get ( Calendar . DAY_OF_WEEK ) ) ; Time startTime = ( Time ) position . get ( "startTime" ) ; int moveDay = ( ( Integer ) position . get ( "moveDay" ) ) . intValue ( ) ; dateTo = ( moveDay == 0 ) ? dateFrom : UtilDateTime . getDayStart ( dateFrom , moveDay ) ; Timestamp startAvailablePeriod = new Timestamp ( UtilDateTime . getDayStart ( dateTo ) . getTime ( ) + startTime . getTime ( ) + cDateTrav . get ( Calendar . ZONE_OFFSET ) + cDateTrav . get ( Calendar . DST_OFFSET ) ) ; if ( dateTo . before ( startAvailablePeriod ) ) { dateTo = startAvailablePeriod ; } else { dateTo = UtilDateTime . getNextDayStart ( dateTo ) ; cDateTrav . setTime ( dateTo ) ; position = dayStartCapacityAvailable ( techDataCalendarWeek , cDateTrav . get ( Calendar . DAY_OF_WEEK ) ) ; startTime = ( Time ) position . get ( "startTime" ) ; moveDay = ( ( Integer ) position . get ( "moveDay" ) ) . intValue ( ) ; if ( moveDay != 0 ) dateTo = UtilDateTime . getDayStart ( dateTo , moveDay ) ; dateTo . setTime ( dateTo . getTime ( ) + startTime . getTime ( ) + cDateTrav . get ( Calendar . ZONE_OFFSET ) + cDateTrav . get ( Calendar . DST_OFFSET ) ) ; } result . put ( "dateTo" , dateTo ) ; result . put ( "nextCapacity" , position . get ( "capacity" ) ) ; return result ; }

Se utiliza para moverse en un TechDatacalenda, producir la marca de tiempo para el comienzo del día siguiente disponible y su capacidad asociada.Si la fecha de FROM (PARAM IN) no está en un período de TECHDATACALENDAR DISPONIBLE, el valor de retorno es el día siguiente disponible


public SelectorScopedLocatorFactory ( SearchContext searchContext , By selector ) { this . searchContext = searchContext ; this . selector = selector ; }

Crea una fábrica de localización de selector-scoped.


public void discard  ( ServiceRegistrar proxy ) { synchronized ( this ) { if ( terminated ) { throw new IllegalStateException ( "discovery terminated" ) ; } if ( proxy == null ) return ; LookupLocator lct = findRegFromProxy ( proxy ) ; if ( lct == null ) return ; LocatorReg reg = removeDiscoveredLocator ( lct ) ; HashMap groupsMap = new HashMap ( 1 ) ; groupsMap . put ( reg . proxy , reg . memberGroups ) ; reg . proxy = null ; reg . memberGroups = null ; reg . fixupNextTryTime ( ) ; addToMap ( reg ) ; if ( ! listeners . isEmpty ( ) ) { addNotify ( ( ArrayList ) listeners . clone ( ) , groupsMap , true ) ; } } }

Elimina una instancia de <código> ServiceRegistrar </ Code> del conjunto administrado de servicios de búsqueda, lo que hace que el servicio de búsqueda correspondiente sea elegible para el re-descubrimiento.Este método no toma ninguna acción si la entrada de parámetros a este método es <código> NULL </ CODE>, o si no coincide (usando <Code> es igual a </ código>) ninguno de los elementos en el conjunto administrado.


public ImageRecordReader ( int height , int width , int channels ) { super ( height , width , channels , ( PathLabelGenerator ) null ) ; }

Carga de imágenes con altura, anchura y canales dados, agregando etiquetas.


public static void drawResizeHandleSelection  ( ViewTransform transform , Graphics2D g , ResizeHandle selectedResizeHandle ) { Rectangle bounds = selectedResizeHandle . getSwingBounds ( transform ) ; g . drawRect ( bounds . x , bounds . y , bounds . width , bounds . height ) ; }

Dibuje el tamaño de la selección de la manija


public static void applyTopPercentFilter  ( double topPercent , double bestScore , float minPercentIdentity , IReadBlock readBlock , BitSet activeMatches ) { if ( topPercent > 0 && topPercent < 100 ) { if ( bestScore == 0 ) { for ( int i = activeMatches . nextSetBit ( 0 ) ; i != - 1 ; i = activeMatches . nextSetBit ( i + 1 ) ) { final IMatchBlock matchBlock = readBlock . getMatchBlock ( i ) ; if ( matchBlock . getPercentIdentity ( ) >= minPercentIdentity ) { bestScore = Math . max ( bestScore , matchBlock . getBitScore ( ) ) ; } } } final double threshold = ( 1 - topPercent / 100.0 ) * bestScore ; for ( int i = activeMatches . nextSetBit ( 0 ) ; i != - 1 ; i = activeMatches . nextSetBit ( i + 1 ) ) { final IMatchBlock matchBlock = readBlock . getMatchBlock ( i ) ; if ( matchBlock . getBitScore ( ) < threshold && matchBlock . getPercentIdentity ( ) >= minPercentIdentity ) activeMatches . set ( i , false ) ; } } }

Aplica el filtro de porcentaje superior a un conjunto de coincidencias activas


public void requestRender  ( ) { ourLock . lock ( ) ; ConstraintUtilities . renderModel ( this ) ; ourLock . unlock ( ) ; }


public boolean isCurrentSet  ( ) { return currentTaxonIterator != null && currentTaxonId != null ; }


@ Override public Result decode  ( BinaryBitmap image ) throws NotFoundException { setHints ( null ) ; return decodeInternal ( image ) ; }

Esta versión de Decodish honra la intención del lector.decode (BinaryBitMap) en que pasa nulo como un indicio de los decodificadores.Sin embargo, eso hace que sea ineficiente llamar repetidamente.Use Sethints () seguido de DecodewithState () para aplicaciones de análisis continuo.


@ SuppressWarnings ( { "unchecked" , "cast" } ) public PlaceholderMethodDecl fullCopy  ( ) { PlaceholderMethodDecl tree = ( PlaceholderMethodDecl ) 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.


@ SourceMonitored @ SuppressWarnings ( "unchecked" ) public static Object simpleTypeConvert  ( Object obj , String type , String format , TimeZone timeZone , Locale locale , boolean noTypeFail ) throws GeneralException { if ( obj == null || UtilValidate . isEmpty ( type ) || "Object" . equals ( type ) || "java.lang.Object" . equals ( type ) ) { return obj ; } if ( "PlainString" . equals ( type ) ) { return obj . toString ( ) ; } if ( obj instanceof Node ) { Node node = ( Node ) obj ; String nodeValue = node . getTextContent ( ) ; if ( "String" . equals ( type ) || "java.lang.String" . equals ( type ) ) { return nodeValue ; } else { return simpleTypeConvert ( nodeValue , type , format , timeZone , locale , noTypeFail ) ; } } int genericsStart = type . indexOf ( "<" ) ; if ( genericsStart != - 1 ) { type = type . substring ( 0 , genericsStart ) ; } Class < ? > sourceClass = obj . getClass ( ) ; Class < ? > targetClass = null ; try { targetClass = loadClass ( type ) ; } catch ( ClassNotFoundException e ) { throw new GeneralException ( "Conversion from " + sourceClass . getName ( ) + " to " + type + " not currently supported" , e ) ; } if ( sourceClass . equals ( targetClass ) ) { return obj ; } if ( obj instanceof String && ( ( String ) obj ) . length ( ) == 0 ) { return null ; } Converter < Object , Object > converter = null ; try { converter = ( Converter < Object , Object > ) Converters . getConverter ( sourceClass , targetClass ) ; } catch ( ClassNotFoundException e ) { } if ( converter != null ) { LocalizedConverter < Object , Object > localizedConverter = null ; try { localizedConverter = ( LocalizedConverter ) converter ; } catch ( ClassCastException e ) { } if ( localizedConverter != null ) { if ( timeZone == null ) { timeZone = TimeZone . getDefault ( ) ; } if ( locale == null ) { locale = Locale . getDefault ( ) ; } try { return localizedConverter . convert ( obj , locale , timeZone , format ) ; } catch ( ConversionException e ) { Debug . logWarning ( e , "Exception thrown while converting type: " , module ) ; throw new GeneralException ( e . getMessage ( ) , e ) ; } } try { return converter . convert ( obj ) ; } catch ( ConversionException e ) { Debug . logWarning ( e , "Exception thrown while converting type: " , module ) ; throw new GeneralException ( e . getMessage ( ) , e ) ; } } if ( targetClass . equals ( String . class ) ) { Debug . logWarning ( "No special conversion available for " + obj . getClass ( ) . getName ( ) + " to String, returning object.toString()." , module ) ; return obj . toString ( ) ; } if ( noTypeFail ) { throw new GeneralException ( "Conversion from " + obj . getClass ( ) . getName ( ) + " to " + type + " not currently supported" ) ; } else { if ( Debug . infoOn ( ) ) Debug . logInfo ( "No type conversion available for " + obj . getClass ( ) . getName ( ) + " to " + targetClass . getName ( ) + ", returning original object." , module ) ; return obj ; } }

Convierte el objeto pasado al tipo simple nombrado.Los tipos admitidos incluyen: cadena, booleano, doble, flotador, largo, entero, fecha (java.sql.date), tiempo, tiempo de tiempo, timzone;


public boolean hasStroke  ( ) { return SLDTreeLeafFactory . getInstance ( ) . hasStroke ( getSymbolizer ( ) ) ; }

Cheques para accidentes cerebrovasculares.


@ Override int lookForSelectablePosition  ( int position , boolean lookDown ) { final ListAdapter adapter = mAdapter ; if ( adapter == null || isInTouchMode ( ) ) { return INVALID_POSITION ; } final int count = adapter . getCount ( ) ; if ( ! mAreAllItemsSelectable ) { if ( lookDown ) { position = Math . max ( 0 , position ) ; while ( position < count && ! adapter . isEnabled ( position ) ) { position ++ ; } } else { position = Math . min ( position , count - 1 ) ; while ( position >= 0 && ! adapter . isEnabled ( position ) ) { position -- ; } } if ( position < 0 || position >= count ) { return INVALID_POSITION ; } return position ; } else { if ( position < 0 || position >= count ) { return INVALID_POSITION ; } return position ; } }

Encuentre una posición que se pueda seleccionar (es decir, no es un separador).


public void add  ( String str ) { if ( ! bList . contains ( str ) ) bList . add ( str ) ; hasChanged = true ; }


@ Override public boolean next  ( ) { while ( s . next ( ) ) if ( pred . isSatisfied ( s ) ) return true ; return false ; }

Muévete al siguiente registro que satisface el predicado.El método llama repetidamente a continuación en el escaneo subyacente hasta que se encuentra un registro adecuado, o el escaneo subyacente no contiene más registros.


public PhotosSaveMarketPhotoQuery cropData  ( String value ) { return unsafeParam ( "crop_data" , value ) ; }

Parámetro devuelto cuando las fotos se cargan en el servidor.


public boolean isPolygonVisible  ( Object parentObj , Object obj ) { boolean enabled = false ; if ( overallEnableSymbolizersOverride ) { enabled = ( obj instanceof Rule ) && ( geometryType == GeometryTypeEnum . POLYGON ) ; } return enabled ; }

Comprueba si el botón de polígono es visible.


public boolean enabled  ( ) { return soot . PhaseOptions . getBoolean ( options , "enabled" ) ; }


private BinInfo findBin  ( double x ) { BinInfo bin = new BinInfo ( ) ; bin . isInRange = false ; bin . isUnderflow = false ; bin . isOverflow = false ; if ( x < m_min ) { bin . isUnderflow = true ; } else if ( x > m_max ) { bin . isOverflow = true ; } else { double binWidth = this . getBandWidth ( ) ; for ( int i = 0 ; i < m_nbins ; i ++ ) { double highEdge = m_min + ( i + 1 ) * binWidth ; if ( x <= highEdge ) { bin . isInRange = true ; bin . index = i ; break ; } } } return bin ; }

Método de utilidad interno privado para averiguar qué contenedor del histograma se inicia un número.


public JSONArray put  ( int index , int value ) throws JSONException { this . put ( index , new Integer ( value ) ) ; return this ; }

Poner o reemplazar un valor int.Si el índice es mayor que la longitud del JSONARRAY, entonces los elementos nulos se agregarán según sea necesario para rellenarlo.


public StateInconsistencyTest ( Experiment experiment ) { this . experiment = experiment ; comparisonStrategy = new DefaultNameExclusionStrategy ( "creationTime" , "modificationTime" , "ruleJson" , "id" ) ; putStateStrategy = new DefaultNameInclusionStrategy ( "state" ) ; }

Crea una prueba que se ejecuta para un experimento específico.


public XmlStreamWriter ( OutputStream out , String defaultEncoding ) { this . out = out ; this . defaultEncoding = defaultEncoding != null ? defaultEncoding : "UTF-8" ; }

Construya un nuevo escritor XML Stream para el flujo de salida especificado con la codificación predeterminada especificada.


public double replaceMostRecentValue  ( double v ) throws MathIllegalStateException  { return eDA . substituteMostRecentElement ( v ) ; }

Reemplaza el valor almacenado más recientemente con el valor dado.Debe haber al menos un elemento almacenado para llamar a este método.


public RabbitMqServer writeOutputTo  ( OutputStream outputStream ) { this . outputStream = outputStream ; return this ; }

Use este método si desea que la salida del proceso se transmita en algún lugar como sucede.


public static void angleToDefaultAngle  ( double [ ] angle ) { for ( int i = 0 ; i < angle . length ; i ++ ) { angle [ i ] = angleToDefaultAngle ( angle [ i ] ) ; } }

Para cada una de una matriz de ángulos (en radianes), devuelva el ángulo equivalente en el rango [-PI, PI].


public String makeLiteral  ( Object object ) { StringBuilder sb = new StringBuilder ( ) ; makeLiteral ( sb , object , false ) ; return sb . toString ( ) ; }

Hace un literal Freemarker de cualquier tipo de objeto soportado.


@ Override public PolygonsSet wholeSpace  ( ) { return new PolygonsSet ( tolerance ) ; }

Construye una región que cubre todo el espacio.


public PagesSaveQuery pageId  ( Integer value ) { return unsafeParam ( "page_id" , value ) ; }

Wiki ID de página.El parámetro "Título" se puede pasar en lugar de "PID".


private < T , S  extends ParseTree > T parseQueryFragment  ( Function < GraqlParser , S > parseRule , BiFunction < QueryVisitor , S , T > visit , String queryString ) { GraqlLexer lexer = getLexer ( queryString ) ; GraqlErrorListener errorListener = new GraqlErrorListener ( queryString ) ; lexer . removeErrorListeners ( ) ; lexer . addErrorListener ( errorListener ) ; CommonTokenStream tokens = new CommonTokenStream ( lexer ) ; return parseQueryFragment ( parseRule , visit , errorListener , tokens ) ; }

Analizar cualquier parte de una consulta de Graql


public Editor edit  ( ) throws IOException  { return DiskLruCache . this . edit ( key , sequenceNumber ) ; }

Devuelve un editor para la entrada de esta instantánea, o NULL si la entrada ha cambiado desde que se creó esta instantánea o si otra edición está en progreso.