Rishi Rathor has Published 149 Articles

How to programmatically add a UISegmentedControl to a container view?

Rishi Rathor

Rishi Rathor

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

2K+ Views

To add a UISegmentControl in iOS with swift we’ll have to first create a segment control and it’s controller function, i.e. it’s action. Let’s see those steps.Let’s create a function to add a segmented control.func addControl() {    let segmentItems = ["First", "Second"]    let control = UISegmentedControl(items: segmentItems) ... Read More

Can we use str_replace in MySQL?

Rishi Rathor

Rishi Rathor

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

168 Views

The str_replace version in MySQL is the replace() function. Let us first create a table to understand the function −mysql> create table StringReplaceDemo −> ( −> Id int, −> URL varchar(200) −> ); Query OK, 0 rows affected ... Read More

How to parse date in MySQL?

Rishi Rathor

Rishi Rathor

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

1K+ Views

Parse date in MySQL with the help of STR_TO_DATE() function. The syntax is as follows −select str_to_date(yourColumName, ’format’) as anyVariableName from yourTableName;The format in the above syntax is '%d-%b-%y'.Now to understand the above function, let us create a table. The following is the query to create a table −mysql> create ... Read More

MySQL BigInt zerofill vs int zerofill?

Rishi Rathor

Rishi Rathor

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

184 Views

The difference between MySQL BigInt and int is that INT is a 32-bit long while BIGINT is 64-bit long.The following are some of the points −The BigInt takes 8 bytes of storage while int takes 4 bytes of storage.The int takes 4294967295 maximum values for int(10), whereas 18, 446, 744, ... Read More

How to substring value in a MySQL table column?

Rishi Rathor

Rishi Rathor

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

212 Views

To substring a MySQL table column, use the in-built SUBSTR() function from MySQL. The syntax is as follows −select substr(yourColumnName, AnyValue) as anyVariableName from yourTableName;To understand the function substr(), let us create a table. The query to create a table is as follows −mysql> create table SubStringDemo ... Read More

Program to Find the largest number in an array of data in 8085 Microprocessor

Rishi Rathor

Rishi Rathor

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

19K+ Views

In this program we will see how to find the largest number from a block of bytes using 8085.Problem StatementWrite 8085 Assembly language program to find the largest number from a block of bytes.DiscussionIn this program the data are stored at location 8001H onwards. The 8000H is containing the size ... Read More

8085 program to add two 16 bit numbers

Rishi Rathor

Rishi Rathor

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

13K+ Views

In this program we will see how to add two 16-bit numbers.Problem StatementWrite8085 Assembly language program to add two 16-bit number stored in memory location 8000H – 8001H and 8002H – 8003H.DiscussionIn this program we are pointing the operand addresses using HL and DE register pair. Then adding LSBytes by ... Read More

8085 program to find the sum of first n natural numbers

Rishi Rathor

Rishi Rathor

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

2K+ Views

In this program we will see how to add first n natural numbers.Problem StatementWrite 8085 Assembly language program to add first N natural numbers. The value of N is provided.DiscussionWe are getting the value of N from memory location 8000H. We are using the number N as count variable, in ... Read More

8085 program to find 1's and 2's complement of 8-bit number

Rishi Rathor

Rishi Rathor

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

6K+ Views

In this program we will see how to find 1's complement and 2's complement of an 8-bit number.Problem StatementWrite 8085 Assembly language program to find 1's complement and 2's complement of a number stored in 8000H.Discussion8085 has an instruction CMA. This instruction complements the content of Accumulator. For 1's complement ... Read More

8085 program to find maximum and minimum of 10 numbers

Rishi Rathor

Rishi Rathor

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

1K+ Views

In this program we will see how to find the maximum and minimum number in a block data.Problem StatementWrite 8085 Assembly language program to find the maximum and minimum number in a block often 8-bit numbers.DiscussionIn this program we are taking the first number of the block into register D ... Read More

Advertisements