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
struct Foo { | |
value: u32 | |
} | |
trait HasUIntValue { | |
fn as_uint(self) -> u32; | |
} | |
impl Foo { | |
fn add<T: HasUIntValue>(&mut self, value: T) { |
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
#include "SimpleMemory.h" | |
SimpleMemory::SimpleMemory(std::wstring windowName) { | |
hwnd = FindWindowW(nullptr, windowName.c_str()); | |
DWORD pid; | |
GetWindowThreadProcessId(hwnd, &pid); | |
hProcess = OpenProcess(PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_VM_OPERATION, false, pid); | |
} |
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
declare global { | |
interface Array<T> { | |
includes(searchElement: T): boolean; | |
} | |
} | |
if (!Array.prototype.includes) { | |
Array.prototype.includes = (searchElement: any, ...args: number[]) => { | |
if (this == null) { | |
throw new TypeError("Array.prototype.includes called on null or undefined"); |
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
pow MACRO x, n | |
LOCAL start | |
push ebx | |
push ecx | |
push edx | |
mov eax, x | |
mov ebx, eax | |
mov ecx, n |
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
TITLE Combinations Calculator (final.asm) | |
; Author: Alexander Taylor | |
; CS 271 Sec. 1 / Program 6B Date: 12/04/16 | |
; Description: This program generates practice combinations problems. | |
; It takes user input for each problem, and tells the user | |
; the answer, as well as if they were right or wrong. Finally, | |
; it implements extra credit #1 by keeping track of each answer, | |
; and tallying up the number of right and wrong at the end. |
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] | |
name = "donut" | |
version = "0.1.0" | |
authors = ["Alex Taylor <[email protected]>"] | |
[dependencies] | |
time = "0.1.37" |
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
local surface = game.player.surface | |
local pp = game.player.position | |
local count = 0 | |
for key, entity in pairs(surface.find_entities_filtered({ type="cliff", radius=250, position=pp })) do | |
count = count + 1 | |
entity.destroy() | |
end | |
game.player.print(string.format('Destroyed %d cliffs!', count)) |
OlderNewer