Categories
Css Css3

em vs px

The most confusing part of CSS styling is that font-size attribute i.e. how this will show in various resolutions. em: This scalable unit is used in web document media due to scalability and their mobile-device-friendly environment. For instance one em is equal to current font-size i.e. if font-size of the document is 10pt then 1em […]

Categories
Html

Links in HTML

To create any links in HTML internal or external <a> element is used. Clicking on this link user goes to another page or another external url. Normal links looks like: <a href=”http://www.example.com”>Click here</a> You can parameters too: <a href=”http://www.example.com?param1=100&param2=200″>Click here</a> Note to remember that parameters are separated by (&) after each parameter value. To open […]

Categories
Creative blog

Choose the right blog topic

The first thing before writing a blog is choose a blog topic that suitable for you to build a successful blog. So do not make any mistake by choosing a wrong topic. So while creating a blog first ask yourself that “What topic should I choose?” or “What topic I am capable to write?”This is […]

Categories
Html

HTML Tables

In html there are set of elements that are needed to create tables. Table can be created using <table> element.Each row of a tables are defines via <tr> element and each cell are defines via <td> element within <tr> element. So a basic structure of a table looks like: <table> <tr> <td>Cell</td> <td>Cell</td> </tr> <tr> […]

Categories
Css Css3

Knowing !important

Using !important rules can be a dangerous way to style your webpage that usually means you are forcefully doing this, but they exist for some reason. The paragraph will be colored red, even there is a ID selector that has higher priority. So, the this rule overrides all the particular property. An !important rule works […]

Categories
MySQL

MySQL ALTER TABLE, DROP TABLE

To change the structure of a table you use ALTER TABLE statement. This allows you to add or drop column, change data type, rename table etc. Example of ALTER TABLE: ALTER TABLE table_name CHANGE COLUMN table_id table_id INT(11) NOT NULL AUTO_INCREMENT; To remove existing table you need to use DROP TABLE statement as below: Example […]

Categories
MySQL

MySQL Views

A database view is a virtual table which is defined as a SQL select query with JOIN statement. Same as database table it consists of rows and columns. When any data of a tables changes, the corresponding view reflects that changes as well. Advantages: A database view allows you to simplify complex queries. You do […]

Categories
MySQL

Data Types – MySQL

MySQL supports different data types while creating columns i.e. what type of value is using for the column or fixed/variable length etc. It has different types of data types i.e. Numeric: TINYINT, SMALLINT, MEDIUMINT, INT, BIGINT, DECIMAL, FLOAT, DOUBLE, BIT String: CHAR, VARCHAR, BINARY, VARBINARY, TINYBLOB, BLOB, MEDIUMBLOB, LONGBLOB, TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT, ENUM, SET […]

Categories
MySQL

Use DISTINCT to eliminate duplicate rows

In a table there may be data available i.e. duplicate. Each time you querying and get all the duplicate data. Use DISTINCT to avoid it. Suppose in a coountry table there are two same country name the using DISTINCT you will get the only one name for each country. SELECT DISTINCT country_name FROM table_country;

Categories
AngularJS

AngularJS Forms & Validation

Using AngularJS Forms you can collect number of inputs. Form can also validate input data. For any type of invalid input it can throw error for notify user. But note to remember that this is just a client side validation. You need to validate from server side also. Here is a sample code for AngularJS […]