query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
343321407ca683cf49b52d1f34d05950 | Me busca la plan por el id, el servicio, o el nombre | [
{
"docid": "2766394d77081a7333e75d2f92c2a473",
"score": "0.69956356",
"text": "def set_plan_buscar\n campo = params[:campo]\n valor = params[:valor]\n if campo == 'id'\n @plan = Plan.find(valor)\n elsif campo == 'servicio'\n ... | [
{
"docid": "bb774cb2b32ba77071e4ac88097dabc4",
"score": "0.6355362",
"text": "def show\n #@servicos = Servico.where('profissional_id = ?', params[:id])\n #@servicos_realizados = RegistrosServicosRealizado.select(:id, :servico_id, )\n end",
"title": ""
},
{
"docid": "bd72d0d5ecffc4d31d... |
066675d4dedb4f6f6bebce652b9d552f | Execute the Choreo using the specified InputSet as parameters, wait for the Choreo to complete and return a ResultSet containing the execution results. | [
{
"docid": "99b993973ac96d33d3afaddfd00c87ec",
"score": "0.0",
"text": "def execute(input_set = nil)\n resp = super(input_set)\n results = ChecksumResultSet.new(resp)\n return results\n end",
"title": ""
}
] | [
{
"docid": "c4ca32683e8ce75eb6a187d63df8fa77",
"score": "0.76645917",
"text": "def execute(input_set = nil)\n resp = super(input_set)\n results = DoneResultSet.new(resp)\n return results\n end",
"title": ""
},
{
"docid": "6f7a7d9be674ad4cf17d6743eb1f7836",
"scor... |
066e73e8c3598e1fb7e794dcd57c302b | Get an Existing Section Returns information about firewall section for the identifier. | [
{
"docid": "8a346042e4df390544f805e0c202d756",
"score": "0.56507385",
"text": "def get_section(section_id, opts = {})\n data, _status_code, _headers = get_section_with_http_info(section_id, opts)\n data\n end",
"title": ""
}
] | [
{
"docid": "767981b4cac91adf3d5e353e7c354ce2",
"score": "0.64419913",
"text": "def get_section(section_id)\n self.sections.find { |s| s.id == section_id }\n end",
"title": ""
},
{
"docid": "f4bc391d7ddc17843afa3fb73ffdcff8",
"score": "0.6154032",
"text": "def section\n retur... |
d55001d29f089a009cdb85f5d753192f | Normalizes and weights a node for aggregation during score tree traversal. | [
{
"docid": "d97afe275b307f68e7b21e5c20b21ed2",
"score": "0.75115037",
"text": "def score_node( node, normalized )\n if node['parent_id'] == 0\n normalized = rank_scale_root( node, normalized )\n elsif node['children'].length == 0\n normalized = score_base_node( node, normalized )\n el... | [
{
"docid": "20286d3da911297d9963dbccbbaf8b3a",
"score": "0.70377064",
"text": "def normalize\n puts \"[debug] [normalize] node weight: #{@weight.class}\"\n if @is_leaf == 1\n @@validations.each do |validation|\n puts \"[debug] [normalize] current validation: |#{validation[0].class}|#{v... |
9de05943c144ab3422bbc9cf60bd5d7b | The system will use a file called '.motd' to track when the user last was alerted to messages. This method should be called when the message of the day page is checked so that the dashboard knows when the user last viewed the page. Calling self.touch will create the .motd file, or update the timestamp if it already exi... | [
{
"docid": "6932621f98059a0c395d60250c9ab252",
"score": "0.55319846",
"text": "def touch\n FileUtils.mkdir_p(File.dirname(motd_config_file)) unless File.exists?(motd_config_file)\n FileUtils.touch(motd_config_file)\n end",
"title": ""
}
] | [
{
"docid": "f7906b286a1227653f79946f616d577b",
"score": "0.66642565",
"text": "def touch()\r\n self.modification_time = Time.now\r\n end",
"title": ""
},
{
"docid": "b7e3c942c817783d39bb29d59d2bee1b",
"score": "0.6544795",
"text": "def touch\n\n @last_modified = Time.now\n ... |
d5bef55e0f5b1aca2a62197cedbe8228 | Create reverse complement of DNA. dna DNA sequence Return reverse complement. | [
{
"docid": "a32185ed3f3f1e2e428bd7d72dba515a",
"score": "0.7924026",
"text": "def reverse_complement(dna)\n\t\tcomplement = []\n\t\tdna.each_char do |s|\n\t\t\tif s == 'A'\n\t\t\t\tcomplement << 'T'\n\t\t\telsif s == 'T'\n\t\t\t\tcomplement << 'A'\n\t\t\telsif s == 'G'\n\t\t\t\tcomplement << 'C'\n\t\t\t... | [
{
"docid": "7081bd62931572ba2132f783ce1e3d94",
"score": "0.7961626",
"text": "def reverse_complement(dna)\n return \"Invalid sequence\" if dna.count(\"ACGTacgt\") != dna.size\n dna.gsub!(/[ACGT]/, 'A' => 'T', 'C' => 'G', 'T' => 'A', 'G' => 'C', 'a' => 't', 'c' => 'g', 't' => 'a', 'g' => 'c')\n dna.re... |
f367cde9f1b374c33228bff62ed68825 | Does this key exist in the children? | [
{
"docid": "467444d45a279f1b295d11a7a288f0d1",
"score": "0.0",
"text": "def exists?(name)\n self[name] != nil\n end",
"title": ""
}
] | [
{
"docid": "31a9f7e403f7a6cfea825611368b22d6",
"score": "0.7548131",
"text": "def has_key?(key)\n local?(key) || (!@parent.nil? && @parent.key?(key))\n end",
"title": ""
},
{
"docid": "8feba21397aaff08103d73c2059cd2c2",
"score": "0.73615146",
"text": "def knows_key?( name )\n... |
b0ffc9a4ff83b64fc232f9a4070ff255 | DELETE /activo/cis/1 DELETE /activo/cis/1.json | [
{
"docid": "2fadec09c6a97623ec7d9e3937074dc2",
"score": "0.66219133",
"text": "def destroy\n @activo_ci = Activo::Ci.find(params[:id])\n if @activo_ci.destroy\n flash[:notice] = 'Eliminado Correctamente'\n end\n \n respond_to do |format|\n format.html { redirect_to activo_cis_ur... | [
{
"docid": "b1a17c1ee1af05c79fe156622df44818",
"score": "0.72118753",
"text": "def delete(path)\n begin\n response = client[path].delete :accept => 'application/json'\n rescue Exception => e\n puts e.inspect\n end\n end",
"title": ""
},
{
"docid": ... |
0ac80dc1e04c774f964cf927a08e2425 | Confirms a student loggedin user. | [
{
"docid": "5826b0f502699e20d6b628034e0bded6",
"score": "0.63053286",
"text": "def student_logged_in\n unless student_logged_in?\n redirect_to root_url, flash: {danger: '请登录学生'}\n end\n end",
"title": ""
}
] | [
{
"docid": "b0d7d8878f54dc0fb01b5ba8e00cfb7b",
"score": "0.7057963",
"text": "def confirm_logged_in\n unless session[:student_id]\n flash[:notice] = \"Please log in.\"\n redirect_to(access_login_path)\n # redirect action prevents action from logging, so be careful\n end\n end",
... |
08d5b26d4b76e32d6cbb0fcea3059c04 | Returns true if given gem does not exist | [
{
"docid": "ae3a0b4ade91b1b8d49080769b9efa10",
"score": "0.87383676",
"text": "def gem_does_not_exist?(gem)\n !gem_exist?(gem)\n end",
"title": ""
}
] | [
{
"docid": "252a2c78cb000a04355e8a475c31a2fa",
"score": "0.8400149",
"text": "def gem_exists? gem\n ! Gem::Specification.find_all_by_name(gem).empty?\n end",
"title": ""
},
{
"docid": "d6413e262b2a883b27cb6402c9562680",
"score": "0.7976554",
"text": "def gem_installed?(gem = name... |
85de9b819ad80b08504da507fd4821f3 | guestint: run onguest integration tests | [
{
"docid": "f3069ddce5ae1c1ae2bf9e53b7f5c640",
"score": "0.0",
"text": "def main(node: \"labs01\", provider: \"virtualbox\", retest: false, guestint: true, verbose: true, dependencies: false)\n [node, provider, retest, guestint, verbose]\n $node = node\n options = {}\n\n $chef_dir = \"\"\n $vagrant... | [
{
"docid": "14f09e5812975f51f172980fcb51ace0",
"score": "0.6478613",
"text": "def run_interactive_tests\n run_tests('test/system')\n end",
"title": ""
},
{
"docid": "7231828068df8abc3b9e303a0e6a0d78",
"score": "0.6464368",
"text": "def test_guest_can_check__in\n assert_equ... |
b810c6cf1bae5fe627c44ff9b2f6a801 | Return true when ruby is running in symbian. TODO: who knows what symbian returns? | [
{
"docid": "7d236591eb8c9edf0af8d09ad1b9ae8c",
"score": "0.8782389",
"text": "def symbian?\n RbConfig::CONFIG[\"host_os\"] =~ /symbian/\n end",
"title": ""
}
] | [
{
"docid": "a249eb7d5a48f86c9c0e3d78d3303c69",
"score": "0.7886691",
"text": "def detect_symbian_o_s()\r\n if (user_agent.include?(DEVICE_SYMBIAN) || user_agent.include?(DEVICE_S60) || user_agent.include?(DEVICE_S70) || user_agent.include?(DEVICE_S80) || user_agent.include?(DEVICE_S90))\r\n ... |
c33df2d1eb7e5f923fd22126d92bfd06 | TODO HZ: provided by user | [
{
"docid": "0f11a16033c87248e19a9a38d0634646",
"score": "0.0",
"text": "def is_customer?\n if self.is_a? Patient\n return true\n end\n false\n end",
"title": ""
}
] | [
{
"docid": "316eb5edbf5bd1e3496835fc2eb0b299",
"score": "0.6585773",
"text": "def cstime=(*) end",
"title": ""
},
{
"docid": "d67a5209cbeedf518097d2a6c15dc1d1",
"score": "0.6499424",
"text": "def time; end",
"title": ""
},
{
"docid": "d67a5209cbeedf518097d2a6c15dc1d1",
... |
25119db9665f935d89001679d72a6745 | Continue work for each robot | [
{
"docid": "d7bf5916e0751ed14b46cc8dba73f806",
"score": "0.750228",
"text": "def continue_work\n robots.each {|r| r.async.continue_work}\n end",
"title": ""
}
] | [
{
"docid": "980cf2228131c739bf8be0a083ea6cd4",
"score": "0.66167897",
"text": "def pause_work\n robots.each {|r|\n Logger.info \"pausing #{r.name}\"\n r.async.pause_work\n }\n end",
"title": ""
},
{
"docid": "980cf2228131c739bf8be0a083ea6cd4",
"score": "0.66167... |
74ca1a7daa86a28bc76840ee6c3f8788 | Returns a FilePath object referring to the directory in which Javadoc API documentation is generated. | [
{
"docid": "20eb16179d060fef958cec8bb64e82e4",
"score": "0.88140357",
"text": "def javadoc_directory\n FilePath.new(@build_dir, 'doc', 'api')\n end",
"title": ""
}
] | [
{
"docid": "1dee7e6709050ab0bfb00352d556e551",
"score": "0.78644764",
"text": "def path\n http_url RDoc::RDoc.current.generator.file_dir\n end",
"title": ""
},
{
"docid": "940478ec061bf26fd950cb7fa1ae548a",
"score": "0.76158553",
"text": "def path\n http_url @store.rdoc.genera... |
501ca32a61a9de88c3f9917d7190d7d5 | PUT /test_cases/1 PUT /test_cases/1.xml | [
{
"docid": "b1bef1e3b2d0d8a4a279e2b78f7819db",
"score": "0.5960225",
"text": "def update\n @test_case = TestCase.find(params[:id])\n @test_case.problems.each do |problem|\n permitted_to! :update, problem\n end\n\n respond_to do |format|\n if @test_case.update_attributes(permitted_p... | [
{
"docid": "9ddf960eb3f437e62b9b99d34992bc0f",
"score": "0.7237769",
"text": "def test_should_update_status_post_via_API_XML\r\n get \"/logout\"\r\n put \"/status_posts/1.xml\", :api_key => 'testapikey',\r\n :status_post => {:body => 'API Status Post 1' }\r\n assert_resp... |
16fea818485094bdc62ff5da6eb1f314 | Settings for autocomplete suggesters. | [
{
"docid": "b2094426fa456e7b2e27b03df3947057",
"score": "0.8327553",
"text": "def autocomplete_suggesters!(config)\n config.autocomplete_path = 'suggest'\n config.autocomplete_suggester = 'suggest'\n super(config, '%s_suggest')\n end",
"title": ""
}
] | [
{
"docid": "7ebaa7ff2b3d25b725b07270b3535514",
"score": "0.83120733",
"text": "def autocomplete_suggesters!(config)\n config.autocomplete_path = 'suggest'\n config.autocomplete_suggester = 'defaultSuggest'\n super(config, '%sSuggest')\n end",
"title": ""
},
{
"docid": ... |
41ddfedb3aefd6c558b3beb1d970bdf3 | Filter to disable autorenewal of the session. === Return true:: Always returns true | [
{
"docid": "fa507c42ce1c53c487401f544f4562d4",
"score": "0.6941565",
"text": "def global_session_skip_renew\n request.env['global_session.req.renew'] = false\n true\n end",
"title": ""
}
] | [
{
"docid": "515825e3d89d297c9c5a6776d7569177",
"score": "0.6961194",
"text": "def skip_session_limitable?\n false\n end",
"title": ""
},
{
"docid": "f01b42d52223d8966d1ddedb87fbccba",
"score": "0.6877359",
"text": "def disable_sessions; end",
"title": ""
},
{
... |
74f97aa2b9280dfc78a10d69dc117188 | Returns a new relation expressing a less than or equal condition in WHERE according to the conditions in an argument hash Conference.where.lt(date: DateTime.new(2018, 3, 18)) SELECT FROM conferences WHERE conferences.date <= '20180318 00:00:00' | [
{
"docid": "89668093ff3905c1f6cbb6efc1a64aec",
"score": "0.0",
"text": "def lte(opts, *rest)\n ensure_proper_attributes(opts)\n prepare_where(Arel::Nodes::InfixOperation, '<=', opts, rest)\n end",
"title": ""
}
] | [
{
"docid": "9298a638937f778607f18c2f563d0dd2",
"score": "0.551493",
"text": "def on(date)\n filter { |record| (record.begin_cov <= date) & (record.disenr_dt >= date) }\n end",
"title": ""
},
{
"docid": "34ea0dac6add25964215a7e3b573af36",
"score": "0.5504761",
"text": "def... |
13c8701f88c7b7af0fe8ed2990a7215d | Action required to access the static page which gives information about Unpolarise | [
{
"docid": "019751ea4a56f9e966733eff56719cf2",
"score": "0.0",
"text": "def about\n end",
"title": ""
}
] | [
{
"docid": "77a56d4b034b008c8fa3326077209bc4",
"score": "0.7148897",
"text": "def details\n # renders static page\n end",
"title": ""
},
{
"docid": "58124bdc0d876de67a286edea5945a1e",
"score": "0.6382649",
"text": "def person_info_page(datum)\n return nil if datum.sl_url.b... |
f4c5e9479a3c283a9c4ce7c0c5f1679c | POST /click_types POST /click_types.json | [
{
"docid": "a1afde9422694f4a75f2456307bd3844",
"score": "0.70077306",
"text": "def create\n @click_type = ClickType.new(params[:click_type])\n\n respond_to do |format|\n if @click_type.save\n format.html { redirect_to @click_type, notice: 'Click type was successfully created.' }\n ... | [
{
"docid": "7f5afc1c0f4d5d48552326a55806c849",
"score": "0.61979353",
"text": "def new\n @click_type = ClickType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @click_type }\n end\n end",
"title": ""
},
{
"docid": "f5ae089a4e930fb... |
1adabd0aba22129d0ef73b386a8e5573 | return id of the givennamed user. +session+ string that represents user session +name+ name of a user +return[0]+ true or false whenever is successful or not +return[1]+ if an error occurs this is error message, if successful this is the id of the user | [
{
"docid": "3003062cfffb622c9a599ebeafd1daa9",
"score": "0.76379347",
"text": "def ask_id(session, name)\n read_task('rvpe.user.ask_id', session) do\n u = User.find_by_name(name).last\n raise \"User[#{name}] is not found.\" unless u\n\n [true, u.id]\n end\n ... | [
{
"docid": "fb35caf5cb275a6338eceb4080be09d1",
"score": "0.71395415",
"text": "def get_user_id(user_name)\n # tbd\n 17\n end",
"title": ""
},
{
"docid": "3671971a100174d55ee7840291f100ce",
"score": "0.7015055",
"text": "def retrieve_user_id\n return session[:user_id] if ses... |
28f5b0671c63516a63d57750485bc8ff | GET /forms/1 GET /forms/1.xml | [
{
"docid": "0301f636bb2fdd7fec411ad859a2d8c0",
"score": "0.65875304",
"text": "def show\n @form = Form.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @form }\n end\n end",
"title": ""
}
] | [
{
"docid": "312798fa69ee7bcd7be50e37da3e8505",
"score": "0.74987894",
"text": "def retrieve_forms()\n start.uri('/api/form')\n .get()\n .go()\n end",
"title": ""
},
{
"docid": "13aefead838a0046350eb8dfc3a85237",
"score": "0.6818806",
"text": "def index\n ... |
9bdc40ad6db72abc3f95fc57fa627fb9 | GET /presents GET /presents.json | [
{
"docid": "6d1e3844339e3ad1696e45421d194ec0",
"score": "0.6553105",
"text": "def index\n # set user to either the one specified in the url or the current user\n user = (url_user.present? ? User.find(url_user) : current_user)\n @presents = Present.where(user: user)\n end",
"title": ""
}
... | [
{
"docid": "fb5ac99f1705d91fed5e10cbf13d5542",
"score": "0.7815008",
"text": "def index\n @presents = Present.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @presents }\n end\n end",
"title": ""
},
{
"docid": "a3d7893d81d0646bb1... |
5a0d6c813894bb44abdd98abf5ca6ae8 | TODO cookie[:hadean_user_id] value needs to be encrypted Authlogic persistence_token might work here | [
{
"docid": "2ecb3edc841f92acd694be6d30bc57ba",
"score": "0.64791155",
"text": "def random_user\n return @random_user if defined?(@random_user)\n @random_user = cookies[:hadean_uid] ? Customer.find_by_authentication_token(cookies[:hadean_uid]) : nil\n end",
"title": ""
}
] | [
{
"docid": "83388fa2ff0bbc9cd0d573f6bdf6e65f",
"score": "0.6938896",
"text": "def user_id_in_cookie # :doc:\n if current_user\n response.set_cookie \"user_id\", :value => (current_user ? current_user.id : \"\"), :path => \"/\"\n else\n response.delete_cookie \"user_id\"\n en... |
a0075c000539ade29aaa39b76b8a3741 | POST /squares POST /squares.json | [
{
"docid": "eac2e736138e761465b8b22e0db17e54",
"score": "0.69465137",
"text": "def create\n @square = Square.new(params[:square])\n\n respond_to do |format|\n if @square.save\n format.html { redirect_to @square, notice: 'Square was successfully created.' }\n format.json { render... | [
{
"docid": "b0782d7652f790e8c66301f1293fcc2d",
"score": "0.69469273",
"text": "def create\n @square = square_class.new(square_params)\n\n respond_to do |format|\n if @square.save\n format.html { redirect_to squares_path, notice: 'Square was successfully created.' }\n format.json... |
6d82db018c65bc4e424f18716892e76f | =begin def multisum(num) sum = 0 1.upto num do |index| sum += index if multiple?(index, 3) || multiple?(index, 5) end sum end =end | [
{
"docid": "14472a91244df6e551d0a97ccbd6d00e",
"score": "0.84246117",
"text": "def multisum(max_num)\n (1..max_num).inject(0) do |sum, num|\n multiple?(num, 3) || multiple?(num, 5) ? sum + num : sum\n end\nend",
"title": ""
}
] | [
{
"docid": "e922fe44d918ee236b7ad447de3a27e5",
"score": "0.8859839",
"text": "def multisum(num)\n total = 0\n 1.upto(num) do |i|\n total += i if i % 3 == 0 || i % 5 == 0\n end\n total\nend",
"title": ""
},
{
"docid": "8ff31596a95eaf7c89d246986846fa69",
"score": "0.88536847",
"... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "4709ddc577d93951a711d03ee7195e37",
"score": "0.0",
"text": "def set_accommodation\n @accommodation = Accommodation.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;... |
ea28371360fa0087e37442defdcef10e | Check if esi processing applies to response | [
{
"docid": "bc3f341d30af8f7cd749b8efa566feb2",
"score": "0.75448364",
"text": "def applies_to?(response)\n status, header, body = response\n\n # Some stati don't have to be processed\n return false if [301, 302, 303, 307].include?(status)\n\n # Check mime type\n return false if ... | [
{
"docid": "a7a681792a5bc5a11073e03f54b6e1cd",
"score": "0.591019",
"text": "def contains_response_and_soln?() false ; end",
"title": ""
},
{
"docid": "b1bebe8c9197f2088ff2f36801e2c62a",
"score": "0.58763736",
"text": "def seperate?(response)\n r = response\n r.tt == :a... |
cc3c57621af4243140d9bbd9ee1f5942 | GET /fruits/1 GET /fruits/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "eab8e19b0afd413f675f9c85a823b50e",
"score": "0.652848",
"text": "def index\n @fruits = Fruits.all\n\n end",
"title": ""
},
{
"docid": "7f28214bb9a7de383132d40b0176302f",
"score": "0.6473293",
"text": "def index\n @fruits = Fruit.all\n end",
"title": ""
},
... |
8fc9950cd8e4aa70e4fd8c367240b736 | Overrides any title elements you've already set. It's more conventional to use the << operator instead. | [
{
"docid": "e28ca1e685017dda5b35f677dc7984a8",
"score": "0.7297876",
"text": "def title=(val)\n @title = Array(val)\n end",
"title": ""
}
] | [
{
"docid": "7764e75c572855a7dbca7f658db143b3",
"score": "0.7778817",
"text": "def append_to_title\n self.title = '* ' + self.title + ' *'\n end",
"title": ""
},
{
"docid": "a3a853d72df67da4024de8538bb13575",
"score": "0.76726586",
"text": "def set_title\n @title = 'Gene M. Ang... |
d1025b7cbe0eeea89757f8de469f7158 | Return the plugin registry for a specific adapter | [
{
"docid": "d4aac0a8e8a5fc71ef388309bda93a2e",
"score": "0.70739746",
"text": "def adapter(name)\n registries[name]\n end",
"title": ""
}
] | [
{
"docid": "8e5be56a0fda806e74f6a4c3b3308e00",
"score": "0.6419323",
"text": "def plugins_for(type, adapter)\n case type\n when :configuration then configuration\n when :command then commands.adapter(adapter)\n when :mapper then mappers.adapter(adapter)\n when :rela... |
47cad9d5f09832110b315878fefa4b5a | Sets the attribute update_url | [
{
"docid": "59c5f99112c23e5efc3d25bc3ee456de",
"score": "0.7219988",
"text": "def update_url=(_arg0); end",
"title": ""
}
] | [
{
"docid": "de1007dcf4f3e51b466acc4590a4df6f",
"score": "0.75835216",
"text": "def update_url; end",
"title": ""
},
{
"docid": "de1007dcf4f3e51b466acc4590a4df6f",
"score": "0.75835216",
"text": "def update_url; end",
"title": ""
},
{
"docid": "86a56f52b0b8a99f5fb2ea07cb95... |
cefbea4a87444d2ca6468fa03617eac6 | checks login data and starts session | [
{
"docid": "0f09a22835b168f805152c1ad5588821",
"score": "0.0",
"text": "def create\n reset_session # prevent session fixation\n par = login_params\n @email = par[:email]\n user = User.find_by(email: par[:email])\n if user && user.authenticate(par[:password])\n # Save the user id in t... | [
{
"docid": "aca6ce1973ad48453e0052624c18ecd9",
"score": "0.8117326",
"text": "def check_login\n \t\t\tif self.session == nil\n \t\t\t\t login\n \t\t\tend\n \tend",
"title": ""
},
{
"docid": "a2b8028032283762d30eb1c0e347544f",
"score": "0.7898633",
"text": "def be... |
9e27bedbf153803a86e4d65463e121a8 | This should return the minimal set of values that should be in the session in order to pass any filters (e.g. authentication) defined in ContactesController. Be sure to keep this updated too. | [
{
"docid": "edadba5deb4bae5404c019e47e869241",
"score": "0.63200873",
"text": "def valid_session\n {\"warden.user.user.key\" => session[\"warden.user.user.key\"]}.merge(return_to: contacts_path)\n end",
"title": ""
}
] | [
{
"docid": "9f92d47af33622105e6a21e1b3c1961c",
"score": "0.65626544",
"text": "def get_session_vals\n if logged_in?\n user = User.find_by(id: session[:user_id])\n session_values = {\n 'user_id' => session[:user_id],\n 'User Name' => user.name,\n 'User Email' => user.ema... |
cd6b4c4192dcd49816b5550ed7986895 | PATCH/PUT /lactic_matches/1 PATCH/PUT /lactic_matches/1.json | [
{
"docid": "91ab6abf9120a05ce564863f24dc67eb",
"score": "0.69583946",
"text": "def update\n # puts \"IN LACTIC UPDTAE #{params.inspect}\"\n # respond_to do |format|\n # if @lactic_match.update(lactic_match_params)\n # format.html { redirect_to @lactic_match, notice: 'Lactic match was s... | [
{
"docid": "4e7e179854f706f9d4296073446e79aa",
"score": "0.6595705",
"text": "def update\n if @match.update(match_params)\n render json: @match\n else\n render json: @match.errors, status: :unprocessable_entity\n end\n end",
"title": ""
},
{
"docid": "2c0bb0aa9dff6e224e4e... |
2c92b28a40ff2ac075e02c6aff4d932d | Subject can be set in your I18n file at config/locales/en.yml with the following lookup: en.admin_mailer.project_invitation.subject | [
{
"docid": "dee217a6ca27bce047bd73823e9a1314",
"score": "0.0",
"text": "def project_invitation\n @greeting = \"Hi\"\n\n mail :to => \"to@example.org\"\n end",
"title": ""
}
] | [
{
"docid": "ea740e704e8f1173fb87b45dfcaaf989",
"score": "0.7706708",
"text": "def subject_for(key)\n I18n.t(:subject, scope: [:mailer, key])\n end",
"title": ""
},
{
"docid": "8928fe4f050d7ebd3e9aa992b07e320a",
"score": "0.7604194",
"text": "def subject_for\n ActiveSupport... |
9aa6223617084384b1dbb06960eb8a93 | GET /tipos_movimientos/new GET /tipos_movimientos/new.xml | [
{
"docid": "cb5e37640b3c99146f98bea4cc37d1b8",
"score": "0.75048983",
"text": "def new\n @tipos_movimiento = TiposMovimiento.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @tipos_movimiento }\n end\n end",
"title": ""
}
] | [
{
"docid": "56fc0ca791280dbd31a9e52fda7fd942",
"score": "0.7246672",
"text": "def create\n @tipos_movimiento = TiposMovimiento.new(params[:tipos_movimiento])\n\n respond_to do |format|\n if @tipos_movimiento.save\n format.html { redirect_to(@tipos_movimiento, :notice => 'TiposMovimient... |
2ae00c0da987a41550ee3474333b2f63 | Update Meeting Recording Settings Update settings applied to a meeting&39;s [Cloud Recording]( Scopes: &x60;recording:write:admin&x60; &x60;recording:write&x60; | [
{
"docid": "56b0fba704563bc47f8e56d2a721006f",
"score": "0.6883904",
"text": "def recording_settings_update_with_http_info(meeting_id, body, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: CloudRecordingApi.recording_settings_update ...'\n en... | [
{
"docid": "9b8b9ca0c37b641330ccd43f6101e018",
"score": "0.69293326",
"text": "def recording_setting_update_with_http_info(meeting_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: CloudRecordingApi.recording_setting_update ...'\n end\n ... |
3c33533d24c56804e224e24defa35dc5 | Aggregate pipelines events. Use this API endpoint to aggregate CI Visibility pipeline events into buckets of computed metrics and timeseries. | [
{
"docid": "653e3147e5e84cc67f2be956b6718d94",
"score": "0.6434488",
"text": "def aggregate_ci_app_pipeline_events_with_http_info(body, opts = {})\n\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: CIVisibilityPipelinesAPI.aggregate_ci_app_pipeline_events ...... | [
{
"docid": "c0462d31dd0fbf469b203126a91d7d18",
"score": "0.62202585",
"text": "def list_ci_app_pipeline_events(opts = {})\n data, _status_code, _headers = list_ci_app_pipeline_events_with_http_info(opts)\n data\n end",
"title": ""
},
{
"docid": "c6777d5860086fe9137239da486d6509"... |
2bf263a8f9ce4d420b0e9d92a9467cf7 | Description: Get sns account and check auth, email to process sign in or sign up | [
{
"docid": "962f5675a07c3f79664cac5eeae4b5af",
"score": "0.6674886",
"text": "def create\n if signin?\n redirect_to_home_page(@current_user)\n else\n sns_account = SnsAccount.new\n auth = request.env[\"omniauth.auth\"]\n sns_account.provider = auth['provider']\n sns_accoun... | [
{
"docid": "09b9b5f5bcd28acbeca997f9c9d1a46f",
"score": "0.59272",
"text": "def debug_sns(sns, glacier_sns_arn)\n topic = sns.topics[glacier_sns_arn]\n topic.subscriptions.each do |s| \n puts s.endpoint\n puts \"Confirmed\" if s.confirmation_authenticated?\n end\nend",
"title"... |
5f811129eca31fbc18853cf81bd78846 | Obtain destination path. dest The String path to the destination dir. Returns destination file path. | [
{
"docid": "c911deef36228be5ca9ce81a7d09103f",
"score": "0.75210077",
"text": "def destination(dest)\n current_lang = @site.config['lang']\n\n dest_dir = destination_rel_dir.gsub(/^\\/(#{current_lang}\\/?)/, '/')\n @site.in_dest_dir(*[dest, dest_dir, @name].compact)\n end",
"title"... | [
{
"docid": "336c8156b982c1589567e75daf2e5a85",
"score": "0.8524995",
"text": "def destination(dest)\n File.join(dest, @dest_name)\n end",
"title": ""
},
{
"docid": "b535fbae954a5c8a176572bc1c593c18",
"score": "0.8257467",
"text": "def destination(dest)\n File.join(@dest,... |
315c7009a6c931623fde92e4351f800d | INPUT: number of pages, and number of outgoing links for this page OUTPUT: ndimensional column vector with randomly set links | [
{
"docid": "ffeed44e0e78f7006560ca6c39f4867d",
"score": "0.7081018",
"text": "def random_column(pages, links, index)\n v = Vector.alloc(pages)\n links.times { |n| v[rand(pages)] = 1 }\n v[index] = 1\n\n return (1.0/v.sum) * v\nend",
"title": ""
}
] | [
{
"docid": "1edfdf31ca1a3e3c939628dda549a50c",
"score": "0.6196453",
"text": "def randomize\n @links.sample\n end",
"title": ""
},
{
"docid": "4b527882ad10cf6a2842e2e05fca4561",
"score": "0.61370534",
"text": "def links\n\t\t( 0...self.link_count ).collect do |i|\n\t\t\tsel... |
567d05ea6ca20ffc0f476d15ea1e9a7a | Method to prompt, collect, and assign client info to current client obj | [
{
"docid": "6cc512e5e2586da25a6b3a0de187b518",
"score": "0.5994819",
"text": "def get_new_client_info\n print(\"Please enter name: \")\n @name = gets.chomp\n\n print(\"Enter age: \")\n @age = gets.chomp.to_i\n\n print(\"Enter number of children: \")\n @number_of_children = gets.chomp.t... | [
{
"docid": "c3e033a84f36308292a752da20f8bd0a",
"score": "0.66546863",
"text": "def add_client(shelter, client)\n puts \"*** Client registration form ***\"\n client.id = prompt {\"ID number:\"}\n client.name = prompt {\"Name:\"}\n client.age = prompt {\"Age:\"}\n client.gender = validate_simple_inpu... |
5c3dcf2dd3ca3593e4e819fed2670e41 | match a given path to declared route. | [
{
"docid": "cc2ccb982fcc104ebec518bf1cacaebf",
"score": "0.6254363",
"text": "def match(verb, path)\n path = PATH_SEP + path if path[0, 1] != PATH_SEP # ensure a leading slash on path\n\n path = path[path_root_length..-1] if path_root_length.to_i > 0\n if path\n path = path... | [
{
"docid": "b3661d8954963c561da526f28f8a6e8a",
"score": "0.7473614",
"text": "def match(path, method, opts={})\n add_route(method, path, opts)\n end",
"title": ""
},
{
"docid": "e521454905bcd9496200ef71f69b086b",
"score": "0.739033",
"text": "def match verb, path\n return nil,... |
52cbe18d12b2ea175b22da4771813bb5 | DELETE /prd_m_whl_sl_prices/1 DELETE /prd_m_whl_sl_prices/1.json | [
{
"docid": "111592deba8fb9ee5170fa7b4f3c2c70",
"score": "0.7454242",
"text": "def destroy\n @prd_m_whl_sl_price.destroy\n respond_to do |format|\n format.html { redirect_to prd_m_whl_sl_prices_url, notice: 'Prd m whl sl price was successfully destroyed.' }\n format.json { head :no_conten... | [
{
"docid": "3c11894f819518a41c42c57b267b2060",
"score": "0.7327704",
"text": "def destroy\n @dstrbtr_whl_sl_price.destroy\n respond_to do |format|\n format.html { redirect_to dstrbtr_whl_sl_prices_url, notice: 'Dstrbtr whl sl price was successfully destroyed.' }\n format.json { head :no_... |
f238117984e4f7762a2d0b83864fe825 | rewrite block this method will treat block as canonical chain block | [
{
"docid": "c30e09ddb69efb57187f3c18bfff4dab",
"score": "0.6253169",
"text": "def rewrite_block(block)\n @header_chain.head = block.header\n @header_chain.write_header_hash_number(block.get_hash, block.number)\n end",
"title": ""
}
] | [
{
"docid": "fc7c69e40a66ec8b135ee5c4f7f1ca7d",
"score": "0.64953756",
"text": "def block_node; end",
"title": ""
},
{
"docid": "fc7c69e40a66ec8b135ee5c4f7f1ca7d",
"score": "0.64953756",
"text": "def block_node; end",
"title": ""
},
{
"docid": "3abcf397d44d426cd1a1c04f580f... |
939eb91a0bb87b32de939943a17a23a3 | Never trust parameters from the scary internet, only allow the white list through. Strong Parameter | [
{
"docid": "4f43c622e3b320e670ec4fb8759347dc",
"score": "0.0",
"text": "def comment_params\n params.require(:comment).permit(:rob_id, :name, :content).merge(user: current_user)\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.7294768",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "1677b416ad07c203256985063859691b",
"score": "0.6984893",
"text": "def allow_params_authentication!; e... |
2f8695fe8d440e820479d9178e95eca0 | Returns all stored variable | [
{
"docid": "0432e381c2e1464261a2e270ad0beb1d",
"score": "0.0",
"text": "def obtain\n @params\n end",
"title": ""
}
] | [
{
"docid": "1a935fd6bceea62c24efecc3cfa08da2",
"score": "0.7977592",
"text": "def get_variables\n\t\treturn @variables\n\tend",
"title": ""
},
{
"docid": "c9e1b7755c19a1e910ccf74361117135",
"score": "0.79226834",
"text": "def variables()\n return @variables\n end",
"title": "... |
36b1474bcee4e442b0de442aa7e015f2 | DELETE /borrowed_books/1 or /borrowed_books/1.json | [
{
"docid": "5d1cf237effe4116697318ebbd6c5a14",
"score": "0.716767",
"text": "def destroy\n @borrowed_book.destroy\n respond_to do |format|\n format.html { redirect_to borrowed_books_url, notice: \"Borrowed book was successfully destroyed.\" }\n format.json { head :no_content }\n end\n... | [
{
"docid": "998ce7bdb4c7359f5351a0196e2dcb14",
"score": "0.7280494",
"text": "def destroy\n @borrow = Borrow.find(params[:id])\n @borrow.destroy\n\n respond_to do |format|\n format.html { redirect_to borrows_url }\n format.json { head :ok }\n end\n end",
"title": ""
},
{
... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "218009b19ad2b63171d0c088039f20a7",
"score": "0.0",
"text": "def track_point_params\n params.require(:track_point).permit(:latitude, :longitude, :index)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7495027",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.69566035",
"text": "def strong_params\n params.require(:request).permit(param_whit... |
840bcdbc929843ea6488eb0a38b99afd | GET /pongs/1 GET /pongs/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "a6acee7517337426a251d007a50d679b",
"score": "0.74969536",
"text": "def show\n @pong = Pong.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @pong }\n end\n end",
"title": ""
},
{
"docid": "29e7d4c25a307059... |
b097c48e4fafd6bd9e99451ea7f3d889 | PATCH/PUT /contacts_infos/1 PATCH/PUT /contacts_infos/1.json | [
{
"docid": "bbfa1f0bc71e5e1583678c8625114bba",
"score": "0.73481184",
"text": "def update\n respond_to do |format|\n if @contacts_info.update(contacts_info_params)\n format.html { redirect_to @contacts_info, notice: 'Contacts info was successfully updated.' }\n format.json { render... | [
{
"docid": "8a1fcbdae3046e2102f533f681b61c66",
"score": "0.74618554",
"text": "def update_contact\n url = Addressable::URI.new(\n scheme: 'http',\n host: 'localhost',\n port: 3000,\n path: '/contacts/3'\n ).to_s\n\n puts RestClient.patch(\n url, {contact: {name: \"Josh\", email: \"josh... |
c999fa34b3fe2cccaa5527563fdaef7e | Send a notification with optional responses. | [
{
"docid": "dde141fec80006cf817dac6ebcfeaa13",
"score": "0.0",
"text": "def show_message_request(text, type, actions, &block)\n send_request \"window/showMessageRequest\", {\n type: type,\n message: text,\n actions: actions,\n }, &block\n end",
"title": ... | [
{
"docid": "145cac566f9f0d6856ab4809bfbbd7b4",
"score": "0.7503694",
"text": "def send_notification options={}\n ap '-- send_notification --'\n ap options\n end",
"title": ""
},
{
"docid": "8766ed46012834bdfe22a6ca1f7a8b4f",
"score": "0.6888863",
"text": "def send_notification... |
14b53ebd8c7d940c7b0478f43b614274 | safe run process in the background | [
{
"docid": "db04b8b82d49b7fe56a53a1e7e132a2c",
"score": "0.0",
"text": "def background &block\n Thread.new do\n yield\n ActiveRecord::Base.connection.close\n end\n end",
"title": ""
}
] | [
{
"docid": "428dad52c65cb536ccf98b6193bd08a0",
"score": "0.71752733",
"text": "def run_in_background(*args, &block)\n command_line = normalize_command_line(*args, &block)\n\n pid, out, err = spawn_process(command_line)\n Process.detach(pid)\n at_exit do\n kill_process(pid)\n ... |
f70f0a56080309b187294627de8d7dbe | Close javascript block and open an 'else' block | [
{
"docid": "b62860475441499367007902c487125e",
"score": "0.5649257",
"text": "def else\n self << \"else {\"\n yield if block_given?\n self << \"}\"\n end",
"title": ""
}
] | [
{
"docid": "6c084da409ba9d4dc12f856da76401d0",
"score": "0.6337557",
"text": "def add_will_close_js(script)\n aa[:WC] = ref!(:S => :JavaScript, :JS => script)\n end",
"title": ""
},
{
"docid": "ece8d2019c257f33320288fad562b0e4",
"score": "0.605608",
"text": "def close()\n ... |
6933b77ae4d5f9d862e91cc1462060a3 | walking over arrays and symbolizing all nested elements | [
{
"docid": "74ba4b55486add3e417a88773cf888c4",
"score": "0.0",
"text": "def array(ary, &block)\n ary.map { |v| _recurse_(v, &block) }\n end",
"title": ""
}
] | [
{
"docid": "36d27c3347612ef0caee6a3a2c97e997",
"score": "0.64313924",
"text": "def my_flatten_recursive \n results = []\n self.my_each do |ele|\n if ele.is_a? Array \n results.concat(ele.my_flatten_recursive)\n else \n results<< ele\n end\n end\n results\n\n end... |
51c2a6952623deb547179dbea8a51c17 | Read a &39;iam.EndPointUserPolicy&39; resource. | [
{
"docid": "4b9cba7b8ed0a5443b5fe0a0522dd939",
"score": "0.0",
"text": "def get_iam_end_point_user_policy_by_moid_with_http_info(moid, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: IamApi.get_iam_end_point_user_policy_by_moid ...'\n end\n ... | [
{
"docid": "fd8459ca829f1edc1010efc6c3ee2333",
"score": "0.6209592",
"text": "def get_user_policy(policy_name, user_name)\n request({\n 'Action' => 'GetUserPolicy',\n 'PolicyName' => policy_name,\n 'UserName' => user_name,\n :parser => ... |
1e26aa0d1252f6da6b517cd1bf9c79e2 | todo: Refactor to concerns for anything votes related (votes, yes_no_ratio, yes, no, place_vote) | [
{
"docid": "e5bfc062604f4d5c75d4fa563e938b8a",
"score": "0.6735472",
"text": "def votes\n total_votes = 0\n self.options.each do |vote_val|\n #todo: this is probably wrong\n total_votes += vote_val.to_i\n end\n total_votes += (REDIS_VOTES.get('YES:' + self.id).to_i + REDIS_VOTES.ge... | [
{
"docid": "c3938221a9824d50d71e926e46b597df",
"score": "0.7086825",
"text": "def vote\n\tend",
"title": ""
},
{
"docid": "a2724cf9c9f80945715eaf8df11d9cc8",
"score": "0.68672276",
"text": "def required_votes\n possible_votes / 2 + 1\n end",
"title": ""
},
{
"docid": ... |
6db2305686d7d9a1a077b2dca6a9cde1 | Compares passed password with the one encrypted in the database | [
{
"docid": "7e51b1d9f9e96ce58368f1e67ca5f875",
"score": "0.71865535",
"text": "def authenticate!(psw)\n User.encrypt_token(psw, password_salt) == encrypted_password\n end",
"title": ""
}
] | [
{
"docid": "64907cf7ee9a7d2876b221c8b43d0dd9",
"score": "0.81973064",
"text": "def matching_password?(pass)\n self.password_hash == encrypt_password(pass)\n end",
"title": ""
},
{
"docid": "badcc40e2000225c4be222e19acd3d37",
"score": "0.8186958",
"text": "def password_compare(pas... |
1c63c0392ef016b30bf24bff76649df5 | Adds a new error object to the request's errors. | [
{
"docid": "798da89574666f547ca54eb55cdcb723",
"score": "0.81329197",
"text": "def add_request_error(error = {})\n @errors ||= []\n @errors << error\n end",
"title": ""
}
] | [
{
"docid": "dacff17b4fd81e95450f772226b20222",
"score": "0.7829208",
"text": "def add_error(error)\n @errors = error\n @errors\n end",
"title": ""
},
{
"docid": "b1e969294884dccf68237ef59c5eb44a",
"score": "0.7427087",
"text": "def add_error(error)\n @errors.add(error)\... |
cead0d20c18b4bf1a26bfd177357f07c | GET /executions/1 GET /executions/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "1dbba4fd4166f33e97a940fe0a44f6c7",
"score": "0.6679071",
"text": "def executions(id)\n get(\"/accounts/#{id}/executions\")['executions']\n end",
"title": ""
},
{
"docid": "ae7d0595f878464dcd714cf4c3e4b0f8",
"score": "0.6584066",
"text": "def getExecutionsForAJob(j... |
e17d697654a566c535596d2cd89e9651 | GET /empresas GET /empresas.json | [
{
"docid": "291a9ea6d3592ec9146414fd6932a319",
"score": "0.0",
"text": "def index\n if params.key? :empresa\n if params[:empresa].key? :nome\n @empresas = Empresa.where(\"lower(nome) like '%#{params[:empresa][:nome].strip.downcase}%'\").order(created_at: :desc).page(params[:page])\n ... | [
{
"docid": "cd72c3f3c867733d15b504a35b3f9b3c",
"score": "0.76582843",
"text": "def index\n @empresas = Empresa.all\n \n render json: @empresas, include: [:politica, :activo, :acceso, :ambiente, :operativa, :tele, :desarrollo]\n end",
"title": ""
},
{
"docid": "c5d461e5a5a899d2ce9f5... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "dc7f0660c839a79a447f2fc5d82d8a24",
"score": "0.0",
"text": "def set_pkg\n @pkg = Pkg.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... |
cf25cf4b40737a9654ec807f453e7f05 | human readable description of modeling approach | [
{
"docid": "062b1151056cf7cb99d8d7f95e1d420e",
"score": "0.0",
"text": "def modeler_description\n 'Change R-value of Insulation Layer for Construction By a Multiplier'\n end",
"title": ""
}
] | [
{
"docid": "400f38055c710e3f9ca3606b0d0e6dcf",
"score": "0.77099466",
"text": "def modeler_description\n return 'Gather orientation and story specific construction, fenestration (including overhang) specific information'\n end",
"title": ""
},
{
"docid": "7f312e0afd1fe5a95907a214078a6c88... |
8b35e6ee92c8048d23d38be2e4dac06e | 4. sentence_maker pseudocode make sure all pseudocode is commented out! Input: array of strings Output: the sum of all strings Steps to solve the problem. access the array of strings individually and add them up 5. sentence_maker initial solution | [
{
"docid": "baf5826faf4ed10c91e6ab4c1020d71a",
"score": "0.64106655",
"text": "def sentence_maker(array)\n i = 0\n result = \"\"\n while i < array.length\n result = result + \" \"+ array[i]\n i+=1\n end\n return result\nend",
"title": ""
}
] | [
{
"docid": "66ca96196d5b62f5ea4dbbc76a149c82",
"score": "0.7216659",
"text": "def total(array)\nsum=0\narray.each {|x| sum += x} # += adds and computes both variables in one step\nreturn sum\n\n# 4. sentence_maker pseudocode\n# make sure all pseudocode is commented out!\n# Input: an array\n# Output: a s... |
f2f0f3ffba0649a4bc7a6c1526253d6b | DELETE /incidentcategories/1 DELETE /incidentcategories/1.json | [
{
"docid": "62e8fa84309da2f8b9b46627f4ad93eb",
"score": "0.7634631",
"text": "def destroy\n @incidentcategory.destroy\n respond_to do |format|\n format.html { redirect_to incidentcategories_url, notice: 'Incidentcategory was successfully destroyed.' }\n format.json { head :no_content }\n... | [
{
"docid": "4fb62421c04f9e817c71556662462524",
"score": "0.8142634",
"text": "def destroy\n #@incidentcategory.destroy\n render json: {}, status: 200\n end",
"title": ""
},
{
"docid": "1a8d9c10235b11eb19e8934ebe516094",
"score": "0.7330131",
"text": "def DeleteCategory id\n ... |
5eca6df497209a4d863e0f466b37d3cd | POST /logs POST /logs.json | [
{
"docid": "9018236b581dd5a9e4a10b92e83d4439",
"score": "0.65022105",
"text": "def create\n log = Log.new(app_key: params[:app_key], admin_user_id: params[:admin_user_id], activity_type_id: params[:activity_type_id])\n if log.save\n render json: {status: {code: 200, message: :ok}}\n else\n... | [
{
"docid": "b4ac4911ae0537ccf9e4ba0c7faa0748",
"score": "0.69334775",
"text": "def logs\n response = @client.get '/logs?json=true'\n JSON.parse response.body\n end",
"title": ""
},
{
"docid": "765a61251b778fb4e5137af1635c828a",
"score": "0.67892534",
"text": "def logs\n ... |
10df7387ac8a3ac2c47638c954f5ab85 | Triggers the :after_receiving event and the `on` prefixed frame specific event (eg: `:on_message`) | [
{
"docid": "962082b7591b3c284f70a986c2a27c37",
"score": "0.78461146",
"text": "def trigger_after_receiving f\n trigger_event :after_receiving, f, self\n trigger_frame_event f, :on, :broker\n end",
"title": ""
}
] | [
{
"docid": "089d02bd0cd8e7c726e440b7bfb7fd76",
"score": "0.69688964",
"text": "def trigger_before_receiving f\n trigger_event :before_receiving, f, self\n trigger_frame_event f, :before, :broker\n end",
"title": ""
},
{
"docid": "c0e5027e4ae2ce627cd6253bb568fdef",
"score": "0.6569... |
f8b64740455dcaa5d7573f195c3a0306 | Upload the pe tarball to the target_host | [
{
"docid": "067bd24c079efe36deb6e20f1060f85e",
"score": "0.7696322",
"text": "def upload_pe_tarball(src_pe_tarball_path)\n file_name = File.basename(src_pe_tarball_path)\n dest_pe_tarball_path = \"#{TMP_WORK_DIR}/#{file_name}\"\n\n puts \"Attempting upload from #{src_pe_tarball_path} \" \... | [
{
"docid": "4a84ad35d5d1011c2794ca6be11a4d16",
"score": "0.7819425",
"text": "def upload_pe_tarball(src_pe_tarball_path, dest_pe_tarball_path = TMP_WORK_DIR, \\\n target_master = @target_master)\n if dest_pe_tarball_path == TMP_WORK_DIR\n file_name = File.basename(sr... |
c17e8b759893ad86288b1a52a9d84fc0 | Gets tag search query attribute from url request. | [
{
"docid": "e2f9b9f3d8aa664872754c9110eedd2d",
"score": "0.79115033",
"text": "def query_param\n params&.dig(:tag_search_query)\n end",
"title": ""
}
] | [
{
"docid": "881b285a87405970fc3c0bcd5e01d280",
"score": "0.7154222",
"text": "def tag_search_term\n params[:tag]\n end",
"title": ""
},
{
"docid": "548caf690787a346f3ad08a5cc619df2",
"score": "0.6609656",
"text": "def query_request_url\n @attributes[:query_request_url]\n ... |
5d2e00cc5621cdf5bc661dbcc8bed109 | Train the classifier on a set of samples. | [
{
"docid": "43ba85b4079b699ea16d1c0d8bed56b3",
"score": "0.79689336",
"text": "def train_up(classifier, samples)\n samples.each do |s|\n classifier.train s.kind, s.value\n end\n end",
"title": ""
}
] | [
{
"docid": "44e650f13d9069d46f0bb5357729c840",
"score": "0.7546078",
"text": "def monkeylearn_train(samples)\n samples.map! { |x| [x, 590992]}\n r = Monkeylearn.classifiers.upload_samples('cl_ksmgNsh9', samples)\n Monkeylearn.classifiers.train('cl_ksmgNsh9')\n end",
"title": ""
},
{
"doc... |
9b55a3b08953c1fc2874787865ea8b55 | This will blindly mark status as completed, or completed_with_errors. Doesn't check to see if the jobs are actually completed. | [
{
"docid": "cb532da15ee24d9991a7fde82c9acf20",
"score": "0.7144325",
"text": "def complete!\n if number_of_failed_jobs.zero?\n self.completed!\n else\n self.completed_with_failures!\n end\n end",
"title": ""
}
] | [
{
"docid": "86b387351146ac467d36798a7d6c9b36",
"score": "0.7552788",
"text": "def mark_finished!; self.status = 2 end",
"title": ""
},
{
"docid": "86b387351146ac467d36798a7d6c9b36",
"score": "0.7552788",
"text": "def mark_finished!; self.status = 2 end",
"title": ""
},
{
... |
fbfcdb8efe8b82a2828bc349d319e1f9 | Filter patients by a relative time range for the given field | [
{
"docid": "9dafbacd9b53e869c637e559fea3e29d",
"score": "0.7328942",
"text": "def advanced_filter_relative_date(patients, field, filter, tz_diff, type)\n local_current_time = DateTime.now - tz_diff\n timeframe = { after: local_current_time.beginning_of_day, before: local_current_time.end_of_day } ... | [
{
"docid": "6d1227486f55fad26eaa76bfede48ce4",
"score": "0.73498696",
"text": "def advanced_filter_relative_date(patients, field, filter, tz_diff, type)\n local_current_time = DateTime.now - tz_diff\n timeframe = { after: local_current_time.beginning_of_day, before: local_current_time.end_of_day }... |
1589d71964795df874bfb1359fabf7df | You can start with a non restricted Flex::Scope object | [
{
"docid": "00388d2a2e0f832447c63e7f1d919b68",
"score": "0.67252034",
"text": "def scoped\n @scoped ||= Scope[:context => flex.context]\n end",
"title": ""
}
] | [
{
"docid": "ede8516c91636f45c76174d0432c7319",
"score": "0.72652626",
"text": "def scope() binding end",
"title": ""
},
{
"docid": "a5432aadd8cc5947db0ccf866c05e0a0",
"score": "0.7143325",
"text": "def scope=(_); end",
"title": ""
},
{
"docid": "117bc71cd8976d01e54c03e8a5... |
4e19c5c66580051edbfac8a1f1fdc8aa | In this exercise, you are going to compute a method that returns the last digit of the nth Fibonacci number. ls solution | [
{
"docid": "42236005e16b372ca22b64e3afdc08c9",
"score": "0.81830984",
"text": "def fibonacci(n)\n first, last = [1, 1]\n 3.upto(n) do \n first, last = [last, first + last]\n end\n last.to_s[-1].to_i \nend",
"title": ""
}
] | [
{
"docid": "971bbad3d83df08d2ac8de5c6629ae9a",
"score": "0.8901996",
"text": "def last_digit_fib(nth)\n first = 1\n last = 1\n 3.upto(nth) { first, last = [last, first + last] }\n last.to_s[-1].to_i\nend",
"title": ""
},
{
"docid": "57b2474c120e05fde0af8a374ad26f9c",
"score": "0.8748... |
250e19b0afa1c110ec35d26c9d684608 | Withdraw funds from bank account Used for transfers to the outside world, e.g. using PaypalDepositAccount amount (net amount) option: :fee => false (default) | true if true the default transaction fee $0.50 plus the amount are withdrawn if :fee is a FixNum or money object this fee and amount are widthdrawn if false no ... | [
{
"docid": "5cc7c7cc17fe14ece0957a971e33a1d5",
"score": "0.76659185",
"text": "def withdraw(amount, options={})\n options = {:fee => false}.merge(options).symbolize_keys\n adjust_and_save(amount.abs * -1, :withdraw, options)\n end",
"title": ""
}
] | [
{
"docid": "b0c808b1a7b151f3812d18de1a91f1cf",
"score": "0.7247593",
"text": "def withdraw(amount_to_withdraw)\n\n if @frozen\n puts \"Sorry, you cannot perform transactions right now. Your account is frozen because it is below the minimum balance of $%.2f\" % MIN_BAL + \".\"\n return... |
ee3db573acc31d954777b0d1a82ecc52 | Return's patient's last appointment date | [
{
"docid": "932d40e9b4149b16e424854923d8b26b",
"score": "0.0",
"text": "def find_patients_demographics_and_appointment(patient_ids)\n patient_ids = patient_ids.map { |patient_id| ActiveRecord::Base.connection.quote(patient_id) }.join(',')\n\n ActiveRecord::Base.connection.select_all <<~SQL\n ... | [
{
"docid": "9189153be67d532bd5c2c85802142405",
"score": "0.8365338",
"text": "def patient_last_appointment(patient_id)\n Observation.where(person_id: patient_id, concept: concept('Appointment date'))\\\n .order(:obs_datetime)\\\n .last\\\n &.obs_datetime\n e... |
614e9d815a442d50d0118f6ebfbac6a7 | This is for reduce method call whose all arguments is constant. But all methods can't apply because the method may have side effect. | [
{
"docid": "554e38cdb66fb9ef160a0e16914e674b",
"score": "0.0",
"text": "def fill_result_cache(context)\r\n context\r\n end",
"title": ""
}
] | [
{
"docid": "1b8bff146504b5eb89bd52fd21dcd933",
"score": "0.7412809",
"text": "def reduce \n end",
"title": ""
},
{
"docid": "3944f56d0d810f8952a9fd577beb2161",
"score": "0.73230714",
"text": "def reduce\n \n end",
"title": ""
},
{
"docid": "073f72307c17b42203... |
80077127308d3c0d645dc69b478c64a6 | redirect to s3 file, so that the link doesn't expire | [
{
"docid": "19a624a0619335c1b775c824e09ea7c7",
"score": "0.0",
"text": "def show\n raise ActiveRecord::NotFound unless @config.rules_file_name?\n\n redirect_to @config.rules_file_name_url\n end",
"title": ""
}
] | [
{
"docid": "4f7b1c2004737a675ec81246de16e72d",
"score": "0.70696324",
"text": "def download_link\n s3 = Aws::S3::Client.new\n signer = Aws::S3::Presigner.new(client: s3)\n signer.presigned_url(\n :get_object,\n bucket: ENV['SEATSHARE_S3_BUCKET'],\n key: path,\n expires_in: 8... |
1b4597f75799e8b4ccb6f7c765ff968b | GET /slinks/1 GET /slinks/1.json | [
{
"docid": "9325ad118e6dfe16ac53ea30582c50e4",
"score": "0.0",
"text": "def show\n redirect_to @slink.url\n end",
"title": ""
}
] | [
{
"docid": "55cbc434907a6cb742efe778dea5bde6",
"score": "0.69862103",
"text": "def index\n @links = Link.all\n \n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @links }\n end\n end",
"title": ""
},
{
"docid": "386cd0cec745... |
94885f75da0b73eeeabf466d822773b4 | POST /classnames POST /classnames.json | [
{
"docid": "c4f5b9c28b0e0c920babced390721d8f",
"score": "0.65749836",
"text": "def create\n\t\t@classname = Classname.new(classname_params)\n\n\t\trespond_to do |format|\n\t\t\tif @classname.save\n\t\t\t\tformat.html { redirect_to @classname, notice: 'Classname was successfully created.' }\n\t\t\t\tform... | [
{
"docid": "f691625e09520b77a788758613eebbe6",
"score": "0.6769814",
"text": "def create\n @class_name = ClassName.new(class_name_params)\n\n respond_to do |format|\n if @class_name.save\n format.html { redirect_to root_path, notice: 'Class name was successfully created.' }\n fo... |
15ff523004526a5112849f720fda90b8 | Author : Manoj Patil shows name of the service program. use it in show page where description needs to be displayed instead of number. | [
{
"docid": "06994829a87fc63053e1c696cd407819",
"score": "0.6276656",
"text": "def get_service_program_name(arg_id)\n\n\t\tif arg_id.present?\n\t\t\tls_out = ServiceProgram.service_program_name(arg_id)\n\t\t\tif ls_out.blank?\n\t\t\t\tls_out = \" \"\n\t\t\tend\n\t\telse\n\t\t\tls_out = \" \"\n\t\tend\n\n... | [
{
"docid": "43466bfb4e44b18597f1a001a98e1891",
"score": "0.6693446",
"text": "def title\n if !service_id.nil? && !host_id.nil?\n return service.name + ' w/ ' + host.fullname\n end\n end",
"title": ""
},
{
"docid": "d68966875077edd70ed13e029a3680de",
"score": "0.66339475",
... |
fd55357cc6b82b07df883864768ae22a | Determine the sidebar based on the URL | [
{
"docid": "d170e8386f5269075e75f8d2febb614b",
"score": "0.7534604",
"text": "def render_sidebar\n\t\tif request.path_info.include?( '/patterns' )\n\t\t\trender(partial: \"sidebar_patterns\")\n\t\telsif request.path_info.include?( '/brand' )\n\t\t\trender(partial: \"sidebar_brand\")\n\t\telsif request.p... | [
{
"docid": "73719c96409a9dfc0876e1ce7aecc6c3",
"score": "0.74259216",
"text": "def sidebar\n @sidebar ||= find_sub_page(:sidebar)\n end",
"title": ""
},
{
"docid": "73719c96409a9dfc0876e1ce7aecc6c3",
"score": "0.74259216",
"text": "def sidebar\n @sidebar ||= find_sub_pag... |
d8af96f6007b58e0b09eba61b6e218df | =begin Discussion: Methods used: Class Big Numerical Method Name divmod Syntax divmod(value) Docs Divides by the specified value, and returns the quotient and modulus as BigDecimal numbers. The quotient is rounded towards negative infinity. ex. 101.divmod(10) [10, 1] a, b = 202.divmod(10) [20, 2] a = 20 b = 2 This solu... | [
{
"docid": "2c8bbd66b28b9677a5c7625bbf50bcef",
"score": "0.0",
"text": "def signed_integer_to_string(number)\n case number <=> 0\n when -1 then \"-#{integer_to_string(-number)}\"\n when +1 then \"+#{integer_to_string(number)}\"\n else integer_to_string(number)\n end\nend",
"title": ""
}
] | [
{
"docid": "a979979ad0565d683e9b73d795df859e",
"score": "0.6320537",
"text": "def expanded_form(num)\n size = num.to_s.size\n result = []\n i = 1\n while i < size\n rest = num % 10**i\n num -= rest\n result.unshift(rest)\n i += 1\n end\n result.unshift(num).delete(0)\n result.join(\" ... |
230ea8cb1ef25609b02aeb267ce291a2 | Add a stats list Parameters:: iLstStats (list): List of stats. See :StatsToAdd property for internal fields to set. | [
{
"docid": "feb1d76b5b1c8f9fc1275d7cbc2cd326",
"score": "0.8943729",
"text": "def add_stats_list(iLstStats)\n @StatsToAdd.concat(iLstStats)\n end",
"title": ""
}
] | [
{
"docid": "5b89a7cd375670f4f51eacef5a8aaf45",
"score": "0.6948415",
"text": "def add_stats(_stats)\n _stats.each do |e|\n self.add_stat(e)\n end\n end",
"title": ""
},
{
"docid": "bc5a7189b690e484f40e2ea9ba4965e9",
"score": "0.62801546",
"text": "def add_... |
36b5f1ddfa3f26895c4cdd4aceef338c | Returns the value for this var that will be active (or was active) at the provided time. Please note that lockstep periodically trims old tuples from it's storage system and so passing a Time object from the past will result in undefined behaviour. | [
{
"docid": "129c0ce17757c42dab6d3c231a1ae07a",
"score": "0.7154527",
"text": "def get(active_time=Time.now)\n refresh_if_needed\n active_at, value, tick_size = *active_tuple(active_time)\n value\n end",
"title": ""
}
] | [
{
"docid": "e1f6583791d63b1d4ab54e5b9f8c954d",
"score": "0.62425625",
"text": "def next_check_at(active_time=Time.now)\n time_base, value, tick_size = *active_tuple(active_time)\n remainder = (active_time - time_base).to_i % tick_size\n remainder == 0 ? active_time + tick_size : (active_... |
f6660377af6c01e46514dd5feb85ee55 | formats a markdown description from the 2 BOINC bbcode fields | [
{
"docid": "c0de1f51af167c3a4149d307b9beb4dc",
"score": "0.6552717",
"text": "def description\n desc = ''\n unless self.response1.nil? || self.response1 == ''\n desc << \"### My personal background:\\r\\n\"\n desc << self.r1.bbcode_to_md(true, extra_tags)\n desc << \"\\r\\n\"\n e... | [
{
"docid": "3bf18d83470b3e0d3f6693204c89a728",
"score": "0.67459464",
"text": "def clean_up_description\n self.description = description.\n gsub(/\\[mc\\](.+?)\\[\\/mc\\]/m){\"[mc]\" << $1.gsub(/<div><\\/div>/,'') << \"[/mc]\"}.\n gsub(/<div>(.+?)<\\/div>/m) { \"<br>\" + $1 + \"<br>\"}.... |
07b011ba428d8a233b62576cb377e08b | GET /tblocationreports/new GET /tblocationreports/new.json | [
{
"docid": "4091a0e52d35506eb2908211efb4f95e",
"score": "0.80401367",
"text": "def new\n @tblocationreport = Tblocationreport.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @tblocationreport }\n end\n end",
"title": ""
}
] | [
{
"docid": "c250204c0fefbed8027678be20b0224d",
"score": "0.77879053",
"text": "def new\n @locationreport = Locationreport.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @locationreport }\n end\n end",
"title": ""
},
{
"docid": "0c... |
e6e6b6afb1a67226caf571e1901c1a96 | Previous average readed consumption | [
{
"docid": "7440d1372eb7b9b37a5fd4c31cfa5f93",
"score": "0.6508601",
"text": "def consumption_previous_readings(from_date, to_date)\n begin\n previous_readings = subscriber.readings.where('reading_date between ? AND ?', from_date, to_date).select('SUM(reading_index - reading_index_1) CONSUMPTION... | [
{
"docid": "10f925f8f986ed6cabf35a85302396f9",
"score": "0.7823417",
"text": "def running_average; end",
"title": ""
},
{
"docid": "a665ad8030f4803246ecfce754db9193",
"score": "0.7027452",
"text": "def get_average\n @average ||= calculate_average\n end",
"title": ""
},
{
... |
4c466d32eca7fe5d7d0102ff12d97d35 | Set input and output dirs | [
{
"docid": "32d279222b478a4d857606993d73b9c9",
"score": "0.0",
"text": "def initialize(*args)\n\t\t@default_resize = 800\n @default_optim = 80\n\n\t\tparse_args(*args)\n\tend",
"title": ""
}
] | [
{
"docid": "632fe9487807567a364315e5a61df0f1",
"score": "0.71031237",
"text": "def input_dir=(input)\n @input_dir = File.expand_path(input)\n end",
"title": ""
},
{
"docid": "3f38cffe9b14643dfb9662c4cef9f643",
"score": "0.67703176",
"text": "def set_output_dir(outdir)\n ... |
1a4aeffbaf20e17aa3734e7e94949081 | GET /send_emails GET /send_emails.json | [
{
"docid": "7e970f979ee3c22640cda3e1481ddd51",
"score": "0.6927033",
"text": "def index\n @send_emails = SendEmail.all\n end",
"title": ""
}
] | [
{
"docid": "df2098f6fe76b92a1943af92f7873c49",
"score": "0.7526903",
"text": "def emails\n get '/user/emails'\n end",
"title": ""
},
{
"docid": "e59359285cfb96c87246a7d93f007461",
"score": "0.73272014",
"text": "def index\n @emails = @recipient.emails.all\n\n respon... |
d9765e10e5dcad90fea646f06c5d5b35 | DELETE /hwm_fund_values/1 DELETE /hwm_fund_values/1.json | [
{
"docid": "8c8adf455f34c6b99255462fd9d2c891",
"score": "0.7687935",
"text": "def destroy\n @hwm_fund_value = HwmFundValue.find(params[:id])\n @hwm_fund_value.destroy\n\n respond_to do |format|\n format.html { redirect_to hwm_fund_values_url }\n format.json { head :no_content }\n e... | [
{
"docid": "b569b6f70a9b61943bdc13f8ee6d91a8",
"score": "0.6922436",
"text": "def destroy\n @hwm_fund_type = HwmFundType.find(params[:id])\n @hwm_fund_type.destroy\n\n respond_to do |format|\n format.html { redirect_to hwm_fund_types_url }\n format.json { head :no_content }\n end\n... |
a1c72efd1bb3593bb50641adcec5e9fa | POST /advert_works POST /advert_works.json | [
{
"docid": "c7ec68b2490904468c1d867d61c553ee",
"score": "0.68938744",
"text": "def create\n @advert_work = AdvertWork.new(advert_work_params)\n\n respond_to do |format|\n if @advert_work.save\n format.html { redirect_to @advert_work, notice: 'Ваше оголошення розміщено на сайті!' }\n ... | [
{
"docid": "7947345a177691295453f11c122c0f19",
"score": "0.6669585",
"text": "def create\n @work = @client.works.build(work_params)\n\n respond_to do |format|\n if @work.save\n format.html { redirect_to client_work_path(@client, @work), notice: 'Work was successfully created.' }\n ... |
96b509b1d3329b34dfb44764950a4113 | POST /cashes POST /cashes.json | [
{
"docid": "5703f26887caa21cd34eb0f43980cf4b",
"score": "0.0",
"text": "def create\n @cash = Cash.new(cash_params)\n\n respond_to do |format|\n if @cash.save\n format.html { redirect_to action: \"index\", notice: 'Cash was successfully created.' }\n format.json { render :show, ... | [
{
"docid": "75bbf387bf913bd859407addd79bfdf5",
"score": "0.6026163",
"text": "def create\n @caso = Caso.new(caso_params)\n\n respond_to do |format|\n if @caso.save\n format.html { redirect_to @caso, notice: 'Caso was successfully created.' }\n format.json { render :show, status:... |
d857105e71c07d45fd49e9ff962499e5 | Define a method that, given an array of numbers, returns a nested array of twoelement arrays that each contain the start and end indices of whenever a number appears multiple times in a row. repeated_number_ranges([1, 1, 2]) => [[0, 1]] repeated_number_ranges([1, 2, 3, 3, 4, 4, 4]) => [[2, 3], [4, 6]] | [
{
"docid": "1bea2f32b7e04846f570c8ed4b4a4fba",
"score": "0.75785667",
"text": "def repeated_number_ranges(arr)\n result = []\n head = 0\n tail = 1\n while tail < arr.length\n if arr[head] != arr[tail] \n distance = tail - head \n if distance > 1\n result << [head, tail-1]\n ... | [
{
"docid": "9d3c64b59de616e26213f2a034ecd2e6",
"score": "0.7926101",
"text": "def repeated_number_ranges(arr)\n return array(arr)\nend",
"title": ""
},
{
"docid": "a382e42f6058b14a1d94dbbcb2499400",
"score": "0.79195255",
"text": "def repeated_number_ranges(arr)\n\trange = []\n\tin... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "a0ce6ad1ed7a37e719bc73697ed78b79",
"score": "0.0",
"text": "def set_comment_question\n @comment_question = CommentQuestion.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.60310596",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.6014974",
"text": "de... |
7648e78797d223d94b25ab1db656e147 | t.offset(proxy: [:metadata, :audio, :offset]) | [
{
"docid": "26016f5d7ce6874becad2a7d75776054",
"score": "0.6871093",
"text": "def offset\n ng_xml.css(\"fits > metadata > audio > offset\").map(&:text)\n end",
"title": ""
}
] | [
{
"docid": "b34a73359c2d179540cc40f6bb32d79a",
"score": "0.6973167",
"text": "def offset\n end",
"title": ""
},
{
"docid": "9bfd51b9a7c804c6ddb33e35e1b7dbd9",
"score": "0.6963365",
"text": "def offset; end",
"title": ""
},
{
"docid": "9bfd51b9a7c804c6ddb33e35e1b7dbd9",
... |
e51e51c6b943b3541a959091e5bff898 | Acts like include, but can be called on an instance of an object. This is slower because it defines new methods every time an object is initialized but it provides for greater flexibility. | [
{
"docid": "29a47bb4189893a6bd2835e92da115be",
"score": "0.63259935",
"text": "def instance_include(rcvr, mod)\n mod.instance_methods(false).each do |m|\n meth = mod.instance_method(m).bind(rcvr)\n\n rcvr.define_singleton_method(m, &meth)\n end\n end",
"title": ""
}
] | [
{
"docid": "8b812833f6ab02d0f5d09eba01dbf320",
"score": "0.6591848",
"text": "def link_include_object(obj); end",
"title": ""
},
{
"docid": "8b812833f6ab02d0f5d09eba01dbf320",
"score": "0.6591848",
"text": "def link_include_object(obj); end",
"title": ""
},
{
"docid": "92... |
72246934cb2fd8fd2a91d299e106bc0d | check the .../fixed/ directory for 18?1/ctyPARMS.DAT metadata files and return an array of hashes with info about each PARMS.DAT file, including an md5 hash digest of the file for checking if file changed since last update | [
{
"docid": "6027543a4b421ee1177b9409e424e17a",
"score": "0.63249516",
"text": "def get_parms_files_info(parms_dir, log_messages = true)\n parms_info = []\n Freecen::CENSUS_YEARS_ARRAY.each do |yy|\n yy_pattern = File.join(parms_dir, yy, '*PARMS.[Dd][Aa][Tt]')\n yy_files = Dir.glo... | [
{
"docid": "3df30be4adfec832b7b75f4e821760c2",
"score": "0.62693393",
"text": "def CompareContents(changedDirectory)\n puts \"Checking status of: #{changedDirectory}\"\n baseName = File.basename(changedDirectory)\n hashDataFile = \"#{changedDirectory}/metadata/#{baseName}.md5\"\n allFiles = Dir.glob... |