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
(defn id-mat | |
"Creates an identity matrix of n x n size" | |
[n] | |
(let [init (square-mat n 0 :implementation :clatrix) | |
identity-f (fn [i j n] | |
(if (= i j) 1 n))] | |
(cl/map-indexed identity-f init))) | |
;; clj-ml1.matrix-basics> (id-mat 5) | |
;; A 5x5 matrix |
Imedians who originate from the planet Imedio love games of the Earth. The FizzBuzz Question is one of the most popular game among them, and is the winner of Imedian Game of the Year 2014.
Its rule is defined in a Wikipedia article as follows:
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
(let [N (read-line) | |
digits (map #(Character/digit % 10) N) | |
m3 (rem (apply + digits) 3) | |
m5 (rem (last digits) 5) | |
answer (cond | |
(and (zero? m3) (zero? m5)) "Fizz Buzz" | |
(zero? m3) "Fizz" | |
(zero? m5) "Buzz" | |
:else N)] | |
(println answer)) |
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
$ ./configure --with-x --with-x-toolkit=no --prefix=/opt/emacs | |
Configured for `x86_64-unknown-linux-gnu'. | |
Where should the build process find the source code? . | |
What compiler should emacs be built with? gcc -std=gnu99 -g3 -O2 | |
Should Emacs use the GNU version of malloc? yes | |
(Using Doug Lea's new malloc from the GNU C Library.) | |
Should Emacs use a relocating allocator for buffers? no | |
Should Emacs use mmap(2) for buffer allocation? no |
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 tnoda.eat.croquettes | |
(:import (org.openqa.selenium By) | |
(org.openqa.selenium.firefox FirefoxDriver) | |
(org.openqa.selenium.interactions Actions))) | |
(defn -main | |
"Eats more than one thousand pieces of croquettes" | |
[& args] | |
(let [driver (doto (FirefoxDriver.) | |
(.get "http://vnctst.tir.jp/op0012-4/")) |
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 tnoda.iwami | |
(:gen-class) | |
(:import (org.bukkit.craftbukkit Main)) | |
(:require [clojure.tools.nrepl.server :as nrepl-server])) | |
(defonce server (atom nil)) | |
(defn- nrepl-host | |
[] | |
(or (System/getenv "NREPL_HOST") "127.0.0.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
<?xml version = "1.0" standalone = "no"?> | |
<manifest identifier = "LMSTestPackage_CO-03" version = "1.1.1" | |
xmlns = "http://www.imsglobal.org/xsd/imscp_v1p1" | |
xmlns:adlcp = "http://www.adlnet.org/xsd/adlcp_v1p3" | |
xmlns:adlseq = "http://www.adlnet.org/xsd/adlseq_v1p3" | |
xmlns:adlnav = "http://www.adlnet.org/xsd/adlnav_v1p3" | |
xmlns:imsss = "http://www.imsglobal.org/xsd/imsss" | |
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation = "http://www.imsglobal.org/xsd/imscp_v1p1 imscp_v1p1.xsd | |
http://www.adlnet.org/xsd/adlcp_v1p3 adlcp_v1p3.xsd |
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
require 'formula' | |
class Cmigemo < Formula | |
url 'http://cmigemo.googlecode.com/files/cmigemo-default-src-20110227.zip' | |
homepage 'http://www.kaoriya.net/software/cmigemo' | |
sha1 '25e279c56d3a8f1e82cbfb3526d1b38742d1d66c' | |
depends_on 'nkf' | |
def patches |