layout | title | description | tags | ||
---|---|---|---|---|---|
default |
SQL Style Guide |
A guide to writing clean, clear, and consistent SQL. |
|
#!/bin/bash | |
instanceID=$1 | |
date=$(date +%Y%m%d) | |
function downloadLog () { | |
local log=$1 | |
aws rds download-db-log-file-portion \ | |
--output text \ |
defmodule Expng do | |
defstruct [:width, :height, :bit_depth, :color_type, :compression, :filter, :interlace, :chunks] | |
def png_parse(<< | |
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, | |
_length :: size(32), | |
"IHDR", | |
width :: size(32), | |
height :: size(32), |
REGEDIT4 | |
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink] | |
"Arial"="wqy-microhei.ttc" | |
"Arial Black"="wqy-microhei.ttc" | |
"Arial CE,238"="wqy-microhei.ttc" | |
"Arial CYR,204"="wqy-microhei.ttc" | |
"Arial Greek,161"="wqy-microhei.ttc" | |
"Arial TUR,162"="wqy-microhei.ttc" | |
"Courier New"="wqy-microhei.ttc" |
Let's solve the following physics problem using Symbolism, a computer algebra library for C#.
One strategy in a snowball fight is to throw a first snowball at a high angle over level ground. While your opponent is watching the first one, you throw a second one at a low angle and timed to arrive at your opponent before or at the same time as the first one.
Assume both snowballs are thrown with a speed of 25.0 m/s.
The first one is thrown at an angle of 70.0° with respect to the horizontal.
import subprocess | |
import json | |
import os, errno | |
import argparse | |
def mkdir_p(path): | |
try: | |
os.makedirs(path) | |
except OSError as exc: | |
if exc.errno == errno.EEXIST and os.path.isdir(path): |
AsyncTest.define("webhook-channel-vacated #{params[:cluster_name]}", checks: 4, timeout: params[:timeout] ) { |t| | |
channel_name = "channel-existence-#{rand(1000000)}" | |
params[:webhooks]["/#{params[:cluster_name]}/webhook-channel-vacated"]=Proc.new do |post| | |
next unless channel_name == (post["events"][0]["channel"] rescue nil) | |
begin | |
event_name = post["events"][0]["name"] | |
pattern = { | |
"time_ms" => matches{|x| x.kind_of?(Integer)}, | |
"events" => [{ "channel" => channel_name, "name" => event_name }] |
2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).
(ns ^{:doc "Loose translation of evaluator from chapter three | |
of Lisp in Small Pieces into Clojure."} | |
lispic.chapter3.cont | |
(:refer-clojure :exclude [invoke]) | |
(:require [clojure.test :refer [deftest is]])) | |
(declare evaluate wrong) | |
(defn wrong [& args] | |
(println args) |