React Fiber is an ongoing reimplementation of React's core algorithm. It is the culmination of over two years of research by the React team.
This file contains 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 org.springframework.aot.hint.MemberCategory; | |
import org.springframework.aot.hint.RuntimeHints; | |
import org.springframework.aot.hint.RuntimeHintsRegistrar; | |
import org.springframework.aot.hint.TypeReference; | |
import java.util.List; | |
public class WebJarsHints implements RuntimeHintsRegistrar { | |
@Override | |
public void registerHints(RuntimeHints hints, ClassLoader classLoader) { |
📂 Persistent "pipes" in Linux
In a project I'm working on I ran into the requirement of having some sort of persistent FIFO buffer or pipe in Linux, i.e. something file-like that could accept writes from a process and persist it to disk until a second process reads (and acknowledges) it. The persistence should be both across process restarts as well as OS restarts.
AFAICT unfortunately in the Linux world such a primitive does not exist (named pipes/FIFOs do not persist
This file contains 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
#! /bin/bash | |
# from http://dtmilano.blogspot.com/2012/03/selecting-adb-device.html | |
# selects an android device | |
PROGNAME=$(basename $0) | |
UNAME=$(uname) | |
DEVICE_OPT= | |
for opt in "$@" | |
do | |
case "$opt" in |
(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.
This file contains 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 java.io.IOException; | |
/** | |
* Class that copies stdin to stdout, as compained about as not being cleanly | |
* writable in Java on Hacker News. | |
* In real code, you would just write IOUtils.copy(System.in, System.out), | |
* which does basically the same thing. | |
* This does not catch any exceptions as a) this is just an "exercise" and | |
* b) all we could do with them is pretty-print them. So let the runtime | |
* print them for you. |
This file contains 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
/* false, 0, undefined, null, NaN, "" are false */ | |
> Boolean(false) | |
false | |
> Boolean(0) | |
false | |
> Boolean("") | |
false | |
> Boolean(undefined) | |
false |
This file contains 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
# Utilities for quickly accessing frequently used directories in bash. | |
# Usage: | |
# $ cd /path/to/project/src/ | |
# $ mark code # Will create a new shortcut. | |
# # Becomes interactive if a shortcut already exists | |
# # m is an alias for mark. You can also `m code` | |
# | |
# $ code # From now on, running this anywhere in the shell | |
# # will put you in /path/to/project/src/code |
This file contains 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
package com.zeroturnaround.rebellabs; | |
import org.springframework.context.ResourceLoaderAware; | |
import org.springframework.context.support.AbstractMessageSource; | |
import org.springframework.core.io.DefaultResourceLoader; | |
import org.springframework.core.io.Resource; | |
import org.springframework.core.io.ResourceLoader; | |
import org.springframework.core.io.support.ResourcePatternResolver; | |
import org.springframework.util.Assert; | |
import org.springframework.util.DefaultPropertiesPersister; |
NewerOlder