query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
a22a890fcbdf352b001ddf1ea1456841 | uncomment when you have `each` working and `Enumerable` included | [
{
"docid": "a875fa20231cdaa703ef64d244a5e9b6",
"score": "0.0",
"text": "def to_s\n inject([]) { |acc, link| acc << \"[#{link.key}, #{link.val}]\" }.join(\", \")\n end",
"title": ""
}
] | [
{
"docid": "704fb2c22a8538bab759b4069ebf5bfa",
"score": "0.7642029",
"text": "def _each\n end",
"title": ""
},
{
"docid": "dcd87576f81b520216bcc33607b147a0",
"score": "0.7349081",
"text": "def each(&yld) super(&yld) end",
"title": ""
},
{
"docid": "aa54e811a59e95d166... |
2af0b16073e8403809fb53b65caf7015 | POST /admin/attaches POST /admin/attaches.json | [
{
"docid": "70f31e086b31ee075cc28720e76f7482",
"score": "0.66954404",
"text": "def create\n @admin_attach = Admin::Attach.new(admin_attach_params)\n\n respond_to do |format|\n if @admin_attach.save\n format.html { redirect_to admin_attaches_url, notice: 'Attach was successfully created... | [
{
"docid": "4b1085565b1cf5862d7b32b42d0ae7f5",
"score": "0.61505777",
"text": "def create\n @post = Post.new(post_params)\n if params[:post][:attached].size > 0\n upload_ios = params[:post][:attached]\n upload_ios.each do | uploaded_io | \n File.open(Rails.root.join('public', 'upl... |
2c4e9fa9d7c588b97f8d71c405e6f693 | Runs before the build begins | [
{
"docid": "a3d27f7afdc219769bde413b910fa1a6",
"score": "0.75876105",
"text": "def prebuild(build, listener)\n # do any setup that needs to be done before this build runs.\n end",
"title": ""
}
] | [
{
"docid": "2782caff92f9708c3278c9dd4fd6f363",
"score": "0.78962326",
"text": "def preRun\n end",
"title": ""
},
{
"docid": "3a44db7370b3e09a784083247025b528",
"score": "0.78179306",
"text": "def pre_build; end",
"title": ""
},
{
"docid": "58261063e2886e7d0e9579fb45e65... |
58a4c03458f6c3bc7b9d23668212da93 | GET /jugadores/new GET /jugadores/new.json | [
{
"docid": "227f1e9e73e4826df0e8990da4c85dba",
"score": "0.7579171",
"text": "def new\n @jugadore = Jugadore.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @jugadore }\n end\n end",
"title": ""
}
] | [
{
"docid": "9f289a6609e9206c625a32218d9ac499",
"score": "0.7434169",
"text": "def new\n @jugador = Jugador.new\n @clubes = Club.all\n @equipos = Equipo.all\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @jugador }\n end\n end",
"title": "... |
de6b3af3d692defd2609356853dfbb75 | Make sure that each test case has a teardown method to clear the db after each test. | [
{
"docid": "c24ff1b9473986c1ca0232b3af7ece92",
"score": "0.0",
"text": "def inherited(base)\n base.define_method teardown do\n super\n end\n end",
"title": ""
}
] | [
{
"docid": "6544d2d58d9350d821723efb1c0360e2",
"score": "0.84976226",
"text": "def teardown\n @db.disconnect\n end",
"title": ""
},
{
"docid": "6ad8e127d3118a9c12aed343e843a546",
"score": "0.84446484",
"text": "def teardown\n File.delete(DB_NAME) if File.exist?(DB_NAME)\n ... |
0ece556d218c54e00f07e6388de286e6 | GET /challenges/1 GET /challenges/1.json | [
{
"docid": "30efa002e3c549d23893f7ad2a6ec567",
"score": "0.0",
"text": "def show \n @challenge = Challenge.find(params[:id])\n @givenproblem = ProblemSet.all\n max = @givenproblem.map(&:id).max\n @curOut = ''\n if max != nil\n @givenproblem = ProblemSet.find(rand(1..max))\n els... | [
{
"docid": "e8d3085dddd59cd3bb09607e458da1be",
"score": "0.81531554",
"text": "def show\n @challenges = Challenge.find(params[:id])\n render json: @challenges\n end",
"title": ""
},
{
"docid": "0b7811905fcf3f2f7c648833ea4c2454",
"score": "0.7658178",
"text": "def index\n... |
6f6bc9c160ba0d1b421c5fd958a88e98 | Normalizes HTML by cleaning out common mistakes. | [
{
"docid": "eb650b454f946aae99d089378d133063",
"score": "0.6821724",
"text": "def normalize(node)\n return normalize_str(node) if node.is_a?(String)\n\n html = node.dup\n\n remove_trackers! html\n remove_blacklisted_images! html\n remove_style_attrs! html\n wrap_stray_text! html\n ... | [
{
"docid": "3aae2115c2fa54ff7dce5de32449e7f1",
"score": "0.7385848",
"text": "def normalise(html)\n doc = Nokogiri::HTML(html)\n body = doc.xpath('//body')\n\n body.xpath('//script').each {|s| s.remove}\n body.xpath('//comment()').each {|c| c.remove}\n body.xpath('//text()').fin... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "6a23fa678a4d12718ecd6818873a0fe1",
"score": "0.0",
"text": "def creaditcharge_params\n params.require(:creaditcharge).permit(:paid, :amount, :currency, :refunded)\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.69811666",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6782836",
"text": "def strong_params\n params.requ... |
f71d17792972860f016aee9ae0ba9818 | job: Hash > Hash | [
{
"docid": "c2006646c13a5dc1230ab763674e0823",
"score": "0.0",
"text": "def bulk_load_preview(job)\n # retry_request = true\n path = LIST + '/preview'\n res = api { post(path, job.to_json) }\n unless res.ok?\n raise_error('BulkLoad job preview failed', res)\n end\n JSON.load(res.b... | [
{
"docid": "43ef24702f4bfcf7f6a52f923c49e7ef",
"score": "0.7854207",
"text": "def hash\n\t\t\t@jobsInQs.hash\n end",
"title": ""
},
{
"docid": "663942df152f1131a2be6eff690d8881",
"score": "0.7156184",
"text": "def job_hash(job_params)\n {:class => self.to_s, :args => job_pa... |
c7fc5cc10c08ff54bb791528dc9af36f | Adds a cache key association to your model | [
{
"docid": "dd580e15d304abc28eb849cdcd9e22b0",
"score": "0.0",
"text": "def has_cache_key(*args)\n if (options = args.extract_options!)\n options[:composed_of] ||= args.flatten\n else\n options = {}\n end\n options[:composed_of] = Array(options[:composed_of]... | [
{
"docid": "990ee383dcca7e188f17ba95a512356c",
"score": "0.6563144",
"text": "def associate_cache(active_record, *association_names)\n require 'adequate_serialization/rails/cache_refresh'\n\n unless active_record.respond_to?(:associate_cache)\n active_record.extend(CacheRefresh)\n ... |
1f04e347358286c87383ba6bfb7951b0 | convert ruby arguments array to corresponding UMI values | [
{
"docid": "50082642aa08123f907efc565b490e6d",
"score": "0.0",
"text": "def prepare_args args\n raise \"pp bug\" if args == [:pretty_print] # this often happens while tracing\n args.map {|x| prepare x}\n end",
"title": ""
}
] | [
{
"docid": "2584f825366a8cce53638bb44786da04",
"score": "0.7075173",
"text": "def convert_args(args); end",
"title": ""
},
{
"docid": "e75a4b54009c23a197a3f85e6e4e26f5",
"score": "0.6500787",
"text": "def normalize_arguments(args)\n args\n end",
"title": ""
},
{
"doci... |
51607d2596318dea477baec08c413cd3 | GET /mortgages/new GET /mortgages/new.xml | [
{
"docid": "209239bf9bbea566ca0b56ce10b1f4e8",
"score": "0.77686316",
"text": "def new\n @mortgage = Mortgage.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @mortgage }\n end\n end",
"title": ""
}
] | [
{
"docid": "fc574616f398e88fb1ff5151b1c30d09",
"score": "0.72291386",
"text": "def new\n @mileage = Mileage.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @mileage }\n end\n end",
"title": ""
},
{
"docid": "06073a6bf509f8a83e711... |
e7dda11f91d7225972604d70e75b404d | FIXME: Let configuration handle this | [
{
"docid": "7a0fc59c9b03acb2cfb34e649f085029",
"score": "0.0",
"text": "def migrations_path\n migrations = File.expand_path( \"../../../config/migrations\", __FILE__ )\n migrations\n end",
"title": ""
}
] | [
{
"docid": "37760c3b969c84aec77912c99e5eb92c",
"score": "0.7251871",
"text": "def conf; end",
"title": ""
},
{
"docid": "c66bae5aa37aac1df5f61e262d46ce97",
"score": "0.71692675",
"text": "def configuration; end",
"title": ""
},
{
"docid": "c66bae5aa37aac1df5f61e262d46ce97... |
e6079b307d089b6393edafce16e2f62a | determines if the deck is empty | [
{
"docid": "e411922f04c9031e875e675065e32f92",
"score": "0.827869",
"text": "def empty?\n @cards.empty?\n end",
"title": ""
}
] | [
{
"docid": "8f42e19e4a55d7fdc5428527b915f94a",
"score": "0.83662486",
"text": "def is_empty?\n return cards.length <= 0\n end",
"title": ""
},
{
"docid": "303d7b4f642f7b43429af21a5fe25b29",
"score": "0.8340822",
"text": "def empty?\n cards.empty?\n end",
"title": ""
},
... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "64eae1b779a0ff3dd6268d5eae51616a",
"score": "0.0",
"text": "def set_email\n @email = Email.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.60310596",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.6014974",
"text": "de... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "e2266e5f55ec0198483e70929e2756bd",
"score": "0.0",
"text": "def set_mural\n @mural = Mural.accessible_by(current_ability).find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.60339177",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.60135007",
"text": "d... |
bdbd8ed3161567c64f38eb88d75e69d7 | dispays drag & drop tree for menus | [
{
"docid": "f4fb2e3d66356361e209e424c8c3a0b2",
"score": "0.5910543",
"text": "def tree_menu(menus, sortable)\n menus.map do |menu, sub_menu|\n content_tag :li, :id => dom_id(menu), :class => \"sortable_#{sortable}\" do\n render(menu) + (content_tag(:ol, tree_menu(sub_menu,... | [
{
"docid": "1158f9eb84657668a5af241ee359c954",
"score": "0.64406097",
"text": "def init_tree_signals\n # Creates the right click menu for the treeview\n menu = Gtk::Menu.new\n open = Gtk::MenuItem.new(\"Open\")\n \n # Connects the menu items signals.\n open.signal_connect(\"activate\... |
add7bbeec90c0193ebf34588d9a62e0d | == Instance Methods ===================================================== | [
{
"docid": "798901395c9f02326e0f6bd709314ff9",
"score": "0.0",
"text": "def today?\n created_at.to_datetime >= DateTime.now.beginning_of_day\n end",
"title": ""
}
] | [
{
"docid": "ef1e4c0cc26e4eec8642a7d74e09c9d1",
"score": "0.84468544",
"text": "def private; end",
"title": ""
},
{
"docid": "18250542a2b1999be90588db1d071d92",
"score": "0.73226625",
"text": "def initialize\n\t\t\n\tend",
"title": ""
},
{
"docid": "d88825898c6b9898e549cc4... |
1ba6330443b1002ff9fc692851377569 | Parse the foot note definition at the current location. | [
{
"docid": "e34a770dc4d6f0f9e97d834dd1835a0b",
"score": "0.71988964",
"text": "def parse_footnote_definition\n start_line_number = @src.current_line_number\n @src.pos += @src.matched_size\n\n el = Element.new(:footnote_def, nil, nil, location: start_line_number)\n parse_block... | [
{
"docid": "b6768af8bd72b26174a4423c3946d661",
"score": "0.72683394",
"text": "def parse_footnote_marker\n start_line_number = @src.current_line_number\n @src.pos += @src.matched_size\n fn_def = @footnotes[@src[1]]\n if fn_def\n if fn_def[:eob]\n update_at... |
38466d2447e02ac46e75ded67fea8bba | GET /locations/1 GET /locations/1.json | [
{
"docid": "2fd5420111d9d9c44d0a1194b2f10049",
"score": "0.0",
"text": "def show\n @restaurant = Location.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n end\n end",
"title": ""
}
] | [
{
"docid": "7c0c839c177d88b67a3e7ba53afef253",
"score": "0.7517158",
"text": "def get_location\n JSON.parse(get_results('/locations.json'), {symbolize_names: true})\n end",
"title": ""
},
{
"docid": "7c0c839c177d88b67a3e7ba53afef253",
"score": "0.7517158",
"text": "def get_locati... |
8c4d2d22842b449078d8941d5fae87a6 | Wrapper to shorten the syntax and create a central place to modify in case preferences are stored differently in the future. | [
{
"docid": "bb25fef93de0aedeb871d851ed6c2ad6",
"score": "0.0",
"text": "def read_setting(key, default)\n Sketchup.read_default(PREF_KEY, key, default)\n end",
"title": ""
}
] | [
{
"docid": "b33018a0d6c81a45db0f918e32777f64",
"score": "0.60158163",
"text": "def methodize_preferences\n #raise @options.to_yaml\n #convert preferences into methods for easier use in forms and form helpers\n #options = options.clone[0] if options[0].is_a?(Array) #allows you to pa... |
26b3638d639b610ac191c19e97603bd4 | Lazily loads all the following information into JSON object: devpayproductcodes privateip availabilityzone version instanceid billingproducts instancetype imageid accountid kernelid ramdiskid architecture pendingtime region | [
{
"docid": "e5d513d55d530943adb6f4464694b30c",
"score": "0.0",
"text": "def aws_facts\n uri = URI.parse(\"http://169.254.169.254/latest/dynamic/instance-identity/document\")\n body = Net::HTTP.get_response(uri).body\n JSON.parse(body)\nend",
"title": ""
}
] | [
{
"docid": "3d7d09890babd0e501c2669cc4a0a9fc",
"score": "0.5834352",
"text": "def list_product_details\n if request.post?\n @uniq_folders = self.get_taxons\n edited_product_info = params[:product_info]\n new_data = JSON.parse edited_product_info\n id = 1;\n products = []\n ... |
445022d134a245586dbd37dc038b3219 | Return a connection based on the attorney and contact. | [
{
"docid": "fc94e88902bda10faaee4385c08a2342",
"score": "0.78887504",
"text": "def conn(attorney, contact)\n find_by_attorney_id_and_contact_id(attorney, contact)\n end",
"title": ""
}
] | [
{
"docid": "ff8e08bcab31de6fbe8468ddb33ed536",
"score": "0.6473938",
"text": "def conn(user, contact)\n find_by_user_id_and_contact_id(user, contact)\n end",
"title": ""
},
{
"docid": "50804082bee0f586eae626b63db7565f",
"score": "0.63525283",
"text": "def contact\n if part... |
67a54349f986257f6cde93b0f8342c90 | test reading frames from an imported movie draw them and then write a movie. | [
{
"docid": "b4ce5b0cfac2cd60455cd14e14a98f05",
"score": "0.69558614",
"text": "def test03()\n movieFileName = \"movie03.mov\"\n # In this example source file and output dimensions are both 1280x720\n sourceMovie = File.join($directory, \"images/testinput-movingimages.mov\")\n utiFileType = \"com.app... | [
{
"docid": "32e002459f660bd047e0c17a93c38633",
"score": "0.65859884",
"text": "def draw\n begin\n movie_color.clear\n mov.read\n mov.load_pixels\n num_pixels_high.times do |j|\n num_pixels_wide.times do |i|\n movie_color << mov.get(i * BLOCK_SIZE, j * BLOCK_SIZE)\n end\n ... |
089e2fdabe31c298e545b080a08f24e3 | This returns an empty string if can't form a valid absolute url as per the Microdata spec. | [
{
"docid": "82b4f0f5d1a95145b354867d9664bffa",
"score": "0.6915993",
"text": "def make_absolute_url(url)\n return url unless URI.parse(url).relative?\n begin\n URI.parse(@page_url).merge(url).to_s\n rescue URI::Error\n url\n end\n end",
... | [
{
"docid": "21d2aaf1ae100cbfdd1f0e472f7c05bd",
"score": "0.75537115",
"text": "def absolute_url(url)\n url.match?(/^http:/) ? url : \"#{url_root}#{url}\"\n end",
"title": ""
},
{
"docid": "01b977be385404558c8cd90aa62360a9",
"score": "0.7473386",
"text": "def absolute_url(url)\n ... |
d66b7f8f471fafbfc33b5ecb7602d4d5 | PATCH/PUT /patients/1 PATCH/PUT /patients/1.json | [
{
"docid": "8a20361957b5f13a9a4c3d638443a92c",
"score": "0.0",
"text": "def update\n @email = current_user.email\n @patient = Patient.find(params[:id])\n @patient_email = @patient.email\n set_category\n if @email == @patient.email || current_user.admin\n respond_to do |format|\n ... | [
{
"docid": "d5466e81427206f20085bd53c82258c4",
"score": "0.73599654",
"text": "def update\n @patient = Patient.find(params[:id])\n\n if @patient.update(params[:patient])\n head :no_content\n else\n render json: @patient.errors, status: :unprocessable_entity\n end\n end",
"titl... |
1440d2d0b6f0e05367f6aad90be576f8 | For example: if arr is [5, 3, 1, 2, 1], this means you have 5 sandwiches to give out. You can distribute them in the following order to the people: 2, 0, 1, 0. Giving these sandwiches to the people their hunger levels now become: [1, 1, 1, 1]. The difference between each pair of people is now 0, the total is also 0, so... | [
{
"docid": "74f6bd2d4441cfc1c2eb7817a9b13a20",
"score": "0.7013424",
"text": "def FoodDistribution(arr)\n total_food = arr[0]\n hunger_levels = arr[1..-1]\n \n permutations = (0..total_food).to_a.repeated_permutation(hunger_levels.size).to_a\n permutations = permutations.select { |comb| comb.sum <=... | [
{
"docid": "628ed35c25ae58be0baed78d6153e21e",
"score": "0.7531631",
"text": "def FoodDistribution(arr)\n sandwiches = arr.shift\n until (sandwiches == 0) || (arr.uniq.length == 1)\n hungry_person = 0.upto(arr.length-2).max_by { |i| arr[i] - arr[i+1] }\n sandwiches -= 1; arr[hungry_perso... |
1da5009a9ab819adea80c3b05bb07196 | initializes the champion id | [
{
"docid": "2aa4d91670f55111f734f51d16c1bbde",
"score": "0.6224193",
"text": "def summoner_id(login)\n\t\tchampion= extractJSON(login)\n\t\tid = JSON.parse(champion)[@@champion_name]['id']\n\t\t@@champ_id=id\n\tend",
"title": ""
}
] | [
{
"docid": "d48b39bfa6bcc4b422f104a825be4716",
"score": "0.71543103",
"text": "def set_champion\n @champion = Champion.find(params[:id])\n end",
"title": ""
},
{
"docid": "09dc5a2edcb4768616a4a2efa92e4c85",
"score": "0.71174586",
"text": "def set_champion\n @champion = C... |
592937187ec9f83689473b48e8630bff | get all filters defined on this table. including generated filters | [
{
"docid": "8f5d4748227c0a34ad4f611fcaaecdd2",
"score": "0.7827007",
"text": "def get_filters\n return @filters + get_generated_filters\n end",
"title": ""
}
] | [
{
"docid": "289b3b0734682c7848fe439bb4e43d0b",
"score": "0.80956376",
"text": "def filters\n columns_for_filter.map { |col| filter_instance( col ) }\n end",
"title": ""
},
{
"docid": "a4af13f9ad363ea37a925c9b2b72f42e",
"score": "0.7829149",
"text": "def get_generated_filters\... |
315d408fd81b1df5b392efa0ccdced15 | displays the chosen reservation asks if the user want to update or cancel the chosen reservation do we want to display the chosen restaurant's more info again? YES Stretch Goal | [
{
"docid": "2ff6bd8b84da36d451a7ea1829d3f9ac",
"score": "0.7582741",
"text": "def see_chosen_reservation(choice_id)\n user.reload\n #name of the restaurant they will be dining at \n restaurant_chosen = Reservation.all.find(choice_id).restaurant.name\n restaurant_date = Reserv... | [
{
"docid": "1711cc71e2f7780034203832d897a901",
"score": "0.7582198",
"text": "def reservation\n opt = @view.reservations\n if opt == \"1\"\n tickets\n elsif opt == \"2\"\n #\n else\n error\n end \n end",
"title": ""
},
{
"docid": "4b454f83aad1493d9322581757292... |
edb770ff33efe9bf36dc99110f596912 | From the page 725 true ^ obj > true or false Exclusive Or Returns true if obj is nil or false and returns false otherwise. | [
{
"docid": "cbce33b459cd7a9676952a470f6f4e04",
"score": "0.55598015",
"text": "def test_TrueClass_InstanceMethods_ExclusiveOr\n\t\tassert_equal(false, true ^ true)\n\t\tassert_equal(true, true ^ false)\n\t\tassert_equal(true, false ^ true)\n\tend",
"title": ""
}
] | [
{
"docid": "cc2ccc46520bec811f909821384ceb98",
"score": "0.7359996",
"text": "def not_nil?(obj)\n\t\t!obj.nil?\n\tend",
"title": ""
},
{
"docid": "879ffe042b5f76e5d170826bf9aa950f",
"score": "0.7209034",
"text": "def boolean?(obj)\n obj.instance_of?(FalseClass) or obj.instance... |
487290b6791c646e012c7f7454be1fad | Performs deep hash transformation | [
{
"docid": "7243ac8b18b8891a77b47993dab272c1",
"score": "0.6053929",
"text": "def deep_hash(hash)\n break_keys(hash).tap do\n hash.each do |key, value|\n hash[key] = deep_hash_value(value)\n end\n end\n end",
"title": ""
}
] | [
{
"docid": "b613733a4a1074c87d5ed1fc63e2a052",
"score": "0.69552493",
"text": "def deep_transform &block\n\n\t\tDeepTransform.do_deep_transform_on_hashlike_(self, &block)\n\tend",
"title": ""
},
{
"docid": "08ab24e27eedd9603781514446173100",
"score": "0.679197",
"text": "def deep_mer... |
4e785e612f72ccd66f18c86d246544a3 | loads a book for a playdate. | [
{
"docid": "a513335c1a648a13af288342754324a1",
"score": "0.61197245",
"text": "def getBook(id)\n @book = Book.find(id)\n if @book.blank?\n return false\n end\n @playdate.book_id = id\n @playdate.save\n end",
"title": ""
}
] | [
{
"docid": "36af8e7f046e993c991ba8096da1a97c",
"score": "0.6364691",
"text": "def load_book\n @book = Book.find(params[:id])\n end",
"title": ""
},
{
"docid": "772f01bff230b04c26f89cdcfbfca073",
"score": "0.57067055",
"text": "def book\n fetch('harry_potter.books')\n ... |
4c46790e18b5d60110e9cfe056960aa4 | TODO: Add some error handling if this ever turns up empty | [
{
"docid": "bff83a568407bfe0082c6c1181ef5a57",
"score": "0.0",
"text": "def headers\n force_array identifier_request.at_path('OAI_PMH/ListIdentifiers/header')\n end",
"title": ""
}
] | [
{
"docid": "ac0e88fc911bc2002d3ee51e207b7d52",
"score": "0.57968116",
"text": "def incomplete?; end",
"title": ""
},
{
"docid": "ac0e88fc911bc2002d3ee51e207b7d52",
"score": "0.57968116",
"text": "def incomplete?; end",
"title": ""
},
{
"docid": "4c04911a988a328b6df02093f9... |
222fdbc7ca892d2e81dcecc2cf88dbc2 | Before actually drawing the next step, we need to move to the appropriate location. | [
{
"docid": "e5cc1dc2115e9bf20d5b3279ad51d4dc",
"score": "0.0",
"text": "def get_ready_to_draw\n @app.translate(@values[:x], @values[:y])\n sign = (@values[:flip] ? -1 : 1)\n @app.rotate(sign * @values[:rotation])\n end",
"title": ""
}
] | [
{
"docid": "e0cac8768a74a7b1010b06aee3deb783",
"score": "0.65554607",
"text": "def step\n # Draw everything\n @menu.draw @screen\n end",
"title": ""
},
{
"docid": "226a7ce208a6b819402e7adfcc69b75a",
"score": "0.6385142",
"text": "def move\n if @direction = 1\n let @x =... |
0b2e087a2b8ceb137171fa38d4a69d2a | Execute the actual test | [
{
"docid": "2b04bb43812ce701ccef29711b429eb3",
"score": "0.0",
"text": "def run_test\n t = nil\n\n begin\n t = clazz.create\n if t.respond_to? :micron_method= then\n t.micron_method = self # minitest compat shim\n end\n\n time(:setup) { setu... | [
{
"docid": "8ed4d9487da168e3023e8e171ccf922e",
"score": "0.7383376",
"text": "def run_tests\n _run_anything :test\n end",
"title": ""
},
{
"docid": "6ac0f028dc11e1a857038fd8e748bba1",
"score": "0.7220644",
"text": "def test\n raise 'Failing test' if Global.fail\n\n ... |
d28b8afa78bde8bfbdfc0c7037eed9f4 | gets list of achievement group IDs if no ID provided gets info for achievement group if provided ID | [
{
"docid": "9d7210401076ff83602a241f9becf784",
"score": "0.7709296",
"text": "def achievement_groups(id=nil)\n get_response(\"/v2/achievements/groups#{Utils.format_id(id)}\")\n end",
"title": ""
}
] | [
{
"docid": "b27ef1926c8b030b7e31b51c70a4902a",
"score": "0.6715679",
"text": "def get_group_ids\n end",
"title": ""
},
{
"docid": "8193936344836f38a4820297f573acf1",
"score": "0.6635815",
"text": "def groups_list_id(options)\n request method: :get,\n url: @base_... |
d6250a4d43d749ecc45383ef66e4b3e7 | 1 set action team members via JSON import file for use with import tool | [
{
"docid": "7afd7c49288cdd6a851433e317a3ac57",
"score": "0.6795388",
"text": "def set_action_team_members\n action_members = action_team_members\n # Use all groups.. some 'action teams' in old community will be admin groups in new community\n swc_action_teams = api.call(endpoint: 'groups')\n ... | [
{
"docid": "7e6de7ae60ea099beae150933d406517",
"score": "0.6314659",
"text": "def import_team_members(row_hash)\n row_hash[:teammembers].each_with_index do |teammate, _index|\n user = User.find_by(name: teammate.to_s)\n if user.nil?\n raise ImportError, \"The user '#{teammate}' was n... |
c330c1d32efb5312fdde8562eb1e0623 | if the number is divisible by 2 the value should be one more than the key if the number is divisible by 7 the value should be one less than the key if the number is divisible by 2 and 7 the value should be the key multiplied by 2 otherwise the value should be the same number as the key | [
{
"docid": "a1f3f30a885d0e4e62048eb0e120f5f5",
"score": "0.66861016",
"text": "def my_method\n hash = Hash.new\n (1..50).each do |number|\n if number %2 == 0 && number %7 == 0\n hash[number] = number * 2\n elsif number %7 == 0\n hash[number] = number - 1\n elsif number %2 == 0\n ... | [
{
"docid": "76366648646d40daf088de21c45bba6e",
"score": "0.6574985",
"text": "def map_keys(num)\n return 0 if num <= 0\n\n num % MAX_VALUE\nend",
"title": ""
},
{
"docid": "0f18f84cb98fdac2f5dd83828c352907",
"score": "0.61288255",
"text": "def key_for_min_value(hash)\n check_key... |
a2099a77c85e91272ae2f9e35b937953 | Only allow a trusted parameter "white list" through. | [
{
"docid": "eb4e89e3c374790dde4557c1422ba3d4",
"score": "0.0",
"text": "def treatment_note_params\n params.require(:treatment_note).permit(:appointment, :practitioner, :text)\n end",
"title": ""
}
] | [
{
"docid": "c1f317213d917a1e3cfa584197f82e6c",
"score": "0.71213365",
"text": "def allowed_params\n ALLOWED_PARAMS\n end",
"title": ""
},
{
"docid": "b32229655ba2c32ebe754084ef912a1a",
"score": "0.70527846",
"text": "def expected_permitted_parameter_names; end",
"title": ... |
5d79b9718f771f611f56e5f78f303957 | Can call this to log off. | [
{
"docid": "e3b2b3ab00499b6aaa0a008c3fc17d7c",
"score": "0.0",
"text": "def de_authenticate( cgi )\n\t\tCGI::Session.new(cgi).delete\n\tend",
"title": ""
}
] | [
{
"docid": "c9dcf90fc26a280bd3b47135a4124f60",
"score": "0.78711474",
"text": "def log_out\n forget(current_user)\n end",
"title": ""
},
{
"docid": "48804afcfc3fcc25555e99c3224fc326",
"score": "0.7862049",
"text": "def log_out\n forget(current_user)\n @current_u... |
a2099a77c85e91272ae2f9e35b937953 | Only allow a trusted parameter "white list" through. | [
{
"docid": "1fd63944925e1812c49f0f6fd139f65e",
"score": "0.0",
"text": "def note_params\n params.require(:note).permit(:content, :date)\n end",
"title": ""
}
] | [
{
"docid": "c1f317213d917a1e3cfa584197f82e6c",
"score": "0.7121987",
"text": "def allowed_params\n ALLOWED_PARAMS\n end",
"title": ""
},
{
"docid": "b32229655ba2c32ebe754084ef912a1a",
"score": "0.70541996",
"text": "def expected_permitted_parameter_names; end",
"title": "... |
95d020d2ab693b6eae74af70bbe61265 | GET /news_posts GET /news_posts.json | [
{
"docid": "406f6f54b6347b936428439cb11f7860",
"score": "0.7045713",
"text": "def index\n @news_posts = NewsPost.all\n end",
"title": ""
}
] | [
{
"docid": "a028a0acd19d41dad7fe4ac7b2a3add5",
"score": "0.8040115",
"text": "def index\n news_url = 'https://newsapi.org/v1/articles?source=espn&sortBy=top&apiKey=c29ea55f52bb4f5fb9ab4663c37c9401'\n\n response = HTTParty.get(news_url)\n\n # render json: response\n @news_data = response\n ... |
1eea1e790a3ba2f0b35253ef6d6db14e | cutoff created orders + new subscriptions created orders | [
{
"docid": "9aa69fe346afd68ba3624275773c51df",
"score": "0.6597091",
"text": "def group_orders\n orders.or(cutoff.orders.where(created_at: 1.week.ago(completed_at)..completed_at))\n end",
"title": ""
}
] | [
{
"docid": "d4c42d39786d619d2444aa8df6ebaddc",
"score": "0.6228929",
"text": "def create_order_without_notifications\n create_order_and_subscriptions\n end",
"title": ""
},
{
"docid": "5baf40c0acd0ebf57608702d250b6b64",
"score": "0.59130263",
"text": "def get_retroactive_subc... |
f9888f33d76534ff7ce5172869d7eb32 | PUT /records/1 PUT /records/1.xml | [
{
"docid": "d93879837c3e2e0a9f0eda187d13c123",
"score": "0.0",
"text": "def update\n set_target_time\n respond_to do |format|\n if @me.update_attributes(params[:user])\n flash[:notice] = 'User was successfully updated.'\n format.html { redirect_to records_path }\n format.... | [
{
"docid": "c2c0b673628fdc28b181d18c0afd2d5b",
"score": "0.68003535",
"text": "def update opts = {}\n opts[:headers] ||= {}\n opts[:headers]['Content-Type'] ||= 'text/xml'\n post 'update', opts\n end",
"title": ""
},
{
"docid": "e631b376ae2ccb776680432bf94b01cc",
"score": "0.61... |
7f6feb5672d1e3dc792613c1e8d5fed8 | Makes sure the supplied value is a valid RFC2616 date. If we would just use strtotime to get a valid timestamp, we have no way of checking if a user just supplied the word 'now' for the date header. This function also makes sure the Date header is within 15 minutes of the operating system date, to prevent replay attack... | [
{
"docid": "3910c20a242f59b5472c3d215dc0516d",
"score": "0.8306628",
"text": "def validate_rfc2616_date(date_header)\n date = Tilia::Http::Util.parse_http_date(date_header)\n\n # Unknown format\n unless date\n @error_code = ERR_INVALIDDATEFORMAT\n return ... | [
{
"docid": "6b3334e8ec4753f0103b132b9b684efa",
"score": "0.62432635",
"text": "def is_correct_date param_date\n parts = param_date.split(\"-\")\n time = Time.utc(parts[0], parts[1], parts[2])\n if time.midnight < Time.now.midnight + 1.day\n return true\n end\n rescue\n ... |
5720d9aca611d44f93943a6d28980d6a | Sets the current tabulation of the document. | [
{
"docid": "0fb80e9012ffa4f30b7ae6baa1844d23",
"score": "0.68919307",
"text": "def tabulation=(val)\n val = val - @real_tabs\n @tabulation = val > -1 ? val : 0\n end",
"title": ""
}
] | [
{
"docid": "da351c383cd7b8d7fd31d2a20e88cb64",
"score": "0.6504025",
"text": "def tabulation\n @real_tabs + @tabulation\n end",
"title": ""
},
{
"docid": "836874e5bac6472a7dae04eb4ffcbb6a",
"score": "0.6385778",
"text": "def set_tab\n TABSTOPS << x\n TABSTOPS.sort!\... |
9ab13488bd765abbecadaf387ebb3c73 | When we are sideloading associations, we can more easily track what has been serialized, so that we avoid infinite recursion / serialization. | [
{
"docid": "28a91f5e0aaeacd9a4ebabcc5b87ec2c",
"score": "0.0",
"text": "def initialize(*args)\n @serialized = {}\n\n super(*args)\n end",
"title": ""
}
] | [
{
"docid": "c6feb74983615179545edb8bba3d8172",
"score": "0.66295105",
"text": "def preload_associations!\n # The only way we can preload associations is if object is a\n # ActiveRecord::Relation and has not been loaded.\n if object.respond_to?(:loaded?) && !object.loaded?\n ... |
2d61547559fe42c8d8c3264c4830122c | Loops until an interesting md5 hash is found | [
{
"docid": "069dc2a83e2ed31a68ed645e2976aff3",
"score": "0.7187936",
"text": "def next_interesting\n loop_until(->(hash) { /^0{5}/ =~ hash }) do\n @hasher.call(\"#{@id}#{@i += 1}\")\n end\n end",
"title": ""
}
] | [
{
"docid": "4bc628ea5d4a504efd46e0791e641a3f",
"score": "0.7677803",
"text": "def unmd5(hash)\n # search one: lowercase search\n lower = \"a\"\n # search two: ascii brute force\n gen = all_ascii\n \n loop {\n break lower if md5(lower) == hash\n lower.next!\n \n ... |
927af8dd2a5bef52a69c0f873dbbbdff | array of all parent commits source://git//lib/git/object.rb189 | [
{
"docid": "92256b3e26786ebd333c3c8a3780d295",
"score": "0.0",
"text": "def parents; end",
"title": ""
}
] | [
{
"docid": "940cb9fa0b8fb48ca4bd17206e3ad3da",
"score": "0.7883378",
"text": "def parents\n check_commit\n @parents ||= @parent_data.map{ |sha| TinyGit::Object::Commit.new(@base, sha) } \n end",
"title": ""
},
{
"docid": "172f613790b2a42eac7813dcb88ef6d6",
"scor... |
c52d3554ebc8cabe5998aaa18731ce0f | Edit function GET /users/1/edit | [
{
"docid": "c8ccd7f09675a8c4fdddac0612b00249",
"score": "0.0",
"text": "def edit\n @offer =current_offer\n @offer = Offer.find(params[:id])\n render \"/offers/show/edit_info\"\n# @user.update_without_password(params[:user])\n# else\n#end\nend",
"title": ""
}
] | [
{
"docid": "9b4cb26cb42006bbfc9176702b1c0513",
"score": "0.8531562",
"text": "def edit\n @userToEdit = User.find(params[:id])\n end",
"title": ""
},
{
"docid": "f4c72c6ca89b78e0710d57bbf3781821",
"score": "0.85169274",
"text": "def edit\n \n @user = User.find(params[:id]... |
37c4679095789bfd7d2ba97cc5aaedab | Lettercase Counter Given: string Return: hash with three entries: the number of upcase chars, downcase chars and neither seperate into chars, create formatted hash, iterate through check for alpha range add to appropriate entry in hash | [
{
"docid": "b360fc91ada5af57df0e670ffb129115",
"score": "0.6514939",
"text": "def letter_case_count(string)\n result = { lowercase: 0, uppercase: 0, neither: 0 }\n string.chars.each do |i|\n if ('a'..'z') === i\n result[:lowercase] += 1\n elsif ('A'..'Z') === i\n result[:uppercase] += ... | [
{
"docid": "9137687164e666b3b3a06f5174d0d6f7",
"score": "0.7450045",
"text": "def letter_case_count(str)\n hsh = str.codepoints.each_with_object(Hash.new(0)) do |asci_num, count_hsh|\n case asci_num\n when (97..122) then count_hsh[:lowercase] += 1\n when (65..90) then count_hsh[:uppercase] += ... |
f7cc228175ee4399d9ae406aeefb500e | GET /companies/1 or /companies/1.json | [
{
"docid": "4e928b4d41387c2b26d2fb7514db13fb",
"score": "0.0",
"text": "def show\n if @company.user == current_user\n render \"show\"\n else\n redirect_to root_path\n end\n end",
"title": ""
}
] | [
{
"docid": "9970eb7522eae154b5ab58faddef365a",
"score": "0.7452413",
"text": "def query_companies(options={}) path = \"/api/v2/companies\"\n get(path, options, AvaTax::VERSION) end",
"title": ""
},
{
"docid": "64a989c42306e451f5c5357fba4725c0",
"score": "0.7358159",
... |
fec9744183a95a5ea0ff1b6e5bb0cf4d | POST /child_categories POST /child_categories.json | [
{
"docid": "c740da5519d06fcf1c6598c2bb9b0fc4",
"score": "0.7262976",
"text": "def create\n @child_category = ChildCategory.new(params[:child_category])\n\n respond_to do |format|\n if @child_category.save\n format.html { redirect_to @child_category, notice: 'Child category was successf... | [
{
"docid": "43f66f7bcbf5dc18ce1be5b108cc5842",
"score": "0.7213602",
"text": "def create\n @category = Category.new(category_params)\n authorize! :create, @category, :message => 'Not authorized as an administrator.'\n parent = Category.find_by(id: category_params[:parent_id])\n \n @catego... |
0bcdacb95b5ee1b62edc4af05f96feaf | PATCH/PUT /registration_head2s/1 PATCH/PUT /registration_head2s/1.json | [
{
"docid": "f470ad27f2617d69c84305adbde4de88",
"score": "0.765047",
"text": "def update\n respond_to do |format|\n if @registration_head2.update(registration_head2_params)\n format.html { redirect_to @registration_head2, notice: 'Registration head2 was successfully updated.' }\n fo... | [
{
"docid": "e5bdc5c42c49b91f284043aafabf4cc9",
"score": "0.6505244",
"text": "def update\n respond_to do |format|\n if @hjump_head2.update(hjump_head2_params)\n format.html { redirect_to @hjump_head2, notice: 'Hjump head2 was successfully updated.' }\n format.json { render :show, s... |
73166ef5305fd8616294335529dcbb37 | Called when this object is being cast to a string. | [
{
"docid": "5e0c646dffbba16f3212f3386d7425ce",
"score": "0.0",
"text": "def to_s\n value.to_s\n end",
"title": ""
}
] | [
{
"docid": "54a3063a28f1d8deef2a19a4a705c4fa",
"score": "0.6725205",
"text": "def convert_string\n raise NotImplementedError\n end",
"title": ""
},
{
"docid": "e84d3b683c603296879bdcbc0ab6b449",
"score": "0.60855746",
"text": "def StringValue(obj)\n Type.coerce_to(obj, Strin... |
c25fcbdaeb92a6fe878d99c5ae43b75a | Description Checks if a specific tag is present in the database (if yes, the tag box gets colored) Mode Json | [
{
"docid": "a3567822843e2a8711ca9174c6039a87",
"score": "0.5534326",
"text": "def check_presence\n render :json => {:ok => Tag.where(:word => params[:word]).any?}\n end",
"title": ""
}
] | [
{
"docid": "83bcb447e61e04af5e61ca79ec825a5a",
"score": "0.64920324",
"text": "def taggable?\n description['taggable'] == true\n end",
"title": ""
},
{
"docid": "756a099b48c7171952d28903293d18e1",
"score": "0.6290121",
"text": "def report_json_tags(json_data)\n puts \"co... |
d315737eee405c01dd5a06da457dfe29 | :callseq: ios.read([length [, buffer ]]) => string, buffer, or nil Reads at most length bytes from the I/O stream, or to the end of file if length is omitted or is nil. length must be a nonnegative integer or nil. If the optional buffer argument is present, it must reference a String, which will receive the data. At en... | [
{
"docid": "33a6a4088d491a94498f557b6de9dced",
"score": "0.0",
"text": "def read(*args)\n @socket ? tee(super) : @tmp.read(*args)\n end",
"title": ""
}
] | [
{
"docid": "e46f2deb8dcbd1a1edffa9a3a0060f48",
"score": "0.71864706",
"text": "def read(length = nil)\n assert_can_read\n\n read = \"\"\n if length.nil?\n loop {\n err, current_read = APR.file_read(@native_file, 100)\n APR.raise_apr_errno(err, ignore: [APR::APR_SUCCESS, APR::... |
a016c1b745358dda178673d0638c74b0 | Set the Will for the client The will is a message that will be delivered by the server when the client dies. The Will must be set before establishing a connection to the server | [
{
"docid": "e1d48693eff8d33728cc42157215b8e1",
"score": "0.463624",
"text": "def set_will(topic, payload, retain = false, qos = 0)\n self.will_topic = topic\n self.will_payload = payload\n self.will_retain = retain\n self.will_qos = qos\n end",
"title": ""
}
] | [
{
"docid": "16626acac9ed9bcf4bcc1da10ae81308",
"score": "0.5377689",
"text": "def post_init\n puts \"TCP connection attempt completed successfully and a new client has connected.\"\n send_line(\"-> Welcome abord bro\")\n end",
"title": ""
},
{
"docid": "2242e63d0f8b7e8ed144388e5... |
57490345156a4e9c9de9e345af5d8958 | GET /hackathons/1 GET /hackathons/1.xml | [
{
"docid": "8c79fe796e99a1f528181e7a6dd13982",
"score": "0.66849303",
"text": "def show\n @hackathon = Hackathon.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @hackathon }\n end\n end",
"title": ""
}
] | [
{
"docid": "8ca02bb29104366ee9f3f88a451b33cd",
"score": "0.69738084",
"text": "def index\n @hackathons = Hackathon.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @hackathons }\n end\n end",
"title": ""
},
{
"docid": "3d27a98ff... |
9939c9c89629b4ac80e900c881692eb3 | DELETE /todos/1 or /todos/1.json | [
{
"docid": "b17786db71fe3d791ae3119afcb78ada",
"score": "0.73896843",
"text": "def destroy\n @todo.destroy\n respond_to do |format|\n format.html { redirect_to todos_url, notice: \"Aufgabe wurde erfolgreich gelöscht!\" }\n format.json { head :no_content }\n end\n end",
"title": "... | [
{
"docid": "13460d1f36ba31172415ebeec718fff4",
"score": "0.77328116",
"text": "def delete\n\t\tt = Todo.find(params[:id].to_i)\n\t\tt.delete()\n\t\trender json: t\n\tend",
"title": ""
},
{
"docid": "edb1a55951817c40c3f0a2a6c4172354",
"score": "0.7715794",
"text": "def destroy\n @t... |
b027a94ee3cfdd7423dbcdcf719004a2 | Deletes each of the named images and returns an empty string. If there are instances of the images displayed in widgets, the images will not actually be deleted until all of the instances are released. However, the association between the instances and the image manager will be dropped. Existing instances will retain t... | [
{
"docid": "d5b6189a7063e6b84d9b935e3625b46e",
"score": "0.74304813",
"text": "def delete(*names)\n Tk.execute(:image, :delete, *names)\n end",
"title": ""
}
] | [
{
"docid": "87dc297215f6476533a8a54672139b4d",
"score": "0.7003474",
"text": "def delete_image tags\n all_images_by_tags( tags ).each { | image | image.deregister } \n end",
"title": ""
},
{
"docid": "d60205b7e63e2b7292807e4d5d0c6fe7",
"score": "0.69657975",
... |
e973c4a723582b9469014a521f6b7b2f | PATCH/PUT /backoffice/questions/1 PATCH/PUT /backoffice/questions/1.json | [
{
"docid": "bea0a1d5748b78fad5bce19c5dc69fa0",
"score": "0.0",
"text": "def update\n respond_to do |format|\n if @instruction.update(instruction_params)\n format.html { redirect_to backoffice_instruction_path(@instruction), notice: 'Question was successfully updated.' }\n format.js... | [
{
"docid": "3b1af6b89a0e0f1659059190f1c5b6ae",
"score": "0.6725025",
"text": "def update\n @question = Question.find(params[:id])\n\n respond_to do |format|\n if @question.update_attributes(params[:question])\n format.html { redirect_to api_v1_question_path(@question), notice: 'Questio... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "718faa1b1831bac5f69123bced2bd9b8",
"score": "0.0",
"text": "def photo_params\n params.require(:photo).permit(:iptc, :data, :caption, :byline, :sizes, :s3_key)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7497801",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.6957249",
"text": "def strong_params\n params.require(:request).permit(param_white... |
adf63d15fb6adc6027a5a65594ed477a | Generates Markdown or HTML documentation from JSON schema | [
{
"docid": "6a837940a185fc361b3c2677981bd218",
"score": "0.5354773",
"text": "def call\n result = self.class.markdown_renderer.result(schema: schema)\n if @html\n result = self.class.html_renderer.result(body: self.class.redcarpet.render(result))\n result.gsub(/id=\"(.+)\"/) {|te... | [
{
"docid": "b6873f1269e3a98b12631797ed5d5a4d",
"score": "0.6333013",
"text": "def show_documentation req, res\n store, path = documentation_source req.path\n\n if_modified_since req, res, store.cache_path\n\n generator = generator_for store\n\n case path\n when nil, '', 'index.html' then\... |
ec6b7021c0833d6264c1e4889527b107 | For now, loaders can't modify loader config they way that reducers can. This is because reducers like OAI return config that allows them to fetch successive batches of content | [
{
"docid": "dfa7bee6d76dbe50ff7ea20573094036",
"score": "0.53490174",
"text": "def loaders\n @loaders ||= profile.loaders\n end",
"title": ""
}
] | [
{
"docid": "4b2019f26c4956e54e888e08982ce7b1",
"score": "0.5770274",
"text": "def loader\n config.loader || container.config.loader\n end",
"title": ""
},
{
"docid": "4b2019f26c4956e54e888e08982ce7b1",
"score": "0.5770274",
"text": "def loader\n config.loader || co... |
0a8909146e1fd229853ad32e203fefca | methode pour la fin de la partie | [
{
"docid": "0622072c655b92ace0ee34d93161a137",
"score": "0.0",
"text": "def end\n\t\tif @user1.life_points>0 then\n\t\t\tputs \"BRAVO !!!! TU AS GAGNE !\"\n\t\telse\n\t\t\tputs \"BOUUUUUUU! TU AS PERDU !\"\n\t\tend\n\tend",
"title": ""
}
] | [
{
"docid": "2d184052a6e6071e93a993d5d03d315d",
"score": "0.71448165",
"text": "def part_end\n end",
"title": ""
},
{
"docid": "77d479ae2ea9b0b64f605e7e331878aa",
"score": "0.6823689",
"text": "def add_part\n\n\n\n end",
"title": ""
},
{
"docid": "3fff7ea9b6967fb0af70c... |
f1c512af4ff635ef2e5f429baf79cc8c | POST /attendees POST /attendees.json | [
{
"docid": "6dc857d9681803d3d5407ddceb5ed99c",
"score": "0.0",
"text": "def create\n @attendee = current_user.attendees.new(attendee_params)\n\n respond_to do |format|\n if @attendee.save\n begin\n @qr = RQRCode::QRCode.new( attendee_url(@attendee.id), :size => 5, :level => :h... | [
{
"docid": "4cb96d732485683cc7460c63c1cd20d8",
"score": "0.7294385",
"text": "def create\n @attendee = @current_user.attendees.new(attendee_params)\n\n respond_to do |format|\n if @attendee.save\n format.html { redirect_to @attendee, notice: 'Attendee was successfully created.' }\n ... |
e2f77dee920d2bb3670cf2b31fd63f4c | Another hack, to see if Capybara sessions have been used | [
{
"docid": "4488dc6033ce72a41674e91f6e9b9e07",
"score": "0.0",
"text": "def is_session_touched?(session)\n session.instance_variable_get(:@touched)\n end",
"title": ""
}
] | [
{
"docid": "d6d2415afaf43289e0f0ce98685b0479",
"score": "0.7362217",
"text": "def capybara_sessions\n Capybara.send :session_pool\n end",
"title": ""
},
{
"docid": "c11526539a2224074a0c8669ad06dde3",
"score": "0.7171844",
"text": "def touch_session\n page.execute_script(... |
05aaa2c0998a6b207b5ffce3cd969d04 | Retriev IDs of specified virtual machines | [
{
"docid": "b11cb07a4c44e68525d13881c141a904",
"score": "0.6410967",
"text": "def vms(range, groups)\n vms = []\n # load specific batch\n vm_pool = load_vm_pool\n return nil if vm_pool.count == 0\n\n @log.debug(\"Searching for vms based on range: #{range} and groups: #{groups}.\")\n vm... | [
{
"docid": "f74234cc7cba6ba052dca316a8ed5aa6",
"score": "0.7118474",
"text": "def vm_ids\n updated = Array.new\n\n self.each('UPDATED_VMS/ID') do |id|\n updated << id.text.to_i\n end\n\n outdated = Array.new\n\n self.each('OUTDATED_VM... |
b2535b1a1fbeb0ec77588e4b9f0dad29 | PATCH/PUT /members/1 PATCH/PUT /members/1.json | [
{
"docid": "4020e16d87ffc50acddbde326fb3a9a0",
"score": "0.63130623",
"text": "def update\n respond_to do |format|\n if @member.update_attributes(member_params)\n format.html { redirect_to @member, notice: 'Member was successfully updated.' }\n format.json { head :no_content }\n ... | [
{
"docid": "973d0f3c973a223584258b0fc379de9b",
"score": "0.6816826",
"text": "def update\n if @current_user.id != @member.user_id\n return render json: { message: \"You are not permitted to perform this operation.\" }, status: :forbidden\n end\n if @member.update(member_params)\n rend... |
3e05f03623e844db86a8683762fe10d1 | To find the full shortest route to a node | [
{
"docid": "b4f2e611cbe67dd878809ec9ec9ffa4c",
"score": "0.0",
"text": "def find_path(dest)\n if @previous[dest] != -1\n find_path @previous[dest]\n end\n @path << dest\n end",
"title": ""
}
] | [
{
"docid": "ee2a0de4c1b0357fe858397cb970fefd",
"score": "0.84170574",
"text": "def find_shortest_route\n node = @closed_nodes[@goal[0]][@goal[1]]\n loop do\n break if node.from == @start\n @result << node.from\n @shortest_route[node.from[0]][node.from[1]] = true\n n... |
90782d154b1a77362ae17e4efcd7abfd | Set Exception Arguments: e: (Exception) | [
{
"docid": "f3daba6993c8a9c99e8014895bb964b8",
"score": "0.7716147",
"text": "def set_exception(e)\n @exception = e\n end",
"title": ""
}
] | [
{
"docid": "fbb56ab9d0ebc5e437d5bb322cf305c6",
"score": "0.73475164",
"text": "def exception(*rest) end",
"title": ""
},
{
"docid": "5d97705576cc100ce70e45d32cd56138",
"score": "0.7157339",
"text": "def original_exception=(_arg0); end",
"title": ""
},
{
"docid": "cb25fb66... |
5d61bec6282e9b06668b1e55eca7eb5a | datetime Start date/time of export range. | [
{
"docid": "4b2372c14b80d618d4fba713f05789e8",
"score": "0.0",
"text": "def start_at\n @attributes[:start_at]\n end",
"title": ""
}
] | [
{
"docid": "4756cd01497dddacd7eedc161d44e4ad",
"score": "0.7160854",
"text": "def start_datetime\n d = date\n t = start_time || Time.new.midnight\n DateTime.new(d.year, d.month, d.day, t.hour, t.min, t.sec)\n end",
"title": ""
},
{
"docid": "b59ed01648d451127a7801136102ef3a",
"... |
dcaf53a5331bfe2c10108590ff81be90 | grabs default search parameters if user has not input any or if the user just hit the page | [
{
"docid": "e34ea828c0b5e0f0cbb9fa4e6c94115f",
"score": "0.6574836",
"text": "def grab_search_params(location)\n\n params = {}\n\n params[:'search-text'] = \"Web Developer\"\n params[:'search-location'] = location\n params[:'start_date'] = Date.today\n\n verify_search(params, location)\n\... | [
{
"docid": "144e186159bfea47af5a6362412f7dd2",
"score": "0.7380324",
"text": "def homepage_default user_parameters\n if !user_parameters['facet.field'].kind_of?(Array) || user_parameters['facet.field'].count == 1\n # this is a request for a facet page, like /catalog/facet/author_facet\n elsif... |
aa63b080668366e4839a60e1ff8b8ad0 | GET /diarios/1 GET /diarios/1.json | [
{
"docid": "1396639d397ba1bb5634d5f0a96fecfc",
"score": "0.0",
"text": "def show\n respond_to do |format|\n format.html\n format.pdf do\n pdf = DiarioPdf.new(@diario, view_context)\n send_data pdf.render, filename: \"mypdf.pdf\",\n type: \"applicat... | [
{
"docid": "0d1f8e9052d692d06c13f94915a9619f",
"score": "0.7645194",
"text": "def index\n @diretorios = Diretorio.where(pessoa_id: params[:usuario]).first\n render json: @diretorios\n end",
"title": ""
},
{
"docid": "39400dc029c1a6dbd878f065d90b9dbe",
"score": "0.7243036",
"te... |
107e3a2427b3eaa75900e643681e73a9 | Recommended queue interval for appending node. Can overwrite [queue interval] at setup()/initialize(). | [
{
"docid": "dc32aee0f0f253c98fd60087fa2aa1be",
"score": "0.64114755",
"text": "def ff_get_query_interval\n QUEUE_DEFAULT_INTERVAL\n end",
"title": ""
}
] | [
{
"docid": "ea4126bfce5d65c29e1e14d2c98dc7a4",
"score": "0.64935374",
"text": "def enqueue_to_in(queue, interval, klass, *args); end",
"title": ""
},
{
"docid": "515ce5f384bbd4e84e299d51e58b92d4",
"score": "0.646926",
"text": "def interval\n (self['resque.interval'] || 5).to_i... |
40d040d5d64efe41fe9dc5ec2d4fa136 | The most acceptable format requested, e.g. +:json+. | [
{
"docid": "41a7e3f58037bd5b69c03bbddf247cf7",
"score": "0.6319306",
"text": "def format\n return @format if defined? @format\n media_type = request.accepts.best_of Util.media_types config[:formats]\n @format = config[:formats].find { |f| Util.media_type(f) == media_type }\n end",
... | [
{
"docid": "10ec0f1a0bb8e743946c613672561da4",
"score": "0.7128684",
"text": "def formats\n JSON_FORMATS\n end",
"title": ""
},
{
"docid": "12ddfd0a2fd119d8a1416125a603fc50",
"score": "0.6959054",
"text": "def verif_format\n raise ActionController::RoutingError... |
7139a966f4562acd906f7cc5b5dbd3ee | =begin rdoc Todo/Fixme is called again =end | [
{
"docid": "cfe552d5f0347501b9cf11a6204e6863",
"score": "0.0",
"text": "def call()\r\n @logger.info([@type, \"#{@codeline}(#{@count}) #{@shortdescription} (temporary: #{@result.inspect})\"])\r\n @count += 1\r\n end",
"title": ""
}
] | [
{
"docid": "d557db54e52a71749409a130c88eadaa",
"score": "0.67518234",
"text": "def metodo\n #corpo do metodo\n puts 'corpo do metodo'\n end",
"title": ""
},
{
"docid": "d557db54e52a71749409a130c88eadaa",
"score": "0.67518234",
"text": "def metodo\n #corpo do m... |
8ed00556d4122e3eccfd9b5389522ebd | PUT /users/1 PUT /users/1.json | [
{
"docid": "6d1120b664bd7c4e5bc28e9ef198989b",
"score": "0.0",
"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 format.js... | [
{
"docid": "b5edb8a9b2cad14c7874c5f42c5809e9",
"score": "0.7438286",
"text": "def test_put_user\n json_data = '{\"name\":\"test\", \"last_name\":\"test\", \"document\" : \"098\"}'\n put '/users/4', json_data\n assert_equal 204, last_response.status, 'Código de respuesta incorrecto'\n end",
... |
e44c10f911531f88d2232bb51f5aa58a | GET /conges/1 GET /conges/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "7039486a6d4738672720a0a274f1f5ab",
"score": "0.6857474",
"text": "def index\n @conges = Conge.all\n end",
"title": ""
},
{
"docid": "379ac40af1b4dffb8b1f9480b3da8ca8",
"score": "0.6386985",
"text": "def show\n @con = Con.find(params[:id])\n\n respond_to do |form... |
018f97d539ae15a76a74d74aaad21a5f | === >Ajout d'un message dans le stack de BattleEngine === | [
{
"docid": "9bac77049bd05dfee52d906d7a5d4eaf",
"score": "0.0",
"text": "def _mp(msg)\n ::BattleEngine._mp(msg)\n end",
"title": ""
}
] | [
{
"docid": "b4e39ce441360889614c6db6972ab8e3",
"score": "0.7106952",
"text": "def add_message (text)\n @@message << text.to_s << \"\\n\"\n text.to_s\n end",
"title": ""
},
{
"docid": "46b7dc92f07f994fb244ed2da9d379b0",
"score": "0.6779331",
"text": "def set_message\n end",
... |
16dbddc8fb813746e775a63ca6197cad | Doubler Write a `doubler` method that takes an array of integers and returns an array with the original elements multiplied by two. | [
{
"docid": "e869f03930764d9df9b030cefab7ef5b",
"score": "0.7908842",
"text": "def doubler(array)\n array.map{ |n| n * 2 }\nend",
"title": ""
}
] | [
{
"docid": "5e87699415ca75635b45de4d07827af5",
"score": "0.7932969",
"text": "def doubler(array)\n array.map { |el| el * 2 }\nend",
"title": ""
},
{
"docid": "2453dd45ed79fafe02a42438aafd361f",
"score": "0.79032135",
"text": "def doubler(array)\n array.map{|el| el * 2}\nend",
"... |
29f8b1f2ad8798c6e270a06d10bf7734 | Searches for teaching events, returning grouped by type. Searches for teaching events. Optionally limit the results by distance (in miles) from a postcode, event type and start date. | [
{
"docid": "587dd59125c5dfe375bc2007dcd9b1e4",
"score": "0.64111346",
"text": "def search_teaching_events_grouped_by_type(opts = {})\n data, _status_code, _headers = search_teaching_events_grouped_by_type_with_http_info(opts)\n data\n end",
"title": ""
}
] | [
{
"docid": "13f27b1cf59b47ac8d688e7e093b268a",
"score": "0.59530866",
"text": "def index\n\n @events = Event.order(\"starts_at ASC\")\n\n if !params[:start].blank? and !params[:end].blank?\n start_date = Date.strptime(params[:start], '%s')\n end_date = Date.strptime(params[:end], '%s')\n... |
49b1760c96b30d9dfbd753f52a7f6ead | Public: Gets the messages for this timeline. options Hash of options to filter the message output. :max_count Fixnum specifying the number of commits to show. Default: 30. :skip Fixnum specifying the number of commits to skip. :page Fixnum of the current page. This is used to implicitly calculate the :skip option. Defa... | [
{
"docid": "8702c833c0167e3daab836d70cb481e4",
"score": "0.58843404",
"text": "def messages(options = nil)\n @repo.messages(self, MessagesOptions.fill(options))\n end",
"title": ""
}
] | [
{
"docid": "f37b35865a16f1147e0a2ea76a99005f",
"score": "0.7243516",
"text": "def messages(options = {})\n options[:no_merges] = true\n options[:max_count] ||= 30\n options[:skip] ||= begin\n options[:max_count] * ([options.delete(:page).to_i, 1].max - 1)\n end\n @... |
4d9e3687c9e8b49d93406a8153fba2cb | Converts and returns the file size in a 0.00 float, based upon a given multiplier | [
{
"docid": "4863473bc4568bb13348d05db23b3b5d",
"score": "0.81533086",
"text": "def size_to_f( multiplier = KILOBYTE )\n '%.2f' % ( size.to_f / multiplier )\n end",
"title": ""
}
] | [
{
"docid": "cf12b2faa3cf1e22d62ec54c97817044",
"score": "0.6321749",
"text": "def readable_file_size(size, precision)\n case\n #when size == 1 : \"1 B\"\n when size < KILO_SIZE then \"%d B\" % size\n when size < MEGA_SIZE then \"%.#{precision}f K\" % (size / KILO_SIZE)\n when size < GIGA_SIZE the... |
9bcdec58e5e95698b925b6b465752d33 | Get a list of the time periods a variable could represent. A variable period is period of time represented by the measurement. For example, monthly precipitation has a variable period of months. | [
{
"docid": "f62fcfaaa3c49d9c2c9c0768e3c0e1d9",
"score": "0.0",
"text": "def get_variable_period_types_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: DefaultApi#get_variable_period_types ...\"\n end\n \n # resource p... | [
{
"docid": "1a85342c83aae168193e720a195cb447",
"score": "0.71090823",
"text": "def periods\n self.count_intervals.times.map do |i| get_period(i) end\n end",
"title": ""
},
{
"docid": "f1a2c0720840338ae223f34016e2a161",
"score": "0.6807848",
"text": "def get_list_of_time_periods(t... |
efa6cbabbacf8568ca6d9b3ae15f1eda | increment and decrement operations | [
{
"docid": "72cdfe99fbbead52d4dcc2cafaf8ff01",
"score": "0.0",
"text": "def _dec\n @data = @_p_nz = (@data - 1) & 0xff\n end",
"title": ""
}
] | [
{
"docid": "39c457361fe57f319eb49a844aad1db0",
"score": "0.71065086",
"text": "def decrement\n @counter = @counter - 1\n end",
"title": ""
},
{
"docid": "20840d152cf74899d3ce6373e22a91e2",
"score": "0.69738495",
"text": "def decrement\n @value -= 1\n end",
"title": ""
}... |
e749bd61f5bcbba39ef6954e30c52d06 | Create an instance of `Hyrax::AdministrativeSet` with the suggested_id if supported. | [
{
"docid": "34eb41414975701fd9a93a6f002f5730",
"score": "0.8219818",
"text": "def create_admin_set(suggested_id:, title:)\n if suggested_id.blank? || Hyrax.config.disable_wings || !Hyrax.metadata_adapter.is_a?(Wings::Valkyrie::MetadataAdapter)\n # allow persister to assign id\n ... | [
{
"docid": "45288c3467fada6c93903b83aab55178",
"score": "0.65313554",
"text": "def set_administrative\n @administrative = Administrative.find(params[:id])\n end",
"title": ""
},
{
"docid": "5ad5284e699d2ea421b4e1410883a9d5",
"score": "0.612553",
"text": "def set_administrativ... |
af630984682f1a0b5a68e6092af0d102 | Update properties of this object | [
{
"docid": "779bc2457bb9a72b9a47500a8c1e4f9e",
"score": "0.0",
"text": "def update!(**args)\n @bounds = args[:bounds] if args.key?(:bounds)\n @point = args[:point] if args.key?(:point)\n @point_source = args[:point_source] if args.key?(:point_source)\n end",
"title"... | [
{
"docid": "150fa2bdc1fc43d28ac45e2278a1f797",
"score": "0.7012263",
"text": "def update_properties(hash)\n hash.each do |key, value|\n setter_method = \"#{key}=\"\n if self.respond_to?(setter_method)\n self.send(setter_method, value)\n end\n end\n end",
"t... |
1c408574307cbf1ba74ec448bea022fb | Creates address book entries. | [
{
"docid": "eff1b115672c0a0aeaccc3ce72db36f0",
"score": "0.0",
"text": "def initialize(name)\n\n @name = name # The name of the entry\n\n end",
"title": ""
}
] | [
{
"docid": "53621de130a39bc2f1fcf6e0755ece29",
"score": "0.6913276",
"text": "def create_entry\n system \"clear\"\n puts \"New AddressBloc Entry\"\n print \"Name: \"\n name = gets.chomp\n print \"Phone number: \"\n phone = gets.chomp\n print \"Email: \"\n email = ... |
69beaa3e957d1fc356539d0314d703e1 | Custom attribute writer method checking allowed values (enum). | [
{
"docid": "718923bf18fdb643e40d338a2c1b049a",
"score": "0.0",
"text": "def polarity=(polarity)\n validator = EnumAttributeValidator.new('String', [\"CREDIT\", \"DEBIT\", \"PENDING_CREDIT\", \"PENDING_DEBIT\"])\n unless validator.valid?(polarity)\n fail ArgumentError, \"invalid value fo... | [
{
"docid": "8146b840a980695b919bbb80892fcc0c",
"score": "0.6161179",
"text": "def valid?\n type_validator = EnumAttributeValidator.new('String', [\"GPA_CREDIT_PENDING\", \"GPA_CREDIT_PENDING_REVERSAL\", \"GPA_CREDIT_REVERSAL\", \"GPA_CREDIT\", \"GPA_DEBIT\", \"GPA_DEBIT_PENDING_REVERSAL\", \"GPA_DE... |
189526a854e9568bd50a37e5493a81cb | POST /posttags POST /posttags.json | [
{
"docid": "3fe847a9dbe0dd7bd474588faf41a796",
"score": "0.6826153",
"text": "def create\n @posttag = Posttag.new(params[:posttag])\n\n respond_to do |format|\n if @posttag.save\n format.html { redirect_to @posttag, :notice => 'Posttag was successfully created.' }\n format.json ... | [
{
"docid": "94f109a5497034509c0599078c6aa664",
"score": "0.7374036",
"text": "def tag!(params = {})\n self.post params, edge: :tags\n end",
"title": ""
},
{
"docid": "6c7c3ee9278fef6af1ba1dd9a64fef99",
"score": "0.6917392",
"text": "def create\n @tags_post = TagsPost.n... |
ca6e3d546136dc7386c506539fcdbca4 | processes a tests/document/context node | [
{
"docid": "0949079c7e3739ba98fe6598c1dc0604",
"score": "0.65778375",
"text": "def process_context(doc, context)\n test_context = XPath.match(doc, context.attributes[\"select\"])\n namespaces = context.namespaces\n namespaces.delete(\"var\")\n namespaces = nil if namespaces.empty?\n ... | [
{
"docid": "fc7289786d45dca93a3fbe6abc22abf0",
"score": "0.66184783",
"text": "def eval_context(context, node); end",
"title": ""
},
{
"docid": "42ec39b6be6c181833e74c9c8e5a76f9",
"score": "0.6292433",
"text": "def context(nodes, &block); end",
"title": ""
},
{
"docid": "... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "48f5449044653179fa479c4059ca6903",
"score": "0.0",
"text": "def set_content\n @content = Content.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.60339177",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.60135007",
"text": "d... |
2f2c103722a6785bebcce33b5cdd1fd2 | a method to reverse complement a rich sequence | [
{
"docid": "cc4dca227ebe30fb25044b53379a3fdf",
"score": "0.62718636",
"text": "def reverse_complement_rich_sequence(path_to_sequence, sequence_format = nil, output_sequence_format = nil)\n biosequence = biosequence_from_file(path_to_sequence, sequence_format)\n biosequence.reverse_complement!\n\n # n... | [
{
"docid": "e002fbe3beb4f855c8f478aa85c41e16",
"score": "0.75694674",
"text": "def reverse_sequence\n revcom(sequence)\n end",
"title": ""
},
{
"docid": "749a16dffd958eacabf2b484dbdcdef5",
"score": "0.707197",
"text": "def invert() end",
"title": ""
},
{
"... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "fd9345ca5797b5e6d845a7abbf07105d",
"score": "0.0",
"text": "def arc_params\n params.require(:arc).permit(:tag, :name, :description, :date_confirmed, :classification, :arc_profiled, :dev_plan_available, :dev_plan_mainstream, :alda_rating, :faps_coverage)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7496716",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.6956598",
"text": "def strong_params\n params.require(:request).permit(param_white... |
20e29a269143f7a7e75297d46c5873fc | Get deploy keys on a repo Requires authenticated client. | [
{
"docid": "1c95a08856826c1b5f491fc03fad6b42",
"score": "0.70876426",
"text": "def deploy_keys(repo, options = T.unsafe(nil)); end",
"title": ""
}
] | [
{
"docid": "d100a796795069f3c97e3a3fa3733873",
"score": "0.75673884",
"text": "def list_deploy_keys(repo, options = T.unsafe(nil)); end",
"title": ""
},
{
"docid": "38c57470206f1698c1d013401a9dd9ee",
"score": "0.71641684",
"text": "def deploy_keys(project, options = {})\n get(\"... |
7bf218c41625e3df28602bdf99b47011 | Api for world'total and each countries with lat, longitude and flag | [
{
"docid": "61b7d7c8d1b38d733c92cfbcfb4f4cdd",
"score": "0.63897216",
"text": "def country_api\n # endpoint = \"https://corona.lmao.ninja/countries\"\n endpoint = 'https://corona.lmao.ninja/v2/countries'\n response = HTTParty.get(endpoint)\n data = JSON.parse response.body\n res = data\n ... | [
{
"docid": "b7f89ac83728be0eceadead9e0ca0441",
"score": "0.7087945",
"text": "def countries_geo_entity_stats\n countries.present? ? GeoEntityStat.where(geo_entity_id: countries.map(&:id)) : geo_entity_stats\n end",
"title": ""
},
{
"docid": "b76f5e57a30e68149fde81cca6898bb8",
"score"... |
18e7742a169dfcb6f7ac10cf812295d8 | Entry point for rendering a widget (and all its children). Same as to_s only returns an array, for minor performance improvements when using a Rack server (like Sinatra or Rails Metal). Options: see to_s | [
{
"docid": "aad2c124270ea7fef6158315362b36d9",
"score": "0.6013043",
"text": "def to_a(options = {}, &blk)\n _render(options, &blk).to_a\n end",
"title": ""
}
] | [
{
"docid": "02f9d9401099af07d114ceea60531d70",
"score": "0.6492896",
"text": "def render\n wrap @children.map(&:render).join(\"\\n\")\n end",
"title": ""
},
{
"docid": "1770f331e9d384b1a30870aee7946159",
"score": "0.6298789",
"text": "def to_s(options = {}, &blk)\n raise... |