Given some array names, return the arrays hrefs
 Api1.5
480175
def get_hrefs_for_arrays(names)
      result = []
      arrays_hrefs = []
      if names.size > 0
        names.each do |array_name|
          # Find if arrays exist, if not raise warning.
          # One API call per array
          begin
            Log.debug "[#{Chimp.get_job_uuid}] Making API 1.5 call: client.server_arrays.index(:filter => [#{array_name}])"
            tries ||= 3
            result = Connection.client.server_arrays.index(:filter => ["name==#{array_name}"])
          rescue
            Log.error "[#{Chimp.get_job_uuid}] Making API 1.5 call: client.server_arrays.index failed (retrying)."
            sleep 30
            retry unless (tries -= 1).zero?
            Log.error "[#{Chimp.get_job_uuid}] Making API 1.5 call: client.server_arrays.index failed (giving up)."
          end
          # Result is an array with all the server arrays
          if result.size != 0
            if @exact
              #remove results that do not exactly match
              result.each{ |r|
                if array_names.include?(r.raw['name'])
                  arrays_hrefs += [ r.href ]
                end
              }
            else
              arrays_hrefs += result.collect(&:href)
            end
          else
            if @ignore_errors
              Log.debug "[#{Chimp.get_job_uuid}] Could not find array \"#{array_name}\""
            else
              Log.error "[#{Chimp.get_job_uuid}] Could not find array \"#{array_name}\""
            end
          end
        end
        if ( arrays_hrefs.empty? )
          Log.debug "[#{Chimp.get_job_uuid}] Did not find any arrays that matched!" unless names.size == 1
        end

        return(arrays_hrefs)

      end
    end
165855
def _create_list_of_array_controllers(self):
        
        headers, array_uri, array_settings = (
            self._get_array_controller_resource())
        array_uri_links = []
        if ('links' in array_settings and
                'Member' in array_settings['links']):
            array_uri_links = array_settings['links']['Member']
        else:
            msg = ('"links/Member" section in ArrayControllers'
                   ' does not exist')
            raise exception.IloCommandNotSupportedError(msg)
        return array_uri_links
1031368
private function getArray($i, $length, $arr, $url){
        $str=array();
        if($i==$length-1){
            $str[$arr[$i]] = [
                'title' => $arr[$i],
                'href'  => $url.'/'.getpy($arr[$i]),
                'uuid'  => getpy($arr[$i])
            ];
        }else{
            $str[$arr[$i]]['title'] = $arr[$i];
            $str[$arr[$i]]['href']  = $url.'/'.getpy($arr[$i]);
            $str[$arr[$i]]['uuid']  = getpy($arr[$i]);
            $str[$arr[$i]]['child'] = $this->getArray($i+1, $length, $arr, $str[$arr[$i]]['href']);
            
        }
        return $str;
    }
67323
function getLengthOfCombinedArrays(name) {
    let length = 0;
    let arraySpec;
    for (let ii = 0; ii < arrayOfArrays.length; ++ii) {
      const arrays = arrayOfArrays[ii];
      const arrayInfo = arrays[name];
      const array = getArray(arrayInfo);
      length += array.length;
      if (!arraySpec || arrayInfo.data) {
        arraySpec = arrayInfo;
      }
    }
    return {
      length: length,
      spec: arraySpec,
    };
  }
274847
def array(self, name):
        
        if name in self._navigable:
            if isinstance(self._navigable[name], (list, tuple)):
                return self[name]
            else:
                raise NoArrayFoundError
        else:
            return ArrayOfTables(toml_file=self, name=name)
602429
function (serializeArray) {

            var out = [],
                self = this,
                scheme,
                hostname,
                path,
                port,
                fragment,
                query,
                userInfo;

            if (scheme = self.scheme) {
                out.push(encodeSpecialChars(scheme, reDisallowedInSchemeOrUserInfo));
                out.push(':');
            }

            if (hostname = self.hostname) {
                out.push('//');
                if (userInfo = self.userInfo) {
                    out.push(encodeSpecialChars(userInfo, reDisallowedInSchemeOrUserInfo));
                    out.push('@');
                }

                out.push(encodeURIComponent(hostname));

                if (port = self.port) {
                    out.push(':');
                    out.push(port);
                }
            }

            if (path = self.path) {
                if (hostname && !S.startsWith(path, '/')) {
                    path = '/' + path;
                }
                path = Path.normalize(path);
                out.push(encodeSpecialChars(path, reDisallowedInPathName));
            }

            if (query = ( self.query.toString.call(self.query, serializeArray))) {
                out.push('?');
                out.push(query);
            }

            if (fragment = self.fragment) {
                out.push('#');
                out.push(encodeSpecialChars(fragment, reDisallowedInFragment))
            }

            return out.join('');
        }
