@ Override public void onMenuItemClick  ( int position ) { switch ( position ) { case 0 : switchFragment ( getString ( R . string . menu_recommend ) , Constants . Topic . EXCELLENT ) ; break ; case 1 : switchFragment ( getString ( R . string . menu_hot ) , Constants . Topic . VOTE ) ; break ; case 2 : switchFragment ( getString ( R . string . menu_newest ) , Constants . Topic . NEWEST ) ; break ; case 3 : switchFragment ( getString ( R . string . menu_nobody ) , Constants . Topic . NOBODY ) ; break ; case 4 : switchFragment ( getString ( R . string . menu_jobs ) , Constants . Topic . JOBS ) ; break ; case 5 : switchFragment ( getString ( R . string . menu_wiki ) , Constants . Topic . WIKI ) ; break ; case 6 : mToolBar . setTitle ( getString ( R . string . menu_vote ) ) ; mTopicListByMeFragment . TYPE = Constants . User . USER_TOPIC_VOTES ; toUserFragment ( ) ; break ; case 7 : mToolBar . setTitle ( getString ( R . string . menu_topic ) ) ; mTopicListByMeFragment . TYPE = Constants . User . USER_TOPIC_MY ; toUserFragment ( ) ; break ; case 8 : OpenWebViewUtils . myReply ( MainActivity . this , mUserInfoEntity . getData ( ) . getLinks ( ) . getReplies_web_view ( ) ) ; break ; } if ( position != 8 ) { mMenuAdapter . setSelectPosition ( position ) ; mMenuAdapter . notifyDataSetChanged ( ) ; mDrawerLayout . closeDrawers ( ) ; } }

MENÚ DE LACKERLAYOUT Haga clic en Callback


private void readObject  ( ObjectInputStream s ) throws IOException , ClassNotFoundException  { s . defaultReadObject ( ) ; Constraint . verify ( classes ) ; }

Verifica que hay al menos una clase, que ninguna de las clases es <código> NULL </ CODE>, tipos primitivos, tipos de matriz o <código> Clases finales </ cáje> que no tienen <código> directal </Código> Como superinterfaz, y que ninguna clase está asignable a ninguna otra clase.


protected Preference onCreateItem  ( String name , AttributeSet attrs ) throws ClassNotFoundException { return createItem ( name , mDefaultPackages , attrs ) ; }

Esta rutina es responsable de crear la subclase correcta del elemento dado el nombre del elemento XML.Anularlo para manejar objetos de elementos personalizados.Si anula esto en su subclase, asegúrese de llamar a super.oncreateitem (nombre) para nombres que no reconoce.


public UtilsResolveScreenNameQuery resolveScreenName  ( UserActor actor , String screenName ) { return new UtilsResolveScreenNameQuery ( getClient ( ) , actor , screenName ) ; }

Detecta un tipo de objeto (por ejemplo, usuario, comunidad, aplicación) y su identificación por nombre de pantalla.


private String printDFormat  ( String sx ) { int nLeadingZeros = 0 ; int nBlanks = 0 , n = 0 ; int i = 0 , jFirst = 0 ; boolean neg = sx . charAt ( 0 ) == '-' ; if ( sx . equals ( "0" ) && precisionSet && precision == 0 ) sx = "" ; if ( ! neg ) { if ( precisionSet && sx . length ( ) < precision ) nLeadingZeros = precision - sx . length ( ) ; } else { if ( precisionSet && ( sx . length ( ) - 1 ) < precision ) nLeadingZeros = precision - sx . length ( ) + 1 ; } if ( nLeadingZeros < 0 ) nLeadingZeros = 0 ; if ( fieldWidthSet ) { nBlanks = fieldWidth - nLeadingZeros - sx . length ( ) ; if ( ! neg && ( leadingSign || leadingSpace ) ) nBlanks -- ; } if ( nBlanks < 0 ) nBlanks = 0 ; if ( leadingSign ) n ++ ; else if ( leadingSpace ) n ++ ; n += nBlanks ; n += nLeadingZeros ; n += sx . length ( ) ; char [ ] ca = new char [ n ] ; if ( leftJustify ) { if ( neg ) ca [ i ++ ] = '-' ; else if ( leadingSign ) ca [ i ++ ] = '+' ; else if ( leadingSpace ) ca [ i ++ ] = ' ' ; char [ ] csx = sx . toCharArray ( ) ; jFirst = neg ? 1 : 0 ; for ( int j = 0 ; j < nLeadingZeros ; i ++ , j ++ ) ca [ i ] = '0' ; for ( int j = jFirst ; j < csx . length ; j ++ , i ++ ) ca [ i ] = csx [ j ] ; for ( int j = 0 ; j < nBlanks ; i ++ , j ++ ) ca [ i ] = ' ' ; } else { if ( ! leadingZeros ) { for ( i = 0 ; i < nBlanks ; i ++ ) ca [ i ] = ' ' ; if ( neg ) ca [ i ++ ] = '-' ; else if ( leadingSign ) ca [ i ++ ] = '+' ; else if ( leadingSpace ) ca [ i ++ ] = ' ' ; } else { if ( neg ) ca [ i ++ ] = '-' ; else if ( leadingSign ) ca [ i ++ ] = '+' ; else if ( leadingSpace ) ca [ i ++ ] = ' ' ; for ( int j = 0 ; j < nBlanks ; j ++ , i ++ ) ca [ i ] = '0' ; } for ( int j = 0 ; j < nLeadingZeros ; j ++ , i ++ ) ca [ i ] = '0' ; char [ ] csx = sx . toCharArray ( ) ; jFirst = neg ? 1 : 0 ; for ( int j = jFirst ; j < csx . length ; j ++ , i ++ ) ca [ i ] = csx [ j ] ; } return new String ( ca ) ; }

Método de utilidad para formatear utilizando el carácter de conversión D.


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

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


public boolean isUpdateAvailable  ( ) { return availableUpdate != null ; }

Informe si una actualización está disponible para este componente.


public InvalidConfigurationException ( ) { }

Crea una nueva instancia de InvalidConfigurationException sin un mensaje o causa.


protected void assertClose  ( String msg , Fraction [ ] m , Fraction [ ] n , double tolerance ) { if ( m . length != n . length ) { Assert . fail ( "vectors have different lengths" ) ; } for ( int i = 0 ; i < m . length ; i ++ ) { Assert . assertEquals ( msg + " " + i + " elements differ" , m [ i ] . doubleValue ( ) , n [ i ] . doubleValue ( ) , tolerance ) ; } }

Verifica que dos vectores estén cerca (SUP NORM)


public String [ ] upload_file  ( String group_name , String master_filename , String prefix_name , String local_filename , String file_ext_name , NameValuePair [ ] meta_list ) throws IOException , MyException { if ( ( group_name == null || group_name . length ( ) == 0 ) || ( master_filename == null || master_filename . length ( ) == 0 ) || ( prefix_name == null ) ) { throw new MyException ( "invalid arguement" ) ; } File f = new File ( local_filename ) ; FileInputStream fis = new FileInputStream ( f ) ; if ( file_ext_name == null ) { int nPos = local_filename . lastIndexOf ( '.' ) ; if ( nPos > 0 && local_filename . length ( ) - nPos <= ProtoCommon . FDFS_FILE_EXT_NAME_MAX_LEN + 1 ) { file_ext_name = local_filename . substring ( nPos + 1 ) ; } } try { return this . do_upload_file ( ProtoCommon . STORAGE_PROTO_CMD_UPLOAD_SLAVE_FILE , group_name , master_filename , prefix_name , file_ext_name , f . length ( ) , new UploadStream ( fis , f . length ( ) ) , meta_list ) ; } finally { fis . close ( ) ; } }

Sube archivo en el servidor de almacenamiento (por nombre de archivo, modo de archivo esclavo)


public boolean isCritical  ( ) { return true ; }

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


public DocumentWordHistogram ( ) { MinSize = 1 ; MaxSize = 2 ; }

Crea una nueva instancia de insectwordhistordogram


public static int hsba  ( float h , float s , float b , float a ) { return setAlpha ( Color . HSBtoRGB ( h , s , b ) , ( int ) ( a * 255 + 0.5 ) & 0xFF ) ; }

Obtenga el código de color para los valores de tono, saturación y brillo dados, traduciendo desde el espacio de color HSB hasta el espacio de color RGB.


@ Override public void onCreate  ( Bundle icicle ) { super . onCreate ( icicle ) ; setContentView ( R . layout . activity_camera_viewer ) ; mView = ( SurfaceView ) findViewById ( R . id . surfaceview ) ; getWindow ( ) . addFlags ( WindowManager . LayoutParams . FLAG_KEEP_SCREEN_ON ) ; mFaceView = new FaceOverlayView ( this ) ; addContentView ( mFaceView , new ViewGroup . LayoutParams ( ViewGroup . LayoutParams . MATCH_PARENT , ViewGroup . LayoutParams . MATCH_PARENT ) ) ; recyclerView = ( RecyclerView ) findViewById ( R . id . recycler_view ) ; RecyclerView . LayoutManager mLayoutManager = new LinearLayoutManager ( getApplicationContext ( ) ) ; recyclerView . setLayoutManager ( mLayoutManager ) ; recyclerView . setItemAnimator ( new DefaultItemAnimator ( ) ) ; handler = new Handler ( ) ; faces = new FaceResult [ MAX_FACE ] ; faces_previous = new FaceResult [ MAX_FACE ] ; for ( int i = 0 ; i < MAX_FACE ; i ++ ) { faces [ i ] = new FaceResult ( ) ; faces_previous [ i ] = new FaceResult ( ) ; } getSupportActionBar ( ) . setDisplayShowTitleEnabled ( true ) ; getSupportActionBar ( ) . setHomeButtonEnabled ( true ) ; getSupportActionBar ( ) . setDisplayHomeAsUpEnabled ( true ) ; getSupportActionBar ( ) . setTitle ( "Face Detect Gray" ) ; if ( icicle != null ) cameraId = icicle . getInt ( BUNDLE_CAMERA_ID , 0 ) ; }

Inicializa la UI e inicia la creación de un detector de la cara.


public static int readUnsignedShort  ( byte [ ] bytes , int start ) { return ( ( ( bytes [ start ] & 0xff ) << 8 ) + ( ( bytes [ start + 1 ] & 0xff ) ) ) ; }

Analizar un corto sin firmar de una matriz de bytes.


public void merge  ( Histogram other ) { int i ; for ( i = 0 ; i <= limits . length ; ++ i ) results [ i ] += other . results [ i ] ; count += other . count ; }


private boolean isDerivedByExtension  ( String ancestorNS , String ancestorName , int derivationMethod , XSTypeDefinition type ) { boolean extension = false ; XSTypeDefinition oldType = null ; while ( type != null && type != oldType ) { if ( ancestorNS != null && ancestorNS . equals ( SchemaSymbols . URI_SCHEMAFORSCHEMA ) && ancestorName . equals ( SchemaSymbols . ATTVAL_ANYSIMPLETYPE ) && SchemaSymbols . URI_SCHEMAFORSCHEMA . equals ( type . getNamespace ( ) ) && SchemaSymbols . ATTVAL_ANYTYPE . equals ( type . getName ( ) ) ) { break ; } if ( ( ancestorName . equals ( type . getName ( ) ) ) && ( ( ancestorNS == null && type . getNamespace ( ) == null ) || ( ancestorNS != null && ancestorNS . equals ( type . getNamespace ( ) ) ) ) ) { return extension ; } if ( type instanceof XSSimpleTypeDecl ) { if ( ancestorNS . equals ( SchemaSymbols . URI_SCHEMAFORSCHEMA ) && ancestorName . equals ( SchemaSymbols . ATTVAL_ANYTYPE ) ) { ancestorName = SchemaSymbols . ATTVAL_ANYSIMPLETYPE ; } if ( ( derivationMethod & DERIVATION_EXTENSION ) != 0 ) { return extension & ( ( XSSimpleTypeDecl ) type ) . isDOMDerivedFrom ( ancestorNS , ancestorName , ( derivationMethod & DERIVATION_RESTRICTION ) ) ; } else { return extension & ( ( XSSimpleTypeDecl ) type ) . isDOMDerivedFrom ( ancestorNS , ancestorName , derivationMethod ) ; } } else { if ( ( ( XSComplexTypeDecl ) type ) . getDerivationMethod ( ) == XSConstants . DERIVATION_EXTENSION ) { extension = extension | true ; } } oldType = type ; type = type . getBaseType ( ) ; } return false ; }

Verifica si un tipo se deriva de otro por extensión.Consulte: http://www.w3.org/tr/2004/rec-dom-level-3-core-20040407/core.html#typeinfo-isderivedfromde


public boolean drain  ( ) { return true ; }

Espera a todos los audios en cola para jugar


public boolean removeFooterView  ( View v ) { if ( mFooterViewInfos . size ( ) > 0 ) { boolean result = false ; ListAdapter adapter = getAdapter ( ) ; if ( adapter != null && ( ( HeaderViewGridAdapter ) adapter ) . removeFooter ( v ) ) { result = true ; } removeFixedViewInfo ( v , mFooterViewInfos ) ; return result ; } return false ; }

Elimina una vista de pie de página previamente agregada.


