query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
1e29a2cfd6f102842c1b9382a9a6d2d3 | GET /raiway_stations/1 GET /raiway_stations/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "b8bcd5e6dbfbac3a0647e2133d5379f4",
"score": "0.7561904",
"text": "def get_stations\n CF::Station.get(\"/lines/#{ACCOUNT_NAME}/#{self.title.downcase}/stations.json\")\n end",
"title": ""
},
{
"docid": "8e185c0c59609fc75bc22757e0d1d761",
"score": "0.7389459",
"text"... |
1b0c515c49c3a5849b66e6758dae9da4 | Boo! It depends on fixedorder arguments | [
{
"docid": "7e96a9341c57c9dbaa797b4c498a264d",
"score": "0.0",
"text": "def initialize(chainring, cog, wheel)\n @chainring = chainring\n @cog = cog\n @wheel = wheel\n end",
"title": ""
}
] | [
{
"docid": "3ebee0d00844fcce4c9b8b344d9b4485",
"score": "0.6919011",
"text": "def order=(_arg0); end",
"title": ""
},
{
"docid": "0f33faf524bc34be174a79409aee798c",
"score": "0.6407679",
"text": "def entry_order=(_arg0); end",
"title": ""
},
{
"docid": "aa6a87115e88c31182... |
4ff47d53ce47b0c655f3ca38ac422ee7 | get array of all businessdocumentpositions VAT amounts one array element per VAT type ToDo: make this work > one row per vat_id with sums of vat, use the decorator | [
{
"docid": "b846bc10f580723a3cdb503b12423ddc",
"score": "0.7504971",
"text": "def vat_sums\n vats = []\n businessdocumentpositions.joins(:vat).select(\"vat_id as vatname, sum(price_cents) as vat_sum\").group(\"vat_id\").each do |vat_pos|\n vats << { \"#{vat_pos.vatname}\" => vat_pos.vat... | [
{
"docid": "6c5a919001161fd8daeae50409993921",
"score": "0.71972084",
"text": "def vat_sum\n businessdocumentpositions.to_a.sum(&:total_vat_amount)\n end",
"title": ""
},
{
"docid": "b1ba4608dd442f8982e96238df8d8af3",
"score": "0.64974153",
"text": "def vat_amount()\n self... |
26b03f03198848980c8bd5381834521e | DELETE /registerd_users/1 DELETE /registerd_users/1.json | [
{
"docid": "95f6cdea32842068232f249db7ff8bbd",
"score": "0.7523688",
"text": "def destroy\r\n @registerd_user = RegisterdUser.find(params[:id])\r\n @registerd_user.destroy\r\n\r\n respond_to do |format|\r\n format.html { redirect_to registerd_users_url }\r\n format.json { head :no_con... | [
{
"docid": "8e69eb3ff3374e0db6fa9eb17958df65",
"score": "0.76619536",
"text": "def DeleteUser id\n \n APICall(path: \"users/#{id}.json\",method: 'DELETE')\n \n end",
"title": ""
},
{
"docid": "95f7909f2d660a9b4f3be6031cc3886e",
"score": "0.74665326",
"text":... |
772f30526aab7082f9c238d738996c55 | Write current commit (made by chefjenkins) into a file, which will read by next build | [
{
"docid": "a1aa28bdf3ac95febb8619312c2b1c1c",
"score": "0.776672",
"text": "def write_current_commit(path=Chef::Config[:jenkins][:repo_dir])\n File.open(File.join(path, \".chef_jenkins_last_commit\"), \"w\") do |f|\n f.print(current_commit)\n end\n @git.add(File.join(path, \".chef... | [
{
"docid": "ed6c23906876f954ff7ed5a30ed3ba81",
"score": "0.64949346",
"text": "def save_last_nightlies_success_git_commit_hash(platform)\n last = last_git_commit\n unique_file = platform ? platform.downcase + '-' : ''\n file_name = 'last-' + unique_file + 'nightlies-success-git-commit-hash.txt'\n Fi... |
b5fc4de8b21874c909ba7a38542b33c3 | Returns the bit at the given bit position if it exists, otherwise returns an unwritable bit | [
{
"docid": "893ba9195af0a0bb3ab6564436e22114",
"score": "0.73595136",
"text": "def bit_at_position(i)\n reg = regs.find { |reg| reg_contains_position?(reg, i) }\n if reg\n reg[i - bit_shift_for_reg(reg)]\n else\n dummy_bit\n end\n end",
"title": ""
... | [
{
"docid": "eb0b9c596b319e6d24d8674cef35db75",
"score": "0.7289041",
"text": "def getbit(key, offset)\n node_for(key).getbit(key, offset)\n end",
"title": ""
},
{
"docid": "289fea78ce0fe3ff6a6c9461b6659b0a",
"score": "0.7159108",
"text": "def getbit(key, offset); end",
"t... |
3b4a3e8c0a67f510930af4dec6d963b9 | POST /desease_record_notes POST /desease_record_notes.json | [
{
"docid": "d5db768eeb26c2c9c54c7fe961009a72",
"score": "0.7374133",
"text": "def create\n @desease_record_note = DeseaseRecordNote.new(desease_record_note_params)\n\n respond_to do |format|\n if @desease_record_note.save\n format.html { redirect_to @desease_record_note.desease_record,... | [
{
"docid": "c28da94a4c7775939d8abf691631bd48",
"score": "0.70059144",
"text": "def desease_record_note_params\n params.require(:desease_record_note).permit(:record_date, :dynamics, :etc, :destination, :desease_record_id)\n end",
"title": ""
},
{
"docid": "7403a3200e2f70fea98ac97d8ef8... |
d50ff757707f8623f1f3b8de4a6df000 | POST /evaluators POST /evaluators.xml | [
{
"docid": "da9103cf91008fcda6123924bc3a1275",
"score": "0.5828644",
"text": "def create\n @evaluator.owner_id = current_user.id\n @evaluator.accessible = [:owner_id] if can? :transfer, @evaluator # free to give others an evaluator to own\n @evaluator.attributes = params[:evaluator]\n\n resp... | [
{
"docid": "e9b2dc61c49b09d82dad6724bfc20372",
"score": "0.6374229",
"text": "def index\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @evaluators }\n end\n end",
"title": ""
},
{
"docid": "f6cc26910819bd4b10ebb6bf5abda429",
"sco... |
57e9639c65287f75b80fc0d7fb7e7f9d | Combined accessor, returns Pos object with given pos_id or name | [
{
"docid": "616f6b9d9e0eb6094033cc3226fd3209",
"score": "0.7892415",
"text": "def [](name_or_id)\n get_pos_by_name(name_or_id) || get_pos_by_id(name_or_id) || raise(PosNotFound)\n end",
"title": ""
}
] | [
{
"docid": "033e8f0058ea666ba4af209d29da8f14",
"score": "0.7171987",
"text": "def get_pos_by_id(pos_id)\n pos_id = pos_id.to_i rescue 0\n @@pos_table.each do |k, v|\n return v if v.pos_id == pos_id\n end\n nil\n end",
"title": ""
},
{
"docid": "6229fb22534475b6c... |
a6066d942963628117045f807f006d9a | Takes first two cards with matching numbers, removes them from hand, and adds them to Card.played | [
{
"docid": "70d5f39a25826b78e5bd5ec5d0e5e8e0",
"score": "0.77821344",
"text": "def play_pairs(match_num)\n 2.times do\n card = hand.find {|card| card.number == match_num}\n Card.played << hand.delete(card) if card\n end\n @score += 1\n end",
"title": ""
}
] | [
{
"docid": "4fbbe32f814e3258dcfc8f81cca16d16",
"score": "0.7107987",
"text": "def deal_cards(old_deck, num_cards)\n hand = old_deck.sample(num_cards)\n new_deck = old_deck - hand\n return [hand, new_deck]\nend",
"title": ""
},
{
"docid": "889e82a4bc0c9f222e26b028845d9973",
"score": "0... |
3a96260188ff60958c2f742c4a9462f2 | Instantiate new instances of the best packagers for this system. | [
{
"docid": "1e3949cf90f174df3e89c45c93a6a74d",
"score": "0.7297779",
"text": "def packagers_for_system\n @packagers_for_system ||= Packager.for_current_system.map { |p| p.new(self) }\n end",
"title": ""
}
] | [
{
"docid": "df2fcb1e1853d8b3c87f7bd0d2bb890f",
"score": "0.6346937",
"text": "def create_managers\n @managers = configuration.managers.each_with_object({}) do |(name, configurator), hash|\n hash[name] = ObjectManager.new(name, self, &configurator)\n end\n end",
"title": ""
},
... |
ac1d0fe2bce96be05e8a975f4987935b | Given a set of PMIDs this should go and get the PubMed text for the PMIDs in blocks of chunk_size PMIDs at a time | [
{
"docid": "fa217dbfb7caa639801dadf9175498fd",
"score": "0.7511417",
"text": "def get_bulk_pmText(pmids,chunk_size)\n # puts \"Get bulk for #{pmids}, chunk #{chunk_size}\"\n pmid_list = pmids.split(',')\n new_pmid_list = Array.new\n results = Array.new\n\n # first check each PMID to see i... | [
{
"docid": "6ee8f6a2fa0bf85d12f27e414629a1f0",
"score": "0.5705745",
"text": "def FetchPublicationData(pubmed_ids)\n theCnt = 0\n theSize = 499\n theEnd = 0\n foundPubs=[]\n while theCnt < pubmed_ids.length do\n theEnd = theCnt+theSize\n theEnd = pubmed_ids.length-1 if theEnd > pubmed_ids.len... |
ff9be9117558b8e6d2102166cea86655 | Renders all +prodiuct+ records as JSON | [
{
"docid": "833feba829b426bdfad19fa48726a8a5",
"score": "0.6069333",
"text": "def index\n @products = Product.all\n render formats: :json\n end",
"title": ""
}
] | [
{
"docid": "52b9edc4c8c16f8b4967f58ec6f270b6",
"score": "0.6734416",
"text": "def json\n render json: ProfilesDatatable.new(view_context)\n end",
"title": ""
},
{
"docid": "8c1f13581e9874ee211a3ac2f604d8d8",
"score": "0.6673163",
"text": "def index\n #binding.pry\n #@progec... |
d3f3612c4d718bfd30f37a4c260cf0e3 | Change the existing object attribute to blank to run allow blank validation. It uses the same logic as :allow_nil. | [
{
"docid": "d544b5b55b97c5f61cf867bd7a9866f7",
"score": "0.70280135",
"text": "def allow_blank?\n return true unless @options.key?(:allow_blank)\n\n begin\n @existing.update_attribute(@attribute, '')\n rescue ::ActiveRecord::StatementInvalid => e\n ... | [
{
"docid": "a5330f5d0171ba6f30b3591c20d8fa9a",
"score": "0.7941663",
"text": "def allow_blank!\n @allow_blank = true\n self\n end",
"title": ""
},
{
"docid": "817328aa9fd828f454b88c3efa2951ed",
"score": "0.77397853",
"text": "def reject_blank!\n @allow_blank... |
6e8c544088b5f510175aa1ecf07efe6d | Calculates the cost of all recipe ingrediants from the highest buy order on the market | [
{
"docid": "cf04b12d621880096ab312ff4fb6911b",
"score": "0.0",
"text": "def calc_crafting_profit id\n response = RestClient.get(\"http://www.gw2spidy.com/api/v0.9/json/recipe/#{id}\")\n if response.code != 200\n return\n end\n itemData = JSON.parse(response)\n \n profit = (itemData[\"result\"][... | [
{
"docid": "ac4d0d00618efaa188a493584857af39",
"score": "0.7018062",
"text": "def calc_cost(ingredient_costs)\n ingredient_costs.inject(0){|sum,x| sum + x.total_cost }.round(2)\n end",
"title": ""
},
{
"docid": "d7216dc3a8d5602e3e7b2a2372671a75",
"score": "0.6959372",
"text": "de... |
dc0327f604d4629dfcb5953e8c6098e5 | Creates an instance of a MSSQL exploit module. | [
{
"docid": "d0cca9f52d333dd6896631e38d61e17d",
"score": "0.5658884",
"text": "def initialize(info = {})\n\t\tsuper\n\n\t\t# Register the options that all MSSQL exploits may make use of.\n\t\tregister_options(\n\t\t\t[\n\t\t\t\tOpt::RHOST,\n\t\t\t\tOpt::RPORT(1433),\n\t\t\t], Msf::Exploit::Remote::MSSQL)... | [
{
"docid": "5cc08701b17377edeb8517b267c3e46e",
"score": "0.60891324",
"text": "def initialize(info = {})\n super\n\n # Register the options that all MSSQL exploits may make use of.\n register_options(\n [\n Opt::RHOST,\n Opt::RPORT(1433),\n OptString.new('USERNAME', [ ... |
1fc2d1df2b1f6f7aace16fe24a1215c1 | because of normalization (of send), slot_definition is called first, to assign the block to a variable. This means we do the compiler here (rather than to_mom, which is in fact never called) | [
{
"docid": "dc18ad8884b6bfbb5dcc39b5398ba66e",
"score": "0.71522784",
"text": "def slot_definition(compiler)\n return Mom::SlotDefinition.new(Mom::BlockConstant.new(parfait_block(compiler)) , [])\n end",
"title": ""
}
] | [
{
"docid": "3af51b778040fcab83b25c9a366ae09d",
"score": "0.6145851",
"text": "def to_mom( compiler )\n parfait_block = self.parfait_block(compiler)\n block_compiler = Risc::BlockCompiler.new( parfait_block , compiler.get_method )\n head = body.to_mom( block_compiler )\n block_compile... |
605a96d48626e801f2f199b987fcabbf | checks to see if attributes from lastfm are populated | [
{
"docid": "6343987f145f9b6aa0d82fb208384afc",
"score": "0.7462978",
"text": "def has_lastfm_data?\n attrs = [:listeners, :plays]\n attr_vals = []\n attrs.each do |attr|\n attr_vals << self.send(attr).present?\n end \n attr_vals.all?\n end",
"title": ""
}
] | [
{
"docid": "8195e487639eaa444ecd6dac3715efa3",
"score": "0.66075736",
"text": "def lastfm?; lastfm.present? end",
"title": ""
},
{
"docid": "5d14b4962fac5e1accc2143320dbef6d",
"score": "0.6578523",
"text": "def check_extra_attributes\n parse_bm_data($data_skills)\n parse_bm_dat... |
42f238cfc701f6869d6c18041161e010 | POST /roles POST /roles.json | [
{
"docid": "e4c0247e57e229538816549b315c1688",
"score": "0.63838494",
"text": "def create\n @role = Role.new(role_params)\n\n respond_to do |format|\n if @role.save\n format.html { redirect_to @role, notice: 'Rol creado satisfactoriamente.' }\n format.json { render action: 'show... | [
{
"docid": "29c22daa375300a27752baf2b9173746",
"score": "0.7770003",
"text": "def create\n @roles = Role.create!(role_params)\n json_response(@roles, :created)\n end",
"title": ""
},
{
"docid": "3d80ad5e777a351b109e129199ac716d",
"score": "0.742797",
"text": "def create(option... |
9738469221b5f6d6af191ec9249780ad | DELETE /itens_faturas/1 DELETE /itens_faturas/1.json | [
{
"docid": "d8af5d9e273d1a8f3eb51d71e5849155",
"score": "0.7225252",
"text": "def destroy\n @itens_fatura.destroy\n respond_to do |format|\n format.html { redirect_to fatura_itens_faturas_url(@fatura), notice: 'Item da fatura foi apagado com sucesso.' }\n format.json { head :no_content }... | [
{
"docid": "ea920e9ea2a2ddebf0581389ac94f9f0",
"score": "0.74425834",
"text": "def destroy\n @fatura = Fatura.find(params[:id])\n @fatura.destroy\n\n respond_to do |format|\n format.html { redirect_to faturas_url }\n format.json { head :no_content }\n end\n end",
"title": ""
... |
f4ca47749b949fbb9ea5e273242b001c | todo: What if form_data is blank | [
{
"docid": "a202bf374175c3d665208fde8c481dcc",
"score": "0.0",
"text": "def grade(given_answer, user = nil, given_comment = nil)\n grade_report = QuestionGradeReport.new\n\n case self.question_type\n when \"single\"\n #puts \"Grading single choice question\"\n grade_report = gra... | [
{
"docid": "7f4062295ce1779b92f25a3123e93f85",
"score": "0.82983065",
"text": "def form_data?; end",
"title": ""
},
{
"docid": "aa93d6d797d334174f3d5e16032a9fc9",
"score": "0.74193484",
"text": "def form_data=(data)\n @form_data = data if data\n end",
"title": ""
},
{
... |
2903e970b7a85b2f92654f54f2792103 | Get Thumb Params by Conversion Profile ID | [
{
"docid": "71d86120c5c5bbc73553eceb1003028c",
"score": "0.6691008",
"text": "def get_by_conversion_profile_id(conversion_profile_id)\n\t\t\tkparams = {}\n\t\t\tclient.add_param(kparams, 'conversionProfileId', conversion_profile_id);\n\t\t\tclient.queue_service_action_call('thumbparams', 'getByConversio... | [
{
"docid": "1859eb3844a57d923216b58b349db5c9",
"score": "0.6338153",
"text": "def get(id)\n\t\t\tkparams = {}\n\t\t\tclient.add_param(kparams, 'id', id);\n\t\t\tclient.queue_service_action_call('thumbparamsoutput', 'get', kparams);\n\t\t\tif (client.is_multirequest)\n\t\t\t\treturn nil;\n\t\t\tend\n\t\t... |
d44285968829a253b62e2ec14e6ea838 | metodos get y set productos | [
{
"docid": "c6b6f8ec4152a3784e91860114732bfc",
"score": "0.0",
"text": "def Obteneryear()\n\t@year\nend",
"title": ""
}
] | [
{
"docid": "a1f8402523165408c7201f00568d2364",
"score": "0.7683786",
"text": "def productos=(value)\n\n\t\t@productos = value\n\tend",
"title": ""
},
{
"docid": "46db66c29a654a8e87836378c872b2d1",
"score": "0.7667737",
"text": "def set_producto\n \n end",
"title": ""
},
... |
a2099a77c85e91272ae2f9e35b937953 | Only allow a trusted parameter "white list" through. | [
{
"docid": "5f76d677d62e8e25d375dc95431d190c",
"score": "0.0",
"text": "def round_params\n params[:round]\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7943618",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "f6060519cb0c56a439976f0c978690db",
"score": "0.69572574",
"text": "def permitted_params\n params.permit!\n end",
"title"... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "c44bf854d407241686c9b88c0a787e99",
"score": "0.0",
"text": "def research_interest_params\n params.require(:research_interest).permit(:research_introduciton, :research_topic, :research_topic_en, :research_details, :research_details_en, :current_projects)\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... |
b5c7cb1db2353ab9a938ab3f4aa99ba1 | Catches the case that the call's first argument is nil in which case two things can be happening 1. The call is referencing an instance variable OR 2. the call is making an external method call | [
{
"docid": "e1a2e7c01720460a69b3686a8e34eb92",
"score": "0.0",
"text": "def catch_nil(sexp, var)\n if sexp[1].nil?\n if @model.columns.map{|x| x.name.to_sym}.include? sexp[2] then \n\tpk(\"?\" + sexp[2].to_s)\n\treturn true\n else\n\tbegin \n\t ruby2kif(@instance_name.instance_method(sexp[... | [
{
"docid": "17aa2efab8b4c5093ddd9f2ec4107b30",
"score": "0.6504983",
"text": "def called_from=(_arg0); end",
"title": ""
},
{
"docid": "17aa2efab8b4c5093ddd9f2ec4107b30",
"score": "0.6504983",
"text": "def called_from=(_arg0); end",
"title": ""
},
{
"docid": "cc4255e7295e... |
bd3a7dfddc30bc69012064ac1ec450c4 | Given a hash with numeric values, return the key for the smallest value | [
{
"docid": "e115bdd792ba2dd11a4766509cf62a3a",
"score": "0.0",
"text": "def key_for_min_value(name_hash)\n @val_array = []\n if name_hash.empty?\n nil\n else\n name_hash.collect do |key, value|\n @val_array << value\n end\n @val_array.each_with_index do |value, index|\n if (@val... | [
{
"docid": "10348c0f7efbf074c6402f6f47742839",
"score": "0.8821222",
"text": "def key_for_min_value(hash)\n lowest_key = nil\n lowest_value = Float::INFINITY\n hash.each do |key, value|\n if value < lowest_value\n lowest_value = value\n lowest_key = key\n end\n end\n lowest_key\nend... |
2daaac09bcc6444315f6189b2eaf6bbc | Every method that is declared below will be automatically executed when the generator is run | [
{
"docid": "0d4e9a397bfc84dfe893854445993562",
"score": "0.0",
"text": "def copy_initializer_file\n copy_file 'pivotaltracker_initializer.rb', 'config/initializers/pivotaltracker.rb'\n end",
"title": ""
}
] | [
{
"docid": "555d450cff8a919c0bff752c3ee9ddfe",
"score": "0.7872419",
"text": "def generator; end",
"title": ""
},
{
"docid": "555d450cff8a919c0bff752c3ee9ddfe",
"score": "0.7872419",
"text": "def generator; end",
"title": ""
},
{
"docid": "555d450cff8a919c0bff752c3ee9ddfe... |
9b73ccf4facc32ca7bd31ae9b9b3b3d9 | Formats the actual timecode output from the number of frames | [
{
"docid": "f553d03f9d03c319a7355361e7577f4e",
"score": "0.59053016",
"text": "def _nudge\n frames = @total\n secs = (@total.to_f/@fps).floor\n frames-=(secs*@fps)\n mins = (secs/60).floor\n secs -= (mins*60)\n hrs = (mins/60).floor\n mins-= (hrs*60)\n \n raise RangeError, \"M... | [
{
"docid": "81056e93db87b26fa321fd0594f398be",
"score": "0.69423455",
"text": "def timecode_frames_to_smpte(frame_count, fps, is_drop=false)\n\n if is_drop == true\n frames_seperator = ';'\n frames_dropped = 2\n else\n frames_seperator = ':'\n frames_dropped = 0\n end\n\n fps = fps_norma... |
ddf00bb1e573676ada39dceb9920dd85 | save/update json document in db based on attributes if this is new object instance _id attribute will be added to attributes | [
{
"docid": "862d48357d63af6809b71a7e9d43fe8c",
"score": "0.783563",
"text": "def save\n collection = Object.const_get(self.class.name).send(:collection)\n\n if @attributes.include? '_id'\n collection.update({'_id' => @attributes['_id']}, @attributes, {:upsert => true})\n else\n id = c... | [
{
"docid": "b3a34b1ab798354a1b9693b538bfd73e",
"score": "0.7036634",
"text": "def save\n if @json_dict.fetch(@id_property, false)\n _change\n else\n _create\n end\n end",
"title": ""
},
{
"docid": "1ebdaaad95a866f1afe5deec7181496c",
"score": "0.70238197",
... |
337a3d1fba16be3a87d9cfba23b0f3c5 | Truncates workflow history to a specified event id. | [
{
"docid": "7c9446a1c79ed4d268cb502985dc2b52",
"score": "0.62535805",
"text": "def truncate_history(events, replay_upto = nil)\n return nil if events.nil? || events.empty?\n\n # Just return the original array of events if replay_upto is not set\n # or if the number of events i... | [
{
"docid": "f8fe4e005deafea80b9be51460c07f44",
"score": "0.59569436",
"text": "def history_destroy\n SygiopsSupport::History.remove(self.class.to_s, id)\n end",
"title": ""
},
{
"docid": "4bd782c74f6f0b12c9da67d0a737b65a",
"score": "0.57673436",
"text": "def delete(id)\n wf_... |
bc5fe525cd27917a0f866276480a203f | check if cell has the looked char and mark as used if it does | [
{
"docid": "95753353458d5e23c66cbb0e4d5168b9",
"score": "0.6395416",
"text": "def check_char(x, y, len, hei, board, control, char)\n return false unless safe(x, y, len, hei, control)\n\n # puts \" - searching: #{char} in [#{x}, #{y}] --> #{board[y][x]}\"\n\n if board[y][x] == char\n # puts \" - ... | [
{
"docid": "d6f69a6650540763a4f02d671c6721e1",
"score": "0.66916084",
"text": "def valid_move?(row, column)\n\t\t# Check if the cell is empty, return boolean for loop purposes\n\t\tcel = self.instance_variable_get(\"@#{row}\")[column.to_sym]\n\t\tif cel == \" \"\n\t\t\treturn true\n\t\telsif cel == nil\... |
60e39189f839348e350a8f513a33ffe5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| END FROM PEEPCODE ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| | [
{
"docid": "c3cf3f76f80822aaf539b544011c7fcb",
"score": "0.0",
"text": "def register_timeslots_from_cart(cart, user)\n # this is the big transfer of info from the non-persistent cart\n # to the persistent registration store\n # orders are really just to record cash transactions -- the goal\n ... | [
{
"docid": "9face4c59377a50f46b8111c475917dd",
"score": "0.60464096",
"text": "def build_end\n @code << <<-CODE\n\t \t\t\treturn result\n\t\t\tend\t\n\t\tCODE\n end",
"title": ""
},
{
"docid": "3755a1771fb32b64be424cdaeb24d4d6",
"score": "0.59304994",
"text": "def end(p0) end",
... |
5404b82c7e3af1eb13208fdf086c1cdb | GET /sites_services/new GET /sites_services/new.xml | [
{
"docid": "4150a022e539c442af283c009945dfa2",
"score": "0.78414553",
"text": "def new\n @sites_service = SitesService.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @sites_service }\n end\n end",
"title": ""
}
] | [
{
"docid": "9efdead299d336fb2fa195a83b548141",
"score": "0.7194794",
"text": "def service_document_new\n puts view_context.service_document_xml(@depositor, request.env[\"HTTP_HOST\"])\n render xml: view_context.service_document_xml(@depositor, request.env[\"HTTP_HOST\"])\n end",
"title": ""
... |
a5c0115b12bd95314dca478c22116847 | format time from seconds | [
{
"docid": "b9ba0c97bd9a9f42ed381482f304b4bd",
"score": "0.6940015",
"text": "def nice_time(time)\n time = time.to_i\n return \"\" if time == 0\n h = time / 3600\n m = (time - (3600 * h)) / 60\n s = time - (3600 * h) - (60 * m)\n good_date(h) + \":\" + good_date(m) + \":\" + good_date(... | [
{
"docid": "11579651122a5575998b8dee4f2fb605",
"score": "0.8295793",
"text": "def format_seconds value\n '%02d:%02d:%02d' % [(value/3600).floor,((value/60)%60).floor,(value%60)]\n end",
"title": ""
},
{
"docid": "bb128b90098d211ee8992eb2abdd354f",
"score": "0.81999743",
"text... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "a95777aad2de3120b2e46c9109843f54",
"score": "0.0",
"text": "def set_votable_item\n @votable_item = VotableItem.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;... |
87e1c8259e0c9f3cc5a6833355debe80 | Show the toplevel Docbones help message. | [
{
"docid": "e90195b5fecd50a1c731af93791aa48f",
"score": "0.75387317",
"text": "def help\n @out.puts <<-MSG\n\n Usage:\n docbones -h/--help\n docbones -v/--version\n docbones command [options] [arguments]\n\n Commands:\n docbones create create a new project from a skeleton\n ... | [
{
"docid": "8340b64372c7d2ff00aeae0122b7e1e8",
"score": "0.78642064",
"text": "def show_help\n puts HELP_MESSAGE\n end",
"title": ""
},
{
"docid": "8340b64372c7d2ff00aeae0122b7e1e8",
"score": "0.78642064",
"text": "def show_help\n puts HELP_MESSAGE\n end",
"title"... |
9070af90ed71d1ce2a5969f5e69afd7d | Returns true if the person has name/address protection. | [
{
"docid": "f065a0052603682212dc8a69c2f60fba",
"score": "0.0",
"text": "def protected?\n get(:beskyt) == '1'\n end",
"title": ""
}
] | [
{
"docid": "68b208c3fa6564fc12bd34723fe6da99",
"score": "0.6941008",
"text": "def permit_access?\n !!@person\n end",
"title": ""
},
{
"docid": "044cff61e6bdfbeed3bcbf62f086201b",
"score": "0.656387",
"text": "def address_required?\n granted? && !flagged?\n end",
"titl... |
5ea852b42622dd20a591112c874f39db | default a new objectives's position to the max position + 1 for the goal | [
{
"docid": "43c1fdd14dab6027ab6d872893a23f96",
"score": "0.83549756",
"text": "def set_position \n if goal.objectives.reload.present?\n self.position = goal.objectives.maximum(:position) + 1\n else\n self.position = 1\n end\n end",
"title": ""
}
] | [
{
"docid": "a92460589b22e6e302aa96d28cf5359f",
"score": "0.7513653",
"text": "def add_position\n self.position = self.max_position + 1\n end",
"title": ""
},
{
"docid": "a5782bcfbaece0e1d64cb8b6ceef6c1c",
"score": "0.7472326",
"text": "def default_position\n self.position = (T... |
8fae1df1240f426042daddb82e645287 | returns a properly formatted phone number. | [
{
"docid": "2ccf8be1c0c86a10b3aa3785a2446081",
"score": "0.743499",
"text": "def format_phone_number(phone_number_str)\n ret = []\n fin = phone_number_str.split(/\\W+/).join.split(//)\n fin.each do |n|\n ret << n.to_i\n end\n x = ret.first(3)\n y = ret[3..5]\n z = ret.last(4)\nreturn \"(\" + ... | [
{
"docid": "297d413f1e3b14362acdb997f3c6c385",
"score": "0.8860278",
"text": "def formatted_phone_number\n Phonelib.parse(phone_number).local_number\n end",
"title": ""
},
{
"docid": "297d413f1e3b14362acdb997f3c6c385",
"score": "0.8860278",
"text": "def formatted_phone_number\n ... |
c3b893532cf2142b4f1fa96ea58a2c47 | Sets up a propagation context, yielding the block in it. During this propagation stage, all calls to emit and call are stored in an internal hash of the form: target => [forward_sources, signal_sources] where the two +_sources+ are arrays of the form [[source, context], ...] The method returns the resulting hash. Use g... | [
{
"docid": "ef5c62e87f29a5c653b167fce4b37394",
"score": "0.6042076",
"text": "def gather_propagation(initial_set = Hash.new)\n raise InternalError, \"nested call to #gather_propagation\" if gathering?\n\n old_allow_propagation, @allow_propagation = @allow_propagation, true\n\n ... | [
{
"docid": "acc6fe5503badf6a54ba4fa7c4da833e",
"score": "0.7110742",
"text": "def propagation_context(sources)\n raise InternalError, \"not in a gathering context in #fire\" unless gathering?\n\n if sources\n current_sources = @propagation_sources\n @p... |
a19606c2ae540683e4a8785755a84a33 | issues will be placed under this project | [
{
"docid": "cbc21f6f816174a93a915d9c8ed49471",
"score": "0.0",
"text": "def is_process_billable_hours_enabled?\n YAML.load_file(\"#{RAILS_ROOT}/vendor/plugins/support_ticketing_system/sts.yml\")[\"sts\"][\"process_billable_hours_feature\"]\n end",
"title": ""
}
] | [
{
"docid": "d392c27642aeb7089b98ae10bb3c093d",
"score": "0.71675724",
"text": "def open_issues\n project.source.open_issues\n end",
"title": ""
},
{
"docid": "a65c6fa1799d0ddfde12a111adc136d3",
"score": "0.6785069",
"text": "def project_issues(project)\n Issue.where(:proje... |
de5b4f6865b642e897129244c8afbcb0 | Compare your files against each other only | [
{
"docid": "8d5fa260d63e7df9c507556ac8701701",
"score": "0.0",
"text": "def compare_only_header\n return {} unless Config.compare_only\n { 'copyleaks-compare-documents-for-similarity' => '' }\n end",
"title": ""
}
] | [
{
"docid": "4fdd69a9ef07137593493df6f6d72928",
"score": "0.8523466",
"text": "def compare_files\n @files.each do |file|\n compare_file(file)\n end\n end",
"title": ""
},
{
"docid": "e04ad28cb676c8ae36c0390f81dfde2e",
"score": "0.7240083",
"text": "def compare_files\n nee... |
1ff6c80db8e423e64f15e21c46bfdb76 | Delete cache for job id for the job represented by job_key. Call this when the job completes. | [
{
"docid": "8e419af0a24912e7593d5b4796be0b70",
"score": "0.7499064",
"text": "def reset_job_id(job_key:)\n Rails.cache.delete(cache_key(job_key))\n end",
"title": ""
}
] | [
{
"docid": "cc9816a369f3c960ff1e4cbb2ade2fef",
"score": "0.7267508",
"text": "def delete_from_cache(key)\n cache_class.delete(key)\n end",
"title": ""
},
{
"docid": "a7fa1562413541ce8a8e77b4852633fa",
"score": "0.72637135",
"text": "def delete(key)\n @cache.delete(ke... |
7ee300d2a90e252be7b585203402a648 | it can set log levels Logging Messages | [
{
"docid": "ace023d72258bdab5b8eaf61cdb28d2f",
"score": "0.0",
"text": "def mock_io_expecting(matcher)\n mock = double('mock_io')\n mock.should_receive(:puts).with(matcher)\n return mock\n end",
"title": ""
}
] | [
{
"docid": "a41ad0487e194dd2217bda0822fb49cf",
"score": "0.8177288",
"text": "def log_levels=(_arg0); end",
"title": ""
},
{
"docid": "5663ee40b83171559e72185bb4ec1955",
"score": "0.7753522",
"text": "def log_level=(_arg0); end",
"title": ""
},
{
"docid": "5663ee40b831715... |
4fa447de5751a46308a2f3d42ce8a82f | assumes array of arrays, arr[][]. | [
{
"docid": "6b2f41e0225364c16e109e18c35f088d",
"score": "0.0",
"text": "def display_grid(arr)\n puts in_between.center(LINE_WIDTH)\n current_row = 5\n while current_row >= 0\n puts make_row(arr, current_row).center(LINE_WIDTH)\n puts in_between.center(LINE_WIDTH)\n current_row -=... | [
{
"docid": "2ecf2c920c80b47fe9e4f287fa8b4c8c",
"score": "0.6944225",
"text": "def array(arr)\n return arr if arr.nil?\n return arr.kind_of?(Array) ? arr : [arr]\n end",
"title": ""
},
{
"docid": "2463caa687f6940fc6ec115d4588efb7",
"score": "0.6598823",
"text": "def double_arra... |
010bec5321a4ab450e88682faac47086 | GET /prestadores/1 GET /prestadores/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "3a73832c4bfcbe446e6902788ed06b10",
"score": "0.7414786",
"text": "def show\n @prestamo = Prestamo.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @prestamo }\n end\n end",
"title": ""
},
{
"docid": "3a738... |
37313c374373f77f7e978395dd877dc0 | PATCH/PUT /oc_recibidas/1 PATCH/PUT /oc_recibidas/1.json | [
{
"docid": "035f1f1587acd1a6fec7e8cee1972a6b",
"score": "0.7128863",
"text": "def update\n respond_to do |format|\n if @oc_recibida.update(oc_recibida_params)\n format.html { redirect_to @oc_recibida, notice: 'Oc recibida was successfully updated.' }\n format.json { render :show, s... | [
{
"docid": "38cbcdd97f846d0c7d6b44a21ac40355",
"score": "0.6685628",
"text": "def update\n @recibo = Recibo.find(params[:recibo_id])\n @renglon_recibo_doc = @recibo.renglon_recibo_docs.find(params[:id])\n\n respond_to do |format|\n if @renglon_recibo_doc.update_attributes(params[:renglon_r... |
41d0d16ed94216e6d12a02dfca899c75 | Returns the mongo collection for a given queue | [
{
"docid": "79345fe03a4ded50be24778a08cd405d",
"score": "0.93798214",
"text": "def collection_for_queue(queue)\n queue = namespace_queue(queue)\n mongo[queue]\n end",
"title": ""
}
] | [
{
"docid": "358210a10da64226f9d074967a4190a7",
"score": "0.7115283",
"text": "def queues \n mongo.collection_names.\n select { |name| name =~ /resque\\.queues\\./ }.\n collect { |name| name.split(\".\")[2..-1].join('.') }\n end",
"title": ""
},
{
"docid": "0958e6012ccfb3... |
198fe0235db2d4db49b6c1a92db54e12 | =begin takes an array of integers as an argument and returns the sum of its two largest elements. For an empty array it should return zero. For an array with just one element, it should return that element. =end | [
{
"docid": "9c72572206b2065cd5f153e0a29bbafe",
"score": "0.7231537",
"text": "def max_2_sum arr\n result = 0\n unless arr.empty?\n if arr.size == 1\n result = arr[0]\n else \n arr = arr.sort{|x,y| y<=>x}\n result = arr[0]+arr[1]\n end\n end\n return result\nend",
"title":... | [
{
"docid": "c09a72140d35728e4c9bad13d2c0fc7e",
"score": "0.7682833",
"text": "def max_2_sum(array)\n # YOUR CODE HERE\n return 0 if array.empty?\n\treturn array[0] if array.length == 1\n\tar = array.sort\n\tar[-1] + ar[-2]\nend",
"title": ""
},
{
"docid": "9948b2861e2165eaf98bbcd64072f5ad"... |
e1b28d4655a00c0b38e651e4c277a516 | It finds Rente tab after login at top | [
{
"docid": "68a4b9f8260a81ed8a4b09968475c4a2",
"score": "0.63447756",
"text": "def tab_rente\n rente = @wait.until{\n element = @browser.find_element :xpath, '//*[@id=\"ember3\"]/div/div/div/main/header/nav/div[1]/a[3]'\n element if element.displayed?\n }\n return rente\n end",
"... | [
{
"docid": "7746ea4b6c5a7e538c9804ae0d77a6b8",
"score": "0.65251076",
"text": "def tabs()\n search_container.find_element(:id, \"tabs\")\n end",
"title": ""
},
{
"docid": "e4698ec4766cf47156b8fbc8addefd83",
"score": "0.6138664",
"text": "def patrols_tab()\n wait = Sele... |
c8a6b0bafdf5b3ab08e4b9ce8440de57 | TMP!!! Floatround can't take arg!!! FIXME!!! | [
{
"docid": "65544ef44c0587a3b00cb21cfe98aece",
"score": "0.59544283",
"text": "def round(digits=0)\n\t\t\ta = to_ary\n\t\t\tself.class.make(a[0].round, a[1].round)\n\t# self.class.make(a[0].round(digits), a[1].round(digits))\n\t\tend",
"title": ""
}
] | [
{
"docid": "34f6cc7cc348327657c194dad1a35ca8",
"score": "0.7489936",
"text": "def round(value, round); end",
"title": ""
},
{
"docid": "40c09028d45b1fcab931916c727912f7",
"score": "0.74728554",
"text": "def rounding\n Flt::Support::AuxiliarFunctions.detect_float_rounding\n end",
... |
af630984682f1a0b5a68e6092af0d102 | Update properties of this object | [
{
"docid": "48546df41440607620dcc8db8af3ab66",
"score": "0.0",
"text": "def update!(**args)\n @exempted_members = args[:exempted_members] if args.key?(:exempted_members)\n @log_type = args[:log_type] if args.key?(:log_type)\n end",
"title": ""
}
] | [
{
"docid": "184b1b1ed771473d3eb9f338c0734c38",
"score": "0.73066413",
"text": "def update *args\n opts = args.extract_options!\n fill_properties opts\n self.save\n end",
"title": ""
},
{
"docid": "5076c5a88404ae72986f958710f5687a",
"score": "0.72631145",
"text": "def update... |
bd3fb9091ef2022ecddaf4890f31120c | Gets the drives property value. The group's drives. Readonly. | [
{
"docid": "abe2931ab162ce273c1734fe380c058e",
"score": "0.77920204",
"text": "def drives\n return @drives\n end",
"title": ""
}
] | [
{
"docid": "ee819dc727d5bb117895f0df0532f4b7",
"score": "0.7351781",
"text": "def drives=(value)\n @drives = value\n end",
"title": ""
},
{
"docid": "ee819dc727d5bb117895f0df0532f4b7",
"score": "0.7351781",
"text": "def drives=(value)\n @drive... |
e6f1e9fa6c84762c7b3362b41c950100 | this should return an array user[address][street] should return ['user', 'address', 'street'] | [
{
"docid": "d957fb3a3b5b46e18cd32a32ad3981df",
"score": "0.0",
"text": "def parse_key(key)\n key.split(/\\]\\[|\\[|\\]/)\n end",
"title": ""
}
] | [
{
"docid": "281d07fdf1f24185f16859fdc8c66028",
"score": "0.6054745",
"text": "def get_user_data(users, username)\n user_array = []\n users.each do |user|\n if user['username'] == username\n user_array << user['name']\n user_array << user['username']\n user_a... |
eec984a4d1af99cfa911e2da35b74ddf | TODO: remove when Ember App implements DropTarget | [
{
"docid": "859e193d3f3ad018f6b9d0566425046a",
"score": "0.0",
"text": "def aside_after_main_widgets\n drop_targets.where(html_id: \"drop-target-aside-after-main\").first.try(:widgets) || []\n end",
"title": ""
}
] | [
{
"docid": "4d7856dc41034105141464e9b40cf345",
"score": "0.6793071",
"text": "def dropEvent(e)\n super\n \n #get the source widget for the drop event\n #this will be the pizza/chocolate/fish and chips\n #object\n w = e.getSource\n\n #move the food from the plate\n #to the charact... |
ae4bae1d73f735b9b42434a0bb721b00 | Callable with nitem=nil to create a mock | [
{
"docid": "29da86d43daab1a87351534aff1787cd",
"score": "0.65746385",
"text": "def initialize(nitem=nil, ident=nil, type=nil, order=nil)\n if !nitem.nil?\n # path to create a real citem\n fail ArgumentError, \"invalid CItem contruction\" unless ident.nil?\n @nitem = nitem\n defaul... | [
{
"docid": "6172b88ac1e8b11ffc0c1064808e4c18",
"score": "0.5798909",
"text": "def test_Museum_zero_toys\n\td = Minitest::Mock::new \"Driver\"\n\tdef d.location; \"Museum\";\n\tend\n\td.expect :numberOfDinoToys, 0\n\tdef d.numberOfDinoToys=(n); n;\n\tend\n\tassert_equal checkItems(d), 1\nend",
"title... |
4eb128e400c50b1f68013d10a34f2caa | corresponds with the medium in en.yml e.g. 'email', 'sms', 'push', etc. | [
{
"docid": "4b24251045118ab6912d9aeb129b2770",
"score": "0.0",
"text": "def slug\n raise \"slug method is required for #{self.class.name}\"\n end",
"title": ""
}
] | [
{
"docid": "cfd3a806301db5c8667e1bdb47cef93f",
"score": "0.6125775",
"text": "def i18n_key; end",
"title": ""
},
{
"docid": "cfd3a806301db5c8667e1bdb47cef93f",
"score": "0.6125775",
"text": "def i18n_key; end",
"title": ""
},
{
"docid": "cfd3a806301db5c8667e1bdb47cef93f",... |
d1d5cd699eb8410150e95a6593ad07d2 | Returns true if any row, column, or box has duplicates. Otherwise returns false. Duplicates in rows, columns, or boxes are not allowed in Sudoku, so a return value of true means an invalid puzzle. | [
{
"docid": "1b436d38f51676b44f4aa01eaa5bcf89",
"score": "0.8213756",
"text": "def has_duplicates?\n # uniq! returns nil if all the elements in an array are unique.\n # So if uniq! returns something then the board has duplicates.\n 0.upto(8) {|row| return true if rowdigits(row).uniq! }\n ... | [
{
"docid": "a7a3d5ee0683d223038e6d02d784a9f6",
"score": "0.8262336",
"text": "def has_duplicates?\n\n each_row do |row|\n return true unless row.to_a.only_uniq_elements?\n end\n\n each_column do |column|\n return true unless column.to_a.only_uniq_elements?\n end\n\n each_box do... |
67d8677f5113bb73d6ee62612ebd9965 | make [n,h]: a couple of a node and its heuristic | [
{
"docid": "8e56380a5e14ebded84428621a906b97",
"score": "0.70973176",
"text": "def make_NH(node)\r\n [node,manhattan(node,@target)] # the heurostic is manhattan, but could be based on another function\r\n end",
"title": ""
}
] | [
{
"docid": "23261bc737e92ca71a32588cec03896f",
"score": "0.6255881",
"text": "def visit_hshptn(node); end",
"title": ""
},
{
"docid": "4683c2cb5feefddaa6eeeaf405a12c5e",
"score": "0.60071784",
"text": "def build_nodelist(row,col)\n #represents the positions the horse can move to on ... |
f1f80cdfb24ebaa898581256258ac3b5 | Invoke the primary task. In other words, run the generator. | [
{
"docid": "6cdbd9202a71b9cd1ded01bc78d27471",
"score": "0.61644983",
"text": "def invoke\n Rake::Task[name].invoke\n end",
"title": ""
}
] | [
{
"docid": "c067b8564f701cbba44e44697b550296",
"score": "0.7164719",
"text": "def run\n raise 'no block given' unless block_given?\n yield :fail => \"the task maker hasn't implemented #run\"\n end",
"title": ""
},
{
"docid": "3a15fecfa26444017670d6da04113924",
... |
c23af1b2c610fc9847912d4bccbdb4a0 | GET /groups/new GET /groups/new.json | [
{
"docid": "d9f08030a2b2784e70ac8440bcf07bfa",
"score": "0.7868072",
"text": "def new\n @subject = current_background\n @group = @subject.groups.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @group }\n end\n end",
"title": ""
}
] | [
{
"docid": "19b837a2d03ef09a68a0444c9d96f902",
"score": "0.8214509",
"text": "def new\n @group = scoped_groups.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @group }\n end\n end",
"title": ""
},
{
"docid": "9f640e042b091bfd7159f1... |
1bed825f7025d18bf7de90e6512ed674 | DELETE /sla_contracts/1 DELETE /sla_contracts/1.json | [
{
"docid": "5abc1f9795ab0ee03132ae40007b9f03",
"score": "0.76789767",
"text": "def destroy\n @sla_contract.destroy\n respond_to do |format|\n format.html { redirect_to sla_contracts_url, notice: 'Sla contract was successfully destroyed.' }\n format.json { head :no_content }\n end\n e... | [
{
"docid": "8bfedb5c527140b7f8184b593bba98fc",
"score": "0.73046416",
"text": "def destroy\n @subcontract = Subcontract.find(params[:id])\n @subcontract.destroy\n\n respond_to do |format|\n format.html { redirect_to subcontracts_url }\n format.json { head :no_content }\n end\n end... |
5e2b9fef7c6930169c38ce2cdf2a5eec | ^^ whenever you have a method that you will be calling from a view | [
{
"docid": "ebec57721a289b29095034b824cba912",
"score": "0.0",
"text": "def logged_in?\n !!session[:user_id]\n # !!nil = false\n # !!27 - true\n end",
"title": ""
}
] | [
{
"docid": "38354c0dd0c314483e4c023b64e49f68",
"score": "0.7633552",
"text": "def view; end",
"title": ""
},
{
"docid": "38354c0dd0c314483e4c023b64e49f68",
"score": "0.7633552",
"text": "def view; end",
"title": ""
},
{
"docid": "713996e91aba164eef856ba0d17484cf",
"sc... |
59ad7b2c0e4d5b32028055a450106f98 | def address_should_be_presence %w(address_line1 address_line2 address_city address_state address_zip).any? end def expiration read_attribute(:expiration).in_time_zone('UTC') end | [
{
"docid": "a9380ba22a4f605a92808580caf39e76",
"score": "0.0",
"text": "def display_name\n name || email\n end",
"title": ""
}
] | [
{
"docid": "e74eef1970169c65579fa646f2d49276",
"score": "0.59425795",
"text": "def has_address?\n !address.blank? && !city.blank? && !state.blank? && !zip.blank?\n end",
"title": ""
},
{
"docid": "0f871043454b01795e56e40f105283c4",
"score": "0.58550906",
"text": "def valid?\n ... |
2a243dd6dbcb858692fe885b679f2595 | DELETE /sponsor_profiles/1 DELETE /sponsor_profiles/1.json | [
{
"docid": "24dec7f657e1dbf4dadfc3bd5cbe47ee",
"score": "0.79468554",
"text": "def destroy\n @sponsor_profile.destroy\n respond_to do |format|\n format.html { redirect_to sponsor_profiles_url, notice: 'Sponsor profile was successfully destroyed.' }\n format.json { head :no_content }\n ... | [
{
"docid": "c0d2245ab85fe69d01703fa36a4db255",
"score": "0.74466133",
"text": "def destroy\n @recurring_profile = RecurringProfile.find(params[:id])\n @recurring_profile.destroy\n\n respond_to do |format|\n format.html { redirect_to recurring_profiles_url }\n format.json { head :no_co... |
00f52c045a049c56c19169d063c8528c | PUT /places/update PUT /places/update.json place_id is passed as a parameter | [
{
"docid": "e4990325cf6f7f8dfda18edfacf48133",
"score": "0.70018244",
"text": "def update\n if params[:place_id]\n @safe_house = Place.find(params[:place_id])\n place_id_present = true\n end\n\n respond_to do |format|\n if place_id_present && @safe_house.update_attributes( :name ... | [
{
"docid": "d15bfb950d010a38fc3c1397b5665cc6",
"score": "0.8035565",
"text": "def update\n place = Place.find(params[:id])\n\n if place.update_attributes(params[:place])\n head :no_content\n else\n render json: place.errors, status: :unprocessable_entity\n end\n end",
"title":... |
9ac3ee09ce7862339128ac6ffab6e836 | GET /documents/1 GET /documents/1.json | [
{
"docid": "8c46aff265bd44f1a67d8ffc21fad903",
"score": "0.0",
"text": "def show\n authorize @document\n end",
"title": ""
}
] | [
{
"docid": "5ab5cdf24f2601419a6c07b8764a89b9",
"score": "0.7391596",
"text": "def show\n \n @document = Document.find(params[:id])\n \n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @document }\n end\n \n end",
"title": ""
},
{
"do... |
44e35ab1bd8f270b05ccc60da00bd43d | modify the dog name to rex before forwarding the request | [
{
"docid": "ab55eb976f839e4abc842946f41ced27",
"score": "0.59886646",
"text": "def create\n response_from_other_api = forward do |body, path, headers|\n @update_dog_name.call(body, path, headers)\n end\n render_response(response_from_other_api)\n end",
"title": ""
}
] | [
{
"docid": "ef2a32139d26b6da0b1986f892b1427c",
"score": "0.62200534",
"text": "def name=(dog_name)\n @this_dogs_name = dog_name\n end",
"title": ""
},
{
"docid": "63152d29be42a6f2818090b968f83b97",
"score": "0.613141",
"text": "def request_name\n @name.gsub(\"?\", \"+\").gsu... |
83d0596f7ff5f6f7ed0e9a360de0b408 | Output formula sorted with max_reactions left first | [
{
"docid": "e5c1cdee2ed4b9176a7d7a76245efb82",
"score": "0.0",
"text": "def formula_for(qty, desired_element)\n el = @elements[desired_element]\n qty += 1 while (qty % el.min_qty).positive? # Have to create in min quantity multiples\n scale = [qty / el.min_qty, 1].max # Then see if we need to m... | [
{
"docid": "1905e2a27c840e23e1c5478db8c3f9ce",
"score": "0.57137716",
"text": "def funk(x)\n\tmax_funk = x.sort.reverse\n\tputs max_funk[0]\nend",
"title": ""
},
{
"docid": "94ab41b61840e73d5727766688785ad2",
"score": "0.57034117",
"text": "def calculate_line_with_highest_frequency()... |
626cfd82ebc3266fb083a56fb74a20cd | p second_anagram?("gizmo", "sally") => false p second_anagram?("elvis", "lives") | [
{
"docid": "c9b691f4889c83b571b0bcc36785cfc5",
"score": "0.0",
"text": "def third_anagram?(str1, str2) #O(n log n) better than second\n str1.split('').sort == str2.split('').sort\nend",
"title": ""
}
] | [
{
"docid": "25658f488c5949a582a88f3c72ca251b",
"score": "0.8415512",
"text": "def fourth_anagram?(str1, str2)\n\nend",
"title": ""
},
{
"docid": "1fe53cb930a835a7946fece1e84c6cd6",
"score": "0.8407164",
"text": "def third_anagram?(str_1, str_2)\r\n \r\nend",
"title": ""
},
... |
e561e11bcf379ef5dc139c210017366b | Only allow a list of trusted parameters through. | [
{
"docid": "195433ecf3a8c1549f95ee0064fb5733",
"score": "0.0",
"text": "def guide_section_params\n params.require(:guide_section).permit(:anchor, :label, :ordinal, :heading, :body, :public)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7476923",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "36956168ba2889cff7bf17d9f1db41b8",
"score": "0.71697617",
"text": "def set_param_whitelist(*param_list)\n self.param_whitelist ... |
51990d9ee6fa2bf74f89ef59a068bb24 | PATCH/PUT /pincodes/1 PATCH/PUT /pincodes/1.json | [
{
"docid": "ebffe763cfb679a38c809b011239850a",
"score": "0.71307683",
"text": "def update\n respond_to do |format|\n if @pincode.update(pincode_params)\n format.html { redirect_to @pincode, notice: 'Pincode was successfully updated.' }\n format.json { render :show, status: :ok, loc... | [
{
"docid": "51f1f6875c740afe075d590bd2a2ca1b",
"score": "0.69030184",
"text": "def update\nrespond_to do |format|\nif @pin.update(pin_params)\nformat.html { redirect_to @pin, notice: 'Pin was successfully updated.' }\nformat.json { head :no_content }\nelse\nformat.html { render action: 'edit' }\nformat.... |
328a5bd943591e6bb0e2a6bea222e656 | return a single value | [
{
"docid": "439a6d2fac8fe7c6d4f9b2bb38de0137",
"score": "0.0",
"text": "def evaluate(_interpreter, arg_stack)\n args = arg_stack.pop\n\n return @cached unless @cached.nil?\n\n raise BASICRuntimeError.new(:te_args_no_match, @name) unless\n match_args_to_signature(args, @signature1)\n\n r... | [
{
"docid": "395586be5aa00b9483e7cef1ae71b29b",
"score": "0.7673472",
"text": "def value\n @value ||= get(1).to_s\n end",
"title": ""
},
{
"docid": "5f0e154bee5208cbf24506bbdcdb4ee2",
"score": "0.7554155",
"text": "def single_value(opts = nil)\n if r = naked.single_record... |
8757c340e45f1c64375aa647e6e10b0c | GET /comidas/new GET /comidas/new.json | [
{
"docid": "dc4e3159a20e29039d47866394eb71a4",
"score": "0.763732",
"text": "def new\n @comida = Comida.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @comida }\n end\n end",
"title": ""
}
] | [
{
"docid": "ff45d18908a64f526394491e0de97ad1",
"score": "0.74693984",
"text": "def new\n @comuna = Comuna.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @comuna }\n end\n end",
"title": ""
},
{
"docid": "f4ab8a68c43bbc09e7db92877d... |
656e606f5cd34768aaeee5b426828b47 | POST /companies POST /companies.json | [
{
"docid": "2ef9e8739a75be3d6a6748fef32e8afd",
"score": "0.0",
"text": "def create\n\t\t@bandera = 'create'\n\t\t@company = Company.new(company_params)\n\t\t@company.save\n\tend",
"title": ""
}
] | [
{
"docid": "ba8e67048804bdf832261e78aabb42f9",
"score": "0.77965146",
"text": "def create_companies(model) path = \"/api/v2/companies\"\n post(path, model, {}, AvaTax::VERSION) end",
"title": ""
},
{
"docid": "63dc7663332383f54a31f8d5f4a6cc37",
"score": "0.76847976",
... |
672d7a55d16332e7fea3783146b05b12 | Create a docker distribution Trigger an asynchronous create task | [
{
"docid": "643512d7179736d5a7d4937dbab50c7c",
"score": "0.0",
"text": "def distributions_docker_docker_create_with_http_info(data, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: DistributionsApi.distributions_docker_docker_create ...'\n end... | [
{
"docid": "0cf2304881983102cc226716085ffab4",
"score": "0.6357032",
"text": "def create_dependencies task\n project_name = \"minke#{SecureRandom.urlsafe_base64(12)}\".downcase.gsub(/[^0-9a-z ]/i, '')\n network_name = ENV['DOCKER_NETWORK'] ||= \"#{project_name}_default\"\n ENV['DOCKER_PRO... |
24749353a28e7e547542487297d2c573 | Calls the pipeline to perform the processing from built options. | [
{
"docid": "8a7d2f95a44ff796ac511516fcbf5ebc",
"score": "0.7183837",
"text": "def call!(**options)\n Pipeline.new(self.options).call(**options)\n end",
"title": ""
}
] | [
{
"docid": "467eb150d9c120cf1ff046cb1c75f0c9",
"score": "0.72400165",
"text": "def process_options\n end",
"title": ""
},
{
"docid": "467eb150d9c120cf1ff046cb1c75f0c9",
"score": "0.72400165",
"text": "def process_options\n end",
"title": ""
},
{
"docid": "51383bcfe7... |
28050ba4d0c87021c1309b575aad379d | NOTE: keep in mind there is a limit container_listing_limit | [
{
"docid": "75d9532a52203ca9a985521075037a5f",
"score": "0.0",
"text": "def list_objects(container_name, options = {})\n # https://docs.openstack.org/api-ref/object-store/index.html?expanded=show-container-details-and-list-objects-detail\n\n # delimiter: The delimiter is a single character... | [
{
"docid": "ad844068723d91c6cfd211e15170d126",
"score": "0.7128587",
"text": "def get_product_containers(list_page); end",
"title": ""
},
{
"docid": "d5446936ddc14a7a1541b774d891a307",
"score": "0.6524907",
"text": "def list_containers(options = T.unsafe(nil)); end",
"title": ""
... |
409aa1ea7d0a8d7e3e0b4836167d1ee0 | PATCH/PUT /user_info_to_branches/1 PATCH/PUT /user_info_to_branches/1.json | [
{
"docid": "ac1d59718768f929cd020afc2befa243",
"score": "0.7180097",
"text": "def update\n respond_to do |format|\n if @user_info_to_branch.update(user_info_to_branch_params)\n format.html { redirect_to @user_info_to_branch, notice: 'User info to branch was successfully updated.' }\n ... | [
{
"docid": "4931d950f98d4defbb3c10bfd15d9a2e",
"score": "0.68832994",
"text": "def set_user_info_to_branch\n @user_info_to_branch = UserInfoToBranch.find(params[:id])\n end",
"title": ""
},
{
"docid": "10266cdc2acb8e6bcddff4de375daa41",
"score": "0.65993106",
"text": "def upd... |
2e640b2bef72461b3bdb539b1cb136ec | Internal: Helper for getting the configured vmrun_cmd value. Examples | [
{
"docid": "388f83b71ae7f2f1fe55a7e76db06bf9",
"score": "0.8104879",
"text": "def vmrun_cmd\n Fission.config['vmrun_cmd']\n end",
"title": ""
}
] | [
{
"docid": "c85e52b5275e4f63ca27a04c79595694",
"score": "0.8132801",
"text": "def vmrun_cmd\n Fission.config['vmrun_cmd']\n end",
"title": ""
},
{
"docid": "c85e52b5275e4f63ca27a04c79595694",
"score": "0.8132801",
"text": "def vmrun_cmd\n Fission.config['vmrun_cmd']\n ... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "057bb5ce202e1753445a97a33ea15814",
"score": "0.0",
"text": "def user_params\n params.fetch(:user, {})\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.69792545",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6781151",
"text": "def strong_params\n params.requ... |
d6154cdd436dcd86cebb1aadbbce18d2 | Qualifier of the column. Columns in the parent column family that has this exact qualifier are exposed as `.` field. If the qualifier is valid UTF8 string, it will be represented as a UTF8 string. Otherwise, it will represented as a ASCII8BIT string. If the qualifier is not a valid BigQuery field identifier (does not m... | [
{
"docid": "0102a940e1bc88927b91b235a88f5216",
"score": "0.70630634",
"text": "def qualifier\n @gapi.qualifier_string || \\\n Base64.strict_decode64(@gapi.qualifier_encoded.to_s)\n end",
"title": ""
}
] | [
{
"docid": "c96b5c2dbb4eaea279c13efcc05c39e0",
"score": "0.65519226",
"text": "def qualifier regex\n @grpc.column_qualifier_regex_filter = regex\n self\n end",
"title": ""
},
{
"docid": "88e3da6fe1a93ae6d9507e15297870ac",
"score": "0.64295673",
"text": ... |
5808da434ef406b532251bec3952599d | GET /account_petitions/1 GET /account_petitions/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "e55687ad6dd7b927199a71c1464f9813",
"score": "0.7014284",
"text": "def index\n @account_petitions = AccountPetition.all\n end",
"title": ""
},
{
"docid": "6379638e957514df29efd4372e4a43b8",
"score": "0.64190567",
"text": "def index\n @competitions = Competition.all\... |
57715b92fc139b75fbfb2c8d589b077b | This function adds cryptographic settings to the AppleNoteEmbeddedObject. | [
{
"docid": "d75ccf598a57d07391efef5355bf6703",
"score": "0.6551363",
"text": "def add_cryptographic_settings\n @database.execute(\"SELECT ZICCLOUDSYNCINGOBJECT.ZCRYPTOINITIALIZATIONVECTOR, ZICCLOUDSYNCINGOBJECT.ZCRYPTOTAG, \" +\n \"ZICCLOUDSYNCINGOBJECT.ZCRYPTOSALT, ZICCLOUDSYNCI... | [
{
"docid": "82deae72dc4e70ce7b4e9a340da59746",
"score": "0.6473929",
"text": "def add_cryptographic_settings\n @database.execute(\"SELECT ZICCLOUDSYNCINGOBJECT.ZCRYPTOINITIALIZATIONVECTOR, ZICCLOUDSYNCINGOBJECT.ZCRYPTOTAG, \" +\n \"ZICCLOUDSYNCINGOBJECT.ZCRYPTOSALT, ZICCLOUDSYNCI... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "2b8355bd0e789612cb8a52d5a39a4000",
"score": "0.0",
"text": "def user_params\n params.require(:user).permit(:username, :password, :password_confirmation, :email)\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.69792545",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6781151",
"text": "def strong_params\n params.requ... |
17eb2770bf7b2ec7c61de9547c38a109 | Neighbor down fib accelerate (Getter/Setter/Default) | [
{
"docid": "e3344a71876e070591c171851914c319",
"score": "0.7627824",
"text": "def neighbor_down_fib_accelerate\n config_get('bgp', 'neighbor_down_fib_accelerate', @get_args)\n end",
"title": ""
}
] | [
{
"docid": "1311a6c255657ec128f9d4213ab89677",
"score": "0.645399",
"text": "def naive_fib(number)\n return -1 if number < 0\n return 0 if number == 0# && (@operations += 1)\n return 1 if number == 1# && (@operations += 1)\n naive_fib(number-1) + naive_fib(number-2)\nend",
"title": ""
},
{
... |
90289810d7da00c1cd3fc4353a315d37 | DELETE /campanhas/1 DELETE /campanhas/1.json | [
{
"docid": "eaec36285fa6d1bef8ef00e9af887933",
"score": "0.7509902",
"text": "def destroy\n @campanha.destroy\n respond_to do |format|\n format.html { redirect_to campanhas_url, notice: 'Campanha was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"tit... | [
{
"docid": "234bc765c7d2e6e578ca6ca125d95263",
"score": "0.77219045",
"text": "def destroy\n @campanha = Campanha.find(params[:id])\n @campanha.destroy\n\n respond_to do |format|\n format.html { redirect_to campanhas_url }\n format.json { head :no_content }\n end\n end",
"titl... |
00ac313f2115784a89ed7c88db3a6a59 | Listen for messages on network | [
{
"docid": "47b3567b64a2be0cd2c6c1b36c4b5521",
"score": "0.6789267",
"text": "def listen(message)\n @messages << message\n end",
"title": ""
}
] | [
{
"docid": "a42b2a090a00fecd56135f2ad44d4896",
"score": "0.75477546",
"text": "def listen\n end",
"title": ""
},
{
"docid": "5df01caef15afb8cf7e551c91c4f8087",
"score": "0.7526723",
"text": "def listen\n logger.debug \"Listening....\"\n loop do\n logger.debug ... |
d087fe68bc36b64401dfcef40b656afd | Returns the value of attribute path. source://jekyll4.2.2/lib/jekyll/tags/post_url.rb:8 | [
{
"docid": "5005dbbdce255b8ebe9266a7288728ea",
"score": "0.0",
"text": "def path; end",
"title": ""
}
] | [
{
"docid": "fd66eb65c53ad86621cae69dcd0ffa09",
"score": "0.7316115",
"text": "def path\n @attributes[:path]\n end",
"title": ""
},
{
"docid": "fd66eb65c53ad86621cae69dcd0ffa09",
"score": "0.7316115",
"text": "def path\n @attributes[:path]\n end",
"title": ""
},
... |
71a6f9c4df4fc82874d78ccdd76d7a66 | Virtual attribute to provide better UX for inputting a Member's work on a given day. Value is converted into TimeBank.start. | [
{
"docid": "22086e385d9bd4b299d49ad0cba1ccf8",
"score": "0.57013726",
"text": "def date_worked\n @date_worked ||= self.start.to_date\n rescue\n Date.current\n end",
"title": ""
}
] | [
{
"docid": "48b7f12c8cdbe37fdfd09de9fab6be8e",
"score": "0.59317285",
"text": "def day() self end",
"title": ""
},
{
"docid": "2950b7ca65944105fc406050d6fda5fd",
"score": "0.58731085",
"text": "def member=(value)\n if value\n self.member_from = RacingAssociation.current.today... |
e6be21842a73b11b50f95732693aa0f4 | GET /portfolios/1 GET /portfolios/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "cdba1d329718916860bad7ac7c395c72",
"score": "0.77456164",
"text": "def portfolios options = {}\n perform_get(\"/me/portfolios\", options)\n end",
"title": ""
},
{
"docid": "1f97fb1daedfee713b755eb514c13bfb",
"score": "0.7410424",
"text": "def portfolios option... |
aab7ab0babd42cfe0d15db07a53f2ca8 | Converts a hex string into a binary. | [
{
"docid": "ffe18094aea4e91887690e262982bf78",
"score": "0.75675684",
"text": "def hex_to_bin(hex)\n bytes_to_bin(hex_to_bytes(hex))\n end",
"title": ""
}
] | [
{
"docid": "2427b4cf65a654f10fce403f3ab572b7",
"score": "0.76111776",
"text": "def hexToBin(hexStr)\n binStr = \"\"\n \n hexStr.split(\"\").each do |c|\n binStr.concat(decToBin(hexToDec(c)))\n end\n \n return binStr\nend",
"title": ""
},
{
"docid": "3331f18bf40d78adf... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "ed0acc33665950ab17fd5872205081c0",
"score": "0.0",
"text": "def maker_params\n params.require(:maker_deadline).permit(:メーカー ,:期限, :id)\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.69792545",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6781151",
"text": "def strong_params\n params.requ... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "ea45cc9d0fdf848399edbf2a900c60f5",
"score": "0.0",
"text": "def set_task_step\n @task_step = TaskStep.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... |
68c925d10a39ff687f5864142430690a | GET /userls GET /userls.json | [
{
"docid": "c1ddfff03b05ebfae152cca2f5d145f9",
"score": "0.65870905",
"text": "def index\n @userls = Userl.all\n end",
"title": ""
}
] | [
{
"docid": "1b36c6d085c50d9b823abd98e9d4a7dd",
"score": "0.7008105",
"text": "def list_users\n self.class.get('/users')\n end",
"title": ""
},
{
"docid": "8ba52e39ede71c9113da6cb5a5b8257d",
"score": "0.68305373",
"text": "def list\r\n users = User.all\r\n render jso... |
35508ca857c5f558312f5a01da2f7177 | Sets the attribute depth | [
{
"docid": "cb1ce7aafc14dd657a17b7e152d171b0",
"score": "0.61047626",
"text": "def depth=(_arg0); end",
"title": ""
}
] | [
{
"docid": "35d884d86b9d79114b3346fbbcda95f2",
"score": "0.81974703",
"text": "def depth=(new_depth)\n write_attribute depth_field, new_depth\n end",
"title": ""
},
{
"docid": "f87d6206fc7aa8dd86e7f3d01290177f",
"score": "0.7859609",
"text": "def set_depth(depth)\n ... |
a17f3b2e980aff933da580f20c784813 | Stores the callback to be executed asynchronously on executor after it is rejected. Does nothing on fulfillment. | [
{
"docid": "4a20cd88c464088a14cf67d43a293f60",
"score": "0.6191771",
"text": "def on_rejection_using(executor, *args, &callback); end",
"title": ""
}
] | [
{
"docid": "017363c367c9bfff6c94be125a5cac73",
"score": "0.622855",
"text": "def rejected_future(reason, default_executor = T.unsafe(nil)); end",
"title": ""
},
{
"docid": "9d37c8d289dac67c46949f9576d4cd3a",
"score": "0.6025893",
"text": "def callback &block\n return unless bloc... |
49ce2ee4c3a052e69aa9ff1351bee8c2 | receive move should return something like ['A2', 'B3'] | [
{
"docid": "10a1f2bd771d40e495ef7c2c0f7bdfc4",
"score": "0.68486524",
"text": "def receive_move() #a request to move a piece from something to somewhere else\n print \"Where is the piece you want to move (e.g., B2)? \"\n from = gets.chomp.upcase\n valid_selection = false\n until valid_se... | [
{
"docid": "af42802de9a5b1dc700c8e490cffdad7",
"score": "0.68583775",
"text": "def get_move\n print \"Your move, #{@name}\\n\"\n from = select\n to = select\n [from,to]\n end",
"title": ""
},
{
"docid": "2a27bb5e4ab950545169bffeb6a44643",
"score": "0.65893704",
"text": "... |
d41b86b3eb70923a9664afeae5f5bb77 | GET /signups/1 GET /signups/1.json | [
{
"docid": "86f48a3dbeea95b64cc21eff52d8b6bc",
"score": "0.68915915",
"text": "def show\n @signup = Signup.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @signup }\n end\n end",
"title": ""
}
] | [
{
"docid": "a1b9936a6e1271c0df633a75f2524dd8",
"score": "0.72260594",
"text": "def index\n @signups = Signup.where(:user_id => current_user.id)\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @signups }\n end\n end",
"title": ""
},
{
... |