text:
package de.tu_berlin.formic.common.datastructure.client

import java.util.concurrent.{CountDownLatch, TimeUnit}

import akka.actor.{ActorRef, ActorSystem, Props, Terminated}
import akka.testkit.{ImplicitSender, TestActorRef, TestKit, TestProbe}
import de.tu_berlin.formic.common.controlalgo.{ControlAlgorithmClient, WaveOTClient}
import de.tu_berlin.formic.common.datastructure.FormicDataStructure.LocalOperationMessage
import de.tu_berlin.formic.common.datastructure._
import de.tu_berlin.formic.common.datastructure.client.AbstractClientDataStructure.{ReceiveCallback, RemoteInstantiation}
import de.tu_berlin.formic.common.message._
import de.tu_berlin.formic.common.{ClientId, DataStructureInstanceId, OperationId}
import org.scalatest.Assertions._
import org.scalatest.{Matchers, WordSpecLike}

import scala.concurrent.duration._

/**
  * @author Ronny Bräunlich
  */
class AbstractClientDataStructureSpec extends TestKit(ActorSystem("AbstractClientDataStructureSpec"))
  with WordSpecLike
  with ImplicitSender
  with StopSystemAfterAll
  with Matchers {

  "AbstractClientDataStructureSpec" must {

    "ignore messages until callback is set" in {
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(DataStructureInstanceId(), new AbstractClientDataStructureSpecControlAlgorithmClient, outgoingConnection = TestProbe().ref)))
      val operationMessage = OperationMessage(
        ClientId(),
        DataStructureInstanceId(),
        AbstractClientDataStructureSpec.dataTypeName,
        List(
          AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), "")
        )
      )

      dataType ! LocalOperationMessage(operationMessage)
      expectNoMsg()
      dataType ! operationMessage
      expectNoMsg()
      dataType ! UpdateRequest(ClientId(), DataStructureInstanceId())
      expectNoMsg()

      dataType.underlyingActor.historyBuffer.history shouldBe empty
    }

    "apply received local operations immediately from an local operation message" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      val data = "{foo}"
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, new AbstractClientDataStructureSpecControlAlgorithmClient, outgoingConnection = TestProbe().ref)))
      dataType ! ReceiveCallback((_) => {})
      val operationMessage = OperationMessage(
        ClientId(),
        dataTypeInstanceId,
        AbstractClientDataStructureSpec.dataTypeName,
        List(
          AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), data)
        )
      )

      dataType ! LocalOperationMessage(operationMessage)

      dataType.underlyingActor.data should equal(data)
    }

    "not transform local operations" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      val data = "{foo}"
      val controlAlgo = new AbstractClientDataStructureSpecControlAlgorithmClient
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, controlAlgo, outgoingConnection = TestProbe().ref)))
      dataType ! ReceiveCallback((_) => {})
      val operationMessage = OperationMessage(
        ClientId(),
        dataTypeInstanceId,
        AbstractClientDataStructureSpec.dataTypeName,
        List(
          AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), data)
        )
      )

      dataType ! LocalOperationMessage(operationMessage)

      controlAlgo.didTransform should equal(false)
    }

    "add local operations to the history buffer" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      val data = "{foo}"
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, new AbstractClientDataStructureSpecControlAlgorithmClient, outgoingConnection = TestProbe().ref)))
      dataType ! ReceiveCallback((_) => {})
      val operation = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), data)
      val operationMessage = OperationMessage(
        ClientId(),
        dataTypeInstanceId,
        AbstractClientDataStructureSpec.dataTypeName,
        List(operation)
      )

      dataType ! LocalOperationMessage(operationMessage)

      dataType.underlyingActor.historyBuffer.history should contain(operation)
    }

    "update the operation context of local operations when unacknowledged" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      val data = "{foo}"
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, new AbstractClientDataStructureSpecControlAlgorithmClient, outgoingConnection = TestProbe().ref)))
      dataType ! ReceiveCallback((_) => {})
      val operation = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), data)
      val operation2 = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), data)
      val operationMessage = OperationMessage(
        ClientId(),
        dataTypeInstanceId,
        AbstractClientDataStructureSpec.dataTypeName,
        List(operation)
      )
      val operationMessage2 = OperationMessage(
        ClientId(),
        dataTypeInstanceId,
        AbstractClientDataStructureSpec.dataTypeName,
        List(operation2)
      )

      dataType ! LocalOperationMessage(operationMessage)
      dataType ! LocalOperationMessage(operationMessage2)

      dataType.underlyingActor.historyBuffer.history.head should equal(AbstractClientDataStructureSpecTestOperation(operation2.id, OperationContext(List(operation.id)), operation2.clientId, operation2.data))
    }

    "update the operation context of local operations when acknowledged using the control algorithm" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      val data = "{foo}"
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, new AbstractClientDataStructureSpecControlAlgorithmClient, outgoingConnection = TestProbe().ref)))
      dataType ! ReceiveCallback((_) => {})
      dataType ! CreateResponse(dataTypeInstanceId)
      val operation = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), data)
      val operation2 = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), data)
      val operationMessage = OperationMessage(
        ClientId(),
        dataTypeInstanceId,
        AbstractClientDataStructureSpec.dataTypeName,
        List(operation)
      )
      val operationMessage2 = OperationMessage(
        ClientId(),
        dataTypeInstanceId,
        AbstractClientDataStructureSpec.dataTypeName,
        List(operation2)
      )

      dataType ! LocalOperationMessage(operationMessage)
      dataType ! LocalOperationMessage(operationMessage2)

      dataType.underlyingActor.historyBuffer.history.head should equal(AbstractClientDataStructureSpecTestOperation(operation2.id, OperationContext(List(operation.id)), operation2.clientId, operation2.data))
    }

    "add remote operations to the history buffer" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      val data = "{foo}"
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, new AbstractClientDataStructureSpecControlAlgorithmClient, outgoingConnection = TestProbe().ref)))
      dataType ! ReceiveCallback((_) => {})
      dataType ! CreateResponse(dataTypeInstanceId)
      val operation = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), data)
      val operationMessage = OperationMessage(
        ClientId(),
        dataTypeInstanceId,
        AbstractClientDataStructureSpec.dataTypeName,
        List(operation)
      )

      dataType ! operationMessage

      dataType.underlyingActor.historyBuffer.history should contain(operation)
    }

    "apply received operations from an operation message" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, new AbstractClientDataStructureSpecControlAlgorithmClient, outgoingConnection = TestProbe().ref)))
      dataType ! ReceiveCallback((_) => {})
      val data = "{foo}"
      val operation = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), data)
      val operationMessage = OperationMessage(
        ClientId(),
        dataTypeInstanceId,
        AbstractClientDataStructureSpec.dataTypeName,
        List(operation)
      )

      dataType ! LocalOperationMessage(operationMessage)

      dataType.underlyingActor.data should equal(data)
    }

    "not apply operations when the ControlAlgorithm states they are not ready and store them" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, new AbstractClientDataStructureSpecControlAlgorithmClient(false), outgoingConnection = TestProbe().ref)))
      dataType ! ReceiveCallback((_) => {})
      dataType ! CreateResponse(dataTypeInstanceId)
      val operation = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), "{}")
      val message = OperationMessage(
        ClientId(),
        DataStructureInstanceId(),
        AbstractClientDataStructureSpec.dataTypeName,
        List(operation)
      )
      dataType ! message

      dataType.underlyingActor.historyBuffer.history should not contain operation
    }

    "pass operations to the control algorithm for transformation" in {
      var hasBeenTransformed = false
      val controlAlgo: ControlAlgorithmClient = new ControlAlgorithmClient {
        override def transform(op: DataStructureOperation, history: HistoryBuffer, transformer: OperationTransformer): DataStructureOperation = {
          hasBeenTransformed = true
          op
        }

        override def canBeApplied(op: DataStructureOperation, history: HistoryBuffer): Boolean = {
          true
        }

        override def canLocalOperationBeApplied(op: DataStructureOperation): Boolean = true

        override def currentOperationContext: OperationContext = OperationContext(List.empty) //not important here
      }

      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(DataStructureInstanceId(), controlAlgo, outgoingConnection = TestProbe().ref)))
      dataType ! ReceiveCallback((_) => {})
      dataType ! CreateResponse(DataStructureInstanceId())
      val operation = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), "{1}")
      val message = OperationMessage(
        ClientId(),
        DataStructureInstanceId(),
        AbstractClientDataStructureSpec.dataTypeName,
        List(operation)
      )

      dataType ! message

      hasBeenTransformed should be(true)
    }

    "replace a callback when receiving a new one and kill the old one" in {
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(DataStructureInstanceId(), new AbstractClientDataStructureSpecControlAlgorithmClient(false), outgoingConnection = TestProbe().ref)))
      dataType ! ReceiveCallback((_) => {})
      val oldCallback = dataType.children.head
      val watcher = TestProbe()
      watcher.watch(oldCallback)

      dataType ! ReceiveCallback((_) => {})

      watcher.expectMsgPF(2.seconds) { case Terminated(ref) => ref should equal(oldCallback) }
    }

    "answer UpdateRequests with UpdateResponses" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      val data = "{foo}"
      val operationId = OperationId()
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, new AbstractClientDataStructureSpecControlAlgorithmClient, outgoingConnection = TestProbe().ref)))
      dataType ! ReceiveCallback((_) => {})
      val operation = AbstractClientDataStructureSpecTestOperation(operationId, OperationContext(List.empty), ClientId(), data)
      val operationMessage = OperationMessage(ClientId(), dataTypeInstanceId, AbstractClientDataStructureSpec.dataTypeName, List(operation))

      dataType ! LocalOperationMessage(operationMessage)
      dataType ! UpdateRequest(ClientId(), dataTypeInstanceId)

      expectMsg(UpdateResponse(dataTypeInstanceId, AbstractClientDataStructureSpec.dataTypeName, data, Option(operationId)))
    }

    "answer UpdateRequests with the initial operation id when no operations were executed yet when being unacknowledged" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      val operationId = OperationId()
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, new AbstractClientDataStructureSpecControlAlgorithmClient, Option(operationId), outgoingConnection = TestProbe().ref)))
      dataType ! ReceiveCallback((_) => {})

      dataType ! UpdateRequest(ClientId(), dataTypeInstanceId)

      expectMsg(UpdateResponse(dataTypeInstanceId, AbstractClientDataStructureSpec.dataTypeName, "{test}", Option(operationId)))
    }

    "answer UpdateRequests with the initial operation id when no operations were executed yet when being acknowledged" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      val operationId = OperationId()
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, new AbstractClientDataStructureSpecControlAlgorithmClient, Option(operationId), outgoingConnection = TestProbe().ref)))
      dataType ! ReceiveCallback((_) => {})
      dataType ! CreateResponse(dataTypeInstanceId)

      dataType ! UpdateRequest(ClientId(), dataTypeInstanceId)

      expectMsg(UpdateResponse(dataTypeInstanceId, AbstractClientDataStructureSpec.dataTypeName, "{test}", Option(operationId)))
    }

    "send an HistoricOperationRequest after it receives a remote OperationMessage whose parent it does no know" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      val data = "{foo}"
      val operationId = OperationId()
      val previousOperation = OperationId()
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, new AbstractClientDataStructureSpecControlAlgorithmClient, outgoingConnection = TestProbe().ref)))
      dataType ! ReceiveCallback((_) => {})
      dataType ! CreateResponse(dataTypeInstanceId)
      val operation = AbstractClientDataStructureSpecTestOperation(operationId, OperationContext(List(previousOperation)), ClientId(), data)
      val operationMessage = OperationMessage(ClientId(), dataTypeInstanceId, AbstractClientDataStructureSpec.dataTypeName, List(operation))

      dataType ! operationMessage

      val answer = expectMsgClass(classOf[HistoricOperationRequest])
      answer.sinceId should equal(null)
      answer.dataStructureInstanceId should equal(dataTypeInstanceId)
    }

    "must use the initial operation id for HistoricOperationsRequest if no other operation is present" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      val data = "{foo}"
      val initialOperationId = OperationId()
      val operationId = OperationId()
      val previousOperation = OperationId()
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, new AbstractClientDataStructureSpecControlAlgorithmClient, Some(initialOperationId), outgoingConnection = TestProbe().ref)))
      dataType ! ReceiveCallback((_) => {})
      dataType ! CreateResponse(dataTypeInstanceId)
      val operation = AbstractClientDataStructureSpecTestOperation(operationId, OperationContext(List(previousOperation)), ClientId(), data)
      val operationMessage = OperationMessage(ClientId(), dataTypeInstanceId, AbstractClientDataStructureSpec.dataTypeName, List(operation))

      dataType ! operationMessage

      val answer = expectMsgClass(classOf[HistoricOperationRequest])
      answer.sinceId should equal(initialOperationId)
      answer.dataStructureInstanceId should equal(dataTypeInstanceId)
    }

    "must use the last operation id from a remote operation for a HistoricOperationsRequest if local operations happened in between" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      val data = "{foo}"
      val lastArrivedRemoteOperationId = OperationId()
      val remoteOperationId = OperationId()
      val previousRemoteOperationId = OperationId()
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, new AbstractClientDataStructureSpecControlAlgorithmClient, outgoingConnection = TestProbe().ref)))
      dataType ! ReceiveCallback((_) => {})
      dataType ! CreateResponse(dataTypeInstanceId)
      val arrivedRemoteOperation = AbstractClientDataStructureSpecTestOperation(lastArrivedRemoteOperationId, OperationContext(), ClientId(), data)
      val arrivedRemoteOperationMessage = OperationMessage(ClientId(), dataTypeInstanceId, AbstractClientDataStructureSpec.dataTypeName, List(arrivedRemoteOperation))
      val localOperation = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List(arrivedRemoteOperation.id)), ClientId(), data)
      val localOperationMessage = OperationMessage(ClientId(), dataTypeInstanceId, AbstractClientDataStructureSpec.dataTypeName, List(localOperation))
      val operationWithMissingPredecessor = AbstractClientDataStructureSpecTestOperation(remoteOperationId, OperationContext(List(previousRemoteOperationId)), ClientId(), data)
      val operationMessageWithMissingPredecessor = OperationMessage(ClientId(), dataTypeInstanceId, AbstractClientDataStructureSpec.dataTypeName, List(operationWithMissingPredecessor))

      dataType ! arrivedRemoteOperationMessage
      dataType ! LocalOperationMessage(localOperationMessage)
      dataType ! operationMessageWithMissingPredecessor

      val answer = expectMsgClass(classOf[HistoricOperationRequest])
      answer.sinceId should equal(lastArrivedRemoteOperationId)
      answer.dataStructureInstanceId should equal(dataTypeInstanceId)
    }

    "must use the operation id of an acknowledged local operation for a HistoricOperationsRequest if that was the last remote operation with WaveOT" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      val data = "{foo}"
      val remoteOperationId = OperationId()
      val previousRemoteOperationId = OperationId()
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, new WaveOTClient((op) => {}), outgoingConnection = TestProbe().ref)))
      dataType ! ReceiveCallback((_) => {})
      dataType ! CreateResponse(dataTypeInstanceId)
      val localOperation = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List()), ClientId(), data)
      val localOperationMessage = OperationMessage(ClientId(), dataTypeInstanceId, AbstractClientDataStructureSpec.dataTypeName, List(localOperation))
      val operationWithMissingPredecessor = AbstractClientDataStructureSpecTestOperation(remoteOperationId, OperationContext(List(previousRemoteOperationId)), ClientId(), data)
      val operationMessageWithMissingPredecessor = OperationMessage(ClientId(), dataTypeInstanceId, AbstractClientDataStructureSpec.dataTypeName, List(operationWithMissingPredecessor))

      dataType ! LocalOperationMessage(localOperationMessage)
      dataType ! localOperationMessage //the acknowledgement
      dataType ! operationMessageWithMissingPredecessor

      val answer = expectMsgClass(classOf[HistoricOperationRequest])
      answer.sinceId should equal(localOperation.id)
      answer.dataStructureInstanceId should equal(dataTypeInstanceId)
    }

    "apply the operations of an HistoricOperationRequest that have not been applied" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      val data = "{foo}"
      val operationId = OperationId()
      val previousOperation = OperationId()
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, new AbstractClientDataStructureSpecControlAlgorithmClient, outgoingConnection = TestProbe().ref)))
      dataType ! ReceiveCallback((_) => {})
      dataType ! CreateResponse(dataTypeInstanceId)
      val normalOperation = AbstractClientDataStructureSpecTestOperation(operationId, OperationContext(List.empty), ClientId(), data)
      val missingParentOperation = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List(previousOperation)), ClientId(), data)
      val missingOperation = AbstractClientDataStructureSpecTestOperation(previousOperation, OperationContext(List(operationId)), ClientId(), data)
      val operationMessage = OperationMessage(ClientId(), dataTypeInstanceId, AbstractClientDataStructureSpec.dataTypeName, List(normalOperation))
      val missingParentMessage = OperationMessage(ClientId(), dataTypeInstanceId, AbstractClientDataStructureSpec.dataTypeName, List(missingParentOperation))
      //let the data type first apply an operation
      dataType ! operationMessage

      dataType ! missingParentMessage

      val answer = expectMsgClass(classOf[HistoricOperationRequest])
      answer.sinceId should equal(operationId)

      dataType ! OperationMessage(ClientId(), dataTypeInstanceId, AbstractClientDataStructureSpec.dataTypeName, List(missingParentOperation, missingOperation))

      dataType.underlyingActor.historyBuffer.history should contain inOrder(missingParentOperation, missingOperation, normalOperation)
    }

    "must not apply duplicated received operations" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      //because the control algorithm has to check for duplicates, we have to make sure the data type listens to it
      val controlAlgorithm = new ControlAlgorithmClient {

        override def canLocalOperationBeApplied(op: DataStructureOperation): Boolean = true

        override def transform(op: DataStructureOperation, history: HistoryBuffer, transformer: OperationTransformer): DataStructureOperation = op

        override def canBeApplied(op: DataStructureOperation, history: HistoryBuffer): Boolean = history.findOperation(op.id).isEmpty

        override def currentOperationContext: OperationContext = OperationContext(List.empty) //not important here
      }
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, controlAlgorithm, outgoingConnection = TestProbe().ref)))
      dataType ! ReceiveCallback((_) => {})
      dataType ! CreateResponse(dataTypeInstanceId)
      val data = "{foo}"
      val operation = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), data)
      val operationMessage = OperationMessage(
        ClientId(),
        dataTypeInstanceId,
        AbstractClientDataStructureSpec.dataTypeName,
        List(operation)
      )

      dataType ! operationMessage
      dataType ! operationMessage

      dataType.underlyingActor.historyBuffer.history should equal(List(operation))
    }

    "must not apply duplicated received operations with WaveOT" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      //because the control algorithm has to check for duplicates, we have to make sure the data type listens to it
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, new WaveOTClient((op) => {}), outgoingConnection = TestProbe().ref)))
      dataType ! ReceiveCallback((_) => {})
      dataType ! CreateResponse(dataTypeInstanceId)
      val data = "{foo}"
      val operation = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), data)
      val operationMessage = OperationMessage(
        ClientId(),
        dataTypeInstanceId,
        AbstractClientDataStructureSpec.dataTypeName,
        List(operation)
      )

      dataType ! operationMessage
      dataType ! operationMessage

      dataType.underlyingActor.historyBuffer.history should equal(List(operation))
    }

    "buffer local operations until the CreateResponse comes" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      val data = "{foo}"
      val outgoing = TestProbe()
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, new WaveOTClient(op => outgoing.ref ! op), outgoingConnection = outgoing.ref)))
      dataType ! ReceiveCallback((_) => {})
      val operation = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), data)
      val operation2 = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), data)
      val operationMessage = OperationMessage(ClientId(), dataTypeInstanceId, AbstractClientDataStructureSpec.dataTypeName, List(operation))
      val operationMessage2 = OperationMessage(ClientId(), dataTypeInstanceId, AbstractClientDataStructureSpec.dataTypeName, List(operation2))

      dataType ! LocalOperationMessage(operationMessage)
      dataType ! LocalOperationMessage(operationMessage2)
      dataType ! CreateResponse(dataTypeInstanceId)

      val toServer = outgoing.expectMsgClass(classOf[AbstractClientDataStructureSpecTestOperation])
    }

    "pass acknowledgements to the control algorithm" in {
      val outgoing = TestProbe()
      val dataTypeInstanceId = DataStructureInstanceId()
      val data = "{foo}"
      val operation = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), data)
      val operation2 = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), data)
      val operationMessage = OperationMessage(ClientId(), dataTypeInstanceId, AbstractClientDataStructureSpec.dataTypeName, List(operation))
      val operationMessage2 = OperationMessage(ClientId(), dataTypeInstanceId, AbstractClientDataStructureSpec.dataTypeName, List(operation2))
      val controlAlgorithm = new ControlAlgorithmClient {

        var correctOperationPassed = false

        override def canLocalOperationBeApplied(op: DataStructureOperation): Boolean = true

        override def transform(op: DataStructureOperation, history: HistoryBuffer, transformer: OperationTransformer): DataStructureOperation = op

        override def canBeApplied(op: DataStructureOperation, history: HistoryBuffer): Boolean = {
          if (op == operation) correctOperationPassed = true
          true
        }

        override def currentOperationContext: OperationContext = OperationContext(List.empty) // not important here
      }
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, controlAlgorithm, outgoingConnection = outgoing.ref)))
      dataType ! ReceiveCallback((_) => {})
      dataType ! CreateResponse(dataTypeInstanceId)

      dataType ! LocalOperationMessage(operationMessage)
      dataType ! LocalOperationMessage(operationMessage2)
      //acknowledgement
      dataType ! operationMessage

      controlAlgorithm.correctOperationPassed should be(true)
    }

    "pass local operations to the control algorithm when the CreateResponse comes" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      val data = "{foo}"
      val outgoing = TestProbe()
      val operation = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), data)
      val operation2 = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), data)
      val operationMessage = OperationMessage(ClientId(), dataTypeInstanceId, AbstractClientDataStructureSpec.dataTypeName, List(operation))
      val operationMessage2 = OperationMessage(ClientId(), dataTypeInstanceId, AbstractClientDataStructureSpec.dataTypeName, List(operation2))

      val controlAlgorithm = new ControlAlgorithmClient {
        var first = true
        var correct = true

        override def canLocalOperationBeApplied(op: DataStructureOperation): Boolean = {
          if (first) {
            correct &= op == operation
            op should equal(operation)
            first = false
          } else {
            val comparisonOperation = AbstractClientDataStructureSpecTestOperation(operation2.id, OperationContext(List(operation.id)), operation2.clientId, operation2.data)
            correct &= op == comparisonOperation
            op should equal(comparisonOperation)
          }
          true
        }

        override def currentOperationContext: OperationContext = OperationContext(List.empty)

        override def transform(op: DataStructureOperation, history: HistoryBuffer, transformer: OperationTransformer): DataStructureOperation = op

        override def canBeApplied(op: DataStructureOperation, history: HistoryBuffer): Boolean = true
      }

      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, controlAlgorithm, outgoingConnection = outgoing.ref)))
      dataType ! ReceiveCallback((_) => {})

      dataType ! LocalOperationMessage(operationMessage)
      dataType ! LocalOperationMessage(operationMessage2)
      dataType ! CreateResponse(dataTypeInstanceId)

      controlAlgorithm.correct should equal(true)
    }

    "add initialized lastOperationId to first local operation when being unacknowledged" in {
      val lastOperationId = OperationId()
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(DataStructureInstanceId(), new AbstractClientDataStructureSpecControlAlgorithmClient, Option(lastOperationId), outgoingConnection = TestProbe().ref)))
      dataType ! ReceiveCallback((_) => {})
      val operation = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), "")
      val operationMessage = OperationMessage(ClientId(), DataStructureInstanceId(), AbstractClientDataStructureSpec.dataTypeName, List(operation))

      dataType ! LocalOperationMessage(operationMessage)

      dataType.underlyingActor.historyBuffer.history.head should equal(AbstractClientDataStructureSpecTestOperation(operation.id, OperationContext(List(lastOperationId)), operation.clientId, operation.data))
    }

    "add initialized lastOperationId to first local operation when going from un- to acknowledged" in {
      val lastOperationId = OperationId()
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(DataStructureInstanceId(), new AbstractClientDataStructureSpecControlAlgorithmClient, Option(lastOperationId), outgoingConnection = TestProbe().ref)))
      dataType ! ReceiveCallback((_) => {})
      dataType ! CreateResponse(DataStructureInstanceId())
      val operation = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), "")
      val operationMessage = OperationMessage(ClientId(), DataStructureInstanceId(), AbstractClientDataStructureSpec.dataTypeName, List(operation))

      dataType ! LocalOperationMessage(operationMessage)

      dataType.underlyingActor.historyBuffer.history.head should equal(AbstractClientDataStructureSpecTestOperation(operation.id, OperationContext(List(lastOperationId)), operation.clientId, operation.data))
    }

    "add initialized lastOperationId to first local operation when being a remote instantiation" in {
      val lastOperationId = OperationId()
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(DataStructureInstanceId(), new AbstractClientDataStructureSpecControlAlgorithmClient, Option(lastOperationId), outgoingConnection = TestProbe().ref)))
      dataType ! RemoteInstantiation
      dataType ! ReceiveCallback((_) => {})
      val operation = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), "")
      val operationMessage = OperationMessage(ClientId(), DataStructureInstanceId(), AbstractClientDataStructureSpec.dataTypeName, List(operation))

      dataType ! LocalOperationMessage(operationMessage)

      dataType.underlyingActor.historyBuffer.history.head should equal(AbstractClientDataStructureSpecTestOperation(operation.id, OperationContext(List(lastOperationId)), operation.clientId, operation.data))
    }

    "ignore messages until callback is set when being a remote instantiation" in {
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(DataStructureInstanceId(), new AbstractClientDataStructureSpecControlAlgorithmClient, outgoingConnection = TestProbe().ref)))
      val operationMessage = OperationMessage(
        ClientId(),
        DataStructureInstanceId(),
        AbstractClientDataStructureSpec.dataTypeName,
        List(
          AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), "")
        )
      )
      dataType ! RemoteInstantiation

      dataType ! LocalOperationMessage(operationMessage)
      expectNoMsg()
      dataType ! operationMessage
      expectNoMsg()
      dataType ! UpdateRequest(ClientId(), DataStructureInstanceId())
      expectNoMsg()

      dataType.underlyingActor.historyBuffer.history shouldBe empty
    }

    "consider the initial operation id when searching for context dependency" in {
      val lastOperationId = OperationId()
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(DataStructureInstanceId(), new AbstractClientDataStructureSpecControlAlgorithmClient, Option(lastOperationId), outgoingConnection = TestProbe().ref)))
      dataType ! ReceiveCallback((_) => {})
      dataType ! CreateResponse(DataStructureInstanceId())
      val operation = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List(lastOperationId)), ClientId(), "")
      val operationMessage = OperationMessage(ClientId(), DataStructureInstanceId(), AbstractClientDataStructureSpec.dataTypeName, List(operation))

      dataType ! operationMessage

      //if the data type ignores the lastOperationId as context of the OperationMessage it'll send a HistoricOperationRequest
      expectNoMsg()
    }

    "not remove the inFlightOperation if it is the second operation within the message before transforming the first one against it with WaveOT" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      val data = "{foo}"
      //create own transformer so the context update happens
      val testTransformer = new OperationTransformer {
        override def transform(pair: (DataStructureOperation, DataStructureOperation)): DataStructureOperation = {
          val operation = pair._1.asInstanceOf[AbstractClientDataStructureSpecTestOperation]
          AbstractClientDataStructureSpecTestOperation(operation.id, OperationContext(List(pair._2.id)), operation.clientId, operation.data)
        }

        override protected def transformInternal(pair: (DataStructureOperation, DataStructureOperation), withNewContext: Boolean): DataStructureOperation = {
          pair._1
        }
      }
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, new WaveOTClient((op) => {}), outgoingConnection = TestProbe().ref) {
        override val transformer = testTransformer
      }))
      dataType ! ReceiveCallback((_) => {})
      dataType ! CreateResponse(dataTypeInstanceId)
      val localOperation = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), data)
      val localOperationMsg = OperationMessage(ClientId(), dataTypeInstanceId, AbstractClientDataStructureSpec.dataTypeName, List(localOperation))
      val additionalOperation = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), data)
      val localOperationWithChangedContext = AbstractClientDataStructureSpecTestOperation(localOperation.id, OperationContext(List(additionalOperation.id)), localOperation.clientId, localOperation.data)

      dataType ! LocalOperationMessage(localOperationMsg)

      dataType ! OperationMessage(ClientId(), dataTypeInstanceId, AbstractClientDataStructureSpec.dataTypeName, List(localOperationWithChangedContext, additionalOperation))

      dataType.underlyingActor.historyBuffer.history.find(op => op.id == additionalOperation.id).get.operationContext should equal(OperationContext(List(localOperation.id)))
    }

    "generate a LocalOperationEvent after applying a local operation when unacknowledged" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      val data = "{foo}"
      val latch = new CountDownLatch(1)
      val operation = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), data)
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, new AbstractClientDataStructureSpecControlAlgorithmClient, outgoingConnection = TestProbe().ref)))
      dataType ! ReceiveCallback((event: ClientDataStructureEvent) => {
        event.asInstanceOf[LocalOperationEvent].operation should equal(operation)
        latch.countDown()
      })
      val operationMessage = OperationMessage(
        ClientId(),
        dataTypeInstanceId,
        AbstractClientDataStructureSpec.dataTypeName,
        List(operation)
      )

      dataType ! LocalOperationMessage(operationMessage)

      val awaiting = latch.await(5, TimeUnit.SECONDS)
      awaiting should equal(true)
    }

    "generate a LocalOperationEvent after applying a local operation when acknowledged" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      val data = "{foo}"
      val latch = new CountDownLatch(1)
      val operation = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), data)
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, new AbstractClientDataStructureSpecControlAlgorithmClient, outgoingConnection = TestProbe().ref)))
      dataType ! RemoteInstantiation
      dataType ! ReceiveCallback((event: ClientDataStructureEvent) => {
        event.asInstanceOf[LocalOperationEvent].operation should equal(operation)
        latch.countDown()
      })
      val operationMessage = OperationMessage(
        ClientId(),
        dataTypeInstanceId,
        AbstractClientDataStructureSpec.dataTypeName,
        List(operation)
      )

      dataType ! LocalOperationMessage(operationMessage)

      val awaiting = latch.await(5, TimeUnit.SECONDS)
      awaiting should equal(true)
    }

    "generate a RemoteOperationEvent after applying a remote operation when acknowledged" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      val data = "{foo}"
      val latch = new CountDownLatch(1)
      val operation = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), data)
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, new AbstractClientDataStructureSpecControlAlgorithmClient, outgoingConnection = TestProbe().ref)))
      dataType ! RemoteInstantiation
      dataType ! ReceiveCallback((event: ClientDataStructureEvent) => {
        event.asInstanceOf[RemoteOperationEvent].operation should equal(operation)
        latch.countDown()
      })
      val operationMessage = OperationMessage(
        ClientId(),
        dataTypeInstanceId,
        AbstractClientDataStructureSpec.dataTypeName,
        List(operation)
      )

      dataType ! operationMessage

      val awaiting = latch.await(5, TimeUnit.SECONDS)
      awaiting should equal(true)
    }

    "generate a CreateResponseEvent after receiving a CreateResponse" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      val data = "{foo}"
      val latch = new CountDownLatch(1)
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, new AbstractClientDataStructureSpecControlAlgorithmClient, outgoingConnection = TestProbe().ref)))
      dataType ! ReceiveCallback((event: ClientDataStructureEvent) => {
        event should equal(CreateResponseEvent(dataTypeInstanceId))
        latch.countDown()
      })

      dataType ! CreateResponse(dataTypeInstanceId)

      val awaiting = latch.await(5, TimeUnit.SECONDS)
      awaiting should equal(true)
    }

    "generate an AcknowledgementEvent when receiving an remote operation and the control algorithm states it cannot be applied" in {
      val dataTypeInstanceId = DataStructureInstanceId()
      val data = "{foo}"
      val latch = new CountDownLatch(1)
      val operation = AbstractClientDataStructureSpecTestOperation(OperationId(), OperationContext(List.empty), ClientId(), data)
      val dataType: TestActorRef[AbstractClientDataStructureTestClientDataStructure] = TestActorRef(
        Props(new AbstractClientDataStructureTestClientDataStructure(dataTypeInstanceId, new AbstractClientDataStructureSpecControlAlgorithmClient(canRemoteBeApplied = false), outgoingConnection = TestProbe().ref)))
      dataType ! RemoteInstantiation
      dataType ! ReceiveCallback((event: ClientDataStructureEvent) => {
        event.asInstanceOf[AcknowledgementEvent].operation should equal(operation)
        latch.countDown()
      })
      val operationMessage = OperationMessage(
        ClientId(),
        dataTypeInstanceId,
        AbstractClientDataStructureSpec.dataTypeName,
        List(operation)
      )

      dataType ! operationMessage

      val awaiting = latch.await(5, TimeUnit.SECONDS)
      awaiting should equal(true)
    }
  }
}

