Add object to hold Function properties
Only partial support for type 0, 3 and 4

\param object id.
\param action
\param options
761166
function o_function( $id, $action, $options = '' )
    {
        if ( $action != 'new' )
        {
            $o =& $this->objects[$id];
        }

        switch ( $action )
        {
            case 'new':
            {
                $this->objects[$id] = array ( 't' => 'function',
                                              'info' => array() );

                if ( isset( $options['type'] ) ) // Set function type
                {
                    $this->objects[$id]['info']['type'] = $options['type'];
                }
                else
                {
                    $this->objects[$id]['info']['type'] = '2';
                }

                if ( isset( $options['Domain'] ) ) // Set function Domain
                {
                    $this->objects[$id]['info']['Domain'] = $options['Domain'];
                }
                else
                {
                    $this->objects[$id]['info']['Domain'] = '[0.0 1.0]';
                }

                if ( $this->objects[$id]['info']['type'] == '2' ) // set start and en values
                {
                    if ( isset( $options['C0'] ) ) // Set values0
                    {
                        $this->objects[$id]['info']['C0'] = $options['C0'];
                    }

                    if ( isset( $options['C1'] ) ) // Set values1
                    {
                        $this->objects[$id]['info']['C1'] = $options['C1'];
                    }

                    if ( isset( $options['N'] ) ) // set exponent
                    {
                        $this->objects[$id]['info']['N'] = $options['N'];
                    }
                    else
                    {
                        $this->objects[$id]['info']['N'] = '1.0';
                    }
                }

            } break;

            case 'out':
            {
                $res = "\n" . $id . " 0 obj\n<< ";
                $res.= "/FunctionType " . $o['info']['type'] . "\n";
                $res.= "/Domain " . $o['info']['Domain'] . "\n";
                if ( isset ( $o['info']['C0'] ) )
                    $res.= "/C0 " . $o['info']['C0'] . "\n";
                if ( isset ( $o['info']['C1'] ) )
                    $res.= "/C1 " . $o['info']['C1'] . "\n";
                $res.= "/N " . $o['info']['N'] . "\n";
                $res.= ">>\nendobject";
                return $res;
            } break;
        }
    }
572939
function addCustomFeatureProperties(entity) {
  for (var i = 0; i < customProperties.length; i++) {
    if (entity.propertyNames.indexOf(customProperties[i]) === -1) {
      entity.addProperty(customProperties[i]);
    }
  }
}
826719
def add_method(obj, func, name=None):
    """"""
    if name is None:
        name = func.__name__
    if sys.version_info < (3,):
        method = types.MethodType(func, obj, obj.__class__)
    else:
        method = types.MethodType(func, obj)
    setattr(obj, name, method)
1080499
def add(self, callback=None, name=None, shortcut=None, alias=None,
            docstring=None, menu=None, verbose=True):
        """"""
        if callback is None:
            # Allow to use either add(func) or @add or @add(...).
            return partial(self.add, name=name, shortcut=shortcut,
                           alias=alias, menu=menu)
        assert callback

        # Get the name from the callback function if needed.
        name = name or callback.__name__
        alias = alias or _alias(name)
        name = name.replace('&', '')
        shortcut = shortcut or self._default_shortcuts.get(name, None)

        # Skip existing action.
        if name in self._actions_dict:
            return

        # Set the status tip from the function's docstring.
        docstring = docstring or callback.__doc__ or name
        docstring = re.sub(r'[ \t\r\f\v]{2,}', ' ', docstring.strip())

        # Create and register the action.
        action = _create_qaction(self.gui, name, callback,
                                 shortcut,
                                 docstring=docstring,
                                 alias=alias,
                                 )
        action_obj = Bunch(qaction=action, name=name, alias=alias,
                           shortcut=shortcut, callback=callback, menu=menu)
        if verbose and not name.startswith('_'):
            logger.log(5, "Add action `%s` (%s).", name,
                       _get_shortcut_string(action.shortcut()))
        self.gui.addAction(action)
        # Add the action to the menu.
        menu = menu or self.menu
        # Do not show private actions in the menu.
        if menu and not name.startswith('_'):
            self.gui.get_menu(menu).addAction(action)
        self._actions_dict[name] = action_obj
        # Register the alias -> name mapping.
        self._aliases[alias] = name

        # Set the callback method.
        if callback:
            setattr(self, name, callback)
569783
function _fillAction(entity, actionObj, actionType) {

    if (!(entity instanceof Scope) && !entity.id) {
      throw new Error('This entity does not have an ID.');
    }

    var ret = actionObj;

    if (Utils.isArray(actionObj)) {

      ret = actionObj.map(function (singleAction) {
        return _fillAction(entity, singleAction, actionType);
      });

    } else {
      ret.type = actionType !== 'all' && actionType ||  actionObj.type || '';
      _addEntityIdentifier(entity, ret);
    }

    return ret;
  }
