Skip to content

Instantly share code, notes, and snippets.

@iAmWillShepherd
iAmWillShepherd / MissingNumberSolution.cs
Created April 27, 2016 19:24
Solution to Missing Numbers problem on HackerRank
void Main()
{
var size_a = int.Parse(Console.ReadLine());
var list_a = Console.ReadLine()
.Split(' ')
.Take(size_a)
.Select(x => int.Parse(x))
.ToList();
var size_b = int.Parse(Console.ReadLine());
SELECT
SUM(hour_1)
, SUM(hour_7)
, SUM(hour_13)
, SUM(hour_19)
, SUM(hour_0)
from checkin;
SELECT
data.name
, data.stars AS avgStars
, data.numberOfReviews
, (cool / totalVotes) AS `% cool`
, (useful / totalVotes) AS `% useful`
, (funny / totalVotes) AS `% funny`
FROM (
SELECT
b.business_id
"window.zoomLevel": 0,
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
"editor.fontSize": 14,
"editor.wordWrap": "on",
"editor.minimap.enabled": true,
"editor.tabSize": 2,
"editor.trimAutoWhitespace": true,
"editor.showFoldingControls": "always",
@iAmWillShepherd
iAmWillShepherd / hawk.js
Last active October 2, 2017 03:12
Homework help
function createTableFromStr(str, maxCols) {
var tokens = str.split(" ")
var rows = []
var cols = []
for (var i = 0; i < tokens.length; i += 1) {
var currToken = tokens[i]
var td = `<td>${currToken}</td>`
cols.push(td)

Week 4.2 Quiz

This quiz is meant to evaluate your knowledge of JavaScript

  • Types
  • Conditionals
  • Loops
  • Variables and Constants
  • Functions
  • and Operators

Moreover, is an example of what you may be expected to code later in the course and out in life.

//
// main.c
// StringGenerator
//
// Created by William Shepherd on 11/8/17.
// Copyright © 2017 William Shepherd. All rights reserved.
//
#include <stdlib.h>
#include <stdio.h>
~/GitHub/desktop(master) » yarn lint iamwillshepherd
yarn run v1.2.1
$ yarn compile:tslint && yarn compile:script && yarn tslint && yarn eslint-check && yarn eslint
No rules that are unnecessary or conflict with Prettier were found.
/Users/iamwillshepherd/GitHub/desktop/script/build.ts
92:64 error Replace `⏎········process.platform⏎······` with `process.platform` prettier/prettier
314:65 error Replace `⏎············license.license⏎··········` with `license.license` prettier/prettier
319:120 error Replace `⏎··········overridesPath⏎········` with `overridesPath` prettier/prettier
344:74 error Replace `⏎················appVersion⏎··············` with `appVersion` prettier/prettier
interface INode {
data: number;
next: INode | null;
}
class LinkedList {
private _head: INode | null;
public insert(value: number, index: number) {}
interface RomanNumeral {
readonly number: number
readonly numeral: string
}
const romanNumerals = [
{ number: 1, numeral: "I" },
{ number: 4, numeral: "IV" },
{ number: 5, numeral: "V" },
{ number: 9, numeral: "IX" },