class AbstractClientDataStructureTestClientDataStructure(
                                                dataStructureInstanceId: DataStructureInstanceId,
                                                clientControlAlgorithm: ControlAlgorithmClient,
                                                lastOperationId: Option[OperationId] = Option.empty,
                                                outgoingConnection: ActorRef)
  extends AbstractClientDataStructure(dataStructureInstanceId, clientControlAlgorithm, lastOperationId, outgoingConnection) {

  var data = "{test}"

  override val dataStructureName: DataStructureName = AbstractClientDataStructureSpec.dataTypeName

  override val transformer: OperationTransformer = new OperationTransformer {
    override def transform(pair: (DataStructureOperation, DataStructureOperation)): DataStructureOperation = pair._1

    override def bulkTransform(operation: DataStructureOperation, bridge: List[DataStructureOperation]): List[DataStructureOperation] = bridge

    override protected def transformInternal(pair: (DataStructureOperation, DataStructureOperation), withNewContext: Boolean): DataStructureOperation = pair._1
  }

  override def apply(op: DataStructureOperation): Unit = {
    op match {
      case test: AbstractClientDataStructureSpecTestOperation => data = test.data
      case _ => fail
    }
  }

  override def getDataAsJson: String = data

  override def cloneOperationWithNewContext(op: DataStructureOperation, context: OperationContext): DataStructureOperation = {
    op match {
      case abstr: AbstractClientDataStructureSpecTestOperation => AbstractClientDataStructureSpecTestOperation(abstr.id, context, abstr.clientId, abstr.data)
    }
  }
}

