Rama Giri has Published 110 Articles

MySQL select any one field out of two with respect to the value of a third field?

Rama Giri

Rama Giri

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

42 Views

For this, use IF(). Let us first create a table −mysql> create table DemoTable    -> (    -> PlayerName varchar(100),    -> PlayerScore int,    -> PlayerStatus varchar(100)    -> ); Query OK, 0 rows affected (0.58 sec)Insert some records in the table using insert command −mysql> insert into ... Read More

Deleting the nth row in MySQL?

Rama Giri

Rama Giri

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

703 Views

To delete nth row in MySQL, use DELETE statement and work with subquery. Let us first create a table:mysql> create table DemoTable1    -> (    -> StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> StudentName varchar(100)    -> ); Query OK, 0 rows affected (0.99 sec)Following is the ... Read More

How to work with array variable in MySQL?

Rama Giri

Rama Giri

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

1K+ Views

MySQL does not support array variables. To get the same result, use the table DUAL. Following is the syntax:SELECT yourValue1 AS ArrayValue FROM DUAL UNION ALL SELECT yourValue2 FROM DUAL UNION ALL SELECT yourValue3 FROM DUAL UNION ALL SELECT yourValue4 FROM DUAL UNION ALL . . . . . . ... Read More

How to call a stored procedure using select statement in MySQL?

Rama Giri

Rama Giri

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

5K+ Views

In MySQL, it is not possible to use select from procedure in FROM clause. You can use CALL command and after that the SELECT statement can be executed.Let us first create a table:mysql> create table DemoTable2    -> (    -> CustomerId int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> ... Read More

How to make an HTTP POST request on iOS App using Swift?

Rama Giri

Rama Giri

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

847 Views

To make an http request in iOS we’ll make use of DataTask and sessions. We’ll create configuration, sessions, url, request, and dataTask objects. Let’s see the steps that we’ll go through.First of all we need to create a session object, which default configuration.let configuration = URLSessionConfiguration.default let session = URLSession(configuration: ... Read More

How to resize an UIImageView using Swift?

Rama Giri

Rama Giri

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

2K+ Views

To resize an image in iOS using swift we’ll make use of frame.Let’s see this with help of an example.Create an empty project and add an empty Image view.Create its outlet.Add an image to your project and assign the image to image view.Initially when we run the application, it looks ... Read More

How do you hide the onscreen keyboard in iOS App?

Rama Giri

Rama Giri

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

312 Views

To hide a keyboard on screen we need to make use of some internal functions that are predefined in the iOS SDK. The keyboard appears on screen when we are typing in a text Field or textView. We need to make use of internal function according to the text field.For ... Read More

1-Persistant CMSA

Rama Giri

Rama Giri

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

1K+ Views

1-persistent CSMA is an aggressive version of Carrier Sense Multiple Access (CMSA) protocol that operates in the Medium Access Control (MAC) layer. Using CMSA protocols, more than one users or nodes send and receive data through a shared medium that may be a single cable or optical fiber connecting multiple ... Read More

Java String isEmpty() method example.

Rama Giri

Rama Giri

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

111 Views

The isEmpty() method of the String class returns true if the length of the current string is 0.Example Live Demoimport java.lang.*; public class StringDemo {    public static void main(String[] args) {       String str = "tutorialspoint";       //prints length of string       System.out.println("length of ... Read More

How MySQL LOCATE() function is different from its synonym functions i.e. POSITION() and INSTR() functions?

Rama Giri

Rama Giri

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

314 Views

As all of these functions are used to return the position of a substring within a string but LOCATE() function is a bit different from POSITION() and INSTR() function. In both POSITION() AND INSTR() functions, we cannot manage the starting position of search with the help of argument as position ... Read More

Advertisements