Return the style of *style_type* matching *style_id*.

        Returns the default for *style_type* if *style_id* is not found or is |None|, or
        if the style having *style_id* is not of *style_type*.
977978
def get_by_id(self, style_id, style_type):
        
        if style_id is None:
            return self.default(style_type)
        return self._get_by_id(style_id, style_type)
677773
def get_style(self, style):
        
        style_key = tuple(style.items())
        s = self.STYLE_FACTORY.get(style_key, None)
        if s is None:
            s = xlwt.XFStyle()
            for key, values in style.items():
                if key == "background":
                    p = xlwt.Pattern()
                    for attr, value in values:
                        p.__setattr__(attr, value)
                    s.pattern = p
                elif key == "format":
                    s.num_format_str = values
                elif key == "alignment":
                    a = xlwt.Alignment()
                    for attr, value in values:
                        a.__setattr__(attr, value)
                    s.alignment = a
                elif key == "border":
                    b = xlwt.Formatting.Borders()
                    for attr, value in values:
                        b.__setattr__(attr, value)
                    s.borders = b
                elif key == "font":
                    f = self.get_font(values)
                    s.font = f
            self.STYLE_FACTORY[style_key] = s
        return s
1371198
def _claskey(obj, style):
    '''
    '''
    i =  id(obj)
    k = _claskeys.get(i, None)
    if not k:
        _claskeys[i] = k = _Claskey(obj, style)
    return k
1093717
def get_by_id(self, style_id, style_type = None):
        

        for st in self.styles.values():
            if st:
                if st.style_id == style_id:
                    return st

        if style_type:
            return self.styles.get(self.default_styles[style_type], None)
        return None
1124248
def getStyleDict(self):
        '''
            
        '''

        # TODO: This method is not used and does not appear in any tests.

        styleStr = (self.getAttribute('style') or '').strip()
        styles = styleStr.split(';') # Won't work for strings containing semicolon..
        styleDict = OrderedDict()
        for item in styles:
            try:
                splitIdx = item.index(':')
                name = item[:splitIdx].strip().lower()
                value = item[splitIdx+1:].strip()
                styleDict[name] = value
            except:
                continue

        return styleDict
821971
public static int getStyleId(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes){
        TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ThemableView, defStyleAttr, defStyleRes);
        int styleId = a.getResourceId(R.styleable.ThemableView_v_styleId, 0);
        a.recycle();

        return styleId;
    }
69768
def document_style_by_id(id)
      root_object.document_styles.each do |style|
        return style if style.style_id == id
      end
      nil
    end
538201
def serializer_by_type_id(self, type_id):
        
        if type_id <= 0:
            indx = index_for_default_type(type_id)
            serializer = self._constant_type_ids.get(indx, None)
            if serializer is not None:
                return serializer
        return self._id_dic.get(type_id, None)
143303
def type_id(self):
        
        try:
            return ContentType.objects.get_for_model(self.model, for_concrete_model=False).id
        except DatabaseError as e:
            raise DatabaseError("Unable to fetch ContentType object, is a plugin being registered before the initial syncdb? (original error: {0})".format(str(e)))
859142
def parse_style(self, style):
        '''
        
        '''
        style_elements = style.split(';')
        while style_elements:
            element = style_elements.pop()
            if element.startswith('fill:'):
                return self.parse_color(element[5:])
        return None
1180405
function(id) {
            var el = YAHOO.util.Dom.get(id);
            return (el) ? el.style : null;
        }
80149
private ShapeStyle findVertexStyle(GeometryEditService editService, GeometryIndex index) {
		if (editService.getIndexStateService().isMarkedForDeletion(index)) {
			return styleProvider.getVertexMarkForDeletionStyle();
		} else if (!editService.getIndexStateService().isEnabled(index)) {
			return styleProvider.getVertexDisabledStyle();
		} else if (editService.getIndexStateService().isSnapped(index)) {
			return styleProvider.getVertexSnappedStyle();
		}

		boolean selected = editService.getIndexStateService().isSelected(index);
		boolean highlighted = editService.getIndexStateService().isHightlighted(index);
		if (selected && highlighted) {
			return styleProvider.getVertexSelectHoverStyle();
		} else if (selected) {
			return styleProvider.getVertexSelectStyle();
		} else if (highlighted) {
			return styleProvider.getVertexHoverStyle();
		}
		return styleProvider.getVertexStyle();
	}
250140
function elementMatchesStyle( element, style ) {
		var def = style.getDefinition(),
			defAttrs = def.attributes,
			defStyles = def.styles,
			attrName, styleName,
			classes, classPattern, cl;

		if ( element.name != def.element )
			return false;

		for ( attrName in defAttrs ) {
			if ( attrName == 'class' ) {
				classes = defAttrs[ attrName ].split( /\s+/ );
				classPattern = element.classes.join( '|' );
				while ( ( cl = classes.pop() ) ) {
					if ( classPattern.indexOf( cl ) == -1 )
						return false;
				}
			} else {
				if ( element.attributes[ attrName ] != defAttrs[ attrName ] )
					return false;
			}
		}

		for ( styleName in defStyles ) {
			if ( element.styles[ styleName ] != defStyles[ styleName ] )
				return false;
		}

		return true;
	}
1057798
def _read_style(style):
    ''' '''

    if isinstance(style, string_types):
        style = [style]
    else:
        style = list(style)

    return style
925434
private boolean checkStyle(String style) throws IOException {
		if (CSL.supportsStyle(style)) {
			//style is supported
			return true;
		}

		//style is not supported. look for alternatives.
		String message = "Could not find style in classpath: " + style;
		Set<String> availableStyles = CSL.getSupportedStyles();
		
		//output alternative
		if (!availableStyles.isEmpty()) {
			String dyms = ToolUtils.getDidYouMeanString(availableStyles, style);
			if (dyms != null && !dyms.isEmpty()) {
				message += "\n\n" + dyms;
			}
		}
		
		error(message);
		return false;
	}
334606
def getStyle(self, name, verbose=None):
        

        response=api(url=self.___url+'styles/'+str(name)+'.json', method="GET", verbose=verbose, parse_params=False)
        return response
537194
def _retrieve_styles(self):
        
        if self._styles_retrieved:
            return
        self._styles_retrieved = True

        try:
            self.assets.retrieve_styles(url_for('asset'))
        except Exception as ex:
            if self.debug:
                print(format_exc(), file=sys.stderr)
            else:
                print(' * Error: could not retrieve styles:', ex,
                      file=sys.stderr)
        if self.render_inline:
            self._inline_styles()