case class AbstractClientDataStructureSpecTestOperation(id: OperationId, operationContext: OperationContext, var clientId: ClientId, data: String) extends DataStructureOperation

object AbstractClientDataStructureSpec {
  val dataTypeName = DataStructureName("AbstractClientDataType")
}

class AbstractClientDataStructureSpecControlAlgorithmClient(canRemoteBeApplied: Boolean = true) extends ControlAlgorithmClient {

  var didTransform = false

  var context: List[OperationId] = List.empty

  override def canLocalOperationBeApplied(op: DataStructureOperation): Boolean = {
    context = List(op.id)
    true
  }

  override def canBeApplied(op: DataStructureOperation, history: HistoryBuffer): Boolean = canRemoteBeApplied

  override def transform(op: DataStructureOperation, history: HistoryBuffer, transformer: OperationTransformer): DataStructureOperation = {
    context = List(op.id)
    didTransform = true
    op
  }

  override def currentOperationContext: OperationContext = {
    OperationContext(context)
  }
}

redpajama_set_name: RedPajamaGithub


text:
Terror in the Kingdom - Chapter One
Two metallic doors closed with a soft click, and the elevator began its rapid, three-story ascent to the top of the Astro Orbiter. Grayson Hawkes' ride up to the attraction's loading platform would only take a few moments, but as the doors shut and the floor beneath him began to vibrate, Hawk knew he had made an error. On a normal night in Walt Disney World's Magic Kingdom, guests rode this elevator skyward along the gantry and were deposited into the boarding area of the Astro Orbiter. The genesis of Hawk's mistake was in assuming this night was normal.
In recent years, Hawk had the galactic attraction—the visual centerpiece of Tomorrowland—refurbished so that now, not only did the twelve rockets rotate around the ornate ironwork of the center tower, but the planets also swirled around the outside of the attraction. The proximity of the twirling planets and moons spinning around the rockets while the open-air starships rotated in the opposite direction created the illusion of speed at a dizzying height. Guests controlled their space flights from eighty feet up in the Tomorrowland sky, while enjoying a unique and thrilling view of Magic Kingdom. To further enhance the illusion, guests now had to ride one of these two elevators up along the launchpad gantry to board their starship.
Hawk had stepped inside the elevator marked Lift B to Rocket Platform, and pushed the button that would take him to the top of Rocket Tower Plaza. But a hitch in the upward movement of the car gave way to a sudden jerk, and the lift squeaked to a halt between the second and third levels. The ride had lasted just a few moments, but it was long enough for Hawk to realize he had stepped into a trap. The unplanned stop could have been a random malfunction, yet somehow Hawk knew this was not the case. In his rushed attempt to reach the top of the Astro Orbiter, he had ignored what should have been obvious. He had ignored the possibility of danger.
Reflexively, he pressed the control buttons, but the elevator wouldn't budge. The lights inside flickered and then went to black. For a few brief seconds, Hawk was swallowed up by darkness until an emergency light fought through the inkiness and cast an eerie jade glow across the interior of the cabin. Hawk took advantage of the illumination to start looking for a way out. The ominous sensation of being trapped inside the closed box threatened to cloud his clarity in searching for an escape.
An explosion jarred the elevator car violently and the gantry structure shuddered, driving Hawk against the floor. His ears ringing from the deafening blast, he placed a steadying hand along the wall and willed himself back to his feet. The elevator car swayed. Through the ringing he heard what sounded like a hiss of steam. A surge of smoke filled the cabin of the elevator, and waves of overheated air rushed into his lungs causing him to gasp. The temperature inside the elevator was rapidly rising, and Hawk widened his eyes to see through the smoke.
His brain screamed at him to find a way out. Now on his feet, he began mentally replaying the loop of memory he had created moments before. There was an escape hatch on the roof of the elevator. He had seen it. All he had to do now was find it. He had been in situations more dangerous than this; he just had to orient himself and get out while he was still able to think through the fog of smoke that threatened to smother him. Stretching out his arms, he jumped up off the elevator floor and hit the roof. He had guessed correctly; it retracted at his touch. Through the blinding haze, he felt his way along the wall and grasped the handrail. He lifted his foot up onto it and launched himself, his fists blasting through the escape panel. Grabbing one side of it, he gripped it tightly, swung his body away from the wall, and pulled himself up.
Thick smoke raced upward through the opening, hungrily searching for an escape, and Hawk attempted to ride it toward safety. With both hands gripped along the edge of the opened hatch he pulled his body up in the billowing flumes, through the opening. He was holding his breath, halfway through the hole when a second explosion ripped through the elevator shaft, lifting the car and tossing it back and forth like a pinball trapped between two bumpers. The violent movement tore his hands away from their precious grip on hope, and he was flung like a ragdoll through the air. His body, now covered in slick sweat, thundered onto the bottom of the car. The four-sided metallic fist that had trapped him now retightened its grip. Overhead, glowing orange flames peeked through the crawling smoke. Hot sparks rained down through the opening, and a searing pain in the back of his throat prevented him from crying out for help.
The moment he had pressed the button on the elevator, Hawk somehow knew he had miscalculated. He'd made a mistake. This was his fault. He had failed, and this time they had finally beaten him. His chest heavy, and struggling to find his next breath, Hawk closed his eyes as the heat inside the furnace he was trapped in engulfed him.

