Starting with gulp

Standard

Gulp – The streaming build system. As the name say, gulp is a tool for building the system.

In short, a tool which can help with automating the build process. Gulp is a javascript based build tool that uses nodejs as its running environment.

Its a task runner which can help with some very important and frequently used task like JS and CSS minification, compiling SASS etc.

Continue reading

prefetch, preconnect, prerender , All about prebrowsing

Standard

How website/app performance matters to you? What ways you know to improve it? Do you know just minification, concatenation, caching? Do we have other options?

What if you can get ready with your assets just before DOM is ready. What if you can load them in advance? Does it make a difference? Do you care? Big question to ask to our self.

We have some cool techniques to achieve advance or pre loading of our assets.

Continue reading

Trick to make your footer sticky at the bottom of the page and stay at the bottom when your content grows.

Standard

What about footers on website which stays below to your content? What if your content is not long enough to fill the whole page? Does your footer not able to stay at the bottom of the page?

Above situation occurs with all of us. Sometimes we want our footer to stick with the bottom and slide down with the content when our content grows. We cant make it absolute and set bottom:0 because at no matter what we don’t want to float over to the content. Its looks YAAK.

Here is a simple trick which can save us. Let’s look at it.

Continue reading

AngularJS directive to non interactive html components

Standard

Using utilities to get work done is always comfortable and good practice for sake of code re usability. Recently I came across a requirement where I had to make my several HTML component non clickable.

You can make input types elements non clickable very easily as disabled attribute works well with input types. But wait! what about other elements? Now a days we have lots of third party UI frameworks as angular-material or bootstrap which provides custom stitched input type like md-checkbox in angular material library.

Continue reading

ng-message validation based on other input field in angularJs

Standard

Recently I faced an requirement where I have to plugin ng-message validation which depends on value of other input field means if value of field A is given then only field B is mandatory. For example, if user is providing phone no then email is not mandatory else email is mandatory.

Yes we can achieve this in a very simple and straight forward way. Lets see how.

Goal: Using ng-messages validation depending upon the value of other field

Continue reading

How to select rows which doesn’t exist in other table in SQL

Standard

We all are familiar with selecting the rows which has common data in multiple tables. And yes using joins are the most popular solution among the developers.

Now question is how to select rows which doesn’t exists in other tables.

lets say there are two tables employee and department.

Continue reading

Configure apache php server to point location another then htdocs or www

Standard

Obviously! we can point apache server to pick our code files from another location other then www or htdocs. Also we can configure the url for our project folder.

Lets take a look how.

Step 1. Look for the file httpd.conf (this can be found under your apache installation folder inside conf directory)

Continue reading

How to get selected text from textarea/text input in Ext JS

Standard

Hi Guys!

Here I am going to explain about getting selected text string from a EXTJS/HTML textarea/textinput.

We need to write two different code for IE based browsers and rest of all.

In ExtJS first we need to select dom element of textarea and that can be done using inputEl.dom.

Continue reading