George John has Published 1167 Articles

How to compare field values in MongoDB?

George John

George John

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

211 Views

You can use $where operator to compare field values in MongoDB. Let us first create a collection with documents> db.comparingFieldDemo.insertOne({"Value1":30, "Value2":40}); {    "acknowledged" : true,    "insertedId" : ObjectId("5c9c99ed2d6669774125246e") } > db.comparingFieldDemo.insertOne({"Value1":60, "Value2":70}); {    "acknowledged" : true,    "insertedId" : ObjectId("5c9c99f62d6669774125246f") } > db.comparingFieldDemo.insertOne({"Value1":160, "Value2":190}); {    "acknowledged" ... Read More

8085 Program to simulate decimal up counter

George John

George John

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

1K+ Views

Now let us see a program of Intel 8085 Microprocessor. In this program we will see how to simulate the decimal up counter.Problem Statement:Write 8085 Assembly language program to simulate decimal up counter.Discussion:In this section we are simulating the decimal up counter. Here the counter will count 100 decimal numbers ... Read More

C++ Program to Search Sorted Sequence Using Divide and Conquer with the Aid of Fibonacci Numbers

George John

George John

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

386 Views

In this C++ program we implement a Divide and Conquer approach using Fibonacci numbers. Using Fibonacci numbers, we calculate mid of data array to search the data item. The time complexity of this approach is O(log(n)).AlgorithmBegin    Assign the data to the array in a sorted manner.    Take input ... Read More

Arithmetic instructions in 8086 microprocessor

George John

George John

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

14K+ Views

These instructions are used to perform arithmetic operations like addition, subtraction, multiplication, division, etc. In 8086 the destination address is need not to be the accumulator.Let us see the arithmetic instructions of 8086 microprocessor. Here the D and S are destination and source respectively. D and S can be either ... Read More

How to use Action in JSP?

George John

George John

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

724 Views

The plugin action is used to insert Java components into a JSP page. It determines the type of browser and inserts the or tags as needed.If the needed plugin is not present, it downloads the plugin and then executes the Java component. The Java component can be either ... Read More

Handling optional/empty data in MongoDB?

George John

George John

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

318 Views

In order to handle empty data, you can use $ne operator. Let us create a collection with documents. Following is the query>db.handlingAndEmptyDataDemo.insertOne({"StudentName":"John", "StudentCountryName":""}); {    "acknowledged" : true,    "insertedId" : ObjectId("5c9cbd5ca629b87623db1b12") } >db.handlingAndEmptyDataDemo.insertOne({"StudentName":"John", "StudentCountryName":null}); {    "acknowledged" : true,    "insertedId" : ObjectId("5c9cbd6ba629b87623db1b13") } > db.handlingAndEmptyDataDemo.insertOne({"StudentName":"John"}); {    "acknowledged" ... Read More

How to make Animate text from one TextView to another in Android?

George John

George John

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

628 Views

This example demonstrate about How to make Animate text from one TextView to another.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     ... Read More

How to use Android sequence layout?

George John

George John

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

394 Views

Before getting into android sequence layout, we should know what is sequence layout in android. Sequence layout contains a sequence of steps with the progress bar. According to sequence, it follows an animated progress bar.This example demonstrates How to use Android sequence layout.Step 1 − Create a new project in ... Read More

How can I make my layout scroll vertically in Android?

George John

George John

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

7K+ Views

Before getting into example, we should know what is vertical Scroll View(Scroll View). Vertical Scroll view provide by android.widget.ScrollView class. It is used to scroll child views in a vertical direction.This example demonstrates how to use Vertical Scroll view.Step 1 − Create a new project in Android Studio, go to ... Read More

How to reverse the direction of marquee of a TextView in Android?

George John

George John

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

475 Views

This example demonstrate about How to reverse the direction of marquee of a Text View.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.   ... Read More

Advertisements