****************************************************
338300
function LGAudioMediaSource() {
        this.properties = {
            gain: 0.5
        };

        this._audionodes = [];
        this._media_stream = null;

        this.addOutput("out", "audio");
        this.addInput("gain", "number");

        //create gain node to control volume
        var context = LGAudio.getAudioContext();
        this.audionode = context.createGain();
        this.audionode.graphnode = this;
        this.audionode.gain.value = this.properties.gain;
    }
755420
public function process()
    {
        parent::process();

        if (!$this->isVisible()) {
            return;
        }

        $year = 0;
        $month = 1;
        $day = 1;
        $hour = 0;
        $minute = 0;
        $second = 0;

        $all_empty = true;
        $any_empty = false;

        if ($this->display_parts & self::YEAR) {
            $year_flydown = $this->getCompositeWidget('year_flydown');
            $year = $year_flydown->value;
            if ($year === null) {
                if ($this->required_parts & self::YEAR) {
                    $any_empty = true;
                } else {
                    $year = date('Y');
                }
            } else {
                $all_empty = false;
            }
        } else {
            $year = date('Y');
        }

        if ($this->display_parts & self::MONTH) {
            $month_flydown = $this->getCompositeWidget('month_flydown');
            $month = $month_flydown->value;
            if ($month === null) {
                if ($this->required_parts & self::MONTH) {
                    $any_empty = true;
                } else {
                    $month = 1;
                }
            } else {
                $all_empty = false;
            }
        }

        if ($this->display_parts & self::DAY) {
            $day_flydown = $this->getCompositeWidget('day_flydown');
            $day = $day_flydown->value;
            if ($day === null) {
                if ($this->required_parts & self::DAY) {
                    $any_empty = true;
                } else {
                    $day = 1;
                }
            } else {
                $all_empty = false;
            }
        }

        if ($this->display_parts & self::TIME) {
            $time_entry = $this->getCompositeWidget('time_entry');
            if ($time_entry->value === null) {
                if ($this->required_parts & self::TIME) {
                    $any_empty = true;
                } else {
                    $hour = 0;
                    $minute = 0;
                    $second = 0;
                }
            } else {
                $hour = $time_entry->value->getHour();
                $minute = $time_entry->value->getMinute();
                $second = $time_entry->value->getSecond();
                $all_empty = false;
            }
        }

        if ($all_empty) {
            if ($this->required && $this->isSensitive()) {
                if ($this->show_field_title_in_messages) {
                    $message = Swat::_('%s is required.');
                } else {
                    $message = Swat::_('This field is required.');
                }
                $this->addMessage(new SwatMessage($message, 'error'));
            }
            $this->value = null;
        } elseif ($any_empty) {
            if ($this->show_field_title_in_messages) {
                $message = Swat::_('%s is not a valid date.');
            } else {
                $message = Swat::_('This is not a valid date.');
            }
            $this->addMessage(new SwatMessage($message, 'error'));
            $this->value = null;
        } else {
            try {
                $date = new SwatDate();
                if ($date->setDate($year, $month, $day) === false) {
                    throw new SwatException('Invalid date.');
                }

                if ($date->setTime($hour, $minute, $second) === false) {
                    throw new SwatException('Invalid date.');
                }

                $date->setTZById('UTC');

                $this->value = $date;
                $this->validateRanges();
            } catch (SwatException $e) {
                if ($this->show_field_title_in_messages) {
                    $message = Swat::_('%s is not a valid date.');
                } else {
                    $message = Swat::_('This is not a valid date.');
                }
                $this->addMessage(new SwatMessage($message, 'error'));
                $this->value = null;
            }
        }
    }
168113
@Override
  public void aggregate()
  {
    final IndexedInts keys = keySelector.getRow();
    for (int i = 0; i < valueSelectors.length; i++) {
      values[i] = valueSelectors[i].getDouble();
    }
    synchronized (this) {
      for (int i = 0, keysSize = keys.size(); i < keysSize; i++) {
        final String key = keySelector.lookupName(keys.get(i));
        sketch.update(key, values);
      }
    }
  }
649406
protected function initItems()
	{
		$initItems = null;
		
		if ($this->items != null)
		{
			foreach ($this->items as $item)
			{
				if (isset($item['value']))
				{
					$i = $item['value'];
					unset($item['value']);
					$initItems[$i] = $item;
				}
				else 
				{
					$initItems = $this->items;	
				}
			}
			
			$this->items = array_replace($this->defaults, $initItems);
		}
		else 
		{
			$this->items = $this->defaults;
		}
	}