public List < AbstractIndex > loadAndGetBlocks  ( List < TableBlockInfo > tableBlocksInfos , AbsoluteTableIdentifier absoluteTableIdentifier ) throws IndexBuilderException { AbstractIndex [ ] loadedBlock = new AbstractIndex [ tableBlocksInfos . size ( ) ] ; addTableLockObject ( absoluteTableIdentifier ) ; Object lockObject = tableLockMap . get ( absoluteTableIdentifier ) ; Map < BlockInfo , AbstractIndex > tableBlockMapTemp = null ; int numberOfCores = 1 ; try { numberOfCores = Integer . parseInt ( CarbonProperties . getInstance ( ) . getProperty ( CarbonCommonConstants . NUM_CORES , CarbonCommonConstants . NUM_CORES_DEFAULT_VAL ) ) ; } catch ( NumberFormatException e ) { numberOfCores = Integer . parseInt ( CarbonCommonConstants . NUM_CORES_DEFAULT_VAL ) ; } ExecutorService executor = Executors . newFixedThreadPool ( numberOfCores ) ; List < BlockInfo > blockInfosNeedToLoad = null ; synchronized ( lockObject ) { tableBlockMapTemp = tableBlocksMap . get ( absoluteTableIdentifier ) ; if ( null == tableBlockMapTemp ) { tableBlockMapTemp = new ConcurrentHashMap < BlockInfo , AbstractIndex > ( ) ; tableBlocksMap . put ( absoluteTableIdentifier , tableBlockMapTemp ) ; } blockInfosNeedToLoad = fillSegmentIdToTableInfoMap ( tableBlocksInfos , absoluteTableIdentifier ) ; } AbstractIndex tableBlock = null ; List < Future < AbstractIndex > > blocksList = new ArrayList < Future < AbstractIndex > > ( ) ; int counter = - 1 ; for ( BlockInfo blockInfo : blockInfosNeedToLoad ) { counter ++ ; tableBlock = tableBlockMapTemp . get ( blockInfo ) ; if ( null == tableBlock ) { Object blockInfoLockObject = blockInfoLock . get ( blockInfo ) ; if ( null == blockInfoLockObject ) { synchronized ( blockInfoLock ) { blockInfoLockObject = blockInfoLock . get ( blockInfo ) ; if ( null == blockInfoLockObject ) { blockInfoLockObject = new Object ( ) ; blockInfoLock . put ( blockInfo , blockInfoLockObject ) ; } } } synchronized ( blockInfoLockObject ) { tableBlock = tableBlockMapTemp . get ( blockInfo ) ; if ( null == tableBlock ) { blocksList . add ( executor . submit ( new BlockLoaderThread ( blockInfo , tableBlockMapTemp ) ) ) ; } } } else { loadedBlock [ counter ] = tableBlock ; } } executor . shutdown ( ) ; try { executor . awaitTermination ( 1 , TimeUnit . HOURS ) ; } catch ( InterruptedException e ) { throw new IndexBuilderException ( e ) ; } fillLoadedBlocks ( loadedBlock , blocksList ) ; return Arrays . asList ( loadedBlock ) ; }

Se utilizará por debajo del método para cargar el bloque que no se cargan y para obtener los bloques cargados si se cargan todos los bloques que se pasan, no se cargará, de lo contrario se cargará.


public static SM_SYSTEM_MESSAGE STR_MSG_ALARM_COLD_GAME_IDDREADGION_02  ( String durationtime0 ) { return new SM_SYSTEM_MESSAGE ( 1400629 , durationtime0 ) ; }

La oposición ha abandonado la misión de infiltración de Chantra Dedgion.Saldrás del Chantra Dedgion cuando la misión termina en% DURATIONE00.


@ Override public Double analyse  ( double [ ] frame ) { if ( frame . length != getFrameLengthSamples ( ) ) throw new IllegalArgumentException ( "Expected frame of length " + getFrameLengthSamples ( ) + ", got " + frame . length ) ; double totalEnergy = 0 ; for ( int i = 0 ; i < frame . length ; i ++ ) { totalEnergy += frame [ i ] * frame [ i ] ; } rememberFrameEnergy ( totalEnergy ) ; return new Double ( totalEnergy ) ; }

Aplique este frameBasedanalyser a los datos dados.


public static boolean isFrictionImpulseEnabled  ( ) { return frictionImpulseEnabled ; }

Devuelve VERDADERO si se deben prestarse los impulsos de fricción.


@ Override public void onConnectionFailed  ( @ NonNull ConnectionResult connectionResult ) { Log . i ( TAG , "onConnectionFailed: " + connectionResult . getErrorMessage ( ) ) ; if ( connectionResult . getResolution ( ) != null ) { } }

Se utiliza para registrar el mensaje de error cuando se falla la conexión.


void register  ( String [ ] patterns ) { for ( String pattern : patterns ) { register ( pattern , TRUE ) ; } }

registrar un conjunto de patrón (todos asociados con "verdadero"


private void recordSimpleResourceEdit  ( ) { synchronized ( myLock ) { mySeenLocalResourceChanges = true ; } }

Llamado cuando hemos notado una edición de un archivo de recursos que está en un módulo de aplicación


private List < ProcessChange > updateControlTagInformation  ( final ConfigurationElement element , final SubEquipment subEquipment ) { List < ProcessChange > changes = new ArrayList < ProcessChange > ( 3 ) ; final Long processId = subEquipmentFacade . getProcessIdForAbstractEquipment ( subEquipment . getId ( ) ) ; ControlTag aliveTagCopy = controlCache . getCopy ( subEquipment . getAliveTagId ( ) ) ; if ( aliveTagCopy != null ) { setSubEquipmentId ( ( ControlTagCacheObject ) aliveTagCopy , subEquipment . getId ( ) , processId ) ; if ( aliveTagCopy . getAddress ( ) != null ) { IChange toAdd = new DataTagAdd ( element . getSequenceId ( ) , subEquipment . getId ( ) , controlTagFacade . generateSourceDataTag ( aliveTagCopy ) ) ; ConfigurationElementReport report = new ConfigurationElementReport ( Action . CREATE , Entity . CONTROLTAG , aliveTagCopy . getId ( ) ) ; ProcessChange change = new ProcessChange ( processId , toAdd ) ; change . setNestedSubReport ( report ) ; changes . add ( change ) ; } else { throw new ConfigurationException ( ConfigurationException . INVALID_PARAMETER_VALUE , String . format ( "Alive tag #%d (%s) for sub-equipment #%d (%s) must by definition have a hardware address defined." , aliveTagCopy . getId ( ) , aliveTagCopy . getName ( ) , subEquipment . getId ( ) , subEquipment . getName ( ) ) ) ; } } else { throw new ConfigurationException ( ConfigurationException . INVALID_PARAMETER_VALUE , String . format ( "No Alive tag (%s) found for sub-equipment #%d (%s)." , subEquipment . getAliveTagId ( ) , subEquipment . getId ( ) , subEquipment . getName ( ) ) ) ; } ControlTag commFaultTagCopy = controlCache . getCopy ( subEquipment . getCommFaultTagId ( ) ) ; if ( commFaultTagCopy != null ) { setSubEquipmentId ( ( ControlTagCacheObject ) commFaultTagCopy , subEquipment . getId ( ) , processId ) ; } else { throw new ConfigurationException ( ConfigurationException . INVALID_PARAMETER_VALUE , String . format ( "No CommFault tag (%s) found for sub-equipment #%d (%s)." , subEquipment . getCommFaultTagId ( ) , subEquipment . getId ( ) , subEquipment . getName ( ) ) ) ; } ControlTag statusTagCopy = controlCache . getCopy ( subEquipment . getStateTagId ( ) ) ; if ( statusTagCopy != null ) { setSubEquipmentId ( ( ControlTagCacheObject ) statusTagCopy , subEquipment . getId ( ) , processId ) ; } else { throw new ConfigurationException ( ConfigurationException . INVALID_PARAMETER_VALUE , String . format ( "No Status tag (%s) found for sub-equipment #%d (%s)." , subEquipment . getStateTagId ( ) , subEquipment . getId ( ) , subEquipment . getName ( ) ) ) ; } return changes ; }

Asegura que las etiquetas Vivas, de estado y comunidad tengan adecuadamente el conjunto de identificación de sub-equipo.


public static double max  ( final double [ ] values , final int begin , final int length ) throws MathIllegalArgumentException { return MAX . evaluate ( values , begin , length ) ; }

Devuelve el máximo de las entradas en la parte especificada de la matriz de entrada, o <Code> Double.Nan </ Code> si el Subarrio designado está vacío.<p> tira <código> MathillegalArgumentException </ code> Si la matriz es nula o los parámetros del índice de matriz no son válidos.<p> <ul> <li> El resultado es <code> nan </ code> IFF Todos los valores son <Code> NAN </ CODE> (es decir, <CÓDIGO> NAN </ CODE> Los valores no tienen impacto en el valor dela estadística). </ li> <li> Si alguno de los valores es igual a <código> dobles.positivin_infinity </ code>, el resultado es <code> doon.positive_infinity. </ código> </ li> </ ul>


Object doWork  ( TaskManager . Task who , Object param ) { ParticipantHandle handle = ( ParticipantHandle ) param ; TransactionParticipant par = null ; if ( logger . isLoggable ( Level . FINEST ) ) { logger . log ( Level . FINEST , "CommitJob:doWork committing handle: {0}" , handle ) ; } int vote = handle . getPrepState ( ) ; switch ( vote ) { case COMMITTED : case NOTCHANGED : case ABORTED : return new Integer ( vote ) ; } if ( par == null ) par = handle . getParticipant ( ) ; try { if ( attempt ( who ) > maxtries ) { return new Integer ( COMMITTED ) ; } } catch ( JobException je ) { return null ; } if ( par == null ) return null ; Object response = null ; try { int preparedParticipants = 0 ; for ( int i = 0 ; i < handles . length ; i ++ ) { if ( handles [ i ] . getPrepState ( ) != NOTCHANGED && ( handle . getClusterName ( ) == handles [ i ] . getClusterName ( ) || handle . getClusterName ( ) != null && handle . getClusterName ( ) . equals ( handles [ i ] . getClusterName ( ) ) ) ) preparedParticipants ++ ; } if ( handle . isSuitableForCommitFailover ( ) ) { commitPartitionWithEnabledFailover ( handle , tr . mgr , tr . id , _xid , preparedParticipants ) ; } else { if ( _xid == null ) par . commit ( tr . mgr , tr . id , preparedParticipants ) ; else ( ( IRemoteSpace ) par ) . commit ( tr . mgr , _xid , preparedParticipants ) ; } response = new Integer ( COMMITTED ) ; } catch ( TransactionException bte ) { response = new Integer ( COMMITTED ) ; } catch ( NoSuchObjectException nsoe ) { response = new Integer ( COMMITTED ) ; } catch ( ConnectException ce ) { if ( numberOfRetriesDueToConnectionExceptionExceeded ( who ) ) response = new Integer ( COMMITTED ) ; } catch ( UnknownHostException uhe ) { response = new Integer ( COMMITTED ) ; } catch ( ConnectIOException cioe ) { if ( numberOfRetriesDueToConnectionExceptionExceeded ( who ) ) response = new Integer ( COMMITTED ) ; } catch ( MarshalException me ) { response = new Integer ( COMMITTED ) ; } catch ( AccessException ae ) { response = new Integer ( COMMITTED ) ; } catch ( ActivateFailedException afe ) { response = new Integer ( COMMITTED ) ; } catch ( RemoteException re ) { response = new Integer ( COMMITTED ) ; } catch ( RuntimeException rte ) { response = new Integer ( COMMITTED ) ; } if ( response != null ) { handle . setPrepState ( COMMITTED ) ; try { log . write ( new ParticipantCommitRecord ( handle ) ) ; } catch ( com . sun . jini . mahalo . log . LogException le ) { } return response ; } return null ; }

El trabajo a realizar por cada <código> TaskManager.Task </ Code> es proporcionado por el trabajo <Código> </ el código> que lo crea.El trabajo realizado por una tarea que pertenece a los contactos de CommitJob Contacta a un participante, le indica que se lleve a cabo y se registre adecuadamente.


public TestBase ( ) { init  ( ) ; simpleGson = new GsonBuilder ( ) . create ( ) ; }


public void reset  ( final Vector3D p1 , final Vector3D p2 ) throws MathIllegalArgumentException { final Vector3D delta = p2 . subtract ( p1 ) ; final double norm2 = delta . getNormSq ( ) ; if ( norm2 == 0.0 ) { throw new MathIllegalArgumentException ( LocalizedCoreFormats . ZERO_NORM ) ; } this . direction = new Vector3D ( 1.0 / FastMath . sqrt ( norm2 ) , delta ) ; zero = new Vector3D ( 1.0 , p1 , - p1 . dotProduct ( delta ) / norm2 , delta ) ; }

Restablecer la instancia como si se construye a partir de dos puntos.


@ Override public byte [ ] readByteArray  ( String filePath , int length ) { FileChannel fileChannel = updateCache ( filePath ) ; ByteBuffer byteBffer = read ( fileChannel , length ) ; return byteBffer . array ( ) ; }

Este método se utilizará para leer la matriz de bytes del archivo en función de la longitud (número de bytes)


private void createTypeProposalLabel  ( CompletionProposal typeProposal , CompletionItem item ) { char [ ] signature ; if ( fContext != null && fContext . isInJavadoc ( ) ) signature = Signature . getTypeErasure ( typeProposal . getSignature ( ) ) ; else signature = typeProposal . getSignature ( ) ; char [ ] fullName = Signature . toCharArray ( signature ) ; createTypeProposalLabel ( fullName , item ) ; setDeclarationSignature ( item , String . valueOf ( signature ) ) ; }

Actualiza una etiqueta de pantalla para una propuesta de tipo dada.La etiqueta de la pantalla consiste en: <ul> <li> El nombre de tipo simple (borrado cuando el contexto está en javadoc) </ li> <li> el nombre del paquete </ li> </ ul> <p> Ejemplos: una propuestaPara el tipo genérico <código> java.util.list & lt & lt; e & gt; </ code>, la etiqueta de visualización es: <código> lista <e> - java.util </ code>.</ p>


private void buildJoinInfo  ( ) { for ( QueryTableData tableData : query . getTablesData ( ) ) { tableData . createJoinIndex ( query . getExpTree ( ) ) ; } List < LinkedList < QueryTableData > > joinedSequences = new LinkedList < LinkedList < QueryTableData > > ( ) ; for ( int i = 0 ; i < query . getTablesData ( ) . size ( ) ; i ++ ) { QueryTableData tableData = query . getTablesData ( ) . get ( i ) ; if ( ! tableData . isJoined ( ) ) { LinkedList < QueryTableData > seq = new LinkedList < QueryTableData > ( ) ; seq . add ( tableData ) ; while ( tableData . getJoinTable ( ) != null ) { tableData = tableData . getJoinTable ( ) ; seq . add ( tableData ) ; } joinedSequences . add ( seq ) ; } } QueryTableData lastJoined = null ; for ( LinkedList < QueryTableData > seq : joinedSequences ) { if ( lastJoined != null ) { lastJoined . setJoinTable ( seq . getFirst ( ) ) ; seq . getFirst ( ) . setJoined ( true ) ; } lastJoined = seq . getLast ( ) ; } }

Crear unirse a las estructuras de datos relacionados y las relaciones entre las tablas


@ Override public void run  ( ) { logger . debug ( "Starting ZWave thread: Receive" ) ; try { sendResponse ( NAK ) ; while ( ! interrupted ( ) ) { int nextByte ; try { nextByte = serialPort . getInputStream ( ) . read ( ) ; if ( nextByte == - 1 ) { if ( rxState != SEARCH_SOF ) { logger . debug ( "Receive Timeout - Sending NAK" ) ; rxState = SEARCH_SOF ; } continue ; } } catch ( IOException e ) { logger . error ( "Got I/O exception {} during receiving. exiting thread." , e . getLocalizedMessage ( ) ) ; break ; } switch ( rxState ) { case SEARCH_SOF : switch ( nextByte ) { case SOF : logger . trace ( "Received SOF" ) ; SOFCount ++ ; updateState ( new ChannelUID ( getThing ( ) . getUID ( ) , CHANNEL_SERIAL_SOF ) , new DecimalType ( SOFCount ) ) ; rxState = SEARCH_LEN ; break ; case ACK : ACKCount ++ ; updateState ( new ChannelUID ( getThing ( ) . getUID ( ) , CHANNEL_SERIAL_ACK ) , new DecimalType ( ACKCount ) ) ; logger . trace ( "Received ACK" ) ; break ; case NAK : NAKCount ++ ; updateState ( new ChannelUID ( getThing ( ) . getUID ( ) , CHANNEL_SERIAL_NAK ) , new DecimalType ( NAKCount ) ) ; logger . debug ( "Protocol error (NAK), discarding" ) ; break ; case CAN : CANCount ++ ; updateState ( new ChannelUID ( getThing ( ) . getUID ( ) , CHANNEL_SERIAL_CAN ) , new DecimalType ( CANCount ) ) ; logger . debug ( "Protocol error (CAN), resending" ) ; break ; default : OOFCount ++ ; updateState ( new ChannelUID ( getThing ( ) . getUID ( ) , CHANNEL_SERIAL_OOF ) , new DecimalType ( OOFCount ) ) ; logger . warn ( String . format ( "Protocol error (OOF). Got 0x%02X." , nextByte ) ) ; break ; } break ; case SEARCH_LEN : if ( nextByte < 4 || nextByte > 64 ) { logger . debug ( "Frame length is out of limits ({})" , nextByte ) ; break ; } messageLength = ( nextByte & 0xff ) + 2 ; rxBuffer = new byte [ messageLength ] ; rxBuffer [ 0 ] = SOF ; rxBuffer [ 1 ] = ( byte ) nextByte ; rxLength = 2 ; rxState = SEARCH_DAT ; break ; case SEARCH_DAT : rxBuffer [ rxLength ] = ( byte ) nextByte ; rxLength ++ ; if ( rxLength < messageLength ) { break ; } logger . debug ( "Receive Message = {}" , SerialMessage . bb2hex ( rxBuffer ) ) ; SerialMessage recvMessage = new SerialMessage ( rxBuffer ) ; if ( recvMessage . isValid ) { logger . trace ( "Message is valid, sending ACK" ) ; sendResponse ( ACK ) ; incomingMessage ( recvMessage ) ; } else { CSECount ++ ; updateState ( new ChannelUID ( getThing ( ) . getUID ( ) , CHANNEL_SERIAL_CSE ) , new DecimalType ( CSECount ) ) ; logger . debug ( "Message is invalid, discarding" ) ; sendResponse ( NAK ) ; } rxState = SEARCH_SOF ; break ; } } } catch ( Exception e ) { logger . error ( "Exception during ZWave thread: Receive {}" , e . getMessage ( ) ) ; } logger . debug ( "Stopped ZWave thread: Receive" ) ; serialPort . removeEventListener ( ) ; }

Método de ejecución.Ejecuta el proceso de recepción real.


protected void handleKeyMatchedBeforeCompare  ( T oldObject , T newObject ) { }

Esto se llama cuando las llaves para los objetos antiguos y nuevos coinciden, pero los atributos pueden o no coincidir con ella se llama antes de que el comparador decida si el resto de los atributos coinciden.La implementación por defecto no hace nada.


public Matrix4f invert  ( Matrix4f store ) { if ( store == null ) { store = new Matrix4f ( ) ; } float fA0 = m00 * m11 - m01 * m10 ; float fA1 = m00 * m12 - m02 * m10 ; float fA2 = m00 * m13 - m03 * m10 ; float fA3 = m01 * m12 - m02 * m11 ; float fA4 = m01 * m13 - m03 * m11 ; float fA5 = m02 * m13 - m03 * m12 ; float fB0 = m20 * m31 - m21 * m30 ; float fB1 = m20 * m32 - m22 * m30 ; float fB2 = m20 * m33 - m23 * m30 ; float fB3 = m21 * m32 - m22 * m31 ; float fB4 = m21 * m33 - m23 * m31 ; float fB5 = m22 * m33 - m23 * m32 ; float fDet = fA0 * fB5 - fA1 * fB4 + fA2 * fB3 + fA3 * fB2 - fA4 * fB1 + fA5 * fB0 ; if ( FastMath . abs ( fDet ) <= 0f ) { throw new ArithmeticException ( "This matrix cannot be inverted" ) ; } store . m00 = + m11 * fB5 - m12 * fB4 + m13 * fB3 ; store . m10 = - m10 * fB5 + m12 * fB2 - m13 * fB1 ; store . m20 = + m10 * fB4 - m11 * fB2 + m13 * fB0 ; store . m30 = - m10 * fB3 + m11 * fB1 - m12 * fB0 ; store . m01 = - m01 * fB5 + m02 * fB4 - m03 * fB3 ; store . m11 = + m00 * fB5 - m02 * fB2 + m03 * fB1 ; store . m21 = - m00 * fB4 + m01 * fB2 - m03 * fB0 ; store . m31 = + m00 * fB3 - m01 * fB1 + m02 * fB0 ; store . m02 = + m31 * fA5 - m32 * fA4 + m33 * fA3 ; store . m12 = - m30 * fA5 + m32 * fA2 - m33 * fA1 ; store . m22 = + m30 * fA4 - m31 * fA2 + m33 * fA0 ; store . m32 = - m30 * fA3 + m31 * fA1 - m32 * fA0 ; store . m03 = - m21 * fA5 + m22 * fA4 - m23 * fA3 ; store . m13 = + m20 * fA5 - m22 * fA2 + m23 * fA1 ; store . m23 = - m20 * fA4 + m21 * fA2 - m23 * fA0 ; store . m33 = + m20 * fA3 - m21 * fA1 + m22 * fA0 ; float fInvDet = 1.0f / fDet ; store . multLocal ( fInvDet ) ; return store ; }

Invierte esta matriz y lo almacena en la tienda dada.


public void flushBase64  ( ) throws java . io . IOException { if ( position > 0 ) { if ( encode ) { out . write ( encode3to4 ( b4 , buffer , position , options ) ) ; position = 0 ; } else { throw new java . io . IOException ( "Base64 input not properly padded." ) ; } } }

Método añadido por Phil.[Gracias, Phil.-Rob] Esto rellena el tampón sin cerrar la corriente.


private void acknowledgeQueueMessage  ( String messageId ) { try { _queueService . acknowledge ( _queueName , ImmutableList . of ( messageId ) ) ; } catch ( Exception e ) { _log . error ( "Failed to acknowledge message: [messageId={}]" , messageId , e ) ; } }

Intenta reconocer un mensaje en la cola.Registre cualquier error, pero siempre regresa sin lanzar una excepción.


public synchronized VisualTable addTable  ( String group , Table table , Predicate filter ) { VisualTable vt = new VisualTable ( table , this , group , filter ) ; addDataGroup ( group , vt , table ) ; return vt ; }

Agrega una tabla de datos a esta visualización, utilizando el nombre del grupo de datos dado.Se creará una abstracción visual de los datos y se registrará con la visualización.Se lanzará una excepción si el nombre del grupo ya está en uso.


public void addField  ( FieldConfigBase fieldConfig ) { this . fieldList . add ( fieldConfig ) ; }


public static String digital  ( int length ) { Random rand = new Random ( System . currentTimeMillis ( ) ) ; StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 ; i < length ; i ++ ) { sb . append ( digitals [ rand . nextInt ( digitals . length - 1 ) ] ) ; } return sb . toString ( ) ; }

