******************************************************************************************
503667
public function isFirstIdHistoriqueEvenementFromHistorique($idEvenement = 0)
    {

        /*
		 * Modification due to historiqueEvenement and evenements split
		 *
		 * Previously working on idHistoriqueEvenement and checking if it was the first one with the same idEvenement as input
		 *
		 * Now : Just checking number of evenements in historiqueEvenement with $idEvenement
		 * If there is more than 2 events with same idEvenement (1 for the group of events and 1 for the event itself)
		 * there has been modification(s) on this event
		 */
        $requete = "SELECT idEvenement
				FROM historiqueEvenement
				WHERE idEvenement = ".$idEvenement;
        $result = $this->connexionBdd->requete($requete);
        if (mysql_num_rows($result)>=2) {
            return false;
        }
        return true;

    }
1350673
public function decrement()
    {
        if (0 >= --$this->listeners && null !== $this->observable) {
            $this->observable->dispose(new AutoDisposedException());
        }
    }
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;
        }
    }
767330
@Override
   public void onCreate(SQLiteDatabase db) {
      int pointer = context.getResources().getIdentifier(INIT_CREATE_SQL, "string", context.getPackageName());
      if (pointer == 0) {
         Log.e(TAG, "undefined sql id - " + INIT_CREATE_SQL);
      } else {
         String createTabelSql = context.getResources().getString(pointer);
         for (String sql : createTabelSql.split(";")) {
            db.execSQL(sql);
         }
      }
   }
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();
    }
1142451
public function index()
    {
        $index = $this->getIndexName();

        $this->assertTrue(
            $this->table->hasIndex($index), "The {$this->name} column is not indexed."
        );

        $this->assertTrue(
            $this->table->getIndex($index)->isSimpleIndex(), "The {$this->name} column is not a simple index."
        );
    }
1230901
public function set(array $data) {
		foreach ($data as $name => $value) {
			$this->__set($name, $value);
		}
	}
617827
public function initialize()
    {
        if ($this->isInitialize) {
            return ;
        }

        $this->isInitialize = true;

        $this->getEventManager()->trigger(self::EVENT_INITIALIZE, $this);
    }
401506
public function validate($value, Constraint $constraint): void
    {
        Assert::isInstanceOf($value, AttributeValueInterface::class);

        $defaultLocale = $this->localeProvider->getDefaultLocaleCode();
        $configuration = $value->getAttribute()->getConfiguration();

        if ($defaultLocale === $value->getLocaleCode()) {
            $configuration = array_merge($configuration, ['required' => true]);
        }

        /** @var AttributeTypeInterface $attributeType */
        $attributeType = $this->attributeTypeRegistry->get($value->getType());

        $attributeType->validate($value, $this->context, $configuration);
    }
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;
            }
        }
    }
410957
@Override
  public void aggregate()
  {
    final ArrayOfDoublesSketch update = selector.getObject();
    if (update == null) {
      return;
    }
    synchronized (this) {
      union.update(update);
    }
  }
218153
protected function invShiftRows()
    {
        $temp = '';
        for ($i = 1; $i < 4; ++$i) {
            for ($j = 0; $j < self::$nb; ++$j) {
                $temp[($i + $j) % self::$nb] = $this->state[$i][$j];
            }
            for ($j = 0; $j < self::$nb; ++$j) {
                $this->state[$i][$j] = $temp[$j];
            }
        }
    }
1228890
public function init()
    {
        parent::init();

        if (empty($this->id)) {
            $this->id = $this->hasModel() ? Html::getInputId($this->model, $this->attribute) : $this->getId();
        }
        if (empty($this->name)) {
            $this->name = $this->hasModel() ? Html::getInputName($this->model, $this->attribute) : $this->id;
        }
        if (empty($this->value) && $this->hasModel() && $this->model->hasAttribute($this->attribute)) {
            $this->value = $this->model->getAttribute($this->attribute);
        }

        if(!$this->autoHeightEnable){
            if(empty($this->width)){
                $this->width = '100%';
            }
            if(empty($this->height)){
                $this->height = '350';
            }
        }

        $options = [
            'id' => $this->id,
            'style' => 'width:100%;height:350px'
        ];
        $this->options = array_merge($options,$this->options);

        $jsOptions = [
            'serverUrl' => Url::to(['ueditor','type'=>'ueditor']),
            'autoHeightEnable' => $this->autoHeightEnable,
            'autoFloatEnable' => true,
            'textarea'=>$this->name
        ];
        $this->jsOptions = array_merge($jsOptions,$this->jsOptions);
    }
