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
public class Xorshift | |
{ | |
private long[] seed; | |
private double nextGaussian; | |
private boolean hasNextGaussian; | |
public Xorshift() | |
{ | |
long l = System.currentTimeMillis(); |
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
using System; | |
namespace Yggdrasill | |
{ | |
public class Xorshift | |
{ | |
private long[] seed; | |
public Xorshift() | |
{ |
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
package net.firstspring.lib; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.Method; | |
public class ReflectionUtil | |
{ | |
@SuppressWarnings("unchecked") | |
public static <T,E> E getField(Class<?> c, T instance, String field) |
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
stack = [] | |
for s in raw_input().split(): | |
if s in ('+','-','*','/'): | |
stack.append(eval('{2}{1}{0}'.format(stack.pop(),s,stack.pop()))) | |
else: | |
stack.append(int(s)) | |
print stack.pop() |
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
stack = [] | |
for s in gets.split() | |
if ['+','-','*','/'].include?s | |
stack.push(eval(stack.pop.to_s+s+stack.pop.to_s)) | |
else | |
stack.push(s.to_i) | |
end | |
end | |
puts stack.pop |
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 sys,json | |
from rauth.service import OAuth1Service | |
auth = OAuth1Service( | |
name='twitter', | |
consumer_key='key', | |
consumer_secret='secret', | |
request_token_url='https://api.twitter.com/oauth/request_token', | |
access_token_url='https://api.twitter.com/oauth/access_token', | |
authorize_url='https://api.twitter.com/oauth/authorize') |
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 random | |
choice = random.choice | |
dha_lo_jd = '━┃┓┛┏┗┳┻┣┫╋' | |
def generate(num): | |
print(''.join([choice(dha_lo_jd) for i in range(num)])) |
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
# -*- encoding:utf-8 -*- | |
import re,threading | |
import twitter,util | |
t = {34:None,60:None,62:None,12288:None,65288:40,65289:41,10:None,65312:64} #全角スペース等の除去とか一部全角記号を半角に変換とか | |
r = re.compile('\([^(]*?@' + twitter.account.name + '.*?\)') | |
def on_data(data): | |
if 'friends' in data: | |
global ids | |
ids = set(data['friends']) |
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
package com.orekyuu.javatter.view; | |
import java.awt.Component; | |
import java.awt.Dimension; | |
import java.awt.Point; | |
import java.awt.event.MouseEvent; | |
import java.awt.event.MouseListener; | |
import java.lang.reflect.Method; | |
import javax.swing.JPanel; |
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
package net.firstspring.javatter.plugin; | |
import java.awt.Image; | |
import java.io.File; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.Random; | |
import javax.imageio.ImageIO; | |
import javax.swing.ImageIcon; |
OlderNewer