Configure resources of the widget.

        To get the list of options for this widget, call the method :meth:`~Table.keys`.
        See :meth:`~Table.__init__` for a description of the widget specific option.
166812
def configure(self, cnf=None, **kw):
        
        if cnf == 'drag_cols':
            return 'drag_cols', self._drag_cols
        elif cnf == 'drag_rows':
            return 'drag_rows', self._drag_rows
        elif cnf == 'sortable':
            return 'sortable', self._sortable

        if isinstance(cnf, dict):
            kwargs = cnf.copy()
            kwargs.update(kw)  # keyword arguments override cnf content
            cnf = {}   # everything is in kwargs so no need of cnf
            cnf2 = {}  # to configure the preview
        else:
            kwargs = kw
            cnf2 = cnf

        sortable = bool(kwargs.pop("sortable", self._sortable))
        if sortable != self._sortable:
            self._config_sortable(sortable)
        drag_cols = bool(kwargs.pop("drag_cols", self._drag_cols))
        if drag_cols != self._drag_cols:
            self._config_drag_cols(drag_cols)
        self._drag_rows = bool(kwargs.pop("drag_rows", self._drag_rows))
        if 'columns' in kwargs:
            # update column type dict
            for col in list(self._column_types.keys()):
                if col not in kwargs['columns']:
                    del self._column_types[col]
            for col in kwargs['columns']:
                if col not in self._column_types:
                    self._column_types[col] = str
        # Remove some keywords from the preview configuration dict
        kw2 = kwargs.copy()
        kw2.pop('displaycolumns', None)
        kw2.pop('xscrollcommand', None)
        kw2.pop('yscrollcommand', None)
        self._visual_drag.configure(cnf2, **kw2)
        if len(kwargs) != 0:
            return ttk.Treeview.configure(self, cnf, **kwargs)
673090
def configure(conf)
      super
      @host = conf['host']
      @port = conf['port']
      @token = conf['token']
      @hostname = conf['hostname'] || Socket.gethostname.split('.').first

      # Determine mapping of record keys to syslog keys
      @mappings = {}
      SYSLOG_HEADERS.each do |key_name|
        conf_key = "#{key_name}_key"
        @mappings[key_name] = conf[conf_key] if conf.key?(conf_key)
      end
    end
649600
void init() {

        if (m_container == null) {
            m_container = new IndexedContainer();
            setContainerDataSource(m_container);
        } else {
            m_container.removeAllContainerFilters();
            m_container.removeAllItems();
        }
        for (TableProperty prop : TableProperty.values()) {
            m_container.addContainerProperty(prop, prop.getType(), prop.getDefaultValue());
            setColumnHeader(prop, prop.getLocalizedMessage());
        }

        setItemIconPropertyId(TableProperty.Icon);
        setRowHeaderMode(RowHeaderMode.ICON_ONLY);
        setColumnWidth(null, 40);
        setSelectable(true);
        setMultiSelect(true);

        for (I_CmsResourceType type : CmsVaadinUtils.getResourceTypes()) {
            CmsExplorerTypeSettings typeSetting = OpenCms.getWorkplaceManager().getExplorerTypeSetting(
                type.getTypeName());
            Item item = m_container.addItem(type.getTypeName());
            item.getItemProperty(TableProperty.ID).setValue(String.valueOf(type.getTypeId()));
            item.getItemProperty(TableProperty.Icon).setValue(CmsResourceUtil.getBigIconResource(typeSetting, null));
            item.getItemProperty(TableProperty.Name).setValue(CmsVaadinUtils.getMessageText(typeSetting.getKey()));
            item.getItemProperty(TableProperty.ShortName).setValue(type.getTypeName());
            item.getItemProperty(TableProperty.Module).setValue(type.getModuleName());
        }

        setVisibleColumns(TableProperty.Name, TableProperty.ShortName, TableProperty.ID, TableProperty.Module);
    }
628529
def _set_table(table_name):
    
    _State.connection()
    _State.reflect_metadata()
    _State.table = sqlalchemy.Table(table_name, _State.metadata,
                                    extend_existing=True)

    if list(_State.table.columns.keys()) == []:
        _State.table_pending = True
    else:
        _State.table_pending = False
315249
def __load_configuration(self):
        
        handler_to_enable = filter(lambda h: h.keys is not None, handlers)
        for handler in handler_to_enable:
            if handler.name in self.kwargs:
                for k in handler.keys:
                    self.kwargs.update({k: True})

        self.config = self.configuration_class(self.app.config, **self.kwargs)
657376
def setup_default_options
      opts = {}
      MsRestAzure::Common::Configurable.keys.map do |key|
        opts[key] = MsRestAzure::Common::Default.options[key]
      end

      opts
    end
