**********************************************************************************************************************************************************************
185386
public function afficheChoixVille($lettre = 'a')
    {

        if (isset($this->variablesGet['archiLettre']) && $this->variablesGet['archiLettre']!='') {
            $lettre = $this->variablesGet['archiLettre'];
        }

        $modeAffichage="";
        if (isset($this->variablesGet['modeAffichage']) && $this->variablesGet['modeAffichage']!='') {
            $modeAffichage = $this->variablesGet['modeAffichage'];
        }


        $html="";
        $t=new Template('modules/archi/templates/');
        $t->set_filenames((array('listeVille'=>'listeVille.tpl')));


        $reqNbVille = "
				select 0
				from ville
				where lower(substr(nom,1,1))='".$lettre."'
						and nom<>'autre'
						order by nom
						";
        $resNbVille = $this->connexionBdd->requete($reqNbVille);

        $nbEnregistrementTotaux = mysql_num_rows($resNbVille);


        if ($nbEnregistrementTotaux ==0) {
        // recherche de la premiere lettre ou il y a des resultats
            $reqNbVilleNew = "
					select lower(substr(v.nom,1,1)) as lettre
					from ville v
					WHERE 1=1
					and nom<>'autre'
					order by lettre ASC
					LIMIT 1
					";
            $resNbVilleNew = $this->connexionBdd->requete($reqNbVilleNew);
            $nbEnregistrementTotaux = mysql_num_rows($resNbVilleNew);// nombre d'enregistrements pour la nouvelle lettre courante
            // recuperation de la nouvelle lettre courante
            $fetchNewLettre = mysql_fetch_assoc($resNbVilleNew);
            $lettre = $fetchNewLettre['lettre'];
        }


        // nombre d'images affichées sur une page
        $nbEnregistrementsParPage = 5;
        $arrayPagination=$this->pagination(array(
                'nomParamPageCourante'=>'archiPageCouranteVille',
                'nbEnregistrementsParPage'=>$nbEnregistrementsParPage,
                'nbEnregistrementsTotaux'=>$nbEnregistrementTotaux,
                'typeLiens'=>'noformulaire'
        ));



        // affichage des villes de france
        $reqVille = "
				select idVille,nom,codepostal, lower(substr(nom,1,1)) as lettre
				from ville
				where lower(substr(nom,1,1))='".$lettre."'
						and nom<>'autre'
						order by nom,lettre ASC
						LIMIT ".$arrayPagination['limitSqlDebut'].",".$nbEnregistrementsParPage;

        $resVille=$this->connexionBdd->requete($reqVille);


        $html .= $this->afficheListeAlphabetique(array('champ'=>'nom','table'=>'ville','where'=>" and nom<>'autre' "), $modeAffichage);

        $html .=$arrayPagination['html']."<br>";

        if (mysql_num_rows($resVille)>0) {
            mysql_data_seek($resVille, 0); // on replace le curseur au debut de la liste des enregistrements
        } else {
            echo "Pas de résultat.";
        }



        while ($fetchVille = mysql_fetch_assoc($resVille)) {
            switch ($modeAffichage) {
                case 'nouveauDossier':
                case 'modifUtilisateur':
                default:
                    $t->assign_block_vars('villes', array(
                    'url'=>"#",
                    'onclick'=>"parent.document.getElementById(parent.document.getElementById('paramChampAppelantVille').value+'txt').value='".addslashes($fetchVille['nom'])."';parent.document.getElementById(parent.document.getElementById('paramChampAppelantVille').value).value='".$fetchVille['idVille']."';parent.document.getElementById('calqueVille').style.display='none';parent.appelAjax('".$this->creerUrl('', 'afficheSelectQuartier', array('noHeaderNoFooter'=>1))."&archiIdVille='+parent.document.getElementById(parent.document.getElementById('paramChampAppelantVille').value).value,'listeQuartier',true);parent.document.getElementById('sousQuartiers').innerHTML='<option value=0>Aucun</option>';",
                    'nom'=>$fetchVille['nom']
                    ));
                    break;
            }
        }

        ob_start();
        $t->pparse('listeVille');
        $html.=ob_get_contents();
        ob_end_clean();

        return $html;
    }
