private char readEscapeCharacter  ( ) throws JSONException  { char escaped = in . charAt ( pos ++ ) ; switch ( escaped ) { case 'u' : if ( pos + 4 > in . length ( ) ) { throw syntaxError ( "Unterminated escape sequence" ) ; } String hex = in . substring ( pos , pos + 4 ) ; pos += 4 ; try { return ( char ) Integer . parseInt ( hex , 16 ) ; } catch ( NumberFormatException nfe ) { throw syntaxError ( "Invalid escape sequence: " + hex ) ; } case 't' : return '\t' ; case 'b' : return '\b' ; case 'n' : return '\n' ; case 'r' : return '\r' ; case 'f' : return '\f' ; case '\'' : case '"' : case '\\' : default : return escaped ; } }

Unscapes El carácter identificado por el carácter o los caracteres que siguen inmediatamente una barra invertida.El backslash '\' debería haberse leído.Esto apoya a ambos escapes de Unicode "U000A" y la escape de dos caracteres "\ N".


static CachedModel create  ( Class < Model > model , Map < Integer , Map < String , PathMapping > > pathmapping , Module module ) { CachedModel m = new CachedModel ( ) ; m . model = model ; m . pathmapping = pathmapping ; m . module = module ; return m ; }


public static SM_SYSTEM_MESSAGE STR_SKILL_SUCC_DelayedSpellATK_Instant_ME_TO_B  ( String skilltarget , String skillname ) { return new SM_SYSTEM_MESSAGE ( 1200504 , skilltarget , skillname ) ; }

[% SkillTarget] recibió el efecto de explosión retrasado a medida que usaba [% de habilidad].


public static void show  ( Activity activity , int resId ) { show ( activity , resId , LENGTH_SHORT ) ; }


public static String lowerFirst  ( String s ) { if ( s . isEmpty ( ) ) { return s ; } char c = s . charAt ( 0 ) ; if ( Character . isLowerCase ( c ) ) { return s ; } c = Character . toLowerCase ( c ) ; return c + s . substring ( 1 ) ; }

Devuelve una cadena con el primer carácter bajado si está en mayúsculas, otro devuelve el original.


public void actionPerformed  ( ActionEvent ev ) { String radius = "" + getViewer ( ) . getNodeRadius ( ) ; radius = JOptionPane . showInputDialog ( getViewer ( ) . getFrame ( ) , "Enter node radius (0-100)" , radius ) ; if ( radius != null && Basic . isInteger ( radius ) && Integer . parseInt ( radius ) >= 0 ) execute ( "set nodeRadius=" + radius + ";" ) ; }


public int readBytes  ( byte [ ] value , int length ) throws JMSException { initializeReading ( ) ; if ( value == null ) { throw new NullPointerException ( "Byte buffer is null" ) ; } if ( length < 0 || length > value . length ) { throw new IndexOutOfBoundsException ( "Illegal byte buffer size. Must be between 0 and value.length." ) ; } this . dataIn . mark ( Integer . MAX_VALUE ) ; try { int n = 0 ; while ( n < length ) { int count = this . dataIn . read ( value , n , length - n ) ; if ( count < 0 ) { break ; } n += count ; } if ( n == 0 && length > 0 ) { n = - 1 ; } return n ; } catch ( EOFException eof ) { try { this . dataIn . reset ( ) ; } catch ( IOException e ) { JMSException jmsEx = new JMSException ( e . toString ( ) ) ; jmsEx . setLinkedException ( e ) ; throw jmsEx ; } JMSException jmsEx = new MessageEOFException ( eof . toString ( ) ) ; jmsEx . setLinkedException ( eof ) ; throw jmsEx ; } catch ( IOException ioe ) { try { this . dataIn . reset ( ) ; } catch ( IOException e ) { JMSException jmsEx = new JMSException ( e . toString ( ) ) ; jmsEx . setLinkedException ( e ) ; throw jmsEx ; } JMSException jmsEx = new MessageFormatException ( "Format error occurred" + ioe . toString ( ) ) ; jmsEx . setLinkedException ( ioe ) ; throw jmsEx ; } }

Lee una parte del flujo de mensajes de bytes.<P> Si la longitud de la matriz <código> valor </ code> es menor que el número de bytes que quedan para ser leídas en la corriente, la matriz debe llenarse.Una llamada posterior lee el siguiente incremento, y así sucesivamente.<P> Si el número de bytes que quedan en la corriente es menor que la longitud del valor de la matriz <Código>, los bytes deben leerse en la matriz.El valor de retorno del número total de lectura de bytes será menor que la longitud de la matriz, lo que indica que no quedan más bytes para leer de la secuencia.La siguiente lectura de la corriente regresa -1.<p /> Si <code> longitud </ code> es negativo, o <codigo> la longitud </ code> es mayor que la longitud del valor <code> value </ code>, luego un <código> indexoutofboundsexception </código> es lanzado.No se leerán bytes de la corriente para este caso de excepción.


private final boolean isPostBreak  ( Item syllable ) { return ( ( syllable . getPrevious ( ) == null ) || "pau" . equals ( postBreakPath . findFeature ( syllable ) ) ) ; }

Determina si esta sílaba está siguiendo un descanso.


private void invalidateLayouts  ( ) { itemsLayout = null ; valueLayout = null ; scrollingOffset = 0 ; }


public AdsGetCategoriesQuery lang  ( String value ) { return unsafeParam ( "lang" , value ) ; }

Idioma.La lista completa de idiomas soportados está aquí.


public int nextInt  ( ) { if ( m_modCount != m_table . getModificationCount ( ) ) throw new ConcurrentModificationException ( ) ; m_cur = m_rows . nextInt ( ) ; return m_cur ; }


public static CommandResult execCommand  ( String [ ] commands , boolean isRoot , boolean isNeedResultMsg ) { int result = - 1 ; if ( commands == null || commands . length == 0 ) { return new CommandResult ( result , null , null ) ; } Process process = null ; BufferedReader successResult = null ; BufferedReader errorResult = null ; StringBuilder successMsg = null ; StringBuilder errorMsg = null ; DataOutputStream os = null ; try { process = Runtime . getRuntime ( ) . exec ( isRoot ? COMMAND_SU : COMMAND_SH ) ; os = new DataOutputStream ( process . getOutputStream ( ) ) ; for ( String command : commands ) { if ( command == null ) { continue ; } os . write ( command . getBytes ( ) ) ; os . writeBytes ( COMMAND_LINE_END ) ; os . flush ( ) ; } os . writeBytes ( COMMAND_EXIT ) ; os . flush ( ) ; result = process . waitFor ( ) ; if ( isNeedResultMsg ) { successMsg = new StringBuilder ( ) ; errorMsg = new StringBuilder ( ) ; successResult = new BufferedReader ( new InputStreamReader ( process . getInputStream ( ) ) ) ; errorResult = new BufferedReader ( new InputStreamReader ( process . getErrorStream ( ) ) ) ; String s ; while ( ( s = successResult . readLine ( ) ) != null ) { successMsg . append ( s ) ; } while ( ( s = errorResult . readLine ( ) ) != null ) { errorMsg . append ( s ) ; } } } catch ( IOException e ) { e . printStackTrace ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } finally { try { if ( os != null ) { os . close ( ) ; } if ( successResult != null ) { successResult . close ( ) ; } if ( errorResult != null ) { errorResult . close ( ) ; } } catch ( IOException e ) { e . printStackTrace ( ) ; } if ( process != null ) { process . destroy ( ) ; } } return new CommandResult ( result , successMsg == null ? null : successMsg . toString ( ) , errorMsg == null ? null : errorMsg . toString ( ) ) ; }


private void updateButtonState  ( boolean enabled ) { btnConnect . setEnabled ( enabled ) ; connectionComboBox . setEnabled ( enabled ) ; btnEditConnection . setEnabled ( enabled ) ; }


private List < EmailData > createEmailDataList  ( List < Message > messageList ) { List < EmailData > emailDataList = new ArrayList < > ( ) ; for ( Message message : messageList ) { EmailData emailData = emailDataFactory . create ( message ) ; emailDataList . add ( emailData ) ; } return emailDataList ; }

Este método convierte la lista de objetos de mensaje a la lista de correo electrónico.


public boolean write  ( byte [ ] bytes , int offset , int size ) { if ( line == null ) { return false ; } int bytesRemaining = size ; int curIndex = offset ; if ( firstSample ) { firstSample = false ; timer . stop ( "firstAudio" ) ; if ( audioMetrics ) { timer . getTimer ( "firstAudio" ) . showTimesShortTitle ( "" ) ; timer . getTimer ( "firstAudio" ) . showTimesShort ( 0 ) ; } } debugPrint ( " au write " + bytesRemaining + " pos " + line . getMicrosecondPosition ( ) + " avail " + line . available ( ) + " bsz " + line . getBufferSize ( ) ) ; while ( bytesRemaining > 0 && ! isCancelled ( ) ) { if ( ! waitResume ( ) ) { return false ; } debugPrint ( "   queueing cur " + curIndex + " br " + bytesRemaining ) ; int bytesWritten ; synchronized ( lineLock ) { bytesWritten = line . write ( bytes , curIndex , Math . min ( BYTES_PER_WRITE , bytesRemaining ) ) ; if ( bytesWritten != bytesWritten ) { debugPrint ( "RETRY! bw" + bytesWritten + " br " + bytesRemaining ) ; } curIndex += bytesWritten ; bytesRemaining -= bytesWritten ; } debugPrint ( "   wrote " + " cur " + curIndex + " br " + bytesRemaining + " bw " + bytesWritten ) ; } return ! isCancelled ( ) && ! isDone ( ) ; }

Escribe los bytes dados a la corriente de audio.


public Builder fadeAnimation  ( Boolean fadeAnimation ) { this . fadeAnimation = fadeAnimation ; return this ; }

Si la animación de Fade Fade está habilitada.Por defecto, está habilitado en todos los navegadores que admiten transiciones CSS3, excepto Android.Predeterminado VERDADERO


public FileFooter readFooter  ( ) throws IOException  { ThriftReader thriftReader = openThriftReader ( filePath ) ; thriftReader . open ( ) ; thriftReader . setReadOffset ( offset ) ; FileFooter footer = ( FileFooter ) thriftReader . read ( ) ; thriftReader . close ( ) ; return footer ; }

Lee los metadatos en formato de objeto de segunda mano de FileFooter.


public static Configuration createSubEquipment  ( ) { Configuration configuration = new Configuration ( ) ; SubEquipment subEquipment = SubEquipment . create ( "SE_INI_TEST" ) . id ( 25L ) . statusTag ( StatusTag . create ( "SE:STATUS" ) . id ( 300L ) . build ( ) ) . commFaultTag ( CommFaultTag . create ( "SE:Comm" ) . id ( 301L ) . build ( ) ) . aliveTag ( AliveTag . create ( "SE:Alive" ) . id ( 302L ) . address ( new DataTagAddress ( ) ) . build ( ) , 60000 ) . build ( ) ; subEquipment . setEquipmentId ( 15L ) ; configuration . addEntity ( subEquipment ) ; return configuration ; }

ID de subreca: 26 Statustagid: 300 CommFaultTagid: 301 Alivetagid: 302


private void compareSurrogateKeyData  ( List < String > data , Dictionary forwardDictionary ) { int surrogateKey = 0 ; for ( int i = 0 ; i < data . size ( ) ; i ++ ) { surrogateKey ++ ; String dictionaryValue = forwardDictionary . getDictionaryValueForKey ( surrogateKey ) ; assertTrue ( data . get ( i ) . equals ( dictionaryValue ) ) ; } }

Este método comparará los datos reales con los datos esperados.


private static int byteCompaction  ( int mode , int [ ] codewords , Charset encoding , int codeIndex , StringBuilder result ) { ByteArrayOutputStream decodedBytes = new ByteArrayOutputStream ( ) ; if ( mode == BYTE_COMPACTION_MODE_LATCH ) { int count = 0 ; long value = 0 ; int [ ] byteCompactedCodewords = new int [ 6 ] ; boolean end = false ; int nextCode = codewords [ codeIndex ++ ] ; while ( ( codeIndex < codewords [ 0 ] ) && ! end ) { byteCompactedCodewords [ count ++ ] = nextCode ; value = 900 * value + nextCode ; nextCode = codewords [ codeIndex ++ ] ; if ( nextCode == TEXT_COMPACTION_MODE_LATCH || nextCode == BYTE_COMPACTION_MODE_LATCH || nextCode == NUMERIC_COMPACTION_MODE_LATCH || nextCode == BYTE_COMPACTION_MODE_LATCH_6 || nextCode == BEGIN_MACRO_PDF417_CONTROL_BLOCK || nextCode == BEGIN_MACRO_PDF417_OPTIONAL_FIELD || nextCode == MACRO_PDF417_TERMINATOR ) { codeIndex -- ; end = true ; } else { if ( ( count % 5 == 0 ) && ( count > 0 ) ) { for ( int j = 0 ; j < 6 ; ++ j ) { decodedBytes . write ( ( byte ) ( value >> ( 8 * ( 5 - j ) ) ) ) ; } value = 0 ; count = 0 ; } } } if ( codeIndex == codewords [ 0 ] && nextCode < TEXT_COMPACTION_MODE_LATCH ) { byteCompactedCodewords [ count ++ ] = nextCode ; } for ( int i = 0 ; i < count ; i ++ ) { decodedBytes . write ( ( byte ) byteCompactedCodewords [ i ] ) ; } } else if ( mode == BYTE_COMPACTION_MODE_LATCH_6 ) { int count = 0 ; long value = 0 ; boolean end = false ; while ( codeIndex < codewords [ 0 ] && ! end ) { int code = codewords [ codeIndex ++ ] ; if ( code < TEXT_COMPACTION_MODE_LATCH ) { count ++ ; value = 900 * value + code ; } else { if ( code == TEXT_COMPACTION_MODE_LATCH || code == BYTE_COMPACTION_MODE_LATCH || code == NUMERIC_COMPACTION_MODE_LATCH || code == BYTE_COMPACTION_MODE_LATCH_6 || code == BEGIN_MACRO_PDF417_CONTROL_BLOCK || code == BEGIN_MACRO_PDF417_OPTIONAL_FIELD || code == MACRO_PDF417_TERMINATOR ) { codeIndex -- ; end = true ; } } if ( ( count % 5 == 0 ) && ( count > 0 ) ) { for ( int j = 0 ; j < 6 ; ++ j ) { decodedBytes . write ( ( byte ) ( value >> ( 8 * ( 5 - j ) ) ) ) ; } value = 0 ; count = 0 ; } } } result . append ( new String ( decodedBytes . toByteArray ( ) , encoding ) ) ; return codeIndex ; }

