query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
721e61a0028bd246566db16efb1f242b | Whether this tag node has a set of HTML attributes defined via the parentheses syntax (e.g. `%tag(lang=en)`). | [
{
"docid": "7cb69a681595e2016dacd04f0382608b",
"score": "0.68283457",
"text": "def html_attributes?\n !dynamic_attributes_source[:html].nil?\n end",
"title": ""
}
] | [
{
"docid": "2d0e39754ac62bc7e9e12afa4d308fe0",
"score": "0.6969275",
"text": "def hasAttributes\n !node_attributes.empty?\n end",
"title": ""
},
{
"docid": "a37b01e710531cbd0d1349577d217527",
"score": "0.69300973",
"text": "def invlaid_attribute?(attributes)\n attribut... |
043c95126213117ab7d4cb6a99d082de | => false Write a method doubler(numbers) that takes an array of numbers and returns a new array where every element of the original array is multiplied by 2. | [
{
"docid": "dd4a5b4532ad451f50428745b49aaf44",
"score": "0.8508726",
"text": "def doubler(numbers)\n new_arr = []\n i = 0\n while i < numbers.length\n old_numbers = numbers[i]\n new_numbers = old_numbers * 2\n new_arr << new_numbers\n i += 1\n end\n return new_... | [
{
"docid": "a94a9cf15c89a27503d7bf18865698e5",
"score": "0.86371124",
"text": "def doubler(numbers)\n i = 0\n while i < numbers.length\n numbers[i] = numbers[i] * 2\n i += 1\n end\n return numbers\nend",
"title": ""
},
{
"docid": "a80182f2615917b690bd51fe0e31d16... |
f42d5d64c2600acfb1902e832c5e28ed | create a transfer refund Create a new transfer refund in the system. | [
{
"docid": "421d66821151d2d2dfd8a36a6366b2dc",
"score": "0.0",
"text": "def post_transferrefunds(transfer_id, amount, currency, opts = {})\n data, _status_code, _headers = post_transferrefunds_with_http_info(transfer_id, amount, currency, opts)\n data\n end",
"title": ""
}
] | [
{
"docid": "edd5c037f4dc8273c0d5dde36fd34b59",
"score": "0.79831463",
"text": "def refund!\n Refund.create self\n end",
"title": ""
},
{
"docid": "db4e69429fc50ee413349196929ba9c8",
"score": "0.7735344",
"text": "def create(params = {})\n wrapped_params = { refund: params ... |
b1f548b56685137c6bc1f3c7d274128c | prints arguments in pretty form. pp returns nil. | [
{
"docid": "9256e0b63b790e63c54de0cb01d0d241",
"score": "0.0",
"text": "def pp(*objs) # :doc:\n objs.each {|obj|\n PP.pp(obj)\n }\n nil\n end",
"title": ""
}
] | [
{
"docid": "db2ef7359eca4f0734d915448963096d",
"score": "0.74964404",
"text": "def pretty_print pp\n pp.pp eval(self.asPPString)\n end",
"title": ""
},
{
"docid": "db2ef7359eca4f0734d915448963096d",
"score": "0.74964404",
"text": "def pretty_print pp\n pp.pp eval(self.as... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "1c26f7ac3f853112a9f7fb797ec064a6",
"score": "0.0",
"text": "def property_params\n params.require(:property).permit(:name, :address, :property_type, :description, :size_type, :rent, :date_available, :security_deposit, :image_urls, :landlord_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... |
d10c0ab0142f73fe4538cff1709895a7 | DELETE /routes/1 DELETE /routes/1.json | [
{
"docid": "f18a5f087267f90d762919927ccf8f0b",
"score": "0.70856154",
"text": "def destroy\n @route.destroy\n respond_to do |format|\n format.html { redirect_to routes_url, notice: 'Route was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"title": ""
... | [
{
"docid": "69c3e20c5816fe569856155de151c0ff",
"score": "0.74477196",
"text": "def destroy\n @route = Line.find_by_slug(params[:line_id]).routes.find(params[:id])\n @route.destroy\n\n respond_to do |format|\n format.html { redirect_to routes_url }\n format.json { head :ok }\n end\n... |
41cc4cf8f9c28bf166cb82e67072390b | Write to an IO handle | [
{
"docid": "2cef320e48b4e07a6a07338f9b4a3adc",
"score": "0.64003956",
"text": "def write(io)\n if io.is_a?(String)\n io = File.open(io, 'w')\n self.write(io)\n io.close\n return\n end\n\n Marshal.dump(self, io)\n end",
"title": ""
}
] | [
{
"docid": "7feeffb0fa21e038a34eea2e0afbeef3",
"score": "0.75746816",
"text": "def write(handle, offset, data); end",
"title": ""
},
{
"docid": "1c895cbe7562822359710e38fa395472",
"score": "0.7197941",
"text": "def write_to(io)\n end",
"title": ""
},
{
"docid": "a8c71f... |
616edaf8c55c6fdc8baf6dbf856f7cfb | Prove that lichen content_filter works on observations | [
{
"docid": "7fdcd05bc4dae688eca4f9e49f7ce2fa",
"score": "0.5946552",
"text": "def test_index_with_lichen_filter_only_lichens\n user = users(:lichenologist)\n\n login(user.name)\n get(:index)\n\n results = @controller.instance_variable_get(:@objects)\n\n assert(results.many?)\n assert(r... | [
{
"docid": "4ce2c14fb4f2b855ae080d6378c77880",
"score": "0.6694706",
"text": "def test_observations_with_lichen_filter\n login(users(:lichenologist).name)\n get_with_dump(:list_observations)\n results = @controller.instance_variable_get(\"@objects\")\n\n assert(results.count.positive?)\n ... |
a113b0cc45806770ac38f3958a253b84 | DELETE /vendas/1 DELETE /vendas/1.json | [
{
"docid": "cfab189947e30316b7826feb0bf6594e",
"score": "0.0",
"text": "def destroy\n @pagamento.destroy\n respond_to do |format|\n format.html { redirect_to cliente_venda_path(@cliente, @venda), notice: 'O pagamento foi excluído!' }\n format.json { head :no_content }\n end\n end",
... | [
{
"docid": "179ff0053e8f4f967cb3d92206094cf0",
"score": "0.753535",
"text": "def delete_aos_version(args = {}) \n delete(\"/aosversions.json/#{args[:aosVersionId]}\", args)\nend",
"title": ""
},
{
"docid": "aaeb42adf04af87120a97218a0852aa1",
"score": "0.74786395",
"text": "def destro... |
62758283f492c5c7b8ef7603cefc5625 | Most objects are the same and get passed to write_object But Strings and BinaryCode write out binary, so they have different methods (for now) | [
{
"docid": "566efaacb27a8b2a86bcb4a379badca1",
"score": "0.70303726",
"text": "def write_any_out(obj)\n case obj\n when Parfait::Word, Symbol\n write_String obj\n when Parfait::BinaryCode\n write_BinaryCode( obj )\n when Parfait::ReturnAddress\n write_return_addr... | [
{
"docid": "58ec2d38c30f5a2fa7636c1b66db71d4",
"score": "0.7595865",
"text": "def write_bin(obj)\n end",
"title": ""
},
{
"docid": "20cc64e2487c9bb4d040d524b8524a18",
"score": "0.7351454",
"text": "def _write(obj)\n obj.Write()\n end",
"title": ""
},
... |
1182f5c492b5984835875efd1f4f7231 | Return the number of dead tracks | [
{
"docid": "39e1c9bf7e8e7a441b08a940fac7c17c",
"score": "0.90659004",
"text": "def count_dead_tracks \n @dead_track_list.length\n end",
"title": ""
}
] | [
{
"docid": "7b26c60b42747d575d8cd22bd4c745d9",
"score": "0.7729222",
"text": "def track_count\n return @tracks.length\n end",
"title": ""
},
{
"docid": "59b1280abda3006d20054dacedfed1f6",
"score": "0.7510872",
"text": "def track_count\n self.tracks.count\n end",
"ti... |
4e904ff94c149cfd48dfbd354e9eee5d | list my favorite pets | [
{
"docid": "d4ae945bd489b7a9156c874a140d6d7b",
"score": "0.74751973",
"text": "def show_favorite_pets\n \t\tif self.reload.favorite_pets.empty? == true\n \t\t\tputs \"You have not favorited any pets\"\n \t\t\tputs\n\t \t\t67.times do print \"*\" end \n\t\t\tputs\n \t\t\tself.present_options\n \t\t... | [
{
"docid": "fe43601d452d0bd09109cbfa94c548fe",
"score": "0.71572566",
"text": "def list_pets\n\t\tfishes = pets[:fishes].count\n\t\tdogs = pets[:dogs].count\n\t\tcats = pets[:cats].count\n\t\treturn \"I have #{fishes} fish, #{dogs} dog(s), and #{cats} cat(s).\"\n\tend",
"title": ""
},
{
"doc... |
baefa0e8afcbe42f2ea6ef38020c9439 | Called from Bunny Thread Pool. Will create message object from provided bunny data and dispatch message to connection. | [
{
"docid": "c45149918e76fc7dd36f35bcecab0f2b",
"score": "0.0",
"text": "def call(info, metadata, payload)\n dispatcher.dispatch Message.new(connection, info, metadata, payload, route)\n rescue => error\n log(:error) { \"Error received within subscribe handler: #{error.inspect}\\n#{error.bac... | [
{
"docid": "b292014f685ddf2fdc71baae22ffd17a",
"score": "0.6324966",
"text": "def init_bunny\n opts = {\n read_timeout: 10,\n heartbeat: 10,\n host: config.rabbitmq.host\n }\n bunny = Bunny.new(opts)\n bunny.start\n bunny_channel = bunny.create_channel\n ... |
6d0a9b3a55fbac5a940668ecd9fb2e05 | Connect a cable from this interface to another interface. | [
{
"docid": "b6dd1ce86be17079a1f11c06ddb8f07d",
"score": "0.6832217",
"text": "def connect_to(other_end)\n @other_end = other_end\n in_chan = Agent.channel!(Layer2Packet, 1000, name: \"in_#{@mac_address}\")\n out_chan = Agent.channel!(Layer2Packet, 1000, name: \"out_#{@mac_address}\")\n\n # T... | [
{
"docid": "5f325600b60b902c2ee629ad6defe430",
"score": "0.70758814",
"text": "def connect_device\n @interface.connect_device @device_port.text\n end",
"title": ""
},
{
"docid": "d89af29ccf61c0b2617ccbdab28309d8",
"score": "0.65834343",
"text": "def connect(from, to)\n @... |
8405aebebf8184563c31277575e27641 | Converts Output instance to a hash suitable for placement into workitem.fields. | [
{
"docid": "205544b9b035bd05560454add870dec8",
"score": "0.0",
"text": "def to_hash\n if value?\n {:value => @value}\n else\n {:fields => @fields}\n end\n end",
"title": ""
}
] | [
{
"docid": "7b80a5cd34b3ff10c045a4c7d8274bff",
"score": "0.7460764",
"text": "def output_hash; end",
"title": ""
},
{
"docid": "7b80a5cd34b3ff10c045a4c7d8274bff",
"score": "0.7460764",
"text": "def output_hash; end",
"title": ""
},
{
"docid": "b0d9269de09c3b0d6ada544161bf... |
d84c348c7c9de731db3463bf3d8b3e10 | For a catalog that supports multiple languages, generates a form group with N form fields (one field per supported language). The label is displayed once, and the locale (e.g. "fr") is prefixed to each input. If the catalog only supports one language, builds a single field as if the default form helper was called. | [
{
"docid": "7321de8fa78cae7991117ef7a7b4d17d",
"score": "0.7093544",
"text": "def locale_form_group(form, method, builder_method, *args)\n options = args.extract_options!\n locales = form.object.catalog.valid_locales\n group_label = options.delete(:hide_label) ? nil : { text: options[:label] } ... | [
{
"docid": "c3a3e9562253e911e583a8da09d585a5",
"score": "0.6370265",
"text": "def locale_fields(name, block)\n ::I18n.available_locales.map do |locale|\n translation = object.translation_for(locale)\n translation.instance_variable_set(:@errors, object.errors) if locale == I18n.d... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "a280245a260cd1283eca6bfbdf96923b",
"score": "0.0",
"text": "def set_article\n @article = Article.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.60310465",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.60152966",
"text": "d... |
abbd2bc75aa3fd162fd56ef0b3760561 | POST /url_shorts POST /url_shorts.json | [
{
"docid": "2435246321d35efea7b2e7a86b57cb12",
"score": "0.6682166",
"text": "def create\n @url_short = UrlShort.new(url_short_params)\n # if @url_short.short_url.blank?\n # url_shorten = UrlShort.find_by_original_url(@url_short.original_url)\n # render json: {url_short: \"#{request.base... | [
{
"docid": "3480bf93a3f0f99d21addc40d32036ca",
"score": "0.76028675",
"text": "def create\n url = ShortenedUrl.find_by_long_url(shortened_urls_params[:long_url])\n \n if url\n render json: {shortUrl: url[:short_url]}\n else\n shortened_url = ShortenedUrl.new(shortened_urls_params)\... |
cd6017087be052b92f8907fbdc4cc59c | Setting TM_FOO to eg. `bundle exec foo` should be possible, too. | [
{
"docid": "1326d9e018de7b75326cbb4ce01f8a5d",
"score": "0.5403291",
"text": "def test_use_env_var_with_executable_with_spaces\n with_env('PATH' => \"#{__dir__}/fixtures/bin:#{ENV['PATH']}\", 'TM_SAMPLE' => 'sample-executable with options') do\n assert_equal %w(sample-executable with options), E... | [
{
"docid": "2d2665fee040526dc4e586747f95c4f0",
"score": "0.5266627",
"text": "def set_from_env_or_ask(sym, question)\n if ENV.has_key? sym.to_s.upcase then\n set sym, ENV[sym.to_s.upcase]\n else\n set sym do Capistrano::CLI.ui.ask question end\n end\nend",
"title": ""
},
{
"docid": ... |
5f2249e780edb5097c0980d7d71ea982 | writes a string to the Serial port | [
{
"docid": "38297327ec5a1d3d208cfaaefe7ad755",
"score": "0.7640681",
"text": "def write string\n command = \"%s%s\" % [string , @delimiter]\n grow_buffer command.length\n @buffer.write_string command\n Win32::WriteFile @serial, @buffer, command.length, @count, nil\n @error = Win32.error_... | [
{
"docid": "a5f14df2357f641b37ee7c15a1bdc906",
"score": "0.89528865",
"text": "def serial_port_write(text)\n @serial_port.write( text )\n end",
"title": ""
},
{
"docid": "737e9bcb6120448a85300bb685de2249",
"score": "0.8896933",
"text": "def serial_port_write(text)\n @serial_... |
ed83be86132a944b9e1305a0672b91ee | DELETE /taxon_determinations/1 DELETE /taxon_determinations/1.json | [
{
"docid": "187cc914ebd4b11b5377f441a4fd47ec",
"score": "0.81619287",
"text": "def destroy\n @taxon_determination.destroy\n respond_to do |format|\n format.html { redirect_to taxon_determinations_url }\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "31966e714a0b5ae45ee32795e1595e40",
"score": "0.75303304",
"text": "def destroy\n @taxon = Taxon.find(params[:id])\n @taxon.destroy\n\n respond_to do |format|\n format.html { redirect_to taxons_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
... |
a82d9fa426c0cd1501dbd53e7d3d4491 | Adapted from escape gem | [
{
"docid": "1c91a833e371bf9c6c1009f29e12ad61",
"score": "0.0",
"text": "def shell_escape *words\n words.map do |word|\n if word.empty?\n \"''\"\n elsif %r{\\A[0-9A-Za-z+,./:=@_-]+\\z} =~ word\n word\n else\n word.scan(/('+)|[^']+/).map do\n ... | [
{
"docid": "2f290bfcd8874e39a588535a074adfe9",
"score": "0.8456174",
"text": "def escape(s); end",
"title": ""
},
{
"docid": "2f290bfcd8874e39a588535a074adfe9",
"score": "0.8456174",
"text": "def escape(s); end",
"title": ""
},
{
"docid": "2f290bfcd8874e39a588535a074adfe9... |
4a752430996781fd482ec491d135bf1c | generalize to arbitrary number of individual scores: | [
{
"docid": "71a3acba852cc50b878826ed5c99b2c5",
"score": "0.648492",
"text": "def get_grade(*scores)\n letter_grade(scores.reduce(&:+) / scores.size)\nend",
"title": ""
}
] | [
{
"docid": "6a981ca5a21a3e3b0b61fedb2e44bf61",
"score": "0.7083771",
"text": "def scores(questions); end",
"title": ""
},
{
"docid": "cb32144f99b7694b40be991a75e4eaf6",
"score": "0.6807201",
"text": "def score_one\n if how_many? > 5\n @score += 2000\n elsif how_many? > 2\n... |
3ab9baf4a13d8320ba9e907c80699a88 | If the record count for a product is more than one Return true to display different HTML markup | [
{
"docid": "a0c73f75229e45f0c7f185f35520f58e",
"score": "0.0",
"text": "def range_price\n count.nil? || count < 2 ? false : true\n end",
"title": ""
}
] | [
{
"docid": "d25072a6f5de3f8fcbbaa705153f99f4",
"score": "0.65686333",
"text": "def products_count_checking(user)\n\tpricing_count=user.store_owner.pricing_plan.no_of_products\n\tproducts_count=Product.where(:domain_url=>user.domain_url,:deleted_at=>nil).length\n\tif pricing_count>products_count\n\tretur... |
e561e11bcf379ef5dc139c210017366b | Only allow a list of trusted parameters through. | [
{
"docid": "d1ca2e64278b659f79533a7bff4a72f1",
"score": "0.0",
"text": "def machine_in_section_params\n params.require(:machine_in_section).permit(:machine_id, :section_id)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.74768823",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "36956168ba2889cff7bf17d9f1db41b8",
"score": "0.71700543",
"text": "def set_param_whitelist(*param_list)\n self.param_whitelist... |
8e0cb4a85b1328ee10a045e70f3c64e7 | Don't render the response in a layout for XHR requests | [
{
"docid": "65db042dea70d51ad489ad101cffa3a7",
"score": "0.6261246",
"text": "def layout?\n if request.xhr?\n return false\n else\n return 'admin'\n end\n end",
"title": ""
}
] | [
{
"docid": "3965ae518fa9b04f784ab93752e2535b",
"score": "0.73070514",
"text": "def render(options = nil, extra_options = {}, &block)\n if request.headers['X-PJAX'] == 'true'\n options = {} if options.nil?\n options[:layout] = false \n end\n super(options, extra_options, &blo... |
94083bf6c68d251e52f348f9ed93ee5d | Path to the user's peruser NGINX pid file | [
{
"docid": "2a1f5fd5e7a28fbff0e8162cf9275923",
"score": "0.78352815",
"text": "def pid_path\n NginxStage.pun_pid_path(user: user)\n end",
"title": ""
}
] | [
{
"docid": "e9da06e4e38960054dd9b748a70aaffa",
"score": "0.7697302",
"text": "def pid_file\n @pid_file ||= \"#{@config[:pid_path]}/#{DAEMON_NAME}.#{@config[:port]}.pid\"\n end",
"title": ""
},
{
"docid": "1771d0b93d30543547b3cfe862d6950d",
"score": "0.7689054",
"text": "def p... |
c04368cc624109408773fd82c0cf033a | get a project application by its id | [
{
"docid": "1b242ef476b9a2b342ac0d3a567dcc3b",
"score": "0.0",
"text": "def show\n respond_to do |format|\n format.json {\n\n @project_application = ProjectApplication.find_by_id(params[:id])\n\n if @project_application\n render :json =>... | [
{
"docid": "7a717896a8105f7c13a41e4a7900e4c5",
"score": "0.8047782",
"text": "def app_by_id(id)\n get(\"/apps/#{id}\")\n end",
"title": ""
},
{
"docid": "56113e5115caff56924db32acb2eff58",
"score": "0.7923419",
"text": "def get id\n apps.select do |app|\n app.... |
7f35eddc60c5a4f9e40b0817afee2e78 | The message notification works with an underlying item (likely an activity log implementation) Handle getting the item and use of the actual class referenced in the item_type / item_id attributes | [
{
"docid": "cebb6e8c2be86e38f3e481731f6a047d",
"score": "0.55841887",
"text": "def item\n @item ||= item_class.where(id: item_id).first if item_class\n end",
"title": ""
}
] | [
{
"docid": "91225e1f602840525b0b71819f0cd4bf",
"score": "0.6233814",
"text": "def item\n item_type.name.classify.constantize.find(item_id)\n end",
"title": ""
},
{
"docid": "827ca203e5942eed64273d9a5f15c387",
"score": "0.6125792",
"text": "def notification(data)\n type = dat... |
8ed00556d4122e3eccfd9b5389522ebd | PUT /users/1 PUT /users/1.json | [
{
"docid": "65edc1b69eaf527dec1888a285681b23",
"score": "0.6283804",
"text": "def update\n @user = User.find(params[:id])\n \n respond_to do |format|\n if @user.update_attributes(params[:user])\n format.html { redirect_to @user, :notice => 'User was successfully updated.' }\n fo... | [
{
"docid": "4781fa7337315133553edb54194e6202",
"score": "0.7411248",
"text": "def update\n render json: Users.update(params[\"id\"], params[\"user\"])\n end",
"title": ""
},
{
"docid": "23a904e6ddd4b6b07c4b53353e78cf93",
"score": "0.7391216",
"text": "def update\n render json:... |
04fbca1ccbff131a35642ce49d4abc09 | Returns a string representation of this binary tree. | [
{
"docid": "d81291cbdb02851c5bcfcc43ed8c3c04",
"score": "0.64917123",
"text": "def to_s(node = @root, prefix = \"\", left_side = true)\n string = \"\"\n\n if node.right\n string += to_s(node.right, prefix + (left_side ? \"│ \" : \" \"), false)\n end\n\n string += prefix + (left_sid... | [
{
"docid": "250f9b5b5787f4235183e9ed7b97dc10",
"score": "0.83957034",
"text": "def to_s\n root.to_tree_s\n end",
"title": ""
},
{
"docid": "0e4ca35fff1e362ede75c9ecc5c436cc",
"score": "0.8099907",
"text": "def to_string_tree\n if ((@children).nil? || (@children.size).equ... |
b7931728ec0850fd083a8d92e50763ab | This function adds the locale params in the url | [
{
"docid": "6f3d65c52b0a46a6e5e57b834e83bf46",
"score": "0.66717505",
"text": "def default_url_options(options={})\n { :locale => I18n.locale }\n end",
"title": ""
}
] | [
{
"docid": "101e01653e728fb8c9d168098a1a8e90",
"score": "0.81902796",
"text": "def url(*args)\n params = args.extract_options!\n params[:lang] = I18n.locale\n args << params\n super(*args)\n end",
"title": ""
},
{
"docid": "aa6f71c57d684a287cd83a189... |
f313f0f59d028b23a46e9ff9b36f3d82 | POST /good_orders POST /good_orders.json | [
{
"docid": "93068c4c461ee233d258a81e67f936c6",
"score": "0.0",
"text": "def create\n @good_order = GoodOrder.new(good_order_params)\n\n respond_to do |format|\n if @good_order.good.minimum_quantity > @good_order.digit\n\t @good_order.errors.add(:digit, message: \"Больше чем #{@good_order.g... | [
{
"docid": "ee8d8e8e024d35ee13910acc551b370b",
"score": "0.7012262",
"text": "def create_order\n post_request \"orders\"\n end",
"title": ""
},
{
"docid": "845035633d004ad773ad8d0df67d69fd",
"score": "0.67821544",
"text": "def create\n response = Unirest.post(\"http://loca... |
58d74ce48b990b54a8e6cd13d7688fb9 | Log the user out | [
{
"docid": "6d06f8114b253261fce836dc21f5ec18",
"score": "0.0",
"text": "def destroy\n cookies.delete :web_session_token\n reset_session\n redirect_to root_path\n end",
"title": ""
}
] | [
{
"docid": "2bb0c1121180dfb5d3fdb5444ec1e019",
"score": "0.8740279",
"text": "def log_out\n\t\tforget(current_user) #call user.forget\n\t\tsession.delete(:user_id)\n\t\t@current_user = nil\n\tend",
"title": ""
},
{
"docid": "d91844e2605d26fe6815fa000431e4cb",
"score": "0.8721683",
"t... |
bf28b72ea316b3a46b67a6b83e74db0c | The create_notify method will look to see if members have been assigned to the Group. For each email address that has nil user record, this method will create a new User record for the requested member. The new user will be notified of their new account. Each newly created user will be associated with the current group... | [
{
"docid": "1bd0de2af9a585b36094e9f2525ad654",
"score": "0.7865129",
"text": "def create_notify\n member_list = lookup_users\n if member_list.present?\n plen = 12\n\n member_list.each do |member, user|\n if user.nil?\n # Create a new user\n new_password = Devise.... | [
{
"docid": "03ff2b9df70ca3f3a62a8a71355f299d",
"score": "0.7513477",
"text": "def create_invitation_or_group_member\n newly_added = @valid_mails - @existing_mails\n\n # checks for every newly added mail if the user exists or not\n newly_added.each do |email|\n user = User.find_by(e... |
3b663c36abff775cfa6d0ff945c93a56 | Set video_id for a given regexp and index of match result | [
{
"docid": "1b6cab5e1fddc33e07c893dfa669271a",
"score": "0.7568799",
"text": "def parse_video_id_for_regexp_and_index(regexp, index)\n match_result = self.url.match(regexp)\n return match_result[index] if !!match_result\n end",
"title": ""
}
] | [
{
"docid": "d8f1a5608460911d9ebd13061035ba21",
"score": "0.6204636",
"text": "def parse_video_id_for_vimeo\n parse_video_id_for_regexp_and_index(VIMEO_REGEXP, 4)\n end",
"title": ""
},
{
"docid": "867b5641a4d9ace552e516ca2a9b12ac",
"score": "0.6068198",
"text": "def parse_vid... |
17ef0fd2f3020bccddf3d3cf334b1932 | GET /form_calculations/1 GET /form_calculations/1.json | [
{
"docid": "d447b15ca64a457abe09d621f8bae676",
"score": "0.7313407",
"text": "def show\n @form_calculation = FormCalculation.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @form_calculation }\n end\n end",
"title": ""
}
] | [
{
"docid": "037014a1b667bc0f5274a72103810bf0",
"score": "0.7314497",
"text": "def new\n @form_calculation = FormCalculation.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @form_calculation }\n end\n end",
"title": ""
},
{
"docid":... |
a54b2ab0d6805c38df758693c795873a | even if there are not the expected number of args, a proc would not care and will not give an error like a lambda would Procs and lambdas also handle return differently A lambda will return normally, like regular method (like anonymous function. Block with a name lambda) Procs return from the method enclosing the proc | [
{
"docid": "45973c7305173c22044dad3903237d9e",
"score": "0.6240015",
"text": "def test_procs_and_lambdas\n yield\n puts \"hello\"\nend",
"title": ""
}
] | [
{
"docid": "4dc399252e53abe0c47f37fdb717d7d0",
"score": "0.7807092",
"text": "def proc_lamda_dif_one\n p = Proc.new { |num1, num2| \n num3= num1+num2 \n puts \"\\nProc executes even if it has less or more number of parameters\\n\"\n } \n p.call 50, 55, 60\n\n print \"\\n\\nFollowing Error with... |
ee09b66f7d77e4b5eff3942e4d975469 | allows us to change the information, this is the writer | [
{
"docid": "22178b89ff46992d951da1ede502f094",
"score": "0.0",
"text": "def initialize(name, owner)\n @name = name\n @owner = owner\n @mood = \"nervous\"\n @@all << self\n end",
"title": ""
}
] | [
{
"docid": "7b05a27fe0243a88a10b5f3f957bdd92",
"score": "0.6902352",
"text": "def write; end",
"title": ""
},
{
"docid": "7b05a27fe0243a88a10b5f3f957bdd92",
"score": "0.6902352",
"text": "def write; end",
"title": ""
},
{
"docid": "7b05a27fe0243a88a10b5f3f957bdd92",
"... |
d4050942decf1bee2864142bbddbb9bd | PUT /kolegijs/1 PUT /kolegijs/1.json | [
{
"docid": "b1417d8b74b9a87ba59dbccee32d8a83",
"score": "0.6538909",
"text": "def update\n @kolegij = Kolegij.find(params[:id])\n\n respond_to do |format|\n if @kolegij.update_attributes(params[:kolegij])\n format.html { redirect_to @kolegij, notice: 'Kolegij was successfully updated.'... | [
{
"docid": "aa63278f3d39685690519631b750f52f",
"score": "0.6640388",
"text": "def update\n @kolegiji = Kolegiji.find(params[:id])\n\n respond_to do |format|\n if @kolegiji.update_attributes(params[:kolegiji])\n format.html { redirect_to @kolegiji, notice: 'Kolegiji was successfully upd... |
34aa66cee9d16cef527ef79bed572d07 | Returns a random hex string that matches an HTML color value. | [
{
"docid": "409acb6905ca910bd648e1de91e590ef",
"score": "0.8006974",
"text": "def random_hex_color\n \"#\"+(\"%06x\" % (rand * 0xffffff)).upcase\n end",
"title": ""
}
] | [
{
"docid": "5a7f593ed5d66e3d680a24ffeee211bc",
"score": "0.82060826",
"text": "def get_a_color\n color = '%06x' % (rand * 0xffffff)\n color = '#' + color\n color\n end",
"title": ""
},
{
"docid": "6ad611e87330cd11d2bbed0a209f9bfc",
"score": "0.808871",
"text": "def random_c... |
f0b8ccfb8cb612fc37a22f164c59d99a | DELETE /table/menus/1 DELETE /table/menus/1.json | [
{
"docid": "a75b3b20ac77d0534f6f43257b22fa23",
"score": "0.7238627",
"text": "def destroy\n @table_menu = Table::Menu.find(params[:id])\n @table_menu.destroy\n\n respond_to do |format|\n format.html { redirect_to table_menus_url }\n format.json { head :no_content }\n end\n end",
... | [
{
"docid": "6f58ca1123fb33b2d7fb46cf37068862",
"score": "0.67253745",
"text": "def destroy\n # Test this query on rail console for menu section that has food\n ActiveRecord::Base.connection.exec_query(\n \"DELETE FROM menu_sections\n WHERE url_id = #{params[:id]}\n ... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "5633d776cb06d77180f5c9609d90ec27",
"score": "0.0",
"text": "def set_household_member\n @household_member = HouseholdMember.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;... |
53543bef5ea67b4259dcf29eee73d8ac | PATCH/PUT /destinations/1 PATCH/PUT /destinations/1.json | [
{
"docid": "5c2bdd364d26d804345cc625378a756f",
"score": "0.66071796",
"text": "def update\n @destination = Destination.find(params[:id])\n\n if @destination.update(params[:destination])\n head :no_content\n else\n render json: @destination.errors, status: :unprocessable_entity\n en... | [
{
"docid": "b003a9eb2bd3970b9cd3bf9f79ea3da8",
"score": "0.7154418",
"text": "def update\n itinerary = Itinerary.find(params[:id])\n\n respond_to do |format|\n if itinerary.update_attributes(params[:itinerary])\n itinerary.destinations.delete_all\n params[:destinations].each { |... |
f847b4b174f6c5237b5261ef91596b87 | proc goes like lambda | [
{
"docid": "c5f86ef8ad7b855762c9768fa04e8a87",
"score": "0.63669467",
"text": "def test_from_deprecated_proc\n l = proc { return 99 }\n res = l.call\n raise \"proc returned incorrect #{res}\" unless res == 99\n return 88 # return something different from the lambda\nend",
"title": ""
}
] | [
{
"docid": "0190890ecf2172d2578493635fa8653c",
"score": "0.75697553",
"text": "def lambda; end",
"title": ""
},
{
"docid": "fbc94c3c13440b043fae550b20879bdc",
"score": "0.73270863",
"text": "def to_proc\n lambda do |*args|\n call(*args)\n end\n end",
"title": ... |
8038cb8a7e0dc2c0d9e1ddb308aae4b4 | This method launches our Spawnable within the specified time limit. It tells the spawnable to start, and starts the timer when enabled. It starts the piped streams to enable copying of spawn stream contents to standard streams. | [
{
"docid": "2fdcb4736589ccc0012ff380f99fbf15",
"score": "0.6579276",
"text": "def start\n # Start the spawnable and timer if needed\n @spawnable.start();\n if (@timer != nil)\n @timer.startTimer();\n end\n\n # Starting the piped streams and StreamPiper objects\n @systemOut = Pipe.... | [
{
"docid": "4af64051d90a9c871c980e549e999e1e",
"score": "0.5674371",
"text": "def startPipingToStandardOut() \n self.synchronized do\n @pipingPaused = false;\n end\n end",
"title": ""
},
{
"docid": "698fc1736b4fae03ed6f2f30269c2628",
"score": "0.56396115",
"text": "def sp... |
5e483a271932dd1865cc20469f6fac6d | GET /transactions/1 GET /transactions/1.json | [
{
"docid": "ea7a0f5e6d3b8e06e1163e5bf4b20672",
"score": "0.67692447",
"text": "def show\n @title = t('view.transactions.show_title')\n @transaction = Transaction.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @transaction }\n ... | [
{
"docid": "8c881930159a0e4227bb5dead3cb4e4c",
"score": "0.7966354",
"text": "def transactions(params = {})\n request(:get, '/transactions', params)\n end",
"title": ""
},
{
"docid": "6c8d0bb89b3254ce41f23ee95c5e6976",
"score": "0.7854261",
"text": "def index\n json_respon... |
f33b78b5ef4f8e5cc2bfe79308d25ab2 | resource "openrtm" do url " sha256 "601e45ccc49ab2099d8bb6c01ae4b2cf7da79422c96b7e00f68b9492438852b1" end def install virtualenv_install_with_resources end | [
{
"docid": "a2b8c228bdbc2d53964da4ae519fde3b",
"score": "0.0",
"text": "def install\n # system \"python\", *Language::Python.setup_install_args(prefix)\n # system \"./configure\", \"--prefix=#{prefix}\"\n system \"python\", \"setup.py\", \"build\"\n system \"python\", \"setup.py\", \"--no-us... | [
{
"docid": "20f83d366b667bd48dfd657d41d74919",
"score": "0.74893796",
"text": "def install\n virtualenv_install_with_resources\n end",
"title": ""
},
{
"docid": "53cb62ccd15f879b4caaf26bd290f9e4",
"score": "0.6529663",
"text": "def install_virtualenv\n # This space left ... |
ef18c905580a47ee737f714aa55140b5 | Compliance tool search & full list action | [
{
"docid": "ad1a5a583514694865b37d3673c9db7f",
"score": "0.0",
"text": "def search_query\n query = @grouping_class.new(sanitized_attributes, params)\n data = query.run\n @search_data = Rails.cache.fetch(['search_data', params], expires_in: 1.week) do\n query.build_hash(dat... | [
{
"docid": "61bd97fa9eddad78e4d7ea28316bba77",
"score": "0.6558568",
"text": "def search; end",
"title": ""
},
{
"docid": "2639b522c4b5910cbbb9e450f0366692",
"score": "0.6487196",
"text": "def showList() \t\n\t\t@searchSuggestionList\t\n\tend",
"title": ""
},
{
"docid": ... |
fb059c752ce829ec2a0dd30be3f35107 | Fails unless +obj+ is nil | [
{
"docid": "cac0a3c678e031e314feb642fe7e1a60",
"score": "0.70109975",
"text": "def assert_nil obj, msg = nil\n msg = message(msg) { \"Expected #{mu_pp(obj)} to be nil\" }\n assert obj.nil?, msg\n end",
"title": ""
}
] | [
{
"docid": "a4d45b053ca81319b144687a8ce39259",
"score": "0.7383496",
"text": "def refute_nil obj, msg = nil\n msg = message(msg) { \"Expected #{mu_pp(obj)} to not be nil\" }\n refute obj.nil?, msg\n end",
"title": ""
},
{
"docid": "a4d45b053ca81319b144687a8ce39259",
"score":... |
15907e551aac2559d3e305f39fbce027 | Identifies the softlayer cloud === Return true:: If the softlayer cloud can be identified false:: Otherwise | [
{
"docid": "951f46c9c4d7d69e6f919aacfc09ee43",
"score": "0.70455915",
"text": "def looks_like_softlayer?\n hint?(\"softlayer\")\n end",
"title": ""
}
] | [
{
"docid": "1232867e2fe73e22527c975add0db5cc",
"score": "0.73525435",
"text": "def cloud?\n self.automatic.has_key?(:cloud)\n end",
"title": ""
},
{
"docid": "eea7e61cadfe69806e6146007bb286c1",
"score": "0.7064707",
"text": "def looks_like_softlayer?\n hint?('softlayer')\n... |
5e24abe0fe83191e11a424f8f087b102 | Get a temporary file name from an existing one, keeping its extension Parameters:: file_name (_String_): Original file name _Block_: Block called with the temporary file name: Parameters:: temp_file_name (_String_): Temporary file name | [
{
"docid": "c57d794e1229dc110504f6155a3bc2bd",
"score": "0.0",
"text": "def prepare_temp_file(file_name)\n temp_file_name = \"#{Dir.tmpdir}/FilesHunterTest/#{File.basename(file_name)}\"\n FileUtils::mkdir_p(File.dirname(temp_file_name))\n yield(temp_file_name)\n end",
"title": ""
... | [
{
"docid": "19b0b900266414e2e835abd8d717f2f1",
"score": "0.7046738",
"text": "def _get_tmp_filename(name)\n file = Tempfile.new(name.to_s)\n retval = file.path\n file.close\n file.unlink\n return retval\n end",
"title": ""
},
{
"docid": "ab1fc95d5fa8d835ec023daa2f6fb1a4",
... |
a316f0f1fc736ad38a7eefabc2d72dfc | Set the initial positions of the cars | [
{
"docid": "f122bec6932d033eb11ffc11dc4faa83",
"score": "0.61433256",
"text": "def align_cars\n @cars = Array.new(@num_teams) do |i|\n position = -100*i*(i+1)\n top_speed = (150 + 10*(i+1)) * 5.0/18 # meter per second\n acceleration = 2*(i+1)\n hf = 0.8\n\n Car.new(position, ... | [
{
"docid": "cb7ad1e9cab7a6a530563e70ebabb31b",
"score": "0.6587811",
"text": "def initial_positions(init_poss)\n @moons.each { |moon| moon.position = init_poss.shift }\n end",
"title": ""
},
{
"docid": "dee5af12b35806ec59f6129a888c2929",
"score": "0.6368088",
"text": "def set_ini... |
5ef4ec28bbe094cf525f50976caebfed | POST /captchas POST /captchas.json | [
{
"docid": "5b9dfbce1e6654622ec237cc03434edc",
"score": "0.54936826",
"text": "def create\n @captcha = Captcha.new(params[:captcha])\n\n respond_to do |format|\n if @captcha.save\n format.html { redirect_to @captcha, notice: 'Captcha was successfully created.' }\n format.json { ... | [
{
"docid": "458f26bff40107711eb33ed3cbd0b4f3",
"score": "0.6116517",
"text": "def create\n @captura = Captura.new(params[:captura])\n\n respond_to do |format|\n if @captura.save\n format.html { redirect_to @captura, notice: 'Captura was successfully created.' }\n format.json { r... |
b5ea44b6398c2fa297b70052c3eb790d | Generate either by.repeater or by.exactRepeater | [
{
"docid": "3493f95dd398c1a277019b72616557ac",
"score": "0.0",
"text": "def initialize opts={}\n exact = opts.fetch(:exact)\n raise \"#{exact} is not a valid value\" unless [true, false].include?(exact)\n repeat_descriptor = opts.fetch(:repeat_descriptor)\n raise \"#{repeat_descripto... | [
{
"docid": "2f45377592dac2bcf8cec5d50d13cc7c",
"score": "0.63029283",
"text": "def process\n # findRepeaterElement - (repeater, exact, index, binding, using, rootSelector) - by.repeater('baz in days').row(0).column('b') - [baz in days, false, 0, b, null, body]\n # findRepeaterRows - (... |
7b8863bb5d4336537a7e260340099d44 | DELETE /sensor_actions/1 DELETE /sensor_actions/1.json | [
{
"docid": "b7646e661aafb394b23a9a71dced2889",
"score": "0.7397151",
"text": "def destroy\n @sensor_action.destroy\n respond_to do |format|\n format.html { redirect_to sensor_actions_url, notice: 'Sensor action was successfully destroyed.' }\n format.json { head :no_content }\n end\n ... | [
{
"docid": "7ca7e8ba9bdfdf617b6cbfda6d8cca1d",
"score": "0.7052115",
"text": "def delete\n ruta = \"/actions/#{id}\"\n client.delete(ruta)\n end",
"title": ""
},
{
"docid": "3423c867cdcb9968298dbee2512cd7ef",
"score": "0.7042408",
"text": "def destroy\n sensor = @sens... |
1d6b471f3fb328ead2bce22a5981fd67 | install file src of known type | [
{
"docid": "5b3036ce1784fbae050794d8ac35fb91",
"score": "0.7751777",
"text": "def installFile_Type(src, type, opts ={})\n if INSTALL_DIR.has_key?(type)\n installFile src, INSTALL_DIR[type], opts\n else\n raise \"Don't know how to install file '#{src}' of type '#{type}'\"\n end\nend",
"title... | [
{
"docid": "b49cf64dc3b8f112b98e40348ec853c4",
"score": "0.70917815",
"text": "def install_custom!\n remote_file local_path do\n source new_resource.source.to_s\n checksum new_resource.checksum unless new_resource.checksum.nil?\n end\n dpkg_package local_... |
a0748a32895087286b7b3c36a5673e83 | stalking_options This directive determines which service states "stalking" is enabled for. Valid options are a combination of one or more of the following: o = stalk on OK states, w = stalk on WARNING states, u = stalk on UNKNOWN states, c = stalk on CRITICAL states. More information on state stalking can be found here... | [
{
"docid": "0fe5b4fadd18b1905c8ec8013fc8dd79",
"score": "0.7757075",
"text": "def stalking_options=(arg)\n @stalking_options = check_state_options(arg, %w(o w u c), 'stalking_options')\n end",
"title": ""
}
] | [
{
"docid": "b8ca3c4201ef7e07b5c48f4c1b0b7acc",
"score": "0.7628888",
"text": "def stalking_options=(arg)\n @stalking_options = check_state_options(arg, %w(o d u), 'stalking_options')\n end",
"title": ""
},
{
"docid": "e48dfec4d45855048cdbc93a6b627c08",
"score": "0.49970922",
... |
9ca987d68f752b3feaa2df69cdc3332e | took from the solution page | [
{
"docid": "ec36b3bef0945828a4899d99c2ddc01f",
"score": "0.0",
"text": "def time_string\n\t\thours = @seconds/3600\n\t\tremainder = @seconds%3600\n\t\tsprintf(\"%02d:%02d:%02d\", hours, remainder/60, remainder%60)\n\tend",
"title": ""
}
] | [
{
"docid": "0ca6103b0871aec6eb1b1507a0b276fe",
"score": "0.72763854",
"text": "def solution\n end",
"title": ""
},
{
"docid": "ccc431d77b5853107eff97c936b569ce",
"score": "0.66526145",
"text": "def solution\n raise \"#solution unimplemented in #{self.class.name}\"\n end",
... |
a64f72c475804c2fb6c58dac5b6a3a2e | authenticate_tenant! authorization & tenant setup authenticates user sets current tenant | [
{
"docid": "fba7b6c9ec6af5d7934febfe861378f9",
"score": "0.7952016",
"text": "def authenticate_tenant!\n unless current_user.present? || authenticate_user!(force: true)\n email = ( params.nil? || params[:user].nil? ? \"<email missing>\" : params[:user][:email] )\n flash[:error] = \"canno... | [
{
"docid": "483997966f97173b30c38b4fca429e96",
"score": "0.75449044",
"text": "def set_tenant_and_account\n @account = current_user.account\n set_current_tenant @account\n end",
"title": ""
},
{
"docid": "20ee5bb1885dff39c6b4ac9e26f081ed",
"score": "0.7436659",
"text": "... |
2d4dca503813852badeb3f68530d5872 | GET /in_stocks/new GET /in_stocks/new.json | [
{
"docid": "e72160ef0faaed079e5bb4c82aa0f1a6",
"score": "0.8227563",
"text": "def new\n @in_stock = InStock.create\n @items=@in_stock.in_stock_items\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @in_stock }\n end\n end",
"title": ""
}
] | [
{
"docid": "b6eb3f2715fb13111812710f7507ac51",
"score": "0.81413716",
"text": "def new\n @stock = Stock.new\n \n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @stock }\n end\n end",
"title": ""
},
{
"docid": "91caa6f84cc5d10a9901a50c2... |
5b4937b192fd1fb26440a45e37f4d70c | Retrieves the bottom line of a product | [
{
"docid": "c2a87b7a62d8872a6fc859fad592630e",
"score": "0.7682335",
"text": "def get_product_bottom_line(params, headers = {})\n app_key = params[:app_key]\n sku = params[:product_id]\n get(\"/products/#{app_key}/#{sku}/bottomline\", {}, headers)\n end",
"title": ""
}
] | [
{
"docid": "c2e00f48f98bc53ae7aa95272a1c7340",
"score": "0.68402183",
"text": "def bottom_line\n border_options ? super : nil\n end",
"title": ""
},
{
"docid": "a3ffc77f25f40fb560e18e6153057a7d",
"score": "0.66813844",
"text": "def border_bottom()\n return get_bo... |
e561e11bcf379ef5dc139c210017366b | Only allow a list of trusted parameters through. | [
{
"docid": "dcd6d6fd6933954461d42c5fe4f61c10",
"score": "0.0",
"text": "def team_params\n params.require(:team).permit(:name)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.74768823",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "36956168ba2889cff7bf17d9f1db41b8",
"score": "0.71700543",
"text": "def set_param_whitelist(*param_list)\n self.param_whitelist... |
82b0ee5a20002367f2311c439342a7bd | Format the Headers for a given request. | [
{
"docid": "a519d2b4113bfc23f6eace91ec393efb",
"score": "0.6617361",
"text": "def format_headers(tag, time, data)\n @headers\n end",
"title": ""
}
] | [
{
"docid": "0ec2305c29df153aa6f6a099a1b10425",
"score": "0.7429192",
"text": "def formatHeader(headers)\n headers.each() { |header|\n rxHeader = /^(.+): (.+)$/\n match = rxHeader.match(header)\n if match\n @headers[match[1]] = match[2]\n end\n }\n end",
... |
a7e5864e85ade93394b6ec7c477537c5 | this field is used for data export | [
{
"docid": "ae13f08733b2d1e2f2712b6d6303cd77",
"score": "0.0",
"text": "def export_id\n if members.empty?\n nil\n else\n members.first.external_id\n end\n end",
"title": ""
}
] | [
{
"docid": "82286d3cb7d296ced48173324d51ef7d",
"score": "0.6509086",
"text": "def export_data\n self\n end",
"title": ""
},
{
"docid": "313119f58ea20b3617836b3d30424176",
"score": "0.64960915",
"text": "def field; end",
"title": ""
},
{
"docid": "313119f58ea20b361... |
ae4d2cfbc8f8dbda0ea839aec5ef94bb | Calculates (and returns) the 'dBm', or 'dBmW' decibelmilliwatts, a power ratio in dB (decibels) of the (given) measured power referenced to one (1) milliwat (mW). This uses the audio/telephony usual 600 Ohm impedance. | [
{
"docid": "7d186611d661c65e15d47e356b0d75dd",
"score": "0.6704628",
"text": "def dBm(koef, v_n_1, v_n_2, n)\r\n ampX = v_n_1**2 + v_n_2**2 - koef*v_n_1*v_n_2\r\n ampX = EPSILON if ampX < EPSILON\r\n 10 * Math.log10(2 * ampX * 1000 / (600*n**2))\r\n end",
"title": ""
}
] | [
{
"docid": "2d7a807c67bafb78b3004d4c2531ec2a",
"score": "0.64998317",
"text": "def molecular_weight\n @mw ||= begin\n mass = WATER_MASS\n each_aa do |aa|\n mass += AVERAGE_MASS[aa.to_sym]\n end\n (mass * 10).floor().to_f /... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "03479602be23717b8dba6ee883cfa7bf",
"score": "0.0",
"text": "def status_language_params\n params.require(:status_language).permit(:title, :status_id, :lang_id)\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... |
e398054b4efcf3e23abdf6afae64968b | Sets a block to run prior to running any test files that have changed and are in the queue. | [
{
"docid": "1adfa5ae23fefed6fd62b534cc7e32f3",
"score": "0.5333503",
"text": "def pre_run(&block)\n if block_given?\n self.get_framework(self.current_framework)[:pre_run] = block\n end\n return nil\n end",
"title": ""
}
] | [
{
"docid": "1fad3a1c32f70cd9beedbfe3089af9c2",
"score": "0.62395936",
"text": "def before_run(&block)\n @before_run_block = block\n end",
"title": ""
},
{
"docid": "54c40326514427387ec443ab57a705c9",
"score": "0.6027602",
"text": "def record_block\n @block = true\n ... |
29806a9dfab8ba2d59c23a6d2a178ca9 | get fullname with namespace and title | [
{
"docid": "0235be067213ae77c1325727552c0f24",
"score": "0.7733452",
"text": "def full_title\n # if used default namespaces -> remove from full title\n if (self.namespace == '101') or (self.namespace == 'Concept')\n return self.title\n end\n # else use normal building of full url\n s... | [
{
"docid": "0cabf1db397398ce86858f4b6d16fa71",
"score": "0.7796986",
"text": "def fullname\n @fullname ||= [namespace, name].compact.join(\":\")\n @fullname unless @fullname.empty?\n end",
"title": ""
},
{
"docid": "692d15be3b2f5813bbb8c2b5e972b4d0",
"score": "0.... |
469565af0233fb541d29888acc4512a9 | The pid of the daemon if it is available. The pid may be invalid if the daemon has crashed. | [
{
"docid": "23a0fbbeae2ce1869f17f9f845f471f0",
"score": "0.72018623",
"text": "def pid\n\t\t\t\tProcessFile.recall(@daemon)\n\t\t\tend",
"title": ""
}
] | [
{
"docid": "dbb97c6525106ba6d48a3dd4b79ca74b",
"score": "0.7676607",
"text": "def pid\n @pid ||= Process.pid\n end",
"title": ""
},
{
"docid": "dbb97c6525106ba6d48a3dd4b79ca74b",
"score": "0.7676607",
"text": "def pid\n @pid ||= Process.pid\n end",
"title": ""
}... |
f62776dab49ca8e108d6150838c32554 | GET /schedulers GET /schedulers.json | [
{
"docid": "ef15f8b52a70683ccde16a0d2c91b51b",
"score": "0.7418195",
"text": "def index\n @schedulers = Scheduler.all\n end",
"title": ""
}
] | [
{
"docid": "3d0c8da0754492149bc15a6a49b85413",
"score": "0.8781194",
"text": "def schedulers(params = {})\n scope 'default'\n get('schedule/schedulers/', params)\n end",
"title": ""
},
{
"docid": "c90ebaa77cc2ae9ca040c67287fe53f7",
"score": "0.728003",
"text": "def index... |
68705f996615dba6f9626f3b41bcdfba | Returns the command necessary to decompress the given file, relative to the current working directory. It must also preserve the directory structure in the file. | [
{
"docid": "a55f2db31d35eee3873cd22c767d749c",
"score": "0.7224621",
"text": "def decompress(file)\n compression.decompress_command + [file]\n end",
"title": ""
}
] | [
{
"docid": "9c2d820c968bc0b77c854b92f9c80579",
"score": "0.70363057",
"text": "def decompress(file)\n compression.decompress_command + [file]\n end",
"title": ""
},
{
"docid": "9c2d820c968bc0b77c854b92f9c80579",
"score": "0.70363057",
"text": "def decompress(file)... |
fae1ac911befff0cd5f055fe6bde2e40 | Shorthand to the build's __path__. | [
{
"docid": "8e9c9159ca9fe0eeeb849aa6d14459a2",
"score": "0.7552608",
"text": "def build_path\n build.__path__\n end",
"title": ""
}
] | [
{
"docid": "323dbaffbf3c03e07e3e21328f4a5a46",
"score": "0.76105464",
"text": "def build_path\n build_dir || settings.build_path\n end",
"title": ""
},
{
"docid": "ec2113a538f9b56956ee36f5ce1f567f",
"score": "0.73155373",
"text": "def build_path\n File.join(settings_pa... |
567ff38b8be2b8137803e8fd8fd63099 | GET /posts or /posts.json | [
{
"docid": "c14190d8d55237374f0b185f6217cf2d",
"score": "0.0",
"text": "def index\n @team = params[:team_id]\n\t@pagy, @posts = pagy(Post.where(team_id: @team).all, items: 4)\n\t@admin = Admin.where(team_id: @team) \n\t@post = Post.where(team_id: params[:team_id])\n end",
"title": ""
}
] | [
{
"docid": "3c8f4600800ccf91f365a57dbc4d2273",
"score": "0.7241636",
"text": "def posts\n #Telling the method to get posts.json\n self.class.get('/posts.json')\n end",
"title": ""
},
{
"docid": "3c8f4600800ccf91f365a57dbc4d2273",
"score": "0.7241636",
"text": "def posts\n #... |
dbc404be49cb805f2a099fb75b9ebc8c | Metodo para obtener el autor/autores de la referencia | [
{
"docid": "3c98af5e1a37f00055410b0f95c5d9f1",
"score": "0.67835444",
"text": "def get_autor\n\t\t\t@autor\n\t\tend",
"title": ""
}
] | [
{
"docid": "f144e102ee27d7e11465214d2961687b",
"score": "0.6367062",
"text": "def set_auto_ref\n # get the auto_ref_count value to use\n self.auto_ref = user.next_auto_ref.to_s\n end",
"title": ""
},
{
"docid": "0085b32535e74992312639a0ed6d2796",
"score": "0.59910995",
"text":... |
6f410673bbd4c222ba79ee06d7619b3e | It will inject declared attributes to be inherited from ancestors only if they are not already present in the data_accessor for each class. | [
{
"docid": "e083f20fa7b132c263932a12cba56033",
"score": "0.81562364",
"text": "def inject_inherited_attributes_for(data_accessor)\n return data_accessor if @reg.empty?\n\n data_accessor.inherited_attributes.each do |attribute|\n if data_accessor.send(attribute).nil? # Inject only ... | [
{
"docid": "9bd6e7eeb5487bc429d5106f2de5f895",
"score": "0.7168081",
"text": "def inherit_attributes\n return if superclass.nil?\n\n parent_attributes = superclass.attribute_definitions\n parent_attributes.each do |parent_attribute|\n name = parent_attribute[0]\n ... |
6e0af91d00c19267c86f58cf9454dfa4 | user prompt for direction | [
{
"docid": "c56dbd4e451a703d38a1f812baa88637",
"score": "0.82814896",
"text": "def ask_direction\n direction = @prompt.select(\"Choose a direction your robot is facing\", %w(NORTH SOUTH EAST WEST))\n end",
"title": ""
}
] | [
{
"docid": "efd40cf794bb716d3f3ee4b4d42a0f73",
"score": "0.70391446",
"text": "def get_direction\n\t\toptions = find_room_in_dungeon(@player.location).connections.keys\n\t\t#organizational wording for different number of options\n\t\tif options.length > 2\n\t\t\tshown = []\n\t\t\toptions.each {|d| shown... |
7a7c702bf1b32dd22d9ba4983699aa96 | GET /githubs/1 GET /githubs/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "4b03f22bf840ed3734dcccfd6c94d350",
"score": "0.77036506",
"text": "def github(path)\n\tresponse = HttpRequest.get(\"https://api.github.com/#{path}\").body\n\tJSON.parse(response)\nend",
"title": ""
},
{
"docid": "6fc7c701fafe70ed40415ed216080a18",
"score": "0.7639762",
"t... |
960eb8734afc7b74c215a8fcf72f19e4 | Get the list of merge tags for a given list, including their name, tag, and required setting | [
{
"docid": "1b9b79c046ec04481149c77563380456",
"score": "0.0",
"text": "def merge_vars(id)\n _params = {:id => id}\n return @master.call 'lists/merge-vars', _params\n end",
"title": ""
}
] | [
{
"docid": "160d3d3222c5f79148a9fa979e5ec56f",
"score": "0.70009315",
"text": "def pulled_tags\n @list.pullin ? @list.taggings.where(user_id: @list.owner_id).includes(:tag).map(&:tag) : []\n end",
"title": ""
},
{
"docid": "6352dce1681b9c532aed745777ccbebd",
"score": "0.6953276",
... |
4213a7ad8515530fd8cf192184a3d140 | def create_student(student_name, house_result) Student.create(name: student_name, house: house_result) end | [
{
"docid": "aaf7ccd901052dca7aee329113c2e96e",
"score": "0.0",
"text": "def find_student(student_name)\n\tputs \"Welcome back! Feel free to drink some Butterbeer!\"\nend",
"title": ""
}
] | [
{
"docid": "527593bb14ea584801fb9b55d4d1a279",
"score": "0.76367384",
"text": "def create\n Student.conn.exec('INSERT INTO students (name, age, spirit_animal, squad_id) values ($1,$2,$3,$4)', [ name, age, spirit_animal, squad_id])\n end",
"title": ""
},
{
"docid": "89548b5f014fd0c3a732... |
17c23509dee2ad8d30e60ef2d90a2209 | DELETE /eventos/1 DELETE /eventos/1.json | [
{
"docid": "0972dde4acfb7ce9557b23bd8cce2184",
"score": "0.0",
"text": "def destroy\n respond_to do |format|\n if @evento.destroy\n format.html { redirect_to eventos_url, notice: 'Evento fue eliminado exitosamente.' }\n format.json { head :no_content }\n else\n format.h... | [
{
"docid": "ca8002b7f734bce1f1a27f7ec6e59e9d",
"score": "0.76449037",
"text": "def destroy # DELETE /api/events/:id\n @event.destroy\n render :json => \"Event deleted\", :status => 201\n end",
"title": ""
},
{
"docid": "7d4aa1b95a62c00729623f3530314a4e",
"score": "0.7427... |
c9fd2922653c3befe177b4d311feb73d | GET /missions/1 GET /missions/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "28f0185b9dd11f7ab607542f37b9b622",
"score": "0.7152893",
"text": "def index\n @missions = Mission.all\n end",
"title": ""
},
{
"docid": "28f0185b9dd11f7ab607542f37b9b622",
"score": "0.7152893",
"text": "def index\n @missions = Mission.all\n end",
"title": ""
... |
3f0a9f11c5084cc915a36f8fb43a0c55 | finding length of linked list | [
{
"docid": "2e6439df132b2598359c6663ff8202c5",
"score": "0.85994714",
"text": "def find_length\n current_node = @head\n length = 0\n while current_node != nil\n length += 1\n current_node = current_node.next\n end\n length\n end",
"title": ""
}
] | [
{
"docid": "b7852ef9722094bc9888f6d1f0b48683",
"score": "0.8722592",
"text": "def length\n # calculates the length of the list\n counter = @head ? 1 : 0\n node = @head\n while node.next_node\n node = node.next_node\n end\n counter\n end",
"title": ""
},
{
"docid": "83... |
2fbdaf20201742943d500a87ae5ddc20 | Returns the level of the item specified by navi_key. Recursively works its way down the item's sub_navigations if the desired item is not found directly in this container's items. Returns nil item cannot be found. | [
{
"docid": "dfa22c7e65f8dc93d234ed37db595b61",
"score": "0.88104284",
"text": "def level_for_item(navi_key)\n my_item = self[navi_key]\n return self.level if my_item\n items.each do |i|\n if i.sub_navigation\n level = i.sub_navigation.level_for_item(navi_key)\n re... | [
{
"docid": "dd3a8dd19cc465bf63c681d1315602e5",
"score": "0.8837314",
"text": "def level_for_item(navi_key)\n return level if self[navi_key]\n\n items.each do |item|\n next unless item.sub_navigation\n level = item.sub_navigation.level_for_item(navi_key)\n return level if l... |
1537b76cce680f99dc593c967b648381 | Only an user can update their own | [
{
"docid": "3b0e2c7e4417796b9116c58f3dbbb603",
"score": "0.7059364",
"text": "def update?\r\n record.user == user\r\n end",
"title": ""
}
] | [
{
"docid": "10383f3556c70f1d58ce8ade9d80053e",
"score": "0.79663855",
"text": "def update?\n user_is_owner? || user_is_admin?\n end",
"title": ""
},
{
"docid": "ea250d905a16fcdc9fa5dedf54e40435",
"score": "0.7949147",
"text": "def update?\n user_is_owner_or_admin\n end",
... |
efba8ca5e0219541bea98919855e7cb8 | Parse the request body and return the actual message descriptor. | [
{
"docid": "d4f380ec9502beafe95ad320b635177a",
"score": "0.71219087",
"text": "def msg_descriptor\n @msg_descriptor ||= begin\n # Get raw body\n content = request.body.read\n\n # Return content parsed as JSON and add job retries count\n JSON.parse(content).except('token'... | [
{
"docid": "96c6322cc06f6828ca0ed5abb8ccf081",
"score": "0.6346259",
"text": "def unpack_body(body)\n # fixed fields\n self.status = body.slice!(0)\n self.flags = body.slice!(0)\n self.server_msg_len = body.slice!(0..1)\n self.data_len = body.slice!(0..1) \n ... |
2ec459ecddc365c6d9de43ed3bc45f80 | find a row either by row number or a condition Caution: this works only within the default sheet > set default_sheet before you call this method (experimental. see examples in the test_roo.rb file) | [
{
"docid": "382439b9ae089cb5e2c69e4f8c1f2be2",
"score": "0.57351184",
"text": "def find(*args) # :nodoc\n result_array = false\n args.each {|arg,val|\n if arg.class == Hash\n arg.each { |hkey,hval|\n if hkey == :array and hval == true\n result_array = true\n ... | [
{
"docid": "268a645e3602c6845ccc198cf8245aae",
"score": "0.6696704",
"text": "def first_row(sheet = nil)\n sheet_for(sheet).first_row\n end",
"title": ""
},
{
"docid": "3f57c84520213172691998a0453d5a73",
"score": "0.6560566",
"text": "def row(row_number, sheet = default_sheet... |
ab7e8b4d683780d771f29e1cf1cb2945 | GET /call_locations/new GET /call_locations/new.json | [
{
"docid": "0c15c37eb39c18ad4779819d336d84ea",
"score": "0.81102216",
"text": "def new\n @call_location = CallLocation.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @call_location }\n end\n end",
"title": ""
}
] | [
{
"docid": "8ef6a6d960d66e2bcf3fa73b80db98a2",
"score": "0.7381318",
"text": "def new\n @location = Location.new\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @location }\n end\n end",
"title": ""
},
{
"docid": "2d0efafbb4cd2b9acb5ecbe... |
672e09ca1ae2cb94699ed2a9f00f3f7e | DELETE /roles/1 DELETE /roles/1.json | [
{
"docid": "f9c839bbf2386eca1be401e6b0312b47",
"score": "0.7571447",
"text": "def destroy\n @role.destroy\n respond_to do |format|\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "df9f4f24d6948f0d0fe36c9869e17ffd",
"score": "0.80248344",
"text": "def delete(id)\n request(:delete, \"/roles/#{id}.json\")\n end",
"title": ""
},
{
"docid": "2f08da9fae401bc8645837def6d9b3df",
"score": "0.77243465",
"text": "def destroy\n role = Role.find(para... |
e2159cb2990ccb3f34fd5be1972066da | Prints the commands that are tilespecific. | [
{
"docid": "8ad7b18048255f83414c3db20e3cfc56",
"score": "0.72049755",
"text": "def display_special_commands(player)\n events = player.location.map.tiles[player.location.coords.first][player.location.coords.second].events\n if events.nonempty? && events.any? { |event| event.visible }\n\n ... | [
{
"docid": "6b5a5f242b5969b11e55b599ba4d9ceb",
"score": "0.7231653",
"text": "def display_special_commands(player)\n events = player.map.tiles[player.location.first][player.location.second].events\n if (!(events.empty?) && events.any? { |event| event.visible })\n\n print \"* Special commands: \" + ... |
b158ccff144e4c6e33779e7ee5990de9 | Numeric Value Restriction Validations | [
{
"docid": "a399292867dcd866938a734bf97c7cc4",
"score": "0.0",
"text": "def restrict_value_non_negative(parameter_value, row_index, column_index, context)\n value_is_non_negative = parameter_value.to_d >= 0.0\n\n unless value_is_non_negative\n parameter_n... | [
{
"docid": "4e2640e417e86c25ec2ddcd5e289fe51",
"score": "0.7476548",
"text": "def validate_numerical_value(value)\n validate_numerical_value_internal(\n value,\n PARAMS_MINIMUM,\n PARAMS_EXCLUSIVE_MINIMUM,\n '>=',\n '>')\n validate... |
72552ff7a1e06cea3292ce973a5c63c0 | Injects dependencies using the injector this module has. | [
{
"docid": "965959eb2f5f2100dc5b1fcc3f31903b",
"score": "0.6049034",
"text": "def inject(target)\n injector.inject(target)\n end",
"title": ""
}
] | [
{
"docid": "08ce7d265097a42dff24e33cf658745f",
"score": "0.81051284",
"text": "def inject(*dependencies)\n DiFtw::Builder.injector_module self, dependencies\n end",
"title": ""
},
{
"docid": "a37100f547ab5af0cb10d204dfdaaa57",
"score": "0.7186189",
"text": "def injector(**opt... |
71e825c308ad568e213a099b34575165 | Barcode(13): NNNNNNNNNNNNX 3210987654321 1111 N: Numbers X: Check digit Check digit: Sum even place numbers then times 3 Sum odd place numbers Sum both even and odd sums Get one's place number of the sum 10 minus the above It's checkdigit. If it is 10, check digit is 0 | [
{
"docid": "37da5397c114a699515871c11f5eff28",
"score": "0.818618",
"text": "def calculate_check_digit(barcode_without_checkdigit)\n return nil if barcode_without_checkdigit.blank?\n\n sum_odd, sum_even = 0, 0\n (1..12).each do |i|\n digit = barcode_without_checkdigit[-i].to_i\n ... | [
{
"docid": "10dfea1a4c7155f9400d27a8a8119f66",
"score": "0.7413702",
"text": "def calculate_check_digit\n sum = digits.first(12).each_with_index.sum do |digit, index|\n index.even? ? digit : (digit * 3)\n end\n remainder = sum % 10\n remainder.zero? ? remainder : (10 - remainder)\n end... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "db8c21f08000cfd847c713da901bd2d3",
"score": "0.0",
"text": "def set_conductor\n @conductor = Conductor.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.6031952",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.6015048",
"text": "def... |
bc1115df2ada0f17d60264bbc5e82910 | Returns the path for updating the issue form with project as the current project | [
{
"docid": "604736c7ccce0b9008b77e37e843de80",
"score": "0.7485363",
"text": "def update_issue_form_path_with_modification(project, issue, issue_with_project = true)\n options = {:format => 'js'}\n if issue.new_record?\n if !issue_with_project\n new_issue_path(options)\n ... | [
{
"docid": "ba5c5078a47f78834a68223b0cba6dc1",
"score": "0.78313833",
"text": "def update_issue_form_path(project, issue)\n options = {:format => 'js'}\n if issue.new_record?\n if project\n new_project_issue_path(project, options)\n else\n new_issue_path(options)\n end... |
ac4cf88a71431ced2489c31e01978cfc | Returns the value of attribute frame. source://syntax_tree//lib/syntax_tree/yarv/vm.rb214 | [
{
"docid": "7b0affddb9035cd7ed8a19e2121ffada",
"score": "0.0",
"text": "def frame; end",
"title": ""
}
] | [
{
"docid": "a94db67bb6d7e8a8c0970fb5da71c37b",
"score": "0.68831754",
"text": "def value_at(frame)\n @v1\n end",
"title": ""
},
{
"docid": "64cfc493ca5694db12a67560444d9580",
"score": "0.65204763",
"text": "def read_attribute_value()\n #This is a stub, used for... |
d88040ea89b871f070eeeab8430b7315 | get days remaining. returns nil if not yet published | [
{
"docid": "6013df491980c7ce13ce5e06cde01c3a",
"score": "0.8587473",
"text": "def days_remaining\n if published?\n (ends_at.end_of_day.utc - DateTime.now.utc).to_i\n else\n days_open\n end\n end",
"title": ""
}
] | [
{
"docid": "ce09335427c9c12196d5c75b043c3520",
"score": "0.7761835",
"text": "def days_remaining\n target_time = self.next_release[\"release_date\"].to_time\n current_time = Time.now\n \n difference_seconds = target_time - current_time\n difference_seconds.div(86400) # seconds in a day\n ... |
6876f287c262f904c397ead9d6238d18 | Move a ship to a specific target position (Entity). It is recommended to place the position itself here, else navigate will crash into the target. If avoid_obstacles is set to True (default), it will avoid obstacles on the way, with up to max_corrections corrections. Note that each correction accounts for angular_step ... | [
{
"docid": "357610944ddd3ffd48d86ac747137057",
"score": "0.7814124",
"text": "def navigate(target, map, speed, avoid_obstacles: true, max_corrections: 90,\n angular_step: 1, ignore_ships: false, ignore_planets: false)\n return if max_corrections <= 0\n distance = calculate_distance_be... | [
{
"docid": "0ffb33269a05ca9e3e6d2af79369ddd6",
"score": "0.61870533",
"text": "def perform_move(target)\n if get_allowed_moves.include? target\n if target.delta_math(location){ |x,y| x-y }.all? {|x| x.abs == 2}\n loc = target.delta_math(location){ |x,y| x-y }.map{|x| x/2}\n loc.del... |
e802a4f7fdf41c0c96112b21c09d92e5 | return [String, nil, false] TODO: fix | [
{
"docid": "52718e8a37a227f951feed124397a15c",
"score": "0.0",
"text": "def get_genus_species(genus_option, self_option)\n # see Protonym\n true\n end",
"title": ""
}
] | [
{
"docid": "5038e9ada359588f02605a0889dec5a8",
"score": "0.62516445",
"text": "def collect\n [false, nil]\n end",
"title": ""
},
{
"docid": "5d0640c8ac43732260c8fd335da88f52",
"score": "0.60011405",
"text": "def returns_array?\n false\n end",
"title": ... |
a3d224221b9b2692778c1d0f4609edac | subscript this script to the specified range. | [
{
"docid": "d772bf949088f8288779ecd2617afed1",
"score": "0.6071766",
"text": "def subscript(*args)\n s = self.class.new\n s.chunks = chunks[*args]\n s\n end",
"title": ""
}
] | [
{
"docid": "79df279c8bd673de1f1274e43e1e1923",
"score": "0.574006",
"text": "def subscript(exp, *subs)\n SQL::Subscript.new(exp, subs.flatten)\n end",
"title": ""
},
{
"docid": "905031b7ec742d2b6577712b34b4a8c1",
"score": "0.5580545",
"text": "def range(*args)\n value ... |