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 sublime, sublime_plugin | |
import io | |
# コメントを除いてコピーするやつ | |
# comment.py から持ってきた | |
def build_comment_data(view, pt): | |
shell_vars = view.meta_info("shellVariables", pt) | |
if not shell_vars: | |
return None |
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
#! /usr/bin/env python | |
# -*- encoding: utf-8 -*- | |
def judge(s): | |
# 重複チェック | |
bs = set((xy / 10, xy % 10) for xy in map(int, s.split(','))) | |
if len(bs) != 4: | |
# 全部違う座標ではないときはテトロミノを成さない |
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
#! /usr/bin/env /python | |
# -*- coding: utf-8 -*- | |
from itertools import ifilter, islice | |
def gen_odd(): | |
n = 3 | |
while True: | |
yield n | |
n += 2 |
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.shisashi.android.widget; | |
import android.os.Handler; | |
import android.view.MotionEvent; | |
import android.view.View; | |
import android.view.View.OnLongClickListener; | |
import android.view.View.OnTouchListener; | |
public class LongClickRepeatAdapter { |