public ItemCursor queryItems  ( ) { return mHelper . queryItems ( ) ; }


public static boolean isLocal  ( Value val ) { return ( getEquivalentValueRoot ( val ) instanceof Local ) ; }

Devuelve VERDADERO, si <CÓDIGO> VAL </ CODE> es un local.


public static void main  ( String [ ] args ) { final DeploymentEventDTO build = createTestDeploymentEvent ( ) ; send ( build , ElasticsearchClient . DEPLOYMENT ) ; }

Java Main para probar eventos de creación en Elasticsearch.Establezca el siguiente VARS para apuntar a una ES local que se ejecuta en OpenShift Pipeline_elasticsearch_host = elasticsearch.vagrant.f8 elasticsearch_service_port = 80


public NotFiniteNumberException ( Number wrong , Object ... args ) { this ( LocalizedFormats . NOT_FINITE_NUMBER , wrong , args ) ; }


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

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


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

[% Skillcaster] ha infligido% de daño NUM0 en usted mediante el uso de [% de habilidad].


<Strong> Atención: </ strong> Esta clase no está destinada a crear objetos de él.


public void clearTransaction  ( ) { modifiedConcepts . clear ( ) ; modifiedCastings . clear ( ) ; modifiedResources . clear ( ) ; }

Elimina todos los conceptos del rastreador de transacciones.


public void removeACL  ( Collection < String > listIPs , int from , int to ) { AmazonEC2 client = null ; try { client = getEc2Client ( ) ; List < IpPermission > ipPermissions = new ArrayList < IpPermission > ( ) ; ipPermissions . add ( new IpPermission ( ) . withFromPort ( from ) . withIpProtocol ( "tcp" ) . withIpRanges ( listIPs ) . withToPort ( to ) ) ; if ( this . insEnvIdentity . isClassic ( ) ) { client . revokeSecurityGroupIngress ( new RevokeSecurityGroupIngressRequest ( config . getACLGroupName ( ) , ipPermissions ) ) ; logger . info ( "Done removing from ACL within classic env for running instance: " + StringUtils . join ( listIPs , "," ) ) ; } else { RevokeSecurityGroupIngressRequest req = new RevokeSecurityGroupIngressRequest ( ) ; req . withGroupId ( getVpcGroupId ( ) ) ; client . revokeSecurityGroupIngress ( req . withIpPermissions ( ipPermissions ) ) ; logger . info ( "Done removing from ACL within vpc env for running instance: " + StringUtils . join ( listIPs , "," ) ) ; } } finally { if ( client != null ) client . shutdown ( ) ; } }


public StackScroller ( Context context ) { mFlywheel = true ; mScrollerX = new SplineStackScroller ( context ) ; mScrollerY = new SplineStackScroller ( context ) ; initContants ( ) ; }

Crea un stackscroller con un interpolador de desplazamiento de fluidos viscoso y volante.


@ Override public void populate  ( List < DataFlavor > dataFlavourList , List < DataFlavor > destinationFolderList , List < DataFlavor > destinationGeoServerList ) { dataFlavourList . add ( FILE_DATAITEM_FLAVOR ) ; dataFlavourList . add ( DataFlavourManager . FOLDER_DATAITEM_FLAVOR ) ; dataFlavourList . add ( GEOSERVER_STYLE_DATAITEM_FLAVOUR ) ; dataFlavourList . add ( GEOSERVER_LAYER_DATAITEM_FLAVOUR ) ; dataFlavourList . add ( GEOSERVER_DATAITEM_FLAVOUR ) ; dataFlavourList . add ( GEOSERVER_OVERALL_DATAITEM_FLAVOUR ) ; destinationFolderList . add ( FILE_DATAITEM_FLAVOR ) ; destinationFolderList . add ( GEOSERVER_STYLE_DATAITEM_FLAVOUR ) ; destinationGeoServerList . add ( FILE_DATAITEM_FLAVOR ) ; destinationGeoServerList . add ( GEOSERVER_STYLE_DATAITEM_FLAVOUR ) ; }


public void checkDataSource  ( Map < String , ModelEntity > modelEntities , List < String > messages , boolean addMissing ) throws GenericEntityException { genericDAO . checkDb ( modelEntities , messages , addMissing ) ; }

Verifique la fuente de datos para asegurarse de que las definiciones de entidad sean correctas, opcionalmente agregando entidades o campos faltantes en el servidor


public void writeBytes  ( byte [ ] value , int offset , int length ) throws JMSException { initializeWriting ( ) ; try { this . dataOut . write ( _BYTES ) ; this . dataOut . writeInt ( length ) ; this . dataOut . write ( value , offset , length ) ; } catch ( IOException ioe ) { raise ( ioe ) ; } }

Escribe una parte de una matriz de bytes como un campo de matriz de bytes al mensaje de la transmisión.<P /> <P> La parte de una parte de la matriz de bytes <Código> Valor </ Code> está escrito en el mensaje como un campo de matriz de bytes.Los campos de matriz de bytes escritos consecutivamente se tratan como dos campos distintos cuando se leen los campos.


private static boolean possiblyValidListLiteral  ( PsiElement element ) { if ( element instanceof ListLiteral || element instanceof GlobExpression ) { return true ; } if ( element instanceof LiteralExpression ) { return false ; } if ( element instanceof LoadStatement || element instanceof FunctionStatement ) { return false ; } return true ; }

Devuelve False IFF Sabemos con certeza de que el elemento no puede resolverse a una lista literal.


@ Nullable public static String readTextFromDisk  ( @ NotNull File file , boolean warnIfNotExists ) { assert file . isAbsolute ( ) ; try { return Files . toString ( file , Charsets . UTF_8 ) ; } catch ( IOException e ) { if ( warnIfNotExists ) { LOG . warn ( e ) ; } return null ; } }


@ Override public void removeRaster  ( Symbolizer symbolizer ) { }


public CropImageOptions ( ) { DisplayMetrics dm = Resources . getSystem ( ) . getDisplayMetrics ( ) ; cropShape = CropImageView . CropShape . RECTANGLE ; snapRadius = TypedValue . applyDimension ( TypedValue . COMPLEX_UNIT_DIP , 3 , dm ) ; touchRadius = TypedValue . applyDimension ( TypedValue . COMPLEX_UNIT_DIP , 24 , dm ) ; guidelines = CropImageView . Guidelines . ON_TOUCH ; scaleType = CropImageView . ScaleType . FIT_CENTER ; showCropOverlay = true ; showProgressBar = true ; autoZoomEnabled = true ; maxZoom = 4 ; initialCropWindowPaddingRatio = 0.1f ; fixAspectRatio = false ; aspectRatioX = 1 ; aspectRatioY = 1 ; borderLineThickness = TypedValue . applyDimension ( TypedValue . COMPLEX_UNIT_DIP , 3 , dm ) ; borderLineColor = Color . argb ( 170 , 255 , 255 , 255 ) ; borderCornerThickness = TypedValue . applyDimension ( TypedValue . COMPLEX_UNIT_DIP , 2 , dm ) ; borderCornerOffset = TypedValue . applyDimension ( TypedValue . COMPLEX_UNIT_DIP , 5 , dm ) ; borderCornerLength = TypedValue . applyDimension ( TypedValue . COMPLEX_UNIT_DIP , 14 , dm ) ; borderCornerColor = Color . WHITE ; guidelinesThickness = TypedValue . applyDimension ( TypedValue . COMPLEX_UNIT_DIP , 1 , dm ) ; guidelinesColor = Color . argb ( 170 , 255 , 255 , 255 ) ; backgroundColor = Color . argb ( 119 , 0 , 0 , 0 ) ; minCropWindowWidth = ( int ) TypedValue . applyDimension ( TypedValue . COMPLEX_UNIT_DIP , 42 , dm ) ; minCropWindowHeight = ( int ) TypedValue . applyDimension ( TypedValue . COMPLEX_UNIT_DIP , 42 , dm ) ; minCropResultWidth = 40 ; minCropResultHeight = 40 ; maxCropResultWidth = 99999 ; maxCropResultHeight = 99999 ; activityTitle = "" ; activityMenuIconColor = 0 ; outputUri = Uri . EMPTY ; outputCompressFormat = Bitmap . CompressFormat . JPEG ; outputCompressQuality = 90 ; outputRequestWidth = 0 ; outputRequestHeight = 0 ; noOutputImage = false ; initialCropWindowRectangle = null ; initialRotation = - 1 ; allowRotation = true ; allowCounterRotation = false ; rotationDegrees = 90 ; }

Opciones de inicio con valores predeterminados.


public static final Future < ? > newFollowingToTargetCheckTask  ( final QuestEnv env , Npc npc , Npc target ) { return ThreadPoolManager . getInstance ( ) . scheduleAtFixedRate ( new FollowingNpcCheckTask ( env , new TargetDestinationChecker ( npc , target ) ) , 1000 , 1000 ) ; }

Horario nuevo después de la tarea del corrector


public TrustSource add  ( TrustSource trustSource ) { if ( trustSource == null ) { throw new IllegalArgumentException ( "TrustSource cannot be null" ) ; } return add ( trustSource . getTrustedCAs ( ) ) ; }

Devuelve un nuevo fideicomiso que contiene el mismo CAS de confianza que este TrustSource, más el CAS de confianza en el fideicomiso especificado.


public static ByteBuffer encode  ( String string ) throws CharacterCodingException  { return encode ( string , true ) ; }

Convierte la cadena proporcionada a bytes utilizando la codificación UTF-8.Si la entrada está mal formada, los caracteres no válidos se reemplazan por un valor predeterminado.


private static Entry update  ( Entry e , Entry mods ) { try { Entry ec = e . getClass ( ) . newInstance ( ) ; Field [ ] mfields = getFields ( mods ) ; Field [ ] efields = getFields ( e , mods , mfields ) ; for ( int i = efields . length ; -- i >= 0 ; ) { efields [ i ] . set ( ec , efields [ i ] . get ( e ) ) ; } for ( int i = mfields . length ; -- i >= 0 ; ) { Object val = mfields [ i ] . get ( mods ) ; if ( val != null ) efields [ i ] . set ( ec , val ) ; } return ec ; } catch ( InstantiationException ex ) { throw new IllegalArgumentException ( "unexpected InstantiationException" ) ; } catch ( IllegalAccessException ex ) { throw new IllegalArgumentException ( "unexpected IllegalAccessException" ) ; } }

Devuelva una nueva entrada que, para cada campo no <code> null </ code> del parámetro <código> mods </ code>, tiene el mismo valor de campo que <code> mods </ code>, el mismo campoValor como el parámetro <código> E </ CODE>.


public void tabPageLoadFinished  ( int id ) { StripLayoutTab tab = findTabById ( id ) ; if ( tab != null ) tab . pageLoadingFinished ( ) ; }

Llamado cuando una pestaña ha terminado de cargar.


public DistributedLogNamespaceBuilder clientId  ( String clientId ) { this . _clientId = clientId ; return this ; }

ID de cliente utilizado para acceder al espacio de nombres


public static JobTrigger . ExecutionWindowTrigger executionWindow  ( int windowStart , int windowEnd ) { if ( windowStart < 0 ) { throw new IllegalArgumentException ( "Window start can't be less than 0" ) ; } else if ( windowEnd < windowStart ) { throw new IllegalArgumentException ( "Window end can't be less than window start" ) ; } return new JobTrigger . ExecutionWindowTrigger ( windowStart , windowEnd ) ; }

Crea una nueva ventana de ejecución basada en el intervalo de tiempo proporcionado.


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

ID de usuario o ID de la comunidad.De forma predeterminada, ID de usuario actual.Use un valor negativo para designar un ID de comunidad.


@ Override public boolean equals  ( Object descObj ) { if ( ! ( descObj instanceof XMLSchemaDescription ) ) return false ; XMLSchemaDescription desc = ( XMLSchemaDescription ) descObj ; if ( fNamespace != null ) return fNamespace . equals ( desc . getTargetNamespace ( ) ) ; else return desc . getTargetNamespace ( ) == null ; }

Compara esta gramática con la gramática dada.Actualmente, comparamos los espacios de nombres de destino.


private static boolean appendOdexesToClassPath  ( Context cxt , File dexDir , String [ ] names ) { String strDexDir = dexDir . getAbsolutePath ( ) ; ArrayList < String > jarPaths = new ArrayList < String > ( ) ; for ( int i = 0 ; i < names . length ; i ++ ) { String jarPath = strDexDir + '/' + names [ i ] ; File f = new File ( jarPath ) ; if ( f . isFile ( ) ) { jarPaths . add ( jarPath ) ; } } String [ ] jarsOfDex = new String [ jarPaths . size ( ) ] ; jarPaths . toArray ( jarsOfDex ) ; PathClassLoader pcl = ( PathClassLoader ) cxt . getClassLoader ( ) ; try { if ( Build . VERSION . SDK_INT < SDK_INT_ICS ) { FrameworkHack . appendDexListImplUnderICS ( jarsOfDex , pcl , dexDir ) ; } else { boolean kitkatPlus = Build . VERSION . SDK_INT >= SDK_INT_KITKAT ; boolean marshmallowPlus = Build . VERSION . SDK_INT >= SDK_INT_MARSHMALLOW ; ArrayList < File > jarFiles = DexDex . strings2Files ( jarsOfDex ) ; FrameworkHack . appendDexListImplICS ( jarFiles , pcl , dexDir , kitkatPlus , marshmallowPlus ) ; } for ( String jarName : names ) { theAppended . add ( jarName ) ; } if ( debug ) { Log . d ( TAG , "appendOdexesToClassPath completed : " + pcl ) ; Log . d ( TAG , "theAppended : " + theAppended ) ; } } catch ( Exception ex ) { throw new RuntimeException ( ex ) ; } return true ; }

Anexa los archivos DEX dexoptimizados a la Classpath.


No se puede crear un artículo de carrito de compras sin parámetros


public Map < Double , K > sortItems  ( List < K > items , PokemonGo api ) { Map < Double , K > result = new TreeMap < > ( ) ; for ( K point : items ) { result . put ( distFrom ( api . getLatitude ( ) , api . getLongitude ( ) , point . getLatitude ( ) , point . getLongitude ( ) ) , point ) ; } return result ; }


