Skip to content

Instantly share code, notes, and snippets.

View neugen86's full-sized avatar

Eugeny Neustroev neugen86

View GitHub Profile
@neugen86
neugen86 / DependencyTools.h
Last active January 29, 2020 08:17
Dependency tool
#pragma once
#include <cassert>
#include <functional>
template <typename T>
class Injection final
{
static T* s_ptr;
class MainCommand;
class MainSucceededCommand;
class MainFailedCommand;
class MyControllerWithStartMethod
{
public:
void start()
{
CommandBuilder<MainCommand> builder;
ListView {
id: list
model: 10
anchors.fill: parent
delegate: Rectangle {
implicitHeight: 50
implicitWidth: list.width
import random
a = 77
b = 88
print "a = ", a
print "b = ", b
array = []
import random
a = 77
b = 88
print "a = ", a
print "b = ", b
array = []
def moagents = (swarm as PreSchedulingSwarm).swarmContext.preschedulingStorage.movingObjectAgents;
moagents.each {
swarm.parallelExecutionService.submit(normalizeClosure(it));
}
while (normalizeCounter.get() < moagents.size()) {}
changed |= normalizeOccured.get()
moagents.each {
swarm.parallelExecutionService.submit(closeUpClosure(it, true));