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
| use rand::Rng; | |
| pub fn faster_midpoint_method<R: Rng>( | |
| rng: &mut R, | |
| data: &mut Vec<Vec<i32>>, | |
| p0: (i32, i32), | |
| p1: (i32, i32), | |
| iters: usize | |
| ) { | |
| let dy = p1.1 - p0.1; |
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
| // Launch | |
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": ".NET Core Launch (console)", | |
| "type": "coreclr", | |
| "request": "launch", | |
| "preLaunchTask": "build", | |
| "program": "godot", |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <ItemFilter xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> | |
| <name>Warlock</name> | |
| <filterIcon>1</filterIcon> | |
| <filterIconColor>7</filterIconColor> | |
| <description /> | |
| <lastModifiedInVersion>1.0.0.1</lastModifiedInVersion> | |
| <lootFilterVersion>2</lootFilterVersion> | |
| <rules> | |
| <Rule> |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <ItemFilter xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> | |
| <name>Totemancer</name> | |
| <filterIcon>14</filterIcon> | |
| <filterIconColor>8</filterIconColor> | |
| <description /> | |
| <lastModifiedInVersion>0.9.2.7</lastModifiedInVersion> | |
| <lootFilterVersion>0</lootFilterVersion> | |
| <rules> | |
| <Rule> |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <ItemFilter xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> | |
| <name>Necrodancer</name> | |
| <filterIcon>1</filterIcon> | |
| <filterIconColor>17</filterIconColor> | |
| <description /> | |
| <lastModifiedInVersion>1.0.0.1</lastModifiedInVersion> | |
| <lootFilterVersion>2</lootFilterVersion> | |
| <rules> | |
| <Rule> |
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
| import { Task, getMyServers, getThreadCountForSimpleOps, makeColour } from "Util"; | |
| function interleave(hack, grow, weaken) { | |
| const result = []; | |
| const max = Math.max(hack.length, grow.length, weaken.length); | |
| for (let i = 0; i < max; i++) { | |
| if (i < weaken.length) | |
| result.push(weaken[i]); | |
| if (i < grow.length) | |
| result.push(grow[i]); | |
| if (i < hack.length) |
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
| import { NS, Server } from "@ns"; | |
| import { copyHackFilesToServers } from "util/CopyFiles"; | |
| export enum Task { | |
| Hack = "hacks/SimpleHack.js", | |
| Grow = "hacks/SimpleGrow.js", | |
| Weaken = "hacks/SimpleWeaken.js", | |
| } | |
| export enum PortMessages { |
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
| import { NS, Server } from "@ns"; | |
| import { Task, getMyServers, getThreadCountForSimpleOps, makeColour } from "Util"; | |
| type ServerWithThreads = { server: Server; task: Task; threads: number }; | |
| function interleave(hack: ServerWithThreads[], grow: ServerWithThreads[], weaken: ServerWithThreads[]) { | |
| const result = [] as ServerWithThreads[]; | |
| const max = Math.max(hack.length, grow.length, weaken.length); |
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
| import { NS } from "@ns"; | |
| import { buyAllTorStuff, buyServers, getServers, spendHashes } from "./Util"; | |
| import { getMostProfitableCrime } from "./util/Crime"; | |
| function upgradeHome(ns: NS) { | |
| ns.singularity.upgradeHomeRam(); | |
| ns.singularity.upgradeHomeCores(); | |
| } | |
| async function* serialBehaviour(ns: NS) { |
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
| import { NS, Player, Server } from "@ns"; | |
| import { | |
| getThreadCountForSimpleOps, | |
| makeColour, | |
| getTargetServersForHack, | |
| getPurchasedServers, | |
| } from "Util"; | |
| type SubscriptPaths = { Path: string; Cost: number }; | |
| type ScriptInformation = { Hack: SubscriptPaths; Grow: SubscriptPaths; Weaken: SubscriptPaths }; |
NewerOlder