private HTSUttModel createUttModel  ( List < Element > predictFromElements ) throws MaryConfigurationException { int i , k , s , t , mstate , frame , durInFrames , durStateInFrames , numVoicedInModel ; HTSModel m ; List < Element > predictorElements = predictFromElements ; List < Target > predictorTargets = getTargets ( predictorElements ) ; FeatureVector fv ; HTSUttModel um = new HTSUttModel ( ) ; FeatureDefinition feaDef = htsData . getFeatureDefinition ( ) ; float duration ; double diffdurOld = 0.0 ; double diffdurNew = 0.0 ; float f0s [ ] = null ; try { for ( i = 0 ; i < predictorTargets . size ( ) ; i ++ ) { fv = predictorTargets . get ( i ) . getFeatureVector ( ) ; Element e = predictFromElements . get ( i ) ; um . addUttModel ( new HTSModel ( cart . getNumStates ( ) ) ) ; m = um . getUttModel ( i ) ; m . setPhoneName ( fv . getFeatureAsString ( feaDef . getFeatureIndex ( "phone" ) , feaDef ) ) ; if ( htsData . getUseContextDependentGV ( ) ) { if ( m . getPhoneName ( ) . contentEquals ( "_" ) ) m . setGvSwitch ( false ) ; } um . setNumModel ( um . getNumModel ( ) + 1 ) ; um . setNumState ( um . getNumState ( ) + cart . getNumStates ( ) ) ; duration = Integer . parseInt ( e . getAttribute ( "d" ) ) * 0.001f ; durInFrames = ( int ) ( duration / fperiodsec ) ; durStateInFrames = durInFrames / cart . getNumStates ( ) ; m . setTotalDur ( 0 ) ; for ( s = 0 ; s < cart . getNumStates ( ) ; s ++ ) { m . setDur ( s , durStateInFrames ) ; m . setTotalDur ( m . getTotalDur ( ) + m . getDur ( s ) ) ; } um . setTotalFrame ( um . getTotalFrame ( ) + m . getTotalDur ( ) ) ; System . out . format ( "createUttModel: duration=%.3f sec. durInFrames=%d  durStateInFrames=%d  m.getTotalDur()=%d\n" , duration , durInFrames , durStateInFrames , m . getTotalDur ( ) ) ; cart . searchLf0InCartTree ( m , fv , feaDef , htsData . getUV ( ) ) ; for ( mstate = 0 ; mstate < cart . getNumStates ( ) ; mstate ++ ) { for ( frame = 0 ; frame < m . getDur ( mstate ) ; frame ++ ) if ( m . getVoiced ( mstate ) ) um . setLf0Frame ( um . getLf0Frame ( ) + 1 ) ; } } return um ; } catch ( Exception e ) { throw new MaryConfigurationException ( "Error searching in tree when creating utterance model. " , e ) ; } }

Cree una lista de modelos de expresión de los vectores de características predichos de los elementos.


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


public static JpaModule newServerModule  ( EntityManagerFactory emFactory , EntityManager em , TransactionRunner transactionRunner ) { return new JpaModule ( emFactory , em , transactionRunner ) ; }

Crea un nuevo jpamodule para un servidor katarsis.Todas las entidades gestionadas por la entidad proporcionada, la FABRICACIÓN, se registran en el módulo y se exponen como los recursos de API de JSON, si no más tarde se configuran de otra manera.


public UnrevealBuilder withCurvedTranslation  ( final PointF curveControlPoint ) { this . mCurveControlPoint = curveControlPoint ; return this . withCurvedTranslation ( ) ; }

Define que la traducción debe ser curva.


public boolean isCritical  ( ) { return true ; }

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


void detectNonRecursive  ( DynamicAABBTreeLeaf < E , T > node , DynamicAABBTreeNode root , BroadphaseFilter < E , T > filter , List < BroadphasePair < E , T > > pairs ) { DynamicAABBTreeNode test = root ; while ( test != null ) { if ( test . aabb . overlaps ( node . aabb ) ) { if ( test . left != null ) { test = test . left ; continue ; } else { @ SuppressWarnings ( "unchecked" ) DynamicAABBTreeLeaf < E , T > leaf = ( DynamicAABBTreeLeaf < E , T > ) test ; if ( ! leaf . tested && leaf . collidable != node . collidable ) { if ( filter . isAllowed ( node . collidable , node . fixture , leaf . collidable , leaf . fixture ) ) { BroadphasePair < E , T > pair = new BroadphasePair < E , T > ( node . collidable , node . fixture , leaf . collidable , leaf . fixture ) ; pairs . add ( pair ) ; } } } } boolean nextNodeFound = false ; while ( test . parent != null ) { if ( test == test . parent . left ) { test = test . parent . right ; nextNodeFound = true ; break ; } test = test . parent ; } if ( ! nextNodeFound ) break ; } }

Método interno de detección no recursiva.


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

Si es real y el usuario está en una pantalla de retina, solicitará cuatro fichas de la mitad del tamaño especificado y un nivel de zoom más grande en lugar de uno para utilizar la alta resolución.</BR> Predeterminado Falso


public Element makeXmlElement  ( Document document , String prefix ) { Element element = null ; if ( prefix == null ) prefix = "" ; if ( document != null ) element = document . createElement ( prefix + this . getEntityName ( ) ) ; if ( element == null ) return null ; Iterator < ModelField > modelFields = this . getModelEntity ( ) . getFieldsIterator ( ) ; while ( modelFields . hasNext ( ) ) { ModelField modelField = modelFields . next ( ) ; String name = modelField . getName ( ) ; String value = this . getString ( name ) ; if ( value != null ) { if ( value . indexOf ( '\n' ) >= 0 || value . indexOf ( '\r' ) >= 0 ) { UtilXml . addChildElementCDATAValue ( element , name , value , document ) ; } else { element . setAttribute ( name , value ) ; } } } return element ; }

Hace un objeto de elemento XML con un atributo para cada campo de la entidad


private void init  ( View rootView ) { mRecyclerView = ( RecyclerView ) rootView . findViewById ( R . id . recycler_view ) ; speakersRecyclerView = ( RecyclerView ) rootView . findViewById ( R . id . speakers_recycler_view ) ; progressDialog = new ProgressDialog ( getContext ( ) ) ; root = ( CoordinatorLayout ) rootView . findViewById ( R . id . root ) ; connectAPI = new ConnectAPI ( getContext ( ) ) ; groupList = new ArrayList < > ( ) ; user = DataHandler . getInstance ( getContext ( ) ) . getUser ( ) ; if ( ! MainActivity . ISGUEST ) { if ( user == null ) { startActivity ( new Intent ( getActivity ( ) , AuthenticationActivity . class ) ) ; getActivity ( ) . finish ( ) ; } } }

Esta función se utiliza para inicializar todas las variables creadas.


@ Override public void pluginInitialize  ( ) { this . initTelephonyReceiver ( ) ; }

Establece el contexto del comando.Esto se puede usar para hacer cosas como obtener rutas de archivo asociadas con la actividad.


void returnLocal  ( Local right ) { ret . clear ( ) ; ret . addAll ( locals . get ( right ) ) ; if ( doCheck ) sanityCheck ( ) ; }


public MessagesGetLongPollHistoryQuery fields  ( List < EnumParam > value ) { return unsafeParam ( "fields" , value ) ; }


public BaseAlertDialog ( Context context ) { super ( context ) ; widthScale ( 0.88f ) ; mLlContainer = new LinearLayout ( context ) ; mLlContainer . setOrientation ( LinearLayout . VERTICAL ) ; mTvTitle = new TextView ( context ) ; mTvContent = new TextView ( context ) ; mLlBtns = new LinearLayout ( context ) ; mLlBtns . setOrientation ( LinearLayout . HORIZONTAL ) ; mTvBtnLeft = new TextView ( context ) ; mTvBtnLeft . setGravity ( Gravity . CENTER ) ; mTvBtnMiddle = new TextView ( context ) ; mTvBtnMiddle . setGravity ( Gravity . CENTER ) ; mTvBtnRight = new TextView ( context ) ; mTvBtnRight . setGravity ( Gravity . CENTER ) ; }

Método Ejecute Pedido: Mostrar: Constroont --- Mostrar --- OnCreate --- ONSTART --- ONATTACHTOWINGOW OSD: despido --- OnDetachedfromWindow --- OnStop


@ Override public void apply  ( NexusStreamParser np ) throws Exception { np . matchIgnoreCase ( "set colorTable=" ) ; String name = np . getWordMatchesRespectingCase ( ColorTableManager . getNames ( ) ) ; boolean isHeatMap ; if ( np . peekMatchIgnoreCase ( "heatMap" ) ) { np . matchIgnoreCase ( "heatMap=" ) ; isHeatMap = np . getBoolean ( ) ; } else isHeatMap = false ; np . matchIgnoreCase ( ";" ) ; if ( isHeatMap ) { getDir ( ) . getDocument ( ) . getChartColorManager ( ) . setHeatMapTable ( name ) ; ColorTableManager . setDefaultColorTableHeatMap ( name ) ; } else { getDir ( ) . getDocument ( ) . getChartColorManager ( ) . setColorTable ( name ) ; ColorTableManager . setDefaultColorTable ( name ) ; } getDir ( ) . getDocument ( ) . setDirty ( true ) ; }


public WebElement clickElementIfExists  ( final List < WebElement > elements , final String elementName ) { for ( WebElement element : elements ) { if ( elementName . equals ( element . getText ( ) ) ) { element . click ( ) ; return element ; } } throw new IllegalArgumentException ( String . format ( "There is no element named %s" , elementName ) ) ; }

Los cheques Si el número web con nombre específico está presente en la lista especificada y lo hace, si está en la lista.


public void stopReplicationService  ( ) throws Exception  { if ( false == isAutoRecoveryEnabled ( ) ) { return ; } for ( Entry < BookieServer , AutoRecoveryMain > autoRecoveryProcess : autoRecoveryProcesses . entrySet ( ) ) { autoRecoveryProcess . getValue ( ) . shutdown ( ) ; LOG . debug ( "Shutdown Auditor Recovery for the bookie:" + autoRecoveryProcess . getKey ( ) . getLocalAddress ( ) ) ; } }

Detendrá todos los procesos de recuperación de automóviles para el clúster de Bookie, si IsautorecoveryEnabled es verdadero.


public ClearCacheRequest ( Cache cache , Runnable callback ) { super ( Method . GET  , null  , null ) ; mCache = cache ; mCallback = callback ; }

Crea una solicitud sintética para eliminar el caché.


public LegendComponent ( Orientation orientation , int frequencyMillis ) { mFrequencyMillis = frequencyMillis ; mOrientation = orientation ; mLastUpdate = 0 ; }

COMPONENTE DE LA LEYENDA QUE RENDERES UNA ETIQUETA, Y ICONO PARA CADA SERIE EN UN TABLO.


public double chiSquare  ( final double [ ] expected , final long [ ] observed ) throws MathIllegalArgumentException { if ( expected . length < 2 ) { throw new MathIllegalArgumentException ( LocalizedCoreFormats . DIMENSIONS_MISMATCH , expected . length , 2 ) ; } MathUtils . checkDimension ( expected . length , observed . length ) ; MathArrays . checkPositive ( expected ) ; MathArrays . checkNonNegative ( observed ) ; double sumExpected = 0d ; double sumObserved = 0d ; for ( int i = 0 ; i < observed . length ; i ++ ) { sumExpected += expected [ i ] ; sumObserved += observed [ i ] ; } double ratio = 1.0d ; boolean rescale = false ; if ( FastMath . abs ( sumExpected - sumObserved ) > 10E-6 ) { ratio = sumObserved / sumExpected ; rescale = true ; } double sumSq = 0.0d ; for ( int i = 0 ; i < observed . length ; i ++ ) { if ( rescale ) { final double dev = observed [ i ] - ratio * expected [ i ] ; sumSq += dev * dev / ( ratio * expected [ i ] ) ; } else { final double dev = observed [ i ] - expected [ i ] ; sumSq += dev * dev / expected [ i ] ; } } return sumSq ; }

Calcula el <a href="http://www.itl.nist.gov/div898/handbook/eda/section3/eda35f.htm"> estadística cuadrada de chi-cuadrado </a> comparando <código> observado </ code> y<CÓDIGO> Se espera </ Code> Recuentos de frecuencia.<P> Esta estadística se puede usar para realizar una prueba de Chi-Square que evalúa la hipótesis nula de que los conteos observados siguen la distribución esperada.<p> <strong> condiciones </ strong>: <ul> <li> Los conteos esperados deben ser todos positivos. </ li> <li> Los conteos observados deben ser todos y GE;0. </ Li> <li> Las matrices observadas y esperadas deben tener la misma longitud y su longitud común debe ser de al menos 2. </ Li> </ ul> <p> Si alguna de las condiciones previas no se cumplen, una<Código> IllegalArgumentException </ code> es lanzado.<p> <strong> Nota: </ strong> Esta implementación reviene el <código> esperado </ codigo> matriz si es necesario, para garantizar que la suma de los conteos esperados y observados sea igual.


