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 std::fmt::Debug; | |
/// # Partial Result | |
/// | |
/// Result type for operations which can fail, but still return some data | |
/// | |
/// Conceptionally, this is a (D, Option<E>) | |
/// | |
/// The design of this type is intended to force handling of errors, but also | |
/// grant access to partial results in case of errors |
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
Copper Plate, 1024 | |
Aluminium Plate, 1024 |
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
function automate(selector, interval) { | |
let id; | |
let on = () => { | |
if (id) { | |
console.log(selector + " already automated") | |
return; | |
} | |
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
// old version | |
customElements.define("monaco-editor", class extends HTMLElement { | |
constructor() { | |
super(); | |
this._editorValue = "loading..." | |
} | |
set _editorValue(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
let DirEntry = | |
React.FunctionComponent.Of | |
((fun name -> | |
let hidden = Hooks.useState false | |
let img = | |
img [ Src <| Utils.getStatic "icons/directory.svg" ] | |
let mutable className = "directory" | |
if hidden.current then className <- className + " hidden" |
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 Makie | |
using AbstractPlotting | |
scene = Scene() | |
scene = mesh(Sphere(Point3f0(0), 0.9f0), transparency=true, alpha=0.05) | |
function cosine_weighted_sample_hemisphere() | |
r1 = rand() |
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
vec3 sundir; | |
vec3 I_R, I_M; | |
vec2 totalDepthRM; | |
// consts | |
const vec3 rayScatterCoeff = vec3(58e-7, 135e-7, 331e-7); | |
const vec3 rayEffectiveCoeff = rayScatterCoeff; // Rayleight doesn't absorb light | |
const vec3 mieScatterCoeff = vec3(2e-5); |
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
Constant buffer: | |
[6, 20, 20, 12, 0, 2, 0] | |
Variable Slots: | |
{} | |
Instruction block: | |
main |
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
const path = require('path'); | |
const MiniCssExtractPlugin = require("mini-css-extract-plugin"); | |
const main = { | |
entry: ['./source/main.js', './assets/styles/main.scss'], | |
output: { | |
filename: "main.js", | |
path: path.resolve(__dirname, "dist") | |
}, | |
resolve: { |
NewerOlder