-------------------------------------------------------------------------
347460
public void setEditMode(EditMode currentMode) {
		super.setEditMode(currentMode);
		if (controller != null) {
			controller.setEditMode(currentMode);
		}
	}
255386
public function init()
	{
		parent::init();
		if($this->getLogPath()===null)
			$this->setLogPath(Yii::app()->getRuntimePath());
	}
759689
public function init()
    {
        $this->renameTableQueries = array();
        $this->dropCheckQueries = array();
        $this->dropForeignKeyQueries = array();
        $this->dropIndexQueries = array();
        $this->dropPrimaryKeyQueries = array();
        $this->dropColumnQueries = array();
        $this->alterColumnQueries = array();
        $this->createColumnQueries = array();
        $this->createPrimaryKeyQueries = array();
        $this->createIndexQueries = array();
        $this->createForeignKeyQueries = array();
        $this->createCheckQueries = array();
    }
747808
public function init(): void
    {
        parent::init();

        if ($this->default !== '' && $this->default !== null && !is_array($this->default)) {
            try {
                $default = Json::decode($this->default);

                if (is_array($default)) {
                    $this->default = $default;
                }
            } catch (InvalidArgumentException $exception) {}
        }
    }
81433
private void initHuf() {
        int[][] DC_matrix0 = new int[12][2];
        int[][] DC_matrix1 = new int[12][2];
        int[][] AC_matrix0 = new int[255][2];
        int[][] AC_matrix1 = new int[255][2];
        DC_matrix = new int[2][][];
        AC_matrix = new int[2][][];
        int p, l, i, lastp, si, code;
        int[] huffsize = new int[257];
        int[] huffcode = new int[257];

        /*
        * init of the DC values for the chrominance
        * [][0] is the code   [][1] is the number of bit
        */

        p = 0;
        for (l = 1; l <= 16; l++) {
            for (i = 1; i <= bitsDCchrominance[l]; i++) {
                huffsize[p++] = l;
            }
        }
        huffsize[p] = 0;
        lastp = p;

        code = 0;
        si = huffsize[0];
        p = 0;
        while (huffsize[p] != 0) {
            while (huffsize[p] == si) {
                huffcode[p++] = code;
                code++;
            }
            code <<= 1;
            si++;
        }

        for (p = 0; p < lastp; p++) {
            DC_matrix1[valDCchrominance[p]][0] = huffcode[p];
            DC_matrix1[valDCchrominance[p]][1] = huffsize[p];
        }

        /*
        * Init of the AC hufmann code for the chrominance
        * matrix [][][0] is the code & matrix[][][1] is the number of bit needed
        */

        p = 0;
        for (l = 1; l <= 16; l++) {
            for (i = 1; i <= bitsACchrominance[l]; i++) {
                huffsize[p++] = l;
            }
        }
        huffsize[p] = 0;
        lastp = p;

        code = 0;
        si = huffsize[0];
        p = 0;
        while (huffsize[p] != 0) {
            while (huffsize[p] == si) {
                huffcode[p++] = code;
                code++;
            }
            code <<= 1;
            si++;
        }

        for (p = 0; p < lastp; p++) {
            AC_matrix1[valACchrominance[p]][0] = huffcode[p];
            AC_matrix1[valACchrominance[p]][1] = huffsize[p];
        }

        /*
        * init of the DC values for the luminance
        * [][0] is the code   [][1] is the number of bit
        */
        p = 0;
        for (l = 1; l <= 16; l++) {
            for (i = 1; i <= bitsDCluminance[l]; i++) {
                huffsize[p++] = l;
            }
        }
        huffsize[p] = 0;
        lastp = p;

        code = 0;
        si = huffsize[0];
        p = 0;
        while (huffsize[p] != 0) {
            while (huffsize[p] == si) {
                huffcode[p++] = code;
                code++;
            }
            code <<= 1;
            si++;
        }

        for (p = 0; p < lastp; p++) {
            DC_matrix0[valDCluminance[p]][0] = huffcode[p];
            DC_matrix0[valDCluminance[p]][1] = huffsize[p];
        }

        /*
        * Init of the AC hufmann code for luminance
        * matrix [][][0] is the code & matrix[][][1] is the number of bit
        */

        p = 0;
        for (l = 1; l <= 16; l++) {
            for (i = 1; i <= bitsACluminance[l]; i++) {
                huffsize[p++] = l;
            }
        }
        huffsize[p] = 0;
        lastp = p;

        code = 0;
        si = huffsize[0];
        p = 0;
        while (huffsize[p] != 0) {
            while (huffsize[p] == si) {
                huffcode[p++] = code;
                code++;
            }
            code <<= 1;
            si++;
        }
        for (int q = 0; q < lastp; q++) {
            AC_matrix0[valACluminance[q]][0] = huffcode[q];
            AC_matrix0[valACluminance[q]][1] = huffsize[q];
        }

        DC_matrix[0] = DC_matrix0;
        DC_matrix[1] = DC_matrix1;
        AC_matrix[0] = AC_matrix0;
        AC_matrix[1] = AC_matrix1;
    }
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];
        }
    }