public static void main  ( String [ ] sArgs ) { Hashtable hSwitches = gr . demokritos . iit . jinsect . utils . parseCommandLineSwitches ( sArgs ) ; String sInputDir = gr . demokritos . iit . jinsect . utils . getSwitch ( hSwitches , "inputDir" , "." ) ; boolean bInputDirFlat = Boolean . valueOf ( gr . demokritos . iit . jinsect . utils . getSwitch ( hSwitches , "inputDirFlat" , Boolean . FALSE . toString ( ) ) ) ; String sModel = gr . demokritos . iit . jinsect . utils . getSwitch ( hSwitches , "model" , "" ) ; String sDocumentMatrix = gr . demokritos . iit . jinsect . utils . getSwitch ( hSwitches , "docMatrix" , "" ) ; int iLevels = Integer . valueOf ( gr . demokritos . iit . jinsect . utils . getSwitch ( hSwitches , "levels" , "5" ) ) . intValue ( ) ; int iIterations = Integer . valueOf ( gr . demokritos . iit . jinsect . utils . getSwitch ( hSwitches , "iters" , "10000" ) ) . intValue ( ) ; int iBurnInIterations = Integer . valueOf ( gr . demokritos . iit . jinsect . utils . getSwitch ( hSwitches , "burnIn" , "1000" ) ) . intValue ( ) ; double dAlpha = Double . valueOf ( gr . demokritos . iit . jinsect . utils . getSwitch ( hSwitches , "alpha" , "2.0" ) ) . doubleValue ( ) ; double dBeta = Double . valueOf ( gr . demokritos . iit . jinsect . utils . getSwitch ( hSwitches , "beta" , "0.5" ) ) . doubleValue ( ) ; int iThreads = Integer . valueOf ( gr . demokritos . iit . jinsect . utils . getSwitch ( hSwitches , "threads" , String . valueOf ( Runtime . getRuntime ( ) . availableProcessors ( ) ) ) ) . intValue ( ) ; boolean bRecalc = Boolean . valueOf ( gr . demokritos . iit . jinsect . utils . getSwitch ( hSwitches , "recalc" , "FALSE" ) ) . booleanValue ( ) ; int iTextMeanSize = Integer . valueOf ( gr . demokritos . iit . jinsect . utils . getSwitch ( hSwitches , "textMeanSize" , "250" ) ) . intValue ( ) ; if ( Boolean . valueOf ( gr . demokritos . iit . jinsect . utils . getSwitch ( hSwitches , "help" , "FALSE" ) ) . booleanValue ( ) ) { printSyntax ( ) ; return ; } ConsoleNotificationListener cnlReporting = new ConsoleNotificationListener ( ) ; TreeMap < Integer , String > tmIdxToStr = new TreeMap < Integer , String > ( ) ; System . err . println ( "Initializing HLDA..." ) ; int [ ] [ ] dtm = null ; boolean bMatrixLoadedOK = false ; if ( ( sDocumentMatrix . length ( ) != 0 ) && ! bRecalc ) { try { System . err . println ( "Loading document-term matrix..." ) ; FileInputStream fis = new FileInputStream ( sDocumentMatrix ) ; ObjectInputStream ois = new ObjectInputStream ( fis ) ; dtm = ( int [ ] [ ] ) ois . readObject ( ) ; tmIdxToStr = ( TreeMap < Integer , String > ) ois . readObject ( ) ; ois . close ( ) ; fis . close ( ) ; bMatrixLoadedOK = true ; } catch ( Exception e ) { System . err . println ( "Could not load document term matrix." ) ; } } ; if ( ! bMatrixLoadedOK ) { DocumentSet dm = new DocumentSet ( sInputDir , 1.0 ) ; dm . createSets ( false , 1.0 , bInputDirFlat ) ; System . err . print ( "Calculating document term matrix..." ) ; dtm = HierLDACaller . getDocumentTermMatrix ( dm . getTrainingSet ( ) , tmIdxToStr ) ; System . err . println ( "Done." ) ; System . err . println ( "Saving document-term matrix..." ) ; if ( sDocumentMatrix . length ( ) != 0 ) { try { FileOutputStream fos = new FileOutputStream ( sDocumentMatrix ) ; ObjectOutputStream oos = new ObjectOutputStream ( fos ) ; oos . writeObject ( dtm ) ; oos . writeObject ( tmIdxToStr ) ; oos . close ( ) ; fos . close ( ) ; } catch ( Exception e ) { System . err . println ( "Could not save document term matrix." ) ; e . printStackTrace ( System . err ) ; } } } HierLDAGibbs hierLDA = null ; boolean bHLDALoadedOK = false ; if ( ( sModel . length ( ) != 0 ) && ! bRecalc ) { File fLDAModel = new File ( sModel ) ; try { System . err . println ( "Loading HLDA model..." ) ; FileInputStream fis = new FileInputStream ( fLDAModel ) ; ObjectInputStream ois = new ObjectInputStream ( fis ) ; hierLDA = ( HierLDAGibbs ) ois . readObject ( ) ; ois . close ( ) ; fis . close ( ) ; bHLDALoadedOK = true ; } catch ( Exception e ) { System . err . println ( "Could not load HLDA model..." ) ; hierLDA = new HierLDAGibbs ( iLevels , dtm , dAlpha , dBeta ) ; System . err . println ( "Performing HLDA sampling..." ) ; hierLDA . setProgressIndicator ( cnlReporting ) ; hierLDA . performGibbs ( iIterations , iBurnInIterations , Runtime . getRuntime ( ) . availableProcessors ( ) ) ; } } else { hierLDA = new HierLDAGibbs ( iLevels , dtm , dAlpha , dBeta ) ; hierLDA . setProgressIndicator ( cnlReporting ) ; System . err . println ( "Performing HLDA sampling..." ) ; hierLDA . performGibbs ( iIterations , iBurnInIterations , Runtime . getRuntime ( ) . availableProcessors ( ) ) ; } if ( ( sModel . length ( ) != 0 ) && ( ! bHLDALoadedOK ) ) { try { System . err . println ( "Saving HLDA model..." ) ; FileOutputStream fos = new FileOutputStream ( sModel ) ; ObjectOutputStream oos = new ObjectOutputStream ( fos ) ; oos . writeObject ( hierLDA ) ; oos . close ( ) ; fos . close ( ) ; } catch ( Exception e ) { System . err . println ( "Could not save document term matrix." ) ; e . printStackTrace ( System . err ) ; } } System . err . println ( "Initializing and training grammaticality estimator..." ) ; grammaticalityEstimator ge = new grammaticalityEstimator ( sInputDir , 1 , - 1 , 1 , 3 , 2 , bInputDirFlat ) ; ge . train ( ) ; System . err . println ( "Initializing text generator..." ) ; HLDATextGenerator tg = new HLDATextGenerator ( hierLDA , new DistributionDocumentEvaluator ( tmIdxToStr , ge ) , tmIdxToStr ) ; for ( int iGramVinc = 1 ; iGramVinc < 2 ; iGramVinc ++ ) { System . err . println ( "Creating text... Grammar rank " + iGramVinc ) ; Vector < Integer > vText = tg . generateNormalText ( iTextMeanSize , iGramVinc ) ; String sText = tg . getVectorToText ( vText ) ; sText = sText . replaceAll ( "_/" , " " ) ; sText = sText . replaceAll ( "\\\\_" , " " ) ; System . out . println ( sText ) ; System . err . println ( "Grammaticality:" + ge . getNormality ( sText ) ) ; } System . err . println ( "Complete." ) ; System . exit ( 0 ) ; }

Método principal de la utilidad que crea un texto aleatorio, basado en un modelo corpus.


private void placeChild  ( View child , int gravity ) { LayoutParams lp = ( LayoutParams ) child . getLayoutParams ( ) ; int availableWidth = Math . max ( 0 , mEnd - mStart - lp . startMargin - lp . endMargin ) ; if ( child . getMeasuredWidth ( ) > availableWidth || gravity == Gravity . FILL_HORIZONTAL ) { measureChildWithFixedWidth ( child , availableWidth ) ; } if ( gravity == Gravity . START || gravity == Gravity . FILL_HORIZONTAL ) { lp . start = mStart + lp . startMargin ; mStart = lp . start + child . getMeasuredWidth ( ) + lp . endMargin ; } else { lp . start = mEnd - lp . endMargin - child . getMeasuredWidth ( ) ; mEnd = lp . start - lp . startMargin ; } lp . top = mTop + lp . topMargin ; mBottom = Math . max ( mBottom , lp . top + child . getMeasuredHeight ( ) + lp . bottomMargin ) ; }

Coloca una vista única en la fila actual, y actualiza los parámetros de diseño de la vista para recordar su posición.Mstart, MEND y Mbottom se actualizan para reflejar el espacio tomado por la vista.


public void addGenericAttr  ( GenericAttr g ) { generic . addElement ( g ) ; g . resolve ( this ) ; }

Agregue un atributo genérico al archivo de clase.Un atributo genérico contiene una corriente de bytes no interpretados que es ignorada por la VM (siempre que su nombre no entrena con otros nombres para los atributos que se entiendan por la VM)


public void sample  ( String input , String output , int numPosts ) throws IOException { Random random = new Random ( ) ; JsonUtil J = new JsonUtil ( ) ; Map < String , List < String > > userposts = new Hashtable < String , List < String > > ( ) ; RecordReader reader = new RecordReader ( input ) ; while ( reader . next ( ) ) { Post p = J . fromJson ( reader . value ( ) , Post . class ) ; String userid = p . getUserId ( ) ; List < String > posts = userposts . get ( userid ) ; if ( posts == null ) { posts = new ArrayList < String > ( ) ; userposts . put ( userid , posts ) ; } posts . add ( reader . value ( ) ) ; if ( reader . numRead ( ) % 1000 == 0 ) { LOG . info ( "read: " + reader . numRead ( ) ) ; } } LOG . info ( "total " + reader . numRead ( ) + " posts and " + userposts . size ( ) + "users" ) ; reader . close ( ) ; RecordWriter writer = new RecordWriter ( output ) ; int total = 0 ; for ( Entry < String , List < String > > e : userposts . entrySet ( ) ) { List < String > posts = e . getValue ( ) ; int n = 0 ; while ( n < numPosts && posts . size ( ) > 0 ) { writer . add ( posts . remove ( random . nextInt ( posts . size ( ) ) ) ) ; n ++ ; } total += n ; } LOG . info ( "write " + total + " posts." ) ; writer . close ( ) ; }

Cargue todos los datos en la memoria, luego muestra las publicaciones de NUMPOSTS para cada usuario.


public static boolean isNotModified  ( HttpServletRequest request , HttpServletResponse response , String tag ) { tag = tag != null ? ( QUOTE + tag + QUOTE ) : null ; String inputTag = request . getHeader ( HEADER_IF_NONE_MATCH ) ; response . setHeader ( HEADER_ETAG , tag ) ; if ( inputTag != null && inputTag . equals ( tag ) ) { response . setStatus ( HttpServletResponse . SC_NOT_MODIFIED ) ; return true ; } return false ; }

Este método busca la ETAG enviada en la solicitud del valor del encabezado "IF-None-Match" y lo compara con la etiqueta dada.Si coinciden, establecerá el código de estado 304 no modificado en la respuesta.Establecerá el encabezado ETAG en cualquier caso.Envolverá la etiqueta dada en las cotizaciones.


public Bucket ( String label , String experimentId , double allocationPercent , boolean isControl ) { this ( label , experimentId , allocationPercent , isControl , null ) ; }

Crea un cubo con valores predeterminados para todos los argumentos requeridos.


public static float interpolateLinear  ( float scale , float startValue , float endValue ) { if ( startValue == endValue ) { return startValue ; } if ( scale <= 0f ) { return startValue ; } if ( scale >= 1f ) { return endValue ; } return ( ( 1f - scale ) * startValue ) + ( scale * endValue ) ; }

Interpolación lineal de StartValue a Endvalue por el porcentaje dado.Básicamente: ((1 - por ciento) * STIPVALUE) + (porcentaje * endvalue)


boolean result  ( String feature ) { ViterbiPath path ; if ( timeline == null || timeline . next == null ) { return true ; } path = findBestPath ( ) ; if ( path == null ) { return false ; } for ( ; path != null ; path = path . from ) { if ( path . candidate != null ) { path . candidate . item . getFeatures ( ) . setObject ( feature , path . candidate . value ) ; } } return true ; }

Encuentre la mejor ruta a través del decodificador, agregando el nombre de la función al candidato.


public static Future < Void > closeSequence  ( ExecutorService executorService , AsyncCloseable ... closeables ) { return closeSequence ( executorService , false , closeables ) ; }


public MessagesGetQuery out  ( Boolean value ) { return unsafeParam ( "out" , value ) ; }

"VERDADERO" - Para devolver los mensajes salientes "FALSO" - para devolver los mensajes entrantes (predeterminado)


public static final void main  ( String [ ] argv ) { Logger . getLogger ( "prefuse" ) . setLevel ( Level . WARNING ) ; FisheyeMenu fm = demo ( ) ; JFrame f = new JFrame ( "p r e f u s e  |  f i s h e y e" ) ; f . setDefaultCloseOperation ( JFrame . EXIT_ON_CLOSE ) ; f . getContentPane ( ) . add ( fm ) ; f . pack ( ) ; f . setVisible ( true ) ; }

Ejecutar una demostración del pezeyemenú.


private String findLastStringAssignment  ( Stmt stmt , Local local , BiDiInterproceduralCFG < Unit , SootMethod > cfg ) { if ( stmt instanceof AssignStmt ) { AssignStmt assign = ( AssignStmt ) stmt ; if ( assign . getLeftOp ( ) == local ) { if ( assign . getRightOp ( ) instanceof StringConstant ) return ( ( StringConstant ) assign . getRightOp ( ) ) . value ; } } for ( Unit pred : cfg . getPredsOf ( stmt ) ) { if ( ! ( pred instanceof Stmt ) ) continue ; String lastAssignment = findLastStringAssignment ( ( Stmt ) pred , local , cfg ) ; if ( lastAssignment != null ) return lastAssignment ; } return null ; }

Encuentra la última asignación a la cadena dada local al buscar hacia arriba desde la declaración dada


public ServerRequestException ( final String pErrorMessage ) { super ( pErrorMessage ) ; }

Indica que se produjo un error al procesar una solicitud en el servidor.


static byte [ ] convertBoolArrayToByteArray  ( boolean [ ] boolArr ) { byte [ ] byteArr = new byte [ ( boolArr . length + 7 ) / 8 ] ; for ( int i = 0 ; i < byteArr . length ; i ++ ) { byteArr [ i ] = readByte ( boolArr , 8 * i ) ; } return byteArr ; }

Empaca un poco de matriz en bytes, más significativo primero


public ExecutorDelivery ( Executor executor ) { mResponsePoster = executor ; }

Crea una nueva interfaz de entrega de respuesta, versión burlona para pruebas.


public List < Menu > loadMenu  ( User me , String name ) { return loadMenu ( me , 0 , name ) ; }


private void DrawPrimitive  ( DrawBlock b , World w ) throws Exception { XMLBlockState blockType = new XMLBlockState ( b . getType ( ) , b . getColour ( ) , b . getFace ( ) , b . getVariant ( ) ) ; if ( ! blockType . isValid ( ) ) throw new Exception ( "Unrecogised item type: " + b . getType ( ) . value ( ) ) ; BlockPos pos = new BlockPos ( b . getX ( ) , b . getY ( ) , b . getZ ( ) ) ; setBlockState ( w , pos , blockType ) ; }


