query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
fa040dfe65ac2bf13e19ff6af7e1a322 | POST /formating_histories POST /formating_histories.json | [
{
"docid": "a382f3a2cd4d46a48287f2954d41c3c3",
"score": "0.6277525",
"text": "def create\n @formating_history = FormatingHistory.new(formating_history_params)\n\n respond_to do |format|\n if @formating_history.save\n format.html { redirect_to @formating_history, notice: 'Formating hist... | [
{
"docid": "be170c11890cb64b52dcfe225c1f654c",
"score": "0.6399606",
"text": "def index\n @formating_histories = FormatingHistory.all\n end",
"title": ""
},
{
"docid": "81872abf22b8ae366136f24cb8e75bde",
"score": "0.60112405",
"text": "def create\n megam_rest.post_billedhist... |
75503150b23c53822c1382497b16abf5 | By default returns the host of Amazon bucket, or, if configured, the value of s3_cloudfront_host property from config/assets.yml. Returned value is set directly to config.action_controller.asset_host. For more complex needs set the value of config.action_controller.asset_host to something else (like a Proc) inside conf... | [
{
"docid": "3ca45b3377a2f8d330a6ce011408e6c0",
"score": "0.8923884",
"text": "def asset_host\n host = Jammit.configuration[:s3_cloudfront_host]\n host.present? ? host : \"#{Jammit.configuration[:s3_bucket]}.s3.amazonaws.com\"\n end",
"title": ""
}
] | [
{
"docid": "36de363ec1157b647286cf3bfb0bbd57",
"score": "0.8101731",
"text": "def s3host\n @s3host || ENV[\"BOXEN_S3_HOST\"] || \"s3.amazonaws.com\"\n end",
"title": ""
},
{
"docid": "78ee0cd3c2f7dfd274370cae5790910b",
"score": "0.80856836",
"text": "def host\n @host ||=... |
2795ccacb69098c6fe2602404614d49c | For better output in console | [
{
"docid": "7d57510b0812d7ba005e4880ba1264d4",
"score": "0.0",
"text": "def inspect\n \"#<#{self.class.name} #{to_s}>\"\n end",
"title": ""
}
] | [
{
"docid": "b37037fcdbf2daaaebcaa4fe29f082d3",
"score": "0.74226874",
"text": "def inspect_output; end",
"title": ""
},
{
"docid": "8857b72b52ce515f0078c6b76e0e264e",
"score": "0.72967213",
"text": "def to_stdout; end",
"title": ""
},
{
"docid": "11d6527086ab119eae27dcc17... |
9e2602fdb5fe03c94b1c66f42fc90a28 | POST /events or /events.json | [
{
"docid": "0772375ffbafea98f1ef801a96877af5",
"score": "0.0",
"text": "def create\n @event = Event.new(event_params)\n respond_to do |format|\n if @event.save\n current_host.events.push(@event)\n format.html { redirect_to root_path, notice: \"Event was successfully created.\" }... | [
{
"docid": "8beb709b44028dcb6cde70ea2be23fa3",
"score": "0.7366241",
"text": "def create\n megam_rest.post_events(to_hash)\n end",
"title": ""
},
{
"docid": "da5a9d883b89e5e96507ec12f9e0aa14",
"score": "0.73643744",
"text": "def event\n begin\n JSON.parse(@o... |
78e254107a695e73b6d8b899b26723b5 | Proxy for BlueDot menu | [
{
"docid": "12a6ccb26a24e44b5fd0959e0dcb8cfb",
"score": "0.60316485",
"text": "def proxy\n token = current_company.intuit_oauth_token\n response = token.get(\"https://appcenter.intuit.com/api/v1/Account/AppMenu\")\n\n render :text => response.body, :status => response.code\n end",
"title":... | [
{
"docid": "ae720af357ce3809866f4492d121d2a9",
"score": "0.7031958",
"text": "def menu\n\n end",
"title": ""
},
{
"docid": "c11a2619c2647dd26864741477a5e856",
"score": "0.69543767",
"text": "def menu\n end",
"title": ""
},
{
"docid": "c11a2619c2647dd26864741477a5e856"... |
8b2db19a527ea2d4ca8c10fb4da4e771 | Fancy helper. Kind of mindfuck. | [
{
"docid": "e09a7b6221d5b7c602e0fbba4061b702",
"score": "0.0",
"text": "def any_method_returned_true?\n # will return true if one of block methods returns true\n # when called with \"next if\"\n true unless yield # AAAAAAAA!\n end",
"title": ""
}
] | [
{
"docid": "62158baafece84b452b305badc5dd98c",
"score": "0.6348088",
"text": "def helpers; end",
"title": ""
},
{
"docid": "62158baafece84b452b305badc5dd98c",
"score": "0.6348088",
"text": "def helpers; end",
"title": ""
},
{
"docid": "62158baafece84b452b305badc5dd98c",
... |
31a959f82ea5debf1665dab320d29c7c | takes a particular encounter, loops until all are dead | [
{
"docid": "43c55b152c3a6f17d20b94802c9a0c4c",
"score": "0.0",
"text": "def begin()\n\t\t@active = true\n\t\tputs \"Combat begins!\"\n\t\twhile active\n\t\t\t#wait for player input\n\t\t\tif @active\n\t\t\t\tself.playerturn()\n\t\t\tend\n\t\t\tif @active\n\t\t\t\tself.enemyturn()\n\t\t\tend\n\t\t\t#do p... | [
{
"docid": "3c5df829501f54fd34e58ba89b881165",
"score": "0.5883648",
"text": "def apocalypse\n @board.each do |row|\n row.each do |cell|\n if cell.alive?\n cell.die\n end\n end\n end\n end",
"title": ""
},
{
... |
87e933109ca8b38cb56fa7a7720b1410 | def fetch_data if (params[:year]=="") else | [
{
"docid": "2a64610044ca34027e3a90342ab0f076",
"score": "0.0",
"text": "def index\n \n @decorations= Decoration.page( params[:page]).per(5).order(\"id asc\")\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @decorations }\n end\n end",
"title... | [
{
"docid": "dda75a969b3cd086880d7474c168d977",
"score": "0.6812903",
"text": "def downloads_by_quarter\n @year = params[:year].to_i.positive? ? params[:year].to_i : Time.zone.today.year\n end",
"title": ""
},
{
"docid": "7506b2ce6a66fb442997431c042ad525",
"score": "0.67872006",
"... |
abb85a021934d8c763389e789d4ce291 | Allows actors to add other actors to the game | [
{
"docid": "bb77370cb7f31df0d39eb3ad9368e577",
"score": "0.0",
"text": "def add_item_to_room(item_class)\n @room.add_content(item_class.new(@room).set_target_data)\n end",
"title": ""
}
] | [
{
"docid": "a84aa25857894a0e2020c6c5c4d11dc9",
"score": "0.70337284",
"text": "def add_actor(actor_id)\n actor = $game_actors[actor_id]\n if @actors.size < Max_Party and not @actors.include?(actor)\n @actors << actor\n $game_player.refresh\n end\n end",
"title": ""
},
{
"... |
814a8c8c023a3173edfa6fe457c889bc | GET /lessons GET /lessons.json | [
{
"docid": "9eff2e5fa930e2523e24a276dd10785b",
"score": "0.0",
"text": "def index\n @course = Course.find(params[:course_id])\n if current_user.has_role?(:student, @course)\n params[:page] = get_current_Weeks_page if params[:page] == nil && @course.lessons.any?\n @lessons = Lesson.includ... | [
{
"docid": "cba2f1d1ede3660339ec5a45ef6a5279",
"score": "0.80349624",
"text": "def index\n @lessons = Lesson.all\n\n render 'index.json'\n end",
"title": ""
},
{
"docid": "3a752db9509ebbb608a5fb51e7e5582a",
"score": "0.7877691",
"text": "def index\n #@lessons = Lesson.all\n... |
e4cd3f448fbe07c4ee94446727ebac7e | GET /resource/edit def edit super end PUT /resource def update super end DELETE /resource def destroy super end GET /resource/cancel Forces the session data which is usually expired after sign in to be expired now. This is useful if the user wants to cancel oauth signing in/up in the middle of the process, removing all... | [
{
"docid": "eff4fd7c2a100d236da14003dd1a8447",
"score": "0.0",
"text": "def configure_sign_up_params\n devise_parameter_sanitizer.permit(:sign_up, keys: [:name])\n end",
"title": ""
}
] | [
{
"docid": "4ac94a220a636bd185fdaec6b50ca6d5",
"score": "0.7146869",
"text": "def cancel\n expire_session_data_after_sign_in!\n redirect_to new_registration_path(resource_name)\n end",
"title": ""
},
{
"docid": "4ac94a220a636bd185fdaec6b50ca6d5",
"score": "0.7146869",
"text": ... |
877021d40bca75fa031cc56b8d0d84b2 | GET /users GET /users.xml | [
{
"docid": "cf145dd3cf15c947e8538b8c6d28c016",
"score": "0.6847446",
"text": "def index\n @users = current_user.family.users\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @users }\n end\n end",
"title": ""
}
] | [
{
"docid": "81f820aba49ac09ba424a3c44ecb4bf8",
"score": "0.8538107",
"text": "def account_users \n make_request(:get,\"#{account_url}/users.xml\")\n end",
"title": ""
},
{
"docid": "c30d74a9ad7eba05edcb8605ab93b040",
"score": "0.78325933",
"text": "def get_users\n response... |
367f537f147919ea3690859e5289afd7 | PUT /chats/1 PUT /chats/1.json | [
{
"docid": "2e1e75ffab852c54fda66df721326c57",
"score": "0.6403618",
"text": "def update\n @chat = Chat.find(params[:id])\n\n respond_to do |format|\n if @chat.update_attributes(params[:chat])\n format.html { redirect_to @chat, notice: 'Chat was successfully updated.' }\n format... | [
{
"docid": "162f7faf3eeeb412d65159aa2eedf08a",
"score": "0.6714492",
"text": "def update\n @whatsapp_chat = WhatsappChat.find(params[:id])\n\n if @whatsapp_chat.update(whatsapp_chat_params)\n head :no_content\n else\n render json: @whatsapp_chat.errors, status: :unprocessable_entity\n... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "ec47c1f9c7749ba24463b86bddd13f57",
"score": "0.0",
"text": "def order_params\n params.require(:order).permit(:shipname, :shipcompany,:shipaddress, :shipaddress2, :shipcity, :shipstate, \n :shipzip, :cardname, :address, :address2, :city, :state, :zip, :... | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.69780594",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.678054",
"text": "def strong_params\n params.requi... |
b3f71a51b1bbb6434dcffa7b5d8782e3 | Gives choices of squares and then validates proper square. | [
{
"docid": "f8884b56b7a6c69d62b2ab402e5a5a8c",
"score": "0.0",
"text": "def player_places_piece(brd)\n square = ''\n loop do\n prompt \"Choose a square (#{joinor(empty_squares(brd), ', ')}):\"\n square = gets.chomp.to_i\n break if empty_squares(brd).include?(square)\n prompt \"Sorry, that'... | [
{
"docid": "95a080a11a697932cff1c0808325c6a0",
"score": "0.626074",
"text": "def get_squares\n square_list = []\n @@square_names.each { |name|\n begin\n side_length = Float(get_input(SIDE_LENGTH_TEXT % name))\n raise ArgumentError if side_length < 0\n\n midpoi... |
fdc4f8d7f770949a4fa295032d193f95 | Gets the coverage of a region from a pileup. | [
{
"docid": "36e911139161a9a54d2e6fd4fb045486",
"score": "0.6451131",
"text": "def average_coverage_from_pileup(opts={})\n opts[:region] = opts[:region].to_s if opts[:region] .class == Bio::DB::Fasta::Region \n region = opts[:region]\n calculate_stats_from_pile(opts) if @cached_regions == nil ... | [
{
"docid": "5660355225152ddaae8a81a809d173ac",
"score": "0.58933634",
"text": "def fetch_region(up = 5000, down = 5000)\n sr = core_connection(self.seq_region_id)\n slice = Ensembl::Core::Slice.fetch_by_region(Ensembl::Core::CoordSystem.find(sr.coord_system_id).name,sr.name,self.seq_region... |
1bbc1f4881023cb1d80f37b2336dc641 | Get the latest Cloud Workload Security policy. The download endpoint generates a Cloud Workload Security policy file from your currently active Cloud Workload Security rules, and downloads them as a .policy file. This file can then be deployed to your Agents to update the policy running in your environment. | [
{
"docid": "ac2ed6e9dc2b3b30da52fb473120de5e",
"score": "0.62107044",
"text": "def download_cloud_workload_policy_file_with_http_info(opts = {})\n\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: CloudWorkloadSecurityAPI.download_cloud_workload_policy_file ..... | [
{
"docid": "6175396fa53f0504ced04c15018c1daa",
"score": "0.6676649",
"text": "def download_cloud_workload_policy_file(opts = {})\n data, _status_code, _headers = download_cloud_workload_policy_file_with_http_info(opts)\n data\n end",
"title": ""
},
{
"docid": "5523cb4c1c0eb08cc5... |
3aa03cd72a695efc57e0282bdeebd7bd | Retrieve a single page of ServiceInstance records from the API. Request is executed immediately. | [
{
"docid": "10ad09ec47099d4b7adb0353d7afe34d",
"score": "0.0",
"text": "def create(friendly_name: nil, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_m... | [
{
"docid": "2293a7b25bfe5b9fae465e3b4ac89742",
"score": "0.6326331",
"text": "def instances\n get_json(instances_endpoint)\n end",
"title": ""
},
{
"docid": "b8e566eeef3134716865c97ea0ba7653",
"score": "0.61831856",
"text": "def index\n # Get the records for the entity.\n ... |
d0bfe45d44c13563998cced90f132ffa | GET /equipmentmodels/1 GET /equipmentmodels/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "d4bad37a77a988f1d80d6d6746c7cc36",
"score": "0.70209134",
"text": "def show\n @equipment = Equipment.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @equipment }\n end\n end",
"title": ""
},
{
"docid": "0... |
4fa46ffafb008c41ccdc5f0467cd516e | Tells gosu that the cursor can be shown when hovering Over the program window | [
{
"docid": "96a875f5cf9ee1784aac772c7baaae93",
"score": "0.0",
"text": "def needs_cursor?\n true\n end",
"title": ""
}
] | [
{
"docid": "a11c3056d580e6aa426e7e40871f3ad1",
"score": "0.6829866",
"text": "def show\n @cursor.call(0)\n @visible=true\n end",
"title": ""
},
{
"docid": "5e0b9d7915af4317078b1058f2cc9884",
"score": "0.6673764",
"text": "def show_cursor; puts \"\\e[?25h\" end",
"title": "... |
de0a78a587627eca62a1365b9bc3d712 | PATCH/PUT /v1/employees/1 PATCH/PUT /v1/employees/1.json | [
{
"docid": "e08e3ed7b0d611df7d42d56c21bbfc67",
"score": "0.755904",
"text": "def update\n # TODO Strip company_id out of params here\n @v1_employee = V1::Employee.find(params[:id])\n\n if @v1_employee.update_attributes(employee_params)\n render json: @v1_employee, status: :ok\n else\n ... | [
{
"docid": "889fc6811d3cd25e9426e9dff08e77bc",
"score": "0.7344258",
"text": "def update\n @employee = Employee.find(params[:id])\n @employee.update(employee_params)\n render :json => {:employee => @employee}\n end",
"title": ""
},
{
"docid": "68b57906c8d3fc8723e4f5edad09d5df",
... |
8c399a7e36129a777d20656c933e6ab0 | Reads from all available replicas and the active node and returns the results | [
{
"docid": "633e2f310a7d498cc8405f02dc641375",
"score": "0.6265173",
"text": "def get_all_replicas(id, options = GetAllReplicasOptions.new) end",
"title": ""
}
] | [
{
"docid": "e4e589e696766ace2a2bac579191e431",
"score": "0.6725117",
"text": "def replicas; end",
"title": ""
},
{
"docid": "3d1d4fd0136dbdf136d095f1933a0ab9",
"score": "0.62217915",
"text": "def getNodeList\n broker_url = APP_CONFIG['broker_ip'] + ':' + APP_CONFIG['broker_port'].... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "2870c16a4a06d343c5d7ab12ed740f1e",
"score": "0.0",
"text": "def set_research_submission\n @research_submission = ResearchSubmission.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "bd89022716e537628dd314fd23858181",
"score": "0.6163754",
"text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n end",
"title": ""
},
{
"docid": "3db61e749c16d53a52f73ba0492108e9",
"score": "0.6045816",
"text": "def action_hook;... |
8a25224046c81a29c4d6ba2971cb219e | read all cells in a sheet. | [
{
"docid": "c49e632c6383ef538fa0f0ec14f3a115",
"score": "0.84393823",
"text": "def read_cells(sheet = default_sheet)\n validate_sheet!(sheet)\n return if @cells_read[sheet]\n\n ws = worksheets[sheets.index(sheet)]\n for row in 1..ws.num_rows\n for col in 1..ws.num_cols\n read_cel... | [
{
"docid": "db1c6aefe0e2a31997100580876a8dc6",
"score": "0.8601107",
"text": "def read_cells(sheet = nil)\n sheet ||= @default_sheet\n return if @cells_read[sheet] && !@cells_read[sheet].empty?\n each_row(sheet: sheet).each { |_row| }\n\n @cells_read[sheet]\n end",
"title": ""
},
{
... |
fd0230fa72abc89884757406beb594ae | Write a function that takes in a word and returns the counts of each letter in that word. | [
{
"docid": "065c2f50e406bca4eb40f8a9eb2c81ca",
"score": "0.80394465",
"text": "def letter_counts(word)\n hashed = {}\n word.each_char do |el|\n count = word.count el\n hashed[el] = count\n end \n hashed\nend",
"title": ""
}
] | [
{
"docid": "826b2f8736096280527364d8db61d878",
"score": "0.8629647",
"text": "def letter_counts(word)\n counts = Hash.new(0)\n word.each_char { |ch| counts[ch] += 1 }\n return counts\nend",
"title": ""
},
{
"docid": "88d807af96469dc8187930dc56dd0dc2",
"score": "0.86052",
"text": "... |
22c11cef7c741a6f3a8bc939ca1c70e0 | Gets the kioskModeApps property value. A list of apps that will be allowed to run when the device is in Kiosk Mode. This collection can contain a maximum of 500 elements. | [
{
"docid": "a56c1b670469a27b0e1c7550e5f61f42",
"score": "0.8277709",
"text": "def kiosk_mode_apps\n return @kiosk_mode_apps\n end",
"title": ""
}
] | [
{
"docid": "331a1d7890c0bf8b5a2e9bde98fbb1c8",
"score": "0.7905148",
"text": "def kiosk_mode_apps=(value)\n @kiosk_mode_apps = value\n end",
"title": ""
},
{
"docid": "d5c391899b8aee14c9a6c1c5e99434e4",
"score": "0.70780075",
"text": "def apps_single_app_mod... |
12f6c11f5a026878faa248024b652f85 | Proces mapping params before being used as parameter in RoomTypeChannelMapping.new and RoomTypeMasterRateChannelMapping.new override as needed. | [
{
"docid": "844a21b2ff8adc25cf88b5c70c99820b",
"score": "0.7147814",
"text": "def process_mapping_params(mapping_params)\n mapping_params = ActiveSupport::HashWithIndifferentAccess.new(mapping_params)\n if mapping_params.has_key?(:ota_room_type_id)\n processed = mapping_params[:ota_room_type_... | [
{
"docid": "2c86f21f647ddf028604c23e33b5fc54",
"score": "0.66417617",
"text": "def map_parameter_values(params)\n if (release_type = params[:release_type])\n release_type = 'Eus' if release_type == 'EUS'\n params[:release_type] = \"#{release_type}Channel\" unless release_type.ends_with?('Ch... |
33125ddfb5a6102adda9926b5dd3b19f | store invoices, send Strip the command to buy the item update earnings for the seller | [
{
"docid": "412db0e689422e68455a1f1b24513629",
"score": "0.0",
"text": "def confirm_purchase_single_shop_create\n\t\t# check for payment info\n\t\t# send to stripe for a credit card token\n\t\tStripe.api_key = \"#{Configuration.stripe_key}\"\n\t\t# get credit card info\n\t\t# send to stripe and/or store... | [
{
"docid": "a67a9807d55362efdca072376245bcea",
"score": "0.6642239",
"text": "def commit_invoice_prices\n #get all the items that match this coupon.. THIS IS A PAYMENT TIME METHOD, in an attempt to have transaction agree with lines\n @discount_amount = 0.00\n \n ## clear the old coupons out\... |
1f6e64a8c62eb854b582a07fc7bd5e71 | what is restuned : the last executed line in the method | [
{
"docid": "d9591aaf62db04c66e751b7faddf7ef5",
"score": "0.0",
"text": "def multiply( a, b )\n a * b\nend",
"title": ""
}
] | [
{
"docid": "5d120b92da13b2209b2149890f6c5538",
"score": "0.753113",
"text": "def last_result=(_arg0); end",
"title": ""
},
{
"docid": "5d120b92da13b2209b2149890f6c5538",
"score": "0.753113",
"text": "def last_result=(_arg0); end",
"title": ""
},
{
"docid": "deb008afd2520c... |
481df648b5bfaf5fc22a0de53f5fbac8 | will fire a tracking event even if exceptions are raised | [
{
"docid": "b200bf086b21ae9507e2d01e640232ef",
"score": "0.0",
"text": "def track_action(*actions)\n around_filter ActionTracker, only: actions\n end",
"title": ""
}
] | [
{
"docid": "6feea49a3b0c601b882ce091afecd8f0",
"score": "0.63664526",
"text": "def test_process_event_tracking_events\n Trackers::Buyer::TRACKING_EVENTS.each do |event|\n process_event_helper(event, @address_doc['_source'])\n end\n end",
"title": ""
},
{
"docid": "44074e742111b05... |
eb1a95e2e55b3e13963256d0165a279c | Returns the Fotolia::ConceptualCategory object this medium is in. If the medium is in a child or grandchild category of the root level, the parent relations will be set properly. Call medium.conceptual_category.parent_category to use this feature. | [
{
"docid": "1fea4dab1204b3b6015d0b8e17369e2a",
"score": "0.74267095",
"text": "def conceptual_category\n #@conceptual_category ||= (self.details['cat2'] ? Fotolia::ConceptualCategory.new(@fotolia, self.details['cat2']) : nil)\n unless(@conceptual_category)\n @conceptual_category = if(se... | [
{
"docid": "11bbe3c9ee748770c280a8aca2316841",
"score": "0.65352136",
"text": "def parent\n self.parentcategoryid != 0 ? MB::Category.find(self.parentcategoryid) : nil\n end",
"title": ""
},
{
"docid": "87add57018656dfb189e6a443ba82339",
"score": "0.6507675",
"text": "def cat... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "390440fa1e765e04d7a31878d5511ca1",
"score": "0.0",
"text": "def set_profile\n if params[:id] != nil\n @profile = Profile.find(params[:id])\n end\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.60339844",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.6014297",
"text": "de... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "221fe56f27079b64affefab529c243f1",
"score": "0.0",
"text": "def set_profile\n @profile = Profile.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.6032574",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.6015663",
"text": "def... |
3869193894b8b150d68b1485e9f39fd8 | ================================================================================================================================================================= WRITE VALID FILE =============================================================================================================================================... | [
{
"docid": "fb9af1da4fb75bc9b38aba80b2e62a5e",
"score": "0.61150813",
"text": "def valid(id)\n \n \n \n name =Upload.find(id).filepath \n ou=\"BMO\"\n # -------------------layout--------------------------- \n \n layout = DataLayout.new(LayoutFile.first(:conditions => [ \"... | [
{
"docid": "0801a1fd057a424bcf43e6dfd24db455",
"score": "0.6585195",
"text": "def write_and_verify\n File.open(@path + \"#{@name}.json\", 'w') do |f|\n f.write(@data.to_json)\n true\n end\n false\n end",
"title": ""
},
{
"docid": "a5c6708f1d174ff0785fb60d0db7417c",
"s... |
d3e4eca6eedce2fd17d61b95db117303 | Is the ticket processing done, be it success or failure? | [
{
"docid": "973e79a7d9c214853e0e6fe01e6f5642",
"score": "0.0",
"text": "def done?\n return [:failed_to_register_code, :failed_to_send_email, :sent_email].include?(self.status.try(:to_sym))\n end",
"title": ""
}
] | [
{
"docid": "5ee6ea1a705f57d7c73111bfb2ec3134",
"score": "0.74329895",
"text": "def done?\n self.tickets.each do |ticket|\n return false unless ticket.done?\n end\n return true\n end",
"title": ""
},
{
"docid": "0033a953d82367a3d6f30996ab602a4a",
"score": "0.71617436",
... |
fe1313d3ad41ab31df691a61c152bb0b | Replace this with your real tests. | [
{
"docid": "ca05f97a64ba0e42a18b1a9dbcf1e840",
"score": "0.0",
"text": "def test_truth\n assert_kind_of BlacklistPattern, @blacklist_pattern\n end",
"title": ""
}
] | [
{
"docid": "35a51327dd0b5c9a884bb0e6f7155697",
"score": "0.7446459",
"text": "def testing\n # ...\n end",
"title": ""
},
{
"docid": "1a6186064d8218f9aa0c8b82bcc4fdae",
"score": "0.6956364",
"text": "def __dummy_test__\n end",
"title": ""
},
{
"docid": "8fbc... |
fe9b8155ca79a002c99b24387d92cb9d | GET /admin/elections GET /admin/elections.json | [
{
"docid": "da3204658f5e00dfe18e6e3f601bc85e",
"score": "0.6993296",
"text": "def index\n @elections = Election.sorted.with_translations(I18n.locale)\n\n respond_to do |format|\n format.html # index.html.erb\n # format.json { render json: @elections }\n end\n end",
"title": ""
... | [
{
"docid": "a55f5779db7376e3fc401655a520482c",
"score": "0.8093038",
"text": "def elections(options={})\n get(\"elections\", options)\n end",
"title": ""
},
{
"docid": "836681029704f24ba655ed336824ec2c",
"score": "0.793529",
"text": "def index\n @elections = Election.all\n... |
334f83a638381ff87174bb2c3fa2b71d | Beware, :id is the Solr document_id, not the actual Bookmark id. idempotent, as DELETE is supposed to be. | [
{
"docid": "c059c9fa2a3d6bc154d54249e85eae93",
"score": "0.6281555",
"text": "def destroy\n @bookmarks =\n if params[:bookmarks]\n permit_bookmarks[:bookmarks]\n else\n [{ document_id: params[:id], document_type: blacklight_config.document_model.to_s }]\n end\n\n succe... | [
{
"docid": "a6d82658497d12d869aaab9d2bc2d81c",
"score": "0.7528189",
"text": "def _delete\n # Set id and cache key\n id = @options[:id]\n cache_key = nil #\"bookmark_#{id}\"\n\n # Retrieve bookmark object\n bookmark = Taupe::Model::Bookmark.load id, cache_key\n fail \"Unknown bookmark ... |
45542652c6fab6267f7e885df62b37c6 | Sets the b2bCollaborationOutbound property value. Defines your default configuration for users in your organization going outbound to access resources in another organization via Azure AD B2B collaboration. | [
{
"docid": "bef3233e04829bf0295840df0b66506c",
"score": "0.85262793",
"text": "def b2b_collaboration_outbound=(value)\n @b2b_collaboration_outbound = value\n end",
"title": ""
}
] | [
{
"docid": "e63501356e0f42d35c3f5799552ae1ad",
"score": "0.7226546",
"text": "def b2b_collaboration_inbound=(value)\n @b2b_collaboration_inbound = value\n end",
"title": ""
},
{
"docid": "262e981e8f3a74fa1941771ad5efcbff",
"score": "0.6976056",
"text": "def ... |
deb7ef3b3fa1e64f5f5fb2e3046d70e4 | Synonym for getPos ==== Syntax Array = position object ==== Parameters +object+ Object; since VBS2 1.24: Location ==== Returns Array format Position ==== Multiplayer ==== See Also position location, getPos, getPosATL, getPosASL, getPosASLW, visiblePosition, visiblePositionASL Official Wiki: ==== Examples ====== Example... | [
{
"docid": "3177150ccf20bad593f380d30d7215b7",
"score": "0.5779646",
"text": "def position _args\n \"position _args;\" \n end",
"title": ""
}
] | [
{
"docid": "8201b098a83a49992a72f13464c9b1bb",
"score": "0.6719113",
"text": "def getPos _args\n \"getPos _args;\" \n end",
"title": ""
},
{
"docid": "052b4263d733785ba6f1366a5b93bd4b",
"score": "0.66135347",
"text": "def pos\n [posx, posy]\n end",
"title": ""
}... |
aab2b6b3b07bdb8c103c6f9b0e3b5959 | GET /admin/lessons/new, GET /admin/lessons/new.json | [
{
"docid": "4c82e83a40ba819241718bfd33b96974",
"score": "0.7489798",
"text": "def new\n @lesson = @course.lessons.build\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @lesson }\n end\n end",
"title": ""
}
] | [
{
"docid": "603968f1ea82d2c95f16df227a1aeb47",
"score": "0.77210283",
"text": "def new\n @title = t('view.lessons.new_title')\n @lesson = @course.lessons.build\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @lesson }\n end\n end",
"title"... |
9548e087e2b248ee7b6f8482c95475e7 | Activate the class Mark the class as &x60;active&x60;. This is mainly used for classes synchronized from Clever that are initially with an &x60;inactive&x60; state and hidden in the UI. | [
{
"docid": "8d368a87437780796191639f6b473919",
"score": "0.0",
"text": "def activate_class_with_http_info(_class, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: ClassApi.activate_class ...\"\n end\n # verify the required parameter '_cl... | [
{
"docid": "17e4ce21d695f867c8c9b4dd306d9131",
"score": "0.7843719",
"text": "def activate\r\n self.active = true\r\n end",
"title": ""
},
{
"docid": "0798624f982f32fe8f25941601f93404",
"score": "0.75149566",
"text": "def activate()\n @isActive = true\n end",
"title":... |
740bba3e2097c476899f9cef5ac48fb3 | Check check digits for Belgian VAT number | [
{
"docid": "684d46d9088b098b2622fcbf8525b6bb",
"score": "0.79486245",
"text": "def validateBE(vat_number)\r\n # Nine digit numbers have a 0 inserted at the front\r\n vat_number = (\"0\" + vat_number.to_s) if vat_number.to_S.length == 9\r\n # Check digits\r\n return true if (97 - vat_number[0... | [
{
"docid": "23a21c114c921c6dcb8961f3a3184241",
"score": "0.77978075",
"text": "def validateAT(vat_number)\r\n multipliers = [1,2,1,2,1,2,1]\r\n total = 0\r\n # Extract the next digit and multiply it by the appropriate multiplier\r\n 0.upto(6) do |i|\r\n temp = vat_number[i,1].to_i * mul... |
fedd8a19bb721de01f5fdf901bb31e98 | Register middleware class(es) on the current module. | [
{
"docid": "bd4271a1551be25b01e381f475b32fe8",
"score": "0.7033808",
"text": "def register_middleware(**mappings); end",
"title": ""
}
] | [
{
"docid": "730da735c66b88eb34de4c7f2d13e87a",
"score": "0.71970415",
"text": "def register_middleware(autoload_path = T.unsafe(nil), mapping = T.unsafe(nil)); end",
"title": ""
},
{
"docid": "641a9667f37eb3cccb9beb96cf07f15a",
"score": "0.69632185",
"text": "def use_middleware(klass... |
53223a90b7a16fdb8309e6948f23c601 | Edit a particular project | [
{
"docid": "51f55e2d3d58890fdf43876832f4b5e5",
"score": "0.75255084",
"text": "def editProject\n showProjects\n print \"Edit project with ID: \" \n proid = $stdin.gets.to_i\n end",
"title": ""
}
] | [
{
"docid": "92a19f95412eb22f4fd0bb389029c1bf",
"score": "0.85293627",
"text": "def edit\n \tset_project\n end",
"title": ""
},
{
"docid": "0c5627b76f2b5df7238f9a748b29c0b9",
"score": "0.8483384",
"text": "def project_edit\n edit_project.click\n end",
"title": ""
},
... |
ad2864f79d016a1ae87852f715bc5be5 | Convenience method to test if a project is suitable for any discipline | [
{
"docid": "21e67a9490541607fa05d678f9a5dc7e",
"score": "0.59678733",
"text": "def suitable_for_any?\r\n \treturn self.disciplines.count > 0\r\n end",
"title": ""
}
] | [
{
"docid": "beac8e737103a0218af78df22932a815",
"score": "0.7298218",
"text": "def project?\n course_type_name == \"project\"\n end",
"title": ""
},
{
"docid": "e249060ff90c2685f31354fe99b014b3",
"score": "0.6982036",
"text": "def is_assigned?(project)\n projects.include?(proje... |
10a77d21ec35d5702ad90e64d9556483 | convention is to use the four cardinal directions to describe the posistions players are sitting | [
{
"docid": "564d486396ec38439f264ba249ca3b56",
"score": "0.0",
"text": "def player_east\n return teams[1].players[1]\n end",
"title": ""
}
] | [
{
"docid": "2df6d99cb008092f7d30cf84dfecd766",
"score": "0.6917109",
"text": "def player_positions\n\n end",
"title": ""
},
{
"docid": "89bec86b88c36d948fc02ec211329282",
"score": "0.6856489",
"text": "def cardinal_directions\n legal_moves(NORTH) +\n legal_moves(EAST) +\n l... |
b0cca413a7dddae5e1b4f557d4edbbfe | GET /checklist_types/1 GET /checklist_types/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "b2019dc720202f386cd47887898b476d",
"score": "0.73589283",
"text": "def index\n @checklist_types = ChecklistType.all\n end",
"title": ""
},
{
"docid": "cae3fc03115f81caa53e82950daf0e7e",
"score": "0.6687534",
"text": "def set_checklist_type\n @checklist_type = Che... |
5dfa68a4064fe0635fabcd17c4c4a05f | Set the before_fork proc. | [
{
"docid": "2f41c7e91b28a7c46724d1570c231a3f",
"score": "0.84998703",
"text": "def before_fork=(before_fork)\n @before_fork = before_fork\n end",
"title": ""
}
] | [
{
"docid": "832657447555f60fbe76f33453612185",
"score": "0.8419238",
"text": "def before_fork=(block)\n register_hook(:before_fork, block)\n end",
"title": ""
},
{
"docid": "c9200f3f056c6c0691b03a81ae34d7d1",
"score": "0.8409194",
"text": "def before_fork(*args, &block)\n... |
a73c7b3dabc1df55cd1067e81bf08283 | Created by: Salil Gaikwad Created on: 12/01/2012 Purpose: ++ This method is used to show followings for the user (both login user and visited profile user) | [
{
"docid": "1276e2f63030a7209e339cee3f2c9f0c",
"score": "0.7354436",
"text": "def followings\n @followings = @other_user.followings.paginate(:page => params[:page], :per_page => 20)\n end",
"title": ""
}
] | [
{
"docid": "58d7d0cc03d3bdc8dc859173ccf5afb5",
"score": "0.79225415",
"text": "def user_following\n show_user_follow(:user_following)\n end",
"title": ""
},
{
"docid": "664cf810be6a079a0aa770935d904df6",
"score": "0.7736752",
"text": "def following\n @user = User.find(params[:... |
090b5a91661f0313bc210e93bc443476 | Returns last received or sent message | [
{
"docid": "640154e47a4300fa2871c4de1681a661",
"score": "0.7849984",
"text": "def last_message\n return messages.last\n end",
"title": ""
}
] | [
{
"docid": "3aadd66a4b3e67ffa453971aba5a8e25",
"score": "0.7925148",
"text": "def last_message\n @last_message = self.messages.first if @last_message.nil?\n return @last_message\n end",
"title": ""
},
{
"docid": "2f12f26e1280765980555d15d68f5e84",
"score": "0.78432876",
"text"... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "7da2bcd6415a60af63bb895d905e8794",
"score": "0.0",
"text": "def promo_params\n params.require(:promo).permit(:titulo, :texto, :validez, :image)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7497801",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.6957249",
"text": "def strong_params\n params.require(:request).permit(param_white... |
6a47afbac669fff706c430f6621772ea | GET /special_collection_requests GET /special_collection_requests.json | [
{
"docid": "0fb7181ef0b93588d699d28054ca06f9",
"score": "0.80610204",
"text": "def index\n @special_collection_requests = SpecialCollectionRequest.all\n end",
"title": ""
}
] | [
{
"docid": "434809eccf867482b8beb165d45c0e38",
"score": "0.68584114",
"text": "def set_special_collection_request\n @special_collection_request = SpecialCollectionRequest.find(params[:id])\n end",
"title": ""
},
{
"docid": "6e0780b0316f9bc637db53148dfa8144",
"score": "0.63673824"... |
88672f79a226fbfed273f09cfeef04ff | Sells this property to the given player | [
{
"docid": "5db5ebb85f611058c824da21082cd819",
"score": "0.73412967",
"text": "def sell_to(player)\n return if @price > player.balance \n !player.subtract_balance(@price)\n @owner = player.piece\n @owned = true\n end",
"title": ""
}
] | [
{
"docid": "2e417ab82bfb41d41c51f1d1f28f8e01",
"score": "0.71487015",
"text": "def sell(player)\n unless player.nil?\n player.free\n reordenate_team\n end\n end",
"title": ""
},
{
"docid": "8ffcfa93b31738de72ca2f6194d8bcab",
"score": "0.70404494",
"text": "def sell_t... |
7362e70263325b6659edaa834356204c | Copy this file to config.rb to change any constants. Returns the first file with .mod extension in the module directory. | [
{
"docid": "ee46637974eb056c7beee5746617810c",
"score": "0.6999427",
"text": "def find_modfile()\n mod = FileList[\"#{MODULE_DIR}/*.mod\"].first\n return (mod.nil? || mod == \"\") ? \"#{MODULE_DIR}/module.mod\" : mod\nend",
"title": ""
}
] | [
{
"docid": "50173bee7ed486affcebcba39c2e5b56",
"score": "0.68345624",
"text": "def find_modfile()\n default_mod = MODULE_FILENAME.match(/#{MODULE_FILE_EXT}$/) ? MODULE_FILENAME : MODULE_FILENAME + MODULE_FILE_EXT\n located_mod = FileList[to_forward_slash MODULE_DIR.join \"*#{MODULE_FILE_EXT}\"].first\... |
a84e32fc6c9510b1c5ec79fe9e38553b | Locates the `profile` service. | [
{
"docid": "c9691505cfdf6fd705abed660c27828d",
"score": "0.5808121",
"text": "def profile_service(id)\n AssignedCpuProfileService.new(self, id)\n end",
"title": ""
}
] | [
{
"docid": "6a4e4c75900799ac4a86335aed965a71",
"score": "0.6754822",
"text": "def profile(service_name, options={})\n get(profiles_path(service_name), options)\n end",
"title": ""
},
{
"docid": "ba0210051786c8a70dbe6e08507d2a7e",
"score": "0.6740861",
"text": "def profile... |
acc8d65d963655d30ef8d91982aaf1f8 | Decode the authorization header token and return the payload | [
{
"docid": "8815565ed9692c20fbda150683b0793f",
"score": "0.741387",
"text": "def decoded_auth_token\n @decoded_auth_token ||= AuthToken.decode(http_auth_token)\n end",
"title": ""
}
] | [
{
"docid": "1594ed689f42651396844d45de913e8b",
"score": "0.8279514",
"text": "def decoded_auth_token\n JsonWebToken.decode(@header_token)\n end",
"title": ""
},
{
"docid": "2f30514ea965fde42dff356e4ce29438",
"score": "0.815669",
"text": "def decoded_token\n if auth_header\... |
53b325c33465b8bc77b40624d6dc1ac0 | =begin :rtype: Void =end | [
{
"docid": "dab1b5d9ce5a4eeafe3ceaaee096899c",
"score": "0.0",
"text": "def pop()\n if @size > 0\n removed = @array.pop\n @currentMin = 2 * @currentMin - removed if removed < @currentMin\n @size -= 1\n @currentMin = nil if @size == 0\n else\n raise ... | [
{
"docid": "699a3224bc2100e41261f3aaa62a074c",
"score": "0.78436613",
"text": "def void\n\tend",
"title": ""
},
{
"docid": "cee9e9cc96c2c05db85a95b08360b24a",
"score": "0.7210169",
"text": "def void\n\tVOID\nend",
"title": ""
},
{
"docid": "281e9a43f3408650bd69047a8fabab5... |
174da340d7d65c85e3389c378acf8d9d | Convert an filepath to a string useable as LaTeX label. = Arguments [filepath] The path of the file for which we want to create a label. = Output This function returns a string useable as label. | [
{
"docid": "16df9b1e76844cdb817a04972305a3e4",
"score": "0.6821476",
"text": "def filepath_to_label(filepath)\n filepath.to_s.gsub(%r{(\\.[^.]*$)|(\\.\\./)}, '').gsub(%r{[/ ]}, '_')\nend",
"title": ""
}
] | [
{
"docid": "8cccd7b3578e8cd4235c31dff28ddbb0",
"score": "0.5984763",
"text": "def to_tex(filename = nil)\n document(@triangle.alt ? (<<-EOT) : document_content(filename))\n#{document_content(filename ? filename + '-1' : nil)}\n\n\\\\newpage\n\\\\section*{Alternative triangle}\nAnother triangle ... |
eb04071e38c281a5f84834e343ef4a88 | Read a 'storage.NetAppLicense' resource. | [
{
"docid": "0fc58f3dda2e30577ce6480a707ee3c3",
"score": "0.56579864",
"text": "def get_storage_net_app_license_list(opts = {})\n data, _status_code, _headers = get_storage_net_app_license_list_with_http_info(opts)\n data\n end",
"title": ""
}
] | [
{
"docid": "7ec3449682ef5d3a1c27c0213773ba5f",
"score": "0.6896312",
"text": "def license\n read_property 'License'\n end",
"title": ""
},
{
"docid": "0461a2f7a798fd327c138e4492fc3386",
"score": "0.66750324",
"text": "def license\n @license ||= read_tag('LICENSE')\n ... |
297db100f3aab2a551722db26b551c01 | GET /action_rules GET /action_rules.json | [
{
"docid": "c64c1503bff8f11da11a1b46c0ee36f1",
"score": "0.73628664",
"text": "def index\n @action_rule = ActionRule.new\n @action_rules = action_chain.action_rules\n end",
"title": ""
}
] | [
{
"docid": "64ae89b00118f610e3dff1aa9d4c2249",
"score": "0.77696943",
"text": "def rules\n @@api.get(endpoint: \"rules\")\n end",
"title": ""
},
{
"docid": "d29a08a9eba89c3e70db71ca2c373535",
"score": "0.7034453",
"text": "def list\n response = self.class.get(rules_url... |
ffb7474a08dd4916785b79db01aecfb9 | Add File Path Note: This will add the file to S3 Before the object is saved! | [
{
"docid": "fce7a280f71e28f5b7d8bee644afbc61",
"score": "0.0",
"text": "def add_file_data(data, remote_path, file_mode)\n\t\t\ts3_path = @server_users.user_file_bucket()\n\t\t\tif(!s3_path)\n\t\t\t\traise 'User Files are not enabled. Please re-run --configure'\n\t\t\tend\n\t\t\ts3 = AWS::S3.new()\n\t\t\... | [
{
"docid": "1db932ba7354ae7161722bda6a3235f4",
"score": "0.6845726",
"text": "def write_file(key, file_path)\n S3Object.store key, open(file_path), @bucket\n o = S3Object.find key, @bucket\n o.url\n end",
"title": ""
},
{
"docid": "4851c6f1ac4a75fc3815c3b41af5ca02",
"score": "0... |
ce0d819ddb10db68c72f02a03a30da73 | Get the metrics of the latest scan all process Get the metrics of the latest scan all process | [
{
"docid": "58547d53905cc959635b0eccc03cc26a",
"score": "0.0",
"text": "def scans_all_metrics_get_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: ScanApi.scans_all_metrics_get ...'\n end\n # resource path\n local_var_... | [
{
"docid": "3e939cbd5009609cb637f968853b9505",
"score": "0.6558388",
"text": "def get_application_container_metrics\n ::OpenShift::Runtime::Utils.oo_spawn(\"oo-admin-ctl-gears metricsall\", out: @syslog_line_shipper)\n end",
"title": ""
},
{
"docid": "23e14dfc7212af735d9828d9... |
16b954c00c3a71cbb6a1e4679c4ee82c | Object Initialization depth : nest depth main : main flag | [
{
"docid": "89c267717ca08e82117a8d35df359c06",
"score": "0.63785297",
"text": "def initialize(depth = 0, main = false)\n @depth = depth\n @main = main\n\n @common_event_id = 0\n \n # Depth goes up to level 100\n if depth > 100\n print(\"Common event call has exceeded maximum limit... | [
{
"docid": "353da6ec851e541006f097ab34d5aa85",
"score": "0.64285517",
"text": "def set_depth; end",
"title": ""
},
{
"docid": "353da6ec851e541006f097ab34d5aa85",
"score": "0.64285517",
"text": "def set_depth; end",
"title": ""
},
{
"docid": "353da6ec851e541006f097ab34d5aa... |
81382ebb5786c2d1fa305a14151455a7 | Design and implement a method to check if the input string is a palindrome. Return true if the string is a palindrome. Return false otherwise. | [
{
"docid": "6b6125c9f7adb105054bf767e76e0021",
"score": "0.0",
"text": "def palindrome?(string)\n i = 0\n j = string.length - 1\n\n while i < j\n while string[i] == \" \"\n i += 1\n end\n while string[j] == \" \"\n j -= 1\n end\n if string[i].downcase != string[j].downcase\n ... | [
{
"docid": "532b938a8daaccfaf54878369e313603",
"score": "0.8878022",
"text": "def palindrome?(string)\n reverse = string.reverse \n if string == reverse \n true\n else \n false\n end \nend",
"title": ""
},
{
"docid": "6860fa678d2de1129d8b3d7587c62fb1",
"score": "0.8860402",
... |
ac7f474e8018fc19c267472e952b4cf3 | Return the status of the CrlDistributionPoint Return the status of the CrlDistributionPoint | [
{
"docid": "a08734eb9a97b1f24dd22ae91bb6b9e3",
"score": "0.6575651",
"text": "def get_crl_distribution_point_status_with_http_info(crl_distribution_point_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: ManagementPlaneApiNsxComponentAdministrat... | [
{
"docid": "c81db8e625fe7eb8f815c1b13388dc94",
"score": "0.69449633",
"text": "def get_crl_distribution_point_status(crl_distribution_point_id, opts = {})\n data, _status_code, _headers = get_crl_distribution_point_status_with_http_info(crl_distribution_point_id, opts)\n data\n end",
"t... |
8d6a194e5564c4835464aea8f1135ba5 | Search a sorted array in O(lg(n)) time | [
{
"docid": "2ab0670e8bbab26c7bf8b66dd38557ef",
"score": "0.0",
"text": "def binary_search(array, value, from=0, to=nil)\n if to == nil\n to = array.count - 1\n end\n\n mid = (from + to) / 2\n\n if value < array[mid]\n return binary_search array, value, from, mid - 1\n elsif ... | [
{
"docid": "68e916f571ec16a9f88b9732b6ca5241",
"score": "0.7373081",
"text": "def linear_search(sorted_array, desired_item)\n index = 0\n sorted_array.length.times do \n if desired_item == sorted_array[index]\n break \n else \n index += 1\n end\n if index > sorted_array.length - ... |
e2f718a8a5f5cbb598030925c685cd3a | Update a WebChat deployment | [
{
"docid": "c4c6a6eae6f3f56c89068d06ba3edadc",
"score": "0.6089428",
"text": "def put_webchat_deployment(deployment_id, body, opts = {})\n data, _status_code, _headers = put_webchat_deployment_with_http_info(deployment_id, body, opts)\n return data\n end",
"title": ""
}
] | [
{
"docid": "4354269864421e2a5228ef62655d6892",
"score": "0.5992242",
"text": "def notify_updating\n @msg = \"Deployment Started\"\n post\n end",
"title": ""
},
{
"docid": "015e9cb4dd8a29b350fdee6b347b9d44",
"score": "0.58964306",
"text": "def update\n # cyber-dojo.sh do... |
834d8ec8054a536eb7e78ea11e8d621b | To ensure the +current_user+ is identified/logged | [
{
"docid": "5ed0d212d542494f1388f80e73dd8bc4",
"score": "0.0",
"text": "def require_user\n unless current_user\n store_location\n flash[:notice] = I18n.t('user_session.you_must_be_logged')\n redirect_to new_user_session_path\n return false\n end\n end",
"titl... | [
{
"docid": "2ec68051eb1edcecd5dcb896eb9fdd99",
"score": "0.7807248",
"text": "def check_logined_user\n redirect_to root_path if current_user\n end",
"title": ""
},
{
"docid": "05c072165c4ab38ab6531845fe0ff6e7",
"score": "0.7767038",
"text": "def ensure_user_logged_in\n e... |
51a4820439cbaa614303a6481e6877cd | Returns the 'Playlist' string | [
{
"docid": "ab45157bb51ee7ae17f09e07046a0e83",
"score": "0.7247489",
"text": "def asset_name\n 'Playlist'\n end",
"title": ""
}
] | [
{
"docid": "34a746298bb5b77221cf2bc93f2433fb",
"score": "0.7769256",
"text": "def kind\n :playlist\n end",
"title": ""
},
{
"docid": "436ee3bdb82fb295c497f163bc4dd648",
"score": "0.7511337",
"text": "def playlist_type(param = 'appending')\n \"playlistType=#{param}\"\n ... |
878dfc70ceda7ace1432315f27f2cf96 | time of last error for server, nil if all is ok | [
{
"docid": "0fecb9427696aa4a480db36c077a6ec4",
"score": "0.8158851",
"text": "def error_time\n @@state[@server] && @@state[@server][:time]\n end",
"title": ""
}
] | [
{
"docid": "f3da56ad62e026862a8ccf71b14c8d0f",
"score": "0.70164716",
"text": "def last_error; end",
"title": ""
},
{
"docid": "eba99e2111697fdc9b321d4f3c0d30cd",
"score": "0.6885384",
"text": "def last_error\n @error\n end",
"title": ""
},
{
"docid": "1ecd113854fd433... |
cfe62b379efcad88df44633420c414fc | Use provided mock input instead of external ProcessRunner | [
{
"docid": "a476c59645d3b03618657c77d179f426",
"score": "0.7074983",
"text": "def create_input(exe)\n @mock_input\n end",
"title": ""
}
] | [
{
"docid": "ed66830e5aed484bd6bbbb62f0d2c911",
"score": "0.6349492",
"text": "def with_mock_input(*input)\n input_stream = StringIO.new(input.join)\n @console = HighLine.new(input_stream, StringIO.new)\n yield\n ensure\n @console = HighLine.new($stdin, $stdout)\n end",
"tit... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "b134e04d6dd187ed9d4314acfa17fb5c",
"score": "0.0",
"text": "def word_params\n params.fetch(:word, {})\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7495027",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.69566035",
"text": "def strong_params\n params.require(:request).permit(param_whit... |
440840c5dff90faf69cbdd07b344e508 | DELETE /spaces/1 DELETE /spaces/1.json | [
{
"docid": "bb9824e8330278e77cec8696d4ffd038",
"score": "0.7799049",
"text": "def destroy\n @space = Space.find(params[:id])\n @space.destroy\n\n respond_to do |format|\n format.html { redirect_to spaces_url }\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "a55348473c6ef4266c7ab81cec3ad93e",
"score": "0.7883296",
"text": "def destroy\n @space = Space.find(params[:id])\n @space.destroy\n\n respond_to do |format|\n format.html { redirect_to admin_spaces_url }\n format.json { head :no_content }\n end\n end",
"title": ""
... |
4a5d5e86cc1bd80eee369dd44d88126b | _______________________________________________________________________ Finds those Books whose title or author (or both) contains this string. case insensitive KKK and kkk =begin Finds those Books whose title or author (or both) contains this string. For example, the string "tact" might return, among other things, the... | [
{
"docid": "c77177db6934bcc12d43d47ee51f48ac",
"score": "0.7470827",
"text": "def search(string)\n string = string.squeeze(' ').strip\n libIsOpen() \n result= nil \n if (string.size > 3)\n s= string.split(' ').map(&:strip)\n else\n result = \"Search string must contain at least fo... | [
{
"docid": "c9a1430b96548847a1954a633c073971",
"score": "0.7379755",
"text": "def search_books_by_title(title)\n Book.where(['LOWER(title) like ?', '%' + title.downcase + '%'])\n end",
"title": ""
},
{
"docid": "f7cacafba03d3c85530aadee96845e71",
"score": "0.71080154",
"text": "d... |
b9e23b2c396f1590f641193460a47db9 | Checks PR for Asana IDs and links them | [
{
"docid": "97a2eeaa90be6f5fe91b086504532bfe",
"score": "0.5786619",
"text": "def check\n issues = find_asana_issues\n\n messages = []\n\n issues.each do |issue|\n task = find_by_id(issue)\n\n unless task.nil?\n name = task.name[0..300].gsub(\"\\n\", \"<br />\").str... | [
{
"docid": "46ab6bf2b87a34d2e04f3aa76cd8dfc1",
"score": "0.55472326",
"text": "def get_asana_url asana_task\n return \"https://app.asana.com/0/#{asana_task[\"projects\"][0][\"id\"]}/#{asana_task[\"id\"]}\"\nend",
"title": ""
},
{
"docid": "4dd5d53e1a3da32ffb8cbdac3e2fb52c",
"score": "0.... |
adf2ca073d0996f1a63c79ae9d3e2a88 | GET /antibodies/new GET /antibodies/new.xml | [
{
"docid": "dea919ee77e46207e04d605e336a7a52",
"score": "0.725243",
"text": "def new\n @antibody = Antibody.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @antibody }\n end\n end",
"title": ""
}
] | [
{
"docid": "3e707ee6a3817d70105cc49e6cacd25c",
"score": "0.6764793",
"text": "def new\n @antibody = Antibody.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @antibody }\n end\n end",
"title": ""
},
{
"docid": "4745445fcc8044f903e2d... |
99f982c3bb9c7e6de45b89f786ab8154 | Registers hook on events. | [
{
"docid": "4b05e707b564083ab1d1a8960d9da4d0",
"score": "0.7323093",
"text": "def on_event(*args, &block)\n register_hook :event, args, block\n end",
"title": ""
}
] | [
{
"docid": "997a040921f49aa5e796aae0972f8dd0",
"score": "0.785606",
"text": "def add_hook(event, &blk)\n hooks[event.to_sym] = blk\n end",
"title": ""
},
{
"docid": "54756cfff5124b486e726099027e1ed0",
"score": "0.77396524",
"text": "def add_hook(event_name, hook_name, callabl... |
03fd6cf365c054b078674b751f2e30f5 | GET /promotion_types/new GET /promotion_types/new.json | [
{
"docid": "c28eb2065ae829353033332cb517b20c",
"score": "0.7914395",
"text": "def new\n @promotion_type = PromotionType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @promotion_type }\n end\n end",
"title": ""
}
] | [
{
"docid": "4927454835fc5ca057d843b6a3416ca1",
"score": "0.75822455",
"text": "def create\n @promotion_type = PromotionType.new(params[:promotion_type])\n\n respond_to do |format|\n if @promotion_type.save\n format.html { redirect_to promotion_types_path, notice: 'Promotion type was su... |
f920967cb3724b882d2b49cad901e6f9 | Copied because we want to use sphinx even if keywords is blank This method is equal to one from spree without unless keywords.blank? in get_products_conditions_for | [
{
"docid": "84814a1682a091340243418d355a41b9",
"score": "0.0",
"text": "def get_base_scope\n base_scope = @cached_product_group ? @cached_product_group.products.active : Spree::Product.active\n base_scope = base_scope.in_taxon(taxon) unless taxon.blank?\n base_scope = get_products_conditi... | [
{
"docid": "2ebf9841d133d29dc296f32006c4a189",
"score": "0.77926326",
"text": "def keyword_conditions\n([\"(products.modality_name LIKE ?\", \"%#{keywords}%\"] || [\"products.modtype_name LIKE ?\", \"%#{keywords}%\"] || [\"products.manufacturer_name LIKE ?\", \"%#{keywords}%\"]) unless keywords.blank?\n... |
bff52f29fe249f4732a7fced7b92a985 | Initializes The number of guesses (or tries) a player is allowed before the game ends. You should default number of guesses to 3 if the parameter is null. Sets a guess counter to zero. | [
{
"docid": "a7ed9208f1b3f9c99446577b767d46be",
"score": "0.63606596",
"text": "def initialize(g=nil, n=nil)\n\tif (n.nil?)\n \t\t@set_of_numbers = Array.new(1..10)\n#\t\tputs \"set of numbers\" + \"#{@set_of_numbers}\"\n\telse\n#\t\tputs \"n= \" + \"#{n}\"\n\t\t@set_of_numbers = Array.new(n)\n\tend \n\... | [
{
"docid": "e5cd3fc845e556835cb15a33fd907358",
"score": "0.8034958",
"text": "def init_guess_count\n @guess_count = 12\n end",
"title": ""
},
{
"docid": "58e31ef1c0276ba33868ea2adb6797d6",
"score": "0.7203326",
"text": "def guess_count\n\t\t @number_of_guesses -= 1\n\tend",
"... |
5823c75f7437cf9f59a185b6d2ebf8b8 | GET /posts/1 GET /posts/1.json | [
{
"docid": "a9a73e3689ee93f1371ea2f19d3e6e96",
"score": "0.0",
"text": "def show\n @post = Post.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "915c0178f9e4347098d8a463c2cbe6b0",
"score": "0.77110183",
"text": "def show\n @posts = Post.find(params[:id])\n render json: @posts\n end",
"title": ""
},
{
"docid": "ad221611c85e1ec63d3385d6179e41a2",
"score": "0.73537844",
"text": "def show\n render json: Post... |
dcd18f032c7d0a0561853a4b35a57823 | we will converge and test twice. The first time would be a new instance but the 2nd time would test that a reconvergance on an exiting instance also works | [
{
"docid": "5c4aabe81b7d696563c82a1845b05293",
"score": "0.7902327",
"text": "def int_test\n say \"we converge/test twice to make sure both a new instance and an existing instance pass the tests (Le Plat Principal)\"\n\n # NOTE: we have to use run because thor kitchen tasks if invoked locally will... | [
{
"docid": "5074108de69049ba26b8a9808fcd0af0",
"score": "0.72119075",
"text": "def converge\n puts \"-----> Converging instance #{name}\"\n platform.driver.converge(self)\n puts \" Convergence of instance #{name} complete.\"\n self\n end",
"title": ""
},
{
"docid... |
7de2da84d4297b4bc5511d1689e1c6d0 | define my own dinky jsonifier so I don't have to depend on JSON | [
{
"docid": "5d499587aa548eb50bc57bc9277a325d",
"score": "0.0",
"text": "def json(args)\n str = '{'\n args.each { |arg, val| str << \"\\\"#{arg.to_s}\\\":\\\"#{val.to_s}\\\", \" }\n str.chomp!(', ') << '}'\n end",
"title": ""
}
] | [
{
"docid": "06fa7195b090da619c2ba202f9d2db24",
"score": "0.7329911",
"text": "def json_encoder; end",
"title": ""
},
{
"docid": "06fa7195b090da619c2ba202f9d2db24",
"score": "0.7329911",
"text": "def json_encoder; end",
"title": ""
},
{
"docid": "06fa7195b090da619c2ba202f9... |
c6bc27e9f091f04a7297158cb40bbdc6 | save this account payload to database. | [
{
"docid": "105543f8b6459ccc42f8966f54c776c9",
"score": "0.65570545",
"text": "def save\n wallet.db.save_account(self)\n save_key(0, receive_depth, derive_key(0, receive_depth)) if receive_depth.zero?\n save_key(1, change_depth, derive_key(1, change_depth)) if change_depth.zero?\n ... | [
{
"docid": "deee1b8a768ceb534f0a5d9c9d2590e8",
"score": "0.7314271",
"text": "def save\n wallet.db.save_account(self)\n end",
"title": ""
},
{
"docid": "bb1142d94b19d46da9ba11fb3cc284a2",
"score": "0.6490451",
"text": "def save\n @connection.transactions.save\n en... |
54625d60e708fc55152c28d74f9165ae | token = 1 Parses a token source://mechanize//lib/mechanize/http/www_authenticate_parser.rb113 | [
{
"docid": "cbd55dfe34f089d2b7d09e5a7caef285",
"score": "0.6355762",
"text": "def token; end",
"title": ""
}
] | [
{
"docid": "434a8e5d97b4c2c7ba72b158a5afa4ce",
"score": "0.7537164",
"text": "def parse(www_authenticate); end",
"title": ""
},
{
"docid": "3c3635b255c40f1abdac90c6d8299029",
"score": "0.6654565",
"text": "def w000thenticate\n check_token\n end",
"title": ""
},
{
"doc... |
82a8bce0955e7480d4fb365d19f19c07 | GET /authos GET /authos.json | [
{
"docid": "a7697399747062844e9a9e6bd16d737f",
"score": "0.64975667",
"text": "def index\n @authos = Autho.all\n end",
"title": ""
}
] | [
{
"docid": "37aaaf23f03292e9b241b1a3464e01a1",
"score": "0.636918",
"text": "def index\n auth_response = plaid_client.auth.get(access_token)\n render json: auth_response.to_json\n end",
"title": ""
},
{
"docid": "27713f9474ae1ba41c7e9ba0e0bf537e",
"score": "0.6202613",
"text":... |
4991df6c3f2bf4058456f1083bdaf58d | For example, a = '11' b = '1' Return '100'. | [
{
"docid": "91d595539aa7c259d99e79cb6889b200",
"score": "0.58265376",
"text": "def add_binary(a,b)\n (a.to_i(2) + b.to_i(2)).to_s(2)\nend",
"title": ""
}
] | [
{
"docid": "72857d1782831cfeced79b94594e17b5",
"score": "0.7458887",
"text": "def dec(a, b)\n a_str = a.to_s\n b_str = b.to_s\n\n larger = a_str.size > b_str.size ? a_str : b_str\n result = \"\"\n\n for i in 0..larger.size do \n result += a_str[i].to_s\n result += b_str[i].... |
09cc18d6bcf8ced492a9f04ce1b62c3c | Minimum interval between the value and the string to compare | [
{
"docid": "144ba20fbb48de6cb658f7f65133d35e",
"score": "0.0",
"text": "def min_interval\n MIN_INTERVAL\n end",
"title": ""
}
] | [
{
"docid": "9c623b7c190e2c900acf69af11b39336",
"score": "0.63357264",
"text": "def key_for_min_value(name_hash)\n min = \"start\"\n lowestkey = nil\n name_hash.each { |key, integer|\n if min = \"start\"\n min = integer\n elsif integer < min\n min = integer\n lowestkey = key\n ... |
5fa70c89a32c6f51a862bee693e1b939 | Fetch all latest post from multiple feeds. And by default it will sort descending order by published. If want to make it ascending order then have to pass 'asc' as parameter | [
{
"docid": "8623baa5544c1301310ba3fde3d60978",
"score": "0.67683774",
"text": "def fetch_feeds(feed_urls, sort = 'desc')\n\t\tfeeds = Feedzirra::Feed.fetch_and_parse(feed_urls)\n return nil unless [Feedzirra::Parser::AtomFeedBurner, Feedzirra::Parser::RSS].include?(feeds.values.first.class)\n entr... | [
{
"docid": "5522c4aee22478aaff51cb2c9397777a",
"score": "0.7308141",
"text": "def feed\n @posts = Post.find(:all, :order => 'created_at DESC', :limit => 20) \n end",
"title": ""
},
{
"docid": "44260e602823616569bc3ad9ad24ebb1",
"score": "0.72762465",
"text": "def fetch_all_feeds_... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "3cf9d146e1767d5bb516be557571760f",
"score": "0.0",
"text": "def set_menu\n @menu = Menu.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... |
6871771e1e61946f48681b57446a8a7b | DELETE /televisions/1 DELETE /televisions/1.json | [
{
"docid": "c5e77bda67dc0ee2814b612c6426410a",
"score": "0.79283893",
"text": "def destroy\n @television = Television.find(params[:id])\n @television.destroy\n\n respond_to do |format|\n format.html { redirect_to televisions_url }\n format.json { head :no_content }\n end\n end",
... | [
{
"docid": "6bda9ec23243ca1cffea32303ede6876",
"score": "0.75113356",
"text": "def destroy\n @television.destroy\n respond_to do |format|\n format.html { redirect_to televisions_url, notice: 'Television was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
... |
746cd97d68071eaf76c033c2bcd8821b | TODO refactor, refactor, refactor | [
{
"docid": "7389ea449630c64b5d4aa4b1434e6694",
"score": "0.0",
"text": "def call_command_with_audit(argv)\n if [:update, :destroy].include?(record_effect(argv)) && RECORD_PREVIOUS_COMMANDS.include?(argv[0].to_s) \n record_value(argv[1])\n end\n command_return = call_command_without_audit(a... | [
{
"docid": "9dcc74dd11eb115d21bf9af45b3ec4e3",
"score": "0.64719665",
"text": "def bodystmt; end",
"title": ""
},
{
"docid": "9dcc74dd11eb115d21bf9af45b3ec4e3",
"score": "0.64719665",
"text": "def bodystmt; end",
"title": ""
},
{
"docid": "9dcc74dd11eb115d21bf9af45b3ec4e3... |
92a9b2350096f6ec681593f9f22af40e | Return the "Support" menu list. | [
{
"docid": "71874863a86a74e224a6fd13767e1101",
"score": "0.0",
"text": "def support_button\n\t\t$tracer.trace(__method__)\n\t\t# unit_test_no_generate: support_button, a.className(create_ats_regex_string(\"ats-supporttab\"))\n\t\treturn ToolTag.new(a.className(create_ats_regex_string(\"ats-supporttab\")... | [
{
"docid": "9deb2c2635e2d2dbecfb29c575367fa3",
"score": "0.66564536",
"text": "def effective_menus\n menus\n end",
"title": ""
},
{
"docid": "39597ccf675206322d2e68018c518069",
"score": "0.66240406",
"text": "def menu_html\n menu = wiki.settings.menu\n if !menu.nil?... |
a102b57f604bf3d9b5633e06cd863d44 | Resolves the paths for all of a view's assets. Resolved assets include the view's templates and rendering context. ==== Params: [view] String. The name or relative path of the view to resolve. The path must be relative to the +pages+ template directory. ==== Returns: String[]. The resolved asset paths in an array. The ... | [
{
"docid": "7bfb412c032a8fbeb22424bbce3c39c4",
"score": "0.5381354",
"text": "def load_components(view = '', components = [], options = {})\n\t\t\t# Return an empty hash if no component types are specified\n\t\t\tif !components.length then return {} end\n\n\t\t\t# Strip whitespace\n\t\t\tview.strip\n\t\... | [
{
"docid": "cdd2bd7f70f2480940b3e192edf81923",
"score": "0.59610593",
"text": "def view_paths\n @template.view_paths\n end",
"title": ""
},
{
"docid": "75da50fcb5537da8ada25d84cdd20324",
"score": "0.5912997",
"text": "def views\n @path_info.each_pair do |path, info|\... |
159aa4b77ce31b8fbf79844d62a7cfe6 | The unique_name is used to generate a unique name for a definition based on a base_name string. For example, a base_name of "Joe" might return "Joe 2" | [
{
"docid": "eb243c0a71f9a50c5fbe74f8c9e1bd74",
"score": "0.8521596",
"text": "def unique_name(base_name)\n end",
"title": ""
}
] | [
{
"docid": "8d6f03830a8aa1cbaa690781ab398b3c",
"score": "0.73861116",
"text": "def generate_unique_name\n n = 0\n begin\n new_name = nil\n iteration = n.to_s\n\n new_name ||= name if n.zero?\n new_name ||= (name + \" \").truncate(MAX_LENGTH,\n omission: iteration,\n ... |
4427facf838e20deeaff6c03ff29570e | Register a new error (bang) way. Requires a block. | [
{
"docid": "58e1cf2c18bf8acaaa63006737369484",
"score": "0.5576565",
"text": "def bang(&block)\n @bang_proc = block\n end",
"title": ""
}
] | [
{
"docid": "8256239a28d94a75ed5bc99c9d8fbf76",
"score": "0.7537341",
"text": "def error(&block)\n @errors << block\n end",
"title": ""
},
{
"docid": "8256239a28d94a75ed5bc99c9d8fbf76",
"score": "0.7537341",
"text": "def error(&block)\n @errors << block\n end",
"ti... |
d163372c045dceac6c3cef9aaecf0fe8 | GET /recordqleits GET /recordqleits.json | [
{
"docid": "01bb3440da468bfc39ae83b27900518a",
"score": "0.706707",
"text": "def index\n @recordqleits = Recordqleit.all\n end",
"title": ""
}
] | [
{
"docid": "39554b904e5600b09262f2d6d1191664",
"score": "0.68644893",
"text": "def records\n get '/records'\n end",
"title": ""
},
{
"docid": "e88cf83d5bdcc67d3b5b049f86f659e9",
"score": "0.6471557",
"text": "def index\n @recordqreats = Recordqreat.all\n end",
"title": ""... |
337d90da6d1c1c9dbf97290071f9922b | DELETE /type_sounds/1 DELETE /type_sounds/1.json | [
{
"docid": "278ec6dcbeea762a2c30035ed6c2d47f",
"score": "0.77799314",
"text": "def destroy\n @type_sound.destroy\n respond_to do |format|\n format.html { redirect_to type_sounds_url, notice: 'tipo de sonido a sido eliminado.' }\n format.json { head :no_content }\n end\n end",
"ti... | [
{
"docid": "eba00eda1c01e5f370271020bfe6dd23",
"score": "0.7363719",
"text": "def destroy\n @sound = Sound.find(params[:id])\n @sound.destroy\n\n respond_to do |format|\n format.html { redirect_to(admin_sounds_url) }\n format.xml { head :ok }\n end\n end",
"title": ""
},
... |
a4c40e23ce00a5454d3c17d7ccb2dd55 | Overwrite : Update Close Processing | [
{
"docid": "4218273df350da8db5cc87290565b1a4",
"score": "0.67929476",
"text": "def update_close\n speed = balloon? ? Theo::Msg::OpeningSpeed : 48\n self.openness -= speed\n @closing = false if close?\n end",
"title": ""
}
] | [
{
"docid": "6d72330b47941b46a2129444ea984e86",
"score": "0.7495858",
"text": "def update\n super\n if @call_close && self.openness == 0 && @close_method\n @call_close = false\n @close_method.call\n end\n end",
"title": ""
},
{
"docid": "4605522b8197252a3a1e488243a29225",
... |