Allow for dynamic setting of instance variables.
 also allows for variable? to see if it was provided
188326
def method_missing(sym, *args, &block)
      if @params.has_key?(sym)
        return @params[sym]
      elsif sym.to_s =~ /^[a-z0-9_]*=$/
        return @params[sym.to_s.sub(/^(.*?)=$/, '\1').to_sym] = args.shift
      elsif sym.to_s =~ /^[a-z0-9_]*\?$/
        return !!@params[sym.to_s.sub(/^(.*?)\?$/, '\1').to_sym]
      end

      super(sym, *args, &block)
    end
326928
private function _checkVariableConfiguration() {
		// Check if the canUploadImage is boolean
		if (!is_bool($this->canUploadImage)) {
			throw new InvalidConfigException('$canUploadImage variable only supports a boolean value, if you have a custom function you must return a boolean.');
		}
		// Check if the canRemoveImage is boolean
		if (!is_bool($this->canRemoveImage)) {
			throw new InvalidConfigException('$removeImageAllowed variable only supports a boolean value, if you have a custom function you must return a boolean.');
		}
		// Check if the setBlamableBehavior is boolean
        if (! is_bool($this->setBlameableBehavior))
            throw new InvalidConfigException('$setBlameableBehavior only supports a boolean value, if you have a custom function make sure that you return a boolean.');
        // Check if the deleteOriginalAfterEdit is boolean
        if (! is_bool($this->deleteOriginalAfterEdit))
            throw new InvalidConfigException('$deleteOriginalAfterEdit only supports boolean value, if you have a custom function make sure that your return a boolean.');

		// Check if the blameable behavior is set to true
        if ($this->setBlameableBehavior) {
            // Get the migration record
            $mRecordMigrationRun = Yii::$app->db->createCommand('SELECT * FROM {{%migration}} WHERE `version` = \'m170223_113221_addBlameableBehavior\'')->queryOne();
            if ($mRecordMigrationRun === false) {
                throw new InvalidConfigException('Image Manager: You have not run the latest migration, see the documentation how to do this.');
            }
        }
	}
43721
def set_variable(name, value)
      current_path = '/api/v1/variables'
      payload = { 'name' => name, 'value' => value }.to_json
      @conn.put(current_path, payload)
    end
868767
def store_variable(var)
      # Force the correct bounds since we can't explicitly specify binary
      if var.type == :binary
        var.instance_variable_set(:@lower_bound, 0)
        var.instance_variable_set(:@upper_bound, 1)
      end
      set_variable_bounds var.index, var.lower_bound, var.upper_bound, true

      Cbc.Cbc_setObjCoeff @ptr, var.index, var.coefficient
      Cbc.Cbc_setColName(@ptr, var.index, var.name) unless var.name.nil?
      set_variable_type var.index, var.type
    end
381951
def add_variable(variable, scope = current_scope)
      if variable_stack.empty?
        scope.add(variable.type, variable.name, variable)
      else
        variable_stack.push(variable)
      end
    end
1263875
def add_variable(self, start, variable):
        

        size = variable.size if variable.size is not None else 1

        self.add_object(start, variable, size)
185714
def _expand_var(self, in_string, available_variables):
        
        instances = self._get_instances(in_string)
        for instance in instances:
            for name, value in available_variables.items():
                variable_string = self._get_variable_string(name)
                if instance == variable_string:
                    in_string = in_string.replace(variable_string, value)
        return in_string
875945
def instance_write(attr, value)
      setter = :"#{name}_#{attr}="
      responds = instance.respond_to?(setter)
      self.instance_variable_set("@_#{setter.to_s.chop}", value)
      instance.send(setter, value) if responds || attr.to_s == "file_name"
    end
