Code_Function stringlengths 13 13.9k | Message stringlengths 10 1.46k |
|---|---|
private fun initResumableMediaRequest( request: GDataRequest, file: MediaFileSource, title: String ) { initMediaRequest(request, title) request.setHeader(GDataProtocol.Header.X_UPLOAD_CONTENT_TYPE, file.getContentType()) request.setHeader( GDataProtocol.Header.X_UPLOAD_CONTENT_LENGTH, file.getContentLength().toString()... | Initialize a resumable media upload request . |
fun toShortArray(array: Array<Short>): ShortArray? { val result = ShortArray(array.size) for (i in array.indices) { result[i] = array[i] } return result } | Coverts given shorts array to array of shorts . |
fun createTable(db: SQLiteDatabase, ifNotExists: Boolean) { val constraint = if (ifNotExists) "IF NOT EXISTS " else "" db.execSQL("CREATE TABLE $constraint'SIMPLE_ADDRESS_ITEM' ('_id' INTEGER PRIMARY KEY ,'NAME' TEXT,'ADDRESS' TEXT,'CITY' TEXT,'STATE' TEXT,'PHONE' INTEGER);") } | Creates the underlying database table . |
fun eInverseRemove(otherEnd: InternalEObject?,featureID: Int,msgs: NotificationChain?): NotificationChain? {when (featureID) { UmplePackage.ABSTRACT_METHOD_DECLARATION___METHOD_DECLARATOR_1 -> return (getMethodDeclarator_1() as InternalEList<*>).basicRemove( otherEnd, msgs ) } return super.eInverseRemove(otherEnd, feat... | < ! -- begin-user-doc -- > < ! -- end-user-doc -- > |
protected fun emit_N4SetterDeclaration_SemicolonKeyword_5_q( semanticObject: EObject?, transition: ISynNavigable?, nodes: List<INode?>? ) { acceptNodes(transition, nodes) } | Ambiguous syntax : ' ; ' ? This ambiguous syntax occurs at : body=Block ( ambiguity ) ( rule end ) fpar=FormalParameter ' ) ' ( ambiguity ) ( rule end ) |
private fun updateProgress(progressLabel: String, progress: Int) { if (myHost != null && (progress != previousProgress || progressLabel != previousProgressLabel)) { myHost.updateProgress(progressLabel, progress) } previousProgress = progress previousProgressLabel = progressLabel } | Used to communicate a progress update between a plugin tool and the main Whitebox user interface . |
@Throws(FitsException::class) fun FitsDate(dStr: String?) { if (dStr == null || dStr.isEmpty()) { return } var match: Matcher = FitsDate.NORMAL_REGEX.matcher(dStr) if (match.matches()) { this.year = getInt(match, FitsDate.NEW_FORMAT_YEAR_GROUP) this.month = getInt(match, FitsDate.NEW_FORMAT_MONTH_GROUP) this.mday = get... | Convert a FITS date string to a Java < CODE > Date < /CODE > object . |
fun <T> fromBytes(value: ByteArray?, clazz: Class<T>): T { return try { val input = Input(ByteArrayInputStream(value)) clazz.cast(kryo.get().readClassAndObject(input)) } catch (t: Throwable) { LOG.error("Unable to deserialize because " + t.message, t) throw t } } | Deserialize a profile measurement 's value . The value produced by a Profile definition can be any numeric data type . The data type depends on how the profile is defined by the user . The user should be able to choose the data type that is most suitable for their use case . |
fun SequencesWriter( source: SequenceDataSource?, outputDir: File?, sizeLimit: Long, type: PrereadType?, compressed: Boolean ) { this(source, outputDir, sizeLimit, null, type, compressed, null) } | Creates a writer for processing sequences from provided data source . |
fun allowStyling(): HtmlPolicyBuilder? { allowStyling(CssSchema.DEFAULT) return this } | Convert < code > style= '' & lt ; CSS & gt ; '' < /code > to sanitized CSS which allows color , font-size , type-face , and other styling using the default schema ; but which does not allow content to escape its clipping context . |
private fun PhoneUtil() { throw Error("Do not need instantiate!") } | Do n't let anyone instantiate this class . |
fun unregisterTap(tap: Tap?) { mTaps.remove(tap) } | Remove instrumentation tap |
fun isNavBarTintEnabled(): Boolean { return mNavBarTintEnabled } | Is tinting enabled for the system navigation bar ? |
override fun equals(other: Any?): Boolean { return if (_map.equals(other)) { true } else if (other is Map<*, *>) { val that = other if (that.size != _map.size()) { false } else { val it: Iterator<*> = that.entries.iterator() var i = that.size while (i-- > 0) { val (key1, value) = it.next() as Map.Entry<*, *> val key = ... | Compares this map with another map for equality of their stored entries . |
private fun declareExtensions() { BlogCommentFeed().declareExtensions(extProfile) BlogFeed().declareExtensions(extProfile) BlogPostFeed().declareExtensions(extProfile) PostCommentFeed().declareExtensions(extProfile) } | Declare the extensions of the feeds for the Blogger service . |
fun eIsSet(featureID: Int): Boolean { when (featureID) { UmplePackage.ANONYMOUS_GEN_EXPR_2__INDEX_1 -> return if (INDEX_1_EDEFAULT == null) index_1 != null else !INDEX_1_EDEFAULT.equals( index_1 ) } return super.eIsSet(featureID) } | < ! -- begin-user-doc -- > < ! -- end-user-doc -- > |
fun sequence(name: String?): ReferenceSequence? { return mReferences.get(name) } | Get the < code > ReferenceSequence < /code > selected by name . |
private fun ChainBuilder(frame: javax.swing.JFrame) { super(java.awt.BorderLayout()) frame = frame THIS = this val customPanel: javax.swing.JPanel = createCustomizationPanel() val presetPanel: javax.swing.JPanel = createPresetPanel() label = javax.swing.JLabel( "Click the \"Begin Generating\" button" + " to begin gener... | Creates the GUI shown inside the frame 's content pane . |
override fun toString(): String? { return this.materialPackageBO.toString() } | A method that returns a string representation of a parsed MaterialPackage object |
protected fun VirtualBaseTypeImpl() { super() } | < ! -- begin-user-doc -- > < ! -- end-user-doc -- > |
private fun removeParserNotices(parser: Parser) { if (noticesToHighlights != null) { val h: RSyntaxTextAreaHighlighter = textArea.getHighlighter() as RSyntaxTextAreaHighlighter val i: MutableIterator<*> = noticesToHighlights.entrySet().iterator() while (i.hasNext()) { val (key, value) = i.next() as Map.Entry<*, *> val ... | Removes all parser notices ( and clears highlights in the editor ) from a particular parser . |
fun TextLineDecoder(charset: Charset?, delimiter: String?) { this(charset, LineDelimiter(delimiter)) } | Creates a new instance with the spcified < tt > charset < /tt > and the specified < tt > delimiter < /tt > . |
fun resetViewableArea() { throw RuntimeException("resetViewableArea called in PdfDecoderFx") } | NOT PART OF API turns off the viewable area , scaling the page back to original scaling |
private fun postResults() { this.reportTestCase.host.updateSystemInfo(false) this.trState.systemInfo = this.reportTestCase.host.getSystemInfo() val factoryPost: Operation = Operation.createPost(this.remoteTestResultService) .setReferer(this.reportTestCase.host.getReferer()).setBody(this.trState) .setCompletion(null) th... | Send current test state to a remote server , by creating an instance for this particular run . |
fun clear(iterator: MutableIterator<*>) { checkNotNull(iterator) while (iterator.hasNext()) { iterator.next() iterator.remove() } } | Clears the iterator using its remove method . |
fun isTop(fact: BitSet): Boolean { return fact[topBit] } | Return whether or not given fact is the special TOP value . |
fun eraseMap() { if (MAP_STORE.getMap(MAP_STORE.getSelectedMapName()) == null) { return } for (r in MAP_STORE.getMap(MAP_STORE.getSelectedMapName()).getRoutes()) { eraseRoute(r) } } | Non-destructively erases all displayed content from the map display |
fun doTestTransfer(size: Int) { Thread.setDefaultUncaughtExceptionHandler(this) val start: Long val elapsed: Long val received: Int sendData = createDummyData(size) sendStreamSize = size recvStream = ByteArrayOutputStream(size) start = PseudoTCPBase.now() startClocks() try { connect() } catch (ex: IOException) { fail(e... | Transfers the data of < tt > size < /tt > bytes |
protected fun sequence_SkillFakeDefinition( context: ISerializationContext?, semanticObject: SkillFakeDefinition ) { if (errorAcceptor != null) { if (transientValues.isValueTransient( semanticObject, GamlPackage.Literals.GAML_DEFINITION__NAME ) === ValueTransient.YES ) errorAcceptor.accept( diagnosticProvider.createFea... | Contexts : GamlDefinition returns SkillFakeDefinition SkillFakeDefinition returns SkillFakeDefinition Constraint : name=ID |
fun closeDriver() { if (camera != null) { FlashlightManager.disableFlashlight() camera.release() camera = null } } | Closes the camera driver if still in use . |
@Throws(PageException::class) fun removeSecurityManager(password: sun.security.util.Password?, id: String) { checkWriteAccess() (ConfigImpl.getConfigServer(config, password) as ConfigServerImpl).removeSecurityManager(id) val security: Element = _getRootElement("security") val children: Array<Element> = XMLConfigWebFact... | remove security manager matching given id |
fun circle(x: Double, y: Double, r: Double) { require(r >= 0) { "circle radius must be nonnegative" } val xs: Double = scaleX(x) val ys: Double = scaleY(y) val ws: Double = factorX(2 * r) val hs: Double = factorY(2 * r) if (ws <= 1 && hs <= 1) pixel( x, y ) else offscreen.draw(java.awt.geom.Ellipse2D.Double(xs - ws / 2... | Draw a circle of radius r , centered on ( x , y ) . |
fun run() { amIActive = true val inputFile: String = args.get(0) if (inputFile.lowercase(Locale.getDefault()).contains(".dep")) { calculateRaster() } else if (inputFile.lowercase(Locale.getDefault()).contains(".shp")) { calculateVector() } else { showFeedback("There was a problem reading the input file.") } } | Used to execute this plugin tool . |
private fun <T> create(cls: Class<T>, qname: QName): T { return Configuration.getBuilderFactory().getBuilder(qname).buildObject(qname) } | Create object using OpenSAML 's builder system . |
fun createHttpConnection(): HttpConnection? { return AndroidHttpConnection() } | Create an HTTP connection |
private fun parseWaveformsFromJsonFile(waveformsFile: File): Map<Int?, FloatArray?>? { var waveformsMap: Map<Int?, FloatArray >? try { waveformsMap = parseJsonFile(waveformsFile) as Map<Int?, FloatArray?>? LOG.info("Loaded waveform images from {}", waveformsFile) } catch (exception: IOException) { waveformsMap = HashMa... | Loads the waveforms from a saved file formatted in JSON |
fun drawShape(gl: GL2?, s: Shape?, points: Boolean) { if (s is Circle) { RenderUtilities.drawCircle(gl, s as Circle?, points, true) } else if (s is java.awt.Rectangle) { RenderUtilities.drawRectangle(gl, s as java.awt.Rectangle?, points) } else if (s is java.awt.Polygon) { RenderUtilities.drawPolygon(gl, s as java.awt.... | Draws the given shape . |
@Throws(IOException::class) fun write(writer: Writer) { val map: MutableMap<String, Any> = HashMap() map["vcards"] = vcards map["utils"] = TemplateUtils() map["translucentBg"] = readImage("translucent-bg.png", ImageType.PNG) map["noProfile"] = readImage("no-profile.png", ImageType.PNG) map["ezVCardVersion"] = Ezvcard.V... | Writes the HTML document to a writer . |
fun toString(field: String): String? { val buffer = StringBuilder() if (sun.reflect.misc.FieldUtil.getField() != field) { buffer.append(sun.reflect.misc.FieldUtil.getField()) buffer.append(":") } buffer.append(if (includeLower) '[' else '{') buffer.append( if (lowerTerm != null) if ("*" == Term.toString(lowerTerm)) "\\... | Prints a user-readable version of this query . |
@Throws(ReplicatorException::class, InterruptedException::class) fun prepare(context: PluginContext?) { logger.info( "Import tables from " + this.uri.getPath() .toString() + " to the " + this.getDefaultSchema().toString() + " schema" ) tableNames = ArrayList<String>() columnDefinitions = HashMap<String, ArrayList<Colum... | Prepare plug-in for use . This method is assumed to allocate all required resources . It is called before the plug-in performs any operations . |
fun plot(draw: AbstractDrawer) { if (!visible) return draw.setColor(color) draw.setFont(font) draw.setBaseOffset(base_offset) draw.setTextOffset(cornerE, cornerN) draw.setTextAngle(angle) draw.drawText(label, coord) draw.setBaseOffset(null) } | see Text for formatted text output |
fun testShiftRight4() { val aBytes = byteArrayOf(1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26) val aSign = 1 val number = 45 val rBytes = byteArrayOf(12, 1, -61, 39, -11, -94, -55) val aNumber = BigInteger(aSign, aBytes) val result: BigInteger = aNumber.shiftRight(number) var resBytes = ByteArray(rBytes.size) ... | shiftRight ( int n ) , n > 32 |
fun fixStatsError(sendCommand: Int) { while (this.affectedRows.length < sendCommand) { this.affectedRows.get(currentStat++) = Statement.EXECUTE_FAILED } } | Add missing information when Exception is thrown . |
@Throws(IOException::class) fun readRawBytes(size: Int): ByteArray? { if (size < 0) { throw InvalidProtocolBufferNanoException.negativeSize() } if (bufferPos + size > currentLimit) { skipRawBytes(currentLimit - bufferPos) throw InvalidProtocolBufferNanoException.truncatedMessage() } return if (size <= bufferSize - buff... | Read a fixed size of bytes from the input . |
private fun resetToXMLSAXHandler() { this.m_escapeSetting = true } | Reset all of the fields owned by ToXMLSAXHandler class |
fun cuCmplx(r: Float, i: Float): cuComplex? { val res = cuComplex() res.x = r res.y = i return res } | Creates a new complex number consisting of the given real and imaginary part . |
fun make( rawSig: String?, f: sun.reflect.generics.factory.GenericsFactory? ): sun.reflect.generics.repository.MethodRepository? { return sun.reflect.generics.repository.MethodRepository(rawSig, f) } | Static factory method . |
fun add(`object`: T?) { mObjects.add(`object`) notifyItemInserted(getItemCount() - 1) } | Adds the specified object at the end of the array . |
fun compareHardware(hwMap: Map<String?, String>, checkDisk: Boolean): String? { val localMemSizeStr: String = ServerProbe.getInstance().getMemorySize() val localCpuCoreStr: String = ServerProbe.getInstance().getCpuCoreNum() hwMap[PropertyConstants.PROPERTY_KEY_DISK_CAPACITY] if (localMemSizeStr != hwMap[PropertyConstan... | Check local node hardware ( i.e . Memory size , CPU core , Disk Capacity ) are the same as in the input map . |
fun tearDown(bot: SWTWorkbenchBot) { SwtBotUtils.print("Tear Down") bot.resetWorkbench() SwtBotUtils.print("Tear Down ") } | Performs the necessary tear down work for most SWTBot tests . |
private fun handleMessage(data: ByteArray) { val buffer = Buffer() buffer.write(data) val type: Int = buffer.readShort() and 0xffff and APP_MSG_RESPONSE_BIT.inv() if (type == BeanMessageID.SERIAL_DATA.getRawValue()) beanListener.onSerialMessageReceived(buffer.readByteArray()) } else if (type == BeanMessageID.BT_GET_C... | Handles incoming messages from the Bean and dispatches them to the proper handlers . |
fun <K, V> newEmptyHashMap(iterable: Iterable<*>?): HashMap<K, V>? { return if (iterable is Collection<*>) Maps.newHashMapWithExpectedSize( iterable.size ) else Maps.newHashMap() } | Returns an empty map with expected size matching the iterable size if it 's of type Collection . Otherwise , an empty map with the default size is returned . |
fun calculateScrollY(firstVisiblePosition: Int, visibleItemCount: Int): Int { mFirstVisiblePosition = firstVisiblePosition if (mReferencePosition < 0) { mReferencePosition = mFirstVisiblePosition } if (visibleItemCount > 0) { val c: View = mListView.getListChildAt(0) var scrollY = -c.top mListViewItemHeights.put(firstV... | Call from an AbsListView.OnScrollListener to calculate the scrollY ( Here we definite as the distance in pixels compared to the position representing the current date ) . |
fun DynamicRegionFactoryImpl() {} | create an instance of the factory . This is normally only done by DynamicRegionFactory 's static initialization |
fun DViewAsymmetricKeyFields( parent: javax.swing.JDialog?, title: String?, dsaPublicKey: DSAPublicKey ) { super(parent, title, Dialog.ModalityType.DOCUMENT_MODAL) key = dsaPublicKey initFields() } | Creates new DViewAsymmetricKeyFields dialog . |
fun removeAllActions(target: CCNode?) { if (target == null) return val element: HashElement = targets.get(target) if (element != null) { deleteHashElement(element) } else { } } | Removes all actions from a certain target . All the actions that belongs to the target will be removed . |
private fun normalizeName(name: String): String? { var name: String? = name name = name?.trim { it <= ' ' } ?: "" return if (name.isEmpty()) MISSING_NAME else name } | Normalizes a name to something OpenMRS will accept . |
@Throws(QueryNodeException::class) fun build(queryNode: QueryNode): Any? { process(queryNode) return queryNode.getTag(QUERY_TREE_BUILDER_TAGID) } | Builds some kind of object from a query tree . Each node in the query tree is built using an specific builder associated to it . |
fun isEnableLighting(): Boolean { return false } | Returns false . |
protected fun prepare() { val para: Array<ProcessInfoParameter> = getParameter() for (i in para.indices) { val name: String = para[i].getParameterName() if (para[i].getParameter() == null) ; else log.log( Level.SEVERE, "prepare - Unknown Parameter: $name" ) } } | Prepare - e.g. , get Parameters . |
fun fling(velocityX: Int, velocityY: Int) { if (getChildCount() > 0) { val height: Int = getHeight() - getPaddingBottom() - getPaddingTop() val bottom: Int = getChildAt(0).getHeight() val width: Int = getWidth() - getPaddingRight() - getPaddingLeft() val right: Int = getChildAt(0).getWidth() mScroller.fling( getScrollX... | Fling the scroll view |
protected fun createSocket(): Socket? { return Socket() } | Creates a new unconnected Socket instance . Subclasses may use this method to override the default socket implementation . |
@DSGenerator( tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:36:21.616 -0500", hash_original_method = "F5BF0DDF083843E14FDE0C117BAE250E", hash_generated_method = "E1C3BB6772CE07721D8608A1E4D81EE1" ) fun netmaskIntToPrefixLength(netmask: Int): Int { return Integer.bitCount(netmask) } | Convert a IPv4 netmask integer to a prefix length |
fun createWritableChild( x: Int, y: Int, width: Int, height: Int, x0: Int, y0: Int, bandList: IntArray? ): java.awt.image.WritableRaster? { if (x < this.minX) { throw java.awt.image.RasterFormatException("x lies outside the raster") } if (y < this.minY) { throw java.awt.image.RasterFormatException("y lies outside the r... | Creates a Writable subRaster given a region of the Raster . The x and y coordinates specify the horizontal and vertical offsets from the upper-left corner of this Raster to the upper-left corner of the subRaster . A subset of the bands of the parent Raster may be specified . If this is null , then all the bands are pre... |
private fun isBlockCommented( startLine: Int, endLine: Int, prefixes: Array<String>, document: IDocument ): Boolean { try { for (i in startLine..endLine) { val line: IRegion = document.getLineInformation(i) val text: String = document.get(line.getOffset(), line.getLength()) val found: IntArray = TextUtilities.indexOf(p... | Determines whether each line is prefixed by one of the prefixes . |
fun eUnset(featureID: Int) { when (featureID) { GamlPackage.PARAMETERS__PARAMS -> { setParams(null as jdk.nashorn.internal.ir.ExpressionList?) return } } super.eUnset(featureID) } | < ! -- begin-user-doc -- > < ! -- end-user-doc -- > |
@JvmStatic fun main(args: Array<String>) { var matrixFilename: String? = null var coordinateFilename: String? = null var externalZonesFilename: String? = null var networkFilename: String? = null var plansFilename: String? = null var populationFraction: Double? = null require(args.size == 6) { "Wrong number of arguments... | Class to generate plans files from the Saturn OD-matrices provided by Sanral 's modelling consultant , Alan Robinson . |
private fun partition(a: IntArray, left: Int, right: Int): Int { var left = left var right = right val pivot = a[left + (right - left) / 2] while (left <= right) { while (a[left] > pivot) left++ while (a[right] < pivot) right-- if (left <= right) { val temp = a[left] a[left] = a[right] a[right] = temp left++ right-- } ... | Choose mid value as pivot Move two pointers Swap and move on Return left pointer |
fun isDone(): Boolean {return one.getHand().empty() || two.getHand().empty() } | Returns true if either hand is empty . |
fun ClassNotFoundException(@Nullable s: String?, @Nullable ex: Throwable) { super(s, null) ex = ex } | Constructs a < code > ClassNotFoundException < /code > with the specified detail message and optional exception that was raised while loading the class . |
fun eIsSet(featureID: Int): Boolean { when (featureID) { BasePackage.DOCUMENTED_ELEMENT__DOCUMENTATION -> return if (DOCUMENTATION_EDEFAULT == null) documentation != null else !DOCUMENTATION_EDEFAULT.equals( documentation ) } return super.eIsSet(featureID) } | < ! -- begin-user-doc -- > < ! -- end-user-doc -- > |
fun drawRangeLine( g2: java.awt.Graphics2D, plot: CategoryPlot, axis: ValueAxis, dataArea: java.awt.geom.Rectangle2D, value: Double, paint: Paint?, stroke: java.awt.Stroke? ) { val range: Range = axis.getRange() if (!range.contains(value)) { return } val adjusted: java.awt.geom.Rectangle2D = java.awt.geom.Rectangle2D.D... | Draws a line perpendicular to the range axis . |
fun startFading() { mHandler.removeMessages(MSG_FADE) scheduleFade() } | Start up the pulse to fade the screen , clearing any existing pulse to ensure that we do n't have multiple pulses running at a time . |
@Throws(Exception::class) protected fun createConnection(): Connection? { val factory = ActiveMQConnectionFactory("vm://localhost?broker.persistent=false") return factory.createConnection() } | Creates a connection . |
protected fun drawView( g: java.awt.Graphics2D, r: java.awt.Rectangle, view: View, fontHeight: Int, y: Int ) { var y = y var x: Float = r.x.toFloat() val h: javax.swing.text.LayeredHighlighter = attr.host.getHighlighter() as javax.swing.text.LayeredHighlighter val document: RSyntaxDocument = com.sun.org.apache.xerces.... | Draws a single view ( i.e. , a line of text for a wrapped view ) , wrapping the text onto multiple lines if necessary . |
fun containsKey(key: Any?): Boolean {var key = key if (key == null) {key = NULL_OBJECT}val index: Int = findIndex(key, elementData) return elementData.get(index) === key } | Returns whether this map contains the specified key . |
fun autoCorrectText(): Boolean { return preferences.getBoolean( resources.getString(R.string.key_autocorrect_text), java.lang.Boolean.parseBoolean(resources.getString(R.string.default_autocorrect_text)) ) } | Whether message text should be autocorrected . |
@Throws(Exception::class) protected fun removeNode(id: Int) { val idx: Int var node: FolderTokenDocTreeNode? = null idx = findIndexById(id) if (idx == -1) { throw IeciTdException(FolderBaseError.EC_NOT_FOUND, FolderBaseError.EM_NOT_FOUND) } node = m_nodes.get(idx) as FolderTokenDocTreeNode if (node.isNew()) m_nodes.rem... | Elimina de la lista de nodos el nodo con el id especificado |
fun deleteAttributes(columnIndices: IntArray?) { (getModel() as ArffTableModel).deleteAttributes(columnIndices) } | deletes the attributes at the given indices |
fun onSuccess(statusCode: Int, headers: Array<Header?>?, response: JSONObject?) { Log.w( LOG_TAG, "onSuccess(int, Header[], JSONObject) was not overriden, but callback was received" ) } | Returns when request succeeds |
fun lastIndexOfFromTo(element: Byte, from: Int, to: Int): Int {if (size === 0) return -1 checkRangeFromTo(from, to, size) val theElements: ByteArray = elements for (i in to downTo from) { if (element == theElements[i]) { return i } } return -1 } | Returns the index of the last occurrence of the specified element . Returns < code > -1 < /code > if the receiver does not contain this element . Searches beginning at < code > to < /code > , inclusive until < code > from < /code > , inclusive . Tests for identity . |
fun put(key: Long) { if (key == FREE_KEY) { m_hasFreeKey = true return } var ptr = (Tools.phiMix(key) and m_mask) as Int var e: Long = m_data.get(ptr) if (e == FREE_KEY) { m_data.get(ptr) = key if (m_size >= m_threshold) { rehash(m_data.length * 2) } else { ++m_size } return } else if (e == key) { return } while (true)... | Add a single element to the map |
@Throws(InstantiationException::class, IllegalAccessException::class, ClassNotFoundException::class ) fun PredictiveInfoCalculatorKraskov(calculatorName: String) { super(calculatorName) if (!calculatorName.equals( MI_CALCULATOR_KRASKOV1, ignoreCase = true ) && !calculatorName.equals(MI_CALCULATOR_KRASKOV2, ignoreCase =... | Creates a new instance of the Kraskov-Stoegbauer-Grassberger estimator for PI , with the supplied MI calculator name . |
fun DefaultDirectAdjacentSelector(type: Short, parent: Selector?, simple: SimpleSelector?) { super(type, parent, simple) } | Creates a new DefaultDirectAdjacentSelector object . |
@Inline fun postCopy(`object`: com.sun.jdi.ObjectReference?, majorGC: Boolean) { initializeHeader(`object`, false) if (!HEADER_MARK_BITS) { testAndSetLiveBit(`object`) } } | Perform any required post copy ( i.e . in-GC allocation ) initialization . This is relevant ( for example ) when MS is used as the mature space in a copying GC . |
fun parseRulesFile(`is`: InputStream): LinkedHashMap<Pattern, String>? { val rules: LinkedHashMap<Pattern, String> = LinkedHashMap() val br = BufferedReader( sun.security.util.IOUtils.getDecodingReader( `is`, StandardCharsets.UTF_ ) ) var line: String try { var linenum = 0 while (br.readLine().also { line = it } != nu... | Parses rule file from stream and returns a Map of all rules found |
fun isItemForce(): Boolean {return true } | Returns true . |
fun document(document: InputStream, mediaType: String): Builder? { documentInputStream = document mediaType = mediaType return this } | Sets the document as an input stream and its media type . |
override fun toString(): String { val text = StringBuffer() text.append( """ Print statistic values of instances (${first.toString()}-${last.toString()}= """.trimIndent() ) text.append( """ Number of instances: ${numInstances.toString()} """ ) text.append( """ NUmber of instances with unknowns: ${missingInstances.toSt... | Converts the stats to a string |
private fun scanAndLock(key: Any, hash: Int) { var first: HashEntry<K?, V?> = entryForHash(this, hash) var e: HashEntry<K?, V?> = first var retries = -1 while (!tryLock()) { var f: HashEntry<K?, V?> if (retries < 0) { if (e == null || key == e.key) retries = 0 else e = e.next } else if (++retries > MAX_SCAN_RETRIES) { ... | Scans for a node containing the given key while trying to acquire lock for a remove or replace operation . Upon return , guarantees that lock is held . Note that we must lock even if the key is not found , to ensure sequential consistency of updates . |
fun oldColor(oldColor: Int): IntentBuilder? { mOldColor = oldColor return this } | Sets the old color to show on the bottom `` Cancel '' half circle , and also the initial value for the picked color . The default value is black . |
fun __setDaoSession(daoSession: DaoSession) {daoSession = daoSessionmyDao = if (daoSession != null) daoSession.getUserDBDao() else null } | called by internal mechanisms , do not call yourself . |
fun equals(obj: Any): Boolean { if (obj === this) { return true } if (obj !is TimeTableXYDataset) { return false } val that: TimeTableXYDataset = obj as TimeTableXYDataset if (this.domainIsPointsInTime !== that.domainIsPointsInTime) { return false if (this.xPosition !== that.xPosition) { return false } if (!this.work... | Tests this dataset for equality with an arbitrary object . |
private fun startContext(crawlJob: CrawlJob) { LOGGER.debug("Starting context") val ac: PathSharingContext = crawlJob.getJobContext() ac.addApplicationListener(this) try { ac.start() } catch (be: BeansException) { LOGGER.warn(be.getMessage()) ac.close() } catch (e: Exception) { LOGGER.warn(e.message) try { ac.close() }... | Start the context , catching and reporting any BeansExceptions . |
fun performCancel(): Boolean { CnAElementFactory.getInstance().reloadModelFromDatabase() return true } | Cause update to risk analysis object in loaded model . |
fun isOpaque(): Boolean { checkOpacityMethodClient() return explicitlyOpaque } | Returns whether the background of this < code > BasicPanel < /code > will be painted when it is rendered . |
@Throws(IOException::class, ClassNotFoundException::class) private fun readObject(s: ObjectInputStream) { s.defaultReadObject() } } | Adds semantic checks to the default deserialization method . This method must have the standard signature for a readObject method , and the body of the method must begin with `` s.defaultReadObject ( ) ; '' . Other than that , any semantic checks can be specified and do not need to stay the same from version to version... |
@Throws(Exception::class) fun resetDistribution(data: Instances) { val insts = Instances(data, data.numInstances()) for (i in 0 until data.numInstances()) { if (whichSubset(data.instance(i)) > -1) { insts.add(data.instance(i)) } } val newD = Distribution(insts, this) newD.addInstWithUnknown(data, m_attIndex) m_distribu... | Sets distribution associated with model . |
@Throws(NoSuchFieldException::class) fun <T, R> readStaticField(klass: Class<T>?, fieldName: String?): R { return readAvailableField(klass, null, fieldName) } | Reads the static field with given fieldName in given klass . |
fun extractFactor_Display(laggedFactor: String): String? { val colonIndex = laggedFactor.indexOf(":L") return laggedFactor.substring(0, colonIndex) } | Parses the given string representing a lagged factor and return the part that represents the factor . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.