@ Override public String toString  ( ) { final StringBuilder builder = new StringBuilder ( 32 ) ; builder . append ( "Validations []" ) ; return builder . toString ( ) ; }


public CART ( FeatureDefinition featDef ) { super ( featDef ) ; }

Construye un nuevo carro vacío con la definición de característica dada.


protected void notifyShowContextualSearch  ( GSAContextDisplaySelection selectionContext , @ Nullable URL baseContentViewUrl ) { if ( ! mPolicy . canSendSurroundings ( baseContentViewUrl ) ) selectionContext = null ; for ( ContextualSearchObserver observer : mObservers ) { observer . onShowContextualSearch ( selectionContext ) ; } }

Notifica todos los observadores de búsqueda contextual que se ha producido una búsqueda.


public StandardParserConfiguration ( SymbolTable symbolTable ) { this ( symbolTable , null , null ) ; }

Construye una configuración de analizador con la tabla de símbolos especificada.


public static void i  ( String tag , String s ) { if ( LOG . INFO >= LOGLEVEL ) Log . i ( tag , s ) ; }


public boolean updateStatsAndReturnWhetherAllowed  ( ) { long now = SystemClock . elapsedRealtime ( ) ; long deltaMs = now - mLastRequestMs ; if ( deltaMs < mDelayMs ) return false ; mLastRequestMs = now ; if ( deltaMs < 2 * mDelayMs ) { mDelayMs = Math . min ( MAX_DELAY , mDelayMs * 2 ) ; } else { mDelayMs = MIN_DELAY ; } return true ; }

Actualiza las estadísticas de predicción y devuelve si se permite la predicción.La política es: 1. Si el cliente no espera más que MDelayms, rechace la solicitud.2. Si el cliente espera más de MDelayms, pero menos de 2 * Mdelayms, acepte la solicitud y el doble Mdelayms.3. Si el cliente espera más de 2 * Mdelayms, acepte la solicitud y reinicie Mdelays.Y: 100ms <= mdelayms <= 10s.De esta manera, si una aplicación envía una explosión de solicitudes, se estrena gravemente seriamente.Si deja de ser así, de vuelta a la normalidad.


@ RequestMapping ( "generalError" ) public String generalError  ( HttpServletRequest request , HttpServletResponse response , Model model ) { Integer statusCode = ( Integer ) request . getAttribute ( "javax.servlet.error.status_code" ) ; Throwable throwable = ( Throwable ) request . getAttribute ( "javax.servlet.error.exception" ) ; String exceptionMessage = getExceptionMessage ( throwable , statusCode ) ; String requestUri = ( String ) request . getAttribute ( "javax.servlet.error.request_uri" ) ; if ( requestUri == null ) { requestUri = "Unknown" ; } String message = MessageFormat . format ( "{0} returned for {1} with message {2}" , statusCode , requestUri , exceptionMessage ) ; model . addAttribute ( "errorMessage" , message ) ; return "error/general" ; }

Muestre una página de error, como se define en web.xml <code> Personalización-Error </ código>.


protected MarketEditQuery mainPhotoId  ( int value ) { return unsafeParam ( "main_photo_id" , value ) ; }


protected void handleAndroidResourceFiles  ( String apk , Set < String > fileNameFilter , IResourceHandler handler ) { File apkF = new File ( apk ) ; if ( ! apkF . exists ( ) ) throw new RuntimeException ( "file '" + apk + "' does not exist!" ) ; try { ZipFile archive = null ; try { archive = new ZipFile ( apkF ) ; Enumeration < ? > entries = archive . entries ( ) ; while ( entries . hasMoreElements ( ) ) { ZipEntry entry = ( ZipEntry ) entries . nextElement ( ) ; String entryName = entry . getName ( ) ; handler . handleResourceFile ( entryName , fileNameFilter , archive . getInputStream ( entry ) ) ; } } finally { if ( archive != null ) archive . close ( ) ; } } catch ( Exception e ) { System . err . println ( "Error when looking for XML resource files in apk " + apk + ": " + e ) ; e . printStackTrace ( ) ; if ( e instanceof RuntimeException ) throw ( RuntimeException ) e ; else throw new RuntimeException ( e ) ; } }

Abre el archivo APK dado y proporciona al manejador dado una corriente para acceder a los archivos de manifiesto de recursos contenidos


public boolean isLessThan  ( GameTime gt ) { return this . getTime ( ) < gt . getTime ( ) ; }


public static int compareTimestamp  ( GenericRecord first , GenericRecord second , String timestampFieldName ) { Long ts1 = ( Long ) first . get ( timestampFieldName ) ; Long ts2 = ( Long ) second . get ( timestampFieldName ) ; if ( ts1 < ts2 ) return - 1 ; else if ( ts1 > ts2 ) return 1 ; else return 0 ; }

Compara las dos marcas de tiempo de los registros.


public SFFS ( int solSize , boolean b0 , boolean logSol ) { interceptTerm = b0 ; logSolution = logSol ; solutionSize = solSize ; }

Búsqueda de avance flotante secuencial (SFFS) para la selección de características


public static SM_SYSTEM_MESSAGE STR_SKILL_SUCC_Root_END_A_TO_B  ( String skilltarget ) { return new SM_SYSTEM_MESSAGE ( 1200906 , skilltarget ) ; }

[% SkillTarget] ya no está inmovilizado.


public void activateFetched  ( ) { this . firebaseRemoteConfig . activateFetched ( ) ; }

Permite activar los valores recuperados.


public byte [ ] serialize  ( ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( metadataFormatVersion ) . append ( LINE_SPLITTER ) ; sb . append ( dlType ) . append ( LINE_SPLITTER ) ; sb . append ( dlConfig . serialize ( ) ) ; LOG . debug ( "Serialized dl metadata {}." , sb ) ; return sb . toString ( ) . getBytes ( UTF_8 ) ; }

Serializar los metadatos DL en la matriz de bytes.


private void renewClaimedTasks  ( ) { try { List < ClaimedTask > claimedTasks = ImmutableList . copyOf ( _claimedTasks . values ( ) ) ; List < ScanRangeTask > tasks = Lists . newArrayList ( ) ; for ( ClaimedTask claimedTask : claimedTasks ) { if ( claimedTask . isComplete ( ) ) { _log . info ( "Complete claimed task found during renew: id={}" , claimedTask . getTaskId ( ) ) ; _claimedTasks . remove ( claimedTask . getTaskId ( ) ) ; } else if ( claimedTask . isStarted ( ) ) { tasks . add ( claimedTask . getTask ( ) ) ; } } if ( ! tasks . isEmpty ( ) ) { _scanWorkflow . renewScanRangeTasks ( tasks , QUEUE_RENEW_TTL ) ; for ( ScanRangeTask task : tasks ) { _log . info ( "Renewed scan range task: {}" , task ) ; } } } catch ( Exception e ) { _log . error ( "Failed to renew scan ranges" , e ) ; } }

Renueva todas las tareas de rango de exploración reclamadas que no se han lanzado.A menos que esto se llame periódicamente, el flujo de trabajo de escaneo hará que esta tarea esté disponible nuevamente.


public final void encrypt  ( ByteBuffer buf ) { if ( ! isEnabled ) { isEnabled = true ; log . debug ( "packet is not encrypted... send in SM_KEY" ) ; return ; } packetKey . encrypt ( buf ) ; }

Encrypt Server Packet de este bytebuffer.


public static FieldSelector of  ( ImmutableList < Field > fields ) { return new FieldSelector ( fields ) ; }

Construir un selector de campo para los campos dados.


private void buildSpectrogram  ( ) { short [ ] amplitudes = wave . getSampleAmplitudes ( ) ; int numSamples = amplitudes . length ; int pointer = 0 ; if ( overlapFactor > 1 ) { int numOverlappedSamples = numSamples * overlapFactor ; int backSamples = fftSampleSize * ( overlapFactor - 1 ) / overlapFactor ; int fftSampleSize_1 = fftSampleSize - 1 ; short [ ] overlapAmp = new short [ numOverlappedSamples ] ; pointer = 0 ; for ( int i = 0 ; i < amplitudes . length ; i ++ ) { overlapAmp [ pointer ++ ] = amplitudes [ i ] ; if ( pointer % fftSampleSize == fftSampleSize_1 ) { i -= backSamples ; } } numSamples = numOverlappedSamples ; amplitudes = overlapAmp ; } numFrames = numSamples / fftSampleSize ; framesPerSecond = ( int ) ( numFrames / wave . length ( ) ) ; WindowFunction window = new WindowFunction ( ) ; window . setWindowType ( "Hamming" ) ; double [ ] win = window . generate ( fftSampleSize ) ; double [ ] [ ] signals = new double [ numFrames ] [ ] ; for ( int f = 0 ; f < numFrames ; f ++ ) { signals [ f ] = new double [ fftSampleSize ] ; int startSample = f * fftSampleSize ; for ( int n = 0 ; n < fftSampleSize ; n ++ ) { signals [ f ] [ n ] = amplitudes [ startSample + n ] * win [ n ] ; } } absoluteSpectrogram = new double [ numFrames ] [ ] ; FastFourierTransform fft = new FastFourierTransform ( ) ; for ( int i = 0 ; i < numFrames ; i ++ ) { absoluteSpectrogram [ i ] = fft . getMagnitudes ( signals [ i ] ) ; } if ( absoluteSpectrogram . length > 0 ) { numFrequencyUnit = absoluteSpectrogram [ 0 ] . length ; unitFrequency = ( double ) wave . getWaveHeader ( ) . getSampleRate ( ) / 2 / numFrequencyUnit ; spectrogram = new double [ numFrames ] [ numFrequencyUnit ] ; double maxAmp = Double . MIN_VALUE ; double minAmp = Double . MAX_VALUE ; for ( int i = 0 ; i < numFrames ; i ++ ) { for ( int j = 0 ; j < numFrequencyUnit ; j ++ ) { if ( absoluteSpectrogram [ i ] [ j ] > maxAmp ) { maxAmp = absoluteSpectrogram [ i ] [ j ] ; } else if ( absoluteSpectrogram [ i ] [ j ] < minAmp ) { minAmp = absoluteSpectrogram [ i ] [ j ] ; } } } double minValidAmp = 0.00000000001F ; if ( minAmp == 0 ) { minAmp = minValidAmp ; } double diff = Math . log10 ( maxAmp / minAmp ) ; for ( int i = 0 ; i < numFrames ; i ++ ) { for ( int j = 0 ; j < numFrequencyUnit ; j ++ ) { if ( absoluteSpectrogram [ i ] [ j ] < minValidAmp ) { spectrogram [ i ] [ j ] = 0 ; } else { spectrogram [ i ] [ j ] = ( Math . log10 ( absoluteSpectrogram [ i ] [ j ] / minAmp ) ) / diff ; } } } } }


void beginEndElement  ( Augmentations elementAugs ) { fInEndElement = true ; fElementAugs = elementAugs ; }

Inicializa el TypeinFoproVider con información de tipo para el elemento actual.


public void addNewLine  ( ) { if ( symbolTree == null ) { return ; } Object oldValueObj = sldWriter . encodeSLD ( null , SelectedSymbol . getInstance ( ) . getSld ( ) ) ; LineSymbolizer newLineSymbolizer = DefaultSymbols . createDefaultLineSymbolizer ( ) ; DefaultMutableTreeNode ruleNode = getRuleTreeNode ( ) ; SelectedSymbol . getInstance ( ) . addSymbolizerToRule ( newLineSymbolizer ) ; DefaultMutableTreeNode newNode = sldTree . addObject ( ruleNode , newLineSymbolizer , true ) ; if ( newNode != null ) { sldTree . addObject ( newNode , SLDTreeLeafFactory . getInstance ( ) . getStroke ( newLineSymbolizer ) , true ) ; TreePath newPath = getPath ( newNode ) ; symbolTree . setSelectionPath ( newPath ) ; Object newValueObj = sldWriter . encodeSLD ( null , SelectedSymbol . getInstance ( ) . getSld ( ) ) ; UndoManager . getInstance ( ) . addUndoEvent ( new UndoEvent ( sldTree . getUndoObject ( ) , getClass ( ) . getName ( ) , oldValueObj , newValueObj ) ) ; } }


@ Override public int read  ( byte [ ] b , int off , int len ) throws IOException { int sampleSizeInBytes = frameSize / inputChannels ; int outputFrameSize = sampleSizeInBytes ; int nFrames = len / outputFrameSize ; boolean bigEndian = getFormat ( ) . isBigEndian ( ) ; byte [ ] inputBytes = new byte [ nFrames * frameSize ] ; int nInputBytes = super . read ( inputBytes , 0 , inputBytes . length ) ; if ( nInputBytes <= 0 ) return nInputBytes ; if ( inputMode == AudioPlayer . STEREO ) { for ( int i = 0 , j = off ; i < nInputBytes ; i += frameSize , j += outputFrameSize ) { int sample = 0 ; for ( int c = 0 ; c < inputChannels ; c ++ ) { if ( sampleSizeInBytes == 1 ) { sample += inputBytes [ i ] << 8 ; } else if ( sampleSizeInBytes == 2 ) { byte lobyte ; byte hibyte ; if ( ! bigEndian ) { lobyte = inputBytes [ i ] ; hibyte = inputBytes [ i + 1 ] ; } else { lobyte = inputBytes [ i + 1 ] ; hibyte = inputBytes [ i ] ; } sample += hibyte << 8 | lobyte & 0xFF ; } else { assert sampleSizeInBytes == 3 : "Unsupported sample size in bytes: " + sampleSizeInBytes ; byte lobyte ; byte midbyte ; byte hibyte ; if ( ! bigEndian ) { lobyte = inputBytes [ i ] ; midbyte = inputBytes [ i + 1 ] ; hibyte = inputBytes [ i + 2 ] ; } else { lobyte = inputBytes [ i + 2 ] ; midbyte = inputBytes [ i + 1 ] ; hibyte = inputBytes [ i ] ; } sample += hibyte << 16 | ( midbyte & 0xFF ) << 8 | lobyte & 0xFF ; } } sample /= inputChannels ; if ( sampleSizeInBytes == 1 ) { b [ j ] = ( byte ) ( ( sample >> 8 ) & 0xFF ) ; } else if ( sampleSizeInBytes == 2 ) { byte lobyte = ( byte ) ( sample & 0xFF ) ; byte hibyte = ( byte ) ( sample >> 8 ) ; if ( ! bigEndian ) { b [ j ] = lobyte ; b [ j + 1 ] = hibyte ; } else { b [ j ] = hibyte ; b [ j + 1 ] = lobyte ; } } else { assert sampleSizeInBytes == 3 : "Unsupported sample size in bytes: " + sampleSizeInBytes ; byte lobyte = ( byte ) ( sample & 0xFF ) ; byte midbyte = ( byte ) ( ( sample >> 8 ) & 0xFF ) ; byte hibyte = ( byte ) ( sample >> 16 ) ; if ( ! bigEndian ) { b [ j ] = lobyte ; b [ j + 1 ] = midbyte ; b [ j + 2 ] = hibyte ; } else { b [ j ] = hibyte ; b [ j + 1 ] = midbyte ; b [ j + 2 ] = lobyte ; } } } } else if ( inputMode == AudioPlayer . LEFT_ONLY ) { for ( int i = 0 , j = off ; i < nInputBytes ; i += frameSize , j += outputFrameSize ) { for ( int k = 0 ; k < sampleSizeInBytes ; k ++ ) { b [ j + k ] = inputBytes [ i + k ] ; } } } else { assert inputMode == AudioPlayer . RIGHT_ONLY : "unexpected input mode: " + inputMode ; for ( int i = 0 , j = off ; i < nInputBytes ; i += frameSize , j += outputFrameSize ) { for ( int k = 0 ; k < sampleSizeInBytes ; k ++ ) { b [ j + k ] = inputBytes [ i + k + sampleSizeInBytes ] ; } } } return nInputBytes / inputChannels ; }

