code
stringlengths
32
2.6k
nl
stringlengths
25
260
protected void tearDown ( ) { }
L谩grimas hacia abajo del accesorio, por ejemplo, cierre una conexi贸n de red.Este m茅todo se llama despu茅s de que se ejecute una prueba.
@ KnownFailure ( "Fixed on DonutBurger, Wrong Exception thrown" ) public void test_unwrap_ByteBuffer$ByteBuffer_02 ( ) { String host = "new host" ; int port = 8080 ; ByteBuffer bbs = ByteBuffer . allocate ( 10 ) ; ByteBuffer bbR = ByteBuffer . allocate ( 100 ) . asReadOnlyBuffer ( ) ; ByteBuffer [ ] bbA = { bbR , ByteBuffer . allocate ( 10 ) , ByteBuffer . allocate ( 100 ) } ; SSLEngine sse = getEngine ( host , port ) ; sse . setUseClientMode ( true ) ; try { sse . unwrap ( bbs , bbA ) ; fail ( "ReadOnlyBufferException wasn't thrown" ) ; } catch ( ReadOnlyBufferException iobe ) { } catch ( Exception e ) { fail ( e + " was thrown instead of ReadOnlyBufferException" ) ; } }
javax.net.ssl.sslengine # Deswrap (ByteBuffer SRC, ByteBuffer [] DSTS) Se debe arrojar readonlybufferException.
public static CstFloat make ( int bits ) { return new CstFloat ( bits ) ; }
Hace una instancia para el valor dado.Esto puede (pero no necesariamente) devuelve una instancia ya asignada.
public long size ( ) { long size = 0 ; if ( parsedGeneExpressions == null ) parseGenes ( ) ; for ( int i = 0 ; i < parsedGeneExpressions . length ; i ++ ) size += parsedGeneExpressions [ i ] . numberOfNodes ( ) ; return size ; }
Devuelve el "tama帽o" del cromosoma, a saber, el n煤mero de nodos en todos sus genes analizados, no incluye las funciones de vinculaci贸n.
public void increment ( View view ) { if ( quantity == 100 ) { return ; } quantity = quantity + 1 ; displayQuantity ( quantity ) ; }
Este m茅todo se llama cuando se hace clic en el bot贸n Plus.
public void trimToSize ( ) { ++ modCount ; if ( size < elementData . length ) { elementData = Arrays . copyOf ( elementData , size ) ; } }
Recorta la capacidad de esta instancia de <TT> ArrayHashlist </ TT> para ser el tama帽o actual de la lista.Una aplicaci贸n puede usar esta operaci贸n para minimizar el almacenamiento de una instancia de <TT> ArrayHashList </ TT>.
public SyncValueResponseMessage ( SyncValueResponseMessage other ) { __isset_bitfield = other . __isset_bitfield ; if ( other . isSetHeader ( ) ) { this . header = new AsyncMessageHeader ( other . header ) ; } this . count = other . count ; }
Realiza una copia profunda en <i> Otro </ i>.
public void clearParsers ( ) { if ( parserManager != null ) { parserManager . clearParsers ( ) ; } }
Elimina a todos los analizadores de este 谩rea de texto.
@ Override public void run ( ) { while ( doWork ) { deliverLock ( ) ; while ( tomLayer . isRetrievingState ( ) ) { System . out . println ( "-- Retrieving State" ) ; canDeliver . awaitUninterruptibly ( ) ; if ( tomLayer . getLastExec ( ) == - 1 ) System . out . println ( "-- Ready to process operations" ) ; } try { ArrayList < Decision > decisions = new ArrayList < Decision > ( ) ; decidedLock . lock ( ) ; if ( decided . isEmpty ( ) ) { notEmptyQueue . await ( ) ; } decided . drainTo ( decisions ) ; decidedLock . unlock ( ) ; if ( ! doWork ) break ; if ( decisions . size ( ) > 0 ) { TOMMessage [ ] [ ] requests = new TOMMessage [ decisions . size ( ) ] [ ] ; int [ ] consensusIds = new int [ requests . length ] ; int [ ] leadersIds = new int [ requests . length ] ; int [ ] regenciesIds = new int [ requests . length ] ; CertifiedDecision [ ] cDecs ; cDecs = new CertifiedDecision [ requests . length ] ; int count = 0 ; for ( Decision d : decisions ) { requests [ count ] = extractMessagesFromDecision ( d ) ; consensusIds [ count ] = d . getConsensusId ( ) ; leadersIds [ count ] = d . getLeader ( ) ; regenciesIds [ count ] = d . getRegency ( ) ; CertifiedDecision cDec = new CertifiedDecision ( this . controller . getStaticConf ( ) . getProcessId ( ) , d . getConsensusId ( ) , d . getValue ( ) , d . getDecisionEpoch ( ) . proof ) ; cDecs [ count ] = cDec ; if ( requests [ count ] [ 0 ] . equals ( d . firstMessageProposed ) ) { long time = requests [ count ] [ 0 ] . timestamp ; long seed = requests [ count ] [ 0 ] . seed ; int numOfNonces = requests [ count ] [ 0 ] . numOfNonces ; requests [ count ] [ 0 ] = d . firstMessageProposed ; requests [ count ] [ 0 ] . timestamp = time ; requests [ count ] [ 0 ] . seed = seed ; requests [ count ] [ 0 ] . numOfNonces = numOfNonces ; } count ++ ; } Decision lastDecision = decisions . get ( decisions . size ( ) - 1 ) ; if ( requests != null && requests . length > 0 ) { deliverMessages ( consensusIds , regenciesIds , leadersIds , cDecs , requests ) ; if ( controller . hasUpdates ( ) ) { processReconfigMessages ( lastDecision . getConsensusId ( ) ) ; tomLayer . setLastExec ( lastDecision . getConsensusId ( ) ) ; tomLayer . setInExec ( - 1 ) ; } } int cid = lastDecision . getConsensusId ( ) ; if ( cid > 2 ) { int stableConsensus = cid - 3 ; tomLayer . execManager . removeConsensus ( stableConsensus ) ; } } } catch ( Exception e ) { e . printStackTrace ( System . err ) ; } deliverUnlock ( ) ; } java . util . logging . Logger . getLogger ( DeliveryThread . class . getName ( ) ) . log ( Level . INFO , "DeliveryThread stopped." ) ; }
Este es el c贸digo para el hilo.Ofrece decisiones al objeto Receptor de solicitud TOM (que es la aplicaci贸n)
private byte [ ] calculateUValue ( byte [ ] generalKey , byte [ ] firstDocIdValue , int revision ) throws GeneralSecurityException , EncryptionUnsupportedByProductException { if ( revision == 2 ) { Cipher rc4 = createRC4Cipher ( ) ; SecretKey key = createRC4Key ( generalKey ) ; initEncryption ( rc4 , key ) ; return crypt ( rc4 , PW_PADDING ) ; } else if ( revision >= 3 ) { MessageDigest md5 = createMD5Digest ( ) ; md5 . update ( PW_PADDING ) ; if ( firstDocIdValue != null ) { md5 . update ( firstDocIdValue ) ; } final byte [ ] hash = md5 . digest ( ) ; Cipher rc4 = createRC4Cipher ( ) ; SecretKey key = createRC4Key ( generalKey ) ; initEncryption ( rc4 , key ) ; final byte [ ] v = crypt ( rc4 , hash ) ; rc4shuffle ( v , generalKey , rc4 ) ; assert v . length == 16 ; final byte [ ] entryValue = new byte [ 32 ] ; System . arraycopy ( v , 0 , entryValue , 0 , v . length ) ; System . arraycopy ( v , 0 , entryValue , 16 , v . length ) ; return entryValue ; } else { throw new EncryptionUnsupportedByProductException ( "Unsupported standard security handler revision " + revision ) ; } }
Calcule cu谩l es el valor de U debe consistir en una clave particular y una configuraci贸n de documentos.Correponds a algoritmos 3.4 y 3.5 de la versi贸n de referencia PDF 1.7
private void assign ( HashMap < String , DBIDs > labelMap , String label , DBIDRef id ) { if ( labelMap . containsKey ( label ) ) { DBIDs exist = labelMap . get ( label ) ; if ( exist instanceof DBID ) { ModifiableDBIDs n = DBIDUtil . newHashSet ( ) ; n . add ( ( DBID ) exist ) ; n . add ( id ) ; labelMap . put ( label , n ) ; } else { assert ( exist instanceof HashSetModifiableDBIDs ) ; assert ( exist . size ( ) > 1 ) ; ( ( ModifiableDBIDs ) exist ) . add ( id ) ; } } else { labelMap . put ( label , DBIDUtil . deref ( id ) ) ; } }
Asigna la ID especificada al LabelMap seg煤n su etiqueta
private void showFeedback ( String message ) { if ( myHost != null ) { myHost . showFeedback ( message ) ; } else { System . out . println ( message ) ; } }
Se utiliza para comunicar los mensajes emergentes de retroalimentaci贸n entre una herramienta de complemento y la principal interfaz de usuario de WhiteBox.
public CDeleteAction ( final BackEndDebuggerProvider debuggerProvider , final int [ ] rows ) { super ( rows . length == 1 ? "Remove Breakpoint" : "Remove Breakpoints" ) ; m_debuggerProvider = Preconditions . checkNotNull ( debuggerProvider , "IE01344: Debugger provider argument can not be null" ) ; m_rows = rows . clone ( ) ; }
Crea un nuevo objeto de acci贸n.
public Yaml ( BaseConstructor constructor , Representer representer , DumperOptions dumperOptions , Resolver resolver ) { if ( ! constructor . isExplicitPropertyUtils ( ) ) { constructor . setPropertyUtils ( representer . getPropertyUtils ( ) ) ; } else if ( ! representer . isExplicitPropertyUtils ( ) ) { representer . setPropertyUtils ( constructor . getPropertyUtils ( ) ) ; } this . constructor = constructor ; representer . setDefaultFlowStyle ( dumperOptions . getDefaultFlowStyle ( ) ) ; representer . setDefaultScalarStyle ( dumperOptions . getDefaultScalarStyle ( ) ) ; representer . getPropertyUtils ( ) . setAllowReadOnlyProperties ( dumperOptions . isAllowReadOnlyProperties ( ) ) ; representer . setTimeZone ( dumperOptions . getTimeZone ( ) ) ; this . representer = representer ; this . dumperOptions = dumperOptions ; this . resolver = resolver ; this . name = "Yaml:" + System . identityHashCode ( this ) ; }
Crear instancia de YAML.Es seguro crear algunos casos y usarlos en diferentes hilos.
public void testHitEndAfterFind ( ) { hitEndTest ( true , "#01.0" , "r((ege)|(geg))x" , "regexx" , false ) ; hitEndTest ( true , "#01.1" , "r((ege)|(geg))x" , "regex" , false ) ; hitEndTest ( true , "#01.2" , "r((ege)|(geg))x" , "rege" , true ) ; hitEndTest ( true , "#01.2" , "r((ege)|(geg))x" , "xregexx" , false ) ; hitEndTest ( true , "#02.0" , "regex" , "rexreger" , true ) ; hitEndTest ( true , "#02.1" , "regex" , "raxregexr" , false ) ; String floatRegex = getHexFloatRegex ( ) ; hitEndTest ( true , "#03.0" , floatRegex , Double . toHexString ( - 1.234d ) , true ) ; hitEndTest ( true , "#03.1" , floatRegex , "1 ABC" + Double . toHexString ( Double . NaN ) + "buhuhu" , false ) ; hitEndTest ( true , "#03.2" , floatRegex , Double . toHexString ( - 0.0 ) + "--" , false ) ; hitEndTest ( true , "#03.3" , floatRegex , "--" + Double . toHexString ( Double . MIN_VALUE ) + "--" , false ) ; hitEndTest ( true , "#04.0" , "(\\d+) fish (\\d+) fish (\\w+) fish (\\d+)" , "1 fish 2 fish red fish 5" , true ) ; hitEndTest ( true , "#04.1" , "(\\d+) fish (\\d+) fish (\\w+) fish (\\d+)" , "----1 fish 2 fish red fish 5----" , false ) ; }
Prueba de regresi贸n para Harmony-4396
public void add ( Individual individual ) { individuals . add ( individual ) ; }
Agrega un solo individuo.
public boolean removeSession ( IgniteUuid sesId ) { GridTaskSessionImpl ses = sesMap . get ( sesId ) ; assert ses == null || ses . isFullSupport ( ) ; if ( ses != null && ses . release ( ) ) { sesMap . remove ( sesId , ses ) ; return true ; } return false ; }
Elimina la sesi贸n para una identificaci贸n de sesi贸n determinada.
public static Bitmap loadBitmapOptimized ( Uri uri , Context context , int limit ) throws ImageLoadException { return loadBitmapOptimized ( new UriSource ( uri , context ) { } , limit ) ; }
Carga del mapa de bits con un tama帽o cargado optimizado menos que los p铆xeles espec铆ficos.
protected BasePeriod ( long duration ) { super ( ) ; iType = PeriodType . standard ( ) ; int [ ] values = ISOChronology . getInstanceUTC ( ) . get ( DUMMY_PERIOD , duration ) ; iValues = new int [ 8 ] ; System . arraycopy ( values , 0 , iValues , 4 , 4 ) ; }
Crea un per铆odo de la duraci贸n determinada del milisegundo con el tipo de per铆odo est谩ndar y las reglas ISO, asegurando que el c谩lculo se realice con el tipo de per铆odo de s贸lo el tiempo.<p> El c谩lculo utiliza los campos de hora, minuto, segundo y milisegundo.
public FlatBufferBuilder ( ) { this ( 1024 ) ; }
Comience con un b煤fer de 1kib, luego crece seg煤n sea necesario.
public PbrpcConnectionException ( String arg0 , Throwable arg1 ) { super ( arg0 , arg1 ) ; }
Crea una nueva instancia de PBRPCConnectionException.
public void uninstallUI ( JComponent a ) { for ( int i = 0 ; i < uis . size ( ) ; i ++ ) { ( ( ComponentUI ) ( uis . elementAt ( i ) ) ) . uninstallUI ( a ) ; } }
Invoca el m茅todo <c贸digo> Uninstallui </ Code> en cada UI manejado por este objeto.
public static void shutdown ( ) { if ( instance != null ) { instance . save ( ) ; } }
Guarda el archivo de configuraci贸n.
public boolean GE ( Word w2 ) { return value . GE ( w2 . value ) ; }
Una comparaci贸n mayor o igual
public static UnionCoder of ( List < Coder < ? > > elementCoders ) { return new UnionCoder ( elementCoders ) ; }
Construye un codificador de uni贸n con la lista dada de los codificadores de elementos.Esta lista corresponde a un mapeo de una etiqueta de uni贸n al codificador.Las etiquetas de la uni贸n comienzan en 0.
public void testFileDeletion ( ) throws Exception { File testDir = createTestDir ( "testFileDeletion" ) ; String prefix1 = "testFileDeletion1" ; File [ ] files1 = createFiles ( testDir , prefix1 , 5 ) ; String prefix2 = "testFileDeletion2" ; File [ ] files2 = createFiles ( testDir , prefix2 , 5 ) ; FileCommands . deleteFiles ( files1 , true ) ; assertNotExists ( files1 ) ; FileCommands . deleteFiles ( files2 , false ) ; Thread . sleep ( 1000 ) ; assertNotExists ( files2 ) ; }
Verifique la capacidad de eliminar una lista de archivos.
public boolean isOnClasspath ( String classpath ) { return this . classpath . equals ( classpath ) ; }
Eval煤a si la dependencia est谩 dirigida a un tipo de ClassPath.
protected void source ( String ceylon ) { String providerPreSrc = "provider/" + ceylon + "_pre.ceylon" ; String providerPostSrc = "provider/" + ceylon + "_post.ceylon" ; String clientSrc = "client/" + ceylon + "_client.ceylon" ; compile ( providerPreSrc , providerModuleSrc , providerPackageSrc ) ; compile ( clientSrc , clientModuleSrc ) ; compile ( providerPostSrc , providerModuleSrc , providerPackageSrc ) ; compile ( clientSrc , clientModuleSrc ) ; }
Cheques que todav铆a podemos compilar un cliente despu茅s de un cambio
public PerformanceMonitor ( ) { initComponents ( ) ; if ( Display . getInstance ( ) . getCurrent ( ) != null ) { refreshFrameActionPerformed ( null ) ; } resultData . setModel ( new Model ( ) ) ; performanceLog . setLineWrap ( true ) ; resultData . setRowSorter ( new TableRowSorter < Model > ( ( Model ) resultData . getModel ( ) ) ) ; }
Crea nuevo formulario de formulario
@ DSGenerator ( tool_name = "Doppelganger" , tool_version = "2.0" , generated_on = "2014-09-03 15:01:15.190 -0400" , hash_original_method = "F262A3A18BABECF7EC492736953EAF6E" , hash_generated_method = "94A4545C167C029CC38AACEACF2087E9" ) private void unparkSuccessor ( Node node ) { int ws = node . waitStatus ; if ( ws < 0 ) compareAndSetWaitStatus ( node , ws , 0 ) ; Node s = node . next ; if ( s == null || s . waitStatus > 0 ) { s = null ; for ( Node t = tail ; t != null && t != node ; t = t . prev ) if ( t . waitStatus <= 0 ) s = t ; } if ( s != null ) LockSupport . unpark ( s . thread ) ; }
Despierta el sucesor del nodo, si existe uno.
@ DSComment ( "From safe class list" ) @ DSSafe ( DSCat . SAFE_LIST ) @ DSGenerator ( tool_name = "Doppelganger" , tool_version = "2.0" , generated_on = "2013-12-30 13:02:44.364 -0500" , hash_original_method = "EA3734ADDEB20313C9CAB09B48812C54" , hash_generated_method = "4858AFE909DDE63867ACB561D5449C13" ) static public void assertFalse ( String message , boolean condition ) { assertTrue ( message , ! condition ) ; }
Afirma que una condici贸n es falsa.Si no lo es, lanza una asseritionfailedError con el mensaje dado.
@ Override protected void initData ( ) { Intent intent = new Intent ( this , PushMessageService . class ) ; this . startService ( intent ) ; this . bindService ( intent , this . connection , Context . BIND_AUTO_CREATE ) ; }
Inicializar los datos de la actividad.
public static Date parseDateDay ( String dateString ) throws ParseException { return getSimplDateFormat ( DF_DEF ) . parse ( dateString ) ; }
Devoluciones Fecha analizada desde la cadena en formato: yyyy.mm.dd.
private boolean doesStoragePortExistsInVArray ( StoragePort umfsStoragePort , VirtualArray virtualArray ) { List < URI > virtualArrayPorts = returnAllPortsInVArray ( virtualArray . getId ( ) ) ; if ( virtualArrayPorts . contains ( umfsStoragePort . getId ( ) ) ) { return true ; } return false ; }
Comprueba si el puerto de almacenamiento dado es parte de Varray
public SpringVaadinServletService ( VaadinServlet servlet , DeploymentConfiguration deploymentConfiguration , String serviceUrl ) throws ServiceException { super ( servlet , deploymentConfiguration ) ; this . serviceUrl = serviceUrl ; }
Cree una instancia de servicio de servlet que permita el uso de una URL de servicio personalizada.
private static List < TranslationResult > translateChildrenOfNode ( final ITranslationEnvironment environment , final IOperandTreeNode expression , OperandSize size , final boolean loadOperand , Long baseOffset ) throws InternalTranslationException { final List < TranslationResult > partialResults = new ArrayList < > ( ) ; final List < ? extends IOperandTreeNode > children = expression . getChildren ( ) ; Collections . sort ( children , comparator ) ; for ( final IOperandTreeNode child : children ) { final TranslationResult nextResult = loadOperand ( environment , baseOffset , child , isSegmentExpression ( expression . getValue ( ) ) ? expression : null , size , loadOperand ) ; partialResults . add ( nextResult ) ; baseOffset += nextResult . getInstructions ( ) . size ( ) ; } return partialResults ; }
Itala sobre los ni帽os de un nodo en el 谩rbol del operando y genera traducciones para ellos.
public void removeShutdownLatch ( final CountDownLatch latch ) { removeShutdownLatch ( latch , false ) ; }
Libera el pestillo y lo elimina de los pestillos que son manejados por este controlador.
public Version ( ) { this ( CommonReflection . getVersionTag ( ) ) ; }
Construye una nueva versi贸n de la versi贸n del servidor actual en ejecuci贸n
public static void startActivity ( Context context , String chatId ) { Intent intent = new Intent ( context , SendGroupFile . class ) ; intent . putExtra ( EXTRA_CHAT_ID , chatId ) ; context . startActivity ( intent ) ; }
Iniciar SendGroupFile Activity
public Index excludedDataCenters ( String excludedDataCenters ) { this . excludedDataCenters = excludedDataCenters ; return this ; }
Establece la lista de centros de datos excluidos.
README.md exists but content is empty.
Downloads last month
46