Unsets dot-notated key from an array.

@param array &$aSearch The search array
@param mixed $mFind The dot-notated key or array of keys

@return mixed
193836
public static function delete(&$aSearch, $mFind)
    {
        if (is_null($mFind)) {
            return false;
        }

        if (is_array($mFind)) {
            $return = array();

            foreach ($mFind as $key) {
                $return[$key] = self::delete($aSearch, $key);
            }

            return $return;
        }

        $keys = explode('.', $mFind);

        if (!is_array($aSearch) || !array_key_exists($keys[0], $aSearch)) {
            return false;
        }

        $this_key = array_shift($keys);

        if (!empty($keys)) {
            $key = implode('.', $keys);

            return self::delete($aSearch[$this_key], $key);
        } else {
            unset($aSearch[$this_key]);
        }

        return true;
    }
761755
final protected static function replaceKey($data, $search, $replace)
    {
        foreach ($data as $key => $value) {
            if (is_array($value)) {
                $data[$key] = $value = self::replaceKey($data[$key], $search, $replace);
            }
            if ($key == $search) {
                $data[$replace] = $value;
                unset($data[$search]);
            }
        }

        return $data;
    }
181361
function matchDetails(m, isSearch) {
    var id, regexp, segment, type, cfg, arrayMode;
    id          = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null
    cfg         = config.params[id];
    segment     = pattern.substring(last, m.index);
    regexp      = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);

    if (regexp) {
      type      = $$UMFP.type(regexp) || inherit($$UMFP.type("string"), { pattern: new RegExp(regexp, config.caseInsensitive ? 'i' : undefined) });
    }

    return {
      id: id, regexp: regexp, segment: segment, type: type, cfg: cfg
    };
  }
990562
private function seek($search, $selectors, $current) {
		if (!($search instanceof \DOMElement)) {
			return FALSE;
		}
		list ($tag, $key, $val, $exp, $no_key) = $selectors [$current];
		$pass = TRUE;
		if ($tag === '*' && !$key) {
			exit('tag为*时，key不能为空');
		}
		if ($tag && $tag != $search->tagName && $tag !== '*') {
			$pass = FALSE;
		}
		if ($pass && $key) {
			if ($no_key) {
				if ($search->hasAttribute($key)) {
					$pass = FALSE;
				}
			} else {
				if ($key != "plaintext" && !$search->hasAttribute($key)) {
					$pass = FALSE;
				}
			}
		}
		if ($pass && $key && $val && $val !== '*') {
			if ($key == "plaintext") {
				$nodeKeyValue = $this->text($search);
			} else {
				$nodeKeyValue = $search->getAttribute($key);
			}
			$check = $this->match($exp, $val, $nodeKeyValue);
			if (!$check && strcasecmp($key, 'class') === 0) {
				foreach (explode(' ', $search->getAttribute($key)) as $k) {
					if (!empty ($k)) {
						$check = $this->match($exp, $val, $k);
						if ($check) {
							break;
						}
					}
				}
			}
			if (!$check) {
				$pass = FALSE;
			}
		}
		if ($pass) {
			$current--;
			if ($current < 0) {
				return $search;
			} elseif ($this->seek($this->getParent($search), $selectors, $current)) {
				return $search;
			} else {
				return FALSE;
			}
		} else {
			return FALSE;
		}
	}
571987
private void cacheUniqueSelectRef(Object object, MappedStatement mt, String cacheKey) {
		Collection<QueryMethodCache> mcs = queryCacheMethods.get(mt.getId().substring(0, mt.getId().lastIndexOf(SPLIT_PONIT))).values();
		outter:for (QueryMethodCache methodCache : mcs) {
			if(methodCache.isPk || methodCache.groupRalated)continue;
			try {	
				Object[] cacheFieldValues = new Object[methodCache.fieldNames.length];
				for (int i = 0; i < cacheFieldValues.length; i++) {
					if(methodCache.fieldNames[i] == null)break outter;
					cacheFieldValues[i] = ReflectUtils.getObjectValue(object, methodCache.fieldNames[i]);
					if(cacheFieldValues[i] == null)continue outter;
				}
				String fieldCacheKey = genarateQueryCacheKey(methodCache.keyPattern , cacheFieldValues);
				
				cacheFieldRefKey(fieldCacheKey,cacheKey, methodCache.getExpire());
				if(logger.isDebugEnabled())logger.debug("_autocache_ method[{}] add ref cacheKey:{}",mt.getId(),fieldCacheKey);
			} catch (Exception e) {
				logger.warn("cacheUniqueSelectRef:"+cacheKey,e);
			}
		}
	}
643333
public function find( $search ) {

		if ( ! is_array( $search ) ) {
			wp_die( 'LogicException: $search should be a [meta_key => val] array' );
		}

		if ( $search === [
			null => null,
		] ) {
			return false; // Abort search
		}

		if ( $this->paramSearchMeta( $search ) !== false ) {
			return true;
		}

		return false;
	}
