query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
db3d176cbefe6cd11bd387c9808d1a06 | Read a rbc file and evaluate it | [
{
"docid": "b7aa482467fc98a786528bf11826e12f",
"score": "0.0",
"text": "def decompile_file(path)\n res = Marshal.load(File.read(path))\n RubyVM::InstructionSequence.load_array(res).eval\n end",
"title": ""
}
] | [
{
"docid": "80fba19b9e9fdb98645207ca60631455",
"score": "0.6359658",
"text": "def evaluate_file(file)\n evaluate(parse_file(file))\n end",
"title": ""
},
{
"docid": "75ee936953c65929f7065ab69375d7fe",
"score": "0.6150587",
"text": "def load_rb( file )\r\n begin\r\n ... |
0f87c1bb3f1daf3745c5eea3d05edb1d | Retrieves summoner data for a single summoner. | [
{
"docid": "ecdc14f02636f213064695517c95179e",
"score": "0.72695816",
"text": "def summoner(summoner_id)\n summoner_ids = array_options(summoner_id)\n summoner_id = summoner_ids.first\n raise ArgumentError, 'invalid summoner ID' if summoner_ids.size != 1\n\n summoners(summoner_id)[summoner_i... | [
{
"docid": "d5d0f4a2005e8a96c4c544d032a4b294",
"score": "0.76884145",
"text": "def find summoner_id\n perform_uncached_request api_url \"third-party-code/by-summoner/#{summoner_id}\"\n end",
"title": ""
},
{
"docid": "53936b578860077036f35ac8d4d0a1ca",
"score": "0.76089686",
... |
289e6d448e66d4ada04936a358954c96 | Point3d Point3dFromMatrix3dTransposeTimesPoint3d method Point3dFromMatrix3dTransposeTimesPoint3d Matrix3d arg0 Matrix [IN] Point3d arg1 Point [IN] | [
{
"docid": "4b5cb23675d370d3f272716976e7c633",
"score": "0.82783705",
"text": "def Point3dFromMatrix3dTransposeTimesPoint3d(arg0, arg1)\n ret = _invoke(1610743884, [arg0, arg1], [VT_BYREF | VT_DISPATCH, VT_BYREF | VT_DISPATCH])\n @lastargs = WIN32OLE::ARGV\n ret\n end",
"title": ""
}
] | [
{
"docid": "eb781ad62973fef4372cbc7c6668e201",
"score": "0.8258146",
"text": "def Point3dFromMatrix3dTransposeTimesXYZ(arg0, arg1, arg2, arg3)\n ret = _invoke(1610743886, [arg0, arg1, arg2, arg3], [VT_BYREF | VT_DISPATCH, VT_R8, VT_R8, VT_R8])\n @lastargs = WIN32OLE::ARGV\n ret\n end",
"ti... |
0561983a33f30b0faf29f962192545c9 | Adds a user (+address+) to an organization (+org+). Enclose +orgid+ in double quotes or preceded with a '\' symbol if it contains a quote ('), double quote ("), backslash (\), apostrophe, commas, , = symbols. Raises a Postini::BatchException if something foes wrong | [
{
"docid": "3f6c4f6897f67374db570beb6594d094",
"score": "0.6151728",
"text": "def add_user( orgid, address, welcome = false )\n response = invoke(\"aut:adduser\") do |message|\n build_auth!( message )\n message.add('userAddress', address)\n message.add('args') do |args|\n ... | [
{
"docid": "928c1228a124a99ef274deb601987c02",
"score": "0.65092283",
"text": "def add_to_org(org, username)\n username.split(\",\").each do |name|\n @client.update_organization_membership(org, {:user => name})\n puts \"#{name} added to #{org}.\"\n end\nend",
"title": ""
},
{
"docid"... |
0d311d261c1f6d8d6c5ab98a58d05404 | The services used to send the package | [
{
"docid": "359bbea8a9ec53ea45ca0c3a1afba7d9",
"score": "0.0",
"text": "def services=(services)\n @services = services.kind_of?(Array) ? services : [services]\n end",
"title": ""
}
] | [
{
"docid": "d2d90d6b86578209cc8d25b692280725",
"score": "0.6874819",
"text": "def services\n end",
"title": ""
},
{
"docid": "6e47865be64513eaa946e88c43181af7",
"score": "0.6852372",
"text": "def services\n services = RingyDingy::RingServer.list_services\n\n services.value... |
5f63aa501f2bb8f71dff718791736fbc | Returns the key and the value described by the given line of an xcconfig. | [
{
"docid": "62f31971193907e5c7d8c6636ebb55c7",
"score": "0.60763437",
"text": "def extract_key_value(line)\n match = line.match(KEY_VALUE_PATTERN)\n if match\n key = match[1]\n value = match[2]\n [key.strip, value.strip]\n else\n []\n end\n end",
"t... | [
{
"docid": "c8fc3b7ecb18d58b53020f9b9383ef0e",
"score": "0.6639766",
"text": "def keyAndValueForLine(line)\n key = line[0 .. line.index('=') - 1]\n value = line[line.index('=') + 1 .. line.length()-1]\n # remove \" from string\n value = value.gsub '\"', ''\n return key.strip, va... |
b324ed463a42195f2c80dc70970a35ae | Size of the signal data. | [
{
"docid": "f6ad24775716d75487497d34430486ad",
"score": "0.7655373",
"text": "def size\n @data.size\n end",
"title": ""
}
] | [
{
"docid": "c8eb67c0ae5239bb85d724c766aa5faf",
"score": "0.7965678",
"text": "def size\n @data.bytesize\n end",
"title": ""
},
{
"docid": "eb581b048137fab8d42d36277d36d6eb",
"score": "0.7924332",
"text": "def size\n @data.size\n end",
"title": ""
},
{
"doc... |
f2675e2963675dd3996a18cd15e5dae2 | Baseline implementation for the search_hashes REST call | [
{
"docid": "a7db5bbf23fb1c9f4a7f54ef0b9b085b",
"score": "0.67474777",
"text": "def search_hashes request_pb, options = nil\n raise ::ArgumentError, \"request must be provided\" if request_pb.nil?\n\n verb, uri, query_string_params, body = ServiceStub.transcode_search_hashes... | [
{
"docid": "0ca3b99ef8b69bf9229db868b4e343c2",
"score": "0.6574194",
"text": "def search_hash(search, hash); end",
"title": ""
},
{
"docid": "0ca3b99ef8b69bf9229db868b4e343c2",
"score": "0.6574194",
"text": "def search_hash(search, hash); end",
"title": ""
},
{
"docid": "... |
b0b75d58d35b1b8223f1452fc7c20333 | When fetching a feed failed url: the fetched url response_code: the http response code response_header: the response header response_body: the response_body | [
{
"docid": "13d240ca04a94fa758e87d74382a19ce",
"score": "0.82347",
"text": "def feed_fetch_failure url, response_code, response_header, response_body\n Feed.filter(:feed_uri => url).update(:last_fetch => DateTime.now)\n if response_code != 304\n p \"Error #{url} #{response_code} #{response_bo... | [
{
"docid": "0e73d6863a37a77916e66af80460f571",
"score": "0.6711413",
"text": "def get_bad_response(url)\n begin\n sleep(rand(10))\n response = HTTParty.head(url, verify: false)\n #puts \"#{response.code}, #{url}\"\n return nil if response.code.to_s =~ /2[0-9]{2}/ # Success!\n return nil... |
9cb38f7cea73db8dba0343a483ab3051 | DELETE /claimcoupons/1 DELETE /claimcoupons/1.json | [
{
"docid": "eb71633b4559b159a99e1267f7dc8e9f",
"score": "0.7475364",
"text": "def destroy\n @claimcoupon.destroy\n respond_to do |format|\n format.html { redirect_to claimcoupons_url, notice: 'Claimcoupon was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",... | [
{
"docid": "ac2d3a5cc93aaac1f080e51f2a8ca47a",
"score": "0.74780977",
"text": "def destroy\n @claim_coupon.destroy\n respond_to do |format|\n format.html { redirect_to claim_coupons_url, notice: 'Claim coupon was successfully destroyed.' }\n format.json { head :no_content }\n end\n e... |
3ac522ea7a1955382d47237c033dc4fc | test defined structures load and have their names initialised | [
{
"docid": "b6f3121c1160a9c4932a02066e49f2f1",
"score": "0.653476",
"text": "def test_structures_accessor_names_inflected\n @@structures.each do |structure|\n assert struct_class = Structure.get(structure),\n \"Failed to load structure: #{structure}\"\n assert_equal struct_class.clas... | [
{
"docid": "c90029ff038eb7da360df5374569fff0",
"score": "0.73616654",
"text": "def test_structures_method_load_all\n assert Microformats::Structures.load_all, \"Failed to load all structures\"\n assert_equal Microformats::Structures.constants.sort,\n @@constants.sort, \"Unexpected structure n... |
4a306d3a2a1661a9255b129398389257 | Utility methods Ensure that target task is among context_task dependencies | [
{
"docid": "d2b70f859e611c9e266cdf5b3fe8fb87",
"score": "0.78167933",
"text": "def check_dependencies(target_task, context_task)\n return true if target_task == context_task\n context_task.all_prerequisite_tasks.include?(target_task)\n end",
"title": ""
}
] | [
{
"docid": "98fe1f08472143a96c408267a1f933a1",
"score": "0.68076986",
"text": "def depends_on?(other_task)\n depends_on.include?(other_task)\n end",
"title": ""
},
{
"docid": "03854cc6f57de75c709a3379c5b1dcb5",
"score": "0.6342285",
"text": "def assemble_deps(context,... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "b8996493cd6340bf26f18092bfd631c5",
"score": "0.0",
"text": "def set_intent\n @intent = Intent.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;... |
a2fb74b395efc8948fbfbaaae0ef9529 | A workaround to not show delete links for datagroups with linked datacolumns. It would be cleaner to declare the following in the model: def authorized_for_delete? datacolumns.size > 0 ? true : false end But up to now there is a bug in AS which displays escaped html instead of an inactive Deletelink. | [
{
"docid": "1181bfd66b843d174e89525e946d0eb5",
"score": "0.0",
"text": "def has_datacolumns? (record)\n record.datacolumns.size > 0 ? true : false\n end",
"title": ""
}
] | [
{
"docid": "391802fbe2d3f8c6ce7b46657bbcee9f",
"score": "0.61192536",
"text": "def delete_link?\n @delete_link\n end",
"title": ""
},
{
"docid": "76487acadf21726f910004f362cab583",
"score": "0.5910941",
"text": "def user_can_delete?\n false\n end",
"title": ""... |
412ee1a700162c8b94437b8b7fbd2267 | Configures port channels and interfaces All desired port channels and member interfaces are managed, port channels not listed in the desired configuration are removed | [
{
"docid": "3374c3b4115d3027bf53adc25d616e89",
"score": "0.8197684",
"text": "def configure_port_channels\n unless uplinks\n logger.debug(\"Skipping port channel configuration on %s as no uplink configuration were provided\" % type.puppet_certname)\n return\n end\... | [
{
"docid": "73dd02d5d8bc6f7f2b756613288269c5",
"score": "0.68039227",
"text": "def initialize_ports!\n if provider.model =~ /Aggregator/\n port_names.each do |port|\n configure_interface_vlan(port, \"1\", false, true)\n configure_interface_vlan(port,... |
58d76529b085cf54f32a2563fb029c5e | GET /batteries/new GET /batteries/new.json | [
{
"docid": "8cd3d7e2b853a0251287085794bca2e1",
"score": "0.0",
"text": "def new\n @station = Station.find(params[:station_id])\n @battery = Battery.new\n @battery_models = BatteryModel.all\n @system_types = SystemType.all\n \n respond_to do |format|\n format.html # new.html.erb\n ... | [
{
"docid": "4af8cb8f9f8f6ab45d4d3d6cdbf81817",
"score": "0.7140098",
"text": "def new\n @bounty = Bounty.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @bounty }\n end\n end",
"title": ""
},
{
"docid": "4af8cb8f9f8f6ab45d4d3d6cdbf... |
659f6cf2ae0a680c15f67b3652c7adf0 | DELETE /user_to_channel_subscriptions/1 DELETE /user_to_channel_subscriptions/1.json | [
{
"docid": "788def47d83000c135c95e6a602da47d",
"score": "0.7795445",
"text": "def destroy\n @user_to_channel_subscription.destroy\n respond_to do |format|\n format.html { redirect_to user_to_channel_subscriptions_url, notice: 'User to channel subscription was successfully destroyed.' }\n ... | [
{
"docid": "30fc9e44c2b99529d801849a7cf8d875",
"score": "0.7577627",
"text": "def delete options={}, headers={}\n @connection.delete \"subscriptions.json\", options, headers\n end",
"title": ""
},
{
"docid": "51a1995bd2f00c038962fac05d60b434",
"score": "0.75362194",
"... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "2147968dbd896fa24306ee59be21a06e",
"score": "0.0",
"text": "def set_model\n @model = ClientService.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;... |
2c94b99ea3fa4a41ea62e07cf2549c1c | specifies if parking meter is expired. | [
{
"docid": "09fd689adac7d31bcadb488de6f3c052",
"score": "0.71043295",
"text": "def expired?\n end",
"title": ""
}
] | [
{
"docid": "3fb68128d25619a59c7042d172c64a52",
"score": "0.72622854",
"text": "def expired?; end",
"title": ""
},
{
"docid": "aa8d52e679136b8b0eddb3b60e9c6388",
"score": "0.71661156",
"text": "def expired?\n false\n end",
"title": ""
},
{
"docid": "67c6b2d2e6df940... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "3e6874b030259c4456983662d958024b",
"score": "0.0",
"text": "def set_article\n @article = params[:id] ? Article.find(params[:id]) : Article.new(article_params)\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... |
0952866a0d60e689dacb3241735aabfb | Override by custom setters | [
{
"docid": "6e3348784d2bc127eb6ef5d9b74e933e",
"score": "0.0",
"text": "def set_selected_tab\n end",
"title": ""
}
] | [
{
"docid": "8283b1de573b6513575e739bf9eb83db",
"score": "0.7053151",
"text": "def attribute_to_set; end",
"title": ""
},
{
"docid": "8975f95936438911763d46097c40f12f",
"score": "0.69749266",
"text": "def set; end",
"title": ""
},
{
"docid": "8975f95936438911763d46097c40f1... |
597176036af4c27051cd79f4e115b111 | Helper method for reverse_sentence method | [
{
"docid": "c0b0954f344802b85f473b1a53f17d58",
"score": "0.0",
"text": "def reverse_string(str, start_idx = nil, end_idx = nil)\n if start_idx.nil? || end_idx.nil?\n start_idx = 0\n end_idx = str.length - 1\n end\n\n while start_idx <= end_idx\n str[start_idx], str[end_idx] = str[end_idx], s... | [
{
"docid": "32aa2c9a5f1756f0ab6f1e50f36c1b4c",
"score": "0.81865907",
"text": "def reverse_sentence(my_sentence)\r\n my_sentence = reverse_words(my_sentence)\r\n my_sentence = string_reverse(my_sentence)\r\nend",
"title": ""
},
{
"docid": "10180c8ddd675cddb848e7ad1c6ff969",
"score": "0... |
1205d451be9f17bc0bd4c41f7f01e57c | Perform this action on the given model. | [
{
"docid": "6e353edbd0d26298ba638b242d125a5e",
"score": "0.63645494",
"text": "def call(model)\n job_class.perform_later model\n end",
"title": ""
}
] | [
{
"docid": "28fa1345c7787efa086c928db6695e0e",
"score": "0.66058797",
"text": "def call(model, *args)\n data, options = *extract_args(args)\n new(model, options).call(data)\n end",
"title": ""
},
{
"docid": "ebaf02bf5875d899025618dff512d764",
"score": "0.6603157",
... |
e5b8a985db6367e222223f37d03aaec2 | POST /achievements POST /achievements.json | [
{
"docid": "92ea1e7cdba7e6a5aa0659c702e8f4b9",
"score": "0.0",
"text": "def create\n msg = Msg.new\n msg.result = false;\n msg.content = '创建成就类型失败'\n if Achievement.find_by_type(params[:achievement][:type])\n msg.content = '已存在该成就类型'\n elsif !AchievementType.valid_type?(params[:achie... | [
{
"docid": "1f5ec97018b34b2a6a012d5f6e6fc0d7",
"score": "0.7292079",
"text": "def create\n @achievement = Achievement.new(params[:achievement])\n\n respond_to do |format|\n if @achievement.save\n format.html { redirect_to @achievement, :notice => 'Achievement was successfully created.'... |
3bc5c744458898930ee918f26d2391ca | DELETE /mensajes/1 DELETE /mensajes/1.json | [
{
"docid": "8740c6cf95d1f149ef106928a063cb18",
"score": "0.75984776",
"text": "def destroy\n @mensaje = Mensaje.find(params[:id])\n @mensaje.destroy\n\n respond_to do |format|\n format.html { redirect_to mensajes_url }\n format.json { head :ok }\n end\n end",
"title": ""
}
] | [
{
"docid": "b17b09841248f0f6e746c782478d5553",
"score": "0.7545532",
"text": "def destroy\n @mesaje.destroy\n respond_to do |format|\n format.html { redirect_to mesajes_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "a05aaefd5bd8338516dd5... |
075331a200d9e286dab6955b23521007 | Collapses results to only return what's specified by :find. | [
{
"docid": "b1ab377077bf5ea5cd6e223e8c1f6480",
"score": "0.5664195",
"text": "def multifind_collapse_results(options, results)\n # That was easy!\n if options[:find] == :all\n return results\n end\n\n # Filtering :first and :last is identical, except we go backwards\... | [
{
"docid": "ec79774981d91bba5418a9cf31e7d429",
"score": "0.5653808",
"text": "def filter_records\n filter_requested_ids\n limit_results\n end",
"title": ""
},
{
"docid": "01339d64a2312f99bca8280f341c92ba",
"score": "0.5598964",
"text": "def find_only!\n find_only || raise... |
b9b280f4a23174ee4a11f2c3ff9054b0 | Pack elements within the block in a grid (matrix) formation. | [
{
"docid": "488e18690ca43fabc31115f49b546a60",
"score": "0.0",
"text": "def grid(options = {}, &block)\n Grid.new({ parent: self }.merge!(options), &block)\n end",
"title": ""
}
] | [
{
"docid": "a9f63ced2d374c325bb7e9ad52d6e8cf",
"score": "0.6904012",
"text": "def repack\n @widths = Array.new(@rows.empty? ? 0 : @rows[0].size, 0)\n @heights = Array.new(@rows.size, 0)\n\n filled_columns = []\n filled_rows = []\n\n # Calculate the maximum widths of each column ... |
daba2b6821faa3c25ff830523d6002e0 | Balances mismatched tags, normalizes body style, and fixes actions so they are in Adium style (Pidgin uses "Buddy waves at you", Adium uses "Buddy waves at you"). | [
{
"docid": "92fa50296f57e968b31a50f38489284f",
"score": "0.5026013",
"text": "def normalize(string)\n new_body = normalize_entities(string)\n # Fix mismatched tags. Yes, it's faster to do it per-message\n # than all at once.\n new_body = Pipio::TagBalancer.new(new_body).balance\n ... | [
{
"docid": "e32d60b517f075ee34ad982d84f70818",
"score": "0.57746774",
"text": "def clean_up_contents()\n # very minimal\n # elements = ['p', 'b', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'], attributes={})\n\n if self.contents?\n html = self.contents\n email_regex = /<p>Email:\\s+((\\w|\\-|\\... |
41ed1e323066241390de0aca5eb87d77 | Cuando un usuario se da de baja sus recetas quedan almacenadas, para ello se genera un nuevo nombre de receta | [
{
"docid": "5183b7506e0389ef77ec82730a8d60db",
"score": "0.0",
"text": "def GenerateNewRecipeName(name)\n\t\tn = (rand(0..9999)).to_s\n\t\twhile (n.size < 4)\n\t\t\tn = \"0\"+n\n\t\tend\n\t\treturn name+n\n\tend",
"title": ""
}
] | [
{
"docid": "b8e7bfca5420c5f49fe26dba4d084e97",
"score": "0.6439847",
"text": "def mensaje_recibido(mensaje,trabajo,presupuesto,proveedor,usuarios)\n @trabajo = trabajo.proposito\n @categoria = trabajo.categoria.nombre\n @presupuesto = presupuesto\n @proveedor = pr... |
1653b659a2bbc9e79986779e96fbe605 | def avatar user.avatar end | [
{
"docid": "438caefdcafe322cfba21eb561916a8b",
"score": "0.0",
"text": "def is_owner?(this_user)\n user == this_user\n end",
"title": ""
}
] | [
{
"docid": "b0337dd35e3a5e650d9a15fa340d5f36",
"score": "0.84096676",
"text": "def show_avatar\n\n end",
"title": ""
},
{
"docid": "b0337dd35e3a5e650d9a15fa340d5f36",
"score": "0.84096676",
"text": "def show_avatar\n\n end",
"title": ""
},
{
"docid": "7c03fef7da2330d7fc... |
908323cd4e7be8ec0469ca10b118657f | Used to transfer domain ownership from one registrar to another. domain Name of the domain to be transferred auth_info Domain authorization code Returns DomainTransferResponse object | [
{
"docid": "9cd175ecf155d3e011310295fefcfeea",
"score": "0.75421727",
"text": "def transfer_domain(domain, auth_info, legal_document, legal_doc_type)\n builder = build_epp_request do |xml|\n xml.command {\n xml.transfer('op' => 'request') {\n xml.transfer('xmlns:d... | [
{
"docid": "21f25a0a10876b8f33e84fc6a676627e",
"score": "0.6343987",
"text": "def domain_transfer_in(domain, owner_handle, admin_handle, tech_handle, billing_handle, nameservers, auth_code = nil)\n args = [domain, owner_handle, admin_handle, tech_handle, billing_handle, nameservers, auth_code]\n ... |
6851413c36b8d1b5d2b054ac9ebea685 | DELETE /taskpriorities/1 DELETE /taskpriorities/1.json | [
{
"docid": "79898db908ae6c48bf33e47966517065",
"score": "0.7282597",
"text": "def destroy\n @taskpriority.destroy\n respond_to do |format|\n format.html { redirect_to taskpriorities_url }\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "2c1226b413139afb28a8653457942b65",
"score": "0.69733834",
"text": "def destroy\n @task_priority = TaskPriority.find(params[:id])\n @task_priority.destroy\n\n respond_to do |format|\n format.html { redirect_to(task_priorities_url) }\n format.xml { head :ok }\n end\n en... |
0de1c62dca79750a7661bf5ea79e3e62 | Check if the given route data matches the splitup URL. == Parameters: route:: An object that responds to `handler`, `url_parts`, and `verb`. url_parts:: An array of Strings corresponding to a split URL. | [
{
"docid": "cf8916bbba6a5f1b943acdda56f5d44a",
"score": "0.7251633",
"text": "def matches?(route, url_parts)\n if route.url_parts.size != url_parts.size\n return false\n end\n\n params = { }\n\n route.url_parts.zip(url_parts) do |parts|\n ... | [
{
"docid": "ed52b7f76dff47d334b6bc77a6b26af9",
"score": "0.6364305",
"text": "def match(route)\n @http_method == route.http_method && @path.match(route.path)\n end",
"title": ""
},
{
"docid": "9dd6cc19a3eea6e2366fd540cd0f7296",
"score": "0.61439633",
"text": "def valid_route?... |
275e73999df317e52069021b9ea11caa | DELETE /tasks/1 DELETE /tasks/1.json | [
{
"docid": "a54f79ed1c7c78bf6b82277fcea5ec00",
"score": "0.0",
"text": "def destroy\n @task.destroy\n respond_to do |format|\n format.html { redirect_to tasks_url, notice: '已删除' }\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "8379665eb11157da423e4d478103f0b0",
"score": "0.7699033",
"text": "def delete_task\n Task.find(params['task_id']).destroy\n render json: {success: true}\n end",
"title": ""
},
{
"docid": "9d5e7fb54fb48465ffe5dcad22720803",
"score": "0.7661144",
"text": "def delete_t... |
b116103673b37b755c78acdd273cc196 | POST /tels POST /tels.json | [
{
"docid": "10678f18daa7e1e5adf77bb8fe5d305c",
"score": "0.0",
"text": "def create\n @tel = Tel.new(tel_params)\n\n respond_to do |format|\n if @tel.save\n format.html { redirect_to @tel, notice: 'Tel was successfully created.' }\n format.json { render :show, status: :created, l... | [
{
"docid": "5aeac9b87bfb2cfc855b8bb57aaa5600",
"score": "0.5819782",
"text": "def create\n @tetramod = Tetramod.new(params[:tetramod])\n\n respond_to do |format|\n if @tetramod.save\n format.html { redirect_to @tetramod, notice: 'Tetramod was successfully created.' }\n format.js... |
9595968ed46817abfecd4d05dea87c37 | Start the Rake Application | [
{
"docid": "0e5c5509b34af4c02f3442b01a0672d7",
"score": "0.6419339",
"text": "def run\n @log.info \"-----| Starting the Workflow : [#{@info[\"name\"]}] |-----\"\n # Loads the Rakefiles in the append list.\n @app.load_rakefile\n\n # Invoke the default Task giving instance of needed Classes as... | [
{
"docid": "33acaf3ab7c9250a56cc5bfe0631751a",
"score": "0.70061487",
"text": "def start\n return if self.pid\n\n cmd = [\n gem_env(),\n Conf.ruby_command,\n script_path,\n \"--port\", self.port.to_s,\n \"--data-dir\", data_dir,\n ].join(\" \")\n\n Ramaze::Log.info \... |
7f7ae2bf12cf814965757609d3f785e4 | DELETE /page_elements/1 DELETE /page_elements/1.json | [
{
"docid": "3471079a92f7ffb11e82efb108294c73",
"score": "0.71819836",
"text": "def destroy\n @page_element.destroy\n respond_to do |format|\n format.html { redirect_to council_page_page_elements_path(@council) }\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "f4879da218898dc53d5f7882d2f0ce15",
"score": "0.71069586",
"text": "def delete_page(id)\n @client.raw('delete', \"/content/pages/#{id}\")\n end",
"title": ""
},
{
"docid": "4c516461d7637468f25c1aacf9607edf",
"score": "0.6865545",
"text": "def destroy\n @nested_page ... |
e8f35890c3c735615c71040df9f63b25 | cinput to index method and all that | [
{
"docid": "dfbebbc78293b9db8de1d1202d3a3cf1",
"score": "0.0",
"text": "def input_to_index(input)\n newInput = input.to_i\n return newInput - 1\nend",
"title": ""
}
] | [
{
"docid": "d1ca6ec186e8173ca6023f9fee2ffd55",
"score": "0.6954767",
"text": "def index ; @index ; end",
"title": ""
},
{
"docid": "da2070a92ed7c9b176814ee3ac6ce157",
"score": "0.6815435",
"text": "def index=(_arg0); end",
"title": ""
},
{
"docid": "f01c58c76c826a9e5365ae... |
eb4cf221e9c70292b1d3f6d478b83b50 | Retrieve a EmailIngestionProfile by id | [
{
"docid": "42336b5c5f0a52abee4af5dbde3934f1",
"score": "0.8081999",
"text": "def get(id)\n\t\t\tkparams = {}\n\t\t\tclient.add_param(kparams, 'id', id);\n\t\t\tclient.queue_service_action_call('emailingestionprofile', 'get', kparams);\n\t\t\tif (client.is_multirequest)\n\t\t\t\treturn nil;\n\t\t\tend\n... | [
{
"docid": "9423cf463b41c8c3f345e5097555a646",
"score": "0.65708244",
"text": "def get(id)\n\t\t\tkparams = {}\n\t\t\tclient.add_param(kparams, 'id', id)\n\t\t\tclient.queue_service_action_call('ossadapterprofile', 'get', 'KalturaOSSAdapterProfile', kparams)\n\t\t\tif (client.is_multirequest)\n\t\t\t\tr... |
dcbd9aa3e6751b84fc327966ea99e58d | Executes SOAP action specified as a string with given arguments. | [
{
"docid": "46ab75ab18b697a2b7f605ade158cbaa",
"score": "0.75079876",
"text": "def execute_action(action_name, args)\n args = validate_args(action_name, args)\n response = execute_soap_request(action_name.to_sym, args)\n handle_errors(response)\n return extract_result(response, actio... | [
{
"docid": "ed51c305433d8969d751364eeb110acb",
"score": "0.75573456",
"text": "def execute_soap_request(action, args)\n original_action_name =\n get_service_registry.get_method_signature(action)[:original_name]\n original_action_name = action if original_action_name.nil?\n respon... |
9e808cda5e8c60dea18ef7a0c1f04745 | Return a text that describes a partition | [
{
"docid": "570bd41cf8d3da9b8db3cbd5404e378b",
"score": "0.7360117",
"text": "def partition_text(nr, pentry, bps)\n pentry = deep_copy(pentry)\n size_str = Storage.ByteToHumanString(\n size_of_region(Ops.get_list(pentry, \"region\", []), bps)\n )\n if Ops.get_symbol(pentry, \"... | [
{
"docid": "91b777831fa47f4721118339484c3645",
"score": "0.63926995",
"text": "def part_name; end",
"title": ""
},
{
"docid": "5b5d2e2e69f399b66993a34470bf0191",
"score": "0.62385297",
"text": "def part_name\n part.name\n end",
"title": ""
},
{
"docid": "0ec14e8d07792... |
4cce62492f1cc59c43a47e4c80d8b05e | and returns true if the sum of the characters is prime. Remember that a number is prime if the only integers that can divide it with no remainder are 1 and itself. Examples of length three prime_chars? ['abc'] => true prime_chars? ['a', 'bc'] => true prime_chars? ['ab', 'c'] => true prime_chars? ['a', 'b', 'c'] => true... | [
{
"docid": "4adca85837bd37acfe284a547c886433",
"score": "0.811105",
"text": "def prime_chars?(strings)\nstrings = strings.to_s\nnr_to_test = strings.split(//).delete_if{ |x| x == \" \"}\nnum = nr_to_test.length\n\nreturn false if num <= 1\nMath.sqrt(num).to_i.downto(2).each {|i| return false if num % i ... | [
{
"docid": "1d42a0768b8a4e41fd0d28c30d4fec62",
"score": "0.8438191",
"text": "def prime_chars?(ary)\n sum = 0\n ary.each { |x| sum += x.length }\n \n prime = true\n\n for y in 2..Math.sqrt(sum).to_i\n \tif sum % y == 0\n \t\tprime = false\n \tend\n end\n\n return prime\nend... |
28ac00d2cb4e9bdd55a6d8596a07289e | Return the schedules answer | [
{
"docid": "17d7e70b087cba1445dc0e11d3807650",
"score": "0.0",
"text": "def scheduled?(starting, ending)\n schedule.scheduled?(self, starting, ending)\n end",
"title": ""
}
] | [
{
"docid": "b5aead58798ac8c94d80bfe4ec6e7de1",
"score": "0.6413183",
"text": "def test_schedule(schedule)\n # Logical Flow of Testing a Schedule\n # Due to the 'free' 30 minutes at the beginning or end of the day for off-site meeting travel, and the ability to overlap the travel in between two off-sit... |
9a9c2da0cd136b250593b952903337d7 | Print out the sum (with highlights if the target value was hit). | [
{
"docid": "efab0330e98fac7772d6c0fdfbed6fb4",
"score": "0.64352363",
"text": "def calc(whole_sum)\n result = eval(whole_sum)\n target_hit = (result == @target)\n puts '*' * 30 if target_hit\n puts whole_sum + ' = ' + result.to_s\n puts '*' * 30 if target_hit\n @total_evals += 1\n @target_... | [
{
"docid": "a19019df7f8551258e698180ee350fa1",
"score": "0.63835233",
"text": "def result\n puts \"The final total of operation(s) is #{@sum}\"\n end",
"title": ""
},
{
"docid": "9078c70fe039e84922e36bed3211c3c1",
"score": "0.60058457",
"text": "def print\n sum = arr.sum\n ... |
a733529aec1118f1cbc13fcc24e40429 | Sending message of agree or disagree if user accept or declain friendship request There is a special priority: 5 of friendship request message | [
{
"docid": "16a1fb31c54007817b69fec5824eb6f5",
"score": "0.0",
"text": "def add_friend(receiver)\r\n self.friends << receiver\r\n receiver.friends << self\r\n self.friends.save && receiver.friends.save\r\n end",
"title": ""
}
] | [
{
"docid": "727215fb77f0cf0f1b950e77d92fdcf1",
"score": "0.72203934",
"text": "def deciding_request\n request_friendship = RequestFriendship.find(params[:rf])\n\n n = current_user.id\n if n != request_friendship.recipient_id\n throw Exception\n end\n\n\n #Para que no sea grande ni sa... |
9e30ec7f8a4d0c45ee33f568033a65be | Get the first matching group. | [
{
"docid": "72d842224aff5d0412451b75c7f1b24e",
"score": "0.0",
"text": "def find_group(opts = {}, &block)\n groups = find_groups(opts, &block)\n filter_list(groups)\n end",
"title": ""
}
] | [
{
"docid": "4dbcca5b45f89d126b905e50d5f43e52",
"score": "0.7401584",
"text": "def first\n matches.first\n end",
"title": ""
},
{
"docid": "828c6260700c2548d0189ef58bf7b6dc",
"score": "0.7361895",
"text": "def group\n groups.first\n end",
"title": ""
},
{
"... |
f505ee7777d8658fc92f8c4847a93f48 | The number of results to return for the scaffolded autocomplete text box. | [
{
"docid": "3487b11df538c8e5f24816a85312cc7c",
"score": "0.68637276",
"text": "def scaffold_auto_complete_results_limit\n scaffold_auto_complete_options[:results_limit]\n end",
"title": ""
}
] | [
{
"docid": "e02cfe06c81468773f73c9537eeaeea2",
"score": "0.6949893",
"text": "def results_limit\n # max number of search results to display\n 10\n end",
"title": ""
},
{
"docid": "4a40820f78cc206f486f2f7bf9a66bff",
"score": "0.6918965",
"text": "def number_of_results(results)\... |
4529abbc26418659197e0849ea942ac9 | Fibonacci Write a recursive and an iterative Fibonacci method. The method should take in an integer n and return the first n Fibonacci numbers in an array. You shouldn't have to pass any arrays between methods; you should be able to do this just passing a single argument for the number of Fibonacci numbers requested. | [
{
"docid": "c157534b920e2564121859d704118378",
"score": "0.0",
"text": "def fibonacci(n)\n return 1 if n == 1 || n == 2\n fibonacci(n-2) + fibonacci(n-1)\nend",
"title": ""
}
] | [
{
"docid": "2327b828ca3e9d3a46ac704c4940b94c",
"score": "0.83496624",
"text": "def fibonacci(n)\n if n == nil || n < 0\n raise ArgumentError.new(\"Invalid value\")\n elsif n == 0\n return 0\n else\n array = []\n array << 0\n array << 1\n x = 0\n y = x + 1\n until y == n\n\n ... |
3187210f29d83475125322f5fde705c6 | copied from bcsec's cas mode because it's not trivially reusable from there. | [
{
"docid": "28754116c304acd779ebdd6109c10e48",
"score": "0.0",
"text": "def service_url_base\n requested = \"#{request.scheme}://#{request.host}\".tap do |url|\n unless [ [\"https\", 443], [\"http\", 80] ].include?([request.scheme, request.port])\n url << \":#{request.port}\"\n end\n... | [
{
"docid": "093e819d83b0a5d2aedf7d15167f9f75",
"score": "0.6881782",
"text": "def ev_cas(s); cas(s); end",
"title": ""
},
{
"docid": "655d56e630928767c99d46dbed21a2d3",
"score": "0.60618085",
"text": "def cas (key,value,cas,exptime=\"0\",flags=\"0\")\n msj = \"cas #{key} #{flags} ... |
4d76c7b75ff1495f74295314e957607e | function to return the amount of unique web visits between and needs to be hooked in to real data | [
{
"docid": "70eeb93840bc0331800ac7b654ece0f6",
"score": "0.7255202",
"text": "def get_web_visits(start, finish)\n\t\t5000 + rand(1000)\n\tend",
"title": ""
}
] | [
{
"docid": "24a9620d485b3469e548f536ed135042",
"score": "0.78463423",
"text": "def calculate_visits_count\n self.visits.count(:conditions => {:unique => true}).to_i\n end",
"title": ""
},
{
"docid": "6b7e47c4494aa9907bec7a2ae0e429e0",
"score": "0.7659429",
"text": "def nu... |
a2099a77c85e91272ae2f9e35b937953 | Only allow a trusted parameter "white list" through. | [
{
"docid": "c80cd64f438747edbd24830f7b666cc9",
"score": "0.0",
"text": "def pelouro_params\n params.require(:pelouro).permit(:name, :abbreviation, :employee_id, :title, :title_abbreviation, :is_chairman, :cancel_url, :redirect_url, {organic_unit_ids: []})\n end",
"title": ""
}
] | [
{
"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": ... |
1c493ab342dd338ed3e6cc9eeeb088d1 | def kesha_maker(array) new_array = [] array.each do |element| element[2] = "$" new_array << element end new_array end | [
{
"docid": "d43c20431c598ee1f92a0c6cc5c7b2f8",
"score": "0.0",
"text": "def find_a(array)\n array.select { |element| element.start_with?(\"a\") }\nend",
"title": ""
}
] | [
{
"docid": "bd0e8b3885aebfb4cbe786d1792f453d",
"score": "0.9429786",
"text": "def kesha_maker(array)\n new_array = []\n array.each do |string|\n string[2] = \"$\"\n new_array << string\n end\n new_array\nend",
"title": ""
},
{
"docid": "04b6607a545a4f93e5a706a79528fcea",
"score... |
a7a371748a2492b7eeb0dd109d99b8e5 | Complete the jumpingOnClouds function below. | [
{
"docid": "b134443f322ef1bf7b3ed4de36ef4d8f",
"score": "0.57939965",
"text": "def jumpingOnClouds(c)\r\n rc = 0\r\n jumpable = 0\r\n c.each_with_index do |d,i|\r\n jumpable = if d == 0\r\n jumpable < 3 ? jumpable + 1 : 2\r\n else\r\n 0\r\n ... | [
{
"docid": "1e00dc2810c5dc62acf06cdec7b7da0c",
"score": "0.6921228",
"text": "def jump_complete\n @jump_ready = false\n @jumping_progress = 0\n @jumping = false\n end",
"title": ""
},
{
"docid": "6d57b918e749644da420a52a28eb039a",
"score": "0.6685279",
"text": "def jumpingO... |
01308e80ba9196395bb1818d3ec9bf91 | Return a cfg for these instructions. The CFG includes connected basic blocks as well as any temporary registers | [
{
"docid": "10df17e0eaa05afbd1b1c9c6adda4cf8",
"score": "0.73863655",
"text": "def cfg\n CFG.build @instructions\n end",
"title": ""
}
] | [
{
"docid": "ef0e4f5a5700a375d301261fb15d31f4",
"score": "0.6259112",
"text": "def cfg!\n buildCFG unless get_cfg\n get_cfg\n end",
"title": ""
},
{
"docid": "488337dc3d17176fc00e7937ba68193e",
"score": "0.5985992",
"text": "def basic_blocks\n cfg.blocks\n end",
"title"... |
af630984682f1a0b5a68e6092af0d102 | Update properties of this object | [
{
"docid": "9a4553e27ec4f34bc793d8cda9d5e5bc",
"score": "0.0",
"text": "def update!(**args)\n @topic = args[:topic] if args.key?(:topic)\n @update_mask = args[:update_mask] if args.key?(:update_mask)\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... |
a870159be102ff1b0bf89c3e7f8a4bad | Saturday, August 15, 2020 Afternoon Session EX 4 | [
{
"docid": "341926593dc66e468c3cef153fe3a4b1",
"score": "0.0",
"text": "def checkerboard(num)\n i = num\n j = num\n is_even = true\n colors = [ \"[r]\", \"[b]\" ]\n while i >= 1\n arr = []\n if i % 2 == 0 \n is_even = true\n else \n is_even = fal... | [
{
"docid": "3b6697c7e379785f41f2150f71f0df45",
"score": "0.6371358",
"text": "def cwday() commercial[2] end",
"title": ""
},
{
"docid": "f84bde8449e3127547db04ff51f63215",
"score": "0.6260696",
"text": "def day_of_week; end",
"title": ""
},
{
"docid": "18149a6eb52414684ea... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "32e505b79ba74cdb375a61e4943d0d07",
"score": "0.0",
"text": "def set_note_field\n @note_field = NoteField.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.60328794",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.6017492",
"text": "de... |
5fa3d4c831a331762f9b05b69017b981 | Find the youngest revision | [
{
"docid": "b96032c7cd3b428866c24d9dcc943fc7",
"score": "0.8454704",
"text": "def youngest_rev\n Svn::Repos.open(@repos_path).fs.youngest_rev\n end",
"title": ""
}
] | [
{
"docid": "a3846c132edcea79a03f51095cad106e",
"score": "0.8221746",
"text": "def get_youngest_rev \n fs.youngest_rev\n end",
"title": ""
},
{
"docid": "b8eeb6c4bc2e3c934fec9b0893b60f29",
"score": "0.8112423",
"text": "def youngest_revision(path=nil, revision=nil)\n if... |
f15afbe35e5d46883292f94c3fcbdfab | Load tokens from the ~/.twitter file | [
{
"docid": "f3cd8e9f80dac82d00740df63a7f449f",
"score": "0.7418501",
"text": "def load_tokens\n if File.exists?(TOKEN_PATH)\n f = File.open(TOKEN_PATH, 'r')\n tokens = YAML::load(f)\n f.close\n tokens\n end\n end",
"title": ""
}
] | [
{
"docid": "fe2d7a13609dbf30d8671826b992b69c",
"score": "0.6637794",
"text": "def load_tweet\n\t### Setup access credentials\n\n\tconsumer_key = \"i6baQCTt1sCXAo8YWcKhuly9Z\"\n\tconsumer_secret = \"DeE9vnnlt7uLgvb1k7ymuHkhBMA0WlOLhSOXzSZAPrO0HZb63h\"\n\n\t### Get the Access Token\n\n\tbearer_token = \"#... |
d9b9b911debfd7a068e1ad7fdaca5fc4 | DELETE /activities/1 DELETE /activities/1.xml | [
{
"docid": "61db25fb634e9edc296a63080d2aaed9",
"score": "0.72501415",
"text": "def destroy\n @activity = Activity.find(params[:id])\n @activity.destroy\n\n respond_to do |format|\n format.html { redirect_to activities_url }\n format.xml { head :ok }\n end\n end",
"title": ""
... | [
{
"docid": "c7c158d8c5746924f6b8b8cdf183f71f",
"score": "0.73651886",
"text": "def destroy\n @activity = get_user.activities.find(params[:id])\n @activity.destroy\n\n respond_to do |format|\n format.html { redirect_to(activities_url()) }\n format.xml { head :ok }\n end\n end",
... |
147275b6ec03a4dbc6517fdb4c210e27 | Parses the whole xml document before processing. Not a very smart thing to do, bc it fills the memory pretty fas t. | [
{
"docid": "8032647d56132237b985ea9073827e30",
"score": "0.0",
"text": "def parse_xml string\n pcs = []\n pchs = Nokogiri::XML(string).xpath(\"//PatientCase\")\n throw :NoPatientCaseNode => \"Couldn't find any nodes called \\\"PatientCase\\\"\" if pchs.size < 1\n throw :TooManyArguments => \... | [
{
"docid": "61ffbacc6811f1cc41da2f12a13f0f4f",
"score": "0.7747449",
"text": "def xmlParseDocument()\n raise XML_Document_Empty, \"File content is empty\" if @eof_index == 0\n \n if (cmp('<?xml') && is_blank_ch?(nxt(5)))\n xmlParseXMLDecl()\n skip_blanks\n end\n \n... |
02510739691a34c8d57d3004ee511862 | ============================================================================== authen_method_enable!() ============================================================================== Set the 'authen_method' field to 'enable'. | [
{
"docid": "81d4df5ad146ad80d04a0812ce17c625",
"score": "0.8896283",
"text": "def authen_method_enable!()\n @authen_method = TAC_PLUS_AUTHEN_METH_ENABLE\n end",
"title": ""
}
] | [
{
"docid": "e099c48207d8fb9bbc99afad494fe41a",
"score": "0.7569514",
"text": "def enable\n {\n method: \"WebAuthn.enable\"\n }\n end",
"title": ""
},
{
"docid": "116a0b48e815b7bd50a661f4c9ddf857",
"score": "0.7560722",
"text": "def authen_method_enable?()\... |
e28473b26435b2945925ab1f388d8dd7 | GET /pt_records/1 GET /pt_records/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "ea2d319981ba131e525e4fc72dc6428c",
"score": "0.6679308",
"text": "def get_records\n return error_response unless is_get_records_request?\n as_json\n end",
"title": ""
},
{
"docid": "d8507bd945da31a9de9d56c5047aa00a",
"score": "0.6496492",
"text": "def index\n... |
89da55bd25e96cfba3680d4c552c5a26 | returns the given named behavior from the subject's list of behaviors | [
{
"docid": "ea2b87b2c630fabb3839c2d6319ae68c",
"score": "0.6312331",
"text": "def behavior name, &block\n yield get_behavior name if block\n get_behavior(name)\n end",
"title": ""
}
] | [
{
"docid": "42c970ad3776035f671b74bc016246f1",
"score": "0.6138583",
"text": "def behavior(name)\n\n name = name.to_sym\n raise BehaviorError.new(\"undefined behavior '#{name}'\") if $__behavior_info__[name].nil?\n\n clazz = self.method(:behavior).receiver\n\n unless clazz.instance_methods(f... |
dac1831c2f4580fb38cf85913447bb4a | odd number of times. There will always only be one integer that appears an odd number of times. | [
{
"docid": "76982ac0244e587cdaf99367650e01d8",
"score": "0.0",
"text": "def find_odd(arr)\n arr.find { |i| arr.count(i).odd? }\nend",
"title": ""
}
] | [
{
"docid": "5b500c521ee4db8a1e6893e715111e39",
"score": "0.6769705",
"text": "def oddCount n \r\n if (n % 2 == 0)\r\n return n / 2\r\n end\r\n return (n - 1) / 2\r\n end",
"title": ""
},
{
"docid": "57302f14f10092e12b921e1be7583a3f",
"score": "0.6767583",
"text": "def ... |
37ac6b902472686569c2e0b2a44aaaf0 | POST /room_prices POST /room_prices.json | [
{
"docid": "5c4adb032106d6f748de98a94d224971",
"score": "0.7060618",
"text": "def create\n @room_price = RoomPrice.new(room_price_params)\n\n respond_to do |format|\n if @room_price.save\n format.html { redirect_to @room_price, notice: 'Room price was successfully created.' }\n ... | [
{
"docid": "034808bdf11a6bf4cc16b40e606cd8b9",
"score": "0.6862985",
"text": "def price\n ret = Reservations::Calculator.call(@vehicle, pickup: params[:pickup], dropoff: params[:dropoff])\n render json: ret\n end",
"title": ""
},
{
"docid": "ea87386d5283299a3de579d8ebf87fa7",
"sco... |
90b4f4a8b4852968cd1d6824718cdef2 | array root is the innermost namespace name ('space') if there is one, otherwise the route name (e.g. get 'name') | [
{
"docid": "2df36bdc1eac44d0738440d8f16073cb",
"score": "0.64874",
"text": "def default_root(endpoint)\n innermost_scope = endpoint.settings.peek\n\n if innermost_scope[:namespace]\n innermost_scope[:namespace].space\n else\n endpoint.options[:path][0].sp... | [
{
"docid": "9d77e89f9af979a60ba6dd675ae7e0c9",
"score": "0.6842499",
"text": "def route_name # 'post' initialized from the controller_path/initialized_name and not the class\n names = class_name.split('::')\n\n if names.length > 1\n Array(names[0]) + namespaces + Array(names[1..-1... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "d7412c8324db07817db7fe8b6b62d151",
"score": "0.0",
"text": "def set_beer_cellar\n @beer_cellar = BeerCellar.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... |
7b2dca52cbbeb7b3a5c35f48691bbae4 | Stop Object from executing | [
{
"docid": "854a79b68dc302b39b7599cc58d68cc5",
"score": "0.752236",
"text": "def stop\n @go = false\n end",
"title": ""
}
] | [
{
"docid": "f3a771ddfa1c8cabbe0fd5c5a07768eb",
"score": "0.7672854",
"text": "def stop\n @run = false\n end",
"title": ""
},
{
"docid": "4e33a41a73fe2bbb8b5e061a2391ed5f",
"score": "0.7635573",
"text": "def stop()\n #This is a stub, used for indexing\n e... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "27d4b428403565df8fbb58c5649f379c",
"score": "0.0",
"text": "def set_auction_promotion_activity\n @auction_promotion_activity = Auction::PromotionActivity.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... |
94a2968b975ddcd085765884c5699373 | Returns the Issues attribute without loading the extra information. Ideal for a quick scan of the Hash prior to selecting the correct Issue. This method is also used in the lazy loading methodology. | [
{
"docid": "50236e1ff9492683ad1410b6449f9707",
"score": "0.6274256",
"text": "def issues_raw\n @issues\n end",
"title": ""
}
] | [
{
"docid": "c836d9b95d31b7c5d6f14bed0ef82949",
"score": "0.6290612",
"text": "def issues_hash\n @issues_hash ||= Cached::Issues.call(user: user, board: @board)\n end",
"title": ""
},
{
"docid": "c1e3b5069848b3d81f13c15e09f10c1c",
"score": "0.6255636",
"text": "def issues\n ... |
65e5f81fa5dc5e44e93da34d5c855f91 | Get the result of this scaling scenario | [
{
"docid": "411b62807a6ea1c896db15564c0b7e22",
"score": "0.68789005",
"text": "def result\n @result ||= @destination.scale(@input, @source)\n end",
"title": ""
}
] | [
{
"docid": "0f718d8af6139bdf20cbf64eee8cfceb",
"score": "0.71539104",
"text": "def scaling\n return @scaling\n end",
"title": ""
},
{
"docid": "0f718d8af6139bdf20cbf64eee8cfceb",
"score": "0.71539104",
"text": "def scaling\n return @scaling\n ... |
a4621f36433f5a94f2b26d20a02f2d4d | Checks if the start key was already read for the range. | [
{
"docid": "4b643e7c486b9cee8c37a0f5a72052c7",
"score": "0.8482087",
"text": "def start_key_read? range\n start_key = if range.start_key_closed.empty?\n range.start_key_open\n else\n range.start_key_closed\n ... | [
{
"docid": "2ce5767bd8e25f53302cc4ad1a88f6a9",
"score": "0.8441613",
"text": "def start_key_read? range\n start_key = if !range.start_key_closed.empty?\n range.start_key_closed\n else\n range.start_key_open\n ... |
cc31b853c230a0c92a98ac6291b0c610 | Specifies a new irregular that applies to both pluralization and singularization at the same time. This can only be used for strings, not regular expressions. You simply pass the irregular in singular and plural form. | [
{
"docid": "044eddf58787bf54a7ff57ddd7e2c9a0",
"score": "0.676594",
"text": "def irregular(singular, plural)\n @uncountables.delete(singular)\n @uncountables.delete(plural)\n\n s0 = singular[0]\n srest = singular[1..-1]\n\n p0 = plural[0]\n prest = plural[1..-1]\n\n if s0.upcase == ... | [
{
"docid": "3cdc9a7eae7d113a9b0a7b3664303769",
"score": "0.760522",
"text": "def irregular(singular, plural)\n plural(Regexp.new(\"(#{singular[0,1]})#{singular[1..-1]}$\", \"i\"), '\\1' + plural[1..-1])\n singular(Regexp.new(\"(#{plural[0,1]})#{plural[1..-1]}$\", \"i\"), '\\1' + singular[1..-1... |
6961d572e4bbf2d78a6ca6bab327523f | GET /films/new GET /films/new.json | [
{
"docid": "d1daae8c771a8d2288b3ea917bd8f8d1",
"score": "0.7356036",
"text": "def new\n @film = Film.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @film }\n end\n end",
"title": ""
}
] | [
{
"docid": "5435dcaf60301425e24ccbce30478ccf",
"score": "0.73593444",
"text": "def new\n @film = Film.new\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @film }\n end\n end",
"title": ""
},
{
"docid": "6995e968adaac1317699529ddacc4227",... |
9bf87b319fbcc1d4bb4f63ae747c1c64 | POST /renew_regions POST /renew_regions.json | [
{
"docid": "6946f65907fd3fe7f15feb7a99f5a986",
"score": "0.7055237",
"text": "def create\n @renew_region = RenewRegion.new(renew_region_params)\n\n respond_to do |format|\n if @renew_region.save\n format.html { redirect_to @renew_region, notice: 'Renew region was successfully created.'... | [
{
"docid": "cbf92364fe0d896bb195bc3429a764ec",
"score": "0.7142964",
"text": "def set_renew_region\n @renew_region = RenewRegion.find(params[:id])\n end",
"title": ""
},
{
"docid": "e0b1354356c12d855ac2e2045470a3e3",
"score": "0.6528764",
"text": "def index\n @renew_region... |
44a385bf0033547aaee9fbe956861dc7 | required so that only the owner can change the name | [
{
"docid": "73cbd0f6191e95453f4c0332f18f9924",
"score": "0.0",
"text": "def initialize(name, mood = \"nervous\")\n @name = name\n @mood = mood\n end",
"title": ""
}
] | [
{
"docid": "711754c7417c6a826d4428f31bb3b008",
"score": "0.7247361",
"text": "def new_name; end",
"title": ""
},
{
"docid": "a18f6c7677a0c8d2da230d62da2d892f",
"score": "0.7180848",
"text": "def name=(str); dirty!; super; end",
"title": ""
},
{
"docid": "085933022d612357f... |
222ef78298ad83cb5152e3bf587e85f4 | Creates a factory with a snapshot of this factory's current entity content | [
{
"docid": "ae99480743f31a88201be0f08198d3d7",
"score": "0.65439105",
"text": "def clone\n Factory.new(self)\n end",
"title": ""
}
] | [
{
"docid": "178e45b11163aa137df9e25f3da1cdbf",
"score": "0.6284771",
"text": "def entity_factory\n @entity_factory\n end",
"title": ""
},
{
"docid": "666c2525cd99fc64b12c43457de874c4",
"score": "0.6039194",
"text": "def factory\n @@factory ||= Factory.new(self)\n ... |
4cf1a66d9ca6560c22b5d195dc2a472b | Output a list of sections the template publishes. | [
{
"docid": "f05982a9d986960f8f43e74fc3809d84",
"score": "0.56542253",
"text": "def describe_publications( template )\n\t\tptags = template.node_tree.find_all {|node| node.is_a?(Inversion::Template::PublishTag) }\n\t\treturn if ptags.empty?\n\n\t\tpubnames = ptags.map( &:key ).map( &:to_s ).uniq.sort\n\t... | [
{
"docid": "ce3bf87419de28d78dba0456edf0cd06",
"score": "0.6401802",
"text": "def sections\n Template.recursor(tokens, []) do |token, section|\n if [:section, :inverted_section].include?(token[1])\n new_section=(section + [token[2][2][0]])\n [ new_token=token[4], new_sectio... |
d9c0a42a696b1eea0e5299be648c60c3 | No longer mark the link as "Not Suitable For Work". | [
{
"docid": "64c3f5ee3f5fafc1abace9e6300c7886",
"score": "0.0",
"text": "def unmark_as_nsfw\n client.get('/api/unmarknsfw', id: read_attribute(:name))\n end",
"title": ""
}
] | [
{
"docid": "a4706fef58200a83b9c729b3fdbf5af8",
"score": "0.6991021",
"text": "def skip_link!\n raise(Actions::SkipLink)\n end",
"title": ""
},
{
"docid": "66d0058daf329a48c3d6bffb9eb5ad14",
"score": "0.69493324",
"text": "def weblink\n respond_to?(:workPackageableThi... |
ce6ea9feff900a8e0c35bc88486ba9fe | Generates a label, using a safe buffer and a few other things along those lines. | [
{
"docid": "857e0a7a046e97b2e4e3544bc7a956f2",
"score": "0.0",
"text": "def label(*args)\n super(*args).gsub(/\\?\\s*\\:\\<\\/label\\>/, \"?</label>\").gsub(/\\?\\s*\\:\\s*\\<abbr/, \"? <abbr\")\n end",
"title": ""
}
] | [
{
"docid": "a81f82e647e677e721f0b5304caa6b8e",
"score": "0.7087525",
"text": "def create_unique_label(name)\n return StringBuffer.new.append(name).append(((@unique_label_number += 1) - 1)).to_s\n end",
"title": ""
},
{
"docid": "9de950f8f5e0f2029dbb2091639e3ce8",
"score": "0.6851... |
79e62f9d946867ca25ad22398d1c0b64 | Initialize a new domain make directories if needed | [
{
"docid": "a9cda1b423abdd0f6745f726a4c229fa",
"score": "0.5859928",
"text": "def initialize(name, container)\n raise Exception.new(\"#{name} is not a valid domain name\") unless valid_directory_name(name.to_s)\n \n @name = name\n @services = Hash.new\n @container = container\n ... | [
{
"docid": "a2e28e3255c25a2a0997a4c6e2f3d0dc",
"score": "0.6662624",
"text": "def new_dirs; end",
"title": ""
},
{
"docid": "42650d29ec570523ae827ff198ec5665",
"score": "0.6486285",
"text": "def set_up!\n return if set_up?\n settings.namespaces.each do |ns|\n path = ... |
67f89a5afbd54474be22d796925632bc | get other info of file | [
{
"docid": "2c2c5eac86f2edfcff936b4dbe632116",
"score": "0.5639462",
"text": "def get_other\n @major_brand = @movie_info[:format][:tags][:major_brand]\n @duration = @movie_info[:format][:duration]\n @pixel_size = [@video_stream[:width], @video_stream[:height]]\n @frame = @video_stream[:avg_f... | [
{
"docid": "d739cbb1f7b659964883016cabd57f85",
"score": "0.66538924",
"text": "def file_info(path)\n info File.read(path)\n end",
"title": ""
},
{
"docid": "5d13d870ef430f75ea630fe3d37445d3",
"score": "0.6459347",
"text": "def file_details\n return @file_detail... |
c7cd0ef7433022195a6be16c8d963ddd | Write Git commit id and Docker image id to id file. id file is needed for controller to judge to build new image [commit_id] Git commit id [image_id] Docker image id [id_file] Path to id file | [
{
"docid": "d37a6ff2c800810bfd463d3b332c35d8",
"score": "0.8291112",
"text": "def write_ids(commit_id, image_id, id_file = ID_FILE)\n Apache.errlogger Apache::APLOG_NOTICE, \"Write image id<#{image_id}> and \\\n commit id<#{commit_id}> to #{ID_FILE}\"\n\n File.open(id_file, \"a\") do |file|\n file... | [
{
"docid": "8194ad7f255a9f1fce0449f027c10485",
"score": "0.8039556",
"text": "def write_ids(image_id, id_file = @id_file)\n @logger.info \"Write image id <#{image_id}> and commit id <#{@git_commit_id}> to #{@id_file}\"\n\n File.open(id_file, \"a\") do |file|\n file.write(\"#{@git_commit... |
3b975155b53eb84f4980f7ffb6daff6a | if refresh: :hard, then do NOT do conditional http get, force a refresh. | [
{
"docid": "1dc330711b77359be7bf3ea075e69b74",
"score": "0.0",
"text": "def initialize(db_feed, refresh: :conditional)\n raise ArgumentError.new(\"need a Feed object\") unless db_feed.kind_of?(Feed)\n @db_feed = db_feed\n @refresh = refresh\n end",
"title": ""
}
] | [
{
"docid": "667760a9248c7da035735956a1d4fbd9",
"score": "0.6841451",
"text": "def request_refresh\n @data['requestingRefresh'] = true\n update\n end",
"title": ""
},
{
"docid": "3cc2eb430e129f5d4750e3f0984a2cb0",
"score": "0.673137",
"text": "def request_refr... |
6e9c57dab27450a968489a9d4010236f | Terminate download and watcher thread | [
{
"docid": "3186b11047b49627d1f181bc4ea0c293",
"score": "0.6142301",
"text": "def finalize_downloading(file)\n fn = File.size(file)\n puts sprintf(\"[%s] 100%% %s Done\" + ' '*(PROGRESS_BAR_LEN/2), PROGRESS_OK_CHAR*PROGRESS_BAR_LEN, humanize_size(fn))\n Thread.kill $__th_download\n puts \"Downloadi... | [
{
"docid": "8dbb7404751ee7b7f58f2474a94d5138",
"score": "0.71349883",
"text": "def stop!\n # check @file_loader loader was already initialized with data\n if @file_loader\n bytes = @file_loader.downloaded_bytes\n params = TrackerInfo.tracker_params(@meta_info, bytes, :stopped)\n Net... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "3801e4e8aa62a2f17dff1fb8fe14d1a3",
"score": "0.0",
"text": "def set_unit_instructor\n @unit_instructor = UnitInstructor.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... |
dc06ca51d7633620796fe7d1b7c95738 | vary by role and not by deploygroup | [
{
"docid": "a69d39b33d4d564058697c948c6e39f5",
"score": "0.0",
"text": "def build_selectors\n temp_release_docs.uniq(&:kubernetes_role_id).flat_map(&:build_selectors).uniq\n end",
"title": ""
}
] | [
{
"docid": "181f9eb09dc79a2ebd15e6b5f258e46a",
"score": "0.6658506",
"text": "def deploy_to_roles(base_roles=self.roles)\n base_roles.dup.delete_if{|role| self.excluded_hosts.include?(role.host) }\n end",
"title": ""
},
{
"docid": "181f9eb09dc79a2ebd15e6b5f258e46a",
"score": "0.66585... |
1e349336d1e21901135817f6338fd3cf | Isilon Storage System Support => Supported Protocol: NFS, CIFS (Snapshot restore is not supported for Isilon storage systems.) Port (default is 8080) | [
{
"docid": "aa842fa8416262a19540cb8de1023f42",
"score": "0.5640593",
"text": "def add_isilon(name, ip_address, port, user_name, password)\n api_url = \"#{base_url}/vdc/storage-systems\"\n Isilon.new(name, ip_address, port, user_name, password, api_url, @verify_cert, @auth_token).add\n end",
... | [
{
"docid": "6388825880523865a680aae2382dce2c",
"score": "0.63481146",
"text": "def storage_file_host; end",
"title": ""
},
{
"docid": "f4b648e2f707af27f7ddc6acd09b3870",
"score": "0.5879936",
"text": "def default_pop3s_port; end",
"title": ""
},
{
"docid": "bcb14beaab8d4a... |
bc13958a20c7b384db13df35535e836f | POST /overlays POST /overlays.json | [
{
"docid": "b5307ff7ff34d0780e08fca473699994",
"score": "0.7006965",
"text": "def create\n @overlay = Overlay.new(params[:overlay])\n @last = @overlay.root_domain[/(?:http:\\/\\/)?([^\\/]+)(\\/.+)?/, 2]\n @overlay.root_domain = @overlay.root_domain[/(?:http:\\/\\/)?([^\\/]+)(\\/.+)?/, 1]\n @... | [
{
"docid": "05f4c888188f7811f61d57516a99ac45",
"score": "0.66145635",
"text": "def new\n @overlay = Overlay.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @overlay }\n end\n end",
"title": ""
},
{
"docid": "ffd2128ade60e584f15a0b8... |
c68edf2ec6e94b799175a937aa7b1d66 | GET /company_setups/1 GET /company_setups/1.json | [
{
"docid": "f7eb88603839798df2d248c2f5718bb6",
"score": "0.0",
"text": "def show\n authorize User\n end",
"title": ""
}
] | [
{
"docid": "3897034030806a70189e0405fdc1c55e",
"score": "0.7084066",
"text": "def set_company_setup\n @company_setup = CompanySetup.find(params[:id])\n end",
"title": ""
},
{
"docid": "421caa6f1268fde09d3648f508c6ad04",
"score": "0.62277776",
"text": "def update\n respond_... |
918822e365b718471d922689d0fb6bab | Inicializa el alimento con su nombre y sus datos | [
{
"docid": "bea3206e76aabfc8aade9e18837f298e",
"score": "0.0",
"text": "def initialize (nombre,prot,carbo,lip,gei,terr)\n\t\t@nombre = nombre \n\t\t@prot = prot\n\t\t@carbo = carbo\n\t\t@lip = lip\n\t\t@gases = gei\n\t\t@terreno = terr\n\tend",
"title": ""
}
] | [
{
"docid": "34c12d5c26df4ab0120fa66cad0c399c",
"score": "0.71020985",
"text": "def inicializar (nombre, proteinas, carbohidratos, lipidos, co2, terreno, cantidad)\n @nombre, @proteinas, @carbohidratos, @lipidos, @co2, @terreno, @cantidad = nombre, proteinas, carbohidratos, lipidos, co2, terreno, cant... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "52c369bac12d2eaf3dda583118d995ca",
"score": "0.0",
"text": "def set_meta\n @meta = Meta.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... |
18caf990f049330520f75cceb3ddf0f9 | Delete a subscription plan Must not be locked or a migration target. Permissions Needed: SUBSCRIPTIONS_ADMIN | [
{
"docid": "0b32694ae57e79edb3593d3786449bc8",
"score": "0.0",
"text": "def delete_subscription(id, plan_id, opts = {})\n delete_subscription_with_http_info(id, plan_id, opts)\n return nil\n end",
"title": ""
}
] | [
{
"docid": "ffe4a4870812dc95c2947362fd8fc09f",
"score": "0.72772056",
"text": "def delete_plan(email, password, account_id)\n @api.delete(Services::ACCOUNTS,\"accounts/#{account_id}/plan\",@api.basic_auth(email, password))\n end",
"title": ""
},
{
"docid": "9fde087aece1745d3bd4a99309... |
c21842d8ff6060e0d0d9e98873a4f1fb | Generic search method that serves as a foundation for both bf_search and df_search. Params: +start+:: key of start node +goal+:: key of end node Returns: an +Array+ containing a path from +start+ to +goal+ +nil+ if no path is found | [
{
"docid": "4a3209797535a1cc05c18cb69055187d",
"score": "0.75986624",
"text": "def search(start, goal)\n checked = Hash.new(false)\n parents = Hash.new(nil)\n fringe = [start]\n\n checked[start] = true\n\n while !fringe.empty? do\n curr = yield fringe\n ... | [
{
"docid": "f0ab4e81a72adfffac7396d643f8a436",
"score": "0.69332707",
"text": "def start_search(start_node)\r\n start_node.neighbors.each do |i|\r\n @path = ''\r\n cur_node = @graph_reader.get_node(i)\r\n @path.concat(start_node.letter)\r\n search_path(start_node, cur_node)\r\n ... |
d7a989488c5e583a97d2ff3fc3558985 | }}} this creates an array, containing hashes which represents moves. This format is used by the KI and has_winning_combination, because it gives great possibilities to cache the moves out of the DB (saves DB IO) | [
{
"docid": "903ac28b1491449910bdfc2926f0a102",
"score": "0.65209633",
"text": "def get_moves_as_hash by_player # {{{\n moves = []\n self.moves.find(:all,:conditions=>{:by_player=>by_player}).each do |m|\n moves.push Hash[:x=>m.x,:y=>m.y]\n end\n moves\n end",
"title": ""
}
] | [
{
"docid": "a1fef34eb90799923506b424e658fe49",
"score": "0.7302922",
"text": "def player_moves(board)\n\t\tnew_hash_o = {} # Holds the winning combination positions the other player is occupying\n\t\tnew_hash_c = {} # Holds the winning combination positions the current player is occupying\n\t\tfinal_h... |
b2f8422249821fade4d0e8049e9bcf4c | Unapply defaults for parameters that must have values. This is important when reloading configuration since we don't overwrite existing values. If the default ones remained the configuration would not be applied. | [
{
"docid": "fc2d14ff71309770caae88473df7dd17",
"score": "0.5863416",
"text": "def clear_system_defaults\n @region = nil if @region == Rudy::DEFAULT_REGION\n @zone = nil if @zone == Rudy::DEFAULT_ZONE\n @environment = nil if @environment == Rudy::DEFAULT_ENVIRONMENT\n @role = nil if @... | [
{
"docid": "fc5f7de7cea89322e9dfa89f9f2774ce",
"score": "0.71622086",
"text": "def reset_defaults_and_overrides\n default.clear\n override.clear\n end",
"title": ""
},
{
"docid": "51bd776e799c7c61ff033dda559547d1",
"score": "0.7011045",
"text": "def reset_defaults; end",... |
af630984682f1a0b5a68e6092af0d102 | Update properties of this object | [
{
"docid": "ecc5e38d80568e77d0d8e318196621f9",
"score": "0.0",
"text": "def update!(**args)\n @groups = args[:groups] if args.key?(:groups)\n @next_page_token = args[:next_page_token] if args.key?(:next_page_token)\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... |
4fe93d5c708b49e74e8f556ffd541bec | PUT /bairros/1 PUT /bairros/1.xml | [
{
"docid": "9c658acf38f9b51d1ce9954078e846ea",
"score": "0.630437",
"text": "def update\n @bairro = Bairro.find(params[:id])\n\n respond_to do |format|\n if @bairro.update_attributes(params[:bairro])\n flash[:notice] = 'Bairro was successfully updated.'\n format.html { redirect_... | [
{
"docid": "23b5f5e4dacfb330cb1e0ffd4590ef63",
"score": "0.64353013",
"text": "def update opts = {}\n opts[:headers] ||= {}\n opts[:headers]['Content-Type'] ||= 'text/xml'\n post opts.fetch(:path, update_path), opts\n end",
"title": ""
},
{
"docid": "38979984bdedacd95706689e25f09f9... |
7dad892471de51305a434c0047c88440 | GET /tags/new GET /tags/new.json | [
{
"docid": "343c0e3b6755535fbaf8149ea16c72a5",
"score": "0.79461527",
"text": "def new\n @tag = Tag.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @tag }\n end\n end",
"title": ""
}
] | [
{
"docid": "4562456706d57405e4600d218f0e50b0",
"score": "0.8099662",
"text": "def new\r\n puts params\r\n @tag = Tag.new\r\n\r\n respond_to do |format|\r\n format.html # new.html.erb\r\n format.json { render json: @tag }\r\n end\r\n end",
"title": ""
},
{
"docid": "860... |