This content moved here: https://exploringjs.com/impatient-js/ch_arrays.html#quickref-arrays
| import { ApolloServer, gql } from 'apollo-server-micro'; | |
| const typeDefs = gql` | |
| type Query { | |
| sayHello: String | |
| } | |
| `; | |
| const resolvers = { | |
| Query: { |
| // I'm suggesting we add a new "adopt X from <Y />" syntax to the JSX language | |
| // it would de-sugar to render prop children, but look and read better than | |
| // what we currently have. For example: | |
| // 1. | |
| // this sugar | |
| function MyComponent(props) { | |
| adopt foo from <Bar />; | |
| return <div>{foo}</div>; | |
| } |
| RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
| RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
| RN >= 0.63 - watchman watch-del-all && rm -rf node_modules && npm install && rm -rf /tmp/metro-* && npm run start --reset-cache | |
| npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache | |
| Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title><%= htmlWebpackPlugin.options.title %></title> | |
| </head> | |
| <body> | |
| <input id="float"/> | |
| </body> | |
| </html> |
A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.
| html { | |
| /* Adjust font size */ | |
| font-size: 100%; | |
| -webkit-text-size-adjust: 100%; | |
| /* Font varient */ | |
| font-variant-ligatures: none; | |
| -webkit-font-variant-ligatures: none; | |
| /* Smoothing */ | |
| text-rendering: optimizeLegibility; | |
| -moz-osx-font-smoothing: grayscale; |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
| Commit type | Emoji |
|---|---|
| Initial commit | 🎉 :tada: |
| Version tag | 🔖 :bookmark: |
| New feature | ✨ :sparkles: |
| Bugfix | 🐛 :bug: |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft,elem.offsetTop,elem.offsetWidth,elem.offsetHeight,elem.offsetParent
| #!/bin/sh | |
| matches=$(git diff --cached | grep -E '\+.*?FIXME') | |
| if [ "$matches" != "" ] | |
| then | |
| echo "'FIXME' tag is detected." | |
| echo "Please fix it before committing." | |
| echo " ${matches}" | |
| exit 1 |