The script:
/*global casper:true*/
var casper = require('casper').create();
var suggestions = [];
var word = casper.cli.get(0);
(ns example.errors) | |
(defn clean-address [params] | |
"Ensure (params :address) is present" | |
(if (empty? (params :address)) | |
[nil "Please enter your address"] | |
[params nil])) | |
(defn clean-email [params] | |
"Ensure (params :email) matches *@*.*" |
package main | |
import ( | |
"bufio" | |
"flag" | |
"fmt" | |
"net" | |
"strconv" | |
"strings" | |
"time" |
package main | |
import ( | |
"net" | |
"os" | |
) | |
const ( | |
RECV_BUF_LEN = 1024 | |
) |
(ns xn.test | |
(:require-macros [cljs.core.async.macros :refer [go alts!]] | |
(:require [xn.core :as xn] | |
[xn.util :as u] | |
[cljs.core.async :refer [<! take!]] | |
[xn.xhr :refer [request-body request-records chain-req]])) | |
(def sample-app | |
(reify | |
xn/Application |
package main | |
import ( | |
"crypto/sha1" | |
"fmt" | |
"io" | |
"mime/multipart" | |
"net/http" | |
"os" | |
"path/filepath" |
package main | |
// sort a map's keys in descending order of its values. | |
import "sort" | |
type sortedMap struct { | |
m map[string]int | |
s []string | |
} |
package main | |
import ( | |
"fmt" | |
"math" | |
"flag" | |
"strings" | |
) | |
type Ngrams struct { |
var casper = require("casper").create({ | |
viewportSize: {width: 1600, height: 1200}, | |
//verbose: true, | |
//logLevel: 'debug', | |
onError: function(self, m) { // Any "error" level message will be written | |
console.log('FATAL:' + m); // on the console output and PhantomJS will | |
self.exit(); // terminate | |
}, | |
}); |
package main | |
import ( | |
"net" | |
"log" | |
"time" | |
) | |
func Ping(proto, addr string, out chan<- string) { | |
c, err := net.Dial(proto, addr) |