Lee hasta un número máximo especificado de bytes de datos de la secuencia de audio, poniéndolos en la matriz de bytes dada.<P> Este método siempre leerá un número integral de marcos.Si <CÓDIGO> LEN </ CODE> no especifica un número integral de cuadros, se leerá un máximo de <CÓDIGO> LEN - (LEN% Framesize) </ Code> Bytes.


public PhotosDeleteCommentQuery deleteComment  ( UserActor actor , int commentId ) { return new PhotosDeleteCommentQuery ( getClient ( ) , actor , commentId ) ; }


< T > List < T > onFind ( Class < T > modelClass , String [ ] columns , String [ ] conditions , String orderBy , String limit , boolean isEager )  { BaseUtility . checkConditionsCorrect ( conditions ) ; List < T > dataList = query ( modelClass , columns , getWhereClause ( conditions ) , getWhereArgs ( conditions ) , null , null , orderBy , limit , getForeignKeyAssociations ( modelClass . getName ( ) , isEager ) ) ; return dataList ; }

La interfaz abierta para otras clases en el paquete CRUD para consultar múltiples registros por parámetros.


public static < T > String  toXml ( Class < T > clazz , T object )  { return CLASS_2_XSTREAM_INSTANCE . get ( clazz ) . toXML ( object ) ; }


protected int toScreen  ( int xOrY ) { Dimension sz = getSize ( ) ; int min = getMinimum ( ) ; double scale ; if ( orientation == VERTICAL ) { scale = ( sz . height - ( 2 * ARROW_SZ ) ) / ( double ) ( getMaximum ( ) - min ) ; } else { scale = ( sz . width - ( 2 * ARROW_SZ ) ) / ( double ) ( getMaximum ( ) - min ) ; } if ( direction == LEFTRIGHT_TOPBOTTOM ) { return ( int ) ( ARROW_SZ + ( ( xOrY - min ) * scale ) + 0.5 ) ; } else { if ( orientation == VERTICAL ) { return ( int ) ( sz . height - ( xOrY - min ) * scale - ARROW_SZ + 0.5 ) ; } else { return ( int ) ( sz . width - ( xOrY - min ) * scale - ARROW_SZ + 0.5 ) ; } } }

Convierte de un valor de rango a las coordenadas de la pantalla.


protected void analyzeAssociatedModels  ( DataSupport baseObj , Collection < AssociationsInfo > associationInfos ) { try { for ( AssociationsInfo associationInfo : associationInfos ) { if ( associationInfo . getAssociationType ( ) == Const . Model . MANY_TO_ONE ) { new Many2OneAnalyzer ( ) . analyze ( baseObj , associationInfo ) ; } else if ( associationInfo . getAssociationType ( ) == Const . Model . ONE_TO_ONE ) { new One2OneAnalyzer ( ) . analyze ( baseObj , associationInfo ) ; } else if ( associationInfo . getAssociationType ( ) == Const . Model . MANY_TO_MANY ) { new Many2ManyAnalyzer ( ) . analyze ( baseObj , associationInfo ) ; } } } catch ( Exception e ) { throw new DataSupportException ( e . getMessage ( ) ) ; } }

Encuentra todos los modelos asociados del modelo actualmente.Luego agregue todos los modelos asociados a BASEBJ.


public String replaceBackTrickyPhones  ( String lab ) { String s = lab ; if ( actualPhones . containsKey ( lab ) ) { s = actualPhones . get ( lab ) ; } return s ; }

Tabla de traducción para etiquetas que son incompatibles con los nombres de archivos HTK o Shell vean common_routines.pl en el entrenamiento de HTS.En esta función, los teléfonos utilizados internamente en htsengine se cambian de nuevo al conjunto de Mary TTS, esta función es necesaria cuando se corrige las duraciones reales de los acousticópicos.


public static byte [ ] decode  ( String encoded ) { if ( encoded == null ) { return null ; } char [ ] base64Data = encoded . toCharArray ( ) ; int len = removeWhiteSpace ( base64Data ) ; if ( len % FOURBYTE != 0 ) { return null ; } int numberQuadruple = ( len / FOURBYTE ) ; if ( numberQuadruple == 0 ) { return new byte [ 0 ] ; } byte decodedData [ ] = null ; byte b1 = 0 , b2 = 0 , b3 = 0 , b4 = 0 ; char d1 = 0 , d2 = 0 , d3 = 0 , d4 = 0 ; int i = 0 ; int encodedIndex = 0 ; int dataIndex = 0 ; decodedData = new byte [ ( numberQuadruple ) * 3 ] ; for ( ; i < numberQuadruple - 1 ; i ++ ) { if ( ! isData ( ( d1 = base64Data [ dataIndex ++ ] ) ) || ! isData ( ( d2 = base64Data [ dataIndex ++ ] ) ) || ! isData ( ( d3 = base64Data [ dataIndex ++ ] ) ) || ! isData ( ( d4 = base64Data [ dataIndex ++ ] ) ) ) { return null ; } b1 = base64Alphabet [ d1 ] ; b2 = base64Alphabet [ d2 ] ; b3 = base64Alphabet [ d3 ] ; b4 = base64Alphabet [ d4 ] ; decodedData [ encodedIndex ++ ] = ( byte ) ( b1 << 2 | b2 >> 4 ) ; decodedData [ encodedIndex ++ ] = ( byte ) ( ( ( b2 & 0xf ) << 4 ) | ( ( b3 >> 2 ) & 0xf ) ) ; decodedData [ encodedIndex ++ ] = ( byte ) ( b3 << 6 | b4 ) ; } if ( ! isData ( ( d1 = base64Data [ dataIndex ++ ] ) ) || ! isData ( ( d2 = base64Data [ dataIndex ++ ] ) ) ) { return null ; } b1 = base64Alphabet [ d1 ] ; b2 = base64Alphabet [ d2 ] ; d3 = base64Data [ dataIndex ++ ] ; d4 = base64Data [ dataIndex ++ ] ; if ( ! isData ( ( d3 ) ) || ! isData ( ( d4 ) ) ) { if ( isPad ( d3 ) && isPad ( d4 ) ) { if ( ( b2 & 0xf ) != 0 ) { return null ; } byte [ ] tmp = new byte [ i * 3 + 1 ] ; System . arraycopy ( decodedData , 0 , tmp , 0 , i * 3 ) ; tmp [ encodedIndex ] = ( byte ) ( b1 << 2 | b2 >> 4 ) ; return tmp ; } else if ( ! isPad ( d3 ) && isPad ( d4 ) ) { b3 = base64Alphabet [ d3 ] ; if ( ( b3 & 0x3 ) != 0 ) { return null ; } byte [ ] tmp = new byte [ i * 3 + 2 ] ; System . arraycopy ( decodedData , 0 , tmp , 0 , i * 3 ) ; tmp [ encodedIndex ++ ] = ( byte ) ( b1 << 2 | b2 >> 4 ) ; tmp [ encodedIndex ] = ( byte ) ( ( ( b2 & 0xf ) << 4 ) | ( ( b3 >> 2 ) & 0xf ) ) ; return tmp ; } else { return null ; } } else { b3 = base64Alphabet [ d3 ] ; b4 = base64Alphabet [ d4 ] ; decodedData [ encodedIndex ++ ] = ( byte ) ( b1 << 2 | b2 >> 4 ) ; decodedData [ encodedIndex ++ ] = ( byte ) ( ( ( b2 & 0xf ) << 4 ) | ( ( b3 >> 2 ) & 0xf ) ) ; decodedData [ encodedIndex ++ ] = ( byte ) ( b3 << 6 | b4 ) ; } return decodedData ; }


public boolean isAxisModulusCustom  ( ) { return mIsAxisModulusCustom ; }

Devuelve VERDADERO si se ha establecido un eje-módulo personalizado que determina el número de etiquetas para saltar cuando se dibuja.


public static SM_SYSTEM_MESSAGE STR_MSG_PET_ABANDON_EXPIRE_TIME_COMPLETE  ( String value0 ) { return new SM_SYSTEM_MESSAGE ( 1401194 , value0 ) ; }

El tiempo de tu mascota está arriba.% 0 se ha ido.


public Value trim  ( Value str , Value trimChar , Boolean where ) { throw new RuntimeException ( "Unsupported operation." ) ; }

Recorta el recorte especificado especificado del valor especificado.


UnrevealBuilder ( @ NonNull final View viewToUnreveal ) { this . mViewToUnreveal = viewToUnreveal ; }


public static String separatorsToSystem  ( String path ) { if ( path == null ) { return null ; } if ( isSystemWindows ( ) ) { return separatorsToWindows ( path ) ; } else { return separatorsToUnix ( path ) ; } }

Convierte a todos los separadores al separador del sistema.


public boolean isCritical  ( ) { return true ; }

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


public static void main  ( String [ ] args ) { try { LuaState L = LuaStateFactory . newLuaState ( ) ; L . openLibs ( ) ; if ( args . length > 0 ) { for ( int i = 0 ; i < args . length ; i ++ ) { int res = L . LloadFile ( args [ i ] ) ; if ( res == 0 ) { res = L . pcall ( 0 , 0 , 0 ) ; } if ( res != 0 ) { throw new LuaException ( "Error on file: " + args [ i ] + ". " + L . toString ( - 1 ) ) ; } } return ; } System . out . println ( "API Lua Java - console mode." ) ; BufferedReader inp = new BufferedReader ( new InputStreamReader ( System . in ) ) ; String line ; System . out . print ( "> " ) ; while ( ( line = inp . readLine ( ) ) != null && ! line . equals ( "exit" ) ) { int ret = L . LloadBuffer ( line . getBytes ( ) , "from console" ) ; if ( ret == 0 ) { ret = L . pcall ( 0 , 0 , 0 ) ; } if ( ret != 0 ) { System . err . println ( "Error on line: " + line ) ; System . err . println ( L . toString ( - 1 ) ) ; } System . out . print ( "> " ) ; } L . close ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } }

Crea una consola para la interacción del usuario.


public int size  ( ) { return edges . size ( ) ; }

Devuelve el número de bordes en el gráfico de llamadas.


public int find  ( int x ) { if ( array [ x ] < 0 ) { return x ; } else { array [ x ] = find ( array [ x ] ) ; return array [ x ] ; } }

Buscar () encuentra el nombre (int) del conjunto que contiene un elemento dado.Realiza la compresión de la ruta a lo largo del camino.


public static Response makeErrorResponse  ( StatusType status , DruidQuery < ? > druidQuery , Throwable cause , ObjectWriter writer ) { String reason = null ; String description = null ; if ( cause instanceof ProcessingException && cause . getCause ( ) != null ) { cause = cause . getCause ( ) ; } if ( cause != null ) { reason = cause . getClass ( ) . getName ( ) ; description = String . valueOf ( cause . getMessage ( ) ) ; } return makeErrorResponse ( status . getStatusCode ( ) , reason , description , druidQuery , writer ) ; }

Construye la respuesta de error de la excepción.


public boolean selectServiceTab  ( String url ) { url = url . replaceAll ( ".*://" , "" ) ; for ( int i = 0 ; i < tabbedPane . getTabCount ( ) ; i ++ ) { if ( tabbedPane . getTitleAt ( i ) . equalsIgnoreCase ( url ) ) { tabbedPane . setSelectedIndex ( i ) ; return true ; } } return false ; }

Seleccione la pestaña Servicio dado, si está presente


public RegisterEntryTypeDescriptorSpaceOperationRequest ( ) { }


public ExperimentChangeEvent ( UserInfo user , ExperimentBase experiment , String propertyName , String before , String after ) { super ( user , propertyName , before , after ) ; if ( experiment == null ) { throw new IllegalArgumentException ( "Experiment must not be null!" ) ; } this . experiment = experiment ; this . appName = experiment . getApplicationName ( ) ; }

Crea un evento que denota un experimento. Cambio de propiedades.


@ Subscribe ( threadMode = ThreadMode . MAIN ) public void onEventMainThread  ( LinkEvent event ) { final String fragmentTag = event . getFragmentTag ( ) ; mRTApi . removeFragment ( fragmentTag ) ; if ( ! event . wasCancelled ( ) && ID_01_LINK_FRAGMENT . equals ( fragmentTag ) ) { RTEditText editor = getActiveEditor ( ) ; if ( editor != null ) { Link link = event . getLink ( ) ; String url = null ; if ( link != null && link . isValid ( ) ) { Selection selection = mLinkSelection != null && mLinkSelection . end ( ) <= editor . length ( ) ? mLinkSelection : new Selection ( editor ) ; String linkText = link . getLinkText ( ) ; Editable str = editor . getText ( ) ; str . replace ( selection . start ( ) , selection . end ( ) , linkText ) ; editor . setSelection ( selection . start ( ) , selection . start ( ) + linkText . length ( ) ) ; url = link . getUrl ( ) ; } editor . applyEffect ( Effects . LINK , url ) ; } } }

