Load Tab Content
160208
function loadTab(loadTabParams, loadTabOptions) {
      // Load Tab Props
      var url = loadTabParams.url;
      var content = loadTabParams.content;
      var el = loadTabParams.el;
      var template = loadTabParams.template;
      var templateUrl = loadTabParams.templateUrl;
      var component = loadTabParams.component;
      var componentUrl = loadTabParams.componentUrl;
      // Component/Template Callbacks
      function resolve(contentEl) {
        router.allowPageChange = true;
        if (!contentEl) { return; }
        if (typeof contentEl === 'string') {
          $newTabEl.html(contentEl);
        } else {
          $newTabEl.html('');
          if (contentEl.f7Component) {
            contentEl.f7Component.$mount(function (componentEl) {
              $newTabEl.append(componentEl);
            });
          } else {
            $newTabEl.append(contentEl);
          }
        }
        $newTabEl[0].f7RouterTabLoaded = true;
        onTabLoaded(contentEl);
      }
      function reject() {
        router.allowPageChange = true;
        return router;
      }

      if (content) {
        resolve(content);
      } else if (template || templateUrl) {
        try {
          router.tabTemplateLoader(template, templateUrl, loadTabOptions, resolve, reject);
        } catch (err) {
          router.allowPageChange = true;
          throw err;
        }
      } else if (el) {
        resolve(el);
      } else if (component || componentUrl) {
        // Load from component (F7/Vue/React/...)
        try {
          router.tabComponentLoader($newTabEl[0], component, componentUrl, loadTabOptions, resolve, reject);
        } catch (err) {
          router.allowPageChange = true;
          throw err;
        }
      } else if (url) {
        // Load using XHR
        if (router.xhr) {
          router.xhr.abort();
          router.xhr = false;
        }
        router.xhrRequest(url, loadTabOptions)
          .then(function (tabContent) {
            resolve(tabContent);
          })
          .catch(function () {
            router.allowPageChange = true;
          });
      }
    }
687630
function tabBrowser_getTab(index) {
    if (index === undefined)
      index = this.selectedIndex;

    return this.getElement({type: "tabs_tab", subtype: "index", value: index});
  }
1047258
def _render_tab(lst):
    '''
    
    '''
    ret = []
    for pre in lst['pre']:
        ret.append('{0}\n'.format(pre))
    for cron in lst['crons']:
        ret.append('{0} {1} {2} {3}\n'.format(cron['path'],
                                                      cron['mask'],
                                                      cron['cmd'],
                                                      TAG
                                                      )
                   )
    return ret
836479
def tab(self, output):
        """"""
        import csv
        csvwriter = csv.writer(self.outfile, dialect=csv.excel_tab)
        csvwriter.writerows(output)
348871
private static void encodeTabContentPanes(final FacesContext context, final ResponseWriter writer,
			final TabView tabView, final int currentlyActiveIndex, final List<UIComponent> tabs) throws IOException {
		writer.startElement("div", tabView);
		String classes = "tab-content";
		if (tabView.getContentClass() != null) {
			classes += " ";
			classes += tabView.getContentClass();
		}
		writer.writeAttribute("class", classes, "class");

		if (tabView.getContentStyle() != null) {
			String inlineCSS = tabView.getContentStyle();
			writer.writeAttribute("style", inlineCSS, "style");
		}

		String role = "tablist";
		if (tabView.getRole() != null) {
			role = tabView.getRole();
		}
		writer.writeAttribute("role", role, "role");

		if (null != tabs) {
			int numberOfTabsRendered = 0;
			for (int index = 0; index < tabs.size(); index++) {
				final Tab tab = (Tab) tabs.get(index);
				if (tab.isRendered()) {
					final int currentIndex = numberOfTabsRendered;
					Runnable r = new Runnable() {
						int offset = 0;
						public void run() {
							try {
								encodeTabPane(context, writer, tab,
										(currentIndex+offset == currentlyActiveIndex) && (!tabView.isDisabled()));
								offset++;
							} catch (IOException ex) {
								// exotic case, suffice it to log it
								LOGGER.log(Level.SEVERE, "An exception occurred while rendering a tab.", ex);
							}
						}
					};

					if (tab.getValue() == null) {
						r.run();
						numberOfTabsRendered ++;
					} else {
						numberOfTabsRendered += ((Tab)tabs.get(currentIndex)).encodeTabs(context, r);
					}
				}
			}
		}
		writer.endElement("div");
	}
1079779
function getTabData(url){
    var key,
        data;

    key = urlToKey(url);
    obj = tabData[key];
    return (obj)? obj : {data: {}, url: url};
}
1018327
def load(self):
        """"""
        page = requests.get(self._url)
        # Forces utf-8 to prevent character mangling
        page.encoding = 'utf-8'

        tree = html.fromstring(page.text)
        lyric_div = tree.get_element_by_id('lyrics-body-text')
        verses = [c.text_content() for c in lyric_div.find_class('verse')]
        self._lyrics = '\n\n'.join(verses)
        return self
299949
def tabset(titles, contents):
    """"""

    tabs = []
    for no, title in enumerate(titles):
        tab = {
            'title': title,
        }
        content = contents[no]
        if isinstance(content, list):
            tab['items'] = content
        else:
            tab['items'] = [content]
        tabs.append(tab)

    result = {
        'type': 'tabs',
        'tabs': tabs
    }

    return result
