<script src="//s.ytimg.com/yts/jsbin/player-fr_FR-vflHVjlC5/base.js" name="player/base"></script>
557351
public function getPlayerUrl($video_html)
    {
        if (strpos($video_html, 'http') === 0) {
            $video_html = $this->curl($video_html);
        }

        $player_url = null;

        // check what player version that video is using
        if (preg_match('@<script\s*src="([^"]+player[^"]+js)@', $video_html, $matches)) {
            $player_url = $matches[1];

            // relative protocol?
            if (strpos($player_url, '//') === 0) {
                $player_url = 'http://' . substr($player_url, 2);
            } elseif (strpos($player_url, '/') === 0) {
                // relative path?
                $player_url = 'http://www.youtube.com' . $player_url;
            }
        }

        return $player_url;
    }
1142965
function(match, $root){

			// Title bar
			$root.find('.timer').text(match.group.name);
			$root.find('.field-title').text('FIELD');
			$root.find('.field').text(match.field);

			// Content area
			var teamAName = match.teamA ? match.teamA.name : '-';
			$root.find('.team.left .team-name').text(teamAName);

			var teamBName = match.teamB ? match.teamB.name : '-';
			$root.find('.team.right .team-name').text(teamBName);
			
		}
1125554
def addPlayer(settings):
    """"""
    _validate(settings)
    player = PlayerRecord(settings)
    player.save()
    getKnownPlayers()[player.name] = player
    return player
550572
function() {
            // set player position (player is not added to the enitity manager)
            this.entityManager.add(this.player.x, this.player.y, this.player);
            this.player.updateFov();
            this.lighting.update();
            this.renderer.setCenter(this.player.x, this.player.y);
            this.renderer.draw();
        }
583536
function Base (source, layer, options) {
  options = options || {};
  this._id = options.id || Base.$generateId();
}
474284
public function addBaseUrlScript()
    {
        // Add base Url and absolute base Url to the head
        $arrJsPosHEad = empty($this->js[static::POS_HEAD]) ? [] : $this->js[static::POS_HEAD];
        array_unshift($arrJsPosHEad,
            "var absoluteBaseUrl = \"" . Yii::$app->urlManager->createAbsoluteUrl('site/index') . "\";");
        array_unshift($arrJsPosHEad, "var baseUrl = \"" . Yii::$app->urlManager->baseUrl . "\";");
        $this->js[static::POS_HEAD] = $arrJsPosHEad;
    }
384008
function BaseCoverArt(options) {

  options = options || {};

  this.userAgent = options.userAgent || _userAgent;
  this.host = _host;
  this.basePath = _path;
  this.http = _http;
}
42053
function Base(){
  var that = this
    ;
  
  this.pendStep = 500;
  
  this.on('pendStart', function(){
    this.pendTimer = setInterval(function(){
      that.pending && that.pending();
    }, this.pendStep);
  });
  this.on('pendEnd', function(res, err){
    clearInterval(this.pendTimer);
    if(!res && err){
      process.nextTick(function(){
        console.error(color(err).error);
      });
    }
  });
  
  this.on('data', function(type, data){
    that.rendData(type, data);
  });
  
}
1124629
function writeJs(source, js, base) {
  var filename = path.basename(source, path.extname(source)) + '.js'
  var srcDir   = path.dirname(source)
  var baseDir  = srcDir.substring(base.length)
  var dir      = options.output ? path.join(options.output, baseDir) : srcDir
  var jsPath   = path.join(dir, filename)
  var compile  = function() {
    fs.writeFile(jsPath, js, function(err) {
      if(options.compile && options.watch) console.log("Compiled " + source)
    })
  }
  fs.exists(dir, function(exists) {
    exists ? compile() : exec("mkdir -p " + dir, compile)
  })
}
757115
public void init(BaseField owner)
    {
        m_bScreenMove = true;
        m_bInitMove = true;
        m_bReadMove = true;
        super.init(owner);
    }
