query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
b6b5baefad9b24828bbb4a0ab67817f7 | Defines an example within a group. This is the primary API to define a code example. | [
{
"docid": "5e23fe9bf582c932a551165c23d3635a",
"score": "0.0",
"text": "def it(*all_args, &block); end",
"title": ""
}
] | [
{
"docid": "1f4de66b0d57b9580ff74bc571bcd79e",
"score": "0.74435675",
"text": "def on_example_group_definition(&block); end",
"title": ""
},
{
"docid": "d9827cc15478a4fc2332c55496058824",
"score": "0.7312394",
"text": "def example(example) #:doc:\n return unless Apipie.active_ds... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "41a302cae0b268146ebcb618533d7b28",
"score": "0.0",
"text": "def good_vibe_params\n params.require(:good_vibe).permit(:ReplayName, :ReplayDate)\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... |
bea5c5a126012cd75c349d6b506d55c9 | This method clones matrix but replaces all ones to be zero | [
{
"docid": "11892c2c51c8495d777f748885d14537",
"score": "0.7484406",
"text": "def blank_matrix(matrix)\n matrix.map do |element_array|\n element_array.map {|element| element = 1 ? element = 0 : element = 0 }\n end\n end",
"title": ""
}
] | [
{
"docid": "016690f31a1ae517534604c40faf0803",
"score": "0.79630536",
"text": "def zero_matrix\n @zeroed_rows = Set.new\n @zeroed_cols = Set.new\n matrix = @matrix.dup\n\n find_zeros\n zeroize_rows(matrix)\n zeroize_cols(matrix)\n\n Matrix.new matrix\n end",
"title": ""
},
... |
797a9562fbd4d2ca0c2c1f540150c6d9 | handle states with id of 0 | [
{
"docid": "c2a9ea65fea4c38e922ec019bfb9de99",
"score": "0.0",
"text": "def state(*args)\n self.province_id == 0 ? ::State.new : self.state_assoc(*args)\n end",
"title": ""
}
] | [
{
"docid": "ae90577dab7f0205f4f6c60274064799",
"score": "0.6817661",
"text": "def flag(id) $state.flag(id) end",
"title": ""
},
{
"docid": "70415d3a48f8a80e82e508b393757136",
"score": "0.67326736",
"text": "def add_state(id)\n raise IdInUseError.new(id) if has_id? id\n @ids[id]... |
c8d03046185a0996dc9d49ac1083eace | GET /admin/products/1 GET /admin/products/1.json | [
{
"docid": "70bee36aa27f389744745a897d057a80",
"score": "0.0",
"text": "def show\n authorize_action_for @product, at: current_store\n end",
"title": ""
}
] | [
{
"docid": "d30b809ea8ef4797a38807a3f9f4af0e",
"score": "0.7930608",
"text": "def index\n @admin_products = Product.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @admin_products }\n end\n end",
"title": ""
},
{
"docid": "9e0603... |
b871c57ba3e59323352789aa83b6c902 | Created 2/19/20 by Linda Wang Used when loading the image upon initialization | [
{
"docid": "9cd5aa76e834e656dc96e2c1a04e3073",
"score": "0.7005271",
"text": "def load_image\n\n File.open \"./Assets/#{@event[:type]}.PNG\", 'rb' do |io|\n image = FXPNGImage.new app, io.read\n image.scale 170, 130, 1\n image.create\n @event_image.image = image\n end\n\n end"... | [
{
"docid": "28e28a420b08b8d7b17f04b1b8225489",
"score": "0.73128045",
"text": "def set_realimage\n end",
"title": ""
},
{
"docid": "527cc8aa391a9702ef256509f67892bb",
"score": "0.70113134",
"text": "def image_src; end",
"title": ""
},
{
"docid": "4e8f04e01e725ddd0e902d... |
ad2189bd7f353dbe47b7cc1d6bf12ba8 | this method shows all the images availble in the document | [
{
"docid": "4ed8b0d788c24261ae2d317c3034887f",
"score": "0.86004424",
"text": "def show_images\n doc = document\n index=1\n doc.images.each do |l|\n puts \"image: name: #{l.name}\"\n puts \" id: #{l.invoke(\"id\")}\"\n ... | [
{
"docid": "ca2540fcad13e4d025eb7887ea051b92",
"score": "0.86343855",
"text": "def show_images\n doc = document\n index = 1\n doc.images.each do |l|\n puts \"image: name: #{l.name}\"\n puts \" id: #{l.invoke(\"id\")}\"\n ... |
e665d1d03f21694f292f280a706ff190 | Two things can happen when signing in. 1. The current user has no email: this happens on LDAP registration. In this case, the user will be asked to submit an email. 2. If the signin action was triggered trying to access a specific page go back to it 3. Or go to the root url. | [
{
"docid": "383d0e54d28b9b5896f415d55bc0be20",
"score": "0.0",
"text": "def after_sign_in_path_for(resource)\n current_user.email? ? super : edit_user_registration_path\n end",
"title": ""
}
] | [
{
"docid": "30f7e5c976d02cfdfbf03d0a4b4acaa9",
"score": "0.7500356",
"text": "def signin\n if signin?\n redirect_to_home_page(@current_user)\n else\n if request.get?\n else\n email = params[:email]\n password = params[:password]\n @user = User.authenticate(email... |
ba87663f899adafbbd0071ac19d7a727 | Display form for updating an existing user | [
{
"docid": "f19d3319fa45373ab7da9fb5d3660ba9",
"score": "0.72504514",
"text": "def edit\n\t\t@user = User.find(params[:id])\n\tend",
"title": ""
}
] | [
{
"docid": "bd50cb0454e25ca943e3266f57c1ed6d",
"score": "0.7815343",
"text": "def edit\n\t# pull user info and display form template\n\t\t@this_user = User.find_by(id: params[:id])\n\tend",
"title": ""
},
{
"docid": "65e0843ac96b735b95a1f3d9969f7ca5",
"score": "0.7799423",
"text": "d... |
061a25cdae14514e16cfe02b135d4b0f | Create Tax Code X Ref | [
{
"docid": "634700a7d0861edfad2a14c859e107b9",
"score": "0.57936513",
"text": "def finance_tax_codes_id_tax_code_x_refs_post(id, tax_code_x_ref, opts = {})\n data, _status_code, _headers = finance_tax_codes_id_tax_code_x_refs_post_with_http_info(id, tax_code_x_ref, opts)\n return data\n end... | [
{
"docid": "90047fe97bd5e457db07b5bbfe0aa483",
"score": "0.6824101",
"text": "def xml_tax_preparer(xml,ver)\n xml.tag!(\"ITRForm:TaxReturnPreparer\") {\n xml.tag!(\"ITRForm:IdentificationNoOfTRP\", ver.identificationNoOfTRP)\n xml.tag!(\"ITRForm:NameOfTRP\", ver.nameOfTRP)\n ... |
99d10c2108c4a851a416063a2f33b378 | Does the file currently exist? Just checks for whether we have a stat | [
{
"docid": "461fc23af68f700da7d5b971ae02b880",
"score": "0.8053684",
"text": "def exist?\n stat ? true : false\n end",
"title": ""
}
] | [
{
"docid": "c69c51e641fee6c016747da6ffe6173a",
"score": "0.827967",
"text": "def file_exists?\n !!file_path\n end",
"title": ""
},
{
"docid": "c69c51e641fee6c016747da6ffe6173a",
"score": "0.82796633",
"text": "def file_exists?\n !!file_path\n end",
"title"... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "b203a803edd52d36c7c16c7d408d7118",
"score": "0.0",
"text": "def watchlist_params\n params.require(:watchlist).permit(:list)\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... |
bef578329fc0677b61f6759f654ea266 | before_action :authenticate_user!, except: [:index, :show] | [
{
"docid": "fc2c04a17657740df9a6d2af73e9a74c",
"score": "0.0",
"text": "def index\n\t\t@temas = Tema.all\n\tend",
"title": ""
}
] | [
{
"docid": "70e6de9333996c0dc4e57b87f1bb0114",
"score": "0.787432",
"text": "def authorize_index\n unless (current_user == @user)\n redirect_to root_path\n end\n end",
"title": ""
},
{
"docid": "3e1812d4f323743eaaa85e02e131251b",
"score": "0.7707732",
"text": "def show\n ... |
e1301fcdd54774a53c477604874f5672 | POST /pastes POST /pastes.xml | [
{
"docid": "aede20ab345d851825b09f047a0a4df5",
"score": "0.550624",
"text": "def create\n @paste = Paste.new(params[:paste])\n @parsers = Parser.all(:order => 'display_name')\n\n respond_to do |format|\n if @paste.code.blank?\n format.html {\n render :action => \"new\"\n ... | [
{
"docid": "103c8ec04e7ab4ea96668b0ca5a3e3f1",
"score": "0.6422322",
"text": "def create\n @paste = Paste.new(params[:paste])\n\n respond_to do |format|\n if @paste.save\n flash[:notice] = 'Paste was successfully created.'\n format.html { redirect_to(@paste) }\n format.xm... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "08bbe94530338561098c36f29ff38f9f",
"score": "0.0",
"text": "def znajdz_ksiazka\n @ksiazka = Ksiazka.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... |
86e1dbe67faf054e8c37d875ec8be49c | Unite the result so it wouldn't matter what coverage type was called | [
{
"docid": "b4b83d2053a9370b50d3f3a7ca4893ad",
"score": "0.59529376",
"text": "def adapt_coverage_result\n @result = SimpleCov::ResultAdapter.call(Coverage.result)\n end",
"title": ""
}
] | [
{
"docid": "53cdb3647b5e76ca6e9ffc5ffc4aedcb",
"score": "0.67880714",
"text": "def adapt_coverage_result; end",
"title": ""
},
{
"docid": "94cbb369bf4fca656348fdb066629266",
"score": "0.61053246",
"text": "def process_coverage_result; end",
"title": ""
},
{
"docid": "a7e4... |
5e99555f654153733f213958d5075283 | Holds +element+ which is going to be animated in +seconds+ seconds, the attributes to animate and the callback | [
{
"docid": "d7a7f6acbf2609a09b1ba927e774a7fa",
"score": "0.6598059",
"text": "def initialize(element, seconds = 0, attributes = {}, callback = nil)\n @element = element\n @seconds = seconds\n @callback = call_when_finished(callback) if callback\n @chained = nil\n @upda... | [
{
"docid": "3238ee8091d34523d13c50a8c0b09189",
"score": "0.64841866",
"text": "def animate(seconds, attributes = {}, callback = nil)\n if block_given?\n proxy = AnimationProxy.new(self, seconds, attributes, callback)\n yield proxy\n @canvas << proxy.output\n else\n ... |
0684e3931678440ec312df2d1a68c45d | Total claim amount submitted (integer) | [
{
"docid": "d65199f3198b467c63a57c525032224e",
"score": "0.0",
"text": "def amt_subm\n services.sum(:amt_subm)\n end",
"title": ""
}
] | [
{
"docid": "8ab6b531d971bd92dc631507f37f567a",
"score": "0.74764735",
"text": "def total_submitted_charges\n sum = 0\n @eobs.each do |eob|\n sum += eob.amount('total_submitted_charge_for_claim')\n end\n sum\n end",
"title": ""
},
{
"docid": "a2e5d97890d6e56a5f1203edc1af315c... |
f602405a2ee68202d75ed0cdcd3b68b5 | Cleans the living state when a request is done. | [
{
"docid": "1d708787d928f0f88cbdfffb618be579",
"score": "0.6426477",
"text": "def clean_living_state\n if (stack = Thread.current[:waw_state])\n stack.pop\n end\n end",
"title": ""
}
] | [
{
"docid": "fbe983bbb7d9c76c840a75edb7acf15c",
"score": "0.6761382",
"text": "def clear\n self.request = nil\n end",
"title": ""
},
{
"docid": "fbe983bbb7d9c76c840a75edb7acf15c",
"score": "0.6761382",
"text": "def clear\n self.request = nil\n end",
"title": ""
}... |
310a7f8b2a00ee2326aaca334160106c | Mark messages in a topic as read Mark all the unread messages in a topic as read. | [
{
"docid": "ecaf37f2ba0f9fb519b99b67a7240cb9",
"score": "0.0",
"text": "def mark_topic_as_read_with_http_info(stream_id, topic_name, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: MessagesApi.mark_topic_as_read ...'\n end\n # verify the... | [
{
"docid": "13637d7a18fee2947e0e9f540c47fa0d",
"score": "0.7276822",
"text": "def markRead(message_id)\n updateReadFlag(message_id, false)\n end",
"title": ""
},
{
"docid": "605e7327b1c82d69b0d7d67e05b6de21",
"score": "0.7224851",
"text": "def mark_as_read reader\n ... |
df0b12afb90a7c00af28c602cbb7091a | Returns true if this Permutation instance and the other have the same value, that is both Permutation instances have the same Permutationsize and the same Permutationrank. | [
{
"docid": "3e27f8c8f516ad33ad10174989adb924",
"score": "0.70668805",
"text": "def eql?(other)\n self.class == other.class && size == other.size && rank == other.rank\n end",
"title": ""
}
] | [
{
"docid": "769655f6b9f163f026ec2c4afdcb811b",
"score": "0.6863477",
"text": "def is_equivalent_to?(other)\n return false if other.nil?\n return false unless self.factor == other.factor\n return false unless self.scaling == other.scaling\n return false unless self.dimensions ... |
b27628e81e5334cdb594f19823cf58a8 | GET and POST for member /users/:id/terms_agreement | [
{
"docid": "64748ee23fba16646c0087706d54c5a0",
"score": "0.85849154",
"text": "def terms_agreement\n @user = User.find(params[:id])\n \n raise EOL::Exceptions::SecurityViolation.new(\"User with ID=#{current_user.id} does not have permission to access terms agreement\"\\\n \" for User with ... | [
{
"docid": "fbc52967b72464b72ebe6a9c945ac0a6",
"score": "0.85185885",
"text": "def terms_agreement\n # @user instantiated by authentication before filter and matched to current user\n access_denied unless current_user.can_update?(@user)\n if request.post? && params[:commit_agreed]\n @user.... |
12c964f55c8cccce073484f7e47eeb4a | Deletes the record of a hospital. DELETE /hospitals/1 DELETE /hospitals/1.json | [
{
"docid": "2fcb24ae505d4f3d7df00702d400be74",
"score": "0.6948915",
"text": "def destroy\n if @hospital.has_schedule?\n respond_to do |format|\n format.html { redirect_to hospitals_url, notice: 'Failed to destroy hospital. Hospital has schedule.' }\n format.json { head :no_content... | [
{
"docid": "529726883d8bb91fa299f893fb600f20",
"score": "0.8270316",
"text": "def destroy\n @hospital = Hospital.find(params[:id])\n @hospital.destroy\n\n respond_to do |format|\n format.html { redirect_to hospitals_url }\n format.json { head :no_content }\n end\n end",
"title... |
4424317e9d6c2adebba8e273658b1541 | api upload and share an app which not in cloud yet. | [
{
"docid": "d807e2021497522cc6c6862bc501ef6d",
"score": "0.7927743",
"text": "def upload\r\n # return unless validate_format\r\n# return unless validate_signin\r\n app = _add_app\r\n if app\r\n# AppLocale.remove(params[:lang], params[:country], app)\r\n AppLocale.addUnlessNone(para... | [
{
"docid": "965ec38e98e8a60e69e18cb7ddd07fbf",
"score": "0.73174083",
"text": "def share\r\n return unless validate_format\r\n return unless validate_signin\r\n app = App.find(:first, :conditions => [\"package=? and signature=? and version_code >=?\", params[:package], params[:signature], param... |
4bfb95ac79c68b2884af51327df96abb | Delete rows from DB | [
{
"docid": "6cf3a527f99f40ae1db7fca68c3a4d1a",
"score": "0.0",
"text": "def delete_user(id)\n User.find(id).destroy\n end",
"title": ""
}
] | [
{
"docid": "43212ac21c0c72978343aed41120b79e",
"score": "0.7817446",
"text": "def delete_row\n DATABASE.execute(\"DELETE FROM #{get_table_name} WHERE id = #{@id};\")\n end",
"title": ""
},
{
"docid": "944807c21c60f4ad1713f197b7c14aa7",
"score": "0.7721786",
"text": "def delete\n ... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "1488d5a682990949fc4736bd73ed511f",
"score": "0.0",
"text": "def set_bubble_group_status\n @bubble_group_status = BubbleGroupStatus.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.60310596",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.6014974",
"text": "de... |
f293776d5d9c0f9e4a6e6b458f5a79e1 | First In Array Write a method first_in_array that takes in an array and two elements, the method should return the element that appears earlier in the array. | [
{
"docid": "1ddb947ba63484ce11da4fa288b0a3f9",
"score": "0.8023448",
"text": "def first_in_array(arr, el1, el2)\n element1 = 0\n element2 = 0\n arr.each_with_index do |arr, i|\n arr.include?(el1) ? element1 = i : ''\n arr.include?(el2) ? element2 = i : ''\n end\n element1 < element2 ? el1 : e... | [
{
"docid": "017ea96d31b7c9b9bc9ec1c383adc83e",
"score": "0.83441526",
"text": "def first_in_array(arr, ele1, ele2)\n if arr.index(ele1) < arr.index(ele2)\n return ele1\n else\n return ele2\n end\nend",
"title": ""
},
{
"docid": "96f35cc6ddf74919e693593faae0f359",
"score": "0.833... |
85b2598bc3c15fd57a8605b469c0bad7 | Return all users who are connected to the given user via a accepted friendship or accepted inverse friendship. | [
{
"docid": "7cf0e2e5e9e13e48e2e4dc2f3042d981",
"score": "0.6431219",
"text": "def friends\n friends_array = friendships.map{|friendship| friendship.friend if friendship.accepted }\n new_friends_array = friends_array + inverse_friendships.map{|friendship| friendship.user if friendship.accepted }\n ... | [
{
"docid": "128c4a410bb18d555f59e1206ed492db",
"score": "0.7163409",
"text": "def friend_requests\n ids = inverse_friendships.where(is_relationship_established: false).pluck(:user_id)\n User.find(ids)\n end",
"title": ""
},
{
"docid": "62555b2e6e86c559378c41c3d3456187",
"score": "... |
f9856c731ef6a5ca743f6a8fcf2204bc | average of an array of numbers | [
{
"docid": "9b78d629c03486e3fb13482a64211c71",
"score": "0.0",
"text": "def average\n return self.sum/self.length.to_f\n end",
"title": ""
}
] | [
{
"docid": "81e0e3489256f91e758d98b89721a600",
"score": "0.85470283",
"text": "def find_average \n result = array.sum(0.0)/array.size\n return result\n end",
"title": ""
},
{
"docid": "8ede05e3881020b33cf82fe6cf81781d",
"score": "0.854574",
"text": "def array_averag... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "09f4b5665d0b51e1679ac896e500fa76",
"score": "0.0",
"text": "def movie_params\n params.require(:movie).permit(:title, :year, :genre, :actors, :metascore, :imdbscore, :user_rating)\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... |
b6f17f2183513954e6ae061f99253af5 | method for initializing the temp array after each word has been placed | [
{
"docid": "a6fc5ca7b7dd6dc738e22e9c5a95a99f",
"score": "0.6506511",
"text": "def init_temp(temp_array)\n temp_array.clear\n\n 45.times do |row|\n temp_array[row] = []\n 45.times do\n temp_array[row] << \".\"\n end\n end\n end",
"title": ""
}
] | [
{
"docid": "83b611a6e0b6817ea70a474c0254e757",
"score": "0.6739137",
"text": "def data_initialize\n @lives = 5\n @list = get_word_list\n @word = @list[rand(@list.size)].split(//)\n @state = Array.new(@word.size, 0)\n @word.each_with_index do |letter, i|\n @w... |
d5cdfe91ca059b00a419ec096aef91d9 | Remove all fields from the record where the value is nil. Returns a copy of the record. | [
{
"docid": "78bf2b4b38b4395bd87f1b2d84578ec4",
"score": "0.8392214",
"text": "def remove_nil_fields(record)\n record.reject { |key, val| val.nil? }\n end",
"title": ""
}
] | [
{
"docid": "be631168c87d661ab4c911aa7ff4c284",
"score": "0.70206183",
"text": "def remove_nulls!\n self.delete_if { |x| x[1].to_s.empty? || x[1].nil? }\n end",
"title": ""
},
{
"docid": "be50a23d7e3ae442097b17337ec976e2",
"score": "0.69584835",
"text": "def remove_empty_field... |
6cd6a7c22d742e0ee81d49e260ccde58 | Hook event to accumulating deprecation messages (see EventDispatch::Basedeprecation) | [
{
"docid": "3317915f921569704a35d50c489b6649",
"score": "0.6800893",
"text": "def deprecation(message, location = caller(2..2)[0])\n @deprecations << { message: message.message, url: message.url, location: message.location }\n end",
"title": ""
}
] | [
{
"docid": "7b648fdf921d6fbe886c47d0ea48692d",
"score": "0.75499094",
"text": "def deprecation_warn; end",
"title": ""
},
{
"docid": "d1b856784af0feb1cac827a81be20c9d",
"score": "0.7536309",
"text": "def deprecation; end",
"title": ""
},
{
"docid": "286991ce1dc16ae01cde25... |
cca60c550956ad6e1dfb273adfdf893e | Making sure the access token is valid for microsoft provider | [
{
"docid": "87be3913bc10c58218e338d662fd9a91",
"score": "0.71978074",
"text": "def valid_access_token(channel)\n Microsoft::RefreshOauthTokenService.new(channel: channel).access_token\n end",
"title": ""
}
] | [
{
"docid": "9dc64d681fd90c32bae5c9ad7bf048d7",
"score": "0.7575808",
"text": "def valid_access_token\n self.access_token_expired? ? self.refresh_access_token! : self.access_token\n end",
"title": ""
},
{
"docid": "b9c14cea83da40b934540133c407a108",
"score": "0.7535705",
"text": "... |
946288fc09663545c3bdac8cca4fd0dc | Lint (validate) VCL using flags set for the service. Services may have flags set by a Fastly employee or by the purchase of products as addons to the service, which modify the way VCL is interpreted by that service. This endpoint validates the submitted VCL in the context of the specified service. | [
{
"docid": "9f8e7c0b67227051df92441d2c2e467a",
"score": "0.6583449",
"text": "def lint_vcl_for_service_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: VclApi.lint_vcl_for_service ...'\n end\n # unbox the parameters from th... | [
{
"docid": "506039665b200bb02486016e075ee37e",
"score": "0.74061203",
"text": "def lint_vcl_for_service(opts = {})\n data, _status_code, _headers = lint_vcl_for_service_with_http_info(opts)\n data\n end",
"title": ""
},
{
"docid": "1e936f9de3138272b8e7737f7ff84913",
"score":... |
54df49851620e7fcc3f90acfbc382e49 | DELETE /coasters/1 DELETE /coasters/1.json | [
{
"docid": "a8d34b8cc73bbe35bee2430666c24c64",
"score": "0.0",
"text": "def destroy\n @working_card.destroy\n respond_to do |format|\n format.html { redirect_to coasters_url, notice: 'Working card was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"ti... | [
{
"docid": "4c1c164b581dbae14285797e584e8fb7",
"score": "0.6940308",
"text": "def delete_tenant_circle(args = {}) \n delete(\"/tenantcircles.json/#{args[:circleId]}\", args)\nend",
"title": ""
},
{
"docid": "5dead364dc103aead1d20740c3917d0a",
"score": "0.69293267",
"text": "def destr... |
8b2260f3c3f118cf03b5b06986df3664 | private when backspace pressed in position zero if the previous line is filled we may have to bring down the last word and join, rather than go up FIXME : make logic simple. Append entire line to above line. Then go to maxlen if not a space, reverse to find last space. Lop off all after space and replace this line with... | [
{
"docid": "7e23cd9fa5fff5d85291765c2125ef13",
"score": "0.74875367",
"text": "def join_to_prev_line\n return -1 unless @editable\n return if @current_index == 0\n oldcurpos = @curpos\n oldprow = @current_index\n prev = @list[@current_index-1].chomp\n prevlen = prev.length\... | [
{
"docid": "ac78079805017261f1c07a2243c70086",
"score": "0.74519",
"text": "def old_join_to_prev_line\n return -1 unless @editable\n return if @current_index == 0\n oldcurpos = @curpos\n oldprow = @current_index\n prev = @list[@current_index-1].chomp\n prevlen = prev.length... |
f93b3f016e1e7fd2181168cf54c762ab | Returns true if the given token matches the digest. | [
{
"docid": "9c62846efedf4840b290bf421601b499",
"score": "0.0",
"text": "def authenticated? attribute, token\n digest = self.send(\"#{attribute}_digest\")\n return false if digest.nil?\n BCrypt::Password.new(digest).is_password?(token)\n end",
"title": ""
}
] | [
{
"docid": "8ddd0f11de4f651615620fb44c9e44e9",
"score": "0.8200385",
"text": "def matches_token?(digest, token)\n if digest.present?\n BCrypt::Password.new(digest).is_password?(token)\n else\n false\n end\n rescue BCrypt::Errors::InvalidHash\n false\n end",
"t... |
ffc094d27e0434cacbc5b656df33b60a | REVIEW (RCB): Is this action used? I don't see a reference to it If not, I recommend removing the code and routes | [
{
"docid": "e2e46d163d10b1c5af68bc4acf813150",
"score": "0.0",
"text": "def update\n \n p state_obj = State.where(name: params[:state])\n\n\n p my_obj = state_obj[0]\n if request.xhr?\n render json: { stats: my_obj }\n end\n end",
"title": ""
}
] | [
{
"docid": "e6d7c691bed78fb0eeb9647503f4a244",
"score": "0.69796544",
"text": "def action; end",
"title": ""
},
{
"docid": "e6d7c691bed78fb0eeb9647503f4a244",
"score": "0.69796544",
"text": "def action; end",
"title": ""
},
{
"docid": "a80b33627067efa06c6204bee0f5890e",
... |
a9e147fec972823db29e25fe5c05586c | to add columns change sql_base insert statement change sql = sql_base+ insert statement with values change self.move_present_to_old_new_to_present | [
{
"docid": "5604f730fc2e3b872205e0cc0783dcaa",
"score": "0.0",
"text": "def run_lst_116_status # actually the new lst_122 in column, and lst_116 in separate column\n v_base_path = Shared.get_base_path()\n @schedule = Schedule.where(\"name in ('lst_116_status')\").first\n @sche... | [
{
"docid": "117d04b2918a037ed846e162c501a6f5",
"score": "0.73830885",
"text": "def build_insert_sql(insert); end",
"title": ""
},
{
"docid": "8fc80eb5b2064475a2a8bd9f7e1fd745",
"score": "0.69366246",
"text": "def alter_table_sql(table, op)\n case op[:op]\n when :add_ind... |
50f9f185a7e0a4b735aeced6110bd841 | Calculates hash code according to all attributes. | [
{
"docid": "258130f122c2b53740c83431f48c34ea",
"score": "0.0",
"text": "def hash\n [hardware_baseboard, public_key, memory, processors, cpu_logical_count, connection_url, operating_system, cpu_physical_cores, status, operating_system_uptime, cpu_model, owner, cpu_family, cpu_frequency, hardware_fir... | [
{
"docid": "d63333ed15c27e3f7526f0c6f8099546",
"score": "0.7118691",
"text": "def attr_hash\n Digest::MD5.hexdigest(\"#{@name}:#{@ruby_type}\")\n end",
"title": ""
},
{
"docid": "23cdf6a080837fbe407633be0799ea0e",
"score": "0.70400536",
"text": "def hash() end",
"title": ... |
f3a46a1a5371b26d836e819a6b6b5334 | If relX is 0.0, the text will be to the right of x, if it is 1.0, the text will be to the left of x, if it is 0.5, it will be centered on x. Of course, all real numbers are possible values. The same applies to relY. | [
{
"docid": "cc7891c42b2ed7f80982442b9341132a",
"score": "0.6728807",
"text": "def draw_rel(text, x, y, z, rel_x, rel_y, factor_x=1, factor_y=1, color=0xffffffff, mode=:default)\n end",
"title": ""
}
] | [
{
"docid": "fa50135e775093173ee83fd33b0d29e9",
"score": "0.67657095",
"text": "def rel_x\n return x - Graphics.width/2\n end",
"title": ""
},
{
"docid": "30f6607f0c024947ffb7f6553964e4dc",
"score": "0.671964",
"text": "def draw_text_rel(text, x, y, z, rel_x, rel_y, scale_x=1, sca... |
4947d046517e03d6df1878b48e2a439b | GET /graduation_requirements/1 GET /graduation_requirements/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "abd0ff1a77d450ffac6cb39ff5856171",
"score": "0.7560418",
"text": "def index\n @graduation_requirements = GraduationRequirement.all\n end",
"title": ""
},
{
"docid": "6020c6a8f1cd2bf7ff5713bb09478914",
"score": "0.70424324",
"text": "def create\n @graduation_require... |
bb67a12e7cfab1473d6c762665ecedd4 | GET /testdbs GET /testdbs.json | [
{
"docid": "a091ad601129878d89f2918d6680bcfe",
"score": "0.6976084",
"text": "def index\n @testdbs = Testdb.all\n end",
"title": ""
}
] | [
{
"docid": "ede66205d489b99140608fc50813b30d",
"score": "0.724899",
"text": "def list_dbs\n http_request(\"GET\", \"admin/databases\", \"application/json\", \"\")\n end",
"title": ""
},
{
"docid": "6b662aa24f5bc42c21b927d1b6a99443",
"score": "0.70104676",
"text": "def databas... |
44f2f23f45e4521a73a7f71bc543cc72 | The width of a page. Used for formatting text source://rexml//lib/rexml/formatters/pretty.rb16 | [
{
"docid": "0addb39f1ff6f152e9a753d6c2dbc9e7",
"score": "0.663121",
"text": "def width; end",
"title": ""
}
] | [
{
"docid": "944e2715a209b654481a2821a8009f24",
"score": "0.7712729",
"text": "def page_width\n cur_page.page_width\n end",
"title": ""
},
{
"docid": "ab5292fe514c7d07932930f0dfb850b4",
"score": "0.75972164",
"text": "def width(text)\n cur_page.width(text)\n end",
... |
7bdff15db09914fc10904ecb0fc539b2 | Resample the image to fit within the specified resolution while retaining the original image size. The resulting image will always be the same pixel size as the source with an adjusted resolution dimensions. | [
{
"docid": "48bdb728268a4d1d539f38d7ec08db75",
"score": "0.664153",
"text": "def resample(pipeline, width, height)\n pipeline.resample!(\"#{width}x#{height}\")\n end",
"title": ""
}
] | [
{
"docid": "7b753307327df19eec8a9ccc663ef88f",
"score": "0.7332804",
"text": "def resample inimage, dpi, outimage=nil\n m_begin \"resample\"\n img = get_image(inimage)\n old_dpi = (image_dpi inimage)[0]\n if old_dpi != dpi then\n if false\n out = img.resample(dpi)\n elsif \n... |
6a71f1588fd31b9e60d727607ecde2ca | Display a sanitized view of your auth credentials. | [
{
"docid": "85d7e832a333bc730e4928e73001364e",
"score": "0.0",
"text": "def config\n http.config_hash.merge(password:'***').map {|k,v| \"#{k}: #{v}\" }.join(\"\\n\")\n end",
"title": ""
}
] | [
{
"docid": "0ee4dcd5c29a843e67d6e32be04686af",
"score": "0.6770625",
"text": "def inspect\n inspected = super\n inspected.sub! @password, only_show_last_four_chars(@password) if @password\n inspected\n end",
"title": ""
},
{
"docid": "61136dede3f1a864857f610a3331abf3",
... |
bc9d8d45f088fd4be12d09f4df9d2b6c | GET /warehouses/new GET /warehouses/new.json | [
{
"docid": "ececbdb6a9d4dbc0d68fc83d3a1663f6",
"score": "0.82897615",
"text": "def new\n @warehouse = Warehouse.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @warehouse }\n end\n end",
"title": ""
}
] | [
{
"docid": "a05dae5aeb540cde6c7d2984ee0380af",
"score": "0.791438",
"text": "def new\n @warehouse_type = WarehouseType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @warehouse_type }\n end\n end",
"title": ""
},
{
"docid": "e5cba... |
13b8c01d40b930650020397f7b8e3ba8 | Trigger auto approve update rescue task Author: Aniket Date: 06/07/2018 Reviewed By: | [
{
"docid": "4268934518247a0c4c042b1ef9ebc258",
"score": "0.73774314",
"text": "def trigger_auto_approve_update_rescue_task(user_extended_details_id)\n BgJob.enqueue(\n AutoApproveUpdateJob,\n {\n client_id: @client_id,\n reprocess: 1,\n user_extended_det... | [
{
"docid": "0ccd7021c6fdaaef80b69919ef553750",
"score": "0.7300589",
"text": "def auto_approve!\n update_attribute(:approved_at,DateTime.now)\n update_attribute(:approved_by, User.APPLICATION)\n write_key!\n end",
"title": ""
},
{
"docid": "431425069943bc26edcb0618a094ed95",
"s... |
a6870f950fce624b1ab58410c7a2fa5c | DELETE /position_statuses/1 DELETE /position_statuses/1.json | [
{
"docid": "93d4f0c220ac489128b2153c056c0c48",
"score": "0.742572",
"text": "def destroy\n @position_status.destroy\n respond_to do |format|\n format.html { redirect_to position_statuses_url, notice: 'Position status was successfully destroyed.' }\n format.json { head :no_content }\n ... | [
{
"docid": "a3048c5445248a859f898bd8b3af2af6",
"score": "0.73031294",
"text": "def destroy\n @status = Status.find_by_id(params[:id])\n @status.delete\n\n respond_to do |format|\n format.html { redirect_to statuses_url }\n format.json { head :no_content }\n end\n\n end",
"title": ... |
d79ab9019f713d16908e446782582dcd | tbd: remove this, not needed for multithreaded export | [
{
"docid": "ab4a3e102961e3858e316683b01b7ff0",
"score": "0.0",
"text": "def post_export(raw_data_file_paths)\n raw_data_file_paths.each { |path| path.delete }\n end",
"title": ""
}
] | [
{
"docid": "f6d4a510b1064cdde36cfabb37bc801a",
"score": "0.7090659",
"text": "def threadsafe; end",
"title": ""
},
{
"docid": "48aa6ae56116baa2a62ba9233aa5fbd0",
"score": "0.6622728",
"text": "def threadsafe?; end",
"title": ""
},
{
"docid": "9fdeeadbf34f8a8cd294e9bc45fd9... |
26823b49e0c370d431b141d9a1b39891 | GET /administradors/1 GET /administradors/1.json | [
{
"docid": "4a67c039751d09d8fda5fdb988322e1c",
"score": "0.6951836",
"text": "def show\n @administrador = Administrador.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @administrador }\n end\n end",
"title": ""
}
] | [
{
"docid": "9b7bfcb880c092025dcc00ce08a4c78f",
"score": "0.69028306",
"text": "def show\n @administrador = Administrador.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @administrador }\n end\n end",
"title": ""
},
{
... |
f4600766a4a520544949bc9ac0c68c78 | test too many guests checking in | [
{
"docid": "04e17a4654b097a840861ed46a80ea81",
"score": "0.77025765",
"text": "def test_too_many_guests_in_room__true()\n @room_1.check_in_guest(@guest_1)\n @room_1.check_in_guest(@guest_2)\n @room_1.check_in_guest(@guest_3)\n @room_1.check_in_guest(@guest_4)\n @room_1.check_in_guest(@gue... | [
{
"docid": "d1d87d7aa5fca09a85bbbe52a89f8417",
"score": "0.7384273",
"text": "def test_guest_check_in__under_capacity()\n @room1.check_guest_in(@guest4)\n assert_equal(3, @room1.guests.length())\n end",
"title": ""
},
{
"docid": "988abd3b3cc4cdc31c828caa4244dadb",
"score": "0.7261... |
95cee90222e7e1ba365d876774cd9197 | PUT /members/1 PUT /members/1.json | [
{
"docid": "0525ad44c20980b689169e6ad410ca8c",
"score": "0.640992",
"text": "def update\n @member = Member.find(params[:id])\n\n respond_to do |format|\n if @member.update_attributes(params[:member])\n format.html { redirect_to @member, notice: 'Member was successfully updated.' }\n ... | [
{
"docid": "616d9f12fd9109b330aeb7b3959942d6",
"score": "0.6593529",
"text": "def update\n respond_to do |format|\n params.require(:member).permit(:name)\n if @member.update(member_params)\n format.html { redirect_to @member, notice: '更新しました' }\n format.json { render :show, st... |
86018d137839c25cd112f8c8582784d1 | GET /universes/1 GET /universes/1.xml | [
{
"docid": "087baffbf5e22e261f6983e851b148a6",
"score": "0.5976394",
"text": "def show\n @universe = Universe.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @universe }\n end\n end",
"title": ""
}
] | [
{
"docid": "aca7f1ceb783a68619408150a34cda35",
"score": "0.7238921",
"text": "def index\n @universes = Universe.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @universes }\n end\n end",
"title": ""
},
{
"docid": "bc214e2a6226f... |
e10bfa5495153995b5e6afcdd28c244b | metodo que crea las matrices para el mensaje y la clave y realiza el posterior xor entre las dos matrices. | [
{
"docid": "71c1c784309a8810277e043a96b55b3c",
"score": "0.60721254",
"text": "def roundkey\n #creacion de las matrices 4x4 para el mensaje y la clave\n m_m=self.matriz_mensaje\n c_m=self.matriz_clave\n @m_addround=Array.new(4){Array.new(4,0)}\n i,j,contador=0,0,0\n puts \"\\n #{m_m}\"... | [
{
"docid": "03cb09919af62d560a3bb10f2f5afc47",
"score": "0.6393251",
"text": "def cifrar(mensaje,claveB)\n puts \"\\n\\n\"\n puts \"CIFRANDO MENSAJE\"\n puts \"----------------\"\n puts \"\\n\"\n #Si el tamaño de la clave y del mensaje son iguales s... |
884ecad6a4134e2f3dcefb7a5d03412c | un_flag_tile def check_for_chain( neighbors ) neighbors.each do |neighbor| if neighbor_bomb_count == 0 end true end | [
{
"docid": "aca0dc2d06d18cb4a0b3540825c3381c",
"score": "0.0",
"text": "def reveal_neighbors( neighbors )\n neighbors.each do |neighbor|\n reveal_tile( *neighbor.position )\n # neighbor.reveal\n end\n end",
"title": ""
}
] | [
{
"docid": "d9bfa22eeeded9c65688b2e9e5f8d23d",
"score": "0.67167324",
"text": "def contains_loop?()\n no_zeros = @hops.map { |hop| hop.ip }.find_all { |ip| ip != \"0.0.0.0\" }\n adjacents_removed = Path.new(@src, @dst)\n\n (0..(no_zeros.size-2)).each do |i|\n adjacents_removed... |
f4162b5132549b9a3c1547afdc2eb935 | Run simulation and handle network connections | [
{
"docid": "6df4afc6ef191fe92226f2dc010af350",
"score": "0.69391125",
"text": "def run_simulation(options)\n if options[:config]\n scene = setup_scene(File.read(options[:config]))\n else\n scene = setup_scene(DEFAULT_SCENE)\n end\n puts \"-- ownship: #{scene.ownship.to_s}\" if ... | [
{
"docid": "dc2924b204f1cbee72ebc06ae0b4fd27",
"score": "0.70298386",
"text": "def runSimulation\n simulatedClient(\"guy1\") \n simulatedClient(\"guy2\") \n simulatedClient(\"guy3\") \n simulatedClient(\"guy4\") \n\n simulatedAdmin\n end",
"title": ""
},
{
"docid": "00637514d... |
4497992644b26c13b6481d3b6d850e90 | contact postal code for the merchant only useful when :expand_details => true is passed to the query | [
{
"docid": "290a838225315450f8910cf825679bf3",
"score": "0.76350456",
"text": "def contact_postal_code\n details? ? details[\"Contact\"][\"postalCode\"] : ''\n end",
"title": ""
}
] | [
{
"docid": "008beabc8dc3d6d1f3f73acd286a82b5",
"score": "0.70001584",
"text": "def applicant_display_address_street\n dets = self['address_details']\n \"#{dets['address_line_1']}, #{dets['city']}, #{dets['state'][0..1]} #{dets['zip_code']}\".upcase\n end",
"title": ""
},
{
"docid": "4... |
4bd92f574807560cdc100ef17906be29 | PATCH/PUT /calls/1 PATCH/PUT /calls/1.json | [
{
"docid": "ab75946bca7be35532c524ad14b8af71",
"score": "0.6549112",
"text": "def update\n respond_to do |format|\n if @call.update(call_params)\n format.html { redirect_to @call, notice: 'Call was successfully updated.' }\n format.json { head :no_content }\n else\n for... | [
{
"docid": "4e0e59715d19dce2a47fccc2c67326dd",
"score": "0.6730913",
"text": "def patch!\n request! :patch\n end",
"title": ""
},
{
"docid": "afff617f243919b0614d9c0a117c39c0",
"score": "0.6638005",
"text": "def update\n @request_call = RequestCall.find(params[:id])\n\n res... |
7b96af7c6b2acb27a93f3a4bfc0a76e8 | initialize Author: Aman Date: 25/10/2017 Reviewed By: Sunil | [
{
"docid": "04d63a5142577f9c28fa44fed0ff018e",
"score": "0.0",
"text": "def initialize(params)\n @shard_identifiers = params[:shard_identifiers].present? ?\n params[:shard_identifiers] :\n GlobalConstant::SqlShard.shards_to_process_for_cro... | [
{
"docid": "a747cf4388fb3d14718cf9dda73c555f",
"score": "0.82902807",
"text": "def initalize; end",
"title": ""
},
{
"docid": "a747cf4388fb3d14718cf9dda73c555f",
"score": "0.82902807",
"text": "def initalize; end",
"title": ""
},
{
"docid": "30db4e5d165a6098d1aeb8f8dd7b66... |
7e68d249bb7214dd14863062e790f8ca | GET /lookup_bvmtpercentiles/1 GET /lookup_bvmtpercentiles/1.xml | [
{
"docid": "e8381d864e0b785a4f3faf76611ceac0",
"score": "0.0",
"text": "def show\n @lookup_bvmtpercentile = LookupBvmtpercentile.find(params[:id])\n # test sending email\n begin\n puts \"aaaaaa before test email\"\n puts \"AAAAA=\"+PandaMailer.test_email({:send_to => \"noreply... | [
{
"docid": "237a0cfc76caf8e3833c3fd773d61b97",
"score": "0.6235072",
"text": "def new\n @lookup_bvmtpercentile = LookupBvmtpercentile.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @lookup_bvmtpercentile }\n end\n end",
"title": ""
},... |
90733d4dd7351cc00a74153a4381738c | Gives us access to the protected Hyrax::FixityStatusPresenterrelevant_log_records | [
{
"docid": "70f68d5bce7b2fcdec2e06f6af565c67",
"score": "0.7371123",
"text": "def log_records\n relevant_log_records\n end",
"title": ""
}
] | [
{
"docid": "c5188dc89ea8fab06f5a00c3a25b8658",
"score": "0.6651704",
"text": "def relevant_log_records\n @relevant_log_records ||= ChecksumAuditLog.latest_for_file_set_id(file_set_id)\n end",
"title": ""
},
{
"docid": "8dedc5a55c0edf75409f482faf588822",
"score": "0.5947009",
... |
f378e39aca68cf91c8e7ee48e4b4643d | Executes all blocks registered to +name+ via on_load, using +base+ as the evaluation context. ActiveSupport.run_load_hooks(:active_record, ActiveRecord::Base) In the case of the above example, it will execute all hooks registered for +:active_record+ within the class +ActiveRecord::Base+. source://activesupport//lib/ac... | [
{
"docid": "00469b76e548e28d4294c3d2133df415",
"score": "0.7345702",
"text": "def run_load_hooks(name, base = T.unsafe(nil)); end",
"title": ""
}
] | [
{
"docid": "bd152d9202952d184af503f76da691e1",
"score": "0.8136383",
"text": "def run_load_hooks(name, base = Object)\n @loaded[name] << base\n @load_hooks[name].each do |hook, options|\n execute_hook(name, base, options, hook)\n end\n end",
"title": ""
},
{
"docid":... |
0dfb616ec5b80a26d42532bbb455a121 | method to delete a timesheet entry | [
{
"docid": "5969df0b4e0eda26fee7e1d8105ded14",
"score": "0.7608323",
"text": "def delete\n\t\t@timesheet = Timesheet.find(params[:id])\n\n\t\tif @timesheet.destroy\n\t\t\tredirect_to \"/timesheet/\"+ current_user.id.to_s\n\t\telse\n\t\t\treder :action => \"delete\"\n\t\tend\n\tend",
"title": ""
}
... | [
{
"docid": "1efe762adc9e169d00e772cc64c87f79",
"score": "0.785701",
"text": "def destroy\n @time_sheet_entry = TimeSheetEntry.find(params[:id])\n @time_sheet_entry.destroy\n\n respond_to do |format|\n format.html { redirect_to time_sheet_entries_url }\n format.json { head :no_content ... |
a2099a77c85e91272ae2f9e35b937953 | Only allow a trusted parameter "white list" through. | [
{
"docid": "789556496e5b6fd37ec453d780842ff3",
"score": "0.0",
"text": "def person_params\n params.require(:person).permit(:name, :location, :bond)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7943618",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "f6060519cb0c56a439976f0c978690db",
"score": "0.69572574",
"text": "def permitted_params\n params.permit!\n end",
"title"... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "b01d25b38538d511ea5171da9a5df9a6",
"score": "0.0",
"text": "def main_item_params\n params.require(:main_item).permit(:name, :description, :menu_id, :photo)\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... |
a2099a77c85e91272ae2f9e35b937953 | Only allow a trusted parameter "white list" through. | [
{
"docid": "506f22ea9df873a0c3b8ab9e03c7ad4d",
"score": "0.0",
"text": "def unidade_params\n params.require(:unidade).permit(:descricao)\n end",
"title": ""
}
] | [
{
"docid": "c1f317213d917a1e3cfa584197f82e6c",
"score": "0.7121987",
"text": "def allowed_params\n ALLOWED_PARAMS\n end",
"title": ""
},
{
"docid": "b32229655ba2c32ebe754084ef912a1a",
"score": "0.70541996",
"text": "def expected_permitted_parameter_names; end",
"title": "... |
3aa319a02c972f55c8d575c4a631a474 | PUT /intake_documents/1 PUT /intake_documents/1.json | [
{
"docid": "5ac2873457c22d4db45682b5607094eb",
"score": "0.76184005",
"text": "def update\n @intake_document = IntakeDocument.find(params[:id])\n\n respond_to do |format|\n if @intake_document.update_attributes(params[:intake_document])\n format.html { redirect_to @intake_document, not... | [
{
"docid": "1e50c419ab52d82321278ef521b39c77",
"score": "0.6657184",
"text": "def put_document(signature, data)\n respond self.class.put(api_path(\"documents\", signature), :body => data)\n end",
"title": ""
},
{
"docid": "2d32a6bb6396297f25f2a914263ae5c9",
"score": "0.650102",
"... |
478b8337f30f38b02e52a4685651784e | Fixes the ip field if nil and replaces it with the name if its an ip | [
{
"docid": "47030a671980eb41213938bbb0796920",
"score": "0.66530305",
"text": "def fix_ips\n\t\t\t\t\t@hosts = Host.all\n\n\t\t\t\t\t@hosts.each do |host|\n\t\t\t\t\t\tif host.ip == nil\n\t\t\t\t\t\t\tbegin\n\t\t\t\t\t\t\t\tip = IPAddr.new host.name\n\t\t\t\t\t\t\t\thost.ip = ip.to_string\n\t\t\t\t\t\t\... | [
{
"docid": "9ca9506f9b6d7984bf75aea05e45ad9d",
"score": "0.68235177",
"text": "def ip!(ip)\n request_attributes[:ip] = \"#{ip}\"\n self\n end",
"title": ""
},
{
"docid": "8399ad4859eb5419c20356681b78440a",
"score": "0.66179675",
"text": "def fix_ips\n\t\t\t\t... |
77f85bfc90e79b1fdea27465ae257b20 | returns true if the board has not been won but is full, false if the board is not won and the board is not full, and false if the board is won | [
{
"docid": "e3e35e5950ee89c26647d96da508b6bd",
"score": "0.0",
"text": "def draw?(board)\n if won?(board)\n false\n elsif full?(board)\n true\n else\n false\n end\nend",
"title": ""
}
] | [
{
"docid": "097b884ed94b3c2c7ee3677dbeefc8ed",
"score": "0.8715606",
"text": "def full? #if theres no winning combos and the board is full? check to see\n @board.all?{|square| square!= \" \" }\n end",
"title": ""
},
{
"docid": "fd89af1a7ee16d577184d9ec53101de... |
df18f870fa95c01d3a085ea78e0d16af | Command to run after BWA alignment is completed | [
{
"docid": "01556d4b220d55c321522da3441dc12f",
"score": "0.0",
"text": "def runPostRunCmd(previousJobName)\n postRunCmd = \"ruby \" + File.dirname(__FILE__) + \"/bwa_postrun.rb\"\n objPostRun = Scheduler.new(@fcAndLane + \"_post_run\", postRunCmd)\n objPostRun.setMemory(2000)\n objPostRun.se... | [
{
"docid": "a31e275cbcf31d6eab6a2b85a6e41af8",
"score": "0.6397976",
"text": "def process_alignment\n # init vars\n @names = []\n @seqs = []\n \n @alignment = \"-B #{@basename}.aln\"\n\n # import alignment file\n @content = IO.readlines(@infile).map {|line| line.chomp}\n \n #... |
62614ead3708c5bd8a4fb4449e0e6b60 | Create the default user set. Admin is created first because the first user will have adminrole instantly. Then create users with other roles. To use the default userset | [
{
"docid": "9442870a629839ebe29ffa4de73a9745",
"score": "0.78481853",
"text": "def create_default_userset\n User.unscoped.delete_all\n [\n #ROLES = [:guest, :confirmed_user, :author, :moderator, :maintainer, :admin]\n #see user.rb model\n #\n # ATTENTION cba makes the first us... | [
{
"docid": "bc18787babf355ea010961db14f3debd",
"score": "0.76324123",
"text": "def create_default_roles\n # Create the default Rolesets\n Jak.rolesets.each do |role_set|\n my_role = roles.find_or_create_by(name: role_set.role_name, key: role_set.role_name.parameteri... |
05de452aca40a2c6b0c049acdd08c678 | carga/crea pestanas/contenedores > si logueado desde db ; sino desde cookie | [
{
"docid": "6aaa95f0f9fb345570877bbca2e78c69",
"score": "0.0",
"text": "def load_tabs\n if logged_in?\n tabs = current_user.tabs.all :include => :containers\n @theme = Theme.find_by_id(current_user.theme_id)\n else\n @theme = Theme.find_by_id(session[:theme_id])\n t... | [
{
"docid": "013cc63be25b33fab4fe86a352667d6d",
"score": "0.6858205",
"text": "def tmp_sign_up\n unless cookies.encrypted[:oiam_cadre].nil?\n @cadre = CadreInfo.find_by_id(cookies.encrypted[:oiam_cadre])\n flash[:notice] = \"Vous pouvez continuer votre test.\"\n redirect_to my_tests_pat... |
2b71bf822396fa8964a16fa09c8cda04 | perform special stuff if command hits custom actions | [
{
"docid": "cf8c4015ec612605b844b0ee1f5da9cf",
"score": "0.7511957",
"text": "def perform_custom_action(command_alias, command, line_pars = [])\r\n custom_action = self.game.custom_actions[command_alias]\r\n\r\n line_pars = [ line_pars ] unless line_pars.is_a?(Array)\r\n\r\n # extract parameter... | [
{
"docid": "6d17695cae4265d0e6a80329cbf6355e",
"score": "0.6798867",
"text": "def execute\n fail \"Generic command has no actions\"\n end",
"title": ""
},
{
"docid": "bbb4713d14bc9a64b901678ccc29e71e",
"score": "0.6663911",
"text": "def define_additional_commands; end",
"... |
0e45eb34ecbde1cc9f2885a16ab5cf75 | Merge +value+ with +message_instance+. | [
{
"docid": "8f228e38893d13137751a19a2ea9a11f",
"score": "0.8632197",
"text": "def merge(message_instance, value)\n if repeated?\n merge_array(message_instance, value)\n else\n merge_value(message_instance, value)\n end\n end",
"title": ""
}
] | [
{
"docid": "b54d3770c5428a2f4069ec039cac6602",
"score": "0.6148396",
"text": "def wrap value, _message_hash, _label\n value\n end",
"title": ""
},
{
"docid": "961c97be4114eb93d5082860a333e108",
"score": "0.5939435",
"text": "def merge!(other)\n update!(other.... |
f1b69bc7f8ff095c6399a549e4e8c34f | A callback initiated after successfully authenticating. This can be used to insert your own logic that is only run after the user successfully authenticates. Example: def after_magic_link_authentication self.update_attribute(:invite_code, nil) end | [
{
"docid": "cca7931945e9f8d7b24994945f03633c",
"score": "0.6381199",
"text": "def after_magic_link_authentication\n end",
"title": ""
}
] | [
{
"docid": "8a5e4ab2fbeb95951af2bbe677edae0c",
"score": "0.68090194",
"text": "def after_custom_authentication; end",
"title": ""
},
{
"docid": "85da20fd720b5e9746eb0495b8715ba8",
"score": "0.6622194",
"text": "def after_custom_authentication\n\n end",
"title": ""
},
{
... |
6cc50cbd1dacdef335a3065a546c8f21 | POST /kf/course_user_favs POST /kf/course_user_favs.json | [
{
"docid": "668ce517a23c04294d8ba4f7fe7202e7",
"score": "0.74777484",
"text": "def create\n @kf_course_user_fav = Kf::CourseUserFav.new(params[:kf_course_user_fav])\n\n respond_to do |format|\n if @kf_course_user_fav.save\n format.html { redirect_to kf_course_user_favs_url({:page => pa... | [
{
"docid": "68e181735bce4570037c765e3e28943e",
"score": "0.6933808",
"text": "def create\n @favorite = user.favorites.new(favorite_params)\n\n if @favorite.save\n render :show, status: :ok\n else\n render json: @favorite.errors, status: :unprocessable_entity\n ... |
469052faa364ad99ee807388b26fc626 | Path to take a snapshot of repository for release | [
{
"docid": "8a3fc035f797de973ed967503ab9d262",
"score": "0.59930843",
"text": "def local_release_path\n @local_release_path ||= pathname(fetch(:net_storage_local_release_path))\n @local_release_path ||= local_releases_path.join(release_timestamp)\n end",
"title": ""
}
] | [
{
"docid": "b7aa751541f3527d07b97527e5b513a8",
"score": "0.7182326",
"text": "def snapshot name\n Aptly::create_repo_snapshot name, @name\n end",
"title": ""
},
{
"docid": "0a2058d3fe2325ba2bb9429fdf122d59",
"score": "0.71515006",
"text": "def create_repo_snapshot name, repo_... |
dc9be30a9e8024d53812514462c93be0 | Override Get Number of Items | [
{
"docid": "0fc6264232db143ac1f9fbb0731f42b7",
"score": "0.0",
"text": "def item_max\n Game_Cooking::SHORTCUT_SLOTS\n end",
"title": ""
}
] | [
{
"docid": "6c20609ecde7c542edaaea34529276f2",
"score": "0.8578802",
"text": "def item_count\n items.size\n end",
"title": ""
},
{
"docid": "f0cc9983a4957761248c56bdf6684915",
"score": "0.84918153",
"text": "def item_count\n items.size\n end",
"title": ""
... |
ddc58411908c8eeb62926892e851cb6a | Render the Markdown content to HTML. We use GFMesque options here. Returns an HTML string. | [
{
"docid": "00b704266eae74ed4bcb4ba76690546b",
"score": "0.7792913",
"text": "def to_html\n determine_markdown_renderer\n @markdown.to_html\n end",
"title": ""
}
] | [
{
"docid": "fd2e54ed042807ea69a82ca1b4aeb2c1",
"score": "0.76841676",
"text": "def call\n # mode = (context[:gfm] != false) ? :gfm : :markdown\n # html = GitHub::Markdown.to_html(@text, mode)\n # html.rstrip!\n # html\n\n options = context[:redcarpet_options] || {}\n ... |
29993cd8d0739f51c4b9be196892fc51 | Run the next movement behavior. Silently fail if no movements are defined. | [
{
"docid": "c03eef1ebe56e13e2a19fc588fb0f7d7",
"score": "0.76508373",
"text": "def play_next_movement\n return if self.movement_behaviors.nil?\n state = current_behavior_state\n# puts \"current state: #{state}\"\n behavior_array = self.movement_behaviors[state]\n cancel_running... | [
{
"docid": "8c5f08645c189b9f3a71c544ae9339f7",
"score": "0.71878856",
"text": "def do_move()\n\n loop do\n # prompt or retreive for initial position\n if @first_move\n initialPos = prompt_for_postion(\"[#{@name}] Initial position: \")\n else\n ... |
96310c54acd4d5849a06c5dbf211de28 | Gets the deviceBlockEnableRestrictions property value. Indicates whether or not to allow the user to enables restrictions in the device settings when the device is in supervised mode. | [
{
"docid": "98443b46be4151a723b9c1c52fee84ca",
"score": "0.7854049",
"text": "def device_block_enable_restrictions\n return @device_block_enable_restrictions\n end",
"title": ""
}
] | [
{
"docid": "20bdba83c49ab66f3bc76fc88f82ddd9",
"score": "0.78540653",
"text": "def device_block_enable_restrictions=(value)\n @device_block_enable_restrictions = value\n end",
"title": ""
},
{
"docid": "7bcc3ae1366a8a21f61360b914d8bf0e",
"score": "0.58002317",
... |
7ddc6cd6f8a4bf39c8946f2097e9fa02 | POST /quest_items POST /quest_items.json | [
{
"docid": "fdc4b64ace08aaa86c6ce73fc5656a82",
"score": "0.67397153",
"text": "def create\n @quest_item = QuestItem.new(quest_item_params)\n\n respond_to do |format|\n if @quest_item.save\n format.html { redirect_to admin_quest_items_url, notice: 'Всё норм' }\n format.json { hea... | [
{
"docid": "3f5198b1de764bcd059873ba18c34f61",
"score": "0.6887465",
"text": "def quest_item_params\n params.require(:quest_item).permit(:name, :session_length, :quest_status_id)\n end",
"title": ""
},
{
"docid": "fc5811c80efcf2dfee3d6fac65b6c79a",
"score": "0.65539354",
"tex... |
2da7a4038f47e1ef7b1b68a48b732f27 | With Stored Card With Recurring With Web Hooks With Meta Data | [
{
"docid": "b1c3276301c22e5012754a321b2a40c1",
"score": "0.5508678",
"text": "def test_successful_authorize_encryption_stored_card_recurring_webhook_metadata\n test_successful_purchase_stored_card_recurring_webhook_metadata(true, true)\n end",
"title": ""
}
] | [
{
"docid": "7f07b636900102dff40afc30ac19e668",
"score": "0.6143527",
"text": "def create_ygo_embed(embed, card)\n embed.title = \"Card Info:\"\n embed.timestamp = Time.now\n\n embed.footer = Discordrb::Webhooks::EmbedFooter.new(\n text: \"YGOPRODECK\",\n icon_url: \"http://pluspng.com/img-p... |
9c7c2936cf5218df5ad723a403e174f9 | POST /topics POST /topics.json | [
{
"docid": "952200ce4591cb8b782334c4e9411c9e",
"score": "0.7147597",
"text": "def create\n @topic = current_user.topics.build(topic_params)\n\n respond_to do |format|\n if @topic.save\n format.html { redirect_to @topic, notice: 'Topic was successfully created.' }\n format.json {... | [
{
"docid": "bfb24fabb84aaa54c6308483ee11a31c",
"score": "0.7646912",
"text": "def CreateTopic params = {}\n \n APICall(path: 'topics.json',method: 'POST',payload: params.to_json)\n \n end",
"title": ""
},
{
"docid": "c09ce36fb747d138754fc9244f578bac",
"score": "... |
a9c1d45f7ee1f62f55aa02292da0ef3d | Escape html for form_data with data_type :Html Author: Aniket Date: 28/08/2018 Reviewed By: | [
{
"docid": "e11e045be0cc77dba078a32ba2a3b647",
"score": "0.6828416",
"text": "def escape_html\n EscapeHtmlFields.new(params).perform\n end",
"title": ""
}
] | [
{
"docid": "9a2c3b25a03c1f58008b9661de49d6b1",
"score": "0.6636832",
"text": "def escape_html(input)\n Temple::Utils.escape_html_safe(input)\n end",
"title": ""
},
{
"docid": "301815dc3856486cb7601a023e0693e8",
"score": "0.66111815",
"text": "def escape_html(string); ... |
b3ba0bc3221a4e39fcf811eb22f1db81 | Generic Submit button for a form | [
{
"docid": "c12f1b8ffb511cef761da56b9eb4c2b7",
"score": "0.6272082",
"text": "def submit_button(options = {}, data = {})\n disable_text = options[:disable_text] || \"Saving\"\n _button_to({ text: \"Save\", icon: \"floppy-o\", size: \"lg\", type: \"success\", align: \"pull-right\" }.merge(options),... | [
{
"docid": "8dceecfc384700ab39e65195b4a07ae1",
"score": "0.7717912",
"text": "def form_submit(form, opts = {})\n opts[:class] ||= \"btn btn-primary\"\n opts[:value] ||= submit_default_value(form)\n content_tag(:div, :class => \"form-actions\") do\n form.submit(opts)\n end\n end",
"... |
033bced48006366ea3fdbfb78252d2db | Accessor para borrar la foto de portada | [
{
"docid": "7024acc94f85a7eb878e95c3f73320e9",
"score": "0.5905924",
"text": "def delete_cover_photo=(value)\n self.cover_photo = nil if value.to_i == 1\n end",
"title": ""
}
] | [
{
"docid": "4f7ffc7cf920ca091ed4dccdd0fb8a85",
"score": "0.65239364",
"text": "def remove_photo_from_filesystem\n member_photo = nil\n end",
"title": ""
},
{
"docid": "92f5514e4d16f6778a7fa03c9ad74956",
"score": "0.6479286",
"text": "def destroy(value)\n return if post.heade... |
af6cbe3a72e46ea0cb8991e3de7c474e | Returns whether the framework migrations have been run already. | [
{
"docid": "92825b0765ace634cb793a0fa9a633a3",
"score": "0.76532096",
"text": "def framework_migrated?\n if framework.db and framework.db.migrated\n true\n else\n false\n end\n end",
"title": ""
}
] | [
{
"docid": "2eb79f100d428979f2dc3a3aca64db48",
"score": "0.827061",
"text": "def has_migrations?\n false\n end",
"title": ""
},
{
"docid": "e0bdf88c7d96926e87ef5ffb118c096e",
"score": "0.7898233",
"text": "def shared_migrations_pending?\n ActiveRecord::Migrator.new... |
f9aeb871bb1efff3e9eeee6586123034 | POST /events POST /events.json | [
{
"docid": "df689192240e40621d729f72d5fc259a",
"score": "0.0",
"text": "def create\n @event = Event.new(params[:event])\n @event.teaser = params[:event][:description] if params[:event][:teaser].nil? || params[:event][:teaser].blank?\n\n respond_to do |format|\n if @event.save\n form... | [
{
"docid": "8beb709b44028dcb6cde70ea2be23fa3",
"score": "0.76767963",
"text": "def create\n megam_rest.post_events(to_hash)\n end",
"title": ""
},
{
"docid": "2eac2345f845c02c8478dafe0b803519",
"score": "0.75318",
"text": "def create\n @event = Event.new(event_pa... |
ca063e8b43b57916a3093b68d35e4ad7 | Loads the openstudio standards dataset and attach it to the model via the :standards instance variable. | [
{
"docid": "872790b2417a36ce0623d58486ab83da",
"score": "0.6366325",
"text": "def load_openstudio_standards_json(standards_data_dir)\n \n standards_files = []\n standards_files << 'OpenStudio_Standards_boilers.json'\n standards_files << 'OpenStudio_Standards_chillers.json'\n standards_fil... | [
{
"docid": "213bafcc4f32ece3c6b4fa29357a0697",
"score": "0.6160053",
"text": "def set_standard\n @standard = Standard.find(params[:id])\n end",
"title": ""
},
{
"docid": "213bafcc4f32ece3c6b4fa29357a0697",
"score": "0.6160053",
"text": "def set_standard\n @standard = Sta... |
3b3cac35b777418f1acb14d71a863218 | Find an output by a descriptor Numbers are assumed to be indexes into output list Everything else is converted to a regular expression and used to find the first matching device description | [
{
"docid": "aefd18ec5032e85738f6db40b8b86f0e",
"score": "0.75702894",
"text": "def output( descriptor = 0 )\n if descriptor.is_a? Numeric\n @outputs[descriptor]\n else\n descriptor = Regexp.new(descriptor.to_s) unless descriptor.is_a? Regexp\n @outputs.find{ |output| output.device_i... | [
{
"docid": "c1d644f3840457d6db401cc5c3bbf6da",
"score": "0.57019454",
"text": "def find(input_pattern)\n @devices.each do |current_device|\n if current_device[:description] =~ /#{input_pattern}/i\n return true\n end\n end\n return false\n end",
"title": ""
},
{
"do... |
e76466578e6b21eded979527c36d1f3a | =begin The trick in the following example is that there are two variables with the same name: 'count' One is inside the method definition the other one is outside, where the proco is defined. the proc 'puts' out the value of count. Which count? the 'count' at the level where the proc is defined. It carried that value w... | [
{
"docid": "a4d46eccd0c60e453f2714d370f466aa",
"score": "0.61444026",
"text": "def call_proc(my_proc)\n count = 500\n my_proc.call\nend",
"title": ""
}
] | [
{
"docid": "2c5741e2d440765e1e2c7dfdd193c189",
"score": "0.7122291",
"text": "def proc_count()\n @proc_cnt\n end",
"title": ""
},
{
"docid": "3ec883d34b690bd8b2559f37e183ad66",
"score": "0.7035758",
"text": "def proc_maker\n counter = 1\n proc { counter += 1 }\nend",
"t... |
4aaf9caf25d39b1804507474b12372f1 | Read a &39;workflow.BuildTaskMeta&39; resource. | [
{
"docid": "44e68114838d5b15eff1cc2b888b60e3",
"score": "0.53781796",
"text": "def get_workflow_build_task_meta_list_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: WorkflowApi.get_workflow_build_task_meta_list ...'\n end\n ... | [
{
"docid": "1ad4e99d8ec64f98178a077d575bcdb8",
"score": "0.5630244",
"text": "def get_workflow_build_task_meta_list(opts = {})\n data, _status_code, _headers = get_workflow_build_task_meta_list_with_http_info(opts)\n data\n end",
"title": ""
},
{
"docid": "6dc99d3682be76504f473b... |
7f8df45b053e7a1a03cce4aaa776ebfe | shop individual frames ================================================ | [
{
"docid": "52374ff3813b6f7fe7cde6edf75fe892",
"score": "0.0",
"text": "def shop_front_light_up\n system(\"clear\")\n puts \"\"\n puts \"\"\n puts \"\"\n puts \" ___________________________________________________________\"\n puts \" | : : : : : : : : : : : : : : : : : : : : :... | [
{
"docid": "1623e142326cc1d25c6034e50edb23c9",
"score": "0.70805377",
"text": "def frames; end",
"title": ""
},
{
"docid": "1623e142326cc1d25c6034e50edb23c9",
"score": "0.70805377",
"text": "def frames; end",
"title": ""
},
{
"docid": "513c4520954a7da3bb7f57d5b9e27247",
... |
06fca425af3c3f376c26a620f236363f | METODOS DO MENU RELATORIOS | [
{
"docid": "b253ca3782d17268f56481ccbf004753",
"score": "0.0",
"text": "def menu_relatorios\n relatorios_div.hover\n end",
"title": ""
}
] | [
{
"docid": "fda1b3ee490ad78d3076d1d08375a312",
"score": "0.7421527",
"text": "def getMenu(menu)\n end",
"title": ""
},
{
"docid": "c44e92f70ee80f7128582bad5dc93b24",
"score": "0.7308663",
"text": "def getMenu(menu)\n menu.add_item(\"Done\") {self.done}\n menu.add_item(\"Edit... |
d4afdc80678336eacab4d4692bae4a7e | PUT /creator_relationships/1 PUT /creator_relationships/1.json | [
{
"docid": "df9e9e048e7de541d6af4caf525af283",
"score": "0.68891126",
"text": "def update\n @creator_relationship = CreatorRelationship.find(params[:id])\n\n respond_to do |format|\n if @creator_relationship.update_attributes(params[:creator_relationship])\n format.html { redirect_to @... | [
{
"docid": "54b9815aa2f932039bbc4ff337d26a04",
"score": "0.63804114",
"text": "def create\n @creator_relationship = CreatorRelationship.new(params[:creator_relationship])\n\n respond_to do |format|\n if @creator_relationship.save\n format.html { redirect_to @creator_relationship, notic... |
742233701617b18dc14a968867fdf729 | Save stanza for future use | [
{
"docid": "a4efc308179327afd9ee610924fec2c8",
"score": "0.6481861",
"text": "def store\n to = validate_to\n\n storage(to.domain).save_pending_stanza(to, @node)\n end",
"title": ""
}
] | [
{
"docid": "2607bb49d622d806c9d594577d820ce6",
"score": "0.6465191",
"text": "def store_stanza(node)\n stream = Vines::Cluster::StreamProxy.new(@cluster, {'jid' => node[FROM]})\n stanza = Vines::Stanza.from_node(node, stream)\n\n if stanza.nil?\n log.warn(\"Unknown cluster ... |
bb8bc432ac16afc6ea80c6e423e1d41b | PATCH/PUT /resume_posts/1 PATCH/PUT /resume_posts/1.json | [
{
"docid": "8c5d8170e217cc164a2d13af71ab7f7f",
"score": "0.6631212",
"text": "def update\n respond_to do |format|\n if @resume_post.update(resume_post_params)\n format.html { redirect_to @resume_post.resume, notice: \"Раздел 'Желаемая должность' успешно отредактирован\" }\n format.... | [
{
"docid": "e9471f3fe8bd4e94db3bfaf7f0fe31b5",
"score": "0.6969506",
"text": "def update_specific_resume\n id = params[:id]\n title = params[:title]\n revision = params[:revision]\n\n resume = Resume.find_by_id(id)\n if resume.nil?\n render json: {}, status: :not_found\n else\n ... |