ATTENTION le repertoire de destination doit avoir ete créé avant l'appel de cette fonction, car celle ci ne le cree par , utiliser "creerRepertoire"
178371
public function handleUploadedFileSimpleMoveTo($params = array())
	{
		if(isset($params['inputFileName']) && $params['inputFileName']!='')
		{
			if(isset($_FILES[$params['inputFileName']]) && count($_FILES[$params['inputFileName']])>0)
			{
				if ($_FILES[$params['inputFileName']]['error']) 
				{
					switch ($_FILES[$params['inputFileName']]['error'])
					{
	                   case 1: // UPLOAD_ERR_INI_SIZE
	                   echo"Le fichier dépasse la limite autorisée par le serveur.";
	                   break;
	                   case 2: // UPLOAD_ERR_FORM_SIZE
	                   echo "Le fichier dépasse la limite autorisée dans le formulaire HTML.";
	                   break;
	                   case 3: // UPLOAD_ERR_PARTIAL
	                   echo "L'envoi du fichier a été interrompu pendant le transfert.";
	                   break;
	                   case 4: // UPLOAD_ERR_NO_FILE
	                   echo "Le fichier que vous avez envoyé a une taille nulle.";
	                   break;
					}
				}
				else
				{
					// pas d'erreur , on deplace le fichier temporaire vers la destination voulue
					if(isset($params['redimensionneImageConfig']) && is_array($params['redimensionneImageConfig']) && count($params['redimensionneImageConfig'])>0)
					{
						$i = new imageObject();
						foreach($params['redimensionneImageConfig'] as $tailleMax => $configRedim)
						{
							$i->redimension($_FILES[$params['inputFileName']]['tmp_name'],$this->getExtensionFromFile($_FILES[$params['inputFileName']]['name']),$configRedim['destination'],$tailleMax);
						}
					}
					elseif(isset($params['repertoireDestination']) && $params['repertoireDestination']!='')
					{
						$fileNameDestination = $_FILES[$params['inputFileName']]['name'];
						if(isset($params['renameFileTo']) && $params['renameFileTo']!='')
						{
							$fileNameDestination = $params['renameFileTo'];
						}
						
						move_uploaded_file($_FILES[$params['inputFileName']]['tmp_name'], $params['repertoireDestination']."/".$fileNameDestination);

					}
					else
					{
						echo "parametre manquant => framework/fileObject::handleUploadedFileSimpleMoveTo<br>";
					}
				}
			}
		}
	
	
	}
964368
function _tripGoesTo(trip, origin, destination) {
  let originFound = false;
  for ( let i = 0; i < trip.stopTimes.length; i++ ) {
    if ( !originFound && trip.stopTimes[i].stop.id === origin.id ) {
      originFound = true;
    }
    else if ( originFound ) {
      if ( trip.stopTimes[i].stop.id === destination.id ) {
        return true;
      }
    }
  }
  return false;
}
1272105
function extend(destination, source) {
    // Chrome < 14 incorrectly sets `destination` to `undefined` when we `delete arguments[0]`
    // http://code.google.com/p/v8/issues/detail?id=839
    var result = destination;
    delete arguments[0];

    forEach(arguments, function(source) {
      forProps(source, function(value, key) {
        result[key] = value;
      });
    });
    return result;
  }
