query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
893875a46b992d879cac3d894a19e162 | add_header sets the required boilerplate for a Google Apps group. | [
{
"docid": "51ca62a5e21148dbeec157a10f9a4244",
"score": "0.5512722",
"text": "def add_header\n @document.root = Atom::XML::Node.new('atom:entry')\n\n Atom::XML::Namespace.new(@document.root, 'atom', 'http://www.w3.org/2005/Atom')\n Atom::XML::Namespace.new(@document.root, 'apps', 'h... | [
{
"docid": "a1555ce8ef44fcc6feb58a8f128cf604",
"score": "0.6639705",
"text": "def add_headers; end",
"title": ""
},
{
"docid": "664f5ff515679feea140f7f6b19127da",
"score": "0.5950132",
"text": "def add_headers(directory, relative_directory, group, app_target, make_public)\n\theader_f... |
1165a545abc7aede204444ff423ebd48 | Initialize a new section | [
{
"docid": "562dce878190f9ad24d2be74174c341a",
"score": "0.0",
"text": "def initialize(name, items, options={})\n @name = name\n @items = items\n @options = options\n end",
"title": ""
}
] | [
{
"docid": "30406680f206c6b22ad65b16ec26ca47",
"score": "0.8481307",
"text": "def init_section; end",
"title": ""
},
{
"docid": "5d18b1d0ce9e9679a966161f5f5e76fa",
"score": "0.791209",
"text": "def section_new\n @section = Section.new\n @section_count = Section.count + 1\n @... |
a6eb2b8bcc415602a026e7459ec5e3e9 | GET /agendamento_de_visitas/1 GET /agendamento_de_visitas/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "e550c7ebe7715b1bb6c8f6fca9c57d89",
"score": "0.7348137",
"text": "def index\n @agendamento_de_visitas = AgendamentoDeVisita.all\n end",
"title": ""
},
{
"docid": "28f94bf2857a76108b3d41f10de8fb48",
"score": "0.670874",
"text": "def index\n @visitantes = Visitante.a... |
f5609d8e28f4f3c1998a6e19e418d931 | GET /user_views/1 GET /user_views/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "3312ca4d48dcecee914515f02b434f30",
"score": "0.7169067",
"text": "def index\n #@user_views = UserView.all\n end",
"title": ""
},
{
"docid": "85fc307998618fcf626e0e7518f56e4b",
"score": "0.7074298",
"text": "def views\n get('views')\n end",
"title": ""
... |
1652053155d7ce0bbc20e8117b8c4387 | Return the last element added | [
{
"docid": "e4d750d02ec5541102a32b19be6ab099",
"score": "0.7277307",
"text": "def current_element\n @elements.last\n end",
"title": ""
}
] | [
{
"docid": "435e4a96f1309ea9e7c6b98ffea4875e",
"score": "0.8055281",
"text": "def last\n elements.last\n end",
"title": ""
},
{
"docid": "76a0f34cc8cd46a1546d36acdd862fdb",
"score": "0.79022646",
"text": "def last\n @elements.last\n end",
"title": ""
},
{
... |
acc303753152887706edc18762f26410 | Used by the middleware to determine whether any HTTP metrics have been defined | [
{
"docid": "920f19c602417e5807809ec395f7437b",
"score": "0.8132409",
"text": "def http_metrics? ; @http_metrics ; end",
"title": ""
}
] | [
{
"docid": "d95812b59f6b32d979f2ca90112a82fc",
"score": "0.6577709",
"text": "def metrics_server_enabled?\n metrics_server_enabled\n end",
"title": ""
},
{
"docid": "dd5a1813715d85a9520b79609841caf6",
"score": "0.63271016",
"text": "def metrics_server_logger_enabled?\n metrics... |
647eddd52868b5ff55e5101e95ef54d6 | Private: Returns a Slack team identifier. Returns a String. | [
{
"docid": "6ed7bb8f250c6d914002e27aabeb2078",
"score": "0.7649469",
"text": "def slack_team\n ENV['SLACK_TEAM']\n end",
"title": ""
}
] | [
{
"docid": "543b3a2b29bfc2f921feb193c93b619c",
"score": "0.72381985",
"text": "def team\n ENV['SLACK_TEAM']\n end",
"title": ""
},
{
"docid": "05dc4383d97f84232fc5392ccb3f8910",
"score": "0.7198697",
"text": "def team_from_payload(payload)\n metadata_from_payload(pay... |
f0c98f9405c9f728f95604aa5cc475ea | Overall type effectiveness for a Pokemon vs another | [
{
"docid": "aac2eea1737ac2336e6bdaed4d5202e7",
"score": "0.6658137",
"text": "def type_effectiveness(source, target)\n\t\n\tmultiplier = ElementalType::TYPE_MULTIPLIERS\n\ttypes = ElementalType.elemental_types\n\n\ttype_1_v_1 = multiplier[types[source.type_1]][types[target.type_1]]\n\ttype_1_v_2 = (mult... | [
{
"docid": "4f830ae2f75c4654393cdf1cab4c0ba3",
"score": "0.7316475",
"text": "def pbCalcTypeModPokemon(battlerThis,_battlerOther)\r\n mod1 = Effectiveness.calculate(battlerThis.type1,target.type1,target.type2)\r\n mod2 = Effectiveness::NORMAL_EFFECTIVE\r\n if battlerThis.type1!=battlerThis.type... |
361e3c66e38fd5bf7f56cd5693707a83 | GET /borrows/1 GET /borrows/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "530e55cf07ff0f0ed9d931a9ebbfe4bb",
"score": "0.69593674",
"text": "def index\n @borrows = Borrow.all\n end",
"title": ""
},
{
"docid": "530e55cf07ff0f0ed9d931a9ebbfe4bb",
"score": "0.69593674",
"text": "def index\n @borrows = Borrow.all\n end",
"title": ""
}... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "0c354e44a7fbdd0f74655026e3eb4340",
"score": "0.0",
"text": "def set_cake\n @cake = Cake.find(params[:id])\n authorize @cake\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.60328794",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.6017492",
"text": "de... |
afb39873b217a6985b061a23d69c42a5 | the method contains other arrays and uses the flatten method to return an array of strings | [
{
"docid": "5e83a09268d33e1b6c981322aa01f5a5",
"score": "0.7467456",
"text": "def using_flatten(array)\n array.flatten \nend",
"title": ""
}
] | [
{
"docid": "346a9c96c2781bfdf1f6bd9cd3ffede7",
"score": "0.78459764",
"text": "def using_flatten (arrays)\n arrays.flatten\nend",
"title": ""
},
{
"docid": "adf33e592978362f4ff0090520604661",
"score": "0.7604263",
"text": "def using_flatten(array)\n array.flatten\n \nend",... |
7cbc144206cfe6d1c4dccc0be1fd42b2 | Allows config options to be read like a hash | [
{
"docid": "35be18e842ddf8edaf26200e5387751d",
"score": "0.0",
"text": "def [](option)\n send(option)\n end",
"title": ""
}
] | [
{
"docid": "d8663041139e84e5fc34b9a966146ac4",
"score": "0.7942141",
"text": "def config_file_options\n # Make sure that keys are symbols\n opts = load_config_file\n opts == \"\" ? {} : JSON.parse(opts).symbolize_keys! \n \n rescue JSON::ParserError => e\n ... |
84a18e837e3bc07d718b2eaf93a4f883 | Runs the block at some time in the near future | [
{
"docid": "ef4d6eb073b9d1cfc281023cbcc5101f",
"score": "0.0",
"text": "def execute(*args, &block)\n init_completable(block)\n\n if @queue_limit > 0\n sleep 0.01 until @queue.size < @queue_limit\n end\n\n @mutex.synchronize do\n @queue << [args, block]\n end\n end",
"title"... | [
{
"docid": "e2c5e227b40eeec42f3248b913fb2105",
"score": "0.74376255",
"text": "def run_at(time, &block)\r\n seconds_until = time - Time.now\r\n t = Timer(seconds_until, shots: 1 , &block)\r\n t.start\r\n return t\r\n end",
"title": ""
},
{
"docid": "1201... |
8ed99adb2d3e42783378dfae45f32589 | define activity parameters accepted and required for create and update methods | [
{
"docid": "e9fa152678a45a175bb5ac6848eca7c5",
"score": "0.72212875",
"text": "def activity_params\n params.required(:activity).permit(:name, :start_date, :end_date, :description,\n :goal, :notes, :activity_type)\n end",
"title": ""
}
] | [
{
"docid": "c0fe3921334b3fc016db8a4aeca80b02",
"score": "0.731544",
"text": "def activity_params\n #these parametes are required before it can be saved.\n params.require(:activity).permit(:activity_name, :description, :start_date, :end_date, :location, :vehicle, :mobile, :telephone, :image)\n ... |
c451ae499addd9f1c9f90fa8964027e9 | .uniq => Amortized O(n) as it uses Hash internally. .has_key? => 0(1) | [
{
"docid": "0c68575211b8d3a5b1ce6d108851b916",
"score": "0.0",
"text": "def common_characters(str1, str2)\n # O(n)\n str1 = str1.chars.uniq \n # O(m)\n str2 = str2.chars.uniq\n\n return str1.join('') if str1 == str2\n\n result = ''\n hash = Hash.new(0)\n\n # O(n) => 26\n str2.... | [
{
"docid": "bb1036ea4dc2c75c84c11363eef2c10b",
"score": "0.76832426",
"text": "def no_dupes?(arr)\n elements = Hash.new(0)\n unique_elements = []\n arr.each { |k, v| elements[k] += 1 }\n elements.each_key { |key| unique_elements << key if elements[key] == 1 }\n unique_elements\nend",
... |
981ea8686990837ba34e41ad688c99c9 | the json hash for this JavascriptLog | [
{
"docid": "3fa59bb87933d37b20a11f9b2c800718",
"score": "0.0",
"text": "def to_jaxb_json_hash\n _h = {}\n _h['loggerName'] = loggerName.to_jaxb_json_hash unless loggerName.nil?\n _h['message'] = message.to_jaxb_json_hash unless message.nil?\n return _h\n end",
"title": ""
}
... | [
{
"docid": "17a858516abe042b032473822b816e9b",
"score": "0.7221493",
"text": "def hash\n @hash\n end",
"title": ""
},
{
"docid": "17a858516abe042b032473822b816e9b",
"score": "0.7221493",
"text": "def hash\n @hash\n end",
"title": ""
},
{
"docid": "591e6b17... |
87e055954277f08f7b4254568335d743 | DELETE /shifttransactions/1 DELETE /shifttransactions/1.json | [
{
"docid": "6fb92b5a7e95438056d8772099656a79",
"score": "0.71909547",
"text": "def destroy\n @shifttransaction.destroy\n render json: {message: 'Shifttransaction was Deleted'}\n end",
"title": ""
}
] | [
{
"docid": "22024dfc98650599416934cdaadc6d97",
"score": "0.6840752",
"text": "def destroy\n @transaction = @client.transactions.find(params[:id])\n @transaction.destroy\n\n respond_to do |format|\n format.html { redirect_to(client_transactions_url(@client)) }\n format.xml { head :ok ... |
4c414ae40c307b17489122bf40f78f10 | PATCH/PUT /ranks/1 PATCH/PUT /ranks/1.json | [
{
"docid": "83f62cb6ce47ba97c5474cafb3936e66",
"score": "0.7439869",
"text": "def update\n respond_to do |format|\n if @rank.update(rank_params)\n format.html { redirect_to @rank, notice: 'Rank was successfully updated.' }\n format.json { render :show, status: :ok, location: @rank ... | [
{
"docid": "fe3f97a24e4f378adae0d759b11f809b",
"score": "0.7510336",
"text": "def update\n @rank = Rank.find(params[:id])\n\n respond_to do |format|\n if @rank.update_attributes(params[:rank])\n format.html { redirect_to @rank, notice: 'Rank was successfully updated.' }\n format... |
3b826b26e95f6641981684ee5ff65358 | Provide a user friendly representation | [
{
"docid": "35abbffa7b684b1c7b5034776b7f33f0",
"score": "0.0",
"text": "def to_s\n context = @solution.map {|k, v| \"#{k}: #{v}\"}.join(',')\n \"#<Twilio.Media.V1.MediaProcessorContext #{context}>\"\n end",
"title": ""
}
] | [
{
"docid": "8813d23ea53482a215f5e5b971468e2d",
"score": "0.75752455",
"text": "def representation; end",
"title": ""
},
{
"docid": "dad7e7041772f906c35bc43f5390a274",
"score": "0.70985687",
"text": "def to_human\n super\n end",
"title": ""
},
{
"docid": "1e72b... |
9947ef2608c4ab66f1a283754f3c195e | board = [" "," "," "," "," "," "," "," "," "] | [
{
"docid": "480c8480e0b5b7af7b7a0f24344b539a",
"score": "0.0",
"text": "def display_board(argument)\n puts \" #{argument[0]} | #{argument[1]} | #{argument[2]} \"\n puts \"-----------\"\n puts \" #{argument[3]} | #{argument[4]} | #{argument[5]} \"\n puts \"-----------\"\n puts \" #{argumen... | [
{
"docid": "48f0075b2d0022b75585eaf03ca0a993",
"score": "0.83155686",
"text": "def board\n board = ['1','2','3','4','5','6','7','8','9']\n board\nend",
"title": ""
},
{
"docid": "00e86c9526deb06837a26a274c880850",
"score": "0.8198989",
"text": "def initialize\n @board = [\" ... |
b27c11bab75028e7d2f5ea5411c932ba | Checks if we have a valid credentials. | [
{
"docid": "32cc21bb55c1a830d609201dcea68fa2",
"score": "0.0",
"text": "def authenticate()\n token = session[:token]\n redirect_to login_prompt_path if token.nil?\n return !token.nil?\n end",
"title": ""
}
] | [
{
"docid": "30ec97eb32db6e6cfcfc308a932414c1",
"score": "0.8311314",
"text": "def valid_credentials?(credentials)\n !credentials[:username].to_s.empty? && !credentials[:password].to_s.empty?\n end",
"title": ""
},
{
"docid": "34d6dfc4242c93da7c4335675eb19864",
"score": "0.807... |
e1a87a3fc4a02668f90f98160bc8ee17 | Build cache of all nodes. Only used during testing. | [
{
"docid": "94d449ca208ae7086b1b9b0e866f7021",
"score": "0.8442796",
"text": "def build_test_node_cache\n @test_node_cache = {}\n @all_nodes.each { |k, v| @test_node_cache[k] = v.clone }\n end",
"title": ""
}
] | [
{
"docid": "966f5c5677bff181a8875b57bece628a",
"score": "0.76656014",
"text": "def nodes_from_test_cache\n @all_nodes = {}\n @test_node_cache.each { |k, v| @all_nodes[k] = v.clone }\n calculate_all_child_nodes\n @all_nodes\n end",
"title": ""
},
{
"... |
3b989d8efa1ffd401bc6e076b08a0fde | GET /users/new GET /users/new.xml | [
{
"docid": "b2e41e36617c9f274814a95d87b1bd13",
"score": "0.0",
"text": "def new\n @user = User.new\n\n respond_to do |format|\n format.html { render :layout => 'misc' } # new.html.erb\n format.xml { render :xml => @user }\n end\n end",
"title": ""
}
] | [
{
"docid": "eb2f813d46891748e182b979d3bf5d7f",
"score": "0.79104567",
"text": "def new\n @user = @users.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @user }\n end\n end",
"title": ""
},
{
"docid": "90e268258e6b050fdb473af3ee96... |
512cf80a9a05913703422e89ceeba5ea | Updates an invoice by modifying fields, clearing fields, or both. For most updates, you can use a sparse `Invoice` object to add fields or change values and use the `fields_to_clear` field to specify fields to clear. However, some restrictions apply. For example, you cannot change the `order_id` or `location_id` field ... | [
{
"docid": "d3838bde888ebd1ce6145ba457dc1b1f",
"score": "0.68038756",
"text": "def update_invoice(invoice_id:,\n body:)\n new_api_call_builder\n .request(new_request_builder(HttpMethodEnum::PUT,\n '/v2/invoices/{invoice_id}',\n ... | [
{
"docid": "76132c7ee4258f559560cc61c2ca3696",
"score": "0.68669635",
"text": "def update()\n h = Simplify::PaymentsApi.execute(\"invoice\", 'update', self, self.authentication)\n self.merge!(h)\n self\n end",
"title": ""
},
{
"docid": "c50b7b4f1e28046a2f9008cbf... |
b1bb12a7d3d58086fcd0f909d7886ac6 | Get a card token | [
{
"docid": "0bac929530e192a6a3cb4e7cb64c1986",
"score": "0.6213464",
"text": "def get_card_token_using_token_with_http_info(id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: CardApi.get_card_token_using_token ...'\n end\n # verify the ... | [
{
"docid": "1ebb389dd9830e2de76ac26d9267e35b",
"score": "0.78328025",
"text": "def get_card_token\n card = Balanced::Card.new\n card.uri = \"/v1/marketplaces/TEST-MPv0uxteFANO0h9xY5c6Lrq/cards\"\n card.name = self.first_name + \" \" + self.last_name\n card.email = self.email\n card.card_n... |
5343a65c7272b0ecedb0d08b143c9a26 | GET /areas or /areas.json | [
{
"docid": "7bb1924c55a799c790e320a2240e2b33",
"score": "0.68257266",
"text": "def index\n @areas = Area.all.page(params[:page]).per(4)\n render json: AreaSerializer.new(@areas).serialized_json\n end",
"title": ""
}
] | [
{
"docid": "e6e626e1559b85a3039a0fb80aca96e7",
"score": "0.74619293",
"text": "def index\n @areas = Area.all\n respond_to do |format|\n format.html\n\n format.json{ render json: @areas }\n end\n end",
"title": ""
},
{
"docid": "c1b4ef9e977a22efa2dfca7825193e8f",
"scor... |
57d848ee689b9a6ceb81ed70886260d7 | persists_flat? Query whether attribute(s) are being treated explicitly as flat objects. | [
{
"docid": "97f357e480057c26a83781a9419a9f17",
"score": "0.75463384",
"text": "def persists_flat?( *attributes )\n\n should_persist_flat = false\n\n if attributes.empty?\n should_persist_flat = persists_flat.include?( nil )\n else\n attributes.each do |this_attribute|\n break u... | [
{
"docid": "5c624503fba24e3ab9c3d688640b084d",
"score": "0.60261077",
"text": "def includes_full_attributes?\n if returns && opts = returns[:structure_opts]\n (opts[:paramable].is_a?(Hash) && opts[:paramable][:full] == true) ||\n opts[:full] == true\n else\n false\n e... |
6de1fac999176c13b2bab48cb08311d3 | Test connection closed checking. | [
{
"docid": "1410d7938ac93049843b59a3bf356436",
"score": "0.8424496",
"text": "def test_connection_closed?\n assert_equal false, @conn.closed?\n @conn.disconnect\n assert_equal true, @conn.closed?\n end",
"title": ""
}
] | [
{
"docid": "28ddfbc392436583c28f8a917699cf7b",
"score": "0.78427875",
"text": "def connection_closed\n close\n end",
"title": ""
},
{
"docid": "431d3bbfeded1354c60d9c7465f82aa8",
"score": "0.78042996",
"text": "def closed?\n @connection_state == :closed\n end",
"title... |
039e2e05b3316ddaad62e51146afa771 | Deletes all cache entries | [
{
"docid": "f12285b324a556f40b0d35898b572a0d",
"score": "0.0",
"text": "def delete_all\n\t\t\texists(true).each do |file|\n\t\t\t\tFile.unlink(file)\n\t\t\tend\n\t\tend",
"title": ""
}
] | [
{
"docid": "35ec3d9473766e3b13a8b9f38d46e04f",
"score": "0.8457786",
"text": "def cache_delete_all\n FileUtils.rm_rf(cache_root)\n end",
"title": ""
},
{
"docid": "35ec3d9473766e3b13a8b9f38d46e04f",
"score": "0.8457786",
"text": "def cache_delete_all\n FileUtils.rm_rf(ca... |
37f27108110d65b88a11e87f0b13418f | GET /gifts GET /gifts.json | [
{
"docid": "4252bbd185827a5b51f44e7597fd3409",
"score": "0.68620116",
"text": "def index\n @gifts = Gift.all\n end",
"title": ""
}
] | [
{
"docid": "134683486df99fab8b2652fdc50a16f3",
"score": "0.75288177",
"text": "def index\n @gifts = current_host.gifts\n end",
"title": ""
},
{
"docid": "5f2be9d739f429374127643548730a9a",
"score": "0.73171824",
"text": "def index_by_user\n @gifts = @current_user.gifts\n re... |
02bb30265e46247d267ffd482a77e8e6 | Called once for each file being checked. file_result [Result::File] Results object for the outcome. Returns: Result::File | [
{
"docid": "4feb942f9e0ef6fb06b69b09e3ec1e30",
"score": "0.7046618",
"text": "def check_file(_file_result)\n fail\n end",
"title": ""
}
] | [
{
"docid": "c5c45921437c0b1735a3c59b7a1b4626",
"score": "0.6828088",
"text": "def result_received(file, result)\n end",
"title": ""
},
{
"docid": "8f7be8e740d5367b699f7bb2c2a0297f",
"score": "0.6792815",
"text": "def file_finished(_file_result)\n end",
"title": ""
... |
0940bc1137dcb94f51928296e658eb83 | Return a Hash of information about the world suitable for display in tools. | [
{
"docid": "691e706b59d75a84617d8ab476293f2f",
"score": "0.55693173",
"text": "def status\n\t\treturn {\n\t\t\tversions: { chione: Chione::VERSION },\n\t\t\ttick: self.tick_count,\n\t\t\tsystems: self.systems.keys.map( &:name ),\n\t\t\tmanagers: self.managers.keys.map( &:name )\n\t\t}\n\tend",
"titl... | [
{
"docid": "e742dec4bd52587fbfd73ba84a0a30b3",
"score": "0.6505268",
"text": "def world\n @world\n end",
"title": ""
},
{
"docid": "500d30ca9d812f9d0371220ed32464ba",
"score": "0.6337335",
"text": "def hash\n [agents, api, apm, logs, modified, orchestrator, process, remo... |
112b7946a0f47632733eb56b653253eb | executes the fetch data query in order to load the full set of types, properties and attributes more info at | [
{
"docid": "6d91202cf7b1d22e2e8cbcefb2069f2c",
"score": "0.7031989",
"text": "def fetch_data\n return @data if @data[\"/type/reflect/any_master\"]\n @data = Ken.session.mqlread(FETCH_DATA_QUERY.merge!(:id => id))\n end",
"title": ""
}
] | [
{
"docid": "f660797336b96e7b589c0128a5430239",
"score": "0.65861046",
"text": "def fetch_fields\n @result.fetch_fields\n end",
"title": ""
},
{
"docid": "db54771a10845ae64791a37847889bfc",
"score": "0.6484603",
"text": "def load_data\n # @categories = Category.find(:all)\n... |
627d32abedfdc63319a0be0f40099c17 | =================================== Create final exploit paylod based on supplied payload options. =================================== | [
{
"docid": "4f7eb648e6a426e17d5c48a65c568ed5",
"score": "0.57280767",
"text": "def create_payload\r\n # Create payload\r\n psh_cmd = \"/b /c start /b /min \" + cmd_psh_payload(\r\n payload.encoded,\r\n payload_instance.arch.first,\r\n remove_comspec: true, encode_final_payload: fals... | [
{
"docid": "9a0ce9b38244330278164141f8367ec9",
"score": "0.6497169",
"text": "def generate_payload\n if platform == \"java\" or arch == \"java\" or payload.start_with? \"java/\"\n raw_payload = generate_java_payload\n cli_print \"Payload size: #{raw_payload.length} bytes\"\n ge... |
e4a28fc27e01132f2bd788763c658e80 | Warden will call this methods | [
{
"docid": "ca86a53ea67670d05f179b766f68bcae",
"score": "0.0",
"text": "def enable_authentication_controls\n attributes(:active, true)\n self.last_access = Time.now.getlocal\n cache_provider_add_user(self)\n true\n end",
"title": ""
}
] | [
{
"docid": "dfc25c7b0a24fa6b578417739d4565b4",
"score": "0.84084296",
"text": "def warden; end",
"title": ""
},
{
"docid": "dfc25c7b0a24fa6b578417739d4565b4",
"score": "0.84084296",
"text": "def warden; end",
"title": ""
},
{
"docid": "839b9660e10052e6f59b0cbc85e37b1f",
... |
5769c3b77ebe88a43357e63b0b349ce7 | A list of signature fields. Returns Array of field definitions. | [
{
"docid": "eb44ef06254ffd7829f30f2a32a0b4fb",
"score": "0.722457",
"text": "def signature_fields\n parsed {\n @signature_fields\n }\n end",
"title": ""
}
] | [
{
"docid": "5bd84f0e809630b1b3c8d955cd74a779",
"score": "0.7252194",
"text": "def signature_fields\n @parser.signature_fields\n end",
"title": ""
},
{
"docid": "1dc7d16aa4ff3436aadf992770130ac4",
"score": "0.7109735",
"text": "def field_list\n fields.keys\n end",
... |
7257a22fc08ec9e7097739cd209e0a59 | PUT /training_providers/1 PUT /training_providers/1.json | [
{
"docid": "89fcb8c8ad1f09b59db70e959f35ec5d",
"score": "0.69591296",
"text": "def update\n @training_provider = TrainingProvider.find(params[:id])\n @training_provider.region_ids = params[:training_provider][:region_ids]\n @training_provider.sector_ids = params[:training_provider][:sector_ids]... | [
{
"docid": "fa4db475511579786ecaaa4f2b1b6ad2",
"score": "0.6443867",
"text": "def create\n @training_provider = TrainingProvider.new(params[:training_provider])\n respond_to do |format|\n if @training_provider.save\n format.html { redirect_to @training_provider, notice: 'Training provi... |
d3ccd20396535e45891b8e675d354c6a | Returns true if player points > 3 and 2 more than opponent's points. Records a game win and resets player's and opponnent's score to 0 | [
{
"docid": "ec2ef83488405b3d983343bba35fd031",
"score": "0.67421734",
"text": "def win?\n if won_game?\n @games_won += 1\n won_set\n return true\n end\n end",
"title": ""
}
] | [
{
"docid": "b947e7572fbef021a08641eb78856fb0",
"score": "0.825708",
"text": "def won_game?\n @points > @opponent.points + 1 && @points >= 3\n end",
"title": ""
},
{
"docid": "b0b92dbff68c04b71be682ce9f06cedc",
"score": "0.81868726",
"text": "def won_game?\n if @points > ... |
821ec41cacbe8d0a497d4058528b075c | Explanation 'select' only works for an array! | [
{
"docid": "27393532052b0f76870e5cd2a13df34d",
"score": "0.0",
"text": "def o_words(sentence)\n return sentence.split.select { |word| word.include?(\"o\")}\nend",
"title": ""
}
] | [
{
"docid": "718aa9e0f5d25bc6558c95df79f282b3",
"score": "0.78504807",
"text": "def select(&block)\n wrap @array.select(&block)\n end",
"title": ""
},
{
"docid": "2922ea024319263819ee712b7757afef",
"score": "0.7514225",
"text": "def select(*args) end",
"title": ""
},
{
... |
4988ac8e9c0803a1be9d711281822c03 | PATCH/PUT /bizs/1 PATCH/PUT /bizs/1.json | [
{
"docid": "04b9f402f3b123871cbf2f0d8e788fb9",
"score": "0.0",
"text": "def update\n if simple_captcha_valid?\n if @biz.update(biz_params)\n redirect_to @biz, notice: 'Biz was successfully updated.'\n else\n render action: 'edit'\n end\n else\n flash[:error] = \"C... | [
{
"docid": "576f27e4c99d0868b0454fedc7deba0c",
"score": "0.6243414",
"text": "def update # PATCH\n raise NotImplementedError\n end",
"title": ""
},
{
"docid": "6d944cd6fc389dd13592c2102b18a4fd",
"score": "0.6214071",
"text": "def update\n if @boat.update(boat_params)\n ... |
ed7b0e203f62fbca304d9cccb3acfbc8 | TODO: The apply_move & undo_move functions can absolutely be optimized. Right now, they modify s[:moves] and then use derive_moves_metadata to construct the state around that change. Instead of doing that, we could instead modify things based on what we're doing instead of completely rebuilding almost the entire state ... | [
{
"docid": "da64a259722104e3515f21b29ef6440d",
"score": "0.7906399",
"text": "def apply_move(s)\n # puts \"\\nApplying move...\" #NICE TO HAVE\n s[:moves][s[:prospective_move][:y]][s[:prospective_move][:x]] = s[:m]\n derive_moves_metadata(s)\nend",
"title": ""
}
] | [
{
"docid": "8d3f902c208c6fe9529a335357628a13",
"score": "0.7221598",
"text": "def undo_move(s)\n # puts \"Undoing move...\" #NICE TO HAVE\n if s[:m] == -1\n s[:m] = s[:num_moves]\n else\n s[:m] = s[:m] - 1\n end\n while s[:given_moves].include? s[:m] do # Make sure we're not undoing a given m... |
2d50966e3820b347cdc92177216a8c26 | GET /games/consoles GET /games/consoles.json | [
{
"docid": "772365290c7af692918ca0d7d80b041f",
"score": "0.76506066",
"text": "def index\n @games_consoles = Games::Console.all\n end",
"title": ""
}
] | [
{
"docid": "3c5aae2911509c97f251ba9dac2afb4e",
"score": "0.7624041",
"text": "def show\n @console = ActiveRecord::Base.connection.execute(\"\n SELECT * \n FROM consoles \n WHERE gcid = #{params[:id]} \n LIMIT 1\").first\n\n @games = ActiveRecord::Base.connection.execute(\"\n ... |
2f08531709c94182cc99968ef74cfaa3 | Returns current ActionController::Parameters instance which contains only the given +keys+. | [
{
"docid": "578f7e0ec1856e4c84c820d543f35a73",
"score": "0.5750206",
"text": "def slice!(*keys); end",
"title": ""
}
] | [
{
"docid": "95af8a2a859360ce7a8e8ac634c5d6a6",
"score": "0.73289883",
"text": "def only(*keys)\n keys = keys.to_sargs\n self.select { |k| keys.include?(k) } || self\n end",
"title": ""
},
{
"docid": "a8e2ed8c3080f202966db456a95ce2c9",
"score": "0.7124334",
"text": "def only(*k... |
2e01c65ab04331a87e63adf436bba70d | Check if items exist in given list | [
{
"docid": "5c650dc61a6de50f13b9be36dd260f25",
"score": "0.67501026",
"text": "def exists (id, items)\n params = {\n :id => id,\n :items => items\n }\n requires params\n DataSift.request(:POST, 'list/exists', @config, params)\n end",
"title": ""
}
] | [
{
"docid": "eecd6ab771d2c2082e5756a4e15b5976",
"score": "0.75348324",
"text": "def in?(*list)\n list.any? {|item| self === item}\n end",
"title": ""
},
{
"docid": "f58320ecf2e61b65c5fe992ab6d79388",
"score": "0.73860174",
"text": "def check_list(list, item)\n if list.include... |
60d2dd9a215f021f09097564f44cc766 | GET /educations/1 GET /educations/1.json | [
{
"docid": "c822ebc3a92363e8c8b554762c14aba3",
"score": "0.0",
"text": "def show\n @page_title = @education.name\n end",
"title": ""
}
] | [
{
"docid": "4c6e6aa5dbf19ea2b8b93fda6c0722f4",
"score": "0.65981543",
"text": "def show\n @edu = Edu.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @edu }\n end\n end",
"title": ""
},
{
"docid": "b759edb76dea52d46ec... |
e544fc5bbd9c1515b4fe2d2a8e9666e7 | SYNOPSIS reader = CSV::StringReader.new(string) ARGS string: a CSV String to be parsed. RETURNS reader: Created instance. DESCRIPTION Create instance. To get parse result, see CSV::Readereach. | [
{
"docid": "f336030c92ac03741cc6e29cbe12df24",
"score": "0.52685887",
"text": "def initialize(string, col_sep = ?,, row_sep = nil)\n @col_sep = col_sep\n @row_sep = row_sep\n @dev = string\n @idx = 0\n if @dev[0, 3] == \"\\xef\\xbb\\xbf\"\n @idx += 3\n end\n end",... | [
{
"docid": "b5f429dfa8b63f66676f88ba07baa4b6",
"score": "0.62379724",
"text": "def parser\n if type == 'csv'\n require 'csv'\n return CSV::Reader\n end\n end",
"title": ""
},
{
"docid": "738dcff5ea55453ee03314bd76fb105c",
"score": "0.6084458",
"text": "def import_str... |
76b214af706983b51048c4f69a2c91b8 | Method for alternative download ============================================= | [
{
"docid": "dd1ccab767e2dd0011ac2205788c042f",
"score": "0.0",
"text": "def sec_download_alt(data)\n data.each do |company|\n comp_cik = company[0]\n comp_month = month_convert(company[1][1])\n comp_year = company[1][0]\n target_dir = \"sec/#{comp_year}/#{comp_month}/#{comp_cik}\"\n\n ... | [
{
"docid": "63375508bd8b848b4dbefc9ae6fee42e",
"score": "0.7816778",
"text": "def download\n raise NotImplementedError\n end",
"title": ""
},
{
"docid": "be1621806dd7278a4105b0f47f26be76",
"score": "0.7735879",
"text": "def download\n end",
"title": ""
},
{
... |
616a79b749cb37c8691676ce1e92c46a | Home Sliders Table Methods | [
{
"docid": "c7518f6bf05c7429cba0545096ace67e",
"score": "0.5992852",
"text": "def home_slider\n @home_sliders = HomeSlider.all.order('id DESC')\n render :template => \"backend/HomeSlider/home_slider\"\n end",
"title": ""
}
] | [
{
"docid": "25708a2fc88286bd032c02a9864e7635",
"score": "0.6427835",
"text": "def index\n @slider_tops = SliderTop.all\n end",
"title": ""
},
{
"docid": "1868906cb77b368d3979acb562fd48f1",
"score": "0.6063432",
"text": "def index\n @sliders = Slider.sorted\n end",
"title"... |
a57973cf052eaa1a8444e9bd821230b4 | =begin rdoc Return the String value of the variable 'key'. =end | [
{
"docid": "4fa06a52e26d7caddfa8a341c5eb98da",
"score": "0.0",
"text": "def [](key)\n rv = @db.repo_config[path(key)]\n rv ? rv : ''\n end",
"title": ""
}
] | [
{
"docid": "5233e0437baf642cccb724929706690d",
"score": "0.72734606",
"text": "def get_key\n\t\t@key\n\tend",
"title": ""
},
{
"docid": "c174abf9f27b1c7b4c714f740dd7dd29",
"score": "0.72447234",
"text": "def key\n @key.inspect\n end",
"title": ""
},
{
"docid": "1a... |
05bb16044476c468bb66f0be286de1b5 | Register a hook that is called when this task is finalized (removed from its plan) | [
{
"docid": "f9e27574674775d6e7c27e7a888d43f4",
"score": "0.0",
"text": "def when_finalized(options = {}, &block)\n default = abstract? ? :copy : :drop\n options, remaining =\n InstanceHandler.filter_options options, on_replace: default\n super(options.merg... | [
{
"docid": "fb98d16db802be2083a78e8f67bc7974",
"score": "0.7299619",
"text": "def finalized_task(task)\n\t\tsuper if defined? super\n\t\tPlanModificationHooks.finalized_object(self, task) \n\t end",
"title": ""
},
{
"docid": "e7b2a76e8800d944135bb2fa631657a6",
"score": "0.6507398",
... |
2a6f6b964e649ee06335c373ae30ffad | GLOBAL AND CLASS VARIABLES | [
{
"docid": "81adbd1582d27c9b79025b04e0a06646",
"score": "0.61453325",
"text": "def initialize_global()\n\t$mtu \t\t= 0\t\t\t\t# max bytes initialized \n\t$topology\t= Graph.new \t\t\t# topology of the network\n\n\t@@routing_table = {}\t\t\t\t# dest=>{origin nexthop cost sq}\n\t@@neighbors_interfaces= Ha... | [
{
"docid": "57b3793bd8f85fb9b09df8cc98724ba1",
"score": "0.75193334",
"text": "def globals; end",
"title": ""
},
{
"docid": "57b3793bd8f85fb9b09df8cc98724ba1",
"score": "0.75193334",
"text": "def globals; end",
"title": ""
},
{
"docid": "3d8e32cf91d050f42553f552c35f4cee",... |
92ace2dce3f33084adbd8ba9edc2085d | Link to kata: Description: Have a look at the following numbers. n | score + 1 | 50 2 | 150 3 | 300 4 | 500 5 | 750 Can you find a pattern in it? If so, then write a function getScore(n)/get_score(n)/GetScore(n) which returns the score for any positive number n: int getScore(1) = return 50; int getScore(2) = return 150... | [
{
"docid": "c859a1d45fd8650d39328a373f699d69",
"score": "0.7459467",
"text": "def get_score(n)\n (1..n).to_a.map { |num| num * 50 }.inject(:+)\nend",
"title": ""
}
] | [
{
"docid": "666580a6c198e560011816ebe437fd48",
"score": "0.7129937",
"text": "def subScore(n)\n subTotal=0\n case \n when n==0 #first place\n subTotal = subTotal + 15\n when n==1 #second place \n subTotal = subTotal + 10\n when n==2 #... |
6c0f34335d32dbb0d98cbe9bacbf342e | Returns the "PS3" menu, including the ability to access fly out menu items, as well as the link to click the menu. | [
{
"docid": "cc5e9c52ef509d8268f8fbcd08d54650",
"score": "0.778565",
"text": "def ps3_menu\n $tracer.trace(__method__)\n link_tag = a.className(create_ats_regex_string(\"ats-ps3menu\"))\n menu_tag = div.id(\"mm_ps3\")\n return GameStopProductLinkItem.new(ToolTag.new(link_tag, __method__), Too... | [
{
"docid": "531356c5e5def0038ed4e30935cba169",
"score": "0.70284075",
"text": "def _3ds_menu\n $tracer.trace(__method__)\n link_tag = a.className(create_ats_regex_string(\"ats-3dsmenu\"))\n menu_tag = div.id(\"mm_3ds\")\n return GameStopProductLinkItem.new(ToolTag.new(link_tag, __method__), ... |
ee99c139d99150632e7bb17ad1a5256a | Note exceptions for FOI subclasses because REST routes for FOI subclasses do not exist (adds more complexity than needed) | [
{
"docid": "40625da275e7f9686ba637d5b19495fd",
"score": "0.0",
"text": "def case_details_links(kase, user)\n links = ''\n\n if kase.allow_event?(user, :edit_case)\n links << link_to(t('helpers.links.case_details.edit_case'),\n kase.foi? ? edit_case_foi_standard_path(kase) : edit_polymo... | [
{
"docid": "2b4f7be703a7495ab1c92672539cb89e",
"score": "0.6098429",
"text": "def __dispatch\n\t\t\tinstance_exec &self.class.routes if self.class.routes\n\t\t\t[404, { 'Content-Type' => 'application/octet-stream' }, []]\n\t\tend",
"title": ""
},
{
"docid": "6dfdd1179177cef2a3becc4d445768df"... |
9d787ee0831909a5b53111763ec78559 | Computes a localized verbose description for the value/code associated with this data | [
{
"docid": "500b31fb1caaed2ac633c60b8ec67651",
"score": "0.0",
"text": "def i18n_verbose\n I18n.t(:pool_type_des).gsub('{POOL_LENGTH}', length_in_meters.to_s)\n end",
"title": ""
}
] | [
{
"docid": "0570cbe5478597815f2acb5a95b7c8d4",
"score": "0.6985074",
"text": "def to_label\n \"#{code.nil? ? '' : code}::#{(desc.nil? ? 'desc[0..30]' : (desc.length>30 ? desc[0..30]+'...' : desc))}\"\n end",
"title": ""
},
{
"docid": "0570cbe5478597815f2acb5a95b7c8d4",
"score... |
6395d52bf90e273e60da57542ead68d0 | After create/update the deal country id will be updated as per the first contact information country | [
{
"docid": "2476aa67cc1ef814c6c23bcbabc06061",
"score": "0.7520594",
"text": "def update_country_id \n self.update_column :last_activity_date, Time.zone.now\n puts \"---------------------End ---- updaing countryid---------------\"\n unless self.move_deal\n puts \"--------------... | [
{
"docid": "7d79bc907d42b44dfbb947766bbb1618",
"score": "0.7578019",
"text": "def update_country_id \n self.update_column :last_activity_date, Time.zone.now\n \n puts \"---------------------End ---- updaing countryid---------------\"\n unless self.move_deal\n puts \"------------------c... |
33f50812905c2817bdd967d67021c49b | Store history of codebreaker guesses | [
{
"docid": "adc82234b4c4c45352d81d7a6224bb8c",
"score": "0.54059714",
"text": "def store_attempt(turn, attempt)\n @attempts[turn] = attempt \n end",
"title": ""
}
] | [
{
"docid": "388f915bcdad24050a50fff1cb97ea3a",
"score": "0.785739",
"text": "def history\n # ... Go up to latest not include\n (0...guesses.count).map do |i|\n { guess: guesses[i].word, hint: password.hints[i].message, correct: guesses[i].correct }\n end\n end",
"title": ""
},
{
... |
737a4a9c8fd4ac139b3097ee9ca5a55b | send a mail to if another user gave a higher bid | [
{
"docid": "a06ccc21800165da400baf37b3e0373a",
"score": "0.68772304",
"text": "def send_email(tmp_bid)\r\n EmailSender.send_auction(tmp_bid.owner, self.item)\r\n end",
"title": ""
}
] | [
{
"docid": "c03c50594a9bd825470dc2fe3134c622",
"score": "0.7788141",
"text": "def tied(bid)\n @bid = bid\n mail to: bid.manager.email, subject: 'Your Sealed Bid was a tie!'\n end",
"title": ""
},
{
"docid": "e5fef7b4751c068aeb4b7e5360698c93",
"score": "0.7444184",
"text": "def... |
fd8bdb3daa347391eeeb61951397621a | ! Student ordering select | [
{
"docid": "b7233a8695f2cb9ec9c432be5eda6452",
"score": "0.6565533",
"text": "def student_asc\n render json: Student.all.order('last_name ASC')\n end",
"title": ""
}
] | [
{
"docid": "c0ce90a3c9f44df197334362d33c3a7a",
"score": "0.70123595",
"text": "def order(students, by)\n ordered = students.sort_by { |student| student[by.to_sym] }\n print_student_list(ordered)\nend",
"title": ""
},
{
"docid": "9f5c1c2f37e443f820e81bb155b363d4",
"score": "0.6766537",
... |
a8525104256e5aa6b51a9f84d341188d | Low level ruby command runner ... | [
{
"docid": "3e488c5688c2ac92216bfecd13e98cc2",
"score": "0.67185503",
"text": "def run_ruby(option_list)\n shell = Session::Shell.new\n command = \"#{RUBY_COMMAND} \" + option_list.join(' ')\n puts \"COMMAND: [#{command}]\" if @verbose\n @out, @err = shell.execute command\n @status = shel... | [
{
"docid": "5c5ebdca6aa67f954b6c2315828ff9ba",
"score": "0.77917475",
"text": "def run_command; end",
"title": ""
},
{
"docid": "5c5ebdca6aa67f954b6c2315828ff9ba",
"score": "0.77917475",
"text": "def run_command; end",
"title": ""
},
{
"docid": "a71012e052ac544468ff4bb5eb... |
d91e23407c2beb9d1e500d6dd26d0ecf | checks size of logo and resizes if necessary | [
{
"docid": "4c2b9f88aa24fe076fac87f46bdd91c4",
"score": "0.7549291",
"text": "def resize_image\n unless logo.nil?\n if logo.height != 75\n self.logo = logo.thumb('x75') # resize height and maintain aspect ratio\n end\n end\n end",
"title": ""
}
] | [
{
"docid": "13e5b1af768201a403de8e50eeab0f00",
"score": "0.8052843",
"text": "def logo_resize\n return self.company_logo.variant(resize: '100x100%').processed\n end",
"title": ""
},
{
"docid": "a31ea295c39697005ca095ba42aeef01",
"score": "0.7597035",
"text": "def resize_image\n ... |
7f67416ae86d1f8d2043376ff36698b2 | PATCH/PUT /companies/1 PATCH/PUT /companies/1.json | [
{
"docid": "de84cc71c029abe5f9faba50987fdad6",
"score": "0.6836749",
"text": "def update\n respond_to do |format|\n if @company.update(company_params)\n format.html { redirect_to @company, notice: 'Company was successfully updated.' }\n format.json { render :show, status: :ok, loca... | [
{
"docid": "55dc679e8ae9ab08f7fe5756be21b439",
"score": "0.7635531",
"text": "def update\n render json: Company.update(params[\"id\"], params[\"company\"])\n end",
"title": ""
},
{
"docid": "03bb3a09c114891b053d4f646db4570c",
"score": "0.7152681",
"text": "def update\n @compan... |
40f200e053b93cfb261915bc44870bde | POST /feedbacks POST /feedbacks.json | [
{
"docid": "a1d1a54ab71288c1667127d2b47214e1",
"score": "0.70195544",
"text": "def create\n @feedback = Feedback.new(feedback_params)\n\n respond_to do |format|\n if @feedback.save\n format.html { redirect_to action: \"index\", notice: 'Feedback was successfully created.' }\n fo... | [
{
"docid": "5b1261e18a4ca4c657d977b7bbcc3751",
"score": "0.7406762",
"text": "def create\n @feedback = Feedback.new(feedback_params)\n\n if @feedback.save\n render json: @feedback, status: :created\n else\n render json: @feedback.errors, status: :unprocessable_entity\n end\n end",... |
3f058b68423b986c8b88796f233f4d81 | Helper function to fetch the original data during new/create. | [
{
"docid": "162f174152c24da4833c1c7cdeed54f7",
"score": "0.0",
"text": "def fetch_source_data\n if params[:origin] == 'CollectionDraft'\n source_collection = CollectionDraft.where(id: params[:collection_id])[0].draft\n elsif params[:origin] == 'Collection'\n revision_id = if params[:revi... | [
{
"docid": "b7d8baf251ab55022f9993b1f3a13bbd",
"score": "0.6598944",
"text": "def original_attributes\n clone_attributes :read_original_attribute\n end",
"title": ""
},
{
"docid": "a4ec55d5ae9bce2b8c7da2d647651671",
"score": "0.6494784",
"text": "def data\n @old_da... |
049e77eea744b93c88dd4b57c3765513 | Temporarily disable permission scoping to execute the passed block. Permission scoping is reset back to previous state at completion. See permission_scoping_enabled= for more information on permission scoping. | [
{
"docid": "683d9c358e8800ccb7cbf9d1f5e9bac9",
"score": "0.753385",
"text": "def without_permission_scoping(&blk); wrap_permission_scoping(false,&blk); end",
"title": ""
}
] | [
{
"docid": "8ed72fe1ff6645091f97393b67fd427c",
"score": "0.66488045",
"text": "def with_permission_scoping(&blk); wrap_permission_scoping(true,&blk); end",
"title": ""
},
{
"docid": "bcb89a04b1c8a320c7bca76346d4392d",
"score": "0.6276831",
"text": "def without_authorization\n unle... |
4a7c173a9fe7574536f1291d83938bdd | A hash of all the currently configured validators. | [
{
"docid": "6ac00fea36de4dd29f7a642c81c50014",
"score": "0.7807433",
"text": "def validators\n @validators ||= Hash.new { |hash, key| hash[key] = [] }\n end",
"title": ""
}
] | [
{
"docid": "141a081c1fcd57610e3d9321f0e913f1",
"score": "0.786792",
"text": "def validators\n @validators ||= Hash.new { |hash, key| hash[key] = [] }\n end",
"title": ""
},
{
"docid": "adb2d3c4c1b80fb529fd5f71b154a063",
"score": "0.76175183",
"text": "def validators\n ... |
7de4f532d6f2bbbb5dd21b5834a52437 | Write your code here. | [
{
"docid": "a58cf5dc608cc757bb43de585baba28d",
"score": "0.0",
"text": "def batch_badge_creator(array_of_names)\n array_of_badges = []\n array_of_names.each {|name| array_of_badges << \"Hello, my name is #{name}.\"}\n return array_of_badges\nend",
"title": ""
}
] | [
{
"docid": "f45f5fa6d32a5d296e5153caa3d92701",
"score": "0.7117752",
"text": "def code; end",
"title": ""
},
{
"docid": "f45f5fa6d32a5d296e5153caa3d92701",
"score": "0.7117752",
"text": "def code; end",
"title": ""
},
{
"docid": "f45f5fa6d32a5d296e5153caa3d92701",
"sc... |
05be5c5bbf70b3029cf834051f2a868b | DELETE /works/1 DELETE /works/1.json | [
{
"docid": "61966d621afe0ff942b5d15edb5f4261",
"score": "0.0",
"text": "def destroy\n authorize! :destroy, @user\n @user.destroy\n respond_to do |format|\n format.html { redirect_to employees_url }\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "eebbccf91b7f14b21d85e720c4e64d07",
"score": "0.7391501",
"text": "def destroy\n @work = Work.find(params[:id])\n @work.destroy\n\n respond_to do |format|\n format.html { redirect_to works_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
... |
23ab8f7c69c73cc09b0273db1e4668a0 | def is beginning of a code block; def is "define a method"; "end" breaks the code started by "def" Example 1 | [
{
"docid": "db00cfc492cac2c32ca42cf7694e0aee",
"score": "0.0",
"text": "def greet\n p 'hello georgina'\n end",
"title": ""
}
] | [
{
"docid": "caecc77b834afd715616f21e22e39a81",
"score": "0.7175921",
"text": "def\n end\nend",
"title": ""
},
{
"docid": "281e9a43f3408650bd69047a8fabab55",
"score": "0.71654946",
"text": "def end; end",
"title": ""
},
{
"docid": "281e9a43f3408650bd69047a8fabab55",
"... |
6a1d58efe269cd9cd10f8a2e8ab6f260 | Lists InviteInstance records from the API as a list. Unlike stream(), this operation is eager and will load `limit` records into memory before returning. | [
{
"docid": "e613413d5c558d66192224959043d14c",
"score": "0.0",
"text": "def list(identity: T.unsafe(nil), limit: T.unsafe(nil), page_size: T.unsafe(nil)); end",
"title": ""
}
] | [
{
"docid": "a9c66823cc6063f85623f1ea34d13e1b",
"score": "0.7052676",
"text": "def list(limit: nil, page_size: nil)\n self.stream(limit: limit, page_size: page_size).entries\n end",
"title": ""
},
{
"docid": "a9c66823cc6063f85623f1ea34d13e1b",
"score": "0.7052676",
... |
01339999f5f9a012ce56a0bb09621eb8 | Puts projects info in FetchData MongoDB Database | [
{
"docid": "127a64e4fda09e1d2ecc48272c65ec01",
"score": "0.61739504",
"text": "def dump_projects_harvest\n projects = pull_projects_harvest()\n projects.each do |project|\n same_project = FetchData.where(resource_original_id: project[\"id\"], source: 'harvest', resource: 'project').to_a\n ... | [
{
"docid": "b1a0946acf2c2276d6e76d1fe425dfd7",
"score": "0.6603732",
"text": "def find_projects\n \turi = URI(BASE_URL+\"projects.json?limit=100\")\n \treq = Net::HTTP::Get.new(uri)\n \treq['Authorization']=BASIC_AUTHORIZATION\n \tres = Net::HTTP.start(uri.hostname, uri.port) {|http|\n \t http.req... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "7c722c8aed6a2735c78079b0c30a5f8b",
"score": "0.0",
"text": "def set_process_step\n @process_step = ProcessStep.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;... |
f16546e52d08e45ab3f6402e4060d2be | if there are errors from the plugin, then add a more meaningful message | [
{
"docid": "75f82417c7ea4ef7ac78e5dc24221687",
"score": "0.0",
"text": "def no_attachement_errors\n unless attachment.errors.empty?\n # uncomment this to get rid of the less-than-useful interrim messages\n # errors.clear\n errors.add :attachment, \"Paperclip returned errors for file '#... | [
{
"docid": "7e9d3081536f26e90c7bd9743567c998",
"score": "0.6601839",
"text": "def display_error_message(ex); end",
"title": ""
},
{
"docid": "f9c5f34b6fb44c9a9ea450dffadab49b",
"score": "0.6591357",
"text": "def msg\n 'error processing'\n end",
"title": ""
},
{
"d... |
92a5e56fa037754a404811138ec275cc | Check if any cells have been uncovered that also contained a mine. This is the condition used to see if the player has lost the game. | [
{
"docid": "966f464a98d087630779012f78c2d059",
"score": "0.0",
"text": "def any_mines_detonated?\n @mines_detonated\n end",
"title": ""
}
] | [
{
"docid": "8c2d963a340d36086964a4d894473373",
"score": "0.7121728",
"text": "def all_cells_cleared?\n for i in (0..@mine_field[:bombs].size-1)\n for r in (0..@mine_field[:bombs][0].size-1)\n if @mine_field[:bombs][i][r] == @mine_field[:cover][i][r]\n return false\n else\n... |
798b0818ba9d4b7bbd37dcf5dc9605b4 | Sync single schedule rule from the ESS by essid | [
{
"docid": "b7fbc34e0b7afac823c3969e6829f9b0",
"score": "0.7445336",
"text": "def sync_schedule_rule(essid)\n requester = HttpRequester.new('get', Credentials.key, Credentials.secret)\n uri = [[URI.parse(Credentials.server + 'schedule-rules/' + essid),nil]]\n response = requester.request(uri)[0... | [
{
"docid": "5e10bc451cc13e86b03739d52568d68d",
"score": "0.66497225",
"text": "def sync_schedule_rules(section)\n \n url = [[URI.parse(Credentials.server + 'sections/' + section.essid + '/schedule-rules'), nil]]\n requester = HttpRequester.new('get', Credentials.key, Credentials.secret)\n \n... |
69dc3ebbc759312f6ad56cb225dadc83 | asks for the name of a page, and presents it sidebyside with the existing page, in editing mode if it's a wiki page | [
{
"docid": "34b1e1a66bb0729c371648e2900d2c2f",
"score": "0.0",
"text": "def sbs\n page = wikipage_selector(\"Choose page to view side-by-side with the current page\")\n exit unless page\n\n if cururl.index(\"localhost/wiki\")\n url = cururl.to_s + \"?do=edit&vecdo=print\"\n else\n # uses Insta... | [
{
"docid": "ea0d15e6a52c14188bab802715807648",
"score": "0.66765946",
"text": "def page\n name = @args[1]\n Ruhoh::Friend.say { \n red \"Please specify a path\"\n plain \" ex: ruhoh page projects/hello-world\"\n exit\n } if (name.nil? || name.gsub(/\\s/, '').empty?)\... |
71355bc4cbe0e3e77c2184e2fbfd3b2b | GET /tasks/new GET /tasks/new.json | [
{
"docid": "ea1f8eab1f2196636afe1fee7e84daf6",
"score": "0.0",
"text": "def new\n @task = current_user.tasks.new\n\n if params.has_key? :direction_id\n @task.direction_id = params[:direction_id].to_i\n end\n\n respond_to do |format|\n format.html # new.html.erb\n format.json {... | [
{
"docid": "78b707da30ac7813237a3b03e6162359",
"score": "0.8401033",
"text": "def new\n @task = tasks.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @task }\n end\n end",
"title": ""
},
{
"docid": "dab2cd6fe9d08b36ef02bb6fa6f29285... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "cedd3ce0b9dc7f3bef173cfdf29ca7be",
"score": "0.0",
"text": "def set_t_unidad\n @t_unidad = TUnidad.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;... |
e60a326ff8e4335f5924069fab261d6f | Outputs to the console the documentation of a manifest | [
{
"docid": "877266d0723dfcf6ff9e21ecee6a8105",
"score": "0.67560506",
"text": "def output(file, ast)\n raise _(\"RDOC SUPPORT FOR MANIFEST HAS BEEN REMOVED - See PUP-3638\")\n end",
"title": ""
}
] | [
{
"docid": "1113be4bd5ccafe1a3f2e9f133a3bef4",
"score": "0.67266566",
"text": "def output_manifest(title)\n puts '<?xml version=\"1.0\" standalone=\"no\" ?>'.red\n puts '<manifest identifier=\"D321SCORM-MANIFEST\" version=\"1.0\"'.red\n puts 'xmlns=\"http://www.imsproject.org/xsd/imscp_rootv1p1... |
b60a6e6ee02c1f04bae50865237df997 | POST /libraries or /libraries.json | [
{
"docid": "6b95621db21fa00b220b239be157e9fa",
"score": "0.64496106",
"text": "def create\n @library = Library.new(library_params)\n\n respond_to do |format|\n if @library.save\n format.html { redirect_to @library, notice: \"Library was successfully created.\" }\n format.json { ... | [
{
"docid": "7e060cf2def651ce633f642e0814a996",
"score": "0.7081886",
"text": "def create\n @library = current_user.libraries.create(library_params)\n render json: @library\n end",
"title": ""
},
{
"docid": "f2368a215dcb1363d4855e0634b46dd6",
"score": "0.6839391",
"text": "def ... |
0ae2b311b6be041784edac18acb43155 | PATCH/PUT /file_lists/1 PATCH/PUT /file_lists/1.json | [
{
"docid": "a6aabceb464e6419d10d42d21bbb8883",
"score": "0.7174998",
"text": "def update\n respond_to do |format|\n if @file_list.update(file_list_params)\n format.html { redirect_to @file_list, notice: 'File list was successfully updated.' }\n format.json { render :show, status: :... | [
{
"docid": "3bc8413505caf86f0b231bec70b6f220",
"score": "0.7060015",
"text": "def update_list(list_id, name)\n return base_uri('patch', 'lists/' + list_id, name)\n end",
"title": ""
},
{
"docid": "1f65cb325808ecef40843e22e097f9c7",
"score": "0.67232436",
"text": "def update_list(... |
1a6dbe4892c519863dac2bf3cc4292bf | Initialize an ungrouped relation | [
{
"docid": "3a497a1da5d91e139fde1bde0371554c",
"score": "0.0",
"text": "def initialize(operand, name)\n super(operand)\n @attribute = header[name]\n @outer = header - [attribute]\n @header = @outer.extend(attribute.header)\n end",
"title": ""
}
] | [
{
"docid": "533d390e82c9701e3797504d7092000c",
"score": "0.68888545",
"text": "def initialize(*)\n super\n @relations = {}\n end",
"title": ""
},
{
"docid": "3faec0894659154998109b5ec660cbc4",
"score": "0.60678065",
"text": "def initialize(*)\n super\n @relatio... |
a70482d1ed997b122512aeed93b635c8 | GET /f5_persist_records/new GET /f5_persist_records/new.json | [
{
"docid": "317b46b70086e7cdf7e8b6b1984c2a2e",
"score": "0.7630643",
"text": "def new\n @f5_persist_record = F5PersistRecord.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @f5_persist_record }\n end\n end",
"title": ""
}
] | [
{
"docid": "56f35508f8a85a3b5be2cc02a2dab7eb",
"score": "0.7075517",
"text": "def new\n @f5_persist_list = F5PersistList.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @f5_persist_list }\n end\n end",
"title": ""
},
{
"docid": "a1... |
c28cae2fd9d1b60ecf70335a629c0d40 | This was set to "after_save", but that prevents a group from even being able to be created that doesn't belong to an admin. It is fine to add them initally on new_records but there should be some way to remove them from the group if this is desired. | [
{
"docid": "45ebe7c7478842147fbd1da538cd1f2a",
"score": "0.0",
"text": "def add_admins_to(group)\n # Admins get access to new groups automatically\n Group.find($APPLICATION_SETTINGS.admin_group_id).users.each { |m| group.users << m }\n end",
"title": ""
}
] | [
{
"docid": "7192cff32f6b74f0b0e0be9fdcf992cb",
"score": "0.6369059",
"text": "def add_to_groups\n Group.where(admin: false).find_each do |g|\n gp = g.group_permissions.build(permission: self, permission_code: :deny)\n gp.save!\n end\n end",
"title": ""
},
{
"docid": "e7d307c... |
b10566e34804d342f173f55f43d3de9c | Ensure ODBC is mapping timebased fields to native ruby objects | [
{
"docid": "ee346d569454a2ffe52569b8157bb3ff",
"score": "0.0",
"text": "def configure_time_options(connection)\n connection.use_time = true\n end",
"title": ""
}
] | [
{
"docid": "901e33c9566b7db333663c948a572fe7",
"score": "0.6465403",
"text": "def dbms_type_cast(_columns, values)\n values.map do |value| \n _columns.zip(value).map do |c, v|\n # Custom formatting for time object\n # the default will be with timezone and without su... |
157050969b227229204d841f385c3887 | ========================================================================== executeSetRelativeBase : Execute an OP_SET_REL_BASE instruction. | [
{
"docid": "31a77ae172fe9ed8946906bbb1607454",
"score": "0.76605505",
"text": "def executeSetRelativeBase(opCode, opParams)\n\n\t\tvalue1 = opParams[:value1];\n\n\t\tresult = @reg_rel + value1;\n\t\ttraceOp(opCode, opParams, \"#{value1}, @reg_rel = #{result}\");\n\n\t\t@reg_rel = result;\n\n\tend",
... | [
{
"docid": "48d5af69bb18ba5a788995efd99ea19d",
"score": "0.5919334",
"text": "def base=(new_base)\n @base = Addressable::URI.parse(new_base)\n self.resources.each do |resource|\n resource.base = @base\n end\n self.methods.each do |method|\n method.base = @ba... |
b0683b731d93bcca8f58db0bfcc84a65 | Sets a new align size for the text | [
{
"docid": "a1c7af8196875030935c262476c8b0bb",
"score": "0.59099275",
"text": "def align=(align)\n set_align(align)\n generate_buffers\n end",
"title": ""
}
] | [
{
"docid": "284c98984399ae82cfebef3fd4aa0675",
"score": "0.72884494",
"text": "def settextalign(*)\n super\n end",
"title": ""
},
{
"docid": "edea2dfb7f8e87cf03d315fa1a919b7c",
"score": "0.68697757",
"text": "def aligned\n case align\n when :right then text.rjust(w... |
2e4fc5de5d960217eedd6c8965a781b4 | Calls the given block once for each pair in data. | [
{
"docid": "25eabae91c673855cc5529da71ed00f8",
"score": "0.6383237",
"text": "def each(&block)\n @data.each &block\n end",
"title": ""
}
] | [
{
"docid": "19a975a148d26cec554716311b9beaaf",
"score": "0.7602374",
"text": "def each_pair(&block)\n @data.each_pair(&block)\n end",
"title": ""
},
{
"docid": "5e3b0bcc3f895816c99f0929643d8ae3",
"score": "0.71474993",
"text": "def each_pair(&block)\n @data.each do |item|\n ... |
c444aee910f264906341ce7efd8877cd | GET /crawling_everytimes GET /crawling_everytimes.json | [
{
"docid": "a24305819a9921570899bf5a00363cd5",
"score": "0.0",
"text": "def index\n @crawling_everytimes = CrawlingEverytime.all.order(\"created_at DESC\").page(params[:page]).per(20)\n \n @province_list = Array.new\n CrawlChunFineDust.all.each do |x|\n @all_province_list = @province_li... | [
{
"docid": "6f9eb045db6060135033849b8e099fa0",
"score": "0.6720133",
"text": "def set_crawling_everytime\n @crawling_everytime = CrawlingEverytime.find(params[:id])\n end",
"title": ""
},
{
"docid": "53cc9a82f71b046c6d555d15f2958a43",
"score": "0.62680876",
"text": "def index... |
f29d6cbdd80e0191c46a11fe8e580e17 | sort small items ascending by how many will fit with a large item | [
{
"docid": "269a3124aa9fcb7a86b46a4e8d93a1c3",
"score": "0.0",
"text": "def compare(x,y)\n a = CachedProduct.find_by_product_id(x['product_id'].to_s)\n b = CachedProduct.find_by_product_id(y['product_id'].to_s)\n return a.max_small <=> b.max_small\n end",
"title": "... | [
{
"docid": "ee71c8aa6952e88137de4ef98b3ef6ab",
"score": "0.69872326",
"text": "def sort_variants_by_size\n end",
"title": ""
},
{
"docid": "cae98550f3c49dd22e1d54ce13decb31",
"score": "0.68828523",
"text": "def sort_large_to_small(company_class)\n company_class.all.sort_b... |
5f0c3b4ed4cf553cd70b1662bfe7981e | Empty means, there are no element in the output_queue. | [
{
"docid": "953b849ba16cbbe84041c790dba41d9d",
"score": "0.85983485",
"text": "def empty?\n @output_queue.empty?\n end",
"title": ""
}
] | [
{
"docid": "8be8014236eaf3c384dfb7c3e8022f5a",
"score": "0.81548303",
"text": "def empty()\n @queue.empty?\n end",
"title": ""
},
{
"docid": "7189984d0c7dd2fccea9fbc8b278fe34",
"score": "0.8000594",
"text": "def is_empty()\n @queue.empty?\n end",
"title": ""
},
... |
df81dd8add891cb04f643d644ca89bfa | Mark example as failed via unique key | [
{
"docid": "8d9df8ef70a6a904b7d27d7c7317428b",
"score": "0.7118208",
"text": "def example_failed(example)\n record_result(example, true)\n end",
"title": ""
}
] | [
{
"docid": "4e24e955d0ea5634fa0168dee5ed9cac",
"score": "0.7275528",
"text": "def failed_example_ids=(_); end",
"title": ""
},
{
"docid": "deb2788ac5c4575a0eb658073c63ec0a",
"score": "0.6880089",
"text": "def mark_failed\n @failure = true\n end",
"title": ""
},
{
... |
d0a7648f49d74c7d1a0d28e3b008b314 | Return the critical path for a PERT network If the given graph is not a PERT network, return nul | [
{
"docid": "3dcb417f9f0f42a6fb086cc7ba65f037",
"score": "0.5968623",
"text": "def critical_path\n return nil if range.include?(nil) or @graph.type != \"digraph\"\n r = [ [0, [1]] ]\n\n critical_path_recursion( distance_matrix, adjancy_matrix, r, [], 0 ).inject( {:distance => 0, :... | [
{
"docid": "a0dee9a2156ff91eb87d8a6722422688",
"score": "0.5203748",
"text": "def minimum_vertex_cover(flow_graph, assignments)\n # Konig's theorm tells us that, given:\n # a bipartate graph G, with vertices partitioned into students S and companies C,\n # and edges E (all of which curren... |
9943f0c29c0fdd87fde65ac476445d61 | $stderr must be set to the new value before the old value is destroyed. If the setting is done at the end (as in superclasses), writes will fail. | [
{
"docid": "54fddd2c3974b7d8600aacdef41e70f3",
"score": "0.0",
"text": "def pop_binding\n previous = @environment.pop_binding(name)\n set_global\n apply_value_destructor(previous) if @value_destructor\n destroy if @environment.unbound?(name)\n end",
"title": ""
}
] | [
{
"docid": "d49f19e84f62a80c28a848982dd73b46",
"score": "0.7381944",
"text": "def stderr!(stderr)\n @stderr = stderr\n self\n end",
"title": ""
},
{
"docid": "61526a0778b1dfe30179ca46d54fe03c",
"score": "0.72270024",
"text": "def restore_stderr\n $stderr = @origin... |
3334758743504421941060c80e7521ca | List Cluster Node Configurations Returns information about all NSX cluster nodes. Deprecated. Use GET /cluster to get cluster configuration. | [
{
"docid": "12050d57c54a36bb21e361881c951269",
"score": "0.6343256",
"text": "def list_cluster_node_configs_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: ManagementPlaneApiNsxComponentAdministrationClusterManagementApi.list_cluste... | [
{
"docid": "feb4da8bb1585a7566d2f5dbe5bb74e7",
"score": "0.7600087",
"text": "def list_cluster_node_configs(opts = {})\n data, _status_code, _headers = list_cluster_node_configs_with_http_info(opts)\n data\n end",
"title": ""
},
{
"docid": "1d422ecedae0234b0beddaf4797eb4c3",
... |
f257a541bc8c6cea3d5896b1206de1b6 | The pane object for the sheet view | [
{
"docid": "1e95b1e3e02c9005e334fc56b335479a",
"score": "0.6945327",
"text": "def pane\n @pane ||= Pane.new\n yield @pane if block_given?\n @pane\n end",
"title": ""
}
] | [
{
"docid": "88c863eb07bf8a8f254599552e25eeed",
"score": "0.73874116",
"text": "def pane; end",
"title": ""
},
{
"docid": "88c863eb07bf8a8f254599552e25eeed",
"score": "0.73874116",
"text": "def pane; end",
"title": ""
},
{
"docid": "7c2783e17335b619a081a09f80cff68b",
"... |
d3d3a61d891f3e92b0e386dde3c3f6a9 | Try to focus on using correct technical vocabulary. Use the to create a new comment Build a Bear Define function build_a_bear with arguments: name, age, fur, clothes, and special power. | [
{
"docid": "f0da5cd7804585de1ac77eaea77f3d87",
"score": "0.6362242",
"text": "def build_a_bear(name, age, fur, clothes, special_power)\n # Add greeting variable by using a string and add the name argument with interpolation\n greeting = \"Hey partner! My name is #{name} - will you be my friend?!\"\n ... | [
{
"docid": "20dfc418df75d5f761eea62c07948f01",
"score": "0.67372",
"text": "def build_a_bear(name, age, fur, clothes, special_power)\n # define greeting var that uses it's name\n greeting = \"Hey partner! My name is #{name} - will you be my friend?!\"\n # define a demographics array that includes nam... |
b831db6595b6f63ae3505cfb72229903 | Test for converting document to one of the available formats. | [
{
"docid": "539f9de802bafd7509ba275555bb82af",
"score": "0.0",
"text": "def test_save_as_docx\n local_name = '45.pdf'\n remote_name = 'TestSaveAsFromPdfToDoc.pdf'\n\n upload_file File.join(local_test_folder, local_folder + '/' + local_name), remote_folder + '/' + remote_name\n\n requ... | [
{
"docid": "631c87cf2b0c2bb40e473bdad647c0e5",
"score": "0.6785524",
"text": "def can_convert?\n extractor = Docsplit::PdfExtractor.new\n extractor.libre_office? || extractor.open_office? rescue false\n end",
"title": ""
},
{
"docid": "5807cfbe628bb9bbb23744a14699c46b",
"score": "... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "d0c534290de8ac8a1224369a2a105da4",
"score": "0.0",
"text": "def tutor_params\n params.require(:tutor).permit(:image, :rut, :name, :lastname, :surname, :address, :commune_id, :state, :city, :country, :phone, :school, :level, :course, :user_id)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7497801",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.6957249",
"text": "def strong_params\n params.require(:request).permit(param_white... |
f4af93d8bf6ab4b02f09cdd57fef9277 | def title_case self.title.downcase end | [
{
"docid": "57435b30da4d3ae35f519530afbdae4a",
"score": "0.0",
"text": "def check_post\n old_post = Post.find(self.id)\n if title != old_post.title || body != old_post.body\n true\n else\n false\n end\n end",
"title": ""
}
] | [
{
"docid": "64e6dffebf89241ba360a46d1678fac2",
"score": "0.91156733",
"text": "def make_title_case\n self.title = self.title.titlecase\n end",
"title": ""
},
{
"docid": "3c33a86ccf4f0f1e79b335cb3c01164a",
"score": "0.9054954",
"text": "def titlecase_title\n self.title=(title()... |