| Models | Examples |
|---|---|
| Display ads | Yahoo! |
| Search ads |
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
| <string-array name="states"> | |
| <item>Alabama</item> | |
| <item>Alaska</item> | |
| <item>American Samoa</item> | |
| <item>Arizona</item> | |
| <item>Arkansas</item> | |
| <item>California</item> | |
| <item>Colorado</item> | |
| <item>Connecticut</item> | |
| <item>Delaware</item> |
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
| sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \; |
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
| // Usage: | |
| // blacklist | |
| String[] blacklist = new String[]{"com.any.package", "net.other.package"}; | |
| // your share intent | |
| Intent intent = new Intent(Intent.ACTION_SEND); | |
| intent.setType("text/plain"); | |
| intent.putExtra(Intent.EXTRA_TEXT, "some text"); | |
| intent.putExtra(android.content.Intent.EXTRA_SUBJECT, "a subject"); | |
| // ... anything else you want to add | |
| // invoke custom chooser |
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
| maxFibs = 50 | |
| fibs = [1,1] | |
| fibGen = (n) -> | |
| if fibs[n]? is false | |
| fibs[n] = fibGen(n - 1) + fibGen(n - 2) | |
| fibs[n] | |
| fizzy = (i) -> | |
| if i is undefined then i = 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
| car = (arr) -> | |
| arr[0] | |
| cdr = (arr) -> | |
| arr[1..] | |
| # Using for loop | |
| map = (arr, func) -> | |
| func(r) for r in arr |
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 markerbot.core | |
| (:require [taoensso.timbre :as log] | |
| [clojure.data.json :as json] | |
| [clojure.string :as s] | |
| [clj-http.client :as client]) | |
| (:import (java.net Socket) | |
| (java.io PrintWriter InputStreamReader BufferedReader)) | |
| (:gen-class)) | |
| ;; marksy |
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
| (defn char-sequence [char-seqable] | |
| (let [char-seq (seq char-seqable)] | |
| (reify CharSequence | |
| (charAt [this i] (nth char-seq i)) | |
| (length [this] (count char-seq)) | |
| (toString [this] (String. (char-array char-seq))) | |
| ; (subSequence [this start end] ...) | |
| ))) |
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
| ################################################################## | |
| # /etc/elasticsearch/elasticsearch.yml | |
| # | |
| # Base configuration for a write heavy cluster | |
| # | |
| # Cluster / Node Basics | |
| cluster.name: logng | |
| # Node can have abritrary attributes we can use for routing |
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
| ;; Datomic example code | |
| ;; demonstrates various update scenarios, using a news database | |
| ;; that contains stories, users, and upvotes | |
| ;; grab an in memory database | |
| (use '[datomic.api :only (q db) :as d]) | |
| (def uri "datomic:mem://foo") | |
| (d/create-database uri) | |
| (def conn (d/connect uri)) |