Create tracker entity from html
@param html
423008
function createEntity(id, json) {

    const originStates = json.dat[0].track.z1.map(mapRow)
    const destinStates = json.dat[0].track.z2 ? json.dat[0].track.z1.map(mapRow) : null

    return new EntityInfo({
        id: id,
        states: originStates,
        destinStates: destinStates
    })
}
1298557
def set_tag(self, tag):
        '''
        
        '''
        if self._world:
            if self._world.get_entity_by_tag(tag):
                raise NonUniqueTagError(tag)
        self._tag = tag
484505
RenderException addStackTraceElement(TemplateNode template, SourceLocation location) {
    // Typically, this is fast since templates aren't that deep and we only do this in error
    // situations so performance matters less.
    soyStackTrace.add(template.createStackTraceElement(location));
    return this;
  }
596398
function _makeHTMLTarget(targets, node) {
        if (node.location) {
            var url = DOMAgent.url;
            var location = node.location;
            if (node.canHaveChildren()) {
                location += node.length;
            }
            url += ":" + location;
            var name = "&lt;" + node.name + "&gt;";
            var file = _fileFromURL(url);
            targets.push({"type": "html", "url": url, "name": name, "file": file});
        }
    }
1118438
function (fn, create) {
  return subscribe.call(this, fn, function (value) {
    return Utils.trackNode(create(value));
  }, function (value) {
    this.value.replace(create(value));
  }).value.fragment;
}
337067
public void doGet(HttpServletRequest request,
                      HttpServletResponse response) 
        throws ServletException, IOException
    {
        response.setContentType("text/html");
        Page page= new Page();

        HttpSession session = request.getSession(getURI(request).indexOf("new")>0);
        
        page.title("Session Dump Servlet: ");        
        
        TableForm tf = new TableForm(response.encodeURL(getURI(request)));
        tf.method("POST");
        
        if (session==null)
        {
            page.add("<H1>No Session</H1>");
            tf.addButton("Action","New Session");
        }
        else
        {
            try
            {   
                tf.addText("ID",session.getId());
                tf.addText("State",session.isNew()?"NEW":"Valid");
                tf.addText("Creation",
                           new Date(session.getCreationTime()).toString());
                tf.addText("Last Access",
                           new Date(session.getLastAccessedTime()).toString());
                tf.addText("Max Inactive",
                           ""+session.getMaxInactiveInterval());

                tf.addText("Context",""+session.getServletContext());
                
                Enumeration keys=session.getAttributeNames();
                while(keys.hasMoreElements())
                {
                    String name=(String)keys.nextElement();
                    String value=session.getAttribute(name).toString();
                    tf.addText(name,value);
                }
                
                tf.addTextField("Name","Property Name",20,"name");
                tf.addTextField("Value","Property Value",20,"value");
                tf.addTextField("MaxAge","MaxAge(s)",5,"");
                tf.addButtonArea();
                tf.addButton("Action","Set");
                tf.addButton("Action","Remove");
                tf.addButton("Action","Invalidate");

                page.add(tf);
                tf=null;
                if (request.isRequestedSessionIdFromCookie())
                    page.add("<P>Turn off cookies in your browser to try url encoding<BR>");
                
                if (request.isRequestedSessionIdFromURL())
                    page.add("<P>Turn on cookies in your browser to try cookie encoding<BR>");
                
            }
            catch (IllegalStateException e)
            {
                log.debug(LogSupport.EXCEPTION,e);
                page.add("<H1>INVALID Session</H1>");
                tf=new TableForm(getURI(request));
                tf.addButton("Action","New Session");
            }
        }

        if (tf!=null)
            page.add(tf);
        
        Writer writer=response.getWriter();
        page.write(writer);
        writer.flush();
    }
100712
public void append(String html) {

        if ((html != null) && (html.length() > 0)) {
            appendHtmlInternal(m_reportContent.getElement(), html);
            scrollToBottom(getElement(), m_reportContent.getElement());
        }
    }
431558
function(html) {
		this._newdom = this._parse(html);
		this._crawl(this._newdom, this._olddom, this._newdom, this._keyid, {});
		this._olddom = this._newdom;
	}
312047
private function createDOMDocumentFromHTML($html = null) {

        if ($html != null) {
            libxml_use_internal_errors(true);
            $dom = new DOMDocument;
            $dom->loadHTML($html);
            libxml_clear_errors();
            libxml_use_internal_errors(false);
            return $dom;
        }
    }
