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
/* | |
* BorrowMap: (possibly) zero-copy mutable data structure in a react context | |
* ========================================================================= | |
* | |
* The idea behind this concept is that we can have a mutable container in a | |
* React-linked store but ONLY IF we never share a reference to the mutable | |
* container itself. All the reads must be contained inside selectors. As long | |
* as no one has a second reference to the mutable container, then we are sure | |
* that no one is able to read/write it without us knowing. | |
* |
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
$ dig +trace lolawho.com refactor-agnostic-button-props | |
; <<>> DiG 9.20.4 <<>> +trace lolawho.com | |
;; global options: +cmd | |
. 241826 IN NS a.root-servers.net. | |
. 241826 IN NS b.root-servers.net. | |
. 241826 IN NS c.root-servers.net. | |
. 241826 IN NS d.root-servers.net. | |
. 241826 IN NS e.root-servers.net. | |
. 241826 IN NS f.root-servers.net. |
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 focusedVirtualCellSelector = createSelectorMemoizedV8( | |
gridRenderContextSelector, | |
gridFocusCellSelector, | |
currentRowsSelector, | |
visibleColumnsSelector, | |
(currentRenderContext, focusedCell, currentRows, visibleColumns) => { | |
if (!focusedCell) { |
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
function wrapSx(Component) { | |
const newComponent = (props) => { | |
const { sx, ...rest } = props | |
rest.className = useSx(sx) | |
return Component(rest) | |
} | |
newComponent.displayName = Component.displayName ?? Component.name | |
return newComponent |
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 { | |
Box, | |
Paper, | |
Container, | |
} from '@mui/material' | |
import sx from '@mui/system/styleFunctionSx' | |
function Row() { | |
return ( | |
<div> |
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 WAIT_DURATION = 2 | |
function Slow() { | |
const start = Date.now() | |
while ((Date.now() - start) < WAIT_DURATION) {} | |
return ( | |
<span>slow</span> | |
) | |
} |
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
4375 Noah Lemen (2%) [META] | |
7122 Jack Pope (3%) [META] | |
14077 Jan Kassens (6%) [META] | |
15291 Sebastian Silbermann (7%) [VERCEL] | |
24125 Rick Hanlon (10%) [META] | |
25050 Ruslan Lesiutin (11%) [META] | |
25240 Andrew Clark (11%) [VERCEL] | |
41302 Josh Story (18%) [VERCEL] | |
58361 Sebastian Markbåge (25%) [VERCEL] |
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
packages/x-data-grid-pro/src/hooks/features/columnReorder/useGridColumnReorder.tsx: (theme.direction === 'rtl' | |
packages/x-data-grid-pro/src/hooks/features/columnReorder/useGridColumnReorder.tsx: (theme.direction === 'rtl' | |
packages/x-data-grid-pro/src/hooks/features/columnReorder/useGridColumnReorder.tsx: [apiRef, logger, theme.direction], | |
packages/x-data-grid-pro/src/components/GridColumnMenuPinningItem.tsx: if (theme.direction === 'rtl') { | |
packages/x-data-grid-premium/src/components/GridGroupingColumnFooterCell.tsx: `calc(var(--DataGrid-cellOffsetMultiplier) * ${theme.spacing(props.rowNode.depth)})`; | |
packages/x-data-grid-pro/src/components/GridDetailPanel.tsx: backgroundColor: (theme.vars || theme).palette.background.default, | |
packages/x-data-grid-premium/src/components/GridAggregationHeader.tsx: fontSize: theme.typography.caption.fontSize, | |
packages/x-data-grid-premium/src/components/GridAggregationHeader.tsx: lineHeight: theme.typography.caption.fontSize, | |
packages/x-data-gri |
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
f0VMRgIBAQAAAAAAAAAAAAIA8wABAAAAABAQAAAAAABAAAAAAAAAAJgxAAAAAAAAAAAAAEAAOAAE | |
AEAACAAGAAEAAAAEAAAAABAAAAAAAAAAABAAAAAAAAAAEAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQ | |
AAAAAAAAAQAAAAcAAAAAIAAAAAAAAAAQEAAAAAAAABAQAAAAAAB0AAAAAAAAAHQAAAAAAAAAABAA | |
AAAAAABR5XRkBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | |
AAAAAAMAAHAEAAAAByEAAAAAAAAAAAAAAAAAAAAAAAAAAAAALwAAAAAAAAAvAAAAAAAAAAEAAAAA | |
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | |
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | |
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | |
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | |
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
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 encoder = new TextEncoder() | |
// bufferLength must be a multiple of 4 to satisfy Int32Array constraints | |
let bufferLength = 2 * 1024 | |
let buffer = new ArrayBuffer(bufferLength) | |
let uint8View = new Uint8Array(buffer) | |
let int32View = new Int32Array(buffer) | |
export function murmur2(str) { | |
if (str.length > bufferLength) { |
NewerOlder