Karthikeya Boyini has Published 2193 Articles

Remove lowest element in Java TreeSet

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:24

647 Views

To remove the lowest element, use the pollFirst() method.Create a TreeSet and add elements to it −TreeSet tSet = new TreeSet(); tSet.add("78"); tSet.add("56"); tSet.add("88"); tSet.add("12");Now, remove the lowest element −tSet.pollFirst()The following is an example to remove lowest element in Java TreeSet −Example Live Demoimport java.util.*; public class Demo { ... Read More

Get Size of TreeSet in Java

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:24

500 Views

To get the size of TreeSet, use the size() method.Create a TreeSet and add elements to it −TreeSet tSet = new TreeSet(); tSet.add("78"); tSet.add("56"); tSet.add("88"); tSet.add("12");Now, get the size of the TreeSet −tSet.size()The following is an example to get the size of TreeSet in Java −Example Live Demoimport java.util.*; public class ... Read More

Get Tail Set from TreeSet in Java

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:24

194 Views

To get the Tail Set from TreeSet, use the tailSet() method. Tail Set begins from a point and returns the elements greater than the element set in the beginning.First, create a TreeSet and add elements −TreeSet set = new TreeSet(); set.add("78"); set.add("56"); set.add("88"); set.add("54"); set.add("76"); set.add("34");Now, get the Tail Set ... Read More

ftp_alloc() function in PHP

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:24

144 Views

The ftp_alloc() function allocates space for a file to be uploaded to the FTP server.Syntaxftp_alloc(connection, size_of_file, res);Parametersconnection − The FTP connection to usesize_of_file − The number of bytes to allocateres − A variable to store the server responseReturnThe ftp_alloc() function returns TRUE on success or FALSE on failureExampleThe following is ... Read More

ftp_chdir() function in PHP

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:24

188 Views

The ftp_chdir() function changes the current directory on the FTP server.Syntaxftp_chdir(con, dir)Parameterscon − The FTP connectiondir − The directory to change toReturnThe ftp_chdir() function returns TRUE on success or FALSE on failure.ExampleThe following is an example wherein the current directory is changed −

Python Program to extract email-id from URL text file

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:23

336 Views

Here we are using regular expression package for extracting email-id from the URL-text file. Given the URL- text file. Using regular expression package we define the pattern of email-id then use findall() function, using this method to check the text which will match with this pattern. Input text= Please ... Read More

Instruction type ADC R in 8085 Microprocessor

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:23

7K+ Views

In 8085 assembly language coding, sometimes there is a requirement to add two numbers and where each of these numbers are having several Bytes in size. As example, let us add the following two 16-bit numbers. 1 10 50H ... Read More

Instruction type SUB R in 8085 Microprocessor

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:23

5K+ Views

In 8085 Instruction, SUB is a mnemonic that stands for ‘SUBtract contents of R from Accumulator. Here R stands for any of the following registers, or memory location M pointed by HL pair. R = A, B, C, D, E, H, L, or M Mnemonics, ... Read More

Different ways to start a Task in C#

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:23

9K+ Views

To start a task in C#, follow any of the below given ways. Use a delegate to start a task. Task t = new Task(delegate { PrintMessage(); }); t.Start(); Use Task Factory to start a task. Task.Factory.StartNew(() => {Console.WriteLine("Welcome!"); }); You can also use Lambda. ... Read More

Python program to calculate BMI(Body Mass Index) of your Body

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:23

1K+ Views

We have to enter our height and weight. Our task is to calculate BMI using formula. Algorithm Step 1: input height and weight of your body. Step 2: then applying the formula for calculation BMI. Step 3: display BMI. Example Code height = float(input("Enter your height(m): ")) ... Read More

Advertisements