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 [_1, _2, inx, iny] = process.argv; | |
| const sizediffh = (inx - ((24/30) * inx)); | |
| const guidel = (1/2) * sizediffh; | |
| const guider = inx - (1/2) * sizediffh; | |
| const sizediffv = (iny - ((18/20) * iny)); | |
| const guidet = (1/2) * sizediffv; | |
| const guideb = iny - (1/2) * sizediffv; |
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
| long mod(); | |
| long mod_div(); | |
| int main() { | |
| mod(); | |
| mod_div(); | |
| return 0; | |
| } | |
| long mod() { |
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
| long add_a(); | |
| long shift_a(); | |
| int main() { | |
| add_a(5); | |
| shift_a(5); | |
| return 0; | |
| } | |
| long add_a(int a) { |
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
| package tech.scolton.util; | |
| import java.util.Collection; | |
| import java.util.List; | |
| import java.util.ArrayList; | |
| import java.util.Set; | |
| import java.util.HashSet; | |
| public class Permuter<T> { | |
| public List<List<T>> permute(Collection<T> rem) { |
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
| package tech.scolton.jordan; | |
| import java.util.*; | |
| public class TechInterviewDriver { | |
| public static void main(String[] args) { | |
| String[] input = new String[]{"apple", "apple", "orange"}; | |
| Map<String, Integer> itemFreq = new HashMap<>(); | |
| for (String s : input) { |
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 input = ["apple", "apple", "orange"]; | |
| const itemFreq = {}; | |
| for (const s of input) { | |
| if (!(s in itemFreq)) | |
| itemFreq[s] = 0; | |
| itemFreq[s]++; | |
| } |
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 selector = "#root > li"; | |
| const tree = { | |
| dom_el: null, | |
| text: 'root', | |
| children: [] | |
| }; | |
| const gen_tree = () => { | |
| const init = Array.from(document.querySelectorAll(selector)); |
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
| long sus(long l, long m) { | |
| /* do nothing useful */ | |
| if (!m) | |
| return 0; | |
| else | |
| return l + sus(l - 1, m - 1); | |
| } | |
| int amogus(unsigned char z) { | |
| long y = 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
| const WAIT_TIME_MS = 3 * 1000; | |
| const wait = async ms => { | |
| return new Promise(resolve => { | |
| setTimeout(resolve, ms); | |
| }); | |
| } | |
| const main = async () => { | |
| await wait(WAIT_TIME_MS); |
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
| import fs from 'fs/promises'; | |
| let TAB_SIZE = 4; | |
| const load_lines = async filename => { | |
| const data = await fs.readFile(filename, { encoding: 'utf-8' }); | |
| await fs.writeFile(`${filename}.bak`, data); | |
| return data.split('\n'); |