public class StateMachine
extends java.lang.Object
The state machine defined here is a hierarchical state machine which processes messages and can have states arranged hierarchically.
A state is a State
object and must implement
processMessage
and optionally enter/exit/getName
.
The enter/exit methods are equivalent to the construction and destruction
in Object Oriented programming and are used to perform initialization and
cleanup of the state respectively. The getName
method returns the
name of the state the default implementation returns the class name it may be
desirable to have this return the name of the state instance name instead.
In particular if a particular state class has multiple instances.
When a state machine is created addState
is used to build the
hierarchy and setInitialState
is used to identify which of these
is the initial state. After construction the programmer calls start
which initializes and starts the state machine. The first action the StateMachine
is to the invoke enter
for all of the initial state's hierarchy,
starting at its eldest parent. The calls to enter will be done in the context
of the StateMachines Handler not in the context of the call to start and they
will be invoked before any messages are processed. For example, given the simple
state machine below mP1.enter will be invoked and then mS1.enter. Finally,
messages sent to the state machine will be processed by the current state,
in our simple state machine below that would initially be mS1.processMessage.
mP1 / \ mS2 mS1 ----> initial state
After the state machine is created and started, messages are sent to a state
machine using sendMessage
and the messages are created using
obtainMessage
. When the state machine receives a message the
current state's processMessage
is invoked. In the above example
mS1.processMessage will be invoked first. The state may use transitionTo
to change the current state to a new state
Each state in the state machine may have a zero or one parent states and if
a child state is unable to handle a message it may have the message processed
by its parent by returning false or NOT_HANDLED. If a message is never processed
unhandledMessage
will be invoked to give one last chance for the state machine
to process the message.
When all processing is completed a state machine may choose to call
transitionToHaltingState
. When the current processingMessage
returns the state machine will transfer to an internal HaltingState
and invoke halting
. Any message subsequently received by the state
machine will cause haltedProcessMessage
to be invoked.
If it is desirable to completely stop the state machine call quit
or
quitNow
. These will call exit
of the current state and its parents,
call onQuiting
and then exit Thread/Loopers.
In addition to processMessage
each State
has
an enter
method and exit method which may be overridden.
Since the states are arranged in a hierarchy transitioning to a new state causes current states to be exited and new states to be entered. To determine the list of states to be entered/exited the common parent closest to the current state is found. We then exit from the current state and its parent's up to but not including the common parent state and then enter all of the new states below the common parent down to the destination state. If there is no common parent all states are exited and then the new states are entered.
Two other methods that states can use are deferMessage
and
sendMessageAtFrontOfQueue
. The sendMessageAtFrontOfQueue
sends
a message but places it on the front of the queue rather than the back. The
deferMessage
causes the message to be saved on a list until a
transition is made to a new state. At which time all of the deferred messages
will be put on the front of the state machine queue with the oldest message
at the front. These will then be processed by the new current state before
any other messages that are on the queue or might be added later. Both of
these are protected and may only be invoked from within a state machine.
To illustrate some of these properties we'll use state machine with an 8 state hierarchy:
mP0 / \ mP1 mS0 / \ mS2 mS1 / \ \ mS3 mS4 mS5 ---> initial state
After starting mS5 the list of active states is mP0, mP1, mS1 and mS5. So the order of calling processMessage when a message is received is mS5, mS1, mP1, mP0 assuming each processMessage indicates it can't handle this message by returning false or NOT_HANDLED.
Now assume mS5.processMessage receives a message it can handle, and during the handling determines the machine should change states. It could call transitionTo(mS4) and return true or HANDLED. Immediately after returning from processMessage the state machine runtime will find the common parent, which is mP1. It will then call mS5.exit, mS1.exit, mS2.enter and then mS4.enter. The new list of active states is mP0, mP1, mS2 and mS4. So when the next message is received mS4.processMessage will be invoked.
Now for some concrete examples, here is the canonical HelloWorld as a state machine. It responds with "Hello World" being printed to the log for every message.
class HelloWorld extends StateMachine {
HelloWorld(String name) {
super(name);
addState(mState1);
setInitialState(mState1);
}
public static HelloWorld makeHelloWorld() {
HelloWorld hw = new HelloWorld("hw");
hw.start();
return hw;
}
class State1 extends State {
@Override public boolean processMessage(Message message) {
log("Hello World");
return HANDLED;
}
}
State1 mState1 = new State1();
}
void testHelloWorld() {
HelloWorld hw = makeHelloWorld();
hw.sendMessage(hw.obtainMessage());
}
A more interesting state machine is one with four states with two independent parent states.
mP1 mP2
/ \
mS2 mS1
Here is a description of this state machine using pseudo code.
state mP1 {
enter { log("mP1.enter"); }
exit { log("mP1.exit"); }
on msg {
CMD_2 {
send(CMD_3);
defer(msg);
transitonTo(mS2);
return HANDLED;
}
return NOT_HANDLED;
}
}
INITIAL
state mS1 parent mP1 {
enter { log("mS1.enter"); }
exit { log("mS1.exit"); }
on msg {
CMD_1 {
transitionTo(mS1);
return HANDLED;
}
return NOT_HANDLED;
}
}
state mS2 parent mP1 {
enter { log("mS2.enter"); }
exit { log("mS2.exit"); }
on msg {
CMD_2 {
send(CMD_4);
return HANDLED;
}
CMD_3 {
defer(msg);
transitionTo(mP2);
return HANDLED;
}
return NOT_HANDLED;
}
}
state mP2 {
enter {
log("mP2.enter");
send(CMD_5);
}
exit { log("mP2.exit"); }
on msg {
CMD_3, CMD_4 { return HANDLED; }
CMD_5 {
transitionTo(HaltingState);
return HANDLED;
}
return NOT_HANDLED;
}
}
The implementation is below and also in StateMachineTest:
class Hsm1 extends StateMachine {
public static final int CMD_1 = 1;
public static final int CMD_2 = 2;
public static final int CMD_3 = 3;
public static final int CMD_4 = 4;
public static final int CMD_5 = 5;
public static Hsm1 makeHsm1() {
log("makeHsm1 E");
Hsm1 sm = new Hsm1("hsm1");
sm.start();
log("makeHsm1 X");
return sm;
}
Hsm1(String name) {
super(name);
log("ctor E");
// Add states, use indentation to show hierarchy
addState(mP1);
addState(mS1, mP1);
addState(mS2, mP1);
addState(mP2);
// Set the initial state
setInitialState(mS1);
log("ctor X");
}
class P1 extends State {
@Override public void enter() {
log("mP1.enter");
}
@Override public boolean processMessage(Message message) {
boolean retVal;
log("mP1.processMessage what=" + message.what);
switch(message.what) {
case CMD_2:
// CMD_2 will arrive in mS2 before CMD_3
sendMessage(obtainMessage(CMD_3));
deferMessage(message);
transitionTo(mS2);
retVal = HANDLED;
break;
default:
// Any message we don't understand in this state invokes unhandledMessage
retVal = NOT_HANDLED;
break;
}
return retVal;
}
@Override public void exit() {
log("mP1.exit");
}
}
class S1 extends State {
@Override public void enter() {
log("mS1.enter");
}
@Override public boolean processMessage(Message message) {
log("S1.processMessage what=" + message.what);
if (message.what == CMD_1) {
// Transition to ourself to show that enter/exit is called
transitionTo(mS1);
return HANDLED;
} else {
// Let parent process all other messages
return NOT_HANDLED;
}
}
@Override public void exit() {
log("mS1.exit");
}
}
class S2 extends State {
@Override public void enter() {
log("mS2.enter");
}
@Override public boolean processMessage(Message message) {
boolean retVal;
log("mS2.processMessage what=" + message.what);
switch(message.what) {
case(CMD_2):
sendMessage(obtainMessage(CMD_4));
retVal = HANDLED;
break;
case(CMD_3):
deferMessage(message);
transitionTo(mP2);
retVal = HANDLED;
break;
default:
retVal = NOT_HANDLED;
break;
}
return retVal;
}
@Override public void exit() {
log("mS2.exit");
}
}
class P2 extends State {
@Override public void enter() {
log("mP2.enter");
sendMessage(obtainMessage(CMD_5));
}
@Override public boolean processMessage(Message message) {
log("P2.processMessage what=" + message.what);
switch(message.what) {
case(CMD_3):
break;
case(CMD_4):
break;
case(CMD_5):
transitionToHaltingState();
break;
}
return HANDLED;
}
@Override public void exit() {
log("mP2.exit");
}
}
@Override
void onHalting() {
log("halting");
synchronized (this) {
this.notifyAll();
}
}
P1 mP1 = new P1();
S1 mS1 = new S1();
S2 mS2 = new S2();
P2 mP2 = new P2();
}
If this is executed by sending two messages CMD_1 and CMD_2 (Note the synchronize is only needed because we use hsm.wait())
Hsm1 hsm = makeHsm1();
synchronize(hsm) {
hsm.sendMessage(obtainMessage(hsm.CMD_1));
hsm.sendMessage(obtainMessage(hsm.CMD_2));
try {
// wait for the messages to be handled
hsm.wait();
} catch (InterruptedException e) {
loge("exception while waiting " + e.getMessage());
}
}
The output is:
D/hsm1 ( 1999): makeHsm1 E D/hsm1 ( 1999): ctor E D/hsm1 ( 1999): ctor X D/hsm1 ( 1999): mP1.enter D/hsm1 ( 1999): mS1.enter D/hsm1 ( 1999): makeHsm1 X D/hsm1 ( 1999): mS1.processMessage what=1 D/hsm1 ( 1999): mS1.exit D/hsm1 ( 1999): mS1.enter D/hsm1 ( 1999): mS1.processMessage what=2 D/hsm1 ( 1999): mP1.processMessage what=2 D/hsm1 ( 1999): mS1.exit D/hsm1 ( 1999): mS2.enter D/hsm1 ( 1999): mS2.processMessage what=2 D/hsm1 ( 1999): mS2.processMessage what=3 D/hsm1 ( 1999): mS2.exit D/hsm1 ( 1999): mP1.exit D/hsm1 ( 1999): mP2.enter D/hsm1 ( 1999): mP2.processMessage what=3 D/hsm1 ( 1999): mP2.processMessage what=4 D/hsm1 ( 1999): mP2.processMessage what=5 D/hsm1 ( 1999): mP2.exit D/hsm1 ( 1999): halting
| Modifier and Type | Class and Description |
|---|---|
static class |
StateMachine.LogRec
StateMachine logging record.
|
| Modifier and Type | Field and Description |
|---|---|
static boolean |
HANDLED
Convenience constant that maybe returned by processMessage
to indicate the the message was processed and is not to be
processed by parent states
|
static boolean |
NOT_HANDLED
Convenience constant that maybe returned by processMessage
to indicate the the message was NOT processed and is to be
processed by parent states
|
| Modifier | Constructor and Description |
|---|---|
protected |
StateMachine(java.lang.String name)
Constructor creates a StateMachine with its own thread.
|
protected |
StateMachine(java.lang.String name,
android.os.Handler handler)
Constructor creates a StateMachine using the handler.
|
protected |
StateMachine(java.lang.String name,
android.os.Looper looper)
Constructor creates a StateMachine using the looper.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addLogRec(java.lang.String string)
Add the string to LogRecords.
|
protected void |
addState(State state)
Add a new state to the state machine, parent will be null
|
protected void |
addState(State state,
State parent)
Add a new state to the state machine
|
java.util.Collection<StateMachine.LogRec> |
copyLogRecs() |
protected void |
deferMessage(android.os.Message msg)
Defer this message until next state transition.
|
void |
dump(java.io.FileDescriptor fd,
java.io.PrintWriter pw,
java.lang.String[] args)
Dump the current state.
|
protected android.os.Message |
getCurrentMessage() |
protected IState |
getCurrentState() |
android.os.Handler |
getHandler() |
StateMachine.LogRec |
getLogRec(int index) |
int |
getLogRecCount() |
int |
getLogRecSize() |
protected java.lang.String |
getLogRecString(android.os.Message msg)
Return a string to be logged by LogRec, default
is an empty string.
|
java.lang.String |
getName() |
protected java.lang.String |
getWhatToString(int what) |
protected void |
haltedProcessMessage(android.os.Message msg)
Called for any message that is received after
transitionToHalting is called.
|
boolean |
isDbg() |
protected boolean |
isQuit(android.os.Message msg)
|
protected void |
log(java.lang.String s)
Log with debug
|
protected void |
logAndAddLogRec(java.lang.String s)
Log with debug and add to the LogRecords.
|
protected void |
logd(java.lang.String s)
Log with debug attribute
|
protected void |
loge(java.lang.String s)
Log with error attribute
|
protected void |
loge(java.lang.String s,
java.lang.Throwable e)
Log with error attribute
|
protected void |
logi(java.lang.String s)
Log with info attribute
|
protected void |
logv(java.lang.String s)
Log with verbose attribute
|
protected void |
logw(java.lang.String s)
Log with warning attribute
|
android.os.Message |
obtainMessage()
Get a message and set Message.target state machine handler.
|
android.os.Message |
obtainMessage(int what)
Get a message and set Message.target state machine handler, what.
|
android.os.Message |
obtainMessage(int what,
int arg1)
Get a message and set Message.target state machine handler,
what, arg1 and arg2
Note: The handler can be null if the state machine has quit,
which means target will be null and may cause a AndroidRuntimeException
in MessageQueue#enqueMessage if sent directly or if sent using
StateMachine#sendMessage the message will just be ignored.
|
android.os.Message |
obtainMessage(int what,
int arg1,
int arg2)
Get a message and set Message.target state machine handler,
what, arg1 and arg2
Note: The handler can be null if the state machine has quit,
which means target will be null and may cause a AndroidRuntimeException
in MessageQueue#enqueMessage if sent directly or if sent using
StateMachine#sendMessage the message will just be ignored.
|
android.os.Message |
obtainMessage(int what,
int arg1,
int arg2,
java.lang.Object obj)
Get a message and set Message.target state machine handler,
what, arg1, arg2 and obj
Note: The handler can be null if the state machine has quit,
which means target will be null and may cause a AndroidRuntimeException
in MessageQueue#enqueMessage if sent directly or if sent using
StateMachine#sendMessage the message will just be ignored.
|
android.os.Message |
obtainMessage(int what,
java.lang.Object obj)
Get a message and set Message.target state machine handler,
what and obj.
|
protected void |
onHalting()
This will be called once after handling a message that called
transitionToHalting.
|
protected void |
onQuitting()
This will be called once after a quit message that was NOT handled by
the derived StateMachine.
|
protected void |
quit()
Quit the state machine after all currently queued up messages are processed.
|
protected void |
quitNow()
Quit the state machine immediately all currently queued messages will be discarded.
|
protected boolean |
recordLogRec(android.os.Message msg) |
protected void |
removeDeferredMessages(int what)
Removes a message from the deferred messages queue.
|
protected void |
removeMessages(int what)
Removes a message from the message queue.
|
void |
sendMessage(int what)
Enqueue a message to this state machine.
|
void |
sendMessage(int what,
int arg1)
Enqueue a message to this state machine.
|
void |
sendMessage(int what,
int arg1,
int arg2)
Enqueue a message to this state machine.
|
void |
sendMessage(int what,
int arg1,
int arg2,
java.lang.Object obj)
Enqueue a message to this state machine.
|
void |
sendMessage(int what,
java.lang.Object obj)
Enqueue a message to this state machine.
|
void |
sendMessage(android.os.Message msg)
Enqueue a message to this state machine.
|
protected void |
sendMessageAtFrontOfQueue(int what)
Enqueue a message to the front of the queue for this state machine.
|
protected void |
sendMessageAtFrontOfQueue(int what,
int arg1)
Enqueue a message to the front of the queue for this state machine.
|
protected void |
sendMessageAtFrontOfQueue(int what,
int arg1,
int arg2)
Enqueue a message to the front of the queue for this state machine.
|
protected void |
sendMessageAtFrontOfQueue(int what,
int arg1,
int arg2,
java.lang.Object obj)
Enqueue a message to the front of the queue for this state machine.
|
protected void |
sendMessageAtFrontOfQueue(int what,
java.lang.Object obj)
Enqueue a message to the front of the queue for this state machine.
|
protected void |
sendMessageAtFrontOfQueue(android.os.Message msg)
Enqueue a message to the front of the queue for this state machine.
|
void |
sendMessageDelayed(int what,
int arg1,
int arg2,
long delayMillis)
Enqueue a message to this state machine after a delay.
|
void |
sendMessageDelayed(int what,
int arg1,
int arg2,
java.lang.Object obj,
long delayMillis)
Enqueue a message to this state machine after a delay.
|
void |
sendMessageDelayed(int what,
int arg1,
long delayMillis)
Enqueue a message to this state machine after a delay.
|
void |
sendMessageDelayed(int what,
long delayMillis)
Enqueue a message to this state machine after a delay.
|
void |
sendMessageDelayed(int what,
java.lang.Object obj,
long delayMillis)
Enqueue a message to this state machine after a delay.
|
void |
sendMessageDelayed(android.os.Message msg,
long delayMillis)
Enqueue a message to this state machine after a delay.
|
void |
setDbg(boolean dbg)
Set debug enable/disabled.
|
protected void |
setInitialState(State initialState)
Set the initial state.
|
void |
setLogOnlyTransitions(boolean enable)
Set to log only messages that cause a state transition
|
void |
setLogRecSize(int maxSize)
Set number of log records to maintain and clears all current records.
|
void |
start()
Start the state machine.
|
java.lang.String |
toString() |
protected void |
transitionTo(IState destState)
transition to destination state.
|
protected void |
transitionToHaltingState()
transition to halt state.
|
protected void |
unhandledMessage(android.os.Message msg)
Called when message wasn't handled
|
public static final boolean HANDLED
public static final boolean NOT_HANDLED
protected StateMachine(java.lang.String name)
name
- of the state machineprotected StateMachine(java.lang.String name, android.os.Looper looper)
name
- of the state machineprotected StateMachine(java.lang.String name, android.os.Handler handler)
name
- of the state machineprotected final void addState(State state, State parent)
state
- the state to addparent
- the parent of stateprotected final void addState(State state)
state
- to addprotected final void setInitialState(State initialState)
initialState
- is the state which will receive the first message.protected final android.os.Message getCurrentMessage()
protected final IState getCurrentState()
protected final void transitionTo(IState destState)
destState
- will be the state that receives the next message.protected final void transitionToHaltingState()
protected final void deferMessage(android.os.Message msg)
msg
- is deferred until the next transition.protected void unhandledMessage(android.os.Message msg)
msg
- that couldn't be handled.protected void haltedProcessMessage(android.os.Message msg)
protected void onHalting()
haltedProcessMessage(Message)
protected void onQuitting()
public final java.lang.String getName()
public final void setLogRecSize(int maxSize)
maxSize
- number of messages to maintain at anyone time.public final void setLogOnlyTransitions(boolean enable)
enable
- true
to enable, false
to disablepublic final int getLogRecSize()
public final int getLogRecCount()
public final StateMachine.LogRec getLogRec(int index)
public final java.util.Collection<StateMachine.LogRec> copyLogRecs()
protected void addLogRec(java.lang.String string)
string
- protected boolean recordLogRec(android.os.Message msg)
protected java.lang.String getLogRecString(android.os.Message msg)
msg
- that was processedprotected java.lang.String getWhatToString(int what)
public final android.os.Handler getHandler()
public final android.os.Message obtainMessage()
public final android.os.Message obtainMessage(int what)
what
- is the assigned to Message.what.public final android.os.Message obtainMessage(int what, java.lang.Object obj)
what
- is the assigned to Message.what.obj
- is assigned to Message.obj.public final android.os.Message obtainMessage(int what, int arg1)
what
- is assigned to Message.whatarg1
- is assigned to Message.arg1public final android.os.Message obtainMessage(int what, int arg1, int arg2)
what
- is assigned to Message.whatarg1
- is assigned to Message.arg1arg2
- is assigned to Message.arg2public final android.os.Message obtainMessage(int what, int arg1, int arg2, java.lang.Object obj)
what
- is assigned to Message.whatarg1
- is assigned to Message.arg1arg2
- is assigned to Message.arg2obj
- is assigned to Message.objpublic final void sendMessage(int what)
public final void sendMessage(int what, java.lang.Object obj)
public final void sendMessage(int what, int arg1)
public final void sendMessage(int what, int arg1, int arg2)
public final void sendMessage(int what, int arg1, int arg2, java.lang.Object obj)
public final void sendMessage(android.os.Message msg)
public final void sendMessageDelayed(int what, long delayMillis)
public final void sendMessageDelayed(int what, java.lang.Object obj, long delayMillis)
public final void sendMessageDelayed(int what, int arg1, long delayMillis)
public final void sendMessageDelayed(int what, int arg1, int arg2, long delayMillis)
public final void sendMessageDelayed(int what, int arg1, int arg2, java.lang.Object obj, long delayMillis)
public final void sendMessageDelayed(android.os.Message msg, long delayMillis)
protected final void sendMessageAtFrontOfQueue(int what)
protected final void sendMessageAtFrontOfQueue(int what, java.lang.Object obj)
protected final void sendMessageAtFrontOfQueue(int what, int arg1)
protected final void sendMessageAtFrontOfQueue(int what, int arg1, int arg2)
protected final void sendMessageAtFrontOfQueue(int what, int arg1, int arg2, java.lang.Object obj)
protected final void sendMessageAtFrontOfQueue(android.os.Message msg)
protected final void removeMessages(int what)
protected final void removeDeferredMessages(int what)
protected final boolean isQuit(android.os.Message msg)
protected final void quit()
protected final void quitNow()
public boolean isDbg()
public void setDbg(boolean dbg)
dbg
- is true to enable debugging.public void start()
public void dump(java.io.FileDescriptor fd, java.io.PrintWriter pw, java.lang.String[] args)
fd
- pw
- args
- public java.lang.String toString()
toString
in class java.lang.Object
protected void logAndAddLogRec(java.lang.String s)
s
- is string logprotected void log(java.lang.String s)
s
- is string logprotected void logd(java.lang.String s)
s
- is string logprotected void logv(java.lang.String s)
s
- is string logprotected void logi(java.lang.String s)
s
- is string logprotected void logw(java.lang.String s)
s
- is string logprotected void loge(java.lang.String s)
s
- is string logprotected void loge(java.lang.String s, java.lang.Throwable e)
s
- is string loge
- is a Throwable which logs additional information.