595651
public void consistencyCheck() {
        for (int iRow = 0; iRow < 9; iRow++) {
            for (int iCol = 0; iCol < 9; iCol++) {
                Cell cell = cells[iRow][iCol];
                Integer value = cell.getValue();
                if (value != null) {
                    if (! cell.getFree().isEmpty()) {
                        throw new IllegalStateException("free not empty");
                    }
                    // any containing group
                    for (Cell other: cell.getExCells()) {
                        // must not occur in any of the other cells
                        if (value.equals(other.getValue())) {
                            throw new IllegalStateException("duplicate");
                        }
                        // must not occur in the permissibles of any of the other cells
                        if (other.getFree().contains(value)) {
                            throw new IllegalStateException("not eliminated");
                        }
                    }
                }
            }
        }
        
        for (int i = 0; i < rows.length; i++) {
            Set<Integer> aSet = new HashSet<Integer>();
            for (int j = 0; j < rows[i].getCells().size(); j++) {
                Cell cell = rows[i].getCells().get(j);
                Integer value = cell.getValue();
                if (value != null) {
                    aSet.add(value);
                } else {
                    aSet.addAll(cell.getFree());
                }
            }
            if (! aSet.equals(CellGroup.ALL_NINE)) {
                throw new IllegalStateException("deficit in row");
            }
        }
        
        for (int i = 0; i < cols.length; i++) {
            Set<Integer> aSet = new HashSet<Integer>();
            for (int j = 0; j < cols[i].getCells().size(); j++) {
                Cell cell = cols[i].getCells().get(j);
                Integer value = cell.getValue();
                if (value != null) {
                    aSet.add(value);
                } else {
                    aSet.addAll(cell.getFree());
                }
            }
            if (! aSet.equals(CellGroup.ALL_NINE)) {
                throw new IllegalStateException("deficit in column");
            }
        }

        for (int ir = 0; ir < sqrs.length; ir++) {
            for (int ic = 0; ic < sqrs[ir] .length; ic++) {
                Set<Integer> aSet = new HashSet<Integer>();
                for (int j = 0; j < sqrs[ir][ic].getCells().size(); j++) {
                    Cell cell = sqrs[ir][ic].getCells().get(j);
                    Integer value = cell.getValue();
                    if (value != null) {
                        aSet.add(value);
                    } else {
                        aSet.addAll(cell.getFree());
                    }
                }
                if (! aSet.equals(CellGroup.ALL_NINE)) {
                    throw new IllegalStateException("deficit in square");
                }
            }
        }
        System.out.println("+++ check OK +++");
    }
316320
public function populate($data = array())
    {
        if (isset($data['title']) && $data['title'] !== null) {
            $this->title = $data['title'];
        }

        if (isset($data['identifier']) && $data['identifier'] !== null) {
            $this->identifier = $data['identifier'];
        }

        if (isset($data['active']) && $data['active'] !== null) {
            $this->active = $data['active'];
        }

        if (isset($data['picto']) && $data['picto'] !== null) {
            $this->picto = $data['picto'];
        }
    }
1146524
public function validate($order, Constraint $constraint): void
    {
        /** @var OrderInterface $order */
        Assert::isInstanceOf($order, OrderInterface::class);

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

        $shipments = $order->getShipments();
        if ($shipments->isEmpty()) {
            return;
        }

        foreach ($shipments as $shipment) {
            if (!$this->methodEligibilityChecker->isEligible($shipment, $shipment->getMethod())) {
                $this->context->addViolation(
                    $constraint->message,
                    ['%shippingMethodName%' => $shipment->getMethod()->getName()]
                );
            }
        }
    }
1327990
public function populate($data = array())
    {
        $this->title = (isset($data['title'])) ? $data['title'] : null;
        $this->dynarea = (isset($data['dynarea'])) ? $data['dynarea'] : null;
        if (isset($data['is_active']) && $data['is_active'] != null) {
            $this->is_active = $data['is_active'];
        }
        if (isset($data['position']) && $data['position'] != null) {
            $this->position = $data['position'];
        }
        $this->identifier = (isset($data['identifier'])) ? $data['identifier'] : null;
        $this->type = (isset($data['type'])) ? $data['type'] : null;
    }