Generar una cadena digital con la longitud.


public static < K , V > HashMap < K , V > hashMap  ( int initialCapacity , float loadFactor ) { return new HashMap < K , V > ( initialCapacity , loadFactor ) ; }


public int hashCode  ( ) { int h = mask ; if ( me != null ) { for ( int i = me . length ; -- i >= 0 ; ) { if ( me [ i ] != null ) { h += me [ i ] . hashCode ( ) ; } } } if ( mask != LISTEN && peer != null ) { for ( int i = peer . length ; -- i >= 0 ; ) { h += peer [ i ] . hashCode ( ) ; } } return h ; }

Devuelve un valor de código hash para este objeto.


public Model create  ( String uri ) throws Exception { Model m = model . newInstance ( ) ; m . module = module ; m . pathmapping = pathmapping ; m . path = getPath ( uri ) ; return m ; }


private Plan makeIndexJoinPlan  ( Plan trunk , Schema trunkSch ) { for ( String fld : idxes . keySet ( ) ) { Set < String > outerFlds = pred . joinFields ( fld ) ; if ( outerFlds != null ) for ( String outerFld : outerFlds ) if ( trunkSch . hasField ( outerFld ) ) { IndexInfo ii = idxes . get ( fld ) ; Plan p = new IndexJoinPlan ( trunk , tp , ii , outerFld , tx ) ; p = addSelectPredicate ( p ) ; return addJoinPredicate ( p , trunkSch ) ; } } return null ; }

Identifique y construya un plan de índice de índice basado en el predicado e índices al examinar los campos opuestos a un campo indexado en todos los términos de un predicado.Actualmente, los campos y las constantes en un término no se pueden mover a través del término operador.Por lo tanto, este método puede no identificar todos los ingresos de índice posibles.Es responsabilidad de los usuarios emitir consultas que ayuden a la identificación: por ejemplo, "F1 = F2", no "F1 - F2 = 0".


private Range parseContentRange  ( String contentRange ) { Matcher matcher = CONTENT_RANGE_PATTERN . matcher ( contentRange ) ; checkState ( matcher . matches ( ) , "Unexpected Content-Range header: %s" , contentRange ) ; long start = Long . parseLong ( matcher . group ( 1 ) ) ; long end = Long . parseLong ( matcher . group ( 2 ) ) ; return new Range ( start , end - start + 1 ) ; }

Analiza un encabezado HTTP "Rango de contenido" en una respuesta de contenido parcial HTTP 206.


public void readInputData  ( Reader inputReader ) throws Exception { String inputText = FileUtils . getReaderAsString ( inputReader ) ; setInputData ( inputText ) ; }


@ Override public void close  ( ) { s . close ( ) ; idx . close ( ) ; ts . close ( ) ; }

Cierra el escaneo cerrando su escaneo LHS y su índice RHS.


