Need to modify to a param hash
433571
def update(name,type,ttl,values,comment=nil, zone_apex = nil)
      prev = self.clone
      @name = name unless name.nil?
      @type = type unless type.nil?
      @ttl = ttl unless ttl.nil?
      @values = values unless values.nil?
      @zone_apex = zone_apex unless zone_apex.nil?
      @zone.perform_actions([
          {:action => "DELETE", :record => prev},
          {:action => "CREATE", :record => self},
          ],comment)
    end
183723
def to_hash
      config = load_base_config
      config = config.deep_merge(load_env_config)
      config.deep_merge(load_jvm_config)
    end
790951
def _dhash(self, params):
        """"""
        m = hashlib.new('md5')
        m.update(self.hash.encode('utf-8'))
        for key in sorted(params.keys()):
            h_string = ('%s-%s' % (key, params[key])).encode('utf-8')
            m.update(h_string)
        return m.hexdigest()
1159644
function setUrlHashParameters(params) {

  var keys = Object.keys(params);
  var values = Object.values(params);
  var pairs = [];
  keys.forEach(function(key, i) {
    if (key != '') pairs.push(keys[i] + '=' + values[i]);
  });
  var hash = pairs.join('&');
  window.location.hash = hash;

}
930245
def flatten_hash hash
      hash.flat_map do |key, value|
        case value
        when Hash
          value.map do |inner_key, inner_value|
            "#{key}[#{inner_key}]=#{inner_value}"
          end
        when Array
          value.map { |inner_value| "#{key}[]=#{inner_value}" }
        else
          "#{key}=#{value}"
        end
      end
    end
1059347
def normalize_keys(hash)
        hash.inject({}) do |options, (key, value)|
          options[(underscore(key) rescue key) || key] = normalize_value(value)
          options
        end
      end
1201997
function(hash){
    var params = {},
        regex = /([^&=]+)=([^&]*)/g,
        m;

    while ((m = regex.exec(hash)) !== null) {
      params[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);
    }

    // OpenID Connect
    if (params.id_token && !params.error) {
      IdToken.validateTokensAndPopulateClaims(params);
      return params;
    }

    // Oauth2
    if(params.access_token || params.error){
      return params;
    }
  }
777031
def update_post(params)
      post_file   = params[:post][:name]
      post        = jekyll_post(post_file)
      yaml_config = merge_config(post.data, params)
      write_post_contents(params[:post][:content], yaml_config, post_file)

      post_file
    end
1328576
def to_hash
      {}.tap { |h|
        model_class.filterrific_available_filters.each do |filter_name|
          param_value = self.send(filter_name)
          case
          when param_value.blank?
            # do nothing
          when param_value.is_a?(Proc)
            # evaluate Proc so it can be serialized
            h[filter_name] = param_value.call
          when param_value.is_a?(OpenStruct)
            # convert OpenStruct to hash
            h[filter_name] = param_value.marshal_dump
          else
            h[filter_name] = param_value
          end
        end
      }
    end
497990
def put(path, params)
      headers = {}

      request('PUT', path, params.to_json, headers) do |resp|
        yield(resp) if block_given?
      end
    end
1169428
def thing_params
      @params ||= thing.new.attributes.keys.map(&:to_sym)
      params.require(thing.name.underscore.to_sym).permit(
        @params,
        :page
      )
    end
710795
def to_params
      attrs = Hash.new
      instance_variables.each do |ivar|
        name = ivar[1..-1]
        attrs[name.to_sym] = instance_variable_get(ivar) if respond_to? "#{name}="
      end
      attrs
    end
613154
def _add_hash(source):
    """"""
    source = '\n'.join('# ' + line.rstrip()
                       for line in source.splitlines())
    return source
291645
def set_parameters(hash_or_instance)
      parameters = extract_parameters_from_hash_or_instance(hash_or_instance)
      parameters.each do |k,v|
        send "#{k}=", v
      end
    end
227342
function updateUrlParameter (uri, key, value) {
	// remove the hash part before operating on the uri
	var
		i = uri.indexOf('#'),
		hash = i === -1 ? '' : uri.substr(i)
		;

	uri = i === -1 ? uri : uri.substr(0, i);

	var
		re = new RegExp("([?&])" + key + "=.*?(&|$)", "i"),
		separator = uri.indexOf('?') !== -1 ? "&" : "?"
		;

	if (!value) {
		// remove key-value pair if value is empty
		uri = uri.replace(new RegExp("([?&]?)" + key + "=[^&]*", "i"), '');

		if (uri.slice(-1) === '?') {
			uri = uri.slice(0, -1);
		}
		// replace first occurrence of & by ? if no ? is present

		if (uri.indexOf('?') === -1) {
			uri = uri.replace(/&/, '?');
		}

	} else if (uri.match(re)) {
		uri = uri.replace(re, '$1' + key + "=" + value + '$2');
	} else {
		uri = uri + separator + key + "=" + value;
	}
	return uri + hash;
}
34539
def api_hash(replace = nil)
      self.replace = replace unless replace.nil?
      {
        url:          href,
        description:  description,
        extended:     extended,
        tags:         tag.join(" "),
        replace:      replace,
        shared:       shared,
        toread:       toread
      }.select { |key, value| ! value.nil? }
    end
1168899
def to_params_hash(keys,values)
      hash = {}
      keys.size.times { |i| hash[ keys[i].to_sym ] = values[i] }
      hash
    end