query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
a95bdde6a43fa36bd3aecaf4bb341a5e | Returns the command banner | [
{
"docid": "f44c45fecf0484a3fb136f644477a285",
"score": "0.0",
"text": "def banner\n \"Creates a relation database using a schema passed as first argument.\\n\"\\\n \"Physical handler may be specified through options.\"\n end",
"title": ""
}
] | [
{
"docid": "4b5d381e5f6304089a1f4bf115e0ff9f",
"score": "0.87844646",
"text": "def command_banner\n ''\n end",
"title": ""
},
{
"docid": "c1aa358383f6ce284913e686ca545184",
"score": "0.7935955",
"text": "def banner\n raise \"Command.banner should be overriden by subclasses... |
84bf0790fe597b7af12e8a5b6b8cfb20 | PATCH/PUT /incidence_types/1 PATCH/PUT /incidence_types/1.json | [
{
"docid": "65905f6605590c7dc6259460e4e77ad8",
"score": "0.6976387",
"text": "def update\n @incidence_type.code = @incidence_type.code.upcase\n\n respond_to do |format|\n if @incidence_type.update(incidence_type_params)\n format.html { redirect_to incidence_types_path, notice: 'Inciden... | [
{
"docid": "635111af9841d78e58589c1a7080f875",
"score": "0.73480487",
"text": "def update\n respond_to do |format|\n if @type_incidence.update(type_incidence_params)\n format.html { redirect_to @type_incidence, notice: 'Type incidence was successfully updated.' }\n format.json { re... |
d38554d8b05b4f8271eb9c611789440d | Performs validations using the definition of the given ISA segment | [
{
"docid": "899fb1831fd692ba608b127998f9698a",
"score": "0.5016482",
"text": "def critique_isa(isa, acc)\n # @todo\n # isa.segment.tap do |x|\n # envelope_def = x.node.definition.parent.parent\n #\n # # ...\n # end\n end",
"title": ""
}
] | [
{
"docid": "ac980cb36dddaaacd547c9b775603ac8",
"score": "0.62522006",
"text": "def process_segment(segment)\r\n # puts \"Trying to process segment #{segment.inspect}\"\r\n unless @x12_definition[X12::Segment] && @x12_definition[X12::Segment][segment.name]\r\n # Try to find it in a separ... |
0d4b9d75b2f9eab63b24a0c5d97f340a | Nice Text Representation of the entire board | [
{
"docid": "8931d6091adf4ada1d65ff01d8ff7fc3",
"score": "0.0",
"text": "def print_board\n oneCol = 24\n totalChars = (oneCol * BOARD_COLUMNS) - (BOARD_COLUMNS-1)\n puts \"-\" * totalChars\n\n (0...BOARD_ROWS).each do |i|\n print \"|\"\n (0...BOARD_COLUMNS).each do |j|\n prin... | [
{
"docid": "499468d9fff10a0826db2b3aebff0cfb",
"score": "0.7759676",
"text": "def board_to_string\n line = \"#{\"----\" * @size}\"\n board_as_string = \"#{line}\"\n @board.each do |columns|\n row = \"\\n\"\n columns.each do |element|\n element = \" \" if element.nil... |
e4413ba2f48d944d753c5f103903022a | has_many( :annotations, class_name: :Annotation, foreign_key: :snippet_id, primary_key: :id) | [
{
"docid": "af3eb697e6af2e6457959b87b63eb7fb",
"score": "0.0",
"text": "def create_filename\n file_ext = {\n 1 => \"ada\",\n 2 => \"bash\",\n 3 => \"cs\",\n 4 => \"cpp\",\n 5 => \"clj\",\n 6 => \"elm\",\n 7 => \"go\",\n 8 => \"hs\",\n 9 => \"html\",\n ... | [
{
"docid": "ed45e3144211e9ca5bdf9820fd097152",
"score": "0.63689363",
"text": "def annotation_id; end",
"title": ""
},
{
"docid": "ed45e3144211e9ca5bdf9820fd097152",
"score": "0.63689363",
"text": "def annotation_id; end",
"title": ""
},
{
"docid": "ed45e3144211e9ca5bdf98... |
1fb2b43fcb47786d08c82bc1e771d6a9 | Encrypts the specified stream using recipients Public keys. Args: input_stream: readable stream containing input bytes. output_stream: writable stream for output. recipients: list of recipients' public keys. | [
{
"docid": "8006674ccd6b6cec3bb9b6419aefeb2e",
"score": "0.8479589",
"text": "def encrypt_stream(input_stream, output_stream, *recipients)\n cipher = Crypto::Native::VirgilChunkCipher.new\n recipients.each do |public_key|\n cipher.add_key_recipient(public_key.receiver_id, pu... | [
{
"docid": "88130e8c5b21f82b0c5006887dfb37e4",
"score": "0.84470516",
"text": "def encrypt_stream(input_stream, output_stream, *recipients)\n cipher = Crypto::Native::VirgilChunkCipher.new\n recipients.each do |public_key|\n cipher.add_key_recipient(public_key.receiver_id, p... |
67df4cf8f4784eebcb8f900ef403d596 | Indicates (if true) that help with fees is available, but could be subject to more | [
{
"docid": "929cf6bca7fba1a6682e884d9b67a3ef",
"score": "0.0",
"text": "def help_available?\n help_available\n end",
"title": ""
}
] | [
{
"docid": "45a7f0da730a6ade124057dab23e09d1",
"score": "0.72887194",
"text": "def takes_fees?\n false\n end",
"title": ""
},
{
"docid": "11a1b840698956bd10b8319df0d82769",
"score": "0.72277844",
"text": "def check_for_completeness\n mark_complete if paid? && delivered... |
4e69f6ee0bddf7e0865018c08a72a7f4 | Looks up command shortcuts (e.g. '?' is a shortcut for 'help'). Short cuts can be added by using the shortcut class method. | [
{
"docid": "114cef11f36628716afa32173da03908",
"score": "0.6727495",
"text": "def translate_shortcut(cmd)\n command_lookup_table[cmd] || cmd\n end",
"title": ""
}
] | [
{
"docid": "895146efea4aed9bf0e87dbc7cd0197d",
"score": "0.80187726",
"text": "def command_shortcuts(cmd)\n shortcuts[cmd] \n end",
"title": ""
},
{
"docid": "9bbf61fb01da3b9d9af23e37013010bf",
"score": "0.73804337",
"text": "def shortcut(short, command)\n (@@shortcuts[... |
6db7035453b6faf120c7c0af69aa5ba2 | Allows admin to delete an article from the database | [
{
"docid": "6a036e824e463170d7de645eedd0eb94",
"score": "0.7558197",
"text": "def destroy\n\t\t@article = Article.find(params[:id])\n \t@article.destroy\n flash[:danger] = \"Article has been deleted!\"\n \tredirect_to articles_path\n\tend",
"title": ""
}
] | [
{
"docid": "afecf35bed9135a7cfeb75a3e25045a9",
"score": "0.7802789",
"text": "def delete_article(article_id)\n return get_db().execute(\"DELETE FROM article WHERE article_id = ?\", article_id) \n end",
"title": ""
},
{
"docid": "57c13b26a14c847534e4a18d69b347be",
"score": "0.76... |
00a5936b192152861479bf9d3153f16c | The Add method should throw an exception when called with an input containing at least one negative number. | [
{
"docid": "62c079380347ca3f3f3049a34a100cbf",
"score": "0.0",
"text": "def test_Add_Should_ThrowException_When_CalledWithInputContainingNegativeNumberWithCustomSeparatorDeclaration7\n # Arrange.\n @inputValue = '//$$\\n1$$-2'\n @errorMessage = 'Negatives not allowed : -2'\n\n ... | [
{
"docid": "387b2052e1c0ddadc67b2625b7d6c6cf",
"score": "0.71164185",
"text": "def add_nums(num_1, num_2)\n return num_1.to_i + num_2.to_i\n raise ArgumentError, \"Enter Positive Number\" unless num_1 > 0\nend",
"title": ""
},
{
"docid": "887280f7b72bd208cc53c339757a7946",
"score":... |
807f728c7222de36db553d5d2a957c45 | Returns the i18n string for the const key Example usage: enum_i18n(User, :ACCESS_LEVELS, :admin_user) | [
{
"docid": "55dd1b783a2359ff751d6d157f3c844a",
"score": "0.7692841",
"text": "def const_i18n(class_name, const, key)\n I18n.t(\"activerecord.attributes.#{class_name.model_name.i18n_key}.#{const.downcase}.#{key}\")\n end",
"title": ""
}
] | [
{
"docid": "e36d944802d4d8daf94719252b999585",
"score": "0.82138",
"text": "def enum_i18n(class_name, enum, key)\n I18n.t(\"activerecord.enums.#{class_name.model_name.i18n_key}.#{enum.to_s}.#{key}\")\n end",
"title": ""
},
{
"docid": "d25f170932155e1aa25fcb5fea5f78dd",
"score": "0.81... |
6077b014d2b205abebf20e2a9b1c2fe8 | This is the root path in the application Logged in users will see their dashboard, people who arn't logged in will see a blurb on Roomie, and be prompted to signup or login. | [
{
"docid": "a8064ec7e9e51a564ecec866cf38cfa7",
"score": "0.0",
"text": "def index\n\t\tif current_dwelling\n\t\t\t# Show the users dashboard\n\t\t\t@messages = current_dwelling.messages.newest\n\t\t\trender :dashboard\n\t\telsif current_user\n # The user is logged in, but not a member of a \n ... | [
{
"docid": "2d14a9e3a740e1cb272265c6767904bf",
"score": "0.7749678",
"text": "def user_root_path\n hyrax.dashboard_path\n end",
"title": ""
},
{
"docid": "2d14a9e3a740e1cb272265c6767904bf",
"score": "0.7749678",
"text": "def user_root_path\n hyrax.dashboard_path\n end",
"... |
7a0267a58de037eab0b4ceb9dffc85fd | PATCH/PUT /taskdepends/1 PATCH/PUT /taskdepends/1.json | [
{
"docid": "f53a29ca663fa0fa951b6717c7167a08",
"score": "0.6662401",
"text": "def update\n respond_to do |format|\n if @taskdepend.update(taskdepend_params)\n format.html { redirect_to @taskdepend, notice: 'Taskdepend was successfully updated.' }\n format.json { render :show, statu... | [
{
"docid": "b6f478c5856bf747915b0a02f4ad1c3d",
"score": "0.66923076",
"text": "def update\n respond_to do |format|\n if @dependant_task.update(dependant_task_params)\n format.html { redirect_to @dependant_task, notice: 'Dependant task was successfully updated.' }\n format.json { re... |
09713fd795ecaf44722521b0f6427faf | This the new one which does not use orderedhash, it uses an array for multiple assignments and falls back to a single assignment if multiple fails. e.g. process_key ch, self returns UNHANDLED if no block for it after form handles basic keys, it gives unhandled key to current field, if current field returns unhandled, t... | [
{
"docid": "32f25fa9e464fbd6c3ea854da04037f3",
"score": "0.66330546",
"text": "def _process_key keycode, object, window\n return :UNHANDLED if @_key_map.nil?\n chr = nil\n ch = keycode\n if ch > 0 and ch < 256\n chr = ch.chr\n end\n blk = ... | [
{
"docid": "2b4a69804f47c76e9d58f3ccfdb7da34",
"score": "0.6943385",
"text": "def ORIGbind_key keycode, *args, &blk # -- {{{\n #$log.debug \" #{@name} bind_key received #{keycode} \"\n @_key_map ||= {}\n #\n # added on 2011-12-4 so we can pass a description for a key and prin... |
2df4015b2c48f5e6d6e1a7d413da5531 | GET /card_texts/new GET /card_texts/new.json | [
{
"docid": "d0038253f5c57c926f7710bb3b58493f",
"score": "0.81074023",
"text": "def new\n @card_text = CardText.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @card_text }\n end\n end",
"title": ""
}
] | [
{
"docid": "bc629193749bb7156c94ec9659552e77",
"score": "0.7667167",
"text": "def new\n @text = Text.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @text }\n end\n end",
"title": ""
},
{
"docid": "bc629193749bb7156c94ec9659552e77"... |
535c5071fab67a6f4f9a88214bffd950 | POST /delivery_details POST /delivery_details.json | [
{
"docid": "1f0354504d0d2ac2f1ffbbd6e8ab780d",
"score": "0.7263523",
"text": "def create\n @delivery_detail = DeliveryDetail.new(params[:delivery_detail])\n\n respond_to do |format|\n if @delivery_detail.save\n format.html { redirect_to(delivery_detil_url(@delivery_detail,page:@current... | [
{
"docid": "355768806a449ce8b2139f9d775512cf",
"score": "0.7842447",
"text": "def create\n @delivery = Delivery.find(params[:delivery_id])\n @delivery_detail = @delivery.delivery_details.new(params[:delivery_detail])\n\n respond_to do |format|\n if @delivery_detail.save\n format.htm... |
1ad8bbca0878681d87ae152c76b5ba4a | Get ids from the params object, like :user_id, and turn them into | [
{
"docid": "091e5ca546b6408ff22b1903672c825b",
"score": "0.0",
"text": "def get_object_references\n @user = (User.find(params[:user_id]) if params[:user_id]) ||\n (User.find(params[:user][:id]) if params[:user] && params[:user][:id]) ||\n current_user\n @post = Micropost.find... | [
{
"docid": "6465094a82ca20e4f372729e37341c36",
"score": "0.8014072",
"text": "def convert_ids!(params)\n user_ids = []\n screen_names = []\n ids = [params.delete(:ids)] || []\n ids.flatten.each {|id|\n if id.is_a? Integer\n user_ids << id\n elsif id.is_a? Strin... |
ecacf9e3c806abd78f9199b7e63921f0 | get the newest article of restaurant | [
{
"docid": "b8e534ae9b09b5dccf66c266869be0c9",
"score": "0.65886617",
"text": "def the_newest_article\n data = { 'keyword' => @keyword }\n # per_page should be set to > 2 or there are no results\n article_ret = @gateway_class.new(2, 1, @keyword).article_lists\n data['link'] =... | [
{
"docid": "58dfad8775590d9bbb59ce2d9506be7d",
"score": "0.6922299",
"text": "def home_news\n NewsItem.latest(2)\n end",
"title": ""
},
{
"docid": "3dff19eea1a9a0a06e4736821d8b3712",
"score": "0.68835056",
"text": "def news_latest\n news(latest: true)\n end",
"tit... |
92ade989319c0e7b88dc38a30f976356 | Prompt user for real name Assume input to be one string of two words Downcase Swap the first and last words of the name Potentially by assigning to a new array? Change all vowels to the next vowel Use a string of "aeiou" in the same way that we used the alphabet string for the decrypter Change all consonants to the nex... | [
{
"docid": "c370c366e78fec758f625fed0855b515",
"score": "0.7275107",
"text": "def alias_creator(name)\n name.downcase!\n name_array = name.split(' ')\n name_array.reverse!\n # insert method for changing vowels here\n post_vowels = next_vowel(name_array)\n # insert method for changing consonants he... | [
{
"docid": "fae37acf5131959cb51cffe6a0cb5ef9",
"score": "0.7907737",
"text": "def name_swapper(full_name)\n full_name = full_name.downcase\n vowel_array = ['a','e','i','o','u']\n consenant_array = \"bcdfghjklmnpqrstvwxyz\".split('')\n name_array = full_name.split(\" \")\n reversed_name= \"#{name_ar... |
d1e47f3bf260db7129563a563c3821e4 | options: :backend :hostname :dryrun | [
{
"docid": "0f3d1e97064f2b7c73e7857a5866b721",
"score": "0.0",
"text": "def remove_machine(opts = {})\n backend_name = opts.fetch(:backend, 'default')\n dryrun = opts.fetch(:dryrun, false)\n hostname = opts.fetch(:hostname)\n app_id = opts.fetch(:app_id)\n\n if a... | [
{
"docid": "74e3561bfa5eb82903ae24ea4b61c82f",
"score": "0.6204464",
"text": "def host; @options[:hostname] end",
"title": ""
},
{
"docid": "9fcc08ec654b61c1b78432be01134bd2",
"score": "0.6162034",
"text": "def backend; end",
"title": ""
},
{
"docid": "9fcc08ec654b61c1b78... |
f86a46406c69b424b988ae66f5d15fea | Assert and wait for locator element to not contain text. | [
{
"docid": "4084bbfde63e1a303023b1ede79360f5",
"score": "0.81129897",
"text": "def assert_element_does_not_contain(locator, text, options={})\n element(locator).assert_does_not_contain(text, options)\n end",
"title": ""
}
] | [
{
"docid": "446f9d94aa41c1da4a3d0b65bc07921f",
"score": "0.8416794",
"text": "def assert_element_does_not_contain_text(locator, text, message=nil, timeout=default_wait_for_time)\n wait_for({:message => message, :timeout => timeout}) {element_does_not_contain_text(locator, text)}\n end",
"tit... |
9d2b5849da809a18749be6243311e012 | This routine is being used to determine claim is for UNAUTHENTICATED user or not. If there is a current_user that means that this claim is authenticated, so it is not a public type of claim. | [
{
"docid": "da80e5499ace634ea9e17cebb9dfce86",
"score": "0.71727574",
"text": "def claim_public?\n @current_user.nil?\n end",
"title": ""
}
] | [
{
"docid": "adb27929ab77598371543a2a9768560c",
"score": "0.67624193",
"text": "def authenticating_with_unauthorized_record?\n authenticating_with == :unauthorized_record\n end",
"title": ""
},
{
"docid": "36d083124391ac9ee100707d3813d85e",
"score": "0.67150944",
"text": "... |
bc1ca7bbdf027728839efcebef3bfea0 | Checks to see if the password matches that on record for the user | [
{
"docid": "b96262dc52d1f2fa3e7d01276754fae3",
"score": "0.82530314",
"text": "def password_match?\n @passwords.fetch(@username) == @password\n end",
"title": ""
}
] | [
{
"docid": "57df920243fe40f91ff52f32e516e052",
"score": "0.80231345",
"text": "def change_password?\n user.present? && user == record\n end",
"title": ""
},
{
"docid": "60e7f8aeef81b82290c3af8c9ec9ebac",
"score": "0.8011452",
"text": "def valid_password?(password)\n # TODO Use... |
952358b76e0d328f5332beae2e9eb477 | The number of items purchased | [
{
"docid": "2006e5fe99725d3dc495ca3b21489d9b",
"score": "0.0",
"text": "def quantity\n read_integer('quantity')\n end",
"title": ""
}
] | [
{
"docid": "013d580b5c6d27f39016322c08f867ee",
"score": "0.80416614",
"text": "def total_purchases(product)\n product[\"purchases\"].length\n end",
"title": ""
},
{
"docid": "00da2db0d69887d93e621a960c4e9e2f",
"score": "0.7923734",
"text": "def total_item_count\n items... |
a1768b7720da4968ddf183bc0255eee8 | base case def computer_places_piece!(brd) square = empty_squares(brd).sample brd[square] = COMP_MARKER end bonus 3 def computer_places_piece!(brd) with defensive capability square = detect_action(brd) square = empty_squares(brd).sample unless square > 0 brd[square] = COMP_MARKER end bonus 4 | [
{
"docid": "295387a627e30bfe19a01e3d52fcffe4",
"score": "0.9248619",
"text": "def computer_places_piece!(brd) # with offensive capability\n square = detect_action(brd, COMP_MARKER) # bonus 4, bonus 5a\n square = detect_action(brd, PLAYER_MARKER) unless square > 0\n square = 5 if empty_squares(brd).in... | [
{
"docid": "722eb29d16da208fcabc597c15721b67",
"score": "0.83294654",
"text": "def computer_places_piece!(brd)\n square = nil\n\n # offense first\n\n WINNING_LINES.each do |line|\n square = find_at_risk_square(line, brd, COMPUTER_MARKER)\n break if square\n end\n\n # defense \n if !square\n ... |
c9fadf599108ad88df7e87fff38e6ce7 | does the same thing as edit_document but has a differnt url name suitable url name for when creating documents rather then editing it | [
{
"docid": "82790e9de23c282dfca494d40e38ab62",
"score": "0.6289341",
"text": "def create\r\n edit_document\r\n render :action=>\"edit_document\"\r\n end",
"title": ""
}
] | [
{
"docid": "f63b3eeebdaa406200a0464cd74581cb",
"score": "0.7050116",
"text": "def url_for_document doc\n doc\n end",
"title": ""
},
{
"docid": "13b56df6a7c027c21465d2e30f19930d",
"score": "0.6650247",
"text": "def document_edit_link(document_id,return_url,return_text='Return')\n ... |
b30115969a9b05954bd6719206792d34 | vi: set ft=ruby : | [
{
"docid": "d8210d4dd93ce38eb33013856218fa80",
"score": "0.0",
"text": "def current_definition\n if @current_definition\n return @current_definition\n end\n dump = Ridgepole::Dumper.new.dump\n definition, _ = Ridgepole::DSLParser.new.parse(dump, {})\n @current_definition =definition\nend",
"... | [
{
"docid": "e3b5aa7fb9019ba714796fec13e3bb5f",
"score": "0.5853188",
"text": "def enable_indent\n \tVim.command(\"set filetype=#{@filetype}\")\n end",
"title": ""
},
{
"docid": "7aa8cf3a94ceb07fde09c2dbbb1bb333",
"score": "0.56426823",
"text": "def default_vimrc\n <<-EOS.uni... |
b582518dbdd0627c4987a9aa8ad29f15 | Creates a new MetaFile parser that will read from the given _io_ stream. | [
{
"docid": "d6af042f9f9cb2807907c01f8c8f256e",
"score": "0.7071593",
"text": "def initialize( io )\n raise ArgumentError, \"expecting an IO stream\" unless io.respond_to? :gets\n @io = io\n @meta_count = 0\n end",
"title": ""
}
] | [
{
"docid": "10920b9c46d2602ba1166f212a188836",
"score": "0.71698374",
"text": "def from_stream(io); end",
"title": ""
},
{
"docid": "8db9324747e1d4efa80e685e9409859d",
"score": "0.6901654",
"text": "def from_io io, parser=nil\n @input.io = io\n @input.parser = parser if... |
25666ce014727bc50ff3fe3a0cf15ee2 | Call into FiberExecutor to avoid this class getting overloaded while also minimizing the Puppet lookups needed from plan functions | [
{
"docid": "24ddbda7c415f10206b960408b1e8c68",
"score": "0.0",
"text": "def create_future(plan_id:, scope: nil, name: nil, &block)\n @fiber_executor.create_future(scope: scope, name: name, plan_id: plan_id, &block)\n end",
"title": ""
}
] | [
{
"docid": "8235ebf7058af650a1d4fa0d7e5d7c56",
"score": "0.6862085",
"text": "def executor; end",
"title": ""
},
{
"docid": "8235ebf7058af650a1d4fa0d7e5d7c56",
"score": "0.6862085",
"text": "def executor; end",
"title": ""
},
{
"docid": "8235ebf7058af650a1d4fa0d7e5d7c56",... |
c7fb7ea8eeaed385b9fe0aad0506c5b8 | Continue timing a result by toggling the start item, found by racer_id and racer_id. | [
{
"docid": "0361d04739795f79951e1633175118b3",
"score": "0.6017051",
"text": "def continue_time\n result = Result.find(params[:id])\n start_item = StartItem.where(:race_id=>result.race_id).where(:racer_id=>result.racer_id)[0]\n race = Race.find(start_item.race_id)\n start_item.finished = fal... | [
{
"docid": "f72e408c95ee7ca62d3d4d6e176167d7",
"score": "0.57328004",
"text": "def restart\n @target = @time_start = Time.now\n end",
"title": ""
},
{
"docid": "7079b793cbe874364c2414e8de0e7ad2",
"score": "0.5437414",
"text": "def toggle\n client.time.toggle(@time_entr... |
f1cfba97bb13db74692ec9f039623f49 | In order to run Aruba's subprocess helper methods: Interactive connection to the environment's virtual machine, replacing the ruby process with an SSH process. This method optionally takes a hash of options which override the configuration values. TODO rename this method to script_connect or script_block_connect | [
{
"docid": "80132a986fe6286c8950635b1df10538",
"score": "0.6890252",
"text": "def interactive_connect(opts={})\n if Util::Platform.windows?\n raise Errors::SSHUnavailableWindows, :key_path => env.config.ssh.private_key_path,\n :ssh_port => po... | [
{
"docid": "3145e9a87abbb3c4cfe182e37358136f",
"score": "0.65379876",
"text": "def execute\n log_debug \"[#{@node}] - Run interactive remote session...\"\n if @cmd_runner.dry_run\n log_debug \"[#{@node}] - Won't execute interactive shell in dry_run mode.\"\n else\n ... |
9a5f6d58c03493ffa26b2718670be97a | Reset configuration options to default values | [
{
"docid": "9059c0774b2a31c21fc7876e69ba4f71",
"score": "0.7021346",
"text": "def reset!\n Whitehouse::Configurable.keys.each do |key|\n instance_variable_set(:\"@#{key}\", Whitehouse::Default.options[key])\n end\n self\n end",
"title": ""
}
] | [
{
"docid": "dfeae341532e332e7d1a2a9e0c6b8af8",
"score": "0.8494143",
"text": "def reset!\n @options = defaults\n end",
"title": ""
},
{
"docid": "dfeae341532e332e7d1a2a9e0c6b8af8",
"score": "0.8494143",
"text": "def reset!\n @options = defaults\n end",
"title": ""... |
e6ee7357eb02137421aa42ad2a0bda66 | AS6206 | Authorization Code support for Cosmos Steps: Setup 1. Internal client requests auth code for user 2. User authenticates using auth code returned 3. Internal client requests auth code for user with overrides 4. User authenticates using auth code returned with overrides 5. Internal client requests auth code for ... | [
{
"docid": "a3506c3ea7521c7d44134c18a4527b21",
"score": "0.671591",
"text": "def test_authorization_code_for_internal_tools\n # Setup\n @internal_tools = setup_user({ 'internal_tools' => true })\n @user1 = setup_user({'email' => @user.email})\n @user2 = setup_user\n @user3 = setup_user\n\... | [
{
"docid": "3ea13994317f59fae03e8cd8d7a5d04a",
"score": "0.6898133",
"text": "def authorize_code(code)\n api_client.authorization.code = code\n api_client.authorization.fetch_access_token!\n # put the tokens to the sesion\n session[:access_token] = api_client.authorization.access_token\n session[:r... |
9796e0bb64d11cdbac6379075a065130 | Create a NxN grid of points on a face of the cube. Note that this will generate (N+1)(N+1) points. Each point is projected on the sphere and stored in an array. Note that all these are points on the unit sphere, and so their distance to the origin is 1, and so each point can be used as its own normal. | [
{
"docid": "37f9d311bca2659b116405d6c73d6d24",
"score": "0.7749322",
"text": "def grid(face, n)\n dx = 2.0/n\n dy = 2.0/n\n a = Array.new\n n += 1\n\n n.times do |j|\n y = -1.0 + j*dy\n n.times do |i|\n x = -1.0 + i*dx\n lon, lat = QuadSphere::CSC.inverse(face, x, ... | [
{
"docid": "b0376c35e07fb3e8502f610493a1b9e4",
"score": "0.5928719",
"text": "def generate_points(u_count, v_count)\n points = []\n v_count.times do |iv|\n row = []\n u_count.times do |iu|\n u = map1d(iu, (0..u_count), U_RANGE)\n v = map1d(iv, (0..v_count), V_RANGE)\n # default sc... |
8ca9926872d296512eb2383daa134eaa | Set up tasks for debugging the task library. | [
{
"docid": "90de4200858022a14a1eed13e6660417",
"score": "0.7477027",
"text": "def define_debug_tasks\n\t\ttask( :base_debug ) do\n\t\t\tself.output_documentation_debugging\n\t\t\tself.output_project_files_debugging\n\t\t\tself.output_dependency_debugging\n\t\tend\n\n\t\ttask :debug => :base_debug\n\tend... | [
{
"docid": "009d0919d0721c285882e75217e97943",
"score": "0.7469858",
"text": "def configure_tasks\n end",
"title": ""
},
{
"docid": "3bcadc068863ab29196f93e4c86bb24f",
"score": "0.7324389",
"text": "def define_debug_tasks\n desc \"Create a fresh ~/.hoerc file.\"\n task :conf... |
1a4d4a9f809171109843d75218fd495d | 2 inflation is worth 75 adm Assume you are at positiveenoughtocare inflation 25% of the time This is annual number | [
{
"docid": "3391f35701225ad293ca3c10459a491f",
"score": "0.6633541",
"text": "def inflation_reduction(v)\n monthly_adm_points v*(75.0/2.0/12)*0.25\n end",
"title": ""
}
] | [
{
"docid": "881c6e23b3dc7ab4764951668bfaadc4",
"score": "0.70765555",
"text": "def mnthly_interest(yearlyint)\n (yearlyint.to_f / 12) / 100\nend",
"title": ""
},
{
"docid": "fc10dbd622dc4a1d92192138060ccb2d",
"score": "0.677516",
"text": "def years_of_nationalism(v)\n global_revo... |
1c4e949864f7a1a8a544556456060f7a | Determine if any cookbooks were specified that aren't in our shelf. | [
{
"docid": "662c0b4aeb27905acfedea71fa6fa9da",
"score": "0.57690966",
"text": "def validate_cookbook_names!(names)\n missing = names - lockfile.graph.locks.keys\n\n unless missing.empty?\n raise DependencyNotFound.new(missing)\n end\n end",
"title": ""
}
] | [
{
"docid": "f765b02d778655bf5824871c34b95ff3",
"score": "0.7645979",
"text": "def has_cookbooks?\n !@dev_cookbooks.empty?\n end",
"title": ""
},
{
"docid": "1c12e9f13a4ca2745bec021f8b7c2907",
"score": "0.7284863",
"text": "def cookbooks(filter = nil)\n skipped_cookbooks ... |
c90c63f0c514a878043c868cda6ed835 | Notifies the specified facility staff member if an order is placed including a product | [
{
"docid": "9da3121d6c3a025063b3313377bbb570",
"score": "0.6409222",
"text": "def product_order_notification(order_detail, recipient)\n @order = order_detail.order\n @order_detail = OrderDetailPresenter.new(order_detail)\n attach_reservation_ical(order_detail.reservation) if order_detail.reserv... | [
{
"docid": "ec2f55c0d60f6ed25bcb3b7bc289dcf4",
"score": "0.59143496",
"text": "def show\n assert_product_is_accessible!\n add_to_cart = true\n @login_required = false\n\n # does the product have active price policies?\n unless @product.available_for_purchase?\n add_to_cart = false\n ... |
61e1a1fdbf77472cb5eec77b8c6d509e | deputize.rb 100616, modified version of older script 100617, added hash methods, rescue, more accurate ou routine 100617, added dummy receipt writing, logging, simplified (i think) get_ou method 100622, edited failure output 100622, edited get_ou method to exit if the correct ou isn't found cf. cf. | [
{
"docid": "13326454f9b6b629149b6b7645052d31",
"score": "0.0",
"text": "def get_host\n begin\n host=%x(/usr/sbin/dsconfigad -show | /usr/bin/awk '/Computer Account/ {print $4}').chomp\n return host\nrescue\n puts \"this machine must not be bound to AD.\\n try again.\"\nend\nend",
"title": ""
}... | [
{
"docid": "00708a284db44f7730a8c94229473bb9",
"score": "0.57585126",
"text": "def run\n print_status(\"Running module against #{sysinfo['Computer']}\")\n if datastore['OU_DN'] =~ /^OU=*/\n # Make sure the extension is loaded.\n if load_extapi\n domain = get_domain\n unless... |
f76e78611759c20ec48482b2a87a1e55 | left options blank for now api_key = 'YOUR_APP_API_KEY' secret_key = 'YOUR_APP_SECRET_KEY' linkedin = LinkedIn::Oauth.new(api_key, secret_key) | [
{
"docid": "a6e3a845e05877b375ff914f3400cf85",
"score": "0.0",
"text": "def initialize(api_key, api_secet, options={})\n @api_key, @api_secret = api_key, api_secet\n @consumer_options = options.merge(ApiOptions)\n end",
"title": ""
}
] | [
{
"docid": "3fc773d0fcb85a2827d269ef1c037290",
"score": "0.79820293",
"text": "def linkedin_client\n # load api\n\n linkedin_api_settings = YAML.load_file(\"#{Dir.home}/.linkedin\")\n \n consumer_key = linkedin_api_settings[\"consumer_key\"]\n consumer_secret = linkedin_api_settings[\"... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "67613a10a9e30a27afda8224d1165461",
"score": "0.0",
"text": "def set_game_stat\n @game_stat = GameStat.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.60315156",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.6018921",
"text": "de... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "bc12e4524b8fb9007141c071f9480439",
"score": "0.0",
"text": "def reports_daily_contribution_params\n params[:reports_daily_contribution]\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7496729",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.6958585",
"text": "def strong_params\n params.require(:request).permit(param_white... |
6b043cad48def3e01946252f927a943d | Dimension of a composition is the sum of its member quantities' dimensions. | [
{
"docid": "850ea027302de5968ccf2549e09d7139",
"score": "0.6986551",
"text": "def dimension\n map { |qnt, exp| qnt.dimension * exp }.reduce SY::Dimension.zero, :+\n end",
"title": ""
}
] | [
{
"docid": "25f9536b6d2f35560accc756323befbb",
"score": "0.6592833",
"text": "def total_dimension\n return self.input_dimension + self.output_dimension\n end",
"title": ""
},
{
"docid": "cc70f0067c0c4d038bb241ad6674a9e9",
"score": "0.6396422",
"text": "def dim\n composition_... |
ac3b4c1f974f882d844bc45a58e94968 | Return true if the settings configuration file contains the specified section name. This method ignores whatever section that may or may not have been pointed to by the use command. | [
{
"docid": "750f5ff43d9d0638bb8d0e9988abb827",
"score": "0.7155484",
"text": "def has_section?( section_name )\n\n KeyError.not_new( section_name, self )\n\n raise ArgumentError.new \"No file found at [ #{@file_path} ]\" unless File.exists? @file_path\n the_text = File.read @file_path\n ... | [
{
"docid": "543c5bf6a33808fa2751868404084b5e",
"score": "0.7574528",
"text": "def has_section?( section )\n @ini.has_key? section.to_s\n end",
"title": ""
},
{
"docid": "08bbdea4f23b6f6d35a46e5e84cdbaa0",
"score": "0.7449914",
"text": "def section?(section)\n @ini.key? section... |
de7d38fa672135d1fadd43e689bea21e | Find company from id | [
{
"docid": "29088463c5ae349b9a3fb78945881d46",
"score": "0.80864584",
"text": "def get_company_from_id\n Company.find(params[:id]) if params[:id].present?\n end",
"title": ""
}
] | [
{
"docid": "127300860e58bef781fa912dbfef67d0",
"score": "0.82096994",
"text": "def find_company\n Company.find(params[:company_id].to_i)\n end",
"title": ""
},
{
"docid": "127300860e58bef781fa912dbfef67d0",
"score": "0.82096994",
"text": "def find_company\n Company.find(... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "f82e40350dbeb51619d16e42249707c9",
"score": "0.0",
"text": "def set_timer\n @timer = Timer.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... |
4ae30f2df4db6675327c331684ae7fa8 | Move each of the items given by +tag_or_id+ in the canvas coordinate space by adding +x_amount+ to the xcoordinate of each point associated with the item and +y_amount+ to the ycoordinate of each point associated with the item. This command returns nil. | [
{
"docid": "16abc94e5851aaefd09bcfc09f047cb8",
"score": "0.6891906",
"text": "def move(tag_or_id, x_amount, y_amount)\n execute_only(:move, tag_or_id, x_amount, y_amount)\n end",
"title": ""
}
] | [
{
"docid": "16253327eb7057f7d44b09055d551e3b",
"score": "0.62533754",
"text": "def move_by *args\n @real_point = nil\n incremental_position = parse_position *args\n @position[:x] += incremental_position[:x] if (incremental_position.key? :x)\n @position[:y] += incremental_position[:y... |
e65f6442d4201cfbdf153744d7f40996 | Decide whether to log transitions | [
{
"docid": "fdc9b1f062ed1b6553b4bd65b11ff030",
"score": "0.7055338",
"text": "def log_transitions(value)\n self.log_transitions = value\n end",
"title": ""
}
] | [
{
"docid": "eba5b40cc4cc20d4d8f75c4a2ae05290",
"score": "0.6534422",
"text": "def log?\n @log ||= false\n end",
"title": ""
},
{
"docid": "f73db857eb02e7a407fc56152ed49931",
"score": "0.6500237",
"text": "def recently_walked?(transition); end",
"title": ""
},
{
"d... |
5ac81ff2af4cdbcf2ad66608c481e8b4 | PATCH/PUT /countries/1 PATCH/PUT /countries/1.json | [
{
"docid": "1c1bf387beb0e881261065992e651078",
"score": "0.0",
"text": "def update\n respond_to do |format|\n if @locality.update(locality_params)\n format.html { redirect_to localities_url, notice: 'Locality was successfully updated.' }\n format.json { render :show, status: :ok, l... | [
{
"docid": "9dd6062eff5b476b1f53bda2ed160b05",
"score": "0.6874166",
"text": "def update\n respond_to do |format|\n if @countries.update(countries_params)\n format.html { redirect_to @countries, notice: 'Countries was successfully updated.' }\n format.json { render :show, status: :... |
a17ae17aea345e17dd3efdac2b5f25c7 | before_filter :delete_chest, :only => :create | [
{
"docid": "754ae7050f4e0b964c5179382ed8c45a",
"score": "0.0",
"text": "def new\n super\n end",
"title": ""
}
] | [
{
"docid": "908c272d25300e0962429fd02689e686",
"score": "0.67316484",
"text": "def destroy\n @chest.destroy\n respond_to do |format|\n format.html { redirect_to chests_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "95d5b6961ebea5f990561d... |
75996333c2622c952d193edcb65b9a26 | PUT /team_roasters/1 PUT /team_roasters/1.xml | [
{
"docid": "26f7e731330837488107184bde689881",
"score": "0.6455079",
"text": "def update\n @team_roaster = TeamRoaster.find(params[:id])\n\n respond_to do |format|\n if @team_roaster.update_attributes(params[:team_roaster])\n format.html { redirect_to(@team_roaster, :notice => 'Team ro... | [
{
"docid": "139de7ef8ddb2f4f0e2a3143012a0ae0",
"score": "0.5916464",
"text": "def destroy\n @team_roaster = TeamRoaster.find(params[:id])\n @team_roaster.destroy\n\n respond_to do |format|\n format.html { redirect_to(team_roasters_url) }\n format.xml { head :ok }\n end\n end",
... |
85db7240179c50fa725f5fe5a83ab6ce | PUT /product/1 PUT /product/1.xml | [
{
"docid": "a7a91e7c8c411d5afecf8d7a9c1ee6a7",
"score": "0.0",
"text": "def update\n @product = Product.find(params[:id])\n\n collect_and_assign_product_weaves\n collect_and_assign_product_fabrics\n collect_and_assign_product_attributes\n collect_and_assign_new_categories\n \n respo... | [
{
"docid": "e631b376ae2ccb776680432bf94b01cc",
"score": "0.67670256",
"text": "def put(uri, xml)\r\n req = Net::HTTP::Put.new(uri)\r\n req[\"content-type\"] = \"application/xml\"\r\n req.body = xml\r\n request(req)\r\n end",
"title": ""
},
{
"docid": "fa2eeaa45445dd761... |
3e5ec671a342a85c90aade5f033b5d22 | Contains methods that return the feature's original default value, or block value. | [
{
"docid": "cb673fa5027636c791cdef3a4069d385",
"score": "0.0",
"text": "def internal_feature_module\n @_internal_feature_module ||= Module.new\n end",
"title": ""
}
] | [
{
"docid": "50bd964a3545b2bdd5781aa3910fe919",
"score": "0.75824744",
"text": "def default_feature_value() nil end",
"title": ""
},
{
"docid": "b44cc0dd1e5c145bb0de91b5ac3af0f3",
"score": "0.7205173",
"text": "def default_value; end",
"title": ""
},
{
"docid": "b44cc0dd1e... |
13a25bf991f72692776bbb0b9271f4c2 | Activates the user in the database. | [
{
"docid": "4eccd7e4027657911e44838bb2539280",
"score": "0.0",
"text": "def activate\n @activated = true\n update_attributes(:activated_at => Time.now.utc, :activation_code => nil)\n end",
"title": ""
}
] | [
{
"docid": "bc8a8c88e1587006745661f53eb2cad0",
"score": "0.79187834",
"text": "def activate\n @activated = true\n activated_at = Time.now\n activation_code = nil\n logger.info \"Activando el usuario\"\n save\n end",
"title": ""
},
{
"docid": "d4c752e40f45069854bc693... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "91213eb7eb6353c446012097d4474acb",
"score": "0.0",
"text": "def set_host\n @host = Host.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... |
cb4c0cc7bd40cc62fa42abee66d3f4cd | Returns whether the cache is currently in review. | [
{
"docid": "a59e6c633ac997037a002c3c7cb4710c",
"score": "0.7773215",
"text": "def in_review?\n @in_review ||= begin\n raise NotFetchedError unless fetched?\n [!!@data.match(/<p class=\"Warning\">Sorry, you cannot view this cache listing until it has been published/),\n !!@data... | [
{
"docid": "8eb19b9be40bf381e880df60f7c13f0e",
"score": "0.70867723",
"text": "def reviewed?\n @status == :reviewed\n end",
"title": ""
},
{
"docid": "236d3124cd1dbd893553d954770d07cf",
"score": "0.69645554",
"text": "def reviewed?\n !application_review_decision_type.nil?\... |
291c13d0277a2a1434a2a870ff1088fc | GET /hhs GET /hhs.json | [
{
"docid": "807e32ae88e46f0087ec6902e962496d",
"score": "0.71626157",
"text": "def index\n @hhs = Hh.all\n end",
"title": ""
}
] | [
{
"docid": "7e4d23e1d0b5ed0d49b5875a64fe218e",
"score": "0.69298667",
"text": "def index\n @hohhs = Hohh.all\n end",
"title": ""
},
{
"docid": "3d4a6b338098e605e4d954cc07ce4a15",
"score": "0.651288",
"text": "def hget(path)\n\t\t\trequest = Net::HTTP::Get.new(\"#{@server.path}#{p... |
fd96e734e7f24fd17d5b7af7028f74fc | generate user link html tag according current user status: banned, anonymity, deactivated ownerize: true/false (default false) permit to add extra 's to mark as owner of something params: extra url params for url link | [
{
"docid": "59a9a13f52b9dac604d872b3b21fc864",
"score": "0.67739177",
"text": "def link_to_user(user, attrs = {}, &block)\n attrs = {mark: true, time: nil, label: nil, ownerize: false, class: '', params: {}}.merge(attrs)\n attrs[:label] = user ? user.full_name(attrs[:mark], attrs[:time]) : 'Guest'... | [
{
"docid": "283a610bc31f733a29c8cf889f5f3799",
"score": "0.6609629",
"text": "def link_to_user(user, opts={})\n avatar = AvatarAttachment.find_by_owner_id(user.id)\n img = image_tag(avatar.small_thumb, class: \"profile-pic pull-left\", style: \"height:20px;padding-right:5px\") if avatar\n link_... |
d1b411df980247901686bbce08dcc5c1 | Sends an SMS message | [
{
"docid": "3c3bda6b0f38ed4ffb417adac64afff4",
"score": "0.0",
"text": "def send_message_with_http_info(sms_message, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: MessagesApi.send_message ...\"\n end\n # verify the required parameter ... | [
{
"docid": "a67696c6feeb9fe5122bca32f9912e74",
"score": "0.80277115",
"text": "def marcatel_send_sms!(phone_number, message)\n marcatel_client.insert_message! phone_number, message\n end",
"title": ""
},
{
"docid": "30818167a935a8a3a4aaca4bc52dc3db",
"score": "0.8010367",
"te... |
b4b1f5ca37e6808b1f29e3d3cc8e358f | Destroy directory. required attributes: key | [
{
"docid": "48a183f259ef36dac3554572bc100d7c",
"score": "0.6405541",
"text": "def destroy\n requires :key\n\n service.delete_container(key)\n end",
"title": ""
}
] | [
{
"docid": "43fc2bd7903927fe39fe3a9d76b8d5e2",
"score": "0.82836384",
"text": "def destroy(key)\n path = @path.join key\n FileUtils.rm_rf path if path.exist?\n end",
"title": ""
},
{
"docid": "840fae197c7e57a44348d6a091acd79f",
"score": "0.7600209",
"text": "def delete(key)\n ... |
1785f9222ad9880cadfec4cad059555f | Returns true if the user's password reset period has expired | [
{
"docid": "d6e8d7f51dd56b0bde43e1013125aa50",
"score": "0.0",
"text": "def password_reset_expired?\n return reset_sent_at < 2.hours.ago\n end",
"title": ""
}
] | [
{
"docid": "b5d49aa7583158041f3d1b1511be5244",
"score": "0.8722268",
"text": "def password_reset_expired?\n reset_sent_at < 2.hours.ago\n end",
"title": ""
},
{
"docid": "b5d49aa7583158041f3d1b1511be5244",
"score": "0.8722268",
"text": "def password_reset_expired?\n rese... |
b2fdcbd6bb7fb5caf6c93fea53ebda90 | Add a color to the list of available colors for lines. Example: add_color('c0e9d3') | [
{
"docid": "75e64825d481b72d8860c5509f84e37e",
"score": "0.7501074",
"text": "def add_color(colorname)\n @colors << colorname\n end",
"title": ""
}
] | [
{
"docid": "37ea1b13e3fe34ea621401162b270e75",
"score": "0.7564243",
"text": "def add_color(color)\n @colors << color.upcase[0].to_sym # Allows user to both type in the full\n end",
"title": ""
},
{
"docid": "f622f0feda451d6bb74834537da2a3b5",
"score": "0.73006725",
"text": "... |
c89baed511272ed366cdc63d481fc14d | def read_translated_attribute(name, locale) globalize.stash.contains?(locale, name) ? globalize.stash.read(locale, name) : translation_for(locale).send(name) end | [
{
"docid": "66e4ca0af7481ca70a2a881fb57d895a",
"score": "0.0",
"text": "def contributor\n contributor_type.nil? ? nil : contributor_type.constantize.find(contributor_id)\n end",
"title": ""
}
] | [
{
"docid": "dc1919132498593d234b7b5f01c99986",
"score": "0.85537934",
"text": "def read_translation(attr_name, locale = I18n.locale)\n translations = send(translated_attr_name(attr_name)) || {}\n return translations[locale] if translations.key?(locale)\n return translations[I18n.def... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "031392d657ce0fa5dfce3801d63f234f",
"score": "0.0",
"text": "def backend_params\n params.require(:backend).permit(:title, :artist, :album, :cover, :mp3file)\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.6980244",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6782812",
"text": "def strong_params\n params.requi... |
066675d4dedb4f6f6bebce652b9d552f | Execute the Choreo using the specified InputSet as parameters, wait for the Choreo to complete and return a ResultSet containing the execution results. | [
{
"docid": "636b5b63f2b1a72dc347e683a5c24a1e",
"score": "0.0",
"text": "def execute(input_set = nil)\n resp = super(input_set)\n results = GetCommitteesByLegislatorResultSet.new(resp)\n return results\n end",
"title": ""
}
] | [
{
"docid": "ea872306361fc864408e8279b0199bbe",
"score": "0.75938",
"text": "def execute(input_set = nil)\n resp = super(input_set)\n results = QueryResultSet.new(resp)\n return results\n end",
"title": ""
},
{
"docid": "bf6609d69b18cbe3a5f620c672c2cbbf",
"score": "0.756... |
8e8ccf611718573018e92f8b5a3149df | Header = (Include | Namespace) | [
{
"docid": "1159327c8403afec8ca97775f2b09b27",
"score": "0.76626927",
"text": "def _Header\n\n _save = self.pos\n while true # choice\n _tmp = apply(:_Include)\n break if _tmp\n self.pos = _save\n _tmp = apply(:_Namespace)\n break if _tmp\n self.pos = _save\n bre... | [
{
"docid": "670753022103037d2667860e779196b6",
"score": "0.6995327",
"text": "def include_in_headers=(_arg0); end",
"title": ""
},
{
"docid": "4b1417b8ceed908808d1cf3a9b1aaf61",
"score": "0.69357574",
"text": "def def_header\n tree[1]\n end",
"title": ""
},
{
"docid":... |
a3578b95c2602609b7b694ca60125edd | DELETE /resource_values/1 DELETE /resource_values/1.json | [
{
"docid": "fec4fa15440720906ca77e14706445ff",
"score": "0.7864796",
"text": "def destroy\n @resource_value = ResourceValue.find(params[:id])\n @resource_value.destroy\n\n respond_to do |format|\n format.html { redirect_to resource_values_url }\n format.json { head :no_content }\n ... | [
{
"docid": "174b723f9e43bfa7501a9cdc389e4c1b",
"score": "0.72018796",
"text": "def delete\n @response = self.class.delete(\"#{@server_uri}/resource_name/#{@opts[:id]}.json\")\n end",
"title": ""
},
{
"docid": "8e448ff9240bd6b6429ea78689d829ef",
"score": "0.71110255",
"text": "def... |
45ba185c6469ac5f3a9a182f8cc2f0bc | GET /tickets/1 GET /tickets/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "f3a5f6a48e24136dd6b7ea4be47eb6eb",
"score": "0.7638401",
"text": "def get_tickets \n render json: { status: 200, tickets: @event_tickets.as_json(only: [:ticket_number]) }\n end",
"title": ""
},
{
"docid": "749d4df3523fac8d01ef82c7f59de95d",
"score": "0.753632",
"text"... |
75d12c0e68a640ed653219a3010e1bdc | Get Offensive Animation ID for Normal Attack | [
{
"docid": "ae59e39614f065c5460530dd433c67c9",
"score": "0.69466406",
"text": "def animation1_id(w=0)\n return $data_enemies[@enemy_id].animation1_id\n end",
"title": ""
}
] | [
{
"docid": "da090c29e803b14aa67084bcf4ad1507",
"score": "0.70069283",
"text": "def animation1_id\n return $data_enemies[@enemy_id].animation1_id\n end",
"title": ""
},
{
"docid": "da090c29e803b14aa67084bcf4ad1507",
"score": "0.70069283",
"text": "def animation1_id\n return $da... |
d45395e6a3dabfaf1e24310ec1ef8441 | The model_type of individual associated items for iteration. | [
{
"docid": "20ab8af14c438cbc21928a801a80128f",
"score": "0.5979999",
"text": "def table_row_model_type\n row_model_type\n end",
"title": ""
}
] | [
{
"docid": "b301f2011ecb3c11e81ac86385ea2d75",
"score": "0.71576875",
"text": "def model_type\n self.type\n end",
"title": ""
},
{
"docid": "a7ca2e345bf1d2b2a4f10aed07ba714f",
"score": "0.707287",
"text": "def item_type\n @item.item_type if @item\n end",
"title": ""
... |
4562780e6c62c481d0a860a265793d89 | GET /location_details/1 GET /location_details/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "0765ca15b7d2f7859069f40afd77fee7",
"score": "0.7796811",
"text": "def event_get_location_details\n @loc = Apis::HereApi.new(\"\").get_location_details(params[:locationid])\n render json: @loc\n end",
"title": ""
},
{
"docid": "798160c5de31ad6b84370acc425b45aa",
... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "f47bd582f0e1ba787284665627e1d749",
"score": "0.0",
"text": "def set_contestant\n @contestant = Contestant.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "bd89022716e537628dd314fd23858181",
"score": "0.6165152",
"text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n end",
"title": ""
},
{
"docid": "3db61e749c16d53a52f73ba0492108e9",
"score": "0.60463154",
"text": "def action_hook... |
1dc4bd1d90a811f888f702e6b8bf26fc | Set field `name_or_id` equal to `value`. | [
{
"docid": "da5cd2aafcfbc700f4713592d71620ec",
"score": "0.6475817",
"text": "def []=(name_or_id, value)\n @pending_changes[self.field_id(name_or_id)] = value\n end",
"title": ""
}
] | [
{
"docid": "849f8240554fad17cdbb718b4fa08be2",
"score": "0.72269124",
"text": "def set_field(name,value)\n begin\n field = find_field(name)\n field.Value = value.to_s if field\n rescue\n require 'pry'\n binding.pry\n nil\n end\n end",
"title": ""
},... |
a3645c7a21ddc46ad084a203d3f8cac6 | GET /forms Metodo que lista todos los formularios Parametros de entrada: Ninguno | [
{
"docid": "80abfb23a0d8c570cd9f8b300fddf527",
"score": "0.6324234",
"text": "def index\n @forms = Form.all\n end",
"title": ""
}
] | [
{
"docid": "312798fa69ee7bcd7be50e37da3e8505",
"score": "0.74930453",
"text": "def retrieve_forms()\n start.uri('/api/form')\n .get()\n .go()\n end",
"title": ""
},
{
"docid": "61bf046c90b5fe93f82cec84f88ec5f9",
"score": "0.7107778",
"text": "def retrieve_fo... |
7d83898e8c423657f7ab192bded2a749 | creates a DBform of the instance | [
{
"docid": "561f96da58e5998a3e20d492e46d95b8",
"score": "0.0",
"text": "def mongoize\n {\n :city => @city, :state => @state, \n :loc => {\n :type => 'Point', :coordinates => [@location.longitude, @location.latitude]\n }\n }\n end",
"title": ""
}
] | [
{
"docid": "79125e2037665e04383aed64eb17a193",
"score": "0.68309397",
"text": "def db\r\n TransmissionModel.new\r\n end",
"title": ""
},
{
"docid": "6bbbf09b1404436322f670c78800ec72",
"score": "0.68179846",
"text": "def new\n @db_instance = DbInstance.new\n\n respond_with @... |
970bc03d955502346747745cabc4ef7e | Adds words to hash | [
{
"docid": "5575951630c69328b9e3da63d2e4cb0c",
"score": "0.6175178",
"text": "def add(word, nextWord)\r\n @words[word] = Hash.new(0) if !@words[word]\r\n @words[word][nextWord] += 1\r\n end",
"title": ""
}
] | [
{
"docid": "85943b267668f9bd6a7d168eaf42a911",
"score": "0.7062646",
"text": "def add_word word #Function shovels individual strings into the dictionary array\n @dictionary << word\n end",
"title": ""
},
{
"docid": "21bbd2a38751ddfe1dd6a249ef62... |
a9cff8b53265c2ba3a38d5dd48ad64f2 | PATCH/PUT /course_universities/1 PATCH/PUT /course_universities/1.json | [
{
"docid": "545ccadbe9dcaa8044f2fcc575c633e2",
"score": "0.704606",
"text": "def update\n respond_to do |format|\n if @course_university.update(course_university_params)\n format.html { redirect_to @course_university, notice: 'Course university was successfully updated.' }\n format... | [
{
"docid": "3cb13a8981c5b8ec953c7c8a4d3decab",
"score": "0.6796626",
"text": "def update\n respond_to do |format|\n if @university.update_attributes(params[:university])\n format.html { redirect_to @university, notice: t2('update.notice') }\n format.json { head :no_content }\n ... |
4eae79a3a01b6511c76d606443de8c87 | GET /loan_details/1 GET /loan_details/1.json | [
{
"docid": "9b0950ae3af9bbba1c2ff332ba9f10a9",
"score": "0.8183539",
"text": "def show\n @loan_detail = LoanDetail.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @loan_detail }\n end\n end",
"title": ""
}
] | [
{
"docid": "9251321db06f4f84b714f979e4f1d04b",
"score": "0.82865095",
"text": "def show\n @loan_detail = LoanDetail.find(params[:id])\n \n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @loan_detail }\n end\n end",
"title": ""
},
{
"d... |
a2099a77c85e91272ae2f9e35b937953 | Only allow a trusted parameter "white list" through. | [
{
"docid": "71bf612214f7160ff17d699977f554fc",
"score": "0.0",
"text": "def status_dummy_params\n params.require(:status_dummy).permit(:e_no)\n end",
"title": ""
}
] | [
{
"docid": "c1f317213d917a1e3cfa584197f82e6c",
"score": "0.7121987",
"text": "def allowed_params\n ALLOWED_PARAMS\n end",
"title": ""
},
{
"docid": "b32229655ba2c32ebe754084ef912a1a",
"score": "0.70541996",
"text": "def expected_permitted_parameter_names; end",
"title": "... |
c62684c01901641168ea2f57a2b7532a | Scans the content array for subsection nodes | [
{
"docid": "e71da774e4af0a05a69cdad37f708112",
"score": "0.7917669",
"text": "def scan_for_sub_sections\n\t\t\tif @content.nil? || @content.size < 1 then\n\t\t\t\treturn -1\n\t\t\tend\n\t\t\t\n\t\t\t@content.each do |line|\n\t\t\t\tmatchdata = REPEATABLE_SECTION.match line\n\t\t\t\tsubsection = []\n\t\t... | [
{
"docid": "36cfd3fc50cd716a90b7c2876d0b9294",
"score": "0.65939564",
"text": "def subsections\n return suite.sections.select do |sect|\n sect.parent_id == data.id\n end\n end",
"title": ""
},
{
"docid": "a3414a10599db594438e89c4959ffb0d",
"score": "0.64714766",
"... |
81cd44cff6a7a9f5918eeb36c69cb965 | if user logged in with omniauth, password is not required | [
{
"docid": "f7260442b3c192b8594e1ef52a9867b8",
"score": "0.0",
"text": "def password_required?\n\t\tsuper && provider.blank?\n\tend",
"title": ""
}
] | [
{
"docid": "245e174ebc62326d8d828efea5cad1e1",
"score": "0.7481954",
"text": "def password_required?\n super unless has_facebook_auth\n end",
"title": ""
},
{
"docid": "59528d63a57e1bac88670fe93e3d4282",
"score": "0.7460863",
"text": "def authenticate_user\n Rails.application.... |
6cca3a912b2f2c22b34e99f56903cdc5 | generate an action URL of the form | [
{
"docid": "0f6096825eb5e0bc4fb4a026233980c0",
"score": "0.5607426",
"text": "def action_url(namespace, path = nil)\n [self.path, \"#{ACTION_SEPARATOR}#{namespace}\", path].compact.join(S::Constants::SLASH).gsub(%r{//}, '/')\n end",
"title": ""
}
] | [
{
"docid": "e6d1841f362e70c1e8ebfd2ef8395826",
"score": "0.70956016",
"text": "def action\n form_data['action']\n end",
"title": ""
},
{
"docid": "5afc8309c888a8034ee27ad2a918fba7",
"score": "0.69774437",
"text": "def form_url\n URL\n end",
"title": ""
},
... |
5e481814436ff9880c46aee74c6ba50f | Get a transaction from Universign | [
{
"docid": "1706e8a605879e78e36746d2cd4821fd",
"score": "0.71570635",
"text": "def get\n @client = Universign::Client.new\n\n safeguard do\n result = @client.call('requester.getTransactionInfo', @transaction_id)\n self.from_data(result)\n end\n end",
"titl... | [
{
"docid": "2c44e5d6c043d968da512199f87ef298",
"score": "0.7816194",
"text": "def get_transaction\n @transaction = Transaction.find(params[:id])\n end",
"title": ""
},
{
"docid": "3edb0344d3a1ee5b282683607bf9d62a",
"score": "0.7810169",
"text": "def getTransaction(id)\n ... |
91721927b3eaab2cfbfe11f50e4999e7 | Set the document id. ==== Parameters id:: ID of the document. | [
{
"docid": "67b3fa3807cd65a981ef4019183a05a9",
"score": "0.6991031",
"text": "def setId(id)\r\n\t\t\t\t\t@id = id\r\n\t\t\t\tend",
"title": ""
}
] | [
{
"docid": "478f5a3300482835e63f4da25f1cd733",
"score": "0.7742953",
"text": "def id=(id)\n raise ArgumentError.new(\"Invalid ID: Document id must be a String or respond to #to_s\") if (id.nil? || !id.respond_to?(:to_s))\n @id = id.to_s\n raise ArgumentError.new(\"Invalid ID: Document id ... |
7274955dc152821c5072e583adba5c59 | before_filter :require_editor_role, :only => [:show_progress] | [
{
"docid": "450d1ab680d7ced1275e1a30406fcb0c",
"score": "0.0",
"text": "def api_index_published\n projects_json = {}\n @projects = Project.where(:is_public=>true).order(\"updated_at DESC\").limit(3)\n @projects.each_with_index do |p, idx|\n projects_json[idx] = {}\n projects_json[idx]... | [
{
"docid": "a92ba0f88a8a0be231172f3403f45c6d",
"score": "0.66923535",
"text": "def require_in_progress_editor\n return if valid_edit_code? ||\n resource&.dataset_in_progress_editor&.id == current_user.id ||\n current_user.curator?\n\n display_authorization_failure... |
49aaf3adf44d79c472fc41b73fc4ca10 | Delete this Website Push ID. | [
{
"docid": "20ae10f2531b49db17b99269c816ad81",
"score": "0.8009543",
"text": "def delete!\n client.delete_website_push!(website_id, mac: mac?)\n self\n end",
"title": ""
}
] | [
{
"docid": "f245842fcfaa8d5c260b26307489641d",
"score": "0.6959248",
"text": "def delete(id)\n Mailgun.submit :delete, webhook_url(id)\n end",
"title": ""
},
{
"docid": "12e378a2d4b03dbe8a0be4efa03d0d4c",
"score": "0.6862061",
"text": "def delete(id)\n # TODO: Implement ... |
97f63f785ef295b50bf6b325edcbfd26 | (private) Defines the builder class used during assembly. Builders maintain intermediate results during the assembly process. In a nutshell, a builder collects the bytes, labels and linker directives, and puts them together at the end of the assembly process. Builder classes are synthesized automatically if they don't ... | [
{
"docid": "013ed24e3a9890599bfbdf89be15b57b",
"score": "0.83815384",
"text": "def define_builder_class\n if @target.const_defined? :Builder\n @builder_class = @taget.const_get :Builder\n else\n @builder_class = Class.new\n @target.const_set :Builder, @builder_class\n end\n @b... | [
{
"docid": "2d17bbcafdde6a081ffaa5d4c4912037",
"score": "0.6383211",
"text": "def builder; end",
"title": ""
},
{
"docid": "2d17bbcafdde6a081ffaa5d4c4912037",
"score": "0.6383211",
"text": "def builder; end",
"title": ""
},
{
"docid": "2d17bbcafdde6a081ffaa5d4c4912037",
... |
747f89190b52ebd3954a8a53d2b47ca5 | =begin This function is used to create the cards and the playing deck. Each for loop is for a characteristic of the card(shape, color,etc). It then adds the card to the deck (array). | [
{
"docid": "545eb002677d9de1ce2740c2c6945662",
"score": "0.8525408",
"text": "def makeDeck\n\t\tshadeArray = [\"solid\", \"striped\",\"open\"]\n\t\tnumberArray = [1,2,3]\n\t\tshapeArray = [\"diamond\", \"squiggle\", \"oval\"]\n\t\tcolorArray = [\"red\", \"green\", \"purple\"]\n\n\t\tcount =0\t\t\t\n\t\t... | [
{
"docid": "ff26a31277530cb553aa2a8341c4b977",
"score": "0.8747348",
"text": "def create_deck\n deck = Array.new\n id = 0\n (0..2).each do |number|\n (0..2).each do |color|\n (0..2).each do |shape|\n (0..2).each do |shade|\n ... |
ed8ffd5661d3fb8779a0fc5ede3354b9 | Formats and displays a report of the given results. | [
{
"docid": "d61cb2c7139d01986b7ca14a6feaeb7d",
"score": "0.65070796",
"text": "def report(results, indent: 0, percentiles: [ 10, 25, 50, 75, 90, 95, 98, 99 ])\n results.each do |key, value|\n puts format('%*s%s:', indent, '', key)\n\n if value.respond_to?(:summary)\n puts val... | [
{
"docid": "c60eb069dc24714f3766d2a61b46d8b6",
"score": "0.7688103",
"text": "def display_results\n print_header\n print_detailed_report\n write_csv_report\n display_status\n end",
"title": ""
},
{
"docid": "cd6ff99959459da9f7841dd738671ddb",
"score": "0.730577",
... |
d421e0c5d2acb5a180228bfb42dcd7b7 | Accepts 1 or 2 arguments 1 argument should be a CGPoint, CGSize, Array[Numeric, Numeric] or UIOffset 2 arguments should be Numeric, Numeric | [
{
"docid": "cb4acedccdb487b99e1110437b83ebb5",
"score": "0.0",
"text": "def Size(w_or_size, h=nil)\n unless h\n case w_or_size\n when CGSize\n w = w_or_size.width\n h = w_or_size.height\n when CGPoint\n w = w_or_size.x\n h = w_or_size.y\n ... | [
{
"docid": "1cf87bccbfb5cb490a36f99dc4b83661",
"score": "0.6387439",
"text": "def offset(arg0)\n end",
"title": ""
},
{
"docid": "559a1dfdd7ea09009c5ad39a982baa21",
"score": "0.6030894",
"text": "def adjust(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end",
"title": ""
}... |
cc3e9d54de9959d8b4393bcdfce1be07 | need to sort the values by frequencies, then multiply to get the sort | [
{
"docid": "7f2848d9778600a448bf897976f0ebe8",
"score": "0.0",
"text": "def sort\r\n #create an array of cards by each value\r\n cards_by_value = Hash.new([])\r\n @cards.each { |card| cards_by_value[card.value] += [card] }\r\n #sort the values by length first, then value\r\n sorted_hand =... | [
{
"docid": "716738121527e5a3546704934905c043",
"score": "0.7341283",
"text": "def sort_by_frequency_with_details\n histogram = inject(Hash.new(0)) { |hash, x| hash[x] += 1; hash}\n histogram.to_a.map { |arr| [arr[1], arr[0]] }.sort_by {|arr| arr[0]}.reverse\n end",
"title": ""
},
{
"d... |
2a3c1aa7cb29f37d0d04ed8aa8d18a34 | GET /part2_offerings GET /part2_offerings.json | [
{
"docid": "28b874039adc6157b2c7889a69dff3b5",
"score": "0.73777044",
"text": "def index\n @part2_offerings = Part2Offering.all\n end",
"title": ""
}
] | [
{
"docid": "1e00651d75d6a36f2472a879b9ed0175",
"score": "0.69231707",
"text": "def index\n @offerings = Offering.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @offerings }\n end\n end",
"title": ""
},
{
"docid": "d9963c0c2ed0de... |
a1db977b2f571c453bc544189fbe2aa6 | 5. I can log my weight at the end of the week | [
{
"docid": "8abf31cc907ec37d83412c54b5d86778",
"score": "0.6470833",
"text": "def log_my_weight(weight)\n self.current_weight = weight\n self.save\n puts \"Current weight #{weight}\"\n end",
"title": ""
}
] | [
{
"docid": "9f168aad32317f62155e352ff8af072a",
"score": "0.6330222",
"text": "def weight_on_date(date)\n get_call(\"/1/user/#{@user_id}/body/log/weight/date/#{format_date(date)}.json\")\n end",
"title": ""
},
{
"docid": "18c7f3688497349a61abbead7d1d916e",
"score": "0.6330165",
... |
68e57a60b4061b03a92418f73e804125 | Create a new isolation wrapper | [
{
"docid": "dded81ed73bb9e78b21daa459060175b",
"score": "0.6280152",
"text": "def initialize(klass, *args, &block)\n @_requests = ::Queue.new\n @_results = ::Queue.new\n @_blocked = false\n @_source_thread = ::Thread.new do\n ::Zoidberg.logger.debug 'Starting the iso... | [
{
"docid": "7117b7518ee268ca003210dab450696f",
"score": "0.6157692",
"text": "def run_in_isolation(&blk)\n require \"tempfile\"\n\n if ENV[\"ISOLATION_TEST\"]\n yield\n File.open(ENV[\"ISOLATION_OUTPUT\"], \"w\") do |file|\n file.puts [Marshal.dump(se... |
b7e66327574b2acacb4f258523a407fc | TODO: Not used (after migrating to protonym history items, 12faa7ec1). Use or remove. | [
{
"docid": "c09af6d6b099297fd6d4ea110f824b45",
"score": "0.0",
"text": "def convert_bolton_tags\n history_item = HistoryItem.find(params[:history_item_id])\n\n old_taxt = history_item.taxt\n new_taxt = Markdowns::BoltonKeysToRefTags[old_taxt]\n\n if old_taxt == new_taxt\n render js: %(A... | [
{
"docid": "a9ec07ae0bf57ca632a96c60ddc4498c",
"score": "0.6657813",
"text": "def history; end",
"title": ""
},
{
"docid": "a9ec07ae0bf57ca632a96c60ddc4498c",
"score": "0.6657813",
"text": "def history; end",
"title": ""
},
{
"docid": "a9ec07ae0bf57ca632a96c60ddc4498c",
... |
49624944853c0631abb952b49825eced | POST /specific_items POST /specific_items.json | [
{
"docid": "6c180452c374bb24e842fa64c6f9333d",
"score": "0.62488925",
"text": "def create\n @specific_item = SpecificItem.new(specific_item_params)\n increase_inventory_item(@specific_item)\n # binding.pry\n respond_to do |format|\n if @specific_item.save\n format.html { redirect... | [
{
"docid": "8f95ef9a265b49408e0f82eb5fc282c4",
"score": "0.6590171",
"text": "def create\n @specific_item = SpecificItem.new(params[:specific_item])\n\n respond_to do |format|\n if @specific_item.save\n format.html { redirect_to :back, :notice => t('notice.successfully_created') }\n ... |
cb601b7cc7a066fc22b70d88245ff34a | Overridden method that both randomizes and returns the Coin itself (for method chaining) | [
{
"docid": "77885783365f4a7eb21c0f1a04bc843b",
"score": "0.5651946",
"text": "def randomize\n self.flip\n end",
"title": ""
}
] | [
{
"docid": "32a38ec74e6b9af181d69691125e3116",
"score": "0.6979711",
"text": "def random\n clone.random!\n end",
"title": ""
},
{
"docid": "aad8d4399a92c4610e3146ce22f63fc7",
"score": "0.6442531",
"text": "def randomize ; rand(self) ; end",
"title": ""
},
{
"docid... |
a85eba5c0ce656aaba502066300df8f4 | and returns an array of their results. | [
{
"docid": "882427d348b621c0cbe6ec4490d7befe",
"score": "0.0",
"text": "def reverse_map(*array,&block)\n\tarray.reverse.map(&block)\nend",
"title": ""
}
] | [
{
"docid": "2df1c1bc185f342fbcd6f01d28f4c909",
"score": "0.8120073",
"text": "def results\n\t\t\tArray(result)\n\t\tend",
"title": ""
},
{
"docid": "32e343d4218f5ce01e3a65e98fc73745",
"score": "0.76382685",
"text": "def get_all_results\n\t\tresult_array = []\n\t\tskip = 0\n\t\ttake =... |
c1dcdf5f29a9bde37bb068dbb860af2c | Single NMI Master (C4) Report /C4/PARTICIPANT_IDENTIFIER?transactionId=XXX&nmi=XXX&checksum=X&type=XXX&reason=XXX | [
{
"docid": "958a8c1ab442b0259711359c1de512a1",
"score": "0.5066143",
"text": "def c4(nmi, from_date, to_date, as_at_date, options = {})\n nmi = AEMO::NMI.new(nmi) if nmi.is_a?(String)\n from_date = Date.parse(from_date) if from_date.is_a?(String)\n to_date = Date.parse... | [
{
"docid": "2d0b0dd10ef04216d8de7d647f6861ef",
"score": "0.5529831",
"text": "def raw_msats_nmi_detail(options = {})\n unless AEMO::MSATS.can_authenticate?\n raise ArgumentError, 'MSATS has no authentication credentials'\n end\n AEMO::MSATS.nmi_detail(@nmi, options)\n end",
... |
3dc3b1b28937da5429e94cd83254e7fc | PUT /bubbles/1 PUT /bubbles/1.xml | [
{
"docid": "33b08852c59d4cf1b8ebe97e5c7fe6a7",
"score": "0.6722374",
"text": "def update\n @bubble = Bubble.find(params[:id])\n\n respond_to do |format|\n if @bubble.update_attributes(params[:bubble])\n format.html { redirect_to(@bubble, :notice => 'Bubble was successfully updated.') }... | [
{
"docid": "23b5f5e4dacfb330cb1e0ffd4590ef63",
"score": "0.6440593",
"text": "def update opts = {}\n opts[:headers] ||= {}\n opts[:headers]['Content-Type'] ||= 'text/xml'\n post opts.fetch(:path, update_path), opts\n end",
"title": ""
},
{
"docid": "02973374edad7d82ef6b8759487b5af0... |