****************************************************************************************************************
768574
function MQTTMsgBusValueNode(config) {
        RED.nodes.createNode(this, config)
        console.log("MQTTMsgBusValueNode(): config =", config)

        this.qos        = 0
        this.retain     = false
        this.nodename   = config.nodename
        this.service    = config.service
        this.dataId     = config.dataid
        this.dataType   = config.dataType
        this.event      = config.event
        this.subscribed = false
        this.lastVal    = {}

        this.client     = config.client
        this.clientConn = RED.nodes.getNode(this.client)
        //console.log("MQTTMsgBusValueNode(): this.clientConn =", this.clientConn)

        if (!this.clientConn) {
            //console.log("MQTTMsgBusValueNode(): !this.clientConn, dataId =", this.dataId)
            this.error(RED._("msgbus.errors.missing-config"))
            return
        }

        //this.nodenameSelf   = this.clientConn.nodename

        this.broker         = this.clientConn.broker
        this.brokerConn     = RED.nodes.getNode(this.broker)

        var node = this

        if (this.brokerConn) {
            this.status({fill:"red", shape:"ring", text:"node-red:common.status.disconnected"})

            node.brokerConn.register(this)

            if (    this.subscribed == false && 
                    typeof this.nodename !== 'undefined' && 
                    this.nodename != "" &&
                    typeof this.dataId !== 'undefined' && 
                    this.dataId != "") {

                this.topic      = topicValueSubscribe(this.clientConn, this.nodename, this.dataId, "+")
                this.subscribed = true

                console.log("MQTTMsgBusValueNode(1): dataid =", this.dataId)
                console.log("MQTTMsgBusValueNode(1): topic  =", this.topic)

                this.brokerConn.subscribe(this.topic, this.qos, function(topic, payload, packet) {
                    console.log("MQTTMsgBusValueNode(1): payload =", payload.toString())
                    onValueHandler(node, node.brokerConn, topic, payload)
                }, this.id)
            }

            if (this.brokerConn.connected) {
                node.status({fill:"green", shape:"dot", text:"node-red:common.status.connected"})
            }

            this.on("input", function(msg) {
                console.log("MQTTMsgBusValueNode(): msg =", msg)
                //console.log("MQTTMsgBusValueNode(): hap =", msg.hap.characteristic.props)

                var chk = 0

                if (msg.hasOwnProperty("model")) {
                    chk++                                   // becomes 'nodename'
                }
                if (msg.hasOwnProperty("serialno")) {       // becomes 'dataId'
                    chk++
                }
                if (msg.hasOwnProperty("format")) {         // becomes 'dataType'
                    chk++
                }
                if (msg.hasOwnProperty("event")) {
                    chk++
                }

                var nodename = msg.model
                var dataId   = msg.serialno
                var dataType = msg.hap.characteristic.props.format
                
                if (chk == 4) {
                    if (    node.subscribed == false && 
                            typeof nodename !== 'undefined' && 
                            nodename != "" &&
                            typeof dataId !== 'undefined' && 
                            dataId != "" &&
                            typeof dataType !== 'undefined') {
                                
                        node.topic      = topicValueSubscribe(node.clientConn, nodename, dataId, "+")
                        node.subscribed = true

                        console.log("MQTTMsgBusValueNode(2): dataId =", dataId)
                        console.log("MQTTMsgBusValueNode(2): topic  =", node.topic)

                        node.brokerConn.subscribe(node.topic, node.qos, function(topic, payload, packet) {
                            console.log("MQTTMsgBusValueNode(2): payload =", payload.toString())
                            onValueHandler(node, node.brokerConn, topic, payload)
                        }, this.id)
                    }

                    console.log("MQTTMsgBusValueNode(): node.lastVal =", node.lastVal)

                    var event         = msg.event.toLowerCase()
                    var topicNotExist = node.lastVal[event] === undefined
                    
                    if (!topicNotExist) {
                        if (node.lastVal[event] != msg.payload) {
                            console.log("MQTTMsgBusValueNode(): unequal")
                            node.lastVal[event] = msg.payload
                        } else {
                            console.log("MQTTMsgBusValueNode(): equal, not sending")
                            return
                        }
                    } else {
                        console.log("MQTTMsgBusValueNode(): not exist")
                        node.lastVal[event] = msg.payload
                    }
                } else {

                }
  
                var d = {
                    "d": {
                        "_type":    msg.event.toLowerCase(),
                        "value":    msg.payload
                    }
                }

                //
                // build topic
                //
                var topic = topicValuePublish(node.clientConn, node.nodename, dataId, dataType)

                var m = {}
                m.topic   = topic
                m.payload = JSON.stringify(d)
                m.qos     = node.qos
                m.retain  = node.retain

                console.log("MQTTMsgBusValueNode(publish): msg =", m)
                node.brokerConn.publish(m)  // send the message
            })

            this.on('close', function(done) {
                if (node.brokerConn) {
                    node.brokerConn.unsubscribe(node.topic, node.id)
                    node.brokerConn.deregister(node, done)
                }
            })
        } else {
            this.error(RED._("msgbus.errors.missing-config"))
        }

    }
