For this assignment you will be responsible for the following:
- Create a module that implements each of the folowing sorting algorithms:
- Quick sort
- Bubble sort
- Merge sort
- Insertion sort
- Selection sort
// MongoDB Playground | |
// To disable this template go to Settings | MongoDB | Use Default Template For Playground. | |
// Make sure you are connected to enable completions and to be able to run a playground. | |
// Use Ctrl+Space inside a snippet or a string literal to trigger completions. | |
// Select the database to use. | |
use('mongodbVSCodePlaygroundDB'); | |
// The drop() command destroys all data from a collection. | |
// Make sure you run it against proper database and collection. |
/* | |
Name: Moodlite.ino | |
Created: 27.12.2018 | |
Version: 2.0 | |
AuthorS: Spigot (M.V.), Shiryou & Steve Wagg aka CdRsKuLL | |
License: This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License v3.0 as published by the Free Software Foundation. | |
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
See the GNU General Public License for more details. | |
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/gpl.html> | |
Support: Wether you use this project, have learned something from it, or just like it, please consider supporting us on our web site. :) |
var o = { | |
a: 2, | |
m: function(b){ | |
return this.a + 1; | |
} | |
}; | |
// When calling o.m in this case, 'this' refers to o | |
console.log(o.m()); // 3 |
For this assignment you will be responsible for the following:
Use bcrypt. Use bcrypt. Use bcrypt. Use bcrypt. Use bcrypt. Use bcrypt. Use bcrypt. Use bcrypt. Use bcrypt. Use bcrypt.
These are all general purpose hash functions, designed to calculate a digest of huge amounts of data in as short a time as possible. This means that they are fantastic for ensuring the integrity of data and utterly rubbish for storing passwords.
How? Basically, it’s slow as hell. It uses a variant of the Blowfish encryption algorithm’s keying schedule, and introduces a work factor, which allows you to determine how expensive the hash function will be.
======================================================================
Based off of: http://docs.sequelizejs.com/en/1.7.0/articles/express/
Create and initialize your a directory for your Express application.
const resolveAfter2Seconds = () => { | |
console.log("starting slow promise"); | |
return new Promise(resolve => { | |
setTimeout(() => { | |
resolve(20); | |
console.log("slow promise is done"); | |
}, 2000); | |
}); | |
}; |
const net = require('net'); | |
const options = { | |
'port': 8080, | |
'host': '127.0.0.1' | |
}; | |
// creates a socket connection to a server | |
const client = net.connect(options, () => { | |
console.log('Connected to Server!'); |
const hashAlgorithm = (data) => { | |
const FNV_PRIME_32 = 0x1000193; | |
const FNV_OFFSET_32 = 0x811C9DC5; | |
let hash = FNV_OFFSET_32; | |
const str = JSON.stringify(data); | |
for (let i = 0; i < str.length; i++) { | |
hash ^= str.charCodeAt(i); | |
hash *= FNV_PRIME_32; |
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |