Use the contains() method to check if a specific element exists in LinkedHashSet or not.Let us first create a LinkedHashSet and add some elements −LinkedHashSet l = new LinkedHashSet(); l.add(new String("1")); l.add(new String("2")); l.add(new String("3")); l.add(new String("4")); l.add(new String("5")); l.add(new String("6")); l.add(new String("7"));Now, check whether it contains element “5” or not −l.contains("5")The following is an example to check if a particular element exists in LinkedHashSet −Example Live Demoimport java.util.*; public class Demo { public static void main(String[] args) { LinkedHashSet l = new LinkedHashSet(); l.add(new String("1")); l.add(new String("2")); ... Read More
An adverb clause is a subordinate clause that functions as an adverb. It modifies a verb, an adjective, or adverb. The adverb itself is a word which qualifies a verb or adjective or a pronoun.ExampleWhen the last guest left the party, we started dancing.If I make a promise, I won't break it.Here, when the last guest left the party and if I make a promise are adverb clauses.TypeQuestion answeredExamplePlaceWhere?Wherever there are calculators, there is Casio.TimeWhen?After the fruit is ripe, it is sold at the market.CauseWhy? (What caused this?)I didn't call her because I'm busy.PurposeWhy? (What was the reason for doing ... Read More
You can strip time component from datetime with the help of DATE() function. The syntax is as follows −SELECT DATE(yourColumnName) from yourTableName;To understand the above concept, let us first create a table −mysql> create table StripComponentDatetimeDemo -> ( -> YourDateTime datetime -> ); Query OK, 0 rows affected (0.60 sec)Let us now insert some records in the table. The query is as follows −mysql> insert into StripComponentDatetimeDemo values(date_add(now(), interval 1 day)); Query OK, 1 row affected (0.13 sec)Display records with the help of select statement. The query is as follows displaying ... Read More
In this program, we will see how to move blocks of data from one place to another.Problem StatementWrite 8085 Assembly language program to move a data block. The blocks are assumed to be non-overlapping. The block size is given, the block is starting from X and we have to move it to the location Y.DiscussionThe non-overlapping block movement is relatively an easy task. Here the block is starting at position X, we have to move it to position Y. The location Y is far away from X. So Y > X + block size.In this program, the data are stored ... Read More
First, create a HashSet and elements to it −HashSet hs = new HashSet(); // add elements to the hash set hs.add("B"); hs.add("A"); hs.add("D"); hs.add("E"); hs.add("C"); hs.add("F"); hs.add("K");Let us now convert the above HashSet to an array −Object[] ob = hs.toArray();The following is an example to convert elements in a HashSet to an array −Example Live Demoimport java.util.*; public class Demo { public static void main(String args[]) { // create a hash set HashSet hs = new HashSet(); // add elements ... Read More
In this program we will see how to sort a block of bytes using bubble sorting technique.Problem StatementWrite8085 Assembly language program to sort numbers in ascending order where n number of numbers are stored in consecutive memory locations starting from 8041H and the value of n is available in memory location 8040H (Using BUBBLE sort).DiscussionIn this program we will arrange the numbers in bubble sorting technique. In this sorting technique, it will be executed in different pass. In each pass the largest number is stored at the end of the list. Here we are taking the numbers from location 8041H ... Read More
Animations and other effects can be used in PowerPoint to add a bit of flair to presentations. Without this, the presentation made in PowerPoint becomes too dull, and at times even very boring.Adding Animations to College PowerPoint PresentationYou will have to select the object that you want to animate. You also have to click on text and/or images to animate.After you have selected the object, select an animation from the “Animations” tab, located in the top menu bar, such that you can modify the animation settings as per your choice.Handle the Slide transitions from the “Transitions” tab.Out of the four ... Read More
You can use aggregate function count() with group by. The syntax is as follows.select yourColumnName, count(*) as anyVariableName from yourtableName group by yourColumnName;To understand the above syntax, let us create a table. The query to create a table is as follows.mysql> create table CountSameValue -> ( -> Id int, -> Name varchar(100), -> Marks int -> ); Query OK, 0 rows affected (0.70 sec)Insert records in the table using insert command. The query is as follows.mysql> insert into CountSameValue values(1, 'Sam', 67); Query OK, 1 row affected (0.17 sec) mysql> insert into CountSameValue values(2, 'Mike', 87); Query OK, 1 ... Read More
In this program we will see how to sort a block of bytes in ascending order using bubble sorting technique.Problem StatementWrite8085 Assembly language program to sort numbers in ascending order where n number of numbers are stored in consecutive memory locations starting from 8041H and the value of n is available in memory location 8040H (Using BUBBLE sort).DiscussionIn this program we will arrange the numbers in bubble sorting technique. In this sorting technique, it will be executed in different pass. In each pass the largest number is stored at the end of the list. Here we are taking the numbers ... Read More
To insert a new cell into UITableView we'll first have to create a table view cell and then add it to the table view using Cell for row at method of Table view.We can create a cell using Storyboard or by creating a nib of class UITableViewCell.In the View controller drag and drop a table view and connect it's outlet to the ViewController class.Let's create a cell in the table view we just created and create it's class, call it CustomCell, and assign the class to cell.Give it an identifier "CustomCell"Add a label in the cell and change it to ... Read More