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
module EOSSDK { | |
umbrella "Headers" | |
export * | |
module * { export * } | |
} |
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 QuartzCore | |
import EOSSDK | |
var platformHandle: EOS_HPlatform? = nil | |
var displayLink: CVDisplayLink? = nil | |
func logFunc(message: Optional<UnsafePointer<_tagEOS_LogMessage>>) { | |
message?.withMemoryRebound(to: EOS_LogMessage.self, capacity: 100) { | |
let str = String(cString: $0.pointee.Message, encoding: .ascii) | |
Swift.print(str ?? "") |
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
#CMAKE file for build | |
project (SimpleFramework) | |
cmake_minimum_required(VERSION 2.6) | |
if(NOT CMAKE_BUILD_TYPE) | |
set(CMAKE_BUILD_TYPE Release) #default type is release | |
endif() |
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
// Comparing performance to filter items of an array. | |
// I want to convert array data, but I don't want to include some of the data. | |
const N = 50000; | |
const data = []; | |
for(let i=0; i<N; i++) { | |
data.push(i); | |
} |
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 | |
set -e | |
# Disable chruby | |
trap - DEBUG || true | |
# Workaround old docker images with incorrect $HOME | |
# check https://github.com/docker/docker/issues/2968 for details | |
if [ "${HOME}" = "/" ] | |
then |
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 Foundation | |
let json = """ | |
{ | |
"a": 1, | |
"b": 2, | |
"c": 3 | |
} | |
""".data(using: .utf8)! |
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 Foundation | |
// framework側のコード | |
let ExtensionKey = CodingUserInfoKey(rawValue: "extensionKey")! | |
struct Group: Codable { | |
let users: [User] | |
} |
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 Foundation | |
let json = """ | |
{ | |
"user_id": 1, | |
"user_name": "magicien", | |
"friends": [ | |
{ | |
"user_id": 2, | |
"is_best_friend": true |
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 Foundation | |
let json = """ | |
[ | |
{ "name": "magicien" }, | |
{ }, | |
{ "name": "NoName" } | |
] | |
""".data(using: .utf8)! |
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 Foundation | |
let json = """ | |
{ | |
"user_id": 1, | |
"user_name": "magicien", | |
"friends": [ | |
{ | |
"user_id": 2, | |
"is_best_friend": true |