*********************************************************************
767103
public function getTitreFromFirstChildEvenement($idEvenementGroupeAdresse = 0)
    {
        $query="
				select he.titre as titre
				from evenements he2, evenements he
				where he2.idEvenement = he.idEvenement
				and he.idEvenement =(select min(idEvenementAssocie) from _evenementEvenement where idEvenement = '".$idEvenementGroupeAdresse."')
						group by he.idEvenement
						";

        $res = $this->connexionBdd->requete($query);
        $fetch=mysql_fetch_assoc($res);

        $retour = $fetch['titre'];

        return $retour;
    }
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;
        }
    }
1365223
public function push($value)
    {
        if (!$this->current->value) {
            $this->current->value = $value;
        } else {
            $temp = $this->current;
            $this->current = new ClassNode($value, $temp->prev);
            $this->current->next = $temp;
            $temp->prev = $this->current;
            if ($temp === $this->head) {
                $this->head = $this->current;
            } else {
                $this->current->prev->next = $this->current;
            }
        }
    }
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);
        }
    }
1174745
public function onBeforeWrite()
    {
        if (!$this->isInDB()) {
            $this->CreatorID = Member::currentUserID();
        }

        if (!$this->VersionNumber) {
            $versions = DataObject::get(
                'FileVersion', sprintf('"FileID" = %d', $this->FileID)
            );

            if ($versions) {
                $this->VersionNumber = $versions->Count() + 1;
            } else {
                $this->VersionNumber = 1;
            }
        }

        if (!$this->Filename) {
            $this->Filename = $this->saveCurrentVersion();
        }

        parent::onBeforeWrite();
    }
60246
function(width, height) {
            this.width = width;
            this.height = height;
            for (var i = 0; i < this.width; i++) {
                if(!this.data){
                    this.data = [];
                }

                if(this.data[i] === void 0){
                    this.data[i] = [];
                }
            }
        }
302387
@Override
    public INDArray toDense() {
        // TODO support view conversion
        INDArray result = Nd4j.zeros(shape());

        switch (data().dataType()) {
            case DOUBLE:
                for (int i = 0; i < length; i++) {
                    int[] idx = getUnderlyingIndicesOf(i).asInt();
                    double value = values.getDouble(i);
                    result.putScalar(idx, value);
                }
                break;
            case FLOAT:
                for (int i = 0; i < length; i++) {
                    int[] idx = getUnderlyingIndicesOf(i).asInt();
                    float value = values.getFloat(i);
                    result.putScalar(idx, value);
                }
                break;
            default:
                throw new UnsupportedOperationException();
        }
        return result;
    }
260311
private void groupByDOM(AreaImpl root)
    {
        if (root.getChildCount() > 1)
            findSuperAreas(root, 1);
        for (int i = 0; i < root.getChildCount(); i++)
            groupByDOM((AreaImpl) root.getChildAt(i));
    }
1143611
public static void oddEvenSort( double arrayToBeSorted[], double[] arrayThatFollowsTheSort ) {
        for( int i = 0; i < arrayToBeSorted.length / 2; i++ ) {
            for( int j = 0; j + 1 < arrayToBeSorted.length; j += 2 )
                if (arrayToBeSorted[j] > arrayToBeSorted[j + 1]) {
                    double tmpa = arrayToBeSorted[j];
                    arrayToBeSorted[j] = arrayToBeSorted[j + 1];
                    arrayToBeSorted[j + 1] = tmpa;
                    if (arrayThatFollowsTheSort != null) {
                        double tmpb = arrayThatFollowsTheSort[j];
                        arrayThatFollowsTheSort[j] = arrayThatFollowsTheSort[j + 1];
                        arrayThatFollowsTheSort[j + 1] = tmpb;
                    }
                }
            for( int j = 1; j + 1 < arrayToBeSorted.length; j += 2 )
                if (arrayToBeSorted[j] > arrayToBeSorted[j + 1]) {
                    double tmpa = arrayToBeSorted[j];
                    arrayToBeSorted[j] = arrayToBeSorted[j + 1];
                    arrayToBeSorted[j + 1] = tmpa;
                    if (arrayThatFollowsTheSort != null) {
                        double tmpb = arrayThatFollowsTheSort[j];
                        arrayThatFollowsTheSort[j] = arrayThatFollowsTheSort[j + 1];
                        arrayThatFollowsTheSort[j + 1] = tmpb;
                    }
                }
        }
    }