protected void drawScaleBar  ( GraphView graphView , Graphics2D gc , Rectangle rect ) { final Font oldFont = gc . getFont ( ) ; try { if ( pcoa . isDone ( ) && pcoa . getNumberOfPositiveEigenValues ( ) >= 2 ) { final Rectangle grid = new Rectangle ( rect . x + 40 , rect . y + 20 , rect . width - 60 , rect . height - 40 ) ; gc . setStroke ( new BasicStroke ( 1 ) ) ; if ( ! isIs3dMode ( ) ) { { gc . setFont ( Font . decode ( "Dialog-PLAIN-12" ) ) ; String label = getTitle2D ( ) ; Dimension labelSize = Basic . getStringSize ( gc , label , gc . getFont ( ) ) . getSize ( ) ; gc . setColor ( Color . DARK_GRAY ) ; gc . drawString ( label , grid . x + grid . width / 2 - labelSize . width / 2 , grid . y - 4 ) ; } if ( isShowAxes ( ) ) { gc . setFont ( Font . decode ( "Dialog-PLAIN-11" ) ) ; gc . setColor ( Color . LIGHT_GRAY ) ; final Point zeroDC = graphView . trans . w2d ( 0 , 0 ) ; final DecimalFormat tickNumberFormat = new DecimalFormat ( "#.####" ) ; { final double factor = COORDINATES_SCALE_FACTOR / pcoa . getEigenValues ( ) [ firstPC ] ; double step = 0.0000001d ; int jump = 5 ; while ( step < 100000 && graphView . trans . w2d ( step * factor , 0 ) . getX ( ) - zeroDC . getX ( ) < 50 ) { step *= jump ; if ( jump == 5 ) jump = 2 ; else jump = 5 ; } for ( Boolean top : Arrays . asList ( true , false ) ) { Integer v0 ; if ( top ) v0 = Math . round ( grid . y ) ; else v0 = Math . round ( grid . y + grid . height ) ; gc . drawLine ( grid . x , v0 , grid . x + grid . width , v0 ) ; for ( Integer sign : Arrays . asList ( - 1 , 1 ) ) { for ( int i = ( sign == 1 ? 0 : 1 ) ; i < 1000 ; i ++ ) { Point2D tickWC = new Point2D . Double ( sign * i * step * factor , 0 ) ; Point tickDC = graphView . trans . w2d ( tickWC ) ; final String label = ( i == 0 ? String . format ( "PC%d" , firstPC + 1 ) : tickNumberFormat . format ( sign * i * step ) ) ; final Dimension labelSize = Basic . getStringSize ( gc , label , gc . getFont ( ) ) . getSize ( ) ; if ( tickDC . x - labelSize . width / 2 >= grid . x && tickDC . x + labelSize . width / 2 <= grid . x + grid . width ) { gc . drawLine ( tickDC . x , v0 , tickDC . x , v0 + ( top ? 2 : - 2 ) ) ; if ( ! top ) gc . drawString ( label , tickDC . x - labelSize . width / 2 , v0 + labelSize . height ) ; } if ( sign == - 1 && tickDC . x <= grid . x || sign == 1 && tickDC . x >= grid . x + grid . width ) break ; } } } } { final double factor = COORDINATES_SCALE_FACTOR / pcoa . getEigenValues ( ) [ secondPC ] ; double step = 0.0000001d ; int jump = 5 ; while ( step < 100000 && graphView . trans . w2d ( 0 , step * factor ) . getY ( ) - zeroDC . getY ( ) < 50 ) { step *= jump ; if ( jump == 5 ) jump = 2 ; else jump = 5 ; } int yTickStart = grid . y ; for ( Boolean left : Arrays . asList ( true , false ) ) { Integer h0 ; if ( left ) h0 = Math . round ( grid . x ) ; else h0 = Math . round ( grid . x + grid . width ) ; gc . drawLine ( h0 , grid . y , h0 , grid . y + grid . height ) ; for ( Integer sign : Arrays . asList ( - 1 , 1 ) ) { for ( int i = ( sign == 1 ? 0 : 1 ) ; i < 1000 ; i ++ ) { Point2D tickWC = new Point2D . Double ( 0 , sign * i * step * factor ) ; Point tickDC = graphView . trans . w2d ( tickWC ) ; final String label = ( i == 0 ? String . format ( "PC%d" , secondPC + 1 ) : tickNumberFormat . format ( sign * i * step ) ) ; final Dimension labelSize = Basic . getStringSize ( gc , label , gc . getFont ( ) ) . getSize ( ) ; if ( tickDC . y - labelSize . height / 2 >= yTickStart && tickDC . y + labelSize . height / 2 <= grid . y + grid . height ) { gc . drawLine ( h0 , tickDC . y , h0 + ( left ? 2 : - 2 ) , tickDC . y ) ; if ( left ) gc . drawString ( label , h0 - labelSize . width - 2 , tickDC . y + labelSize . height / 2 ) ; } if ( sign == - 1 && tickDC . y <= yTickStart || sign == 1 && tickDC . y >= grid . y + grid . height ) break ; } } } } } } else { { gc . setFont ( Font . decode ( "Dialog-PLAIN-12" ) ) ; String label = getTitle3D ( ) ; Dimension labelSize = Basic . getStringSize ( gc , label , gc . getFont ( ) ) . getSize ( ) ; gc . setColor ( Color . DARK_GRAY ) ; gc . drawString ( label , grid . x + grid . width / 2 - labelSize . width / 2 , grid . y - 4 ) ; } if ( isShowAxes ( ) ) { gc . setFont ( Font . decode ( "Dialog-PLAIN-11" ) ) ; final Vector3D centerVector = new Vector3D ( 0 , 0 , 0 ) ; centerVector . transform ( transformation3D ) ; gc . setColor ( Color . LIGHT_GRAY ) ; final Point center = graphView . trans . w2d ( centerVector . get ( 0 ) , centerVector . get ( 1 ) ) ; final int axisLength = 50 ; final Point2D worldOrig = graphView . trans . d2w ( 0 , 0 ) ; final Point2D worldX = graphView . trans . d2w ( axisLength , 0 ) ; { Vector3D v = new Vector3D ( worldX . getX ( ) - worldOrig . getX ( ) , 0 , 0 ) ; v . transform ( transformation3D ) ; final Point point = graphView . trans . w2d ( v . get ( 0 ) , v . get ( 1 ) ) ; gc . drawLine ( center . x , center . y , point . x , point . y ) ; drawArrowHead ( gc , center , point ) ; String label = String . format ( "PC%d" , firstPC + 1 ) ; gc . drawString ( label , point . x , point . y ) ; } { Vector3D v = new Vector3D ( 0 , - ( worldX . getX ( ) - worldOrig . getX ( ) ) , 0 ) ; v . transform ( transformation3D ) ; final Point point = graphView . trans . w2d ( v . get ( 0 ) , v . get ( 1 ) ) ; gc . drawLine ( center . x , center . y , point . x , point . y ) ; drawArrowHead ( gc , center , point ) ; String label = String . format ( "PC%d" , secondPC + 1 ) ; gc . drawString ( label , point . x , point . y ) ; } { Vector3D v = new Vector3D ( 0 , 0 , worldX . getX ( ) - worldOrig . getX ( ) ) ; v . transform ( transformation3D ) ; final Point point = graphView . trans . w2d ( v . get ( 0 ) , v . get ( 1 ) ) ; gc . drawLine ( center . x , center . y , point . x , point . y ) ; drawArrowHead ( gc , center , point ) ; String label = String . format ( "PC%d" , thirdPC + 1 ) ; gc . drawString ( label , point . x , point . y ) ; } } } } } catch ( Exception ex ) { } gc . setFont ( oldFont ) ; }


@ ManagedOperation ( description = "Runs all recovery actions - to be used after a unclean server shutdown (kill)" ) public void recover  ( ) { if ( ! stopRequested ) { publishUnpublishedAlarms ( ) ; } if ( ! stopRequested ) { refreshStateTags ( ) ; } if ( ! stopRequested ) { refreshDataTags ( ) ; } if ( ! stopRequested ) { notifyAllTagCacheListeners ( ) ; } if ( ! stopRequested ) { refreshSupervisionStatus ( ) ; } }

Ejecuta todas las acciones de actualización.


