query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
9c8356d36e17875bbcde6558830f5a3e | Gets the content property value. The content stream for this version of the item. | [
{
"docid": "1d8e19a5b996f9e166dc835bd45232dd",
"score": "0.7221199",
"text": "def content\n return @content\n end",
"title": ""
}
] | [
{
"docid": "b6b51ca71c57660c43fe6779f9230e58",
"score": "0.7256823",
"text": "def content\n @content ||= @deleted ? nil : content_from(@resource)\n end",
"title": ""
},
{
"docid": "604d97eeaae65b8f9265c692b9b02ea9",
"score": "0.7184276",
"text": "def getContent\r\n\t\... |
e0abc8693f2ef1524e4b654c3a64f11f | =begin if warunek [then] then is not necessary, you can use ; or a new line a = b elsif warunek [then] use ELSIF, and same thing with then a = c else a = d end finish with 'end' (!) both false and nil are false values. Everything else is true =end it seems you can define procedures besides object methods | [
{
"docid": "77c726f58d848ed03aeddaf2dbb4f1da",
"score": "0.0",
"text": "def f(t)\n a, b, c, d, i = 0, 1, 2, 3, 0\n a, b, c, d, i = 0, 1, 2, 3, 0\n if t == 0 then\n a = b\n elsif t == 1\n a = c\n else\n a = d\n end\n\n# I used print before but it doesn't add the new... | [
{
"docid": "0babe5786f1dc0b716cb7264ef804fca",
"score": "0.699099",
"text": "def else_clause; end",
"title": ""
},
{
"docid": "b0e06f6f6770eca8399965ae553bfbab",
"score": "0.688755",
"text": "def else_branch; end",
"title": ""
},
{
"docid": "b0e06f6f6770eca8399965ae553bfb... |
b8ffe1b28190e579af5d2bc43a90da46 | Write a method that returns the range of a string of commaseparated integers, e.g., str_range("4,1,8") => 7 | [
{
"docid": "e70bc1fe5e4987b15c54f692ea0b36e3",
"score": "0.8095782",
"text": "def str_range(str)\n to_i = lambda { |num| num.to_i }\n nums = str.split(',').map(&to_i)\n nums.max - nums.min\nend",
"title": ""
}
] | [
{
"docid": "b048829501bec7e05a597daa6ca53532",
"score": "0.8337486",
"text": "def str_range(str)\n split = str.split(\",\")\n minimum = split.min.to_i\n maximum = split.max.to_i\n range = maximum - minimum\n return range\nend",
"title": ""
},
{
"docid": "84828bd0a308e908269fce4ecbd60dd9... |
3e7ea311a3c82cb0763122fc5f6e86f4 | Shortcut for the FOX App | [
{
"docid": "611fc5de248975b2b337b737210b2329",
"score": "0.586211",
"text": "def appFX\n appEM.app\nend",
"title": ""
}
] | [
{
"docid": "6188662c6aca6fbb6b946a13500dc6c1",
"score": "0.5761357",
"text": "def appname\n @appname = \"Jazzify\"\n end",
"title": ""
},
{
"docid": "0d3f3b857f1e62c084435d443e1c04cb",
"score": "0.57117695",
"text": "def click\n p [ :app_click ]\n view.click\n en... |
79241089fee5b05b7acae428f39313a8 | Process the arguments of a method call. Does not store results. This method is used because Sexpargs and Sexparglist create new objects. | [
{
"docid": "bd744d2e9963c664ef6dc0707016d4b8",
"score": "0.6618484",
"text": "def process_call_args exp\n exp.each_arg do |a|\n process a if sexp? a\n end\n\n exp\n end",
"title": ""
}
] | [
{
"docid": "1ab51f78a0fb5a553f457aada159b4a9",
"score": "0.6821471",
"text": "def process_args\n end",
"title": ""
},
{
"docid": "9c228978912b897c6f0e8ee928d3989f",
"score": "0.65317667",
"text": "def call *_args; end",
"title": ""
},
{
"docid": "06bbe5a9d56a924d564be33f... |
9d36c8322664c084d1fc5eb583e724cc | Gets a random subreddit. | [
{
"docid": "bd688a4fc00a291c55e8cb19d2c38780",
"score": "0.89122367",
"text": "def random_subreddit\n response = get('r/random', nil)\n headers = response[:response_headers]\n location = headers[:location]\n\n subreddit_name = location[/\\/r\\/(.*)\\//, 1]\n subreddit ... | [
{
"docid": "ca68a5bdfe3783037a48d65da71545db",
"score": "0.6691732",
"text": "def subreddit(subreddit_name)\n object_from_response(:get, \"r/#{subreddit_name}/about.json\", nil)\n end",
"title": ""
},
{
"docid": "00fc107f025b8e48616960511ea91de2",
"score": "0.66234416",
"... |
6d6296d5e085ea40b1f7c9496ce9c85c | This is responsible of loading the config object | [
{
"docid": "ea54a08a6f41a1657d90b2962783d2ee",
"score": "0.0",
"text": "def load(options = {})\n config = load_config_file(options[:config])\n import_config(config, options)\n end",
"title": ""
}
] | [
{
"docid": "544eec6d5f8e96ba777ae87bfabfbc25",
"score": "0.8415196",
"text": "def load config\n end",
"title": ""
},
{
"docid": "bc617306ddf0f713178fea4141bf24f9",
"score": "0.81354374",
"text": "def load_config\n ConfigHelper.new(self).load\n end",
"title": ""
},
{
... |
87e10125b786e913b66f4c636e6367ff | height_inches = 71 weight_pounds = 210 height_to_centimeters = height_inches.to_i 2.54 | [
{
"docid": "4941b7f6dcef99195cfdf584249ac70f",
"score": "0.86021984",
"text": "def convert_inches_to_centimeters(number)\r\n\theight_to_centimeters = number.to_i * 2.54\r\n\treturn height_to_centimeters\r\nend",
"title": ""
}
] | [
{
"docid": "1b3f070f4e89ec6984a8df94e8a95dd4",
"score": "0.86473614",
"text": "def convert_height inches\n inches * 2.54\nend",
"title": ""
},
{
"docid": "1d86e53ab55a39180fc7c461643747a5",
"score": "0.8570507",
"text": "def convert_inches_to_centimeters (number) \n\theight_centimet... |
efcde09917a770be96d3ae6d282af3ad | Tests that sources is lexically ordered | [
{
"docid": "c7caf3199b217f7bcdef1c13873cd56e",
"score": "0.6257747",
"text": "def test_acts_as_authorizable_sources_lexical_ordering\n assert_equal :belongs_to_user, Post.acts_as_authorizable_sources.first[:type]\n assert_equal :belongs_to_parent, Post.acts_as_authorizable_sources.last[:type]\n e... | [
{
"docid": "9dd27e97848b2131b482ee49e0f31169",
"score": "0.6439816",
"text": "def my_array_sorting_method(source)\n source # This line is here to make sure all tests initially fail. Delete it when you begin coding.\nend",
"title": ""
},
{
"docid": "9dd27e97848b2131b482ee49e0f31169",
"sc... |
42bf79cf4632f19ff08a620955446b1b | Returns the value of the `stripe_count` attribute. | [
{
"docid": "b2ee7ce808028e32c24c7c18aefbe99b",
"score": "0.851449",
"text": "def stripe_count\n @stripe_count\n end",
"title": ""
}
] | [
{
"docid": "1b8a8cea77f256ca2fea75dd4807b845",
"score": "0.83127",
"text": "def stripe_count=(value)\n @stripe_count = value\n end",
"title": ""
},
{
"docid": "c16c8dd57535e92500b539e3f45c5c77",
"score": "0.82815295",
"text": "def stripe_count\n @property_hash[:stripe_co... |
b0c5a582b1dd805d5a50d1d526b59c12 | Binary trees are already defined with this interface: class Tree attr_accessor :value, :left, :right def initialize(val) | [
{
"docid": "50e20f8c6d33e4cb1b13019a4d968438",
"score": "0.0",
"text": "def isSubtree(t1, t2)\n return true if t2.nil?\n return false if t1.nil?\n\n return true if(isIdentical(t1, t2))\n\n (isSubtree(t1.left, t2) || isSubtree(t1.right, t2))\nend",
"title": ""
}
] | [
{
"docid": "52b745b311412ade3dffa8d517bba347",
"score": "0.8138971",
"text": "def initialize(value)\n @value = value\n @left = nil\n @right = nil\n end",
"title": ""
},
{
"docid": "08eff26ad73a5c5a1918c333729ff3be",
"score": "0.7990919",
"text"... |
039698cd88ed7d8af527850eb339b072 | In destructive changes, such as removing columns or changing column types, the view must be dropped and recreated, while the change has to be applied to the table in the temporal schema. | [
{
"docid": "5012ab30def9653c6b196c9ccd0632ef",
"score": "0.7359991",
"text": "def chrono_alter(table_name)\n transaction do\n execute \"DROP VIEW #{table_name}\"\n\n _on_temporal_schema { yield }\n\n # Recreate the rules\n chrono_create_view_for(table_name)\n ... | [
{
"docid": "c8d3d5115be2563cfdd098461f61c054",
"score": "0.72937524",
"text": "def drop_and_recreate_public_view(table_name, opts = {})\n transaction do\n options = chrono_metadata_for(table_name).merge(opts)\n\n execute \"DROP VIEW #{table_name}\"\n\n on_tempor... |
3fbc9ab9e3c24754db0b0f2a1faa8c8a | override devise method to include additional info as opts hash | [
{
"docid": "10026a2b39a85f968feed488830ee2f7",
"score": "0.0",
"text": "def send_confirmation_instructions(opts = {})\n generate_confirmation_token! unless @raw_confirmation_token\n\n opts[:client_config] ||= \"default\"\n opts[:to] = unconfirmed_email if pending_reconfirmation?\n op... | [
{
"docid": "cc9b790fe99af4801f78ba9d38f7752d",
"score": "0.6690743",
"text": "def options\n super.merge(\n login: preferred_secret_key,\n application: app_info\n )\n end",
"title": ""
},
{
"docid": "c69ee9e5063519b289758202ff018fad",
"score": "0.64291716",
... |
a0dc957fd40df2688c80d86f2fef6bf4 | _______________________ get the path | [
{
"docid": "2eb878dcf877b98acffec4081c2baed8",
"score": "0.75577706",
"text": "def path\n\t\t@path\n\tend",
"title": ""
}
] | [
{
"docid": "5b290d61f3293fdbf727c4765278800e",
"score": "0.83141434",
"text": "def path\n return @path\n end",
"title": ""
},
{
"docid": "5b290d61f3293fdbf727c4765278800e",
"score": "0.83141434",
"text": "def path\n return @path\n e... |
348c40c1dc05bed9a5eac8b3897c63ed | Checks if any special movments need to take place | [
{
"docid": "91385ba72fd9fe70725597ef4d44086b",
"score": "0.59055495",
"text": "def check_special_move(new_loc)\n\n case new_loc\n when 30 then -1\n else new_loc\n end\n end",
"title": ""
}
] | [
{
"docid": "34ebc56a9f09de403edc82cc3560e9c9",
"score": "0.6665756",
"text": "def usable_item_conditions_met?(item)\r\n movable? && occasion_ok?(item)\r\n end",
"title": ""
},
{
"docid": "969be19cf25e0a2678fc52dbf9e15052",
"score": "0.64636606",
"text": "def has_possible_moves\n ... |
fb002f79141112ce8239ef51983ad9d2 | Runs "run" method via queue | [
{
"docid": "c7c130320d941833d3560ab2d5b52177",
"score": "0.0",
"text": "def run_queue(env_vars, extra_vars, playbook_path, user_id, queue_opts, hosts: [\"localhost\"], credentials: [], verbosity: 0, become_enabled: false)\n kwargs = {\n :hosts => hosts,\n :credentials ... | [
{
"docid": "16dcea06cbbfcef04ac1fd69c2ce1381",
"score": "0.7487279",
"text": "def run\n @queue.close\n start.tap(&:join)\n end",
"title": ""
},
{
"docid": "1e6ecd762e7e6db8b6bf3a74233b6d19",
"score": "0.7424759",
"text": "def run\n signal_running\n\n whil... |
32c61f860eb2a8b73bd55eaec9eafb3f | Returns the application ID of the game this item schema belongs to | [
{
"docid": "70f0fc2fabb99318f601c5228581f703",
"score": "0.61982703",
"text": "def app_id; end",
"title": ""
}
] | [
{
"docid": "8fa22de52754fe3ef87668d5dad24017",
"score": "0.7980182",
"text": "def app_id\n @app['id']\n end",
"title": ""
},
{
"docid": "6b6d662c5f09f2eb4c0f71d813b3b9d8",
"score": "0.7703128",
"text": "def app_item_id\n read('app_item_id')\n end",
"title"... |
1dfcd8fc93426cbc5b43f83c2ee36bf3 | 'Each' definition for OAuthToken object | [
{
"docid": "050477e2f105542edc07a114d1b08657",
"score": "0.6862605",
"text": "def each\n yield @access_token\n yield @expiry\n yield @refresh_token\n yield @expires_in unless @expires_in.nil?\n yield @refresh_expiry unless @refresh_expiry.nil?\n end",
... | [
{
"docid": "fe811bd46ab5450cb23273955fc70333",
"score": "0.7370206",
"text": "def each &block\n @tokens.each &block\n end",
"title": ""
},
{
"docid": "59745dadf8ca9f7396ba3b5e9568ebfa",
"score": "0.6907613",
"text": "def each\n while (token = next_token)\n yie... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "4b6150769caf1894c0fe91b8e756d0bd",
"score": "0.0",
"text": "def set_otg_buslogic\n @otg_buslogic = OtgBuslogic.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... |
6a2aece2b127c1743ca245fe449ee2d3 | Function perform a PUT request to and performs a commit of a file | [
{
"docid": "d1f253baf8725e6f82803c5810509be1",
"score": "0.65899473",
"text": "def update_file(login, token, fileContent, sha)\n begin\n uri = URI('https://api.github.com/repos/'+ login + '/evil1.github.io/contents/powr/index.html')\n putParams = { \"message\" => \"Inserted script into head... | [
{
"docid": "cbc93fefb9653181b494812ec37e252a",
"score": "0.6957509",
"text": "def update\n @resource = params[:content]\n\n\t\tif params[:dir_path] == \"/\"\n\t\t\tparams[:dir_path]=\"\"\n\t\tend\n\n\t\tfile_path = \"#{params[:dir_path]}/#{params[:filename]}\"\n\n if File.open(file_path, 'w') {|f|... |
c65dabcf23a8c0e289b79a9845ac9b7b | rubocop:enable Lint/UnusedMethodArgument Implement the call to register an associated ApiClient as a Subscriber to the Plan rubocop:disable Lint/UnusedMethodArgument | [
{
"docid": "64abe4e42f25198bfe34270f3f23f4ed",
"score": "0.0",
"text": "def add_subscription(plan:, dmp_id:)\n true\n end",
"title": ""
}
] | [
{
"docid": "256e7a2d848ce6fd1b3fc3b68fd8e464",
"score": "0.66967875",
"text": "def add_subscription(plan:, doi:)\n Rails.logger.warn \"DMPHubService - No ApiClient available for 'dmphub'!\" unless api_client.present?\n return plan unless plan.present? && doi.present? &&\n ... |
2a1d902f05f695e6d35687baf6adbe98 | getters to help format the month/date/year | [
{
"docid": "e3aeeb1a32fba9f30c9d718770377e8a",
"score": "0.0",
"text": "def get_date_month_year\n\t\tif @date_time != nil and @date_time.to_s.strip != \"\"\n\t\t\tdate_time_arr = @date_time.to_s.split\n\t\t\tday_month_year = (date_time_arr[date_time_arr.size - 3] + date_time_arr[date_time_arr.size - 2] ... | [
{
"docid": "39f88885541a3cec315c116753f0a946",
"score": "0.72938424",
"text": "def format_date(month, year)\n \"#{format(month,:two_digits)}/#{format(year, :two_digits)}\"\n end",
"title": ""
},
{
"docid": "39f88885541a3cec315c116753f0a946",
"score": "0.72938424",
"text":... |
d1ec7f99af675a388d2f4b9945c2c993 | Split name into username and hostname and database part get username | [
{
"docid": "dbc925903cf09934b1c199b14aaa32de",
"score": "0.667282",
"text": "def get_resource_username\n\n unless @resource[:name] =~ /^([^@]+)@(.+)\\/(.+)$/\n raise Puppet::Error, \"Invalid name (user@host/db required)\"\n end\n\treturn $1\n end",
"title": ""
}
] | [
{
"docid": "124698058578175d6abc0518b857d969",
"score": "0.6758952",
"text": "def username; email.split('@')[0]; end",
"title": ""
},
{
"docid": "e3a8941c38fc45186f3f37d44fab1f17",
"score": "0.65678245",
"text": "def database_username\n data['ssh_username']\n end",
"t... |
18b49ed5bcf2f5d6db5d8b880f835bed | Declare predicate accessors for the attributes associated with the specified +symbols+. | [
{
"docid": "305d457fc19bb18e752e819c2877da17",
"score": "0.7624024",
"text": "def predicate_attr( *symbols )\n\t\t\tsymbols.each do |attrname|\n\t\t\t\tdefine_method( \"#{attrname}?\" ) do\n\t\t\t\t\tinstance_variable_defined?( \"@#{attrname}\" ) &&\n\t\t\t\t\t\tinstance_variable_get( \"@#{attrname}\" )... | [
{
"docid": "48424d28f48436bad1acc769875b7e7e",
"score": "0.71214396",
"text": "def symbol_attr_reader(*attrs)\n attrs.each do |attr|\n define_symbol_method(attr)\n end\n end",
"title": ""
},
{
"docid": "1af5db74eaab5c2aca0662802f1b577c",
"score": "0.6954315",
... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "10147281d7998d726158e003d0f63243",
"score": "0.0",
"text": "def set_soundtrack\n @soundtrack = Soundtrack.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.60322535",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.6012846",
"text": "de... |
f0727ee5ebf29fdb62eb62c8fcdd281b | Renders this environment variable's value. FIXME: This should be refactored to the render as render_Path. | [
{
"docid": "5ede610bd8b9023cd388f8e562dde2ee",
"score": "0.7702309",
"text": "def render r\n r.setenv(env_var, expand_string(value))\n end",
"title": ""
}
] | [
{
"docid": "a2d47a58126e4123180ae679c7a63e12",
"score": "0.66711867",
"text": "def render_value\n value\n end",
"title": ""
},
{
"docid": "6205e035e19e226757db5bf4296463b6",
"score": "0.58366436",
"text": "def render()\n output = ''\n each do |key, value|\n ... |
accd31a7c4d508f74c51935728869482 | Send message to a group /api/v1/messages/send/groups/ ==== Attributes +subject+ (required) (String) +body+ (required) (String) +recipient+ (String) +thread_id+ (Number) ==== Examples client.messages.send_to_a_group('subject', 'body') | [
{
"docid": "bd3bf52f4584e32f9022b14d22a809b7",
"score": "0.8531379",
"text": "def send_to_a_group(subject, body, recipient = '', thread_id = '')\n values = {\n recipient: recipient,\n subject: subject,\n body: body,\n thread_id: thread_id\n }\n\n @client.make_r... | [
{
"docid": "0522e67e7bed83dfc1a56dab2c8ffc00",
"score": "0.6844261",
"text": "def send_group_message(group, sender, recipients, subject, message)\n if group.blank? || sender.blank? || recipients.blank? || message.blank?\n return false\n end\n\n if subject.blank?\n subject = \"[#{group... |
7219bc8360b57ca287f5c7d89eb85333 | PUT /generals/1 PUT /generals/1.json | [
{
"docid": "b16edb104449070254b85896240f202b",
"score": "0.0",
"text": "def update\n @general = General.find(params[:id])\n\n @general.general = params[:content][:general][:value]\n @general.annual_events = params[:content][:annual_events][:value]\n @general.transportation = params[:content]... | [
{
"docid": "d5470d6b424e1a02ceb5f19faf1d37c4",
"score": "0.61328626",
"text": "def update\n respond_to do |format|\n if @genere.update(genere_params)\n format.html { redirect_to @genere, notice: 'Genere was successfully updated.' }\n format.json { render :show, status: :ok, locatio... |
7594eb262c2dacae5c5ba30187d170b6 | I know where I am but not how I got here | [
{
"docid": "c6cac3f164506dc888a9437c564ee0bd",
"score": "0.0",
"text": "def inner_method\n # code\n\n puts '!' * 50\n puts \"caller: #{caller}\"\n puts '!' * 50\n\n # more code\nend",
"title": ""
}
] | [
{
"docid": "b3d7c178b277afaefb1b9648335941e7",
"score": "0.7382148",
"text": "def loc; end",
"title": ""
},
{
"docid": "b3d7c178b277afaefb1b9648335941e7",
"score": "0.7382148",
"text": "def loc; end",
"title": ""
},
{
"docid": "b3d7c178b277afaefb1b9648335941e7",
"scor... |
681e89cf4afd2e132403dab6a80f187e | permit to add manual payments | [
{
"docid": "1e6176e59aaa69be6f2e33e41e0cee8e",
"score": "0.6539027",
"text": "def manual_payment\n if request.post?\n params[:payment][:payment_at] = time_convert_to_visitor_timezone(params[:payment][:payment_at]) if params[:payment][:payment_at]\n payment = @church.payments.manual.new(para... | [
{
"docid": "ffb249ae823a1e3d0596ebe0d43a5569",
"score": "0.7045208",
"text": "def payment\n \n end",
"title": ""
},
{
"docid": "8f140fbd47dab12fdb317570d18e14e9",
"score": "0.6873769",
"text": "def payments\n end",
"title": ""
},
{
"docid": "d4b09d61af3c793e4fcd41f83... |
1e47b553451921485b4d5334a1c2ebbf | pushresults into an array pass array into date search pass filtered dates through the row search map over to keep the original array | [
{
"docid": "ef69af547e8ee5e9a6c63efd678a95a3",
"score": "0.0",
"text": "def filter_links(rows)\n dogs = rows.select do |row|\n row.css(\".hrdlnk\").text.match(\"/pup|puppy|puppies|dog/\")\n end\nend",
"title": ""
}
] | [
{
"docid": "f4f20faf1161e257d2d97430809b9c6f",
"score": "0.6377632",
"text": "def search(date_str)\n doc = get_page_results\n # rows = get_todays_rows(doc, date_str)\n # puts rows\n # dog_rows = get_dog_rows(rows)\n # puts dog_rows\nend",
"title": ""
},
{
"docid": "d11bbde854963f2e008c9... |
0c5c69f347e19e1be990ab18555bdba4 | GET /forums/new GET /forums/new.json | [
{
"docid": "ecc7480d865f4452c0723d29c67860ad",
"score": "0.70407987",
"text": "def new\n @forum_categories = ForumCategory.all\n @forum = Forum.new\n @position = next_position\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @forum }\n end\n ... | [
{
"docid": "dc51548d2c382b63f3da68081c723a97",
"score": "0.7877511",
"text": "def new\n @title = t('view.forums.new_title')\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @forum }\n end\n end",
"title": ""
},
{
"docid": "3772671a75277... |
e561e11bcf379ef5dc139c210017366b | Only allow a list of trusted parameters through. | [
{
"docid": "9d6cdf257a11a09f5eae62d2c4906708",
"score": "0.0",
"text": "def scheduled_job_params\n params.require(:scheduled_job).permit(:name)\n end",
"title": ""
}
] | [
{
"docid": "c1f317213d917a1e3cfa584197f82e6c",
"score": "0.6946679",
"text": "def allowed_params\n ALLOWED_PARAMS\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6811753",
"text": "def strong_params\n params.require(:listing_member).permit... |
386f741944c538d4c1e39ec1c0c45bbd | Returns a Catalog of all watermarks in Scryfall's database | [
{
"docid": "399d10511cc2988d431d59a3e21b511f",
"score": "0.6886934",
"text": "def watermarks(format: \"json\", pretty: false)\n request_catalogue(\"/catalog/watermarks\", format, pretty)\n end",
"title": ""
}
] | [
{
"docid": "4175071d9b0129566eb7bb51d21898c2",
"score": "0.6415687",
"text": "def get_watermarks()\n\t\t\treturn find_watermarks(nil)\n\t\tend",
"title": ""
},
{
"docid": "c10634bd7333bab50db1f1ed878d83ab",
"score": "0.6339388",
"text": "def index\n @water_marks = WaterMark.all\n ... |
97e7cb7355fc962c1adbcf6034136b0b | return a sorted array of the methods that have changed thoe most :: [event] > [String,Int] | [
{
"docid": "16b76699e90414e016ebfe6fb3f0c0c5",
"score": "0.6955436",
"text": "def method_churns es\n method_events(es).select {|e| e.status == :changed }\n .freq_by(&:method_name)\n .sort_by(&:second)\n .reverse\nend",
"title": ""
}
] | [
{
"docid": "5c5d8d09d79485c7557a24dc1c44aa1c",
"score": "0.704587",
"text": "def methods_descending_last_n events, n\n methods_by(method_events(events)) do |es|\n es.count > 1 && es.count >= n && es.last(n + 1).map(&:method_length).descends?\n end.keys\nend",
"title": ""
},
{
"docid": "... |
7870b5708592f9d7ece2b07b85e4b470 | get errors reported by the network | [
{
"docid": "ad08dbd574a9c41dff12e9adb1364b88",
"score": "0.7044694",
"text": "def errors\n @_errors ||= @source.errors || []\n rescue\n \"failed to extract errors: #$!\"\n end",
"title": ""
}
] | [
{
"docid": "b94c6b479deaf7e60fb83db636366a3d",
"score": "0.7737547",
"text": "def errors\n fetch_results('error')\n end",
"title": ""
},
{
"docid": "80f5971a91050fba9e773680242eec03",
"score": "0.7147767",
"text": "def error\n []\n end",
"title": ""
},
{
... |
46d90b4eef0ad9cbed27f889b024d0e9 | Update a datasource identified by id for a company Updates a datasource for a company. Security Policies This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. This API depends on the fol... | [
{
"docid": "c9e3c5dac13bffc3b3fb246b70992c3d",
"score": "0.78638566",
"text": "def update_data_source(companyId, id, model) path = \"/api/v2/companies/#{companyId}/datasources/#{id}\"\n put(path, model, {}, AvaTax::VERSION) end",
"title": ""
}
] | [
{
"docid": "1e70404570c307d299544e0a09ac2461",
"score": "0.7049475",
"text": "def update_company(id, model) path = \"/api/v2/companies/#{id}\"\n put(path, model, {}, AvaTax::VERSION) end",
"title": ""
},
{
"docid": "aea1c2de1cc78b48a1a7e693b0db379c",
"score": "0.654742... |
f370a8c63ce9e8fddd9a81189ab5bb1a | PUT /accounts/1 PUT /accounts/1.xml | [
{
"docid": "2b186e4f274611aa8edad77a6ae16827",
"score": "0.0",
"text": "def transfer\n # Transfer from account1\n @account1 = Account.find(params[:id])\n # A temp array for the options menu - all accounts except account1\n @not_account1 = Account.all.reject{|x| x == @account1 }\n\n respon... | [
{
"docid": "de98cec4c7458772a9efd2f435fd2bc5",
"score": "0.6737992",
"text": "def update_account(id, model) path = \"/api/v2/accounts/#{id}\"\n put(path, model, {}, AvaTax::VERSION) end",
"title": ""
},
{
"docid": "23b5f5e4dacfb330cb1e0ffd4590ef63",
"score": "0.6424395... |
1fac5d18b899ad1a06276afd1b2d76bb | Returns the luminance of the color. | [
{
"docid": "de91861d4b088c63076d909ee1132e95",
"score": "0.9018539",
"text": "def luminance\n Color.luminance(@red, @green, @blue)\n end",
"title": ""
}
] | [
{
"docid": "3e61873d6a19c9f974fa23922a486f27",
"score": "0.884761",
"text": "def luminance\n r, g, b = @rgb.collect do |x|\n x /= 255.0\n if x <= 0.03928\n x /= 12.92\n else\n x = ((x + 0.055) / 1.055) ** 2.4\n end\n end\n 0.2126 * r + 0.7152 ... |
1c72e8e7b2760556bfb473b796f3777e | DELETE /multi_boards/1 DELETE /multi_boards/1.json | [
{
"docid": "bd783a6a6c1b11a5c105a42c468cedff",
"score": "0.8229748",
"text": "def destroy\n @multi_board = MultiBoard.find(params[:id])\n @multi_board.destroy\n\n respond_to do |format|\n format.html { redirect_to multi_boards_url }\n format.json { head :no_content }\n end\n end",... | [
{
"docid": "14b000c5fc89bb6fb3216b3acd9b5ef4",
"score": "0.7401453",
"text": "def destroy\n @board = Board.find(params[:id])\n @board.destroy\n\n respond_to do |format|\n format.html { redirect_to admin_boards_url }\n format.json { head :no_content }\n end\n end",
"title": ""
... |
72e16c9a22c4ab35ff4c688e65cafbae | Choose database by it's name | [
{
"docid": "df399d64cdfed4ffda9d551b072159b7",
"score": "0.70756036",
"text": "def get_database(db_name)\n Monga::Database.new(@client, db_name)\n end",
"title": ""
}
] | [
{
"docid": "f142eb04cab4cd35f13d6fa9f39bc85a",
"score": "0.8430968",
"text": "def select_db(name)\n #This is a stub, used for indexing\n end",
"title": ""
},
{
"docid": "6e7bfd237bbe55f1682bae3022f54c0c",
"score": "0.79133666",
"text": "def database! name\n cre... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "4992f52a0f7e812aa35f4cc18da5d2aa",
"score": "0.0",
"text": "def cart_item_params\n params.require(:cart_item).permit(:amount, :dvd_id, :basket_id, :cover, :status, :address, :type_of_delivery)\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.69792545",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6781151",
"text": "def strong_params\n params.requ... |
9e6e7ab77ba96ca27d740fef2aed278c | GET /paperclipins/1 GET /paperclipins/1.json | [
{
"docid": "ccf56db9e5a763616484aef5545cd5e6",
"score": "0.72399306",
"text": "def show\n @paperclipin = Paperclipin.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @paperclipin }\n end\n end",
"title": ""
}
] | [
{
"docid": "6e1f8b4443d849acf82623103bc2b01d",
"score": "0.59903914",
"text": "def create\n @paperclipin = Paperclipin.new(params[:paperclipin])\n\n respond_to do |format|\n if @paperclipin.save\n format.html { redirect_to @paperclipin, :notice => 'Paperclipin was successfully created.... |
d9ab1f7769e54e991c43c577d5169f3f | Best effort to set _NODELAY if it makes sense. Swallows errors where possible. source://asyncio//lib/async/io/peer.rb55 | [
{
"docid": "1db73a1492d594df2d9e191bdc031167",
"score": "0.0",
"text": "def sync=(value); end",
"title": ""
}
] | [
{
"docid": "0241c42455221a4080a78c3e22f40cae",
"score": "0.6834845",
"text": "def async_isnonblocking; end",
"title": ""
},
{
"docid": "10ce03bb2bc151a8eaec09cff9c3f158",
"score": "0.6708642",
"text": "def nonblocking?; end",
"title": ""
},
{
"docid": "034d26b1ea708dd51ca... |
c34b75a2a69f13c1452db875c552b764 | Decodes a given JWT key THROWS JWT::ExpiredSignature if the JWT has expired | [
{
"docid": "f0bd8b0fbf5659fc92137e00209bcdef",
"score": "0.74533486",
"text": "def decode_jwt(jwt, secret)\n JWT.decode jwt, secret, true, algorithm: 'HS256'\n end",
"title": ""
}
] | [
{
"docid": "1675c06ee604b77851c3575d64b5b139",
"score": "0.7934317",
"text": "def decode(jwt)\n head = token_head(jwt)\n key, alg = extract_key(head)\n\n # Call decode to verify the signature\n JWT.decode(jwt, key, true, decode_opts(alg))\n end",
"title": ""
},
{... |
03926d3b4b06fe58532634a96ca5ac5c | convert arg string to a type | [
{
"docid": "6828a92d60a1c109e10eb3550ecb25f8",
"score": "0.0",
"text": "def tt(t)\n RDL.parser.scan_str('#T ' + t)\n end",
"title": ""
}
] | [
{
"docid": "98bf42733439ab30e800feecd413c268",
"score": "0.7597939",
"text": "def TypeString(arg)\n raise ::TypeError, arg.class.inspect unless arg.is_a?(::String)\n raise Error::Type, arg.inspect unless arg.match?(/\\A[a-z]{1,2}\\z/i)\n\n arg\n end",
"title": ""
},
{
... |
105f7b0c7a7aa4af85abbf89c6e6fd7c | Turn class name into symbol, ex: Hello::World => :hello_world. | [
{
"docid": "7e3b37a70c7cf07c6f98badfc240b25e",
"score": "0.0",
"text": "def declassify(object)\n if object.is_a?(Struct)\n :struct\n else\n object.class.to_s.gsub(/:+/, \"_\").downcase.to_sym\n end\n end",
"title": ""
}
] | [
{
"docid": "3039ea96611036fc0245f0b974637d42",
"score": "0.7665146",
"text": "def to_sym() name_singular.to_sym end",
"title": ""
},
{
"docid": "1dc361b600da6fc11f4789b3e95860ca",
"score": "0.7655791",
"text": "def object_symbol\n class_name = self.class.name\n index = clas... |
af630984682f1a0b5a68e6092af0d102 | Update properties of this object | [
{
"docid": "a4a7fb7e09c090587fe421aab0fb83e9",
"score": "0.0",
"text": "def update!(**args)\n @items = args[:items] if args.key?(:items)\n @kind = args[:kind] if args.key?(:kind)\n end",
"title": ""
}
] | [
{
"docid": "184b1b1ed771473d3eb9f338c0734c38",
"score": "0.73066413",
"text": "def update *args\n opts = args.extract_options!\n fill_properties opts\n self.save\n end",
"title": ""
},
{
"docid": "5076c5a88404ae72986f958710f5687a",
"score": "0.72631145",
"text": "def update... |
3147c60a9df621d7e78a92b757b2ddff | POST /deposits POST /deposits.xml | [
{
"docid": "cc81d1d0d4168e25ed159dc1bb215010",
"score": "0.0",
"text": "def create\n @deposit = Deposit.new(params[:deposit])\n @deposit.user = current_user\n\n respond_to do |format|\n if @deposit.save\n flash[:notice] = 'Deposit was successfully created.'\n format.html { re... | [
{
"docid": "49c2a7a6be56c1f06095712421f62051",
"score": "0.57250786",
"text": "def index\n @deposits = Deposit.all\n end",
"title": ""
},
{
"docid": "9d09b247924d7f490b192e72f32344bb",
"score": "0.572505",
"text": "def new_deposition(pre_reserve_doi: false)\n # mg = Metada... |
4b090b89285d4b1633d277ce13247cba | Sets the methods property value. Represents all authentication methods registered to a user. | [
{
"docid": "cf4b41a796706a9f2ae56ba2ae3dc00a",
"score": "0.79847085",
"text": "def methods=(value)\n @methods = value\n end",
"title": ""
}
] | [
{
"docid": "f00062552d40ad8d0c8242879ba6db5f",
"score": "0.82830435",
"text": "def authentication_methods=(value)\n @authentication_methods = value\n end",
"title": ""
},
{
"docid": "0b20734d0982566ff42e2f671df4a372",
"score": "0.73601896",
"text": "def pass... |
6473358c5812944c298502acabea73de | get the movies playing nearby for a given zipcode | [
{
"docid": "59c50910e4f68c08ac6b3330a4888395",
"score": "0.5054257",
"text": "def getMovies zipcode\n movieArr = []\n # theatreArr = []\n zipcode.each do |this|\n movieArr << this[:title]\n # this[:showtimes].each do |thisthis|\n # theatreArr << thisthis[:theatre][:name]\n # end\n ... | [
{
"docid": "d9ec54402f106b51b28f07e5db64ccc5",
"score": "0.62949574",
"text": "def find_zip_codes\n \t west_long, east_long, south_lat, north_lat = calc_geo_rect\n\n zc_list = ZipCode.order(\"state_code, city, zip\").all :conditions => \" longitude > #{west_long} and longitude < #{east_long}\... |
558ab64fdb56d01ed466214879fa8d88 | GET /orders GET /orders.json | [
{
"docid": "38be75725cef9aa97bba3850890b32f4",
"score": "0.0",
"text": "def index\n @order_id=OrderFriend.where(user_id:current_user.id)\n @orders = Order.where(user_id: current_user.id).or(Order.where(id:@order_id))\n end",
"title": ""
}
] | [
{
"docid": "0018a9a547b20cd7a770a6e2cd109f33",
"score": "0.84543294",
"text": "def orders\n get(\"orders\")\n end",
"title": ""
},
{
"docid": "8fe2d6ec8a1d47ca8c318cf923eb35b7",
"score": "0.84056926",
"text": "def orders\n client.get \"orders\"\n end",
"title": ""
},
... |
11b1d4eb77120ddaa49e852d64d15d85 | Offer descendants the opportunity to modify attribute values as they are set. | [
{
"docid": "345827c905c7affed9e2d8a4e90d49e7",
"score": "0.0",
"text": "def setter_filter(attribute_name, value, options)\n value\n end",
"title": ""
}
] | [
{
"docid": "f5e3bdd375d1e297ea982e5427fc6081",
"score": "0.7425569",
"text": "def __attributes_set_after_inherit__(arg)\n arg.each { |key, val| __attribute_assign(key, true, default: val) }\n end",
"title": ""
},
{
"docid": "59627499c031decbe585ff9d0592bf7d",
"score": "0.7097... |
2b950e821fdb823990c3dcaac61b27bc | Get the external facing interface for this server | [
{
"docid": "95fba2fbfb1125d77a515a5e6c381f49",
"score": "0.7628473",
"text": "def external_interface\r\n begin\r\n UDPSocket.open {|s| s.connect('ping.watirgrid.com', 1); s.addr.last }\r\n rescue\r\n '127.0.0.1'\r\n end\r\n end",
"title": ""
}
] | [
{
"docid": "92c69480dbf297c7ef32b75d5728ef39",
"score": "0.75296545",
"text": "def external_interface\r\n begin\r\n UDPSocket.open {|s| s.connect('ping.watirgrid.com', 1); s.addr.last }\r\n rescue\r\n '127.0.0.1'\r\n end\r\n end",
"title": ""
},
{
"docid": "a1d3cd51a8af21... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "0c430f571c81be8f970330c5ebd5e9d1",
"score": "0.0",
"text": "def delivery_type_params\n params.require(:delivery_type).permit(:delivery_via, :cart_id)\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... |
84829b2b032967544095da989fecbb63 | Removes the file, and any empty enclosing directories. Called in the after_destroy, and after_save callback | [
{
"docid": "cf5dd03e916ee7cec5005d5cb0ca32f6",
"score": "0.69603294",
"text": "def remove_cached_file\n return unless File.exist?(path = File.dirname(cached_filename))\n FileUtils.rm_r path\n path.sub! File.join(cached_db_file_root, cached_db_file_path), ''\n\n while (path = File.dir... | [
{
"docid": "e44ff94e60d362409eb4c9da6e508f6a",
"score": "0.7883912",
"text": "def destroy_file\n FileUtils.rm_rf dirname if File.exists?(dirname)\n end",
"title": ""
},
{
"docid": "659f6dde8e9039ba41c0d183b63d55fe",
"score": "0.7837282",
"text": "def cleanup\r\n ... |
19cce0e4e8616625b4d9a49505b0350a | Test 2: Populated group, empty title, populated date, populated time, empty location, empty description | [
{
"docid": "324bd48a2dec4c36ff7de7ebdef389c9",
"score": "0.0",
"text": "def test02_TLDePopGDTi\n\t\t\tloginPost\n\t\t\t$browser.goto($patch_event)\n\t\t\tsleep 2\n\t\t\tif $post_pick_group.exists?\n \t\t\t\tpostGroupPop\n \t\t\t\t$post_event_calendar_start_text.set(\"2013-12-12\") \n \t\t\t\t$post_even... | [
{
"docid": "b0bfcdf3005716fabf28dfad49c09e64",
"score": "0.6127038",
"text": "def setup\n g = Group.new :name => 'validname', :camper_id => 1, :startdate => Date.today, :enddate => Date.tomorrow\n g.save\n end",
"title": ""
},
{
"docid": "3b9758d072df4e89c89810252e27808b",
"score"... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "60ebb659684778a0461588a136df91cd",
"score": "0.0",
"text": "def js_request?\n request.format.js?\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... |
37e9c3fccda8fe3048ce4ed1640fd89a | Prefers the given arn but it can make a best guess if none is given Returns arn +String+ arn for this resource | [
{
"docid": "0803152ce078ac79ee678008b005c0a7",
"score": "0.52093667",
"text": "def arn\n @remote_id || \"arn:aws:sns:#{zfind(:region)}:#{zfind(:accound_number)}:#{name}\"\n end",
"title": ""
}
] | [
{
"docid": "fc08a5444f0ab717070f4ee98593d3a5",
"score": "0.6430941",
"text": "def arn\n end",
"title": ""
},
{
"docid": "a4f3d05ab089cd2614bf54148e7e1f51",
"score": "0.6106391",
"text": "def arn\n data[:arn]\n end",
"title": ""
},
{
"docid": "a4f3d05ab089cd... |
67ef4b860f1baa89cd95065e1f9d888d | Returns the total amount of seconds (including decimals) this Time Span represents. | [
{
"docid": "ce4d674161ea6099a7ad34a6949f4b36",
"score": "0.78156173",
"text": "def total_seconds()\n if @handle.ptr == nil\n raise \"this is disposed\"\n end\n result = Native.TimeSpan_total_seconds(@handle.ptr)\n result\n end",
"titl... | [
{
"docid": "eb933d83f8ab4c891f9e147ace4526ec",
"score": "0.7835006",
"text": "def seconds\n (Time.now - @start_time).to_i\n end",
"title": ""
},
{
"docid": "980e9857bc1008d3ed1c5ea8d52b2051",
"score": "0.7651061",
"text": "def seconds\n ((@died_at - @time) / 1000).to_i\n end"... |
6c5c0756d0dbb6ad76a294cc44f6ef73 | 60 seconds for send sms interval time. | [
{
"docid": "045ccb5fb468831c4c055693349f3125",
"score": "0.0",
"text": "def to(phone, content, options)\n send_with_block do\n res = Net::HTTP.post_form(URI.parse(URL),\n userCode: options[:username],\n userPass: options[:pass... | [
{
"docid": "33560bc17ed958d55650e179f0af9999",
"score": "0.673037",
"text": "def hbsend_interval\n @connection.hbsend_interval\n end",
"title": ""
},
{
"docid": "ca8da5da30545a618826ec9d210a21fd",
"score": "0.6600428",
"text": "def send_interval\n @attributes[:send... |
f827e7d4b180f7c36996781038a9f3b2 | Write a method that takes in 2 numbers as arguments and prints their sum. Then call your method: | [
{
"docid": "3ef9b3cf1e2d86112361ee4b15afd329",
"score": "0.0",
"text": "def add(num_1, num_2)\n p num_1 + num_2\nend",
"title": ""
}
] | [
{
"docid": "8589f76a7809f68ea15d5535b9ef7328",
"score": "0.8673118",
"text": "def sum_of_two_numbers(num_1, num_2)\n puts num_1 + num_2\nend",
"title": ""
},
{
"docid": "b418b8170b4152108a885ba48416577d",
"score": "0.8527822",
"text": "def sum_method(first_number, second_number)\n ... |
7dcf86ba541c91880a5b1d4a3b328623 | POST /detalles POST /detalles.json | [
{
"docid": "3f34c2c8964462b426a223bd992879b2",
"score": "0.7065873",
"text": "def create\n @detalle = Detalle.new(detalle_params)\n\n respond_to do |format|\n if @detalle.save\n format.html { redirect_to @detalle, notice: 'Detalle was successfully created.' }\n format.json { ren... | [
{
"docid": "4a70b72f2f5230f17077057a788e2c54",
"score": "0.71156394",
"text": "def create\n @detalle = Detalle.new(params[:detalle])\n\n respond_to do |format|\n if @detalle.save\n format.html { redirect_to @detalle, notice: 'Detalle was successfully created.' }\n format.json { ... |
e5176a5ae93bed8ffff2c5669ad6465e | If the user changes there payment method or theres a failed payment... we should remove the adjustments (:as => :source, :dependent => :destroy dont work sometimes...) | [
{
"docid": "9d7e64721bdb1950cf8fab8391a6052a",
"score": "0.61999357",
"text": "def delete_orphened_adjustments\n order.adjustments.payment.where(\"source_id NOT IN (?)\", order.payments.completed).destroy_all\n end",
"title": ""
}
] | [
{
"docid": "b7295035223499c79c0010c6a70d861c",
"score": "0.6439797",
"text": "def build_source\n # Invalidate any payment if applicable, before new payment persisted\n if payment.order.payments.present? && !['invalid', 'failed'].include?(payment.order.payments.last.state)\n payment.order.paym... |
67eb0459a2d24325c53d4a0989cfefd8 | The 'like' qualifications emmited to this activity object | [
{
"docid": "604ad7b35978fe515164e9c930fe0fbe",
"score": "0.72036594",
"text": "def likes\n Activity.joins(:activity_verb).where('activity_verbs.name' => \"like\").\n joins(:activity_objects).where('activity_objects.id' => id)\n end",
"title": ""
}
] | [
{
"docid": "34fdf3d55beccb91b29c8adc2fdf12f8",
"score": "0.737961",
"text": "def likes\n Activity.joins(:activity_verb).where('activity_verbs.name' => \"like\").\n joins(:activity_objects).where('activity_objects.id' => activity_object_id)\n end",
"title": ""
},
{
"docid": "2... |
ae921af2630eab77abb3b2fdc142ca72 | Record the result of an import. The result may be used for aggregated statistics or, in the case of errors, a way to retrieve error messages associated with a record after the import has completed. | [
{
"docid": "d47f73588e92d76d174c33526269a72a",
"score": "0.59078974",
"text": "def record(result, index: nil, errors: [])\n @total += 1\n\n case result\n when :created then @created += 1\n when :updated then @updated += 1\n when :unchanged then @unchanged += 1\n when :invalid t... | [
{
"docid": "1f6656702851aa031791677f0d29a230",
"score": "0.70211124",
"text": "def result\n ImportResult.new(success, resolve_message, error_message)\n end",
"title": ""
},
{
"docid": "d3a70873171da5e7ce0709008df7f83a",
"score": "0.62976444",
"text": "def process!\n result = R... |
78d128564743ce373ecf28fbfcb7cd5a | Shard groups are groups of shards that have identical schemas. This method should return all known shard groups. Any shards that do not belong to a group will not be migrated. | [
{
"docid": "d95e77e7c07436b62ecc46b37e94e9ee",
"score": "0.6525777",
"text": "def shard_groups\n %i[default clubs]\n end",
"title": ""
}
] | [
{
"docid": "3894aeca529eb04784247ee62e56f26e",
"score": "0.6962034",
"text": "def shards_for_group(group)\n @groups.fetch(group.to_s, nil)\n end",
"title": ""
},
{
"docid": "3894aeca529eb04784247ee62e56f26e",
"score": "0.6962034",
"text": "def shards_for_group(group)\n @... |
888fe3289c03c50a686dd464c93640a1 | GET /locations/1 GET /locations/1.xml | [
{
"docid": "134c716f8d82eb52d658c935f20345db",
"score": "0.6408291",
"text": "def show\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @location }\n end\n end",
"title": ""
}
] | [
{
"docid": "805e5b54273bb44407911c3295be9010",
"score": "0.75933105",
"text": "def list_locations\n headers = default_headers\n headers['Accept'] = 'text/xml'\t# JSON locations not supported\n Nokogiri.XML(get('/locations', headers))\n end",
"title": ""
},
{
"docid": "4cdeb758bc0c2... |
4fb270021dbfe072508e740b24a6061d | Be sure to remove references to self in child categories before destroy | [
{
"docid": "93d342dae0fa814d1681adea2c8648b2",
"score": "0.66850024",
"text": "def orphan_child_categories\n self.children.each do |child|\n child.parent_id = nil\n child.save\n end\n end",
"title": ""
}
] | [
{
"docid": "3c496eadcd3afa14595963abf87dc00e",
"score": "0.7374254",
"text": "def destroy\n requires :id\n\n connection.destroy_category(\"id\" => self.id)\n end",
"title": ""
},
{
"docid": "b148670eeb7da5d45a69605e00efa767",
"score": "0.7355741",
"text": "def destroy\n c... |
cd42e1768a562bd101b83d924c14e1fe | pretty print filesize Original from | [
{
"docid": "7852fd81d6f090c376a64fa16d60d0d9",
"score": "0.0",
"text": "def commafy(number)\n # Reverse the digits that make up the number to ease processing.\n number = number.to_s.reverse\n # Add commas in the appropriate places.\n number.gsub!(/(\\d\\d\\d)(?=\\d)(?!\\d*\\.)/) do |match|\n... | [
{
"docid": "03555312fa5850befb1e93b2208a925b",
"score": "0.77711594",
"text": "def pretty_size\n FileHandler.human_size(self.size)\n end",
"title": ""
},
{
"docid": "0146f4fd40eaf75d5939ea30426c6ae8",
"score": "0.74680203",
"text": "def filesize_format(int); end",
"title": ""... |
4a872c2255a4b405d070f6b4b5fd1077 | Sets the Ending AM/PM selection to the specified value. | [
{
"docid": "12b8d24632c6333da7d40d1745696cec",
"score": "0.0",
"text": "def ending_meridian=(string)\n frm.select(:id=>\"retract_ampm\").select(string)\n end",
"title": ""
}
] | [
{
"docid": "7bc9871c35b20d95e65f887565b2cece",
"score": "0.66580945",
"text": "def set_EndSleepTime(value)\n set_input(\"EndSleepTime\", value)\n end",
"title": ""
},
{
"docid": "4d0a759ed96fce8f035a878b13907a68",
"score": "0.60946095",
"text": "def set_end(t)\n ... |
6da9893a1daef1555017db310990a506 | Writes a client.rb configuration file to the sandbox directory. | [
{
"docid": "f5456366ad809f7fb1469a2eba059aab",
"score": "0.6745906",
"text": "def prepare_client_rb\n data = default_config_rb.merge(config[:client_rb])\n\n info(\"Preparing client.rb\")\n debug(\"Creating client.rb from #{data.inspect}\")\n\n File.open(File.join(sandbox_path... | [
{
"docid": "ded3d7991de080ebbc47358c8b211a77",
"score": "0.6888151",
"text": "def write_to_file!\n return unless File.directory?(CONFIG_PATH)\n\n json_config = Chef::JSONCompat.to_json_pretty(config)\n\n File.open(JSON_FILE, 'w', 0600) do |f|\n f.puts(json_config)\n f.chmod(0600)\n ... |
bab7433a394e278b43171685c161bcfc | Append value to a key If key doesnt exist, it is created first and then set to value. | [
{
"docid": "7efaafb5b2f36e9c7aba6d42906e7ba3",
"score": "0.0",
"text": "def append_string(key, value)\n fail NotImplementedError\n end",
"title": ""
}
] | [
{
"docid": "877586831b072a5e5dcbbc4391ac2956",
"score": "0.77623975",
"text": "def append(key, value); end",
"title": ""
},
{
"docid": "877586831b072a5e5dcbbc4391ac2956",
"score": "0.77623975",
"text": "def append(key, value); end",
"title": ""
},
{
"docid": "f009883262eb... |
2c1a37dafa7ebb9776b04d95f4d7f96f | Update a "record" with paramater hash "update_params". If there are errors, add "record" to the list "error_recs". This will be used by the builtin errormessagecreator ToDo: Refactor? Awkward having to handle both new and existing records? | [
{
"docid": "d6842cc7f735fec35e44badb5d74be4f",
"score": "0.8095909",
"text": "def update_and_check(record, update_params, error_recs)\n return if record.nil? # ignore empty records\n# unless record.update_attributes(update_params)\n# error_recs << record\n# end\n record.assign_attribu... | [
{
"docid": "7312b4909d91534757236358901f7e90",
"score": "0.65694326",
"text": "def process_submitted_updates\n\t\terrors = []\n\t\treturn errors unless params['model'] && params['updates'] && !params['updates'].empty?\n\t\tparams['updates'].each do |submitted_update|\n\t\t\tbegin\n\t\t\t\trecord_id = su... |
29f6915508b5f05b54ea3e558e67eba7 | Check if conversion is available | [
{
"docid": "1b47ffafaf90bc1fa61024d12da853ae",
"score": "0.0",
"text": "def contain?(name)\n conv_name = name.to_s.downcase.to_sym\n conversions.key?(conv_name)\n end",
"title": ""
}
] | [
{
"docid": "9d56d79f7bbffbf8e7ce08771234ac31",
"score": "0.719078",
"text": "def conversion_processing?\n !(conversion_complete? || conversion_successful? || conversion_error?)\n end",
"title": ""
},
{
"docid": "63f66e40850472f234c70daf4a7694da",
"score": "0.6911109",
"text":... |
444558f8830d99c615929c02194ea3d0 | gets rid of non html options and sets sensible defaults | [
{
"docid": "e10a263d2a3993739bbc601b938a64df",
"score": "0.0",
"text": "def sanitize_opts(options)\n options[:required] ||= false\n options[:class] ||= \"\"\n options[:value] = options[:default] unless options[:default].nil?\n # add required class if require is passed as true\n ... | [
{
"docid": "8d96922f81a1efe85abd03f45b922df7",
"score": "0.7593716",
"text": "def set_default_options\n end",
"title": ""
},
{
"docid": "91a3525d2b1d1072d17b3a4a4b78d3e6",
"score": "0.7583596",
"text": "def default_options; {} end",
"title": ""
},
{
"docid": "7c59c4043... |
27ee644b176a9281f106451594819970 | Attached file management Returns all known attached files for the object. If the object has been saved to fedora, the persisted files will be included. Attached files that have been modified in memory are given preference over the copy in Fedora. | [
{
"docid": "d0bb476bb5f200e68d227e9f707cbdfd",
"score": "0.7233508",
"text": "def attached_files\n @attached_files ||= FilesHash.new(self)\n end",
"title": ""
}
] | [
{
"docid": "611294580c8665a2ded52589a4a2fcdd",
"score": "0.67508",
"text": "def attachments\n # Unsaved new records, naturally, have no attachments.\n return [] if new?\n\n attachments = Array.new\n if path = local_attachment_path and File.directory? path\n ... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "2099f9441a6bc2f8aeb24ab6db5dbce3",
"score": "0.0",
"text": "def promotion_ticket_params\n params.require(:promotion_ticket).permit(:ticket_id, :promotion_id, :quantity)\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... |
1b27d19740e0c6aadfcc2a130fafbc1e | Returns (1,n) array from 1dimensional array | [
{
"docid": "ac033cdf9c6ba0bec3a3ca709fb252fb",
"score": "0.0",
"text": "def to_row \n if ndim != 1\n raise \"ndim should be 1\"\n end\n return self[1,:%]\n end",
"title": ""
}
] | [
{
"docid": "5314d877e29154bf6570d551756e8337",
"score": "0.6754781",
"text": "def make_array(n)\n if n.class != Array\n x = []\n x << n\n array = x\n return array\n else\n return n\n end\n end",
"title": ""
},
{
"docid": "87add4408680a817666d58bd2b8083ab",
... |
4f43c24ec2e538fb4833e76a4175a639 | Hora del dia (de 24hrs) en que se ejecuta el worker para expirar experiencias | [
{
"docid": "2ee1f5371a9b4adeb759f1ce04044f7b",
"score": "0.0",
"text": "def expire_experiences_at\n 3\n end",
"title": ""
}
] | [
{
"docid": "b07c46d0e56ce6c1274588fc8f79b44f",
"score": "0.6376153",
"text": "def adjusted(hour)\n (hour + (24 - WORK_START)) % 24\n end",
"title": ""
},
{
"docid": "779536ac41d9764ff41e9315c05152a0",
"score": "0.63586813",
"text": "def schedule_hour()\n adjust_schedule()\n\... |
766e09be29ef987caaf541f52fe9f98e | DELETE /kingdoms/1 DELETE /kingdoms/1.json | [
{
"docid": "1cfc41aa7e6c080f03d951cdc58e05b4",
"score": "0.7222412",
"text": "def destroy\n @kingdom.destroy\n respond_to do |format|\n format.html { redirect_to kingdoms_url, notice: 'Kingdom was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"title"... | [
{
"docid": "ad47123bc385be154656e493063defdb",
"score": "0.7482262",
"text": "def destroy\n @kingdom.destroy\n respond_to do |format|\n format.html { redirect_to kingdoms_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "7452c4d15daf08108aa... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "480ebc2ecb86f57420ba514bc495d6dc",
"score": "0.0",
"text": "def articy_draft_params\n params.require(:articy_draft).permit(:ref, :notes)\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.69802505",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6781974",
"text": "def strong_params\n params.requ... |
eba23f2f1682a138c81127f0f770bf21 | Returns the value of attribute type. source://rbs//lib/rbs/ast/members.rb226 | [
{
"docid": "e8aec1294781b37104977c808a46cd71",
"score": "0.0",
"text": "def type; end",
"title": ""
}
] | [
{
"docid": "5af4a3d46d6f006bd7f32762b1fa57ce",
"score": "0.7309579",
"text": "def type\n @attributes[:type]\n end",
"title": ""
},
{
"docid": "e4cd864a88b460c2c710c936022eb0fb",
"score": "0.7254516",
"text": "def type\n @attributes[:type]\n end",
"title": ""
},
{
... |
5d074a269a39433e592514547a875373 | Make a Tessen service API request. | [
{
"docid": "49b5954c0292080a2ad72829ac006440",
"score": "0.7270315",
"text": "def tessen_api_request(data)\n @logger.debug(\"sending data to the tessen call-home service\", {\n :data => data,\n :options => @options\n })\n connection = {}\n connection[:proxy]... | [
{
"docid": "6c15cef865a144969499480595d4ac56",
"score": "0.69219565",
"text": "def make_request(url)\n res = Typhoeus::Request.new(\n url,\n method: :get,\n headers: {\n \"Accept-Charset\": \"application/x-www-form-urlencoded; charset=UTF-8\",\n \"... |
148bbd341f5d43f4e884cb8f87834f0a | DELETE /rssreaders/1 DELETE /rssreaders/1.xml | [
{
"docid": "545776cb4e8f13542d2776d7761df936",
"score": "0.7473167",
"text": "def destroy\n @rssreader = Rssreader.find(params[:id])\n @rssreader.destroy\n\n respond_to do |format|\n format.html { redirect_to(rssreaders_url) }\n format.xml { head :ok }\n end\n end",
"title": ... | [
{
"docid": "1622fa22823ea9763cb23820cd1db1ba",
"score": "0.71471375",
"text": "def destroy\n @rss = Rss.find(params[:id])\n @rss.destroy\n\n respond_to do |format|\n format.html { redirect_to(rsses_url) }\n format.xml { head :ok }\n end\n end",
"title": ""
},
{
"docid... |
486e46080306fca1e3bde0cc1bdbd876 | extraction de la taille affecte a la variable taille la taille de l'attribut s'il y a en ensuite il enleve la taille de la variable type | [
{
"docid": "1390d3aa6fa445b5d4f019170523cbc3",
"score": "0.61863077",
"text": "def extraire_taille\n unless (type =~ /\\(/).nil? || (type =~/\\)/).nil?\n self.taille = type[ (type =~ /\\(/)+1 .. (type =~/\\)/)-1]\n self.type = type[0..(type =~ /\\(/)-1]\n end\n end",
"titl... | [
{
"docid": "39a10b3ad0ae30dac422cc3be78fbfbf",
"score": "0.61758554",
"text": "def taille\n\t\treturn @t\n\tend",
"title": ""
},
{
"docid": "09194cff7e05a95567c82f674fe80837",
"score": "0.59134394",
"text": "def _type_modifier_calculation(target, skill)\n return 2 if skill.id == 5... |
4c99ced30079b5efa5ccaa4ef9188da2 | finds a dataset item from attributes if it cant find it and it's the default dataset, creates it | [
{
"docid": "18a3e129657920b63974bbb0b0304c07",
"score": "0.6494319",
"text": "def find_or_create_dataset_item\n is_default_dataset = params['dataset_id'] == 'default'\n\n dataset_item_params = params.slice(:dataset_id, :audio_recording_id, :start_time_seconds, :end_time_seconds).permit!\n\n dat... | [
{
"docid": "da0297f18a5b84c952222e95267dbe17",
"score": "0.6123294",
"text": "def default_dataset(provenance:, dmp:, json:)\n return nil unless provenance.present? && dmp.present?\n\n ::Dataset.new(\n title: \"Dataset for: #{dmp.title || json[:title]}\",\n ... |
07edf0b5b5bd08ff80fec158d21d6821 | POST /games POST /games.json | [
{
"docid": "934166e4b97519ab25af23c5a805f643",
"score": "0.0",
"text": "def create\n @game = Game.new(game_params)\n @game.creator_id = @auth_player.id\n @game.game_status = \"not_started\"\n respond_to do |format|\n if @game.save\n g = GamesPlayers.new\n g.player_id = @au... | [
{
"docid": "577a08cf11788b538b5f888555cba5b9",
"score": "0.7660381",
"text": "def create\n @game = Game.create(game_params)\n render json: @game, status: 201\n end",
"title": ""
},
{
"docid": "d3e897693eb719c1ac3e1ee560b38998",
"score": "0.7571478",
"text": "def create\n ga... |
26492d8c01ab78ddb466c02c1293af6d | inside the file will be a series of numbers find the largest number on each line return their sum EXAMPLE file: nums.txt 406 217 799 116 45 651 808 780 205 919 474 567 712 776 170 681 86 822 9 100 540 812 602 117 181 169 876 336 434 165 725 187 974 48 line_sums('nums.txt') => 808 + 919 + 822 + 876 + 974 => 4399 | [
{
"docid": "8262c0363791b46c7025962513ca2bd3",
"score": "0.8276386",
"text": "def line_sums(file_name)\n\tsum = 0\n\tFile.foreach file_name do |line|\n\tsum += line.split.map{ |i| i.to_i }.max\n\tend\n\tp sum\nend",
"title": ""
}
] | [
{
"docid": "baa9085c55f179df6f28357b55b70900",
"score": "0.87449247",
"text": "def line_sums(file_name)\n sum = 0\n File.open(file_name).each_line do |line|\n line.chomp!\n #numbers = line.split(' ').map(&:to_i)\n #sum += numbers.max\n sum += line.split(' ').map(&:to_i).max\n end\n sum\n... |
a60ce34cb5660a076277edcdc7a49b63 | Mocks a fanout exchange | [
{
"docid": "38f630abfbb9a27a23d087e35b008bc1",
"score": "0.6733643",
"text": "def fanout(name, opts = {})\n exchange name, opts.merge(type: :fanout)\n end",
"title": ""
}
] | [
{
"docid": "8591515389b5de8be28658dd4314c28e",
"score": "0.7460211",
"text": "def fanout(name, opts = {})\n fanout = exchanges[name]\n return fanout if fanout\n add_exchange(name, BunnyMock::Exchange.new(self, :fanout, name, opts))\n end",
"title": ""
},
{
"docid": "3baf067... |
bcb701fc169ee0ab5425e4024117be56 | Retrieves the monthly active user report between the two instants. If you specify an application id, it will only return the monthly active counts for that application. | [
{
"docid": "a26935dcba1155bd36f3eb1c6fbb254a",
"score": "0.7829932",
"text": "def retrieve_monthly_active_report(application_id, start, _end)\n start.uri('/api/report/monthly-active-user')\n .url_parameter('applicationId', application_id)\n .url_parameter('start', start)\n ... | [
{
"docid": "2abb87d05727e7f90f731e38ea9ef01f",
"score": "0.78291565",
"text": "def retrieve_monthly_active_report(application_id, start, _end)\n start.uri('/api/report/monthly-active-user')\n .url_parameter('applicationId', application_id)\n .url_parameter('start', start)\n ... |
3505edfeff97b8de0b5901686c224708 | True if the token's scope is a superset of required scopes, or the required scopes is empty. | [
{
"docid": "2b7bafead9e3c2f62a7b2c442eead9ee",
"score": "0.8523466",
"text": "def sufficent_scope?(req_scopes)\n if req_scopes.blank?\n # if no any scopes required, the scopes of token is sufficient.\n true\n else\n # If there are scopes required, then check whether\n ... | [
{
"docid": "f4aeda08a0000ec7d16da2b02b049e17",
"score": "0.8111951",
"text": "def includes_scope? required_scope\n missing_scope = Google::Auth::ScopeUtil.normalize(required_scope) -\n Google::Auth::ScopeUtil.normalize(scope)\n missing_scope.empty?\n end",
"... |
f8d19d16f5e15d30572eed2e08adb29e | GET /player_score_matches GET /player_score_matches.json | [
{
"docid": "2080e4b5bc475a66a6142f044faf2328",
"score": "0.7378481",
"text": "def index\n\n @player_score_matches = PlayerScoreMatch.paginate(page: params[:page], per_page:5)\n\n end",
"title": ""
}
] | [
{
"docid": "0611b877bc093cf4fcf0d5ae1aaf35de",
"score": "0.7214237",
"text": "def get_tournament_scores(tournament)\n\tmatches = []\n\ttournament.matches.each do |result|\n\t\tmatch = { :match => result, :scores => result.scores }\n\t\tmatches << match\n\tend\n\n\tresource = { :tournament => tournament,... |
88381fde0d84da74f2da7b7b01e14f3f | atomic_hol_push only supports asynchronous push, not scheduled | [
{
"docid": "089d36ff7ab8511ee3060f064882b339",
"score": "0.74084127",
"text": "def atomic_hol_push(conn, payloads)\n q = payloads.first['queue']\n now = Time.now.to_f\n to_push = payloads.map do |entry|\n entry['enqueued_at'.freeze] = now\n Sidekiq.dump_json(entry)... | [
{
"docid": "90d9948a801af9aac8b892858de59a43",
"score": "0.6774168",
"text": "def enable_push; end",
"title": ""
},
{
"docid": "047fb82714ee0180bde2b9d62f8a1564",
"score": "0.6485147",
"text": "def synchronizable_for_push\n synchronizable_for_types([TYPE_PUSH, TYPE_ALL])\n en... |
9bd2786258099961dccd9e04071fd174 | GET /articles GET /articles.json | [
{
"docid": "d71cb6ee10c325e5c275172c48739599",
"score": "0.0",
"text": "def index\n if params[:titleKeyword].blank? and params[:tagKeyword].blank?\n @articles = Article.all\n elsif params[:tagKeyword].blank?\n @articles = Article.where('title LIKE ?', \"%#{params[:titleKeyword]}%\")\n ... | [
{
"docid": "9cb21440d77022ee6f0542d4ebd0003b",
"score": "0.7823242",
"text": "def articles\n @articles = Article.all\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @administration }\n end\n end",
"title": ""
},
{
"docid": "f62c2acde8... |
0b0e05d0a93fbea17800e4e62bb33829 | Find by TxnID of List record. +options+ are the same as those for in +find+. | [
{
"docid": "394f201d69aee5b347570a1a47b616b4",
"score": "0.67323256",
"text": "def find_by_id(sess, id, options = {})\r\n q = create_query(sess)\r\n q.query.TxnIDList.Add(id)\r\n find(sess, :first, q, options)\r\n end",
"title": ""
}
] | [
{
"docid": "b5e79efa46835bb7abc9f646afc1c9ed",
"score": "0.681456",
"text": "def list_find_by_id(id, options = {})\n list_find({\n :id => id\n }.merge(options))\n end",
"title": ""
},
{
"docid": "10c36f1ecc79131c5832e024f51decf7",
"score": "0.61640704",
"text": "def list_... |
6e52b86622993ad6f19dfd06d2a0ea83 | return the value of the TZOFFSETTO property which will be an instance of UtcOffset | [
{
"docid": "38dd4941bb9b4fce3239b415f4a72359",
"score": "0.86529285",
"text": "def tzoffsetto\n tzoffsetto_property ? tzoffsetto_property.ruby_value : nil\n end",
"title": ""
}
] | [
{
"docid": "6190c7bb612b5804e57f1d623a9bd2b0",
"score": "0.81035763",
"text": "def tzoffsetto_property\n @tzoffsetto_property\n end",
"title": ""
},
{
"docid": "9c715e49888cffd5288d773d4b92db5b",
"score": "0.7974335",
"text": "def tzoffsetfrom_property\n @tzoffsetf... |
9f3ca21a632395f3d1c105de09a25576 | logs a user in | [
{
"docid": "82b08c827783950287baea505210a84e",
"score": "0.0",
"text": "def login_user(username, password, timearray)\n db = connect_to_db(\"db/storprojekt.db\")\n result = db.execute(\"SELECT id, password FROM users WHERE username=?\", [username])\n if result.empty?\n re... | [
{
"docid": "39d95e452910dd9c69fdad7b4834aa1b",
"score": "0.8465667",
"text": "def log_user_in(user)\n login(user)\n end",
"title": ""
},
{
"docid": "6b513ff7619deb6d008951acb7fd1b3a",
"score": "0.78409886",
"text": "def log_in(user)\n\t \t\tcurrent_user\n\t\t\tse... |
5fed088eea2a5291607c3140a2f7c9f0 | Guess the file format of dates, reading the beginning of file, or return nil if no dates are found (?!). | [
{
"docid": "4745beec217aa09121bf907c1572420f",
"score": "0.7622434",
"text": "def guess_date_format\n begin\n line = @data.gets\n break if line.nil?\n\n date = line[1..-1]\n guessed_format = Qif::DateFormat::SUPPORTED_DATEFORMAT.find { |format_string, format|\n ... | [
{
"docid": "135fd3ccc0c08287744e15e7dca97ca4",
"score": "0.762337",
"text": "def guess_date_format\n begin\n line = @data.gets\n break if line.nil?\n\n date = line[1..-1]\n guessed_format = Qif::DateFormat::SUPPORTED_DATEFORMAT.find { |format_string, format|\n t... |
d474e26da713985b42d02af4af15fed9 | Test 6 Verify that the list_pairs_even() function is called if final inner array has two names | [
{
"docid": "747dae294fdff91bcc82a1218e670963",
"score": "0.80063283",
"text": "def test_6_evaluate_even\r\n test_array = [[\"a\", \"b\"], [\"c\", \"d\"], [\"e\", \"f\"]] # array with even pairs\r\n #test_array = [[\"a\", \"b\"], [\"c\", \"d\"], [\"e\", \"f\"], [\"g\"]] # array with final odd arr... | [
{
"docid": "e25a16cd04aaf64c160f11538edf04b2",
"score": "0.80009973",
"text": "def test_5_evaluate_odd\r\n test_array = [[\"a\", \"b\"], [\"c\", \"d\"], [\"e\", \"f\"], [\"g\"]] # array with final odd array\r\n #test_array = [[\"a\", \"b\"], [\"c\", \"d\"], [\"e\", \"f\"]] # array with even pair... |