464405
public function empty()
    {
        if ($this->small > 0 || $this->tall > 0 || $this->wide > 0) {
            for ($i = 0; $i < $this->rows; $i += 1) {
                for ($j = 0; $j < $this->columns; $j += 1) {
                    $this->cells[$i][$j] = null;
                }
            }
            $this->small = 0;
            $this->tall = 0;
            $this->wide = 0;
        }
    }
816930
private void doJazziness(View item, int position, int scrollDirection) {
        if (mIsScrolling) {
            if (mOnlyAnimateNewItems && mAlreadyAnimatedItems.contains(position))
                return;

            if (mOnlyAnimateOnFling && !mIsFlingEvent)
                return;

            if (mMaxVelocity > MAX_VELOCITY_OFF && mMaxVelocity < mSpeed)
                return;

            if (mSimulateGridWithList) {
                ViewGroup itemRow = (ViewGroup) item;
                for (int i = 0; i < itemRow.getChildCount(); i++)
                    doJazzinessImpl(itemRow.getChildAt(i), position, scrollDirection);
            } else {
                doJazzinessImpl(item, position, scrollDirection);
            }

            mAlreadyAnimatedItems.add(position);
        }
    }
1350673
public function decrement()
    {
        if (0 >= --$this->listeners && null !== $this->observable) {
            $this->observable->dispose(new AutoDisposedException());
        }
    }
734008
public function execute()
    {
        $this->insertID = $this->table->insertOne($this->context + $this->data);
        parent::execute();
    }
624466
@Override
	public void aggregate(T value) {

		if (value == null) {
			nullCount++;
		}
		else if (isNan(value)) {
			nanCount++;
		}
		else if (isInfinite(value)) {
			infinityCount++;
		}
		else {
			nonMissingCount++;

			min.aggregate(value);
			max.aggregate(value);
			sum.aggregate(value);

			double doubleValue = value.doubleValue();
			double delta = doubleValue - mean.value();
			mean = mean.add(delta / nonMissingCount);
			m2 = m2.add(delta * (doubleValue - mean.value()));
		}
	}
670801
public function init()
    {
        parent::init();

        foreach ($this->columns as $column) {
            $column->init();
            // index the column by id if it is not already indexed
            if (!array_key_exists($column->id, $this->columns_by_id)) {
                $this->columns_by_id[$column->id] = $column;
            }
        }

        foreach ($this->extra_rows as $row) {
            $row->init();
            // index the row by id if it is not already indexed
            if (!array_key_exists($row->id, $this->rows_by_id)) {
                $this->rows_by_id[$row->id] = $row;
            }
        }

        foreach ($this->groups as $group) {
            $group->init();
            // index the group by id if it is not already indexed
            if (!array_key_exists($group->id, $this->groups_by_id)) {
                $this->groups_by_id[$group->id] = $group;
            }
        }

        foreach ($this->spanning_columns as $column) {
            $column->init();
            // index the row column by id if it is not already indexed
            if (!array_key_exists($column->id, $this->spanning_columns_by_id)) {
                $this->spanning_columns_by_id[$column->id] = $column;
            }
        }
    }
740548
public void uniq() {
        if (size <= 1) { return; }
        int cursor = 0;
        for (int i=1; i<size; i++) {
            if (elements[cursor] != elements[i]) {
                cursor++;
                elements[cursor] = elements[i];
            }
        }
        size = cursor+1;
    }
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;
        }
    }
