*****************************************************
P R I V A T E   M E T H O D S            *
*****************************************************
546009
function(msg) {
        if (msg.senderName && msg.senderName === serverName) {
          isServerRegister = true;

          if (registerServerTimeoutId) {
            clearTimeout(registerServerTimeoutId);
          }

          socketState = socketStateType.OPEN;
          fireEvent("stateChange", {
            socketState: socketState,
            timeUntilReconnect: 0,
            deviceRegister: isDeviceRegister,
            serverRegister: isServerRegister,
            peerId: peerId
          });
          fireEvent("asyncReady");

          pushSendDataQueueHandler();

          if (asyncLogging) {
            if (workerId > 0) {
              Utility.asyncStepLogger(workerId + "\t Async is Ready");
            } else {
              Utility.asyncStepLogger("Async is Ready");
            }
          }

        } else {
          registerServer();
        }
      }
1116651
public function init()
    {
        $this->userService = $this->di->get("userService");
        $this->session = $this->di->get("session");
        $this->response = $this->di->get("response");
        $this->view = $this->di->get("view");
        $this->pageRender = $this->di->get("pageRender");
    }
1008357
public function next()
    {
        parent::next();
        if ($this->_validValues) {
            $this->_values->next();
        }
        $this->_validValues = $this->_values->valid();
    }
1247974
public function handleEvent()
    {
        while ($this->socket !== null)
        {
            $events = $this->socket->getSockOpt(ZMQ::SOCKOPT_EVENTS);

            $hasEvents = ($events & ZMQ::POLL_IN) || ($events & ZMQ::POLL_OUT && $this->buffer->listening);
            if (!$hasEvents)
            {
                break;
            }

            if ($events & ZMQ::POLL_IN)
            {
                $this->handleReadEvent();
            }

            if ($events & ZMQ::POLL_OUT && $this->buffer->listening)
            {
                $this->buffer->handleWriteEvent();
            }
        }
    }
1276241
function (dataByCoordSys) {
        var lastCoordSys = this._lastDataByCoordSys;
        var contentNotChanged = !!lastCoordSys
            && lastCoordSys.length === dataByCoordSys.length;

        contentNotChanged && each(lastCoordSys, function (lastItemCoordSys, indexCoordSys) {
            var lastDataByAxis = lastItemCoordSys.dataByAxis || {};
            var thisItemCoordSys = dataByCoordSys[indexCoordSys] || {};
            var thisDataByAxis = thisItemCoordSys.dataByAxis || [];
            contentNotChanged &= lastDataByAxis.length === thisDataByAxis.length;

            contentNotChanged && each(lastDataByAxis, function (lastItem, indexAxis) {
                var thisItem = thisDataByAxis[indexAxis] || {};
                var lastIndices = lastItem.seriesDataIndices || [];
                var newIndices = thisItem.seriesDataIndices || [];

                contentNotChanged
                    &= lastItem.value === thisItem.value
                    && lastItem.axisType === thisItem.axisType
                    && lastItem.axisId === thisItem.axisId
                    && lastIndices.length === newIndices.length;

                contentNotChanged && each(lastIndices, function (lastIdxItem, j) {
                    var newIdxItem = newIndices[j];
                    contentNotChanged
                        &= lastIdxItem.seriesIndex === newIdxItem.seriesIndex
                        && lastIdxItem.dataIndex === newIdxItem.dataIndex;
                });
            });
        });

        this._lastDataByCoordSys = dataByCoordSys;

        return !!contentNotChanged;
    }
1130179
public function process()
    {
        parent::process();

        $data = &$this->getForm()->getFormData();
        if (isset($data[$this->id])) {
            $this->value = $data[$this->id];
        } else {
            $this->value = null;
        }

        $this->value = ltrim($this->value, '#');

        if ($this->value == '') {
            $this->value = null;
        }

        if ($this->required && $this->value === null) {
            $this->addMessage($this->getValidationMessage('required'));
        } elseif (
            $this->value !== null &&
            !$this->validateColor($this->value)
        ) {
            $message = sprintf(
                Swat::_('“%s” is not a valid color.'),
                $this->value
            );

            $this->addMessage(new SwatMessage($message, 'error'));
        }
    }
