Showing posts from 2016

How to write query in mongodb with "like" ?

I want query something as SQL's like query: select * from users where name like '%a%'; How to write the same query in mongodb : This will match all the value that contain "name" a. db.users.find({name: /a/}) //like …

How to authenticate user using JWTs (JSON WEB TOKEN) in NODE.JS

What is a JSON Web Token (JWT) ? JWT, access token, token, OAuth token.. what does it all mean?? Properly known as “JSON Web Tokens”, JWTs are a fairly new player in the authentication space. Being the cool new thing, everyone is hip to start usi…

How to transfer file from local to server using PSCP.

If you don't have access of the your server from ftp then pscp is the better way to transfer files from your local machine to server. Before going to use pscp command you need to download pscp from this link Click Here .After finish the download…

How to write data in existing excel using NODE.JS

Today i finally solve a big problem in my current node js project. Actually i have a requirement to write data in existing excel document. I already have an excel so i just need to open it and write some data and then save it. But unfortunately i una…

Password Match form validation in AngularJS

I am stuck in a form validation to change password where i need to take a specific length of password ( like combination of special characters, alphabets and numbers ) from user and confirm it by re-enter password. Actually i am using the ng-pattern…

How to Export and Import database using MONGO DB

Exporting from MongoDB : To export the database, simply tell mongodump which database (or collection) you want to export, and where to export it to. Mine was the fairquid database, so my command looks like this: mongodump -d fairquid -o fairquid…

How to detect “no internet connection” using ANGULAR JS

Today i need to show some message when internet connection lost. So I define this interceptor in httpProvider in my app.js file, so its return an error when a call does not happen successfully due to internet connection lost. This Interceptor return…

How to remove html in angular js

Suppose you  have a textarea editor and you entered some text in it and making some formatting like change font or adding style etc . So now you want that when you are showing it you don't want to shown html you adding in it. See screenshot bel…

Difference between php-4 and php-5

This is a very common interview question. If you are going for the interview then you have to know the difference between these. Below is the basic difference of PHP-4 and PHP-5 - 1 - PHP-4 is a procedural language where as PHP-5 is a object ori…

What is InnoDB storage engine

The InnoDB storage engine provides secure transaction capability. A transaction is a logical groping of statements that is handled by the database server as a single unit.  Either all the statements execute successfully to completion or all modificat…

How to fixed header after scrolling in angular js

Suppose you have a large number of data in your listing and when you are going to scroll up into the listing then you list heading is move up and you didn't showing it and sometime its a complicated to determine that which column data is specify …

How to create country state dropdown in angularjs

Today i have requirement in my angular js project to list the country and there corresponding state. When user selected any country then there state should be listed in the next dropdown. I did googling alot but i did't get any proper solution of…

How to Remove the "#" Sign from AngularJS URLs

By default, AngularJS will route URLs with a hashtag like below- For Example: http://example.com/ http://example.com/#/about http://example.com/#/contact It is very easy to get clean URLs and remove the hash tag from the URL. There…

How to set sessions in Node JS

I am working with the session today in my current node js project. Actually i am creating a login page where i need to save user data in session and display him successfully logged in page. First of all you need to install express node module "…

Load More
That is All