Why China is way ahead than India in technology?

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

1K+ Views

Statistics show that in 1980 the economies of China and India were almost the same in terms of gross domestic product (GDP). But China has crossed India and continuing to run ahead. China is ahead of India economically because it has initiated economic reforms at least 1 decade earlier.Chinese are currently obsessed with technological leadership and their economy is growing at an average rate of 10% every year. In fact, the Chinese manufacturing sector is presently eight times the size of India's. There are many reasons for their rapid growth in technology.Chinese Government has initiated Business-friendly Special Economic Zones and ... Read More

Retrieve a large select by chunks in MySQL?

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

5K+ Views

To retrieve large select by chunks, you need to use ORDER BY LIMIT. The syntax is as follows:SELECT *FROM yourTableName ORDER BY yourColumnName LIMIT 0, 10;From the above syntax, you will get 10 rows from the table. In the above syntax, 0 represents the first row from the result set of a table that means it is zero index based. The second value of LIMIT represents the maximum number of rows that can be retrieved from the table.If you want the next rows after 10 to 30, then use in LIMIT like this. The syntax is as follows:SELECT *FROM yourTableName ... Read More

Sort by order of values in a MySQL select statement IN clause?

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

233 Views

You can use field() function with ORDER BY clause to sort by order of values. The syntax is as followsSELECT *FROM yourTableName WHERE yourColumnName IN(Value1, Value2, Value3, .......N); ORDER BY FIELD(yourColumnName ,Value1, Value2, Value3, .......N);To understand the above syntax, let us create a table. The query to create a table is as followsmysql> create table SelectInDemo    -> (    -> StudentId int,    -> StudentName varchar(100),    -> StudentAge int    -> ); Query OK, 0 rows affected (1.04 sec)Insert records in the table using insert command. The query is as followsmysql> insert into SelectInDemo values(1, 'Mike', 23); Query ... Read More

How to subtract 1 hour from current time using Swift?

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

3K+ Views

To subtract hours from a date in swift we need to create a date first. Once that date is created we have to subtract hours from that, though swift does not provide a way to subtract date or time, but it provides us a way to add date or date component in negative value. In this example we’ll see how we can achieve the same.Let’s create a date first, let it be today, let today = Date()Now to modify this date we’ll use the add function with negative value, let modifiedDate = Calendar.current.date(byAdding: .hour, value: -2, to: today)!Now to see ... Read More

Android Working with Recycler View

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

2K+ Views

Recycler view is a more advanced version of listview and works based on View holder design pattern. Using recyclerview we can show grids as well as a list of items.This example demonstrates how to integrate RecyclerView 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 build.gradle and add Recycler view library dependency.apply plugin: 'com.android.application' android {    compileSdkVersion 28    defaultConfig {       applicationId "com.example.andy.tutorialspoint"   ... Read More

How to set random background for Recyclerview in Android?

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

3K+ Views

Before getting into set random background color 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 set the random background for Recyclerview 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 ... Read More

What is the salary of Indian Prime Minister, and What other perks they get?

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

920 Views

The post of Prime Minister of India, for one of the largest and most populated countries in the world, is not an easy position to hold. Since the Prime Minister of the country has to undergo a lot of pressure and work, there are obviously some perks that he or she will be eligible for.Let us see what is the salary of the prime minister is and what are the perks and luxuries that he can access when he is in the post of the prime minister.The monthly salary of the Prime Minister of India is approximately 1, 60, 000 ... Read More

MySQL stored procedure return value?

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

14K+ Views

To return a value from stored procedure, you need to use user defined session specific variable. Add @ symbol before variable name.For example, use @symbol for variable valido. The syntax for the same is as follows:SELECT @valido;Whenever you use select statement, you need to use @anyVariableName. The syntax is as follows:SELECT @anyVariableName;Here is the demo of stored procedure of return value. The query to create a stored procedure is as follows:mysql> create procedure ReturnValueFrom_StoredProcedure -> ( -> In num1 int, -> In num2 int, -> out valido int ... Read More

How to display records vertically in MySQL command line?

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

3K+ Views

You can use backward slash followed by G i.e. \G instead of semicolon(;). The syntax is as follows to show records vertically in MySQL command line.SELECT *FROM yourTableName\GTo understand the above syntax, let us create a table. The query to create a table is as followsmysql> create table showRecordsVertically -> ( -> Id int, -> Name varchar(100), -> Age int -> ); Query OK, 0 rows affected (2.10 sec)Insert some records in the table using insert command. The query is as followsmysql> insert into showRecordsVertically ... Read More

How to 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

Advertisements