Kumar Varma has Published 107 Articles

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

Kumar Varma

Kumar Varma

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

3K+ 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

985 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

125 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

491 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

716 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

265 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

8K+ 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