Nitya Raut has Published 221 Articles

What would be output if we will try to extract time values by providing the date values only to MySQL EXTRACT() function?

Nitya Raut

Nitya Raut

Updated on 29-Jan-2020 06:03:30

102 Views

When we try to extract hour value from a date, then EXTRACT() function will give the output 0 with a warning as shown in the below-given example −mysql> Select EXTRACT(Hour from '2017-10-20'); +---------------------------------+ | EXTRACT(Hour from '2017-10-20') | +---------------------------------+ | 0                 ... Read More

In MYSQL, how can we store a date where the day, month or both month & day are zero?day are zero?

Nitya Raut

Nitya Raut

Updated on 28-Jan-2020 10:34:35

312 Views

To store such kind of dates where the day, month or both month & day are zero we must have to set mode of sql to allow_invalid_dates mode.mysql> set sql_mode = 'allow_invalid_dates'; Query OK, 0 rows affected (0.00 sec) mysql> insert into check_date(OrderDate) values('2017-00-00'); Query OK, 1 row affected ... Read More

Flexbox layout losing proportions when reduced in size

Nitya Raut

Nitya Raut

Updated on 28-Jan-2020 09:19:54

113 Views

To avoid the Flexbox layout issue, you need to add the following:* {    flex-shrink: 0;    min-width: 0;    min-height: 0; }Here, flex-shrink: 1 - Flex items are allows to shrinkmin-width: 0 - flex items to shrink past their content

Cancels ongoing watchPosition call in HTML5

Nitya Raut

Nitya Raut

Updated on 28-Jan-2020 08:28:19

273 Views

The clearWatch method cancels an ongoing watchPosition call. When canceled, the watchPosition call stops retrieving updates about the current geographic location of the device.                    var watchID;          var geoLoc;          function showLocation(position) ... Read More

How much should be a JavaScript Line Length?

Nitya Raut

Nitya Raut

Updated on 17-Jan-2020 09:59:56

766 Views

Try to keep the length of lines less than 80 characters. This would make the code easier to read. Best practice is to move to next line using break if JavaScript statements aren’t fitting in a single line.In addition, move to next line only after a comma or operator. For ... Read More

Delete duplicate alphanumeric entries from column data in SQL

Nitya Raut

Nitya Raut

Updated on 18-Dec-2019 10:05:14

182 Views

You can opt for using regular expressions to remove the duplicate numbers from column c or any other intended column.ExampleSELECT REPLACE_REGEXPR ('([A-Za-z0-9])\1+' in 'BB11222343CC'    WITH '\1'    OCCURRENCE ALL) FROM OutputB12343C

How to use singleton class in android?

Nitya Raut

Nitya Raut

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

3K+ Views

Before getting into example, we should know what singleton design pattern is. A singleton is a design pattern that restricts the instantiation of a class to only one instance. Notable uses include controlling concurrency and creating a central point of access for an application to access its data store.This example demonstrate ... Read More

How to use Singleton with Global Context in android?

Nitya Raut

Nitya Raut

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

850 Views

Before getting into example, we should know what singleton design patter is. A singleton is a design pattern that restricts the instantiation of a class to only one instance. Notable uses include controlling concurrency, and creating a central point of access for an application to access its data store.This example ... Read More

How to get the number of records in a table using JDBC?

Nitya Raut

Nitya Raut

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

489 Views

The ResultSet class doesn’t provide any direct method to get the number of records in a table.The beforeFirst() method navigates the pointer/curser of the ResultSet object to its default position before first.In the same way the last() method positions the cursor at the last row of the ResultSet object.Using these ... Read More

Understanding Logistic Regression in Python?

Nitya Raut

Nitya Raut

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

389 Views

Logistic Regression is a statistical technique to predict the binary outcome. It’s not a new thing as it is currently being applied in areas ranging from finance to medicine to criminology and other social sciences.In this section we are going to develop logistic regression using python, though you can implement ... Read More

Previous 1 ... 7 8 9 10 11 ... 23 Next
Advertisements