859111
private static function init() {
        self::$huffmanLookup = self::huffmanLookupInit();
        self::$huffmanCodes = self::huffmanCodesInit();
        self::$huffmanLengths = self::huffmanLengthsInit();

        foreach (\array_column(self::TABLE, 0) as $index => $name) {
            if (isset(self::$indexMap[$name])) {
                continue;
            }

            self::$indexMap[$name] = $index + 1;
        }
    }
6957
private void init() {
        quantiles = new double[data.length][8];
        for (int i = 0; i < data.length; i++) {
            int n = data[i].length;
            Arrays.sort(data[i]);
            quantiles[i][1] = data[i][n / 4];
            quantiles[i][2] = data[i][n / 2];
            quantiles[i][3] = data[i][3 * n / 4];
            quantiles[i][5] = quantiles[i][3] - quantiles[i][1]; // interquartile range
            quantiles[i][6] = quantiles[i][1] - 1.5 * quantiles[i][5];
            quantiles[i][7] = quantiles[i][3] + 1.5 * quantiles[i][5];
            quantiles[i][0] = quantiles[i][6] < data[i][0] ? data[i][0] : quantiles[i][6];
            quantiles[i][4] = quantiles[i][7] > data[i][data[i].length - 1] ? data[i][data[i].length - 1] : quantiles[i][7];
        }
    }
828584
public void sumUp() {
        int offset=0;
        int tmp=0;
        for (int i = 0; i < numChunks; i++) {
            int[] chunk = chunks[i];
            if (chunk==null) throw new IllegalStateException("Chunks are not continous, null fragement at offset "+i);
            for (int j = 0; j < chunkSize; j++) {
                tmp = chunk[j];
                chunk[j] = offset;
                offset += tmp;
            }
        }
    }
949124
public function onRender()
    {

        $meta = $this->dataStore->meta();
        $showColumnKeys = array();

        if ($this->columns == array()) {
            if ($row = $this->dataStore[0]) {
                $showColumnKeys = array_keys($row);
            } else if (count($meta["columns"]) > 0) {
                $showColumnKeys = array_keys($meta["columns"]);
            }
        } else {
            foreach ($this->columns as $cKey => $cValue) {

                if ($cKey === "{others}") {
                    $allKeys = array_keys($this->dataStore[0]);
                    foreach ($allKeys as $k) {
                        if (!in_array($k, $showColumnKeys)) {
                            $meta["columns"][$k] = array_merge($meta["columns"][$k], $cValue);
                            array_push($showColumnKeys, $k);
                        }
                    }
                } else {
                    if (gettype($cValue) == "array") {
                        if ($cKey === "#") {
                            $meta["columns"][$cKey] = array(
                                "type" => "number",
                                "label" => "#",
                                "start" => 1,
                            );
                        }

                        $meta["columns"][$cKey] = array_merge($meta["columns"][$cKey], $cValue);
                        if (!in_array($cKey, $showColumnKeys)) {
                            array_push($showColumnKeys, $cKey);
                        }
                    } else {
                        if ($cValue === "#") {
                            $meta["columns"][$cValue] = array(
                                "type" => "number",
                                "label" => "#",
                                "start" => 1,
                            );
                        }
                        if (!in_array($cValue, $showColumnKeys)) {
                            array_push($showColumnKeys, $cValue);
                        }
                    }

                }
            }
        }

        $cleanColumnKeys = array();
        foreach ($showColumnKeys as $key) {
            if (!in_array($key, $this->excludedColumns)) {
                array_push($cleanColumnKeys, $key);
            }
        }
        $showColumnKeys = $cleanColumnKeys;

        if (count($this->group) === 0 && count($this->sorting)>0) {
            $this->dataStore->sort($this->sorting);
        }

        //Prepare data
        $this->template(
            "Table",
            array(
                "showColumnKeys" => $showColumnKeys,
                "meta" => $meta,
            )
        );
    }
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);
        }
    }
