Skip to content

Instantly share code, notes, and snippets.

001

Which of the following would require the greatest amount of calories?

Heating $100\text{g}$ of water from $10\degree\text{C}$ to $50\degree\text{C}$.

002

A $\textcolor{#ff5555}{m}$ $\text{kg}$ weight-watcher wishes to climb a mountain to work off the equivalent of a large piece of chocolate cake rated at $\textcolor{#ff5555}{Q}$ $\text{(food) Calories}$.

  • How high must the person climb?
  • The acceleration due to gravity is $\textcolor{#ff5555}{g}$ $\frac{\text{m}}{\text{s}^2}$ and $1$ $\text{food Calorie}$ is $10^3$ $\text{Calories}$.

Prompt:

Given $a, b, c, d \in R$

Find a function $f(x)$ such that:

$f'(a) = 0$

$f'(c) = 0$

// use proc_macro2::TokenStream;
use quote::{ToTokens}; // 1.0.26;
use syn::{parse_quote, Ident, Item, ItemConst, ItemEnum, ItemFn, ItemStatic, Signature, Stmt}; // 2.0.11
/// input:
/// ```rs
/// #[alias(B, C)]
/// pub const A: u32 = 0;
/// ```
///
bot_autodifficulty_threshold_high 5.0
bot_autodifficulty_threshold_low 5.0
bot_defer_to_human_goals 0
bot_defer_to_human_items 0
bot_difficulty 3
bot_quota 9
bot_allow_grenades 0
sv_auto_adjust_bot_difficulty 0
sv_bots_get_easier_each_win 0
sv_bots_get_harder_after_each_wave 1
@trueharuu
trueharuu / a.ts
Last active December 6, 2022 17:40
/* eslint-disable @typescript-eslint/ban-types */
export interface Struct<Static, Instance> {
self: Static & (new () => Instance);
build(): Static & (new () => Instance);
impl<U>(
builder: (constructor: Static) => U
): Struct<Static & ToStatic<Instance, U>, Instance & U>;
impl_static<U>(
builder: (self: Static & (new () => Instance)) => U
): Struct<Static & U, Instance>;
type Constructor<U extends Array<unknown>> = new (...args: U) => unknown;
type Keys<T, M = any> = keyof {
[P in keyof T as T[P] extends M ? P : never]: T[P];
};
export class Ops<T = {}> {
public mem: T = {} as never;
public define<K extends string, U>(
key: K,
@trueharuu
trueharuu / reddit.ts
Last active June 27, 2022 04:32
Pylon Reddit System
import * as config from '../modules/config';
const content = "sex!"
const group = config.CLIENT.INTERACTION_COMMANDS;
const subreddit_storage = new pylon.KVNamespace('subreddits');
let subreddits = [];
let firstTime = true;
const interval = config.REDDIT.INTERVAL;
const channel_id = config.CHANNEL.REDDIT;
const REDDIT_COMMAND = config.CLIENT.INTERACTION_COMMANDS;
export class FunctionMap<T> {
private items: Array<() => T>;
private self: typeof FunctionMap = FunctionMap;
constructor(items: Array<[string, T]>) {
this.items = items.map(([k, v]) => this.self.toFunction(k, v));
}
static toFunction<T>(key: string, value: T) {
const wrap = {
[key]: () => value
}
export function getKeyDepth(key: string, object: object) {
const keyLine = JSON.stringify(object, null, 1)
.split("\n")
.find((v) => v.includes(key));
if (!keyLine) return undefined;
const spaces = keyLine.match(/^ +/);
if (!spaces) return 0
return spaces[0].length
}
export const colorStrings: Record<string, string> = {
aliceblue: '#f0f8ff',
antiquewhite: '#faebd7',
aqua: '#00ffff',
aquamarine: '#7fffd4',
azure: '#f0ffff',
beige: '#f5f5dc',
bisque: '#ffe4c4',
black: '#000000',
blanchedalmond: '#ffebcd',