public void swipeFinished  ( long time ) { if ( ! mInSwipe ) return ; mInSwipe = false ; setWarpState ( true , true ) ; mEvenOutProgress = 0.f ; onUpOrCancel ( time ) ; }

Llamado cuando los deslizamientos terminan;más probable en el evento de los dedos.Da la oportunidad de iniciar una animación final para salir del modo con gracia.


public EntryVersionCleaner ( String parentName , ReferenceQueue < Object > queue , Map < EntryInfoKey , V > entryInfos ) { super ( parentName + "$" + EntryVersionCleaner . class . getSimpleName ( ) ) ; _queue = queue ; _entryInfos = entryInfos ; this . setDaemon ( true ) ; }


@ Transactional public BookDTO save  ( BookDTO dto ) { if ( dto == null ) { return null ; } Book book ; if ( dto . isIdSet ( ) ) { book = bookRepository . findOne ( dto . id ) ; } else { book = new Book ( ) ; } book . setTitle ( dto . title ) ; book . setSummary ( dto . summary ) ; book . setPublicationDate ( dto . publicationDate ) ; book . setBestSeller ( dto . bestSeller ) ; book . setPrice ( dto . price ) ; if ( dto . author == null ) { book . setAuthor ( null ) ; } else { Author author = book . getAuthor ( ) ; if ( author == null || ( author . getId ( ) . compareTo ( dto . author . id ) != 0 ) ) { book . setAuthor ( authorRepository . findOne ( dto . author . id ) ) ; } } return toDTO ( bookRepository . save ( book ) ) ; }

Guarde la DTO pasada como una nueva entidad o actualice la entidad correspondiente si corresponde.


public boolean equals  ( BasenameList bnl ) { if ( bnl . getLength ( ) != this . getLength ( ) ) return ( false ) ; for ( int i = 0 ; i < bnl . getLength ( ) ; i ++ ) { if ( ! this . contains ( bnl . getName ( i ) ) ) return ( false ) ; } return ( true ) ; }


public static SM_SYSTEM_MESSAGE STR_MSG_USER_KICKED_BY_TIMEOUT  ( String durationtime0 ) { return new SM_SYSTEM_MESSAGE ( 1400261 , durationtime0 ) ; }

La conexión se realizará tiempo en% de Duración00.Por favor, tome un descanso.


public static Location toLocation  ( IClassFile unit , int offset , int length ) throws JavaModelException { Location result = new Location ( ) ; String packageName = unit . getParent ( ) . getElementName ( ) ; String jarName = unit . getParent ( ) . getParent ( ) . getElementName ( ) ; String uriString = null ; try { uriString = new URI ( "jdt" , "contents" , "/" + jarName + "/" + packageName + "/" + unit . getElementName ( ) , unit . getHandleIdentifier ( ) , null ) . toASCIIString ( ) ; } catch ( URISyntaxException e ) { JavaLanguageServerPlugin . logException ( "Error generating URI for class " , e ) ; } result . setUri ( uriString ) ; IBuffer buffer = unit . getBuffer ( ) ; int [ ] loc = JsonRpcHelpers . toLine ( buffer , offset ) ; int [ ] endLoc = JsonRpcHelpers . toLine ( buffer , offset + length ) ; Range range = new Range ( ) ; if ( loc != null ) { range . withStart ( new Position ( ) . withLine ( loc [ 0 ] ) . withCharacter ( loc [ 1 ] ) ) ; } if ( endLoc != null ) { range . withEnd ( new Position ( ) . withLine ( endLoc [ 0 ] ) . withCharacter ( endLoc [ 1 ] ) ) ; } return result . withRange ( range ) ; }

Crea una ubicación al desplazamiento y la longitud dados para el archivo de clase.


public static boolean remove  ( String id ) { id = GROUP + id ; if ( cacheSystem != null ) { return cacheSystem . delete ( id ) ; } return false ; }


protected void addSourceFileTag  ( soot . SootClass sc ) { soot . tagkit . SourceFileTag tag = null ; if ( sc . hasTag ( "SourceFileTag" ) ) { tag = ( soot . tagkit . SourceFileTag ) sc . getTag ( "SourceFileTag" ) ; } else { tag = new soot . tagkit . SourceFileTag ( ) ; sc . addTag ( tag ) ; } String name = Util . getSourceFileOfClass ( sc ) ; if ( InitialResolver . v ( ) . classToSourceMap ( ) != null ) { if ( InitialResolver . v ( ) . classToSourceMap ( ) . containsKey ( name ) ) { name = InitialResolver . v ( ) . classToSourceMap ( ) . get ( name ) ; } } int slashIndex = name . lastIndexOf ( "/" ) ; if ( slashIndex != - 1 ) { name = name . substring ( slashIndex + 1 ) ; } tag . setSourceFile ( name ) ; }

Agrega la etiqueta del archivo de origen a cada SOOTCLASS


@ Nullable private static Configuration pickConfiguration  ( AndroidFacet facet , Module module , PsiFile file ) { VirtualFile virtualFile = file . getVirtualFile ( ) ; if ( virtualFile == null ) { return null ; } VirtualFile parent = virtualFile . getParent ( ) ; if ( parent == null ) { return null ; } VirtualFile layout ; String parentName = parent . getName ( ) ; if ( ! parentName . startsWith ( FD_RES_LAYOUT ) ) { layout = pickLayoutFile ( module , facet ) ; if ( layout == null ) { return null ; } } else { layout = virtualFile ; } return facet . getConfigurationManager ( ) . getConfiguration ( layout ) ; }

Seleccione una configuración adecuada para usar para la resolución de recursos.


public MessagesMarkAsImportantQuery important  ( Boolean value ) { return unsafeParam ( "important" , value ) ; }

"VERDADERO" - para agregar una estrella (marcar como importante) "Falso" - para eliminar la estrella


private Log validate  ( String logId , String projectName ) { Log log = logRepository . findOne ( logId ) ; expect ( log , notNull ( ) ) . verify ( LOG_NOT_FOUND , logId ) ; final TestItem testItem = testItemRepository . findOne ( log . getTestItemRef ( ) ) ; String project = launchRepository . findOne ( testItem . getLaunchRef ( ) ) . getProjectRef ( ) ; expect ( project , equalTo ( projectName ) ) . verify ( FORBIDDEN_OPERATION , formattedSupplier ( "Log '{}' is not under specified project '{}'" , logId , projectName ) ) ; return log ; }

Valide el elemento de registro en existencia, disponibilidad bajo proyecto específico, etc.


public static double [ ] [ ] computeProfiles  ( Document doc , ViewerBase graphView ) { final int totalSamples = doc . getNumberOfSamples ( ) ; int totalClasses = 0 ; for ( Node v = graphView . getGraph ( ) . getFirstNode ( ) ; v != null ; v = v . getNext ( ) ) { if ( graphView . getSelected ( v ) ) { totalClasses ++ ; } } double [ ] [ ] profiles = new double [ totalSamples ] [ totalClasses ] ; int classCount = 0 ; for ( Node v = graphView . getGraph ( ) . getFirstNode ( ) ; v != null ; v = v . getNext ( ) ) { if ( graphView . getSelected ( v ) ) { int [ ] counts = ( v . getOutDegree ( ) == 0 ? graphView . getNodeData ( v ) . getSummarized ( ) : graphView . getNodeData ( v ) . getAssigned ( ) ) ; for ( int sampleCount = 0 ; sampleCount < totalSamples ; sampleCount ++ ) { profiles [ sampleCount ] [ classCount ] = counts [ sampleCount ] ; } classCount ++ ; } } for ( double [ ] profile : profiles ) { double sum = 0 ; for ( double value : profile ) sum += value ; if ( sum > 0 ) { for ( int i = 0 ; i < profile . length ; i ++ ) { profile [ i ] /= sum ; } } } return profiles ; }


public Well1024a ( int seed ) { super ( K , seed ) ; }

Crea un nuevo generador de números aleatorios usando una sola semilla INT.


