For example, to override the AppBar (https://material-ui-next.com/api/app-bar/) root class we can do the following:
1 - Add the property classes in the AppBar component:
<AppBar classes={{root: 'my-root-class'}}
For example, to override the AppBar (https://material-ui-next.com/api/app-bar/) root class we can do the following:
1 - Add the property classes in the AppBar component:
<AppBar classes={{root: 'my-root-class'}}
Preferences | Appearance | Tabs | Theme > Dark
dstr > ttf
, install all font files by double clicking)Preferences | Profiles | Text
Font
to 14pt Fira code regular
and Check Use Ligatures
checkboxNon ASCII Font
to 14pt Fira mono
and Check Use Ligatures
checkboxPreferences | Profiles | Color Presets > Snazzy
/** | |
* server/dataSources/Auth.js | |
* Auth implementation, it's not really a dataSource so it doesn't need to be here | |
*/ | |
const { authenticate, createJwt } = require('../lib/passport'); | |
const { ON_HTTPS } = require('../configs'); | |
const ONE_MINUTE = 1000 * 60; | |
const ONE_DAY = ONE_MINUTE * 60 * 24; | |
const ONE_MONTH = ONE_DAY * 30; |
import { useState } from 'react'; | |
export function useCounter(initial = 0) { | |
const [count, setCount] = useState(initial); | |
return [count, () => setCount(count + 1)]; | |
} |
import React from "react"; | |
// Usage | |
function App() { | |
const draw = React.useCallback(gl => { | |
gl.clearColor(0.0, 0.0, 0.0, 1.0); | |
gl.clearDepth(1.0); | |
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); | |
}, []); | |
const canvasRef = useCanvas(draw, "webgl2"); |
import React from 'react' | |
export const useIsMounted = () => { | |
const ref = React.useRef(false) | |
const [, setIsMounted] = React.useState(false) | |
React.useEffect(() => { | |
ref.current = true | |
setIsMounted(true) | |
return () => (ref.current = false) | |
}, []) |
import { useState, useEffect } from "react"; | |
import { useRouter } from "next/router"; | |
type IParam = string; | |
type IValue = string | string[] | number | number[] | null | undefined; | |
type IState = { [k: string]: IValue }; | |
type IQuery = IState; | |
type IRoute = string; | |
function isEmpty(value: IValue): boolean { |
/* eslint-disable no-unused-vars */ | |
/* eslint-disable no-else-return */ | |
// JSX constructor, similar to createElement() | |
export const h = (type, props, ...children) => { | |
return { | |
type, | |
// Props will be an object for components and DOM nodes, but a string for | |
// text nodes | |
props, |
I always gripe about Python not having useful (i.e. performant and with adoption) built-in array type and Numpy doesn't distinguish "vector of vector" from "matrix", but this still surprised me.
It seems that Numpy uses intersect
logic to check a in b
:
// Install vercel cli | |
// npm i -g vercel | |
// log into vercel cli then run this file | |
const { exec } = require("child_process"); | |
exec("vercel project ls", (error, stdout, stderr) => { | |
if (error) { | |
console.log(`error: ${error.message}`); | |
return; |