759926
function _findIndex(arr, onFind) {
  let foundIndex = -1;

  util.forEach(arr, (item, index) => {
    let nextFind = true;
    if (onFind(item, index)) {
      foundIndex = index;
      nextFind = false;
    }

    return nextFind;
  });

  return foundIndex;
}
423
protected function clearPairs(/*# array */ $matched)/*# : array */
    {
        $pairs = [];
        foreach ($matched as $m) {
            // source another env file
            if (isset($m[5])) {
                $file = trim($m[5]);
                $pairs[$file] = $this->source_marker;

            // value found
            } elseif (isset($m[3])) {
                $pairs[$m[1]] = $m[3];

            // no value defined
            } else {
                $pairs[$m[1]] = '';
            }
        }
        return $pairs;
    }
709265
def msearch(self, m, query, fields=None, limit=None, or_=True):
        '''
        
        '''
        ix = self._index(m)
        if fields is None:
            fields = ix.fields
        group = OrGroup if or_ else AndGroup
        parser = MultifieldParser(fields, ix.schema, group=group)
        return ix.search(parser.parse(query), limit=limit)
874680
private function skipUntilSearchedToken($searchFor)
    {
        while ($this->token) {
            if ((is_string($searchFor) && ($searchFor == $this->token))
                || (is_int($searchFor) && is_array($this->token) && ($searchFor == $this->token[0]))
            ) {
                break;
            }
            $this->advanceToken();
        }
    }
311057
public static function recursiveArraySearch($needleKey, $needleValue,
                                                array $haystack)
    {
        foreach ($haystack as $key => $value) {
            $currentKey = $key;

            if (($currentKey == $needleKey && ($needleValue === null || $needleValue
                == $value)) || ( is_array($value) && self::recursiveArraySearch($needleKey,
                    $needleValue, $value) !== false)) {
                return $currentKey;
            }
        }
        return null;
    }
1290454
function in_array( needle, haystack )
	{
		var found = 0,
			key;
		for ( key in haystack )
		{
			if ( haystack[ key ] == needle )
			{
				found = 1;
				break;
			}
		}
		return found;
	}
323441
public static function searchRecursive($needle, $haystack, $needleKey = "", $strict = false, $path = [])
    {
        if (!is_array($haystack)) {

            return false;
        }

        foreach ($haystack as $key => $val) {
            if (is_array($val) &&
                $subPath = self::searchRecursive($needle, $val, $needleKey, $strict, $path)
            ) {
                $path = array_merge($path, [$key], $subPath);

                return $path;
            } elseif ((!$strict && ($val == $needle || is_null($needle)) &&
                    $key == (strlen($needleKey) > 0 ? $needleKey : $key)) ||
                ($strict && $val === $needle &&
                    $key == (strlen($needleKey) > 0 ? $needleKey : $key))
            ) {
                $path[] = $key;

                return $path;
            }
        }

        return false;
    }
1173809
private IRingSet removeExtraRings(IAtomContainer m) throws Exception {

        IRingSet rs = Cycles.sssr(m).toRingSet();

        //remove rings which dont have all aromatic atoms (according to hybridization set by lower case symbols in smiles):
        Iterator<IAtomContainer> i = rs.atomContainers().iterator();
        while (i.hasNext()) {
            IRing r = (IRing) i.next();
            if (r.getAtomCount() > 8) {
                i.remove();
            } else {
                for (IAtom a : r.atoms()) {
                    Hybridization h = a.getHybridization();
                    if (h == CDKConstants.UNSET || !(h == Hybridization.SP2 || h == Hybridization.PLANAR3)) {
                        i.remove();
                        break;
                    }
                }
            }
        }
        return rs;
    }
472598
protected function searchForMetaValue( $meta_key, array $postmeta ) {

		if ( empty( $postmeta ) ) {
			return '';
		}

		foreach ( $postmeta as $meta ) {
			// prefer this value, if it's set
			if ( $meta_key === $meta['key'] ) {
				$meta_val = $meta['value'];
				if ( is_serialized( $meta_val ) ) {
					$meta_val = unserialize( $meta_val ); // @codingStandardsIgnoreLine
					if ( is_object( $meta_val ) ) {
						$meta_val = ''; // Hack attempt?
					}
				}
				return $meta_val;
			}
		}

		return '';
	}
1119900
def _uncached_match(self, text, pos, cache, error):
        """"""
        m = self.re.match(text, pos)
        if m is not None:
            span = m.span()
            node = RegexNode(self, text, pos, pos + span[1] - span[0])
            node.match = m  # TODO: A terrible idea for cache size?
            return node
1030570
public function find($searchCriteria = false, $returnArray = false)
    {
        $result = array();

        if (is_int($searchCriteria)) {
            $primaryKeyValueForSearch = intval($searchCriteria);
            $result = $this->_db_adapter->getOneResult($this->_table_name, array($this->_primary_key => $primaryKeyValueForSearch));
        } else if (is_array($searchCriteria) && !empty($searchCriteria)) {
            $limit = isset($searchCriteria['limit']) ? $searchCriteria['limit'] : 0;
            unset($searchCriteria['limit']);
            $result = $this->_db_adapter->Select($this->_table_name, $searchCriteria, $limit);
        } else if(empty($searchCriteria) || !$searchCriteria) {
            $result = $this->_db_adapter->Select($this->_table_name);
        }

        if($returnArray) {
            return $result;
        }

        return $this->convertSearchResultIntoBean($result);
    }