1119543
def load_array_types(self, fname):
    '''
    '''
    type_defs = ''
    with open(fname, 'rt') as fh:
      type_defs = fh.read()

    try:
      type_defs = ast.literal_eval(type_defs)
    except SyntaxError:
      type_defs = {}

    self._add_array_types(type_defs)
365297
def _get_array(data, position, obj_end, opts, element_name):
    """"""
    size = _UNPACK_INT(data[position:position + 4])[0]
    end = position + size - 1
    if data[end:end + 1] != b"\x00":
        raise InvalidBSON("bad eoo")

    position += 4
    end -= 1
    result = []

    # Avoid doing global and attribute lookups in the loop.
    append = result.append
    index = data.index
    getter = _ELEMENT_GETTER
    decoder_map = opts.type_registry._decoder_map

    while position < end:
        element_type = data[position:position + 1]
        # Just skip the keys.
        position = index(b'\x00', position) + 1
        try:
            value, position = getter[element_type](
                data, position, obj_end, opts, element_name)
        except KeyError:
            _raise_unknown_type(element_type, element_name)

        if decoder_map:
            custom_decoder = decoder_map.get(type(value))
            if custom_decoder is not None:
                value = custom_decoder(value)

        append(value)

    if position != end + 1:
        raise InvalidBSON('bad array length')
    return result, position + 1
167512
def parse_links(json)
      links = json[:links] || json[:link] || json['links'] || json['link']
      return [] if links.nil?

      links = [links] unless links.is_a?(Array)
      links.map do |link|
        if (link[:href].nil? && link['href'].nil?) || (link[:rel].nil? && link['rel'].nil?)
          msg = "Invalid hash link: #{link.inspect}"
          raise(RuntimeError, msg, caller)
        end
        EntryPoint.new(link[:href] || link['href'], link[:rel] || link['rel'])
      end
    end
1050751
function parseArray(array) {
  const templates = array.map(parse);
  const templateParameters = templates.reduce(
    (parameters, template) => parameters.concat(template.parameters),
    []
  );
  const templateFn = context => templates.map(template => template(context));

  return Template(templateFn, templateParameters);
}
360104
function(args){
			var arr = [];
			each(args, function(i, str){arr[i] = str});
			return arr;
		}
776601
function nodeListToArray (nodes) {
    if ($.env.name !== 'IE' || $.env.version > 9) {
      return prototypeSlice.call(nodes);
    }

    // IE 9 and below call use Array.prototype.slice.call against
    // a NodeList, hence the following
    var array = [];

    for (var i=0, num=nodes.length; i<num; ++i) {
      array.push(nodes[i]);
    }

    return array;
  }
1104133
function gatherHeaders(item) {
    var ret, i, l;
    if (isHashArray(item)) {
        //lets assume a multidimesional array with item 0 bing the title
        i = -1;
        l = item.length;
        ret = [];
        while (++i < l) {
            ret[i] = item[i][0];
        }
    } else if (isArray(item)) {
        ret = item;
    } else {
        ret = keys(item);
    }
    return ret;
}
1279136
def getArrays(self, attr=None, sort=False, reverse=False,
                  selector=None, defaultValue=None, report='lfq'):
        
        selector = (lambda fgi: fgi.isValid) if selector is None else selector
        attr = attr if attr is not None else []
        attr = set(['id', 'intensities'] + aux.toList(attr))
        items = self.getItems(sort, reverse, selector)
        arrays = _getArrays(items, attr, defaultValue)

        for specfile in self._matrixTemplate:
            arrays[specfile] = list()
        for intensities in arrays['intensities']:
            for specfile, intensitiy in zip(self._matrixTemplate, intensities):
                arrays[specfile].append(intensitiy)
        for specfile in self._matrixTemplate:
            arrays[specfile] = numpy.array(arrays[specfile],
                                           dtype=numpy.float64
                                           )
        del arrays['intensities']

        return arrays
129488
function parseHref(href) {
  var match = str(href).match(/([^#]*)(#.*)/);
  if (!match) return { path:href };
  return { path:match[1], fragment:match[2] };
}
609256
def get_template_names(self):
        
        #noinspection PyUnresolvedReferences
        if self.request.is_ajax():
            template_name = '/results.html'
        else:
            template_name = '/index.html'

        return ['{0}{1}'.format(self.template_dir, template_name)]
303954
private String renderListAsLinks( List<String> names ) {

		List<String> newNames = new ArrayList<> ();
		for( String s : names )
			newNames.add( applyLink( s, s ));

		return renderList( newNames );
	}