1155968
public function afficherFormulaire()
    {
        $html = '';
        $t = new Template('modules/archi/templates');
        $t->set_filenames(array('formulaire'=>'personneFormulaire.tpl'));

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


        switch ($modeAffichage) {
            case 'nouveauDossier':
            case "modifEvenement":
                $t->assign_vars(array('urlAction'=>$this->creerUrl('ajouterPersonne', '', array('noHeaderNoFooter'=>1, 'modeAffichage'=>$modeAffichage))));
                $t->assign_vars(array('boutonAnnulation'=>"location.href='".$this->creerUrl('', 'personneListe', array('noHeaderNoFooter'=>1, 'modeAffichage'=>$modeAffichage))."';"));
                break;
            default:
                $t->assign_block_vars('allowAjouterMetier', array());
                break;
        }

        // récupération des métiers
        $sql = "SELECT nom,  idMetier FROM metier";
        $rep = $this->connexionBdd->requete($sql);
        while ($res = mysql_fetch_object($rep)) {
            $t->assign_block_vars('metier', array('valeur'=>$res->idMetier,  'nom'=>$res->nom));
        }

        if ($this->erreurs->tabFormExiste()) {
            foreach ($this->erreurs->getErreursFromFormulaire() as $name => $value) {
                if ($value['type']=='date') {
                     $val = $this->date->toFrench($this->date->toBdd($value['value']));
                } else {
                    $val = htmlspecialchars(stripslashes($value["value"]));
                }

                $t->assign_vars(array( $name => $val));
                if ($value["error"]!='') {
                    $t->assign_vars(array($name."-error" => $value["error"]));
                }
            }
        }

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

        return $html;
    }
84631
def destination(self, name=""):
        
        if name:
            return self._session.put(
                self.__v2() + "/hoverfly/destination",
                data={"destination": name}).json()
        else:
            return self._session.get(
                self.__v2() + "/hoverfly/destination").json()
528379
function _movePrev() {
        var $context, $prev;

        $context = $currentContext || $("#mrof-container #mrof-list > li.highlight");
        if ($context.length > 0) {
            $prev = $context.prev();
            if ($prev.length === 0) {
                $prev = $("#mrof-container #mrof-list > li").last();
            }
            if ($prev.length > 0) {
                $currentContext = $prev;
                $prev.find("a.mroitem").trigger("focus");
            }
        } else {
            //WTF! (Worse than failure). We should not get here.
            $("#mrof-container #mrof-list > li > a.mroitem:visited").last().trigger("focus");
        }
    }
550292
function link($timeout, $compile, scope, ngelt, attrs, ctrl) {
		ctrl.reItems = new RegExp("\s?limitTo\s?\:\s?" + attrs.ngLimit + "\s?\:\s?" + attrs.ngBegin + ""); // pour déterminer quel items sont gerer
		scope.ngBegin = 0;
		scope.ngLimit = 1;
		ctrl.ngelt = ngelt; // on sauve l'element jquery
		ctrl.elt = getHtmlElement(ngelt); // on sauve l'element
		ctrl.ngsb = $compile("<span mode='hidden' class='scrollbar')></span>")(scope);
		var info = $compile("<span ng-show='ctrl.infos' class='infos-scrolling' ng-bind='ctrl.infos'></span>")(scope);
		ngelt.append(info);
		ngelt.append(ctrl.ngsb);
		ctrl.sb = getHtmlElement(ctrl.ngsb);
		var watcherClears = [];
		if (ngelt.css('display') === 'none') { // si c'est une popup, on surveille le display
			var watcherClear = scope.$watch(function (scope) {
				return scope.ctrl.ngelt.css('display');
			}, function (v1, v2, s) {
				if (v1 !== 'none') {
					if (s.max) {
						s.ngLimit = s.max;
						s.ctrl.updateTotal();
					} else {
						s.ngLimit = 1;
						s.ctrl.updateSize();
					}
					watcherClear();
				}
			});
			watcherClears.push(watcherClear);
		}
		if (ctrl.horizontal) {
			watcherClears.push(scope.$watch(function (scope) {
				return scope.ctrl.ngelt.width();
			}, function (v1, v2, s) {
				if (v1 !== v2) {
					s.ctrl.getScrollbarArea().invalid = true;
					s.ctrl.getEltArea().invalid = true;
					s.ctrl.updateSize();
				}
			}));
		} else {
			watcherClears.push(scope.$watch(function (scope) {
				return scope.ctrl.ngelt.height();
			}, function (v1, v2, s) {
				if (v1 !== v2) {
					s.ctrl.getScrollbarArea().invalid = true;
					s.ctrl.getEltArea().invalid = true;
					s.ctrl.updateSize();
				}
			}));
		}
		var totalTimer;
		watcherClears.push(scope.$watch('total', function (v1, v2, s) {
			if (v1 !== v2) {
				if(totalTimer) $timeout.cancel(totalTimer);
				totalTimer = $timeout(s.ctrl.updateTotal, s.debounce || DEBOUNCE, true);
			}
		}));
		var limitTimer;
		watcherClears.push(scope.$watch('ngLimit', function (v1, v2, s) {
			if (v1 !== v2) {
				if(limitTimer) $timeout.cancel(limitTimer);
				limitTimer = $timeout(s.ctrl.updateLimit, s.debounce || DEBOUNCE, true);
			}
		}));
		watcherClears.push(scope.$watch('ngBegin', function (v1, v2, s) {
			if (v1 >= 0 && v1 <= s.total - s.ctrl.getInnerLimit()) {
				s.ctrl.updateBegin();
			} else if (v1 < 0) {
				s.ngBegin = 0;
			} else {
				s.ngBegin = Math.max(s.total - s.ctrl.getInnerLimit(), 0);
			}
		}));
		scope.$on('$destroy', function () {
			ctrl.removeEventListeners();
			watcherClears.forEach(function (watcherClear) {
				watcherClear();
			});
		});
		ctrl.addEventListeners();
	}
