This file contains 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
// 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, |
This file contains 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 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 |
This file contains 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 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() |
This file contains 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
bigDivResult LargeInt::divideTwoLargeInt(LargeInt divisor,LargeInt dividend,short radix) | |
{ | |
short originalThisRadix = radix; | |
bool isNegLocal = false; | |
if(divisor.isNegative()) | |
isNegLocal = !isNegLocal; | |
if(dividend.isNegative()) |
This file contains 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
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++) |
This file contains 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
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 |
This file contains 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
/* | |
* TanAction.hpp | |
* | |
* Created on: Jan 18, 2021 | |
* Author: andrewrubinstein | |
*/ | |
#ifndef KEYWORDS_TANACTION_HPP_ | |
#define KEYWORDS_TANACTION_HPP_ |
This file contains 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
#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 = [] |
This file contains 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
/* | |
* stringview.cpp | |
* | |
* Created on: Jan 6, 2021 | |
* Author: andrewrubinstein | |
*/ | |
#include "string_view.hpp" | |
string_view::string_view() {} |
This file contains 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
/* | |
* largint.cpp | |
* | |
* Created on: Oct 17, 2019 | |
* Author: andrew | |
*/ | |
#include "largeint.hpp" | |
//Will run as long as divisor is less than 2^15 |
OlderNewer