query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
235a1dab5de52452e537931f23c4c074 | Given the specified parse +state+ which is pointing past the opening of a directive tag, parse the directive. | [
{
"docid": "13ac67a91b3ca1e66144d77715160609",
"score": "0.6961881",
"text": "def scan_directive( state, context=nil )\n\t\tscanner = state.scanner\n\n\t\t# Set the patterns in the parse state to compliment the\n\t\t# opening tag.\n\t\tstate.set_tag_patterns( scanner.matched )\n\t\ttag_begin = state.lin... | [
{
"docid": "623212b337e7c5cc955ceecb92936da9",
"score": "0.736794",
"text": "def parse_directive_contents( parser, state )\n\t\tend",
"title": ""
},
{
"docid": "a47f95f12f44520f8446cc8baae413c2",
"score": "0.69174844",
"text": "def parse_directive_contents( parser, state )\n\t\t\tsup... |
61dca9cf89d8914afba97705681d4e87 | This method scans a raw config file for type 7 passwords and decrypts them | [
{
"docid": "1398c527d162a42cb7bbdd11a0b17054",
"score": "0.75028807",
"text": "def decrypt_config(file)\n f = File.open(file, 'r').to_a\n decrypt_array(f.collect {|line| type_7_matches(line)}.flatten)\n end",
"title": ""
}
] | [
{
"docid": "651776bf654519ac681a6f58a5cec58f",
"score": "0.802258",
"text": "def decrypt_config(file)\n pw_array = []\n f = File.open(file, 'r')\n f.each do |line|\n pw_array << type_7_matches(line)\n end\n decrypt_array(pw_array.flatten)\n end",
"title": ""
},
{
"docid"... |
cc0175db6bd808d741573d6d3069f4ee | Returns the output of the serverside include as a string, honoring the character encoding set on the response. | [
{
"docid": "ab06654a81f45b5a65ef13922ec5d389",
"score": "0.0",
"text": "def render(path, params={})\n servlet_request = env['java.servlet_request']\n params.each { |k,v| servlet_request[k.to_s] = v}\n servlet_response = ServletRackIncludedResponse.new(env['java.servlet_response'])\n ... | [
{
"docid": "6640a034ef76ce23223b511f8db71604",
"score": "0.62429464",
"text": "def string_content(rack_response)\n full_content = ''\n rack_response.each{|c| full_content << c }\n full_content\n end",
"title": ""
},
{
"docid": "2285656e43d799a43b75a057c20dcb3f",
"score"... |
f83cf695ed082ef0945fea29fbe065dc | Recurse through children of the window_handle. | [
{
"docid": "19592803545d05d81b1d07892e808d32",
"score": "0.75053746",
"text": "def recurse_children( window_handle, findTextOnly = false )\n\n\t\t@findTextOnly = findTextOnly\n\t\t\n\t\t# Process the parent window.\n\t\tif (@allChildren[window_handle] == nil)\n\t\t\tprintControlInfo( 0, window_handle )\... | [
{
"docid": "d3e2394b8cd1795ca8b7ee5cc30aee7c",
"score": "0.8190374",
"text": "def find_all_children( window_handle )\n\n\t\t\t@log.debug(\"Finding all children for handle #{window_handle}\")\n\t\t\t\n\t\t\t# Process the parent window.\n\t\t\tif (@allChildren[window_handle] == nil)\n\t\t\t\t@allChildren[... |
72e73628e34a6d783e0d9954c9cbdde7 | Returns true if the object is the same object, or is a string and has the same content. | [
{
"docid": "437e7df55a7b72362c9c2b337a4a9924",
"score": "0.0",
"text": "def ==(other)\n (other.equal?(self)) ||\n # This option should be deprecated\n (other.is_a?(String) && other == self.to_s) ||\n (other.is_a?(Answer) && other.to_s == self.to_s)\n end",
"title": ""
}
] | [
{
"docid": "a470634e61ba2fe4a1eb30700f9b26a7",
"score": "0.70243996",
"text": "def equal?(other)\n return false unless other.is_a?(self.class)\n are_identical = false\n if self.title == other.title\n begin\n obj_id = self.object_id.to_s\n self.title += obj_id\n ... |
a02320206c675723d0afe5464af12983 | design_constraints Description: This action displays a form to gather design constraint details for the design entry. Parameters from params id the board_design_entry id user_action keeps track of whether the user is adding or updating | [
{
"docid": "20edf71fc94200b3cdad6f3559e6a34b",
"score": "0.8586227",
"text": "def design_constraints\n \n @board_design_entry = BoardDesignEntry.find(params[:id])\n @user_action = params[:user_action]\n \n end",
"title": ""
}
] | [
{
"docid": "b07d2ef7b095a784c9b961a6baca567e",
"score": "0.62380576",
"text": "def design\n @board = Board.find(params[:id])\n @designs = Design.find_all_by_board_id(@board.id)\n end",
"title": ""
},
{
"docid": "a2a3b69014798f917f88f3fd6701bcdf",
"score": "0.6195697",
"text"... |
14a632b8286b00af18581f14ed27df1b | calculate the scaling factor for the given type and sample using sample_size | [
{
"docid": "9cb77e3e1d1f64aa44ae2635e819f195",
"score": "0.774777",
"text": "def factor_for type, sample\n case type\n when :const\n sample.to_f\n when :logn\n sample.to_f/Math.log10(@sample_size)\n\n when :n\n sample.to_f/@sample_size\n\n wh... | [
{
"docid": "0e13e310651821e68fcda1116bd94a4b",
"score": "0.61825174",
"text": "def get_scale\n runs = []\n 10.times do\n runs << measure(1, &@options[:fn])\n end\n runs.inject(:+) / 10\n end",
"title": ""
},
{
"docid": "b1cc50b86a5e73105792c1dd05879a20",
"sc... |
6b9efd8b267d3722820973e600c4524f | Returns an instance of the Doorkeeper::AccessToken with specific token value. | [
{
"docid": "02fa8d771be4195ce5f2acf17fbbbde1",
"score": "0.0",
"text": "def by_refresh_token(refresh_token)\n token_accessor = Doorkeeper.configuration.token_accessor.constantize\n token_accessor.get_by_refresh_token(refresh_token)\n end",
"title": ""
}
] | [
{
"docid": "6646633a920f57b735143c0a9d9a9e20",
"score": "0.72229254",
"text": "def access_token\n @access_token ||= OAuth2::AccessToken.new(client, token)\n end",
"title": ""
},
{
"docid": "6646633a920f57b735143c0a9d9a9e20",
"score": "0.72229254",
"text": "def access_token\n ... |
dd6da7665692bd9fd716055f328f7b57 | Returns a new time the specified number of days in the future. | [
{
"docid": "d6345c1b21afc66ea98666e5ba4d2100",
"score": "0.573003",
"text": "def next_day(days = 1)\n advance(days: days)\n end",
"title": ""
}
] | [
{
"docid": "3001603082d26730f985eed07c7e805c",
"score": "0.6666285",
"text": "def future_date(days)\n Faker::Date.forward(days)\n end",
"title": ""
},
{
"docid": "d90671e14c199b26ff9f3fbebdae7237",
"score": "0.6188595",
"text": "def days_ago(days)\n advance(days: -days)\n ... |
71818bd7dd32a7c021396e470d12a74b | PUT /bingo/numbers/1 PUT /bingo/numbers/1.json | [
{
"docid": "107f37bb554a0a17d2ccd802fbf419e4",
"score": "0.66560966",
"text": "def update\n @bingo_number = BingoNumber.find(params[:id])\n\n respond_to do |format|\n if @bingo_number.update(bingo_number_params)\n format.html { redirect_to bingo_numbers_path, notice: 'Bingo number was ... | [
{
"docid": "1609e3cb6a244a3ecf3169dd8d50bf07",
"score": "0.6057202",
"text": "def update!(**args)\n @number = args[:number] if args.key?(:number)\n end",
"title": ""
},
{
"docid": "1609e3cb6a244a3ecf3169dd8d50bf07",
"score": "0.6057202",
"text": "def update!(**args)\n... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "0978b61f0d85c87b365760dc9a2cb663",
"score": "0.0",
"text": "def set_knowledge\n @knowledge = Knowledge.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;... |
e40cef118043ad638f5facbd2a0c7c35 | If the cell is printed, return a character based on whether or not it is alive. | [
{
"docid": "642bf60bacfe1242c76f4174e0b2ae62",
"score": "0.63601124",
"text": "def to_s\n alive? ? \"\\u25CF\" : \"\\u0020\"\n end",
"title": ""
}
] | [
{
"docid": "d489ce9b60b763a6e34943fb3fe67522",
"score": "0.7202193",
"text": "def get_character\n is_alive? ? \"(`(●●)´)\" : \"(x(●●)x)\"\n end",
"title": ""
},
{
"docid": "6d517aec3087aa06091fd1649b40ef37",
"score": "0.71509504",
"text": "def get_character\n charact... |
89d174c27d632df93b91c49cfb28ebc9 | POST /d_loggers POST /d_loggers.json | [
{
"docid": "7ac1cf0ff1008cd7b01d42705fc4cc14",
"score": "0.6380608",
"text": "def create\n @d_logger = DLogger.new(params[:d_logger])\n\n respond_to do |format|\n if @d_logger.save\n format.html { redirect_to @d_logger, notice: 'D logger was successfully created.' }\n format.jso... | [
{
"docid": "14ed0af8afd0927e75675c837fe5db07",
"score": "0.6185742",
"text": "def index\n @d_loggers = DLogger.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @d_loggers }\n end\n end",
"title": ""
},
{
"docid": "ab66dca7a8868b24... |
95ebe4ba7c6f2ab0c939f49aa713562a | Sorts jobs in decreasing order of the difference (weight length). If two jobs have equal difference (weight length), schedule the job with higher weight first. This algorithm is not always optimal. Optimal to schedule jobs by weight/length ratio. | [
{
"docid": "fc9275b1c2de2eaa90045787915ee38a",
"score": "0.5866837",
"text": "def compare_by_weight_length_difference other_task\n compare_result = @weight_minus_length <=> other_task.weight_minus_length\n compare_result = @weight <=> other_task.weight if compare_result == 0\n compare_result\n ... | [
{
"docid": "557ab4b383d69da721a06177b023f2b4",
"score": "0.67740095",
"text": "def calculate_and_sort_differences\n @joblist.each_with_index do |job, index|\n @differences[index] = job[0] - job[1]\n end\n # sort jobs by differences in decreasing order\n @differences = @differences.sort_... |
247893e2cf48dfb4b22181bb1d8b12e8 | Saves Omniauth details to Authentication model. | [
{
"docid": "06bee2dc0b1382df047e602b367041c8",
"score": "0.81371385",
"text": "def save_omniauth_details\n authentication = @user.authentications.find_or_create_by(\n provider: auth_info.provider,\n uid: auth_info.uid\n )\n\n authentication.update_attributes!(\n email: au... | [
{
"docid": "f935ea398caacc1d99f16f589ff0fa9a",
"score": "0.6947328",
"text": "def update_with_omniauth(authentication, omniauth)\n authentication.token = omniauth['credentials']['token']\n authentication.secret = omniauth['credentials']['secret']\n\n self.update_timezone(omniauth['extra']['raw_... |
fc0e8c6e1996bb5e527e3ac4340dedf0 | Make sure the path above is relative to this file | [
{
"docid": "d43c80a123979edaa9168b2fe341d4ad",
"score": "0.0",
"text": "def absolute_app_path\n File.join(File.dirname(__FILE__), APP_PATH)\nend",
"title": ""
}
] | [
{
"docid": "3ecd547430623f48487f64a630f24eee",
"score": "0.75067025",
"text": "def relative_path; end",
"title": ""
},
{
"docid": "3ecd547430623f48487f64a630f24eee",
"score": "0.75067025",
"text": "def relative_path; end",
"title": ""
},
{
"docid": "87c5963e39d281760f8b90... |
ae3e2832649b1a4e8cda63dac2d2bf7e | GET /punches/new GET /punches/new.xml | [
{
"docid": "8c7e82d9fe724a66b50a721d3e648e8f",
"score": "0.6807124",
"text": "def new\n @punch = Punch.new\n @users = User.all # for sidebar\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @punch }\n end\n end",
"title": ""
}
] | [
{
"docid": "dc4127ed9796ebfa1e60ed1fd63f0c7f",
"score": "0.733609",
"text": "def new\n @punch = Punch.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @punch }\n end\n end",
"title": ""
},
{
"docid": "dc4127ed9796ebfa1e60ed1fd63f0... |
10b61cd284647db53486098f0b8ddcd4 | GET /venuetypes GET /venuetypes.json | [
{
"docid": "5c1f09e6a7e8c855d6cae36e44b87743",
"score": "0.74659914",
"text": "def index\n @venuetypes = Venuetype.all\n end",
"title": ""
}
] | [
{
"docid": "cdd64ab7e0d0e65c1b28d9fd80bcf1e1",
"score": "0.7911973",
"text": "def index\n @venue_types = VenueType.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @venue_types }\n end\n end",
"title": ""
},
{
"docid": "1b77431c6d... |
b663ce492b7137b83ab9614f83c2cf43 | reduce 606 omitted reduce 607 omitted | [
{
"docid": "0416bcf8d041fe904b74309ef3bc1c87",
"score": "0.0",
"text": "def _reduce_608(val, _values, result)\n identifier = val[1].to_sym\n\n self.env[identifier] = :lvar\n result = \"&#{identifier}\".to_sym\n\n result\nend",
"title"... | [
{
"docid": "cfd9751f38acc4263e65891b003b80f5",
"score": "0.7208441",
"text": "def _reduce_606(val, _values, result)\n result = nil\n \n result\nend",
"title": ""
},
{
"docid": "61f930fe3a1a0b9d4ce1cd245c5b5994",
"score": "0.71876264",
"text": "d... |
8e92a4b281527fc156ce466b60f624a6 | have to make username or password unique and check by that param | [
{
"docid": "7e3bed7788c47d6012bd23ef044aacbb",
"score": "0.0",
"text": "def create\n user = User.find_by(username: params[:username])\n if user.authenticate(params[:password])\n my_token = encode_token({user_id: user.id})\n render json: {token: my_token}\n... | [
{
"docid": "7d607543d64e6b71b170b70b5719c37c",
"score": "0.76233834",
"text": "def validate_user_pass(_username, _password)\n end",
"title": ""
},
{
"docid": "28cc72f5b7c8c8480f4eef7a74c474c1",
"score": "0.7390678",
"text": "def validate_user(uname, password)\n #validatio... |
c7508473f7c9431d0368b154d0f0e944 | everything has to be filled so that a hh_attribute can be created | [
{
"docid": "5e6343938aea40f399b7b1cb4ea6b9c3",
"score": "0.0",
"text": "def everything_present?\n !everything_blank?\n end",
"title": ""
}
] | [
{
"docid": "9960d8986d18f271038e822322af7ee5",
"score": "0.6365967",
"text": "def initialize\r\n @hatched_hours = 0\r\n end",
"title": ""
},
{
"docid": "aabe7629980112682b1d82c8c12d59e3",
"score": "0.6338359",
"text": "def initialize\n @hatched_hours=0\n end",
"title": ""... |
0a8a5927678270bed0d1edb7ef45cd56 | Send emails 1 day before an event | [
{
"docid": "6fbf4c11c37b5114b4fab6b051e24e40",
"score": "0.6417725",
"text": "def send_mails\n\t\tReminder.where(time: Time.now..(Time.now + 1.day), reminded: false).each do |r|\n\t\t\tUser.all.each do |u|\n\t\t\t\tsend_safe_mail(:to => u.email, :subject => r.title, :html_body => \"<p>Hi #{u.display_nam... | [
{
"docid": "5302ab4377a9693dbd3c01d12b4c1348",
"score": "0.7161013",
"text": "def send_event_email(user)\n @event = Event.order(\"created_at\").last\n mail(:to => user.email,\n :subject => 'Upcomming event at 100Club!')\n \n end",
"title": ""
},
{
"docid": "d0a0f35a94542fb8... |
b2ea6e9321a87cab63bab7df1baa20a1 | Use 'open' to open the document with words from the URL and push each line into the 'WORDS' array. | [
{
"docid": "d821ced77cdb8552e8b65f2b409918d8",
"score": "0.0",
"text": "def craft_names(rand_words, snippet, pattern, caps=false)\nnames = snippet.scan(pattern).map do\n word = rand_words.pop()\n caps ? word.capitalize : word\nend\n\nreturn names * 2\nend",
"title": ""
}
] | [
{
"docid": "5124ac99fb3611a6a9029fa6f935333e",
"score": "0.6205115",
"text": "def document\n open(url).string.split(';')\n end",
"title": ""
},
{
"docid": "7bca6388d976b71a6675414ae8b780da",
"score": "0.60704446",
"text": "def open\n require 'wiki-lib'\n ary = Array.new\n Sele... |
6e2adbf5d4a7eb05c4e24a3ada95dcbc | Sanitize this string by HTMLencoding it using HTMLEntities. Note that this method is called automatically on every content of Aurita::GUI::Element instances that is not flagged as sanitized, so you don't have to do it yourself. When in doubt, use this method instead of sanitized, as it just returns self if it has been ... | [
{
"docid": "d0dc3d58db62eef6a75eb7574f41482e",
"score": "0.76722",
"text": "def sanitize!\n return self if @sanitized\n replace(HTMLEntities.new.encode(self))\n @sanitized = true\n return self\n end",
"title": ""
}
] | [
{
"docid": "a3bbb52b1df60bfbc03872e1fc72f5e1",
"score": "0.7734906",
"text": "def sanitize_as_html!\n Engine.clean!(self)\n end",
"title": ""
},
{
"docid": "a3bbb52b1df60bfbc03872e1fc72f5e1",
"score": "0.7734906",
"text": "def sanitize_as_html!\n Engine.clean!(self)\n ... |
70eb30ac919421dbd4ad5f09c1c03c2e | See WR???? we only show the first website URL from the postal contact info | [
{
"docid": "5c66328d3e7cfe5c1a4d3b12f57a13d9",
"score": "0.0",
"text": "def get_contributor_website_url\n role.get_contributor_url\n end",
"title": ""
}
] | [
{
"docid": "2c2a43d6e1c6cf594f3ad14bac7412ba",
"score": "0.690541",
"text": "def formatted_website\n self.website.split('/')[2]\n end",
"title": ""
},
{
"docid": "b9167663c39e46dac12df550764b5c85",
"score": "0.66138",
"text": "def websites\n contact_method.select { |cm... |
d7b322f7c9a6e061d871d88dc01e2ac3 | GET /carts/current display items in current cart | [
{
"docid": "c235cb8623fee6d83e1b7ca6ebb76f36",
"score": "0.79714364",
"text": "def view_current\n\t\tif @current_cart\n\t\t\t@items = Cart.find(cookies[:cart_id]).items\n\t\t\tdisplay_price_changes(@current_cart.id)\n\t\telse\n\t\t\tflash.now[:notice] = \"You have 0 items in your cart. Start shopping!\"... | [
{
"docid": "4828108a48f2fd60de59e0f710d4c4c7",
"score": "0.8060222",
"text": "def index\n \n @carts = Cart.all\n @cart_items = current_cart.cart_items\n end",
"title": ""
},
{
"docid": "260c03f0c42af88e2c966d6d5af5077b",
"score": "0.80331355",
"text": "def index\n @cart_... |
d145c0204d2102500b83fb2ab5186407 | request > Proto::UserFindRequest response > Proto::UserList | [
{
"docid": "736f3e9a7312c189dca1fa284cb5cff1",
"score": "0.68962836",
"text": "def find\n\t\t self.async_responder = true\n\t\t\t$logger.debug '[S] in Proto::UserService#find'\n\t\t\t$logger.debug '[S] calling client service find'\n\t\t Proto::ClientService.client(async: true).find(request) do |c|\n ... | [
{
"docid": "55b9785de81e86bc37da9f5016c4f36f",
"score": "0.62258446",
"text": "def listUsers()\n params = {}\n resp_parsed = api_call(__method__.to_s, params)\n end",
"title": ""
},
{
"docid": "3ff66b41a492da5c1ce40dd6f2e9eca4",
"score": "0.6201834",
"text": "def my_list(*args... |
038aa336e4d170a1d4693ecd70daf6cb | Import methods. They load the csv file, for the given type get rid of unnecessary information, transforms other fields, so they can match the one in SugarCRM and calls for the populate_sugar method which start the actual import. Keep in mind, that the order of the imports is important | [
{
"docid": "0b69db7e6163c7beb2c2456617e95c82",
"score": "0.0",
"text": "def import_isos\n records = load_file_for_import 'ISOs__c'\n records = transform_isos(records)\n populate_sugar(records, \"iso\")\n end",
"title": ""
}
] | [
{
"docid": "5af97dd15a20178719e5a7d246d7419b",
"score": "0.6876317",
"text": "def import_data path, file_type\n if file_type == :csv\n csv_parse(path).each { |params| Product.new(params).save }\n elsif file_type == :xls\n #xls_parse(path)\n end\nend",
"title": ""
},
{
"docid": "a8cb... |
47343f5c1a32a14e2ac2f785c20df3e4 | Get backend sessions by frontend server id and user id | [
{
"docid": "8e37a8a1b1c219729d6b18d3f7af80ec",
"score": "0.72955555",
"text": "def get_by_uid frontend_id, uid, &block\n namespace = 'sys'\n service = 'sessionRemote'\n method = 'getBackendSessionByUid'\n args = [uid]\n rpc_invoke(server_id, namespace, servic... | [
{
"docid": "c1a044982976930704db009c5bb73a14",
"score": "0.7490665",
"text": "def get frontend_id, sid, &block\n namespace = 'sys'\n service = 'sessionRemote'\n method = 'getBackendSessionBySid'\n args = [sid]\n rpc_invoke(frontend_id, namespace, service, met... |
d1f1bcf42dc7f38228047a2b16cac805 | effectively sets the progname | [
{
"docid": "f7f4710a234f8cf7055929db1a9b4514",
"score": "0.0",
"text": "def logger_for(classname)\n @loggers[classname] ||= configure_logger_for(classname)\n end",
"title": ""
}
] | [
{
"docid": "e13c16644c55eaea3a52799ff1a16763",
"score": "0.84294873",
"text": "def progname=(name)\n @log.progname = name\n end",
"title": ""
},
{
"docid": "f3d0175f9240ee5e401391a97e3d8610",
"score": "0.8063702",
"text": "def setProgramName(name)\n end",
"title... |
fa408fadf7cb24808ab74f96a8b846d3 | Possible To Achieve Target Sum? Problem Statement: Given an array arr of size n and a target sum k. You have to determine, whether there exists a group of numbers (numbers need not to be contiguous and group can not be empty) in arr such that their sum equals to k. Input Format: There are two argument. First one is arr... | [
{
"docid": "968ee6b1e225001df5c96759d2962d6d",
"score": "0.8300959",
"text": "def check_if_sum_possible(arr, k)\n\ti = 0\n\toutput = []\n\tssf = Array.new(arr.size)\n\treturn true if check_sum(arr, 0, ssf, 0, k, output).include?(true)\nend",
"title": ""
}
] | [
{
"docid": "44169cb8b2243b7afd116e59c3ad41d7",
"score": "0.7892699",
"text": "def arr_sum(arr, target)\n 0.upto(arr.size - 2) do |idx1|\n 1.upto(arr.size - 1) do |idx2|\n return true if arr[idx1] + arr[idx2] == target && idx2 > idx1\n end\n end\n false\nend",
"title": ""
},
{
"... |
4f6d88706090aeafe613745da925515b | POST /reservations POST /reservations.json | [
{
"docid": "d70274bdd8d61886f761f6c386a2065a",
"score": "0.63875705",
"text": "def create\n Reservation.transaction do\n @reservation = Reservation.new(reservation_params)\n @reservation.room.lock!\n\n respond_to do |format|\n if @reservation.save\n @invoke_slack_webhoo... | [
{
"docid": "d3a615577be5ff45806e41103b3d7cd1",
"score": "0.7194829",
"text": "def create\n @reservation = Reservation.new(reservation_params)\n\n if @reservation.save\n render :show, status: :created, location: @reservation\n else\n render json: @reservation.errors, status: :unprocess... |
0b0d6b3e598a5646762421831883fb3d | === SFS 1.1 Description The start Point of this Curve. === Notes Returns an object that supports the Point interface. | [
{
"docid": "a0fad367ba6b8ae386369e08442cc5ea",
"score": "0.82612073",
"text": "def start_point\n raise Error::UnsupportedOperation, \"Method Curve#start_point not defined.\"\n end",
"title": ""
}
] | [
{
"docid": "bb750a9a28f1f73867020e39611aa0e4",
"score": "0.763073",
"text": "def getStartPoint()\n geoObject().firstPoint() ;\n end",
"title": ""
},
{
"docid": "b4956697b07cf194e83f9ab41a7c266d",
"score": "0.7594859",
"text": "def start_point\n o = st_start_point\n ... |
f40f3116c7626cb06a0c7769e9819008 | DELETE /user_acts/1 DELETE /user_acts/1.json | [
{
"docid": "e7fd5f30fd7437c9f1ad1951097fd572",
"score": "0.6584698",
"text": "def destroy\n @activity = Activity.find(@user_act.id_activity)\n @user_act.destroy\n respond_to do |format|\n format.html { redirect_to activity_path(@user_act.id_activity), notice: \"You're no longer going to #{... | [
{
"docid": "2e50af3ee1ae410b771f8ada97d50edc",
"score": "0.70012563",
"text": "def destroy\n @user_action = UserAction.find params[:id]\n @user_action.destroy\n respond_to do |format|\n format.html { redirect_to user_actions_url }\n format.json { head :no_content }\n end\n end",
... |
7ffe2671a01a5f0411ada1d5c2903428 | GET /tagcreations GET /tagcreations.json | [
{
"docid": "7e33f85e2b51f8e9f011f9b329696ca4",
"score": "0.5876883",
"text": "def index\n @tagcreations = Tagcreation.paginate(page: params[:page], per_page: 6) \n end",
"title": ""
}
] | [
{
"docid": "cb8ce89d91f0da86a739d71339e0c836",
"score": "0.64231074",
"text": "def tags\n request.get '/tags'\n # e.g. [\"component\", \"generation\", \"host\", \"member\"]\n end",
"title": ""
},
{
"docid": "cf634a7a3f3bd85288dd764b756ffc75",
"score": "0.6414045",
"text": "def... |
ac193002a3dbee95ae01a75ad27ba8f7 | Variables in subscope don't appear in parent scope. | [
{
"docid": "6cc5ddba1d2041a54900a27de67c5a45",
"score": "0.6286951",
"text": "def test_scopes\n s0 = Scope.new\n s0.rucas {\n var :a\n var :b\n }\n s1 = s0.subscope\n s1.rucas {\n var :c\n }\n assert s0.respond_to?(:a)\n assert s0.respond_to?(:b)\n assert !s0.... | [
{
"docid": "056fdc29100b43dab7cf6300b60ef4c9",
"score": "0.69355774",
"text": "def put_var_scope\nend",
"title": ""
},
{
"docid": "906cc54d133c8e537ec59858c326531a",
"score": "0.6756794",
"text": "def current_scope=(scope); end",
"title": ""
},
{
"docid": "906cc54d133c8e5... |
59db7ee648efb1be000b6f75cd48b99e | Timeline entries Insert a timeline entry document | [
{
"docid": "8eb81e159fdb7ff3be26b99947063049",
"score": "0.7063517",
"text": "def insert_timeline_entry(timeline_kind, timeline_entry_hash)\n self.insert(self.timeline_collection(timeline_kind), timeline_entry_hash)\n end",
"title": ""
}
] | [
{
"docid": "26b8631a8aea1d5df717e0b182a1bfb3",
"score": "0.7387158",
"text": "def create_timeline_entry creator, content, attach\n timeline.create_new_entry creator, content, attach\n end",
"title": ""
},
{
"docid": "1498a41fc5e0ff9b5d27c77837efcfcf",
"score": "0.7022959",
"text"... |
141dd5dc0f83d4c3907ca0074e7e5076 | GET /playeraccomplishments GET /playeraccomplishments.xml | [
{
"docid": "df5acb4a0a2e9ea8f4cc140f1085a548",
"score": "0.73724455",
"text": "def index\n @playeraccomplishments = Playeraccomplishment.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @playeraccomplishments }\n end\n end",
"title": ""... | [
{
"docid": "84c43752239401eb001e68db8ad6e89c",
"score": "0.69589186",
"text": "def show\n @playeraccomplishment = Playeraccomplishment.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @playeraccomplishment }\n end\n end",
"... |
5c9d59322f74073e19ea372444e5f0df | GET /partners/:partner_id/categories/1 GET /partners/:partner_id/categories/1.json | [
{
"docid": "b18a80f2b197b39cab5213692a5d81ec",
"score": "0.6351648",
"text": "def show\n @category = PartnerCategory.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @category }\n end\n end",
"title": ""
}
] | [
{
"docid": "c45eac89a4e77b57db2717f4a9ff00d0",
"score": "0.7944721",
"text": "def index\n @partner = Partner.find(params[:partner_id])\n @categories = @partner.partner_categories.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @categories }\n... |
2df71d10a7fc4e41f117e8f4070f06cf | [GET] /model_pluralized/find_by method to call find by attributes | [
{
"docid": "38e93d4eff1e4829815641e66ed3401e",
"score": "0.5973202",
"text": "def find_by(attributes = {}, options = {}, header = {})\n search = { search: attributes }.merge!(options)\n request = requester.new(:get, \"#{to_url}/find_by\", {}, search, header)\n request.resource.map d... | [
{
"docid": "8ba4cb8c63d5ef612994a44c487f962c",
"score": "0.6633073",
"text": "def find_by()\n\n end",
"title": ""
},
{
"docid": "6bc547761456cb7be8367d25dac9031b",
"score": "0.650193",
"text": "def find_model(attributes)\n model.find(:first, :conditions => { key => attributes[k... |
b1323db29287b13fc74f9b6381697db1 | TODO(thomthom): Move to TestUp2 utility methods and merge with TC_Sketchup_Classifications. | [
{
"docid": "16f3585888083a13ba6a99eb4a8b7ead",
"score": "0.0",
"text": "def open_test_model\n basename = File.basename(__FILE__, \".*\")\n path = File.dirname(__FILE__)\n test_model = File.join(path, basename, \"MaterialTests.skp\")\n # To speed up tests the model is reused is possible. Test... | [
{
"docid": "24f4d14ed731cf48d2f93d10cf57157e",
"score": "0.5840246",
"text": "def generate_test_class(data: [], linkstatus_url_log: {}, w_pipe: {})\n test_cond = @test_cond\n # Common proccessing\n # e.g.) TestSampleAppPcE2e1, TestSampleAppPcHttpstatus1\n test_class_n... |
fbc797d92626ea2de9485b2e6886e838 | Case 6: pass a hash container get key/value | [
{
"docid": "558849123b3730a9317d3e85ca87d139",
"score": "0.0",
"text": "def a_method_block_with_arguments2(&block)\n some_hash = {}\n status = block.call('Hello', some_hash) if block\n dump_object(some_hash)\n dump_object(status)\nend",
"title": ""
}
] | [
{
"docid": "a3125e92d390f9639ee941da77a3765f",
"score": "0.6912697",
"text": "def get(key); end",
"title": ""
},
{
"docid": "a3125e92d390f9639ee941da77a3765f",
"score": "0.6912697",
"text": "def get(key); end",
"title": ""
},
{
"docid": "a3125e92d390f9639ee941da77a3765f",... |
3222ec9176d8a2cdd443a1171c3234e1 | GET /storages/1 or /storages/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "0e73d76fe75a70b1688b3176e125c625",
"score": "0.7299092",
"text": "def show\n @storage = current_user.storages.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @storage }\n end\n end",
"title": ""
},
{
"doc... |
f3ffe033e606226289fbcdbb5859f830 | Retrieve visit outcomes get '/visit_outcomes' Returns Visit Outcomes, according to the parameters provided | [
{
"docid": "2a55e0a04c7cc22d2c22e3f2cc9cae95",
"score": "0.745909",
"text": "def where(options = {})\n _, _, root = @client.get(\"/visit_outcomes\", options)\n\n root[:items].map{ |item| VisitOutcome.new(item[:data]) }\n end",
"title": ""
}
] | [
{
"docid": "2723ece8d270fcf476121c41d7dd9ace",
"score": "0.7100533",
"text": "def index\n @api_v1_outcomes = Api::V1::Outcome.all\n end",
"title": ""
},
{
"docid": "6aab07fb1b654ad910582fa667ba9dc6",
"score": "0.64727515",
"text": "def outcomes\n return @outcomes\n... |
963a301c7aee634e05ea49d583ad0528 | Finds a class or module named +symbol+ | [
{
"docid": "b3a15a79cc777acc6c926baba604291f",
"score": "0.76863235",
"text": "def find_local_symbol(symbol)\n find_class_or_module_named(symbol) || super\n end",
"title": ""
}
] | [
{
"docid": "1fd32d82b552fc84110717f2d9193800",
"score": "0.8502894",
"text": "def find_class_or_module_named(symbol)\n RDoc::TopLevel.classes_hash.each_value do |c|\n return c if c.full_name == symbol\n end\n\n RDoc::TopLevel.modules_hash.each_value do |m|\n return m if m.full_name ==... |
693e7b48148af1539f386500c0d3c0dc | Callback to update time | [
{
"docid": "892ca19b7e5cc38f7d76097275416ebd",
"score": "0.0",
"text": "def update_total(result)\n \tself.secs = results.reduce(0) do |total, result|\n \t\ttotal + result.secs.to_i\n \tend\n end",
"title": ""
}
] | [
{
"docid": "4a8305974488c3f6027e966e0c72b229",
"score": "0.75309944",
"text": "def update_time\n UV.update_time(default_loop)\n end",
"title": ""
},
{
"docid": "6eb2f6317fe0e36444094817c122b4cb",
"score": "0.74128515",
"text": "def update_time\n UV.update_time(@pointer)\... |
3cac8d19853086a0cffd74ff7a16e14c | GET /medecins/new GET /medecins/new.xml | [
{
"docid": "45d5bbce8212329a49047ac97ed8dcbe",
"score": "0.75168526",
"text": "def new\n @medecin = Medecin.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @medecin }\n end\n end",
"title": ""
}
] | [
{
"docid": "41433d74e36719684775ad2d50c3eabe",
"score": "0.7261847",
"text": "def new\n @new = New.new\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @new }\n end\n end",
"title": ""
},
{
"docid": "0e05e70c91bf29ce0001382f4f9fdf8e",
... |
929d1560d65f349c45eb72a113909e6d | TODO extremely bad style, need to fix it somehow | [
{
"docid": "7a44ad4cce0ea6d82455b19e97027613",
"score": "0.0",
"text": "def add_protocol_for_urls\n URLS.each do |url|\n if self.send(url).present? && self.send(url) != \"\"\n unless self.send(url)[/\\Ahttp:\\/\\//] || self.send(url)[/\\Ahttps:\\/\\//]\n self.send(\"#{url}=\", \"... | [
{
"docid": "ef1e4c0cc26e4eec8642a7d74e09c9d1",
"score": "0.70765495",
"text": "def private; end",
"title": ""
},
{
"docid": "0b8b7b9666e4ed32bfd448198778e4e9",
"score": "0.6257089",
"text": "def probers; end",
"title": ""
},
{
"docid": "d8ae3e2b236950074c4632d180274b8a",
... |
adc2f15899e7da208ea3f199c87f4058 | Display methods colm can be Array [[kn,vn], [kn,vn],...] or number | [
{
"docid": "c62de9ceec88751a04ca1d8fc4d880fc",
"score": "0.0",
"text": "def columns(h, colm = nil, ind = nil, cap = nil)\n return '' unless h\n cary = colm.is_a?(Array) ? colm : Array.new(colm || 2) { [0, 0] }\n lary = upd_column_ary(h, cary).map! { |a| ___mk_line(h, a, cary, ind) }\n ... | [
{
"docid": "96005c0237987ff905caa9fef907d127",
"score": "0.6461797",
"text": "def test13\n show([0,1,0,1])\nend",
"title": ""
},
{
"docid": "403b6d77754177b303285dcbf57b82ae",
"score": "0.62842506",
"text": "def display_method_list(methods)\n page do\n puts \"More than one m... |
74952205f486855dcf4b304405047c4a | Get the text of the command's note | [
{
"docid": "92890ec213cfdc6809712342a9f67761",
"score": "0.80247164",
"text": "def note_text\n command.content_from('ns:note', ns: self.class.registered_ns)\n end",
"title": ""
}
] | [
{
"docid": "f2ffadb77f2d9078e74bf89991dd67b6",
"score": "0.6988323",
"text": "def note(*arg)\n self.descMetadata.get_note\n end",
"title": ""
},
{
"docid": "f2ffadb77f2d9078e74bf89991dd67b6",
"score": "0.69877464",
"text": "def note(*arg)\n self.descMetadata.get_no... |
e8d39a6ecbaaf4868f3cb75cf6fadd7c | Returns RFC2822 compliant string for Time object. For example, Tony Blair's last day in office (hopefully) best_day_ever = Time.local(2007, 6, 27) best_day_ever.to_s => "Wed, 27 Jun 2007 00:00:00 +0100" You can also pass in an option format argument that corresponds to acceptable values according to ActiveSupport's +Ti... | [
{
"docid": "9959bcfe4fc6fd33f9292d5559b28be8",
"score": "0.6176088",
"text": "def to_s(format = nil)\n format ? self.to_formatted_s(format) : self.rfc2822\n end",
"title": ""
}
] | [
{
"docid": "37e00cb39f3530b3a67c327d41cec327",
"score": "0.6909612",
"text": "def calendarable_time_string(time)\n d = time.strftime(\"%A %B %d, %Y\") rescue ''\n t = time.strftime(\"%l:%M %p\") rescue ''\n \"#{d} at #{t}\"\nend",
"title": ""
},
{
"docid": "091a24ec0cce75df54d8267ac1e5c3f... |
863d7adac19adedd98698d326a536481 | PATCH/PUT /stills/1 PATCH/PUT /stills/1.json | [
{
"docid": "307638f91898b7c51e9d161b1b73b508",
"score": "0.0",
"text": "def update\n respond_to do |format|\n if @still.update(still_params)\n format.html { redirect_to @still, notice: 'Still was successfully updated.' }\n format.json { render :show, status: :ok, location: @still }... | [
{
"docid": "04989f2fcc7181dce0f0c659cf847c51",
"score": "0.6303765",
"text": "def update\n respond_to do |format|\n if @stoff.update(stoff_params)\n format.html { redirect_to @stoff }\n format.json { render :show, status: :ok, location: @stoff }\n else\n format.html { r... |
127183007732dc8811349015bb4e7786 | Set the value of the SiteKey input for this Choreo. | [
{
"docid": "fa0881a2c6f5bdbeafdbf5b5c7d6bb33",
"score": "0.7639689",
"text": "def set_SiteKey(value)\n set_input(\"SiteKey\", value)\n end",
"title": ""
}
] | [
{
"docid": "325490f29fd19c572de27de1605d48c1",
"score": "0.603694",
"text": "def site_id=(site_id)\n if !site_id.nil? && site_id < 1\n fail ArgumentError, 'invalid value for \"site_id\", must be greater than or equal to 1.'\n end\n\n @site_id = site_id\n end",
"title": ""
... |
2aa61a53c0680d85ce7b15f0fa75d6ba | return emotion of content | [
{
"docid": "676595aaf1f463b386fd8e0f9f2a2b93",
"score": "0.6886735",
"text": "def contentEmotion\n return @@analyzer.sentiment(@reviewContent)\n end",
"title": ""
}
] | [
{
"docid": "78495c02cce6d432e6380df683d37770",
"score": "0.67610526",
"text": "def emotion\n\t\t\t# get the emotion for which the emotion score value is highest\n\t\t\tif @emotions\n\t\t\t\tget_emotion_score(@emotions, build_term_frequencies)\n\t\t\telse\n\t\t\t\tget_emotion_score(get_term_emotions, bui... |
639592916b960bbf837186b6c2981212 | Returns the length of the buffer's content. source://netssh//lib/net/ssh/buffer.rb79 | [
{
"docid": "875731db3df0cec71bd80b2ca1110bd3",
"score": "0.0",
"text": "def length; end",
"title": ""
}
] | [
{
"docid": "91c228715d6637c53100ce8ffcc0a366",
"score": "0.7574948",
"text": "def buffer_size\n @buffer.size\n end",
"title": ""
},
{
"docid": "c636c7da5f12531c3a69e7f7fe98a0ab",
"score": "0.75463533",
"text": "def size\n @buffer.size\n end",
"title": ""
},
{
... |
a9c7f29d0a960d2e886f0f7a6b5dbdf1 | REQUIRES: m2result to be a valid output returned by M2 in string format. Specifically each knockout combination must be separated by a new line EFFECTS: the result of the M2 calculation is parsed and outputted to the screen | [
{
"docid": "1772f13692a61512a275cee6becc99f9",
"score": "0.6528814",
"text": "def parseoutput(m2result)\n knockouts = Array.new\n m2result.gsub!(\"{\", \"\")\n m2result.gsub!(\"}\", \"\")\n m2result.gsub!(\",\",\"\")\n cnt = 0\n m2result.each_line { |line|\n puts \"<br> <font color=blue> Knock... | [
{
"docid": "eb0587cddb99eb72678014ea08166faa",
"score": "0.5763318",
"text": "def generate_result\n output = \"\"\n @input_data.split(\"\\n\").each do |line|\n line.strip!\n next unless line\n if asked_q = line.match(questions_regex(@measure.foreign_measures.keys, @resource_mgr.reso... |
ede1a944e2c3637ef1c9ffd0024af798 | getter e setter attr_reader :nome apenas getter attr_writter :nome apenas setter | [
{
"docid": "6da681af146d3b5d028c5a405b317e7b",
"score": "0.56320053",
"text": "def initialize(nome)\n @nome = nome\n end",
"title": ""
}
] | [
{
"docid": "1d3eaa95eef7d1e0f3a113cc8d1115d1",
"score": "0.6846069",
"text": "def nombre #getter y Setter\n @nombre\n end",
"title": ""
},
{
"docid": "3e1574f5dc6215e7886af0a17954c78b",
"score": "0.6730011",
"text": "def name=(nombre) #used to be set_name\n @name = nombre\n e... |
fc387628b2b5ac9f2000587c320f278f | POST /timezones POST /timezones.json | [
{
"docid": "1bfd05c092a1fe3d12ed31844fd72fbc",
"score": "0.65058523",
"text": "def create\n @timezone = Timezone.new(params[:timezone])\n\n respond_to do |format|\n if @timezone.save\n format.html { redirect_to @timezone, notice: 'Timezone was successfully created.' }\n format.j... | [
{
"docid": "e080925f05750551d603a1fd172ce582",
"score": "0.66795605",
"text": "def create\n @time_zone = TimeZone.new(params[:time_zone])\n\n respond_to do |format|\n if @time_zone.save\n format.html { redirect_to @time_zone, notice: 'Time zone was successfully created.' }\n for... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "68247e16616602a1ed201fe002114820",
"score": "0.0",
"text": "def set_offer\n @offer = Offer.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;... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "e8a57ee957edf16d5dc2a9dda2802661",
"score": "0.0",
"text": "def set_attempt\n @attempt = Attempt.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... |
08cd976d55ffdb2798c5d780a68e29dd | DELETE /flat/photos/1 DELETE /flat/photos/1.json | [
{
"docid": "fe12115890bcae728b7f178425a45ff2",
"score": "0.7665703",
"text": "def destroy\n @flat_photo.destroy\n respond_to do |format|\n format.html { redirect_to flat_photos_url, notice: 'Photo was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"ti... | [
{
"docid": "88b4ba357dc57343db5b0482c6d20fc3",
"score": "0.7470558",
"text": "def destroy\n @photo.photo.destroy\n @photo.destroy\n respond_to do |format|\n format.html { redirect_to photos_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid"... |
344862a90d3b999fc4be29a5816c168a | GET /empresas/new GET /empresas/new.json | [
{
"docid": "65989a62e2595cd47ec086428302089f",
"score": "0.7837927",
"text": "def new\n @empresa = Empresa.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @empresa }\n end\n end",
"title": ""
}
] | [
{
"docid": "50d0c91e13c834d2d5eb5377e004e3ae",
"score": "0.78852063",
"text": "def new\n @empleado = Empleado.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @empleado }\n end\n end",
"title": ""
},
{
"docid": "c6de0c829e4a7409971a... |
b1732e575c523f14b1304a7ee90c26ff | Fetches all card sets | [
{
"docid": "10935231798ff14879e81a00da22e08f",
"score": "0.7619269",
"text": "def card_sets\n load_cards_data['sets']\n end",
"title": ""
}
] | [
{
"docid": "95124a0a5a51519e6cd75622c3a3499a",
"score": "0.70238703",
"text": "def connect_cards_to_sets\n CardSet.all.each { |card_set|\n card_set.cards = []\n\n set_code = card_set.code\n\n cards = Card.where(set_code: set_code)\n\n card_set.cards << cards\n }\nend",
"title": ""
},... |
b44cf63b5cbc8b281da6eab5722b03c6 | PUT /ldap_auth_headers/1 PUT /ldap_auth_headers/1.xml | [
{
"docid": "f19ba2edd86577c8541334ee1cb7a86b",
"score": "0.67583567",
"text": "def update\n @ldap_auth_header = Irm::LdapAuthHeader.find(params[:id])\n\n respond_to do |format|\n if @ldap_auth_header.update_attributes(params[:irm_ldap_auth_header])\n format.html { redirect_to({:action ... | [
{
"docid": "cf53c0019841a6b5737e0481ab808ff2",
"score": "0.6144818",
"text": "def destroy\n @ldap_auth_header = Irm::LdapAuthHeader.find(params[:id])\n @ldap_auth_header.destroy\n\n respond_to do |format|\n format.html { redirect_to(ldap_auth_headers_url) }\n format.xml { head :ok }\n... |
f407c9f89c6e85a257b8aa32db62ef4c | Writes the temporary file out to either a file location (by passing in a String) or by passing in a Stream that you can write(chunk) to repeatedly | [
{
"docid": "8adc6ea6841c1c64ca9ad9bb5bf14f0f",
"score": "0.0",
"text": "def write(output_to); end",
"title": ""
}
] | [
{
"docid": "99241441e1fd907266397f3c3e5a3c55",
"score": "0.62920505",
"text": "def write_temp_file(contents, prefix: 'tempfile')\n t = Tempfile.new prefix\n t.write contents\n t.close\n\n @tempfile_hospital << t\n # Mason 2016-03-15: You MUST keep a ref to a Tempfile-created t... |
0d16cb2a60b240fbb0b27662d2632475 | next few methods are for updating/editing course | [
{
"docid": "2c530619b635b6bf0e8219ebb0221ffe",
"score": "0.0",
"text": "def get_course_params\n course_params = params.require(:course)\n if !empty_new_end_qual\n course_params = course_params.except(:end_qualification_id)\n end\n if !empty_new_del_mode\n course_params = course_par... | [
{
"docid": "0809285342996484ea444582cf492179",
"score": "0.7805154",
"text": "def edit\n set_student\n @courses = Course.all\n end",
"title": ""
},
{
"docid": "8e8b77df1d60a84610315939c5387a56",
"score": "0.76788527",
"text": "def edit #this action allow admin to edit single c... |
8fc0b4db51b953b730a5985c0bf4e540 | Gets the the value of a config entry ==== Parameters key:: The key of the config entry value we want | [
{
"docid": "6255af174ccebd65447e79495b745ff3",
"score": "0.0",
"text": "def [](key)\n (@configuration ||= setup)[key]\n end",
"title": ""
}
] | [
{
"docid": "d92637d156a20ed79afb9c448220b279",
"score": "0.8130019",
"text": "def get(key)\n val = connection.protocol::ConfigGet.new(params(config_key: key)).process(connection)\n val[:config_value]\n end",
"title": ""
},
{
"docid": "3dfc8eeacda94d68e438a8714d124449",
... |
7e5d15c2079cff2d2b88d05ab25e00e1 | Sort an array of objects input the object array property property within each object to filter by nils ('first' | 'last') nils appear before or after nonnil values Returns the filtered array of objects | [
{
"docid": "d9d54d9593630c25e2990496544d6393",
"score": "0.610763",
"text": "def sort(input, property = nil, nils = \"first\")\n if input.nil?\n raise ArgumentError, \"Cannot sort a null object.\"\n end\n if property.nil?\n input.sort\n else\n if nils == \"first\... | [
{
"docid": "364c803486049d05c49aee534ce3cf1d",
"score": "0.611928",
"text": "def sort(input, property = nil, nils = \"first\")\n raise ArgumentError, \"Cannot sort a null object.\" if input.nil?\n\n if property.nil?\n input.sort\n else\n case nils\n when \"first\"\n ... |
1097a7e7758f08d32addfc88ea3fdcab | GET /users GET /users.json | [
{
"docid": "876820cd4580ba7dd365f4c418ab2a07",
"score": "0.0",
"text": "def index\n @users = User.all\n\n employee = OkrRole.find_by(name: \"Employee\")\n team_lead = OkrRole.find_by(name: \"Team Lead\")\n admin = OkrRole.find_by(name: \"Admin\")\n\n @employees = OkrUserRole.where(okr_rol... | [
{
"docid": "9f7c735ace683c5c2b12c914cc9ad8a8",
"score": "0.84081405",
"text": "def get\n users = User.all.as_json\n render(json: users.as_json, status: :ok)\n end",
"title": ""
},
{
"docid": "543509c6588e2f79a8dbcd1cdcdaf7b9",
"score": "0.836071",
"text": "def users\... |
ee27b619a9c7700ed5c1520837f0526d | Alphabetically Sorted with 'Other' always at the bottom | [
{
"docid": "9d209badb2e0e994d8ed2cd3c237b405",
"score": "0.0",
"text": "def <=>(other_category)\n if name == 'Other'\n 1\n elsif other_category.name == 'Other'\n -1\n else\n name <=> other_category.name\n end\n end",
"title": ""
}
] | [
{
"docid": "b283ff9b329cabdcbb99cc9898e5d307",
"score": "0.70979005",
"text": "def sort_order\n if ministry_or_title == 'Prime Minister'\n 'AAAAA' # force first\n else\n ministry_or_title\n end\n end",
"title": ""
},
{
"docid": "396f2144345bfbcf4f56904d1134de76",
"sco... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "e748346e7e90f7fe0b64f4391a48d11e",
"score": "0.0",
"text": "def career_subject_params\n params.fetch(:career_subject, {})\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.69792545",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6781151",
"text": "def strong_params\n params.requ... |
74a8f7d747be5100921fa66edf31bb93 | Create a new RDS instance from a pointintime system snapshot. The target database is created from the source database restore point with the same configuration as the original source database, except that the new RDS instance is created with the default security group. | [
{
"docid": "7a7ca1d14ea3b9c5d70fdb88361a8584",
"score": "0.5983158",
"text": "def restore_db_instance_to_point_in_time(instance_aws_id, new_instance_aws_id, restore_time)\n request_hash = { 'SourceDBInstanceIdentifier' => instance_aws_id,\n 'TargetDBInstanceIdentifier' => new_... | [
{
"docid": "05ec74c1f5034f2652882292692a3324",
"score": "0.7770507",
"text": "def create_tmp_rds_from_snapshot\n unless @new_instance\n update_status \"Waiting for snapshot #{@snapshot_id}\"\n @snapshot.wait_for { ready? }\n update_status \"Booting new RDS #{@new_rds_id} from s... |
3396e4df9852013a7a475c21852560a5 | PUT /st_uses/1 PUT /st_uses/1.xml | [
{
"docid": "00ff69d14c7046c524f3bd87823ef2b6",
"score": "0.0",
"text": "def update\r\n @st_use = StUse.find(params[:id])\r\n return_url = ''\r\n if params[:arrow]\r\n if params[:arrow] == 'next'\r\n return_url = st_end_of_life_path(@st_use.st_product) \r\n end\r\n ... | [
{
"docid": "fbd7c46b15ae2792fd842ba0d764b7d0",
"score": "0.6108941",
"text": "def put uri, args = {}; Request.new(PUT, uri, args).execute; end",
"title": ""
},
{
"docid": "a48b3229e830876ae619b936301400b2",
"score": "0.6105407",
"text": "def put(url, xml, version = nil)\n req ... |
fa9da7f9df52876e2515cabbbe9f7d13 | A list of the param names that can be used for filtering the Product list | [
{
"docid": "36c306461d723c686f8215d83ae71cbd",
"score": "0.6153985",
"text": "def filtering_params(params)\n params.slice(:status, :location, :starts_with)\n end",
"title": ""
}
] | [
{
"docid": "e08f0ad73ff66d4583c09b6e0b9c7f7e",
"score": "0.71184033",
"text": "def filtering_params(params)\n\t params.slice(:brand, :grcid, :platform, :environment)\n\tend",
"title": ""
},
{
"docid": "4a8e923066a524dd484235066440d455",
"score": "0.70020515",
"text": "def filtering_... |
e9a573d61965d515df83eb8e39dc96b1 | convenience 3 lines to 1 | [
{
"docid": "6604144f900f58a69990f30c9882d646",
"score": "0.0",
"text": "def admin_stats_results(opts = {})\n # Actually use Admin::Stats but with canned inputs;\n # We could stub canned results, but we would actually\n # like tests to break if something about Admin::Stats\n # shifts out from... | [
{
"docid": "8bbe12182de705bfd88819c4c85c78a4",
"score": "0.64121443",
"text": "def project_to_line\n end",
"title": ""
},
{
"docid": "c16a81bc8344d4e4873df13219eb5974",
"score": "0.6090608",
"text": "def single_line?; end",
"title": ""
},
{
"docid": "c44f719a13703c13e5... |
3364bbcfe8f3dae5cd5b86ed986c870f | Uploads previously generated json file to the PhraseApp branch. | [
{
"docid": "f1d571872e490b6f342eb2a30731d929",
"score": "0.64958584",
"text": "def push_keys\n project = WdProject.new\n translations_new_path = project.translations_new_path\n translations_path = project.translations_path\n\n if !File.exist?(translations_new_path) || !File.exist?(translatio... | [
{
"docid": "221cc2d6806946a385516f3f2af0456b",
"score": "0.6214727",
"text": "def upload_project_inspec_json_file(file, current_user)\n project_json = JSON.parse(File.read(file.path))\n upload_project_inspec_json(project_json, current_user)\n end",
"title": ""
},
{
"docid": "ac21ac0f4... |
f94b7a1cd9003b52b5d3263b01a6ecc2 | Use callback to share commom setup or constrains between actions. | [
{
"docid": "4ff571381734dcf825b05a9f39276d5b",
"score": "0.0",
"text": "def set_contact\n @contact = Contact.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "8315debee821f8bfc9718d31b654d2de",
"score": "0.60119045",
"text": "def initialize(*args)\n super\n @action = :setup\nend",
"title": ""
},
{
"docid": "8315debee821f8bfc9718d31b654d2de",
"score": "0.60119045",
"text": "def initialize(*args)\n super\n @action = :setup\ne... |
3b7c44a68f3a823619e0dd42579770f6 | Get a reference to an operand by index. | [
{
"docid": "264e82534aa86fce9f16e20a641b2ef7",
"score": "0.5878733",
"text": "def [](i)\n ptr = C.LLVMGetOperand(@user, i)\n Value.from_ptr(ptr) unless ptr.null?\n end",
"title": ""
}
] | [
{
"docid": "8b25ecd4b8966a91851b74d7e17b4a2c",
"score": "0.7836767",
"text": "def operand(index = 0)\n operands[index]\n end",
"title": ""
},
{
"docid": "24693211d2637efea41c613a3628d063",
"score": "0.6604929",
"text": "def []( index )\n reg = to_reg()\n reg[index]\... |
1c3f11476013875364aae71648a84de4 | DELETE /lovedones/1 DELETE /lovedones/1.json | [
{
"docid": "306f2324c9f4850ad24806d314676d65",
"score": "0.7111703",
"text": "def destroy\n @lovedone.destroy\n respond_to do |format|\n #refresh \n format.html { redirect_to lovedones_url, notice: 'Loved one has been successfully deleted.' }\n format.json { head :no_content }\n ... | [
{
"docid": "689d5a07a403c4b765ba178e4aff08a3",
"score": "0.70906615",
"text": "def delete\n client.delete(\"/#{id}\")\n end",
"title": ""
},
{
"docid": "ad869cabd292370060e08716faad4645",
"score": "0.6996684",
"text": "def destroy\n @lovedone.destroy\n respond_to do |fo... |
c65b564513830d8a6b9a4eb3ad3318b6 | Internal: Outputs the specified argument to the configured stdout object and exits with the specified exit code. s The String to output. exit_code The Integer exit code. Examples ui.output_and_exit 'something went wrong', 99 ui.output_and_exit 'all done', 0 Returns nothing. | [
{
"docid": "09519cfb24839a11d5611722992a38a7",
"score": "0.83069754",
"text": "def output_and_exit(s, exit_code)\n output s\n exit exit_code\n end",
"title": ""
}
] | [
{
"docid": "e0a65f66853f70f6b58e1133cbe16e0b",
"score": "0.5957457",
"text": "def error_and_out(msg)\n puts \"#{msg}\\n\"\n exit\nend",
"title": ""
},
{
"docid": "e0a65f66853f70f6b58e1133cbe16e0b",
"score": "0.5957457",
"text": "def error_and_out(msg)\n puts \"#{msg}\\n\"\n exit\... |
934ddc016caadef4f73cbbe0006d6691 | This challenge took me [.4] hours. Pseudocode Create a method to count each number on the array. Create an empty container to house the results. If the number is divisible by 15, call FIZZ BUZZ!!!! If a number is divisible by 3, call out Fizz! If a number is divisible by 5 then call out Buzz! Else return the number. In... | [
{
"docid": "5053d07ef5fc2181d1dded5f9dfa938c",
"score": "0.8468858",
"text": "def super_fizzbuzz(array)\n array.map! {|num| puts \"#{'Fizz' if num % 3 == 0}#{'Buzz' if num % 5 == 0}#{num if num % 5 != 0 && num % 3 != 0}\"}\nend",
"title": ""
}
] | [
{
"docid": "97c7b4b49f2d2e38f8c0c3714971f371",
"score": "0.9032904",
"text": "def super_fizzbuzz(array)\n array.map! do |num|\n if (num % 3 == 0 && num % 5 == 0 && num % 15 == 0)\n \"FizzBuzz\"\n elsif (num % 3 == 0)\n \"Fizz\"\n elsif (num % 5 == 0)\n \"Buzz\"\n... |
e062217f132006294c8346a412287df6 | returns Array of dates | [
{
"docid": "233e973a9e788f17e628ab077c1e97c4",
"score": "0.0",
"text": "def required_dates\n required_dates_count.keys.select { |d| required_dates_count[d] == marks.required.count }.uniq\n end",
"title": ""
}
] | [
{
"docid": "14622224e2454f0ce6f5107b8a20feff",
"score": "0.8462983",
"text": "def dates_array\n start_date = self.start_date.to_date\n end_date = self.end_date.to_date\n array = Array.new\n return array if end_date<start_date\n (start_date..end_date).each do |i|\n array << i if self.... |
41658fa46e6a15b8ae1d0d30ae4f67c5 | prints order, gets passed an array of instances of class lunch_item | [
{
"docid": "ce45c8dee5ddba5d6ddbc359380d3a91",
"score": "0.71692836",
"text": "def print_order(order)\n\tputs \"Here are the items you've ordered:\"\n\torder.each {|food| puts \"#{food.item}: $#{food.price}\\n\\tcalories: #{food.calories}\\tfat: #{food.fat} g\\tcarbs: #{food.carbs} g\"}\nend",
"titl... | [
{
"docid": "1fb5a6f70b4699814787c80dd2ded2b0",
"score": "0.6545576",
"text": "def print_lunch_orders\n @restaurants_used.collect{ |restaurant| restaurant.filled_orders_sentence }.join(', ')\n end",
"title": ""
},
{
"docid": "9a936f073ec0738ef1cdce3df92a78af",
"score": "0.650756",
... |
d74499e356da3f5afe0282365011e760 | Returns the parameters for the search. | [
{
"docid": "a61b63f09178720be4359b8f54f7fe0c",
"score": "0.0",
"text": "def search_params\n params.permit(:title, :description, :page, :filter)\n end",
"title": ""
}
] | [
{
"docid": "7d93f3ef672c19be3de25af2ef794f24",
"score": "0.8044792",
"text": "def search_params\n # TODO Configurar acá la variable params\n params[:query_name]\n end",
"title": ""
},
{
"docid": "60a6864b685162aff39c45d77403cda2",
"score": "0.78738123",
"text": "def sear... |
5d5f8c98bf8f3a65886cee8682f15085 | UNIT TEST FOR METHOD print_output Method uses prospector_num as the Rubyist when printing | [
{
"docid": "8c7cdb640ba76827f20a66d0a3a61d13",
"score": "0.8271048",
"text": "def test_print_output\n p = Prospector.new(1, 1, 1)\n p.initial_vals\n p.days = 10\n p.real_ruby_count = 4\n p.fake_ruby_count = 2\n def p.day_form(num); 'days'; end\n def p.ruby_form(num); 'rubies'; end\n... | [
{
"docid": "762b7441b4594db2c3144c29f62213d6",
"score": "0.7053623",
"text": "def test_print_results\n @d.books = 6\n @d.dinos = 11\n @d.classes = 4\n assert_output(\"Driver 1 obtained 6 books!\\nDriver 1 obtained 11 dinosaur toys!\\nDriver 1 attended 4 classes!\\n\") { @d.print_results }\n ... |
2a7fd334df98c9424e70bc43b7358894 | GET /day_of_weeks GET /day_of_weeks.json | [
{
"docid": "774baa3493f1745565fc51b00d8433fb",
"score": "0.7144042",
"text": "def index\n @day_of_weeks = DayOfWeek.all\n end",
"title": ""
}
] | [
{
"docid": "3da85f29df1dc5f725acc21329064903",
"score": "0.70251",
"text": "def index\n @day_weeks = DayWeek.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render :json => @day_weeks }\n end\n end",
"title": ""
},
{
"docid": "61bf5c467ee5b87... |
5026a40338581b26a8118487c3bc305e | Indicate whether the value could be a valid id_column value. | [
{
"docid": "3d8ae4fc2f357d9cb75d611d9eaf4abc",
"score": "0.6816705",
"text": "def valid_id?(value)\n value.is_a?(String) && value.match?(UUID_PATTERN)\n end",
"title": ""
}
] | [
{
"docid": "83832a224a63a33c8236dd8ebceb8fcf",
"score": "0.7906277",
"text": "def valid_id?(value)\n digits_only?(value)\n end",
"title": ""
},
{
"docid": "b56dfb8c1e01ce51c14d9ac3de0c3d67",
"score": "0.6979682",
"text": "def is_id?(key)\n key =~ /^[A-Z0-9]+$/\n ... |
709feee374a53b5e7af9fc415c17d513 | GET /job_scope_additions GET /job_scope_additions.xml | [
{
"docid": "93cde45eb7266e22697125e0db8e7cfd",
"score": "0.64164305",
"text": "def index\n @job = Job.find(params[:jid]) if params[:jid] and Job.exists?(params[:jid])\n redirect_to jobs_path unless @job\n @job = Job.find(params[:jid]) if params[:jid] and Job.exists?(params[:jid])\n redirect_... | [
{
"docid": "d425d04fe7e60bc15f7cc6e9f9edd9d3",
"score": "0.5893007",
"text": "def show\n @job_scope_addition = JobScopeAddition.find(params[:id])\n @job = Job.find(@job_scope_addition.jobs_id) if @job_scope_addition.jobs_id and Job.exists?(@job_scope_addition.jobs_id)\n redirect_to jobs_path un... |
e09c4d358c5f01e26296a14430186343 | Sat Dec 4 01:40:54 IST 2010, ramonrails TODO: DRY this up | [
{
"docid": "95b21b1a4fc081edeae0bd890de4340b",
"score": "0.0",
"text": "def create_caregiver_profile\n @user = User.new(params[:user])\n @profile = Profile.new(params[:profile])\n @user.profile = @profile\n @senior = User.find(params[:patient_id].to_i) # senior variable is used in view\n\n ... | [
{
"docid": "b29effc1dbbc52c623e184beb9360927",
"score": "0.5363124",
"text": "def date; end",
"title": ""
},
{
"docid": "b29effc1dbbc52c623e184beb9360927",
"score": "0.5363124",
"text": "def date; end",
"title": ""
},
{
"docid": "b29effc1dbbc52c623e184beb9360927",
"sc... |
61c89fe86fa279e1cc341a74a40b358d | Deserializes the data based on type | [
{
"docid": "066e02b1b508e031c4498718d5f0b7af",
"score": "0.0",
"text": "def _deserialize(type, value)\n case type.to_sym\n when :DateTime\n value\n when :Date\n value\n when :String\n value.to_s\n when :Integer\n value.to_i\n when :Float\n ... | [
{
"docid": "36a7ecd8f09e91284f3ff814815f745d",
"score": "0.8231654",
"text": "def deserialize(data, type = nil)\n serializer(type).deserialize(data)\n end",
"title": ""
},
{
"docid": "36a7ecd8f09e91284f3ff814815f745d",
"score": "0.8231654",
"text": "def deserialize(data, type = n... |
315373109b4331bc88b9f38688760ceb | Returns the value of the `display` attribute. | [
{
"docid": "40cada2e53dcaf8c629e510a3b1917c2",
"score": "0.7034402",
"text": "def display\n @display\n end",
"title": ""
}
] | [
{
"docid": "ae027ea93cd05f397b1effc705590a0c",
"score": "0.89460725",
"text": "def display\n @attributes[:display]\n end",
"title": ""
},
{
"docid": "ae027ea93cd05f397b1effc705590a0c",
"score": "0.89460725",
"text": "def display\n @attributes[:display]\n end",
"ti... |
f7e687125f48f4ee3a9a0dfd809f97f1 | Responds to `GET /units` | [
{
"docid": "b79eb4cc45de19af4424066eb9a4e669",
"score": "0.593217",
"text": "def index\n @units = Unit.search.\n institution(current_institution).\n include_children(false).\n order(\"#{Unit::IndexFields::TITLE}.sort\").\n limit(9999)\n end",
"title": ""
}
] | [
{
"docid": "fc7c68e5bca78316e4acf7a60b0eb56f",
"score": "0.8063973",
"text": "def foods_units\n get('/foods/units.json')\n end",
"title": ""
},
{
"docid": "78d2ec54867c1fe4cc267fbdfd791a1f",
"score": "0.7458431",
"text": "def index\n response = HTTParty.get(\"https://casa-... |
7bf0429c4fec1cedee83ee268e3f479d | POST /awards POST /awards.json | [
{
"docid": "6e1233bdb98d9a17cb1bffb072537add",
"score": "0.6204529",
"text": "def create\n @award = Award.new(award_params)\n\n respond_to do |format|\n if @award.save\n format.js { render json: @award }\n else\n format.js { render json: { error: @award.errors } }\n en... | [
{
"docid": "a63a937795bdb94343290d5157dcf5f6",
"score": "0.6676492",
"text": "def create\n @award = Award.new(params[:award])\n\n respond_to do |format|\n if @award.save\n format.html { redirect_to @award, notice: 'Award was successfully created.' }\n format.json { render json: ... |
00b928889e2f1ca57a145715eddf389b | intenta ingresar al sistema con el usuario y la clave enviados | [
{
"docid": "8c4957d8c9b0453f7401300afdab3625",
"score": "0.66081196",
"text": "def ingresar(usuario, clave)\n\t\t@manejador.ingresar(usuario, clave)\n\tend",
"title": ""
}
] | [
{
"docid": "2ede030cd6875193024a092b02c2aba1",
"score": "0.6271733",
"text": "def almacenarUsuario(usuario,nombreContenedor)\n\tsystem(\"sudo mysql -u root -p password\")\n\tsystem(\"insert into usuarios values(\"+usuario.to_s+\",\"+nombreContenedor.to_s)\n\tsystem(\"exit\")\t\t\nend",
"title": ""
... |
15b3c16715595195e7ad8b0c4bd94669 | Relative right xcoordinate of the bounding box. (Equal to the box width) Example, position some text 3 pts from the right of the containing box: draw_text('hello', :at => [(bounds.right 3), 0]) | [
{
"docid": "83d3cc30ab19d89ceb48762e1deef232",
"score": "0.5822345",
"text": "def right\n @width\n end",
"title": ""
}
] | [
{
"docid": "6c60af0de351e18a0a34dd7c6ce26854",
"score": "0.73517346",
"text": "def absolute_right\n @x + width\n end",
"title": ""
},
{
"docid": "6e47ccae4f3f500dc34db929d53f1b0b",
"score": "0.7190032",
"text": "def right\n `#{client_rect}.right` + Window.scroll_x\n ... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "568106d992a6dbc73d3be8ee4c321df2",
"score": "0.0",
"text": "def set_ticket\n @ticket = Ticket.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... |
0af764cf9f02f766a96d26c35f4e9a58 | Subject can be set in your I18n file at config/locales/en.yml with the following lookup: en.request_notifier.new.subject | [
{
"docid": "d9fa38fc841bf30cfc1c9bef785e71b5",
"score": "0.0",
"text": "def new(request)\n @request = request\n mail to: \"makcyxa-k@yandex.ru\", subject: 'Новая заявка на курсы'\n end",
"title": ""
}
] | [
{
"docid": "8928fe4f050d7ebd3e9aa992b07e320a",
"score": "0.7627524",
"text": "def subject_for\n ActiveSupport::Deprecation.warn \"subject_for\"\n I18n.t(:\"subject\", scope: [:notifications, :mailer],\n default: [:subject])\n end",
"title": ""
},
{
"docid": "... |
f21c2525d67838b044e03113d95caf71 | PATCH/PUT /stekkers/1 PATCH/PUT /stekkers/1.json | [
{
"docid": "4f218fa3564eafef9d18d450a63cf1b6",
"score": "0.66942555",
"text": "def update\n respond_to do |format|\n if @stekker.update(stekker_params)\n format.html { redirect_to @stekker, notice: 'Stekker was successfully updated.' }\n format.json { render :show, status: :ok, loc... | [
{
"docid": "9c2cbbd30376aa32e597de89481e9a1a",
"score": "0.643386",
"text": "def update\n @stiker = Stiker.find(params[:id])\n\n respond_to do |format|\n if @stiker.update_attributes(params[:stiker])\n format.html { redirect_to @stiker, notice: 'Stiker was successfully updated.' }\n ... |
3a451ed0b10b2ef655b66fcdf05972bc | GET /psp_diagrams_to_ps_perimeters GET /psp_diagrams_to_ps_perimeters.json | [
{
"docid": "23e894175d300d1bb83612da4e84a9b4",
"score": "0.6025304",
"text": "def index\n if current_user.admin\n @psp_diagrams_to_ps_perimeters = PspDiagramsToPsPerimeter.all\n else \n redirect_to \"/ps_perimeters\", notice: 'Page not available.'\n end\n end",
"title": ""
}
] | [
{
"docid": "a8ff7e8f76b0cbf6df67fac749de68c7",
"score": "0.621965",
"text": "def set_psp_diagrams_to_ps_perimeter\n @psp_diagrams_to_ps_perimeter = PspDiagramsToPsPerimeter.find(params[:id])\n end",
"title": ""
},
{
"docid": "afc3c9c96c5418034d330ce8af720d5b",
"score": "0.5715613... |
8eaee9de6e04ca5f39406a54ba7ba7cc | GET /group_user_rels/new GET /group_user_rels/new.json | [
{
"docid": "3773d554cdade82abe9d53c1707a51c5",
"score": "0.772877",
"text": "def new\n @group_user_rel = GroupUserRel.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @group_user_rel }\n end\n end",
"title": ""
}
] | [
{
"docid": "2a54e4deda9c1b8dfce97f6a2d53976d",
"score": "0.709764",
"text": "def new\n @user = User.find(params[:user_id])\n @groups = @user.groups.new\n\n #@group = Group.new\n \n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @group }\n end\n... |