Append Data from ArrayDeque to ArrayList for ListView in Android

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

396 Views

This example demonstrate about How to append data from array deque to array list for list view 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/login.xml.                                 In the above code, we have taken name as Edit text, when user click on save button it will store the data into arraylist. Click on refresh button to ... Read More

Save Password in Android WebView

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

2K+ Views

This example demonstrate about How to save password in android webview.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. In the above code, we have taken web view to show facebook.com.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.app.ProgressDialog; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.webkit.WebChromeClient; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.EditText; public class MainActivity extends AppCompatActivity {    @RequiresApi(api ... Read More

Check if Android Mobile Supports Dynamic Sensor

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

252 Views

This example demonstrate about How to check android mobile supports dynamic sensorStep 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. In the above code, we have taken text view to show dynamic sensor information.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.annotation.SuppressLint; import android.app.KeyguardManager; import android.app.usage.UsageEvents; import android.content.Context; import android.hardware.SensorManager; import android.hardware.fingerprint.FingerprintManager; import android.os.Build; import android.os.Bundle; import android.security.keystore.KeyGenParameterSpec; import android.security.keystore.KeyProperties; import android.support.annotation.RequiresApi; import android.support.v4.view.MotionEventCompat; import android.support.v7.app.AppCompatActivity; import ... Read More

Use TINYINT Value in Android SQLite

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

189 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 tinyint value in Android sqlite.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to ... Read More

Set Label Value and Label in Java

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

337 Views

To set LabelValue value and label in Java, use the setLabel() and setValue() methods. Let us first see what we need to work with JavaTuples. To work with LabelValue class in JavaTuples, you need to import the following package −import org.javatuples.LabelValue;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

Remove Object from Array in MongoDB

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

2K+ Views

You can use $pull operator to remove the object from an array in MongoDB. To understand the concept, let us create a collection with the document. The query to create a collection with a document is as follows −> db.removeObjectFromArrayDemo.insertOne( ... {    ...    ... "StudentName": "John",    ... "StudentAcademicProjectDetails":    ... [{          ... "StudentProjectId": 101,          ... "StudentProjectName": "Pig Dice Game"       ... },       ... {          ... "StudentProjectId": 110,          ... "StudentProjectName": "Library Management System"       ... ... Read More

Phyllotaxis Pattern in Python

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

404 Views

What is phyllotaxis pattern?When we go back, in our botany classes and the plant world, phyllotaxis means the arrangement of flowers, leaves or seeds on a plant stem, similar to the one found in Fibonacci spiral. Based on Fibonacci sequence, the Fibonacci spiral is a set of numbers that follows a pattern similar on pascal’s triangle. The Fibonacci sequence numbers are something like - 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, etc. So the Fibonacci sequence number is the sum of its previous numbers.Fibonacci spiralsWe generally look for symmetry and patterns to understand the objects ... Read More

Add Two Numbers Without Using Arithmetic Operators in C/C++

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

327 Views

In this article we will see how to add two numbers without using arithmetic operators like +, ++, -, or --.To solve this problem, we can solve them using binary adder logic. In that case we were designed half adder and full adder. These adders can add one bit binary numbers. By cascading multiple adders, we have can create circuit to add bigger numbers.In that adder, we have performed XOR operation among the numbers, then for the carry we were performing the ANDing logic. These features are implemented here to add two numbers.Example Code Live Demo#include using namespace std; int ... Read More

MySQL Delete Operation Where ID is the Biggest

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

200 Views

You can use ORDER BY DESC command with LIMIT 1 for this since we need to delete only a single ID.Let us first create a table −mysql> create table DemoTable (    UserId int,    UserName varchar(20) ); Query OK, 0 rows affected (0.57 sec)Insert records in the table using insert command −mysql> insert into DemoTable values(100, 'John'); Query OK, 1 row affected (0.10 sec) mysql> insert into DemoTable values(234, 'Mike'); Query OK, 1 row affected (0.28 sec) mysql> insert into DemoTable values(145, 'Sam'); Query OK, 1 row affected (0.19 sec) mysql> insert into DemoTable values(278, 'Carol'); Query OK, 1 ... Read More

Add Column to a Table from Another Table in MySQL

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

2K+ Views

Yes, we can add a column to a table from another table. Let us first create two tables. The query to create a table is as follows −mysql> create table FirstTable    -> (    -> UserId int,    -> UserName varchar(20)    -> ); Query OK, 0 rows affected (1.48 sec)Now create the second table. The query to create the second table is as follows −mysql> create table SecondTable    -> (    -> UserId int,    -> UserAge int    -> ); Query OK, 0 rows affected (1.57 sec)Now, add column Age to the first table. Firstly, ... Read More

Advertisements