/*输入URL，获取结构化新闻信息
544930
public static News getNewsByUrl(String url) throws Exception {
//        HttpRequest request = new HttpRequest(url);
//        String html = request.response().decode();
        String html = okHttpRequester.getResponse(url).html();
        return getNewsByHtml(html, url);
    }
1266686
function checkUrl(){
    var newPath = location.hash.substr(1) || '';

    if (newPath != currentPath)
    {
      // check for recursion
      if (preventRecursion(newPath))
        return;

      // save current path
      currentPath = newPath;

      var routesToLeave = [];
      var routesToEnter = [];
      var routesToMatch = [];

      allRoutes.forEach(function(route){
        var flags = route.processLocation_(newPath);

        if (flags & ROUTE_LEAVE)
          routesToLeave.push(route);
        if (flags & ROUTE_ENTER)
          routesToEnter.push(route);
        if (flags & ROUTE_MATCH)
          routesToMatch.push(route);
      });

      for (var i = 0; i < routesToLeave.length; i++)
        routeLeave(routesToLeave[i]);

      for (var i = 0; i < routesToEnter.length; i++)
        routeEnter(routesToEnter[i]);

      for (var i = 0; i < routesToMatch.length; i++)
        routeMatch(routesToMatch[i]);

      /** @cut */ flushLog(namespace + ': hash changed to "' + newPath + '"');
    }
    else
    {
      allRoutes.forEach(function(route){
        if (route.value)
        {
          routeEnter(route, true);
          routeMatch(route, true);
        }
      });

      /** @cut */ flushLog(namespace + ': checkUrl()');
    }
  }
1325766
function(url) {
      if (!isSupportHistoryAPI && ('' + url).indexOf('#') === 0) {
        changeState(null, url);
      } else {
        windowLocation.assign(url);
      }
    }
300632
function uagent_info()
   { 
	 $this->useragent = isset($_SERVER['HTTP_USER_AGENT'])?strtolower($_SERVER['HTTP_USER_AGENT']):'';
	 $this->httpaccept = isset($_SERVER['HTTP_ACCEPT'])?strtolower($_SERVER['HTTP_ACCEPT']):'';
		
	 //Let's initialize some values to save cycles later.
	 $this->InitDeviceScan();
   }
639206
function(_url,_replaced){
        var _name = !_replaced?'pushState':'replaceState';
        _ctxt.history[_name](null,document.title,_url);
    }
5598
def update
      url = single_url
      payload = attributes_to_payload
      payload[:reset_data] = true
      to_server url, payload
    end
22940
public function updateUrl()
    {
        $this->url = '';
        $this->generateCompleteUrl($this);
        $this->url = $this->prefixPath . $this->url;

        if (strlen($this->slug) > 1) {
            $this->url .= "/{$this->slug}";
        }

        return $this;
    }
453940
def _refresh_url(self):
        """"""
        songs = self._api.weapi_songs_url([int(self.identifier)])
        if songs and songs[0]['url']:
            self.url = songs[0]['url']
        else:
            self.url = ''
722042
public function updateURL(&$url) {
		if($this->owner instanceof \Image_Cached || $this->owner instanceof \CdnImage_Cached) {
			return; /** handled in @link ImageCachedExtension */
		}

        // in the CMS, we do _not_ change the asset
        $controller = Controller::has_curr() ? Controller::curr() : null;
        if ($controller instanceof LeftAndMain) {
            return;
        }

        if ($this->owner->CanViewType && $this->owner->getViewType() != CDNFile::ANYONE_PERM) {
            return;
        }

        $cdnLink = $this->getCdnLink();
        if ($cdnLink) {
            $url = $cdnLink;
        }
	}
1158587
public function url($url, $change_freq = null, $priority = null, $lastmod = null) {
        $tag = "<url>\n";
        $tag .= "\t<loc>{$url}</loc>\n";
        if ($change_freq) {
            $tag .= "\t<changefreq>{$change_freq}</changefreq>\n";
        }
        if ($priority) {
            $tag .= "\t<priority>{$priority}</priority>\n";
        }
        if ($lastmod) {
            $lastmod = date('Y-m-d', strtotime($lastmod));
            $tag .= "\t<lastmod>{$lastmod}</lastmod>\n";
        }

        $tag .= "</url>\n";
        return $tag;
    }
