query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
caee6c447477629871cdb9daccb0fec2 | GET /actividads GET /actividads.xml | [
{
"docid": "45265ba73f1c7e43f0fccbe7576a80f0",
"score": "0.6412203",
"text": "def index\n cadena = getactividades(params[:id].to_i)\n \n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => cadena }\n end\n end",
"title": ""
}
] | [
{
"docid": "bf318784c6014fa1dd2ede882b91bbdd",
"score": "0.68038064",
"text": "def show\n @ad = Ad.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @ad }\n end\n end",
"title": ""
},
{
"docid": "c343aad27ef5a5fc1a9b... |
94cdf1427d552b110c7247bd91bdf0c6 | Time: O(n^2 e) Space: O(n) | [
{
"docid": "57cc7eea65b09402ec20bcdb135202d2",
"score": "0.0",
"text": "def dijkstra(adjacency_matrix, start_node) \n num_nodes = adjacency_matrix.length\n\n # Holds the shortest distances from start_node to node. Each one starts with infinity.\n shortest_distances = Array.new(num_nodes, Float::INFIN... | [
{
"docid": "5944c445a0d5d1383cd670cc84d3fc3b",
"score": "0.7071816",
"text": "def find_dublicate(array)\n sum = 1000000*(1000000+1)/2 # (n*(n+1))/2\n array.each do |el| \n sum -= el\n end\n return sum\nend",
"title": ""
},
{
"docid": "2481cbf165330db256eee896a32c82e4",
"score": "0... |
cfdff4a0cbd69f1f469b01ad4f14dd97 | Resolve Message object from provided args and path This is used internally by contracts when rules are applied If message argument is a Hash, then it MUST have a :text key, which value will be used as the message value | [
{
"docid": "e0366afae1a4d9820cb267c2f2c61eca",
"score": "0.58655876",
"text": "def call(message:, tokens:, path:, meta: EMPTY_HASH)\n case message\n when Symbol\n Message[->(**opts) { message(message, path: path, tokens: tokens, **opts) }, path, meta]\n when String\... | [
{
"docid": "f4c64ef8dbee89c73b8234a8efa0aa6b",
"score": "0.59963244",
"text": "def message(*args)\n Message.find_one(self, *args)\n end",
"title": ""
},
{
"docid": "e5aeea7a517f797aa41251c4ac9fe777",
"score": "0.5898873",
"text": "def parse_message(message)\n ROUTE... |
19ef34bdf5c8d88304a94315bc31f6f1 | Appends the specified unsigned int to the end of the Buffer. The buffer will expand as necessary to accommodate any bytes written. Returns a reference to this so multiple operations can be appended together. | [
{
"docid": "9caaa46ce1e0c536e54148f9da634165",
"score": "0.66485906",
"text": "def append_unsigned_int(i=nil)\n if i.class == Fixnum && !block_given?\n @j_del.java_method(:appendUnsignedInt, [Java::long.java_class]).call(i)\n return self\n end\n raise ArgumentError, \"Invali... | [
{
"docid": "4823fb792b0bfaf54b9ced8d67148010",
"score": "0.61895484",
"text": "def append_int(i=nil)\n if i.class == Fixnum && !block_given?\n @j_del.java_method(:appendInt, [Java::int.java_class]).call(i)\n return self\n end\n raise ArgumentError, \"Invalid arguments when c... |
2ae30007924e13ceebc1d01995244c6c | DELETE /market_sessions/1 DELETE /market_sessions/1.json | [
{
"docid": "80b24ab7b8d6b56c8233aa2960eccb07",
"score": "0.765113",
"text": "def destroy\n @market_session.destroy\n respond_to do |format|\n format.html { redirect_to market_sessions_url }\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "db4123b54eef63306974799f04f4279c",
"score": "0.690705",
"text": "def deleteSession\n destroy\n @team = Team.find(session[:team_id])\n sessions = @team.sessions.last(5).reverse\n respond_to do |format|\n format.html { redirect_to sessions_url }\n format.json {render json... |
d2cebe48426f518a317ffe2a9631acb2 | clean_string removes any leading and trailing spaces from the input | [
{
"docid": "36004c2e1bdff7862fa951a2fc9df9e9",
"score": "0.73416686",
"text": "def clean_string(input)\n return input if input.nil?\n\n input.to_s.try(:strip)\n end",
"title": ""
}
] | [
{
"docid": "94da5f8b30cf9edfebdb2105c988111d",
"score": "0.8307635",
"text": "def clean(str); str.gsub(/^\\s{#{str[/\\s+/].length}}/, ''); end",
"title": ""
},
{
"docid": "94da5f8b30cf9edfebdb2105c988111d",
"score": "0.8307635",
"text": "def clean(str); str.gsub(/^\\s{#{str[/\\s+/].l... |
2e34e5ee3409d9832a750183a786c866 | syntactic predicate synpred231_Instructions (in Instructions.g) 344:24: synpred231_Instructions : ~ EOL ; This is an imaginary rule inserted by ANTLR to implement a syntactic predicate decision | [
{
"docid": "c48981b001352723e36f9c31b22700cd",
"score": "0.77536654",
"text": "def synpred231_Instructions\n # -> uncomment the next line to manually enable rule tracing\n # trace_in( __method__, 287 )\n\n # at line 344:24: ~ EOL\n if @input.peek(1) == WS || @input.peek( 1 ).between?... | [
{
"docid": "581ed7fa29191d039fcb3a79562cf4f6",
"score": "0.7372157",
"text": "def synpred24_Instructions\n # -> uncomment the next line to manually enable rule tracing\n # trace_in( __method__, 80 )\n\n # at line 132:11: WS the\n match( WS, TOKENS_FOLLOWING_WS_IN_synpred24_Instructio... |
1809fef1cf7d28430c4761084304b198 | Perform an optimize on the index to merge and reduce the number of segments | [
{
"docid": "5347dd73a9e685c1dcb8de5550ab6e9a",
"score": "0.51474124",
"text": "def optimize(options=nil)\n request(:post, \"_optimize\", options)\n end",
"title": ""
}
] | [
{
"docid": "c95ad93a8980dfe6ddc9ed76117b1f90",
"score": "0.62069523",
"text": "def optimize_index!\n @domain_index.each do |key, val|\n # Sort each path/name_key pair by the longest path\n @domain_index[key].sort! { |a, b|\n b[0].size <=> a[0].size\n }.uniq!\n end... |
5823c75f7437cf9f59a185b6d2ebf8b8 | GET /posts/1 GET /posts/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "915c0178f9e4347098d8a463c2cbe6b0",
"score": "0.77110183",
"text": "def show\n @posts = Post.find(params[:id])\n render json: @posts\n end",
"title": ""
},
{
"docid": "ad221611c85e1ec63d3385d6179e41a2",
"score": "0.73537844",
"text": "def show\n render json: Post... |
901854886de064401c469f0de55e282f | GET /sample3s/new GET /sample3s/new.xml | [
{
"docid": "37f467c3b26171bb61bb074c77230aa9",
"score": "0.0",
"text": "def new\n @sample3 = Sample3.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @sample3 }\n end\n end",
"title": ""
}
] | [
{
"docid": "3469bbbdd9708e500d43cdd17b196db9",
"score": "0.6985995",
"text": "def new\n @s3_snapshot = S3Snapshot.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @s3_snapshot }\n end\n end",
"title": ""
},
{
"docid": "00519567f08... |
10bae78df6365f4630179a6833132e12 | GET /invoices/new GET /invoices/new.json | [
{
"docid": "ddc7032891c6754c364fae4885ada27d",
"score": "0.73668635",
"text": "def new\n @invoice = Invoice.new\n $details = Array.new\n @customers = Customer.all\n @retire_notes = Array.new\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @invo... | [
{
"docid": "6b4b6b027324f8bdc5ac20f16f761f28",
"score": "0.8076558",
"text": "def new\n # @invoice = Invoice.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @invoice }\n end\n end",
"title": ""
},
{
"docid": "91e2cea6900c1060a13204... |
b0bd712128a5bb7823ffd2ae575ffdbf | A method to convert the the resource to an XML string. INCOMPLETE ==== Options The +options+ parameter is handed off to the +to_xml+ method on each attribute, so it has the same options as the +to_xml+ methods in Active Support. :indent Set the indent level for the XML output (default is +2+). :dasherize Boolean option... | [
{
"docid": "24e3b03a325a924675e397ec7adb78dc",
"score": "0.74066883",
"text": "def to_xml(options={})\n attributes.to_xml({:root => self.class.element_name}.merge(options))\n end",
"title": ""
}
] | [
{
"docid": "2e255432c43e2c4e91e2cb72bd315f68",
"score": "0.75508577",
"text": "def to_xml(options = {})\n to_xml_opts = {:skip_types => true} # no type information, not such a great idea!\n to_xml_opts.merge!(options.slice(:builder, :skip_instruct))\n # a builder instance is provided when to_xm... |
e7c9dec2179c4a321ab522be41244295 | POST /user_holidays POST /user_holidays.json | [
{
"docid": "6ed76d3d5461f77e9667df42bfebd418",
"score": "0.7038854",
"text": "def create\n @user_holiday = UserHoliday.new(user_holiday_params)\n\n respond_to do |format|\n if @user_holiday.save\n format.html { redirect_to @user_holiday, notice: 'User holiday was successfully created.'... | [
{
"docid": "ae1b8e99103df9838afa374f769859c9",
"score": "0.68526113",
"text": "def holidays()\n require_authentication!\n options = make_options(\"getHolidays\")\n response = self.class.post(\"/WebUntis/jsonrpc.do;jsessionid=#{@session_id}?school=#{@school}\", options)\n raise response[\"err... |
4858dec270464df36f28bc41541e51d1 | Print and export the source from a given URL to an epub file | [
{
"docid": "10957aa3a300d105f9b0d104fa46d034",
"score": "0.5278676",
"text": "def export\n clone\n puts \"FYI: list of extensions: #{all_extensions}\"\n # Note: if we are using the '--command', it will be empty list by default\n puts \"FYI: list of all files : #{all_files}\" unless a... | [
{
"docid": "6032f986f0e5010e7823fd2252b34855",
"score": "0.6313962",
"text": "def url_download(uri, filename=\".\")\n open(filename, 'w') do |foo|\n foo.print open(uri).read\n end\nend",
"title": ""
},
{
"docid": "6bbc9ab3964f2af4d3a641c172809121",
"score": "0.6223835",
... |
d2290ef60fcf44a321bf1f0a4946e7a3 | DELETE /slicegroups/1 DELETE /slicegroups/1.xml | [
{
"docid": "d25238242ebfb7bd1aa46407bef74d9c",
"score": "0.7575276",
"text": "def destroy\n @slicegroup = Slicegroup.find(params[:id])\n @slicegroup.destroy\n\n respond_to do |format|\n format.html { redirect_to(slicegroups_url) }\n format.xml { head :ok }\n end\n end",
"titl... | [
{
"docid": "38959a4c19bcea0276afe9263d93ca2e",
"score": "0.676524",
"text": "def destroy\n Group.rebuild! if nil.|Group.find(:first).rgt\n\t @group = Group.find(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to(groups_url) }\n format.xml { head :ok ... |
65453bc06f1bdfa3ac18c3f87e2d474f | module Redcarpet module Render class Randy < Base def header() end end end | [
{
"docid": "68199de6cc1a66363e67c6c93c370b05",
"score": "0.0",
"text": "def md_toc(text)\n renderer = Redcarpet::Render::HTML_TOC.new\n markdown = Redcarpet::Markdown.new(renderer,\n space_after_headers: true,\n )\n markdown.render(text)\nend",
"title": ""
}
] | [
{
"docid": "a0b769d20135041a4151e867cec1ce76",
"score": "0.65823895",
"text": "def header; end",
"title": ""
},
{
"docid": "a0b769d20135041a4151e867cec1ce76",
"score": "0.65823895",
"text": "def header; end",
"title": ""
},
{
"docid": "a0b769d20135041a4151e867cec1ce76",
... |
25a0bb7ba768449c51ae8abfde3449e8 | POST /motions/:motion_id/motion_comments POST /motions/:motion_id/motion_comments.xml | [
{
"docid": "598c54aeb3a4fbb2f37ad37792555ff1",
"score": "0.74302554",
"text": "def create\n respond_to do |format|\n if motion_comment.save\n format.html { redirect_to( motion_comment.motion, flash: { success: 'Motion comment created.' } ) }\n format.xml { render xml: motion_comme... | [
{
"docid": "45acf03f6a87e6cd1dc2c4db25276570",
"score": "0.6471911",
"text": "def update\n motion_comment.assign_attributes motion_comment_attributes\n respond_to do |format|\n if motion_comment.save\n format.html { redirect_to motion_comment.motion, flash: { success: 'Motion comment u... |
e561e11bcf379ef5dc139c210017366b | Only allow a list of trusted parameters through. | [
{
"docid": "f90f99f3cc2cd17ad1056f9f6c098b68",
"score": "0.0",
"text": "def admin_club_params\n params.fetch(:admin_club, {}).permit(:name, :logo, :banner)\n end",
"title": ""
}
] | [
{
"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... |
94eb17409eebbe30b23bf9c03df2c505 | Method to draw the arrows of directed glyphs. Not to be used directly, but called by Featuredraw. | [
{
"docid": "638ab70ba15135b5eb5967432d19ab55",
"score": "0.615012",
"text": "def open_arrow(feature_context,direction,x,y,size)\n case direction\n when :right\n feature_context.move_to(x,y)\n feature_context.rel_line_to(size,size)\n feature_context.rel_line_to(-size,size)\... | [
{
"docid": "43782827078927f13cc46e111c618c3b",
"score": "0.6955929",
"text": "def drawarrow(*)\n super\n end",
"title": ""
},
{
"docid": "ac2bb55087bd2e7466c1008d5e258bf9",
"score": "0.64464283",
"text": "def draw_force_arrow(context, start, finish)\n arrow_size = 50\n\n ... |
eac3743c77a23e7b07a73eabde17f886 | POST /wikis POST /wikis.json | [
{
"docid": "306536f3e3147b632cbb365cedcf1dd7",
"score": "0.7003024",
"text": "def create\n @wiki = Wiki.new(params.require(:wiki).permit(:title, :body))\n\n if @wiki.save\n render json: @wiki, status: :created, location: @wiki\n else\n render json: @wiki.errors, status: :unprocessable... | [
{
"docid": "03a791ffb3ce4cb60c520a36945aa981",
"score": "0.66920304",
"text": "def create_wiki(name, content, project_id, params = {})\n params.merge!(name: name, content: content, project_id: project_id)\n post('wikis', params)\n end",
"title": ""
},
{
"docid": "6d57a29a1... |
f0e765aa6b7ca84039a6e9a20d30ac79 | creates a Report Dont use this class directly but one of the subclasses shaped for your report type. _wiki_ is the wiki to be reported. _params_: :basedir:: the base directory wherein the output directory will be created. Defaults to the systems TEMP directory. Must exist. :outputdir:: Directory where the report is gen... | [
{
"docid": "2e95fef25eac82343da09080cd7a2a3b",
"score": "0.7494717",
"text": "def initialize(wiki, params={})\n super(wiki, params)\n @basedir = @params[:basedir] || Dir.tmpdir\n @filename = @params[:filename] || ('default.' + @type.to_s)\n mode = @params[:mode] || 0700\n ... | [
{
"docid": "bdfc690e71b7bcb0de1c199f8dcdb8c8",
"score": "0.62035966",
"text": "def initialize(wiki, params={})\n @wiki = wiki\n @params = {\n :templatedir => TemplateDir,\n :template => 'default',\n :language => @wiki.language,\n }.merge(params)\n\n ... |
577bf52bd534f8251a41ed8c60c890da | Raise of custom type | [
{
"docid": "b125ea6e89452cda2ca189a1b8a2f977",
"score": "0.0",
"text": "def run!\n raise ArgumentError, \"This is a basic exception.\"\nend",
"title": ""
}
] | [
{
"docid": "8399a580fb0b7f5f90ad980fcdb4f00d",
"score": "0.6093225",
"text": "def ri(value)\n raise value.inspect\nend",
"title": ""
},
{
"docid": "8399a580fb0b7f5f90ad980fcdb4f00d",
"score": "0.6093225",
"text": "def ri(value)\n raise value.inspect\nend",
"title": ""
},
{
... |
2f75bd9c59d4d59f9523d41fbe8a3bf2 | Sets the intelProfiles property value. A list of intelligenceProfile objects. | [
{
"docid": "ac585c2ba17fd0d98679c75890a74a19",
"score": "0.7763105",
"text": "def intel_profiles=(value)\n @intel_profiles = value\n end",
"title": ""
}
] | [
{
"docid": "c7f0545fe05e31db9c48ec2ebbb7f3e7",
"score": "0.6270851",
"text": "def set_profiles\n @profiles = Profile.find(params[:id])\n end",
"title": ""
},
{
"docid": "23af4a1b345468e907bf1c60914f541a",
"score": "0.6239697",
"text": "def update_profiles_bulk(profiles)\n ... |
138416db2dcc5b557a6f669533168910 | Instance methods Create authentication from omniauth hash | [
{
"docid": "1ac6e5cf9b8f90614cdeb11dc4b129fd",
"score": "0.72126645",
"text": "def create_authentication(omniauth)\n authentications.create! do |a|\n a.provider = omniauth.provider\n a.uid = omniauth.uid\n end\n end",
"title": ""
}
] | [
{
"docid": "cc44bcc4c86dec11e27ab42c95a7e505",
"score": "0.72709244",
"text": "def omniauth\n Hashie::Mash.new auth_hash\n end",
"title": ""
},
{
"docid": "709eeddcbb05ad387d862bfda9711fcb",
"score": "0.72179675",
"text": "def create_authentication(omniauth)\n authenticati... |
46e4d6366705b5b7017ab4e154bf7b24 | Checks if the the reservation surpases the total allowed time | [
{
"docid": "eaf3aa00393daf08603d1e0f056754c6",
"score": "0.0",
"text": "def max_usage_time(current_time, max_usage)\n statuses = Reservation.statuses\n start_time = (current_time.to_time - max_usage.hours).to_datetime\n active_reservations = equipment.reservations\n ... | [
{
"docid": "336468a35776d688bd922ce6ad08922a",
"score": "0.7096849",
"text": "def valid_timing\n errors.add(:review, \"Invalid timing for review\") unless !reservation.nil? && reservation.status == \"accepted\" && reservation.checkout < Time.current\n end",
"title": ""
},
{
"docid": "4e2... |
2576f5184499183cd0fca008568f6076 | Format multiple log messages. | [
{
"docid": "eba15643293084b74245bc82a49a771e",
"score": "0.6680799",
"text": "def format_multiple_messages(level, label, messages)\n super(level, label, messages) do |*args|\n args.unshift(LEVELS[level])\n end\n end",
"title": ""
}
] | [
{
"docid": "32e51bdffcff446fc27da13e5818e4c8",
"score": "0.72494286",
"text": "def format_multiple_messages(level, label, messages, &block)\n args = [level.to_s.upcase, timestamp]\n args = block.call(*args) if block\n\n header = sprintf(self.class::FORMAT_STRINGS[:header], *args)\n ... |
79f10206b5a413983c529dd7e261b419 | Must be overridden by subclass. Should return a model instance, or nil | [
{
"docid": "b59620f6ac095690c441909fe729e7a5",
"score": "0.0",
"text": "def load_by_id(_id, _context)\n raise NotImplementedError\n end",
"title": ""
}
] | [
{
"docid": "317be8fc1895cf8498224ad9255a279b",
"score": "0.7544714",
"text": "def model\n @model ||= Model.new(self)\n end",
"title": ""
},
{
"docid": "18a587a6624887d14e285b75ed5b7116",
"score": "0.7249147",
"text": "def model\n return @model\n ... |
0efaa2ee58ade48f2a607f51def2930a | List of all applicable validators from both the policy and its parent | [
{
"docid": "ef08285a9810e5d796a467c69a34fdba",
"score": "0.81783384",
"text": "def validators\n parent_validators = self == Tram::Policy ? [] : superclass.validators\n (parent_validators + local_validators).uniq\n end",
"title": ""
}
] | [
{
"docid": "6ee2b3e82333eec4e7bf5f1488f821e4",
"score": "0.710864",
"text": "def validators\n []\n end",
"title": ""
},
{
"docid": "19bf32ab4588729b33bc7deeb0ec740d",
"score": "0.68133575",
"text": "def validator_instances\n @validator_instances ||= validators.map ... |
8fdaa50b2f1c510d67043e3799ba3dc1 | GET /ariaquenuploads/1 GET /ariaquenuploads/1.json | [
{
"docid": "fd92c49a8bd72b260c687c34f34421f5",
"score": "0.7069001",
"text": "def show\n @ariaquenupload = Ariaquenupload.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @ariaquenupload }\n end\n end",
"title": ""
}
] | [
{
"docid": "8e84a874ed433cea5f483d9302e2715e",
"score": "0.727587",
"text": "def show\n @upload = @event.uploads.find(params[:id])\n\n respond_to do |format|\n format.json { render json: @upload }\n end\n end",
"title": ""
},
{
"docid": "367d7883137e5534896e49afdc10bcdb",
... |
372434b86f8a86b3a8daf4cd21a9953e | Override this to configure the incoming email address | [
{
"docid": "10c4f6bd3a7920be6fbd93b013a7eebd",
"score": "0.7179087",
"text": "def incoming_email_address\n Integral::Settings.contact_email\n end",
"title": ""
}
] | [
{
"docid": "324f140ac84525b2a60a333fdc072939",
"score": "0.7345379",
"text": "def initialize_email\n with_config do |config, _|\n @email_to = config[\"email\"][\"to\"] rescue nil\n end\n end",
"title": ""
},
{
"docid": "a45d84a4e22d2bafc0c4ea619dd938cf",
"score": "0.7014237",... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "3cec28429090adaead2735d591d56ace",
"score": "0.0",
"text": "def council_params\n params.require(:council).permit(:designator, :number)\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... |
70ef61bfa0d6b2d2dd6f36a9018b5710 | GET /page_templates/new GET /page_templates/new.json | [
{
"docid": "9490e2f5940fb5e10c5a84a70e88419a",
"score": "0.78366274",
"text": "def new\n @page_template = PageTemplate.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json=>@page_template}\n end\n end",
"title": ""
}
] | [
{
"docid": "962885558c3c77097f60ac4cb8618073",
"score": "0.7528082",
"text": "def new\n @template = Template.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @template }\n end\n end",
"title": ""
},
{
"docid": "962885558c3c77097f60a... |
3f6b48986e67bafbd2607f6f8e4905b7 | Berechne den Winkel zwischen zwei Ebenen | [
{
"docid": "68be6def75f64b7c4d1e0ee45ed0f3ee",
"score": "0.0",
"text": "def winkel(rhs)\n n = normalen_vektor\n m = rhs.normalen_vektor\n cos = (n * m).abs / (n.norm * m.norm)\n # Floating Point Ungenauigkeiten, können dazu führen, dass cos > 1.0\n # Dieser Fall wird hier abgefangen, dami... | [
{
"docid": "07f4aba74008200310213b63a5f3de3f",
"score": "0.61349875",
"text": "def zuruecksetzen()\n end",
"title": ""
},
{
"docid": "30858be404aadc463f81dcd378f80d17",
"score": "0.6123226",
"text": "def letzte_komponente\n \n end",
"title": ""
},
{
"docid": "efd221d44... |
1bc6d0e31233676f5d06a44a285b3726 | Fetch API Credentials for a client Author: Puneet Date: 29/01/2018 Reviewed By: | [
{
"docid": "3f1dcbc3df05620cd9c1513fde1323d6",
"score": "0.6644634",
"text": "def fetch_api_credentials\n\n # Return error if this request was not a XHR request\n if request.xhr?.nil?\n service_response = Result::Base.error(\n error: 'sc_1',\n error_message: 'not allowed',\n ... | [
{
"docid": "644f026a18a7a83308227b89edc0133c",
"score": "0.68528956",
"text": "def fetch_api_credentials\n\n @client_api_credentials = ClientApiCredential.where(client_id: @client_id).last\n \n return validation_error(\n 'cm_gcac_2',\n 'invalid_api_params',\n ['... |
89bc72de5c653ae73585980429ea0744 | POST /prescribtions POST /prescribtions.json | [
{
"docid": "41c887fb978e5f2f7e21cbbf44e09ca5",
"score": "0.67857987",
"text": "def create\n @prescribtion = Prescribtion.new(prescribtion_params)\n\n respond_to do |format|\n if @prescribtion.save\n format.html { redirect_to @prescribtion, notice: 'Prescribtion was successfully created... | [
{
"docid": "7afe6ee9d70dbc11b2056ed8b0a17bc3",
"score": "0.64532876",
"text": "def index\n @prescribtions = Prescribtion.all\n end",
"title": ""
},
{
"docid": "34b90bc2fffadcbc8e208c5dc20d86e6",
"score": "0.6441915",
"text": "def create\n\t\tnew_prescription = current_user.prescr... |
187c9ff61fce8c4c202b04866d91d1da | Returns the value of attribute element. | [
{
"docid": "da5a7957d97b66cc73e862a4bebe3e85",
"score": "0.0",
"text": "def element; end",
"title": ""
}
] | [
{
"docid": "e144797064ca6c74908dc9a89226ca50",
"score": "0.8007108",
"text": "def attribute(attribute_name)\n element.attribute_value attribute_name\n end",
"title": ""
},
{
"docid": "ad0aa4ed97207bc5da87a23f4db3dbfa",
"score": "0.79929554",
"text": "def attribute_value(a... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "eac3076674bb06e9e639c169d55f378e",
"score": "0.0",
"text": "def set_dis_indiastate\n @dis_indiastate = DisIndiastate.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... |
b650a5949162969ce90dfed50bf9eb64 | GET /weapon_infos/new GET /weapon_infos/new.xml | [
{
"docid": "639efd0a223c3296e42299b17a2e05ac",
"score": "0.7950689",
"text": "def new\n @weapon_info = WeaponInfo.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @weapon_info }\n end\n end",
"title": ""
}
] | [
{
"docid": "35e219892d9c1a09bad8da37890ff7ea",
"score": "0.73990816",
"text": "def create\n @weapon_info = WeaponInfo.new(params[:weapon_info])\n\n respond_to do |format|\n if @weapon_info.save\n flash[:notice] = 'WeaponInfo was successfully created.'\n format.html { redirect_to... |
b6de2d8aae89dad8263948e17c1eacf3 | Finds all occurrences of a given file path, within all data directories. | [
{
"docid": "4de4f08cc616af6a936c89ab0ea5cd65",
"score": "0.6674702",
"text": "def all_data_files(path)\n each_data_file(path).to_a\n end",
"title": ""
}
] | [
{
"docid": "dd118bc4c884c3aefe7c20f8444dc932",
"score": "0.70598406",
"text": "def find_data_file(path)\n each_data_path(path).find { |full_path| File.file?(full_path) }\n end",
"title": ""
},
{
"docid": "2e849af6f166798e581f9a30149d0954",
"score": "0.68263763",
"text": "def ... |
7080ae6166a1a1da8114fbeb317968a8 | Sets the left hand side of assignment or boolean. | [
{
"docid": "a883baa818bd81fcf0ccfcf02b35a30d",
"score": "0.6843975",
"text": "def lhs= exp\n expect(*ASSIGNMENT_BOOL)\n @my_hash_value = nil\n self[1] = exp\n end",
"title": ""
}
] | [
{
"docid": "6f72bd5d7b8191f66f67af02b52411cb",
"score": "0.6556447",
"text": "def requires_assignment\n _assign if !@_assigned\n end",
"title": ""
},
{
"docid": "5c32e087e8c834a32cead6591fedd3bb",
"score": "0.655166",
"text": "def lhs\n expect(*ASSIGNMENT_BOOL)\n self[1... |
96d1c34a162b6c0a897b94696f2ab6ea | Returns an array of strings that represent date modifiers | [
{
"docid": "776d3b6419c1ab2545d73082b2289f28",
"score": "0.0",
"text": "def adjustments\n @adjustments ||= parse(str)\n end",
"title": ""
}
] | [
{
"docid": "41daf9b7fb6913cce2fa681b4a53e4c8",
"score": "0.672304",
"text": "def date_array\n return [self.year, self.month, self.day]\n end",
"title": ""
},
{
"docid": "41daf9b7fb6913cce2fa681b4a53e4c8",
"score": "0.672304",
"text": "def date_array\n return [self.year, self.m... |
c30bd28204c5cb1233e6b5ce38b39851 | Copies handlers from the `source_list` onto the current handler list. If a block is given, only the entries that return a `true` value from the block will be copied. | [
{
"docid": "0583cfdb2800c379d7ce38f5742949ea",
"score": "0.7148923",
"text": "def copy_from(source_list, &block); end",
"title": ""
}
] | [
{
"docid": "cbe6734b425fcb80f252ece67953fed2",
"score": "0.5380155",
"text": "def source_list(label, *list)\n _logger.warn \"Duplicate source_list '#{label}'\" if @result.source_lists.has_key?(label)\n @result.source_lists[label] += list\n end",
"title": ""
},
{
"docid": "7bf0d0... |
fd07885f05f431413e0a130b6200a085 | PATCH/PUT /search/1 PATCH/PUT /search/1.json | [
{
"docid": "447f1f985b62bc19dc2284d8dc856f5c",
"score": "0.6469013",
"text": "def update\n respond_to do |format|\n if @search.update(search_params)\n format.html { redirect_to @search, notice: 'Search was successfully updated.' }\n format.json { render :show, status: :ok, location... | [
{
"docid": "b681a4253fc8413773c218900d6fc8ea",
"score": "0.6872071",
"text": "def update\n respond_to do |format|\n if @search.update(search_params)\n format.html { redirect_to :root }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n ... |
1cca383443ea76374b40c5fe7478563d | User doesn't want to order | [
{
"docid": "98cbb9e01a79a1eb41d0a2e76b653235",
"score": "0.0",
"text": "def pass(sender)\n reply \"Okay, if you say so... (foreveralone)\"\n\n add_to_hash(sender, \"Not ordering\", store['orders_hash'])\n end",
"title": ""
}
] | [
{
"docid": "c51c8c497fddd5cb84e581768c801d5a",
"score": "0.7020395",
"text": "def order_placed_online?\n !( self.is_not_halouser? || user_intakes.blank? || user_intakes.first.order.blank? )\n end",
"title": ""
},
{
"docid": "4049cb28f512f4427955f97c27369afb",
"score": "0.68872947",
... |
51ca5849b256182038170d0f8325159c | A hash of the Spyders[rdocref:Spyder::Group] connected to this ECC. It is index by both description and numerical index | [
{
"docid": "759690ab302b7ef92a353e9813f28257",
"score": "0.0",
"text": "def spyders\n build_system_layout\n @spyders\n end",
"title": ""
}
] | [
{
"docid": "640cc000560734a0fe8dffa860c04e4b",
"score": "0.6084959",
"text": "def hash\n [group, x, y].hash\n end",
"title": ""
},
{
"docid": "e92bda2f63269ce1fad9ea1fabe3abbb",
"score": "0.58439374",
"text": "def generate_hash\n @groups.flatten.inject([]) {|hash, stone| h... |
588a975ee68e4b2ce47f7629411d4538 | Create Schedule Override Creates a schedule override for the specified user and schedule | [
{
"docid": "7c147dc79af127f94a2beb22a8111a10",
"score": "0.7065556",
"text": "def create_schedule_override(identifier, body, opts = {})\n data, _status_code, _headers = create_schedule_override_with_http_info(identifier, body, opts)\n return data\n end",
"title": ""
}
] | [
{
"docid": "702129f5418555539f9fd3da2ddd9a8d",
"score": "0.77511746",
"text": "def create_schedule_override(id, options = {})\n params = {\n override: {\n start: options[:start],\n end: options[:end],\n user: {\n id: options[:user_id],\n ... |
e4dc36d3f295119bd48b5baec9e73098 | POST /talks POST /talks.json | [
{
"docid": "c19f4a11b89018b1e912830f2eee65e1",
"score": "0.59236974",
"text": "def create\n # TBD: we would like to return to the 'control' screen from create, not to the default\n @talk = Talk.new(talk_params)\n @talk.person_id = current_person.id # TBD: use one of the association functions f... | [
{
"docid": "f4d253965f3def04647d6b65e5501870",
"score": "0.73805135",
"text": "def create\n @talk = current_user.talks.new(params[:talk])\n\n respond_to do |format|\n if @talk.save\n format.html { redirect_to @talk, notice: 'Talk was successfully created.' }\n format.json { rend... |
a333d11d12389a83d533c19ef40d5bb1 | defining the method for valid number | [
{
"docid": "fb70a0745f48885c781daa0f4436f797",
"score": "0.68286496",
"text": "def valid_loan_amount?(input)\n Integer(input) rescue false\nend",
"title": ""
}
] | [
{
"docid": "05bde42c711216f547310ed8f05547f4",
"score": "0.8425305",
"text": "def valid_number?(num); end",
"title": ""
},
{
"docid": "05bde42c711216f547310ed8f05547f4",
"score": "0.8425305",
"text": "def valid_number?(num); end",
"title": ""
},
{
"docid": "05bde42c711216... |
c6ebfe37bc163bc9152f1b0c3f605e56 | POST /kegs POST /kegs.json | [
{
"docid": "560683aa84a7740a45f5463e80038e0c",
"score": "0.630798",
"text": "def create\n @keg = Keg.new(keg_params)\n\n respond_to do |format|\n if @keg.save\n format.html { redirect_to [:admin, @keg], notice: 'Keg was successfully created.' }\n format.json { render action: 'sh... | [
{
"docid": "1e81120d95b217a49ac59ae58ea3cbbb",
"score": "0.6464784",
"text": "def create\n @keg = Keg.new(keg_params)\n\n respond_to do |format|\n if @keg.save\n format.html { redirect_to @keg, notice: 'Keg was successfully created.' }\n format.json { render action: 'show', stat... |
116b056fc734ae90120d99326980d5e1 | Redirects guest to comparisons' root. | [
{
"docid": "037224515b4b6d2003b0ca2b3a9c5ef7",
"score": "0.7130655",
"text": "def redirect_guest\n redirect_to explore_comparisons_path if @context.guest?\n end",
"title": ""
}
] | [
{
"docid": "7260adb0a090fa72e82a728364778b1d",
"score": "0.6599711",
"text": "def repel_usr_guest\n redirect_to(\"/\") if session[:usr_id].nil?\n end",
"title": ""
},
{
"docid": "f35007768418c84b0c0cee0e6d837a2c",
"score": "0.6185008",
"text": "def redirect_to_user_home\n re... |
b11c0375aaad0817260617d17c2266e0 | filters need to this in charmode Create a new connection object [+server+] The reactor this connection is associated with. [+sock+] The socket for this connection. [+returns+] A connection object. | [
{
"docid": "73a4c3cf8d94b50be73a895152b97f4a",
"score": "0.5576785",
"text": "def initialize(server, sock)\n super(server, sock)\n case @server.service_io\n when :lineio\n @sockio = LineIO.new(@sock)\n when :packetio\n @sockio = PacketIO.new(@sock)\n else\n @sockio = SockIO... | [
{
"docid": "150c0aabe4527fd202c622c3e5d62474",
"score": "0.65083504",
"text": "def request_sock\n\t\tself.check_closed\n\t\tself.connect unless @request_sock\n\t\treturn @request_sock\n\tend",
"title": ""
},
{
"docid": "150c0aabe4527fd202c622c3e5d62474",
"score": "0.65083504",
"text"... |
9bf4c4ea0f963dec9557afd47a5611c9 | POST /weather_statuses POST /weather_statuses.json | [
{
"docid": "b99d8df9cd4c753759e7c7a46cfbc8ad",
"score": "0.6849832",
"text": "def create\n @weather_status = WeatherStatus.new(params[:weather_status])\n\n respond_to do |format|\n if @weather_status.save\n format.html { redirect_to @weather_status, notice: 'Weather status was successf... | [
{
"docid": "9ae14b9a2d366878f91962abf614aec6",
"score": "0.63482714",
"text": "def create\n @weather = Weather.new(weather_params)\n\n respond_to do |format|\n if @weather.save\n format.html { redirect_to @weather, notice: 'Weather was successfully created.' }\n format.json { re... |
a24093848dcafd5ab9d9f7b6eb76c7b4 | Update an object with the given attributes. This is done by a special model method because changes of the 'active' flag have side effects for other associated objects. THE CALLER MUST USE A TRANSACTION around a call to this method. There is no need to call here unless the 'active' flag state is changing. Pass in 'true'... | [
{
"docid": "ca9937460d9e5fba0232aa730fc8070c",
"score": "0.7524472",
"text": "def update_with_side_effects!( attrs, update_projects = true, update_tasks = true )\n active = self.active\n self.update_attributes!( attrs )\n\n # If the active flag has changed, deal with repercussions.\n\n if ( ... | [
{
"docid": "453a06b707bf6afc9afd9c31b56b8b43",
"score": "0.68477607",
"text": "def update_with_side_effects!( attrs, update_tasks = true )\n active = self.active\n self.update_attributes!( attrs )\n\n # If the active flag has changed, deal with repercussions.\n\n if ( update_tasks and attrs[... |
529c4d08ce2da340de2833d8baf485a6 | POST /areas POST /areas.json | [
{
"docid": "74375e1927b7707419f946bb653c2a34",
"score": "0.71488166",
"text": "def create\n @area = Area.new(params[:area])\n\n respond_to do |format|\n if @area.save\n format.html { redirect_to areas_path, notice: 'Area was successfully created.' }\n format.json { render json: ... | [
{
"docid": "43cadf6f56887e6a77acba635e923259",
"score": "0.7822764",
"text": "def areas\n @area = Area.new(geo_json: params.to_json)\n if @area.save\n json_response([id: @area.id], :created, :geo_json_recieved)\n else\n json_response(nil, :error, :db_error)\n end\n end",
"titl... |
ef09221637dca62f0bdc84c9af737036 | Create a new Staff object | [
{
"docid": "00426fc42530860bebd86c5cf8ab9416",
"score": "0.7397668",
"text": "def new\n \t@staff = Staff.new\n end",
"title": ""
}
] | [
{
"docid": "069243a22d104e688cf175fa44bd0b55",
"score": "0.72570264",
"text": "def create\n @staff = Staff.new(staff_params)\n\n respond_to do |format|\n if @staff.save\n success_format(format, 'created', STAFF_CREATE_SUCCESS)\n else\n error_format(format, 'new')\n end... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "50a166ddde57e8be8d446bea685d8b2f",
"score": "0.0",
"text": "def publication_params\n params.fetch(:publication, {})\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7495027",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.69566035",
"text": "def strong_params\n params.require(:request).permit(param_whit... |
b4db3c7187c8634cacfe7d0d498d95d8 | HTML fragment containing the association links for the given object, or a link to lazily load them if configured. Also contains the inline mtm_edit forms when editing. | [
{
"docid": "15837b4dca1ac364c7692f4fad612660",
"score": "0.83644503",
"text": "def association_links(obj)\n if model.lazy_load_association_links?(type, request) && normalized_type != :association_links && request.params['associations'] != 'show'\n \"<div id='lazy_load_association_links' data... | [
{
"docid": "721afa0527aca5f23e74cddc3a979792",
"score": "0.74266976",
"text": "def association_link(mc, assoc_obj)\n if mc\n t = h(mc.object_display_name(:association, request, assoc_obj))\n if mc.supported_action?(type, request)\n t = \"<a href=\\\"#{base_url_for(\"#{mc.link... |
b49e47457e4f2a1bb6b8b0f3a5e7c39e | Returns true if the record has been approved. | [
{
"docid": "3e23dba3e09e59b8fa338831d348036e",
"score": "0.76644397",
"text": "def approved?\n approval_state.present? ? approval_state == 'approved' : approval.try(:approved?)\n end",
"title": ""
}
] | [
{
"docid": "76a93390f8ce5597a6d54a7ea4b77768",
"score": "0.8208751",
"text": "def approved?\n status == STATUS_APPROVED\n end",
"title": ""
},
{
"docid": "58e65e0eeffcdff5d3de749bf8d81770",
"score": "0.7928196",
"text": "def approved?\n (status == APPROVED)\n end",
"t... |
13d35d8fdeb8d57ce717aac59cb80b27 | Instantiate the given middleware by name, on the spot, and call() it immediately | [
{
"docid": "876ef095f1b9343ae88ee2df57c74a58",
"score": "0.58218956",
"text": "def call(env)\n middleware_module = lookup_middleware_module\n app_wrapped_with_middleware = middleware_module.new(@app, *@args_for_middleware_new, &@block_for_middleware_new)\n app_wrapped_with_middleware.call... | [
{
"docid": "d41c80410fc8662ca8cd4c59dc1f4665",
"score": "0.6822307",
"text": "def middleware(&block); end",
"title": ""
},
{
"docid": "3f35059e1fa6a00c17e6ed37a5946aaa",
"score": "0.6617553",
"text": "def middleware; end",
"title": ""
},
{
"docid": "e1f79978fd167cd9be81df... |
227039afb0278483e948f898efcebdd5 | The naughty privates of this class. MacRuby callback functions. | [
{
"docid": "3097068443e74cf29278b027999a93b9",
"score": "0.0",
"text": "def applicationDidFinishLaunching notification\n start_output\n start_input\n end",
"title": ""
}
] | [
{
"docid": "9c186951c13b270d232086de9c19c45b",
"score": "0.7146666",
"text": "def callbacks; end",
"title": ""
},
{
"docid": "9c186951c13b270d232086de9c19c45b",
"score": "0.7146666",
"text": "def callbacks; end",
"title": ""
},
{
"docid": "bce3e1d1089bf6d6722900bd3cac0f36... |
4f2a59c6fd208aba8335ad2c6ba3b3e7 | Set multiple nodes in one operation. Find or create a node matching SUB by interpreting SUB as a path expression relative to each node matching BASE. If SUB is '.', the nodes matching BASE will be modified. +base+ the base node +sub+ the subtree relative to the base +value+ the value for the nodes | [
{
"docid": "ab8775dc64056143e65b869ebcf8bb19",
"score": "0.5494582",
"text": "def setm(base, sub, value)\n run_command :augeas_setm, base, sub, value\n end",
"title": ""
}
] | [
{
"docid": "493a0ece92e1b3c7ba2ec6afb76351b6",
"score": "0.5773038",
"text": "def []=(*args)\n value = args.pop\n args = args.first.to_s.split('/') if args.size == 1\n tree = args[0..-2].to_a.inject(self) { |tree, name| tree.tree(name) }\n tree.put(args.last, value)\n end",
"t... |
4eb303c9cdd8a70f4c3a4d251284db34 | Return a class object. If a class is given, return it directly. Treat strings and symbols as class names. If nil is given or an invalid class name string or symbol is used, return self. Raise an error for other types. | [
{
"docid": "cd54fbecfea017853e834ec03c82c1e5",
"score": "0.6539884",
"text": "def sti_class(v)\n case v\n when String, Symbol\n constantize(v) rescue self\n when nil\n self\n when Class\n v\n else\n raise(Error, \"I... | [
{
"docid": "555695ebb588eb074ce2d114058d8a6d",
"score": "0.65949273",
"text": "def class_for(cls)\n return nil unless cls # superclass will return nil when none\n fqn = cls.qualified_type_name\n return classes[fqn] if classes[fqn]\n classes[fqn] = JClass.parse(self, cls)\n end",
... |
e7c5a9d71efe1c27efbbd97e7603aa03 | DELETE /uuids/1 DELETE /uuids/1.json | [
{
"docid": "db58e03ed2d51bee25755e1e98f52fd2",
"score": "0.6532175",
"text": "def destroy\n if current_user.admin?\n @uuid.destroy\n respond_to do |format|\n format.html { redirect_to uuids_url, notice: 'Uuid was successfully destroyed.' }\n format.json { head :no_content }\n ... | [
{
"docid": "d2f2b7e27bbbe134661361074c399275",
"score": "0.73650277",
"text": "def cmd_delete argv\n setup argv\n uuid = @hash['uuid']\n response = @api.delete(uuid)\n msg response\n return response\n end",
"title": ""
},
{
"docid": "689d5a07a403c4b765ba178e4aff08a3",
... |
3b4712254b3b382d1240f8e80e05084d | Returns parametrized subject. detect_id :robots => :robots detect_id sluggable_ar_resource => 'Sluggableresourceslug' detect_id some_resource_with_id => '4' detect_id generic_object => "" | [
{
"docid": "38e7c53502a21ba109d87989a02e2eb3",
"score": "0.67471004",
"text": "def detect_id(subject)\n case\n when Symbol === subject\n subject\n when subject.respond_to?(:to_param)\n subject.to_param\n when subject.respond_to?(:id)\n subject.id.to_s\n else... | [
{
"docid": "789b4add9c707aff1eeeaee6a27fa8e1",
"score": "0.5680492",
"text": "def identify(id, *args); ''; end",
"title": ""
},
{
"docid": "5ed7a5307069cc8e30799ce8aa264643",
"score": "0.56021607",
"text": "def subject_id_from_token(token)\n token.params['patient'] || token.pa... |
0afa2129e7258cac02856ef2629be0a3 | GET /trips/1 GET /trips/1.json | [
{
"docid": "830986b49532ace0558a275da3e4d28b",
"score": "0.7495081",
"text": "def show\n respond_to do |format|\n format.any(:trips_json, :json) do\n render json: @trip\n end\n end\n end",
"title": ""
}
] | [
{
"docid": "9786bf4b45c1fa79d5dc5c66e89f139f",
"score": "0.7781902",
"text": "def index\n @trips = Trip.all\n\n render json: @trips\n end",
"title": ""
},
{
"docid": "05d09302be982f21a67335593750f388",
"score": "0.7664061",
"text": "def all_trips\n @trips = Trip.all\n ... |
bce8d4d05c1d2419fc5f3d9f00dcad12 | nil ! mutate the argument string given a string 'connor' swap pairs of characters swap pairs beginning with the outside chracters, moving inwards the number of times to swap is half the length of the string, if it's odd that character doesn't need to be swapped swap logic first, last begin at 0 and 1 respectively str[f... | [
{
"docid": "789333db052b8d3a9f46295a3d7a4d5e",
"score": "0.6199924",
"text": "def reverse_str(str)\n left_index, right_index = 0, (str.length - 1)\n\n while left_index < right_index\n\n str[left_index], str[right_index] = str[right_index], str[left_index]\n\n left_index += 1\n right_index -= ... | [
{
"docid": "4ddabf597a920e426f34222dd9fa1c4b",
"score": "0.7163099",
"text": "def swap(string)\n\tswapper = string.split\n\tstring = swapper.reverse.join(\" \")\n\tstring.downcase!\n\tvowels = \"aeioua\"\n\tcon = \"bcdfghjklmnpqrstvwxyzb\"\n\tindex = 0\n\tfinal_string = \"\"\n\tstring.length.times do |i... |
648c62d2f6ff3bc83fb4722aa9d66682 | GET /tipo_medicamentos GET /tipo_medicamentos.json | [
{
"docid": "b21e46814837c2af74b3e1ff640a1996",
"score": "0.7103278",
"text": "def index\n @tipo_medicamentos = TipoMedicamento.all\n end",
"title": ""
}
] | [
{
"docid": "8be9e327f45f8e9f26a33bead07684ab",
"score": "0.7140836",
"text": "def index\n @tipo_medicos = TipoMedico.all\n end",
"title": ""
},
{
"docid": "bc4f2dd28a35d9a1b7f2f814d3a33e52",
"score": "0.7073067",
"text": "def show\n @medico = Medico.find(params[:id])\n\n re... |
cac2cf238c2683364f18221269465918 | TODO: make this more performant and/or not as weird | [
{
"docid": "2a132355e87a96182f63e7bcad450428",
"score": "0.0",
"text": "def reify_page_slots!\n self.page_slots = self.page_slot_cache.collect do |data|\n if data[:blockable_id]\n block = data[:blockable_type].constantize.find(data[:blockable_id])\n block.update_attributes JSON.par... | [
{
"docid": "ef1e4c0cc26e4eec8642a7d74e09c9d1",
"score": "0.57864875",
"text": "def private; end",
"title": ""
},
{
"docid": "bc658f9936671408e02baa884ac86390",
"score": "0.57016623",
"text": "def anchored; end",
"title": ""
},
{
"docid": "d88aeca0eb7d8aa34789deeabc5063cf"... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "e1d41f6c40b6dbdf9a4310b1ed2cf364",
"score": "0.0",
"text": "def set_opportunity_stage\n @opportunity_stage = OpportunityStage.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... |
f50ea8114fa261fb86ac5b87e121502a | Change the in game lang (reload the texts) | [
{
"docid": "52bd0689725d0c90c0d5a249b1c29c6d",
"score": "0.68028796",
"text": "def language=(value)\n return unless GameData::Text::Available_Langs.include?(value)\n @language = value\n GameData::Text.load\n end",
"title": ""
}
] | [
{
"docid": "906c96d70c67e8ca5c39f8e91d6a0468",
"score": "0.6896599",
"text": "def do_change_lang\n language = $document.at_css('#tryruby-lang-select').value\n $document.root['lang'] = language\n set_cookie('tryruby_nl_language', language)\n get_content_from_server(language)\n end",
"tit... |
f8f2d39a992178ddc78c797176fd0e23 | GET /problems GET /problems.xml | [
{
"docid": "107a1ec6bcdd3d77cda10a8db45dd9e8",
"score": "0.6221989",
"text": "def index\n @problems = @problems.distinct.score_by_user(current_user.id)\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @problems }\n end\n end",
"title": ""
}... | [
{
"docid": "e62c7ada668cb62f0de2cd37322ca862",
"score": "0.74268717",
"text": "def index\n @problems = Problem.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @problems }\n end\n end",
"title": ""
},
{
"docid": "5ba2a51459880ca... |
5a841c0ec852d9b5e334a3cba2e22b7d | POST /disposisi POST /disposisi.json | [
{
"docid": "661c62e95a2528d1af685e0b81c909cf",
"score": "0.73116666",
"text": "def create\n @disposisi = Disposisi.new(disposisi_params)\n\n respond_to do |format|\n if @disposisi.save\n format.html { redirect_to @disposisi, notice: 'Disposisi was successfully created.' }\n form... | [
{
"docid": "5066927db750bc24f76a86052903d6d3",
"score": "0.65699816",
"text": "def disposisi_params\n params.fetch(:disposisi, {})\n end",
"title": ""
},
{
"docid": "f35496e155268830450d9c3b241ad839",
"score": "0.634217",
"text": "def create\n response = ApiPago.crear_fact... |
629c6bd67c734ebc217ea3284391ffad | Complete the sockMerchant function below. | [
{
"docid": "818f6d7e01c4e915a18852abca3bb9bf",
"score": "0.0",
"text": "def sockMerchant(n, ar)\n # return total of matching pairs\n count = Hash.new(0)\n ar.each { |e| count[e] += 1 }\n count.values.map {|x| x/2 }.inject(:+)\nend",
"title": ""
}
] | [
{
"docid": "18b8b1e754bee8505560539b3861fd6d",
"score": "0.7434196",
"text": "def sockMerchant(n, ar)\r\n\r\n\r\nend",
"title": ""
},
{
"docid": "2111d85aff790c9a2ccc48a4f66305fb",
"score": "0.6094659",
"text": "def checkoutl\n \n \n begin \n setup_response = gateway.setup_pur... |
c1f50116d5c458e2b612ccdb509a87ce | Returns true if this line was skipped, false otherwise. Lines are skipped if they are wrapped with :nocov: comment lines. | [
{
"docid": "06e87a061c52dff6fea5a514183a2a45",
"score": "0.6783452",
"text": "def skipped?\n !!skipped\n end",
"title": ""
}
] | [
{
"docid": "ce4c13756967d7aa766bc3886aa7f8f8",
"score": "0.73569125",
"text": "def is_covered?\n for i in 0..@line.length\n return false if @line[i] == false\n end\n\n return true\n end",
"title": ""
},
{
"docid": "32efbbd1da056499f0254a632ddfb8e1",
"score": "0.73501855",
... |
36ae9cfa6c5ff85936589e4589a46aea | index the set of libraries by installing a dummy library related to WORKAROUND_LIB and TODO: unclear if this is still necessary | [
{
"docid": "9e5f1766d1cc844ba49d113e58b6c2f4",
"score": "0.82982785",
"text": "def index_libraries\n return true if @libraries_indexed\n\n _install_library(WORKAROUND_LIB)\n @libraries_indexed\n end",
"title": ""
}
] | [
{
"docid": "68571c035dacd3b12605080253f32b9f",
"score": "0.75000995",
"text": "def update_library_index\n # install random lib so the arduino IDE grabs a new library index\n # see: https://github.com/arduino/Arduino/issues/3535\n install_library(WORKAROUND_LIB)\n end",
"title": ""
... |
52b7bd4c161412c8fa51dba97988b840 | :callseq: enum.first => obj or nil enum.first(n) => an_array Returns the first element, or the first +n+ elements, of the enumerable. If the enumerable is empty, the first form returns nil, and the second form returns an empty array. | [
{
"docid": "d232e02f504877cfa473118e568b4335",
"score": "0.69016004",
"text": "def first(count=MaglevUndefined)\n if count._equal?(MaglevUndefined)\n return self.first()\n end\n # return Array of first count elements of the enumeration\n cnt = Maglev::Type.coerce_to(count, Fixnum, :to_i... | [
{
"docid": "5e018131114011917e43ee26f754ec52",
"score": "0.7044337",
"text": "def first\n @enumerable.first\n end",
"title": ""
},
{
"docid": "1bfbc39bfdd6c5b376ded9802cc5adef",
"score": "0.6857624",
"text": "def first\n limit(1).to_a.first\n end",
"title": ""
}... |
47e2ec52d0776fa38f896811ff7c1151 | Extract buyer's info for agent's enquiries curl XGET 'Authorization: bns6nsk2n' ' | [
{
"docid": "c3f54ee1460c568554a3ca23465fcb0d",
"score": "0.61228865",
"text": "def agent_enquiries_buyer_reqs\n attr_list = [:min_beds, :max_beds, :min_baths, :max_baths, :min_receptions, :max_receptions, :property_types,\n :status, :buying_status, :funding, :biggest_problems, :chain_... | [
{
"docid": "5f4a91a29578e5dd3a60424fe65a5a58",
"score": "0.58904076",
"text": "def buyer_intent_info\n buyer_intent_info = Enquiries::PropertyService.new(udprn: params[:udprn].to_i).buyer_intent_info\n render json: buyer_intent_info, status: 200\n end",
"title": ""
},
{
"docid": "98fc... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "bb98239b5379b131d6e0e768a364da5d",
"score": "0.0",
"text": "def office_params\n params.fetch(:office, {})\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7493595",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.6954758",
"text": "def strong_params\n params.require(:request).permit(param_white... |
5bea4239f59961db82a9bb7504aa7ed5 | Execte Arounds must handle all exceptions really well. Their naming should be much clearer. Think of it as naming a new feature. Use Execute Around when you frequently have code that needs to come before or after another set of code, or both. This way you can define a method that takes a block, | [
{
"docid": "7761fa98452abb2b3c267aea6e024688",
"score": "0.0",
"text": "def run_that_block( &that_block )\n puts \"About to run the block\"\n that_block.call # if that_block # this checks to see if a block was passed\n puts \"Done running the block\"\nend",
"title": ""
}
] | [
{
"docid": "9b1c3b87f35505d3d5105ae1dacafa44",
"score": "0.6840511",
"text": "def execute(block)\n block.call\nend",
"title": ""
},
{
"docid": "555266b90d8f22685d7d597108d7aba2",
"score": "0.6815939",
"text": "def execute(block)\n block.call\nend",
"title": ""
},
{
"d... |
2e814b279e265773be5794fa7b9edae2 | Verify that letter is in the current word Note need to comment out this test if running test 15 | [
{
"docid": "83723bb183a669b09730467dcd915422",
"score": "0.77037156",
"text": "def test_13_return_good_job_prompt_if_letter_in_word\n $word = \"test\"\n letter = \"e\"\n results = letter_test(letter)\n assert_equal(\"Good job - that letter was in the word. Please guess again!\", results)\n ... | [
{
"docid": "16522c7a2904d9e3161cba520799b042",
"score": "0.7604438",
"text": "def test_letter(letter)\n check_win do\n @used_letters << letter\n if @word.include? letter and !@guessed.include? letter then\n @word.scan(/(?=#{letter})/).count.times do\n ... |
03a52cb2a01e6371d26636b1400667a0 | Returns true if the current user is logged in as company admin or app admin. | [
{
"docid": "b8ed19681f889c890f40fd5daf5bdb73",
"score": "0.8640663",
"text": "def logged_in_admin?\n logged_in? && (app_admin? || company_admin?)\n end",
"title": ""
}
] | [
{
"docid": "13e651118531e2556ea85995b4e3e0b5",
"score": "0.844553",
"text": "def logged_in_company_admin?\n logged_in? && company_admin?\n end",
"title": ""
},
{
"docid": "5a5f49078b9b23b7f526abb1f78a4259",
"score": "0.8224782",
"text": "def logged_in_app_admin?\n logged_in? &... |
ea93d558d230096946e521e7ffc1c193 | returns [Boolean] True when validation passed | [
{
"docid": "21d466eada306a358a23c88fef0111db",
"score": "0.0",
"text": "def validate\n validate_params\n validate_colour\n validate_coordinates\n validate_dimension\n end",
"title": ""
}
] | [
{
"docid": "c75ff69fc974f4adee454c385f652c1b",
"score": "0.861637",
"text": "def valid?\n return validate\n end",
"title": ""
},
{
"docid": "b8c9ad3787c00e09b2d29227e5e7ef5f",
"score": "0.857561",
"text": "def valid?\n validate\n end",
"title": ""
},
{
... |
5005acc115c8b805faa6b137b90652d6 | GET /product_sliders/1 GET /product_sliders/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "3d7537c79502e8281a15d26c9319768d",
"score": "0.6842047",
"text": "def index\n @food_sliders = FoodSlider.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @food_sliders }\n end\n end",
"title": ""
},
{
"docid": "2eb42ab... |
0a5d9ed86d46026b7e534ffc503648be | convert everything to a string so it can be written to a file | [
{
"docid": "ebbcea1952763a65598125835d9f7039",
"score": "0.0",
"text": "def to_s()\n lines = []\n\n # go through each of the config lines, if the line number is in new_conf_lookup\n # it means we've changed it so we will use those lines instead of the original\n # lines. If we encounter a li... | [
{
"docid": "15968a33c079f19bed80de8636658866",
"score": "0.7259721",
"text": "def to_s(file = T.unsafe(nil)); end",
"title": ""
},
{
"docid": "7b13d3ab162c98099faab85d5b098637",
"score": "0.69449085",
"text": "def to_s\n [ super.chop,\n \"@filepath=\\\"#{@filepath}\\\",\"... |
b5f6c1265c5f15c62d34f06c580afd07 | Fix Mountain Lion build. Committed upstream as r9649 | [
{
"docid": "2b89c3a47e97c64336d491399d49ab94",
"score": "0.0",
"text": "def patches\n { :p0 => DATA }\n end",
"title": ""
}
] | [
{
"docid": "34f2be6ca5d5325f4afea2ee94aa8132",
"score": "0.5956729",
"text": "def __apply_Xcode_12_5_M1_post_install_workaround(installer)\n # NOTE: This fix is still required due to RCT-Folly\n # creating a function with a better name but keeping the\n # previous for backward compatibility\n __fix_... |
7d4b7ef3d90927cf4058e9d0463e6f7f | DELETE /announcers/1 DELETE /announcers/1.xml | [
{
"docid": "0953d710d838fe05a2780c13884edd26",
"score": "0.7127029",
"text": "def destroy\n @announcer = Announcer.find(params[:id])\n @announcer.destroy\n\n respond_to do |format|\n format.html { redirect_to(announcers_url) }\n format.xml { head :ok }\n end\n end",
"title": ... | [
{
"docid": "5df566458a239b2ad4d76658a823ac43",
"score": "0.6384154",
"text": "def destroy\n @ann.destroy\n respond_to do |format|\n format.html { redirect_to anns_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "c1592c9a7c989d01a99d8c2f4e7... |
486880c03d51086ea209e2f0430cec4e | POST /mt_manufacturing_resource_datas POST /mt_manufacturing_resource_datas.xml | [
{
"docid": "b7d26224a2c52737aced4c89cb4a4873",
"score": "0.70218414",
"text": "def create\n @mt_manufacturing_resource_data = MtManufacturingResourceData.new(params[:mt_manufacturing_resource_data])\n \n respond_to do |format|\n if @mt_manufacturing_resource_data.save\n format.js {... | [
{
"docid": "522bd0dc98cfb466ea7b2b10c1cd07d9",
"score": "0.65334576",
"text": "def new\n @mt_manufacturing_resource_data = MtManufacturingResourceData.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @mt_manufacturing_resource_data }\n end\n ... |
270175cedf8690dcc9832651d52cb190 | Public Returns the interval of from and to in seconds. | [
{
"docid": "c86a076ad00a9515131da3288169a2e7",
"score": "0.81248623",
"text": "def interval\n @to.to_i - @from.to_i\n end",
"title": ""
}
] | [
{
"docid": "f17d3b0807cf3daa763c9c72a5622970",
"score": "0.747958",
"text": "def period_in_seconds\n (start_time.to_i..end_time.to_i)\n end",
"title": ""
},
{
"docid": "e84563efd9e1b173b8fbddf22f40b602",
"score": "0.690364",
"text": "def seconds_until\n (start_time - Time.no... |
424da54d4b9996a626f2fae3fab386cd | '0.123456' > 123456 '1.123456' > 123456 | [
{
"docid": "8f9d32d9a13debce56ec6128c83e9d9c",
"score": "0.0",
"text": "def microseconds(time)\n ((time[:sec_fraction].to_f % 1) * 1_000_000).to_i\n end",
"title": ""
}
] | [
{
"docid": "379a1ef459d4478962551c6b19387697",
"score": "0.68802655",
"text": "def number?(input)\n #edge case, doesn't deal with 1. or 1.30 it either adds a zero or takes one off\n input.to_i.to_s == input || input.to_f.to_s == input\nend",
"title": ""
},
{
"docid": "1d79655ecdb13ce1d5bfe... |
aa95246aeaf6dec3e1b1114208941591 | Quotation: Just push the actual AST subtree onto the stack | [
{
"docid": "dcfab7af2402e1767d77dbe5578f6b20",
"score": "0.5976039",
"text": "def quote(sexp)\n [:pushl, sexp]\n end",
"title": ""
}
] | [
{
"docid": "35c321a031bb5abe8a12c3d2a9e8367d",
"score": "0.58564436",
"text": "def expr(path_stack, nodeset, context = T.unsafe(nil)); end",
"title": ""
},
{
"docid": "4585fd32aa433f592c8a2181f264b1d3",
"score": "0.5831294",
"text": "def push_parent_expression (exp)\n\n @pre... |
01ff47f6d8b1db8e437cb17339fb4ccb | Retrieve a single page of AddOnResultInstance records from the API. Request is executed immediately. | [
{
"docid": "dde32c7287a8ef25d4c40c75f850e929",
"score": "0.0",
"text": "def get_page(target_url); end",
"title": ""
}
] | [
{
"docid": "495dfe6e9a619e76b55e5f2d64b9b30a",
"score": "0.5801755",
"text": "def get_add_ons_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: AddOnApi.get_add_ons ...\"\n end\n if @api_client.config.client_side_validation... |
5937bcf29609352ce4077ea5a2a14343 | Retrieves the result of the next page. Returns nil if there is no next page or no pages at all. | [
{
"docid": "6e7c5694b5aa889f49e7a2ca2a45274c",
"score": "0.0",
"text": "def next_page\n next_request = page_iterator.next\n self.instance_eval { @env = next_request.env } if next_request\n next_request\n end",
"title": ""
}
] | [
{
"docid": "f4d0edd66ec324dfe61b18a418f7d317",
"score": "0.7915024",
"text": "def get_next_page\n response = @next_method.call(@next_link).value! unless @next_method.nil?\n unless response.nil?\n @next_link = response.body.next_link\n @value = response.body.value\n ... |
60edfa654e1984faac6e8d854fa1425b | strio.readlines(sep=$/) > array strio.readlines(limit) > array strio.readlines(sep,limit) > array See IOreadlines. | [
{
"docid": "ee7683c7aa6a761d9ad5ca82af305042",
"score": "0.73956734",
"text": "def readlines(sep=$/, limit=nil)\n raise IOError, \"not opened for reading\" unless @readable\n ary = []\n sep, limit = getline_args(sep, limit)\n if limit == 0\n raise ArgumentError, \"invalid limit: 0 for r... | [
{
"docid": "2d4e2cd819fabd05539905f1789a23ca",
"score": "0.70573956",
"text": "def readlines(eol=$/)\n ary = []\n\n while line = self.gets(eol)\n ary << line\n end\n\n ary\n end",
"title": ""
},
{
"docid": "408650d4ab56b0e427dfda8c4cd300a7",
"sco... |
a10ca2a0d47cea4f509093e8f1cfd1fe | POST /searches POST /searches.json | [
{
"docid": "6be325d7f27b9b97d7c53940fdf199b6",
"score": "0.6280838",
"text": "def create\n @search = Search.new(params[:search])\n\n respond_to do |format|\n if @search.save\n format.html { redirect_to new_search_path(:pane => 'pane3', :search_id => @search.id) }\n format.json {... | [
{
"docid": "69fcecb5d5eaaf40ec8b2cedc3a2ca4c",
"score": "0.7552998",
"text": "def create_search(params = {})\n post(\"/searches\", params)\n end",
"title": ""
},
{
"docid": "2dffef85e1b18b784304671583084fa1",
"score": "0.713603",
"text": "def create_saved_search(query)\n ... |
55d603364fc32b3c88031c07fff9ab6b | DELETE /user_interests/1 DELETE /user_interests/1.json | [
{
"docid": "582fd901bc58c093da37fe486135243e",
"score": "0.78206766",
"text": "def destroy\n @user_interest.destroy\n respond_to do |format|\n format.html { redirect_to user_interests_url, notice: 'User interest was successfully destroyed.' }\n format.json { head :no_content }\n end\n... | [
{
"docid": "dc39fd0fcc1e21da2a26fd0884ac43fb",
"score": "0.82381713",
"text": "def destroy\n @user_interest = UserInterest.find(params[:id])\n @user_interest.destroy\n \n if @user_interest.save\n render json: {\n status: 200,\n message: \"Successfully deleted user in... |
6ce4b378179b248a633638c66c634a73 | Update the target field. | [
{
"docid": "734caeaf45617d3175c85e06285ec049",
"score": "0.0",
"text": "def update_field_value!(data, field, mode = nil)\n value = get_field_value(data, field)\n array = value.is_a?(Array)\n value = yield(value)\n case mode\n when :required then # Keep value as array.\n when :forb... | [
{
"docid": "742513cfb06c5a4feebb333ca4b554b7",
"score": "0.7071639",
"text": "def update!(**args)\n @target = args[:target] if args.key?(:target)\n end",
"title": ""
},
{
"docid": "742513cfb06c5a4feebb333ca4b554b7",
"score": "0.7071639",
"text": "def update!(**args)\n... |
ae9c9d0fae9b11afca225672dea328b0 | Decide whether and where to move. There is a 75% chance the monster will move at all, and if it does, it will move towards the palayer if the player is within 6 tiles of the moster. | [
{
"docid": "0fb4ebc0d82789de49f182ffb063f078",
"score": "0.0",
"text": "def choose_move(player_coords)\n return nil unless rand < 0.75\n\n x_difference = @coords[:x] - player_coords[:x]\n y_difference = @coords[:y] - player_coords[:y]\n directions = { x: [:left, :right], y: [:up, :down] }\n ... | [
{
"docid": "803163898f743f94f5430877bbe33098",
"score": "0.72797126",
"text": "def move_type_toward_player\n # Get difference in player coordinates\n sx = @x - $game_player.x\n sy = @y - $game_player.y\n # Get absolute value of difference\n abs_sx = sx > 0 ? sx : -sx\n abs_sy = sy > 0 ... |
3a73f310bb909993f7a5049df5f1b62c | This method sets the first server of a new game. It sets it to which ever player is passed to it. | [
{
"docid": "1cf8bf4a077d71b116f0d81ea87dee91",
"score": "0.6428113",
"text": "def server(player)\n\t\t\t$server = player\n\t\t\tnew_serve($server)\n\t\tend",
"title": ""
}
] | [
{
"docid": "009edbea51f20d341e5891c41eb7b22c",
"score": "0.7125115",
"text": "def set_server\n @gameserver = Gameserver.find(params[:id])\n end",
"title": ""
},
{
"docid": "009edbea51f20d341e5891c41eb7b22c",
"score": "0.7125115",
"text": "def set_server\n @gameserver = G... |
40c32620a0f740be2fd86e7677d834ca | Raw rendering of a template to a string. It is similar to render, except that it does not set the +response_body+ and it should be guaranteed to always return a string. If a component extends the semantics of +response_body+ (as ActionController extends it to be anything that responds to the method each), this method n... | [
{
"docid": "88bd87a45de74cfc6e738e706ff55d83",
"score": "0.72087115",
"text": "def render_to_string(*args, &block)\n options = _normalize_render(*args, &block)\n render_to_body(options)\n end",
"title": ""
}
] | [
{
"docid": "7e5f9b212687b97fac3032a98b58ca30",
"score": "0.6988887",
"text": "def render_to_string(options = {})\n AbstractController::Renderer.body_to_s(render_to_body(options))\n end",
"title": ""
},
{
"docid": "88f2e92d76c1e940b7e80e06e9670549",
"score": "0.6944123",
"text... |
40125e73585faba234313b71542f0398 | replace history state on subsequent renderings | [
{
"docid": "5184edec8701a849dd3459438f02bece",
"score": "0.55057216",
"text": "def updated()\n self.updateHistory()\n end",
"title": ""
}
] | [
{
"docid": "39366c4d5ba1b12ce438fa182000d8b7",
"score": "0.65033925",
"text": "def history\n render layout: false\n end",
"title": ""
},
{
"docid": "d61e59f59db56dd6e8e145b82f847a70",
"score": "0.64458877",
"text": "def refresh()\n self.route(history.state.path, history.state.... |