Modo de compactación de bytes (ver 5.4.3) Permite que los 256 valores de byte de 8 bits posibles se codificarán.Esto incluye todo el valor de los caracteres ASCII de 0 a 127 inclusive y proporciona apoyo internacional de caracteres.


@ Override public IBinder onBind  ( Intent intent ) { return null ; }

Los precaqueservice no admiten la vinculación.


private void decode  ( byte [ ] data , int width , int height ) { Size size = activity . getCameraManager ( ) . getPreviewSize ( ) ; byte [ ] rotatedData = new byte [ data . length ] ; for ( int y = 0 ; y < size . height ; y ++ ) { for ( int x = 0 ; x < size . width ; x ++ ) rotatedData [ x * size . height + size . height - y - 1 ] = data [ x + y * size . width ] ; } int tmp = size . width ; size . width = size . height ; size . height = tmp ; Result rawResult = null ; PlanarYUVLuminanceSource source = buildLuminanceSource ( rotatedData , size . width , size . height ) ; if ( source != null ) { BinaryBitmap bitmap = new BinaryBitmap ( new HybridBinarizer ( source ) ) ; try { rawResult = multiFormatReader . decodeWithState ( bitmap ) ; } catch ( ReaderException re ) { } finally { multiFormatReader . reset ( ) ; } } Handler handler = activity . getHandler ( ) ; if ( rawResult != null ) { if ( handler != null ) { Message message = Message . obtain ( handler , R . id . decode_succeeded , rawResult ) ; Bundle bundle = new Bundle ( ) ; bundleThumbnail ( source , bundle ) ; message . setData ( bundle ) ; message . sendToTarget ( ) ; } } else { if ( handler != null ) { Message message = Message . obtain ( handler , R . id . decode_failed ) ; message . sendToTarget ( ) ; } } }

Deccriba los datos dentro del rectángulo del visor y el tiempo cuánto tiempo tomó.Para la eficiencia, reutilice los mismos objetos de lector de una decodificación a la siguiente.


public Number sum  ( SelectColumn funcColumn , IQueryResultSet < IEntryPacket > entries ) throws SQLException { if ( entries . isEmpty ( ) ) return null ; Iterator < IEntryPacket > iter = entries . iterator ( ) ; IEntryPacket entry = iter . next ( ) ; Number sum = getNumber ( entry , funcColumn , entries ) ; while ( iter . hasNext ( ) ) { entry = iter . next ( ) ; sum = NumberUtil . add ( sum , getNumber ( entry , funcColumn , entries ) , sum . getClass ( ) . getName ( ) ) ; } return sum ; }

Calcule el valor de suma de la columna dada para todas las entradas


@ Override public void addEntry  ( CatalogEntry entry ) { int type = entry . getEntryType ( ) ; if ( type == URISUFFIX ) { String suffix = normalizeURI ( entry . getEntryArg ( 0 ) ) ; String fsi = makeAbsolute ( normalizeURI ( entry . getEntryArg ( 1 ) ) ) ; entry . setEntryArg ( 1 , fsi ) ; catalogManager . debug . message ( 4 , "URISUFFIX" , suffix , fsi ) ; } else if ( type == SYSTEMSUFFIX ) { String suffix = normalizeURI ( entry . getEntryArg ( 0 ) ) ; String fsi = makeAbsolute ( normalizeURI ( entry . getEntryArg ( 1 ) ) ) ; entry . setEntryArg ( 1 , fsi ) ; catalogManager . debug . message ( 4 , "SYSTEMSUFFIX" , suffix , fsi ) ; } super . addEntry ( entry ) ; }

Limpieza y procese una entrada de catálogo.<P /> <P> Este método procesa cada entrada de catálogo, cambiando los identificadores del sistema relativo mapeado en los absolutos (según la URI base actual) y manteniendo otra información sobre el catálogo actual. </ p>


public static int gcd  ( final int p , final int q ) { int u = p ; int v = q ; if ( ( u == 0 ) || ( v == 0 ) ) { if ( ( u == Integer . MIN_VALUE ) || ( v == Integer . MIN_VALUE ) ) { throw MathRuntimeException . createArithmeticException ( "overflow: gcd({0}, {1}) is 2^31" , p , q ) ; } return Math . abs ( u ) + Math . abs ( v ) ; } if ( u > 0 ) { u = - u ; } if ( v > 0 ) { v = - v ; } int k = 0 ; while ( ( u & 1 ) == 0 && ( v & 1 ) == 0 && k < 31 ) { u /= 2 ; v /= 2 ; k ++ ; } if ( k == 31 ) { throw MathRuntimeException . createArithmeticException ( "overflow: gcd({0}, {1}) is 2^31" , p , q ) ; } int t = ( ( u & 1 ) == 1 ) ? v : - ( u / 2 ) ; do { while ( ( t & 1 ) == 0 ) { t /= 2 ; } if ( t > 0 ) { u = - t ; } else { v = t ; } t = ( v - u ) / 2 ; } while ( t != 0 ) ; return - u * ( 1 << k ) ; }

 Obtiene el mayor divisor común del valor absoluto de dos números, utilizando el método "Binary GCD" que evita la división y las operaciones de módulo.Consulte Knuth 4.5.2 Algoritmo B. Este algoritmo se debe a Josef Stein (1961).
 Casos especiales:

 Los invocaciones <código> GCD (INTEGER.MIN_VALUE, INTEGER.MIN_VALUE) , <CÓDIGO> GCD (INTEGER.MIN_VALUE, 0)  y <Código> GCD (0, INTEGER.MIN_VALUE)  Lanzar un <código> arithmeticexception , porque el resultado sería 2 ^ 31, que es demasiado grande para un valor int.

El resultado de <CÓDIGO> GCD (X, X) , <CÓDIGO> GCD (0, X)  y  GCD (X, 0)  es el valor absoluto de <Código> X </ código>, excepto los casos especiales anteriores.
 La invocación <Código> GCD (0, 0)  es el único que devuelve <código> 0 </ codifica>.


private Collection < ? extends ClientRequestResult > handleClientRequest  ( @ Valid final ClientRequest clientRequest , final Session session , final Destination replyDestination ) { switch ( clientRequest . getRequestType ( ) ) { case TAG_CONFIGURATION_REQUEST : if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( String . format ( "handleClientRequest() - Received a TAG_CONFIGURATION_REQUEST for %d tags (with configuration details)." , clientRequest . getIds ( ) . size ( ) ) ) ; } return tagrequestHelper . handleTagConfigurationRequest ( clientRequest ) ; case APPLY_CONFIGURATION_REQUEST : if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "handleClientRequest() - Received an APPLY_CONFIGURATION_REQUEST with " + clientRequest . getIds ( ) . size ( ) + " configurations." ) ; } return clientConfigurationRequestHandler . handleApplyConfigurationRequest ( clientRequest , session , replyDestination ) ; case RETRIEVE_CONFIGURATION_REQUEST : if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "handleClientRequest() - Received a RETRIEVE_CONFIGURATION_REQUEST." ) ; } return clientConfigurationRequestHandler . handleRetrieveConfigurationsRequest ( clientRequest , session , replyDestination ) ; case TAG_REQUEST : if ( LOG . isDebugEnabled ( ) ) { if ( clientRequest . getIds ( ) . isEmpty ( ) ) { LOG . debug ( String . format ( "handleClientRequest() - Received a TAG_REQUEST with %d wildcard(s) for tag name search: %s" , clientRequest . getRegexList ( ) . size ( ) , clientRequest . getRegexList ( ) ) ) ; } else { LOG . debug ( "handleClientRequest() - Received a TAG_REQUEST for " + clientRequest . getIds ( ) . size ( ) + " tags." ) ; } } return tagrequestHelper . handleTagRequest ( clientRequest ) ; case ALARM_REQUEST : if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "handleClientRequest() - Received an ALARM_REQUEST for " + clientRequest . getIds ( ) . size ( ) + " alarms." ) ; } return clientAlarmRequestHandler . handleAlarmRequest ( clientRequest ) ; case ACTIVE_ALARMS_REQUEST : if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "handleClientRequest() - Received an ACTIVE_ALARMS_REQUEST." ) ; } return clientAlarmRequestHandler . handleActiveAlarmRequest ( clientRequest ) ; case SUPERVISION_REQUEST : if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "handleClientRequest() - Received a SUPERVISION_REQUEST." ) ; } return supervisionFacade . getAllSupervisionStates ( ) ; case COMMAND_HANDLE_REQUEST : if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "handleClientRequest() - Received a COMMAND_HANDLE_REQUEST for " + clientRequest . getIds ( ) . size ( ) + " commands." ) ; } return clientCommandRequestHandler . handleCommandHandleRequest ( clientRequest ) ; case EXECUTE_COMMAND_REQUEST : if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "handleClientRequest() - Received an EXECUTE_COMMAND_REQUEST." ) ; } return clientCommandRequestHandler . handleExecuteCommandRequest ( clientRequest ) ; case DAQ_XML_REQUEST : if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "handleClientRequest() - Received a DAQ_XML_REQUEST" ) ; } return clientProcessRequestHandler . handleDaqXmlRequest ( clientRequest ) ; case PROCESS_NAMES_REQUEST : if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "handleClientRequest() - Received a PROCESS_NAMES_REQUEST" ) ; } return clientProcessRequestHandler . handleProcessNamesRequest ( clientRequest ) ; case DEVICE_CLASS_NAMES_REQUEST : if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "handleClientRequest() - Received a DEVICE_CLASS_NAMES_REQUEST" ) ; } return clientDeviceRequestHelper . handleDeviceClassNamesRequest ( clientRequest ) ; case DEVICE_REQUEST : if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "handleClientRequest() - Received a DEVICE_REQUEST" ) ; } return clientDeviceRequestHelper . handleDeviceRequest ( clientRequest ) ; case TAG_STATISTICS_REQUEST : if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "handleClientRequest() - Received a TAG_STATISTICS_REQUEST" ) ; } return tagrequestHelper . handleTagStatisticsRequest ( clientRequest ) ; default : LOG . error ( "handleClientRequest() - Client request not supported: " + clientRequest . getRequestType ( ) ) ; return Collections . emptyList ( ) ; } }

Método interno para manejo de solicitudes.Por lo tanto, tiene que obtener para todos los ID de etiqueta mencionados en esa solicitud los referencias de etiqueta y alarma.


private void updateGraph  ( ) { graph . clear ( ) ; Map < String , Node > className2Node = new HashMap < > ( ) ; for ( String className1 : getChartData ( ) . getClassNames ( ) ) { int prevalenceOfClass1 = 0 ; for ( String series : getChartData ( ) . getSeriesNames ( ) ) { double percentage = 100.0 * getChartData ( ) . getValue ( series , className1 ) . doubleValue ( ) / getChartData ( ) . getTotalForSeries ( series ) ; if ( percentage >= getMinThreshold ( ) ) prevalenceOfClass1 ++ ; } double prevalencePercentage = 100.0 * prevalenceOfClass1 / ( double ) getChartData ( ) . getNumberOfSeries ( ) ; if ( prevalencePercentage >= getMinPrevalence ( ) && prevalencePercentage <= getMaxPrevalence ( ) ) { Node v = graph . newNode ( ) ; NodeData nodeData = new NodeData ( ) ; nodeData . setLabel ( className1 ) ; v . setData ( nodeData ) ; className2Node . put ( className1 , v ) ; nodeData . setPrevalence ( prevalenceOfClass1 ) ; } } for ( Node v = graph . getFirstNode ( ) ; v != null ; v = v . getNext ( ) ) { String className1 = ( ( NodeData ) v . getData ( ) ) . getLabel ( ) ; for ( Node w = v . getNext ( ) ; w != null ; w = w . getNext ( ) ) { String className2 = ( ( NodeData ) w . getData ( ) ) . getLabel ( ) ; Set < String > intersection = new HashSet < > ( ) ; Set < String > union = new HashSet < > ( ) ; for ( String series : getChartData ( ) . getSeriesNames ( ) ) { double total = getChartData ( ) . getTotalForSeries ( series ) ; double percentage1 = 100.0 * getChartData ( ) . getValue ( series , className1 ) . doubleValue ( ) / total ; double percentage2 = 100.0 * getChartData ( ) . getValue ( series , className2 ) . doubleValue ( ) / total ; if ( percentage1 >= getMinThreshold ( ) || percentage2 >= getMinThreshold ( ) ) { union . add ( series ) ; } if ( percentage1 > getMinThreshold ( ) && percentage2 >= getMinThreshold ( ) ) { intersection . add ( series ) ; } } if ( union . size ( ) > 0 ) { double probabilityPercent = ( 100.0 * ( double ) intersection . size ( ) / ( double ) union . size ( ) ) ; if ( probabilityPercent >= getMinProbability ( ) ) { Edge e = graph . newEdge ( className2Node . get ( className1 ) , className2Node . get ( className2 ) ) ; graph . setInfo ( e , ( double ) intersection . size ( ) / ( double ) union . size ( ) ) ; } } } } }


private boolean matchValue  ( Collection < ? > collection , int tokenIndex ) { if ( tokenIndex == _tokens . length ) return match ( collection , getExpectedValue ( ) ) ; return matchCollectionItemNestedProperty ( collection , tokenIndex ) ; }

Realice la coincidencia en la colección proporcionada o los elementos de recolección de propiedades anidadas.


public String toString  ( ) { return "null" ; }


public void populateContextForRequest  ( HttpServletRequest request , HttpServletResponse response , ServletContext servletContext ) { populateContextForRequest ( context , this , request , response , servletContext ) ; }

