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
| /** | |
| * TS Helper Functions | |
| */ | |
| type ConvertTo<Type, From, To> = { | |
| [Key in keyof Type]: Required<Type>[Key] extends From ? To : Type[Key]; | |
| }; | |
| type FilterByType<T, U> = { | |
| [Key in keyof Required<T>]: Required<T>[Key] extends U ? Key : never; | |
| }[keyof T]; |
There are some key values that the time.Parse is looking for.
By changing:
test, err := time.Parse("10/15/1983", "10/15/1983")to
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
| Seven different types of CSS attribute selectors | |
| // This attribute exists on the element | |
| [value] | |
| // This attribute has a specific value of cool | |
| [value='cool'] | |
| // This attribute value contains the word cool somewhere in it | |
| [value*='cool'] |
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
| console.table( | |
| $x('ancestor-or-self::*', $0).reverse().map(el => { | |
| const computedStyle = el.ownerDocument.defaultView.getComputedStyle(el); | |
| return { element: el, 'z-index': computedStyle.zIndex, position: computedStyle.position }; | |
| }) | |
| ); |
A compile-time 4-Bit Virtual Machine implemented in TypeScript's type system. Capable of running a sample 'FizzBuzz' program.
Syntax emits zero JavaScript.
type RESULT = VM<
[
["push", N_1], // 1
["push", False], // 2
["peek", _], // 3
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
| // works great on about:dino | |
| // 1. save this file to your snippets. | |
| // 2. load about:dino | |
| // 3. evaluate the snippet | |
| // 4. hit up arrow to trigger the game. | |
| // 5. profit | |
| (function() { | |
| perfnow = performance.now; |
Данный FAQ был специально создан для телеграм сообщества https://t.me/WebAssembly_ru.
Он базируется на статье от Andre Weissflog, но так же содержит множество моих дополнений и мыслей, которые могут быть уже не слишком актуальны на момент прочтения. Прошу это учитывать.