Nishtha Thakur has Published 498 Articles

How to use Navigable set interface in Android?

Nishtha Thakur

Nishtha Thakur

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

156 Views

This example demonstrates about How to use Navigable set interface in AndroidStep 1 &minus 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 replace command in Android sqlite?

Nishtha Thakur

Nishtha Thakur

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

446 Views

Before getting into example, we should know what sqlite data base in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the relational database features. In order to ... Read More

How to use charAt() in Android textview?

Nishtha Thakur

Nishtha Thakur

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

435 Views

This example demonstrates about How to use charAt() in Android 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

How to use Tree set in Android?

Nishtha Thakur

Nishtha Thakur

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

394 Views

This example demonstrates about How to use Tree set in AndroidStep 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 get day of month, day of year and day of week in android using offset date time API class?

Nishtha Thakur

Nishtha Thakur

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

919 Views

This example demonstrate about How to get day of month, day of year and day of week in android using offset date time API class.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 ... Read More

Find items that do not have a certain field in MongoDB?

Nishtha Thakur

Nishtha Thakur

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

163 Views

To find items that do not have a certain field, use the $exists operator. The syntax is as follows −> db.yourCollectionName.find({"yourItemName":{$exists:false}}).pretty();To understand the syntax, let us create a collection with the document. The query to create a collection with a document is as follows −> db.findDocumentDoNotHaveCertainFields.insertOne({"UserId":101, "UserName":"John", "UserAge":21}); {   ... Read More

How to SELECT min and max value from the part of a table in MySQL?

Nishtha Thakur

Nishtha Thakur

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

427 Views

To select min and max value from the part of a table in MySQL, use the following syntax −select min(yourColumnName) as yourAliasName1, max(yourColumnName) as yourAliasName2 from (select yourColumnName from yourTableName limit yourLimitValue) tbl1;Let us first create a table. Following is the query −mysql> create table MinAndMaxValueDemo    -> (   ... Read More

Loop through all MongoDB collections and execute query?

Nishtha Thakur

Nishtha Thakur

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

780 Views

First of all, you need to get your collection with the help of getCollectionNames().The database name is “test”. Let us loop through all MongoDB collections and execute the query. The query is as follows −> db.getCollectionNames().forEach(function(collectioNameDemo) ... {    ... var nextDemo = db[(collectioNameDemo) ].find().sort({_id:-1}).limit(1);    ... if (nextDemo.hasNext())   ... Read More

How to use unixepoch in Android sqlite?

Nishtha Thakur

Nishtha Thakur

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

190 Views

Before getting into an example, we should know what sqlite database in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built-in SQLite database implementation. SQLite supports all the relational database features. In order to access ... Read More

How to align views at the bottom of the screen in iOS

Nishtha Thakur

Nishtha Thakur

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

1K+ Views

The recommended way and the modern way is to do using constraint. We will be using constraint to align the views at the bottom of the screen.Step 1: Open Xcode → New Projecr → Single View Application → Let’s name it “ViewAlignment”I’ll be using UIView, but you can use any ... Read More

Advertisements