Skip to main content

Posts

Bootstrap 4 form validation - Advanced

Bootstrap 4 supports extraordinary ways to validate your form using the charismatic Tooltips. It also supports both .valid and .invalid feedback as well. For custom validation, you'll need to include  novalidate  attribute in your form like below, <form class="needs-validation" novalidate > </form> The .valid-tooltip class is used to display the valid feedback message. For invalid feedback message, you'll simply have to include .invalid-tooltip class. Lets see an example, <div class="container"> <h3> <a href="https://primestudyhub.blogspot.com/search/label/Bootstrap%204" target="_blank">BOOTSTRAP 4 FORM VALIDATION - ADVANCED</a></h3> <a href="https://primestudyhub.blogspot.com/search/label/Bootstrap%204" target="_blank">Learn More</a> <form class="needs-validation" novalidate> <div class="form-row"> <div class=...

Bootstrap 4 form validation

Bootstrap 4 form validation This bootstrap 4 form validation supports widely used browsers with ideal responsiveness. It provides a valuable response to your customer based on their input with HTML5 form validation. It also supports the custom validation as well. If you like to learn more about the different types of form layouts click here . Note: Bootstrap highly recommends  custom validation styles as native browser defaults are not announced to screen readers. Example <div class="container"> <h3> <a href="https://primestudyhub.blogspot.com/search/label/Bootstrap%204" target="_blank">BOOTSTRAP 4 FORM VALIDATION</a></h3> <form class="needs-validation" novalidate> <div class="form-row"> <div class="input-group col-md-4 mb-2 mr-sm-2"> <div class="input-group-prepend"> <div class="input-group-text">Name</div> ...

Bootstrap 4 form design

Bootstrap 4 form design Design responsive and fancy styled forms using bootstrap 4 form components. This drives the ideal visibility of your website. Bootstrap 4 provides the three types of form layouts, Default ( Stacked ) forms Form grid Inline forms Default (Stacked) forms Include a  .form-group  class to your form is the best way to wrap your desired form into some structure. It persuades ideal grouping of labels, help text, controls, validations etc.. <form> <div class="form-group"> <label for="name">Name</label> <input type="text" class="form-control" id="name" placeholder="Enter Name"> </div> <div class="form-group"> <label for="email">Email</label> <input type="email" class="form-control" id="email" placeholder="Enter Email"> </div> <div class="fo...

Bootstrap 4 radio button

Bootstrap 4 radio button This Bootstrap 4 radio button design outlines the most important things you should do when creating a form in your website in order to improve your brand identity and customer satisfaction. It covers Bootstrap 4 Radio Button Group, Radio Button Style, Stacked, Inline and Without labels Radio Button and More. Follow these practices to improve the brand identity to your website. Radio button is a best way to make a single choice among many different options. STACKED RADIO BUTTON This is the default radio button. Any number of radios that are created will be vertically stacked and appropriately spaced with  .form-check  class by adding into your input element. Follow the below example to understand in depth. <div class="form-check"> <input class="form-check-input" type="radio" name="Radios" id="Radio1" value="Option1"> <label class="form-check-label" for="Radio...

textAngular - HTML Editor

The textAngular is a fascinating tool for HTML Text Editor using AngularJS framework. This provides a lots of features in HTML text editing, few of them are listed below. Two Way Data Binding Easy Setting Up the Editor Styling the Editor Customising the Toolbar Toggle HTML / Rich Text Works with browsers like Chrome, Firefox, and IE8+ Very Important Does not use an iFrame. You can download the textAngular by clicking  here  or you can use the CDN URL below. CDN URL:  https://cdnjs.cloudflare.com/ajax/libs/textAngular /1.4.2/dist/textAngular.min.js Include the script tag similar to the following, < script src = ' https://cdnjs.cloudflare.com/ajax/libs/textAngular/1.4.2/dist/textAngular.min.js ' ></ script > Your js file should be like this, var myApp = angular.module('MyApp', ['textAngular']); This creates a dependency to  textAngular  in your app module. Next Step, you have to create an html element that holds the ed...

OPTION (MERGE JOIN) in SQL Server

