query
stringlengths
7
6.41k
document
stringlengths
12
28.8k
metadata
dict
negatives
listlengths
30
30
negative_scores
listlengths
30
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Returns whether the commit that triggered this hook is the first commit on the branch.
def initial_commit? return @initial_commit unless @initial_commit.nil? @initial_commit = !Overcommit::Utils.execute(%w[git rev-parse HEAD~]).success? end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initial_commit?\n !Overcommit::Utils.execute(%w[git rev-parse HEAD]).success?\n end", "def initial_commit?\n !Overcommit::Utils.execute(%w[git rev-parse HEAD]).success?\n end", "def single_commit?\n commit_range? && (first_commit == last_commit)\n end", "def detached_head?\n reba...
[ "0.7892316", "0.7892316", "0.7040554", "0.67317414", "0.6728145", "0.6632289", "0.6598481", "0.64903975", "0.6471433", "0.64154357", "0.63823813", "0.63488525", "0.63393813", "0.63331914", "0.6328761", "0.63133544", "0.62486887", "0.62273306", "0.6138494", "0.61362016", "0.60...
0.7954759
0
method to create an array of event times. Will use this to create array of start_at times and endat times
def make_event_times_array(dates_array, hour, min) event_times = Array.new dates_array.each_index do |index| event_times[index] = create_event_time(dates_array[index],hour, min) end return event_times end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_times_array(padding = true)\n @times = (padding) ? [@start_dt - 1.hour] : [@start_dt]\n \n # and including every 1/2 hour until one hour after the selected end time\n while true do\n tmp = @times.last + 30.minutes\n (padding) ? (tmp == (@end_dt + 1.hour)) ? break : '' : (tmp == @end_dt...
[ "0.77758896", "0.6993386", "0.6827037", "0.6825186", "0.67938447", "0.6713517", "0.65722907", "0.65666837", "0.655617", "0.6547934", "0.6458089", "0.6405242", "0.6352919", "0.63423306", "0.63409716", "0.6257865", "0.6253482", "0.62533295", "0.62227345", "0.6215372", "0.618292...
0.75218064
1
Method to combine :start_at and :end_at to make hash for each event and put them in an array.
def create_event_array(start_at_array, end_at_array, event_name, activity_id) events_array = Array.new start_at_array.each_index do |index| event_hash = Hash.new event_hash[:start_at] = start_at_array[index] event_hash[:end_at] = end_at_array[index] event_hash[:name] = event_name event_hash[:activi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def map_events\n mapped_timeline = Timeline.new\n self.each do |time,events|\n mapped_timeline[time] = events.map{|event| yield event }\n end\n mapped_timeline\n end", "def index\n @events = Event.where('event_start >= ?', Date.today).order(:event_start, :time_begin)\...
[ "0.63486975", "0.6328946", "0.6306188", "0.6238378", "0.62371016", "0.61670715", "0.6133689", "0.6112115", "0.6023875", "0.5979033", "0.5974558", "0.5967543", "0.5954405", "0.59527653", "0.5941525", "0.58745205", "0.5859826", "0.58438385", "0.584312", "0.58239293", "0.5814451...
0.74076563
0
POST /microposts POST /microposts.json
def create @micropost = current_user.microposts.build(micropost_params) respond_to do |format| if @micropost.save format.html { redirect_to root_url(:anchor => "ideas"), notice: 'Micropost was successfully created.' } format.json { render :show, status: :created, location: @micropost } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @micropost = current_user.microposts.new(micropost_params)\n respond_to do |format|\n if @micropost.save\n format.html do\n redirect_to @micropost, notice: t('created', name: 'Micropost')\n end\n format.json { render :show, status: :created, location: @micropos...
[ "0.74312764", "0.7217986", "0.71826017", "0.7145193", "0.6962739", "0.6956072", "0.69354075", "0.69113517", "0.6891886", "0.6889804", "0.68856466", "0.686241", "0.68548185", "0.684824", "0.6820386", "0.68123066", "0.6808733", "0.6805246", "0.6805246", "0.6800926", "0.68007153...
0.7220905
1
Updates the lesson at which a student left off
def update_left_off(lesson_id) update_attribute(:left_off, lesson_id) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unsubmit_students\n # self.lesson.students - self.students\n self.grades_course.students - self.students\n end", "def kick_out\n @students = students.shift\n end", "def update_scheduledlessons\n starts_on = Time.now\n course.lessons.all(order: :position).each do |lesson|\n unless schedu...
[ "0.60317314", "0.5915387", "0.5874263", "0.58734745", "0.5734091", "0.5722048", "0.5700454", "0.56862485", "0.5613513", "0.5599763", "0.5597632", "0.55835813", "0.55756336", "0.55720216", "0.5566742", "0.5560592", "0.55529946", "0.5512913", "0.5481752", "0.5480805", "0.548057...
0.69948167
0
GET /efemerides GET /efemerides.json
def index @efemerides = Efemeride.all end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @ideas = Idea.current_ideas_for(current_user).entries\n respond_with(@ideas) do |format|\n format.json { render json: @ideas }\n end\n end", "def index\n @ideas = Idea.all\n\n render json: @ideas\n end", "def index\n @electors = Elector.all\n\n render json: @electors\n ...
[ "0.6595957", "0.64276004", "0.637383", "0.63241476", "0.63241476", "0.63241476", "0.6243483", "0.62248427", "0.6222056", "0.62212324", "0.6218299", "0.6201375", "0.6197122", "0.61910653", "0.6160749", "0.61554456", "0.61273766", "0.60763806", "0.6061175", "0.6049678", "0.6048...
0.72936547
0
POST /efemerides POST /efemerides.json
def create @efemeride = Efemeride.new(efemeride_params) respond_to do |format| if @efemeride.save format.html { redirect_to @efemeride, notice: 'Efemeride ha sido creada.' } format.json { render :show, status: :created, location: @efemeride } else format.html { render :new }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @edrife = Edrive.new(edrife_params)\n\n respond_to do |format|\n if @edrife.save\n format.html { redirect_to @edrife, notice: 'Edrive was successfully created.' }\n format.json { render :show, status: :created, location: @edrife }\n else\n format.html { render :new...
[ "0.6362536", "0.6338888", "0.6289659", "0.62379044", "0.6176653", "0.6022605", "0.6013906", "0.5988079", "0.5895292", "0.5869615", "0.5860972", "0.5858056", "0.58465064", "0.58321863", "0.5808621", "0.58060694", "0.57956755", "0.5773347", "0.5754637", "0.57378435", "0.5728085...
0.70247984
0
PATCH/PUT /efemerides/1 PATCH/PUT /efemerides/1.json
def update respond_to do |format| if @efemeride.update(efemeride_params) format.html { redirect_to @efemeride, notice: 'Efemeride ha sido actualizada.' } format.json { render :show, status: :ok, location: @efemeride } else format.html { render :edit } format.json { render...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n respond_to do |format|\n if @ephem.update(ephem_params)\n format.html { redirect_to @ephem, notice: 'Ephem was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @ephem.errors,...
[ "0.657859", "0.6500946", "0.6267927", "0.6232415", "0.6207815", "0.62031585", "0.61929935", "0.619094", "0.6172974", "0.61641216", "0.61198616", "0.60809433", "0.60808015", "0.6070673", "0.60662687", "0.6058941", "0.6054351", "0.60444343", "0.6042393", "0.6036405", "0.6032921...
0.65653116
1
DELETE /efemerides/1 DELETE /efemerides/1.json
def destroy @efemeride.destroy respond_to do |format| format.html { redirect_to efemerides_url, notice: 'Efemeride ha sido eliminada.' } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete\n client.delete(\"/#{id}\")\n end", "def destroy\n @ephem.destroy\n respond_to do |format|\n format.html { redirect_to ephems_url }\n format.json { head :no_content }\n end\n end", "def delete\n render json: Alien.delete(params[\"id\"])\n end", "def destroy\n @cl...
[ "0.72305256", "0.7032952", "0.6986585", "0.69046986", "0.6896647", "0.6895572", "0.68844205", "0.6877227", "0.6868776", "0.6852742", "0.6849682", "0.68482864", "0.6842759", "0.68418604", "0.6829235", "0.68260795", "0.68242365", "0.6818047", "0.68178713", "0.6808849", "0.67938...
0.7296594
0
GET /empresas_grandes GET /empresas_grandes.json
def index @empresas_grandes = EmpresasGrande.all end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_grades\r\n grade_nodes = BankNodestructure.grade_gather(params[:subject])\r\n render json: grade_nodes.to_json\r\n end", "def index\n @grupoassuntos = Grupoassunto.all\n\n render json: @grupoassuntos\n end", "def index\n @degres = Degre.all\n end", "def show\n render json: @grupo...
[ "0.6267364", "0.6222571", "0.60442704", "0.589569", "0.58901346", "0.58424026", "0.58141", "0.5804504", "0.57948494", "0.5785185", "0.5765662", "0.5742184", "0.5738538", "0.5729949", "0.56681836", "0.5662469", "0.56457037", "0.5637877", "0.56318474", "0.56205976", "0.5607145"...
0.72416115
0
POST /empresas_grandes POST /empresas_grandes.json
def create @empresas_grande = EmpresasGrande.new(empresas_grande_params) respond_to do |format| if @empresas_grande.save format.html { redirect_to @empresas_grande, notice: 'Empresas grande was successfully created.' } format.json { render :show, status: :created, location: @empresas_gran...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @gran_unidad = GranUnidad.new(gran_unidad_params)\n\n respond_to do |format|\n if @gran_unidad.save\n format.html { redirect_to @gran_unidad, notice: 'Gran unidad was successfully created.' }\n format.json { render action: 'show', status: :created, location: @gran_unidad }\n ...
[ "0.6418323", "0.59974456", "0.5931636", "0.58654153", "0.5831695", "0.582175", "0.5781392", "0.57767004", "0.5761897", "0.5749735", "0.57318324", "0.56716955", "0.5668795", "0.5646195", "0.5613132", "0.560302", "0.5595234", "0.55907357", "0.55776787", "0.5546996", "0.5543814"...
0.6476368
0
PATCH/PUT /empresas_grandes/1 PATCH/PUT /empresas_grandes/1.json
def update respond_to do |format| if @empresas_grande.update(empresas_grande_params) format.html { redirect_to @empresas_grande, notice: 'Empresas grande was successfully updated.' } format.json { render :show, status: :ok, location: @empresas_grande } else format.html { render :...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n respond_to do |format|\n if @gran_unidad.update(gran_unidad_params)\n format.html { redirect_to @gran_unidad, notice: 'Gran unidad was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { ren...
[ "0.6492887", "0.64774734", "0.6374838", "0.62955874", "0.6279331", "0.62629515", "0.62590384", "0.62122184", "0.62020576", "0.6188772", "0.6187928", "0.61781293", "0.61756694", "0.61731726", "0.6166238", "0.61631745", "0.6154509", "0.6141572", "0.6134362", "0.6133993", "0.612...
0.66714966
0
DELETE /empresas_grandes/1 DELETE /empresas_grandes/1.json
def destroy @empresas_grande.destroy respond_to do |format| format.html { redirect_to empresas_grandes_url, notice: 'Empresas grande was successfully destroyed.' } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @gran_unidad.destroy\n respond_to do |format|\n format.html { redirect_to gran_unidad_index_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @alumno.destroy\n respond_to do |format|\n format.html { redirect_to grupos_path }\n format.json { he...
[ "0.7241906", "0.71171665", "0.7002369", "0.69909877", "0.69902223", "0.69559526", "0.69471467", "0.69358104", "0.69334406", "0.69239676", "0.6916203", "0.69143885", "0.68470216", "0.6842328", "0.6841625", "0.6840756", "0.6837575", "0.6836073", "0.68325824", "0.68270934", "0.6...
0.72367156
1
walks all files and converts them all to the new format
def transform_files!(files, type) files.each do |file| @file = file @type = type parsed = "" @dirnames = Base.get_namespace(file,type) # directories after the app/type/ directory namespaces = LANGUAGES.collect do |lang| if type == 'views' n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def transform_files\n extract\n reorder_files\n transform @attendance_file, 'att' unless @attendance_file.blank?\n transform @enroll_file, 'enroll' unless @enroll_file.blank?\n transform @ili_file, 'ili' unless @ili_file.blank?\n end", "def git_convert_all!\n Dir[\"#{@path}/**/*.erb\"].each do...
[ "0.67649734", "0.6670742", "0.6469586", "0.633741", "0.62945455", "0.6190535", "0.61411077", "0.6111291", "0.6109648", "0.60937256", "0.60236865", "0.6023474", "0.598543", "0.5969204", "0.5932392", "0.593233", "0.5889535", "0.5884787", "0.5871994", "0.58075887", "0.5750295", ...
0.69372356
0
dumps the translation strings into yml files
def dump_yaml!(filepath,translations) return if translations.blank? FileUtils.mkdir_p(@dirpath) unless File.exists?(@dirpath) File.open(filepath, 'w+') { |f| YAML::dump(translations, f) } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dump_yaml!\n FileUtils.mkdir_p LOCALE_DIR\n File.open(STANDARD_LOCALE_FILE,'w+') { |f| YAML::dump(@translations, f) } \n end", "def save!\n FileUtils.mkdir_p File.dirname(self.file)\n\n File.open(self.file, \"w+\") do |f|\n f << %(#{self.namespace}.translations || (#{self....
[ "0.7478688", "0.6756288", "0.6724751", "0.65271837", "0.6494844", "0.6396262", "0.63741976", "0.63378483", "0.62018317", "0.61155903", "0.6104265", "0.6073624", "0.6061962", "0.59855217", "0.59820116", "0.5876098", "0.5857729", "0.5797701", "0.5760566", "0.5747575", "0.572560...
0.6956579
1
Render the html rows for the given records and an optional named partial. Returns HTML string or nil
def render_response_html(records, partial: 'row', locals: {} ) output = render_to_string(partial: partial, locals: { records: records }.merge(locals)) # if the query has no results, it will return a string which causes jquery to crash output = nil unless records.any? output ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def render_record_from_config(record, renderer = record_select_config.label)\n case renderer\n when Symbol, String\n # return full-html from the named partial\n render :partial => renderer.to_s, :locals => {:record => record}\n\n when Proc\n # return an html-cleaned descriptive string\n ...
[ "0.67454976", "0.6625903", "0.6348517", "0.60518867", "0.59954494", "0.5915619", "0.58751804", "0.5839854", "0.57700557", "0.56415856", "0.5578389", "0.5541731", "0.54972696", "0.5467913", "0.54628384", "0.5453182", "0.54108423", "0.53909916", "0.5385601", "0.5363377", "0.535...
0.7949676
0
TeleSign RestClient, useful for making generic RESTful requests against the API. +customer_id+ Your customer_id string associated with your account. +api_key+ Your api_key string associated with your account. +rest_endpoint+ (optional) Override the default rest_endpoint to target another endpoint. +timeout+ (optional) ...
def initialize(customer_id, api_key, rest_endpoint: 'https://rest-api.telesign.com', proxy: nil, timeout: 10) @customer_id = customer_id @api_key = api_key @rest_endpoint = rest_endpoint @http = Net::HTTP::Persistent.n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rest\n @rest ||= RestClient.new ENDPOINT[type], lgn: login, pwd: password\n end", "def call_api(**rest_options)\n @retry.do do\n res = RestClient::Request.execute(**rest_options)\n json = res && !res.empty? ? ::JSON.parse(res.to_s) : nil\n call_api_response(res) if r...
[ "0.6244816", "0.6234532", "0.60365266", "0.59155256", "0.58677393", "0.58076847", "0.5753729", "0.5723202", "0.56997734", "0.5676537", "0.56553006", "0.564077", "0.5604026", "0.55906004", "0.557717", "0.5524308", "0.5522994", "0.55147743", "0.54602253", "0.5452858", "0.545061...
0.7206188
0
Generic TeleSign REST API POST handler. +resource+ The partial resource URI to perform the request against, as a string. +params+ Body params to perform the POST request with, as a hash.
def post(resource, **params) execute(Net::HTTP::Post, 'POST', resource, **params) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def post(resource, params)\n Api.new.post(resource, params)\n end", "def post(resource, params)\n case resource\n when \"pedidos\", \"place_order\", \"new_order\" then url = \"/pedidos\"\n when \"envios\", \"shipping\" then url = \"/envios\"\n else url = \"/#{resource}\"\n ...
[ "0.75428265", "0.70685315", "0.6853991", "0.68156886", "0.6690143", "0.65098995", "0.6404931", "0.63250756", "0.6283927", "0.6038787", "0.6038787", "0.5970068", "0.59241366", "0.5862658", "0.58508605", "0.5834396", "0.5758661", "0.5705562", "0.56920415", "0.5683019", "0.56573...
0.7740034
0
Generic TeleSign REST API GET handler. +resource+ The partial resource URI to perform the request against, as a string. +params+ Body params to perform the GET request with, as a hash.
def get(resource, **params) execute(Net::HTTP::Get, 'GET', resource, **params) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get(resource_path, params=nil, accept=\"*/*\")\n http_params = {:accept => accept}\n http_params = http_params.merge(params: params) if params\n response = @http_client[resource_path].get(http_params)\n Response.new(response)\n rescue => e\n log.error Howitzer::CommunicationError, e...
[ "0.7063598", "0.69762707", "0.6887614", "0.68423516", "0.66711134", "0.66264284", "0.6617485", "0.6552251", "0.64845777", "0.6483327", "0.6444215", "0.64318323", "0.64318323", "0.6416487", "0.63905346", "0.6364933", "0.63618934", "0.6358219", "0.62922496", "0.6242217", "0.618...
0.7988195
0
Generic TeleSign REST API PUT handler. +resource+ The partial resource URI to perform the request against, as a string. +params+ Body params to perform the PUT request with, as a hash.
def put(resource, **params) execute(Net::HTTP::Put, 'PUT', resource, **params) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def put(api_version, resource, payload, query_parameters = nil,\n headers = nil)\n make_rest_call(:put, uri_builder(api_version, resource,\n query_parameters), payload, headers)\n end", "def put(resource, body = \"\", headers = {})\n prepare_r...
[ "0.70956933", "0.70368356", "0.6830302", "0.6829505", "0.6654068", "0.65090257", "0.6508298", "0.63247776", "0.62288934", "0.6223546", "0.62199175", "0.6177819", "0.6177819", "0.61661243", "0.6145439", "0.61161745", "0.6110584", "0.60541165", "0.60461867", "0.60164374", "0.59...
0.80104744
0
Generic TeleSign REST API DELETE handler. +resource+ The partial resource URI to perform the request against, as a string. +params+ Body params to perform the DELETE request with, as a hash.
def delete(resource, **params) execute(Net::HTTP::Delete, 'DELETE', resource, **params) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete(params = {})\n Client.current.delete(resource_url, params)\n end", "def delete(api_version, resource, query_parameters = nil, headers = nil)\n make_rest_call(:delete, uri_builder(api_version, resource,\n query_parameters), headers)\n e...
[ "0.7877372", "0.7480377", "0.72798955", "0.7059302", "0.68671685", "0.6858565", "0.67931414", "0.6769459", "0.668201", "0.663129", "0.66185176", "0.6605539", "0.6597864", "0.6593301", "0.6585191", "0.65845305", "0.65734565", "0.65626556", "0.65529925", "0.65267724", "0.652036...
0.8279141
0
Generic TeleSign REST API request handler. +method_function+ The net/http request to perform the request. +method_name+ The HTTP method name, as an upper case string. +resource+ The partial resource URI to perform the request against, as a string. +params+ Body params to perform the HTTP request with, as a hash.
def execute(method_function, method_name, resource, **params) resource_uri = URI.parse("#{@rest_endpoint}#{resource}") encoded_fields = '' if %w[POST PUT].include? method_name request = method_function.new(resource_uri.request_uri) if content_type == "application/x-www-form-urlencode...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def make_request(resource_name, method_name, params = {}, response_key = nil)\n end", "def request(resource, method, params = nil) \n resource = Resources.get(resource, method, params)\n params = append_api_credentials(params)\n\n if method == :post\n payload = prepare_params(p...
[ "0.6881146", "0.6747781", "0.6244243", "0.6165793", "0.61495125", "0.60945827", "0.60688543", "0.60095716", "0.6008411", "0.5952333", "0.59438866", "0.5936315", "0.58843195", "0.5881889", "0.584854", "0.58376443", "0.5790852", "0.57417744", "0.57381666", "0.57350147", "0.5729...
0.7453009
0
GET /thresholds GET /thresholds.json
def index @thresholds = Threshold.all end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show\n @threshold = Threshold.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @threshold }\n end\n end", "def twitterapp_ratelimits\n\t\tTwitter.get('/1.1/application/rate_limit_status.json')[:body][:resources]\n\tend", "def create...
[ "0.59992146", "0.58752257", "0.5848886", "0.5711196", "0.5689826", "0.56108534", "0.5553224", "0.55522025", "0.5538886", "0.5511574", "0.54407936", "0.53804755", "0.53055227", "0.5290292", "0.52837574", "0.524133", "0.5188683", "0.51577353", "0.51183265", "0.51137453", "0.507...
0.7063734
0
POST /thresholds POST /thresholds.json
def create @threshold = Threshold.new(threshold_params) respond_to do |format| if @threshold.save format.html { redirect_to thresholds_path, notice: 'Threshold was successfully created.' } format.json { render :show, status: :created, location: @threshold } else format.html ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @threshold = Threshold.new(params[:threshold])\n\n respond_to do |format|\n if @threshold.save\n format.html { redirect_to @threshold, notice: 'Threshold was successfully created.' }\n format.json { render json: @threshold, status: :created, location: @threshold }\n else\...
[ "0.6966539", "0.6436343", "0.61232716", "0.60181296", "0.5961568", "0.5955487", "0.56774676", "0.5563616", "0.553094", "0.55199975", "0.5450079", "0.541051", "0.5317877", "0.51938426", "0.5158801", "0.51015145", "0.50843513", "0.50095844", "0.492647", "0.492609", "0.49013627"...
0.71900964
0
PATCH/PUT /thresholds/1 PATCH/PUT /thresholds/1.json
def update respond_to do |format| if @threshold.update(threshold_params) format.html { redirect_to thresholds_path, notice: 'Threshold was successfully updated.' } format.json { render :show, status: :ok, location: @threshold } else format.html { render :edit } format.jso...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n @threshold = Threshold.find(params[:id])\n\n respond_to do |format|\n if @threshold.update_attributes(params[:threshold])\n format.html { redirect_to @threshold, notice: 'Threshold was successfully updated.' }\n format.json { head :no_content }\n else\n format.html...
[ "0.6908464", "0.6423047", "0.6135383", "0.5685925", "0.5647299", "0.5636884", "0.5538382", "0.5538382", "0.55133283", "0.54966605", "0.5445029", "0.5441752", "0.5426735", "0.5401405", "0.53695375", "0.53661764", "0.5365714", "0.5361594", "0.53432304", "0.53278357", "0.5318644...
0.7070543
0
DELETE /thresholds/1 DELETE /thresholds/1.json
def destroy @threshold.destroy respond_to do |format| format.html { redirect_to thresholds_url, notice: 'Threshold was successfully destroyed.' } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @threshold = Threshold.find(params[:id])\n @threshold.destroy\n\n respond_to do |format|\n format.html { redirect_to thresholds_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @prd_threshold = PrdThreshold.find(params[:id])\n @prd_threshold.destroy...
[ "0.7635639", "0.6575579", "0.64611566", "0.6421593", "0.63860756", "0.62113523", "0.6180906", "0.61196035", "0.61111253", "0.6030906", "0.6022729", "0.5962589", "0.5922817", "0.59216017", "0.5919271", "0.58847916", "0.58829063", "0.58793896", "0.58757776", "0.58661294", "0.58...
0.7300227
1
Method for search the surgery term
def find_surgery_term surgeryterm # Search the surgery terms Surgery.where(user_type: "admin").any_of({ :name => /^#{surgeryterm}/i }) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def search_surgery\n\t\t# Searching for surgery as per user entered term\n\t\tif Surgery.where(user_type: \"admin\").any_of({ :name => /^#{params[:term]}/i }).present?\n\t\t\t# if search show from the admin then the search term from surgery of admin\n\t\t\tsurgeries = Surgery.where(user_type: \"admin\").any_of({ :...
[ "0.7489109", "0.71838355", "0.7124443", "0.7071348", "0.7062752", "0.68411064", "0.6829328", "0.6821051", "0.6799708", "0.6770622", "0.67631733", "0.6725981", "0.671604", "0.66948384", "0.66834325", "0.66834325", "0.66834325", "0.66834325", "0.66834325", "0.66834325", "0.6683...
0.7859314
0
Renames the Service type from "type" to "service_type" to avoid conflicts
def rename_service_type(hash) hash["service_type"] = hash["type"] hash.delete("type") hash end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def service_name\n raise TypeError, 'no type on this reply' unless\n instance_variable_defined? :@type\n\n @type.split('.').first.sub '_', ''\n end", "def service_type_name\n \"\" \n end", "def set_service_type\n @service_type = ServiceType.find(params[:id])\n end", "def _ser...
[ "0.6752241", "0.6633492", "0.6623655", "0.65550786", "0.6356624", "0.6350679", "0.6260855", "0.61445904", "0.6143448", "0.61054903", "0.6100868", "0.6057287", "0.5906334", "0.58981097", "0.58810383", "0.58692807", "0.5853573", "0.5847273", "0.5810481", "0.5793755", "0.5725508...
0.8576102
0
Instantiate an instance of +klass+ and pass +output+
def respond_with(klass, output) klass.new(self, output) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize(output)\n @output = output\n end", "def initialize(output)\n @output = output\n end", "def initialize(output)\n @output = output\n end", "def initialize(output)\n @output = output\n end", "def initialize(output)\n @output = output\n end...
[ "0.7180216", "0.699429", "0.699429", "0.699429", "0.6947501", "0.6887096", "0.6884629", "0.67193204", "0.66616166", "0.6391762", "0.6358704", "0.6208677", "0.6205884", "0.6191878", "0.61585855", "0.6156144", "0.61158764", "0.60943145", "0.6093336", "0.6046234", "0.59016114", ...
0.7288034
0
This method is responsible for receiving the exchange_rate of a specific currency to the GBP from an API.
def find_rate() uri_string = "https://free.currconv.com/api/v7/convert?q=GBP_"\ "#{@currency}&compact=ultra&apiKey=2d46a9b5b650dca0dbb1" uri = URI(uri_string) res = Net::HTTP.get_response(uri) return(JSON.parse(res.body)["GBP_#{@currency}"]/100.0) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def exchange_rate(to_currency)\n self.bank.exchange(self.base_currency, to_currency)\n end", "def conv_exchange_rate\n currency_exchange.exchange_rate\n end", "def get_exchange_rate(currencyCode)\n begin\n exhash = JSON.parse(exchange_rate)\n BigDecimal(exhash[currencyCode])\n rescue\n ...
[ "0.7444457", "0.7184691", "0.70807207", "0.6828173", "0.673572", "0.67350835", "0.66884565", "0.66806954", "0.66609746", "0.6636957", "0.6605665", "0.6591344", "0.6559951", "0.65384525", "0.65216565", "0.64503866", "0.64170665", "0.6379565", "0.63773113", "0.635374", "0.63455...
0.72135526
1
Get a diff that can be stored as a JSON string, persisted and retrieved to apply (by default, Diff::LCS::Changeas_json isn't very useful)
def persistable_diff(a, b) diff = Diff::LCS.diff a, b reify_diff_element(diff).as_json end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def diff\n @diff ||= begin\n commit.diffs.collect{|diff| diff.diff}.join(\"\\n\")\n end\n end", "def changes\n @changes ||= JSON.parse(File.read(ARGV[1]))\nend", "def json\n delta_pack.to_json\n end", "def diff_init(diff, path)\n Smash.new.tap do |di|\n if dif...
[ "0.66141504", "0.6368866", "0.60854304", "0.58906037", "0.58535475", "0.584853", "0.57909197", "0.54888964", "0.5454939", "0.5436178", "0.5413507", "0.5353406", "0.53247666", "0.53161436", "0.52924263", "0.5253892", "0.52419835", "0.52074444", "0.5183777", "0.51828593", "0.51...
0.69219756
0
Create a Revision using revised content compared to base content
def revise_from_content(base_content, revised_content) revisions.build(diffs: generate_diff_hash(base_content, revised_content)) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_revision!\n logger.info(\"Creating a new revision for article_submission id: #{self.id}\")\n rev = self.copy(false)\n unless rev.article_submission\n rev.article_submission = self \n self.update_attribute(:last_revision,false)\n else\n rev.article_submission.article_submis...
[ "0.70113164", "0.6950661", "0.66123986", "0.6515512", "0.6488422", "0.64601314", "0.62441635", "0.6213863", "0.6176663", "0.61356765", "0.6105925", "0.6102364", "0.6084698", "0.6066202", "0.6046146", "0.604109", "0.60341835", "0.6008621", "0.6001054", "0.6000184", "0.59718364...
0.7457926
0
=begin my_basket is configured to the current user =end
def my_basket @user = current_user end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_basket\n if !current_user.nil?\n @basket = current_user.basket\n @categories = Category.all\n @total_price = @basket.total_price\n else\n redirect_to '/users/sign_up'\n end\n end", "def basket\n \t#if the user doesn't have a basket\n \t#give them an empty one\n \tif sessi...
[ "0.71763974", "0.70489395", "0.69249535", "0.6874542", "0.6844382", "0.67905056", "0.65807974", "0.6403643", "0.63191754", "0.63191754", "0.63191754", "0.63191754", "0.63191754", "0.63191754", "0.6296771", "0.61556643", "0.61149406", "0.6059588", "0.60516125", "0.59962314", "...
0.78195983
0
=begin add_to_basket includes an if statement. If the users basket already exists it adds the book details Else it will create the basket =end
def add_to_basket if Basket.exists?(user_id: params[:user_id], book_id: params[:book_id]) @basket = Basket.find_by(user_id: params[:user_id], book_id: params[:book_id]) @basket.increment!(:amount) else Basket.create(user_id: params[:user_id], book_id: params[:book_id], amou...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def addBook(book)\n\t\tinventories.create(book_id: book.id)\n\tend", "def add_item_to_basket(item_id)\n @session[:item_basket] << item_id unless @session[:item_basket].include? item_id\n end", "def add_book author, title\n books = @books[author]\n if books\n if books.include? title\n ...
[ "0.6615606", "0.649829", "0.64770126", "0.6437923", "0.637861", "0.6339421", "0.62966764", "0.6277239", "0.62671065", "0.62582695", "0.6208262", "0.6206987", "0.6176562", "0.6167054", "0.615192", "0.61467165", "0.61344904", "0.61278075", "0.6074642", "0.6066711", "0.6062431",...
0.8253183
0
=begin Remove basket allows the user to clear down their basket by destroying it for the given user. it then redirects them to an empty basket =end
def remove_from_basket @basket = Basket.find_by(user_id: params[:user_id], book_id: params[:book_id]) @basket.destroy redirect_to my_basket_path(params[:user_id]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n\t\t@user_basket = UserBasket.find(params[:id])\n\t\t@shop = ShopProfile.find(@user_basket.shop_profile_id);\n\t\t@price = ShopProduct.find(@user_basket.shop_product_id).selling_price\n\t\t@price *= @user_basket.quantity\n\t\t@user_basket.destroy\n\t\tif current_user.user_baskets.empty?\n\t\t\trespond...
[ "0.7578817", "0.72867954", "0.7027629", "0.6891593", "0.68793637", "0.685834", "0.67777246", "0.66327655", "0.66145456", "0.6535209", "0.65331733", "0.6470347", "0.6469474", "0.6438997", "0.6421963", "0.6398868", "0.6397889", "0.6327976", "0.6323923", "0.63047916", "0.6281804...
0.78387153
0
Remove a listening channel, the LiveQuery will automatically remove itsself from the pool when there are no channels.
def remove_listener(collection, query) live_query = @volt_app.live_query_pool.lookup(collection, query) live_query.remove_channel(@channel) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_channel(channel_name)\r\n @channels.delete(channel_name.downcase)\r\n end", "def unsubscribe_from_channel; end", "def remove_channel( channel )\n @channel_map.delete channel.local_id\n end", "def unsubscribe_from_channel # :nodoc:\n run_callbacks :unsubscribe do\n ...
[ "0.70596963", "0.68710816", "0.6856037", "0.67398417", "0.67341447", "0.6712721", "0.6665118", "0.65435237", "0.64570767", "0.6428591", "0.63431275", "0.6270383", "0.62609154", "0.62468237", "0.6215457", "0.62048614", "0.62048614", "0.6191188", "0.61433023", "0.6038613", "0.6...
0.70706624
0
Removes a channel from all associated live queries
def close! live_queries = @volt_app.channel_live_queries[@channel] if live_queries live_queries.each do |live_query| live_query.remove_channel(@channel) end end @volt_app.channel_live_queries.delete(@channel) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_channel( channel )\n @channel_map.delete channel.local_id\n end", "def delete_facebook_channel(project_id, query_id)\n delete \"/projects/#{project_id}/facebookchannels/#{query_id}\"\n end", "def remove_channel(channel_name)\r\n @channels.delete(channel_name.downca...
[ "0.69945365", "0.68250734", "0.6788795", "0.67515117", "0.6709242", "0.6559873", "0.6499193", "0.6446304", "0.6427382", "0.6427382", "0.6407356", "0.6380801", "0.6374218", "0.6371486", "0.6262556", "0.62399656", "0.62184054", "0.61931026", "0.6152476", "0.6128578", "0.6127365...
0.7334368
0
Tracks that this channel will be notified from the live query.
def track_channel_in_live_query(live_query) channel_live_queries = @volt_app.channel_live_queries channel_live_queries[@channel] ||= [] channel_live_queries[@channel] << live_query end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def notify_observers(*args)\n return unless changed?\n\n unwrap(connection).exec \"NOTIFY #{channel}, #{args}\"\n\n changed false\n end", "def notify\n changed(true)\n notify_observers(self)\n end", "def notify_game_change\n connection.execute \"NOTIFY #{channel}, #{co...
[ "0.6165639", "0.60553515", "0.6018944", "0.5887589", "0.584748", "0.583743", "0.5718442", "0.5641111", "0.56367415", "0.5604656", "0.5567094", "0.5544769", "0.554235", "0.554235", "0.55167496", "0.54863924", "0.5463499", "0.54607975", "0.54401386", "0.5414997", "0.538091", ...
0.7171607
0
DELETE /company_businesses/1 DELETE /company_businesses/1.json
def destroy @company_business.destroy respond_to do |format| format.html { redirect_to company_businesses_url } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete\n render json: Company.delete(params[\"id\"])\n end", "def destroy\n @company.destroy\n respond_to do |format|\n format.json { head :no_content }\n end\n end", "def destroy\n @biz_company = BizCompany.find(params[:id])\n @biz_company.destroy\n\n respond_to do |format|\n ...
[ "0.7447605", "0.7153824", "0.7148692", "0.69967127", "0.6976809", "0.696085", "0.695971", "0.69507307", "0.69425535", "0.6911259", "0.69102603", "0.6869113", "0.6869113", "0.6869113", "0.6851295", "0.6851295", "0.6851295", "0.6851295", "0.6851295", "0.6851295", "0.6851295", ...
0.7238638
1
Grabs all of the yaml files found in /pages, and loads them as Page objects.
def find_all Dir["#{pages_dir}**/*.yml"].map {|f| new f } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pages\n plantuml_files.map { |static_file| page_from_static_file(static_file) }\n end", "def retrieve_pages(dir, dot_pages)\n site.pages.concat(PageReader.new(site, dir).read(dot_pages))\n end", "def retrieve_pages(dir, dot_pages); end", "def retrieve_pages(dir, entries_pages)\n ...
[ "0.7043972", "0.6895947", "0.68627375", "0.67453283", "0.6696323", "0.6664716", "0.66500103", "0.66384196", "0.65258586", "0.6386816", "0.6380106", "0.6305485", "0.63036996", "0.6290372", "0.6273399", "0.62681454", "0.626001", "0.6256252", "0.62232804", "0.6206196", "0.618298...
0.7678771
0
Returns a collection that represents the instances belonging to this Auto Scaling group. You can use this collection to further refine the instances you are interested in: group.ec2_instances.filter('availabilityzone', 'useast1a').each do |i| puts instance.id end
def ec2_instances instances = EC2::InstanceCollection.new(:config => config) instances.tagged('aws:autoscaling:groupName').tagged_values(name) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_instances(incl_stopped=false)\n \n instances = @ec2.describe_instances\n instances = instances.select { |x| x[:aws_groups].include? @group_name }\n \n if(instances.length == 0)\n raise CaTPAWS::EC2::Error::InstanceRetrieval, \"No instances found in this group\"\n ...
[ "0.7120154", "0.700922", "0.69817704", "0.6866905", "0.6765711", "0.6765711", "0.6621574", "0.65516955", "0.65302515", "0.6495344", "0.6442376", "0.6400759", "0.63791084", "0.6370542", "0.6361791", "0.63461304", "0.6186976", "0.61823565", "0.61771417", "0.6108272", "0.6090563...
0.723362
0
Suspends processes for this Auto Scaling group. suspend two processes by name auto_scaling_group.suspend_processes 'Launch', 'AZRebalance'
def suspend_processes *processes client_opts = {} client_opts[:auto_scaling_group_name] = name client_opts[:scaling_processes] = processes.flatten client.suspend_processes(client_opts) nil end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def suspend_processes(auto_scaling_group_name, options = {})\n if scaling_processes = options.delete('ScalingProcesses')\n options.merge!(AWS.indexed_param('ScalingProcesses.member.%d', [*scaling_processes]))\n end\n request({\n 'Action' => 'SuspendPro...
[ "0.87122166", "0.75313544", "0.7240648", "0.7142046", "0.6909668", "0.6502795", "0.6167026", "0.61294985", "0.6110244", "0.6031816", "0.6025132", "0.5929465", "0.5771859", "0.5760472", "0.5751843", "0.5751843", "0.57494515", "0.57237697", "0.566512", "0.56474036", "0.5591733"...
0.82164705
1
Resumes processes for this Auto Scaling group. resume two processes by name auto_scaling_group.suspend_processes 'Launch', 'AZRebalance'
def resume_processes *processes client_opts = {} client_opts[:auto_scaling_group_name] = name client_opts[:scaling_processes] = processes.flatten client.resume_processes(client_opts) nil end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def suspend_processes(auto_scaling_group_name, options = {})\n if scaling_processes = options.delete('ScalingProcesses')\n options.merge!(AWS.indexed_param('ScalingProcesses.member.%d', [*scaling_processes]))\n end\n request({\n 'Action' => 'SuspendPro...
[ "0.7782267", "0.72685194", "0.7184569", "0.7073122", "0.6832541", "0.6691391", "0.6535876", "0.6292499", "0.610317", "0.60867125", "0.59854287", "0.5759839", "0.57172036", "0.5659814", "0.55444354", "0.5537938", "0.552023", "0.54997283", "0.5472325", "0.5393976", "0.5385579",...
0.8200772
0
Resumes all processes for this Auto Scaling group.
def resume_all_processes resume_processes end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resume_processes *processes\n client_opts = {}\n client_opts[:auto_scaling_group_name] = name\n client_opts[:scaling_processes] = processes.flatten\n client.resume_processes(client_opts)\n nil\n end", "def resume_all_processes\n groups.each do |group|\n gro...
[ "0.76529264", "0.7550506", "0.69527906", "0.6786772", "0.65701437", "0.6296431", "0.6282769", "0.6035294", "0.6005665", "0.5958181", "0.59269327", "0.59145147", "0.5896866", "0.58966523", "0.5895775", "0.56975245", "0.56890625", "0.5688524", "0.56334895", "0.5604643", "0.5592...
0.75933415
1
Enables all metrics collection for the Auto Scaling group.
def enable_all_metrics_collection enable_metrics_collection end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def autoscaling_instances\n autoscaling_group.auto_scaling_instances\n end", "def autoscaling_instances\n autoscaling_group.auto_scaling_instances\n end", "def disable_all_metrics_collection\n disable_metrics_collection\n end", "def init_groups\n @@client.describe_auto_scaling_grou...
[ "0.63155496", "0.63155496", "0.63154894", "0.6124643", "0.58603215", "0.58343536", "0.58028674", "0.54997826", "0.53667444", "0.5340069", "0.5304826", "0.529975", "0.5293918", "0.52245384", "0.5170505", "0.51577646", "0.5143741", "0.5143741", "0.5143741", "0.513776", "0.50459...
0.8177668
0
Disables all metrics collection for the Auto Scaling group.
def disable_all_metrics_collection disable_metrics_collection end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def enable_all_metrics_collection\n enable_metrics_collection\n end", "def destroy\n info(\"Disabling Metricbeat module\")\n metricbeat(['modules','disable',@resource[:name]])\n end", "def remove_auto_scaling_group_properties\n properties = []\n properties << :AvailabilityZones...
[ "0.695738", "0.63754964", "0.61624557", "0.5633099", "0.5563048", "0.55241174", "0.5523639", "0.5467503", "0.5460256", "0.544506", "0.544506", "0.5440977", "0.54260665", "0.54249275", "0.5412217", "0.53986275", "0.5384166", "0.53650624", "0.5345516", "0.53441924", "0.5320656"...
0.80768263
0
Update one or more attributes on the Auto Scaling group.
def update options = {} group_opts = group_options(options) # tags must be updated using a separate request from the # other attributes, *sigh* if tags = group_opts.delete(:tags) tags.map(&:to_hash).each do |tag| tag[:resource_type] = 'auto-scaling-group' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_auto_scaling_group(auto_scaling_group_name, options = {})\n if availability_zones = options.delete('AvailabilityZones')\n options.merge!(AWS.indexed_param('AvailabilityZones.member.%d', [*availability_zones]))\n end\n request({\n 'Action' =>...
[ "0.74691784", "0.7061314", "0.63325363", "0.63305366", "0.62738395", "0.62424904", "0.6221506", "0.62184185", "0.6218149", "0.614807", "0.61462647", "0.6125194", "0.61241025", "0.6101883", "0.6095457", "0.6094295", "0.60861397", "0.6073944", "0.60582435", "0.6037467", "0.6036...
0.7522412
0
Removes all tags from this Auto Scaling group.
def delete_all_tags delete_tags(self.tags) nil end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset\n @tags.clear\n end", "def delete_tags\n @tags.delete_tags(@filename) unless @tags.nil?\n end", "def delete\n resource.delete_tags([self])\n nil\n end", "def destroy\n tag_ids.clone.each { |tag_id| destroy_tag(tag_id) }\n super\n end", "def purge_unused_t...
[ "0.6701327", "0.6678438", "0.6633569", "0.6585839", "0.6535254", "0.65154374", "0.63734984", "0.6359661", "0.63518476", "0.63514024", "0.62728924", "0.62476224", "0.62399614", "0.6209171", "0.6176984", "0.61742646", "0.60872024", "0.60832626", "0.60548097", "0.59624183", "0.5...
0.7555071
0
Deletes the Auto Scaling group. If you pass +:force+ as true then all the instances associated with this group will also be terminated.
def delete options = {} client_opts = {} client_opts[:force_delete] = options[:force] == true client_opts[:auto_scaling_group_name] = name client.delete_auto_scaling_group(client_opts) nil end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy(options = { :force => false })\n requires :id\n\n opts = {}\n opts.merge!({'ForceDelete' => true}) if options[:force]\n\n service.delete_auto_scaling_group(id, opts)\n end", "def delete_asg name\n auto_scaling = new_auto_scaling\n groups = auto_sca...
[ "0.832787", "0.6831928", "0.6784633", "0.6649838", "0.6626339", "0.6558953", "0.6490728", "0.63120383", "0.63002646", "0.6284608", "0.62440556", "0.62024176", "0.6190439", "0.6184121", "0.617778", "0.617778", "0.6126916", "0.6113461", "0.6077973", "0.6064484", "0.60430795", ...
0.81559837
1
GET /course_proposal_questions GET /course_proposal_questions.json
def index @course_proposal_questions = CourseProposalQuestion.all end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def questions\n self.class.get(\"/2.2/questions\", @options)\n end", "def index\n params.require(:course)\n @questions = Course.find(params[:course]).questions.select {|q| q.answered == false}\n\n render json: @questions\n end", "def index\n @questions = @course.questions.all\n end", "def i...
[ "0.71004456", "0.673227", "0.6493525", "0.6493525", "0.63337207", "0.6300776", "0.62354195", "0.62217057", "0.6143496", "0.61383724", "0.6121525", "0.6104301", "0.60591197", "0.60242075", "0.6000374", "0.5961999", "0.59573615", "0.59563017", "0.5940224", "0.59039485", "0.5895...
0.76668197
0
POST /course_proposal_questions POST /course_proposal_questions.json
def create @course_proposal_question = CourseProposalQuestion.new(course_proposal_question_params) respond_to do |format| if @course_proposal_question.save format.html { redirect_to @course_proposal_question, notice: 'Course proposal question was successfully created.' } format.json { ren...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def course_proposal_question_params\n params.require(:course_proposal_question).permit(:question, :help_text)\n end", "def index\n @course_proposal_questions = CourseProposalQuestion.all\n end", "def create\n @course = Course.find(params[:course_id])\n @question = @course.questions.build(para...
[ "0.71165013", "0.6742254", "0.6596467", "0.6493522", "0.63982767", "0.63767076", "0.6351012", "0.6346057", "0.63372546", "0.62813663", "0.62396675", "0.6190765", "0.6181965", "0.6173738", "0.6158913", "0.6128002", "0.611729", "0.611729", "0.6087749", "0.608717", "0.60533935",...
0.7436503
0
PATCH/PUT /course_proposal_questions/1 PATCH/PUT /course_proposal_questions/1.json
def update respond_to do |format| if @course_proposal_question.update(course_proposal_question_params) format.html { redirect_to @course_proposal_question, notice: 'Course proposal question was successfully updated.' } format.json { render :show, status: :ok, location: @course_proposal_questio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n @question = Question.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(params[:question])\n format.html { redirect_to @question.course, notice: 'Question was successfully updated.' }\n format.json { head :ok }\n else\n format.html { rend...
[ "0.687026", "0.6672324", "0.6656856", "0.6604427", "0.65882283", "0.65583193", "0.65362805", "0.65351844", "0.6527841", "0.6519026", "0.6497865", "0.6496542", "0.6494913", "0.6458557", "0.64584494", "0.6455926", "0.6454532", "0.64542645", "0.64514244", "0.6447249", "0.6436651...
0.7374703
0
DELETE /course_proposal_questions/1 DELETE /course_proposal_questions/1.json
def destroy @course_proposal_question.destroy respond_to do |format| format.html { redirect_to course_proposal_questions_url, notice: 'Course proposal question was successfully destroyed.' } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @examquestion.destroy\n respond_to do |format|\n format.html { redirect_to examquestions_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @test_question = TestQuestion.find(params[:id])\n @test_question.destroy\n\n respond_to do |format|\n form...
[ "0.74135524", "0.7341972", "0.7326205", "0.73218465", "0.72966427", "0.72838473", "0.72794825", "0.7266921", "0.7263273", "0.7254235", "0.7248843", "0.7248843", "0.7248843", "0.7248843", "0.7248843", "0.7248843", "0.72465396", "0.72347593", "0.7213497", "0.7212765", "0.721274...
0.80670506
0
Set a default Chef environment name for our chef_search calls.
def chef_env(env) chef_scope :chef_environment, env end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def default_environment=(env); end", "def test_chef_environment\n # If no environment is specified chef needs to use \"_default\" and attribute from cookbook\n actual = cook_environment(run_list: [\"recipe[environment_cookbook]\"])\n assert_equal \"_default/untouched\", actual\n\n # If one is specifi...
[ "0.64914715", "0.6276075", "0.62203985", "0.6024242", "0.60106164", "0.60106164", "0.58833575", "0.58743966", "0.57976645", "0.5753341", "0.5717913", "0.56838584", "0.5645325", "0.5645325", "0.55672544", "0.55611134", "0.5559538", "0.5537936", "0.5532204", "0.5529475", "0.550...
0.6390724
1
Returns the first packet in +dump+
def packet dump Capp.offline(dump).loop.first end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_first\r\n if @head \r\n return @head.data\r\n else \r\n return nil\r\n end\r\n end", "def get_first\n return nil if !@head\n return @head.data\n end", "def get_first\n return nil if @head.nil?\n\n return @head.data\n end", "def get_first\n return nil ...
[ "0.59918964", "0.5966294", "0.59548736", "0.59548736", "0.5946803", "0.5924725", "0.5924533", "0.59197056", "0.59157085", "0.5864313", "0.58566505", "0.5840855", "0.58146584", "0.5809229", "0.5809229", "0.579712", "0.57777494", "0.5727662", "0.5702424", "0.56881046", "0.56497...
0.70979226
0
Reads /proc/mounts and finds all tmpfs. It returns a Hash But if the info isn't available or /proc/mounts is not readable, it will return an empty Hash.
def tmpfs ret = {} mounts.each { |x| ret.merge!({x.split[1] => x}) if x.start_with?('tmpfs '.freeze) } ret end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_mounts\n mount_hash = {}\n mounts = File.open(\"/etc/mtab\", \"r\").read.split(\"\\n\").map{|l| l.split(/\\s+/)}\n mounts.each{|m| mount_hash[m[1]] = m[0] unless %w[devpts udev sysfs tmpfs none proc].include?(m[0])}\n mount_hash\nend", "def mountpoints\n mtab = IO.readlines '/proc/mounts'\n ...
[ "0.7868856", "0.705546", "0.6727915", "0.66328394", "0.64825094", "0.6407223", "0.63958997", "0.635185", "0.6327745", "0.615456", "0.6116929", "0.6062659", "0.60454106", "0.5913282", "0.58284503", "0.5810452", "0.57494676", "0.5737623", "0.5724618", "0.5695389", "0.5632698", ...
0.7696831
1
:callseq: scale_bilinear(width, height) Scales the image using the bilinear interpolation method. Bilinear interpolation calculates the color values in the resulting image by looking at the four nearest pixels for each pixel in the resulting image. This gives a more accurate representation than nearestneighbor interpol...
def scale_bilinear(*args) @source = BilinearScaler.new(@source, *args) self end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def scale(width: @image.width, height: @image.height,\n algorithm: 'bilineal') # bilinear, nearest_neighbor\n if algorithm == 'nearest_neighbor'\n Image.new(@image.resample_nearest_neighbor(width, height), path)\n else\n Image.new(@image.resample_bilinear(width, height), path)\...
[ "0.74876934", "0.6929598", "0.62904245", "0.62255514", "0.6087487", "0.58767915", "0.58165014", "0.5636177", "0.5613749", "0.56060153", "0.5601863", "0.5581311", "0.5555667", "0.5544393", "0.55158347", "0.5513507", "0.5510966", "0.54933", "0.54405916", "0.54188484", "0.535726...
0.79472375
0
:callseq: scale_nearest(width, height) Scales the image using the nearestneighbor interpolation method. Nearestneighbor interpolation selects the value of the nearest pixel when calculating colors in the scaled image. == Example i = Axon::JPEG('test.jpg') i.scale_nearest(50, 75) i.width => 50 i.height => 75
def scale_nearest(*args) @source = NearestNeighborScaler.new(@source, *args) self end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def scale(width: @image.width, height: @image.height,\n algorithm: 'bilineal') # bilinear, nearest_neighbor\n if algorithm == 'nearest_neighbor'\n Image.new(@image.resample_nearest_neighbor(width, height), path)\n else\n Image.new(@image.resample_bilinear(width, height), path)\...
[ "0.7143473", "0.5917895", "0.5883907", "0.5648101", "0.5527938", "0.549518", "0.54871935", "0.5457946", "0.54511553", "0.5260264", "0.5172822", "0.5139375", "0.50794816", "0.5040413", "0.5021077", "0.50138474", "0.4997212", "0.49891388", "0.49704787", "0.49383867", "0.4881466...
0.7812567
0
:callseq: jpeg_file(path [, options]) Writes the image to a new file at +path+ as compressed JPEG data. Returns the number of bytes written. If the image has an alpha channel it will be stripped. See Axonjpeg for a description of +options+. == Example Axon.png_file("image.png") do |image| image.jpeg_file("image.jpg") s...
def jpeg_file(path, *args) File.open(path, 'wb') do |f| jpeg(f, *args) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jpeg(*args)\n case @source.components\n when 2,4 then @source = AlphaStripper.new(@source)\n end\n JPEG.write(@source, *args)\n end", "def to_jpeg(path, options = {})\n return raise Exceptions::InvalidFileFormatError unless valid_output_format?(path, 'jpeg')\n screenshot(path...
[ "0.62616533", "0.6066551", "0.59234285", "0.5789741", "0.57895213", "0.5787651", "0.5714007", "0.5708735", "0.56916076", "0.56242615", "0.560582", "0.55802304", "0.5488504", "0.5437542", "0.54049474", "0.53955424", "0.5385785", "0.5368424", "0.5361975", "0.5354941", "0.534731...
0.7635153
0
:callseq: png_file(path) Writes the image to a new file at +path+ as compressed PNG data. Returns the number of bytes written. == Example Axon.jpeg_file("image.jpg") do |image| image.png_file("image.png") saves the image to "image.jpeg" end
def png_file(path, *args) File.open(path, 'wb') do |f| png(f, *args) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jpeg_file(path, *args)\n File.open(path, 'wb') do |f|\n jpeg(f, *args)\n end\n end", "def png(file)\n file.write PNG_HEADER\n\n # Make sure IEND is actually at the end (Ruby 1.9).\n iend = @chunks.delete 'IEND'\n @chunks['IEND'] = iend\n\n @chunks.each do |type, d...
[ "0.6506414", "0.63885915", "0.60311306", "0.5949819", "0.5875201", "0.5871904", "0.57511646", "0.572426", "0.57190067", "0.5678481", "0.5675133", "0.56727326", "0.5557379", "0.5436052", "0.5430585", "0.5412409", "0.5401728", "0.5397639", "0.539142", "0.53458035", "0.53252643"...
0.6734233
0
Changes font name of cell
def change_font_name(new_font_name = 'Verdana') validate_worksheet font = get_cell_font.dup font.set_name(new_font_name) update_font_references(font) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def change_column_font_name(col=0, font_name='Verdana')\n # Get style object\n xf_id = xf_id(get_col_style(col))\n # Get copy of font object with modified name\n font = deep_copy(@workbook.fonts[xf_id[:fontId].to_s][:font])\n font[:name][:attributes][:val] = font_name.to_s\n # Update font and xf ...
[ "0.81314415", "0.7896164", "0.7712866", "0.77062994", "0.72959864", "0.7255562", "0.71670526", "0.7110613", "0.71081805", "0.6693014", "0.6693014", "0.66816", "0.66816", "0.66166097", "0.6615892", "0.65713406", "0.65297943", "0.6436224", "0.6427392", "0.6379348", "0.6362969",...
0.8321192
1
Changes font size of cell
def change_font_size(font_size = 10) validate_worksheet raise 'Argument must be a number' unless font_size.is_a?(Integer) || font_size.is_a?(Float) font = get_cell_font.dup font.set_size(font_size) update_font_references(font) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def change_column_font_size(col=0, font_size=10)\n # Get style object\n xf_id = xf_id(get_col_style(col))\n # Get copy of font object with modified size\n font = deep_copy(@workbook.fonts[xf_id[:fontId].to_s][:font])\n font[:sz][:attributes][:val] = font_size\n # Update font and xf array\n cha...
[ "0.77199495", "0.7712393", "0.7611653", "0.71374416", "0.6978516", "0.692586", "0.6728187", "0.66601753", "0.66556317", "0.6619674", "0.6533546", "0.6522609", "0.6501379", "0.64703393", "0.64372236", "0.64372236", "0.6417534", "0.6395196", "0.63928103", "0.6318056", "0.626153...
0.7972899
1
Changes font color of cell
def change_font_color(font_color = '000000') validate_worksheet Color.validate_color(font_color) font = get_cell_font.dup font.set_rgb_color(font_color) update_font_references(font) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def change_column_font_color(col=0, font_color='000000')\n Color.validate_color(font_color)\n # Get style object\n xf_id = xf_id(get_col_style(col))\n # Get copy of font object with modified color\n font = deep_copy(@workbook.fonts[xf_id[:fontId].to_s][:font])\n font = modify_font_color(font, fon...
[ "0.7460085", "0.72489184", "0.72067857", "0.7135468", "0.71241385", "0.7105533", "0.70734954", "0.70734954", "0.7011126", "0.70002514", "0.68595064", "0.68219143", "0.68219143", "0.68104655", "0.6794587", "0.67466515", "0.67338556", "0.66503805", "0.66452426", "0.64654624", "...
0.769588
1
Changes font italics settings of cell
def change_font_italics(italicized = false) validate_worksheet font = get_cell_font.dup font.set_italic(italicized) update_font_references(font) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def change_font_italics(italicized=false)\n validate_worksheet\n # Get copy of font object with modified italics settings\n font = deep_copy(workbook.fonts[font_id().to_s][:font])\n font = modify_font_italics(font, italicized)\n # Update font and xf array\n change_font(font)\n end"...
[ "0.72236353", "0.678297", "0.6767767", "0.6639636", "0.6613759", "0.6494832", "0.6494832", "0.64336115", "0.6389968", "0.63753814", "0.63357896", "0.6335046", "0.63281983", "0.63196945", "0.62855744", "0.62762696", "0.62762696", "0.6264959", "0.6257875", "0.6174606", "0.61452...
0.78815913
1
Changes font bold settings of cell
def change_font_bold(bolded = false) validate_worksheet font = get_cell_font.dup font.set_bold(bolded) update_font_references(font) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bold_cell(options = {}, &block)\n cell({ font_style: :bold }.merge(options || {}), &block)\n end", "def change_font_bold(bolded=false)\n validate_worksheet\n # Get copy of font object with modified bold settings\n font = deep_copy(workbook.fonts[font_id().to_s][:font])\n font = mo...
[ "0.8035638", "0.7800186", "0.73778224", "0.7356081", "0.7309667", "0.70927423", "0.6959655", "0.69148815", "0.6847863", "0.6847863", "0.67769545", "0.67683005", "0.674681", "0.674681", "0.66853034", "0.66853034", "0.66616106", "0.66564745", "0.6619126", "0.6587305", "0.657956...
0.8302406
1
Changes font underline settings of cell
def change_font_underline(underlined = false) validate_worksheet font = get_cell_font.dup font.set_underline(underlined) update_font_references(font) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def change_font_underline(underlined=false)\n validate_worksheet\n # Get copy of font object with modified underline settings\n font = deep_copy(workbook.fonts[font_id().to_s][:font])\n font = modify_font_underline(font, underlined)\n # Update font and xf array\n change_font(font)\n ...
[ "0.7695589", "0.7397015", "0.7152001", "0.6990113", "0.66901463", "0.66901463", "0.63874716", "0.637665", "0.6372925", "0.6372925", "0.63182336", "0.6254913", "0.61407024", "0.6133203", "0.6093899", "0.60723346", "0.60723346", "0.59276927", "0.58676517", "0.5845751", "0.58457...
0.826207
1
Endpoint /images exists on both v1 and v2 API The attribute 'visibility' is used to detect if the call has been made on v1 or v2 In case of v2 we have all the needed information, but in case of v1 we don't and we have to call /images/detail to get full details
def get_all_images(env) images_json = get(env, "#{@session.endpoints[:image]}/images") images = JSON.parse(images_json)['images'] return images if images.empty? is_v1 = false unless images[0].key? 'visibility' is_v1 = true images_json = get(env, "#{@session....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def images() \n uri = URI.parse(\"http://\" + @location.host + \":9292/v2/images\")\n return get_request(uri, @token)\n end", "def marketplace_image_my_images_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: VnfsApi.marketplace_i...
[ "0.69040823", "0.679674", "0.6651114", "0.66303474", "0.66300285", "0.66095346", "0.6472469", "0.63388175", "0.6218389", "0.61983496", "0.6182718", "0.6181039", "0.6158568", "0.61570495", "0.6153924", "0.61496735", "0.61372", "0.6112597", "0.61104816", "0.6085985", "0.6065200...
0.724104
0
create a new method called encrypt_file
def encrypt_file(filename) #open the file by passing it the name and .. input = File.open(filename, 'r') #this is a string now so contents = input.read encrypted_contents = encrypt_string(contents) input.close output = File.open(filename + '.encrypted', 'w') output.write(encrypte...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _encrypt\n cryptor_files(@encrypting)\n end", "def encrypt; end", "def encrypt_file(path, password = nil)\n salt = random_bytes(@salt_len)\n iv = random_bytes(@salt_len)\n aes_key, mac_key = keys(salt, password)\n\n cipher = cipher(aes_key, iv)\n hmac = OpenSSL::HMAC.new(mac_key, OpenSSL...
[ "0.8163636", "0.7333509", "0.7324852", "0.711056", "0.71002173", "0.7091229", "0.69009787", "0.6887336", "0.6855868", "0.6695875", "0.6693692", "0.6673215", "0.6595401", "0.6578915", "0.6559419", "0.654343", "0.63634336", "0.6324155", "0.6296088", "0.62679666", "0.62218285", ...
0.78390193
1
GET /idea_events/1 GET /idea_events/1.json
def show @idea_event = IdeaEvent.find(params[:id]) respond_to do |format| format.html # show.html.erb format.json { render json: @idea_event } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show\n event_id = params[:id]\n if event_id.present?\n @event = Com::Nbos::Events::Event.active_events.where(id: event_id, tenant_id: @user.tenant_id)\n if @event.present?\n render :json => @event\n else\n render :json => {messageCode: \"event.notfound\", message: \"Event Not...
[ "0.7197953", "0.7134962", "0.71243465", "0.7120562", "0.7075237", "0.70402384", "0.7034575", "0.6994844", "0.6988892", "0.69875777", "0.69693494", "0.69682765", "0.6964784", "0.6964719", "0.69442165", "0.69442165", "0.6905342", "0.68974143", "0.68942356", "0.6893209", "0.6886...
0.76614374
0
GET /idea_events/new GET /idea_events/new.json
def new @idea_event = IdeaEvent.new respond_to do |format| format.html # new.html.erb format.json { render json: @idea_event } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @event = Event.new\n\n @idea = Idea.find(params[:idea_id])\n \n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @event }\n end\n end", "def new\n @create_event = CreateEvent.new\n\n respond_to do |format|\n format.html # new.html.erb...
[ "0.8198065", "0.7807702", "0.7785182", "0.77731454", "0.7770926", "0.7770926", "0.7770926", "0.7770926", "0.7770926", "0.7770926", "0.7770926", "0.7770926", "0.7770926", "0.7770926", "0.7770926", "0.7770926", "0.7770926", "0.7770926", "0.7770926", "0.7770926", "0.7770926", ...
0.8179622
1
POST /idea_events POST /idea_events.json
def create @idea_event = IdeaEvent.new(params[:idea_event]) respond_to do |format| if @idea_event.save format.html { redirect_to @idea_event, notice: 'Idea event was successfully created.' } format.json { render json: @idea_event, status: :created, location: @idea_event } else ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n event = Event.new(event_params)\n event.save!\n render json: event\n end", "def create\n @event = Event.new(params[:event])\n\n if @event.save\n render json: @event, status: :created, location: @event\n else\n render json: @event.errors, status: :unprocessable_entity\n ...
[ "0.71049494", "0.70508987", "0.7032693", "0.70037943", "0.69367915", "0.6895117", "0.6892014", "0.6888186", "0.6881555", "0.68300587", "0.68238586", "0.6814062", "0.6814062", "0.6804513", "0.6785903", "0.67474085", "0.6739564", "0.67283446", "0.67163396", "0.6708329", "0.6707...
0.75621074
0
PUT /idea_events/1 PUT /idea_events/1.json
def update @idea_event = IdeaEvent.find(params[:id]) respond_to do |format| if @idea_event.update_attributes(params[:idea_event]) format.html { redirect_to @idea_event, notice: 'Idea event was successfully updated.' } format.json { head :ok } else format.html { render action...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n if @event.update(event_params)\n render json: @event, status: 201\n else\n render json: { message: \"Error. Error. Please try again.\"}, status: 400\n end\n end", "def update\n respond_to do |format|\n if @event.update(event_params)\n format.json { head :no_content...
[ "0.717151", "0.7011583", "0.69779676", "0.6961609", "0.6927854", "0.6927854", "0.6925483", "0.6925483", "0.6918708", "0.6892866", "0.688861", "0.6880861", "0.68747026", "0.68413895", "0.6805405", "0.6805405", "0.67964655", "0.67947567", "0.67864186", "0.6774603", "0.67690945"...
0.7532498
0
DELETE /idea_events/1 DELETE /idea_events/1.json
def destroy @idea_event = IdeaEvent.find(params[:id]) @idea_event.destroy respond_to do |format| format.html { redirect_to idea_events_url } format.json { head :ok } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @event.destroy\n respond_to do |format|\n format.json { head :no_content }\n end\n end", "def destroy\n @event.destroy\n respond_to do |format|\n format.json { head :no_content }\n end\n end", "def destroy\n @event.destroy\n respond_to do |format|\n format...
[ "0.7356678", "0.7356678", "0.7356678", "0.72667587", "0.7262428", "0.725565", "0.72413594", "0.72362095", "0.7225875", "0.7220038", "0.7208296", "0.7172826", "0.71633935", "0.7155159", "0.71438223", "0.71438223", "0.71438223", "0.71438223", "0.71438223", "0.71438223", "0.7143...
0.7519186
0
Convert the freebase ID for a type into an API endpoint ID
def to_endpoint id t=id.split('/') domain = t[1..-2].join('_') type = t[-1] "freebase_tsv_#{domain}__#{type}" end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def input_id_from_type(type); end", "def input_id_from_type(type)\n id = input_name_from_type(type).gsub(/([\\[(])|(\\]\\[)/, \"_\").gsub(/[\\])]/, \"\")\n id = @options[:namespace] + \"_\" + id if @options[:namespace]\n\n id\n end", "def to_global_id(type_name, id)\n B...
[ "0.6792407", "0.6662417", "0.6573084", "0.6489617", "0.6410082", "0.59508866", "0.59441143", "0.5940383", "0.5859375", "0.5813677", "0.57950646", "0.5763398", "0.573497", "0.57264423", "0.57264423", "0.57245207", "0.5715948", "0.5667675", "0.56559783", "0.5621114", "0.5607873...
0.7049781
0
downloads csv of all grant data to users computer
def get_grant_data if GrantsData.exists? @grant_data = GrantsData.all_csv respond_to do |format| format.html format.csv do send_data @grant_data, filename: "all_grants_data_#{Time.now.to_s(:db)}.csv" end end else flash[:notice] = 'Grant Data Table Empty'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def download_csv\n case current_user.role.name\n when 'Edutor Admin'\n usages = Usage\n when 'Institute Admin'\n usages = current_user.usages\n when 'Center Representative'\n usages = current_user.usages\n when 'Teacher'\n class_contents = current_user.class_conte...
[ "0.7116747", "0.692551", "0.674647", "0.6619299", "0.65484095", "0.6452047", "0.63973594", "0.63890463", "0.6355495", "0.6330534", "0.63282967", "0.63040084", "0.62965393", "0.6282694", "0.62816906", "0.6239026", "0.6235171", "0.6225189", "0.6220521", "0.6188535", "0.6173388"...
0.70627373
1
passes all Users research_individual page
def research_individual @users = Array.new() User.all.each do |u| if !u.admin? @users.push(u) end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def research_index\n @houdd_user = HouddUser.find(params[:user_id])\n @researches = HouddUser.find(params[:user_id]).researches\n\n respond_to do |format|\n format.html # research_index.html.erb\n end\n end", "def search_results\n @individual = Individual.by_uid( params[:'names-search-uid'] ...
[ "0.7037881", "0.6689106", "0.66761935", "0.6341753", "0.629902", "0.6236115", "0.62332314", "0.61650485", "0.612081", "0.61120796", "0.60854584", "0.60741794", "0.60646766", "0.603476", "0.6031838", "0.60244644", "0.5999334", "0.59984946", "0.5975857", "0.59227735", "0.591880...
0.66935796
1
passes all Users grant_individual page
def grants_individual @users = Array.new() User.all.each do |u| if !u.admin? @users.push(u) end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @users = User.all\n @page_title = 'Управление топлива и транспорта'\n @authorized_user = User.find(session[:user_id])\n\n respond_to do |format|\n format.html {redirect_to(controller: 'users', action: 'home') if @authorized_user.grants & 256 == 0}\n format.json { render json: @use...
[ "0.6506483", "0.6187792", "0.60953796", "0.60393095", "0.6032976", "0.5996649", "0.599077", "0.59881985", "0.595903", "0.5936245", "0.59281325", "0.5910543", "0.58918375", "0.58573866", "0.5854398", "0.5803139", "0.5795631", "0.5794108", "0.5765949", "0.5730097", "0.571552", ...
0.6908038
0
checks wether a specific client exists
def exists?(username) perform_request({:action => 'client-checkexists', :username => username}) statusmsg.match /client exists/i end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def exists?(username)\n perform_request({:action => 'client-checkexists', :username => username})\n end", "def client_exists(client_id, &callback)\n callback.call(@connected.containsKey(client_id))\n end", "def client?\n !!@client\n end", "def client?\n !!@client\n end", "def re...
[ "0.7496921", "0.7363739", "0.7176204", "0.7176204", "0.7113123", "0.70755416", "0.70607466", "0.7052736", "0.70427513", "0.6930154", "0.69246525", "0.69246525", "0.69246525", "0.69246525", "0.6894699", "0.68587893", "0.6844123", "0.6816736", "0.6816736", "0.6800355", "0.67597...
0.80413896
0
Gets the conversationId property value. Unique ID of the conversation. Readonly.
def conversation_id return @conversation_id end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def conversation_id=(value)\n @conversation_id = value\n end", "def conversation_id=(value)\n @conversation_id = value\n end", "def conversation_thread_id\n return @conversation_thread_id\n end", "def chat_id\n retur...
[ "0.804745", "0.804745", "0.7515663", "0.6822819", "0.6822819", "0.6656735", "0.66101885", "0.6587035", "0.6587035", "0.6559587", "0.6471356", "0.64310956", "0.6400675", "0.62336504", "0.6226752", "0.6222848", "0.6222848", "0.6192165", "0.61167383", "0.60516506", "0.6032556", ...
0.86132896
1
Sets the conversationId property value. Unique ID of the conversation. Readonly.
def conversation_id=(value) @conversation_id = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_conversation\n @conversation = Conversation.find(params[:id])\n end", "def set_conversation\n @conversation = Conversation.find(params[:id])\n end", "def set_conversation\n @conversation = Conversation.find(params[:id])\n end", "def set_conversation\n @conversation = ...
[ "0.6950916", "0.69257045", "0.69257045", "0.69257045", "0.69257045", "0.69257045", "0.69257045", "0.69257045", "0.69257045", "0.69257045", "0.69257045", "0.69257045", "0.69257045", "0.69257045", "0.687652", "0.68558764", "0.6766833", "0.6637297", "0.6637297", "0.6637297", "0....
0.8422973
1
Gets the conversationThreadId property value. Unique ID of the conversation thread. Readonly.
def conversation_thread_id return @conversation_thread_id end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def conversation_thread_id=(value)\n @conversation_thread_id = value\n end", "def conversation_id\n return @conversation_id\n end", "def conversation_id\n return @conversation_id\n end", "def thread_id\n return @thre...
[ "0.7625181", "0.74000466", "0.74000466", "0.72015804", "0.6623548", "0.63250613", "0.63250613", "0.6158092", "0.6158092", "0.61338323", "0.60831684", "0.5995234", "0.59119195", "0.5764345", "0.5680798", "0.565587", "0.5647614", "0.5541468", "0.5510627", "0.5510627", "0.543149...
0.8546284
0
Sets the conversationThreadId property value. Unique ID of the conversation thread. Readonly.
def conversation_thread_id=(value) @conversation_thread_id = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def conversation_id=(value)\n @conversation_id = value\n end", "def conversation_id=(value)\n @conversation_id = value\n end", "def conversation_thread_id\n return @conversation_thread_id\n end", "def thread_id=(value)\n ...
[ "0.68099767", "0.68099767", "0.6674897", "0.65233916", "0.5958593", "0.5958593", "0.5958593", "0.5958593", "0.5958593", "0.5958593", "0.5958593", "0.5958593", "0.5958593", "0.5958593", "0.5958593", "0.59405696", "0.59405696", "0.59405696", "0.59405696", "0.59405696", "0.59405...
0.8150457
0
Sets the from property value. The from property
def from=(value) @from = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def from(val = nil)\n self.from = val if val\n @from\n end", "def from(value)\n @from = value\n @options[:from] = value\n self\n end", "def from=(val)\n @from = val ? Number.new(val, vanity: true) : nil\n end", "def from=(from)\n write_attr :from, from\n end", ...
[ "0.74252534", "0.734053", "0.7271644", "0.7140039", "0.7095981", "0.7080337", "0.68769306", "0.6429729", "0.63151515", "0.6152368", "0.60757756", "0.6034785", "0.585997", "0.5854877", "0.576354", "0.57218987", "0.57218987", "0.57218987", "0.57218987", "0.57218987", "0.5663588...
0.7613539
1
Gets the inReplyTo property value. Readonly. Supports $expand.
def in_reply_to return @in_reply_to end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def in_reply_to\n headers['In-Reply-To']\n end", "def reply_to\n address_list_fetch('reply-to')\n end", "def in_reply_to=(value)\n @in_reply_to = value\n end", "def get_reply_to\n @reply_to\n end", "def set_InReplyTo(value)\n set_input(\"InReplyTo\", value...
[ "0.69207305", "0.6692837", "0.6652508", "0.6604852", "0.6496073", "0.63015074", "0.62397194", "0.6159394", "0.60975665", "0.59925383", "0.5813927", "0.5728539", "0.56737214", "0.560972", "0.55890465", "0.55890465", "0.55776894", "0.5448267", "0.5428158", "0.539586", "0.537027...
0.72811353
0
Sets the inReplyTo property value. Readonly. Supports $expand.
def in_reply_to=(value) @in_reply_to = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_InReplyTo(value)\n set_input(\"InReplyTo\", value)\n end", "def reply_to=(value)\n @reply_to = value\n end", "def reply_to=( val )\n header[:reply_to] = val\n end", "def reply_to=(address)\n address = Qpid::Messaging::Address.new \"#{address}\"...
[ "0.8516198", "0.70250094", "0.6587329", "0.6471791", "0.6452012", "0.6220507", "0.6202828", "0.6160427", "0.61155653", "0.60962045", "0.60667175", "0.5961754", "0.5927536", "0.586672", "0.58318466", "0.582511", "0.5732018", "0.5682525", "0.56577617", "0.56074256", "0.5570272"...
0.8018943
1
Gets the newParticipants property value. Conversation participants that were added to the thread as part of this post.
def new_participants return @new_participants end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new_participants=(value)\n @new_participants = value\n end", "def participants_added # :nodoc:\n @properties[ADDED].map { |id| @context.users[id] }\n end", "def getParticipants\r\n\t\t\t\t\treturn @participants\r\n\t\t\t\tend", "def participants=(new_participants...
[ "0.7143321", "0.6168938", "0.60920346", "0.6035905", "0.5810662", "0.5810662", "0.5790408", "0.57590985", "0.57590985", "0.5481565", "0.5471669", "0.53882396", "0.5254906", "0.5252629", "0.5200686", "0.5183107", "0.5143379", "0.50829077", "0.5081971", "0.50524557", "0.5052455...
0.7551031
0
Sets the newParticipants property value. Conversation participants that were added to the thread as part of this post.
def new_participants=(value) @new_participants = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def participants=(new_participants)\n @participants = new_participants\n self.participant_ids = new_participants.collect(&:id)\n end", "def setParticipants(participants)\r\n\t\t\t\t\t@participants = participants\r\n\t\t\t\tend", "def participants=(value)\n @participants = value\n ...
[ "0.7037466", "0.6376834", "0.6308306", "0.6308306", "0.6022701", "0.5907998", "0.57874614", "0.55644", "0.534605", "0.521189", "0.5210973", "0.51620924", "0.51449126", "0.50891286", "0.5083837", "0.5056697", "0.5046132", "0.5006741", "0.5006741", "0.5006741", "0.5006741", "...
0.7493142
0
Gets the receivedDateTime property value. Specifies when the post was received. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 20140101T00:00:00Z
def received_date_time return @received_date_time end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def received_at\n params['_raw_orderCreatedDatetime']\n end", "def message_received_date_time\n return @message_received_date_time\n end", "def received_at\n request_datetime\n end", "def received_at\n Time.parse(params['created']) if params[...
[ "0.7229156", "0.69821215", "0.6949472", "0.68040156", "0.6638946", "0.6619124", "0.651624", "0.646386", "0.6388152", "0.6388152", "0.6385655", "0.6303818", "0.6279794", "0.6250664", "0.62407196", "0.6234332", "0.620122", "0.6158274", "0.61064506", "0.607306", "0.60000485", ...
0.74083483
1
Sets the receivedDateTime property value. Specifies when the post was received. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 20140101T00:00:00Z
def received_date_time=(value) @received_date_time = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def message_received_date_time=(value)\n @message_received_date_time = value\n end", "def received_at\n params['_raw_orderCreatedDatetime']\n end", "def received_at\n Time.parse(params['created']) if params['created']\n end", "def received_date_time\n...
[ "0.6847314", "0.6300801", "0.6121688", "0.6041164", "0.6041164", "0.6032692", "0.5979375", "0.59409666", "0.5921429", "0.5868537", "0.58281744", "0.5805354", "0.5766811", "0.5714113", "0.5668339", "0.5626505", "0.559062", "0.5590175", "0.55610156", "0.5471812", "0.5467572", ...
0.71871555
1
Config pagination header manually
def set_pagination_header(name, options = {}) scope = instance_variable_get("@#{name}") request_params = request.query_parameters url_without_params = request.original_url.slice(0..(request.original_url.index("?")-1)) unless request_params.empty? url_without_params ||= request.original_url page = {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_pagination_header(resource,resource_name)\n #print current page\n headers[\"x-page\"] = page\n #print records per page\n headers[\"x-per-page\"] = per_page\n #print total records\n headers[\"x-total\"] = resource.total_count\n #print next page url\n headers[\"next_page\"] = eval \"a...
[ "0.754653", "0.74930876", "0.6708229", "0.6503024", "0.6232348", "0.6212366", "0.62021303", "0.6172817", "0.6148266", "0.61431813", "0.61431813", "0.6095978", "0.6084311", "0.6083161", "0.59970886", "0.5986855", "0.59765905", "0.5972433", "0.5948929", "0.5921677", "0.5903181"...
0.7530348
1
GET /character/geo_positions/1 GET /character/geo_positions/1.json
def show @character_geo_position = Character::GeoPosition.find(params[:id]) respond_to do |format| format.html # show.html.erb format.json { render json: @character_geo_position } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @character_geo_position = Character::GeoPosition.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @character_geo_position }\n end\n end", "def index\n @positions = Position.all.order :id\n @geojson = Hash.new\n\n @points = Position.ge...
[ "0.65410924", "0.63755864", "0.61864567", "0.60786736", "0.6040894", "0.60065997", "0.59626114", "0.5901784", "0.5868109", "0.5863196", "0.576979", "0.57410073", "0.5722417", "0.5721037", "0.5698015", "0.56925607", "0.5685136", "0.568214", "0.568214", "0.568214", "0.568214", ...
0.7293571
0
GET /character/geo_positions/new GET /character/geo_positions/new.json
def new @character_geo_position = Character::GeoPosition.new respond_to do |format| format.html # new.html.erb format.json { render json: @character_geo_position } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @character_geo_position = Character::GeoPosition.new(params[:character_geo_position])\n\n respond_to do |format|\n if @character_geo_position.save\n format.html { redirect_to @character_geo_position, notice: 'Geo position was successfully created.' }\n format.json { render jso...
[ "0.7227565", "0.707564", "0.707564", "0.707564", "0.68282133", "0.66331935", "0.6611183", "0.65948105", "0.6525071", "0.64507747", "0.6448005", "0.63941914", "0.6375476", "0.63684785", "0.6366236", "0.63476855", "0.6338557", "0.6329629", "0.62621737", "0.6220882", "0.6209307"...
0.76666987
0
POST /character/geo_positions POST /character/geo_positions.json
def create @character_geo_position = Character::GeoPosition.new(params[:character_geo_position]) respond_to do |format| if @character_geo_position.save format.html { redirect_to @character_geo_position, notice: 'Geo position was successfully created.' } format.json { render json: @charact...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def correct_geo_coords\n coords = params.seek :geo, :geojson, :geometry, :coordinates\n if coords\n array = GeosHelper.geo_coords_to_array(coords)\n params[:geo][:geojson][:geometry][:coordinates] = array\n end\n end", "def map_coordinates\n loc = find_or_create_geolocation(params)\n ...
[ "0.60359406", "0.602981", "0.5953773", "0.5920963", "0.5917561", "0.5895335", "0.5880196", "0.5863509", "0.5862524", "0.5862524", "0.5851815", "0.58228683", "0.581096", "0.5748399", "0.57393765", "0.573566", "0.5720172", "0.5692822", "0.5682632", "0.56799394", "0.5667723", ...
0.73566043
0
PUT /character/geo_positions/1 PUT /character/geo_positions/1.json
def update @character_geo_position = Character::GeoPosition.find(params[:id]) respond_to do |format| if @character_geo_position.update_attributes(params[:character_geo_position]) format.html { redirect_to @character_geo_position, notice: 'Geo position was successfully updated.' } format.j...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @character_geo_position = Character::GeoPosition.new(params[:character_geo_position])\n\n respond_to do |format|\n if @character_geo_position.save\n format.html { redirect_to @character_geo_position, notice: 'Geo position was successfully created.' }\n format.json { render jso...
[ "0.6205665", "0.6190675", "0.6161236", "0.600425", "0.5979568", "0.59693027", "0.59693027", "0.59693027", "0.5958358", "0.5930068", "0.59215546", "0.5919159", "0.5916072", "0.5859566", "0.58403295", "0.5826592", "0.5757375", "0.575664", "0.5751904", "0.56965977", "0.56790584"...
0.72673297
0
DELETE /character/geo_positions/1 DELETE /character/geo_positions/1.json
def destroy @character_geo_position = Character::GeoPosition.find(params[:id]) @character_geo_position.destroy respond_to do |format| format.html { redirect_to character_geo_positions_url } format.json { head :ok } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @geo.destroy\n respond_to do |format|\n format.html { redirect_to geos_url, notice: 'Geo was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @post_geo = current_user.post_geos.find(params[:id])\n @post_geo.destroy\n\n respond_t...
[ "0.7031428", "0.6983041", "0.68709964", "0.6789183", "0.67276955", "0.6675587", "0.6669673", "0.66657853", "0.66563004", "0.665613", "0.66424036", "0.6629626", "0.6615284", "0.66061103", "0.65896654", "0.6583766", "0.65780336", "0.65647817", "0.6558075", "0.6550642", "0.65506...
0.77763456
0
We are going to avoid indexing of README.md when there is also an index.md in the same directory, to keep behavior consistent with the display logic
def skip_index?(file) if file.end_with? 'README.md' dir = File.dirname file File.exist? "#{dir}/index.md" else false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def buildReadMeIndex\n x = 0\n fileOutArr = Array.new\n\n # Build each Fn Command Card\n fileOutArr.push \"# Fn Command Reference\\n\\n\"\n @cmdListArr.each do |command|\n # Start markdown file\n fileOutArr.push \"[\" + command + \"](\" + @fileNameArr[x] + \...
[ "0.70091426", "0.68860865", "0.66454583", "0.6599822", "0.6556787", "0.6556787", "0.6556787", "0.6525539", "0.6373534", "0.6365624", "0.6364324", "0.63603204", "0.63311034", "0.6317537", "0.6239274", "0.61938655", "0.61938655", "0.6176773", "0.61716115", "0.61703575", "0.6159...
0.7049303
0
Returns a list of repository names which match `regexp`
def repository_names list_repos .select { |repo| repo["name"] =~ regexp } .map { |repo| repo["name"] } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find(*pattern)\n pattern = pattern.join('*')\n pattern << '*' unless pattern =~ /\\*$/\n \n packages = []\n @repositories.select{|label,_| @active.include? label }.each do |label, repos|\n repos.each do |repo|\n packages.concat(repo.scan(pattern))\n end\n en...
[ "0.6415419", "0.5925132", "0.5876544", "0.5816987", "0.58096206", "0.5753673", "0.57511854", "0.573421", "0.5671197", "0.5576498", "0.55317396", "0.5436508", "0.5408711", "0.5378251", "0.53703976", "0.53390735", "0.53325284", "0.53101224", "0.5300954", "0.52593154", "0.523897...
0.7954824
0
POST /resume_responses POST /resume_responses.json
def create @resume_response = ResumeResponse.new(params[:resume_response]) @resume = Resume.find(params[:id]) @resume_response.resume = @resume @resume_response.sender = @current_user @resume_response.recipient = @resume.user respond_to do |format| if @resume_response.save format.h...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @resume = Resume.new(complete_params)\n\n if @resume.save\n render json: @resume, status: :created, location: @resume\n else\n render json: @resume.errors, status: :unprocessable_entity\n end\n end", "def create\n # puts \"params: #{params}\"\n @resume = Resume.new(resum...
[ "0.62504464", "0.6080155", "0.608008", "0.5836236", "0.56991637", "0.5662001", "0.56454825", "0.559175", "0.5591531", "0.55848736", "0.55781996", "0.55646473", "0.54927504", "0.54587626", "0.5437681", "0.54322886", "0.5403665", "0.5387826", "0.53571653", "0.534868", "0.532208...
0.66263586
0
PUT /resume_responses/1 PUT /resume_responses/1.json
def update @resume_response = ResumeResponse.find(params[:id]) respond_to do |format| if @resume_response.update_attributes(params[:resume_response]) format.html { redirect_to @resume_response, notice: 'Resume response was successfully updated.' } format.json { head :no_content } el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n @resume = Resume.find(params[:id])\n\n if @resume.update(resume_params)\n head :no_content\n else\n render json: @resume.errors, status: :unprocessable_entity\n end\n end", "def update\n if @resume.update(resume_params)\n render :show, status: :ok, location: @resume\n ...
[ "0.69537973", "0.670963", "0.66101074", "0.6558063", "0.65337616", "0.6533588", "0.6477582", "0.64378995", "0.64275306", "0.64152503", "0.6326686", "0.6326686", "0.61933714", "0.6096429", "0.6090138", "0.60326844", "0.60326844", "0.60326844", "0.5991478", "0.5970573", "0.5932...
0.6987272
0
DELETE /resume_responses/1 DELETE /resume_responses/1.json
def destroy @resume_response = ResumeResponse.find(params[:id]) @resume_response.destroy respond_to do |format| format.html { redirect_to resume_responses_url } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @resume.destroy\n respond_to do |format|\n format.html { redirect_to resumes_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @resume = Resume.find(params[:id])\n @resume.destroy\n\n respond_to do |format|\n format.html { redirect_to resumes_ur...
[ "0.7259041", "0.7218649", "0.706997", "0.70453155", "0.69963515", "0.682667", "0.6775077", "0.6739571", "0.671595", "0.6699357", "0.66386527", "0.65893275", "0.6587377", "0.6587377", "0.6586315", "0.6581614", "0.6569374", "0.6550289", "0.65401787", "0.65401787", "0.6531026", ...
0.7750977
0