Clear scroll query id
@param  string $scroll_id
@return array|Collection
765002
public function clear($scroll_id = NULL)
    {

        $scroll_id = !is_null($scroll_id) ? $scroll_id : $this->scroll_id;

        return $this->connection->clearScroll([
            "scroll_id" => $scroll_id,
            'client' => ['ignore' => $this->ignores]
        ]);
    }
1121680
protected function check_object_id( $object_id ) {
		$fetcher = new CommentFetcher();
		$comment = $fetcher->get_check( $object_id );
		return $comment->comment_ID;
	}
675618
function destroy() {
        ScrollSpy._elements.splice(ScrollSpy._elements.indexOf(this), 1);
        ScrollSpy._elementsInView.splice(ScrollSpy._elementsInView.indexOf(this), 1);
        ScrollSpy._visibleElements.splice(ScrollSpy._visibleElements.indexOf(this.$el), 1);
        ScrollSpy._count--;
        this._removeEventHandlers();
        $(this.options.getActiveElement(this.$el.attr('id'))).removeClass(this.options.activeClass);
        this.el.M_ScrollSpy = undefined;
      }
983596
public function query($query_data, $meta) {
        $result_set = [];

        if($meta['scroll']) {
            $query_data['scroll'] = '15s';
            $response = $this->client->search($query_data);

            $state = [];
            do {
                if(!array_key_exists('_scroll_id', $response)) {
                    throw new Exception('No scroll id');
                }

                $response = $this->client->scroll([
                    'scroll_id' => $response['_scroll_id'],
                    'scroll' => '15s'
                ]);
                $result_set[] = $response;
            } while(count($response['hits']['hits']) > 0);

            $this->client->clearScroll(['scroll_id' => $response['_scroll_id']]);
        } else {
            $result_set[] = $this->client->search($query_data);
        }

        return $result_set;
    }
351995
public function delete($_id = NULL)
    {

        if ($_id) {
            $this->_id = $_id;
        }

        $parameters = [
            "id" => $this->_id,
            'client' => ['ignore' => $this->ignores]
        ];

        if ($index = $this->getIndex()) {
            $parameters["index"] = $index;
        }

        if ($type = $this->getType()) {
            $parameters["type"] = $type;
        }

        return (object)$this->connection->delete($parameters);
    }
222585
function scrollToElementId(id) {
  const el = document.querySelector(id)
  if (el) {
    return window.scrollTo(0, el.offsetTop - 20)
  } else {
    return false
  }
}
836861
public function clearSearchIndexAction()
    {
        // get uri builder
        $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);

        // admin only access
        if ($this->getBackendUser()->isAdmin()) {
            if ($this->do == 'clear') {
                $databaseConnection = Db::getDatabaseConnection('tx_kesearch_index');
                $databaseConnection->truncate('tx_kesearch_index');
            }
        }

        // build "clear index" link
        $moduleUrl = $uriBuilder->buildUriFromRoute(
            'web_KeSearchBackendModule',
            [
                'id' => $this->id,
                'do' => 'clear'
            ]
        );

        $this->view->assign('moduleUrl', $moduleUrl);
        $this->view->assign('isAdmin', $this->getBackendUser()->isAdmin());
        $this->view->assign('indexCount', $this->getNumberOfRecordsInIndex());

    }
683582
public function clear($cache_id, $options = array())
    {
        $result = null;
        $options += array('pattern' => '.cache');
        $this->hook->attach('cache.clear.before', $cache_id, $options, $result, $this);

        if (isset($result)) {
            return $result;
        }

        $result = true;

        if ($cache_id === null) {
            array_map('unlink', glob(GC_DIR_CACHE . '/*.cache'));
            gplcart_static_clear();
        } else {

            if (is_array($cache_id)) {
                $cache_id = gplcart_array_hash($cache_id);
            }

            array_map('unlink', glob(GC_DIR_CACHE . "/$cache_id{$options['pattern']}"));
            gplcart_static_clear($cache_id);
        }

        $this->hook->attach('cache.clear.after', $cache_id, $options, $result, $this);
        return (bool) $result;
    }
