https://music-tw.line-apps-beta.com/today
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
# Version: 1.3 | |
# Author: pantuts | |
# Description: Parse URLs in Youtube User's Playlist (Video Playlist not Favorites) | |
# Use python3 and later | |
# Agreement: You can use, modify, or redistribute this tool under | |
# the terms of GNU General Public License (GPLv3). | |
# This tool is for educational purposes only. Any damage you make will not affect the author. | |
# Usage: python3 youParse.py youtubeURLhere | |
import re |
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
extension String { | |
/* | |
Ref: http://oleb.net/blog/2014/07/swift-strings/ | |
"Because of the way Swift strings are stored, the String type does not support random access to its Characters via an integer index — there is no direct equivalent to NSStringʼs characterAtIndex: method. Conceptually, a String can be seen as a doubly linked list of characters rather than an array." | |
By creating and storing a seperate array of the same sequence of characters, | |
we could hopefully achieve amortized O(1) time for random access. | |
*/ | |
func randomAccessCharactersArray() -> [Character] { | |
return Array(self.characters) |
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
// | |
NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:1]; | |
array[0] = @"0"; | |
array[1] = @"1"; // won't crash... but not good | |
// C array, cannot be used as property | |
NSInteger matrix[3][3]; | |
matrix[0][0] = 10; | |
NSLog(@"%s %@", __PRETTY_FUNCTION__, array); | |
NSLog(@"%s %ld", __PRETTY_FUNCTION__, matrix[0][0]); //10 |
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
NSString *str = @"abca"; | |
NSLog(@"%@", [str substringWithRange:NSMakeRange(0, 1)]); // "a" | |
NSLog(@"%@", [str substringWithRange:NSMakeRange(0, 3)]); // "abc" | |
NSLog(@"%@", [str substringWithRange:NSMakeRange(0, 4)]); // "abca" | |
unichar a = [str characterAtIndex:0]; | |
unichar a3 = [str characterAtIndex:3]; | |
NSLog(@"%C", a); | |
if (a == a3) { NSLog(@"equal"); } |
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
#import "ViewController.h" | |
#import <MagicalRecord/MagicalRecord.h> | |
#import "Artist+CoreDataClass.h" | |
@interface ViewController () | |
@end | |
@implementation ViewController |
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
// | |
// ViewController.m | |
// RunLoop | |
// | |
// Created by cj on 2017/4/26. | |
// Copyright © 2017年 cj. All rights reserved. | |
// | |
#import "ViewController.h" | |
#import <AFNetworking/AFNetworking.h> |
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
// Xcode 10.2 to Xcode 11 Beta | |
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/13.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport |
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
#!/bin/sh | |
branch="pull/$1/head:pr/$1" | |
echo $branch | |
local_branch="pr/$1" | |
echo $local_branch | |
git fetch upstream $branch | |
git checkout $local_branch |
OlderNewer