This file contains 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
myLength1 :: [a] -> Int | |
myLength1 [] = 0 | |
myLength1 (x:[]) = 1 | |
myLength1 (x:xs) = myLength1 xs + 1 | |
-- why ? | |
myLength2 :: (Eq t, Num a) => [t] -> a | |
myLength2 (x:xs) | xs == [] = 1 |
This file contains 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
(defadvice split-window-vertically (around vk-select-other) | |
(print "test")) | |
(ad-activate 'split-window-vertically) |
This file contains 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
onnect via: http://localhost:8080/hawtio | |
Exception in thread "MavenIndexerFacade startup timer" java.lang.NoSuchMethodError: org.sonatype.guice.bean.reflect.Logs.debug(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V | |
at org.sonatype.guice.plexus.scanners.PlexusXmlScanner.parseComponentsXml(PlexusXmlScanner.java:208) | |
at org.sonatype.guice.plexus.scanners.PlexusXmlScanner.scan(PlexusXmlScanner.java:94) | |
at org.sonatype.guice.plexus.binders.PlexusXmlBeanModule.configure(PlexusXmlBeanModule.java:89) | |
at org.sonatype.guice.plexus.binders.PlexusBindingModule.configure(PlexusBindingModule.java:62) | |
at com.google.inject.AbstractModule.configure(AbstractModule.java:59) | |
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223) | |
at com.google.inject.spi.Elements.getElements(Elements.java:101) | |
at com.google.inject.spi.Elements.getElements(Elements.java:78) |
This file contains 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
divides m n = n `rem` m == 0 | |
divisors :: Int -> [Int] | |
divisors n = [k | k <- [1..n], k `divides` n] | |
sigma = sum . divisors | |
output :: Int -> String | |
output n | |
| sigma n > 2 * n = show n ++ " abundant "++ show (sigma n - 2 * n) |
This file contains 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
import scala.concurrent._ | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import scala.concurrent.duration._ | |
object Futs { | |
def stuff() = { | |
val fut1 = Future { | |
println("future 1") | |
1 | |
} |
This file contains 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
decimal ₹ ls | |
decimal.fr | |
decimal ₹ fregel | |
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8 | |
Welcome to Frege 3.23.370-g898bc8c (Oracle Corporation Java HotSpot(TM) 64-Bit Server VM, 1.8.0_60) | |
frege> :l decimal.fr | |
Module Decimal | |
frege> main [] |
This file contains 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=> (def stuff (atom [])) | |
#'user/stuff | |
user=> (swap! stuff merge 1) | |
[1] | |
user=> @stuff | |
[1] | |
user=> (future (do (Thread/sleep 5000) (reset! stuff []))) | |
#object[clojure.core$future_call$reify__6736 0x12f0293 {:status :pending, :val nil}] | |
user=> @stuff | |
[1] |
This file contains 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 test-put.core | |
(:use compojure.core)) | |
(defroutes app | |
(GET "/" [] "GET") | |
(POST "/" [] "POST") | |
(PUT "/" [] "PUT") | |
(DELETE "/" [] "DELETE")) | |
This file contains 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
vijaykiran@Shrek:lunatech/sdu/presley/:+master$ lein immutant run | |
WARNING: The current app may not be deployed - deploy with 'lein immutant deploy' | |
Starting Immutant: /Users/vijaykiran/bin/jboss-as-7.1.1.Final/bin/standalone.sh | |
JAVA_OPTS already set in environment; overriding default settings with values: -Xms512M -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=1024m | |
========================================================================= | |
JBoss Bootstrap Environment | |
JBOSS_HOME: /Users/vijaykiran/bin/jboss-as-7.1.1.Final/ |
This file contains 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
diff --git a/standalone/configuration/standalone.xml b/standalone/configuration/standalone.xml | |
index 2fcbf1e..bff9b4d 100644 | |
--- a/standalone/configuration/standalone.xml | |
+++ b/standalone/configuration/standalone.xml | |
@@ -1,19 +1,22 @@ | |
-<?xml version='1.0' encoding='UTF-8'?> | |
- | |
-<server xmlns="urn:jboss:domain:1.2"> | |
+<?xml version="1.0" encoding="UTF-8"?><server xmlns="urn:jboss:domain:1.2"> | |
<extensions> |