94781
function(url) {
			var loaded		= this.loaded,
				pending		= this.pending,
				failed		= this.failed,
				relative	= this.relative(url);

			return loaded[relative] || pending[relative] || [failed[relative]];
		}
1129672
function(data) {

	// Strip out the old query string and append the new one
	if (data) {
		this.url = this.url.split('?', 1)[0] + '?' + data;
	}

	this.req.open('GET', this.url);
	return this._run();
}
22248
function goToUrl(url) {
        if (!url) { return; }

        if (_.isArray(url)) {
            url = url.join('/');
        }

        var hasHttp = url.indexOf('http') === 0;
        if (!hasHttp && url.indexOf('/') !== 0) {
            url = '/' + url;
        }

        hasHttp ? $window.location.href = url : $location.path(url);
    }
494642
function saveUrl(url) {
  fs.writeFile('serve-url.log', url, error => {
    if (error) {
      return console.log(error)
    }

    console.log('serve-url.log updated!')
  })
}
759986
function updateSavedState() {
  'use strict';
  if (split) {
    return;
  }

  var mapping = {
    live: 'output',
    javascript: 'js',
    css: 'css',
    html: 'html',
    console: 'console'
  };

  var withRevision = true;

  var query = $panelCheckboxes.filter(':checked').map(function () {
    return mapping[this.getAttribute('data-panel')];
  }).get().join(',');
  $shareLinks.each(function () {
    var path = this.getAttribute('data-path');
    var url = jsbin.getURL({ withRevision: withRevision }) + path + (query && this.id !== 'livepreview' ? '?' + query : ''),
        nodeName = this.nodeName;
    var hash = panels.getHighlightLines();

    if (hash) {
      hash = '#' + hash;
    }

    if (nodeName === 'A') {
      this.href = url;
    } else if (nodeName === 'INPUT') {
      this.value = url;
      if (path === '/edit') {
        this.value += hash;
      }
    } else if (nodeName === 'TEXTAREA') {
      this.value = ('<a class="jsbin-embed" href="' + url + hash + '">' + documentTitle + '</a><' + 'script src="' + jsbin.static + '/js/embed.js"><' + '/script>').replace(/<>"&/g, function (m) {
          return {
            '<': '&lt;',
            '>': '&gt;',
            '"': '&quot;',
            '&': '&amp;'
          }[m];
        });
    }
  });
}
1346786
function AddUrl($url, ChangeFrequency $changeFreq = null, $priority= null, Date $lastMod = null)
    {
        $elm = $this->domDoc->createElement("url");
        $this->AppendTextChild($elm, "loc", $url);
        
        if ($changeFreq)
            $this->AppendTextChild($elm, "changefreq", (string)$changeFreq);
        
        if ($priority)
            $this->AppendTextChild($elm, "priority", $priority);
        
        if ($lastMod)
            $this->AppendTextChild($elm, "lastmod", $lastMod->ToString('c'));
        
        $this->urlset->appendChild($elm);
    }
686755
protected function generateUpdateUrl()
    {
        $request = System::getContainer()->get('request_stack')->getCurrentRequest();

        $configPicker = new PickerConfig(
            'cca_tree',
            [
                'fieldType'    => $this->fieldType,
                'sourceName'   => $this->sourceName,
                'modelId'      => ModelId::fromModel($this->dataContainer->getModel())->getSerialized(),
                'orderField'   => $this->orderField,
                'propertyName' => $this->name
            ],
            $this->valueToWidget($this->value)
        );

        return System::getContainer()->get('router')->generate(
            'cca_dc_general_tree_update',
            [
                'picker' => $configPicker->cloneForCurrent((string) $request->query->get('context'))->urlEncode()
            ],
            UrlGenerator::ABSOLUTE_URL
        );
    }