##Requirement for HMAC secret key
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://vt4help.service-now.com/kb_view_customer.do?sysparm_article=KB0010740#linux | |
wget https://secure.nis.vt.edu/resources/downloads/pulse-8.2R5.i386.deb | |
sudo dpkg –i pulse-8.2R5.i386.deb | |
/usr/local/pulse/PulseClient.sh install_dependency_packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write a program to handle GET and POST request | |
/**Get request**/ | |
var request=require('request'); | |
request.get('https://someplace',options,function(err,res,body){ | |
if(res.statusCode !== 200 ) { | |
console.log("Success"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[11/08/17, 4:18:11 PM] Saurabh Kumar: 'use strict'; | |
const xml2js = require('xml2js').parseString; | |
const js2xmlparser = require("js2xmlparser"); | |
const PDFDocument = require('pdfkit'); | |
const fs= require('fs'); | |
var doc = new PDFDocument(); | |
const tableify = require('tableify'); | |
//question 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var fs = require('fs'); | |
const https = require('https'); | |
const util = require('util'); | |
const zlib = require('zlib'); | |
const os = require('os'); | |
//question 1 | |
var fileName = 'assign3.js'; | |
var readStream = fs.createReadStream(fileName); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def quick_sort(list) | |
qsort_helper(list).flatten | |
end | |
def qsort_helper(list) | |
return [] if list.empty? | |
number = list.sample | |
lower, higher = list.partition { |n| n < number } | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Question1 Write program to implement Doubly Linked List -> use module pattern and import in other file to perform operation | |
//doubly-linked_list.js | |
function Node(value) { | |
this.data = value; | |
this.previous = null; | |
this.next = null; | |
} | |
function DoublyList() { | |
this._length = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Array iteration and append its index with the value using callback | |
let IterationArray = function(arr){ | |
let temp = []; | |
arr.forEach(function (value, i) { | |
let my_hash={} | |
my_hash[i] = value | |
temp.push(my_hash); | |
}); | |
return temp; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
def post_xml url_string, xml_string | |
uri = URI.parse url_string | |
request = Net::HTTP::Post.new uri.path | |
request.body = xml_string | |
request.content_type = 'text/xml' | |
response = Net::HTTP.new(uri.host, uri.port).start { |http| http.request request } | |
response.body | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var soundex = function (s) { | |
var a = s.toLowerCase().split(''), | |
f = a.shift(), | |
r = '', | |
codes = { | |
a: '', e: '', i: '', o: '', u: '', | |
b: 1, f: 1, p: 1, v: 1, | |
c: 2, g: 2, j: 2, k: 2, q: 2, s: 2, x: 2, z: 2, | |
d: 3, t: 3, | |
l: 4, |
NewerOlder