I hereby claim:
- I am alecho on github.
- I am alecho (https://keybase.io/alecho) on keybase.
- I have a public key ASCL5IwoJppAv_1BT00PUc8useiNpwsoDvKuJCoLfdouVAo
To claim this, I am signing this object:
| defmodule CoseKey do | |
| use Ecto.Type | |
| def type, do: :map | |
| # Case the COSE Key x and y coordinates to base 64 encoded binaries. | |
| def cast(%{-2 => x_coord, -3 => y_coord} = map) do | |
| {:ok, | |
| map | |
| |> Map.put(-2, Base.encode64(x_coord)) | |
| |> Map.put(-3, Base.encode64(y_coord))} |
| defmodule NaturalNums do | |
| import Enum | |
| import List | |
| def print(n) when not is_integer(n), do: {:error, "input must be an integer"} | |
| def print(n) when n < 1, do: {:error, "integer must be positive"} | |
| def print(n) do | |
| 1..n | |
| |> map(&IO.puts/1) |
I hereby claim:
To claim this, I am signing this object:
| <?php | |
| $gameName = 'War'; | |
| class Deck | |
| { | |
| public $suits = ['S', 'H', 'C', 'D']; | |
| public $indices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]; | |
| protected $deck = []; |
| <?php | |
| // Given you want to perform one of two or more actions with a single url. | |
| // | |
| // in Config/routes.php | |
| Router::connect('/:username/:action', array('controller' => 'users', 'action' => 'userOrShop')); | |
| // Your UsersController.php might look something like this then. | |
| class UsersController extends AppController { | |
ROOT/webroot/index.php line 37 → Cake\Routing\Dispatcher->dispatch(Cake\Network\Request, Cake\Network\Response)
$dispatcher->dispatch(
Request::createFromGlobals(),
new Response()
);