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
// Fetch all Checklist items from all boards belong to you | |
function list(id, lists) { | |
var found = lists.filter(function(list) { | |
return list.id == id; | |
}); | |
if (found.length > 0) { | |
return found[0]; | |
} else { | |
return null; | |
} |
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
MacBook Pro 15-inch Mid 2010 | |
Mac OS X 10.11.1 El Capitan | |
Anonymous UUID: C954D324-371C-A05D-BEFC-FABD49B32EC8 | |
Thu Nov 12 19:23:01 2015 | |
*** Panic Report *** | |
panic(cpu 1 caller 0xffffff7f85622bad): "GPU Panic: [<None>] 3 3 7f 0 0 0 0 3 : NVRM[0/1:0:0]: Read Error 0x00000100: CFG 0xffffffff 0xffffffff 0xffffffff, BAR0 0xd2000000 0xffffff911f5ef000 0x0a5480a2, D0, P3/4\n"@/Library/Caches/com.apple.xbs/Sources/AppleGraphicsControl/AppleGraphicsControl-3.11.33.1/src/AppleMuxControl/kext/GPUPanic.cpp:127 | |
Backtrace (CPU 1), Frame : Return Address |
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.mootoh.accelog; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.hardware.Sensor; | |
import android.hardware.SensorEvent; | |
import android.hardware.SensorEventListener; | |
import android.hardware.SensorManager; | |
import android.os.Bundle; | |
import android.os.Environment; |
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
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs"), | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { | |
var Response = { |
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
// http://stackoverflow.com/questions/28849498/assigning-property-to-subclass-of-rlmobject/28859297#28859297 | |
#import <XCTest/XCTest.h> | |
#import <Realm/Realm.h> | |
@interface Base : RLMObject | |
@property NSInteger id; | |
@end | |
@interface Derived : Base | |
@property NSString *derivedInfo; |
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 'classifier' | |
require 'stemmer' | |
require 'webrick' | |
require 'json' | |
# load the previous state if exists | |
bayes = nil | |
fh = open('classifier.dump') | |
if fh | |
puts 'load' |
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 'natto' | |
require 'webrick' | |
require 'json' | |
def to_nouns(text) | |
nm = Natto::MeCab.new | |
results = [] | |
nm.parse(text) do |n| | |
type = n.feature.split(/,/).first | |
next unless type == '名詞' |
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
var fs = require('fs') | |
, http = require('http') | |
, Mecab = require('mecab-async') | |
, mecab = new Mecab() | |
; | |
function toNouns(text, callback) { | |
mecab.parse(text.toString(), function(err, result) { | |
if (err) callback(err, null); | |
var nouns = result.map(function(elm) { |
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
Director::drawScene | |
Scene(Node)::visit | |
matrix transform | |
push & set model_view matrix to it | |
sort all children | |
for child in children whose zOrder < 0: | |
child.visit |
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
- (void) imageReceived:(NSNotification *)notification { | |
NSLog(@"imageReceived"); | |
dispatch_async(dispatch_get_global_queue(0, 0), ^() { | |
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(64, 64, 200, 200)]; | |
label.text = @"label should be added"; | |
[self.view addSubview:label]; | |
[self.view setNeedsDisplay]; | |
[self.view setNeedsLayout]; | |
}); |