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 System.Collections.Generic; | |
using UnityEngine; | |
namespace Shaninja.Scripts { | |
public interface IInventory | |
{ | |
void AddCoin(); | |
void SetTotalCoins(int total); | |
void Reset(); |
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 System.Collections.Generic; | |
using NUnit.Framework; | |
using UnityEngine; | |
public class TestMaps | |
{ | |
[Test] | |
public void CyclicDependency() | |
{ | |
var machine = new FakeMachine<FakeStates, IFakeState>(); |
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
@objc(User) | |
final class User: NSObject, NSCoding { | |
let userId: Int | |
var email: String? | |
let name: String | |
var recentGames: [Int]? | |
/// nscoding keys | |
private static let ID_KEY = "id" |
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
pathadd() { | |
new_path=$1 | |
if [[ -z "$TMUX" ]]; then | |
if [[ -d "$new_path" ]]; then | |
if [[ $PATH =~ $new_path ]]; then | |
#echo -e "pathadd: not adding $new_path to \$PATH". | |
else | |
export -U PATH=$new_path:$PATH | |
fi | |
fi |
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
// MARK: - AVCaptureVideoDataOutputSampleBufferDelegate extension {{{ | |
extension CtsVideoCallView: AVCaptureVideoDataOutputSampleBufferDelegate { | |
func captureOutput(_ captureOutput: AVCaptureOutput!, | |
didOutputSampleBuffer sampleBuffer: CMSampleBuffer!, | |
from: AVCaptureConnection!) { | |
// get image size for preview and resize preview view accordingly | |
let pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer) | |
let attachmentMode = CMAttachmentMode(kCMAttachmentMode_ShouldPropagate) | |
let attachments = CMCopyDictionaryOfAttachments(kCFAllocatorDefault, sampleBuffer, attachmentMode) | |
let ciImage:CIImage = CIImage(cvPixelBuffer: pixelBuffer!, options: attachments as! [String : Any]?) |
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
var videoSources: [CtsVideoSource] { | |
var sources = [CtsVideoSource]() | |
for lv in left { | |
// for each left video | |
if let source = lv.videoSource { | |
sources.append(source) | |
} | |
} | |
for rv in right { |
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
// MARK: - AVCaptureVideoDataOutputSampleBufferDelegate extension {{{ | |
extension CtsVideoCallView: AVCaptureVideoDataOutputSampleBufferDelegate { | |
func captureOutput(_ captureOutput: AVCaptureOutput!, | |
didOutputSampleBuffer sampleBuffer: CMSampleBuffer!, | |
from: AVCaptureConnection!) { | |
// get image size for preview and resize preview view accordingly | |
let imageBuffer = CMSampleBufferGetImageBuffer(sampleBuffer) | |
let attachments = CMCopyDictionaryOfAttachments(kCFAllocatorDefault, | |
sampleBuffer, kCMAttachmentMode_ShouldPropagate) as! Dictionary | |
let ciImage = CIImage(cvPixelBuffer: imageBuffer, options: attachments) |
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
// | |
// Created by Gregory McQuillan on 12/23/16. | |
// Copyright (c) 2016 One Big Function. All rights reserved. | |
// | |
import WebRTC | |
import Foundation | |
class ARDSDPUtils { | |
/** |
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
/* | |
* Copyright 2015 The WebRTC Project Authors. All rights reserved. | |
* | |
* Use of this source code is governed by a BSD-style license | |
* that can be found in the LICENSE file in the root of the source | |
* tree. An additional intellectual property rights grant can be found | |
* in the file PATENTS. All contributing project authors may | |
* be found in the AUTHORS file in the root of the source tree. | |
*/ |
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
/** | |
* Promise style method | |
*/ | |
- (void)animateUi | |
{ | |
const CGFloat valDestStatsBottom = self.conStatsBottomSpacing.constant; | |
const CGFloat valDestLeftArrowTrailing = self.conLeftArrowTrailing.constant; | |
const CGFloat valDestRightArrowLeading = self.conRightArrowLeading.constant; |
NewerOlder