Set system attribute and do some initialization. Used by System.
508138
def setup_system(self, system, name_from_system='', **kwargs):
        

        if not self.system:
            self.system = system
        name, traits = self._passed_arguments
        new_name = self.system.get_unique_name(self, name, name_from_system)
        if not self in self.system.reverse:
            self.name = new_name
        self.logger = self.system.logger.getChild('%s.%s' % (self.__class__.__name__, self.name))
        self.logger.setLevel(self.log_level)
        if name is None and 'name' in traits:  # Only __setstate__ sets name to None. Default is ''.
            del traits['name']

        for cname in self.callables:
            if cname in traits:
                c = self._postponed_callables[cname] = traits.pop(cname)
                c.setup_callable_system(self.system)
            getattr(self, cname).setup_callable_system(self.system)

        if not self.traits_inited():
            super().__init__(**traits)
        self.name_changed_event = True
        self.setup()
809700
private void setSystemProperties()
    {
        if ( systemProperties != null )
        {
            originalSystemProperties = System.getProperties();
            for ( Property systemProperty : systemProperties )
            {
                String value = systemProperty.getValue();
                System.setProperty( systemProperty.getKey(), value == null ? "" : value );
            }
        }
    }
245395
protected function init()
    {
        $this->attributes = [];
        $this->groupAttributes = [];

        $this->attributes['id'] = $this->open->name . '-' . $this->name;

        if($this->name) {
            $this->attributes['name'] = $this->name;
        }
    }
703040
private static void init() {
        if (hasInitialized) {
            return;
        }

        final String osName = System.getProperty("os.name");

        if (osName != null) {
            final String osNameLower = osName.toLowerCase();

            isWindows = osNameLower.contains("windows");
            isMac = osNameLower.contains("mac os x") || osNameLower.contains("darwin");
            isLinux = osNameLower.contains("nux");
            isUnix = osNameLower.contains("nix") || osNameLower.contains("nux");
            isSolaris = osNameLower.contains("sunos") || osNameLower.contains("solaris");
        }

        lineEnder = isWindows ? "\r\n" : "\n";

        final String model = System.getProperty("sun.arch.data.model");
        // sun.arch.data.model=32 // 32 bit JVM
        // sun.arch.data.model=64 // 64 bit JVM
        if (StringUtils.isBlank(model)) {
            bit32 = true;
            bit64 = false;
        } else if ("64".equals(model)) {
            bit32 = false;
            bit64 = true;
        } else {
            bit32 = true;
            bit64 = false;
        }

    }
1061598
private void init(Context context, AttributeSet attrs) {

        initAttributes(context, attrs);
        initPaintObjects();
        initDimensions();
        initPadding();
        initFloatingLabelAnimator();
        initOnItemSelectedListener();
        setMinimumHeight(getPaddingTop() + getPaddingBottom() + minContentHeight);
        //Erase the drawable selector not to be affected by new size (extra paddings)
        setBackgroundResource(R.drawable.my_background);

    }
323449
private void init(AttributeSet attrs) {
        inflate(getContext(), R.layout.intl_phone_input, this);

        /**+
         * Country spinner
         */
        mCountrySpinner = (Spinner) findViewById(R.id.intl_phone_edit__country);
        mCountrySpinnerAdapter = new CountrySpinnerAdapter(getContext());
        mCountrySpinner.setAdapter(mCountrySpinnerAdapter);

        mCountries = CountriesFetcher.getCountries(getContext());
        mCountrySpinnerAdapter.addAll(mCountries);
        mCountrySpinner.setOnItemSelectedListener(mCountrySpinnerListener);

        setFlagDefaults(attrs);

        /**
         * Phone text field
         */
        mPhoneEdit = (EditText) findViewById(R.id.intl_phone_edit__phone);
        mPhoneEdit.addTextChangedListener(mPhoneNumberWatcher);

        setDefault();
        setEditTextDefaults(attrs);
    }
362321
def set_int_attribute(self, target, display_mask, attr, value):
    """"""
    reply = NVCtrlSetAttributeAndGetStatusReplyRequest(display=self.display,
                                                       opcode=self.display.get_extension_major(extname),
                                                       target_id=target.id(),
                                                       target_type=target.type(),
                                                       display_mask=display_mask,
                                                       attr=attr,
                                                       value=value)
    return reply._data.get('flags') != 0
1175818
def initialize_attributes(parent, inetwork)
      # Set the parent and interface
      write_attribute(:parent, parent)
      write_attribute(:interface, inetwork)

      # Load the interface attributes
      load_interface_attributes(inetwork)

      # Clear dirtiness, since this should only be called initially and
      # therefore shouldn't affect dirtiness
      clear_dirty!

      # But this is an existing record
      existing_record!
    end
409013
def _set_attribute(self, name, value):
        """"""
        setattr(self, name, value)
        self.namespace.update({name: getattr(self, name)})
1051385
def _set_attribute(self, attribute, name, value):
        """"""
        try:
            if attribute is None:
                attribute = self._attribute_file_open( name )
            else:
                attribute.seek(0)

            if isinstance(value, str):
                value = value.encode()
            attribute.write(value)
            attribute.flush()
        except Exception as ex:
            self._raise_friendly_access_error(ex, name)
        return attribute
776926
protected static function initAttributeSet()
    {
        $className = get_called_class();
        
        if (!ModelAttributes::attributesSetFor($className)) {
            ModelAttributes::setClassAttributes(
                $className,
                static::attributeSet()
            );
        }
    }
1002242
def _setattr_default(obj, attr, value, default):
    """"""
    if value is None:
        setattr(obj, attr, default)
    else:
        setattr(obj, attr, value)
1179155
def init():
    """"""
    global _default_foreground, _default_background, _default_style
    try:
        attrs = GetConsoleScreenBufferInfo().wAttributes
    except (ArgumentError, WindowsError):
        _default_foreground = GREY
        _default_background = BLACK
        _default_style = NORMAL
    else:
        _default_foreground = attrs & 7
        _default_background = (attrs >> 4) & 7
        _default_style = attrs & BRIGHT
895778
def init_with_attributes(attributes, new_record = false) # :nodoc:
      @new_record = new_record
      @attributes = attributes

      init_internals

      yield self if block_given?

      _run_find_callbacks
      _run_initialize_callbacks

      self
    end
177425
def set_attr_value(self, key, attr, value):
        
        idx = self._keys[key]
        self._attrs[attr][idx].set(value)
816987
void setAttr(String name, int flags)
    {

        if (null == m_attrs)
            m_attrs = new StringToIntTable();

        m_attrs.put(name, flags);
    }
722038
def _setAttr(self, attr, value):
        
        meth = "_set_%s" % attr
        if not hasattr(self, meth):
            raise AttributeError("No setter for attribute '%s'." % attr)
        meth = getattr(self, meth)
        meth(value)