Map [1]
| Operation | Time Complexity |
|---|---|
| Access | O(log n) |
| Search | O(log n) |
| Insertion | O(n) for <= 32 elements, O(log n) for > 32 elements [2] |
| Deletion | O(n) for <= 32 elements, O(log n) for > 32 elements |
| $ zig targets | |
| { | |
| "arch": [ | |
| "arm", | |
| "armeb", | |
| "aarch64", | |
| "aarch64_be", | |
| "aarch64_32", | |
| "arc", |
| // System Specs | |
| // ============ | |
| // These benchmarks were run on an Intel i7-9700k @ 3.6 GHz | |
| // | |
| // How it was run | |
| // =============== | |
| // The correct recipe is at the very end of the list of recipes. Which means this must run | |
| // through the entire list, the worst case scenario. The rest of the recipes are randomized | |
| // to offer some variation, but I don't set the slots where the correct recipe has the correct slots. | |
| // to ensure we don't accidentally exit early. |
This gist shows you how to use message components in discord.py 2.0
This assumes that you know how Object Orientated Programming in Python works, if you don't know what this is then I recommend that you read this guide.
You'll need to install discord.py from git to use this (if you don't have git then google how to install it for your OS, I can't be bothered to put it in here...), if you already have this then you can skip to the next section. However if you don't please read the below
const std = @import("std");
const warn = std.debug.warn;
const allocator = std.debug.global_allocator;
pub fn main() !void {
const args = try std.os.argsAlloc(allocator);
defer std.os.argsFree(allocator, args);
warn("total args: {}\n", args.len);Edit: This list is now maintained in the rust-anthology repo.
| defmodule Monoid do | |
| defmacro __using__(_opts) do | |
| quote do | |
| def concat([head|tail]) do | |
| append(head, concat(tail)) | |
| end | |
| def concat([]) do | |
| empty |
A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.
How to use:
| defmodule MyApp do | |
| use Application | |
| def start(_type, _args) do | |
| import Supervisor.Spec, warn: false | |
| children = [ | |
| Plug.Adapters.Cowboy.child_spec(:http, MyApp.Router, [], [ | |
| dispatch: dispatch | |
| ]) |