(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// REFERENCE UNICODE TABLES: | |
// http://www.rikai.com/library/kanjitables/kanji_codes.unicode.shtml | |
// http://www.tamasoft.co.jp/en/general-info/unicode.html | |
// | |
// TEST EDITOR: | |
// http://www.gethifi.com/tools/regex | |
// | |
// UNICODE RANGE : DESCRIPTION | |
// | |
// 3000-303F : punctuation |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
https://developers.google.com/web/fundamentals/performance/critical-rendering-path/?hl=en
function setUserAgent(window, userAgent) { | |
// Works on Firefox, Chrome, Opera and IE9+ | |
if (navigator.__defineGetter__) { | |
navigator.__defineGetter__('userAgent', function () { | |
return userAgent; | |
}); | |
} else if (Object.defineProperty) { | |
Object.defineProperty(navigator, 'userAgent', { | |
get: function () { | |
return userAgent; |
System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go
directory by:
tl;dr I built a demo illustrating what it might look like to add async rendering to Facebook's commenting interface, while ensuring it appears on the screen simultaneous to the server-rendered story.
A key benefit of async rendering is that large updates don't block the main thread; instead, the work is spread out and performed during idle periods using cooperative scheduling.
But once you make something async, you introduce the possibility that things may appear on the screen at separate times. Especially when you're dealing with multiple UI frameworks, as is often the case at Facebook.
How do we solve this with React?
Latest revision: 2021-12-05.
Tested on Ubuntu 18.04 Docker container. The Dockerfile is a single line FROM ubuntu:18.04
. Alternatively, you can simply run docker run -it ubuntu:18.04 bash
.
NOTE: stopping services didn't work for me for some reason. That's why there is kill $(pidof <service name>)
after each failed service <service name> stop
to kill it.
import React, { Component } from "react"; | |
import { render } from "react-dom"; | |
import "./index.css"; | |
class Widget extends Component { | |
state = { text: "" }; | |
handleChange = (e) => { | |
this.setState({ text: e.target.value }); | |
}; | |
render() { |
// index.js | |
const path = require('path'); | |
const Queue = require('bull'); | |
let queue = new Queue('test queue', 'redis://192.168.99.100:6379'); | |
queue.process(1, path.join(__dirname, './processor.js')) | |
queue.on('completed', function(job, result) { | |
console.log("Completed: " + job.id + ", result = " + JSON.stringify(result)); |