Inspiration
- Gatsby
- Sketch
https://www.smashingmagazine.com/2017/08/create-sketch-plugin-front-end-technologies/
- Codemirror
- VS Code
- Insomnia
extension CameraViewController : UIViewControllerRepresentable{ | |
public typealias UIViewControllerType = CameraViewController | |
public func makeUIViewController(context: UIViewControllerRepresentableContext<CameraViewController>) -> CameraViewController { | |
return CameraViewController() | |
} | |
public func updateUIViewController(_ uiViewController: CameraViewController, context: UIViewControllerRepresentableContext<CameraViewController>) { | |
} | |
} |
Inspiration
https://www.smashingmagazine.com/2017/08/create-sketch-plugin-front-end-technologies/
cmake_minimum_required(VERSION 3.0 FATAL_ERROR) | |
project(cpp_shim) | |
set(CMAKE_PREFIX_PATH ../libtorch) | |
find_package(Torch REQUIRED) | |
find_package(OpenCV REQUIRED) | |
add_executable(testing main.cpp) | |
message(STATUS "OpenCV library status:") | |
message(STATUS " config: ${OpenCV_DIR}") |
/* global chrome, MediaRecorder, FileReader */ | |
chrome.runtime.onConnect.addListener(port => { | |
let recorder = null | |
port.onMessage.addListener(msg => { | |
console.log(msg); | |
switch (msg.type) { | |
case 'REC_STOP': | |
console.log('Stopping recording') | |
if (!port.recorderPlaying || !recorder) { |
{ | |
"BTTPresetName" : "podkovyr-btt-preset", | |
"BTTPresetUUID" : "4DA9BBE8-9392-4B6C-A22B-AAF8189CE7C1", | |
"BTTPresetContent" : [ | |
{ | |
"BTTAppBundleIdentifier" : "BT.G", | |
"BTTAppName" : "Global", | |
"BTTAppSpecificSettings" : { | |
}, |
-- show running queries (pre 9.2) | |
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(query_start, clock_timestamp()), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
Converting an SVG animation to a video with the MediaRecorder API and a hidden canvas.
Drawing frames from img
elements can introduce an extra delay, so this version generates all the frames upfront and then renders them in a loop with requestAnimationFrame()
.
See also: Canvas animation to video
// Retrieve results | |
guard let outputFeatures = featureProvider.featureValue(for: selectedModel.outputLayerName)?.multiArrayValue else { | |
fatalError("Couldn't retrieve features") | |
} | |
// Calculate total buffer size by multiplying shape tensor's dimensions | |
let bufferSize = outputFeatures.shape.lazy.map { $0.intValue }.reduce(1, { $0 * $1 }) | |
// Get data pointer to the buffer | |
let dataPointer = UnsafeMutableBufferPointer(start: outputFeatures.dataPointer.assumingMemoryBound(to: Double.self), |
<!-- https://codepen.io/fatlinesofcode/pen/yXVGPp --> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<style> | |
body { | |
background-color: #ffffff; | |
margin: 0; | |
overflow: hidden; |