Source references:
- https://github.com/sh-tiye/lexicon-fractional-index
- License: Listed as MIT on crates.io, but readme says "License: TODO".
| import React, {useRef, useEffect, useState, ReactNode, useMemo} from 'react'; | |
| import * as THREE from 'three'; | |
| import {toCanvas} from 'html-to-image'; | |
| import {createRoot, Root} from 'react-dom/client'; | |
| import {flushSync} from "react-dom"; | |
| interface HTMLInVRProps { | |
| children: ReactNode; | |
| width?: number; | |
| height?: number; |
Source references:
| use futures::Future; | |
| pub trait AsyncFn_Args0<OutputType>: Fn() -> Self::Future { | |
| type Future: Future<Output = OutputType>; | |
| } | |
| impl<OutputType, F, Fut> AsyncFn_Args0<OutputType> for F | |
| where F: Fn() -> Fut, Fut: Future<Output = OutputType> { | |
| type Future = Fut; | |
| } |
| use std::unstable::intrinsics::{TyDesc, get_tydesc, forget}; | |
| use std::util::Void; | |
| use std::cast::transmute; | |
| /////////////////////////////////////////////////////////////////////////////// | |
| // TypeId | |
| /////////////////////////////////////////////////////////////////////////////// | |
| /// `TypeId` represents a globally unique identifier for a type | |
| pub struct TypeId { |
| use std::{sync::{Mutex, Arc}, ops::{Deref, DerefMut}}; | |
| use tokio::sync::{RwLock, RwLockReadGuard, RwLockWriteGuard}; | |
| /// Wrapper around RwLock, which: | |
| /// 1) Requires that anyone who takes a lock-guard must supply their "name". | |
| /// 2) Provides a way for anyone to get a list of "current lock-guard holders". (without having to take a lock-guard themselves) | |
| pub struct RwLock_Tracked<T> { | |
| l: RwLock<T>, | |
| live_guards: Arc<Mutex<Vec<String>>>, | |
| } |
| # (C) Copyright 2020 Hewlett Packard Enterprise Development LP | |
| def ToLPath(path): | |
| return path.replace("\\", "/").replace("C:/", "/mnt/c/") | |
| def ToWPath(path): | |
| return path.replace("/", "\\").replace("\\mnt\\c\\", "C:\\") | |
| def ListDir(path, recursive = False): | |
| result = [] | |
| for file in listdir(ToWPath(path), recursive): |
| const videoPlayer = netflix | |
| .appContext | |
| .state | |
| .playerApp | |
| .getAPI() | |
| .videoPlayer; | |
| // Getting player id | |
| const videoPlayer = videoPlayer | |
| .getAllPlayerSessionIds()[0] |
| import {Characteristic, Peripheral, Service} from "@abandonware/noble"; | |
| export class ControllerData { | |
| accel: number[]; | |
| gyro: number[]; | |
| magX: number; | |
| magY: number; | |
| magZ: number; |
| // Note: I'm not updating this anymore. For the latest version, see here: https://stackoverflow.com/a/60271550/2441655 | |
| val patterns = arrayOf( | |
| "!WLALALALALALALALA;", // default | |
| "!WTRG0TRG0TRG0TRG;", // pulse | |
| "!WPJ0FPV7S1J600;" // sos | |
| // you can add your own patterns by mixing and matching the vibration components | |
| ); | |
| // strength is between 0 and 100; pattern follows the format seen above |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"/> | |
| <title>Test1</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
| <script src="./suite.js"></script> | |
| </head> | |
| <body> | |
| <h1>Open the console to view the results</h1> |