Update or add resource data in dll/exe file dstpath.
    
    type_ = resource type to update
    names = a list of resource names to update (None = all)
    languages = a list of resource languages to update (None = all)
491056
def UpdateResources(dstpath, data, type_, names=None, languages=None):
    
    # look for existing resources
    res = GetResources(dstpath, [type_], names, languages)
    # add type_, names and languages not already present in existing resources
    if not type_ in res and type_ != "*":
        res[type_] = {}
    if names:
        for name in names:
            if not name in res[type_] and name != "*":
                res[type_][name] = []
                if languages:
                    for language in languages:
                        if not language in res[type_][name] and language != "*":
                            res[type_][name].append(language)
    # add resource to destination, overwriting existing resources
    hdst = win32api.BeginUpdateResource(dstpath, 0)
    for type_ in res:
        for name in res[type_]:
            for language in res[type_][name]:
                logger.info("Updating resource type %s name %s language %s",
                            type_, name, language)
                win32api.UpdateResource(hdst, type_, name, data, language)
    win32api.EndUpdateResource(hdst, 0)
327914
def apply_new_scoped_variable_type(self, path, new_variable_type_str):
        
        data_port_id = self.list_store[path][self.ID_STORAGE_ID]
        try:
            if self.model.state.scoped_variables[data_port_id].data_type.__name__ != new_variable_type_str:
                self.model.state.scoped_variables[data_port_id].change_data_type(new_variable_type_str)
        except ValueError as e:
            logger.error("Error while changing data type: {0}".format(e))
118373
public void addProcessForWSDL(String strVersion, Object typeObject, MessageProcessInfo recMessageProcessInfo, OperationType type)
    {
        if (type == OperationType.BINDING_OPERATIONS)
            this.addBindingOperationType(strVersion, (TBinding)typeObject, recMessageProcessInfo);
        else if (type == OperationType.INTERFACE_OPERATIONS)
            this.addInterfaceOperationType(strVersion, (TPortType)typeObject, recMessageProcessInfo);
        else if (type == OperationType.MESSAGE_OPERATIONS)
            this.addMessageType(strVersion, (TDefinitions)typeObject, recMessageProcessInfo);
        else if (type == OperationType.TYPES_OPERATIONS)
            this.addTypeType(strVersion, (TTypes)typeObject, recMessageProcessInfo);
    }
656974
def resource_collections_update(self, data, **kwargs):
        ""
        api_path = "/api/v2/resource_collections.json"
        return self.call(api_path, method="PUT", data=data, **kwargs)
297451
def add_attributes(source,attribute,data_type)
      file = File.open(source, "r+")
      file.each do |line|
        while line == "    create_table :#{@scaffold_name}s do |t|\n" do
          pos = file.pos
          rest = file.read
          file.seek pos
          file.write("      t.#{data_type} :#{attribute}\n") 
          file.write(rest)
          break
        end
      end
    end
569911
def add_templatetype(templatetype,**kwargs):
    

    type_i = _update_templatetype(templatetype)

    db.DBSession.flush()

    return type_i
1204161
def add_bridge(name, datapath_type=None):
    '''  '''
    log('Creating bridge {}'.format(name))
    cmd = ["ovs-vsctl", "--", "--may-exist", "add-br", name]
    if datapath_type is not None:
        cmd += ['--', 'set', 'bridge', name,
                'datapath_type={}'.format(datapath_type)]
    subprocess.check_call(cmd)
389277
public void addDatatype(String pluralDatatype, String datatype) {
		pluralDatatype = Utils.noSpaces(Utils.stripAndTrim(pluralDatatype, " "), "-");
		datatype = Utils.noSpaces(Utils.stripAndTrim(datatype, " "), "-");
		if (StringUtils.isBlank(pluralDatatype) || StringUtils.isBlank(datatype)) {
			return;
		}
		if (getDatatypes().size() >= Config.MAX_DATATYPES_PER_APP) {
			LoggerFactory.getLogger(App.class).warn("Maximum number of types per app reached - {}.",
					Config.MAX_DATATYPES_PER_APP);
			return;
		}
		if (!getDatatypes().containsKey(pluralDatatype) && !getDatatypes().containsValue(datatype) &&
					!ParaObjectUtils.getCoreTypes().containsKey(pluralDatatype)) {
			getDatatypes().put(pluralDatatype, datatype);
		}
	}
205937
def update(self, path, node):
        ''''''
        assert(type(path) == type(self.name))
        assert(type(node) == type(self.name) or type(node) == type(predefined))

        d = self.color_scheme
        tokens = path.split('.')
        for t in tokens[:-1]:
            d = d.get(t)
            if d == None:
                raise Exception("Path '%s' not found.")
        d[tokens[-1]] = node
