Consider a list of strings you need to permanently assign a random color.
First you should turn the string into a hash.
var string = "string"
var hash = 0| import java.lang.reflect.Method; | |
| import java.util.Arrays; | |
| public class Bytecodes { | |
| static { | |
| System.loadLibrary("bytecodes"); | |
| } | |
| private static native byte[] getBytecodes(Method method); |
| _hashCode java/lang/Object.hashCode()I | |
| _getClass java/lang/Object.getClass()Ljava/lang/Class; | |
| _clone java/lang/Object.clone()Ljava/lang/Object; | |
| _dabs java/lang/Math.abs(D)D | |
| _dsin java/lang/Math.sin(D)D | |
| _dcos java/lang/Math.cos(D)D | |
| _dtan java/lang/Math.tan(D)D | |
| _datan2 java/lang/Math.atan2(DD)D | |
| _dsqrt java/lang/Math.sqrt(D)D | |
| _dlog java/lang/Math.log(D)D |
To 'clone' a container, you'll have to make an image of that container first, you can do so by "committing" the container. Docker will (by default) pause all processes running in the container during commit to preserve data-consistency.
For example;
docker commit --message="Snapshot of my container" my_container my_container_snapshot:yymmdd
| package wsapp; | |
| import org.apache.catalina.websocket.MessageInbound; | |
| import org.apache.catalina.websocket.WsOutbound; | |
| import java.io.IOException; | |
| import java.nio.ByteBuffer; | |
| import java.nio.CharBuffer; | |
| /** |
| // The MIT License (MIT) | |
| // | |
| // Copyright (c) 2015 Nandor Kracser | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights | |
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| // copies of the Software, and to permit persons to whom the Software is | |
| // furnished to do so, subject to the following conditions: |
| Table of names of MemoryManagerMXBean and MemoryPoolMXBean instances under | |
| different GC algorithms in Oracle HotSpot VM. Memory managers list the pools | |
| they manage in square brackets; memory pools show their maximum sizes for -Xmx200M setting. | |
| $ java -version | |
| java version "1.6.0_24" | |
| Java(TM) SE Runtime Environment (build 1.6.0_24-b07) | |
| Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode) | |
| SerialGC: |
| public class Cons<A> implements IList<A> { | |
| /** | |
| * リストの先頭要素 | |
| */ | |
| private A x; | |
| /** | |
| * リストの残りの要素 | |
| */ | |
| private IList<A> xs; // 型変数を忘れないように! |