Linkfragment ha cerrado -> Procesar el resultado.


private static float drawDash  ( Path2D . Float path , float dashPercentage , long prevX , long prevY , long nextX , long nextY , double currXNorm , double currYNorm ) { if ( prevX == nextX && prevY == nextY ) { return dashPercentage ; } double xd , yd ; double prevXNorm = path . getCurrentPoint ( ) . getX ( ) ; double prevYNorm = path . getCurrentPoint ( ) . getY ( ) ; float pathLength = ( float ) Point2D . distance ( prevXNorm , prevYNorm , currXNorm , currYNorm ) ; float dashLength = computeDashLength ( DASH_LENGTH , X_TO_Y_RATIO , prevX , prevY , nextX , nextY , prevXNorm , prevYNorm , currXNorm , currYNorm ) ; float drawLength = dashLength / 2 ; float currentDashPosition = dashPercentage * dashLength ; while ( pathLength > 0 ) { xd = currXNorm - prevXNorm ; yd = currYNorm - prevYNorm ; if ( currentDashPosition > drawLength ) { float currentDrawLength = currentDashPosition - drawLength ; float pathLengthToDraw = pathLength > currentDrawLength ? currentDrawLength : pathLength ; path . lineTo ( prevXNorm + xd * pathLengthToDraw / pathLength , prevYNorm + yd * pathLengthToDraw / pathLength ) ; currentDashPosition -= pathLengthToDraw ; pathLength -= pathLengthToDraw ; } else { float pathLengthToDraw = pathLength > currentDashPosition ? currentDashPosition : pathLength ; path . moveTo ( prevXNorm + xd * pathLengthToDraw / pathLength , prevYNorm + yd * pathLengthToDraw / pathLength ) ; currentDashPosition -= pathLengthToDraw ; pathLength -= pathLengthToDraw ; } prevXNorm = path . getCurrentPoint ( ) . getX ( ) ; prevYNorm = path . getCurrentPoint ( ) . getY ( ) ; if ( currentDashPosition == 0 ) { currentDashPosition = dashLength ; } } return currentDashPosition / dashLength ; }

TODO Investiga el problema de rendimiento cuando se deben extraer muchos guiones, lo que resulta en muchas llamadas MOCETO / LINETO.Es posible que este no sea un problema si decidimos escalar la longitud del tablero en función de la gama global.


@ SuppressWarnings ( "unused" ) @ Deprecated private boolean isDataExists  ( DataSupport baseObj , DataSupport associatedModel ) { boolean exists = false ; SQLiteDatabase db = Connector . getDatabase ( ) ; Cursor cursor = null ; try { cursor = db . query ( getJoinTableName ( baseObj , associatedModel ) , null , getSelection ( baseObj , associatedModel ) , getSelectionArgs ( baseObj , associatedModel ) , null , null , null ) ; exists = cursor . getCount ( ) > 0 ; } catch ( Exception e ) { e . printStackTrace ( ) ; return true ; } finally { cursor . close ( ) ; } return exists ; }

Compruebe si las asociaciones entre el modelo automático y el modelo asociado ya se guardan en la tabla de unión intermedia.


public int equivHashCode  ( ) { final int prime = 31 ; int result = 1 ; result = prime * result + ( ( name == null ) ? 0 : name . hashCode ( ) ) ; result = prime * result + ( ( type == null ) ? 0 : type . hashCode ( ) ) ; return result ; }

Devuelve un código hash para este objeto, consistente con la igualdad estructural.


public StatisticalReferenceDataset [ ] createAll  ( ) throws IOException  { return new StatisticalReferenceDataset [ ] { createKirby2 ( ) , createMGH17 ( ) } ; }

Devuelve una matriz con todos los conjuntos de datos de referencia disponibles.


private static int assignLevelToAspect  ( ConfigAspect aspect , Map < Class < ? extends ConfigAspect > , ConfigAspect > aspectsByType , List < Class < ? extends ConfigAspect > > visiting , Map < ConfigAspect , Integer > aspectToLevel ) { Class < ? extends ConfigAspect > aspectType = aspect . getClass ( ) ; if ( aspectToLevel . containsKey ( aspect ) ) { return aspectToLevel . get ( aspect ) ; } if ( visiting . contains ( aspectType ) ) { throw new IllegalStateException ( String . format ( "Cyclic dependency between config aspect attributes. Cycle is: %s <- %s" , aspectType , Joiner . on ( " <- " ) . join ( visiting ) ) ) ; } visiting . add ( aspectType ) ; Integer childMaxHeight = 0 ; for ( Class < ? extends ConfigAspect > dep : aspect . mergeDependencies ( ) ) { if ( aspectsByType . containsKey ( dep ) ) { Integer childHeight = assignLevelToAspect ( aspectsByType . get ( dep ) , aspectsByType , visiting , aspectToLevel ) ; childMaxHeight = childHeight > childMaxHeight ? childHeight : childMaxHeight ; } else { throw new IllegalStateException ( String . format ( "config aspect %s depends on an unregistered aspect %s." , aspectType . getSimpleName ( ) , dep . getSimpleName ( ) ) ) ; } } visiting . remove ( aspectType ) ; aspectToLevel . put ( aspect , childMaxHeight + 1 ) ; return childMaxHeight + 1 ; }

Hace un recorrido DFS y calcula la altura máxima (nivel) de cada nodo desde el nodo del fregadero.


public long dump  ( RandomAccessFile rafIn ) throws IOException { long before = rafIn . getFilePointer ( ) ; rafIn . writeUTF ( procHeader ) ; long after = rafIn . getFilePointer ( ) ; return after - before ; }

Método que escribe el encabezado Proc a un AleatingAccessFile.


public Future execute  ( CompletionCallback callback ) { if ( callback == null ) throw new IllegalArgumentException ( "Callback cannot be null" ) ; TaskManagerImpl taskManager = new TaskManagerImpl ( this . executor_ , this . task_ , callback ) ; this . executor_ . execute ( taskManager ) ; return new Future ( taskManager ) ; }


public String join  ( String separator ) throws JSONException { int len = this . length ( ) ; StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 ; i < len ; i += 1 ) { if ( i > 0 ) { sb . append ( separator ) ; } sb . append ( JSONObject . valueToString ( this . myArrayList . get ( i ) ) ) ; } return sb . toString ( ) ; }

Haz una cadena de los contenidos de este jsonarray.La cadena <código> separador </ código> se inserta entre cada elemento.ADVERTENCIA: Este método asume que la estructura de datos es acicaque.


public static float calculateWidth  ( float height , float targetAspectRatio ) { return targetAspectRatio * height ; }

Calcula el ancho de un rectángulo dado los bordes superior e inferior y una relación de aspecto.


public DexlibAbstractInstruction instructionAtAddress  ( int address ) { DexlibAbstractInstruction i = null ; while ( i == null && address >= 0 ) { i = instructionAtAddress . get ( address ) ; address -- ; } return i ; }

Devuelva la instrucción que está presente en la dirección del código de bytes.


private double [ ] resample  ( double [ ] sample , int k ) { final int len = sample . length ; final double [ ] out = new double [ k ] ; for ( int i = 0 ; i < k ; i ++ ) { out [ i ] = gen . nextInt ( len ) ; } return out ; }

Devuelva una muestra de bootstrap (con reemplazo) de tamaño k de la muestra.


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


public DocumentWordDistroGraph ( ) { MinSize = 1 ; MaxSize = 2 ; CorrelationWindow = 3 ; }

Crea una nueva instancia de DocumentWordDiSrograph.


public static LegendOptionData decodeXML  ( Document document , String elementName ) { LegendOptionData legendOptionData = new LegendOptionData ( ) ; if ( ( document != null ) && ( elementName != null ) ) { NodeList nodeList = document . getElementsByTagName ( elementName ) ; if ( nodeList . getLength ( ) > 0 ) { Node node = nodeList . item ( 0 ) ; Node child = node . getFirstChild ( ) ; while ( child != null ) { if ( child . getNodeType ( ) == Node . ELEMENT_NODE ) { String nodeName = child . getNodeName ( ) ; if ( nodeName . compareToIgnoreCase ( IMAGE_WIDTH ) == 0 ) { legendOptionData . setImageWidth ( decodeIntElement ( document , child ) ) ; } else if ( nodeName . compareToIgnoreCase ( IMAGE_HEIGHT ) == 0 ) { legendOptionData . setImageHeight ( decodeIntElement ( document , child ) ) ; } else if ( nodeName . compareToIgnoreCase ( IMAGE_DPI ) == 0 ) { legendOptionData . setDpi ( decodeIntElement ( document , child ) ) ; } else if ( nodeName . compareToIgnoreCase ( IMAGE_SIZE ) == 0 ) { legendOptionData . setImageSize ( decodeIntElement ( document , child ) ) ; } else if ( nodeName . compareToIgnoreCase ( MAINTAIN_ASPECT_RATIO ) == 0 ) { legendOptionData . setMaintainAspectRatio ( decodeBooleanElement ( document , child ) ) ; } else if ( nodeName . compareToIgnoreCase ( SHOW_LABELS ) == 0 ) { legendOptionData . setShowLabels ( decodeBooleanElement ( document , child ) ) ; } else if ( nodeName . compareToIgnoreCase ( SHOW_TITLE ) == 0 ) { legendOptionData . setShowTitle ( decodeBooleanElement ( document , child ) ) ; } else if ( nodeName . compareToIgnoreCase ( SPLIT_SYMBOLIZERS ) == 0 ) { legendOptionData . setSplitSymbolizers ( decodeBooleanElement ( document , child ) ) ; } else if ( nodeName . compareToIgnoreCase ( FONT_ANTI_ALIASING ) == 0 ) { legendOptionData . setFontAntiAliasing ( decodeBooleanElement ( document , child ) ) ; } else if ( nodeName . compareToIgnoreCase ( SHOW_BORDER ) == 0 ) { legendOptionData . setBorder ( decodeBooleanElement ( document , child ) ) ; } else if ( nodeName . compareToIgnoreCase ( BAND_INFORMATION ) == 0 ) { legendOptionData . setBandInformation ( decodeBooleanElement ( document , child ) ) ; } else if ( nodeName . compareToIgnoreCase ( BACKGROUND_TRANSPARENT ) == 0 ) { legendOptionData . setTransparent ( decodeBooleanElement ( document , child ) ) ; } else if ( nodeName . compareToIgnoreCase ( LABEL_FONT ) == 0 ) { legendOptionData . setLabelFont ( decodeFontElement ( document , child ) ) ; } else if ( nodeName . compareToIgnoreCase ( LABEL_FONT_COLOUR ) == 0 ) { legendOptionData . setLabelFontColour ( decodeColourElement ( document , child ) ) ; } else if ( nodeName . compareToIgnoreCase ( BORDER_COLOUR ) == 0 ) { legendOptionData . setBorderColour ( decodeColourElement ( document , child ) ) ; } else if ( nodeName . compareToIgnoreCase ( BACKGROUND_COLOUR ) == 0 ) { legendOptionData . setBackgroundColour ( decodeColourElement ( document , child ) ) ; } } child = child . getNextSibling ( ) ; } } } return legendOptionData ; }

Decodo de las opciones de leyenda de XML.


