This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Infusion Todo List With Assignees</title> | |
<script src="../../dist/FluidInfusion.js"></script> | |
<fluid-url-base id="todoUrlBase" src="./"></fluid-url-base> | |
<!-- definitions for base app --> |
This file contains hidden or 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
/** | |
* Creates a single source effect that listens to changes in a computed signal and invokes a callback | |
* with the old and new values whenever the computed signal changes. | |
* | |
* @param {Computed} aComputed - The computed signal to observe. | |
* @param {Function} fn - A callback function with the signature (oldValue, newValue). | |
* @return {Effect} The created effect. | |
*/ | |
fluid.singleSourceEffect = function (aComputed, fn) { | |
let oldValue = aComputed.value; // Initialize with the current value of the computed signal. |
This file contains hidden or 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
// Many thanks to Hugo Daniel https://hugodaniel.com/pages/boredom/ for inspiration for this concept | |
fluid.selfBootQuery = fluid.liveQuery("*[fl-layers]"); | |
fluid.selfBootEffect = effect( () => { | |
const elements = fluid.selfBootQuery.value; | |
elements.forEach(element => { | |
const existing = fluid.viewContainerRegistry.get(element); | |
if (!existing) { | |
const layers = element.getAttribute("fl-layers"); | |
const instance = fluid.viewComponent({ |
This file contains hidden or 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
library(stringr) | |
library(dplyr) | |
library(HDInterval) | |
library(brms) | |
source("scripts/utils.R") | |
recordfiles <- c("A_formosa_detections_distances_to_first_records.csv", | |
"C_attenuata_detections_distances_to_first_records.csv", |
This file contains hidden or 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
fluid.effect = function (func, ...args) { | |
return effect( () => { | |
let undefinedSignals = false; | |
const designalArgs = []; | |
for (const arg of args) { | |
if (arg instanceof preactSignalsCore.Signal) { | |
const value = arg.value; | |
designalArgs.push(arg.value); | |
if (value === undefined) { | |
undefinedSignals = true; |
This file contains hidden or 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 2017-2023 Antranig Basman | |
Licensed under the Educational Community License (ECL), Version 2.0 or the New | |
BSD license. You may not use this file except in compliance with one these | |
Licenses. | |
You may obtain a copy of the ECL 2.0 License and BSD License at | |
https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt | |
*/ | |
/* global Papa, maplibregl, HashTable, preactSignalsCore */ |
This file contains hidden or 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
/* eslint-env node */ | |
"use strict"; | |
const linkedom = require("linkedom"); | |
const arrow = ` | |
<div class="long-down-arrow"> | |
<svg width="16" height="111"> | |
<use href="#downarrow" /> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 strict"; | |
const testDOMSpeed = function (its) { | |
const array = []; | |
for (let i = 0; i < its; ++i) { | |
const element = document.createElement("div"); | |
array.push(element); | |
} | |
return array; | |
}; |
This file contains hidden or 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
Program: | |
"use strict"; | |
const testDOMSpeed = function (its) { | |
const array = []; | |
for (let i = 0; i < its; ++i) { | |
const element = document.createElement("div"); | |
element.setAttribute("t1", "" + i); | |
element.setAttribute("t2", "" + i); |
NewerOlder