Sort Strings on an Android RecyclerView

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

2K+ Views

Before getting into Sort array list elements for recycler view example, we should know, what is Recycler view in android. Recycler view is a more advanced version of the list view and it works based on View holder design pattern. Using recycler view we can show grids and list of items.This example demonstrates how to integrate Sorted Recycler View by creating a beautiful student records app that displays student name with age.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 − Open ... Read More

Unwritten Social Rules Everyone Should Follow

Knowledge base
Updated on 30-Jul-2019 22:30:24

8K+ Views

Being in a society, you have the responsibility of following some etiquette. These, when followed, makes you a better person as viewed by the society and also help you develop some self-discipline as well.When you are in a group or being associated with a group, you will carry some responsibilities such asBeing polite and using words such as Please, Sorry and Thank you will please the people around you and makes a good impression.Behaving gently and speaking in a normal voice but not loudly.Using your own things and sticking to your boundaries.Asking for permission, if you have to use other's ... Read More

What is a BPO and Qualifications for a Job in BPO

Rani RPS
Updated on 30-Jul-2019 22:30:24

4K+ Views

BPO stands for Business Process Outsourcing. This is a great career option for freshers, whether they are technical or nontechnical students. Here a company or a country delegates or employs people to get non-core work done by experts from other companies or other countries. BPO outsourcing can be two types.Back office outsourcing: Herein the jobs are offsite and entail dealing mainly with customer care, data processing, accounting, finance or other technical work. This is a non-voice based BPO category.Front office outsourcing: Here the job is front office service oriented. The nature of the job is to provide customer related services ... Read More

Great Features of Windows 10

Tejas Charukula
Updated on 30-Jul-2019 22:30:24

199 Views

Windows 10 is a Personal Computer Operating System developed and released by Microsoft on July 29, 2015. It has some new features when compared to its earlier version of Windows 8.The start menuMicrosoft had made a very bold move to eliminate the start menu when they had released the Windows 8 but however, in the windows 10, the start menu is back.It has the same tiles like structure like it had before along with the regular app icons as well.It was previously a folder based organization but now you can just type the name of the app or folder that ... Read More

Get Sum for Every Distinct Value in Another Column in MySQL

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

3K+ Views

You can get the sum for every distinct value in another column with the help of aggregate function SUM() with GROUP BY command. To understand the above concept, let us create a table. The query to create a table is as follows:mysql> create table SumOfEveryDistinct -> ( -> Id int not null, -> Amount int -> ); Query OK, 0 rows affected (0.59 sec)Insert some records in the table using insert command. The query is as follows:mysql> insert into SumOfEveryDistinct values(10, 100); Query OK, 1 row affected (0.19 ... Read More

Convert Long to Numeric Primitive Data Types in Java

karthikeya Boyini
Updated on 30-Jul-2019 22:30:24

707 Views

Let’s say we have Long object here.Long myObj = new Long("9879");Now, if we want to convert this Long to short primitive data type. For that, use the in-built shortValue() method −// converting to short primitive types short shortObj = myObj.shortValue(); System.out.println(shortObj);In the same way convert Long to another numeric primitive data type int. For that, use the in-built intValue() method −// converting to int primitive types int intObj = myObj.intValue(); System.out.println(intObj);The following is an example wherein we convert Long to numeric primitive types short, int, float, etc −Example Live Demopublic class Demo { public static void main(String[] args) ... Read More

Create a Cumulative Sum Column in MySQL

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

3K+ Views

To create a cumulative sum column in MySQL, you need to create a variable and set to value to 0. Cumulative sum increments the next value step by step with current value.Firstly, you need to create a variable with the help of SET. The syntax is as follows −set @anyVariableName:= 0;The syntax to create a cumulative sum column in MySQL is as follows −select yourColumnName1, yourColumnName2, ........N, (@anyVariableName := @anyVariableName + yourColumnName2) as anyVariableName from yourTableName order by yourColumnName1;To understand the above concept, let us create a table. The following is the query to create a table −mysql> create table ... Read More

Convert Long Primitive to Long Object in Java

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

9K+ Views

To convert long primitive to Long object, follow the below steps.Let’s say the following is our long primitive.// primitive long val = 45; System.out.println("long primitive: "+val);Now, to convert it to Long object is not a tiresome task. Include the same long value while creating a new Long object −// object Long myObj = new Long(val); System.out.println("Long object: "+myObj);The following is the complete example −Example Live Demopublic class Demo { public static void main(String[] args) { // primitive long val = 45; ... Read More

Alter MySQL Table Column Defaults

Jennifer Nicholas
Updated on 30-Jul-2019 22:30:24

223 Views

To alter a MySQL table column defaults, you can use the CHANGE command. The syntax is as follows −alter table yourTableName change yourCoumnName youColumnName datatype not null default Value;To understand the above syntax, let us create a table. The following is the query −mysql> create table DefaultDemo −> ( −> ArrivalTime timestamp −> ); Query OK, 0 rows affected (0.65 sec)Here is the query that describes the table with default column −mysql> desc DefaultDemo;The following is the output −+-------------+-----------+------+-----+---------+-------+ | Field | Type ... Read More

List Databases Vertically in MySQL Command Line

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

252 Views

You can use backward slash followed by G i.e. \G instead of semicolon(;). The syntax is as follows to display database names vertically in MySQL command lineSHOW DATABASES \GTo display all database names vertically, you need to use \G. The query is as followsmysql> show databases\GThe following is the output*************************** 1. row *************************** Database: business *************************** 2. row *************************** Database: database1 *************************** 3. row *************************** Database: databasesample *************************** 4. row *************************** Database: education *************************** 5. row *************************** Database: hello *************************** 6. row *************************** Database: information_schema *************************** 7. row *************************** Database: javadatabase2 *************************** 8. row *************************** Database: javasampledatabase *************************** 9. row ... Read More

Advertisements