Skip to content

Instantly share code, notes, and snippets.

View FormerlyZeroCool's full-sized avatar
💭
Back on the grind!

Drew FormerlyZeroCool

💭
Back on the grind!
View GitHub Profile
package com.google.sps;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.ArrayList;
public class Day {
//Number of slots the day will be brocken into
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.ArrayList;
public class Day {
boolean[] timeSlots = new boolean[24 * 2 + 1];
public Day()
bigDivResult LargeInt::divideTwoLargeInt(LargeInt divisor,LargeInt dividend,short radix)
{
short originalThisRadix = radix;
bool isNegLocal = false;
if(divisor.isNegative())
isNegLocal = !isNegLocal;
if(dividend.isNegative())
Vect2D<double> calcTable(const std::vector<std::string> &functions, double xMin, double xMax, double xStepSize, double yStepSize)
{
int tableWidth = (xMax-xMin)/(xStepSize>0?xStepSize:1);
double dx = (xMax-xMin)/tableWidth;
double dy = yStepSize>0?yStepSize:1;
double xi;
//the first dimension is the function, it can generate a set of tables for a set of functions
Vect2D<double> outPuts(tableWidth,functions.size()-1);
std::stringstream exp;
for(int j = 0;j<functions.size();j++)
PRINTF(1) BSD General Commands Manual PRINTF(1)
NAME
printf -- formatted output
SYNOPSIS
printf format [arguments ...]
DESCRIPTION
The printf utility formats and prints its arguments, after the first, under control of the format. The format is a character string which contains three
/*
* TanAction.hpp
*
* Created on: Jan 18, 2021
* Author: andrewrubinstein
*/
#ifndef KEYWORDS_TANACTION_HPP_
#define KEYWORDS_TANACTION_HPP_
#quick sort algorithm in ascal basically not important except it doesn't ever copy the list.
#This also allows the recursive qs algorithm to operate on the same list across all the recursive calls.
#swap function for qs use
let swap = (x,y){
cloc z = x;
set x = y;
set y = z;
}
let quick = []
/*
* stringview.cpp
*
* Created on: Jan 6, 2021
* Author: andrewrubinstein
*/
#include "string_view.hpp"
string_view::string_view() {}
/*
* largint.cpp
*
* Created on: Oct 17, 2019
* Author: andrew
*/
#include "largeint.hpp"
//Will run as long as divisor is less than 2^15