Change the window's classname and or class.

        :param name: The new class name. If ``None``, no change.
        :param class_: The new class. If ``None``, no change.
11547
def set_window_class(self, window, name, class_):
        
        _libxdo.xdo_set_window_class(self._xdo, window, name, class_)
272141
function addClass(node, name) {
        if (hasClass(node, name)) {
            return;
        }
        if (node.classList) {
            node.classList.add(name);
        } else {
            node.className += " " + name;
        }
    }
714224
def get_class(self, name):
        
        for i in self.get_classes():
            if i.get_name() == name:
                return i
        return None
498906
function addClass(element, className) {
    if ((' ' + element.className + ' ').indexOf(' ' + className + ' ') === -1) {
      element.className += (element.className ? ' ' : '') + className;
    }  
  }
154383
def find_class(name, classes):
    """"""
    name = name.lower()
    cls = next((c for c in classes if c.configuration_key == name), None)
    if cls is None:
        raise ValueError("No class named '%s' could be found" % name)
    return cls
439630
def patch_class(input_class):
    
    class Instantiator(object):
        @classmethod
        def _doubles__new__(self, *args, **kwargs):
            pass

    new_class = type(input_class.__name__, (input_class, Instantiator), {})

    return new_class
313272
def get_name(cls):
        
        if not hasattr(cls.Meta, 'name'):
            class_name = getattr(cls.get_model(), '__name__', None)
            setattr(
                cls.Meta,
                'name',
                inflection.underscore(class_name) if class_name else None
            )

        return cls.Meta.name
173966
def remove_class(cls, *args):
        
        for cls2 in args:
            try:
                del cls.classes[cls2.__name__]
            except KeyError:
                pass
720350
def unmangle_name(name, classname):
        
        if name.startswith(classname) and name[-2:] != '__':
            return name[len(classname) - 2:]
        return name
1333131
def repr_new_instance(self, class_data):
        
        classname = self.formatted_classname(class_data["classname"])
        instancename = self.formatted_instancename(class_data["classname"])
        arguments = list()
        for key, value in self.sorted_dict(class_data.get("metadata", dict())):
            arguments.append("%s=%r" % (key, value))
        return "%s = %s(%s)" % (
            instancename, classname, ", ".join(arguments))
641386
public function updateClassNames(&$classes)
    {
        if ($position = $this->owner->Position) {
            $classes[] = $this->style('position', $position);
        }
    }
1274039
public void setClassName(String className) {

        checkFrozen();
        if (className != null) {
            // remove leading or trailing white space
            className = className.trim();
        }
        if (!CmsStringUtil.isValidJavaClassName(className)) {
            CmsMessageContainer message = Messages.get().container(Messages.ERR_BAD_JOB_CLASS_NAME_1, className);
            if (OpenCms.getRunLevel() > OpenCms.RUNLEVEL_2_INITIALIZING) {
                throw new CmsIllegalArgumentException(message);
            } else {
                LOG.warn(message.key());
            }
        } else {
            Class<?> jobClass;
            try {
                jobClass = Class.forName(className);
                if (!I_CmsScheduledJob.class.isAssignableFrom(jobClass)) {
                    CmsMessageContainer message = Messages.get().container(
                        Messages.ERR_JOB_CLASS_BAD_INTERFACE_2,
                        className,
                        I_CmsScheduledJob.class.getName());

                    if (OpenCms.getRunLevel() > OpenCms.RUNLEVEL_2_INITIALIZING) {
                        throw new CmsIllegalArgumentException(message);
                    } else {
                        LOG.warn(message.key());
                    }

                }
            } catch (ClassNotFoundException e) {
                CmsMessageContainer message = Messages.get().container(Messages.ERR_JOB_CLASS_NOT_FOUND_1, className);
                if (OpenCms.getRunLevel() > OpenCms.RUNLEVEL_2_INITIALIZING) {
                    throw new CmsIllegalArgumentException(message);
                } else {
                    LOG.warn(message.key());
                }

            }
        }
        m_className = className;
        if (getJobName() == null) {
            // initialize job name with class name as default
            setJobName(className);
        }

    }
721105
def _renameClasses(classes, prefix):
    
    renameMap = {}
    for classID, glyphList in classes.items():
        if len(glyphList) == 0:
            groupName = "%s_empty_lu.%d_st.%d_cl.%d" % (prefix, classID[0], classID[1], classID[2])
        elif len(glyphList) == 1:
            groupName = list(glyphList)[0]
        else:
            glyphList = list(sorted(glyphList))
            groupName = prefix + glyphList[0]
        renameMap[classID] = groupName
    return renameMap
411343
def import_name_or_class(name):
    "  "

    if isinstance(name, str):

        # for "a.b.c.d" -> [ 'a.b.c', 'd' ]
        module_name, object_name = name.rsplit('.',1)
        # __import__ loads the multi-level of module, but returns
        # the top level, which we have to descend into
        mod = __import__(module_name)

        components = name.split('.')

        for comp in components[1:]: # Already got the top level, so start at 1

            mod = getattr(mod, comp)
        return mod
    else:
        return name
1246923
def convert_name(name, _class)
    name_index = get_name_index(name)

    # The ptg value depends on the class of the ptg.
    if _class == 0
      ptgName = @ptg['ptgName']
    elsif _class == 1
      ptgName = @ptg['ptgNameV']
    elsif _class == 2
      ptgName = @ptg['ptgNameA']
    end

    [ptgName, name_index].pack('CV')
  end
1177835
function setClassName(element, cssClass) {
    cssClass = snippet.isArray(cssClass) ? cssClass.join(' ') : cssClass;

    cssClass = trim(cssClass);

    if (snippet.isUndefined(element.className.baseVal)) {
        element.className = cssClass;

        return;
    }

    element.className.baseVal = cssClass;
}
632521
function removeClass(node, name) {
        var c = name.split(' ');
        if (c.length > 1) {
            each(c, function (cl) {
                removeClass(node, cl);
            });
            return;
        }
        if (node.classList) {
            node.classList.remove(name);
        } else {
            node.className = node.className.replace(name, "");
        }
    }