228964
public function initialize()
    {
        $this->data = new stdClass();
        $this->data->type = null;
        $this->data->createdAt = null;
        $this->data->descriotion = null;
    }
895253
public function index() {
		$currentType = $this->request->getQuery('type');

		if (DatabaseLogsTable::isSearchEnabled()) {
			$query = $this->DatabaseLogs->find('search', ['search' => $this->request->getQuery()]);
		} else {
			$conditions = $this->DatabaseLogs->textSearch();
			if ($currentType) {
				$conditions['type'] = $currentType;
			}
			$query = $this->DatabaseLogs->find()->where($conditions);
		}
		$query = $query->select(['id', 'created', 'type', 'summary', 'count']);

		$logs = $this->paginate($query);
		$types = $this->DatabaseLogs->getTypes();

		$this->set(compact('logs', 'types', 'currentType'));
	}
1293703
public function initialize() {
        parent::initialize();

        $this->addClauses([
            self::DISTINCT_ON   => 'DISTINCT ON (%s)',
            self::JOIN_STRAIGHT => 'INNER JOIN %s ON %s',
            self::MATCH         => '%s',
            self::NOT_REGEXP    => '%s !~* ?',
            self::RETURNING     => 'RETURNING %s',
            self::REGEXP        => '%s ~* ?',
            self::RLIKE         => '%s ~* ?',
            self::UNIQUE_KEY    => 'UNIQUE (%2$s)',
            self::WITH          => '%s'
        ]);

        $this->addKeywords([
            self::CONCURRENTLY      => 'CONCURRENTLY',
            self::CONTINUE_IDENTITY => 'CONTINUE IDENTITY',
            self::DELETE_ROWS       => 'DELETE ROWS',
            self::DROP              => 'DROP',
            self::FOR_SHARE_LOCK    => 'FOR SHARE',
            self::FOR_UPDATE_LOCK   => 'FOR UPDATE',
            self::INHERITS          => 'INHERITS',
            self::IS_GLOBAL         => 'GLOBAL',
            self::LOCAL             => 'LOCAL',
            self::MATCH_FULL        => 'MATCH FULL',
            self::MATCH_PARTIAL     => 'MATCH PARTIAL',
            self::MATCH_SIMPLE      => 'MATCH SIMPLE',
            self::ON_COMMIT         => 'ON COMMIT',
            self::ONLY              => 'ONLY',
            self::PRESERVE_ROWS     => 'PRESERVE ROWS',
            self::RESTART_IDENTITY  => 'RESTART IDENTITY',
            self::SET_DEFAULT       => 'SET DEFAULT',
            self::TABLESPACE        => 'TABLESPACE',
            self::UNIQUE            => 'UNIQUE',
            self::UNLOGGED          => 'UNLOGGED',
            self::WITH_OIDS         => 'WITH OIDS',
            self::WITHOUT_OIDS      => 'WITHOUT OIDS'
        ]);

        $this->addStatements([
            Query::INSERT        => new Statement('INSERT INTO {table} {fields} VALUES {values}'),
            Query::SELECT        => new Statement('SELECT {distinct} {fields} FROM {table} {joins} {where} {groupBy} {having} {compounds} {orderBy} {limit} {lock}'),
            Query::UPDATE        => new Statement('UPDATE {only} {table} SET {fields} {where}'),
            Query::DELETE        => new Statement('DELETE FROM {only} {table} {joins} {where}'),
            Query::TRUNCATE      => new Statement('TRUNCATE {only} {table} {identity} {action}'),
            Query::CREATE_TABLE  => new Statement("CREATE {type} {temporary} {unlogged} TABLE IF NOT EXISTS {table} (\n{columns}{keys}\n) {options}"),
            Query::CREATE_INDEX  => new Statement('CREATE {type} INDEX {concurrently} {index} ON {table} ({fields})'),
            Query::DROP_TABLE    => new Statement('DROP TABLE IF EXISTS {table} {action}'),
            Query::DROP_INDEX    => new Statement('DROP INDEX {concurrently} IF EXISTS {index} {action}')
        ]);
    }