Este método llena el contexto para este ScreenRenderer en función de los objetos de solicitud y respuesta de HTTP y el servletContext.Aprovecha diversas convenciones utilizadas en otros lugares, a saber, el control de control y así sucesivamente, de OFBIZ para obtener los diferentes recursos necesarios.


public void clear  ( ) { fromDir = null ; fromExt = null ; bList . removeAllElements ( ) ; hasChanged = true ; }


public void timeoutOccured  ( Collection < WatchedObject > bucket ) throws Exception { SocketAddress serverAddress = null ; SocketChannel socketChannel = null ; long startInvocationVersion = - 1 ; try { socketChannel = SocketChannel . open ( ) ; LRMIUtilities . initNewSocketProperties ( socketChannel ) ; Socket newSock = socketChannel . socket ( ) ; WatchedObject watched = bucket . iterator ( ) . next ( ) ; startInvocationVersion = watched . getVersion ( ) ; serverAddress = watched . getSocket ( ) . socket ( ) . getRemoteSocketAddress ( ) ; if ( serverAddress == null ) throw new IOException ( "Watched socket was already closed: " + watched . getSocket ( ) . socket ( ) ) ; final int localPort = watched . getSocket ( ) . socket ( ) . getLocalPort ( ) ; if ( _logger . isLoggable ( Level . FINE ) ) _logger . log ( Level . FINE , "Attempting to create a new socket to the ServerEndPoint [" + serverAddress + "], local port[" + localPort + "]" ) ; socketChannel . configureBlocking ( true ) ; long absoluteTimeout = SystemTime . timeMillis ( ) + _inspectResponseTimeout ; newSock . connect ( serverAddress , _INSPECT_TIMEOUT ) ; handleOpenSocket ( socketChannel , localPort , absoluteTimeout , watched . getClient ( ) ) ; if ( _logger . isLoggable ( Level . FINE ) ) _logger . log ( Level . FINE , getValidConnectionMessage ( serverAddress ) ) ; watched . startWatch ( ) ; } catch ( IOException e ) { close ( bucket , serverAddress , e , startInvocationVersion ) ; } finally { if ( socketChannel != null ) socketChannel . close ( ) ; } }


public boolean postScale  ( float sx , float sy ) { Matrix matrix = new Matrix ( ) ; matrix . setValues ( new float [ ] { sx , 0 , 0 , 0 , sy , 0 , 0 , 0 , 1 } ) ; Matrix current = new Matrix ( ) ; current . setValues ( MATRIX ) ; matrix . preConcat ( current ) ; set ( matrix ) ; return true ; }

PostConCats la matriz con la escala especificada.M '= s (sx, sy) * m