static void put  ( ProcessingEnvironment env , CodeBlock . Builder block , TypeName type , String state , Element element ) throws ProcessingException { String name = element . getSimpleName ( ) . toString ( ) ; TypeName parcelableType = getTypeName ( env . getTypeUtils ( ) , element . asType ( ) ) ; if ( parcelableType . equals ( BUNDLE ) ) { block . addStatement ( "$L.putBundle($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( IBINDER ) ) { block . addStatement ( "$L.putBinder($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( BOOLEAN ) || parcelableType . equals ( BOOLEAN . box ( ) ) ) { block . addStatement ( "$L.putBoolean($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( BOOLEAN_ARRAY ) ) { block . addStatement ( "$L.putBooleanArray($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( BYTE ) || parcelableType . equals ( BYTE . box ( ) ) ) { block . addStatement ( "$L.putByte($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( BYTE_ARRAY ) ) { block . addStatement ( "$L.putByteArray($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( CHAR ) || parcelableType . equals ( CHAR . box ( ) ) ) { block . addStatement ( "$L.putChar($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( CHAR_ARRAY ) ) { block . addStatement ( "$L.putCharArray($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( CHARSEQUENCE ) ) { block . addStatement ( "$L.putCharSequence($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( CHARSEQUENCE_ARRAY ) ) { block . addStatement ( "$L.putCharSequenceArray($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( CHARSEQUENCE_ARRAYLIST ) ) { block . addStatement ( "$L.putCharSequenceArrayList($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( DOUBLE ) || parcelableType . equals ( DOUBLE . box ( ) ) ) { block . addStatement ( "$L.putDouble($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( DOUBLE_ARRAY ) ) { block . addStatement ( "$L.putDoubleArray($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( FLOAT ) || parcelableType . equals ( FLOAT . box ( ) ) ) { block . addStatement ( "$L.putFloat($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( FLOAT_ARRAY ) ) { block . addStatement ( "$L.putFloatArray($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( INT ) || parcelableType . equals ( INT . box ( ) ) ) { block . addStatement ( "$L.putInt($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( INT_ARRAY ) ) { block . addStatement ( "$L.putIntArray($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( INT_ARRAYLIST ) ) { block . addStatement ( "$L.putIntegerArrayList($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( LONG ) || parcelableType . equals ( LONG . box ( ) ) ) { block . addStatement ( "$L.putLong($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( LONG_ARRAY ) ) { block . addStatement ( "$L.putLongArray($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( PARCELABLE ) ) { block . addStatement ( "$L.putParcelable($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( PARCELABLE_ARRAY ) ) { block . addStatement ( "$L.putParcelableArray($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( PARCELABLE_ARRAYLIST ) ) { block . addStatement ( "$L.putParcelableArrayList($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( SHORT ) || parcelableType . equals ( SHORT . box ( ) ) ) { block . addStatement ( "$L.putShort($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( SHORT_ARRAY ) ) { block . addStatement ( "$L.putShortArray($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( SIZE ) ) { block . addStatement ( "$L.putSize($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( SIZEF ) ) { block . addStatement ( "$L.putSizeF($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( SPARSE_PARCELABE_ARRAY ) ) { block . addStatement ( "$L.putSparseParcelableArray($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( STRING ) ) { block . addStatement ( "$L.putString($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( STRING_ARRAY ) ) { block . addStatement ( "$L.putStringArray($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( STRING_ARRAYLIST ) ) { block . addStatement ( "$L.putStringArrayList($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else if ( parcelableType . equals ( SERIALIZABLE ) ) { block . addStatement ( "$L.putSerializable($S,target.$L)" , state , name , name ) ; elementsMap . put ( element , type ) ; } else { throw new ProcessingException ( element , "The type @%s is not supported yet" , env . getTypeUtils ( ) . asElement ( element . asType ( ) ) . getSimpleName ( ) . toString ( ) ) ; } }

Genera CODEBLOCK para devolver elementos en el paquete


public boolean isFooter  ( int position ) { return position < getItemCount ( ) && position >= getItemCount ( ) - mFootViews . size ( ) ; }


public String toString  ( cp_info constant_pool [ ] ) { CONSTANT_Utf8_info ci = ( CONSTANT_Utf8_info ) ( constant_pool [ name_index ] ) ; return ci . convert ( ) ; }

Devuelve una representación de cadena de esta entrada.


public void cascadeParamChanges  ( boolean cascade ) { this . cascadeChanges = cascade ; requestLayout ( ) ; }

Use esto para cambiar si los SetTers y los Getters se aplican a todas las vistas en este diseño, o solo a la actualmente seleccionada.


private void pruneIfNeeded  ( int neededSpace ) { if ( ( mTotalSize + neededSpace ) < mMaxCacheSizeInBytes ) { return ; } if ( VolleyLog . DEBUG ) { VolleyLog . v ( "Pruning old cache entries." ) ; } long before = mTotalSize ; int prunedFiles = 0 ; long startTime = SystemClock . elapsedRealtime ( ) ; Iterator < Map . Entry < String , CacheHeader > > iterator = mEntries . entrySet ( ) . iterator ( ) ; while ( iterator . hasNext ( ) ) { Map . Entry < String , CacheHeader > entry = iterator . next ( ) ; CacheHeader e = entry . getValue ( ) ; boolean deleted = getFileForKey ( e . key ) . delete ( ) ; if ( deleted ) { mTotalSize -= e . size ; } else { VolleyLog . d ( "Could not delete cache entry for key=%s, filename=%s" , e . key , getFilenameForKey ( e . key ) ) ; } iterator . remove ( ) ; prunedFiles ++ ; if ( ( mTotalSize + neededSpace ) < mMaxCacheSizeInBytes * HYSTERESIS_FACTOR ) { break ; } } if ( VolleyLog . DEBUG ) { VolleyLog . v ( "pruned %d files, %d bytes, %d ms" , prunedFiles , ( mTotalSize - before ) , SystemClock . elapsedRealtime ( ) - startTime ) ; } }

PRURES El caché para adaptarse a la cantidad de bytes especificados.


public ShapelessRecipe addIngredient  ( int count , MaterialData ingredient ) { return addIngredient ( count , ingredient . getItemType ( ) , ingredient . getData ( ) ) ; }

Agrega múltiplos del ingrediente especificado.


void addField  ( FieldRefNode frn , SparkField field ) { if ( fields == null ) fields = new HashMap < SparkField , FieldRefNode > ( ) ; fields . put ( field , frn ) ; }

Registra un FRN como tener este nodo como su base.


public static void broadcastPacketAndReceive  ( VisibleObject visibleObject , AionServerPacket packet ) { if ( visibleObject instanceof Player ) { sendPacket ( ( Player ) visibleObject , packet ) ; } broadcastPacket ( visibleObject , packet ) ; }

Transmisión de paquetes a todos los jugadores visibles.


@ Override public boolean equals  ( Object that ) { if ( ! ( that instanceof S2CellUnion ) ) { return false ; } S2CellUnion union = ( S2CellUnion ) that ; return this . cellIds . equals ( union . cellIds ) ; }

Devuelve verdadero si dos sindicatos celulares son idénticos.


public int writeToMessage  ( byte [ ] byteArray ) { return writeToMessage ( byteArray , 0 , byteArray . length ) ; }

Escribe datos de la matriz de bytes a este mensaje, lo que significa que en el búfer respaldan este mensaje.


public static void moveFile  ( File srcFile , File destFile ) throws IOException { if ( srcFile == null ) { throw new NullPointerException ( "Source must not be null" ) ; } if ( destFile == null ) { throw new NullPointerException ( "Destination must not be null" ) ; } if ( ! srcFile . exists ( ) ) { throw new FileNotFoundException ( "Source '" + srcFile + "' does not exist" ) ; } if ( srcFile . isDirectory ( ) ) { throw new IOException ( "Source '" + srcFile + "' is a directory" ) ; } if ( destFile . exists ( ) ) { throw new FileExistsException ( "Destination '" + destFile + "' already exists" ) ; } if ( destFile . isDirectory ( ) ) { throw new IOException ( "Destination '" + destFile + "' is a directory" ) ; } boolean rename = srcFile . renameTo ( destFile ) ; if ( ! rename ) { copyFile ( srcFile , destFile ) ; if ( ! srcFile . delete ( ) ) { FileUtils . deleteQuietly ( destFile ) ; throw new IOException ( "Failed to delete original file '" + srcFile + "' after copy to '" + destFile + "'" ) ; } } }

Mueve un archivo.<P /> Cuando el archivo de destino está en otro sistema de archivos, haga una "Copia y eliminación".


public void build  ( ) throws XmlParsingException , FileNotFoundException  { strategy . parse ( cplFile ) ; strategy . build ( ) ; }

Analiza el archivo CPL dado y llena la secuencia, el segmento y los contextos de recursos.


private List < TextPosition > createTextList  ( ) { List < TextPosition > textList = new ArrayList < TextPosition > ( ) ; Point textPosition = AppSplashScreen . getTextPosition ( ) ; textList . add ( new TextPosition ( AppSplashScreen . getVersionString ( ) , textPosition ) ) ; Point p = new Point ( ( int ) textPosition . getX ( ) , ( int ) ( textPosition . getY ( ) + AppSplashScreen . getFont ( ) . getSize2D ( ) ) ) ; String geoToolsVersionString = String . format ( "%s GeoTools %s" , Localisation . getString ( AboutDialog . class , "AboutDialog.basedOn" ) , GeoTools . getVersion ( ) . toString ( ) ) ; textList . add ( new TextPosition ( geoToolsVersionString , p ) ) ; return textList ; }


private boolean isOn  ( long flag ) { return ( options & flag ) > 0 ; }

Prueba si la bandera dada está activada.Si la bandera no es una potencia de 2 (es decir, 3) esto prueba si la combinación de banderas está activada.


public CASCDistanceCalculator ( ) throws IOException  { Process p = Runtime . getRuntime ( ) . exec ( PathToCasc ) ; try { p . waitFor ( ) ; } catch ( InterruptedException iee ) { return ; } }

Crea una nueva instancia de cascdistancalculator.


public TransformPanel ( ) { this  ( new Vector2 ( ) , 0.0 , true , null ) ; }


@ SafeVarargs public final TestSubscriber < T > assertValues  ( T ... expectedValues ) { return assertValueSequence ( Arrays . asList ( expectedValues ) ) ; }

Afirmación de los valores especificados se han recibido en el orden declarado.Los valores de almacenamiento deben estar habilitados para usar este método.


static void silentlyClose  ( Closeable closeable ) { try { if ( closeable != null ) { closeable . close ( ) ; } } catch ( IOException e ) { } }

Método de utilidad para cerrar un cierre.


protected boolean hasAttemptRemaining  ( ) { return mCurrentRetryCount <= mMaxNumRetries ; }

Devuelve VERDADERO si esta política tiene intentos restantes, falso de lo contrario.


public String name  ( ) { return theName ; }

Devuelve el nombre de este tipo de elemento.


public int deplete  ( ) { int ret = getValue ( ) ; setValue ( 0 ) ; return ret ; }


@ Override public Packet read  ( PacketBuffer buf ) { PacketSpec spec = getSpec ( buf . readInt ( ) ) ; Packet packet = new Packet ( new PacketBuilder ( this , spec ) ) ; packet . read ( buf ) ; return packet ; }


public void addArray  ( Object [ ] a ) { for ( int i = 0 ; i < a . length ; i ++ ) { add ( a [ i ] ) ; } }

Aneja todos los elementos de una matriz a este vector.Solo se agregan elementos únicos.


public static void write  ( File file , CharSequence data , Charset encoding ) throws IOException { write ( file , data , encoding , false ) ; }

Escribe una carsidence a un archivo que crea el archivo si no existe.


public int size  ( ) { return data . length ; }

Tamaño de bytes de datos de la onda excluyendo el tamaño del encabezado


public boolean isValidated  ( int row ) { return getBoolean ( row , VisualItem . VALIDATED ) ; }

Indica si la fila dada se valida actualmente.Si no, se debe ejecutar ValidateBounds () para actualizar los límites a un valor actual.


private boolean canScrollLinearly  ( int fromStackIndex ) { int count = mStacks . length ; if ( ! ( mScrollIndexOffset <= 0 && - mScrollIndexOffset <= ( count - 1 ) ) ) { return false ; } return mStacks [ fromStackIndex ^ 0x01 ] . isDisplayable ( ) ; }

Sobre la base de la posición actual, determine si vamos a asignar MScrolldistance linealmente a MrenderedScrolldistance.La lógica es, si solo hay pila, no vamos a asignar linealmente;Si estamos desplazando dos el límite de cualquiera de las pilas, no vamos a asignar linealmente;de lo contrario si


protected PhotosGetMarketUploadServerQuery groupId  ( int value ) { return unsafeParam ( "group_id" , value ) ; }


public void addln  ( String line ) { this . graph . append ( line ) . append ( "\n" ) ; }

Agrega una cadena a la fuente del gráfico (con nueva línea).


private float sizeOfBlackWhiteBlackRun  ( int fromX , int fromY , int toX , int toY ) { boolean steep = Math . abs ( toY - fromY ) > Math . abs ( toX - fromX ) ; if ( steep ) { int temp = fromX ; fromX = fromY ; fromY = temp ; temp = toX ; toX = toY ; toY = temp ; } int dx = Math . abs ( toX - fromX ) ; int dy = Math . abs ( toY - fromY ) ; int error = - dx / 2 ; int xstep = fromX < toX ? 1 : - 1 ; int ystep = fromY < toY ? 1 : - 1 ; int state = 0 ; int xLimit = toX + xstep ; for ( int x = fromX , y = fromY ; x != xLimit ; x += xstep ) { int realX = steep ? y : x ; int realY = steep ? x : y ; if ( ( state == 1 ) == image . get ( realX , realY ) ) { if ( state == 2 ) { return MathUtils . distance ( x , y , fromX , fromY ) ; } state ++ ; } error += dy ; if ( error > 0 ) { if ( y == toY ) { break ; } y += ystep ; error -= dx ; } } if ( state == 2 ) { return MathUtils . distance ( toX + xstep , toY , fromX , fromY ) ; } return Float . NaN ; }

 Este método traza una línea desde un punto en la imagen, en la dirección hacia otro punto.Comienza en una región negra, y sigue adelante hasta que encuentra blanco, luego negro, luego de nuevo blanco.Informa de la distancia desde el principio hasta este punto.

 Esto se usa al descubrir cuán ancho es un patrón de buscador, cuando el patrón del buscador puede estar sesgado o girado.


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

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


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


private void readObject  ( ObjectInputStream in ) throws IOException , ClassNotFoundException { in . defaultReadObject ( ) ; ConstrainableProxyUtil . verifyConsistentConstraints ( constraints , server , methodMappings ) ; }

Verifica que las restricciones del cliente para este proxy sean consistentes con las establecidas en el servidor subyacente Ref.


public RegisterLocalViewSpaceOperationRequest ( ) { }


public boolean isIncrementalBuild  ( ) { return incrementalBuild ; }

Este método devuelve verdadero cuando está en modo de construcción incremental.Otras clases pueden consultar esta bandera y cambiar la forma en que usan la escena, dependiendo del valor de la bandera.


protected boolean matchesExpressionTree  ( ExpNode root , ISpaceProxy space , Transaction txn , int readModifier , int max ) throws SQLException { if ( root == null ) return true ; if ( _traversalOrder != null ) { for ( int i = 0 ; i < _traversalOrder . length ; i ++ ) { ExpNode node = _traversalOrder [ i ] ; if ( i < _traversalOrder . length - 1 ) node . accept ( this , space , txn , readModifier , Integer . MAX_VALUE ) ; else node . accept ( this , space , txn , readModifier , max ) ; } return getResults ( root ) ; } Stack < ExpNode > stack = new Stack < ExpNode > ( ) ; Stack < ExpNode > stack2 = new Stack < ExpNode > ( ) ; stack . push ( root ) ; while ( ! stack . isEmpty ( ) ) { ExpNode curr = stack . pop ( ) ; if ( ! ( curr instanceof ValueNode ) ) stack2 . push ( curr ) ; if ( curr . getTemplate ( ) == null ) { if ( curr . getLeftChild ( ) != null ) stack . push ( curr . getLeftChild ( ) ) ; if ( curr . getRightChild ( ) != null ) stack . push ( curr . getRightChild ( ) ) ; } } _traversalOrder = new ExpNode [ stack2 . size ( ) ] ; int index = 0 ; while ( ! stack2 . isEmpty ( ) ) { ExpNode node = stack2 . pop ( ) ; _traversalOrder [ index ++ ] = node ; if ( stack2 . isEmpty ( ) ) node . accept ( this , space , txn , readModifier , max ) ; else node . accept ( this , space , txn , readModifier , Integer . MAX_VALUE ) ; } return getResults ( root ) ; }

Transversal El árbol de expresión binaria no recursivamente usando una pila personalizada El árbol debe atravesarse en la posposición: el padre está atravesado después de sus hijos.


protected void makeProcessDefinitionsConsistentWithPersistedVersions  ( ParsedDeployment parsedDeployment ) { for ( ProcessDefinitionEntity processDefinition : parsedDeployment . getAllProcessDefinitions ( ) ) { ProcessDefinitionEntity persistedProcessDefinition = bpmnDeploymentHelper . getPersistedInstanceOfProcessDefinition ( processDefinition ) ; if ( persistedProcessDefinition != null ) { processDefinition . setId ( persistedProcessDefinition . getId ( ) ) ; processDefinition . setVersion ( persistedProcessDefinition . getVersion ( ) ) ; processDefinition . setSuspensionState ( persistedProcessDefinition . getSuspensionState ( ) ) ; } } }

Carga la versión persistida de cada definición de proceso y establecer valores en la versión en memoria para ser consistente.


public static TransferTagValueImpl createTagForValue  ( final Object tagValue ) { TransferTagValueImpl result ; DataTagQualityImpl tagQuality = new DataTagQualityImpl ( TagQualityStatus . PROCESS_DOWN , "Process Down" ) ; Timestamp sourceTimestamp = new Timestamp ( System . currentTimeMillis ( ) ) ; Timestamp daqTimestamp = new Timestamp ( System . currentTimeMillis ( ) ) ; Timestamp serverTimestamp = new Timestamp ( System . currentTimeMillis ( ) ) ; String descr = "Test transfer tag" ; String valDesc = "Test val desc {{ \"aaa:\" \"342343\" } \n , ] }" ; result = new TransferTagValueImpl ( 1234L , tagValue , valDesc , tagQuality , TagMode . TEST , sourceTimestamp , daqTimestamp , serverTimestamp , descr ) ; result . setValueClassName ( tagValue . getClass ( ) . getName ( ) ) ; return result ; }

Método auxiliar para crear un objeto de prueba <código> transfertagvalueimpl </ code>


private static float constrain  ( float amount , float low , float high ) { return amount < low ? low : ( amount > high ? high : amount ) ; }


public Matrix timesEquals  ( double s ) { for ( int i = 0 ; i < m ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { A [ i ] [ j ] = s * A [ i ] [ j ] ; } } return this ; }

Multiplica una matriz por un escalar en su lugar, A = S * A


protected static boolean exists  ( JsonObject obj , String field ) { JsonElement element = obj . get ( field ) ; return ( element != null ) ; }


private void validateNumCores  ( ) { String numCoresStr = carbonProperties . getProperty ( CarbonCommonConstants . NUM_CORES , CarbonCommonConstants . NUM_CORES_DEFAULT_VAL ) ; try { int numCores = Integer . parseInt ( numCoresStr ) ; if ( numCores < CarbonCommonConstants . NUM_CORES_MIN_VAL || numCores > CarbonCommonConstants . NUM_CORES_MAX_VAL ) { LOGGER . info ( "The num Cores  value \"" + numCoresStr + "\" is invalid. Using the default value \"" + CarbonCommonConstants . NUM_CORES_DEFAULT_VAL ) ; carbonProperties . setProperty ( CarbonCommonConstants . NUM_CORES , CarbonCommonConstants . NUM_CORES_DEFAULT_VAL ) ; } } catch ( NumberFormatException e ) { LOGGER . info ( "The num Cores  value \"" + numCoresStr + "\" is invalid. Using the default value \"" + CarbonCommonConstants . NUM_CORES_DEFAULT_VAL ) ; carbonProperties . setProperty ( CarbonCommonConstants . NUM_CORES , CarbonCommonConstants . NUM_CORES_DEFAULT_VAL ) ; } }

Este método valida los numeros especificados.


@ deprecated public void compact  ( boolean exhaustive ) { if ( ! this . isCompact ) { int iBlockStart = 0 ; char iUntouched = 65535 ; int newSize = 0 ; char [ ] target = exhaustive ? new char [ 65536 ] : this . values ; for ( int i = 0 ; i < this . indices . length ; iBlockStart += 32 ) { this . indices [ i ] = 65535 ; boolean touched = blockTouched ( i ) ; if ( ( ! touched ) && ( iUntouched != 65535 ) ) { this . indices [ i ] = iUntouched ; } else { int jBlockStart = 0 ; for ( int j = 0 ; j < i ; jBlockStart += 32 ) { if ( ( this . hashes [ i ] == this . hashes [ j ] ) && ( arrayRegionMatches ( this . values , iBlockStart , this . values , jBlockStart , 32 ) ) ) { this . indices [ i ] = this . indices [ j ] ; } j ++ ; } if ( this . indices [ i ] == 65535 ) { int dest ; int dest ; if ( exhaustive ) { dest = FindOverlappingPosition ( iBlockStart , target , newSize ) ; } else { dest = newSize ; } int limit = dest + 32 ; if ( limit > newSize ) { for ( int j = newSize ; j < limit ; j ++ ) { target [ j ] = this . values [ ( iBlockStart + j - dest ) ] ; } newSize = limit ; } this . indices [ i ] = ( ( char ) dest ) ; if ( ! touched ) { iUntouched = ( char ) jBlockStart ; } } } i ++ ; } char [ ] result = new char [ newSize ] ; System . arraycopy ( target , 0 , result , 0 , newSize ) ; this . values = result ; this . isCompact = true ; this . hashes = null ; } }


private void initClipRectForHeader  ( Rect clipRect , RecyclerView recyclerView , View header ) { mDimensionCalculator . initMargins ( clipRect , header ) ; if ( mOrientationProvider . getOrientation ( recyclerView ) == LinearLayout . VERTICAL ) { clipRect . set ( recyclerView . getPaddingLeft ( ) , recyclerView . getPaddingTop ( ) , recyclerView . getWidth ( ) - recyclerView . getPaddingRight ( ) - clipRect . right , recyclerView . getHeight ( ) - recyclerView . getPaddingBottom ( ) ) ; } else { clipRect . set ( recyclerView . getPaddingLeft ( ) , recyclerView . getPaddingTop ( ) , recyclerView . getWidth ( ) - recyclerView . getPaddingRight ( ) , recyclerView . getHeight ( ) - recyclerView . getPaddingBottom ( ) - clipRect . bottom ) ; } }

Inicializa un recorte recorte para el encabezado en función de los márgenes del encabezado y el relleno del reciclador.FIXME: El margen actual en la actualidad en la orientación vertical y el margen inferior en la orientación horizontal se recortan para que se vean precisos, pero los encabezados no se sirven en la anchura y altura correctas, respectivamente.


public TSDataScanDir ( Path dir ) throws IOException { this ( requireNonNull ( dir ) , file_listing_ ( requireNonNull ( dir ) ) . parallelStream ( ) . map ( null ) . flatMap ( null ) . sorted ( null ) . collect ( Collectors . toList ( ) ) ) ; }

Escanee el directorio para TSDataFiles válidos.


public static final void printDefaults  ( ) { UIDefaults defaults = UIManager . getDefaults ( ) ; Enumeration < Object > keys = defaults . keys ( ) ; while ( keys . hasMoreElements ( ) ) { Object key = keys . nextElement ( ) ; System . out . println ( key + ": " + defaults . get ( key ) ) ; } }

Método de conveniencia para imprimir todas las configuraciones de UI a System.Out.


@ Deployment ( resources = { "org/activiti/engine/test/api/event/ProcessInstanceEventsTest.noEndProcess.bpmn20.xml" } ) public void testProcessCompleted_NoEnd  ( ) throws Exception  { ProcessInstance noEndProcess = this . runtimeService . startProcessInstanceByKey ( "noEndProcess" ) ; Task task = taskService . createTaskQuery ( ) . processInstanceId ( noEndProcess . getId ( ) ) . singleResult ( ) ; taskService . complete ( task . getId ( ) ) ; assertEquals ( "ActivitiEventType.PROCESS_COMPLETED was expected 1 time." , 1 , listener . filterEvents ( ActivitiEventType . PROCESS_COMPLETED ) . size ( ) ) ; }

Prueba de inicio-> Proceso de tareas de usuario en el evento Process_Completed


public CircularProgressContainerDrawable ( @ NonNull Drawable [ ] contents , @ NonNull CircularProgressDrawable progressDrawable ) { super ( buildLayers ( contents , progressDrawable ) ) ; mStrokeSize = progressDrawable . getStrokeSize ( ) ; }

Cree un funcionamiento con la lista de contenidos especificados dentro de la barra de progreso.


public static void initializeSchemas  ( Map conf , String id ) { SystemConfiguration . setProperty ( "data.schemas" , ( String ) conf . get ( StormConstants . DSCHEMA_KEY ) ) ; SystemConfiguration . setProperty ( "query.schemas" , ( String ) conf . get ( StormConstants . QSCHEMA_KEY ) ) ; try { boolean hdfs = ( boolean ) conf . get ( StormConstants . USE_HDFS ) ; if ( hdfs ) { String hdfsUri = ( String ) conf . get ( StormConstants . HDFS_URI_KEY ) ; FileSystem fs = FileSystem . get ( URI . create ( hdfsUri ) , new Configuration ( ) ) ; DataSchemaLoader . initialize ( true , fs ) ; QuerySchemaLoader . initialize ( true , fs ) ; } else { DataSchemaLoader . initialize ( ) ; QuerySchemaLoader . initialize ( ) ; } } catch ( Exception e ) { logger . error ( "Failed to initialize schema files." , e ) ; throw new RuntimeException ( e ) ; } }

Inicializar los datos y el esquema de consulta.Conf requiere valores para use_hdfs, hdfs_uri_key, dschema_key y qschema_key


@ RequestMapping ( value = "/configs" , method = RequestMethod . POST ) public JsonResponse saveConfig  ( @ RequestParam ( "appId" ) Long appId , @ RequestParam ( "name" ) String name , @ RequestParam ( "value" ) String value ) { Response < Long > saveResp = configService . save ( appId , name , value ) ; if ( ! saveResp . isSuccess ( ) ) { Logs . error ( "failed to save config(appId={}, name={}, value={}), cause: {}" , appId , name , value , saveResp . getErr ( ) ) ; return JsonResponse . notOk ( saveResp . getErr ( ) ) ; } return JsonResponse . ok ( saveResp . getData ( ) ) ; }


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


private boolean isMaintainAspectRatio  ( ) { return preferences . getBoolean ( "SplashMaintainAspectRatio" , false ) ; }

Manera más corta de verificar el valor de la preferencia de "SplashmaintaSaspectratio".


public int threshold  ( ) { return soot . PhaseOptions . getInt ( options , "threshold" ) ; }

Número máximo de campos -.Si una declaración lee / escribe más que este número de campos, no se producirá ninguna etiqueta para mantener el tamaño de las etiquetas razonables.


public void clearCustomProperty  ( String key ) { clearCustomProperties ( new String [ ] { key } ) ; }


public static SM_SYSTEM_MESSAGE STR_FORCE_INVITE_PARTY  ( String value0 , String value2 , String value1 ) { return new SM_SYSTEM_MESSAGE ( 1300968 , value0 , value2 , value1 ) ; }

Has invitado al grupo de% 0 a la alianza.El grupo% 0 tiene un total de% 1 miembros.


@ Override public void internalEntityDecl  ( String name , XMLString text , XMLString nonNormalizedText , Augmentations augs ) throws XNIException { if ( DEBUG_EVENTS ) { System . out . println ( "==>internalEntityDecl: " + name ) ; if ( DEBUG_BASEURI ) { System . out . println ( "   baseURI:" + fBaseURIStack . peek ( ) ) ; } } if ( fInternalSubset != null && ! fInDTDExternalSubset ) { fInternalSubset . append ( "<!ENTITY " ) ; if ( name . startsWith ( "%" ) ) { fInternalSubset . append ( "% " ) ; fInternalSubset . append ( name . substring ( 1 ) ) ; } else { fInternalSubset . append ( name ) ; } fInternalSubset . append ( ' ' ) ; String value = nonNormalizedText . toString ( ) ; boolean singleQuote = value . indexOf ( '\'' ) == - 1 ; fInternalSubset . append ( singleQuote ? '\'' : '"' ) ; fInternalSubset . append ( value ) ; fInternalSubset . append ( singleQuote ? '\'' : '"' ) ; fInternalSubset . append ( ">\n" ) ; } if ( name . startsWith ( "%" ) ) return ; if ( fDocumentType != null ) { NamedNodeMap entities = fDocumentType . getEntities ( ) ; EntityImpl entity = ( EntityImpl ) entities . getNamedItem ( name ) ; if ( entity == null ) { entity = ( EntityImpl ) fDocumentImpl . createEntity ( name ) ; entity . setBaseURI ( ( String ) fBaseURIStack . peek ( ) ) ; entities . setNamedItem ( entity ) ; } } if ( fDocumentTypeIndex != - 1 ) { boolean found = false ; int node = fDeferredDocumentImpl . getLastChild ( fDocumentTypeIndex , false ) ; while ( node != - 1 ) { short nodeType = fDeferredDocumentImpl . getNodeType ( node , false ) ; if ( nodeType == Node . ENTITY_NODE ) { String nodeName = fDeferredDocumentImpl . getNodeName ( node , false ) ; if ( nodeName . equals ( name ) ) { found = true ; break ; } } node = fDeferredDocumentImpl . getRealPrevSibling ( node , false ) ; } if ( ! found ) { int entityIndex = fDeferredDocumentImpl . createDeferredEntity ( name , null , null , null , ( String ) fBaseURIStack . peek ( ) ) ; fDeferredDocumentImpl . appendChild ( fDocumentTypeIndex , entityIndex ) ; } } }


private void saveWidgetValues  ( ) { IDialogSettings settings = getDialogSettings ( ) ; if ( settings != null ) { if ( showCredentials ) { String [ ] userNames = settings . getArray ( STORE_USERNAME_ID ) ; if ( userNames == null ) userNames = new String [ 0 ] ; userNames = addToHistory ( userNames , userCombo . getText ( ) ) ; settings . put ( STORE_USERNAME_ID , userNames ) ; } String [ ] hostNames = settings . getArray ( STORE_URL_ID ) ; if ( hostNames == null ) hostNames = new String [ 0 ] ; hostNames = addToHistory ( hostNames , urlCombo . getText ( ) ) ; settings . put ( STORE_URL_ID , hostNames ) ; } }

Guarda los valores del widget para la próxima vez.


public long optLong  ( String key , long defaultValue ) { try { return this . getLong ( key ) ; } catch ( Exception e ) { return defaultValue ; } }

Obtenga un valor largo opcional asociado con una tecla, o el valor predeterminado si no hay tal clave o si el valor no es un número.Si el valor es una cadena, se hará un intento para evaluarlo como un número.


public static void shuffle  ( double [ ] a ) { if ( a == null ) throw new NullPointerException ( "argument array is null" ) ; int n = a . length ; for ( int i = 0 ; i < n ; i ++ ) { int r = i + uniform ( n - i ) ; double temp = a [ i ] ; a [ i ] = a [ r ] ; a [ r ] = temp ; } }

Reorganiza los elementos de la matriz especificada en orden uniformemente aleatorio.


public boolean hideRequested  ( ) { return hideRequested ; }

Devuelve el estado de la bandera hiderequest.


public void addColumn  ( String name , Class type , Object defaultValue ) { throw new UnsupportedOperationException ( ) ; }


public static SM_SYSTEM_MESSAGE STR_UNION_ALREADY_OTHER_UNION  ( String value0 ) { return new SM_SYSTEM_MESSAGE ( 1400564 , value0 ) ; }

% 0 ya es miembro de otra liga de alianza.


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

Agrega un flujo de entrada a la solicitud.


public String toStringMultiLine  ( boolean interpolate ) { ConfigurationNodeVisitor visitor = new ToStringMultiLineVisitor ( ) ; getRootNode ( ) . visit ( visitor ) ; return visitor . toString ( ) ; }

Devuelve toda la configuración como una representación multilínea.


private void mapGUI  ( ) { this . btnRelativeLayoutTest = ( Button ) findViewById ( R . id . btnRelativeLayout ) ; this . btnRelativeLayoutTest . setOnClickListener ( btnRelativeLayoutOnClickListener ) ; this . btnLinearLayoutTest = ( Button ) findViewById ( R . id . btnLinearLayout ) ; this . btnLinearLayoutTest . setOnClickListener ( btnLinearLayoutOnClickListener ) ; this . btnFrameLayoutTest = ( Button ) findViewById ( R . id . btnFrameLayout ) ; this . btnFrameLayoutTest . setOnClickListener ( btnFrameLayoutOnClickListener ) ; }


public void storeFenceId  ( @ NonNull String fenceId ) { Set < String > setTmp = mPrefs . getStringSet ( mPrefix + FENCE_ID_SET_KEY , null ) ; HashSet < String > fenceIdSet ; if ( setTmp == null ) { fenceIdSet = new HashSet < > ( ) ; } else { fenceIdSet = new HashSet < > ( setTmp ) ; } SharedPreferences . Editor editor = mPrefs . edit ( ) ; fenceIdSet . add ( fenceId ) ; editor . putStringSet ( mPrefix + FENCE_ID_SET_KEY , fenceIdSet ) ; editor . apply ( ) ; }

Tiendas inmediatamente el ID de valla dada a la tienda.


@ Override public void processingInstruction  ( String target , XMLString data , Augmentations augs ) throws XNIException { }

Una instrucción de procesamiento.Las instrucciones de procesamiento consisten en un nombre de destino y, opcionalmente, datos de texto.Los datos solo son significativos para la aplicación.<p /> Típicamente, los datos de una instrucción de procesamiento contendrán una serie de pseudo-atributos.Estos pseudo-atributos siguen la forma de atributos de elementos, pero son <strong> no </ strong> analizados o presentados a la aplicación como otra cosa que no sea texto.La solicitud es responsable de analizar los datos.


public DiffMovingAverage ( ) { this  ( DEFAULT_SIZE ) ; }

Crea un nuevo objeto DiffMovingAvervaver en función de un tamaño de ventana predeterminado.El tamaño de la ventana es el número de los últimos valores entrantes que deben usarse para calcular el promedio de las diferencias entre ellos.


public boolean isNumericType  ( ) { return getValueType ( ) . isNumeric ( ) ; }

Indica si el tipo de valor de este elemento de datos es numérico.


public boolean isApplicable  ( ) { return true ; }

¿El comando es actualmente aplicable?Utilizado para establecer habilitar el estado de comando


@ Override protected void processPolar  ( double [ ] r , double [ ] phi ) { for ( int i = 0 ; i < phi . length ; i ++ ) { phi [ i ] = 0 ; } }


void initFromCameraParameters  ( Camera camera ) { Camera . Parameters parameters = camera . getParameters ( ) ; previewFormat = parameters . getPreviewFormat ( ) ; previewFormatString = parameters . get ( "preview-format" ) ; Log . d ( TAG , "Default preview format: " + previewFormat + '/' + previewFormatString ) ; WindowManager manager = ( WindowManager ) context . getSystemService ( Context . WINDOW_SERVICE ) ; Display display = manager . getDefaultDisplay ( ) ; screenResolution = new Point ( display . getWidth ( ) , display . getHeight ( ) ) ; Log . d ( TAG , "Screen resolution: " + screenResolution ) ; Point screenResolutionForCamera = new Point ( ) ; screenResolutionForCamera . x = screenResolution . x ; screenResolutionForCamera . y = screenResolution . y ; if ( screenResolution . x < screenResolution . y ) { screenResolutionForCamera . x = screenResolution . y ; screenResolutionForCamera . y = screenResolution . x ; } cameraResolution = getCameraResolution ( parameters , screenResolutionForCamera ) ; Log . d ( TAG , "Camera resolution: " + screenResolution ) ; }

Lee, una vez, valores de la cámara que necesitan la aplicación.


public void normalizeIndices  ( ) { Int2ObjectMap < List < CTNode > > mOrg = new Int2ObjectOpenHashMap < List < CTNode > > ( ) ; getCoIndexMap ( n_root , mOrg ) ; if ( mOrg . isEmpty ( ) ) return ; List < Entry < Integer , List < CTNode > > > ps = new ArrayList < > ( mOrg . entrySet ( ) ) ; Collections . sort ( ps , Entry . comparingByKey ( ) ) ; Int2IntMap mNew = new Int2IntOpenHashMap ( ) ; int coIndex = 1 , last , i ; boolean isAnteFound ; List < CTNode > list ; CTNode curr , ec ; for ( Entry < Integer , List < CTNode > > p : ps ) { list = p . getValue ( ) ; last = list . size ( ) - 1 ; isAnteFound = false ; for ( i = last ; i >= 0 ; i -- ) { curr = list . get ( i ) ; if ( curr . isEmptyCategoryTerminal ( ) ) { ec = curr . getTerminalList ( ) . get ( 0 ) ; if ( i == last || isAnteFound || PTBLib . isDiscontinuousConstituent ( ec ) || PTBLib . containsCoordination ( curr . getLowestCommonAncestor ( list . get ( i + 1 ) ) ) ) curr . setEmptyCategoryIndex ( - 1 ) ; else curr . setEmptyCategoryIndex ( coIndex ++ ) ; if ( isAnteFound || i > 0 ) ec . appendWordForm ( "-" + coIndex ) ; } else if ( isAnteFound ) { curr . setEmptyCategoryIndex ( - 1 ) ; } else { curr . setEmptyCategoryIndex ( coIndex ) ; mNew . put ( p . getKey ( ) . intValue ( ) , coIndex ) ; isAnteFound = true ; } } coIndex ++ ; } int [ ] lastIndex = { coIndex } ; remapGapIndices ( mNew , lastIndex , n_root ) ; }

Normaliza los índices de categoría vacíos y los índices de relación de rampa del árbol específico.


public static double chiSquare2by2  ( int k , int n , int r , int m ) { int [ ] [ ] cg = { { k , r - k } , { m - k , n - ( k + ( r - k ) + ( m - k ) ) } } ; int [ ] cgr = { r , n - r } ; int [ ] cgc = { m , n - m } ; double total = 0.0 ; for ( int i = 0 ; i < 2 ; i ++ ) { for ( int j = 0 ; j < 2 ; j ++ ) { double exp = ( double ) cgr [ i ] * cgc [ j ] / n ; total += ( cg [ i ] [ j ] - exp ) * ( cg [ i ] [ j ] - exp ) / exp ; } } return total ; }

Encuentra un valor de chi-cuadrado de 2x2.Nota: podría hacer esto más bien usando fórmula simplificada para un caso 2x2.


public void parseLabelMapFromLine  ( String labelMapAsLine ) { NexusStreamParser np = new NexusStreamParser ( new StringReader ( labelMapAsLine ) ) ; try { while ( ! np . peekMatchIgnoreCase ( ";" ) ) { String sample = np . getWordRespectCase ( ) ; np . matchIgnoreCase ( ":" ) ; String label = np . getWordRespectCase ( ) ; sample2label . put ( sample , label ) ; } } catch ( IOException e ) { } }


private static String wrapLine  ( String logContent , int maxLengthPerLine ) { assert logContent != null ; if ( logContent . isEmpty ( ) ) { return logContent ; } int currentIndex = 0 ; StringBuilder sb = new StringBuilder ( logContent . length ( ) + logContent . length ( ) / maxLengthPerLine ) ; while ( currentIndex < logContent . length ( ) ) { int currentLineLength = Math . min ( mConfig . getMaxLengthPerLine ( ) , logContent . length ( ) - currentIndex ) ; String subLine ; int newlineIndex = logContent . indexOf ( "\n" , currentIndex ) ; int thisLineEnd = currentIndex + currentLineLength ; if ( newlineIndex != - 1 && newlineIndex < thisLineEnd ) { subLine = logContent . substring ( currentIndex , newlineIndex ) ; currentIndex = newlineIndex + 1 ; } else { subLine = logContent . substring ( currentIndex , thisLineEnd ) ; currentIndex = thisLineEnd ; } sb . append ( subLine ) ; if ( currentIndex < logContent . length ( ) ) { sb . append ( "\n" ) ; } } return sb . toString ( ) ; }

Implementación de la regla de línea de envoltura suave.


public static boolean isHasSdcard  ( ) { String status = Environment . getExternalStorageState ( ) ; if ( status . equals ( Environment . MEDIA_MOUNTED ) ) { return true ; } else { return false ; } }


public void loadBasicClasses  ( ) { addReflectionTraceClasses ( ) ; for ( int i = SootClass . BODIES ; i >= SootClass . HIERARCHY ; i -- ) { for ( String name : basicclasses [ i ] ) { tryLoadClass ( name , i ) ; } } }

Cargue solo el conjunto de las necesidades de hollín de clases básicas, ignorando los especificados en la línea de comandos.No necesita usar esto y las clases de carga, aunque solo perderá tiempo.


@ RequestMapping ( value = { "/rest/v1/user" } , method = RequestMethod . GET , produces = MediaType . APPLICATION_JSON_VALUE ) @ ResponseStatus ( value = HttpStatus . OK ) public ModelAndView returnLoggedInUser  ( ) { final User loggedInUser = AppScanUtils . getLoggedInUser ( ) ; loggedInUser . setPassword ( "" ) ; return new ModelAndView ( view , AppScanConstants . JSON_RESPONSE_DATA_IDENTIFIER , loggedInUser ) ; }

Este punto final API devolverá el objeto del usuario en formato JSON.


protected int processChar  ( ) { return 0 ; }

Devuelva un valor de carácter para el método <código> lectura () </ codigo>.<P> Esta implementación devuelve cero.


public boolean isAscending  ( ) { return m_asc ; }

Indica si los valores del eje deben presentarse en orden ascendente a lo largo del eje.


public static boolean isEmpty  ( Collection < ? > collection ) { return ( collection == null || collection . isEmpty ( ) ) ; }

RETURSE <CÓDIGO> VERDADERO </ CODE> Si la colección <código> suministrada </ el código> es nula o vacía.De lo contrario, devuelva <código> FALSO </ CODE>.


public MarketAddToAlbumQuery ( VkApiClient client , UserActor actor , int ownerId , int itemId , int ... albumIds ) { super ( client , "market.addToAlbum" , OkResponse . class ) ; accessToken ( actor . getAccessToken ( ) ) ; ownerId ( ownerId ) ; itemId ( itemId ) ; albumIds ( albumIds ) ; }

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


public ElemValPair ( String name , char kind ) { this . name = new AsciiCP ( name ) ; this . kind = ( byte ) kind ; }

Nota: un ATTR de anotación está asociado con una clase <EM> Clase </ EM>, Método o campo, por lo que debe crear un nuevo VisibilityAnNotationAttr para


public static SM_SYSTEM_MESSAGE STR_EAT  ( String value0 ) { return new SM_SYSTEM_MESSAGE ( 1300385 , value0 ) ; }


public ProjectDTO toDTO  ( Project project ) { return toDTO ( project , 1 ) ; }

Convierte el proyecto aprobado a una DTO.


public LeastSquaresBuilder checker  ( final ConvergenceChecker < Evaluation > newChecker ) { this . checker = newChecker ; return this ; }


public void decode  ( int [ ] received , int twoS ) throws ReedSolomonException { GenericGFPoly poly = new GenericGFPoly ( field , received ) ; int [ ] syndromeCoefficients = new int [ twoS ] ; boolean noError = true ; for ( int i = 0 ; i < twoS ; i ++ ) { int eval = poly . evaluateAt ( field . exp ( i + field . getGeneratorBase ( ) ) ) ; syndromeCoefficients [ syndromeCoefficients . length - 1 - i ] = eval ; if ( eval != 0 ) { noError = false ; } } if ( noError ) { return ; } GenericGFPoly syndrome = new GenericGFPoly ( field , syndromeCoefficients ) ; GenericGFPoly [ ] sigmaOmega = runEuclideanAlgorithm ( field . buildMonomial ( twoS , 1 ) , syndrome , twoS ) ; GenericGFPoly sigma = sigmaOmega [ 0 ] ; GenericGFPoly omega = sigmaOmega [ 1 ] ; int [ ] errorLocations = findErrorLocations ( sigma ) ; int [ ] errorMagnitudes = findErrorMagnitudes ( omega , errorLocations ) ; for ( int i = 0 ; i < errorLocations . length ; i ++ ) { int position = received . length - 1 - field . log ( errorLocations [ i ] ) ; if ( position < 0 ) { throw new ReedSolomonException ( "Bad error location" ) ; } received [ position ] = GenericGF . addOrSubtract ( received [ position ] , errorMagnitudes [ i ] ) ; } }

Decodifica el conjunto de leordas de código recibido, que incluyen los datos de los datos y la corrección de errores.Realmente, esto significa que utiliza Reed-Solomon para detectar y corregir errores, en el lugar, en la entrada.


public BatchResponsePacket ( int [ ] result ) { _result = result ; }

Construye un nuevo paquete de respuesta por lotes utilizando la matriz Ints proporcionada.


public int length  ( ) { return fLength ; }


private void drawYAxisTicksLog  ( Graphics2D gc ) { gc . setFont ( getFont ( ChartViewer . FontKeys . YAxisFont . toString ( ) ) ) ; int x0 = leftMargin ; int y0 = getHeight ( ) - bottomMargin ; int y1 = topMargin ; double maxValue = getChartData ( ) . getRangeY ( ) . get2 ( ) . doubleValue ( ) ; double botY = 0 ; double topY = computeMaxYAxisValueLogScale ( maxValue ) ; double yFactor ; if ( topY > botY ) yFactor = ( y0 - y1 ) / ( topY - botY ) ; else yFactor = 1 ; double value = 0 ; double previousY = - 100000 ; int mantisse = 0 ; int exponent = 0 ; while ( value <= maxValue ) { if ( maxDisplayedYValue != null && value > maxDisplayedYValue ) break ; double yPos = y0 - ( value > 0 ? Math . log10 ( value ) : 0 ) * yFactor ; if ( ( mantisse <= 1 || mantisse == 5 ) && Math . abs ( yPos - previousY ) >= 20 ) { String label = "" + ( long ) value ; Dimension labelSize = Basic . getStringSize ( gc , label , gc . getFont ( ) ) . getSize ( ) ; previousY = yPos ; int x = leftMargin - ( int ) ( labelSize . getWidth ( ) + 3 ) ; int y = ( int ) ( yPos + labelSize . getHeight ( ) / 2.0 ) ; gc . drawString ( label , x , y ) ; gc . drawLine ( x0 , ( int ) Math . round ( yPos ) , x0 + 2 , ( int ) Math . round ( yPos ) ) ; } if ( mantisse < 9 ) mantisse ++ ; else { mantisse = 1 ; exponent ++ ; } value = mantisse * Math . pow ( 10 , exponent ) ; } }

Dibuja las garrapatas a lo largo del eje Y


public boolean isPrimitive  ( ) { return ! isBinaryObject ( ) && ! isCollection ( ) && ! isSymbol ( ) && ! isNull ( ) ; }

Determine si este objeto es un valor primitivo


@ Override public DocumentType createDocumentType  ( String qualifiedName , String publicID , String systemID ) { checkQName ( qualifiedName ) ; return new DocumentTypeImpl ( null , qualifiedName , publicID , systemID ) ; }

Introducido en DOM Nivel 2. <P> <P /> crea un nodo de documento vacío.


public void add  ( Predicate p , FontAction f ) { super . add ( p , f ) ; }

Agregue una regla de mapeo de fuentes a esta fontacción.VisualItems que coincidan con el predicado siempre que se le asignará el valor de fuente devuelto por el método GetFont () de Fontaction () dado.


public boolean splitSymbolizers  ( ) { return splitSymbolizers ; }

Devuelva la bandera de los simbolizadores de división.


public static void lsp2lpc  ( double lsp [ ] , double a [ ] , int m ) { int i , k , mh1 , mh2 , flag_odd ; double xx , xf , xff ; int p , q ; int a0 , a1 , a2 , b0 , b1 , b2 ; flag_odd = 0 ; if ( m % 2 == 0 ) mh1 = mh2 = m / 2 ; else { mh1 = ( m + 1 ) / 2 ; mh2 = ( m - 1 ) / 2 ; flag_odd = 1 ; } double [ ] lsp2lpc_buff = new double [ ( 5 * m + 6 ) ] ; int lsp2lpc_size = m ; p = m ; q = p + mh1 ; a0 = q + mh2 ; a1 = a0 + ( mh1 + 1 ) ; a2 = a1 + ( mh1 + 1 ) ; b0 = a2 + ( mh1 + 1 ) ; b1 = b0 + ( mh2 + 1 ) ; b2 = b1 + ( mh2 + 1 ) ; System . arraycopy ( lsp , 1 , lsp2lpc_buff , 0 , m ) ; for ( i = 0 ; i < mh1 + 1 ; i ++ ) lsp2lpc_buff [ a0 + i ] = 0.0 ; for ( i = 0 ; i < mh1 + 1 ; i ++ ) lsp2lpc_buff [ a1 + i ] = 0.0 ; for ( i = 0 ; i < mh1 + 1 ; i ++ ) lsp2lpc_buff [ a2 + i ] = 0.0 ; for ( i = 0 ; i < mh2 + 1 ; i ++ ) lsp2lpc_buff [ b0 + i ] = 0.0 ; for ( i = 0 ; i < mh2 + 1 ; i ++ ) lsp2lpc_buff [ b1 + i ] = 0.0 ; for ( i = 0 ; i < mh2 + 1 ; i ++ ) lsp2lpc_buff [ b2 + i ] = 0.0 ; for ( i = k = 0 ; i < mh1 ; i ++ , k += 2 ) lsp2lpc_buff [ p + i ] = - 2.0 * Math . cos ( lsp2lpc_buff [ k ] ) ; for ( i = k = 0 ; i < mh2 ; i ++ , k += 2 ) lsp2lpc_buff [ q + i ] = - 2.0 * Math . cos ( lsp2lpc_buff [ k + 1 ] ) ; xx = 1.0 ; xf = xff = 0.0 ; for ( k = 0 ; k <= m ; k ++ ) { if ( flag_odd == 1 ) { lsp2lpc_buff [ a0 + 0 ] = xx ; lsp2lpc_buff [ b0 + 0 ] = xx - xff ; xff = xf ; xf = xx ; } else { lsp2lpc_buff [ a0 + 0 ] = xx + xf ; lsp2lpc_buff [ b0 + 0 ] = xx - xf ; xf = xx ; } for ( i = 0 ; i < mh1 ; i ++ ) { lsp2lpc_buff [ a0 + i + 1 ] = lsp2lpc_buff [ a0 + i ] + lsp2lpc_buff [ p + i ] * lsp2lpc_buff [ a1 + i ] + lsp2lpc_buff [ a2 + i ] ; lsp2lpc_buff [ a2 + i ] = lsp2lpc_buff [ a1 + i ] ; lsp2lpc_buff [ a1 + i ] = lsp2lpc_buff [ a0 + i ] ; } for ( i = 0 ; i < mh2 ; i ++ ) { lsp2lpc_buff [ b0 + i + 1 ] = lsp2lpc_buff [ b0 + i ] + lsp2lpc_buff [ q + i ] * lsp2lpc_buff [ b1 + i ] + lsp2lpc_buff [ b2 + i ] ; lsp2lpc_buff [ b2 + i ] = lsp2lpc_buff [ b1 + i ] ; lsp2lpc_buff [ b1 + i ] = lsp2lpc_buff [ b0 + i ] ; } if ( k != 0 ) a [ k - 1 ] = - 0.5 * ( lsp2lpc_buff [ a0 + mh1 ] + lsp2lpc_buff [ b0 + mh2 ] ) ; xx = 0.0 ; } for ( i = m - 1 ; i >= 0 ; i -- ) a [ i + 1 ] = - a [ i ] ; a [ 0 ] = 1.0 ; }

lsp2lpc: Transforme LSP a LPC.LSP [1..M] -> A = LPC [0..M] A [0] = 1.0


@ Override public void write  ( byte [ ] b ) throws IOException  { }

No hace nada: salida a <código> / dev / null </ code>.


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

Identificador de una comunidad de propietario de un artículo Tenga en cuenta que la identificación de la comunidad en el parámetro 'propietario_id' debe ser un número negativo.Por ejemplo, 'propietario_id' = - 1 coincide con la comunidad [vk.com/apiclub|vk api]


private static Number createNumberFromStringValue  ( String type , String value ) throws NumberFormatException { final String suffix = value . substring ( value . length ( ) - 1 ) ; if ( "L" . equalsIgnoreCase ( suffix ) ) { return Long . valueOf ( value . substring ( 0 , value . length ( ) - 1 ) ) ; } if ( "F" . equalsIgnoreCase ( suffix ) ) { return Float . valueOf ( value . substring ( 0 , value . length ( ) - 1 ) ) ; } if ( "D" . equalsIgnoreCase ( suffix ) ) { return Double . valueOf ( value . substring ( 0 , value . length ( ) - 1 ) ) ; } try { return ( Number ) newStringConstructor ( type , value ) ; } catch ( Exception ex ) { } try { return Integer . valueOf ( value ) ; } catch ( NumberFormatException e ) { } try { return Long . valueOf ( value ) ; } catch ( NumberFormatException e1 ) { } try { return Double . valueOf ( value ) ; } catch ( NumberFormatException e2 ) { } throw new NumberFormatException ( "Cannot convert string value '" + value + "' into a numerical value" ) ; }

Intente convertir un valor de cadena en un valor numérico.


private static BitMatrix extractPureBits  ( BitMatrix image ) throws NotFoundException { int [ ] leftTopBlack = image . getTopLeftOnBit ( ) ; int [ ] rightBottomBlack = image . getBottomRightOnBit ( ) ; if ( leftTopBlack == null || rightBottomBlack == null ) { throw NotFoundException . getNotFoundInstance ( ) ; } float moduleSize = moduleSize ( leftTopBlack , image ) ; int top = leftTopBlack [ 1 ] ; int bottom = rightBottomBlack [ 1 ] ; int left = leftTopBlack [ 0 ] ; int right = rightBottomBlack [ 0 ] ; if ( left >= right || top >= bottom ) { throw NotFoundException . getNotFoundInstance ( ) ; } if ( bottom - top != right - left ) { right = left + ( bottom - top ) ; } int matrixWidth = Math . round ( ( right - left + 1 ) / moduleSize ) ; int matrixHeight = Math . round ( ( bottom - top + 1 ) / moduleSize ) ; if ( matrixWidth <= 0 || matrixHeight <= 0 ) { throw NotFoundException . getNotFoundInstance ( ) ; } if ( matrixHeight != matrixWidth ) { throw NotFoundException . getNotFoundInstance ( ) ; } int nudge = ( int ) ( moduleSize / 2.0f ) ; top += nudge ; left += nudge ; int nudgedTooFarRight = left + ( int ) ( ( matrixWidth - 1 ) * moduleSize ) - right ; if ( nudgedTooFarRight > 0 ) { if ( nudgedTooFarRight > nudge ) { throw NotFoundException . getNotFoundInstance ( ) ; } left -= nudgedTooFarRight ; } int nudgedTooFarDown = top + ( int ) ( ( matrixHeight - 1 ) * moduleSize ) - bottom ; if ( nudgedTooFarDown > 0 ) { if ( nudgedTooFarDown > nudge ) { throw NotFoundException . getNotFoundInstance ( ) ; } top -= nudgedTooFarDown ; } BitMatrix bits = new BitMatrix ( matrixWidth , matrixHeight ) ; for ( int y = 0 ; y < matrixHeight ; y ++ ) { int iOffset = top + ( int ) ( y * moduleSize ) ; for ( int x = 0 ; x < matrixWidth ; x ++ ) { if ( image . get ( left + ( int ) ( x * moduleSize ) , iOffset ) ) { bits . set ( x , y ) ; } } } return bits ; }

Este método detecta un código en una imagen "pura", es decir, imagen monocromática pura que contiene solo una imagen nootated, inserterizada, de un código, con un borde blanco a su alrededor.Este es un método especializado que funciona excepcionalmente rápido en este caso especial.


private static void extractLineSegments  ( CurveImpl curveImpl , WKTSegmentList ptList ) { for ( LineSegment lineSegment : curveImpl . asLineSegments ( ) ) { WKTPoint startPoint = new WKTPoint ( lineSegment . getStartPoint ( ) ) ; WKTPoint endPoint = new WKTPoint ( lineSegment . getEndPoint ( ) ) ; ptList . addPoint ( startPoint ) ; ptList . addPoint ( endPoint ) ; } ptList . removeIfFirstLastSame ( ) ; }


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

Método de conveniencia que se devuelve VERDADERO si este campo es público.


private static boolean isURICharacter  ( char p_char ) { return ( p_char <= '~' && ( fgLookupTable [ p_char ] & MASK_URI_CHARACTER ) != 0 ) ; }

Determine si un char es un carácter de URI (reservado o sin reservas, sin incluir '%' para octetos escapados).


public EqCommandTagException ( final String descr , final Throwable e ) { super ( descr , e ) ; }


public void switchContent  ( BaseFragment from , BaseFragment to ) { if ( currentFragment == to ) { return ; } else { currentFragment = to ; FragmentTransaction ft = fragmentManager . beginTransaction ( ) ; ft . setCustomAnimations ( R . anim . fragment_fade_in , R . anim . fragment_fade_out ) ; ft . replace ( R . id . fl_content , to ) . commit ( ) ; } invalidateOptionsMenu ( ) ; }


private double [ ] calculateDifferences  ( final double [ ] x , final double [ ] y ) { final double [ ] z = new double [ x . length ] ; for ( int i = 0 ; i < x . length ; ++ i ) { z [ i ] = y [ i ] - x [ i ] ; } return z ; }


public void eliminatePhiNodes  ( ) { sbb . preElimOpt ( ) ; sbb . eliminatePhiNodes ( ) ; sbb . postElimOpt ( ) ; setSSA ( false ) ; }

Retire los nodos PHI del cuerpo.La forma de SSA ya no es un dado una vez hecho.<p> La opción actualmente disponible es "Naive-Phi-Elimination", generalmente especificada en la fase "Shimple" (por ejemplo, -P, THIMPLE NAIVE-PHI-eliminación) que salta la eliminación del código muerto y registre la fase de asignación antes de eliminar los nodos PHI.Esto puede ser útil para comprender el efecto de los análisis.


public Txn < T > txnRead  ( ) { return txn ( null , MDB_RDONLY_TXN ) ; }

Obtener una transacción de solo lectura.


public synchronized void deleteAllTables  ( ) { List < String > tableNames = new ArrayList < String > ( tableLookup . keySet ( ) ) ; for ( String s : tableNames ) { deleteTable ( s ) ; } }

Eliminar todas las tablas de esta base de datos.


public static SM_SYSTEM_MESSAGE STR_MSG_FORCE_MATCH_ALREADY_SENT_DECLINE  ( String value0 ) { return new SM_SYSTEM_MESSAGE ( 1400242 , value0 ) ; }

Ya ha enviado un mensaje de alianza rechazado a% 0.


private static void configureSystemProperties  ( ) throws IOException  { File sandbox = new File ( getTmpDirFile ( ) , "_intellij_test_sandbox" ) ; setSandboxPath ( "idea.home.path" , new File ( sandbox , "home" ) ) ; setSandboxPath ( "idea.config.path" , new File ( sandbox , "config" ) ) ; setSandboxPath ( "idea.system.path" , new File ( sandbox , "system" ) ) ; setIfEmpty ( PlatformUtils . PLATFORM_PREFIX_KEY , "Idea" ) ; setIfEmpty ( "idea.classpath.index.enabled" , "false" ) ; PluginManagerCore . BUILD_NUMBER = readApiVersionNumber ( ) ; VfsRootAccess . allowRootAccess ( RUNFILES_PATH ) ; String platformApi = getPlatformApiPath ( ) ; if ( platformApi != null ) { VfsRootAccess . allowRootAccess ( platformApi ) ; } List < String > pluginJars = Lists . newArrayList ( ) ; try { Enumeration < URL > urls = BlazeTestSystemPropertiesRule . class . getClassLoader ( ) . getResources ( "META-INF/plugin.xml" ) ; while ( urls . hasMoreElements ( ) ) { URL url = urls . nextElement ( ) ; addArchiveFile ( url , pluginJars ) ; } } catch ( IOException e ) { System . err . println ( "Cannot find plugin.xml resources" ) ; e . printStackTrace ( ) ; } setIfEmpty ( "idea.plugins.path" , Joiner . on ( File . pathSeparator ) . join ( pluginJars ) ) ; }

Establece las propiedades del sistema necesarias para ejecutar pruebas IntelliJ a través de Blaze / Bazel.


private List < CentroidCluster < T > > chooseInitialCenters  ( final Collection < T > points ) { final List < T > pointList = Collections . unmodifiableList ( new ArrayList < T > ( points ) ) ; final int numPoints = pointList . size ( ) ; final boolean [ ] taken = new boolean [ numPoints ] ; final List < CentroidCluster < T > > resultSet = new ArrayList < CentroidCluster < T > > ( ) ; final int firstPointIndex = random . nextInt ( numPoints ) ; final T firstPoint = pointList . get ( firstPointIndex ) ; resultSet . add ( new CentroidCluster < T > ( firstPoint ) ) ; taken [ firstPointIndex ] = true ; final double [ ] minDistSquared = new double [ numPoints ] ; for ( int i = 0 ; i < numPoints ; i ++ ) { if ( i != firstPointIndex ) { double d = distance ( firstPoint , pointList . get ( i ) ) ; minDistSquared [ i ] = d * d ; } } while ( resultSet . size ( ) < k ) { double distSqSum = 0.0 ; for ( int i = 0 ; i < numPoints ; i ++ ) { if ( ! taken [ i ] ) { distSqSum += minDistSquared [ i ] ; } } final double r = random . nextDouble ( ) * distSqSum ; int nextPointIndex = - 1 ; double sum = 0.0 ; for ( int i = 0 ; i < numPoints ; i ++ ) { if ( ! taken [ i ] ) { sum += minDistSquared [ i ] ; if ( sum >= r ) { nextPointIndex = i ; break ; } } } if ( nextPointIndex == - 1 ) { for ( int i = numPoints - 1 ; i >= 0 ; i -- ) { if ( ! taken [ i ] ) { nextPointIndex = i ; break ; } } } if ( nextPointIndex >= 0 ) { final T p = pointList . get ( nextPointIndex ) ; resultSet . add ( new CentroidCluster < T > ( p ) ) ; taken [ nextPointIndex ] = true ; if ( resultSet . size ( ) < k ) { for ( int j = 0 ; j < numPoints ; j ++ ) { if ( ! taken [ j ] ) { double d = distance ( p , pointList . get ( j ) ) ; double d2 = d * d ; if ( d2 < minDistSquared [ j ] ) { minDistSquared [ j ] = d2 ; } } } } } else { break ; } } return resultSet ; }

Use k-significa ++ para elegir los centros iniciales.


public static void main  ( String [ ] args ) { CorpusPack cp = new CorpusPack ( Language . VIETNAMESE ) ; String modelFileName = cp . taggerModelFileName ( ) ; JavaSparkContext jsc = SparkContextFactory . create ( ) ; Tagger tagger = new Tagger ( jsc ) . setVerbose ( true ) ; tagger . test ( modelFileName , TaggerMode . TRAIN ) ; tagger . test ( modelFileName , TaggerMode . TAG ) ; }


protected AdsGetAdsPostsReachQuery adsIds  ( String value ) { return unsafeParam ( "ads_ids" , value ) ; }


@ Override public XSModel loadInputList  ( LSInputList is ) { final int length = is . getLength ( ) ; try { fGrammarPool . clear ( ) ; for ( int i = 0 ; i < length ; ++ i ) { fSchemaLoader . loadGrammar ( fSchemaLoader . dom2xmlInputSource ( is . item ( i ) ) ) ; } return fGrammarPool . toXSModel ( ) ; } catch ( Exception e ) { fSchemaLoader . reportDOMFatalError ( e ) ; return null ; } }

Analiza el contenido de los documentos de esquema XML especificados como una lista de <código> LSInput </ Code> s.


private void sleep  ( long millis ) { try { Thread . sleep ( millis ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } }

Método para dormir.Propósito de prueba.No hagas algo como esto !!!


public static MediaLocator createMediaLocator  ( String url ) { MediaLocator ml ; if ( url . indexOf ( ":" ) > 0 && ( ml = new MediaLocator ( url ) ) != null ) return ml ; if ( url . startsWith ( File . separator ) ) { if ( ( ml = new MediaLocator ( "file:" + url ) ) != null ) return ml ; } else { String file = "file:" + System . getProperty ( "user.dir" ) + File . separator + url ; if ( ( ml = new MediaLocator ( file ) ) != null ) return ml ; } return null ; }

Cree un localizador de medios de la ubicación dada.


public TextFieldPropertyChange ( ) { this  ( 0 ) ; }


public Set < Speaker > find  ( final Speaker speaker ) { final ArrayList < Speaker > speakers = new ArrayList < > ( ) ; speakers . addAll ( this . speakers . values ( ) ) ; CollectionUtils . filter ( speakers , null ) ; if ( ! speakers . isEmpty ( ) ) { return new HashSet < > ( speakers ) ; } return Collections . emptySet ( ) ; }

Pruebe y Fuzzy encuentra el altavoz especificado


public static SM_SYSTEM_MESSAGE STR_MSG_COMBAT_ENEMY_PARRY  ( String value0 ) { return new SM_SYSTEM_MESSAGE ( 1210225 , value0 ) ; }


public void unregister  ( String spaceName ) { try { if ( m_jmsLookupManager != null ) m_jmsLookupManager . close ( ) ; } catch ( Exception e ) { if ( _logger . isLoggable ( Level . WARNING ) ) _logger . log ( Level . WARNING , "\n\nDirectory Service: Failed to unregister space " + spaceName + " : " + e . toString ( ) , e ) ; } _registeredSpaces . remove ( spaceName ) ; }

No registre el espacio apropiado de todos los servicios de búsqueda que se registró este espacio.También no registramos todos los objetos administrados JMS.


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

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


public static String makeSafe  ( String s ) { return ( s == null ) ? "" : s ; }

Función auxiliar para hacer que las cuerdas nulas sean seguras para las comparaciones, etc.


public static SM_SYSTEM_MESSAGE STR_SKILL_ABSTATUS_SKILL_CAN_NOT_BE_TURNED_OFF_BY_TARGET  ( String value0 ) { return new SM_SYSTEM_MESSAGE ( 1300056 , value0 ) ; }

El efecto de habilidad% 0 no se puede eliminar.


public static boolean emailIsValid  ( String email ) { return EmailValidator . getInstance ( ) . isValid ( email ) ; }

Valida si una cadena de correo electrónico es válida.


public String toString  ( ) { StringBuffer buf = new StringBuffer ( "MethodDesc[" ) ; toString ( buf , true ) ; buf . append ( ']' ) ; return buf . toString ( ) ; }

Devuelve una representación de cadena de este objeto.


Construir un nuevo wapsearchviewerfilter


private static LinkedList < MaryModule > modulesRequiredForProcessing  ( MaryDataType sourceType , MaryDataType targetType , Locale locale , Voice voice , LinkedList < MaryDataType > seenTypes ) { if ( sourceType . equals ( targetType ) ) { Log . d ( Mary . LOG , "found path through modules" ) ; return new LinkedList < MaryModule > ( ) ; } List < MaryModule > candidates = null ; if ( voice != null ) candidates = voice . getPreferredModulesAcceptingType ( sourceType ) ; if ( candidates == null || candidates . isEmpty ( ) ) { candidates = get ( sourceType , locale , voice ) ; } if ( candidates == null || candidates . isEmpty ( ) ) { return null ; } for ( Iterator < MaryModule > it = candidates . iterator ( ) ; it . hasNext ( ) ; ) { MaryModule candidate = it . next ( ) ; MaryDataType outputType = candidate . outputType ( ) ; if ( ! seenTypes . contains ( outputType ) ) { seenTypes . add ( outputType ) ; Log . d ( Mary . LOG , "Module " + candidate . name ( ) + " converts " + sourceType . name ( ) + " into " + outputType + " (locale " + locale + ", voice " + voice + ")" ) ; LinkedList < MaryModule > path = modulesRequiredForProcessing ( outputType , targetType , locale , voice , seenTypes ) ; if ( path != null ) { path . addFirst ( candidate ) ; return path ; } seenTypes . removeLast ( ) ; } } return null ; }

Este método se llama recursivamente a sí mismo.Forward construye una lista de tipos vistos (a prueba) y construye hacia atrás una lista de los módulos requeridos (tras el éxito).


private static ResultPoint [ ] expandSquare  ( ResultPoint [ ] cornerPoints , float oldSide , float newSide ) { float ratio = newSide / ( 2 * oldSide ) ; float dx = cornerPoints [ 0 ] . getX ( ) - cornerPoints [ 2 ] . getX ( ) ; float dy = cornerPoints [ 0 ] . getY ( ) - cornerPoints [ 2 ] . getY ( ) ; float centerx = ( cornerPoints [ 0 ] . getX ( ) + cornerPoints [ 2 ] . getX ( ) ) / 2.0f ; float centery = ( cornerPoints [ 0 ] . getY ( ) + cornerPoints [ 2 ] . getY ( ) ) / 2.0f ; ResultPoint result0 = new ResultPoint ( centerx + ratio * dx , centery + ratio * dy ) ; ResultPoint result2 = new ResultPoint ( centerx - ratio * dx , centery - ratio * dy ) ; dx = cornerPoints [ 1 ] . getX ( ) - cornerPoints [ 3 ] . getX ( ) ; dy = cornerPoints [ 1 ] . getY ( ) - cornerPoints [ 3 ] . getY ( ) ; centerx = ( cornerPoints [ 1 ] . getX ( ) + cornerPoints [ 3 ] . getX ( ) ) / 2.0f ; centery = ( cornerPoints [ 1 ] . getY ( ) + cornerPoints [ 3 ] . getY ( ) ) / 2.0f ; ResultPoint result1 = new ResultPoint ( centerx + ratio * dx , centery + ratio * dy ) ; ResultPoint result3 = new ResultPoint ( centerx - ratio * dx , centery - ratio * dy ) ; return new ResultPoint [ ] { result0 , result1 , result2 , result3 } ; }

Amplíe el cuadrado representado por los puntos de la esquina al empujar por igual en todas las direcciones.


public static void json  ( String json ) { printer . json ( json ) ; }

Formatos del contenido de JSON e imprimiéndolo.


@ Override protected void onNewIntent  ( Intent intent ) { super . onNewIntent ( intent ) ; if ( this . appView != null ) this . appView . onNewIntent ( intent ) ; }

Llamado cuando la actividad recibe una nueva intención.


public boolean isThisParameter  ( ) { return ( o1 instanceof SootMethod && o2 . equals ( PointsToAnalysis . THIS_NODE ) ) ? true : false ; }

Decida si este par almacena el este parámetro para un método.


public IterationManager ( final int maxIterations , final Incrementor . MaxCountExceededCallback callBack ) { this . iterations = new Incrementor ( maxIterations , callBack ) ; this . listeners = new CopyOnWriteArrayList < IterationListener > ( ) ; }


public CreatePageWindow selectNthTemplate  ( int i ) { templatesList . get ( i ) . click ( ) ; return this ; }

Selecciona la plantilla de nth de la lista en CreatePageWindow


public AdsGetSuggestionsQueryWithCities ids  ( String value ) { return unsafeParam ( "ids" , value ) ; }


public Builder memoryCacheExtraOptions  ( int maxImageWidthForMemoryCache , int maxImageHeightForMemoryCache ) { this . maxImageWidthForMemoryCache = maxImageWidthForMemoryCache ; this . maxImageHeightForMemoryCache = maxImageHeightForMemoryCache ; return this ; }

Establece opciones para caché de memoria


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


public MarketEditCommentQuery message  ( String value ) { return unsafeParam ( "message" , value ) ; }

Nuevo texto de comentarios (requerido si "Anexos" no se especifican) <P> 2048 Símbolos MAX


private static String lowerCaseFirstCharacter  ( String str ) { if ( str . length ( ) == 0 ) { return str ; } return Character . toLowerCase ( str . charAt ( 0 ) ) + str . substring ( 1 ) ; }

minúscula el primer carácter de una cadena.


private void broadcastNewFile  ( Uri nativeUri ) { Intent intent = new Intent ( Intent . ACTION_MEDIA_SCANNER_SCAN_FILE , nativeUri ) ; context . sendBroadcast ( intent ) ; }

Envíe la transmisión del nuevo archivo, por lo que los archivos aparecen sobre MTP


private void createRGBImageSymbol  ( RasterSymbolizer sym , GridCoverage2D cov , WritableRaster raster ) { double dest ; List < Double > valueList = new ArrayList < Double > ( ) ; GridEnvelope2D gridRange2D = cov . getGridGeometry ( ) . getGridRange2D ( ) ; for ( int x = 0 ; x < gridRange2D . getWidth ( ) ; x ++ ) { for ( int y = 0 ; y < gridRange2D . getHeight ( ) ; y ++ ) { try { dest = raster . getSampleDouble ( x , y , 0 ) ; if ( ! valueList . contains ( dest ) ) { valueList . add ( dest ) ; } } catch ( Exception e ) { e . printStackTrace ( ) ; } } } ColorMapImpl colourMap = new ColorMapImpl ( ) ; Collections . sort ( valueList ) ; for ( Double value : valueList ) { ColorMapEntry entry = new ColorMapEntryImpl ( ) ; Literal colourExpression = ff . literal ( ColourUtils . fromColour ( ColourUtils . createRandomColour ( ) ) ) ; entry . setColor ( colourExpression ) ; entry . setQuantity ( ff . literal ( value . doubleValue ( ) ) ) ; colourMap . addColorMapEntry ( entry ) ; } colourMap . setType ( ColorMap . TYPE_VALUES ) ; sym . setColorMap ( colourMap ) ; }


public Megan5ServerConnector ( String url , String userName , String password ) { String plainCreds = userName + ":" + password ; byte [ ] plainCredsBytes = plainCreds . getBytes ( ) ; byte [ ] base64CredsBytes = Base64 . encodeBase64 ( plainCredsBytes ) ; String base64Creds = new String ( base64CredsBytes ) ; HttpHeaders headers = new HttpHeaders ( ) ; headers . add ( "Authorization" , "Basic " + base64Creds ) ; request = new HttpEntity < > ( headers ) ; restTemplate = new RestTemplate ( ) ; if ( url . endsWith ( "/" ) ) { this . url = url ; } else { this . url = url + "/" ; } }

Crear conexión y aplicar autenticación.<p />! Este método no prueba la conexión.¡Así que las cosas todavía pueden salir mal más tarde!


public static Bitmap decodeSampledBitmapFromResource  ( Resources res , int resId , int reqWidth , int reqHeight , ImageCache cache ) { final BitmapFactory . Options options = new BitmapFactory . Options ( ) ; options . inJustDecodeBounds = true ; BitmapFactory . decodeResource ( res , resId , options ) ; options . inSampleSize = calculateInSampleSize ( options , reqWidth , reqHeight ) ; if ( Utils . hasHoneycomb ( ) ) { addInBitmapOptions ( options , cache ) ; } options . inJustDecodeBounds = false ; return BitmapFactory . decodeResource ( res , resId , options ) ; }

Decodifique y muestra un mapa de bits de recursos a la anchura y altura solicitadas.


private void handleRegisterRequest  ( Intent intent ) { if ( ! isChromeBeingUsed ( ) ) { cancelRepeatingAlarm ( ) ; return ; } long currentTimestamp = getBackoffScheduler ( ) . getCurrentTime ( ) ; boolean isTooOld = hasRequest ( ) && mCurrentRequest . getAgeInMilliseconds ( currentTimestamp ) >= MS_BETWEEN_REQUESTS ; boolean isOverdue = ! hasRequest ( ) && currentTimestamp >= mTimestampForNewRequest ; if ( isTooOld || isOverdue ) { registerNewRequest ( currentTimestamp ) ; } if ( hasRequest ( ) ) { startService ( createPostRequestIntent ( this ) ) ; } }

Determina si se debe generar una nueva solicitud.Las nuevas solicitudes solo se generan si el tiempo suficiente ha pasado entre ahora y la última vez que se generó una solicitud.


public static int v  ( Object tag , String msg ) { return isPrint ? android . util . Log . v ( tag . getClass ( ) . getSimpleName ( ) , msg ) : - 1 ; }


public boolean isFullyZoomedOut  ( ) { return mViewPortHandler . isFullyZoomedOut ( ) ; }

Si el gráfico está completamente alejado, devuelve VERDADERO


public void cleanPatch  ( ) { if ( patchDirectory == null ) { return ; } if ( isTinkerLoaded ( ) ) { TinkerLog . e ( TAG , "it is not safety to clean patch when tinker is loaded, you should kill all your process after clean!" ) ; } SharePatchFileUtil . deleteDir ( patchDirectory ) ; }


@ Override public void vendorOptionsUpdated  ( List < VersionData > vendorOptionVersionsList ) { }


public AppsSendRequestQuery ( VkApiClient client , UserActor actor , int userId ) { super ( client , "apps.sendRequest" , Integer . class ) ; accessToken ( actor . getAccessToken ( ) ) ; userId ( userId ) ; }

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


public static Map < String , Object > cancelOrderItem  ( DispatchContext ctx , Map < String , ? extends Object > context ) { LocalDispatcher dispatcher = ctx . getDispatcher ( ) ; Delegator delegator = ctx . getDelegator ( ) ; Locale locale = ( Locale ) context . get ( "locale" ) ; GenericValue userLogin = ( GenericValue ) context . get ( "userLogin" ) ; BigDecimal cancelQuantity = ( BigDecimal ) context . get ( "cancelQuantity" ) ; String orderId = ( String ) context . get ( "orderId" ) ; String orderItemSeqId = ( String ) context . get ( "orderItemSeqId" ) ; String shipGroupSeqId = ( String ) context . get ( "shipGroupSeqId" ) ; Map < String , String > itemReasonMap = UtilGenerics . checkMap ( context . get ( "itemReasonMap" ) ) ; Map < String , String > itemCommentMap = UtilGenerics . checkMap ( context . get ( "itemCommentMap" ) ) ; Map < String , String > itemQuantityMap = UtilGenerics . checkMap ( context . get ( "itemQtyMap" ) ) ; if ( ( cancelQuantity == null ) && UtilValidate . isNotEmpty ( itemQuantityMap ) ) { String key = orderItemSeqId + ":" + shipGroupSeqId ; if ( UtilValidate . isNotEmpty ( itemQuantityMap . get ( key ) ) ) { cancelQuantity = new BigDecimal ( itemQuantityMap . get ( key ) ) ; } } String itemMsgInfo = orderId + " / " + orderItemSeqId + " / " + shipGroupSeqId ; Security security = ctx . getSecurity ( ) ; boolean hasPermission = OrderServices . hasPermission ( orderId , userLogin , "UPDATE" , security , delegator ) ; if ( ! hasPermission ) { return ServiceUtil . returnError ( UtilProperties . getMessage ( resource_error , "OrderYouDoNotHavePermissionToChangeThisOrdersStatus" , locale ) ) ; } Map < String , String > fields = UtilMisc . < String , String > toMap ( "orderId" , orderId ) ; if ( orderItemSeqId != null ) { fields . put ( "orderItemSeqId" , orderItemSeqId ) ; } if ( shipGroupSeqId != null ) { fields . put ( "shipGroupSeqId" , shipGroupSeqId ) ; } OrderReadHelper orh = new OrderReadHelper ( delegator , orderId ) ; List < GenericValue > orderItemShipGroupAssocs = null ; try { orderItemShipGroupAssocs = EntityQuery . use ( delegator ) . from ( "OrderItemShipGroupAssoc" ) . where ( fields ) . queryList ( ) ; } catch ( GenericEntityException e ) { Debug . logError ( e , module ) ; return ServiceUtil . returnError ( UtilProperties . getMessage ( resource_error , "OrderErrorCannotGetOrderItemAssocEntity" , UtilMisc . toMap ( "itemMsgInfo" , itemMsgInfo ) , locale ) ) ; } if ( orderItemShipGroupAssocs != null ) { for ( GenericValue orderItemShipGroupAssoc : orderItemShipGroupAssocs ) { GenericValue orderItem = null ; String itemStatus = "ITEM_CANCELLED" ; try { orderItem = orderItemShipGroupAssoc . getRelatedOne ( "OrderItem" , false ) ; } catch ( GenericEntityException e ) { Debug . logError ( e , module ) ; } if ( orderItem == null ) { return ServiceUtil . returnError ( UtilProperties . getMessage ( resource_error , "OrderErrorCannotCancelItemItemNotFound" , UtilMisc . toMap ( "itemMsgInfo" , itemMsgInfo ) , locale ) ) ; } BigDecimal aisgaCancelQuantity = orderItemShipGroupAssoc . getBigDecimal ( "cancelQuantity" ) ; if ( aisgaCancelQuantity == null ) { aisgaCancelQuantity = BigDecimal . ZERO ; } BigDecimal availableQuantity = orderItemShipGroupAssoc . getBigDecimal ( "quantity" ) . subtract ( aisgaCancelQuantity ) ; BigDecimal itemCancelQuantity = orderItem . getBigDecimal ( "cancelQuantity" ) ; if ( itemCancelQuantity == null ) { itemCancelQuantity = BigDecimal . ZERO ; } BigDecimal itemQuantity = orderItem . getBigDecimal ( "quantity" ) . subtract ( itemCancelQuantity ) ; if ( availableQuantity == null ) availableQuantity = BigDecimal . ZERO ; if ( itemQuantity == null ) itemQuantity = BigDecimal . ZERO ; if ( "PURCHASE_ORDER" . equals ( orh . getOrderTypeId ( ) ) ) { BigDecimal receivedQty = orh . getItemReceivedQuantity ( orderItem ) ; if ( receivedQty . compareTo ( BigDecimal . ZERO ) > 0 ) itemStatus = "ITEM_COMPLETED" ; itemQuantity = itemQuantity . subtract ( receivedQty ) ; } else { BigDecimal shippedQty = orh . getItemShippedQuantity ( orderItem ) ; if ( shippedQty . compareTo ( BigDecimal . ZERO ) > 0 ) itemStatus = "ITEM_COMPLETED" ; itemQuantity = itemQuantity . subtract ( shippedQty ) ; } BigDecimal thisCancelQty = null ; if ( cancelQuantity != null ) { thisCancelQty = cancelQuantity ; } else { thisCancelQty = itemQuantity ; } if ( availableQuantity . compareTo ( thisCancelQty ) >= 0 ) { if ( availableQuantity . compareTo ( BigDecimal . ZERO ) == 0 ) { continue ; } orderItem . set ( "cancelQuantity" , itemCancelQuantity . add ( thisCancelQty ) ) ; orderItemShipGroupAssoc . set ( "cancelQuantity" , aisgaCancelQuantity . add ( thisCancelQty ) ) ; try { List < GenericValue > toStore = UtilMisc . toList ( orderItem , orderItemShipGroupAssoc ) ; delegator . storeAll ( toStore ) ; } catch ( GenericEntityException e ) { Debug . logError ( e , module ) ; return ServiceUtil . returnError ( UtilProperties . getMessage ( resource_error , "OrderUnableToSetCancelQuantity" , UtilMisc . toMap ( "itemMsgInfo" , itemMsgInfo ) , locale ) ) ; } Map < String , Object > localCtx = UtilMisc . toMap ( "userLogin" , userLogin , "orderId" , orderItem . getString ( "orderId" ) , "orderItemSeqId" , orderItem . getString ( "orderItemSeqId" ) , "shipGroupSeqId" , orderItemShipGroupAssoc . getString ( "shipGroupSeqId" ) ) ; if ( availableQuantity . compareTo ( thisCancelQty ) == 0 ) { try { dispatcher . runSync ( "deleteOrderItemShipGroupAssoc" , localCtx ) ; } catch ( GenericServiceException e ) { Debug . logError ( e , module ) ; return ServiceUtil . returnError ( e . getMessage ( ) ) ; } } if ( ! "Y" . equals ( orderItem . getString ( "isPromo" ) ) ) { String reasonEnumId = null ; String changeComments = null ; if ( UtilValidate . isNotEmpty ( itemReasonMap ) ) { reasonEnumId = itemReasonMap . get ( orderItem . getString ( "orderItemSeqId" ) ) ; } if ( UtilValidate . isNotEmpty ( itemCommentMap ) ) { changeComments = itemCommentMap . get ( orderItem . getString ( "orderItemSeqId" ) ) ; } Map < String , Object > serviceCtx = FastMap . newInstance ( ) ; serviceCtx . put ( "orderId" , orderItem . getString ( "orderId" ) ) ; serviceCtx . put ( "orderItemSeqId" , orderItem . getString ( "orderItemSeqId" ) ) ; serviceCtx . put ( "cancelQuantity" , thisCancelQty ) ; serviceCtx . put ( "changeTypeEnumId" , "ODR_ITM_CANCEL" ) ; serviceCtx . put ( "reasonEnumId" , reasonEnumId ) ; serviceCtx . put ( "changeComments" , changeComments ) ; serviceCtx . put ( "userLogin" , userLogin ) ; Map < String , Object > resp = null ; try { resp = dispatcher . runSync ( "createOrderItemChange" , serviceCtx ) ; } catch ( GenericServiceException e ) { Debug . logError ( e , module ) ; return ServiceUtil . returnError ( e . getMessage ( ) ) ; } if ( ServiceUtil . isError ( resp ) ) { return ServiceUtil . returnError ( ( String ) resp . get ( ModelService . ERROR_MESSAGE ) ) ; } } try { BigDecimal quantity = thisCancelQty . setScale ( 1 , orderRounding ) ; String cancelledItemToOrder = UtilProperties . getMessage ( resource , "OrderCancelledItemToOrder" , locale ) ; dispatcher . runSync ( "createOrderNote" , UtilMisc . < String , Object > toMap ( "orderId" , orderId , "note" , cancelledItemToOrder + orderItem . getString ( "productId" ) + " (" + quantity + ")" , "internalNote" , "Y" , "userLogin" , userLogin ) ) ; } catch ( GenericServiceException e ) { Debug . logError ( e , module ) ; } if ( thisCancelQty . compareTo ( itemQuantity ) >= 0 ) { if ( "ITEM_COMPLETED" . equals ( itemStatus ) && "SALES_ORDER" . equals ( orh . getOrderTypeId ( ) ) ) { Map < String , Object > cancelOrderItemInvResCtx = UtilMisc . toMap ( "orderId" , orderId , "orderItemSeqId" , orderItem . getString ( "orderItemSeqId" ) , "shipGroupSeqId" , shipGroupSeqId , "cancelQuantity" , thisCancelQty , "userLogin" , userLogin ) ; try { dispatcher . runSyncIgnore ( "cancelOrderItemInvResQty" , cancelOrderItemInvResCtx ) ; } catch ( GenericServiceException e ) { Debug . logError ( e , module ) ; return ServiceUtil . returnError ( UtilProperties . getMessage ( resource_error , "OrderUnableToUpdateInventoryReservations" , UtilMisc . toMap ( "itemMsgInfo" , itemMsgInfo ) , locale ) ) ; } } Map < String , Object > statusCtx = UtilMisc . < String , Object > toMap ( "orderId" , orderId , "orderItemSeqId" , orderItem . getString ( "orderItemSeqId" ) , "statusId" , itemStatus , "userLogin" , userLogin ) ; try { dispatcher . runSyncIgnore ( "changeOrderItemStatus" , statusCtx ) ; } catch ( GenericServiceException e ) { Debug . logError ( e , module ) ; return ServiceUtil . returnError ( UtilProperties . getMessage ( resource_error , "OrderUnableToCancelOrderLine" , UtilMisc . toMap ( "itemMsgInfo" , itemMsgInfo ) , locale ) ) ; } } else { Map < String , Object > invCtx = UtilMisc . < String , Object > toMap ( "orderId" , orderId , "orderItemSeqId" , orderItem . getString ( "orderItemSeqId" ) , "shipGroupSeqId" , shipGroupSeqId , "cancelQuantity" , thisCancelQty , "userLogin" , userLogin ) ; try { dispatcher . runSyncIgnore ( "cancelOrderItemInvResQty" , invCtx ) ; } catch ( GenericServiceException e ) { Debug . logError ( e , module ) ; return ServiceUtil . returnError ( UtilProperties . getMessage ( resource_error , "OrderUnableToUpdateInventoryReservations" , UtilMisc . toMap ( "itemMsgInfo" , itemMsgInfo ) , locale ) ) ; } } } else { return ServiceUtil . returnError ( UtilProperties . getMessage ( resource_error , "OrderInvalidCancelQuantityCannotCancel" , UtilMisc . toMap ( "thisCancelQty" , thisCancelQty ) , locale ) ) ; } } } else { return ServiceUtil . returnError ( UtilProperties . getMessage ( resource_error , "OrderErrorCannotCancelItemItemNotFound" , UtilMisc . toMap ( "itemMsgInfo" , itemMsgInfo ) , locale ) ) ; } return ServiceUtil . returnSuccess ( UtilProperties . getMessage ( resource , "OrderOrderItemCancelled" , locale ) ) ; }

Servicio para cancelar una orden de artículo Cantidad


public void destroyApplet  ( ) { checkApplet ( ) ; logInfo ( LogArea . CONFIG , "destroyApplet() --> %s.destroy()" , applet . getClass ( ) . getName ( ) ) ; applet . destroy ( ) ; }

Llame a este método para destruir el applet de su clase de lanzador <código> myappletlauncher.Destroy () </ Code> Método.


public static double [ ] scaleArray  ( double [ ] f , double d ) { for ( int i = 0 ; i < f . length ; i ++ ) { f [ i ] *= d ; } return f ; }

Multiplica cada componente en la matriz real dada por el número real dado.El cambio se realiza en su lugar.


private void readObject  ( ObjectInputStream in ) throws IOException , ClassNotFoundException { in . defaultReadObject ( ) ; try { initFromName ( getName ( ) ) ; } catch ( RuntimeException e ) { if ( e instanceof NullPointerException || e instanceof IllegalArgumentException ) { InvalidObjectException ee = new InvalidObjectException ( e . getMessage ( ) ) ; ee . initCause ( e ) ; throw ee ; } throw e ; } }

Reconstituye los permisos contenidos en función de la información en el nombre de destino.


public static LinearRing createLinearRingFromJson  ( JsonNode json ) { Coordinate [ ] coords = new Coordinate [ MapUtils . getNonEmptyNodes ( json ) ] ; for ( int i = 0 ; i < json . size ( ) ; i ++ ) { JsonNode node = json . get ( i ) ; if ( MapUtils . nodeIsNonEmpty ( node ) ) { coords [ i ] = createCoordinateFromJson ( node ) ; } } return FACTORY . createLinearRing ( coords ) ; }

Cree un anillo lineal geométrico geométrico de las coordenadas en JSON.


public List < Element > initSimpleFields  ( final Object pojo , final Element element ) throws NoSuchFieldException , IllegalAccessException , NoSimpleValueParseException { List < Element > complexElements = new ArrayList < Element > ( ) ; NamedNodeMap attributes = element . getAttributes ( ) ; for ( int i = 0 ; i < attributes . getLength ( ) ; i ++ ) { Attr attribute = ( Attr ) attributes . item ( i ) ; String attributeName = attribute . getNodeName ( ) ; if ( ! attributeName . startsWith ( XMLConstants . XMLNS_ATTRIBUTE ) && ! attributeName . startsWith ( "xsi" ) ) { setSimpleFieldForTag ( pojo , attributeName , attribute . getNodeValue ( ) ) ; } } NodeList children = element . getChildNodes ( ) ; for ( int i = 0 ; i < children . getLength ( ) ; i ++ ) { Node node = children . item ( i ) ; if ( node . getNodeType ( ) == Node . ELEMENT_NODE ) { Element child = ( Element ) node ; if ( child . hasAttributes ( ) || ( child . hasChildNodes ( ) && child . getChildNodes ( ) . getLength ( ) > 1 || child . getChildNodes ( ) . item ( 0 ) . getNodeType ( ) != Node . TEXT_NODE ) ) { complexElements . add ( child ) ; } else { setSimpleFieldForTag ( pojo , child . getTagName ( ) , child . getTextContent ( ) ) ; } } } return complexElements ; }

Inicializa los campos simples de un POJO correspondiente a los nombres que coinciden en el XML.


public double put  ( final int key , final double value ) { int index = findInsertionIndex ( key ) ; double previous = missingEntries ; boolean newMapping = true ; if ( index < 0 ) { index = changeIndexSign ( index ) ; previous = values [ index ] ; newMapping = false ; } keys [ index ] = key ; states [ index ] = FULL ; values [ index ] = value ; if ( newMapping ) { ++ size ; if ( shouldGrowTable ( ) ) { growTable ( ) ; } ++ count ; } return previous ; }

Poner un valor asociado con una llave en el mapa.


@ Override protected void readImpl  ( ) { int et ; et = readC ( ) ; emotionType = EmotionType . getEmotionTypeById ( et ) ; switch ( emotionType ) { case SELECT_TARGET : case JUMP : case SIT : case STAND : case LAND_FLYTELEPORT : case FLY : case LAND : case DIE : case END_DUEL : case WALK : case RUN : case OPEN_DOOR : case CLOSE_DOOR : case POWERSHARD_ON : case POWERSHARD_OFF : case ATTACKMODE : case ATTACKMODE2 : case NEUTRALMODE : case NEUTRALMODE2 : case START_SPRINT : case END_SPRINT : case WINDSTREAM_STRAFE : break ; case EMOTE : emotion = readH ( ) ; targetObjectId = readD ( ) ; break ; case CHAIR_SIT : case CHAIR_UP : x = readF ( ) ; y = readF ( ) ; z = readF ( ) ; heading = ( byte ) readC ( ) ; break ; default : log . error ( "Unknown emotion type? 0x" + Integer . toHexString ( et ) . toUpperCase ( ) ) ; break ; } }


@ Subscribe ( threadMode = ThreadMode . MAIN ) public void onEvent  ( ClearMapEvent event ) { nianticManager . cancelPendingSearches ( ) ; clearMarkers ( ) ; MarkerRefreshController . getInstance ( ) . clear ( ) ; }

Llamado cuando se publica un ClearMapevent en el autobús.Publicado cuando el usuario quiere eliminar el mapa de cualquier Pokemon o Marker.


static void schedule  ( Activity a ) { getInstance ( ) . _schedule ( a , a . getStartTime ( ) ) ; }


public static ToolbarTapTarget forToolbarMenuItem  ( Toolbar toolbar , @ IdRes int menuItemId , CharSequence title ) { return forToolbarMenuItem ( toolbar , menuItemId , title , null ) ; }

Devuelva un destino TOP para el elemento del menú de la barra de herramientas dada


public boolean isEvictionPermissionIndicator  ( ) { return _evictionIndicator ; }

Es cierto si este objeto es un indicador de desalojo.Los bloqueos regulares esperarán hasta que se realice el desalojo, el desalojo no se llevará a cabo si el objeto está bloqueado


public static DateTimeUnit fromJodaDateTime  ( DateTime dateTime , boolean iso8601 ) { DateTimeUnit dateTimeUnit = new DateTimeUnit ( iso8601 ) ; dateTimeUnit . setDate ( dateTime . getYear ( ) , dateTime . getMonthOfYear ( ) , dateTime . getDayOfMonth ( ) ) ; dateTimeUnit . setDayOfWeek ( dateTime . getDayOfWeek ( ) ) ; dateTimeUnit . setTime ( dateTime . getHourOfDay ( ) , dateTime . getMinuteOfHour ( ) , dateTime . getSecondOfMinute ( ) , dateTime . getMillisOfSecond ( ) ) ; dateTimeUnit . setTimeZone ( dateTime . getZone ( ) . toTimeZone ( ) ) ; return dateTimeUnit ; }

Convierte de JODA-Time DateTime a DateUnit


private AnimationUtil ( ) { throw new Error ( "Do not need instantiate!" ) ; }


private boolean isVisible  ( SootClass from , SootMethod m ) { from . checkLevel ( SootClass . HIERARCHY ) ; if ( m . isPublic ( ) ) return true ; if ( m . isPrivate ( ) ) { return from . equals ( m . getDeclaringClass ( ) ) ; } if ( m . isProtected ( ) ) { return canStoreClass ( from , m . getDeclaringClass ( ) ) ; } return from . getJavaPackageName ( ) . equals ( m . getDeclaringClass ( ) . getJavaPackageName ( ) ) ; }

Devuelve VERDADERO si el método M es visible desde el código en la clase.