This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <setjmp.h> | |
jmp_buf __exception_context; | |
#define try if(!setjmp(__exception_context)) | |
#define catch else | |
#define throw_exception longjmp(__exception_context, 1) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:_toggle.bounds | |
byRoundingCorners:(UIRectCornerTopLeft | UIRectCornerBottomLeft) | |
cornerRadii:CGSizeMake(8.0, 8.0)]; | |
CAShapeLayer *maskLayer = [CAShapeLayer new]; | |
maskLayer.frame = _toggle.bounds; | |
maskLayer.path = maskPath.CGPath; | |
_toggle.layer.mask = maskLayer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
email = [email protected] | |
name = redraiment | |
[push] | |
default = simple | |
[credential] | |
helper = store |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Ctrl(C): ^ | |
* Option(M): ~ | |
*/ | |
{ | |
"^/" = "undo:"; | |
"^a" = "moveToBeginningOfLine:"; | |
"^e" = "moveToEndOfLine:"; | |
"^g" = "_cancelKey:"; | |
"^t" = "transpose:"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns me.zzp.http | |
(:require [clojure.string :refer [blank?]]) | |
(:import java.io.PrintStream | |
java.net.ServerSocket | |
java.util.Scanner | |
java.util.concurrent.atomic.AtomicLong) | |
(:gen-class)) | |
(defonce generitor (AtomicLong.)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
case $1 in | |
install|reinstall) | |
options=S | |
;; | |
remove) | |
options=Rc | |
;; | |
search) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table spoils ( | |
id int primary key, | |
amount int | |
); | |
comment on table spoils is '分赃表'; | |
comment on column spoils.id is '海盗编号'; | |
comment on column spoils.amount is '可获得的最高金额,null代表死亡'; | |
create or replace function divide(amount_total int, pirate_count int) | |
returns setof spoils as $$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import BaseHTTPServer | |
import cgi | |
import mimetypes | |
import os | |
import posixpath | |
import shutil | |
if not mimetypes.inited: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -- 非线程安全 -- | |
from matplotlib.font_manager import FontProperties | |
from operator import itemgetter | |
from itertools import groupby | |
import matplotlib.pyplot as canvas | |
import numpy as np |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ $# -eq 0 ]; then | |
echo "usage: $0 <c-source-file>" >&2 | |
exit -1 | |
fi | |
input=$(cat <<EOF | |
William 35 25000 | |
Kishore 41 35000 | |
Wallace 37 30000 | |
Bruce 39 29999 |