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
| using UnityEngine; | |
| using System.Collections; | |
| using System.Runtime.InteropServices; | |
| public class VideoPicker : MonoBehaviour { | |
| public Texture2D shareButtonImage; // Use this for initialization | |
| [DllImport("__Internal")] | |
| private static extern void OpenVideoPicker(string game_object_name, string function_name); |
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
| // context: m_width, m_height of m_texture (MTLTexture), m_path (NSString) location of the image | |
| // assumptions: loading RGBA8 image from main bundle | |
| NSString *const path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:m_path]; | |
| UIImage *const image = [UIImage imageWithContentsOfFile:path]; | |
| const NSUInteger bitsPerComponent = 8; | |
| const NSUInteger bytesPerRow = ((bitsPerComponent * 4 / 8) * m_width); | |
| const CGBitmapInfo bitmapInfo = CGBitmapInfo(kCGImageAlphaPremultipliedLast); |
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
| typedef enum : NSUInteger { | |
| MTLPixelFormatInvalid = 0, | |
| /* Ordinary 8 bit formats */ | |
| MTLPixelFormatA8Unorm = 1, | |
| MTLPixelFormatR8Unorm = 10, | |
| MTLPixelFormatR8Unorm_sRGB = 11, | |
| MTLPixelFormatR8Snorm = 12, | |
| MTLPixelFormatR8Uint = 13, | |
| MTLPixelFormatR8Sint = 14, |
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
| // 最初にこの関数を実行し、ログに出力されたURLにアクセスしてOAuth認証する | |
| function twitterAuthorizeUrl() { | |
| Twitter.oauth.showUrl(); | |
| } | |
| // OAuth認証成功後のコールバック関数 | |
| function twitterAuthorizeCallback(request) { | |
| return Twitter.oauth.callback(request); | |
| } |
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
| #!/bin/env python | |
| import numpy as np | |
| import scipy.misc | |
| from scipy.fftpack import dct, idct | |
| import sys | |
| H = 128 | |
| W = 128 | |
| lenna = scipy.misc.imresize(scipy.misc.lena(), (H, W)).astype(float) |
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
| //人物インデックスフレームデータを_bodyDataにコピー | |
| bodyIndexFrame.CopyFrameDataToArray(_bodyData); | |
| //depthframeからカラースペースに | |
| kinect.CoordinateMapper.MapDepthFrameToColorSpace(_depthData, _colorPoints); | |
| for (int depthIndex=0; depthIndex < length; depthIndex++){ | |
| byte player = _bodyData[depthIndex]; | |
| //もし人物の領域ならば | |
| if (player != 0xff){ | |
| ColorSpacePoint colorPoint = _colorPoints[depthIndex]; | |
| //整数に変換している |
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
| var gulp = require('gulp'); | |
| var sourcemaps = require('gulp-sourcemaps'); | |
| var source = require('vinyl-source-stream'); | |
| var buffer = require('vinyl-buffer'); | |
| var browserify = require('browserify'); | |
| var watchify = require('watchify'); | |
| var babel = require('babelify'); | |
| function compile(watch) { | |
| var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel)); |
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
| { | |
| "version":2.0, | |
| "display_hints":[ | |
| { | |
| "key":"GPCAMERA_GROUP_VIDEO", | |
| "display_name":"Video Settings", | |
| "settings":[ | |
| { | |
| "setting_id":5, | |
| "widget_type":"select", |
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
| 'use strict'; | |
| module.exports = function CustomError(message, extra) { | |
| Error.captureStackTrace(this, this.constructor); | |
| this.name = this.constructor.name; | |
| this.message = message; | |
| this.extra = extra; | |
| }; | |
| require('util').inherits(module.exports, Error); |
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 android.app.Activity; | |
| import android.content.Context; | |
| import android.hardware.display.DisplayManager; | |
| import android.os.Bundle; | |
| import android.view.Display; | |
| /** | |
| * A base activity for watch faces that have callbacks for the various screen states (dim, awake, and off) | |
| * as well as a callback for when the watch face is removed. | |
| * <p/> |