query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
ee3c847c8344a85bf3dec783954f99f7 | Retourne tableau de toutes les urls des villes du Val d'Oise | [
{
"docid": "b3b95751895410144de7a5b5a1d69982",
"score": "0.5996608",
"text": "def get_url_cities_array(page)\r\n url_cities_array = []\r\n urls = page.xpath('//*[@class=\"lientxt\"]/@href') \r\n urls.each do |url|\r\n url_cities_array << (\"https://www.annuaire-des-mairies.com\" + url.text[1..-1])... | [
{
"docid": "4da90c9caa384ba2f4c0ea77769cee58",
"score": "0.7252358",
"text": "def urls\n info.map(&:value).select { |u| u.match %r{\\Ahttps?://} }\n end",
"title": ""
},
{
"docid": "f2fb02f09546b8781d87764b0722c2cf",
"score": "0.6635073",
"text": "def urls_of_val_doise_to... |
406f14dfdb2d764c5c5f654114331414 | Adds one or more users to a group | [
{
"docid": "a14f9c1716d3b7d2046be907d3856133",
"score": "0.8001947",
"text": "def add_to_group(group_id, users)\n url = \"/groups/#{group_id}/members\"\n body = {\n members: users\n }\n post(url, body)\n end",
"title": ""
}
] | [
{
"docid": "8e7b5584daa44141614a277edffa50b4",
"score": "0.8322765",
"text": "def add_to_group\n # byebug\n add_group_id = user_group_params[1]\n new_members = user_group_params[0]\n\n new_members.each do |member|\n new_group = UserGroup.new(user_id: member, group_... |
5ff0330248531b4a84dca9d6f9bd5388 | helper method for checking input: used in check_input_guesser and creator | [
{
"docid": "b191de0cac6a0047227d574b2c655bfd",
"score": "0.0",
"text": "def check_inside_Colors (string)\n Colors.include?(string)\n end",
"title": ""
}
] | [
{
"docid": "ea9ad9c8182127645130e164887bbf03",
"score": "0.7511185",
"text": "def validate_input input\r\n\t\t\t\t\t\t\tif @console\r\n\t\t (input.match(/\\A[[:alpha:][:blank:]]+\\z/) || (check_enter input)) && (input.size < 2)\r\n\t\t else\r\n\t\t ... |
1be7b28ee871eecc4b403849b907106c | Returns the separator we should use when creating property names for nested properties. | [
{
"docid": "afab212d700e0a575cabac1745a895ca",
"score": "0.7637688",
"text": "def property_separator\n version_object.property_separator\n end",
"title": ""
}
] | [
{
"docid": "50237231dc64c471004f2797d23576c0",
"score": "0.729207",
"text": "def separator\n \":\"\n end",
"title": ""
},
{
"docid": "28626f4c14420e236da4cdf4cb52d538",
"score": "0.7131549",
"text": "def default_separator; end",
"title": ""
},
{
"docid": "aac24661... |
631d6095ad65cbab69421fd2195fc382 | Sets start_date on the given date or the next working day and changes due_date to keep the same working duration. | [
{
"docid": "9c1bb7f1e5dacd04545d22b36c063808",
"score": "0.8070265",
"text": "def reschedule_on(date)\n wd = working_duration\n date = next_working_date(date)\n self.start_date = date\n self.due_date = add_working_days(date, wd)\n end",
"title": ""
}
] | [
{
"docid": "58d96aca78b8da8c88d8049852a055a2",
"score": "0.7511895",
"text": "def set_start_date(date)\n if date >= Date.today \n @start_date = date\n fix_due_date\n cart_reservations.update_all({start_date: @start_date, due_date: @due_date})\n end\n end",
"title": ""
},
{
... |
79da8d3abbe4d4f53fc72d3d9c8bee73 | Optional after visibility: 15.6.2 | [
{
"docid": "3c0e89c1fe2fa5716610bb7ad1894ffd",
"score": "0.0",
"text": "def seek_minimum_visibility\n minimum_visibility = Visibility.parse(@chunks[0])\n if minimum_visibility\n @chunks.shift\n @minimum_visibility = minimum_visibility\n end\n minimum_visibility!\n en... | [
{
"docid": "a4dd180a6e42ef8fc72894499b74efd3",
"score": "0.6816706",
"text": "def visible?; end",
"title": ""
},
{
"docid": "e752a7f6f88808c746673cbba1830fc4",
"score": "0.6798704",
"text": "def possibly_include_hidden?; end",
"title": ""
},
{
"docid": "d75a67b080cd2616ad... |
e11ba66c9c1abdd38306286acfdfb8bd | Cancel a 'sent' request: | [
{
"docid": "df9956494fa70b2bae9d779462b71cae",
"score": "0.7492469",
"text": "def cancel_each(&callback)\n if @state != :sent\n raise MTik::Error.new(\n \"Method MTik::Request#cancel() called with state '#{@state}' \" +\n \"(should only call when state is :sent)\"\n )\n end... | [
{
"docid": "673ccf336ac03367e075dcb9c074b38c",
"score": "0.8553523",
"text": "def cancel_request\n @cancelled = true\n end",
"title": ""
},
{
"docid": "f578b5226ddcc911ea341529b2fd52f6",
"score": "0.80369824",
"text": "def cancel!\n update(request_cancelled: true)\n end",... |
e5d4010b9e28a51a1eb2f128d858a9b3 | Return absolute path to public cached copy. | [
{
"docid": "592bf03db51c61e0a436295dfa7b04bc",
"score": "0.6604074",
"text": "def path\n @public_path ||= if Rails.env.test?\n \"#{Rails.root}/tmp/site/#{relative_path}\"\n else\n \"#{Rails.root}/public/#{relative_path}\"\n ... | [
{
"docid": "8088167f67885803d9f1765a2ab3f929",
"score": "0.78687936",
"text": "def cache_path\n root.join(self[\"cache_path\"])\n end",
"title": ""
},
{
"docid": "819bce1f7a6ba90da55fca8bca90b91f",
"score": "0.7623674",
"text": "def cache_path() = @cache_path ||= owner.cache_... |
db8104a0ca19dde2aee7cd015846ff5d | Para obtener las noticias aprobadas pero que no han sido publicadas | [
{
"docid": "f8149df06922392b58df60b74ae267d7",
"score": "0.0",
"text": "def not_published\n @reports = Report.where(:published => false, :approved => true)\n\n respond_to do |format|\n format.html\n end\n end",
"title": ""
}
] | [
{
"docid": "3e58cfc56326b76a2e36a55a5de37b82",
"score": "0.6768166",
"text": "def list_without_gifts_email; end",
"title": ""
},
{
"docid": "1d2a3b61b207b52909a96e19f81639e2",
"score": "0.591828",
"text": "def pending_invites\n list = []\n pending_contacts.links(:class=>\"s3d-b... |
d4d77ce3c4d4ef5d7c794e82a5bd2999 | Obtains an instance of the Connection Administrator to control all existing connections. Due to the use of a singleton in the administrator, the same created instance will be obtain, or will be created if an instance doesn't exist. It also establish the strategy to be use acording to the specified by the user. An Excep... | [
{
"docid": "fd8cb086580c5164dfb06fd311622357",
"score": "0.0",
"text": "def initialize(sendtype,location= 'config_sms.yml')\n begin\n @adm = AdmConnection.instance\n @location=location\n @sendtype=sendtype\n @report = 0\n @smsc = nil\n @validity = '0'\n ... | [
{
"docid": "00ce47005705324f32f8684eadd2cbd5",
"score": "0.5975938",
"text": "def connect_to_admin\n # Find the first admin created.\n # The uninitiated should Google \"tom myspace\".\n tom = Person.find_first_admin\n unless tom.nil? or tom == self\n Connection.connect(self, t... |
d67b9a0bf18993860b8dc22e91f2a170 | Delete a named cookie with specified path and domain. Be careful; to delete a cookie, you need to delete it using the exact same path and domain that were used to create the cookie. If the path is wrong, or the domain is wrong, the cookie simply won't be deleted. Also note that specifying a domain that isn't a subset o... | [
{
"docid": "f6d6f0417f2f4ed0d114a751f9a8b82d",
"score": "0.6911598",
"text": "def delete_cookie(name, options=\"\")\n if options.kind_of? Hash\n\t\t ordered_keys = options.keys.sort {|a,b| a.to_s <=> b.to_s }\n\t\t options = ordered_keys.collect {|key| \"#{key}=#{options[key]}\" }.join(... | [
{
"docid": "d6eaa10743ee9ba9501225b464952e06",
"score": "0.76609194",
"text": "def delete(name, options = {})\n cookie = @_cookies.delete(name)\n options = Mash.new(options)\n options[:expires] = Time.at(0)\n\n if domain = options[:domain] || Merb::Controller._session_cookie_domain\n... |
c5aa0475276efc65b927beed874a0ea4 | Called on file(s) modifications | [
{
"docid": "1886aab6448dd411f3b349b9c0f62a0a",
"score": "0.0",
"text": "def run_on_changes(paths)\n restart\n end",
"title": ""
}
] | [
{
"docid": "3c34ec1a4a4cb794af9ca10b7bf1d75d",
"score": "0.77923226",
"text": "def modifyfile\n @modified = Time.now\n end",
"title": ""
},
{
"docid": "a867dadb40ae0c4b8416d057fc1a9441",
"score": "0.69852823",
"text": "def file_modified\n end",
"title": ""
},
{
"do... |
5cd2444a1c0dc8cbb7acf352450c6f86 | 3. Computer marks a square. | [
{
"docid": "8b6b43c68b4d5415e72bb448dc5f6956",
"score": "0.0",
"text": "def find_at_risk_square(line, brd, marker)\n if brd.values_at(*line).count(marker) == 2\n brd.select { |k, v| line.include?(k) && v == INITIAL_MARKER }.keys.first\n else\n nil\n end\nend",
"title": ""
}
] | [
{
"docid": "15e1ec29c5317212340293ef67ca0732",
"score": "0.7117819",
"text": "def mark symbol, row, column \r\n \traise \"Square #{row}, #{column} is already taken.\" if marked? row, column\r\n @grid[row][column] = symbol\r\n end",
"title": ""
},
{
"docid": "06ac2a456dcb885e1009a811e247... |
c5b401ec34c06d386a01c1250aa73af1 | Generate random header for request | [
{
"docid": "18076a427d8f5a43b5680d0dd8dcd523",
"score": "0.89871234",
"text": "def random_header\n HttpHeader.random\n end",
"title": ""
}
] | [
{
"docid": "111cb38505a46f5b5e7f1437f7ab79cd",
"score": "0.7452656",
"text": "def random_headers\r\n rndheader = {}\r\n languages = [ \"de-DE,en;q=0.5\", \"en-us,en;q=0.5\", \"en\", \"zh, en-us; q=0.6\" ]\r\n rel_pages = get_site_pages()\r\n\r\n rndheader[\"User-Agent\"] ... |
c794232bed7659f46ef72b953b278a0f | GET /admin/conf Show global conf params HTML | [
{
"docid": "c7490d479f6062e8b71e3762cd7f3b14",
"score": "0.0",
"text": "def index\n #\n end",
"title": ""
}
] | [
{
"docid": "43a3422ce42c97495c083a5dd9cb65ef",
"score": "0.7317322",
"text": "def config\n client.get('/admin/getConfig')\n end",
"title": ""
},
{
"docid": "20359eb243c5001a2088b61ddac57c94",
"score": "0.71529454",
"text": "def config\n get('/_config')\n end",
"ti... |
3e40c74fb0c468a72955768e5e9573e4 | Update a &39;workflow.SolutionInstance&39; resource. | [
{
"docid": "bc3cf856bca88d36393162fdcdde8c01",
"score": "0.6522764",
"text": "def update_workflow_solution_instance_with_http_info(moid, workflow_solution_instance, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: WorkflowApi.update_workflow_soluti... | [
{
"docid": "10b122bae65d6a3154aa825d51e25e77",
"score": "0.6770345",
"text": "def update_instance(instance_id, instance_resource)\n \n raise BadResource.new, \"Provide lock_version for update/delete operations\" if !instance_resource['lock_version']\n \n instance = Instance.find(instance_id)... |
eea922f0a3860c3944fec83074fd8e51 | DELETE /favoritepizzas/1 DELETE /favoritepizzas/1.json | [
{
"docid": "a89efa93334132a0e203ccf5537dd6ee",
"score": "0.7575817",
"text": "def destroy\n @favoritepizza.destroy\n respond_to do |format|\n format.html { redirect_to favoritepizzas_url }\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "a0bf419a8a7d5c723418f91ca2ccd1b1",
"score": "0.7329959",
"text": "def destroy\n @favorite = Favorite.find(params[:id])\n @favorite.destroy\n\n respond_to do |format|\n format.html { redirect_to favorites_url }\n format.json { head :no_content }\n end\n end",
"title... |
9edaa51ccafab65a7b4b82768a260905 | =begin prints a hash or a string having json contents =end | [
{
"docid": "211c8a91c7e78e2b153738eca959a2f0",
"score": "0.7113",
"text": "def puts__json_pretty args\n args = containerize args\n puts json_string__pretty *args\n end",
"title": ""
}
] | [
{
"docid": "bb67d9691f65594b6800ec56b5e40f44",
"score": "0.7241187",
"text": "def pretty(arg)\n return puts arg if arg.instance_of?(String)\n puts JSON.pretty_generate(arg)\nend",
"title": ""
},
{
"docid": "0cd5576a680ba10adadec800fa6ec52d",
"score": "0.723946",
"text": "def print_... |
38ff65d81764b443805134618b209af5 | This will inject indifferent access into an instance of a hash without modifying the actual class. This is what allows IndifferentAccess to spread to subhashes. source://hashie//lib/hashie/extensions/indifferent_access.rb59 | [
{
"docid": "3ba5fbce6e0978cf2aa2bb5e20331759",
"score": "0.0",
"text": "def inject!(hash); end",
"title": ""
}
] | [
{
"docid": "5a31b8ed67340606ffb5bce9d31c763b",
"score": "0.8027443",
"text": "def with_indifferent_access(hash)\n hash = indifferent_hash.merge(hash)\n hash.each do |key, value|\n if value.is_a?(Hash)\n hash[key] = with_indifferent_access(value)\n end\n ... |
18cf25d7a4d78b18d249ee17ec772e9b | A recursive method for getting a schema out of full_reference (see get_schema) | [
{
"docid": "6b27bc606230057d230c26001b587abc",
"score": "0.6297",
"text": "def get_schema_recursive(attribute_names, arel_table, data, schema, path, total_level)\n raise \"Nested too deep\" if total_level > 100\n\n attribute_names.each do |key|\n new_path = path + [key... | [
{
"docid": "4ad926d4343e33797f51e8f584c22af2",
"score": "0.6859117",
"text": "def full_schema\n \"#{namespace}.#{schema}\"\n end",
"title": ""
},
{
"docid": "54e7a2812e1766f184039b22d1c8b4ea",
"score": "0.6571792",
"text": "def refs(ref, prefix = '')\n idx = ref.ri... |
ce81aaf73f0e833f752399e2f695e92d | Lazily created instance of the Transport implementation specified in the bootstrap definition. | [
{
"docid": "c95c36557c543f10fe9432032c5bbe46",
"score": "0.68300873",
"text": "def transport\n @transport ||= definition.transport_class.new(ui, transport_options)\n end",
"title": ""
}
] | [
{
"docid": "20788d42dc47c8ef5a8d6131d3e99cbb",
"score": "0.725004",
"text": "def transport(_protocol)\n Class.new do\n attr_reader :provided_features\n def initialize(features)\n @provided_features = features\n end\n end.new(transport_features)\n ... |
415a77f7eca8fb2f5082f0ad35246552 | Return the text from an XML node in the response | [
{
"docid": "e4e79deb1984ee4311851bd06bf3900f",
"score": "0.0",
"text": "def fetch(key)\n raise \"Node #{key} was not found\" if @body.root.elements[\"#{key}\"].nil?\n @body.root.elements[\"#{key}\"]\n end",
"title": ""
}
] | [
{
"docid": "ea4b28cbf91429088c346c6c840650cf",
"score": "0.73593426",
"text": "def get_response_value(doc)\n doc.root.elements[\"//response/message\"].text.strip\n end",
"title": ""
},
{
"docid": "067583a4bd436fd8eda975f351c2c74c",
"score": "0.72798914",
"text": "def value\n ... |
7e6c51176c08fb8c92a4f223f447b292 | PUT /galleries/path/to/the/file.png :id is original file name overwite it with the uploaded file add it to or remove it from .hiddenimages if necessary | [
{
"docid": "46a91eece72303a106c54f338b0187e7",
"score": "0.67496634",
"text": "def update\n if File.exists?(@path)\n # some REST clients don't let you specify the name of the parameter, so just dig for it\n file = params.values.detect{|v|v.is_a?(IO) || v.is_a?(ActionDispatch::Http::Uploaded... | [
{
"docid": "260a1ebae5dc87706f91b9b988c65220",
"score": "0.6595437",
"text": "def edit_image\n @image = Image.find(params[\"id\"])\n @folder_name = @image.folder.name\n end",
"title": ""
},
{
"docid": "6f9972a5563f86a9c4011787c7d17f9a",
"score": "0.65488553",
"text": "def upda... |
c71f5d9f30e611a797915281e225cd4a | Invokes the method named +method+ with the parameters given by +args+ on the XMLRPC server. The +method+ parameter is converted into a String and should be a valid XMLRPC methodname. Each parameter of +args+ must be of one of the following types, where Hash, Struct and Array can contain any of these listed _types_: Fix... | [
{
"docid": "2feec7bbaa3442568056cc4460f226ad",
"score": "0.50892824",
"text": "def call(method, *args)\n ok, param = call2(method, *args)\n if ok\n param\n else\n raise param\n end\n end",
"title": ""
}
] | [
{
"docid": "369c90993c8af46e0fa9aa74ab5f0566",
"score": "0.70027006",
"text": "def invoke(method, *args)\n Limeade.logger.debug \"invoke(#{method}, #{args.inspect})\"\n request_id = make_id\n post_data = ::MultiJson.encode({\n 'jsonrpc' => JSON_RPC_... |
f7011572fd5212f989f7bc85c7e0341f | Gets the aaGuid property value. Authenticator Attestation GUID, an identifier that indicates the type (e.g. make and model) of the authenticator. | [
{
"docid": "8d1763f76314270903c5d2a491cd3b67",
"score": "0.8223951",
"text": "def aa_guid\n return @aa_guid\n end",
"title": ""
}
] | [
{
"docid": "16d9c02ad7543d075e9eab9440d15c94",
"score": "0.7405025",
"text": "def aa_guid=(value)\n @aa_guid = value\n end",
"title": ""
},
{
"docid": "02a611e9ee051c51d8b2ac5cdac2a85f",
"score": "0.6328696",
"text": "def uuid\n attributes['va_eauth_u... |
1ad8f6594e5a3b2982ca7df34cf5d320 | show_slide method called from ajax call | [
{
"docid": "9604fa3a78e45872f549200003acf726",
"score": "0.7402426",
"text": "def show_slide\n @slideshow = session[:slideshow]\n session[:slide_index] += 1\n @slide = @slideshow.slides[session[:slide_index]]\n if @slide == nil\n session[:slide_index] = 0\n @slide = @slideshow.slid... | [
{
"docid": "35941544a60bab45fa43455bfee2b082",
"score": "0.7431819",
"text": "def show_slide\n @slide = @slideshow.slides[session[:slide_index]]\n session[:slide_index] += 1\n if @slide.nil?\n session[:slide_index] = 0\n @slide = @slideshow.slides[0]\n end\n render partial: \"sh... |
4925c390a4fb334589dc25995d88d4b3 | GET /families/:family_id/family_rotations/1 GET /families/:family_id/family_rotations/1.json | [
{
"docid": "848e5e455a084730e11c4ad385dfc0cb",
"score": "0.64884317",
"text": "def show\n @family = load_family\n @family_rotation = load_family_rotation\n\n respond_to do |format|\n format.html\n format.json\n end \n end",
"title": ""
}
] | [
{
"docid": "0adb73558df90a0820b912dca225556e",
"score": "0.6679788",
"text": "def load_family_rotation\n FamilyRotation.find(params[:id])\n end",
"title": ""
},
{
"docid": "300adf966a038bea541d1a348c8f8358",
"score": "0.5863696",
"text": "def show\n @rotation=current_user.... |
7f8291aba7d9aa74f09de45e35cd58c0 | PUT /nfl_games/1 PUT /nfl_games/1.json | [
{
"docid": "22d3a75cb3b1d068fa8562410120d38c",
"score": "0.72176296",
"text": "def update\n @nfl_game = NflGame.find(params[:id])\n\n respond_to do |format|\n if @nfl_game.update_attributes(params[:nfl_game])\n format.html { redirect_to @nfl_game, notice: 'Nfl game was successfully upd... | [
{
"docid": "5af53471ff55ef34c43a5f170769ad10",
"score": "0.7408894",
"text": "def update\n @game.update(game_params)\n render json: @game, status: 200\n end",
"title": ""
},
{
"docid": "0020299494d146ab5b4dcee4f1719c44",
"score": "0.71988314",
"text": "def update\n @game.up... |
8c7042b2f4e6282f9590482571704484 | and the same integer values in the same exact order | [
{
"docid": "fda7e759f1b17724539f9457cbe8f2d2",
"score": "0.0",
"text": "def array_equals(array1, array2)\n # unless\n # raise NotImplementedError,\n # end\n\n # if both are empty\n if (array1 == nil) && (array2 == nil)\n return true\n\n # if one is empty, one is not\n elsif (array1 == nil)... | [
{
"docid": "88870e9992037187ecfa9429a6f09388",
"score": "0.60132825",
"text": "def unique(integers)\r\n\r\n end",
"title": ""
},
{
"docid": "1715dc8be28d342ba2d4d377bd2731b9",
"score": "0.586295",
"text": "def same_values?(x,y)\n\t\t@bt[x,y] == @bt[x+1,y] and @bt[x,y] == @bt[x,y+1] ... |
7963b356aa56620eab33c565034eefaf | Configure the underlying mongocrypt_ctx_t object to accept AWS KMS options | [
{
"docid": "8dd2c45047c4651fd197ae0e9f067a89",
"score": "0.0",
"text": "def set_aws_master_key(master_key_opts)\n unless master_key_opts\n raise ArgumentError.new('The :master_key option cannot be nil')\n end\n\n unless master_key_opts.is_a?(Hash)\n raise ArgumentE... | [
{
"docid": "39a9a2637b64a1b7e20adacd0f289a54",
"score": "0.5853515",
"text": "def initialize_mongocrypt\n Binding.init(self)\n # There is currently no test for the error(?) code path\n end",
"title": ""
},
{
"docid": "5354a0cc5cba8a12685cd8e626079d72",
"score": "0.5606... |
9aa372f5906d1ac7801771caa3e44582 | def Method: start_cluster_member_on_port Starts an individual . This is called when the cluster first starts, and when a member dies and is elegible for restarting. Parameters: port the port number on which the cluster member should listen | [
{
"docid": "a6e8338ab6953bd21026f9b166b0323e",
"score": "0.87541986",
"text": "def start_cluster_member_on_port(port)\n log_message \"Starting subprocess listening on port #{port}.\"\n member_settings = @settings.merge(:port => port)\n @cluster_members[port] = ClusterMember.new(self, memb... | [
{
"docid": "6bd8e35fb99117bd36cf7bcb4ce3fbee",
"score": "0.72045195",
"text": "def start\n @should_keep_members_alive = true\n log_message \"Starting #{@size} subprocesses...\"\n @size.times { |i| start_cluster_member_on_port(@base_port + i + 1) }\n log_message \"Cluster started.\"\n... |
51789c57e59cc4806a8b254291475252 | Set the token value and expiration time. | [
{
"docid": "602a6b6b1f664b92c0311fe312bcccab",
"score": "0.7608199",
"text": "def set_token(token, token_expiration)\n validate_token_time(token_expiration)\n\n @token, @token_expiration = token, token_expiration.utc\n self.class.cache_token(self)\n end",
"title": ""
}
] | [
{
"docid": "b120f305ed7c8178fe25fd303a778bdc",
"score": "0.72390705",
"text": "def access_token=(value); end",
"title": ""
},
{
"docid": "4de37f4bed2a676aef258fe474dda5c4",
"score": "0.71435094",
"text": "def auth_token=(value); end",
"title": ""
},
{
"docid": "8943fbf4c9... |
6a31982f4ced748c1e27d68b301fe132 | GET /users/new GET /users/new.json | [
{
"docid": "16b153e8b62a5b173e5d9943e871599f",
"score": "0.0",
"text": "def new\n @user = User.new\n\n render :layout => \"empty\"\n end",
"title": ""
}
] | [
{
"docid": "10579c3d3cc989fec15a1ace9f9c505e",
"score": "0.8287397",
"text": "def new\n @newuser = Newuser.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @newuser }\n end\n end",
"title": ""
},
{
"docid": "4e4b24e3210b5e1807092741... |
e876d0bdf474b0f39ddd6ae5827bb94c | returns the :label set in field_options, or from_table_name+'_'+name. Unless you have table_alias specified, then label will return table_alias+'_'+name. The default label can exceed database limits, so use :label to override. | [
{
"docid": "b73c56e6c764fcf65793c4c2547ceafb",
"score": "0.8477968",
"text": "def label\r\n @label ? @label : \"#{table_alias || from_table_name}_#{name}\"\r\n end",
"title": ""
}
] | [
{
"docid": "349a8e8c2ad5d9aed29f8580fa2f8126",
"score": "0.7222599",
"text": "def label_field\n self.find_field(self.label_field_name) || self.fields.first\n end",
"title": ""
},
{
"docid": "f4cb3369f2341df710101e6e66d9e6a0",
"score": "0.71801573",
"text": "def _label... |
68fcfc0c57e648db635d07e2fcb858d1 | Scrapes latest version from macupdate.com and return results | [
{
"docid": "d294b4f8c07845260a7e4f6dbe625932",
"score": "0.0",
"text": "def scrape_data(page, options = {})\n options = {:refresh_icon => false}.merge(options)\n {:version => NullObject.Maybe(page.at_css(\"#appversinfo\")).text, :description => NullObject.Maybe(page.at_css(\"#desc\")).text.lstrip.... | [
{
"docid": "53f672f58705bf9eab6beaf74cac2c0e",
"score": "0.7096922",
"text": "def scrape_latest_version(new_web_id = false)\n if looks_good?\n # Load informational page from version tracker\n info_doc = Nokogiri::HTML(open(info_url))\n # In case our web site is malformed, let's catch t... |
8f29f66f644a58ebf638277aa7805dd4 | The alias, required by Ext.Component, e.g.: widget.helloworld | [
{
"docid": "35bca13dc71847dfc616544426b71dda",
"score": "0.6977627",
"text": "def class_alias\n [alias_prefix, xtype].join('.')\n end",
"title": ""
}
] | [
{
"docid": "7ee12659c42a254c5e132947e9d6308f",
"score": "0.7052107",
"text": "def alias_name; end",
"title": ""
},
{
"docid": "7ee12659c42a254c5e132947e9d6308f",
"score": "0.7052107",
"text": "def alias_name; end",
"title": ""
},
{
"docid": "07aa2d1e6f25ddf024b5725f787d6c... |
b52538e790404a3952d16608dab19ae7 | Build an array of characters that represent characters that exist somewhere in the incorrect word | [
{
"docid": "da20006060547d4bdea8ff16182f238f",
"score": "0.77742505",
"text": "def get_matching_chars(possible_word_chars, invalid_word_chars)\n matching_possible_word_chars = []\n possible_word_chars.each do |possible_char|\n if invalid_word_chars.include?(possible_char)\n matching_po... | [
{
"docid": "be825baf78db96b5e000507125d9de09",
"score": "0.6971516",
"text": "def strange_words(words)\n i = 0\n new_array = []\n new_string = \"\"\n\n while i < words.length\n\n \tnew_string = words[i]\n\n if (words[i].length < 6 ) && !(new_string[0] == \"e\") || (new_string[0] ==... |
665cae8a472b7e3f2854b9f39c9abe03 | Returns a partial SPARQL grammar for this operator. | [
{
"docid": "62917783f20736865d746bd88b99e164",
"score": "0.64040565",
"text": "def to_sparql(**options)\n \"(!\" + operands.first.to_sparql(**options) + \")\"\n end",
"title": ""
}
] | [
{
"docid": "c3116bb731da0b2b5e91e2a1af703173",
"score": "0.6321709",
"text": "def to_sparql(**options)\n '(' + operands.to_sparql(delimiter: '/', **options) + ')'\n end",
"title": ""
},
{
"docid": "87730006c2a6d7dda553e4ba92766a9f",
"score": "0.631144",
"text": "def to_sp... |
4d85db99a7b4542ea368c2195b64b969 | encoding: utf8 coding: utf8 | [
{
"docid": "675448e16830f0a2b19da6b4275beee3",
"score": "0.0",
"text": "def tfreq word, labellist\n @tfreq=0\n labellist.each do |doc|\n @tfreq+=doc[word] if doc.has_key?(word)\n end\n @tfreq\nend",
"title": ""
}
] | [
{
"docid": "ccd553193491f31e014672a6a4d79f85",
"score": "0.7413175",
"text": "def utf8\n self.encode('UTF-8', 'binary', :invalid => :replace, :undef => :replace, :replace => '?')\n end",
"title": ""
},
{
"docid": "d7bbb49334fc447ae11988e4ce2e3395",
"score": "0.73910403",
"text": ... |
4e5dc3b8cd249085a96da4c70957dfa7 | POST /ocharts POST /ocharts.json | [
{
"docid": "31561307164038be4bcec10daaed86ac",
"score": "0.72598666",
"text": "def create\n @ochart = Ochart.new(ochart_params)\n\n respond_to do |format|\n if @ochart.save\n format.html { redirect_to @ochart, notice: 'Ochart was successfully created.' }\n format.json { render a... | [
{
"docid": "5b94d8567d2628406f73d29649c752fd",
"score": "0.6974066",
"text": "def create\n @chart = Chart.new(chart_params)\n\n if @chart.save\n render json: @chart, status: :created, location: @chart\n else\n render json: @chart.errors, status: :unprocessable_entity\n end\n end",... |
2837ff7222af46edc636e6b874b3856c | initializes this RestLiteralNodeString with a json hash | [
{
"docid": "970e1ae09053095c9453255f9ee3ebce",
"score": "0.6554287",
"text": "def init_jaxb_json_hash(_o)\n super _o\n if !_o['literalValue'].nil?\n _oa = _o['literalValue']\n if(_oa.is_a? Hash)\n @literalValue = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) i... | [
{
"docid": "e39a15a8cf0ad5cb9220e8e49d69fd2f",
"score": "0.68011075",
"text": "def init_jaxb_json_hash(_o)\n @resourceId = String.from_json(_o['resourceId']) unless _o['resourceId'].nil?\n @resource = String.from_json(_o['resource']) unless _o['resource'].nil?\n end",
"title... |
4e7d335786602640f8b9ceff83203376 | Ensure website starts with | [
{
"docid": "5c90ccb659aaa36f21f22d91f63b0da6",
"score": "0.0",
"text": "def website=(site)\n if site =~ /^http:\\/\\/|^https:\\/\\//i\n self[:website] = site\n elsif site.present?\n self[:website] = \"http://#{site}\"\n end\n end",
"title": ""
}
] | [
{
"docid": "b8c7334602ffa2ed00e5d4139af37b2f",
"score": "0.66843426",
"text": "def site_sanitized\n if site.nil?\n return nil\n else\n if site.starts_with?('http://') || site.starts_with?('https://')\n return site\n else\n return 'http://' + site\n end\n end\n... |
9c66076b9d68d1dd09d40eae2a78f1eb | NOTE: perform is wrapped by other modules: Polling > Async > IntervalLoop > AsyncTraceWriter > TraceWriter WARNING: This method breaks the Liskov Substitution Principle TraceWriterperform is spec'd to return the result from the writer, whereas this method always returns nil. | [
{
"docid": "c02b83f1b975ba0165c563c22657628f",
"score": "0.0",
"text": "def perform(traces)\n super(traces).tap do |responses|\n loop_back_off! if responses.find(&:server_error?)\n end\n\n nil\n end",
"title": ""
}
] | [
{
"docid": "9f059f4d58b0923414861a3a0201244d",
"score": "0.5787529",
"text": "def handle\n write(*instrumenters)\n return last_result\n end",
"title": ""
},
{
"docid": "35bc036a2acde2182cd46de86e02e1dd",
"score": "0.56229454",
"text": "def write(trace)\n # Start w... |
7ebcd38af71590e671d772f452a26ae4 | The path used after sign up for inactive accounts. You need to overwrite this method in your own RegistrationsController. | [
{
"docid": "9d63f32bb307a2c3be02f6d7159a1ede",
"score": "0.0",
"text": "def after_inactive_sign_up_path_for(resource)\n scope = Devise::Mapping.find_scope!(resource)\n router_name = Devise.mappings[scope].router_name\n context = router_name ? send(router_name) : self\n context.respond_to?(:r... | [
{
"docid": "84d19c5e5b40f39006445602dfb9c739",
"score": "0.83210224",
"text": "def after_inactive_sign_up_path_for(_resource)\n super\n end",
"title": ""
},
{
"docid": "f12172c525a0720cbf1f243aa0910eae",
"score": "0.8212164",
"text": "def after_inactive_sign_up_path_for(_resource... |
072648c8986b163efd52a5980489056a | POST /users Creates a new user with the credentials from params | [
{
"docid": "b7779a1b718ac0b72f36ca7b338f68b4",
"score": "0.7583403",
"text": "def create\n @user = User.new(user_params)\n\n if @user.save\n render json: @user, status: 201\n else\n render json: @user.errors, status: 401\n end\n end",
"title": ""
}
] | [
{
"docid": "1ff8d97032e5ef3f2cfa03459366afee",
"score": "0.87021416",
"text": "def create_user(params = {})\n post('users', params)\n end",
"title": ""
},
{
"docid": "2e8b461c5cab3d74e421277d53e21a77",
"score": "0.8185498",
"text": "def create_user(params={name:random_str... |
19f1bcaa10a6c2ad8619e2ce637aa759 | def finish! self.update_attribute :is_finished, true program.enforce_max_episodes delete_cue_file end | [
{
"docid": "e2d273acaff8750964624ba21185a81a",
"score": "0.0",
"text": "def record_stream\n duration = (record_time * 60)\n Thread.new do \n system \"streamripper #{ENV['stream_url']} -A -l #{duration} -i -m 300 -a #{file_path}\"\n end\n\n self.update(:recording_file_name => file_path)\... | [
{
"docid": "2fa71f67c857eefd16abf835ac1216c5",
"score": "0.7026759",
"text": "def finish; end",
"title": ""
},
{
"docid": "2fa71f67c857eefd16abf835ac1216c5",
"score": "0.7026759",
"text": "def finish; end",
"title": ""
},
{
"docid": "2fa71f67c857eefd16abf835ac1216c5",
... |
ef82c6b36e13c7e7892d22b101c0eca9 | =begin Write a method that will take a short line of text, and print it within a box. print_in_box('To boldly go where no one has gone before.') ++ | | | To boldly go where no one has gone before. | | | ++ =end | [
{
"docid": "78be9e6eb7d6a5a703848a6f605cad88",
"score": "0.0",
"text": "def sub_char(input, char)\n input.gsub(/./, char)\nend",
"title": ""
}
] | [
{
"docid": "d659bc2c18eacbf8fd5754d779a6ff10",
"score": "0.7622015",
"text": "def print_in_box(text)\n whole_line = \"+-\" + \"-\" * text.length + \"-+\"\n empty_line = \"| \" + \" \" * text.length + \" |\"\n\n puts whole_line\n puts empty_line\n puts \"| \" + text + \" |\"\n puts empty_line\n pu... |
49bfe1695d6d855f93b018548b155aaa | The Add method should return the sum of the input when called with a multiple positive integer numbers up to 1000. | [
{
"docid": "337c57845c864b23b01a252b25156278",
"score": "0.0",
"text": "def test_Add_Should_ReturnSum_When_CalledWithTwoOrMoreIntegersWithCustomSeparatorDeclaration404\n # Arrange.\n @inputValue = '//[++][!!][##]\\n1001##1000'\n @expectedResult = 1000\n\n # Act.\n @act... | [
{
"docid": "8922b52992b7fc4494384f8720b929f3",
"score": "0.73099196",
"text": "def add(number)\n \n end",
"title": ""
},
{
"docid": "576a7399151404eb24e394217876afcc",
"score": "0.72269034",
"text": "def add(numbers)\n\tnumbers.inject(:+)\nend",
"title": ""
},
{
... |
beb71975a285860c639b85f7e8651090 | Sort by publish date in reverse order | [
{
"docid": "1e84c1fe752a9d0130a89c13e7bdecd4",
"score": "0.60801625",
"text": "def <=> (rhs)\n rhs.published_at <=> published_at\n end",
"title": ""
}
] | [
{
"docid": "7cfd539ccc3a2030aa7a1462efd7001b",
"score": "0.70605433",
"text": "def sorted_articles\n require 'time'\n articles.sort_by do |a|\n attribute_to_time(a[:created_at])\n end.reverse\n end",
"title": ""
},
{
"docid": "7087cad84b37558d66512d064ee01c5c",
"... |
cd083a0edf182d596efb8f374ed43db7 | Tint properties are ignored when using images so we must test them separately | [
{
"docid": "39253547427018794472602abb7a73b1",
"score": "0.0",
"text": "def ui_progress_view_images(st)\n st.progress_image = image.resource('logo')\n st.track_image = image.resource('logo')\n end",
"title": ""
}
] | [
{
"docid": "a06ca9f186cfceac553c44e78aeb3ec9",
"score": "0.59010965",
"text": "def test_set_bg_color\n end",
"title": ""
},
{
"docid": "9ad734d975e9dad9cb51858996519498",
"score": "0.5888395",
"text": "def test_valid_colour\n @small_bitmap.paint_pixel(1, 1, 'A')\n end",
"tit... |
b919fdaa663a43d09a3b6720bf07f39a | Loads a CAPTCHA raw content encoded in base64 from options. | [
{
"docid": "9d337934e015681ded9c2b3d66088555",
"score": "0.74756306",
"text": "def load_captcha(options)\n if options[:body64]\n options[:body64]\n elsif options[:body]\n Base64.encode64(options[:body])\n elsif options[:file]\n Base64.encode64(options[:file].read)\n ... | [
{
"docid": "a3f1f612ccc3d676b15ea915a8d0bf81",
"score": "0.7283626",
"text": "def load_captcha(options)\n if options[:raw64]\n options[:raw64]\n elsif options[:raw]\n Base64.encode64(options[:raw])\n elsif options[:file]\n Base64.encode64(options[:file].read)\n e... |
6f4d263dc92ff7129f372c2c2933009e | Shows an error message because you have no data. | [
{
"docid": "ef92375a6b76087e5d45c515ef799346",
"score": "0.0",
"text": "def draw_no_data\n @d.fill = @font_color\n @d.font = @font if @font\n @d.stroke('transparent')\n @d.font_weight = NormalWeight\n @d.pointsize = scale_fontsize(80)\n @d.gravity = CenterGravity\n @d ... | [
{
"docid": "d5a905152a3a48b3f37b0283701a2c43",
"score": "0.7005097",
"text": "def display_error_message(message)\n message.present? ? message : 'No Records Found.'\n end",
"title": ""
},
{
"docid": "6f222afff1c74c86d1d105c526e1a665",
"score": "0.65419173",
"text": "def render_rec... |
6c293e2aa9214ca3d66d616a82aba46a | verify users password to be correct on | [
{
"docid": "7e34a5da87ca372e272382e09ac386d9",
"score": "0.0",
"text": "def password_confirm?(password)\n self.password == unique_identifier(password)\n end",
"title": ""
}
] | [
{
"docid": "0b2a1f5cdf80387642e7782bb85dcfb0",
"score": "0.83090675",
"text": "def valid_password?(password); end",
"title": ""
},
{
"docid": "7d607543d64e6b71b170b70b5719c37c",
"score": "0.8036519",
"text": "def validate_user_pass(_username, _password)\n end",
"title": ... |
34e9ff2adf66c46f57dc104727363613 | Get the variable instance from the variable name we have been provided, by searching for the variable name within the current set of variables for this form. | [
{
"docid": "25623fe3a8b9983fb71f19d8d8c8c0b4",
"score": "0.64635926",
"text": "def id_from_name(var_name)\n return unless var_name\n\n identified_by = identifiers.dup\n identified_by[:variable_name] = var_name\n identified_by[:owner] = identified_by.delete(self.class.owner_identifier... | [
{
"docid": "f174d295c620772c0f1cd73ad18b30e7",
"score": "0.75948805",
"text": "def find_var(name)\n variables[name.to_s]\n end",
"title": ""
},
{
"docid": "d9bb8613893c71922a66a078f501c7fd",
"score": "0.70298487",
"text": "def get_variable(name)\n # Ensure name is ... |
d82552845654e1cbc973a72533a43cb7 | Check if valid move? | [
{
"docid": "2b03ab77681ba764f598313ac65bfcce",
"score": "0.0",
"text": "def valid_move?(board, i)\n\n if board[i.to_i-1] == \"X\" || board[i.to_i-1] == \"O\" || i.to_i < 1 || i.to_i > 9\n\n valid = false\n\n else\n valid = true\n\n end\n\nend",
"title": ""
}
] | [
{
"docid": "4afe6e2aa8fb73a13a8885f993404d0e",
"score": "0.84788966",
"text": "def check_validmove\n unless self.piece.valid_move(self.current_position,self.previous_position) == true\n errors[:current_position] << \"Not a valid Move\"\n return false\n end \n end"... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "04ebcfe369634fc62531a34a8711c7b5",
"score": "0.0",
"text": "def set_tender\n @tender = Tender.find(params[:tender_id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.60315156",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.6018921",
"text": "de... |
d018eee186451eb6022335397851623a | POST /firewalls POST /firewalls.json | [
{
"docid": "c7c66f9dee17107b5a195d2c6bc9325d",
"score": "0.72197133",
"text": "def create\n @firewall = Firewall.new(firewall_params)\n\n respond_to do |format|\n if @firewall.save\n format.html { redirect_to firewalls_path, notice: '등록 되었습니다.' }\n format.json { render action: '... | [
{
"docid": "b9d8f2003f60d5b9f1219707eb0af7fe",
"score": "0.7309876",
"text": "def create\n @firewall = Firewall.new(firewall_params)\n\n respond_to do |format|\n if @firewall.save\n format.html { redirect_to @firewall, notice: 'Firewall was successfully created.' }\n format.json... |
2773b328434d516b4119ebfc44e759ca | Returns all items in the authority using preflabel_si to get exact match (string instead of token) | [
{
"docid": "50d774f0a2dca11c016a127d934bd96b",
"score": "0.4749527",
"text": "def all\n sort_order = 'preflabel_si asc'\n parse_authority_response(\n ActiveFedora::SolrService.get(\n \"inScheme_ssim:\\\"#{terms_id}\\\"\",\n fl: 'id,preflabel_tesim,definition_tesim,broa... | [
{
"docid": "d0dabe8f644ec7e7bae9b46eaced72c0",
"score": "0.5602379",
"text": "def find_resource_label_by_uri(uri)\n User.current_user.within {\n Tripod::SparqlClient::Query.select(\"\n SELECT DISTINCT ?label\n WHERE {\n { <#{uri}> <http://www.w3.org/2000/01/rdf-schema#labe... |
25393eb33226273edeff2128a2c22431 | GET /baz70s/1 or /baz70s/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "152509a510973eda04508f65c584a7d3",
"score": "0.60875106",
"text": "def get_index_by_gems_request(version, data = {}.to_json)\n get :index_by_gems, params: data, headers: {'Content-Type' => \"application/json\", 'Accept' => \"application/vnd.ink.#{version}\" }\nend",
"title": ""
},
{... |
18dead1fbf2a1563af25a550e7ce62d7 | return true if string start with consonant | [
{
"docid": "219b1129ca536c4fde63b2bf3efb8d75",
"score": "0.80129784",
"text": "def starts_with_consonant? s\n # if /^[^aeiou\\W]/i.match(s) == nil then false else true end\n /^[^aeiou\\W]/i.match(s)==nil ? false : true\n # !%w(a e i o u).include? s[0].downcase unless s.empty? or /^\\W/.match(s)\n \n... | [
{
"docid": "ca1216a92edbe2bddcfbc07ec414cd9f",
"score": "0.88301486",
"text": "def starts_with_consonant? s\n return false if s == ''\n return false if !s[0].match(/^[[:alpha:]]$/)\n s[0] =~ /[AaEeIiOoUu]/ ? false : true\nend",
"title": ""
},
{
"docid": "408f2311c07c7bb775112946b1bbd809",... |
0ca2e9412b1ea7bbb50ee6b1394875ca | Perform a click action on the element | [
{
"docid": "6a6ff29d469cb85f6209140493e2610d",
"score": "0.78314424",
"text": "def click\n adapter.click\n end",
"title": ""
}
] | [
{
"docid": "4b0aae1002bde61e9b20561383b8f1c3",
"score": "0.82346433",
"text": "def click\n perform_action\n end",
"title": ""
},
{
"docid": "eae76bd935bed647bf64a1deb1ac6ff2",
"score": "0.81985414",
"text": "def click_on(element)\n wait_for_element(element)\n el... |
24ceb7b893f7a5d560c7d42b0ed980d4 | PATCH/PUT /blood_receivers/1 PATCH/PUT /blood_receivers/1.json | [
{
"docid": "01e7b8111d7d18850acd6bd718e6f99f",
"score": "0.68594754",
"text": "def update\r\n respond_to do |format|\r\n if @blood_receiver.update(blood_receiver_params)\r\n format.html { redirect_to @blood_receiver, notice: 'Blood receiver was successfully updated.' }\r\n format.j... | [
{
"docid": "09a4af9c845a495246663eb533b0795e",
"score": "0.6214756",
"text": "def update\n @brother = Brother.find(params[:id])\n\n respond_to do |format|\n if @brother.update_attributes(params[:brother])\n format.html { redirect_to @brother, notice: 'Cadastro atualizado com sucesso.' ... |
36bcfa1fcc87cd1102dacff43103a015 | Read a 'storage.PureProtectionGroup' resource. | [
{
"docid": "1c89b7446d4d453dbc85140416fb9a35",
"score": "0.53465617",
"text": "def get_storage_pure_protection_group_by_moid(moid, opts = {})\n data, _status_code, _headers = get_storage_pure_protection_group_by_moid_with_http_info(moid, opts)\n data\n end",
"title": ""
}
] | [
{
"docid": "8e8292fb5b746e02afe0d58a3a6e6cc9",
"score": "0.60198176",
"text": "def get_storage_pure_protection_group_list(opts = {})\n data, _status_code, _headers = get_storage_pure_protection_group_list_with_http_info(opts)\n data\n end",
"title": ""
},
{
"docid": "eac972074e1... |
f97e6ffcb0da5be8ec07ba83cecd5936 | Get submit key to redirect, only [:create, :update] | [
{
"docid": "9ea1c1c5cb76d79890d898224e2658be",
"score": "0.0",
"text": "def redirect(object, commit)\n if commit.key?('_save')\n redirect_to([:admin, :travel, object], notice: actions_messages(object))\n elsif commit.key?('_add_other')\n redirect_to(\n send(\"n... | [
{
"docid": "ddff14762a381dfffcf2df0065984c2a",
"score": "0.6886258",
"text": "def submit_req\n params[:submit]\n end",
"title": ""
},
{
"docid": "96f64bb0dba1fee9e9d54c108be38c7e",
"score": "0.62227213",
"text": "def create\n redirect_to params[:key]\n end",
"title": ... |
eefb0945eaa2e4acb0d0de629d3751b7 | the same as the above 2 methods, just for errors. | [
{
"docid": "383b5f16f8f0ff4f2e933fdc5732da1b",
"score": "0.0",
"text": "def make_error_head( title='', head_adds='' )\n puts '<div class=\"error\"><h2>'+title+'</h2>'+head_adds\n end",
"title": ""
}
] | [
{
"docid": "89fd7859ed037d333f3d1b39cc5c119b",
"score": "0.7866768",
"text": "def error; end",
"title": ""
},
{
"docid": "89fd7859ed037d333f3d1b39cc5c119b",
"score": "0.7866768",
"text": "def error; end",
"title": ""
},
{
"docid": "89fd7859ed037d333f3d1b39cc5c119b",
"... |
28981b451cbe164419d7724d126f25df | GET /listens/1 GET /listens/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "9222a9a685bb6cf7c014c3d623f363e3",
"score": "0.6940147",
"text": "def index\n @listens = Listen.all\n end",
"title": ""
},
{
"docid": "769a6e0ea07292cb5714e6a90826d9da",
"score": "0.61166626",
"text": "def list\n get('/')\n end",
"title": ""
},
{
"... |
5db158c0b215b1a6e67df90b6f03abaa | Creates the pyramid image for IIP by running the configured system command. This automatically creates the file in the correct location (IIP root) | [
{
"docid": "5d4323b52a74ed0a70251940016e2ad8",
"score": "0.58839494",
"text": "def create_pyramid(source, destination, force = false)\n return if(File.exists?(destination) && !force)\n TaliaUtil::ImageConversions.create_pyramid(source, destination)\nend",
"title": ""
}
] | [
{
"docid": "df69348c1e459e4446417022bea791a4",
"score": "0.675547",
"text": "def create_pyramid(source)\n # check if file already exists\n raise(IOError, \"File already exists: #{get_iip_root_file_path}\") if(File.exists?(get_iip_root_file_path))\n \n prepare_for_pyramid\n\n ... |
8c7460cd4a8dde3f0bf2bb182744455c | These create and unset the fields required for remembering users between browser closes | [
{
"docid": "75729ace5927207fb8baa5fa92e0e6ad",
"score": "0.0",
"text": "def remember_me\n remember_me_for 2.weeks\nend",
"title": ""
}
] | [
{
"docid": "380889bc42b384abf9421d713cda3bd8",
"score": "0.6529151",
"text": "def forget\n update_attribute(:remember_hash, nil)\n end",
"title": ""
},
{
"docid": "99c6ad2dd87d267a5422f37316488ab3",
"score": "0.63978916",
"text": "def forget\n update_attribute(:remember_dige... |
d28e33649e61e281e12a74fdf0ecb367 | Declination of the sun | [
{
"docid": "090c8b3bdce38100d5767d2eb410f918",
"score": "0.56875944",
"text": "def sun_d\n recalculate_m\n asin(sin(sun_l) * sin(23.45))\n end",
"title": ""
}
] | [
{
"docid": "73b3c272e95517e7d805eb0f905f501f",
"score": "0.64153606",
"text": "def calc_sun_declination(t)\n e = calc_obliquity_correction(t)\n lambda = calc_sun_apparent_lon(t)\n sint = Math.sin(deg_to_rad(e)) * Math.sin(deg_to_rad(lambda))\n rad_to_deg(Math.asin(sint)) # in degrees\n end"... |
c7d92a48842a0fc1117058cfacc898f9 | do these args require a master connection | [
{
"docid": "b64810f73d48def20d97ee84a2b827e9",
"score": "0.6092152",
"text": "def needs_master?(method_name, args)\n true\n end",
"title": ""
}
] | [
{
"docid": "99bf114b42c91d802a0e1fbd5e091012",
"score": "0.65258807",
"text": "def master; end",
"title": ""
},
{
"docid": "99bf114b42c91d802a0e1fbd5e091012",
"score": "0.65258807",
"text": "def master; end",
"title": ""
},
{
"docid": "0860560b569b12b34c5d8ba4a9abc537",
... |
c2ad5f9c6d148e4084db2e21ecaab6e5 | ++ generate param. set and run. _param_:: parameter set. should be a Hash. _host_:: a HostStub to run. _nofRan_:: the number of runs. return:: parameter set (Ps) | [
{
"docid": "bf7b039326ec8bbce661f1393013047c",
"score": "0.61461097",
"text": "def createPsAndRun(_param, _host, _nofRun = 1)\n _ps = createPs(_param) ;\n _host.createRuns(_ps, _nofRun) ;\n return _ps ;\n end",
"title": ""
}
] | [
{
"docid": "24ac818bc4ea8aaadf520dbb3e7ef235",
"score": "0.7499938",
"text": "def runParamSet(_psStub, _nofRun)\n host().createRuns(_psStub, _nofRun) ;\n end",
"title": ""
},
{
"docid": "14b69419b8afa49a3ab965e0d6b219c7",
"score": "0.63673437",
"text": "def createRuns(_paramS... |
d8a901a2a681296bba77aa8157c14b74 | Return the List of Compute Collections Returns information about all compute collections. | [
{
"docid": "1e32a4bac917f2479eed77bbb8947133",
"score": "0.61033344",
"text": "def list_compute_collections_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: FabricApi.list_compute_collections ...\"\n end\n if @api_client.c... | [
{
"docid": "a0c1e78528fa909f85786f0ac411b318",
"score": "0.81231886",
"text": "def list_collections\n collections_info(next_primary(false))\n end",
"title": ""
},
{
"docid": "652c0f5ee26b0a9569f846e36aaa0489",
"score": "0.73709",
"text": "def collections\n @xmms.coll_l... |
ff6d4fb62e27ea6158635bbd16267a80 | The draw method is called whenever the view is refreshed. It lets the tool draw any temporary geometry that it needs to. | [
{
"docid": "40dba5b55d1f4482144e0f57a56471f6",
"score": "0.0",
"text": "def draw(view)\n if( @ip1.valid? )\n if( @ip1.display? )\n @ip1.draw(view)\n @drawn = true\n end\n\n if @ip2.valid? && @ip1.position != @ip2.position\n @ip2.draw(vie... | [
{
"docid": "8fc594335ccc6c8c495ca51a220f0715",
"score": "0.8365973",
"text": "def draw\n self.refresh\n end",
"title": ""
},
{
"docid": "8f73f6b2936d2d833d73bcd8785ef95c",
"score": "0.7302486",
"text": "def draw\n clear\n @current_shape.draw\n end",
"title": ""
}... |
329aff3f46e5fcefbcd922b8ab43ec5c | test if current user is the owner/author which has the same user id | [
{
"docid": "95ecbe4696b8fad1b1441e4186821b39",
"score": "0.7346488",
"text": "def editable_by?(user)\n user && user == owner\n end",
"title": ""
}
] | [
{
"docid": "8fb5d65de5f878428ccc205f6313480b",
"score": "0.8409842",
"text": "def owner?(user)\n self.user_id == user.id\n end",
"title": ""
},
{
"docid": "079f37e392ac0eadf34447f130f42650",
"score": "0.8403315",
"text": "def owner?(user)\n user.id == owner.id\n end",
"ti... |
1eee4dc8d01b6aa1806955c9992aaa8c | GET /resource/edit def edit super end PUT /resource def update super end | [
{
"docid": "cee2b61a41e0866ec486756961468134",
"score": "0.0",
"text": "def after_update_path_for(resource)\n mypage_path(resource)\n end",
"title": ""
}
] | [
{
"docid": "da8f9ab6f67466b608158cce61743bd8",
"score": "0.7912025",
"text": "def edit\r\n @r = Resource.find(params[:id])\r\n end",
"title": ""
},
{
"docid": "688bd242d67dbe358b859f0edc90147d",
"score": "0.7908493",
"text": "def edit\n build_responder.call(edit_resource, :a... |
ceec998d896f657f2492fc0beb0ff6b6 | [nil | BlockArg] the optional block parameter source://syntax_tree//lib/syntax_tree/node.rb8309 | [
{
"docid": "3abcf397d44d426cd1a1c04f580f817c",
"score": "0.0",
"text": "def block; end",
"title": ""
}
] | [
{
"docid": "381a286b0ca46424966114d99c5fcabe",
"score": "0.8164663",
"text": "def visit_blockarg(node); end",
"title": ""
},
{
"docid": "e7582fd98e7c77d6c15b823798c9ac80",
"score": "0.78222615",
"text": "def visit_arg_block(node); end",
"title": ""
},
{
"docid": "595af20b... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "12c3eb044b0e0897116efcb742c71f45",
"score": "0.0",
"text": "def message_params\n params.require(:message).permit(:title, :content)\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.69792545",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6781151",
"text": "def strong_params\n params.requ... |
aadbc7a5e180b19631c8f6f7f2c18a21 | GET /messages/1 GET /messages/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "ea7086ff90058b90c171a0d36a56b3ff",
"score": "0.74382997",
"text": "def show\n @message = User.find(params[:id]).messages\n\n render json: @message\n end",
"title": ""
},
{
"docid": "01d640eaab3a1942727bd3c46448dee5",
"score": "0.7432343",
"text": "def show\n msg... |
a69c03e41e984fef8d10ddb02a2d5f48 | the json hash for this RepositoryScannerStatistics | [
{
"docid": "eaeb3ae31bb29ff00503ec6a46db68db",
"score": "0.0",
"text": "def to_jaxb_json_hash\n _h = {}\n _h['managedRepository'] = managedRepository.to_jaxb_json_hash unless managedRepository.nil?\n if !consumerScanningStatistics.nil?\n _ha = Array.new\n consumerScanningSta... | [
{
"docid": "eaf6fa4a20a500b9975e64c27c67f6b1",
"score": "0.73944986",
"text": "def hash\n digest.hash\n end",
"title": ""
},
{
"docid": "591e6b17363dd41043a0033dec7d99d2",
"score": "0.7357583",
"text": "def hashed\n Digest::SHA256.hexdigest(to_hash.to_json)\n end"... |
c3c6cdcfa49def05f8d49cad46d6ef1e | ask the user to make a guess | [
{
"docid": "e73a9536934b51de3f021b4b0d31e6f4",
"score": "0.7496844",
"text": "def making_correct_guess\n \n # show some blank lines to give us room to guess\n puts \"\\n\\n\"\n\n # ask who's turn it is to guess\n print \"Who's turn is it? \"\n\n # get the name that was typed\n # remember the na... | [
{
"docid": "d9283bf3acee5a3aab7a9a501375bff9",
"score": "0.8436327",
"text": "def make_guess\n\t\t@action = \"\"\n\t\tputs \"Make guess\"\n\t\tuser_input = gets.chomp.downcase\n\t\tvalidate_guess(user_input)\n\tend",
"title": ""
},
{
"docid": "7121d5fc50f23b90433066b4ea49a9e6",
"score": ... |
a7f86a2ca76fd3d577eda75cc1fa728a | DELETE /facilitations/1 DELETE /facilitations/1.json | [
{
"docid": "eb54ff441b1e2bd6adf45409c7d4ce1b",
"score": "0.7089176",
"text": "def destroy\n @facilitation.destroy\n respond_to do |format|\n format.html { redirect_to facilitations_url, notice: 'Facilitation was successfully destroyed.' }\n format.json { head :no_content }\n end\n en... | [
{
"docid": "74868eb2e038b7aa135326971130778e",
"score": "0.74583703",
"text": "def destroy\n @facility = Facility.find(params[:id])\n @facility.destroy\n\n respond_to do |format|\n format.html { redirect_to facilities_url }\n format.json { head :no_content }\n end\n end",
"tit... |
bf43cb026cd4c4fecf70a8327d018400 | PUT /model_placements/1 PUT /model_placements/1.json | [
{
"docid": "908a8549a4576914c3ab0c368a14170a",
"score": "0.6238086",
"text": "def update\n @event = Event.find(params[:event_id])\n @model_placement = ModelPlacement.find(params[:id])\n\n respond_to do |format|\n if @model_placement.update_attributes(params[:model_placement])\n form... | [
{
"docid": "8b1d82fb48179b62fab403efc568a4d7",
"score": "0.67410344",
"text": "def update\n @place = Place.find(params[:id])\n\n respond_to do |format|\n if @place.update_attributes(params[:place])\n format.json { head :no_content }\n else\n format.json { render json: @plac... |
7f2e0d503f5983e17cb2874f1a0ec596 | PATCH/PUT /orden_entregas/1 PATCH/PUT /orden_entregas/1.json | [
{
"docid": "b2ad7f057dbbc605eb4bd4da274d7d22",
"score": "0.6922675",
"text": "def update\n respond_to do |format|\n if @orden_entrega.update(orden_entrega_params)\n format.html { redirect_to @orden_entrega, notice: 'Orden entrega was successfully updated.' }\n format.json { render ... | [
{
"docid": "06ce3771f2b878e9e6fdeb6a0fe90a70",
"score": "0.6654297",
"text": "def update\n @agente = Agente.find(params[:id])\n\n respond_to do |format|\n if @agente.update_attributes(params[:agente])\n format.html { redirect_to @agente, notice: 'Agente se ha actualizado correctamente.... |
b22bee57dcb09fb67692b64b3ef659eb | If we've deleted content items at the db level then we need to force a full publish to reset our change tracking and make sure the live site is a proper reflection of the edited content | [
{
"docid": "2f235a54f3fcce425fe7410715ed6c42",
"score": "0.57613254",
"text": "def configure_force_publish\n @site.must_publish_all! if @dirty\n @site.must_publish_all?\n end",
"title": ""
}
] | [
{
"docid": "dd9698152bf33f751661dd48b474f29e",
"score": "0.6231181",
"text": "def unpublish_revisions\n #Unpublish us\n if self.submitted?\n self.deleted!\n save\n end\n if self.revisions.present?\n #Unpublish the revisions\n self.revisions.each do |event|\n if eve... |
8541675b4a0645b8350cf784e91e42da | POST /group_chat_lists POST /group_chat_lists.json | [
{
"docid": "5f4c9556e9f9dd4588c3cbb85dbb67c5",
"score": "0.77173173",
"text": "def create\n @group_chat_list = GroupChatList.new(group_chat_list_params)\n\n respond_to do |format|\n if @group_chat_list.save\n format.html { redirect_to @group_chat_list, notice: 'Group chat list was succ... | [
{
"docid": "7624d32f7012dd4a9fea841c48c5641d",
"score": "0.714541",
"text": "def group_chat_list_params\n params.require(:group_chat_list).permit(:name)\n end",
"title": ""
},
{
"docid": "83b3e0b64f359bb06fc0584e17c5bade",
"score": "0.69876283",
"text": "def set_group_chat_li... |
e9bd3d96de4ef0c00a7584fd3abe60ac | the following method gets the customer variable to the view | [
{
"docid": "ad7e380306744ac718f9c90c3f9c6bde",
"score": "0.68705577",
"text": "def customer_profile\n @customer = customer.find(current_customer.id)\n end",
"title": ""
}
] | [
{
"docid": "a8b95367b3d90827c9934cf992805414",
"score": "0.787802",
"text": "def customer\n @customer\n end",
"title": ""
},
{
"docid": "83ddd4884d71ad8f8dc9e96db377949c",
"score": "0.7515605",
"text": "def get_customer\n\n end",
"title": ""
},
{
"docid": "ba649b... |
bb5ef910e44d34f4c51004338fa056f2 | DELETE /maintenances/1 DELETE /maintenances/1.json | [
{
"docid": "6d6d8ce1b90e79332173dfa06e5568a8",
"score": "0.7935318",
"text": "def destroy\n @maintenance.destroy\n respond_to do |format|\n format.html { redirect_to maintenances_url, notice: 'Maintenance was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",... | [
{
"docid": "d34d830f5d5a6151c1ce0aeaeff4d21d",
"score": "0.81088746",
"text": "def destroy\n @maintenance = Maintenance.find(params[:id])\n @maintenance.destroy\n\n respond_to do |format|\n format.html { redirect_to maintenances_url }\n format.json { head :no_content }\n end\n end... |
f59f344aa2aa17f8d2728c8a1daf1492 | PUT /animal_weights/1 PUT /animal_weights/1.xml | [
{
"docid": "76d2d965c638e7257f91a646d551846f",
"score": "0.69974506",
"text": "def update\n @animal_weight = AnimalWeight.find(params[:id])\n\n respond_to do |format|\n if @animal_weight.update_attributes(params[:animal_weight])\n format.html { redirect_to(@animal_weight, :notice => 'A... | [
{
"docid": "db792a577b2cb1aabcb740a8993c4d9b",
"score": "0.68948245",
"text": "def update\n @animal_weight = AnimalWeight.find(params[:id])\n @animal_weight.update_attributes(params[:animal_weight])\n \n respond_with(@animal_weight, :location => admin_animal_weight_path(@animal_weight)) \n ... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "4cf75989f52008697667a49b4ebc71db",
"score": "0.0",
"text": "def clova_params\n params.require(:clova).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... |
d92c6f2381981025d97fffeb09dc5faa | A method to reverse the words in a sentence, in place. | [
{
"docid": "38f68177373b7a4f5eaf6777eb3e1435",
"score": "0.0",
"text": "def reverse_sentence(my_sentence)\n reversed_sentence = \"\"\n\n if my_sentence == nil\n return nil\n end\n\n string_length = (my_sentence.length - 1)\n reversed_sentence_index = 0\n sentence_index = string_length\n\n unti... | [
{
"docid": "57951a0a5bd49f69f8d890efe5ed93f1",
"score": "0.8804578",
"text": "def reverse_words(sentence)\n split_sentence = sentence.split(\" \")\n split_sentence.each do |word|\n word.reverse!\n end\n split_sentence.join(\" \")\nend",
"title": ""
},
{
"docid": "64e24917bf6b7e3193474... |
1235ed4b1b2514aa3247195efdc2ca97 | PATCH/PUT /employer_infos/1 PATCH/PUT /employer_infos/1.json | [
{
"docid": "3cc22897cae33e1c768a732db9f4f569",
"score": "0.7593588",
"text": "def update\n respond_to do |format|\n if @employer_info.update(employer_info_params)\n format.html { redirect_to @employer_info, notice: 'Employer info was successfully updated.' }\n format.json { render ... | [
{
"docid": "3c98de8a70fcdc560ab6537f860a906e",
"score": "0.75327605",
"text": "def update\n respond_to do |format|\n add_employees\n if @employer.update(employer_params)\n format.html { redirect_to employers_path, notice: 'Employer was successfully updated.' }\n format.json { ... |
6e76e39a66a288a40b29b5c760bad743 | Whether or not the unit has associated taxonomy terms | [
{
"docid": "f23c024ac6125b1db3f1a45abc2b2691",
"score": "0.73814744",
"text": "def has_terms?\n ! @data['terms'].nil?\n end",
"title": ""
}
] | [
{
"docid": "b4d9506852904742d9540557e6ca637e",
"score": "0.7044514",
"text": "def has_taxonomy? taxonomy_id\n taxonomies.all(:conditions => { :id => taxonomy_id }).present?\n end",
"title": ""
},
{
"docid": "e257d5f71a39935c72d85eb4218f1293",
"score": "0.6887635",
"text": "def is... |
f260b0743e3635ff851ba1fb8f391b00 | GET /users/1 GET /users/1.json | [
{
"docid": "83560f29948e09f3c11f43d72cb8cc24",
"score": "0.0",
"text": "def show\n @events= @user.events\n end",
"title": ""
}
] | [
{
"docid": "9f7c735ace683c5c2b12c914cc9ad8a8",
"score": "0.771752",
"text": "def get\n users = User.all.as_json\n render(json: users.as_json, status: :ok)\n end",
"title": ""
},
{
"docid": "a95dfe28d6b386aafc5fb53749e84258",
"score": "0.75107867",
"text": "def user\n... |
98d7bcbe73332caf88eeaf75904b1cbc | Default parameters that are applied to individual operations. Can be overridden by: Adding a JSONformatted list of key, value pairs to an `Operation` input of type JSON and named `Options`. | [
{
"docid": "14cd7af3fd90baae91cb3d856cfd55cc",
"score": "0.58647996",
"text": "def default_operation_params\n {\n thermocycler_model: TestThermocycler::MODEL,\n program_name: 'CDC_TaqPath_CG',\n qpcr: true,\n upload_data: true\n }\n end",
"title": ""
}
] | [
{
"docid": "b4fb372daeff723717fbeb9889852671",
"score": "0.73043305",
"text": "def update_operation_params(operations:, default_operation_params:)\n operations.each do |op|\n opts = default_operation_params.dup.update(op.input('Options').val)\n op.temporary[:options] = opts\n end\n end"... |
3da235f44740fff9b78ad95689398996 | Will either redirect the user back to the originating URL or another URL specified via the params. A redirection is specified using the _return_to param key. | [
{
"docid": "1186f39a6af027926e053cee9f933512",
"score": "0.0",
"text": "def bounce_back\n redirect_to params[:_return_to] ? params[:_return_to] : request.referrer\n end",
"title": ""
}
] | [
{
"docid": "a2ba8a0cdad8b6a5f09a0fadd7893a10",
"score": "0.83533627",
"text": "def redirect_back(*params)\n uri = session[:return_to_uri]\n session[:return_to_uri] = nil\n uri ? redirect_to(uri) : redirect_to(*params)\n end",
"title": ""
},
{
"docid": "a85c9998a2aeadfa53fdb8f59bc20... |
d4b2023f59d265f10d6e855bc0ab0ed9 | Parameters: user category or parent message body flag (Fixnum) | [
{
"docid": "4654308404b5431667c279745ff2d316",
"score": "0.552584",
"text": "def initialize(params)\n raise 'No user' unless params[:user] or params[:userid]\n unless ((params[:category] or params[:categoryid]) || (params[:parent] or params[:parentmessageid]))\n raise 'No category or pa... | [
{
"docid": "403088a6f3e07ff2d1ec478d2019a5f1",
"score": "0.6136857",
"text": "def parent_message\n end",
"title": ""
},
{
"docid": "3ab9eaf8f5a1d30ab130c9236adad27b",
"score": "0.5346499",
"text": "def set_body from_user\n self.body = message_body from_user\n end",
"title"... |
ec4469acdb2452e5ddb963492def847b | Returns the string value found before the first slash (both forwards and backwards) symbol from self. 'A/B/C'.before_slash => "A" 'A\B\C'.before_slash => "A" | [
{
"docid": "363daa18163d490b92e8131862651138",
"score": "0.7188637",
"text": "def before_slash\n value_before_character('\\\\\\\\|\\/')\n end",
"title": ""
}
] | [
{
"docid": "c4ef32b9e462131f0adeac8cf41d15d0",
"score": "0.60891044",
"text": "def remove_leading_slash(str)\n if str.start_with?('/')\n str[1..-1]\n else\n str\n end\n end",
"title": ""
},
{
"docid": "1d82ab1997481dba6ca1d57ab6f6aa0b",
"score"... |
b03106c3cd40b575b3ef701c23851ec7 | load the permissions for the current user so that UI can be manipulated | [
{
"docid": "7e8d12edbc4490e559fa3455c1a8ae88",
"score": "0.79555357",
"text": "def load_permissions\n @current_permissions = current_user.role.permissions.collect{|i| [i.subject_class, i.action]}\n end",
"title": ""
}
] | [
{
"docid": "2485a9f5630b90eb908f80aecc2c36aa",
"score": "0.8034645",
"text": "def load_permissions\n @current_permissions = current_user.role.permissions.collect{|i| [i.subject_class, i.action]} unless current_user.nil?\n end",
"title": ""
},
{
"docid": "dcf9a85567c621f1876fc822e66edc11"... |
f2ecc782588125808a08c13f43fadda6 | PATCH/PUT /recipe_users/1 PATCH/PUT /recipe_users/1.json | [
{
"docid": "f69ab2d00544b08ba0e69f6124e430b7",
"score": "0.6911777",
"text": "def update\n respond_to do |format|\n if @recipe_user.update(recipe_user_params)\n format.html { redirect_to @recipe_user, notice: 'Recipe user was successfully updated.' }\n format.json { render :show, s... | [
{
"docid": "689aa9ee6f876ef691ccbec8e8a84d78",
"score": "0.69730616",
"text": "def update\n recipe = Recipe.find(params[:id])\n\n if recipe.user == current_user\n recipe.update(recipe_params)\n render json: { recipe: params[:id], deleted: true }\n else\n render json: { recipe: pa... |
888b6d39913f2bbe915c1f5e564c041e | GET /links/1 GET /links/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "55cbc434907a6cb742efe778dea5bde6",
"score": "0.71655005",
"text": "def index\n @links = Link.all\n \n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @links }\n end\n end",
"title": ""
},
{
"docid": "9ce89167c4f3... |