Skip to content

Instantly share code, notes, and snippets.

View pokutuna's full-sized avatar
👁️
👄👁👂

pokutuna pokutuna

👁️
👄👁👂
View GitHub Profile
# -*- coding: utf-8 -*-
class Util
def self.deg2rad(degree)
degree * Math::PI / 180.0
end
# ヒュベニの距離計算式 単位: m
def self.geo_distance(geo_a, geo_b)
E/BluetoothAdapterState( 976): Error while turning Bluetooth On
D/BluetoothAdapterService( 976): Broadcasting updateAdapterState() to 1 receivers.
I/BluetoothBondStateMachine( 976): StableState(): Entering Off State
D/BluetoothManagerService( 445): Message: 60
D/BluetoothManagerService( 445): MESSAGE_BLUETOOTH_STATE_CHANGE: prevState = 11, newState=10
D/BluetoothManagerService( 445): Broadcasting onBluetoothStateChange(false) to 8 receivers.
D/BluetoothHeadset( 713): onBluetoothStateChange: up=false
E/BluetoothHeadset( 713):
E/BluetoothHeadset( 713): java.lang.IllegalArgumentException: Service not registered: android.bluetooth.BluetoothHeadse
t$2@41c813b0
int startTime;
int threshould = 3000;
void setup() {
startTime = millis();
}
void draw() {
int diff = millis() - startTime;
Sub となりのセルをコメントにし二郎()
Dim targetCell As Range
Dim nextCell As Range
Do Until ActiveCell.Value = ""
Set targetCell = Range(ActiveCell.Address)
Set nextCell = targetCell.Offset(0, 1)
If Not nextCell.Text = "" And targetCell.NoteText = "" Then
@pokutuna
pokutuna / comment_taro.vba
Created November 21, 2012 22:31
ultra useful excel macro
Sub となりセルをコメントにし太郎()
Dim pos As Range
Dim relatedCell As Range
Set pos = Range(ActiveCell.Address)
Set relatedCell = pos.Offset(0, 1)
If Not relatedCell.Text = "" Then
On Error GoTo SET_COMMENT_ERROR
require 'open-uri'
require 'nokogiri'
require 'fileutils'
USER = 'M1325'
PAGE = 'http://hsi.ksc.kwansei.ac.jp/~kono/cgi-bin/2010hci-ex/report/report.cgi?act_display_report=1&c=2&r=R2'
PATTERN = /R2.pdf|R2-1.zip/
puts 'password >>'
@auth = { :http_basic_authentication => [USER, gets] }
public class MultiplyBlock extends ProcessBlock<Integer, String> {
int keisuu = 1;
public MultiplyBlock(boolean tail, int keisuu) {
super(tail);
this.keisuu = keisuu;
}
import hypermedia.video.*;
import java.awt.Rectangle;
OpenCV opencv;
void setup() {
size(320, 240);
opencv = new OpenCV(this);
opencv.capture(width, height);
import hypermedia.video.*;
OpenCV opencv;
void setup() {
size(640, 480);
opencv = new OpenCV(this);
opencv.capture(width, height);
}
;;; sound-editor.el --- give sound feedback to input
;; Usage:
;; (require 'sound-editor)
;; on: M-x start-sound-editor
;; off: M-x exit-sound-editor
(require 'cl)
(require 'deferred)
(defvar sound-editor:enabled nil)