Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Articles on Trending Technologies
Technical articles with clear explanations and examples
How to Find out Linux Version currently Installed on your Machine?
Are you new to Linux/Ubuntu? Do you know, which version of Ubuntu/Linux is currently installed on your machine? If you are in a dilemma, then this article explains you about how to find out Linux version currently installed on your machine.Method 1Use the following command to find Ubuntu version as shown below −$cat /etc/*-releaseThe sample output should be like this –DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS" NAME="Ubuntu" VERSION="16.04.1 LTS (Xenial Xerus)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 16.04.1 LTS" VERSION_ID="16.04" HOME_URL="http://www.ubuntu.com/" SUPPORT_URL="http://help.ubuntu.com/" BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/" UBUNTU_CODENAME=xenialTo get the kernel information about Linux machine, use the following command as shown below −$ hostnamectlSample output should be ...
Read MoreWhy we cannot use MySQL DATE data type along with time value?
The default format for MySQL DATE data type is “YYYY-MM-DD” and in this format, there is no possibility to store the time value. Hence, we can say that we cannot use DATE data type along with time value.As we can see in the following example MySQL returns only date value even on using time along with the date.mysql> select DATE("2017-09-25 09:34:21"); +-----------------------------------+ | DATE("2017-09-25 09:34:21") | +-----------------------------------+ | 2017-09-25 | +-----------------------------------+ 1 row in set (0.04 sec)However, in DATETIME and TIMESTAMP date data types we can use the time to date.
Read MoreHow to search a record by date in MySQL table?
Suppose we have a table ‘Order123’ having ProductName, Quantity and OrderDate columns as follows −mysql> Select * from Order123; +-------------+----------+------------+ | ProductName | Quantity | OrderDate | +-------------+----------+------------+ | A | 100 | 2017-05-25 | | B | 105 | 2017-05-25 | | C | 55 | 2017-05-25 | | D | 250 | 2017-05-26 | | E | 500 | 2017-05-26 | | ...
Read MoreHTML5 / JS storage event handler
Storage event handlers only fire if the storage event triggered by another window. You can try to run the following code:// event handler window.addEventListener('storage', storageEventHandlerFunc, false); function storageEventHandlerFunc(evt) { alert("Storage event called key: " + event.key ); switch(event.key){ case 'one': case 'two': batteryDCMeter(); break; case 'extPowerOn': rechargeBattery(); break; } } sessionStorage.setItem("someKey", "someValue");
Read MoreDoes 'position: absolute' conflict with flexbox?
Absolutely positioning will not conflict with flex containers. You need to set the parent width and values as well:.parent { display: flex; justify-content: center; position: absolute; width:100% }The following is the HTML: text
Read MorePolymer 1.0 dom-repeat should display index starting at 1 with HTML
Polymer.js is a JavaScript library created by Google that allows reusing the HTML elements for building applications with components.To achieve this index, you need to set the index as:{{displayIndex(index)}}The displayIndex would be:function (index) { return index + 1; }Let us see it in an example:Subject {{displayIndex(index)}}
Read MoreFlexbox layout losing proportions when reduced in size
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
Read MoreImprove performance of a HTML5 Canvas with particles bouncing around
To enhance the performance of Canvas with particles bouncing around, try the following:Separate the calculations from the drawing.Request a redraw after you have updated your calculations.Optimize collision detection by not testing evert particle against each other.Reduce callback usage.Reduce function calls.Inline.
Read MoreDifference between div~div and div:not(:first-of-type)?
Both are same in terms of matching elements. Let us see an example: If you have CSS rules with both selectors matching the same elements, then your div: not(:first-of-type) will get precedence due to the: first-of-type pseudo-class.
Read MoreWhat HTML5 tag should be used for filtering search results.
To filter search results, use the element. The header should be in the section of the search results: Search results
Read More