Returns the current context, with the TABLE_CELL_STYLE flag set if
        it is necessary to reset and parse style attributes.
323204
def _handle_table_cell_end(self, reset_for_style=False):
        """"""
        if reset_for_style:
            self._context |= contexts.TABLE_CELL_STYLE
        else:
            self._context &= ~contexts.TABLE_CELL_STYLE
        return self._pop(keep_context=True)
608783
def get_pattern_context(pattern, index):
    """"""

    last = 0
    current_line = 1
    col = 1
    text = []
    line = 1

    # Split pattern by newline and handle the text before the newline
    for m in RE_PATTERN_LINE_SPLIT.finditer(pattern):
        linetext = pattern[last:m.start(0)]
        if not len(m.group(0)) and not len(text):
            indent = ''
            offset = -1
            col = index - last + 1
        elif last <= index < m.end(0):
            indent = '--> '
            offset = (-1 if index > m.start(0) else 0) + 3
            col = index - last + 1
        else:
            indent = '    '
            offset = None
        if len(text):
            # Regardless of whether we are presented with `\r\n`, `\r`, or `\n`,
            # we will render the output with just `\n`. We will still log the column
            # correctly though.
            text.append('\n')
        text.append('{}{}'.format(indent, linetext))
        if offset is not None:
            text.append('\n')
            text.append(' ' * (col + offset) + '^')
            line = current_line

        current_line += 1
        last = m.end(0)

    return ''.join(text), line, col
1260188
def context(self, **context):
        
        output = orb.Context(context=self.__context) if self.__context is not None else orb.Context()
        output.update(context)
        return output
1227051
def _parse_table(self):
        """"""
        reset = self._head
        self._head += 2
        try:
            self._push(contexts.TABLE_OPEN)
            padding = self._handle_table_style("\n")
        except BadRoute:
            self._head = reset
            self._emit_text("{")
            return
        style = self._pop()

        self._head += 1
        restore_point = self._stack_ident
        try:
            table = self._parse(contexts.TABLE_OPEN)
        except BadRoute:
            while self._stack_ident != restore_point:
                self._memoize_bad_route()
                self._pop()
            self._head = reset
            self._emit_text("{")
            return

        self._emit_table_tag("{|", "table", style, padding, None, table, "|}")
        # Offset displacement done by _parse():
        self._head -= 1
947586
private static function table()
    {
        if (!isset(self::$tableMap[static::class])) {
            if (isset(static::$table)) {
                self::$tableMap[static::class] = static::$table;
            } else {
                self::$tableMap[static::class] = strtolower((new \ReflectionClass(static::class))->getShortName());
            }
        }
        return self::$tableMap[static::class];
    }
752975
def p_current_col(self):
        ""
        prefix = self.input[:self.pos]
        nlidx = prefix.rfind('\n')
        if nlidx == -1:
            return self.pos
        return self.pos - nlidx
875293
def context(self):
        """"""

        # Can't use self.columns b/c of recursion with resolved_url

        t = self.schema_term

        if not t:
            return {}

        sql_columns = []
        all_columns = []

        for i, c in enumerate(t.children):
            if c.term_is("Table.Column"):
                p = c.all_props

                if p.get('sqlselect'): # has a value for SqlSqlect
                    sql_columns.append(p.get('sqlselect'))

                all_columns.append(c.name)

        return {
            'SQL_COLUMNS': ', '.join(sql_columns),
            'ALL_COLUMNS': ', '.join(all_columns)
        }
817081
def get_last_filled_cell(self, table=None):
        

        maxrow = 0
        maxcol = 0

        for row, col, tab in self.dict_grid:
            if table is None or tab == table:
                maxrow = max(row, maxrow)
                maxcol = max(col, maxcol)

        return maxrow, maxcol, table
880452
public ThreadDelegatedContext getContext()
    {
        ThreadDelegatedContext context = threadLocal.get();
        if (context == null) {
            context = new ThreadDelegatedContext();
            threadLocal.set(context);
        }
        return context;
    }
583740
public Map<String, CellStyle> getTitleCellStyleMapping() {
        if (null == this.titleCellStyleMapping) {
            this.titleCellStyleMapping = new HashMap<String, CellStyle>(16);
        }
        return titleCellStyleMapping;
    }
975642
def get_tr(self):
        """"""

        cell_above = CellBorders(self.cell_attributes,
                                 *self.cell.get_above_key_rect())
        return cell_above.get_r()
837041
def get_context(self):
        "  "
        return {
                'content_type_name' : str(self.name),
                'content_type_verbose_name' : self.verbose_name,
                'content_type_verbose_name_plural' : self.verbose_name_plural,
                'object' : self.obj,
                'box' : self,
        }
