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
print("Hello world!"); |
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
const fs = require("fs/promises"); | |
const fileName = "input.txt"; | |
async function readInput(fileName) { | |
const file = await fs.readFile(fileName, "utf-8"); | |
return file.trim().replace(/\r/g, "").split("\n"); | |
} | |
async function solveFirst(fileName) { | |
const inputs = await readInput(fileName); |
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
const fs = require("fs/promises"); | |
const mainInput = "input.txt"; | |
const example = "example.txt"; | |
const example2 = "example2.txt"; | |
async function readInput(fileName) { | |
const file = await fs.readFile(fileName, "utf-8"); | |
return file.trim().replace(/\r/g, "").split("\n"); | |
} |
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
const fs = require("fs/promises"); | |
const _ = require("lodash"); | |
const mainInput = "input.txt"; | |
const example = "example.txt"; | |
const example2 = "example2.txt"; | |
async function readInput(fileName) { | |
const file = await fs.readFile(fileName, "utf-8"); | |
return file.trim().replace(/\r/g, "").split("\n"); | |
} |
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
use eframe::{egui, epi}; | |
/// We derive Deserialize/Serialize so we can persist app state on shutdown. | |
#[cfg_attr(feature = "persistence", derive(serde::Deserialize, serde::Serialize))] | |
#[cfg_attr(feature = "persistence", serde(default))] // if we add new fields, give them default values when deserializing old state | |
pub struct TemplateApp { | |
// Example stuff: | |
label: String, | |
// this how you opt-out of serialization of a member |