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
<?php | |
if (PHP_SAPI === 'cli') { | |
echo 'Usage:' . PHP_EOL; | |
echo ' Download Securimage archive from http://www.phpcaptcha.org/download/ and decompress.' . PHP_EOL; | |
echo ' run: php -S localhost:8080' . PHP_EOL; | |
echo " browse: http://localhost:8080/{$argv[0]}" . PHP_EOL; | |
exit; | |
} | |
session_start(); |
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 apply-ctor | |
(import [java.lang.reflect Constructor])) | |
(defn- acceptable-types? [ptypes atypes] | |
(and (= (count ptypes) (count atypes)) | |
(every? (fn [[ptype atype]] | |
(or (= ptype atype) | |
((ancestors atype) ptype))) | |
(map vector ptypes atypes)))) |
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
(defprotocol IEditName | |
(get-name [this]) | |
(set-name! [this val])) | |
(deftype PersonName [^:volatile-mutable lname] | |
IEditName | |
(get-name [this] (. this lname)) | |
(set-name! [this val] (set! lname val))) | |
(def pname (PersonName. "hoge")) |
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 foo | |
(:require [clojure.core.async :as async] | |
[clj-http.client :as http])) | |
(comment | |
:dependencies | |
[[org.clojure/core.async "0.2.374"] | |
[cheshire "5.5.0"] | |
[clj-http "2.1.0"] | |
]) |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |