I hereby claim:
- I am cutalion on github.
- I am cutalion (https://keybase.io/cutalion) on keybase.
- I have a public key ASCxHyC7j9qjGEbi58EVnguJc8s-TwbR9YLfegmqtwWXjAo
To claim this, I am signing this object:
# frozen_string_literal: true | |
require 'securerandom' | |
LETTERS = ('a'..'z').to_a.freeze | |
BIG_LETTERS = ('A'..'Z').to_a.freeze | |
DIGITS = ('0'..'9').to_a.freeze | |
SPECIAL = '~`!@#$%^&*()_+{}][;:\'"/?>.<,'.split.freeze | |
ALL = (LETTERS + BIG_LETTERS + DIGITS + SPECIAL).freeze |
# override original exist? so that it does not use COUNT() | |
def exist?(*args, &block) | |
sql = where(*args, &block).dataset.unordered.select(1).exists | |
db.select(sql.as(:exists)).first[:exists] | |
end | |
alias any? exist? | |
private | |
def db |
I hereby claim:
To claim this, I am signing this object:
use std::fmt; | |
// Define the dimensions of the game board | |
const ROWS: usize = 20; | |
const COLS: usize = 20; | |
// Define the Cell struct | |
#[derive(Clone, Copy)] | |
struct Cell(bool); |