637360
protected function initialise() {

        // On définit le fuseau horaire.
        @date_default_timezone_set($this->get('timezone', 'Europe/Paris'));

        // On instancie le logger.
        $logger = new Logger($this->get('application_name'));
        $logger->pushHandler(new StreamHandler(JPATH_LOGS . "/" . $this->get('application_logfile'), $this->get('logger_level')));
        $this->setLogger($logger);

        // PID
        $this->set('application_pid_file', JPATH_TMP . "/" . $this->get('application_pid_file'));

    }
854869
private static PCM clear_colonne(PCM pcm, PCM pcm_return){
		List<Feature> pdts = pcm.getConcreteFeatures();
		List<Cell> cells = new ArrayList<Cell>() ;
		for (Feature pr : pdts) {
			float nbCellsEmpty = 0 ;
			// On ajoute les cellules du product dans une liste
			cells = pr.getCells();
			// On traite les infos des cellules
			for(Cell c : cells){
				if(c.getContent().isEmpty()){
					nbCellsEmpty ++ ;
				}
			}
			if(cells.size() != 0){
				System.out.println("Dans les colonnes -- > \n Nombre de cellule vide :" + nbCellsEmpty + "\n Nombre de cellule : " + cells.size());
				System.out.println("Valeur du if : " + nbCellsEmpty/cells.size());
				if(!((nbCellsEmpty/cells.size()) > RATIO_EMPTY_CELL)){
					System.out.println("on ajoute la colonne !");
					pcm_return.addFeature(pr);;
				}
			}
		}
		
		return pcm_return;
	}