redpajama_set_name: RedPajamaCommonCrawl


As secondary and post-secondary institutions become increasingly more sophisticated in how they educate and work with students, emerging methods of learning and new technologies are playing a significant role in improving outcomes for students. Educational institutions are prioritizing the student experience and experimenting with new methods to increase engagement and relevance for students in both the secondary and post-secondary spaces.
Here are three education trends we'll be seeing more of in 2019 and in the years to come.
The creation of active learning spaces is a trend that is has taken off in both the professional and educational worlds. The spaces are designed to offer choices to the student – rather than a traditional classroom setting with theatre-style seating, these spaces may have high top tables, comfortable chairs or even sofas, to encourage active participation and facilitate dialogue amongst the students.
Flexible learning is also gaining traction in the educational space. Secondary schools are experimenting with later start times, in response to data that suggests teens perform better if they begin later in the morning. Remote learning can also make snow days a thing of the past, as schools test methods of delivering material remotely when students can't physically attend school.
Flexible learning can also mean post-secondary schools offering open schedules for their students, to accommodate the changing demographics of students. The programs are structured to offer more flexibility for those students with part-time or full-time jobs, family commitments, or other situations that could impede access to the traditional model of full-time, on-campus learning. Post-secondary institutions are now focused on creating an environment of student success, rather than a defined start and finish.
Designing programs that allow students to enter university without a pre-defined goal, and which allow students to discover their own interests or strengths while learning also creates higher engagement levels and produces better outcomes. BA and BSc programs are now being structured to permit students to course-correct while in program, instead of starting from scratch if they decide that their chosen concentration is not for them.
New technologies are increasingly being employed to enhance the student learning experience. Artificial Intelligence (AI) technologies are being used to streamline administrative tasks and may soon be used to assess individual learning needs and recommend a personalized learning plan, enabling teachers to do their job more effectively and ensuring the best possible education for the student.
Virtual Reality (VR) is being used to provide students with experiences that would otherwise be too expensive or even impossible to replicate in the real world. Biology students can learn about human anatomy via simulations of human organs, and medical students can practice dissections without a real cadaver.
Digital alerts, or "nudging" is another tool being used by universities to encourage student success. Starting before the student even arrives at the school, in the form of texting or emailing the student, nudging is used to remind new students to complete enrolment requirements, sign up for programs or inform them of the university's resources. Throughout the student's life at the school, nudging is used for a variety of personalized communications, such as a reminder of deadlines or an offer for tutoring. Schools testing these nudges have reported an up-tick in the success rates of their student goals and graduation rates.
Digital badging, or the offering of new specific credentials within the post-secondary setting, is also an emerging trend. Students can earn badges for a range of skills, from specific technical skills, such as those offered in partnership with technology firms, all the way to soft skills such as intercultural fluency and critical thinking. Students like that they can demonstrate mastery of concrete skills to potential employers, and employers appreciate knowing that the students they hire are already proficient in those skills they need.
These advances in learning methods and technologies are all aimed at providing better support for the student and improving student outcomes. Students can focus better on their course material and gaining expertise in their chosen areas of study, and can explore the options available to them throughout their secondary and post-secondary educational careers. Student success is also the priority at Knowledge First Financial. By providing education and tools to students and their parents on the financial aspects of post-secondary education, KFF aims to support every student in building the financial foundation to achieve their post-secondary goals.
For more information on how Knowledge First Financial can help you or your student plan for the future with a Registered Education Savings Plan (RESP), contact your Knowledge First Financial representative here.


