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
| import * as React from 'react'; | |
| import { flushSync } from 'react-dom'; | |
| import { | |
| Button, | |
| Container, | |
| Checkbox, | |
| Switch, | |
| Box, | |
| Paper, | |
| TextField, |
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
| import b from 'benny'; | |
| import { input, theme } from './data' | |
| function slowMatch(objects: typeof input) { | |
| const variants = theme.variants | |
| const result = [] | |
| for (let i = 0; i < objects.length; i++) { | |
| const props = objects[i] as any |
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
| impl eframe::App for MyApp { | |
| fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { | |
| if self.captures.is_none() { | |
| self.captures = Some(take_screenshot()); | |
| } | |
| egui::CentralPanel::default().show(ctx, |ui| { | |
| egui::ScrollArea::both().show(ui, |ui| { | |
| if let Some(captures) = &self.captures { | |
| captures.iter().for_each(|capture| { |
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
| import * as React from 'react'; | |
| import { flushSync } from 'react-dom'; | |
| import { | |
| Button, | |
| Container, | |
| Checkbox, | |
| Switch, | |
| Box, | |
| Paper, | |
| TextField, |
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
| import * as React from 'react'; | |
| import { flushSync } from 'react-dom'; | |
| import { | |
| Button, | |
| Container, | |
| Checkbox, | |
| Switch, | |
| Box, | |
| Paper, | |
| TextField, |
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
| import * as React from 'react'; | |
| import { ThemeProvider, createTheme } from '@mui/material/styles'; | |
| import CssBaseline from '@mui/material/CssBaseline'; | |
| const darkTheme = createTheme({ | |
| palette: { | |
| mode: 'dark', | |
| background: { | |
| default: '#262626', | |
| } |
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
| const fs = require('fs'); | |
| const axios = require('axios'); | |
| const jsdom = require('jsdom'); | |
| const { JSDOM } = jsdom; | |
| const TABLE_SELECTOR = 'table.table-auto' | |
| const LINK_NEXT_SELECTOR = 'a[rel="next"]' | |
| let page = 1 | |
| let data = [] |
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
| function reduce(array, callback, initial) { | |
| let accumulator = initial | |
| for (let i = 0; i < array.length; i++) { | |
| let currentValue = array[i] | |
| accumulator = callback(accumulator, currentValue) | |
| } | |
| return accumulator | |
| } |
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
| COLORS = [ | |
| '#3366CC' | |
| , '#DC3912' | |
| , '#FF9900' | |
| , '#109618' | |
| , '#990099' | |
| , '#575acb' | |
| , '#ebdb0c' | |
| , '#ed2467' | |
| , '#66AA00' |
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
| V8 | |
| { | |
| 'react:equal:monomorphic': { average: 1206.33, stddev: 59.63406930792349 }, | |
| 'react:unequal:monomorphic': { average: 1198.67, stddev: 41.51572660517404 }, | |
| 'hughsk/shallow-equals:equal:monomorphic': { average: 595.33, stddev: 33.47967874530592 }, | |
| 'hughsk/shallow-equals:unequal:monomorphic': { average: 559.33, stddev: 1.699673171197595 }, | |
| 'romgrk-fastCompareUnsafe:equal:monomorphic': { average: 510.33, stddev: 1.247219128924647 }, | |
| 'romgrk-fastCompareUnsafe:unequal:monomorphic': { average: 447.67, stddev: 2.0548046676563256 }, | |
| 'romgrk-fastCompareStrict:equal:monomorphic': { average: 881.33, stddev: 1.699673171197595 }, | |
| 'romgrk-fastCompareStrict:unequal:monomorphic': { average: 775.33, stddev: 0.9428090415820634 }, |