The Acer Nitro 5 gaming laptop is here to notch-up your gaming experience with its exhilarating audio and NVIDIA GeForce GTX 1050 graphics processor. It also knows that you may prolong your gaming sessions, and therefore gives you the complete freedom to be in control of the system's crucial functions with the help of Acer NitroSense Technology.
View Official SiteReign over the game world with the combined power and performance of a 9th Gen Intel® Core™ i7 processor1 and NVIDIA® GeForce® GTX 1660 Ti1, which includes the powerful graphics capabilities of the award-winning Turing architecture, or Configure your laptop for maximum speed and massive storage with two slots for M.2 PCIe SSDs.
When heavy use requires an added boost, chill out with twin fans, Acer CoolBoost™ technology and a dual exhaust port design. CoolBoost™ increases fan speed by 10% and CPU/GPU cooling by 9% compared to auto mode. Monitor and manage your system in real time with NitroSense, covering temperatures, fan speeds and more.
Get an edge online by taking control of your network and prioritizing your gameplay with Killer™ Ethernet E25001. Effortlessly stream your gameplay with Gigabit Wi-Fi 5 with 2x2 MU-MIMO technology. Plug all your peripherals into the full range of ports, including HDMI 2.0, USB Type-C™ Gen 1 and more.


The Dinosaur Museum in a box
This was a project concieved during the lockdown period
Replica Fossils
-
{% for item in site.data.fossils2 %}
-
{{ item.name }}
{{ item.description }}
{% endfor %}
--- title: 3d printable models layout: default permalink: /replicas ---
This was a project concieved during the lockdown period
{{ item.description }}


