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
// ==UserScript== | |
// @name malwarewarninglink | |
// @namespace malwarewarninglink | |
// @description この userscript はコンピュータに損害を与える可能性を与えます | |
// @include http://www.google.co.jp/* | |
// ==/UserScript== | |
(function () { | |
function filter(doc) { | |
var elts = null | |
if (!!doc) { elts = $x('descendant::div[@class="s"]', doc) } |
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
# plotting colormap | |
xs <- 1:100 | |
ys <- 1:100 | |
zs <- sapply(xs, function (x) { sapply(ys, function (y) { sin(x/(2*pi)) + cos(y/(2*pi)) }) }) | |
z.range <- c(min(zs), max(zs)) | |
default.par <- par(no.readonly=TRUE) | |
layout(matrix(c(1, 2), 2, 2, byrow=TRUE), c(1, 0.12)) | |
par(mar=c(default.par$mar[1], default.par$mar[2], default.par$mar[3], 1)) | |
image(xs, ys, zs) | |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
unsigned long long | |
choose_i(unsigned long const n, unsigned long const r, unsigned long long* const memo) | |
{ | |
#define index_(n_, r_) ((r_)+(n_)*((n_)+1)/2) | |
if (r > n) | |
return 0; |
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
#include <iostream> | |
template<bool cond, class THEN, class ELSE> | |
struct if_ | |
{ | |
typedef ELSE type; | |
}; | |
template<class THEN, class ELSE> | |
struct if_<true, THEN, ELSE> |
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
import javax.microedition.midlet.*; | |
import javax.microedition.lcdui.*; | |
import java.io.IOException; | |
// Affine | |
public class Affine1 extends MIDlet | |
{ | |
public Affine1() |
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
// PixelData.java | |
import javax.microedition.lcdui.*; | |
public class PixelData { | |
private int[] pixels; | |
private int width; | |
private int height; | |
private PixelData(int[] pixels, int width, int height) |
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 'rubygems' | |
require 'active_ldap' | |
ActiveLdap::Base.setup_connection( | |
:host => 'example.com', | |
:port => 389, | |
:base => 'dc=example,dc=com', | |
:bind_dn => 'cn=admin,dc=example,dc=com', | |
:password_block => Proc.new{'secret'}, | |
:allow_anonymous => false |
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
{-# LANGUAGE ForeignFunctionInterface #-} | |
{-# OPTIONS_GHC -fno-warn-unused-imports #-} | |
----------------------------------------------------------------------------- | |
-- | | |
-- Module : System.Posix.IO | |
-- Copyright : (c) The University of Glasgow 2002 | |
-- License : BSD-style (see the file libraries/base/LICENSE) | |
-- | |
-- Maintainer : libraries@haskell.org | |
-- Stability : provisional |
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
{-# OPTIONS_GHC -XNoImplicitPrelude #-} | |
----------------------------------------------------------------------------- | |
-- | | |
-- Module : System.IO | |
-- Copyright : (c) The University of Glasgow 2001 | |
-- License : BSD-style (see the file libraries/base/LICENSE) | |
-- | |
-- Maintainer : libraries@haskell.org | |
-- Stability : stable | |
-- Portability : portable |
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
\begin{code} | |
{-# OPTIONS_GHC -XNoImplicitPrelude -funbox-strict-fields #-} | |
{-# OPTIONS_HADDOCK hide #-} | |
----------------------------------------------------------------------------- | |
-- | | |
-- Module : GHC.IOBase | |
-- Copyright : (c) The University of Glasgow 1994-2002 | |
-- License : see libraries/base/LICENSE | |
-- | |
-- Maintainer : cvs-ghc@haskell.org |