970680
public function init()
    {
        if ($this->countRows < 1) {
            $this->totalPages = 0;
            $this->currentPage = 0;

            return;
        }

        if ($this->limit < 10) {
            $this->limit = 10;
        }

        $this->totalPages = (int)($this->countRows / $this->limit);

        if ($this->countRows % $this->limit) {
            $this->totalPages++;
        }

        if ($this->totalPages === 0) {
            $this->totalPages = 1;
        }

        if ($this->currentPage < 0) {
            $this->currentPage = 0;
        }

        if ($this->currentPage > $this->totalPages) {
            $this->currentPage = $this->totalPages;
        }
    }
410957
@Override
  public void aggregate()
  {
    final ArrayOfDoublesSketch update = selector.getObject();
    if (update == null) {
      return;
    }
    synchronized (this) {
      union.update(update);
    }
  }
196140
function invShiftRows()
    {
        $temp = "";
        for ($i = 1; $i < 4; $i++) {
            for ($j = 0; $j < $this->Nb; $j++) $temp[($i + $j) % $this->Nb] = $this->s[$i][$j];
            for ($j = 0; $j < $this->Nb; $j++) $this->s[$i][$j] = $temp[$j];
        }
    }
950258
public function methodChanged(): void
    {
        assert($this->offsetExists(self::VAR_LINE_METHOD));

        if (self::METHOD_POST === $this->offsetGet(self::VAR_LINE_METHOD)) {
            $this->offsetSet(self::VAR_BODY, null);
            if ($this->offsetExists(self::VAR_PARSED_POST)
                && is_null($this->offsetGet(self::VAR_PARSED_POST))) {
                $this->offsetSet(self::VAR_PARSED_POST, new MutableArray());
            }
            if ($this->offsetExists(self::VAR_PARSED_FILES)
                && is_null($this->offsetGet(self::VAR_PARSED_FILES))) {
                $this->offsetSet(self::VAR_PARSED_FILES, new MutableArray());
            }
        } else if (self::METHOD_PUT === $this->offsetGet(self::VAR_LINE_METHOD)) {
            if ($this->offsetExists(self::VAR_BODY)
                && is_null($this->offsetGet(self::VAR_BODY))) {
                $this->offsetSet(self::VAR_BODY, '');
            }
            $this->offsetSet(self::VAR_PARSED_POST, null);
            $this->offsetSet(self::VAR_PARSED_FILES, null);
        } else {
            $this->offsetSet(self::VAR_BODY, null);
            $this->offsetSet(self::VAR_PARSED_POST, null);
            $this->offsetSet(self::VAR_PARSED_FILES, null);
        }
    }
1230901
public function set(array $data) {
		foreach ($data as $name => $value) {
			$this->__set($name, $value);
		}
	}
328688
public function execute()
    {
        if (!$this->isEmpty()) {
            $this->table->update($this->context + $this->values, $this->where)->run();
        }

        parent::execute();
    }
1150746
public function sortChange($value)
    {
        if ($value == 0) {
            return;
        }
        $owner = $this->owner;
        $condition = $this->getCondition();
        $newSort = $owner->{$this->sortAttribute} + $value;
        if ($value > 0) {
            // move up
            $max = $this->getMaxSort();
            if ($owner->{$this->sortAttribute} === $max) {
                return;
            }
            if ($newSort >= $max) {
                $newSort = $max;
            }
            $condition[] = [">", $this->sortAttribute, $owner->{$this->sortAttribute}];
            $condition[] = ["<=", $this->sortAttribute, $newSort];
            $counterChanger = -1;
        } else {
            // move down
            if ($owner->{$this->sortAttribute} === 0) {
                return;
            }
            if ($newSort < 0) {
                $newSort = 0;
            }
            $condition[] = ['<', $this->sortAttribute, $owner->{$this->sortAttribute}];
            $condition[] = ['>=', $this->sortAttribute, $newSort];
            $counterChanger = 1;
        }
        $owner->updateAllCounters([$this->sortAttribute => $counterChanger], $condition);
        $owner->updateAttributes([$this->sortAttribute => $newSort]);
    }
1374179
public function process()
    {
        parent::process();

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

        $float_value = $this->getNumericValue($this->value);

        if ($float_value === null) {
            $this->addMessage($this->getValidationMessage('float'));
        } else {
            $this->value = $float_value;
        }
    }