query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
6c0c78868e7a1c5a4f070e3778508967 | DNSSEC root anchor published by IANA ( | [
{
"docid": "ad58ba4dc37abb31d069c27a9aeac434",
"score": "0.51600075",
"text": "def root_keys\n <<~EOS\n . IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d\n EOS\n end",
"title": ""
}
] | [
{
"docid": "00740c8d17ab6ab8b8b204dfa016c609",
"score": "0.60574037",
"text": "def anchor_information\n data = `openssl s_client \\\n -connect #{config[:host]}:#{config[:port]} \\\n -servername #{config[:servername]} < /dev/null 2>&1`.match(/Certificate chain(.*)---\\nSe... |
c3837fb70eb0319e048422c89d2705cf | Generate a visible button of an alternate file input control. | [
{
"docid": "79ef73edc8b77572f800587800e5e92b",
"score": "0.6644077",
"text": "def file_input_ctrl(src:, css: PopupHelper::POPUP_TOGGLE_CLASS, **opt)\n config = FILE_TYPE_CFG[src] || {}\n label = config[:label]\n prepend_css!(opt, css)\n html_button(label, opt)\n end",
"title": ""
}
] | [
{
"docid": "152f7e93e478eb87d948cd7e7276d2c2",
"score": "0.6150647",
"text": "def render_grid_file_input(_name, _value, css: UPLOADER_DISPLAY_CLASS, **opt)\n prepend_css!(opt, css)\n display = html_div(opt)\n controls = FILE_INPUT_TYPES.map { |type| file_input_popup(src: type) }\n controls ... |
7a2714208bc10e86657384333f251778 | Marks a person available for a specific interview timeslot | [
{
"docid": "99f0bd9583f949da20a77ced59d3fc5a",
"score": "0.64635086",
"text": "def mark_available\n t = @user_application.interview_availabilities.find_or_create_by_time_and_offering_interview_timeblock_id(\n params[:time].to_ti... | [
{
"docid": "c6ea83bdc711587f25d2591a037d16ca",
"score": "0.6582548",
"text": "def mark_available\n t = @offering_interviewer.interview_availabilities.find_or_create_by_time_and_offering_interview_timeblock_id(\n params[:time].to... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "e72a9438c3afe79613eed49bdda60ee0",
"score": "0.0",
"text": "def user_word_params\n params[:user_word]\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... |
ddd3c8447a43d3f35759be74454622d2 | Return a string represention of the JASPAR5 DB connection. | [
{
"docid": "bc173ce36c8e8c414d06214e1ea49ba9",
"score": "0.0",
"text": "def to_s\n str = \"#{@user}\\@#{@host}:#{@name}\"\n return str\n end",
"title": ""
}
] | [
{
"docid": "25c19ff29068adb50a26cc087ad09e68",
"score": "0.72883064",
"text": "def connection_string\n return @connection_params.values.compact.join(';')\n end",
"title": ""
},
{
"docid": "a462331e2a605f0d2a3d321b2c025c35",
"score": "0.68877584",
"text": "def get_connection_strin... |
ed0b9b5463c32a80488e4168d1605a11 | Runs puppet resource commands | [
{
"docid": "252194a3585e588132c4a5f2f9364ba7",
"score": "0.6624068",
"text": "def puppet_resource(opts)\n if opts.is_a?(String)\n opts = {:resource => opts}\n end\n\n # Defaults\n opts = {\n :node => rspec_system_node_set.default_node\n }.merge(opts)\n\n resource = opts[:reso... | [
{
"docid": "4c45b26a76a71bb11b2f7bfd3cd05fef",
"score": "0.7783886",
"text": "def puppet_resource_cmd\n PUPPET_BINPATH + 'resource cisco_vxlan_vtep_vni'\nend",
"title": ""
},
{
"docid": "65465bad349ddfc13623c2e0e4dd5358",
"score": "0.75923926",
"text": "def execute\n resource =... |
ccfcf3c0546d64498330c05ec8688303 | Returns the title of this object. The RVG object title is stored as the 'title' property on the image | [
{
"docid": "f8dbbd12ca1a6752a6e710b20b9e2baa",
"score": "0.72800046",
"text": "def title\n @title.to_s\n end",
"title": ""
}
] | [
{
"docid": "b81941d7c5a31902516d54a7366e7a83",
"score": "0.7566701",
"text": "def title\n @properties[PROP_TITLE]\n end",
"title": ""
},
{
"docid": "0ae6e02f35a6967a4aef9ea67e27a55b",
"score": "0.7421592",
"text": "def obj_title #:doc:\n obj.has_attribute?( :title ... |
bad51d449f66f0e90050f4538c8de354 | To add the first node | [
{
"docid": "79ecfaa55dbac9ea93da321433d0759d",
"score": "0.7294982",
"text": "def add_first_node(word, defn)\n @head = Node.new(word, defn, nil)\n @last = @head\n end",
"title": ""
}
] | [
{
"docid": "def72e77db7ebebd3510c7fc45c61829",
"score": "0.89520586",
"text": "def add_first(node)\n end",
"title": ""
},
{
"docid": "e01efee5d4316b1a745aa0ede0e88ee9",
"score": "0.80353284",
"text": "def add_node\n a = add_nodes(1)\n a[0]\n end",
"title": ""
},
... |
68602cff3c39ba1fbdcf763c3b60bdb4 | Determine whether to run the setup verifier. Should not be run for rake tasks, tests, etc. | [
{
"docid": "157efae0c7fa56c62717bd0ed6b96ce3",
"score": "0.6239424",
"text": "def initialized?\r\n if ENV[\"RAILS_ENV\"] == \"test\" || !User.table_exists? || $setup_disabled \r\n return false\r\n else \r\n $tmp_env = ENV[\"RAILS_ENV\"] || \"development\"\r\n return true\r\n end... | [
{
"docid": "20f2a22a0117a7961dd480f013dc625f",
"score": "0.75458485",
"text": "def setup?\n @setup\n end",
"title": ""
},
{
"docid": "74fc2410c63a7682223e2add4973b0c5",
"score": "0.70730025",
"text": "def pre_setup_suite()\n @cfg['pre_setup'] =\"defined\"\n return true\... |
572f81298a3efc321431209eb8b12671 | This code from 1.9.3's minitest | [
{
"docid": "73ba55c207ed756c3bc2f5e7d6d09369",
"score": "0.0",
"text": "def test_suites # :nodoc:\n @@test_suites.keys.sort_by { |ts| ts.name.to_s }\n end",
"title": ""
}
] | [
{
"docid": "8f26b8a63b8cc89d3dd8e5dd415c4b26",
"score": "0.6671578",
"text": "def test_ruby19_minitest_required\n setup_test('MiniTest', 'minitest/unit')\n result = turn 'tmp/test.rb'\n assert result.index('PASS')\n end",
"title": ""
},
{
"docid": "4e585ce1cddabcba0fe2a0ed1b003083"... |
4cdbdf3eb7e05c4ab963bb445f6de868 | Performs all the operation needed to synchronize DAO data | [
{
"docid": "033b1fdbcc80e6e047a3f264242c6433",
"score": "0.0",
"text": "def synchronize\n @number = calculate_results_number\n @score = calculate_score\n @average = calculate_average\n @min = calculate_min\n @max = calculate_max\n end",
"title": ""
}
] | [
{
"docid": "bf5c463a9c3211fc208d2b08a6170a3a",
"score": "0.6623448",
"text": "def sync_data\n\t\tSYNC_TABLES.each do |sync|\n\t\t\tself.sync_table(sync)\n\t\tend\n\tend",
"title": ""
},
{
"docid": "ded4d326e17a4759e3c94d7db919341c",
"score": "0.62176776",
"text": "def sync_datas_proc... |
1e27a5a2d2fc01567f3fde8e7f3b3e0e | GET /ultimo_grado_de_estudios GET /ultimo_grado_de_estudios.json | [
{
"docid": "c60b238c3521beccf70fc2e7d3914947",
"score": "0.74038655",
"text": "def index\n @ultimo_grado_de_estudios = UltimoGradoDeEstudio.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @ultimo_grado_de_estudios }\n end\n end",
"title"... | [
{
"docid": "5bf995e1ad8e79c1d33398aaeae52ba3",
"score": "0.69401205",
"text": "def show\n @ultimo_grado_de_estudio = UltimoGradoDeEstudio.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @ultimo_grado_de_estudio }\n end\n end",
... |
af9f3141231a5febf4036a80637efff1 | Returns all pages of followers | [
{
"docid": "9276d4f64f8c17af37bfbbfd1d62f9ab",
"score": "0.70705163",
"text": "def all_followers\n users = []\n cursor = \"-1\"\n while cursor != 0 do \n json = get(\"/statuses/followers.json?cursor=#{cursor}\")\n cursor = json[\"next_cursor\"]\n users += json[\"users... | [
{
"docid": "9f040e7a1835c85d855a7aca0b80a9b3",
"score": "0.78027916",
"text": "def followers\n @person = Person.find(current_user.id)\n\t\t@followers = @person.followers.paginate :per_page => 12, :page => params[:page]\n end",
"title": ""
},
{
"docid": "80dee3ba1606961f63e1b63c0652e790",... |
8f9e3f1be4100abefab126a9bd9e9fce | PUT /art_categories/1 PUT /art_categories/1.xml | [
{
"docid": "d1ca6cd4d90a2c922ca894620973afbd",
"score": "0.62731814",
"text": "def update\n @art_category = ArtCategory.find(params[:id])\n\n respond_to do |format|\n if @art_category.update_attributes(params[:art_category])\n format.html { redirect_to(@art_category, :notice => 'ArtCat... | [
{
"docid": "d042a4b8d67e19e968d8c4f929e81e33",
"score": "0.65901524",
"text": "def UpdateCategory params = {}\n \n APICall(path: 'categories.json',method: 'PUT',payload: params.to_json)\n \n end",
"title": ""
},
{
"docid": "8efbadf20853ae8f07589d7714e7a347",
"sc... |
eef964a0c2983646968d50516b93e16c | Get the version. ==== Returns Document version. | [
{
"docid": "9f64b419c2a0b189ac6c5dac37ba387d",
"score": "0.76502186",
"text": "def getVersion\r\n\t\t\t\t\treturn @version\r\n\t\t\t\tend",
"title": ""
}
] | [
{
"docid": "7ea78c40c16f7bd3e926c0682822f209",
"score": "0.86372286",
"text": "def version # :nodoc:\n if document.present?\n document.version\n else\n @metadata[:version]\n end\n end",
"title": ""
},
{
"docid": "ded2997da709f9a3078ac68c504ed21b",
"score": "0.8226105... |
9e9ce976dffbe91bf44b907afd7fb5b5 | test this puppy, make sure it works | [
{
"docid": "c3371937d03097b57c49b2bb11e9106a",
"score": "0.0",
"text": "def uniquely\n full_string = File.read(file_name)\n full_list = full_string.to_textual\n sort_list = full_list.sort\n uniq_list = sort_list.uniq\n render \n end",
"title": ""
}
] | [
{
"docid": "f5d619cb9e333c5548c5377e9ded4ca4",
"score": "0.6428158",
"text": "def initialize\n puts \"Initializing new puppy instance ...\"\n end",
"title": ""
},
{
"docid": "b6c471b2ef018526cd1adcdb6de6f4cc",
"score": "0.64126384",
"text": "def initialize\n puts \"Initializin... |
5116b370f76c8caabf95231f77f162ea | POST /affinities POST /affinities.json | [
{
"docid": "407362883dd4d2a7ccecd829e8b53e0f",
"score": "0.52570254",
"text": "def create\n @affinity = Affinity.new(affinity_params)\n\n respond_to do |format|\n if @affinity.save\n format.html { redirect_to @affinity, notice: 'Affinity was successfully created.' }\n format.jso... | [
{
"docid": "80732007b8dd4d7403a4693576c79b06",
"score": "0.58993393",
"text": "def create\n @affair = Affair.new(affair_params)\n\n respond_to do |format|\n if @affair.save\n format.html { redirect_to @affair, notice: 'Affair was successfully created.' }\n format.json { render :... |
f2f9ede8d22607abcfc8680f13579080 | acts_as_xapian :texts => [:the_definition] | [
{
"docid": "bc08596dad9bf49bc50ce029aaf1d216",
"score": "0.0",
"text": "def texturized_definition\n #this will have the url parsing, tag parsing, etc \n #require 'sanitize'\n #old_def = Sanitize.clean self.the_definition\n old_def = CGI::escapeHTML self.the_definition\n \n #old_def.gsu... | [
{
"docid": "7145d13ac7f230174d58ddccd38d0578",
"score": "0.61736125",
"text": "def full_text_indexing\n generate \"sufia:models:fulltext\"\n end",
"title": ""
},
{
"docid": "7145d13ac7f230174d58ddccd38d0578",
"score": "0.61736125",
"text": "def full_text_indexing\n generate \"... |
91436f6ace02d506723a3a98d09e9858 | PreOrder Traversal of Tree | [
{
"docid": "51490d90c3d041d6bffef11c2495c789",
"score": "0.7974321",
"text": "def preorder\n arr = []\n pre_order(@root, arr)\n return arr\n end",
"title": ""
}
] | [
{
"docid": "f31190881be2983e2ac3648b654bc8e2",
"score": "0.85270095",
"text": "def pre_order\n order = %w[root left right]\n action = proc { |node, returnable| returnable << node.value }\n root.nil? ? [] : traverse(@root, order, [], action)\n end",
"title": ""
},
{
"docid": "7d4868... |
6d749986c54677664cefaefac120c8a2 | Show all nonrequired features of your apk file. The result doesn't contain required features. | [
{
"docid": "578ae3dfd58a1e88021dadf268826a8d",
"score": "0.5110361",
"text": "def non_required_features(_opts = {})\n result = run_command(__method__)\n result ? result.to_a : nil\n end",
"title": ""
}
] | [
{
"docid": "df82c5cff655d72f7a6ffa35eab78913",
"score": "0.6614067",
"text": "def non_required_features(_opts = {})\n result = run_command(apkanalyzer_command, __method__)\n result ? result.to_a : nil\n end",
"title": ""
},
{
"docid": "3dd1426776836c42450c0ff83f89cd14",
"sco... |
4d9588f715e3ceceae71dfc61f556154 | DELETE /target_lists/1 DELETE /target_lists/1.xml | [
{
"docid": "644ce7d752fbc3d9c857be0fb715707c",
"score": "0.72472686",
"text": "def destroy\n @target_list = TargetList.find(params[:id])\n @target_list.destroy\n\n respond_to do |format|\n format.html { redirect_to(:back) }\n format.xml { head :ok }\n end\n end",
"title": ""
... | [
{
"docid": "cf3db25213818665ad892b671e824ec4",
"score": "0.72671384",
"text": "def delete_list(list_id)\n return base_uri('delete', 'lists/' + list_id)\n end",
"title": ""
},
{
"docid": "00eded1c246f6ba932df779edfa05888",
"score": "0.7096485",
"text": "def delete(list_id)\n ... |
ce586c0fcba82c4b22c15bc9178ea230 | Retrieves the Cloud provider's randomly generated Windows password Will only work on stock Amazon Windows AMIs or custom AMIs that where created with Administrator Password set to random in EC2Config return [String]: A password string. | [
{
"docid": "f0fc4f963b5e1d2d68e7a81e5f352c61",
"score": "0.7371202",
"text": "def getWindowsAdminPassword(use_cache: true)\n @config['windows_auth_vault'] ||= {\n \"vault\" => @mu_name,\n \"item\" => \"windows_credentials\",\n \"password_field\" => \"password\"\... | [
{
"docid": "6192f2e6de47342a65091efb05b1651b",
"score": "0.7217383",
"text": "def getWindowsAdminPassword\n if @cloud_id.nil?\n node, config, deploydata = describe\n @cloud_id = cloud_desc.instance_id\n end\n ssh_keydir = \"#{Etc.getpwuid(Process.uid).dir... |
b11e90c14efaeacb7fc2b674724ff2a5 | Method that sets the value of an object | [
{
"docid": "1432b534a9d58c7a0fa506a9db29907d",
"score": "0.0",
"text": "def set(name, value)\n set_text_content(name, 'input-field', @klass, value)\n end",
"title": ""
}
] | [
{
"docid": "2e9bb3fed96c5d881c18fc7acca701c5",
"score": "0.88765734",
"text": "def set(object, value); end",
"title": ""
},
{
"docid": "471b07012b1fab1369aff4b88329a169",
"score": "0.77503735",
"text": "def assign(obj)\n @value = obj\n end",
"title": ""
},
{
"docid... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "48a1503558358e15200513b8e4ff4691",
"score": "0.0",
"text": "def set_purchase_order_datum\n @purchase_order_datum = PurchaseOrderDatum.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;... |
2c4284558e9816d50e6c78ba724ca973 | SURROUND_WITH_PARENS = lambda do |list| list.tap do |list| list.prepend('(') << ')' unless list.empty? end end | [
{
"docid": "dd16c4fee64fc8cbe6457af88ece845b",
"score": "0.0",
"text": "def expectations\n case name\n when /\\?$/\n [\n ['returns true', 'to be_truthy'],\n ['returns false', 'to be_falsy'],\n ]\n when /\\!$/\n [\n ['does not raise an error'... | [
{
"docid": "8d8bdbe281921d6c18782e486e22a598",
"score": "0.5890762",
"text": "def replace_parens_group(str)\n str = strip_outer_parens str\n\n deep_level = 0\n replaced_str = ''\n tmp_str = ''\n parens_array = []\n\n str.chars do |char|\n case char\n when '('\... |
9ba6d06213d6558711cb1be8a1e4fdcf | , :only => ['edit'] | [
{
"docid": "fcf232e9f878fb001d6b9ce3d2cbcd58",
"score": "0.0",
"text": "def edit\n @authentications = current_user.authentications # if current_user\n end",
"title": ""
}
] | [
{
"docid": "032dd8df60c9d0640c01979f3429f5e8",
"score": "0.8197069",
"text": "def edit\n\n end",
"title": ""
},
{
"docid": "032dd8df60c9d0640c01979f3429f5e8",
"score": "0.8197069",
"text": "def edit\n\n end",
"title": ""
},
{
"docid": "032dd8df60c9d0640c01979f3429f5e8",... |
de7151b842fabefb60d1085d678cf37c | The object whose state machine is being walked source://state_machines//lib/state_machines/path_collection.rb7 | [
{
"docid": "6ffcbe25c8660e65fe3b24a876d58f35",
"score": "0.0",
"text": "def object; end",
"title": ""
}
] | [
{
"docid": "40beaf4eaeef568b4938576eecef5d87",
"score": "0.6583061",
"text": "def inspect\n \"#<#{self.class.name}:#{object_id} {path: #{path.inspect}}>\"\n end",
"title": ""
},
{
"docid": "28b91ae1478b3bf0f0ad2833cfb400d6",
"score": "0.6377686",
"text": "def object_for(path)... |
499cea5593841cc9b235c83c3860b788 | update data translate of question | [
{
"docid": "b536ff695866df60848a6ba8fba5cd91",
"score": "0.6630522",
"text": "def updateQuestionTrans\n result = Hash.new\n result['status'] = true\n\n begin # try\n if !QuestionsHlp.updateQuestionTrans(params[:question])\n res... | [
{
"docid": "1993f26764414835af6e9281953f7290",
"score": "0.7286935",
"text": "def update\n @question = Question.find(params[:id])\n\n @question.assign_attributes(params[:question])\n\n add_missing_translation_content(@question.question_translations)\n\n respond_to do |format|\n if @ques... |
5132d7816e4293aaadf9df4454abd157 | Verifies the existence of an index with a given name. | [
{
"docid": "779b211a6773dc1f7f21ffeeb2f94475",
"score": "0.74933213",
"text": "def index_name_exists?(table_name, index_name); end",
"title": ""
}
] | [
{
"docid": "5a496270301f714109f26220fe1d6e52",
"score": "0.7420039",
"text": "def has_index?( index_name )\n\n return @indexes.has_key?( index_name )\n\n end",
"title": ""
},
{
"docid": "ffcce8d7632b85320a025b7cbd03f5df",
"score": "0.73598576",
"text": "def index_exists?(index_na... |
c37f67711dda189b2eb3d5855170f519 | POST /catalog_sections POST /catalog_sections.json | [
{
"docid": "f97da4d39d9b74988b5647f48cc9c31f",
"score": "0.6985524",
"text": "def create\n @catalog_section = CatalogSection.new(params[:catalog_section])\n\n respond_to do |format|\n if @catalog_section.save\n format.html { redirect_to @catalog_section, notice: 'Catalog section was su... | [
{
"docid": "338ac812358fd2df02d160ea4f4a89bf",
"score": "0.6776694",
"text": "def create_sections; end",
"title": ""
},
{
"docid": "d0483b20b9ccc079536da6678dd9c4e7",
"score": "0.6523293",
"text": "def create\n @section = @survey.sections.build(section_params)\n @section.save\n... |
4b5aaff50fcb68a13be7dadc3dd41f16 | Determine if the user is valid, and if so, return the UID | [
{
"docid": "415fae3a63650a3620ef5d93bf8ff93f",
"score": "0.7571402",
"text": "def validuser?(value)\n info \"Is '#{value}' a valid user?\"\n return 0\n begin\n number = Integer(value)\n return number\n rescue ArgumentError\n number = nil\n end\n (number = uid(value)) && ... | [
{
"docid": "63dc411bb62e034a489e4c6c9386ba6d",
"score": "0.68399423",
"text": "def validate_id( uid )\n\t\tself.log.debug \"validating userid (UID) %p\" % [ uid ]\n\t\tfinish_with Apache::BAD_REQUEST, \"missing ID\" if uid.nil?\n\t\tfinish_with Apache::BAD_REQUEST, \"malformed or invalid ID: #{uid}\" un... |
3784061a448f6b6898279c261a5f6f8f | GET /teachers GET /teachers.json | [
{
"docid": "878bfaedc1ffb7c7a9701448de3e7614",
"score": "0.6827773",
"text": "def index\n @teachers = Teacher.all\n end",
"title": ""
}
] | [
{
"docid": "a96cfbb8b546d49fdc6b5f1fd781c592",
"score": "0.78560823",
"text": "def teachers\n url = drop_url_version + \"/count/teacherAssociations/#{params['edorg_id']}/teachers\"\n begin\n entities = RestClient.get(url, get_header)\n entities = JSON.parse(entities)\n rescue => e\n ... |
c5df9b5c0226a4de69bcfdb0a3b00699 | get all transActions of this application by this TimeFrame | [
{
"docid": "45664c744e8c6b5d7e2fb951af872f4d",
"score": "0.0",
"text": "def process_unexpected_transactions()\t\t\n\t\tunexpected_uuids=[]\t\n\t\tparams=prepare_base_params()\t\n\t\tresult=server_rest_api(@transaction_restapi,params)\t\n\t\tresult.each do |res|\t\n\t\t\tif ! @output[:transactionInstance... | [
{
"docid": "24f411c42af53963715bd8376d8868e2",
"score": "0.6232497",
"text": "def txactions\n load! unless loaded?\n return @txactions\n end",
"title": ""
},
{
"docid": "fb1b5822cd982983fe52bd6e50e0ccd5",
"score": "0.6101671",
"text": "def actions\n map {|transiti... |
7a5c8a78839595bd430ff0a073c34b8c | GET /movies/1 GET /movies/1.json | [
{
"docid": "f555edde49f126d8639068a6761ac790",
"score": "0.0",
"text": "def show\n @movie = Movie.find(params[:id])\n @base_url = 'http://api.douban.com/v2/movie/search?tag='\n @tag_array = [\"科幻\",\"张国荣\",\"英国\",\"韩国\",\"悬疑\",\"动作\",\"日本\",\"惊悚\",\"纪录片\",\"魔幻\",\"二战\",\"爱情\",\"青春\",\"日本动画\",\"... | [
{
"docid": "032285a2d9139ac71f763cf337810363",
"score": "0.76731646",
"text": "def show\n @movie = Movie.find(params[:id])\n\n render json: @movie\n end",
"title": ""
},
{
"docid": "cf2a89ad81e7ad709be1610bbf41e011",
"score": "0.76367724",
"text": "def show\n respond_to d... |
76bb500de60de892b7a3e480b692c094 | Resets the configurable options to provided options or defaults. This will also creates MsRest::TokenCredentials to be used for subsequent Azure Resource Manager clients. | [
{
"docid": "94f15a8c525c370d5a901334479d37c1",
"score": "0.7459698",
"text": "def reset!(options = {})\n Azure::ARM::Configurable.keys.each do |key|\n default_value = Azure::ARM::Default.options[key]\n instance_variable_set(:\"@#{key}\", options.fetch(key, default_value))\n end\n... | [
{
"docid": "ae4e2e30eb0a5f428a449e7c56d28bba",
"score": "0.8514311",
"text": "def reset!(options = {})\n MsRestAzure::Common::Configurable.keys.each do |key|\n default_value = MsRestAzure::Common::Default.options[key]\n instance_variable_set(:\"@#{key}\", options.fetch(key, default_va... |
1bffac330305f2d4c49f8b57940b606c | Determine the transaction_type for existing records based on amount | [
{
"docid": "4d70a352235a06ce80d7a540691377d8",
"score": "0.76682717",
"text": "def transaction_type\n # new_record? is checked first to prevent a nil class error\n return %w[Credit credit] if !new_record? && amount >= 0\n\n %w[Debit debit]\n end",
"title": ""
}
] | [
{
"docid": "8eda7acbd0ee614717253e67d62163a2",
"score": "0.821476",
"text": "def transaction_type_from_amount_fields\n is_number = lambda { |val| true if Float(val) rescue false }\n [TRANSACTION_TYPE_CREDIT, TRANSACTION_TYPE_DEBIT].each do |txn_type|\n field_name = \"#{txn_type}_amount\... |
09f9162d1c96be689b01d1a7282ad318 | Helper to verify the response from web request | [
{
"docid": "8eff135cb29f7af7cd2559b01bf9ec68",
"score": "0.0",
"text": "def verify_result(curl, result, verify = {})\n if verify[:returns].nil? && !verify['returns'].nil?\n verify[:returns] = verify['returns']\n end\n if verify[:does_not_return].nil? && !verify['does_not_return'].nil?\n ... | [
{
"docid": "ef625b57c85244f3d1abbff6d961172e",
"score": "0.7610971",
"text": "def verify_get_response(response)\n # HTTP response codes are handled here and propagated up to the caller, since caller should be able\n # to handle all types of errors the same - using exceptions\n unles... |
0542ff6a77dbfc8c120ef082dd9a2db7 | Public: Stores the shortened version of a URL. url The String URL to shorten and store. code Optional String code for the URL. options Optional Guillotine::Service::Options Returns the unique String code for the URL. If the URL is added multiple times, this should return the same code. | [
{
"docid": "e4b544ebda1df0281d9a8e7f6ac5c123",
"score": "0.6677531",
"text": "def add(url, code = nil, options = nil)\n return if @read_only\n if existing_code = code_for(url)\n existing_code\n else\n code = get_code(url, code, options)\n\n if existing_url = find(code... | [
{
"docid": "2fd69a3995c1e84d1c8c9a7344ef6476",
"score": "0.737371",
"text": "def store(url, code)\n\n redis.hmset(\"shorty:code:#{code}\",\n :url, url,\n :ctime, Time.now,\n :atime, Time.now,\n :hits, 1\n )\n\n log... |
f921419028fa6ba07fcd9e29200c6404 | Test case for use in compiling which FY column the Docket entry fits into | [
{
"docid": "8355d12d7bc1e82812b202081d56435a",
"score": "0.0",
"text": "def fiscal_year\n\t\tbegin\n\t\t\ttemp = Date.new(2000, 9, 30)\n\t\t\tcase\n\t\t\t\twhen (self.BFD19 <= temp)\n\t\t\t\t0\n\t\t\t\twhen (self.BFD19 <= temp + 5.years)\n\t\t\t\t1\n\t\t\t\twhen (self.BFD19 <= temp + 10.years)\n\t\t\t\t... | [
{
"docid": "0322730ed8970deb6e999aebda7f17f1",
"score": "0.60899264",
"text": "def check_columns_for_winner\n # TODO\n end",
"title": ""
},
{
"docid": "55ee1ebd81798591f99388c81764a522",
"score": "0.59908754",
"text": "def check_col\n\n\nend",
"title": ""
},
{
"docid"... |
0c242c880db8d54f20bf06e13ef24b79 | Sends next chunk to outputs. Will be queued if paused, otherwise sent to output(s). | [
{
"docid": "f1a98558854919ac51ddae5e0298d049",
"score": "0.5934447",
"text": "def out(chunk: \"\", newline: true, cr: false)\n outputQueue << { chunk: chunk, newline: newline, cr: cr }\n end",
"title": ""
}
] | [
{
"docid": "fd6dd7a998d37336c31029f5502d86a0",
"score": "0.70414144",
"text": "def write\n while (chunk = @sink_queue.pop)\n @sink << chunk\n end\n end",
"title": ""
},
{
"docid": "0eb59edd09987db2a047595cb6a25860",
"score": "0.68603724",
"text": "def stre... |
eb2b1902b3e6ea6ca809d31fca2940bb | This method removes the applicant from their project queue and project assignment (decrementing counts appropriately). | [
{
"docid": "74673d0c6909c7babc190985ff050117",
"score": "0.61086965",
"text": "def remove_from_project_assignment\n if project\n project.current_students_men -= 1 if person.is_male?\n project.current_students_women -= 1 unless person.is_male?\n project.save(:validate => false)\n end... | [
{
"docid": "011898cfa877feb26e2c67c75600b8c8",
"score": "0.733855",
"text": "def remove_from_project_queue\n # We have to check to see if the status is 'completed' because this\n # callback hook will get called when an application is set to 'completed'\n # or 'unsubmitted', and we only want it ... |
af2f70929000deb00872e18b760cb734 | GET /wechat_accounts GET /wechat_accounts.json | [
{
"docid": "0a1405421081e2146afc61a7224f9fa0",
"score": "0.7736027",
"text": "def index\n @wechat_accounts = WechatAccount.all\n end",
"title": ""
}
] | [
{
"docid": "1c1a4b30252257377313131349240c9d",
"score": "0.7092167",
"text": "def get_accounts()\n http_get(accounts_url)\n end",
"title": ""
},
{
"docid": "e7d5770316fcf0c9dfe4c64e4a22d339",
"score": "0.6950156",
"text": "def accounts\n get('/accounts')['accounts']\n ... |
0396a846626a33f9fc5d305bd5fe76cf | The Genre class needs an instance method, songs, that iterates through all songs and finds the songs that belong to that genre. | [
{
"docid": "e3e2633ccd3c6557abe0ab8cabc7b07c",
"score": "0.774931",
"text": "def songs\n Song.all.select{|x| x.genre == self}\nend",
"title": ""
}
] | [
{
"docid": "e1301ee1d89663ae9a9f96abe650e82d",
"score": "0.8312619",
"text": "def songs\n Song.all.select {|song_name| song_name.genre == self}\n end",
"title": ""
},
{
"docid": "a748b00214ff5fac5ff2703818c8adb6",
"score": "0.8286865",
"text": "def songs\n Song.all.select{... |
85639289910adaf15d8e4f098654a704 | Checks if the source data is a Google Cloud Datastore backup. | [
{
"docid": "7b92380627de25f1e1ff50eea773193d",
"score": "0.79275227",
"text": "def backup?\n @gapi.configuration.load.source_format == \"DATASTORE_BACKUP\"\n end",
"title": ""
}
] | [
{
"docid": "bc69c1cda6f7fba944a3ab3a14852c54",
"score": "0.79635763",
"text": "def backup?\n @gapi.source_format == \"DATASTORE_BACKUP\"\n end",
"title": ""
},
{
"docid": "7fd33e1d7944cb6c1074b2766cf5646e",
"score": "0.78731763",
"text": "def backup?\n va... |
61c9d380a4242a3df71cba7e98c62215 | ============================================================================== match? ============================================================================== match service and NetAddr::CIDR against this entry return True/False | [
{
"docid": "00e2b2c624c098cc1a5a21c6d7079f2b",
"score": "0.77454454",
"text": "def match?(service,cidr)\n if (@acl)\n return(true) if ( @service == service && @acl.match(cidr)[:permit] )\n\n else\n return(true) if ( @service == service )\n end\n return(f... | [
{
"docid": "f964b2ceb9014041b7ed83913b5ade7c",
"score": "0.7527956",
"text": "def matching_entry(service,cidr)\n match = nil\n @entries.each do |entry|\n if ( entry.match?(service,cidr) )\n match = entry.avpairs\n break\n end\n end... |
42e6b1fd20c531f74903be9b8b85a478 | Lose Armor armor_id : armor ID n : quantity | [
{
"docid": "e04783db535b885f4256f1ae5a28969c",
"score": "0.7645005",
"text": "def lose_armor(armor_id, n)\n lost_armor = []\n if armor_id.is_a?(Condition_Item)\n lost_armor << @armors.delete(armor_id)\n elsif armor_id.is_a?(Numeric)\n armor = @armors.select {\n |armor| armor.id... | [
{
"docid": "eaf24ae9cc1b3f602fe086c9a5635511",
"score": "0.7822094",
"text": "def lose_armor(armor_id, n)\n # Reverse the numerical value and call it gain_armor\n gain_armor(armor_id, -n)\n end",
"title": ""
},
{
"docid": "eaf24ae9cc1b3f602fe086c9a5635511",
"score": "0.7822094",
... |
88d54fd6fa0f1cbe05080d9dadf737a0 | GET /purcahses/1 GET /purcahses/1.json | [
{
"docid": "8e345bdbf7a7a19bc6d1848de3245e51",
"score": "0.7299285",
"text": "def show\n @purcahse = Purcahse.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @purcahse }\n end\n end",
"title": ""
}
] | [
{
"docid": "f1137f852c946a5ba75e775a8d7ec618",
"score": "0.72530246",
"text": "def show\n @purse = Purse.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @purse }\n end\n end",
"title": ""
},
{
"docid": "c0c2ae02aef8e... |
e3d701596a803bc91d6f7b99dc7ed658 | POST /link_finders POST /link_finders.json | [
{
"docid": "41ff12afb9366c192b8c6706862b9858",
"score": "0.7530144",
"text": "def create\n @link_finder = LinkFinder.new(params[:link_finder])\n\n respond_to do |format|\n if @link_finder.save\n format.html { redirect_to @link_finder, notice: 'Link finder was successfully created.' }\n... | [
{
"docid": "f70c066dd770edd75bfb29c7e7cead0a",
"score": "0.66752607",
"text": "def new\n @link_finder = LinkFinder.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @link_finder }\n end\n end",
"title": ""
},
{
"docid": "46f126c2eb35... |
3b39e69ab78d8db7c7e2dfae515e9664 | Example solution('camelCasing') => should return 'camel Casing' def solution(string) index_camel_cased = nil string.chars.each_with_index do |letter, index| if letter == letter.capitalize index_camel_cased = index end end string[0..index_camel_cased 1] + " " + string[index_camel_cased..1] end def solution(string) index... | [
{
"docid": "94db8b9035bf7479b3b5620e0c9174c9",
"score": "0.0",
"text": "def solution(string)\n # lowers = string.scan(/[a-z]+[A-Z]/).join\n uppers = string.scan(/[A-Z][^A-Z]+/).join(' ')\n # lowers + \" \" + uppers\n # require 'pry'; binding.pry\n\nend",
"title": ""
}
] | [
{
"docid": "562692a91b83f62266044a89ace02471",
"score": "0.7699754",
"text": "def to_camel_case(str)\n if str.empty?\n answer = \"\"\n else\n str = str.split(/-|_/)\n p str[1..(str.length - 1)]\n answer = str[0] + (str[1..(str.length - 1)].map(&:capitalize)).join\n end\n answer\nend",
... |
d542a2964e982b9a4564b9395b616130 | Stores the given file (responding to save) at the current request path | [
{
"docid": "c0047d711fdf9aa55236be6375906c42",
"score": "0.74204946",
"text": "def save_file(file)\n FileUtils.mkdir_p(File.dirname(full_request_path))\n file.save(full_request_path)\n end",
"title": ""
}
] | [
{
"docid": "46ee30c7262e9057855210eebac58073",
"score": "0.76997024",
"text": "def file_save\n if @filename\n store_file(@filename)\n else\n file_save_as\n end\n end",
"title": ""
},
{
"docid": "dd53859de7ac890edac280dccad0034a",
"score": "0.73... |
9d894dc8e3cff0fce7f428845131e4ec | Use this with block if values are dynamicly collected. | [
{
"docid": "c7f4d17f867d5a858c96eb65b2a3bea7",
"score": "0.6106076",
"text": "def values value=nil, &block\n @values=value || block if value || block_given?\n @values\n end",
"title": ""
}
] | [
{
"docid": "014a617f94d73fff9c7258e2918847da",
"score": "0.6531812",
"text": "def dynamic(&block)\n @dynamic = block\n self\n end",
"title": ""
},
{
"docid": "038b1a1737084e828144b3e3e83c1632",
"score": "0.6473763",
"text": "def collect!(&block)\n super() {|x|... |
7c9a3f435c457f70ebb8526cfb069f08 | GET /auctions/new GET /auctions/new.xml | [
{
"docid": "063f1b04ee49f71be6ee54be9bcec1dd",
"score": "0.6972531",
"text": "def new\n @auction = Auction.new\n @auction.item_id = params[:item_id] if params[:item_id]\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @auction }\n end\n end",
... | [
{
"docid": "8d36b9e10e235c0fc408df8d41e2e675",
"score": "0.80073756",
"text": "def new\n @auction = Auction.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @auction }\n end\n end",
"title": ""
},
{
"docid": "3533044055475c880c617... |
4300b428c4db29052f81d45c54d434a6 | GET /admin/catalogs/1 GET /admin/catalogs/1.json | [
{
"docid": "3941c68063ec0139f4cc265f30f9d4ee",
"score": "0.8050738",
"text": "def show\n @admin_catalog = Admin::Catalog.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @admin_catalog }\n end\n end",
"title": ""
}
] | [
{
"docid": "5bd2783a483aa01c96f910584d61d17b",
"score": "0.7464394",
"text": "def show\n @catalog = Catalog.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @catalog }\n end\n end",
"title": ""
},
{
"docid": "5bd2783a... |
b95634ce06e842cf4a3c5907b4fc63d6 | Used for displaying a feed of all glitterposts ever made on GlitterGallery. | [
{
"docid": "e0baccabae9cc1b9d5128267566b6b9f",
"score": "0.7306567",
"text": "def index\n \t@glitterposts = Glitterpost.all\n end",
"title": ""
}
] | [
{
"docid": "a5ea60bb0e16e333e8e757ebc6479124",
"score": "0.69270486",
"text": "def instant_feed\n @feed_posts = Post.recent.published.limit(20)\n respond_to do |format|\n format.rss { render :layout => false }\n end\n end",
"title": ""
},
{
"docid": "00ad5b0578e2812bfb824ea777... |
754c8978d85b6097962d3d2b37b40a95 | Meant for TEMPORARY changes. Create a new method which does NOT wrap any existing one. Simply move any existing one "aside", so that it can be reconstituted later. Then define new one in its place. :: Class Symbol Proc >> () :: (Proc|nil) Block >> () | [
{
"docid": "68f9ddbf7ba28fc02c6792007b712358",
"score": "0.0",
"text": "def create(proc=nil, &block)\n # There may or may not be an existing method of this name.\n # Difficult to check for that: because we don't want to know whether\n # it is defined in this module OR ITS ANCESTORS,... | [
{
"docid": "44306d2ef320024aed1554e66d086ae2",
"score": "0.7371716",
"text": "def proc; end",
"title": ""
},
{
"docid": "c94953c1f2b591935f779555dd301366",
"score": "0.7201765",
"text": "def proc=(_); end",
"title": ""
},
{
"docid": "c7e14839db53191e13db1adc673a419d",
... |
35b5290e898962e1cc6195ea8faace04 | PUT /halls/1 PUT /halls/1.xml | [
{
"docid": "44ad191c6ab8d048d539610056a12246",
"score": "0.5934316",
"text": "def update\n @hall = Hall.find(params[:id])\n\n respond_to do |format|\n if @hall.update_attributes(params[:hall])\n flash[:notice] = 'Hall was successfully updated.'\n format.html { redirect_to(@hall)... | [
{
"docid": "7a098a6882fad73e5dd5479fe32ae2d2",
"score": "0.6230493",
"text": "def update(id, name=\"Updated Name\", age=\"55\")\r\n xml_req =\r\n \"<?xml version='1.0' encoding='UTF-8'?>\r\n <person>\r\n <id type='integer'>#{id}</id>\r\n <name>#{name}</name>\r\n <age>#{age}</age>... |
36eb79820cf75d56b3104ccc9527bd12 | GET /repo_meta/1 GET /repo_meta/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "fa917af04b53f332b9eb87412c196627",
"score": "0.74518543",
"text": "def index\n @repo_meta = RepoMetum.all\n end",
"title": ""
},
{
"docid": "5a485d915a477db3756adcfaf4f4992e",
"score": "0.74389327",
"text": "def meta\n @meta ||= @app.client.repo(nwo)\n end",
... |
dbd29354898690d116e525eca561d79f | Get Meal Plan Templates Get meal plan templates from user or public ones. | [
{
"docid": "f1d9efe305025a7a0e63c662ca5b9426",
"score": "0.6569801",
"text": "def get_meal_plan_templates(username, hash, opts = {})\n data, _status_code, _headers = get_meal_plan_templates_with_http_info(username, hash, opts)\n data\n end",
"title": ""
}
] | [
{
"docid": "4fcbbe7ccb7d8735dab573b06a9c6fa5",
"score": "0.6734967",
"text": "def templates_show\n @user = User.find_by_id(session[:user_id])\n \n # If an institutional user, return the template \n if user_role_in?(:institutional_admin, :institutional_reviewer, :resource_editor, :template_ed... |
3ace2410afcfed300534594b1a8612dc | Sets page name on page object. | [
{
"docid": "3f97b13c6ba82e74e794d4b023f06dfc",
"score": "0.76616216",
"text": "def set_page_by_name\n name = params[:page] || Rails.application.config.MAIN_PAGE\n\n @page = Page.new(name)\n end",
"title": ""
}
] | [
{
"docid": "521256e56f7c41c51b3449de625fb2e8",
"score": "0.7447114",
"text": "def update_page_name\n if self.service_id.present?\n self.name = \"#{self.title} (#{self.service.name})\"\n else\n self.name = self.title\n end\n end",
"title": ""
},
{
"docid": "2fd368b10516d20... |
a895d2854ae9694acb204f05dbb0e98e | Retrieve a set of documents by id. | [
{
"docid": "205fbcfd57e7c332742f53462f06c5ee",
"score": "0.5963167",
"text": "def fetch_many(ids, req_params = nil, eds_params = nil)\n\n # Get each item from its appropriate repository one-at-a-time rather than\n # as a batch (search) request. This is for two reasons:\n # 1. Ensure that... | [
{
"docid": "4569addd01cabedb5847e327f5790a70",
"score": "0.73040473",
"text": "def documents(ids)\n _, document = search_service.fetch(ids)\n document\n end",
"title": ""
},
{
"docid": "bef23fe39a33dc860433ad8273fb7439",
"score": "0.71067995",
"text": "def find(id)\n do... |
a835a54b6a028012f102b76cf87c7058 | Indicate whether this is the staging service instance. | [
{
"docid": "caab4fe2c1e3b55977d4ecd621287411",
"score": "0.75057065",
"text": "def staging_deployment?\n application_deployed? && (application_deployment == :staging)\nend",
"title": ""
}
] | [
{
"docid": "4ca945bddb60dd50dc6c98031541624b",
"score": "0.8434502",
"text": "def staging?\n environment == :staging\n end",
"title": ""
},
{
"docid": "0e307583a81349e0dfbe9a6cf2778a3a",
"score": "0.8045047",
"text": "def use_staging?\n use_staging\n end",
"ti... |
a28e478681ac9d29c5dd796aa824781d | PATCH/PUT /users/1 PATCH/PUT /users/1.json | [
{
"docid": "f104d99d762f31cf25c7e41169601739",
"score": "0.0",
"text": "def update\n respond_to do |format|\n if ((User.current_user.role.strip.downcase.match(/admin/) rescue false) ? true : false) and @user.update_attributes(user_params)\n format.html { redirect_to @user, notice: 'User w... | [
{
"docid": "f0686f191a0def3b6c3ad6edfbcf2f03",
"score": "0.72427535",
"text": "def update_user(email)\n url = Addressable::URI.new(\n scheme: 'http',\n host: 'localhost',\n port: 3000,\n path: '/users/2.json'\n ).to_s\n\n puts RestClient.patch(\n url,\n { user: { email: email } }\n ... |
6930ebbce96906cce4881ef4154e84c9 | Determine if content is approved everywhere | [
{
"docid": "850a3cd7e7d304277048bdc31fa0f14d",
"score": "0.63876474",
"text": "def is_approved?\n (self.approved_feeds.count > 0) && ((self.pending_feeds.count + self.denied_feeds.count) == 0)\n end",
"title": ""
}
] | [
{
"docid": "f1144b89747ebaf37cd3cee1a0386dcd",
"score": "0.70287067",
"text": "def approved?\n !approved_on.nil?\n end",
"title": ""
},
{
"docid": "b4c267d6d3d1e923fb6a5e110ccf2241",
"score": "0.7024173",
"text": "def is_approved?\n moderation_flag ? true : false\n end",
... |
2962862cb0852e0e99d323109ad72d4b | Build a hash table by iterating over a list. | [
{
"docid": "38ca00209731b0002e5c5798995b31c5",
"score": "0.5413067",
"text": "def build_hash items\n result = {}\n items.each do |v|\n k = yield v\n if result.has_key? k\n raise \"Duplicate hash key: #{k} with values #{v} and #{result[k]}\"\n end\n result[k... | [
{
"docid": "6aba12a3c27100a94b46b30a4f8a86e7",
"score": "0.69339263",
"text": "def hash\n lists.inject({}){ |hash, p| hash[p[0]] ||= []; hash[p[0]] << p[1]; hash }\n end",
"title": ""
},
{
"docid": "860efbfd0f7a5bcdf41ec42dbb39afb6",
"score": "0.6689958",
"text": "def create_... |
2ff4de9ad2bd888c349a77911c0c995a | Get the personalization strategy. | [
{
"docid": "bb0416f18ef19e2c47c9bb1db17d251b",
"score": "0.808467",
"text": "def get_personalization_strategy(opts = {})\n @transporter.read(:GET, '1/strategies/personalization', {}, opts)\n end",
"title": ""
}
] | [
{
"docid": "8d6b6ac37221c3f7851413058422933f",
"score": "0.688286",
"text": "def strategy\n @strategy ||= begin\n strategy = detect_strategy\n strategy.new(ldap, groups)\n end\n end",
"title": ""
},
{
"docid": "bd6a9e6682b9f43902537b8ae18abae1",... |
8d617ddaa57740b01ee96afc2978ec52 | Get the comment posted person id. ==== Returns Id of the person who posted the comment. | [
{
"docid": "8c9a68e4b99a824bfaf7fe4c821b7a88",
"score": "0.5018409",
"text": "def getPostedBy\r\n\t\t\t\t\treturn @postedBy\r\n\t\t\t\tend",
"title": ""
}
] | [
{
"docid": "385d01eb30bf8755377ed98e92769db0",
"score": "0.6622638",
"text": "def commenter_id\n if user_signed_in?\n current_user.id\n else\n 0\n end\n end",
"title": ""
},
{
"docid": "9218f91bbc60a83842ca36f261348b9b",
"score": "0.64166456",
"text": "def comment... |
c7b5973fb9e4bc8d326b8d264bbe0ca0 | Insert the given ship into the database | [
{
"docid": "7993d6333a8d24d2a743e178d2c23a56",
"score": "0.8199241",
"text": "def insertShip(the_ship)\n\t\tsql_InsertShip = \"INSERT INTO battle_positions\n\t\t\t\t\t\t VALUES (#{the_ship['battleid']}, #{the_ship['playerid']}, \n\t\t\t\t\t\t #{the_ship['xpos']}, #{the_ship['ypos']}, '#{the_ship['stype'... | [
{
"docid": "ba25c81ca204cc0f50e6adb0314a5d54",
"score": "0.7623667",
"text": "def save\r\n\t\tpopulate_ships = '\r\n\t\tINSERT INTO ships (name, scan, signature, thrust, hull, armor, point_defense, group_sizes_id, tonnage, special, points, faction) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);' \r\n\t\t\... |
cf3f105b1a0836945180265d243e3d75 | Return path to follow/unfollow | [
{
"docid": "3763634fd6ebac5eec3a3b6107c9b54d",
"score": "0.65015006",
"text": "def followings_path\n h.users_followings_path(object.id)\n end",
"title": ""
}
] | [
{
"docid": "e58e080208b07917063d84e912c7f48d",
"score": "0.61757463",
"text": "def calc_path\n endpoint = state.target\n while endpoint\n state.path[endpoint] = true\n endpoint = state.came_from[endpoint]\n end\n end",
"title": ""
},
{
"docid": "001620ab1eb5bbc1d5431ca3e2... |
5de7e2f7cffce3ab57e0995eb5996182 | GET /perfilnegocios/1 GET /perfilnegocios/1.json | [
{
"docid": "efea37140101666ee7f267cffefa1355",
"score": "0.7570494",
"text": "def show\n @perfilnegocio = Perfilnegocio.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @perfilnegocio }\n end\n end",
"title": ""
}
] | [
{
"docid": "68e04d7d92616c108373e8a86578fed7",
"score": "0.7588018",
"text": "def index\n if params[:propietario]\n @usuario = Usuario.find(params[:usuario_id])\n authorize! :show, @usuario\n @negocios_propios = Usuario.find(params[:usuario_id]).negocios_propios\n render json: @ne... |
8c50103a95709a0a0fc051b4f5bcb518 | 0xEA1: SKNP Vx Skip next instruction if key with the value of Vx is NOT pressed | [
{
"docid": "b1c894e6f6e37d8817fb5315fbb5c04c",
"score": "0.6279936",
"text": "def skp_vx(x)\n inc_pc(2) && return unless @key[@v[x]]\n inc_pc\n end",
"title": ""
}
] | [
{
"docid": "d5872ffc96872f9e0681939e0040b134",
"score": "0.66217196",
"text": "def sne_vx_byte(x, kk)\n # We skip 1 instruction (each instruction consists of 2 bytes)\n inc_pc(2) && return unless @vpx[x] == kk\n # If equal, just go to the next instruction\n inc_pc\n end",
"title": ""
... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "8254ec44eee03dfe1c9cb48920354244",
"score": "0.0",
"text": "def set_task\n @task = Task.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... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "04e20295b21869f43f914eaecf5fd27a",
"score": "0.0",
"text": "def question_params\n params.require(:question).permit(:question, :weight, :super_bowl_id, :correct_answer_id, :correct_answer_attributes => [:id, :name], :options_ids => [], :answer_ids => [], :options_attributes => [:id, :nam... | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7493595",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.6954758",
"text": "def strong_params\n params.require(:request).permit(param_white... |
5dbd375c08e80279f1d774d54bd25f16 | When the User runs mastermind.rb, starts by printing: "Welcome to MASTERMIND Would you like to (p)lay, read the (i)nstructions, or (q)uit?" MASTERMIND waits for user input vv DOWNCASE VV | [
{
"docid": "01bb0b4212c3c42f661c85abbd650cdf",
"score": "0.7557744",
"text": "def welcome\n puts \"Welcome to MASTERMIND\\nWould you like to (p)lay, read the (i)nstructions, or (q)uit?\"\n piq = gets.chomp\n if piq == \"play\" || piq == \"p\" || piq == \"(p)\"\n setup\n elsif piq == \... | [
{
"docid": "3c996409be86037d6afdaf66262bc7ac",
"score": "0.8433926",
"text": "def start\n \"Welcome to MASTERMIND\\n\\nWould you like to (p)lay, read the (i)nstructions, or (q)uit?\\n> \"\n end",
"title": ""
},
{
"docid": "16154a58a35325756e95736c3f889f92",
"score": "0.75256896",
... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "03b4e469590c4fa91ba711be3a5b6608",
"score": "0.0",
"text": "def user_params\n params[:user].permit(:email, :password, :password_confirmation, :name)\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... |
bd5ea8890ea0851acbf7e99413e63846 | DELETE /areaing_histories/1 DELETE /areaing_histories/1.json | [
{
"docid": "67c2d938cdbe895034ebac147c07e9e6",
"score": "0.7405623",
"text": "def destroy\n @areaing_history.destroy\n respond_to do |format|\n format.html { redirect_to areaing_histories_url, notice: 'Areaing history was successfully destroyed.' }\n format.json { head :no_content }\n ... | [
{
"docid": "eb047b3dac868c894586a06c4c98b090",
"score": "0.7112244",
"text": "def destroy\n\n @observation = Observation.find(params[:observation_id])\n @area = @observation.areas.find(params[:id])\n\n @area.destroy\n\n respond_to do |format|\n format.html { redirect_to coral_observatio... |
1650b4de34aedb4aeb4522a7ece1a492 | a method which returns a string representation of the object of type BasicDrug | [
{
"docid": "485f8c18391e93c836e0f852f27498a4",
"score": "0.0",
"text": "def descriptions\n return @detail + \"; \" + @firm + \"; \" + @age + \": \" + \"#{@cost}\"\n end",
"title": ""
}
] | [
{
"docid": "3b349429501a19a1bb7d729ca553d18f",
"score": "0.6981289",
"text": "def to_s\n \"Name = #{@name}\\nGold Coins = #{@goldCoins}\\nMinimum Bonus = #{@minBonus}\\nMaximum Bonus = #{@maxBonus}\\nKind of the Treasure = #{@kind.upcase}\"\n end",
"title": ""
},
{
"docid": "9816cd8b... |
1020fd16c7d6a6bc0e3cf342f75969e8 | PATCH/PUT /doctors/1 PATCH/PUT /doctors/1.json | [
{
"docid": "e8ea7db4c8296c7b509e2556fa4277f8",
"score": "0.59815645",
"text": "def update\n respond_to do |format|\n if @doctor.update(doctor_params)\n format.html { redirect_to doctors_path, notice: 'Doctor was successfully updated.' }\n else\n format.html { render :edit }\n ... | [
{
"docid": "75bfaf6ef7fd63e7f9ebcb28c7c4576b",
"score": "0.6661084",
"text": "def update\n @doctor = Doctor.find(params[:id])\n if @doctor.update!(update_params)\n render json: {doctor: @doctor}, status: 200\n else\n render json: { errors: @doctor.errors }, status: 422\n ... |
fdb1499508701205b9de8d915ab00e02 | def move_piece(start_pos, end_pos) raise "invalid move" if self[start_pos].include?(NullPiece.new) || end | [
{
"docid": "25c70de3404a16a39e8043fa8afb6657",
"score": "0.0",
"text": "def valid_pos?(pos)\n indices = []\n @board.each do |row|\n row.each do |col|\n indices << [row, col]\n end\n end\n indices.include?(pos)\n end",
"title": ""
}
] | [
{
"docid": "3016723ad11a63e551b007d9c31d62d5",
"score": "0.90469384",
"text": "def move_piece(start_pos, end_pos)\n if self[start_pos].is_a?(NullPiece)\n raise StandardError.new(\"There is no piece at this start position\")\n end\n unless valid_pos?(end_pos)\n raise StandardError.new(... |
9c809b72f20dc975f2ee9d6dc601c0e7 | Start of a code fragment | [
{
"docid": "aa6724b230616fb3526cb40f0717b585",
"score": "0.0",
"text": "def code_start(language, caption)\n if caption.nil?\n caption_command = ''\n else\n replaced_caption = replace_inline_content(caption)\n caption_command = \"<figcaption>#{replaced_caption}</figcaption>... | [
{
"docid": "094e48f8b426139b1d8d3778b416cea9",
"score": "0.7799238",
"text": "def start_line_for(code_object); end",
"title": ""
},
{
"docid": "094e48f8b426139b1d8d3778b416cea9",
"score": "0.7799238",
"text": "def start_line_for(code_object); end",
"title": ""
},
{
"docid... |
f1bad979306f844262226656fa36d93c | GET /guidelines/new GET /guidelines/new.json | [
{
"docid": "d171c5569211deeef6b492cbddc83fe9",
"score": "0.73488516",
"text": "def new\n @guideline = Guideline.new\n @specialties = Guideline.order(:specialty).uniq.pluck(:specialty)\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @guideline }\n ... | [
{
"docid": "68b3c02c33cf39201ab64c8c36dec5db",
"score": "0.802379",
"text": "def new\r\n @guideline = Guideline.new\r\n\r\n respond_to do |format|\r\n format.html # new.html.erb\r\n format.json { render json: @guideline }\r\n end\r\n end",
"title": ""
},
{
"docid": "40fd9... |
de6c743c2ef408eb9650cb937800ded7 | GET /whats_ons GET /whats_ons.json | [
{
"docid": "5e13f6dfb4b51929107d468b3bbcd26d",
"score": "0.7381295",
"text": "def index\n \t@whatsOns = WhatsOn.all;\n end",
"title": ""
}
] | [
{
"docid": "64a3b15491367e5c1695b5848fcfcb2f",
"score": "0.76932675",
"text": "def index\n @whats_ons = WhatsOn.all\n end",
"title": ""
},
{
"docid": "923e2ebbcab7443808be3056aa16b839",
"score": "0.6944929",
"text": "def set_whats_on\n @whats_on = WhatsOn.find(params[:id])\n... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "84617e8cb7d445f7650f5f08869d1484",
"score": "0.0",
"text": "def user_params\n params.require(:user).permit(:name, :email, :password, :description, :facebook_user_id)\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.69792545",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6781151",
"text": "def strong_params\n params.requ... |
0b925120d7780d7a59791322d8f4d29f | Get artifacts for the latest version, channel and product_name | [
{
"docid": "42187cd575157d58ec0a44eec8d25c4d",
"score": "0.7761103",
"text": "def artifactory_latest\n # Get the list of builds from the REST api.\n # We do this because a user in the readers group does not have\n # permissions to run aql against builds.\n builds = cl... | [
{
"docid": "529b835f8175ae50cd394c6eef7f8f29",
"score": "0.78804326",
"text": "def artifactory_latest\n # Get the list of builds from the REST api.\n # We do this because a user in the readers group does not have\n # permissions to run aql against builds.\n builds = c... |
e18dd38fd817ac7a39814cd12448b2eb | .slim file paths array | [
{
"docid": "6342015bec3e6875422e82d670247745",
"score": "0.6451571",
"text": "def slim_files # => array\n exclude_partials(exclude_dist_folder(Dir.glob(\"./**/*.slim\")))\n end",
"title": ""
}
] | [
{
"docid": "0b82f98921e9c8ddb0e51afca42f8064",
"score": "0.7173801",
"text": "def filepaths\n list = []\n list += documents\n list += bins\n list += etcs\n return list\n end",
"title": ""
},
{
"docid": "222185ddef9ad16c0830682d33069a52",
"score": "... |
76fda79c363c9e322331fa173d434809 | Creates a new APISet that will retrieve gems from +uri+ using the RubyGems API URL +dep_uri+ which is described at | [
{
"docid": "af94a3e29bd34b83a64a66a78a838b1d",
"score": "0.6377213",
"text": "def initialize(dep_uri = 'https://index.rubygems.org/info/')\n super()\n\n dep_uri = URI dep_uri unless URI === dep_uri\n\n @dep_uri = dep_uri\n @uri = dep_uri + '..'\n\n @data = Hash.new {|h,k| h[k] = [] ... | [
{
"docid": "af2dcef8ecc5e2bb983c979345e8ee1d",
"score": "0.6640557",
"text": "def dependency_resolver_set # :nodoc:\n return Gem::Resolver::IndexSet.new self if 'file' == uri.scheme\n\n fetch_uri = if uri.host == \"rubygems.org\"\n index_uri = uri.dup\n index_uri.host = \"index.rubygems.... |
003de20de932025dc02c9a9f71295e27 | POST /tech_dev_has_students POST /tech_dev_has_students.json | [
{
"docid": "df836f776363f0da4fdbc6168e6923bc",
"score": "0.6845814",
"text": "def create\n @tech_dev_has_student = TechDevHasStudent.new(tech_dev_has_student_params)\n\n respond_to do |format|\n if @tech_dev_has_student.save\n format.html { redirect_to @tech_dev_has_student, notice: 'T... | [
{
"docid": "7e5ffd1608699c8bae53d86377be5ee1",
"score": "0.6779724",
"text": "def users_students course_id\n call_path = \"users/students\"\n request = {\"courseID\": course_id}\n data = build_post_data(request.to_json)\n perform_post(build_url(call_path), data)\n end",
"title... |
e4903f8a29f815df6cfcebd81065566b | GET /status_types/1 GET /status_types/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "e9815f6860f17acebbf3ad647e20155e",
"score": "0.7494006",
"text": "def index\n @status_types = StatusType.all\n end",
"title": ""
},
{
"docid": "e9815f6860f17acebbf3ad647e20155e",
"score": "0.7494006",
"text": "def index\n @status_types = StatusType.all\n end",
... |
cadcec6617f8cc726b066af02219a7cf | Get the ssh executable to be used when connecting to the current node Result:: String: The ssh executable | [
{
"docid": "3f9504ef69d80e2c662fd8aaa1e8ce89",
"score": "0.7310064",
"text": "def ssh_exec\n ssh_exec_for @node\n end",
"title": ""
}
] | [
{
"docid": "2a18568bc10f27898bf5d881cc35edc5",
"score": "0.7721058",
"text": "def ssh_exec_for(node)\n \"#{@ssh_dirs[node].last}/ssh\"\n end",
"title": ""
},
{
"docid": "81663a9544195fa874d90a3a00c5762f",
"score": "0.72661096",
"text": "def ssh_executable\n @ss... |
807c70958281dce1ccdeba60daf23177 | Generates a lock file for the calcuation set configuration. If no argument is provided the, the lock file is generated using the filename and path described by the lock_file_path method. If a custom output location is required, this can be provided optionally as an argument. | [
{
"docid": "928bb0712edc770526ee362fd786db31",
"score": "0.740786",
"text": "def generate_lock_file(output_path=nil)\n file = output_path || lock_file_path or raise ArgumentError,\n \"No path for lock file known. Either set path for the master config file using the #file accessor method ... | [
{
"docid": "55307bb294eb44f34a8deee086ba57a9",
"score": "0.6105589",
"text": "def config_path(options={})\n options[:lock] = true unless options[:lock] == false\n lock_file_exists? && options[:lock] ? lock_file_path : @file\n end",
"title": ""
},
{
"docid": "70fbaa41cd5c37... |
0305ac628459a59fac079d6efeace8d7 | attr_accessible :email, :password, :password_confirmation, :remember_me, :role, :qualification_id, :name, :type | [
{
"docid": "d21f439f129fee0cde7fead1d1896f40",
"score": "0.0",
"text": "def set_default_user_role\n self.role = User.default_role unless role\n end",
"title": ""
}
] | [
{
"docid": "29e29d7324efa44e796003948801b538",
"score": "0.70270056",
"text": "def attr_accessible_role\n :custom_role\n end",
"title": ""
},
{
"docid": "8e2f68c734b988b198420498e2d185e3",
"score": "0.69742864",
"text": "def permitted_attributes\n [:email, :password, :role, :i... |
82b45cc07968d33ec102257f8f850a21 | The progress of the storage optimization operation as a percentage. | [
{
"docid": "31f8cf498b44938f3260b22dabac6df7",
"score": "0.7696635",
"text": "def percent_progress\n data[:percent_progress]\n end",
"title": ""
}
] | [
{
"docid": "4bb66d7a70daf4430e0ba4806c22ccd4",
"score": "0.786283",
"text": "def calculate_progress\n result = self.progress_status\n (100 * result.values.count(true) / result.values.compact.count).to_s\n end",
"title": ""
},
{
"docid": "396657f7b15b91f4c4effe0236266d26",
"score":... |
7e5ce33e3fd4eaab7a000a48f4f90dcb | GET /alugueis/1 GET /alugueis/1.xml | [
{
"docid": "714a7f195966ec95d089a64dce909e88",
"score": "0.6701699",
"text": "def show\n @aluguel = Aluguel.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @aluguel }\n end\n end",
"title": ""
}
] | [
{
"docid": "3c73b3682f86cb8a10a5c8e73341216c",
"score": "0.6554516",
"text": "def show\n @ilmoitu = Ilmoitu.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @ilmoitu }\n end\n end",
"title": ""
},
{
"docid": "219675... |
60f748d0339a9454a1bd3f08c4913b82 | checks if there are unused threads in this queue and if there is a new job to execute in this thread. In this case a new active job is created, if there are enough resources to pay the job. Otherwise, an event is created to check again after a specific time. Recursive invocation for testing another thread. | [
{
"docid": "eb485cc8c1ff1685d574eb1a446f1d67",
"score": "0.78068554",
"text": "def check_for_new_jobs\n \n # if there are less active jobs than the number of threads to handle a job \n active_jobs = self.find_active_jobs\n\n # logger.debug '--> active_jobs ' + active_jobs.inspect\n if act... | [
{
"docid": "15ae06fa101d40cce852cdab85e95ef2",
"score": "0.7683396",
"text": "def check_for_new_jobs\n \n # if there are less active jobs than the number of threads to handle a job \n active_jobs = find_active_jobs\n # logger.debug '--> active_jobs ' + active_jobs.inspect\n if active_jobs... |
033bcbcb88a2881e5e6d023313138bb8 | Public: Maps a URL to a shortened code. url A String or Addressable::URI URL to shorten. code Optional String code to use. Defaults to a random String. Returns 201 with the Location pointing to the code, or 422. | [
{
"docid": "7ea0442b5a36fe2c3b7194fff58fb436",
"score": "0.82401717",
"text": "def create(url, code = nil)\n url = ensure_url(url)\n\n if resp = check_host(url)\n return resp\n end\n\n begin\n if code = @db.add(url.to_s, code, @options)\n [201, {\"Location\" =>... | [
{
"docid": "aadc2d7e4aa55fc22ab7af3541334467",
"score": "0.68587446",
"text": "def get_code(url, code = nil, options = nil)\n code ||= if options && options.with_charset?\n shorten_fixed_charset(url, options.length, options.charset)\n else\n shorten(url)\n end\n end",
... |
e22a4afecfdd15528ef0df492a65d312 | PATCH/PUT /applications/1 or /applications/1.json | [
{
"docid": "1fbc143ac2b32782598d8c2f50c12dd4",
"score": "0.69058645",
"text": "def update\n respond_to do |format|\n if @application.update(application_params)\n format.html { redirect_to @application, notice: \"Application was successfully updated.\" }\n format.json { render :show... | [
{
"docid": "2ed5f7b43f88f61f70e2bba4686369f0",
"score": "0.7621395",
"text": "def update_application(application_id, request)\n start.uri('/api/application')\n .url_segment(application_id)\n .body_handler(FusionAuth::JSONBodyHandler.new(request))\n .put()\n .... |
6d2b8ead60160d1da9a9836b03cebb63 | Returns a ProcessStatus instance describing the current status of a process instance. | [
{
"docid": "04af1fd10d9d428f57985506629550f1",
"score": "0.0",
"text": "def process(wfid)\n\n ProcessStatus.fetch(@context, [ wfid ], {}).first\n end",
"title": ""
}
] | [
{
"docid": "937a5eaaba4af744e6ef754b2a59ccf4",
"score": "0.759438",
"text": "def get_status\n unless @status\n begin\n @status = Status.new(@pid, Process.waitpid2(@pid)[1])\n rescue Process::Error\n # process is gone, which means we have no recourse to retrieve the\n... |
c97e18f76161fa924f2ac7aa0345cf3f | GET /instagram_posts/1 GET /instagram_posts/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "b5cf203e84d857c89f1dd148aebad8d3",
"score": "0.7072134",
"text": "def instagram_posts\n require 'insta_scrape'\n return InstaScrape.long_scrape_user_posts(INSTAGRAM_USERNAME, 2)\n end",
"title": ""
},
{
"docid": "aa4257c08b0461ed4c316a034ce23cc0",
"score": "0.6918288",... |
f7b9389fcb1ca194456bc86b5d29163a | Get/set path to dynamic files | [
{
"docid": "fc9cc31cae2c08f8282eb480adf61b4b",
"score": "0.0",
"text": "def dynamics_path=(path=nil)\n if(path)\n custom_paths[:dynamics_directory] = path\n end\n custom_paths[:dynamics_directory]\n end",
"title": ""
}
] | [
{
"docid": "fbe5fcc79c37a91c779cc09a41ae43b3",
"score": "0.66984636",
"text": "def set_path_for(file)\n # PRODUCTION USE - use this path when this file sits in \"Dropbox/Camera Uploads\"\n PATH_BASE + \"/\" + modified_year(file) + \"/\" + modified_date(file)\n\n # TESTING USE - use this path when tes... |
92a708c810ea4f3ecf2d33a9e23bf2b1 | Retire (and close) all unused resources. If a block is provided, it should implement the desired functionality for unused resources. | [
{
"docid": "2d9650e2774a24b02886daf005d5f69c",
"score": "0.5219983",
"text": "def prune(retain = 0)\n\t\t\t\tunused = []\n\t\t\t\t\n\t\t\t\t@resources.each do |resource, usage|\n\t\t\t\t\tunused << resource if usage.zero?\n\t\t\t\tend\n\t\t\t\t\n\t\t\t\tunused.each do |resource|\n\t\t\t\t\tif block_give... | [
{
"docid": "09bef5a2fa3bff01d0ecb5fc646660f7",
"score": "0.6163226",
"text": "def close( &block )\n compile!( :close!, &block )\n end",
"title": ""
},
{
"docid": "7fc97853f1c0bdd3bd269e6de280550f",
"score": "0.60085356",
"text": "def release(resource)\n\t\t\t\t\t# A r... |
1597448fdb4a23eec0be957e660931a8 | Adds the given key and associated value to the cashe | [
{
"docid": "62d76069260d76f4e1c0e859421c89bf",
"score": "0.0",
"text": "def add(key, name, breed, age, color)\n\t$REDIS.set key, [name, breed, age, color].to_json\n\tputs \"Added #{key}\"\nend",
"title": ""
}
] | [
{
"docid": "6a51602772983023894ae46183895d00",
"score": "0.78953195",
"text": "def add(key, value); end",
"title": ""
},
{
"docid": "6a51602772983023894ae46183895d00",
"score": "0.78953195",
"text": "def add(key, value); end",
"title": ""
},
{
"docid": "36b12dcb44e4e7ceb1... |