1262864
public function validate() : void
    {
        if (null === $this->is_valid) {
            if (null === $this->user_value && null !== $this->default_value) {
                // There is a preset value, and its not being changed
                $this->is_valid = true;
            } elseif (null != $this->validator && false != $this->validator) {
                if ('' === $this->user_value && false === $this->required) {
                    $this->is_valid = true;
                    return;
                } elseif ('' === $this->user_value && true === $this->required) {
                    $this->is_valid = false;
                    return;
                }
                try {
                    $validator = $this->validator;
                    $result = $validator::quickValidate($this->user_value, $this->constraints);
                    $this->user_value = $result;
                    $this->is_valid = true;
                } catch (InvalidInputException $e) {
                    $this->user_value = null;
                    $this->is_valid = false;
                    $this->error = $e->getMessage();
                }

            } else {
                // This field does not get validated
                $this->is_valid = true;
            }
        }
        // Check if the input is different from the default value
        if ($this->is_valid && null !== $this->user_value) {
            $this->is_changed = ($this->default_value != $this->user_value);
        }
    }
163931
public function initialize()
    {
        parent::initialize();
        $this->select = new SelectClause($this);
        $this->from   = new FromClause($this);
        $this->group  = new GroupClause($this);
    }
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);
        }
    }
503861
public function execute(InputInterface $input, OutputInterface $output)
    {
        $this->output = $output;
        try {
            $this->doExecute($input, $output);
        } catch (\Exception $e) {
            $this->writeException($e);
        }
    }
432430
public function validate($order, Constraint $constraint): void
    {
        /** @var OrderInterface $order */
        Assert::isInstanceOf($order, OrderInterface::class);

        /** @var OrderPaymentMethodEligibility $constraint */
        Assert::isInstanceOf($constraint, OrderPaymentMethodEligibility::class);

        $payments = $order->getPayments();

        foreach ($payments as $payment) {
            if (!$payment->getMethod()->isEnabled()) {
                $this->context->addViolation(
                    $constraint->message,
                    ['%paymentMethodName%' => $payment->getMethod()->getName()]
                );
            }
        }
    }
418123
function () {
            var t = this.dpop() | 0;
            var n = this.dpop() | 0;
            var ddd = Long.fromInt(n);
            ddd = ddd.mul(Long.fromInt(t));
            this.dpush(ddd.low);
            this.dpush(ddd.high);
        }
205372
public function execute()
    {
        $data = $this->getData();

        /*
         * Step 1) Apply sorting
         *
         * @see http://php.net/manual/de/function.array-multisort.php
         * @see example number 3
         */
        if (!empty($this->getSortConditions())) {
            $data = $this->sortArrayMultiple($data, $this->getSortConditions());
        }

        /*
         * Step 2) Apply filters
         */
        foreach ($this->getFilters() as $filter) {
            /* @var $filter \ZfcDatagrid\Filter */
            if ($filter->isColumnFilter() === true) {
                $data = array_filter($data, [
                    new PhpArray\Filter($filter),
                    'applyFilter',
                ]);
            }
        }

        /**
         * Step 3) Remove unneeded columns.
         *
         * @todo ? Better performance or let it be?
         */
        $selectedColumns = [];
        foreach ($this->getColumns() as $col) {
            if (! $col instanceof Column\Select) {
                continue;
            }

            $colString = $col->getSelectPart1();
            if ($col->getSelectPart2() != '') {
                $colString = $col->getSelectPart1().'_'.$col->getSelectPart2();
            }

            $selectedColumns[] = $colString;
        }

        foreach ($data as &$row) {
            foreach ($row as $keyRowCol => $rowCol) {
                if (! in_array($keyRowCol, $selectedColumns)) {
                    unset($row[$keyRowCol]);
                }
            }
        }

        /*
         * Step 4) Pagination
         */
        $this->setPaginatorAdapter(new PaginatorAdapter($data));
    }
1193134
public function validate() : void
    {
        if (null === $this->is_valid) {
            if (null === $this->user_value && null !== $this->default_value) {
                // There is a preset value, and its not being changed
                $this->is_valid = true;
            } elseif (true == $this->user_value || 1 == $this->user_value) {
                $this->user_value = 1;
                $this->is_valid = true;
            } elseif (false == $this->user_value || 0 == $this->user_value || '' == $this->user_value) {
                $this->user_value = 0;
                $this->is_valid = true;
            } elseif (false == $this->validator) {
                // This field does not get validated
                $this->is_valid = true;
            } else {
                $this->is_valid = false;
                $this->error = 'The provided value is not valid. Please enter a valid value.';
            }
        }

        // Check if the input is different from the default value
        if ($this->is_valid && null !== $this->user_value) {
            $this->is_changed = ($this->default_value != $this->user_value);
        }
    }