899134
function loadOneComponent(name) {
        // Si le composant est déjà chargé, on le retourne.
        if (components[name] !== undefined) return components[name];

        // Le composant n'est pas encore chargé.
        // On tente de le trouver dans la conf IOC.
        if (!that.config) throw new Error("La configuration est indéfinie.");
        if (!that.config.ioc || !that.config.ioc[name]) throw new Error(`La configuration ioc est indéfinie pour le composant "${name}".`);

        // Le composant a un chemin défini.
        var componentPath = that.config.ioc[name];
        var componentClass = require(componentPath);
        var componentClassStr = componentClass.toString();

        // Si le constructeur du composant a des arguments, on va tenter de les charger comme dépendances.
        var m = componentClassStr.match(/^function +[\$a-zA-Z_][\$\w_]*\((.+?)\)[ \t\r\n]*\{/);
        // Syntaxe ES6 avec une méthode "constructor"
        if (!m) m = componentClassStr.match(/[^\w]constructor *\((.+?)\)[ \t\r\n]*\{/);

        var pDependencies;
        if (m) {
            var constructorArgs = m[1].split(/[ \t\r\n]*,[ \t\r\n]*/);
            pDependencies = that.load(constructorArgs);
        } else {
            pDependencies = Promise.resolve([]);
        }

        // Une fois les dépendances résolues, on instancie le composant.
        var pComponent = pDependencies.then(function(dependenciesInstances) {
            var args = [null].concat(dependenciesInstances);
            var instance = new (componentClass.bind.apply(componentClass, args));

            if (typeof instance.init === "function") {
                return Promise.resolve(instance.init()).then(function() {
                    return instance;
                });
            }
            return instance;
        });

        // On le stocke...
        components[name] = pComponent;

        // Puis on le retourne.
        return pComponent;
    }
1098513
static function ajouter_argument_balise($element, $p) {

		// Toujours un parametre 0 vide s'il n'existe pas.
		if (!isset($p->param[0][0])) {
			if (!isset($p->param[0])) {
				$p->param[0] = array();
			}
			$p->param[0][0] = '';
		}

		$zero = array_shift($p->param[0]);
		array_unshift($p->param[0], $element);
		array_unshift($p->param[0], $zero);

		return $p;
	}
412763
public void seekToHoliday(String holidayString, String direction, String seekAmount) {
    Holiday holiday = Holiday.valueOf(holidayString);
    assert(holiday != null);
    
    seekToIcsEvent(HOLIDAY_ICS_FILE, holiday.getSummary(), direction, seekAmount);
  }
298518
def add_entry_point(self, destination):
        '''
        '''
        self.routes.setdefault('__entry_point', set()).add(destination)
        return self.routes['__entry_point']
935308
function addDestination($label,$style,$a=0,$b=0,$c=0)
    {
        // associates the given label with the destination, it is done this way so that a destination can be specified after
        // it has been linked to
        // styles are the same as the 'openHere' function
        $this->numObj++;
        $this->o_destination( $this->numObj, 'new', array( 'page' => $this->currentPage,
                                                           'type' => $style,
                                                           'p1' => $a, 'p2' => $b, 'p3' => $c ) );
        $id = $this->numObj;
        // store the label->idf relationship, note that this means that labels can be used only once
        $this->destinations["$label"] = $id;
    }
1033988
private void interiorPointExteriorPoint_(int cluster, int id_a, int id_b,
			int predicate) {
		if (m_matrix[predicate] == 0)
			return;

		int clusterParentage = m_topo_graph.getClusterParentage(cluster);

		if ((clusterParentage & id_a) != 0 && (clusterParentage & id_b) == 0) {
			m_matrix[predicate] = 0;
		}
	}
423612
protected function loginWithCookie() {

        $session_id = $this->getSession()->getId();
        $container  = $this->getContainer();
        $db         = $container->get('db');

        // On récupère l'état associé à la session.
        $isGuest = $db->setQuery("SELECT guest FROM #__session WHERE session_id = " . $db->quote($session_id))->loadResult();

        // On connecte l'utilisateur par cookie, seulement s'il invité.
        if (!isset($isGuest) || $isGuest == "1") {

            $cookieName = $this->getShortHashedUserAgent();

            // On contrôle que le cookie existe.
            if ($this->input->cookie->get($cookieName)) {

                // On effectue une authentification silencieuse.
                $this->login(array('username' => ''), array('useCookie' => true, 'silent' => true));

            }

        }

    }
208531
public function init()
    {
        if ( $this->lat0 == 0 ) {
            $this->lat0 = 90; //$this->lat0 ca
        }

        /* Place parameters in static storage for common use
          ------------------------------------------------- */
        $this->temp = $this->b / $this->a;
        $this->es = 1.0 - pow( $this->temp, 2 ); // devait etre dans tmerc.js mais n y est pas donc je commente sinon retour de valeurs nulles 
        $this->e = sqrt( $this->es );
        $this->e0 = Common::e0fn( $this->es );
        $this->e1 = Common::e1fn( $this->es );
        $this->e2 = Common::e2fn( $this->es );
        $this->e3 = Common::e3fn( $this->es );
        $this->ml0 = Common::mlfn( $this->e0, $this->e1, $this->e2, $this->e3, $this->lat0 ); //si que des zeros le calcul ne se fait pas
        //if (!$this->ml0) {$this->ml0=0;}
    }