mock.Mock()
mock.MagicMock()
assert_called_with
: This method asserts that the last call was made with the given parameters
"use strict"; | |
let paramRegex = /([a-zA-Z0-9]+\=[a-zA-Z0-9]+)/ig; | |
location.search.match(paramRegex); |
How to convert existing phoenix app to an umbrella app. | |
https://elixir-lang.slack.com/archives/phoenix/p1472921051000134 | |
chrismccord [10:14 PM] | |
@alanpeabody yes, it's straightforward | |
[10:14] | |
1) mix new my_umbrella --umbrella |
#!/bin/bash | |
# See https://github.com/docker-library/mongo/pull/63 | |
docker run --rm --volumes-from my-mongo-server mongo unlink "/data/db/mongod.lock" | |
docker run --rm --volumes-from my-mongo-server mongo --repair |
def answer(map, git_gud=True): | |
"""Find the shortest path in a binary 2D map where a wall can be removed. | |
The algorithm uses a modified Dijstra's algorithm to find the shortest path | |
from the start vertex (0,0) to the end vertex (w-1,h-1) in a 2D binary map. | |
A single wall can be removed from the map to make the shortest path, if | |
necessary. The first wall in any path can be ignored easily, but if a wall | |
is necessary to be removed for a valid solution to exist the simple | |
algorithm does not remember the minimum path that does not pass through a | |
wall to arrive at the mandatory wall vertex. Therefore we modify the |
terraform { | |
required_version = ">=0.12, <0.13" | |
} |