What is an Intent in Android

George John
Updated on 30-Jul-2019 22:30:23

13K+ Views

An intent is to perform an action on the screen. It is mostly used to start activity, send broadcast receiver, start services and send message between two activities. There are two intents available in android as Implicit Intents and Explicit Intents. Here is a sample example to start new activity with old activity.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. (First Activity layout)     Step 3 − Create a new ... Read More

MySQL Datatype to Store an IP Address

Chandu yadav
Updated on 30-Jul-2019 22:30:23

5K+ Views

We can store an IP address with the help of INT unsigned. While using INSERT, include INET_ATON() and with SELECT, include INET_NTOA(). IP address is in dotted format. Let us see an example. Creating a table. mysql> create table IPV4AddressDemo -> ( -> `IPV4Address` INT UNSIGNED -> ); Query OK, 0 rows affected (0.52 sec) Inserting IP address into the table, with INET_ATON. mysql> insert into IPV4AddressDemo values(INET_ATON("120.0.0.1")); Query OK, 1 row affected (0.17 sec) To display all records. mysql> select *from IPV4AddressDemo; The following ... Read More

Background ListView Becomes Black When Scrolling in Android

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

299 Views

Before getting into listview example, we should know about listview, Listview is a collection of items pulled from arraylist, list or any databases. Most uses of listview is a collection of items in vertical format, we can scroll up/down and click on any item. Here is the simple solution to avoid Background ListView becomes black when scrolling. 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

Passband Transmission

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

6K+ Views

In passband transmission, the amplitude, phase or frequency of the carrier signal is regulated to transmit the bits. The incoming data stream is modulated onto a carrier and then transmitted over a band-pass channel. The types of passband transmission are illustrated as − Amplitude Shift Keying (ASK) In ASK, the amplitude of the signal is varied to represent the signal levels, while frequency and phase remains constant. In order to represent 0 and 1, two different amplitudes are used. Frequency Shift Keying (FSK) In FSK, the frequency of the signal is modulated to represent the signal levels, while ... Read More

Convert String to Date in MySQL

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

9K+ Views

We can convert a string to date with the help of STR_TO_DATE() function. Let us see an example. Creating a table. mysql> create table StringToDateDemo -> ( -> YourDate varchar(100) -> ); Query OK, 0 rows affected (0.49 sec) Inserting records into the table. mysql> insert into StringToDateDemo values('10/27/2018'); Query OK, 1 row affected (0.11 sec) The following is the syntax to convert string to date using the STR_TO_DATE() function. SELECT STR_TO_DATE(yourColumnName, '%m/%d/%Y') from yourTableName; Let us now implement it. ... Read More

Create a Custom ListView in Android

Ankith Reddy
Updated on 30-Jul-2019 22:30:23

4K+ Views

Before getting into listview example, we should know about listview, Listview is a collection of items pulled from arraylist, list or any databases. Most uses of listview is a collection of items in vertical format, we can scroll up/down and click on any item.What is custom listview?Custom listview works based on customAdapter. In this custom adapter we can pass custom object. We are passing subject data to listview as shown below −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 ... Read More

List All Columns in a MySQL Table

Ankith Reddy
Updated on 30-Jul-2019 22:30:23

7K+ Views

To list all columns in a table, we can use the SHOW command. Let us first create a table. mysql> create table ColumnsList -> ( -> id int, -> Firstname varchar(200), -> LastName varchar(100), -> Age int, -> Address varchar(300), -> CollegeName varchar(100) -> ); Query OK, 0 rows affected (1.33 sec) Syntax to list all column names. show columns from yourTableName; The following is the output. mysql> show columns from ... Read More

Display a List of Images and Text in a ListView in Android

Chandu yadav
Updated on 30-Jul-2019 22:30:23

6K+ Views

Before getting into listview example, we should know about listview, Listview is a collection of items pulled from arraylist, list or any databases. Most uses of listview is a collection of items in vertical format, we can scroll up/down and click on any item.What is custom listview?Custom listview works based on customAdapter. In this custom adapter we can pass custom object. We are passing subject data to listview as shown below.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 ... Read More

The Electromagnetic Spectrum

Chandu yadav
Updated on 30-Jul-2019 22:30:23

8K+ Views

The electromagnetic spectrum is the entire range of electromagnetic radiation according to the wavelength or frequencies. It has a range of frequencies from 1Hz to Hz. The waves in order of increasing frequencies are radio waves, microwaves, infrared rays, visible light, UV rays, X-rays and gamma rays.Among these range, the frequencies between Hz to Hz are used for communication. The following diagram shows the electromagnetic spectrum. The first figure gives the full range of frequency spectrum while the second figure elaborates that part of the spectrum which can be used for data communication − The ... Read More

Store Data in MySQL as JSON

George John
Updated on 30-Jul-2019 22:30:23

305 Views

We can store data in MySQL as JSON with the help of JSON data type. The following is an example. Let us now create a table. mysql> CREATE table JsonAsMySQLDemo -> ( -> id int, -> name varchar(100), -> PageDemo JSON, -> eventInfo JSON -> ); Query OK, 0 rows affected (0.67 sec) Storing records into JSON data type. mysql> INSERT into JsonAsMySQLDemo values -> ( -> 1, ... Read More

Advertisements