OPTION (MERGE JOIN) in SQL Server The MERGE JOIN query hint is a best available join algorithm in SQL server. It is based on first sorting  both data sets according to the join conditions and then traversing through the sorted data sets and finding matches. The MERGE JOIN itself is very fast, but it can be an expensive choice if sort operations are required. This produces the best optimal execution plan. The syntax is, OPTION ( MERGE JOIN ); Now, Lets see how to use MERGE JOIN with SELECT statement.? select * from tbl_EmployeeDetails as e inner join tbl_BankDetails as b on b.EmpId=e.Id OPTION(MERGE JOIN); The statement returned optimal execution plan is, The MERGE JOIN operator gets a row from each input and compares them. In above statement, it merges all joins and first sorting data sets and then traversing through the sorted data sets and finding matches, if they are equal the rows are returned. If they are not equal, the lower-value row is rem...

OPTION Loop Join in SQL Server

The OPTION ( LOOP JOIN ) would enforce LOOP JOIN across all joins in the query. Using the OPTION ( LOOP JOIN ) appears to allows the query optimizer to join the tables using the nested loops in which ever order SQL server decides it is optimal. The OPTION clause must be a last clause in a statement. The syntax is, OPTION ( LOOP JOIN ); Now, Lets see how to use LOOP JOIN with SELECT statement.? select *from tbl_EmployeeDetails as e inner join tbl_BankDetails as b on b.EmpID=e.Id inner join tbl_SalesDetails as s on s.BankId=b.Id OPTION(LOOP JOIN); The statement returned execution plan is, The above statement loops through all the joins that starts from sales details and goes by bank details to employee details in which the order that SQL server thinks it is optimal. This does not follow the order of joins that we specify. Suppose, if you want the SQL server to follow the order of joins that you specify you have to use FORCE ORDER in OPTION clause. Howe...

FORCE ORDER in SQL Server

The FORCE ORDER is a query hint it executes the order of the tables exactly specified in a statement. When we use this query hint in a statement it will tell SQL server not to change the order of the joins in the query. Basically, the SQL server rearrange your joins to be in the order that it thinks it will be optimal for your query to execute. Now, Lets see the execution plan without the FORCE ORDER: The above execution plan demonstrates the optimal order of the joins returned by the SQL server. As you can see the order starts from the sales details and goes by bank details to employee details. Suppose if you don't want the SQL server to change the order of the joins in a query you can use FORCE ORDER to stop the default ordering. The syntax for FORCE ORDER query hint is, OPTION ( FORCE ORDER ); Now, Lets see the execution plan with the FORCE ORDER: select * from tbl_EmployeeDetails as e inner join tbl_BankDetails as b on e.Id=b.EmpID inner join tbl_S...

OPTION Clause in SQL Server

OPTION Clause in SQL Server The OPTION clause is used to query the table with different query hint. This clause can be specified in different statements like SELECT, UPDATE, MERGE and DELETE. Only one OPTION clause can be specified in a statement. The syntax for OPTION clause is, OPTION ( < query_hint > [ ,....n ] ) The different types of query_hint is as follows, FORCE ORDER LOOP JOIN MERGE JOIN HASH JOIN FORCE EXTERNALPUSHDOWN DISABLE EXTERNALPUSHDOWN The query_hint  specifies in which way the SQL server Database Engine processes the statement. Using an OPTION clause with SELECT, UPDATE, MERGE and DELETE statement  Lets see how to use OPTION clause in a SELECT statement.? declare @q int; set @q=1; select * from tbl_EmployeeDetails where Id>@q order by Id OPTION(OPTIMIZE FOR (@q UNKNOWN)); The OPTIMIZE FOR UNKNOWN is a optimizer hint. It is used when there is no parameter values have been passed to the query at all. Instructs ...

LAG Function in SQL Server

LAG Function in SQL Server The LAG function is used to access previous row data along with current row data. This function was introduced in SQL Server 2012. Using this function is easy to compare values in the current row with values in the previous row. It is just the opposite of LEAD function. The syntax for LAG function is, LAG([scalar_expression], offset, default_value) OVER([partition_by_clause] [order_by_clause]) In LAG function partition_by_clause is optional, order_by_clause is required. You can specify any number of columns in the order_by_clause. The  offset  denotes the number of rows to lag. The  default_value  to return if the number of rows to lag goes beyond last row in a table or partition. If the  default_value  is not specified NULL is returned. In order to achieve this we are going to use "tbl_EmployeeDetails" table for our demo. CREATE TABLE [dbo].[tbl_EmployeeDetails]( [Id] [bigint] IDENTITY(1,1) NOT NULL, [E...