SELECTION SORT - BASIC SORTING (WITHOUT OPTIMIZATION)
for(i=0;i<array.length;i++) {
//assume i to be index value of smallest value
var minIndex = i;
//loop through the rest of element and find the index of smallest element
for(j=i+1;j<array.length;j++){
if(array[j] < array[minIndex]){
minIndex = j;
const tahoeTravelMachine = Machine({ | |
id: "tahoe-travel", | |
initial: "login", | |
states :{ | |
login : { | |
on :{ | |
LOGIN : "logged_in" | |
} | |
}, |
let mapleader="," | |
set number " show line numbers | |
"spaces to tab | |
set tabstop=2 | |
set expandtab | |
set shiftwidth=2 | |
" list invisible chars |
var http = require('http'); | |
http.createServer(function (request, response) { | |
response.setHeader('Content-Type', 'text/html; charset=UTF-8'); | |
response.setHeader('Transfer-Encoding', 'chunked'); | |
var html = | |
'<!DOCTYPE html>' + | |
'<html lang="en">' + | |
'<head>' + |
##Running ES6 javascript code in NodeJS envrionment.
- Try to install babel-cli
npm install --save-dev babel-cli npm install --save-dev babel-preset-es2015
The purpose of this gist is to know more about the software developing principles in general. This intention is to explore and know more about software development from industry leaders like Martin Flowers, Robrt Martin(aka UncleBob ) and many .
In addition to that , learning and practising programming and desing skill with emphasis on necessary programming styles like OOP and FP needs to be encouraged.
This guide is started as rough draft and will serve to contain information about resources , leaders to follow, topics under software development.
#####Messaging System or Queues#####
This concept is especially useful in web applications where it's impossible to handle a complex task during a short HTTP request window. Reference about different queueing tools : http://queues.io/
#####Key Value Database####
Customers sometimes have a need to export a certificate and private key from a Windows computer to separate certificate and key files for use elsewhere. Windows doesn't provide the means to complete this process.
Exporting Certificates from the Windows Certificate Store describes how to export a certificate and private key into a single .pfx file. Follow the procedure below to extract separate certificate and private key files from the .pfx file.
Procedure:
Take the file you exported (e.g. certname.pfx) and copy it to a system where you have OpenSSL installed. Note: the *.pfx file is in PKCS#12 format and includes both the certificate and the private key.
Run the following command to export the private key: openssl pkcs12 -in certname.pfx -nocerts -out key.pem -nodes
Hi, This is my place to gather any ideas/concepts/resources related to frontend development. Right now , front dev is vast and there lot of things for different types of front end projects .
BEST Resources is : FrontEnd Master - gitbook (also pdf available in drive). This book gives nice overview of overall front-end Engineering and describes lot of different disciplines with in front end dev.
#####NOTE##### This guide needs to constantly maintained and refined and grouped in different sections for better understanding. Also, refer to git where lot of resources available for front dev and related curricula.
//The below model is used to book a travel ride. | |
//The uploaded file is parsed in the formidable multipart body parser and stored in req.files.fileField. | |
//File is read from , in my code, req.files.file | |
var rideModel = function(){ | |
var rideSchema = new Schema({ | |
email : String, | |
corp_id : String, | |
name : String, | |
manager: String, |