What are Clunio?
Clunio are a genus of non-biting midges that are found living in the intertidal zone of coasts all over the world. Many species have evolved to synchronize their mating with the lowest tides of the month, during the full moon or new moon, so that they can lay their eggs on the exposed rocks. Clunio marinus has long been a model organism for studying biological clocks, population genetics, and adaptation.


Fluid Simulation via Lagrangian-Eulerian Advection
Move the cursor in the canvas to mix the fluid. See a video
here
.
This visualization implements the techniques in
Lagrangian-Eulerian Advection of Noise and Dye Textures for Unsteady Flow Visualization
to create a fluid simulation. Click and drag the cursor in the black canvas to create a velocity field and mix the fluid.
Click here
to restore.
Go fullscreen!


var ConnectionUtils = TConnectionUtils{}
func NewDefaultDiscoveryFactory() *build.Factory
Create a new instance of the factory. Returns *build.Factory
*
* Helper class that resolves connection and credential parameters, * validates them and generates connection options. * * ### Configuration parameters ### * * - connection(s): * - discovery_key: (optional) a key to retrieve the connection from [IDiscovery]] * - protocol: communication protocol * - host: host name or IP address * - port: port number * - uri: resource URI or connection string with all parameters in it * - credential(s): * - store_key: (optional) a key to retrieve the credentials from [ICredentialStore]] * - username: user name * - password: user password * * ### References ### * * - *:discovery:*:*:1.0 (optional) [IDiscovery]] services to resolve connections * - *:credential-store:*:*:1.0 (optional) Credential stores to resolve credentials
type CompositeConnectionResolver struct { Overrides ICompositeConnectionResolverOverrides // The connection options Options *config.ConfigParams // The connections resolver. ConnectionResolver *ConnectionResolver // The credentials resolver. CredentialResolver *auth.CredentialResolver // The cluster support (multiple connections) ClusterSupported bool // The default protocol DefaultProtocol string // The default port number DefaultPort int // The list of supported protocols SupportedProtocols []string }
func InheritCompositeConnectionResolver(overrides ICompositeConnectionResolverOverrides) *CompositeConnectionResolver
InheritCompositeConnectionResolver creates new CompositeConnectionResolver Parameters:
- overrides a child reference with overrides for virtual methods
return *CompositeConnectionResolver
func (c *CompositeConnectionResolver) Compose(correlationId string, connections []*ConnectionParams, credential *auth.CredentialParams, parameters *config.ConfigParams) (options *config.ConfigParams, err error)
Composes Composite connection options from connection and credential parameters. - correlationId (optional) transaction id to trace execution through call chain. - connections connection parameters - credential credential parameters - parameters optional parameters - return resolved options or error.
func (c *CompositeConnectionResolver) ComposeOptions(connections []*ConnectionParams, credential *auth.CredentialParams, parameters *config.ConfigParams) *config.ConfigParams
Composes connection and credential parameters into connection options. This method can be overriden in child classes. - connections a list of connection parameters - credential credential parameters - parameters optional parameters - returns a composed connection options.
func (c *CompositeConnectionResolver) Configure(config *config.ConfigParams)
Configures component by passing configuration parameters. - config configuration parameters to be set.
func (c *CompositeConnectionResolver) FinalizeOptions(options *config.ConfigParams) *config.ConfigParams
Finalize merged options This method can be overriden in child classes. - options connection options - returns finalized connection options
func (c *CompositeConnectionResolver) MergeConnection(options *config.ConfigParams, connection *ConnectionParams) *config.ConfigParams
Merges connection options with connection parameters This method can be overriden in child classes. - options connection options - connection connection parameters to be merged - returns merged connection options.
func (c *CompositeConnectionResolver) MergeCredential(options *config.ConfigParams, credential *auth.CredentialParams) *config.ConfigParams
Merges connection options with credential parameters This method can be overriden in child classes. - options connection options - credential credential parameters to be merged - returns merged connection options.
func (c *CompositeConnectionResolver) MergeOptional(options *config.ConfigParams, parameters *config.ConfigParams) *config.ConfigParams
Merges connection options with optional parameters This method can be overriden in child classes. - options connection options - parameters optional parameters to be merged - returns merged connection options.
func (c *CompositeConnectionResolver) Resolve(correlationId string) (options *config.ConfigParams, err error)
Resolves connection options from connection and credential parameters. - correlationId (optional) transaction id to trace execution through call chain. - return resolved options or error.
func (c *CompositeConnectionResolver) SetReferences(references refer.IReferences)
Sets references to dependent components. - references references to locate the component dependencies.
func (c *CompositeConnectionResolver) ValidateConnection(correlationId string, connection *ConnectionParams) error
Validates connection parameters. This method can be overriden in child classes. - correlationId (optional) transaction id to trace execution through call chain. - connection connection parameters to be validated - returns error or nil if validation was successful
func (c *CompositeConnectionResolver) ValidateCredential(correlationId string, credential *auth.CredentialParams) error
Validates credential parameters. This method can be overriden in child classes. - correlationId (optional) transaction id to trace execution through call chain. - credential credential parameters to be validated - returns error or nil if validation was successful
Contains connection parameters to connect to external services. They are used together with credential parameters, but usually stored separately from more protected sensitive values.
Configuration parameters
discovery_key: key to retrieve parameters from discovery service protocol: connection protocol like http, https, tcp, udp host: host name or IP address port: port number uri: resource URI or connection string with all parameters in it
In addition to standard parameters ConnectionParams may contain any number of custom parameters
see ConfigParams
see CredentialParams
see ConnectionResolver
see IDiscovery
Example Example ConnectionParams object usage:
connection := NewConnectionParamsFromTuples( "protocol", "http", "host", "<IP_ADDRESS>", "port", "8080", "cluster", "mycluster" ); host := connection.Host(); // Result: "<IP_ADDRESS>" port := connection.Port(); // Result: 8080 cluster := connection.GetAsNullableString("cluster"); // Result: "mycluster"
type ConnectionParams struct { config.ConfigParams }
func NewConnectionParams(values map[string]string) *ConnectionParams
Creates a new connection parameters and fills it with values. Parameters:
- values map[string]string an object to be converted into key-value pairs to initialize this connection.
Returns *ConnectionParams
func NewConnectionParamsFromConfig(config *config.ConfigParams) *ConnectionParams
Retrieves a single ConnectionParams from configuration parameters from "connection" section. If "connections" section is present instead, then is returns only the first connection element. Parameters:
- config *config.ConfigParams ConnectionParams, containing a section named "connection(s)".
Returns *ConnectionParams the generated ConnectionParams object.
func NewConnectionParamsFromMaps(maps ...map[string]string) *ConnectionParams
Static method for creating a StringValueMap using the maps passed as parameters. Parameters:
- maps ...map[string]string the maps passed to this method to create a StringValueMap with.
Returns ConnectionParams the ConnectionParams created.
func NewConnectionParamsFromString(line string) *ConnectionParams
Creates a new ConnectionParams object filled with key-value pairs serialized as a string. Parameters:
- line string a string with serialized key-value pairs as "key1=value1;key2=value2;..." Example: "Key1=123;Key2=ABC;Key3=2016-09-16T00:00:00.00Z"
Returns *ConnectionParams a new ConnectionParams object.
func NewConnectionParamsFromTuples(tuples ...interface{}) *ConnectionParams
Creates a new ConnectionParams object filled with provided key-value pairs called tuples. Tuples parameters contain a sequence of key1, value1, key2, value2, ... pairs. Parameters:
- tuples ...interface{} the tuples to fill a new ConnectionParams object.
Returns *ConnectionParams a new ConnectionParams object.
func NewConnectionParamsFromTuplesArray(tuples []interface{}) *ConnectionParams
Method for creating a StringValueMap from an array of tuples. Parameters:
- tuples []interface{} the key-value tuples array to initialize the new StringValueMap with.
Returns *ConnectionParams the ConnectionParams created and filled by the 'tuples' array provided.
func NewConnectionParamsFromValue(value interface{}) *ConnectionParams
Method that creates a ConfigParams object based on the values that are stored in the 'value' object's properties. see RecursiveObjectReader.getProperties Parameters:
- value interface{} configuration parameters in the form of an object with properties.
Returns ConnectionParams generated ConnectionParams.
func NewEmptyConnectionParams() *ConnectionParams
Creates a new connection parameters and fills it with values. Returns *ConnectionParams
func NewManyConnectionParamsFromConfig(config *config.ConfigParams) []*ConnectionParams
Retrieves all ConnectionParams from configuration parameters from "connections" section. If "connection" section is present instead, than it returns a list with only one ConnectionParams. Parameters:
- config *config.ConfigParams a configuration parameters to retrieve connections
Returns []*ConnectionParams a list of retrieved ConnectionParams
func (c *ConnectionParams) DiscoveryKey() string
Gets the key to retrieve this connection from DiscoveryService. If this key is null, than all parameters are already present. see UseDiscovery Returns string the discovery key to retrieve connection.
func (c *ConnectionParams) Host() string
Gets the host name or IP address. Returns string the host name or IP address.
func (c *ConnectionParams) Port() int
Gets the port number. Returns int the port number.
func (c *ConnectionParams) PortWithDefault(defaultValue int) int
Gets the port number. Parameters:
- defaultValue int default port number
Returns int the port number.
func (c *ConnectionParams) Protocol() string
Gets the connection protocol. Returns string the connection protocol or the default value if it's not set.
func (c *ConnectionParams) ProtocolWithDefault(defaultValue string) string
Gets the connection protocol. Parameters:
- defaultValue string the default protocol
Returns string the connection protocol or the default value if it's not set.
func (c *ConnectionParams) SetDiscoveryKey(value string)
Sets the key to retrieve these parameters from DiscoveryService. Parameters:
- value string a new key to retrieve connection.
func (c *ConnectionParams) SetHost(value string)
Sets the host name or IP address. Parameters:
- value string a new host name or IP address.
func (c *ConnectionParams) SetPort(value int)
Sets the port number. see Host Parameters:
- value int a new port number.
func (c *ConnectionParams) SetProtocol(value string)
Sets the connection protocol. Parameters:
- value string a new connection protocol.
func (c *ConnectionParams) SetUri(value string)
Sets the resource URI or connection string. Parameters:
- value string a new resource URI or connection string.
func (c *ConnectionParams) Uri() string
Gets the resource URI or connection string. Usually it includes all connection parameters in it. Returns string the resource URI or connection string.
func (c *ConnectionParams) UseDiscovery() bool
Checks if these connection parameters shall be retrieved from DiscoveryService. The connection parameters are redirected to DiscoveryService when discovery_key parameter is set. Returns bool true if connection shall be retrieved from DiscoveryService
Helper class to retrieve component connections.
If connections are configured to be retrieved from IDiscovery, it automatically locates IDiscovery in component references and retrieve connections from there using discovery_key parameter.
Configuration parameters
connection: discovery_key: (optional) a key to retrieve the connection from IDiscovery ... other connection parameters connections: alternative to connection [connection params 1]: first connection parameters ... connection parameters for key 1 [connection params N]: Nth connection parameters ... connection parameters for key N
References *:discovery:*:*:1.0 (optional) IDiscovery services to resolve connections see ConnectionParams
see IDiscovery
Example
config = NewConfigParamsFromTuples( "connection.host", "<IP_ADDRESS>", "connection.port", 8080 ); connectionResolver := NewConnectionResolver(); connectionResolver.Configure(config); connectionResolver.SetReferences(references); res, err := connectionResolver.Resolve("123");
type ConnectionResolver struct {
// contains filtered or unexported fields
}
func NewConnectionResolver(config *config.ConfigParams, references refer.IReferences) *ConnectionResolver
Creates a new instance of connection resolver. Parameters:
- config *config.ConfigParams component configuration parameters - references refer.IReferences component references
Returns *ConnectionResolver
func NewEmptyConnectionResolver() *ConnectionResolver
Creates a new instance of connection resolver. Returns *ConnectionResolver
func (c *ConnectionResolver) Add(connection *ConnectionParams)
Adds a new connection to component connections Parameters:
- connection *ConnectionParams new connection parameters to be added
func (c *ConnectionResolver) Configure(config *config.ConfigParams)
Configures component by passing configuration parameters. Parameters:
- config *config.ConfigParams configuration parameters to be set.
func (c *ConnectionResolver) GetAll() []*ConnectionParams
Gets all connections configured in component configuration. Redirect to Discovery services is not done at this point. If you need fully fleshed connection use resolve method instead. Returns []*ConnectionParams a list with connection parameters
func (c *ConnectionResolver) Register(correlationId string, connection *ConnectionParams) error
Registers the given connection in all referenced discovery services. This method can be used for dynamic service discovery. see IDiscovery Parameters:
- correlationId string transaction id to trace execution through call chain. - connection *ConnectionParams a connection to register.
Returns error
func (c *ConnectionResolver) Resolve(correlationId string) (*ConnectionParams, error)
Resolves a single component connection. If connections are configured to be retrieved from Discovery service it finds a IDiscovery and resolves the connection there. see IDiscovery Parameters:
- correlationId: string transaction id to trace execution through call chain.
Returns *ConnectionParams, error resolved connection or error.
func (c *ConnectionResolver) ResolveAll(correlationId string) ([]*ConnectionParams, error)
Resolves all component connection. If connections are configured to be retrieved from Discovery service it finds a IDiscovery and resolves the connection there. see IDiscovery Parameters:
- correlationId string transaction id to trace execution through call chain.
Returns []*ConnectionParams, error resolved connections or error.
func (c *ConnectionResolver) SetReferences(references refer.IReferences)
Sets references to dependent components. Parameters:
- references refer.IReferences references to locate the component dependencies.
type ICompositeConnectionResolverOverrides interface { ValidateConnection(correlationId string, connection *ConnectionParams) error ValidateCredential(correlationId string, credential *auth.CredentialParams) error ComposeOptions(connections []*ConnectionParams, credential *auth.CredentialParams, parameters *config.ConfigParams) *config.ConfigParams MergeConnection(options *config.ConfigParams, connection *ConnectionParams) *config.ConfigParams MergeCredential(options *config.ConfigParams, credential *auth.CredentialParams) *config.ConfigParams MergeOptional(options *config.ConfigParams, parameters *config.ConfigParams) *config.ConfigParams FinalizeOptions(options *config.ConfigParams) *config.ConfigParams }
Interface for discovery services which are used to store and resolve connection parameters to connect to external services.
type IDiscovery interface { // Registers connection parameters into the discovery service. Register(correlationId string, key string, connection *ConnectionParams) (result *ConnectionParams, err error) // Resolves a single connection parameters by its key. ResolveOne(correlationId string, key string) (result *ConnectionParams, err error) // Resolves all connection parameters by their key. ResolveAll(correlationId string, key string) (result []*ConnectionParams, err error) }
Discovery service that keeps connections in memory.
Configuration parameters
[connection key 1]: ... connection parameters for key 1 [connection key 2]: ... connection parameters for key N
see IDiscovery
see ConnectionParams
Example
config := config.NewConfigParamsFromTuples( "connections.key1.host", "<IP_ADDRESS>", "connections.key1.port", "8080", "connections.key2.host", "<IP_ADDRESS>", "connections.key2.port", "8082", ) discovery := NewEmptyMemoryDiscovery(); discovery.Configure(config); connection, err := discovery.ResolveOne("123", "key1") // Result: host=<IP_ADDRESS>;port=8080
type MemoryDiscovery struct {
// contains filtered or unexported fields
}
func NewEmptyMemoryDiscovery() *MemoryDiscovery
Creates a new instance of discovery service. Returns *MemoryDiscovery
func NewMemoryDiscovery(config *config.ConfigParams) *MemoryDiscovery
Creates a new instance of discovery service. Parameters:
- config *config.ConfigParams configuration with connection parameters.
Returns *MemoryDiscovery
func (c *MemoryDiscovery) Configure(config *config.ConfigParams)
Configures component by passing configuration parameters. Parameters:
- config *config.ConfigParams
configuration parameters to be set.
func (c *MemoryDiscovery) ReadConnections(config *config.ConfigParams)
Reads connections from configuration parameters. Each section represents an individual Connectionparams Parameters:
- config *configure.ConfigParams
configuration parameters to be read
func (c *MemoryDiscovery) Register(correlationId string, key string, connection *ConnectionParams) (result *ConnectionParams, err error)
Registers connection parameters into the discovery service. Parameters:
- correlationId string transaction id to trace execution through call chain. - key string a key to uniquely identify the connection parameters. - connection *ConnectionParams
Returns *ConnectionParams, error registered connection or error.
func (c *MemoryDiscovery) ResolveAll(correlationId string, key string) (result []*ConnectionParams, err error)
func (c *MemoryDiscovery) ResolveOne(correlationId string, key string) (result *ConnectionParams, err error)
Resolves a single connection parameters by its key. Parameters:
- correlationId: string transaction id to trace execution through call chain. - key: string a key to uniquely identify the connection.
Returns *ConnectionParams, error receives found connection or error.
*
* A set of utility functions to process connection parameters
type TConnectionUtils struct{}
func (c *TConnectionUtils) ComposeUri(options *config.ConfigParams, defaultProtocol string, defaultPort int) string
*
* Composes URI from config parameters. * The result URI will be in the following form: * protocol://username@password@host1:port1,host2:port2,...?param1=abc¶m2=xyz&... * * @param options configuration parameters * @param defaultProtocol a default protocol * @param defaultPort a default port * @returns a composed URI
func (c *TConnectionUtils) Concat(options1 *config.ConfigParams, options2 *config.ConfigParams, keys ...string) *config.ConfigParams
*
* Concatinates two options by combining duplicated properties into comma-separated list * @param options1 first options to merge * @param options2 second options to merge * @param keys when define it limits only to specific keys
func (c *TConnectionUtils) Exclude(options *config.ConfigParams, keys ...string) *config.ConfigParams
*
* Excludes specified keys from the config parameters. * @param options configuration parameters to be processed. * @param keys a list of keys to be excluded. * @returns a processed config parameters.
func (c *TConnectionUtils) Include(options *config.ConfigParams, keys ...string) *config.ConfigParams
*
* Includes specified keys from the config parameters. * @param options configuration parameters to be processed. * @param keys a list of keys to be included. * @returns a processed config parameters.
func (c *TConnectionUtils) ParseUri(uri string, defaultProtocol string, defaultPort int) *config.ConfigParams
*
* Parses URI into config parameters. * The URI shall be in the following form: * protocol://username@password@host1:port1,host2:port2,...?param1=abc¶m2=xyz&... * * @param uri the URI to be parsed * @param defaultProtocol a default protocol * @param defaultPort a default port * @returns a configuration parameters with URI elements


|
jclib - Julia Clement's C++ utility library
A collection of classes that have proved useful
|
#include <yieldingIterator.hpp>
Public Types | |
| enum | { yiEof = -1 , yiBegin = 0 } |
Public Member Functions | |
| yieldingIterator< T > | operator++ (int postfix) |
| yieldingIterator< T > & | operator++ () |
| T & | operator* () const |
| T * | operator-> () const |
| void | set_begin () |
| bool | is_end () const |
| void | set_end () |
| bool | operator== (const yieldingIterator &rhs) const |
| bool | operator!= (const yieldingIterator &rhs) const |
| template<typename ... Types> | |
| yieldingIterator (class yieldingIteratorHelper< T > *helper, const Types &...args) | |
| yieldingIterator () | |
| yieldingIterator (const yieldingIterator< T > &old) | |
| yieldingIterator< T > & | operator= (const yieldingIterator< T > &old) |
Protected Attributes | |
| CountedPointer< yieldingIteratorHelper< T > > | helper_ |
| int | state_ |
| T | value_ |
This is the user accessible class that uses a helper to provide a set of calculated values.
|
inline |
Variadic constructor relies on the helper being able to accept const & arguments in all positions. If this ever turns out to be not so we may need to subclass or even split this class
| helper | |
| args | for the constructor of type T |
|
inline |
Constructor to satisfy the default constructable requirement for iterators.
|
inline |
Copy constructor. NB: If the source iterator has ended, the ending() method will be called. This means it is possible for an iterator that never had a begin() to end().
| old | cource of copy. |
|
inline |
Checks if the iterator is at the end of its range
Quick test for when container.end() isn't accessible.
Once end is set, helper_->next() won't be called until the iterator is reset by a call to set_begin() or an assignment.
|
inline |
Assignment operator. NB: If the source iterator has ended, the ending() method will be called. This means it is possible for an iterator that never had a begin() to end().
| old | cource of copy. |
|
inline |
Reset the iterator to the beginning of its sequence requires the helper to act appropriately to the begin() call
|
inline |
Sets the internal state to end of sequence
Once end is set, helper_->next() won't be called until the iterator is reset by a call to set_begin() or an assignment.


Amid the pandemic of coronavirus-19, here's a fun game for you. This is the Color Ninja game, for the bored folks.
The game will give you three numbers from 1 to 100 each of red, green and blue pigments. When you add these pigments a color will be made. It is one of the colors that you see in the tiles. Choose it in as less choice as you can, and you get a score. The player with the highest score wins the game. The software is presently in alpha testing. Feel free to
ping the developer for any bugs or features!


The country has very significant overpopulation problems. Uganda's population has grown from 9.5 million people in 1969 to 34.9 million in 2014. With respect to the last inter-censal period (September 2002), the population increased by 10.6 million people in the past 12 years. Uganda has a very young population; With a median age of 15 years, it is the lowest median age in the world. Uganda has the fifth highest total fertility rate in the world, at 5.97 children born/woman (2014 estimates).
Three factors drive Uganda’s extraordinary population growth. First, Ugandan fertility rates are extremely high. Second, deaths from communicable disease have declined significantly representing a significant policy and foreign aid success story. Third, while data on net migration are unreliable, it is likely that regional conflicts in Burundi, Democratic Republic of Congo, and South Sudan are pushing refugees into the country. Without significant policy interventions to promote family planning, we forecast both that Ugandan fertility rates will remain high and that population will continue to grow at a significant rate.
The fertility rate in Uganda stands at around 6 children per woman. In 2014, only seven countries had fertility rates at or above 6 children per woman. Of these seven countries Uganda has the largest population by far.2 At current fertility levels Ugandan population is projected to rise to over 76 million people, nearly the current size of Egypt. Figure 2 tracks the number of people added to the population each decade to highlight the increasing complexity of policy planning in Uganda across time.


Before Change
Find unique speaker ids and create a dict mapping utterances from speaker id
speakers = list({item[-1] for item in self.items})
self.speaker_to_utters = {}
self.speakers = []
for speaker in speakers:
After Change
for i in self.items:
path_ = i[1]
speaker_ = i[2]
if speaker_ in self.speaker_to_utters.keys():
self.speaker_to_utters[speaker_].append(path_)
else:
self.speaker_to_utters[speaker_] = [path_, ]
if self.skip_speakers:
self.speaker_to_utters = {k: v for (k, v) in self.speaker_to_utters.items() if
len(v) >= self.num_utter_per_speaker}


Things of Note - Part 1
December 29, 2018
High-Level
As a newer language, Golang benefits from many language developments which went before it. I pull out some of these which are of particular note in separate sections below, but the “just plain handy” list includes: a package system, first-class functions, lexical scope, a system-call interface, and immutable strings (from The Go Programming Language, pp xiv by Donovan, A. and Kernighan, B.). It also includes in the platform linting, dependency management, testing, packaging and more.
Presumes monorepo-style SCM
Optimised for large teams
Managed runtime
Golang takes note of the development in managed runtimes which found popularity with the development of languages such as Java and C# (and their many JRE- and CLR- platform cousins). Golang also has a managed runtime. That means you get garbage collection which is a major boon. The downside is that it’s not suitable for real-time projects (although I remember real-time Java so I’m not sure these kind of things are impossible; rather they are likely to require a different style of coding.)
Cross-platform
The Golang platform is available on many platforms (Unix, MacOs, and Windows) and chip architectures (including ARM). This goes a long way towards ensuring that your code is very likely to be compilable on multiple platforms unchanged.
Time-to-Compile
Golang is a compiled language. But not only that, the designers have focussed on keeping compile-time as low as possible. If you’re coming from a Scala background, that’s reassuring.
Bundling dependencies
Network-Centric
Golang “takes note of the importance of locality” (from The Go Programming Language, pp xiv by Donovan, A. and Kernighan, B.) but also has first-class concepts for remote communication.


| lesson 36 A chance in a million |
| We are less credulous than we used to be. |
| In the nineteenth century, a novelist would bring his story to a conclusion by presenting his readers with a series of coincidences -- most of them wildly improbable. |
| Readers happily accepted the fact that an obscure maidservant was really the hero's mother. |
| A long-lost brother, who was presumed dead, was really alive all the time and wickedly plotting to bring about the hero's downfall. And so on. |
| Modern readers would find such naive solutions totally unacceptable. |
| Yet, in real life, circumstances do sometimes conspire to bring about coincidences which anyone but a nineteenth century novelist would find incredible. |
| When I was a boy, my grandfather told me how a German taxi driver, |
| Franz Bussman, found a brother who was thought to have been killed twenty years before. |
| While on a walking tour with his wife, he stopped to talk to a workman. |
| After they had gone on, Mrs. Bussman commented on the workman's close resemblance to her husband and even suggested that he might be his brother. |
| Franz poured scorn on the idea, pointing out that his brother had been killed in action during the war. |
| Though Mrs. Busssman was fully acquainted with this story, she thought that there was a chance in a million that she might be right. |
| A few days later, she sent a boy to the workman to ask him if his name was Hans Bussman. |
| Needless to say, the man's name was Hans Bussman and he really was Franz's long-lost brother. |
| When the brothers were reunited, Hans explained how it was that he was still alive. |
| After having been wounded towards the end of the war, he had been sent to hospital and was separated from his unit. |
| The hospital had been bombed and Hans had made his way back into Western Germany on foot. |
| Meanwhile, his unit was lost and all records of him had been destroyed. |
| Hans returned to his family home, but the house had been bombed and no one in the neighbourhood knew what had become of the inhabitants. |
| Assuming that his family had been killed during an air raid, Hans settled down in a village fifty miles away where he had remained ever since. |


Stanford MOOC
11 weeks to learn all the basics in ML (supervised/unsupervised learning, advices, ...).
Rank among the 5th best MOOC available on the internet.
.
To complete my Master’s degree, I’d love to combine my analytical and technical skills to learn and
broaden my knowledge and passion in Big Data technologies, Machine Learning and Data Mining during
a 6-month internship, from January 2017 to July 2017, as a Jr. Data Scientist or Big Data Engineer.
I am a conscientious person who works hard and pays attention to details. Quick to pick up new skills
and eager to learn from others, if you believe I could fit easily into your team, contact me !
HTML5, CSS3, JS, AngularJs, NodeJs
R,Matlab/Octave, SQL, MySQL
iOS, Cross-Platform, Cordova, Ionic
July - October 2016
July - August 2016
The right content at the right visitors at the right time.
Early Birds' Technology analyze in real time the behavior of each of your visitors
in all your digital devices (sites, social networks, crm ...),so it offers the right offer
at the right time.
My mission:
September 2015 - July 2016
Gathering pictures with friends become easy.
Timeshot solves the problem of grouping photos for your events.
No need to create shared folders on Dropbox or Google Drive to group your holiday pictures or parties anymore,. Timeshot takes care of everything!
My mission:
August 2015 - February 2016
The first connected devices for equestrian sports
Equisense helps the rider and his horse to progress while improving the horse's
well being.
We bring follow-up, objective feedback and sharing between riders and their team.
My mission :
2012 - 2017
Always eager to learn new technologies by developing projects! Here are some of my works...
11 weeks to learn all the basics in ML (supervised/unsupervised learning, advices, ...).
Rank among the 5th best MOOC available on the internet.
.
6 differents small projects given by the university to discover :
Multidimensional statistics, PCA, Clustering, Methods of regresssion, ...
Build a system of indexing and information retrieval on an archive composed of articles.
A search engine allow users to ask the archive questions
about various criteria (contents, title, topic, etc).


Property Editor
The Property Editor dialog provides a convenient way to override the application styling defaults used to display files in the editor window. There are four tabs each with several fields.
Description A brief description of the property file contents
File Patterns A space delimited list of file patterns used to identify the files that will receive the associated styling.
Options Each lexer has certain options that control its behaviour. All available options are listed and a brief description of the option is displayed below the list as well as in the tooltip for that option.
Keywords Each lexer uses different sets of keywords to provide its functionality. There are a maximum of nine Keyword sets. The Keyword Set Description is shown in the list on the left and the Keywords in the set are shown in the text box on the right.
Right click on the text box to display the text box context menu. This menu has one option "View as List" which displays the Keywords in a sorted list.
Right click on the list to display the list context menu. This menu has options to Insert, Edit, or Delete rows from the list as well as an option to "View as Text" whic reverts back to the text box view. When the list has focus, the [Insert], [Ctrl+Enter], and [Delete] keys can also be used to initiate editing of the list.
Styles The lexers determine a style number for each lexical type, such as keyword, comment or number. These settings determine the visual style to be used for each style number of each lexer.
The <Default> style appears first in the Styles list and has special significance.
This style provides the styling options that will be used for all other styles where a specific
styling option has not been selected.
The Property Editor indicates options that are inherited from the <Default> style with an italic
prompt. Options that are specifically set for a style, overriding the default option, are indicated with
a bold prompt. The Font option may have a mix of default and specific settings in which case the prompt
is shown in bold italic.
italic
inherited from default
bold
specifically set, overrides default
bold italic
mix of inherited and override options
Font Press the ellipsis [...] button to the right of the field to display the font selection dialog to select the desired font.
Fore Color Press the ellipsis [...] button to the right of the field to display the color selection dialog to select the desired text color.
Back Color Press the ellipsis [...] button to the right of the field to display the font selection dialog to select the desired background color.
Options
Additional text editor display options.
Hide
The language element is hidden in the text editor when checked.
Hot Spot
This option is used to mark language elements in the text that can detect
mouse clicks. The cursor changes to a hand over hotspots and an underline appears to indicate that these
areas are sensitive to clicking. This is used to allow hyperlinks to Clarion help for the language element.
EOL Filled
If the last character in the line has a style with this attribute set, the
remainder of the line up to the right edge of the window is filled with the background colour set for
the last character. This is useful when a document contains embedded sections in another language such
as html pages with embedded JavaScript.
Case
Select the case in which the language element is to be displayed.
Mixed
the case of the language element is not altered.
Upper
the language element is converted to upper case.
Lower
the language element is converted to lower case.
Save Press the Save button to save your changes. You will be asked to provide the path and filename for the modified properties file.
Cancel Press the Cancel button to discard any changes and return to the Options dialog.


First Page
Second Page
Third Page
Fifth Page
Sixth Page
M
Y
I
N
F
I
N
I
T
E
S
C
R
O
L
L
◀
The Faster You Scroll The More You See
Go Home


Two teens mugged by pair of older teens, police say
by Maija InveissMADISON, Wis. - Two boys, who were walking to a fast-food restaurant Wednesday afternoon, were jumped and mugged while walking across a field in the 1800 block of Tennyson Lane, police said.
According to a release, the 15-year-old and 14-year-old said a pair of older teens attacked and punched them. One of the victims was robbed of money, while the other lost his wallet, cellphone and the tennis shoes he was wearing.
The two victims provided good descriptions to police. Police said two suspects were spotted, chased and arrested by police officers near the corner of Northport Drive and Sherman Avenue.
The release said Stephon E. Williams, a 19-year-old, was arrested on suspicion of robbery with use of force, physical abuse of a child, resisting/obstructing, possession of THC, possession of methamphetamine and bail jumping. Tradell S. Jones, a 17-year-old, was arrested on suspicion of robbery with use of force, physical abuse of a child and bail jumping.


| I l@ve RuBoard |
1.16 The types ModuleThe types module contains type objects for all object types defined by the standard interpreter, as Example 1-86 demonstrates. All objects of the same type share a single type object. You can use is to test if an object has a given type. Example 1-86. Using the types ModuleFile: types-example-1.py import types def check(object): print object, if type(object) is types.IntType: print "INTEGER", if type(object) is types.FloatType: print "FLOAT", if type(object) is types.StringType: print "STRING", if type(object) is types.ClassType: print "CLASS", if type(object) is types.InstanceType: print "INSTANCE", print check(0) check(0.0) check("0") class A: pass class B: pass check(A) check(B) a = A() b = B() check(a) check(b) 0 INTEGER 0.0 FLOAT 0 STRING A CLASS B CLASS <A instance at 796960> INSTANCE <B instance at 796990> INSTANCE Note that all classes have the same type, as do all instances. To test what class hierarchy a class or an instance belongs to, use the built-in issubclass and isinstance functions. The types module destroys the current exception state when it is first imported. In other words, don't import it (or any module that imports it!) from within an exception handler. |
| I l@ve RuBoard |


Hello!
I'm Shubham Dalmia, a Geek 🤓👨💻
Student at Birla Institute of Technology, Mesra
Some of my Tech Stacks include 🧰:
- C
- C++
- Java
- Web Development
- Data Science & ML
Some of my projects are:
- Snake Game
- Data Science Projects
ABOUT ME
I am a student at BIT Mesra pursuing B.Tech in Computer Science and Technology. Currently, I am interested in Web Development, Competitve Programming, Data Science and Machine Learning. I also do basic graphics designing and video editing.
&
I AM OPEN TO LEARNING NEW TECH RELATED STUFFS.
KNOW MORE ABOUT ME..


[t]You can upload your company logo and a screenshot of your website below. Without both of them your link is not going to be included in our network directory.[/t]
[tg]Screenshot[/tg]:
[tg]Logo[/tg]:
[t]Next, please enter a short description, a detailed description and -if applicable- a reference about our website or services in the fields below.[/t]
[tg]Description[/tg]:
[tb]Network Text[/tb]
[tg]Reference[/tg]
{if $NPImg || $NLImg}
{$NPImg}
{$NLImg}
{if $NPImg && $NLImg}
{/if}
{/if}
[t]Did you fill out the form correctly? Did you upload both images? Please press "Save" when you are done.[/t]


We can not soar
to greater heights
until we overcome our fear
of expanding our wings.
Carin Camen
Scroll to begin.
Web
Design for Appeal
Develop for Interaction
Web design allows the viewer a front row seat into the designer's global gallery.
Web development creates a positive user experience drawing them into the application.
Web design and development allows me to interact with both sides of the brain, designing with the right and developing with the left. My process includes planning and development of site maps and wire frames with OmniGraffle, visual creation in Photoshop, execution utilizing WebStorm, Mamp and GitHub.
Design
Creating Visual Interest
with Common Subjects
Design is a creative visualization of all that the world has to offer.
Design allows me to challenge my creativity and push myself to diversify my designs. It is the foundation in which I build upon. I enjoy the process of assisting the client in developing what they visualize but may struggle to put into words.
Copy
Write to Express
Style to Impress
It is the harmony of copy and visual that draws us in and establishes action.
There is an expression that a picture speaks a thousands words. One word can envision a thousand pictures. A word as simple as "orange" can cause a picture of a fruit, a color, an object or a memory of person, place or event. Words motivate or de-motivate. The power of words explode when they are in combination with design.
Illustration
Enter the World
With no Limits
Illustration brings fantasy into reality and reminds us of the pleasures in being a child.
Our world is filled with illustration, taking us on a journey outside of our day in and day out routine. Releasing us into fantasy for a moment of respite from the hectic moments in life. Regardless of age, we desire to regain the moments as a child when we sat back and just day dreamed of the possibilities beyond our imagination.
Photography
Exploring Beyond
The Human Eye
Photography is the ability to see the world through a different perspective.
Looking through the lens of a camera I was opened up a whole new world for me to explore. Through a macro lens, I find beauty in the strangest places. Have you seen how amazing a mud puddle is? Once I viewed the reflection from a raindrop falling off a delicate flower's petal, I began to see the world in a new perspective.


Welcome the the Brand Guidelines for the InnovationLab platform. Here you will find the basic elements used to compose each page, how to use them and examples of implementation.
Please take into consideration these guidelines when developing applications, new sections or contents for the platform


Tah is a Bluetooth Low Energy open source development platform compatible with the Arduino.
Two Tahs can talk to each other and share the data. We can build various applications based on this concept. For instance, interface some sensors with one Tah and send it to another Tah, that has the decision making abilities.
In this tutorial we are going to establish a connection between two Tahs and use one Tah to control a Robot with a joystick designed with another Tah.
This tutorial is divided into two major parts first one Tah transmitter section and other is receiver on the Robot which will control the motions of robot.
Lets first build the transmitter section with the Tah and the 3-axis accelerometer that will send commands to the receiver. Cut the PCB to mount the ADXL335 and build the LM7805 voltage regulator circuit to power up the Tah transmitter. The A0, A1 and A2 analog channels are used to interface the accelerometer.
Now lets start bulding the mechanical assembly for robot with Tah.
Cut the base for the robot as per the design and mount the motors on the base of the robot and fix the wheels on the sides and the center caster wheel at the center.
Once the robot's mechanical assembly is ready, build it's electronic circuit. To drive the robot we need an L293D motor driver shield or you can design your own motor driver circuit as well.
Build the power supply section for the Tah on the robot with LM7805 voltage regulator with filter capacitor. Four digital I/Os pins - 9, 10, 11 and 12 are used to control the DC motor. The LDR is interfaced with pin A5 of the analog channel and the power LEDs with SL100 transistor are interfaced with the digital I/O pin 4. In darkness, the front LEDs will glow.
Here we've programmed the logic for 5 different motions of the robot i.e, forward, reverse, left, right and center that can be used with the joystick designed with Tah to control the robot.
Lets connect the motors and Tah with the motor shield and give a seperate 9V/12V DC power supply.
Download and install the Tah Arduino Library onto your existing Arduino IDE. Once done, upload the TahAsMaster sketch onto the master Tah, and upload the Tah Test sketch onto the slave Tah. In TahAsMaster, open the serial terminal and run the following command to get the MAC address of other BLE(TAH)
AT+DISC?
Enter this command to connect to the 0 index Tah BLE
AT+CONN[0]
Upload the Tah transmitter sketch onto the master, and the Tah Robot control sketch onto the slave Tah.
Put the Tah transmitter into the Tah joystick, plug other onto the robot and power up both Tahs. When both the Tahs are up and running, they connect immediately and joystick will start sending data to the robot.
Now just control the robot with the joystick by tilting it in the direction you'd like it to move and keep it horizontal to stop the robot.


Docker Engine リリースノート
このドキュメントは Docker Engine における最新の変更、追加、既知の問題、バグフィックスについて示します。
メモ: クライアントとコンテナーランタイムは、Docker Engine 18.09 からデーモンとは別パッケージになりました。 ユーザーがインストールおよびアップデートをする際には、同時に 3 つのパッケージを入手して行い、最新のパッチリリースを合わせるようにします。 たとえば Ubuntu においては
sudo apt install docker-ce docker-ce-cli containerd.io
を実行します。 詳しくは、各ディストリビューションにおけるインストール手順を参照してください。
バージョン 19.03
19.03.12
2020-06-18
クライアント
- Fix bug preventing logout from registry when using multiple config files (e.g. Windows vs WSL2 when using Docker Desktop) docker/cli#2592
- Fix regression preventing context metadata to be read docker/cli#2586
- Bump Golang 1.13.12 docker/cli#2575
ネットワーク
- Fix regression preventing daemon start up in a systemd-nspawn environment moby/moby#41124 moby/libnetwork#2567
- Fix the retry logic for creating overlay networks in swarm moby/moby#41124 moby/libnetwork#2565
ランタイム
- Bump Golang 1.13.12 moby/moby#41082
19.03.11
2020-06-01
ネットワーク
アドレススプーフィングを防止するため、IPv6 ルーター広告（Router Advertisements）を無効にする。 CVE-2020-13401
内容説明
In the Docker default configuration, the container network interface is a virtual ethernet link going to the host (veth interface).
In this configuration, an attacker able to run a process as root in a container can send and receive arbitrary packets to the host using the CAP_NET_RAW
capability (present in the default configuration).
If IPv6 is not totally disabled on the host (via ipv6.disable=1
on the kernel cmdline), it will be either unconfigured or configured on some interfaces, but it’s pretty likely that ipv6 forwarding is disabled, that is, /proc/sys/net/ipv6/conf//forwarding == 0
. Also by default, /proc/sys/net/ipv6/conf//accept_ra == 1
. The combination of these 2 sysctls means that the host accepts router advertisements and configures the IPv6 stack using them.
By sending “rogue” router advertisements from a container, an attacker can reconfigure the host to redirect part or all of the IPv6 traffic of the host to the attacker-controlled container.
Even if there was no IPv6 traffic before, if the DNS returns A (IPv4) and AAAA (IPv6) records, many HTTP libraries will try to connect via IPv6 first then fallback to IPv4, giving an opportunity to the attacker to respond. If by chance the host has a vulnerability like last year’s RCE in apt (CVE-2019-3462), the attacker can now escalate to the host.
As CAP_NET_ADMIN
is not present by default for Docker containers, the attacker can’t configure the IPs they want to MitM, they can’t use iptables to NAT or REDIRECT the traffic, and they can’t use IP_TRANSPARENT
.
The attacker can however still use CAP_NET_RAW
and implement a tcp/ip stack in user space.
See kubernetes/kubernetes#91507 for related issues.
19.03.10
2020-05-29
クライアント
- Fix version negotiation with older engine. docker/cli#2538
- Avoid setting SSH flags through hostname. docker/cli#2560
- DOCKER_CLI_EXPERIMENTAL が不適切な場合の panic エラーを修正。docker/cli#2558
- Go 1.13.11 へアップグレードした際、s390x 上での潜在的な panic エラーの回避。docker/cli#2532
Networking
- Fix DNS fallback regression. moby/moby#41009
Runtime
- Avoid potential panic on s390x by upgrading Go to 1.13.11. moby/moby#40978
Packaging
- Fix ARM builds on ARM64. moby/moby#41027
19.03.9
2020-05-14
Builder
- buildkit: Fix concurrent map write panic when building multiple images in parallel. moby/moby#40780
- buildkit: Fix issue preventing chowning of non-root-owned files between stages with userns. moby/moby#40955
- Avoid creation of irrelevant temporary files on Windows. moby/moby#40877
Client
- Fix panic on single-character volumes. docker/cli#2471
- Lazy daemon feature detection to avoid long timeouts on simple commands. docker/cli#2442
- docker context inspect on Windows is now faster. docker/cli#2516
- Bump Golang 1.13.10. docker/cli#2431
- Bump gopkg.in/yaml.v2 to v2.2.8. docker/cli#2470
Logging
- Avoid situation preventing container logs to rotate due to closing a closed log file. moby/moby#40921
Networking
- Fix potential panic upon restart. moby/moby#40809
- Assign the correct network value to the default bridge Subnet field. moby/moby#40565
Runtime
- Fix docker crash when creating namespaces with UID in /etc/subuid and /etc/subgid. moby/moby#40562
- Improve ARM platform matching. moby/moby#40758
- overlay2: show backing filesystem. moby/moby#40652
- Update CRIU to v3.13 “Silicon Willet”. moby/moby#40850
- Only show registry v2 schema1 deprecation warning upon successful fallback, as opposed to any registry error. moby/moby#40681
- Use FILE_SHARE_DELETE for log files on Windows. moby/moby#40563
- Bump Golang 1.13.10. moby/moby#40803
Rootless
- Now rootlesskit-docker-proxy returns detailed error message on exposing privileged ports. moby/moby#40863
- Supports numeric ID in /etc/subuid and /etc/subgid. moby/moby#40951
Security
- apparmor: add missing rules for userns. moby/moby#40564
- SElinux: fix ENOTSUP errors not being detected when relabeling. moby/moby#40946
Swarm
- Increase refill rate for logger to avoid hanging on service logs. moby/moby#40628
- Fix issue where single swarm manager is stuck in Down state after reboot. moby/moby#40831
- tasks.db no longer grows indefinitely. [moby/moby#40830]
19.03.8
2020-03-10
Runtime
- Improve mitigation for CVE-2019-14271 for some nscd configuration.
19.03.7
2020-03-03
Builder
- builder-next: Fix deadlock issues in corner cases. moby/moby#40557
Runtime
- overlay: remove modprobe execs. moby/moby#40462
- selinux: display better error messages when setting file labels. moby/moby#40547
- Speed up initial stats collection. moby/moby#40549
- rootless: use certs.d from XDG_CONFIG_HOME. moby/moby#40461
- Bump Golang 1.12.17. moby/moby#40533
- Bump google.golang.org/grpc to v1.23.1. moby/moby#40566
- Update containerd binary to v1.2.13. moby/moby#40540
- Prevent showing stopped containers as running in an edge case. moby/moby#40555
- Prevent potential lock. moby/moby#40604
Client
- Bump Golang 1.12.17. docker/cli#2342
- Bump google.golang.org/grpc to v1.23.1. docker/cli#1884 docker/cli#2373
19.03.6
2020-02-12
Builder
- builder-next: Allow modern sign hashes for ssh forwarding. docker/engine#453
- builder-next: Clear onbuild rules after triggering. docker/engine#453
- builder-next: Fix issue with directory permissions when usernamespaces is enabled. moby/moby#40440
- Bump hcsshim to fix docker build failing on Windows 1903. docker/engine#429
Networking
- Shorten controller ID in exec-root to not hit UNIX_PATH_MAX. docker/engine#424
- Fix panic in drivers/overlay/encryption.go. docker/engine#424
- Fix hwaddr set race between us and udev. docker/engine#439
Runtime
- Bump Golang 1.12.16. moby/moby#40433
- Update containerd binary to v1.2.12. moby/moby#40433
- Update to runc v1.0.0-rc10. moby/moby#40433
- Fix possible runtime panic in Lgetxattr. docker/engine#454
- rootless: fix proxying UDP packets. docker/engine#434
19.03.5
2019-11-14
Builder
- builder-next: Added
entitlements
in builder config. docker/engine#412 - Fix builder-next: permission errors on using build secrets or ssh forwarding with userns-remap. docker/engine#420
- Fix builder-next: copying a symlink inside an already copied directory. docker/engine#420
Packaging
- Support RHEL 8 packages
Runtime
- Bump Golang to 1.12.12. docker/engine#418
- Update to RootlessKit to v0.7.0 to harden slirp4netns with mount namespace and seccomp. docker/engine#397
- Fix to propagate GetContainer error from event processor. docker/engine#407
- Fix push of OCI image. docker/engine#405
19.03.4
2019-10-17
Networking
- Rollback libnetwork changes to fix
DOCKER-USER
iptables chain issue. docker/engine#404
Known Issues
Existing
- In some circumstances with large clusters, Docker information might, as part of the Swarm section,
include the error
code = ResourceExhausted desc = grpc: received message larger than max (5351376 vs. 4194304)
. This does not indicate any failure or misconfiguration by the user, and requires no response. - Orchestrator port conflict can occur when redeploying all services as new. Due to many Swarm manager
requests in a short amount of time, some services are not able to receive traffic and are causing a
404
error after being deployed.- Workaround: restart all tasks via
docker service update --force
.
- Workaround: restart all tasks via
- CVE-2018-15664 symlink-exchange attack with directory traversal. Workaround until proper fix is available in upcoming patch release:
docker pause
container before doing file operations. moby/moby#39252 docker cp
regression due to CVE mitigation. An error is produced when the source ofdocker cp
is set to/
.
19.03.3
2019-10-08
Security
- Patched
runc
in containerd. CVE-2017-18367
Builder
-
Fix builder-next: resolve digest for third party registries. docker/engine#339
-
Fix builder-next: user namespace builds when daemon started with socket activation. docker/engine#373
-
Fix builder-next; session: release forwarded ssh socket connection per connection. docker/engine#373
-
Fix build-next: llbsolver: error on multiple cache importers. docker/engine#373
Client
-
Added support for Docker Template 0.1.6.
-
Mitigate against YAML files that have excessive aliasing. docker/cli#2119
Runtime
-
Bump Golang to 1.12.10. docker/engine#387
-
Bump containerd to 1.2.10. docker/engine#385
-
Distribution: modify warning logic when pulling v2 schema1 manifests. docker/engine#368
-
Fix
POST /images/create
returning a 500 status code when providing an incorrect platform option. docker/engine#365 -
Fix
POST /build
returning a 500 status code when providing an incorrect platform option. docker/engine#365 -
Fix panic on 32-bit ARMv7 caused by misaligned struct member. docker/engine#363
-
Fix to return “invalid parameter” when linking to non-existing container. docker/engine#352
-
Fix overlay2: busy error on mount when using kernel >= 5.2. docker/engine#332
-
Fix
docker rmi
stuck in certain misconfigured systems, e.g. dead NFS share. docker/engine#335 -
Fix handling of blocked I/O of exec’d processes. docker/engine#296
-
Fix jsonfile logger: follow logs stuck when
max-size
is set andmax-file=1
. docker/engine#378
Known Issues
New
DOCKER-USER
iptables chain is missing: docker/for-linux#810. Users cannot perform additional container network traffic filtering on top of this iptables chain. You are not affected by this issue if you are not customizing iptable chains on top ofDOCKER-USER
.- Workaround: Insert the iptables chain after the docker daemon starts.
For example:
iptables -N DOCKER-USER iptables -I FORWARD -j DOCKER-USER iptables -A DOCKER-USER -j RETURN
- Workaround: Insert the iptables chain after the docker daemon starts.
For example:
Existing
- In some circumstances with large clusters, docker information might, as part of the Swarm section,
include the error
code = ResourceExhausted desc = grpc: received message larger than max (5351376 vs. 4194304)
. This does not indicate any failure or misconfiguration by the user, and requires no response. - Orchestrator port conflict can occur when redeploying all services as new. Due to many swarm manager
requests in a short amount of time, some services are not able to receive traffic and are causing a
404
error after being deployed.- Workaround: restart all tasks via
docker service update --force
.
- Workaround: restart all tasks via
- CVE-2018-15664 symlink-exchange attack with directory traversal. Workaround until proper fix is available in upcoming patch release:
docker pause
container before doing file operations. moby/moby#39252 docker cp
regression due to CVE mitigation. An error is produced when the source ofdocker cp
is set to/
.
19.03.2
2019-09-03
Builder
-
Fix
COPY --from
to non-existing directory on Windows. moby/moby#39695 -
Fix builder-next: metadata commands not having created time in history. moby/moby#39456
-
Fix builder-next: close progress on layer export error. moby/moby#39782
-
Update buildkit to 588c73e1e4. moby/moby#39781
Client
-
Fix Windows absolute path detection on non-Windows docker/cli#1990
-
Fix to zsh completion script for
docker login --username
. -
Fix context: produce consistent output on
context create
. docker/cli#1985 -
Fix support for HTTP proxy env variable. docker/cli#2059
Logging
- Fix for reading journald logs. moby/moby#37819 moby/moby#38859
Networking
- Prevent panic on network attached to a container with disabled networking. moby/moby#39589
Runtime
-
Bump Golang to 1.12.8.
-
Fix a potential engine panic when using XFS disk quota for containers. moby/moby#39644
Swarm
- Fix an issue where nodes with several tasks could not be removed. docker/swarmkit#2867
Known issues
- In some circumstances with large clusters, docker information might, as part of the Swarm section,
include the error
code = ResourceExhausted desc = grpc: received message larger than max (5351376 vs. 4194304)
. This does not indicate any failure or misconfiguration by the user, and requires no response. - Orchestrator port conflict can occur when redeploying all services as new. Due to many swarm manager
requests in a short amount of time, some services are not able to receive traffic and are causing a
404
error after being deployed.- Workaround: restart all tasks via
docker service update --force
.
- Workaround: restart all tasks via
- Traffic cannot egress the HOST because of missing Iptables rules in the FORWARD chain
The missing rules are :
/sbin/iptables --wait -C FORWARD -o docker_gwbridge -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT /sbin/iptables --wait -C FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
- Workaround: Add these rules back using a script and cron definitions. The script
must contain ‘-C’ commands to check for the presence of a rule and ‘-A’ commands to add
rules back. Run the script on a cron in regular intervals, for example, every
minutes. - Affected versions: 18.09.1, 19.03.0
- Workaround: Add these rules back using a script and cron definitions. The script
must contain ‘-C’ commands to check for the presence of a rule and ‘-A’ commands to add
rules back. Run the script on a cron in regular intervals, for example, every
- CVE-2018-15664 symlink-exchange attack with directory traversal. Workaround until proper fix is available in upcoming patch release:
docker pause
container before doing file operations. moby/moby#39252 docker cp
regression due to CVE mitigation. An error is produced when the source ofdocker cp
is set to/
.
19.03.1
2019-07-25
Security
- Fixed loading of nsswitch based config inside chroot under Glibc. CVE-2019-14271
Known issues
- In some circumstances, in large clusters, docker information might, as part of the Swarm section,
include the error
code = ResourceExhausted desc = grpc: received message larger than max (5351376 vs. 4194304)
. This does not indicate any failure or misconfiguration by the user, and requires no response. - Orchestrator port conflict can occur when redeploying all services as new. Due to many swarm manager
requests in a short amount of time, some services are not able to receive traffic and are causing a
404
error after being deployed.- Workaround: restart all tasks via
docker service update --force
.
- Workaround: restart all tasks via
- Traffic cannot egress the HOST because of missing Iptables rules in the FORWARD chain
The missing rules are :
/sbin/iptables --wait -C FORWARD -o docker_gwbridge -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT /sbin/iptables --wait -C FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
- Workaround: Add these rules back using a script and cron definitions. The script
must contain ‘-C’ commands to check for the presence of a rule and ‘-A’ commands to add
rules back. Run the script on a cron in regular intervals, for example, every
minutes. - Affected versions: 18.09.1, 19.03.0
- Workaround: Add these rules back using a script and cron definitions. The script
must contain ‘-C’ commands to check for the presence of a rule and ‘-A’ commands to add
rules back. Run the script on a cron in regular intervals, for example, every
- CVE-2018-15664 symlink-exchange attack with directory traversal. Workaround until proper fix is available in upcoming patch release:
docker pause
container before doing file operations. moby/moby#39252 docker cp
regression due to CVE mitigation. An error is produced when the source ofdocker cp
is set to/
.
19.03.0
2019-07-22
Builder
- Fixed
COPY --from
to preserve ownership. moby/moby#38599 -
builder-next:
- Added inline cache support
--cache-from
. docker/engine#215 - Outputs configuration allowed. moby/moby#38898
- Fixed gcr workaround token cache. docker/engine#212
stopprogress
called on download error. docker/engine#215- Buildkit now uses systemd’s
resolv.conf
. docker/engine#260. - Setting buildkit outputs now allowed. docker/cli#1766
- Look for Dockerfile specific dockerignore file (for example, Dockerfile.dockerignore) for ignored paths. docker/engine#215
- Automatically detect if process execution is possible for x86, arm, and arm64 binaries. docker/engine#215
- Updated buildkit to 1f89ec1. docker/engine#260
- Use Dockerfile frontend version
docker/dockerfile:1.1
by default. docker/engine#215 - No longer rely on an external image for COPY/ADD operations. docker/engine#215
- Added inline cache support
Client
- Added
--pids-limit
flag todocker update
. docker/cli#1765 - Added systctl support for services. docker/cli#1754
- Added support for
template_driver
in compose files. docker/cli#1746 - Added
--device
support for Windows. docker/cli#1606 - Added support for Data Path Port configuration. docker/cli#1509
- Added fast context switch: commands. docker/cli#1501
- Support added for
--mount type=bind,bind-nonrecursive,...
docker/cli#1430 - Added maximum replicas per node. docker/cli#1612
- Added option to pull images quietly. docker/cli#882
- Added a separate
--domainname
flag. docker/cli#1130 - Added support for secret drivers in
docker stack deploy
. docker/cli#1783 - Added ability to use swarm
Configs
asCredentialSpecs
on services. docker/cli#1781 - Added
--security-opt systempaths=unconfined
support. docker/cli#1808 - Added basic framework for writing and running CLI plugins. docker/cli#1564 docker/cli#1898
- Bumped Docker App to v0.8.0. docker/docker-ce-packaging#341
- Added support for Docker buildx. docker/docker-ce-packaging#336
- Added support for Docker Assemble v0.36.0.
- Added support for Docker Cluster v1.0.0-rc2.
- Added support for Docker Template v0.1.4.
- Added support for Docker Registry v0.1.0-rc1.
- Bumped google.golang.org/grpc to v1.20.1. docker/cli#1884
- CLI changed to pass driver specific options to
docker run
. docker/cli#1767 - Bumped Golang 1.12.5. docker/cli#1875
docker system info
output now segregates information relevant to the client and daemon. docker/cli#1638- (Experimental) When targeting Kubernetes, added support for
x-pull-secret: some-pull-secret
in compose-files service configs. docker/cli#1617 - (Experimental) When targeting Kubernetes, added support for
x-pull-policy: <Never|Always|IfNotPresent>
in compose-files service configs. docker/cli#1617 - cp, save, export: Now preventing overwriting irregular files. docker/cli#1515
- npipe volume type on stack file now allowed. docker/cli#1195
- Fixed tty initial size error. docker/cli#1529
- Fixed problem with labels copying value from environment variables. docker/cli#1671
API
- Updated API version to v1.40. moby/moby#38089
- Added warnings to
/info
endpoint, and moved detection to the daemon. moby/moby#37502 - Added HEAD support for
/_ping
endpoint. moby/moby#38570 - Added
Cache-Control
headers to disable caching/_ping
endpoint. moby/moby#38569 - Added
containerd
,runc
, anddocker-init
versions to/version
. moby/moby#37974 - Added undocumented
/grpc
endpoint and registered BuildKit’s controller. moby/moby#38990
Experimental
- Enabled checkpoint/restore of containers with TTY. moby/moby#38405
- LCOW: Added support for memory and CPU limits. moby/moby#37296
- Windows: Added ContainerD runtime. moby/moby#38541
- Windows: LCOW now requires Windows RS5+. moby/moby#39108
Security
- mount: added BindOptions.NonRecursive (API v1.40). moby/moby#38003
- seccomp: whitelisted
io_pgetevents()
. moby/moby#38895 - seccomp:
ptrace(2)
for 4.8+ kernels now allowed. moby/moby#38137
Runtime
- Running
dockerd
as a non-root user (Rootless mode) is now allowed. moby/moby#380050 - Rootless: optional support provided for
lxc-user-nic
SUID binary. docker/engine#208 - Added DeviceRequests to HostConfig to support NVIDIA GPUs. moby/moby#38828
- Added
--device
support for Windows. moby/moby#37638 - Added
memory.kernelTCP
support for linux. moby/moby#37043 - Windows credential specs can now be passed directly to the engine. moby/moby#38777
- Added pids-limit support in docker update. moby/moby#32519
- Added support for exact list of capabilities. moby/moby#38380
- daemon: Now use ‘private’ ipc mode by default. moby/moby#35621
- daemon: switched to semaphore-gated WaitGroup for startup tasks. moby/moby#38301
- Now use
idtools.LookupGroup
instead of parsing/etc/group
file for docker.sock ownership to fix:api.go doesn't respect nsswitch.conf
. moby/moby#38126 - cli: fixed images filter when using multi reference filter. moby/moby#38171
- Bumped Golang to 1.12.5. docker/engine#209
- Bumped
containerd
to 1.2.6. moby/moby#39016 - Bumped
runc
to 1.0.0-rc8, opencontainers/selinux v1.2.2. docker/engine#210 - Bumped
google.golang.org/grpc
to v1.20.1. docker/engine#215 - Performance optimized in aufs and layer store for massively parallel container creation/removal. moby/moby#39135 moby/moby#39209
- Root is now passed to chroot for chroot Tar/Untar (CVE-2018-15664) moby/moby#39292
- Fixed
docker --init
with /dev bind mount. moby/moby#37665 - The right device number is now fetched when greater than 255 and using the
--device-read-bps
option. moby/moby#39212 - Fixed
Path does not exist
error when path definitely exists. moby/moby#39251
Networking
- Moved IPVLAN driver out of experimental. moby/moby#38983
- Added support for ‘dangling’ filter. moby/moby#31551 docker/libnetwork#2230
- Load balancer sandbox is now deleted when a service is updated with
--network-rm
. docker/engine#213 - Windows: Now forcing a nil IP specified in
PortBindings
to IPv4zero (<IP_ADDRESS>). docker/libnetwork#2376
Swarm
- Added support for maximum replicas per node. moby/moby#37940
- Added support for GMSA CredentialSpecs from Swarmkit configs. moby/moby#38632
- Added support for sysctl options in services. moby/moby#37701
- Added support for filtering on node labels. moby/moby#37650
- Windows: Support added for named pipe mounts in docker service create + stack yml. moby/moby#37400
- VXLAN UDP Port configuration now supported. moby/moby#38102
- Now using Service Placement Constraints in Enforcer. docker/swarmkit#2857
- Increased max recv gRPC message size for nodes and secrets. docker/engine#256
Logging
- Enabled gcplogs driver on Windows. moby/moby#37717
- Added zero padding for RFC5424 syslog format. moby/moby#38335
- Added
IMAGE_NAME
attribute tojournald
log events. moby/moby#38032
Deprecation
- Deprecate image manifest v2 schema1 in favor of v2 schema2. Future version of Docker will remove support for v2 schema1 althogether. moby/moby#39365
- Removed v1.10 migrator. moby/moby#38265
- Now skipping deprecated storage-drivers in auto-selection. moby/moby#38019
- Deprecated
aufs
storage driver and added warning. moby/moby#38090 - Removed support for 17.09.
For more information on deprecated flags and APIs, refer to https://docs.docker.com/engine/deprecated/ for target removal dates.
Known issues
- In some circumstances with large clusters, docker information might, as part of the Swarm section,
include the error
code = ResourceExhausted desc = grpc: received message larger than max (5351376 vs. 4194304)
. This does not indicate any failure or misconfiguration by the user, and requires no response. - Orchestrator port conflict can occur when redeploying all services as new. Due to many swarm manager
requests in a short amount of time, some services are not able to receive traffic and are causing a
404
error after being deployed.- Workaround: restart all tasks via
docker service update --force
.
- Workaround: restart all tasks via
- Traffic cannot egress the HOST because of missing Iptables rules in the FORWARD chain
The missing rules are :
/sbin/iptables --wait -C FORWARD -o docker_gwbridge -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT /sbin/iptables --wait -C FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
- Workaround: Add these rules back using a script and cron definitions. The script
must contain ‘-C’ commands to check for the presence of a rule and ‘-A’ commands to add
rules back. Run the script on a cron in regular intervals, for example, every
minutes. - Affected versions: 18.09.1, 19.03.0
- Workaround: Add these rules back using a script and cron definitions. The script
must contain ‘-C’ commands to check for the presence of a rule and ‘-A’ commands to add
rules back. Run the script on a cron in regular intervals, for example, every
- CVE-2018-15664 symlink-exchange attack with directory traversal. Workaround until proper fix is available in upcoming patch release:
docker pause
container before doing file operations. moby/moby#39252 docker cp
regression due to CVE mitigation. An error is produced when the source ofdocker cp
is set to/
.