185614
function(id) {
			var cleared = running[id] != null;
			if (cleared) {
				running[id] = null;
			}

			return cleared;
		}
409813
public function clearLogs(Request $request, $databox_id)
    {
        $success = false;

        try {
            $this->findDataboxById($databox_id)->clear_logs();
            $success = true;
        } catch (\Exception $e) {

        }

        if ('json' === $request->getRequestFormat()) {
            return $this->app->json([
                'success' => $success,
                'msg'     => $success ? $this->app->trans('Successful update') : $this->app->trans('An error occured'),
                'sbas_id' => $databox_id,
            ]);
        }

        // TODO: Check whether html call is still valid
        return $this->app->redirectPath('admin_database', [
            'databox_id' => $databox_id,
            'error'      => 'file-too-big',
        ]);
    }
1112930
public function unregisterActionId($id)
    {
        if (is_array($id)) {
            foreach ($id as $each) {
                $this->unregisterActionId($each);
            }
            return $this;
        }

        foreach ($this->_actionhandler as $i => &$handlerinfo) {
            if ($handlerinfo['id'] == $id) {
                unset($this->_actionhandler[$i]);

                $this->log(SMARTIRC_DEBUG_ACTIONHANDLER, 'DEBUG_ACTIONHANDLER: '
                    .'actionhandler('.$id.') unregistered', __FILE__, __LINE__
                );
                $this->_actionhandler = array_values($this->_actionhandler);
                return $this;
            }
        }

        $this->log(SMARTIRC_DEBUG_ACTIONHANDLER, 'DEBUG_ACTIONHANDLER: could '
            .'not find actionhandler id: '.$id.' _not_ unregistered',
            __FILE__, __LINE__
        );
        return false;
    }
187322
function clear() {
        if($this !== $this->client->channels) {
            foreach($this->data as $key => $val) {
                $this->client->channels->delete($key);
                unset($val);
            }
        }
        
        parent::clear();
        return $this;
    }
937785
public function destroy($session_id)
	{
		$key = $this->key($session_id);

		$this->engine->delete($key . '_expire');

		return $this->engine->delete($key);
	}
1044937
public function clear_notifications( $queue_id ) {

		$all = get_option( $this->bucket, array() );

		if ( ! isset( $all[ $queue_id ] ) ) {
			return false;
		}

		unset( $all[ $queue_id ] );

		if ( empty( $all ) ) {
			delete_option( $this->bucket );
		} else {
			update_option( $this->bucket, $all );
		}

		return true;
	}
1259772
public function reset()
    {
        if(isset($this->_lastScrollId)) {
            $this->query->createCommand($this->db)->clearScroll(['scroll_id' => $this->_lastScrollId]);
        }

        $this->_batch = null;
        $this->_value = null;
        $this->_key = null;
        $this->_lastScrollId = null;
    }
890193
public function deleteRefund($transaction_id)
    {
        $response = $this->client->delete('transactions/refunds/' . $transaction_id);
        return json_decode($response->getBody())->refund;
    }
745197
public function query($query_data, $query_settings) {
        $result_set = [];

        if($query_settings['scroll']) {
            $query_data['scroll'] = self::CUR_TTL;
            $response = $this->client->search($query_data);

            do {
                if(!array_key_exists('_scroll_id', $response)) {
                    throw new Exception('Scroll id not found');
                }

                $response = $this->client->scroll([
                    'scroll_id' => $response['_scroll_id'],
                    'scroll' => self::CUR_TTL,
                ]);
                $result_set[] = $response;
            } while(count($response['hits']['hits']) > 0);

            $this->client->clearScroll(['scroll_id' => $response['_scroll_id']]);
        } else {
            $result_set[] = $this->client->search($query_data);
        }

        return $result_set;
    }