Rishi Rathor has Published 149 Articles

Control register of 8257

Rishi Rathor

Rishi Rathor

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

2K+ Views

The processor, in active state writes to the Control register of 8257 to configure its working purpose. To find out the status of 8257, the processor reads status register of the processor. The control register is of length 8-bits which is only read by the processor but not read. It ... Read More

Programming the 8253

Rishi Rathor

Rishi Rathor

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

333 Views

According to the microprocessor point of view, the 8253 is designed and has some specialty port chip I/O. We don't use it for interfering the I/O devices. For performing the application of time it is used. 8253 has the addressed A1 and A0 input pins.The counters have width of 16 bits. ... Read More

MySQL extract year from date format?

Rishi Rathor

Rishi Rathor

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

296 Views

To extract year from date format, you can use in-built function YEAR() from MySQL. The query is as follows −mysql> SELECT YEAR(curdate()) as OnlyYearFromCurrentDate;The following is the output −+-------------------------+ | OnlyYearFromCurrentDate | +-------------------------+ | 2018 ... Read More

Create a table in MySQL that matches another table?

Rishi Rathor

Rishi Rathor

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

123 Views

To create a table in MySQL that matches with another table, use CREATE TABLE command with LIKE operator. The syntax is as follows −create table yourNewTableName like yourOldTableName;The above syntax creates structure of the table.If you want all records then use INSERT INTO…...SELECT *FROM command. The syntax is as follows ... Read More

Calculate Age from given Date of Birth in MySQL?

Rishi Rathor

Rishi Rathor

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

873 Views

To calculate age in MySQL from Date of Birth, you can use the following syntax −SELECT YEAR(CURRENT_TIMESTAMP) - YEAR(yourColumnName) - (RIGHT(CURRENT_TIMESTAMP, 5) < RIGHT(yourColumnName, 5)) as anyVariableName from yourTableName;To understand the above concept, let us create a table. The following is the query to create a table.mysql> create table AgeCalculatesDemo ... Read More

How do I alter table column datatype on more than 1 column at a time in MySql?

Rishi Rathor

Rishi Rathor

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

76 Views

To add more than 1 column with ALTER table command, you can use MODIFY column command. The syntax is as follows −alter table yourTableName modify column yourColumnName1 dataType, modify column yourColumnName2 dataType, . . . modify column yourColumnNameN dataTypeTo understand the above syntax, let us create a table. The following ... Read More

What is "Processing Symbol Files" message in Xcode?

Rishi Rathor

Rishi Rathor

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

177 Views

Processing symbol files is a message displayed on xcode when we create a project’s build. When this message appears, in background Xcode downloads files and symbol files for specific device and a specific processor on which build shall be installed.The symbol files contains debug symbols which are used to debug ... Read More

Which MySQL type is most suitable for “price” column?

Rishi Rathor

Rishi Rathor

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

20K+ Views

The best type for price column should be DECIMAL. The type DECIMAL stores the value precisely.For Example - DECIMAL(10, 2) can be used to store price value. It means the total digit will be 10 and two digits will be after decimal point.To understand the type DECIMAL, let us create a ... Read More

Find the difference between two timestamps in days with MySQL

Rishi Rathor

Rishi Rathor

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

585 Views

Use DATEDIFF() function from MySQL to get the difference between two timestamps in days.The syntax is as follows −select datediff(yourColumnName1, yourColumnName2) as anyVariableName from yourTableName;To understand the above syntax, let us create a table. The following is the query to create a table −mysql> create table DifferenceTimestamp ... Read More

How add 1 day to Date in swift?

Rishi Rathor

Rishi Rathor

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

10K+ Views

To 1 day to a date in swift we need to create a date first. Once that date is created we have to add specific days to it. In this example we’ll see how we can achieve the same.Let’s create a date first, let it be today, let today = ... Read More

Advertisements