The border-bottom-color changes the color of the bottom border. You can try to run the following code to implement the border-bottom-color property:Example p.demo { border:4px solid; border-bottom-color:#FF0000; } Example showing border top color property
The border-top-width property changes the width of top border. You can try to run the following code to implement border-top-width property:Example This is demo content.
As we know that by default searching in LOCATE() function starts from beginning. We can manage the start position by giving an argument to specify the position from which we want to start the search in string. Following example will demonstrate it −Examplemysql> Select LOCATE('good','Ram is a good boy. Is Ram a good boy?',11)As Result; +--------+ | Result | +--------+ | 29 | +--------+ 1 row in set (0.00 sec)In the above example, we have given the value 11 as the argument for position. It means that MySQL will start searching from 11th position.
It will return NULL as the output when the value of either first argument i.e. substring or the value of second argument i.e. substring is NULL. Example below will demonstrate it −Examplemysql> Select LOCATE(NULL,'Ram is a good boy')As Result; +--------+ | Result | +--------+ | NULL | +--------+ 1 row in set (0.00 sec) mysql> Select LOCATE('Ram',NULL)As Result; +--------+ | Result | +--------+ | NULL | +--------+ 1 row in set (0.00 sec)
With the help of MySQL CONV() function, a value from one number system can be converted to the other number system.SyntaxCONV(N, from_base, to_base)Here, ‘N’ is the number which is to be converted, ‘from_base’ is the current base of that number and ‘to_base’ is the base in which that number has to be converted. ‘N’ is interpreted as an integer but it may be specified as integer or a string.Examplemysql> Select CONV('10', 10, 2) AS 'DECIMAL TO BINARY'; +-------------------+ | DECIMAL TO BINARY | +-------------------+ | 1010 | +-------------------+ 1 row in set (0.00 sec)In ... Read More
MySQL allows us to use integer values as the arguments of the LOCATE() function. We do not need to use quotes. It can be demonstrated with the help of the following example −Examplemysql> Select LOCATE(5,1698235); +-------------------+ | LOCATE(5,1698235) | +-------------------+ | 7 | +-------------------+ 1 row in set (0.00 sec) mysql> Select LOCATE(56,1698235); +--------------------+ | LOCATE(56,1698235) | +--------------------+ | 0 | +--------------------+ 1 row in set (0.00 sec) mysql> Select LOCATE(23,1698235); +--------------------+ | LOCATE(23,1698235) | +--------------------+ | 5 | +--------------------+ 1 row in set (0.00 sec)
As we know that enumeration values are associated with index values hence if we will use enumeration values in an expression then all the calculations would be done on index numbers. The following example will clarify it −mysql> Select * from Result; +-----+--------+-------+ | Id | Name | Grade | +-----+--------+-------+ | 100 | Gaurav | GOOD | | 101 | Rahul | POOR | | 102 | Rahul | NULL | | 103 | Mohan | | +-----+--------+-------+ 4 rows in set (0.00 sec) mysql> Select SUM(Grade) from result; +------------+ | SUM(Grade) | +------------+ ... Read More
This article will help you to create IPtables rules that you can directly use for your daily or routine needs, These examples will act as basic templates for you to work on iptables with these rules which suit your specific requirement.Deleting the IPtables or Existing RulesBefore you start building new IPtables set of rules, you should clean up all the default rules, and existing rules. Use the IPtables flush command, below are some examples –#iptables --flush (or) # iptables --FDefault Policies ChainThe default policy is ACCEPT, change the policy to DROP for all the INPUT, FORWARD, OUTPUT.# iptables -P INPUT ... Read More
A system call is the fundamental interface between an application and the Linux kernel. When a Unix/Linux program does a file I/O, network data transfer or invokes some process which directly or indirectly interact with the low level instructions, then system call is involved. Making these calls usually involves using a library called glibc which contains the functions.ExamplesBelow is a list of some frequently used system calls and their purpose.Sr.NoSystem CallPurpose1chmodchange permissions of a file2chdirchange working directory3forkcreate a child process4unlinkdelete a name and possibly the file it refers toA systems programmer writes program that will not directly make the systems ... Read More
The wc command also known as word count command is a fundamental command any Linux user should be aware of. It is mostly used with the l switch to do a line count, but it can actually give count of multiple things with various arguments supplied to it. Below is a list of what are those possible arguments. The we will see examples on each of them.Sr.NoCommandUsage1wc -cDisplay number of bytes2wc -mDisplay number of characters3wc -wDisplay number of words4wc -lDisplay number of lines5wc -LDisplay length of longest lineLets consider the below file for our examples.ubuntu@ubuntu:~$ cat inspire.txt Mastering anything needs ... Read More
 Data Structure
 Networking
 RDBMS
 Operating System
 Java
 iOS
 HTML
 CSS
 Android
 Python
 C Programming
 C++
 C#
 MongoDB
 MySQL
 Javascript
 PHP