This file contains hidden or 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
eval (%w| | |
puts (' Tomohi | |
roMo ro ,hob | |
by:[game,p | |
rogr am ming | |
]')| *" ")#### | |
#### ### |
This file contains hidden or 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
eval (%w{ e=27 .chr | |
;put s("6 6663 3600 | |
6214 5541 2600 633" .cha rs.m | |
ap{[ ")%# %%%% %%%# %"," )%#% | |
This file contains hidden or 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
let just = Just<Int>(999) | |
let a = [1, 2, 3, 4, 5].publisher | |
.withLatestFrom(just) | |
.sink(receiveCompletion: { | |
print($0) | |
}, receiveValue: { | |
print($0) | |
}) | |
print() |
This file contains hidden or 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 Foundation | |
protocol R { | |
associatedtype V | |
func hoge() -> V | |
} | |
struct R1: R { | |
typealias V = Int |
This file contains hidden or 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 UIKit | |
import PlaygroundSupport | |
let view = UIView(frame: CGRect(x: 0, y:0, width:320, height:44)) | |
view.backgroundColor = UIColor.black | |
PlaygroundPage.current.liveView = view | |
(0...10).forEach { | |
let sushi = UILabel(frame: CGRect(x: 320, y: 0, width: 44, height: 44)) |
This file contains hidden or 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 UIKit | |
enum ズンドコ: UInt32 { | |
case ズン, ドコ | |
} | |
var list = [ズンドコ]() | |
while list != [.ズン, .ズン, .ズン, .ズン, .ドコ] { | |
let zundoko = ズンドコ(rawValue: arc4random_uniform(2))! | |
list.append(zundoko) |
This file contains hidden or 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
// ==UserScript== | |
// @name http://gazoreply.jp/ | |
// @description replace gazoreply.jp copy image url | |
// @include http://gazoreply.jp/* | |
// @exclude http://gazoreply.jp/situation/* | |
// ==/UserScript== | |
window.addEventListener('load', function(){ | |
var imgURL = document.getElementById("main-photo-img").getAttribute('src'); | |
var clipboardButtonElement = document.getElementById("copy-clipboard-btn"); |
This file contains hidden or 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
[1] pry(main)> RUBY_VERSION | |
=> "2.0.0" | |
[2] pry(main)> require 'active_support/time' | |
=> true | |
[3] pry(main)> Time.new(2013, 4, 1).end_of_day | |
=> 2013-04-01 23:59:59 +0900 | |
[4] pry(main)> Time.new(2013, 4, 1).end_of_day.to_f | |
=> 1364828400.0 | |
[5] pry(main)> Time.at(1364828400.0) | |
=> 2013-04-02 00:00:00 +0900 |
This file contains hidden or 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 <Foundation/Foundation.h> | |
#import <dispatch/dispatch.h> | |
int main (int argc, char const *argv[]) | |
{ | |
int i; | |
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); | |
dispatch_semaphore_t semaphore = dispatch_semaphore_create(1); | |
for(i = 0; i < 10; i++) { |
This file contains hidden or 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
>> puts "ひろし".unpack("b*")[0].scan(/../).map{|x|%w(ヴ ィ ム …)[x.to_i(2)]}.join("") | |
…ヴィ…ムヴヴィィヴ…ィ…ヴィ…ィヴヴィム…ヴィ…ヴィ…ムヴヴィ…ムムィ | |
=> nil | |
>> puts ["…ヴィ…ムヴヴィィヴ…ィ…ヴィ…ィヴヴィム…ヴィ…ヴィ…ムヴヴィ…ムムィ".scan(/ヴ|ィ|ム|…/).map{|c|%w(ヴ ィ ム …).index(c)}.map{|i|"%02b"%i}.join("")].pack("b*") | |
ひろし | |
=> nil |
NewerOlder