367409
private void onEnd()
   {
      long result = System.currentTimeMillis() - currentTime.get().poll();
      times.incrementAndGet();
      if (result < min.get())
      {
         min.set(result);
      }
      if (max.get() < result)
      {
         max.set(result);
      }
      total.addAndGet(result);
   }
395675
public function init()
    {
        if ($this->widget !== null) {
            $this->widget->init();
        }

        // ensure the widget has an id
        if ($this->widget->id === null) {
            $this->widget->id = $this->widget->getUniqueId();
        }
    }
410957
@Override
  public void aggregate()
  {
    final ArrayOfDoublesSketch update = selector.getObject();
    if (update == null) {
      return;
    }
    synchronized (this) {
      union.update(update);
    }
  }
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();
    }
901841
function(each){
    var ast = [];
    var indexVarName = each.key || 'pug_index' + this.eachCount;
    this.eachCount++;


    var body =  [
                  t.variableDeclaration('var', [
                    t.variableDeclarator(t.identifier('$$obj'), each.astObj || this.parseExpr(each.obj))
                  ])
                ]

    var func =  t.expressionStatement(
                  this.wrapCallExpression(t.callExpression(
                    t.memberExpression(
                      t.functionExpression(
                        null,
                        [],
                        t.blockStatement(body),
                        this.useGenerators
                      ),
                      t.identifier('call')
                    )
                    ,[t.thisExpression()]
                  ))
                )
    ast.push(func)


      var blockEach = [
        t.variableDeclaration('var', [
            t.variableDeclarator(t.identifier(each.val), t.memberExpression(t.identifier('$$obj'), t.identifier(indexVarName), true) )
        ])
      ];
      var blockAlt = [];
 
      push.apply(blockEach, this.visit(each.block, each));
      var arrayLoop = 
          t.blockStatement([t.forStatement(
            t.variableDeclaration('var', [
              t.variableDeclarator(t.identifier(indexVarName), t.numericLiteral(0)),
              t.variableDeclarator(t.identifier('$$l'), t.memberExpression(t.identifier('$$obj'), t.identifier('length')))
            ]),
            t.binaryExpression('<', t.identifier(indexVarName), t.identifier('$$l')),
            t.updateExpression('++', t.identifier(indexVarName), false),
            t.blockStatement(blockEach)
          )]);


      var blockObj = [
        t.expressionStatement(t.updateExpression('++', t.identifier('$$l'), false)),
        t.variableDeclaration('var', [
          t.variableDeclarator(t.identifier(each.val), t.memberExpression(t.identifier('$$obj'), t.identifier(indexVarName), true) )
        ])
      ]
      var blockObjAlt = [];

      push.apply(blockObj, this.visit(each.block, each));
      var objectLoop = t.blockStatement([
        t.variableDeclaration('var', [
          t.variableDeclarator(t.identifier('$$l'), t.numericLiteral(0))
        ]),
        t.forInStatement(
          t.variableDeclaration('var', [
            t.variableDeclarator(t.identifier(indexVarName))
          ]),
          t.identifier('$$obj'),
          t.blockStatement(blockObj)
        )
      ])



    if (each.alternate) {
      push.apply(blockAlt, this.visit(each.alternate, each));
      arrayLoop = t.ifStatement(
        t.memberExpression(t.identifier('$$obj'), t.identifier('length')),
        arrayLoop,
        t.blockStatement(blockAlt)
      );
   }


    if (each.alternate) {
      push.apply(blockObjAlt, this.visit(each.alternate, each));
      objectLoop.body.push(t.ifStatement(
            t.binaryExpression('===', t.identifier('$$l'), t.numericLiteral(0)),
            t.blockStatement(blockObjAlt)
      ))
    }

    var it = t.ifStatement(
        t.binaryExpression('==', t.stringLiteral('number'), t.unaryExpression('typeof', t.memberExpression(t.identifier('$$obj'), t.identifier('length')))),
        arrayLoop, objectLoop)
    body.push(it);

    return ast;

  }
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;}
    }
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;
            }
        }
    }
1024039
public function initializeObject()
    {
        if ($this->cache->has('rulesets') && $this->cache->has('rulesetsIndices')) {
            $this->rulesets = $this->cache->get('rulesets');
            $this->rulesetsIndices = $this->cache->get('rulesetsIndices');
        } else {
            $this->generateRulesets();
            $this->cache->set('rulesets', $this->rulesets);
            $this->cache->set('rulesetsIndices', $this->rulesetsIndices);
        }
    }