query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
b7096fcb9279c9582c8450f358e6c3ec | GET /categories/1 GET /categories/1.json | [
{
"docid": "ffa6c1bff2c5adbc8412a31652263ca9",
"score": "0.7280321",
"text": "def show\n @category = Category.find(params[:id])\n render json: @category\n end",
"title": ""
}
] | [
{
"docid": "86e5d5637eeb2a8cc989235e83e67c7b",
"score": "0.8207107",
"text": "def get\n payload = {}\n @client.post('categories/get', payload)\n end",
"title": ""
},
{
"docid": "efcb5e10780279c84a4be599091f0268",
"score": "0.8070091",
"text": "def categories\n call_... |
8a617d414d2d5a7f21e8b164d35853da | currently this is hard wired into the app, only one contributor per record no need for 1:n delete, but leaving the code in if we make this change later def delete_contributor contributor = Contributor.find(params[:contributor_id]) | [
{
"docid": "ceb1e76b52069e9074d3c6fe496a6c6a",
"score": "0.0",
"text": "def delete_description\n description = Description.find(params[:description_id])\n @record = description.record\n description.delete\n redirect_to :action => \"record\", :id=> @record.id, :anchor => \"description\"\n en... | [
{
"docid": "112123c8362a6a07a64ad3b8912b7b64",
"score": "0.8030044",
"text": "def destroy\n authorize! @contributor\n\n @contributor.destroy\n\n redirect_to :back, notice: 'Contributor removed.'\n end",
"title": ""
},
{
"docid": "dd4a358c5606da98b5c11c94e820a90b",
"score": "0.7... |
c90acf816866696cefc15dac9b9642ed | Iterate over all key/value pairs in the order they occur in the file. This is not sorted or insertion order. +each+ will yield each key,value pair separately even when a key is duplicate. | [
{
"docid": "1fea807d082f7c27505083264c4fa3a5",
"score": "0.6725856",
"text": "def each\n pos = hash_size\n hoff0 = @hashes[0]\n while pos < hoff0\n key, value = *read_entry(pos)\n yield(key,value)\n pos += key.length + value.length + hashref_size\n end\n end",... | [
{
"docid": "1a8531d688ec5f42c5174763b586055f",
"score": "0.66654205",
"text": "def each\r\n record = @head\r\n while record\r\n yield record[:key], record[:value]\r\n record = record[:next]\r\n end\r\n end",
"title": ""
},
{
"docid": "db72f49021b50ea712a51785e... |
63c76db1e88deeb56e039af19da0ead9 | Get all the messages for a given user. Notice that rather than returning a list of hash, we concat the list elements into a single string. | [
{
"docid": "767af515ed6c3e88f7d903e9e79b01c5",
"score": "0.5808198",
"text": "def get_message\n db = SQLite3::Database.new(@fn)\n db.busy_timeout=1000 # milliseconds?\n db.transaction(:immediate)\n stmt = db.prepare(\"select user_id,msg_text from msg where user_id = ? order by id\")\n ps ... | [
{
"docid": "079248a6e17fe3143a950e0238faecb9",
"score": "0.74370843",
"text": "def get_messages(user_id)\n hash_list = SQLQuery.new.get('messages', ['id']).where.open_.if('reciever_id', user_id).and.if('sender_id', @id).close_.or.open_.if('reciever_id', @id).and.if('sender_id', user_id).close_.or... |
c677e2ccb36ab955c74a7bce3764b9f6 | POST /people POST /people.json | [
{
"docid": "5e2ac315060056e75b0f5825323cd933",
"score": "0.65106755",
"text": "def create\n @person = Person.new(person_params)\n\n respond_to do |format|\n if @person.save\n format.html { redirect_to @person, notice: \"#{@person.name} was successfully created.\" }\n format.json... | [
{
"docid": "b15085b8ebe0f929720fc799ccb1766b",
"score": "0.6787028",
"text": "def create\n @person = current_user.created_people.new(person_params_with_school)\n if @person.save\n render :show, status: :created, location: api_v1_person_url(@person)\n else\n render json: @person.errors... |
66e5d08e109fb6be5a0b34d7ac4eff9e | First clear existing links then add links to all photos in this area | [
{
"docid": "87660dcb9506eb53f2f6ee66fc674b07",
"score": "0.0",
"text": "def setPhotosInArea\n return unless area_changed?\n PlacePhotoInArea.delete place_photos_in_area_ids\n Photo.all.each do |photo|\n if(inArea(photo.ref_latitude, photo.ref_longitude))\n PlacePhotoInArea.create(:p... | [
{
"docid": "a00ffdb8ae6039c5ff70c221ccae5f4b",
"score": "0.67453814",
"text": "def clear_links ()\n\nend",
"title": ""
},
{
"docid": "4988b77f7128461d92c4bb21216032e7",
"score": "0.64736164",
"text": "def change_permalink\n @photoset = Photoset.find(:all)\n for photoset in @phot... |
948be33e57fc996098a05b652b52085f | Return the intersection of the operation and another operand | [
{
"docid": "7f0bcf2f494599377cdc6b69914afc01",
"score": "0.80242753",
"text": "def intersection(other)\n Operation.new(:and, dup, other.dup).minimize\n end",
"title": ""
}
] | [
{
"docid": "9a9fd97d83a83ba04ddf162199b1b1d5",
"score": "0.73206943",
"text": "def &(other) intersection(other) end",
"title": ""
},
{
"docid": "57a884f852f248ef1b07631a4a35f35b",
"score": "0.7124328",
"text": "def intersection(another) \n self & another \n end",
"title": "... |
786135e0757dc08adb896371999adc94 | GET /incomelevels/1 GET /incomelevels/1.xml | [
{
"docid": "f1940087f878d855aeb5d48aaa90b6f5",
"score": "0.7165916",
"text": "def show\n @incomelevel = Incomelevel.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @incomelevel }\n end\n end",
"title": ""
}
] | [
{
"docid": "3a17353ef66051a9bdfb938eabf90765",
"score": "0.6494871",
"text": "def new\n @incomelevel = Incomelevel.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @incomelevel }\n end\n end",
"title": ""
},
{
"docid": "a9dab0612a... |
65578bc3771f5952cbf4432467135883 | jpeg_size(file) => width, height file is a File object open on a JPEG image | [
{
"docid": "ec190faf71ff6e8bce6cf9ebe4fde0ac",
"score": "0.8265584",
"text": "def jpeg_size file\n\n # Basically, we're doing this:\n #\n # jpegtopnm pdf-test.jpg | pnmfile\n #\n # STDERR: \"jpegtopnm: WRITING PPM FILE\"\n # STDIN: \"stdin:\tPPM raw, 800 by 630 maxval 255\"\n #\n ... | [
{
"docid": "ae12cccefdbb20fbc8798b813c297ef4",
"score": "0.7398791",
"text": "def image_size(path)\n `file #{path}` =~ /(\\d+)\\s*x\\s*(\\d+)/\n [$1, $2].map(&method(:Integer))\nend",
"title": ""
},
{
"docid": "06c6572172e630648399f065413c4315",
"score": "0.73043716",
"text": "def ... |
c32cac1c13f1999725d5ae7da87c3da6 | Redirect as appropriate when an access request fails. The default action is to redirect to the login screen. Override this method in your controllers if you want to have special behavior in case the user is not authorized to access the requested action. For example, a popup window might simply close itself. | [
{
"docid": "194933ca5a6219f0657ecdf1c8e79dfe",
"score": "0.0",
"text": "def unauthorized\n if try_jobbee_current_user\n flash[:error] = Jobbee.t(:authorization_failure)\n redirect_to '/unauthorized'\n else\n store_location\n redirect_to respo... | [
{
"docid": "e05b070a87b12e498352ef671f9fb03a",
"score": "0.7853819",
"text": "def access_denied\n if current_user\n redirect_to root_path, error: \"you weren't authorized to #{params[:action]} in #{params[:controller]}\"\n else\n # the problem is almost certainly lack of login\n ... |
99ddcea110a5622a3e14c9d6045f0d24 | Generates an unique token. | [
{
"docid": "a78f0ab540b86b3e4751609c5150ec9e",
"score": "0.0",
"text": "def reset_token\n self.token = self.class.generate_token(:token)\n end",
"title": ""
}
] | [
{
"docid": "65b911435ff3d21bd4e3a63b06ff6aee",
"score": "0.874168",
"text": "def generate_token\n self.token = Digest::SHA1.hexdigest([Time.now, rand].join)\n end",
"title": ""
},
{
"docid": "65b911435ff3d21bd4e3a63b06ff6aee",
"score": "0.874168",
"text": "def generate_token\n ... |
bac4f8d6cb10c1c46e131a9b298d240e | Returns the title of the page/content | [
{
"docid": "5e4334acbfe323b2590174da82e521af",
"score": "0.0",
"text": "def title\n @title ||= Utilities.longest_common_substring_in_array(titles.values) \n @title = titles[:og_title] unless title_ok?\n @title = titles[:html_title] unless title_ok?\n @title = titles[:from_doc] unless... | [
{
"docid": "a48b4df2c3211068f73473525263498c",
"score": "0.8761454",
"text": "def page_title\n page.title\n end",
"title": ""
},
{
"docid": "963c66d8fb415e62cf78790ff75f82b6",
"score": "0.86510736",
"text": "def title\n @title_pages.each { |tp| tp.title and return tp... |
f8e013415bc4193c081e61c59f10e158 | for cache transport func | [
{
"docid": "7a4d8692f6fa37721dc498bde11dc01f",
"score": "0.0",
"text": "def to_cache\n JSON.generate({:id => @id, :name => @name, :status => @status, :game_id => @game_id, :players => @players.map{|p| p.id}})\n end",
"title": ""
}
] | [
{
"docid": "157d4a88a386243ea01f87cf394d4588",
"score": "0.7762093",
"text": "def cache; end",
"title": ""
},
{
"docid": "157d4a88a386243ea01f87cf394d4588",
"score": "0.7762093",
"text": "def cache; end",
"title": ""
},
{
"docid": "157d4a88a386243ea01f87cf394d4588",
"... |
3ca22d1055d8f8c034322463531c6a8b | Fancy product name getter | [
{
"docid": "4f8a301c1920717f4b3b38967e602330",
"score": "0.84396416",
"text": "def product_name_fancy\n\t\t\tif self.product\n\t\t\t\treturn self.product.name_fancy\n\t\t\telse\n\t\t\t\treturn self.product_name\n\t\t\tend\n\t\tend",
"title": ""
}
] | [
{
"docid": "7f5ecc62cd73293789b92676e86e38bf",
"score": "0.86363506",
"text": "def product_name\n return @product_name\n end",
"title": ""
},
{
"docid": "46d023ecc12380f7f953cf0e506e4964",
"score": "0.85513",
"text": "def product_name; end",
"title": ""
... |
7e98df57ffe7e08792a40f949f6c6c34 | returns state of a given cell | [
{
"docid": "c995d9a41ee42ae368ddc882826f3794",
"score": "0.6522902",
"text": "def cell(cell)\n @board[cell]\n end",
"title": ""
}
] | [
{
"docid": "b19292620a5e882f22a89daf8dec61e4",
"score": "0.74507546",
"text": "def state\n board.state(index)\n end",
"title": ""
},
{
"docid": "78bac86280bfd74d9421728446730749",
"score": "0.7374865",
"text": "def board_state()\r\n\t\treturn @cellMap\r\n\tend",
"title": ... |
1f44c95fca37732a2b082e555da61fb9 | Get or set the banner. banner The String to set the banner. Returns the banner String. | [
{
"docid": "3b41fee783f6810e1902450b35b2b63c",
"score": "0.79167193",
"text": "def banner(banner = nil)\n config[:banner] = banner if banner\n config[:banner]\n end",
"title": ""
}
] | [
{
"docid": "1f749636f7eb15b8ada86c321f624554",
"score": "0.81443655",
"text": "def banner(banner = nil)\n @banner = banner if banner\n @banner\n end",
"title": ""
},
{
"docid": "3a7dc697c6d8bdddf135f2410b7f2fae",
"score": "0.773959",
"text": "def banner=(banner)\n con... |
f9482814aa9aedb81472aed96efb827a | print documentation ri 'Arraypop' Array.ri Array.ri :pop arr.ri :pop | [
{
"docid": "3f906ebcb0f26cfa4a2636af088b4537",
"score": "0.0",
"text": "def ri(method = nil)\n unless method && method =~ /^[A-Z]/ # if class isn't specified\n klass = self.kind_of?(Class) ? name : self.class.name\n method = [klass, method].compact.join('#')\n end\n puts `ri '#{method... | [
{
"docid": "6443a91ca6105f53058a972562e71c71",
"score": "0.79918486",
"text": "def using_pop(array)\n array.pop()\nend",
"title": ""
},
{
"docid": "84e3d5bb90b63617dcf6e07d1839aa73",
"score": "0.79756606",
"text": "def \n \n using_pop(array)\n \n\n array.pop()\n \nend",
"ti... |
2c346b2562a97046fe07ef7b02acaa49 | POST /accounts POST /accounts.json | [
{
"docid": "a25138cf64275f9d1354bbaf070ff7bd",
"score": "0.67459255",
"text": "def create\n @account = Account.new(account_params)\n\n respond_to do |format|\n if @account.save\n format.html { redirect_to @account, notice: 'Account was successfully created.' }\n format.json { re... | [
{
"docid": "77f307f64106f05b8f139085144085f2",
"score": "0.7698442",
"text": "def create\n @account = current_user.accounts.create!(account_params)\n @account.save\n render json: @account\n end",
"title": ""
},
{
"docid": "345d97ffa21872a109a16575d6d574c6",
"score": "0.7598518"... |
49da1f866ad149ad8015b219e795e3d7 | Custom attribute writer method with validation | [
{
"docid": "3653aff248ecbc059235ac732bd1d377",
"score": "0.0",
"text": "def custom_field2=(custom_field2)\n if !custom_field2.nil? && custom_field2.to_s.length > 50\n fail ArgumentError, 'invalid value for \"custom_field2\", the character length must be smaller than or equal to 50.'\n e... | [
{
"docid": "0f4a74039d4b8dc62405e39b58357a05",
"score": "0.6472992",
"text": "def attr_writer_tag(text); end",
"title": ""
},
{
"docid": "ac55752dd9cc4f485a916c46d7b41237",
"score": "0.6315012",
"text": "def allowed_attributes=(_arg0); end",
"title": ""
},
{
"docid": "ac5... |
f059b3f57811df4ee0b83b9759b62506 | Used to append '' to urls for field names that need an anchor | [
{
"docid": "34af6cf6034a8886928020a631001f23",
"score": "0.0",
"text": "def field_name_to_anchor_map\n {\n property_values: :property_value,\n outstanding_mortgages: :outstanding_mortgage_amount,\n percentage_homes: :percentage_home\n }\n end",
"title": ""
}
] | [
{
"docid": "2b052807710bd306e25e9d195f00600d",
"score": "0.6463846",
"text": "def generate_url_name\n if !self.name.blank?\n self.url_name = self.name.gsub(/[^a-zA-Z0-9\\ ]/,\" \").gsub(/\\ \\ +/,\" \").gsub(/\\ /,\"-\").downcase\n end\n end",
"title": ""
},
{
"docid": "2a3de9e81... |
17e60034156f74954b724e4a21b21a3e | PUT /product_images/1 PUT /product_images/1.json | [
{
"docid": "a773b3387ecda87642d6660f0ccabe99",
"score": "0.63948053",
"text": "def update\n\t\t@product = Product.find params[:product_id]\n @product_image = ProductImage.find(params[:id])\n\n respond_to do |format|\n if @product_image.update_attributes(params[:product_image])\n format... | [
{
"docid": "deb408d68e59a861228d17fb3ede4073",
"score": "0.7465553",
"text": "def update\n respond_to do |format|\n if @product.update(product_params)\n if params[:images]\n params[:images].each { |image|\n @product.images.create(photo: image)\n }\n end\n ... |
9625a81c51174d3d160801b71f9a40b1 | Sets the seriesCount property value. Number of times in this series the quarantine was reevaluated and left in effect (a series starts when quarantine is first imposed, and is reset as soon as quarantine is lifted). | [
{
"docid": "e85fc2c306d935eff934a2e0df638cba",
"score": "0.65756834",
"text": "def series_count=(value)\n @series_count = value\n end",
"title": ""
}
] | [
{
"docid": "9b7cce66b0bd51ad04de1db2c0cc18d1",
"score": "0.5787256",
"text": "def reset_count\n @count = 0\n end",
"title": ""
},
{
"docid": "9a608672571445cb97b891dc1f323a15",
"score": "0.57824636",
"text": "def reset_count=(value)\n @reset_count = value\n ... |
e5ef66ab0eb0044626c86212635ec0f7 | Returns the root term for this ontology. | [
{
"docid": "abeae1d5c3aa8fcb62fc5982b6bbf36c",
"score": "0.0",
"text": "def root\n root = self\n root = root.parents.first while !root.is_root?\n root\n end",
"title": ""
}
] | [
{
"docid": "91acabfebdd99cca8eb047e068259951",
"score": "0.74576336",
"text": "def root_word\n _root_word\n end",
"title": ""
},
{
"docid": "79c11b12092ff20bc21e135588519e1a",
"score": "0.72937536",
"text": "def root_terms\n unit.root_terms\n end",
"title": ""
}... |
c3d511199644be245a085cfbeb33b1bb | PATCH/PUT /functional_design_documents/1 PATCH/PUT /functional_design_documents/1.json | [
{
"docid": "21b5934482af15fc9bcbc328cda0fd84",
"score": "0.71794367",
"text": "def update\n respond_to do |format|\n if @functional_design_document.update(functional_design_document_params)\n format.html { redirect_to @functional_design_document, notice: 'Functional design document was su... | [
{
"docid": "f3c049b7be59000ca851e04f3126c7de",
"score": "0.69816345",
"text": "def update\n respond_to do |format|\n if @document.update_attributes(name: document_params[:name], lab_id: document_params[:lab_id])\n format.html { redirect_to documents_url, notice: 'Document was successfully... |
d66ca9761f62d2e0989113b4e15e7433 | Returns the controllerlevel asset for the given type, or nil. | [
{
"docid": "3554669cd513f192b5dbcca574a64f65",
"score": "0.77277344",
"text": "def controller_asset(type)\n Tension::Utils.find_asset( controller: controller.controller_path, type: type )\n end",
"title": ""
}
] | [
{
"docid": "a3529414f92fc825cb40ff3cbdbc7962",
"score": "0.6460385",
"text": "def best_asset(action, type)\n action_asset(action, type) || controller_asset(type)\n end",
"title": ""
},
{
"docid": "68fbc6e8cd31a4ed5dc3a5ae0c76a7ce",
"score": "0.61895037",
"text": "def category... |
6ff85e2486f4262d354697234c78fbb4 | checks if next company is the same. If it is, then we'll display the start of the first job in that company and we'll join that with end/current date for that job | [
{
"docid": "8e57f9a31d26152a9bb7ba5e03b2e112",
"score": "0.64342105",
"text": "def is_next_company_same(current_company, current_index, company_params)\n start_month = params[:start_months][current_index]\n start_year = params[:start_years][current_index]\n start_time = []\n changed = false\... | [
{
"docid": "abe826fbac68cd22bb8fd5a9d142b0a8",
"score": "0.5874341",
"text": "def next_job\n job(jobs.first)\n end",
"title": ""
},
{
"docid": "6ca20d0ebcff604210af25f637ac3dd7",
"score": "0.5830892",
"text": "def next_jobs\n now = Time.now\n earliest = nil\n j... |
7f64f1740027ceade339a60adb0df195 | create new string altered = "" loop through that array .upcase odd indexs and shovel into altered | [
{
"docid": "4a5917bdc888e9d1d284a9e143223482",
"score": "0.7060953",
"text": "def change_string(string)\n split = string.split(//)\n index = 0\n altered = \"\"\n while index < split.length\n if index.odd?\n altered << split[index].upcase\n else\n altered << split[index]\n end\n ... | [
{
"docid": "3091d40596567491f544fd5bf40b8248",
"score": "0.75104946",
"text": "def recapitalize(word,index_array)\n\t\t\tindex_array.each do |index|\n\t\t\t\tword[index].upcase!\n\t\t\tend\n\t\t\tword\n\t\tend",
"title": ""
},
{
"docid": "5230bad87afb40281d4c263579891b5b",
"score": "0.74... |
59593642b36c67899c804a9aa6e5567f | Semibarbarianism squeezingly dundasite underregistration isoamylethyl nagnail Regardless supperwards indignity coachy acutilobate knavishly Drat musician mirabilis endochorionic phantasmatography bedford Chloroformist sotadic sunshineless glycyrrhizin uncini trieterics Careen sordello adlai agrostographical sulvanite s... | [
{
"docid": "012884b515dec299d2c741ccfb108595",
"score": "0.0",
"text": "def apostrophus_orc()\n end",
"title": ""
}
] | [
{
"docid": "7c14145aa2d019c445fa7f3f1ea38fee",
"score": "0.6431737",
"text": "def stragulum()\n unmemorialized_koko(lusian, bion_postcolonial, nonreformation_nemoceran)\n hanif_muscardine(neocyanine_connivance, corallina_bisontine, polyphote)\n dioramic_theatropolis_guttie?(mumphead_leuco... |
f242eaca34786a14d8f5fef7a64a6abf | Get total size of all columns | [
{
"docid": "518b061b9eafd19a6e7638ec8e4938bd",
"score": "0.84569",
"text": "def total_columns_size(columns)\n size = 0\n\n columns.each do |c|\n size += @columns[c[:name]][:size]\n end\n\n size\n end",
"title": ""
}
] | [
{
"docid": "9e96dd75968861c943252f212d60189f",
"score": "0.83246887",
"text": "def column_size\n table.first.size\n end",
"title": ""
},
{
"docid": "dccdfd156049c282c042e8406554982c",
"score": "0.8269762",
"text": "def size\n @columns.length\n end",
"title": ""
},
... |
f57fe7c3c511b7972aacacd755c17470 | Processes the given labeled strings by creating a Node::Extracted tree. A hash is returned with each child of the passed Node::Structure as a key, and an array of the relevant extracted examples (as Node::Extracted objects). | [
{
"docid": "e1df3f3dd8edf9846613602757284012",
"score": "0.81361616",
"text": "def process_labeled_strings(structure, *labeled_strings)\n loaded_example_hash = Hash.new {|h, k| h[k]=[]}\n labeled_strings.each do |string|\n warn_if_no_examples_in string\n tokenstream = Tok... | [
{
"docid": "fd20fa71616e074e03790e34b27487d2",
"score": "0.61731577",
"text": "def extract(structure, *files_to_extract)\n raise ArgumentError, \"Passed structure is not the parent of the document tree\" unless structure.parent.nil?\n extractions=[]\n collect_strings(files_to_extract).eac... |
cf8c9de1879b87af2660f6f0dc5dd2b6 | Return the editor resolution | [
{
"docid": "01c09b1437f220dbc07821116e081987",
"score": "0.8264241",
"text": "def editors_resolution\n @window_scale = 1\n @running_in_full_screen = false\n @viewport_offset_x = 0\n @viewport_offset_y = 0\n return [640, 480]\n end",
"title": ""
}
] | [
{
"docid": "892babf7178bbee9736c620fa41363a7",
"score": "0.69930214",
"text": "def choose_best_resolution\n return editors_resolution if running_editor?\n\n native = @native_resolution.split('x').collect(&:to_i)\n @viewport_offset_x = 0\n @viewport_offset_y = 0\n if @running_in_... |
cb471620eaceb8a1220ab5bc263457c8 | POST /movements POST /movements.json | [
{
"docid": "66d2d7e62d1000982275368c15005083",
"score": "0.56874263",
"text": "def create\n @movement = Movement.new(movement_params)\n\n respond_to do |format|\n if @movement.save\n if params[:additionalAction] == \"saveandnew\"\n format.html { render :new, notice: 'Registro ... | [
{
"docid": "400c351c57218828b32b96f69c629565",
"score": "0.68366885",
"text": "def create\n movement = @user.tracked_movements.build(movement_id: params[:movement_id], movement_count: 0)\n render json: { message: 'Successfully added!' }, status: :ok if movement.save\n end",
"title": ""
},
... |
c9bf1d4ede5c43439d61b5fddb3a3670 | POST /emerges POST /emerges.xml | [
{
"docid": "d38bce14537930aca9a2dbc505d91d35",
"score": "0.59533966",
"text": "def create\n error = \"Unknown error.\"\n @user = User.find_by_login(params[:user])\n @emerge = nil\n if @user.sitekey and @user.sitekey == params[:token]\n @package = getPackage(params[:package])\n @eme... | [
{
"docid": "ded0436a42549d20329c65b1930e2dfe",
"score": "0.59958935",
"text": "def destroy\n @emerge = Emerge.find(params[:id])\n @emerge.destroy\n\n respond_to do |format|\n format.html { redirect_to(emerges_url) }\n format.xml { head :ok }\n end\n end",
"title": ""
},
{... |
232144d5bc89ac107732f0dcadac0e3a | PUT /banks/1 PUT /banks/1.json | [
{
"docid": "fd8fbdf1743bed28b7a311765f13e83a",
"score": "0.652126",
"text": "def update\n @bank = Bank.find(params[:id])\n\n respond_to do |format|\n if @bank.update_attributes(params[:bank])\n format.html { redirect_to @bank, notice: 'Bank was successfully updated.' }\n format.... | [
{
"docid": "069d3b823851c46a7578d78ee3a6b3de",
"score": "0.6772693",
"text": "def update\n if @bank.update(bank_params)\n render :show, status: :ok, location: @bank\n else\n render json: @bank.errors, status: :unprocessable_entity\n end\n end",
"title": ""
},
{
"docid": "... |
39559c2225f24d7f105251d030e11763 | Saves a previously uploaded document as multipage TIFF, and sends the file data in a JSONserialized object. | [
{
"docid": "22344179ae989f011924405d3f9d8c26",
"score": "0.5818366",
"text": "def save_as_tiff_multipage(pdf_save_as_tiff_multipage_parameters, opts = {})\n data, _status_code, _headers = save_as_tiff_multipage_with_http_info(pdf_save_as_tiff_multipage_parameters, opts)\n data\n end",
"... | [
{
"docid": "09250dbad14b4560d6c10129c8a80819",
"score": "0.66092163",
"text": "def save_as_tiff_multipage_file_with_http_info(pdf_save_as_tiff_multipage_parameters, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: PDFApi.save_as_tiff_multipage_file... |
d2ee8e4a216f05a7f48a6adf4156011c | Is there a next page of data? | [
{
"docid": "b492c69df61b73c74eb4424195831d7f",
"score": "0.0",
"text": "def next?\n !token.nil?\n end",
"title": ""
}
] | [
{
"docid": "9688258857fa5f74469a81016a435457",
"score": "0.8129308",
"text": "def has_next?\n 1 < self.page\n end",
"title": ""
},
{
"docid": "23bda121844e22bccb04904fae6b1eca",
"score": "0.804496",
"text": "def next_page?\n if paginate_forward?\n # When pagin... |
46e11626f3da70a677b726e6af9f0f14 | Looks for any attributes that have types given as strings, such as "Test", and resolves these names to an object if possible | [
{
"docid": "64bc64908f3b8e17d33de87cdea9f83f",
"score": "0.6813418",
"text": "def resolve_attributes()\n types = get_all_model_elements.select{ |k,v| (v.class == JClass) || (v.class == JEnumeration) }\n attrs = get_all_model_elements.select{ |k,v| (v.class == JAttribute) && (v.type.class == String... | [
{
"docid": "3cd8fc4787d241c785112ade9145d98e",
"score": "0.69995093",
"text": "def match_names_of_attributes_with_their_types names_of_attributes, types_of_attributes\n for i in 0..(names_of_attributes.size - 1)\n @names_and_types_of_attributes[names_of_attributes[i]] = types_of_attributes[i]\n ... |
593809db3d7198c8a65e1ee7a9c12531 | Transfer files to a host in the NodeSet. | [
{
"docid": "42d4351925b9a7b643c89c2594466e89",
"score": "0.0",
"text": "def rcp(opts)\n dest = opts[:d].name\n source = opts[:sp]\n dest_path = opts[:dp]\n\n # Grab a remote path for temp transfer\n tmpdest = tmppath\n\n # Do the copy and print out results for debugging\n ... | [
{
"docid": "a9b699b756df0077261fbdfcec5a60e4",
"score": "0.72665244",
"text": "def transfer!\n connection do |ftp|\n create_remote_directories(ftp)\n\n files_to_transfer do |local_file, remote_file|\n Logger.message \"#{storage_name} started transferring \" +\n ... |
2f4e94211bc288c410cedcfbc5306aa2 | pt = PalindromeTrie.new pt.add('haha', 1) p pt | [
{
"docid": "1fffba15b1f7ca59fb45c504a3017a71",
"score": "0.5698409",
"text": "def palindrome_pairs(*words)\n pt = PalindromeTrie.new\n pairs = 0\n\n words.each do |word|\n result = pt.find(word)\n puts result\n if result[:status] == 'found'\n pairs += 1\n elsif result[:status] == 'wo... | [
{
"docid": "f1ff53cc37f8870603f7770a7fa4b7f6",
"score": "0.6463889",
"text": "def build_trie(*words)\n puts \"Implement me! :)\"\nend",
"title": ""
},
{
"docid": "4c7e8ecc5b0ab7f0ce179ee0feaef0d1",
"score": "0.61632514",
"text": "def imprimir_trie\n puts 'letras entre || represen... |
4060c11756d607e80d87dfdd64459066 | =begin CREATED: Henry Karagory 2/19/2018 Description: Tests the mean of an empty array. =end | [
{
"docid": "d9cae1dc2ae54bcfc4f8c1eba1e962e5",
"score": "0.86827725",
"text": "def test_mean_empty_array\n expected_sum = 0\n assert_equal expected_sum, Stats.average(Array.new)\n end",
"title": ""
}
] | [
{
"docid": "a36922061c6ab682049e3076455111f0",
"score": "0.8277518",
"text": "def test_average_of_empty_array_returns_zero\n assert_equal array_average([]), 0\n end",
"title": ""
},
{
"docid": "0783765ab0ed206b5423929522e994b1",
"score": "0.7410359",
"text": "def test_std_dev_emp... |
06840c5308f408998a054737d4681728 | % ">>" : !FIXME > !FIXME | [
{
"docid": "e57c30f4b2115aabccc86523b2303a3b",
"score": "0.6030583",
"text": "def >>(*) end",
"title": ""
}
] | [
{
"docid": "413b70e36cb2d8206e280f3ac1644d71",
"score": "0.69024754",
"text": "def interpret\r\n return __________________ # <<2\r\n end",
"title": ""
},
{
"docid": "91c1759055f3767525a4dec8a29a1aa5",
"score": "0.6175209",
"text": "def <<(arg); end",
"title": ""
},
{
... |
837507f2ded3fa59c0c162893feb033f | Returns a pretty representation of the session object | [
{
"docid": "7a34154ecde3ac82842f686db8605da0",
"score": "0.0",
"text": "def to_s\n if connected?\n \"#{self.class.name}: connected as #{email}\"\n else\n \"#{self.class.name}: not connected\"\n end\n end",
"title": ""
}
] | [
{
"docid": "d73e1505bade673c596c2ddc73ec8124",
"score": "0.76612365",
"text": "def to_s\n session_props = %w(user_id original_user_id original_advisor_user_id original_delegate_user_id canvas_masquerading_user_id lti_authenticated_only).map do |prop|\n if (prop_value = self.send prop.to_sym)\n ... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "6721ee8c8fc7c68d7db5fd0ca8a5f826",
"score": "0.0",
"text": "def set_product\n @product = Product.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.60310596",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.6014974",
"text": "de... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "c6e713adc91b23cd5bea869639be1485",
"score": "0.0",
"text": "def cdbicd_params\n params.require(:cdbicd).permit(:diagnosis_code, :diagnosis_description, :diagnosis_icd10, :diagnosis_type, :diagnosis_source, :diagnosis_start_date, :diagnosis_end_date)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7498391",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.6958937",
"text": "def strong_params\n params.require(:request).permit(param_white... |
af630984682f1a0b5a68e6092af0d102 | Update properties of this object | [
{
"docid": "fce4c0ac83011c4131e6394febf0a599",
"score": "0.0",
"text": "def update!(**args)\n @language = args[:language] if args.key?(:language)\n @name = args[:name] if args.key?(:name)\n @ratings = args[:ratings] if args.key?(:ratings)\n @tags = args[:tags] if args... | [
{
"docid": "150fa2bdc1fc43d28ac45e2278a1f797",
"score": "0.7012263",
"text": "def update_properties(hash)\n hash.each do |key, value|\n setter_method = \"#{key}=\"\n if self.respond_to?(setter_method)\n self.send(setter_method, value)\n end\n end\n end",
"t... |
e78da1cbc56bdb4d09f72862422d188b | GET /backup def backup end POST /generate_backup | [
{
"docid": "9b24519b6c84e0d6e2242d5d5d7fd42c",
"score": "0.6912226",
"text": "def generate_backup\n if Export.launch_export!\n current_user.update(\n last_backup_at: Time.zone.now,\n last_backup_entry_id: current_user.last_entry_id\n )\n redirect_to backup_succeeded_path\... | [
{
"docid": "bc6b5490a0d830c9e9248fb983559285",
"score": "0.7160548",
"text": "def backup_wallet\n client.make_request('/backup-wallet', 'post', params: {})\n end",
"title": ""
},
{
"docid": "a5f782d5ff669a4ce06ad6427d07d9a8",
"score": "0.6996519",
"text": "def cmd_backup argv... |
0f39b709562405aa597376d22b77c69a | Returns the AssociationReflection object for the +association+ (use the symbol). Account.reflect_on_association(:owner) returns the owner AssociationReflection Invoice.reflect_on_association(:line_items).macro returns :has_many | [
{
"docid": "7c6748e0f7c92058d391461a0d50df3d",
"score": "0.77660865",
"text": "def reflect_on_association(association)\n reflection = reflections[association]\n reflection if reflection.is_a?(AssociationReflection)\n end",
"title": ""
}
] | [
{
"docid": "7aed59ea3df08e3d9661189212864ff3",
"score": "0.7682809",
"text": "def _reflect_on_association(association)\n val = reflections[association].is_a?(AssociationReflection) ? reflections[association] : nil\n unless val\n # When a has_many is paired with a has_and_belongs_t... |
4b37a047b5e4dac798dcd60dfb2e5417 | Public: Returns an Array of String email address to which replies to this email should be addressed. | [
{
"docid": "443bb475d3b1f90cc679169937108b81",
"score": "0.7804487",
"text": "def reply_to\n email_message.reply_to.map(&:to_s)\n end",
"title": ""
}
] | [
{
"docid": "6ba2924aee46f6a957f0e9c20b538d6a",
"score": "0.74997103",
"text": "def reply_to\n (envelope[:reply_to] || []).map{|a| address(a)}\n end",
"title": ""
},
{
"docid": "5f2ebbd208fda7660b22c454cc4c55cb",
"score": "0.7098209",
"text": "def to_mail\n @replies.rever... |
f3ec7b13f1467b1e78e5fc11ed74d65b | Returns the specified user's "news feed" GET /users/splatts_feed/1 | [
{
"docid": "6f58c1559a89894d9e49ac7fe23529c0",
"score": "0.6777519",
"text": "def splatts_feed\n\t@feed = Splatt.find_by_sql(\"SELECT splatts.user_id, splatts.body, splatts.created_at FROM splatts JOIN follows ON follows.followed_id = splatts.user_id WHERE follows.follower_id = #{params[:id]} ORDER BY s... | [
{
"docid": "7c58ea6428829908d8df32c018960556",
"score": "0.73320335",
"text": "def newsfeed\n check_auth :newsfeed\n \n response = connection.post do |req|\n req.url '/user/newsfeed'\n req.body = { :format => @format }\n end\n response\n end",
"title": ""
... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "31432711a4d6e27bc78f04a74813c1a7",
"score": "0.0",
"text": "def set_parking_detail\n @parking_detail = ParkingDetail.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "bd89022716e537628dd314fd23858181",
"score": "0.6163163",
"text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n end",
"title": ""
},
{
"docid": "3db61e749c16d53a52f73ba0492108e9",
"score": "0.6045976",
"text": "def action_hook;... |
af6fac4e36f90fd75344fd7da935dea0 | Rubocop is complaining about 19.31/18 for Metrics/AbcSize. But, getting that metric in line would force us over the module size limit! We can't win here unless we want to start abstracting things into a million pieces. | [
{
"docid": "c623504e0e81fce84e44adc6c8e19c4a",
"score": "0.0",
"text": "def span_attrs(kind, *args) # rubocop:disable Metrics/AbcSize\n if kind == :query\n operation = extract_operation(args[0])\n sql = obfuscate_sql(args[0]).to_s\n else\n sta... | [
{
"docid": "978457f08b58776f5cfb90fcb9e1ebc7",
"score": "0.60121536",
"text": "def method_size_cutoff=(_arg0); end",
"title": ""
},
{
"docid": "978457f08b58776f5cfb90fcb9e1ebc7",
"score": "0.60121536",
"text": "def method_size_cutoff=(_arg0); end",
"title": ""
},
{
"docid... |
95a04ca14bc17527858fc2352f38ef51 | ////////////////////////////////////////////////////////////////////////// Properties ////////////////////////////////////////////////////////////////////////// Get a specific selected actor or current actor i : index of the selected actor GET | [
{
"docid": "0fb7a8b5bdbe2fc584cc9a653ae70504",
"score": "0.8487947",
"text": "def selected_actor(i=nil)\n actor = nil\n if i == nil\n actor = @data[self.index]\n else\n actor = (index < 0 || self.index(i) < 0 ? nil : @data[self.index(i)])\n end\n return actor\n end",
"title... | [
{
"docid": "5d17c85a30eafca4a286c7830474e66f",
"score": "0.71798676",
"text": "def selected_reserve_actor(i=nil)\n actor = nil\n if i == nil\n actor = @data[self.index]\n else\n actor = (index < 0 || self.index(i) < 0 ? nil : @data[self.index(i)])\n end\n return actor\n end",
... |
e561e11bcf379ef5dc139c210017366b | Only allow a list of trusted parameters through. | [
{
"docid": "feadbbafd39e351da5b4b77c26d607f8",
"score": "0.0",
"text": "def f_amigo_params\n params.require(:f_amigo).permit(:first_name, :last_name, :email, :phone, :twitter, :user_id)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.74768823",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "36956168ba2889cff7bf17d9f1db41b8",
"score": "0.71700543",
"text": "def set_param_whitelist(*param_list)\n self.param_whitelist... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "2dc3ee83e1dce34d199bd757a1bb4956",
"score": "0.0",
"text": "def set_skater\n @skater = Skater.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "bd89022716e537628dd314fd23858181",
"score": "0.6164095",
"text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n end",
"title": ""
},
{
"docid": "3db61e749c16d53a52f73ba0492108e9",
"score": "0.6046031",
"text": "def action_hook;... |
90cf8aa3a7825e5ed1bef51d6cd7cb99 | state_machine is in /lib/order_flow.rb since I got troubles with emails that was sent twice | [
{
"docid": "03f8484c0edf8035337084624888e7c8",
"score": "0.0",
"text": "def update!(order)\n logger.info 'UPDATE! is called' + self.inspect\n old_state = self.state\n new_state = determine_state(order)\n logger.info \"old_state = #{old_state}; new_state = #{new_state}\" + self.inspect\n i... | [
{
"docid": "1f44d0637e507e1033fcc00743286d04",
"score": "0.72871065",
"text": "def state_machine\n @state_machine ||= OrderStateMachine.new(self, transition_class: OrderTransition)\n end",
"title": ""
},
{
"docid": "0e3a853eb0a0b091bb7cd6e4cd75075f",
"score": "0.7214685",
"text":... |
0757da13ddbabd881394983744b6146e | Prints each integer values in the array | [
{
"docid": "8af23aca081e2936752b3fd385bd3992",
"score": "0.64067984",
"text": "def print_array(array)\n\n length_array = 0\n\n while array[length_array] != nil\n length_array = length_array + 1\n end\n index = 0\n length_array.times do\n print \"#{array[index]} \"\n index = index + 1\n en... | [
{
"docid": "0282fbca6e73a61f604e252ecf611eb6",
"score": "0.78347355",
"text": "def print_array_vals array\n array.each do |i|\n puts i\n end\nend",
"title": ""
},
{
"docid": "49e22714b22c19b00d173af1984d2fce",
"score": "0.7580531",
"text": "def print_array (array_of_inte... |
d38fff3740d9720b4fcd85246694b17b | Returns URL, params and headers for direct uploads. By default it generates data for a POST request, calling [`Aws::S3::Objectpresigned_post`]. You can also specify `method: :put` to generate data for a PUT request, using [`Aws::S3::Objectpresigned_url`]. Any additional options are forwarded to the underlying AWS SDK m... | [
{
"docid": "6aac342ee2a717c792419207e8256359",
"score": "0.73207027",
"text": "def presign(id, method: :post, **options)\n options = @upload_options.merge(options)\n options[:content_disposition] = encode_content_disposition(options[:content_disposition]) if options[:content_disposition]\n... | [
{
"docid": "cb0330fa66e97fef79e55cfdd64411f9",
"score": "0.70357955",
"text": "def presigned_upload_url\n filename = signed_url_params # First param is filename\n resource = Aws::S3::Resource.new(client: @s3_client)\n bucket = resource.bucket(Rails.application.credentials.aws[:bucke... |
a721835a9e029eae85e66a89e45d3ecc | Return true if parent variant in stock | [
{
"docid": "48ba1d646b4422fb55cf9b956d6cf62e",
"score": "0.7827666",
"text": "def child_variants_stock_control?\n if self.root_variant?\n self.descendants.where(:stock_control => true).length > 0\n else\n false\n end\n end",
"title": ""
}
] | [
{
"docid": "0477b24f8c3d3346c802e22fa47a6f39",
"score": "0.81299907",
"text": "def in_stock?\n if self.child_variants_exists?\n self.variants.roots.inject(false) { |any, i| any ||= i.child_variants_in_stock? }\n elsif self.has_variants?\n self.variants.inject(false) { |any, i| an... |
07167d49fd2f155d5245990d1c3cd09c | Page through the results. Due heavy use of the API, this method takes a qps parameter to control how often the API is called. | [
{
"docid": "381908c8894df40c0a70a1754c7f78c5",
"score": "0.73347646",
"text": "def fetch_all(qps=DEFAULT_QUERIES_PER_SECOND)\n response = execute\n items = response['items']\n\n while response['current_page'] < response['total_pages']\n self.page = response['current_page'] + 1\n ... | [
{
"docid": "c4df938acc46a3f5361616c960343ef6",
"score": "0.7146698",
"text": "def page\n raise 'page() requires a block' unless block_given?\n\n response = yield(1)\n num_records = response['size']\n\n if num_records.is_a?(Integer) && num_records > 25\n pages = (num_records / 25) + 1... |
217935b1a9ed3ff3532cd87d7c6754d8 | Returns an array of listings based on the last fetch if fetch is empty then will trigger a fetch | [
{
"docid": "054385c41fc40bcdc84d7216e6d02020",
"score": "0.6413799",
"text": "def fetch_listings(format=nil)\n result = nil\n raw = fetch_raw(format)\n case self.format\n when 'xml'\n # parse xml raw\n result = XmlSimple.xml_in raw, { 'ForceArray' => false, 'AttrPrefix'... | [
{
"docid": "73445c8d105c06a9147901622ef2785a",
"score": "0.6142964",
"text": "def fetch\n fetch_response.results\n end",
"title": ""
},
{
"docid": "2e1b77dcd9b104293baa2d527e3fe1da",
"score": "0.61230737",
"text": "def fetch_outlets(outlet: nil, limit_num: 6)\n if outlet\n ... |
0b0b1ca21b0b5dff73f52a5f2b009c97 | starts the server in the development mode | [
{
"docid": "58f670777d6ae01a671893ef0af2a98c",
"score": "0.73408395",
"text": "def devel_mode()\n\tputs \"Development Mode\\n\"\n\tsystem(\"cd ./src; rackup -E development -p 8080 -s Puma\")\nend",
"title": ""
}
] | [
{
"docid": "0fda1be95ac5f6e86f0e9538b50e013e",
"score": "0.7468701",
"text": "def start!(env=:production)\n environment(env).start!\n end",
"title": ""
},
{
"docid": "a731cdbd35a5022d996833fa12e6af15",
"score": "0.7418931",
"text": "def development!\n @production = false... |
1617ea78b4f46017cd7cf294147e70f4 | Send to all clients on a specific channel | [
{
"docid": "f31fd4fe5a16df66a18d48ec6d229c4c",
"score": "0.5591375",
"text": "def send_raw_to_channel c, channel, raw, double = true\n if channel_format?(channel) then\n if @channels.include? channel then\n\tif @clients[c][:channels].include? channel then\n\t @channels[channel][:clients].each d... | [
{
"docid": "8c6e12953c0435882c6240ce85e700e9",
"score": "0.74887115",
"text": "def send_all(message)\n @clients.each do |websocket, client|\n websocket.send message\n end\n puts \"send_all: #{message}\"\n end",
"title": ""
},
{
"docid": "8533b2dff40a32b87ad84705d8ba8260",
... |
d2ac88415a89a6bf99e888f85d1a985d | DELETE /software/1 DELETE /software/1.json | [
{
"docid": "4b897dee406e5541550f8149249e9f69",
"score": "0.7165515",
"text": "def destroy\n @software = Software.find(params[:id])\n @software.destroy\n\n respond_to do |format|\n format.html { redirect_to admin_softwares_path }\n format.json { head :no_content }\n end\n end",
... | [
{
"docid": "b1a17c1ee1af05c79fe156622df44818",
"score": "0.73162013",
"text": "def delete(path)\n begin\n response = client[path].delete :accept => 'application/json'\n rescue Exception => e\n puts e.inspect\n end\n end",
"title": ""
},
{
"docid": ... |
c91e99acb643a77ec9f259a70c764db9 | "two sort a list, merge the sorted left half of the list with the sorted right half of the list" | [
{
"docid": "6ed4923def0c5206ff0fd73cc37c8369",
"score": "0.0",
"text": "def merge_sort(ary)\n if ary.size <= 1\n ary\n else\n ary_1 = ary[0...ary.size / 2]\n ary_2 = ary[ary.size / 2...ary.length]\n merge(merge_sort(ary_1), merge_sort(ary_2))\n end\nend",
"title": ""
}
] | [
{
"docid": "abbfce6bca43058bb607ecce60445a02",
"score": "0.8230345",
"text": "def merge_sort(list)\n return list if list.size < 2\n left = list[0, list.length/2]\n right = list[list.length/2, list.length]\n\n merge(merge_sort(left), merge_sort(right))\nend",
"title": ""
},
{
"docid": "7b... |
aa63e62fb6057b7cd0bdc4e0dc8d68e3 | Save data to RDB | [
{
"docid": "9858b7d6e940a43f8196dd8b2ef7e7d3",
"score": "0.0",
"text": "def save(data)\n url = data[:url]\n message = data[:message]\n key = message[:key] || url\n response = data[:response]\n headers = response.headers\n body = response.body\n Page.creat... | [
{
"docid": "4c3f875be05bae6500a11eab5c0d0bf0",
"score": "0.7466411",
"text": "def save\n @backend.write_db(@name)\n\n self\n end",
"title": ""
},
{
"docid": "f5650de46c00191012b842ec1426af9c",
"score": "0.73108894",
"text": "def save\n File.open( @dbname, \"w\" ) ... |
7524293aff3a88248388986266cb00d0 | returns a name that looks like a file name except for capitalization | [
{
"docid": "9cded31148672735b44d01f9ce7da76f",
"score": "0.0",
"text": "def getPageKey\n if @formatted_name.nil?\n @formatted_name = @humanly_name.split(/\\./)[0].gsub(%r{\\s},WHITE_SPACE).gsub(%r{[/<>+]}, WHITE_SPACE).downcase + '.' + @file_extension\n end\n return @formatted_... | [
{
"docid": "165ec4e21c80d6a24b7d575ecff121df",
"score": "0.7905351",
"text": "def file_name\n name.underscore\n end",
"title": ""
},
{
"docid": "28000f7c40649942f3c228cbb3fdc7a2",
"score": "0.7832275",
"text": "def file_to_name(file)\n return file.split(\"_\").map(&:capita... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "0e7b7d3a1d0de4984780949a02c273bc",
"score": "0.0",
"text": "def it_service_params\n params.require(:it_service).permit(:name, :description, :rate, :active)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7495027",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.69566035",
"text": "def strong_params\n params.require(:request).permit(param_whit... |
21494e28ee24987997189838fb4589e5 | DELETE /characters/1 DELETE /characters/1.json | [
{
"docid": "6602dec34d43961163673137e27a2f92",
"score": "0.769231",
"text": "def destroy\n @character.destroy\n respond_to do |format|\n format.html { redirect_to characters_url }\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "2039ee448a66550a1a9c94675c804e5d",
"score": "0.7627626",
"text": "def destroy\n @character = Character.find(params[:id])\n @character.destroy\n\n respond_to do |format|\n format.html { redirect_to characters_url }\n format.json { head :ok }\n end\n end",
"title": "... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "a16d8b0c2c6e95304cabd117b9e9e4fb",
"score": "0.0",
"text": "def set_raw_youtube\n @raw_youtube = RawYoutube.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.60339177",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.60135007",
"text": "d... |
8dbeee50989296d6267288b13ab0062c | create advance fee transaction receipt data record | [
{
"docid": "a48c5a30faadd4c3959747d1de432b1b",
"score": "0.7721481",
"text": "def create_advance_fee_transaction_record\n receipt_template_id = fetch_reciept_template_config.present? ? fetch_reciept_template_config.fee_receipt_template_id : nil\n fees_account_id = fetch_account_config.present? ? f... | [
{
"docid": "470d7dbfa99192581e13aa475856db2d",
"score": "0.7013228",
"text": "def create_the_transaction_data\n receipt_set = fetch_receipt_config\n receipt_number_set = receipt_set.present? ? receipt_set.receipt_number_set : nil\n receipt = TransactionReceipt.safely_create(receipt_number_set)\... |
c171415d8eabbd73886403be7e6e9ea4 | GET /conclusions GET /conclusions.json | [
{
"docid": "333579593c6430fb17e24481702e5f8f",
"score": "0.76549166",
"text": "def index\n @conclusions = Conclusion.all\n end",
"title": ""
}
] | [
{
"docid": "288876bd7d95fd2e126f8bc13c253b22",
"score": "0.74211544",
"text": "def index\n @exclusions = Exclusion.all\n end",
"title": ""
},
{
"docid": "946ce50568551b42c55f581622ffce87",
"score": "0.69482636",
"text": "def exclusions\n @exclusions ||= []\n end",
"ti... |
2a3d2920854abba154046ee3e25b90f3 | POST /items POST /items.json | [
{
"docid": "9c6b097f34c124eef801659e2fcd513c",
"score": "0.0",
"text": "def create\n @item = Item.new(params[:item])\n\n respond_to do |format|\n #if @item.save\n #\n # format.html { redirect_to @item, notice: 'Item was successfully created.' }\n # format.json { render json: ... | [
{
"docid": "1a87b6b1a8f3fc007c549688390eae3f",
"score": "0.75517005",
"text": "def create_item\n item = @list.items.create(:title => params[:title], :details => params[:details], :deadline => params[:deadline], :tags => params[:tags])\n render json: { item: item }\n end",
"title": ""
},
{... |
c61659075f3411fe9785342c8d0b347b | Gets the allowFormatCells property value. Represents the worksheet protection option of allowing formatting cells. | [
{
"docid": "baf6a5522dc377041ac53e2cd4bbdbd8",
"score": "0.7494204",
"text": "def allow_format_cells\n return @allow_format_cells\n end",
"title": ""
}
] | [
{
"docid": "4509848578a35b9dc7b73f209782d02d",
"score": "0.69725764",
"text": "def allow_format_cells=(value)\n @allow_format_cells = value\n end",
"title": ""
},
{
"docid": "e941206cd60c75f3604b1a8e247fdf15",
"score": "0.6170597",
"text": "def allow_format_... |
99187f019337f8ca4e9629fe7f1b2ece | store a html version of _self_ marked up for syntax highlighting | [
{
"docid": "d4a7156b51a6cb3af223aada69b4f0a5",
"score": "0.6488877",
"text": "def syntax_up()\n doc = Hpricot(self.gsub(/\\t/,\" \" * options[:tab_stop] ).to_s )\n d = doc.search(\"/code\")\n if d.any? then\n c = d.first\n else\n @html = self.to_s\n return @html\n end\n\n ... | [
{
"docid": "43ece825474005c0bdbbcdad3491f8d2",
"score": "0.68820363",
"text": "def editorial_markup\r\n\t\r\n\tend",
"title": ""
},
{
"docid": "196e8f1dad4247e04f3a7a02a53429fd",
"score": "0.6728049",
"text": "def html_markup_html(text); end",
"title": ""
},
{
"docid": "d... |
434389e68f452e74436cd8472265c0a9 | Room where you begin in | [
{
"docid": "b2d4b495d7875e25eb4c8bd9609d6798",
"score": "0.57599634",
"text": "def main_room\n main = L.new(:name => \"the Main Room\")\n main.east = L.new(:name => \"the East Room\", :items => [BallaAssSpoon.new, CrystalBall.new])\n main.east.south = L.new(:name => \"a creepy dungeon\")\n m... | [
{
"docid": "d22836a1caec327f8956369ecbdcdfd7",
"score": "0.7327802",
"text": "def start_room\n\t\t@path.start.room\n\tend",
"title": ""
},
{
"docid": "64b7ea09256993ea277eb864247f2230",
"score": "0.6947798",
"text": "def start_room\n self[@compute_start_room[]]\n end",
"t... |
ee5dba080bd641991ae3c23e2715c115 | bench mark total year1 deliverables value | [
{
"docid": "adc1ed9b5a185d98315e29646185d299",
"score": "0.72283745",
"text": "def benchyear1\n @benchyear1 = @benchsubtotal3 + @benchmobilisation + @benchtupe\n end",
"title": ""
}
] | [
{
"docid": "4f13d5536654d6dcb9f854db811f68a6",
"score": "0.72406507",
"text": "def benchyear1total\n @benchyear1total = @benchyear1 + @benchmanage + @benchcorporate\n end",
"title": ""
},
{
"docid": "b0f8b0f03e5db62ca1cf3e8ca4025864",
"score": "0.7056574",
"text": "def benchy... |
18d9decca3950b1977df178a2a2116ea | DELETE /users/1 DELETE /users/1.xml | [
{
"docid": "bcb44062aa85173741865492b002c308",
"score": "0.0",
"text": "def destroy\n @parallel_management = ParallelConfiguration.find(params[:id])\n @parallel_management.destroy\n\n respond_to do |format|\n format.html { redirect_to(parallel_managements_url) }\n format.xml { head :... | [
{
"docid": "d29aa233ddb4837c263e69069aaa2550",
"score": "0.771627",
"text": "def user_delete(username)\n make_request(:delete,\"#{user_url(username)}.xml\")\n end",
"title": ""
},
{
"docid": "76704cc378f6c8f5f8049e9a28db23c1",
"score": "0.715287",
"text": "def destroy\n @u... |
8e0d3b92b18a70eacd5d0ef34c58ad67 | return a new board | [
{
"docid": "afc8ced39e47289610f0900c07052400",
"score": "0.0",
"text": "def new_board\n #the board array, true: the block is taken; false: the block is not taken\n #the order for the array value is referring to the block location as following:\n #[r1-c1, r1-c2, r1-c3, r2-c1, r2-c2, r2-c3, r3-c1, r3-c... | [
{
"docid": "f18aca231ec0a3e942c145c0956988cf",
"score": "0.8396671",
"text": "def new_board\n\t board = self.class.new\n\t board.state = @state.dup\n\t board.turn = @turn.dup\n\t return board\n \tend",
"title": ""
},
{
"docid": "ed365b3b57a3573cd627a2289cb16f68",
"score": "0... |
142b8dd75a1a6dd4fa4889413c87188e | Return base unit class. | [
{
"docid": "a98c859f9f084ac00ad40f2a0c42d68f",
"score": "0.58513564",
"text": "def base\n @base\n end",
"title": ""
}
] | [
{
"docid": "c6829fbe1a5c5694981f1520441be162",
"score": "0.7648388",
"text": "def unit_class\n UNIT_CLASSES[ @type ]\n end",
"title": ""
},
{
"docid": "ab3338ea4a4f4dfe7e181f07fae90083",
"score": "0.73176163",
"text": "def base_unit\n units[0]\n end",
"title": ""
},... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "1dfdb7357be036f9dc9d828c3433614d",
"score": "0.0",
"text": "def attempt_params\n params.require(:attempt).permit(:name, :start, :end, :robot_id, :mission_id, :tracker_id, :uploadxml,:uploadjson, :uploadxml_a_id, :upload_timestamp)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7497761",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.6959097",
"text": "def strong_params\n params.require(:request).permit(param_white... |
20db5aecd2038f9d34e604f3086abc87 | Run a command under PowerShell via FFI This implementation requires the managed dll and native wrapper to be in the library search path on Windows (i.e. c:\windows\system32 or in the same location as ruby.exe). Requires: .NET Framework 4.0 or higher on the target machine. | [
{
"docid": "89f4d2466b9b7cfaf8350bb853de8636",
"score": "0.49340957",
"text": "def initialize(script)\n raise \"Chef::PowerShell can only be used on the Windows platform.\" unless RUBY_PLATFORM.match?(/mswin|mingw32|windows/)\n\n exec(script)\n end",
"title": ""
}
] | [
{
"docid": "ae50566a380139c21ca3b015ae5e6f79",
"score": "0.5764627",
"text": "def powershell_builder(venomstring)\n # venomstring should be the arguments needed for msfvenom to build the base payload/shellcode ('-p <payload> LHOST=<ip> LPORT=<port>'\n shellcode=\"#{`#{MSFPATH}/msfv... |
68eaddfbef636152abe01d276a7eb4d0 | Use execute instead of executeUpdate. | [
{
"docid": "bf3f61389cc73aa02f162e6ad0622ca1",
"score": "0.0",
"text": "def execute_prepared_statement_insert(stmt)\n stmt.execute\n end",
"title": ""
}
] | [
{
"docid": "23c1d433f681bd66f43091c1858bce87",
"score": "0.74183786",
"text": "def execute!\n execute\n end",
"title": ""
},
{
"docid": "da88a55c00f81a3274307f656059e79a",
"score": "0.74083453",
"text": "def executeUpdate(sql) \n @Handle.execute(sql)\n end",
"... |
83859f2a97c824f1c7c7c6c6b82160ae | DELETE /time_blocks/1 DELETE /time_blocks/1.xml | [
{
"docid": "c19150c1c1bdf851f34cd72438adb346",
"score": "0.73992836",
"text": "def destroy\n @time_block = TimeBlock.find(params[:id])\n @time_block.destroy\n\n respond_to do |format|\n format.html { redirect_to(time_blocks_url) }\n format.xml { head :ok }\n end\n end",
"titl... | [
{
"docid": "7d4ac0ff5288ec481204fd6f9df1088e",
"score": "0.7221098",
"text": "def destroy\n @time_block = @shop.time_blocks.find(params[:id])\n @time_block.destroy\n\n respond_to do |format|\n format.html { redirect_to(shop_time_blocks_url) }\n format.xml { head :ok }\n end\n end... |
24aa395a47219de8a0dcb3c44ad8149a | DELETE /sushi_images/1 DELETE /sushi_images/1.xml | [
{
"docid": "9253bb05ef779bec8ba9d93c6deb7dcf",
"score": "0.7338501",
"text": "def destroy\n @sushi_image = SushiImage.find(params[:id])\n @sushi_image.destroy\n\n respond_to do |format|\n format.html { redirect_to(sushi_images_url) }\n format.xml { head :ok }\n end\n end",
"t... | [
{
"docid": "e33f242b37af43369183ed6142762c65",
"score": "0.74600405",
"text": "def destroy\n @image = Image.find(params[:id])\n @image.destroy\n @image.delete_img(@image.name)\n \n respond_to do |format|\n format.html { redirect_to(images_url) }\n format.xml { head :ok }\n e... |
9e35f0a933f3fc3c086f504aadc46893 | Gets the parent post of a post. | [
{
"docid": "c3be4a2c675fad64120542dd15bbba5e",
"score": "0.90771234",
"text": "def parent_of(post)\n posts.find { |t| t.id == post.parent_post }\n end",
"title": ""
}
] | [
{
"docid": "c430c0cc5dfbe993c9b8dabbfc502328",
"score": "0.76506245",
"text": "def parent_posts\n posts.find_all { |p| p.parent_post.nil? }\n end",
"title": ""
},
{
"docid": "eff2a641774b4c47e26599d0f9639ed3",
"score": "0.7525205",
"text": "def parent_post\n self.post_acti... |
e20f9a9dbea048c94d380b0043eb38da | returns the IDs of Reservations made from the (block_id) | [
{
"docid": "34a953badbc685e49639dc43724752cc",
"score": "0.0",
"text": "def room_no_check(room_no)\n bool = (1..20).cover? room_no\n raise ArgumentError, 'Not a valid room number' unless bool\n end",
"title": ""
}
] | [
{
"docid": "1870b5a0508c5ab1c3bece696329ad8b",
"score": "0.80843776",
"text": "def booked_ids(block_id, _room_count)\n check_block(block_id)\n booked_from_block = @reservations.select(&:block_id)\n unless booked_from_block.nil?\n booked_rooms = booked_from_block.map(&:rooms)\n ... |
8b5bd92f72e3cd226e1d06c952f7098b | Gets the defenderSecurityCenterBlockExploitProtectionOverride property value. Indicates whether or not to block user from overriding Exploit Protection settings. | [
{
"docid": "348ca2725cb62e126402964ca859974b",
"score": "0.8025449",
"text": "def defender_security_center_block_exploit_protection_override\n return @defender_security_center_block_exploit_protection_override\n end",
"title": ""
}
] | [
{
"docid": "dc8212ecf353fcd04c9fc8793b119609",
"score": "0.76861644",
"text": "def defender_security_center_block_exploit_protection_override=(value)\n @defender_security_center_block_exploit_protection_override = value\n end",
"title": ""
},
{
"docid": "f68ca4ccac3... |
c2e0a221baf16ed66c5773ee22b5edff | Throws an exception if the vector_length does not match this canvas' width. source://chunky_png//lib/chunky_png/canvas.rb354 | [
{
"docid": "15435bc91a4cfa9ca1c752326b680ad9",
"score": "0.69533837",
"text": "def assert_width!(vector_length); end",
"title": ""
}
] | [
{
"docid": "b3e6706e02133ec1c590775df94b5305",
"score": "0.7603301",
"text": "def assert_width!(vector_length)\n if width != vector_length\n raise ChunkyPNG::ExpectationFailed,\n \"The length of the vector (#{vector_length}) does not match the canvas width (#{width})!\"\n end\n... |
bdeb476d3821681c80e6e6d64db54f68 | The IPv6 addresses associated with the network interface. | [
{
"docid": "d41ad33ada6a4bb025d6cfbea90e3743",
"score": "0.8681962",
"text": "def ipv_6_addresses\n data[:ipv_6_addresses]\n end",
"title": ""
}
] | [
{
"docid": "ead5889d2e2a52aa17768e2ca8a9ea26",
"score": "0.8820054",
"text": "def ipv_6_addresses\n data.ipv_6_addresses\n end",
"title": ""
},
{
"docid": "aba6abacabb4e837abedb31422039963",
"score": "0.8029088",
"text": "def ipv6_addresses\n addresses.select { |address| a... |
16984f4a2efc9ce881d09ba73044ea3e | Check a HTML element exists or not Example: assert_exists("label", "receipt_date") assert_exists(:span, :receipt_date) | [
{
"docid": "de0364378a3ff3d0c30614e7759b1a22",
"score": "0.68796957",
"text": "def assert_exists(tag, element_id) {}\n begin\n assert eval(\"#{tag}(:id, '#{element_id.to_s}').exists?\")\n rescue => e\n raise \"Element '#{tag}' with id: '#{element_id}' not found, #{e}\"\n end... | [
{
"docid": "5f67f573d73b07e0f911d43ef58d34e6",
"score": "0.7284667",
"text": "def existence_check\n raise Bewildr::ElementDoesntExist unless exists?\n end",
"title": ""
},
{
"docid": "f3c84449439ebb505772610edddd89ef",
"score": "0.7190533",
"text": "def element_exists? locato... |
4a673995d099d2ceedfe1eae806c758e | DELETE /creditors/1 DELETE /creditors/1.json | [
{
"docid": "d5d4e67ebdf7acbc9012c37c6dcf3864",
"score": "0.7355292",
"text": "def destroy\n @creditor.destroy\n respond_to do |format|\n format.html { redirect_to creditors_url, notice: 'Creditor was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"tit... | [
{
"docid": "5579ba77cb46691e3cd64ba6d6483f9b",
"score": "0.7239579",
"text": "def destroy\n @credito = Credito.find(params[:id])\n @credito.destroy\n\n respond_to do |format|\n format.html { redirect_to creditos_url }\n format.json { head :no_content }\n end\n end",
"title": "... |
98c531e03f3662ce069738a08f124f8a | GET /evenements/new GET /evenements/new.json | [
{
"docid": "2b302d6775f042f831a5a2d9b596f0f4",
"score": "0.74156666",
"text": "def new\n @evenement = Evenement.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @evenement }\n end\n end",
"title": ""
}
] | [
{
"docid": "59ff1435ccbb93de62c82ee03bd2d12e",
"score": "0.7111783",
"text": "def create\n @evenement = Evenement.new(params[:evenement])\n\n respond_to do |format|\n if @evenement.save\n format.html { redirect_to evenements_path, notice: 'Evenement was successfully created.' }\n ... |
8ca211fa16bdd9ad15d08145bdc90ce5 | Create a new BlockVar node. source://syntax_tree//lib/syntax_tree/dsl.rb149 | [
{
"docid": "e14336bf6d569038bbe19e4c6db001d2",
"score": "0.70111054",
"text": "def BlockVar(params, locals); end",
"title": ""
}
] | [
{
"docid": "bd95d9d636d26e4d02f944296697e128",
"score": "0.7741352",
"text": "def visit_block_var(node); end",
"title": ""
},
{
"docid": "2ffa0128f5fe9486ea668d83d27931b9",
"score": "0.7212395",
"text": "def BlockVar(params, locals)\n BlockVar.new(params: params, locals: locals,... |
7789f3bfff0f9ef12138252edca65331 | Sobrecarga del operador de igualdad. Se determina que dos objetos son iguales si su pregunta y respuestas coinciden. | [
{
"docid": "81147eff328056505db7a16b286ef0e8",
"score": "0.52630895",
"text": "def == (objetoExamen)\n if @pregunta == objetoExamen.pregunta && @respuestas == objetoExamen.respuestas then\n return true\n else\n return false\n end\n end",
"title": ""
}
] | [
{
"docid": "5544b3de1669ca2582cab5b78cb4cb22",
"score": "0.600427",
"text": "def checar_pes(objetos)\n @no_ar = true\n objetos.each do |objeto|\n @no_ar = false if tocando?(objeto)\n end\n end",
"title": ""
},
{
"docid": "62dcb05f5a95d4ef259d13bcdec83b68",
"score": "0.5963... |
5eb69a64bfec10944c9eddbeec24ef6c | DELETE /formularios/1 DELETE /formularios/1.json | [
{
"docid": "c506a619a7eb49c36a390ab3d40aa9f6",
"score": "0.74316627",
"text": "def destroy\n @formulario.destroy\n respond_to do |format|\n format.html { redirect_to formularios_url, notice: 'Formulario was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
... | [
{
"docid": "c1a6fd71d53643fe861e7eadfaac028a",
"score": "0.76868254",
"text": "def destroy\n @formulario = Formulario.find(params[:id])\n @formulario.destroy\n\n respond_to do |format|\n format.html { redirect_to formularios_url }\n format.json { head :no_content }\n end\n end",
... |
6a9925a51dbede9742117d8177f799a7 | Returns the numeric PID read from the file or `nil` if the file does not exist. If you do not have permission to access the file `nil` is returned. | [
{
"docid": "2718fc23f7bccfca99083c6c1b0f5659",
"score": "0.8644829",
"text": "def pid\n fn = filename\n Integer(File.read(fn).strip) if File.exist?(fn)\n rescue Errno::EACCES => err\n logger.error \"You do not have access to the PID file at \" \\\n \"#{fn.inspect}: #{err.messag... | [
{
"docid": "aea518c00fcafa7c9f2af7ef0b3b7eac",
"score": "0.8658443",
"text": "def pid\n return nil unless File.exists?(@pid_file)\n begin\n value_from_file = File.read(@pid_file)\n rescue Errno::ENOENT\n return nil\n end\n\n if /\\A\\d+\\z/.match(value_from_file)\n return v... |
76d97150cf6e3f6c457d6ca83dd3e6fb | puts team_colors("Brooklyn Nets") team_names returns the team names (FAILED 4) | [
{
"docid": "c772dd730ede9e9f18d5c42cfd1f9d64",
"score": "0.0",
"text": "def team_names()\n temp =[]\n game_hash.each do |location, team_data|\n #binding.pry\n temp << team_data[:team_name]\n end\n temp\nend",
"title": ""
}
] | [
{
"docid": "17c92fd64901f7fb51414a4e333626ad",
"score": "0.78381556",
"text": "def team_colors(team_name)\n found_team = all_team_info(team_name)\n found_team[:colors]\nend",
"title": ""
},
{
"docid": "9368075e5361d732d994ab00d5c4e53c",
"score": "0.7677372",
"text": "def team_color... |
19f8a5800d5f1a242c05c13c98a9d420 | POST /arrest_record_and_conducts POST /arrest_record_and_conducts.json | [
{
"docid": "099461a74fe1242fac8a4886631925be",
"score": "0.66214514",
"text": "def create\n @arrest_record_and_conduct = ArrestRecordAndConduct.new(params[:arrest_record_and_conduct])\n\n respond_to do |format|\n if @arrest_record_and_conduct.save\n format.html { redirect_to @arrest_re... | [
{
"docid": "793b65befc7196556c8209a6b88d0d68",
"score": "0.62451977",
"text": "def new\n @arrest_record_and_conduct = ArrestRecordAndConduct.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @arrest_record_and_conduct }\n end\n end",
"title"... |
59d52a828d43e33dfba3b96ced0eac4b | Can be nil in some cases if not requestable? if requestable?, should be an array of Strings. This just returns BD location labels, see also pickup_location_data to return labels and codes. | [
{
"docid": "14fd822924ae1aef8fcfe81018a18c42",
"score": "0.5160943",
"text": "def pickup_locations\n response_hash[\"PickupLocation\"] && response_hash[\"PickupLocation\"].collect {|h| h[\"PickupLocationDescription\"] }\n end",
"title": ""
}
] | [
{
"docid": "b510b75e1f2edb2499bb25cb00e75538",
"score": "0.6242214",
"text": "def get_available_labels(request)\n http_request = request.to_http_info(@api_client.config)\n make_request(http_request, :GET, 'AvailableLabelsList')\n end",
"title": ""
},
{
"docid": "151dc423c9fc5391... |
606860a75d7723e872a02d27d68ca5ac | POST /direcciones_entregas POST /direcciones_entregas.json | [
{
"docid": "12ed06e318f1cad60cffe65d52d2e96c",
"score": "0.7250206",
"text": "def create\n @direcciones_entrega = current_user.direcciones_entregas.build(direcciones_entrega_params)\n\n respond_to do |format|\n if @direcciones_entrega.save\n format.html { redirect_to @direcciones_entre... | [
{
"docid": "e0eb0eacb8ce344af82d72d1bc3474d1",
"score": "0.666747",
"text": "def direcciones_entrega_params\n params.require(:direcciones_entrega).permit(:estado, :municipio, :colonia, :numero, :cp, :telefono, :notas, :user_id)\n end",
"title": ""
},
{
"docid": "2a71a96c412440bbc66d7... |