894721
function google(e) {
    var tracker = this.tracking.ga;
    if (!tracker) return;

    ga(function done() {
      ga.getByName(tracker).send.apply(
        tracker,
        [ 'event' ].concat($(e.element).get('track').split(';'))
      );
    });
  }
1019282
public function initialize()
    {
        if (true == $this->initialized) {
            return;
        }
        $this->initialized = true;
        
        if (null !== $this->trackingId) {
            $trackerId = $this->trackingId;
            $inlineScript = $this->getView()->plugin('inlineScript');
            $inlineScript->appendScript(<<<HDOC
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '$trackerId', 'auto');
ga('send', 'pageview');
HDOC
            );
        }
    }
878839
static void writeTracker(JSONWriter writer, Tracker tracker)
			throws JSONException {
		writer.key("id");
		writer.value(tracker.getId());
		writer.key("name");
		writer.value(tracker.getName());
	}
322778
public static int getHtmlCodeByHtmlEntity(String htmlEntity)
    {
        Entity entity = fHtmlToWiki.get(htmlEntity);
        return entity != null ? entity.fHtmlCode : 0;
    }
844412
function createExpressoEntity(html) {
    let $ = parser.load(html)

    let data = []
    $('table span').each(function (i, elem) {
        if(i >= 10 )
            data.push($(this).text().trim().replace(/\s\s+/g, ' '))
    })

    return new ExpressoInfo({
        'guide': data[0],
        'origin': data[1],
        'date': moment.tz(data[2], "YYYY-MM-DD", zone).format(),
        'status': data[3],
        'weight': data[4],
        'parcels': data[5],
        'receiver_name': data[6],
        'address': parseAddress(data[7]),
        'refund': data[8],
        'ref': data[9],
    })
}
978337
function initDocument (document, window) {
  const html = document.childNodes.find(el => el.tagName === 'HTML');
  const documentElement = html || (document.childNodes.length > 0 ? document.childNodes[0] : null);
  const head = html ? html.childNodes.find(el => el.tagName === 'HEAD') : new window.HTMLHeadElement();
  const body = html ? html.childNodes.find(el => el.tagName === 'BODY') : new window.HTMLBodyElement();

  document.documentElement = documentElement;
  document.readyState = 'loading';
  document.head = head;
  document.body = body;
  document.location = window.location;
  document.cookie = '';
  document.referrer = '';
  document.createElement = (tagName, options = {}) => {
    tagName = tagName.toUpperCase();
    const HTMLElementTemplate = window[symbols.htmlTagsSymbol][tagName];
    const element = HTMLElementTemplate ? new HTMLElementTemplate() : new window.HTMLElement(tagName);
    options.is && element.setAttribute('is', options.is);
    return element;
  };
  document.createElementNS = (namespace, tagName, options) => document.createElement(tagName, options);
  document.createDocumentFragment = () => new window.DocumentFragment();
  document.createTextNode = text => new window.Text(text);
  document.createComment = comment => new window.Comment(comment);
  document.createEvent = type => {
    switch (type) {
      case 'KeyboardEvent':
      case 'KeyboardEvents':
        return new KeyboardEvent();
      case 'MouseEvent':
      case 'MouseEvents':
        return new MouseEvent();
      case 'Event':
      case 'Events':
      case 'HTMLEvents':
        return new Event();
      default:
        throw new Error('invalid createEvent type: ' + type);
    }
  };
  document.createRange = () => new window.Range();
  document.importNode = (el, deep) => el.cloneNode(deep);
  document.scripts = utils._makeHtmlCollectionProxy(document.documentElement, 'script');
  document.styleSheets = [];
  document.implementation = new DOMImplementation(window);
  document.resources = new GlobalContext.Resources(); // non-standard
  document.activeElement = body;
  document.open = () => {
    document.innerHTML = '';
  };
  document.close = () => {};
  document.write = htmlString => {
    const childNodes = parse5.parseFragment(htmlString, {
      locationInfo: true,
    }).childNodes.map(childNode => GlobalContext._fromAST(childNode, window, document.body, document, true));
    for (let i = 0; i < childNodes.length; i++) {
      document.body.appendChild(childNodes[i]);
    }
  };
  document.execCommand = command => {
    if (command === 'copy') {
      // nothing
    } else if (command === 'paste') {
      document.dispatchEvent(new Event('paste'));
    }
  };
  document[symbols.pointerLockElementSymbol] = null;
  document[symbols.fullscreenElementSymbol] = null;

  const runElQueue = [];
  const _addRun = fn => {
    (async () => {
      if (!document[symbols.runningSymbol]) {
        document[symbols.runningSymbol] = true;

        try {
          await fn();
        } catch(err) {
          console.warn(err.stack);
        }

        document[symbols.runningSymbol] = false;
        if (runElQueue.length > 0) {
          _addRun(runElQueue.shift());
        } else {
          document.emit('flush');
        }
      } else {
        runElQueue.push(fn);
      }
    })();
  };
  document[symbols.runningSymbol] = false;
  document[symbols.addRunSymbol] = _addRun;

  if (window.top === window) {
    document.addEventListener('pointerlockchange', () => {
      const iframes = document.getElementsByTagName('iframe');
      for (let i = 0; i < iframes.length; i++) {
        const iframe = iframes[i];
        if (iframe.contentDocument) {
          iframe.contentDocument._emit('pointerlockchange');
        }
      }
    });
    document.addEventListener('fullscreenchange', () => {
      const iframes = document.getElementsByTagName('iframe');
      for (let i = 0; i < iframes.length; i++) {
        const iframe = iframes[i];
        if (iframe.contentDocument) {
          iframe.contentDocument._emit('fullscreenchange');
        }
      }
    });
  }

  process.nextTick(async () => {
    if (body) {
      const bodyChildNodes = body.childNodes;
      body.childNodes = new window.NodeList();

      try {
        await GlobalContext._runHtml(document.head, window);
      } catch(err) {
        console.warn(err);
      }

      body.childNodes = bodyChildNodes;

      try {
        await GlobalContext._runHtml(document.body, window);
      } catch(err) {
        console.warn(err);
      }

      document.readyState = 'interactive';
      document.dispatchEvent(new Event('readystatechange', {target: document}));

      document.dispatchEvent(new Event('DOMContentLoaded', {
        target: document,
        bubbles: true,
      }));
    } else {
      try {
        await GlobalContext._runHtml(document, window);
      } catch(err) {
        console.warn(err);
      }

      document.readyState = 'interactive';
      document.dispatchEvent(new Event('readystatechange', {target: document}));

      document.dispatchEvent(new Event('DOMContentLoaded', {
        target: document,
        bubbles: true,
      }));
    }

    document.readyState = 'complete';
    document.dispatchEvent(new Event('readystatechange', {target: document}));

    document.dispatchEvent(new Event('load', {target: document}));
    window.dispatchEvent(new Event('load', {target: window}));

    const displays = window.navigator.getVRDisplaysSync();
    if (displays.length > 0 && (!window[symbols.optionsSymbol].args || ['all', 'webvr'].includes(window[symbols.optionsSymbol].args.xr))) {
      const _initDisplays = () => {
        const presentingDisplay = displays.find(display => display.isPresenting);
        if (presentingDisplay && presentingDisplay.constructor.name === 'FakeVRDisplay') {
          _emitOneDisplay(presentingDisplay);
        } else {
          _emitOneDisplay(displays[0]);
        }
      };
      const _emitOneDisplay = display => {
        const e = new window.Event('vrdisplayactivate');
        e.display = display;
        window.dispatchEvent(e);
      };
      const _delayFrames = (fn, n = 1) => {
        if (n === 0) {
          fn();
        } else {
          window.requestAnimationFrame(() => {
            _delayFrames(fn, n - 1);
          });
        }
      };
      if (document.resources.resources.length === 0) {
        _delayFrames(() => {
          _initDisplays();
        }, 2); // arbitary delay to give site time to bind events
      } else {
        const _update = () => {
          if (document.resources.resources.length === 0) {
            _initDisplays();
            document.resources.removeEventListener('update', _update);
          }
        };
        document.resources.addEventListener('update', _update);
      }
    }
  });

  return document;
}
732148
def tracked(self, tag=None, fromdate=None, todate=None):
        
        return self.call("GET", "/stats/outbound/tracked", tag=tag, fromdate=fromdate, todate=todate)
131232
def link_to_tracked_if(condition, name, track_path = "/", options = {}, html_options = {}, &block)
      raise AnalyticsError.new("You must set Rubaidh::GoogleAnalytics.defer_load = false to use outbound link tracking") if GoogleAnalytics.defer_load == true
      html_options.merge!({:onclick => tracking_call(track_path)})
      link_to_unless !condition, name, options, html_options, &block
    end