967794
def force_new_dynamic_value(self_, name): # pylint: disable-msg=E0213
        
        cls_or_slf = self_.self_or_cls
        param_obj = cls_or_slf.param.objects('existing').get(name)

        if not param_obj:
            return getattr(cls_or_slf, name)

        cls, slf = None, None
        if isinstance(cls_or_slf,type):
            cls = cls_or_slf
        else:
            slf = cls_or_slf

        if not hasattr(param_obj,'_force'):
            return param_obj.__get__(slf, cls)
        else:
            return param_obj._force(slf, cls)
405318
def instance_variables(self):
        
        p = lambda o: isinstance(o, Variable) and self.module._docfilter(o)
        return filter(p, self.doc_init.values())
58818
def set(value = true)
      assert_exists
      assert_enabled

      if (value && !set?) || (!value && set?)
        @object.click
      end
    end
153413
def dynamic_start(self, access_token, instance_url=None, **kw):
        
        self.dynamic = {'access_token': str(access_token), 'instance_url': str(instance_url)}
        self.dynamic.update(kw)
420112
function checkVariable(variable) {
            if (variable.writeable === false && exceptions.indexOf(variable.name) === -1) {
                variable.references.forEach(checkReference);
            }
        }
1277145
def edit
    @config_var = ConfigVar.where(name: params[:name]).first
    unless @config_var
      @config_var = ConfigVar.new name: params[:name]
      if descriptor = ConfigvarsRails.variable_descriptor(params[:name])
        @config_var.value = descriptor.default_value
      end
    end
  end
1058226
function(instance) {
			
			var self = this;
			
			// list of instance variables
			
			self.__instance = instance;
			self.__namespace = 'tooltipster-sideTip-'+ Math.round(Math.random()*1000000);
			self.__previousState = 'closed';
			self.__options;
			
			// initial formatting
			self.__optionsFormat();
			
			self.__instance._on('state.'+ self.__namespace, function(event) {
				
				if (event.state == 'closed') {
					self.__close();
				}
				else if (event.state == 'appearing' && self.__previousState == 'closed') {
					self.__create();
				}
				
				self.__previousState = event.state;
			});
			
			// reformat every time the options are changed
			self.__instance._on('options.'+ self.__namespace, function() {
				self.__optionsFormat();
			});
			
			self.__instance._on('reposition.'+ self.__namespace, function(e) {
				self.__reposition(e.event, e.helper);
			});
		}
1235359
private void initialiseInstanceVariables() {
		backing = new HashMap<>();
		booleanBacking = new HashSet<>();
		locations = new HashMap<>();

		// subContextCache is updated on the fly so ensure no concurrent modification.
		subcontextCache = Collections.synchronizedMap(new HashMap());
		runtimeProperties = new IncludeProperties("Runtime: added at runtime");
	}
121562
private function initialiseVariables(): void
    {
        $this->entityInterfaceFqn = $this->namespaceHelper->getEntityInterfaceFromEntityFqn($this->entityFqn);
        list($className, , $subDirs) = $this->namespaceHelper->parseFullyQualifiedName(
            $this->entityFqn,
            $this->srcSubFolderName,
            $this->projectRootNamespace
        );

        $this->singularNamespacedName = $this->namespaceHelper->getSingularNamespacedName(
            $this->entityFqn,
            $subDirs
        );
        $this->pluralNamespacedName   = $this->namespaceHelper->getPluralNamespacedName(
            $this->entityFqn,
            $subDirs
        );
        $this->setDestinationDirectory(
            $className,
            $subDirs
        );
        $plural                  = \ucfirst(MappingHelper::getPluralForFqn($this->entityFqn));
        $singular                = \ucfirst(MappingHelper::getSingularForFqn($this->entityFqn));
        $nsNoEntities            = \implode('\\', \array_slice($subDirs, 2));
        $this->singularNamespace = \ltrim($nsNoEntities . '\\' . $singular, '\\');
        $this->pluralNamespace   = \ltrim($nsNoEntities . '\\' . $plural, '\\');
        $this->dirsToRename      = [];
        $this->filesCreated      = [];
    }