public static void playWavFile  ( String filename , int loop , boolean waitUntilCompleted ) { AudioInputStream audioInputStream = null ; File clipFile = new File ( filename ) ; try { audioInputStream = AudioSystem . getAudioInputStream ( clipFile ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } if ( audioInputStream != null ) { AudioFormat format = audioInputStream . getFormat ( ) ; DataLine . Info info = new DataLine . Info ( Clip . class , format ) ; try { m_clip = ( Clip ) AudioSystem . getLine ( info ) ; m_clip . open ( audioInputStream ) ; } catch ( LineUnavailableException e ) { e . printStackTrace ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } m_clip . loop ( loop ) ; if ( waitUntilCompleted ) m_clip . drain ( ) ; } else { System . out . println ( "playWavFile<init>(): can't get data from file " + clipFile . getName ( ) ) ; } }

Reproduzca un bucle de archivos veces (0 = solo una vez).Jugar en el fondo, no bloqueo.


public static IBaseResourceStorageFactory current  ( ) { return currentFactory ; }


@ Override protected void synchronizeData  ( ) { needsSyncData ( false ) ; DeferredDocumentImpl ownerDocument = ( DeferredDocumentImpl ) this . ownerDocument ( ) ; name = ownerDocument . getNodeName ( fNodeIndex ) ; ownerDocument . getNodeType ( fNodeIndex ) ; publicId = ownerDocument . getNodeValue ( fNodeIndex ) ; systemId = ownerDocument . getNodeURI ( fNodeIndex ) ; int extraDataIndex = ownerDocument . getNodeExtra ( fNodeIndex ) ; ownerDocument . getNodeType ( extraDataIndex ) ; baseURI = ownerDocument . getNodeName ( extraDataIndex ) ; }

Sincroniza los datos.Esto es especial debido a la forma en que la notación "rápida" almacena su información internamente.


public void addException  ( Access node ) { List < Access > list = ( parent == null || state == null ) ? getExceptionListNoTransform ( ) : getExceptionList ( ) ; list . addChild ( node ) ; }

Anexar un elemento a la lista de excepciones.


public static SM_SYSTEM_MESSAGE STR_MSG_PARTY_LOOTING_CHANGED_RULE  ( String value0 , String value1 , String value2 ) { return new SM_SYSTEM_MESSAGE ( 1390250 , value0 , value1 , value2 ) ; }

La política de botín de grupo es ahora% 0.% 1 Los artículos serán distribuidos por% 2.


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

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


public static Diphone loadBinary  ( ByteBuffer bb ) throws IOException { StringBuffer sb = new StringBuffer ( ) ; int midPoint ; int numSamples ; Sample [ ] samples ; if ( bb . getInt ( ) != MAGIC ) { throw new Error ( "Bad magic number in diphone" ) ; } for ( int i = 0 ; i < NAME_LENGTH ; i ++ ) { char c = bb . getChar ( ) ; if ( ! Character . isWhitespace ( c ) ) { sb . append ( c ) ; } } midPoint = bb . getInt ( ) ; numSamples = bb . getInt ( ) ; samples = new Sample [ numSamples ] ; for ( int i = 0 ; i < numSamples ; i ++ ) { samples [ i ] = Sample . loadBinary ( bb ) ; } return new Diphone ( sb . toString ( ) . trim ( ) , samples , midPoint ) ; }

Carga un nuevo Diphone desde el búfer dado.


public static int diff  ( FeatureVector v1 , FeatureVector v2 ) { int ret = 0 ; if ( v1 . byteValuedDiscreteFeatures . length < v2 . byteValuedDiscreteFeatures . length ) { throw new RuntimeException ( "v1 and v2 don't have the same number of byte-valued features: [" + v1 . byteValuedDiscreteFeatures . length + "] versus [" + v2 . byteValuedDiscreteFeatures . length + "]." ) ; } for ( int i = 0 ; i < v1 . byteValuedDiscreteFeatures . length ; i ++ ) { if ( v1 . byteValuedDiscreteFeatures [ i ] == v2 . byteValuedDiscreteFeatures [ i ] ) ret ++ ; } if ( v1 . shortValuedDiscreteFeatures . length < v2 . shortValuedDiscreteFeatures . length ) { throw new RuntimeException ( "v1 and v2 don't have the same number of short-valued features: [" + v1 . shortValuedDiscreteFeatures . length + "] versus [" + v2 . shortValuedDiscreteFeatures . length + "]." ) ; } for ( int i = 0 ; i < v1 . shortValuedDiscreteFeatures . length ; i ++ ) { if ( v1 . shortValuedDiscreteFeatures [ i ] == v2 . shortValuedDiscreteFeatures [ i ] ) ret ++ ; } return ( ret ) ; }

Compara dos vectores de características en términos de cuántas características discretas tienen en común.ADVERTENCIA: Esto asume que los vectores de las características se emiten desde la misma featurificación;Solo se verifica el número de características para la compatibilidad.


public boolean isNonEscapingElement  ( String tagName ) { int i ; if ( _nonEscapingElements == null ) { return false ; } for ( i = 0 ; i < _nonEscapingElements . length ; ++ i ) if ( _nonEscapingElements [ i ] . equals ( tagName ) ) return true ; return false ; }

Devuelve VERDADERO si el nodo de texto, los niños de los elementos dados se deben emitir sin escapar.


private static void createNodeVsBlockMapping  ( List < NodeBlockRelation > flattenedList , Map < String , List < Distributable > > nodeAndBlockMapping ) { for ( NodeBlockRelation nbr : flattenedList ) { String node = nbr . getNode ( ) ; List < Distributable > list ; if ( null == nodeAndBlockMapping . get ( node ) ) { list = new ArrayList < > ( CarbonCommonConstants . DEFAULT_COLLECTION_SIZE ) ; list . add ( nbr . getBlock ( ) ) ; Collections . sort ( list ) ; nodeAndBlockMapping . put ( node , list ) ; } else { list = nodeAndBlockMapping . get ( node ) ; list . add ( nbr . getBlock ( ) ) ; Collections . sort ( list ) ; } } }

Crea el nodo y su mapeo de bloques relacionados y colocados en un mapa.


private boolean isCharType  ( Field field ) { String type = field . getType ( ) . getName ( ) ; return type . equals ( "char" ) || type . endsWith ( "Character" ) ; }

Juez si el campo es char o tipo de carácter.


public boolean hasField  ( String fldName ) { return fields ( ) . contains ( fldName ) ; }

Devuelve VERDADERO si el campo especificado está en este esquema.


private int [ ] pickLocalAddress  ( ) throws IOException  { int [ ] ret = pickForcedLocalAddress ( ) ; if ( ret == null ) { ret = pickAutoDetectedLocalAddress ( ) ; } return ret ; }

Seleccione la dirección local para una operación de transferencia de datos activa.


public String sprintf  ( ) { Enumeration e = vFmt . elements ( ) ; ConversionSpecification cs = null ; char c = 0 ; StringBuilder sb = new StringBuilder ( ) ; while ( e . hasMoreElements ( ) ) { cs = ( ConversionSpecification ) e . nextElement ( ) ; c = cs . getConversionCharacter ( ) ; if ( c == '\0' ) sb . append ( cs . getLiteral ( ) ) ; else if ( c == '%' ) sb . append ( "%" ) ; } return sb . toString ( ) ; }

Formatear nada.Simplemente use la cadena de control.


@ Override public void reset  ( ) { super . reset ( ) ; fNamespaceDeclarations = fConfiguration . getFeature ( Constants . DOM_NAMESPACE_DECLARATIONS ) ; if ( fNullFilterInUse ) { fDOMFilter = null ; fNullFilterInUse = false ; } if ( fSkippedElemStack != null ) { fSkippedElemStack . removeAllElements ( ) ; } fRejectedElementDepth = 0 ; fFilterReject = false ; fSchemaType = null ; }


@ Nullable ( "if there is no configuration that matches the constraints" ) public static < T > FolderConfiguration  restrict ( @ NotNull ConfiguredElement < T > compatible , Collection < ConfiguredElement < T > > allItems ) { ArrayList < FolderConfiguration > incompatibleConfigurations = Lists . newArrayListWithCapacity ( allItems . size ( ) )  ; boolean found = false ; for ( ConfiguredElement configuredItem : allItems ) { FolderConfiguration configuration = configuredItem . getConfiguration ( ) ; if ( configuredItem . equals ( compatible ) ) { found = true ; continue ; } incompatibleConfigurations . add ( configuration ) ; } assert found ; RestrictedConfiguration restricted = restrict ( compatible . getConfiguration ( ) , incompatibleConfigurations ) ; return ( restricted != null ) ? restricted . getAny ( ) : null ; }

Devuelve una versión restringida de la configuración pasada.El valor devuelto será incompatible con cualquier otra configuración en el artículo.Esta configuración se puede utilizar cuando queremos asegurarse de que se mostrará la configuración seleccionada.Nota: Allitems debe contener compatible


public GeoServerStyleTree ( SelectedStyleInterface parent ) { parentObj = parent ; createUI ( ) ; Dimension preferredSize = new Dimension ( 250 , 300 ) ; setPreferredSize ( preferredSize ) ; }

Instantánea un nuevo árbol de estilo Geo Server.


public synchronized void onDestroy  ( ) { cleanupService ( ) ; mHandler . getLooper ( ) . quit ( ) ; }

Informe a la biblioteca que el contexto está a punto de ser destruido, de modo que se puedan limpiar las conexiones abiertas.<p> El incumplimiento de este método puede resultar en un fallo en ciertas circunstancias, como durante la rotación de la pantalla si una actividad solicita la verificación de licencia o cuando el usuario sale de la aplicación.


public void updateCommandTag  ( final CommandTagUpdate commandTagUpdate , final SourceCommandTag commandTag ) throws IllegalAccessException , NoSuchFieldException { fillNonNullFields ( commandTagUpdate , commandTag , CHANGE_ID_FIELD , COMMAND_TAG_ID_FIELD , EQUIPMENT_ID_FIELD ) ; removeListOfFields ( commandTagUpdate . getFieldsToRemove ( ) , commandTag ) ; if ( commandTagUpdate . getHardwareAddressUpdate ( ) != null ) { updateHardwareAddress ( commandTagUpdate . getHardwareAddressUpdate ( ) , commandTag . getHardwareAddress ( ) ) ; } }

Actualiza un objeto de etiqueta de comando con los valores de un objeto de actualización de etiquetas de comandos.


private int [ ] extractRow  ( int [ ] [ ] twoDimArray , int r ) throws CanceledException { assert ( ( r >= 0 ) && ( r < twoDimArray [ 0 ] . length ) ) ; int [ ] row = new int [ twoDimArray . length ] ; progressListener . setMaximum ( row . length ) ; for ( int i = 0 ; i < row . length ; i ++ ) { row [ i ] = twoDimArray [ i ] [ r ] ; progressListener . setProgress ( i ) ; } return row ; }

extraer una fila de una matriz bidimensional


@ Override public Filter createLogicFilter  ( List < Filter > filterList ) { AndImpl filter = null ; if ( ( filterList == null ) || ( filterList . size ( ) != 2 ) ) { filter = new AndExtended ( ) ; } else { filter = new AndExtended ( filterList ) ; } return filter ; }


@ Override public boolean accept  ( File file ) { String name = file . getName ( ) ; for ( String prefix : this . prefixes ) { if ( caseSensitivity . checkStartsWith ( name , prefix ) ) { return true ; } } return false ; }

Cheques para ver si el nombre de archivo comienza con el prefijo.


private double [ ] generateSample  ( ) { final RealDistribution uniformDist = new UniformRealDistribution ( - 100 , 100 ) ; final RandomDataGenerator randomDataGenerator = new RandomDataGenerator ( 100 ) ; final int sampleSize = randomDataGenerator . nextInt ( 10 , 100 ) ; final double [ ] out = randomDataGenerator . nextDeviates ( uniformDist , sampleSize ) ; return out ; }

Genera una muestra aleatoria de doble valores.El tamaño de la muestra es aleatorio, entre 10 y 100 y los valores se distribuyen uniformemente durante [-100, 100].


public String process  ( Item item ) throws ProcessException  { int count = - 1 ; for ( Item p = item . getItemAs ( Relation . SYLLABLE_STRUCTURE ) ; p != null ; p = p . getPrevious ( ) ) { count ++ ; } return Integer . toString ( rail ( count ) ) ; }

Realiza un poco de procesamiento en el artículo dado.


public VideoSearchQueryWithExtended filters  ( VideoSearchFilter ... value ) { return unsafeParam ( "filters" , value ) ; }


public String toString  ( ) { return name ; }


public void handleStep  ( final ODEStateInterpolator interpolator , final boolean isLast ) { }

Manejar el último paso aceptado.Este método no hace nada en esta clase.


public static long toLong  ( Object v , long defaultValue ) { if ( v != null ) { if ( v instanceof Long ) { return ( Long ) v ; } if ( v instanceof Integer ) { return ( Integer ) v ; } if ( v instanceof Float ) { return ( long ) ( ( Float ) v ) . floatValue ( ) ; } if ( v instanceof Double ) { return ( long ) ( ( Double ) v ) . doubleValue ( ) ; } StringBuilder sb = new StringBuilder ( ) ; String s = v . toString ( ) ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { char c = s . charAt ( i ) ; c = X . getNumber ( c ) ; if ( c >= '0' && c <= '9' ) { sb . append ( c ) ; } else if ( c == '-' && sb . length ( ) == 0 ) { sb . append ( c ) ; } else if ( sb . length ( ) > 0 ) { break ; } } s = sb . toString ( ) ; if ( s . length ( ) > 0 ) { try { return Long . parseLong ( s ) ; } catch ( Exception e ) { log . error ( e ) ; } } } return defaultValue ; }

Convierte el V a largo, si falló con el valor predeterminado.


public DocsAddQuery accessKey  ( String value ) { return unsafeParam ( "access_key" , value ) ; }

Llave de acceso.Este parámetro se requiere si "Access_Key" se devolvió con los datos del documento.


@ SuppressWarnings ( "rawtypes" ) static boolean isTrue  ( Object v1 ) { if ( v1 instanceof Number ) { return ! Array . get ( Array . newInstance ( Primitives . unwrap ( v1 . getClass ( ) ) , 1 ) , 0 ) . equals ( v1 ) ; } if ( v1 instanceof Boolean ) { return ( Boolean ) v1 ; } if ( v1 instanceof Doc ) { return ! ( ( Doc ) v1 ) . isWhitespace ( ) ; } if ( v1 instanceof String ) { return ! Strings . isNullOrEmpty ( ( String ) v1 ) ; } if ( v1 instanceof Iterable ) { return ( ( Iterable ) v1 ) . iterator ( ) . hasNext ( ) ; } return false ; }

Determina si un valor es "verdadero", donde se interpreta verdadero dependiendo del tipo de valores.


private void handlePuncture  ( Peer peer , Puncture message ) throws IOException { }

Manejar una punción.No hace nada porque el único propósito de una punción es perforar un agujero en la NAT.


public Builder clockTicker  ( Ticker ticker ) { this . _ticker = ticker ; return this ; }


private Reader createUTF16Reader  ( InputStream stream , boolean isBigEndian ) { return new UTF16Reader ( stream , ( fTempString . ch . length << 1 ) , isBigEndian , fErrorReporter . getMessageFormatter ( XMLMessageFormatter . XML_DOMAIN ) , fErrorReporter . getLocale ( ) ) ; }

Cree un nuevo lector UTF-16 de la entrada de entrada.


public static SM_SYSTEM_MESSAGE STR_MSG_STIGMA_ENCHANT_SUCCESS  ( DescriptionId descriptionId ) { return new SM_SYSTEM_MESSAGE ( 1402930 , descriptionId ) ; }

Has encantado con éxito% 0 y el nivel de encanto del estigma ha aumentado en 1 nivel


@ Override public String toString  ( ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( getClass ( ) . getSimpleName ( ) ) ; sb . append ( " [" ) ; sb . append ( "Hash = " ) . append ( hashCode ( ) ) ; sb . append ( ", catalogId=" ) . append ( catalogId ) ; sb . append ( ", key=" ) . append ( key ) ; sb . append ( ", name=" ) . append ( name ) ; sb . append ( "]" ) ; return sb . toString ( ) ; }

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


public void configureDetailsView  ( DetailsViewConfiguration detailsViewConfiguration ) { double topHorizontalDividerResizeWeight = detailsViewConfiguration . getTopHorizontalDividerResizeWeight ( ) ; if ( topHorizontalDividerResizeWeight != - 1 ) detailsTopHorizontalSplitter . setResizeWeight ( topHorizontalDividerResizeWeight ) ; double topHorizontalDividerLocation = detailsViewConfiguration . getTopHorizontalDividerLocation ( ) ; if ( topHorizontalDividerLocation != - 1 ) detailsTopHorizontalSplitter . setDividerLocation ( topHorizontalDividerLocation ) ; double bottomHorizontalDividerResizeWeight = detailsViewConfiguration . getBottomHorizontalDividerResizeWeight ( ) ; if ( bottomHorizontalDividerResizeWeight != - 1 ) detailsBottomHorizontalSplitter . setResizeWeight ( bottomHorizontalDividerResizeWeight ) ; double bottomHorizontalDividerLocation = detailsViewConfiguration . getBottomHorizontalDividerLocation ( ) ; if ( bottomHorizontalDividerLocation != - 1 ) detailsBottomHorizontalSplitter . setDividerLocation ( bottomHorizontalDividerLocation ) ; double verticalDividerResizeWeight = detailsViewConfiguration . getVerticalDividerResizeWeight ( ) ; if ( verticalDividerResizeWeight != - 1 ) detailsVerticalSplitter . setResizeWeight ( verticalDividerResizeWeight ) ; double verticalDividerLocation = detailsViewConfiguration . getVerticalDividerLocation ( ) ; if ( verticalDividerLocation != - 1 ) detailsVerticalSplitter . setDividerLocation ( verticalDividerLocation ) ; }

Configura las propiedades de la vista Detalles.


public static boolean isContent  ( int c ) { return ( c < 0x10000 && ( CHARS [ c ] & MASK_CONTENT ) != 0 ) || ( 0x10000 <= c && c <= 0x10FFFF ) ; }

Devuelve VERDADERO si el carácter especificado se puede considerar contenido.


public static String wrapQuotesIfWindowsOS  ( String context ) { return ExecutorUtils . isUnixOS ( ) ? context : ( "\"" + context + "\"" ) ; }

Envuelva el contexto suministrado con cotizaciones solo si Windows OS


public Experiment ( String label , Application application , String startTime , String endTime , double samplingPercent , String description , String rule , Boolean isPersonalizationEnabled , String modelName , String modelVersion , Boolean isRapidExperiment , Integer userCap , String creatorID ) { this . setLabel ( label ) . setApplication ( application ) . setStartTime ( startTime ) . setEndTime ( endTime ) . setSamplingPercent ( samplingPercent ) . setDescription ( description ) . setRule ( rule ) . setModelName ( modelName ) . setModelVersion ( modelVersion ) . setIsPersonalizationEnabled ( isPersonalizationEnabled ) . setIsRapidExperiment ( isRapidExperiment ) . setUserCap ( userCap ) . setCreatorID ( creatorID ) ; }


public NumberPicker ( Activity activity ) { super ( activity , new String [ ] { } ) ; }


@ Override public void onReceivedTitle  ( WebView view , String title ) { i ( null , "--> onReceivedTitle() title = " + title ) ; super . onReceivedTitle ( view , title ) ; configReceivedTitle ( view , title ) ; }

Notifique a la aplicación host de un cambio en el título del documento.


private static String dayToString  ( int day , int dayOfWeekLength ) { return DateUtils . getDayOfWeekString ( dayToUtilDay ( day ) , dayOfWeekLength ) ; }

Convierte el día de la semana a una cadena.


private void timeout  ( ) { if ( this . status == AccelListener . STARTING ) { this . timestamp = System . currentTimeMillis ( ) ; this . win ( ) ; } }

Devuelve la última posición en caché si el sensor no ha devuelto un valor más nuevo.Llamó dos segundos después de comenzar el oyente.


public Builder withRange  ( ByteString endKey ) { this . endKey = Optional . fromNullable ( endKey ) ; return this ; }

Establezca la tecla final de la solicitud de eliminación.Si se establece, la solicitud de eliminación eliminará las teclas de <I> Tecla </ i> a <i> LEYKEY </ I> (exclusivo).<p> Si la tecla final es '\ 0', el rango es todas las teclas> = tecla.<p> Si la tecla final es de un poco más grande que la tecla dada, luego elimina todas las teclas con el prefijo (la clave dada).<p> Si la tecla y la tecla final son '\ 0', elimina todas las teclas.


public static void show  ( @ Nullable Activity activity , int resId , int duration , int gravity ) { show ( activity , resId == 0 ? null : getString ( activity , resId ) , duration , gravity ) ; }


Index ( Node < K , V > node , Index < K , V > down , Index < K , V > right )  { this . node = node ; this . down = down ; this . right = right ; }

Crea un nodo de índice con valores dados.


public boolean contains  ( int index ) { return index >= getFirst ( ) && index <= getLast ( ) ; }

Prueba si el artículo está contenido por rango


public void put  ( String name , Object value ) { name2data . get ( name ) [ 2 ] = value ; }

Establezca el valor para un nombre.¡No comprueba que el valor sea del tipo correcto!


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


@ Override public final void writeBytes  ( String s ) throws IOException  { dis . writeBytes ( s ) ; }


@ PluginFactory public static PigeonRolloverStrategy createStrategy  ( @ PluginAttribute ( "max" ) final String max , @ PluginAttribute ( "min" ) final String min , @ PluginAttribute ( "fileIndex" ) final String fileIndex , @ PluginAttribute ( "compressionLevel" ) final String compressionLevelStr , @ PluginConfiguration final Configuration config ) { final boolean useMax = fileIndex == null ? true : fileIndex . equalsIgnoreCase ( "max" ) ; int minIndex = MIN_WINDOW_SIZE ; if ( min != null ) { minIndex = Integer . parseInt ( min ) ; if ( minIndex < 1 ) { LOGGER . error ( "Minimum window size too small. Limited to " + MIN_WINDOW_SIZE ) ; minIndex = MIN_WINDOW_SIZE ; } } int maxIndex = DEFAULT_WINDOW_SIZE ; if ( max != null ) { maxIndex = Integer . parseInt ( max ) ; if ( maxIndex < minIndex ) { maxIndex = minIndex < DEFAULT_WINDOW_SIZE ? DEFAULT_WINDOW_SIZE : minIndex ; LOGGER . error ( "Maximum window size must be greater than the minimum windows size. Set to " + maxIndex ) ; } } final int compressionLevel = Integers . parseInt ( compressionLevelStr , Deflater . DEFAULT_COMPRESSION ) ; return new PigeonRolloverStrategy ( minIndex , maxIndex , useMax , compressionLevel , config . getStrSubstitutor ( ) ) ; }


private void migrate  ( ) { if ( ! migrated ) { BlazeUserSettings userSettings = BlazeUserSettings . getInstance ( ) ; this . attachSourcesByDefault = userSettings . getAttachSourcesByDefault ( ) ; this . attachSourcesOnDemand = userSettings . getAttachSourcesOnDemand ( ) ; this . migrated = true ; } }

Se agrega en 1.8, se puede quitar ~ 2.2.Cuando se elimina esto, la configuración de Java ya no se puede migrar.(Esto no es catastrófico, sin embargo, la configuración se reiniciará)


public static void clearReferences  ( ClassLoader classLoader ) { ClassLoaderCache . getCache ( ) . removeClassLoader ( classLoader ) ; if ( NonActivatableServiceDescriptor . getGlobalPolicy ( ) != null ) { NonActivatableServiceDescriptor . getGlobalPolicy ( ) . setPolicy ( classLoader , null ) ; } clearReferencesJdbc ( classLoader ) ; clearReferencesThreads ( classLoader ) ; clearReferencesThreadLocals ( classLoader ) ; clearReferencesRmiTargets ( classLoader ) ; clearRmiLoaderHandler ( classLoader ) ; try { Class clazz = classLoader . loadClass ( "org.apache.commons.logging.LogFactory" ) ; clazz . getMethod ( "release" , ClassLoader . class ) . invoke ( null , classLoader ) ; } catch ( Throwable t ) { } try { Class clazz = classLoader . loadClass ( "org.apache.juli.logging.LogFactory" ) ; clazz . getMethod ( "release" , ClassLoader . class ) . invoke ( null , classLoader ) ; } catch ( Throwable t ) { } clearReferencesResourceBundles ( classLoader ) ; java . beans . Introspector . flushCaches ( ) ; }


public void subtractSupplements  ( int count , int supplementId ) { subtractedSupplementsCount = count ; subtractedSupplementId = supplementId ; }

Ponga suplementos a la cola de resta, de modo que al moverse, no disminuirían, necesite actualizarse como confirmación para actualizar Utilizar actualizaciones de actualizaciones ()


private void adjustTop  ( RectF rect , float top , RectF bounds , float snapMargin , float aspectRatio , boolean leftMoves , boolean rightMoves ) { float newTop = top ; if ( newTop < 0 ) { newTop /= 1.05f ; mTouchOffset . y -= newTop / 1.1f ; } if ( newTop < bounds . top ) { mTouchOffset . y -= ( newTop - bounds . top ) / 2f ; } if ( newTop - bounds . top < snapMargin ) { newTop = bounds . top ; } if ( rect . bottom - newTop < mMinCropHeight ) { newTop = rect . bottom - mMinCropHeight ; } if ( rect . bottom - newTop > mMaxCropHeight ) { newTop = rect . bottom - mMaxCropHeight ; } if ( newTop - bounds . top < snapMargin ) { newTop = bounds . top ; } if ( aspectRatio > 0 ) { float newWidth = ( rect . bottom - newTop ) * aspectRatio ; if ( newWidth < mMinCropWidth ) { newTop = Math . max ( bounds . top , rect . bottom - ( mMinCropWidth / aspectRatio ) ) ; newWidth = ( rect . bottom - newTop ) * aspectRatio ; } if ( newWidth > mMaxCropWidth ) { newTop = Math . max ( bounds . top , rect . bottom - ( mMaxCropWidth / aspectRatio ) ) ; newWidth = ( rect . bottom - newTop ) * aspectRatio ; } if ( leftMoves && rightMoves ) { newTop = Math . max ( newTop , Math . max ( bounds . top , rect . bottom - bounds . width ( ) / aspectRatio ) ) ; } else { if ( leftMoves && rect . right - newWidth < bounds . left ) { newTop = Math . max ( bounds . top , rect . bottom - ( rect . right - bounds . left ) / aspectRatio ) ; newWidth = ( rect . bottom - newTop ) * aspectRatio ; } if ( rightMoves && rect . left + newWidth > bounds . right ) { newTop = Math . max ( newTop , Math . max ( bounds . top , rect . bottom - ( bounds . right - rect . left ) / aspectRatio ) ) ; } } } rect . top = newTop ; }

Obtenga la posición Y resultante del borde superior de la ventana de recorte dada la posición del mango y la caja delimitadora de la imagen y el radio de presión.


public ImmutableList < String > lines  ( ) { return lines ; }

Devuelve líneas crudas, incluyendo cualquier sangría y espacio en blanco circundante.


@ RequestMapping ( method = RequestMethod . POST ) public void handleFileUpload  ( HttpServletRequest request , HttpServletResponse httpResponse , @ RequestParam ( "file" ) MultipartFile file ) { if ( ! file . isEmpty ( ) ) { try { ServerConfig serverConfig = retrieveServerConfig ( ) ; String fileName = file . getOriginalFilename ( ) ; if ( fileName != null && fileName . endsWith ( ".zip" ) ) { clientService . uploadAppDefinition ( httpResponse , serverConfig , fileName , file . getInputStream ( ) ) ; } else { throw new BadRequestException ( "Invalid file name" ) ; } } catch ( IOException e ) { throw new InternalServerErrorException ( "Could not deploy file: " + e . getMessage ( ) ) ; } } else { throw new BadRequestException ( "No file found in POST body" ) ; } }

POST / REPORTE / ACTIVITI / APLICACIONES: Sube una aplicación


public NumberIsTooLargeException ( Localizable specific , Number wrong , Number max , boolean boundIsAllowed ) { super ( specific , wrong , max ) ; this . max = max ; this . boundIsAllowed = boundIsAllowed ; }

Construye la excepción con un contexto específico.


@ SubscribeEvent public void swimmingPenalty  ( LivingUpdateEvent event ) { if ( ! ( event . getEntityLiving ( ) instanceof EntityPlayer ) ) return ; EntityPlayer player = ( EntityPlayer ) event . getEntityLiving ( ) ; if ( ! EntityPlayerExt . isSurvival ( player ) ) return ; if ( ! ( player . getFoodStats ( ) instanceof BWMFoodStats ) ) return ; if ( player . isInWater ( ) && ! EntityPlayerExt . canSwim ( player ) && ! EntityPlayerExt . isNearBottom ( player ) ) { player . motionY -= 0.02 ; } }

Deshabilitar la natación si es necesario.TODO FIXME no puede saltar en la parte inferior.Se puede requerir un nuevo gancho.(Trabajo probable implementado)


private SandboxBody create  ( int index ) { SandboxBody body = new SandboxBody ( ) ; if ( index == 0 ) { body . addFixture ( new Circle ( 0.5 ) ) ; body . translate ( 3.5 , 0.0 ) ; } else if ( index == 1 ) { body . addFixture ( Geometry . createUnitCirclePolygon ( 5 , 1.0 ) ) ; body . translate ( 0.0 , 2.5 ) ; } else if ( index == 2 ) { body . addFixture ( new Rectangle ( 0.5 , 0.5 ) ) ; body . translate ( - 4.0 , - 0.5 ) ; } else if ( index == 3 ) { body . addFixture ( new Triangle ( new Vector2 ( 0.45 , - 0.12 ) , new Vector2 ( - 0.45 , 0.38 ) , new Vector2 ( - 0.15 , - 0.22 ) ) ) ; body . translate ( 0.5 , 0.5 ) ; } else { body . addFixture ( new Segment ( new Vector2 ( - 0.3 , 0.2 ) , new Vector2 ( 0.0 , - 0.1 ) ) ) ; body . translate ( - 1.0 , - 1.5 ) ; } body . setMass ( MassType . INFINITE ) ; body . setUserData ( "Body" + ( index + 1 ) ) ; return body ; }

Método de ayuda para crear los diversos organismos para la prueba de colisión.


private void rotateLeft  ( Node < K , V > root ) { Node < K , V > left = root . left ; Node < K , V > pivot = root . right ; Node < K , V > pivotLeft = pivot . left ; Node < K , V > pivotRight = pivot . right ; root . right = pivotLeft ; if ( pivotLeft != null ) { pivotLeft . parent = root ; } replaceInParent ( root , pivot ) ; pivot . left = root ; root . parent = pivot ; root . height = Math . max ( left != null ? left . height : 0 , pivotLeft != null ? pivotLeft . height : 0 ) + 1 ; pivot . height = Math . max ( root . height , pivotRight != null ? pivotRight . height : 0 ) + 1 ; }

Gira el subárbol para que el niño derecho de su raíz sea la nueva raíz.


private void hidePublicShare  ( ) { getShareViaLinkSwitch ( ) . setVisibility ( View . GONE ) ; getExpirationDateSection ( ) . setVisibility ( View . GONE ) ; getPasswordSection ( ) . setVisibility ( View . GONE ) ; getEditPermissionSection ( ) . setVisibility ( View . GONE ) ; getGetLinkButton ( ) . setVisibility ( View . GONE ) ; getHideFileListingPermissionSection ( ) . setVisibility ( View . GONE ) ; }

Oculta todos los elementos de la UI relacionados con la participación pública.


public void removeTransactionAfterEnd  ( XtnEntry xtnEntry ) { try { xtnEntry . lock ( ) ; ( ( ConcurrentHashMap < ServerTransaction , XtnEntry > ) getXtnTable ( ) ) . remove ( xtnEntry . m_Transaction , xtnEntry ) ; m_TimedXtns . remove ( xtnEntry . m_Transaction ) ; } finally { xtnEntry . unlock ( ) ; } }

Eliminar la transacción dada de las transacciones manejadas


public TestInfo ( ) { this . testName = "Default test name" ; this . logEntries = new TreeSet < > ( new LogEntryComparator ( ) ) ; this . testResult = new Success ( ) ; this . start = new Date ( ) ; this . last = false ; this . subreports = new LinkedList < > ( ) ; }

Construye testinfo.Inicializa sus campos a valores predeterminados.No lo llames manualmente, use Guice en su lugar.La prueba tiene éxito por defecto.


private DataType thriftDataTyopeToWrapperDataType  ( org . apache . carbondata . format . DataType dataTypeThrift ) { switch ( dataTypeThrift ) { case STRING : return DataType . STRING ; case SHORT : return DataType . SHORT ; case INT : return DataType . INT ; case LONG : return DataType . LONG ; case DOUBLE : return DataType . DOUBLE ; case DECIMAL : return DataType . DECIMAL ; case TIMESTAMP : return DataType . TIMESTAMP ; case ARRAY : return DataType . ARRAY ; case STRUCT : return DataType . STRUCT ; default : return DataType . STRING ; } }

Se utilizará por debajo del método para convertir el tipo de datos de thrift para envolver el tipo de datos


public void yypushback  ( int number ) { if ( number > yylength ( ) ) zzScanError ( ZZ_PUSHBACK_2BIG ) ; zzMarkedPos -= number ; }

Empuja la cantidad de caracteres especificada de nuevo en el flujo de entrada.Se leerán de nuevo por la siguiente llamada del método de escaneo.


@ Override public String toString  ( ) { return this . descriptions . toString ( ) ; }

Devuelve una representación de cadena de este mapa.La representación de la cadena consiste en una lista de asignaciones de valor clave, encerradas en tirantes.


public void parseShapeMapFromLine  ( String shapeMapAsLine ) { NexusStreamParser np = new NexusStreamParser ( new StringReader ( shapeMapAsLine ) ) ; try { while ( ! np . peekMatchIgnoreCase ( ";" ) ) { String sample = np . getWordRespectCase ( ) ; np . matchIgnoreCase ( ":" ) ; int shape = np . getInt ( ) ; sample2shape . put ( sample , ( byte ) shape ) ; } } catch ( IOException e ) { } }


public void log  ( String question , String intent , String confidence , String entity , String convoOutput , String convoId , String retrieveAndRankOutput ) throws Exception { logger . info ( Messages . getString ( "Logging.ENTRY_INTO_DB" ) ) ; Database db = client . database ( "conversation_enhanced_db" , true ) ; db . save ( new Document ( question , intent , confidence , entity , convoOutput , convoId , retrieveAndRankOutput ) ) ; }

Estos métodos se conectan a la base de datos y guarda el documento dado al Cloudant DB


@ Override public long addRoleModule  ( RoleModule roleModule ) { return sessionTemplate . insert ( NAMESPACE + ".addRoleModule" , roleModule ) ; }


public void callEvent  ( final Event event ) throws EventException { if ( event instanceof Cancellable ) { if ( ( ( Cancellable ) event ) . isCancelled ( ) && isIgnoringCancelled ( ) ) { return ; } } executor . execute ( listener , event ) ; }


@ Override public String scanName  ( ) throws IOException  { if ( fCurrentEntity . position == fCurrentEntity . count ) { load ( 0 , true ) ; } int offset = fCurrentEntity . position ; char ch = fCurrentEntity . ch [ offset ] ; if ( XML11Char . isXML11NameStart ( ch ) ) { if ( ++ fCurrentEntity . position == fCurrentEntity . count ) { fCurrentEntity . ch [ 0 ] = ch ; offset = 0 ; if ( load ( 1 , false ) ) { fCurrentEntity . columnNumber ++ ; String symbol = fSymbolTable . addSymbol ( fCurrentEntity . ch , 0 , 1 ) ; return symbol ; } } } else if ( XML11Char . isXML11NameHighSurrogate ( ch ) ) { if ( ++ fCurrentEntity . position == fCurrentEntity . count ) { fCurrentEntity . ch [ 0 ] = ch ; offset = 0 ; if ( load ( 1 , false ) ) { -- fCurrentEntity . position ; -- fCurrentEntity . startPosition ; return null ; } } char ch2 = fCurrentEntity . ch [ fCurrentEntity . position ] ; if ( ! XMLChar . isLowSurrogate ( ch2 ) || ! XML11Char . isXML11NameStart ( XMLChar . supplemental ( ch , ch2 ) ) ) { -- fCurrentEntity . position ; return null ; } if ( ++ fCurrentEntity . position == fCurrentEntity . count ) { fCurrentEntity . ch [ 0 ] = ch ; fCurrentEntity . ch [ 1 ] = ch2 ; offset = 0 ; if ( load ( 2 , false ) ) { fCurrentEntity . columnNumber += 2 ; String symbol = fSymbolTable . addSymbol ( fCurrentEntity . ch , 0 , 2 ) ; return symbol ; } } } else { return null ; } do { ch = fCurrentEntity . ch [ fCurrentEntity . position ] ; if ( XML11Char . isXML11Name ( ch ) ) { if ( ++ fCurrentEntity . position == fCurrentEntity . count ) { int length = fCurrentEntity . position - offset ; if ( length == fCurrentEntity . ch . length ) { char [ ] tmp = new char [ fCurrentEntity . ch . length << 1 ] ; System . arraycopy ( fCurrentEntity . ch , offset , tmp , 0 , length ) ; fCurrentEntity . ch = tmp ; } else { System . arraycopy ( fCurrentEntity . ch , offset , fCurrentEntity . ch , 0 , length ) ; } offset = 0 ; if ( load ( length , false ) ) { break ; } } } else if ( XML11Char . isXML11NameHighSurrogate ( ch ) ) { if ( ++ fCurrentEntity . position == fCurrentEntity . count ) { int length = fCurrentEntity . position - offset ; if ( length == fCurrentEntity . ch . length ) { char [ ] tmp = new char [ fCurrentEntity . ch . length << 1 ] ; System . arraycopy ( fCurrentEntity . ch , offset , tmp , 0 , length ) ; fCurrentEntity . ch = tmp ; } else { System . arraycopy ( fCurrentEntity . ch , offset , fCurrentEntity . ch , 0 , length ) ; } offset = 0 ; if ( load ( length , false ) ) { -- fCurrentEntity . position ; -- fCurrentEntity . startPosition ; break ; } } char ch2 = fCurrentEntity . ch [ fCurrentEntity . position ] ; if ( ! XMLChar . isLowSurrogate ( ch2 ) || ! XML11Char . isXML11Name ( XMLChar . supplemental ( ch , ch2 ) ) ) { -- fCurrentEntity . position ; break ; } if ( ++ fCurrentEntity . position == fCurrentEntity . count ) { int length = fCurrentEntity . position - offset ; if ( length == fCurrentEntity . ch . length ) { char [ ] tmp = new char [ fCurrentEntity . ch . length << 1 ] ; System . arraycopy ( fCurrentEntity . ch , offset , tmp , 0 , length ) ; fCurrentEntity . ch = tmp ; } else { System . arraycopy ( fCurrentEntity . ch , offset , fCurrentEntity . ch , 0 , length ) ; } offset = 0 ; if ( load ( length , false ) ) { break ; } } } else { break ; } } while ( true ) ; int length = fCurrentEntity . position - offset ; fCurrentEntity . columnNumber += length ; String symbol = null ; if ( length > 0 ) { symbol = fSymbolTable . addSymbol ( fCurrentEntity . ch , offset , length ) ; } return symbol ; }

Devuelve una cadena que coincida con la producción de nombre que aparece inmediatamente en la entrada como símbolo, o nula si no hay una cadena de nombres.<p /> <strong> Nota: </ strong> Se consumen los caracteres del nombre.<p /> <strong> Nota: </ strong> La cadena devuelta debe ser un símbolo.La mesa de símbolos se puede utilizar para este propósito.


public OrPredicate ( Predicate p1 ) { add ( p1 ) ; }


public int dnsDomainLevels  ( String host ) { int count = 0 ; int startPos = 0 ; while ( ( startPos = host . indexOf ( "." , startPos + 1 ) ) > - 1 ) { count ++ ; } return count ; }

Devuelve el número de niveles de dominio DNS (número de puntos) en el nombre de host.


@ Deployment public void testDecisionFunctionality  ( ) { Map < String , Object > variables = new HashMap < String , Object > ( ) ; variables . put ( "input" , 1 ) ; ProcessInstance pi = runtimeService . startProcessInstanceByKey ( "inclusiveGateway" , variables ) ; List < Task > tasks = taskService . createTaskQuery ( ) . processInstanceId ( pi . getId ( ) ) . list ( ) ; assertEquals ( 3 , tasks . size ( ) ) ; Map < String , String > expectedMessages = new HashMap < String , String > ( ) ; expectedMessages . put ( TASK1_NAME , TASK1_NAME ) ; expectedMessages . put ( TASK2_NAME , TASK2_NAME ) ; expectedMessages . put ( TASK3_NAME , TASK3_NAME ) ; for ( Task task : tasks ) { expectedMessages . remove ( task . getName ( ) ) ; } assertEquals ( 0 , expectedMessages . size ( ) ) ; variables . put ( "input" , 2 ) ; pi = runtimeService . startProcessInstanceByKey ( "inclusiveGateway" , variables ) ; tasks = taskService . createTaskQuery ( ) . processInstanceId ( pi . getId ( ) ) . list ( ) ; assertEquals ( 2 , tasks . size ( ) ) ; expectedMessages = new HashMap < String , String > ( ) ; expectedMessages . put ( TASK2_NAME , TASK2_NAME ) ; expectedMessages . put ( TASK3_NAME , TASK3_NAME ) ; for ( Task task : tasks ) { expectedMessages . remove ( task . getName ( ) ) ; } assertEquals ( 0 , expectedMessages . size ( ) ) ; variables . put ( "input" , 3 ) ; pi = runtimeService . startProcessInstanceByKey ( "inclusiveGateway" , variables ) ; tasks = taskService . createTaskQuery ( ) . processInstanceId ( pi . getId ( ) ) . list ( ) ; assertEquals ( 1 , tasks . size ( ) ) ; expectedMessages = new HashMap < String , String > ( ) ; expectedMessages . put ( TASK3_NAME , TASK3_NAME ) ; for ( Task task : tasks ) { expectedMessages . remove ( task . getName ( ) ) ; } assertEquals ( 0 , expectedMessages . size ( ) ) ; variables . put ( "input" , 4 ) ; try { runtimeService . startProcessInstanceByKey ( "inclusiveGateway" , variables ) ; fail ( ) ; } catch ( ActivitiException e ) { } }

El proceso de prueba tiene una puerta de enlace donde, la variable 'Entrada' se usa para seleccionar el flujo de secuencia saliente esperado.


public void verifyIsHidden  ( ) { conditions . verifyPostAjax ( null ) ; }

El método hace que Ajax Post Llame para asegurarse de que si el componente está oculto.


public void addActionButton  ( ActionButton actionButton ) { buttonBar . addView ( actionButton ) ; }

Agrega un ActionButton a la barra de botones.


public static void addSetting  ( String id , Object o ) { settings . put ( id , o ) ; }


public NumericHaving withType  ( HavingType type ) { return new NumericHaving ( type , getAggregation ( ) , getValue ( ) ) ; }

Obtenga una nueva instancia de esto con el tipo dado.


public void addAlias  ( String entityAlias , String name , String field , String colAlias , Boolean primKey , Boolean groupBy , String function ) { addAlias ( entityAlias , name , field , colAlias , primKey , groupBy , function , null , null ) ; }

Añadir un alias, detalle completo.Todos los parámetros pueden ser nulos excepto entidades y nombre.


public FreedomTouchView ( Context context ) { super ( context ) ; this . initialize ( ) ; }


public static String serverURIsToString  ( final List < String > serverURIs ) { StringBuffer serverURIsAsString = new StringBuffer ( ) ; boolean first = true ; for ( final String serverURI : serverURIs ) { if ( first ) { serverURIsAsString . append ( serverURI ) ; } else { serverURIsAsString . append ( ConnectionUtils . SERVER_DELIMITER + " " + serverURI ) ; } first = false ; } return serverURIsAsString . toString ( ) ; }

Convierte la lista dada de URIS del servidor en una sola cadena.


public boolean contains  ( String uid ) { cleanIfNeeded ( ) ; return _idSet0 . contains ( uid ) || _idSet1 . contains ( uid ) ; }

] Comprueba si el conjunto contiene este uid.


