http://www.zusaar.com/event/3667003
- Blocksの循環参照
- weakSelfパターンはアンチパターンだと思ってる
- その場限りのBlocks
- $.each(function(){}) てきなやつ
- 一度きりのblocks
- blocksへの参照をnilを代入して断ち切る
- 最後にweakSelfパターン
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title></title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width"> | |
<style> | |
#entries-title { |
javascript:!function(){$(function(){var requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame;var prev=0;var info=$('<div id="testest"></div>').css({position:"fixed",left:10,bottom:20,backgroundColor:"rgba(0, 0, 0, 0.8)",fontSize:12,color:"#ffffff",padding:5,zIndex:1e5}).appendTo("body");var count=0;function step(timestamp){if(++count==30){info.text((1e3/((timestamp-prev)/count)+"").substr(0,5));prev=timestamp;count=0}requestAnimationFrame(step)}requestAnimationFrame(step)})}(); |
http://www.zusaar.com/event/3667003
!function(diff){ | |
var current = new Date().getTime(); | |
$('#tweet').remove(); | |
function refreshData2() | |
{ | |
var d = new Date(current += diff); | |
var h = d.getHours(); | |
var m = d.getMinutes(); | |
var s = d.getSeconds(); | |
if (h<=9) {h = '0'+h}; |
(function(fire) { | |
var cmd = [38,38,40,40,37,39,37,39,66,65], l = cmd.length, pos = 0; | |
$(document).on('keydown', function(event) { | |
var key = event.which; | |
if (cmd[pos] !== key) { | |
pos = 0; | |
} else if (++pos === l) { | |
fire(); | |
pos = 0; | |
} |
#!/bin/bash | |
TARGET_FOLDER="${HOME}/Pictures/screenshot" | |
FILE_PREFIX="s" | |
echo "setting..." | |
if [ ! -d ${TARGET_FOLDER} ]; then | |
mkdir -p ${TARGET_FOLDER} | |
echo "${TARGET_FOLDER} is made." |
NSMutableArray *mary = [@[ @"a", @"b", @"c" ] mutableCopy]; | |
NSArray *ary = [mary copy]; | |
[mary removeLastObject]; | |
NSString *str1 = [mary componentsJoinedByString:@", "]; | |
NSString *str2 = [ary componentsJoinedByString:@", "]; | |
NSLog(@"{str1: %@}, {str2: %@}", str1, str2); // {str1: a, b}, {str2: a, b, c} | |
# Description: | |
# Spice LGTM up with some images. | |
# | |
# Dependencies: | |
# None | |
# | |
# Configuration: | |
# None | |
# | |
# Commands: |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice | |
import signal | |
import sys | |
import random | |
shouldQuit = False | |
shouldSkip = False |