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
| package demo | |
| class Coder(words: List[String]) { | |
| private val mnemonics = Map( | |
| '2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL", | |
| '6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ") | |
| private val charCode: Map[Char, Char] = | |
| for ((digit, str) <- mnemonics; letter <- str) yield letter -> digit |
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 wiki.core | |
| (:use net.cgrand.moustache | |
| ring.adapter.jetty | |
| ring.util.response | |
| [ring.middleware params stacktrace reload] | |
| hiccup.core | |
| com.ashafa.clutch) | |
| (:require [clojure.string :as s]) | |
| (:import org.pegdown.PegDownProcessor)) |
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 perl | |
| # Remember `chmod a+x hslint, after putting on path. | |
| $ghc = '/usr/bin/ghc'; # where is ghc | |
| @ghc_options = ('-Wall'); # e.g. ('-fglasgow-exts') | |
| @ghc_packages = (); # e.g. ('QuickCheck') | |
| ### the following should not been edited ### | |
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
| AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build()); | |
| WebSocket websocket = c.prepareGet("ws://127.0.0.1:8080/atmosphere-jquery-pubsub/pubsub/chat") | |
| .execute(new WebSocketUpgradeHandler()).get(); | |
| websocket.addMessageListener(new WebSocketListener() { | |
| @Override | |
| public void onMessage(byte[] message) { | |
| System.out.println(new String(message)); | |
| } | |
| @Override |
OlderNewer