Skip to content

Instantly share code, notes, and snippets.

Avatar

Khoi Pham pckhoi

View GitHub Profile
@pckhoi
pckhoi / canvas.js
Created Jul 15, 2020
Khoi's code samples
View canvas.js
// This is a React component that render sheet-like table using canvas in my latest project.
// Only visible rows and columns would be renderred. This solution give blazing fast performance
// and minimal memory footprint.
import React, { useRef, useEffect, useMemo } from "react";
import _ from "lodash";
import { renderGrid } from "./grid";
import { getRenderableContentCols, renderContentCells } from "./rows-content";
import { renderPKCells } from "./primary-key-columns";
View A Tour of Go - Exercise: Web Crawler
package main
import (
"fmt"
"sync"
)
type Fetcher interface {
// Fetch returns the body of URL and
// a slice of URLs found on that page.
You can’t perform that action at this time.