Skip to content

Instantly share code, notes, and snippets.

package main
import (
"log"
"fmt"
"time"
"net/url"
"encoding/json"
static readonly Dictionary<ushort, char> characterMapEnglish = new Dictionary<ushort, char>()
{
{ 0x0001, ' ' },
{ 0x0002, '!' },
{ 0x0003, '"' },
{ 0x0004, '#' },
{ 0x0005, '$' },
{ 0x0006, '%' },
{ 0x0007, '&' },
{ 0x0008, '\'' },
@MstrVLT
MstrVLT / d3.js
Created October 9, 2024 21:41
d3.js vue composable
export function useD3Scales(el, sample, width, height) {
const yScale = computed(() => {
return d3.scaleLinear()
.range([toValue(height) - 2 * 60, 0])
.domain([0, 100]);
})
const xScale = computed(() => {
return d3.scaleBand()
.range([0, toValue(width) - 2 * 60])
@MstrVLT
MstrVLT / App.vue
Last active October 16, 2024 08:46
d3 transition + vue
<script setup>
import { useTemplateRef } from 'vue';
import SelectionJoin from './components/SelectionJoin.vue';
const SelectionJoinRef = useTemplateRef('el');
const update = () =>
SelectionJoinRef && SelectionJoinRef.value.update();
</script>
@MstrVLT
MstrVLT / draggable-svg-icons-inside-changing-container.markdown
Created December 28, 2024 00:26
Draggable SVG Icons inside changing container
@MstrVLT
MstrVLT / add.go
Created February 28, 2025 20:26
Go (GOOS=js GOARCH=wasm) + Vite
package main
//go:wasmexport add
func add(a int32, b int32) int32 {
return a + b
}
func main() {}
@MstrVLT
MstrVLT / draggable-svg-icons-inside-changing-container.markdown
Created March 4, 2025 09:50
Draggable SVG Icons inside changing container