314138
private void init() {
        width = Double.MAX_VALUE;
        for (int i = 1; i < data.length; i++) {
            double w = Math.abs(data[i][0] - data[i - 1][0]);
            if (width > w) {
                width = w;
            }
        }

        leftTop = new double[data.length][2];
        rightTop = new double[data.length][2];
        leftBottom = new double[data.length][2];
        rightBottom = new double[data.length][2];

        for (int i = 0; i < data.length; i++) {
            leftTop[i][0] = data[i][0] - width / 2;
            leftTop[i][1] = data[i][1];

            rightTop[i][0] = data[i][0] + width / 2;
            rightTop[i][1] = data[i][1];

            leftBottom[i][0] = data[i][0] - width / 2;
            leftBottom[i][1] = 0;

            rightBottom[i][0] = data[i][0] + width / 2;
            rightBottom[i][1] = 0;
        }
    }
804877
public function handle()
    {
        $this->comment('                                   ');
        $this->comment('    ...........................    ');
        $this->comment('   .yyyyyyyyyyyyyyyyyyyyyyyyyyy.   ');
        $this->comment('   .yyyyyyyyysssyyyyyyyyyyyyyyy.   ');
        $this->comment('   .yyyyyyyy/...oyyyyyyyyyyyyyy.     _                     _                 ');
        $this->comment('   .yyyyyyyy:   oyyyyyyyyyyyyyy.    | |                   | |                ');
        $this->comment('   .yyyyyyyy:   oyyyyyyyyyyyyyy.    | |     __ _ _ __ __ _| |_   _ _ __ ___  ');
        $this->comment("   .yyyyyyyy:   oyyyyyyyyyyyyyy.    | |    / _` | '__/ _` | | | | | '_ ` _ \ ");
        $this->comment('   .yyyyyyyy:   oyyyyyyyyyyyyyy.    | |___| (_| | | | (_| | | |_| | | | | | |');
        $this->comment("   .yyyyyyyy:   oyyyyyyyyyyyyyy.    |______\__,_|_|  \__,_|_|\__,_|_| |_| |_|");
        $this->comment('   .yyyyyyyy:   -:::::::syyyyyy.                                             ');
        $this->comment('   .yyyyyyyy+`          syyyyyy.    Laralum Administration Panel - laralum.com');
        $this->comment('   .yyyyyyyyys++++++++++yyyyyyy.   ');
        $this->comment('   .yyyyyyyyyyyyyyyyyyyyyyyyyyy.   ');
        $this->comment('   .yyyyyyyyyyyyyyyyyyyyyyyyyyy.   ');
        $this->comment('    ...........................    ');
        $this->comment('                                   ');
        $this->line(' ');
    }
454169
public function setValue($value) : void
    {
        if (is_object($value) && !($value instanceof ArrayObject)) {
            $this->class = $value;
            if (isset($this->value)) {
                $old = clone $this->value;
                $work = clone $value;
                if ($work instanceof JsonSerializable) {
                    $work = $work->jsonSerialize();
                }
                foreach ($work as $prop => $status) {
                    $value->$prop = isset($old->$prop) ? $old->$prop : false;
                }
            }
            $this->value = $value;
        }
        if (!isset($this->value)) {
            $this->value = clone $this->class;
        }
        if (is_array($value) || $value instanceof ArrayObject) {
            $work = clone $this->value;
            if ($work instanceof JsonSerializable) {
                $work = $work->jsonSerialize();
            }
            foreach ($work as $prop => $status) {
                $this->value->$prop = false;
            }
            foreach ($value as $prop) {
                if (is_string($prop) && $this->hasBit($prop) && isset($this->value->$prop)) {
                    $this->value->$prop = true;
                }
            }
        }
        $found = [];
        foreach ((array)$this as $element) {
            if ($element->getElement() instanceof Hidden) {
                continue;
            }
            $check = $element->getElement()->getValue();
            if (isset($this->value->$check) && $this->value->$check) {
                $element->getElement()->check();
            } else {
                $element->getElement()->check(false);
            }
            $found[] = $check;
        }
    }
1247260
public function visits()
    {
        if ($this->keys->id) {
            $this->redis->zrem($this->keys->visits, $this->keys->id);
            $this->redis->del($this->keys->visits . "_countries:{$this->keys->id}");
            $this->redis->del($this->keys->visits . "_referers:{$this->keys->id}");

            foreach ($this->periods as $period => $days) {
                $this->redis->zrem($this->keys->period($period), $this->keys->id);
            }

            $this->ips();
        } else {
            $this->redis->del($this->keys->visits);
            $this->redis->del($this->keys->visits . '_total');
        }

    }