function for looking up a specific portion of the navMap using a location array or a title
6898
function getNavMap(navMap, searchTerm, portion){

		let returnMap = navMap;


		if (!isset(searchTerm) || is_array(searchTerm) && searchTerm.length === 0){
			//if the search term is an empty array, it will return the full nav map (excluding ROOT)
			return returnMap;
		}

		//code for when an array is given (filters results based on numbers and titles provided in array)
		 if (is_array(searchTerm)){
	    	returnMap = getSpecificMap(returnMap, searchTerm);

		//code for when a string is given (searches full nav map for Title that matches)
		} else if (is_string(searchTerm)) {
			returnMap = getTitleMap(returnMap, searchTerm);

		//code for when a single number is given (treats it as a single level location variable)
		} else if (is_int(searchTerm)) {
			returnMap = returnMap[searchTerm];

		//throws error if searchTerm variable doesn't make sense
		} else {
			console.log('\nThe search term must be either a string, interval or an array. \nSearch term =\n', searchTerm);
		}

		if (isset(portion)) {
			return returnMap[portion];
		} else {
			return returnMap;
		}
	}
913622
def _buildElementNsmap(using_elements):
    '''
    
    '''
    thisMap = {}
    for e in using_elements:
        thisMap[e.attrib['prefix']] = e.attrib['namespace']
    return thisMap
1272929
function(opts) {
				// Check the mode on mouseup
				if(svgCanvas.getMode() == "hello_world") {
					var zoom = svgCanvas.getZoom();
					
					// Get the actual coordinate by dividing by the zoom value
					var x = opts.mouse_x / zoom;
					var y = opts.mouse_y / zoom;
					
					var text = "Hello World!\n\nYou clicked here: " 
						+ x + ", " + y;
						
					// Show the text using the custom alert function
					$.alert(text);
				}
			}
1082268
function getSpecificMap(map, array){
		var returnMap;
		var arrayCopy = array.splice(0);

		//if first item in array is "current" or "subnav" it makes the function a bit more efficient
		//it restricts any title searches to just offspring of the current page
		if (array[0] === 'current' || array[0] === 'subnav'){
			arrayCopy.shift();
			arrayCopy = pageMap.location.concat(link);
		}

		for (var i = 0; i < arrayCopy.length; i++){
			var searchTerm = arrayCopy[i];
			var searchMap = typeof returnMap !== 'undefined' ? returnMap : map;

			//Output an error if neither a string or an interval provided
			if (checkSearchTerm(searchTerm)){

				if (is_string(searchTerm)){
					//if item is a string, do a getTitleMap function on the search term using the last map
					returnMap = getTitleMap(searchMap, searchTerm);

				} else if(is_numeric(searchTerm) && isset(searchMap.subnav)) {
					//if item is a number, return the map at the specified index of the last map in array
					returnMap = searchMap.subnav[parseInt(searchTerm)];
				} else {
					returnMap = false;
					break;
				}
			} else {
				break;
			}
		}

		if (returnMap){
			return returnMap;
		} else {
			return false;
		}

	}
1105935
private function _getTitlesMap() {
        if (! is_array($this->_titlesMap)) {
            $map    = $this->_getMap();
            $result = array();

            foreach ($map as $key => $row) {

                // Title does not have to be unique. So if a title is used
                // twice we only use it for the first result.
                if (isset($row['code']) && $row['code'] && (! isset($result[$row['code']]))) {
                    $result[$row['code']] = $key;
                }
            }

            $this->_titlesMap = $result;
        }

        return $this->_titlesMap;
    }
671363
function focusNav (elem, step) {
  let focusable = getFocusable(document.body)
  let index = findIndex(focusable, el => el === elem)
  if (index !== -1) {
    let next = focusable[index + step]
    if (next) {
      next.focus()
    }
  }
}
909491
def _check_location_part(cls, val, regexp):
        """"""
        cls._deprecation_warning()
        return CourseLocator._check_location_part(val, regexp)
139517
function navMap_post_defaults(map, index, parent){

	replaceValues(map, {
		//propertyName : "forced overide value"
		//link : '#',//using this would disable ALL links (including links already defined in the main nav map file)
	});

	return {
		depth: map.location.length,
		index: index,
		//link : '#',//this wouldn't do anything as the "link" property has already been defined by this stage
		//parentName : parent.title,//this would set "parentName" to the current nav items parent title
	}
}
266121
function allNodesAtLocation(location) {
        var nodes = [];
        exports.root.each(function each(n) {
            if (n.type === DOMNode.TYPE_ELEMENT && n.isAtLocation(location)) {
                nodes.push(n);
            }
        });
        return nodes;
    }
1181749
protected String getTitle(Map<String, String> fieldValues) {

        for (Map.Entry<String, String> entry : fieldValues.entrySet()) {
            if (entry.getKey().contains("/NavText/")) {
                return entry.getValue();
            }
        }
        return null;
    }