public static Map < String , Object > storeIncomingEmail  ( DispatchContext dctx , Map < String , ? extends Object > context ) { Delegator delegator = dctx . getDelegator ( ) ; LocalDispatcher dispatcher = dctx . getDispatcher ( ) ; MimeMessageWrapper wrapper = ( MimeMessageWrapper ) context . get ( "messageWrapper" ) ; Timestamp nowTimestamp = UtilDateTime . nowTimestamp ( ) ; GenericValue userLogin = ( GenericValue ) context . get ( "userLogin" ) ; Locale locale = ( Locale ) context . get ( "locale" ) ; String partyIdTo = null ; String partyIdFrom = null ; String contentType = null ; String communicationEventId = null ; String contactMechIdFrom = null ; String contactMechIdTo = null ; Map < String , Object > result = null ; try { String contentTypeRaw = wrapper . getContentType ( ) ; int idx = contentTypeRaw . indexOf ( ";" ) ; if ( idx == - 1 ) idx = contentTypeRaw . length ( ) ; contentType = contentTypeRaw . substring ( 0 , idx ) ; if ( contentType == null || contentType . equals ( "" ) ) contentType = "text/html" ; contentType = contentType . toLowerCase ( ) ; Address [ ] addressesFrom = wrapper . getFrom ( ) ; Address [ ] addressesTo = wrapper . getTo ( ) ; Address [ ] addressesCC = wrapper . getCc ( ) ; Address [ ] addressesBCC = wrapper . getBcc ( ) ; String messageId = wrapper . getMessageId ( ) . replaceAll ( "[<>]" , "" ) ; String aboutThisEmail = "message [" + messageId + "] from [" + ( ( addressesFrom == null || addressesFrom [ 0 ] == null ) ? "not found" : addressesFrom [ 0 ] . toString ( ) ) + "] to [" + ( ( addressesTo == null || addressesTo [ 0 ] == null ) ? "not found" : addressesTo [ 0 ] . toString ( ) ) + "]" ; if ( Debug . verboseOn ( ) ) Debug . logVerbose ( "Processing Incoming Email " + aboutThisEmail , module ) ; String spamHeaderName = EntityUtilProperties . getPropertyValue ( "general.properties" , "mail.spam.name" , "N" , delegator ) ; String configHeaderValue = EntityUtilProperties . getPropertyValue ( "general.properties" , "mail.spam.value" , delegator ) ; if ( ! spamHeaderName . equals ( "N" ) && wrapper . getHeader ( spamHeaderName ) != null && wrapper . getHeader ( spamHeaderName ) . length > 0 ) { String msgHeaderValue = wrapper . getHeader ( spamHeaderName ) [ 0 ] ; if ( msgHeaderValue != null && msgHeaderValue . startsWith ( configHeaderValue ) ) { Debug . logInfo ( "Incoming Email message ignored, was detected by external spam checker" , module ) ; return ServiceUtil . returnSuccess ( UtilProperties . getMessage ( resource , "PartyCommEventMessageIgnoredDetectedByExternalSpamChecker" , locale ) ) ; } } if ( addressesFrom == null ) { Debug . logInfo ( "Incoming Email message ignored, had not 'from' email address" , module ) ; return ServiceUtil . returnSuccess ( UtilProperties . getMessage ( resource , "PartyCommEventMessageIgnoredNoFromAddressSpecified" , locale ) ) ; } List < GenericValue > commEvents ; try { commEvents = EntityQuery . use ( delegator ) . from ( "CommunicationEvent" ) . where ( "messageId" , messageId ) . queryList ( ) ; } catch ( GenericEntityException e ) { Debug . logError ( e , module ) ; return ServiceUtil . returnError ( e . getMessage ( ) ) ; } if ( ! commEvents . isEmpty ( ) ) { Debug . logInfo ( "Ignoring Duplicate Email: " + aboutThisEmail , module ) ; return ServiceUtil . returnSuccess ( UtilProperties . getMessage ( resource , "PartyCommEventMessageIgnoredDuplicateMessageId" , locale ) ) ; } List < Map < String , Object > > toParties = buildListOfPartyInfoFromEmailAddresses ( addressesTo , userLogin , dispatcher ) ; List < Map < String , Object > > ccParties = buildListOfPartyInfoFromEmailAddresses ( addressesCC , userLogin , dispatcher ) ; List < Map < String , Object > > bccParties = buildListOfPartyInfoFromEmailAddresses ( addressesBCC , userLogin , dispatcher ) ; if ( ! toParties . isEmpty ( ) ) { Map < String , Object > firstAddressTo = toParties . get ( 0 ) ; partyIdTo = ( String ) firstAddressTo . get ( "partyId" ) ; contactMechIdTo = ( String ) firstAddressTo . get ( "contactMechId" ) ; } String deliveredTo = wrapper . getFirstHeader ( "Delivered-To" ) ; if ( deliveredTo != null ) { String dn = deliveredTo . substring ( deliveredTo . indexOf ( "@" ) + 1 , deliveredTo . length ( ) ) ; if ( deliveredTo . startsWith ( dn ) ) { deliveredTo = deliveredTo . substring ( dn . length ( ) + 1 , deliveredTo . length ( ) ) ; } } if ( ( partyIdTo == null ) && ( deliveredTo != null ) ) { result = dispatcher . runSync ( "findPartyFromEmailAddress" , UtilMisc . < String , Object > toMap ( "address" , deliveredTo , "userLogin" , userLogin ) ) ; partyIdTo = ( String ) result . get ( "partyId" ) ; contactMechIdTo = ( String ) result . get ( "contactMechId" ) ; } if ( userLogin . get ( "partyId" ) == null && partyIdTo != null ) { int ch = 0 ; for ( ch = partyIdTo . length ( ) ; ch > 0 && Character . isDigit ( partyIdTo . charAt ( ch - 1 ) ) ; ch -- ) { } userLogin . put ( "partyId" , partyIdTo . substring ( 0 , ch ) ) ; } result = getParyInfoFromEmailAddress ( addressesFrom , userLogin , dispatcher ) ; partyIdFrom = ( String ) result . get ( "partyId" ) ; contactMechIdFrom = ( String ) result . get ( "contactMechId" ) ; Map < String , Object > commEventMap = new HashMap < String , Object > ( ) ; commEventMap . put ( "communicationEventTypeId" , "AUTO_EMAIL_COMM" ) ; commEventMap . put ( "contactMechTypeId" , "EMAIL_ADDRESS" ) ; commEventMap . put ( "messageId" , messageId ) ; String subject = wrapper . getSubject ( ) ; commEventMap . put ( "subject" , subject ) ; commEventMap . put ( "entryDate" , nowTimestamp ) ; commEventMap . put ( "datetimeStarted" , UtilDateTime . toTimestamp ( wrapper . getSentDate ( ) ) ) ; commEventMap . put ( "datetimeEnded" , UtilDateTime . toTimestamp ( wrapper . getReceivedDate ( ) ) ) ; commEventMap . put ( "roleTypeIdFrom" , "_NA_" ) ; commEventMap . put ( "roleTypeIdTo" , "_NA_" ) ; String messageBodyContentType = wrapper . getMessageBodyContentType ( ) ; if ( messageBodyContentType . indexOf ( ";" ) > - 1 ) { messageBodyContentType = messageBodyContentType . substring ( 0 , messageBodyContentType . indexOf ( ";" ) ) ; } String messageBody = null ; if ( wrapper . getMainPartCount ( ) > 1 ) { for ( int ind = 0 ; ind < wrapper . getMainPartCount ( ) ; ind ++ ) { BodyPart p = wrapper . getPart ( ind + "" ) ; if ( p . getContentType ( ) . toLowerCase ( ) . indexOf ( "text/plain" ) > - 1 ) { messageBody = ( String ) p . getContent ( ) ; break ; } } } if ( messageBody == null ) { messageBody = wrapper . getMessageBody ( ) ; } commEventMap . put ( "content" , messageBody ) ; commEventMap . put ( "contentMimeTypeId" , messageBodyContentType . toLowerCase ( ) ) ; String [ ] inReplyTo = wrapper . getHeader ( "In-Reply-To" ) ; if ( inReplyTo != null && inReplyTo [ 0 ] != null ) { GenericValue parentCommEvent = null ; try { parentCommEvent = EntityQuery . use ( delegator ) . from ( "CommunicationEvent" ) . where ( "messageId" , inReplyTo [ 0 ] . replaceAll ( "[<>]" , "" ) ) . queryFirst ( ) ; } catch ( GenericEntityException e ) { Debug . logError ( e , module ) ; } if ( parentCommEvent != null ) { String parentCommEventId = parentCommEvent . getString ( "communicationEventId" ) ; String orgCommEventId = parentCommEvent . getString ( "origCommEventId" ) ; if ( orgCommEventId == null ) orgCommEventId = parentCommEventId ; commEventMap . put ( "parentCommEventId" , parentCommEventId ) ; commEventMap . put ( "origCommEventId" , orgCommEventId ) ; } } populateAddressesFromMessage ( wrapper , commEventMap ) ; String commNote = "" ; if ( partyIdFrom != null ) { commEventMap . put ( "partyIdFrom" , partyIdFrom ) ; commEventMap . put ( "contactMechIdFrom" , contactMechIdFrom ) ; } else { commNote += "Sent from: " + ( ( InternetAddress ) addressesFrom [ 0 ] ) . getAddress ( ) + "; " ; commNote += "Sent Name from: " + ( ( InternetAddress ) addressesFrom [ 0 ] ) . getPersonal ( ) + "; " ; } if ( partyIdTo != null ) { commEventMap . put ( "partyIdTo" , partyIdTo ) ; commEventMap . put ( "contactMechIdTo" , contactMechIdTo ) ; } else { commNote += "Sent to: " + ( ( InternetAddress ) addressesTo [ 0 ] ) . getAddress ( ) + "; " ; if ( deliveredTo != null ) { commNote += "Delivered-To: " + deliveredTo + "; " ; } } commNote += "Sent to: " + ( ( InternetAddress ) addressesTo [ 0 ] ) . getAddress ( ) + "; " ; commNote += "Delivered-To: " + deliveredTo + "; " ; if ( partyIdTo != null && partyIdFrom != null ) { commEventMap . put ( "statusId" , "COM_ENTERED" ) ; } else { commEventMap . put ( "statusId" , "COM_UNKNOWN_PARTY" ) ; } if ( commNote . length ( ) > 255 ) commNote = commNote . substring ( 0 , 255 ) ; if ( ! ( "" . equals ( commNote ) ) ) { commEventMap . put ( "note" , commNote ) ; } commEventMap . put ( "userLogin" , userLogin ) ; StringBuilder headerString = new StringBuilder ( ) ; Enumeration < ? > headerLines = wrapper . getMessage ( ) . getAllHeaderLines ( ) ; while ( headerLines . hasMoreElements ( ) ) { headerString . append ( System . getProperty ( "line.separator" ) ) ; headerString . append ( headerLines . nextElement ( ) ) ; } String header = headerString . toString ( ) ; commEventMap . put ( "headerString" , header . replaceAll ( "[<>]" , "" ) ) ; result = dispatcher . runSync ( "createCommunicationEvent" , commEventMap ) ; communicationEventId = ( String ) result . get ( "communicationEventId" ) ; Debug . logInfo ( "Persisting New Email: " + aboutThisEmail + " into CommunicationEventId: " + communicationEventId , module ) ; createAttachmentContent ( dispatcher , delegator , wrapper , communicationEventId , userLogin ) ; createCommEventRoles ( userLogin , delegator , dispatcher , communicationEventId , toParties , "ADDRESSEE" ) ; createCommEventRoles ( userLogin , delegator , dispatcher , communicationEventId , ccParties , "CC" ) ; createCommEventRoles ( userLogin , delegator , dispatcher , communicationEventId , bccParties , "BCC" ) ; List < Map < String , Object > > toWorkEffortInfos = buildListOfWorkEffortInfoFromEmailAddresses ( addressesTo , userLogin , dispatcher ) ; List < Map < String , Object > > ccWorkEffortInfos = buildListOfWorkEffortInfoFromEmailAddresses ( addressesCC , userLogin , dispatcher ) ; List < Map < String , Object > > bccWorkEffortInfos = buildListOfWorkEffortInfoFromEmailAddresses ( addressesBCC , userLogin , dispatcher ) ; createCommunicationEventWorkEffs ( userLogin , dispatcher , toWorkEffortInfos , communicationEventId ) ; createCommunicationEventWorkEffs ( userLogin , dispatcher , ccWorkEffortInfos , communicationEventId ) ; createCommunicationEventWorkEffs ( userLogin , dispatcher , bccWorkEffortInfos , communicationEventId ) ; Map < String , Object > results = ServiceUtil . returnSuccess ( ) ; results . put ( "communicationEventId" , communicationEventId ) ; results . put ( "statusId" , commEventMap . get ( "statusId" ) ) ; return results ; } catch ( MessagingException e ) { Debug . logError ( e , module ) ; return ServiceUtil . returnError ( e . getMessage ( ) ) ; } catch ( GenericServiceException e ) { Debug . logError ( e , module ) ; return ServiceUtil . returnError ( e . getMessage ( ) ) ; } catch ( Exception e ) { Debug . logError ( e , module ) ; return ServiceUtil . returnError ( e . getMessage ( ) ) ; } }

Este servicio es el principal para procesar correos electrónicos entrantes. Es su único argumento es una envoltura para el objeto de mimemesaje de JavaMail. De este objeto, se puede acceder a todos los campos, encabezados y contenido del mensaje. Lo primero que hace este servicio intenta descubrir el PartyID del remitente de mensajes haciendo una búsqueda inversa en la dirección de correo electrónico. Utiliza el servicio FindPartyfromemailAlayDress para hacer esto. Luego crea una entidad de CommunicationEvent llamando al Servicio CreateCommunicEvent usando los campos apropiados del correo electrónico y el PartyID descubierto, si existe, como el PartyIdFdefr. Tenga en cuenta que establece el campo de comunicativoEventypeid en AUTO_EMAIL_COMM. Esto es útil para rastrear las comunicaciones generadas por correo electrónico. El servicio intenta encontrar contenido adecuado para su inclusión en el campo CommunicationEvent.Content. Si el TypeType del contenido comienza con "Texto", la llamada GetContent () devuelve una cadena y se usa. Si el TypeType comienza con "Multipart", entonces se utilizan las "partes" del contenido a través de la primera de tipo MIME, se usa "Texto / ...". Si el TypeType tiene un valor de "Multipart", las partes del contenido (excepto el que se usa en el campo principalEvent.Content) se encuentran en ciclismo a través de la entidad de CommunicationEvent utilizando el servicio de createcommContentdatareReSource. Esto sucede en el método EmailWorker.AdattachmentStocomVevent. Sin embargo, los multipartículos pueden contener multipartículos. Se ha agregado una función recursiva. -Ales byers - Hans Bakker


static boolean isAlive  ( Vertex vertex ) { if ( vertex == null ) return false ; try { return vertex . property ( Schema . BaseType . TYPE . name ( ) ) . isPresent ( ) ; } catch ( IllegalStateException e ) { return false ; } }

El estado del vértice en la base de datos.Esto puede detectar los nodos Ghost y permitirles ser excluidos de los cálculos.Si el vértice está vivo, es probable que sea un concepto válido de mapas finales.


public static boolean isPrimitive  ( Type type ) { return PRIMITIVE_TO_WRAPPER_TYPE . containsKey ( type ) ; }

Devuelve VERDADERO si este tipo es un primitivo.


public AdsGetSuggestionsQueryWithRegions cities  ( String value ) { return unsafeParam ( "cities" , value ) ; }

IDS de ciudades donde se buscan objetos, separados de una coma.


public Entity createEntity  ( String name ) throws DOMException { if ( errorChecking && ! isXMLName ( name , xml11Version ) ) { String msg = DOMMessageFormatter . formatMessage ( DOMMessageFormatter . DOM_DOMAIN , "INVALID_CHARACTER_ERR" , null ) ; throw new DOMException ( DOMException . INVALID_CHARACTER_ERR , msg ) ; } return new EntityImpl ( this , name ) ; }

Método de fábrica no DOM;Crea una entidad que tiene este documento como su propietario.(REC-DOM-LEVEL-1-19981001 dejó el proceso de construcción de información DTD no especificada).


public static SM_SYSTEM_MESSAGE STR_ONE_NO_LONGER_INCLUDED  ( String value0 ) { return new SM_SYSTEM_MESSAGE ( 1300636 , value0 ) ; }


protected void determineTargetPitchmarks  ( List < SelectedUnit > units ) { for ( SelectedUnit unit : units ) { UnitData unitData = ( UnitData ) unit . getConcatenationData ( ) ; assert unitData != null : "Should not have null unitdata here" ; Datagram [ ] datagrams = unitData . getFrames ( ) ; Datagram [ ] frames = null ; if ( datagrams != null && datagrams . length > 0 ) { frames = datagrams ; } else { int targetLength = ( int ) ( unit . getTarget ( ) . getTargetDurationInSeconds ( ) * timeline . getSampleRate ( ) ) ; frames = new Datagram [ ] { createZeroDatagram ( targetLength ) } ; } int unitDuration = 0 ; for ( int i = 0 ; i < frames . length ; i ++ ) { int dur = ( int ) frames [ i ] . getDuration ( ) ; unitDuration += frames [ i ] . getDuration ( ) ; } unitData . setUnitDuration ( unitDuration ) ; unitData . setFrames ( frames ) ; } }

