Kumar Varma has Published 119 Articles

How can I find the percentage of my users whose birth date is between 1980 and 1996 in MySQL?

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

86 Views

Let us first create a table −mysql> create table DemoTable    -> (    -> DateOfBirth varchar(100)    -> ); Query OK, 0 rows affected (0.55 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('2019/01/31'); Query OK, 1 row affected (0.19 sec) mysql> insert ... Read More

How can I set an icon for my iOS application?

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

114 Views

Every app needs a beautiful and memorable icon that attracts attention in the App Store and stands out on the Home screen. Your icon is the first opportunity to communicate, at a glance, your app’s purpose. It also appears throughout the system, such as in Settings and search results.Here we ... Read More

How to get the current location latitude and longitude in iOS?

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

2K+ Views

Almost all the application uses location services, thus having complete understanding on location is necessary. In this post we will be seeing how to get current location’s latitude and longitude.For this we will be using CLLocationManager, you can read more about it herehttps://developer.apple.com/documentation/corelocation/cllocationmanagerWe will be developing a sample application where ... Read More

MySQL query to return only the rows which are numeric?

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

652 Views

Use REGEXP to return only the numeric rows. Let us first create a table −mysql> create table DemoTable    -> (    -> StudentId varchar(100)    -> ); Query OK, 0 rows affected (0.51 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('John74747'); Query OK, ... Read More

Display different variables in MySQL using LIKE?

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

76 Views

Following is the syntax −show variables where Variable_name like 'yourVariable1%' or Variable_name like 'yourVariable2%', .............N;Let us implement the above syntax to show(more than one) variables −mysql> show variables where Variable_name like 'key%' or Variable_name like 'innodb_undo%' or Variable_name like 'innodb_log%';Output+------------------------------------+----------+ | Variable_name                 ... Read More

MySQL query to get first two highest column values from a table?

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

360 Views

To get the first two highest columns, use ORDER BY. With that, use LIMIT 2 to get only the first 2 −select *from yourTableName order by yourColumnName DESC LIMIT 2;Let us first create a table −mysql> create table DemoTable    -> (    -> Value int    -> ); Query ... Read More

branching statement in Java

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:22

415 Views

Java programming language provides following types of decision making or branching statements.Java programming language provides following types of decision making statements.Sr.No.Statement & Description1if statementAn if statement consists of a boolean expression followed by one or more statements.2if...else statementAn if statement can be followed by an optional else statement, which executes ... Read More

What is the meaning of JavaScript void 0?

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:21

181 Views

The void operator is used to evaluate the given expression. After that, it returns undefined. It obtains the undefined primitive value, using void(0).If inserting an expression into a web page results in unwanted effect, then use JavaScript void to remove it. Adding JavaScript:Void(0), returns the undefined primitive value.The void operator ... Read More

Differences between & and && operators in Java.

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:21

7K+ Views

& is a bitwise operator and compares each operand bitwise.It is a binary AND Operator and copies a bit to the result if it exists in both operands.Assume integer variable A holds 60 and variable B holds 13 then  (A & B) will give 12 which is 0000 1100.Whereas && ... Read More

Advertisements