GUARDIANS OF THE GALAXY! Join a team that will be responsible for assessing and evaluating the cyber security posture of one of the largest healthcare systems in the Southeast. You will be responsible for aiding in security services delivery, which includes the use of application / network / firmware / hardware security tool sets, detection of security defects, and remediation consultation of those weaknesses. Your team supports the identification of potential attack techniques and serves as the foundation for continuously improving the information systems security profile of the entire health system. You will:  Partner with tools and technology teams to troubleshoot, develop, select, implement and automate appropriate security solutions to keep system data / patient record information protected from internal and external threats. Key Projects Underway: . Cisco ISA implementation . Cisco ACI - system lockdown . Domain Hardening . Two Factor Authentication (Imprivata) . Mobile Device Management - VMWare Workspace One . EPIC EMR implementation go live in 2020 You should have: Bachelor's degree in computer science or software engineering, electrical engineering or equivalent experience We value: Experience in vulnerability scanning, SEIM, penetration testing, network admission control, advanced malware protection and/or mobile device management A basic understanding of design, implementation and operations experience with security technologies that includes, but not limited to: IDS/IPS Firewalls Log Analysis SIEM Network Behavior Analysis tools Antivirus, Identity Management and governance technologies, SSO and Federation technologies RBAC and fine grained access control strategies Web application authentication processes Network Packet Analyzers and basic malware analysis Preferred experience in/with: Tenable Security Center, QRadar, Nmap, Core Impact, Cisco ISE and Cisco AMP Red Team / Blue Team HIPAA Risk Assessments and HIPAA Audits ( highly desired ) A successful implementation of one or more Security Frameworks Are you truly committed to investing in your growth about security? We really value that. We would like to see one or more ACTIVE certifications: CISSP CISA OSCP OSCE CRisc If you love the idea of working in a 'Patient-Centered Care' environment, in a beautiful part of Tennessee - and making a real difference in the protection of invaluable data - we'd love to have a conversation. Please apply today.


