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
String[] fontList = PFont.list(); | |
PFont font; | |
String showText = "令和"; | |
String findFont(String fontPattern) { | |
for (int i = 0; i < fontList.length; i++) { | |
String[] match = match(fontList[i], fontPattern); | |
if (match != null) { | |
return match[0]; |
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 hexToBase64 = (hex: string) => | |
btoa( | |
String.fromCharCode( | |
...(hex.match(/[0-9a-f]{2}/gi) ?? []).map((c) => parseInt(c, 16)) | |
) | |
); | |
const base64ToHex = (base64: string) => | |
[...atob(base64)] | |
.map((c) => c.charCodeAt(0).toString(16).padStart(2, "0")) |
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
index | time(ms) | size | distance | d/s | log(d/s+1) | |
---|---|---|---|---|---|---|
1 | 785 | 317.6 | 521.12 | 1.6 | 1.4 | |
2 | 681 | 238.2 | 224.02 | 0.9 | 0.96 | |
3 | 786 | 158.8 | 419.91 | 2.6 | 1.87 | |
4 | 738 | 238.2 | 27.64 | 0.1 | 0.16 | |
5 | 939 | 158.8 | 675.64 | 4.3 | 2.39 | |
6 | 1271 | 238.2 | 711.44 | 3 | 2 | |
7 | 926 | 79.4 | 290.64 | 3.7 | 2.22 | |
8 | 927 | 79.4 | 366.9 | 4.6 | 2.49 | |
9 | 861 | 238.2 | 624.8 | 2.6 | 1.86 |
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
[ | |
{ | |
"time":785, | |
"size":317.6, | |
"distance":521.12 | |
}, | |
{ | |
"time":681, | |
"size":238.2, | |
"distance":224.02 |
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
import type { StorybookViteConfig } from '@storybook/builder-vite'; | |
import { mergeConfig } from 'vite'; | |
import viteConfig from '../vite.config'; | |
const config: StorybookViteConfig = { | |
core: { builder: '@storybook/builder-vite' }, | |
stories: ['../src/**/*.stories.@(ts|tsx)'], | |
addons: [ | |
'@storybook/addon-links', | |
'@storybook/addon-essentials', |
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
{ | |
console.log("array\n") | |
const array: string[] = []; | |
array[100] = "100"; | |
array[110] = "110"; | |
array[105] = "105"; | |
console.log( | |
array.map((v) => { |
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
echo '{"scripts": {"chan":"echo んちゃんんちゃんにしたろ"}}' > package.json |
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 FieldArrayItem = <TFieldArrayName extends FieldArrayPath<FormValue>>({ | |
name, | |
children, | |
}: { | |
name: TFieldArrayName; | |
children: ( | |
methods: UseFieldArrayReturn<FormValue, TFieldArrayName> | |
) => React.ReactNode[]; | |
}) => { |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Document</title> | |
<style> | |
* { | |
box-sizing: border-box; |