382290
public void showSitemapView(boolean showSitemap) {

        if (showSitemap) {
            setSortContainerPropertyId(CmsResourceTableProperty.PROPERTY_NAVIGATION_TEXT);
            setSortAscending(true);
        } else {
            setSortContainerPropertyId(CAPTION_FOLDERS);
            setSortAscending(true);
        }
    }
462989
function (h) {
    var posX = h.offsetLeft;
    var posY = h.offsetTop;
    var parent = h.offsetParent;
    // Add offsets for all ancestors in the hierarchy
    while (parent !== null) {
      // Adjust for scrolling elements which may affect the map position.
      //
      // See http://www.howtocreate.co.uk/tutorials/javascript/browserspecific
      //
      // "...make sure that every element [on a Web page] with an overflow
      // of anything other than visible also has a position style set to
      // something other than the default static..."
      if (parent !== document.body && parent !== document.documentElement) {
        posX -= parent.scrollLeft;
        posY -= parent.scrollTop;
      }
      // See http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/4cb86c0c1037a5e5
      // Example: http://notebook.kulchenko.com/maps/gridmove
      var m = parent;
      // This is the "normal" way to get offset information:
      var moffx = m.offsetLeft;
      var moffy = m.offsetTop;
      // This covers those cases where a transform is used:
      if (!moffx && !moffy && window.getComputedStyle) {
        var matrix = document.defaultView.getComputedStyle(m, null).MozTransform ||
        document.defaultView.getComputedStyle(m, null).WebkitTransform;
        if (matrix) {
          if (typeof matrix === "string") {
            var parms = matrix.split(",");
            moffx += parseInt(parms[4], 10) || 0;
            moffy += parseInt(parms[5], 10) || 0;
          }
        }
      }
      posX += moffx;
      posY += moffy;
      parent = parent.offsetParent;
    }
    return {
      left: posX,
      top: posY
    };
  }
1079254
function mapCOW(arr, func) {
    var res = null;

    for(var i=0; i<arr.length; i++) {
        var item = func(arr[i]);

        if(item !== arr[i]) {
            if(!res) {
                res = arr.slice();
            }

            res[i] = item;
        }
    }

    return res || arr;
}
256817
function getMarkerLines(
  loc: NodeLocation,
  source: Array<string>,
  opts: Object,
): { start: number, end: number, markerLines: Object }
1239012
function getPositionWhereCanIGoFromArray(isBlack, positions) {
    const { x, y } = getPositionFromArray(R.head(positions));
    return {
        x, y, isBlack,
        whereCanIGo: R.tail(positions).map(getPositionFromArray)
    };
}
54771
private function getFindReplaceLocationMapNameText() {
    $config = $this->configFactory->get('openy_programs_search.settings');
    $exclude_location_map = $config->get('name_string_replace_location_map');

    return is_array($exclude_location_map) ? $exclude_location_map : [];
  }
738567
function doSearch() {
    var value = document.getElementById('search').value;
    marks = [];
    marksIndex = 0;
    for (var key in markers) {
        if ( (~(key.toLowerCase()).indexOf(value.toLowerCase())) && (mb.contains(markers[key].getLatLng()))) {
            marks.push(markers[key]);
        }
        if (markers[key].icon === value) {
            marks.push(markers[key]);
        }
    }
    moveToMarks();
    if (marks.length === 0) {
        // If no markers found let's try a geolookup...
        var protocol = location.protocol;
        if (protocol == "file:") { protocol = "https:"; }
        var searchUrl = protocol + "//nominatim.openstreetmap.org/search?format=json&limit=1&q=";

        fetch(searchUrl + value) // Call the fetch function passing the url of the API as a parameter
        .then(function(resp) { return resp.json(); })
        .then(function(data) {
            if (data.length > 0) {
                var bb = data[0].boundingbox;
                map.fitBounds([ [bb[0],bb[2]], [bb[1],bb[3]] ]);
                map.panTo([data[0].lat, data[0].lon]);
            }
            else {
                document.getElementById('searchResult').innerHTML = "&nbsp;<font color='#ff0'>Not Found</font>";
            }
        })
        .catch(function(err) {
            if (err.toString() === "TypeError: Failed to fetch") {
                document.getElementById('searchResult').innerHTML = "&nbsp;<font color='#ff0'>Not Found</font>";
            }
        });
    }
    else {
        if (lockit) {
            document.getElementById('searchResult').innerHTML = "&nbsp;<font color='#ff0'>Found "+marks.length+" results within bounds.</font>";
        } else {
            document.getElementById('searchResult').innerHTML = "&nbsp;<font color='#ff0'>Found "+marks.length+" results.</font>";
        }
    }
}