text:
I've decided to start a blog…
Well, actually, we (Fascinating Aïda) used to write a web diary before the word blog was even invented, so I'm only returning to form. And I'm starting by publishing the e-postcards of my holiday in India earlier this year. I'll publish them every few days and then I'll start writing about my life and my forthcoming trip to NYC and all that sort of thing…
So, in 2013, my partner and I went to Burma, and I was so bewitched by the place that I did something I've never done before. I bombarded my friends and relations with e-postcards. I burbled like a lunatic. Pals were kind enough to say how much they'd enjoyed them, and so when I told people that John and I were off to India, quite a few of them asked if I was going to send e-postcards again, and if so, could I please include them on the mailing list.
I have to say I was a bit dubious. Burma, or rather Myanmar, as we must learn to call it, was relatively undiscovered, and it felt like I'd stumbled into a marvellous hidden Shangri-La. I wanted friends to share my enthusiasm and visit the place before it gets spoiled by, er, people like me… On the other hand, lots of people have been to India, it's hardly the most original place to go on yer holliers… Well, our holiday turned out to be so eventful that I sent LOTS of e-postcards after all, and here they are.
For reasons that will become plain, you will also see that we had very good reason to be very cross indeed with our travel company. On our return to the UK, there was quite a bit of toing and froing between us, and they ended up refunding us a very significant proportion of the cost of the holiday. So having concluded business amicably with them, I have decided to conceal their name. They're actually nice people, we had a great holiday in Burma thanks to them, and I think they learned a lot through our rather mixed experiences. So I don't want to make them suffer any more by trashing their name in public. But I have to add that if I hadn't been able to let off steam in these e-pcs., it would have been a great deal harder to see the funny side…
Finally, before you launch into the rest of this nonsense, a word about my Beloved. John is one of life's originals. He's not just an Irish "character" – he's what the Irish themselves would call a character. The first thing you notice about him is his pinkness. He has one of those Irish complexions that have deepened in pinkness over the years through relentless conviviality and a life largely spent on the back of a horse. He no longer rides these days, which gives him even more time for conviviality.
The second notable thing about him is the way his brain works. He can work out the turn of a percentage point and recall the exact sums involved in deals he did forty years ago. He knows the lineage of thousands of racehorses, he can tell you whether the Such-and-such Chase at Chepstow is a 2m 4f event, and will name past winners with ease. He can tell you who is related to who in the county and knows the name of every hill, copse and dale for a radius of 20 miles, whose land is whose, and what they farm. But he cannot remember foreign words or names at all. They just don't go in. Mortadella, for instance, is now known by the family as Moritelli, because that's what he thinks it's called.
We really couldn't be more opposite. He is utterly Irish, I'm quite English after being born here and spending 63 years living in the UK. He's instinctive, I'm a tedious fact checker. He says of me, "Ah, Dillie, never uses one word where five will do." Early on in our relationship, he looked at me gloomily and said, "I don't think this relationship'll ever work. We've nothing in common."
"Nonsense!" I said. "We've got lots in common."
"What?" he asked.
"I'm a showbiz floozy and you're a racetrack Johnny." He laughed, and the question has never arisen again.
Above all, he's wonderful company, great fun, and he loves a little gargle. Followed by another gargle or three. And possibly one for the road. And then definitely one for the ditch. He's a giver, and he's always the first to buy a round. And he often hasn't a fekking clue what I'm talking about, but we rub along awfully well.
There's more to him than that, my long-suffering Beloved, but that will do for a thumbnail sketch.
E-Postcard No. 1
Sent on January 12 2016
Oh, I was so nearly doomed to send this first e-postcard from Abu Dhabi…
Two disasters were averted en route. As we sped merrily out of the gates and down the road, I had a yet another neurotic check in the Travel Document Wallet (handily labelled "Travel Documents" for eezi-identification) and discovered I'd packed my old passport. Fekk! A mistake so simply made – I'd been scanning the old one the night before for my US Visa application and clearly mistook it in my tired state. Only a few hundred yards down the road, phew. Whizz back, run into house. Small black dog delighted to see me back having whined terribly at the sight of the suitcases leaving the house, oh dear. But at least first disaster averted.
So then I had a two-minute panicked hunt for the new passport. Not in its usual drawer. Not on the desk. Nowhere! Eek and fekk! Second disaster loomed. What prompted me to open my iPad, I shall never know, for there it was, sandwiched neatly between screen and leather cover. Last seen when my occasional PA, Julie, was applying for my Indian visa… Jeez, I could'ha' been searching for hours. Second disaster averted!
Off again, hurrah, apart from the gloom of the small black dog who whimpered piteously all over again. Pangs of guilt clutch at the heart, but just not quite enough to cancel everything and stay home.
Our holidays always start at the Seafood Bar on the other side of Customs. A crab salad and a glass of something Chablis-ish, wearing the über glam Bulgari sunnies that only come out once a year. I can't see anything through them, but what the hell, they're to be looked at, not through. Then Etihad whisked us in enormous comfort as far as Abu Dhabi, and there the well-laid plans fell apart. Our Indian Visas were not complete – we were missing the final page with the bar code – and so the plane flew off without us. Boo hoo.
When something like that happens, a fog descends over the brain as you try to work out why/when/what-the-fekk. We trudged back to the business lounge and over a glass of white, gradually the fog cleared, and I worked out what had gone wrong. Julie, aforementioned, who works for John and I on an ad hoc basis, did the applications for me, and printed out the relevant pages, replies etc. I understood that everything was done and dusted, and that our passports would be electronically scanned at arrival in Cochin and they would wave us through with a merry smile. Anything but. I was apparently supposed to get an email from the Indian Visa office which would enclose another document – with the requisite bar code.
Another glass of wine cleared the last remaining foggy bit from my mind. A month's worth of emails were lost in the Great iCloud Disaster of 2015 when some kind of malware thoroughly fekked me over. I didn't get any emails for a month, and then 788 emails arrived. I saw a few of them, went to get a coffee, and when I got back to my desk, every single email had disappeared and all boxes were empty. Yes, including trash. As I said to Paul, the Apple functionary with whom I communicated, it was the equivalent of my Postman refusing to deliver my letters for a month, then delivering all of them, and ten minutes later coming into the house and setting fire to them and my filing cabinet into the bargain. So clearly, I didn't get those key emails that would have got John and I onto our very expensive Etihad connection to Cochin.
After an hour of navigating the circular nature of the Indian Visa Website, which has obviously taken its inspiration from those telephone automated answering systems that keep sending you back to the primary message, we had our visas printed. Of course they were there all the time. So now all that remained was to get ourselves onto the next flight.
This proved to be another nightmare. I couldn't get in touch with Expensive Travel as they were all in bed back in England. I couldn't get in touch with their partner firm in India as they were all in bed out East. And Etihad informed us that if we simply booked ourselves onto another flight, all our subsequent flights would be summarily cancelled – i.e. our flights back home at the end. They absolutely had to be re-booked by the travel company using the travel booking reference. FEKKITY FEKKITY FEKK! What kind of mad bureaucracy is this? Given that we were waiting for everyone else to wake up, this meant we were looking at a longish stopover in bloody Abu Dhabi… I have nothing against the place, other than the fact that I didn't want to be there at all.
Well, dear reader, if I can keep a three woman singing act going for 32 years in spite of Soprano Number 1, Soprano Number 2, Soprano Number 3, Soprano Number 4 and Soprano Number 5, I can get round this problem. Another glass of wine, therefore: hey, might as well drink as much free hooch as we can, because we've well and truly been EtiHad.
(Actually, I will say this – the girls in the Business Lounge were pretty bloody brilliant, and we used their phone for hours.)
A long conversation with a Mr. Abdul in Flight Transfers, me politely pleading and telling him it was the holiday of a lifetime and we were pensioners who'd saved for years for this, produced a result. He wouldn't reschedule our flights under any circumstances, but gave me the number of the Global Booking Centre for Etihad in Manchester and said they might have an emergency number for our travel agents.
I got through to Steve Morris on the night shift in Manchester. I told him my tale of woe.
"So Steve, Mr Abdul in Flight Transfers told me that you would be able to change our booking." (Which wasn't what he'd said at all, of course.) "I see there's a Jet Airways flight at 10.25 am and they're apparently Etihad's partner airway…"
"I'll do what I can," said charming Steve.
Another glass of wine.
Steve rang back. He could indeed change the flights, using our booking reference. Joy! But he couldn't get us on the 10.25, we'd have to wait 24 hours because that was the only option the system was giving him. Ahhh, the good old System. And yet we'd seen that seats were available on all flights before that. Hmmm.
A quick top up of the good old vino, and back to Mr. Abdul.
"Hello, Mr. Abdul, you are a total star! Steve in Manchester can change the flights, he just wants you to release the flights on the system so that he can get us onto the 10.25 Jet Airways flight." (Which wasn't what Steve had said at all, but it was worth a try.)
Bless Mr. Abdul, he fixed it so that Steve could book the two seats on the 10.25. Another glass of wine to celebrate.
Several phone calls to both Steve and Mr. Abdul later (believe me, this story is a lot longer in reality) and we had paid £300 each. Ouch. Our seats were finally secured at 8.10 am and Cat, the Hostess who'd dealt with us for much of the night, went off with our passports to get our tickets released while we celebrated with some breakfast. Even John had run out of enthusiasm for wine.
(It turned out that Expensive Travel had been on the case after all – I'm a Facebook friend of B, the guy who organised our Burma trip, and had panic-messaged him at half past midnight UK time. When he hadn't replied by 1.15, I assumed he was asleep. He'd got the message and rung M, the India specialist, who'd been working on the flights too. I turned on my laptop at the fourth (sixth?) glass of wine to find messages from both of them, and after a long chat with M, we realised I was a lot farther down the road to success with my Mr. Abdul and nice Steve Morris in Manchester than he was. Yay!)
Well, dear reader, you would think that we could now relax and possibly even have a quick kip. HA! The tension ratcheted up yet further. Ali in Flight Transfers (I was on first name terms with about 30 people by the end) was having difficulty in getting Jet Airways to release our tickets and thus our boarding passes. Bianca in Business Solutions thought she knew where our luggage was, but had to speak to Ahmed in Luggage Transfers to find out.
The clock ticked by. Cat spoke to Ali again who contacted Mehmet in Jet Airways. Mehmet could not release the tickets. Dunno why. Mahmood was summoned, and Ahmed from Transfers liaised between all of them. I don't know where Mahmood fitted in to all this, but he was key. Cat's supervisor was on the phone to Fatima in Onward Operations who had strong links with Bianca in Business Solutions. At one stage, Cat herself had three phones to her two ears, which was challenging but she managed it with good grace and preternatural calm. It made me wonder how airlines select Lounge Hostesses; perhaps they throw pots of rice pudding over them and only hire the ones who smile and say thank you?
09.45. Still no tickets, and the luggage could not be released till our tickets were printed. Having been dogged but charming all night, I was now having palpitations. The airport is ENORMOUS and the flight gate was at the far end. I had visions of John and I collapsing with heart failure trying to get to the fekking plane.
"Will Etihad take responsibility if we miss these flights?"
"We're doing all we can, mam!"
Slightly louder, and through clenched teeth. "WILL ETIHAD TAKE RESPONSIBILITY IF WE MISS THESE FLIGHTS?"
Finally, we all belted to the Transfer desk in the hope that we might do better there. No. No ticket, no tickets… Then suddenly, TICKETS!!!
RUN!
Arrive at gate, just make it on board!
Collapse on plane!
Message from cabin steward, our luggage is on the plane!
Relief!
And so we arrived in this lovely spot, only 6 hours late.
And now I am too tired to tell you how nice it is here. But believe me, it is.


Good indoor air quality is essential to our health. Indoor Air Quality (IAQ) is a term referring to the air quality within buildings where we live, work, learn, etc. Most of us spend up to 90% of our time indoors, where the air quality can be up to 100 times more polluted than outdoor air. Since many of these pollutants can cause serious health problems, we should be as concerned about the quality of the air we breathe as the quality of the water we drink.
Asthma triggers such as moulds, dust mites, pet hairs, second-hand smoke, etc. cause symptoms including coughing, chest tightness, wheezing, and breathing problems.
Reducing asthma triggers by removing materials harbouring dust mites, preventing smoking indoor, preventative cleaning and dusting, etc.


Tickets for Noel Gallagher's expanded UK arena tour go onsale this morning (November 25) at 9am (GMT).
The former Oasis man added seven more shows to his 2012 arena tour after the first batch of seven shows sold out.
The fresh dates at Aberdeen P&J Arena (February 14) and Sheffield Motorpoint Arena (February 19) will be slotted into the original February tour.
The other five shows in Edinburgh, Bournemouth, Liverpool, Cardiff and Nottingham will take place in July and September.
Noel Gallagher released his debut solo album 'Noel Gallagher's High Flying Birds' on October 17 this year.


text:
You are here: Home » Related Topics
Category: Related Topics
UAE: Glitzy Dubai eyes profit in setting Islamic standards
The emirate is mounting the world's first systematic drive to profit from "halal" goods and services by setting global standards for them, as part of its plans to make the emirate a center of the "Islamic economy"
UAE leads global halal standardisation drive
UAE is taking a lead in efforts to create unified global halal standards that would offer a single point of reference and certification to manufacturers, consumers as well as suppliers.
UAE Halal check: Meat, pudding, lipstick, carpets
UAE residents do not need to worry about the food chain in the UAE," said Al Badri. "Currently all food products on the shelves are halal, we are looking at the regulations in this sector.
UAE: UAE bank offers gold bullion coins as profitable and safe investment option for clients
Noor Islamic Bank (Noor) has rolled out sales of the UAE gold bullion coins for retail buyers in denominations of one, half, quarter and one/tenth ounce in 99.99 per cent purity (24 karat).
Opinion: Questions over Halal industry approach
The SAMI halal food index has about 95 companies from Malaysia, yet, Bursa Malaysia has not created a halal economic sector index.
Opinion: Faking It
For many Muslim brands, the failure to be truly Islamic is not through lack of trying – Shari'ah-compliant funding simply isn't there.
Opinion: Rebranding of Islamic Finance: Participation Finance
One of the most often heard statements at Islamic finance conferences, after standardization, has been, "Islamic finance is not just for Muslims, but for all of man-kind because of its ethical orientation".
Saudi Arabia: Industry Leaders To Converge At Foodex For The Saudi Food Forum
The forum invites industry experts to dissect the local market in terms of opportunities, key initiatives, innovation, challenges and sustainable growth.
Singapore Muslims embrace technology to practise their faith
"All this cumulates to an arguably effortless life that combines ancient wisdom with contemporary living, as long as we Muslims adhere to the correct teachings of Islam moderately."
UK: Halal food firm launching new Blackburn shop
The acquisition is part of an ongoing growth plan, which has already seen the creation of additional jobs, new industry accreditations and the launch of a successful European export sales strategy.
UAE: Food outlet named business of the year in SME awards
Just Falafel was named Gulf Capital Business of the Year at MEED's Gulf Capital SMEinfo Awards for small and medium-sized enterprises (SMEs) .
UK: WIEF urges reforming global financial system
The 9th World Islamic Economic Forum (WIEF) called Friday for introducing essential reforms to the global financial system in order to overcome the economic challenges.
UK: New Halal product range launched by KQF
KQF, the British manufacturer of halal meat products, has announced the launch of two new ranges of frozen convenience foods, which are available to both trade and consumer clients.
UK: Britain unveils 'Islamic Finance and Investment Group'
The Islamic Finance and Investment Group, chaired by the Rt. Hon Baroness Warsi, will include members from key Islamic finance centres, including Chief Executives and Central Bank Governors.
Global peace impossible without fair deal for the poor, says IDB President
Mr. Ali, who was speaking in London at the World Islamic Economic Forum, WEF, called for the reform of the global economy in order to rescue the world from the current and future economic turmoil, particular its negative impact on developing countries.
Malaysian leadership in capital markets
Rushdi Siddiqui comments on the Malaysian Budget 2014, with special reference to Socially Responsible Investment (SRI) and the Environmental, Social and Governance (ESG) Index; and wonders why Halal did not get much of a mention.
UK: Muslims Add Over £31 Billion To UK Economy
British Muslims contribute more than £31 billion to the UK economy and wield a spending power of £20.5 billion, a new report by the Muslim Council of Britain has found.
UK: Forum shows support for Halal assurance scheme
Delegates at EBLEX's first Halal forum, dedicated to airing issues affecting the Halal market, overwhelmingly showed their support for the proposed scheme.
UAE: UK, Malaysia top in Islamic finance research
The Islamic Finance Development Indicator (IFDI) will be officially launched at the Global Islamic Economy Summit, from November 25 to 26 in Dubai.
Opinion: Malaysian leadership: SRI Sukuk and ESG index
The 2014 Budget was announced by the PM, and reference and allocation to Socially Responsible Investment (SRI) Sukuk and Environmental, Social and Governance (ESG) index are indeed welcomed.
Page 130 of 216« First«...1020304050...126127128129130131132133134135...150160170180190...»Last »


Applauded by critics and audiences for his unique blend of powerful virtuosity, beautiful tone, and natural musicianship, Elliot Frank is a frequent guest performer and teacher at festivals and concert series throughout the Americas and Europe. An aficionado of music of Hispanic cultures, he has performed lecture/recitals pertaining to the music of Antonio Lauro for the Guitar Foundation of America at international festivals in Pasadena and New Orleans. Dr. Frank has commissioned and performed works for guitar including the world premieres of Andrew Zohn's E Sonata in 2004, This World May Lose Its Motion, a guitar concerto by Marc Faris in 2012, and Concerto da Camera for guitar and chamber orchestra by Mark Taggart in 2016. He is also a prizewinner in national and international competitions including the Concurso Internacional de la Casa de España in San Juan, Puerto Rico. He received a DMA from Florida State University, where he studied with Bruce Holzman. Dr. Frank was selected to initiate the guitar studies program for East Carolina University and is currently teaching there in addition to maintaining an active concert schedule. His students and alumni continue to distinguish themselves with an impressive array of first prizes in national and international competitions, and they hold teaching positions at universities across the United States.
Child and Student discounts available by calling (801) 355-2787.
Run time: 1 hour 45 minutes including 15 minute intermission.


Tami is co-founder of Brown McQueen, a consulting firm that helps B2B SaaS companies develop and execute on hyper-growth marketing strategies. Previously, Tami joined one the fastest-growing a B2B SaaS startups in the U.S. as the first marketing hire and employee #9 at SalesLoft. Over a period of three years and recent Series B funding, SalesLoft has grown from 10 employees to 150, and marketing has scaled from a team of one to 12. Tami's expertise center on field marketing, go-to-market brand strategy, public relations and corporate communications, and account-based initiatives across multiple platforms.
A former NCAA Division 1 collegiate tennis player, Tami believes in the strength of collaboration and exudes passion for her career and teammates. She serves on the executive board for the Kula Project and the Global Conservation Corps, is an advocate for rhino conservation in Southern Africa, and drives the empowerment of women-led, business initiatives through mentorship programs.
A champion for experiential marketing and taking big risks to gain traction, her heart beats a gentle intensity for creating memorable experiences and building brand champions.


Each year, National Red Cross and Red Crescent Societies around the world observe World First Aid Day. The day is marked on the second Saturday of September with activities and events aimed at raising awareness among the general population of how first aid can save lives.
The ability to act quickly and appropriately in an emergency is crucial, whether it be in an everyday emergency or a disaster situation. As the number of small- to medium-sized disasters increases year on year, the need to teach basic first-aid skills to individuals and communities has never been more important.
In 2010, the day was marked globally with the theme of 'First aid for all' and Red Cross Red Crescent activities around the world reached more 20 million people. Despite the obvious benefits of learning first aid, there are a number of reasons why people do not act in an emergency, including fear of liability, lack of knowledge about the right course of action or 'bystander syndrome' – just assuming someone else will know what to do.
In the UK, a campaign aimed at young people aged 11 to 16 was designed to build their propensity to act. A survey, commissioned by the British Red Cross, found that one in seven of 11- to 16-year-olds had been faced with an emergency in the previous 12 months in which one of their friends had drunk too much alcohol. As well as dealing with alcohol-related problems, the campaign aims to help teach children how to help people with asthma attacks, head injuries, choking and epileptic seizures.
In Belize, it was primary school children who received training in basic first aid, CPR and how to help someone who is choking. Choking is perhaps the one emergency situation where seconds really do count. With a blocked airway, brain damage can start to occur after just 90 seconds, but surprisingly, few people know what to do and young children are particularly at risk.
But another reason why people are not trained in first aid is because they do not have access to first-aid training. Last year, the IFRC launched a report, First aid for a safer future, which called on governments to bridge the gap between richer and poorer communities' access to first-aid training courses. Government policies – like making first-aid education compulsory in schools or among driving licence applicants – can help to make a difference, but more needs to be done to reach vulnerable groups.
In the aftermath of a disaster, community-based volunteers, trained in first aid, are usually among the first to respond. They are on the ground, ready to help people in need. This builds stronger communities who are able to take action in the first instance. And this is where first aid goes beyond just being a skill – it's about building longer-term community resilience with humanitarian values at its heart.


text:
Les Rythmes Digitales
by Daniel Searing February 19th, 1999 August 29th, 2020
More Francophile than Francophone, the Paris-born but Reading, England-raised Jacques Lu Cont, né Stuart Price and better known by his nom de beats Les Rythmes Digitales, has more in common with the big boys of big beat like Fatboy Slim than he does with Depeche Mode. This in spite of the '80s culture that he claims as his raison d'être. "People treat the '80s as a joke, and that offends me. I'm being totally serious about the music I do," he told Spin. Whether you believe him or not won't interfere with dancing your ass off to his '98 club cutup "Jacques Your Body (Make Me Sweat)," included on the Wall of Sound compilation Bustin' Loose, or his insidious remix of Deejay Punk-Roc's "My Beatbox" on Respect Is Burning Volume 2, the second collection "inspired" by the Paris club Respect, when he DJs tonight with Theo of labelmates and fellow big beat comers the Wiseguys at 10 p.m. at Nation, 1015 Half St. SE. $12. (202) 828-1984. (Daniel Searing)


NEW PRICE! Sweet property located in a great Northside location. This Classic Cape offers a screened in porch overlooking a private back yard. Nicely updated kitchen and hardwood flooring throughout. Two bedrooms up and two bedrooms down with a full bath on each level. Large living and dining rooms that open to one another with good flow. A finished lower level carpeted with heat and sound proof - insulated walls...perfect for multiple uses! House can easily be converted to gas. Detached garage with storage shed for extra outside space. Convenient location close to all schools and area amenities! Definitely come to check this one out!
Directions: Concord street to School street house is at corner of Fenwood.


Home > Portfolio	> New home needs privacy!
Our designer visited this new home and noticed right away the windows were naked!
The clients wanted to work with a local company. After they did some research, they found that Gordon's was the perfect fit.
When buying a new home, one of the TOP priorities is to create privacy and eliminate possible glare issues. With our EcoSmart cellular shades, not only do those troublesome issues get remedied, but added bonus, INSULATION and ENERGY EFFICIENCY!
The clients expressed interest in a product that was easy to operate, with a sleek design and that would really disappear when not in use.
Our interstellar installer Mark, went right to work!
Our designer's solution for the clients was easy.
Our very own manufactured EcoSmart cordless cellular shades.


Before upgrading to the latest version of TestArchitect, it is strongly recommended that you back up all repositories.
A TestArchitect client and any repository server to which it connects must be the same version.
The following new features and improvements are introduced in the latest version of TestArchitect running on Windows.
The delete command is added to the TestArchitect command line tool. From now on, you can use ta delete to do a bulk deletion of local test results based on certain conditions from the command line shell.
Ability to configure the number of retries for a failed connection which the TestArchitect Controller establishes to a repository server. This helps users deal with an unstable network efficiently.
Users are prevented from changing the values of user-defined fields used in test results. If you adjust the value of a user-defined field on the Information tab of a test module, it will not take effect on the test result of this module. The test result will still adopt the default value.
Partial support for Generic WebDriver: automated testing with WebDriver is within your reach. Numerous actions and setting are specially designed to better suit the behaviors of WebDriver.
The configure webdriver action is used for setting up an advanced test environment.
Popup Handling: the click popup action is used for clicking a button in a popup; the copy popup message action is used for obtaining the message in a popup; the enter value in popup action is used for writing text in a field in a popup.
Frame switching: the switch frame by path action is used for shifting the focus to the target frame defined by frame path whereas switch frame by destination is used for jumping to the main or parent frame.
Turning on and off the mode of automatic switch among window instances. If the mode is on, when you open a new window instance, the focus will be shifted to the newly opened window instance. Otherwise, the focus will stay in the current window instance. Furthermore, you can move the focus to another window using the switch window action.
Target browser instance offers you a choice whether the navigate built-in action opens a new tab, a new window instance, or overwrites the currently active instance with a new URL.
Support for Chrome 70 and Firefox 63: Now you can run automated tests for web pages displayed in the latest versions of Chrome and Firefox.
Ability to configure the connection backlog size for a repository server – allows users to specify the maximum size of the queue used for holding pending connections to a repository server.
The repository memory is leaked after an enormous number of nodes connect to and interact with the repository server. A typical case is that 3 JPPF servers submit 13000 jobs to 72 nodes, and test results are sent to a repository server; as a result, memory leak occurs.
The following table lists the recommended hardware and software requirements for TestArchitect.
For more information, please visit our website at www.testarchitect.com or email us at sales@logigear.com.