Returns a context in which this representer is updated with the
        given options and attribute options.
178356
def with_updated_configuration(self, options=None,
                                   attribute_options=None):
        
        return self._mapping.with_updated_configuration(options=options,
                                                        attribute_options=
                                                            attribute_options)
626334
def ensure_context_attribute_exists(context, name, default_value=None):
    
    if not hasattr(context, name):
        setattr(context, name, default_value)
18157
def set_context(**options):
    """"""
    if not local_context._options:
        raise TelluricContextError("TelluricContext context not exists")
    else:
        local_context._options.update(options)
        log.debug("Updated existing %r with options %r", local_context._options, options)
87461
function(options){
      var name = options.name
        , model = options.model
        , implementation = options.implementation
        , cid = options.cid;

      // save the new things by internal cid
      this._names[cid] = name;
      this._models[cid] = model;
      this._implementations[cid] = implementation;

      this._updateLength();

      return this;
    }
1310655
def options(self, context, module_options):
        '''
        
        '''
        self.domains = None
        if module_options and 'DOMAIN' in module_options:
            self.domains = module_options['DOMAIN']
402678
@Override
	public void optionsUpdated(IOptions options, long sequence) {
		Context cx = Context.enter();
		try {
			Scriptable jsOptions = cx.newObject(sharedScope);
			Map<String, String> optionsMap = options.getOptionsMap();
			for (Map.Entry<String, String> entry : optionsMap.entrySet()) {
				Object value = Context.javaToJS(entry.getValue(), sharedScope);
				ScriptableObject.putProperty(jsOptions, entry.getKey(), value);
			}
			ScriptableObject.putProperty(sharedScope, "options", jsOptions); //$NON-NLS-1$
		} finally {
			Context.exit();
		}
	}
353180
def get_context_data(self, **kwargs):
        
        context = super().get_context_data(**kwargs)

        # Handles the preview of the poll
        if context['poll_option_formset']:
            if hasattr(self, 'poll_preview') and self.poll_preview:
                context['poll_preview'] = self.poll_preview
                context['poll_options_previews'] = filter(
                    lambda f: f['text'].value() and not f['DELETE'].value(),
                    context['poll_option_formset'].forms,
                )

        return context
481861
def change_options(self, **kwargs):
        '''
        
        '''
        new_options = json.loads(json.dumps(self.viewconf['options']))
        new_options = {**new_options, **kwargs}

        return self.change_attributes(options=new_options)
512284
def context_processors_update(context, request):
    '''
    
    '''
    for template in settings.TEMPLATES:
        for context_processor in template['OPTIONS']['context_processors']:
            path = context_processor.split('.')
            name = path.pop(-1)
            processor = getattr(importlib.import_module('.'.join(path)), name, None)
            if processor:
                context.update(processor(request))
    return context
1162386
@Override
	public synchronized void optionsUpdated(IOptions options, long sequence) {
		String previousCacheBust = cacheBust;
		cacheBust = options.getCacheBust();
		if (sequence > 1 && cacheBust != null && !cacheBust.equals(previousCacheBust) && rawConfig != null) {
			// Cache bust property has been updated subsequent to server startup
			processDeps(false, false, sequence);
		}
	}
1170951
def set_context(self, serializer):
        
        # Determine the underlying model field names. These may not be the
        # same as the serializer field names if `source=<>` is set.
        self.field_name = serializer.fields[self.field].source_attrs[0]
        self.date_field_name = serializer.fields[self.date_field].source_attrs[0]
        # Determine the existing instance, if this is an update operation.
        self.instance = getattr(serializer, 'instance', None)
664745
def context_changed(self, context):
        
        self._image.set_cmap(context['colormap'])
        self._image.set_clim(context['min'], context['max'])
        self._image.set_interpolation(context['interpolation'])
        self._update_indicators(context)

        self._set_view_limits()

        if self._model.index_direction is not SliceDirection.depth:
            self._image.axes.set_ylabel(context['samples_unit'])
113756
def set_options(self, **options):
        
        opt2 = self._contexts[-1]
        for k, v in options.items():
            k2 = k.replace("_", "-")
            if v is None:
                opt2.pop(k2, None)
            else:
                opt2[k2] = v
968122
def context_id(self):
        """"""
        if not self._context_id:
            self._context_id = self._get_context_id()
            self.update_options(context_id=self._context_id)

        return self._context_id
634823
def wrap_options(self, data, renderer_context):
        ''''''
        request = renderer_context.get("request", None)
        method = request and getattr(request, 'method')
        if method != 'OPTIONS':
            raise WrapperNotApplicable("Request method must be OPTIONS")

        wrapper = self.dict_class()
        wrapper["meta"] = data
        return wrapper
531837
def update_attributes(self, updates):
        """"""
        if not isinstance(updates, dict):
            updates = updates.to_dict()
        for sdk_key, spec_key in self._get_attributes_map().items():
            attr = '_%s' % sdk_key
            if spec_key in updates and not hasattr(self, attr):
                setattr(self, attr, updates[spec_key])
1253473
function(context, options) {
        var root = this.createElementDefaultNS("ViewContext");
        this.setAttributes(root, {
            version: this.VERSION,
            id: (options && typeof options.id == "string") ?
                    options.id :
                    OpenLayers.Util.createUniqueID("OpenLayers_Context_")
        });
        
        // add schemaLocation attribute
        this.setAttributeNS(
            root, this.namespaces.xsi,
            "xsi:schemaLocation", this.schemaLocation
        );
        
        // required General element
        root.appendChild(this.write_wmc_General(context));

        // required LayerList element
        root.appendChild(this.write_wmc_LayerList(context));

        return OpenLayers.Format.XML.prototype.write.apply(this, [root]);
    }