375018
def _get_tab(cls):
        """"""

        if not cls._tabs['dec_cobs']:
            # Compute the COBS table for decoding
            cls._tabs['dec_cobs']['\xff'] = (255, '')
            cls._tabs['dec_cobs'].update(dict((chr(l), (l, '\0'))
                                              for l in range(1, 255)))

            # Compute the COBS table for encoding
            cls._tabs['enc_cobs'] = [(255, '\xff'),
                                     dict((l, chr(l))
                                          for l in range(1, 255)),
                                     ]

        return cls._tabs['dec_cobs'], cls._tabs['enc_cobs']
871214
function selectTab() {
        var href = tab.href.split('#')[1];
        var panel = layout._content.querySelector('#' + href);
        layout._resetTabState(tabs);
        layout._resetPanelState(panels);
        u.addClass(tab, layout._CssClasses.IS_ACTIVE);
        u.addClass(panel, layout._CssClasses.IS_ACTIVE);
    }
685911
function getTabData_() {
    var tabData = {};
    var tabSwitcher = MainView.getInstance().tabSwitcher();
    var tabIdToView = tabSwitcher.getAllTabViews();
    for (var tabId in tabIdToView) {
      var view = tabIdToView[tabId];
      if (view.saveState)
        tabData[tabId] = view.saveState();
    }
  }
815681
function() {
            var tabs = Dom.getChildren(this._tabParent),
                contentElements = Dom.getChildren(this._contentParent),
                activeIndex = this.get(ACTIVE_INDEX),
                tab,
                attr,
                active;

            for (var i = 0, len = tabs.length; i < len; ++i) {
                attr = {};
                
                if (contentElements[i]) {
                    attr.contentEl = contentElements[i];
                }

                tab = new YAHOO.widget.Tab(tabs[i], attr);
                this.addTab(tab);
                
                if (tab.hasClass(tab.ACTIVE_CLASSNAME) ) {
                    active = tab;
                }
            }
            if (activeIndex) {
                this.set(ACTIVE_TAB, this.getTab(activeIndex));
            } else {
                this._configs.activeTab.value = active; // dont invoke method
                this._configs.activeIndex.value = this.getTabIndex(active);
            }
        }
1294351
def fetch_tablist(self):
		""""""
		# find websocket endpoint
		try:
			response = requests.get("http://%s:%s/json" % (self.host, self.port))
		except requests.exceptions.ConnectionError:
			raise cr_exceptions.ChromeConnectFailure("Failed to fetch configuration json from browser!")

		tablist = json.loads(response.text)

		return tablist
119886
private static void encodeTabLinks(FacesContext context, ResponseWriter writer, TabView tabView,
			int currentlyActiveIndex, List<UIComponent> tabs, String clientId, String hiddenInputFieldID)
			throws IOException {
		writer.startElement("ul", tabView);
		writer.writeAttribute("id", clientId, "id");
		Tooltip.generateTooltip(context, tabView, writer);
		String classes = "nav ";
		if ("left".equalsIgnoreCase(tabView.getTabPosition()) || "right".equalsIgnoreCase(tabView.getTabPosition())) {
			classes += " nav-pills nav-stacked";
		} else {
			classes = classes + (tabView.isPills() ? " nav-pills" : " nav-tabs");
		}

		if (tabView.getStyleClass() != null) {
			classes += " ";
			classes += tabView.getStyleClass();
		}

		writer.writeAttribute("class", classes, "class");

		String role = "tablist";
		AJAXRenderer.generateBootsFacesAJAXAndJavaScript(context, tabView, writer, false);
		R.encodeHTML4DHTMLAttrs(writer, tabView.getAttributes(), new String[] { "style" });
		if (tabView.getRole() != null) {
			role = tabView.getRole();
		}

		writer.writeAttribute("role", role, "role");

		encodeTabs(context, writer, tabs, currentlyActiveIndex, hiddenInputFieldID, tabView.isDisabled());
		writer.endElement("ul");
	}
1310786
public void disableTab(E tabContent, String reason) {

        Integer index = new Integer(m_tabPanel.getWidgetIndex(tabContent));
        Element tab = getTabElement(index.intValue());
        if ((tab != null) && !m_disabledTabIndexes.containsKey(index)) {
            if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(tab.getTitle())) {
                m_disabledTabIndexes.put(index, tab.getTitle());
            } else {
                m_disabledTabIndexes.put(index, "");
            }
            tab.addClassName(I_CmsLayoutBundle.INSTANCE.tabbedPanelCss().tabDisabled());
            tab.setTitle(reason);
        }
    }
866955
function load()
    {
        $content = trim(file_get_contents($this->file));
        $this->data = explode("\n",$content);
    }
826605
def _tab(element):
    

    elements = {
        'x': 'tab5.2a.txt',
        'y': 'tab5.2b.txt',
        's': 'tab5.2d.txt'
    }

    if element.lower() not in elements.keys():
        raise ValueError('Unknown element \'%s\'' % element)

    filepath = Path(__file__).parent / "data" / elements[element.lower()]

    total = []
    with filepath.open() as fhd:

        for line in fhd.read().splitlines():

            line = line.strip()

            if line.startswith("#") or not line.strip():
                continue

            if line.startswith('j = '):
                result = []
                total.append(result)
                continue

            # The first field is only an index
            fields = line.split()[1:]
            fields[:2] = [float(x) for x in fields[:2]]
            fields[2:] = [int(x) for x in fields[2:]]
            result.append(fields)

    return total