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 |
| Mix.install( | |
| [ | |
| {:phoenix_playground, "~> 0.1.6"}, | |
| {:phoenix, "~> 1.7.14"}, | |
| {:phoenix_live_view, "~> 1.0.0-rc.1"}, | |
| {:chroma, "~> 0.1.3"}, | |
| {:text_chunker, "~> 0.3.1"}, | |
| {:nx, "~> 0.9.0"}, | |
| {:exla, "~> 0.9.1"}, | |
| {:axon, "~> 0.7.0"}, |
| ;; Copyright (c) 2024, Philippe Ivaldi <www.piprime.fr> | |
| ;; This program is free software: you can redistribute it and/or modify | |
| ;; it under the terms of the GNU General Public License as published by | |
| ;; the Free Software Foundation, either version 3 of the License, or | |
| ;; (at your option) any later version. | |
| ;; This program is distributed in the hope that it will be useful, | |
| ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| def wait_until(timeout \\ 1_000, fun) | |
| def wait_until(0, fun), do: fun.() | |
| def wait_until(timeout, fun) do | |
| fun.() | |
| rescue | |
| ExUnit.AssertionError -> | |
| :timer.sleep(10) | |
This guide provides updated instructions for pairing Bluetooth devices (such as keyboards or mice) in a dual-boot environment with Linux Ubuntu and Windows 10/11, incorporating community feedback and suggestions.
| # How to run Ecto migrations from IEx console... Examples | |
| # preliminaries assumed in the following code, change to fit your environment: | |
| alias YourAppName.Repo | |
| your_app_name_as_atom = :mpnetwork | |
| downto_version = 20170724182558 | |
| # Down: | |
| Ecto.Migrator.run(Repo, "priv/repo/migrations/", :down, [to: downto_version]) |
Thanks for watching my talk, Domain-Driven Desire at Øredev 2016. Here's a list of resources that inspired me, and will hopefully inspire you:
| #!/bin/bash | |
| function test { | |
| MESSAGE=$1 | |
| RECEIVED=$2 | |
| EXPECTED=$3 | |
| if [ "$RECEIVED" = "$EXPECTED" ]; then | |
| echo -e "\033[32m✔︎ Tested $MESSAGE" | |
| else |
| # debugging | |
| save_and_open_page | |
| puts page.body | |
| puts find("#id").native | |
| puts first("#id .class element").native | |
| # navigating | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |