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
// https://tour.golang.org/methods/23 | |
package main | |
import ( | |
"io" | |
"os" | |
"strings" | |
) | |
type rot13Reader struct { |
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
public protocol DefaultValueProviding { | |
static var defaultValue: Self { get } | |
} | |
extension String: DefaultValueProviding { | |
public static var defaultValue: String { return "" } | |
} | |
extension Int: DefaultValueProviding { | |
public static var defaultValue: Int { return 0 } |
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
// | |
// NSObject+Blocks.h | |
// Filemator | |
// | |
// Created by Zachary Waldowski on 4/12/11. | |
// Copyright 2011 Dizzy Technology. All rights reserved. | |
// | |
@interface NSObject (Blocks) |
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
-lxml2 -force_load\ "${PROJECT_DIR}/Dependencies/GoogleAnalyticsServicesiOS_3.03a/libGoogleAnalyticsServices.a" -force_load ${BUILT_PRODUCTS_DIR}/libGMGridView.a -force_load ${BUILT_PRODUCTS_DIR}/libfacebook_ios_sdk.a |
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 *)applicationVersion { | |
return [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]; | |
} | |
+ (void)showNeedUpdateAlertIfNeeded | |
{ | |
[self getLatestAppVersionAsynchronousWithCompletionBlock:^(NSString *latestAppVersion) { | |
if ([latestAppVersion compare:[ApplicationInformation applicationVersion] options:NSNumericSearch] == NSOrderedDescending) { | |
dispatch_async(dispatch_get_main_queue(), ^{ | |
// Show alert etc... |
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
using UnityEngine; | |
using System.Collections; | |
public class DontDestroyObject : MonoBehaviour | |
{ | |
static DontDestroyObject instance; | |
void Awake () | |
{ | |
if (!instance) { |
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
using UnityEngine; | |
using System.Collections; | |
[AddComponentMenu("Scripts/BGM/Seeker")] | |
public class Seeker : MonoBehaviour | |
{ | |
public float seekTime { | |
get { | |
return isSeeking ? (float)AudioSettings.dspTime - startTimeByDspTime : 0; | |
} |
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
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
[AddComponentMenu("Scripts/BGM/BGMManager")] | |
public class BGMManager : MonoBehaviour | |
{ | |
AudioSource audioSource; | |
public List<AudioClip> audioClips ; |