query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
c9dfbd8865bad564069c699211e8d049 | POST /forums POST /forums.json | [
{
"docid": "24da4d5726476204baee8672185846c7",
"score": "0.5600986",
"text": "def create\n @forum = Forum.new(params[:forum])\n\n @forum.permalink = create_permalink(@forum.title)\n\n respond_to do |format|\n if @forum.save\n if @forum.position.blank?\n @forum.position = ne... | [
{
"docid": "0259c48c7fc695a00c689a0b0591fe66",
"score": "0.69111246",
"text": "def post_to_forum\n begin\n response = RestClient::Request.execute(\n method: :post,\n url: EBU::API_URL + \"/ebuio/forum/\",\n timeout: EBU::NETWORK_TIMEOUT,\n open_timeout: EBU::NETWORK_T... |
4361f6492c5197063ff333944400df23 | Finds all text_assets of the same class and alerts each that this instance has just been updated | [
{
"docid": "e658617983e245f63125fba47c7efb01",
"score": "0.6231324",
"text": "def update_dependants(time)\n self.class.find(:all).each do |other_text_asset|\n unless other_text_asset.name == self.name\n other_text_asset.process_newly_updated_dependency(self.name, time)\n end\... | [
{
"docid": "de9f4e007ffa05a3c8ae595d0283522a",
"score": "0.54400724",
"text": "def update_bouncytext_era\n return unless @bouncy_text_era\n @bouncy_text_era.each{|sp| sp.update}\n end",
"title": ""
},
{
"docid": "6f720f74a17873e4ff9a5faf8a3f84f4",
"score": "0.53930235",
"text"... |
d73f7bec404c727a23a1afb4b1b49753 | Returns the collected money from the total money requested for the case | [
{
"docid": "b73e217218145c63d3591f0fdcf824a9",
"score": "0.73026586",
"text": "def collected_money\n loans.active.sum(:quantity)\n end",
"title": ""
}
] | [
{
"docid": "988cbc457b132537cd7d7973f2afb417",
"score": "0.72490686",
"text": "def actual_money_spent\n\t\tsames.collect { |i| i.line_total }.sum\n\tend",
"title": ""
},
{
"docid": "da1871e56b35d345d219e9f35c7f5ffa",
"score": "0.7150778",
"text": "def money()\n return @money\n... |
ef17c148d8c4dff2dafce70b54c954b0 | Public: Dumps the database by using a stream to the underlying operation system. | [
{
"docid": "5bed9292be8e485a3212d138a2033220",
"score": "0.59900254",
"text": "def dump_database\n cmd = %Q{`which #{Kellerkind::Config.db_dump_cmd}` #{dump_argument_list}}\n out = IO.popen(cmd)\n out.readlines.join(\" \")\n end",
"title": ""
}
] | [
{
"docid": "7182657d1c0673e3a97b96939b790e5a",
"score": "0.69779027",
"text": "def individual_dump(table, stream)\n individual_header(table, stream)\n individual_table(table, stream)\n individual_footer(table, stream)\n puts \"Creating migration file for #{table.singularize.camelcase... |
2cc0bb2034dc670fd737e7ddc2d01d5d | this method is called from app deployer to see if a given application context is already deployed on this server | [
{
"docid": "946a6919872b4b3806e05987fb0e852d",
"score": "0.77741873",
"text": "def is_context_deployed?\n ret = {status: 'failed', text_color: 'red', message: 'Failed to retrieve application deployment information in order to validate deployed context.<br>Is the Tomcat server instance up and running?... | [
{
"docid": "c91dec6632cf036d0aef9f44102fdaa0",
"score": "0.7191414",
"text": "def deployed_at_least_once?\n self.deployments.exists?\n end",
"title": ""
},
{
"docid": "5b2a94d7b92bcba10b51310b79fb301b",
"score": "0.70883536",
"text": "def deployed? options=nil\n with_server_... |
f841b48fb3b4fec39f950bba2baf7c9e | solution to test 3 | [
{
"docid": "12b633078b65ff2ef662afc79f7d5804",
"score": "0.0",
"text": "def score(answers)\n if @answers & @answer_key == @answers \n return 100\n else\n return 75.0\n end\n\n # if grader.grades.count == 0 \n # i =+ 1 \n # else\n # return \"No grades have been taken\"\... | [
{
"docid": "0b7a616cc7822be314b767ef2b841fa3",
"score": "0.6688179",
"text": "def solution3(input)\n end",
"title": ""
},
{
"docid": "4a596b8e84111433d30b4f5f1846eead",
"score": "0.6534939",
"text": "def pe60v2()\na = Prime.first(1000)\na.delete(2);a.delete(5)\nf = [3,7]\n#a = a.pro... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "b4b4f749fcaecad004a0a89214ba6509",
"score": "0.0",
"text": "def investigation_params\n params.require(:investigation).permit(:applicant_id, :client_id, :user_badge_number, :status, :renewal, :comments)\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.69802505",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6781974",
"text": "def strong_params\n params.requ... |
cabe7b24b9a1b6cb9ee2e2e4b179082b | Verify that the client returns account data in the correct format. | [
{
"docid": "08868aa55f15692271889767ad8daeb2",
"score": "0.58585304",
"text": "def test_account\n stub_http_with_fixture(\"account.json\")\n account = @client.account\n assert_equal FinerWorks::Account, account.class\n assert_equal \"Milton\", account.first_name\n end",
"title": ""
}
... | [
{
"docid": "9e3c6147ad8fdca8d5d3b4aba4972b89",
"score": "0.6484575",
"text": "def handle_verify_account_response(response)\n verify_response = response\n status = verify_response[\"data\"][\"status\"]\n charge_code = verify_response[\"data\"][\"chargecode\"]\n\n if charge_code == \"00\" && s... |
d052e8cd15cf459bc33222853efa5b7e | GET /teachers/1 GET /teachers/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "6d609c69cc44a44c47ed6ca6078069f6",
"score": "0.76282924",
"text": "def index\n @teachers = Teacher.all\n render json: @teachers\n end",
"title": ""
},
{
"docid": "519c0bbd9f8b2ff6b6c110453ef68a03",
"score": "0.75551856",
"text": "def index\n @teachers = Teacher.... |
f393720207e4969605dacf91a31c7c1b | Fetch a list of all doors from the database. Returns the following in an array of hashes: Door Name Door ID Door State | [
{
"docid": "99be91a65e22118234359c717721fd87",
"score": "0.7973651",
"text": "def fetch_all_doors\n\t\t\t@db.query(FETCH_ALL_DOORS).collect do |door|\n\t\t\t\tdoor[:state] = @states[door[:id]] || :unknown\n\t\t\t\tdoor\n\t\t\tend\n\t\tend",
"title": ""
}
] | [
{
"docid": "6ff2466c3505c7595e44c859f367a3de",
"score": "0.691449",
"text": "def all_doors\n\t\tdoors = []\n\t\t\n\t\teach_room { |room|\n\t\t\troom.each_door { |door|\n\t\t\t\tdoors.push(door) unless doors.include?(door)\n\t\t\t}\n\t\t}\n\t\t\n\t\tdoors\n\tend",
"title": ""
},
{
"docid": "2... |
c22691d5624d3f3809e803cc3964de7d | PUT /admin/users/1 PUT /admin/users/1.json | [
{
"docid": "900944b234edaab80fea3590c89e3329",
"score": "0.0",
"text": "def update\n if params[:user][:password].blank?\n [:password, :password_confirmation, :current_password].collect { |p| params[:user].delete(p) }\n else\n @user.errors[:base] << \"The password you entered is incorrect... | [
{
"docid": "d287c257b900a2f4ae9bff3acdb3b320",
"score": "0.7300822",
"text": "def update\n if @current_user.admin?\n @v1_admin_user = V1::Admin::User.find(params[:id])\n # TODO strip :company_id and maybe :encrypted_password out of params here\n if @v1_admin_user.update(user_params)\n ... |
0207c8784c8a49fa7330ac8d62aa5591 | Perform a bitwise operation between strings and store the resulting string in a key. source://redis//lib/redis/distributed.rb378 | [
{
"docid": "98c37f795b7f27e801254d2f074eaf2d",
"score": "0.6921472",
"text": "def bitop(operation, destkey, *keys); end",
"title": ""
}
] | [
{
"docid": "6bdda0b3d6883f69848a0fff1de317d0",
"score": "0.6474123",
"text": "def bphash( key, len=key.length )\n state = 0\n \n len.times{ |i|\n state = state << 7 ^ key[i]\n }\n return state\nend",
"title": ""
},
{
"docid": "a32d5643f2cbedf7c7a6d6cce9fa92c6",
"sco... |
3e93708a4eb41319d0c4970e63f1e1ff | attr_accessor :email, :password,:email, :first_name, :last_name, :address_1, :apt_suite, :city, :country, :state, :zip, :card | [
{
"docid": "1725aa71f5c2219b488a715ee2243a01",
"score": "0.0",
"text": "def initialize(attrs)\n attrs.each do |k, v|\n self.send(\"#{k}=\", v)\n end\n end",
"title": ""
}
] | [
{
"docid": "742cf56f992d1fec9ed3fb4392e272a0",
"score": "0.7267141",
"text": "def initialize(attributes = {})\n @username = attributes[:username]\n @email_id = attributes[:email_id]\n @encrypted_passwordd = attributes[:encrypted_password]\n @address =attributes[:address]\n @phone_no= att... |
467149b289ad9e5434412657007f41cd | Override test product names to split iOS and tvOS test results | [
{
"docid": "4d4b78a98c99fc46f897a4e77ce51631",
"score": "0.6859156",
"text": "def override_test_product_names\n set_xcconfig_value(\n path: 'Tests/Tests.xcconfig',\n name: 'PRODUCT_NAME[sdk=iphone*]',\n value: '$(PROJECT_NAME)-iOS'\n )\n set_xcconfig_value(\n path: 'Tests/Tests.xcconfig',... | [
{
"docid": "f2e84ad6641972626fc56a7e8c291d9a",
"score": "0.6247501",
"text": "def describePlatform\n TC.name.tr(' ', '_')\nend",
"title": ""
},
{
"docid": "62888b5e21555d1809b54b6eec002a9d",
"score": "0.62088865",
"text": "def test_should_concatenate_product_name\n assert_equal @... |
2145db1515df4f93b349c3714bfebaf6 | Retrieve the image specified by the id parameter | [
{
"docid": "694adc64382966d2086caa70f4b13989",
"score": "0.73353386",
"text": "def image\n\t\t@image ||= Image.joins(:album)\n .where(id: params[:id], :albums => {:user_id => user_id})\n .take || halt(404)\n\tend",
"title": ""
}
] | [
{
"docid": "9d4eb40a78922947b75068436ad3029a",
"score": "0.8286029",
"text": "def find(id)\n raise 'Please provide a valid image identificator' if id.nil? or !id.kind_of? String or id == '' or !!(id =~ /[^\\w]/)\n \n hsh = process_response(get(\"/images/#{id}\"))\n hsh = hsh.symboliz... |
c881ce7b2b34bad19b0e5ef6bfbec5fe | GET /test_subject_evaluations/1 GET /test_subject_evaluations/1.xml | [
{
"docid": "d40e90c86c0e76253eb958c9a8721bd3",
"score": "0.73601776",
"text": "def show\n @test_subject_evaluation = @test_subject.test_subject_evaluations.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @test_subject_evaluation }... | [
{
"docid": "01b304aaf05e0a231cc7b992ce9f8973",
"score": "0.73706055",
"text": "def index\n @test_subject_evaluations = @test_subject.test_subject_evaluations.find(:all, :order => 'evaluated_on DESC')\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml =>... |
0f04c15e9d723f31e07504054142f2e1 | PATCH/PUT /position_types/1 PATCH/PUT /position_types/1.json | [
{
"docid": "d8477ba628aadf5b353ded52e6c6c2c6",
"score": "0.7143535",
"text": "def update\n\n @position_types = PositionType.all\n @position_type = PositionType.find(params[:id])\n\n @position_type.update_attributes(position_type_params)\n\n=begin\n respond_to do |format|\n if @position_... | [
{
"docid": "2c1b40bc8ec87a3029d37c9b0e76276b",
"score": "0.75866467",
"text": "def update\n respond_to do |format|\n if @position_type.update(position_type_params)\n flash[:success] = 'The position type was successfully updated.'\n format.html { redirect_to position_types_path }\n ... |
ea68c9fc96d507d0144a8d1a81cd9ced | DELETE /permission_details/1 DELETE /permission_details/1.json | [
{
"docid": "f880e86e8a8ec18f2a14fe8a65e6c0ee",
"score": "0.7877156",
"text": "def destroy\n @permission_detail.destroy\n respond_to do |format|\n format.html { redirect_to permission_details_url }\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "a606bae5979d97845ac8aacf4c0f8e3f",
"score": "0.7491576",
"text": "def destroy\n authorize @permission\n @permission.destroy\n\n head :no_content\n end",
"title": ""
},
{
"docid": "f2a6a0e7b6886815ea6f115eca3bc432",
"score": "0.7412934",
"text": "def delete\n ... |
28c4bf3769676b574f6b9e387334f768 | children that are suited for navigation ("not hidden") | [
{
"docid": "552b1770b7ac39cd771a09ba82c4e90b",
"score": "0.82752156",
"text": "def nav_children\n self.children.reject{ |c| c.hidden }\n end",
"title": ""
}
] | [
{
"docid": "2c7f7d0456c1bb30041f50d2930af2a6",
"score": "0.7945849",
"text": "def children_with_hidden\n children\n end",
"title": ""
},
{
"docid": "bc7d583f98a87a0e3b243ef85c6aed2a",
"score": "0.75399065",
"text": "def subpages\n self.children.select{ |c| c.hidden }\n end",
... |
491f2c0e77f0d83cff6066824dc0d3a8 | You'd, probably, want to have a separate name column instead | [
{
"docid": "0bad9ba632cd3ecf1dedb2340c06e9fc",
"score": "0.0",
"text": "def name\n email\n end",
"title": ""
}
] | [
{
"docid": "4f04807f615094a39f4ec73b8de4690d",
"score": "0.6860962",
"text": "def quote_column_name(name); end",
"title": ""
},
{
"docid": "c589b9b68e2ff60e711739909d2aa287",
"score": "0.6847985",
"text": "def name\n column_name\n end",
"title": ""
},
{
"docid": "e8f9... |
2beb248ea74000b5b8226f5e6bf99607 | DELETE /meeting_types/1 DELETE /meeting_types/1.json | [
{
"docid": "e704029bb8820d35618e358b7469e81e",
"score": "0.8197959",
"text": "def destroy\r\n @meeting_type = MeetingType.find(params[:id])\r\n @meeting_type.destroy\r\n\r\n respond_to do |format|\r\n format.html { redirect_to meeting_types_url, only_path: true }\r\n format.json { hea... | [
{
"docid": "bea7916bea8c8fd3fccceb4d07f179b4",
"score": "0.7979379",
"text": "def destroy\n @meeting_type.destroy\n respond_to do |format|\n format.html { redirect_to meeting_types_url, notice: 'Meeting type was successfully destroyed.' }\n format.json { head :no_content }\n end\n en... |
8eff45ea984eadefd7277e2bfdf60c23 | Sets the +username+ and +password+ for HTTP basic authentication. | [
{
"docid": "6414be6d53ff7dee57f96597a861a199",
"score": "0.8343982",
"text": "def basic_auth(username, password)\n @basic_auth = [username, password]\n end",
"title": ""
}
] | [
{
"docid": "489782698b63da8be952a3b891869f17",
"score": "0.8497854",
"text": "def set_auth_basic(username, password)\n @lock.synchronize do\n @auth_basic_user = username\n @auth_basic_pass = password\n end\n end",
"title": ""
},
{
"docid": "c876a6200fd3038f4c8ae9b6afcce7df",... |
1329d5f1f1ea7713633ed90ecbf5681d | Validate Social Security Number based on variable length | [
{
"docid": "72718e249ad53d582da31cf0eeed9cec",
"score": "0.6758096",
"text": "def validate_ssn(value, the_length=SSN_LENGTH)\n value = value.to_s\n # validates if its an integer\n if(validate_str_is_integer(value) and value.length == the_length)\n return true\n ... | [
{
"docid": "860af098d6c192e58f57d847c357acc5",
"score": "0.713044",
"text": "def length_validate!\n raise 'Credit card number should contain only numbers' unless\n num.scan(/\\D/).empty?\n raise 'Credit card number length should be between 13 and 16 digits' if\n num.length > 16 || num.length... |
c686e1f77943b7a3e34c057d1e68d46a | Public: Create a file from a text string | [
{
"docid": "a8d88c2dca8931e9e5c9c5d0713d87d2",
"score": "0.6722672",
"text": "def create_from_text\n # check that current user has a local identity\n if current_user.local_identity\n # create the brusefile\n @file = create_file(text_params[\"content\"])\n\n # insert our file on the ... | [
{
"docid": "decaf1aba2b055d0d35accc9532dfeb6",
"score": "0.7242057",
"text": "def create_file(text)\n user_file = user_input(INPUT_MSGS['file_name'])\n file_name = \"#{SAVE_DIR}/#{user_file}.TXT\"\n handle_file_errors(file_name, text)\n end",
"title": ""
},
{
"docid": "c6a13cc5f078... |
97db523cd173c187df4151e9c3abb984 | Factor out powers of the given exponent from self. Returns [c, b] representing the original number as cexponent b | [
{
"docid": "fa4d5544f9f7ce9f3f56bb3dc4fe762a",
"score": "0.7396177",
"text": "def factor_out_powers_of(exponent)\n [1, self]\n end",
"title": ""
}
] | [
{
"docid": "8f4429a9f102113053b1c00c0adae6c1",
"score": "0.65088147",
"text": "def power(base, exponent)\n return nil if exponent < 0\n\n return 1 if exponent == 0\n\n value = base\n\n (exponent - 1).times do value *= base end\n\n value\nend",
"title": ""
},
{
"docid": "0f894daee4cf915e... |
6772c7b767e276bb583afa410ab76ce7 | Prefixes the transition to 'decommissioned' state before callback. === Block yielded after state change | [
{
"docid": "a7b8d97bb906b2984536d208a241f068",
"score": "0.7371715",
"text": "def make_decommission_callback\n return lambda do\n RightScale::InstanceState.value = 'decommissioned'\n yield\n end\n end",
"title": ""
}
] | [
{
"docid": "916ff0beb352d9b0d7b164555e7330e7",
"score": "0.63640493",
"text": "def deactivated(&block)\n begin\n PublishingLogic::deactivate\n yield\n ensure\n PublishingLogic::activate\n end\n end",
"title": ""
},
{
"docid":... |
da5c9947f029d62f7f5309b527fef6c0 | GET /lease_users/1 GET /lease_users/1.json | [
{
"docid": "748262b79576c57b159eb6520b8ac35a",
"score": "0.72329664",
"text": "def show\n @lease_user = LeaseUser.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @lease_user }\n end\n end",
"title": ""
}
] | [
{
"docid": "a95dfe28d6b386aafc5fb53749e84258",
"score": "0.6664823",
"text": "def user\n get(ROBINHOOD_USER_ROUTE, return_as_json: true)\n end",
"title": ""
},
{
"docid": "1fa340328c780cc7bc2a4bc7079f2724",
"score": "0.65495265",
"text": "def fetch_user_details\n get('user... |
d45452836fd4e75f5aba3e447ffd5d4b | Applies the current QFilter to the given relation. | [
{
"docid": "c19cb4e22eb16028865d615ce7c14f26",
"score": "0.7829845",
"text": "def apply_filter(relation)\n relation.where(@q.filter.to_sql, *@q.values)\n end",
"title": ""
}
] | [
{
"docid": "d38ba7d1737f403ec1b2862f9e4791cc",
"score": "0.6616618",
"text": "def apply_filter(rel)\n if filter.present?\n Response.do_search(rel, filter, :mission => mission)\n else\n rel\n end\n end",
"title": ""
},
{
"docid": "a5f107b3afa30ec033eadd750189c0... |
3d84627c16b22f65923524471ef1282e | Metoda hledajici reseni daneho TestCase. Ze zadanych usecek vybira nejmensi podmnozinu, ktera pokryva urcenou vzdalenost. Vraci pole segmentu, resici danou ulohu. | [
{
"docid": "a24dfe0c8e3df37653ae905ce6d93cff",
"score": "0.0",
"text": "def resolve\n distance_covered = 0\n segments_used = []\n while distance_covered < @lineLength\n segment = find_segment(distance_covered)\n if segment < 0\n puts 0\n print \"\\n\"\n ... | [
{
"docid": "ea7972df93be8e963a38e69555cfa16d",
"score": "0.5565793",
"text": "def test_simple2\n segments = [Coverage::Segment.new(-2, 3), Coverage::Segment.new(1, 2), Coverage::Segment.new(5, 7)]\n test_case = Coverage::TestCase.new(8)\n test_case.segments = segments\n assert_equal(-1, test... |
e561e11bcf379ef5dc139c210017366b | Only allow a list of trusted parameters through. | [
{
"docid": "f29fa1c270e3a76e28fffc083eb14884",
"score": "0.0",
"text": "def project_params\n params.require(:project).permit(:id, :name, :client_id, :status, :start_date, :end_date, :created_by, :modified_by, :deleted_at, :project_id, :skill_type_id, :no_of_excellers, :project_requirement_id, :add_... | [
{
"docid": "c1f317213d917a1e3cfa584197f82e6c",
"score": "0.69497335",
"text": "def allowed_params\n ALLOWED_PARAMS\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6812623",
"text": "def strong_params\n params.require(:listing_member).permi... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "c3f43abef9ae1eb3ef99c730a3f66cfe",
"score": "0.0",
"text": "def set_searchterm\n @searchterm = Searchterm.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;... |
8dabd18ab8c1e65658669a3f1470dd66 | Sets the resource to which this EmbeddedResource belongs | [
{
"docid": "763d94dbdd68ab5dc174c64b1742a5bc",
"score": "0.633734",
"text": "def parent=(resource)\n @parent = resource\n end",
"title": ""
}
] | [
{
"docid": "7863b280dab9f03bd6c0c474d0082f9c",
"score": "0.7720269",
"text": "def resource=(value)\n @resource = value\n end",
"title": ""
},
{
"docid": "7863b280dab9f03bd6c0c474d0082f9c",
"score": "0.7720269",
"text": "def resource=(value)\n ... |
c712975ea30800b80adbf2420eaa0192 | All of the views that this connection has defined. Mysql will return these views ordered by name. Difference from the original Postgres adapter: Mysql2 gem only watches one schema at a time. This will not include materialized views as these are not supported by mysql. | [
{
"docid": "2ef4333e7a0ddac42ee7358e0f6139e5",
"score": "0.71384865",
"text": "def all\n views_from_mysql.map(&method(:to_scenic_view))\n end",
"title": ""
}
] | [
{
"docid": "11b7c92917cdbd44907f4e2b72739fef",
"score": "0.86177665",
"text": "def views\n sql = <<-SQL\n SELECT table_schema, table_name, view_definition\n FROM INFORMATION_SCHEMA.views\n WHERE table_schema NOT IN ('pg_catalog','information_schema')\n SQL\n connection.exec... |
48fca928f2e1f82f5604037067aa26b4 | Return the text for the final differentiator listed on the page | [
{
"docid": "2eb3ead8aac3d65b9fd69ff92ec7a001",
"score": "0.71048003",
"text": "def get_paragraph_text_for_last_differentiator\n elements = find_elements DIFFERENTIATORS_PARAGRAPHS\n get_attribute elements.last, \"textContent\"\n end",
"title": ""
}
] | [
{
"docid": "1972b10142dbcefabe9c23c6b7ad3912",
"score": "0.6748924",
"text": "def last_text\n last_ele UIAStaticText\n end",
"title": ""
},
{
"docid": "2423849b3a38a1aa2ff72b08cb918d95",
"score": "0.66462",
"text": "def last_text\n last_ele static_text_class\n end",
... |
b01728878b2cd2b9013c8e2e48014747 | Exclude any incoming messages with the specified subject topic pattern. ==== Attributes +subject_pattern+ The subject pattern to use when filtering incoming messages. ==== Raises A GmsecException is thrown if the subject pattern is nil or contains a malformed subject topic pattern. | [
{
"docid": "2da2dc7faa53a43d371e1d7fd24f2460",
"score": "0.7632442",
"text": "def exclude_subject(subject_pattern)\n\t\tend",
"title": ""
}
] | [
{
"docid": "449183d041d261cc784819bbaaa867f1",
"score": "0.7381744",
"text": "def remove_excluded_subject(subject_pattern)\n\t\tend",
"title": ""
},
{
"docid": "2cab2b298be61cf49e746a9b66995f65",
"score": "0.58448094",
"text": "def mail_with_subject(pattern)\n sent_mail.select... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "3236dfcfbf44cbe04c6fe80e10f3606b",
"score": "0.0",
"text": "def set_tournament\n @tournament = Tournament.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;... |
18a9e5aec89626879bcd065db3e3af9b | PUT /todos/1 PUT /todos/1.xml | [
{
"docid": "e10cfacc5537b1a2f49c095e6c8257e9",
"score": "0.0",
"text": "def update\n @todo_list= @todo_lists.find(params[:id])\n\n respond_to do |format|\n if @todo_list.update_attributes(params[:todo_list])\n format.html { redirect_to(user_todo_lists_path(@user), :notice => 'Todo List... | [
{
"docid": "27096800d14893529f640b6cf4566aba",
"score": "0.71584374",
"text": "def update\n connection.put(\"/todo_lists/#{id}.xml\",\n \"<todo-list>\n <name>#{name}</name>\n <description>#{description}</description>\n <... |
e659e374f9df85d7ab80e1d34d61869b | Returns the value of the `id` attribute. | [
{
"docid": "84607347a1c54679a8961c8525fed15e",
"score": "0.0",
"text": "def id\n @id\n end",
"title": ""
}
] | [
{
"docid": "d800b257bfdc34d27ff1f519d573830d",
"score": "0.8528124",
"text": "def id\n (a = attribute('id')).nil? ? a : a.value\n end",
"title": ""
},
{
"docid": "fe58cf24252be77de724e98700a5aef0",
"score": "0.82572293",
"text": "def id # :nodoc:\n @attributes[ 'id' ]\n ... |
b26c67aa504d1a5abc234c6835edfe88 | PATCH/PUT /tipo_estados/1 PATCH/PUT /tipo_estados/1.json | [
{
"docid": "1bca3d53e1ec2eb35130b78fd2c09b91",
"score": "0.65754724",
"text": "def update\n respond_to do |format|\n if @tipo_estado.update(tipo_estado_params)\n format.html { redirect_to @tipo_estado, notice: 'Tipo estado was successfully updated.' }\n format.json { head :no_conte... | [
{
"docid": "69881cdc98a7d9b708da926e930608e4",
"score": "0.686235",
"text": "def update\n @tipo = Tipo.find(params[:id])\n\n respond_to do |format|\n if @tipo.update_attributes(params[:tipo])\n format.html { redirect_to @tipo, notice: 'El Tipo fue Actualizado exitosamente' }\n f... |
be1a299da37266388ca09ea58db19c08 | DELETE /datos/1 DELETE /datos/1.json | [
{
"docid": "c99aa61d8dbbd8d6fdc4f13efaacd38b",
"score": "0.69134814",
"text": "def destroy\n @dato.destroy\n respond_to do |format|\n format.html { redirect_to datos_url, notice: 'Dato was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"title": ""
}... | [
{
"docid": "e6d7ff0f87ed21c2c8b299f55cb5ba30",
"score": "0.7328287",
"text": "def destroy\n @dato = Dato.find(params[:id])\n @dato.destroy\n\n respond_to do |format|\n format.html { redirect_to datos_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
... |
f48465b1be23ecf6205d4be6777b86d6 | TODO need to consider how for pass the options along to children being | [
{
"docid": "d782657792b70bab8b12c77ddb4446bd",
"score": "0.0",
"text": "def delete(options = {})\n options.to_options!\n before_delete\n if options[:force]||options[:remove]\n delete_item\n else\n attributes['deleted_at'] = Transaction.time\n save_w... | [
{
"docid": "cee9af580f56de614fd388641378a430",
"score": "0.6748475",
"text": "def apply_children\n \n end",
"title": ""
},
{
"docid": "1f5bcc39eeaa896f5cabf0406861ed48",
"score": "0.65719694",
"text": "def parent; @options[:parent]; end",
"title": ""
},
{
"docid": "84... |
2e532f3b0379f19eadb8312868d97f13 | We filter the rdv_contexts to keep those where the applicants were invited and created a rdv/participation | [
{
"docid": "8fc47da984e86eda30022838972c08b0",
"score": "0.7130673",
"text": "def rdv_contexts_sample\n @rdv_contexts_sample ||= RdvContext.preload(:participations, :invitations)\n .where(applicant_id: applicants_sample)\n .w... | [
{
"docid": "459dd1509bfc32b90331bb4385baac9a",
"score": "0.65332335",
"text": "def applicants_for_30_days_rdvs_seen_sample\n # Applicants invited in an orientation or accompagnement context\n @applicants_for_30_days_rdvs_seen_sample ||=\n applicants_sample.joins(:rdv_contexts)\n ... |
f8e2e22a4087403c89ca881e51332486 | Public: Call this method to modify defaults in your initializers. Examples: Moltin.configure do |config| config.client_id = '123' config.client_secret = '456' end Yields Moltin configuration | [
{
"docid": "55cbebb806485ce1f17a414e21532a9a",
"score": "0.6738721",
"text": "def configure\n yield(configuration)\n end",
"title": ""
}
] | [
{
"docid": "1d0433171e9c278d31868b7e1a1f202a",
"score": "0.72123665",
"text": "def configure(config = nil, &block)\n config ||= Util::BlockHashBuilder.build(&block)\n @config = config.dup.freeze\n end",
"title": ""
},
{
"docid": "fa07fd551604744d0ad4047f0b82743c",
"sco... |
102952370e272a01fc27104ded4d8569 | Check the uri should be different than N::LOCAL, this could happen when an user leaves the input text blank. | [
{
"docid": "9d43b753a47f764de1389d697db6be6d",
"score": "0.8439119",
"text": "def check_uri\n self.errors.add(:uri, \"Cannot be blank\") if self.uri == N::LOCAL.to_s\n end",
"title": ""
}
] | [
{
"docid": "a9528ed890dddca6aff303fda14ee70d",
"score": "0.6812585",
"text": "def valid?(uri); end",
"title": ""
},
{
"docid": "879fa07e79af71dfa6c64110a420f9ac",
"score": "0.67781514",
"text": "def test_valid_nonlocal_uris\n [\n ['file://example.com/Share/dir/file.ext', 'exa... |
3f0283e97a432bfe7b45781a3c0f2d73 | input: => array of data => block of code to be executed on the array output: => a true or false | [
{
"docid": "a72cbd7a93c83f2bd8729131f8af0ae1",
"score": "0.0",
"text": "def reduce(data, sv=nil)\n # check to see if we have a starting value\n if sv\n # set the first value to the starting value provided\n sum = sv\n i = 0\n # we do NOT have a starting value\n else\n # initialize to pro... | [
{
"docid": "abd804755b375a2f4ebb203804dceab2",
"score": "0.6881214",
"text": "def block_checker(array, &block)\n [array.to_a, !!block]\nend",
"title": ""
},
{
"docid": "e0ac12a11171b688132cab736d113c75",
"score": "0.63211113",
"text": "def code_block?\n @code_block\n end",
... |
568bcd5bf4fab6155dbfd1cd5e9e823c | Evaluates the given block using the given +input_method+ as the Contextio. | [
{
"docid": "492999327e7baaac4e30246d32e6c875",
"score": "0.56436336",
"text": "def suspend_input_method(input_method); end",
"title": ""
}
] | [
{
"docid": "73a96a9e0277f8f6fdedf59e69719b18",
"score": "0.6076217",
"text": "def call(input)\n body .public_send(\n self.class::ENUMERABLE_METHOD\n ) { |evaluator| evaluator.call(input) }\n end",
"title": ""
},
{
"docid": "b4939b35712211c31d17277cc66f1d05... |
37d481e088e6cded8430b04b65ce6ac3 | returns the size of the parameter space | [
{
"docid": "b218351550f5fa975d0b541d9e8352b1",
"score": "0.0",
"text": "def size\n self.content.length\n end",
"title": ""
}
] | [
{
"docid": "3574aed1b50dff7336e551c0c45a918f",
"score": "0.77854097",
"text": "def size\n params.size\n end",
"title": ""
},
{
"docid": "b914173a1d6f4ec3e8789626ef3f171a",
"score": "0.7682911",
"text": "def argument_size; end",
"title": ""
},
{
"docid": "e0c3330cf... |
ca8395973bb0c26ef18778208f681388 | USAGE: if you want customize, you just overwrite follow methods. | [
{
"docid": "f1f690bd0946eca560cd83d9f4ab2fa8",
"score": "0.0",
"text": "def update_by_twitter(auth)\n self.access_token = auth['credentials']['token']\n self.secret = auth['credentials']['secret']\n self.name = auth['info']['nickname']\n self.nickname = auth['info']['nickname... | [
{
"docid": "c7b3d79d6c9492432ccd491befc3d9a3",
"score": "0.8279704",
"text": "def follow\n\n end",
"title": ""
},
{
"docid": "00aef18abb644e8ffa3c278ba1472235",
"score": "0.73607373",
"text": "def next_follow\n end",
"title": ""
},
{
"docid": "5d161ef75f2ac8d8fea6da9c1a... |
c1a6f585283f85169637574f9c099f6e | A registration is `valid?` if all of its parts are valid | [
{
"docid": "b60aad5d9e3f46ce28df8656be84a8aa",
"score": "0.0",
"text": "def valid?\n super\n if attendee.valid?\n validate_mandatory_plan_cats(selected_plans)\n validate_disabled_plans(persisted_plan_selections, selected_plans)\n validate_models(selected_attendee_plans)\n valid... | [
{
"docid": "a84094e90cbef903c4b75b65dda629c2",
"score": "0.76853365",
"text": "def valid?\n regon_validator.valid?\n end",
"title": ""
},
{
"docid": "8e44c5c5c17e8d154906c67803b73825",
"score": "0.74920106",
"text": "def registration_complete?\r\n attempted_record ... |
61e8f448bd3f42c5b66c2ff9bee43c2d | GET /purchase_data/1 GET /purchase_data/1.json | [
{
"docid": "e35335f7b683357675f65561c8248ea4",
"score": "0.0",
"text": "def show\n \t@purchase_order_data = PurchaseOrderDatum.all\n @material_masters = MaterialMaster.all\n @unit_masters = UnitMaster.all\n @supplier_masters = SupplierMaster.all\n @purchase_divisions = PurchaseDivision.all\... | [
{
"docid": "d6112a93ee3b88baf914af0cf298f66d",
"score": "0.7298317",
"text": "def index\n @purchases = Purchase.where(user_id: get_current_user.id.to_i)\n\n render json: @purchases\n end",
"title": ""
},
{
"docid": "69c3956eab68345b758f3320de7f890b",
"score": "0.7076486",
"tex... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "c32781757a7fbe6228e6bf0febbf7add",
"score": "0.0",
"text": "def survey_params\n params.require(:survey).permit(:name)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7496729",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.6958585",
"text": "def strong_params\n params.require(:request).permit(param_white... |
25b0cf40319a0a0a58d828bd5c80011a | Replace: has_one :unpaid_order, :class_name => 'Order', :conditions => ['paid_on is null'] | [
{
"docid": "7183c9ad12fbd31f397d4cf3112bf456",
"score": "0.6687567",
"text": "def unpaid_order(user_id = self.owner.id)\n result = orders.where(\"paid_on IS NULL AND user_id = ? AND reorder_id IS NULL\", user_id)\n return (result.any?) ? result.first : false\n end",
"title": ""
}
] | [
{
"docid": "b7e5b0309ae39b09ebd14cc349bcd45b",
"score": "0.6010033",
"text": "def first_paid_order?\n paid_orders = self.task.orders.paid\n\n if paid_orders.blank?\n false\n else\n if paid_orders.first == self\n true\n else\n false\n end\n end\n end",
"... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "5c97af6591dd156c0ebc007a21215666",
"score": "0.0",
"text": "def set_lawsuit\n @lawsuit = Lawsuit.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... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "2c43fad03e9cc1321ae9bac7d36c52f2",
"score": "0.0",
"text": "def set_bucketlist\n @bucketlist = Bucketlist.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... |
25df8a3e87d9b916fa28941018abf829 | check that the user is logged in | [
{
"docid": "f95b935692fe50d5424ad71ae3359e47",
"score": "0.0",
"text": "def signed_in_user\n unless signed_in?\n store_location\n redirect_to signin_url, notice: \"Please sign in.\"\n end\n logger.debug \"***signed_in_user - Detected signed in user...\"\n end",
"title": ""
}
] | [
{
"docid": "4d66ee4f19ef7a74bdda55e8eac57564",
"score": "0.8528125",
"text": "def user_is_logged_in()\n user = get_user()\n if user != nil\n true\n else\n false\n end\n end",
"title": ""
},
{
"docid": "9a4e05912e8c8c26d2bf41f4989172e7",
"score": "0.8384843",
"t... |
425af23f9f5858e6eb87893f272bc194 | rubocop:disable AbcSize, MethodLength Too much assignment, condition and branching | [
{
"docid": "d718368b13b622c6826d9bfbff4ac43a",
"score": "0.0",
"text": "def create\n @slot = Slot.new(slot_params)\n @slot.planning = @planning\n @slots = @planning.slots\n @slot_templates = Slot.slot_templates\n if @slot.save\n respond_to do |format|\n format.html { redirect_... | [
{
"docid": "0142d3a7d72d7e7c3c62ea13de2b2a05",
"score": "0.6133617",
"text": "def conditionally(*) end",
"title": ""
},
{
"docid": "0142d3a7d72d7e7c3c62ea13de2b2a05",
"score": "0.6133617",
"text": "def conditionally(*) end",
"title": ""
},
{
"docid": "f1c23bb7d5eac963718e... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "c960bedefdec4b76c5bafda1219251a0",
"score": "0.0",
"text": "def set_role\n @role = Role.find(params[:id])\n check_admin_role\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... |
6c316382edb6921d99c0c1fa0e408186 | helper method for delete: | [
{
"docid": "1eed13e49b7f4d3fb856c8947959ab7c",
"score": "0.0",
"text": "def maximum(tree_node = @root)\n step = tree_node\n until step.right.nil?\n if step.value < step.right.value\n step = step.right\n end\n end\n step\n end",
"title": ""
}
] | [
{
"docid": "36887f2b24d31f98fbb51687409e73f6",
"score": "0.83331484",
"text": "def delete; end",
"title": ""
},
{
"docid": "36887f2b24d31f98fbb51687409e73f6",
"score": "0.83331484",
"text": "def delete; end",
"title": ""
},
{
"docid": "36887f2b24d31f98fbb51687409e73f6",
... |
97b62fef450538bac5eb653ae8f1c78e | Set the value of the ImageLocation input for this Choreo. | [
{
"docid": "ba3f6c32acac05ba1df717d0f1a0b3f8",
"score": "0.7729295",
"text": "def set_ImageLocation(value)\n set_input(\"ImageLocation\", value)\n end",
"title": ""
}
] | [
{
"docid": "d7d285380ff3d2b0089f97a3e04622cd",
"score": "0.76472235",
"text": "def set_ImageLocation(value)\n set_input(\"ImageLocation\", value)\n end",
"title": ""
},
{
"docid": "1a7ed6ea2fe966c3a1bacedcefaa67d0",
"score": "0.6772384",
"text": "def set_PhotoLoca... |
03cf1eeb70c3b36dd4fe3574fe72e307 | POST /teacher/courses/1/exams/1/questions POST /teacher/courses/1/exams/1/questions.json | [
{
"docid": "e17ae83611110fce544a314e220a97ac",
"score": "0.74577314",
"text": "def create\n @question = Question.new(params[:question])\n\t\t@exam.questions << @question\n\n respond_to do |format|\n if @question.save\n format.html { redirect_to [:teacher, @course, @exam, @question], :n... | [
{
"docid": "145d4910cb9a88624a5e9337c17437ea",
"score": "0.70557857",
"text": "def create\n @question = @exam.questions.new(question_params)\n\n respond_to do |format|\n if @question.save\n format.html { redirect_to course_exam_questions_path(@course, @exam), notice: 'Question was succ... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "1a5d9749bb5cbddc950fe9fa991f93fc",
"score": "0.0",
"text": "def artista_params\n params.require(:artista).permit(:nombre, :descripcion, :fecha_origen, :web, :imagen)\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.6980629",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.67819995",
"text": "def strong_params\n params.requ... |
1e5af0047e0975ae0b60006e83742643 | POST /fantasy_leagues POST /fantasy_leagues.xml | [
{
"docid": "1f0256b8b0799f399a2fa2c424ebc768",
"score": "0.65532017",
"text": "def create\n @fantasy_league = FantasyLeague.new(params[:fantasy_league])\n\n respond_to do |format|\n if @fantasy_league.save\n flash[:notice] = 'FantasyLeague was successfully created.'\n format.htm... | [
{
"docid": "c7fdc65095b8eb850a28f588c2f7255c",
"score": "0.61537427",
"text": "def create\n @league = League.new(params[:league])\n\n respond_to do |format|\n if @league.save\n format.html { redirect_to(@league, :notice => 'League was successfully created.') }\n format.xml { re... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "01fb88c3a91041dc4dd1903e75bbc43c",
"score": "0.0",
"text": "def escuela_params\n params.require(:escuela).permit(:id, :nombre)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.74954116",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.6956924",
"text": "def strong_params\n params.require(:request).permit(param_whit... |
ebfc99c9de599c3b673ca51b5795ea04 | Creates the citation for the instance and creates the resoruce package | [
{
"docid": "5d949103a3688ba3581ee2c4586bdecb",
"score": "0.0",
"text": "def export_instrument(instrument)\n @instrument = instrument\n @urn_prefix = 'urn:ddi:%{agency}:%{prefix}' %\n {agency: @instrument.agency, prefix: @instrument.prefix}\n urn = Nokogiri::XML::Node.new 'r:URN',... | [
{
"docid": "2fd619efae6a9d660708833689ded3ce",
"score": "0.6136445",
"text": "def citation\n @citation ||= Eshelf::Citation.new(self.external_id)\n end",
"title": ""
},
{
"docid": "6ddadb04def9a5d41b50fe6318588390",
"score": "0.6072518",
"text": "def generate_citations(document)\... |
2ec9b3d46f6d0964f19989fe3010fc45 | POST /my_resources POST /my_resources.json | [
{
"docid": "82177213a0dc984b97878d4d60ea80ac",
"score": "0.68882465",
"text": "def create\n @my_resource = MyResource.create!(my_resource_params)\n @my_resource.status = 0\n respond_to do |format|\n if @my_resource.save\n format.html { redirect_to @my_resource, notice: 'My resource ... | [
{
"docid": "e18ad7a2dc6c5ab51abdd1e6504e6b16",
"score": "0.6846842",
"text": "def create\n\tputs \"create\"\n @resource = Resource.new(params[:resource])\n\n respond_to do |format|\n if @resource.save\n format.json { render json: @resource, status: :created, location: @resource }\n ... |
e5ee8c610849d1a8f3cacb75a16a0d88 | , only: [:create, :show, :destroy] | [
{
"docid": "ffa818e161d6c4ae54c1d0868e14efa0",
"score": "0.0",
"text": "def create\n\t\t@comment = @commentable.comments.new comment_params\n\t\t@comment.user_id = current_user.id\n\t\t@comment.save\n\t\t\n\t\tredirect_to @commentable, notice: \"Your comment was successfully posted!\"\n\tend",
"titl... | [
{
"docid": "d553039203574faf55aad28bff0cc975",
"score": "0.7098753",
"text": "def show # methods in controller are called ACTIONS\n end",
"title": ""
},
{
"docid": "0077e11194ec67266e2a36d29472951b",
"score": "0.7069922",
"text": "def create\n super\n show\n end",
"title"... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "93ff860c1da479cd4b5c8c192f72b769",
"score": "0.0",
"text": "def set_comment\n @comment = Comment.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;... |
1399d840e6591122160e7702d9229e5f | this is a rjs (POST) | [
{
"docid": "8008e6c580aee5972f617214b9d7be6a",
"score": "0.0",
"text": "def search\n list_results = Search.execute(PikiziLib.clean_string(params[:search_text]))\n render :update do |page| \n page.replace_html(\"current_wish_list\",render(:partial => \"/wishlists/search_results\", \n ... | [
{
"docid": "977ad066591f2c3ba3c17479f17b4cc0",
"score": "0.7240605",
"text": "def post_data; end",
"title": ""
},
{
"docid": "8d244c8e93c271a7e92ea1ee63d3dddc",
"score": "0.7189851",
"text": "def POST; end",
"title": ""
},
{
"docid": "eae9382113f9574cc34f6253a7cb4e0b",
... |
8b8baad526e12858ac6fa8b37b622427 | Define a new dictionary word with some code | [
{
"docid": "722f76b64906755e60aaced9197ce720",
"score": "0.67079985",
"text": "def define word, func\n @dictionary[word.upcase] = func\n end",
"title": ""
}
] | [
{
"docid": "9f882c7417ddc63028a5fb934780c60d",
"score": "0.7029424",
"text": "def add_word(word, definition)\r\n @dictionary[word] = definition\r\n end",
"title": ""
},
{
"docid": "6182246878b24ed36a623d6ee9a24331",
"score": "0.684063",
"text": "def dictionary(word)\n\n defs = ... |
15b74545b28d4fc423e3704573cd951a | Retrieve a single page of RecordingInstance records from the API. Request is executed immediately. | [
{
"docid": "dde32c7287a8ef25d4c40c75f850e929",
"score": "0.0",
"text": "def get_page(target_url); end",
"title": ""
}
] | [
{
"docid": "5bd8074158e0fdfac40f2922ec533496",
"score": "0.6966496",
"text": "def get_recordings\n recordings_json = @@api.get_recordings[:recordings]\n recordings_objects = []\n for recording in recordings_json\n recording_object = {}\n\n recording_url = recording[:playback][:format]... |
2459dc08535c0d08e302ebbf5b68dc8c | INTERNAL ONLY Used only internally to show an html form to edit an Article. Routes `/api/v1/projects/:project_id/articles/:name/edit` Path/Url Parameters | | | |:|:| | `project_id` | The id of a Project. | | `name` | The `name` of the Article. | | [
{
"docid": "15a3bf3a842aa010c58ccda96a6a69e9",
"score": "0.6778858",
"text": "def edit\n respond_with @article\n end",
"title": ""
}
] | [
{
"docid": "3291717ff900e5544716f4b9d07d3434",
"score": "0.7111032",
"text": "def edit\n @article = Article.find(params[:id])\n end",
"title": ""
},
{
"docid": "3291717ff900e5544716f4b9d07d3434",
"score": "0.7111032",
"text": "def edit\n @article = Article.find(params[:id])\n ... |
232e3124f69d11343c4be1e86a29d887 | Sets the block to be called when the player exits the area. | [
{
"docid": "2b95e0fdbc7f6df20273eddd8ee4393c",
"score": "0.6014694",
"text": "def on_exit(&block)\n @on_exit = block\n end",
"title": ""
}
] | [
{
"docid": "6a747055f4048b23670d41072fa65d77",
"score": "0.701595",
"text": "def exit &block\n @exit_block = block\n end",
"title": ""
},
{
"docid": "567836f9b094b21f4bb5947a8b02491f",
"score": "0.69220364",
"text": "def on_leave(&block)\n @leave_block = block\n e... |
85565570a1182517b6f1f3d2ccce3f4b | authenticate with getexceptional.com returns true if the configured api_key is registered and can send data otherwise false | [
{
"docid": "bfa75b1ef8604c2ce5180c6f5f450862",
"score": "0.74278146",
"text": "def api_key_validate\n\n return @api_key_validated if @api_key_validated\n\n if Exceptional.api_key.nil?\n raise Exceptional::Config::ConfigurationException.new(\"API Key must be configured\")\n end\n\n ... | [
{
"docid": "6f1b598b520263069fe9697e6fbefada",
"score": "0.7619204",
"text": "def authenticate_api_call(api_key, api_secret)\n # Unauthorized API call.\n false\n end",
"title": ""
},
{
"docid": "3ac969e892acf91ead158748cf1feae8",
"score": "0.75567836",
"text": "def authe... |
066675d4dedb4f6f6bebce652b9d552f | Execute the Choreo using the specified InputSet as parameters, wait for the Choreo to complete and return a ResultSet containing the execution results. | [
{
"docid": "6c56a35313dd342a644c3fe8c9056383",
"score": "0.0",
"text": "def execute(input_set = nil)\n resp = super(input_set)\n results = GetEmailResultSet.new(resp)\n return results\n end",
"title": ""
}
] | [
{
"docid": "c4ca32683e8ce75eb6a187d63df8fa77",
"score": "0.766411",
"text": "def execute(input_set = nil)\n resp = super(input_set)\n results = DoneResultSet.new(resp)\n return results\n end",
"title": ""
},
{
"docid": "6f7a7d9be674ad4cf17d6743eb1f7836",
"score"... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "ed625399fdb5e31d0e06d532d17475f5",
"score": "0.0",
"text": "def set_project\n @project = Project.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... |
5b8fbca7ae6f205b2f15fad32cd25dcd | Read a &39;kubernetes.StatefulSet&39; resource. | [
{
"docid": "d37b41d8489662de3d30b445d34939f4",
"score": "0.45568013",
"text": "def get_kubernetes_stateful_set_by_moid_with_http_info(moid, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: KubernetesApi.get_kubernetes_stateful_set_by_moid ...'\n ... | [
{
"docid": "0398a55452673db70ed6e8d07e6eb57b",
"score": "0.64659125",
"text": "def read_namespaced_stateful_set(name, namespace, opts = {})\n data, _status_code, _headers = read_namespaced_stateful_set_with_http_info(name, namespace, opts)\n return data\n end",
"title": ""
},
{
... |
a5fc32bb75b716eeec70f3ce60835237 | Example data we want from params hash =begin "groupby_fieldsfollower"=>"who_id", "groupby_fieldsmessage"=>"text", "groupby_fieldsuser"=>"", "orderby_fieldsfollower"=>"whom_id", "orderby_fieldsmessage"=>"author_id", "orderby_fieldsuser"=>"", "orderby_direction"=>"DESC" =end | [
{
"docid": "73fc557a474196198eb4768b536246c3",
"score": "0.59732354",
"text": "def add_groupby_and_orderby_fields(query_object, params)\n\t\tgroupby_fields = []\n\t\torderby_fields = []\n\t\torderby_direction = true # Default true = ASC, false = DESC\n\n\t\tparams.keys.each do |k|\n\t\t\tif k.include?(\... | [
{
"docid": "841a3c89a53ab163991a78f28b940207",
"score": "0.6082411",
"text": "def order_params(params)\n {\n question: params['question'],\n explanation: params['explanation'],\n hint: params['hint'],\n worth: params['worth'],\n tags: params['tags'],\n ... |
8025d402bf106c3d3ab941645789b43f | No args act as a guard on any web service action that wants authentication We check the encrypted_password in order to implement token retraction: if the user changes their password, they will have to get a new token. Returns user on success, nil (after render) on failure. | [
{
"docid": "777e5aa3f281fe53d0cc3c649b9dd439",
"score": "0.68239665",
"text": "def authorize_user_from_token!\n if current_user\n return render_unauthorized title: \"You are not authorized to use the web services.\" \\\n unless current_user.is_power_user? # Unauthorized\n @curren... | [
{
"docid": "8ff565c9a0cc40cfeada2aade0b267ae",
"score": "0.7296816",
"text": "def authenticate_user_from_token!\n authenticate_token || render_unauthorized\n end",
"title": ""
},
{
"docid": "8882a5ca529018d38967958f155eb37b",
"score": "0.7278234",
"text": "def authenticate_user_f... |
8bde413b5e54c10540741bb54f717bb2 | Get a file within the bags. Returns the first match. | [
{
"docid": "25423534c10a3e813c91d77d1b18d3db",
"score": "0.5602761",
"text": "def get(path)\n path = Pathname.new(path)\n @bags.lazy.map { |bag| bag.get(path, do_raise: false) }.find { |page| page }\n end",
"title": ""
}
] | [
{
"docid": "bb59d913b1e8ccb2ce7358e981fa3c2a",
"score": "0.7067271",
"text": "def find_file( path )\n find_files( path ).first\n end",
"title": ""
},
{
"docid": "0151157926c3f2abd779fae22344e958",
"score": "0.6717019",
"text": "def find_file(file)\n file_name = File.basename... |
2a671c1ba098516bf0fee412bc72750e | By default, expire in 5 years | [
{
"docid": "a7083f8540c8f99806937170070e11aa",
"score": "0.0",
"text": "def public_url(expires = (Time.now + 5 * 365 * 24 * 60 * 60))\n requires :objectid\n # TODO - more efficient method to get this?\n storage = Fog::Storage.new(:provider => 'Ninefold')\n uri = URI::... | [
{
"docid": "adb0fff7c3c4e8dc63da3bc3d0946593",
"score": "0.8088831",
"text": "def expire!\n expire_at(Time.now + 5)\n end",
"title": ""
},
{
"docid": "87b94f45b155f08b33d9702e1cb8e768",
"score": "0.80678415",
"text": "def expire; end",
"title": ""
},
{
"do... |
2b434115d9f82f07e0fc92c0f462f645 | Save an activity log for the specified user. | [
{
"docid": "fbf688618914721e7a4b6313f25a0dfc",
"score": "0.77869064",
"text": "def save_activity_log(activity_log)\n activity_log.user = self\n activity_log.save\n end",
"title": ""
}
] | [
{
"docid": "ee4c4bf4c3e884b5b2ba3895b4ed4415",
"score": "0.7269729",
"text": "def log_activity(opts)\n post(\"user/#{@user_id}/activities.json\", opts)\n end",
"title": ""
},
{
"docid": "363c6293bbb2370b8c5f610712be33e4",
"score": "0.72280705",
"text": "def log_activity(param... |
3b826b26e95f6641981684ee5ff65358 | Provide a user friendly representation | [
{
"docid": "a4963f4f5b48268aa9e083691ea1d7de",
"score": "0.0",
"text": "def to_s\n '#<Twilio.Api.V2010.CallList>'\n end",
"title": ""
}
] | [
{
"docid": "215f29191080c4bf1c51441e99ca812a",
"score": "0.70442086",
"text": "def to_display\n raise NotImplementedError\n end",
"title": ""
},
{
"docid": "10e71201c7d33f56a89616b30aa39d6b",
"score": "0.7027267",
"text": "def to_s; description end",
"title": ""
},
{
... |
eeae9bc8eaee92331b5260d84d01625c | =============================== Metatdata Manipulation =============================== | [
{
"docid": "e6603f677c700d7eee804f471d853045",
"score": "0.0",
"text": "def find_metadata_file(cookbook_name, local_path)\n Array(local_path).reverse.each do |path|\n file = File.expand_path(File.join(path, cookbook_name, 'metadata.rb'))\n if File.exists?(file)\n ui.i... | [
{
"docid": "e766550975c1b744c02e92186be7f513",
"score": "0.6203255",
"text": "def metadata m\n\t\tm\n\tend",
"title": ""
},
{
"docid": "5bd4c9f8709b3e410519c7095db75b13",
"score": "0.6062264",
"text": "def normalize_data\n normalize_hemi\n normalize_values\n end",
"t... |
189847c6233ea0002128fd2f1abad9cc | Generates the slider initialization script | [
{
"docid": "83a28b1e6c529f10eeb97747512eba6d",
"score": "0.58126116",
"text": "def slider_generator(context, name, value, options, method=nil)\n value ||= ActionView::Helpers::InstanceTag.value_before_type_cast(\n context.instance_variable_get(\"@#{name}\"), method.to_s ) if method\n ... | [
{
"docid": "40baa6255b638c3fd98a3e534d94735f",
"score": "0.71082413",
"text": "def run_init_script; end",
"title": ""
},
{
"docid": "40baa6255b638c3fd98a3e534d94735f",
"score": "0.71082413",
"text": "def run_init_script; end",
"title": ""
},
{
"docid": "33c038f39b935377a0... |
739a4ea3afe04330f1dc05efcc13d074 | TODO... GR: this is view code must be moved out of the model | [
{
"docid": "47452803cc733a29ff1c2e0ae892f28e",
"score": "0.0",
"text": "def to_label #so text doesn't spill over in nested scaffs.\n to_s\n end",
"title": ""
}
] | [
{
"docid": "2dd79bf5204ab22c940e4d6b548faf5d",
"score": "0.63398206",
"text": "def field_of_view\n end",
"title": ""
},
{
"docid": "38354c0dd0c314483e4c023b64e49f68",
"score": "0.6109261",
"text": "def view; end",
"title": ""
},
{
"docid": "38354c0dd0c314483e4c023b64e49f... |
5bab5224eddc7635a75e1a299025a264 | Step to next line in current file | [
{
"docid": "39f539767aec58a53f31cccbf2dcf930",
"score": "0.0",
"text": "def step_over\n input(model.step_over)\n end",
"title": ""
}
] | [
{
"docid": "cca2e646f9d3303b823ff3a097a2872a",
"score": "0.78907347",
"text": "def move_to_next_line()\r\n while @seek_ptr < @len && @fileBuf.at(@seek_ptr) != \"\\n\"\r\n @seek_ptr = @seek_ptr + 1\r\n end\r\n end",
"title": ""
},
{
"docid": "ef610a7ee24c6117f0abc51c183e745e",
... |
381475384b12cbd191c0ab7e9396171c | Load prepare commands if there are at least one node | [
{
"docid": "0b8866ee05b75a5eb5955e85f398adfd",
"score": "0.8106046",
"text": "def load_prepare_commands\n (self.extend Bebox::PrepareCommands) if Bebox::Node.count_all_nodes_by_type(project_root, 'nodes') > 0\n end",
"title": ""
}
] | [
{
"docid": "6d2e8716219022ff82684ac15f7331ab",
"score": "0.70780987",
"text": "def load_provision_commands\n (self.extend Bebox::ProvisionCommands) if Bebox::Node.count_all_nodes_by_type(project_root, 'prepared_nodes') > 0\n end",
"title": ""
},
{
"docid": "089e673b370d2f87c8923e70d2... |
ecc3cc38e8584d07f8c22b1fb5129fd1 | Shortcut for a version of labeled_input that suppresses the label text. Just calls labeled_input with :label => false. | [
{
"docid": "7faf7bf25d1c777094b7dd080f2113a1",
"score": "0.7476935",
"text": "def unlabeled_input(object_name, method, options)\n labeled_input(object_name, method, options.merge!(:label => false))\n end",
"title": ""
}
] | [
{
"docid": "58e1e7128e8ff1bec616f3e0c0eb5140",
"score": "0.69022447",
"text": "def empty_label\n template.content_tag(:label, '', :class => 'control-label') do end\n end",
"title": ""
},
{
"docid": "dada1cf45cd6e6cd3677f83948ceee0f",
"score": "0.6883603",
"text": "def emp... |
4c91aab46af0020d6093cc52317dc54e | DELETE /components/1 DELETE /components/1.json | [
{
"docid": "3adc46e5d4c5244e39a65f1ba29e4529",
"score": "0.7397648",
"text": "def destroy\n @component.destroy\n respond_to do |format|\n format.html { redirect_to components_url, notice: 'Component was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"... | [
{
"docid": "cf0ce7605d07d9e6625cf26b00369dfb",
"score": "0.7671605",
"text": "def destroy\n @component = Component.find(params[:id])\n @component.destroy\n\n respond_to do |format|\n format.html { redirect_to components_url }\n format.json { head :no_content }\n end\n end",
"t... |
4ad830d510c577692714274028af5c30 | Make an effort to distinguish an Ansible role from other sorts of artifacts, since 'roles' is an awfully generic name for a directory. Short of a full, slow syntax check, this is the best we're liable to do. | [
{
"docid": "f813681cd90252703f2f3ef8c7ba4e2e",
"score": "0.64417607",
"text": "def isAnsibleRole?(path)\n begin\n Dir.foreach(path) { |entry|\n if File.directory?(path+\"/\"+entry) and\n [\"tasks\", \"vars\"].include?(entry)\n return true # https://knowyourm... | [
{
"docid": "2291c467d80f8a63ca9181e31944f8af",
"score": "0.65467435",
"text": "def installRoles\n roledir = @ansible_path+\"/roles\"\n\n canon_links = {}\n\n repodirs = []\n\n # Make sure we search the global ansible_dir, if any is set\n if $MU_CFG and $MU_CFG['ansible... |
577fdff27fa128fed7da668d77bd0d46 | Upstream dynamically calculated queue urls for each job; we'd rather route jobs into a predetermined queue url instead. | [
{
"docid": "814c93173ce71126c02a64629bc7e775",
"score": "0.6682495",
"text": "def queue_url(*_)\n if Settings.active_job_queue.url\n Settings.active_job_queue.url\n else\n super\n end\n end",
"title": ""
}
] | [
{
"docid": "f7d086dfa441a8c5d0b2ea874ba5f6c1",
"score": "0.6981554",
"text": "def queue_urls\n @queue_urls ||= init_urls\n end",
"title": ""
},
{
"docid": "0706676028902a2c44203c1b88d36e43",
"score": "0.6471861",
"text": "def enqueue_outgoing_jobs(job)\n job.outgoi... |
1bed7308e679338d402a265fc64d4e32 | GET /measurement_rels GET /measurement_rels.json | [
{
"docid": "9cdfc19059239222b143b41a43c6c7a4",
"score": "0.7392997",
"text": "def index\n @measurement_rels = MeasurementRel.all\n end",
"title": ""
}
] | [
{
"docid": "560ff7456d8659c2da681398734f3b1c",
"score": "0.6306832",
"text": "def measurement_rel_params\n params[:measurement_rel]\n end",
"title": ""
},
{
"docid": "f6ec2cbb448487da925af6330037bd51",
"score": "0.5887012",
"text": "def set_measurement_rel\n @measurement... |
5bde0049a51bff8d98598f0b549ef8b4 | Setting up strict parameters for when we add account creation. | [
{
"docid": "fdfdf0d13665d1da85d69fa0c1511c69",
"score": "0.0",
"text": "def user_params\n params.permit(:username, :email, :password, :password_confirmation, :role, :approved)\n end",
"title": ""
}
] | [
{
"docid": "555a76ee0cfd0afb7e100e4b799e9f28",
"score": "0.68578345",
"text": "def account_params\n params.require(:account).permit!\n end",
"title": ""
},
{
"docid": "28817dbf214a528b06d0c3f8160a0317",
"score": "0.68263125",
"text": "def account_params\n params.fetch(:a... |
c3871d5222723b5d7f73ef24ab11e035 | Add more helper methods to be used by all tests here... | [
{
"docid": "0e069b1526dc84f54db369798bf19b28",
"score": "0.0",
"text": "def get_user\n if @user\n return @user\n else\n @user = User.where(email: 'test@test.com').first\n if !@user\n @user = User.new\n @user.email = 'test@test.com'\n @user.name = 'test'\n ... | [
{
"docid": "62158baafece84b452b305badc5dd98c",
"score": "0.7021585",
"text": "def helpers; end",
"title": ""
},
{
"docid": "62158baafece84b452b305badc5dd98c",
"score": "0.7021585",
"text": "def helpers; end",
"title": ""
},
{
"docid": "62158baafece84b452b305badc5dd98c",
... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "bb47afb146eab8b564f3bcf646064792",
"score": "0.0",
"text": "def set_work_type\n @work_type = WorkType.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... |
bfa6a8c45a4a96fbccb0fe60f8efe4d7 | for input from the commmand currently not use | [
{
"docid": "66c0c448a5c73561530716b6f0adbb60",
"score": "0.0",
"text": "def play_turn\n board.render\n pos = get_pos\n decision = get_decision\n if decision == \"r\"\n board.reveal(pos)\n elsif decision == \"f\"\n board.flag(pos)\n else\n ... | [
{
"docid": "62da24e832fa2b6d4d1515c9cb21c6d7",
"score": "0.7259725",
"text": "def run_cmd(input); end",
"title": ""
},
{
"docid": "a537bb20d39c0cb589cac56ec97331b5",
"score": "0.7107923",
"text": "def read_command(prompt); end",
"title": ""
},
{
"docid": "d1cf53b8ddf46c5a... |
05a6cf5552d52d6da2bedb8e1088a215 | info in initial state | [
{
"docid": "2215febdf469d7fd8f4c0db42aa4fb0d",
"score": "0.0",
"text": "def test_info_initial\n tu = SipMockTester::Tu.new\n nist = SIP::Transaction::NonInviteServerTransaction.new(tu, nil, nil, @t, nil, nil)\n nist.txn_received SipMockTester::MockRequest.new(\"INFO\")\n assert_equal(\"NistM... | [
{
"docid": "ac48c0bf237ebe517111acbf7365ed73",
"score": "0.71902657",
"text": "def info; end",
"title": ""
},
{
"docid": "ac48c0bf237ebe517111acbf7365ed73",
"score": "0.71902657",
"text": "def info; end",
"title": ""
},
{
"docid": "ac48c0bf237ebe517111acbf7365ed73",
"... |
0fc73393904807a27724b0105a626e59 | a combination of all address elements in the correct order with line breaks | [
{
"docid": "dbc3affe884b96eb449ef185c98a425b",
"score": "0.0",
"text": "def formatted_address\n @data['formattedAddress']\n end",
"title": ""
}
] | [
{
"docid": "48a05374a5024f083003904c56392e43",
"score": "0.6903229",
"text": "def address_lines(join_chars = ', ')\n address_lines_array.join(join_chars)\n end",
"title": ""
},
{
"docid": "109fbf456ca1a4c11cd0a3c11af527a5",
"score": "0.68910617",
"text": "def address_line_1\n ... |
efae293de3f0769e8220217fab23df71 | GET /card_colors GET /card_colors.json | [
{
"docid": "d06b3547047fe377abddb1db7c6f25a9",
"score": "0.7486386",
"text": "def index\n @card_colors = CardColor.all\n end",
"title": ""
}
] | [
{
"docid": "aae408e65561216770a5fcbd56356398",
"score": "0.77123773",
"text": "def colors\n call_api('/colors')\n end",
"title": ""
},
{
"docid": "91584fda9340f04481c437ced29bad65",
"score": "0.7435114",
"text": "def show\n @card_color = CardColor.find(params[:id])\n\n ... |
343c5245002f39751b035b1cf27b2552 | Start NEF services (for object). | [
{
"docid": "d09a7bd62e3b157e57ba8ead0d89f349",
"score": "0.0",
"text": "def puts! arg, label=''\n puts \"+++ +++ #{label}\"\n puts arg.inspect\nend",
"title": ""
}
] | [
{
"docid": "4a1ef6b245f7ff135ac58fc538855b9e",
"score": "0.65237176",
"text": "def service_main(*args)\n @knots_server.start\n end",
"title": ""
},
{
"docid": "21768c97e77ff84030482bdeaed3d8f7",
"score": "0.64751863",
"text": "def start\n do_for_each_service { |serv... |