query_id
stringlengths
32
32
query
stringlengths
7
6.75k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
3ec4f824400f0db884009932c447b407
Sets session[:LOCALE] to one of the languages defined in the dictionary. It first tries to honor the browsers accepted languages and then falls back to the default language.
[ { "docid": "6cab10acccb7e05b962f5a580d609c28", "score": "0.8718219", "text": "def set_session_locale\n session[:LOCALE] = default_language\n accepted_langs = request.locales << default_language\n\n mapping = trait[:mapping]\n dict = dictionary\n\n accepted_la...
[ { "docid": "508895a39e194b61dcea9f1f6418c269", "score": "0.79146534", "text": "def set_locale\n if (params[:locale])\n save_locale_in_session\n end\n\n user_saved = session[:locale].presence\n user_preferred = validate_or_recreate(http_accept_language).user_preferred_languages...
a2a67b9ed031d65a574a9a2627648366
Creates a new resource that can be compared to a reused resource, using the post body of the original. Must be implemented by classes that include this module.
[ { "docid": "afb1d62bce8a2bc61be42a6ab22fcd39", "score": "0.0", "text": "def reference_resource\n return super if defined?(super)\n\n raise NotImplementedError\n end", "title": "" } ]
[ { "docid": "21ebe3aecafad375cb8666e7cc391d8f", "score": "0.63743323", "text": "def new\n if clone_target = resource_class.find_by_id(params[:id])\n set_resource_ivar(clone_target.clone)\n end\n\n new!\n end", "title": "" }, { "docid": "ea008d077b0ba82d3098afe3141e4daf", "s...
ea6636efe4736bf3b401f53210fd64bd
recaclucates and sets the present production rate according to the present base production and the boni according to rate = base (1+bonus) . the option tax_it controls whether or not the local tax_rate should be deducted of the production.
[ { "docid": "acde0a55985a1509139206543cc98754", "score": "0.7498333", "text": "def update_resource_production_rate(base, tax_it)\n base_production = self[base+\"_base_production\"]\n total_before_tax = self[base+\"_base_production\"] * (1.0 + self[base+\"_production_bonus\"])\n if (tax_i...
[ { "docid": "390c17a5347b952bb0e7d33772b5dffb", "score": "0.67422664", "text": "def set_production_base_rate \n case @res_output_type\n when :timber\n @production_base_rate = 1\n when :iron\n @production_base_rate = 1\n when :gold\n @production_base_rate = 1\n when :copper\n...
c3394ce1fac8f9382b771ee38e3acb62
POST /received_issues POST /received_issues.xml
[ { "docid": "40fb2bd87f1e0d89541d6f6229e7f66b", "score": "0.53310287", "text": "def create\n @received_issue = ReceivedIssue.new(params[:received_issue])\n\n respond_to do |format|\n if @received_issue.save\n flash[:notice] = 'ReceivedIssue was successfully created.'\n format.htm...
[ { "docid": "ee5c563e4193547a490cd5d44f0a67d8", "score": "0.62354666", "text": "def index\n @received_issues = ReceivedIssue.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @received_issues }\n end\n end", "title": "" }, { "doci...
fe545f4bad9d477e2938b8ea7bcff0b5
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Use callbacks to share common setup or constraints between actions.
[ { "docid": "d970dbf83344f713b449cf486b9d367a", "score": "0.0", "text": "def set_lesson\n # memoize @lesson to reduce database between new->create\n @lesson ||= Lesson.find(params[:id])\n end", "title": "" } ]
[ { "docid": "7b068b9055c4e7643d4910e8e694ecdc", "score": "0.62117374", "text": "def on_setup_callbacks; end", "title": "" }, { "docid": "352de4abc4d2d9a1df203735ef5f0b86", "score": "0.61678845", "text": "def required_action\n # TODO: implement\n end", "title": "" }, { ...
cb8f3d0393ae6422060dbe4eccf7d2a3
List revisions for a rule List all revisions for a specific rule. The `rule_id` provided can be the ModSecurity Rule ID or the Fastly generated rule ID.
[ { "docid": "f43adc8ab6b2e13e20fee30010df1a4b", "score": "0.67246133", "text": "def list_waf_rule_revisions(opts = {})\n data, _status_code, _headers = list_waf_rule_revisions_with_http_info(opts)\n data\n end", "title": "" } ]
[ { "docid": "21d69fd1b4611b38df8a74fd16f17f5d", "score": "0.64895815", "text": "def list_job_revisions(id)\n conn = @client.get do |req|\n req.url \"/api/v2/job/#{id}/revisions\"\n req.headers[\"Authorization\"] = @token\n end\n conn.body\n end", "title": "...
82c53e461f9bb9fd30c0d87f8ba136b4
implements higherorder functions in ruby
[ { "docid": "58d1e6eeead71a34a0d490552661cc39", "score": "0.0", "text": "def pass_proc1 (proc1, proc2, number, proc3)\n proc1.call\n proc2.call\n proc3.call \n Proc.new { puts \"#{number} procs have been passed as arguments to the currently executing method #{__method__.to_s}\" }.call\n proc5 =...
[ { "docid": "5ed7c4990eaed3c32f00a89b0a9f02a5", "score": "0.55217975", "text": "def reduce\n _reduce = ->(acc, f, xs){\n xs == [] ? acc : _reduce.(f.(acc, xs[0]), f, xs[1..-1])\n }\n\n curry.(->(f, xs) {\n _reduce.(xs[0], f, xs[1..-1])\n })\n end", "title": "" }, { "doc...
6e96499c8ea86aaa95d911f7f8a1d922
GET /vods/1 GET /vods/1.xml
[ { "docid": "1d391529deb9356d059f73864b67210d", "score": "0.64086837", "text": "def show\n @vod = Vod.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @vod }\n end\n end", "title": "" } ]
[ { "docid": "cd8ec4aa79a42602837b8612f4ce45b7", "score": "0.7203887", "text": "def index\n @vods = Vod.find(:all)\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @vods }\n end\n end", "title": "" }, { "docid": "7f55ab152fad7456da42d...
c00e18c9059a5be9bfb9a84003340f39
Create a pull request review
[ { "docid": "068b2539ee80bf5bde978178d0b3e819", "score": "0.7690211", "text": "def create_pull_request_review(repo, pull_request_number, event, body = nil, options = {})\n review = {\n event: event,\n accept: CUSTOM_ACCEPT_HEADER\n }\n review[:body] = body unless body.nil?\n ...
[ { "docid": "073b2dbc28d94a3c13813598da678ac1", "score": "0.7578934", "text": "def create_pull_request(oauth_token, source_branch, base_branch, pr_title, pr_body, reviewers)\n client = Octokit::Client.new(access_token: oauth_token)\n pull_number = client.create_pull_request(full_repo_name, base...
f4901336f982cfe284aa85083955939b
pirates_say_arrrrrrrrr("are you really learning Ruby?") => "eenu" pirates_say_arrrrrrrrr("Katy Perry is on the radio!") => "rya" pirates_say_arrrrrrrrr("Pirates say arrrrrrrrr") => "arrrrrrrr"
[ { "docid": "cbfd1c43bac36b017b6504b157b54287", "score": "0.0", "text": "def pirates_say_arrrrrrrrr(string)\n new_string = \"\"\n add_next = false\n string.size.times do |index|\n char = string[index]\n new_string << char if add_next\n add_next = (char == \"r\" || char == \"R\")\n end\n new...
[ { "docid": "7a02fa5a64551ab847d36110bfe361d9", "score": "0.7581788", "text": "def pirates_say_arrrrrrrrr(string)\n\nend", "title": "" }, { "docid": "850b1aa471a26aaa6eed817f42f2550f", "score": "0.7220491", "text": "def offer_rose (string)\r\n \"Would you take this rose, #{string},...
9cbf78ca0301f663ae3e724b99c0381f
Complete each step below according to the challenge directions and include it in this file. Also make sure everything that isn't code is commented in the file. 1. Pseudocode What is the input? separate_comma(someintegervalue) What is the output? (i.e. What should the code return?) return a command separated string What...
[ { "docid": "4ea13c08087a86e82fea90ee95a0fd2c", "score": "0.74824727", "text": "def separate_comma(mynum)\n\tstrnum = mynum.to_s\t\t\t#convert integer to string if not converted already\n\tif strnum.length > 3 \t\t#Check to see if the number string is longer than 3 digits\n\t\tbacknums = strnum[strnum.l...
[ { "docid": "7b534106a864bf157aa7bfe3479b5ac9", "score": "0.74748695", "text": "def separate_comma(num)\n\tnum_string = num.to_s\n if num_string.length <= 3\n return num_string\n else\n num_array = []\n count = 0 #default position for count to start\n num_string.reverse.each_char do |comm| ...
bbe8fdb5700287d00cc3bbed76ab3781
Add a file to the Frameworks PBXGroup. / /,
[ { "docid": "1cd7eecc23c755fed41c01d752fb7980", "score": "0.73846656", "text": "def add_file_to_frameworks(name, guid)\n #return self.add_file_to_group(name, guid, 'Frameworks')\n end", "title": "" } ]
[ { "docid": "a053f78be6c22cac18d90876e9b13fed", "score": "0.7200139", "text": "def add_file_to_support_group(path)\n support_files_group.new_file(path)\n end", "title": "" }, { "docid": "c7d6609b6e5407fa29a12e93f04fc60e", "score": "0.70496494", "text": "def add_fil...
73c7dcba1e530c67724e69d0aa40ab9b
GET /appointments/new GET /appointments/new.json
[ { "docid": "1705255a69219c37f6526b77bc936883", "score": "0.0", "text": "def new\n @group = Group.new\n @groups = Group.find(:all, :conditions => {:user_id => current_user})\n\n @shared_friendships = FriendshipAppointment.all\n @shared_friendship = FriendshipAppointment.new\n\n @appointmen...
[ { "docid": "df206c35f938e3e834e73d2da8143187", "score": "0.80405307", "text": "def new\n add_breadcrumb \"add\", nil, \"glyphicon-plus-sign\"\n\n @appointment = Appointment.new\n @current_appointments = get_current_appointments(current_user.account.appointments || [])\n @past_appointments = ...
f15b0e35e0cd22e63dfc9a8798851d21
DELETE /schedules_events/1 DELETE /schedules_events/1.json
[ { "docid": "c2af56781a53fc8db0c8e600635d65db", "score": "0.79809403", "text": "def destroy\n @schedules_event = SchedulesEvent.find(params[:id])\n @schedules_event.destroy\n\n respond_to do |format|\n format.html { redirect_to schedules_events_url }\n format.json { head :no_content }\...
[ { "docid": "f8fb68a72ce6800d72e039780f7f04f9", "score": "0.77449274", "text": "def destroy\n @scheduled_event = ScheduledEvent.find(params[:id])\n @scheduled_event.destroy\n\n respond_to do |format|\n format.html { redirect_to scheduled_events_url }\n format.json { head :ok }\n end...
dce81fbffdff34ce174531bc86a88e1a
Reads a remote file and loots it
[ { "docid": "4ed8d406293ff15665b58a72a22bcf9e", "score": "0.0", "text": "def loot_file(path, data, title, type, description)\n data = read_remote_file(path) if data.nil? # If no data is passed, read remote file\n return nil if data.nil?\n\n loot_path = store_loot(\n title,\n type,\n ...
[ { "docid": "206153d615210b3bb04109790409f185", "score": "0.7836884", "text": "def read_remote_file(path)\n data = nil\n\n begin\n data = read_file(path)\n rescue EOFError\n vprint_error \"Error reading file #{path} It could be empty\"\n end\n data\n end", "title": "" }, ...
f74c29bdfc4a183e1ec1b91334cd5be2
Use callbacks to share common setup or constraints between actions.
[ { "docid": "44a29b84f4f963cf05729a0bb090df94", "score": "0.0", "text": "def set_trade\n @trade = Trade.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...
6710fab3d841f7826ffd5c52bd275d2d
moved from film.rb following refactoring. Returns all of the customers who are going to a specified screening. How does this reference the film when i call screening1.customers?
[ { "docid": "96186e309a330cf91bcad5112ad0a796", "score": "0.6252278", "text": "def customers()\n sql = \"SELECT customers.* FROM customers\n INNER JOIN tickets\n ON tickets.customer_id = customers.id\n WHERE tickets.screening_id = $1\"\n values = [@id]\n customers = SqlRunner.run(sql, values)\n re...
[ { "docid": "6d874084967d7c33e9a01ae68470675b", "score": "0.7526584", "text": "def customers_for_film()\n sql = \"SELECT name FROM customers\n INNER JOIN tickets ON customers.id = tickets.customer_id\n WHERE film_id = $1 ORDER BY name\"\n values = [@id]\n customer_data = SqlRunner.run(sql,...
7b5967166e50b88968c6464064759df7
New method : Setup anim top [:anim_top]
[ { "docid": "60efcc3667bfb445c73012b116d011ca", "score": "0.81578463", "text": "def setup_anim_top\n $game_temp.anim_top = (@acts[1] == true || @acts[1].nil? ? 1 : 0)\n end", "title": "" } ]
[ { "docid": "4f59f460786a95f6cdeafadbd16ec273", "score": "0.81669456", "text": "def setup_anim_top\n # not sure if needed\n $game_temp.anim_top = (@acts[1] == true || @acts[1].nil? ? 1 : 0)\n end", "title": "" }, { "docid": "747d4d6d5f155e9d050711ac974f012f", "score": "0.78616834",...
6addeecf7e6bbdb8e69157f51e9f573b
Method to check if lane barcode has valid syntax If yes, return true, else return false
[ { "docid": "decee8c4af04a608a88bb6c34cafb617", "score": "0.80858564", "text": "def laneBarcodeSyntaxValid?(lane)\n if !laneIndexed?(lane)\n if lane.to_s.match(/^[1-8]$/)\n return true\n else\n return false\n end\n else\n if !@isFCMuxed # Lane is indexed, but FC ...
[ { "docid": "d04abea1b8719c750221425d00e6d83d", "score": "0.823832", "text": "def laneBarcodeSyntaxValid?(laneBarcode)\n # If the flowcell is not multiplexed, lane barcode should be just the lane\n # number from 1 through 8. If that is not so, return false to indicate the\n # error\n if !@isF...
d66085f9428e6c70bc2b1b1d9bfe3a92
Makes a request to the remote service.
[ { "docid": "06efb24fdfaf292c354b257a9cc47dfb", "score": "0.61713624", "text": "def request(method, path, *arguments)\n result = ActiveSupport::Notifications.instrument(\"request.active_resource\") do |payload|\n payload[:method] = method\n payload[:request_uri] = \"#{site.s...
[ { "docid": "e87df0272be1e5c755169d481dd75c66", "score": "0.69395703", "text": "def perform\n uri = URI(url)\n response = Net::HTTP.start(uri.hostname, uri.port,\n :use_ssl => uri.scheme == 'https' ) { |http|\n Orchestrate.config.logger.debug \"Performing #{method.to_s.upcase} req...
c6a96d978ad874b079863c3c08540238
the following does that same as method above def add_student(name, grade) roster[grade] ||= [] roster[grade] << name end
[ { "docid": "a76595b15bdd2e4a9eeaeb257d8dff5c", "score": "0.0", "text": "def grade(grade)\n roster[grade]\n end", "title": "" } ]
[ { "docid": "414fe6162bdb5305f5c81b40244350d5", "score": "0.96512824", "text": "def add_student(student_name, grade)\n roster[grade] ||= []\n roster[grade] << student_name\n end", "title": "" }, { "docid": "975c1f30b31382818ee59ffe9cfc469c", "score": "0.95741606", "text": "def ...
d52e0a71d95fe344bfc0ca7bd3b207ed
To calculate the duration
[ { "docid": "8bf20a62c837c7ae6a2c097795ac3214", "score": "0.0", "text": "def getDuration(file)\n\t\t case @file_type.delete('.') # case tag\n\t\t\t when 'mp4','m4a','m4v', 'wav', 'avi', 'flv', 'mp3'\n\t\t\t @file_duration = ffmpeg_to_parse\n\t\t\t else # All other files are not registered, ...
[ { "docid": "32a2bebc7cdb4f32b204d08756d08ac9", "score": "0.8501985", "text": "def total_duration; end", "title": "" }, { "docid": "32a2bebc7cdb4f32b204d08756d08ac9", "score": "0.8501985", "text": "def total_duration; end", "title": "" }, { "docid": "a7e5629fc62462a7756b53...
bb9a57a5f7bc83471e8d3b25cb7ed72f
DELETE /secries/1 DELETE /secries/1.json
[ { "docid": "d2b418ddee3e5d7be8eb226eb561c422", "score": "0.70456696", "text": "def destroy\n @secry = Secry.find(params[:id])\n @secry.destroy\n\n respond_to do |format|\n format.html { redirect_to secries_url }\n format.json { head :no_content }\n end\n end", "title": "" } ...
[ { "docid": "689d5a07a403c4b765ba178e4aff08a3", "score": "0.71260893", "text": "def delete\n client.delete(\"/#{id}\")\n end", "title": "" }, { "docid": "ba67ebd85114998e01be10599c8943ca", "score": "0.69695586", "text": "def delete(path)\n RestClient.delete request_base+p...
a733417fb1492949c75804451c210157
Search the history list for STRING starting at absolute history position POS. If STRING begins with `^', the search must match STRING at the beginning of a history line, otherwise a full substring match is performed for STRING. DIR = 0 means to search forward.
[ { "docid": "1f16b4e9e789ce24e2949a1db23223e4", "score": "0.7153023", "text": "def noninc_search_from_pos(string, pos, dir)\r\n return 1 if (pos < 0)\r\n\r\n old = where_history()\r\n return -1 if (history_set_pos(pos) == 0)\r\n\r\n rl_setstate(RL_STATE_SEARCH)\r\n if (string[0,1] == '^')\...
[ { "docid": "18cc2def7d02ed08ff072ed914941816", "score": "0.7496348", "text": "def history_search_pos(string, dir, pos)\r\n old = where_history()\r\n history_set_pos(pos)\r\n if (history_search(string, dir) == -1)\r\n history_set_pos(old)\r\n return (-1)\r\n end\r\n ret = where_h...
a9c860ca06851657a8ca8854e9ff11b4
++ Retrieve the results number
[ { "docid": "db5f56eec9b5d948bbe5552a3aa18ff2", "score": "0.7795121", "text": "def get_results_number\n @number ||= calculate_results_number\n end", "title": "" } ]
[ { "docid": "5efe814fb24f1e060c1836c06055324b", "score": "0.7906312", "text": "def numberOfResults\n @@numberOfResults\n end", "title": "" }, { "docid": "4a40820f78cc206f486f2f7bf9a66bff", "score": "0.77143973", "text": "def number_of_results(results)\n printf(\"\\n%<results>...
7dba798f3fda2fd93fd78b5de46b424f
words=['cars', 'for', 'potatoes', 'racs', 'four','scar', 'creams', 'scream'] => output: [["cars", "racs", "scar"], ["four"], ["for"], ["potatoes"],["creams", "scream"]] HINT: you can quickly tell if two words are anagrams by sorting their letters, keeping in mind that upper vs lowercase doesn't matter
[ { "docid": "26f5740169b394b50b9246306b5a835d", "score": "0.0", "text": "def anagramcmp(w1,w2)\n return w1.chars.sort{|a, b| a.casecmp(b)}.join.casecmp(w2.chars.sort{|a, b| a.casecmp(b)}.join)\nend", "title": "" } ]
[ { "docid": "57bda929f93f349278ca4fddbbce4e89", "score": "0.8549946", "text": "def combine_anagrams(words)\n\tanagram_list = Array.new\n\tanagram_list = words.map {|word| sorted(word).downcase}\n\tanagram_list.uniq!\n\t\n\tresult = Array.new\n\tanagram_list.each do |anagram|\n\t\tresult << words.select {...
1c46fa3c78f2f97ecdbe271a36bb9eaf
set :: [string] > void
[ { "docid": "34a6b237f3649b6805adefcb12312e3c", "score": "0.0", "text": "def set(args)\n conf = parse_args(args)\n add_defaults!(conf)\n\n pid = fork do\n system(\"sleep #{conf[:delay]} ; #{conf[:command]}\")\n end\n puts \"[#{pid}] Set timer for #{conf[:time]}.\"\nend", "title": "" } ]
[ { "docid": "69356e3e81ff368d03a20b0c0ec23d6d", "score": "0.75704277", "text": "def set \r\n\t\t@set.map{|s| s}\r\n\tend", "title": "" }, { "docid": "8975f95936438911763d46097c40f12f", "score": "0.7466154", "text": "def set; end", "title": "" }, { "docid": "8975f9593643891...
49cebe1b234f59780230c14b4b88b7cd
DELETE /my_sqls/1 DELETE /my_sqls/1.json
[ { "docid": "f449f546a634e280a538d2c2b93d5f0c", "score": "0.7045965", "text": "def destroy\n @my_sql.destroy\n respond_to do |format|\n format.html { redirect_to my_sqls_url, notice: 'My sql was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "title": "...
[ { "docid": "37d9df70c8527e27fad59c51014cdb7b", "score": "0.68039477", "text": "def delete(sql, name = nil) end", "title": "" }, { "docid": "9dd95a4fe749030387365a671cdc92d0", "score": "0.66847306", "text": "def destroy\n @database = Database.find(params[:id])\n path = @database...
3ea3b5fee14778b20bea28a82f90c68e
GET /report_templates GET /report_templates.json
[ { "docid": "ffb91b8532bec3695127821bb8e45547", "score": "0.0", "text": "def index\n respond_to do |format|\n format.html\n format.json { render json: ValuesDatatable.new(view_context) }\n end\n end", "title": "" } ]
[ { "docid": "ae447facf97cabb1e97b06bce1354a09", "score": "0.7708517", "text": "def index\n @report_templates = ReportTemplate.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @report_templates }\n end\n end", "title": "" }, { "doci...
b47b9364cd4a48e20407dfe078a40be6
PUT /sayings/1 PUT /sayings/1.xml
[ { "docid": "1a3188497fb1156f2f8ca5a3345f550d", "score": "0.6681646", "text": "def update\n @saying = Saying.find(params[:id])\n\n respond_to do |format|\n if @saying.update_attributes(params[:saying])\n format.html { redirect_to(@saying, :notice => 'Saying was successfully updated.') }...
[ { "docid": "2a753b2cba3317f2c61ee051d24814cb", "score": "0.66937226", "text": "def update\n @say = Say.find(params[:id])\n\n respond_to do |format|\n if @say.update_attributes(params[:say])\n format.html { redirect_to(@say, :notice => 'Say was successfully updated.') }\n format....
42954638b139a55c9a881fd3988449d9
Send a passcode by mail for password reset
[ { "docid": "7f9456210eb9ff369cde5a5e59fd9ceb", "score": "0.0", "text": "def public_forgot_password_send\n if params[:form_forgot_password]\n results = CsApi::Account.reset_password(params[:form_forgot_password][:username])\n logger.info \"[SessionsController][DEBUG]==== reset results: #{res...
[ { "docid": "1b7172047adcb44bc1cb61daf152742b", "score": "0.8010072", "text": "def password_reset\n @greeting = \"Hi\"\n\n mail to: \"to@example.org\"\n end", "title": "" }, { "docid": "1b7172047adcb44bc1cb61daf152742b", "score": "0.8010072", "text": "def password_reset\n @g...
83a8b44ae59522c8a37e8bd52893b9fd
Get Block Details By Block Height Through this endpoint customers can obtain basic information about a given mined block, specifically by using the &x60;height&x60; parameter. These block details could include the hash of the specific, the previous and the next block, its transactions count, its height, etc. Blockchain...
[ { "docid": "10aaa8e6ebe3b965f777a4ea44c8f4be", "score": "0.76791507", "text": "def get_block_details_by_block_height_with_http_info(blockchain, network, height, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: UnifiedEndpointsApi.get_block_details_...
[ { "docid": "f17d1781484ed4beede801355d6022a8", "score": "0.80438113", "text": "def blocks_get_height\n height = @client.query_get \"blocks/getHeight\"\n end", "title": "" }, { "docid": "2b7120440aec7c9b0e5a13899b88ef55", "score": "0.7931672", "text": "def get_block_details_by...
ec1a1cc6a65d01839d6fc63dff050b38
Builds the property => filter hash. The filter is specified in the +filter+ migration option. A Boolean property has a default String => Boolean filter which converts the input string to a Boolean as specified in the +Jinx::Boolean+ +to_boolean+ methods.
[ { "docid": "0887eda67055345cf82551338e311b61", "score": "0.6980246", "text": "def attribute_filter_hash(klass)\n hash = @flt_hash[klass]\n fh = {}\n klass.each_property do |prop|\n pa = prop.attribute\n spec = hash[pa] if hash\n # If the property is boolean, then make...
[ { "docid": "443c53a44544abdc3fae7f5e302ba387", "score": "0.690098", "text": "def build_filters\n\n return unless configurable?\n return if @filters_opted == false\n\n types = {\n 'string' => true,\n 'text' => 'string',\n 'boolean' => true,\n 'date' => t...
6d98fe5ba1b0b529f3a15a34a927c30b
POST /recommendations POST /recommendations.json
[ { "docid": "86ba53f573b630a040deee1557a94178", "score": "0.0", "text": "def create\n @recommendation = Recommendation.new(params[:recommendation])\n @recommendation.user_id = current_user.id\n respond_to do |format|\n if @recommendation.save\n format.html { redirect_to thankyou_path...
[ { "docid": "ffc227254b8e7ae755e1b9424615c9f5", "score": "0.7472456", "text": "def create\n current_book = Book.find_by_id(session[:current_book_id])\n @recommendation = current_book.recommendations.new(recommendation_params)\n current_user.recommendations << @recommendation\n respond_to do |...
c657de4b70d266e9a3a784b999ea9e60
Never trust parameters from the scary internet, only allow the white list through.
[ { "docid": "3e6d830d302cc09f5146198fbc6acebc", "score": "0.0", "text": "def user_params\n params.require(:user).permit(:calendar, :time_from, :time_to, :status, :dateofbirth, :email, :active, :anonymous, :webmaster, :userid, :lastname, :name, :address1, :address2, :address3, :geo_address, :longitud...
[ { "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...
fc185c053730e387126510f31c6b8e34
Called when a user clicks "Mention" on a profile page
[ { "docid": "ff506aa61536d8d774ea5c6d0125e015", "score": "0.0", "text": "def new\n if params[:person_id] && fetch_person(params[:person_id])\n @aspect = :profile\n @contact = current_user.contact_for(@person)\n if @contact\n @aspects_with_person = @contact.aspects.load\n @...
[ { "docid": "51a51babeb47815d8be509cc5edbc12e", "score": "0.6560971", "text": "def set_user_mention\n @user_mention = UserMention.find(params[:id])\n end", "title": "" }, { "docid": "89927636fd3a5e2129afa93217da46d9", "score": "0.6427271", "text": "def my_mentions\n @blogs ...
89650b54f3c9f8eaba11f966a2d1c6e3
Get the array values of the given path.
[ { "docid": "3f2eb28af828f59f9ee86b738ccd1012", "score": "0.80843997", "text": "def get_array(path='.')\n Element.get_array(@element, path)\n end", "title": "" } ]
[ { "docid": "f5c41c032e02b0db04308ead03d2e0e1", "score": "0.8089943", "text": "def get_array(path=\"\")\n Element.get_array(@element, path)\n end", "title": "" }, { "docid": "1ca756df14dd6f07609e616170be2b4b", "score": "0.72548264", "text": "def path_arr()\n return @paths\n...
84444b1cd748dbada9c188e2bfb1079a
Takes a path to the search image and reads in the image data using ImageMagick. Also sets the number of columns and rows to search to the total number of columns and rows in the search image.
[ { "docid": "518a56c9fccd52572af9aa2e536c021a", "score": "0.7448044", "text": "def search_image=(filepath)\n\t\t@search_image = read_image(filepath)\n\t\t@search_cols = search_image.columns\n\t\t@search_rows = search_image.rows\n\t\treturn search_image\n\tend", "title": "" } ]
[ { "docid": "2198f805baef63d410bab39f604ce52f", "score": "0.63779217", "text": "def full_image= filepath\n\t\t@full_image = read_image filepath\n\t\t@search_cols = full_image.columns\n\t\t@search_rows = full_image.rows\n\t\treturn full_image\n\tend", "title": "" }, { "docid": "9ffad7144e1cd0d...
3bd5628ec52becc02262759b88112568
POST /recruits POST /recruits.json
[ { "docid": "53a4974eb9ce68bb2bd1df753722e67a", "score": "0.5087303", "text": "def create\n\t params[ :recruit][ :birthday ] = params[ :recruit][ :birthday ].map{ | k, v | v }.join('/')\n\t \n @notice = Notice.find( params[ :notice_id ] )\n @recruit = @notice.recruits.build(recruit_params)\n\n r...
[ { "docid": "4c9846df2f932b872546294c82558be6", "score": "0.6643382", "text": "def create\n @recruiter = Recruiter.new(recruiter_params)\n\n if @recruiter.save\n render json: @recruiter, status: :created, location: @recruiter\n else\n render json: @recruiter.errors, status: :unprocessa...
9373f935f67a7c6c930ee0a3921a76ee
Public: Gets the WebSocket URL returned on the authentication request. Returns a [String] containing the WebSocket URL.
[ { "docid": "2f169d8d3c7f8911b0b714e8d6bcbd08", "score": "0.6996227", "text": "def ws_url\n body['url']\n end", "title": "" } ]
[ { "docid": "81b927d457bfdf6617ff7aa956a7f7c1", "score": "0.6827717", "text": "def url\n \"ws://#{host}/socket.io/websocket\"\n end", "title": "" }, { "docid": "ce935e977b496cd3572fec818c179b50", "score": "0.6601595", "text": "def websocket_host\n config.websocket.host ||...
9197b51621e7e9294ac535c673495a5b
Unlike a Hash, this object is only identical to another if the actual `object_id` attributes match.
[ { "docid": "896e07ee6f24b77f4c4e9cf5ad38d6f9", "score": "0.7354244", "text": "def ===(other)\n self.object_id == other.object_id\n end", "title": "" } ]
[ { "docid": "2cdaabb9dc9fa0af3796f90eeb773f80", "score": "0.7482977", "text": "def ==( other )\n self.object_id == other.object_id\n end", "title": "" }, { "docid": "0e25a4d82fe11a0e71ebb16e5b0a24a8", "score": "0.7318155", "text": "def == other\n self.object_id == other...
2d6d8632cb4d9b8648062f3173f45d5d
Gets the path to the script describing a cloud. === Parameters cloud_name(String):: a registered_type cloud name === Return cloud_script_path(String):: path to script used to describe cloud on creation === Raise UnknownCloud:: on error
[ { "docid": "0aae98554126f6855f9729dea3be755b", "score": "0.86605465", "text": "def registered_script_path(cloud_name)\n cloud_script_path = registered_type(cloud_name)\n raise UnknownCloud.new(\"Unknown cloud: #{cloud_name}\") unless cloud_script_path\n return cloud_script_path\n end",...
[ { "docid": "cd379832acf2804d58d14439fd6c23f7", "score": "0.57751817", "text": "def extend_cloud_by_scripts(cloud, logger)\n # search for script directories based first on any clouds which were\n # extended by the cloud and then by the exact cloud name.\n cloud_name = cloud.name.to_s\n ...
2a8edbef0ac7f928af8cfbf8aa4c72b8
DELETE /teaching_units/1 DELETE /teaching_units/1.json
[ { "docid": "a04e8fa7c86a3814a85532580dec6b03", "score": "0.7850712", "text": "def destroy\n @teaching_unit = TeachingUnit.find(params[:id])\n @teaching_unit.destroy\n\n respond_to do |format|\n format.html { redirect_to teaching_units_url }\n format.json { head :no_content }\n end\...
[ { "docid": "fa940ad167dd6a6161850b76a1fb5a37", "score": "0.7188762", "text": "def destroy\n @unit.destroy\n\n respond_to do |format|\n format.html { redirect_to units_url }\n format.json { head :no_content }\n end\n end", "title": "" }, { "docid": "62f4daad8a57f77546d4a76...
cb2921fa3797d2fa6789f8231421b24e
A + B = C + D, where A,B,C & D are integers values in the array Note: 1) Return the indices `A1 B1 C1 D1`, so that A[A1] + A[B1] = A[C1] + A[D1] A1 < B1, C1 < D1 A1 < C1, B1 != D1, B1 != C1 2) If there are more than one solutions, then return the tuple of values which are lexicographical smallest. Assume we have two so...
[ { "docid": "d98a63386be74a95080afd728deaba6e", "score": "0.0", "text": "def equal_sum(arr)\r\n result = []\r\n hash = {}\r\n first = 0\r\n last = 1\r\n until first == arr.length-1\r\n sum = arr[first] + arr[last]\r\n result << hash[sum].concat([first, last]) if hash[sum]\r\n...
[ { "docid": "f2e73830fefa9df9bea43540db367374", "score": "0.6570632", "text": "def solution(a)\n first = 0\n second = a.inject(:+)\n (1..a.count - 1).map do |p|\n first += a[p - 1]\n second -= a[p - 1]\n (first - second).abs\n end.min\nend", "title": "" }, { "...
f74c29bdfc4a183e1ec1b91334cd5be2
Use callbacks to share common setup or constraints between actions.
[ { "docid": "5b8b7246f15f38bb47e50f5beaead293", "score": "0.0", "text": "def set_facility\n @facility = Facility.find(params[:id])\n end", "title": "" } ]
[ { "docid": "bd89022716e537628dd314fd23858181", "score": "0.6164095", "text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n end", "title": "" }, { "docid": "3db61e749c16d53a52f73ba0492108e9", "score": "0.6046031", "text": "def action_hook;...
65b32e1c462ba46d6d3e66550df9a2d3
override and do nothing for widgets
[ { "docid": "9b9425348a26a19b15e942324573fa3a", "score": "0.0", "text": "def store_previous\n end", "title": "" } ]
[ { "docid": "30367f993bb4118873e937617b79539f", "score": "0.6825341", "text": "def widget\n end", "title": "" }, { "docid": "30367f993bb4118873e937617b79539f", "score": "0.6825341", "text": "def widget\n end", "title": "" }, { "docid": "edcb8cb09a31b60c9d8d95e4c6e8c15b",...
a0d51e7a0f286175c68e89480fabf023
Check if params of JSON is correct
[ { "docid": "4ead48b85903649ae6abc89df6f435c2", "score": "0.71248037", "text": "def wrong_params?\n if has_not_mandatory_params?\n render json: { message: \"Wrong data params\" }, status: 400\n end\n end", "title": "" } ]
[ { "docid": "9ac00586766e1540c8e497bcb63b5fc0", "score": "0.7444153", "text": "def valid?(json: {})\n json.present? && json[:title].present? && json[:data_access].present?\n end", "title": "" }, { "docid": "659af751772f880855f3845703c021f0", "score": "0.7407277", "...
631c0797fb1539cb06d163120e2c58eb
GET /admin/subcategories/1 GET /admin/subcategories/1.xml
[ { "docid": "a2b962adcbb9e738b7fdfd30e694af07", "score": "0.6369002", "text": "def show\n @subcategory = Subcategory.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @subcategory }\n end\n end", "title": "" } ]
[ { "docid": "78dfb9503a1f180a2ab2991151580d07", "score": "0.737773", "text": "def index\n @admin_sub_categories = Admin::SubCategory.all\n end", "title": "" }, { "docid": "f4db21616306c061a45df8f3702fd636", "score": "0.73718935", "text": "def index\n @rcadmin_subcategories = Rc...
a7e8658d599ea51aaf12ef2a849d9fd6
Default edit no code needed
[ { "docid": "cc103a6eee1eb0430e3425bacfcd66fd", "score": "0.0", "text": "def edit\n end", "title": "" } ]
[ { "docid": "03269b7353e60e7e373ef0b15969a043", "score": "0.8507808", "text": "def edit() end", "title": "" }, { "docid": "03269b7353e60e7e373ef0b15969a043", "score": "0.8507808", "text": "def edit() end", "title": "" }, { "docid": "f88aeaba1175a4da259885b7696cec80", "...
bec63309be7fd08c9bd0dc0caa488151
nueva vista de cala para cargas views con /views/nombrecontrolador
[ { "docid": "cbe9255ac828a4c792d3515d05e4ee29", "score": "0.0", "text": "def cala\n @prueba = \"esto es una variable\"\n end", "title": "" } ]
[ { "docid": "208019e9e8b7ec1baeaaaf66d08607e0", "score": "0.6148578", "text": "def index\n if current_usuario.admin?\n @campeonatos = Campeonato.all.order('data_inicio DESC')\n else\n @campeonatos = current_usuario.campeonatos.order('data_inicio DESC')\n end\n @title = I18n.t('views...
7e67e0194925a19c3b27c56510cbe6fd
def activate? update_attribute('activated', true) if self.activated return true else return false end end
[ { "docid": "cd7e5c57426dfa9b79db623f210b7804", "score": "0.0", "text": "def reset_password\n new_password = SecureRandom.hex(5)\n update_attributes!(:password => new_password )\n return new_password\n end", "title": "" } ]
[ { "docid": "a7f2047a16c7cb6ad78031b2c2f74d9c", "score": "0.8825849", "text": "def activate\n update_attribute(:activated, true)\n end", "title": "" }, { "docid": "080805a9c92e3f809409db73c7abe8c0", "score": "0.8549204", "text": "def activate\n update_attribute(:active, true)\n...
cac03becda8d622384f2a218c78089cf
=begin rdoc Returns user personal information. Post/Get params: user_id User ID hash SHA1 hash =end
[ { "docid": "65eb07154a14d821e6e9f6e1549217a9", "score": "0.0", "text": "def user_details\n doc = Builder::XmlMarkup.new(:target => out_string = \"\", :indent => 2)\n doc.instruct! :xml, :version => \"1.0\", :encoding => \"UTF-8\"\n\n #a bit nasty, huh? there are some issues after disabling se...
[ { "docid": "709b7a2b127fcd6bea6342e1ab77ca3a", "score": "0.69222295", "text": "def get_user(user_id)\n\trequest_type = \"GET\"\n\turl = \"user/#{user_id}\"\n\thash = create_hmac(request_type, url)\n\tresponse = http_send(request_type, url, hash)\nend", "title": "" }, { "docid": "789e506cb45c...
d0b89ec171ab581fa290d62add413dec
Kurzform zum Wiederherstellen einer Modelinstanz mittels einees Parameterhashs
[ { "docid": "8cdbb2958784214c9d12841e9b84a1e9", "score": "0.0", "text": "def as params\n params[:name] ||= \"\"\n self.for self.get_id(params)\n end", "title": "" } ]
[ { "docid": "9fe8cddf223625d4b3a88bd38fb25ad9", "score": "0.6692699", "text": "def model!(params)\n end", "title": "" }, { "docid": "25ef095d5de7c307034d6b76ddbcade4", "score": "0.6594384", "text": "def model_params\n if params.has_key?(:model)\n model_params = params.req...
997b47b3a2dc854d3590a4a6aa639db2
Returns the sum that we get from adding multiples of the given multiple up to the given upper_limit +multiple+:: the multiple we're incrementing by +upper_limit+:: the upper limit where the summing stops, inclusive
[ { "docid": "e9e1d646f33c51efe5191c26cc89111e", "score": "0.7969185", "text": "def sum_of_multiple(multiple, upper_limit)\r\n \r\n num_numbers = upper_limit / multiple # integer division on purpose\r\n odd = num_numbers % 2 == 1\r\n \r\n first_number = multiple\r\n last_number = multiple * num_nu...
[ { "docid": "03e2a4c4c5591d821562aa2cdbc7bf98", "score": "0.7849539", "text": "def sum_of_multiple(multiple, max = 999)\n max /= multiple\n (multiple * max * (max + 1)) / 2\n end", "title": "" }, { "docid": "5238a837a753bfd3be88756ca763b9bd", "score": "0.7489928", "text": "def ...
1ff2fa32b2e46a617c3e163cba21cb2d
the distinct type lattice within which this type lives. the type system as a whole can be seen as a set of nonoverlapping type lattices, together with tagged unions drawn from them. the interface for a type lattice is just that it responds to 'check_subtype'; by default the class of a type implements this interface
[ { "docid": "e2aebe86bcc76be2855199d7ba53caaa", "score": "0.706838", "text": "def type_lattice\n self.class\n end", "title": "" } ]
[ { "docid": "dfe83afd5eaaeb2bb31e1a45045782c5", "score": "0.6478375", "text": "def all_subtype\n all_type_inheritance_as_supertype.map(&:subtype)\n end", "title": "" }, { "docid": "3efc60159c0d2e62f26b0a3951380146", "score": "0.61905295", "text": "def subtypes\n # R...
3e7c4576bf3ffd5c6153f3412e9f682f
can count users who rsvped no, or access them
[ { "docid": "8764bfdc35600aa50b74059b86062ab0", "score": "0.6658706", "text": "def count_no\n rsvp.no.count\n end", "title": "" } ]
[ { "docid": "19067994db2a58d76cad54c8a9ff519c", "score": "0.7347931", "text": "def user_count; end", "title": "" }, { "docid": "0f7f53e75d596e1560e96c4b10311eab", "score": "0.65289986", "text": "def get_sales_user_count\n User.where(\"role = ?\", \"Sales-consultant\").count + User....
c8fa278058ee7150c62a7583c26e8ff1
POST /snapshots POST /snapshots.xml
[ { "docid": "cdfbb12009940624165c7edf119563d4", "score": "0.68596023", "text": "def create\n @snapshot = Snapshot.new(params[:snapshot])\n\n respond_to do |format|\n if @snapshot.save\n flash[:notice] = 'Snapshot was successfully created.'\n format.html { redirect_to(@snapshot) }...
[ { "docid": "3b5d24ef5f7c93f7ac9977fe894ab2d5", "score": "0.65951866", "text": "def create\n @snapshot = Snapshot.new(params[:snapshot])\n\n respond_to do |format|\n if @snapshot.save\n format.html { redirect_to @snapshot, notice: 'Snapshot was successfully created.' }\n format.j...
d45f5d90794ab84c72a5f224a6c28fc0
Returns the maximum password age in seconds
[ { "docid": "b0942f0b1cbce65b1ef0d1b5e7ef0d3c", "score": "0.8887268", "text": "def max_password_age\n AD.interval_to_secs(self['maxPwdAge'])\n end", "title": "" } ]
[ { "docid": "4842e3d1aa481126de64925aac077476", "score": "0.8675674", "text": "def max_password_age\n data[:max_password_age]\n end", "title": "" }, { "docid": "516796c686192cbfd2b78bd6f1c43e36", "score": "0.8640034", "text": "def max_password_age\n data.max_password_age\...
32904f693005dcf3e2df49297cbb6dd9
I spent [] hours on this challenge. Complete each step below according to the challenge directions and include it in this file. Also make sure everything that isn't code is commented in the file. 0. Pseudocode What is the input? input is a integer What is the output? (i.e. What should the code return?) return a string ...
[ { "docid": "cbd27e997230f54efbc602586f196f12", "score": "0.57752174", "text": "def separate_comma(number)\n num = number.to_s\n i = -4\n while i >= (-1 * num.length)\n num.insert(i, ',')\n i -= 4\n end\n p num.to_s\nend", "title": "" } ]
[ { "docid": "117f064c55d8d49b54af0b454b6c7314", "score": "0.70950484", "text": "def separate_comma_initial(integer)\n a = integer.to_s\n b = a.length\n if b <= 3\n \treturn a\n elsif b > 3\n \tif (b) % 3 == 0\n# So I will attempt to replace 3 with n, and have n change (length/3 - 1) amount of time...
f2a6e3072991ec2dbfce133c74d6a66d
Sets the blocks that this block instance depends on.
[ { "docid": "bc4d762446457e62222f12d9c6721927", "score": "0.0", "text": "def depends_on(*depends)\n @depends = depends.dup\n\n # Increment dependent references\n @depends.each { |b| b.ref }\n end", "title": "" } ]
[ { "docid": "0af561c05636234214f72b9b138f11a3", "score": "0.6531062", "text": "def set_blocks hash\n\t\t\t@blocks = hash\n\t\tend", "title": "" }, { "docid": "d40000d7c70dfd5151ed36033d95ce1a", "score": "0.60558265", "text": "def setup_blocks\n @setup_blocks ||= []\n end", ...
72cc88a04993274e92e41452f0c3068f
GET /fav_quotes GET /fav_quotes.json
[ { "docid": "82ef3b422883e3553b75a4bc3e2a23cf", "score": "0.72060937", "text": "def index\n @fav_quotes = FavQuote.all\n end", "title": "" } ]
[ { "docid": "ed041162d6140f01bb23db47645bf938", "score": "0.6877938", "text": "def index\n @favorite_quotes = FavoriteQuote.all\n end", "title": "" }, { "docid": "951b9e5cfb794d68d6f74ab66c9bbad1", "score": "0.68136764", "text": "def index\n @quotes = Quote.all\n json_resp...
93c74efb9fb863b64ed09c04c849f3be
Instance Methods Warden will call this methods
[ { "docid": "30b6829d14f966abd39012bfd6309a83", "score": "0.0", "text": "def disable_authentication_controls\n self.last_access = Time.now.getlocal\n cache_provider_delete_user(attributes(:id))\n attributes(:active, false)\n # TODO: Save User object to keep last login/access time\n ...
[ { "docid": "dfc25c7b0a24fa6b578417739d4565b4", "score": "0.80916464", "text": "def warden; end", "title": "" }, { "docid": "dfc25c7b0a24fa6b578417739d4565b4", "score": "0.80916464", "text": "def warden; end", "title": "" }, { "docid": "090f8aeefc03990ee7a067c230c12a5d", ...
c1cebfc87f97e390ff51a99955b0129b
GET /progres GET /progres.json
[ { "docid": "e1cd653a7747b7f4395e2a4cd9288441", "score": "0.61799407", "text": "def index\n @progres = Progre.all\n end", "title": "" } ]
[ { "docid": "73fe2bfa2d343040ce0e3b357d544ff2", "score": "0.71220386", "text": "def index\n @progresses = @task.progresses\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @progresses }\n end\n end", "title": "" }, { "docid": "0a6b3b90...
aaf48ec2082d4e80d3f11c0b237ca5c9
GET /messages GET /messages.json
[ { "docid": "2279e94aa23dbb56e7157bbedb9b488a", "score": "0.0", "text": "def index\n @messages = Message.where(user_id: current_user.id).or(Message.where(team_id: current_user.teams.first.id)).where.not(status: 'deleted').includes(:message_recipients).status_order.order('message_recipients.send_at')\n...
[ { "docid": "dbc96cdcfe96d0a5cfff134d321e521f", "score": "0.7986006", "text": "def messages\n get_data('/messages')\n end", "title": "" }, { "docid": "ea7086ff90058b90c171a0d36a56b3ff", "score": "0.7679086", "text": "def show\n @message = User.find(params[:id]).messages\n\n ...
0067ac687d264e8a8256bdb4f2bcb177
required parameters: name: instance_id, type: String optional parameters: name: _method, type: String, optional values: GET|POST name: _region, type: String name: _scheme, type: String, optional values: http|https name: owner_account, type: String name: owner_id, type: Long name: resource_owner_account, type: String na...
[ { "docid": "1623a008b63f05417eaca9e1b0a2926d", "score": "0.0", "text": "def deactivate_instance(instance_id, optional={})\n\t\targs = self.class.new_params\n\t\targs[:query]['Action'] = 'DeactivateInstance'\n\t\targs[:query]['InstanceId'] = instance_id\n\t\targs[:region] = optional[:_region] if (optiona...
[ { "docid": "05b15feaae8b01d1ec17b03ab8a2eef6", "score": "0.63261837", "text": "def describe_instances(optional={})\n\t\targs = self.class.new_params\n\t\targs[:query]['Action'] = 'DescribeInstances'\n\t\targs[:region] = optional[:_region] if (optional.key? :_region)\n\t\tif optional.key? :_method\n\t\t\...
0294a3e72bc6556773728146a18125df
Set the value of the Count input for this Choreo.
[ { "docid": "6a887f946fc41164b944ef007a47a226", "score": "0.78456545", "text": "def set_Count(value)\n set_input(\"Count\", value)\n end", "title": "" } ]
[ { "docid": "7bd3ed003afe9b9e884ba0ba58b16003", "score": "0.77416116", "text": "def count=(value)\n @count = value\n end", "title": "" }, { "docid": "ea1ffb6b67780393666702ed9d383c07", "score": "0.7542113", "text": "def set_Count(value)\n set_input(\...
5c7eb9f2341e0c87f84ef3ab47b4af71
DELETE /icons/1 DELETE /icons/1.json
[ { "docid": "d851443dcc4fffcc73aea0c22b0ca665", "score": "0.736994", "text": "def destroy\n @icon.destroy\n respond_to do |format|\n format.html { redirect_to icons_url, notice: 'アイコンの削除に成功しました' }\n format.json { head :no_content }\n end\n end", "title": "" } ]
[ { "docid": "7d66869193c3e18e4d92427ab51a9927", "score": "0.7545576", "text": "def destroy\n @icon.destroy\n render json: @icon\n end", "title": "" }, { "docid": "5e6152818135d3bad5ba918f3087515e", "score": "0.67887187", "text": "def destroy\n @user_icon = UserIcon.find(para...
7b64647ce7fd8154e2cc631fbdeaaadf
gets the previous (chronologically by complete time) Scan instance to the specified 'scan'. Returns nil if no prev scan.
[ { "docid": "568c487d0b3c8978cdcf1d375f5ed310", "score": "0.7615088", "text": "def prev_scan\n scan_ids = Scan.find(:all, :conditions => [\"dir = ?\", scan.dir], :order => \"complete\", :select => \"id\")\n index = scan_ids.index(scan)\n return nil if index == 0\n Scan.find(scan_ids[index - 1])\nend"...
[ { "docid": "f23644944f69836095bfe4b42a57c0b7", "score": "0.60673267", "text": "def prev\n unless self.tll_prev.nil?\n return self.class.unscoped.where(_id: self.tll_prev).first\n end\n\n nil\n end", "title": "" }, { "docid": "0db40aaf358b569046428...
2100b3e109f749d98b75158c2f3611a6
should have no starting point
[ { "docid": "ed36792f11d8d641e722aa74d1c6fff4", "score": "0.0", "text": "def reduce_to_total(source_array, starting_point)\n source_array.reduce(100) { |sum, n| sum + n }\nend", "title": "" } ]
[ { "docid": "0b98796674a795e4c861283cf019b18b", "score": "0.65800095", "text": "def skipped; end", "title": "" }, { "docid": "7d73ca93aed82d814ee3609681895be5", "score": "0.65592784", "text": "def missed?; end", "title": "" }, { "docid": "2ce582ff25b038394425b12ffac5ca1b",...
bb1bacdb7767b0e28df8d742e1104161
Delete quest and all the records it associated with
[ { "docid": "23cbc1eb5adc6de34a19324f0cd5b452", "score": "0.67112774", "text": "def destroy\n @quest = Quest.friendly.find(params[:id])\n create_round(@quest, action_name, @quest.campaign)\n @quest.destroy\n respond_to do |format|\n format.html { redirect_to campaigns_path }\n forma...
[ { "docid": "c0de8ca2d74ec6dbac5e9c4aafee9091", "score": "0.7857429", "text": "def delete!(name)\n $db.delete(:quests, @quest_id[name])\n @gui.update\n nil\n end", "title": "" }, { "docid": "ec559be6e73b72c10c88c0a0b1d2340c", "score": "0.7759274", "text": "def delete(name)\n...
5bad6bba952aec6415f7b4d0097ee0f9
PUT /porters/1 PUT /porters/1.json
[ { "docid": "68d70a541f14d9215b948e2f9ab8862e", "score": "0.71030796", "text": "def update\n @porter = Porter.find(params[:id])\n\n respond_to do |format|\n if @porter.update_attributes(params[:porter])\n format.html { redirect_to @porter, notice: 'Porter was successfully updated.' }\n ...
[ { "docid": "aec4b4d9f4547d32ad4ffa88671b0647", "score": "0.6402041", "text": "def set_porter\n @porter = Porter.find(params[:id])\n end", "title": "" }, { "docid": "2de6059a4b785afc81af8e1614779ac8", "score": "0.6247471", "text": "def update\n respond_to do |format|\n ...
be052847226ff8335457a3afc94dbe16
Returns the current page number of the manga. This will not make any api calls and only looks at (url, referer_url).
[ { "docid": "5a2760d03ccd516670779956c3e32e5e", "score": "0.76784056", "text": "def manga_page\n # http://i2.pixiv.net/img04/img/syounen_no_uta/46170939_p0.jpg\n # http://i1.pixiv.net/c/600x600/img-master/img/2014/09/24/23/25/08/46168376_p0_master1200.jpg\n # http://i1.pixiv.net/img-...
[ { "docid": "c565283bf5d68a4fae6752ca3a3e77c5", "score": "0.7303584", "text": "def PageNo()\n\t\t#Get current page number\n\t\treturn @page;\n\tend", "title": "" }, { "docid": "f1f54ddd22ef2a4002a045bdb84d1a79", "score": "0.71807593", "text": "def current_page_number\n (previous_...
45c6c98bf891c4b0f864b6c814b4ffcb
GET /students/new GET /students/new.xml
[ { "docid": "a411f1dda67de5ee7ae392aedbe7d300", "score": "0.0", "text": "def new\n @student = Student.new\n # @student.hours << Hour.new\n @hours = Hour.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @student }\n end\n end", "title...
[ { "docid": "00c110650ed085ae58cc72e4aba39b1e", "score": "0.76820624", "text": "def new\n @student = Student.new\n \n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @student }\n end\n end", "title": "" }, { "docid": "95246ef6fde506f83...
14e10bd9c13a1a7ee62234cd3355a42c
publish a dataset to S3 for caching
[ { "docid": "bb5ab82c3d53cde9c85cd5b22383dcaf", "score": "0.0", "text": "def publish\n file = Tempfile.new('csv_cache')\n file << approved_csv\n file.close\n csv_file.attach(io: File.open(file),\n filename: \"#{id}-#{title.tr(' ', '-')}.csv\",\n content_t...
[ { "docid": "70a21db74eae49c42c2f3e547f82b5f7", "score": "0.6978583", "text": "def write(data)\n s3 = Aws::S3::Resource.new(region: @awsRegion,\n credentials: Aws::Credentials.new(@awsAccessKeyID,\n @awsSecretAccessKey))\n obj = s3.bucket(@bucket).object(@key)\n obj.put(bod...
514f13906de095a74b3da0d731e5bfa5
Tries to fallback into the DB, otherwise it logs an error and fails.
[ { "docid": "315d88d0df235df583ef46e7719b7179", "score": "0.0", "text": "def binding_failed!(connection, username)\n return if User.exists?(username: username)\n\n logged_error_message!(connection, username)\n end", "title": "" } ]
[ { "docid": "c1da49a8a0ef78c17c8d5cf87ee32ae3", "score": "0.6504236", "text": "def failsafe\n begin\n yield\n rescue Exception => error\n raise if @fallback.nil?\n\n @fallback.call(error, @selected_backend)\n\n close_connection\n end\n end", "title": "" ...
91304eb8a81d0b1ab38e2235010d10b3
Lists all direct deposits
[ { "docid": "b1e200ab5eb16172415a635da66a225c", "score": "0.71219116", "text": "def get_directdeposits(opts = {})\n data, _status_code, _headers = get_directdeposits_with_http_info(opts)\n data\n end", "title": "" } ]
[ { "docid": "d8e3368193f4e60cafc3990081243167", "score": "0.73189914", "text": "def index\n @deposits = @member.deposits\n end", "title": "" }, { "docid": "894ff069d12ae545e54436465af41798", "score": "0.7178584", "text": "def index\n @deposits = current_user.deposits\n end", ...
e77d0fc51572a8a87a5198d8ee16fb6a
Check for the use of an obsolete RDF property
[ { "docid": "5c903e5a28216e87321f8f2990476870", "score": "0.77108824", "text": "def old_property_check(el)\n el.attribute_nodes.each do |attr|\n if OLD_TERMS.include?(attr.uri.to_s)\n add_debug(el, \"Obsolete attribute '#{attr.uri}'\")\n raise RDF::ReaderError.new(\"Obsolete...
[ { "docid": "74e74acf4dd5c0c35b6366544a243a8b", "score": "0.74535614", "text": "def old_property_check(el)\n el.attribute_nodes.each do |attr|\n if OLD_TERMS.include?(attr.uri.to_s)\n add_error(el) {\"Obsolete attribute '#{attr.uri}'\"}\n end\n end\n end", "title":...
c657de4b70d266e9a3a784b999ea9e60
Never trust parameters from the scary internet, only allow the white list through.
[ { "docid": "e3d26099944443cfce5f900bc5963c50", "score": "0.0", "text": "def repair_params\n params.require(:repair).permit(:id, :issueNo, :issueDate, :arriveDate, :startDate, :finishDate, :beforeComment, :afterComment, :timeOfRunning, :dayOfTest, :returningComment, :arrivalComment, :orderNo, :order...
[ { "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...
41553efe77b563462957e6db2da4ff9f
Ported over logic from app/helpers/dor_object_helper.rbLN160
[ { "docid": "962f953ad9eb94a5a1e7df064e69e6fd", "score": "0.0", "text": "def check_if_can_open_version\n return false unless check_if_accessioned\n return false if get_active_lifecycle('submitted')\n return false if get_active_lifecycle('opened')\n\n true\n end", "title": "" } ]
[ { "docid": "37cdba0f8108c8e03598feeca3770ded", "score": "0.6761372", "text": "def objectish; end", "title": "" }, { "docid": "99da79118e91e2758fbed111079233d2", "score": "0.62116593", "text": "def object(objectish); end", "title": "" }, { "docid": "55f9d989d4861c21f3f845e...
92c6e016999d4c868acfdf6b1f6dd29e
Function To Reject Comments
[ { "docid": "823f2f847489a13bd620f4fd4e82a565", "score": "0.0", "text": "def reject_comment\r\n @hmm_user=HmmUsers.find(session[:hmm_user])\r\n @comment =Comments.find(params[:id])\r\n @comment['e_aprove_comment'] = 'Reject'\r\n @comment.save\r\n redirect_to :action => :guest_comment\r\n ...
[ { "docid": "9231e39179b0c8d80a89d6eef5b28545", "score": "0.7384803", "text": "def can_comment?() false end", "title": "" }, { "docid": "9231e39179b0c8d80a89d6eef5b28545", "score": "0.7384803", "text": "def can_comment?() false end", "title": "" }, { "docid": "75bc72b93457...
cb5a9873fdc41558877996bdee6e58e1
autofetch coordinates Full address for geocoding
[ { "docid": "424c032260524a08745ca14b9e5163df", "score": "0.0", "text": "def full_street_address\n [street, city].compact.join(', ')\n end", "title": "" } ]
[ { "docid": "c82d0887e34a35238f51b18d25918ec8", "score": "0.7260768", "text": "def geocode( query = self.addressable )\n location = Geocoder.search( query ).pop\n self.coordinates = location.coordinates\n self.addressable = location.address\n self.city = location.city\n self.state = locati...
2d31eb4fd40155aa3a9ddc17f1d16274
GET /subscriptions/new GET /subscriptions/new.json
[ { "docid": "0cbf5dc75eb2efdf886e333aa1096a1a", "score": "0.6276949", "text": "def new\n @subscription.transaction = Transaction.find(params[:transaction_id])\n @subscription.year = @subscription.transaction.date.year.to_s\n @subscription.payment = @subscription.transaction.amount\n @subscrip...
[ { "docid": "1d5178f20f1c273b2e56b58834c2d6a5", "score": "0.82936084", "text": "def new\n @subscription = current_user.subscriptions.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @subscription }\n end\n end", "title": "" }, { "doc...
f74c29bdfc4a183e1ec1b91334cd5be2
Use callbacks to share common setup or constraints between actions.
[ { "docid": "8254ec44eee03dfe1c9cb48920354244", "score": "0.0", "text": "def set_task\n @task = Task.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...
6b27782444f0477a4ebeb683a3d3c393
List rules List rules
[ { "docid": "c7ee150c65b1fa2c58e483784184e2c5", "score": "0.0", "text": "def list_security_rules_with_http_info(domain_id, security_policy_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: PolicySecurityEastWestSecurityDistributedFirewallRulesApi...
[ { "docid": "42278e5afb7f1af71029c50698955635", "score": "0.8187041", "text": "def list_rules(options=nil)\n raise NotImplementedError\n end", "title": "" }, { "docid": "64ae89b00118f610e3dff1aa9d4c2249", "score": "0.80212545", "text": "def rules\n @@api.get(endpoint: \"r...
c63aa851d318e7d3958b5443b6681d8d
read_file parse_data Description: Split the text lines into a hash with team and rgb values
[ { "docid": "2e0bcd074d4aab5d7d50460d2ab9ec60", "score": "0.74961954", "text": "def parse_data( text )\r\n\t\t# Sample line of text:\r\n\t\t# Kentucky:23,56,89\r\n\t\t# Will look like: { \"Kentucky\" => { \"R\" => 23, \"G\" => 56, \"B\" => 89 } }\r\n\t\tcolor_hash = {}\r\n\t\ttext.each{ |line|\r\n\t\t\tt...
[ { "docid": "1e502a5e11b789897b3261bf0b0f2f3e", "score": "0.6558889", "text": "def initialize\r\n\t\ttext = read_file\r\n\t\t@colors_hash = parse_data( text )\r\n\tend", "title": "" }, { "docid": "67595e3080bde33d4175aa6f6fc3da3b", "score": "0.6539611", "text": "def parse\n @file_d...
a54b78bb028e7e487bacd615016b51e5
POST /post165s POST /post165s.xml
[ { "docid": "58a0e6b57a4c7f6debdb18ae82ab044d", "score": "0.63620955", "text": "def create\n @post165 = Post165.new(params[:post165])\n\n respond_to do |format|\n if @post165.save\n format.html { redirect_to(@post165, :notice => 'Post165 was successfully created.') }\n format.xml...
[ { "docid": "adbd4063f9795c23205a346f6dfd3f22", "score": "0.6474761", "text": "def post uri, args = {}; Request.new(POST, uri, args).execute; end", "title": "" }, { "docid": "ff64f712ca5c171b73151901dc47c4f6", "score": "0.6141024", "text": "def postRequest\n assertRequestData\n ...
6af20d2108acb05265ea740c654ee842
PATCH/PUT /interventions/1 PATCH/PUT /interventions/1.json
[ { "docid": "f84ec8c6fd886ea8018f3757e701b3c5", "score": "0.69632506", "text": "def update\n respond_to do |format|\n if @interventions.update(intervention_params)\n format.html { redirect_to @intervention, notice: 'Intervention was successfully updated.' }\n format.json { render :s...
[ { "docid": "bcfd1c9a89e089102d7db6797942dcce", "score": "0.688559", "text": "def update\n @intervention = Intervention.find(params[:id])\n\n respond_to do |format|\n if @intervention.update_attributes(params[:intervention])\n format.html { redirect_to @intervention, notice: 'Interventi...
743060474f50c1c77cf3d7546c190f2e
Create a new instance of the +AvroUtil+ class.
[ { "docid": "c601e4d2f4c7be9e5660de86ba1ec60b", "score": "0.0", "text": "def initialize\n @namespace = ENV.fetch('KAFKA_SCHEMA_SUBJECT_PREFIX',\n Rimless.topic_prefix).tr('-', '_').gsub(/\\.$/, '')\n @env = @namespace.split('.').first\n end", "title": "" } ]
[ { "docid": "3c8c66e9f3dd39c4650bed8507f9c6c0", "score": "0.65574557", "text": "def pickle\n Java::OrgApacheAvroUtil.Utf8.new(self)\n end", "title": "" }, { "docid": "b4d8e467fa14c6d3ba9bf5f6a7635fa8", "score": "0.6516419", "text": "def pickle\r\n Java::OrgApacheAvroUtil.Utf8.n...
c2edb584a70d56a7bcc90c5a94d0bd4a
return a designers credits sorted by year, title (of production), code and seq (of credit)
[ { "docid": "9533c68cc4d347c8ae32b1b3caf4e5c1", "score": "0.74846315", "text": "def sorted_credits\n credits.includes(:productions).order('productions.year, productions.title, credit_code, credit_seq')\n end", "title": "" } ]
[ { "docid": "6e58ef770134c6136605145e8573c5c0", "score": "0.60455376", "text": "def credits\n return unless album['credits']\n\n groups = {\n :artistic => /guitar|drums|vocals|bass|composer|primary artist/i,\n :technical => /engineer|producer|mixing|mastering|tracking/i\n }\n\n cred...
caeedbd62b105de30285fa51a3c172e2
Funcion que se encarga de verificar la operacion AsignacionA
[ { "docid": "f49bdd6f38af636f17a7da84444455f8", "score": "0.7116238", "text": "def verificarAsignacionA(expresion, tablaActual)\n #Se busca en los alcances hasta encontrar la primera expresion valida a izquierda\n tablaAux = tablaActual\n izquierda = verificarExpresion(expresion.id, ...
[ { "docid": "10183153aceeffe664e8c6db7ea7b7e8", "score": "0.66048133", "text": "def verificarAsignacionB(expresion, tablaActual)\n #Se busca en los alcances hasta encontrar la primera expresion valida a izquierda\n tablaAux = tablaActual\n izquierda = verificarExpresion(expresion.id,...
401793923db66a6bc80c995dc9721622
PUT /consumer/1/contacts/1 PUT /consumer/1/contacts/1.json
[ { "docid": "0a38fd4406d6810cba6b44c75ee6fbba", "score": "0.6898953", "text": "def update\n @consumer_contact = @consumer.consumer_contacts.find(params[:id])\n\n respond_to do |format|\n if @consumer_contact.update_attributes(params[:consumer_contact])\n format.html { redirect_to consum...
[ { "docid": "a21658e8869b48b877bfbe57de8fb717", "score": "0.7358429", "text": "def update_contact\n url = Addressable::URI.new(\n scheme: 'http',\n host: 'localhost',\n port: 3000,\n path: '/contacts/3'\n ).to_s\n\n puts RestClient.put(\n url,\n { Contact: { email: \"wacky_new_email@...
1d981029885f426ed67ba4875d99f525
Use alternative tuning systems In most music we make semitones by dividing the octave into 12 equal parts, which is known as equal temperament. However there are lots of other ways to tune the 12 notes. This method adjusts each midi note into the specified tuning system. Because the ratios between notes aren't always e...
[ { "docid": "f9d5a22c8abd4a40c2de2c7d0e9eba9e", "score": "0.5063834", "text": "def use_tuning(_tuning = nil, _fundamental_note = nil)\n #This is a stub, used for indexing\nend", "title": "" } ]
[ { "docid": "589b36c3876306ff184ff5fde4fbf2fe", "score": "0.5783459", "text": "def set_chords_to_tuning tuning\n longest_tuning_str_length = tuning.max.length\n Chordy.tuning = tuning.map { |e| e.rjust(longest_tuning_str_length) }\n\n Chordy.chords.select { |c| c.is_a? Chord } .each { |e| e.pad_...
58d5b66ecbe294cd7b132f8f0d5ccbc2
processes a clk_write, depending on the current clk_state see clk
[ { "docid": "d5a07af6a99b7fe393386d6ed19fcc6c", "score": "0.75918525", "text": "def clk_write\n \n case @clk_state\n\n when 0\n @address = @mar.content.bin_to_dez\n\n when 1\n @value = @mdr.content\n\n when 2\n @memory[@address] = @value\n\n ...
[ { "docid": "3aca5b76e15fc880f98a19897ebb47ea", "score": "0.63539016", "text": "def clk\n raise RuntimeError.new(\"Memory can not read and write at the same time\") if @write == 1 and @read == 1\n\n if @read == 1\n clk_read\n\n elsif @write == 1\n clk_write\n\n else \n ...
90b3f13ae08a2fe202468df4af49f3f2
Discards the specified flash so it doesn't show up on the next request
[ { "docid": "6acffd3b123a94517af33a79da5b7604", "score": "0.0", "text": "def discard(key = nil)\n if key\n @next.delete(key)\n else\n @next = {}\n end\n end", "title": "" } ]
[ { "docid": "f2f0c8a0db86900690dc9237757aafe4", "score": "0.78957653", "text": "def discard_flash\n flash.discard\n end", "title": "" }, { "docid": "85fbd8d8465b873c12f14bc45f3b3d4e", "score": "0.7248271", "text": "def hide_flash(key)\n return unless request.xhr?\n\n discard...
edcacce0d00746aa98d3a4ce4e4ef849
GET /dy_contents/1 GET /dy_contents/1.json
[ { "docid": "a81945373733e4951b987de6ea99f9a1", "score": "0.0", "text": "def show\n end", "title": "" } ]
[ { "docid": "14efcdb7fd96bd5c85c21523e3b3c174", "score": "0.60715914", "text": "def get_content(base_path)\n request_url = \"#{base_url}/content?link=#{base_path}\"\n get_json(request_url)\n end", "title": "" }, { "docid": "956e82bbbddab45664147f5b34e44eb4", "score": "0.60097...
411ba3cef1df7324ab57209d82beedb8
Override the directory where uploaded files will be stored
[ { "docid": "b5e251baf648b84f77b214dcbde88be3", "score": "0.7057569", "text": "def store_dir\n \"uploads/#{model.class.to_s.underscore}/#{model.id}\"\n end", "title": "" } ]
[ { "docid": "48ba4e84d748233102af81a1eeea1cc9", "score": "0.7763881", "text": "def store_dir\n 'uploads'\n end", "title": "" }, { "docid": "48ba4e84d748233102af81a1eeea1cc9", "score": "0.7763881", "text": "def store_dir\n 'uploads'\n end", "title": "" }, { "docid":...
c7d29bec1dc7e6d1edb75d732a356540
4 FINALIZE ARRAY CONTENT Takes returned array from Step 3 and add xX_ to front of array and Xx_ to end of array add_cases_to_array: the array from Step 3 returns an array with xX_ at array(0) and Xx_ at array(1) example: finalize_array(["D", "a", "V", "i", "D", "a", "G", "a", "F", "f", "N", "e", "Y"]) => ["xX_", "D", "...
[ { "docid": "f71df585906bfd6cf9951f0ad7eb32cd", "score": "0.60125357", "text": "def finalize_array(add_cases_to_array)\n\tadd_cases_to_array.unshift(\"xX_\")\n\tadd_cases_to_array<<\"_Xx\"\nend\n\n\n\n\n\n\n\n\n### 5 TURN FINALIZED ARRAY INTO FINAL STRING\n##################################\n#\t\tTakes r...
[ { "docid": "bb8c2513c98904c332f1b0b629a1016c", "score": "0.56909597", "text": "def buildarray\n\n for cases in 0 .. @input.number_of_cases-1\n @item_list << @input.builditemobject #Makes array of CaseInformation objects\n end\n end", "title": "" }, { "docid": "2d9...
7d448c740a6789940f4d1e42b72ed3b2
Filters out only multiple choice questions from Section 3, except those multiple choice questions, which are set up to use a detaiuls field to enter a numeric value.
[ { "docid": "6e9ce742b29b59c8818718cd5877a660", "score": "0.50554085", "text": "def multi_answer_answers_rel(questions_rel)\n MultiAnswer.\n from('pt_multi_answer_answers_by_user_view multi_answers').joins(\n 'JOIN (' + questions_rel.to_sql + ') questions' +\n \" ON multi_an...
[ { "docid": "967cdcf8f1221bd668207dbeff1ee1b6", "score": "0.6190496", "text": "def allowed_question_formats\n QuestionFormat.where.not(title: 'Multi select box').order(:title)\n end", "title": "" }, { "docid": "1997805079b975b8516b9f61e063857d", "score": "0.5774323", "text": "def ...
1c5fa6f3c4f0be738edde0390d2dd55a
POST /whishlists POST /whishlists.xml
[ { "docid": "d3f5affb62b4629f738c51dba5405eab", "score": "0.6401345", "text": "def create\n @whishlist = Whishlist.new(params[:whishlist])\n\n respond_to do |format|\n if @whishlist.save\n format.html { redirect_to(whishlists_url, :notice => 'Movie name added to wishlist.') }\n f...
[ { "docid": "fd407c7943c6e43d996474dbb062f9a5", "score": "0.65477264", "text": "def create\n @washlist = Washlist.new(washlist_params)\n\n respond_to do |format|\n if @washlist.save\n format.html { redirect_to @washlist, notice: 'Washlist was successfully created.' }\n format.jso...
b1f31b19ea90a7043cd8bc57aff79de6
Finds and returns a widget
[ { "docid": "efa4e234eff36416815cff73c3c43b29", "score": "0.0", "text": "def wpath(window, str)\n depth = str.count('.')\n \n if depth == 2\n window.winfo_children.each do |some_widget|\n if some_widget.path == str\n return some_widget\n end\n end\n elsif depth == 3\n window...
[ { "docid": "33846d7105fccc2b61795621672f3403", "score": "0.7598538", "text": "def get_widget\n @widget\n end", "title": "" }, { "docid": "b111630c569d387ace1218c206a7d057", "score": "0.7110545", "text": "def find_widget(widget_id)\n find {|node| node.name.to_s == widget_id.t...