query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
15989050cd0f75993652d6fe4c24f785 | DELETE /pacientes/1 DELETE /pacientes/1.json | [
{
"docid": "d481563870c32661a5ee54d2f64d61b6",
"score": "0.7315615",
"text": "def destroy\n @paciente.destroy\n respond_to do |format|\n format.html { redirect_to pacientes_url, notice: 'Paciente eliminado.' }\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "53d9fb2e98d2d50db5ac244ee9a86a87",
"score": "0.7637365",
"text": "def destroy\n @pacient = Pacient.find(params[:id])\n @pacient.destroy\n\n respond_to do |format|\n format.html { redirect_to pacients_url }\n format.json { head :no_content }\n end\n end",
"title": "... |
071583d66048dae460d982ef15f380db | returns a hash representation of access specification for a security group | [
{
"docid": "ee2be47e15df489c66621edc8f630741",
"score": "0.50052464",
"text": "def generate_access opt={}\n sanitize_access opt\n ret = {\n :IpProtocol => opt[:protocol],\n :FromPort => opt[:from],\n :ToPort => opt[:to],\n }\n # check to see if we're using another security gro... | [
{
"docid": "a80dc754b4e48946f7a507b978c57f79",
"score": "0.623697",
"text": "def hash\n security_hashes = @security_groups.map do |security_group|\n {\n \"security-groups\" => [security_group],\n \"protocol\" => @protocol,\n \"from-port\" => if @protocol ... |
c1c8c4e88e8bf7345f9035ded6b30e18 | Serialises the menu items and global settings to hashes and writes them all back out to the config file in YAML format. | [
{
"docid": "a797dadb582722e31c46618f1dbcf407",
"score": "0.708741",
"text": "def save\n make_backup_copy if back_up_config?\n fh = File.new(@filename, 'w')\n config = {\n 'global' => @globals,\n 'classes' => @classes,\n 'items' => @menu_items.map { |i| i.to_h }\n ... | [
{
"docid": "26041aeb40372399a567f8871ed7dbb5",
"score": "0.6399599",
"text": "def save!\n @selected.keys.each do |name|\n @selected.delete(name) if @selected[name].nil?\n end\n\n config = {\n 'installed' => @installed.sort,\n 'selected' => @selected,\n 'links'... |
1f94598ea2a24fb1e7e2b1f3384fe3e6 | PATCH/PUT /tipo_apostas/1 PATCH/PUT /tipo_apostas/1.json | [
{
"docid": "f49657c80e32181e403cb29465e0a327",
"score": "0.7067018",
"text": "def update\n respond_to do |format|\n if @tipo_aposta.update(tipo_aposta_params)\n format.html { redirect_to @tipo_aposta, notice: 'Tipo aposta was successfully updated.' }\n format.json { render :show, s... | [
{
"docid": "60a16d698b116508b08fafa669fa51f5",
"score": "0.6839433",
"text": "def update\n respond_to do |format|\n if @apoio.update(apoio_params)\n format.html { redirect_to @apoio, notice: 'Apoio was successfully updated.' }\n format.json { render :show, status: :ok, location: @a... |
6075c2ffef1fd3f6ebf1f4f693249560 | This method Creates a new Report. Input : Requiredname String,RequiredReport String , RequiredPackageNo String. output : Saves report in database. Author : Mohamed A.Gheith. | [
{
"docid": "02e4afc003e7b487cf3520def0b4b17e",
"score": "0.7996692",
"text": "def create\n Reports.create_report(cookies[:user_id],params[:requiredname],params[:requiredReport],params[:requiredPackageNo])\n end",
"title": ""
}
] | [
{
"docid": "a596edfe3172cfe12f66479a6f44f978",
"score": "0.70195365",
"text": "def create\n report = create_report\n ok = report.persisted?\n notify(ok, :successful_report_create, :failure_in_report_create)\n ok ? redirect_to(edit_report_path(report)) : locals(:new, :report => report)\n end... |
e9b1af5b35bdcc9d25f14d3adf2ace70 | Helper class method to look up a reviewable object given the reviewable class name and id | [
{
"docid": "1220bc61fb5df352e512d15daf1c5dc0",
"score": "0.7432377",
"text": "def find_reviewable(reviewable_str, reviewable_id)\n model = reviewable_str.constantize\n model.respond_to?(:find_reviews_for) ? model.find(reviewable_id) : nil\n end",
"title": ""
}
] | [
{
"docid": "12dfc88518b608fa3fa9d627acffcd78",
"score": "0.69476706",
"text": "def find_review\n Review.find(params[\"id\"])\n end",
"title": ""
},
{
"docid": "070ebb1432cf5aa33fed9e66de380d21",
"score": "0.65398306",
"text": "def find_review\n @review = Review.find(params[:id... |
2299e4b3064433d1478c114c57594ebe | Create the Pokemon sprite | [
{
"docid": "aa1ac5751089df0f9245815056a661a4",
"score": "0.8142226",
"text": "def create_pokemon_sprite\n if ENABLE_GIF && (@pokemon_gif = @pokemon.gif_face)\n add_disposable bitmap = Bitmap.new(@pokemon_gif.width, @pokemon_gif.height)\n @pokemon_gif&.update(bitmap)\n end\n ... | [
{
"docid": "8ce36671fcade57ee96dda2f37a728b9",
"score": "0.74204725",
"text": "def create_character_sprite\n if @character.is_a?(PFM::Pokemon)\n @character_sprite = PokemonIconSprite.new(self, false)\n @character_sprite.data = @character\n elsif @character.is_a?(String)\n ... |
730b74ad842a6f54b5a33efe3229fb3d | =begin get all articles of a ticket in correct order (overwrite active record default method) articles = ticket.articles result [article1, article2] =end | [
{
"docid": "b50149d7ca3a6fdc58e9859411febb45",
"score": "0.8337319",
"text": "def articles\n Ticket::Article.where(ticket_id: id).order(:created_at, :id)\n end",
"title": ""
}
] | [
{
"docid": "f995d06c90ec99e590ef4582730a75fd",
"score": "0.7208292",
"text": "def articles\n return @articles\n end",
"title": ""
},
{
"docid": "b9109c42b1c894b21db9cb8182e24ff0",
"score": "0.6860302",
"text": "def articles\n @articles\n end",
"title... |
874188ef19c7677b95514802740cebcd | PATCH/PUT /estadisticas/1 PATCH/PUT /estadisticas/1.json | [
{
"docid": "bb37d04c627c101c83a9656752f1408c",
"score": "0.65394604",
"text": "def update\n @empresa = Empresa.find(params[:empresa_id])\n @estadistica = @empresa.estadisticas.find(params[:id]) \n respond_to do |format|\n if @estadistica.update(estadistica_params)\n format.htm... | [
{
"docid": "b89f7321e47bba4cc92fd02231b19c6c",
"score": "0.65944284",
"text": "def update\n @estudiante = Estudiante.find(params[:id])\n\n if @estudiante.update(params[:estudiante])\n head :no_content\n else\n render json: @estudiante.errors, status: :unprocessable_entity\n end\n ... |
d17419c34c62d571875d71af4685419d | close dialog popup and give feedback to referrer | [
{
"docid": "2246fc1d04d2dbf4ab57df1ac3d637e3",
"score": "0.0",
"text": "def feedback\n @case = ReferCase.find(params[:id]) \n \n render :layout => false \n end",
"title": ""
}
] | [
{
"docid": "9dadf7790037f6fbee7d2a3693c32092",
"score": "0.7194104",
"text": "def close\n #close dialog\n end",
"title": ""
},
{
"docid": "88602f5fcbece16c5774937cf0886d38",
"score": "0.68738675",
"text": "def close\n if @dialog.abortWasRequested\n @dialog.logMessage('Abo... |
7d0ee15a62ac7d73c8c7ea5d1a9e9809 | Caches parsed template No cache by default | [
{
"docid": "459f0d3f34396e2f555c7bb5a8419cd0",
"score": "0.0",
"text": "def cache path, context = nil, &block\n @cache ||= {}\n @cache[path] ||= block.call\n end",
"title": ""
}
] | [
{
"docid": "ff685fb8b0b3bd84c473040173649eb2",
"score": "0.8011479",
"text": "def template_cache\n @template_cache ||= Tilt::Cache.new\n end",
"title": ""
},
{
"docid": "ff685fb8b0b3bd84c473040173649eb2",
"score": "0.8011479",
"text": "def template_cache\n @template_cach... |
e82eee32e2fef3de44ff52f2bd842342 | Get a single payment method type Permissions Needed: ANY | [
{
"docid": "5b2bfc7539dbe151af0303d21369c1e1",
"score": "0.0",
"text": "def get_payment_method_type(id, opts = {})\n data, _status_code, _headers = get_payment_method_type_with_http_info(id, opts)\n return data\n end",
"title": ""
}
] | [
{
"docid": "a600c60ccf8dcbcceb23ec46f0489f61",
"score": "0.69669807",
"text": "def payment_method(type)\n payment_method = payment_methods.actives.detect do |payment_method|\n payment_method.get_option('type') == type\n end\n if payment_method.nil?\n raise ArgumentError, \"P... |
7e10a510b377c233505b2018556b76ee | Define the layout template. The block must return the template source. | [
{
"docid": "3f11b9d1a36f8b1f1a163da47132e89b",
"score": "0.7752522",
"text": "def layout(name = :layout, &block)\n template name, &block\n end",
"title": ""
}
] | [
{
"docid": "c3f1373c76b76367dd1bd4d4bf19bdd6",
"score": "0.7508227",
"text": "def inside_layout(layout, &block)\n layout = layout.to_s\n layout = layout.include?('/') ? layout : \"layouts/#{layout}\"\n @template.instance_variable_set('@content_for_layout', capture(&block))\n concat (\n ... |
337d9c3cd33cbaef91633a3bc3c2e68e | :id, :name, :description implicit!!! | [
{
"docid": "954793a4ccdf1965d5d675470393d5f6",
"score": "0.0",
"text": "def reestablishLinks crmClassesToLink\n\t if crmClassUri != nil\n for crmClassToLink in crmClassesToLink \n if crmClassUri.eql? crmClassToLink.uri\n self.crmClass = crmClassToLink\n end\n end\n ... | [
{
"docid": "e16f08b0c65e7fb0e46d046f1b59c4de",
"score": "0.7002022",
"text": "def id\n name\n end",
"title": ""
},
{
"docid": "949c5e2dfae7d74d8af81fb7f1f008b6",
"score": "0.67709875",
"text": "def id; end",
"title": ""
},
{
"docid": "949c5e2dfae7d74d8af81fb7f1f008b6"... |
00210d4228ae77568c84e4af6ccd2f4f | These are all asyetunnamed procs that are the targets of GOSUBs 2140 | [
{
"docid": "5e4fe19de2b3fd1da713c6808461f6a6",
"score": "0.0",
"text": "def c\n end",
"title": ""
}
] | [
{
"docid": "f45d1fc03f9e850d2cd43ff6e95a60d6",
"score": "0.5438474",
"text": "def procs\n @procs\n end",
"title": ""
},
{
"docid": "0b8b7b9666e4ed32bfd448198778e4e9",
"score": "0.5350486",
"text": "def probers; end",
"title": ""
},
{
"docid": "ea72546e84e8... |
c797bed97ea9a41bc9d06be2d6f3ee97 | Read a wave file and resample to 32bit floating point, if needed. | [
{
"docid": "d251992aef4707a55e5076801077e81e",
"score": "0.57809836",
"text": "def load(name)\n buffer = nil\n \n reader = WaveFile::Reader.new( @path.join( name.to_s ) ) do |reader|\n buffer = reader.read( reader.total_sample_frames )\n end\n \n unless reader.format.sample_format... | [
{
"docid": "2d96bceae22dbe1cf41693ef48f4410b",
"score": "0.54249996",
"text": "def read_mono(samples)\n result = read(samples)\n return nil if !result\n factor = 1.0 / result.length\n result[0].mul!(factor)\n result[1..-1].each do |ary|\n ary.mul!(factor)\n result.... |
d0848cee9ea416dfbd5b07103b6fd1ec | get every test to pass before coding runner below | [
{
"docid": "1b2b29dcce74ff09a259997d046f272a",
"score": "0.0",
"text": "def runner\n welcome\n initial_total = initial_round\n dealer_total = dealers_hand\n new_total = 0\n until new_total > 21 || new_total > dealer_total\n new_total = hit?(initial_total)\n display_card_total(new_total)\n en... | [
{
"docid": "4214d9c38556c2b02453744c9abd3771",
"score": "0.7492311",
"text": "def pass(suite, test, test_runner); end",
"title": ""
},
{
"docid": "e820a876acc56d01d07c4fe31f07d454",
"score": "0.74173",
"text": "def run_tests\n count = 0\n puts \"Starting test run...\"\n self... |
9fecc443ba484956b62d15cbfced24e8 | ===Retourne la valeur de la une case | [
{
"docid": "1852aef9fcf58d955a355f4d40711a76",
"score": "0.0",
"text": "def getValue()\n return @value\n end",
"title": ""
}
] | [
{
"docid": "e790a19d21550d5580db3ee0027ffb40",
"score": "0.79528254",
"text": "def case; end",
"title": ""
},
{
"docid": "b22b84e02f88a9928e545dd8030d0c73",
"score": "0.78827107",
"text": "def case_value()\n return value = self.val\n end",
"title": ""
},
{
"docid": "7... |
41619b5534a85e91f814571c50a81af9 | Return a string representation of this server version. | [
{
"docid": "cb2505f77ea62f35bb629ae1a690fdf3",
"score": "0.8252398",
"text": "def to_s\n @version\n end",
"title": ""
}
] | [
{
"docid": "45a00179a01d1d86491f21e3cc7ad6fc",
"score": "0.8146219",
"text": "def to_s\n self.version.to_s\n end",
"title": ""
},
{
"docid": "68063851841552d410c612b623d16645",
"score": "0.8031185",
"text": "def to_s\n @version\n end",
"title": ""
},
{
"docid"... |
fed9a2b1ff2c7d8678a4dc44ac6f3b37 | b. i.Create a method to udpate a instructor's subject given the instructor and the new subject. ii. Then use it to update Blake's subject to "being terrible". | [
{
"docid": "55e38c965544297051c5517285e0d81a",
"score": "0.70618784",
"text": "def update_subject (school, name, new_subject)\n school[:instructors].each do |person|\n person[:subject] = new_subject if person[:name] == name\n end\nend",
"title": ""
}
] | [
{
"docid": "e16c5aba5d53d5c19f1e08348c2dd457",
"score": "0.78885645",
"text": "def update_subject(instructor, subject, school)\n\t school[:instructors].each {|x| x[:subject] = subject if x[:name]== instructor} \n\tend",
"title": ""
},
{
"docid": "80e34d576a49ccff88d8d475ed2de20c",
"scor... |
2cbb78f5efe75358de9bf08c15df5be5 | Uncurry a reverse curried closure. | [
{
"docid": "a0b6aa96d46d59c1137b519f6a2e0608",
"score": "0.67270064",
"text": "def reverse_uncurry\n Functors.reverse_uncurry(&self)\n end",
"title": ""
}
] | [
{
"docid": "818c2193acca1121f1f1dff0f7b906a6",
"score": "0.7942973",
"text": "def uncurry\n Functors.uncurry(&self)\n end",
"title": ""
},
{
"docid": "0e11b7e630f6da6fe6021badf05bf192",
"score": "0.76058847",
"text": "def reverse_curry(ary=arity)\n Functors.reverse_curry(ary, ... |
b6ad3d00ab18a50cf64bf3c44d78bd27 | POST /users POST /users.json | [
{
"docid": "ed4567e94c3a093d5408f56d8666a222",
"score": "0.0",
"text": "def create\n @user = User.new(user_params)\n\n respond_to do |format|\n if @user.save\n format.html { redirect_to @user, notice: 'User was successfully created.' }\n format.json { render :show, status: :crea... | [
{
"docid": "24c5e44d772da89269600975eeebdfda",
"score": "0.71918935",
"text": "def create\n @user = User.new(user_params)\n @user.save\n json_response(@user, :created)\n end",
"title": ""
},
{
"docid": "6e1490da4a56756e02c8de2a503a156e",
"score": "0.7185745",
"text": "def c... |
a228a971c05fb2960d5c2c49c31633c0 | Jump to a random request | [
{
"docid": "9c778170ccc8668d267f959465e71320",
"score": "0.7588453",
"text": "def random_request\n info_request = InfoRequest.random\n redirect_to request_url(info_request)\n end",
"title": ""
}
] | [
{
"docid": "59f02fdef5075fb0cdac2b1cc9f567ba",
"score": "0.6457284",
"text": "def chooseAction()\n case rand 100\n when 0..19\n # New search\n self.newSearch()\n when 20..49\n # Next page\n self.nextPage()\n when 50..99\n ... |
1b8c7d2026fa1e9ba90d841c5e67ff38 | Checks to see if the line is a regular statement (not a class, method, or comment). | [
{
"docid": "b39f93bd4b8459c384d692def062e94e",
"score": "0.72350943",
"text": "def statement_line?\n if self.method_line? or self.class_line? or self.comment_line?\n return false\n end\n\n true\n end",
"title": ""
}
] | [
{
"docid": "219642c8d237e0db72cef91d1508176c",
"score": "0.65058625",
"text": "def statement?\n @type == :statement\n end",
"title": ""
},
{
"docid": "44b3538032af0960f8aad35f738719dc",
"score": "0.64788663",
"text": "def statement?\n type == 'statement'\n end",
... |
4b59eb18cf7a57ecf566f40752c00029 | Gets the line property. | [
{
"docid": "1976e78172a16e544ee7a9ab117b94ec",
"score": "0.7139226",
"text": "def line\n @values.fetch('line') { \n @values['line'] = nil\n }\n end",
"title": ""
}
] | [
{
"docid": "c0a0753e84816b280e1e9be80c4842aa",
"score": "0.8382397",
"text": "def line\n attributes.fetch(:line)\n end",
"title": ""
},
{
"docid": "64c50bec3a8869c3cff5888d71f8d75a",
"score": "0.81660515",
"text": "def line\n @line\n end",
"title": ""
},... |
36b00a980496d5c60e7537e266bbb0aa | Produces the clean, formatted version of the Markdown with new reference numbers. | [
{
"docid": "26e36b9fb5668da0277eca9c9c8379e0",
"score": "0.6900274",
"text": "def clean_and_format(input=@input)\n result = input\n result = convert_reference_to_inline(result)\n result = convert_inline_to_reference(result)\n\n identify_reference_links(result)\n\n # Remove old r... | [
{
"docid": "3923775988140b9bfc6665bd94a56059",
"score": "0.6556526",
"text": "def md_renderer(content, repo)\n content = content.gsub /\\!\\[([^\\]]+)\\]\\(([^)]+)\\)/, ''\n content = content.gsub /\\[([^\\]]+)\\]\\(([^)]+)\\)/, '<a href=\"\\2\">\\1</a>'\n content.gsub(/\\b([0-9a-f]{40})\\b/) { gh_sh... |
2275beb74913e5ba09ce3fa93c14eab3 | remove child from children, if given node is a child | [
{
"docid": "a47712ab7ac2fa3da401fb983e59f9a4",
"score": "0.7800552",
"text": "def remove_child(child_node)\n if !child_node.nil? && !self.children.include?(child_node)\n raise \"Node not a child\"\n else \n child_node.parent = nil\n end\n end",
"title": ... | [
{
"docid": "6ffaabd57282af64e1e5f9067a568a9c",
"score": "0.81453615",
"text": "def remove_child(node)\n raise \"node is not a child\" if node.parent == nil\n node.parent = nil\n end",
"title": ""
},
{
"docid": "6ffaabd57282af64e1e5f9067a568a9c",
"score": "0.81453615",
... |
4c56c378008afa76a082bc2d8f6b13ae | Set the value of the SenderEmail input for this Choreo. | [
{
"docid": "edb318d9fca0fbc2731b7cb4e2b2c52e",
"score": "0.7157066",
"text": "def set_SenderEmail(value)\n set_input(\"SenderEmail\", value)\n end",
"title": ""
}
] | [
{
"docid": "30980cda87f4e2edeba13135e14cce8e",
"score": "0.7346499",
"text": "def sender_email=(v)\n @sender_email = validate_email(v, __method__)\n end",
"title": ""
},
{
"docid": "74a12f7fc33b96a5af6ff9dd5938354b",
"score": "0.66494983",
"text": "def setEmailSenderAddress( ... |
c0c20fcda77980c461ce3fc7f0f2f472 | setter method for property profiles | [
{
"docid": "064e8e340a905aa11b7ad3a22d83c6ad",
"score": "0.0",
"text": "def profiles=(profiles)\n return modify_api_node(['containers', resource[:name]], {'profiles' => profiles})\n end",
"title": ""
}
] | [
{
"docid": "523c6bac2ab74c1646daa94d8222966e",
"score": "0.7140302",
"text": "def set(prop, value)\n prop = prop.to_s\n property ||= self.properties.find_by_name(prop)\n property ||= Property.new(:name => prop, :prototype => self)\n property.value = value\n property.save\n end",
"tit... |
14b8df660accea79430c4aeed3adc9cb | Get the well formated imaginary string | [
{
"docid": "99d2d177331e48ef9a3f29ee20afb824",
"score": "0.7060087",
"text": "def\t\tget_imaginary_format(i = 'positif')\n if i == 'positif'\n s = \" + \" if MathTools.sqrt(-@delta).to_f/(2*@coeff[2].to_f) >= 0\n s = \" - \" unless MathTools.sqrt(-@delta).to_f/(2*@coeff[2].t... | [
{
"docid": "10b10ef50f7b52b52ad5ba8f3996a1ad",
"score": "0.73440355",
"text": "def to_s\n result = real.to_s\n\n if imag.kind_of?(Float) ? !imag.nan? && FFI::Platform::Math.signbit(imag) != 0 : imag < 0\n result << \"-\"\n else\n result << \"+\"\n end\n\n imag_s = imag.abs.to_s\... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "6bd9e9723ab8bb61c9d7b92fc8b4410b",
"score": "0.0",
"text": "def organization_charge_other_params\n params.require(:organization_charge_other).permit(:organization_id, :user_id, :price_fuwufei, :price_canbao, :price_chajia, :price_gonghui, :price_qita_1, :price_qita_2, :price_qita_3, :st... | [
{
"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... |
5105548b79e8f1953b5dd9ecd3047e93 | Conic Conic equation type: ax^2 + dx y + f = 0 | [
{
"docid": "d5188cce7f01a965ed53cbd6efcf63a7",
"score": "0.0",
"text": "def initialize(x2:, x:, k:)\n @x2_coeff, @x_coeff, @y_coeff, @k_coeff = x2.to_r, x.to_r, -1, k.to_r\n validation\n end",
"title": ""
}
] | [
{
"docid": "fc8c771a25297d52ad2183637d9b1f46",
"score": "0.5959281",
"text": "def f2c(f)\n\tc = (5.0/9.0)*(f-32.0)\n\treturn c\nend",
"title": ""
},
{
"docid": "8aef36ba3481d3b715d9cb6a4d57ad74",
"score": "0.5747585",
"text": "def cac2\n 0\n end",
"title": ""
},
{
"do... |
c4dc9cbf7cb0ee46b0b929c9b4523d0f | n + n! + n > O(n!) | [
{
"docid": "8cb66815d28f31b3e5a4c34149b1e718",
"score": "0.0",
"text": "def first_anagram?(str1, str2)\n subsets = str1.chars.permutation.to_a.map {|subset| subset.join(\"\")}\n subsets.include?(str2)\nend",
"title": ""
}
] | [
{
"docid": "86e8324d4292c9312d64eae6f2041796",
"score": "0.68335956",
"text": "def solution_21\n def d(n)\n divisors = divisor_list(n)\n divisors.delete(n)\n divisors.reduce(:+)\n end\n result = 0\n (2..9999).each do |a|\n b = d(a)\... |
187e5e9a49d8dfe0b4dca7cf34fc5641 | takes user and debit and sends an email to user sayin it has been reimbursed | [
{
"docid": "158b589da7d90a583a24db59cf336579",
"score": "0.78948057",
"text": "def reimburse_email(user, debit)\n\t\t\t@user = user\n\t\t\t@debit = debit\n\t\t\tmail(:to => @user.email, :subject => \"Mezaniah Debit Reimbursement Information\")\n\t\tend",
"title": ""
}
] | [
{
"docid": "355c00ff62c11747165df007052d17de",
"score": "0.7585939",
"text": "def reactivated(user)\n @user = user\n \n mail( :to => @user.email,\n :subject => \"Your Brevidy account has been reactivated\")\n end",
"title": ""
},
{
"docid": "edd8f51d8c557e649d0853c9f3d03fb... |
4b41409c7cacb8387120134e7771fe27 | PATCH/PUT /admin/academy/questions/1 PATCH/PUT /admin/academy/questions/1.json | [
{
"docid": "1ade816d3f4234d5c40187e769dcfd0c",
"score": "0.69979626",
"text": "def update\n respond_to do |format|\n if @admin_academy_question.update(admin_academy_question_params)\n format.html { redirect_to @admin_academy_question, notice: 'Question was successfully updated.' }\n ... | [
{
"docid": "50a807d281dcc91fa446f17b05e1600a",
"score": "0.6981278",
"text": "def update\n authorize! :update, @admin_question\n\n respond_to do |format|\n if @admin_question.update(admin_question_params)\n format.html { redirect_to @admin_question, notice: 'Question was successfully u... |
f35941bdc65d0171d609835bca515172 | Returns the weightfunction procobject if it has been defined; Other wise, returns a closure function that simply looks for edge in hash and returns weight. | [
{
"docid": "8cb71c615f248093f3d4e03ab515205f",
"score": "0.8256154",
"text": "def weight_function\n\t\tif @weightFunction != nil\n\t\t\t@weightFunction\n\t\telse\n\t\t\tlambda do |u,v|\n\t\t\t\t@edgeSet.each{|f| return f.weight if (f.s==u && f.d == v)}\n\t\t\t\treturn nil\n\t\t\tend\n\t\tend\n\tend",
... | [
{
"docid": "2cca305b450acd543637ea5d6372feb0",
"score": "0.6311647",
"text": "def weight\n if !block_given?\n return @j_del.java_method(:weight, []).call()\n end\n raise ArgumentError, \"Invalid arguments when calling weight()\"\n end",
"title": ""
},
{
"docid": "2cc... |
9f412ddcc4b0fd583d3e23bc0e6ed10a | GET /assets/1 GET /assets/1.json | [
{
"docid": "39ae4bbfdadcfbd9812ebd4418ea3ec4",
"score": "0.68856865",
"text": "def show\n begin\n render template: 'assets/show', status: :ok\n rescue Exception => e\n render json: {:message=> e.to_s}.to_json, status: :not_found\n end\n end",
"title": ""
}
] | [
{
"docid": "696d8334ac68fb19dad616732b73808e",
"score": "0.7564808",
"text": "def asset(id, params = {})\n get \"assets/#{id}\", {query: params}\n end",
"title": ""
},
{
"docid": "e667d6ecd5ae956896f4e9bd2f698609",
"score": "0.7559503",
"text": "def show\n repo = asset... |
bf5693c55f28e0983ff2be533c3a7d33 | Sets the block used to determine members of the role. | [
{
"docid": "be13a72639751eb1493ec47a800c8e58",
"score": "0.0",
"text": "def detect(&condition)\n @detect = condition\n end",
"title": ""
}
] | [
{
"docid": "5b8473046533aad6f8a4fdb535ca2090",
"score": "0.7056561",
"text": "def set_block &b\n @block = b\n end",
"title": ""
},
{
"docid": "23abbd54a338bc44288da186bfabccda",
"score": "0.66044176",
"text": "def set_users_block\n @users_block = Block.find_by(id_p... |
8fc95b959bc498f1631e66b6963331da | return labuser and it's lab info based on labuser uuid | [
{
"docid": "03ad304c5a1eb3644b6b986375636638",
"score": "0.6041976",
"text": "def labinfo\n respond_to do |format|\n format.html { redirect_to(root_path, notice: 'Invalid request') }\n format.json { render :json=> ImportLabs.export_labuser(params[:uuid], params[:pretty]) }\n end\n end",... | [
{
"docid": "9ddab110131b98c5b4ddd07c95840d25",
"score": "0.63693494",
"text": "def lab_user\n Cucumber::Chef::Config[Cucumber::Chef::Config.provider][:lab_user]\n end",
"title": ""
},
{
"docid": "ef14a7005ca9b58c928b8aab42f8bbb6",
"score": "0.626337",
"text": "def get_use... |
49399c5ebe79659848c31f604359f8c2 | Set limits of slider idc of topmost user dialog ==== Syntax control sliderSetRange [min, max] ==== Parameters +idc+ Number of control +min+ Number +max+ Number +control+ Control +[min, max]+ Array +min+ Number +max+ Number ==== Returns Nothing ==== Multiplayer ==== See Also Official Wiki: ==== Examples ====== Example 1... | [
{
"docid": "a18db6365873153e44e54555ea8eea24",
"score": "0.7023745",
"text": "def sliderSetRange _obj, _args\n \"_obj sliderSetRange _args;\" \n end",
"title": ""
}
] | [
{
"docid": "a1f46173d7fc87859f498c6afaf84918",
"score": "0.6088963",
"text": "def SetIDRange(min, max)\n assert { min.instance_of?(Fixnum) or min.instance_of?(Bignum) }\n assert { max.instance_of?(Fixnum) or max.instance_of?(Bignum) }\n assert { min <= max }\n\n @min_id = min\n ... |
3a6b52659716ffb16e9eee2f78bc151d | Run a hooks block that defines field declaration processors | [
{
"docid": "a3e48404e12779098da466435def4775",
"score": "0.53842044",
"text": "def hook(&blk)\n HooksDsl.new.instance_eval(&blk)\n end",
"title": ""
}
] | [
{
"docid": "a76a35ae2c9f8770844e9e93ad4d76a6",
"score": "0.6496937",
"text": "def field_definitions; end",
"title": ""
},
{
"docid": "b08df9aa742fb15c9cb701c36804d4d0",
"score": "0.6036022",
"text": "def field_definition; end",
"title": ""
},
{
"docid": "e369bd65a34152262... |
a5e513d31fc3e461a795a1ade2bf46c9 | POST /purchases POST /purchases.xml | [
{
"docid": "25a5d0f1309013dc00c01fab28d10708",
"score": "0.5750877",
"text": "def create\n @purchase = Purchase.new(params[:purchase])\n @purchase.price_name = session[:price_name]\n if logged_in?\n @purchase.user_id = current_user.id\n end\n\n respond_to do |format|\n if @purch... | [
{
"docid": "12aa00bbc8291c8019deaa879ed70a16",
"score": "0.6470629",
"text": "def create\n @transaction = Transaction.new(params[:transaction])\n @transaction.save\n r = Receipt.find(@transaction.receipt_id)\n response = EXPRESS_GATEWAY.setup_purchase(100, express_options(@transaction, r))\n... |
d235f3b185919892bdb1443720a4dfe2 | POST /run_histories POST /run_histories.json | [
{
"docid": "6b09f65c96ed912a696253d6fe67230a",
"score": "0.6196356",
"text": "def create\n @run_history = RunHistory.new(run_history_params)\n\n respond_to do |format|\n if @run_history.save\n format.html { redirect_to @run_history, notice: 'Run history was successfully created.' }\n ... | [
{
"docid": "27c14e87213c38701582dc41a2003d5e",
"score": "0.67238975",
"text": "def create\n megam_rest.post_billedhistories(to_hash)\n end",
"title": ""
},
{
"docid": "35362f12ae23bc9a7b50a1df882afefe",
"score": "0.64860356",
"text": "def index\n @run_histories =... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "3673207f81f8fb6198d98eecfbd36848",
"score": "0.0",
"text": "def set_sequence_attachment\n @sequence_attachment = SequenceAttachment.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... |
22f61cb8efbb87124c62bae3073ce9dd | Method added by Blacklight; Blacklight uses to_s on your user class to get a userdisplayable login/identifier for the account. | [
{
"docid": "00cb829d21343c9d6313a8e0f9f9d0ac",
"score": "0.0",
"text": "def to_s\n email\n end",
"title": ""
}
] | [
{
"docid": "c90b3a6eeac39a0a46ac086a5400e96f",
"score": "0.6782019",
"text": "def get_user\n\t\treturn Account.find(self.account_id)\n\tend",
"title": ""
},
{
"docid": "4d79f43d17f69a4c13d70bbff59918a3",
"score": "0.6759239",
"text": "def to_s\n username\n end",
"title": ""
... |
776145235fd08e63d0ed1363e60d685c | GET /addmissions GET /addmissions.json | [
{
"docid": "7c1040d1eba2f7cddac0e4011c147b6d",
"score": "0.6842681",
"text": "def index\n @addmissions = Addmission.all\n end",
"title": ""
}
] | [
{
"docid": "2b75e79042228e1fe3a96c3f2759f3f6",
"score": "0.67607564",
"text": "def index\n if current_user.admin?\n @missions = Mission.all\n else\n @missions = current_user.missions\n respond_to do |format|\n format.html # index.html.erb\n format.json { render :json => @mis... |
6c655f536a5b37ac3e288d47c9dc9ee5 | Turn result into a monad This makes result objects work with drymonads (or anything with a compatible interface) | [
{
"docid": "ba3cd654c241bbfdafa8592e832bb6b7",
"score": "0.5505241",
"text": "def to_monad\n if success?\n Success(input)\n else\n Failure([error, input])\n end\n end",
"title": ""
}
] | [
{
"docid": "c74991180a5d20b7e97e1af6f5ebb73b",
"score": "0.59903985",
"text": "def wrap(cooked_result)\n cooked_result.extend Dat::Analysis::Result::DefaultMethods\n\n if !wrappers.empty?\n cooked_result.send(:instance_variable_set, '@analyzer', self)\n\n class << cooked_result\n... |
ef50f769c33c309045a9fc4ae99a7366 | Return [], a relationship is not fileable | [
{
"docid": "df5e3b80950e9e5dc75691e9c05cb274",
"score": "0.0",
"text": "def parent_folders\n []\n end",
"title": ""
}
] | [
{
"docid": "aad422b399c9dd6532e47a0083c61de0",
"score": "0.63013965",
"text": "def related_files\n return [] unless batch\n batch.generic_files.reject { |sibling| sibling.id == id }\n end",
"title": ""
},
{
"docid": "98c2d1a0bbc5d143de4bde2c4162c89c",
"score": "0.59592... |
781d2d883d61a5bc80f1417152ce0355 | GET /logs/1 GET /logs/1.json | [
{
"docid": "a6f595d5756d2383b2640c23a9f37645",
"score": "0.68290603",
"text": "def show\n @log = Log.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @log }\n end\n end",
"title": ""
}
] | [
{
"docid": "b4ac4911ae0537ccf9e4ba0c7faa0748",
"score": "0.77865744",
"text": "def logs\n response = @client.get '/logs?json=true'\n JSON.parse response.body\n end",
"title": ""
},
{
"docid": "765a61251b778fb4e5137af1635c828a",
"score": "0.74001384",
"text": "def logs\n ... |
bb94475761d7c5b7d70248817d765657 | Returns +true+ is the string has zero length or contains spaces only. And it returns +false+ if the string has any meaningful value. | [
{
"docid": "1e7ccaa2920f8ce52c289d06c3d918b5",
"score": "0.7184666",
"text": "def _blank?\n empty? || strip.empty?\n end",
"title": ""
}
] | [
{
"docid": "3ccc6c593b377ab3508194dce6f961c1",
"score": "0.7685749",
"text": "def is_empty_str(str)\n return true if str.length === 0\n return false if str.length > 0\nend",
"title": ""
},
{
"docid": "0fa79bd98ff18031f5eebe5e4bc31049",
"score": "0.7684021",
"text": "def has_whi... |
d43eb1cfcf9b67d40eafcbce6c354426 | Method for formating the string of numbers to integers and adding as new row array | [
{
"docid": "56ec04265bfb887f1391c7a8274f69de",
"score": "0.78978664",
"text": "def add_row(numbers)\n row = []\n row.push(numbers.split(\" \").map!{|j| j.to_i})\n row.flatten!\n @arr << row \nend",
"title": ""
}
] | [
{
"docid": "37113690903b5348f0d40a24aeee276b",
"score": "0.6677412",
"text": "def generate_number_strings(cleaned_multiline_digits)\n cleaned_multiline_digits.map do |multiline_digit|\n convert_to_numbers(multiline_digit)\n end\nend",
"title": ""
},
{
"docid": "d4e47c0491029da3370ad8e81... |
f5ee4823808065f3ded62fa6ad7f847d | Initialize with user agent _string_. | [
{
"docid": "d0624098d647187bf11759a5932cab6c",
"score": "0.8425666",
"text": "def initialize user_agent\n @user_agent = user_agent.strip\n end",
"title": ""
}
] | [
{
"docid": "57caad16231be9063ee6258b5ea2fb5c",
"score": "0.8485015",
"text": "def initialize(user_agent_string)\n @user_agent = user_agent_string\n end",
"title": ""
},
{
"docid": "d1c9ad6d1ae80dc2c978b8feebda6e19",
"score": "0.75618434",
"text": "def user_agent(string)\n ... |
b29c44e4998afe5e1d6e9cc45ece7566 | =========================================================================================== ==== ==== ==== MAIN MENU / TRAINER CHOICES SECTION ==== ==== ==== =========================================================================================== | [
{
"docid": "c5634d200d475d21438f611c45083814",
"score": "0.65983295",
"text": "def main_menu\n menu_options = [\"Start exploring\", \"Check Inventory\", \"Check Your Score\", \"Go to Pokemon Center\", \"Quit\"]\n menu_prompt = Interactivity.mainMenu \n \n if user.pokemon == n... | [
{
"docid": "8f6acaa58d44b67d9da2775a91c16a21",
"score": "0.68794554",
"text": "def main_menu\n @ui.input_1_change\n @ui.user_input1.downcase\n unless %w[trains routes stations cars].include? @ui.user_input1\n puts 'There is no such option in the main menu.'\n end\n main_menu_choose_o... |
bd2b584e9322ff66e53e22f118b67c66 | Created (Andrew Fox 20160914): Displays information for the user about their current game session, so the player knows what they are doing before they start | [
{
"docid": "aadb3cc07c600a225e56666b7d1584f7",
"score": "0.69517654",
"text": "def print_game_start_information\n if @game_mode == 1\n game_type_string = \"a standard game of set\"\n else\n game_type_string = \"time trial\"\n end\n\n if @number_of_players == 2\n puts \"IMPORTA... | [
{
"docid": "24c74072e69c834af5cf042ee5ca3c1a",
"score": "0.6681493",
"text": "def show\n\t\t@player = current_player\n\t\t@gtags = PlayersConsole.hashify_gtags(current_player)\n\t\t@PS4 = ps_games\n\t\t@XB1 = xbox_games\t\t\n\tend",
"title": ""
},
{
"docid": "0a7f8aa7a2dc2532f1d046a586ec95ac... |
716406ee7c53b0721575fb713d21a7f8 | PUT /despesas/1 PUT /despesas/1.json | [
{
"docid": "b2d541f3249f724b2a62bb66d5e556db",
"score": "0.60173136",
"text": "def update\n @despesa = Despesa.find(params[:id])\n\n respond_to do |format|\n if @despesa.update_attributes(params[:despesa])\n format.html { redirect_to @despesa, :notice => 'Despesa atualizada com sucesso... | [
{
"docid": "4cb09b039e2922a81a1ac7284c384850",
"score": "0.6285593",
"text": "def update\n @despesa = Despesa.find(params[:id])\n\n respond_to do |format|\n if @despesa.update_attributes(params[:despesa])\n format.html { redirect_to @despesa, notice: 'Despesa was successfully updated.'... |
13164699bd2fc0f9468eef2664da2cdc | initializes this IssueManagement with a json hash | [
{
"docid": "8120fd0aa0d165321a8778c90d11406b",
"score": "0.0",
"text": "def init_jaxb_json_hash(_o)\n if !_o['url'].nil?\n _oa = _o['url']\n if(_oa.is_a? Hash)\n @url = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']\n @url = String.fro... | [
{
"docid": "44efb9947ee65e8b20979ffadd3a0854",
"score": "0.6653302",
"text": "def initialize(hash={})\n update_from_json(hash)\n end",
"title": ""
},
{
"docid": "058a5b609dae4c2c4b051fcad81f32d0",
"score": "0.6458697",
"text": "def initialize(json)\n super\n end",
... |
e354f218c0e5eee0f53ee85b673e49ae | Our engine uses this method to infer the record's key | [
{
"docid": "24f443e437b72bc2b5165314582c610c",
"score": "0.0",
"text": "def cache_key\n \"user-#{name.downcase.gsub(' ', '_')}\"\n end",
"title": ""
}
] | [
{
"docid": "f07bf134e5aad770f6a08d202995ac82",
"score": "0.7724465",
"text": "def get_key *record\n record.first\n end",
"title": ""
},
{
"docid": "d55a251b167c1159b2f728eaf97056a3",
"score": "0.70264035",
"text": "def param_key(record_or_class); end",
"title": ""
... |
ea722f6191023388ef9b70371a1a25ac | PATCH/PUT /clients/1 PATCH/PUT /clients/1.json | [
{
"docid": "a9361238789b9113ddbbbe69d60dfd7b",
"score": "0.0",
"text": "def update\n respond_to do |format|\n if @client.update(client_params)\n format.html { redirect_to @client, notice: 'Cliente atualizado.' }\n format.json { render :show, status: :ok, location: @client }\n ... | [
{
"docid": "2419dedc224096ac6e498aaee208fb8c",
"score": "0.7135858",
"text": "def update\n @client = set_client\n @client.update(client_params)\n render json: @client\n end",
"title": ""
},
{
"docid": "cfe60af276f4366be6cdb1b797753da6",
"score": "0.713482",
"text": "def upd... |
47b612b900f725bf62b22bcbdd64c11c | TIME LOG PAY CALCULATION METHODS | [
{
"docid": "0aac258f9f2f7d9216758ac798a8336c",
"score": "0.0",
"text": "def payment_scheme_is_hourly_type?\n self.pay_scheme.hourly?\n end",
"title": ""
}
] | [
{
"docid": "e24e4c3bf981085d1fc58f244a8ac1e0",
"score": "0.6612372",
"text": "def total_time; end",
"title": ""
},
{
"docid": "b3929c54bbce28e89dd83fba60f7b4b0",
"score": "0.64754856",
"text": "def build_timing; end",
"title": ""
},
{
"docid": "30f089b3cb8b3758d771fd26c51... |
b9168c1a7f3961cf7b6f76e5998692ef | Sets this match as started. We manually set `underway_at` because the Challonge API doesn't have a way to mark a match as being underway. | [
{
"docid": "7035e62a8581cbe32e203c0c739835b8",
"score": "0.6163573",
"text": "def start\n update(underway_at: Time.current)\n end",
"title": ""
}
] | [
{
"docid": "51d796473b55316c7bf1c57f33830ac3",
"score": "0.552743",
"text": "def start!\n @started_at = nil\n self.class.start!\n end",
"title": ""
},
{
"docid": "5a38a183f78dca448d3066ac4b5a7070",
"score": "0.5526065",
"text": "def set_started_at\n if @started_... |
1e53a8da11bcd36da733b0a2cf0ccb23 | Devuelve true si el 'profile' dado es seguido por el usuario | [
{
"docid": "7cb635b131b1f97e0d026ef8d882b220",
"score": "0.7009419",
"text": "def is_follow_this_profile?(profile)\n # return current_user.profile.follows?(profile)\n\n @current_profile = current_user.profile\n return @current_profile.follows?(profile)\n# return profile.id == @current_prof... | [
{
"docid": "f484c536a4ece442b83c24e6fbe3f23d",
"score": "0.8020398",
"text": "def has_profile?\n return self.profile.present?\n end",
"title": ""
},
{
"docid": "1532e0242a27a703e6a2274795be5eef",
"score": "0.77324206",
"text": "def profile?\n instance.options[:profile]\n ... |
1379f8f4d7b89acad4f9d46d3db7da06 | DELETE /pm_models/1 DELETE /pm_models/1.xml | [
{
"docid": "8b7d6d7e36b0be9a7b7b4452c57e54b6",
"score": "0.6530902",
"text": "def destroy\n @pm_model = PmModel.find(params[:id])\n @pm_lib = @pm_model.not_imported? ? @pm_model.pm_links.first.pm_lib : PmLib::BASE \n if (proj_id = params[:project])&&proj_id.to_i!=PmLib::BASE_ID\n @pm_lib... | [
{
"docid": "b4f8fe516d682a7531e56a7ec978b1df",
"score": "0.7391326",
"text": "def destroy\n @pm_model = PmModel.find(params[:id])\n @pm_model.destroy\n\n respond_to do |format|\n format.html { redirect_to(pm_models_url) }\n format.xml { head :ok }\n end\n end",
"title": ""
... |
238c40aed1d1412ea4ad8a354e846164 | Constructs a new hill. cfg should be the +hill+ section from a hill YAML configuration file. For the list of keys, see HillManager::new. | [
{
"docid": "a3af1072528ec655d97f5f326daa34aa",
"score": "0.5411942",
"text": "def initialize(cfg)\n @scoring = Scoring::Methods[cfg['scoring']]\n @tapecount = cfg['tapecount'].to_i\n @tiebreak = cfg['tiebreak'] # TODO: use\n\n # construct a hill of dummy programs\n\n nprogs = cfg['size'].... | [
{
"docid": "17707d5c9c5b0319a11157b213b74c81",
"score": "0.65909946",
"text": "def initialize(hilldir)\n @dir = File.absolute_path(hilldir)\n\n # verify that hill directory is a Git repo\n\n @commit = git_HEAD\n\n # load configuration\n\n @cfg = YAML.load_file(File.join(@dir, 'hill.yaml')... |
1097a7e7758f08d32addfc88ea3fdcab | GET /users GET /users.json | [
{
"docid": "f909eeadc4d3a377d40affec5d18da82",
"score": "0.0",
"text": "def index\n if params[:q].nil?\n @followings = Following.where(follower_id: current_user.id).limit(50)\n else\n @followings = Following.search params[:q], where: { follower_id: current_user.id }\n end\n end",
... | [
{
"docid": "8a29471646191d84def95f7af1e081bf",
"score": "0.82109934",
"text": "def users(args = {})\n get(\"/users.json\",args)\n end",
"title": ""
},
{
"docid": "fd6f331d604ba2ad8967a7e5ed218329",
"score": "0.7873764",
"text": "def show\n begin\n user = User.find... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "7cd9bd5095de01c22885bd2b15bf9f3b",
"score": "0.0",
"text": "def set_meeting\n @meeting = Meeting.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "bd89022716e537628dd314fd23858181",
"score": "0.6163163",
"text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n end",
"title": ""
},
{
"docid": "3db61e749c16d53a52f73ba0492108e9",
"score": "0.6045976",
"text": "def action_hook;... |
75bd5b21695189ef0afa1b326c94be38 | addLookupParam openXParameter A XParameter element has been started attributes XParameter element attributes | [
{
"docid": "27da3904619eb5a8780b946d3ee6b20c",
"score": "0.65397286",
"text": "def openXParameter(attributes)\r\n\t\t@curParam = \"X\"\r\n\tend",
"title": ""
}
] | [
{
"docid": "1bcf9556298e5e84efa4580d607a86b2",
"score": "0.71171534",
"text": "def addLookupParam(var)\r\n\t\tif (processingLookup?)\r\n\t\t\tif (isXParam?)\r\n\t\t\t\t@curLookup.xParam = var\r\n\t\t\tend\r\n\t\t\t\r\n\t\t\tif (isYParam?)\r\n\t\t\t\t@curLookup.yParam = var\r\n\t\t\tend\r\n\t\t\t\r\n\t\t... |
62ea39c46fe74c30747319cece102d37 | The Entity class provides a base class implementation for building API modules. The Entity class is typically not instantiated directly but serves as a super class with convenience methods used to work with the node. | [
{
"docid": "23231eeb9f85af1a9eaca20b34db27c8",
"score": "0.0",
"text": "def initialize(node)\n @node = node\n end",
"title": ""
}
] | [
{
"docid": "174dccc845c87c54303f9565e23819a2",
"score": "0.68197536",
"text": "def entity\n e = EntityDescription.new\n yield e if block_given?\n registerEntity(e)\n end",
"title": ""
},
{
"docid": "04e83c57ab2bd3284ad798043b028c8e",
"score": "0.6148627",
"text": "d... |
cff8c9cf1601202e55dabd5e54b0bb11 | DELETE /batting_statistics/1 DELETE /batting_statistics/1.json | [
{
"docid": "f9a6f2fba76dce063cc87b7ead6b7cba",
"score": "0.73772097",
"text": "def destroy\n @batting_statistic.destroy\n respond_to do |format|\n format.html { redirect_to batting_statistics_url, notice: 'Batting statistic was successfully destroyed.' }\n format.json { head :no_content ... | [
{
"docid": "3cc7419907567813340dcd1fe9d2401b",
"score": "0.7584998",
"text": "def destroy\n @batting_statistic.destroy\n respond_to do |format|\n format.html { redirect_to batting_statistics_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": ... |
73293eafae304cd3429ce23ea11929d2 | POST /missions POST /missions.xml | [
{
"docid": "e3fc4297d039fa649261eeb9c26d28c3",
"score": "0.65062875",
"text": "def create\n @mission = current_user.missions.create(params[:mission])\n\n respond_to do |format|\n if @mission.save\n flash[:notice] = \"You created a mission! Well done.\"\n format.html { redirect_t... | [
{
"docid": "aa7604d5f194bbf0aa6846396f59bc75",
"score": "0.6122253",
"text": "def create\n @mission = current_user.missions.new(params[:mission],:status=>\"Aucun\")\n\n respond_to do |format|\n if @mission.save\n format.html { redirect_to @mission, :notice => 'La mission a bien été cré... |
85c7605894c2761ca4adfc66f35ca201 | returns true if the king of the color given in the argument is in checkmate | [
{
"docid": "03e19b3f4c43e6f950f4663b25d17785",
"score": "0.71844405",
"text": "def checkmate?(colour)\n result = true\n pieces = all_pieces(colour)\n pieces.each do |piece|\n pnm = piece.possible_next_moves(all_occupied_spaces)\n if piece.type == 'pawn'\n pnm.flatten!(1)\n ... | [
{
"docid": "a2671b0d60fc831f3a695b82628feab6",
"score": "0.85760075",
"text": "def check?(color)\n king(color).in_check?\n end",
"title": ""
},
{
"docid": "b6926de98fe8e75b8714b0954105742a",
"score": "0.8345243",
"text": "def checkmate?(color)\n in_check?(color) && no_valid_mo... |
21e00e0e95412eb2f093f061f37f6af9 | Return: true if the room is ready to show explanation, false otherwise | [
{
"docid": "7cddb94e2356e4ea824c018edbdbf638",
"score": "0.69714266",
"text": "def show_explanation?\n status_checker(2) #Show explanation when everyone is \"confirmed\" or status==2\n end",
"title": ""
}
] | [
{
"docid": "aa3e76b3205d5fc20b5f79a9cce4b557",
"score": "0.7363572",
"text": "def isReady?\n self.title == \"Reasoning\" || (!self.title.blank? && !self.content.blank?)\n end",
"title": ""
},
{
"docid": "30bed35d563ae5b081505a063b9fd90b",
"score": "0.6630577",
"text": "def ready(... |
9d9d40aedd1eea0add2a1fbd34c8459e | Return current activity log based on the URL. | [
{
"docid": "76144c4b08250f62fbe19bb394506bf2",
"score": "0.6472986",
"text": "def current_activity_log\n ActivityLog.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "042b335108d60b566b58a624243e78bc",
"score": "0.62589216",
"text": "def activity_logs_list(opts={})\n get(\"user/#{@user_id}/activities/list.json\", opts)\n end",
"title": ""
},
{
"docid": "1bea9c317ea9620c2c8cb66f46a4c863",
"score": "0.6211195",
"text": "def getUr... |
a3233d23d470c4451edfa4025dfc94f6 | show certain dogs in the shops | [
{
"docid": "d05ab95aab4c58aae26369a125bacf0e",
"score": "0.64941216",
"text": "def show_dogs_for_shop(shop_id)\n shop = @db.exec(\"SELECT * FROM shops WHERE id=$1\", [shop_id])\n shop.entries \n end",
"title": ""
}
] | [
{
"docid": "f9610a5d45c624c0c3037ad1db6f98e0",
"score": "0.67889714",
"text": "def display_dogs_list\n system(\"clear\")\n puts \"\\n Dogs available for adoption on Animal Haven:\"\n\n dogs = Dogs.items\n\n puts \"\\n\"\n \n dogs.each.with_index(1) do |each_dog, index|\n puts \"#{... |
2144f60870a906fc1847c0282227ea1f | PUT /items/1 PUT /items/1.xml | [
{
"docid": "991a9af6532abe46af4db868bc6647cf",
"score": "0.0",
"text": "def update\n @item = Item.find(params[:id])\n\t\tparams[:item][:value] = currency_to_number(params[:item][:value])\n\n respond_to do |format|\n if @item.update_attributes(params[:item])\n flash[:notice] = \"Item #{... | [
{
"docid": "4de8d067c151eda0c5d4fabee90dd31d",
"score": "0.6973069",
"text": "def update_rest\n @item = Item.find(params[:id])\n\n respond_to do |format|\n if @item.update_attributes(params[:item])\n flash[:notice] = 'Item was successfully updated.'\n format.html { redirect_to(@... |
c49aff220044880a63f2aa25f25a646e | PATCH/PUT /suggested_events/1 PATCH/PUT /suggested_events/1.json | [
{
"docid": "48877a33d5d96f0062399cbfde647aa7",
"score": "0.75846994",
"text": "def update\n respond_to do |format|\n if @suggested_event.update(suggested_event_params)\n format.html { redirect_to @suggested_event, notice: 'Suggested event was successfully updated.' }\n format.json ... | [
{
"docid": "923b504c84eb16dd093f5461615425ad",
"score": "0.6685005",
"text": "def update\n @event = Event.find(params[:id])\n\n # Link up the event format\n if params.has_key?(\"eventformat\")\n @event.eventformats = []\n @event.eventformats << Eventformat.find(params['eventformat'])\... |
d0174eb7dbc77b5cc7dce29223607a3e | your code here end call your method here | [
{
"docid": "bab8074aee3a1bcb93b71888cee2d931",
"score": "0.0",
"text": "def looping\n loop do\n puts \"Wingardium Leviosa\"\n end\nend",
"title": ""
}
] | [
{
"docid": "cefa636d42b0cae13f1b9c8d69e7515a",
"score": "0.7191183",
"text": "def call\r\n end",
"title": ""
},
{
"docid": "59025c8845087872e0f49c023e1a88d6",
"score": "0.6964137",
"text": "def call\n\n end",
"title": ""
},
{
"docid": "d509f8cefdd8fc87fefabff3705478... |
16b5298ec6a4fc6ac7dd2d8533fcf29a | PUT /surveys/1 PUT /surveys/1.json | [
{
"docid": "496c2796ef049221622ff21443bd82d3",
"score": "0.7549697",
"text": "def update\n @survey = Survey.find(params[:id])\n json = params[:survey]\n json[:questions] = JSON.parse(json[:questions])\n json[:questions].each_with_index do |question, idx|\n json[:questions][idx]['id'] = ... | [
{
"docid": "e191e601cb77fd2b43e55f08d995cdce",
"score": "0.7032791",
"text": "def update\n @survey = Survey.find(params[:id])\n\n respond_to do |format|\n if @survey.update_attributes(params[:survey])\n format.html { redirect_to @survey, notice: 'Survey was successfully updated.' }\n ... |
dec3d2f09b8f34410709c31d385bb186 | Converts to an integer, returns nil if the value contains nonnumeric bits | [
{
"docid": "eea61c11889e6dcbf5b528a49bd29265",
"score": "0.6630736",
"text": "def to_i\n val.to_i\n end",
"title": ""
}
] | [
{
"docid": "8a40033a6acd22d78e5d5458d6acd194",
"score": "0.7533167",
"text": "def coerce_integer(value, options = {})\n value = value.to_s\n if value.match(/\\A0|[1-9]\\d*\\z/)\n value.to_i\n else\n nil\n end\n end",
"title": ""
},
{
"docid": "8a40033a6ac... |
150bb615afc26725d594b40d9ecddc55 | A single value summary which is obtained by computing the precision at the Rth position in the ranking. Here, R is the total number of relevant documents for the current query. | [
{
"docid": "afcdc854a5407d80f083d1849cf9c91f",
"score": "0.7322829",
"text": "def r_precision\n r = @relevant_docids.size\n top_r = @search_hits[0, r].to_set\n (@relevant_docids & top_r).size.to_f / r\n end",
"title": ""
}
] | [
{
"docid": "2baefb71491fca3d10074c145022bb12",
"score": "0.69761705",
"text": "def precision_at_recall(r)\n return 1.0 if r == 0.0\n k = (size * r).ceil\n top_k = @search_hits[0, k].to_set\n (@relevant_docids & top_k).size.to_f / k\n end",
"title": ""
},
{
"docid": "66... |
c0f03d1f9824ed1127ac8d91fa9b32bf | alternate way to white listing parameters that are passed in | [
{
"docid": "e463dea8cfd69672c42b708abfc97852",
"score": "0.0",
"text": "def configure_permitted_parameters\n #allows name to be passed to \"sign_up\" page aka /register\n devise_parameter_sanitizer.permit(:sign_up, keys: [:name])\n #allows name to be passed to \"account_update\" page aka /edit\... | [
{
"docid": "c436017f4e8bd819f3d933587dfa070a",
"score": "0.7797586",
"text": "def filtered_parameters; end",
"title": ""
},
{
"docid": "bd826c318f811361676f5282a9256071",
"score": "0.73186237",
"text": "def filter_parameters; end",
"title": ""
},
{
"docid": "bd826c318f811... |
b52883084f0b8bc06c41a477145f8a75 | Removes all HTML tags from a string. | [
{
"docid": "8b418ee5af477cbb18e3a21c6a4bf940",
"score": "0.0",
"text": "def strip_tags\n ActionController::Base.helpers.strip_tags( self )\n end",
"title": ""
}
] | [
{
"docid": "0ed2ab53cb303cbb580ac406e2f8dc11",
"score": "0.85508966",
"text": "def strip_html_tags(string = '')\n string.gsub(/<\\/?[^>]*>/, '')\n end",
"title": ""
},
{
"docid": "8269407e466ed1a4d28c85566f2b4092",
"score": "0.83949035",
"text": "def strip_tags(string)\n ... |
e561e11bcf379ef5dc139c210017366b | Only allow a list of trusted parameters through. | [
{
"docid": "d2b9b2e61bff63354363790e968006b8",
"score": "0.0",
"text": "def pain_score_params\n params.require(:pain_score).permit(:day, :patient, :procedure, :score)\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... |
0dcd424653f5d4bfd02bfcbdcbe34ee4 | Adjusts the map renderer to center on the player. | [
{
"docid": "e0d550890c4301cf12bcc11d8ad44ca1",
"score": "0.5653117",
"text": "def adjust_to_player(x, y)\n xsmall = x < 0\n ysmall = y < 0\n xgreat = x >= $game.map.width\n ygreat = y >= $game.map.height\n t = player_tile\n diffx = t.mapx - $game.player.x\n diffx += xg... | [
{
"docid": "4d7b04c6dc1f91ec4eda4dfbba3a6b5d",
"score": "0.7304873",
"text": "def center(x, y)\n $game_map.set_display_pos(x - center_x, y - center_y)\n end",
"title": ""
},
{
"docid": "4d7b04c6dc1f91ec4eda4dfbba3a6b5d",
"score": "0.7304873",
"text": "def center(x, y)\n $game_... |
6a00294fe57bb9b31e85dae49486e40a | Connect to the server using separate threads and pipe for communications | [
{
"docid": "1ee9aff005546df8ae64e08ee1a1e42e",
"score": "0.6481875",
"text": "def connect\n # Run +@executable+ in a separate thread to talk to hin asynchronously\n Thread.start do\n # Spawn the actual +@executable+ pty with +input+ and +output+ handle\n begin\n PTY.spaw... | [
{
"docid": "01a36088684758215146e3c416859e57",
"score": "0.69923776",
"text": "def start_server(pipe)\n server = TCPServer.new(0)\n\n Thread.new do\n loop do\n Thread.new(server.accept) do |client|\n begin\n begin\n req = pip... |
fcaa0301beca2c007916b3e5656de832 | POST /product_of_the_weeks POST /product_of_the_weeks.json | [
{
"docid": "bc432c94d7c5ca52d3b79ec1dbfeeab8",
"score": "0.66820717",
"text": "def create\n @product_of_the_week = ProductOfTheWeek.new(product_of_the_week_params)\n\n respond_to do |format|\n if @product_of_the_week.save\n format.html { redirect_to @product_of_the_week, notice: 'Produ... | [
{
"docid": "0979ea541328834f7ded60d2a2f79156",
"score": "0.65340704",
"text": "def week_request\n @week = Week.find_or_create_by(full_date: params[:full_date])\n if @week\n @work_week = WorkWeek.find_or_create_by(week_id: @week.id, organization_id: params[:org_id])\n render json: @work_w... |
f260b0743e3635ff851ba1fb8f391b00 | GET /users/1 GET /users/1.json | [
{
"docid": "4aeed7b0fbd38290b86d613d6086b8fe",
"score": "0.0",
"text": "def show\n @user = User.find(params[:id])\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @user }\n end\n end",
"title": ""
}
] | [
{
"docid": "9f7c735ace683c5c2b12c914cc9ad8a8",
"score": "0.771752",
"text": "def get\n users = User.all.as_json\n render(json: users.as_json, status: :ok)\n end",
"title": ""
},
{
"docid": "a95dfe28d6b386aafc5fb53749e84258",
"score": "0.75107867",
"text": "def user\n... |
888fe3289c03c50a686dd464c93640a1 | GET /locations/1 GET /locations/1.xml | [
{
"docid": "58b8164a3f84a2ef871594d5b19328e9",
"score": "0.6590885",
"text": "def show\n @location = Location.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @location }\n end\n end",
"title": ""
}
] | [
{
"docid": "805e5b54273bb44407911c3295be9010",
"score": "0.759328",
"text": "def list_locations\n headers = default_headers\n headers['Accept'] = 'text/xml'\t# JSON locations not supported\n Nokogiri.XML(get('/locations', headers))\n end",
"title": ""
},
{
"docid": "4cdeb758bc0c24e... |
e47b34a2751f2b2de9c9fa64ec54ae69 | this will control the contact process for the musician | [
{
"docid": "27d7d5bae58078aaac48a81b6c518a97",
"score": "0.62593096",
"text": "def contact\n\t\t@musician = User.find_by_id(params[:id])\n\t\t@message = Message.new\n\n\t\t# if there is a user signed in, attribute the message made to both musicians\n\t\t@message.sent_by = current_user.id if user_signed_... | [
{
"docid": "ace518753478345df3f1c5ceec9a252c",
"score": "0.6465732",
"text": "def contact; end",
"title": ""
},
{
"docid": "3f7ba385b0306b94ef94f172a13a2396",
"score": "0.6344905",
"text": "def contact \n\n end",
"title": ""
},
{
"docid": "60df884c35d3b3b4a718d5feccf527a... |
7813a649f3b11dbf0eef482771ca6203 | puts "this is a debug message" | [
{
"docid": "6ee1d2370b44f8d0b0e1cf89927c52a8",
"score": "0.0",
"text": "def solution(s)\n newstring = s.gsub(/[.\\/,&()]/, '').gsub(/[\\s\\-]+/, '')\n first = newstring.slice(0..2)\n second = newstring.slice(3..5)\n third = newstring.slice(6..8)\n fourth = newstring.slice(9..11)\n fifth = newstrin... | [
{
"docid": "59422abef433590bb630a39dafeff63b",
"score": "0.8288864",
"text": "def debug(msg); output(:debug, msg); end",
"title": ""
},
{
"docid": "099cbebe66d6a66a9c87aaaf15127f23",
"score": "0.8167358",
"text": "def debug(message)\n if @debug\n puts message\n end\n end"... |
bbfed1580926bc60d3ea35559ae54b6c | Tests the Driver report function Assert : | [
{
"docid": "787512fd93b3ab4dddbae97a0df9528c",
"score": "0.0",
"text": "def test_report\n assert_equal(@alex.report, \"Alex: 122 miles @ 61 mph\")\n end",
"title": ""
}
] | [
{
"docid": "1ea0145f1766317f8875773e74bd2a56",
"score": "0.72879183",
"text": "def assertions; end",
"title": ""
},
{
"docid": "1ea0145f1766317f8875773e74bd2a56",
"score": "0.72879183",
"text": "def assertions; end",
"title": ""
},
{
"docid": "78c38aed2df305671bb1f35cbba0... |
137903fa02ac1165d94b0b74788241e9 | Need by default language as called by callback table | [
{
"docid": "3b495c29f2d69e23a5b8a275d434ea3e",
"score": "0.0",
"text": "def initialize(stdin, stdout)\n @stdin = stdin\n @stdout = stdout\n end",
"title": ""
}
] | [
{
"docid": "733f290f73e2f4c472823e33ff841354",
"score": "0.7748365",
"text": "def lang; end",
"title": ""
},
{
"docid": "733f290f73e2f4c472823e33ff841354",
"score": "0.7748365",
"text": "def lang; end",
"title": ""
},
{
"docid": "733f290f73e2f4c472823e33ff841354",
"sc... |
ffab51473cc379bafb3339e2af89ff15 | Clicks the Cancel button and instantiates the AssignmentsList Class. | [
{
"docid": "0224c5eada8db98985ad86704c5cb247",
"score": "0.7562006",
"text": "def cancel\n frm.button(:value=>\"Cancel\").click\n AssignmentsList.new(@browser)\n end",
"title": ""
}
] | [
{
"docid": "3f60d756e42bb962c11b9b89668cc0a4",
"score": "0.7476518",
"text": "def cancel\n frm.button(:value=>\"Cancel\", :index=>-1).click\n AssignmentsList.new(@browser)\n end",
"title": ""
},
{
"docid": "67b11b4cc126e8e18ba1de6edccd2efc",
"score": "0.6275072",
"text": "def ... |
9d24011239fa301a13c5008a952d794a | ==================================================================================== SECURITY CHECKPOINT METHOD ==================================================================================== This method will be used in the UsersController before all methods there. It will require that before a user can access any... | [
{
"docid": "1e625fd14d6b0e585b3b2eb857f38629",
"score": "0.0",
"text": "def require_signin\n unless signed_in?\n store_location\n flash[:error] = 'Please Sign In'\n redirect_to signin_path\n end\n end",
"title": ""
}
] | [
{
"docid": "86761bd60d26e6ffd22ed864a9348e3e",
"score": "0.791012",
"text": "def signed_in_user\n # Listing 9.18: Adding store_location to the signed-in user before filter.\n unless signed_in?\n store_location\n redirect_to signin_url, notice: \"Please sign in.\"\n end\n end",
"t... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "a779e9a5a0f2d0e818b8505d7c8ffd8f",
"score": "0.0",
"text": "def set_vegetal\n @vegetal = Vegetal.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "bd89022716e537628dd314fd23858181",
"score": "0.6163163",
"text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n end",
"title": ""
},
{
"docid": "3db61e749c16d53a52f73ba0492108e9",
"score": "0.6045976",
"text": "def action_hook;... |
ccdf0a8dace1bf0592c2dbeb399f044f | GET /kaycies/1 GET /kaycies/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "421e6448647195416e9525c03572b00f",
"score": "0.6673649",
"text": "def index\n @kaycies = Kaycie.all\n end",
"title": ""
},
{
"docid": "5610c0f6decb89962d9e1209cb84b5ab",
"score": "0.6562393",
"text": "def show\n @kit = Kit.find(params[:id])\n render json: @kit\n... |
5275300658d1214854f2d9d184e28671 | COURSE TEMPLATES: NOTE: Course template related functions are now in 'course_template.rb' COPYING COURSES: | [
{
"docid": "e930d8f81eb14a7e34c34daff6ce735d",
"score": "0.0",
"text": "def get_copy_job_request_status(org_unit_id, job_token)\n path = \"/d2l/api/le/#{$le_ver}/import/#{org_unit_id}/copy/#{job_token}\"\n _get(path)\n # returns GetCopyJobResponse JSON block\n # GetImportJobResponse:\n # ... | [
{
"docid": "5059c61bcea6e45f4f9a4f9a211e8307",
"score": "0.7152722",
"text": "def course; end",
"title": ""
},
{
"docid": "43e332112405dd2df5f4833aad515603",
"score": "0.68090796",
"text": "def course_name; end",
"title": ""
},
{
"docid": "01a31cdda7679d96efa48daa72a40ebe... |
39e69a3d80582ae0cc584eb7a86a2c50 | Created 11/16/2019 by Sri Ramya Dandu Dummy user params | [
{
"docid": "843d493224b10e9c6f5c36f33aa7b956",
"score": "0.0",
"text": "def new_user_params\n params.permit(:email, :first_name, :last_name, :grad_year, :gender, :password, :role)\n end",
"title": ""
}
] | [
{
"docid": "a8faf8deb0b4ac1bcdd8164744985176",
"score": "0.68401444",
"text": "def user_params\r\n end",
"title": ""
},
{
"docid": "6c615e4d8eed17e54fc23adca0027043",
"score": "0.6686411",
"text": "def user_params\n end",
"title": ""
},
{
"docid": "293f09ca9b24735... |
f4b18d03a07e2ea1f4bf8fb7818f10e7 | GET /comments GET /comments.json | [
{
"docid": "32ee2d48804930853c8cde8a11784728",
"score": "0.0",
"text": "def index\n @comments = Comment.all\n end",
"title": ""
}
] | [
{
"docid": "43e1018e94df0e7d6ab78621c98262cd",
"score": "0.7838167",
"text": "def showcomments\n @comments = Post.find(params[:id]).comments\n render json: @comments\n end",
"title": ""
},
{
"docid": "4447c95fefbb72f8a378ce8a783a58da",
"score": "0.7665239",
"text": "def commen... |
c06ae46c937d1b0b064c1170267e3edb | Retrieves metadata for MP3s | [
{
"docid": "71bc9ba9d66541b9f132ebae14c4c9bb",
"score": "0.7686719",
"text": "def extract_metadata\n return unless audio?\n path = upload.queued_for_write[:original].path\n open_opts = { :encoding => 'utf-8' }\n Mp3Info.open(path, open_opts) do |mp3info|\n self.metadata = mp3info.tag\n ... | [
{
"docid": "7d7bab17de73319f1f5e6314a255333b",
"score": "0.7496735",
"text": "def metadata\n puts \"Adding Metadata...\"\n doc = Nokogiri::HTML(open(\"http://www.last.fm/search?q=#{query}&type=track\"))\n url = doc.css(\"span.chartlist-ellipsis-wrap\").first.css(\"a.link-block-target\").first.a... |
f57bcf598448ca0c4d8a9893bf1bdc5b | GET /questions/new GET /questions/new.xml | [
{
"docid": "0c989e1cdaf7a37bc2b0865d05c89e08",
"score": "0.7597381",
"text": "def new\n @question = Question.new\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @question }\n end\n end",
"title": ""
}
] | [
{
"docid": "8b6c857c015aaaaddd99492b6072ecc7",
"score": "0.77069986",
"text": "def new\n @question = Question.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render xml: @question }\n end\n end",
"title": ""
},
{
"docid": "6cd0876445ce6081b7157... |