This file contains hidden or 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
Convert the given number into a roman numeral. | |
All roman numerals answers should be provided in upper-case. | |
Remember to use Read-Search-Ask if you get stuck. Try to pair program. Write your own code. | |
Here are some helpful links: | |
Roman Numerals | |
Array.prototype.splice() |
This file contains hidden or 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
atom-sync |
This file contains hidden or 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
process.env.NODE_ENV = 'test'; | |
const chai = require('chai'), | |
should = chai.should(), | |
chaiHttp = require('chai-http'); | |
const Employee = require('../models/employeeModel'), | |
Company = require('../models/companyModel'), | |
app = require('../app'); |
This file contains hidden or 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
process.env.NODE_ENV = 'test'; | |
const chai = require('chai'), | |
should = chai.should(), | |
chaiHttp = require('chai-http'); | |
const User = require('../models/userModel'), | |
Company = require('../models/companyModel'), |
This file contains hidden or 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
function(error, client, next){ | |
var dirName = './balanceSheets/' + this.clientId; | |
fs.mkdir(dirName, function(err){ | |
console.log(err); | |
if(err) return next(err); | |
}); | |
} |
This file contains hidden or 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
/** | |
* Created by Gabriel Souza on 30/11/2016. | |
*/ | |
'use strict'; | |
var mongoose = require('mongoose'), | |
Schema = mongoose.Schema, | |
fs = require('fs'), | |
bCrypt = require('bcrypt-nodejs'), | |
saltRounds = require('config').saltRounds, |
This file contains hidden or 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
const Schema = mongoose.Schema({ | |
atributo: { | |
type: [String], | |
validate: { | |
validator: (value) => value.lenght > 0 | |
} | |
} | |
} |
This file contains hidden or 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
class Element: | |
index = 0 | |
data_size = 0 | |
data = [] | |
def __init__(self, index, data_size, data): | |
self.index = int(index) | |
self.data_size = data_size | |
self.data = data |
This file contains hidden or 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
const count = (value, solution) => solution.filter((e) => e === value).length | |
const isSafe = (row, solution) => { | |
const column = solution.length; | |
if (count(row, solution) > 0) return false; | |
for (const i of solution) if (Math.abs(i - row) === Math.abs(i - column)) return false; | |
return true; | |
} | |
const maxLen = 30; | |
const solve = (solution, column) => { |
This file contains hidden or 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 max_heapify(arr, heap_size, i): | |
left = 2 * i + 1 | |
right = 2 * i + 2 | |
largest = i | |
if left < heap_size and arr[left] > arr[largest]: | |
largest = left | |
if right < heap_size and arr[right] > arr[largest]: | |
largest = right | |
if largest != i: | |
arr[i], arr[largest] = arr[largest], arr[i] |
OlderNewer