281023
function Base(runner) {
  var self = this
    , stats = this.stats = { suites: 0, tests: 0, passes: 0, pending: 0, failures: 0 }
    , failures = this.failures = [];

  if (!runner) return;
  this.runner = runner;

  runner.stats = stats;

  runner.on('start', function(){
    stats.start = new Date;
  });

  runner.on('suite', function(suite){
    stats.suites = stats.suites || 0;
    suite.root || stats.suites++;
  });

  runner.on('test end', function(test){
    stats.tests = stats.tests || 0;
    stats.tests++;
  });

  runner.on('pass', function(test){
    stats.passes = stats.passes || 0;

    var medium = test.slow() / 2;
    test.speed = test.duration > test.slow()
      ? 'slow'
      : test.duration > medium
        ? 'medium'
        : 'fast';

    stats.passes++;
  });

  runner.on('fail', function(test, err){
    stats.failures = stats.failures || 0;
    stats.failures++;
    test.err = err;
    failures.push(test);
  });

  runner.on('end', function(){
    stats.end = new Date;
    stats.duration = new Date - stats.start;
  });

  runner.on('pending', function(){
    stats.pending++;
  });
}
45980
function checkBaseURL(href) {
        var el = document.createElement('div'),
        escapedURL = href.split('&').join('&amp;').
            split('<').join('&lt;').
            split('"').join('&quot;');

        el.innerHTML = '<a href="' + escapedURL + '">x</a>';
        return el.firstChild.href;
	}
934939
protected function initScriptNameAndBasePath () {
		$this->basePath = '';
		$this->scriptName = str_replace('\\', '/', $this->globalServer['SCRIPT_NAME']);
		$lastSlashPos = mb_strrpos($this->scriptName, '/');
		if ($lastSlashPos !== 0) {
			$redirectUrl = rawurldecode(isset($this->globalServer['REDIRECT_URL']) ? $this->globalServer['REDIRECT_URL'] : '');
			$redirectUrlLength = mb_strlen($redirectUrl);
			$requestUri = rawurldecode($this->globalServer['REQUEST_URI']);
			$questionMarkPos = mb_strpos($requestUri, '?');
			if ($questionMarkPos !== FALSE) $requestUri = mb_substr($requestUri, 0, $questionMarkPos);
			if ($redirectUrlLength === 0 || ($redirectUrlLength > 0 && $redirectUrl === $requestUri)) {
				$this->basePath = mb_substr($this->scriptName, 0, $lastSlashPos);
				$this->scriptName = '/' . mb_substr($this->scriptName, $lastSlashPos + 1);
			} else {
				// request was redirected by Apache `mod_rewrite` with `DPI` flag:
				$requestUriPosInRedirectUri = mb_strrpos($redirectUrl, $requestUri);
				$apacheRedirectedPath = mb_substr($redirectUrl, 0, $requestUriPosInRedirectUri);
				$this->scriptName = mb_substr($this->scriptName, mb_strlen($apacheRedirectedPath));
				$lastSlashPos = mb_strrpos($this->scriptName, '/');
				$this->basePath = mb_substr($this->scriptName, 0, $lastSlashPos);
			}
		} else {
			$this->scriptName = '/' . mb_substr($this->scriptName, $lastSlashPos + 1);
		}
	}
421018
function appendScript( script ) {
        currentlyAddingScript = script;

        // If BASE tag is in play, using appendChild is a problem for IE6.
        // See: http://dev.jquery.com/ticket/2709
        baseElement
            ? headElement.insertBefore( script, baseElement )
            : headElement.appendChild( script );

        currentlyAddingScript = null;
    }
634599
def whoAmI(self):
        """"""
        self.inflate() # ensure self.players contains player objects
        if self.thePlayer:
            for p in self.players:
                if p.name != self.thePlayer: continue
                return p
        elif len(self.players) == 1:
            ret = self.players[0]
            self.thePlayer = ret.name # remember this for the future in case more players are added
            return ret
        raise Exception("could not identify which player this is given %s (%s)"%(self.players, self.thePlayer))
451127
function(l) {
		var _height = this.options.height,
			_player_height = 0,
			_player_width = 0;

		if (TL.Browser.mobile) {
			_height = (this.options.height/2);
		} else {
			_height = this.options.height - this.options.credit_height - this.options.caption_height - 30;
		}

		this._el.content_item.style.maxHeight = "none";
		trace(_height);
		trace(this.options.width)
		if (_height > this.options.width) {
			trace("height is greater")
			_player_height = this.options.width + 80 + "px";
			_player_width = this.options.width + "px";
		} else {
			trace("width is greater")
			trace(this.options.width)
			_player_height = _height + "px";
			_player_width = _height - 80 + "px";
		}


		this.player.style.width = _player_width;
		this.player.style.height = _player_height;

		if (this._el.credit) {
			this._el.credit.style.width		= _player_width;
		}
		if (this._el.caption) {
			this._el.caption.style.width		= _player_width;
		}
	}
1046107
private function setBaseURL()
    {
        if (isset($_SERVER['HTTP_HOST']))
        {
            $base_url = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off' ? 'https' : 'http';
            $base_url .= '://' . $_SERVER['HTTP_HOST'];
            $base_url .= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);
        }
        else
        {
            $base_url = 'http://localhost/';
        }

        self::$base_url = $base_url;
    }