778501
@Scope(DocScope.IO)
    public UrlIO addRequestProperties(final Map<String, String> params) {
        requestProperties.putAll(params);
        return this;
    }
102055
function setOptions( options ) {
		if ( !options.hasOwnProperty( 'objectMode' ) ) {
			options.objectMode = false;
		}
		if ( !options.hasOwnProperty( 'encoding' ) ) {
			options.encoding = null;
		}
	}
243065
function (module, action, params) {
        "use strict";
    
        var log = localStorage.getItem('log');
        if (log) {
            if (!params) params = {};
            params.log = log;
        }
    
        Object.defineProperty(this, 'action', {
            'get': function () {
                return action;
            }
        });
    
        var serialized = {
            'moduleID': module.ID,
            'action': action,
            'params': params
        };
    
        Object.defineProperty(this, 'params', {
            'get': function () {
                return params;
            }
        });
    
        if (module.ID.substr(0, 10) === 'libraries/') {
            serialized.version = module.library.version;
        }
        else {
            serialized.version = beyond.params.version;
        }
    
        Object.defineProperty(this, 'serialized', {
            'get': function () {
    
                var output = {};
                $.extend(output, serialized, true);
                return output;
    
            }
        });
    
    }
1127173
def add(self):
        '''
        '''
        # TODO validation per object type
        submit_attribs = {}
        for attrib in self.ATTRIBUTES:
            val = getattr(self, attrib, None)
            if val:
                submit_attribs[attrib] = val
        path = '/'.join([self.RESOURCE, 'add'])
        result = self.client.request(path, submit_attribs)
        return result
566491
function (object, action, options) {
                var ret = {};
                for (var key in object) {
                    if (object.hasOwnProperty(key)) {
                        var value = this._getCompositionValue(object[key], key, action, options);

                        if (value !== undefined) {
                            ret[key] = value;
                        }
                    }
                }

                return ret;
            }
1121031
function( options ){
      var obj = options.map;
      var key;
      var keys = options.keys;
      var l = keys.length;

      for(var i = 0; i < l; i++){
        var key = keys[i];

        if( $$.is.plainObject( key ) ){
          $$.util.error('Tried to set map with object key');
        }

        if( i < keys.length - 1 ){
          
          // extend the map if necessary
          if( obj[key] == null ){
            obj[key] = {};
          }
          
          obj = obj[key];
        } else {
          // set the value
          obj[key] = options.value;
        }
      }
    }
58480
private ZealotKhala appendParams(Object value, int objType) {
        Object[] values = CollectionHelper.toArray(value, objType);
        if (CollectionHelper.isNotEmpty(values)) {
            Collections.addAll(this.source.getSqlInfo().getParams(), values);
        }
        return this;
    }
564961
def add_object(self, obj, properties=()):
        """"""
        self._objects.add(obj)
        self._properties |= properties
        self._pairs.update((obj, p) for p in properties)
75532
def add_value(options)
      raise ArgumentError, "missing option[:type]" if options[:type].nil?
      self.value = EventValue.new
      self.value.type = options[:type]
      self.value.add_date(options[:date]) if options[:date]
      self.value.add_place(options[:place]) if options[:place]
    end
26443
function (options, type) {
        // update must have options
        if (!_.isObject(options)) { return; }
        // validate type parameter and/or choose default from existing type.
        if (!RequestAuth.isValidType(type)) { type = this.type; }

        var parameters = this[type];

        // in case the type holder is not created, we create one and send the population variables
        if (!VariableList.isVariableList(parameters)) {
            // @todo optimise the handling of legacy object type auth parameters
            parameters = this[type] = new VariableList(this);
            parameters._postman_requestAuthType = type;
        }

        // we simply assimilate the new options either it is an array or an object
        if (_.isArray(options) || VariableList.isVariableList(options)) {
            parameters.assimilate(options);
        }
        else {
            parameters.syncFromObject(options, false, false); // params: no need to track and no need to prune
        }
    }
575284
public ListParameterization addParameter(String optionid, Object value) {
    optionid = optionid.startsWith(SerializedParameterization.OPTION_PREFIX) ? optionid.substring(SerializedParameterization.OPTION_PREFIX.length()) : optionid;
    parameters.add(new ParameterPair(optionid, value));
    return this;
  }
1118159
function(object, methods, property) {

        for (var i = 0, ii = methods.length; i < ii; ++i) {
            this.addMethodToObject(methods[i], object, property);
        }
    }