Get the programming language of `node`.
768770
function language(node) {
  var className = node.properties.className || []
  var length = className.length
  var index = -1
  var value

  while (++index < length) {
    value = className[index]

    if (value === 'no-highlight' || value === 'nohighlight') {
      return false
    }

    if (value.slice(0, 5) === 'lang-') {
      return value.slice(5)
    }

    if (value.slice(0, 9) === 'language-') {
      return value.slice(9)
    }
  }

  return null
}
939335
function ( nodes ) {
			var form = nodes[0],
				word = nodes[1];

			return word && form && this.language.convertGrammar( word, form );
		}
320181
def get_languages(self):
        """"""
        if self._languages_cache is None:
            self._languages_cache = list(self.iter_languages())
        return self._languages_cache
575633
def language(self):
        

        language_item = [subtag for subtag in self.subtags if subtag.type == 'language']

        return language_item[0] if len(language_item) > 0 else None
700832
public java.lang.String getLang() {
        return (java.lang.String) getStateHelper().eval(PropertyKeys.lang);

    }
342418
def language(lang_code):
    ''''''
    ctx = None
    if not request:
        ctx = current_app.test_request_context()
        ctx.push()
    backup = g.get('lang_code')
    g.lang_code = lang_code
    refresh()
    yield
    g.lang_code = backup
    if ctx:
        ctx.pop()
    refresh()
129033
public function getXmlLang()
	{
		// Take and work on a copy of the node so it can be manipulated
		$node = $this->domNode;

		while ( ! $node instanceof \DOMDocument )
		{
			if ( $node->hasAttributes() )
			{
				foreach ( $node->attributes as $name => $attrNode )
				{
					// This should return the lang attribute of the node if there is one.
					if ( $name != "lang" || $attrNode->localName != "lang" || $attrNode->namespaceURI != XmlReservedNs::xml ) continue;
					return $attrNode->nodeValue;
				}
			}

			// If not, check the parent recursively
			$node = $node->parentNode;
		}

		return "";
	}
82811
def detect_language(lang, kernel_source):
    """"""
    if lang is None:
        if callable(kernel_source):
            raise TypeError("Please specify language when using a code generator function")
        kernel_string = get_kernel_string(kernel_source)
        if "__global__" in kernel_string:
            lang = "CUDA"
        elif "__kernel" in kernel_string:
            lang = "OpenCL"
        else:
            lang = "C"
    return lang
300379
def get_lang_dict(self):
        """"""
        r = self.yandex_translate_request("getLangs")
        self.handle_errors(r)

        return r.json()["langs"]
1054741
def _get_node_name(self, node):
        """"""
        res = getattr(node, "name", None)
        if res is None:
            return res

        if isinstance(res, AST.TypeDecl):
            return res.declname
        
        return res
931061
function getLengthOfPrecedingTextNodes( node ) {
				var sum = 0;

				while ( ( node = node.getPrevious() ) && node.type == CKEDITOR.NODE_TEXT )
					sum += node.getLength();

				return sum;
			}
808612
def get_node(self, goid, goobj):
        """"""
        # pydot.Node.objdict holds this information. pydot.Node.objdict['name']
        return pydot.Node(
            self.get_node_text(goid, goobj),
            shape="box",
            style="rounded, filled",
            fillcolor=self.go2color.get(goid, "white"),
            color=self.objcolor.get_bordercolor(goid))
549169
def get_node_type(dgtree):
    """"""
    if is_leaf(dgtree):
        return TreeNodeTypes.leaf_node

    root_label = dgtree.label()
    if root_label == '':
        assert dgtree == DGParentedTree('', []), \
            "The tree has no root label, but isn't empty: {}".format(dgtree)
        return TreeNodeTypes.empty_tree
    elif root_label in NUCLEARITY_LABELS:
        return TreeNodeTypes.nuclearity_node
    else:
        assert isinstance(dgtree, (RSTTree, DGParentedTree)), type(dgtree)
        return TreeNodeTypes.relation_node
498327
def translate(self, node):
        
        _translate = self._translate_functions.get(node.operator)
        return _translate(node)
453205
def get_code_language(self):
        
        js_source = self.get_js_source()
        if self.options.get("include_html", False):
            resources = get_sphinx_resources(include_bokehjs_api=True)
            html_source = BJS_HTML.render(
                css_files=resources.css_files,
                js_files=resources.js_files,
                bjs_script=js_source)
            return [html_source, "html"]
        else:
            return [js_source, "javascript"]
911523
def get_node_type(type_str):
    """"""
    if type_str == "container":
        return NodeType.CONTAINER
    elif type_str == "loop_plate":
        return NodeType.LOOP
    elif type_str == "assign":
        return NodeType.ASSIGN
    elif type_str == "condition":
        return NodeType.CONDITION
    elif type_str == "decision":
        return NodeType.DECISION
    else:
        raise ValueError("Unrecognized type string: ", type_str)
1010820
def language(self):
        """"""
        try:
            return self._language
        except AttributeError:
            self._language = find_language(self, getattr(self, 'exts', None))
        return self._language