868747
def set_options(options)
      self.port = options[:port].to_i if options.key?(:port)
      self.handler = options[:handler] if options.key?(:handler)
      self.host = options[:host] if options.key?(:host)
      self.auto_port = options[:auto_port] if options.key?(:auto_port)
    end
927639
def _copy_resources(self):
        

        for resource in self._client._resources:
            # set the name param, the keys now have / in them
            potion_resource = self._client._resources[resource]

            try:
                oc_cls = _model_lookup[resource]
                oc_cls._api = self
                oc_cls._resource = potion_resource
                setattr(self, oc_cls.__name__, oc_cls)
            except KeyError:  # Ignore resources we don't explicitly model
                pass
841703
def load_configuration(self, **kwargs):
        ''''''
        # update passed arguments with default values
        for key in settings.ACTIVE_URL_KWARGS:
            kwargs.setdefault(key, settings.ACTIVE_URL_KWARGS[key])

        # "active" html tag css class
        self.css_class = kwargs['css_class']
        # "active" html tag
        self.parent_tag = kwargs['parent_tag']
        # flipper for menu support
        self.menu = kwargs['menu']
        # whether to ignore / chomp get_params
        self.ignore_params = kwargs['ignore_params']
287633
def _initialize(self, **resource_attributes):
        
        self._set_attributes(**resource_attributes)
        for attribute, attribute_type in list(self._mapper.items()):
            if attribute in resource_attributes and isinstance(resource_attributes[attribute], dict):
                setattr(self, attribute, attribute_type(**resource_attributes[attribute]))
1133527
def init_with_context(self, context):
        
        items = self._visible_models(context['request'])
        apps = {}
        for model, perms in items:
            if not (perms['change'] or perms.get('view', False)):
                continue
            app_label = model._meta.app_label
            if app_label not in apps:
                apps[app_label] = {
                    'title':
                        django_apps.get_app_config(app_label).verbose_name,
                    'url': self._get_admin_app_list_url(model, context),
                    'models': []
                }
            apps[app_label]['models'].append({
                'title': model._meta.verbose_name_plural,
                'url': self._get_admin_change_url(model, context)
            })

        for app in sorted(apps.keys()):
            app_dict = apps[app]
            item = MenuItem(title=app_dict['title'], url=app_dict['url'])
            # sort model list alphabetically
            apps[app]['models'].sort(key=lambda x: x['title'])
            for model_dict in apps[app]['models']:
                item.children.append(MenuItem(**model_dict))
            self.children.append(item)
801949
def init_tables
      # Do nothing if keyspace already exists
      if @cassandra.keyspaces.include?(@keyspace)
        @cassandra.keyspace = @keyspace
      else
        freq_table    = Cassandra::ColumnFamily.new({:keyspace => @keyspace, :name => "classes"}) # word  => {classname => count}
        summary_table = Cassandra::ColumnFamily.new({:keyspace => @keyspace, :name => "totals"})  # class => {wordcount => count}
        ks_def = Cassandra::Keyspace.new({
            :name               => @keyspace,
            :strategy_class     => 'org.apache.cassandra.locator.SimpleStrategy',
            :replication_factor => 1,
            :cf_defs            => [freq_table, summary_table] 
          })
        @cassandra.add_keyspace ks_def
        @cassandra.keyspace = @keyspace
      end
    end
328908
def set_options(self, **kwargs):
        
        options = self.options
        options.update(kwargs)
        self.update(options=options)
143852
def _init_options(self, kwargs):
        
        self.options = self.task_config.options
        if self.options is None:
            self.options = {}
        if kwargs:
            self.options.update(kwargs)

        # Handle dynamic lookup of project_config values via $project_config.attr
        for option, value in list(self.options.items()):
            try:
                if value.startswith("$project_config."):
                    attr = value.replace("$project_config.", "", 1)
                    self.options[option] = getattr(self.project_config, attr, None)
            except AttributeError:
                pass
440655
def options
      map = Artifactory::Configurable.keys.map do |key|
        [key, instance_variable_get(:"@#{key}")]
      end
      Hash[map]
    end
681797
def initialize_options(cls):
        
        cls.CONFIG_OPTIONS = cls.CFG.get(cls.CONFIG_PATH, return_type=dict)
656748
def configure(self, conf={}):
        
        if not conf: return
        if isinstance(conf, Configuration):
            conf = dict(conf.options())
        for key, value in conf.items():
            opt = self.get(key, None)
            if isinstance(opt, Configuration):
                opt.configure(value)
            else:
                setattr(self, key, value)