1356648
function (element) {
		if (!element) {
			return null;
		}

		return window.getComputedStyle ? getComputedStyle(element) : (element.currentStyle || null);
	}
952733
def _get_current_namespace(self, with_magics=False):
        
        ns = {}
        glbs = self._mglobals()

        if self._pdb_frame is None:
            ns.update(glbs)
        else:
            ns.update(glbs)
            ns.update(self._pdb_locals)

        # Add magics to ns so we can show help about them on the Help
        # plugin
        if with_magics:
            line_magics = self.shell.magics_manager.magics['line']
            cell_magics = self.shell.magics_manager.magics['cell']
            ns.update(line_magics)
            ns.update(cell_magics)

        return ns
161975
def _get_all_styles(self):
        
        _styles = {}
        def _get_style(bold=False, bg_col=None, border=None):
            if (bold, bg_col, border) not in _styles:
                _styles[(bold, bg_col, border)] = CellStyle(bold=bold,
                                                            bg_color=bg_col,
                                                            border=border)
            return _styles[(bold, bg_col, border)]

        ws_styles = {}
        for table, (row, col) in self.__tables.values():
            for r in range(row, row + table.header_height):
                for c in range(col, col + table.width):
                    if isinstance(table.header_style, dict):
                        col_name = table.dataframe.columns[c - col]
                        style = table.header_style.get(col_name, _get_style(bold=True))
                    else:
                        style = table.header_style or _get_style(bold=True)
                    ws_styles[(r, c)] = style

            for c in range(col, col + table.row_labels_width):
                for r in range(row + table.header_height, row + table.height):
                    if isinstance(table.index_style, dict):
                        row_name = table.dataframe.index[r - row]
                        style = table.index_style.get(row_name, _get_style(bold=True))
                    else:
                        style = table.index_style or _get_style(bold=True)
                    ws_styles[(r, c)] = style

            if table.style.stripe_colors or table.style.border:
                num_bg_cols = len(table.style.stripe_colors) if \
                    table.style.stripe_colors else 1
                bg_cols = table.style.stripe_colors if \
                    table.style.stripe_colors else None

                for i, row_offset in enumerate(range(table.header_height,
                                                     table.height)):
                    for c in range(col, col + table.width):
                        bg_col = bg_cols[i % num_bg_cols] if bg_cols else None
                        style = _get_style(bold=None, bg_col=bg_col, border=table.style.border)
                        if (row + row_offset, c) in ws_styles:
                            style = style + ws_styles[(row + row_offset, c)]
                        ws_styles[(row + row_offset, c)] = style

            for col_name, col_style in table.column_styles.items():
                try:
                    col_offset = table.get_column_offset(col_name)
                except KeyError:
                    continue
                for i, r in enumerate(range(row + table.header_height, row + table.height)):
                    style = col_style
                    if (r, col + col_offset) in ws_styles:
                        style = ws_styles[(r, col + col_offset)] + style
                    ws_styles[(r, col + col_offset)] = style

            for row_name, row_style in table.row_styles.items():
                try:
                    row_offset = table.get_row_offset(row_name)
                except KeyError:
                    continue
                for i, c in enumerate(range(col + table.row_labels_width, col + table.width)):
                    style = row_style
                    if (row + row_offset, c) in ws_styles:
                        style = ws_styles[(row + row_offset, c)] + style
                    ws_styles[(row + row_offset, c)] = style

            for (row_name, col_name), cell_style in table.cell_styles.items():
                try:
                    col_offset = table.get_column_offset(col_name)
                    row_offset = table.get_row_offset(row_name)
                except KeyError:
                    continue
                style = cell_style
                if (row + row_offset, col + col_offset) in ws_styles:
                    style = ws_styles[(row + row_offset, col + col_offset)] + style
                ws_styles[(row + row_offset, col + col_offset)] = style

        for (row, col), value in self.__values.items():
            if isinstance(value, Value):
                style = value.style
                if style:
                    if (row, col) in ws_styles:
                        style = style + ws_styles[(row, col)]
                    ws_styles[(row, col)] = style

        return ws_styles
173257
public static JKContext getCurrentContext() {
		JKContext context = (JKContext) JKThreadLocal.getValue(JKContextConstants.JK_CONTEXT);
		if (context == null) {
			context = getInstance().createDesktopContext();
			JKThreadLocal.setValue(JKContextConstants.JK_CONTEXT, context);
		}
		return context;
	}
483776
public static UIContext getCurrent() {
		Stack<UIContext> stack = CONTEXT_STACK.get();

		if (stack == null || stack.isEmpty()) {
			return null;
		}

		return getStack().peek();
	}