Deletes the specified example.

    Args:
      request: A request that should contain 'index'.

    Returns:
      An empty response.
359544
def _delete_example(self, request):
    
    index = int(request.args.get('index'))
    if index >= len(self.examples):
      return http_util.Respond(request, {'error': 'invalid index provided'},
                               'application/json', code=400)
    del self.examples[index]
    self.updated_example_indices = set([
        i if i < index else i - 1 for i in self.updated_example_indices])
    self.generate_sprite([ex.SerializeToString() for ex in self.examples])
    return http_util.Respond(request, {}, 'application/json')
595025
public DeletePresetResponse deletePreset(DeletePresetRequest request) {
        checkNotNull(request, "The parameter request should NOT be null.");
        checkStringNotEmpty(request.getName(), "The parameter name should NOT be null or empty string.");
        InternalRequest internalRequest = createRequest(HttpMethodName.DELETE, request, LIVE_PRESET,
                request.getName());
        return invokeHttpClient(internalRequest, DeletePresetResponse.class);
    }
1225981
def delete_request(url, params)
      begin
        resource_url = "#{@base_uri}#{url}?access_token=#{@access_token}&#{params}"
        response = RestClient.delete resource_url, {content_type: :json, accept: :json}

        #result = JSON.parse(response, object_class: OpenStruct)
        return response
      rescue => e
        return JSON.parse(e.response, object_class: OpenStruct)
      end
    end
1244720
def delete(self, url):
        
        logger.debug('Making DELETE request to %s', url)
        return self.oauth_session.delete(url)
877612
def client_delete(self, url, **kwargs):
        """"""
        response = requests.delete(self.make_url(url), headers=self.headers)
        if not response.ok:
            raise Exception(
                '{status}: {reason}.\nCircleCI Status NOT OK'.format(
                    status=response.status_code, reason=response.reason))
        return response.json()
90155
def index_delete(self, index):
        '''
        
        '''
        request = self.session
        url = 'http://%s:%s/%s' % (self.host, self.port, index)
        response = request.delete(url)
        return response
963546
async def delete(self, request, resource=None, **kwargs):
        
        if resource:
            resources = [resource]
        else:
            data = await self.parse(request)
            if data:
                resources = list(self.collection.where(self.meta.model_pk << data))

        if not resources:
            raise RESTNotFound(reason='Resource not found')

        for resource in resources:
            resource.delete_instance()
328562
def delete(self):
        
        self.requester.delete(
            '/{endpoint}/{id}', endpoint=self.endpoint,
            id=self.id
        )
        return self
895583
def _delete(self, **kwargs):
        
        requests_params = self._handle_requests_params(kwargs)

        delete_uri = self._meta_data['uri']
        session = self._meta_data['bigip']._meta_data['icr_session']
        response = session.delete(delete_uri, **requests_params)
        if response.status_code == 200 or 201:
            self.__dict__ = {'deleted': True}
1175071
def delete(self, url, headers=None, kwargs=None):
        
        return self._request(
            method='delete',
            url=url,
            headers=headers,
            kwargs=kwargs
        )
1016928
def delete(self, url):
        
        response = requests.delete(
            self.host + url,
            headers={
              'Authorization': 'Bearer ' + self.token,
              'x-falkonry-source':self.sourceHeader
            },
            verify=False
        )
        if response.status_code == 204:
            return None
        elif response.status_code == 401:
            raise Exception(json.dumps({'message':'Unauthorized Access'}))
        else:
            raise Exception(response.content)
1000790
def delete(self, request, *args, **kwargs):
        
        self.object = self.get_object()
        success_url = self.get_success_url()
        self.object.delete()

        if self.request.is_ajax():
            return JSONResponseMixin.render_to_response(self, context={})

        return HttpResponseRedirect(success_url)
774880
def delete(self, request, **resources):
        

        resource = resources.get(self._meta.name)
        if not resource:
            raise HttpError("Bad request", status=status.HTTP_404_NOT_FOUND)

        for o in as_tuple(resource):
            o.delete()

        return HttpResponse("")
397540
def destroy(self, request, *args, **kwargs):
        
        obj = self.get_object()
        user = request.user

        if strtobool(request.query_params.get('delete_content', 'false')):
            for entity in obj.entity_set.all():
                if user.has_perm('edit_entity', entity):
                    entity.delete()

            for data in obj.data.all():
                if user.has_perm('edit_data', data):
                    data.delete()

        return super().destroy(request, *args, **kwargs)
202326
function clear(instance) {
		var result = false

		// find the request
		var request
		if (instance && instance.id) {
			if (request = requests[instance.id]) {
				if (request.timer !== true) { // ok: within the timeout period
					clearTimeout(request.timer)
					request.timer = null
					delete requests[instance.id]
				} else { // it had already timed out
					result = Date.now() - request.created
					makeError('After ' + (result / 1e3) + ' s,' +
						' the timed out request completed: ' + requestString(request))
				}
			} else makeError('Instance not found: ' + haraldutil.inspectDeep(instance))
		} else {
			makeError('Corrupt instance provided: ' + haraldutil.inspectDeep(instance))
		}

		return result
	}
308015
public int delete(Request request)
    {
        DeleteResponse response = executeRequest(request,objectMapper.getTypeFactory().constructType(
                DeleteResponse.class));
        return response.getCount();
    }
437425
def clear_data(self, request):
        
        for key in request.session.keys():
            if key.startswith(constants.SESSION_KEY):
                del request.session[key]