Nishtha Thakur

Nishtha Thakur

398 Articles Published

Articles by Nishtha Thakur

Page 39 of 40

How to use substr () in Android sqlite?

Nishtha Thakur
Nishtha Thakur
Updated on 30-Jul-2019 338 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 access this database, you don't need to establish any kind of connections for it like JDBC, ODBC etc.This example demonstrate about How to use substr () in Android sqliteStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to ...

Read More

How to use Linked hash set in Android?

Nishtha Thakur
Nishtha Thakur
Updated on 30-Jul-2019 252 Views

This example demonstrates about How to use a Linked hash 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    android:orientation="vertical">                                 In the above code, we have taken the name and record number as Edit text, when user click on save button it will store the data into ArrayList. Click on the refresh button ...

Read More

How to use trim () in Android sqlite?

Nishtha Thakur
Nishtha Thakur
Updated on 30-Jul-2019 445 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 access this database, you don't need to establish any kind of connections for it like JDBC, ODBC etc.This example demonstrate about How to use trim () in Android sqliteStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to ...

Read More

C++ Program to Generate Random Hexadecimal Bytes

Nishtha Thakur
Nishtha Thakur
Updated on 30-Jul-2019 2K+ Views

We shall discuss about a C++ program which can generate random Hexadecimal numbers. Here we shall use rand() and itoa() functions to implement the same. Let us discuss on these functions separately and categorically.rand(): rand() function is a predefined method of C++. It is declared in header file. rand() is used to generate random number within a range. Here min_n is the minimum range of the random numbers and max_n is the maximum range of the numbers. So rand() will return the random numbers between min_n to (max_n – 1) inclusive of the limit values. Here if we mention ...

Read More

C++ Program to Implement Expression Tree Algorithm

Nishtha Thakur
Nishtha Thakur
Updated on 30-Jul-2019 518 Views

An expression tree is basically a binary which is used to represent expressions. In expression tree, internal nodes correspond to operators and each leaf node corresponds to an operand. Here is a C++ Program to implement the Expression Tree Algorithm which takes the postfix expression as an input and generates the corresponding expression tree traversed in inorder.AlgorithmBegin    function construct_expression_tree():       Flag = 1 when it is operand.       Flag = -1 when it is operator.       S = suffix[0] means read the first operand from the expression.    For i = 0 and ...

Read More

How to create unique index in Android sqlite?

Nishtha Thakur
Nishtha Thakur
Updated on 30-Jul-2019 672 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 access this database, you don't need to establish any kind of connections for it like JDBC, ODBC etc.This example demonstrate about How to create unique index in Android sqliteStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to ...

Read More

How to initialize private static members in C++?

Nishtha Thakur
Nishtha Thakur
Updated on 30-Jul-2019 24K+ Views

Here we will see how to initialize the private static member variables initialization in C++. We can put static members (Functions or Variables) in C++ classes. For the static variables, we have to initialize them after defining the class.To initialize we have to use the class name then scope resolution operator (::), then the variable name. Now we can assign some value.The following code will illustrate the of static member initializing technique.Example#include using namespace std; class MyClass{    private:       static int st_var;    public:       MyClass(){          st_var++; //increase the value ...

Read More

How to use blob data type in Android sqlite?

Nishtha Thakur
Nishtha Thakur
Updated on 30-Jul-2019 1K+ 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 access this database, you don't need to establish any kind of connections for it like JDBC, ODBC etc.This example demonstrate about How to use blob data type in Android sqliteStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details ...

Read More

Create Octet Tuple from another collection in Java

Nishtha Thakur
Nishtha Thakur
Updated on 30-Jul-2019 176 Views

You can create Octel Tuple from another collection i.e. List or arrays. For List, use the fromCollection() method.Let us first see what we need to work with JavaTuples. To work with Octet class in JavaTuples, you need to import the following package −import org.javatuples.Octet;Note: Download JavaTuples Jar library to run JavaTuples program. If you are using Eclipse IDE, then Right Click Project -> Properties -> Java Build Path -> Add External Jars and upload the downloaded JavaTuples jar file. Refer the below guide for all the steps to run JavaTuples −Steps: How to run JavaTuples program in EclipseThe following is an ...

Read More

What is the setAtX() method of the Ennead Tuple in Java

Nishtha Thakur
Nishtha Thakur
Updated on 30-Jul-2019 154 Views

To set Ennead value in Java, you need to use the setAtX() method. Here, X represents the index wherein you need to set the value i.e. for index 1, use setAt1() method. Set the value as the parameter value of the method.Let us first see what we need to work with JavaTuples. To work with Ennead class in JavaTuples, you need to import the following package −import org.javatuples.Ennead;Note − Download JavaTuples Jar library to run JavaTuples program. If you are using Eclipse IDE, then Right Click Project -> Properties -> Java Build Path -> Add External Jars and upload the ...

Read More
Showing 381–390 of 398 articles
Advertisements