One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
// Rename files with a sequence number leading | |
ls |% { $i=0 }{ $i++; Rename-Item -NewName ('{0:2d}_{1}.png' -f $i,$_.basename) } | |
// List file name with size in MBs | |
ls |% { '{0,16} = {1} MB' -f $_.name, [math]::round($_.length/1mb) } |
// https://www.baeldung.com/jackson-deserialize-immutable-objects | |
// https://stackoverflow.com/questions/49999492/immutable-lombok-annotated-class-with-jackson/50030088 | |
@Builder(builderClassName = "ValueObjectBuilder") | |
@JsonDeserialize(builder = ValueObject.ValueObjectBuilder.class) | |
@Value | |
@EqualsAndHashCode(of = {...}) | |
public class ValueObject { | |
@JsonPOJOBuilder(withPrefix = "") |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
// Constructing | |
// We now have the completed internal state machine, but we have yet to expose either a method of resolving the promise or of observing it. Lets start by adding a way of resolving the promise. | |
var PENDING = 0; | |
var FULFILLED = 1; | |
var REJECTED = 2; | |
function Promise(fn) { | |
// store state which can be PENDING, FULFILLED or REJECTED | |
var state = PENDING; |
package cn.kinco.test; | |
import org.junit.Test; | |
import java.nio.ByteBuffer; | |
import java.util.Arrays; | |
/** | |
* @author neo.pan | |
* @since 2019-07-16 |
public abstract class EdpMongoUtil { | |
/** | |
* @param objectId ObjectId of MongoDB | |
* @return time of java.time.Instant | |
*/ | |
public static Instant timeFromObjectId(String objectId) { | |
return Instant.ofEpochMilli(Integer.parseInt(objectId.substring(0, 8), 16) * 1000); | |
} |
This procedure is tested on Mac OS X 10.12.5 with Developpers tools installed (xCode).
PHP 7.1 installed with Homebrew.
Download the following files from Oracle website (yes, you need to create an account and accept terms):
To setup your computer to work with *.dev domains, e.g. project.dev, awesome.dev and so on, without having to add to your hosts file each time.