Ankith Reddy has Published 996 Articles

IntStream rangeClosed() method in Java

Ankith Reddy

Ankith Reddy

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

1K+ Views

The rangeClosed() class in the IntStream class returns a sequential ordered IntStream from startInclusive to endInclusive by an incremental step of 1. This includes both the startInclusive and endInclusive values.The syntax is as followsstatic IntStream rangeClosed(int startInclusive, int endInclusive)Here, startInclusive is the value including the first value and endInclusive is ... Read More

What is the alias to Show Tables in MySQL Result?

Ankith Reddy

Ankith Reddy

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

471 Views

You can use AS command for alias to show tables in MySQL result. Following is the syntax −SELECT TABLE_NAME AS anyAliasName FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = DATABASE();Let us implement the above syntax −mysql> SELECT TABLE_NAME AS MY_TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = DATABASE();This will produce the following output −+------------------------------------+ | MY_TABLE_NAME ... Read More

8086 program to convert ASCII to BCD number

Ankith Reddy

Ankith Reddy

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

4K+ Views

In this program we will see how to find the equivalent BCD number from an ASCII value.Problem StatementWrite 8086 Assembly language program to find the equivalent BCD number from an ASCII value. The number is stored at memory location 2050 and store the result at memory location 3050.DiscussionThis program can ... Read More

How to create LabelValue Tuple in Java?

Ankith Reddy

Ankith Reddy

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

103 Views

You can create a LabelValue tuple using the with() method or using just the constructor. Let us first see what we need to work with JavaTuples. To work with LabelValue class in JavaTuples, you need to import the following packageimport org.javatuples.LabelValue;Note: Download JavaTuples Jar library to run JavaTuples program. If ... Read More

Can I find out the next auto_increment to be used?

Ankith Reddy

Ankith Reddy

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

99 Views

Yes, you can find out the next auto_increment with SELECT AUTO_INCREMENT as shown in the below syntax −SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA= yourDatabaseName AND TABLE_NAME=yourTableName;Let us first create a table −mysql> create table DemoTable (    ClientId int NOT NULL AUTO_INCREMENT PRIMARY KEY,    ClientName varchar(20),    ClientAge int ... Read More

What is difference between GET and POST method in HTTP protocol?

Ankith Reddy

Ankith Reddy

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

559 Views

GET methodThe GET method sends the encoded user information appended to the page request. The page and the encoded information are separated by the ? character as follows −http://www.test.com/hello?key1=value1&key2=value2The GET method is the default method to pass information from the browser to the web server and it produces a long ... Read More

8086 program for selection sort

Ankith Reddy

Ankith Reddy

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

1K+ Views

In this program we will see how to sort array elements in ascending order by using selection sort.Problem StatementWrite 8086 Assembly language program to sort the elements in a given array using selection sort technique. The array is started from memory offset 501. The size of the series is stored ... Read More

C Program to validate an IP address

Ankith Reddy

Ankith Reddy

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

8K+ Views

In this program we will see how to validate an IP address using C. The IPv4 addresses are represented in dot-decimal notation. There are four decimal numbers (all are ranging from 0 to 255). These four numbers are separated by three dots.An example of a valid IP is: 192.168.4.1To validate ... Read More

MongoDB equivalent of WHERE IN(1,2,…)?

Ankith Reddy

Ankith Reddy

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

221 Views

The MongoDB equivalent of WHERE IN(1, 2, ....) is $in operator. The syntax is as followsdb.yourCollectionName.find({yourFieldName:{$in:[yourValue1, yourValue2, ....N]}}).pretty();Let us first create a collection with documents> db.whereInDemo.insertOne({"StudentName":"John", "StudentMathScore":57}); {    "acknowledged" : true,    "insertedId" : ObjectId("5ca281ec6304881c5ce84ba5") } > db.whereInDemo.insertOne({"StudentName":"Larry", "StudentMathScore":89}); {    "acknowledged" : true,    "insertedId" : ObjectId("5ca281f56304881c5ce84ba6") } ... Read More

The listIterator() method of CopyOnWriteArrayList in Java starting at a specified position

Ankith Reddy

Ankith Reddy

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

144 Views

The listIterator() method CopyOnWriteArrayList class returns a list iterator over the elements in this list, beginning at the specified position in the list.The syntax is as followspublic ListIterator listIterator(int index)Here, index is the index of the first element to be returned from the list iterator.To work with CopyOnWriteArrayList class, you ... Read More

Advertisements