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
| # 音階リストを定義 | |
| NOTES = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B'] | |
| # アルファベット順の音名 | |
| LETTERS = "CDEFGAB" | |
| # 異名同音の対応表(変換用:入力されたflatの場合も内部計算はsharpsで行う) | |
| ENHARMONIC = { | |
| 'Db': 'C#', 'Eb': 'D#', 'Fb': 'E', 'Gb': 'F#', 'Ab': 'G#', 'Bb': 'A#', 'Cb': 'B', | |
| 'B#': 'C', 'E#': 'F' |
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 | |
| let noteToSemitone: [String: Int] = [ | |
| "C": 0, "C#": 1, "Db": 1, | |
| "D": 2, "D#": 3, "Eb": 3, | |
| "E": 4, "Fb": 4, "E#": 5, | |
| "F": 5, "F#": 6, "Gb": 6, | |
| "G": 7, "G#": 8, "Ab": 8, | |
| "A": 9, "A#": 10, "Bb": 10, | |
| "B": 11, "Cb": 11, "B#": 0 |
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
| javascript:document.querySelectorAll('code').forEach(function(e)%7Bif(e.closest('pre'))%7Breturn%3B%7Dconst newElem%3Ddocument.createElement('span')%3Bwhile(e.firstChild)%7BnewElem.appendChild(e.firstChild)%3B%7Dfor(let index%3De.attributes.length - 1%3Bindex>%3D0%3B--index)%7BnewElem.attributes.setNamedItem(e.attributes%5Bindex%5D.cloneNode())%3B%7De.parentNode.replaceChild(newElem%2Ce)%3B%7D)%3Bvoid(0); |
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
| require 'open-uri' | |
| require 'json' | |
| response = open('http://www.idolfes.com/2016/json/timetable/time.json') | |
| data = response.read | |
| json = JSON.parse(data) | |
| artists = {} | |
| json.keys.each{|day| | |
| json[day].keys.each{|stage| |
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 | |
| class Utils { | |
| class func performAfterDelay(block: dispatch_block_t, delayTime: Double) { | |
| let delay = delayTime * Double(NSEC_PER_SEC) | |
| let time = dispatch_time(DISPATCH_TIME_NOW, Int64(delay)) | |
| dispatch_after(time, dispatch_get_main_queue(), block) | |
| } | |
| } |
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
| UINavigationBar.self.appearance().setBackgroundImage(UIImage(), forBarMetrics: UIBarMetrics.Default) | |
| UINavigationBar.self.appearance().shadowImage = UIImage() |
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 showroom star aggregator | |
| // @namespace http://nipotan.com/ | |
| // @version 0.8 | |
| // @description 特定のルームには連射ボタン等があり、他は閉じるだけ | |
| // @match https://www.showroom-live.com/* | |
| // @grant none | |
| // @copyright 2014 nipotan | |
| // ==/UserScript== | |
| $(document).ready(function(){ |
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/UIKit.h> | |
| #import <CoreMotion/CoreMotion.h> | |
| @interface MYViewController : UIViewController | |
| @property (nonatomic, strong) CMStepCounter *stepCounter; | |
| @end |
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
| - (void)viewDidLoad | |
| { | |
| [super viewDidLoad]; | |
| UISlider *slider = [[UISlider alloc] init]; | |
| slider.center = self.view.center; | |
| slider.transform = CGAffineTransformMakeRotation(M_PI * -90.0 / 180.0); | |
| [self.view addSubview:slider]; | |
| [slider autorelease]; | |
| } |