Ankith Reddy has Published 996 Articles

8086 program to find sum of odd numbers in a given series

Ankith Reddy

Ankith Reddy

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

3K+ Views

In this program we will see how to add odd numbers in a given seriesProblem StatementWrite 8086 Assembly language program to add the odd numbers stored in a given series starts from memory offset 501. The size of the series is stored at memory offset 500.DiscussionTo do this task we ... Read More

How to query an Array[String] for a Regular Expression match?

Ankith Reddy

Ankith Reddy

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

195 Views

To query an array string for a regexp match, use the following syntaxdb.yourCollectionName.find( { yourFieldName: /yourStartingValue./ } ).pretty();Let us first create a collection with documents> db.queryArrayDemo.insertOne({"StudentFullName":["Carol Taylor", "Caroline Williams", "Claire Brown"]}); {    "acknowledged" : true,    "insertedId" : ObjectId("5ca2774c6304881c5ce84ba0") } > db.queryArrayDemo.insertOne({"StudentFullName":["John Smith", "Jace Doe", "Jabin Brown"]}); {   ... Read More

How to determine the current delimiter in MySQL?

Ankith Reddy

Ankith Reddy

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

652 Views

To determine current delimiter in MySQL, use the following syntax\sThe above syntax will let you know about the current delimiter. Let us implement the above syntax.The query is as followsmysql> \sThe following is the output-------------- C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe Ver 8.0.12 for Win64 on x86_64 (MySQL Community Server - GPL) ... Read More

How to ORDER BY last 2 character string in MySQL?

Ankith Reddy

Ankith Reddy

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

2K+ Views

You can use ORDER BY RIGHT() to ORDER BY last 2 character string.The syntax is as followsselect yourColumnName from yourTableName ORDER BY RIGHT(yourColumnName , 2);To understand the above syntax, let us create a table. The query to create a table is as followsmysql> create table OrderByLast2CharactersDemo    -> (   ... Read More

DoubleStream noneMatch() method in Java

Ankith Reddy

Ankith Reddy

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

123 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

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

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

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

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

Advertisements