Install cask
that extends the brew
command :
brew install phinze/cask/brew-cask
Install calibre
using cask
:
brew cask install calibre
int64_t ipow(int64_t base, uint8_t exp) { | |
static const uint8_t highest_bit_set[] = { | |
0, 1, 2, 2, 3, 3, 3, 3, | |
4, 4, 4, 4, 4, 4, 4, 4, | |
5, 5, 5, 5, 5, 5, 5, 5, | |
5, 5, 5, 5, 5, 5, 5, 5, | |
6, 6, 6, 6, 6, 6, 6, 6, | |
6, 6, 6, 6, 6, 6, 6, 6, | |
6, 6, 6, 6, 6, 6, 6, 6, | |
6, 6, 6, 6, 6, 6, 6, 255, // anything past 63 is a guaranteed overflow with base > 1 |
doctype html | |
html | |
head | |
title My App | |
meta name="viewport" content="width=device-width, initial-scale=1.0" | |
= stylesheet_link_tag "application", media: 'all', 'data-turbolinks-track' => true | |
= javascript_include_tag "application", 'data-turbolinks-track' => true | |
= csrf_meta_tags | |
body |
set -g __fish_git_prompt_show_informative_status 1 | |
set -g __fish_git_prompt_hide_untrackedfiles 1 | |
set -g __fish_git_prompt_color_branch magenta bold | |
set -g __fish_git_prompt_showupstream "informative" | |
set -g __fish_git_prompt_char_upstream_ahead "↑" | |
set -g __fish_git_prompt_char_upstream_behind "↓" | |
set -g __fish_git_prompt_char_upstream_prefix "" | |
set -g __fish_git_prompt_char_stagedstate "●" |
Install cask
that extends the brew
command :
brew install phinze/cask/brew-cask
Install calibre
using cask
:
brew cask install calibre
defmodule EmailValidator do | |
# ensure that the email looks valid | |
def validate_email(email) when is_binary(email) do | |
case Regex.run(~r/^[\w.!#$%&’*+\-\/=?\^`{|}~]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*$/i, email) do | |
nil -> | |
{:error, "Invalid email"} | |
[email] -> | |
try do | |
Regex.run(~r/(\w+)@([\w.]+)/, email) |> validate_email |
/* Random.jack | |
* By Mark Armbrust | |
* http://nand2tetris-questions-and-answers-forum.32033.n3.nabble.com/Random-number-generator-for-hack-cpu-td4025503.html | |
* Also see: | |
* http://nand2tetris-questions-and-answers-forum.32033.n3.nabble.com/Pseudo-Random-Number-Generator-td4026059.html#a4027617 | |
*/ | |
class Random { | |
static int seed; | |
/* | |
* Created by C.J. Kimberlin | |
* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2019 | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights |
defmodule AudioRenderer.Window do | |
@moduledoc """ | |
A window to draw our audio renderer within. | |
""" | |
@title 'Audio Renderer' | |
require Record | |
Record.defrecordp :wx, Record.extract(:wx, from_lib: "wx/include/wx.hrl") | |
Record.defrecordp :wxClose, Record.extract(:wxClose, from_lib: "wx/include/wx.hrl") |
<%= form_for @changeset, @action, fn f -> %> | |
<%= if @changeset.action do %> | |
<div class="alert alert-danger"> | |
<p>Oops, something went wrong! Please check the errors below.</p> | |
</div> | |
<% end %> | |
<div class="form-group"> | |
<%= label f, :type, class: "control-label" %> | |
<%= select f, :type, @workout_types, prompt: "Choose workout type", class: "form-control" %> |