query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
d7639f26a016b4d1e1c7d5cee3f6d0c0 | Add a new boating test with Student instance | [
{
"docid": "5020b3725d500cbd76decd484752b079",
"score": "0.74708927",
"text": "def add_boating_test(test_name, test_status, instructor)\n BoatingTest.new(self, instructor, test_status, test_name)\n end",
"title": ""
}
] | [
{
"docid": "79b87776793b2cedf7a965d0fb929774",
"score": "0.85130817",
"text": "def add_boating_test(boating_test_name, boating_test_status, instructor)\n# We're in the Student class, so this method won't accept an argument of student; the instance IS the student.\n new_boating_test = BoatingTest.new(... |
ee0612626248f4e926fbcff804353ba5 | GET /tour_package_reservations GET /tour_package_reservations.json | [
{
"docid": "fd7a26583e4b4b5de7d5aacaa49cc486",
"score": "0.7651425",
"text": "def index\n @tour_package_reservations = TourPackageReservation.all\n end",
"title": ""
}
] | [
{
"docid": "4ae742f514765a57b76749ee9798b76e",
"score": "0.70983505",
"text": "def index\n @reservations = Reservation.all\n\n render json: @reservations\n end",
"title": ""
},
{
"docid": "fab0b61d59635c6c7ed84df1765a31b4",
"score": "0.7096232",
"text": "def future_reservation... |
310c72ac381665f039ad1a387726ff6e | If a grandparent page is associated with a supergroup page then all of the descendant pages are bound to all of the descendant groups. | [
{
"docid": "ffb8db5b3660bd3cbf26b4f3b824fb22",
"score": "0.49061155",
"text": "def inherited_group_ids\n self.ancestors.map(&:group_ids).flatten.uniq\n end",
"title": ""
}
] | [
{
"docid": "e449fb95c5eefa2a212448cfbed3f832",
"score": "0.62738585",
"text": "def set_restrictions_to_child_pages\n self.descendants.map do |c|\n c.update_attributes(:restricted => self.restricted?)\n end\n end",
"title": ""
},
{
"docid": "1028400c5971239f166b2349f18f0f73",
... |
c898bdddc32b4e6de8d0c98803d6525b | Yields the given block for each project with its level in the tree Wrapper for Projectproject_tree | [
{
"docid": "0d579314e80ea4e8a4c2bcbe993ae585",
"score": "0.73602587",
"text": "def project_tree(projects, &block)\n Project.project_tree(projects, &block)\n end",
"title": ""
}
] | [
{
"docid": "9691981d76ff0290fe58b440f394fa1e",
"score": "0.71878785",
"text": "def each_project\n # For convenience, return the projects in lexicographical order.\n names = @projects.keys.sort!\n names.each do |n|\n yield @projects[n] unless @projects[n].drupal?\n end\n end... |
42363524d9e71fefa09c21a9f03d245f | Invokes the Action for a given SurveyResponse. Updates the appropriate DisplayFieldValue with either the RawResponse's value (in case of a question response) or specific text (for custom DisplayFields.) | [
{
"docid": "7e42da265d8f6062a44677bbd3293584",
"score": "0.7355675",
"text": "def perform(survey_response)\n #get target DFV\n display_field_value = DisplayFieldValue.find_or_create_by(\n survey_response_id: survey_response.id,\n display_field_id: self.display_field_id\n )\n if val... | [
{
"docid": "727966d55e23fcdfb2b96840844a8c30",
"score": "0.6188556",
"text": "def update\n render nothing: true unless action_allowed?\n msg = ''\n begin\n # the response to be updated\n # Locking functionality added for E1973, team-based reviewing\n if @map.team_reviewing_enable... |
9f8f066739e49ab959c583662768c26a | POST /brts POST /brts.json | [
{
"docid": "55d65775b3be14e6404528514ac6eaa3",
"score": "0.7258519",
"text": "def create\n @brt = Brt.new(params[:brt])\n\n respond_to do |format|\n if @brt.save\n format.html { redirect_to @brt, notice: 'Brt was successfully created.' }\n format.json { render json: @brt, status... | [
{
"docid": "4d0e6d57078b8c679b7f4878092bf859",
"score": "0.6408986",
"text": "def create\n @brite_rt_barabasis = BriteRtBarabasi.new(brite_rt_barabasis_params)\n\n respond_to do |format|\n if @brite_rt_barabasis.save\n format.html { redirect_to @brite_rt_barabasis, notice: 'Brite rt ba... |
801816324b994d1f6f39bfebf845fb80 | Un collect msg of user. | [
{
"docid": "7b558d1667d77d088c4037fdf2fb838d",
"score": "0.689564",
"text": "def un_collect_msg(msgid)\n uri = \"cgi-bin/setstarmessage?t=ajax-setstarmessage&token=#{ @token }&lang=zh_CN\"\n params = {\n ajax: 1,\n f: 'json',\n lang: 'zh_CN',\n msgid: msgid,\n ... | [
{
"docid": "64e28202cfc67c5aba4b632faab2c0bd",
"score": "0.6681717",
"text": "def unreceive message, headers={}\n end",
"title": ""
},
{
"docid": "e4287cdc5c86b89d24999e538774853d",
"score": "0.65531445",
"text": "def unsub(user, tag = nil)\n raise Error, \"Missing user... |
40dd3a447798788fea091c5245fee65b | Accesses the "locations.streetInfo" method from the Glitch API padding in the supplied street ID | [
{
"docid": "c58f9baa4d3bd54e5ef29483eb87d677",
"score": "0.787557",
"text": "def get_street(street_id)\n response = self.call(\"locations.streetInfo\", :street_tsid => street_id)\n Models::Street.new(response)\n end",
"title": ""
}
] | [
{
"docid": "7fac50ab6ee2a8b322897fddeebc7d58",
"score": "0.6972249",
"text": "def street_address\n self.dig_for_string(\"officeSummary\", \"officeAddress\", \"streetAddress\")\n end",
"title": ""
},
{
"docid": "2de512846452cb1e7e310e9d431c6432",
"score": "0.6779686",
"text": "def... |
17a37ecc5a85a9c3ad05b5cf4efd7d74 | GET /news/1 GET /news/1.json | [
{
"docid": "5339e2e3b0c6775b3adea633f4cf90f3",
"score": "0.72104734",
"text": "def show\n if @news.nil?\n render json: {error: \"Not Found\"}, status: :not_found\n else\n render json: @news, status: :ok\n end\n end",
"title": ""
}
] | [
{
"docid": "3f4cfa85b1a312971fcf2830ec1e58a9",
"score": "0.78173685",
"text": "def index\n \n @news = News.all\n @latest_news = News.latest_news\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @news }\n end\n end",
"title": ""
},
{... |
01ed27ef17a23aa56d95d2fc8d71c730 | Define the child relationship on the bridge table to the dimension table. We can specify a different class name for the bridge table and different foreignkey. | [
{
"docid": "848dfb36c2b29a828458d9538f07e18c",
"score": "0.783241",
"text": "def child_bridge(association_id, options = {})\n options[:class_name] ||= name.gsub(/Dimension$/, 'HierarchyBridge')\n options[:foreign_key] ||= \"parent_id\"\n has_many association_id, op... | [
{
"docid": "f42fdcf035211be3a2c3b3605f370322",
"score": "0.7135799",
"text": "def parent_bridge(association_id, options = {})\n options[:class_name] ||= name.gsub(/Dimension$/, 'HierarchyBridge')\n options[:foreign_key] ||= \"child_id\"\n has_many association_id, o... |
d2b800ef28e9035134211d60454ec453 | PATCH/PUT /payees/1 PATCH/PUT /payees/1.json | [
{
"docid": "a593b2460d01f85ee628f8e9ced37c84",
"score": "0.61412823",
"text": "def update\n if @payee.update(payee_params)\n redirect_to @payee, notice: 'Payee was successfully updated.'\n else\n render :edit\n end\n end",
"title": ""
}
] | [
{
"docid": "e08961f794c71289458259da3727b800",
"score": "0.6879935",
"text": "def update\n @payee = Payee.find(params[:id])\n\n respond_to do |format|\n if @payee.update_attributes(params[:payee])\n format.html { redirect_to @payee, notice: 'Payee was successfully updated.' }\n ... |
192fd58eeb37ffb2e700e85ce962201f | WikisController before_filters (original) :require_admin_user, :except => [:index, :show, :tag_index, :tagcloud, :list_by_tag] :require_wiki_read_access, :only => [:show, :tag_index, :tagcloud, :list_by_tag] | [
{
"docid": "e31508efc2690218216ef2f7b54fdc73",
"score": "0.56284964",
"text": "def setup_wiki_access(user)\n can :read, Wiki do |wiki| # todo create sql to use for Wiki.accessible_by\n user.has_read_access_to?(wiki)\n end\n # can? :create, WikiPage.new, @wiki\n can :create, WikiPage do ... | [
{
"docid": "5d72b15c22f41fb503b2f71fcd7db46b",
"score": "0.69245505",
"text": "def index\n #only show private wikis to those that are admins or premium users\n @wikis = policy_scope(Wiki)\n\n end",
"title": ""
},
{
"docid": "a1b2f370d6c07d436345b613cf55ce3b",
"score": "0.6793371",... |
42edf6b116f945f8dfbeb12ddc2b811a | GET /profs/1 GET /profs/1.json | [
{
"docid": "d85933340cd535f2ade5792848782562",
"score": "0.63923013",
"text": "def show\n @prof = Prof.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @prof }\n end\n end",
"title": ""
}
] | [
{
"docid": "f4a97daa4af898081adfead17c49c95b",
"score": "0.7313811",
"text": "def index\n @profs = Prof.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @profs }\n end\n end",
"title": ""
},
{
"docid": "f414271b342fcf246461cae7bb1... |
79ad133702e21c877c7d39b8c0d1e48e | GET /participacaos GET /participacaos.json | [
{
"docid": "abdc6edf4d8de72ecb425c667f3911c2",
"score": "0.731017",
"text": "def index\n @participacaos = Participacao.all\n end",
"title": ""
}
] | [
{
"docid": "ee08858cabf883661dcc3e1c68b0c342",
"score": "0.70435685",
"text": "def index\n @tipo_participantes = TipoParticipante.all\n render json: @tipo_participantes\n end",
"title": ""
},
{
"docid": "6a5850ebc51caa17b5cd4c3082488f90",
"score": "0.7030701",
"text": "def ind... |
d6aa8731153b7dee0b13db6f9446de6a | DELETE /admin/networks/1 DELETE /admin/networks/1.xml | [
{
"docid": "071b2e625de7795ca7db011c63f4b1c5",
"score": "0.7502178",
"text": "def destroy\n @network = Network.find(params[:id])\n @network.destroy\n\n respond_to do |format|\n format.html { redirect_to(admin_networks_url) }\n format.xml { head :ok }\n end\n end",
"title": ""... | [
{
"docid": "df96749e990112ff4311985a3184011f",
"score": "0.7274842",
"text": "def destroy\n @title = \"Destroy Networks\"\n @network = Network.find(params[:id])\n @network.destroy\n\n respond_to do |format|\n format.html { redirect_to(networks_url) }\n format.xml { head :ok }\n ... |
12b8099e1440a114f364562301946656 | Helper for serializing to JSON so that thread_before is not called recursively by serialize_with_options. It returns the results of thread_before as structs instead of Comment objects. These will automatically be serialized asis UNUSED LEAVING AS EXAMPLE OF STRUCT USAGE | [
{
"docid": "b344c98d1e75a2c666e2b6f1bfac7965",
"score": "0.6220999",
"text": "def earlier_comments\n if comms = thread_before\n comms.map do |c| \n ETComment.new(c.comment, c.title, c.created_at, c.commenter_data, commentable.id, commentable.type)\n end\n end\n end",
"title":... | [
{
"docid": "78883f283bc7aa8b3d6c2fe89f9008eb",
"score": "0.5799742",
"text": "def jsonify_threads(threadlist, order)\n return @json_cache if @json_cache\n threads = {}\n threadlist.each do |id, thread|\n threads[id] = {\n :date => thread[:date].to_i\n }\n threads[id][:teas... |
4cec66519e0e5caeea89644aa9c8f727 | Read a 'firmware.FirmwareSummary' resource. | [
{
"docid": "61e946565250f275901b039fea4465fb",
"score": "0.67032796",
"text": "def get_firmware_firmware_summary_list(opts = {})\n data, _status_code, _headers = get_firmware_firmware_summary_list_with_http_info(opts)\n data\n end",
"title": ""
}
] | [
{
"docid": "f9a7c3796dd9090d21739edad06c1b24",
"score": "0.6037371",
"text": "def get_firmware\n ensure_client && ensure_uri\n response = @client.rest_get(@data['uri'] + '/firmware')\n @client.response_handler(response)\n end",
"title": ""
},
{
"docid": "e33... |
88dc183c98b7641b8edb237e3ee0940d | Return a range of records from the end of the table e.g. to return the second and third last records MyModel.last_range(3, 1) | [
{
"docid": "d878ad783dad7b8a1d4131a14720a6d5",
"score": "0.7397562",
"text": "def last_range(first, last)\n self.last(first) - self.last(last)\n end",
"title": ""
}
] | [
{
"docid": "d6363e37bf41c149fa36d20678eb7142",
"score": "0.6826716",
"text": "def last_range\n if last_summary_path.exist?\n read_summary(last_summary_path).time_range\n else\n Time.at(-1)..Time.at(0)\n end\n end",
"title": ""
},
{
"docid": "cfdfb7c313529535af... |
dcebc958ceb3002c52fcb7a43a5184a3 | returns if a specific coordinate has a piece | [
{
"docid": "1d41800d497b40a2a4a2389b492ceb75",
"score": "0.7116759",
"text": "def is_coordinate_occupied(coordinate)\n @board[coordinate].nil?\n end",
"title": ""
}
] | [
{
"docid": "8feecfc676092969491b1fe6b180d588",
"score": "0.8114798",
"text": "def piece_in_space?(x, y)\n pieces.where(position_x: x, position_y: y).any? ? true : false\n end",
"title": ""
},
{
"docid": "10a844ebae9ea9d786c66e34c5543d86",
"score": "0.7902767",
"text": "def occupi... |
e74b3635c8b82676bfd90ae4d8eaa38f | Returns true if a nonsense username appears active. | [
{
"docid": "d690ecc803434d2086687765afe56ec3",
"score": "0.0",
"text": "def check_false_positive(ip)\n user = Rex::Text.rand_text_alphanumeric(8..32)\n attempt_user(user, ip) == :success\n end",
"title": ""
}
] | [
{
"docid": "3219cff8898680b690a59b6d53a5be67",
"score": "0.7781447",
"text": "def username_verified?\n self.username && self.username !~ TEMP_USERNAME_REGEX\n end",
"title": ""
},
{
"docid": "b34844b7b8919e2e13be5f5f65c4cd62",
"score": "0.74621147",
"text": "def username_availabl... |
2f6b3da3f00e5d25bbdc7c858c2a4448 | Wraps body in a protect call which collects return values via exceptions. | [
{
"docid": "9388ee73c3419cb22e81740c86310e1f",
"score": "0.8111641",
"text": "def protect_body body\n if @return\n <<-BRAT\n protect {\n #{body}\n }\n rescue: { e |\n true? e.type == :return\n { e.return_value }\n { throw e }\n }\n BRAT\n ... | [
{
"docid": "92b821bc8a9ff313f4ff384bacde9216",
"score": "0.60954654",
"text": "def protect()\n res = super(context,self)\n return res\n end",
"title": ""
},
{
"docid": "224cc75c986657352320f5a170ecdea7",
"score": "0.5782547",
"text": "def protect_rethrow component_name=n... |
a583ae362e484cf7c06facfa636a615a | POST /press_reviews POST /press_reviews.json | [
{
"docid": "0d5976a2fa6711d9c26d4e5a6b005a33",
"score": "0.7271694",
"text": "def create\n @press_review = PressReview.new(press_review_params)\n\n if @press_review.save\n redirect_to press_reviews_path, notice: t('actions.save.success')\n else\n flash.now[:error] = t('actions.save.er... | [
{
"docid": "8efc0fbf5b99d3ed070fc5f9e06c19f3",
"score": "0.7133416",
"text": "def create\n @review = @reviews.build(review_params)\n\n respond_to do |format|\n if @review.save\n format.json { render :index }\n else\n format.json { render json: @review.errors, status: :unpro... |
a248c80637ae081fe43208bd8fc80c0e | Acknowledge the transaction to Offerpal. This method has to be called after a new apc arrives. Offerpal will verify that all the information we received are correct and will return a ok or a fail. Example: def ipn notify = OfferpalNotification.new(request.raw_post) if notify.acknowledge ... process order ... if notify.... | [
{
"docid": "1318bb7bbe7093f72981dbf81b3f9712",
"score": "0.0",
"text": "def valid_signature?\n params['verifier'] == Digest::MD5.hexdigest([ params['id'], params['snuid'], params['currency'], Offerpal.secret_key ].join(':'))\n end",
"title": ""
}
] | [
{
"docid": "336b50f5c7613d9895476992437013e0",
"score": "0.8100609",
"text": "def acknowledge\n payload = @raw\n noti_confirm = Alipay.notification_confirmation_url\n noti_confirm += (\"partner=\" + Alipay::ACCOUNT.to_s + \"¬ify_id=\" + notify_id)\n PAYMENT_LOG.info \"============... |
ec0855055d527664e092302a9dc408af | returns list of group names | [
{
"docid": "448dcfc1c765b624be60006c727db97b",
"score": "0.84938484",
"text": "def group_names\r\n\t\tnames = []\r\n\t\tgroup.each do |mem|\r\n\t\t\tnames << mem.name\r\n\t\tend\r\n\t\tnames\r\n\tend",
"title": ""
}
] | [
{
"docid": "2cd7491e78881675433fd1fd497c499a",
"score": "0.9249383",
"text": "def group_names\n groups.collect { |g| g.name }\n end",
"title": ""
},
{
"docid": "8438614d83c08018f064e4ae6d68f26f",
"score": "0.8429294",
"text": "def group_names\n @group_names ||= groups.ma... |
98731efae233ec1ccdf3848f97b486ed | DELETE /factlineaedesals/1 DELETE /factlineaedesals/1.xml | [
{
"docid": "5daa1caf078fdadded3616903451257a",
"score": "0.7223751",
"text": "def destroy\n @factlineaedesal = Factlineaedesal.find(params[:id])\n @factlineaedesal.destroy\n\n respond_to do |format|\n format.html { redirect_to(factlineaedesals_url) }\n format.xml { head :ok }\n en... | [
{
"docid": "e95b93f24aa800f57cbd76c0d1115fdf",
"score": "0.6886405",
"text": "def destroy\n @factoid = Factoid.find(params[:id])\n @factoid.destroy\n\n respond_to do |format|\n format.html { redirect_to(factoids_url) }\n format.xml { head :ok }\n end\n end",
"title": ""
},
... |
2e89c001d8fdf8f9bd79698bf13dfcb7 | GET /lifeanamneses/1 GET /lifeanamneses/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "fbfa374703c3c7fcf0b6a8ab9a536cdc",
"score": "0.68352365",
"text": "def index\n @lifeanamneses = Lifeanamnese.all\n end",
"title": ""
},
{
"docid": "1c56c049a2c1719001f3175cc22d7b23",
"score": "0.6714723",
"text": "def show\n @life_pulse = LifePulse.find(params[:id]... |
899ab9a1b785688c18b64518364999d4 | Copy an existing file | [
{
"docid": "369c25fb202af2a70c2ebab5259399f8",
"score": "0.0",
"text": "def copy_file(client, origin_file_id, copy_title)\n\n drive = client.discovered_api('drive', 'v2')\n copied_file = drive.files.copy.request_schema.new({\n 'title' => copy_title\n })\n result = client.execute(\n :api_method... | [
{
"docid": "c704e8fb207fbc41cfb480a486ee06d3",
"score": "0.84969",
"text": "def copy_file(src, dst)\n FileUtils.cp(src, dst)\n end",
"title": ""
},
{
"docid": "d62b03ebe80f862ce48fcb2a2cb0e85b",
"score": "0.8239698",
"text": "def copy_file(src, dest)\n\tFileUtils.cp src, ... |
b05d6eeb0ffccc3e15b35027dd0f6abf | Returns address unconfirmed balance in sats Returns NEBL address unconfirmed balance in satoshis | [
{
"docid": "e0ad0d897d1a554eb5a04ca303c25f54",
"score": "0.55714625",
"text": "def get_address_unconfirmed_balance(address, opts = {})\n data, _status_code, _headers = get_address_unconfirmed_balance_with_http_info(address, opts)\n data\n end",
"title": ""
}
] | [
{
"docid": "de8cf2835dd258513a303d2cc22c92f9",
"score": "0.66454303",
"text": "def fetch_balance_for(address)\n api_request(\"/rawaddr/#{address}\")['final_balance']\n end",
"title": ""
},
{
"docid": "886092211b3949a9d20c0fa782d96c5b",
"score": "0.65075755",
"text": "def ... |
a831a2a39e7e20c03e6ad20e56e6dd98 | Special case: if a worker is not owned, get the feature category (if present) from the calling context. | [
{
"docid": "72f26fe9731ffbe074da0ebbd64c9a1c",
"score": "0.7556598",
"text": "def get_feature_category\n feature_category = get_class_attribute(:feature_category)\n\n return feature_category unless feature_category == :not_owned\n\n Gitlab::ApplicationContext.current_context_attribute('me... | [
{
"docid": "4e4160a1d68b0e92e39835a671aab898",
"score": "0.75691676",
"text": "def get_feature_category\n Gitlab::ApplicationContext.current_context_attribute('meta.feature_category') || :not_owned\n end",
"title": ""
},
{
"docid": "cc9ffb749b61d950eb1647a0c13bfea0",
"score":... |
76b28008a0dd2d9b9a9340ccd970cfc3 | Delegate some methods to root element | [
{
"docid": "bd81d8c19bfb2b4f980bd14450b362f6",
"score": "0.69419163",
"text": "def method_missing(meth, *args)\n if @elements[@root].respond_to? meth\n @elements[@root].send meth, *args\n else\n super\n end\n end",
"title": ""
}
] | [
{
"docid": "e67b5930c0cc32e8804c5d631aa310f2",
"score": "0.6632153",
"text": "def document_root_element; end",
"title": ""
},
{
"docid": "5eeee77764c326188892d060cb99e7a9",
"score": "0.6018511",
"text": "def method_missing method, *args, &block\n # respond_to?(symbol, include_... |
01c0aca5b386ff3378e7d899a60dd1a3 | Read a signed fixed 32 bit integer from the buffer (little endian). | [
{
"docid": "b7c54fdf95bb33897a81b5427be57fbe",
"score": "0.6992128",
"text": "def read_sfixed32\n un_zig_zag(read_fixed32)\n end",
"title": ""
}
] | [
{
"docid": "fbc8648653b3ab918fbce876249e3b48",
"score": "0.8023405",
"text": "def read_int32_be\n reader.read(4).unpack('l>').first\n end",
"title": ""
},
{
"docid": "02acce86b861590b52d9d74a1589a206",
"score": "0.76674336",
"text": "def read_uint32_be\n reader.read(4).u... |
e561e11bcf379ef5dc139c210017366b | Only allow a list of trusted parameters through. | [
{
"docid": "a13c5de1573d436b25595447446db3ab",
"score": "0.0",
"text": "def employee_params\n params.require(:employee).permit(:name, :user_id, :auth_level)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7476923",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "36956168ba2889cff7bf17d9f1db41b8",
"score": "0.71697617",
"text": "def set_param_whitelist(*param_list)\n self.param_whitelist ... |
f7dfe67b4be21fa90b737561959683a2 | Load environment specific configuration settings if the environment file exists. | [
{
"docid": "7c6b32207e973131b9ae885f8a84d5b8",
"score": "0.7548214",
"text": "def load_environment\n fn = Enigma.config_path('environments', \"#{@config.environment}.rb\")\n return self unless test(?f, fn)\n\n config = @config\n eval(IO.read(fn), binding, fn)\n self\n end",
... | [
{
"docid": "4979abd678a8915f0d24b2f2cefa7fa0",
"score": "0.7817902",
"text": "def load_env()\n env_json_file = Rails.root.join('config/env.json')\n environment_name = Rails.env\n puts \"EnvJson: file #{env_json_file} does not exists\" && return unless File.exist? env_json_file\n EnvJ... |
63eadd075b33d20e83b4a9917867a1db | DELETE /yelp_searches/1 DELETE /yelp_searches/1.json | [
{
"docid": "85272e2de67d6c300f137fb3bb76b510",
"score": "0.72271216",
"text": "def destroy\n @yelp_search.destroy\n respond_to do |format|\n format.html { redirect_to yelp_searches_url, notice: 'Yelp search was successfully destroyed.' }\n format.json { head :no_content }\n end\n end... | [
{
"docid": "7eccab4c2407bcf3cd0584f8a3aa81e1",
"score": "0.6864882",
"text": "def destroy\n @yelp.destroy\n respond_to do |format|\n format.html { redirect_to yelps_url, notice: 'Yelp was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"title": ""
},... |
15274f79de7ee26bad7f6578e6b1a8b8 | Interpret given cookie data as a Rack::Session::Cookie | [
{
"docid": "dde4b9bd2077035d3ac3cee0ba60d52e",
"score": "0.6302449",
"text": "def _deserialize_session(data)\n opts = roda_class.opts[:sessions]\n\n begin\n data = Base64.urlsafe_decode64(data)\n rescue ArgumentError\n return _session_serialization_error(... | [
{
"docid": "290bbae72003aeefea34dc534bf6cd1b",
"score": "0.7797704",
"text": "def decode_session_cookie(cookie)\n encoded_cookie_str = cookie.match(/rack\\.session=(\\S*);/)[1]\n data = Rack::Utils.unescape(encoded_cookie_str).unpack('m*').first\n Marshal.load(data)\nend",
"title": ""
},
{
... |
9f242789d33a24c33315e984eb1ce23a | Converts string to time format then gets the day of it. | [
{
"docid": "40c5b3a13db1b29ee0e4acf805193f23",
"score": "0.65140176",
"text": "def day_targeting(time)\n\tDateTime.strptime(time, '%m/%d/%Y %H:%M').wday\nend",
"title": ""
}
] | [
{
"docid": "89dd5ed0a978e194a4ec9884d7e7b148",
"score": "0.69993603",
"text": "def day_id time\n if time.kind_of? String\n return time if time =~ /^\\d{8}$/\n end\n raise ArgumentError, \"Invalid Time\" if not time.kind_of? Time\n time.strftime(\"%Y%m%d\")\... |
72c372cfe875b7db51d5cfe63e205279 | Base paths for external scripts which extend methods of cloud object. Names of scripts become instance methods and can override the predefined cloud methods. The factory defaults to using any scripts in "/bin/" directories. | [
{
"docid": "d46795b53010529e5c097c0df908c1f0",
"score": "0.6315515",
"text": "def extension_script_base_paths(*args)\n @extension_script_base_paths ||= []\n args.each do |path|\n path = relative_to_script_path(path)\n @extension_script_base_paths << path unless @extension_script_... | [
{
"docid": "cd379832acf2804d58d14439fd6c23f7",
"score": "0.7226146",
"text": "def extend_cloud_by_scripts(cloud, logger)\n # search for script directories based first on any clouds which were\n # extended by the cloud and then by the exact cloud name.\n cloud_name = cloud.name.to_s\n ... |
46b967c370bbafe6f11bf748dfdee827 | POST /post59s POST /post59s.xml | [
{
"docid": "edc2cbc1e263f6ff569cefca7928cc42",
"score": "0.61121225",
"text": "def create\n @post59 = Post59.new(params[:post59])\n\n respond_to do |format|\n if @post59.save\n format.html { redirect_to(@post59, :notice => 'Post59 was successfully created.') }\n format.xml { re... | [
{
"docid": "2394b79f5bffb803e8579dc22eede2af",
"score": "0.6115518",
"text": "def posttestrail(runId, caseId, statusId, versionId, elapsedseconds)\r\n\r\n uri = \"http://testrailgw.jupiter.bbc.co.uk/?action=add_result_for_case&run_id=#{runId}&case_id=#{caseId}&status_id=#{statusId}&version=#{versionI... |
af630984682f1a0b5a68e6092af0d102 | Update properties of this object | [
{
"docid": "b608069d0515d549d8d9e691728797ed",
"score": "0.0",
"text": "def update!(**args)\n @next_page_token = args[:next_page_token] if args.key?(:next_page_token)\n @results = args[:results] if args.key?(:results)\n @unreachable = args[:unreachable] if args.key?(:unreachab... | [
{
"docid": "184b1b1ed771473d3eb9f338c0734c38",
"score": "0.73066413",
"text": "def update *args\n opts = args.extract_options!\n fill_properties opts\n self.save\n end",
"title": ""
},
{
"docid": "5076c5a88404ae72986f958710f5687a",
"score": "0.72631145",
"text": "def update... |
8844fa9131772fe47ab36e32f1ff46a9 | Checks to make sure that MiniMagick can read the file and understand it. This uses the 'identify' command line utility to check the file. If you are having issues with this, then please work directly with the 'identify' command and see if you can figure out what the issue is. | [
{
"docid": "cc9bbb1febdcea79441cb4523fce006d",
"score": "0.0",
"text": "def valid?; end",
"title": ""
}
] | [
{
"docid": "f06ce7e144e9310908da4b71573de9bb",
"score": "0.7599153",
"text": "def validate!\n identify\n rescue MiniMagick::Error => error\n raise MiniMagick::Invalid, error.message\n end",
"title": ""
},
{
"docid": "c4f924900d4a2c0ab504564c85cdd3d8",
"score": "0.65911597... |
c58574d7b2e40198f4a702ade5ba3626 | Sneakers workergroup supports callable objects. | [
{
"docid": "ba167517bf29d7500ae5d74b64de0162",
"score": "0.5384648",
"text": "def call\n case activejob_workers_strategy\n when :only then activejob_workers\n when :exclude then sneakers_workers\n when :include then sneakers_workers + activejob_workers\n else\n raise \... | [
{
"docid": "e135cd265b11b6d621a401020ab6409a",
"score": "0.5717419",
"text": "def worker_pool; end",
"title": ""
},
{
"docid": "e135cd265b11b6d621a401020ab6409a",
"score": "0.5717419",
"text": "def worker_pool; end",
"title": ""
},
{
"docid": "f8935bc68578151eef49d2d2fbd8... |
86ba12283770591d024a3603f1c6546b | returns true if a_point is empty (there isn't ships there) | [
{
"docid": "eba14fc3eb2f0ea5013acb9f16bf7787",
"score": "0.82861984",
"text": "def is_empty(a_point)\n !ships.any? { |ship| ship.a_point_belongs_to_ship(a_point) } \n end",
"title": ""
}
] | [
{
"docid": "095e92b02c24ae1712df087dc9bd463b",
"score": "0.8091648",
"text": "def empty?\n !points\n end",
"title": ""
},
{
"docid": "0925d6cea521ac4bece98987c6c3988b",
"score": "0.79643565",
"text": "def empty?\n (points.nil? || points.empty?)\n end",
"title"... |
2178cc8f5a0450e9936314d5de5e8d66 | Gets the earlyLaunchAntiMalwareDriverEnabled property value. Require devices to be reported as healthy by Windows Device Health Attestation early launch antimalware driver is enabled. | [
{
"docid": "613000b399915f8d541fa466ae929934",
"score": "0.79293865",
"text": "def early_launch_anti_malware_driver_enabled\n return @early_launch_anti_malware_driver_enabled\n end",
"title": ""
}
] | [
{
"docid": "6587fcd410eb4d8f7f971efce3055200",
"score": "0.7577837",
"text": "def early_launch_anti_malware_driver_enabled=(value)\n @early_launch_anti_malware_driver_enabled = value\n end",
"title": ""
},
{
"docid": "f662e01b31ec387ea7a3d9b0aa168a62",
"score": ... |
b5323432e3be5069bb299104edc7ada1 | Update an Existing Section Modifies the specified section, but does not modify the section&39;s associated rules. Simultaneous update (modify) operations on same section are not allowed to prevent overwriting stale contents to firewall section. If a concurrent update is performed, HTTP response code 409 will be returne... | [
{
"docid": "3ead292dd86b059cf79eb26991fc032d",
"score": "0.70994675",
"text": "def update_section_with_http_info(section_id, firewall_section, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: ServicesApi.update_section ...\"\n end\n # ve... | [
{
"docid": "5c139e3b4299d336fba12e81736b9ff4",
"score": "0.80464715",
"text": "def update_section(section_id, firewall_section, opts = {})\n data, _status_code, _headers = update_section_with_http_info(section_id, firewall_section, opts)\n return data\n end",
"title": ""
},
{
"d... |
83614e1cf1efe80d97addbcd4c81a74a | layout "doc_patients",:only => [ :docs] | [
{
"docid": "a503cb963a9112fa84169d3eb9fdca2d",
"score": "0.0",
"text": "def index\n \t @courses = Course.all\n end",
"title": ""
}
] | [
{
"docid": "0d25aa38f2069cd19ad290f61cf45af8",
"score": "0.68738306",
"text": "def documentor_view\n\n end",
"title": ""
},
{
"docid": "917657a1ee0e82cfb9308b8ed825b5fd",
"score": "0.6506657",
"text": "def index\n render layout: \"special\"\n end",
"title": ""
},
{... |
063f4ada01f69193bc7cee38be502750 | class << self def User.new_token SecureRandom.urlsafe_base64 end def digest(string) Digest::SHA1.hexdigest string end end | [
{
"docid": "747281c331030d549a5949d7392a2352",
"score": "0.0",
"text": "def remember\n self.remember_token = SecureRandom.urlsafe_base64\n update_attribute(:remember_digest, Digest::SHA1.hexdigest(remember_token))\n end",
"title": ""
}
] | [
{
"docid": "b35e6487383cf62bd54c691b7df6a3c1",
"score": "0.777111",
"text": "def generate_token\n SecureRandom.hex(64)\nend",
"title": ""
},
{
"docid": "b35e6487383cf62bd54c691b7df6a3c1",
"score": "0.777111",
"text": "def generate_token\n SecureRandom.hex(64)\nend",
"title": ""... |
650053a6a123767596d93fced506dd34 | DELETE /transfers/1 DELETE /transfers/1.json | [
{
"docid": "1e9eb393fdeecadb56a7ca0ccc975dba",
"score": "0.6731664",
"text": "def destroy\n @stock = Stock.find(params[:stock_id])\n @transfer = @stock.transfer\n @transfer.destroy\n respond_to do |format|\n format.html { redirect_to stock_transfers_url(@stock),\n notice:'Transfer was ... | [
{
"docid": "6649a37e3f124e0305c35604ecf5533f",
"score": "0.7741951",
"text": "def destroy\n @transfer = Transfer.find(params[:id]) \n @transfer.destroy\n\n respond_to do |format|\n format.html { redirect_to transfers_url }\n format.json { head :no_content }\n end\n end",
"titl... |
64707030bb55175454d115150422342f | GET /billing_accounts/1 GET /billing_accounts/1.json | [
{
"docid": "9a7518b21c40ed90b3d6328612a38ed5",
"score": "0.0",
"text": "def show\n @is_billing_complement_activities = params[:is_billing_complement_activities].to_i == 1\n activities = @is_billing_complement_activities ? @billing_account.billing_complement_activities : @billing_account.billing_ac... | [
{
"docid": "d69ecf5b40123930cf8bc5a3c39cca5e",
"score": "0.8177209",
"text": "def get_billing_accounts\n path = self.api_root + '/api/profile/billingAccounts'\n process_firecloud_request(:get, path)\n end",
"title": ""
},
{
"docid": "d42e5aeed691040922d7c141241f4219",
"score": "0.... |
fa62f6273593a8bed03fb95e8afbed14 | Returns a hash of all ResourceTemplates (the tree flattened) keyed by name | [
{
"docid": "251f4b1c77e0cf4f171a5397d38bb9b7",
"score": "0.70488405",
"text": "def resource_templates_by_name\n @resource_templates_by_name ||= resource_templates.all_by_name\n end",
"title": ""
}
] | [
{
"docid": "812c1e6a8497e725f53c0bc41740f5be",
"score": "0.7406941",
"text": "def all_by_name(h = {})\n inject(h) do |hash, resource_template|\n hash[resource_template.name] = resource_template if resource_template.name\n resource_template.resource_templates.all_by_name(hash)\n ... |
3ae0485fa5d8574322e7c5144847dd1e | A paginated request method. Converts the page and per_page arguments into "rows" and "start". | [
{
"docid": "48903ba9307a0e08d32ab952c55abb62",
"score": "0.81123376",
"text": "def paginate page, per_page, path, opts = nil\n opts ||= {}\n opts[:params] ||= {}\n raise \"'rows' or 'start' params should not be set when using +paginate+\" if [\"start\", \"rows\"].include?(opts[:params].keys)\n ... | [
{
"docid": "152f452b15d57437764c5ed9d07c19d4",
"score": "0.79106295",
"text": "def build_paginated_request page, per_page, path, opts = nil\n opts ||= {}\n opts[:page] = page\n opts[:per_page] = per_page\n opts[:params] ||= {}\n values = RSolr::Pagination.calculate_start_and_row... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "9388f7fb0d7b7bc14dfee97fdd51b47e",
"score": "0.0",
"text": "def set_datapoint\n @datapoint = Datapoint.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... |
723b418cec72c3323f5310cd587c7fe7 | Construct packet for sending and return the string to send | [
{
"docid": "d7dcc22c4e15b27790569999f85d49f0",
"score": "0.0",
"text": "def readyMessage(type, id)\n\n # Create the packet payload\n payload = nil\n case type\n when DELAY_REQ\n payload = [0x0,0x0].pack(\"Q>S>\")\n\n # Set defaults for DELAY_REQ packets\n @messag... | [
{
"docid": "a24dacd21dd6cb30c374185ab71a0ae0",
"score": "0.7825383",
"text": "def build_packet\r\n return [@request_id, @command_type, @string1, @string2].pack(\"VVa#{@string1.length}a2\")\r\n end",
"title": ""
},
{
"docid": "5b4e8987452b9782fc0c30628565d0e5",
"score": "0.7746953... |
7f1b17e685b4f1e9da3ca4d4b11e1514 | Verify that the page title contains a certain value | [
{
"docid": "de2d124b4cc916bda657972248a85519",
"score": "0.75858307",
"text": "def title_should_contain(text)\n raise(Exception::TitleMatchError, \"The page title #{@browser.url} is not correct; it should contain #{text}\") unless @browser.title.include?(text)\n end",
"title": ""
}
] | [
{
"docid": "c7c21abd2a9662f9b1942608467064a3",
"score": "0.79812115",
"text": "def title_with_page_title_check\n return @page.title if @page && !@page.title.blank?\n title_without_page_title_check\n end",
"title": ""
},
{
"docid": "c7c21abd2a9662f9b1942608467064a3",
"s... |
65af032d0c8da3fe8bfa0f7520f95fd7 | GET /qx/runways/1 GET /qx/runways/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "ca26e9b7402a5e867615440ffc7b4f69",
"score": "0.62684315",
"text": "def show\n @runway_ap = RunwayAp.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @runway_ap }\n end\n end",
"title": ""
},
{
"docid": "9e... |
62e8f8d0b781e8e43b39fba5bd41c6ac | Converts CSV output from API call into a JSON document | [
{
"docid": "d406c463063e7834b44ac6f2ef69a05e",
"score": "0.7229546",
"text": "def convert_to_JSON(name, response)\n output = CSV.parse(response).flatten\n result = { :symbol => name,\n :name => output[0],\n :price => output[1] }\n result.to_json\nend",
"title": ""
}
] | [
{
"docid": "7ad2a269fa0faf27fef665e66d925b17",
"score": "0.6369319",
"text": "def chart_data\n\t# This is a a reference to the file so that it can be read\n\t@data = File.new(\"./public/data/clean_train.csv\", \"r\")\n\n\t# Initializes a CSV representation for Ruby\n\t@csv = CSV.new(@data, :headers => t... |
7f06c383fd151dbc845e028011cc3531 | Returns the DataMapper::Adapters::Sql::Mappings::Table for the +primary_class+. | [
{
"docid": "7ef17fc66f77690b1b6f611abd2c8f1d",
"score": "0.7763746",
"text": "def primary_class_table\n @primary_class_table || (@primary_class_table = @adapter.table(@primary_class))\n end",
"title": ""
}
] | [
{
"docid": "e0e6da3be8a986c868085ab1c8eaf4e5",
"score": "0.6320929",
"text": "def schema_inheritance_root_class\n return table_class\n end",
"title": ""
},
{
"docid": "73fcafc6ea43e5b8d5c3877b0f3d5039",
"score": "0.61895",
"text": "def from_table_name\n @from_tab... |
fe8331cea83806ecb991510e67d1c6f5 | When I am false | [
{
"docid": "01855ebc4cc5afa6f3dd04327050ed23",
"score": "0.0",
"text": "def test_when_i_am_false_if_i_receive_the_and_message_i_returns_myself\n current = @oop_false.and @an_expression\n\n assert_oop_false current\n end",
"title": ""
}
] | [
{
"docid": "2af3b8d98bc4e448a3e295e33811ea60",
"score": "0.80926734",
"text": "def false?; end",
"title": ""
},
{
"docid": "2af3b8d98bc4e448a3e295e33811ea60",
"score": "0.80926734",
"text": "def false?; end",
"title": ""
},
{
"docid": "f1738b6ed3a32d091fb06a5654528bb5",
... |
25c6145e71a28c2fbb2ac48649cf1a44 | GET /articles/1 GET /articles/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "d695cde7c2c0621e81aae9eb9677e9bf",
"score": "0.7745525",
"text": "def show\n @article = Article.find(params[:id])\n \n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @articles }\n end\n end",
"title": ""
},
{
"docid": ... |
74d71e92ae49e58207f173ab9d54a629 | GET /pm_libs GET /pm_libs.xml | [
{
"docid": "4080518f1b09837ec2b0d01d7b5b9ad8",
"score": "0.5688724",
"text": "def simple_list\n @pm_libs = PmLib.paginate(:page=>params[:page], :per_page=>10)\n end",
"title": ""
}
] | [
{
"docid": "21b0245f6d4c815193036dd144165d71",
"score": "0.7301222",
"text": "def index\n @pm_libs = PmLib.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @pm_libs }\n end\n end",
"title": ""
},
{
"docid": "1a7d77bda4f3f01c275d... |
46460256120be3ffd475ab22ffe89f37 | Executes the delete statement and returns the number of rows affected. | [
{
"docid": "4aff30f9d1b24de998fc6d3460cae6af",
"score": "0.5446433",
"text": "def delete(sql, name = nil)\n delete_sql(sql, name)\n end",
"title": ""
}
] | [
{
"docid": "4c6c06da6ad15f3f73e98a5c0f1e6137",
"score": "0.83813983",
"text": "def delete\n execute_dui(delete_sql){|c| return c.affected_rows}\n end",
"title": ""
},
{
"docid": "66ea38766a2b40adf06ee80af0353c1d",
"score": "0.7590489",
"text": "def exec_delete(sql, name, ... |
1f795baf416d7d20df95799bc573d9cb | POST /intranet/cidades or /intranet/cidades.json | [
{
"docid": "2d91dd1d58b37bb65b056980f8335ef2",
"score": "0.69346637",
"text": "def create\n @intranet_cidade = Intranet::Cidade.new(intranet_cidade_params)\n\n respond_to do |format|\n if @intranet_cidade.save\n format.html { redirect_to @intranet_cidade, notice: \"Cidade was successfu... | [
{
"docid": "24e10857076642944bdc85f9dd1c3ec9",
"score": "0.63659406",
"text": "def set_intranet_cidade\n @intranet_cidade = Intranet::Cidade.find(params[:id])\n end",
"title": ""
},
{
"docid": "a13f8b1b3e617ea2be5ca87a7ff6d84b",
"score": "0.6114169",
"text": "def intranet_cid... |
4117bdb176209ad266091899b3050728 | Wait a certain number of seconds. Fractional seconds are allowed. If a block is specified, it will be called on each attempt. This permits things like adding randomized waits. | [
{
"docid": "62fe8dc3396856e8dfebae3079c16100",
"score": "0.6871074",
"text": "def wait(time=nil,&block)\n add_command(Commands::Wait.new(time,&block))\n end",
"title": ""
}
] | [
{
"docid": "12697db654f9f3619116f132f358b3ef",
"score": "0.79952294",
"text": "def using_wait_time(seconds, &block); end",
"title": ""
},
{
"docid": "12697db654f9f3619116f132f358b3ef",
"score": "0.79952294",
"text": "def using_wait_time(seconds, &block); end",
"title": ""
},
... |
42b578caca243fa9829d3103c1e2021e | Gets commit information for a GitHub repository | [
{
"docid": "98dd0e702e9970d735cfc7100a1837df",
"score": "0.6503823",
"text": "def get_repo_commits(repo, limit)\n commits = []\n response = get_github_api(repo, 'commits')\n response.each do |commit|\n commits << {\n 'sha' => commit['sha'],\n 'date' => commit['com... | [
{
"docid": "533e517510252ea092b668be7e9c6bfd",
"score": "0.7626052",
"text": "def git_get(url)\n begin\n title = Mechanize.new.get(url).title\n data = Nokogiri::HTML(open(url))\n repodesc = data.at_css('#repository_description.repository-description').text.strip if data.at_css('#reposi... |
f783651660bc3f6a6313c05a297ddd89 | Get the index of the r lowest value in the set eg [17, 1, 34] > 1 optional argument :rating selects the 2nd, 3rd 4th lowest eg with :rating = 1, [17, 37, 34] > 2 | [
{
"docid": "641ceccd99723147f2005aff6f832e50",
"score": "0.8601328",
"text": "def index_of_lowest(set, options = {})\n rating = options.fetch(:rating, 1)\n value = set.map { |n| n || set.compact.max + 1 }.sort[rating - 1]\n set.index(value)\n end",
"title": ""
}
] | [
{
"docid": "ad31d64bf15c43ddd64ef637bc720f46",
"score": "0.7113082",
"text": "def lowest_rated\n joins(:ratings).group('rateable_id').order('avg(ratings.value)').first\n end",
"title": ""
},
{
"docid": "b0ee6d72e798e3de23b12fb70e084b5b",
"score": "0.70093983",
"text": "def in... |
843c71104637127727a9ae08e52a5ba4 | the json hash for this CisChargeEntry | [
{
"docid": "4ebd920371463b602e3f2696d689c576",
"score": "0.0",
"text": "def to_jaxb_json_hash\n _h = {}\n _h['vendorParameters'] = vendorParameters.to_jaxb_json_hash unless vendorParameters.nil?\n _h['oneTimeChargeTime'] = oneTimeChargeTime.to_jaxb_json_hash unless oneTimeChargeTime.nil?\... | [
{
"docid": "a1cba56b430af79143609542f3367c6c",
"score": "0.68338877",
"text": "def hash\n [description, routing_number, account_number, account_type, signatory, metadata, id, signature_url, bank_name, verified, date_created, date_modified, deleted, object].hash\n end",
"title": ""
},
{
... |
3a6d8cb1f3aeeda28515212ad07c64d8 | makes sure that the adjustment you want to make to a stat is valid | [
{
"docid": "630667291d840baa702ff222300f13ef",
"score": "0.6172082",
"text": "def get_updated_stat(stat_number, max, min, points)\n if add_or_subtract\n not_too_high = false\n number_to_adjust = get_number_to_adjust(true, points)\n while !not_too_high\n calculation = stat_number... | [
{
"docid": "6716780286af7f51d63160b574de0452",
"score": "0.61256975",
"text": "def adjust_stats(attribute)\n case @race\n when \"aloiln\"\n when \"tiersmen\"\n when \"relic\"\n when \"drai\"\n end\n message = \"\"\n\n if attribute == \"strength\" || attribute == \"str\"... |
c7defcf9fbbf8e64187e82b64c679f54 | GET /comments/1 GET /comments/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "43e1018e94df0e7d6ab78621c98262cd",
"score": "0.77106005",
"text": "def showcomments\n @comments = Post.find(params[:id]).comments\n render json: @comments\n end",
"title": ""
},
{
"docid": "5f354bb47ba40509b011e3bce27f1fff",
"score": "0.75797015",
"text": "def show... |
29b398f2715232ce4d46a91fc85086e0 | Restore a snapshot from HDFS Args : +node+ > node where the snapshot comes from +date+ > snapshot date +destination+ > local directory where to restore | [
{
"docid": "f6d27a49b16ed2fc5588ddb47366ce8d",
"score": "0.8471326",
"text": "def restore_snapshot(node, date, destination, keyspace: 'ALL', table: 'ALL')\n # Search the snapshot matching node and date\n snapshots = search_snapshots(node: node, date: date)\n\n if snapshots.empty?\n raise('... | [
{
"docid": "4cc03797d9b447407836f0db5d59d9b2",
"score": "0.87856567",
"text": "def restore_snapshot(node, date, destination)\n # Search the snapshot matching node and date\n snapshots = search_snapshots(node: node, date: date)\n\n if snapshots.empty?\n raise('No snapshot found for restore'... |
247e6076e803c5cb19734a6a6032b78c | dispatch some default configs to config pools | [
{
"docid": "809235d49075dfd2ca54b7af87ec8307",
"score": "0.65017766",
"text": "def apply_default_config\n return unless DEFAULT_CONFIG.is_a?(Hash)\n DEFAULT_CONFIG.each do |k, v|\n apply_config(k, v)\n end\n end",
"title": ""
}
] | [
{
"docid": "084b309835ea42db6f8fb60af87191a8",
"score": "0.6638684",
"text": "def configure\n load_all_configs \n end",
"title": ""
},
{
"docid": "d34a9297d80f65cf32e3bb8dcaaf8c63",
"score": "0.66038865",
"text": "def configDefaults(config)\n end",
"title": ""
},
... |
11e45703c92cb95577b66f1b5919290f | Get metadata about a cl.ly URL like name, type, or view count. Finds the item by it's slug id, for example "2wr4". | [
{
"docid": "73499245dc5eb969a6a1a5c510566192",
"score": "0.0",
"text": "def item(id)\n Item.find(id)\n end",
"title": ""
}
] | [
{
"docid": "6dfbfed7ba405dde80c7c2b6b69b9c4f",
"score": "0.6145744",
"text": "def slug\n fetch[:slug]\n rescue NoMethodError\n nil\n end",
"title": ""
},
{
"docid": "196801831a75757e64bd58ddbfa8c969",
"score": "0.554608",
"text": "def get_item( item )\n @session.... |
6366186a0643824585305b46d30bffd3 | GET /subjects/new GET /subjects/new.xml | [
{
"docid": "3b24054dc307d12db608b5cacceb645c",
"score": "0.66001564",
"text": "def new\n @subject = Subject.new\n @cart = current_cart\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @subject }\n end\n end",
"title": ""
}
] | [
{
"docid": "48e813e041f037148afb8262dc30dd87",
"score": "0.7736473",
"text": "def new\n @subject = Subject.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @subject }\n end\n end",
"title": ""
},
{
"docid": "48e813e041f037148afb82... |
00cb31a9b699d463ff0eeea2c9876a0d | Verify the given software definitions, iterating over each software and loading it. This is probably the most primitive test ever just load the DSL files but it is the best thing we have for CI in omnibussoftware. | [
{
"docid": "6b2d5d71494fb8bf6e91806e6b4584e4",
"score": "0.6010411",
"text": "def verify!\n for_each_software do |_software|\n $stdout.print \".\"\n end\n end",
"title": ""
}
] | [
{
"docid": "b35f77e2b0eb1d418cf21617bf953d11",
"score": "0.5784625",
"text": "def verify(development=false)\n reqs = development ? requirements : runtime_requirements\n reqs.each do |req|\n name, constraint = req['name'], req['version']\n Library.activate(name, constraint)\n end\n en... |
af7068cd6f7c92a9ad98708fa14e5aef | Finds git authors per source line for the given file and commit. | [
{
"docid": "a28926ef021177d54bb515a03420a2db",
"score": "0.66352975",
"text": "def blame(path, commit_id)\n blame_result = BlameCommand.new(jgit_repo)\n .setFilePath(path)\n .setFollowFileRenames(true)\n .setTextComparator(RawTextComparator::WS_IGNORE_ALL)\n .s... | [
{
"docid": "4970ada850ced8baa1729b02a4ae9178",
"score": "0.67175955",
"text": "def extract_svn_authors_diffing(commit)\n unless $changelogs.has_key?(commit.id)\n $changelogs[commit.id] = []\n Dir.chdir(RAILS_DIR) do\n in_changelog = false\n git_show(commit).each do |line|\n if li... |
56866ec3225603af8f2def8d47c690fc | This method removes and returns the first node in the Linked List and must set Linked List's head to the second node. | [
{
"docid": "ffc01b0c22d3bc2502eb9c790a93f11f",
"score": "0.6416078",
"text": "def remove_front\n current_node = @head\n @head = current_node.next\n current_node.next = nil\n current_node\n end",
"title": ""
}
] | [
{
"docid": "ff10dc1634b63fc8fd986f28b43917cc",
"score": "0.7821446",
"text": "def remove_from_head\n # if linked list is not empty\n if not is_empty?\n # save a reference to the head node\n remove = @head\n\n # if linked list only has one item\n if @head == @tail\n # set... |
03353a9ab39319b785b83600eb53d161 | Kill the query node before running inherit | [
{
"docid": "25088215e80f5768a950d1c441bf5eeb",
"score": "0.75545424",
"text": "def inherit(node)\n query.remove!\n super\n end",
"title": ""
}
] | [
{
"docid": "f6093ae7fa2995c5fd32a6bf33233631",
"score": "0.7534357",
"text": "def inherit(node)\n query.remove\n super\n end",
"title": ""
},
{
"docid": "994f32fa67ccdc8b5eeee4a775d56e45",
"score": "0.7176583",
"text": "def stop_query_killer\n end",
"title": ""
... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "f64953929520359658abf2e0278945f5",
"score": "0.0",
"text": "def skill_params\n\t\tparams.require(:skill).permit(:name, :years)\n\tend",
"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... |
c6243ced85a76cd042c6124c83e4d521 | GET /subscriptions/new GET /subscriptions/new.xml | [
{
"docid": "d52d3de86adaf94a467d7ded48994773",
"score": "0.69769204",
"text": "def new\n if session[:user_id] \n @subscription = Subscription.new\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @subscription }\n end\n end\n end",
... | [
{
"docid": "ed4a3762ceb4f720a2aa6680bd239eda",
"score": "0.7512943",
"text": "def new\n @subscription = Subscription.new\n @subscription.confirmed = true\n get_list_and_segments\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @subscription }\n ... |
5e2cf604928f0b9cc0d6c012233ae6a0 | Fetch order invoice for lazada orders and push to FBA | [
{
"docid": "cb5a624b7e65bb3929902470177d3424",
"score": "0.73999363",
"text": "def fetch_invoice_from_lazada(smp)\n @messages = []\n @orders = smp.seller.orders.where(\"invoice_details IS NULL AND market_place_id=? AND is_cancel=false AND fulflmnt_state not in(?)\", smp.market_place_id, ['rfp','pa... | [
{
"docid": "b0c110c4b1d4a2cae8bd1b6a58d8dd07",
"score": "0.690903",
"text": "def fetch_invoice_data(acumen_client, order_codes)\n invoice_data = acumen_client.get_invoices(order_codes)\n\n return process_invoice_response(invoice_data)\n end",
"title": ""
},
{
"docid": "51533e2ceb664f2... |
df24b3f490547c113710d7d0ac44dac5 | Time Complexity = n n! | [
{
"docid": "dac85a3c12aca3328e1f2923adff117f",
"score": "0.0",
"text": "def first_anagram?(first_word, second_word)\n perms = first_word.chars.permutation\n\n perms.each do |perm|\n return true if perm.join == second_word\n end\n\n false\nend",
"title": ""
}
] | [
{
"docid": "9504849a215dc694b8e78abdb0e25b8d",
"score": "0.6810889",
"text": "def euler29(n)\n terms = []\n 2.upto(n) do |i|\n 2.upto(n) do |j|\n if terms.include?(i ** j) == false\n terms << i ** j\n end\n end\n end\n \n terms.length\nend",
"title": ""
},
{
"doci... |
957d0b014fbc0fa34165f3450412c59f | Artist songs has many songs | [
{
"docid": "3c3c9764be4e1cd2f02af72764723134",
"score": "0.0",
"text": "def songs\n @songs\n end",
"title": ""
}
] | [
{
"docid": "9082d21f983b643edbfc92c0a12c04a3",
"score": "0.78217655",
"text": "def songs\n Song.all.select {|song| song.artist = self}\n end",
"title": ""
},
{
"docid": "181ad9193e1b01776cded551b9ddf61f",
"score": "0.76983565",
"text": "def songs\n Song.all_by_artist(sel... |
dae3fae427e52a3e8dab66372e5002a1 | Checks the status of InfluxDB instance and version of InfluxDB. | [
{
"docid": "2706fef33253d22a26a95a0e3e24c6c3",
"score": "0.4977461",
"text": "def ping\n uri = _parse_uri('/ping')\n headers = _get(uri)\n Ping.new.tap do |model|\n model.status = 'ok'\n model.build = headers['X-Influxdb-Build']\n model.version = headers['X-Influxdb-V... | [
{
"docid": "d427d1b76deae2adf359385e349d7bd8",
"score": "0.6779244",
"text": "def checkInflux(id)\n database = 'telegraf'\n influxdb = InfluxDB::Client.new database, host: \"influxDB\"\n # TODO: Add: autoscale = 'true' AND ? More than 30%?\n c = influxdb.query 'SELECT container_name, host, usage_per... |
fca2040822f79fe49aa05ca6bcb1d106 | retrieve scores for a | [
{
"docid": "28540d34533cb2f07d0fadf4795795b8",
"score": "0.0",
"text": "def retrieve_by_letter user_id, app_id, letter\n\n criteria_scores = CriteriaScore.find( :all,\n :conditions => {\n :provider_application_id => a... | [
{
"docid": "b8ebe95ba625bc3ccbff24b401e010bb",
"score": "0.7676556",
"text": "def scores\n @scores\n end",
"title": ""
},
{
"docid": "ef7b2108e71abfa6a4fe0324302b2a47",
"score": "0.7664367",
"text": "def get_scores\n self.get_from @score_conn, SCORE_KEY\n end",
... |
b042e9e0b6369e9302d7cae30e846d2c | Create a new healthcheck | [
{
"docid": "d0cf84afc8a343d0f96f0d65afcc5a32",
"score": "0.72798836",
"text": "def new_healthcheck(name, &blk)\n healthcheck = Check.new(name, &blk)\n Java::ComYammerMetrics::HealthChecks.register(healthcheck)\n run_healthcheck_loop\n end",
"title": ""
}
] | [
{
"docid": "43b6ad5dcbefdb5ca9d7bf3ee50fc430",
"score": "0.7968647",
"text": "def create_healthcheck(opts = {})\n data, _status_code, _headers = create_healthcheck_with_http_info(opts)\n data\n end",
"title": ""
},
{
"docid": "398b5ed5e3cabaf90d0f469216ace733",
"score": "0.7... |
0fb08279692a5213375d8df0044c860e | GET /alternate_titles/1 GET /alternate_titles/1.xml | [
{
"docid": "70930de11c29b04450a2406809a8d1d5",
"score": "0.69199705",
"text": "def show\n @alternate_title = AlternateTitle.find(params[:id])\n @item = Item.find(params[:item_id])\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @alternate_title }\... | [
{
"docid": "071c30e326eb8010f37c885468e35ac6",
"score": "0.6383407",
"text": "def index\n @titles = Title.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render xml: @titles }\n end\n end",
"title": ""
},
{
"docid": "100ea09edecb299a66c118fdc... |
f345c61230ebba472c66c3af0185778a | Iterate to the next element in the path Algorithm: 1. Get the last element of the key path 2. Try to find it in the scoped config 3. If not present raise an error 4. If present and is a hash we are not in a config leaf, so the scoped config is reset to this new value and self is returned 5. If present and is a value th... | [
{
"docid": "c1e0fb9b3e096808b60dbff09f431c16",
"score": "0.7792331",
"text": "def next\n if (value = @scoped_config[@path_elements.last]).nil?\n raise ConfigKeyException.new(@path_elements)\n elsif value.is_a?(Hash)\n @scoped_config = value\n self\n else\n valu... | [
{
"docid": "210984a677fe3cc3e4092174e1819d45",
"score": "0.56247246",
"text": "def value_at_path(path)\n\t\t\t\tif path =~ %r{^/}\n\t\t\t\t\tnormalized_path = path\n\t\t\t\telse\n\t\t\t\t\tnormalized_path = \"/#{path}\"\n\t\t\t\tend\n\n\t\t\t\tputs \"[MacroDeck::TurkResponseTree::Tree] Getting value at ... |
32495c19f7c6d620be2774d4e00df643 | The game is over is someone has won or there is a draw | [
{
"docid": "e4f6a8f2bc4afc768a2a8d540fcd20c6",
"score": "0.8279087",
"text": "def over?\n if won? || draw? \n true\n end \n end",
"title": ""
}
] | [
{
"docid": "91ccdd30b4ef9c1f47b775673af30b80",
"score": "0.86367047",
"text": "def game_over?\r\n won? || draw?\r\n end",
"title": ""
},
{
"docid": "e391e7c1918071183b1ac32a3a0b32e8",
"score": "0.85046226",
"text": "def game_over?\n draw? || won?\n end",
"title": ""
},
... |
b98c0e7cc4e52d997e172e2f388498eb | Sets the attribute banner | [
{
"docid": "098221d3f5530685f19975917d9b956b",
"score": "0.57363975",
"text": "def banner=(_arg0); end",
"title": ""
}
] | [
{
"docid": "d054b3e0d95a91f97388c0b46d0f1d76",
"score": "0.73537546",
"text": "def set_attribute\n @banner = Banner.find(params[:id])\n end",
"title": ""
},
{
"docid": "0a1e009bd709ef603bbfcf2ce128e4fe",
"score": "0.72118783",
"text": "def banner=(new_banner)\n @opti... |
0672f101cc3648ed5a31468276ee201d | method: toString parameter: none returns: String Creates a String with all the important information about the rectangle | [
{
"docid": "1cb52858cfa1519c2deb33ea7d419a4d",
"score": "0.8741168",
"text": "def toString\n return \"Rectangle : width: #{@width}, height: #{@height}, depth: #{@depth}, offset: #{@offset}\"\n end",
"title": ""
}
] | [
{
"docid": "01b76b90ba482e5f4e892a36c7fbd1f5",
"score": "0.824723",
"text": "def to_s()\n \"A rectangle of dimensions #{length()}X#{breadth()}\"\n end",
"title": ""
},
{
"docid": "8485ef2da15b4361880b9e86d5ef05fb",
"score": "0.7360935",
"text": "def to_string\n puts(@fill, @nu... |
967cbc1bb7bde56fc91851aa25b8c8f5 | GET /foo29s or /foo29s.json | [
{
"docid": "1e97784a6d14e0fd5a8230110763e2f7",
"score": "0.0",
"text": "def index\n @foo29s = Foo29.all\n end",
"title": ""
}
] | [
{
"docid": "267d42433c81a818fe6285be04de8b0b",
"score": "0.6019098",
"text": "def getApiString(url,*args)\n url=\"#{url}?\"\n args.each {|arg|url += \"#{arg}&\" unless arg == \"\" }\n url = url.split(\" \").join(\"%20\")[0..-2]\n getJson(url)\nend",
"title": ""
},
{
"docid": "2bd70123931... |
5d6d43f96caf019ded98f113d2a51a72 | Update province, region and country text fields at view from town select | [
{
"docid": "c0ef2e71534c7f55aa1903b0b5e28460",
"score": "0.7323733",
"text": "def update_province_textfield_from_town\n @town = Town.find(params[:id])\n @province = Province.find(@town.province)\n @region = Region.find(@province.region)\n @country = Country.find(@region.country)\n ... | [
{
"docid": "e06daa596703c009d69d812fa08a3321",
"score": "0.7554106",
"text": "def bo_update_province_textfield_from_town\n @town = Town.find(params[:id])\n @province = Province.find(@town.province)\n @region = Region.find(@province.region)\n @country = Country.find(@region.country)\n... |
bb01e0cb68443ac54903c6bf9556fcfd | for those user whose browser is not using our default_locale, e.g. a Chinese using English broser, just like me. :) | [
{
"docid": "4e0d637740e256bc614c34c37f0215ec",
"score": "0.0",
"text": "def set_locale\n I18n.locale = params[:local] || I18n.default_locale\n end",
"title": ""
}
] | [
{
"docid": "c5316c393421155dcb3119d6aa255906",
"score": "0.79437906",
"text": "def apply_locale; end",
"title": ""
},
{
"docid": "6adff9d92e927066b8496dc0f7ad7116",
"score": "0.79032344",
"text": "def default_locale; end",
"title": ""
},
{
"docid": "86908cd97d99814550c866... |
911da249cba3eee67b864e7f2a340c11 | Returns all defined package names, minus the excluded and ignored ones | [
{
"docid": "bc37bf77e50c3f489bedc20b058d72ff",
"score": "0.7274478",
"text": "def all_package_names\n each_autobuild_package.map(&:name)\n end",
"title": ""
}
] | [
{
"docid": "9e5b8f27a1da1face6c8bcca769a0ada",
"score": "0.7131212",
"text": "def all_package_names\n definitions.keys\n end",
"title": ""
},
{
"docid": "34f33758963b77f26491afbbcd36f373",
"score": "0.70799917",
"text": "def packages\n modules.map(&:package).un... |
9ef13812f0f96d1467bf94e2bedf4eb5 | usually used within instance && class methods. | [
{
"docid": "f9d198a8c941a66ac41d5bfb903461c9",
"score": "0.0",
"text": "def add_wings_and_take_off\n puts \"I'm awesome! I'm #{name}, an awesome #{type} with flying skills\"\nend",
"title": ""
}
] | [
{
"docid": "003f93545faf95741b6daf49b5599d9c",
"score": "0.71732813",
"text": "def _self; end",
"title": ""
},
{
"docid": "6a6ed5368f43a25fb9264e65117fa7d1",
"score": "0.6909905",
"text": "def internal; end",
"title": ""
},
{
"docid": "c3285b979f713395f60cf13edce8a310",
... |
5bd530c9d67338f0313a344eb762d887 | Give search string for notes googlelike syntax: word1 word2 > any has both word1 and word2 word1 OR word2 > any has either word1 or word2 "word1 word2" > any has word1 followed immediately by word2 word1 > none has word1 Note, to conform to google, "OR" must be greedy, thus: word1 word2 OR word3 word4 is interpreted as... | [
{
"docid": "a6efad33b666f1d2b1749d0935b2c48b",
"score": "0.8048759",
"text": "def google_parse(str)\n goods = []\n bads = []\n if (str = str.to_s.strip_squeeze) != \"\"\n str.gsub!(/\\s+/, \" \")\n # Pull off \"and\" clauses one at a time from the beginning of the string.\n loop... | [
{
"docid": "5ab418a5285f9eaaee45128166a86e9a",
"score": "0.6339359",
"text": "def parse_search_string(str)\n str ||= ''\n operators = [':', '>', '<']\n indices = []\n loop do\n offset = (indices.last) ? str.index(Regexp.union(operators), indices.last) + 1 : 0\n index = ... |
92f81938757aab1fe5a848b182180d37 | DELETE /gtfs_calendar_dates/1 DELETE /gtfs_calendar_dates/1.xml | [
{
"docid": "05ff36d7c7bf486ff8bd4a6f25aaebfb",
"score": "0.7339342",
"text": "def destroy\n @gtfs_calendar_date = GtfsCalendarDate.find(params[:id])\n @gtfs_calendar_date.destroy\n\n respond_to do |format|\n format.html { redirect_to(gtfs_calendar_dates_url) }\n format.xml { head :ok... | [
{
"docid": "3f49225bd28efe4c12256e391fbdeb2e",
"score": "0.6856305",
"text": "def destroy\n @gtfs_calendar = GtfsCalendar.find(params[:id])\n @gtfs_calendar.destroy\n\n respond_to do |format|\n format.html { redirect_to(gtfs_calendars_url) }\n format.xml { head :ok }\n end\n end"... |
96ee3fb70e7d619022080deefe31e96f | POST /cycle_has_subjects POST /cycle_has_subjects.json | [
{
"docid": "a0f5a6e8e4f60d72abc067649a06a38d",
"score": "0.6935366",
"text": "def create\n @cycle_has_subject = CycleHasSubject.new(cycle_has_subject_params)\n\n respond_to do |format|\n if @cycle_has_subject.save\n format.html { redirect_to @cycle_has_subject, notice: 'Cycle has subje... | [
{
"docid": "0c770a71774218a3f2921c5cec0fd3fc",
"score": "0.7101692",
"text": "def subjects()\n require_authentication!\n options = make_options(\"getSubjects\")\n response = self.class.post(\"/WebUntis/jsonrpc.do;jsessionid=#{@session_id}?school=#{@school}\", options)\n raise response[\"erro... |
2014ac52fb26aa8783b3ec6aeb00ce22 | returns an anonymous wispered module | [
{
"docid": "c4c77fd7f395d14ec5f674386e64c3fe",
"score": "0.623904",
"text": "def publisher_module\n Module.new { include Wisper::Publisher }\n end",
"title": ""
}
] | [
{
"docid": "a0ce5f236fdd72a2ffa389baa0f6f079",
"score": "0.7124948",
"text": "def sideloading_module\n Module.new\n end",
"title": ""
},
{
"docid": "9de4306501711176ab8084b28395030d",
"score": "0.7013251",
"text": "def module; end",
"title": ""
},
{
"docid": "... |
92838993f5164be9e452b154034fcb27 | calculates the lowest time it took for the 5 runs | [
{
"docid": "2166ee70b5d4657403166e7d3a57ffa4",
"score": "0.6319572",
"text": "def set_lowest_time\n all = [];\n @results.each do |result| \n all.push(result[\"time\"].to_f)\n end \n @lowest_time = all.min\n end",
... | [
{
"docid": "442fe33392b2fcd34ad467f381356ecf",
"score": "0.7116527",
"text": "def minimum_waiting_time(queries)\n queries.sort!\n total_waiting_time = 0\n\n (0..queries.length).each do |idx|\n duration = queries[idx]\n queries_left = queries.length - (idx + 1)\n total_waiting_time += duratio... |
58e5420dfde47ded47c47519e05d7689 | PUT /events/1 PUT /events/1.json | [
{
"docid": "15fa695f57147a0be3f266741410dcb3",
"score": "0.0",
"text": "def update\n @event = @current_account.events.find(params[:id])\n \n params[:event] = convert_datetimes( params[:event] )\n \n respond_to do |format|\n if @event.update_attributes(params[:event])\n format.... | [
{
"docid": "8a9ec0d3651c86aa059583f4dda9f4ac",
"score": "0.75665146",
"text": "def update\n if @event.update(event_params)\n render json: @event, status: 201\n else\n render json: { message: \"Error. Error. Please try again.\"}, status: 400\n end\n end",
"title": ""
},
{
... |
3149c00720799e455cc3ec2cd0a81f16 | POST /formadepagos POST /formadepagos.json | [
{
"docid": "cddfc3a9b279c2d272f9c502832d77e2",
"score": "0.66487026",
"text": "def create\n @formadepago = Formadepago.new(params[:formadepago])\n\n respond_to do |format|\n if @formadepago.save\n format.html { redirect_to @formadepago, :notice => 'Formadepago was successfully created.... | [
{
"docid": "743ff5de0054db21f1ced8b3d0beda40",
"score": "0.700035",
"text": "def create\n @forma_pago = FormasPago.new(forma_pago_params)\n\n respond_to do |format|\n if @forma_pago.save\n format.html { redirect_to @forma_pago, notice: 'Formas pago was successfully created.' }\n ... |