Determine las marcas de puntos de destino (= Duración y F0) para cada unidad.


public int propagator  ( ) { String s = soot . PhaseOptions . getString ( options , "propagator" ) ; if ( s . equalsIgnoreCase ( "iter" ) ) return propagator_iter ; if ( s . equalsIgnoreCase ( "worklist" ) ) return propagator_worklist ; if ( s . equalsIgnoreCase ( "cycle" ) ) return propagator_cycle ; if ( s . equalsIgnoreCase ( "merge" ) ) return propagator_merge ; if ( s . equalsIgnoreCase ( "alias" ) ) return propagator_alias ; if ( s . equalsIgnoreCase ( "none" ) ) return propagator_none ; throw new RuntimeException ( "Invalid value " + s + " of phase option propagator" ) ; }

Propagador - Seleccione el algoritmo de propagación.Esta opción le dice a la chispa qué algoritmo de propagación para usar.


public static String currentTimeString  ( ) { return TestUtils . relativeTimeString ( 0 ) ; }

Devuelve la hora actual como una cadena formateada según sea necesario.


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

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


public final void writeBoolean  ( boolean b ) { write ( b ? 1 : 0 ) ; }

Escribe un booleano al paquete como un byte.


@ NotNull public String computePreferredTheme  ( @ NotNull Configuration configuration ) { MergedManifest manifest = MergedManifest . get ( myModule ) ; String activity = configuration . getActivity ( ) ; if ( activity != null ) { String activityFqcn = activity ; if ( activity . startsWith ( "." ) ) { String pkg = StringUtil . notNullize ( manifest . getPackage ( ) ) ; activityFqcn = pkg + activity ; } ActivityAttributes attributes = manifest . getActivityAttributes ( activityFqcn ) ; if ( attributes != null ) { String theme = attributes . getTheme ( ) ; if ( theme != null && theme . startsWith ( SdkConstants . PREFIX_RESOURCE_REF ) ) { return theme ; } } attributes = manifest . getActivityAttributes ( activity ) ; if ( attributes != null ) { String theme = attributes . getTheme ( ) ; if ( theme != null && theme . startsWith ( SdkConstants . PREFIX_RESOURCE_REF ) ) { return theme ; } } } return manifest . getDefaultTheme ( configuration . getTarget ( ) , configuration . getScreenSize ( ) , configuration . getDevice ( ) ) ; }


@ Override public void clusterOffline  ( ClusterNode clusterNode ) { LOGGER . warn ( "Detected Terracotta cluster offline event for node: " + clusterNode . getId ( ) ) ; String hostname ; try { hostname = InetAddress . getLocalHost ( ) . getHostName ( ) ; } catch ( Exception e ) { LOGGER . error ( "Unable to get local hostname" , e ) ; hostname = "#unknown host#" ; } SMS_LOGGER . warn ( "Initiating C2MON server shutdown of " + System . getProperty ( "c2mon.server.name" ) + " on " + hostname ) ; }

Este nodo ha perdido el contacto (posiblemente temporalmente) con el clúster y no puede ejecutar operaciones agrupadas


public static void createESInput  ( ) { String esTestIndex = SystemConfiguration . getProperty ( DistributedTestDriver . ES_INPUT_NODES_PROPERTY ) + ":" + SystemConfiguration . getProperty ( DistributedTestDriver . ES_INPUT_PORT_PROPERTY ) + "/" + SystemConfiguration . getProperty ( DistributedTestDriver . ES_INPUT_INDEX_PROPERTY ) ; String esType = SystemConfiguration . getProperty ( DistributedTestDriver . ES_INPUT_TYPE_PROPERTY ) ; logger . info ( "ES input being created at " + esTestIndex + " with type " + esType ) ; logger . info ( "Creating new testindex:" ) ; ProcessBuilder pCreate = new ProcessBuilder ( "curl" , "-XPUT" , esTestIndex ) ; try { TestUtils . executeCommand ( pCreate ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } logger . info ( " \n \n Adding elements to testindex:" ) ; String indexTypeNum1 = esTestIndex + "/" + esType + "/1" ; logger . info ( "indexTypeNum1 = " + indexTypeNum1 ) ; ProcessBuilder pAdd1 = new ProcessBuilder ( "curl" , "-XPUT" , indexTypeNum1 , "-d" , "{\"qname\":\"a.b.c.com\",\"date\":\"2016-02-20T23:29:05.000Z\",\"qtype\":[\"1\"]" + ",\"rcode\":\"0\",\"src_ip\":\"55.55.55.55\",\"dest_ip\":\"1.2.3.6\"" + ",\"ip\":[\"10.20.30.40\",\"10.20.30.60\"]}" ) ; String indexTypeNum2 = esTestIndex + "/" + esType + "/2" ; logger . info ( "indexTypeNum2 = " + indexTypeNum2 ) ; ProcessBuilder pAdd2 = new ProcessBuilder ( "curl" , "-XPUT" , indexTypeNum2 , "-d" , "{\"qname\":\"d.e.com\",\"date\":\"2016-02-20T23:29:06.000Z\",\"qtype\":[\"1\"]" + ",\"rcode\":\"0\",\"src_ip\":\"127.128.129.130\",\"dest_ip\":\"1.2.3.4\"" + ",\"ip\":[\"5.6.7.8\"]}" ) ; String indexTypeNum3 = esTestIndex + "/" + esType + "/3" ; logger . info ( "indexTypeNum3 = " + indexTypeNum3 ) ; ProcessBuilder pAdd3 = new ProcessBuilder ( "curl" , "-XPUT" , indexTypeNum3 , "-d" , "{\"qname\":\"d.e.com\",\"date\":\"2016-02-20T23:29:07.000Z\",\"qtype\":[\"1\"]" + ",\"rcode\":\"0\",\"src_ip\":\"131.132.133.134\",\"dest_ip\":\"9.10.11.12\"" + ",\"ip\":[\"13.14.15.16\"]}" ) ; String indexTypeNum4 = esTestIndex + "/" + esType + "/4" ; logger . info ( "indexTypeNum4 = " + indexTypeNum4 ) ; ProcessBuilder pAdd4 = new ProcessBuilder ( "curl" , "-XPUT" , indexTypeNum4 , "-d" , "{\"qname\":\"d.e.com\",\"date\":\"2016-02-20T23:29:08.000Z\",\"qtype\":[\"1\"]" + ",\"rcode\":\"3\",\"src_ip\":\"135.136.137.138\",\"dest_ip\":\"17.18.19.20\"" + ",\"ip\":[\"21.22.23.24\"]}" ) ; String indexTypeNum5 = esTestIndex + "/" + esType + "/5" ; logger . info ( "indexTypeNum5 = " + indexTypeNum5 ) ; ProcessBuilder pAdd5 = new ProcessBuilder ( "curl" , "-XPUT" , indexTypeNum5 , "-d" , "{\"qname\":\"d.e.com\",\"date\":\"2016-02-20T23:29:09.000Z\",\"qtype\":[\"1\"]" + ",\"rcode\":\"0\",\"src_ip\":\"139.140.141.142\",\"dest_ip\":\"25.26.27.28\"" + ",\"ip\":[\"5.6.7.8\"]}" ) ; String indexTypeNum6 = esTestIndex + "/" + esType + "/6" ; logger . info ( "indexTypeNum6 = " + indexTypeNum6 ) ; ProcessBuilder pAdd6 = new ProcessBuilder ( "curl" , "-XPUT" , indexTypeNum6 , "-d" , "{\"qname\":\"d.e.com\",\"date\":\"2016-02-20T23:29:10.000Z\",\"qtype\":[\"1\"]" + ",\"rcode\":\"0\",\"src_ip\":\"143.144.145.146\",\"dest_ip\":\"33.34.35.36\"" + ",\"ip\":[\"5.6.7.8\"]}" ) ; String indexTypeNum7 = esTestIndex + "/" + esType + "/7" ; logger . info ( "indexTypeNum7 = " + indexTypeNum7 ) ; ProcessBuilder pAdd7 = new ProcessBuilder ( "curl" , "-XPUT" , indexTypeNum7 , "-d" , "{\"qname\":\"something.else\",\"date\":\"2016-02-20T23:29:11.000Z\",\"qtype\":[\"1\"]" + ",\"rcode\":\"0\",\"src_ip\":\"1.1.1.1\",\"dest_ip\":\"2.2.2.2\"" + ",\"ip\":[\"3.3.3.3\"]}" ) ; String indexTypeNum8 = esTestIndex + "/" + esType + "/8" ; logger . info ( "indexTypeNum8 = " + indexTypeNum8 ) ; ProcessBuilder pAdd8 = new ProcessBuilder ( "curl" , "-XPUT" , indexTypeNum8 , "-d" , "{\"qname\":\"something.else2\",\"date\":\"2016-02-20T23:29:12.000Z\",\"qtype\":[\"1\"]" + ",\"rcode\":\"0\",\"src_ip\":\"5.6.7.8\",\"dest_ip\":\"2.2.2.22\"" + ",\"ip\":[\"3.3.3.132\"]}" ) ; String indexTypeNum9 = esTestIndex + "/" + esType + "/9" ; logger . info ( "indexTypeNum9 = " + indexTypeNum9 ) ; ProcessBuilder pAdd9 = new ProcessBuilder ( "curl" , "-XPUT" , indexTypeNum9 , "-d" , "{\"qname\":\"something.else.on.stoplist\",\"date\":\"2016-02-20T23:29:13.000Z\",\"qtype\":[\"1\"]" + ",\"rcode\":\"0\",\"src_ip\":\"55.55.55.55\",\"dest_ip\":\"2.2.2.232\"" + ",\"ip\":[\"3.3.3.132\"]}" ) ; try { TestUtils . executeCommand ( pAdd1 ) ; TestUtils . executeCommand ( pAdd2 ) ; TestUtils . executeCommand ( pAdd3 ) ; TestUtils . executeCommand ( pAdd4 ) ; TestUtils . executeCommand ( pAdd5 ) ; TestUtils . executeCommand ( pAdd6 ) ; TestUtils . executeCommand ( pAdd7 ) ; TestUtils . executeCommand ( pAdd8 ) ; TestUtils . executeCommand ( pAdd9 ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } for ( int i = 1 ; i < 7 ; ++ i ) { logger . info ( "Retrieving element number = " + i + " from " + esTestIndex ) ; String elementGet = esTestIndex + "/" + esType + "/" + i ; logger . info ( "elementGet = " + elementGet ) ; ProcessBuilder pGet = new ProcessBuilder ( "curl" , "-XGET" , elementGet ) ; try { TestUtils . executeCommand ( pGet ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } }


public void add  ( Input key ) { synchronized ( this . keys ) { this . keys . put ( key . getEvent ( ) , key ) ; } }


public void remoteResourceMoved  ( ISVNRemoteResource resource , ISVNRemoteFolder destinationFolder , String destinationResourceName ) { for ( ISVNListener listener : repositoryListeners ) { listener . remoteResourceMoved ( resource , destinationFolder , destinationResourceName ) ; } }

Señala a todos los oyentes que se ha movido un recurso remoto.


@ SuppressWarnings ( "unused" ) public int batchDelete  ( ObjectInfo objInfo , String [ ] keys , Map failKeys ) throws MyException { ServerInfo server ; ProtoCommon . PkgHeader header ; byte [ ] bsPackage ; int offset ; Iterator it ; Map . Entry entry ; String key ; String value ; byte [ ] bsKey ; byte [ ] bsValue ; int i ; header = new ProtoCommon . PkgHeader ( ) ; header . key_hash_code = objInfo . getHashCode ( ) ; server = this . serverGroup . getServer ( header . key_hash_code ) ; if ( server == null ) { this . status = 2 ; return - 1 * this . status ; } try { header . body_len = objInfo . getPackLength ( ) + 4 ; header . cmd = ProtoCommon . FDHT_PROTO_CMD_BATCH_DEL ; header . keep_alive = ( byte ) ( this . serverGroup . keep_alive ? 1 : 0 ) ; header . timestamp = ( int ) ( System . currentTimeMillis ( ) / 1000 ) ; header . expires = 0 ; for ( i = 0 ; i < keys . length ; i ++ ) { header . body_len += 4 + keys [ i ] . getBytes ( ClientGlobal . g_charset ) . length ; } bsPackage = new byte [ ProtoCommon . FDHT_PROTO_PKG_HEADER_SIZE + header . body_len ] ; ProtoCommon . packHeader ( header , bsPackage ) ; offset = objInfo . pack ( bsPackage , ProtoCommon . FDHT_PROTO_PKG_HEADER_SIZE ) ; ProtoCommon . int2buff ( keys . length , bsPackage , offset ) ; offset += 4 ; for ( i = 0 ; i < keys . length ; i ++ ) { bsKey = keys [ i ] . getBytes ( ClientGlobal . g_charset ) ; ProtoCommon . int2buff ( bsKey . length , bsPackage , offset ) ; offset += 4 ; System . arraycopy ( bsKey , 0 , bsPackage , offset , bsKey . length ) ; offset += bsKey . length ; } OutputStream out = server . sock . getOutputStream ( ) ; out . write ( bsPackage ) ; ProtoCommon . PkgInfo pkgInfo = ProtoCommon . recvPackage ( server . sock . getInputStream ( ) , ProtoCommon . FDHT_PROTO_CMD_RESP , - 1 ) ; return this . parseBatchUpdate ( keys . length , server , pkgInfo , failKeys ) ; } catch ( IOException ex ) { System . err . println ( "server " + server . address . getAddress ( ) . getHostAddress ( ) + ":" + server . address . getPort ( ) + " IOException, error msg: " + ex . getMessage ( ) ) ; this . serverGroup . forceClose ( server ) ; this . status = 5 ; return - 1 * this . status ; } finally { this . serverGroup . closeServer ( server ) ; } }