protected UsersGetFollowersQueryWithFields fields  ( List < UserField > value ) { return unsafeParam ( "fields" , value ) ; }


public String optString  ( String key , String defaultValue ) { LazyNode token = getOptionalFieldToken ( key ) ; if ( token == null ) return defaultValue ; if ( token . type == LazyNode . VALUE_NULL ) return defaultValue ; return token . getStringValue ( cbuf ) ; }

Devuelve el valor de la cadena almacenado en este objeto para la clave dada.Devuelve el valor predeterminado si no hay tal clave.


public static int write  ( AudioInputStream stream , AudioFileFormat . Type fileType , File out ) throws IOException { List providers = getAudioFileWriters ( ) ; int bytesWritten = 0 ; boolean flag = false ; for ( int i = 0 ; i < providers . size ( ) ; i ++ ) { AudioFileWriter writer = ( AudioFileWriter ) providers . get ( i ) ; try { bytesWritten = writer . write ( stream , fileType , out ) ; flag = true ; break ; } catch ( IllegalArgumentException e ) { continue ; } } if ( ! flag ) { throw new IllegalArgumentException ( "could not write audio file: file type not supported: " + fileType ) ; } else { return bytesWritten ; } }

Escribe una corriente de bytes que representan un archivo de audio del tipo de archivo especificado al archivo externo proporcionado.


