Skip to content

Instantly share code, notes, and snippets.

//http://d.hatena.ne.jp/amachang/20100624/1277359266
var isElementInDocument = (function() {
function isElementInDocumentA(node) {
return node != null && (node.nodeType == 9 || (node.compareDocumentPosition(node.ownerDocument) & 1) == 0);
}
function isElementInDocumentB(node) {
return node != null && (node.nodeType == 9 || node.ownerDocument.documentElement === node || node.ownerDocument.documentElement.contains(node));
}
function isElementInDocumentC(node) {
var target = node;
/**
* Tapper
* tap, step, tap, roll, roll, roll ...
* @see http://d.hatena.ne.jp/brazil/20071030/1193711816
*/
function Tapper() {
this.rolling = false;
this.unbounded = false;
this.tapped = 0;
this.lastTapped = 0;
Index: src/org/insightech/er/editor/model/dbimport/ImportFromDBManagerBase.java
===================================================================
--- src/org/insightech/er/editor/model/dbimport/ImportFromDBManagerBase.java (リビジョン 19)
+++ src/org/insightech/er/editor/model/dbimport/ImportFromDBManagerBase.java (作業コピー)
@@ -18,6 +18,8 @@
import java.util.StringTokenizer;
import java.util.logging.Level;
import java.util.logging.Logger;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
@miya2000
miya2000 / pixivreader.js
Created September 28, 2010 22:31
for Opera10.10
// ==UserScript==
// @name pixivreader
// @author edvakf
// @namespace http://d.hatena.ne.jp/edvakf/
// @include http://www.pixiv.net/new_illust.php*
// @include http://www.pixiv.net/search.php*
// @include http://www.pixiv.net/tags.php*
// @include http://www.pixiv.net/ranking.php*
// @include http://www.pixiv.net/ranking_log.php*
// @include http://www.pixiv.net/bookmark_new_illust.php*
Index: ReflectiveConnectionConfig.java
===================================================================
--- ReflectiveConnectionConfig.java (リビジョン 373)
+++ ReflectiveConnectionConfig.java (作業コピー)
@@ -149,22 +149,14 @@
*
* @see org.seasar.dolteng.eclipse.preferences.ConnectionConfig#getDriverPath()
*/
- public String getDriverPath() {
- return driverPath;
// ==UserScript==
// @name Scrolloo
// @description Yet anther scrollbar and scroll utilities.
// @namespace http://www.hatena.ne.jp/miya2000/scrolloo
// @version 1.00 Beta
// @include *
// ==/UserScript==
//*
(function(f) {
//for debug.
// ==UserScript==
// @name yahoo comics
// @include http://comics.yahoo.co.jp/*
// @include http://view.books.yahoo.co.jp/*
// ==/UserScript==
window.opera.defineMagicVariable('flagBrowser', function (curVal) { return true; }, function (newVal) { });
window.opera.defineMagicFunction('CheckBrowser', function () { return true; });
package doltengtest.action;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.assertThat;
import javax.annotation.Resource;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.seasar.framework.mock.servlet.MockHttpServletResponse;
using System;
namespace EnumName.enums
{
public static class Hoge
{
public enum Value
{
Aaa,
Bbb
package ttt;
import java.io.File;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.storage.file.FileRepository;
public class JGitTest {
public static void main(String[] args) throws Exception {