この記事は、lispリーダーマクロアドベントカレンダー の4日目の記事です。 タイトルにある通り、Clojure でのリー ダーマクロについて取り扱います(対象とする Clojure のバージョンは 1.4)。
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
user=> (import 'java.io.File) | |
user=> (File. ".") | |
#<File .> | |
user=> (def curdir (File. ".")) | |
#'user/curdir | |
user=> curdir | |
#<File .> | |
user=> (.list curdir) | |
#<String[] [Ljava.lang.String;@33d6798> | |
user=> (seq (.list curdir)) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<style type="text/css"> | |
html, body, #map { | |
margin: 0; | |
width: 100%; |
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
## --with-libiconv と --with-projdir を省略するとだめだった。特に iconv の方はハマりどころ。 | |
## | |
$ ./configure --with-libiconv=/usr/local --with-projdir=/usr/local | |
checking build system type... x86_64-unknown-freebsd9.1 | |
checking host system type... x86_64-unknown-freebsd9.1 | |
: (中略) | |
enabling PostgreSQL extension support... | |
configure: creating ./config.status | |
config.status: creating GNUmakefile | |
config.status: creating extensions/Makefile |
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
# install | |
$ sudo port install postgis2 | |
$ port info postgis2 | |
postgis2 @2.0.1 (databases, gis) | |
Variants: comments, gui, postgresql90, postgresql91, [+]postgresql92, [+]raster, [+]topology, universal | |
Description: PostGIS 2 adds geometrical, geographical and topological types, and functions operating thereon, to the PostGreSQL database. The 2.0 release also provides raster handling | |
and basic 3D geometry capacities (TIN and polyhedra). | |
Homepage: http://postgis.refractions.net/ |
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
SET CLIENT_ENCODING TO UTF8; | |
SET STANDARD_CONFORMING_STRINGS TO ON; | |
BEGIN; | |
COPY "admarea" ("n03_001","n03_002","n03_003","n03_004","n03_007",geom) FROM stdin; | |
富山県 \N 下新川郡 朝日町 16343 0106000020041200000100000.... | |
: (中略) | |
\. | |
COMMIT; |
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 port clean python27 | |
$ sudo port upgrade python27 -universal | |
## 一瞬これでいけたかと思ったけどやっぱりだめだったorz | |
## 後日 | |
## python27 が 2.7.3_0 から 2.7.3_1 になってやってみたが、別のエラーでこける。 | |
## 調べてみたらまさにこれ: https://trac.macports.org/ticket/32090 | |
## で、やってみたら | |
$ sudo port -f deactivate py27-xml |
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
# shp2img -m /Library/WebServer/CGI-Executables/mapserver/example06.map -o ~/out.png -s 1920 1080 | |
MAP | |
DEBUG 5 | |
CONFIG "MS_ERRORFILE" "tmp/ms_error.txt" | |
EXTENT 129.7 32.9 138.0 38 | |
WEB | |
METADATA | |
"wms_title" "WMS Server" |
この記事は、変態アドベントカレンダー 6日目の記事です。前日は はがねのつるぎさん でした。
このアドベントカレンダーは、意識もスキルも高い変態勇者がハイテクを駆使してかくもの、と思ってらっしゃる方にはちょっと申し訳ありません。若干変態度もハイテク度も低めで肩透かしを食らうことになりますが、しばしお付き合いください。
今日のネタは、私自身の日々の切実な課題である、Excel文書と戦う
ための準備、といったところです。
Excel ドキュメントにに対する不満
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
;;; | |
;;; see http://mail2.nara-edu.ac.jp/~asait/java/xml/xml.htm#section4 | |
;;; | |
(ns lispguide-convert | |
(:import | |
[javax.xml.transform TransformerFactory] | |
[javax.xml.transform.stream StreamSource StreamResult])) | |
(defn doit | |
([] (doit "lispguide.html" "lispguide.xml" "styleguide.xsl")) |