query_id
stringlengths
32
32
query
stringlengths
7
6.75k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
e561e11bcf379ef5dc139c210017366b
Only allow a list of trusted parameters through.
[ { "docid": "858649ffd357e0baf62f3ffa60d8bc77", "score": "0.0", "text": "def event_params\n params.require(:event).permit(:name, :body, :date, :status, :location, :latitude, :longitude, :image)\n # , :state, :city, :street, :country\n end", "title": "" } ]
[ { "docid": "3663f9efd3f3bbf73f4830949ab0522b", "score": "0.74768823", "text": "def whitelisted_params\n super\n end", "title": "" }, { "docid": "36956168ba2889cff7bf17d9f1db41b8", "score": "0.71700543", "text": "def set_param_whitelist(*param_list)\n self.param_whitelist...
af630984682f1a0b5a68e6092af0d102
Update properties of this object
[ { "docid": "42002bc27007a54b1101e97b6316c940", "score": "0.0", "text": "def update!(**args)\n @basic_config = args[:basic_config] if args.key?(:basic_config)\n end", "title": "" } ]
[ { "docid": "184b1b1ed771473d3eb9f338c0734c38", "score": "0.73066413", "text": "def update *args\n opts = args.extract_options!\n fill_properties opts\n self.save\n end", "title": "" }, { "docid": "5076c5a88404ae72986f958710f5687a", "score": "0.72631145", "text": "def update...
19b3a7e85ba3be2ccf206cfec3862ed5
Lets build in some color coding!
[ { "docid": "f3273b68953c9475592bbe8d377030fb", "score": "0.0", "text": "def red?\n failed? || deleting?\n end", "title": "" } ]
[ { "docid": "05897485e5c451786eb318c28eea977f", "score": "0.7950037", "text": "def color(color); end", "title": "" }, { "docid": "7f4eed0546c70579d913027c65a40641", "score": "0.78301007", "text": "def colorized?; end", "title": "" }, { "docid": "bb677b2240eeca2bf40fefef10d...
c2e6e9a5a4e2a21d3249163a13d28ad0
DELETE /nested/pages/1 DELETE /nested/pages/1.json
[ { "docid": "4c516461d7637468f25c1aacf9607edf", "score": "0.8047365", "text": "def destroy\n @nested_page = Nested::Page.find(params[:id])\n @nested_page.destroy\n\n respond_to do |format|\n format.html { redirect_to nested_pages_url }\n format.json { head :no_content }\n end\n end...
[ { "docid": "f4879da218898dc53d5f7882d2f0ce15", "score": "0.7163484", "text": "def delete_page(id)\n @client.raw('delete', \"/content/pages/#{id}\")\n end", "title": "" }, { "docid": "52ceec00bbf9e533e07d35969e4fe5c8", "score": "0.7041004", "text": "def destroy\n @page = Page.f...
f696e72899687905424f06e6ce21b8e5
GET /programme2013s GET /programme2013s.json
[ { "docid": "90154f646bc5b695aa627be173dc08fb", "score": "0.59581846", "text": "def index\n @programme2013s = Programme2013.where(\"date >= ?\", Date.today)\n @title = Time.now.year\n end", "title": "" } ]
[ { "docid": "3b0d7a0474272ee30bf08f2d96e6481c", "score": "0.7032636", "text": "def index\n @program = Program.all\n render json: {program: @program}\n end", "title": "" }, { "docid": "3da5e43634b2d8e498bd6ba28b7ea533", "score": "0.6848338", "text": "def index\n @progra...
56c96f7b4fd50190ee6eee1be1e11eb8
Gets the rebootRequired property value. When TRUE indicates reboot is required, when FALSE indicates when TRUE indicates reboot is not required. Defaults to setting on client device.
[ { "docid": "c9dff835a0eddf2e9fd202cde3a24272", "score": "0.76311415", "text": "def reboot_required\n return @reboot_required\n end", "title": "" } ]
[ { "docid": "6adfd56616836402b51a27e159a66893", "score": "0.7528213", "text": "def reboot_required=(value)\n @reboot_required = value\n end", "title": "" }, { "docid": "8c75b67b2e5deb970ed6c7b8f0582169", "score": "0.6894624", "text": "def requires_reboot\n ...
af8659545e3ceb98c3bef19b01c50b0c
Returns a debug string on inspecting the static file. Includes only the relative path of the object.
[ { "docid": "529f42a93501adc6b61f50123ee1d0fd", "score": "0.6580968", "text": "def inspect\n \"#<#{self.class} @relative_path=#{relative_path.inspect}>\"\n end", "title": "" } ]
[ { "docid": "0bb71c9d432cbc81357450a23388c3ce", "score": "0.68113786", "text": "def inspect; \"#{relative}\"; end", "title": "" }, { "docid": "51c0c9d1d1dfb628b16fc67e4737242c", "score": "0.670726", "text": "def inspect\n \"#<#{self.class} #{relative_path}>\"\n end", "titl...
4b68b736c02b1e79a0353f64555a09db
builds an address for the given url
[ { "docid": "f3b6e3ce6b427392455ccf4ddaa94500", "score": "0.80925494", "text": "def build_address url\n if url.type == 'external'\n \"#{url.protocol}://#{url.address}:#{url.port}#{url.path}\"\n elsif url.type == 'bridge'\n address = bridge_address_for url.address, url.port...
[ { "docid": "dd6650cc756ec66757f6587f6e7622d3", "score": "0.71583366", "text": "def generate_geo_url(address)\n call_address = Addressable::URI.new(\n :scheme => \"https\",\n :host => \"maps.googleapis.com\",\n :path => \"maps/api/geocode/json\",\n :query_values => {:address => address,\...
6937c581003521037ae52201b45a61ba
Delete a subsubproject DELETE /projects/:project_id/subprojects/:subproject_id/subsubprojects/:id
[ { "docid": "3704ab3520e4accdbd141421946758e0", "score": "0.83022964", "text": "def destroy\n @subsubproject = Subsubproject.find(params[:id])\n projectid = @subsubproject.subproject.project.id\n subprojectid = @subsubproject.subproject.id\n @subsubproject.destroy\n redirect_to project_sub...
[ { "docid": "f63cfe941aac3aa77d04e4c5e117eddb", "score": "0.758617", "text": "def destroy\n @sub_project.destroy\n respond_to do |format|\n format.html { redirect_to project_path(@project), notice: 'Sub project was successfully destroyed.' }\n format.json { head :no_content }\n end\n ...
39746295c05f1785e70248451a797667
Choose a suitable renderer for this page and request.
[ { "docid": "40e0e3eae2d254b85db6b5417061f42d", "score": "0.8033412", "text": "def renderer_for(page)\n (\n Scrapple.renderer(params['renderer']) ||\n Scrapple.renderer(page['renderer']) ||\n Scrapple.renderer(Scrapple.config[\"default_renderers\"][page.type]) ||\n Scrapp...
[ { "docid": "18a61a8ea291a5ed9127fed6116b8a76", "score": "0.68011075", "text": "def renderer(type = :basic, options = {})\n @renderer ||= Renderer.select(type).new(self, options)\n end", "title": "" }, { "docid": "05c3537fb66f41ed1f2807562fbd364a", "score": "0.67653406", "text...
6ecbf26c11da2e2d455d7ddf2c114f3a
Gets a post based on URL
[ { "docid": "ad899a6ccb519c3f398657ead2fea699", "score": "0.7154241", "text": "def get_post(url)\r\n begin\r\n # Check if this url comes from this blog\r\n if URI(url).host =~ /#{URI(url).host}/\r\n Anemone.crawl(url) do |anemone|\r\n anemone.on_every_page do |page|\r\n ...
[ { "docid": "0f06b162a1be143298da71f79db4f1db", "score": "0.7687038", "text": "def post_from_url(params_url)\n post = nil\n post_path = params_url\n if params_url.include? \"://\"\n post_path = params_url.split(\"://\",2).last.split(\"/\",2).last\n end\n if post_path.include? \"posts/...
9cbed1e1abc3b3c2ba0a297a453900c6
Use the the array.map method to complete this test Map creates a new array containing the values returned by the block Docs:
[ { "docid": "4e1e233dd080937648347805bf79d87f", "score": "0.0", "text": "def test_create_a_new_array_which_contains_each_original_value_doubled\n skip \"Waiting to be implemented\"\n array = [1,6,3,9,1,1,2,3]\n new_array = array.map { | number| number * 3 } # Fix this so that numbers are doubled...
[ { "docid": "4f9628729bf8f2a8f17a460e4fef7cce", "score": "0.65515804", "text": "def map! &block\n # create a new array to store results of block applied to \n # each element\n new_array = []\n each { |x| new_array.push yield x }\n #update internal array with new elements\n @internal_arr...
f74c29bdfc4a183e1ec1b91334cd5be2
Use callbacks to share common setup or constraints between actions.
[ { "docid": "683fd2932e78ed9c39d5b878ff8e5193", "score": "0.0", "text": "def set_store\r\n @store = Store.find(params[:id])\r\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...
290f1de91245c76ef3833fd1000f589f
Define your play method below
[ { "docid": "5992d82a56fbcada960537cd94ca0735", "score": "0.0", "text": "def get_input(token)\n print \"Player #{token} select an unused cell: [1-9]: \"\n input = gets.strip\n puts \"\"\n return input\nend", "title": "" } ]
[ { "docid": "da113481795475a035aed999f253335e", "score": "0.90035415", "text": "def play\n end", "title": "" }, { "docid": "da113481795475a035aed999f253335e", "score": "0.90035415", "text": "def play\n end", "title": "" }, { "docid": "da113481795475a035aed999f253335e", ...
baf2403305fe323ce376aa3f1c2225a9
External calls todo Check|Register for ? point for named xml document type. todo Check|Register for version. todo Check|Register for document UTF type. Parses a complete element.
[ { "docid": "f6a46b393624c920062a534d40e52ba7", "score": "0.0", "text": "def parse\n\t\t#todo Check|Split for comment.\n\t\t\n\t\t# increment level of recursion for debugging\n\t\t@level += 1\n\t\t\n\t\t#todo check for closing identifier\n\t\twhile closing_element?\n\t\t\tdown_line\n\t\tend\n\t\t\n\t\t# ...
[ { "docid": "a3df793acbe006e54a6dee20d78d7b37", "score": "0.56291115", "text": "def parseElement(elem)\n throw \"No name attribute for: #{elem}\" if not elem.attributes.has_key?(\"name\")\n name = elem.attributes[\"name\"]\n throw \"Element #{name} has already been defined\" if @elements.has_key...
fd41cb22a8e170195506e07a4a5e1b08
Set Delivery Service Configure the delivery service type used as the destination for messages received at a FoneNumber.
[ { "docid": "c6a746596546a54c48d9d4cbb76281ce", "score": "0.0", "text": "def configure_message_receive_0(fonenumber, type, value, url_method, opts = {})\n data, _status_code, _headers = configure_message_receive_0_with_http_info(fonenumber, type, value, url_method, opts)\n return data\n end"...
[ { "docid": "7d9a27567228eeca04119fdbf7f81a9a", "score": "0.6993159", "text": "def set_delivery_type\n @delivery_type = DeliveryType.find(params[:id])\n end", "title": "" }, { "docid": "1db9fd8ca240529fc43deb78a9cb25a7", "score": "0.69387317", "text": "def set_ShippingService(...
c657de4b70d266e9a3a784b999ea9e60
Never trust parameters from the scary internet, only allow the white list through.
[ { "docid": "3d981d2cf6d16a09d2030dd80f3446b8", "score": "0.0", "text": "def glucose_params\n params.require(:glucose).permit(:user_id, :reading, :date)\n end", "title": "" } ]
[ { "docid": "3663f9efd3f3bbf73f4830949ab0522b", "score": "0.74964964", "text": "def whitelisted_params\n super\n end", "title": "" }, { "docid": "13a61145b00345517e33319a34f7d385", "score": "0.6957765", "text": "def strong_params\n params.require(:request).permit(param_whit...
25ff21b1b49b9a84e005a5ac21b0028f
Total of all values recorded in the last x seconds
[ { "docid": "85fba92671c41edae08c9611d0618403", "score": "0.75098646", "text": "def total(seconds = DEFAULT_PERIOD)\n records = records_newer_than(Time.now - seconds)\n records.inject(0) do |sum,record|\n sum += record[:value]\n end\n end", "title": "" } ]
[ { "docid": "892ca19b7e5cc38f7d76097275416ebd", "score": "0.735645", "text": "def update_total(result)\n \tself.secs = results.reduce(0) do |total, result|\n \t\ttotal + result.secs.to_i\n \tend\n end", "title": "" }, { "docid": "c864727831ab3de930a9379346eb9658", "score": "0.710485",...
ec371adc97ed498c42b8030d73124ad4
Query across all types of campaigns
[ { "docid": "afcf366f53340395a096af270f7e3d05", "score": "0.0", "text": "def get_outbound_campaigns_all_divisionviews(opts = {})\n data, _status_code, _headers = get_outbound_campaigns_all_divisionviews_with_http_info(opts)\n return data\n end", "title": "" } ]
[ { "docid": "e415535ff2bc1becf093700fb5db133b", "score": "0.7840914", "text": "def find_campaigns_by_type(campaign_type, *args)\n campaigns({:type => campaign_type}, *args)['data']\n end", "title": "" }, { "docid": "6b703001a6c2aeca66792632a09ee093", "score": "0.7630074", "tex...
e9a3e3ce51e4d8c61f05e803ac9e6b4c
Returns whether or not the given arguments are acceptable when running the task. In addition to returning the boolean outcome, if a block is given, it is called with a string of formatted error messages that describes the difference between what was given and what is expected. The error message may have multiple lines ...
[ { "docid": "9ffff8253386356358688f38734f5237", "score": "0.6206897", "text": "def runnable_with?(args_hash)\n params = @task.parameters\n params_type = if params.nil?\n T_GENERIC_TASK_HASH\n else\n Puppet::Pops::Types::TypeFactory.struct(params)\n end\n return true...
[ { "docid": "8bac988523927a92284adf8890e3344b", "score": "0.6327658", "text": "def arguments_valid?\n raise \"TODO - parse arguments\"\n end", "title": "" }, { "docid": "c41a8f075b76e63e8bb5a76b3ddfd598", "score": "0.632534", "text": "def arguments_valid? \n case @ar...
b0dc83f0898ea6e7d389813cc33ea7d0
Retrieve the latest messages in the form of TaggedData Override in subclass to extend behavior
[ { "docid": "6ba25000ac2eccbae0fd88091e2d3db0", "score": "0.0", "text": "def retrieve\n raise 'Retrieve latest not overridden, or calling base class.'\n end", "title": "" } ]
[ { "docid": "259787d3104ac2afb4bbba5f1b4c7ef3", "score": "0.6904365", "text": "def retrieve\n messages = @redd.my_messages('moderator', false, limit: RETRIEVAL_COUNT)\n messages = expand(messages)\n messages.map do |m|\n TaggedData.new(m.name, Models::Modmail.from_da...
55d899b99f29640ae993ab03114b9f92
Clears the command buffer and closes the connection
[ { "docid": "ffdccc43ccebafc49865062ca056ab16", "score": "0.6276137", "text": "def disconnect\n @connection_manager.disconnect\n clear_command_buffer\n timer = EM.add_periodic_timer(0.1) do\n unless @client.connected?\n timer.cancel\n puts \"Disconnecte...
[ { "docid": "a7c40f26e565902b58fe05b752d02e3a", "score": "0.7640243", "text": "def clear_command_buffer\n @command_buffer.clear\n end", "title": "" }, { "docid": "d5ef78da9475970bda853b335d38065e", "score": "0.7100268", "text": "def close_connection\n @connection.rese...
6d04dd82db9ca9980d0fda12eb0f9847
GET /cycles GET /cycles.json
[ { "docid": "a120cec79ad2c7c849e7c2421769d383", "score": "0.7171241", "text": "def index\n @cycles = Cycle.all\n end", "title": "" } ]
[ { "docid": "ad4ab0ad940377ac9064f3223e92b5c6", "score": "0.708707", "text": "def index\n @cycles = Cycle.where(group_id: params[:group_id])\n\n render json: @cycles\n end", "title": "" }, { "docid": "5cd04e942722278825f36eb1907db8c6", "score": "0.6800078", "text": "def show\n\...
7ddf3cb0c01172c58124ba552d47690a
Find all supportnode that links to specified network
[ { "docid": "48c07385c488bace982b820bbb0b1552", "score": "0.68543184", "text": "def find_all_supports_by_network(nw_ref)\n @supports.find_all do |support|\n support.ref_network == nw_ref\n end\n end", "title": "" } ]
[ { "docid": "4ca9dd514ca26e347e9eb7f7f6ed3e5e", "score": "0.6065079", "text": "def links\n l=self.nodes().find_all {|n| n.parent_node}\n l.map {|n|\n \n Network::Link.new({\n :source_node=>n,\n :target_node=>n.parent_node,\n :link_val...
1ed79076b694efe968da961ff26b3a1f
Gets all the instances for the list of ids and returns them in the id order of the list, rather than the db order.
[ { "docid": "30ffa206453f9bc8fb05ae9f4567368b", "score": "0.6965871", "text": "def get_all(id_list)\n # This pure-db solution is Postgresql only unfortunately...\n #\n # values = []\n # id_list.each_with_index do |id, index|\n # values << (\"(\" << [id, index].join(\"...
[ { "docid": "4141991fbc483eb5898324f9faada5ab", "score": "0.6690929", "text": "def find_many(ids, options = {})\n return [] if ids.empty?\n\n Hari.redis.mget(ids).map &method(:from_json)\n end", "title": "" }, { "docid": "83da6992208577e8513acc3547df0035", "score"...
4eaf7c008dc6f57d18f0a9cc50282fd7
invokes ability class url uri /categories path categories_path http method GET roles& responsibility to list all categories
[ { "docid": "3027d6442f2877fdf7dfe86d245ccbe4", "score": "0.6385729", "text": "def index\n\t\t@categories = Category.all\n\tend", "title": "" } ]
[ { "docid": "6d2573a7dd7e66c6b090cb93914bf727", "score": "0.7533894", "text": "def categories!\n mashup(self.class.get(\"/\", :query => method_params('aj.categories.getList'))).categories.category\n end", "title": "" }, { "docid": "efcb5e10780279c84a4be599091f0268", "score": "0.717821...
9826f0916dc6beb6a58b153b2ac67cdb
Convert shorthand background declarations (e.g. background: url("chess.png") gray 50% repeat fixed;) into their constituent parts. See
[ { "docid": "4adc919afe58084515a27aec29daf08d", "score": "0.7265874", "text": "def expand_background_shorthand! # :nodoc:\n return unless (declaration = declarations['background'])\n\n value = declaration.value.dup\n\n replacement =\n if value.match(CssParser::RE_INHERIT)\n ...
[ { "docid": "ab7cc5423206696e44f89c374ae9ae8b", "score": "0.7427288", "text": "def expand_background_shorthand! # :nodoc:\n return unless @declarations.has_key?('background')\n\n value = @declarations['background'][:value]\n\n if value =~ CssParser::RE_INHERIT\n BACKGROUND_PROPERTIE...
a66991c4518e79b8522508f147b11bd7
Then ask them for add or multiply Add or multiply all the numbers from one up to the number
[ { "docid": "d963064c7503f53d165beb3694d2cac4", "score": "0.0", "text": "def number\n puts \"Enter a number between 1 and 25\"\n @chosen_number = gets.chomp.strip.to_i\n if @chosen_number > 0 && @chosen_number < 26\n add_multiply\n else\n puts \"That is not a valid entry.\"\n number\n end\n...
[ { "docid": "e3f5de15c6b234613711004897bbaf0b", "score": "0.680455", "text": "def sum_or_product\n puts \"Please enter a number greater than 0\"\n number = gets.chomp.to_i\n puts \"Would you like to multiply or add these numbers? Type 'p' to multiply and 's' to add\"\n operator = gets.chomp.to_s\n\n ...
89e949c0fdec8922183fd0f8fc2d6924
PUT /gerente_comercials/1 PUT /gerente_comercials/1.json
[ { "docid": "2692145ef696b696ee335c5cb187a8f6", "score": "0.7119172", "text": "def update\n @gerente_comercial = GerenteComercial.find(params[:id])\n\n respond_to do |format|\n if @gerente_comercial.update_attributes(params[:gerente_comercial])\n format.html { redirect_to @gerente_comer...
[ { "docid": "8d4903a8a69bc15233ed1de55096d8f3", "score": "0.6700567", "text": "def update\n respond_to do |format|\n if @centroscomercial.update(centroscomercial_params)\n format.html { redirect_to @centroscomercial, notice: 'Centroscomercial was successfully updated.' }\n format.js...
422c1c29ef0e2334dea04943c91373fa
GET /construction_types/1 GET /construction_types/1.json
[ { "docid": "1067c87947eb0967f9eebe937c33b496", "score": "0.7865331", "text": "def show\n @construction_type = ConstructionType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @construction_type }\n end\n end", "title": "" ...
[ { "docid": "de2a592797a4792e1d1f46cc38bdf7e5", "score": "0.7531842", "text": "def new\n @construction_type = ConstructionType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @construction_type }\n end\n end", "title": "" }, { "doci...
cc2636a64a822123c1b2d811afc36c04
Reset all configuration options to defaults
[ { "docid": "17ce1028342ee6879ee02af52d30b8e8", "score": "0.0", "text": "def reset\n self.commission = DEFAULT_COMMISSION\n self.key = nil\n self.secret = nil\n self\n end", "title": "" } ]
[ { "docid": "f7f53da1f46a861e95c806d02ee5380e", "score": "0.89287955", "text": "def reset!\n # Vedeu::Log.logger.debug('Resetting configuration.')\n\n @options = defaults\n end", "title": "" }, { "docid": "1ff19118d89155119e24fbe12bca0882", "score": "0.8617408", "text": "...
9455aa4a0654b0d5acf80498359251db
Test 4: Clear cookies, do not login, search for a member
[ { "docid": "f3ca88fd6dbb5563fd6eea6ac3f5ff33", "score": "0.7845149", "text": "def test04_member_search_logged_out_TC_24434\n\t\t#no login\n\t\t$browser.cookies.clear\n\t\t$browser.goto($patch)\n\t\t$search_text_field.when_present.set(\"User 70\")\n\t\t$search_button.click\n\t\tsleep 4\n\t\t$user_70.clic...
[ { "docid": "d8c676841854dba1379d0a5c9ff39711", "score": "0.77848136", "text": "def test04_member_search_logged_out_TC_24434\n\t\t#no login\n\t\t$browser.cookies.clear\n\t\t$browser.goto($patch)\n\t\t$search_text_field.when_present.set(\"User 70\")\n\t\t$search_button.click\n\t\t$user_70.when_present.cli...
bcf63fedffa08d799535f6d0e8ea9b1c
Produces a name of a science You can optionally filter by specifying one or more of the following: `:empirical, :formal, :natural, :social, :basic, :applied`
[ { "docid": "373e5c562374b08b515ac47d2eb0f3c0", "score": "0.6118595", "text": "def science(*branches)\n selected = BRANCHES.values.flatten.uniq\n branches.each do |branch|\n selected &= BRANCHES[branch] if BRANCHES.key? branch\n end\n\n raise ArgumentError, 'Filters d...
[ { "docid": "1462579cb9dd03b6c7b98e7534660027", "score": "0.6385301", "text": "def name\n if self[:category] == 'Fiction'\n if self[:year] > 2005\n 'The Paragraphe Hugh MacLennan Prize for Fiction'\n elsif self[:year] > 1990\n 'The Hugh MacLennan Prize for Fiction'\n ...
d0b2dc7f71c33e696c61424d6eb79663
This navigate to given url
[ { "docid": "4ca84b835d84d5eb33785606df4cef03", "score": "0.0", "text": "def go_to(url)\n visit url\n el = first('#modal_overlay', wait: 0)\n\n within(el) do\n find('a.close-reveal-modal.button', wait: 0).click\n end unless el.nil?\n end", "title": "" } ]
[ { "docid": "544751240c1f35ac14210244bd42eb3c", "score": "0.79453844", "text": "def navigate_to(url)\n\t\t@@browser.goto url\n\tend", "title": "" }, { "docid": "89eac8517f42a87cb9150ef6f3f68d1a", "score": "0.78886694", "text": "def goto_url(url)\r\n @browser.goto url\r\n end",...
c3871d5222723b5d7f73ef24ab11e035
Add more helper methods to be used by all tests here...
[ { "docid": "f35c1a50f235934537a25b804b443081", "score": "0.0", "text": "def disable_optional_module(user, optional_module, name)\n old_controller = @controller\n sign_in user\n @controller = Admin::OptionalModulesController.new\n patch :update, params: { id: optional_module, optional...
[ { "docid": "e708ad90e8ce43e3a3a3a99c57b26047", "score": "0.7330966", "text": "def test_legacy_helpers\n assert_equal @patron.primary_phone, @patron.primary_address_phone\n assert_equal @patron.secondary_phone, @patron.secondary_address_phone\n assert_nil @patron.primary_address_mobile_phone\n ...
bfbcddcc918ef40f76e5014276919dbc
Preview this email at
[ { "docid": "9eacc7bcad3f3294072da5ebf5470f4a", "score": "0.0", "text": "def reset_password\n user = User.first\n ticket = user.tickets.create(\n name: 'Réinitialiser le mot de passe',\n action: '/password_resets/%{token}/edit',\n duree: 2.days\n )\n UserMailer.r...
[ { "docid": "947d18f31928dcf9761bdcbda7f18565", "score": "0.71475905", "text": "def preview\n @email = Email.find(params[:id])\n render :text => @email.body\n end", "title": "" }, { "docid": "f9cb02c07e98bbf5e69bcea1540cfe24", "score": "0.71186084", "text": "def preview\n @e...
cf8baaa57a028973d183b201253b5fe8
DELETE /myimages/1 DELETE /myimages/1.xml
[ { "docid": "0e0a39a4c4f32dcf3373c74a09606c7b", "score": "0.0", "text": "def destroy\n @sharedimage = Sharedimage.get(params[:id])\n ext_name_up = File.extname(@sharedimage.image_filename_encoded)\n filename = @sharedimage.image_filename_encoded.gsub(ext_name_up,\"\")\n \n if ext_name_up =...
[ { "docid": "e33f242b37af43369183ed6142762c65", "score": "0.7528143", "text": "def destroy\n @image = Image.find(params[:id])\n @image.destroy\n @image.delete_img(@image.name)\n \n respond_to do |format|\n format.html { redirect_to(images_url) }\n format.xml { head :ok }\n en...
10707b0c0a10db7d995ec3c8b84f7d6d
Returns a specific commando mode transition
[ { "docid": "8a4e185785808f3bb991da59fa6ecb5c", "score": "0.52320474", "text": "def get_commandomodes_transitions_token_with_http_info(token, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: CommandoModesApi.get_commandomodes_transitions_token ...'\...
[ { "docid": "15b64e18677bd5c2a0c9d9aba648597f", "score": "0.6606827", "text": "def mode_transitions\n case @mode\n when START_MODE\n facing, _ = facing_node\n if facing\n @route.pop if @route[-1] == @start_node\n @target_node = @route.pop\n @target = cre...
a2099a77c85e91272ae2f9e35b937953
Only allow a trusted parameter "white list" through.
[ { "docid": "2d5ebc0c30a8c75a2edd52352f5c3ee9", "score": "0.0", "text": "def ingredient_nutrient_params\n params.require(:ingredient_nutrient).permit(:nutrient_id, :ingredient_id)\n end", "title": "" } ]
[ { "docid": "c1f317213d917a1e3cfa584197f82e6c", "score": "0.7120904", "text": "def allowed_params\n ALLOWED_PARAMS\n end", "title": "" }, { "docid": "b32229655ba2c32ebe754084ef912a1a", "score": "0.70538116", "text": "def expected_permitted_parameter_names; end", "title": "...
c657de4b70d266e9a3a784b999ea9e60
Never trust parameters from the scary internet, only allow the white list through.
[ { "docid": "e09df09de90e8e67fdbd6fe0083857c5", "score": "0.0", "text": "def catergory_params\n params.require(:catergory).permit(:name)\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...
5dbb0e18d2c5257212fe38d6390a3a6c
iterates through all fight instances of Fight.all and grabs the attributes to display each fight details to the user.
[ { "docid": "0d80f63e0f3cf590fc87c6f2f31c12f0", "score": "0.63054687", "text": "def scheduled_fight_details\n number_of_fights.each_with_index do|fight, index|\n puts \"----------------------------\".red + \"#{\"BOXING SCHEDULES\".blue}\" + \"------------------------------------------------\".red...
[ { "docid": "abd2b96ef7e6e5e3b313175397e51729", "score": "0.6554812", "text": "def index\n @fighters = Fighter.all\n end", "title": "" }, { "docid": "abd2b96ef7e6e5e3b313175397e51729", "score": "0.6554812", "text": "def index\n @fighters = Fighter.all\n end", "title": "" ...
18e960eb463db932a7e572b1d4e899c9
The path used after resending confirmation instructions.
[ { "docid": "18d94b2fe120ea728cc494c4f54bd3ae", "score": "0.6264584", "text": "def after_resending_confirmation_instructions_path_for(resource_name)\n new_session_path(resource_name) if is_navigational_format?\n end", "title": "" } ]
[ { "docid": "56661b07f279a36775c40d0b91c31aac", "score": "0.65103084", "text": "def after_resending_confirmation_instructions_path_for(resource_name)\n root_path\n end", "title": "" }, { "docid": "44f5577107f85d6abdaf5394fe67b6a9", "score": "0.6509975", "text": "def after_resendin...
ad7fe88297ee91ae1f33bb35aa32e609
% initialize : () > []
[ { "docid": "30db4e5d165a6098d1aeb8f8dd7b66e8", "score": "0.7607796", "text": "def initialize() end", "title": "" } ]
[ { "docid": "8e3629bb42b471c640e3e1bd665bf3b2", "score": "0.7818684", "text": "def initialize(*) end", "title": "" }, { "docid": "8e3629bb42b471c640e3e1bd665bf3b2", "score": "0.7818684", "text": "def initialize(*) end", "title": "" }, { "docid": "8e3629bb42b471c640e3e1bd66...
1ceede8d4ce33aba61431789e318624b
GET /appointments/1 GET /appointments/1.json
[ { "docid": "a81945373733e4951b987de6ea99f9a1", "score": "0.0", "text": "def show\n end", "title": "" } ]
[ { "docid": "e79442243806cc9cfd997bd0d24c7367", "score": "0.79667956", "text": "def list_appointments\n json_response(Appointment.all)\n end", "title": "" }, { "docid": "9e3c5e9516b143477b08d415a9896db7", "score": "0.7787401", "text": "def index\n @appointments = @client.appoin...
5f05dc1ba1194b058b2fa27bc051edcf
POST /playerprofiles POST /playerprofiles.json
[ { "docid": "abb7babe23f04cc8df0a2ecaadb7d9a9", "score": "0.61467826", "text": "def create\n \n @playerprofile = current_user.playerprofile.build(params[:playerprofile])\n #@playerprofile = Playerprofile.where( :user_id => current_user.id).first\n @playerprofile.name=current_user.username\n @playerp...
[ { "docid": "0359467b214c4cb3d6adfc08f6ff2471", "score": "0.72870684", "text": "def create\n @user = User.find(params[:user_id])\n @player_profile = PlayerProfile.new(player_profile_params)\n respond_to do |format|\n if @player_profile.save\n @user.update(player_profile: @player_prof...
6c5343b5db9869342bae15a42fc29fda
Public: Determines if the SubscriptionPlan has at least one Subscription. Returns a Boolean.
[ { "docid": "d68832a7a3855dbd3c47ac1ce6d7df6c", "score": "0.7592596", "text": "def has_subscriptions?\n subscriptions.any?\n end", "title": "" } ]
[ { "docid": "442cd0286c85505d744f4b529528408e", "score": "0.7785593", "text": "def has_subscription?\n if self.subscription.nil?\n return false\n else \n return true\n end\n end", "title": "" }, { "docid": "f44a87dc4d1c2bbbb847ee425dee6d9c", "score": "0.75096303", ...
f74c29bdfc4a183e1ec1b91334cd5be2
Use callbacks to share common setup or constraints between actions.
[ { "docid": "da140bff456d9701a1fb40fda5ef6acd", "score": "0.0", "text": "def set_hao\n @hao = Hao.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;...
81cae9baacc864bf90a39662a4b6516f
temporarily moves defender's pieces to try to block check
[ { "docid": "658ab15256bb55b42d0d9e1e60a8a3ee", "score": "0.0", "text": "def play_out_move(poss_move, player)\n player.new_spot = poss_move\n return unless player.valid_spot?\n player.move\n attack(player)\n end", "title": "" } ]
[ { "docid": "7fe279bc7f1fb0d2487acbb369f19c08", "score": "0.6211523", "text": "def run\n move\n check_must_attack\n end", "title": "" }, { "docid": "2822517852bde9387cf6ae8764b139e5", "score": "0.6060493", "text": "def greyout_blockers\n cut_behind(@selectable_region).each d...
123a6eac48cf3fe7731fdfed3ec0d706
=begin def self.find(args) if args.length == 1 Response.find_by_id(args.first) changed find_by_map_id to find_by_id else super end end =end =begin def self.find_by_id(args) Response.find_by_id(args.first) changed find_by_map_id to find_by_id end =end
[ { "docid": "abb602006db3b3fb23c097f61a24dcac", "score": "0.0", "text": "def response\n self\n end", "title": "" } ]
[ { "docid": "65ca3e864411273782c5bf1c42ccf1e3", "score": "0.7540901", "text": "def find(id)\n\nend", "title": "" }, { "docid": "ff9ea5765451fe5c64260579b843c6f7", "score": "0.7457782", "text": "def find(id); end", "title": "" }, { "docid": "ff9ea5765451fe5c64260579b843c6f7...
85edd37fac07067a30c438e2a1b2374e
Set the value of the GlobalID input for this Choreo.
[ { "docid": "b0b29abe6c11bbcd91db122eb29af1dc", "score": "0.7564284", "text": "def set_GlobalID(value)\n set_input(\"GlobalID\", value)\n end", "title": "" } ]
[ { "docid": "3307e8bda195fb717fb19eb35834ce74", "score": "0.67061085", "text": "def set_global\n @global = Global.find(params[:id])\n end", "title": "" }, { "docid": "3307e8bda195fb717fb19eb35834ce74", "score": "0.67061085", "text": "def set_global\n @global = Global.find...
0b4f51773ef4a7ad154f7dd530f303b0
Returns the centroid of a bounding box
[ { "docid": "a11ecc80c433eaa495feea236cf86696", "score": "0.7070238", "text": "def bbox_centroid(left_btm, right_top)\n haversine_midpoint(*left_btm, *right_top)\n end", "title": "" } ]
[ { "docid": "1e924da5bff7d5e2eacb7974ac4a7620", "score": "0.77792686", "text": "def centroid\n @centroid = @geometry.centroid unless @centroid\n @centroid\n end", "title": "" }, { "docid": "7ec62b3354d6a43ba2ed3ef7277818c9", "score": "0.7579035", "text": "def centroid\n ...
3d803923c23a20977d596eb809ce3464
Return our full name
[ { "docid": "3935cb6327727fecb619314747115fd6", "score": "0.0", "text": "def full_name\n res = @in_class.full_name\n res << \"::\" unless res.empty?\n res << @name\n end", "title": "" } ]
[ { "docid": "5aeaf32d637775c1fa7570c1b3d9ac88", "score": "0.89645165", "text": "def full_name\n name\n end", "title": "" }, { "docid": "5aeaf32d637775c1fa7570c1b3d9ac88", "score": "0.89645165", "text": "def full_name\n name\n end", "title": "" }, { "docid":...
3acf5f6e98fe662bc560f96f8ac7f660
convert hash to form needed by cfn sdk
[ { "docid": "a6ae0af0443f9994b312546ffd7aac62", "score": "0.0", "text": "def cfn_tags_array\n @_cfn_tags_array ||= cfn_tags&.map { |k, v|\n { key: k, value: v }\n }\n end", "title": "" } ]
[ { "docid": "62c0dac855cee08f79414c831f996aee", "score": "0.7302457", "text": "def normalize_hash(hash) hash end", "title": "" }, { "docid": "62c0dac855cee08f79414c831f996aee", "score": "0.7302457", "text": "def normalize_hash(hash) hash end", "title": "" }, { "docid": "6d...
5347b243c69f9a4f14dae9a3dae839f5
Performs the _sslverification_ command.
[ { "docid": "87c24c1b352ed9f36f75881e21713a25", "score": "0.6616285", "text": "def perform\n unless arguments.empty?\n raise ArgumentError,\n \"wrong number of arguments (#{arguments.length} for 0)\"\n end\n\n will_or_not = HTTY::Preferences.current.verify_certificates? ?\n ...
[ { "docid": "0ea6613dbf1e77ebf2fa4de9438ebb49", "score": "0.76246595", "text": "def ssl_verification=(_arg0); end", "title": "" }, { "docid": "d4814ffef7685e62fae8da6ddb63a69d", "score": "0.76181614", "text": "def ssl_verification; end", "title": "" }, { "docid": "402bc13f...
f74c29bdfc4a183e1ec1b91334cd5be2
Use callbacks to share common setup or constraints between actions.
[ { "docid": "c9a3560ecae5a846aac6367e408cf361", "score": "0.0", "text": "def set_presence\n @presence = Presence.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...
3496f50433103c4ef47d18b1808c6f75
DELETE /competencia/1 DELETE /competencia/1.json
[ { "docid": "8700348b2c8e81717d61bf6c7fbcd43d", "score": "0.7269687", "text": "def destroy\n @competencium.destroy\n respond_to do |format|\n format.html { redirect_to competencia_url, notice: 'Competencium was successfully destroyed.' }\n format.json { head :no_content }\n end\n end"...
[ { "docid": "36641f85900fdeacd592614a2b5a426d", "score": "0.730827", "text": "def destroy\n @composante = Composante.find(params[:id])\n @composante.destroy\n\n respond_to do |format|\n format.html { redirect_to composantes_url }\n format.json { head :no_content }\n end\n end", ...
36626c23c31df4a6d41812fd971d12ed
GET /works GET /works.json
[ { "docid": "afcd958329d271ca7f9f850ce26e92b0", "score": "0.0", "text": "def index\n if params[:company_id].present?\n @company = Company.find(params[:company_id])\n @works = @company.works\n # render 'show_with_edit'\n elsif params[:user_id].present?\n @user = User.find(params[...
[ { "docid": "207dabf2ebe89596203bf35acf67d2f0", "score": "0.79646677", "text": "def index\n @works = Work.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @works }\n end\n end", "title": "" }, { "docid": "207dabf2ebe89596203bf35acf...
637d2793998b04f902b63f609fef3321
def desert_option user_goal puts "" anim('As you approach the pyramid, you push on the heavy metal door and make your way inside. You spot a door on the other side of the room with the intent to head towards it. Right as you are taking the first step, you realize the middle of the room is littered with traps. You decid...
[ { "docid": "78e6d7c048cb7777944b7b437833532d", "score": "0.80965954", "text": "def lake_option user_goal\n anim('You stumble upon a foggy lake and progress towards a dock where before you sits a lonely boat. Do you choose to ride the boat across the lake, or swim?')\n lake_path = gets.chomp.downca...
[ { "docid": "f7684aa83cef54c891a11e871cd50eb2", "score": "0.7356326", "text": "def entrance\n puts \"You are standing alone on a road and there is an intersection.\"\n puts \"There are paths going left, right, and straight on.\"\n puts \"Which path would you like to take?\"\n\n print \"> \"\n...
a2099a77c85e91272ae2f9e35b937953
Only allow a trusted parameter "white list" through.
[ { "docid": "44a80470b86abf47982a0f2d088d13ac", "score": "0.0", "text": "def alternative_answer_params\n params.require(:alternative_answer).permit(:text, :alternative_question_id, :survey_id, :email)\n end", "title": "" } ]
[ { "docid": "3663f9efd3f3bbf73f4830949ab0522b", "score": "0.7943618", "text": "def whitelisted_params\n super\n end", "title": "" }, { "docid": "f6060519cb0c56a439976f0c978690db", "score": "0.69572574", "text": "def permitted_params\n params.permit!\n end", "title"...
c061d9988b4f77e38e8d5179b7acdeca
Colors Print strings in the console with style
[ { "docid": "1b76745e45e2ffe0d35b2471d3420462", "score": "0.7214002", "text": "def red; colorize(self, \"\\e[1m\\e[31m\"); end", "title": "" } ]
[ { "docid": "e63d2068a7e932092bd710bbf7532a9c", "score": "0.8027682", "text": "def puts_blue(string)\n puts \"\\033[34m\" + string + \"\\033[0m\"\nend", "title": "" }, { "docid": "9ffd3c01203689bab165dc4cf85926f2", "score": "0.7808393", "text": "def red(text)\n puts \"\\033[0;31;4...
a9a636a099e6ef24c3a7679282a81cfa
Validate that the date is not earlier than the previous trip
[ { "docid": "157e4dfce0ffd4e2d6ea5ba375dd77a5", "score": "0.8397991", "text": "def later_than_last_trip\n # don't run this validation if other validations have failed\n return unless errors.blank?\n unless self.first_trip?\n if last_trip.date > date\n errors.add(:date, \"Date cannot ...
[ { "docid": "0e2f39c0b921d80acca4cb9ec45bc553", "score": "0.7292052", "text": "def pickup_date_time_cannot_be_past\n arrival_date_time = (date.to_s + \" \" + arrival_time.to_s).to_datetime\n if pickup_time.present? && pickup_time.strftime('%Y%m%dT%H%M') < arrival_date_time.strftime('%Y%m%dT%H%M')\n...
cfacd9b07915755ba85559a2781a85c3
Return a DATE_TIME value representing the last second of the month containing the receiver
[ { "docid": "399ff0737d2ed7e8956ec32f103604bc", "score": "0.59262097", "text": "def end_of_month\n change(:day => days_in_month, :hour => 23, :min => 59, :sec => 59)\n end", "title": "" } ]
[ { "docid": "fbf683081eccd94969e3f7e6bf718185", "score": "0.7052748", "text": "def end_of_last_month\n now= Time.now\n dd= Date.new now.year, now.month\n dd-1\n end", "title": "" }, { "docid": "39c0371ca48fb81a96682d849269bced", "score": "0.6826726", "text": "def last_month;...
efd62885e75ed45686a696da6c40c6ea
The subapp list may only be of size 1 and actually contains this app. This returns true if there are indeed sub apps that that differ from this object.
[ { "docid": "4fe2de288b0a69e844e416d585ba8d02", "score": "0.780824", "text": "def has_sub_apps?\n if batch_connect_app?\n sub_app_list.size > 1 || sub_app_list[0] != batch_connect\n else\n false\n end\n end", "title": "" } ]
[ { "docid": "b193c0199c3c124ea327bba338f3085c", "score": "0.66880965", "text": "def sub_app_list\n if batch_connect.sub_app_list.size == 1\n batch_connect.sub_app_list\n else\n batch_connect.sub_app_list.select { |app| app.sub_app == sub_app_name }\n end\n end", "title": "" }, ...
c8cee821ec5ce27c1c3d8e9cfeb8796e
Extract a hash pair with a given literal key.
[ { "docid": "4d723221e6d2dc82abcdfc0c6396721a", "score": "0.6951166", "text": "def extract_hash_pair(node, key)\n node.children.detect do |child|\n next unless child.type == :pair\n\n key_node = child.children[0]\n %i[sym str].include?(key_node.type) && key_node.children[0].to_s...
[ { "docid": "fa0f0a45afdd20bc38c078e3187465ee", "score": "0.71540886", "text": "def extract_hash_pair(node, key); end", "title": "" }, { "docid": "c472dfd6b0b40e364cc7c07a69bd811a", "score": "0.6673146", "text": "def extract_hash_tag(key)\n s = key.index('{')\n\n ret...
3bf54f33f1170001bb29d7a2242d45b8
Retrives palettes as an array of hashes, same options as all but ordered by dateCreated
[ { "docid": "fb6a664196e90f68ffaed8aa6b1cbe2e", "score": "0.0", "text": "def new(options) \n Client.get(\"/palettes/new\", :query => options)\n end", "title": "" } ]
[ { "docid": "e039fab7efca72c4796bd857606e5cda", "score": "0.57349867", "text": "def index\n @palettes = Palette.all\n end", "title": "" }, { "docid": "232cca3a544a67e7b471cfa14126f78a", "score": "0.56953293", "text": "def get_palettes( template )\n\n Rails.logger.info 'part...
44dbc3a9844fce86000de0a397377a6e
POST /plans POST /plans.json
[ { "docid": "0c5c9619fff27b5e91f425563d1c2715", "score": "0.0", "text": "def create\n @plan = @book.plans.new(plan_params)\n if plan_params[:reference_id] != \"\"\n @reference_plan = Plan.find_by_id(plan_params[:reference_id]) \n end\n\n respond_to do |format|\n ...
[ { "docid": "f853bc95a50a1f388ebadd3f2d500b9c", "score": "0.77876526", "text": "def create_plan(options = {})\n build_response(make_request(:post, url: 'plans', options: options))\n end", "title": "" }, { "docid": "bfa94849d3292c0021b711bc7f8dacc3", "score": "0.7672708", "text...
718829dcfd723058de4555b441a1b3a9
UpdateItemModifierLists Updates the [CatalogModifierList](typecatalogmodifierlist) objects that apply to the targeted [CatalogItem](typecatalogitem) without having to perform an upsert on the entire item.
[ { "docid": "54c7e54246f76f208bfcd2cbadb61676", "score": "0.8257509", "text": "def update_item_modifier_lists(body, opts = {})\n data, _status_code, _headers = update_item_modifier_lists_with_http_info(body, opts)\n return data\n end", "title": "" } ]
[ { "docid": "500978e99f15f01401227274ea970500", "score": "0.67542267", "text": "def update_item_modifier_lists_with_http_info(body, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: CatalogApi.update_item_modifier_lists ...\"\n end\n # ver...
f74c29bdfc4a183e1ec1b91334cd5be2
Use callbacks to share common setup or constraints between actions.
[ { "docid": "10acf767211b20ad40a58680a5c36dee", "score": "0.0", "text": "def set_team\n @team = Team.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...
84ab34899611f54f0d5d37d6adae6f04
Some actions need this variable in the view
[ { "docid": "b35bf2de13bf72953cdb91174bb38a71", "score": "0.0", "text": "def load_user\n @user = current_user\n end", "title": "" } ]
[ { "docid": "c5d23a1d8161e7d7adcc240789013bd6", "score": "0.6784486", "text": "def view_context; end", "title": "" }, { "docid": "b8f955b5cceda4a0dbcfb22aaa2863fb", "score": "0.65569633", "text": "def view_assigns; end", "title": "" }, { "docid": "628f8b9b755e0677baad9c0ea...
fbd0da5d25bbbc6b96ff4b142187f9ca
Get the OSW path
[ { "docid": "490ba37337838fea441ba8aada3536c9", "score": "0.88284445", "text": "def osw_path\n @osw_abs_path\n end", "title": "" } ]
[ { "docid": "b3a921e41f3270f03960e36c90830f8d", "score": "0.8149696", "text": "def osw_dir\n File.dirname(@osw_abs_path)\n end", "title": "" }, { "docid": "b3a921e41f3270f03960e36c90830f8d", "score": "0.8149696", "text": "def osw_dir\n File.dirname(@osw_abs_pa...
af207246b2665ebdd74ed39c9225c2cb
check if a user is active
[ { "docid": "4cb1fb21c3b626d6668cb70f91df3fb6", "score": "0.0", "text": "def active_for_authentication?\n super && active?\n end", "title": "" } ]
[ { "docid": "d15915e312a9f7ab2065d8e7a0c3521d", "score": "0.8354176", "text": "def user_status_active?\n return self.status==\"Active\" ? true : false\n end", "title": "" }, { "docid": "ad199a8e674bd89827a4cdae60557690", "score": "0.83374625", "text": "def active?\n # active\n ...
19b91323bce5b771e74704d578b6b7e2
returns the last nonempty column in a sheet
[ { "docid": "629a8e170777734178ffa28acedd25ca", "score": "0.78729254", "text": "def last_column(sheet=nil)\n sheet = @default_sheet unless sheet\n unless @last_column[sheet]\n sheet_no = sheets.index(sheet) + 1\n @first_row[sheet], @last_row[sheet], @first_column[sheet], @last_column[shee...
[ { "docid": "5384eb2b26d04ec2f1ecf55f06ee32fc", "score": "0.85415244", "text": "def last_column(sheet = nil)\n sheet_for(sheet).last_column\n end", "title": "" }, { "docid": "38b8dabba3b3530fade0da7f49d51b33", "score": "0.8461398", "text": "def last_column(sheet=nil)\n shee...
38312c09364ab3f3aad3a4fd38dc6574
GET /stats GET /stats.json
[ { "docid": "aa217487bd0b8768202c4786a1110510", "score": "0.7096539", "text": "def index\n @stats = Stat.all\n end", "title": "" } ]
[ { "docid": "4522cf8448c0d86dd1697fdbb6d7ec22", "score": "0.8496457", "text": "def stats\n request :get, \"_stats\"\n end", "title": "" }, { "docid": "4522cf8448c0d86dd1697fdbb6d7ec22", "score": "0.8496457", "text": "def stats\n request :get, \"_stats\"\n end", "ti...
f36a3f5b893d89778b7a63e759b95029
Administrator change User from buyer to seller A corriger
[ { "docid": "de19f2b524d2fdf8f30da428239dcc38", "score": "0.7181489", "text": "def user_to_seller\n @user = User.find(params[:id])\n if @user.client?\n @user.seller!\n end\n redirect_to :admindashboard if @user.save\nend", "title": "" } ]
[ { "docid": "f20c80eb7216bc32297b01870fa13c42", "score": "0.7005963", "text": "def set_user\n @seller = User.find(params[:id])\n end", "title": "" }, { "docid": "1c9dbed821a0d8b067046754f27152e2", "score": "0.6984504", "text": "def set_admin_user\n #@user = User.find(para...
3ce35a22fbd9401d268a5d08c2c8d1a7
PUT /historial_odcs/1 PUT /historial_odcs/1.json
[ { "docid": "5fd47626cab4dac5d1f311f2752aa464", "score": "0.7588087", "text": "def update\n @historial_odc = HistorialOdc.find(params[:id])\n\n respond_to do |format|\n if @historial_odc.update_attributes(params[:historial_odc])\n format.html { redirect_to @historial_odc, notice: 'Histo...
[ { "docid": "7ecfb6a10cb05cdbce35618bca165a94", "score": "0.6763134", "text": "def update\n @historial_oct = HistorialOct.find(params[:id])\n\n respond_to do |format|\n if @historial_oct.update_attributes(params[:historial_oct])\n format.html { redirect_to @historial_oct, notice: 'Histo...
abf3c7a9952abc180e98145b775586b4
DEPRECATED: this will break if 0 is deleted
[ { "docid": "39c52f7edf410e2521e489176c36f10f", "score": "0.0", "text": "def first? #:nodoc:\r\n\t\tsequence == 1\r\n\tend", "title": "" } ]
[ { "docid": "3b25dc23ee0f403e8c8d2d7ab1aebb54", "score": "0.7308368", "text": "def delete0()\r\n end", "title": "" }, { "docid": "c4bc1f8990a2aad9af3df03ab2ecbad7", "score": "0.6827117", "text": "def delete0()\r\n not_implemented\r\n end", "title": "" }, { "docid": "1...
e65b92380a9e898ca9c7e148950b66cf
Destroy the descendants of this document
[ { "docid": "d165454fef96516f18d1017689bddada", "score": "0.7586915", "text": "def destroy_descendants\n return if self.descendants.empty?\n tree_search_class.destroy(self.descendants.map(&:_id))\n end", "title": "" } ]
[ { "docid": "79874ec829d3ee50b4dbf20f24326a16", "score": "0.71434736", "text": "def clean_document!\n self.questions.destroy_all\n self.comments.destroy_all\n self.timeline_events().each{|event| event.destroy}\n self.document_items.each{|item| item.timeline_events.destroy_all}\n end", "t...
9cd7a9daa00ff1f6fc445708f261a312
Workaround: Affecting Ruby 2.2 Fix for 2.2 is at However, this doesn't work with 2.1. The following should work for both:
[ { "docid": "7cf2091e94b32a5ae7520a4d934b1293", "score": "0.0", "text": "def start(&block)\n @shutdown_pipe = IO.pipe\n shutdown_pipe = @shutdown_pipe\n super(&block)\n end", "title": "" } ]
[ { "docid": "a35a3749fdeb2db1a1a68be381549b20", "score": "0.6057062", "text": "def with_repl_like_sigint; end", "title": "" }, { "docid": "ed463e2299a9d20771e81c540c211a04", "score": "0.57946366", "text": "def process_fix\n super\n end", "title": "" }, { "docid": "...
e5406b3f9aa70dd04d606822f8a6bd50
Returns framework environment (i.e. "production", or "staging")
[ { "docid": "8311f824e0dd8b8a9794d3f7df2a1df8", "score": "0.8015503", "text": "def framework_env\n @environment['framework_env']\n end", "title": "" } ]
[ { "docid": "fe63c103a33e8538522a319688df7d0d", "score": "0.8624485", "text": "def environment\n return 'Local' if Rails.env.development?\n\n hostname = `hostname -s`\n return 'Development' if hostname =~ /dev$/\n return 'Staging' if hostname =~ /stage$/\n\n # Otherwise returns n...
b32463bbabbc5f8f7d998b88e1ae2620
Recursively counts how many controls are in this form.
[ { "docid": "a24e6248eaa33039cb5e6ff311fd810c", "score": "0.71175057", "text": "def control_counts(control_group = self.data[:controls])\n control_counts = Hash.new(0)\n return control_counts unless control_group\n control_group.each do |control|\n control_counts[control[\"type\"]] += 1\n ...
[ { "docid": "8bf82fc92332007050bcebceab44da3b", "score": "0.64262116", "text": "def num_fields\n @form_fields.size\n end", "title": "" }, { "docid": "7b2be78ddafc7b72ba27d4a839fe8fd5", "score": "0.6383824", "text": "def count\n @children.count\n end", "title": "" }, ...
af630984682f1a0b5a68e6092af0d102
Update properties of this object
[ { "docid": "9816e4e64f868ccdfc4490d572ad9d77", "score": "0.0", "text": "def update!(**args)\n @boolean_rule = args[:boolean_rule] if args.key?(:boolean_rule)\n @gradient_rule = args[:gradient_rule] if args.key?(:gradient_rule)\n @ranges = args[:ranges] if args.key?(:ranges)\n ...
[ { "docid": "184b1b1ed771473d3eb9f338c0734c38", "score": "0.73066413", "text": "def update *args\n opts = args.extract_options!\n fill_properties opts\n self.save\n end", "title": "" }, { "docid": "5076c5a88404ae72986f958710f5687a", "score": "0.72631145", "text": "def update...
9094411bdb52c7f574811a016deb8c5b
Print all odd numbers from 1 to 99, inclusive. All numbers should be printed on separate lines. Input N/A Output odd numbers 199 on separate lines Data string Algo: > get range 199 > iterate thru range > if num % 2 == 1 > puts num
[ { "docid": "d0a5611f61d01802d48889fd46728137", "score": "0.8342714", "text": "def print_odd\n range = (1..99).to_a\n range.each do |num|\n if num % 2 == 1\n puts num\n end\n end\nend", "title": "" } ]
[ { "docid": "4f233fdc2f201df9b6669a1e05124ea3", "score": "0.7973838", "text": "def print_odd\n (1..99).each do |num|\n if num.odd?\n puts num\n end\n end\nend", "title": "" }, { "docid": "b5df5f74a53918a50b913125edd06421", "score": "0.76553434", "text": "def odd_numbers()...
3858b37b85d4050dd6003acec43953fa
GET /codvendas GET /codvendas.json
[ { "docid": "972737288acadd9346e290cdbad68a33", "score": "0.71261704", "text": "def index\n @codvendas = Codvenda.all\n end", "title": "" } ]
[ { "docid": "077966d3de37664d53058552b7ed102e", "score": "0.66243184", "text": "def index\n @antecedentes = Antecedente.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @antecedentes }\n end\n end", "title": "" }, { "docid": "e655e...
1451196990f47534c599192e08c484c2
Provide a default URL as a default if there hasn't been a file uploaded:
[ { "docid": "222f38049c8884a6cee18f9be593e519", "score": "0.7092646", "text": "def default_url\n if default_img_name = model.imageable.try(:default_img_name)\n ActionController::Base.helpers.asset_path(\"defaults/#{version_name}_#{default_img_name}\")\n end\n end", "title": "" } ]
[ { "docid": "b60fd9da936d3a3a2ede5b89d2cb78a3", "score": "0.8193984", "text": "def default_url\n '/no_file'\n end", "title": "" }, { "docid": "7e0c7efbe20c579ceeafc492e36148cb", "score": "0.74905765", "text": "def default_url\n ''\n end", "title": "" }, { "docid": ...
0845a4f3fbf341b70c6caa7fe3048504
Used to join users into a meeting. Most of the work is done in before filters. Can be called via GET or POST and accepts parameters both in the POST data and URL.
[ { "docid": "3cb11d3f79cea887fdaae41cbbdb571a", "score": "0.6354361", "text": "def join\n join_internal(@user_name, @user_role, @user_id)\n end", "title": "" } ]
[ { "docid": "90482581fe503fb8ac17383b7fee4bfa", "score": "0.7035012", "text": "def join_meeting(meeting_id, user_name, password)\n send_api_request(:join, {:meetingID=>meeting_id, :password=>password,\n :fullName=>user_name, :redirectImmediately=>0} )\n doc.root.get_text('/response/ent...
946f53c38cf76d1fe7389da4f84c03ef
GET /gupiaos/new GET /gupiaos/new.json
[ { "docid": "11c91d7affd8691e4baf84cf29c7bdf7", "score": "0.7472105", "text": "def new\n @gupiao = Gupiao.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @gupiao }\n end\n end", "title": "" } ]
[ { "docid": "510bfbd829e61af6bd1b6ca37c85bb79", "score": "0.74077654", "text": "def new\n @genotipagem = Genotipagem.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @genotipagem }\n end\n end", "title": "" }, { "docid": "a4f8057aa65...
116f23f05fd8ae61e427f3658525b3e3
Returns an object that represents the given port on the remote task context. The returned object is either an InputPort or an OutputPort Raises NotFound if no such port exists. Ports can also be accessed by calling directly the relevant method on the task context: task.port("myPort") is equivalent to task.myPort
[ { "docid": "ef76d74dd42ac7f72e7431cf32f50dc2", "score": "0.0", "text": "def port(name, verify = true)\n name = name.to_str\n CORBA.refine_exceptions(self) do\n if @ports[name]\n if !verify || has_port?(name) # Check that this port is still valid\n ...
[ { "docid": "3bf1f2d00af6c42ee53445805077e9c2", "score": "0.68174696", "text": "def [](port)\n port_mapping = port_mappings[port]\n return nil if port_mapping.nil?\n port_number = port_mapping[:number]\n case port_mapping[:type]\n when :input\n inputs[port_numb...
9fe727d224bdc9bcd0882a3a03916506
before_filter :ensure_group_member belongs_to :motion def begin_of_association_chain
[ { "docid": "205131be94b2e4b40a9f52e8a2d2e39f", "score": "0.0", "text": "def destroy\n resource\n if @motion.voting?\n destroy! { @motion.discussion }\n else\n flash[:error] = \"The proposal has closed. You can no longer modify your posiiton.\"\n redirect_to @motion.discussion\n ...
[ { "docid": "6cd56e9be6397b9a23ff28844a5c43cc", "score": "0.6810299", "text": "def begin_of_association_chain\n nil\n end", "title": "" }, { "docid": "d20a10355a387b22328d23b33d24e42a", "score": "0.6673275", "text": "def begin_of_association_chain\n unless current_user....
2d746dee65cb6066061bdc07f08b5926
PUT /post434s/1 PUT /post434s/1.xml
[ { "docid": "fd6871a3bba1decd167181703eeaa5a0", "score": "0.6005289", "text": "def update\n @post434 = Post434.find(params[:id])\n\n respond_to do |format|\n if @post434.update_attributes(params[:post434])\n format.html { redirect_to(@post434, :notice => 'Post434 was successfully update...
[ { "docid": "38979984bdedacd95706689e25f09f9e", "score": "0.66851765", "text": "def put(document, method='')\n @resource[method].put(document.to_s, :content_type => 'text/xml')\n end", "title": "" }, { "docid": "9ddf960eb3f437e62b9b99d34992bc0f", "score": "0.6512014", "text": ...
d88463e8a42e6a9f860a6c72a344e050
Print out the sentence
[ { "docid": "9863c0dc9c629ace75b6b85b365e9a0e", "score": "0.0", "text": "def to_s\n\t\treturn self.words.join(\" \")\n\tend", "title": "" } ]
[ { "docid": "77e8d86a57a26273dd992b77c4ecd7ac", "score": "0.72701484", "text": "def show_word\n puts \"\\nWord: \" + cyan + bold + word_as_dashes + \"\\n\\n\"\n solved?\n end", "title": "" }, { "docid": "78a39b346d89191a8bd0bb0688656ae6", "score": "0.72265625", "text": "def out...
0115298748603631a688327fbc99e5a3
Delete the specified component
[ { "docid": "661d20eb003272fcbceaee1ce822553a", "score": "0.789638", "text": "def delete_component(opts)\n delete_workflow(opts)\nend", "title": "" } ]
[ { "docid": "a78141e503643a3d05fe769cd8d5f2b4", "score": "0.8672886", "text": "def delete(component)\n Backlogjp.base._command \"deleteComponent\", Container.get_id(component)\n end", "title": "" }, { "docid": "506b7eb27a52595db725f464b095ed24", "score": "0.8134579", "text...
0e75a83ea8a6bd4f209620ea729585b4
rubocop:disable Metrics/MethodLength rubocop:disable Metrics/AbcSize
[ { "docid": "a73dc35df172768955e436e72fb18b9f", "score": "0.0", "text": "def display_board(brd, player_score, computer_score)\n system 'clear'\n prompt_msg(\"You are #{PLAYER_MARKER}. Computer is #{COMPUTER_MARKER}\")\n prompt_msg(\"Win #{ROUNDS_TO_WIN} matches to win the game!\")\n prompt_msg(\"Scor...
[ { "docid": "33e1db3c06643dd523dcc31fccf3a005", "score": "0.64725196", "text": "def used; end", "title": "" }, { "docid": "33e1db3c06643dd523dcc31fccf3a005", "score": "0.64725196", "text": "def used; end", "title": "" }, { "docid": "b6b2bcc0062aeb115edab7b10cbe6930", "...
e18e4c7169b4398e36f97b5ec1cfaeae
DELETE /auto24h_fold_changes/1 DELETE /auto24h_fold_changes/1.xml
[ { "docid": "75c2e291cbf649d442bdaa7966f6dd6e", "score": "0.73450756", "text": "def destroy\n @auto24h_fold_change = Auto24hFoldChange.find(params[:id])\n @auto24h_fold_change.destroy\n\n respond_to do |format|\n format.html { redirect_to(auto24h_fold_changes_url) }\n format.xml { hea...
[ { "docid": "b21f3f87d3a773c9fac3db6617c56108", "score": "0.74281186", "text": "def destroy\n @auto1h_fold_change = Auto1hFoldChange.find(params[:id])\n @auto1h_fold_change.destroy\n\n respond_to do |format|\n format.html { redirect_to(auto1h_fold_changes_url) }\n format.xml { head :o...
45cffcd6bfeef27d0bb32f6b6640cbc1
Sets leading and trailing quotes
[ { "docid": "6b3863bd368141ef1e91bdc09e69a95c", "score": "0.67190677", "text": "def set_quotes(value)\n if value.class.to_s == \"String\"\n if value.delete(\" \").start_with?(\"{\") || value.delete(\" \").start_with?(\"[\")\n value\n else\n \"\\\"#{value}\\\"\"\n end\n ...
[ { "docid": "6c3d17d58a0f1798d7dfd8898bc63956", "score": "0.67445093", "text": "def setQuoteString(flag = true)\n @chain.setQuoteString(flag) if(@chain) ;\n @quoteString = flag ;\n end", "title": "" }, { "docid": "1e418d8f19428881d886b55d2bf0726a", "score": "0.6709982", "...
41b7bb7206dbdfd697943b7bcc15c016
rescue_from Kibali::AccessDenied do |e| render :text => 'AccessDenied' end protected
[ { "docid": "2f04869fcadc6b5189637f3fba38f6bc", "score": "0.0", "text": "def set_current_user\n if params[:user].blank?\n self.my_current_user = nil\n else\n self.my_current_user = User.find params[:user]\n end\n end", "title": "" } ]
[ { "docid": "05b41dc6f0ea5de638effd37c8422c1d", "score": "0.7338408", "text": "def access_denied\n render \"common/access_denied\"\n end", "title": "" }, { "docid": "ee88ae6cb2c35769b489c98ddb105ba7", "score": "0.72527504", "text": "def access_denied\n render status: 401, text:...
11de2732738b18d0b9ad89cf50d5015b
Sets board element of move index to respective player's token
[ { "docid": "97e2db62a74731baec8d986a045b77bd", "score": "0.8641832", "text": "def move(move_index, player_token = \"X\")\r\n @board[move_index] = player_token\r\n end", "title": "" } ]
[ { "docid": "a59114590ad2946c2b43eef9b53e2a3c", "score": "0.89151615", "text": "def move (board, index, token)\n #token = current_player(board)\n board[index] = token\nend", "title": "" }, { "docid": "dfcb13904575284f771ce6da260fcd17", "score": "0.87792635", "text": "def move(board_...
e078d2540ad484db6a59abd478814e65
Determines if the current line represents a keyword/value pair
[ { "docid": "6a62d7291b3b27bcb7c5c9ac65b7025f", "score": "0.5724239", "text": "def keyword_present\n\n\t\t# Prepare result\n\t\tblock_parse_result = false\n\t\n\t\t# Iterate through all keywords\n\t\t@@keywords.each do |keyword|\n\t\t\n\t\t\t# Initialize overrides, none by default\n\t\t\tkeyword_override...
[ { "docid": "f48543989382db8011d7eb041ac91ae8", "score": "0.6535332", "text": "def is_interesting?(a_line)\n a_downcased_line = a_line\n is_interesting = false\n $key_words.each do |a_word|\n is_interesting ||= a_downcased_line.include?(a_word)\n break if is_interesting\n end\n return is_...
b5e8921b739d7ded831d5a433a455373
An Example helper function In you test case, you can use login_as("homer", "Password") login_as("bart") the password will be default to 'TestWise' login("lisa") same as login_as def login_as(username, password = "TestWise") enter_text("username", username) enter_text("password", password) click_link("Login") end alias ...
[ { "docid": "79fc4c79df14251c32b8c86772239383", "score": "0.0", "text": "def browser_type\n if $TESTWISE_BROWSER then\n $TESTWISE_BROWSER.downcase.to_sym\n elsif ENV[\"BROWSER\"]\n ENV[\"BROWSER\"].downcase.to_sym \n else\n :chrome\n end\n end", "title": "" } ]
[ { "docid": "7c6a16e48c9e52192ceb171fd3a59ff4", "score": "0.86774695", "text": "def login_as(username, password = \"agileway\")\n enter_text(\"userName\", username)\n enter_text(\"password\", password)\n click_button_with_image(\"btn_signin\")\n end", "title": "" }, { "docid": "09a6...
8cd4df98ccb0ecf81797c7759d6f8232
Access an Cell by indices.
[ { "docid": "1dc694cb7693d475b46a10df5c68f85d", "score": "0.5986959", "text": "def cell( row, col )\n Cell.new( self, indices_to_address( row, col ) )\n end", "title": "" } ]
[ { "docid": "c6534b5c7ccd85c1a7899e4004fff62d", "score": "0.707181", "text": "def cell(row_index, column_index)\n row(row_index).cell(column_index)\n end", "title": "" }, { "docid": "4303af7fd9ccbc75591bcb95b333274c", "score": "0.69572854", "text": "def [](row, column)\n ...
6e490ef915002e7b8f5f1952673703cb
Apply macros and filters to +text+.
[ { "docid": "aececce3560b48595ab02aa4d450d202", "score": "0.85773784", "text": "def process_text text\n @filter.process(Blogitr.expand_macros(@filter, text))\n end", "title": "" } ]
[ { "docid": "eede983d98129eb384f0718314b48e4a", "score": "0.67197466", "text": "def compile_text(tmp)\n @prefilters.each do |f| \n tmp=f.run( tmp )\n end\n\n # compile to latex\n tmp=Kramdown::Document.new(tmp, @kramdown_opts).to_latex\n\n ...