1080965
public function notify()
    {
        if (0 < count($this->observers)) {
            foreach ($this->observers as $observer) {
                /** @var \Liip\Drupal\Modules\EventManager\EventObserverInterface $observer */
                $observer->update($this);
            }
        }
    }
555672
function(data_source) {

		this.guid = Lava.guid++;

		if (data_source) {

			var count = 0,
				i = 0,
				name;

			if (Array.isArray(data_source)) {

				for (count = data_source.length; i < count; i++) {

					this._push(this._uid++, data_source[i], null);

				}

			} else if (data_source.isCollection) {

				this._data_names = data_source.getNames();
				this._data_values = data_source.getValues();
				for (count = this._data_values.length; i < count; i++) {

					this._data_uids.push(this._uid++);

				}

			} else {

				if (data_source.isProperties) {

					data_source = data_source.getProperties();

				}

				for (name in data_source) {

					this._push(this._uid++, data_source[name], name);

				}

			}

			this._count = this._data_uids.length;

		}

	}
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] = [];
                }
            }
        }
359433
public function commit()
    {
        if ($this->_hasChanges) {
            $this->_getIndexWriter()->commit();

            $this->_updateDocCount();

            $this->_hasChanges = false;
        }
    }
159786
public function commit() : void
    {
        if (null === $this->is_valid) {
            $this->validate();
        }
        if ($this->is_valid && $this->user_value != null) {
            $this->default_value = $this->user_value;
        }
        $this->user_value = null;
        $this->is_valid = null;
        $this->is_changed = false;
    }
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()]
                );
            }
        }
    }
1009299
public function join($element)
	{
		if($element->slave!==null)
			$this->join($element->slave);
		if(!empty($element->relation->select))
			$this->selects[]=$element->getColumnSelect($element->relation->select);
		$this->conditions[]=$element->relation->condition;
		$this->orders[]=$element->relation->order;
		$this->joins[]=$element->getJoinCondition();
		$this->joins[]=$element->relation->join;
		$this->groups[]=$element->relation->group;
		$this->havings[]=$element->relation->having;

		if(is_array($element->relation->params))
		{
			if(is_array($this->params))
				$this->params=array_merge($this->params,$element->relation->params);
			else
				$this->params=$element->relation->params;
		}
		$this->elements[$element->id]=true;
	}
650190
public function execute(InputInterface $input, OutputInterface $output)
    {
        $this->eventDispatcher->addListener(StepTested::AFTER, array($this, 'registerUndefinedStep'), -999);
        $this->output = $output;

        if ($input->getOption('append-snippets')) {
            $this->eventDispatcher->addListener(ExerciseCompleted::AFTER, array($this, 'appendAllSnippets'), -999);
        }

        if (!$input->getOption('no-snippets') && !$input->getOption('append-snippets')) {
            $this->eventDispatcher->addListener(ExerciseCompleted::AFTER, array($this, 'printAllSnippets'), -999);
        }

        if (!$input->getOption('no-snippets')) {
            $this->eventDispatcher->addListener(ExerciseCompleted::AFTER, array($this, 'printUndefinedSteps'), -995);
        }
    }
617827
public function initialize()
    {
        if ($this->isInitialize) {
            return ;
        }

        $this->isInitialize = true;

        $this->getEventManager()->trigger(self::EVENT_INITIALIZE, $this);
    }
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(' ');
    }
1014246
public function setJdFromYmd(): void
    {
        if ($this->year === 0) {
            $this->minimum_julian_day = 0;
            $this->maximum_julian_day = 0;
        } elseif ($this->month === 0) {
            $this->minimum_julian_day = $this->calendar->ymdToJd($this->year, 1, 1);
            $this->maximum_julian_day = $this->calendar->ymdToJd($this->nextYear($this->year), 1, 1) - 1;
        } elseif ($this->day === 0) {
            [$ny, $nm] = $this->nextMonth();
            $this->minimum_julian_day = $this->calendar->ymdToJd($this->year, $this->month, 1);
            $this->maximum_julian_day = $this->calendar->ymdToJd($ny, $nm, 1) - 1;
        } else {
            $this->minimum_julian_day = $this->calendar->ymdToJd($this->year, $this->month, $this->day);
            $this->maximum_julian_day = $this->minimum_julian_day;
        }
    }
1318787
private void checkIndices(int row, int col) {
        if (row < 0 || row >= rows)
            throw new ArrayIndexOutOfBoundsException("row: " + row);
        else if (col < 0 || col >= cols)
            throw new ArrayIndexOutOfBoundsException("column: " + col);
    }
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);
        }
    }