query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
1f7a1e91ca5f306305d599fd12a0e064 | Test threelevel composition (onetomanytomany) | [
{
"docid": "d7187411364d20759f027eef8aac61dd",
"score": "0.5589719",
"text": "def test_one_to_many_to_many\n expected_contributors = [\"David Thomas\",\"Andrew Hunt\",\"Chad Fowler\", \"David Heinemeier Hansson\"]\n expected_books = [\"Programming Ruby - 2nd Edition\", \"Agile Web Development with... | [
{
"docid": "3361acb5400fdef0aca273374163960d",
"score": "0.5819143",
"text": "def test_feature_relations_exists\n assert_equal Array, @f0.parent_relations.class\n assert_equal Array, @f0.parents.class\n \n assert_equal Array, @f0.child_relations.class\n assert_equal Array, @f0.children.cl... |
c8ed6d738c2ae90c8a09184b0c9a774d | Initialize contact add response | [
{
"docid": "1e95e738196d9a7b8f9ac2ea5f34c3fd",
"score": "0.6524675",
"text": "def initialize(response)\n super response\n\n # Parse response\n stats = @body.delete('stats')\n contacts = @body.delete('contacts')\n\n # Set statistics\n if stats\n @su... | [
{
"docid": "e014f489f8df32027c9289b8bc5658fe",
"score": "0.6566495",
"text": "def initialize(response)\n super response\n\n # Parse response\n stats = @body.delete('stats')\n contacts = @body.delete('contacts')\n\n # Set statistics\n if stats\n @su... |
3f5f2494a1fca30ccc2f3b5c2c6a6455 | Add a space by filename. | [
{
"docid": "c98a45a9884dec1258e39bb9979b64e9",
"score": "0.5625867",
"text": "def add_space_file(space_filenames)\n space = Innodb::Space.new(space_filenames)\n space.innodb_system = self\n add_space(space)\n end",
"title": ""
}
] | [
{
"docid": "45153ce24e8ddeef2619e7f1f75a4eb5",
"score": "0.67019635",
"text": "def add_filename_prefix(filename, prefix)\n filename = filename.rpartition(File.basename(filename))\n filename[1] = \"#{prefix}#{filename[1]}\"\n filename.join\n end",
"title": ""
},
{
"d... |
5d3bcb6a55c69fc4d8e54250cbcd7058 | Generate output hash from Record class instances | [
{
"docid": "f045fe637d8c8fa12a3f40932496aad6",
"score": "0.0",
"text": "def to_hash(options = {})\n options.reverse_merge!(:output_type => :raw, :content_type => :full, :message_type => :long_message)\n\n # :output_type --> :raw (default) | :condensed\n # \n # if :output_type... | [
{
"docid": "7b80a5cd34b3ff10c045a4c7d8274bff",
"score": "0.7072852",
"text": "def output_hash; end",
"title": ""
},
{
"docid": "7b80a5cd34b3ff10c045a4c7d8274bff",
"score": "0.7072852",
"text": "def output_hash; end",
"title": ""
},
{
"docid": "1e5bf06291d3cbb29f5de8c2d61d... |
b7af1623b7c4827cbc5eb9200044b443 | The amount_paid currency should match the workshop base currency | [
{
"docid": "b521fe8d657cf3f9f177e9a0a364d3e3",
"score": "0.7246232",
"text": "def set_currency\n self[:amount_paid_currency] = workshop.base_currency\n end",
"title": ""
}
] | [
{
"docid": "022298d80cd99b52d5b2caf4b0e861bd",
"score": "0.68079144",
"text": "def amount\n paid_amount || base_amount\n end",
"title": ""
},
{
"docid": "411c94308761bdea2a6158b87d1db9df",
"score": "0.67150515",
"text": "def get_amount_paid\n paid? ? price : (amount_paid || 0.... |
cfd4ffa80a1d812aff783f28a2b0229a | This function looks for the vertices of the closest edge to the input coords Returns an array of 3 rows, with columns named label, lat, lon, name, dist The first row is not actually a vertex, but the nearest point in the edge to the input coordinates | [
{
"docid": "c6490a5c38269c31ee6f609bf44dfa12",
"score": "0.6981305",
"text": "def get_closest_edge_vertices(lat, lon)\n #Override this function in the corresponding extension (tiger and osm initially)\n return nil\n end",
"title": ""
}
] | [
{
"docid": "c329bfb70b777a3a0e9feb9ce9ed3095",
"score": "0.5804972",
"text": "def closest_neighbors(num_neighbors, point, data)\n data.keys.sort { |a,b| euclidean_distance(a, point) <=> euclidean_distance(b, point) }.take(num_neighbors)\nend",
"title": ""
},
{
"docid": "466490c86e0c8b6300d6... |
11007373710144246a3cef4e3501bf4f | GET /properties/1 GET /properties/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "0bf5477934b357705f9f253da9b9b1fe",
"score": "0.74965066",
"text": "def show\n @property = Property.find(params[:id])\n\n render json: @property\n end",
"title": ""
},
{
"docid": "45e3beeffb8bc807c13b4fe7e42983c5",
"score": "0.734742",
"text": "def show\n propert... |
fe7fddc4c9e53292f645ce859e30b60b | Returns the underscored name of the mailer preview without the suffix. source://actionmailer//lib/action_mailer/preview.rb116 | [
{
"docid": "6121ad8cd0bd8084487c7cdbebde86ac",
"score": "0.7049834",
"text": "def preview_name; end",
"title": ""
}
] | [
{
"docid": "59c80c073e92d691f0c62570aee988f6",
"score": "0.6871662",
"text": "def preview_name_url\n Page.strip_string(name)\n end",
"title": ""
},
{
"docid": "7e3a964be0dd40bd4d128bd0009bccdf",
"score": "0.67304474",
"text": "def display_filename\n return File.basename(... |
afefd99e2ed30851cdfdcfa096194cbd | Adds +heading+ to the output as a paragraph | [
{
"docid": "dd89de5ad65ef5b52e2c1daffb2dee5f",
"score": "0.80833507",
"text": "def accept_heading heading\n @res << \"<p>#{to_html heading.text}\\n\"\n\n add_paragraph\n end",
"title": ""
}
] | [
{
"docid": "91048ab9d479d42c2449c621e71f1d04",
"score": "0.7586888",
"text": "def output_section(heading, body)\n return '' if body.compact.empty?\n fancy_heading = Pry::Helpers::Text.bold(color(:heading, heading))\n Pry::Helpers.tablify_or_one_line(fancy_heading, body)\n end",... |
2d23ae1098a28434abd5b59e0ca1c2b3 | POST /expense_options POST /expense_options.json | [
{
"docid": "aa36f360274b7073527ebd6fbf99bd3c",
"score": "0.7130809",
"text": "def create\n # @expense_option = ExpenseOption.new(params[:expense_option])\n @expense_options = params[:expense_options].values.collect { |option| ExpenseOption.new(option) }\n\n @expense_options.each do |eo|\n ... | [
{
"docid": "e4c01f01307fdeb1d3e1b24005bb9424",
"score": "0.6764029",
"text": "def new\n @expense=Expense.find(params[:expense_id])\n @expense_options=Array.new(@expense.number_of_options){ExpenseOption.new}\n #@expense_option = ExpenseOption.new\n\n respond_to do |format|\n format.html ... |
963246cf535f7292ed52ed09b1ed09c2 | def big_shoe_rebounds biggest_shoe = 0 player_rebounds = 0 game_hash.values.each do |team_info| team_info[:players].each do |player| if player[:shoe] > biggest_shoe biggest_shoe = player[:shoe] player_rebounds = player[:rebounds] end end end return player_rebounds end | [
{
"docid": "59de251ea1c0969f475879fadc85860a",
"score": "0.96020514",
"text": "def big_shoe_rebounds\r\nbiggest_shoe = 0\r\nplayer_rebounds = 0\r\ngame_hash.values.each do |team_info|\r\nteam_info[:players].each do |player|\r\n\r\n shoe = player[:shoe]\r\n \r\n if shoe > biggest_shoe\r\n biggest_s... | [
{
"docid": "4202e675982a51bd07f6236b980c4465",
"score": "0.9524619",
"text": "def big_shoe_rebounds\n largestShoe = 0\n rebounds = 0\n game_hash.each do |team, team_info|\n team_info[:players].each do |player|\n if player[:shoe] > largestShoe\n largestShoe = player[:shoe]\n rebo... |
880ddb07605ab78ff8f7b9d9eb902b32 | Receiving end of the requestresponse pattern. The return value of the block passed to this method is the response sent back to the client. If no block is given then request is returned as the response. | [
{
"docid": "7a82e57f4a0eefb966cfe1bfd391e21f",
"score": "0.0",
"text": "def receive_and_publish(destination, options = {})\n selector = \"synchronous = 'true'\"\n selector = \"#{selector} and (#{options[:selector]})\" if options[:selector]\n receive_options = options.merge(:decode =... | [
{
"docid": "db42fdf3b914f30dae16ee2739a99c9c",
"score": "0.6863379",
"text": "def handle_request( request, &block )\n\t\tif block\n\t\t\treturn block.call( request )\n\t\telse\n\t\t\treturn request.response\n\t\tend\n\tend",
"title": ""
},
{
"docid": "b529633ec8b52e7b06f2e41d46be21b9",
"... |
e4278b2e1052eb4bb091c0297d495f54 | Wraps a file action first removes file flags that would cause the action to fail then yields to the block to perform the action then restores the flags | [
{
"docid": "b6bf7f094ae1b1f06655935dc386789b",
"score": "0.6235961",
"text": "def preserving_flags\n original_file_flags = file_flags\n if original_file_flags == \"0\"\n yield\n else\n begin\n system(\"chflags\", \"0\", path)\n yield\n ensure\n ... | [
{
"docid": "159dc28ddf1a4ba88b40483fd92f8851",
"score": "0.5755782",
"text": "def on_file(*tempfile_args)\n temp_file = file(*tempfile_args)\n begin\n yield(temp_file)\n ensure\n temp_file.remove\n end\n end",
"title": ""
},
{
... |
b2135831ec0e164206cafd655e483de4 | GET /groups/1 GET /groups/1.json | [
{
"docid": "1eda92470b836d76ec11843452fdc0da",
"score": "0.74999285",
"text": "def show\n @group = Group.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @group }\n end\n end",
"title": ""
}
] | [
{
"docid": "7761dcbf8079fbe8d9838f059e843811",
"score": "0.80157125",
"text": "def groups\n @page = 'groups'\n respond_to do |format|\n format.html {\n @groups = Group.find(:all)\n }\n format.json { }\n end\n end",
"title": ""
},
{
"docid": "1f843b01e13360c014... |
ed83bb2f8ea445004c4f03e0cb75177e | Formats the records returned by scaffold autocompleting to be displayed, should be an unordered list. By default uses the scaffold_name and id of the entries as the value. | [
{
"docid": "faa2ee485e956c1370fe2850203ee8ad",
"score": "0.77505",
"text": "def scaffold_auto_complete_result(entries)\n return unless entries\n content = '<ul>'\n entries.collect{|entry| content << \"<li>#{h(entry.scaffold_name_with_id)}</li>\"}\n content << '</ul>'\n ... | [
{
"docid": "3b5bfd618400c8e21935cc5a847e9322",
"score": "0.7401535",
"text": "def scaffold_auto_complete_result(entries)\n return unless entries\n content_tag(\"ul\", entries.map{|entry| content_tag(\"li\", h(entry.scaffold_name_with_id))}.uniq)\n end",
"title": ""
},
{
"d... |
2b0b983f9e35a2af1fdbddebcb1088a6 | Returns the priority for this service record. | [
{
"docid": "4069748b16dfdb2ffa2a7b54facf0c7f",
"score": "0.6189422",
"text": "def priority\n if !block_given?\n return @j_del.java_method(:priority, []).call()\n end\n raise ArgumentError, \"Invalid arguments when calling priority()\"\n end",
"title": ""
}
] | [
{
"docid": "e927f6f851ee017a0bf3527923cc6d5e",
"score": "0.7979325",
"text": "def priority\n return data.priority\n end",
"title": ""
},
{
"docid": "3396dc5fcf42e6364b309947b8521af3",
"score": "0.77269995",
"text": "def getPriority\r\n\t\t\t\t\treturn @priority\r\n\t\t\t\tend... |
6bcbda194e9e1c4fcfb35e4b7b4008d4 | PATCH/PUT /query_assumption_results/1 PATCH/PUT /query_assumption_results/1.json | [
{
"docid": "5c1c98a3cc07d1a5d36f20046fc6a1af",
"score": "0.636936",
"text": "def update\n respond_to do |format|\n input = query_assumption_result_params[:result].to_s\n @parameter_ok = input == \"true\" || input == \"false\"\n if @parameter_ok && @query_assumption_result.update(query_... | [
{
"docid": "fb7b25507c8bcfe756be3cd20260fd2c",
"score": "0.66266805",
"text": "def update\n @saved_query.update!(saved_query_params)\n render json: {status: :ok}\n end",
"title": ""
},
{
"docid": "235565c82fe9a40c386e86729c9ccf5c",
"score": "0.6550007",
"text": "def update\n ... |
5b4f0e008aefb3932b45a09b0f8edb7f | Baseline implementation for the list_assignments REST call | [
{
"docid": "964a265c1546231c0df84ed66f891eb1",
"score": "0.7336584",
"text": "def list_assignments request_pb, options = nil\n raise ::ArgumentError, \"request must be provided\" if request_pb.nil?\n\n verb, uri, query_string_params, body = ServiceStub.transcode_list_as... | [
{
"docid": "b3a5ee88de42e9079d1cc8847d19534f",
"score": "0.72064775",
"text": "def get_assignments()\n return @all_assignments\n end",
"title": ""
},
{
"docid": "b53aa5bbaeaea589489e5317580fd9d3",
"score": "0.7069769",
"text": "def assignments\n begin\n display_options = ... |
ca987e8ac948153c4ba24d2e004acc12 | POST /err_brands POST /err_brands.json | [
{
"docid": "5b98d3fda5975539acdd33eee9b8fce2",
"score": "0.6844357",
"text": "def create\n @err_brand = ErrBrand.new(err_brand_params)\n\n respond_to do |format|\n if @err_brand.save\n format.html { redirect_to @err_brand, notice: 'Err brand was successfully created.' }\n format... | [
{
"docid": "d1af796072462e32c151f7b79ed45512",
"score": "0.6622227",
"text": "def create\n @brand = Brand.new(brand_params)\n render json: @brand.errors unless @brand.save\n end",
"title": ""
},
{
"docid": "b927d9e5a8b214a777c81b986e0cf48f",
"score": "0.65329623",
"text": "def... |
2e780fde2fb63af990ddf42b1225c018 | See ActionController::RequestForgeryProtection for details Uncomment the :secret if you're not using the cookie session store protect_from_forgery :secret => '3eab6503a5d8993ac2a3fa6ff8ef072b' This is called toward the end of ajax actions | [
{
"docid": "f563d51ac74cf6cdd9f03c277179aa5b",
"score": "0.0",
"text": "def reload_state_data\n find_itunes\n get_queue_data\n end",
"title": ""
}
] | [
{
"docid": "fe697d8a1a507e23997fb1222df48ee6",
"score": "0.6930904",
"text": "def protect_against_forgery?; end",
"title": ""
},
{
"docid": "5ff694633a774ffc0e8da9f9b8dd5919",
"score": "0.68953323",
"text": "def csrf\n render json: {\n param: request_forgery_protection_token,... |
d050b228d2aa7ea1415ab02565e9c652 | Extract the parameters from the Struct.new AST node, returning them as a list of strings | [
{
"docid": "f108a67b565ed90de90efbfb9c81599d",
"score": "0.0",
"text": "def extract_parameters(superclass); end",
"title": ""
}
] | [
{
"docid": "ab0b1c22b5846666c487e7527cb6328d",
"score": "0.64938253",
"text": "def extract_parameters(superstring)\n paramstring = superstring.match(/\\A(Struct|OStruct)\\.new\\((.*?)\\)/)[2]\n paramstring.split(\",\").map {|x| x.strip[1..-1] } # the 1..-1 chops the leading :\n end",
"t... |
4d8f402c5215bf15753aef5ae8e129aa | GET /type_certificates GET /type_certificates.json | [
{
"docid": "5f6e279b4052d758ffc87be37ccd2104",
"score": "0.74363637",
"text": "def index\n @type_certificates = TypeCertificate.all\n end",
"title": ""
}
] | [
{
"docid": "88ab0cec04ab41fea271610002dd6d53",
"score": "0.7091338",
"text": "def certificate_type_get_with_http_info(type, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: AuthenticationApi.certificate_type_get ...'\n end\n # verify the ... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "2dd559f324e9166328c05f27959bbd29",
"score": "0.0",
"text": "def failure_report_params\n params.require(:failure_report).permit(:unit_id, :subject, :description, :rma, :failcode)\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... |
a3e1171cf74e5b1be7518c1c79a4c7cb | Override this method to properly return an instantiated Builder object You can use this yourself for the build steps, and it's used by :clean to invoke remove_build_products on your builder | [
{
"docid": "f974dd869c7702031dc9082d7548ab03",
"score": "0.6492351",
"text": "def create_builder\n \n end",
"title": ""
}
] | [
{
"docid": "9fb68bccdcb2d775b6f2e0c062558f34",
"score": "0.7461446",
"text": "def build\n return builder.build\n end",
"title": ""
},
{
"docid": "85d5999e0223d5139ddcaf6820e4d0c5",
"score": "0.7451381",
"text": "def builder\n @builder || self.builder!\n end",
... |
f706e9f71473f39483e13ae3f455fe32 | rubocop:enable SkipsModelValidations Returns the proxy for the salt minion | [
{
"docid": "501cef7d2a7a09198f428937fc896e21",
"score": "0.64313823",
"text": "def salt\n @salt ||= Pharos::SaltMinion.new minion_id: hostname\n end",
"title": ""
}
] | [
{
"docid": "7bb9b91d146c5e214f66820822edc748",
"score": "0.57912654",
"text": "def salt!\n returning self.class.generate_salt do |s|\n write_attribute(:salt, s)\n end\n end",
"title": ""
},
{
"docid": "7aa18e495e9dc61343ebb734ed04da39",
"score": "0.57540876",
... |
fd840cfe67d4ccb1eac9712cf7a9bda1 | SAVE ENTRY FOR CITY | [
{
"docid": "58369ca9f72c3f41a480609762e8a089",
"score": "0.58836746",
"text": "def save()\n sql = \"INSERT INTO cities (name, country_id, visited, rate) VALUES ($1, $2, $3, $4) RETURNING id\"\n values = [@name, @country_id, @visited, @rate]\n result = SqlRunner.run(sql, values)\n id = result... | [
{
"docid": "9609d6c285687aedfca1838b967b5585",
"score": "0.6518835",
"text": "def save_city(api_city_data)\n unless city = City.find_by_name(api_city_data['name'])\n city_params = {\n :name => api_city_data['name'],\n :latitude => api_city_data['coord']['lat'],\n :long... |
4fcd5fdc86bfa82b762a999568dfc7f4 | this is not sued anymore | [
{
"docid": "e8af76930dba375b9abdbe81f7ba2a9a",
"score": "0.0",
"text": "def show_stuff\n\t\t@show = Array.new\n\t\tf = File.open('public/uploads/sample.txt', 'r')\n\t\tf.each_line do |line|\n\t\t\t@show << line\n\t\tend\n\tend",
"title": ""
}
] | [
{
"docid": "ef1e4c0cc26e4eec8642a7d74e09c9d1",
"score": "0.74583745",
"text": "def private; end",
"title": ""
},
{
"docid": "65ffca17e416f77c52ce148aeafbd826",
"score": "0.69859743",
"text": "def schubert; end",
"title": ""
},
{
"docid": "0b8b7b9666e4ed32bfd448198778e4e9"... |
47c767a4fec66d3b1e1dc93e20d21115 | :part_id, :fifo, :quantity, :package_nr, :position_id, :warehouse_id, :remarks, :user_id | [
{
"docid": "87017267793ed5437218e19cfec93516",
"score": "0.6062714",
"text": "def enter_stock(params, user)\n # PaperTrail.whodunnit = user.id\n\n # validate fifo\n puts '----------------------ss'\n fifo = validate_fifo_time(params[:fifo])\n # validate whId existing\n wh = Warehouse.fi... | [
{
"docid": "3a75b62906a994dce33ada74eb36fc0c",
"score": "0.61441296",
"text": "def inventory_params\n params.require(:inventory).permit(:department, :position, :part_nr,:sn,:part_unit,:part_type,:wire_nr,:process_nr, :check_qty, :check_user, :random_check_qty, :random_check_user, :is_random_check, :i... |
e97f88d1d6ccae6798b094726bcee7b7 | Cancel recurring payment AND update its info | [
{
"docid": "4251d30e2b471e4b10b0f95ac331787a",
"score": "0.0",
"text": "def delete_with_persist(billing_id)\n if delete_without_persist(billing_id)\n RecurringPaymentProfile.find_by_gateway_reference(billing_id).mark_as_deleted!\n return true\n end\n end",
"title": ""
}
... | [
{
"docid": "075e742c3218d058e2a5f3c4ecf3def3",
"score": "0.72617716",
"text": "def paypal_stop_recurring(params)\n connection('paypal/stopRecurring')\n request_method('post', params)\n end",
"title": ""
},
{
"docid": "ff4233d693f1dced3fe995c73fe1dfaa",
"score": "0.7188885",
... |
046b972c394b632e43d1b632073df52f | POST /forms POST /forms.json | [
{
"docid": "cb740474eb0b4506f1839602b22f5781",
"score": "0.59284145",
"text": "def create\n @form = Form.new(params[:form])\n\n respond_to do |format|\n if @form.save\n format.html { redirect_to log_in_path, :notice => 'Thank you for applying leave...Leave approval will be received in ... | [
{
"docid": "2969547820c893e146806ae4361ab418",
"score": "0.7204358",
"text": "def create_form(form_id, request)\n start.uri('/api/form')\n .url_segment(form_id)\n .body_handler(FusionAuth::JSONBodyHandler.new(request))\n .post()\n .go()\n end",
"title": ""... |
8ad643cc69614fbe6440c2b8b00d6487 | Checks if the type of the field is `TIME`. | [
{
"docid": "0dc0a51d2cf7fd23af39ab3c6c313473",
"score": "0.8383756",
"text": "def time?\n type == \"TIME\"\n end",
"title": ""
}
] | [
{
"docid": "5ca77479ea6a201dabbf2e0376ef932d",
"score": "0.75910455",
"text": "def time_value?(input)\n return input.is_a?(Time) || input.is_a?(Date)\n end",
"title": ""
},
{
"docid": "f13d0244ce4bf7a97e7492a40eb5a1c6",
"score": "0.71092737",
"text": "def valid_time_or_date?(valu... |
b1b3f0633d1f6943e69effc34287f6bc | convert slug into readable title "myfirstpost!blog" ==> "my first post" | [
{
"docid": "095dcf947ae38620020d90e42cfd8168",
"score": "0.7737163",
"text": "def deslugify(title)\n title = get_url_end_path(title)\n # strip \"!blog\", and \n # title.strip.gsub(/[\\-_]/, ' ').gsub(/\\#.*/,'').gsub(BLOG_TAG,\"\")\n title.strip.gsub(/[\\-_]/, ' ').gsub(BLOG_TAG,\"\")\nend",
"ti... | [
{
"docid": "15acc76e01cb1de59ca24fe33d1b2c1a",
"score": "0.8280402",
"text": "def slug\n title.split.join('-').gsub(/[^\\w-]+/, '')\n end",
"title": ""
},
{
"docid": "1cd4d89b547363437c2586fc1ae05851",
"score": "0.82713157",
"text": "def slug\n title.downcase.gsub(/\\W/,... |
3c1ce1d4acec80ef89585c0e464f52b6 | add parameters to this | [
{
"docid": "b9056fc3300fd254b66d12897ba9d241",
"score": "0.0",
"text": "def default_playlist\n Playlist.where( uuid: self.uuid)\n .first_or_create( uuid: self.uuid,\n user_id: self.id,\n account_id: self.account.id,\n ... | [
{
"docid": "0efddeab9de148626aa9aeddc0db3260",
"score": "0.7748575",
"text": "def add_parameters(parameters = {})\n\t\t\t@parameters = @parameters.merge(parameters)\n\t\tend",
"title": ""
},
{
"docid": "8b75062ff600480b7cd64fdbb964ab23",
"score": "0.7475941",
"text": "def add_params\... |
1c25e2cceb9783174e45dd38d46fa821 | Find User ID from name. | [
{
"docid": "76be976d4fe432af7dc87a3518a00902",
"score": "0.82842535",
"text": "def find_user_id(user_name)\n user = users.find {|u| u['name'] == user_name}\n user ? user['id'] : nil\n end",
"title": ""
}
] | [
{
"docid": "107059e17d06687615c624a09ff96408",
"score": "0.8444833",
"text": "def get_user_id(name)\n System::User.normalize_username(name)\n end",
"title": ""
},
{
"docid": "75112bb69653bd795e1087f0de21faab",
"score": "0.83563966",
"text": "def get_user_id(user_name)\n ... |
7d09f8376c0b427b6ac80c9302c6e705 | Create a database migration adding autoclassified_at attribute. | [
{
"docid": "7686b8a2f3ca5e130aee7a0d5702ed8a",
"score": "0.6026431",
"text": "def create_migration\n migration_template(\"migrations/add_cabalist.rb.erb\",\n \"db/migrate/add_cabalist_to_#{name.tableize}.rb\")\n end",
"title": ""
}
] | [
{
"docid": "d6124aecf0a60f3acf1802727b225161",
"score": "0.6014852",
"text": "def create!; migrate!(version: 1); end",
"title": ""
},
{
"docid": "1350df962a3dae5b43513faa3a5221b1",
"score": "0.6008676",
"text": "def schema_migration; end",
"title": ""
},
{
"docid": "6313a... |
64f790f0ed2d42dcf4c04d0494def0f1 | Transform foo bar color: blue baz color: blue into foo bar, baz color: blue | [
{
"docid": "831954a6f24b8ac146803ab1c64a5f99",
"score": "0.0",
"text": "def fold_commas(root)\n prev_rule = nil\n root.children.map! do |child|\n next child unless child.is_a?(Tree::RuleNode)\n\n if prev_rule && prev_rule.children == child.children\n prev_rule.rules.firs... | [
{
"docid": "e883e2bc0ed762078f790c5162556409",
"score": "0.6112914",
"text": "def strip_color(str); end",
"title": ""
},
{
"docid": "7fc72e097bf4ab1d858afe2a894ede08",
"score": "0.60201085",
"text": "def colorize(val, color, isatty); end",
"title": ""
},
{
"docid": "d07f9... |
e885e90ceec0df91a1ca93876564838c | /api/v1/update ~> POST: Update a note | [
{
"docid": "49fde848b15fb7ae02bb978edba6f315",
"score": "0.7986796",
"text": "def update\n note = Note.find(params[\"id\"])\n note.update_attributes(note_params)\n respond_with note, json: note\n end",
"title": ""
}
] | [
{
"docid": "dba86595fad87f6b5ef28d7d107d4920",
"score": "0.79347163",
"text": "def update\n if @note.update(note_params)\n render json: @note\n else\n render json: @note.errors, status: :unprocessable_entity\n end\n end",
"title": ""
},
{
"docid": "9421849134b24a66b52703e... |
6da7fcf2f7110db77be3008d4e07af3e | Rn Rm > Flags | [
{
"docid": "de22a8c741db4027f3c20d557563ee32",
"score": "0.5209814",
"text": "def genCmpReg(rn, rm)\n return genDataProcImmShift(0, rn, rm, 0, SH_LSL, OP_CMP, true, COND_AL)\nend",
"title": ""
}
] | [
{
"docid": "97f900ac88afde3f843dc7c7b96680e6",
"score": "0.60926384",
"text": "def flag_res(old_flags, new_flag)\n old_flags | FLAGS[new_flag]\n end",
"title": ""
},
{
"docid": "83628f9d56a9ba9d157a4ee1e8c429d9",
"score": "0.59749264",
"text": "def flags; end",
"title": ""
... |
df8afccb93dc4aaf61e444b4e1497557 | Checks whether branch subject is succesfully merged into base | [
{
"docid": "0c64dc1630b9ca7f140ab32a9b7d1ced",
"score": "0.7669935",
"text": "def git_is_branch_merged_into(subject, base)\n all_merges = run(\"git branch --no-color --contains #{subject}\").split(\"\\n\").collect do |b|\n b.sub(/^[* ] /, '')\n end\n all_merges.include?(base)\n ... | [
{
"docid": "45bc81705b8e6cafe063d6918391e000",
"score": "0.78505677",
"text": "def check_merged!\n check_everything_commited!\n branch = current_branch\n git \"checkout master\"\n git \"pull --rebase\"\n merged = git(\"branch --merged\").include?(branch)\n git \"checkout #{... |
a2099a77c85e91272ae2f9e35b937953 | Only allow a trusted parameter "white list" through. | [
{
"docid": "05ef2248bba57fb93b7f1d567d3715e0",
"score": "0.0",
"text": "def ingredient_params\n params.require(:ingredient).permit(:name, :content, :user_id, :recipe_id)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.79441583",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "f6060519cb0c56a439976f0c978690db",
"score": "0.69592667",
"text": "def permitted_params\n params.permit!\n end",
"title... |
4c2d3ae17ee1211bb59b5dfca4df2349 | Read Tier1 configuration Read Tier1 configuration | [
{
"docid": "7148f59defd364c258a0882150bbd18e",
"score": "0.5090223",
"text": "def read_tier1_0(tier_1_id, opts = {})\n data, _status_code, _headers = read_tier1_0_with_http_info(tier_1_id, opts)\n data\n end",
"title": ""
}
] | [
{
"docid": "97c10267eae8b783e0f794785369eb36",
"score": "0.6312236",
"text": "def read_config_file; end",
"title": ""
},
{
"docid": "49b0e6ee1d434f7fdec5afd912a33549",
"score": "0.60515267",
"text": "def get_config\n\t\tend",
"title": ""
},
{
"docid": "17d2bfd8a14ace267be... |
bc5d585ed2f964692686255cf2d04654 | Block nodes no empty space text node children. Remove them. | [
{
"docid": "4e86777ca893558a99f019425b551806",
"score": "0.8240054",
"text": "def remove_emptytext_below_blocknodes(nodes)\n nodes.each do |node|\n node.children.each {|c| c.unlink if c.text? and c.inner_text =~ /^\\s*$/ }\n end\nend",
"title": ""
}
] | [
{
"docid": "8e95660b859063c81869b2fb01943b60",
"score": "0.7809107",
"text": "def sanitize_children(children)\n children.reject{|node| node.name == \"text\" && node.content.strip.empty?}\n end",
"title": ""
},
{
"docid": "a7c537b328ae9b9ac668a473a80dfd59",
"score": "0.65676683",
... |
4924b452b47021b3a9d270dc03343ef5 | DELETE /factores_reconocimientos/1 DELETE /factores_reconocimientos/1.xml | [
{
"docid": "48cb69a0173bab5f40f0157ac5e4745d",
"score": "0.6521573",
"text": "def destroy\n @factor_reconocimiento = FactorReconocimiento.find(params[:id])\n @factor_reconocimiento.destroy\ndestination = @factor_reconocimiento.area_id ? area_path(@factor_reconocimiento.area_id) : factores_reconoci... | [
{
"docid": "63f979910c34aff7c4dc66372d125815",
"score": "0.714509",
"text": "def destroy\n @factura = Factura.find(params[:id])\n @factura.destroy\n\n respond_to do |format|\n format.html { redirect_to(facturas_url) }\n format.xml { head :ok }\n end\n end",
"title": ""
},
... |
9e788db983e1914484e3939cb74b09b1 | Will return code for help button if there is any help text available for the form. | [
{
"docid": "ff1500858a2d83c4a535a2e9c34e4909",
"score": "0.7324817",
"text": "def dc_help_button(result_set)\n type = result_set.nil? ? 'form' : 'index'\n form_name = CmsHelper.form_param(params) || CmsHelper.table_param(params)\n url = url_for(controller: :dc_common, action: :help, type: type, f: fo... | [
{
"docid": "1cfd8d3e79851c3616cbb6a1a515db63",
"score": "0.69900775",
"text": "def helpFound?()\n return false\n end",
"title": ""
},
{
"docid": "7b7ff8c7b4b25da21b0165ad27052cd5",
"score": "0.69801295",
"text": "def help_not_available?\n failed\n end",
"title": ""
},
... |
6238a3982e442caf27d863c0cb65adcb | POST /complains POST /complains.json | [
{
"docid": "9dcb91b8103c7ad2674166675afcb955",
"score": "0.0",
"text": "def create\n @complain = Complain.new(complain_params)\n @complainant = Complainant.new(complainant_params)\n @crimes = Array.new\n @complain.user_id= current_user.id\n\n Crime.all.each do |comp|\n @c... | [
{
"docid": "a1675ea453112a61c668d7687b0bab47",
"score": "0.6032651",
"text": "def create\n @complaint = current_user.complaints.build(complaint_params)\n\n respond_to do |format|\n if @complaint.save\n format.html { redirect_to @complaint, notice: \"Complaint was successfully created.\... |
a2099a77c85e91272ae2f9e35b937953 | Only allow a trusted parameter "white list" through. | [
{
"docid": "8747ab1719ca246b88267fc683a4a2a1",
"score": "0.0",
"text": "def package_params\n params.require(:package).permit(:package_type, :price, :screens_allowed)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7943618",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "f6060519cb0c56a439976f0c978690db",
"score": "0.69572574",
"text": "def permitted_params\n params.permit!\n end",
"title"... |
3f975b7d73b4cbfb4c6c18f89b7eb657 | removes FIRST 2 elements and RETURNS them both | [
{
"docid": "3f4c1289677af7c0cd6b8f737213cfe0",
"score": "0.0",
"text": "def using_concat(array1, array2)\n array1.concat(array2)\nend",
"title": ""
}
] | [
{
"docid": "013d2ee41b9a39076a396d1e7e6af8db",
"score": "0.7002824",
"text": "def exclude_first something\n # something.drop(1)\n something[1..-1]\nend",
"title": ""
},
{
"docid": "a7106d52d280f79523e9abbe42c492a7",
"score": "0.6979414",
"text": "def all_elements_except_first_3 arr... |
97393a3fdfa5282c85961df95dceb856 | Vendor the patches. The mirrors are unreliable for getting the patches, and the more patches there are, the more unreliable they get. Upstream patches can be found in: | [
{
"docid": "06bfe73d9c2b2eabd977cf45d50c6ae4",
"score": "0.654189",
"text": "def patches\n { :p0 => \"https://gist.github.com/jacknagel/4008180/raw/1509a257060aa94e5349250306cce9eb884c837d/bash-4.2-001-045.patch\" }\n end",
"title": ""
}
] | [
{
"docid": "81759907bbe3a7c05bc503fb3a7b5fee",
"score": "0.72556484",
"text": "def patches\n 'http://rpm5.org/cvs/patchset?cn=16840'\n end",
"title": ""
},
{
"docid": "c8b8986c2ba3c5abaee3bf93e04e814d",
"score": "0.7032688",
"text": "def patches\n { :p0 => \"http://www.thc.org... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "4a4819e5c0b05448901c869307eae4c6",
"score": "0.0",
"text": "def set_event\n @event = Event.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "bd89022716e537628dd314fd23858181",
"score": "0.6163163",
"text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n end",
"title": ""
},
{
"docid": "3db61e749c16d53a52f73ba0492108e9",
"score": "0.6045976",
"text": "def action_hook;... |
e900370103e9fc47ed95203b94cddc77 | POST /boards POST /boards.json | [
{
"docid": "bcfdb55eed9f0a59f404c08f3e99a03e",
"score": "0.0",
"text": "def create\n @board = Board.new(board_params)\n\n if !verify_recaptcha(model: @board)\n render :new\n return\n end\n\n respond_to do |format|\n if @board.save\n format.html { redirect_to board_path(... | [
{
"docid": "a66ecc3ecfeb6393f56e8441ec57aa11",
"score": "0.75374013",
"text": "def create\n @board = current_user.boards.new(board_params)\n if @board.save\n render :show, status: :created\n else\n render json: @board.errors, status: :unprocessable_entity\n end\n end",
"title"... |
fa516da6cc7127e4b5a9a2c4f98dcc1e | Returns if the key is currently available | [
{
"docid": "ad68b3888eef5869c5c77eadaadc0a7e",
"score": "0.0",
"text": "def isAlive(currentTime: Time.now)\n currentTime <= self.diesAt\n end",
"title": ""
}
] | [
{
"docid": "de8274f0e1ba581533009e0e574d5c82",
"score": "0.84349513",
"text": "def available?(key); end",
"title": ""
},
{
"docid": "ed0f639dbf1725ee979b8a6d64a13cb2",
"score": "0.82314837",
"text": "def key_available?\n download_key\n !@key.nil?\n end",
"title": ""
... |
ddfd346f746644cf283e8ab915572aff | Creates and initializes a new instance of the Recommendations class. | [
{
"docid": "b716e2eab6b0cce582efd27c6177f8a8",
"score": "0.0",
"text": "def initialize(client)\n @client = client\n end",
"title": ""
}
] | [
{
"docid": "7a6640b9c0d9ce945a12b1c77163c931",
"score": "0.68754315",
"text": "def recommendations\n check_preference_setup \n check_last_played_time\n add_personality_recommendations\n\n @recommendations\n end",
"title": ""
},
{
"docid": "4c2bdd42746938745e7d4d4e6ddd3a2e",
... |
b30d99069058f240937e35fbabc0b0b5 | GET /pdf_files/1 GET /pdf_files/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "3e03c6dbbc429c3cce9ded09739394b5",
"score": "0.70409316",
"text": "def show\n @pdf_flyer = PdfFlyer.find(params[:id])\n @path_to_pdf = File.join '../pdf',@pdf_flyer.filename\n \n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @pdf_flye... |
14c8ed1de1c18c4d56d4bbcdb5d91238 | input [1,2,9] output [1,3,0] | [
{
"docid": "03c189003c8a9b5b1c2c4a31b8bdb960",
"score": "0.0",
"text": "def increment_big_int(array)\n carry = 1\n\n for i in (array.length - 1).downto(0)\n break if carry == 0\n\n array[i] += carry\n\n if array[i] == 10\n array[i] = 0\n else\n carry = 0\n end\n end\n\n if c... | [
{
"docid": "80c1b4853820a8dc99ce42f6fafec60c",
"score": "0.6450479",
"text": "def zeroFront(arr)\n\toutput = []\n\tarr.each do |num|\n\t\tif num == 0\n\t\t\toutput.insert(0, 0)\n\t\telse\n\t\t\toutput << num\n\t\tend\n\tend\n\toutput\nend",
"title": ""
},
{
"docid": "96339ee6f6cafada42e05c46... |
4c501c4bd67d5ffa2fe9fe08e19f9a63 | Returns [String] of job ids. | [
{
"docid": "ce075b055865bd71ba78938d8e8ca98a",
"score": "0.0",
"text": "def add_pool_members pool_names, member_lists\n response = post(\"http://#{@host}/loadbalancers/tenant/#{@tenant}/pools\",\n {\n :pool =>\n (pool_names.zip me... | [
{
"docid": "765fe5c24c6169915f43bdbfe675dcd7",
"score": "0.7212232",
"text": "def get_ids_of_all_jobs\r\n result = [id, parent_job_id].compact\r\n result << Job.where([\"parent_job_id in (?)\",result]).select(:id).collect(&:id)\r\n result.flatten.uniq\r\n end",
"title": ""
},
{
"do... |
d88ce3d8d3a1e5048fc8328568fee20e | Song and Artist: Song artist= invokes Artistadd_song to add itself to the artist's collection of songs (artist has many songs) | [
{
"docid": "87fab76c2a64e3e36e3cc474a5a86708",
"score": "0.741724",
"text": "def artist=(artist)\n\n\t\tif artist == nil\n\t\t\t@artist = artist\n\t\telsif artist != nil\n\t\t\t@artist = artist\n\t\t\tartist.add_song(self)\n\t\tend\n\tend",
"title": ""
}
] | [
{
"docid": "c62b3a1ab98959174430082636268809",
"score": "0.8810468",
"text": "def add_song(song)\n #associates a song to the artist's collection\n @songs << song\n song.artist = self\n end",
"title": ""
},
{
"docid": "41ed7e5961780040ab4fe8d145712c13",
"score": "0.8732829",
... |
a6527a2ee7f77ed7a93a4b65ae76ef25 | Obtain an InputSet object, used to define inputs for an execution of this Choreo. | [
{
"docid": "b9821dfdbef6fbebdff0253bbfacd3e2",
"score": "0.0",
"text": "def new_input_set()\n return EditNewsletterInputSet.new()\n end",
"title": ""
}
] | [
{
"docid": "d8eb34cfc5a1e737977f7023d4849c46",
"score": "0.6741255",
"text": "def new_input_set()\n return CreateObjectInputSet.new()\n end",
"title": ""
},
{
"docid": "7c0d7c433cd4eb8e36bdc3a383e9ec33",
"score": "0.65807736",
"text": "def new_input_set()\n return Ru... |
abe4f9490de612db3f0b53f6b1b39144 | This method generates an array of all moves that can be made after the current move. | [
{
"docid": "6d06f207ee24afb783accc0acc409413",
"score": "0.0",
"text": "def children\n possible_nodes = []\n\n # iterate through all positions that are empty?\n # for each empty position\n get_empty_pos.each do |pos|\n # create a node by duping the board\n duped_board = @board.dup\... | [
{
"docid": "ab6b87d439d2ac15bdfbf3aebcff6da0",
"score": "0.7377273",
"text": "def generate_moves\n @delta.each do |step|\n (1..7).each do |i|\n new_pos = [@pos[0] + step[0] * i, @pos[1] + step[1] * i]\n if valid_coord?(new_pos)\n @move_list << new_pos\n break if @... |
ec2a1644fe959e67d77264a05b600e50 | Returns TWO values, hocr and textonly_pdf , both Files | [
{
"docid": "d40ff7abbed826720dcc07a345786aa9",
"score": "0.0",
"text": "def tesseract_extract_ocr_from_local_file(input_path)\n unless tesseract_languages.present?\n raise TypeError.new(\"Work languages don't include any we can recognize: #{asset.parent.language.inspect}. We need one of #{TESS_L... | [
{
"docid": "170ecddfd8370dd74f88f8ac68343106",
"score": "0.6677811",
"text": "def pdf_file\n docs='';self.pages.each {|p| docs+=' '+p.path(:org)}\n pdf=Tempfile.new([\"cd_#{self.id}\",\".pdf\"])\n java_merge_pdf=\"java -classpath './java_itext/.:./java_itext/itext-5.3.5/*' MergePDF\"\n res=... |
d3e402b15fccdd053cc70f78947d9714 | Variable de clase, es la misma para cada instancia de esta clase, y se puede cambiar directamente. No hace falta crear el objeto monedasParaSaquear | [
{
"docid": "c4a077b760bc6f67749ac493071e4979",
"score": "0.0",
"text": "def initialize(victima:)\n @victima = victima\n end",
"title": ""
}
] | [
{
"docid": "5987163a0d20916007f84cb8a21ef4c3",
"score": "0.6642106",
"text": "def casos_de_prueba_ejercicio_uno\n un_hombre = Hombre.new\n un_hombre.caminar\n otro_hombre = Hombre.new\n otro_hombre.hablar\n un_sapo= Sapo.new\n un_sapo.saltar\n un_aguila= Aguila.new\n un_aguila.vo... |
b14fd8d1fc38816ba649118816314471 | GET /items GET /items.json | [
{
"docid": "9a7ee31c18f81cbb0c023779fb7c36ff",
"score": "0.0",
"text": "def index\n query = params[:query].to_s.strip\n per_page = Item.default_per_page\n @count = {}\n if user_signed_in?\n if current_user.has_role?('Librarian')\n if request.format.text?\n per_page = 655... | [
{
"docid": "54748291efc0ecbbc050090a2600e1b8",
"score": "0.79562956",
"text": "def show\n @items = Item.find(params[:id])\n render json: @items\n end",
"title": ""
},
{
"docid": "6edd436821e076697f9a71344cdd724b",
"score": "0.7546286",
"text": "def items\n\t\tresponse = self.g... |
da38e2375e958ed6145965419976f2a0 | Generate a truncer function name for expression of bit range +rngI+ using +rngS+ slice. | [
{
"docid": "6d623401752ae699742582278cbcaba0",
"score": "0.771878",
"text": "def truncer_name(rngI,rngS)\n # Convert the ranges to arrays.\n rngI,rngS = self.r2a(rngI), self.r2a(rngS)\n # Generate the name.\n return \"truncer_#{rngI[0]}_#{rngI[1]}_#{rngS[0]}_#... | [
{
"docid": "225740ff0018d52260f0a5e4772b7b67",
"score": "0.57288855",
"text": "def dump\n # Ensure there is only one truncating function per range.\n @truncers.sort!.uniq!\n # Generate the resulting code.\n codeT = \"\"\n @truncers.each do |(rngI,rn... |
ffa8c50a628b58a36f5ea14942e53a51 | GET /resort_locations/new GET /resort_locations/new.xml | [
{
"docid": "48e68d64658f352453fa25db5f97e8cf",
"score": "0.7105419",
"text": "def new\n @resort_location = ResortLocation.new\n\n respond_to do |format|\n format.html {render :layout => 'admin_layout'}\n format.xml { render :xml => @resort_location }\n end\n end",
"title": ""
... | [
{
"docid": "e079526edc36fbe4a6016190d3acb1a7",
"score": "0.70916986",
"text": "def new\n @location = Location.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render xml: @location }\n end\n end",
"title": ""
},
{
"docid": "f29ec049d67a0c7fc415b... |
fb0076f1aa66722bc6cdcd484b5206ae | Manage combining results on files level | [
{
"docid": "247a44ebd919242362e0a0380c0c89c7",
"score": "0.70917976",
"text": "def combine_result_sets(combined_results, result)\n results_files = combined_results.keys | result.keys\n\n results_files.each_with_object({}) do |file_name, file_combination|\n file_combination[file_na... | [
{
"docid": "7cd02b7acfaaaab4d7d7bfd9765a9ee0",
"score": "0.7306609",
"text": "def combine_files\n @files.each_with_index do |f, i|\n @edi_log.write \"Combining #{f}...\"\n @file_set << File.basename(f)\n\n File.foreach(f) do |line|\n case line[0..1]\n when 'BH'\n ... |
00c38fb720bbfc52be76deae05eab017 | override unary plus and minus operators | [
{
"docid": "b19dd1dbcf40157eda0f83fd746e3628",
"score": "0.0",
"text": "def +@\n @speed += 10\n end",
"title": ""
}
] | [
{
"docid": "56bc3a50ef64a77ef454ab206cbce6c9",
"score": "0.87052554",
"text": "def unary_plus; end",
"title": ""
},
{
"docid": "56bc3a50ef64a77ef454ab206cbce6c9",
"score": "0.87052554",
"text": "def unary_plus; end",
"title": ""
},
{
"docid": "bf14bb10303be7bc1a03e272e3c2... |
3d249b11d970d19247a9fe2d245f8355 | middle of the atlantic that way we get a blue map of nothing | [
{
"docid": "dcbe8610f0ff3ffa56138c317dc73ddd",
"score": "0.0",
"text": "def default?\n self.longitude == -54.667969 && self.latitude == 29.242951\n end",
"title": ""
}
] | [
{
"docid": "6e7168826b6e6fb8dcce9676f9c20bd4",
"score": "0.6540807",
"text": "def monsters_start_at;\t[-1, map_size[1]/2]\t\tend",
"title": ""
},
{
"docid": "3841fa739bdbbdcd283e96225073b9fb",
"score": "0.6139911",
"text": "def north\n map.at(x:, y: y - 1)\n end",
"title"... |
b79214d5487da89a6ba8a2276b865e04 | Updates all +touchable_pages+ Called after_update | [
{
"docid": "39c5551fa97d7d50db9e0234476340fb",
"score": "0.768466",
"text": "def touch_touchable_pages\n return unless respond_to?(:touchable_pages)\n\n touchable_pages.each(&:touch)\n end",
"title": ""
}
] | [
{
"docid": "1e1195310496fa9b62fb5c81da319755",
"score": "0.6897044",
"text": "def touch_pages\n # TODO -- currently touches page with home slug only. \n # create a method to specify which pages should be re-cached\n # account.pages.each{|page| page.touch}\n account.pages.find_by_slug... |
c71a8f3bb46fc5eae97e322dc294ff9e | Parsing HTML page with Nokogiri | [
{
"docid": "4024c2a638d5dcec749f85b6d586d411",
"score": "0.0",
"text": "def crawler_data\n @crawler_data ||= Nokogiri::HTML(crawler_page, nil, 'utf-8')\n end",
"title": ""
}
] | [
{
"docid": "7e2203b9c0861257e05b8c2c25bc507a",
"score": "0.8035875",
"text": "def parse_page\n @doc = Nokogiri::HTML(@html)\n end",
"title": ""
},
{
"docid": "13305efd5d2d2475aef3dbed2b42601d",
"score": "0.729757",
"text": "def nokogiri\n Nokogiri::HTML(html)\n end",
... |
b4681a014561096bf5dbd43a9b02cc91 | GET /rooms/1 GET /rooms/1.xml | [
{
"docid": "11db0bc4a77f487c6852a17c77333c80",
"score": "0.0",
"text": "def show\n if params[:id] == \"admin\"\n admin\n render :action => 'admin'\n else\n @room = Room.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { rend... | [
{
"docid": "3dee534513f65f68aa0b1c6be198dd1d",
"score": "0.73151594",
"text": "def index\n @rooms = Room.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @rooms }\n end\n end",
"title": ""
},
{
"docid": "34980243de88436c3f988bceb... |
c6d6b71e7a84899972f08dd545533853 | Open threads and pipes to read stdout and stderr from the PowerShell manager, then continue to read data from the manager until either all data is returned or an error interrupts the normal flow, then return that data. | [
{
"docid": "8c828f551332b1b5cb4aad2bfc90c779",
"score": "0.70474315",
"text": "def read_streams\n pipe_done_reading = Mutex.new\n pipe_done_reading.lock\n # TODO: Uncomment again when implementing logging\n # start_time = Time.now\n\n stdout_reader = Thread.new { drain_pipe_unti... | [
{
"docid": "280e1cda8efa3a584ba5a347249ff70b",
"score": "0.7192178",
"text": "def exec_read_result(powershell_code)\n write_pipe(pipe_command(:execute))\n write_pipe(length_prefixed_string(powershell_code))\n read_streams\n # If any pipes are broken, the manager is totally hosed\n #... |
7b2b7be7a15feeeb016a61cb73399986 | Returns the number of votes the work has. | [
{
"docid": "e483ab53a3c8221c60c9d870dd508382",
"score": "0.78840744",
"text": "def get_vote_count\n\t\treturn calculate_vote_count\n\tend",
"title": ""
}
] | [
{
"docid": "bac45191540d76a8ba32bf4b7396e7aa",
"score": "0.8131612",
"text": "def votes_count\n votes.size\n end",
"title": ""
},
{
"docid": "0496d21fd7c9e2a75af9fcb9ee671413",
"score": "0.81226444",
"text": "def total_votes\n num_of_votes = self.votes.count\n return nu... |
13ab7b9040870b1a4a521a3112e46d57 | end of the initialize | [
{
"docid": "e3a0870f82535a8844fda7539cc704b2",
"score": "0.0",
"text": "def usage\r\n \"#{program_name} CASE [LOG FILES...]\"\r\n end",
"title": ""
}
] | [
{
"docid": "a747cf4388fb3d14718cf9dda73c555f",
"score": "0.8400053",
"text": "def initalize; end",
"title": ""
},
{
"docid": "a747cf4388fb3d14718cf9dda73c555f",
"score": "0.8400053",
"text": "def initalize; end",
"title": ""
},
{
"docid": "748bd7b5149abf972e7b72dfbb61e623... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "80ef0ecbe551ac91917acb54f0606681",
"score": "0.0",
"text": "def set_list_document\n @list_document = ListDocument.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... |
d804663b7e6daaa2cc52085ce6a42aa1 | gives to ActiveRecord model geneaogy capabilities. Modules UtilMethods QueryMethods IneligibleMethods AlterMethods and SpouseMethods are included | [
{
"docid": "cd9dfc70f534273296899899cc0320c4",
"score": "0.6173237",
"text": "def has_parents options = {}\n\n include Genealogy::UtilMethods\n include Genealogy::QueryMethods\n include Genealogy::ComplexQueryMethods\n include Genealogy::IneligibleMethods\n include Genealogy::Al... | [
{
"docid": "af61d4734dcbed26ae094af8ab1cb7c9",
"score": "0.60978776",
"text": "def active_record; end",
"title": ""
},
{
"docid": "d3de47dd146c2e20e02b8f476409ba04",
"score": "0.60367626",
"text": "def instrument_additional_methods\n instrument_save_methods\n instru... |
43d4edf8fb4f3609f719a07ca9f73705 | Update an Existing Rule Modifies existing firewall rule in a firewall section. Updating firewall rule in a section modifies parent section entity and simultaneous update (modify) operations on same section are not allowed to prevent overwriting stale contents to firewall section. If a concurrent update is performed, HT... | [
{
"docid": "eab125f1c9ae67ae8b78ce9c97a2bc61",
"score": "0.6133443",
"text": "def update_rule_with_http_info(section_id, rule_id, firewall_rule, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: ServicesApi.update_rule ...\"\n end\n # ver... | [
{
"docid": "b6ebcce548d1cf4e4cf8e3ea10d8358f",
"score": "0.78586847",
"text": "def update_rule(section_id, rule_id, firewall_rule, opts = {})\n data, _status_code, _headers = update_rule_with_http_info(section_id, rule_id, firewall_rule, opts)\n return data\n end",
"title": ""
},
{
... |
6173dbb07dc3ee82c517c3caa479f69b | TODO: move this to the importer, or a service object | [
{
"docid": "95ad2f51f1a324c34204f80f2ceb9d40",
"score": "0.0",
"text": "def update_from_json(json)\n self.check_features\n self.contributor = self.get_contributor json['owner']['login']\n self.deleted \t\t \t= false\n self.description = json['description']\n self.followers ... | [
{
"docid": "8da3c4aee7747aee18b0380638e0dced",
"score": "0.6927181",
"text": "def importer; end",
"title": ""
},
{
"docid": "c13bd4d8a02ffc8c7e3ac5e1d4f98f8e",
"score": "0.665343",
"text": "def import\n\n end",
"title": ""
},
{
"docid": "be4b78a0e2cdcde78e911fa7e5d26b94"... |
1d7b4d2251a61e34c1484c94000fbdf2 | BaseItemComparer with empty list | [
{
"docid": "fb567b0b0b7b544cd733f402040402d2",
"score": "0.7927133",
"text": "def test_emptyBaseItem\n c = BaseItemComparer.new()\n new_list = [].sort{|x,y| c.compare(x,y)}\n return new_list.size == 0\n end",
"title": ""
}
] | [
{
"docid": "6d7e63e317c420f0e3a2d964bd83d716",
"score": "0.75281686",
"text": "def test_emptyItem\n c = ItemComparer.new()\n new_list = [].sort{|x,y| c.compare(x,y)}\n return new_list.size == 0\n end",
"title": ""
},
{
"docid": "e2b1b3440a64a03d738d7720ec5520ea",
"score": "0.70... |
1801b584648629aae56e28a3c9015f4a | This method performs the unit testing for dex2jar | [
{
"docid": "d5c31a05333df27193b2d27f86610b1d",
"score": "0.73538625",
"text": "def test_dex2jar_output\n apk_name = File.basename(\"#{ENV['APK']}\").sub(/.apk/, \".jar\")\n assert File.exists?(\"#{ENV['OUTPUT_DIR']}/dex2jar_output/#{apk_name}\"), \"The output of Dex2Jar (JAR File) was not found!\"... | [
{
"docid": "6535580784844a8322897e76fce15cf9",
"score": "0.5351369",
"text": "def testBuild2LevelsDependency\n setRepository('DeliverablesProcessDependency') do |iRepoDir|\n runFSCMS(['Build', '--', '--target', 'TestType/TestID3/0.1/TestDeliverable'])\n lBuiltFileName = \"#{iRep... |
e5f11a474001a6ffb47f6f81ff9974d5 | where player taken to when they choose "right" at the start | [
{
"docid": "8f1a574876a33437f7da7a3af46a5ee9",
"score": "0.0",
"text": "def right_room\n puts \"Stuff happens, you have to react.\"\n puts \"Do you stay or do you flee?\"\n\n print $prompt\n choice = $stdin.gets.chomp\n\n if choice == \"stay\"\n dead(\"Dude, you shoulda ran when you had the chan... | [
{
"docid": "a45399caacaae0090ac182498faa2b6d",
"score": "0.7190863",
"text": "def right\n GameData.player.right\n GameData.vehicle.right\n end",
"title": ""
},
{
"docid": "aa944a9e95e115dcb1357b7653544aea",
"score": "0.6648933",
"text": "def play_game_by_right\n right = win... |
3a94b322a5f7461b5d68c54a39c21823 | The version for this item in the cache. This is the digest of downloaded file and the URL where it was downloaded from. This method is called before clean but after fetch. Do not ever use the contents of the project_dir here. | [
{
"docid": "de073f84cce8f005aff8a7d7e1c7acbd",
"score": "0.7753553",
"text": "def version_for_cache\n \"download_url:#{source[:url]}|#{digest_type}:#{checksum}\"\n end",
"title": ""
}
] | [
{
"docid": "4c0151130157b0e8d49a083fe09bc101",
"score": "0.6987499",
"text": "def real_version\n @real_version ||= fetcher.version_for_cache || version\n end",
"title": ""
},
{
"docid": "5fe1c241f5198d4f2894329fbc04f2eb",
"score": "0.6927229",
"text": "def latest_version\n ... |
a9519cdb6e6fa106c594614821f9f999 | Create a new data pipeline wit the given name and return the id | [
{
"docid": "9b54809994ad447a23f76c250e7e053e",
"score": "0.77734554",
"text": "def create_pipeline(name, uniqueId, description) \n output = call_with_retry(@retries) {\n @client.create_pipeline(:name => name,\n :unique_id => uniqueId,\n ... | [
{
"docid": "8eb93a65b80fbebffbd0897508b2d867",
"score": "0.78001183",
"text": "def create(name, description, unique_id = SecureRandom.uuid)\n resp = aws.create_pipeline(name: name, unique_id: unique_id)\n resp.pipeline_id\n end",
"title": ""
},
{
"docid": "6e3380279646eaf324471c... |
2a1b920349e0e6d4a266f92129f2d142 | Enqueues a reply, to be sent. | [
{
"docid": "fdb975f53ec8e89750134829d263c259",
"score": "0.72031265",
"text": "def queue_reply(target, reply)\n @reply_queue.enqueue('target' => target, 'reply' => reply)\n end",
"title": ""
}
] | [
{
"docid": "d941f00492f3151ac6619f174316e97d",
"score": "0.671425",
"text": "def reply_queue\n queue('', exclusive: true)\n end",
"title": ""
},
{
"docid": "68ed4ee6577f04face68b3e9e4affe2d",
"score": "0.65740764",
"text": "def send(msg)\n @queue.queue(msg)\n end",
... |
7286bcf033ed926ad4bf95a67394b31d | This function will create a LinearRing geometry representing a square with the given origin and side | [
{
"docid": "1d8e0c84c82cacd5d1b90464168ec0fb",
"score": "0.7791928",
"text": "def create_square_linear_ring(xoffset, yoffset, side)\n cs = Geos::CoordinateSequence.new(5,2)\n cs.set_x(0, xoffset)\n cs.set_y(0, yoffset)\n cs.set_x(1, xoffset)\n cs.set_y(1, yoffset + side)\n cs.set_x(2, ... | [
{
"docid": "66aa085ddb0096ec4e871a74a432562a",
"score": "0.76275885",
"text": "def create_square_linearring(xoffset, yoffset, side)\n # We will use a coordinate list to build the linearring\n cl = Geos::DefaultCoordinateSequence.new()\n cl.add(Geos::Coordinate.new(xoffset, yoffset))\n cl.ad... |
c203af7fe1abce14ee5a7bcbaed77c21 | This method gives permission to the parameters which can be saved in the database. | [
{
"docid": "8f68ff15100ae7673de9245f92e51c0e",
"score": "0.0",
"text": "def set_params\n params.require(:challenge).permit(:title, :description, :user_id)\n end",
"title": ""
}
] | [
{
"docid": "e7fa55c996c89a154f6ff748543f9ee3",
"score": "0.6888833",
"text": "def define_permissions\n end",
"title": ""
},
{
"docid": "0fe3a5d5403fefb57f9b5225ce8186da",
"score": "0.68077993",
"text": "def permission_params\n params.require(:permission).permit(:resource_type, :r... |
e8fea7c864ab493bf3dc3bd1f6683c8c | Returns validation summary due to "Confirm Password" invalid input. | [
{
"docid": "3800cb181a6283ac58269a3a5a916045",
"score": "0.5871213",
"text": "def confirm_new_password_validation_label\n $tracer.trace(__method__)\n return ToolTag.new(span.id(\"/pwConfirmCompareValidator$/\"), __method__)\n end",
"title": ""
}
] | [
{
"docid": "c7b50fc242a1433b135afbae37d02a8e",
"score": "0.6814321",
"text": "def password_confirmation_failure\n errors.add(:password, \"が確認用と一致しません\")\n end",
"title": ""
},
{
"docid": "7e6d0e0c277cf7111975d7e457a1eaae",
"score": "0.6707328",
"text": "def password_errors(para... |
f9b73fad02d1de4f65de919fd8b68f6c | GET /issues/1 GET /issues/1.json | [
{
"docid": "f7ccee1c34616b0af582dd0fcc834f69",
"score": "0.0",
"text": "def show\n\tend",
"title": ""
}
] | [
{
"docid": "a301822fbe1d079022fa7529293c5db9",
"score": "0.7634282",
"text": "def index\n a = URI.parse(\"https://api.github.com/repos/nnluukhtn/employment_bot/issues?state=all\").read\n @gitissue = JSON.parse(a)\n end",
"title": ""
},
{
"docid": "4c7f71ef1304137ac2477268b7ff9966",
... |
33a3c1596ebe37caad2cf2184c7bc1dd | PUT /companies/1 PUT /companies/1.xml | [
{
"docid": "817dc6d5392a1e7c380b309d28f3a4fa",
"score": "0.0",
"text": "def update\n @company = Company.find(params[:id])\n @company_paths = @company.alt_paths\n @company_domains = @company.email_domains\n respond_to do |format|\n if @company.update_attributes(params[:company])\n ... | [
{
"docid": "75257bcacbc16f7963754f7d8ca9fb70",
"score": "0.7225685",
"text": "def update\n @company = Company.find(params[:id])\n\n respond_to do |format|\n if @company.update_attributes(params[:company])\n \n \n format.xml \n else\n \n format.xml { render :... |
cbd35aa340fb815657b4ac072af2391e | Run command in build directory | [
{
"docid": "94c7bbf5df2ed8553b8e902e76571bed",
"score": "0.65521944",
"text": "def run_in_build(*args)\n in_build do |source_dir|\n run_command(\"cmake\", \"-G\", select_generator, source_dir) unless File.exist?(\"CMakeCache.txt\")\n args.push(\"cmake\", \"--build\", \".\") if args.empty?\n ar... | [
{
"docid": "eb53cf741232069bbb8f1d99d503c8a7",
"score": "0.74351364",
"text": "def build\n cd_and_sh( pkg_dir, build_commands )\n end",
"title": ""
},
{
"docid": "f5f806bfbcf22ee3911e0e7fa579d7a2",
"score": "0.73462105",
"text": "def build\n system(\"make build\", :chdir... |
65e2354c7d98ef83775b34a988fe2751 | Updates or deletes the unique permission for a given resource to not have the given modes Example: public.may_not(:update, widget) | [
{
"docid": "8649aa74869746fffce8bb79c59490c3",
"score": "0.71070445",
"text": "def may_not(*args)\n p = permissions.for(args.pop).first\n return Authorize::Permission::Mask[] unless p\n p.mask -= Authorize::Permission::Mask[*args].complete\n p.mask.empty? ? p.destroy : p.save\n p.mask.com... | [
{
"docid": "0c139f1cd878c164f3816036d044e693",
"score": "0.59126276",
"text": "def deny()\n if update_attributes({:level => Membership::LEVELS[:denied]})\n true\n else\n reload\n false\n end\n end",
"title": ""
},
{
"docid": "25a077df7e927a032d30c0e9ab108487",
"s... |
293d8bb5be38dda7bbd35a5b5acc61e0 | PUT /short_supply_registrations/1 PUT /short_supply_registrations/1.json | [
{
"docid": "5ec586a3f13ae8cac3a541895ba5fbfb",
"score": "0.66965246",
"text": "def update\n @short_supply_registration = ShortSupplyRegistration.find(params[:id])\n @short_supply_registration.status = \"true\"\n respond_to do |format|\n if @short_supply_registration.save\n format.js... | [
{
"docid": "acff0c30067995f6c00c81c1b27d0e5d",
"score": "0.6904525",
"text": "def create\n @short_supply_registration = ShortSupplyRegistration.new(params[:short_supply_registration])\n @short_supply_registration.status = \"false\"\n\n respond_to do |format|\n if @short_supply_registration... |
21023459b0f7a9e21b8304bb0f20bc45 | Public: Render a 500 error. error The 500 error object. | [
{
"docid": "737d188bf0e576ab2c007e85890ba93d",
"score": "0.6739237",
"text": "def handle_fatal_error(error)\n render_error :internal_server_error, error.message\n end",
"title": ""
}
] | [
{
"docid": "3cb97a8de8fcaaef43960576d77ffb7a",
"score": "0.82705355",
"text": "def render_500_error message: I18n.t('errors.e_500')\n render_error message: message, status_code: 500\n end",
"title": ""
},
{
"docid": "93cb5ac2e39b7d4cf6e30f9cb4a82346",
"score": "0.8229913",
"text"... |
c9c90c252d8f3492c9c2ab33099432a7 | PUT /offices_attachments/1 PUT /offices_attachments/1.json | [
{
"docid": "2dc8b964f727875208fb4a671d4c1dc0",
"score": "0.7608304",
"text": "def update\n @offices_attachment = OfficesAttachment.find(params[:id])\n\n respond_to do |format|\n if @offices_attachment.update_attributes(params[:offices_attachment])\n format.html { redirect_to @offices_a... | [
{
"docid": "29ed0c20269b224f5e9d29c3d388b237",
"score": "0.66354585",
"text": "def update\n respond_to do |format|\n if @offer_attachment.update(offer_attachment_params)\n format.html { redirect_to @offer_attachment, notice: 'Offer attachment was successfully updated.' }\n format.j... |
5450cbb3b3500277bea3c0be02b24086 | on array i, for each jth component add the highest vaule of the jth and j+1th component of the i1th row. Store this new array and repeat this for the i+1 row. | [
{
"docid": "fe1b5ab3b1777d8dbfdfd63664c6f40d",
"score": "0.0",
"text": "def biggest(x,y)\n if x <= y\n return y\n else\n return x\n end\nend",
"title": ""
}
] | [
{
"docid": "9194a70d556bbaa3bdc648a43836fe15",
"score": "0.65227866",
"text": "def fast_lcss(arr)\n i_arr = []\n biggest = 0\n max_sub_arr = []\n arr.length.times do |x|\n arr.map do |ele1|\n i_arr += [ele1]\n sum = i_arr.inject(0) do |a, b|\n a + b\n end\n max_sub_arr ... |
5d1566b418376f7d66829c2899a677f0 | Multiples of 3 and 5 Write a method that searches for all multiples of 3 or 5 that lie between 1 and some other number, and then computes the sum of those multiples. For instance, if the supplied number is 20, the result should be 98 (3 + 5 + 6 + 9 + 10 + 12 + 15 + 18 + 20). You may assume that the number passed in is ... | [
{
"docid": "ff3f0d18e0bfaae3c4cc750e58ff1f0b",
"score": "0.0",
"text": "def multiple(number, divisor)\n number % divisor == 0\nend",
"title": ""
}
] | [
{
"docid": "0a3ecec35cc154a21f80992c6bf26c30",
"score": "0.8631803",
"text": "def multiples_of_3_or_5_sum(number)\n (1..number).select {|x| x % 3 == 0 || x % 5 == 0}.reduce(:+)\nend",
"title": ""
},
{
"docid": "ba33fc5c7b8d95739417b6e09d5230be",
"score": "0.85465384",
"text": "def m... |
7cf375008ed51529f6059a0c1613478f | Return a Sequel::SQL::BooleanExpression created from this array, matching none of the conditions. | [
{
"docid": "e15ff302d05c487ba5131c3b7bc19380",
"score": "0.6682129",
"text": "def sql_negate\n sql_expr_if_all_two_pairs(:AND, true)\n end",
"title": ""
}
] | [
{
"docid": "44c3b7eb5f88a274bdecf8ab31751639",
"score": "0.73321307",
"text": "def ~\n ::Sequel::SQL::BooleanExpression.from_value_pairs(self, :OR, true)\n end",
"title": ""
},
{
"docid": "44c3b7eb5f88a274bdecf8ab31751639",
"score": "0.73321307",
"text": "def ~\n ::Sequel::SQL... |
758eac923c73b0b52b9af6d996188d39 | POST /cars POST /cars.json | [
{
"docid": "93f66d0bd961536408e3e47648223fb7",
"score": "0.69487315",
"text": "def create\n @car = Car.new(car_params)\n\n respond_to do |format|\n if @car.save\n format.html { redirect_to @car, notice: 'Car was successfully created.' }\n format.json { render :show, status: :cre... | [
{
"docid": "2acf3008094f5840bfcbed5a32367782",
"score": "0.7440052",
"text": "def create\n @car = Car.new(car_params)\n\n if @car.save\n render json: @car, status: :created, location: @car\n else\n render json: @car.errors, status: :bad_request\n end\n end",
"title": ""
},
... |
5bb8fad8220a9ff24f264fbb57088503 | converts inputtime to hour objects input userprovided time string value output range of hour objects | [
{
"docid": "653dfafc250ad9457d5faa3733c12564",
"score": "0.621115",
"text": "def parse_times( times )\n case times\n when /^\\s*any\\b/i\n Hour.new(\"12 AM\")..Hour.new(\"11 PM\")\n when /^\\s*before (\\d+ [AP]M)\\b/i\n Hour.new(\"12 AM\")..Hour.new($1)\n when /^\\s*after (\\d+ [AP... | [
{
"docid": "d9bdfd254c0d2218463116f916498361",
"score": "0.66663027",
"text": "def change_time(hour,min)\n Time.strptime(\"#{hour}:#{min}\", \"%H:%M\")\n end",
"title": ""
},
{
"docid": "5f92428c0de09dba7514f48457077fea",
"score": "0.6566411",
"text": "def generic_forecast_ho... |
039c2bc4bf12593583c69b8c4e234669 | Get an AWS S3 log endpoint Get the S3 for a particular service and version. | [
{
"docid": "73139f3541972fd9f7e6fee167f1ea38",
"score": "0.7056645",
"text": "def get_log_aws_s3(opts = {})\n data, _status_code, _headers = get_log_aws_s3_with_http_info(opts)\n data\n end",
"title": ""
}
] | [
{
"docid": "527cd09b33192f479809cc40f5a3a371",
"score": "0.7186516",
"text": "def get_log_aws_s3_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: LoggingS3Api.get_log_aws_s3 ...'\n end\n # unbox the parameters from the hash... |
1d5fd1e0a9b84cbae503cfb1b8f5dfa1 | Work with a form in the layout. | [
{
"docid": "25ee2dbd338d67a32101b5e9ea2fa370",
"score": "0.59476334",
"text": "def with_form\n form = Form.new(page_config, sequence, nodes.length + 1)\n yield form, page_config\n @nodes << form\n self\n end",
"title": ""
}
] | [
{
"docid": "b3b09a9c9c1a6edc630c5ca12336afc3",
"score": "0.7008629",
"text": "def set_form\n end",
"title": ""
},
{
"docid": "4c5ddadeffb8658af85b4d31d78c26f0",
"score": "0.68908256",
"text": "def form; end",
"title": ""
},
{
"docid": "4359f17cccd1b44ee098eeaaa38305d9"... |
90becbf4033d36ae098f78bad94f66a0 | Convert collection to an array of strings. | [
{
"docid": "a59ee7b8d5eafc36bd6a62aca0a8418c",
"score": "0.58136106",
"text": "def to_a\n self.collect { |c| c.name }\n end",
"title": ""
}
] | [
{
"docid": "c8792bd4471c4e634c95b9fa414446df",
"score": "0.70407873",
"text": "def return_string_array(array)\n array.collect do |element|\n element.to_s\n end\nend",
"title": ""
},
{
"docid": "8c02bc9da1cad54406886893a58c9514",
"score": "0.65622526",
"text": "def transform_stri... |