Print Integer Array in Android Log

Fendadis John
Updated on 26-Jun-2020 13:17:22

826 Views

This example demonstrate about How to print integer array in android Log.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 code, we have taken listview to show integer arrayStep 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.widget.ArrayAdapter; import android.widget.EditText; import android.widget.ListView; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; public class MainActivity extends AppCompatActivity {    ListView list;   ... Read More

What are Error Detecting Codes

Arjun Thakur
Updated on 26-Jun-2020 13:14:55

26K+ Views

Error-detecting codes are a sequence of numbers generated by specific procedures for detecting errors in data that has been transmitted over computer networks.When bits are transmitted over the computer network, they are subject to get corrupted due to interference and network problems. The corrupted bits leads to spurious data being received by the receiver and are called errors.Error – detecting codes ensures messages to be encoded before they are sent over noisy channels. The encoding is done in a manner so that the decoder at the receiving end can detect whether there are errors in the incoming signal with high ... Read More

Create MySQL Table with InnoDB Engine

Arjun Thakur
Updated on 26-Jun-2020 13:14:54

1K+ Views

To create a table with InnoDB engine, we can use the ENGINE command. Here is the query to create a table.mysql> create table EmployeeRecords - > ( - > EmpId int, - > EmpName varchar(100), - > EmpAge int, - > EmpSalary float - > )ENGINE=INNODB; Query OK, 0 rows affected (0.46 sec)We have set the ENGINE as INNODB above.Check the full description about the table using the DESC command.mysql> DESC EmployeeRecords;The following is the output.+-----------+--------------+------+-----+---------+-------+ | Field     | Type         | Null | Key | Default | Extra | +-----------+--------------+------+-----+---------+-------+ | EmpId     ... Read More

MySQL Select Last Few Days

Arjun Thakur
Updated on 26-Jun-2020 13:14:03

1K+ Views

To select last few days, use DATE_ADD() function in MySQL. The syntax is as follows −select date_add(curdate(), interval - anyIntgegerValue day);Or you can DATE_SUB() from MySQL.select date_sub(curdate(), interval anyIntgegerValue day);Or you can use the following syntax −select curdate() - interval anyIntgegerValue day;Here is the example of all syntaxes shown above to select last few days.Case 1 − Use of DATE_ADD() functionThe query is as follows −mysql> select date_add(curdate(), interval -6 day);Here is the output −+-------------------------------------+ | date_add(curdate(), interval -6 day) | +-------------------------------------+ | 2018-11-20                          | +-------------------------------------+ 1 row ... Read More

SELECT INTO in MySQL

Chandu yadav
Updated on 26-Jun-2020 13:12:11

2K+ Views

To do select into in MySQL, use CREATE TABLE SELECT command. The syntax is as follows −CREATE TABLE yourTableName SELECT *FROM yourOriginalTableName;To understand, let us first create a table −mysql> create table SelectIntoDemo -> ( -> Id int, -> Name varchar(200) -> ); Query OK, 0 rows affected (0.50 sec)Let us insert some records into the table with the help of insert command. The query is as follows −mysql> insert into SelectIntoDemo values(1, 'Bob'), (2, 'Carol'), (3, 'David'); Query OK, 3 rows affected (0.15 sec) Records: 3 Duplicates: 0 Warnings: 0Displaying all records with the help of select statement. The ... Read More

Check If Field Is Null or Empty in MySQL

Arjun Thakur
Updated on 26-Jun-2020 13:10:51

4K+ Views

To check whether a field is null or empty in MySQL, use the IF() function in MySQL. The syntax is as follows −SELECT IF(yourColumnName IS NULL or yourColumnName = '', 'NULLId', yourColumnName) as anyVariableName from yourTableName;To understand the above syntax, let us create a table. The following is the query to create a table −mysql> create table NullAndEmptyDemo -1> ( -> Id varchar(200) -> ); Query OK, 0 rows affected (0.66 sec)Let us now insert records into the table with the help of insert command. The query to insert records in the table is as follows. We have added null ... Read More

Error Detecting Codes: Cyclic Redundancy Checks (CRCs)

Chandu yadav
Updated on 26-Jun-2020 13:08:57

8K+ Views

Errors and Error DetectionWhen bits are transmitted over the computer network, they are subject to get corrupted due to interference and network problems. The corrupted bits leads to spurious data being received by the receiver and are called errors.Error detection techniques are responsible for checking whether any error has occurred or not in the frame that has been transmitted via network. It does not take into account the number of error bits and the type of error.For error detection, the sender needs to send some additional bits along with the data bits. The receiver performs necessary checks based upon the ... Read More

What is Interleaving

Ankith Reddy
Updated on 26-Jun-2020 13:08:14

8K+ Views

Interleaving is a tool that is used to enhance existing error correcting codes so that they can be used to perform burst error corrections as well.Most error correcting codes (ECCs) are designed to correct random errors, i.e. error caused by additive noise that is independent of each other. Burst error are the errors that occur in a sequence or as groups. They are caused due to defects in storage media or disruption in communication signals due to external factors like lightning etc. Interleaving modifies the ECC or does some processing on the data after they are encoded by ECCs.Interleaving ProcedureDuring ... Read More

Career Prospects in VFX

Dev Kumar
Updated on 26-Jun-2020 13:07:04

126 Views

Career prospects in the VFX (Visual Effects) industry are enormous, especially in a country like India which not only has a huge domestic market for VFX-enriched content in its mass media entertainment programs but is also a massive base for VFX job work for the global entertainment industry.The Right SoilIndia has the right eco-system to provide high-quality VFX output at an affordable cost and at scale. VFX requires the animators to be creative, imaginative, skilled in application software and willing to work long hours and at wages that very few other countries can match. So, yes, the opportunities in VFX ... Read More

Print Exception Messages in Android

Arushi
Updated on 26-Jun-2020 13:06:25

1K+ Views

This example demonstrate about How to print exception messages in android.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 textview to show exception message.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.TextView; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; public class MainActivity extends AppCompatActivity ... Read More

Advertisements