234389
function () {
            if (this._tplcfg) {
                var tplcfg = this._tplcfg;
                var toDispose = tplcfg.toDispose;
                if (toDispose) {
                    var toDisposeLength = toDispose.length;
                    for (var i = 0; i < toDisposeLength; i++) {
                        toDispose[i].$dispose();
                    }
                }
                tplcfg.toDispose = null;
                tplcfg.tplDiv = null;
                tplcfg.div = null;
                tplcfg.data = null;
                this._tplcfg = null;
            }
        }
798330
public function notBetween()
    {
        $this->failIf(
            $this->data[0] >= $this->data[1] &&
            $this->data[0] <= $this->data[2]
        );
    }
1330427
private void init( List<T> list ) {
		this.list = list;
		indexes = new int[ list.size() ];
		counters = new int[ list.size() ];

		for( int i = 0; i < indexes.length ; i++ ) {
			counters[i] = indexes[i] = i;
		}

		total = 1;
		for( int i = 2; i <= indexes.length ; i++ ) {
			total *= i;
		}

		permutation = 0;
	}
741690
public function onBeforeWrite()
    {
        /** @var string $currentLocale */
        $currentLocale = FluentState::singleton()->getLocale();
        if (!$currentLocale) {
            return;
        }

        // If the record is not versioned, force change
        if (!$this->owner->hasExtension(FluentVersionedExtension::class)) {
            $this->owner->forceChange();
            return;
        }

        // Force a change if the record doesn't already exist in the current locale
        if (!$this->owner->existsInLocale($currentLocale)) {
            $this->owner->forceChange();
        }
    }
412637
public function populate($data = array())
    {
        if (isset($data['name']) && $data['name'] !== null) {
            $this->name = $data['name'];
        }
        if (isset($data['code']) && $data['code'] !== null) {
            $this->code = $data['code'];
        }
        if (isset($data['phase']) && $data['phase'] !== null) {
            $this->phase = $data['phase'];
        }
        if (isset($data['active']) && $data['active'] !== null) {
            $this->active = $data['active'];
        }
    }
1311984
@Override
    public synchronized ChainData[] initChainGroup(String groupName) throws ChannelException, ChainException, ChainGroupException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "initChainGroup: " + groupName);
        }
        if (null == groupName) {
            throw new ChainGroupException("Null chain group");
        }

        // Verify the group exists in the framework.
        ChainGroupData groupData = this.chainGroups.get(groupName);
        if (null == groupData) {
            throw new ChainGroupException("Unable to find group: " + groupName);
        }

        List<ChainData> changedChains = new ArrayList<ChainData>();
        ChainData[] chainDataArray = groupData.getChains();
        StringBuilder sbErrors = new StringBuilder();
        boolean errorOccurred = false;

        String chainName = null;
        Chain chain = null;
        // Loop through all the chain names in the list and init them.
        for (int i = 0; i < chainDataArray.length; i++) {
            chainName = chainDataArray[i].getName();
            if (chainDataArray[i].getType().equals(FlowType.OUTBOUND)) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Chain " + chainName + " is outbound so no action being taken.");
                }
                continue;
            }
            try {
                // See if the chain is already in the runtime.
                chain = getRunningChain(chainName);
                if (null == chain) {
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                        Tr.debug(tc, "Initialize the chain, " + chainName);
                    }
                    initChainInternal(chainDataArray[i]);
                    changedChains.add(chainDataArray[i]);
                } else {
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                        Tr.debug(tc, "Chain already in initialized state, " + chainName);
                    }
                }
            } catch (Exception e) {
                String errorString = "Error initializing chain " + chainName + " in group " + groupName + ", exception=" + e;
                // No FFDC Needed.
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, errorString);
                }
                // Note the error so an exception can be thrown later with a list of
                // chains that couldn't starte.
                errorOccurred = true;
                FFDCFilter.processException(e, getClass().getName() + ".initChainGroup", "3327", this, new Object[] { chainName, groupName });
                sbErrors.append("\r\n");
                sbErrors.append(errorString);
                // Get through as many chains as possible as opposed to fail fast.
                continue;
            }
        }

        // Handle any errors if they occurred.
        if (errorOccurred) {
            throw new ChainGroupException(sbErrors.toString());
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "initChainGroup");
        }
        return changedChains.toArray(new ChainData[changedChains.size()]);
    }
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()]
                );
            }
        }
    }