Consider a list of strings you need to permanently assign a random color.
First you should turn the string into a hash.
var string = "string"
var hash = 0
"use client"; | |
import { | |
type ColumnDef, | |
flexRender, | |
getCoreRowModel, | |
useReactTable, | |
getPaginationRowModel, | |
getSortedRowModel, | |
getFilteredRowModel, |
(function (__wpcc) { | |
"use strict"; | |
__wpcc.f = __wpcc.f || {}; | |
__wpcc.f.scope = {}; | |
__wpcc.f.createTemplateTagFirstArg = function (a) { | |
return (a.raw = a); | |
}; | |
__wpcc.f.createTemplateTagFirstArgWithRaw = function (a, b) { | |
a.raw = b; | |
return a; |
// from http://scratch99.com/web-development/javascript/convert-bytes-to-mb-kb/ | |
function bytesToSize(bytes) { | |
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; | |
if (bytes == 0) return 'n/a'; | |
var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024))); | |
if (i == 0) return bytes + ' ' + sizes[i]; | |
return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i]; | |
}; | |
const getBase64StringSizeInbites = string => { |
"use strict";var kaplay=(()=>{var bn=Object.defineProperty;var Ha=Object.getOwnPropertyDescriptor;var qa=Object.getOwnPropertyNames;var za=Object.prototype.hasOwnProperty;var i=(t,e)=>bn(t,"name",{value:e,configurable:!0});var Ya=(t,e)=>{for(var n in e)bn(t,n,{get:e[n],enumerable:!0})},Wa=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of qa(e))!za.call(t,o)&&o!==n&&bn(t,o,{get:()=>e[o],enumerable:!(r=Ha(e,o))||r.enumerable});return t};var $a=t=>Wa(bn({},"__esModule",{value:!0}),t);var ao=(()=>{for(var t=new Uint8Array(128),e=0;e<64;e++)t[e<26?e+65:e<52?e+71:e<62?e-4:e*4-205]=e;return n=>{for(var r=n.length,o=new Uint8Array((r-(n[r-1]=="=")-(n[r-2]=="="))*3/4|0),s=0,a=0;s<r;){var l=t[n.charCodeAt(s++)],u=t[n.charCodeAt(s++)],m=t[n.charCodeAt(s++)],c=t[n.charCodeAt(s++)];o[a++]=l<<2|u>>4,o[a++]=u<<4|m>>2,o[a++]=m<<6|c}return o}})();var Yu={};Ya(Yu,{default:()=>zu});var H=class t{static{i(this,"Color")}r=255;g=255;b=255;constructor(e,n,r){this.r=Be(e,0,255),this.g=Be(n,0,255),this.b=Be(r,0, |
HoloISO is more straightforward to install and is being actively worked on.
This is an unofficial short guide on running Steam Decks new UI on Manjaro. I am kind of a linux noob, so forgive me if I get a few things wrong in this guide. Also, I have not fully tested everything so there may be some weird issues that I have overlooked.
http://meier-geinitz.de/sane/gt68xx-backend/ | |
BearPaw 2400 CU Plus | |
Install simple-scan and sane | |
copy these two files to /usr/share/sane/gt68xx | |
scan :) | |
IMAGE_SRC = './img/8.jpg' | |
const loadImage = () => { | |
const img = new Image() | |
img.src = IMAGE_SRC | |
const canvas = document.querySelector('canvas') | |
const ctx = canvas.getContext('2d') | |
img.addEventListener('load', () => { |
const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height); | |
const pixels = imageData.data; | |
for (let i = 3, n = canvas.width * canvas.height * 4; i < n; i += 4) { | |
pixels[i] = pixels[i] < 127? 0 : 255 | |
} | |
ctx.putImageData(imageData, 0, 0); |
#!/bin/sh | |
# thunar file custom action /home/fox/INSTALL/combinePdfs.sh %F | |
# %F is full path to all selected files | |
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile="${1%.pdf}-combined.pdf" "$@" | |
notify-send "created ${1%.pdf}-combined.pdf file" |