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
| (defun test-pcase (x) | |
| (pcase x | |
| (1 'one) | |
| ((pred numberp) (list 'number x)) | |
| (`(,a ,b . ,_) (list 'list a b)) | |
| (else (list 'else else)))) |
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
| # Maintainer: Julien Nicoulaud <julien.nicoulaud@gmail.com> | |
| # Source: https://github.com/nicoulaj/archlinux-packages | |
| pkgname=gcviewer | |
| pkgver=1.32 | |
| pkgrel=1 | |
| pkgdesc="Java garbage collector logs analyzer/visualizer." | |
| arch=(any) | |
| url="https://github.com/chewiebug/GCViewer" | |
| license=(LGPL) | |
| depends=('java-runtime>=6') |
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
| interface I1 { | |
| default String id() { | |
| return "I1"; | |
| } | |
| default String id1() { | |
| return id(); | |
| } | |
| } | |
| interface I2 { | |
| default String id() { |
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
| %% http://www.blue.sky.or.jp/grass/ | |
| % 記号処理能力はなかなか強力 | |
| % grass の Operational Semantics をほとんどそのまま書下せたのはすごい | |
| % DCG (Definite Clause Grammars) を使って構文解析が素直に書けるのもいい | |
| % Syntax | |
| token('w', ['w', 'w']). | |
| token('W', ['W', 'W']). | |
| token('v', ['v', 'v']). |
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
| %! ptr(-Ptr). | |
| % return initial pointer Ptr. Next represents a byte stream of all zeros. | |
| % Ptr is a form: (Prev, Cur, Next). | |
| ptr(([], 0, X)) :- X = [0|X]. | |
| %! next_ptr(?Ptr, ?NextPtr) | |
| % It means NextPtr is next point of Ptr. | |
| % In the other hand, it means Ptr is previous point of NextPtr. | |
| next_ptr((Prev, Cur, [X|Next]), ([Cur|Prev], X, Next)). |
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
| (require 'shr) | |
| (defun newsticker-shr-render (pos1 pos2) ; | |
| (let ((dom (libxml-parse-html-region pos1 pos2))) | |
| (delete-region pos1 pos2) | |
| (shr-insert-document dom))) | |
| (setq newsticker-html-renderer 'newsticker-shr-render) | |
| (newsticker--forget-preformatted) |
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
| # HTTP Reverse proxy server | |
| # Original Source: http://rubyforge.org/snippet/download.php?type=snippet&id=162 | |
| # Use case: you have several services running as different users | |
| # for security purposes (they might even be chrooted). | |
| # In production we use apache but for testing I prefer to use | |
| # webrick because I find it more flexible for unit testing. | |
| # The proxy mapping is modelled on the ProxyPass directive | |
| # of apache. For example: | |
| # |
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
| ;;; -*- lexical-binding: t -*- | |
| ;;; Usage: | |
| ;; (add-hook 'rst-mode-hook 'rst-preview:turn-on) | |
| (require 'deferred) | |
| (require 'concurrent) | |
| (require 'shr) |
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 com.arielnetworks.agn; | |
| import java.io.StringReader; | |
| import org.apache.lucene.analysis.Analyzer; | |
| import org.apache.lucene.analysis.TokenStream; | |
| import org.apache.lucene.analysis.cjk.CJKAnalyzer; | |
| import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; | |
| import org.apache.lucene.util.Version; |
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
| #!/bin/bash | |
| usage() { | |
| cat <<EOF | |
| usage: $0 [options] FILE... | |
| -h show this help | |
| -n specify number | |
| EOF | |
| } |