// Create Lazy Component
const LazyComponent = React.lazy(() => import('./SomeOtherComponent'));
ReactDOM.hydrate(
<React.unstable_Suspense fallback="loading">
<LazyComponent />
</React.unstable_Suspense>
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
FROM nginx:alpine AS builder | |
# nginx:alpine contains NGINX_VERSION environment variable, like so: | |
# ENV NGINX_VERSION 1.15.0 | |
# Our NCHAN version | |
ENV NCHAN_VERSION 1.1.15 | |
# Download sources | |
RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \ |
Moved to Shopify/graphql-design-tutorial
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
import numpy as np | |
import random | |
import math | |
import cv2 | |
from PIL import Image | |
def recognize(im): | |
# 輪郭線抽出のための二値化 | |
im_gray = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY) | |
im_blur = cv2.GaussianBlur(im_gray, (3, 3), 0) |
All libraries have subtle rules that you have to follow for them to work well. Often these are implied and undocumented rules that you have to learn as you go. This is an attempt to document the rules of React renders. Ideally a type system could enforce it.
A number of methods in React are assumed to be "pure".
On classes that's the constructor, getDerivedStateFromProps, shouldComponentUpdate and render.
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
/* | |
* DataGrip extension to export results to markdown. | |
* The markdown table format is supported by Github and Jira. I haven't tested others. | |
* | |
* Tested on DataGrip 2016.2.2 | |
* - Open the File view. View -> Tool Windows -> Files | |
* - Activate the "Scratches" tab. You should see "Files", "Scopes", and "Scratches". | |
* - Copy this file to Extensions/Database Tools and SQL/data/extractors/Markdown.JavaScript.md.js | |
* - Run a query with some results. | |
* - Change the export format to Markdown.JavaScript.md.js and click "To Clipboard". |
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
variables: | |
REVIEW_DEPLOY_DIR: "/var/www/wildcard.example.com/$CI_PROJECT_NAME-$CI_BUILD_REF_SLUG" | |
# コピー元フォルダ(カスタマイズ可能) | |
SRC_PUBLIC_DIR: "htdocs" | |
# コピー先フォルダ(カスタマイズ不可) | |
DST_PUBLIC_DIR: "htdocs" | |
# HTTP認証ユーザー(カスタマイズ可能) | |
HTTP_USER: "user" | |
# HTTP認証パスワード(カスタマイズ可能) | |
HTTP_PASSWORD: "pass" |
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
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
7 | |
2 | |
1 | |
0 | |
4 | |
1 | |
4 | |
9 | |
5 | |
9 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.