public void toggle  ( ) { toggle ( false , null , null ) ; }

Alternar la visibilidad de la insignia en la interfaz de usuario.


public static int readInt  ( DataInputStream dis , boolean isBigEndian ) throws IOException { if ( ! isBigEndian ) { return readLittleEndianInt ( dis ) ; } else { return dis . readInt ( ) ; } }

Lea un entero de la corriente de entrada, intercambio de bytes según sea necesario


public AsyncServerRequest ( RequestType type , GeneratedMessage req , boolean requireCommonRequest ) { Request . Builder reqBuilder = Request . newBuilder ( ) ; reqBuilder . setRequestMessage ( req . toByteString ( ) ) ; reqBuilder . setRequestType ( type ) ; this . type = type ; this . request = reqBuilder . build ( ) ; this . requireCommonRequest = requireCommonRequest ; }

Instantánea una nueva solicitud de servidor.


public ShapelessMaterialRecipe ( Item output , Object ... input ) { this ( new ItemStack ( output ) , input ) ; }

Crea una nueva receta de material sin forma.


public void handleDecode  ( Result rawResult , Bitmap barcode , float scaleFactor ) { inactivityTimer . onActivity ( ) ; lastResult = rawResult ; ResultHandler resultHandler = ResultHandlerFactory . makeResultHandler ( this , rawResult ) ; boolean fromLiveScan = barcode != null ; if ( fromLiveScan ) { historyManager . addHistoryItem ( rawResult , resultHandler ) ; beepManager . playBeepSoundAndVibrate ( ) ; drawResultPoints ( barcode , scaleFactor , rawResult ) ; } switch ( source ) { case NATIVE_APP_INTENT : case PRODUCT_SEARCH_LINK : handleDecodeExternally ( rawResult , resultHandler , barcode ) ; break ; case ZXING_LINK : if ( scanFromWebPageManager == null || ! scanFromWebPageManager . isScanFromWebPage ( ) ) { handleDecodeInternally ( rawResult , resultHandler , barcode ) ; } else { handleDecodeExternally ( rawResult , resultHandler , barcode ) ; } break ; case NONE : SharedPreferences prefs = PreferenceManager . getDefaultSharedPreferences ( this ) ; if ( fromLiveScan && prefs . getBoolean ( PreferencesActivity . KEY_BULK_MODE , false ) ) { Toast . makeText ( getApplicationContext ( ) , getResources ( ) . getString ( R . string . msg_bulk_mode_scanned ) + " (" + rawResult . getText ( ) + ')' , Toast . LENGTH_SHORT ) . show ( ) ; restartPreviewAfterDelay ( BULK_MODE_SCAN_DELAY_MS ) ; } else { handleDecodeInternally ( rawResult , resultHandler , barcode ) ; } break ; } }

Se ha encontrado un código de barras válido, así que dale una indicación de éxito y muestre los resultados.


public void union  ( double x , double y , double w , double h ) { if ( status == INVALID ) return ; if ( status == EMPTY ) { setClip ( x , y , w , h ) ; status = INUSE ; return ; } clip [ 0 ] = Math . min ( clip [ 0 ] , x ) ; clip [ 1 ] = Math . min ( clip [ 1 ] , y ) ; clip [ 6 ] = Math . max ( clip [ 6 ] , x + w ) ; clip [ 7 ] = Math . max ( clip [ 7 ] , y + h ) ; }

Unión este clip de otra región.Como resultado, este clip se convertirá en una caja delimitadora alrededor de las dos regiones originales.


public static int findGlobalValleyLocation  ( float [ ] data ) { float min = Float . NaN ; int imin = - 1 ; for ( int i = 0 ; i < data . length ; i ++ ) { if ( Float . isNaN ( data [ i ] ) ) continue ; if ( Float . isNaN ( min ) || data [ i ] < min ) { min = data [ i ] ; imin = i ; } } return imin ; }

Encuentre el mínimo de todos los elementos en la matriz, ignorando los elementos que son NAN.


@ RequestMapping ( value = "/" , method = PUT , produces = APPLICATION_JSON_VALUE ) public ResponseEntity < ProjectDTO > update  ( @ RequestBody ProjectDTO projectDTO ) throws URISyntaxException { log . debug ( "Update ProjectDTO : {}" , projectDTO ) ; if ( ! projectDTO . isIdSet ( ) ) { return create ( projectDTO ) ; } ProjectDTO result = projectDTOService . save ( projectDTO ) ; return ResponseEntity . ok ( ) . body ( result ) ; }


private CertificateAndKey generateRootCertificate  ( ) { long generationStart = System . currentTimeMillis ( ) ; KeyPair caKeyPair = keyGenerator . generate ( ) ; CertificateAndKey certificateAndKey = securityProviderTool . createCARootCertificate ( rootCertificateInfo , caKeyPair , messageDigest ) ; long generationFinished = System . currentTimeMillis ( ) ; log . info ( "Generated CA root certificate and private key in {}ms. Key generator: {}. Signature algorithm: {}." , generationFinished - generationStart , keyGenerator , messageDigest ) ; return certificateAndKey ; }

Genera un nuevo certificado de CA raíz y clave privada.


private void renderEditingBody  ( GL2 gl , SandboxBody body ) { Dimension size = this . canvasSize ; gl . glColor4f ( 0.0f , 0.0f , 0.0f , 0.5f ) ; gl . glPushMatrix ( ) ; gl . glLoadIdentity ( ) ; RenderUtilities . fillRectangleFromTopLeft ( gl , - size . width * 0.5 , size . height * 0.5 , size . width , size . height ) ; gl . glPopMatrix ( ) ; if ( Preferences . isBodyAABBEnabled ( ) ) { this . renderAABB ( gl , body ) ; } RenderUtilities . pushTransform ( gl ) ; RenderUtilities . applyTransform ( gl , body . getTransform ( ) ) ; body . render ( gl ) ; if ( this . selectFixtureAction . isActive ( ) ) { BodyFixture bf = this . selectFixtureAction . getObject ( ) ; Convex convex = bf . getShape ( ) ; RenderUtilities . outlineShape ( gl , convex , 4 , Preferences . getSelectedColor ( ) ) ; gl . glColor4fv ( body . getFillColor ( ) , 0 ) ; RenderUtilities . fillShape ( gl , convex ) ; gl . glColor4fv ( body . getOutlineColor ( ) , 0 ) ; RenderUtilities . drawShape ( gl , convex , false ) ; } if ( Preferences . isBodyNormalEnabled ( ) ) { body . renderNormals ( gl ) ; } if ( Preferences . isBodyRotationDiscEnabled ( ) ) { body . renderRotationDisc ( gl ) ; } if ( Preferences . isBodyCenterEnabled ( ) ) { body . renderCenter ( gl ) ; } RenderUtilities . popTransform ( gl ) ; if ( Preferences . isBodyVelocityEnabled ( ) ) { body . renderVelocity ( gl ) ; } }

Representa un cuerpo de edición y estado relacionado.


void insertData  ( CharacterData node , int index , String insert ) { fInsertNode = node ; node . insertData ( index , insert ) ; fInsertNode = null ; }

Esta función inserta el texto en un nodo e invoca un método para arreglar todos los demás rangos.


