query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
9207f0cb8dbb18e5935e3171b35c4f77 | Method: move, gets the movement of the bird Precondition: Bird must exist Receives: a Bird object Returns: 'moved passed', the generic movement | [
{
"docid": "08737bdd1aa8939ce689ab6dd9467f74",
"score": "0.59299123",
"text": "def move\n\t\t'moved passed'\n\tend",
"title": ""
}
] | [
{
"docid": "eb72638438e00a627af55a98434ec518",
"score": "0.6235393",
"text": "def move; end",
"title": ""
},
{
"docid": "eb72638438e00a627af55a98434ec518",
"score": "0.6235393",
"text": "def move; end",
"title": ""
},
{
"docid": "edc036c892d7a77d9d28d3729fbd29e1",
"sc... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "1d003b2a93bfffa39606c82b365d1914",
"score": "0.0",
"text": "def usecase_params\n params.require(:usecase).permit(:what, :how)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7496729",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.6958585",
"text": "def strong_params\n params.require(:request).permit(param_white... |
4733cb37a29b80e2e7f16ba5f91e43e4 | GET /episodes/1 GET /episodes/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "1f3760c83aceee6619f89577d0441e53",
"score": "0.81999314",
"text": "def show\n @episode = series.episodes.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @episode }\n end\n end",
"title": ""
},
{
"docid": ... |
5e483a271932dd1865cc20469f6fac6d | GET /transactions/1 GET /transactions/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "8c881930159a0e4227bb5dead3cb4e4c",
"score": "0.7966354",
"text": "def transactions(params = {})\n request(:get, '/transactions', params)\n end",
"title": ""
},
{
"docid": "6c8d0bb89b3254ce41f23ee95c5e6976",
"score": "0.7854261",
"text": "def index\n json_respon... |
7a7a40d811665093875c81cbf3090908 | Changes the amount of money player owns | [
{
"docid": "aee68e117d6719051a74c75492cf24a6",
"score": "0.64465386",
"text": "def test_change_player_money()\n change_player_money(@player,100)\n assert_equal(100,player_money(@player))\n end",
"title": ""
}
] | [
{
"docid": "d6cae318c7cecfa2f0506dbd8aefb19c",
"score": "0.7037048",
"text": "def money=(v)\n $game_party.gold = v.to_i\n end",
"title": ""
},
{
"docid": "2a099681a0adb1559cf4d8269462b421",
"score": "0.70175016",
"text": "def pay_player(player)\n player.add_balance(200... |
ef1089bd200de44bd3dea26a968a92db | returns a MOLECULE_TYPE in the ID line. A shortcut for Bio::SPTRid_line('MOLECULE_TYPE'). | [
{
"docid": "409d8476e82bea268f2ebabf9808ce07",
"score": "0.76793957",
"text": "def molecule\n id_line('MOLECULE_TYPE')\n end",
"title": ""
}
] | [
{
"docid": "5248f333059b8c00c3caa3cb6f76b247",
"score": "0.61030143",
"text": "def idtype\n @idtype ||= \"#{id}:#{type}\"\n end",
"title": ""
},
{
"docid": "4012a321213c539d729fff374fb3c6a7",
"score": "0.6014364",
"text": "def type_id() end",
"title": ""
},
{
"docid":... |
1777e0aff4be3ba4ac4b9351eb66e198 | Store construction variables for merging into the Cache. | [
{
"docid": "4acbdfefdf92e640b20f4fccba6ac50c",
"score": "0.0",
"text": "def store_merge(vars, options = {})\n store_vars = store_common(options)\n store_vars[\"merge\"] ||= {}\n vars.each_pair do |key, value|\n store_vars[\"merge\"][key] = value\n end\n end",
"title": "... | [
{
"docid": "74d75a27bbedd1653bda99b588ac0687",
"score": "0.6717948",
"text": "def initialize_variables\n self.obj_key ||= OBJECT_KEY_PROC_DEFAULT # identifies the object of this class, defaults to the object's id if defined\n\n self.methods_to_be_cached ||= Set.new # stores the names of t... |
0abfefc5aa7a5a2c2e4356dae2197774 | PATCH/PUT /spell_durations/1 PATCH/PUT /spell_durations/1.json | [
{
"docid": "f87c20aa5f1edf739b57d990e1ef7588",
"score": "0.7669317",
"text": "def update\n respond_to do |format|\n if @spell_duration.update(spell_duration_params)\n format.html { redirect_to @spell_duration, notice: 'Spell duration was successfully updated.' }\n format.json { ren... | [
{
"docid": "5581db7386ba0ab7600b3f23cb69404b",
"score": "0.7195452",
"text": "def update\n @spell = Spell.find(params[:id])\n\n if @spell.update(spell_params)\n head :no_content\n else\n render json: @spell.errors, status: :unprocessable_entity\n end\n end",
"title": ""
},
... |
ec7867b9c1766213b4bd1601e91326d9 | PATCH/PUT /updates/1 PATCH/PUT /updates/1.json | [
{
"docid": "10a5c30630af795a473074adcbc8057c",
"score": "0.61650366",
"text": "def update\n respond_to do |format|\n if @update.update(update_params)\n format.html { redirect_to @update, notice: 'Update was successfully updated.' }\n format.json { render :show, status: :ok, locatio... | [
{
"docid": "576f27e4c99d0868b0454fedc7deba0c",
"score": "0.7062567",
"text": "def update # PATCH\n raise NotImplementedError\n end",
"title": ""
},
{
"docid": "691bbc019c1e28ecb603a3b43974b6c1",
"score": "0.68510747",
"text": "def update!(**args)\n @client = args[:cl... |
3643cb4197b561b8e7c53a65cb8286e6 | Removes leading whitespace from self, returning nil if no change was made. See also Stringrstrip! and Stringstrip!. " hello ".lstrip => "hello " "hello".lstrip! => nil | [
{
"docid": "078da1975b8d40acb654c4cd3c9dfc06",
"score": "0.70209485",
"text": "def lstrip!\n return if @num_bytes == 0\n\n start = 0\n\n ctype = Rubinius::CType\n\n while start < @num_bytes && ctype.isspace(@data[start])\n start += 1\n end\n\n return if start == 0\n\n modify!\n... | [
{
"docid": "b269bf223b6d41acba70e96e969446c1",
"score": "0.79784983",
"text": "def lstrip!\n raise FrozenError, \"can't modify frozen String\" if frozen?\n s = self.lstrip\n (s == self) ? nil : self.replace(s)\n end",
"title": ""
},
{
"docid": "f8f423d0b7d7b30ea3696ecf657a0aa6",
... |
eb893abcc0bcfa3bfded0f1594a18c27 | pick an appropriate zoom given the provided bounding box | [
{
"docid": "486f1fc8ec253ed8948ef06e36e8b5d2",
"score": "0.6952934",
"text": "def pick_zoom\n self.zoom = calculate_zoom(west, east)\n end",
"title": ""
}
] | [
{
"docid": "e8fc53ebbad2b73bbaf2e78d56741010",
"score": "0.64546365",
"text": "def zoom_into_select_rect()\n\tputs 'pofff'\n z1 = [@darea.allocation.width.to_f / (@sx1 - @sx2).abs, @darea.allocation.height.to_f / (@sy1 - @sy2).abs].min\n if z1 < ZOOM_FACTOR_SELECT_MAX # else selection rectangle wi... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "a6184da934486115dea332ac3a7cfffb",
"score": "0.0",
"text": "def set_link\n @link = Link.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... |
127ca92acff79b49bcc070f51b448037 | Yield RDF statements after expanding property values | [
{
"docid": "b92312a3a8a1e8f5d91ca5d379decf5b",
"score": "0.6946699",
"text": "def rdf_values(subject, property, value)\n ::JSON::LD::API.toRdf({'@id' => subject.to_s, property => value}, expandContext: context) do |statement|\n statement.object = RDF::Literal(statement.object.value) if state... | [
{
"docid": "78fed4bdaf623646f6b7aaa153e0bb12",
"score": "0.626338",
"text": "def each\n if block_given?\n self.class.properties.each do |name, property|\n if value = read_attribute(name)\n if self.class.reflect_on_association(name)\n value.each do |val|\n ... |
37df7496fa232d8be79146fee6f5d61b | allows specification of view specific stylesheets use: stylesheet('home') | [
{
"docid": "388987fa74dfa50e88e02d4128438642",
"score": "0.6432269",
"text": "def stylesheet(*args)\n content_for(:stylesheets) { stylesheet_link_tag(*args) }\n end",
"title": ""
}
] | [
{
"docid": "3fb53e1e6d9f7da4a243368fb3c71c38",
"score": "0.7291732",
"text": "def stylesheet; end",
"title": ""
},
{
"docid": "98e2a73096a7fdc0a6ba2d544635401f",
"score": "0.72799397",
"text": "def stylesheet hash = 'home'\n hash = {:id => hash} if hash.is_a? String\n hash.upda... |
2767e87479b878d718c9e51da0b76e3d | GET /coupon_codes GET /coupon_codes.json | [
{
"docid": "a62834451fb168d2744cb1127fec98b5",
"score": "0.75752866",
"text": "def index\n @coupon_codes = CouponCode.all\n end",
"title": ""
}
] | [
{
"docid": "a6132dd4ff9b9fd9eeabb3e7c0bf0ed4",
"score": "0.72132564",
"text": "def show\n @coupon = Coupon.find_by(code: params[:id])\n if @coupon\n render json: { status: @coupon.status,\n discount: @coupon.promotion.discount,\n promotion_name: @coupon... |
a2099a77c85e91272ae2f9e35b937953 | Only allow a trusted parameter "white list" through. | [
{
"docid": "fd46f1c69aeeb1d0b5e42a595557e934",
"score": "0.0",
"text": "def blog_params\n params.require(:blog).permit(:author, :subject, :content)\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": "... |
22ac25275060f621ff95574940dd7720 | Returns the marketplace app type (string value) | [
{
"docid": "4a6ba6b08ddc337bbfe12182c2b74186",
"score": "0.8600439",
"text": "def type_str\n MARKETPLACEAPP_TYPES[type]\n end",
"title": ""
}
] | [
{
"docid": "992907c6778f6b0faf070ca0a9d38365",
"score": "0.7627271",
"text": "def app_type\n @app_type || @detected_app_type\n end",
"title": ""
},
{
"docid": "3482516f579c90cebeb0be25af6df2cd",
"score": "0.74916935",
"text": "def get_app_type(app_name)\n app_type = eval(\"g... |
7d6d23de8d5fad6da26423f82a8e846c | GIRO: METHODS new AND create work as a pair GIRO: METHODS edit AND update work as a pair | [
{
"docid": "9bf1e3c491fd36adf02089cf54610b45",
"score": "0.0",
"text": "def edit\n @broodmare = Broodmare.find(params[:id])\n # @stallion_options = Stallion.all.map do |stallion| [stallion.name, stallion.id] end\nend",
"title": ""
}
] | [
{
"docid": "1ee31a26583739bbb2465efce726a733",
"score": "0.63439023",
"text": "def create_new_work(params)\n @log.info 'Configuring work attributes'\n\n # set depositor\n depositor = User.find_by_user_key(@config['depositor'])\n raise 'User ' + @config['depositor'] + ' not found.' if depositor.nil?\... |
157979c7a375c3cfef91555f56dfca52 | Method to expose the status of the Hammer | [
{
"docid": "054d1f897250c81bb12983ccd7cc0a1f",
"score": "0.60891837",
"text": "def running_status\n return @running\n ahn_log.hammer.debug \"Status requested...sent as #{@running.to_s}...\"\n end",
"title": ""
}
] | [
{
"docid": "cde0a8c373f1ef64f16008b96008083e",
"score": "0.69112086",
"text": "def status\n @wrapper.status\n end",
"title": ""
},
{
"docid": "8e7eb7163bb4aa7b818193c996b3c079",
"score": "0.6857058",
"text": "def health_status\n data.health_status\n end",
"title":... |
d3cb8d7aeb4c3de72c4f968ef4d14f7c | force to force ocr geocode to do the geocoding | [
{
"docid": "199be9afb8ddaff24009739a5b732d47",
"score": "0.6898171",
"text": "def perform(map, force=false, geocode=true)\n\n filename = nil\n if map.mask_status == :masked\n filename = map.masked_src_filename\n else\n filename = map.unwarped_filename\n end\n\n return if filenam... | [
{
"docid": "b6ba753ad192d5c6abb58f0a5eef9c01",
"score": "0.7358126",
"text": "def geocode\n fail\n end",
"title": ""
},
{
"docid": "8d7e7a3fd86fb9ad53a0281572427902",
"score": "0.71910286",
"text": "def reverse_geocode?; end",
"title": ""
},
{
"docid": "e4fd5f... |
711416399546e7aa48341b057266bbbc | Returns 'Get Offer' button | [
{
"docid": "a324f1536d144dd03501b31b5b1d6a7c",
"score": "0.77884746",
"text": "def get_offer_button\n $tracer.trace(__method__)\n return ToolTag.new(a.className(create_ats_regex_string(\"ats-rcm-getoffer\")), __method__, self)\n end",
"title": ""
}
] | [
{
"docid": "f1aa12f186f414b76e0f01c74dc46509",
"score": "0.6400868",
"text": "def choose_store_button\n $tracer.trace(__method__)\n return ToolTag.new(div.className(\"storeunit\").find.a, __method__)\n end",
"title": ""
},
{
"docid": "c7342f46b8fe4a79e848f8ba509b1a8d",
"... |
371a8628cc2e77708dbe2b62ee8ce92b | host a +Host+ instance. operation a +Roomorama::Client::Operations::Diff+ instance client a +Roomorama::Client+ instance properly configured | [
{
"docid": "4b0e9ddcaf1455ca746463a74bee0012",
"score": "0.6428983",
"text": "def initialize(host, operation, client)\n @host = host\n @operation = operation\n @roomorama_client = client\n end",
"title": ""
}
] | [
{
"docid": "06f1a4c14f4995f713e74b1c38709503",
"score": "0.628304",
"text": "def host=(new_host); end",
"title": ""
},
{
"docid": "258993646ad76afc014b6ba2afa5c272",
"score": "0.6018392",
"text": "def host(host)\n @api.host = host\n end",
"title": ""
},
{
"doc... |
28574053f8bb68fe3f86d190d689dae5 | Calculate the mean of all items of a questinnaire possible results are numbers between 1 and 7. Also there is no correct or false results | [
{
"docid": "6096412910ad68d4f65f1074a37f86c0",
"score": "0.0",
"text": "def score_fragebogen \n if (responses - [0]).size == 0 \n return 0\n end\n return (responses.map{|x| x == nil ? 0:x}.sum.to_f / (responses - [0]).size).round(1)\n end",
"title": ""
}
] | [
{
"docid": "55c07d5080671351ee31482774db52ed",
"score": "0.72491324",
"text": "def mean\n\t\tsum = 0.0\n\t\t@results_list.each do |u, m, r, p|\n\t\t\tsum += (r - p).abs\n\t\tend\n\t\treturn sum / @results_list.length\n\tend",
"title": ""
},
{
"docid": "8db554572d83224ac17e00fb32d35aa9",
... |
ed083c8fe8f8c7b7351fade93efd6317 | POST /campaigns_to_dos POST /campaigns_to_dos.json | [
{
"docid": "5292ed9ebc892cf221d3522f66b03c39",
"score": "0.67036206",
"text": "def create\n @campaigns_to_do = CampaignsToDo.new(campaigns_to_do_params)\n\n respond_to do |format|\n if @campaigns_to_do.save\n format.html { redirect_to @campaigns_to_do, notice: 'Campaigns to do was succ... | [
{
"docid": "0a891d799d98177efd64bdb1b23ca05e",
"score": "0.6256909",
"text": "def index\n @campaigns_to_dos = CampaignsToDo.all\n end",
"title": ""
},
{
"docid": "0ee52042263a1f68a283b42faf1522a1",
"score": "0.61311126",
"text": "def campaigns_to_do_params\n params.require(:... |
bbe864ebc76dbbe06fa048ce2510976d | Set or return the starting x,y position where the .pkg file should live in the DMG window. | [
{
"docid": "838245016eaf0687e1d681d0973191c5",
"score": "0.6246936",
"text": "def pkg_position(val = NULL)\n if null?(val)\n @pkg_position || \"535, 50\"\n else\n @pkg_position = val\n end\n end",
"title": ""
}
] | [
{
"docid": "293ade80f7c0e63ce5b91a2383c3aa0f",
"score": "0.62338924",
"text": "def starting_position\n { :x => 1, :y => 1 }\n end",
"title": ""
},
{
"docid": "e3962b23d8de95c3f498a97f0a8d59a3",
"score": "0.6007954",
"text": "def actual_x_position\n return @actual_x + set_adjus... |
180e0707293c00ec2ff7996344e0b13a | sysrwloop writes the contents of buf to io_wr in full w/o blocking | [
{
"docid": "f788f147be96ea6e1cf31f2087cbbb74",
"score": "0.75312644",
"text": "def syswrite_full(io_wr, buf, timeout = nil)\n written = 0\n loop do\n begin\n w = io_wr.syswrite(buf)\n written += w\n return written if w == buf.size\n buf = buf[w..-1]\n\n # a ... | [
{
"docid": "d20ac44efb4da072cdb69e53b5dccc04",
"score": "0.72159535",
"text": "def sysrwloop(io_rd, io_wr, filter = nil)\n copied = 0\n # avoid making sysread repeatedly allocate a new String\n # This is not well-documented, but both read/sysread can take\n # an optional second argument to u... |
601daa45dd7fa1348586639aec93480c | Create a clone of the given questionnaire, copying all associated questions. The name and creator are updated. | [
{
"docid": "776aa86a7216b365d644694cceb1b4a9",
"score": "0.6623891",
"text": "def copy\n orig_questionnaire = Questionnaire.find(params[:id])\n questions = Question.where(questionnaire_id: params[:id])\n @questionnaire = orig_questionnaire.dup\n @questionnaire.instructor_id = session[:user].... | [
{
"docid": "83acaef2691c4a030718424fd19f2be2",
"score": "0.76404834",
"text": "def clone_questionnaire_details(questions, orig_questionnaire)\n assign_instructor_id\n @questionnaire.name = 'Copy of '+orig_questionnaire.name\n begin\n @questionnaire.created_at = Time.now\n @questionnai... |
ef19d3e780badd6e5019bf3f413ad13a | Set the current source | [
{
"docid": "81811d08cea58c20ecef2341fd4d0f66",
"score": "0.0",
"text": "def with_source(source, index)\n @source = source\n\n benchmark \"Indexing item #{source.inspect.truncate(50)} in resource #{context.resource.id} (#{index} / #{estimated_size})\" do\n yield.tap { @source = nil... | [
{
"docid": "e969e3356ac579fed7eafde7bacf89f5",
"score": "0.8085093",
"text": "def source=(value)\n @source = value\n end",
"title": ""
},
{
"docid": "62bbcda45cade0c71864dd44e24906ce",
"score": "0.8... |
1be1dd68f91fd99237f3c93e660b3bfa | Returns the remaining html | [
{
"docid": "b19fd4e94c87160eda31f0c0afd5a9a9",
"score": "0.6533764",
"text": "def remaining_html\n if @index == 0\n @paragraph.to_html\n else\n \"<p class=\\\"continued\\\">#{@remaining_text}</p>\"\n end\n end",
"title": ""
}
] | [
{
"docid": "874033e45ef4e828dc87afbc58174a0b",
"score": "0.76762134",
"text": "def inner_html; end",
"title": ""
},
{
"docid": "daa987b6e7fbfc9da781e8d668aaac5a",
"score": "0.7506082",
"text": "def html\n\t\treturn @html\n\tend",
"title": ""
},
{
"docid": "daa987b6e7fbfc9... |
af281205ca691df4076eb3255a10b2ce | Returns the logger corresponding to the request. | [
{
"docid": "b29b96d46f0077a86649a7c06a3e0b65",
"score": "0.79539114",
"text": "def logger\n if request.respond_to? :logger\n request.logger\n else\n Logger.new(STDOUT)\n end\n end",
"title": ""
}
] | [
{
"docid": "d29a6e3db560b57f4d81703f96abfe64",
"score": "0.7647292",
"text": "def logger\n @logger ||= Logger.new(File.join(Rails.root, 'log', 'meta_request.log'))\n end",
"title": ""
},
{
"docid": "b320aa0334656d213c6fe2aca5978a4c",
"score": "0.7354418",
"text": "def logger\... |
9c2db314af2d3c7aa1663746063a3c5e | set the resource correctly per action | [
{
"docid": "b9d103e7b24d406837cd635067b2100d",
"score": "0.0",
"text": "def resource\n @resource ||= if %w[destroy_error destroy_manifest].include?(params[:action])\n FileUpload.find(params[:id]).resource\n else\n Resource.find(params[:re... | [
{
"docid": "252375b87d69acc0e659fa5346afee33",
"score": "0.826804",
"text": "def set_resource\n\t\tend",
"title": ""
},
{
"docid": "ced3d3d1c371220918aa215aba9c6719",
"score": "0.72319376",
"text": "def set_resource\n @resource = resource.find(params[:id])\n end",
"title"... |
aa89271cb3e5404a6529c6b4dee25e8e | PUT /national_patient_identifiers/1 PUT /national_patient_identifiers/1.xml | [
{
"docid": "d364570d903411300f8f055fc7840d5e",
"score": "0.67291313",
"text": "def update\n @national_patient_identifier = NationalPatientIdentifier.find(params[:id])\n\n respond_to do |format|\n if @national_patient_identifier.update_attributes(params[:national_patient_id])\n format.h... | [
{
"docid": "1ea70b5abdabeba4dee35de9b1f0ce11",
"score": "0.6369919",
"text": "def update\n respond_to do |format|\n if @patient_identifier.update(patient_identifier_params)\n format.html { redirect_to @patient_identifier, notice: 'Patient identifier was successfully updated.' }\n f... |
bfb77d2050986fd782047af73eedbb5f | GET /relinquishment_contacts GET /relinquishment_contacts.xml | [
{
"docid": "05576b1df8ba29e211c7acce6e1abdb2",
"score": "0.6224286",
"text": "def index\n @search = RelinquishmentContact.organization(current_user).search(params[:q])\n @relinquishment_contacts = @search.result.paginate(:page => params[:page], :per_page => 10).order(\"updated_at DESC\")\n @pre... | [
{
"docid": "e7f7ade7571cbbe128bea17bf721b66b",
"score": "0.729012",
"text": "def index\n @contacts = current_company.contacts\n respond_to do |format|\n format.xml { render :xml => @contacts }\n format.json { render :json => @contacts }\n end\n end",
"title": ""
},
{
"doc... |
513e39d46706a16ae0071ea242223dc9 | /Account/TransactionInfo/Get The command is intended to view the transaction details. This means it will be able to return the response returned when the transaction was executed. It can return the exact response as when it was called. It can return the same data but in a chosen format or it can return the parameters s... | [
{
"docid": "1d6c69ccc2d54eca52384600c8a45b1c",
"score": "0.79529077",
"text": "def get_transaction_info(transaction_id_optional, client_transaction_id_optional, response_type_optional)\n options = {}\n options[\"TransactionID\"] = transaction_id_optional if transaction_id_optional\n optio... | [
{
"docid": "b95852f9af4b143a4ffef4f73637031b",
"score": "0.75008327",
"text": "def details(api_opts={})\n request = GetTransactionDetailsRequest.new\n request.transId = transaction_id\n\n @response ||= authnet(:api, api_opts).get_transaction_details(request)\n if valid_authnet_respon... |
7a3cae6c34561dae996a396582c3c2fa | Register this layer so it receives updates from the group | [
{
"docid": "fc4b32505e88dc36af037ef0e3817be0",
"score": "0.0",
"text": "def observe(obj)\n obj.add_observer self\n end",
"title": ""
}
] | [
{
"docid": "461370fb0c9a1f4987b75a86fabf8ab6",
"score": "0.6415572",
"text": "def register\n @container = Common.container\n # layer @container.layer\n layer Layer.system.current\n Common.register( self )\n self\n end",
"title": ""
},
... |
247e2cc30be0a58e39176f698cf054c9 | Set the value of a key, only if the key does not exist. | [
{
"docid": "ff2bdad8fb6bd1baecd6f8e5efddba6a",
"score": "0.69521904",
"text": "def setnx(key, value); end",
"title": ""
}
] | [
{
"docid": "f7c0704300c80264c9d3bb7ab597bd7e",
"score": "0.7686846",
"text": "def setnx(key, value)\n\t\tunless exists(key)\n\t\t\tset(key, value)\n\t\t\treturn true\n\t\tend\n\t\treturn false\n\tend",
"title": ""
},
{
"docid": "014f7099211644062a5b1b77e71281c7",
"score": "0.7452655",
... |
9ee19ec9061d795850f2db65e0aa9925 | TODO enable validation of attachment size that doesn't throw error on update if no new photo is attached validates_attachment_size :photo, :less_than => 5.megabytes | [
{
"docid": "603c8b7667eeda1cb69b1ff59203a8d1",
"score": "0.0",
"text": "def preview\n words = self.body.split(' ')\n preview = words[0, 24].join(' ') + \"...\"\n return preview\n end",
"title": ""
}
] | [
{
"docid": "94996501628be237b650a0af7c03dbb2",
"score": "0.8026848",
"text": "def photo_size\n if photo.size > 5.megabytes\n errors.add(:photo, \"should be less than 5MB\")\n end\n end",
"title": ""
},
{
"docid": "94996501628be237b650a0af7c03dbb2",
"score": "0.8026848... |
51e8c7ac4fa048a4dfc59b01db874052 | Wait for pds to render. Generally Primo::Helperslogin should be used instead | [
{
"docid": "5ba86cdfe5ed22aca2c1c60496a6bd0f",
"score": "0.6392146",
"text": "def wait_for_pds()\n wait = Selenium::WebDriver::Wait.new(:timeout => 10)\n assert_nothing_raised(Selenium::WebDriver::Error::TimeOutError, \"Error waiting for pds for url #{@driver.current_url} view #{@view} and... | [
{
"docid": "ecd420d859742426b17721b2ae66a5c6",
"score": "0.65151346",
"text": "def login_success\n page(FeedDetailsPage).await\n page(FooterTabBarPage).select_tab(\"Profile\")\n page(LoginPage).await\n page(LoginPage).login(\"valid\")\n page(FeedDetailsPage).await\nend",
"title": ""
},
{
... |
3d2fdc7896b2ea055cf073669d817752 | Returns true if the stack supports bluegreen deployment with the given configuration. There are three supported modes: manual (nothing defined in YAML, layers need to have ELBs defined manually) named (ELB is named in YAML and must exist in EC2) automatic (ELB is named and specified in YAML, will be created if it doesn... | [
{
"docid": "60ee5145d83dc9e3540d9174da986e75",
"score": "0.8335799",
"text": "def supports_bluegreen_deployment?(config)\n config['layers'].each do |layer| \n if not layer['elb'] \n # manual\n return find_elb_for_layer(layer['config']['shortname']) != nil\n else\n # nam... | [
{
"docid": "bbdab72c08769f79fcd9c6001f9403ad",
"score": "0.62541246",
"text": "def should_deploy?(name, config)\n # Skip dot names, used for templates\n return false if name.start_with?('.')\n # Check for tag deployments\n if on_tag?\n logger.debug \"Running on git tag, checki... |
b71f8eeab83a6c7dc88074de8768bd35 | Update course enrollments using token, canvas_url, course_id, enrollment_id, and state random_state = ['conclude', 'delete', 'inactivate', 'deactivate'].sample(1) delete using url, token, json body | [
{
"docid": "ed4f652b4a24da2a90eced525310ba8a",
"score": "0.7170245",
"text": "def update_enrollment(subdomain, course_id, enrollment_id, state)\n canvas_url = \"https://#{subdomain}.instructure.com\"\n token = get_token\n\n canvas_delete(\"#{canvas_url}/api/v1/courses/#{course_id}/enrollments/#... | [
{
"docid": "feed19a73b6a983c343bd01de251f34b",
"score": "0.60968584",
"text": "def update_courses\n unless course_ids.nil?\n self.enrollments.each do |e|\n e.destroy unless course_ids.include?(e.course_id.to_s)\n course_ids.delete(e.course_id.to_s)\n end \n course_ids.e... |
3276b34e0121333c5a8b72d5d1781f37 | POST /groupers POST /groupers.xml | [
{
"docid": "29c8fd2efd991d923a86f17a946a3277",
"score": "0.5749385",
"text": "def create\n @grouper = Grouper.new(params[:grouper])\n @grouper.profile_id = @p.id\n @grouper.group_id = params[:id]\n\n respond_to do |format|\n if @grouper.save\n flash[:notice] = 'Joined group succe... | [
{
"docid": "9f2be8786df9e8eb16e34f17b862b763",
"score": "0.66969013",
"text": "def test_should_create_group_via_API_XML\r\n get \"/logout\"\r\n post \"/groups.xml\", :api_key=>'testapikey',\r\n :group => {:name=>'unit test group',\r\n ... |
bc7438da74d6e08b30934410b7a2e1d7 | confirm delivery of packet by user | [
{
"docid": "cefd394d16392947326c099a27df0a85",
"score": "0.60098195",
"text": "def confirm_ack(conn, seq)\r\n return unless @queue[conn.user.id]\r\n @queue[conn.user.id].delete_if {|x| x[:seq] == seq}\r\n conn.empty_response\r\n end",
"title": ""
}
] | [
{
"docid": "f88eb4b9d1d21ee3f50fa6e176bec417",
"score": "0.5968187",
"text": "def send_pending; end",
"title": ""
},
{
"docid": "6de46439e74c92962056a0a8b9cfc1e6",
"score": "0.59543747",
"text": "def dropout_notification(player)\n @greeting = \"#{player.name} has dropped out...\"\... |
17353b2a426043461727a5e4248080d7 | Get all partitions for a data set\n | [
{
"docid": "faa39a29665ee8f829c4e8c1bf328a53",
"score": "0.72044617",
"text": "def get_data_set_partitions(data_set_uid)\n # checks if all required parameters are set\n \n raise ArgumentError, 'Missing required parameter \"data_set_uid\"' if data_set_uid.nil?\n \n\n op... | [
{
"docid": "0ec14e8d0779248deeb22a054323ccb8",
"score": "0.77671254",
"text": "def partitions; end",
"title": ""
},
{
"docid": "5a52f60116a477a11a74e21bae942388",
"score": "0.7461199",
"text": "def partitions\n @tropo_client.get(\"partitions\")\n end",
"title": ""
},
{
... |
d4876f9c48c8b1e6aad26ccae3a78b62 | make better change problem from class | [
{
"docid": "c5db3d80ea57579e431c4c9a5819ac79",
"score": "0.0",
"text": "def make_better_change(value, coins)\n check_coins = coins.select { |el| el <= value }\n return nil if check_coins.empty?\n\n solutions = []\n check_coins.sort.reverse.each do |coin|\n remain = value - coin\n\n ... | [
{
"docid": "ad244bd0c45d5d9274f7612fa6fee986",
"score": "0.624793",
"text": "def suivre; end",
"title": ""
},
{
"docid": "ef1e4c0cc26e4eec8642a7d74e09c9d1",
"score": "0.6114832",
"text": "def private; end",
"title": ""
},
{
"docid": "65ffca17e416f77c52ce148aeafbd826",
... |
e9d3f33b6ce65a933b9ee854dea67c96 | POST /admin/floor_plans POST /admin/floor_plans.json | [
{
"docid": "ad52a258f2ff5761b6910d5f17814796",
"score": "0.7976377",
"text": "def create\n @floor_plan = @property.floor_plans.new(floor_plan_params)\n \n respond_to do |format|\n if @floor_plan.save\n format.html { redirect_to admin_property_floor_plan_url(@property, @floor_p... | [
{
"docid": "485af7deb96732bc74a1ecf03bc0e58e",
"score": "0.7578625",
"text": "def create\n @floor_plan = FloorPlan.new(floor_plan_params)\n\n respond_to do |format|\n if @floor_plan.save\n format.html { redirect_to admin_availability_path, notice: 'Floor plan was successfully created.'... |
2cdc1c67ed25d9e49817c86d7b108179 | =begin dia_sig(dia) Dado un dia en formato dd de tipo string calcula el dia siguiente al mismo y los retona con un formato dd. | [
{
"docid": "efd2acdfb3cd3c937d4f8966f99723b0",
"score": "0.7416068",
"text": "def dia_sig(dia)\r\n if((1..8)===dia.to_i)\r\n return \"0\"+(dia.to_i+1).to_s\r\n else\r\n return (dia.to_i+1).to_s\r\n end\r\nend",
"title": ""
}
] | [
{
"docid": "2a423519e8ca17a107b356abbfd0ea57",
"score": "0.76964",
"text": "def siguiente_dia(fecha)\r\n d,m,a=descomponer_fechas(fecha)\r\n d_n=dia_sig(d)\r\n fecha_sig=d_n+\"/\"+m+\"/\"+a\r\n if(!fecha_valida(fecha_sig))\r\n m_n=mes_sig(m)\r\n fecha_sig=\"01/\"+m_n+\"/\"+a\r\... |
5376b71f5b1bfed90c675e57f45dd936 | Since we have made company the same as a project name it is filled out in the form as a string. The string creates a company which is the expected value. | [
{
"docid": "f7663b2d7ad0f8158c004c726baf1c48",
"score": "0.56449175",
"text": "def company=(company)\n super(Company.find_or_create_by_name(company))\n end",
"title": ""
}
] | [
{
"docid": "ec951aa5b9008202f94134d144ce590d",
"score": "0.7204906",
"text": "def set_Company(value)\n set_input(\"Company\", value)\n end",
"title": ""
},
{
"docid": "babad54373b36d87ffa3c96fd02b0c71",
"score": "0.7067583",
"text": "def set_CompanyName(value)\n ... |
5a1969b0f8f824f75b9e9bcde6dc83b5 | DELETE /microposts/1 DELETE /microposts/1.json | [
{
"docid": "e13b94a47eeb46620bbd3ab87b8621bd",
"score": "0.77533114",
"text": "def destroy\n @micropost.destroy\n respond_to do |format|\n format.html { redirect_to microposts_url, notice: 'Micropost was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
... | [
{
"docid": "286ee4a9e05a6ec39814eaef4d70773d",
"score": "0.810991",
"text": "def destroy\n @micropost = Micropost.find(params[:id])\n @micropost.destroy\n\n respond_to do |format|\n format.html { redirect_to microposts_path }\n format.json { head :no_content }\n end\n end",
"t... |
9c8d1d76835327ca64a80915e5822aac | Adds settable attributes for a given class, possibly with defaults If defaults are given for attributes, they should be put at the end (as opts) | [
{
"docid": "54217b291ff66a49608dadcc8efc674a",
"score": "0.6276763",
"text": "def attr_setter *new_attributes\n if new_attributes.last.is_a? Hash\n # Some attributes are given with defaults\n new_attributes_with_defaults = new_attributes.pop\n new_attributes_with_defaults.each ... | [
{
"docid": "b4b187b6893f3d7b0ab126f9d9a8f6b9",
"score": "0.7386655",
"text": "def set_attributes opts\n # Extract known attributes given in opts, to be set after object initialization\n attributes = self.class.attributes.map do |name, default|\n value = opts.delete name\n result = if def... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "646ff0aea9816860847d06bd7b19702d",
"score": "0.0",
"text": "def set_resource_management6\n @resource_management6 = ResourceManagement6.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "bd89022716e537628dd314fd23858181",
"score": "0.6165152",
"text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n end",
"title": ""
},
{
"docid": "3db61e749c16d53a52f73ba0492108e9",
"score": "0.60463154",
"text": "def action_hook... |
323bbf5e97d139170e334804a3b0c38f | end of setup function | [
{
"docid": "7b4db5960025e6335acd09e4ff07b11b",
"score": "0.0",
"text": "def test_get_song_name()\n assert_equal(\"Name\", @song1.name())\n end",
"title": ""
}
] | [
{
"docid": "ab2797485b69e614127f3fab49a857ec",
"score": "0.8669468",
"text": "def setup\n \n end",
"title": ""
},
{
"docid": "ab428ae414d7b57bc8d56e38b8d48302",
"score": "0.85335636",
"text": "def setup; end",
"title": ""
},
{
"docid": "ab428ae414d7b57bc8d56e38b8d... |
a2099a77c85e91272ae2f9e35b937953 | Only allow a trusted parameter "white list" through. | [
{
"docid": "9477564026f0be2c070ab92adb913965",
"score": "0.0",
"text": "def page_template_params(method)\n case method\n when :create, :update\n params[:page_template].permit(:name)\n when :update_content\n params[:page_template].permit(:content)\n end\n ... | [
{
"docid": "c1f317213d917a1e3cfa584197f82e6c",
"score": "0.71230334",
"text": "def allowed_params\n ALLOWED_PARAMS\n end",
"title": ""
},
{
"docid": "b32229655ba2c32ebe754084ef912a1a",
"score": "0.70530915",
"text": "def expected_permitted_parameter_names; end",
"title": ... |
15a2c422aa029e3fb6a053d85ff98b97 | GET /quants/new GET /quants/new.xml | [
{
"docid": "28effc79de27ca376b77c1e5af575fc6",
"score": "0.65523905",
"text": "def new\n @quant = Quant.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @quant }\n end\n end",
"title": ""
}
] | [
{
"docid": "bc03e4e4c34cb32cf7a1e8c57c7c3a5d",
"score": "0.72011715",
"text": "def new\n @quay = Quay.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @quay }\n end\n end",
"title": ""
},
{
"docid": "6cec628ea5c6c105a3ad03fe672787... |
f644a56a2508c2c54489a125d0598067 | Returns the element at the given index. If the index is negative, counts from the end of the Array. If the index is out of range, nil is returned. Slightly faster than +Array[]+ | [
{
"docid": "c115715ea35b227dfb71304b8b70b8df",
"score": "0.62316823",
"text": "def at(idx)\n Rubinius.primitive :array_aref\n idx = Rubinius::Type.coerce_to idx, Fixnum, :to_int\n\n total = @start + @total\n\n if idx < 0\n idx += total\n else\n idx += @start\n end\n\n retu... | [
{
"docid": "cea33ca75edbec82b900ef6a65a4f88e",
"score": "0.7551664",
"text": "def get(index)\n @array[index] || -1\n end",
"title": ""
},
{
"docid": "3c35716ab2abdd21e6c1885211aa2328",
"score": "0.73042697",
"text": "def get(index)\n index = index.to_i\n raise OutOf... |
b95295a42fbde50f01c67b58ed055f07 | Given an array of 8 strings, parse the columns into something that can be understood by this object | [
{
"docid": "0b6cbd5f3e48f5d8006d2b814764e0cf",
"score": "0.0",
"text": "def parse_mandatory_columns(parts)\n @seqname = parts[SEQNAME_COL]\n @source = parts[SOURCE_COL]\n @feature = parts[FEATURE_COL]\n @start = parts[START_COL]\n @end = parts[END_COL]\n @score = parts[SCORE_COL]\n ... | [
{
"docid": "eb97022a420770a162c93d895a159dfd",
"score": "0.61442417",
"text": "def reformat_table(arr)\n new_arr = []\n (0..@num_of_attributes).each do |idx|\n new_col = []\n arr.each do |value|\n new_col << value[idx]\n end\n new_arr << new_col\n end\n new_arr\nend",
"title": "... |
302b7bd5214770d07144ad156c80f306 | grabs all photos in the current user's photo stream (in date taken order) requires checksum tags if requested | [
{
"docid": "ff8f5368ce824555e6cf99e070563a4a",
"score": "0.7329444",
"text": "def flickr_all_photos(with_machine_tags = false)\n all_photos = { }\n curr_page = 0\n params = { :user_id => 'me',\n :sort => 'date-taken-asc',\n :per_page => 500,\n :page => curr_page }\... | [
{
"docid": "33c1882686e48e8d7b6aa2029ff9d61a",
"score": "0.68319285",
"text": "def user_photos(user_id, photo_count)\n flickr.photos.search(:user_id => user_id).to_a[0...photo_count]\n end",
"title": ""
},
{
"docid": "49c78b1c88aa0f9e0982fddac04badb9",
"score": "0.6818058",
"text... |
7d56ed5afc916709e8d1eda87299ef3f | Detects the type of the database. | [
{
"docid": "cbcd1f6237c2a0fb2fc04fcac1d1bce8",
"score": "0.65183026",
"text": "def detect_database_type! # :nodoc:\n @file.seek(-3, IO::SEEK_END)\n @ip_bits = 32\n\n 0.upto(STRUCTURE_INFO_MAX_SIZE - 1) do |i|\n if @file.read(3).bytes.all? { |byte| byte == 255 }\n @database_type =\n\... | [
{
"docid": "c4a9923371a79a2bc3170911d034b5b7",
"score": "0.7794463",
"text": "def database_type(database)\n Contrib::Utils::Database.normalize_vendor(database.database_type.to_s)\n end",
"title": ""
},
{
"docid": "e55ddb7f11a78d0be9735003589aaea2",
"score": "0.778... |
1bdb872e8a18d03665a0620403baaa79 | Returns the number of matched expressions available for the given set of pattern variables at the given depth, at the current iteration point. An exception is raised if the names do not all yield the same number of matches; this indicates a piece of mismatched syntax that cannot be expanded correctly. | [
{
"docid": "3ccffa75c30571c6aa697a39daeec7be",
"score": "0.5994481",
"text": "def size(names, depth)\n sizes = []\n @data.each do |name, tree|\n sizes << tree.size(depth) if names.include?(name)\n end\n \n sizes = sizes.compact.uniq\n retu... | [
{
"docid": "c111a7d4d006374a8d48f3200cdede61",
"score": "0.5942993",
"text": "def scanDepth\r\n return caller(2).find_all {|frame|\r\n frame =~ /in `scan(Variable|Tagged|Codeblock|Bracketed|Quotelike)'/\r\n }.length\r\n end",
"title": ""
},
{
"docid": "85f9017d233... |
59883c6e2803e34e273a2c875daeb4fa | loads title image and calculates position, size variables | [
{
"docid": "b4281f1bca379fc3d1148ca3e466b793",
"score": "0.7756729",
"text": "def initialize_title_image\n @title_image = Gosu::Image.new(@window, Const::PATH_IMAGE_TITLE, false)\n @img_size_factor = (@window.width - Const::GAME_WIN_GAP).to_f / @title_image.width\n @img_x = (@window.width... | [
{
"docid": "356d098aed318248e8568daf9bfdaf98",
"score": "0.7284534",
"text": "def title(filename, _hue = 0)\n load_image(@title_cache, filename, Titles_Path, @title_data)\n end",
"title": ""
},
{
"docid": "4645cf2ef51b4f0a0d922745b5db2cfa",
"score": "0.65668803",
"text": "def... |
9133b5d1869a6b6f504baf417931feb2 | Helper methods to implement admin activation via devise, following | [
{
"docid": "3bf26d0d6152d7692816570ae9b5490d",
"score": "0.0",
"text": "def active_for_authentication?\n super && approved?\n end",
"title": ""
}
] | [
{
"docid": "beafa81672d9216e2ab483fed9636de8",
"score": "0.75115526",
"text": "def admin_force_activate!\n pass = Devise.friendly_token.first(8)\n self.reset_password!(pass, pass)\n self.accept_invitation\n self.confirm!\n # accept_invitation doesn't send mail, so send now...\n if self... |
2c4dcf624cbd0fa720d3a4f27d619e26 | Deletes a webhook associated with this list. | [
{
"docid": "15ff9810248afc536a8f4bb113ac30d7",
"score": "0.8103022",
"text": "def delete_webhook(webhook_id)\n cs_delete(\"/lists/#{list_id}/webhooks/#{webhook_id}.json\", {})\n end",
"title": ""
}
] | [
{
"docid": "782802eb8c6c7b340cd452c34a623cd3",
"score": "0.8209749",
"text": "def delete_webhook(list_id, url)\n call(\"listWebhookDel\", list_id, url)\n end",
"title": ""
},
{
"docid": "17a712b149e1031527df8527b5014dc2",
"score": "0.77683145",
"text": "def delete_webhook\n ... |
300b870f950f372348a4519c201c7d21 | PUT /bookmarks/1 PUT /bookmarks/1.json | [
{
"docid": "47a7ad42e5c847ce7175e8440c364660",
"score": "0.7463867",
"text": "def update\n req = ActiveSupport::JSON.decode(request.body)\n @bookmark = Bookmark.find(req)\n\n respond_to do |format|\n if @bookmark.update_attributes(params[:id])\n format.html { redirect_to @bookmark, ... | [
{
"docid": "8c970e074ba59b30bbb1a653b787a3ca",
"score": "0.7430863",
"text": "def update\n bookmark = Bookmark.find_by(id: params[:id])\n bookmark.update(\n name: bookmark.name,\n path: bookmark.path,\n note_id: params[:note_id],\n user_id: current_user.id,\n screenshot_da... |
76ec97837cb3d731790ec55502cf9916 | PUT /process_types/1 PUT /process_types/1.json | [
{
"docid": "69c19071e95dd562f8daf81a427b5191",
"score": "0.6411625",
"text": "def update\n @process_type.attachment.updated_by = current_user\n if @process_type.update_attributes(process_type_params)\n ProcessType.process_item_associations(@process_type, params)\n CommonActions.notificat... | [
{
"docid": "389cc7a0cd984b9294d398f209110a6c",
"score": "0.60069746",
"text": "def destroy\n @process_type.destroy\n respond_with :process_types\n end",
"title": ""
},
{
"docid": "5627a6961d11ca7f3a8d0a1a56d61397",
"score": "0.5896973",
"text": "def update\n @proc_type = Pr... |
22e059cd8a847fa9d9ffd8c2cf23e05d | Traverse the XML output from prefilters, looking for indexable text to add to the buffer. | [
{
"docid": "0d81e3a927c1a85174da620312ccc93a",
"score": "0.49522585",
"text": "def traverseText(node, buf)\n return if node['meta'] == \"yes\" || node['index'] == \"no\"\n node.text? and buf << node.to_s.strip + \"\\n\"\n node.children.each { |child| traverseText(child, buf) }\nend",
"title": ""
... | [
{
"docid": "aececce3560b48595ab02aa4d450d202",
"score": "0.55145293",
"text": "def process_text text\n @filter.process(Blogitr.expand_macros(@filter, text))\n end",
"title": ""
},
{
"docid": "8757d3baec64fe537add4b62ab7f1f4a",
"score": "0.5141736",
"text": "def process\n o... |
9b655346c96eef2c486f9c204c6fdb82 | Change the book title + selected_book: a Book object which was selected by the user + model: a string representing the object type being utilized Calls method to confirm save or show errors | [
{
"docid": "e9a75ad845f6d7a1ce7046776da334d0",
"score": "0.7521547",
"text": "def edit_book_title(selected_book, model)\n print \"New title: >>\"\n title = gets.chomp\n saved = selected_book.update_attributes(title: title)\n record_save_result(saved, selected_book, model)\nend",
"title": ""
}
... | [
{
"docid": "acae46c0ac083fd513129876da122770",
"score": "0.73772764",
"text": "def edit_book_library(selected_book, model)\n puts \"\\n\\nAvailable libraries:\"\n Library.all.each do |l|\n puts l.record_display\n end\n print \"\\nSelect new library.\\n\\n >>\"\n new_library_id = gets.chomp.to_i\... |
a7c2ee93f4a78fe85bf614ec94563fb9 | DELETE /organizations/1 DELETE /organizations/1.xml | [
{
"docid": "6954e93046b8d748689da9fa41d3ab3c",
"score": "0.7200163",
"text": "def destroy\n @organization = Organization.find(params[:id])\n @organization.destroy\n\n respond_to do |format|\n format.html { redirect_to(organizations_url) }\n format.xml { head :ok }\n end\n end",
... | [
{
"docid": "fab02a377b4455929c9f3acf9984ca8d",
"score": "0.726792",
"text": "def destroy\n @organization = Organization.find(params[:id])\n @organization.destroy\n\n respond_to do |format|\n format.html { redirect_to(orgadmin_organizations_url) }\n format.xml { head :ok }\n end\n ... |
0a62c2444084e0b3e986cadec08eccf0 | if we wrap a Hash then decorator.is_a?(Hash) should be true | [
{
"docid": "309a245371cfaf69b73a0a50dd81c4a5",
"score": "0.0",
"text": "def is_a?(klass)\n __getobj__.is_a?(klass) || super\n end",
"title": ""
}
] | [
{
"docid": "f05ab8639bc731aca09af7737cc84fe3",
"score": "0.7226846",
"text": "def is_a?(o)\n return false if o == Hash\n super\n end",
"title": ""
},
{
"docid": "d0d9cac83c4dd3b559961f5846be83e4",
"score": "0.71793485",
"text": "def hash?\n self.is_a?(Hash)\n end",
"ti... |
25c6145e71a28c2fbb2ac48649cf1a44 | GET /articles/1 GET /articles/1.json | [
{
"docid": "de46dbf2bdfe63cd4422381ab4ed8cc8",
"score": "0.0",
"text": "def show\n @article = Article.find(params[:id])\n @article.text = add_p_tags( @article.text )\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @article }\n end\n end",
... | [
{
"docid": "19a11bbe551c564fa7cca7d31c8cbc3f",
"score": "0.80206245",
"text": "def show\n @articles = Article.find(params[:id])\n render json: @articles\n end",
"title": ""
},
{
"docid": "bdf95afa24978bfa5f06e563541d0398",
"score": "0.78080183",
"text": "def show\n\t\t@article... |
449114a8e4d88f426d8272c823913f86 | displays the form for creating new minorcourse relation | [
{
"docid": "f0605557255378b77568dd1a8a29a470",
"score": "0.0",
"text": "def new\n\tend",
"title": ""
}
] | [
{
"docid": "20e0826a36a892f987e6640008a5437e",
"score": "0.685165",
"text": "def new\n @course = Course.new\n @course_instance = CourseInstance.new\n \n render :action => 'new', :layout => 'narrow-new'\n log \"create_course\"\n end",
"title": ""
},
{
"docid": "0d1ea9f36dae33b... |
e58612da64fa3b39a773022b9b4965d0 | Returns the node (version) where the current node's file binding was set | [
{
"docid": "a46ae273df8b9fd26d889a6dd1b2a7ba",
"score": "0.78892267",
"text": "def version_with_current_file_binding\n self.versions.where(binding: self.binding).last\n end",
"title": ""
}
] | [
{
"docid": "e31b7343af0b2f22abbf1b596ad08a0e",
"score": "0.7842458",
"text": "def version_with_current_file_binding\n node = self.versions.where(binding: self.binding).select(\"created_at, binding, id, persistent_id, model_id\").last\n return Bindery::Spreadsheet.find_by_identifier(node.id)\n en... |
f2c0950fa609d4d8fa6ad6ae51717a03 | Checks if the gob encoded content length is valid and no bytes were missing in the transit | [
{
"docid": "9f9faf1777930039f236224a1b7bca1b",
"score": "0.64885604",
"text": "def content_length_correct?(content=@content)\n\t\ttraveled_length = 0\n\t\ttotal_length = content.bytes.length\n\t\tuntil traveled_length >= total_length\n\t\t\tpart_length, check_bytes = read_next_uint(content[traveled_leng... | [
{
"docid": "97feac09a066c240e649cfa434c1fdeb",
"score": "0.6723848",
"text": "def validate?\n if @offset__GOGYOU__ + bytesize > @buffer__GOGYOU__.bytesize\n false\n else\n true\n end\n end",
"title": ""
},
{
"docid": "f8eda10ab7b9a874579229e9e02418a6",
"sc... |
2e77537cf13026227f9467a0515dfd7d | method that alters the rental details about a book, taking book title (string), new student (string) and new due date (string). Matches book title with book in array. | [
{
"docid": "83102244a23e6f72fc0c0cc5e46d34d1",
"score": "0.70185226",
"text": "def rent_out(book_title, student, due_date)\n for book in @books\n if book[:title] == book_title\n book[:rental_details][:student_name] = student\n book[:rental_details][:date] = due_date\n end\n ... | [
{
"docid": "25eab9435046a21fb1ce11b2f82fe239",
"score": "0.71355957",
"text": "def change_rental_details(title, name, date)\n for book in @books\n if book[:title] == title\n book[:rental_details][:student_name] = name\n book[:rental_details][:date] = date\n return book\n ... |
b4c9b45c54e24374c2b4ebefb900f062 | POST /news POST /news.json | [
{
"docid": "3e2e00b7c2364097e6440422bda517ac",
"score": "0.73230803",
"text": "def create\n @news = News.new(news_params)\n\n respond_to do |format|\n if @news.save\n format.html { redirect_to @news, notice: 'news was successfully created.' }\n format.json { render action: 'show... | [
{
"docid": "d3a8e27aa8ab6090b245e009ac2feed2",
"score": "0.77889776",
"text": "def create\n @news = New.new(news_params)\n\n if @news.save\n render json: @news, status: :created\n else\n render json: @news.errors, status: :unprocessable_entity\n end\n end",
"title": ""
},
... |
89b374f36dbe7f57b3ae8a3a4d664287 | This API get the status of the fax. | [
{
"docid": "b0fa9dc3221361f54b0069edb9c5afd1",
"score": "0.0",
"text": "def fax_job_id_status_get_with_http_info(api_key, job_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: FaxApi.fax_job_id_status_get ...\"\n end\n # verify the re... | [
{
"docid": "2b17548b91f343b7db6b583d21a8a84d",
"score": "0.6977818",
"text": "def get_fax_status(faxids, options = {})\n logger.debug \"Gathering fax status information for id(s): '#{faxids}'\"\n\n if faxids.is_a? String\n action = 'Get_FaxStatus'\n elsif faxids.is_a? Array\n ... |
1408cbaf30331ad212d2374c6009cc3c | Creates a relationship between this and the other node. ==== Example n1 = Node.new Node has declared having a friend type of relationship n2 = Node.new n3 = Node.new n1 << n2 << n3 ==== Returns self | [
{
"docid": "6e0ae2ba8e4210954058e769b6a248c0",
"score": "0.7542323",
"text": "def <<(other)\n @dsl.create_relationship_to(@node, other)\n self\n end",
"title": ""
}
] | [
{
"docid": "9b19f9edac0de97ffb2fe7e30566151d",
"score": "0.75913686",
"text": "def <<(other)\n if other.is_a?(String)\n # this is typically called in an assignment operator, person.friends = ['42', '32']\n node = Neo4j::Node.load(other)\n @storage.create_relatio... |
822fe9a19dd982708e015fb2f2315f71 | GET /user_items/1 GET /user_items/1.json def show end GET /user_items/new | [
{
"docid": "dd8a200d53d313c8f9c84774291249e3",
"score": "0.8122865",
"text": "def new\n\n # Display all items\n self.index\n #======================================================================================\n\n # New item\n @user_item = current_user.user_items.new\n\n end",
"ti... | [
{
"docid": "f417c373671b86db25d1153013b9ce72",
"score": "0.84120274",
"text": "def new\n @user_item = UserItem.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @user_item }\n end\n end",
"title": ""
},
{
"docid": "f417c373671b86db25... |
21114dd459f7032603e71cc3d9dbb0ef | It reads the file and returns an array of rows | [
{
"docid": "13ba51b99596b034bdb301cafa28edc6",
"score": "0.0",
"text": "def read_file\n CSV.read(@file_path)\n end",
"title": ""
}
] | [
{
"docid": "e53bcd6b187c61a1017350e9e7dd64ed",
"score": "0.7198151",
"text": "def rows\n read\n end",
"title": ""
},
{
"docid": "4a2e0389fdb882c86509cf1366ffc688",
"score": "0.71777654",
"text": "def read_ragged_array(the_filename)\n \n # Initialize ragged array\n ragged_a... |
9878d8168bff1498920afaac16e38ba6 | GET /submissions/1/bot_testcase.json (Called by judge) Used to download testcases by the judgebot | [
{
"docid": "34726f22d8fff7f731edf863a29ce904",
"score": "0.7629531",
"text": "def bot_testcase\n @submission = Submission.find(params[:id])\n\n respond_to do |format|\n format.json { render json: @submission.get_test_cases }\n end\n end",
"title": ""
}
] | [
{
"docid": "54859bd29100167dbd580459ffa4d12d",
"score": "0.7009784",
"text": "def download\n auth = {\"x-rapidapi-key\": 'ef1458feb2msh5cde710ff61a688p128d3fjsnc54b06694895'}\n url = \"https://judge0-ce.p.rapidapi.com/submissions/#{self.judge_token}?base64_encoded=false\"\n response = RestClie... |
5baf23fd6d3a5f03e7eefd60438db685 | PUT /incomes/1 PUT /incomes/1.xml | [
{
"docid": "b4c0d273c1f33aa2427ad70ff8b55e02",
"score": "0.5994442",
"text": "def update\n @income = Income.find(params[:id])\n\n respond_to do |format|\n if @income.update_attributes(params[:income])\n flash[:notice] = 'Income was successfully updated.'\n \n format.js ... | [
{
"docid": "f411fa80f125d4a02eb15607ce04a955",
"score": "0.7048265",
"text": "def update\n @income = Income.find(params[:id])\n\n respond_to do |format|\n if @income.update_attributes(params[:income])\n format.html { redirect_to(@income, :notice => 'Income was successfully updated.') }... |
d91f6fef490735e2058bf6ea33db9e91 | GET /correspondences GET /correspondences.json | [
{
"docid": "6ff4c8857cb5f3cdca13f4cb4bc372e1",
"score": "0.7332685",
"text": "def index\n @correspondences = Correspondence.all\n end",
"title": ""
}
] | [
{
"docid": "788477dccbd962b89d4954575f514357",
"score": "0.67828816",
"text": "def index\n @correspondences = Correspondence.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @correspondences }\n end\n end",
"title": ""
},
{
"doc... |
9d772150194087cd5bf2acf6d911b085 | Returns the value of attribute tokens. source://rubocopast//lib/rubocop/ast/node_pattern/lexer.rb29 | [
{
"docid": "28006bdb0fcb628b45d690f4ec94756f",
"score": "0.0",
"text": "def tokens; end",
"title": ""
}
] | [
{
"docid": "a3bf930034dcab85221e1529c74b8051",
"score": "0.7272144",
"text": "def parse_attr_name\n return nil if not @lexer.get or not [:text,:star].include?(@lexer.get.type)\n ret = @lexer.get.type == :text ?\n @lexer.get.value : :any\n @lexer.next!\n ... |
3aa6fab34c7b0aea2f6ad28e14357e29 | =begin Function: remove_form() Parameters: String: path to required form to remove Postcondition: remove form from forms required for the opportunity =end | [
{
"docid": "8e33c2743be5354ffbbcf74a87e724cd",
"score": "0.80340827",
"text": "def remove_form(path)\r\n Form.find_by(opportunity_id: opportunity_id, link_path: path).destroy\r\n end",
"title": ""
}
] | [
{
"docid": "f5521aa36f6971f27f64b01b7442e12d",
"score": "0.7318192",
"text": "def remove_form(form)\n if @forms[form.name] == form\n @forms.delete(form.name)\n else\n arr = @forms[form.name]\n arr.delete(form)\n case arr.count\n when 0 then @forms.delete(form.name)\n ... |
8b15abff73444a3990f318400faf6eb9 | returns a string defining which layout file to use | [
{
"docid": "dfbb32f77ab316b502684b09ad289f16",
"score": "0.0",
"text": "def determine_layout\n mobile_request? ? mobile_layout : desktop_layout\n end",
"title": ""
}
] | [
{
"docid": "05aa5d7e44079035f9541842a73439fc",
"score": "0.7560525",
"text": "def determine_layout\r\n #\"earthlingtwo/earthlingtwo\"\r\n \"#{template_name}/#{template_name}\"\r\n end",
"title": ""
},
{
"docid": "713d3cfc798ae12b3c970171f236e005",
"score": "0.75478864",
"text"... |
ef1751a7cd8298dd7c8fbad77195b3ea | POST /orders POST /orders.json needs club_id, table_id, time, phone, confiramation_code, token | [
{
"docid": "3574d188379a04b2f0c02172025b73eb",
"score": "0.6324948",
"text": "def create\n club = Club.find params[:club_id]\n table = Table.find order_params[:table_id]\n time = Time.parse(order_params[:time])\n @order = Order.new order_params\n @order.validate_code\n o = table.new_or... | [
{
"docid": "ee8d8e8e024d35ee13910acc551b370b",
"score": "0.64667743",
"text": "def create_order\n post_request \"orders\"\n end",
"title": ""
},
{
"docid": "5e5ffad02fd3732ac80f6983a5bd99cb",
"score": "0.61589783",
"text": "def submit\n order_param = params[:order]\n ta... |
dbfcc7607e1ddc160e24378ecde09856 | Used to set a new default delivery method that will be used if one is not set with delivery_method. | [
{
"docid": "d38ca8265ee2dcad6fe7ef20d3beae39",
"score": "0.8516829",
"text": "def default_delivery_method=(delivery_method); end",
"title": ""
}
] | [
{
"docid": "fccf4db69e93b14eb76fb47203eafe97",
"score": "0.8694398",
"text": "def default_delivery_method=(delivery_method)\n @default_delivery_method = delivery_method\n end",
"title": ""
},
{
"docid": "706eddd3570bef5ec102956d78aba84a",
"score": "0.78271216",
"text": "def d... |
af5c767e81bf9b85d12f14391a466c54 | Outputs whether a mouse click occurred inside or outside of a box | [
{
"docid": "79c3523c081df45b3fe252488aee5d7f",
"score": "0.6861461",
"text": "def point_to_rect_tech_demo\n x = 460\n\n outputs.labels << small_label(x, 15, \"Click inside the blue box maybe ---->\")\n\n box = [765, 370, 50, 50, 0, 0, 170] # blue box\n outputs.borders << box\n\n if state.... | [
{
"docid": "c1fba9d2aa778876b8c9956c3258615a",
"score": "0.7762951",
"text": "def area_clicked(leftX, topY, rightX, bottomY)\n # complete this code\n if ((mouse_x > leftX and mouse_x < rightX) and (mouse_y > topY and mouse_y < bottomY))\n true\n else\n false\n end\nend",
"title... |
dfacb33fd5a543c612637c41e893bf69 | GET /resource/password/edit?reset_password_token=abcdef def edit super end PUT /resource/password | [
{
"docid": "7a30f696371f27544956a838e212f879",
"score": "0.713109",
"text": "def update\n self.resource = resource_class.reset_password_by_token(resource_params)\n yield resource if block_given?\n\n if resource.errors.empty?\n resource.unlock_access! if unlockable?(resource)\n if Devi... | [
{
"docid": "c740523c45ef848a92a394dd1ae16039",
"score": "0.830135",
"text": "def edit\n unless params[:reset_password_token].present?\n flash[:notice]= \"Password reset link has been expired\"\n redirect_to new_user_session_path\n else\n self.resource = resource_class.new\n set... |
416a426e431560452c19e2858a5610fe | DELETE /ropes/1 DELETE /ropes/1.json | [
{
"docid": "e945faa8a8ca70f3a407bcd53dee9b72",
"score": "0.6572708",
"text": "def destroy\n @rope.destroy\n respond_to do |format|\n format.html { redirect_to ropes_url, notice: 'La corde a été coupée.' }\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "b445c184893647d3482f8fbc6a507a52",
"score": "0.72074395",
"text": "def delete(path, params = {})\n path += '.json'\n res = @connection.delete(path, @header)\n parse_response(res)\n end",
"title": ""
},
{
"docid": "b1a17c1ee1af05c79fe156622df44818",
"score": "0.71993... |
8ed00556d4122e3eccfd9b5389522ebd | PUT /users/1 PUT /users/1.json | [
{
"docid": "643a3a5e05b29ce4369fc31fc7f276b6",
"score": "0.0",
"text": "def update\n @user = User.find(params[:id])\n\n unless params[:user_languages].blank?\n @user.languages.clear\n params[:user_languages].each do |ul|\n next if ul[:language_id].blank?\n if @user.language... | [
{
"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",
... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "e26511858beecb33ee7a28f9d0d50d2d",
"score": "0.0",
"text": "def set_transfer\n @transfer = current_user.transactions.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;... |
0f0a716bf67e7a61951a0f88759d2192 | for strings, this will chain them therefore | [
{
"docid": "683d96cdce10915265be0571fd83ed60",
"score": "0.0",
"text": "def ben_inject(sum = nil)\n @sum = sum\n if !sum.nil?\n self.each {|element| do_change(element) }\n else \n @sum = self[0]\n self.drop(1).each {|element| do_change(element) }\n end\n @sum\nend",
"title": ""
}
] | [
{
"docid": "73ec467213f1dc06c5764090ca9ffdb8",
"score": "0.6676113",
"text": "def chain(str, *commands)\n str = require_string! str\n\n commands.reduce(str) { |memo, command| send(command, memo) }\n end",
"title": ""
},
{
"docid": "f05d43f726ca8a58548127ba89b87e9c",
"score":... |
dc1404ed41c82bd0c417671e6af6f53c | The "base" attempts to remove everything after the year, but of course if the cutters didn't parse correctly this won't work. | [
{
"docid": "5eb15cbf883509f19e0fc376af5f4f1d",
"score": "0.0",
"text": "def collation_key_base\n return @normalized_original unless valid?\n \"#{collatable_letters}#{collatable_digits}#{collatable_decimal} #{collatable_cutter_stuff} #{year}\".strip\n end",
"title": ""
}
] | [
{
"docid": "0c43a3b1328b806bfcf22dce84e6f615",
"score": "0.74025995",
"text": "def strip_year( name ) Club.strip_year( name ); end",
"title": ""
},
{
"docid": "d0486caf2397b3059debb7199ed46434",
"score": "0.7265005",
"text": "def strip_year\n gsub(/\\s\\(\\d{4}\\)/, '')\n end",
... |
a2ab5a73948ac7eda65d7c5f5bcf4c1f | Returns true if the text is a palindrome, false otherwise. | [
{
"docid": "c9d6e3e94d4e349bb8c8b427020c324d",
"score": "0.79663694",
"text": "def palindrome?\n if processed_content.empty?\n false\n else\n processed_content == processed_content.reverse\n end\n end",
"title": ""
}
] | [
{
"docid": "676a95cae90d4baa71d491388a2ee59c",
"score": "0.83363736",
"text": "def palindrome?\n string = self.downcase.gsub(/[\\W\\d]+/,\"\")\n string.reverse.eql?(string)\n end",
"title": ""
},
{
"docid": "aa6aa2434b1cb9dfd49f02053ddd3533",
"score": "0.8327025",
"text": "def... |
fb86716210f8df0b786f8ec7d8e782a0 | DELETE /physical_characteristics/1 DELETE /physical_characteristics/1.json | [
{
"docid": "9e6a50483c3d1470db6e9132e42c7ce1",
"score": "0.7672198",
"text": "def destroy\n @physical_characteristic = PhysicalCharacteristic.find(params[:id])\n @physical_characteristic.destroy\n\n respond_to do |format|\n format.html { redirect_to physical_characteristics_url }\n fo... | [
{
"docid": "1fbaa5a5850a98f80c4f6cd9ab8f5140",
"score": "0.7166363",
"text": "def destroy\n @characteristic = Characteristic.find(params[:id])\n @characteristic.destroy\n\n respond_to do |format|\n format.html { redirect_to characteristics_url }\n format.json { head :no_content }\n ... |
af630984682f1a0b5a68e6092af0d102 | Update properties of this object | [
{
"docid": "572ee8fb7321a800018065315ca39d15",
"score": "0.0",
"text": "def update!(**args)\n @source_result_counts = args[:source_result_counts] if args.key?(:source_result_counts)\n end",
"title": ""
}
] | [
{
"docid": "184b1b1ed771473d3eb9f338c0734c38",
"score": "0.73066413",
"text": "def update *args\n opts = args.extract_options!\n fill_properties opts\n self.save\n end",
"title": ""
},
{
"docid": "5076c5a88404ae72986f958710f5687a",
"score": "0.72631145",
"text": "def update... |
07f43f21f93c9b4e42d5b9b74178b47f | POST /data_items POST /data_items.json | [
{
"docid": "b1488c30d9b1120a9f86d978e249907e",
"score": "0.6744072",
"text": "def create\n @data_item = DataItem.new(data_item_params)\n\n respond_to do |format|\n if @data_item.save\n format.html { redirect_to @data_item, notice: 'Data item was successfully created.' }\n format... | [
{
"docid": "13c196a8e428eea00eaf7b700acea567",
"score": "0.6995797",
"text": "def create\n item = list.items.create!(item_params)\n render json: item, status: 201\n end",
"title": ""
},
{
"docid": "fc5811c80efcf2dfee3d6fac65b6c79a",
"score": "0.6736687",
"text": "def create\n ... |
cfb63fa68ad2c5d5f7f7abc72c1983d1 | Produces a Nokogiri object from the formatted text | [
{
"docid": "a3d2926dc173e99ff609d65919e6a793",
"score": "0.5598171",
"text": "def doc\n @doc ||= Nokogiri::HTML.parse(formatted_html, nil, 'UTF-8')\n end",
"title": ""
}
] | [
{
"docid": "7e0ab3f963bcdf34f9a55c67668dd412",
"score": "0.6468807",
"text": "def parse_text\n text = Element.new(:p)\n skip :break\n\n while match?(:text, :break, :link_start, :format, :comment, :tag_open)\n if match? :break\n @line += current.value.length\n if c... |
1a26bdd04d37b95f4526e09076abeb9e | ============================================================================== status_error!() ============================================================================== Set the 'status' field to 'error'. | [
{
"docid": "8b7e2699a602b6d71fa98c2990748ffe",
"score": "0.74763435",
"text": "def status_error!()\n @status = TAC_PLUS_ACCT_STATUS_ERROR\n end",
"title": ""
}
] | [
{
"docid": "25dcee3ae0c376b5c4876ebf207a7e1b",
"score": "0.8000228",
"text": "def error\n @status = ERROR_FLAG if @status == SUCCESS_FLAG\n end",
"title": ""
},
{
"docid": "44c274c755e35f826dd6a766d27b4a97",
"score": "0.7731963",
"text": "def status_error\n @status... |
1841f0713724f5e35c7f93972ad6b969 | GET /customers/1 GET /customers/1.json | [
{
"docid": "00c20562f6238a2358a61231a3eb48da",
"score": "0.0",
"text": "def show\n if current_user.nil?\n redirect_to '/'\n end\n end",
"title": ""
}
] | [
{
"docid": "360133f338e28c4eaa1bbb88f8184876",
"score": "0.78568625",
"text": "def get_customer(id)\n get(\"customers/#{id}\")\n end",
"title": ""
},
{
"docid": "360133f338e28c4eaa1bbb88f8184876",
"score": "0.78568625",
"text": "def get_customer(id)\n get(\"customers/#{id}\")\... |
0e6a9135cc9e5886148733593ab5f7fc | ================================================= ================================================= PUT ================================================= ================================================= | [
{
"docid": "f6b6d3e59c6aad17cd04ba98a381d2cb",
"score": "0.0",
"text": "def update\n\n \n\n \t\tend",
"title": ""
}
] | [
{
"docid": "a1180b85a98a5e652f2c5f2f1e253ca7",
"score": "0.76900446",
"text": "def put\n end",
"title": ""
},
{
"docid": "ea416b077fa0aa7e84ec3fe2ef9c3772",
"score": "0.75726676",
"text": "def put\n request_method('PUT')\n end",
"title": ""
},
{
"docid": "fbd7c... |