@ Override public void close  ( ) { getConceptLog ( ) . clearTransaction ( ) ; try { graph . close ( ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } }

Cierra el gráfico actual, lo que lo hace inutilizable.


public StyleData newStyle  ( Class className , String styleName ) { Array < StyleData > styles = JsonData . getInstance ( ) . getClassStyleMap ( ) . get ( className ) ; StyleData data = null ; for ( StyleData tempStyle : styles ) { if ( tempStyle . name . equals ( styleName ) ) { data = tempStyle ; data . resetProperties ( ) ; } } if ( data == null ) { data = new StyleData ( className , styleName ) ; styles . add ( data ) ; } return data ; }

Crea un nuevo objeto Styledata si uno con el mismo nombre actualmente no existe.Si existe, se devuelve y las propiedades se limpian.Nombre de clase y bandera deltable se conserva.


public void animateAppearance  ( ) { mOverlayPanel . addToAnimation ( this , AnimationType . APPEARANCE , 0.f , 1.f , ContextualSearchPanelAnimation . BASE_ANIMATION_DURATION_MS , 0 ) ; }

Anima la apariencia de promoción de PEEK.


public void draw  ( Canvas c , Rect bounds ) { mCirclePaint . setColor ( mBackgroundColor ) ; mCirclePaint . setAlpha ( mAlpha ) ; c . drawCircle ( bounds . exactCenterX ( ) , bounds . exactCenterY ( ) , bounds . width ( ) / 2 , mCirclePaint ) ; final RectF arcBounds = mTempBounds ; arcBounds . set ( bounds ) ; arcBounds . inset ( mStrokeInset , mStrokeInset ) ; final float startAngle = ( mStartTrim + mRotation ) * 360 ; final float endAngle = ( mEndTrim + mRotation ) * 360 ; float sweepAngle = endAngle - startAngle ; mArcPaint . setColor ( mColors [ mColorIndex ] ) ; mArcPaint . setAlpha ( mAlpha ) ; c . drawArc ( arcBounds , startAngle , sweepAngle , false , mArcPaint ) ; drawTriangle ( c , startAngle , sweepAngle , bounds ) ; }


private DataQueryGroups splitByDimension  ( DataQueryGroups queryGroups , String dimension , int optimalQueries ) { int optimalForSubQuery = MathUtils . divideToFloor ( optimalQueries , queryGroups . getLargestGroupSize ( ) ) ; List < DataQueryParams > subQueries = new ArrayList < > ( ) ; for ( DataQueryParams query : queryGroups . getAllQueries ( ) ) { DimensionalObject dim = query . getDimension ( dimension ) ; List < DimensionalItemObject > values = null ; if ( dim == null || ( values = dim . getItems ( ) ) == null || values . isEmpty ( ) ) { subQueries . add ( DataQueryParams . newBuilder ( query ) . build ( ) ) ; continue ; } List < List < DimensionalItemObject > > valuePages = new PaginatedList < > ( values ) . setNumberOfPages ( optimalForSubQuery ) . getPages ( ) ; for ( List < DimensionalItemObject > valuePage : valuePages ) { DataQueryParams subQuery = DataQueryParams . newBuilder ( query ) . withDimensionOptions ( dim . getDimension ( ) , valuePage ) . build ( ) ; subQueries . add ( subQuery ) ; } } if ( subQueries . size ( ) > queryGroups . getAllQueries ( ) . size ( ) ) { log . debug ( "Split on dimension " + dimension + ": " + ( subQueries . size ( ) / queryGroups . getAllQueries ( ) . size ( ) ) ) ; } return DataQueryGroups . newBuilder ( ) . withQueries ( subQueries ) . build ( ) ; }

Divide la lista dada de consultas en subsectiones en la dimensión dada.


public boolean gotoPrevious  ( ) { if ( isCurrentSet ( ) ) { if ( current . get2 ( ) > 0 ) current . set2 ( current . get2 ( ) - 1 ) ; else if ( current . get1 ( ) > 0 ) { current . set1 ( current . get1 ( ) - 1 ) ; current . set2 ( table . getGrid ( ) . getColumnCount ( ) - 1 ) ; } else { current . set1 ( - 1 ) ; current . set2 ( - 1 ) ; } } else gotoLast ( ) ; return isCurrentSet ( ) ; }


@ Override public void addDependency  ( @ NotNull String configuration , @ NotNull String mavenUrl ) { myReferences . addDependency ( configuration , mavenUrl ) ; SetMultimap < String , String > dependencyList = ( SetMultimap < String , String > ) getParamMap ( ) . get ( TemplateMetadata . ATTR_DEPENDENCIES_MULTIMAP ) ; dependencyList . put ( configuration , mavenUrl ) ; }

Agregue una dependencia de la biblioteca al proyecto.


public ConstantExpression ( Constant c ) { val = c ; }

Crea una nueva expresión envolviendo una constante.


public SAXParser ( SymbolTable symbolTable , XMLGrammarPool grammarPool ) { super ( ( XMLParserConfiguration ) ObjectFactory . createObject ( "mf.org.apache.xerces.xni.parser.XMLParserConfiguration" , "mf.org.apache.xerces.parsers.XIncludeAwareParserConfiguration" ) ) ; fConfiguration . addRecognizedFeatures ( RECOGNIZED_FEATURES ) ; fConfiguration . setFeature ( NOTIFY_BUILTIN_REFS , true ) ; fConfiguration . addRecognizedProperties ( RECOGNIZED_PROPERTIES ) ; if ( symbolTable != null ) { fConfiguration . setProperty ( SYMBOL_TABLE , symbolTable ) ; } if ( grammarPool != null ) { fConfiguration . setProperty ( XMLGRAMMAR_POOL , grammarPool ) ; } }

Construye un analizador SAX utilizando la tabla de símbolos especificados y la piscina de gramática.


public String toString  ( ) { return getDescriptor ( ) ; }

Devuelve una representación de cadena de este tipo.


private AbstractIndex loadBlocks  ( String taskId , List < TableBlockInfo > tableBlockInfoList , AbsoluteTableIdentifier tableIdentifier ) throws CarbonUtilException { List < DataFileFooter > footerList = CarbonUtil . readCarbonIndexFile ( taskId , tableBlockInfoList , tableIdentifier ) ; AbstractIndex segment = new SegmentTaskIndex ( ) ; segment . buildIndex ( footerList ) ; return segment ; }

Se utilizará por debajo del método para cargar los bloques.


public AppendableSequenceAudioInputStream ( AudioFormat audioFormat , Collection < AudioInputStream > audioInputStreams ) { super ( audioFormat , audioInputStreams != null ? audioInputStreams : Arrays . asList ( new AudioInputStream [ 0 ] ) ) ; }

Cree un flujo de entrada de audio de secuencia a la que se pueden agregar más audioinsportstreams después de la creación.Cuando se han leído los flujos de entrada de audio actualmente disponibles, las llamadas para leer () se bloquearán hasta que se adjunten nuevos datos de audio o se denomina donación ().Después de que se llama a DoneOppending (), lea () devolverá -1 cuando se agotará de los datos.


public boolean hasBulletList  ( String text ) { return bulletPat . matcher ( text ) . find ( ) ; }

Advertencia: no asume que no hay espacios en blanco finales.


public void addData  ( final double x , final double y ) { if ( n == 0 ) { xbar = x ; ybar = y ; } else { if ( hasIntercept ) { final double fact1 = 1.0 + n ; final double fact2 = n / ( 1.0 + n ) ; final double dx = x - xbar ; final double dy = y - ybar ; sumXX += dx * dx * fact2 ; sumYY += dy * dy * fact2 ; sumXY += dx * dy * fact2 ; xbar += dx / fact1 ; ybar += dy / fact1 ; } } if ( ! hasIntercept ) { sumXX += x * x ; sumYY += y * y ; sumXY += x * y ; } sumX += x ; sumY += y ; n ++ ; }

Agrega la observación (x, y) al conjunto de datos de regresión.<p> utiliza fórmulas de actualización de medios y sumas de cuadrados definidos en "algoritmos para computar la varianza de muestra: análisis y recomendaciones", Chan, T.F., Golub, G.H., y Leveque, R.J.1983, Estadística Americana, Vol.37, pp. 242-247, referenciado en Weisberg, S. "Regresión lineal aplicada".2ª ed.1985. </ P>


public SpaceTypeDescriptorBuilder addQueryExtensionInfo  ( String path , Class < ? extends Annotation > queryExtensionAnnotation ) { if ( _queryExtensionsInfo == null ) _queryExtensionsInfo = new TypeQueryExtensionsImpl ( ) ; _queryExtensionsInfo . add ( queryExtensionAnnotation , path ) ; return this ; }

Agrega una información de QueryExtension para la ruta especificada


public Observable < FirebaseChildEvent > observeChildChanged  ( final Query firebaseRef ) { return observeChildEvent ( firebaseRef ) . filter ( filterChildEvent ( EventType . CHANGED ) ) ; }

Crea un observable solo para el método cambiado del niño.


public static < T extends  Bean > T load ( String collection , Bson query , Bson order , T b )  { TimeStamp t = TimeStamp . create ( ) ; try { MongoCollection < Document > db = MongoHelper . getCollection ( collection ) ; if ( db != null ) { FindIterable < Document > d = db . find ( query ) ; if ( order == null ) { d . sort ( order ) ; } if ( d != null ) { if ( log . isDebugEnabled ( ) ) log . debug ( "load - cost=" + t . past ( ) + "ms, collection=" + collection + ", query=" + query + ", order=" + order ) ; Document d1 = d . first ( ) ; if ( d1 != null ) { b . load ( d1 ) ; return b ; } } else { if ( log . isDebugEnabled ( ) ) log . debug ( "load - cost=" + t . past ( ) + "ms, collection=" + collection + ", query=" + query + ", order=" + order + ", result=" + null ) ; } } } catch ( Exception e ) { if ( log . isErrorEnabled ( ) ) log . error ( "query=" + query + ", order=" + order , e ) ; } return null ; }


@ Override public boolean equals  ( Object o ) { if ( o instanceof AssociationsInfo ) { AssociationsInfo other = ( AssociationsInfo ) o ; if ( o != null && other != null ) { if ( other . getAssociationType ( ) == associationType && other . getClassHoldsForeignKey ( ) . equals ( classHoldsForeignKey ) ) { if ( other . getSelfClassName ( ) . equals ( selfClassName ) && other . getAssociatedClassName ( ) . equals ( associatedClassName ) ) { return true ; } if ( other . getSelfClassName ( ) . equals ( associatedClassName ) && other . getAssociatedClassName ( ) . equals ( selfClassName ) ) { return true ; } } } } return false ; }

Anular es un método igual para asegurarse de que si dos clases asociadas en el modelo de información de asociación son las mismas ladas que ignoran, son el mismo modelo de información de asociación.


public static String popStartsWith  ( Collection < String > collection , String prefix ) { Iterator < String > iterator = collection . iterator ( ) ; while ( iterator . hasNext ( ) ) { String element = iterator . next ( ) ; if ( element != null && element . startsWith ( prefix ) ) { iterator . remove ( ) ; return element ; } } return null ; }

Busca y devuelve la primera cadena que comienza con el prefijo dado.Elimina el partido de la colección.


@ Override public int hashCode  ( ) { long value = 17 ; value += 37 * value + Double . doubleToLongBits ( Math . abs ( x ) ) ; value += 37 * value + Double . doubleToLongBits ( Math . abs ( y ) ) ; value += 37 * value + Double . doubleToLongBits ( Math . abs ( z ) ) ; return ( int ) ( value ^ ( value >>> 32 ) ) ; }

Calcula Hashcode basado en coordenadas almacenadas.Como queremos +0.0 y -0.0 para ser tratados igual, ignoramos el signo de las coordenadas.


public static void overScrollBy  ( final PullToRefreshBase < ? > view , final int deltaX , final int scrollX , final int deltaY , final int scrollY , final boolean isTouchEvent ) { overScrollBy ( view , deltaX , scrollX , deltaY , scrollY , 0 , isTouchEvent ) ; }

Método de ayudante para descifrar que encapsula toda la función necesaria.<P /> Esto solo debe usarse en AdapterView's, como ListView, ya que solo llama a ScrollRinLby () con el ScrollRange = 0. AdapterView no tiene una gama de desplazamiento (es decir, el pendiente () no funciona).


private void writePrimitiveObject  ( ObjectOutput out , Object obj , String name ) throws IOException { try { if ( obj instanceof Integer ) { out . writeByte ( INTEGER_BIT ) ; out . writeInt ( ( ( Integer ) obj ) . intValue ( ) ) ; } else if ( obj instanceof Double ) { out . writeByte ( DOUBLE_BIT ) ; out . writeDouble ( ( ( Double ) obj ) . doubleValue ( ) ) ; } else if ( obj instanceof Float ) { out . writeByte ( FLOAT_BIT ) ; out . writeFloat ( ( ( Float ) obj ) . floatValue ( ) ) ; } else if ( obj instanceof Long ) { out . writeByte ( LONG_BIT ) ; out . writeLong ( ( ( Long ) obj ) . longValue ( ) ) ; } else if ( obj instanceof String && ( ( String ) obj ) . length ( ) <= 0xFFFFL ) { out . writeByte ( STRING_BIT ) ; out . writeUTF ( ( String ) obj ) ; } else if ( obj instanceof Short ) { out . writeByte ( SHORT_BIT ) ; out . writeShort ( ( ( Short ) obj ) . shortValue ( ) ) ; } else if ( obj instanceof Boolean ) { out . writeByte ( BOOLEAN_BIT ) ; out . writeBoolean ( ( ( Boolean ) obj ) . booleanValue ( ) ) ; } else if ( obj instanceof Character ) { out . writeByte ( CHAR_BIT ) ; out . writeChar ( ( ( Character ) obj ) . charValue ( ) ) ; } else if ( obj instanceof Byte ) { out . writeByte ( BYTE_BIT ) ; out . writeByte ( ( ( Byte ) obj ) . byteValue ( ) ) ; } else { out . writeByte ( OBJECT_BIT ) ; if ( out instanceof ObjectOutputStream ) ( ( ObjectOutputStream ) out ) . writeUnshared ( obj ) ; else out . writeObject ( obj ) ; } } catch ( IOException ex ) { throw new EntrySerializationException ( "Failed to serialize JMS message property: JMSMessageID=" + JMSMessageID + ", Property Name: " + name + ", Property Value: " + obj , ex ) ; } }

Escribe en la corriente de salida El tipo primitivo de acuerdo con el código de bits (que se escribe antes de eso e indica el tipo primitivo), luego utiliza el método de escritura correcto para escribir el tipo primitivo.De esta manera, evitamos el uso de writebject () en caso de tipos primitivos, que es muy caro.


public static int update  ( String sql , Object [ ] args ) { Connection c = null ; PreparedStatement p = null ; try { c = getConnection ( ) ; if ( c == null ) return - 1 ; p = c . prepareStatement ( sql ) ; int order = 1 ; if ( args != null ) { for ( int i = 0 ; i < args . length ; i ++ ) { Object o = args [ i ] ; setParameter ( p , order ++ , o ) ; } } return p . executeUpdate ( ) ; } catch ( Exception e ) { if ( log . isErrorEnabled ( ) ) log . error ( sql + toString ( args ) , e ) ; } finally { close ( p , c ) ; } return 0 ; }

Actualice los datos utilizando la oración SQL.


public String serialize  ( ) { return serialize ( CUR_VERSION ) ; }

Serializa el DLSN en la cadena codificada BASE64.


public static String join  ( Iterable l , String glue ) { StringBuilder sb = new StringBuilder ( ) ; boolean first = true ; for ( Object o : l ) { if ( ! first ) { sb . append ( glue ) ; } sb . append ( o . toString ( ) ) ; first = false ; } return sb . toString ( ) ; }

Se une a cada elem en la colección con el pegamento dado.Por ejemplo, dada una lista de enteros, puede crear una lista separada por comas llamando <tt> unir (números ",") </ tt>.


public void verifyIsDisplayed  ( ) { conditions . verifyPostAjax ( visibilityOf ( currentScope ) ) ; }

El método hace que Ajax Post Llame para asegurarse de que se muestre el componente.


public static void main  ( String [ ] args ) { try { Main . v ( ) . run ( args ) ; } catch ( StackOverflowError e ) { G . v ( ) . out . println ( "Soot has run out of stack memory." ) ; G . v ( ) . out . println ( "To allocate more stack memory to Soot, use the -Xss switch to Java." ) ; G . v ( ) . out . println ( "For example (for 2MB): java -Xss2m soot.Main ..." ) ; throw e ; } catch ( OutOfMemoryError e ) { G . v ( ) . out . println ( "Soot has run out of the memory allocated to it by the Java VM." ) ; G . v ( ) . out . println ( "To allocate more memory to Soot, use the -Xmx switch to Java." ) ; G . v ( ) . out . println ( "For example (for 2GB): java -Xmx2g soot.Main ..." ) ; throw e ; } catch ( RuntimeException e ) { e . printStackTrace ( ) ; ByteArrayOutputStream bos = new ByteArrayOutputStream ( ) ; e . printStackTrace ( new PrintStream ( bos ) ) ; String stackStraceString = bos . toString ( ) ; try { final String TRACKER_URL = "https://github.com/Sable/soot/issues/new?" ; String commandLineArgs = Joiner . on ( " " ) . join ( args ) ; String body = "Steps to reproduce:\n1.) ...\n\n" + "Files used to reproduce: \n...\n\n" + "Soot version: " + versionString + "\n\n" + "Command line:\n" + commandLineArgs + "\n\nMax Memory:\n" + Runtime . getRuntime ( ) . maxMemory ( ) / ( 1024 * 1024 ) + "MB\n\nStack trace:\n" + stackStraceString ; String title = e . getClass ( ) . getName ( ) + " when ..." ; StringBuilder sb = new StringBuilder ( ) ; sb . append ( "\n\nOuuups... something went wrong! Sorry about that.\n" ) ; sb . append ( "Follow these steps to fix the problem:\n" ) ; sb . append ( "1.) Are you sure you used the right command line?\n" ) ; sb . append ( "    Click here to double-check:\n" ) ; sb . append ( "    https://ssebuild.cased.de/nightly/soot/doc/soot_options.htm\n" ) ; sb . append ( "\n" ) ; sb . append ( "2.) Not sure whether it's a bug? Feel free to discuss\n" ) ; sb . append ( "    the issue on the Soot mailing list:\n" ) ; sb . append ( "    https://github.com/Sable/soot/wiki/Getting-help\n" ) ; sb . append ( "\n" ) ; sb . append ( "3.) Sure it's a bug? Click this link to report it.\n" ) ; sb . append ( "    " + TRACKER_URL + "title=" + URLEncoder . encode ( title , "UTF-8" ) + "&body=" + URLEncoder . encode ( body , "UTF-8" ) + "\n" ) ; sb . append ( "    Please be as precise as possible when giving us\n" ) ; sb . append ( "    information on how to reproduce the problem. Thanks!" ) ; System . err . println ( sb . toString ( ) ) ; } catch ( UnsupportedEncodingException e1 ) { } } }

Punto de entrada para la linea CMD Invocación de HOOT.


@ Override public boolean isCellEditable  ( int rowIndex , int columnIndex ) { return true ; }


@ NotNull public static String genderAndAge  ( @ NotNull Face face ) { return String . format ( "%s, %.1f" , face . faceAttributesResp . gender , face . faceAttributesResp . age ) ; }


public static < T > Flowable < T > doWhile  ( Publisher < ? extends T > source , BooleanSupplier postCondition ) { ObjectHelper . requireNonNull ( source , "source is null" ) ; ObjectHelper . requireNonNull ( postCondition , "postCondition is null" ) ; return RxJavaPlugins . onAssembly ( new FlowableWhileDoWhile < T > ( source , AlwaysTrueBooleanSupplier . INSTANCE , postCondition ) ) ; }

Devuelva un fluido que vuelva a emitir las emisiones de la fuente que fluye, y luego se vuelve a consultar a la fuente de largo, ya que una condición es verdadera.<p> <img anchth = "640" src = "https://raw.github.com/wiki/reactivex/rxjava/images/rx- operadores/dowhile.png" alt = "">


public boolean showJavaScriptSites  ( ) { return mContentSettingsType == ContentSettingsType . CONTENT_SETTINGS_TYPE_JAVASCRIPT ; }

Devuelve si esta categoría es la categoría JavaScript.


public boolean isMatch  ( ) { return ! ( refName == null || refName . equals ( "*" ) ) ; }


private void sendBroadcastUploadsAdded  ( ) { Intent start = new Intent ( getUploadsAddedMessage ( ) ) ; sendStickyBroadcast ( start ) ; }

Envía una transmisión para que las actividades interesadas puedan actualizar su visión, no más transmisiones, reemplace con una devolución de llamada a los oyentes suscritos


@ Inject public DraggableWebElement ( @ Assisted WebElement dragElement , @ Assisted FramePath framePath , FrameSwitcher switcher ) { this . webElement = dragElement ; this . framePath = framePath ; this . switcher = switcher ; }

Construye DraggableWebelement.Inicializa sus campos.


public boolean isValidTld  ( String tld ) { tld = unicodeToASCII ( tld ) ; if ( allowLocal && isValidLocalTld ( tld ) ) { return true ; } return isValidInfrastructureTld ( tld ) || isValidGenericTld ( tld ) || isValidCountryCodeTld ( tld ) ; }

Devuelve VERDADERO si la cadena <código> especificada </ el código> coincide con cualquier dominio de nivel superior definido por IANA.Los puntos principales se ignoran si están presentes.La búsqueda es insensible a la caja.


public void drawButton  ( Minecraft mc , int mouseX , int mouseY ) { if ( this . visible ) { GL11 . glPushMatrix ( ) ; GL11 . glEnable ( GL11 . GL_BLEND ) ; float trans = 0.4F ; boolean flag = mouseX >= this . xPosition && mouseY >= this . yPosition && mouseX < this . xPosition + this . width && mouseY < this . yPosition + this . height ; if ( flag ) trans = 0.6F ; GlStateManager . color ( 1.0F , 1.0F , 1.0F , trans ) ; mc . getTextureManager ( ) . bindTexture ( SURGERY_GUI_TEXTURES ) ; this . drawTexturedModalRect ( this . xPosition , this . yPosition , type . left + type . width , type . top , type . width , type . height ) ; GlStateManager . color ( 1.0F , 1.0F , 1.0F , trans / 2F ) ; this . drawTexturedModalRect ( this . xPosition , this . yPosition , type . left , type . top , type . width , type . height ) ; GL11 . glPopMatrix ( ) ; } }


public TextReaderDoubleDataSource ( Reader reader ) { this . reader = new BufferedReader ( reader ) ; }

Inicialice esta fuente de datos de doble datos con el lector desde el cual se puede leer una representación de texto de dobles (una por línea).


public synchronized byte [ ] toByteArray  ( ) { int remaining = count ; if ( remaining == 0 ) { return EMPTY_BYTE_ARRAY ; } byte newbuf [ ] = new byte [ remaining ] ; int pos = 0 ; for ( byte [ ] buf : buffers ) { int c = Math . min ( buf . length , remaining ) ; System . arraycopy ( buf , 0 , newbuf , pos , c ) ; pos += c ; remaining -= c ; if ( remaining == 0 ) { break ; } } return newbuf ; }

Obtiene los contenidos curantes de este flujo de bytes como una matriz de bytes.El resultado es independiente de esta corriente.


public FieldConfigFilename ( FieldConfigCommonData commonData ) { super ( commonData , SYMBOLTYPE_FIELD_STATE_RESOURCE ) ; }

Instantánea una nueva cadena de configuración de campo.


final void removeHalfEdges  ( int index , DoubleEdgeListHalfEdge edge ) { DoubleEdgeListFace face = edge . twin . face ; DoubleEdgeListHalfEdge ePrev = edge . getPrevious ( ) ; DoubleEdgeListHalfEdge tPrev = edge . twin . getPrevious ( ) ; DoubleEdgeListHalfEdge eNext = edge . next ; DoubleEdgeListHalfEdge tNext = edge . twin . next ; ePrev . next = tNext ; tPrev . next = eNext ; face . edge = eNext ; DoubleEdgeListHalfEdge te = eNext ; while ( te != tNext ) { te . face = face ; te = te . next ; } this . faces . remove ( edge . face ) ; this . edges . remove ( index ) ; this . edges . remove ( index ) ; }

Elimina el medio borde dado y su gemelo.


public static long availableMemory  ( ) { Runtime rt = Runtime . getRuntime ( ) ; return rt . maxMemory ( ) - rt . totalMemory ( ) + rt . freeMemory ( ) ; }

Determinar la cantidad de memoria disponible.La memoria "disponible" se calcula como <código> (MAX - TOTAL) + FREE </ CODE>.


public GooglePlayDriver ( Context context ) { mContext = context ; mToken = PendingIntent . getBroadcast ( context , 0 , new Intent ( ) , 0 ) ; mWriter = new GooglePlayJobWriter ( ) ; mValidator = new DefaultJobValidator ( context ) ; }


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

Cheques para ver si el nombre de archivo termina con el sufijo.


public synchronized void start  ( ) throws IllegalStateException , IOException  { if ( ! mStreaming ) { configure ( ) ; super . start ( ) ; } }


public final void write  ( final byte b ) { baos . write ( b ) ; }


protected boolean isInBoundsX  ( Entry e , IBarLineScatterCandleBubbleDataSet set ) { if ( e == null ) return false ; float entryIndex = set . getEntryIndex ( e ) ; return entryIndex < set . getEntryCount ( ) * mAnimator . getPhaseX ( ) ; }

Compruebe si el objeto de entrada provisto está en los límites para establecer la fase de animación actual.


LmdbNativeException ( final int rc , final String msg )  { super ( format ( msg + " (%d)" , rc ) ) ; this . rc = rc ; }

Construye una instancia con el mensaje detallado proporcionado.


public double sumWithWeights  ( ) { double dSum = 0 ; for ( TKeyType dKey : hDistro . keySet ( ) ) { if ( dKey instanceof Double ) dSum += ( ( Double ) dKey * getValue ( dKey ) ) ; else dSum += getValue ( dKey ) ; } return dSum ; }

Sumas sobre todos los valores, teniendo en cuenta las claves como pesas.Si las teclas no son claves dobles, solo se considera que los pesos son iguales a 1.


public static boolean isPrimitive  ( String typeName ) { return _primitiveTypes . containsKey ( typeName ) ; }

Devuelve si el nombre de tipo especificado es de tipo primitivo


public static double db2linear  ( double dbEnergy ) { if ( Double . isNaN ( dbEnergy ) ) return 0. ; else return exp10 ( dbEnergy / 10 ) ; }

Convertir energía de la escala de DB a escala lineal.


public static boolean isHour  ( String s ) { if ( isEmpty ( s ) ) return defaultEmptyOK ; return isIntegerInRange ( s , 0 , 23 ) ; }

Ishour devuelve VERDADERO si la cadena S es un número válido entre 0 y 23.


public int locking_scheme  ( ) { String s = soot . PhaseOptions . getString ( options , "locking-scheme" ) ; if ( s . equalsIgnoreCase ( "medium-grained" ) ) return locking_scheme_medium_grained ; if ( s . equalsIgnoreCase ( "coarse-grained" ) ) return locking_scheme_coarse_grained ; if ( s . equalsIgnoreCase ( "single-static" ) ) return locking_scheme_single_static ; if ( s . equalsIgnoreCase ( "leave-original" ) ) return locking_scheme_leave_original ; throw new RuntimeException ( "Invalid value " + s + " of phase option locking-scheme" ) ; }

Esquema de bloqueo: selecciona la granularidad de la asignación de bloqueo generado.Selecciona la granularidad de la asignación de bloqueo generado.


public void drawChart  ( Graphics2D gc ) { SelectionGraphics < String [ ] > sgc = ( gc instanceof SelectionGraphics ? ( SelectionGraphics < String [ ] > ) gc : null ) ; gc . setFont ( getFont ( ChartViewer . FontKeys . XAxisFont . toString ( ) ) ) ; int y0 = getHeight ( ) - bottomMargin ; int y1 = topMargin ; double topY ; switch ( scalingType ) { case PERCENT : topY = 101 ; break ; default : topY = 1.1 * getMaxValue ( ) ; } double yFactor = ( y0 - y1 ) / topY ; int x0 = leftMargin ; int x1 = getWidth ( ) - rightMargin ; if ( x0 >= x1 ) return ; int numberOfDataSets = getChartData ( ) . getNumberOfSeries ( ) ; double xStep = ( x1 - x0 ) / ( 2 * numberOfDataSets ) ; double bigSpace = Math . max ( 2 , Math . min ( 10 , xStep ) ) ; xStep = ( x1 - x0 - ( isGapBetweenBars ( ) ? bigSpace * numberOfDataSets : 0 ) ) / numberOfDataSets ; int d = 0 ; for ( String series : getChartData ( ) . getSeriesNames ( ) ) { { String label = seriesLabelGetter . getLabel ( series ) ; Dimension labelSize = Basic . getStringSize ( gc , label , gc . getFont ( ) ) . getSize ( ) ; double xLabel = x0 + ( isGapBetweenBars ( ) ? ( d + 1 ) * bigSpace : 0 ) + ( d + 0.5 ) * xStep ; Point2D apt = new Point2D . Double ( xLabel , getHeight ( ) - bottomMargin + 12 ) ; if ( classLabelAngle == 0 ) { apt . setLocation ( apt . getX ( ) - labelSize . getWidth ( ) / 2 , apt . getY ( ) ) ; } else if ( classLabelAngle > Math . PI / 2 ) { apt = Geometry . translateByAngle ( apt , classLabelAngle , - labelSize . width ) ; } if ( getChartData ( ) . getChartSelection ( ) . isSelected ( series , null ) ) { gc . setColor ( ProgramProperties . SELECTION_COLOR ) ; fillAndDrawRect ( gc , apt . getX ( ) , apt . getY ( ) , labelSize . width , labelSize . height , classLabelAngle , ProgramProperties . SELECTION_COLOR , ProgramProperties . SELECTION_COLOR_DARKER ) ; } gc . setColor ( getFontColor ( ChartViewer . FontKeys . XAxisFont . toString ( ) , Color . BLACK ) ) ; if ( sgc != null ) sgc . setCurrentItem ( new String [ ] { series , null } ) ; drawString ( gc , label , apt . getX ( ) , apt . getY ( ) , classLabelAngle ) ; if ( sgc != null ) sgc . clearCurrentItem ( ) ; } double currentHeight = y0 ; for ( String className : getChartData ( ) . getClassNames ( ) ) { double value ; if ( scalingType == ChartViewer . ScalingType . PERCENT ) { double total = getChartData ( ) . getTotalForSeriesIncludingDisabledAttributes ( series ) ; if ( total == 0 ) value = 0 ; else value = 100 * getChartData ( ) . getValueAsDouble ( series , className ) / total ; } else value = getChartData ( ) . getValueAsDouble ( series , className ) ; double xBar = x0 + ( isGapBetweenBars ( ) ? ( d + 1 ) * bigSpace : 0 ) + d * xStep ; double height = value * yFactor ; Rectangle2D rect = new Rectangle ( ( int ) Math . round ( xBar ) , ( int ) Math . round ( currentHeight - height ) , ( int ) Math . round ( xStep ) , ( int ) Math . round ( height ) ) ; currentHeight -= height ; Color color = getChartColors ( ) . getClassColor ( class2HigherClassMapper . get ( className ) ) ; gc . setColor ( color ) ; if ( sgc != null ) sgc . setCurrentItem ( new String [ ] { series , className } ) ; gc . fill ( rect ) ; if ( sgc != null ) sgc . clearCurrentItem ( ) ; if ( getChartData ( ) . getChartSelection ( ) . isSelected ( series , className ) ) { gc . setStroke ( HEAVY_STROKE ) ; gc . setColor ( ProgramProperties . SELECTION_COLOR ) ; gc . draw ( rect ) ; gc . setStroke ( NORMAL_STROKE ) ; } else { gc . setColor ( color . darker ( ) ) ; gc . draw ( rect ) ; } } d ++ ; } }

Dibuja barras con colores que representan clases.


public static void logPromoSeen  ( boolean wasPanelSeen , boolean wasTap ) { RecordHistogram . recordEnumeratedHistogram ( "Search.ContextualSearchFirstRunPanelSeen" , wasPanelSeen ? RESULTS_SEEN : RESULTS_NOT_SEEN , RESULTS_SEEN_BOUNDARY ) ; logHistogramByGesture ( wasPanelSeen , wasTap , "Search.ContextualSearchPromoSeenByGesture" ) ; }

Registra si se vio la promoción.Registra varios histogramas, con y sin el gesto de activación original.


public void apply  ( ) { ClassificationManager . get ( Classification . Taxonomy , true ) . getIdMapper ( ) . setUseTextParsing ( isParseTaxonNames ( ) ) ; final String blastFileName = getBlastFileName ( ) ; ProgramProperties . put ( MeganProperties . BLASTFILE , new File ( Basic . getLinesFromString ( blastFileName ) . get ( 0 ) ) ) ; final String readFileName = getReadFileName ( ) ; String meganFileName = getMeganFileName ( ) ; if ( ! meganFileName . startsWith ( "MS:::" ) && ! ( meganFileName . toLowerCase ( ) . endsWith ( ".rma" ) || meganFileName . toLowerCase ( ) . endsWith ( ".rma1" ) || meganFileName . toLowerCase ( ) . endsWith ( ".rma2" ) || meganFileName . toLowerCase ( ) . endsWith ( ".rma3" ) || meganFileName . toLowerCase ( ) . endsWith ( ".rma6" ) ) ) meganFileName += ".rma" ; ProgramProperties . put ( MeganProperties . MEGANFILE , new File ( meganFileName ) ) ; String blastFormat = getFormatCBox ( ) . getSelectedFormat ( ) ; String blastMode = getAlignmentModeCBox ( ) . getSelectedMode ( ) ; StringBuilder buf = new StringBuilder ( ) ; buf . append ( "import blastFile=" ) ; if ( blastFileName . length ( ) > 0 ) { { java . util . List < String > fileNames = Basic . getLinesFromString ( blastFileName ) ; boolean first = true ; for ( String name : fileNames ) { File file = new File ( name ) ; if ( ! ( file . exists ( ) && file . canRead ( ) ) ) { NotificationsInSwing . showError ( this , "Failed to open BLAST file for reading: " + name ) ; return ; } if ( first ) first = false ; else buf . append ( ", " ) ; buf . append ( "'" ) . append ( name ) . append ( "'" ) ; } } if ( blastFileName . length ( ) > 0 ) { final String fileName = Basic . getFirstLine ( blastFileName ) ; if ( blastFormat . equals ( BlastFileFormat . Unknown . toString ( ) ) ) { try { String formatName = BlastFileFormat . detectFormat ( this , fileName , true ) . toString ( ) ; if ( formatName != null ) blastFormat = BlastFileFormat . valueOf ( formatName ) . toString ( ) ; else throw new IOException ( "Failed to detect BLAST format for file: " + fileName ) ; } catch ( IOException e ) { Basic . caught ( e ) ; return ; } } if ( blastMode . equals ( BlastMode . Unknown . toString ( ) ) ) { try { String modeName = BlastMode . detectMode ( this , fileName , true ) . toString ( ) ; if ( modeName != null ) blastMode = BlastMode . valueOf ( modeName ) . toString ( ) ; else throw new IOException ( "Failed to detect BLAST mode for file: " + fileName ) ; } catch ( IOException e ) { Basic . caught ( e ) ; return ; } } } if ( readFileName . length ( ) > 0 ) { buf . append ( " fastaFile=" ) ; java . util . List < String > fileNames = Basic . getLinesFromString ( readFileName ) ; boolean first = true ; for ( String name : fileNames ) { File file = new File ( name ) ; if ( ! ( file . exists ( ) && file . canRead ( ) ) ) { NotificationsInSwing . showError ( this , "Failed to open READs file for reading: " + name ) ; return ; } if ( first ) first = false ; else buf . append ( ", " ) ; buf . append ( "'" ) . append ( name ) . append ( "'" ) ; } } } buf . append ( " meganFile='" ) . append ( meganFileName ) . append ( "'" ) ; buf . append ( " useCompression=" ) . append ( getUseCompressionCBox ( ) . isSelected ( ) ) ; ProgramProperties . put ( "UseCompressInRMAFiles" , getUseCompressionCBox ( ) . isSelected ( ) ) ; buf . append ( " format=" ) . append ( blastFormat ) ; buf . append ( " mode=" ) . append ( blastMode ) ; int maxNumberOfMatchesPerRead ; try { maxNumberOfMatchesPerRead = Integer . parseInt ( getMaxNumberOfMatchesPerReadField ( ) . getText ( ) ) ; ProgramProperties . put ( "MaxNumberMatchesPerRead" , maxNumberOfMatchesPerRead ) ; } catch ( NumberFormatException ex ) { maxNumberOfMatchesPerRead = ProgramProperties . get ( "MaxNumberMatchesPerRead" , 50 ) ; } buf . append ( " maxMatches=" ) . append ( maxNumberOfMatchesPerRead ) ; buf . append ( " minScore=" ) . append ( getMinScore ( ) ) ; buf . append ( " maxExpected=" ) . append ( getMaxExpected ( ) ) ; buf . append ( " minPercentIdentity=" ) . append ( getMinPercentIdentity ( ) ) ; buf . append ( " topPercent=" ) . append ( getTopPercent ( ) ) ; if ( getMinSupportPercent ( ) > 0 ) buf . append ( " minSupportPercent=" ) . append ( getMinSupportPercent ( ) ) ; buf . append ( " minSupport=" ) . append ( getMinSupport ( ) ) ; buf . append ( " weightedLCA=" ) . append ( isWeightedLCA ( ) ) ; buf . append ( " weightedLCAPercent=" ) . append ( getWeightedLCAPercent ( ) ) ; buf . append ( " minComplexity=" ) . append ( getMinComplexity ( ) ) ; buf . append ( " useIdentityFilter=" ) . append ( isUsePercentIdentityFilter ( ) ) ; buf . append ( " fNames=" ) . append ( Basic . toString ( getSelectedFNames ( ) , " " ) ) ; buf . append ( " paired=" ) . append ( isUsePairedReads ( ) ) ; if ( isUsePairedReads ( ) ) { String pattern1 = getPairedReadSuffix1 ( ) ; buf . append ( " pairSuffixLength=" ) . append ( pattern1 . length ( ) ) ; } if ( isUseReadMagnitudes ( ) ) { buf . append ( " hasMagnitudes=" ) . append ( isUseReadMagnitudes ( ) ) ; } if ( getShortDescription ( ) . length ( ) > 0 ) buf . append ( " description='" ) . append ( getShortDescription ( ) ) . append ( "'" ) ; buf . append ( ";" ) ; File file = new File ( meganFileName ) ; if ( file . exists ( ) ) { System . err . println ( "Removing file " + file . getPath ( ) + ": " + file . delete ( ) ) ; File rmazFile = new File ( Basic . getFileSuffix ( file . getPath ( ) ) + ".rmaz" ) ; if ( rmazFile . exists ( ) ) System . err . println ( "Removing file " + rmazFile . getPath ( ) + ": " + rmazFile . delete ( ) ) ; rmazFile = new File ( file . getPath ( ) + "z" ) ; if ( rmazFile . exists ( ) ) System . err . println ( "Removing file " + rmazFile . getPath ( ) + ": " + rmazFile . delete ( ) ) ; } setResult ( buf . toString ( ) ) ; }


protected BigDecimal convertTemperature  ( int fromScale , int toScale , BigDecimal val ) { BigDecimal valConverted ; if ( fromScale == 0 && toScale == 1 ) { valConverted = val . multiply ( ONE_POINT_EIGHT ) . add ( THIRTY_TWO ) . setScale ( 1 , RoundingMode . HALF_DOWN ) ; } else if ( fromScale == 1 && toScale == 0 ) { valConverted = val . subtract ( THIRTY_TWO ) . divide ( ONE_POINT_EIGHT , MathContext . DECIMAL32 ) . setScale ( 1 , RoundingMode . HALF_DOWN ) ; } else { valConverted = val ; } logger . debug ( "Converted temperature from {}{} to {}{}" , val , fromScale == 0 ? "C" : "F" , valConverted , toScale == 0 ? "C" : "F" ) ; return valConverted ; }


public void createOffscreenSurface  ( int width , int height ) { if ( eGLSurface != EGL14 . EGL_NO_SURFACE ) { throw new IllegalStateException ( "surface already created" ) ; } eGLSurface = eglCore . createOffscreenSurface ( width , height ) ; this . width = width ; this . height = height ; }


public static String parseVolumeHostDirectory  ( String volume ) { if ( StringUtils . isEmpty ( volume ) ) { return volume ; } if ( ! volume . contains ( HOST_CONTAINER_DIR_DELIMITER ) ) { return volume ; } String [ ] hostContainerDir = volume . split ( HOST_CONTAINER_DIR_DELIMITER ) ; if ( hostContainerDir . length != 2 ) { throw new IllegalArgumentException ( "Invalid volume directory." ) ; } String hostDir = hostContainerDir [ 0 ] ; return hostDir ; }

Parses Volume Host Directorio SOLAMENTE.


private Map < MetricColumn , Object > extractMetricValues  ( JsonNode metricsRows , Set < MetricColumnWithValueType > metricColumns ) { Map < MetricColumn , Object > metricColumnObjectMap = new HashMap < > ( ) ; for ( MetricColumnWithValueType metricColumn : metricColumns ) { try { metricColumnObjectMap . put ( metricColumn , nonResponseContextMapper . readValue ( metricsRows . get ( metricColumn . getName ( ) ) . toString ( ) , metricColumn . getClassType ( ) ) ) ; } catch ( JsonParseException | NullPointerException e ) { String msg = ErrorMessageFormat . METRIC_VALUE_PARSING_ERROR . format ( "parse" ) ; LOG . error ( msg , e ) ; throw new DeserializationException ( msg , e ) ; } catch ( JsonMappingException e ) { String msg = ErrorMessageFormat . METRIC_VALUE_PARSING_ERROR . format ( "map" ) ; LOG . error ( msg , e ) ; throw new DeserializationException ( msg , e ) ; } catch ( IOException e ) { String msg = ErrorMessageFormat . METRIC_VALUE_PARSING_ERROR . format ( "identify" ) ; LOG . error ( msg , e ) ; throw new DeserializationException ( msg , e ) ; } } return metricColumnObjectMap ; }

Extrae los valores métricos para todas las columnas métricas de JSONNODE, que contiene todos los nombres de las métricas y los valores respectivos.


public static void logNormalPrioritySearchRequestOutcome  ( boolean isFailure ) { RecordHistogram . recordEnumeratedHistogram ( "Search.ContextualSearchNormalPrioritySearchRequestStatus" , isFailure ? REQUEST_FAILED : REQUEST_NOT_FAILED , REQUEST_BOUNDARY ) ; }

Registra si falla una solicitud de búsqueda de prioridad normal.


public static synchronized boolean isFixtureLabeled  ( ) { return fixtureLabeled ; }

Devuelve VERDADERO si se deben mostrar etiquetas corporales.


public SearchResult doPagingSearch  ( IndexReader reader , IndexSearcher searcher , Query query , int page ) throws IOException { TopDocs results = searcher . search ( query , 20 * this . PAGELIMIT ) ; ScoreDoc [ ] hits = results . scoreDocs ; int numTotalHits = results . totalHits ; int start = this . PAGELIMIT * page ; int end = Math . min ( numTotalHits , ( this . PAGELIMIT * ( page + 1 ) ) ) ; int noPages = numTotalHits / this . PAGELIMIT ; if ( noPages > 20 ) { noPages = 20 ; } List < Integer > pages = new ArrayList < > ( ) ; for ( int i = 0 ; i < noPages ; i ++ ) { pages . add ( i ) ; } List < CodeResult > codeResults = new ArrayList < > ( ) ; for ( int i = start ; i < end ; i ++ ) { Document doc = searcher . doc ( hits [ i ] . doc ) ; String filepath = doc . get ( Values . PATH ) ; if ( filepath != null ) { CodeResult cr = new CodeResult ( null , null ) ; cr . setCodePath ( doc . get ( Values . FILELOCATIONFILENAME ) ) ; cr . setFileName ( doc . get ( Values . FILENAME ) ) ; cr . setLanguageName ( doc . get ( Values . LANGUAGENAME ) ) ; cr . setMd5hash ( doc . get ( Values . MD5HASH ) ) ; cr . setCodeLines ( doc . get ( Values . CODELINES ) ) ; cr . setDocumentId ( hits [ i ] . doc ) ; cr . setRepoLocation ( doc . get ( Values . REPOLOCATION ) ) ; cr . setRepoName ( doc . get ( Values . REPONAME ) ) ; cr . setCodeOwner ( doc . get ( Values . CODEOWNER ) ) ; cr . setRevision ( doc . get ( Values . REVISION ) ) ; cr . setYearMonthDay ( doc . get ( Values . DATEYEARMONTHDAY ) ) ; cr . setMessage ( doc . get ( Values . MESSAGE ) ) ; cr . setDeleted ( doc . get ( Values . DELETED ) ) ; try { String repoLoc = "./repo/" + cr . getRepoName ( ) + "/.git" ; cr . setCode ( Arrays . asList ( gitService . fetchFileRevision ( repoLoc , cr . getRevision ( ) , cr . getCodePath ( ) ) . split ( "\\r?\\n" ) ) ) ; } catch ( Exception ex ) { LOGGER . warning ( "Indexed file appears to binary or missing: " + filepath ) ; } codeResults . add ( cr ) ; } else { LOGGER . warning ( ( i + 1 ) + ". " + "No path for this document" ) ; } } List < CodeFacetLanguage > codeFacetLanguages = this . getLanguageFacetResults ( searcher , reader , query ) ; List < CodeFacetRepo > repoFacetLanguages = this . getRepoFacetResults ( searcher , reader , query ) ; List < CodeFacetOwner > repoFacetOwner = this . getOwnerFacetResults ( searcher , reader , query ) ; List < CodeFacetYearMonthDay > repoFacetYearMonthDay = this . getYearMonthDayFacetResults ( searcher , reader , query ) ; List < CodeFacetYearMonth > repoFacetYearMonth = this . getYearMonthFacetResults ( searcher , reader , query ) ; List < CodeFacetYear > repoFacetYear = this . getYearFacetResults ( searcher , reader , query ) ; List < CodeFacetRevision > repoFacetRevision = this . getRevisionFacetResults ( searcher , reader , query ) ; List < CodeFacetDeleted > repoFacetDeleted = this . getDeletedFacetResults ( searcher , reader , query ) ; SearchResult searchResult = new SearchResult ( numTotalHits , page , query . toString ( ) , codeResults , pages , codeFacetLanguages , repoFacetLanguages , repoFacetOwner ) ; searchResult . setRepoFacetYearMonthDay ( repoFacetYearMonthDay ) ; searchResult . setRepoFacetYearMonth ( repoFacetYearMonth ) ; searchResult . setRepoFacetYear ( repoFacetYear ) ; searchResult . setRepoFacetRevision ( repoFacetRevision ) ; searchResult . setRepoFacetDeleted ( repoFacetDeleted ) ; return searchResult ; }

Solo se usa internamente, pero hace el levantamiento pesado de realmente convertir el documento de índice en el disco al formato utilizado internamente, incluido internamente, incluso leer el archivo desde el disco.


public static SM_SYSTEM_MESSAGE STR_SKILL_SUCC_DispelNPCDeBuffPhysical_A_TO_SELF  ( String skillcaster , String skillname ) { return new SM_SYSTEM_MESSAGE ( 1201260 , skillcaster , skillname ) ; }

[% Skillcaster] eliminó sus condiciones físicas anormales mediante el uso de [% de habilidad].


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


public static Map < String , Object > updateProductionRun  ( DispatchContext ctx , Map < String , ? extends Object > context ) { Delegator delegator = ctx . getDelegator ( ) ; LocalDispatcher dispatcher = ctx . getDispatcher ( ) ; Locale locale = ( Locale ) context . get ( "locale" ) ; GenericValue userLogin = ( GenericValue ) context . get ( "userLogin" ) ; String productionRunId = ( String ) context . get ( "productionRunId" ) ; if ( ! UtilValidate . isEmpty ( productionRunId ) ) { ProductionRun productionRun = new ProductionRun ( productionRunId , delegator , dispatcher ) ; if ( productionRun . exist ( ) ) { if ( ! "PRUN_CREATED" . equals ( productionRun . getGenericValue ( ) . getString ( "currentStatusId" ) ) && ! "PRUN_SCHEDULED" . equals ( productionRun . getGenericValue ( ) . getString ( "currentStatusId" ) ) ) { return ServiceUtil . returnError ( UtilProperties . getMessage ( resource , "ManufacturingProductionRunPrinted" , locale ) ) ; } BigDecimal quantity = ( BigDecimal ) context . get ( "quantity" ) ; if ( quantity != null && quantity . compareTo ( productionRun . getQuantity ( ) ) != 0 ) { productionRun . setQuantity ( quantity ) ; } Timestamp estimatedStartDate = ( Timestamp ) context . get ( "estimatedStartDate" ) ; if ( estimatedStartDate != null && ! estimatedStartDate . equals ( productionRun . getEstimatedStartDate ( ) ) ) { productionRun . setEstimatedStartDate ( estimatedStartDate ) ; } String workEffortName = ( String ) context . get ( "workEffortName" ) ; if ( workEffortName != null ) { productionRun . setProductionRunName ( workEffortName ) ; } String description = ( String ) context . get ( "description" ) ; if ( description != null ) { productionRun . setDescription ( description ) ; } String facilityId = ( String ) context . get ( "facilityId" ) ; if ( facilityId != null ) { productionRun . getGenericValue ( ) . set ( "facilityId" , facilityId ) ; } boolean updateEstimatedOrderDates = productionRun . isUpdateCompletionDate ( ) ; if ( productionRun . store ( ) ) { if ( updateEstimatedOrderDates && "PRUN_SCHEDULED" . equals ( productionRun . getGenericValue ( ) . getString ( "currentStatusId" ) ) ) { try { dispatcher . runSync ( "setEstimatedDeliveryDates" , UtilMisc . toMap ( "userLogin" , userLogin ) ) ; } catch ( GenericServiceException e ) { Debug . logError ( e , "Problem calling the setEstimatedDeliveryDates service" , module ) ; return ServiceUtil . returnError ( UtilProperties . getMessage ( resource , "ManufacturingProductionRunNotUpdated" , locale ) ) ; } } return ServiceUtil . returnSuccess ( ) ; } else { Debug . logError ( "productionRun.store() fail for productionRunId =" + productionRunId , module ) ; return ServiceUtil . returnError ( UtilProperties . getMessage ( resource , "ManufacturingProductionRunNotUpdated" , locale ) ) ; } } Debug . logError ( "no productionRun for productionRunId =" + productionRunId , module ) ; return ServiceUtil . returnError ( UtilProperties . getMessage ( resource , "ManufacturingProductionRunNotUpdated" , locale ) ) ; } Debug . logError ( "service updateProductionRun call with productionRunId empty" , module ) ; return ServiceUtil . returnError ( UtilProperties . getMessage ( resource , "ManufacturingProductionRunNotUpdated" , locale ) ) ; }

Actualizar una ejecución de producción.<li> Campo de actualización y después de volver a calcular todos los datos de producción de producción (RutiningTask y ProductComponent) <li> Crear el WorkeFfortToodStandstandard para el enlace entre ProductionRun y el producto que producirá <li> para cada mascar de ruta válida del enrutamiento Crear una tarea de WorkeFfort-Tarea <Li> Para la primera máscara de ruta, cree para todos los productos válidos para no associaterOutingTask A WorkeFfortToodStandstandard <li> para cada máscara de ruta válida del enrutamiento y un producto válido para asociarse con esta mascar de ruta cree un workeffortgoodstandardard


public static String formatQuantity  ( BigDecimal quantity ) { if ( quantity == null ) return "" ; else return quantityDecimalFormat . format ( quantity ) ; }

Formatos de un bigdecimal que representa una cantidad en una cadena


public static SM_SYSTEM_MESSAGE STR_FORCE_HE_IS_ALREADY_MEMBER_OF_OTHER_FORCE  ( String value0 ) { return new SM_SYSTEM_MESSAGE ( 1301013 , value0 ) ; }


public SuffixFileFilter ( List < String > suffixes , IOCase caseSensitivity ) { if ( suffixes == null ) { throw new IllegalArgumentException ( "The list of suffixes must not be null" ) ; } this . suffixes = suffixes . toArray ( new String [ suffixes . size ( ) ] ) ; this . caseSensitivity = caseSensitivity == null ? IOCase . SENSITIVE : caseSensitivity ; }

Construye un nuevo filtro de archivos del sufijo para una lista de sufijos que especifican la sensibilidad a la mayoría de las casos.


private void stop_notify_2  ( ) { bleManager . stopListenCharacterCallback ( UUID_NOTIFY_2 ) ; }


public void stopPreview  ( ) { if ( camera != null && previewing ) { if ( ! useOneShotPreviewCallback ) { camera . setPreviewCallback ( null ) ; } camera . stopPreview ( ) ; previewCallback . setHandler ( null , 0 ) ; autoFocusCallback . setHandler ( null , 0 ) ; previewing = false ; } }

Le dice a la cámara que deje de dibujar marcos de vista previa.


public VideoGetAlbumsQueryWithExtended needSystem  ( Boolean value ) { return unsafeParam ( "need_system" , value ) ; }


public static SM_SYSTEM_MESSAGE STR_SKILL_SUCC_SwitchHPMP_Instant_A_TO_B  ( String skillcaster , String skilltarget , String skillname ) { return new SM_SYSTEM_MESSAGE ( 1201040 , skillcaster , skilltarget , skillname ) ; }

[% Skillcaster] intercambió [% SkillTarget] 's HP y MP mediante el uso de [% SkillName].


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


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.


public List < String > provideWhiteList  ( ) { LinkedList < String > whiteList = new LinkedList < > ( ) ; whiteList . add ( "org.chromium" ) ; return whiteList ; }

Proporcionar la lista blanca, la entrada en la lista en blanco no se mostrará en la lista de interfaz de usuario.


public static ConstraintHandle constraintHandle  ( ConstraintAnchor anchor ) { if ( anchor == null ) { return null ; } ConstraintWidget widget = anchor . getOwner ( ) ; if ( widget == null ) { return null ; } if ( widget . getCompanionWidget ( ) == null ) { return null ; } WidgetCompanion widgetCompanion = ( WidgetCompanion ) widget . getCompanionWidget ( ) ; WidgetInteractionTargets widgetInteraction = widgetCompanion . getWidgetInteractionTargets ( ) ; return widgetInteraction . getConstraintHandle ( anchor ) ; }

Función de utilidad que le da a la restricción, asociada al restrictor dado.


public ProcessConfiguration createProcessConfiguration  ( final String processName , final Long processPIK , final Document confXMLDoc , final boolean localConfiguration , String jmsDaqQueueTrunk ) throws ConfUnknownTypeException , ConfRejectedTypeException { this . jmsDaqQueueTrunk = jmsDaqQueueTrunk ; return createProcessConfiguration ( processName , processPIK , confXMLDoc , localConfiguration ) ; }

Toma el documento DOM de configuración y devuelve una configuración de proceso.


public static String checkTrackingCodeUrlParam  ( HttpServletRequest request , HttpServletResponse response ) { String trackingCodeId = request . getParameter ( "autoTrackingCode" ) ; if ( UtilValidate . isEmpty ( trackingCodeId ) ) trackingCodeId = request . getParameter ( "atc" ) ; if ( UtilValidate . isNotEmpty ( trackingCodeId ) ) { Delegator delegator = ( Delegator ) request . getAttribute ( "delegator" ) ; GenericValue trackingCode ; try { trackingCode = EntityQuery . use ( delegator ) . from ( "TrackingCode" ) . where ( "trackingCodeId" , trackingCodeId ) . cache ( ) . queryOne ( ) ; } catch ( GenericEntityException e ) { Debug . logError ( e , "Error looking up TrackingCode with trackingCodeId [" + trackingCodeId + "], ignoring this trackingCodeId" , module ) ; return "error" ; } if ( trackingCode == null ) { Debug . logError ( "TrackingCode not found for trackingCodeId [" + trackingCodeId + "], ignoring this trackingCodeId." , module ) ; return "error" ; } return processTrackingCode ( trackingCode , request , response , "TKCDSRC_URL_PARAM" ) ; } else { return "success" ; } }

Si se desea el monitoreo del código de seguimiento, este evento debe agregarse a la lista de eventos que se ejecutan en cada solicitud.Este evento busca el parámetro <código> autotrackingcode </ code> o una versión acortada: <Code> ATC </ CODE>.


public PercentFormatter ( DecimalFormat format ) { mFormattedStringCache = new FormattedStringCache . Generic < > ( format ) ; mFormattedStringCacheAxis = new FormattedStringCache . PrimFloat ( format ) ; }


public Tuple [ ] toArray  ( ) { Tuple [ ] t = new Tuple [ getTupleCount ( ) ] ; m_tuples . toArray ( t ) ; return t ; }

Obtenga los contenidos de este Tupleset como una matriz.


@ Override protected void parseOptimizationData  ( OptimizationData ... optData ) { super . parseOptimizationData ( optData ) ; for ( OptimizationData data : optData ) { if ( data instanceof InitialGuess ) { start = ( ( InitialGuess ) data ) . getInitialGuess ( ) ; continue ; } if ( data instanceof SimpleBounds ) { final SimpleBounds bounds = ( SimpleBounds ) data ; lowerBound = bounds . getLower ( ) ; upperBound = bounds . getUpper ( ) ; continue ; } } checkParameters ( ) ; }

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


public Builder quality  ( int quality ) { if ( quality < 1 || quality > 100 ) throw new IllegalArgumentException ( "quality must be between 1 and 100" ) ; this . quality = quality ; return this ; }

Calidad que deberíamos generar la imagen 1-100.


public void sync  ( ) throws CanceledException  { if ( ! inSync ) { inSync = true ; IChartData chartData = ( IChartData ) getChartData ( ) ; chartData . clear ( ) ; try { MicrobialAttributes attributes = MicrobialAttributes . getInstance ( ) ; Document doc = ( ( Director ) dir ) . getDocument ( ) ; MainViewer mainViewer = ( ( Director ) dir ) . getMainViewer ( ) ; int numberOfDatasets = doc . getNumberOfSamples ( ) ; if ( numberOfDatasets > 0 ) { Map < String , Map < String , Integer > > dataset2AttributeState2Value = attributes . getDataSet2AttributeState2Value ( mainViewer ) ; chartData . setAllSeries ( doc . getSampleNames ( ) ) ; SortedSet < String > classNames = new TreeSet < > ( ) ; for ( String series : dataset2AttributeState2Value . keySet ( ) ) { Map < String , Integer > attributeState2value = dataset2AttributeState2Value . get ( series ) ; for ( String attributeState : attributeState2value . keySet ( ) ) { classNames . add ( attributeState ) ; Integer value = attributeState2value . get ( attributeState ) ; if ( value == null ) value = 0 ; chartData . putValue ( series , attributeState , value ) ; } } chartData . setClassNames ( classNames ) ; } } catch ( IOException e ) { Basic . caught ( e ) ; } super . sync ( ) ; inSync = false ; } }

Sincronice la tabla para reflejar la última selección de usuarios en el gráfico taxón


public final boolean isEmpty  ( ) { return size == 0 ; }

Devuelve VERDADERO si este conjunto no contiene objetos de tiempo de ejecución.


public float [ ] multAcross  ( float [ ] vec4f ) { if ( null == vec4f || vec4f . length != 4 ) { logger . warning ( "invalid array given, must be nonnull and length 4" ) ; return null ; } float x = vec4f [ 0 ] , y = vec4f [ 1 ] , z = vec4f [ 2 ] , w = vec4f [ 3 ] ; vec4f [ 0 ] = m00 * x + m10 * y + m20 * z + m30 * w ; vec4f [ 1 ] = m01 * x + m11 * y + m21 * z + m31 * w ; vec4f [ 2 ] = m02 * x + m12 * y + m22 * z + m32 * w ; vec4f [ 3 ] = m03 * x + m13 * y + m23 * z + m33 * w ; return vec4f ; }

<CÓDIGO> MULT </ CODE> Multiplica una matriz de 4 flotadores contra esta matriz de rotación.Los resultados se almacenan directamente en la matriz.(VEC4F X MAT4F)


protected void writeExternal  ( ObjectOutput out , PlatformLogicalVersion version ) throws IOException { }


public IconOptions build  ( ) { IconOptions options = new IconOptions ( ) ; options . iconUrl = iconUrl ; options . iconRetinaUrl = this . iconRetinaUrl ; options . iconSize = this . iconSize ; options . iconAnchor = this . iconAnchor ; options . shadowUrl = this . shadowUrl ; options . shadowRetinaUrl = this . shadowRetinaUrl ; options . shadowSize = this . shadowSize ; options . shadowAnchor = this . shadowAnchor ; options . popupAnchor = this . popupAnchor ; options . className = this . className ; return options ; }


protected void compact  ( ) { if ( readPos == 0 ) return ; int avail = writePos - readPos ; System . arraycopy ( buf , readPos , buf , 0 , avail ) ; readPos = 0 ; writePos = avail ; }

Compacto el búfer, de modo que los datos en el búfer se inicie al comienzo de la matriz subyacente.


static public float [ ] decode_ARGB  ( int rgba ) { int vArc_I16 = ( rgba >> 0 ) & 0xFFFF ; int vMag_I16 = ( rgba >> 16 ) & 0xFFFF ; float vArc = TWO_PI * vArc_I16 / ( 0xFFFF - 1 ) ; float vMag = vMag_I16 ; float vx = ( float ) Math . cos ( vArc ) ; float vy = ( float ) Math . sin ( vArc ) ; return new float [ ] { vx , vy , vMag } ; }

Decodifica un vector, dado como entero codificado (0xmmmmaaaaaa) de 32 bits) a un vector 2D normalizado y su magnitud.


