query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
11abf3befd4914fe047c3ae601de561b | GET /admin/contact_messages GET /admin/contact_messages.xml | [
{
"docid": "c54e5fa6bda69ca0d86f5a505c600a23",
"score": "0.0",
"text": "def index\n # @contact_messages = @contact_messages.where(brand_id: website.brand_id).order(\"post_on DESC\")\n @search = website.brand.contact_messages.ransack(params[:q])\n @contact_messages = @search.result.paginate(page... | [
{
"docid": "dbc96cdcfe96d0a5cfff134d321e521f",
"score": "0.6998307",
"text": "def messages\n get_data('/messages')\n end",
"title": ""
},
{
"docid": "8cfd987b56a0022e6ed2f6ce389c5ec6",
"score": "0.66247404",
"text": "def show\n @admin_message = Message.find(params[:id])\n\n ... |
36766df7fdb7e162d07aef4e701e3ee6 | % value : () > ret | [
{
"docid": "9ee853e5ba249722f6bfacc1f524232f",
"score": "0.69561565",
"text": "def value() end",
"title": ""
}
] | [
{
"docid": "5f8a25b50efbe7dbcbbe60f560fdc30e",
"score": "0.7327368",
"text": "def return_value; end",
"title": ""
},
{
"docid": "e2a315215845ff2a57b172f1c420885c",
"score": "0.69362336",
"text": "def return_value=(_arg0); end",
"title": ""
},
{
"docid": "ecc966296ad330be8... |
ed794bc6e5a224e0d26ef130fe5181d4 | Helper for getting the architecture | [
{
"docid": "199e6d59f0aa383da2379c5efd42d012",
"score": "0.0",
"text": "def endian\n @endion ||= architecture.zero? ? :little : :big\n end",
"title": ""
}
] | [
{
"docid": "eaf224bf7b409922d293888e12588093",
"score": "0.8320248",
"text": "def get_architecture_name\n return ARCHITECTURES[architecture]\n end",
"title": ""
},
{
"docid": "8efdbe41bcd3f633e1670b45930e3206",
"score": "0.8241982",
"text": "def architecture\n RbConfig::CONF... |
788c9c20adbfcbde034d34044aba7071 | PUT /ubications/1 PUT /ubications/1.xml | [
{
"docid": "022cc965046a16382e5798c8e769fd84",
"score": "0.50338113",
"text": "def update\n @ubication = Ubication.find(params[:id])\n\n respond_to do |format|\n if @ubication.update_attributes(params[:ubication])\n flash[:notice] = 'Ubication was successfully updated.'\n format... | [
{
"docid": "23b5f5e4dacfb330cb1e0ffd4590ef63",
"score": "0.57666004",
"text": "def update opts = {}\n opts[:headers] ||= {}\n opts[:headers]['Content-Type'] ||= 'text/xml'\n post opts.fetch(:path, update_path), opts\n end",
"title": ""
},
{
"docid": "d61a25d69ed10b03601d4f17ba7d9ef... |
45518083449d0b2143d2a00abbb97b1e | QC INSPECTION TYPE TESTS | [
{
"docid": "edffbcb16fcd7aab2f071c96b6c786b6",
"score": "0.54712415",
"text": "def query_for_qc_inspection_type_tests(cond='', paginate=true)\n # NB. The select is required, otherwise the id values get mixed-up.\n if paginate\n \"@qc_inspection_type_test_pages = Paginator.new self, QcInspecti... | [
{
"docid": "3203039ebe65d586b3038a708a832309",
"score": "0.6655475",
"text": "def test_type\n assert_equal(\"Guitar\", @instrument.type)\n end",
"title": ""
},
{
"docid": "3ce952d1aa271ed01d4bc88c668fa410",
"score": "0.65172845",
"text": "def test_ut_fdw10a_t5_quf_013\n\t\t# cons... |
6b289ff646e0b34881e8b3015fa4efc3 | Returns a list of services, ordered by priority, that match the filter. filter is a Proc object that produces ServiceEnpoint objects, subclasses of ServiceEnpoint or nil. This method is useful for extracting several types of services while maintaining priority, for example you may write a filter Proc to extract OpenID ... | [
{
"docid": "7125694a74a98a49fef20484e92981df",
"score": "0.7114842",
"text": "def filter_services(filter)\n # product a list of filtered ServiceEndpoint objects. filtered\n # will contain a list of nil or ServiceEnpoint (subclasses) objects.\n filtered = self.services.collect {|s| filter.call(... | [
{
"docid": "f8b6090effe1f9f851a1d58d53fbc304",
"score": "0.57055783",
"text": "def autofilter_services\n\t\t@autofilter_services || []\n\tend",
"title": ""
},
{
"docid": "709bdfc88c7ca36f37a30f1befbc6fb6",
"score": "0.5638053",
"text": "def filter\n filters_available.each do |filt... |
bc8f8e6c96f7ffc323fbdf373cf17646 | require the params of card and permit both question and answer to be written in DB | [
{
"docid": "4a253fdd0a946acd6de1bd3e59d8a555",
"score": "0.0",
"text": "def profile_params \n params.require(:profile).permit(:fname, :lname, :user_id, :credibility, :level, :username, :user_id, :avatar)\n end",
"title": ""
}
] | [
{
"docid": "81f1f639c2220abc1e729175664d9b19",
"score": "0.80494285",
"text": "def card_params\n params.require(:card).permit(:question, :answer)\n end",
"title": ""
},
{
"docid": "51b8af574af8607c6c8f6b11e099526f",
"score": "0.77583766",
"text": "def answer_card_params\n para... |
516b92277512a8af80374dcec2aab380 | method VOID StreamDataEnd IP2DataStream stream [IN] | [
{
"docid": "e6d11acbd90f2b4a625def1b5b08ed24",
"score": "0.82769144",
"text": "def StreamDataEnd(stream)\n _invoke(9, [stream], [VT_BYREF|VT_DISPATCH])\n end",
"title": ""
}
] | [
{
"docid": "e0a304f4998832ec7091d2419171f225",
"score": "0.81312037",
"text": "def StreamDataEnd(stream)\n @ole._invoke(9, [stream], [VT_BYREF|VT_DISPATCH])\n end",
"title": ""
},
{
"docid": "e0a304f4998832ec7091d2419171f225",
"score": "0.81312037",
"text": "def StreamDataEnd(str... |
3451c963b3504071789fda315161b9e7 | Remove tags wrapping the content of tags. | [
{
"docid": "152d80f1d9d9315009aceff7c488673d",
"score": "0.0",
"text": "def unwrap_templates(data)\n tags = /<template><script>\"(.+)\"<\\/script><\\/template>/m\n unwrap = '<template>\\1</template>'\n data.gsub(tags, unwrap)\n end",
"title": ""
}
] | [
{
"docid": "7fde46fd4cda7c0d0fb3aa0d48c14791",
"score": "0.7706321",
"text": "def remove_tags_html() self.gsub(%r{</?[^>]+?>}, '').gsub(\"\\r\\n\", ' ') end",
"title": ""
},
{
"docid": "66ef5c7088ab3ce449f97278c7437c2e",
"score": "0.7456782",
"text": "def strip_tags!\n self.replac... |
d5d437d2da997872b888d1c7002d2c35 | Set the css selector in +string+ in the cache to +value+ | [
{
"docid": "af7b4f1d100f1da26fb6b5d4cbe7ed08",
"score": "0.74127376",
"text": "def []=(string, value)\n return value unless cache_on?\n\n @mutex.synchronize { @cache[string] = value }\n end",
"title": ""
}
] | [
{
"docid": "e8873447ee4a635da39a9e33b8961321",
"score": "0.7205296",
"text": "def []= string, value\n return value unless @cache_on\n @mutex.synchronize { @cache[string] = value }\n end",
"title": ""
},
{
"docid": "2e89d4e2f4c4aff62969ea160ce77b12",
"score": "0.6... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "5b2658f2ab3be2319686c07f983e6ab9",
"score": "0.0",
"text": "def set_booking\n @booking = Booking.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "bd89022716e537628dd314fd23858181",
"score": "0.6165152",
"text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n end",
"title": ""
},
{
"docid": "3db61e749c16d53a52f73ba0492108e9",
"score": "0.60463154",
"text": "def action_hook... |
0d0918963fdba1e042c73f2ebcc7ddd0 | creates a module that provides attribute writers | [
{
"docid": "f4a1e4bc13979cbfa605bf9a47bc347e",
"score": "0.5553636",
"text": "def writers\n keys = self.class.cookie_index\n Module.new do\n keys.each_pair do |method_name, key|\n define_method \"#{method_name}=\" do |value|\n @cookie[key] = value\n end\n end\n ... | [
{
"docid": "39337c2ee2f1e20a95528ee374323c34",
"score": "0.67627335",
"text": "def define_writer_method(mod)\n writer_method_name = \"#{name}=\"\n attribute = self\n\n mod.send(:define_method, writer_method_name) { |value| attribute.set(self, value) }\n mod.send(writer_vi... |
19bfe736101118a35d45404e208fbce1 | GET /sale_products/1 GET /sale_products/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "c23fe4f774df78e7125116e712ea5587",
"score": "0.775744",
"text": "def show\n @product_sale = ProductSale.get(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @product_sale }\n end\n end",
"title": ""
},
{
"docid... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "7b68978735e5e1bda78679b67c0792bc",
"score": "0.0",
"text": "def subscriber_group_params\n params.require(:subscriber_group).permit(:name)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7496024",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.69581187",
"text": "def strong_params\n params.require(:request).permit(param_whit... |
2954b59e4ec748181473e92916f399aa | PUT /departments/1 PUT /departments/1.xml | [
{
"docid": "9a353806fa0a2804eada005c1088071d",
"score": "0.5655289",
"text": "def update\n @department = Department.find(params[:id])\n\n if @department.update_attributes(params[:department])\n flash[:notice] = t('departments.update.notice')\n redirect_to(@department)\n else\n re... | [
{
"docid": "0f8872308cd71e90aed963baf02fd23e",
"score": "0.74976784",
"text": "def update\n request = RestClient.put File.join(API_SERVER,\"rest-api/departments\"), { \n 'id' => params['id'], \n 'name' => params['department']['name'], \n 'description' => params['department']['des... |
5d875918a9c36e5afcbd891ff70b3b0f | return the starting letter for a new random name, or alternatively a new random letter when we do not any information from previous letters (ie: missing pairs in sample data) | [
{
"docid": "8344c1fb0ae6d51ff352fde15504b249",
"score": "0.75878316",
"text": "def get_starting_letter\t\n\t\trandom_number = @random_number_generator.rand(0.0..1.0)\n\n @pair_probability_table.frequencies.select {|k, v| k[0] == ' ' &&\n k[1] != '... | [
{
"docid": "f5d0ffc2a883aed6ab43bb6a1056a0e5",
"score": "0.75648373",
"text": "def generate\n name = ' ' + get_starting_letter\n # since the name already has a starting letter the total name length will\n # be one more than the selected name_length_distribution selected\n name_length_distrib... |
08a1b6f16518915c5a230127263b2484 | Generating Agency Specific Reports Arguments: company: (String) agency: (String) params: (Hash) | [
{
"docid": "d1d8cd10defd7e0d8642a7f7e62f6d53",
"score": "0.645297",
"text": "def get_by_agency(company, agency, params)\n $LOG.i \"running \" + __method__.to_s\n get_by_type(company, nil, agency, params, false)\n end",
"title": ""
}
] | [
{
"docid": "a1079afcb9bb720ce3f62efc84989b97",
"score": "0.6601535",
"text": "def index\n if params[:per_page].nil?\n params[:per_page] = 20\n end\n\n if params[:agency].nil?\n params[:agency] = 'All'\n end\n\n if params[:agency] == 'All' or params[:agency].nil?\n @required... |
c2d9b3867f06b4c536333eedfb8e270d | Checks whether auto validations are currently disabled (see +disable_auto_validations+ method that takes a block) | [
{
"docid": "e5411bd99a204cb719a78f8385c0eef2",
"score": "0.8484971",
"text": "def disabled_auto_validations?\n @disable_auto_validations || false\n end",
"title": ""
}
] | [
{
"docid": "0b91972d58754a125f9795a8e88a1793",
"score": "0.7425947",
"text": "def without_auto_validations\n previous, @disable_auto_validations = @disable_auto_validations, true\n yield\n ensure\n @disable_auto_validations = previous\n end",
"title": ""
},
{
"... |
4ff5cab8663f7208ac9827dab24e0525 | Returns a list of all paths | [
{
"docid": "036440d7bff5cb1183ba21fdae71ca4f",
"score": "0.72559917",
"text": "def all_paths\n\t\t\t\treturn @all_paths if @all_paths.length > 0\n\n\t\t\t\t# Looks like we have to build a list of paths!\n\t\t\t\tputs \"[MacroDeck::TurkResponseTree::Tree] Getting all paths...\"\n\t\t\t\t@hash.each_path d... | [
{
"docid": "92d8becebe9bb1248b7d3d4859f7e99f",
"score": "0.81005293",
"text": "def list\n Dir.glob(\"#{@path}/**/*\").select{|path| File.file?(path) }.map do |path|\n path.sub Regexp.new(\"^#{@path}\\/\"), ''\n end\n end",
"title": ""
},
{
"docid": "fb619258385124869a4379... |
adc228cb33cd5b244f48099930a8a880 | POST /friendlistentries POST /friendlistentries.json | [
{
"docid": "f346f0e0f1dafbf36a1cca5b2bf731b9",
"score": "0.6609563",
"text": "def create\n init_displayed_user(current_user.id)\n @friendlistentry = Friendlistentry.new(params[:friendlistentry])\n @friendlistentry.confirmation = false\n @friendlistentry.owner = current_user.email\n if Fri... | [
{
"docid": "2fe91e476200a6c35152a1691a2f4c1c",
"score": "0.63794094",
"text": "def create_friendlists\n end",
"title": ""
},
{
"docid": "bb6eb291d71fd58f75ddbe2c6f72837f",
"score": "0.6134526",
"text": "def create\n @friend_list = FriendList.new(params[:friend_list])\n\n respo... |
ab4a00716e904163e6122f41906a2d06 | Creates a simple bootstrap modal body. ==== Signatures bootstrap_modal_body_tag(content) bootstrap_modal_body_tag do content for modal body end ==== Examples Check it out!! => Check it out!! | [
{
"docid": "405eb6579469ef0ab781af3b7636ab47",
"score": "0.85283947",
"text": "def bootstrap_modal_body_tag(*args, &block)\n return bootstrap_modal_body_tag(capture(&block), *args) if block_given?\n\n content_tag(:div, args.first, class: 'modal-body')\n end",
"title": ""
}
] | [
{
"docid": "24d876fc154e8a879bf8228ec45bd441",
"score": "0.7980521",
"text": "def modal_body(*args, &block)\n options = canonicalize_options(args.extract_options!)\n options = ensure_class(options, 'modal-body')\n content = block_given? ? capture(&block) : args.shift\n\n content_tag(:div, op... |
1d2494b16a363c515c83c6589ece9ee5 | POST /flower_items POST /flower_items.json | [
{
"docid": "44617477077bf878ced7dbd711d1fdd3",
"score": "0.6399777",
"text": "def create\n @flower_item = FlowerItem.new(flower_item_params)\n @flower_item.flower_arrangement_id = @flower_arrangement.id\n\n respond_to do |format|\n if @flower_item.save\n \n # Update cost of f... | [
{
"docid": "13c196a8e428eea00eaf7b700acea567",
"score": "0.69422317",
"text": "def create\n item = list.items.create!(item_params)\n render json: item, status: 201\n end",
"title": ""
},
{
"docid": "57fa6f7bb5dc811b50cfe6a5d0477e50",
"score": "0.6886906",
"text": "def flower_i... |
3d23bdca6a585f6108214d949256c383 | With this, the users have to confirm their passwords in order to delete their account. For some reason, I couldn't get rails to pass the same info in the edit form to the destroy method, so I had to make this filthy branch. | [
{
"docid": "190f86c9f0a008d3a682ec6a651777b8",
"score": "0.63222766",
"text": "def update\n if params[:commit] == \"Update\"\n super\n elsif params[:commit] == \"Cancel my account\"\n if current_user.valid_password?(params[:user][:current_password])\n kill_user(current_user)\n ... | [
{
"docid": "7bef13ecfa43f8579a783040f9857dc3",
"score": "0.69954437",
"text": "def destroy_with_password(current_password); end",
"title": ""
},
{
"docid": "fba54f3543c9d31eb3152ef11600e60d",
"score": "0.69807553",
"text": "def destroy\n Rails.logger.warn \"User #{current_user.id}... |
e9fbcfce6102b52c7601e347582d023c | eg: "For Whom the Bell Tolls (Ernest Hemingway)" Matches: "(Ernest Hemingway)" | [
{
"docid": "d05da663614ab2dc8c18da8b185341f3",
"score": "0.0",
"text": "def parse_author(text)\n return '' unless has_author?(text) \n author = text.split('(').last\n author = author.gsub(')', '')\n end",
"title": ""
}
] | [
{
"docid": "4afa8229fa04bbfdc136ef4bd78c784e",
"score": "0.651406",
"text": "def similar_match str\n if !str || str == ''\n return Regexp.new('.*')\n end\n str_array = str.split('')\n reg_str = '(.*?)'\n str_array.each do |x| \n reg_str += \"#{x}(.*?)\"\n end... |
cc4841368158afcbb53d865282906d76 | POST /reinos POST /reinos.json | [
{
"docid": "a0ee537212ba29554561b26592aec0d3",
"score": "0.6990473",
"text": "def create\n @reino = Reino.new(reino_params)\n\n respond_to do |format|\n if @reino.save\n format.html { redirect_to @reino, notice: 'Reino was successfully created.' }\n format.json { render :show, s... | [
{
"docid": "44b0171949e3e1000cac78177666f18d",
"score": "0.6723281",
"text": "def post_criar_relatorio(body)\n self.class.post(\"/relatorios\", :body => body.to_json)\n end",
"title": ""
},
{
"docid": "ad1799a135e826227dadc334977126bd",
"score": "0.6456383",
"text": "def create\n... |
dfa4f3d645e08db39f0bf527cde3bf47 | Gets a list of state machines for this class | [
{
"docid": "329bc35244b3d90419c09baa38b1fa73",
"score": "0.5603884",
"text": "def state_machines\n @state_machines ||= begin\n if state_machines = object['state_machines']\n state_machines.each do |_name, machine|\n serializer.serialize(state_machine_image_path(machine), machine[:image])... | [
{
"docid": "25e164e0f2f676d6c794b3db00a56730",
"score": "0.66459244",
"text": "def machines\n @env.active_machines.each { |m| yield @env.machine(*m) }\n end",
"title": ""
},
{
"docid": "dd77cfa7845d06098d072cf37686a9d8",
"score": "0.6450596",
"text": "def get_states\n pe... |
8413fbd4e8e66803174ff34fcc485e65 | Helper method to determine if the severity is `INFO` | [
{
"docid": "6ee92139b0f0be832207c96d2067e3ae",
"score": "0.88791436",
"text": "def info?\n severity == \"INFO\"\n end",
"title": ""
}
] | [
{
"docid": "6fd9b6f50d96c668511af63991e1c44d",
"score": "0.8367507",
"text": "def info?\n\t\t\t\t@severity == :info\n\t\t\tend",
"title": ""
},
{
"docid": "b3c39a7afb95558a155f026fe933f765",
"score": "0.7872622",
"text": "def info?\n level <= INFO\n end",
"title": ""
},... |
49da1f866ad149ad8015b219e795e3d7 | Custom attribute writer method with validation | [
{
"docid": "7a501836d1f516c856a309c7994aa133",
"score": "0.0",
"text": "def management_link=(management_link)\n\n if !management_link.nil? && management_link.to_s.length > 200\n fail ArgumentError, \"invalid value for 'management_link', the character length must be smaller than or equal to 2... | [
{
"docid": "5a0bcdaca95c21b13aacca36f9fad742",
"score": "0.6955513",
"text": "def _write_attribute(attr_name, value); end",
"title": ""
},
{
"docid": "5812dd7a37c0eccc3d9481c23d74c649",
"score": "0.69278884",
"text": "def write_attribute(attr_name, value); end",
"title": ""
},
... |
810e2a5ca0d130694d1ace13a2a2312f | POST /seal_codes POST /seal_codes.json | [
{
"docid": "6141899e12ed659fcb8aab748a0e8a92",
"score": "0.77944076",
"text": "def create\n @seal_code = SealCode.new(seal_code_params)\n\n respond_to do |format|\n if @seal_code.save\n format.html { redirect_to @seal_code, notice: 'Seal code was successfully created.' }\n forma... | [
{
"docid": "2e0264b3c193e0dd7d0c259248c1d418",
"score": "0.6752497",
"text": "def seal_code_params\n params.require(:seal_code).permit(:from_branch, :to_branch, :date, :barcode, :received_by, :supposely_contains, :goldreport_id)\n end",
"title": ""
},
{
"docid": "79a12229da6d71542c2b... |
b320b69d07ba240bcb89d1641cb42fcc | Return the union of this set with set | [
{
"docid": "f68007366cde146ead71baa50c8b46b7",
"score": "0.0",
"text": "def +(set)\n raise NotImplementedError\n end",
"title": ""
}
] | [
{
"docid": "ffb6b3fc69ab0439a6dfca2c8021db4b",
"score": "0.8229237",
"text": "def union(set)\n union = Array.new\n intersection = intersection(set)\n self + set - intersection\n end",
"title": ""
},
{
"docid": "33670a247e02b4397115173dc6144e3b",
"score": "0.81450915",
"text... |
fac2fbcc0808b1285ce85c4eb8d31749 | Gets the current position. | [
{
"docid": "777c5302980bc5ca89a91345f6885be6",
"score": "0.8170481",
"text": "def current_position\n logger.info 'current_position() has called.'\n result = Applitools::Location.for element.scroll_left, element.scroll_top\n logger.info \"Current position is #{result}\"\n result\n ... | [
{
"docid": "090f48e1c202d21d4028bdd69c6bce8c",
"score": "0.86097205",
"text": "def get_current_position\n send_request(FUNCTION_GET_CURRENT_POSITION, [], '', 4, 'l')\n end",
"title": ""
},
{
"docid": "fc5002343132b19bdb191066e5707112",
"score": "0.84520614",
"text": "def curr... |
bd68f32fb6567cde19fbccea2df67434 | This gets executed when an achievement is assigned to a user | [
{
"docid": "f4d6a212cd3a4c07c5e6280e9ce92dda",
"score": "0.68898493",
"text": "def assign_create\n user = User.find params[:user_id]\n achievement = Achievement.find params[:achievement_id]\n\n @assigned_achievement = UserAchievement.new\n @assigned_achievement.user = user\n @assigned_ach... | [
{
"docid": "f0d8445bba0eddcd539f50f639bda791",
"score": "0.73908937",
"text": "def set_user_achievement\n @user_achievement = UserAchievement.find(params[:id])\n end",
"title": ""
},
{
"docid": "d791d8890e1c861f6263a1b4b46d64c7",
"score": "0.7066934",
"text": "def set_achieve... |
b616135c0763fd77cf6d87ea583e64f5 | Open a temp file and yield it to the block, closing it after | [
{
"docid": "00d3bf17ef0434fcd721e704fa8aed32",
"score": "0.6952956",
"text": "def temp_file(ext='.rb')\n file = Tempfile.new(['pry', ext])\n yield file\nensure\n file.close(true) if file\nend",
"title": ""
}
] | [
{
"docid": "32f1277882ee9f440839b1e0751fb932",
"score": "0.82523644",
"text": "def temp_file\n file = Tempfile.new([\"tmp\", \".rb\"])\n yield file\n ensure\n file.close\n end",
"title": ""
},
{
"docid": "36f64ca32537044f2fe1877d41db5ead",
"score": "0.78190... |
36e47f8cc4838a2ae33d555e435d08f4 | list current features, current and max usage and expiration date | [
{
"docid": "cc1196b1f00f34456703a7b7e2f712e7",
"score": "0.6255111",
"text": "def list_features *args\r\n puts \"not implemented yet\"\r\n end",
"title": ""
}
] | [
{
"docid": "7e493bc37d7c43efa36ded75d16a788f",
"score": "0.67935175",
"text": "def index\n @features = Feature.all.added_by(current_user.id)\n end",
"title": ""
},
{
"docid": "49c70c5bdac07763fdc46964799557c0",
"score": "0.64678454",
"text": "def get_all_features\n features = $r... |
07f51c8e0e90893566a4f721d30703c7 | for quota display in other services | [
{
"docid": "d69c3d1f62d16d5065d08436cddd9294",
"score": "0.62571007",
"text": "def available\n return quota < 0 ? -1 : quota - usage\n end",
"title": ""
}
] | [
{
"docid": "d4c856f02422a1a11ac10d1b5641bd53",
"score": "0.78173083",
"text": "def quota\n @quota\n end",
"title": ""
},
{
"docid": "d4c856f02422a1a11ac10d1b5641bd53",
"score": "0.78173083",
"text": "def quota\n @quota\n end",
"title": ""
},
{
"docid": "d4... |
686d8b1101dd522a04eceef1fcab04fd | check for comments line | [
{
"docid": "c56d386845d975fcd02311cb9a0ae85b",
"score": "0.0",
"text": "def check_valid_row(string)\n string.chr != \"#\"\n end",
"title": ""
}
] | [
{
"docid": "752171205636b59ee9180308c48e5651",
"score": "0.84908354",
"text": "def comment_line?(line_source); end",
"title": ""
},
{
"docid": "752171205636b59ee9180308c48e5651",
"score": "0.84908354",
"text": "def comment_line?(line_source); end",
"title": ""
},
{
"docid... |
a16835da0ab79b514fd302672bce5ee9 | Deletes a chnanel given its name. Raises ::Pigeon::NuntiumException if something goes wrong. | [
{
"docid": "e8fc29d08dbc6391f4370ed3b5865b93",
"score": "0.6608305",
"text": "def delete_channel(name)\n delete \"/api/channels/#{name}\" do |response, error|\n raise ::Pigeon::NuntiumException.new error.message if error\n\n response\n end\n end",
"title": ""
}
] | [
{
"docid": "769304fbb4730ef96173d3c20bedde80",
"score": "0.63119835",
"text": "def delete(name); end",
"title": ""
},
{
"docid": "50a57d44a7f93078211bf2c846585877",
"score": "0.61596483",
"text": "def delete_channel(name)\n delete \"/api/channels/#{name}\" do |response, error|\n... |
5aa0f7b7fbdf1c580b7ff051dffa811d | Initialize object and load the xmlFile | [
{
"docid": "503b05233023abb17fc2ea83abcc3f85",
"score": "0.69831455",
"text": "def initialize (xml_filename, rootPath='accessRegistry')\n relative_xpath = \"//xmlns:#{rootPath}/xmlns:resource\"\n relative_xmlfile = \"#{Rails.root}/config/#{xml_filename}.xml\"\n raise AccessRegistryError, ... | [
{
"docid": "69426b720821ef88d2ce505ac18cd231",
"score": "0.7875732",
"text": "def initialize(xml=nil)\n load!(xml) if xml\n end",
"title": ""
},
{
"docid": "69426b720821ef88d2ce505ac18cd231",
"score": "0.7875732",
"text": "def initialize(xml=nil)\n load!(xml)... |
847ef0becfe6af49a0f8d2218a425636 | This method should delete the contact HINT: Check the Array class docs for builtin methods that might be useful here | [
{
"docid": "42eb4de443475684d90920cf3d1b62f2",
"score": "0.79113394",
"text": "def delete\n contact_to_delete_id = self.id #find ID number\n @@contacts.delete_if { |contact| contact_to_delete_id == contact.id } #will iterate throught the array and find the contact with the same ID number and then... | [
{
"docid": "6b8f248a1f8ac917755c787c3eb24594",
"score": "0.80965954",
"text": "def delete\n @@contacts.delete(self) #I'm honestly just making an educated guess with this one. Or just a regular guess.\n end",
"title": ""
},
{
"docid": "07c136e9abbaf9bdffb42899b2ca44c1",
"score": "0.... |
891fa77458c9758c8af544daef84d5b6 | Transfers a domain name from one reseller to another ==== Required :domain domain name to transfer :username username of the registrant :password password of the registrant :reseller name of the gaining reseller | [
{
"docid": "ca2f422f440f25bd93646d098a318ea7",
"score": "0.4911372",
"text": "def push_transfer(params)\n params[:grsp] = params.delete :reseller\n\n run_command :rsp2rsp_push_transfer, nil, params\n end",
"title": ""
}
] | [
{
"docid": "7f20354bac387fdef2e935d6cd2ee755",
"score": "0.69322413",
"text": "def domain_transfer_in_reseller(domain, auth_key, options = {})\n options.assert_valid_keys(OPTIONS)\n options = options.dup\n command = 'domain-transfer-in-reseller'\n\n # Currently ignored, Joker... |
38cfb76e316c02f7ead69f1e91902175 | DELETE /civilites/1 DELETE /civilites/1.xml | [
{
"docid": "101e4f04c6b6adefc32f2e8544af88b5",
"score": "0.70442754",
"text": "def destroy\n @civilite = Civilite.find(params[:id])\n @civilite.destroy\n\n respond_to do |format|\n format.html { redirect_to(civilites_url) }\n format.xml { head :ok }\n format.json {render :json =... | [
{
"docid": "94058c476c031a72de27d9422a9995ed",
"score": "0.67222196",
"text": "def destroy\n @estado_civil = EstadoCivil.find(params[:id])\n @estado_civil.destroy\n\n respond_to do |format|\n format.html { redirect_to(estado_civils_url) }\n format.xml { head :ok }\n end\n end",
... |
beaa25de7e789f2bbad8c0e632241a99 | Retrieves the constraints for creating a listing for an event | [
{
"docid": "8d87bf9b7f4dd9053328a1eb637d19b5",
"score": "0.7794496",
"text": "def get_listing_constraints_for_event(event_id, options = {})\n root = get_root\n object_from_response(GogoKit::ListingConstraints,\n GogoKit::ListingConstraintsRepresenter,\n ... | [
{
"docid": "99aa34d1853275ddc8504004f7aaed49",
"score": "0.6589222",
"text": "def constraint_list\n @constraints\n end",
"title": ""
},
{
"docid": "99aa34d1853275ddc8504004f7aaed49",
"score": "0.65886754",
"text": "def constraint_list\n @constraints\n end",
"title": ""
... |
17b32e895f66aed1d1af85b3bdaf85a9 | GET /bids GET /bids.json | [
{
"docid": "6b7f2c066525a96f067c6217bf54e13b",
"score": "0.0",
"text": "def index\n if params[:search].present?\n #@bids = Bid.search(params[:search], page: params[:page], per_page: 10)\n @shopping = Bid.search(params[:search], where: {mode: 1} )\n @bidding = Bid.search(params[:search]... | [
{
"docid": "4f8f10935ec94cc8ee8d7e8e4b41a44d",
"score": "0.7915745",
"text": "def view_bids\n @bids = Bid.find_all_by_item_id(params[:id])\n\n respond_to do |format|\n format.html # view_bids.html.erb\n format.json { render json: @bids }\n end\n end",
"title": ""
},
{
... |
0abe562330b9416369a75414b80a095b | Actualiza los averages en tabla samples_average q permite generar excel bodega Se debe llamar cada vez que ingresa algo a bodega o se toma muestra de algo de bodega. LA idea es que se llame dentro de un Thread.new do | [
{
"docid": "ff4049397078eb2836af23d13e842778",
"score": "0.7148917",
"text": "def refresh_samples_averages\n # Thread.abort_on_exception = true # PErmite q haya error cdo se cae Thread, es para debuguear\n # Cuando un thread que no es main se cae, no hay ningun aviso\n # p \" ESTOY EN refresh_s... | [
{
"docid": "08fad58ee2f9ba4cf57618e4a3bb99b7",
"score": "0.58328015",
"text": "def genenate_average_files\n puts 'genenate_average_files'\n @data.each do |e|\n final = get_avg(e)\n puts \"#{e[0]} #{final}\"\n File.open(e[0].to_s, 'w') do |file|\n file.puts(\"#{e[0]}, #{final}... |
df791f27142ca1cf40780e32b511aa6c | Links +self+ and +downstream+ together forming a processing pipe. The subsequent objects may be linked in turn. | [
{
"docid": "437ebf38bdd7a0397e840605cc5434b4",
"score": "0.5580208",
"text": "def |(downstream)\n downstream.upstream = self\n @downstream = downstream\n end",
"title": ""
}
] | [
{
"docid": "699600c60e3b28eaa738df20fd0b2894",
"score": "0.5919694",
"text": "def pipe(other)\n Pipeline.new(@pipes + [other])\n end",
"title": ""
},
{
"docid": "7ea89417906737202751412cc61ed27b",
"score": "0.5864143",
"text": "def >> (downstream_processor)\n pipe(downst... |
cbcc9d5e75b846ed71d53690b08794fb | Returns true if council has any active committees, i.e. if council has any meetings in past year (as meetings must be associated with committees) | [
{
"docid": "b557eba27772b90f11c65d7d44a1b666",
"score": "0.83416516",
"text": "def active_committees?\n meetings.count(:conditions => ['meetings.date_held > ?', 1.year.ago]) > 0\n end",
"title": ""
}
] | [
{
"docid": "d7f705c5e234d6ad46c924c65edc7fb8",
"score": "0.66916054",
"text": "def active_committees(include_inactive=nil)\n return committees.with_activity_status if include_inactive\n ac = committees.active\n ac.empty? ? committees : ac\n end",
"title": ""
},
{
"docid": "cc079274... |
268b4ee6a15a63c628862437669c71ee | def to_XML() return "" end Return the object attributes in XML form | [
{
"docid": "1d70ce81282d39849b7af418d2761e1c",
"score": "0.0",
"text": "def xmlAttr\r\n a = Array.new\r\n a << ['id', id]\r\n a << ['isVisible', @visible]\r\n a << ['labelText', @labelText]\r\n a << ['labelTextColor', @labelTextColor]\r\n a << ['x', @position != nil ? @position.x : nil... | [
{
"docid": "cf8208895d943b7e59f8663bb47a4282",
"score": "0.87502867",
"text": "def to_xml\n\t\t\t\"<#{@name} #{attributes_string} />\"\n\t\tend",
"title": ""
},
{
"docid": "af0a4f7cb10069dc9b67c18d03f75b08",
"score": "0.8171202",
"text": "def to_xml\n\t\tend",
"title": ""
},
... |
7430a40fdff7236a61ea0fe7c707ccfa | Set one or more topic paths to unsubscribe from | [
{
"docid": "6f7549596e91f94999ab9c2d02de8040",
"score": "0.6080424",
"text": "def topics=(value)\n if value.is_a?(Array)\n @topics = value\n else\n @topics = [value]\n end\n end",
"title": ""
}
] | [
{
"docid": "347b6260bf1f12483897c3268a13700f",
"score": "0.65034425",
"text": "def unsubscribe(*topics)\n # Defer unsubscribing until we are connected\n callback do\n send_packet(\n MQTT::Packet::Unsubscribe.new(\n :id => next_packet_id,\n :topics => topics\n )... |
5e06bf4b04514d232ad805624b6b87df | Has this resource any childrens | [
{
"docid": "58a9cd87958b6cc75772e1078ed34bd3",
"score": "0.0",
"text": "def collection?\n true\n end",
"title": ""
}
] | [
{
"docid": "656e4606fed5dbca34b8835c537933d4",
"score": "0.7495247",
"text": "def children?\n self.children.any?\n end",
"title": ""
},
{
"docid": "a73e105ab7e51557ee32957a6ffb5ab4",
"score": "0.73882824",
"text": "def children?\n !@children.empty?\n end",
"ti... |
dadc1ad021cd5e4e152c910196b2cf2e | Returns content of the cell as String. Topleft cell is [1, 1]. | [
{
"docid": "7cd84b6c5a7b18f19e7f94a00a09681f",
"score": "0.70336103",
"text": "def [](row, col)\n return self.cells[[row, col]] || \"\"\n end",
"title": ""
}
] | [
{
"docid": "3d57955c672246821797056ff46012ac",
"score": "0.744356",
"text": "def to_s\n @cells.map { |row| row.map { |e| e || \" \" }.join(\"|\") }.join(\"\\n\")\n end",
"title": ""
},
{
"docid": "1e0b6cfa841798898f9db1ea7bf8aafe",
"score": "0.73340213",
"text": "def to_cell\... |
2a3d2920854abba154046ee3e25b90f3 | POST /items POST /items.json | [
{
"docid": "68611b3f26be318bf508ebb7d46a825e",
"score": "0.0",
"text": "def create\n item_details = item_params\n\n if params[:file]\n response = Cloudinary::Uploader.upload params[:file]\n item_details[\"image\"] = response[\"url\"]\n end\n\n @item = Item.new(item_details)\n ... | [
{
"docid": "1a87b6b1a8f3fc007c549688390eae3f",
"score": "0.75517005",
"text": "def create_item\n item = @list.items.create(:title => params[:title], :details => params[:details], :deadline => params[:deadline], :tags => params[:tags])\n render json: { item: item }\n end",
"title": ""
},
{... |
8883c9f8c627f4de28d3dc0f3e0b44db | Returns the speed in accordance to the last speed. | [
{
"docid": "d09d6f2fe73b74a2bfe6219472276501",
"score": "0.0",
"text": "def undo\n @last_speed == CeilingFan::HIGH ? @fan.high :\n @last_speed == CeilingFan::MEDIUM ? @fan.medium :\n @last_speed == CeilingFan::LOW ? @fan.low : @fan.off\n end",
"title": ""
}
] | [
{
"docid": "c779cbbbb7168c12bcd120b03988c7cc",
"score": "0.8017841",
"text": "def get_speed\n return @speed\n end",
"title": ""
},
{
"docid": "e579f3e1f7114e11aeb0acb2b871bef2",
"score": "0.7925986",
"text": "def current_speed\n @current_speed\n end",
"title": "... |
1efd6e2007a14f279fe35a379046114c | input: number output: array of primes numbers need to find if a number is prime first define a method is_prime? that takes an integer. test if it is prime by iterating through a range from 2 up to n1 if the input number is divisible by any of the numbers in that range, not prime iterate through each number from 2 up to... | [
{
"docid": "c6c2ed163fdc11b2422c70fd4c24b508",
"score": "0.0",
"text": "def is_prime?(n)\n (2..n-1).each do |num|\n if n % num == 0\n return false\n end\n end\n true\nend",
"title": ""
}
] | [
{
"docid": "11144f104d411555e1cdd5962085990c",
"score": "0.8505439",
"text": "def prime? (number)\n if number < 2 \n return FALSE\n elsif number == 2 || number == 3\n return TRUE\n end\n \n#creates new array and stores all numbers less than given number. Divides the number by all numbers ... |
c0426bf5a8070f4e7aaa42650481aff9 | argument fv stands for field_value (Hash) | [
{
"docid": "4142b4cd084169a69d60565d04781517",
"score": "0.0",
"text": "def length_of_stay_string(fv)\n msg = ''\n if fv['low']\n msg += \"#{fv['low']['value']} #{fv['low']['unit']}\"\n msg += less_than_symbol(fv['low']['inclusive?'])\n end\n msg += 'stay'\n if fv['high']\n ... | [
{
"docid": "71132a989b44d794d6203631b5082907",
"score": "0.68047917",
"text": "def basic_value(ft, fv)\n if fv.value\n ft = field_type fv.name\n if ft.number?\n fv.value.to_f\n else\n fv.value\n end\n elsif fv.child_sample_id\n fv.child_sample\n elsif fv.c... |
a306f3de1a40b0a36bdef8f4b3c404c9 | PUT /librarians/1 PUT /librarians/1.json | [
{
"docid": "8f90ce11a3e86eb97daa45420b8702c0",
"score": "0.6199263",
"text": "def update\n @librarian = Librarian.find(params[:id])\n\n respond_to do |format|\n if @librarian.update_attributes(params[:librarian])\n format.html { redirect_to @librarian, notice: 'Librarian was successful... | [
{
"docid": "b32f3f8f9372225e7fe5ccf4274ee534",
"score": "0.6048995",
"text": "def update\n @resturant = Resturant.find(params[:id])\n\n if @resturant.update_attributes(params[:resturant])\n self.headers.merge!('Content-Type' => 'application/json' )\n self.response_body = @resturant.to_js... |
471b9347283c3adce20f4e2477a5e246 | parser rule mulOperand (in Giraffe.g) 244:1: mulOperand returns [result] : ( PLUS mulOperandRest | MINUS mulOperandRest | mulOperandRest ); | [
{
"docid": "f320fae3829eb6580e11e4729f1d26f2",
"score": "0.833872",
"text": "def mulOperand\n # -> uncomment the next line to manually enable rule tracing\n # trace_in( __method__, 30 )\n return_value = MulOperandReturnValue.new\n\n # $rule.start = the first token seen before matchin... | [
{
"docid": "d18f0524ca9804eeabb1729b0c681832",
"score": "0.84950227",
"text": "def mulOperand\n # -> uncomment the next line to manually enable rule tracing\n # trace_in( __method__, 29 )\n return_value = MulOperandReturnValue.new\n\n # $rule.start = the first token seen before match... |
f93b3f016e1e7fd2181168cf54c762ab | Returns true if the given token matches the digest. | [
{
"docid": "e947f2f66a1fea71af035606461dd791",
"score": "0.0",
"text": "def authenticated?(remember_token)\n return false if remember_digest.nil?\n BCrypt::Password.new(remember_digest).is_password?(remember_token)\n end",
"title": ""
}
] | [
{
"docid": "9e854261e13509b56a6bdd7480cceffa",
"score": "0.7843973",
"text": "def authenticated?(digest, token)\n digest = send(\"#{digest}_digest\")\n # Use metaprogramming to select the appropriate token attribute based on\n # the parameter digest.\n return false if digest.nil? # Digest do... |
a9446f80d4ff81e4b86c9e60b506462f | Creates a new Mutator with the specified _pattern_ and _substitute_ data. If a _block_ is given, and the _substitute_ data is omitted, then the _block_ will be used to replace data matched by the _pattern_. | [
{
"docid": "b4fb72b085c6e6c4234b24beaa626f12",
"score": "0.6995059",
"text": "def initialize(pattern,substitute=nil,&block)\n @pattern = pattern\n @substitute = (substitute || block)\n end",
"title": ""
}
] | [
{
"docid": "5198f01fb6da1dd9770ea8ce28a6b5bf",
"score": "0.75347215",
"text": "def mutate(pattern,substitute=nil,&block)\n @mutators << Mutator.new(pattern,substitute,&block)\n end",
"title": ""
},
{
"docid": "6cad18956373dd2525cd13d17c9c339e",
"score": "0.65311074",
"text": ... |
0d60f43f5cc1f23f113f8d2df5051b04 | Set the value of the ItemCondition input for this Choreo. | [
{
"docid": "b8e89b26b3ac5c3ca4e4c1a0ea674740",
"score": "0.7747819",
"text": "def set_ItemCondition(value)\n set_input(\"ItemCondition\", value)\n end",
"title": ""
}
] | [
{
"docid": "c0ed547041a90465ec1715b76ea93636",
"score": "0.5634195",
"text": "def condition=(condition)\n @condition = condition\n end",
"title": ""
},
{
"docid": "9937be74e57ea7a901eba579308576a0",
"score": "0.5510251",
"text": "def condition=(c)\n Condition.assign(Cproton.... |
1c879c0f6a84ff9dde1bfd02c23ac3a1 | Public: Get the message for this exception. Prepends the Salesforce ID. Returns a String. | [
{
"docid": "d7ade28de2c294f2c573ff64632ee4db",
"score": "0.68253314",
"text": "def message\n debug_info = [\n @instance.mapping.database_model,\n @instance.mapping.salesforce_model,\n @instance.id,\n ]\n\n \"[#{debug_info.join('|')}] #{base_exception.messa... | [
{
"docid": "bdfbc1ba2f71e6d5a834d54efb23a53d",
"score": "0.6549774",
"text": "def exception_message\n @e_m ||= @exception.nil? ? '' : @exception.message\n end",
"title": ""
},
{
"docid": "9bc5b2768c9c88ec9f927faf8c3a040d",
"score": "0.6275861",
"text": "def message\n ... |
19935c8528f3a8e1cc5dd43f62b340db | randomly displays all the question's text with a number assignment | [
{
"docid": "5f69a94a23daa86f91ca7caba7bdc19d",
"score": "0.71753526",
"text": "def display_answers\n answer_number = 0 #set our answer # counter to set answers' number_identifier\n self.answers.shuffle.each do |answer|\n #assign number_identifier to check user's answers\n answer_number +... | [
{
"docid": "a8183fc5e32f7105425f3d0988eb9e90",
"score": "0.7825574",
"text": "def question_text\n @number1 = rand(20)\n @number2 = rand(20)\n puts \"#{@current_player} : What is #{@number1} + #{@number2}\"\nend",
"title": ""
},
{
"docid": "8dd265172304142057dd3b2d20362ac6",
"score": "... |
6ade563a478174e3b33c50d5214fb6d0 | TODO: change this to clocked_in? Checks if the user is clocked in based on the user having any running timers | [
{
"docid": "5eba17d37a224b7922cbf1ec9a2ef4fd",
"score": "0.7847148",
"text": "def is_clocked_in\n if @lp.timers(@workspace).count == 0\n return false\n else\n return true\n end\n end",
"title": ""
}
] | [
{
"docid": "b7decaad73c1ccbde74a176975dc4e0f",
"score": "0.6771392",
"text": "def check_in \n # User already checked in thru SMS before deadline\n if self.check_in_current == true \n good_check_in_tally\n check_if_still_active\n else \n # User has NOT checked in via SMS or website... |
68eafaeb881f539fd6b51d428926a191 | Update a &39;equipment.Psu&39; resource. | [
{
"docid": "3705eaabcf65e27d4f535fc22790a7d4",
"score": "0.5650713",
"text": "def patch_equipment_psu_with_http_info(moid, equipment_psu, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: EquipmentApi.patch_equipment_psu ...'\n end\n # ver... | [
{
"docid": "c81ce3bca6cb6bcdf98193aa8edf0859",
"score": "0.6440278",
"text": "def update\n @quip = Quip.find(params[:id])\n\n respond_to do |format|\n if @quip.update_attributes(params[:quip])\n flash[:notice] = 'Quip was successfully updated.'\n format.html { redirect_to(@quip)... |
e31e17d2e95e33a5cbae2cac3cd2e75a | GET /game_profiles GET /game_profiles.json | [
{
"docid": "c1dc31096e3f1d54f64b136631642ed6",
"score": "0.0",
"text": "def index\n @game_profiles = GameProfile.where(\"user_id = ? and delete_flag = 0\", params[:user_id])\n @ret = {\n :ret => 1,\n :game_profiles => @game_profiles\n }\n render :index, location: @ret\n\n end",
... | [
{
"docid": "93edd2ba7f3c41892d9400fad4224664",
"score": "0.75830686",
"text": "def list_profiles\n # /profiles returns a list of profiles.\n end",
"title": ""
},
{
"docid": "23a90204c6ead52fd36f27db02775a54",
"score": "0.74102485",
"text": "def profiles\n hash = {:username =... |
9eb145f3fd3d6b1b94f931647a7d82c6 | DELETE /lectures/1 DELETE /lectures/1.json | [
{
"docid": "fb4ad8a01ff6523a98a7c0eaba3ce7a8",
"score": "0.7337635",
"text": "def destroy\n @lecture.destroy\n respond_to do |format|\n format.html { redirect_to :back, notice: 'Lecture was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"title": ""
... | [
{
"docid": "ea87f6f54c78f33e0ba72f248f7902d5",
"score": "0.7754075",
"text": "def destroy\n @lecture.destroy\n\n head :no_content\n end",
"title": ""
},
{
"docid": "c62d211e95c602f34ee5cd720ae12e70",
"score": "0.7673362",
"text": "def destroy\n @lecture = Lecture.find(param... |
21376a2ae296a091e4beef5938898618 | Create a new output port on this task context | [
{
"docid": "f6aaeae19ba2c4d7c39bc57c447e0144",
"score": "0.6897638",
"text": "def create_output_port(name, orocos_type_name, options = Hash.new)\n options, other_options = Kernel.filter_options options, :class => LocalOutputPort\n create_port(true, options[:class], name, orocos_typ... | [
{
"docid": "b11146e6395bfb925e50455867535c29",
"score": "0.71910256",
"text": "def create_port(is_output, klass, name, type, options)\n # Load the typekit, but no need to check on it being exported since\n # #find_orocos_type_name_by_type will do it for us\n Orocos.load_... |
9e8c37d7a8ad1ea942edd8b346214c9f | Method that generate header items for the table | [
{
"docid": "2a9bb8679783ab38584b110dec97054a",
"score": "0.7470444",
"text": "def generate_header_item(item)\n item\n end",
"title": ""
}
] | [
{
"docid": "7b516a98ef5185d7a58708e441f00b44",
"score": "0.826945",
"text": "def generate_header_row\n '<tr>' + '<th>' + \"#{(@header.map {|x| generate_header_item(x)}).join('</th><th>')}\" + '</th></tr>' + \"\\n\"\n end",
"title": ""
},
{
"docid": "651a9629517bc00ba1dbeb92fbd7265e",
"... |
7c41b2d5898109529a5d6d527d070a53 | PUT /fault_histories/1 PUT /fault_histories/1.xml | [
{
"docid": "5e145d852bbf2b37acb60687890b4341",
"score": "0.69041896",
"text": "def update\n @fault_history = FaultHistory.find(params[:id])\n\n respond_to do |format|\n if @fault_history.update_attributes(params[:fault_history])\n format.html { redirect_to(@fault_history, :notice => 'F... | [
{
"docid": "10d6c874a4e5b938e8ad352b588ab020",
"score": "0.67140305",
"text": "def update\n respond_to do |format|\n if @fault.update(fault_params)\n format.html { redirect_to faults_url, notice: 'Fault was successfully updated.' }\n format.json { render :index, status: :ok, locati... |
5423d91ee4b4231a8642c407572131d3 | Get feed of crawl issues for a site == Example wt = GData::WebmasterTools.new | [
{
"docid": "f691e80cf8be1cbc2c91ea9b3afe02e3",
"score": "0.6568534",
"text": "def crawl_issues(site_id)\n if authenticated?\n response, data = get(CRAWL_ISSUES_URL % [CGI::escape(site_id)])\n\n crawl_issues = Array.new\n REXML::Document.new(data).root.elements.each('entry') do ... | [
{
"docid": "6ec37ae3991b3f33122538d12ae960aa",
"score": "0.61569476",
"text": "def fetch\n @jobs = fetch_rss(url, Sources::STACKOVERFLOW)\n end",
"title": ""
},
{
"docid": "7e0a925772143b568dcba08edaedbbd9",
"score": "0.59270155",
"text": "def crawl\n update_all_feeds\n ... |
ea2a86761a134755c46273ce335365aa | This is used to satisfy Martin's request that file names not be changed on software attachments | [
{
"docid": "5807a3c7dd941220c9c6cd126dbf539b",
"score": "0.0",
"text": "def download\n @software_attachment = SoftwareAttachment.find(params[:id])\n \n data = URI.open(@software_attachment.software_attachment.url)\n send_data data.read,\n filename: @software_attachment.software_attachment... | [
{
"docid": "01b46528b27e893b9670c772aa48b39d",
"score": "0.7035331",
"text": "def rename_file\n\t if bill_attachment_file_name\n extension = File.extname(bill_attachment_file_name).downcase\n if !tagname.blank?\n #FIXME_AB: Why tagname.extension?\n self.bill_attachment.instance_... |
9df547aac8bb372fe1a8978f62b3d424 | Requires user to be signed in | [
{
"docid": "21567822087a78f41d0acafd1e3f7f92",
"score": "0.0",
"text": "def index\n\t\trender :layout => 'frontend_layout'\n\t\t@dashboards = Dashboard.all\n\tend",
"title": ""
}
] | [
{
"docid": "78f742221fd269cab47116df29fae3f6",
"score": "0.81737256",
"text": "def require_signin\n deny_not_signed_in unless signed_in?\n end",
"title": ""
},
{
"docid": "9073f90ceaba06f209bdd2b75db61117",
"score": "0.8140052",
"text": "def require_user_logged_in!\n redir... |
b1de16c6e1ec89f1e8caae7c82dff1b7 | get value if not set value with key, attr when set value is block | [
{
"docid": "8e4c8ee53e524764549f6dac86e883b2",
"score": "0.6952188",
"text": "def fetch(key, attr, vtype = :string)\n value = get(key, attr, vtype)\n unless value\n value = yield\n set value, key, attr if value\n end\n\n value\n end",
"title": ""
}
] | [
{
"docid": "12df9b3d6df3f16d5d182977bba281ec",
"score": "0.6424347",
"text": "def attribute(option_key, default_value=:__UNDEFINED__, opts={}, &block)\n ret = _pair(option_key, default_value, opts, &block)\n return if ret[2] # ignore\n @attributes[ret[0]] = ret[1]\n end",
"... |
f14b82cc60af9233923a158474c49ac0 | private to not call the method anywhere else | [
{
"docid": "08e801fa87fcffdbf9c652d8e5fe6b9b",
"score": "0.0",
"text": "def user_params\n params.require(:user).permit(:email , :password, :password_confirmation, :name) #from the params hash, require the user key which has a value of a hash and only permit the keys email, password, and password_conf... | [
{
"docid": "22eca42bc8ffb4cb933fefb36966d859",
"score": "0.70550615",
"text": "def call; end",
"title": ""
},
{
"docid": "22eca42bc8ffb4cb933fefb36966d859",
"score": "0.70550615",
"text": "def call; end",
"title": ""
},
{
"docid": "22eca42bc8ffb4cb933fefb36966d859",
"... |
c286bfa33367e4ef066855830c94456a | POST /tune_in_originals POST /tune_in_originals.xml | [
{
"docid": "2001e73ba8efbaa0b0cd82c8fe0e028e",
"score": "0.64266",
"text": "def create\n @tune_in_original = TuneInOriginal.new(params[:tune_in_original])\n\n respond_to do |format|\n if @tune_in_original.save\n format.html { redirect_to(@tune_in_original, :notice => 'Tune in original ... | [
{
"docid": "d2d0630b352b3b28d640bfa334d67f43",
"score": "0.59012294",
"text": "def update\n @tune_in_original = TuneInOriginal.find(params[:id])\n\n respond_to do |format|\n if @tune_in_original.update_attributes(params[:tune_in_original])\n format.html { redirect_to(@tune_in_original,... |
cff91222dfc6f83e3f14c64d902b0dd9 | return an array of couples of Point3D | [
{
"docid": "0f63b99b2c05f2324980e57e71fb5e91",
"score": "0.0",
"text": "def lines\n\t\t@lines_idx.map { |i1, i2| [@dots[i1], @dots[i2]] }\n\tend",
"title": ""
}
] | [
{
"docid": "97ba89e5f45256c1272ff37d74fc1189",
"score": "0.71966386",
"text": "def get_array\r\n [self[:x], self[:y], self[:z]]\r\n end",
"title": ""
},
{
"docid": "1c3fb20ce408e066d0654cc6017ef4d6",
"score": "0.70040727",
"text": "def vertices\n vertices_arr = []\n x_coord... |
f45a9a44c0e71c98a685e3427b1800d2 | the json (string form) for this ArchivaRuntimeConfiguration | [
{
"docid": "6c725ac2007c5f4c26bd1c8652a9c98c",
"score": "0.0",
"text": "def to_json\n to_jaxb_json_hash.to_json\n end",
"title": ""
}
] | [
{
"docid": "dcf12092f70f6b830540867a5db047f2",
"score": "0.7478404",
"text": "def config\n as_json\n end",
"title": ""
},
{
"docid": "3c6bc81d600bcc0a0c39a68694ee457a",
"score": "0.72965306",
"text": "def to_json\n @config.to_json\n end",
"title": ""
},
{
... |
2446e0ea48df64b2b9838ffbaf13e3ce | Determine the MCS label for a given index | [
{
"docid": "ae88aece02c4492ecef2fbefe349e85e",
"score": "0.6032059",
"text": "def get_mcs_label(name)\n begin\n uid = EtcUtils.uid(name)\n rescue ArgumentError, TypeError, NoMethodError\n raise ArgumentError, \"Argument must be a numeric UID or existing username: ... | [
{
"docid": "68c6749cfac0485adc2bf7064e6c35f0",
"score": "0.681674",
"text": "def get_label(number)\n return @labels[number]\n end",
"title": ""
},
{
"docid": "13d8f5b3a34f33912860e0526ba00f10",
"score": "0.6557142",
"text": "def label(index_)\n nil\n end",
"title"... |
517124f0a9a15a4ea423ef609714b294 | Set ups the VLAN for the VMs. | [
{
"docid": "0ebadee8c802dcd1fe463f802e655f60",
"score": "0.69797164",
"text": "def set_up_vlan(options)\n\n if options[:vlan_id].nil?\n options[:vlan_id] = CONF[:start_vlan] + options[:network_id].to_i\n end\n\n options[:vlan_dev] = \"#{options[:phydev]}.#... | [
{
"docid": "e92fd8049ce534044b78b4d8686a0818",
"score": "0.68339336",
"text": "def set_vlan\n converge_it(\"Set VLAN #{new_resource.vlan} on adapter #{new_resource.device}\") do\n shell_out = Mixlib::ShellOut.new(\"powershell.exe -Command \\\"Set-NetLbfoTeamNIC -Name '#{new_resource.... |
45fe2448e3f1963583cec5d11da3ca6e | Returns the number of fathers to keep. Looks for config values +:fathers_to_keep+, +:fathers_promoted_on+. Default +6+. | [
{
"docid": "4b3a7c5cf75865fcabe4c529ae1e1204",
"score": "0.76027626",
"text": "def fathers_to_keep\n c[:fathers_to_keep] || c[:father_promoted_on] || 6\n end",
"title": ""
}
] | [
{
"docid": "79cdfd38b578b9bc3a56f828d80ac0f3",
"score": "0.7392316",
"text": "def gfathers_to_keep\n c[:grandfathers_to_keep] || 6\n end",
"title": ""
},
{
"docid": "014e3c0d4699899e3260d302949877a5",
"score": "0.6066794",
"text": "def how_many_to_keep_today\n goes... |
86398e32ed2ec6a66129e3f40290393a | Search pattern in candidates. | [
{
"docid": "3c64d39c04730f10d1598d408e741292",
"score": "0.652428",
"text": "def partial_and_unique_match(pattern, candidates)\n result = candidates.find { |c| c == pattern }\n return result, 1 if result\n result = candidates.select { |c| c =~ /#{pattern}/i }\n return result[0], 1 if... | [
{
"docid": "164af2567ebfd5f37e11b6d809bf48a0",
"score": "0.7392885",
"text": "def matches\n post_process(candidate.empty? ? completions : completions.select { |c| c.start_with?(candidate) })\n end",
"title": ""
},
{
"docid": "4a36f69f52355e8b42371546d213c63c",
"score": "0.68162197",
... |
6a89cb11ba7d4023d5d51047e467b062 | Authenticate to generate a (admin) token. | [
{
"docid": "5b69bc8bd2440a68c73e49693cee2afb",
"score": "0.6204901",
"text": "def auth(tenant)\n\t\t\n\t\tauth = {\"auth\" => {\"passwordCredentials\" => {\"username\" => @user_name, \"password\" => @password}, \"tenantName\" => tenant}}\n\t\t\n\t\tjson_string = JSON.generate(auth)\n\t\t\n\t\tpost_call... | [
{
"docid": "bffa95417b071aa25fbc9dc493d5322b",
"score": "0.7491395",
"text": "def authenticate(admin: false)\n if admin\n @key = api_keys(:admin_api_key).key\n else\n @key = api_keys(:default_api_key).key\n end\n\n request.headers['Authorization'] = \"Token token=#{@key}\"\n end",... |
49ddc665dba554c9fcf039be21a7527e | GET /doseform_doseunits/1 GET /doseform_doseunits/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "e95db1a0a4fe22379c250b1c8a2d8d2e",
"score": "0.7142577",
"text": "def index\n @doseform_doseunits = DoseformDoseunit.all\n end",
"title": ""
},
{
"docid": "21f937a500be49057a6ee3d8c46dbca2",
"score": "0.65969217",
"text": "def set_doseform_doseunit\n @doseform_do... |
4618c2de74f093ea2d2608ce89af900a | =begin publish_language publishes a single language translations of a particular version to the chosen redis_database =end | [
{
"docid": "042ffb0c9ac263ddf6ed1b66362a1284",
"score": "0.69297177",
"text": "def languagepublish\n begin\n RedisDatabase.validate_redis_db_params(params[:redis_database_id])\n \n @redis_database = RedisDatabase.find(params[:redis_database_id])\n count = @redis_database.version_lang... | [
{
"docid": "55043e70da7abde8f77b9ba1c21c20e8",
"score": "0.64907885",
"text": "def versionpublish\n begin \n redis_db = RedisDatabase.find(params[:id])\n count = redis_db.translations_ready_to_publish().count \n #result = redis_db.version_publish()\n if Rails.env.development?... |
24f96e63965ba93fa8c6ffb072cc80d3 | GET /closedfiles/1 GET /closedfiles/1.json | [
{
"docid": "44f1bbeae43d25c907cf382b05543619",
"score": "0.7480897",
"text": "def show\n @closedfile = Closedfile.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @closedfile }\n end\n end",
"title": ""
}
] | [
{
"docid": "22c54e428362a2bd28c0ada11d261bb7",
"score": "0.6819809",
"text": "def new\n @closedfile = Closedfile.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @closedfile }\n end\n end",
"title": ""
},
{
"docid": "bb6f97145d1f4e5... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "4f02a9ddf58d2e2f780d438e2fff2bdb",
"score": "0.0",
"text": "def set_code_method\n @code_method = CodeMethod.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;... |
c5b16d9676d84fb743f4cf28bee38aa4 | POST /tasks POST /tasks.json | [
{
"docid": "080149f823ef039ae0477bb72f1b7307",
"score": "0.0",
"text": "def create\n @task = Task.new(task_params)\n\n authorize @task\n\n @task.category_id = set_category(params)\n\n respond_to do |format|\n if @task.save\n\n if params[\"task\"][\"do_now\"] == \"true\"\n ... | [
{
"docid": "cc005a7eb380d9479fe88f237f4f4b86",
"score": "0.75518596",
"text": "def create\n task = current_user.tasks.build(task_params)\n\n if task.save\n render json: task, status: 201\n else\n render json: { errors: task.errors }, status: 422\n end\n end",
"title": ""
},
... |
6c08ae440304ef54390d499c7cdde69e | reduce 51 omitted reduce 52 omitted | [
{
"docid": "2f3e5b85372619b98fa6ee8b9ad66d5f",
"score": "0.0",
"text": "def _reduce_53(val, _values, result)\n @lexer.cond.push(true)\n \n result\nend",
"title": ""
}
] | [
{
"docid": "82915cb5c0203b0cba656d2bf4753af1",
"score": "0.7135223",
"text": "def _reduce_525(val, _values, result)\n result = nil\n \n result\nend",
"title": ""
},
{
"docid": "bcc77ea412992f9c87aad138efd40a40",
"score": "0.71154386",
"text"... |
51fc4d45d867a3a4b676cb29b75751b2 | Get rate estimates from USPS International | [
{
"docid": "ee109395d967b8ed7a3a99aa846570d0",
"score": "0.0",
"text": "def rate_estimates(shipment, options: RateEstimateOptions.new, debug: false)\n rate_request_xml = SerializeRateRequest.call(shipment: shipment, login: login, options: options)\n request = build_request(api: :rates, xml... | [
{
"docid": "e311f5d94d9c9bae63a8ef3d5312b5ff",
"score": "0.7016336",
"text": "def rate\n return @rates\n end",
"title": ""
},
{
"docid": "5f895ede95e22f8ba0020d6cef31c6ac",
"score": "0.69507974",
"text": "def usps_rates\n usps = ActiveShipping::USPS.new(login: ENV['USPS_LOGIN'... |
fae7d9974c1c0d089f58d5f5f8f12705 | check if new_date is between start_date and end_date | [
{
"docid": "eef7824dd7395abf01fa66a7798a9916",
"score": "0.82945573",
"text": "def include?(new_date)\n return start_date <= new_date && end_date > new_date\n end",
"title": ""
}
] | [
{
"docid": "19b6633fbda58b0c39752df58548e5de",
"score": "0.8075021",
"text": "def overlap?(new_start_date, new_end_date)\n return(start_date <= new_end_date && end_date >= new_start_date) \n end",
"title": ""
},
{
"docid": "ff9f7c253d17003264bee692f47215d9",
"score": "0.7545545",... |
ffb72a13ac70d806d3b15747226aa470 | ensure that project is kind of RedmineProject | [
{
"docid": "cd854f4b2fb1be6f1d073be55c199603",
"score": "0.0",
"text": "def can_read? _project\n return true if Setting.admin_users.include? self.login\n\n _m = find_memberships_by_project _project\n return false if _m.blank?\n !_m.find{|x| x.repository_read_role?(self)}.blank?\n ... | [
{
"docid": "cefa91493d568f69087a67c287d2628f",
"score": "0.66688836",
"text": "def project?\n parent_type == \"Project\"\n end",
"title": ""
},
{
"docid": "e75173c817aaf510213395dffe1321d6",
"score": "0.644467",
"text": "def is_for_project?\n not self.project.nil?\n end",
... |
02bd34e4942bf209f2ada0c60a6eceba | use a specific userobject to call the api. (.generate_token) | [
{
"docid": "12e0275b403b160333c760c5be582ea0",
"score": "0.0",
"text": "def auth_token(client_token = '')\n\t\tif self.authen_token == client_token\n\t\t\treturn true\n\t\telse\n\n self.wrong_token_time += 1\n #debugger\n self.save\n if self.wrong_token_time >= 3\n ... | [
{
"docid": "a3055b16f4671a53e397af5b81d66fbc",
"score": "0.7476838",
"text": "def call\n JsonWebToken.encode(user_id: api_user.id) if api_user\n end",
"title": ""
},
{
"docid": "6b615396d710681c85823e38898ab122",
"score": "0.7320555",
"text": "def call\n\t\tJsonWebToken.encode(us... |
36b4a2ac42e28b095567ad394373078c | The Clever Algorithms Project: (c) Copyright 2010 Jason Brownlee. Some Rights Reserved. This work is licensed under a Creative Commons AttributionNoncommercialShare Alike 2.5 Australia License. | [
{
"docid": "30ab599368bc47846a39a4fa843624a0",
"score": "0.0",
"text": "def objective_function(vector)\n return vector.inject(0.0) {|sum, x| sum + (x**2.0)}\nend",
"title": ""
}
] | [
{
"docid": "54a53621e5fd3fc0cc3d2ff2901a893e",
"score": "0.64569145",
"text": "def chazelle\n end",
"title": ""
},
{
"docid": "06150c1b44513062febdb4f12a4bbb21",
"score": "0.6372224",
"text": "def crock(normocyte, scarless)\n end",
"title": ""
},
{
"docid": "df034585a... |
fae13d1adff0981411406f3c0ad4ce52 | Generate a cute, subjective status message based on AQI category name | [
{
"docid": "610aac6ff94a2bc802d136e46d05e12b",
"score": "0.6236302",
"text": "def ambiguous_message(category = \"\")\n case category\n when \"Good\"\n [\"Things are looking good.\", \"Perfect day for a walk\"].sample\n when \"Moderate\"\n [\"The air could be better though.\"... | [
{
"docid": "868e5a5e077a726402dc8040e31807d2",
"score": "0.6716809",
"text": "def category(message)\n case message[0,10].upcase\n when /FIX/\n category_message = \"FIX\"\n when /NEW/, /ADD/, /ADDED/, /IMPLEMENT/, /CREATED/\n category_message = \"NEW\"\n when /ENHANCE/, /CHANGE/, /BET... |
eafd9872c422678cee949b30d64c6950 | DELETE /bookmarks/1 or /bookmarks/1.json | [
{
"docid": "b8e1c12fd3c5e562729d0b900ef2e4f1",
"score": "0.72612345",
"text": "def destroy\n @bookmark.destroy\n respond_to do |format|\n format.html { redirect_to bookmarks_url, notice: \"Bookmark was successfully destroyed.\" }\n format.json { head :no_content }\n end\n end",
"... | [
{
"docid": "1dd60ca846c00efba03eb125b19392d1",
"score": "0.75937074",
"text": "def destroy\n @bookmark.destroy\n\n respond_to do |format|\n format.html { redirect_to bookmarks_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "58c31f2beebb70... |
bec37a45b83d8abaabdeb33fb1510be2 | PATCH/PUT /api/v2/dashboard/products/1 PATCH/PUT /api/v2/dashboard/products/1.json | [
{
"docid": "4529187a85953f30476ddcd7d2229995",
"score": "0.6411744",
"text": "def update\n render json: @product.errors unless @product.update(product_params)\n end",
"title": ""
}
] | [
{
"docid": "306087ac201b8c728342c4a66d77b684",
"score": "0.7014713",
"text": "def update\n uri = \"#{API_BASE_URL}/products/#{params[:id]}\"\n payload = params.to_json\n rest_resource = RestClient::Resource.new(uri, USERNAME, PASSWORD)\n begin\n rest_resource.put payload , :content_type... |
8b406e3b9e6f8535ae8ebccc8d11a08a | Reads registration time/date information and converts it to a Ruby object. | [
{
"docid": "039c5b78de497fff80a56a4e024e5d60",
"score": "0.56568885",
"text": "def format_registration_time(date_time)\n format_time = DateTime.strptime(date_time, '%m/%d/%y %H:%M')\nend",
"title": ""
}
] | [
{
"docid": "ec5bf50ea1ff27203bd60d04709b12c9",
"score": "0.62947994",
"text": "def registered\n Date.parse(match(/Registered\\s+:\\s+(\\w+ [0-9]{2} [0-9(:?)]+ [0-9]{4})/))\n end",
"title": ""
},
{
"docid": "ec5bf50ea1ff27203bd60d04709b12c9",
"score": "0.62947994",
"text": "de... |
37ae63fa80c6b45f9e61b102312eb1d9 | Used to determine if cached_find is called with a cache id | [
{
"docid": "2c05b57b63bfd6995f4269c5fb21f2b9",
"score": "0.6783187",
"text": "def has_cache_id?(args)\n args.size > 1 && args.first(2).all?{ |arg| [String, Symbol].include?(arg.class) }\n end",
"title": ""
}
] | [
{
"docid": "8b29b8da294b0d8282dabc69b04b5c3c",
"score": "0.7803769",
"text": "def cached?(id); end",
"title": ""
},
{
"docid": "7daf1f2738341763c26c299eefd92618",
"score": "0.7739575",
"text": "def cached?(id)\n id.downcase! if id.is_a? String\n class_variable_get(:@@cache)... |
103304b0e4cd3562187eb9a4bafceea4 | POST /business_units POST /business_units.json | [
{
"docid": "b309f36c9c468714a096a9708ab539de",
"score": "0.7200393",
"text": "def create\n @business_unit = BusinessUnit.new(params[:business_unit])\n\n respond_to do |format|\n if @business_unit.save\n format.html { redirect_to @business_unit, notice: 'Business unit was successfully c... | [
{
"docid": "134188cbb38efc3a333b6e369d62a295",
"score": "0.78869027",
"text": "def business_units_create(name)\n url = \"#{@sal_url}/api/v2/business_units/\"\n post_request(url, name)\n end",
"title": ""
},
{
"docid": "a2affa319aaf8af63a68aea095629491",
"score": "0.71714926"... |
1c846dc6765a5894a097875a497c119a | delegate undefined methods to the Writeexcel::Worksheet instance (if available) | [
{
"docid": "33c9b8c43c228b320248d607d4adb670",
"score": "0.7103732",
"text": "def method_missing(meth, *args, &block)\n if @worksheet.respond_to?(meth)\n @worksheet.send(meth, *args)\n else\n super\n end\n end",
"title": ""
}
] | [
{
"docid": "4a5d82d1a006609a5c45309fe4335182",
"score": "0.6504509",
"text": "def method_missing(method, *args, &block)\n # puts @excel.class, method, args.inspect\n\n if @excel.respond_to?(method)\n @excel.send(method, *args, &block)\n elsif @excel.worksheets.last.respond_to?(meth... |
5c93c58f7413470478b543116b4170a9 | Asks for the IDs of tweets to delete and then their deletion. After deletion, asks for those tweets to be recorded as such. | [
{
"docid": "0e401c76eb54204450f68af5b5b790f6",
"score": "0.73686546",
"text": "def call\n deletes = delete_recorder.to_delete.map { |id| tweet_deleter.call(id) }\n ids = deletes.compact.flatten.map(&:id)\n delete_recorder.record_deletes(ids)\n end",
"title": ""
}
] | [
{
"docid": "6634559a4404d96d71580ca9c5c2f6fe",
"score": "0.70260113",
"text": "def delete_tweets!\n self.twittertexts.destroy_all\n end",
"title": ""
},
{
"docid": "b8ac767290c147356721cd944bdbe9fa",
"score": "0.65404457",
"text": "def destroy\n @tweet = Tweet.find(params[:id]... |