583731
function(postmessage) {
			var data = postmessage, action, root, handlers;
			if(gui.Type.isString(data) && data.startsWith("spiritual-action:")) {
				action = gui.Action.parse(data);
				if (action.direction === gui.Action.DESCEND) {
					// Hotfix for actions in nospirit scenario
					// TODO: rething this pending WeakMaps...
					if((handlers = this._globals[action.type])) {
						handlers.slice().forEach(function(handler) {
							handler.onaction(action);
						});
					}
					if(gui.hasModule('gui-spirits@wunderbyte.com')) {
						if ((root = gui.get('html'))) {
							root.action.$handleownaction = true;
							root.action.descendGlobal(
								action.type,
								action.data
							);
						}
					}
				}
			}
		}
135217
function onMessage(e)
    {
        if(e.data instanceof ArrayBuffer)
        {
            onArrayBuffer(e.data);
        }
        else
        {
            onStringMessage(e.data);
        }
    }
1318726
public function render() {

		if(isset($this->methodName)) {
			$methodName = $this->methodName;
			$this->$methodName()->sendContent();
		}
		else {
			$this->execute()->sendContent();
		}

	}
239165
function (ch) {
  if (ch.hasInterval('M3')) {
    return ch.hasInterval('m7') ? 'x' : 'M';
  }

  if (ch.hasInterval('m3')) {
    if (ch.hasInterval('dim5')) {
      return ch.hasInterval('m7') ? 'ø' : 'o';
    }

    return 'm';
  }

  if (ch.hasInterval('P4')) {
    return 's';
  }

  return null;
}
1156396
public function update()
    {
        $this->left = $this->x;
        $this->right = $this->x + $this->width;
        $this->top = $this->y;
        $this->bottom = $this->y + $this->height;
    }
505820
public function onBeforePublish()
    {
        /**
         * @var DBDatetime $publishDate
         */
        $publishDate = $this->dbObject('PublishDate');

        if (!$publishDate->getValue()) {
            $this->PublishDate = DBDatetime::now()->getValue();
            $this->write();
        }
    }
95080
public function process()
    {
        for ($i = $this->io->inReadQueue(); $i > 0; $i--) {
            $this->handleMessage($this->io->pop());
        }
    }
755163
public function updateDepth()
    {
        $parent = $this->ParentComment();
        if ($parent && $parent->exists()) {
            $parent->updateDepth();
            $this->Depth = $parent->Depth + 1;
        } else {
            $this->Depth = 1;
        }
    }
130552
function pushToRP (event) {
    if (source) {
      console.log('updating RP: changed')
      source.postMessage('changed', origin)
    } else {
      console.log('updateRP called but source undefined')
    }
  }
661678
public function addMethod(Method $method): void
    {
        if (!$this->responses->has($method->getResponse()) && $this->structures->has($method->getResponse())) {
            $struct = $this->structures->get($method->getResponse());
            $response = Response::createFromStruct($struct);
            $this->responses->add($response);
            $this->structures->remove($struct);
        }

        if (!$this->requests->has($method->getRequest()) && $this->structures->has($method->getRequest())) {
            $struct = $this->structures->get($method->getRequest());
            $request = Request::createFromStruct($struct);
            $this->requests->add($request);
            $this->structures->remove($struct);
        }

        $this->methods->add($method);
    }
1033482
public function process()
    {
        parent::process();

        if ($this->value === null) {
            return;
        }

        try {
            $integer_value = $this->getNumericValue($this->value);

            if ($integer_value === null) {
                $this->addMessage($this->getValidationMessage('integer'));
            } else {
                $this->value = $integer_value;
            }
        } catch (SwatIntegerOverflowException $e) {
            if ($e->getSign() > 0) {
                $this->addMessage(
                    $this->getValidationMessage('integer-maximum')
                );
            } else {
                $this->addMessage(
                    $this->getValidationMessage('integer-minimum')
                );
            }

            $integer_value = null;
        }
    }