Skip to content

Instantly share code, notes, and snippets.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>example</groupId>
<artifactId>example</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Example</name>
<properties>
<scala.version>2.8.0.RC2</scala.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
javascript:(function(){document.addEventListener("keydown",function%20handleKey(e){var%20tag=(e.target||e.srcElement).tagName;if(/input|textarea/i.test(tag)){return;}if(e.keyCode==74){var%20next=$(document.querySelector("ul.s_shapeSheetNavi%20a.active")).parent().next().find("a");next.length==0?$(document.querySelector("ul.s_shapeSheetNavi%20li:first-child%20a")).click():next.click();}else%20if(e.keyCode==75){var%20prev=$(document.querySelector("ul.s_shapeSheetNavi%20a.active")).parent().prev().find("a");prev.length==0?$(document.querySelector("ul.s_shapeSheetNavi%20li:last-child%20a")).click():prev.click();}e.preventDefault();},false);})();
import java.security.MessageDigest
abstract class Digest(algorithm: String) {
val digest = MessageDigest.getInstance(algorithm)
def hexdigest(value: String) : String = hexdigest(value.getBytes())
def hexdigest(value: Array[Byte]) : String = {
byte2hexstring(digest.digest())
}
(defun my-html-escape (start end)
(interactive "r")
(save-excursion
(save-restriction
(narrow-to-region start end)
(goto-char (point-min))
(while (re-search-forward "<" nil t)
(replace-match "&lt;"))
(goto-char (point-min))
(while (re-search-forward ">" nil t)