idx
int64
0
34.9k
question
stringlengths
12
26.4k
target
stringlengths
15
2.15k
34,700
public static void o ( Zmat A ) { o ( A , Parameters . OutputFieldWidth , Parameters . OutputFracPlaces ) ; }
Print index specifications in readable format.
34,701
private void calculateMaxValue ( int seriesCount , int catCount ) { double v ; Number nV ; for ( int seriesIndex = 0 ; seriesIndex < seriesCount ; seriesIndex ++ ) { for ( int catIndex = 0 ; catIndex < catCount ; catIndex ++ ) { nV = getPlotValue ( seriesIndex , catIndex ) ; if ( nV != null ) { v = nV . doubleValue ( ) ; if ( v > this . maxValue ) { this . maxValue = v ; } } } } }
Transforms a string that represents a URI into something more proper, by adding or canonicalizing the protocol.
34,702
private void generateLegalTimesTree ( ) { int k0 = KeyEvent . KEYCODE_0 ; int k1 = KeyEvent . KEYCODE_1 ; int k2 = KeyEvent . KEYCODE_2 ; int k3 = KeyEvent . KEYCODE_3 ; int k4 = KeyEvent . KEYCODE_4 ; int k5 = KeyEvent . KEYCODE_5 ; int k6 = KeyEvent . KEYCODE_6 ; int k7 = KeyEvent . KEYCODE_7 ; int k8 = KeyEvent . KEYCODE_8 ; int k9 = KeyEvent . KEYCODE_9 ; mLegalTimesTree = new Node ( ) ; if ( mIs24HourMode ) { Node minuteFirstDigit = new Node ( k0 , k1 , k2 , k3 , k4 , k5 ) ; Node minuteSecondDigit = new Node ( k0 , k1 , k2 , k3 , k4 , k5 , k6 , k7 , k8 , k9 ) ; minuteFirstDigit . addChild ( minuteSecondDigit ) ; Node firstDigit = new Node ( k0 , k1 ) ; mLegalTimesTree . addChild ( firstDigit ) ; Node secondDigit = new Node ( k0 , k1 , k2 , k3 , k4 , k5 ) ; firstDigit . addChild ( secondDigit ) ; secondDigit . addChild ( minuteFirstDigit ) ; Node thirdDigit = new Node ( k6 , k7 , k8 , k9 ) ; secondDigit . addChild ( thirdDigit ) ; secondDigit = new Node ( k6 , k7 , k8 , k9 ) ; firstDigit . addChild ( secondDigit ) ; secondDigit . addChild ( minuteFirstDigit ) ; firstDigit = new Node ( k2 ) ; mLegalTimesTree . addChild ( firstDigit ) ; secondDigit = new Node ( k0 , k1 , k2 , k3 ) ; firstDigit . addChild ( secondDigit ) ; secondDigit . addChild ( minuteFirstDigit ) ; secondDigit = new Node ( k4 , k5 ) ; firstDigit . addChild ( secondDigit ) ; secondDigit . addChild ( minuteSecondDigit ) ; firstDigit = new Node ( k3 , k4 , k5 , k6 , k7 , k8 , k9 ) ; mLegalTimesTree . addChild ( firstDigit ) ; firstDigit . addChild ( minuteFirstDigit ) ; } else { Node ampm = new Node ( getAmOrPmKeyCode ( HALF_DAY_1 ) , getAmOrPmKeyCode ( HALF_DAY_2 ) ) ; Node firstDigit = new Node ( k1 ) ; mLegalTimesTree . addChild ( firstDigit ) ; firstDigit . addChild ( ampm ) ; Node secondDigit = new Node ( k0 , k1 , k2 ) ; firstDigit . addChild ( secondDigit ) ; secondDigit . addChild ( ampm ) ; Node thirdDigit = new Node ( k0 , k1 , k2 , k3 , k4 , k5 ) ; secondDigit . addChild ( thirdDigit ) ; thirdDigit . addChild ( ampm ) ; Node fourthDigit = new Node ( k0 , k1 , k2 , k3 , k4 , k5 , k6 , k7 , k8 , k9 ) ; thirdDigit . addChild ( fourthDigit ) ; fourthDigit . addChild ( ampm ) ; thirdDigit = new Node ( k6 , k7 , k8 , k9 ) ; secondDigit . addChild ( thirdDigit ) ; thirdDigit . addChild ( ampm ) ; secondDigit = new Node ( k3 , k4 , k5 ) ; firstDigit . addChild ( secondDigit ) ; thirdDigit = new Node ( k0 , k1 , k2 , k3 , k4 , k5 , k6 , k7 , k8 , k9 ) ; secondDigit . addChild ( thirdDigit ) ; thirdDigit . addChild ( ampm ) ; firstDigit = new Node ( k2 , k3 , k4 , k5 , k6 , k7 , k8 , k9 ) ; mLegalTimesTree . addChild ( firstDigit ) ; firstDigit . addChild ( ampm ) ; secondDigit = new Node ( k0 , k1 , k2 , k3 , k4 , k5 ) ; firstDigit . addChild ( secondDigit ) ; thirdDigit = new Node ( k0 , k1 , k2 , k3 , k4 , k5 , k6 , k7 , k8 , k9 ) ; secondDigit . addChild ( thirdDigit ) ; thirdDigit . addChild ( ampm ) ; } }
The implementation for pushMessageAsync() function.
34,703
public static void println ( StringBuilder buf , int width , String data , String indent ) { for ( String line : FormatUtil . splitAtLastBlank ( data , width - indent . length ( ) ) ) { buf . append ( indent ) ; buf . append ( line ) ; if ( ! line . endsWith ( FormatUtil . NEWLINE ) ) { buf . append ( FormatUtil . NEWLINE ) ; } } }
Invokes the readResolve method of the represented serializable class and returns the result. Throws UnsupportedOperationException if this class descriptor is not associated with a class, or if the class is non-serializable or does not define readResolve.
34,704
public boolean isMuted ( ) { if ( mMuteControl != null ) { return mMuteControl . getValue ( ) ; } return false ; }
Store session in the distributed sessions cache. Should be called outside of transaction to ensure all persistent objects have been detached.
34,705
void extras ( ) { }
Parses the provided array of LDIF lines as a single LDIF change record.
34,706
public Item ( String name , String typeId ) { if ( name != null ) { this . name = name . replaceAll ( "\\s" , " " ) ; } if ( typeId != null && typeId . length ( ) > 0 ) { this . typeId = Integer . valueOf ( typeId ) ; } itemMap = new TreeMap < Integer , IItem > ( ) ; }
This method, which clones its array argument, would not be necessary if Cloneable had a public clone method.
34,707
public String toString ( ) { StringBuffer result = new StringBuffer ( "CharClasses:" ) ; result . append ( Out . NL ) ; for ( int i = 0 ; i < classes . size ( ) ; i ++ ) result . append ( "class " + i + ":" + Out . NL + classes . elementAt ( i ) + Out . NL ) ; return result . toString ( ) ; }
It is ok to have another thread rerun this method after a halt().
34,708
public static < E extends Enum < E > & BitmapableEnum > EnumSet < E > toEnumSet ( Class < E > type , int bitmap ) { if ( type == null ) throw new NullPointerException ( "Given enum type must not be null" ) ; EnumSet < E > s = EnumSet . noneOf ( type ) ; int allSetBitmap = 0 ; for ( E element : type . getEnumConstants ( ) ) { if ( Integer . bitCount ( element . getValue ( ) ) != 1 ) { String msg = String . format ( "The %s (%x) constant of the " + "enum %s is supposed to represent a bitmap entry but " + "has more than one bit set." , element . toString ( ) , element . getValue ( ) , type . getName ( ) ) ; throw new IllegalArgumentException ( msg ) ; } allSetBitmap |= element . getValue ( ) ; if ( ( bitmap & element . getValue ( ) ) != 0 ) s . add ( element ) ; } if ( ( ( ~ allSetBitmap ) & bitmap ) != 0 ) { String msg = String . format ( "The bitmap %x for enum %s has " + "bits set that are presented by any enum constant" , bitmap , type . getName ( ) ) ; throw new IllegalArgumentException ( msg ) ; } return s ; }
Update platform server list and Organization alias
34,709
private List < Tuple2 < Long , BigInteger > > processTupleFromPartitionDataBolt ( Tuple tuple ) { matrixElements . clear ( ) ; int rowIndex = tuple . getIntegerByField ( StormConstants . HASH_FIELD ) ; if ( ! colIndexByRow . containsKey ( rowIndex ) ) { colIndexByRow . put ( rowIndex , 0 ) ; hitsByRow . put ( rowIndex , 0 ) ; } if ( splitPartitions ) { dataArray . add ( ( BigInteger ) tuple . getValueByField ( StormConstants . PARTIONED_DATA_FIELD ) ) ; } else { dataArray = ( ArrayList < BigInteger > ) tuple . getValueByField ( StormConstants . PARTIONED_DATA_FIELD ) ; } logger . debug ( "Retrieving {} elements in EncRowCalcBolt." , dataArray . size ( ) ) ; try { int colIndex = colIndexByRow . get ( rowIndex ) ; int numRecords = hitsByRow . get ( rowIndex ) ; if ( limitHitsPerSelector && numRecords < maxHitsPerSelector ) { logger . debug ( "computing matrix elements." ) ; matrixElements = ComputeEncryptedRow . computeEncRow ( dataArray , query , rowIndex , colIndex ) ; colIndexByRow . put ( rowIndex , colIndex + matrixElements . size ( ) ) ; hitsByRow . put ( rowIndex , numRecords + 1 ) ; } else if ( limitHitsPerSelector ) { logger . info ( "maxHits: rowIndex = " + rowIndex + " elementCounter = " + numRecords ) ; } } catch ( IOException e ) { logger . warn ( "Caught IOException while encrypting row. " , e ) ; } dataArray . clear ( ) ; return matrixElements ; }
Checks that a the given substring is a valid type descriptor.
34,710
public String compress ( String imageUri , boolean deleteSourceImage ) { String compressUri = compressImage ( imageUri ) ; if ( deleteSourceImage ) { File source = new File ( getRealPathFromURI ( imageUri ) ) ; if ( source . exists ( ) ) { boolean isdeleted = source . delete ( ) ; Log . d ( LOG_TAG , ( isdeleted ) ? "SourceImage File deleted" : "SourceImage File not deleted" ) ; } } return compressUri ; }
Returns map containing the given entries.
34,711
public static PluginsCollectionConfig fromXml ( final InputStream toConvert ) throws JAXBException { Unmarshaller stringUnmarshaller = getUnmarshaller ( ) ; return ( PluginsCollectionConfig ) stringUnmarshaller . unmarshal ( toConvert ) ; }
Checks that all elements has allowed type for manager
34,712
public RuleCharacterIterator ( String text , SymbolTable sym , ParsePosition pos ) { if ( text == null || pos . getIndex ( ) > text . length ( ) ) { throw new IllegalArgumentException ( ) ; } this . text = text ; this . sym = sym ; this . pos = pos ; buf = null ; }
Simple search command for GraphSearch implementation. Uses default edge convergence, 1000 iter limit.
34,713
private void ensureCapacity ( int n ) { if ( n <= 0 ) { return ; } int max ; if ( data == null || data . length == 0 ) { max = 25 ; } else if ( data . length >= n * 5 ) { return ; } else { max = data . length ; } while ( max < n * 5 ) { max *= 2 ; } String newData [ ] = new String [ max ] ; if ( length > 0 ) { System . arraycopy ( data , 0 , newData , 0 , length * 5 ) ; } data = newData ; }
Returns a rectangle of the given dimenisions.
34,714
public synchronized void flush ( ) throws IOException { checkNotClosed ( ) ; trimToSize ( ) ; journalWriter . flush ( ) ; }
Get system property or environment variable with the given name.
34,715
public void testConstrStringException ( ) { String a = "-238768.787678287a+10" ; try { BigDecimal bd = new BigDecimal ( a ) ; fail ( "NumberFormatException has not been caught: " + bd . toString ( ) ) ; } catch ( NumberFormatException e ) { } }
Compares two collections for equality. This method does not check for the implementation type of the collection in contrast to the native equals method. This is useful for black-box testing where one will not know the implementation type of the returned collection for a method.
34,716
public Process ( final URL url ) throws IOException , XMLException { initContext ( ) ; Reader in = new InputStreamReader ( WebServiceTools . openStreamFromURL ( url ) , getEncoding ( null ) ) ; readProcess ( in ) ; in . close ( ) ; }
Creates the encoded scheme-specific part from its sub parts.
34,717
void firePropertyChange ( PropertyChangeEvent evt ) { for ( PropertyChangeListener l : listenerList . getListeners ( PropertyChangeListener . class ) ) { l . propertyChange ( evt ) ; } }
Returns a cross shape of the given dimenisions.
34,718
public static PrivateKey privateKeyFromPkcs8 ( String privateKeyPem ) throws IOException { StringReader reader = new StringReader ( privateKeyPem ) ; Section section = PemReader . readFirstSectionAndClose ( reader , PRIVATE_KEY ) ; if ( section == null ) { throw new IOException ( "Invalid PKCS8 data." ) ; } try { byte [ ] decodedKey = section . getBase64DecodedBytes ( ) ; PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec ( decodedKey ) ; KeyFactory keyFactory = SecurityUtils . getRsaKeyFactory ( ) ; return keyFactory . generatePrivate ( keySpec ) ; } catch ( Exception e ) { throw new IOException ( "Unexpected exception reading PKCS data" , e ) ; } }
Checks to see if an rgument form matches the suppies parameter list.
34,719
public static Set < String > assertValidProtocols ( Set < String > expected , String [ ] protocols ) { assertNotNull ( protocols ) ; assertTrue ( protocols . length != 0 ) ; Set remainingProtocols = new HashSet < String > ( expected ) ; Set unknownProtocols = new HashSet < String > ( ) ; for ( String protocol : protocols ) { if ( ! remainingProtocols . remove ( protocol ) ) { unknownProtocols . add ( protocol ) ; } } assertEquals ( "Unknown protocols" , Collections . EMPTY_SET , unknownProtocols ) ; return remainingProtocols ; }
Trims unneeded & and ; from the symbol if exist
34,720
private float [ ] calculatePointerPosition ( float angle ) { float x = ( float ) ( mColorWheelRadius * Math . cos ( angle ) ) ; float y = ( float ) ( mColorWheelRadius * Math . sin ( angle ) ) ; return new float [ ] { x , y } ; }
Compares two connection objects for equality this only takes account of the client handle
34,721
public static void d ( String tag , String msg , Object ... args ) { if ( sLevel > LEVEL_DEBUG ) { return ; } if ( args . length > 0 ) { msg = String . format ( msg , args ) ; } Log . d ( tag , msg ) ; }
According View in width and height to calculate the Bitmap scaling. The default is not scaled
34,722
String namedForThisSegment ( String file ) { return name + IndexFileNames . stripSegmentName ( file ) ; }
dispatch in an asynchronous manner a remote event object via a remote event listener ( which is retrieved through the RemoteEventBusPacket ). The dispatch will take place if the remote event listener exists. If the dispatching will fail with the UnknownEventException the template will be removed from the SpaceEngine.
34,723
Callbacks tryGetCallbacks ( Callbacks oldCallbacks ) { synchronized ( mLock ) { if ( mStopped ) { return null ; } if ( mCallbacks == null ) { return null ; } final Callbacks callbacks = mCallbacks . get ( ) ; if ( callbacks != oldCallbacks ) { return null ; } if ( callbacks == null ) { Log . w ( TAG , "no mCallbacks" ) ; return null ; } return callbacks ; } }
Returns a read-only set of the filters.
34,724
public static String arrayCombine ( String [ ] list , char separatorChar ) { StatementBuilder buff = new StatementBuilder ( ) ; for ( String s : list ) { buff . appendExceptFirst ( String . valueOf ( separatorChar ) ) ; if ( s == null ) { s = "" ; } for ( int j = 0 , length = s . length ( ) ; j < length ; j ++ ) { char c = s . charAt ( j ) ; if ( c == '\\' || c == separatorChar ) { buff . append ( '\\' ) ; } buff . append ( c ) ; } } return buff . toString ( ) ; }
Converts properties to file storage format
34,725
protected static final void checkOffset ( int offset , CharacterIterator text ) { if ( offset < text . getBeginIndex ( ) || offset > text . getEndIndex ( ) ) { throw new IllegalArgumentException ( "offset out of bounds" ) ; } }
reads a XML Element Attribute ans cast it to a String
34,726
private synchronized void pauseTrackDataHub ( ) { if ( trackDataHub != null ) { trackDataHub . unregisterTrackDataListener ( this ) ; } trackDataHub = null ; }
Adjust how the cell is displayed. If it is a header cell it should be opaque with a dark background, otherwise it should be transparent to show the lettering in the background. If the row is the header the font is bold, if the row is smaller than the start row it is gray, otherwise black.
34,727
@ Override public void writeExternal ( ObjectOutput out ) throws IOException { super . writeExternal ( out ) ; out . writeInt ( DBIDUtil . asInteger ( routingObjectID ) ) ; out . writeDouble ( parentDistance ) ; out . writeDouble ( coveringRadius ) ; }
Creates a new array with the given length, and of the same type as the given array.
34,728
public static String termFromResult ( String result ) { String [ ] parts = result . split ( ":" ) ; if ( parts . length != 2 ) return null ; return parts [ 1 ] ; }
Flag the class name as being in the process of being defined. The class manager will not attempt to load it.
34,729
@ Nullable private File [ ] listFiles0 ( IgfsPath path ) { File f = fileForPath ( path ) ; if ( ! f . exists ( ) ) throw new IgfsPathNotFoundException ( "Failed to list files (path not found): " + path ) ; else return f . listFiles ( ) ; }
Add an extension with the given oid and the passed in byte array to be wrapped in the OCTET STRING associated with the extension.
34,730
private void step1 ( ) { final SpeakerNPC npc = npcs . get ( "Finn Farmer" ) ; npc . add ( ConversationStates . ATTENDING , ConversationPhrases . QUEST_MESSAGES , new QuestInStateCondition ( QUEST_SLOT , QUEST_INDEX_STATUS , "deliver_to_george" ) , ConversationStates . ATTENDING , "Thank you for agreeing to tell George this message:" , new SayTextAction ( "[quest.coded_message:1]" ) ) ; npc . add ( ConversationStates . ATTENDING , ConversationPhrases . QUEST_MESSAGES , new AndCondition ( new QuestNotActiveCondition ( QUEST_SLOT ) , new NotCondition ( new TimeReachedCondition ( QUEST_SLOT , QUEST_INDEX_TIME ) ) ) , ConversationStates . ATTENDING , "Perhaps, I have another message tomorrow." , null ) ; npc . add ( ConversationStates . ATTENDING , ConversationPhrases . QUEST_MESSAGES , new AndCondition ( new QuestNotActiveCondition ( QUEST_SLOT ) , new TimeReachedCondition ( QUEST_SLOT , QUEST_INDEX_TIME ) ) , ConversationStates . QUEST_OFFERED , "I have an urgent message for #George! It's really important! But my parents don't let me wander around the city alone. As if I were a small kid! Could you please deliver a message to him?" , null ) ; npc . add ( ConversationStates . QUEST_OFFERED , "george" , null , ConversationStates . QUEST_OFFERED , "Just find Tommy. Perhaps in Ados Park. George won't be far away. Could you please deliver a message to him?" , null ) ; npc . add ( ConversationStates . QUEST_OFFERED , ConversationPhrases . NO_MESSAGES , ConversationStates . IDLE , "Okay, then I better don't tell you no secrets." , new MultipleActions ( new DecreaseKarmaAction ( 10 ) , new SetQuestAction ( QUEST_SLOT , QUEST_INDEX_STATUS , "rejected" ) ) ) ; npc . add ( ConversationStates . QUEST_OFFERED , ConversationPhrases . YES_MESSAGES , ConversationStates . ATTENDING , null , new MultipleActions ( new CreateAndSayCodedMessage ( ) , new SetQuestAction ( QUEST_SLOT , QUEST_INDEX_STATUS , "deliver_to_george" ) ) ) ; }
Returns true if the given character is a valid hex character.
34,731
private synchronized void block ( boolean tf ) { if ( tf ) { try { if ( m_splitThread . isAlive ( ) ) { wait ( ) ; } } catch ( InterruptedException ex ) { } } else { notifyAll ( ) ; } }
Indicates if this stream is ready to be read.
34,732
public void putElements ( K key , Set < E > elements ) { synchronized ( this ) { removeKey ( key ) ; if ( ! elements . isEmpty ( ) ) { for ( E element : elements ) { addElement ( key , element ) ; } } } }
Equivalent to assert cond : value;
34,733
public void comment ( char ch [ ] , int start , int length ) throws org . xml . sax . SAXException { if ( ch == null || start < 0 || length >= ( ch . length - start ) || length < 0 ) return ; append ( m_doc . createComment ( new String ( ch , start , length ) ) ) ; }
Find the all the declarations with the given name that occur in the given list of members
34,734
private void throttleLoopOnException ( ) { long now = System . currentTimeMillis ( ) ; if ( lastExceptionTime == 0L || ( now - lastExceptionTime ) > 5000 ) { lastExceptionTime = now ; recentExceptionCount = 0 ; } else { if ( ++ recentExceptionCount >= 10 ) { try { Thread . sleep ( 10000 ) ; } catch ( InterruptedException ignore ) { } } } }
serialize a List (as Array)
34,735
public static boolean createNormal ( Vector3 norm , ReadOnlyVector3 v0 , ReadOnlyVector3 v1 , ReadOnlyVector3 v2 ) { if ( Double . isNaN ( v0 . getZ ( ) ) || Double . isNaN ( v1 . getZ ( ) ) || Double . isNaN ( v2 . getZ ( ) ) ) { norm . set ( 0 , 0 , 0 ) ; return ( false ) ; } Vector3 work = Vector3 . fetchTempInstance ( ) ; norm . set ( v1 ) ; norm . subtractLocal ( v0 ) ; work . set ( v2 ) ; work . subtractLocal ( v0 ) ; norm . crossLocal ( work ) ; norm . normalizeLocal ( ) ; Vector3 . releaseTempInstance ( work ) ; return ( true ) ; }
whether packageName is system application
34,736
public ConsoleUser ( ) { this ( new PrintWriter ( System . out ) , new InputStreamReader ( System . in ) , ResourceBundle . getBundle ( LICENSE_PROPERTIES ) ) ; }
Get a reasonable maximum path length to search
34,737
public static String formatQuantity ( Integer quantity ) { if ( quantity == null ) return "" ; else return formatQuantity ( quantity . doubleValue ( ) ) ; }
Util method to write an attribute with the ns prefix
34,738
public final void onBeforeStart ( ) { if ( ! startedFlag . compareAndSet ( false , true ) ) throw new IllegalStateException ( "SPI has already been started " + "(always create new configuration instance for each starting Ignite instances) " + "[spi=" + this + ']' ) ; }
process calls to add which is an implemetation of a counter or adder.
34,739
public void onEvent ( final DisruptorReferringEventEntry eventEntryWrap , final long sequence , final boolean endOfBatch ) throws Exception { EventEntryImpl eventEntry = eventEntryWrap . delegate ; onEvent ( eventEntry , sequence , endOfBatch ) ; }
Remove the system tray icon
34,740
public static void checkClassSignature ( final String signature ) { int pos = 0 ; if ( getChar ( signature , 0 ) == '<' ) { pos = checkFormalTypeParameters ( signature , pos ) ; } pos = checkClassTypeSignature ( signature , pos ) ; while ( getChar ( signature , pos ) == 'L' ) { pos = checkClassTypeSignature ( signature , pos ) ; } if ( pos != signature . length ( ) ) { throw new IllegalArgumentException ( signature + ": error at index " + pos ) ; } }
Returns true if m has fulfilling bit set.
34,741
public static Tuple median ( TupleSet tuples , String field , Comparator cmp ) { if ( tuples instanceof Table ) { Table table = ( Table ) tuples ; ColumnMetadata md = table . getMetadata ( field ) ; return table . getTuple ( md . getMedianRow ( ) ) ; } else { return median ( tuples . tuples ( ) , field , cmp ) ; } }
Convert to lowercase in-place.
34,742
public void removeEntry ( SSOToken token , String entryDN , int objectType , boolean recursive , boolean softDelete ) throws AMException , SSOException { if ( debug . messageEnabled ( ) ) { debug . message ( "DirectoryServicesImpl.removeEntry(): Removing: " + entryDN + " & recursive: " + recursive ) ; } if ( recursive ) { removeSubtree ( token , entryDN , softDelete ) ; } else { removeSingleEntry ( token , entryDN , objectType , softDelete ) ; } if ( objectType == AMObject . ORGANIZATION && ServiceManager . isCoexistenceMode ( ) && ServiceManager . isRealmEnabled ( ) ) { try { OrganizationConfigManager ocm = new OrganizationConfigManager ( token , entryDN ) ; ocm . deleteSubOrganization ( null , recursive ) ; } catch ( SMSException smse ) { if ( debug . messageEnabled ( ) ) { debug . message ( "DirectoryServicesImpl::removeEntry " + "unable to delete corresponding realm: " + entryDN ) ; } } } }
Unload the given unit.
34,743
public List < Struct > listTraitDefinitions ( final String guid ) throws AtlasServiceException { JSONObject jsonResponse = callAPI ( API . GET_ALL_TRAIT_DEFINITIONS , null , guid , TRAIT_DEFINITIONS ) ; List < JSONObject > traitDefList = extractResults ( jsonResponse , AtlasClient . RESULTS , new ExtractOperation < JSONObject , JSONObject > ( ) ) ; ArrayList < Struct > traitStructList = new ArrayList < > ( ) ; for ( JSONObject traitDef : traitDefList ) { Struct traitStruct = InstanceSerialization . fromJsonStruct ( traitDef . toString ( ) , true ) ; traitStructList . add ( traitStruct ) ; } return traitStructList ; }
Waits for the next client to connect in to our server and returns a Terminal implementation, TelnetTerminal, that represents the remote terminal this client is running. The terminal can be used just like any other Terminal, but keep in mind that all operations are sent over the network.
34,744
public final boolean is_connected_on_layer ( int p_layer ) { Collection < BrdItem > contacts_on_layer = get_all_contacts ( p_layer ) ; return ( contacts_on_layer . size ( ) > 0 ) ; }
Build the full resource path, including base path, add any missing leading '/', remove any trailing '/', and remove any double '/'
34,745
public void showContent ( ) { switchState ( CONTENT , null , null , null , null , null , Collections . < Integer > emptyList ( ) ) ; }
This method returns a ViewPropertyAnimator object, which can be used to animate specific properties on this View.
34,746
protected void addItem ( JPanel p , JComponent c , int x , int y ) { GridBagConstraints gc = new GridBagConstraints ( ) ; gc . gridx = x ; gc . gridy = y ; gc . weightx = 100.0 ; gc . weighty = 100.0 ; p . add ( c , gc ) ; }
Create a COS Definition based on serviceID & attribute set & type. For policy attribute, will set cosattribute to "override" For other attribute, will set cosattribute to "default"
34,747
public static void verify ( final ClassReader cr , final boolean dump , final PrintWriter pw ) { verify ( cr , null , dump , pw ) ; }
Reads a value of an annotation and makes the given visitor visit it.
34,748
public SharedDataIteratorSource ( Object identifier , ISourceDataIteratorProvider < T > sourceDataIteratorProvider , long timeToLive ) { if ( sourceDataIteratorProvider == null ) throw new IllegalArgumentException ( "sourceDataIteratorProvider cannot be null" ) ; _identifier = identifier ; _sourceDataIteratorProvider = sourceDataIteratorProvider ; _timeToLive = timeToLive ; _createdTime = SystemTime . timeMillis ( ) ; }
Defenir valores de margen rodape
34,749
private void buildSubgraphs ( List subgraphList , PolygonBuilder polyBuilder ) { List processedGraphs = new ArrayList ( ) ; for ( Iterator i = subgraphList . iterator ( ) ; i . hasNext ( ) ; ) { BufferSubgraph subgraph = ( BufferSubgraph ) i . next ( ) ; Coordinate p = subgraph . getRightmostCoordinate ( ) ; SubgraphDepthLocater locater = new SubgraphDepthLocater ( processedGraphs ) ; int outsideDepth = locater . getDepth ( p ) ; subgraph . computeDepth ( outsideDepth ) ; subgraph . findResultEdges ( ) ; processedGraphs . add ( subgraph ) ; polyBuilder . add ( subgraph . getDirectedEdges ( ) , subgraph . getNodes ( ) ) ; } }
Add a key to the list.
34,750
public static _Fields findByThriftId ( int fieldId ) { switch ( fieldId ) { case 1 : return TIMESTAMP ; case 2 : return VALUE ; case 3 : return HOST ; default : return null ; } }
Util method to write an attribute with the ns prefix
34,751
public static StringBuilder makeWhereStringFromFields ( StringBuilder sb , List < ModelField > modelFields , Map < String , Object > fields , String operator , List < EntityConditionParam > entityConditionParams ) { if ( modelFields . size ( ) < 1 ) { return sb ; } Iterator < ModelField > iter = modelFields . iterator ( ) ; while ( iter . hasNext ( ) ) { Object item = iter . next ( ) ; Object name = null ; ModelField modelField = null ; if ( item instanceof ModelField ) { modelField = ( ModelField ) item ; sb . append ( modelField . getColValue ( ) ) ; name = modelField . getName ( ) ; } else { sb . append ( item ) ; name = item ; } Object fieldValue = fields . get ( name ) ; if ( fieldValue != null && fieldValue != GenericEntity . NULL_FIELD ) { sb . append ( '=' ) ; addValue ( sb , modelField , fieldValue , entityConditionParams ) ; } else { sb . append ( " IS NULL" ) ; } if ( iter . hasNext ( ) ) { sb . append ( ' ' ) ; sb . append ( operator ) ; sb . append ( ' ' ) ; } } return sb ; }
Stop all tasks in the group.
34,752
public static void decodeToString ( byte [ ] from , int location , int precision , int scale , AkibanAppender appender ) { final int intCount = precision - scale ; final int intFull = intCount / DECIMAL_DIGIT_PER ; final int intPartial = intCount % DECIMAL_DIGIT_PER ; final int fracFull = scale / DECIMAL_DIGIT_PER ; final int fracPartial = scale % DECIMAL_DIGIT_PER ; int curOff = location ; final int mask = ( from [ curOff ] & 0x80 ) != 0 ? 0 : - 1 ; from [ curOff ] ^= 0x80 ; if ( mask != 0 ) appender . append ( '-' ) ; boolean hadOutput = false ; if ( intPartial != 0 ) { int count = DECIMAL_BYTE_DIGITS [ intPartial ] ; int x = unpackIntegerByWidth ( count , from , curOff ) ^ mask ; curOff += count ; if ( x != 0 ) { hadOutput = true ; appender . append ( x ) ; } } for ( int i = 0 ; i < intFull ; ++ i ) { int x = unpackIntegerByWidth ( DECIMAL_TYPE_SIZE , from , curOff ) ^ mask ; curOff += DECIMAL_TYPE_SIZE ; if ( hadOutput ) { appender . append ( String . format ( "%09d" , x ) ) ; } else if ( x != 0 ) { hadOutput = true ; appender . append ( x ) ; } } if ( fracFull + fracPartial > 0 ) { if ( hadOutput ) { appender . append ( '.' ) ; } else { appender . append ( "0." ) ; } } else if ( ! hadOutput ) appender . append ( '0' ) ; for ( int i = 0 ; i < fracFull ; ++ i ) { int x = unpackIntegerByWidth ( DECIMAL_TYPE_SIZE , from , curOff ) ^ mask ; curOff += DECIMAL_TYPE_SIZE ; appender . append ( String . format ( "%09d" , x ) ) ; } if ( fracPartial != 0 ) { int count = DECIMAL_BYTE_DIGITS [ fracPartial ] ; int x = unpackIntegerByWidth ( count , from , curOff ) ^ mask ; int width = scale - ( fracFull * DECIMAL_DIGIT_PER ) ; appender . append ( String . format ( "%0" + width + "d" , x ) ) ; } from [ location ] ^= 0x80 ; }
Returns the number of the prameters included in the given descriptor.
34,753
private int assertPivotCountsAreCorrect ( String pivotName , SolrParams baseParams , PivotField constraint ) throws SolrServerException { SolrParams p = SolrParams . wrapAppended ( baseParams , params ( "fq" , buildFilter ( constraint ) ) ) ; List < PivotField > subPivots = null ; try { assertPivotData ( pivotName , constraint , p ) ; subPivots = constraint . getPivot ( ) ; } catch ( Exception e ) { throw new RuntimeException ( pivotName + ": count query failed: " + p + ": " + e . getMessage ( ) , e ) ; } int depth = 0 ; if ( null != subPivots ) { assertTraceOk ( pivotName , baseParams , subPivots ) ; for ( PivotField subPivot : subPivots ) { depth = assertPivotCountsAreCorrect ( pivotName , p , subPivot ) ; } } return depth + 1 ; }
Convert the given vector of int[] objects to canonical array form.
34,754
public static long availableMemory ( ) { return RUNTIME . freeMemory ( ) + ( RUNTIME . maxMemory ( ) - RUNTIME . totalMemory ( ) ) ; }
build a selection over a set of row IDs
34,755
public void add ( Number number ) { elements . add ( number == null ? JsonNull . INSTANCE : new JsonPrimitive ( number ) ) ; }
Add an JFXX extension marker segment from the stream wrapped in the JPEGBuffer to the list of extension segments.
34,756
public void add ( String feats ) { if ( feats == null ) return ; String key , value ; int idx ; for ( String feat : Splitter . splitPipes ( feats ) ) { idx = feat . indexOf ( DELIM_KEY_VALUE ) ; if ( idx > 0 ) { key = feat . substring ( 0 , idx ) ; value = feat . substring ( idx + 1 ) ; put ( key , value ) ; } } }
Animation that creates a pop effect when two tiles merge by increasing the tile scale to 120% at the middle, and then going back to 100%
34,757
@ Override public int hashCode ( ) { return dateTime . hashCode ( ) ^ offset . hashCode ( ) ^ Integer . rotateLeft ( zone . hashCode ( ) , 3 ) ; }
Adds (tag) name or a regular search expression
34,758
public void copyInto ( E [ ] array , int offset ) { long finalOffset = offset + count ( ) ; if ( finalOffset > array . length || finalOffset < offset ) { throw new IndexOutOfBoundsException ( "does not fit" ) ; } if ( spineIndex == 0 ) System . arraycopy ( curChunk , 0 , array , offset , elementIndex ) ; else { for ( int i = 0 ; i < spineIndex ; i ++ ) { System . arraycopy ( spine [ i ] , 0 , array , offset , spine [ i ] . length ) ; offset += spine [ i ] . length ; } if ( elementIndex > 0 ) System . arraycopy ( curChunk , 0 , array , offset , elementIndex ) ; } }
Move the circle view.
34,759
public void writeTo ( DataOutput out ) throws IOException { out . writeInt ( typeId ) ; U . writeString ( out , typeName ) ; if ( fields == null ) out . writeInt ( - 1 ) ; else { out . writeInt ( fields . size ( ) ) ; for ( Map . Entry < String , Integer > fieldEntry : fields . entrySet ( ) ) { U . writeString ( out , fieldEntry . getKey ( ) ) ; out . writeInt ( fieldEntry . getValue ( ) ) ; } } U . writeString ( out , affKeyFieldName ) ; if ( schemas == null ) out . writeInt ( - 1 ) ; else { out . writeInt ( schemas . size ( ) ) ; for ( BinarySchema schema : schemas ) schema . writeTo ( out ) ; } out . writeBoolean ( isEnum ) ; }
Helper to generate a random blob of bytes using a given RNG.
34,760
public Container ( ) throws Exception { this ( false , null ) ; }
Add a column model into the table model.
34,761
protected boolean isNumericOrBoxed ( TypeMirror type ) { if ( TypesUtils . isBoxedPrimitive ( type ) ) { type = types . unboxedType ( type ) ; } return TypesUtils . isNumeric ( type ) ; }
Returns an enumeration describing the available options.
34,762
public static boolean isLetterOrDigit ( char c ) { return Character . isLetterOrDigit ( c ) ; }
Returns whether this animator is currently in a paused state.
34,763
protected void engineInit ( AlgorithmParameterSpec genParamSpec , SecureRandom random ) throws InvalidAlgorithmParameterException { if ( ! ( genParamSpec instanceof DHGenParameterSpec ) ) { throw new InvalidAlgorithmParameterException ( "Inappropriate parameter type" ) ; } DHGenParameterSpec dhParamSpec = ( DHGenParameterSpec ) genParamSpec ; primeSize = dhParamSpec . getPrimeSize ( ) ; try { checkKeySize ( primeSize ) ; } catch ( InvalidParameterException ipe ) { throw new InvalidAlgorithmParameterException ( ipe . getMessage ( ) ) ; } exponentSize = dhParamSpec . getExponentSize ( ) ; if ( exponentSize <= 0 ) { throw new InvalidAlgorithmParameterException ( "Exponent size must be greater than zero" ) ; } if ( exponentSize >= primeSize ) { throw new InvalidAlgorithmParameterException ( "Exponent size must be less than modulus size" ) ; } }
Method executed in a separate thread created by the task manager
34,764
public static List < CoreLabel > toCharacterSequence ( Sequence < IString > tokenSequence ) { List < CoreLabel > charSequence = new ArrayList < > ( tokenSequence . size ( ) * 7 ) ; for ( IString token : tokenSequence ) { String tokenStr = token . toString ( ) ; if ( charSequence . size ( ) > 0 ) { CoreLabel charLabel = new CoreLabel ( ) ; charLabel . set ( CoreAnnotations . TextAnnotation . class , WHITESPACE ) ; charLabel . set ( CoreAnnotations . CharAnnotation . class , WHITESPACE ) ; charLabel . set ( CoreAnnotations . ParentAnnotation . class , WHITESPACE ) ; charLabel . set ( CoreAnnotations . CharacterOffsetBeginAnnotation . class , - 1 ) ; charLabel . setIndex ( charSequence . size ( ) ) ; charSequence . add ( charLabel ) ; } for ( int j = 0 , size = tokenStr . length ( ) ; j < size ; ++ j ) { CoreLabel charLabel = new CoreLabel ( ) ; String ch = String . valueOf ( tokenStr . charAt ( j ) ) ; charLabel . set ( CoreAnnotations . TextAnnotation . class , ch ) ; charLabel . set ( CoreAnnotations . CharAnnotation . class , ch ) ; charLabel . set ( CoreAnnotations . ParentAnnotation . class , tokenStr ) ; charLabel . set ( CoreAnnotations . CharacterOffsetBeginAnnotation . class , j ) ; charLabel . setIndex ( charSequence . size ( ) ) ; charSequence . add ( charLabel ) ; } } return charSequence ; }
Used to check whether there is a specialized handler for a given intent.
34,765
void addListener ( IndexChangeListener listener ) { listeners . add ( listener ) ; }
Parses a primitive value into an instance of the specified primitive type.
34,766
public final CharSequenceTranslator with ( final CharSequenceTranslator ... translators ) { final CharSequenceTranslator [ ] newArray = new CharSequenceTranslator [ translators . length + 1 ] ; newArray [ 0 ] = this ; System . arraycopy ( translators , 0 , newArray , 1 , translators . length ) ; return new AggregateTranslator ( newArray ) ; }
Responds to the user perfoming an action.
34,767
boolean addEventLine ( final EventLine line ) { if ( eventTypes . contains ( line . getType ( ) ) ) { channel . addLine ( line ) ; return true ; } return false ; }
try to rename temp file to save file
34,768
public static VectorStoreRAM readFromFile ( FlagConfig flagConfig , String vectorFile ) throws IOException { if ( vectorFile . isEmpty ( ) ) { throw new IllegalArgumentException ( "vectorFile argument cannot be empty." ) ; } VectorStoreRAM store = new VectorStoreRAM ( flagConfig ) ; store . initFromFile ( vectorFile ) ; return store ; }
Creates a Panel for the error details and attaches the error message to it, but doesn't add the Panel to the dialog.
34,769
@ Override protected RdKNNNode createNewLeafNode ( ) { return new RdKNNNode ( leafCapacity , true ) ; }
Close inputstream if we have one.
34,770
public void testPreconditions ( ) { StoreRetrieveData dataStorage = getDataStorage ( ) ; ArrayList < ToDoItem > items = null ; try { items = dataStorage . loadFromFile ( ) ; } catch ( Exception e ) { fail ( "Couldn't read from data storage: " + e . getMessage ( ) ) ; } assertEquals ( 0 , items . size ( ) ) ; }
Creates a display string of a parameter list (without the parentheses) for the given parameter types and names.
34,771
private static double [ ] computeLabels ( final double start , final double end , final int approxNumLabels ) { if ( Math . abs ( start - end ) < 0.0000001f ) { return new double [ ] { start , start , 0 } ; } double s = start ; double e = end ; boolean switched = false ; if ( s > e ) { switched = true ; double tmp = s ; s = e ; e = tmp ; } double xStep = roundUp ( Math . abs ( s - e ) / approxNumLabels ) ; double xStart = xStep * Math . ceil ( s / xStep ) ; double xEnd = xStep * Math . floor ( e / xStep ) ; if ( switched ) { return new double [ ] { xEnd , xStart , - 1.0 * xStep } ; } return new double [ ] { xStart , xEnd , xStep } ; }
Execute a "Heapify Upwards" aka "SiftUp". Used in insertions.
34,772
public static IoBuffer wrap ( byte [ ] byteArray ) { return wrap ( ByteBuffer . wrap ( byteArray ) ) ; }
Paints the hex window.
34,773
private void removeListeners ( ) { skinSpecCompList . removeListSelectionListener ( this ) ; enableBorders . removeActionListener ( this ) ; currSkinCombo . removeActionListener ( this ) ; addButton . removeActionListener ( this ) ; addCompButton . removeActionListener ( this ) ; removeCompButton . removeActionListener ( this ) ; saveSkinButton . removeActionListener ( this ) ; resetSkinButton . removeActionListener ( this ) ; }
The value at the closest SW post to the given lat/lon. This is just a go-to-the-closest-post solution.
34,774
public boolean isSubsetOf ( Object obj ) { if ( ! ( obj instanceof AbstractTagFrameBody ) ) { return false ; } ArrayList < AbstractDataType > superset = ( ( AbstractTagFrameBody ) obj ) . objectList ; for ( AbstractDataType anObjectList : objectList ) { if ( anObjectList . getValue ( ) != null ) { if ( ! superset . contains ( anObjectList ) ) { return false ; } } } return true ; }
Converts an array of strings containing doubles into an array of doubles.
34,775
@ Override public int hashCode ( ) { int result = 1 ; Iterator < ? > it = iterator ( ) ; while ( it . hasNext ( ) ) { Object object = it . next ( ) ; result = ( 31 * result ) + ( object == null ? 0 : object . hashCode ( ) ) ; } return result ; }
Print out object state for debugging purposes.
34,776
public ByteVector putByteArray ( final byte [ ] b , final int off , final int len ) { if ( length + len > data . length ) { enlarge ( len ) ; } if ( b != null ) { System . arraycopy ( b , off , data , length , len ) ; } length += len ; return this ; }
Close the given cursor and remove it from the map
34,777
private Collection < IQuest > findCompletedQuests ( Player player ) { List < IQuest > res = new ArrayList < IQuest > ( ) ; for ( IQuest quest : quests ) { if ( quest . isCompleted ( player ) && quest . isVisibleOnQuestStatus ( ) ) { res . add ( quest ) ; } } return res ; }
Adds the given attribute to the set of attributes, and also makes sure that the needed prefix/uri mapping is declared, but only if there is a currently open element.
34,778
private void updateSliderState ( int touchX , int touchY ) { int distanceX = touchX - mCircleCenterX ; int distanceY = mCircleCenterY - touchY ; double c = Math . sqrt ( Math . pow ( distanceX , 2 ) + Math . pow ( distanceY , 2 ) ) ; mAngle = Math . acos ( distanceX / c ) ; if ( distanceY < 0 ) { mAngle = - mAngle ; } if ( mListener != null ) { mListener . onSliderMoved ( ( mAngle - mStartAngle ) / ( 2 * Math . PI ) ) ; } }
Creates a linked HashMap with the capacity of the subResourceNames. The subResourceNames are used as keys and the value is set per default as null.
34,779
public static int copy ( InputStream in , OutputStream out , long start , long end , boolean closeAfterDone ) throws IOException { try { if ( in == null || out == null ) return 0 ; byte [ ] bb = new byte [ 1024 * 4 ] ; int total = 0 ; in . skip ( start ) ; int ii = ( int ) Math . min ( ( end - start ) , bb . length ) ; int len = in . read ( bb , 0 , ii ) ; while ( len > 0 ) { out . write ( bb , 0 , len ) ; total += len ; ii = ( int ) Math . min ( ( end - start - total ) , bb . length ) ; len = in . read ( bb , 0 , ii ) ; out . flush ( ) ; } return total ; } finally { if ( closeAfterDone ) { if ( in != null ) { in . close ( ) ; } if ( out != null ) { out . close ( ) ; } } } }
A "pretty print" of this node that may be useful for e.g. debugging.
34,780
private void openBrowser ( String browserName , String url ) { if ( StringUtilities . isEmpty ( browserName ) ) { findBrowser ( ) ; return ; } if ( browserName . contains ( BROWSER_NAME_EXTENSION ) ) { try { launchExtension ( browserName , url ) ; } catch ( CoreException e ) { CorePluginLog . logError ( "Couldn't use the extension to launch." ) ; } return ; } try { BrowserUtilities . launchBrowser ( browserName , url ) ; } catch ( Throwable t ) { CorePluginLog . logError ( t , "Could not open the browser." ) ; } }
Decode data String (URL encoded) into Properties
34,781
public static void instanceListToArffFile ( File outputFile , FeatureStore instanceList ) throws Exception { instanceListToArffFile ( outputFile , instanceList , false , false ) ; }
Perform any handshaking processing.
34,782
public boolean isRunning ( ) { return mRunning . get ( ) ; }
Return major version of the given semantic version. For example, `v2` is returned from `v2.10`. Return null if major version cannot be extracted.
34,783
public Outfit ( final int code ) { this . body = ( code % 100 ) ; this . dress = ( code / 100 % 100 ) ; this . head = ( int ) ( code / Math . pow ( 100 , 2 ) % 100 ) ; this . hair = ( int ) ( code / Math . pow ( 100 , 3 ) % 100 ) ; this . detail = ( int ) ( code / Math . pow ( 100 , 4 ) % 100 ) ; this . mouth = 0 ; this . eyes = 0 ; }
Checks if we have Proxy configuration settings in the properties.
34,784
public void filledPolygon ( double [ ] x , double [ ] y ) { int n = x . length ; GeneralPath path = new GeneralPath ( ) ; path . moveTo ( ( float ) scaleX ( x [ 0 ] ) , ( float ) scaleY ( y [ 0 ] ) ) ; for ( int i = 0 ; i < n ; i ++ ) path . lineTo ( ( float ) scaleX ( x [ i ] ) , ( float ) scaleY ( y [ i ] ) ) ; path . closePath ( ) ; offscreen . fill ( path ) ; draw ( ) ; }
Add Html tags around the string to colorize it.
34,785
private void smoothScrollToItemView ( int position , boolean pageSelected ) { mCurrentPosition = position ; if ( mCurrentPosition > getChildCount ( ) - 1 ) { mCurrentPosition = getChildCount ( ) - 1 ; } if ( mOnPagerChangeListener != null && pageSelected ) { mOnPagerChangeListener . onPageSelected ( position ) ; } int dx = position * ( getMeasuredWidth ( ) - ( int ) mMarginLeftRight * 2 ) - getScrollX ( ) ; mScroller . startScroll ( getScrollX ( ) , 0 , dx , 0 , Math . min ( Math . abs ( dx ) * 2 , MAX_SETTLE_DURATION ) ) ; invalidate ( ) ; }
This method removes all child elements with the given name of the given element.
34,786
public static void deleteESTestIndex ( String index ) { logger . info ( "Deleting index:" ) ; ProcessBuilder pDelete = new ProcessBuilder ( "curl" , "-XDELETE" , index ) ; try { executeCommand ( pDelete ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } }
for example if (!(a inst)) {} ^ we are here
34,787
void addCommand ( String sql ) { if ( sql == null ) { return ; } sql = sql . trim ( ) ; if ( sql . length ( ) == 0 ) { return ; } if ( commandHistory . size ( ) > MAX_HISTORY ) { commandHistory . remove ( 0 ) ; } int idx = commandHistory . indexOf ( sql ) ; if ( idx >= 0 ) { commandHistory . remove ( idx ) ; } commandHistory . add ( sql ) ; if ( server . isCommandHistoryAllowed ( ) ) { server . saveCommandHistoryList ( commandHistory ) ; } }
Creates new form AddShareDialog
34,788
public static String encodeArray ( String [ ] array ) { StringBuilder buffer = new StringBuilder ( ) ; int nrItems = array . length ; for ( int i = 0 ; i < nrItems ; i ++ ) { String item = array [ i ] ; item = StringUtil . gsub ( "_" , "__" , item ) ; buffer . append ( item ) ; if ( i < nrItems - 1 ) { buffer . append ( "_." ) ; } } return buffer . toString ( ) ; }
Called from onTouchEvent to end a drag operation.
34,789
public void mergeElementsRelations ( final OsmElement mergeInto , final OsmElement mergeFrom ) { ArrayList < Relation > fromRelations = mergeFrom . getParentRelations ( ) != null ? new ArrayList < Relation > ( mergeFrom . getParentRelations ( ) ) : new ArrayList < Relation > ( ) ; ArrayList < Relation > toRelations = mergeInto . getParentRelations ( ) != null ? mergeInto . getParentRelations ( ) : new ArrayList < Relation > ( ) ; try { for ( Relation r : fromRelations ) { if ( ! toRelations . contains ( r ) ) { dirty = true ; undo . save ( r ) ; RelationMember rm = r . getMember ( mergeFrom ) ; RelationMember newRm = new RelationMember ( rm . getRole ( ) , mergeInto ) ; r . replaceMember ( rm , newRm ) ; r . updateState ( OsmElement . STATE_MODIFIED ) ; apiStorage . insertElementSafe ( r ) ; mergeInto . addParentRelation ( r ) ; mergeInto . updateState ( OsmElement . STATE_MODIFIED ) ; apiStorage . insertElementSafe ( mergeInto ) ; } } recordImagery ( ) ; } catch ( StorageException sex ) { } }
Create this action with the appropriate identifier.
34,790
public void add ( Predicate p ) { if ( m_clauses . contains ( p ) ) { throw new IllegalArgumentException ( "Duplicate predicate." ) ; } m_clauses . add ( p ) ; fireExpressionChange ( ) ; }
Computes SVM output for given instance.
34,791
public void awaitShutdown ( ) throws InterruptedException { lock . lockInterruptibly ( ) ; try { while ( true ) { switch ( runState ) { case Start : case Running : case ShuttingDown : futureReady . await ( ) ; continue ; case Shutdown : return ; default : throw new AssertionError ( ) ; } } } finally { lock . unlock ( ) ; } }
Process a new port. If link discovery is disabled on the port, then do nothing. If autoportfast feature is enabled and the port is a fast port, then do nothing. Otherwise, send LLDP message. Add the port to quarantine.
34,792
public static final double nextDouble ( double value ) { if ( value == Double . POSITIVE_INFINITY ) { return value ; } long bits ; if ( value == 0 ) { bits = 0 ; } else { bits = Double . doubleToLongBits ( value ) ; } return Double . longBitsToDouble ( value < 0 ? bits - 1 : bits + 1 ) ; }
GZip compress a string of bytes
34,793
private String randomString ( String [ ] values , Object olength ) { int length = FunctionHandler . getInt ( olength ) ; StringBuilder output = new StringBuilder ( length ) ; for ( int i = 0 ; i < length ; i ++ ) { output . append ( values [ rnd . nextInt ( values . length ) ] ) ; } return output . toString ( ) ; }
Write tag to output stream
34,794
@ Override public boolean hasCancelSaveButtons ( ) { return false ; }
Initialize the libVLC class. This function must be called before using any libVLC functions.
34,795
public double end ( ) { assureRightState ( "end" , true ) ; lastTime = elapsed ( ) ; lapped . add ( lastTime ) ; time = - 1 ; return lastTime ; }
Removes all the elements. Method is synchronized internally.
34,796
protected void check ( ) { checkmark . removeAttribute ( SVGConstants . SVG_STYLE_ATTRIBUTE ) ; checked = true ; fireSwitchEvent ( new ChangeEvent ( SVGCheckbox . this ) ) ; }
Stores double value into byte array assuming that value should be stored in little-endian byte order and native byte order is big-endian. Alignment aware.
34,797
private static void popTransactionStartStamp ( ) { ListOrderedMap map = ( ListOrderedMap ) suspendedTxStartStamps . get ( ) ; if ( map . size ( ) > 0 ) { transactionStartStamp . set ( ( Timestamp ) map . remove ( map . lastKey ( ) ) ) ; } else { Debug . logError ( "Error in transaction handling - no saved start stamp found - using NOW." , module ) ; transactionStartStamp . set ( UtilDateTime . nowTimestamp ( ) ) ; } }
Given a full hostname, return the word upto the first dot.
34,798
public static Integer stringToInteger ( String s , Integer defaultValue ) { try { return Integer . parseInt ( s ) ; } catch ( NumberFormatException nfe ) { return defaultValue ; } }
Internal method to delete a range without validation.
34,799
public static String cut ( final String version , final int parts ) { int pos = 0 ; for ( int i = 0 ; i < parts ; i ++ ) { final int temp = version . indexOf ( "." , pos + 1 ) ; if ( temp < 0 ) { pos = version . length ( ) ; break ; } pos = temp ; } return version . substring ( 0 , pos ) ; }
Links node as last element, or returns false if full.