Return the contents of the HashedArray as an array
14920
synchronized public Object[] toArray(Object[] values) {
    int count = 0;
    for (int bind = 0; bind < buckets.length; bind++) {
      if (counts[bind] > 0)
         System.arraycopy(buckets[bind], 0, values, count, counts[bind]);
      count += counts[bind];
    }
    return values;
  }
240576
function isArray (arr) {
  return Array.isArray
    ? Array.isArray(arr)
    : Object.prototype.toString.call(arr) === '[object Array]'
}
156470
def hash_contents(contents):
    
    assert isinstance(contents, GroupNode)

    result = hashlib.sha256()

    def _hash_int(value):
        result.update(struct.pack(">L", value))

    def _hash_str(string):
        assert isinstance(string, string_types)
        _hash_int(len(string))
        result.update(string.encode())

    def _hash_object(obj):
        _hash_str(obj.json_type)
        if isinstance(obj, (TableNode, FileNode)):
            hashes = obj.hashes
            _hash_int(len(hashes))
            for hval in hashes:
                _hash_str(hval)
        elif isinstance(obj, GroupNode):
            children = obj.children
            _hash_int(len(children))
            for key, child in sorted(iteritems(children)):
                _hash_str(key)
                _hash_object(child)
        else:
            assert False, "Unexpected object: %r" % obj

        # Backward compatibility: only hash metadata_hash if it's present.
        if obj.metadata_hash is not None:
            _hash_str(obj.metadata_hash)

    _hash_object(contents)

    return result.hexdigest()
1357122
function hash() {
	var i = 0,
		args = arguments,
		length = args.length,
		obj = {};
	for (; i < length; i++) {
		obj[args[i++]] = args[i];
	}
	return obj;
}
249539
def toarray(self):
        
        return asarray([value.toarray() for (key, value) in sorted(self.transformations.items())])
1300317
public function toArray()
    {
        $result = [];

        ArrayList::of($this->getFillable())
            ->append(ArrayList::of($this->getVisible()))
            ->unique(SORT_STRING)
            ->exceptValues($this->getHidden())
            ->each(function ($key) use (&$result) {
                $getter = vsprintf('get%s', [Str::studly($key)]);

                if (method_exists($this, $getter)) {
                    $result[$key] = $this->$getter();

                    return;
                }

                $camel = Str::camel($key);
                $result[$key] = $this->$camel;
            });

        return $result;
    }
1013719
public function asArray()
    {
        $array = [];

        foreach ($this as $key => $val) {
            if ($val instanceof self) {
                $val = $val->asArray();
            }
            $array[$key] = $val;
        }

        return $array;
    }
1264438
def hash(self):
        """"""
        content = json.dumps(self.data, sort_keys=True, separators=(",", ":"))
        return hashlib.sha256(content.encode("utf8")).hexdigest()
691504
def to_output_hash
      HASH_SCHEMA.schema(
        map { |attr| [attr.key, attr.to_read_type] }.to_h
      )
    end
93391
def to_hash
        h = {}
        keys.each { |k| h[ k ] = self.fetch( k ) }
        h
    end
664583
def to_hash
      result = {}

      @values.keys.each do |field_name|
        value = __send__(field_name)
        hashed_value = value.respond_to?(:to_hash_value) ? value.to_hash_value : value
        result.merge!(field_name => hashed_value)
      end

      result
    end
862514
def array
      @entries=[]
      @stack=[]
      if @leaf
        recurse(@map,0)
        return @entries
      end
      visit(@map,0)
      @entries.map {|stack|
        m={}
        @keys.each_with_index {|k,i|
          v=stack[i]
          m[k.name]=k.value ? k.value.js_call(self,v) : v
        }
        m
      }
    end
259005
function stringToHash(hashAsString) {
        var entries = {};
        if (hashAsString) {
            var text = decodeURI(hashAsString);
            var items = text.split('&');
            angular.forEach(items, function (item) {
                var kv = item.split('=');
                var key = kv[0];
                var value = kv[1] || key;
                entries[key] = value;
            });
        }
        return entries;
    }
915782
def to_a
      ary = []
      node = @first_leaf
      while node do
        ary += node.values
        node = node.next_sibling
      end

      ary
    end
733214
def split_assignment_array_to_hash(arr)
      hash = {}
      arr.each do |assignment|
        k, v = assignment.split('=', 2).map(&:strip)
        hash[k] = v
      end

      hash
    end
551677
def parse_movies_array(hash)
      moviesArray = Array.new
       hash["movies"].each do |movie|
          moviesArray.push(Movie.new(movie, self))
        end
        return moviesArray
    end
669329
public function toArray()
    {
        $data = array();
        $map = array(
            'id' => 'getId',
            'start' => 'getStart',
            'end' => 'getEnd',
            'hash' => 'getHash',
            'parameters' => 'getParameters',
            'created_at' => 'getCreatedAt'
        );

        foreach ($map as $key => $getter) {
            $data[$key] = $this->$getter();
        }
        return $data;
    }