query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
e366224bbbcfe1b4154c5577fe480e1f | GET /wishwalls/1 GET /wishwalls/1.json | [
{
"docid": "c75e6bc798f1d44d09f11c1751f440fd",
"score": "0.81248593",
"text": "def show\n @wishwall = Wishwall.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @wishwall }\n end\n end",
"title": ""
}
] | [
{
"docid": "cf1a8a4fa9a4fd3c98b656132c954292",
"score": "0.74823654",
"text": "def new\n @wishwall = Wishwall.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @wishwall }\n end\n end",
"title": ""
},
{
"docid": "f3b9bb7ce25274bdabad... |
9038c40f8ece2930b6f4de9ac179bf69 | Download artifacts meeting specific criteria WARNING: This method will cause the `last_downloaded` property of all the matching artifacts to be updated; therefore, using this method with a `last_used_before` switch may not be idempotent as it will cause the set of artifacts matching the search to change Consider using ... | [
{
"docid": "87c2985bff605ca84c4de0385fb22c1e",
"score": "0.57665604",
"text": "def archive\n dates = parse_date_options\n filter = load_artifact_filter\n archive_to = parse_archive_option\n if archive_to.nil?\n STDERR.puts \"Missing required `--archive-to` option spe... | [
{
"docid": "13cfea96df60995d8d6a8196eacefc91",
"score": "0.68544286",
"text": "def artifacts_download\n if @audit.compliance_type == 'Compliance'\n\t\t @folder = @audit.artifact_answers.collect {|x| x.attachments}.flatten\n elsif @audit.compliance_type == 'NonCompliance'\n @folder = @audit.a... |
ed980aaf8d8c46a270a8b9983c2bd738 | Return extra CSV fields, in particular: item name collection name | [
{
"docid": "1f152f46fc683e92cb71361c2fdfc6a4",
"score": "0.7679312",
"text": "def extra_csv_fields(item_hdl, col_hdls, csv_delimiter, csv_quote)\n item_name, rmid = lookup_item_name(item_hdl)\n col_names = col_hdls.inject([]){|a,col_hdl| a << lookup_collection_name(col_hdl)}\n\n \"#{csv_delimit... | [
{
"docid": "2fd98a7ed8e4a4d89ebfd150019e5306",
"score": "0.6786808",
"text": "def fields\n extract_csv_data(field_names_only: true)\n end",
"title": ""
},
{
"docid": "43a6cb959b15c0d684e626a1aafb96fc",
"score": "0.6713131",
"text": "def collection_name(csv_line, csv_line_... |
38fd9b55002a21d96e9700a175f386b4 | Strips out HTML tags from a given string. Example: strip_tags("Hello world") => "Hello world" | [
{
"docid": "4021ddea72bd7cdf294bb1732fb4ae2f",
"score": "0.7963128",
"text": "def strip_tags(text)\n text.gsub(%r{</?[^>]+?>}, \"\")\n end",
"title": ""
}
] | [
{
"docid": "8269407e466ed1a4d28c85566f2b4092",
"score": "0.85510814",
"text": "def strip_tags(string)\n safe(string.gsub(/<[^>]*>/ui, \"\"))\n end",
"title": ""
},
{
"docid": "91aec248c5d3ecb3e2ca24cc9a54e6dc",
"score": "0.85069704",
"text": "def strip_tags(string)\n s... |
b542ecc9a7d4d78c685e1b08e9062286 | DELETE /plumbing_fixtures/1 DELETE /plumbing_fixtures/1.json | [
{
"docid": "8ed264a59479f78eb79318a368627e81",
"score": "0.8105144",
"text": "def destroy\n @plumbing_fixture.destroy\n respond_to do |format|\n format.html { redirect_to plumbing_fixtures_url }\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "a648a91651ad2556f120ffe4f0a225fe",
"score": "0.7340766",
"text": "def destroy\n @fixture = Fixture.find(params[:id])\n @fixture.destroy\n\n respond_to do |format|\n format.html { redirect_to fixtures_url }\n format.json { head :no_content }\n end\n end",
"title": "... |
aba953036d6f185fc510381148321f2e | TODO: to parse guide [optional/deprecated] bindings [optional] | [
{
"docid": "fbde3c4711b7fa9e92532fac94e1a6f0",
"score": "0.0",
"text": "def reading_order\n spine_items.map do |item|\n item_id = item.attr('idref').to_s\n manifest.css(\"##{item_id}\") if item_id\n end\n end",
"title": ""
}
] | [
{
"docid": "e2bfd555f7ccf8c58c3b0987b5710577",
"score": "0.6331022",
"text": "def _binding() binding end",
"title": ""
},
{
"docid": "df167cdd86bb0607fe56bd7d836e4841",
"score": "0.63045967",
"text": "def getBinding(_str)\n binding\nend",
"title": ""
},
{
"docid": "bc4c8... |
a6ff0e2e93633f88cf167f762bf5bbdd | Save the document to a local file. | [
{
"docid": "d75337237776d5c1908ddd5403fb935d",
"score": "0.6314297",
"text": "def save(filepath=nil, options={})\r\n\r\n opt = {pretty: true}.merge options\r\n filepath ||= @local_filepath\r\n @local_filepath = filepath\r\n xml = display_xml(opt)\r\n buffer = block_given? ? yield(xml) : x... | [
{
"docid": "ea87e1430e2937c929c3cd287648a3c1",
"score": "0.7704097",
"text": "def save\n file = File.new(\"#{@doc.root.attributes[\"path\"]}\",\"w\")\n @doc.write(file, 3, false)\n file.close\n end",
"title": ""
},
{
"docid": "ea87e1430e2937c929c3cd287648a3c1",
"score": "0.7704... |
69e5c97bcf27c0ef33239a5db96b20bd | def lbs_to_kilos(weight) kilos = weight 2.2 end puts lbs_to_kilos(30) method to give length of a string def string_length(string) length = string.length end puts string_length("Heather") method to give length of a string def string_reverse(string) reverse = string.reverse end puts string_reverse("Heather") method to ge... | [
{
"docid": "94479f8dff2a80cdfa61e6791335ab90",
"score": "0.0",
"text": "def get_remainder(num_array)\n\tnum_array.sort!\n\n\tquotient = num_array[1]/num_array[0]\n\tremainder = num_array[1]%num_array[0]\n\n\tputs \"The quotient of #{num_array[1]} and #{num_array[0]} is #{quotient} and the remainder is #... | [
{
"docid": "9851f6c0ef5d24f6da3ac3caae13dcb8",
"score": "0.76855725",
"text": "def lbs_to_kilos(lbs) #(lbs) is the parameter passed in\n lbs / 2.2 # This is the return value\nend",
"title": ""
},
{
"docid": "0928d688db20f433b9cb85403e29d07b",
"score": "0.6928045",
"text": "def conve... |
be9ec93ea0d2758de26c84513632de41 | The Add method should throw an exception when called with an input starting with a separator or containing multiple separators following each other. | [
{
"docid": "f2fd667385da2ec0ef97daf08dd8a75d",
"score": "0.0",
"text": "def test_Add_Should_ThrowException_When_CalledWithInputContainsTwoOrMoreSeparatorsNextWithCustomSeparatorDeclaration3\n # Arrange.\n @inputValue = '//$$\\n$$1$$2'\n @errorMessage = \"Number expected but '$$' fou... | [
{
"docid": "a4c7a94250afc931f5286d90fbd61f6d",
"score": "0.76042473",
"text": "def test_Add_Should_ThrowException_When_CalledWithInputContainsTwoOrMoreSeparatorsNextWithCustomSeparatorDeclaration108\n # Arrange.\n @inputValue = '//[sep1][sep2][sep3]\\nsep21sep32'\n @errorMessage = \... |
ea2b400fcc04abf7dc0084d92c08f4f7 | DELETE /egc_server_cluster_types/1 DELETE /egc_server_cluster_types/1.json | [
{
"docid": "deff595bceabba78061e5b3604cc17e5",
"score": "0.800642",
"text": "def destroy\n @egc_server_cluster_type.destroy\n respond_to do |format|\n format.html { redirect_to egc_server_cluster_types_url, notice: 'Egc server cluster type was successfully destroyed.' }\n format.json { h... | [
{
"docid": "1cbd52d2651f761efea79ca34e597345",
"score": "0.74104095",
"text": "def destroy\n @type = Type.find(params[:id])\n @type.destroy\n Cluster.where(\"type_id = ?\",params[:id]).each{ |c|\n c.destroy\n }\n respond_to do |format|\n format.html { redirect_to :back }\n ... |
db73bac0e52a84190750db7ef4b77b2d | GET /surveys GET /surveys.json | [
{
"docid": "6beed20d00c89c7cb3d28671e0b95331",
"score": "0.0",
"text": "def index\n @surveys = current_user.surveys\n\n if params[:user].present? && current_user.admin?\n @surveys = Survey.where(user_id: params[:user])\n end\n end",
"title": ""
}
] | [
{
"docid": "cfefb4f387c9fa6fdf3f0524c0736d2c",
"score": "0.80292994",
"text": "def surveys\n person_id = params[:person_id]\n \n surveys = SurveyService.findSurveysForPerson person_id\n \n render json: surveys.to_json, :content_type => 'application/json'\n end",
"title": ""
},
{
... |
5627554f03274cc552e21cb4ae07c950 | check that we can create a way | [
{
"docid": "c08f394ee64908c17c07e2f403870126",
"score": "0.0",
"text": "def test_putway_create_valid\n changeset = create(:changeset)\n cs_id = changeset.id\n user = changeset.user\n\n a = create(:node).id\n b = create(:node).id\n c = create(:node).id\n d = create(:node).id\n e =... | [
{
"docid": "555c46133c3a8b9fab2ba88a3df7242c",
"score": "0.60835195",
"text": "def way(way)\n true\n end",
"title": ""
},
{
"docid": "a2ab22751df97936343363255f7482f7",
"score": "0.5961227",
"text": "def test_one_way_is_location\r\n \thillman = Location::new(\"Hillman\... |
91e2ee8ec6e01a43470f3cd49eea3a5a | GET /competitions GET /competitions.json | [
{
"docid": "8f756606fd6a329bac0994fa48dc8b35",
"score": "0.78223836",
"text": "def index\n @competitions = Competition.paginate(:page => params[:page], :per_page => 3)\n\n\t\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @competitions }\n end\n e... | [
{
"docid": "6379638e957514df29efd4372e4a43b8",
"score": "0.79633015",
"text": "def index\n @competitions = Competition.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @competitions }\n end\n end",
"title": ""
},
{
"docid": "e8ab5... |
6e5740abaa56e93a6a39d0ae72491fa4 | Convert byte string to an array of numeric bytes eg. "904040" to [0x90, 0x40, 0x40] | [
{
"docid": "b87e64354101136d17ef83a66a001f97",
"score": "0.8422955",
"text": "def hex_string_to_numeric_byte_array(string)\n string = string.dup\n bytes = []\n until string.length == 0\n bytes << string.slice!(0, 2).hex\n end\n bytes\n end",
"title": ""
}
] | [
{
"docid": "66dc25791af96f9561b887686a8250aa",
"score": "0.79411983",
"text": "def hex_string_to_numeric_bytes(string)\n string = string.dup\n bytes = []\n until string.length.zero?\n string_byte = string.slice!(0, 2)\n bytes << string_byte.hex\n end\n bytes\n e... |
832460d3cc020115e6bd85c918ba2cbb | def local_name(code) locale = locales.find(:first, :conditions => ["code = ?", code]) ret = locale.name if locale unless ret a = code.split("_") locale = locales.find(:first, :conditions => ["code = ?", a[0]]) ret = locale.name if locale end ret || self.name end | [
{
"docid": "96261b067d574eaa0d01e9707b798ff6",
"score": "0.8160559",
"text": "def local_name(languages)\r\n ret = nil\r\n if languages\r\n lrs = languages.split(\",\")\r\n lrs.each do |lr|\r\n code = lr.split(\";\")[0]\r\n locale = locales.find(:first, :conditions => [\"cod... | [
{
"docid": "fb2fa0466ec25f29692cf83334c3d6d0",
"score": "0.8079961",
"text": "def language_name(code)\n if configatron.locales.include?(code)\n t(:locale_name, :locale => code)\n else\n (entry = ISO_639.find(code.to_s)) ? entry.english_name : code.to_s\n end\n end",
"title": ""
... |
53def08261ebcecdbf97e548c3eaed08 | GET /links/new GET /links/new.json | [
{
"docid": "bc77dea11821c6fda7701ae05db9d730",
"score": "0.7882237",
"text": "def new\n @link = Link.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @link }\n end\n end",
"title": ""
}
] | [
{
"docid": "f6a988e2238de497c68c408f03fb07a2",
"score": "0.7954281",
"text": "def new\n @link = Link.new\n \n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @link }\n end\n end",
"title": ""
},
{
"docid": "4036bf25479f18231c49574558eac... |
3fa6a7fcaf1ca1a21cad1d82c458ab37 | get all memberships for a user (Whether the user is a regular User or OrgUser) | [
{
"docid": "2a38762ede64a2807fcd26e9c87810a4",
"score": "0.70035994",
"text": "def get_all_memberships\n unless self.individual.nil?\n return Membership.for_individual(self.individual.id)\n end\n return []\n end",
"title": ""
}
] | [
{
"docid": "21ce4b0d36141f3473bcfb8152c0ccf7",
"score": "0.78602535",
"text": "def memberships\n return Membership.where({ :user_id => self.id })\n end",
"title": ""
},
{
"docid": "235c2215fd301ffe366e4669d6df4368",
"score": "0.7417227",
"text": "def user_memberships\n @member... |
d682b732fc277953d13ba75f58924303 | Escape and unescape single and double quotes as needed to be able to enclose +content+ with +enclosing+. source://syntax_tree//lib/syntax_tree/node.rb4634 | [
{
"docid": "40ea3a58cf78ddf2093395670a42841b",
"score": "0.0",
"text": "def normalize(content, enclosing); end",
"title": ""
}
] | [
{
"docid": "ecbb56702776d3d78f616bed388933a1",
"score": "0.6788887",
"text": "def sv(content)\n return content.gsub(\"'\",\"'\")\nend",
"title": ""
},
{
"docid": "2f290bfcd8874e39a588535a074adfe9",
"score": "0.6775762",
"text": "def escape(s); end",
"title": ""
},
{
... |
bd8810150665a7c79e146002030aef64 | section 5.6.3.2 in the ~1000 page pdf spec | [
{
"docid": "8c0a9239bb52b6bdbddd7945b3b1bfd9",
"score": "0.0",
"text": "def canonicalize_headers(headers)\n tmp = headers.inject({}) {|ret, h| ret[h.first.downcase] = h.last if h.first.match(/^x-tmrk/i) ; ret }\n tmp.reject! {|k,v| k == \"x-tmrk-authorization\" }\n tmp = tmp.s... | [
{
"docid": "df0e1becbdf273677359408f2d7fa2d1",
"score": "0.68278044",
"text": "def max_pages() 1 end",
"title": ""
},
{
"docid": "9f4646d2481f5053475ce046dcd2e912",
"score": "0.67637146",
"text": "def num_pages\n 26\n end",
"title": ""
},
{
"docid": "6a4b6a2b784958e54... |
a88fcc6415cdf4d5609a2fd645ef6f47 | Example 2: A mehtod can accept zero or more arguments | [
{
"docid": "db5c213c29241a836daa070d176aa375",
"score": "0.0",
"text": "def salute(name)\n puts \"Hey, #{name}! How are you doing?\"\nend",
"title": ""
}
] | [
{
"docid": "e3f9cd4b29b79092121d0df95dfdc967",
"score": "0.7662896",
"text": "def any_args; end",
"title": ""
},
{
"docid": "e5a71240635e44b8a0bcd5a1c08049d3",
"score": "0.7215961",
"text": "def arguments?; end",
"title": ""
},
{
"docid": "e5a71240635e44b8a0bcd5a1c08049d3... |
bad1b9f52ccb9e5d27ec893ea625d185 | PATCH/PUT /sales_person_logins/1 PATCH/PUT /sales_person_logins/1.json | [
{
"docid": "dfab34d89bc9527d872017a21b91e895",
"score": "0.68699145",
"text": "def update\n if @sales_person_login.update(sales_person_login_params)\n render :show, status: :ok, location: @sales_person_login\n else\n render json: @sales_person_login.errors, status: :unprocessable_entity\... | [
{
"docid": "ddeb8c958f4eb60822b0e1d3ef02d6d1",
"score": "0.6144712",
"text": "def update\n @sales_person = SalesPerson.find(params[:id])\n\n respond_to do |format|\n if @sales_person.update_attributes(params[:sales_person])\n format.html { redirect_to @sales_person, :notice => 'Sales p... |
5d7ef91b034a7d6e1931801a1d6e3a16 | Create the resource if it does not exist. | [
{
"docid": "be05ddf16381f0a3dd1e69e58022db62",
"score": "0.6141028",
"text": "def create\n get @resource[:source]\n validate_checksum if checksum_specified?\n end",
"title": ""
}
] | [
{
"docid": "404c17301c0e61a496f364ecd7eb0334",
"score": "0.7006414",
"text": "def create_resource(object)\n object.save\n end",
"title": ""
},
{
"docid": "d008019642183252a46ac8cfee09f4cf",
"score": "0.69994855",
"text": "def create\n Puppet.debug( \"#{self.resource.ty... |
04f8bc35cd55692457a7fbc75497a70b | Returns true if row and position is marked by player 1 or 2, otherwise return false | [
{
"docid": "c9bfeba7b78f751a3d138e51a9b89948",
"score": "0.7335614",
"text": "def marked(row, pos)\n @board[row][pos] != 0\n end",
"title": ""
}
] | [
{
"docid": "855c99318ea574a879841209cd0f54fd",
"score": "0.7135348",
"text": "def winner_via_column?(player)\n columns.any? do |column|\n column.cells.all? {|cell| cell.value == player.marker}\n end\n end",
"title": ""
},
{
"docid": "e6bd81e9c75b00457b351252622c6045",
... |
86ec18a601a737a07f134da14d7eee01 | Adds new element to set | [
{
"docid": "650961cda730da9d3e338c05ff3b1ab0",
"score": "0.0",
"text": "def push(e)\n unless @store[e]\n index = size\n @store[e] = index\n @size += 1\n @cache[index] = e\n end\n @store[e]\n end",
"title": ""
}
] | [
{
"docid": "10969a790425c359e9b63de740f7cef6",
"score": "0.767696",
"text": "def add(x) Set.new().add(x) end",
"title": ""
},
{
"docid": "5cecfd75903afb232af5c0f47c23e35a",
"score": "0.75796646",
"text": "def add(element)\n if @set.length == @capacity\n p \"Set at capacity #{... |
34ce43dcbc5d2b2025f5fe1c36c50d35 | Locate elements by tag name. | [
{
"docid": "70bea2f0348fd5c09cb0673b4cb96ed0",
"score": "0.6980634",
"text": "def find_elements_by_tag_name(value)\n driver.findElementsByTagName(value).to_a.map do |node|\n OperaWatir::Element.new(node)\n end\n end",
"title": ""
}
] | [
{
"docid": "5dd38d00b6871a0314d315f40eb8941e",
"score": "0.78278804",
"text": "def find_tag_by_name( name )\n find do\n parser.search( name )\n end \n end",
"title": ""
},
{
"docid": "8bb76b8a639c582d8facb4ba626a52d0",
"score": "0.77960473",
"text": "def ... |
f3b536a7c88ee8e4e16776bc30e65190 | There are some cases where all of the work does not get done on file creation/modification, so we have to do some extra checking. | [
{
"docid": "0d703aae8455f6902c5f13a492eb9b31",
"score": "0.0",
"text": "def property_fix\n properties.each do |thing|\n next unless [:mode, :owner, :group, :seluser, :selrole, :seltype, :selrange].include?(thing.name)\n\n # Make sure we get a new stat objct\n @stat = :needs_stat\n ... | [
{
"docid": "1822fd52c2e2ef2826c7c11203049752",
"score": "0.665616",
"text": "def existing_files; end",
"title": ""
},
{
"docid": "19fa2a3dcac22041d54c2c87b18937f7",
"score": "0.6509498",
"text": "def new_files; end",
"title": ""
},
{
"docid": "fc8975f38eef3bcf6fec5597736d... |
915343331ca16fcb52750b0da6ec3ed7 | List of spending by period | [
{
"docid": "e2c2a82ba5064f77873ef82c0c2b5c95",
"score": "0.0",
"text": "def spends\n where(\"amount <= 0\")\n end",
"title": ""
}
] | [
{
"docid": "9cf4ecc894adaa6d8b4bf3c967f18b17",
"score": "0.6397771",
"text": "def get_periods(periods = [:present, :past])\n periods_table = [[:SELECTED, 'Wybrane z menu']]\n periods_table += Date::ACTUAL_PERIODS if periods.include?(:present)\n periods_table += Date::PAST_PERIODS if periods.inc... |
1b8840f822a621efa05a28574d6e42b1 | Can the job be killed? failed, completed, reverted, and killed jobs can't be killed, for obvious reasons | [
{
"docid": "9f2a6053e016cd9ce981c90f3aeb7638",
"score": "0.0",
"text": "def killable?\n !failed? && !completed? && !killed? && !reverted?\n end",
"title": ""
}
] | [
{
"docid": "a73bddacc01a3f634f41f6635bfd6ea7",
"score": "0.7425958",
"text": "def should_kill?\n Resque::Plugins::Status::Hash.should_kill?(job_id)\n end",
"title": ""
},
{
"docid": "9741597cee8dae624a942aa0369bb540",
"score": "0.7324806",
"text": "def should_kill?\n Resque:... |
782a8bfea40c330ba43ffe55cd66a841 | Ungraded questions on this page | [
{
"docid": "f5e67bcbb782d3fee15d648fe658ddd4",
"score": "0.72467154",
"text": "def ungraded_questions\n Question.joins(:content_page_elements).where('content_page_elements.id' => self.content_page_elements)\n end",
"title": ""
}
] | [
{
"docid": "49e2de13c9469342325abbac713bfc01",
"score": "0.73143435",
"text": "def unanswered_questions\n if is_signed_in? @user\n @page_number = params[:page].nil? ? 1 : params[:page].to_i\n @unanswered_questions = @user.questions.where(answer: nil)\n @pages = Paginator.new(@unanswere... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "c9526d3ca640a9b253d189edb1157d89",
"score": "0.0",
"text": "def set_mat_prod\n @mat_prod = MatProd.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.60320485",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.6013371",
"text": "de... |
4be3074a2b0384e0c839c56939fa57dd | Output message, using "puts" for simulator and NSLog for Device. | [
{
"docid": "71356760b64ac06759525c058d28b540",
"score": "0.73624855",
"text": "def output(message)\n return if disabled\n if Device.simulator?\n puts(message)\n else\n NSLog(message)\n end\n message\n end",
"title": ""
}
] | [
{
"docid": "336cdeaacb64e6925aea06707bb372c9",
"score": "0.77636594",
"text": "def puts(message)\n output.puts(message)\n end",
"title": ""
},
{
"docid": "79ad3934561db1ad181995a3a2106583",
"score": "0.77052355",
"text": "def puts(message)\n @out.puts message\n end",
... |
fb40fa0735527c99465bc992edc0ddea | GET /grupos/new GET /grupos/new.json | [
{
"docid": "2d1b18abd92665a2895cd0fb1b72ada0",
"score": "0.78559595",
"text": "def new\n @grupo = Grupo.new\n authorize! :create, @grupo\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @grupo }\n end\n end",
"title": ""
}
] | [
{
"docid": "605b7b781a343c274f59784b4262763e",
"score": "0.7897191",
"text": "def new\n @grupa = Grupa.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @grupa }\n end\n end",
"title": ""
},
{
"docid": "bfb6aeb0e270ef48723dc03976bdd7... |
804e9e7035c59394384b312364e3901a | Call this to set the default values for any options Examples: script.opts.continue_on_error = true script.opts.verbosity = :errors | [
{
"docid": "8ff249e42d7af065213c75bd493c5bef",
"score": "0.0",
"text": "def set_options_default_values(&body)\n @set_options_default_values_block = body\n end",
"title": ""
}
] | [
{
"docid": "0fbd56be4a8a39f5a83fa005a3be1983",
"score": "0.72957456",
"text": "def set_opts(opts)\n common_options(opts)\n input_and_output(opts)\n miscellaneous_options(opts)\n end",
"title": ""
},
{
"docid": "93a53644bc51d835e2169d023091403f",
"score": "0.7117... |
5f93e21aa810e5586febe47ed79c4f7a | exposes _source: automatically supply objectlike reader access also expose meta fields like _id, _source, etc, also for methods without the leading '_' | [
{
"docid": "22194cef99d500a9483062d9d3815bcc",
"score": "0.6051923",
"text": "def method_missing(meth, *args, &block)\n case\n when meth.to_s =~ /^_/ && has_key?(meth.to_s) then self[meth.to_s]\n when self['_source'].has_key?(meth.to_s) then self['_source'][meth.to_s]\n ... | [
{
"docid": "a2fdfad0cc5137fd7fd960b607833539",
"score": "0.7258436",
"text": "def create_reader\n return if source_model.resource_method_defined?(name.to_s)\n\n source_model.class_eval <<-RUBY, __FILE__, __LINE__ + 1\n public # TODO: make this configurable\n\n # ... |
aff6f2f12bd629228173b21608e3106e | GET /houses GET /houses.json | [
{
"docid": "089f588abb398530af0747299bea45cf",
"score": "0.7755468",
"text": "def index\n\n @houses = House.page(params[:page]).per(House::PER_PAGE_COUNT)\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @houses }\n end\n end",
"title": ""
... | [
{
"docid": "7859ac0eccf462bc6060e05d77608ec8",
"score": "0.72251153",
"text": "def show\n @house = House.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @house }\n end\n end",
"title": ""
},
{
"docid": "7859ac0eccf46... |
03a062cf753d24d80ccff5d3104ae947 | Delete the cache file | [
{
"docid": "0b0deaa2c6aad1c93040f04ffacf3942",
"score": "0.0",
"text": "def sweep!\n File.delete(@path + CACHED_FILE_EXT)\n end",
"title": ""
}
] | [
{
"docid": "d6d3bff751fc78d9facefe80c3746475",
"score": "0.8220441",
"text": "def delete_cached_file(url)\n puts \"MechanizeCache#delete_cached_file #{url}\"\n cached_url = cached_file_name(url)\n ::File.delete cached_url if ::File.exist? cached_url\n end",
"title":... |
d2d9371ac35736839632e2274287e48b | Useful for the advanced search. Subclasses can override. | [
{
"docid": "39cce30192e0289762e339a332337b8a",
"score": "0.0",
"text": "def search_field_conditions_as_hash\n [\n { :value => I18n.t(\"and\"), :key => \"and\"},\n { :value => I18n.t(\"or\"), :key => \"or\"},\n { :value => I18n.t(\"exclude\"), :key => \"exclude\"}\n ]\n end",
"t... | [
{
"docid": "61bd97fa9eddad78e4d7ea28316bba77",
"score": "0.7576263",
"text": "def search; end",
"title": ""
},
{
"docid": "49ef23333184c57caf551cbdd161ff1a",
"score": "0.7178841",
"text": "def search\n end",
"title": ""
},
{
"docid": "49ef23333184c57caf551cbdd161ff1a",
... |
7347f65c1043e26542e3c16305058be9 | PATCH/PUT /applicationclients/1 PATCH/PUT /applicationclients/1.json | [
{
"docid": "a21b17f4f8ed49ce899f8c158521601d",
"score": "0.65132695",
"text": "def update\n respond_to do |format|\n if @applicationclient.update(applicationclient_params)\n format.html { redirect_to @applicationclient, notice: 'Applicationclient was successfully updated.' }\n form... | [
{
"docid": "de2e20b4eb882702d8603bebdf595e73",
"score": "0.6831468",
"text": "def update\n @client.update(client_params)\n render json: @client\n end",
"title": ""
},
{
"docid": "27bf2343b43b279f3787ae78d10bd689",
"score": "0.6670822",
"text": "def patch(type, info)\n path,... |
42474496f20e31aef9fe879f4bdb07ce | ================== ADMIN Methods ================== | [
{
"docid": "3d2e7266dfffa36612e1ac806b7ff488",
"score": "0.0",
"text": "def find(login_name)\n get(\"admin/user/#{login_name}\")\n response.parsed_response\n end",
"title": ""
}
] | [
{
"docid": "c81a139b8bc978a8913e64884dbfb70a",
"score": "0.80511945",
"text": "def admin_logic\n end",
"title": ""
},
{
"docid": "ee3ed234f4863daf711b690c0c13e6b1",
"score": "0.8009978",
"text": "def admin\n #TODO\n end",
"title": ""
},
{
"docid": "db2dfae624d1b9... |
8179591803252ff17429908fee529afc | Get a more readable source MAC address. | [
{
"docid": "7928b273cd0b7e12c6d48123322d03a4",
"score": "0.63381386",
"text": "def lldp_saddr_mac\n EthHeader.str2mac(self[:lldp_port_id].to_s)\n end",
"title": ""
}
] | [
{
"docid": "9c11305e7b285d33fa68cdeb3bc18ef7",
"score": "0.8233306",
"text": "def source_mac\n format_mac(bytes[6, 6])\n end",
"title": ""
},
{
"docid": "a6a6d481baf80858fa40e507cc6843a9",
"score": "0.7827063",
"text": "def mac_src\n mac2str @src_mac\n end",
"titl... |
6d65b30c83f62539cc98be6604bc6268 | :nocov: TODO write tests | [
{
"docid": "6e160610c2df08db1af2feb94673c9f2",
"score": "0.0",
"text": "def send_email\n @email_account.delay.send_email(params[:tos], params[:ccs], params[:bccs],\n params[:subject], params[:html_part], params[:text_part],\n param... | [
{
"docid": "16bccd2df2c48342400b8ee06736d71d",
"score": "0.73514575",
"text": "def coverage; end",
"title": ""
},
{
"docid": "16bccd2df2c48342400b8ee06736d71d",
"score": "0.73514575",
"text": "def coverage; end",
"title": ""
},
{
"docid": "072514f3348fe62556dcdfd4b06e3d08... |
f2776721fce08f42da27110a6574f745 | Determines whether an IP is internal. | [
{
"docid": "36149e6801535fc720074314f7545716",
"score": "0.8341485",
"text": "def internal_ip?(ip)\n INTERNAL_SUBNETS.any? { |subnet| subnet.include?(ip) }\n end",
"title": ""
}
] | [
{
"docid": "51fa6b3fdbab834e9ce3dea785bb54b4",
"score": "0.86823523",
"text": "def is_internal?(ip)\n begin\n ip = IPAddr.new(ip)\n INT_IPS.each do |mask|\n if mask.include?(ip) then return true end\t\t\n end\t\n return false\n rescue Exception => e\n return false\n ... |
a54fa0f2dff3346f93f364669e697170 | POST /reports POST /reports.json | [
{
"docid": "3c82396c310d379dd822b26be2e75624",
"score": "0.67396355",
"text": "def create\n @report = Report.new(report_params)\n @report.user = current_user\n\n respond_to do |format|\n if @report.save\n format.html { redirect_to @report, notice: 'Report was successfully created.' ... | [
{
"docid": "ef7a0dc0d08131eec75efa34c426c783",
"score": "0.800655",
"text": "def post_reports(request)\n yaml = request.body.read\n report = PuppetHerald::Models::Report.create_from_yaml yaml\n body = { id: report.id }.to_json\n [201, body]\n end",
"title": ""
},
... |
69c1324e8d42e2ad1787e12db9fb9c91 | Returns a YAML representation of the bibliography. | [
{
"docid": "75c7a23e542f609512bba42bb6e9b982",
"score": "0.5055465",
"text": "def to_yaml(options = {})\n to_a(options).to_yaml\n end",
"title": ""
}
] | [
{
"docid": "af7c3cf993c2472bbb2561d3e2df823f",
"score": "0.6045634",
"text": "def to_yaml\n as_yaml.to_yaml\n end",
"title": ""
},
{
"docid": "2daee5bb83c754a84e94833932d4dbd6",
"score": "0.6041639",
"text": "def to_yaml() end",
"title": ""
},
{
"docid": "a6300c1f2aa9... |
01548065f5fda0c84eb63ade58718595 | Returns the next page of tweets in an AJAX request | [
{
"docid": "0d1a79277e5757b98e7080dc830b22de",
"score": "0.75090694",
"text": "def next_page\n @tweets = project_tweets.by_date(:desc).limit(15)\n\n @tweets = params[:flow] == 'incoming' ? @tweets.incoming : @tweets.stream\n\n if params[:max_id] != '' && params[:max_id] != 'undefined'\n @t... | [
{
"docid": "ab1bd19276eaf4dd82babc15e5ccc32c",
"score": "0.67809457",
"text": "def next_page\n return if last_page?\n perform_request\n end",
"title": ""
},
{
"docid": "4d6c5168db74d799036340e97e6f4da8",
"score": "0.6736755",
"text": "def next_page\n\t\tuser_session = se... |
9afb7c4e37bb957c9716e2114ac01b0f | Adds a pivot filter for piovt table index | [
{
"docid": "7376b39a8a5f86eb8603b9acc9743157",
"score": "0.6340866",
"text": "def put_worksheet_pivot_table_filter( put_worksheet_pivot_table_filter_request, opts = {})\n\n data, _status_code, _headers = put_worksheet_pivot_table_filter_request.create_http_request(@api_client,opts )\n return... | [
{
"docid": "59a26236e90799001ae70611d0f5168e",
"score": "0.65451515",
"text": "def cells_pivot_tables_put_worksheet_pivot_table_filter(name, sheet_name, pivot_table_index, opts = {})\n warn \"Warning: #cells_pivot_tables_put_worksheet_pivot_table_filter() is deprecated.\"\n data, _status_code,... |
e979eb8cf379b92dadd3abd7ad651b59 | POST /brochurelogs POST /brochurelogs.json | [
{
"docid": "ef73dade0580f7c52ae39cf67d18a460",
"score": "0.6320123",
"text": "def create\n\tif user_signed_in?\n\t\t@brochurelog = Brochurelog.new(params[:brochurelog])\n\t\t@rid = @brochurelog.brochure_id\n\t\t@fid = @brochurelog.facility_id\n\t\t@d = @brochurelog.date\n\t\t@brochurelog.bname = @brochu... | [
{
"docid": "8150c8f384642286a5d60f897b4c71bd",
"score": "0.6375091",
"text": "def create\n @boat_log = BoatLog.new(params[:boat_log])\n\n respond_to do |format|\n if @boat_log.save\n format.html { redirect_to @boat_log, notice: 'Boat log was successfully created.' }\n format.jso... |
9b7307420e46338507e25e69d72fe5ef | will be one of AUTHN_CONTEXTS.keys | [
{
"docid": "175737b6e338891996ffa49c0c21d48e",
"score": "0.5550306",
"text": "def authn_context\n saml_response.authn_context_text\n rescue\n Raven.tags_context(controller_name: 'sessions', sign_in_method: 'not-signed-in:error')\n raise\n end",
"title": ""
}
] | [
{
"docid": "432d86b9d60680a9680c32bd26bbaa19",
"score": "0.73538375",
"text": "def context_keys\n @context_keys ||= []\n end",
"title": ""
},
{
"docid": "99cfcac5c58d0c7cd911a1bf002089fb",
"score": "0.6577851",
"text": "def is_authorized_for(context)\n\tresult = shared_data_c... |
58c9f446114c4114f715267235480627 | creates and saves many studies, questions and responses allowing proper testing of filter and index Ensures that there are a range of relationships between records So that filtering by (e.g.) questions of a particular study can be properly tested | [
{
"docid": "0bf698ac6ceb7c847b26d306569a3bba",
"score": "0.6781962",
"text": "def create_many_studies\n let(:many_studies) {\n results = {\n studies: [],\n questions: [],\n responses: []\n }\n\n # only admins can create studies and questions\n\n ... | [
{
"docid": "5bbb0e31ffbeb98c7d35df7b4b2befbf",
"score": "0.65496546",
"text": "def create_some_data\n\t\tSunspot.remove_all!\t\t\t\t\t#\tisn't always necessary\n\t\tStudySubject.solr_reindex\n\t\tassert StudySubject.search.hits.empty?\n\t\tsubject1 = FactoryBot.create(:complete_case_study_subject)\n\t\t... |
6544d0639d16fa429d263ae41e5d02e4 | GET /invoices GET /invoices.json | [
{
"docid": "7c707a40ccb8c28d1d3a9634b997c908",
"score": "0.0",
"text": "def index\n if is_adm?\n @invoices = Invoice.all\n else\n @invoices = Invoice.where(\"sid = ? AND bill_end_date < ?\", current_user_id, Time.now)\n end\n end",
"title": ""
}
] | [
{
"docid": "d82d7f3bfa25d273bace7fe5bcff8f81",
"score": "0.8295202",
"text": "def show_invoices\n data = {\n invoices: @subscription.invoices\n }\n\n render json: data\n end",
"title": ""
},
{
"docid": "1e20b47aa88e88870997fbf69751e6c7",
"score": "0.8143799",
"text": "... |
c0c71157b1a7458949977acb86c08764 | Method produces a filtered original stack trace that can be appended to the pretty backtrace output. It parses the original backtrace that looks something like this: (erb):380:in `get_binding' /Users/tung/.rbenv/versions/2.5.0/lib/ruby/2.5.0/erb.rb:885:in `eval' /Users/tung/.rbenv/versions/2.5.0/lib/ruby/2.5.0/erb.rb:8... | [
{
"docid": "32836a1b3afbccffee1a13267f8e638d",
"score": "0.6737825",
"text": "def backtrace_lines(e)\n full = ENV['FULL_BACKTRACE']\n if full\n lines = e.backtrace\n else\n lines = e.backtrace\n # This filtering business makes is hiding useful info.\n # Think i... | [
{
"docid": "0ec5594764f41d651fe7a39e1dc03763",
"score": "0.72418046",
"text": "def build_trace(backtrace); backtrace.filtered.first.to_s; end",
"title": ""
},
{
"docid": "05a7d259fd8ed1be66e314870f8c28c5",
"score": "0.70687914",
"text": "def formatted_backtrace; end",
"title": ""... |
bdcf8498b9e796c8a46a6e9b3c4c35dc | Public Methods ========== ATTRIBUTES ========================== DEPRECATED: This method should be removed in the next major release of the library. | [
{
"docid": "a2c369329b45adffcb7cc7f168083c2f",
"score": "0.0",
"text": "def token=(value)\n Pillowfort::Helpers::DeprecationHelper.warn(self.class.name, :token=, :secret=)\n send(:secret=, value)\n end",
"title": ""
}
] | [
{
"docid": "95ffebd9cbd702368807cff490fedf3e",
"score": "0.7007432",
"text": "def attributes; end",
"title": ""
},
{
"docid": "95ffebd9cbd702368807cff490fedf3e",
"score": "0.7007432",
"text": "def attributes; end",
"title": ""
},
{
"docid": "95ffebd9cbd702368807cff490fedf... |
4959d701142d54db929ca9dbf4cdb3b1 | Gather the user agent and store it for use. | [
{
"docid": "a4981069217137f43643e0b4f4c17e58",
"score": "0.6976205",
"text": "def ua\n\t\t@ua ||= begin\n\t\t\trequest.env['HTTP_USER_AGENT'].downcase\n\t\trescue\n\t\t\t''\n\t\tend\n\tend",
"title": ""
}
] | [
{
"docid": "42f7b08c0f458c51804bbb5539547181",
"score": "0.77263427",
"text": "def user_agent\n @opts[:user_agent]\n end",
"title": ""
},
{
"docid": "42f7b08c0f458c51804bbb5539547181",
"score": "0.77263427",
"text": "def user_agent\n @opts[:user_agent]\n end",
"ti... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "391fc3b86af20253942f355a728b3d71",
"score": "0.0",
"text": "def set_part1\n @part1 = Part1.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.60322535",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.6012846",
"text": "de... |
466656eb3cecb27d0ea4f1ece08d4ebb | PATCH/PUT /customers/1 PATCH/PUT /customers/1.json | [
{
"docid": "46a2ee87fbe1cf8b69e8dad9835d637f",
"score": "0.6388087",
"text": "def customer_update\n respond_to do |format|\n if @customer.update(person_params)\n format.html { redirect_to customer_path, notice: 'データが更新されました。' }\n format.json { render :customer_show, status: :ok, lo... | [
{
"docid": "2c60a533470d8275139b2f9c3fe9d1a4",
"score": "0.69869274",
"text": "def update_customer(id, data)\n put(\"customers/#{id}\", { body: data })\n end",
"title": ""
},
{
"docid": "ac41031ab91b76149b7c7ee5a812520d",
"score": "0.6921764",
"text": "def update\n @customer =... |
db5fdcb5faa648b056bfb05808ff78a7 | Process row_proc header keys | [
{
"docid": "ec70c1bfb4c0886c283b56dde67551b5",
"score": "0.6783862",
"text": "def process_header_keys(ops)\n if header.reject_keys\n all_keys = header.tuple_keys + header.non_primitives.map(&:key)\n ops << t(:accept_keys, all_keys)\n end\n ops\n end",
"tit... | [
{
"docid": "6910faddfac9311e86fea26e413ae627",
"score": "0.6686854",
"text": "def initialize_row_proc\n @row_proc = compose { |ops|\n alias_handler = header.copy_keys ? :copy_keys : :rename_keys\n process_header_keys(ops)\n\n ops << t(alias_handler, mapping) if header.a... |
c01b7b47c7def9e3c630f3dc0e983b34 | lazy way to add custom params to devise :P | [
{
"docid": "67c57a2a04a14fc2cef19d4b7683091f",
"score": "0.0",
"text": "def configure_permitted_parameters\n\t devise_parameter_sanitizer.permit(:sign_up, keys: [:username])\n\tend",
"title": ""
}
] | [
{
"docid": "ae19966f45906242876374f0645ac719",
"score": "0.6998801",
"text": "def configure_sign_up_params\n # devise_parameter_sanitizer.for(:sign_up) << [:username, :cpf, :nome, :admin, :telefone_residencial, :telefone_celular, :email]\n end",
"title": ""
},
{
"docid": "804a241f2b330b1... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "dc076509077b64795d6b7eecd5002bb5",
"score": "0.0",
"text": "def pmu_params\n params.require(:pmu).permit(:produce, :village, :location, :size, :plants, :production, :facilities, :certification,:tenant_id,:grower_id, :latitude, :longitude)\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... |
7a5c8a78839595bd430ff0a073c34b8c | GET /movies/1 GET /movies/1.json | [
{
"docid": "d59377c7d6c81d964b53c89698e851d0",
"score": "0.0",
"text": "def show\n @review = @movie.reviews.new\n @reviews = @movie.reviews.page(params[:page])\n\n @rating = @movie.ratings.new\n if @movie.ratings.present?\n @ratings = @movie.ratings\n @average_rating = @movie.get_a... | [
{
"docid": "032285a2d9139ac71f763cf337810363",
"score": "0.7672779",
"text": "def show\n @movie = Movie.find(params[:id])\n\n render json: @movie\n end",
"title": ""
},
{
"docid": "cf2a89ad81e7ad709be1610bbf41e011",
"score": "0.7636812",
"text": "def show\n respond_to do ... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "ca8cc00ad385ff49c8eb341598effd2e",
"score": "0.0",
"text": "def transfer_case_params\n params.require(:transfer_case).permit(:user_id, :legal_case_id, :comentary, :date_ttransfer)\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... |
d1fbd0e8501f9bae7340458773335124 | encoding: utf8 Usage: ./scpddownloader (course) [(lecture_num) (filename)] Usage: ./scpddownloader cs229 [1 cs22901.mp4] From mislav on stackoverflow: Crossplatform way of finding an executable in the $PATH. which('ruby') => /usr/bin/ruby | [
{
"docid": "a491e6c61521de92984e1db719fe3313",
"score": "0.5455686",
"text": "def which(cmd)\n exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']\n ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|\n exts.each { |ext|\n exe = File.join(path, \"#{cmd}#{ext}\")\n return exe if Fi... | [
{
"docid": "b696a2a3562456fa86c6227c5ba7a0ff",
"score": "0.6268828",
"text": "def which(cmd); end",
"title": ""
},
{
"docid": "b696a2a3562456fa86c6227c5ba7a0ff",
"score": "0.6268828",
"text": "def which(cmd); end",
"title": ""
},
{
"docid": "1a9f30ed3228ace3bb2fef017fb1cd... |
3abe021e7e8e483cd357ef61b87526b5 | Returns the path to the models to use. | [
{
"docid": "7d2e8981f6536ea898a5cc7cd15cc18d",
"score": "0.82676625",
"text": "def models_path\n return options[:resource_path] || ENV['RESOURCE_PATH'] ||\n ENV['OPINION_DETECTOR_MODELS_PATH']\n end",
"title": ""
}
] | [
{
"docid": "10f74e6444005cfaa589dc50347037c2",
"score": "0.8990883",
"text": "def models_path\n @models_path ||= root_path.join(\"models\")\n end",
"title": ""
},
{
"docid": "9c5081bcb2b1f13342b809050b4a29ef",
"score": "0.8003613",
"text": "def model_paths\n check_subdir... |
a1de685698141aa5d33c243f9cfb1712 | Public: Give authorization for an action user User for authorization is needed resource Resource for authorization is needed action Authorization ask Examples Wallet.authorized?(user, :update, post) Returns boolean | [
{
"docid": "94b4f41591eb62625c46346dfed1eae4",
"score": "0.76874536",
"text": "def authorized? user, resource, action\n role = user.to_role\n policies = PolicyRegistry.instance[role].policies\n klass = resource.class.name.downcase.to_sym\n policy = policies[klass]\n po... | [
{
"docid": "85ab3341dede50d755cee3a6e4cd2ce2",
"score": "0.73434526",
"text": "def authorized?(action = action_name, resource = nil)\n logged_in?\n end",
"title": ""
},
{
"docid": "85ab3341dede50d755cee3a6e4cd2ce2",
"score": "0.7343248",
"text": "def authorized?(action = acti... |
c3c5d807ec8a1506d4e1a6799311f2a4 | List of bags Returns a list of Bag records. | [
{
"docid": "6c76cef674317c95566a28e01d763e9f",
"score": "0.0",
"text": "def bag_get_with_http_info(page, page_size, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: BagApi.bag_get ...\"\n end\n # verify the required parameter 'page' is s... | [
{
"docid": "a18a90b3fb825204e726891260b34194",
"score": "0.6917906",
"text": "def index\n @bags = Bag.all\n end",
"title": ""
},
{
"docid": "c2eb277939ecb7a0614a127113c76432",
"score": "0.6711879",
"text": "def get_data_bags(bag_name)\n results = []\n\n if Chef::Con... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "5c55862b3c40d0d872da6d4946beaf57",
"score": "0.0",
"text": "def hours_event_params\n params.require(:hours_event).permit(:hours_worked, :hours_worked_date)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7496716",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.6956598",
"text": "def strong_params\n params.require(:request).permit(param_white... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "ea0e51bce8f6f0d6d8d076f1f97ffe67",
"score": "0.0",
"text": "def receipt_params\n\t\tparams.require(:receipt).permit(:purchase_date, :store, :tax, :total, 'purchase_date(1i)', 'purchase_date(2i)', 'purchase_date(1i)')\n\tend",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7495027",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.69566035",
"text": "def strong_params\n params.require(:request).permit(param_whit... |
8facc2481e4454ff34ac55db0f7ff5b7 | DELETE /tqrdc/order_lines/1 DELETE /tqrdc/order_lines/1.json | [
{
"docid": "bf8e218b63fb95f87c563bd0f6981df1",
"score": "0.74121153",
"text": "def destroy\n @tqrdc_order_line.destroy\n respond_to do |format|\n format.html { redirect_to tqrdc_order_lines_url, notice: 'Order line was successfully destroyed.' }\n format.json { head :no_content }\n en... | [
{
"docid": "eeed82e0c48af35f2fa5e0ae45b40fc9",
"score": "0.7432838",
"text": "def destroy\n # CSH nunca pode apagar, apenas pode mudar o estado para anulado\n # os items têm de ser libertados\n LineItem.where(\"order_id = ?\", @order.id).destroy_all\n @order.destroy\n respond_to do |forma... |
ffec3f0136c8fa0dd1cb087e422f41f4 | Reads the items to import and yields the given block for each item | [
{
"docid": "07496ce485e27a069ef136ddf0a0a78e",
"score": "0.67368513",
"text": "def read_items\n i = 0\n headers = true\n read_rows do |row|\n if i == 0 && headers\n headers = false\n next\n end\n i+= 1\n yield row, i if block_given?\n end\n end",
"title... | [
{
"docid": "97476bcceed8b785fa30af9c6c82c29b",
"score": "0.7157352",
"text": "def each_item\n item_ids.each {|item| yield load_item(item) }\n end",
"title": ""
},
{
"docid": "ba861a29531ef91af9d915224a5b6103",
"score": "0.64514536",
"text": "def import_items_data\n val... |
dd2ae6c0ee4c2a10c4c8e414e6adc382 | DELETE /majors/1 DELETE /majors/1.json | [
{
"docid": "5855e69b527cb896f7b2bc4e8e46ab1f",
"score": "0.7164704",
"text": "def destroy\n @major = Major.find(params[:id])\n @major.destroy\n\n respond_to do |format|\n format.html { redirect_to majors_url }\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "03576bf15dbdb31b2da35e28da8c5835",
"score": "0.7199702",
"text": "def destroy\n @minor = Minor.find(params[:id])\n @minor.destroy\n\n respond_to do |format|\n format.html { redirect_to minors_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
... |
8d397f023b8c5198c9d58b9f4d716554 | before_action :authenticate, except: [:index, :show] | [
{
"docid": "a1b2f78efa78a696eabebfaf00d4f4e3",
"score": "0.0",
"text": "def index\n @league = League.find(params[:league_id])\n @league.weeks.create if @league.weeks.empty?\n @week = @league.weeks.first\n render :show\n end",
"title": ""
}
] | [
{
"docid": "6e867b80a563fe7c94e95029f86c3038",
"score": "0.76272184",
"text": "def show\n skip_authorization\n end",
"title": ""
},
{
"docid": "6e867b80a563fe7c94e95029f86c3038",
"score": "0.76272184",
"text": "def show\n skip_authorization\n end",
"title": ""
},
{
... |
02fe11eab5920e67144904ee59d8681f | PUT /news_data/1 PUT /news_data/1.json | [
{
"docid": "3d77df2e45bc7be960972605237be23d",
"score": "0.6362635",
"text": "def update\n @news_datum = NewsDatum.find(params[:id])\n\n respond_to do |format|\n if @news_datum.update_attributes(params[:news_datum])\n format.html { redirect_to @news_datum, notice: 'News datum was succe... | [
{
"docid": "855f81d29ee8ff100cfefb3479cedcdd",
"score": "0.69510466",
"text": "def update(url, data)\n RestClient.put url, data, :content_type => :json\nend",
"title": ""
},
{
"docid": "16394be18f93b0214d50b4d2763ce4b2",
"score": "0.67724293",
"text": "def update\n @news = News.f... |
6543ea4a696e686288235b6815c1c2aa | The function that handles the validation errors It takes in the resource, and iterates through the validation errors, and creates the proper json error body | [
{
"docid": "8af69d3fd340310a8ca5c0812c8c4422",
"score": "0.81488955",
"text": "def render_json_validation_errors(resource)\n errors = []\n resource.errors.each do |fieldName, value|\n single_body = {\n :message => value,\n :fieldName => fieldName\n }\n errors.push(sing... | [
{
"docid": "18034397b7ab9dc5ff4232e6fc4da1c8",
"score": "0.8164993",
"text": "def validation_error(resource_errors)\n render json: {\n errors: [\n {\n status: '400',\n title: 'Bad Request',\n detail: resource_errors,\n code: '100'\n }\n ]\n ... |
8c49e9a9b9f2789c1029611c74e72799 | End an asynchronous span | [
{
"docid": "ae0578b89e3a026f7f5dd2af44bd10d4",
"score": "0.7941133",
"text": "def end_async_span(kvs = {}, span)\n span.set_tags(kvs) unless kvs.empty?\n span.close\n end",
"title": ""
}
] | [
{
"docid": "6fd5225a682b832b41702cc36b95461f",
"score": "0.75908357",
"text": "def end_span(span = nil)\n if span\n current_spans.delete(span)\n else\n span = current_spans.pop\n end\n\n return unless span\n\n span.done\n\n enqueue.call span\n\n update_sp... |
00419dfc913ed00b96f0aaa8af74ac8d | A wrapper around actions_allowable that also disallows doing actions to on_hold tasks. | [
{
"docid": "0c35ce9f28e0c732c06da6862f476f76",
"score": "0.6221819",
"text": "def actions_available?(user)\n return false if status == Constants.TASK_STATUSES.on_hold && !on_timed_hold?\n\n actions_allowable?(user)\n end",
"title": ""
}
] | [
{
"docid": "7cc7716f1744642365dd32b09f3fcdca",
"score": "0.63317287",
"text": "def available_actions\n fail NotImplementedError\n end",
"title": ""
},
{
"docid": "c48f12fce5c1f139324cae4671ec0fb9",
"score": "0.6313603",
"text": "def _can_do_action_without_object?(action, acti... |
52e2044b43f1075bd815258414fec90b | returns the a string where each character is either a _ or a letter if the user has not guessed the letter it should be a _, if they have it should show the correct letter hints: 1. use a while loop that goes through all the letters in the word if the letter is found in the word add it to a string, otherwise add _ | [
{
"docid": "f9a5f0d403fd6dbccf3458a986f2ad2b",
"score": "0.0",
"text": "def guessed\n\n end",
"title": ""
}
] | [
{
"docid": "a1e6321d0c011e1bbf101a4897a00e44",
"score": "0.79118675",
"text": "def display_word(word, guesses)\n mask_word = \"\"\n word.chars.each do |char|\n if guesses.include?(char)\n mask_word += char\n else\n mask_word += \"_\"\n end\n end\n return mask_word\nend",
"titl... |
d2aac5e5d50db683fdb7f16a7ae46f57 | Performs a single command on the remote environment as a user | [
{
"docid": "9642508ad47b508c6bc238b3e59b62a2",
"score": "0.65810084",
"text": "def execute_as_user(command)\n @user_password ||= c.password\n\n while true\n begin\n Net::SSH.start(c.ip, c.user, {\n :password => @user_password,\n :... | [
{
"docid": "ea9954c0184389c31387d07b6b0feae8",
"score": "0.7554725",
"text": "def execute_as_user(command)\n execute_as(c.user, command)\n end",
"title": ""
},
{
"docid": "fb8d2954490c0c36da000166a0ae1f49",
"score": "0.68611294",
"text": "def user_command(cmd)\n comm... |
ae3eb665769f34ecdb8b16320d9f5751 | Creates and Assigns a task to the project == Examples project = harvest.projects.find(401) harvest.projects.create_task(project, 'Bottling Glue') creates and assigns a task to the project | [
{
"docid": "4ac225d2262d2c8b04aac0161206936a",
"score": "0.7959893",
"text": "def create_task(project, task_name)\n response = request(:post, credentials, \"/projects/#{project.to_i}/task_assignments/add_with_create_new_task\", :body => {\"task\" => {\"name\" => task_name}}.to_json)\n id =... | [
{
"docid": "ff7620db071052328681c8f19fed19e2",
"score": "0.78950197",
"text": "def create_task(project_id, params)\n c_r Lokalise::Resources::Task, :create, project_id, params\n end",
"title": ""
},
{
"docid": "decd71af55f253526f45a44fb9cce40c",
"score": "0.77225614",
"text":... |
b874515984765c9b6f9430b83360d56f | Post target for editing the capacity of a driver's car. | [
{
"docid": "4862f5f5187382214b7e6b6eb42a2f9d",
"score": "0.0",
"text": "def edit_number_of_passengers\n traveller = Traveller.find(params[:pk])\n traveller.update(number_of_passengers: params[:value])\n\n if current_user.nil?\n if session[:trip] != nil\n travellers = session[:trip].... | [
{
"docid": "989dc89e256262fd62f19bd4ea32822d",
"score": "0.5602005",
"text": "def car_params\n params.require(:car).permit(:license, :manufacturer, :model, :rate, :style, :location, :status)\n end",
"title": ""
},
{
"docid": "6e5fbc96fe42bbeb10fe88e954559433",
"score": "0.5582320... |
68a7707e186272c7cca187f83214c487 | DELETE /workout_dates/1 DELETE /workout_dates/1.xml | [
{
"docid": "6032c67d8a6fe26ba3c06ff2c12e29f6",
"score": "0.7478288",
"text": "def destroy\n @workout_date = WorkoutDate.find(params[:id])\n @workout_date.destroy\n\n respond_to do |format|\n format.html { redirect_to(workout_dates_url) }\n format.xml { head :ok }\n end\n end",
... | [
{
"docid": "9fd61b2ee5b94af3b24486a3481a36d6",
"score": "0.7041468",
"text": "def destroy\n @workday = Workday.find(params[:id])\n @workday.destroy\n\n respond_to do |format|\n format.html { redirect_to(workdays_url) }\n format.xml { head :ok }\n end\n end",
"title": ""
},
... |
f01c3c87c1380e55612fbb96dc341646 | Creates the database where Og managed objects are serialized. Override in the adapter. ++ | [
{
"docid": "cfec513a5ec7da472b7fef4430b1ed57",
"score": "0.0",
"text": "def create_db(options)\n info \"Created database '#{options[:name]}'\"\n end",
"title": ""
}
] | [
{
"docid": "98ef8aceb97520505fec74eb4f0ddd1d",
"score": "0.6428015",
"text": "def single_object_db; end",
"title": ""
},
{
"docid": "61cf4c5aa7f1ef4dae5964330028df63",
"score": "0.6332014",
"text": "def orm; end",
"title": ""
},
{
"docid": "bd79398ae86003ed5a9babf2aba0162... |
5823c75f7437cf9f59a185b6d2ebf8b8 | GET /posts/1 GET /posts/1.json | [
{
"docid": "18b333e632d5eeaebd648073f8949844",
"score": "0.0",
"text": "def show; 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... |
6acb8120e1f824bd01c6d0cddc6c7da9 | The type of all types is PTypeType | [
{
"docid": "303f498967cba27a1d3ec9b9b32a1430",
"score": "0.63902247",
"text": "def infer_PAnyType(o)\n PTypeType.new(o)\n end",
"title": ""
}
] | [
{
"docid": "1b1c0ecbd2683484ac0cb755ffef155a",
"score": "0.7617361",
"text": "def is_ptype?(t)\n return t.is_a?(Types::PObjectType)\n end",
"title": ""
},
{
"docid": "be0c131395b2b99ecb43690c50643acc",
"score": "0.75360876",
"text": "def infer_PType(o)\n Types::PType.new()\n ... |
6c360af86f6dab3c6408dcfdb68f70c4 | This method can be use any time you have an instance of this model | [
{
"docid": "7b9d03cded04bb44fbcc54cbf5e192e6",
"score": "0.0",
"text": "def default!\n current_default_state = State.find_by_default(true) \n self.default = true\n self.save! \n if current_default_state\n current_state_default.default = false\n current_state_default.save!\n e... | [
{
"docid": "fe34d80f7d4311a4cbdd5f2a957646d8",
"score": "0.69030464",
"text": "def model\n super\n end",
"title": ""
},
{
"docid": "65f27194b7e590754d371383fe0be7f4",
"score": "0.66544485",
"text": "def initialize model\n @model = model\n end",
"title": ""
},
... |
af630984682f1a0b5a68e6092af0d102 | Update properties of this object | [
{
"docid": "332d353b435b43ce6eb383f45f116530",
"score": "0.0",
"text": "def update!(**args)\n @kind = args[:kind] if args.key?(:kind)\n @scores = args[:scores] if args.key?(:scores)\n end",
"title": ""
}
] | [
{
"docid": "184b1b1ed771473d3eb9f338c0734c38",
"score": "0.7308486",
"text": "def update *args\n opts = args.extract_options!\n fill_properties opts\n self.save\n end",
"title": ""
},
{
"docid": "5076c5a88404ae72986f958710f5687a",
"score": "0.72639555",
"text": "def update(... |
e35b0c3ef265416fe28512d95afb4958 | Generates the source code for the CUDA program, compiles it with nvcc and executes the program. | [
{
"docid": "2adb92f5c678aa56dd946875cc7c763e",
"score": "0.48183498",
"text": "def execute\n source = build_program\n\n launcher = Launcher.new(\n source: source,\n environment_builder: environment_builder,\n ... | [
{
"docid": "f22b9d48b784f8dce48afeebf52baffd",
"score": "0.66998625",
"text": "def nvcc_command\n s = MakeMakefileCuda::Nvcc.generate(argv)\n cmd = \"nvcc \" << s\n if ENV['CUMO_NVCC_GENERATE_CODE']\n cmd << \" --generate-code=#{ENV['CUMO_NVCC_GENERATE_CODE']}\"\n elsif ENV['D... |
7000484d92050e05bf247fd73d62203e | which is true if the current time is more than 10 days from commencement. | [
{
"docid": "2e79a1127af3bc9fa09a3e47eb707a65",
"score": "0.7087143",
"text": "def completed?\n (@start + 10 * DAY) < Time.now\n # p (@start + 10 * DAY)\n end",
"title": ""
}
] | [
{
"docid": "c338fd965621b069e9babafe84277b68",
"score": "0.7049945",
"text": "def more_than_a_day_passed?(start_time, end_time)\n end_time - start_time > 60 * 60 * 24\n end",
"title": ""
},
{
"docid": "6b3c932ffac00a7a745c2a696561bd2f",
"score": "0.6886277",
"text": "def stal... |
88ad10caf61882995d9d1d829a953bcf | Subject can be set in your I18n file at config/locales/en.yml with the following lookup: en.memberships_mailer.new_payment.subject | [
{
"docid": "c916f5f7779000095337b48714ce7aee",
"score": "0.0",
"text": "def new_payment(payment)\n @payment = payment\n mail(\n to: @payment.primary_contact_email_address,\n cc: @payment.accounts_contact_email_address,\n from: member_offer_email\n )\n end",
"title": ""
}
] | [
{
"docid": "ea740e704e8f1173fb87b45dfcaaf989",
"score": "0.7723028",
"text": "def subject_for(key)\n I18n.t(:subject, scope: [:mailer, key])\n end",
"title": ""
},
{
"docid": "8928fe4f050d7ebd3e9aa992b07e320a",
"score": "0.7441394",
"text": "def subject_for\n ActiveSupport... |
42d24aa1ebe05c78b52dfc8185a5c248 | GET /words/1 GET /words/1.json | [
{
"docid": "8e8d2a8afb4957927a0116a645b97308",
"score": "0.6967815",
"text": "def show\n @word = Word.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @word }\n end\n end",
"title": ""
}
] | [
{
"docid": "477fc772461dce29090df58215c03ce0",
"score": "0.7363844",
"text": "def show\n curWord = Word.find_by_word(params[:id])\n respond_to do |format|\n format.json { render json: curWord }\n end\n end",
"title": ""
},
{
"docid": "6ef27a3b5b3eb564a61fbac721ab6c12",
"sc... |
e73f1e9f6c406caa021d24c8eef3d3fd | Sets the attribute column_deltas | [
{
"docid": "a53c173f431daef0851560a567f7cbd6",
"score": "0.78364366",
"text": "def column_deltas=(_arg0); end",
"title": ""
}
] | [
{
"docid": "d6e203924af4b0deebce9ee66650ee02",
"score": "0.7569875",
"text": "def column_deltas; end",
"title": ""
},
{
"docid": "eaef94d7731f35bb6f1883b743cf3843",
"score": "0.6941277",
"text": "def column_delta; end",
"title": ""
},
{
"docid": "f0a5a81ad3e67c4c2bbb06235... |
c75419036aaa3f4d143fe4b7b2f918c5 | if empty > return switch if on current player cup > return prompt | [
{
"docid": "f6c9834ea277a09a3b3ad420c486b71b",
"score": "0.0",
"text": "def next_turn(ending_idx)\n # helper method to determine whether #make_move returns :switch, :prompt, or ending_idx\n # debugger\n if ending_idx.between?(0, 5) || ending_idx.between?(7, 12)\n if @cups[ending_idx].size ... | [
{
"docid": "03c2909deb06f3e4c0187ba32383d493",
"score": "0.7308694",
"text": "def player1_choose?\n puts \"Player 1, it's your turn.\"\n puts \"\\n ROCK, PAPER, or SCISSORS? Choose wisely!\"\n gets.chomp\n end",
"title": ""
},
{
"docid": "c1b90cde4b6850be97b4cfd2cdd02... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "e1f28c0518ee85805504a954cda8ecbf",
"score": "0.0",
"text": "def set_suggestion\n @suggestion = Suggestion.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;... |
8d20373e56f125a8df24e595efdf0c67 | The name of the key pair. | [
{
"docid": "ca4fc0f6013860944c730a06286f7cdc",
"score": "0.78094053",
"text": "def key_name\n data.key_name\n end",
"title": ""
}
] | [
{
"docid": "2872e7e96ac2c7f0e445d962f3deae98",
"score": "0.7923179",
"text": "def key\n @name.downcase.to_sym\n end",
"title": ""
},
{
"docid": "4112a85012957f1f06369ea5f8bfb4f5",
"score": "0.78793883",
"text": "def key_name\n @config.key_name\n end",
... |
ee98bf9a0de13875405e235990eb4e64 | Authenticate 1. Another process saved a newer token onto the token_file => read it 2. The token saved on the token_file is same with current token => reauthenticate 3. The token saved on the token_file is older than the current token => unknown situation, reauthenticate and save into token_file to refresh anyway 4. No ... | [
{
"docid": "a993e7c1730871ff874690477a1e699f",
"score": "0.0",
"text": "def authenticate\n auth_api = TriglavClient::AuthApi.new(api_client)\n credential = TriglavClient::Credential.new(\n username: username, password: password, authenticator: authenticator\n )\n handle_auth_error do\n ... | [
{
"docid": "a464f5097683b5117c71a7ab7bc71e02",
"score": "0.6795097",
"text": "def with_fresh_token\n retried = false\n\n begin\n token = File.exist?(TOKEN_PATH) && File.read(TOKEN_PATH) || refresh_token()\n yield(token)\n rescue StaleTokenError\n raise if retried # Avoid endless loops.\n ... |
e9a6e17acf5c89d837779ab3e264980b | Reads the command from the user. | [
{
"docid": "3cd71f6836aa4eb4a9773efac1599449",
"score": "0.7271544",
"text": "def read_command!\n # Puts the terminal temporarily in *noncanonical mode*. That's the\n # mode where you don't wait for a newline.\n #\n # What an unintuitive name. :-\\\n STDIN.raw do |stdin|\n return std... | [
{
"docid": "774329e50c5e6193e94c958a619cf88f",
"score": "0.88091105",
"text": "def read_command\n input.gets\n end",
"title": ""
},
{
"docid": "b294cbd261c1418d3ea93955e90ca3b8",
"score": "0.81400055",
"text": "def read_command\n line = self.input.gets\n $st... |
c2e13e350f4d65a95d403d6786873709 | Sample the value of the animation curve at this frame | [
{
"docid": "fc3789b1091fbf351ae2bddbf86f519a",
"score": "0.62286",
"text": "def sample_at(frame)\n if :cycle == @extrap\n return sample_from_segments(frame_number_in_cycle(frame))\n elsif :revcycle == @extrap\n return sample_from_segments(frame_number_in_revcycle(frame))\n else\n ... | [
{
"docid": "8956fc266688ce7a495ef774f5bc0766",
"score": "0.6308371",
"text": "def sample(value)\n end",
"title": ""
},
{
"docid": "8819c02432942091f400302773678c2c",
"score": "0.59260535",
"text": "def update(sample)\n now = Time.new\n elapsed = now - @time\n @sum +... |
c22cde675758c0d115509141728e1fb9 | Removes all stored secret keys from the store | [
{
"docid": "2819ab54abb06ceba7ced255547bdc1e",
"score": "0.0",
"text": "def clear\n @store.clear\n end",
"title": ""
}
] | [
{
"docid": "0bc635ff194404d0880c7e1cdcbb2cd0",
"score": "0.7585211",
"text": "def reset_secret_keys!\n S_MUTEX.synchronize { @keys.clear }\n end",
"title": ""
},
{
"docid": "aba1d7a0cbbcfd60b6041b4098b65524",
"score": "0.7325759",
"text": "def delete_all!\n all_keys.... |
f5f2e48169af8919981c459eb4f4e103 | Test to make sure we can't unlock with a locked user | [
{
"docid": "d57ead4f07efcfbecbdad71bede639c7",
"score": "0.72774845",
"text": "def test_locked_user\n new_entry = EntryCrypto::PasswordEntry.new \"www.google.ca\", \"test_user\"\n new_user = EntryCrypto::User.new \"master_user\", 1234, \"some secret here\"\n\n # This will do util us... | [
{
"docid": "26571e05047e352086af0a8f9c410597",
"score": "0.7179798",
"text": "def test_should_lock_expired_users\n User.lock_expired_users\n assert_equal false, users(:user4).active_for_authentication?\n end",
"title": ""
},
{
"docid": "cd067bbccf506c73e327a5276e1f124f",
"score": ... |
e48274b59ae48304407ce5207dc370ae | To write and update the data in to the data store. | [
{
"docid": "90a3ec3f343d6b9099578055b2603a81",
"score": "0.0",
"text": "def save_data\n #calling helpers to save the data\n save_data(@file_path)\n end",
"title": ""
}
] | [
{
"docid": "cfd1e58be02f5ee22bcc3da86ea0c079",
"score": "0.74032104",
"text": "def update_data\n\n end",
"title": ""
},
{
"docid": "5301454d22bae1b590ba66b22afe3425",
"score": "0.7096523",
"text": "def update_data(data)\n @data = data\n end",
"title": ""
},
{
"do... |
eba6b3c225d38fbd4b6cd4142b20ebf0 | Calls out to api to get updated info for this video | [
{
"docid": "3cbde959780187f9e1c9eb16b62e6b64",
"score": "0.64760417",
"text": "def getInfo\n\t\t@info = JSON.parse(RestClient.get(\"https://#{Cbthelper.username}:#{Cbthelper.authkey}@crossbrowsertesting.com/api/v3/selenium/#{@testId}/videos/#{@hash}\"))\n\tend",
"title": ""
}
] | [
{
"docid": "79528f6b310fa7589aa487faa908d519",
"score": "0.7458983",
"text": "def update\n update_video\n end",
"title": ""
},
{
"docid": "4d0463beda0e7b5565cd08a0612167d6",
"score": "0.7035196",
"text": "def update_statistics\n HTTP.post(\"/video/#{@id}/stats\")\n true... |
16ec745bc9ef5c80720052305992b587 | Used for caching the author's User instance Since this is not a document +attribute+, it will not be serialized to JSON | [
{
"docid": "40e6f870085d8ff9bc3806db3ce86715",
"score": "0.6930862",
"text": "def author=(user)\n @author = user\n self.created_by = user.key\n end",
"title": ""
}
] | [
{
"docid": "b9a64d2f33430b4e0e7b9c1391c0c61e",
"score": "0.706136",
"text": "def author\n @author ||= User.find(author_id)\n end",
"title": ""
},
{
"docid": "30fdd1bbd99a19258e14932c9dcfb289",
"score": "0.7020184",
"text": "def getAuthor\n\t\treturn User.find(self.user_id)\n\tend... |