Ankith Reddy has Published 1070 Articles

DoubleStream noneMatch() method in Java

Ankith Reddy

Ankith Reddy

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

72 Views

The noneMatch() method of the DoubleStream class returns true if none of the elements of this stream match the provided predicate.The syntax is as followsboolean noneMatch(DoublePredicate predicate)Here, predicate is a stateless predicate to apply to elements of this stream. To use the DoubleStream class in Java, import the following packageimport ... Read More

How can I select only those rows where first digit is a number from 0 to 9 in MySQL?

Ankith Reddy

Ankith Reddy

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

989 Views

To select only those rows where first digit is a number from 0 to 9, use RLIKE. Following is the syntax −select *from yourTableName where yourColumnName RLIKE '^[0-9]+'Let us first create a table −mysql> create table DemoTable (    Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    QuestionNumber varchar(200) ); Query ... Read More

How to read a HTTP header using JSP?

Ankith Reddy

Ankith Reddy

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

2K+ Views

Following is the example which uses getHeaderNames() method of HttpServletRequest to read the HTTP header information. This method returns an Enumeration that contains the header information associated with the current HTTP request.Once we have an Enumeration, we can loop down the Enumeration in the standard manner. We will use the ... Read More

8086 program to find the square root of a perfect square root number

Ankith Reddy

Ankith Reddy

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

807 Views

In this program we will see how to find the square root of a perfect squared.Problem StatementWrite 8086 Assembly language program to find the square root of a perfect squared number. The number is stored at memory address 3000. Finally store the result at memory address 3002.DiscussionFor the perfect square ... Read More

Get all MySQL records from the previous day (yesterday)?

Ankith Reddy

Ankith Reddy

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

2K+ Views

To get the records from the previous day, the following is the syntaxselect *from yourTableName where date(yourColumnName)= DATE(NOW() - INTERVAL 1 DAY);To understand the above syntax, let us create a table. The query to create a table is as followsmysql> create table yesterDayRecordsDemo    -> (    -> Id int ... Read More

C Program to print “Even” or “Odd” without using Conditional statement

Ankith Reddy

Ankith Reddy

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

9K+ Views

In this section we will see how to check whether a number is odd or even without using any kind of conditional statements like (=, ==).We can easily check the odd or even by using the conditional statements. We can divide the number by 2, then check whether the remainder ... Read More

IntStream rangeClosed() method in Java

Ankith Reddy

Ankith Reddy

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

924 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

317 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

3K+ 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

65 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

Advertisements