public static String [ ] extractNoDictionaryDimsArr  ( String noDictionaryDim ) { if ( null == noDictionaryDim || noDictionaryDim . isEmpty ( ) ) { return new String [ 0 ] ; } String [ ] NoDictionary = noDictionaryDim . split ( CarbonCommonConstants . COMA_SPC_CHARACTER ) ; List < String > list1 = new ArrayList < String > ( CarbonCommonConstants . CONSTANT_SIZE_TEN ) ; for ( int i = 0 ; i < NoDictionary . length ; i ++ ) { String [ ] dim = NoDictionary [ i ] . split ( CarbonCommonConstants . COLON_SPC_CHARACTER ) ; list1 . add ( dim [ 0 ] ) ; } return list1 . toArray ( new String [ list1 . size ( ) ] ) ; }

Esto extraerá el alto recuento de cardinalidad de la cadena.


public Matrix solve  ( Matrix B ) { if ( B . getRowDimension ( ) != m ) { throw new IllegalArgumentException ( "Matrix row dimensions must agree." ) ; } if ( ! this . isFullRank ( ) ) { throw new RuntimeException ( "Matrix is rank deficient." ) ; } int nx = B . getColumnDimension ( ) ; double [ ] [ ] X = B . getArrayCopy ( ) ; for ( int k = 0 ; k < n ; k ++ ) { for ( int j = 0 ; j < nx ; j ++ ) { double s = 0.0 ; for ( int i = k ; i < m ; i ++ ) { s += QR [ i ] [ k ] * X [ i ] [ j ] ; } s = - s / QR [ k ] [ k ] ; for ( int i = k ; i < m ; i ++ ) { X [ i ] [ j ] += s * QR [ i ] [ k ] ; } } } for ( int k = n - 1 ; k >= 0 ; k -- ) { for ( int j = 0 ; j < nx ; j ++ ) { X [ k ] [ j ] /= Rdiag [ k ] ; } for ( int i = 0 ; i < k ; i ++ ) { for ( int j = 0 ; j < nx ; j ++ ) { X [ i ] [ j ] -= X [ k ] [ j ] * QR [ i ] [ k ] ; } } } return ( new Matrix ( X , n , nx ) . getMatrix ( 0 , n - 1 , 0 , nx - 1 ) ) ; }

Solución de mínimos cuadrados de A * X = B


private MotionEvent swapXY  ( MotionEvent ev ) { float width = getWidth ( ) ; float height = getHeight ( ) ; float newX = ( ev . getY ( ) / height ) * width ; float newY = ( ev . getX ( ) / width ) * height ; ev . setLocation ( newX , newY ) ; return ev ; }

Cambia las coordenadas X e Y de su evento táctil.


public static void main  ( String [ ] arguments ) { final Knock025A ab = new Knock025B ( ) ; System . out . println ( ab . getValue ( ) ) ; }


public boolean drawShadows  ( ) { return drawShadows ; }


public StatusFrame ( ) { super ( ) ; initComponents  ( ) ; }


Crea los valores de entrada de prueba de probabilidad acumulativos inversos incuestionables.


public void userKey  ( String command ) { if ( command . equals ( ACTION_GOTO_END ) ) { getGridScroll ( ) . setValue ( getGridScroll ( ) . getMaximum ( ) ) ; } else if ( command . equals ( ACTION_GOTO_HOME ) ) { getGridScroll ( ) . setValue ( getGridScroll ( ) . getMinimum ( ) ) ; } else if ( command . equals ( ACTION_LINE_DOWN ) ) { getGridScroll ( ) . setValue ( getGridScroll ( ) . getValue ( ) + 1 ) ; } else if ( command . equals ( ACTION_LINE_UP ) ) { getGridScroll ( ) . setValue ( getGridScroll ( ) . getValue ( ) - 1 ) ; } else if ( command . equals ( ACTION_PAGE_DOWN ) ) { getGridScroll ( ) . setValue ( getGridScroll ( ) . getValue ( ) + getGridScroll ( ) . getBlockIncrement ( ) ) ; } else if ( command . equals ( ACTION_PAGE_UP ) ) { getGridScroll ( ) . setValue ( getGridScroll ( ) . getValue ( ) - getGridScroll ( ) . getBlockIncrement ( ) ) ; } else { System . err . println ( "Error in userKey(): unknown command: " + command ) ; } }

Clave de usuario.La persona que llama nos da una cadena de comando para una acción del teclado.Las únicas acciones definidas actualmente son imitar la barra de desplazamiento o los elementos del menú.


void cancelLocalXtn  ( TransactionManager mgr , ServerTransaction st ) throws UnknownLeaseException { if ( ! ( mgr instanceof LocalTransactionManagerImpl ) ) throw new RuntimeException ( "cancel local xtn lease: invalid transaction manager" ) ; LocalTransactionManagerImpl ltx = ( LocalTransactionManagerImpl ) mgr ; try { abortSA ( mgr , st , true , false , false , null ) ; } catch ( UnknownTransactionException ex ) { throw new UnknownLeaseException ( "cancel:unknown transaction at space-server transaction-id= " + st + " manager=" + ltx . getManagerID ( ) ) ; } }


public void saveAuxiliaryData  ( ) throws IOException  { if ( getMeganFile ( ) . hasDataConnector ( ) && ! getMeganFile ( ) . isReadOnly ( ) ) { if ( dir != null ) { final MainViewer mainViewer = dir . getMainViewer ( ) ; if ( mainViewer != null ) SyncDataTableAndTaxonomy . syncFormattingFromViewer2Summary ( mainViewer , getDataTable ( ) ) ; for ( String cName : ClassificationManager . getAllSupportedClassifications ( ) ) { if ( dir . getViewerByClassName ( ClassificationViewer . getClassName ( cName ) ) != null && dir . getViewerByClassName ( ClassificationViewer . getClassName ( cName ) ) instanceof ClassificationViewer ) { ClassificationViewer classificationViewer = ( ClassificationViewer ) dir . getViewerByClassName ( ClassificationViewer . getClassName ( cName ) ) ; SyncDataTableAndClassificationViewer . syncFormattingFromViewer2Summary ( classificationViewer , getDataTable ( ) ) ; } } } getDataTable ( ) . setColorTable ( getChartColorManager ( ) . getColorTableName ( ) , getChartColorManager ( ) . isColorByPosition ( ) , getChartColorManager ( ) . getHeatMapTable ( ) . getName ( ) ) ; getDataTable ( ) . setColorEdits ( getChartColorManager ( ) . getColorEdits ( ) ) ; byte [ ] userState = getDataTable ( ) . getUserStateAsBytes ( ) ; byte [ ] sampleAttributes = getSampleAttributeTable ( ) . getBytes ( ) ; Map < String , byte [ ] > label2data = new HashMap < > ( ) ; label2data . put ( SampleAttributeTable . USER_STATE , userState ) ; label2data . put ( SampleAttributeTable . SAMPLE_ATTRIBUTES , sampleAttributes ) ; getMeganFile ( ) . getDataConnector ( ) . putAuxiliaryData ( label2data ) ; } }


@ Override public void encodeXML  ( Document doc , Element root , String elementName ) { if ( ( doc == null ) || ( root == null ) || ( elementName == null ) ) { return ; } Element dataSourceElement = doc . createElement ( elementName ) ; for ( String key : propertyMap . keySet ( ) ) { Element element = doc . createElement ( key ) ; element . appendChild ( doc . createTextNode ( propertyMap . get ( key ) ) ) ; dataSourceElement . appendChild ( element ) ; } root . appendChild ( dataSourceElement ) ; }

Codificar las propiedades de la fuente de datos a XML.


public T onCreateLvl1SectionViewHolder  ( ViewGroup parent ) { return null ; }

Métodos de OnCreate sobrescribir los métodos para crear cada Viewholder


public static SM_SYSTEM_MESSAGE STR_MSG_TOYPET_FEED_STOP_EATING  ( String value1 , String value0 ) { return new SM_SYSTEM_MESSAGE ( 1400617 , value1 , value0 ) ; }


void innerDelete  ( ) { deleteNode ( ) ; }

Método de ayuda para llamar la eliminación adecuada según el tipo del concepto.


public static SM_SYSTEM_MESSAGE STR_EVENT_WIN_ARTIFACT  ( String value0 , String value1 ) { return new SM_SYSTEM_MESSAGE ( 1390203 , value0 , value1 ) ; }


public static boolean isRTL  ( CharSequence s , int start , int end ) { if ( s == null || s . length ( ) == 0 ) { return isRTL ( Locale . getDefault ( ) ) ; } if ( start == end ) { start = Math . max ( 0 , -- start ) ; if ( start == end ) { end = Math . min ( s . length ( ) , ++ end ) ; } } try { Bidi bidi = new Bidi ( s . subSequence ( start , end ) . toString ( ) , Bidi . DIRECTION_DEFAULT_LEFT_TO_RIGHT ) ; return ! bidi . baseIsLeftToRight ( ) ; } catch ( IndexOutOfBoundsException e ) { return false ; } }

Este método determina si la dirección de una subcadena es de derecha a izquierda.Si la cadena está vacía, la determinación se basa en el idioma predeterminado de idioma local.getdefault ().El método puede manejar definiciones de subcadena no válidas (Inicio> Fin, etc.), en cuyo caso el método devuelve falso.


public static void isNotNull  ( Object object ) { isNotNull ( object , "" ) ; }

Afirma que el objeto dado no es <código> NULL </ CODE>.Si este no es el caso, se lanza algún tipo de excepción sin marcar.


public String toString  ( ) { return "TokenToWords" ; }

Convierte este objeto a su representación de cadena.


public static int readSingleByte  ( InputStream in ) throws IOException { byte [ ] buffer = new byte [ 1 ] ; int result = in . read ( buffer , 0 , 1 ) ; return ( result != - 1 ) ? buffer [ 0 ] & 0xff : - 1 ; }

Implementa inputstream.read (int) en términos de inputstream.read (byte [], int, int).InputStream asume que implementa inputstream.read (int) y proporciona implementaciones predeterminadas de las otras, pero a menudo lo opuesto es más eficiente.


private Map < String , List < Element > > parseDocument  ( Document doc ) throws SynthesisException  { Map < String , List < Element > > elementLists = new HashMap < String , List < Element > > ( ) ; List < Element > segments = new ArrayList < Element > ( ) ; List < Element > boundaries = new ArrayList < Element > ( ) ; List < Element > firstVoicedSegments = new ArrayList < Element > ( ) ; List < Element > firstVowels = new ArrayList < Element > ( ) ; List < Element > lastVoicedSegments = new ArrayList < Element > ( ) ; List < Element > voicedSegments = new ArrayList < Element > ( ) ; TreeWalker treeWalker = null ; try { treeWalker = DomUtils . createTreeWalker ( doc , MaryXML . SYLLABLE , MaryXML . BOUNDARY ) ; } catch ( DOMException e ) { throw new SynthesisException ( "Could not parse XML Document" , e ) ; } Node node ; while ( ( node = treeWalker . nextNode ( ) ) != null ) { assert node != null ; Element element = ( Element ) node ; if ( node . getNodeName ( ) . equals ( MaryXML . BOUNDARY ) ) { boundaries . add ( element ) ; continue ; } assert node . getNodeName ( ) . equals ( MaryXML . SYLLABLE ) ; AllophoneSet allophoneSet = null ; try { allophoneSet = MaryRuntimeUtils . determineAllophoneSet ( element ) ; } catch ( MaryConfigurationException e ) { throw new SynthesisException ( "Could not determine AllophoneSet" , e ) ; } assert allophoneSet != null ; Element segment ; Element firstVoicedSegment = null ; Element firstVowel = null ; Element lastVoicedSegment = null ; for ( segment = DomUtils . getFirstElementByTagName ( node , MaryXML . PHONE ) ; segment != null ; segment = DomUtils . getNextOfItsKindIn ( segment , element ) ) { assert segment != null ; segments . add ( segment ) ; String phone = UnitSelector . getPhoneSymbol ( segment ) ; if ( phone . length ( ) == 0 ) { throw new SynthesisException ( "No phone found for segment " + segment ) ; } Allophone allophone = allophoneSet . getAllophone ( phone ) ; if ( allophone == null ) { throw new SynthesisException ( "No Allophone found for phone '" + phone + "'" ) ; } if ( allophone . isVoiced ( ) ) { voicedSegments . add ( segment ) ; if ( firstVoicedSegment == null ) { firstVoicedSegment = segment ; } if ( firstVowel == null && allophone . isVowel ( ) ) { firstVowel = segment ; } lastVoicedSegment = segment ; } } if ( firstVoicedSegment == null || firstVowel == null || lastVoicedSegment == null ) { Log . d ( Mary . LOG , "WARNING: could not identify F0 anchors in malformed syllable: '" + element . getAttribute ( "ph" ) + "'" ) ; } else { firstVoicedSegments . add ( firstVoicedSegment ) ; firstVowels . add ( firstVowel ) ; lastVoicedSegments . add ( lastVoicedSegment ) ; } } elementLists . put ( "segments" , segments ) ; elementLists . put ( "voicedSegments" , voicedSegments ) ; elementLists . put ( "firstVoicedSegments" , firstVoicedSegments ) ; elementLists . put ( "firstVowels" , firstVowels ) ; elementLists . put ( "lastVoicedSegments" , lastVoicedSegments ) ; elementLists . put ( "boundaries" , boundaries ) ; return elementLists ; }

Analizar el documento para rellenar las listas de elementos.