public void forEach  ( BiConsumer < K , V > action ) { registryObjects . forEach ( action ) ; }

Realiza la acción dada para cada objeto en este registro.


public boolean containsValue  ( V val ) { byte [ ] states = _states ; V [ ] vals = _values ; if ( null == val ) { for ( int i = vals . length ; i -- > 0 ; ) { if ( states [ i ] == FULL && val == vals [ i ] ) { return true ; } } } else { for ( int i = vals . length ; i -- > 0 ; ) { if ( states [ i ] == FULL && ( val == vals [ i ] || val . equals ( vals [ i ] ) ) ) { return true ; } } } return false ; }

Comprueba la presencia de <tt> val </ tt> en los valores del mapa.


public Bucket ( String label , Experiment experiment , double allocationPercent , boolean isControl , String description , String payload ) { this ( label , experiment . id , allocationPercent , isControl , description , payload , null ) ; }

Crea un cubo con los valores suministrados.


private static int countGapsDashDot  ( String sequence ) { int count = 0 ; for ( int i = 0 ; i < sequence . length ( ) ; i ++ ) { int a = sequence . charAt ( i ) ; if ( a == '-' || a == '.' ) count ++ ; } return count ; }

Cuenta el número de huecos ('-', '.') en una secuencia


public void updateSkillTreePointsSets  ( ) { skillTreesInSet . clear ( ) ; Map < Long , SkillTreeInSet > skillTreeToSkillTreeInSet = new HashMap < > ( ) ; for ( SkillTreeInSet pointsSet : skillTreesInSet ) { skillTreeToSkillTreeInSet . put ( pointsSet . getSkillTree ( ) . getId ( ) , pointsSet ) ; } for ( int i = 0 ; i < equipment . length ; i ++ ) { Log . v ( "ASB" , "Reading skills from armor piece " + i ) ; Map < SkillTree , Integer > armorSkillTreePoints = getSkillsFromArmorPiece ( i ) ; for ( SkillTree skillTree : armorSkillTreePoints . keySet ( ) ) { SkillTreeInSet s ; if ( ! skillTreeToSkillTreeInSet . containsKey ( skillTree . getId ( ) ) ) { Log . v ( "ASB" , "Adding skill tree " + skillTree . getName ( ) + " to the list of Skill Trees in the armor set." ) ; s = new SkillTreeInSet ( ) ; s . setSkillTree ( skillTree ) ; skillTreesInSet . add ( s ) ; skillTreeToSkillTreeInSet . put ( skillTree . getId ( ) , s ) ; } else { Log . v ( "ASB" , "Skill tree " + skillTree . getName ( ) + " already registered!" ) ; s = skillTreeToSkillTreeInSet . get ( skillTree . getId ( ) ) ; } s . setPoints ( i , armorSkillTreePoints . get ( skillTree ) ) ; } } }

Agrega cualquier habilidad a los árboles de habilidades del conjunto de armaduras que no estaban allí antes, y eliminan aquellos que ya no están allí.