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
'use client' | |
import { wrapStreamInMediaRecorder } from '@/lib/client/video' | |
import { Button } from '@/ui/Molecule/Button' | |
import { useCallback, useEffect, useRef, useState } from 'react' | |
export default function Interviewer() { | |
const [recording, setRecording] = useState(false) | |
function start() { |
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
private func imageFrom(url: URL?, data: Data, response: HTTPURLResponse? = nil) -> AnyPublisher<UIImage?, Error> { | |
let type = response?.mimeType | |
if type?.hasPrefix("image/svg") == true || url?.pathExtension.lowercased() == "svg" { | |
return svgFrom(data: data) | |
} | |
return Just(UIImage(data: data)).setFailureType(to: Error.self).eraseToAnyPublisher() | |
} | |
private func svgFrom(data: Data) -> AnyPublisher<UIImage?, Error> { |
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 | |
import SwiftUI | |
import CoreLocation | |
let jan = Calendar.current.date(from: DateComponents(year: 2021, month: 1, day: 1, hour: 2, minute: 0))! | |
let styles: [DateFormatter.Style] = [ | |
.none, | |
.short, | |
.medium, |
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
<<<<<<< HEAD | |
if let titleView: UIView = titleViewFromNavBarImagePath(navBarImagePath: navBarImagePath) { | |
titleView.contentMode = .scaleAspectFit | |
let container = UIView(frame: CGRect(x: 0, y: 0, width: 32, height: 32)) | |
titleView.frame = CGRect(x: 0, y: 0, width: 32, height: 32) | |
container.addSubview(titleView) | |
self.navigationItem.titleView = container | |
} | |
else { | |
self.navigationItem.titleView = nil |
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
func testDeleteFolder() { | |
attempt { | |
let session = Session.nas | |
var response: JSONObject? | |
stub(session, "delete-folder") { expectation in | |
try! Folder.deleteFolder(session, folderID: "10396915") | |
.startWithCompletedExpectation(expectation) { value in | |
response = value | |
} |
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
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { | |
var cell: UITableViewCell? | |
cell = tableView.dequeueReusableCellWithIdentifier(UITableViewCell.wta_reuseableIdentifier()) | |
if cell == nil { | |
cell = UITableViewCell(style: .Value1, reuseIdentifier: UITableViewCell.wta_reuseableIdentifier()) | |
} | |
if let result = viewModel?.results.value[indexPath.row] { |
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
ai::Agent::Action * Chan::Program(const ai::Agent::Percept * percept) | |
{ | |
ai::CCheckers::Action *action = new ai::CCheckers::Action; | |
ai::CCheckers::MoveData move; | |
std::string board_str = percept->GetAtom("BASIC_BOARD").GetValue(); | |
ai::CCheckers::BasicBoard board(board_str); | |
int player = atoi(percept->GetAtom("PLAYER_NUMBER").GetValue().c_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
// | |
// UIImage+Blurs.swift | |
// | |
// Created by Nate Armstrong on 12/2/15. | |
// Copyright © 2015 Nate Armstrong. All rights reserved. | |
// | |
// | |
// Compression uses RBResizer: https://gist.github.com/hcatlin/180e81cd961573e3c54d | |
import Foundation |
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
DISPLAY=192.168.0.2:0 # replace `192.168.0.2` with the host machine's local ip |
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
// | |
// MyViewController.swift | |
// | |
// Created by Nate Armstrong on 4/15/15. | |
// Copyright (c) 2015 Nate Armstrong. All rights reserved. | |
// | |
import UIKit | |
import CoreData |
NewerOlder