341194
def get_project_template(name="Default", output_type='exe', debugger=None, build_dir='build'):
        

        project_template = {
            'build_dir' : build_dir,  # Build output path
            'debugger' : debugger,    # Debugger
            'export_dir': '',         # Export directory path
            'name': name,             # project name
            'output_type': output_type, # output type, default - exe
            'target': '',             # target
            'tools_supported': [],    # Tools which are supported,
        }
        project_template.update(ProjectTemplate._get_common_data_template())
        project_template.update(ProjectTemplate._get_tool_specific_data_template())
        return project_template
1288674
def get_update_api(self, resource):
        

        update_api = {
            'path': '/%s/{id}/' % resource.get_api_name(),
            'description': 'Operations on %s' % resource.model.__name__,
            'operations': [
                {
                    'httpMethod': 'PUT',
                    'nickname': 'update%ss' % resource.model
                    .__name__,
                    'summary': 'Update %ss' % resource.model.__name__,
                    'parameters': [
                        {
                            'paramType': 'path', 
                            'name': 'id',
                            'description': '%s id' % (resource.model.__name__),
                            'dataType': 'int',
                            'required': True,
                            'allowMultiple': False,
                        },
                        {
                            'description': '%s object' % (resource.model.__name__),
                            'paramType': 'body',
                            'required': True,
                            'allowMultiple': False,
                            'dataType': resource.model.__name__
                        }
                    ]
                }
            ]
        }

        return update_api
515566
def update_required(srcpth, dstpth):
    

    return not os.path.exists(dstpth) or \
        os.stat(srcpth).st_mtime > os.stat(dstpth).st_mtime
22826
def file_add_types(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/addTypes' % object_id, input_params, always_retry=always_retry, **kwargs)
396700
def add_assigned_resource(self, resource_type: str,
                              value: Union[str, int, float, bool],
                              parameters: dict = None):
        
        if parameters is None:
            parameters = dict()
        resources = DB.get_hash_value(self.key, 'resources_assigned')
        resources = ast.literal_eval(resources)
        resources.append(dict(type=resource_type, value=value,
                              parameters=parameters))
        DB.set_hash_value(self.key, 'resources_assigned', resources)
979090
public static base_responses update(nitro_service client, Interface resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			Interface updateresources[] = new Interface[resources.length];
			for (int i=0;i<resources.length;i++){
				updateresources[i] = new Interface();
				updateresources[i].id = resources[i].id;
				updateresources[i].speed = resources[i].speed;
				updateresources[i].duplex = resources[i].duplex;
				updateresources[i].flowctl = resources[i].flowctl;
				updateresources[i].autoneg = resources[i].autoneg;
				updateresources[i].hamonitor = resources[i].hamonitor;
				updateresources[i].tagall = resources[i].tagall;
				updateresources[i].trunk = resources[i].trunk;
				updateresources[i].lacpmode = resources[i].lacpmode;
				updateresources[i].lacpkey = resources[i].lacpkey;
				updateresources[i].lagtype = resources[i].lagtype;
				updateresources[i].lacppriority = resources[i].lacppriority;
				updateresources[i].lacptimeout = resources[i].lacptimeout;
				updateresources[i].ifalias = resources[i].ifalias;
				updateresources[i].throughput = resources[i].throughput;
				updateresources[i].bandwidthhigh = resources[i].bandwidthhigh;
				updateresources[i].bandwidthnormal = resources[i].bandwidthnormal;
			}
			result = update_bulk_request(client, updateresources);
		}
		return result;
	}
707019
async def convert_local(path, to_type):
    '''
    
    '''
    # Now find path between types
    typed_foreign_res = TypedLocalResource(path)
    original_ts = typed_foreign_res.typestring
    conversion_path = singletons.converter_graph.find_path(
        original_ts, to_type)
    # print('Conversion path: ', conversion_path)

    # Loop through each step in graph path and convert
    for is_first, is_last, path_step in first_last_iterator(conversion_path):
        converter_class, from_ts, to_ts = path_step
        converter = converter_class()
        in_resource = TypedLocalResource(path, from_ts)
        if is_first:  # Ensure first resource is just the source one
            in_resource = typed_foreign_res
        out_resource = TypedLocalResource(path, to_ts)

        if is_last:
            out_resource = TypedPathedLocalResource(path, to_ts)
        await converter.convert(in_resource, out_resource)
861323
def update_datatype(self, datatype, w=None, dw=None, pw=None,
                        return_body=None, timeout=None, include_context=None):
        
        raise NotImplementedError