query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "dd3295a13eda559655eb4051e91ebdd7",
"score": "0.0",
"text": "def set_habit_record\n @habit_record = HabitRecord.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.6031952",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.6015048",
"text": "def... |
4eab244dca0e0b85b96c5bbe839da1c4 | Return all numbers not used in that box | [
{
"docid": "a52c8786e7ee87c5af020a63d6f603fd",
"score": "0.0",
"text": "def check_box(row, col)\n @possible_solutions_box = []\n key = \"#{row/3}#{col/3}\"\n (0..9).each do |i|\n if @hash[key].include?(i.to_s) == false\n @possible_solutions_box << i.to_s\n end\n end\n @po... | [
{
"docid": "386404380712db38117a66516d25f273",
"score": "0.63534033",
"text": "def missing(numbers)\n (numbers.first..numbers.last).to_a.select do |current_number|\n !numbers.include?(current_number)\n end\nend",
"title": ""
},
{
"docid": "959cc0f07d9d56013187256273cb7234",
"score":... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "b4e4b90121eb650d60ba8291cb123c07",
"score": "0.0",
"text": "def set_deleteme\n @deleteme = Deleteme.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... |
56b2d710b053e3bc8fdc8252b9fd6b25 | Attributes for site getter | [
{
"docid": "fd448d4be2a0bc7c8d1d9c0dd82d7694",
"score": "0.65036297",
"text": "def attributes_for_site(site)\n atts = site_specific_information || {}\n if atts[site.id.to_s]\n atts[site.id.to_s].reject{|key,value| value.nil? }\n else\n atts[site.id.to_s] = {}\n atts[site.id.to_s]... | [
{
"docid": "99b3f2a8668008a467ee36ce7b87a1b0",
"score": "0.69656277",
"text": "def attributes_for_site(site)\n atts = site_specific_information || {}\n atts[site.id.to_s]\n end",
"title": ""
},
{
"docid": "a4137fe15e26044720a01cc23871e945",
"score": "0.6646718",
"text": "def s... |
7acf804d2af1e6f0526486adbf4f5c6a | The Online Help link | [
{
"docid": "b50ee394f77b269aa19374893e247693",
"score": "0.0",
"text": "def on_online_activate\n\t\t\tRex::Compat.open_browser('http://metasploit.com/framework/support')\n\t\tend",
"title": ""
}
] | [
{
"docid": "6b9f0b79fbe74d63b7a81d790e6ffa9e",
"score": "0.79934716",
"text": "def help_link(help_entry_name=nil)\n docs_url = \"https://docs.megam.co/nilavu\"\n\n if help_entry_name\n docs_url += \"/#{help_entry_name}\"\n link_text = \"Help for #{help_entry_name.underscore_humanize}\"\n... |
a01f9dc26c8503a1bb411afa44215aee | Returns camelized file name of caller (e.g. chunk_insert.rb > ChunkInsert) | [
{
"docid": "f5de304430a16d96e94097b3c59b4277",
"score": "0.69504607",
"text": "def file\n # Find calling file and extract name\n /[\\/]*(\\w+).rb:\\d+:in/.match(relevant_caller)\n name = $1&.camelize || \"Connection\"\n \"#{name}\"\n end",
"title": ""
}
] | [
{
"docid": "30dfb68be1051a5a9e29e987e5b0c2b9",
"score": "0.7814405",
"text": "def calling_file_name\n # rubocop:disable Performance/Caller\n caller[3].split(\":\")[0]\n # rubocop:enable Performance/Caller\n end",
"title": ""
},
{
"docid": "edc71dc98e8d9fe9686d630b8aa2ae5d",... |
0a8a00a0fbbe0d6c1da807aa89d3fc14 | Returns whole configuration data as hash | [
{
"docid": "b5767fe339e269e3c893c06be3e583bd",
"score": "0.66214955",
"text": "def to_hash\n @data\n end",
"title": ""
}
] | [
{
"docid": "66258d9a79a0c8a4a8c3d6b67dc10590",
"score": "0.8433717",
"text": "def to_hash\n @configuration_data\n end",
"title": ""
},
{
"docid": "deb7faf6c4806db7713e4d1b547d2b3b",
"score": "0.8209553",
"text": "def get_hash()\n\t\t\treturn @config.clone()\n\t\tend",
"ti... |
432184c96b8f073303d3cbd89abf2c12 | Implement a method stock_picker that takes in an array of stock prices, one for each hypothetical day. It should return a pair of days representing the best day to buy and the best day to sell. Days start at 0. | [
{
"docid": "b4aa03d2731ae516088f0d906d38f3b0",
"score": "0.7623806",
"text": "def stock_picker(prices)\n\tlargestDiff = 0\n\tbuyDay = 0\n\tsellDay = 0\n\n\tprices.each_with_index do |firstPrice, i|\n\t\tprices.each_with_index do |secondPrice, x|\n next if (i >= x)\n\t\t\tdiff = (secondPrice - first... | [
{
"docid": "68283655ede4f0612cf275005df341d6",
"score": "0.84214264",
"text": "def stock_picker(arr)\n\t#Calculates initial max & min stock prices\n\tmax_digit = -1\n\tmin_digit = 0\n\tmax = arr.sort[max_digit]\n\tmin = arr.sort[min_digit]\n\t#Diff stores differences and buy/sell days for those differen... |
8c0885350be7aeed95a3b90955be23f0 | Postprocesses a name resolution during routing, to allow for substitutions and such based on state information. The most obvious thing to do here is to enforce access control, with a redirect to an :access_denied handler on fail. Return a Node or a handler name (Symbol) to be looked up using handler_for() (on this Node... | [
{
"docid": "1981db4ec9eaaee1e71a2d91d745a05b",
"score": "0.0",
"text": "def authorize( state, route, &block )\n return block.call(state, route) if block\n return @authorizer.call(state, route) if @authorizer\n return self\n end",
"title": ""
}
] | [
{
"docid": "494f9c5c56bd9bfc4d7cead900a0816c",
"score": "0.67539454",
"text": "def process_named_route exp\n process_connect exp\n end",
"title": ""
},
{
"docid": "914a8bd4136686f46ac8c5bffcc05633",
"score": "0.60879093",
"text": "def route( context_route, state )\n return c... |
24784bb8065d96e3a210cb9b36354f98 | Monta o registro segmento A do arquivo | [
{
"docid": "2aa25c9c66381092ba66bd8dcec1bb4b",
"score": "0.6365584",
"text": "def monta_segmento_a(pagamento, nro_lote, sequencial)\n raise Brcobranca::NaoImplementado, 'Sobreescreva este método na classe referente ao banco que você esta criando'\n end",
"title": ""
}
] | [
{
"docid": "26cdde1823e09454311d5e1a7b09caa3",
"score": "0.7043497",
"text": "def monta_segmento_a(pagamento, nro_lote, sequencial)\n segmento_a = '' # Descrição Posição Tamanho\n segmen... |
0411247160f1fca5db105ce7851c4eca | Sets the parent_id (and calculates the full path of parent, so it can be set without any further effort. | [
{
"docid": "2581c51aa5939a8e47e86acf6dd3166d",
"score": "0.80142283",
"text": "def parent_id=(p_id)\n return if p_id.nil? || p_id.empty? || p_id == parent_id\n user_id = @user_obj\n unless user_id\n user_id = @user_id\n if @group_ids\n user_id = @group_ids\n ... | [
{
"docid": "b379292c4b0d8f762706092a0936717c",
"score": "0.8186084",
"text": "def parent_id=(value)\n self[self.nested_set_options[:parent_column]] = value\n end",
"title": ""
},
{
"docid": "8fc33abc7a6f2c8dab2d95fc9c2706b4",
"score": "0.77900755",
"text": "def set_pa... |
6be22ed78fe0cbc819e1d3d6f4b35e69 | GET /variables/1 GET /variables/1.xml | [
{
"docid": "c659505a279eff6cc99ad3a6699044e5",
"score": "0.5579019",
"text": "def show\n @variable = Variable.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @variable }\n format.csv { render :csv => @variable }\n forma... | [
{
"docid": "a1544199513b49fdebbeb254bb639954",
"score": "0.6246988",
"text": "def get_variables\n get_siteinfo('variables')['query']['variables']\n end",
"title": ""
},
{
"docid": "3d303da87d20b1583d01a30d9fa50db6",
"score": "0.6164862",
"text": "def get_variables\n ... |
f907e5876c6e63498bfc5366bc71ac3d | GET /subscribes GET /subscribes.json | [
{
"docid": "50b5434292e39fe017029aa0ef06b5d2",
"score": "0.702268",
"text": "def index\n @subscribes = Subscribe.all\n end",
"title": ""
}
] | [
{
"docid": "5c00e186d4e2351fe4e1ad3758a2c93f",
"score": "0.6956989",
"text": "def subscriptions(query={})\n self.class.get(\"/users/subscriptions.json\", :query => query)\n end",
"title": ""
},
{
"docid": "9f2160eecbc61d2563ad48efbcfcb53d",
"score": "0.6860863",
"text": "def ... |
8675612c44444624cacd32027878f1dd | Method to send a whisper to the specified [User] | [
{
"docid": "0de56e4717b373e08cb7622847bdca07",
"score": "0.74500895",
"text": "def send_whisper(user, message)\n @handler.send_whisper user, message\n end",
"title": ""
}
] | [
{
"docid": "7fb47a72aa96fa4c67e2a01313c4a8a3",
"score": "0.77951455",
"text": "def send_whisper(user, message)\n @bot.message_queue.push(\"PRIVMSG #jtv :/w #{user} #{message}\")\n end",
"title": ""
},
{
"docid": "8e7ed5d490036c6d566a586eb1c929f6",
"score": "0.66120857",
"text... |
236eff8b5182752ec4b16ad928bf4db4 | GET /courses/list/1 GET /courses/list/1.xml | [
{
"docid": "ef6843b484aed42de54efab3d078914b",
"score": "0.0",
"text": "def list\n @course = Course.find(params[:id], \n :include => [:resources, :deliverables, \n {:projects => {:deliverables => [:resources,:collaborators,:tags]}}, \n :tags])\n @other_tags = []\n @course.pro... | [
{
"docid": "6a2681b90796ff49589c22206593e04c",
"score": "0.76029104",
"text": "def get_courses\n\n @courses = Course.all\n\n respond_to do |format|\n format.xml { render :xml => @courses }\n end\n\nend",
"title": ""
},
{
"docid": "8fb0cbe4fa3348f64ebd6a38c69a8d39",
"score": ... |
4f1d887755f375a86e0dc260ca06f3a0 | two ways of invoking a proc | [
{
"docid": "00cd4fe603a74465c0692c07457436d1",
"score": "0.69148976",
"text": "def use_proc\n proc = create_proc\n p proc[10, 3]\n p proc.call(10, 3)\nend",
"title": ""
}
] | [
{
"docid": "f8c92349f2e6cc07f3d3270dce777064",
"score": "0.7225606",
"text": "def call_proc(&prc) #must have a ampersand (to_proc) method\n prc.call\nend",
"title": ""
},
{
"docid": "caad00244cf92d914cb24e2e8b9d18ac",
"score": "0.7191529",
"text": "def call(*args)\n @proc.call(... |
16bb92169213d273a20326ccfeec9221 | Return true if we're in codereloading mode | [
{
"docid": "88c27efc0079146fd7d037d6ca572b94",
"score": "0.0",
"text": "def reloading?\n app_namespace.const_defined?(container_const_name, false)\n end",
"title": ""
}
] | [
{
"docid": "dc106d44c2c5fab76a32069dc4b58037",
"score": "0.6831783",
"text": "def code_reloading?\n environment.code_reloading?\n end",
"title": ""
},
{
"docid": "ca73ba40af1c95e0a3e89eb04358f952",
"score": "0.6731503",
"text": "def precompiled?\n @extname ||= Fi... |
282349efbd15d4f9c9a794e0858e542e | DELETE /organization/1 DELETE /organization/1.json | [
{
"docid": "f0db5de695ce1bd6b1f1560c5129e59b",
"score": "0.0",
"text": "def destroy\n\t\t@other_id = Organization.where(:name => 'Other Institutes').first.id\n\t\t@organization.sw_interactions.update_all(:organization_id => @other_id)\n\t\t@organization.destroy\n\t\trespond_to do |format|\n\t\t\tformat.... | [
{
"docid": "d82bfedb74f5d86d43f3f819517699d7",
"score": "0.78666055",
"text": "def destroy\n @organization = Organization.find(params[:id])\n @organization.destroy\n\n respond_to do |format|\n format.html { redirect_to admin_organizations_url }\n format.json { head :ok }\n end\n e... |
9898f58ada06e31c099815de7402714b | Extend class methods into the including object when including this module. include_class_methods from submodule ClassMethods, if present include_class_methods M1, M2 from specified submodules include_class_methods do defined in a block def some_class_method; end end As usual, submodules must be defined before reference... | [
{
"docid": "041a4e40f54558779c50b94fb541106c",
"score": "0.78505254",
"text": "def include_class_methods (*modules, &block)\n\tif !block && modules.empty? && const_defined?(:ClassMethods)\n\t Extended_Include.include_class_methods self, self::ClassMethods\n\telse Extended_Include.include_class_method... | [
{
"docid": "140e95fc1ce77f502cd61447d1056091",
"score": "0.6818319",
"text": "def extend_below(mod1, mod2)\n singleton_class.include_below(mod1, mod2)\n self\n end",
"title": ""
},
{
"docid": "f22b1566cb47fae1ba0aa4a77c0a8ba9",
"score": "0.68034214",
"text": "def extend_... |
959a9a4f07484a9cee6153f04f51a971 | Smoke Test File! Tests! Test 25851: Verify expected UI of the Manage Group | [
{
"docid": "7c75a3d1b2fd5ad09f344051a2dc188f",
"score": "0.8012088",
"text": "def test_ID_25851_ui_of_the_manage_group\n login_as_user1\n go_to_edit_profile_page\n verify_elements_left_nav \"test_ID_25851_ui_of_the_manage_group\"\n $profile_manage_groups.when_present(60).click\n sleep 5\n... | [
{
"docid": "7074d94816d94b1a70878e6491136ef3",
"score": "0.87282044",
"text": "def atest_ID_25853_manage_groups\n #This test is covered by : test_ID_25851_ui_of_the_manage_group\n end",
"title": ""
},
{
"docid": "69d5dc26b0555ad554893f13081b6401",
"score": "0.8537305",
"text": "d... |
e3193f5f079d9177e6cc9ac0ba26c01d | GET /site_contents GET /site_contents.xml | [
{
"docid": "e4f3a9bdd3667ce806dbe0aed8bdbc95",
"score": "0.73430204",
"text": "def index\n @site_contents = SiteContent.find(:all)\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @site_contents }\n end\n end",
"title": ""
}
] | [
{
"docid": "62282f7b71b7e3f2906de2b931681f06",
"score": "0.72767717",
"text": "def index\n @site_contents = SiteContent.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @site_contents }\n end\n end",
"title": ""
},
{
"docid": "0... |
bbb7e0ec77601edb5f3a70507fcaba95 | Public: Return if the event type is of type 'check_run'; otherwise, | [
{
"docid": "706f312c8db15b499d84c827a70300f3",
"score": "0.726953",
"text": "def check_run?\n github_event == 'check_run'\n end",
"title": ""
}
] | [
{
"docid": "b3d9185c037b6bbd5fc0709f28804084",
"score": "0.7771996",
"text": "def check_run?\n payload_type == 'check_run'\n end",
"title": ""
},
{
"docid": "9b1ad2a7c60a5b504f30db1844c73144",
"score": "0.6477793",
"text": "def run_check(event)\n _workflow.run_check(se... |
4b8e349ad50aeeedde199534c627a7cb | depending on the clk_state if does these things if read is on: 1. load the Addres from the MAR ( MemoryAddresRegister ) 2. load the value at the loaded address 3. store the loaded Value into MDR ( MemoryDataRegister ) if write is on 1. load the Address from MAR 2. load the value from MDR 3. store the value on the previ... | [
{
"docid": "3aca5b76e15fc880f98a19897ebb47ea",
"score": "0.6238979",
"text": "def clk\n raise RuntimeError.new(\"Memory can not read and write at the same time\") if @write == 1 and @read == 1\n\n if @read == 1\n clk_read\n\n elsif @write == 1\n clk_write\n\n else \n ... | [
{
"docid": "e736a528aead90aad2a51d27d321ceb5",
"score": "0.7317274",
"text": "def clk_read\n \n case @clk_state\n\n when 0\n @address = @mar.content.bin_to_dez\n\n when 1\n @value = @memory[@address]\n @value = Array.new @mdr.length, 0 if @value.nil?\n\... |
7316c61f4486432d2f05a30598945a3c | DELETE /product_digitals/1 or /product_digitals/1.json | [
{
"docid": "b5a09fe41fd06151382e4052e71a5014",
"score": "0.6783764",
"text": "def destroy\n @product_digital.destroy\n respond_to do |format|\n format.html { redirect_to product_digitals_url, notice: \"Product digital was successfully destroyed.\" }\n format.json { head :no_content }\n ... | [
{
"docid": "88bdb4c389e134535d7c80164be2eee0",
"score": "0.673874",
"text": "def production_delete(params = {})\n params = params.dup\n production_id = search_hash!(params, :production_id, :productionId, :productionid, :id)\n production_version = search_hash!(params, :production_version, ... |
6d4ed6bd7a0ed9a965557d6446130663 | PATCH/PUT /soundbites/1 PATCH/PUT /soundbites/1.json | [
{
"docid": "ac7a0def0cdd63ad34cbe869cfe76c7c",
"score": "0.70759785",
"text": "def update\n @soundbite = Soundbite.find(params[:id])\n\n if @soundbite.update(soundbite_params)\n head :no_content\n else\n render json: @soundbite.errors, status: :unprocessable_entity\n end\n end",
... | [
{
"docid": "a24a4d1e49094543be13af4a76d434e6",
"score": "0.7166226",
"text": "def update\n @sound = Sound.find(params[:id])\n\n respond_to do |format|\n if @sound.update_attributes(params[:sound])\n format.html { redirect_to @sound, notice: 'Sound was successfully updated.' }\n ... |
dcfb1e8b12cae43d164477dc919f9ac2 | reject_without_hooks! Alias to reject that bypasses hooks. | [
{
"docid": "e6a9d4852a218cb8286bad90b505ad0a",
"score": "0.87782043",
"text": "def reject_without_hooks!\n \n @without_hooks = true\n \n return_value = reject!( & block )\n \n @without_hooks = false\n \n return return_value\n \n end",
"title": ""
}
] | [
{
"docid": "12159dbee4c1941a0b90882db7923a1f",
"score": "0.6561744",
"text": "def my_reject\n end",
"title": ""
},
{
"docid": "a1d454c152c5f508c61534efccf8930a",
"score": "0.6552294",
"text": "def reject!(&block); end",
"title": ""
},
{
"docid": "a0389e17a03579c4bdb8b594... |
bfbcddcc918ef40f76e5014276919dbc | Preview this email at | [
{
"docid": "1e91cfd2266475e0ec8bc2edbeaa750a",
"score": "0.0",
"text": "def confirmacioncotizmescam\n RemisorCotizacionesMailer.confirmacioncotizmescam\n end",
"title": ""
}
] | [
{
"docid": "f4f01bf0c4f6341760a71d13d7b6cc72",
"score": "0.7310511",
"text": "def preview_email\n email = UserMailer.emailing(@emailing)\n mail_inliner = Roadie::Rails::MailInliner.new(email, Rails.application.config.roadie)\n mail = mail_inliner.execute\n\n mail.html_part.decoded.gsub /http... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "d2608f433e10bcd76b03e2907424d2e0",
"score": "0.0",
"text": "def set_review\n @review = Review.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;... |
b6ac987a4eb9ae6b077f455762ce132b | Set the username in a way that ensures consistency | [
{
"docid": "1dd473e3d1bae2e34f90e22b4032edc3",
"score": "0.8032627",
"text": "def username=(un)\n self[:username] = (un.nil? ? nil : un.downcase)\n end",
"title": ""
}
] | [
{
"docid": "fb5d747e628332e28ee6da9a62705f6c",
"score": "0.8559242",
"text": "def user_name_set(name)\n self.username.set name if nil_or_empty?(username[:value])\n end",
"title": ""
},
{
"docid": "cdf463a90bb886c383ed03e82a872b62",
"score": "0.8218442",
"text": "def username=... |
fe03cd64b4df247b2599bd95da93a2be | Fetches all bug ids from bugzilla that have changed since a given time. | [
{
"docid": "3989b6bf83b66ef10f94bf6268bdab3e",
"score": "0.5612054",
"text": "def bugs_changed_since(last_update, options={})\n raise ArgumentError, \"Missing last_update date\" if last_update.nil?\n\n options = {'include_fields' => INCLUDE_FIELDS}.merge(options)\n\n from = last_update.lo... | [
{
"docid": "6d6f10d05443791648cd8456316e9fef",
"score": "0.6095271",
"text": "def bz_bugs(et_bugs, time_diff = 0)\n Array.wrap(et_bugs).reduce([]) do |bugs, et_bug|\n last_change = et_bug.last_updated + time_diff\n bugs << {\n 'id' => et_bug.bug_id,\n 'last_change_time' => xml... |
61fcd18c06b206592efb1752ef7cc6ab | Returns +true+ if there is a decorator with the specified +name+. | [
{
"docid": "9f0e92d06c3c8efda594fa82633248fe",
"score": "0.852046",
"text": "def decorator?( name )\n\t\treturn self.decorators.key?( name.to_sym )\n\tend",
"title": ""
}
] | [
{
"docid": "e857339acd790b0014185f1519a63243",
"score": "0.70276564",
"text": "def decorated_with?(decorator_class); end",
"title": ""
},
{
"docid": "e857339acd790b0014185f1519a63243",
"score": "0.70276564",
"text": "def decorated_with?(decorator_class); end",
"title": ""
},
... |
22cc702d327cef7f31fab962ae575502 | Create a new domain. | [
{
"docid": "9bfa9df7bdc5f1181dadb2dab424fc8e",
"score": "0.7136107",
"text": "def create(app_id_or_app_name, body = {})\n @client.domain.create(app_id_or_app_name, body)\n end",
"title": ""
}
] | [
{
"docid": "a4a26b384fd54b096b941317ce8da7a9",
"score": "0.8595556",
"text": "def create_domain name = nil\n sdb.domains.create(domain_name(name))\n end",
"title": ""
},
{
"docid": "66ae8034a0d929f130c9bd550bcc6e4e",
"score": "0.82378966",
"text": "def create(name)\n ... |
9a25ed00f9249bc22333e71b6c6d485d | Deals random cards in the given sizes of sets, up to the requested number of iterations This can be used for Montecarlo simulations. | [
{
"docid": "9aec7d8154e9c296cb412300e66b8d61",
"score": "0.7236283",
"text": "def montecarlo_sets(set_sizes, dead, num_iter)\n\t\tnum_iter.times do\n\t\t\tused = dead.clone\n\t\t\tsets = []\n\t\t\tset_sizes.each do |size|\n\t\t\t\tset_cards = new_cards\n\t\t\t\tsize.times do\n\t\t\t\t\tadd_random_card_n... | [
{
"docid": "fe3fcf984c73117c06d9f150ff90d7f7",
"score": "0.6948347",
"text": "def generate (cards)\n\t# Card types\n colors = %w{red green purple}\n symbols = %w{diamond squiggle oval}\n fills = %w{filled empty lined}\n numbers = %w{1 2 3}\n\n # Dynamically generate set of cards\n #for... |
236cd3fa35c90b0a85e6131866d25050 | Reload all data from the database This does not change the timeframe | [
{
"docid": "ab2ffc01fdc3c9ef982c08d5cf1ddb61",
"score": "0.0",
"text": "def refresh_data\n @total_companies = Company.all.count\n @current_companies = Company.in_good_standing\n\n # membership applications by state\n ShfApplication.all_states.each do |app_state|\n shf_apps_sta... | [
{
"docid": "253259155ecea36147ebc87353a90e36",
"score": "0.7466075",
"text": "def reload!\n fetch_data!\n end",
"title": ""
},
{
"docid": "4629217aa8412289d25da65ad9dd24fd",
"score": "0.7406495",
"text": "def reload_data\n reset_collection_data\n reload_collecti... |
b2bbc6adc0367876adbc66c973d20656 | because of the differences in month length, all subscriptions with billing date later than the 28th day of the month should be billed on the 28th day of the month | [
{
"docid": "e7e57abbe6483c390c54f87521de4701",
"score": "0.59528035",
"text": "def map_billing_day_to_creation_days(billing_day)\n if billing_day > 28\n []\n elsif billing_day == 28\n [28, 29, 30, 31]\n else\n [billing_day]\n end\n end",
"title": ""
}
] | [
{
"docid": "3eec7e3fb9c5c1d1cdd4b1be00799ccd",
"score": "0.6544955",
"text": "def debit_monthly_subscriptions \n ccp = CreditCardProcessor.new(@label)\n\n # subscriptions dont start for atleast a month after being created. \n # filter out any recently billed subscriptions. This allows a job to... |
2f9d5c31527b9ce8ff25b3f45629dfa3 | Returns a collection of users according to search criteria. [GET] /v1/user | [
{
"docid": "6c340f51b55b08f9ac072fc166e45b00",
"score": "0.0",
"text": "def index\n StatsManager::StatsD.time(Settings::StatsConstants.api['user']['index']) do\n if params[:ids]\n ids = params[:ids].split(\",\")\n if ids.length <= 10\n @users = User.find(ids)\n @s... | [
{
"docid": "294d536603a33fdd4b209b70070031ad",
"score": "0.81989586",
"text": "def user_search(options = {})\n get('users/search', options)\n end",
"title": ""
},
{
"docid": "3f172ce13079d539e3dc4ce5bcddb022",
"score": "0.8167548",
"text": "def user_search(query)\n get... |
7f323fb767d032b2bd9ec02c9a3501be | Returns a truthy value if a change was made | [
{
"docid": "66029731f5f484835004fe521a712cd5",
"score": "0.0",
"text": "def poll\n response = RestClient.get(@location, :if_none_match => @etag)\n raise UnexpectedResponseError.new(response) unless response.code == 200\n\n @etag = response.headers[:etag]\n\n File.write(@file_path, response.b... | [
{
"docid": "104f5b9ca94751a6cf0a42a025c583af",
"score": "0.8235266",
"text": "def changed?\n !!@changed\n end",
"title": ""
},
{
"docid": "10c87de00fc551ad691aa2ee668f5b01",
"score": "0.82155055",
"text": "def changed?\r\n @changed\r\n end",
"title": ""
},
{
... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "e92341a915d93d1030a4cb7eac511242",
"score": "0.0",
"text": "def beneficiary_scheme_params\n params.require(:beneficiary_scheme).permit(:place_id, :scheme_type_id, :entity_status_id, :beneficiary_name, \n :beneficiary_phone, :application_date, :granted_relief, :status, :remarks,\n... | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7497917",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.69572496",
"text": "def strong_params\n params.require(:request).permit(param_whit... |
309706eed75eab30a0e1a02a317d1c88 | Indicate whether two records match. | [
{
"docid": "71172741a2d887c9e3ea480019b9efb0",
"score": "0.7414413",
"text": "def match?(rec_1, rec_2)\n (rec_1.is_a?(ApplicationRecord) || rec_2.is_a?(ApplicationRecord)) &&\n (rec_1.class.try(:base_class) == rec_2.class.try(:base_class)) &&\n (rec_1.attributes == rec_2.attributes)\n end"... | [
{
"docid": "79eb9acfbd864fa78bad52bb86fa7602",
"score": "0.702897",
"text": "def identical?(record1, record2)\n if regexp\n if (str1_match_data = regexp.match(record1.whole)) and (str2_match_data = regexp.match(record2.whole))\n str1_match_data.captures.join.downcase == str2_m... |
1a09f9001f75e0ae07b229cd9736eb99 | View the structural metadata for a given repository resource | [
{
"docid": "9918ee98b3d3983e86ce8f2ad2cf3fc4",
"score": "0.0",
"text": "def structure\n @change_set = ChangeSet.for(find_resource(params[:id]), change_set_param: change_set_param).prepopulate!\n authorize! :structure, @change_set.resource\n @logical_order = (Array(@change_set.logical_structure)... | [
{
"docid": "f20057bb64f8c34a27e17e6da661b097",
"score": "0.6522242",
"text": "def show\n cache_control :etag => params[:sha], :validate_only => true\n @resource = Resource.find!(@repo, params[:path], params[:sha])\n\n if @resource.tree?\n root = Tree.find!(@repo, '/', params[:sha])... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "215ee0e43de1c5f94758510f3c973e12",
"score": "0.0",
"text": "def set_page_type\n @page_type = Xmt::Press::PageType.find(params[:id])\n\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... |
c30d7ecbcd5fdbf54ba328cf81e26f38 | Creates a JobActivity object for CREATE event | [
{
"docid": "e7b5708f412cdaa3713ef7965ee0b9ab",
"score": "0.73325497",
"text": "def create_log_entry(event=\"CREATE\", message=\"_ACTIVITY_CREATED\")\n Rails.logger.info(\"username: #{created_by}, event: #{event}, message: #{message}\")\n entry = JobActivity.new(username: created_by, event: event, ... | [
{
"docid": "9596ef465b098afd23a91d2f7a844721",
"score": "0.8078141",
"text": "def create(attributes)\n attributes[:status] = :CREATED\n job = Job.create! attributes\n JobEvent.create(description: 'Job Created', status: :CREATED, job: job)\n job\n end",
"title": ""
},
{
"docid": ... |
4a1f0fe5fe9610c12fcbf034927d65bb | GET /summoners/1 GET /summoners/1.json | [
{
"docid": "4b1c6206f2c35c0f0e601b47ddbeaf79",
"score": "0.7350109",
"text": "def show\n @summoner = current_user.summoners.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @summoner }\n format.js\n end\n end",
"title": ... | [
{
"docid": "5ce37185b23cc5a84d8f5aef9840c2f6",
"score": "0.7711715",
"text": "def get *summoner_ids\n perform_request(api_url(\"summoner/#{summoner_ids.join(\",\")}\")).map do |key, data|\n Summoner.new data\n end\n end",
"title": ""
},
{
"docid": "fe55a58211a554aa7c19625... |
97eabdc4131a378a4fcffcd05e68b0c2 | Prints the title onto the screen by using a label. Also separates the title from the grid with a line as a horizontal separator. | [
{
"docid": "50b41c494ede6a332eaaa853d28fa6ca",
"score": "0.7562548",
"text": "def print_title\n args.outputs.labels << [ 640, 700, 'Paint!', 0, 1 ]\n outputs.lines << horizontal_separator(660, 0, 1280)\n end",
"title": ""
}
] | [
{
"docid": "1a119849e11a42c57c97719ce641df57",
"score": "0.74112964",
"text": "def display_title\n print \"\" +\n \"\\n ███╗ ███╗████████╗ █████╗ ███████╗██╗ ██╗██████╗ ██╗ ██╗ █████╗ ██╗ ██╗\" +\n \"\\n ████╗ ████║╚══██╔══╝██╔══██╗ ██╔════╝██║ ██║██╔══... |
c110a6f9754f4ebe8a9812f37f1e0576 | A custom "yes" or "no" input box. Gets converted to true or false in cleanup_input_table | [
{
"docid": "0c367efb6a6e0741da5e7b4b6057be9a",
"score": "0.0",
"text": "def custom_boolean key, options={}, &default_block\n opts = {heading: \"Custom Boolean\", checkable: false, style_block: nil}\n opts.merge! options\n choices ||= [\"y\", \"n\"]\n key = \"#{key}||boolean\".to_sym\n key... | [
{
"docid": "8a1084d55f7b4fc28ac77da6114aa803",
"score": "0.7227864",
"text": "def yes_no_or_input(flag)\n case flag\n when nil\n nil\n when true\n 'Yes'\n when false\n 'No'\n else\n flag\n end\n end",
"title": ""
},
{
"docid": "486... |
b2e3bc6dbb7431ecbaa00c3d77534b18 | Sets the load balancer name to use for this Elb Node. ELB names may only have letters, digits, and dashes, and may not be longer than 32 characters. This method will remove any invalid characters from the calculated name. If the calculated elb node name is > 32 characters, this method will truncate the name to the last... | [
{
"docid": "8f50828b09c749580f0c316a7b740395",
"score": "0.79266846",
"text": "def set_load_balancer_name\n str = \"#{@cloud.name.to_s.gsub(/[^[:alnum:]-]/, '')}-#{@name.to_s.gsub(/[^[:alnum:]-]/, '')}\"\n str = str[str.size-32,32] if str.size > 32\n return str\n end",
... | [
{
"docid": "f03d381fb3320836f26dccd5f90daa85",
"score": "0.6009189",
"text": "def subnet_name=(value)\n @subnet_name = value\n end",
"title": ""
},
{
"docid": "f03d381fb3320836f26dccd5f90daa85",
"score": "0.6009189",
"text": "def subnet_name=(value)\n @subnet_name = valu... |
cc6be4abb26c495bd534fdf9448ce6b8 | Datastore Operations Returns Datastore information | [
{
"docid": "2b18acd14c5fcff871eadaa8b76cdd6d",
"score": "0.0",
"text": "def monitor_ds(ds_name)\n # Find datastore within datacenter\n ds = vdc_ci.find_storage_profile_by_name(ds_name) \n \n total_mb = ds.storage_limit_mb.to_i\n free_mb = ds.available... | [
{
"docid": "8cd2ac505172d41bf90771feadda7882",
"score": "0.6872447",
"text": "def ds_info(provision)\n object_info(provision, 'datastores', 'DATASTORE', 'datastore.erb')\n end",
"title": ""
},
{
"docid": "5831eee2e207969fbb445ddaa9150147",
"score": "0.668755",
"text... |
1b7f526c50e312f7a7ac2c5bf20a4bfc | == isStrclass true or false depending on whether current record is a strclass | [
{
"docid": "88666d300bf619db2c02aeccf1257ea5",
"score": "0.89069897",
"text": "def isStrclass\n @RecordType == STRCLASS\n end",
"title": ""
}
] | [
{
"docid": "3d195c7cf3d64146752c4b6b86e367af",
"score": "0.7819803",
"text": "def isStrtype\n @RecordType == STRTYPE\n end",
"title": ""
},
{
"docid": "e280df0b2805c2deb3ccb6c173188e4b",
"score": "0.75486803",
"text": "def isStrname\n @RecordType == STRNAME\n end",
"title... |
5f2049bd6ae59befdd89c41cb94bba6b | todo: move to generic visit/dispatch class | [
{
"docid": "00b864602744d161fa89d43347ba8f1f",
"score": "0.0",
"text": "def recurse(obj, *args, &block)\n send(obj.schema_class.name, obj, *args, &block)\n end",
"title": ""
}
] | [
{
"docid": "4c6cc93ed6fee448e68ab5cc600d94e4",
"score": "0.79327273",
"text": "def visit; end",
"title": ""
},
{
"docid": "dae9887462ace4feab3a9e7c5700f992",
"score": "0.74469787",
"text": "def visitor; end",
"title": ""
},
{
"docid": "dae9887462ace4feab3a9e7c5700f992",
... |
030d3f89b6b9c021275a37dee0a468f0 | DELETE /core/quotes/1 DELETE /core/quotes/1.json | [
{
"docid": "b5645665cd12f354d23151321e007845",
"score": "0.70017874",
"text": "def destroy\n @quote.destroy\n end",
"title": ""
}
] | [
{
"docid": "d6e1cc04fe8a481773f6de1dfdee5f35",
"score": "0.7422485",
"text": "def destroy\n @quote.destroy\n head :ok\n end",
"title": ""
},
{
"docid": "eaabd3b6e56bac4348f770523626f5b2",
"score": "0.7408077",
"text": "def destroy\n @quote.destroy\n respond_to do |format... |
77ba781df7d97d98203e36454a7117bd | Get required parameters to use VMware HTML Console SDK To be used with the following SDK: | [
{
"docid": "50990b384922377688ef2ae6e26e9343",
"score": "0.6870009",
"text": "def html_console_parameters\n ticket = @item.AcquireTicket(:ticketType => 'webmks')\n { :ticket => ticket.ticket, :host => ticket.host,\n :port => ticket.port }\n end",
"title": ""
}
] | [
{
"docid": "1806b8a18529b37f99b7f4834668a07c",
"score": "0.61243224",
"text": "def cmd_twitt_show_parms\n\t\t\t\tprint_status(\"Parameters:\")\n\t\t\t\tprint_good(\"consumer_key: #{@consumer_key}\")\n\t\t\t\tprint_good(\"consumer_secret: #{@consumer_secret}\")\n\t\t\t\tprint_good(\"oauth_token: #{@oauth... |
0c709f479d2a63e5f2eb959656b986eb | Vitter's reservoir sampling, k = 1 | [
{
"docid": "189dc24678f7ad4d5f09d8500ff433ce",
"score": "0.0",
"text": "def init(x=nil)\n the_state = {:cnt => 1, :vals => [x]}\n end",
"title": ""
}
] | [
{
"docid": "090c3388397bf3164530c5aaa2a3eb0e",
"score": "0.5698143",
"text": "def sampling_data(fun, v1=vv1, v2=vv2, repeat1=30, plan=NULL)\n len = v1.length\n data1 = Array.new(len, 0)\n len.times {|factor1|\n data1[factor1] = make_data_set(fun, v1, v2, factor1, repeat1, plan)\n }\n\n print \"s... |
5aed7aa13602443443c22a77a13e2920 | Get a participant's subscriptions. | [
{
"docid": "a97326b6b3c70d138b0eb702ad8009ce",
"score": "0.73398226",
"text": "def get_participant_subscriptions(account_id,\r\n session_id,\r\n participant_id)\r\n # Prepare query url.\r\n _query_builder = config.get_ba... | [
{
"docid": "baefa3cd87c76372e3ff80903039f660",
"score": "0.73605067",
"text": "def get_subscriptions\n get_subscriptions_from(@nodename)\n end",
"title": ""
},
{
"docid": "051fd12045881f4557083bc41fe2401a",
"score": "0.7262282",
"text": "def all_subscriptions\n get... |
5dc9285fdc15d6b0f46dd061c8cfbd34 | required parameters: name: d_b_instance_id, type: String name: end_time, type: String name: start_time, type: String optional parameters: name: _method, type: String, optional values: GET|POST name: _region, type: String name: _scheme, type: String, optional values: http|https name: owner_account, type: String name: ow... | [
{
"docid": "e91f8c7e19a3a30cf340efc769564a53",
"score": "0.6379758",
"text": "def describe_error_logs(d_b_instance_id, end_time, start_time, optional={})\n\t\targs = self.class.new_params\n\t\targs[:query]['Action'] = 'DescribeErrorLogs'\n\t\targs[:query]['DBInstanceId'] = d_b_instance_id\n\t\targs[:que... | [
{
"docid": "b3b25852532ed410d7e4467cfc706a25",
"score": "0.68401283",
"text": "def describe_backups(d_b_instance_id, end_time, start_time, optional={})\n\t\targs = self.class.new_params\n\t\targs[:query]['Action'] = 'DescribeBackups'\n\t\targs[:query]['DBInstanceId'] = d_b_instance_id\n\t\targs[:query][... |
b8ed291cebd74719f3c1e3aff6ac29e4 | We define this method if we want to show certain attributes or method to the users | [
{
"docid": "24dc262b1660784c2a5347dd17e8664c",
"score": "0.0",
"text": "def json_options\n {\n methods: [:cover_image_url]\n }\n end",
"title": ""
}
] | [
{
"docid": "643bef927170d96a3606e7ad6620f866",
"score": "0.7151748",
"text": "def show_attributes\n show_and_table_attributes\n end",
"title": ""
},
{
"docid": "b2bdcea0534c404c5cfec7cf7d86143c",
"score": "0.69394135",
"text": "def show\n \n end",
"title": "... |
b4d3a3ed44e6b8010cfba17e6108be7a | override to add methods to show constraints for 'more like this' and advanced search date range | [
{
"docid": "95d47c4a15688756f7f71badeabe0453",
"score": "0.58582515",
"text": "def render_constraints(localized_params = params, local_search_state = search_state)\n params_or_search_state = if localized_params != params\n localized_params\n ... | [
{
"docid": "60b2a60523f47917766e19c6589a44be",
"score": "0.6396193",
"text": "def constraints_with_links\n constraints = []\n # raise\n # add in the basic search query\n @search.query.text_queries.each do |q|\n constraints << [q['textQuery'], summon_search_cmd(q['rem... |
3dd02c082b4cadc3d2d81de281a414e6 | execute block only once per page | [
{
"docid": "579447ea92dde13581bdfc9c3bc74533",
"score": "0.0",
"text": "def once id=nil\n id ||= self.class\n Lux.current.once('cell-once-%s' % id) { yield }\n end",
"title": ""
}
] | [
{
"docid": "ac54e788bed080c649788ca3cf237452",
"score": "0.6860175",
"text": "def on_every_page(&block)\n @on_every_page_block = block\n self\n end",
"title": ""
},
{
"docid": "5a0b04481c8e49e20fadfca19a9ebbb4",
"score": "0.6851207",
"text": "def on_every_page(&blo... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "c973a21951bd8ee7139ab605e919c40c",
"score": "0.0",
"text": "def shipments_article_params\n params[:shipments_article]\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... |
6922b1da202e37c50fec486c00d0ab3c | checks to see if cover is in the submission dir if yes, copies cover to archival location and deletes from submission dir if no, prints an error to the archival directory | [
{
"docid": "80cfafa8d8bd3661397fb64ce571d68d",
"score": "0.6536821",
"text": "def checkCoverFile(arr, file, tmpcover, finalcover, errorfile)\n\tif arr.include?(\"#{file}\")\n\t\tFileUtils.mv(tmpcover, finalcover)\n\t\tcovercheck = \"Found a new cover submitted\"\n\telsif !arr.include?(\"#{file}\") and F... | [
{
"docid": "60d574792104f5821e2f9f9c4084dd04",
"score": "0.63468677",
"text": "def checkCoverFile(arr, file, tmpcover, finalcover, errorfile, coversize_check, logkey='')\n\tif arr.include?(\"#{file}\") && coversize_check == true\n\t\tFileUtils.mv(tmpcover, finalcover)\n\t\tcovercheck = \"Found a new cov... |
49d5efd3ab89c43c658f7125624696fa | Creates a new S2A_INFO_DETAILED response object based on the given data | [
{
"docid": "299a9d86c368279be430d6277b83273b",
"score": "0.0",
"text": "def initialize(data); end",
"title": ""
}
] | [
{
"docid": "9d9fef3720cf5888e5a77538f5bf5dcf",
"score": "0.61628586",
"text": "def initialize(data)\n super S2A_INFO_DETAILED_HEADER, data\n\n info.merge!({\n game_ip: @content_data.cstring,\n server_name: @content_data.cstring,\n map_name: @content_data.cstring,\n ... |
909157552337b28a3685838cded01b3a | Redirect topics on creation | [
{
"docid": "465671dd989f909f02c957e5442060e5",
"score": "0.6527848",
"text": "def redirect_topic(topic)\n # Find post approval team group\n group = Group.lookup_group(SiteSetting.post_approval_redirect_topic_group)\n\n # Turn it into a private message\n request_category = topic.category\n ... | [
{
"docid": "4061495d3d426e52e6d88dc783e411a9",
"score": "0.71028835",
"text": "def create\n create_topic(params[:id], params[:label])\n redirect_to :action => 'edit', :id => @current_id\n end",
"title": ""
},
{
"docid": "5e5df465f08e3d2d3a42ef7b564fb775",
"score": "0.70827186",
... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "4fac5b2d53d5db58f93573ca9f5620c4",
"score": "0.0",
"text": "def mp3_params\n params.require(:mp3).permit(:title, :artist, :length, :file_size, :file_format, :download_path)\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... |
3903f528a73f8c32ce43842041e11775 | GET /prescriptions/1 GET /prescriptions/1.json | [
{
"docid": "e2e04e967ed64297bcdbbef24470baa0",
"score": "0.73514706",
"text": "def show\n @prescription = Prescription.find(params[:id])\n render json: @prescription\n end",
"title": ""
}
] | [
{
"docid": "cd3832d583aa8d0d75fc666a2f3c37ba",
"score": "0.757853",
"text": "def index\n @prescriptions = Prescription.all\n render json: @prescriptions\n end",
"title": ""
},
{
"docid": "cc6d597f9d2a1e3ce98ee2ae924a8562",
"score": "0.72422844",
"text": "def show\n\t\tprescrip... |
249856522732943ed09c9ecd1b6b28da | Adds +Trello+ API objects that have been parsed and loaded into a +TrelloJsonLoader+ object +json_loader+ is a +TrelloJsonLoader+ that has been populated with +Trello+ API objects | [
{
"docid": "644ed2eb2a1861601a9cfe6530f5e4f5",
"score": "0.6609657",
"text": "def add_json_loader_content(json_loader)\n # We only have one org, so load it if it's there\n @org = json_loader.organizations_by_id.values.select { |o| o.name == organization_id }.first\n # org members are a special ... | [
{
"docid": "0e1adf09a38e344e070952db055d0ba9",
"score": "0.5584895",
"text": "def add_loader(loader)\n @loaders << loader\n end",
"title": ""
},
{
"docid": "f14e20d17d3f7b66a475cd69129255bd",
"score": "0.5467074",
"text": "def add_loader(loader)\n loaders.push loader\n... |
fd3e5468a1ba97e51f446938b22b5eb6 | Setup handler for submitted add/edit goat details form | [
{
"docid": "af72387e6927129847b8af241b2233e5",
"score": "0.655757",
"text": "def add_edit_post\n # Load id variable with whatever id is in the URL path (after /goats/)\n id = params[\"id\"]\n # Find that goat and keep it as the @goat variable\n @goat = RacingGoat.find(id)\n # If the Save ... | [
{
"docid": "6202aee254ea117ff0e39be3778aab0a",
"score": "0.621569",
"text": "def form_setup\n\tend",
"title": ""
},
{
"docid": "92f06a42adccc3120e3961cdd5d5aed5",
"score": "0.61880124",
"text": "def setup_edit\n @allow_branches = @route.class::ALLOW_BRANCHES\n @google_map = tru... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "23940fae56e4148d189302fddf844a00",
"score": "0.0",
"text": "def vendor_params\n params.require(:vendor).permit(:name, :location_lat, :location_lng, :n, :s, :w, :e)\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... |
ba4b52cb06a1f275479d803d81f91511 | Tests if the repository is closed | [
{
"docid": "f0737a2b9232853b075f08a49f6c62f2",
"score": "0.83625555",
"text": "def closed?\n raise NotImplementedError, \"Repository::closed Not yet implemented\"\n end",
"title": ""
}
] | [
{
"docid": "52ee685514ce5dd25037b23519bae5b9",
"score": "0.81108785",
"text": "def closed?\n @repos.closed?\n end",
"title": ""
},
{
"docid": "ec5ad3e30b6ceb7a444d79426470717c",
"score": "0.73897284",
"text": "def closed?\n !@open\n end",
"title": ""
},
... |
d3bf0b228750d9d7ac2290f4c16b1bec | GET /mg_reports/1 GET /mg_reports/1.xml | [
{
"docid": "57fc7bb33ce7838ea3214fc74f48b3ae",
"score": "0.66627246",
"text": "def show\n @report = Mg::Report.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @report }\n end\n end",
"title": ""
}
] | [
{
"docid": "bf7c550ca1b015461179aeb54db060a7",
"score": "0.68270785",
"text": "def index\n @reports = Report.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @reports }\n end\n end",
"title": ""
},
{
"docid": "316453b3fdd50f4bcb... |
795cc5b2b511dab4a0dea98bc24fc521 | Retrieve a single page of StepInstance records from the API. Request is executed immediately. | [
{
"docid": "dde32c7287a8ef25d4c40c75f850e929",
"score": "0.0",
"text": "def get_page(target_url); end",
"title": ""
}
] | [
{
"docid": "a29f0bb66b2081d5b45414e37bb3a9ea",
"score": "0.58761597",
"text": "def show\n\t\t@step = Step.find(params[:id])\n\t\trespond_to do |format|\n\t\t format.html # show.html.erb\n\t\t format.json { render :json => @step }\n\t\tend\n end",
"title": ""
},
{
"docid": "209e1f7421e3841... |
26410000be1c40e94e6f9d3c5b24580f | Verifies ARGV are legal | [
{
"docid": "51180d806645050cbcde38d2e23c87fc",
"score": "0.6666293",
"text": "def checkLegit_ness\n\t\tif ARGV.length > 2\n\t\t\tputs \"error\"\n\t\telse\n\t\t\trunCode\n\t\tend\n\tend",
"title": ""
}
] | [
{
"docid": "57853a13cc8e58c4bfc57ebccb87706f",
"score": "0.7496727",
"text": "def check_ARGV_on_initialization\n parse_ARGV()\n check_arguments()\n check_flags()\n end",
"title": ""
},
{
"docid": "a2d30433c36ed95c6e30a1e609e39090",
"score": "0.7385604",
"text"... |
bdbece8c34373f7fb444b8d193295625 | TODO Why doesn't each get called if I subclass it here? Enumerate all the items. | [
{
"docid": "0fbf90c01e99f016e82a70a8986d12bd",
"score": "0.0",
"text": "def each_item\n each {|row| row.each { |item| yield item }}\n end",
"title": ""
}
] | [
{
"docid": "29ba390595a91cc2a5be1cbfac6b85fe",
"score": "0.775722",
"text": "def each\n raise 'Not implemented'\n end",
"title": ""
},
{
"docid": "512a5e6e7002f600cb856bbea1fb90c1",
"score": "0.7577402",
"text": "def each\n items.each { |itm| yield itm }\n end",
... |
d2b17c84d4073aaa18aadd1ca560f0a5 | the two strings, and then returns the result of concatenating the shorter string, the longer string, and the shorter string once again. You may assume that the strings are of different lengths. Input: string1, string2 compare 2 strings by length if (string1.length string2.length) == 1 string1 + string2 + string1 else s... | [
{
"docid": "eb0305c05047769dce990caeb98c003a",
"score": "0.88246185",
"text": "def short_long_short(string1, string2)\n if (string1.length <=> string2.length) == -1\n string1 + string2 + string1\n else\n string2 + string1 + string2\n end\nend",
"title": ""
}
] | [
{
"docid": "29e2e39dd1ba307bbbf9ee33f05f142b",
"score": "0.8851875",
"text": "def short_long_short(string1, string2)\n # initial try\n # longer_string = string1.size > string2.size ? string1 : string2\n # shorter_string = longer_string == string1 ? string2 : string1\n # shorter_string + longer_strin... |
4441c3fe5a26b73bfbc61dc40073ca07 | Return an Array of Strings | [
{
"docid": "fe5c370dcdc51d8975f7482c8ab6edbf",
"score": "0.0",
"text": "def species_group_name_strings\n by_name_index['species_group'].keys\n end",
"title": ""
}
] | [
{
"docid": "9f41bac0f681b8bf2756cd0c6a4221bb",
"score": "0.76177627",
"text": "def return_string_array array\n ret_arr=[]\n array.each {|i| ret_arr.push(i.to_s)}\n ret_arr\nend",
"title": ""
},
{
"docid": "54be35b4d55040e7842051b4f487e2d2",
"score": "0.75093263",
"text": "def getS... |
2bc3119d8b94879541cdf4c3538b0c9d | GET /reservations/1 GET /reservations/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "1b1c25438e4b69f525a7a0ecf5212bc2",
"score": "0.76951605",
"text": "def show\n @reservation = restaurant.reservations.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @reservation }\n end\n end",
"title": ""
},
... |
748c5468a198f81d757e33a2fc0d0882 | Arrange for window to be displayed in normal (noniconified) form. This is done by mapping the window. If the window has never been mapped then this command will not map the window, but it will ensure that when the window is first mapped it will be displayed in deiconified form. On Windows, a deiconified window will als... | [
{
"docid": "2cf8239493030d20311d12dc71a3a6d9",
"score": "0.5500815",
"text": "def deiconify(window)\n Tk.execute_only(:wm, :deiconify, window)\n end",
"title": ""
}
] | [
{
"docid": "61304ccf8d070a7cfd2c1aaf6d0c722e",
"score": "0.6255665",
"text": "def map_window (*args)\n map_window!(*args).abandon\n end",
"title": ""
},
{
"docid": "90cf82ea6ee54b5df465079248434ca6",
"score": "0.603531",
"text": "def unmap_window (*args)\n unmap_window!(... |
7d4df55feef6460cfc2094889587e456 | GET /gethotels/new GET /gethotels/new.json | [
{
"docid": "f56aa0ec06aa777ff5fcd1e7e5849c89",
"score": "0.77445257",
"text": "def new\n #@gethotel = Gethotel.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @gethotel }\n end\n end",
"title": ""
}
] | [
{
"docid": "32592d03d4c631984b5b7f6c996ac001",
"score": "0.718416",
"text": "def new\n @hoge = Hoge.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @hoge }\n end\n end",
"title": ""
},
{
"docid": "d56451e24766e5c2b07147c5bfe06dd7",... |
daef0c6b32aa47083ae9ea6a56e83206 | original method in app/models/task.rb Purpose: Update Record in Appeal States Table Params: NONE Response: Updated 'vso_ihp_complete' column to TRUE | [
{
"docid": "e7cf61494befd7360090c97027406e82",
"score": "0.74066675",
"text": "def update_appeal_state_when_ihp_completed\n if IHP_TYPE_TASKS.include?(type) &&\n !IHP_TYPE_TASKS.include?(parent&.type) &&\n status == Constants.TASK_STATUSES.completed\n MetricsService.record(\"Updating... | [
{
"docid": "052a1ac3c442c9f02b6e1e6f81965da1",
"score": "0.67350894",
"text": "def update\n if params[:active]\n update_status\n elsif params[:task]\n update_completion\n else\n raise \"Don't know what you want\"\n end\n end",
"title": ""
},
{
"docid": "ea90302d39... |
cc4e16dc9c7f93983b460f9af7855ce2 | GET /redirect_urls/new GET /redirect_urls/new.xml | [
{
"docid": "b51c3763752dad8d12ecea751493e3dc",
"score": "0.7489009",
"text": "def new\n @redirect_url = RedirectUrl.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @redirect_url }\n end\n end",
"title": ""
}
] | [
{
"docid": "c1e09e87146a349c6e7c83043be58140",
"score": "0.6920155",
"text": "def new\n @redirect = Shorturl::Redirect.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @redirect }\n end\n end",
"title": ""
},
{
"docid": "7b689672f... |
aef09d6d588796706082feec6786aa03 | def register user = User.create(user_params) if user.save! render json: user else render errors: user.full_message, status: bad_request end end | [
{
"docid": "40dd75f99f82199e580d03876a471d88",
"score": "0.0",
"text": "def info\n end",
"title": ""
}
] | [
{
"docid": "69c8214d70d871740e4eea6cb87dd154",
"score": "0.93064225",
"text": "def register\n sign_out(:user)\n user = User.new(params[:user])\n\n if user.save\n render json: { user_id: user.id }, status: :created\n else\n render json: { msg: user.errors.full_messages.to_sentence }... |
8090a260ee715ba1fbd6071493a84a50 | Set fonts Font of document can be customized over config file. TODO: check if file exists, when path given over config file and do proper error handling | [
{
"docid": "87fcb23f375ae9e9c404cf9b3c6ac251",
"score": "0.67590076",
"text": "def default_font_files\n {\n light: @config.font&.light || File.join(\"lib\", \"font\", \"Lato-Light.ttf\"),\n normal: @config.font&.normal || File.join(\"lib\", \"font\", \"Lato-Medium.ttf\"),\n bol... | [
{
"docid": "4309e68943cf8b0f69006be2b4d9923b",
"score": "0.70013636",
"text": "def update_font_settings\n change_font_setting(:default_name, :font_name)\n change_font_setting(:default_size, :font_size)\n change_font_setting(:default_bold, :bold)\n change_font_setting(:default_italic, :italic... |
d36ce37a385ead7323a175a35db59c0d | GET /get_images/new GET /get_images/new.json | [
{
"docid": "a64632bfd2e23f6a73340f0fc1cbe0c9",
"score": "0.79317325",
"text": "def new\n @get_image = GetImage.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @get_image }\n end\n end",
"title": ""
}
] | [
{
"docid": "782421bf8e62fcf94dd796ed376c99a7",
"score": "0.78094274",
"text": "def new\n @image = @current_account.images.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @image }\n end\n end",
"title": ""
},
{
"docid": "5fba6a316e1... |
50a70ed2ec346d2d1c1bdbb239a1c6f4 | The default options using the values in the constants. | [
{
"docid": "ea77bb0247825bda7e61460689449762",
"score": "0.70639145",
"text": "def default_options\n { \"token_credential_uri\" => self.class::TOKEN_CREDENTIAL_URI,\n \"audience\" => self.class::AUDIENCE,\n \"scope\" => self.class::SCOPE }\n end",
"ti... | [
{
"docid": "7c59c404311348791bfbc4560d3d0c59",
"score": "0.847825",
"text": "def default_options; end",
"title": ""
},
{
"docid": "7c59c404311348791bfbc4560d3d0c59",
"score": "0.847825",
"text": "def default_options; end",
"title": ""
},
{
"docid": "7c59c404311348791bfbc4... |
a69f0b3301f3019d790c813100b59352 | returns all the spies that have been initialized since the creation of this agency | [
{
"docid": "2fe8ad57929dab37c6c32d0eb9c405aa",
"score": "0.6985079",
"text": "def spies\n @spies.values\n end",
"title": ""
}
] | [
{
"docid": "d7051c4255b7abc011974cf2df5490fe",
"score": "0.6026307",
"text": "def active_ties\n @active_ties ||= {}\n end",
"title": ""
},
{
"docid": "4e0be9306be0d0447bb769bfb91eafb1",
"score": "0.56792325",
"text": "def initialize\n @party_index = 0\n @game_parties = Game... |
918c5cf87d150073c3fff56cc09cbdcd | GET /app_days GET /app_days.json | [
{
"docid": "8328a93ff33125753b08a607be4d7d4f",
"score": "0.70555735",
"text": "def index\n @app_days = AppDay.order(created_at: 'desc').page params[:page]\n end",
"title": ""
}
] | [
{
"docid": "f7e367ce65e14a64f6d76394ef71cb09",
"score": "0.6924167",
"text": "def list_days\n payload = []\n \n # Based on the timestamp in fetch all this month's days.\n time = Time.at params['time'].to_i\n days = Day.find(:all, :conditions => ['date like ?', time.strftime('%Y-%m') + '%'... |
1f81e2452cb95e3a9582b72ce1858cd9 | get all the experiments for a CAS number | [
{
"docid": "0b03c90a2801d6da065f3483f42c3698",
"score": "0.7443431",
"text": "def get_experiments(cas)\n query = PREFIX\n query = \"#{PREFIX}\n SELECT ?assay\n FROM <ccris>\n WHERE{\n ?assay genetox:hasSubstance ?substance .... | [
{
"docid": "dcc602b62df6f0d10b4b18fa52f126c3",
"score": "0.72138846",
"text": "def get_experiments(cas)\n \n begin\n # query for all experiments of a chemical then do intersection with instances passed in. \n tmp = @sparql.query(\"#{PREFIX}\n ... |
aa89ffe0427bd9cff0394180256bda8f | function for finding desired structure elements in array of residues, can return object or aa string | [
{
"docid": "67154637a756b8e78cb1a2bd26e9799e",
"score": "0.7326867",
"text": "def find_elements(residues, objects = false)\n elements = Array.new\n \n residues.each do |currentRes|\n element = Array.new\n\n # look around (6 ang) for another related residums\n residues.each do |testRes|\n ... | [
{
"docid": "12f5161ea3f1da6a6f25e1af0e34aa5f",
"score": "0.6121801",
"text": "def rassoc(obj)\n # FIX: Use break when it works\n found, res = nil, nil\n\n each { |elem|\n if found.nil? and elem.kind_of? Array and elem.at(1) == obj\n res, found = elem, true\n end\n }\n\n r... |
419ffc14bec42848d57889fb3c80c53e | POST /richards POST /richards.xml | [
{
"docid": "d95a7557b1fe6810750bf733d0bad334",
"score": "0.6365664",
"text": "def create\n @richard = Richard.new(params[:richard])\n\n respond_to do |format|\n if @richard.save\n format.html { redirect_to(@richard, :notice => 'Richard was successfully created.') }\n format.xml ... | [
{
"docid": "ed553ff61340c13458416f24962bab92",
"score": "0.56910604",
"text": "def new\n @richard = Richard.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @richard }\n end\n end",
"title": ""
},
{
"docid": "df942897f547e7f2d1669... |
4e52d22f4b178213345fdc2f5eb00d37 | Takes a string and returns a URI corresponding to the redirect endpoint for the lms | [
{
"docid": "5d223b9e5eaa887fa2507288f9d9878b",
"score": "0.5642371",
"text": "def construct_redirect_with_port(url, endpoint: nil)\n referer = URI(url)\n referer_host = \"#{referer.scheme}://#{referer.host}\"\n referer_host_with_port = \"#{referer_host}:#{referer.port}\"\n referer_host = ref... | [
{
"docid": "307dc3686edc32b350653930b6095103",
"score": "0.6601973",
"text": "def redirect_uri\n uri = URI.parse request.url\n uri.path = '/auth/callback'\n uri.query = nil\n uri.scheme = 'https'\n\n return uri.to_s\n end",
"title": ""
},
{
"docid": "276ac85ad6c8305e7134925f9... |
a0789574c5867be2b4fb00543704018f | GET /field_defaults/1 GET /field_defaults/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "9b4325f82f590c2f4bbb4936c8ee137f",
"score": "0.71910733",
"text": "def index\n @field_defaults = FieldDefault.all\n end",
"title": ""
},
{
"docid": "f778c882b78cf2e96f1e8e554cef305c",
"score": "0.6872024",
"text": "def getDefaultFields(response)\r\n\t\t\t\r\n\t\t\t\tj... |
2de1cd2306be34cc3685abf5309e6b70 | antes de entrar al usersindex debo autenticarme | [
{
"docid": "4cad0f50b5535835d09db90fab9c1375",
"score": "0.0",
"text": "def index\n @user = User.all\n\n @city = City.all \n end",
"title": ""
}
] | [
{
"docid": "7b115e4f94c0fedcc2b17f04e3623f3d",
"score": "0.7038886",
"text": "def index\n exist_redesocial_to_user \n end",
"title": ""
},
{
"docid": "ea96ce8103e6d94152b39178be54cd6c",
"score": "0.686675",
"text": "def reindex_user!\n Sunspot.index! self\n end",
... |
a65ffc6ecee435d15d662da96a972f02 | This method validates a captcha. This is used on the specific page where the user has to solve the captcha. | [
{
"docid": "4a0da74de8b74073b9f6d94b887704a1",
"score": "0.79972947",
"text": "def validate_captcha\n if !recaptcha_valid?\n return false\n else\n # The user properly passed the captcha.\n # Create a session marking him as human.\n session[\"captcha\"] = true\n return true\n end\nend",... | [
{
"docid": "c99d2e23f82b82966874ab94ea2acc3c",
"score": "0.82104063",
"text": "def validate_captcha\n Captcha.correct?(session[:yoyo], params[:ans])\n end",
"title": ""
},
{
"docid": "d249bef074ac2e361a360268d037d5f3",
"score": "0.7685447",
"text": "def validate_captcha? #:nodoc:... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "1cde5ab9c0f8f25b443427da007b7bc7",
"score": "0.0",
"text": "def depositos_inventario_params\n params.require(:depositos_inventario).permit(:PKINVENTARIO, :INV_NUMORDEN, :PKTIPO_AUTO, :INV_FDETENCION, :INV_LUGARDETENCION, :INV_FOLIODETENCION, :INV_MOTIVODETENCION, :INV_AUTORIDAD, :PKDEPOSITO... | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7496716",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.6956598",
"text": "def strong_params\n params.require(:request).permit(param_white... |
f802bf9d8c19a9d21c8be1bac2d0cd8d | Is this Location FireEagle's best guess? | [
{
"docid": "e3233ee7f062f7239b09612e719ecb49",
"score": "0.74869066",
"text": "def best_guess?\n @best_guess ||= @doc.at(\"/location\").attributes[\"best-guess\"] == \"true\" rescue false\n end",
"title": ""
}
] | [
{
"docid": "1531da08690ee3342051d65c03337ff7",
"score": "0.7504114",
"text": "def known_location?\n\t\t( @source == :spot ) or ( @source == :waypoint )\n\tend",
"title": ""
},
{
"docid": "cebce3f8bc92deba66f858f4ee9ff558",
"score": "0.74112827",
"text": "def last_known_location?\n ... |
fb8f5cfe5a8493b288609842f2318fc5 | POST /products POST /products.json | [
{
"docid": "d71c9698858262704a3045a6b51d226b",
"score": "0.7037288",
"text": "def create\n @product = Product.new(params[:product])\n\n respond_to do |format|\n if @product.save\n format.html { redirect_to @product, :notice => 'Product was successfully created.' }\n format.json ... | [
{
"docid": "6e6e22738994035234ed86fee8433fa8",
"score": "0.7674954",
"text": "def create\n @product = Product.new(product_args)\n\n if @product.save\n render json: Product.all, status: :created\n else\n render json: @product.errors, status: :unprocessable_entity\n end\n end",
... |
a836e2002ebeaf6a37b82b17e02daa4e | GET /alfrescos/1 GET /alfrescos/1.xml | [
{
"docid": "a075bc79eeff96bddba445f28b67b567",
"score": "0.57987326",
"text": "def show\n @alfresco = Alfresco.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @alfresco }\n end\n end",
"title": ""
}
] | [
{
"docid": "ff70506b87adaeac22cba52d01851df0",
"score": "0.6542067",
"text": "def xml(id)\n http.get(\"/nfse/#{id}/xml\") do |response|\n response.headers.fetch(\"Location\") { \"\" }\n end\n end",
"title": ""
},
{
"docid": "8b1783e307539a116d1de9cddcc329ee",
... |
3bf7a16445c7daf7dbae16ab21734857 | Used only by pooltool.ru | [
{
"docid": "34cc3a77179fc21eec6227c69f885089",
"score": "0.0",
"text": "def each\n\n return unless block_given?\n\n @db.each do |k, v|\n fexp = Marshal.load(Base64.decode64(v['fexp']))\n yield(fexp.fei, fexp)\n end\n end",
"title": ""
}
] | [
{
"docid": "7db519d8a75cb86b7288d983264b53ee",
"score": "0.72941107",
"text": "def pool; end",
"title": ""
},
{
"docid": "7db519d8a75cb86b7288d983264b53ee",
"score": "0.72941107",
"text": "def pool; end",
"title": ""
},
{
"docid": "7db519d8a75cb86b7288d983264b53ee",
"... |
688aaad87fbb56140f63e5d504a3b38d | copy directories and files | [
{
"docid": "ee39bea23914c7604b4ae60d032f4ad9",
"score": "0.0",
"text": "def copy options = {}\n if options[:from].nil? || !options.key?(:from)\n puts \"Please, set file or path name for copy\"\n exit\n else\n from = options[:from]\n end\n if options[:to].nil? || !options.key?(... | [
{
"docid": "ee30ad0efc2f112a8e15e6b64a6c1e22",
"score": "0.79665595",
"text": "def copy(target_dir); end",
"title": ""
},
{
"docid": "2cdff4a67e85657435ac4538aa24a270",
"score": "0.78860825",
"text": "def copy_files\n copy_images\n copy_downloads\n copy_style_sheets\n end",... |
28059f04aa498ab4d876e136c4325693 | POST /libro_compras POST /libro_compras.json | [
{
"docid": "f5e1d2b11d7e914ca9c41063f648f571",
"score": "0.7258275",
"text": "def create\n @libro_compra = LibroCompra.new(libro_compra_params)\n\n respond_to do |format|\n if @libro_compra.save\n format.html { redirect_to @libro_compra, notice: 'Libro compra was successfully created.'... | [
{
"docid": "4ec1a0a49f6e3936d85d1903796c799e",
"score": "0.6905561",
"text": "def create\n @compra = Compra.new(compra_params)\n @compra.remaining = @compra.cantidad\n @compra.code = Item.find(compra_params[:producto]).identificador\n respond_to do |format|\n if @compra.save\n fo... |
537f3bdbe4de3fad320f67d2d31d61a2 | prints the full list of list items | [
{
"docid": "e4457b6ac293ec8aac669d43a677428d",
"score": "0.0",
"text": "def all\n resort_array\n puts '-' * @title.length\n puts @title\n puts '-' * @title.length\n\n print_group(TodoItem, ['', 'Todo', 'Due', 'Priority'])\n print_group(EventItem, ['', 'Event', 'Start', 'End'])\n pri... | [
{
"docid": "bd7feb9be4b736ceaa852cf572a03011",
"score": "0.8417502",
"text": "def print_items\n @items.each { |item| print \"#{item} \"}\n puts \"\\n\"\n end",
"title": ""
},
{
"docid": "054dc6c5bd634d4fe75428b899023f49",
"score": "0.8124929",
"text": "def print_list\n ... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "8882bf101f3d900e759ca84564df2c0d",
"score": "0.0",
"text": "def set_tipo_producto\n @tipo_producto = TipoProducto.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... |