query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
735786e8f5dd2f8db9bdc102f0de1485 | GET /email_adresses/1 GET /email_adresses/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "08c3bc4d6c696c47435b5139741a83f4",
"score": "0.71160424",
"text": "def index\n @adresses = Adress.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @adresses }\n end\n end",
"title": ""
},
{
"docid": "27254005ab59d87921... |
ee1c91216118da1c4af41bdd9f521f3e | create an array of numbers stored as strings from 1 to maxNum and return an array containing it and its maximum string length | [
{
"docid": "233c016857f58d0536ab569695e1f4f5",
"score": "0.80683845",
"text": "def createNumberArray maxNum\n arr = []\n i = 1\n maxNum.times do\n arr << i.to_s\n i += 1\n end\n return [arr, maxNum.to_s.length]\nend",
"title": ""
}
] | [
{
"docid": "601d1e2b8535c6ca564f6fc2211156fe",
"score": "0.7002382",
"text": "def digits_maxnum_in_string(str)\n arr = Array.new\n max_length = 0\n str.chars do |char|\n if char == '0'\n i_char = char.to_i\n arr = arr << i_char\n if max_length < arr.length\n max_length = arr.... |
4079086ce597f42afef6711ce82bd26d | Public: Construct the Cell with its location in 2Dimensional Cartesian space. x The Integer value of the Cell's position in the X dimension y The Integer value of the Cell's position in the Y dimension | [
{
"docid": "2be33bff5ba2d81558914a200ee71c78",
"score": "0.0",
"text": "def initialize x:, y:\n\t\t\t@x, @y = x, y\n\t\t\t@links = Hash.new\n\t\tend",
"title": ""
}
] | [
{
"docid": "fda8b3524e2e7b1fe7205a2a6c97570f",
"score": "0.6990664",
"text": "def initialize x:, y:\n\t\t\t@x, @y = x, y\n\t\t\t@space = init_space\n\t\t\tinit_cells\n\t\tend",
"title": ""
},
{
"docid": "76129da0305c9b6003e068bd47e11ada",
"score": "0.6981463",
"text": "def cell_locat... |
e325bc498f1e8c872edc1f432bc38793 | k songs before a song can be repeated, and l songs in a playlist | [
{
"docid": "e88bc54850b0674300e134fea7102a41",
"score": "0.6265297",
"text": "def numOfPlaylist(n, k, l)\n num = 1\n l.times do |i|\n num *= n - [k, i].min\n end\n num\nend",
"title": ""
}
] | [
{
"docid": "cc02aab0a8a343d73a91fb56eeea5fee",
"score": "0.66464955",
"text": "def group_wej_songs\n self.playlistsongs.each_slice(5).to_a\n end",
"title": ""
},
{
"docid": "6e95c9e8b5c31b6fdcee0c0ac20cc504",
"score": "0.6199318",
"text": "def one_week_wonders(songs)\n seen = []... |
4ba25bd0c98093166a93c405bfc0727f | DELETE /meetings/1 DELETE /meetings/1.json | [
{
"docid": "5952229bc6576113a5780fc80ba03875",
"score": "0.7594607",
"text": "def destroy\n @meeting.destroy\n respond_to do |format|\n format.html { redirect_to meetings_url, notice: 'Meeting was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"title"... | [
{
"docid": "6c9ee2a9bd2b5fbeb9557cc6e62b7f41",
"score": "0.80827785",
"text": "def destroy\n return if new_record?\n \n @api.delete \"/meetings/#{shortcode_url}.json\"\n end",
"title": ""
},
{
"docid": "04d4d3a9fdc63472e1f094be79019d25",
"score": "0.7949581",
"text": "def d... |
24d18e5956e280f55030a34c89cabd27 | using_insert takes in two arguments, an array and a new element to be added to the array. it uses the insert method to add the new element to the 4th index of the array (FAILED 14) increases the length of the array (FAILED 15) | [
{
"docid": "9610f0483865ecaa726733b5aa207254",
"score": "0.8149075",
"text": "def using_insert (array, element)\n return array.insert(4, element)\nend",
"title": ""
}
] | [
{
"docid": "a062005bfcc00ab93a70c2fcada0a97e",
"score": "0.8315912",
"text": "def using_insert(array, element)\n array = array.insert(4, element)\n\n \nend",
"title": ""
},
{
"docid": "060242b9428a8130315626269b3c71a4",
"score": "0.8180737",
"text": "def using_insert(array, element... |
e21b5ee8138a75630b068dfc68abb220 | Creates a massage for the paid invoice | [
{
"docid": "75e101121e7107939afeccfd4728d5bf",
"score": "0.6838896",
"text": "def paid_invoice_message\n data = {}\n data[:from] = Rails.application.secrets.mail_from\n data[:to] = 'allswell.hospital@outlook.com'\n data[:subject] = 'Your Invoice Confirmation'\n data[:text] = 'Please find ... | [
{
"docid": "1315ea4b6fdbbbb21884f13f9a25978e",
"score": "0.67217404",
"text": "def create\n @po_receipt_msg = PoReceiptMsg.new(po_receipt_msg_params)\n\n respond_to do |format|\n if @po_receipt_msg.save\n format.html { redirect_to @po_receipt_msg, notice: 'Po receipt msg was successful... |
f57bd3dab364da60c59ad86339082763 | I think this code will work for Cancelling and going back. Verify with Jason | [
{
"docid": "add0ea9779c29b515dba3a45372653e8",
"score": "0.0",
"text": "def cancelAddKid\n\t\tself.dismissViewControllerAnimated(true, completion: lambda {})\n\tend",
"title": ""
}
] | [
{
"docid": "56adeea29b8056590c837fcea6ff004c",
"score": "0.6907472",
"text": "def cancel\r\n end",
"title": ""
},
{
"docid": "0a7effdd2b80d4c81379b083e24bdf3b",
"score": "0.68863285",
"text": "def cancelled?; end",
"title": ""
},
{
"docid": "0a7effdd2b80d4c81379b083e24... |
d7beb988bde86bf277ae64260a4da4ae | 2. There is a string Find a maximum number of digits placed in a row in it | [
{
"docid": "f8b236595fa23cf92625ca2e810f4f4f",
"score": "0.76730406",
"text": "def max_num_of_digits(string)\n split_string = string.split('')\n digits = split_string.select { |el| el.to_i.to_s == el.to_s }\n return digits.count\nend",
"title": ""
}
] | [
{
"docid": "782daa846edb42e1b81e3cbee3ddefbc",
"score": "0.74756026",
"text": "def find_max_number_of_digits(string=\"00 000 0\")\n array = string.gsub(/[^\\d]/, '|').split('|')\n max_number_of_digits = Array.new\n array.each {|el| max_number_of_digits.push(el.length) }\n puts max_number_of_... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "6691ff151d9148a1a35264f8036832eb",
"score": "0.0",
"text": "def feed_params\n params.require(:feed).permit(:category_id, :title, :feed_type, :htmlurl, :xmlurl, :comment)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7498391",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.6958937",
"text": "def strong_params\n params.require(:request).permit(param_white... |
60e181008ac12843dac2baa42237d46c | GET /news/new GET /news/new.xml | [
{
"docid": "d8ce6224e95e0b9e115f955a11e96623",
"score": "0.7745584",
"text": "def new\n @news = News.new\n @title = 'Nova obavijest'\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @news }\n end\n end",
"title": ""
}
] | [
{
"docid": "8b2ce34d7d3cf2719a46eab2aa1c1a22",
"score": "0.79429555",
"text": "def new\n @news = News.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @news }\n end\n end",
"title": ""
},
{
"docid": "8d3e47a4872d1eeed8e8bf2ec2fa84... |
aa1166b14085f9cbcf28dafe6cc5fde9 | Determines whether the current user can dj based on the minimum points required and spot availability | [
{
"docid": "2ad4649d6f1b1854712aab80dddf769f",
"score": "0.730459",
"text": "def can_dj?\n dj_capacity > djs.length && dj_minimum_points <= client.user.points\n end",
"title": ""
}
] | [
{
"docid": "9df696b3c41b277d55756619a7776cfd",
"score": "0.78208685",
"text": "def available?\n client.user.points >= minimum_points && (!acl || client.user.acl >= acl)\n end",
"title": ""
},
{
"docid": "100c85b0b3c24817e255663893b1a0eb",
"score": "0.6548303",
"text": "def ac... |
66743aa2b7b16eeb139c2dc5ec8a8a50 | Execute the block, accepting a prompt, optionally responding to the prompt. Expects a block whose actions will trigger the display modal to appear. | [
{
"docid": "7044be62a3f4f5a5f421bf6bcd293b7c",
"score": "0.53977334",
"text": "def accept_prompt(text = T.unsafe(nil), **options, &blk); end",
"title": ""
}
] | [
{
"docid": "f5628606bd719239103afcc6d9048a91",
"score": "0.6623345",
"text": "def execute_nonmodal(*args, &block)\n @__FTNonModal_block = block\n create\n show(*args)\n setFocus ## ?\n end",
"title": ""
},
{
"docid": "1a53ea262b9b9c7383c2da3f3c3034b3",
"score": "0.... |
817fed7cc0c28892fe134eac97bd9332 | Remove Consumer from redis queue list while closing connection | [
{
"docid": "548f61beaf30c565d62e9b14d3c43360",
"score": "0.7686093",
"text": "def remove_from_queue_list\n puts \"Removing #{@consumer_name} from Queue List\"\n @redis_conn.hdel('decoupled.schedulers', @consumer_name)\n end",
"title": ""
}
] | [
{
"docid": "d21c158940a94e4e17eb8d84458530fc",
"score": "0.8171743",
"text": "def remove_from_queue_list\n puts \"Removing #{@consumer_name} from Queue List\"\n @redis_conn.hdel('decoupled.consumers', @consumer_name)\n end",
"title": ""
},
{
"docid": "8833150c90107e06998754d351a42c6b"... |
319533488c75813983785a56b2a3c16f | Steps to take if the user was valid | [
{
"docid": "3ac6bd5eda5ba2f4f26b57a5861f7207",
"score": "0.0",
"text": "def post_process(user, assume_user_exists=false)\n\n user.update_user_organization_filters unless Rails.application.config.try(:user_organization_filters_ignored).present?\n\n\n if user.has_role?(:manager) && user.organization... | [
{
"docid": "8a4c4b842e03765bf17b819b1618d7b1",
"score": "0.7292228",
"text": "def valid_user\n # unless @user\n # redirect_to root_url\n # end\n end",
"title": ""
},
{
"docid": "c838ab99c7ced20261e7fcb5fd4825eb",
"score": "0.7255593",
"text": "def appctrl_ensure_u... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "f4a734d26b57d3405e36e493d4511db0",
"score": "0.0",
"text": "def set_model_inactive\n @model_inactive = ModelInactive.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... |
72481a8116387e33797bcba89a423bb8 | GET /stage_certainty_factors GET /stage_certainty_factors.json | [
{
"docid": "2acc89640191b897cd7509c29a1a1edc",
"score": "0.787411",
"text": "def index\n @stage_certainty_factors = StageCertaintyFactor.all\n end",
"title": ""
}
] | [
{
"docid": "3963a9e843527dc9b337b9da3c80b1a7",
"score": "0.7053892",
"text": "def set_stage_certainty_factor\n @stage_certainty_factor = StageCertaintyFactor.find(params[:id])\n end",
"title": ""
},
{
"docid": "62d4af1a41170b1bf68703a4c1fa68e0",
"score": "0.66058946",
"text":... |
2f0b1a815162f1324adee9820014f890 | List the versions of the application with id. ++id++: Application id | [
{
"docid": "6b58a238083f441e9432d203f1328a1f",
"score": "0.8272132",
"text": "def versions(id)\n @connection.get(\"/v_beta/apps/#{id}/versions\")\n end",
"title": ""
}
] | [
{
"docid": "6852ea36162e75cfe1c2cb2d4307eb37",
"score": "0.82310057",
"text": "def versions(id)\n Swan.singleton.apps.versions(id)\n end",
"title": ""
},
{
"docid": "429a37909e9fb8ae99b4e48994f97ea7",
"score": "0.75387794",
"text": "def list_versions(id)\n uri = URI::HTT... |
d890e7cbce0d47de10f446cb227187b5 | summary: A single url used by HealthVault with different query string parameters to make specific requests to an online application. remarks: Since an application must have both a privacy statement and a terms of use statement, you must supply one of the following: 1. An action url. 2. Both the privacy statement and te... | [
{
"docid": "edb86356a0c4e2e33c7c0aa37afe9f76",
"score": "0.0",
"text": "def action_url=(value)\n @children['action-url'][:value] = value\n end",
"title": ""
}
] | [
{
"docid": "36c15828d2da00adfe3aae19f0d18031",
"score": "0.5494552",
"text": "def url_definer\n url = EBAYOPENURL+\"?callname=#{@callname}&responseencoding=#{RESPONSEENCODING}&appid=#{@app_id}&siteid=0&UserID=#{@user_id}&IncludeSelector=Details&version=#{APIVERSION}\"\n return url\n end",
... |
88a844deec87dc96e236fe9d2897b2a9 | Creates the awsdirect request body for the specified role | [
{
"docid": "3c3317fe732c8778a262d148e18d49c0",
"score": "0.56270534",
"text": "def get_awsdirect_request_body(host_to_request)\n role = host_to_request[:role]\n size = host_to_request[:size]\n volume_size = host_to_request[:volume_size]\n\n request_body = { \"platform\": @aws_platform,\n ... | [
{
"docid": "943f19e2e61dac4ed5f276071aea4a74",
"score": "0.6145605",
"text": "def create_application_role(application_id, role_id, request)\n start.uri('/api/application')\n .url_segment(application_id)\n .url_segment(\"role\")\n .url_segment(role_id)\n .body... |
0530ef625184cb33196c6b31236df0f7 | DELETE /categories/1 DELETE /categories/1.json | [
{
"docid": "04bf26662459fa51310f0ef0457cbca9",
"score": "0.7399541",
"text": "def destroy\n @category = Category.find(params[:id])\n @category.destroy\n\n respond_to do |format|\n format.html { redirect_to categories_url }\n format.json { head :ok }\n end\n end",
"title": ""
... | [
{
"docid": "1a8d9c10235b11eb19e8934ebe516094",
"score": "0.78272814",
"text": "def DeleteCategory id\n \n APICall(path: \"categories/#{id}.json\",method: 'DELETE')\n \n end",
"title": ""
},
{
"docid": "556d3975c5de1e711b9e83498dab5304",
"score": "0.77353686",
... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "f6f7a3f4fc86722a75d9c03a458f07a7",
"score": "0.0",
"text": "def set_pattern\n @pattern = Pattern.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;... |
a6bd6b90815d122b9dfbc8519d0bee38 | equilateral = all sides isosceles = 2 sides equal scalene = no sides equal (side1 + side2) > side3 and sides > 0 | [
{
"docid": "a8295a753d275c21642af4b2deff2d8d",
"score": "0.68998176",
"text": "def kind\n if @side1 <= 0\n raise TriangleError\n elsif @side2 <= 0\n raise TriangleError\n elsif @side3 <= 0\n raise TriangleError\n end\n\n if (@side1 + @side2) <= @side3 || (@side2 + @side3) <... | [
{
"docid": "4d8ce415ab88fb09364454ab5c6bea0e",
"score": "0.75501066",
"text": "def equilateral?\n sides.uniq.size.eql?(1)\n end",
"title": ""
},
{
"docid": "5d034e040b22e5dd8964f0c5e74cd60d",
"score": "0.72989535",
"text": "def legal?\n sum = sides.reduce(:+)\n self.sides.a... |
ecddfb6163b24320791c005a990281a7 | Sets the path of the configuration file FIXME: Holds state | [
{
"docid": "cb9d1b56677da0e1630634d0b7354b91",
"score": "0.0",
"text": "def settings_path\n @settings_path.nil? ? CONFIG_PATH : @settings_path\n end",
"title": ""
}
] | [
{
"docid": "d3f85f4defa7c231ec0bc856eb159222",
"score": "0.7485264",
"text": "def set_config_paths\n @config_file_path = \"config/dissect/\"\n end",
"title": ""
},
{
"docid": "6e5cf2a3c71f977d2a46a2b3cad8774d",
"score": "0.740121",
"text": "def configure config, path\n e... |
2123eac826ded44b91e681fc7f92d2a4 | find the smallest item in the collection to be the root of minheap, return its index | [
{
"docid": "4ee1967030b71e3d202bdea95784fc63",
"score": "0.7582961",
"text": "def find_root_index(collection)\n min_index = 0\n\n for item in collection\n if item < collection[min_index]\n min_index = collection.index(item)\n end\n end\n min_index\nend",
"title": ""
}
] | [
{
"docid": "70e06fdb4b07e688e5f877f4112944bb",
"score": "0.86360925",
"text": "def min_index\n @roots.each_with_index.inject(-1) do |min_index, (heap, index)|\n # If the current heap is empty, keep the old index.\n next min_index if heap.nil?\n # If the current minimum is the inject de... |
f5587cce0824cacefc2a47a1fd432f88 | A sorted array of the free TEMs that have a SECpack type migrated to them. Args: sec_type:: the SECpack type (+:mapper+ or +:reducer+) | [
{
"docid": "b04dfcbc03ee9e737f0359b82377641f",
"score": "0.77492034",
"text": "def free_tems_with_sec(sec_type)\n tems = []\n @free_tems.each do |index_tem, true_value|\n tems << index_tem.last if @with[sec_type].include? index_tem.last\n end\n tems\n end",
"title": ""
}
] | [
{
"docid": "78a7b81caf22bf5f114138e1ff970a8a",
"score": "0.59633315",
"text": "def migrate_actions(sec_type)\n actions = []\n return actions if @without[sec_type].length == 0\n free_tems = free_tems_with_sec sec_type\n free_tems.each do |source_tem|\n break if @without[sec_type].length ... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "eea962c508236cce9bc14d681ec8dcc1",
"score": "0.0",
"text": "def clip_params\n puts params.inspect\n params.require(:clip).permit(:title, :default_image, :playing_image, :info, :image_playing_id, :image_default_id, :clip_sources, :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... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "b606b6db478f3b376a893fea89eced88",
"score": "0.0",
"text": "def level_source_params\n params.require(:level_source).permit(:hidden)\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... |
176289defc2586b7cb851643874660db | DELETE /products/1 DELETE /products/1.json | [
{
"docid": "17b1b084808853ff73a25c2733bcab53",
"score": "0.0",
"text": "def destroy\n @product.destroy\n respond_to do |format|\n format.html { redirect_to products_url, notice: 'Product was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"title": ""
... | [
{
"docid": "2fa0a3656e86962ca1a10fa31aede189",
"score": "0.7658028",
"text": "def destroy\n @productos_json.destroy\n respond_to do |format|\n format.html { redirect_to productos_jsons_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "65950... |
bb2262433dee8988fe166f5bbf84892d | GET /pledges GET /pledges.json | [
{
"docid": "f8a1896d46addba3aa37d908c4a208d9",
"score": "0.6616496",
"text": "def index\n @pledges = Pledge.all\n end",
"title": ""
}
] | [
{
"docid": "33be907816a2e3802bd94b2dcb48a819",
"score": "0.78002965",
"text": "def project_pledges(project_id)\n return get(\"/projects/#{project_id}/pledges\")\n end",
"title": ""
},
{
"docid": "91e0241d62e2020732b8b8453aba3933",
"score": "0.67905194",
"text": "def treehouse_bad... |
08b88c89a72d405d52eb1d0e77845a8f | Commit the txn if this is the level at which it was created. Leave the txn open if this isn't the level at which it was created. | [
{
"docid": "cf3c7f5fe46aad98dadf7f0eb46d301e",
"score": "0.5653137",
"text": "def commit_txn_if_started_here( txn, txn_created )\n\tif txn_created\n\t\ttxn.Commit()\n\t\treturn true\n\tend\n\treturn false\nend",
"title": ""
}
] | [
{
"docid": "8c4c45b961125af06da9877235ccefc0",
"score": "0.6226747",
"text": "def commit!\n _commit( false )\n end",
"title": ""
},
{
"docid": "d991a27bc6b8a03e2bcb38707e43e655",
"score": "0.6210169",
"text": "def commit\n @transaction_active = false\n self.exec... |
f5a482efb500f487c16837579ebcb3dc | Unsubscribing subscribers from mailing list and a specified campaign Unsubscribes a subscriber from the specified mailing list and the specified campaign. The subscriber is not deleted, but moved to the suppression list. This call will take into account the setting you have in \"suppression list and unsubscribe setting... | [
{
"docid": "e149138244be16b1adde5a624d1a284c",
"score": "0.7355861",
"text": "def unsubscribing_subscribers_from_mailing_list_and_a_specified_campaign(format, campaign_id, apikey, mailing_list_id, body, opts = {})\n data, _status_code, _headers = unsubscribing_subscribers_from_mailing_list_and_a_sp... | [
{
"docid": "6d0a489e8762f2e65408bb651f106532",
"score": "0.7348005",
"text": "def unsubscribe\n mailchimp = Gibbon::API.new\n result = mailchimp.lists.unsubscribe({\n :id => ENV[\"MAILCHIMP_LIST_ID\"],\n :email => {:email => self.email},\n :delete_member => true, # this is NOT the d... |
5cab5900740e7d05ec877c084d7d21f7 | todo: combine user when email clashes | [
{
"docid": "6c5bd5937cdec4f6d8da70074bd2c884",
"score": "0.0",
"text": "def weibo\n @user.name = @info['name']\n @user.nickname = @info['nickname']\n @user.location = @info['location']\n @user.bio = @info['description']\n if @info['urls'].present?\n @user.website = @info['urls']['Web... | [
{
"docid": "c50e0d75e19e33d96b73fd78ae7010a8",
"score": "0.7402377",
"text": "def user_email\n msg['email'] || entry['email'] || reject['email']\n end",
"title": ""
},
{
"docid": "f5555aa2666b0ed1ca884428cd574230",
"score": "0.6901897",
"text": "def email\n user.present? ? use... |
b77bf2b94ec239606b72d0f1fc22edaf | Not handling any error cases here | [
{
"docid": "d50d53eaebf5257802844e57d5510725",
"score": "0.0",
"text": "def create\n @link = WebLink.find(params[:web_link_id])\n @link.archive(@user)\n\n respond_to do |format|\n format.html do\n if params[:archive_link][\"redirect_to\"] == 'index'\n redirect_to web_links_... | [
{
"docid": "4c40be68f2979600b9fe99a32b310eb3",
"score": "0.71013576",
"text": "def handle_error()\n end",
"title": ""
},
{
"docid": "3dd49bf89ca13eba8cb278cfe6edcd89",
"score": "0.7090862",
"text": "def rescue_result; end",
"title": ""
},
{
"docid": "8b79e8f7bbe83880e5... |
898bd3ae8c173429f4d8f10ddf810037 | Callback from Alert/Event toggle | [
{
"docid": "32757365b5d060c65ed925e3862b8d71",
"score": "0.70965683",
"text": "def switch_alert_event\n # TODO: clean out selected item details\n display_items\n end",
"title": ""
}
] | [
{
"docid": "d9d50faad4bb3b5690ea128b0995776c",
"score": "0.6731155",
"text": "def toggle\n fire\n end",
"title": ""
},
{
"docid": "bcdab1e45ec80394606242c760b21bf6",
"score": "0.6583434",
"text": "def set_alert\n\n \tend",
"title": ""
},
{
"docid": "711eb61cf618b... |
d8c40acc671809e6e6032815f14846c2 | POST /tcm_patient_infos POST /tcm_patient_infos.json | [
{
"docid": "8147469058ec3934a6732dcd8da94b44",
"score": "0.76556325",
"text": "def create\n @tcm_patient_info = TcmPatientInfo.new(tcm_patient_info_params)\n\n respond_to do |format|\n if @tcm_patient_info.save\n format.html { redirect_to @tcm_patient_info, notice: 'Tcm patient info wa... | [
{
"docid": "bd63749a80e1c9a826145bf2be5c3eb9",
"score": "0.7071312",
"text": "def create\n @patient = Patient.new(patient_params)\n if @patient.save\n render :json => {\n id: @patient.id,\n email: @patient.email,\n firstName: @patient.first_name,\n lastName: @p... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "00c7b180910ce0bdd520a84de1c5332e",
"score": "0.0",
"text": "def set_station\n @station = Station.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "bd89022716e537628dd314fd23858181",
"score": "0.6165094",
"text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n end",
"title": ""
},
{
"docid": "3db61e749c16d53a52f73ba0492108e9",
"score": "0.60450804",
"text": "def action_hook... |
5bd4dc110d3f2483e2d32a3ea466f19a | Creates a CharacterStyleRange tag using char_st_rng_tag and automatically chooses the correct style for the given element. If a block is given, it is yielded. Otherwise the children of +el+ are converted if +el+ is not +nil+. Note: Use this method rather than the char_st_rng_tag method! | [
{
"docid": "9e2cc4ac36838717a130d3f22d4c3640",
"score": "0.7497285",
"text": "def character_style_range_tag_for_el(el, ancestors = @stack, &block)\n orig_el = el\n if ![:em, :strong].include?(el.type)\n # This is most likely a :text element: Use parent element for further processi... | [
{
"docid": "18c7b1b3a7e96a4ac6d00084bf4cedf5",
"score": "0.5100556",
"text": "def convert_br(el)\n character_style_range_tag_for_el(el)\n content_tag(\"\\u2028\")\n end",
"title": ""
},
{
"docid": "ccb1157d870d74099b856410bbd4d74e",
"score": "0.50177336",
"text": "... |
4813a949bd662b2d4db9ba6ad76d2cc4 | Save login credidentials as a permanent cookie | [
{
"docid": "44a3577f0619926c2fecb8ea863731c0",
"score": "0.6660666",
"text": "def save_session user\n # The password_seed method is used to generate the stored token.\n # The remember_token is then stored as a signed cookie along with the\n # user's ID from the database.\n remember_token = p... | [
{
"docid": "d412c54e740910062abbc6c9cda39eaa",
"score": "0.718436",
"text": "def store_session(res)\n res.set_cookie(:_rails_lite_app, {path:'/', value: @cookie.to_json})\n end",
"title": ""
},
{
"docid": "96eec3a0379f979f64269c227cad8d68",
"score": "0.7148051",
"text": "def crea... |
c57757a2309a43fd17ed19b02dd20ac7 | Read a task entry | [
{
"docid": "03086368f7beea814a0188d1ff37b314",
"score": "0.0",
"text": "def read\n end",
"title": ""
}
] | [
{
"docid": "a0b1c058db1bc6f9b1293761ac17a5e3",
"score": "0.71123385",
"text": "def read(entry); end",
"title": ""
},
{
"docid": "8e34b229de5e588f1ef7dab465ce0635",
"score": "0.6955906",
"text": "def task(task_name)\n task_filename = File.join(@directory, task_name.to_s)\n retur... |
2cf7764f74266fb91df997212e8ca7ae | GET /deployment_logs/1 GET /deployment_logs/1.json | [
{
"docid": "ce4fecdd2a780e7a07208d2ce3f75549",
"score": "0.7497729",
"text": "def show\n @deployment_log = DeploymentLog.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @deployment_log }\n end\n end",
"title": ""
}
] | [
{
"docid": "830987924b00a897fcf1a5ca7d8d0392",
"score": "0.7573733",
"text": "def index\n @deployment_logs = DeploymentLog.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @deployment_logs }\n end\n end",
"title": ""
},
{
"docid":... |
7a54575dc5a75e0ccf92a3ee1ec63108 | Blocks the main thread until the poll thread runs the callback. | [
{
"docid": "ebb5ec632e9c4af41fd29a34ff4ca161",
"score": "0.64038545",
"text": "def wait_for_callback\n turnstile.wait unless paused\n end",
"title": ""
}
] | [
{
"docid": "4fc0881dea877b33fe635d6e62534340",
"score": "0.71407604",
"text": "def wait!\n until query_done?\n check_cancel\n periodic_callback\n sleep @poll_every\n end\n check_errors\n end",
"title": ""
},
{
"docid": "cb2e72278bc5763d380aea6f2a354399"... |
dc349829dbf35b3a76c7caeec1e30562 | Filters work more or less in the same way as WP. You pass in an argument and run it through the filters and then it is returned to you. | [
{
"docid": "f9055be17144082af4a926bd9d3cf1e8",
"score": "0.541458",
"text": "def apply_filter(name,arg)\n log_action(\"Applying filter: \" + name)\n return arg if not @code\n cvrt = nil\n cvrt = arg.class\n if @filters[name.to_sym] then\n @filters[name.to_sym].each do |callback|\n ... | [
{
"docid": "136e8a91c5fc32bf533a7fe05c3b929c",
"score": "0.6365362",
"text": "def call_filters(*args)\n ret = super\n apply_sweet_assets\n ret\n end",
"title": ""
},
{
"docid": "6d737e1aeb135a590643570e132e2b08",
"score": "0.61403674",
"text": "def f... |
61708402742bc91d1c0cbf3fb23d3df0 | update activity, or render edit page with errors list | [
{
"docid": "6a584d6b9d9e9b049e760d8403099c39",
"score": "0.70773387",
"text": "def update\n @activity = Activity.find(params[:id])\n if @activity.update(activity_params)\n redirect_to activities_url\n flash[:success] = \"Activity updated successfully!\"\n else\n render 'edit'\n... | [
{
"docid": "b6e5a2884775b24cf501d22bfcdcfb38",
"score": "0.7437967",
"text": "def update\n respond_to do |format|\n if @activity.update(activity_params)\n format.html { redirect_to @activity, notice: I18n.t('crud.updated', model: Activity.model_name.human) }\n format.json { head :n... |
ae4a263722c48a90e20b8f5109e8a116 | PATCH/PUT /cakes/1 PATCH/PUT /cakes/1.json | [
{
"docid": "37e1ecd9ab2b33dc2f904b9a619d83dd",
"score": "0.0",
"text": "def update\n if (session[:user_id] == nil) || (session[:role] == false)\n puts \"here is flavors new, but this person is not admin --> go to users path\"\n flash[:notice] = 'You are not allowed to this page'\n redi... | [
{
"docid": "d5eaea298e64625a71a15a970f3b75ed",
"score": "0.68213767",
"text": "def patch *args\n make_request :patch, *args\n end",
"title": ""
},
{
"docid": "8a1fcbdae3046e2102f533f681b61c66",
"score": "0.6270017",
"text": "def update_contact\n url = Addressable::URI.new(\n ... |
cd2ed07c90030521b8d8c61dd18397a6 | GET /game_saves/1 GET /game_saves/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "9f4850f88996cb7f16763ec614c94473",
"score": "0.73467755",
"text": "def index\n @game_saves = GameSave.all\n end",
"title": ""
},
{
"docid": "ebcd05e2ac688a3c776c6481a9e2cc31",
"score": "0.65899134",
"text": "def index\n @saves = Save.all\n end",
"title": ""
... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "05975a73aa963b078b7e7f6aa006a17c",
"score": "0.0",
"text": "def importer_params\n params.require(:importer).permit(:company, :invoice_num, :invoice_date, :operation_date, :amount, :reporter, :notes, :status_id, :category, :operation_id)\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... |
024bc3e39813d52cc7d31e6e01b869ce | PATCH/PUT /member_statuses/1 PATCH/PUT /member_statuses/1.json | [
{
"docid": "378938d92147fa42ad0efd201847cbfc",
"score": "0.6781098",
"text": "def update\n respond_to do |format|\n if @member_status.update(member_status_params)\n format.html { redirect_to @member_status, notice: 'Member status was successfully updated.' }\n format.json { render ... | [
{
"docid": "9fd066f3832da0d076818cf04f153bcb",
"score": "0.67822343",
"text": "def update\n\n #LA\n #@status = current_user.statuses.find(status_params)\n\n #if (status_params) && (status_params).has_key?(:user_id)\n # (status_params).delete(:user_id) \n #end\n\n respond_to do |format... |
643ed83f45949c22706bcbae7bd2d9db | Only process spec files | [
{
"docid": "41579fcb502dcdddc060ec94bfe53e38",
"score": "0.63662165",
"text": "def relevant_file?(file)\n file.end_with?('_spec.rb')\n end",
"title": ""
}
] | [
{
"docid": "b0c5cfc19f03d01dd8d20cadc01698e5",
"score": "0.69062513",
"text": "def decide_files(file)\n return file if file\n spec_files\n end",
"title": ""
},
{
"docid": "29a4697b78f829b33498300c3d52732c",
"score": "0.6768028",
"text": "def decide_files(file)\n r... |
50f9ff890ab95b541d8967a20224b440 | def copy_default_css directory "stylesheets" , "public/stylesheets" end | [
{
"docid": "2197c645818bb4230a9cc2807a363b54",
"score": "0.6547817",
"text": "def copy_default_layout_and_partials\n directory \"views\" , \"app/views\"\n end",
"title": ""
}
] | [
{
"docid": "8dcba15ad1513e7d53f9a55efe212d84",
"score": "0.8037006",
"text": "def copy_stylesheets\n FileUtils.mkdir_p \"app/assets/stylesheets/base\"\n\n #Copy variable file\n copy_file \"../../vendor/assets/stylesheets/theeleven-flex/_defaults.scss\", \"app/assets/stylesheets/base... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "ec8e7e7fdfabbf12dc2841f4b61db9b3",
"score": "0.0",
"text": "def power_transformer_params\n params.require(:power_transformer).permit(:name, :number)\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.6980629",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.67819995",
"text": "def strong_params\n params.requ... |
3db1f6a14f1c62183a6eafd27a0497cb | renames a file to a new name and checks if a file exists first | [
{
"docid": "e52f9d2b3dae7b396b8094be38cc920c",
"score": "0.62711227",
"text": "def rename(name)\n config = Config.create\n newname = config.namespace(name)\n newpath = config.namespace_path(name)\n newfile = self.class.create newname\n FileUtils.mv @path, newpath\n compose ... | [
{
"docid": "2c8844f21230a728e8a1f41d35e656d7",
"score": "0.7993463",
"text": "def rename_if_exists(file)\n if File.exist? file\n rename = \"#{file}_#{Time.now.to_i}\"\n puts \"File '#{file}' exists\".warn\n puts \"Renamed '#{file}' to '#{rename}'\".tell\n FileUtils.mv(fi... |
e2dcd4b5a5e5beaaf64a3067712a88a3 | accepts index and value and assigns it appropriately | [
{
"docid": "285c910109aa3bd5171c78202e609bca",
"score": "0.0",
"text": "def move(index, value = \"X\")\n @index = index\n @value = value\n @board[@index] = @value\n end",
"title": ""
}
] | [
{
"docid": "06bfa0f551a55e04620e9d5ad4084c53",
"score": "0.76228553",
"text": "def set(index, value)\n # implement\n end",
"title": ""
},
{
"docid": "09236c17fed93ce1ab4e7660ffe30094",
"score": "0.75910336",
"text": "def assign(index, value)\n node = find(index)\n node.valu... |
2741cc6de9d09eab3daa5274ca1ff038 | Render a manifest as a raw json file Order of operations: Spotlight's pregenerated manifest > modified manifest (catalogmanifest) > mirador_fullscreen > Mirador partial (renders modified manifest). Catalogshow calls openseadragon_default view, which has an iframe to mirador_fullscreen. See | [
{
"docid": "cf05a9b68dc6d8e22bc6feda018de07b",
"score": "0.6407003",
"text": "def manifest\n _, @document = fetch params[:id]\n if @document.uploaded_resource?\n @resource = @document.uploaded_resource\n if @resource.file_type == \"image\"\n source_m = Spotlight::I... | [
{
"docid": "48ff2b7caff301396722c4eed77ee0e0",
"score": "0.71430504",
"text": "def manifest\n headers['Access-Control-Allow-Origin'] = '*'\n \n json = sanitize_manifest(JSON.parse(manifest_builder))\n \n respond_to do |wants|\n wants.json { render json: json }\n wants.html... |
967e53d9ba7b7484da108de60583e17a | Returns the text of the success message on the page. | [
{
"docid": "a7d0bb5a73984af3b76eb9ffcd9cdccc",
"score": "0.72658485",
"text": "def confirmation_text\n frm.div(:class=>\"portletBody\").div(:class=>\"success\").text\n end",
"title": ""
}
] | [
{
"docid": "7e3753ec3ee2ae317a8309f96045e17f",
"score": "0.75062996",
"text": "def alert_success\r\n self.alert_success_information_element.when_present.text\r\n end",
"title": ""
},
{
"docid": "82d4ff1a561fcfe8c22ab767cb02b9c3",
"score": "0.74781996",
"text": "def alert_message_t... |
7bcfca6684942b444a02882436d059f9 | Handle With Exception returns [Result::Base] | [
{
"docid": "db39eeceb5b5b090f30e7839742aa01a",
"score": "0.6426333",
"text": "def handle_with_exception(uri)\n begin\n Timeout.timeout(@timeout) do\n http = setup_request(uri)\n result = yield(http)\n success_with_data({http_response:result})\n end\n re... | [
{
"docid": "3dd49bf89ca13eba8cb278cfe6edcd89",
"score": "0.76213396",
"text": "def rescue_result; end",
"title": ""
},
{
"docid": "4aa22dfe53d206616edcdeb4ad0d5a32",
"score": "0.7370105",
"text": "def handler_for_rescue(exception); end",
"title": ""
},
{
"docid": "fc37a75... |
ad13211a04b8c1d639509e879204d7a0 | clever solution grabbed from LeetCode comments signficantly faster than solution using set | [
{
"docid": "3ae1591c785e70ed3953541683f9b5bb",
"score": "0.0",
"text": "def length_of_longest_substring(s)\n stack = []\n highest_count = 0\n s.each_char do |c|\n unless index = stack.index(c)\n stack.push(c)\n else\n stack.push(c)\n # stack = stack[(index+1)..-1]\n # you co... | [
{
"docid": "595cd38db602ee29e5e5c56a109b6362",
"score": "0.7047171",
"text": "def problem_118\n # Return hash with the keys being a sorted array or sorted arrays of\n # suitable elements\n def problem_118_solve(set,d)\n good = {}\n d.length.downto(1) do |n|\n d.combination(n) do |a|\n ... |
cb8bcb06a70bc4408a38eb498ae409b7 | From the given command and arguments / params, attempt to recognize the command and convert it to an event which can be used for other stuff. | [
{
"docid": "15aebbbea730cd3d254707b7cce18b60",
"score": "0.66580796",
"text": "def to_event\n if self.code =~ /^\\d+$/\n ev = @@commands[:numeric].dup\n data = @params[0..-2]\n data << \"#{@params.last.include?(\" \") ? \":\" : \"\"}#{@params.last}\"\n ev.raw_a... | [
{
"docid": "9b78505a9dfe716f8af80df0b39ba007",
"score": "0.6556276",
"text": "def call\n if event.command? && command_aliases.include?(event.command)\n handle_command\n end\n end",
"title": ""
},
{
"docid": "9dc344a3555f6fa7c59cea834ced69ac",
"score": "0.64130... |
6f429dba02eaf568537c7e3e230d9f6e | Helper to create all tile objects based on the width and height of the block | [
{
"docid": "4dca06a1beb5b702b7959303bae0b965",
"score": "0.76074284",
"text": "def buildTiles(x, y, width, height)\n tiles = []\n width.times do |i|\n height.times do |j|\n tiles << Tile.new(i * Tile::WIDTH + x, -(j+1) * Tile::HEIGHT + y)\n end\n end\n tiles\n end",
"ti... | [
{
"docid": "930e29f03f0d5f69ac7bbdfdc76506ca",
"score": "0.7503401",
"text": "def build_tiles\n @tiles = Array.new(@y_size) { |y| Array.new(@x_size) { |x| Tile.new(x, y) } }\n end",
"title": ""
},
{
"docid": "43452d2392d282713d2e3e124f6858f6",
"score": "0.7229194",
"text": "def c... |
f92f62459f2b933a69ae44fa68bee037 | Lookup a TLS reporting domain policy | [
{
"docid": "8081b3c5a625b12f57374847c1588046",
"score": "0.61511976",
"text": "def lookup_tls_reporting_domain_with_http_info(lookup_tls_reporting_domain_options, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: ToolsControllerApi.lookup_tls_report... | [
{
"docid": "dbb6252b3e31f6ae5b367745464f568e",
"score": "0.6409402",
"text": "def lookup_tls_reporting_domain(lookup_tls_reporting_domain_options, opts = {})\n data, _status_code, _headers = lookup_tls_reporting_domain_with_http_info(lookup_tls_reporting_domain_options, opts)\n data\n end",... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "1b0d47bc048d5b2315b78e3e42581da2",
"score": "0.0",
"text": "def concept_unit_params\n params.require(:concept_unit).permit(:cu_number, :cu_title, :cu_description, :cu_level, :cu_concept, :cu_explanation_1, :cu_explanation_2, :cu_reference_1, :cu_reference_2, :exercise_blpr_1, :exercise_... | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.74939764",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.6955084",
"text": "def strong_params\n params.require(:request).permit(param_whit... |
cc48c08b749d98775150362af0ae8a70 | GET /product_bulletins/1 GET /product_bulletins/1.json | [
{
"docid": "ce316861421a74e33890c5a4f509e968",
"score": "0.7305701",
"text": "def show\n @product_bulletin = ProductBulletin.find(params[:id])\n @bulletin_files = @product_bulletin.bulletin_files.all\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @... | [
{
"docid": "c55bc85d19cb184d1620da5c2c05f2ca",
"score": "0.6959821",
"text": "def index\n @bulletins = Bulletin.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @bulletins }\n end\n end",
"title": ""
},
{
"docid": "4124dd267be7947... |
e98f8882569fc362f00c7101d06dfbb9 | def find_a (arr) array = [] arr.map do |e| if e[0] == "a" array << e end end array end | [
{
"docid": "3f4730f50aff0943a0281d480155048b",
"score": "0.80191344",
"text": "def find_a (arr)\n arr.select do |i|\n i[0] == \"a\"\n end\nend",
"title": ""
}
] | [
{
"docid": "c4d16a9b7707f69d66e6c5f44ac3450e",
"score": "0.8876079",
"text": "def find_a(array)\n newarray = []\n array.each do |str|\n if str[0] == \"a\"\n newarray << str\n end\n end\n newarray\nend",
"title": ""
},
{
"docid": "1f4c9fc1bc770978e8b9131593c47d2c",
"score":... |
ac99720cd067b21b118a748098d2b701 | Encode as UTF8. If 'coerce_to_utf8' is set to true in the config, any nonUTF8 character would be replaced by the string specified by 'non_utf8_replacement_string'. If 'coerce_to_utf8' is set to false, any nonUTF8 character would trigger the plugin to error out. | [
{
"docid": "79d07bef2178ba8b61db2262c75572b9",
"score": "0.73405653",
"text": "def convert_to_utf8(input)\n if @coerce_to_utf8\n input.encode(\n 'utf-8',\n invalid: :replace,\n undef: :replace,\n replace: @non_utf8_replacement_string\n )\n else... | [
{
"docid": "743b3987d662a961d27dc3b293da586e",
"score": "0.7344881",
"text": "def convert_to_utf8(input)\n if @coerce_to_utf8\n input.encode(\n 'utf-8',\n invalid: :replace,\n undef: :replace,\n replace: @non_utf8_replacement_string)\n else\n b... |
1cd817042c288e3914880630a1e895dc | Returns true if the stream is empty which is equivalent to at_end? and at_beginning? both being true. | [
{
"docid": "4bb831809a5006f9eadff938a272790d",
"score": "0.75958866",
"text": "def empty?; at_end? and at_beginning?; end",
"title": ""
}
] | [
{
"docid": "a9028759356d8cbab7dcc4d7dc7f80ad",
"score": "0.81947535",
"text": "def empty?\n at_end? and at_beginning?\n end",
"title": ""
},
{
"docid": "5337888ebda4fcf1a117b375afce56e2",
"score": "0.81777364",
"text": "def at_beginning?\n wrapped_stream.at_end?\n end",
... |
e2e8bbbaf2672e63bde29e770d9efa37 | milestone titles must be unique across project and group milestones | [
{
"docid": "2f72a754f4ea2c44c8b6d077d04b1950",
"score": "0.6166908",
"text": "def uniqueness_of_title\n if project\n relation = self.class.for_projects_and_groups([project_id], [project.group&.id])\n elsif group\n relation = self.class.for_projects_and_groups(group.projects.select(:id), ... | [
{
"docid": "1a30c4580f809cc4bd72afb9aa2909ab",
"score": "0.68445885",
"text": "def milestone_name\n milestone ? milestone.name : 'None'\n end",
"title": ""
},
{
"docid": "6963ef682c9f285f81c367586139b229",
"score": "0.68344754",
"text": "def ensure_milestone(repository, milestone... |
bc06d7c5ae1270e24ca449235d9d7b89 | Method to print a list and make it look pretty input: grocery_list steps: print grocery_list to screen with item: quantity on each line output: prettified grocery list | [
{
"docid": "71fab4782208e152b2faf239aa782d52",
"score": "0.7309671",
"text": "def print_list(grocery_list)\n grocery_list.each do | key, value |\n \tputs \"#{key}: #{value.to_s}\"\n end\nend",
"title": ""
}
] | [
{
"docid": "1385eea34cdde63bc03cd34ef284246d",
"score": "0.8566892",
"text": "def pretty_list(grocery_list)\n grocery_list.each do |item, quantity|\n puts \"#{quantity} #{item}\"\n end\nend",
"title": ""
},
{
"docid": "1385eea34cdde63bc03cd34ef284246d",
"score": "0.8566892",
"te... |
f276bee595ed78a33310e9c53721cf29 | PUT /organizations/1 PUT /organizations/1.xml | [
{
"docid": "d9adfa3f9fdada73e2cf7a461d93ae66",
"score": "0.65409565",
"text": "def update\n @organization = Organization.find(params[:id])\n\n respond_to do |format|\n if @organization.update_attributes(organization_params)\n flash[:notice] = ts('edit.successful', :what => Organization... | [
{
"docid": "bd230d60c3aebe873863c8feb0e4c0bd",
"score": "0.7073053",
"text": "def update\n @organization = Organization.find(params[:id])\n @organization.update_attributes(params[:organization])\n \n respond_with(@organization, :location => admin_organizations_path)\n end",
"title": ""
... |
2d10132a6e41dc317dc42d541955880f | Delete Notification Rule Step Deletes a notification rule step using user identifier, rule id, notification rule step id | [
{
"docid": "bfd026c63700288843159cdaf5a6615d",
"score": "0.70829",
"text": "def delete_notification_rule_step(identifier, rule_id, id, opts = {})\n data, _status_code, _headers = delete_notification_rule_step_with_http_info(identifier, rule_id, id, opts)\n return data\n end",
"title": "... | [
{
"docid": "555287f0fc8caeb04c3c48d5dc74113d",
"score": "0.6872617",
"text": "def delete_notification_rule_step_with_http_info(identifier, rule_id, id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: NotificationRuleStepApi.delete_notification_ru... |
05a6ad08b3db8a6ad9aa8e23f38b0695 | get_sources returns an array of sources available for each query. | [
{
"docid": "ef7f3012891e32569257caaafa572be1",
"score": "0.7242831",
"text": "def get_sources\n @sources\n end",
"title": ""
}
] | [
{
"docid": "e80ba6d306b97015923c5524f59722fb",
"score": "0.81731975",
"text": "def sources\n (query[:sources] || []).map { |id| PublicEarth::Db::Source.find_by_id(id) }\n end",
"title": ""
},
{
"docid": "f4e0e42e4719657b54d506c2ddda2f22",
"score": "0.7868431",
"te... |
6e24efa6e619cf96b2587755251693d1 | duplicate code & long method | [
{
"docid": "0ddb0604b3e43cb3bd908f2fcf1ff7e4",
"score": "0.0",
"text": "def upvote\n @vote[:direction] = true\n @vote.save!\n redirect_to :back\n end",
"title": ""
}
] | [
{
"docid": "ef1e4c0cc26e4eec8642a7d74e09c9d1",
"score": "0.64746916",
"text": "def private; end",
"title": ""
},
{
"docid": "ad244bd0c45d5d9274f7612fa6fee986",
"score": "0.604933",
"text": "def suivre; end",
"title": ""
},
{
"docid": "bc658f9936671408e02baa884ac86390",
... |
eaf3d8165533f279254d33d9d152f910 | Finds a point with the matching number. | [
{
"docid": "d0d2dbe29b99c2ac9756e8cbfde575ce",
"score": "0.85007966",
"text": "def find_by_number(number)\n points.find { |p| p.number == number }\n end",
"title": ""
}
] | [
{
"docid": "41ce6fefcfed6f3926f21cf8961a900a",
"score": "0.69621587",
"text": "def find_point(pt)\n ret = -1\n @data_pts.each_with_index do |dp,i|\n if DataPoint.match(dp,pt)\n ret = i\n break\n end\n end\n ret\n end",
"title": ""
},
{
"... |
cf63404f766c9ad2bd72c3f93e20a279 | internal: examines, whether element of given type (row, cell, column) and index exists or not. Returns the element or nil if not existent. | [
{
"docid": "94492a3be31408c6f347b3ac906c2cf0",
"score": "0.7254182",
"text": "def getElementIfExists(parent,type,index)\n die(\"getElementIfExists: invalid type #{type}\")\n die(\"getElementIfExists: parent is not a REXML::Element\") unless (parent.class.to_s == \"REXML::Element\")\n die(\"getE... | [
{
"docid": "a4423eed653991f6f17ebbc1fed27d35",
"score": "0.72186816",
"text": "def getElementIfExists(parent,type,index)\n die(\"getElementIfExists: invalid type #{type}\")\n die(\"getElementIfExists: parent is not a REXML::Element\") unless (parent.class.to_s == \"REXML::Element\")\n die... |
4afb1d19ccae8e2db5d241f0f6dab05e | For the "All taxa" and "Subgenera" special cases, because this would be confusing/false: "Formicidae ... Lasius species > Lasius subgenera" "Formicidae ... Lasius species > All Lasius taxa" | [
{
"docid": "34a8d7dc9fbc622e84d4d75dd7d37a08",
"score": "0.5158477",
"text": "def show_only_genus_name? selected\n selected.is_a?(Genus) &&\n params[:display].in?([\n \"all_taxa_in_genus\",\n \"subgenera_in_genus\",\n \"subgenera_in_parent_genus\"\n ])\n end",
... | [
{
"docid": "85921ba8c43afb079b59bdb02963e311",
"score": "0.6750368",
"text": "def taxa_genus_and_subgenus_pair? taxa\n taxa.pluck(:type).sort == [Rank::GENUS, Rank::SUBGENUS]\n end",
"title": ""
},
{
"docid": "403d244446f9b16259302c0437d868e1",
"score": "0.6396263",
"text": "def ... |
b9102d53a242a347584bd3dbfc1d968f | PATCH/PUT /identifier_types/1 PATCH/PUT /identifier_types/1.json | [
{
"docid": "84447be88a74fef9cff4564b7747d7ca",
"score": "0.6907175",
"text": "def update\n respond_to do |format|\n if admin? and @identifier_type.update(identifier_type_params)\n format.html { redirect_to @identifier_type, notice: 'Identifier type was successfully updated.' }\n fo... | [
{
"docid": "49b02b247a2b01585690c4575f7376f0",
"score": "0.69967574",
"text": "def patch_entity_type(entity_type_id, request)\n start.uri('/api/entity/type')\n .url_segment(entity_type_id)\n .body_handler(FusionAuth::JSONBodyHandler.new(request))\n .patch()\n .go... |
b6a2016271c34ff1b48ce4e567178a39 | Update this object on the index, creating or updating the document. | [
{
"docid": "9a6663995a9efca3b176a34c58f71b38",
"score": "0.8213232",
"text": "def update\n self._id, @created = self.class.index_document(_id, to_document)\n end",
"title": ""
}
] | [
{
"docid": "71406c6ee3c879f3af9bab6a1af05d3b",
"score": "0.74387634",
"text": "def update(object)\n @index.key_persisted(object)\n end",
"title": ""
},
{
"docid": "e9c0e44503e93a90e3c8f27474bb5271",
"score": "0.73614186",
"text": "def update_index\n self.class.in... |
a2099a77c85e91272ae2f9e35b937953 | Only allow a trusted parameter "white list" through. | [
{
"docid": "5626e15267c81c07f516eee6f4a9dd30",
"score": "0.0",
"text": "def game_history_params\n params.require(:game_history).permit(:player_one, :player_two, :p_one_score, :p_two_score)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.79439425",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "f6060519cb0c56a439976f0c978690db",
"score": "0.69581985",
"text": "def permitted_params\n params.permit!\n end",
"title... |
9652997a05d9ec1b7613b566ec42e0bb | GET /compras_documentos/1 GET /compras_documentos/1.xml | [
{
"docid": "8c9eb11cfa3e972686b599d781596386",
"score": "0.71126646",
"text": "def show\n @compras_documento = ComprasDocumento.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @compras_documento }\n end\n end",
"title": ""... | [
{
"docid": "3ec79d55538f6a0e92f7ec97f3235cef",
"score": "0.72842306",
"text": "def index\n @documentos = @externo.documentos.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @documentos }\n end\n end",
"title": ""
},
{
"docid": ... |
fd7da52091c00c013014e77a182275f2 | GET /conditions GET /conditions.json | [
{
"docid": "2e619d557531ff7a83bb9d65a40eac09",
"score": "0.63295144",
"text": "def index\n @conditions = Condition.all\n end",
"title": ""
}
] | [
{
"docid": "d964b919b112fe5eaaccf3c8246bdce3",
"score": "0.7557195",
"text": "def get_conditions(params = {})\n request_by_ids(\"get-conditions\", params)\n end",
"title": ""
},
{
"docid": "16ed18a9562757cb02e88618a9948f3b",
"score": "0.73796314",
"text": "def conditions(quer... |
e6b90d01dadb5cb40166577e7159d92e | aliases for private methods | [
{
"docid": "473f0f112cb1ecc4bdf6209d68034351",
"score": "0.0",
"text": "def encode62 arg\n SmallUrl.send(:encode62, arg)\nend",
"title": ""
}
] | [
{
"docid": "9ae0171d634f4b121b11c92db40daf51",
"score": "0.75587076",
"text": "def alias_of; end",
"title": ""
},
{
"docid": "ef1e4c0cc26e4eec8642a7d74e09c9d1",
"score": "0.72878885",
"text": "def private; end",
"title": ""
},
{
"docid": "530e65cba197567f73b8125444ac33cc"... |
b21933c7db339f5d84f8ed1f49bf9da3 | A reference to the host devices service. Use this service to view the devices of the host object. | [
{
"docid": "6589722308b6f9425b503e4aeb8605ab",
"score": "0.8555731",
"text": "def devices_service\n @devices_service ||= HostDevicesService.new(self, 'devices')\n end",
"title": ""
}
] | [
{
"docid": "95bc1c5ad4630b53fccb2353ddc4ee4a",
"score": "0.8250861",
"text": "def host_devices_service\n @host_devices_service ||= VmHostDevicesService.new(self, 'hostdevices')\n end",
"title": ""
},
{
"docid": "ba3ac133ccc61430b394faa6f6c635f7",
"score": "0.7754289",
"text":... |
e561e11bcf379ef5dc139c210017366b | Only allow a list of trusted parameters through. | [
{
"docid": "9c066efb37ef554a57f17b49e2f8c343",
"score": "0.0",
"text": "def norma_params\n params.require(:norma).permit(:descricao, :idioma, :repositorio, :codigo)\n end",
"title": ""
}
] | [
{
"docid": "c1f317213d917a1e3cfa584197f82e6c",
"score": "0.69497335",
"text": "def allowed_params\n ALLOWED_PARAMS\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6812623",
"text": "def strong_params\n params.require(:listing_member).permi... |
baa4b30c41f2d83712f3c2e6c3b6c971 | POST /funcionarios_turmas POST /funcionarios_turmas.json | [
{
"docid": "b7871249c8b18aec095aa26a7c00567f",
"score": "0.7455318",
"text": "def create\n @funcionarios_turma = FuncionariosTurma.new(funcionarios_turma_params)\n\n respond_to do |format|\n if @funcionarios_turma.save\n format.html { redirect_to @funcionarios_turma, notice: 'Funcionar... | [
{
"docid": "ddae8cb88cefc33086ecc3dad2ec8030",
"score": "0.741108",
"text": "def funcionarios_turma_params\n params.require(:funcionarios_turma).permit(:funcionarios_id, :turmas_id, :stauts)\n end",
"title": ""
},
{
"docid": "121a48a7dda2aafb2383ddba778f328c",
"score": "0.6799874... |
5bdee671a70c7434bf66c203fca1fc73 | GET /forecasts/1 GET /forecasts/1.json | [
{
"docid": "f2464a382261241fcb25271af3408577",
"score": "0.7554648",
"text": "def show\n @forecast = Forecast.find(params[:id])\n\n respond_to do |format|\n format.json { render json: @forecast, serializer: ForecastWithStationSerializer }\n end\n end",
"title": ""
}
] | [
{
"docid": "f1f5cd46455f68e1419cf0068d062e86",
"score": "0.76860386",
"text": "def show\n @forecast = Forecast.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @forecast }\n end\n end",
"title": ""
},
{
"docid": "7f8d... |
2e40e04b34d31fdab9eba958011375e0 | do_bin_install The oldschool way. Compile everything!! | [
{
"docid": "b4a113283ba7143b5e0be4e3b92c2e02",
"score": "0.0",
"text": "def do_src_install\n\n puts \"Downloading source from ... \"+@source_url\n Download.new(@source_url, @src_dir)\n fp = FNParser.new(@source_url)\n src_tarball_fname, src_tarball_bname = fp.name\n # major, minor, patch ... | [
{
"docid": "b5aeeaf51c19d24c5c6e3aab1d9133c9",
"score": "0.7671891",
"text": "def do_bin_install\n\n puts \"Downloading binary packages from ... #{@bin_url}\"\n @bin_fname = @bin_url.split('/')[-1]\n @bin_fname_base = @bin_fname.split('.')[0..-3].join('.')\n\n Download.new(@bin_url, @src_dir... |
4e08cb4f8a654087df48cb910303204f | DELETE /recordpnnts/1 DELETE /recordpnnts/1.json | [
{
"docid": "1d3b3d4fd2da5811582bc5164ad62f93",
"score": "0.7160874",
"text": "def destroy\n @recordpnnt.destroy\n respond_to do |format|\n format.html { redirect_to recordpnnts_url, notice: 'Recordpnnt was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
... | [
{
"docid": "1dcc007f27864590e4036129dc921844",
"score": "0.70796525",
"text": "def destroy\n @record = Record.find(params[:id])\n @record.destroy\n\n respond_to do |format|\n format.html { redirect_to records_url }\n format.json { head :ok }\n end\n end",
"title": ""
},
{
... |
99b25debb6c62336b102b96dbf8c4bc7 | Compare the actual operation result to the expected operation result. | [
{
"docid": "2f75f49fd44e6b0225e2bdc4f7f98ea7",
"score": "0.8140231",
"text": "def compare_operation_result(actual)\n if actual.is_a?(Array)\n actual.empty? || @outcome['result'].each_with_index do |expected, i|\n compare_result(expected, actual[i])\n end\n else... | [
{
"docid": "9f289fd0ce2cee98babb7de5e861ac64",
"score": "0.7952705",
"text": "def verify_operation_result(actual)\n expected = test_instance.outcome['result']\n if expected.is_a?(Array)\n if expected.empty?\n expect(actual).to be_empty\n else\n expec... |
fe5b6c91e157bb70d6e4fd607b8a57bc | Hash max, min y promedio | [
{
"docid": "6ccf2dc128ee29463079a0bd1c546c9c",
"score": "0.66820836",
"text": "def maxMinProm arr\n hash = {}\n hash[:max] = arr.max\n hash[:min] = arr.min\n sum = 0 \n arr.each{|i| sum += i}\n hash[:promedio] = sum/arr.length\n puts hash\nend",
"title": ""
}
] | [
{
"docid": "58d8a053376762cfb338da3022cdc976",
"score": "0.6775112",
"text": "def hash\n [include_zero, max, min, scale].hash\n end",
"title": ""
},
{
"docid": "f851a63f65002bfa304386cddb1780c9",
"score": "0.676437",
"text": "def hash\n excl = @excl ? 1 : 0\n hash = exc... |
2df04855e155544246a227a708db15f2 | Display messages to ask the player to play | [
{
"docid": "8d3f4fbfb37ea402bd5a09f1f32816a8",
"score": "0.7389489",
"text": "def ask_player_to_play(player)\n\t\tputs \"\"\n\t\tputs \"Au tour de #{player.name} de jouer !\"\n\t\tprint \"#{player.name}, sélectionne une case : \"\n\tend",
"title": ""
}
] | [
{
"docid": "036c84851dd730cef395281e364c3725",
"score": "0.71690977",
"text": "def play\n # Currently just puts a name later will want to play\n puts \"Playing: #{name}\"\n end",
"title": ""
},
{
"docid": "4c8b42eb9206217fc42d6ed2e7ebbfaa",
"score": "0.7074749",
"text": "def p... |
ae2a0c9e0c13e8bdf361f8c5e10f1db0 | The command used to start. Generated if the 'binary' argument is passed. | [
{
"docid": "a3a135e61c50f6a9b16aeabe1a78902e",
"score": "0.7256074",
"text": "def startcmd\n if @resource[:binary]\n return @resource[:binary]\n else\n raise Puppet::Error,\n \"Services must specify a start command or a binary\"\n end\n end",
"title": ""
}
] | [
{
"docid": "407f560f76c6801d3bd14d2950f0c7bd",
"score": "0.6688251",
"text": "def command\n java_opts = []\n if ENV['JAVA_OPTS'].nil?\n java_opts = []\n else\n java_opts = ENV['JAVA_OPTS'].split(\" \")\n end\n @command = ([@binary] + java_opts).flatten\n end",
... |
15f02bc38fccc87c058ff4d25436cacb | display a list of help | [
{
"docid": "a1cbc455df94155793a8fdece417d3d5",
"score": "0.0",
"text": "def help\n puts \"plan #{Plan::VERSION} - john crepezzi - http://github.com/seejohnrun/plan\"\n COMMAND_GLOSSARY.each do |cmd, description|\n puts \"\\e[0;33m#{cmd}\\e[0m - #{description}\"\n end\n ... | [
{
"docid": "7c49d8fed218c9ef62cc5613260e208c",
"score": "0.79182404",
"text": "def help\n [['some command', 'description of some command'],\n ['some other command', 'description of some other command']]\n end",
"title": ""
},
{
"docid": "d3c4cdee0b2e8bc23c8a8f772700176a",
"score"... |
1d6d1329ac97c62b3556fc9ac6680037 | GET /games/new GET /games/new.xml | [
{
"docid": "02e9478712291522272675291a534a0e",
"score": "0.7117404",
"text": "def new\n\t\t@game = Game.new\n\n\t\trespond_to do |format|\n\t\t\tformat.html # new.html.erb\n\t\t\tformat.xml\t{ render :xml => @game }\n\t\tend\n\tend",
"title": ""
}
] | [
{
"docid": "9f463e95c6f3df37fb4ee2ae01803dfc",
"score": "0.75418216",
"text": "def new\n @game = Game.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @game }\n end\n end",
"title": ""
},
{
"docid": "9f463e95c6f3df37fb4ee2ae01803d... |
2d49b803351e21623738fe419ae3a630 | Returns an array of indexes for the given table. | [
{
"docid": "b1543ed1f099e4a9cbded624cb8316ad",
"score": "0.6156981",
"text": "def indexes(table_name, _name = nil)\n @connection.indexes.values.map { |ix|\n if ix.table_name == table_name.to_s && ix.index_name !~ /^rdb\\$/\n IndexDefinition.new(table_name, ix.index_name,... | [
{
"docid": "33d8e3a5d1fdb93329ed5f7d0c1de2bc",
"score": "0.71439433",
"text": "def list_indexes(table)\n @connection.exec(%{ SELECT * FROM pg_indexes WHERE tablename = '#{TABLES[table]}' })\n end",
"title": ""
},
{
"docid": "efea5ee2b1fac0505053096ff87edfad",
"score": "0.7084229"... |
0bdad6d50f23c5a974b7cb0d2444b7f6 | Returns the Field::FieldType associated with the named field. ==== Attributes +field_name+ The name of the field to reference. ==== Returns A Field::FieldType enumerated value. ==== Raises A GmsecException is thrown if the named field cannot be found. | [
{
"docid": "f1e3706c8b470fb635124934fc99da3f",
"score": "0.69048226",
"text": "def get_field_type(field_name)\n\t\tend",
"title": ""
}
] | [
{
"docid": "3f701f3e148bb4fb0d2e3199d27e4f62",
"score": "0.7642885",
"text": "def lookup_field_type(name)\n result = config.field_types.find(name)\n raise UnregisteredFieldTypeError, name if result.nil?\n\n result\n end",
"title": ""
},
{
"docid": "8f9574c6e4dc5ed825f1a5bcb... |
ffc6f00cf38b0bd782a891471708702c | GET /jobs GET /jobs.json | [
{
"docid": "53e791b57325cce7eecb8df8456bf807",
"score": "0.0",
"text": "def index\n #debugger\n #@jobs = Job.order(\"created_at DESC\")\n #@jobs = Job.where(['user_id != ?', current_user.id]).join(user).order(\"created_at DESC\").paginate(:page => params[:page], :per_page => 10)\n @jobs = Jo... | [
{
"docid": "e0d30cb0880ae58f5dd30199afee732c",
"score": "0.8199955",
"text": "def get_jobs()\n u = self.build_uri(\"/jobs\")\n response = @client.get(u, nil, ACCEPT_RDF)\n return response\n end",
"title": ""
},
{
"docid": "8a0695bb744593e3a36970adb8e0a14d",
"score": "0.... |
24513cf993907755139e268b1f6379c6 | Updates a single attribute and saves the record. This is especially useful for boolean flags on existing records. | [
{
"docid": "2c7f84a837b8d51d57f16000bf2ce6c6",
"score": "0.70559263",
"text": "def update_attribute(name, value)\n self[name] = value\n save\n end",
"title": ""
}
] | [
{
"docid": "a90f2cbfc0cb3b808db4c58b698bcdd1",
"score": "0.7347231",
"text": "def update_attribute!(attribute, value)\n send(\"#{attribute}=\", value)\n self.save!\n end",
"title": ""
},
{
"docid": "473d5958428a0c527a372d669dc70a72",
"score": "0.7143223",
"text": "def up... |
a6605327d02e9dd49a2541940f767620 | Requires the data param standard to JSON API | [
{
"docid": "dc20be183a4d1b5874022dd7031535ff",
"score": "0.68868524",
"text": "def data_params\n params.require('data')\n end",
"title": ""
}
] | [
{
"docid": "da841d6d0c0f64f70285662dd89a5969",
"score": "0.7163388",
"text": "def data\n params.require(:data)\n end",
"title": ""
},
{
"docid": "d034e8e7906ec3f4fbfaebf7341adb83",
"score": "0.6548924",
"text": "def request_data; end",
"title": ""
},
{
"docid": "108c3... |
223b5aca4f5a4f22edbc9d394f661e31 | 4 points Write the following method: grandfather_clock(&block) Accepts a block and calls it once for each hour that's passed today. grandfather_clock do puts "DONG!" end Output: The hour is 2 DONG! DONG! Hint: Use Time.new.hour to get the current hour. However, this returns an Integer between 0 and 23. You'll have to a... | [
{
"docid": "1557375396f2a17caba6f95ba751e8dc",
"score": "0.89490867",
"text": "def grandfather_clock(&block)\n current_time = Time.new.hour\n if current_time == 0\n current_time = 12\n end\n if current_time >= 13 && current_time <=23\n current_time -= 12\n end\n puts \"The hour is #{current_... | [
{
"docid": "d1a1f5a13418598524ba785ee32ca452",
"score": "0.9006703",
"text": "def grandfather_clock &block\n hour = Time.new.hour\n if hour >= 13\n hour = hour - 12\n end\n if hour == 0\n hour = 12\n end\n hour.times do\n block.call\n end\nend",
"title": ""
},
{
"docid": "2f8... |
17a74ca804d66390ada964aabc42e06c | Private Define suits Returns Hash | [
{
"docid": "279fbaf5e1595ba1ea064e1c105a99f0",
"score": "0.0",
"text": "def define_suits\n [{ 'name' => 'default',\n 'run_list' => [\"recipe[#{@cookbook}::default]\"] }]\n end",
"title": ""
}
] | [
{
"docid": "e6e42df7715a338ec9d4261ed6475cd7",
"score": "0.7553842",
"text": "def get_hash\n\t\t{}\n\tend",
"title": ""
},
{
"docid": "e6e42df7715a338ec9d4261ed6475cd7",
"score": "0.7553842",
"text": "def get_hash\n\t\t{}\n\tend",
"title": ""
},
{
"docid": "ef200ff818c310... |
5f3147979afa9ad0c8e9dac193782e85 | Writes all statistics on packets and messages processesed to $stdout | [
{
"docid": "10555a4878009791479e98ff990ed261",
"score": "0.0",
"text": "def show\n show_basic\n puts\n show_messages\n puts\n show_peers\n end",
"title": ""
}
] | [
{
"docid": "a59924251de0205705d6e5a4da1d4885",
"score": "0.7147031",
"text": "def show_basic\n puts \"#{@total_packet_count} total packets captured\"\n puts \"#{@rinda_packet_count} Rinda packets captured\"\n puts \"#{@drb_packet_count} DRb packets captured\"\n puts \"#{@drb_messages_sent} m... |