private void generateWrapperComponents  ( Set < TypeElement > components ) { Map < TypeElement , ComponentInfo > componentToCoreInjectorMap = calculateAllMappingFromComponentsToCoreInjectors ( components ) ; for ( TypeElement component : components ) { ComponentInfo coreInjector = componentToCoreInjectorMap . get ( component ) ; ClassName coreInjectorClassName = getCoreInejectorClassName ( coreInjectorPackage , coreInjector ) ; String packageString = Utils . getPackageString ( component ) ; String generatedComponentSimpleName = getComponentImplementationSimpleNameFromInterface ( component ) ; TypeSpec . Builder componentBuilder = TypeSpec . classBuilder ( generatedComponentSimpleName ) . addModifiers ( Modifier . PUBLIC ) . addSuperinterface ( TypeName . get ( component . asType ( ) ) ) . superclass ( coreInjectorClassName ) ; MethodSpec . Builder ctorBuilder = MethodSpec . constructorBuilder ( ) . addModifiers ( Modifier . PRIVATE ) ; List < TypeElement > sortedComponentDependencies = Utils . sortByFullName ( getComponentDependencies ( component ) ) ; TypeElement dependencyComponent = null ; if ( ! sortedComponentDependencies . isEmpty ( ) ) { dependencyComponent = Iterables . getOnlyElement ( sortedComponentDependencies ) ; ctorBuilder . addParameter ( TypeName . get ( dependencyComponent . asType ( ) ) , Utils . getSourceCodeName ( dependencyComponent ) ) ; } Set < TypeElement > allComponentModules = getAllModulesOfComponentRecursively ( component ) ; List < TypeElement > sortedComponentPassedModules = Utils . sortByFullName ( Utils . getNonNullaryCtorOnes ( allComponentModules ) ) ; for ( TypeElement typeElement : sortedComponentPassedModules ) { ctorBuilder . addParameter ( TypeName . get ( typeElement . asType ( ) ) , Utils . getSourceCodeName ( typeElement ) ) ; } Set < TypeElement > coreInjectorPassedModules = new HashSet < > ( ) ; coreInjectorPassedModules . addAll ( scopedPassedModules . get ( coreInjector ) ) ; coreInjectorPassedModules . addAll ( unscopedPassedModules ) ; List < TypeElement > sortedCoreInjectorPassedModules = Utils . sortByFullName ( coreInjectorPassedModules ) ; StringBuilder stringBuilder = new StringBuilder ( "super(" ) ; if ( dependencyComponent != null ) { String generatedDependencyComponentSimpleName = getComponentImplementationSimpleNameFromInterface ( dependencyComponent ) ; stringBuilder . append ( "($T) " ) . append ( Utils . getSourceCodeName ( dependencyComponent ) ) ; if ( ! sortedCoreInjectorPassedModules . isEmpty ( ) ) { stringBuilder . append ( ", " ) ; } } if ( ! sortedCoreInjectorPassedModules . isEmpty ( ) ) { for ( TypeElement typeElement : sortedCoreInjectorPassedModules ) { if ( sortedComponentPassedModules . contains ( typeElement ) ) { stringBuilder . append ( Utils . getSourceCodeName ( typeElement ) ) ; } else { stringBuilder . append ( "null" ) ; } stringBuilder . append ( ", " ) ; } stringBuilder . delete ( stringBuilder . length ( ) - 2 , stringBuilder . length ( ) ) ; } stringBuilder . append ( ");" ) ; if ( dependencyComponent != null ) { ctorBuilder . addCode ( stringBuilder . toString ( ) , ClassName . get ( packageString , getComponentImplementationSimpleNameFromInterface ( dependencyComponent ) ) ) ; } else { ctorBuilder . addCode ( stringBuilder . toString ( ) ) ; } componentBuilder . addMethod ( ctorBuilder . build ( ) ) ; ClassName generatedComponentClassName = ClassName . get ( packageString , generatedComponentSimpleName ) ; generateComponentBuilder ( generatedComponentClassName , dependencyComponent , sortedComponentPassedModules , componentBuilder , coreInjector ) ; ClassName builderClassName = ClassName . get ( packageString , generatedComponentSimpleName , "Builder" ) ; componentBuilder . addMethod ( MethodSpec . methodBuilder ( "builder" ) . addModifiers ( Modifier . PUBLIC , Modifier . STATIC ) . returns ( builderClassName ) . addCode ( "return new $T();" , builderClassName ) . build ( ) ) ; JavaFile javaFile = JavaFile . builder ( packageString , componentBuilder . build ( ) ) . build ( ) ; try { messager . printMessage ( Kind . NOTE , String . format ( "%s: writing java file: %s" , TAG , javaFile . toJavaFileObject ( ) . getName ( ) ) ) ; javaFile . writeTo ( processingEnv . getFiler ( ) ) ; } catch ( IOException e ) { Throwables . propagate ( e ) ; } } }

Genera implementaciones de componentes de Dagger que envuelven alrededor de los inyectores centrales.


public Shape diamond  ( float x , float y , float height ) { m_path . reset ( ) ; m_path . moveTo ( x , ( y + 0.5f * height ) ) ; m_path . lineTo ( ( x + 0.5f * height ) , y ) ; m_path . lineTo ( ( x + height ) , ( y + 0.5f * height ) ) ; m_path . lineTo ( ( x + 0.5f * height ) , ( y + height ) ) ; m_path . closePath ( ) ; return m_path ; }

Devuelve una forma de diamante de las dimensiones dadas.


private void activate  ( boolean force , Object proxy , Method method ) throws Exception { assert Thread . holdsLock ( this ) ; try { activate0 ( force , proxy ) ; } catch ( Exception e ) { if ( logger . isLoggable ( Levels . FAILED ) ) { logThrow ( Levels . FAILED , "activating object for call" , "activate" , method , e ) ; } throw e ; } }


private Vector2 screenToWorld  ( Point p , Dimension size , Vector2 offset , double scale ) { Vector2 v = new Vector2 ( ) ; double x = p . x ; double y = p . y ; double w = size . getWidth ( ) ; double h = size . getHeight ( ) ; double ox = offset . x ; double oy = offset . y ; v . x = ( x - w * 0.5 ) / scale - ox ; v . y = - ( ( y - h * 0.5 ) / scale + oy ) ; return v ; }

Convierte de las coordenadas de la pantalla a las coordenadas mundiales.


@ Override public void actionPerformed  ( ActionEvent ev ) { executeImmediately ( getSyntax ( ) ) ; }


private LinkedList < Diff > diff_compute  ( String text1 , String text2 , boolean checklines , long deadline ) { LinkedList < Diff > diffs = new LinkedList < Diff > ( ) ; if ( text1 . length ( ) == 0 ) { diffs . add ( new Diff ( Operation . INSERT , text2 ) ) ; return diffs ; } if ( text2 . length ( ) == 0 ) { diffs . add ( new Diff ( Operation . DELETE , text1 ) ) ; return diffs ; } String longtext = text1 . length ( ) > text2 . length ( ) ? text1 : text2 ; String shorttext = text1 . length ( ) > text2 . length ( ) ? text2 : text1 ; int i = longtext . indexOf ( shorttext ) ; if ( i != - 1 ) { Operation op = ( text1 . length ( ) > text2 . length ( ) ) ? Operation . DELETE : Operation . INSERT ; diffs . add ( new Diff ( op , longtext . substring ( 0 , i ) ) ) ; diffs . add ( new Diff ( Operation . EQUAL , shorttext ) ) ; diffs . add ( new Diff ( op , longtext . substring ( i + shorttext . length ( ) ) ) ) ; return diffs ; } if ( shorttext . length ( ) == 1 ) { diffs . add ( new Diff ( Operation . DELETE , text1 ) ) ; diffs . add ( new Diff ( Operation . INSERT , text2 ) ) ; return diffs ; } String [ ] hm = diff_halfMatch ( text1 , text2 ) ; if ( hm != null ) { String text1_a = hm [ 0 ] ; String text1_b = hm [ 1 ] ; String text2_a = hm [ 2 ] ; String text2_b = hm [ 3 ] ; String mid_common = hm [ 4 ] ; LinkedList < Diff > diffs_a = diff_main ( text1_a , text2_a , checklines , deadline ) ; LinkedList < Diff > diffs_b = diff_main ( text1_b , text2_b , checklines , deadline ) ; diffs = diffs_a ; diffs . add ( new Diff ( Operation . EQUAL , mid_common ) ) ; diffs . addAll ( diffs_b ) ; return diffs ; } if ( checklines && text1 . length ( ) > 100 && text2 . length ( ) > 100 ) { return diff_lineMode ( text1 , text2 , deadline ) ; } return diff_bisect ( text1 , text2 , deadline ) ; }

Encuentra las diferencias entre dos textos.Asume que los textos no tienen ningún prefijo o sufijo común.


public static StatelessLongHash sipHash24  ( long seedLow , long seedHigh ) { return Hashes . getStatelessLong ( new SipHash24Parameters ( seedLow , seedHigh ) ) ; }

Devuelve una función hash que implementa el algoritmo SIPHASH-2-4 (64 bits) con el valor de la semilla dado.


@ deprecated public char previous  ( ) { if ( this . pos > this . begin ) { this . pos -= 1 ; return this . text . charAt ( this . pos ) ; } return 65535 ; }


public void startRecording  ( String file ) { switch ( this . mode ) { case PLAY : Log . d ( LOG_TAG , "AudioPlayer Error: Can't record in play mode." ) ; sendErrorStatus ( MEDIA_ERR_ABORTED ) ; break ; case NONE : this . audioFile = file ; this . recorder . setAudioSource ( MediaRecorder . AudioSource . MIC ) ; this . recorder . setOutputFormat ( MediaRecorder . OutputFormat . DEFAULT ) ; this . recorder . setAudioEncoder ( MediaRecorder . AudioEncoder . DEFAULT ) ; this . recorder . setOutputFile ( this . tempFile ) ; try { this . recorder . prepare ( ) ; this . recorder . start ( ) ; this . setState ( STATE . MEDIA_RUNNING ) ; return ; } catch ( IllegalStateException e ) { e . printStackTrace ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } sendErrorStatus ( MEDIA_ERR_ABORTED ) ; break ; case RECORD : Log . d ( LOG_TAG , "AudioPlayer Error: Already recording." ) ; sendErrorStatus ( MEDIA_ERR_ABORTED ) ; } }

Comience a grabar el archivo especificado.


private ColorMapEntry createColourMapEntry  ( ColourMapData data ) { ColorMapEntry entry = new ColorMapEntryImpl ( ) ; entry . setColor ( data . getColourExpression ( ) ) ; entry . setOpacity ( data . getOpacity ( ) ) ; entry . setQuantity ( data . getQuantity ( ) ) ; entry . setLabel ( data . getLabel ( ) ) ; return entry ; }


public MediaFormat ( ) { mMap = new HashMap < String , Object > ( ) ; }


public static Map < String , Object > returnError  ( String errorMessage ) { return returnProblem ( ModelService . RESPOND_ERROR , errorMessage , null , null , null ) ; }

Una pequeña rutina utilizada todo para mejorar la eficiencia del código, haga un mapa de resultados con el mensaje y el código de respuesta de error


public boolean isDrawRoundedSlicesEnabled  ( ) { return mDrawRoundedSlices ; }

Devuelve VERDADERO si el gráfico está configurado para dibujar cada extremo de una rebanada de pastel "redondeada".


public void visitPhpMethod  ( Method method ) { this . inspectCallable ( method ) ; }


private void mutateResourceOntology  ( String resourceTypeId , ResourceType . DataType resourceDataType ) { MindmapsGraph graph = Mindmaps . factory ( Mindmaps . DEFAULT_URI , keySpace ) . getGraph ( ) ; ResourceType resource = graph . putResourceType ( resourceTypeId , resourceDataType ) ; RoleType degreeOwner = graph . putRoleType ( GraqlType . HAS_RESOURCE_OWNER . getId ( resourceTypeId ) ) ; RoleType degreeValue = graph . putRoleType ( GraqlType . HAS_RESOURCE_VALUE . getId ( resourceTypeId ) ) ; graph . putRelationType ( GraqlType . HAS_RESOURCE . getId ( resourceTypeId ) ) . hasRole ( degreeOwner ) . hasRole ( degreeValue ) ; for ( String type : subtypes ) { graph . getType ( type ) . playsRole ( degreeOwner ) ; } resource . playsRole ( degreeValue ) ; try { graph . commit ( ) ; } catch ( MindmapsValidationException e ) { throw new RuntimeException ( ErrorMessage . ONTOLOGY_MUTATION . getMessage ( e . getMessage ( ) ) , e ) ; } }

Agregue los elementos de Analytics a la ontología del gráfico especificado en <Code> Keyspace </ Code>.Los elementos de ontología están relacionados con el tipo de recurso <CÓDIGO> SOURCETYPEID </ CODE> Se utiliza para persistir los datos calculados por Analytics.


public boolean isActive  ( ) { Date now = new Date ( ) ; return startsAt != null && endsAt != null && now . after ( startsAt ) && now . before ( endsAt ) ; }

Determina si el AirMapflight es un vuelo actualmente activo.


public void acceptVisit  ( ExpressionVisitor visitor ) { visitor . enter ( this ) ; }

Aceptar una visita de un visitante de árbol.


@ Override public void apply  ( NexusStreamParser np ) throws Exception { np . matchIgnoreCase ( "zoom axis=" ) ; String axis = np . getWordMatchesIgnoringCase ( "horizontal vertical both" ) ; np . matchIgnoreCase ( "what=" ) ; String what ; if ( np . peekMatchAnyTokenIgnoreCase ( "in out reset selection fit" ) ) what = np . getWordMatchesIgnoringCase ( "in out reset selection fit" ) ; else what = "" + ( float ) np . getDouble ( ) ; np . matchIgnoreCase ( ";" ) ; AlignmentViewer viewer = ( AlignmentViewer ) getViewer ( ) ; viewer . getAlignmentViewerPanel ( ) . zoom ( axis , what , null ) ; }


public boolean hasFeatureValue  ( int featureIndex , String featureValue ) { if ( featureIndex < 0 ) { return false ; } if ( featureIndex < numByteFeatures ) { return byteFeatureValues [ featureIndex ] . contains ( featureValue ) ; } if ( featureIndex < numByteFeatures + numShortFeatures ) { return shortFeatureValues [ featureIndex - numByteFeatures ] . contains ( featureValue ) ; } return false ; }

Consulta una característica tal como se identifica con la función indicada debido a si el largometraje dado es un valor conocido de esa característica.En otras palabras, esto volverá a ser válido exactamente si la característica dada es una característica de byte y getFeatureValuEasbyte (Entregadex, CaractericeValue) no arrojará una excepción o si la característica dada es una característica corta y GetFeatureValueasshort (FeerIndex, CaractericeValue) no arrojará una excepción.