- Created: 2024-07-28
Node.jsのTypeScriptサポートに関する議論を時系列でまとめたものです。
Node.jsのTypeScriptサポートに関する議論を時系列でまとめたものです。
The screenshots were taken on different sessions.
The entire sessions are included on the screenshots.
I lost the original prompts, so I had to reconstruct them, and still managed to reproduce.
The "compressed" version is actually longer! Emojis and abbreviations use more tokens than common words.
2022年12月2日
ChatGPTという対話するAIツールがあります。人間が質問を投げかけるとそれらしく対話して回答してくれるツールです。こういうツールに対してどんな質問を投げかけたらおもしろい対話になるでしょうかね。何かアイディアがあったら聞かせてください。具体的な質問を知りたいなあ。
# Follow instructions under "Old Builds" here: https://www.chromium.org/getting-involved/download-chromium | |
# Add the version number in the variable below and run the step before needed | |
# "-1" may not show in the actual version number | |
steps: | |
- run: | | |
VERSION_STRING="88.0.4324.96-1" | |
wget "https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${VERSION_STRING}_amd64.deb" | |
sudo dpkg -i "google-chrome-stable_${VERSION_STRING}_amd64.deb" |
2020-05-13 追記
const Document = require('./document') | |
const fs = require('fs') | |
const TOKEN_DIR = './tokens' | |
const DOC_DIR = './docs' | |
const DOC_DATA = './docs.json' | |
const docFiles = fs.readdirSync(DOC_DIR).filter(fileName => fileName.match(/.+\.txt$/)) | |
const docs = {} |
import { useRef, useEffect } from 'react'; | |
/** | |
* a type-safe version of the `usePrevious` hook described here: | |
* @see {@link https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state} | |
*/ | |
export function usePrevious<T>( | |
value: T, | |
): ReturnType<typeof useRef<T>>['current'] { | |
const ref = useRef<T>(); |
//Class | |
class InputWithFocus extends React.Component { | |
constructor() { | |
super(); | |
this.inputRef = null; | |
} | |
render() { | |
return <div> | |
<input ref={inputRef => { this.inputRef = inputRef }} /> | |
<button onClick={() => this.inputRef.focus()}> |
//Class | |
componentWillReceiveProps(nextProps) { | |
if (nextProps.count !== this.props.count) { | |
console.log('count changed', nextProps.count); | |
} | |
} | |
//Hooks | |
//Printing 1st iteration: | |
useEffect(() => { |
// EmailInput wraps an HTML `input` and adds some app-specific styling. | |
const EmailInput = React.forwardRef((props, ref) => ( | |
<input ref={ref} {...props} type="email" className="AppEmailInput" /> | |
)); | |
class App extends Component { | |
emailRef = React.createRef(); | |
render() { | |
return ( |