query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
44e7e53e1685bf6c01d4c32f616be61e | PATCH/PUT /univers/1 PATCH/PUT /univers/1.json | [
{
"docid": "df0bb2c64cc359fd9d2a37da5b94b3ee",
"score": "0.6030391",
"text": "def update\n respond_to do |format|\n if @univer.update(univer_params)\n format.html { redirect_to @univer, notice: 'Univer was successfully updated.' }\n format.json { render :show, status: :ok, location... | [
{
"docid": "d9faffa1509ccd1c7cfa8bb818243897",
"score": "0.6404654",
"text": "def update\n @universidad = Universidad.find(params[:id])\n\n respond_to do |format|\n if @universidad.update_attributes(params[:universidad])\n format.html { redirect_to @universidad, notice: 'Universidad wa... |
15357d99aa10276872e9b114805f8d72 | Default vaules for arguments | [
{
"docid": "301a2b17e941aa3b1b45652edabac741",
"score": "0.7509507",
"text": "def default_args(a,b,c=1)\n puts \"\\nValues of variables: \",a,b,c\nend",
"title": ""
}
] | [
{
"docid": "57ae4e151cade7792bbd7daf96a8d201",
"score": "0.78734386",
"text": "def default _args\n \"default _args;\" \n end",
"title": ""
},
{
"docid": "2f09a2666c551670e4a440a3ca128628",
"score": "0.7371773",
"text": "def default_args\n args.select &:default\n e... |
58779cfc59480b2053c41f3082f61fd6 | Update a media request in the conversation, setting the state to ACCEPTED/DECLINED/ERRORED | [
{
"docid": "f438201942958224462dc11fe14e2cf5",
"score": "0.0",
"text": "def patch_webchat_guest_conversation_mediarequest_with_http_info(conversation_id, media_request_id, body, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: WebChatApi.patch_web... | [
{
"docid": "201c6592eb66791bb750bebeedd5e872",
"score": "0.6559561",
"text": "def update\n Stitches::Error.new(code: 'invalid_state', message: 'Can not edit media that has been sent in message') && return if @medium.present? && @medium.has_been_sent?\n\n mp = medium_params\n if mp[:object]\n ... |
6a20249c3049c6a46cadd4afad0d56ff | Notification of failure of last executed goal. All moves up to most recent backtrack point are dropped. | [
{
"docid": "98c89e506bfec05cf20ec2e664d543de",
"score": "0.71125126",
"text": "def failed!\n @resultant = :\"#u\"\n\n # Remove all items until most recent backtrack point.\n until move_queue.empty? ||\n (last_move.kind_of?(Bookmark) && last_move.kind == :bt_point)\n ... | [
{
"docid": "763851dd6e76f1ac66b889cb7a768e1e",
"score": "0.6579497",
"text": "def failure\n current.failure if running?\n end",
"title": ""
},
{
"docid": "86b3144c406cb5ed034dc84011b91212",
"score": "0.642775",
"text": "def force_failed_finish\n leg = @legs.best_leg\n ... |
936293beced7fabf9f02dae5dd040b69 | NOTE: There are potentially two of these toggles for the same obs, on the obs_needing_ids index. Ideally, they'd be in sync. In reality, only the matrix_box (page) checkbox will update if the (lightbox) caption checkbox changes. Updating the lightbox checkbox to stay sync with the page is harder because the caption is ... | [
{
"docid": "c2cfe4b5821a794d76c00b98208e5917",
"score": "0.46423385",
"text": "def mark_as_reviewed_toggle(id, selector = \"caption_reviewed\",\n label_class = \"\")\n render(partial: \"observation_views/mark_as_reviewed\",\n locals: { id: id, selector: selector... | [
{
"docid": "b0383d1e084d7e3702fbe4d3d7aaebc9",
"score": "0.57310045",
"text": "def lightbox_obs_caption(html, obs_data, identify)\n if identify ||\n (obs_data[:obs].vote_cache.present? && obs_data[:obs].vote_cache <= 0)\n html << propose_naming_link(obs_data[:id], context: \"lightbox\")\n ... |
e410338d34b5e39c68304d4272abf007 | POST /rounds POST /rounds.json | [
{
"docid": "25f34da984ccf753643605d15627154e",
"score": "0.66656566",
"text": "def create\n @round = Round.new()\n \n\n @dateTime = Time.new\n @conservative = isConservative\n @result = resultRulleteBet\n\n @round.dateTime = @dateTime\n @round.conservative = @conservative\n @roun... | [
{
"docid": "39e16289f1070b6124ffc0b1b1078e4c",
"score": "0.7104489",
"text": "def create_rounds\n Round.create_rounds(id)\n\n\n end",
"title": ""
},
{
"docid": "39e16289f1070b6124ffc0b1b1078e4c",
"score": "0.7104489",
"text": "def create_rounds\n Round.create_rounds(id)\n\n\n ... |
d504ff86e547ec37d0454003f2c7eedb | PUT /friends/1 PUT /friends/1.json no point to update a friend. | [
{
"docid": "6f12b388e3e748a53e94232cf2520220",
"score": "0.7300497",
"text": "def update\n @friend = Friend.find(params[:id])\n\n respond_to do |format|\n if @friend.update_attributes(params[:friend])\n format.html { redirect_to [@smb, @selector, @friend], :notice => 'Friend was succes... | [
{
"docid": "22bec35d0e9268fa8997359bbb572d0c",
"score": "0.7621429",
"text": "def update\n @friend = friend.find(params[:id])\n\n if @friend.update(friend_params)\n head :no_content\n else\n render json: @friend.errors, status: :unprocessable_entity\n end\n end",
"title": ""
... |
99faf9778f4979252311cf3b670d4dea | 4.1 Font Handling close_font(int font) | [
{
"docid": "a90b34842ca990afce6b1b20eefb767b",
"score": "0.8653942",
"text": "def close_font\n @p.close_font(self)\n end",
"title": ""
}
] | [
{
"docid": "373b82d40bd015664cbe48ca2f47ad90",
"score": "0.77583593",
"text": "def unload_font(font_handle)\n end",
"title": ""
},
{
"docid": "8c7945d21c58dc8c021aa811be465ad4",
"score": "0.6190914",
"text": "def close\n @graphic.ungetch(?q.ord)\n end",
"title": ""
},
... |
a2099a77c85e91272ae2f9e35b937953 | Only allow a trusted parameter "white list" through. | [
{
"docid": "f000ea5b8525dfb54707191ea547476b",
"score": "0.0",
"text": "def act_params\n params.require(:act).permit(:state, :name, :city, :date, :preambula) \n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7943618",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "f6060519cb0c56a439976f0c978690db",
"score": "0.69572574",
"text": "def permitted_params\n params.permit!\n end",
"title"... |
c056c65bbcb77b13d0af139f4529da25 | The happiness and hygiene points should be able to change, however the maximum and minimum points for both happiness and hygiene should be 10 and 0 respectively getter has min 0 and max of 10 setter | [
{
"docid": "9ac6220602121fc409be3489c774ef98",
"score": "0.6784908",
"text": "def happiness=(happiness_points)\n @happiness_points = happiness_points\n if @happiness_points > 10\n @happiness_points = 10\n elsif @happiness_points < 0\n @happiness_points = 0\n end\n end",
"title... | [
{
"docid": "a674839e8469f190159ac7d8797f7a19",
"score": "0.6773996",
"text": "def hygiene=(hygiene_points)\n if hygiene_points > 10\n @hygiene = 10\n elsif hygiene_points < 0\n @hygiene = 0\n else\n @hygiene = hygiene_points\n end\n end",
"title": ""
},
{
"docid":... |
62d6e247d9334155707530ddddb6dd8a | test format sip for once. | [
{
"docid": "e1d25ac579057d00ad4bc592f8a22bf6",
"score": "0.88061094",
"text": "def test_format_sip_v1(format_sip='')\n\t\t@test_client.test_format_sip_once_v1(format_sip)\n\tend",
"title": ""
}
] | [
{
"docid": "1cc34eb9b17d58add672320e67d5a968",
"score": "0.72440404",
"text": "def get_sip_from_pre_v1(pre_format_sip='')\n\t\tformat_sip = @test_client.test_preformat_sip_once(pre_format_sip)\n\t\t# get final perform of the format sip.\n\t\tformat_sip\n\tend",
"title": ""
},
{
"docid": "1cc... |
ed33b3df36e26a8b6ab4dde9b8f9d30d | Create a connection to an HBase table and keep it in memory. | [
{
"docid": "a28785301ba94112ae9d76a09d33b61a",
"score": "0.6487171",
"text": "def connect_table(table_name)\n safe_exec do\n table_name = table_name.to_s\n return @tables[table_name] if @tables.has_key?(table_name)\n\n if table_exists?(table_name)\n @tables[t... | [
{
"docid": "024314ae545e3b685837c39e60dc04cb",
"score": "0.8171873",
"text": "def connect(table_name)\n @conf = HBaseConfiguration.create\n admin = HBaseAdmin.new(@conf)\n @table = HTable.new(@conf, table_name)\n end",
"title": ""
},
{
"docid": "0786fff18a757b739c754853273ca208",
... |
ea39aa8fce793d56b305b2269da3767c | We try to catch skills as a method missing, nothing else should be caught this way | [
{
"docid": "b986982632ad701d68c155c80505cb32",
"score": "0.0",
"text": "def test(skill)\n s = self.skills.named(skill)\n Dice.test(s.effective_value)\n end",
"title": ""
}
] | [
{
"docid": "f92943f6e338bcd52765d6307fd4429b",
"score": "0.6302663",
"text": "def pick_skill; end",
"title": ""
},
{
"docid": "24799c5cce94e0955e2614220e94a709",
"score": "0.6132085",
"text": "def ask_equip_skills\n\tend",
"title": ""
},
{
"docid": "d4e170da8d07d573b1ccbb... |
e289735b45dbce946c7f99261813e949 | Examples: Input: 42145 Output: 54421 Input: 145263 Output: 654321 Input: 123456789 Output: 987654321 | [
{
"docid": "3c3f4cfc54a6aa6414b44f7159b98468",
"score": "0.0",
"text": "def descending_order(n)\n digit_arr = n.to_s.chars\n sorted_str = digit_arr.sort.reverse.join\n sorted_num = sorted_str.to_i\nend",
"title": ""
}
] | [
{
"docid": "36b0cc4672c5b01fa08e1a37de72f6bd",
"score": "0.69843113",
"text": "def input_string\n result = \"73167176531330624919225119674426574742355349194934\"\n result += \"96983520312774506326239578318016984801869478851843\"\n result += \"85861560789112949495459501737958331952853208805511\"\n re... |
76a61b31c4dc81b83bd3818bd3dba2c4 | Finds the contact and unsubscribes it from every segment. | [
{
"docid": "e0cf8b103af73095a5b7faf919cdd08f",
"score": "0.0",
"text": "def unsubscribe_contact(contact_email)\n request_body = {\n contact_email: contact_email\n }\n create_response = request_cm_email('/api/contacts/unsubscribe', request_body)\n end",
"title": ""
}
] | [
{
"docid": "d04478703fb5ad9018fd75f1ebbde707",
"score": "0.6761948",
"text": "def unsubscribe!(contact)\n # try to find the contact in the case watcher list\n subscriber = Case_Watcher_List.find(:first, :conditions => [\"case_watcher_id__c = ? AND contact_id__c = ?\",id,contact.id])\n # if the ... |
6c7f5387042a42dfb5af4213104caaa8 | GET /part_positions GET /part_positions.json | [
{
"docid": "5c9069d37d3a2ac2bf24ce69232ff0fc",
"score": "0.67748404",
"text": "def index\n @part_positions = PartPosition.paginate(:page => params[:page], :per_page => 100)\n end",
"title": ""
}
] | [
{
"docid": "a9e68ba624c1df5ea77770fe1c3a0b32",
"score": "0.6922573",
"text": "def part_position_params\n params[:part_position]\n end",
"title": ""
},
{
"docid": "d20f16eeab0ab1ec3207741d4c9fdb12",
"score": "0.6832308",
"text": "def index\n @part_positions = PartPosition.p... |
8ce644fbe05171b52afd1f437a5a83a4 | create a new menu in a block | [
{
"docid": "9a0cabb6a56040ad8d3838810e7afc20",
"score": "0.6592848",
"text": "def add_menu(name, path = nil, options = {}, &block)\n options[:flag_for_menu] = true if @options[:flag_for_menu] == true\n Ramenu.add_menu_to(menus, name, path, options, &block)\n end",
"title": ""
}
] | [
{
"docid": "c17955543965bccc8fc0390c8ed8f83a",
"score": "0.74666446",
"text": "def menu text, &block\n #$log.debug \"YYYY inside M: menu text #{text} \"\n m = Menu.new text, &block \n add m\n return m\n end",
"title": ""
},
{
"docid": "c1dbc1cc978d066cac8677bc65cce70f... |
642da2b4e373b36a22acf1b5941a93ed | Gets the ratios for this members in this pool. | [
{
"docid": "dd0952db14c594ace6ffd68c553c3302",
"score": "0.6145355",
"text": "def ratio(opts)\n opts = check_params(opts,[:members])\n super(opts)\n end",
"title": ""
}
] | [
{
"docid": "87885c5168e8e52b173f45866d198917",
"score": "0.7182594",
"text": "def ratio\n @ratio ||= (\n rcounts = counts.dup\n rcounts['Total'] = total\n r = Array.new(rcounts.size+1){ [] }\n x = 1\n rcounts.each do |type1, count1|\n r[x][0] = type1\n ... |
8719266dabc6e61682df5fa93fefd286 | Sets the theme for a given site. This theme change takes place immediately, but won't be seen on the published site until next publish. An "is_custom" flag is required in order to distinguish between Weebly themes and custom themes. | [
{
"docid": "9355310608146b91dc32d9937540e00e",
"score": "0.74988055",
"text": "def set_theme_site(user_id, site_id, theme_id, is_custom=true)\n\trequest_type = \"POST\"\n\turl = \"user/#{user_id}/site/#{site_id}/theme\"\n\tdata = {'theme_id'=>theme_id, 'is_custom'=>is_custom}\n\tcontent = data.to_json\n... | [
{
"docid": "9ceb8107fbf1e3cf49db3378a65ce899",
"score": "0.7030728",
"text": "def set_theme\n @theme = @current_shop.theme||@current_shop.create_theme\n end",
"title": ""
},
{
"docid": "85194fec71a04efa15b22822f4427d30",
"score": "0.67973906",
"text": "def theme=(value)\n ... |
7377e14c0f484d07bec1023a7571cb9a | GET /tutroles GET /tutroles.json | [
{
"docid": "8c0386e7b3543f68b74ea6fc7ad53c9d",
"score": "0.643076",
"text": "def index\n @tutroles = Tutrole\n .order(:id)\n .page(params[:page])\n end",
"title": ""
}
] | [
{
"docid": "fd6d98644a771196d9eeee6e36f133d8",
"score": "0.73916006",
"text": "def roles\n render :json => {:roles => User.roles}, :status => 200\n end",
"title": ""
},
{
"docid": "be168d7c75df5b88ee256c8e85f7a7f1",
"score": "0.7163107",
"text": "def list\n get('roles')[... |
3626bf7a8e7d9046d3f659b91f30f49c | This is a hack because we can't migrate entire APIs to use v1 [Varun 14th December 2016] | [
{
"docid": "bb59b7e89fe67c758d096acd3b61f701",
"score": "0.0",
"text": "def collection(slug, options)\n _get(\"v1/collections/\" + slug, options)\n end",
"title": ""
}
] | [
{
"docid": "927bc6f8e05860fb70fe95b0ae28bc97",
"score": "0.70044476",
"text": "def from_api?; false end",
"title": ""
},
{
"docid": "10718d42cac5d82a7c1d9e2550ce2f06",
"score": "0.6828135",
"text": "def api_only; end",
"title": ""
},
{
"docid": "10718d42cac5d82a7c1d9e2550... |
6cdc4eaa2065c76d3d24dfa12a88bed0 | initFighters Purpose: Initialize the fighters in combat. Parameters: The amount of fighters to initialize. Return: n/a | [
{
"docid": "7f59d752122c9c5e0dcf3abf6fa4caac",
"score": "0.7398027",
"text": "def initFighters(len)\n @fighters = []\n count = 1\n while count <= len\n maxhp = -1\n puts \"\\n> Creating combatant #{count}...\"\n\n # Get combatant data - currently onl... | [
{
"docid": "91311af50a6247491182320b960e95a6",
"score": "0.6082674",
"text": "def handle_fights\n @turn_iterattor=0\n while @first_fighter.health*@second_fighter.health>0\n @turn_iterattor+=1\n @fight_results_arr.push(space:\"\")\n @fight_results_arr.push(newTurn:\"Turn number #{@tu... |
f61da0c6c882758a3a82d2f95592d7fd | prevent modification of a cells contents. Default state: Cell locking is on Default action: Turn locking on Valid args: 0, 1 This property can be used to prevent modification of a cells contents. Following Excel's convention, cell locking is turned on by default. However, it only has an effect if the worksheet has been... | [
{
"docid": "7b1262a0405710cbacff172a344e6ed6",
"score": "0.54362065",
"text": "def set_locked(arg = 1)\n begin\n if arg == 0 then @locked = 0\n elsif arg == 1 then @locked = 1\n else\n raise ArgumentError,\n \"\\n\\n set_locked(#{arg.inspect})\\n arg must be 0, 1, ... | [
{
"docid": "c881b8b38519edf51f666218df00c2b0",
"score": "0.6586584",
"text": "def prevent_edits!(*)\n update!(editable: false)\n end",
"title": ""
},
{
"docid": "4f01f7d59ca336fde658e1cc4b099b1a",
"score": "0.6534329",
"text": "def lock_editing!\n update_attribute(:locked, tru... |
52a14464ac6a3dd0df928d77b869962c | bug fix for empty | [
{
"docid": "83a59003575c19a973206814acead93c",
"score": "0.0",
"text": "def test_empty_dict_key\n data = Plist::parse_xml(\"test/assets/test_empty_key.plist\");\n assert_equal(\"2\", data['key']['subkey'])\n end",
"title": ""
}
] | [
{
"docid": "4c04911a988a328b6df02093f999afba",
"score": "0.7669223",
"text": "def empty?; end",
"title": ""
},
{
"docid": "4c04911a988a328b6df02093f999afba",
"score": "0.7669223",
"text": "def empty?; end",
"title": ""
},
{
"docid": "4c04911a988a328b6df02093f999afba",
... |
cf541f4e3b882c423ba37cde844ace4d | Sets the value of the `memory_pools` attribute. | [
{
"docid": "145612dcf718ac33a86f98a9cc7e7710",
"score": "0.79928917",
"text": "def memory_pools=(list)\n if list.class == Array\n list = List.new(list)\n list.each_with_index do |value, index|\n if value.is_a?(Hash)\n list[index] = GlusterMemoryPool.new(value)\n ... | [
{
"docid": "eb12e6a2f3300d4efb20523e29aa5509",
"score": "0.7364718",
"text": "def memory_pools\n @memory_pools\n end",
"title": ""
},
{
"docid": "eb12e6a2f3300d4efb20523e29aa5509",
"score": "0.7364718",
"text": "def memory_pools\n @memory_pools\n end",
"title": ""... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "b7a6fbaeec89d7a733b978d9b024b5c0",
"score": "0.0",
"text": "def unidad_funcional_params\n params.require(:unidad_funcional).permit(\n :obra_id, :tipo, :precio_venta, :precio_venta_centavos,\n :precio_venta_moneda, :descripcion\n )\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... |
02f6758130018719cb651077cbfc6609 | The name of the latest system cache file. | [
{
"docid": "00ce060d8091ae681980eaf79bdc0bb4",
"score": "0.8064424",
"text": "def latest_system_cache_file\n self.class.latest_system_cache_file\n end",
"title": ""
}
] | [
{
"docid": "37483e0a41c9c6ae68856b86efc4046d",
"score": "0.8041146",
"text": "def latest_cache_file\n File.join File.dirname(cache_file), \"latest_#{File.basename cache_file}\"\n end",
"title": ""
},
{
"docid": "f28c96e0301887e0a603018fbc1d3f57",
"score": "0.7648028",
"text": "de... |
e7fcc12caaaa473458bc0a23f54652cc | Create a new Event | [
{
"docid": "a812730149f3f27328d5e0c50e7c265e",
"score": "0.0",
"text": "def initialize(opts)\n self.options = opts\n self.options[:time] = formatted_time(opts[:time]) if opts[:time]\n end",
"title": ""
}
] | [
{
"docid": "f29ca913531c4fff96594a2be64c2524",
"score": "0.84818536",
"text": "def create_event\n ev = Event.new\n ev.srv = @srv\n ev.feed = @feed\n ev\n end",
"title": ""
},
{
"docid": "ad8857ae8952e9ba75e1c1ca04f4cfe0",
"score": "0.8331283",
"text": "def new_... |
04116a10a5e6273c3429233eefa41aa5 | Restore this option to the default (remove this option) | [
{
"docid": "a5b7b296c98e06d865c5d56dd7b7a76a",
"score": "0.6125324",
"text": "def clear(option)\n @client.call('config.unset', option)\n end",
"title": ""
}
] | [
{
"docid": "0fde92164e674a3261dd845363495ae0",
"score": "0.771279",
"text": "def reset\n @options = Marshal.load(@default)\nend",
"title": ""
},
{
"docid": "fbe9f997c405fc45fe8d2beecba196fa",
"score": "0.7504448",
"text": "def reset!\n @options = Name.defaults.dup\n end",
... |
62a910509b5c6e9c29a3ce38bf6fcc0f | Handle _changed? for +method_missing+. | [
{
"docid": "76fd070f19022c5a3d9fa1d3da063500",
"score": "0.0",
"text": "def attribute_changed?(attr, options = {}) #:nodoc:\n result = changes_include?(attr)\n result &&= options[:to] == __send__(attr) if options.key?(:to)\n result &&= options[:from] == changed_attributes[attr] if options... | [
{
"docid": "e0dd97447c94dc5ef213ef419e56f6fe",
"score": "0.7623691",
"text": "def method_missing(method)\n case method.to_s\n when /(?:(.*)_)?changed_(.*)\\?/\n then\n klass = $1\n klass = klass.classify.constantize if klass\n attribute = $2\n# X... |
de7b981ddda6e38e2ccfecf22f0ef694 | Gets the os property value. Host Operating System. (For example, Windows10, MacOS, RHEL, etc.). | [
{
"docid": "c56ffba358d7d75e9bb3d54c240aeed9",
"score": "0.7651728",
"text": "def os\n return @os\n end",
"title": ""
}
] | [
{
"docid": "65e0fcd5944ec77ec1b82b89af0dba66",
"score": "0.8328277",
"text": "def get_os\n\t\tresult = \"\"\n\t\tos = RbConfig::CONFIG['host_os']\n\t\tif os.downcase.include?('linux')\n \t\t\tresult = 'linux'\n\t\telsif os.downcase.include?('darwin')\n \t\t\tresult = 'darwin'\n \t\tend\n \t\treturn ... |
21051201d51458d2ab4045f3a8c56146 | Determine whether an artifact has completed Options none Example a = Armadillo::TestArtifact.new() a.start() a.stop() a.completed? | [
{
"docid": "0311bee3a5d670d7dc78f648900159a1",
"score": "0.0",
"text": "def completed?\n @stop_time\n end",
"title": ""
}
] | [
{
"docid": "1f7e4e64c95ecfb7b1190b300c0706dd",
"score": "0.6703288",
"text": "def completed?; true; end",
"title": ""
},
{
"docid": "021278925baeda3a5cce90b4f7cdfd68",
"score": "0.64539593",
"text": "def completed?\n if self.experiment_size == 0\n false\n else\n super... |
13ec6307dc55218bd4a59406e302ea8c | Return the greatest number that's a factor of both inputs. greatest_common_factor(6, 10) => 2 greatest_common_factor(10, 15) => 5 | [
{
"docid": "e5c7152125716aea4c744bb3d698cd21",
"score": "0.8539833",
"text": "def greatest_common_factor(first_number, second_number)\n \nend",
"title": ""
}
] | [
{
"docid": "5fa7f31c6215b3a6ad755c40d1d15785",
"score": "0.86474866",
"text": "def greatest_common_factor(first_number, second_number)\nend",
"title": ""
},
{
"docid": "c14c928f750529c2b45a74c0da2c96c5",
"score": "0.8522776",
"text": "def greatest_common_factor(first_number, second_n... |
8e3d6492942da61aff42e88211844c82 | POST /canaries POST /canaries.json | [
{
"docid": "ca12540bf5cc2785b2b617cec2d203b2",
"score": "0.705293",
"text": "def create\n @canary = Canary.new(canary_params)\n @canary.created_by = current_user\n @canary.uuid = SecureRandom.uuid\n\n respond_to do |format|\n if @canary.save\n format.html { redirect_to @canary, n... | [
{
"docid": "e9c9b0d47ae0c976ce8311be18eb6980",
"score": "0.5988543",
"text": "def create\n @accessory = Accessory.new(params[:accessory])\n\n if @accessory.save\n render json: @accessory, status: :created, location: @accessory\n else\n render json: @accessory.errors, status: :unproces... |
a0e5dd4ca497b66178c97e1fc47b5518 | 9.7: Accept the root of a tree and return a nested array where each sub array contains all of the values from a single level of the tree | [
{
"docid": "fdf7634b6c3e62b707b670b570dad452",
"score": "0.67042196",
"text": "def tree_levels(root)\n q = [root]\n res = []\n level_count = 1\n level_vals = []\n\n until q.empty? \n node = q.shift\n level_count -= 1\n level_vals << node.val\n\n q << node.left if node.left\n q << node.right if... | [
{
"docid": "7096f6a674a93c8c9f7295c84b8a3fde",
"score": "0.76157683",
"text": "def flatten_tree(tree)\n array = []\n go_looking(tree, array)\n array\nend",
"title": ""
},
{
"docid": "332e1a5dc544903b60bf53308db596f5",
"score": "0.7241285",
"text": "def tree_by_levels(node)\n retu... |
ffede9bcff27d02cae84ceb629c46438 | Requires piece to have the unmoved= method | [
{
"docid": "512d375130c41c5df1ed57ca031da691",
"score": "0.68069345",
"text": "def adjust_unmoved_status(pos)\n board.square(pos).piece.unmoved = false\n end",
"title": ""
}
] | [
{
"docid": "bc6f19cf4a62f9694f4f8cbca51bb475",
"score": "0.75226057",
"text": "def removePiece(piece)\n if piece.instance_of?(Piece) && piece.location != nil\n piece.location.removePiece\n piece.location = nil\n end\n end",
"title": ""
},
{
"docid": "7b69bf96bb29d94852bf2b6f... |
25d4b02639cd28a2ac24feec94675bc7 | wait for object to disappear | [
{
"docid": "37c4e3caa3f965afde2c270d381d9d5a",
"score": "0.6690182",
"text": "def gen_wait_until_object_disappear object_path\n\t\tobject_found = true\n\t\tfor i in 1..DEFAULT_WAIT_LOOP_ITERATION do\n\t\t\tbegin\n\t\t\t\tputs \"Waiting for object to disappear\"\n\t\t\t\tgen_wait_less\n\t\t\t\tif(object_... | [
{
"docid": "df08dbca724f87aac664047b3ef12e99",
"score": "0.69133973",
"text": "def unwait\n @waiter_queue.push nil\n end",
"title": ""
},
{
"docid": "2e89903b9cc7f63570e5fd3228f9d09b",
"score": "0.6786675",
"text": "def wait_for_element_to_disappear(element)\n @wait.unti... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "26eb3407bab537f563c84fe83c656bff",
"score": "0.0",
"text": "def set_markup\n @markup = Markup.find(params[:id])\n \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... |
9a27bb896fd5cba178010e18d5f51111 | GET /inksignatures/1 GET /inksignatures/1.json | [
{
"docid": "07aea7a0df1c9db10c459b2395c88382",
"score": "0.72235817",
"text": "def show\n @inksignature = Inksignature.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @inksignature }\n end\n end",
"title": ""
}
] | [
{
"docid": "effbe7ffb2630e401de05cb1e6316039",
"score": "0.7028018",
"text": "def get_signature(signature_id)\n request :get,\n \"/v3/signatures/#{signature_id}.json\"\n end",
"title": ""
},
{
"docid": "094e6a3366f2fb8f5de4cf06195a63aa",
"score": "0.691155",
"text": "d... |
401d1d9a86f738e9a5a1700fac2f6478 | PATCH/PUT /calendar_bookings/1 PATCH/PUT /calendar_bookings/1.json | [
{
"docid": "109604ab3732978ab3671c2e6d3843fb",
"score": "0.7042505",
"text": "def update\n respond_to do |format|\n if @calendar_booking.update(calendar_booking_params)\n format.html { redirect_to @calendar_booking, notice: 'Calendar booking was successfully updated.' }\n format.js... | [
{
"docid": "497a6e9c931722af6cb79aa8f94ef24e",
"score": "0.71916735",
"text": "def update\n @booking.update_attributes(params[:booking])\n respond_with(@booking, location: bnb_bookings_url(@booking.bnb))\n end",
"title": ""
},
{
"docid": "b09fe5e935ad2691f1666a4e616975cd",
"score"... |
bf5619acf8d21974bf1b2c2181af650c | (Breadth first search specialization of FordFulkerson Algorithm) for Maximum Flow Problem in Ruby | [
{
"docid": "eaa8fb72e95ead7415bca38979603f70",
"score": "0.612048",
"text": "def maximum_flow(sources, sinks, graph_edges, directed: true, splitter: '#')\n\n parent_of = {} # for individual paths\n infinity = Float::INFINITY # for infinite path f... | [
{
"docid": "4cdf0ac8414a100c7d9ebdeb731dac85",
"score": "0.69512373",
"text": "def breadth_first_search(vertex, goal_vertex)\n\nend",
"title": ""
},
{
"docid": "b4b2e3a49c8c851a2922792ce37f9ddf",
"score": "0.68054074",
"text": "def bfs\n \n end",
"title": ""
},
{
"doc... |
abbd9403311992879bbef30cc040e862 | POST /taskitems POST /taskitems.json | [
{
"docid": "8dc2b79bd5e091a20735e9ef48b8dfeb",
"score": "0.7270538",
"text": "def create\n @taskitem = Taskitem.new(taskitem_params)\n\n respond_to do |format|\n if @taskitem.save\n format.html { redirect_to @taskitem, notice: 'Taskitem was successfully created.' }\n format.json... | [
{
"docid": "cd9dfa590fb7d3cb18178d96802d8e99",
"score": "0.74872977",
"text": "def create\n @task_item = TaskItem.new(task_item_params)\n\n respond_to do |format|\n if @task_item.save\n \n @task_list = @task_item.task_list\n @task_items = @task_list.task_items \n \... |
b7c479a5fe009d9a8555859080c104c7 | given a list of author name in 'author_display, create links to all items from each author in item metadata page (via author_facet) | [
{
"docid": "0206e44f6ab66d20b036399d3383904d",
"score": "0.8463781",
"text": "def author_links(author_display)\n p = params.dup\n p.delete :page\n p.delete :action\n p.delete :q\n p.delete :search_field\n p.delete :f\n p.delete :id\n p[:f] = {}\n authors = author_display.split... | [
{
"docid": "43700ea39ca98cd4650c0844779e5268",
"score": "0.75288683",
"text": "def show_authors(result)\n author_array = []\n if result['Items'].present?\n flag = 0\n authorString = []\n result['Items'].each do |item|\n if item['Group'].present?\n if item['Group'] ==... |
af630984682f1a0b5a68e6092af0d102 | Update properties of this object | [
{
"docid": "f768d5edfddb07c130ce22ac89f433be",
"score": "0.0",
"text": "def update!(**args)\n @eval_data = args[:eval_data] if args.key?(:eval_data)\n @is_annotated_from_text = args[:is_annotated_from_text] if args.key?(:is_annotated_from_text)\n @normalized_text = args[:norma... | [
{
"docid": "150fa2bdc1fc43d28ac45e2278a1f797",
"score": "0.7012677",
"text": "def update_properties(hash)\n hash.each do |key, value|\n setter_method = \"#{key}=\"\n if self.respond_to?(setter_method)\n self.send(setter_method, value)\n end\n end\n end",
"t... |
40fbb13fcb83fff85caa88a4f4c98e2c | ============ START SINGLE POSTCODE METHODS =========== | [
{
"docid": "b59457337fc4e43c086a2f1a4306e63b",
"score": "0.0",
"text": "def get_status\n @single_postcode[\"status\"]\n end",
"title": ""
}
] | [
{
"docid": "fd8c1017df87f4a3350c910347cbbac3",
"score": "0.70316696",
"text": "def post_data\n end",
"title": ""
},
{
"docid": "ad2205c7906eba71d704a0f8b9f0031f",
"score": "0.6764514",
"text": "def post_context; end",
"title": ""
},
{
"docid": "baab87ae75e57429edbe03... |
621db33f23cf6217bbc8892d40f86f47 | Gets the allowOwnerDeleteMessages property value. If set to true, owners can delete any message. | [
{
"docid": "1f4979c432416b08da046462c1ccacb0",
"score": "0.7971147",
"text": "def allow_owner_delete_messages\n return @allow_owner_delete_messages\n end",
"title": ""
}
] | [
{
"docid": "76482b34def5420d36e0355b70345aa9",
"score": "0.7882076",
"text": "def allow_owner_delete_messages=(value)\n @allow_owner_delete_messages = value\n end",
"title": ""
},
{
"docid": "e38874685e6c89bae2b021830d5e2501",
"score": "0.67765945",
"text": ... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "213e14190d2b603f70170bbddbce7e3a",
"score": "0.0",
"text": "def set_building\n @building = Building.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... |
067c8c1e9eb7e26c4eb598ce9a3514cb | Enforces authorization when called. Raises exception when unauthorized. | [
{
"docid": "a3b766fb42d28c68a7de51d78a59dcd7",
"score": "0.0",
"text": "def authorize(using: nil, skip_scoping: false)\n @_authorization_performed = true\n\n authorized = authorized?(controller: params[:controller],\n action: params[:action],\n ... | [
{
"docid": "237ed5c9401ac1b73887c68e5c6f0eb7",
"score": "0.7659087",
"text": "def authorization_required\n authorized? || authorization_denied\n end",
"title": ""
},
{
"docid": "07372714fd34e7a309f0ce27c9990b6e",
"score": "0.76289386",
"text": "def authorization_check\n ... |
5119a154895adb821bef25667ff54a75 | Custom validator to check cc details are correct. | [
{
"docid": "cea76abb3e1fc50be6569757fa08cc4c",
"score": "0.63257426",
"text": "def validate_card_details\n card = credit_card\n unless card.valid?\n # Add card errors to this model, so errors gets displayed in form.\n card.errors.each {|k, v| errors.add(k, v[0])}\n end\n ... | [
{
"docid": "538e26840e37e9a9a96bf8b41761e5cf",
"score": "0.8247843",
"text": "def validate_cc\n if cc? and !is_valid_email? cc\n errors.add(:base, I18n.t('reservation.validate_cc'))\n end\n end",
"title": ""
},
{
"docid": "9aeb4b6c918cd5db2a6d8667bf67ca24",
"score": "0.776317... |
6d07525e96bfd4bc5b1cdb128fdbb839 | == Schema Information Table name: cats id :integer not null, primary key name :string color :string breed :string Table name: toys id :integer not null, primary key name :string color :string price :integer Table name: cattoys id :integer not null, primary key cat_id :integer not null, foriegn key toy_id :integer not n... | [
{
"docid": "5efb56cc06cd382cceed3e3facf1ae2f",
"score": "0.53401035",
"text": "def toys_that_jet_owns\n # Find all of the toys that Jet owns. Then list the the names of all \n # the other cats that own those toys as well as the toys names.\n # Exclude Jet from the results.\n # Order alphabetically b... | [
{
"docid": "5d871f3191c15e9afddd88e16ab05dae",
"score": "0.56761545",
"text": "def list_cats\n Cat.all.each_with_index do |kitty, i| \n puts \"\\n#{i + 1}. #{kitty.name} 🐈\"\n ##### if no owner\n if kitty.owner.nil?\n puts \"Breed: #{kitty.breed} |... |
9fa4633b5f7648b3646a903a1dc7476a | Get the observation class score for a completed classification session | [
{
"docid": "0007fd90cfa6b496a45042d1dafef1c8",
"score": "0.599828",
"text": "def get_class_scores(session_id, page_number = 0, page_size = 50)\n score_url = \"/sessions/#{session_id}/results/classScores\"\n query = {\n page: page_number,\n pageSize: page_size\n }\n... | [
{
"docid": "6fb9092a70ee9b2b2f2f9a4df1c86c60",
"score": "0.6414706",
"text": "def find_class_avg_scores\n class_scores = {:thinking => 0, :expectations => 0, :interactions => 0, :discipline => 0, :willing => 0, :direction => 0}\n #add up the sum of all student factor scores\n incomplete = 0\n ... |
999f44226bc4716a737a72536b03c2bd | Initializes a new API object | [
{
"docid": "ab056c5d30c749aa775f0262b4e73ac2",
"score": "0.0",
"text": "def initialize(attrs={})\n attrs = Massmotion.options.merge(attrs)\n Config::VALID_OPTIONS_KEYS.each do |key|\n instance_variable_set(\"@#{key}\".to_sym, attrs[key])\n end\n end",
"title": ""
}
] | [
{
"docid": "2ecf3cc037407280096c92a925d9624f",
"score": "0.83804953",
"text": "def initialize(api_obj)\n @api_obj = api_obj\n end",
"title": ""
},
{
"docid": "e3f919ef12baaa303d35c608315ed363",
"score": "0.8125194",
"text": "def initialize(api)\n @api = api\n end",
"t... |
1342df756bbd37e21ca37d636b103b77 | Reacts to the current artist deleting themselves | [
{
"docid": "244709449fad850bcc1782fd29d4298d",
"score": "0.7566391",
"text": "def react_current_artist_deletion\n event.respond <<-RESPONSE\n ...wait, u r the current artist! that means the new one should beeee....'\n RESPONSE\n\n if artists.empty?\n event.respond 'NOBODY??!?!??!'\n ... | [
{
"docid": "457312f43878c8b06bc2917da3adc9d2",
"score": "0.7660086",
"text": "def bot_unart_me(event)\n id = event.message.author.id\n if artists.delete?(id)\n event.respond 'okay! buh bye!'\n save_artists\n\n react_current_artist_deletion if @current_artist == name\n else\n ... |
b4f002c61eed0934dc89718bee610ae4 | wont return nil values because there are no puts | [
{
"docid": "1e80582f122500461dc2a7f5f1e2a628",
"score": "0.0",
"text": "def speak_to_grandma(love)\n \n if love == \"i love you grandma!\".upcase\n \"I LOVE YOU TOO PUMPKIN!\"\n elsif love == love.upcase\n \"NO, NOT SINCE 1938!\"\n else\n \"HUH?! SPEAK UP, SONNY!\"\n end\nend",
"title"... | [
{
"docid": "eeb85812f93d22a35be02a47a2c9ca1d",
"score": "0.6358282",
"text": "def print_result(res)\n if res.kind_of? String\n puts res\n elsif res.nil?\n # Do not print nil values\n else\n puts \"=> #{res.inspect}\"\n end\n end",
"title": ""
},
{
... |
41f0420601005d172e1fbacfb2ea21e4 | Transforms the presign hash into a JSON response. It returns a Rack response triple an array consisting of a status number, hash of headers, and a body enumerable. If `:rack_response` option is given, calls that instead. | [
{
"docid": "1106ae95ce508998b0d5cc440b78e6a1",
"score": "0.5739327",
"text": "def make_response(object, request)\n if @rack_response\n response = @rack_response.call(object, request)\n else\n response = [200, { \"Content-Type\" => CONTENT_TYPE_JSON }, [object.to_json]]\n end... | [
{
"docid": "7962401fdf21b797c42d4246bca86e58",
"score": "0.64482963",
"text": "def presign_response(storage_key, env, **options)\n script_name = env[\"SCRIPT_NAME\"]\n path_info = env[\"PATH_INFO\"]\n\n begin\n env[\"SCRIPT_NAME\"] += path_info\n env[\"... |
b1c6003ab22a7103589e196a56029b88 | iterate over each block in every revision starts from lowest revision to highest | [
{
"docid": "160766d574df2b0216fbe8be0ccdf8c0",
"score": "0.68667215",
"text": "def each_with_revision(&block)\n @children.each { |rev, arr| arr.each { |b| yield rev, b } }\n end",
"title": ""
}
] | [
{
"docid": "d51e8d825ca988781abf4d8f6f2866e5",
"score": "0.6817216",
"text": "def each_revision(&block)\n @children.values.each(&block)\n end",
"title": ""
},
{
"docid": "a0230a3525a0eafdc04a0ea06dd2d0fd",
"score": "0.6615671",
"text": "def each_in_revision(rev, &block)\n ... |
b5005a8ca4d5c00086af79e216e40bec | This method is used for the edit user page | [
{
"docid": "13d9d82b05c59c1d7d22387e67a6f80a",
"score": "0.0",
"text": "def edit\n end",
"title": ""
}
] | [
{
"docid": "9c1ad174872f39af448a6a0f2e119fac",
"score": "0.8022438",
"text": "def edit\n set_user\n end",
"title": ""
},
{
"docid": "1cf29619e413c8bc7440ccc2851d8594",
"score": "0.78962934",
"text": "def edit\n # @user = User.find(params[:id])\n # already in correct_user\n ... |
e18ea4c8a0e3ffda415233aef4a3c0ee | from: fping c 5 q f filename Producing: wikk021 : xmt/rcv/%loss = 5/5/0%, min/avg/max = 3.53/4.97/7.26 wikkb18wikkb19wds : xmt/rcv/%loss = 5/0/100% external4 : xmt/rcv/%loss = 5/4/20%, min/avg/max = 300/410/521 | [
{
"docid": "f7c8a4db87f6fd83d3dd0a6fba518517",
"score": "0.6070305",
"text": "def parse(source, output)\n source.each_line do |line|\n words = line.strip.squeeze(' \\t').split(/[ \\t\\/]/)\n if words && words[0] != \"ICMP\"\n #words.each { |x| print \"\\\"#{x}\\\"\\t\" }\n #print \"\\n\... | [
{
"docid": "633425647f086af24a05cfb4f81cf304",
"score": "0.5544163",
"text": "def main\n puts \"pos\\ttitv\\tqual\\tratio\\tref1\\tref2\\talt1\\talt2\\tsb\\tqb\\tmb\\ttb\"\n\n while line = ARGF.gets do\n next if line.match(/^#/)\n cols = line.split(/\\s+/)\n chr, pos , ref, alt, qual, info = ... |
702b71baefc51aa898fe6e00ddfa9b4a | GET /traffics/1 GET /traffics/1.xml | [
{
"docid": "30e93cec0ffe21385bdabf5d48252b69",
"score": "0.59886724",
"text": "def show\n @traffic = Traffic.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @traffic }\n end\n end",
"title": ""
}
] | [
{
"docid": "227e699c2d0fac56beb379a1fd0ef2c6",
"score": "0.7100176",
"text": "def index\n @traffics = Traffic.find(:all, :order => \"created_at\")\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @traffics }\n end\n end",
"title": ""
},
... |
4ae24a5e5ef1842a458dedf8fb057066 | Returns a friendly path for the repository, to display to the user. If a repository is loaded, the call is delegated. Otherwise, the repository_path is displayed, without attempting to load repository. | [
{
"docid": "a5a54db5e01de56faacd703febcb0ef1",
"score": "0.75720644",
"text": "def friendly_repository_path\n if @repository\n @repository.friendly_path\n else\n DbAgile::FileSystemTools::friendly_path!(repository_path)\n end\n end",
"title": ""
}
] | [
{
"docid": "c56818e70ec8e5dacd4038fd775e8baf",
"score": "0.75115466",
"text": "def repository_path\n @repository_path\n end",
"title": ""
},
{
"docid": "33046cdba14de5b35fc3803c81465a99",
"score": "0.7008483",
"text": "def path\n @repository.path\n end",
"... |
60f90882e86936adcf9aa01fe24cca0b | DELETE /useras/1 DELETE /useras/1.json | [
{
"docid": "27eb7cd87da5ab86c2eb3e306f4cce93",
"score": "0.7213805",
"text": "def destroy\n @usera.destroy\n respond_to do |format|\n format.html { redirect_to useras_url, notice: 'Usera was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"title": ""
... | [
{
"docid": "a7119b0c46b0230ef4496f91b3280071",
"score": "0.75010526",
"text": "def delete_as(user, url, **opt, &block); end",
"title": ""
},
{
"docid": "be9d8ff5c0124f1d5efc98ec2baa3fc1",
"score": "0.7422757",
"text": "def test_delete_user\n delete '/users/2'\n data = JSON.pars... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "ea0b1d7f4b8ef9dc2c4c657cf101b4d2",
"score": "0.0",
"text": "def msstudent_params\n params.require(:msstudent).permit(:UID, :last_name, :first_name, :degree, :specialization, :cohort ,:email)\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... |
27fe16b2ed9391cfbbfd3f6f4e2ff440 | Returns the contents of a key file on disk | [
{
"docid": "add2a3317b85785742a0a95f3c38f209",
"score": "0.67476404",
"text": "def load_key(key)\n if File.exists?(key)\n return File.read(key).strip\n else\n nil\n end\n end",
"title": ""
}
] | [
{
"docid": "d0a36509b3425f96fd96479d96d136f1",
"score": "0.7844482",
"text": "def read_key\n File.read(key)\n end",
"title": ""
},
{
"docid": "097bdefed5386867946f2e344988a733",
"score": "0.78305745",
"text": "def read_key(key)\n File.open([self.path, key].join(\"/\"), \... |
f58cb748f40dc19556bb57716d171f30 | Checks if menu has any nonactive or nonvisible content assigned | [
{
"docid": "fa7c33f607c2e6d8adac62688b131959",
"score": "0.68940043",
"text": "def invisible_content\n contents.each do |content|\n if !content.active or !content.displayed?\n return true\n end\n end\n false\n end",
"title": ""
}... | [
{
"docid": "9345900807f3dda53b4db335ff91147a",
"score": "0.72401434",
"text": "def in_menu?\n self.live? && self.show_in_menu? && !self.ancestors.any? { |a| !a.in_menu? }\n end",
"title": ""
},
{
"docid": "93bd7350ea5a259276dedca29cab8662",
"score": "0.7215619",
"text": "def menu... |
c53d58059f46d608457904327e818a8d | GET /kbns GET /kbns.json | [
{
"docid": "cd8aba6a89395dab7550c251a6f36ff2",
"score": "0.50842375",
"text": "def index\n @temps = Temp.find_for_output(@project.id, KbnConstants::TEMP_KBN_KBN)\n @kbns = Kbn.find_for_available(@project.id)\n end",
"title": ""
}
] | [
{
"docid": "1f5681260a892cb8a8f47e1a3cd88457",
"score": "0.59443015",
"text": "def retrieve_keys()\n start.uri('/api/key')\n .get()\n .go()\n end",
"title": ""
},
{
"docid": "7fa5102f03e505418dec026ff6ce9f8f",
"score": "0.5927687",
"text": "def retrieve_keys... |
3e7477481f0e860fe3f004f90dedc81c | POST /sectors POST /sectors.json | [
{
"docid": "a71bb2b4b5cf05cfe91300b5dad86130",
"score": "0.62330836",
"text": "def create\n @sector = Sector.new(sector_params)\n authorize @sector\n\n respond_to do |format|\n if @sector.save!\n flash.now[:success] = \"El sector \"+@sector.name+\" se ha creado correctamente.\"\n ... | [
{
"docid": "d45f21e5e9affb980c79a49d7e8a295c",
"score": "0.6805284",
"text": "def create\n @sector = Sector.new(params[:sector])\n if @sector.save\n flash[:notice] = 'Sector was successfully created.'\n redirect_to(sectors_url)\n else\n render :action => \"new\"\n end\n end",... |
1e595cd448f9d1d633d449dd628d3c0d | For the world rankings modal on every page | [
{
"docid": "6c976779bcde8d504277643e968ebc70",
"score": "0.0",
"text": "def current_player?\n !!current_player\n #!! turns the object into a boolean\n #NB current_player is not a local variable. It's a call to the method current_player\n end",
"title": ""
}
] | [
{
"docid": "b27d8ca9ab0b188f9a25c92a0461acf7",
"score": "0.58418757",
"text": "def update_ranked_stats\n self.ranked_kills = (@career/\"div.statWrap table:nth(0) tr:nth(2) td:nth(1) p\").inner_html.to_i\n self.ranked_deaths = (@career/\"div.statWrap table:nth(0) tr:nth(4) td... |
fdb06c8ec9aebad88475c6d701a41730 | POST /ships_stations POST /ships_stations.json | [
{
"docid": "2138b6acb62fd96bcf5cac47153d7ff2",
"score": "0.7630258",
"text": "def create\n @ships_station = ShipsStation.new(ships_station_params)\n\n respond_to do |format|\n if @ships_station.save\n format.html { redirect_to @ships_station, notice: 'Ships station was successfully cre... | [
{
"docid": "fe16e8928a257a3477c62fb68fc3b98f",
"score": "0.7030101",
"text": "def ships_station_params\n params.require(:ships_station).permit(:ships_id, :stations_id, :level)\n end",
"title": ""
},
{
"docid": "ed9699248351ef3f4e914ffc6ad65025",
"score": "0.69092363",
"text":... |
15ed3719f65d9d481d4fe453abbbd0ce | Create an object for the filter | [
{
"docid": "17d69f1415070930a2567a8a019d81f8",
"score": "0.71284425",
"text": "def get_filter_object(type, placeholder, value)\n fo = eval(\"ChaiIo::Filter::#{type.capitalize}\").new\n fo.value = value\n fo\n end",
"title": ""
}
] | [
{
"docid": "69166ad1ee8bfdde51b30acc02b0621b",
"score": "0.80014527",
"text": "def filter_object\n @filter_object ||= @filter_class.new\n end",
"title": ""
},
{
"docid": "55dfad93c89b84b95b40a4c4450ef4f1",
"score": "0.7445826",
"text": "def initialize( name , filt... |
ba52c6d5a4157964e6d74420cdc401a0 | XXX: change hough so that don't need to chroot. | [
{
"docid": "68628a8928b327c5a050fb639660cef1",
"score": "0.50190693",
"text": "def execute\n pwd = `pwd`.strip\n @cmd = \"cd '#{@work_dir}' && #{pwd}/#{Config.hough.bin}/hough #{@in_file} -r #{pwd}/#{Config.mpsynth.resources}\"\n super\n end",
"title": ""
}
] | [
{
"docid": "26668703b02da1404d70bf91e7371818",
"score": "0.57582617",
"text": "def trust_root; end",
"title": ""
},
{
"docid": "26668703b02da1404d70bf91e7371818",
"score": "0.57582617",
"text": "def trust_root; end",
"title": ""
},
{
"docid": "29f1c45fec599149256e7a730d68... |
5c890c0066ed07ea364d974261bb1559 | Return character of the current player | [
{
"docid": "d5e5a50a69ce9accd33848a1ebf9312e",
"score": "0.0",
"text": "def current_player(board)\n if turn_count(board) % 2 == 0\n return \"X\"\n else\n return \"O\"\n end\nend",
"title": ""
}
] | [
{
"docid": "d489ce9b60b763a6e34943fb3fe67522",
"score": "0.7612248",
"text": "def get_character\n is_alive? ? \"(`(●●)´)\" : \"(x(●●)x)\"\n end",
"title": ""
},
{
"docid": "ec4dd4b792cae5079540172dbcce6fd4",
"score": "0.76023775",
"text": "def current_player\n return \"C... |
c6b9f3ef4298dfcc3eb91bb8a143017b | A tracehook processor for 'trace var' | [
{
"docid": "5432fa6000b45eba910708b536a1c2dc",
"score": "0.74528587",
"text": "def trace_var_processor(var_name, value)\n frame = RubyVM::Frame.get\n frame.trace_off = true\n frame.prev.trace_off = true\n # We need to skip this frame and the lamdba that in tra... | [
{
"docid": "2ba7510f6cc7fae2d8c3aed29bff442b",
"score": "0.72464854",
"text": "def trace_var_processor(var_name, value)\n frame = RubyVM::ThreadFrame.current.prev(2)\n if 'CFUNC' == frame.type\n # Don't need the C call that got us here.\n prev = frame.prev\n frame = frame.... |
0e28abdc8b55e629f8e8e7965af16ea0 | Deletes a seeded version number from the database | [
{
"docid": "6e3e969dec3f8c201dc1eedfec65aed5",
"score": "0.80527765",
"text": "def remove_seeded_version version\n return unless version and (version.to_i > 0)\n ActiveRecord::Base.connection.execute(\"DELETE FROM `#{Germinator::VERSION_2_TABLE_NAME}` WHERE `version`='#{version.to_s}'\")\n ... | [
{
"docid": "55333ae2df48b1b51a91331e4b375e4e",
"score": "0.7520077",
"text": "def delete_version(version)\n get_version(version).delete\n load_versions\n end",
"title": ""
},
{
"docid": "48d88c2c9cb301b94051d4a19a3c27aa",
"score": "0.7388115",
"text": "def delete(version... |
f260b0743e3635ff851ba1fb8f391b00 | GET /users/1 GET /users/1.json | [
{
"docid": "893418d7881e5bb5626db6a2b6fc4f9f",
"score": "0.0",
"text": "def show\n # we allow if the user is trying to see his own page OR if he is an admin\n # otherwise a message will popup saying that he is not authorized\n if (session[:user].userid.to_s == params[:id]) or (session[:user].ro... | [
{
"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... |
e8061072d1cbd9137373be6b30107466 | Helper Function Returns contestants from all seasons | [
{
"docid": "3eaa4ed4ed4e728bacba6ead6ef28faa",
"score": "0.71337324",
"text": "def get_all_contestants data \n people = []\n data.each { | season | contestants = season[1]; \n contestants.each { | person | people << person } }\n people \nend",
"title": ""
}
] | [
{
"docid": "e7161764aaec2e22d72e43f46c122d57",
"score": "0.7221705",
"text": "def get_contemporary_seasons_involved_into(season)\n @swimmer.seasons.is_in_range(season.begin_date, season.end_date)\n end",
"title": ""
},
{
"docid": "d8e42d9b641e45d45f11a741074c6a38",
"score": "0.660851... |
32ecd26347ddc8b10420ed531d5e1345 | Creates the "down links in the navigation list | [
{
"docid": "3b5da52831804661afece20c23d18411",
"score": "0.7059377",
"text": "def navigation_down_links(level)\n result = \"\"\n for subtype in subtypes\n result << w.partial(\"navigation_down_link\", :locals => { :type => subtype, :level => level })\n end\n result\n end",
"title":... | [
{
"docid": "c81838529a22beaee445c254e92db98b",
"score": "0.66040117",
"text": "def generate_nav_links(doc)\n pages = doc.find_by(context: :section) {|section|\n [:root, :branch, :leaf].include?(section.mplevel)}\n pages.insert(0, doc)\n pages.each do |page|\n page_index = pages.find_i... |
5767f113117efec7bb63b3f8f1b0b81c | Internal: Construct the asset path with a digest attached. Examples path_with_digest('application', 'css') => applicationa6cebf5fe429bb0eda3f1b713c05499b.css Returns a string of the file with the digest hash. | [
{
"docid": "044cc3ca94bb0fba8ee69054406327d5",
"score": "0.6918583",
"text": "def path_with_digest(filename, file_extension)\n full_filepath = \"#{filename}.#{file_extension}\"\n \"#{filename}-#{Rails.application.assets.find_asset(full_filepath).digest}.#{file_extension}\"\n end",
"title": ""... | [
{
"docid": "c3525b8805adfcb313d7302c209a132c",
"score": "0.72497165",
"text": "def asset_digest_path(path, options = {})\n if manifest = assets_manifest\n if digest_path = manifest.assets[path]\n return digest_path\n end\n end\n\n if environment = assets... |
c5a315c1fea859569ef15aa670950534 | POST /chef_profiles POST /chef_profiles.json | [
{
"docid": "4680ac4b4e1e4f4190eef31e24f54626",
"score": "0.7437707",
"text": "def create\n @chef_profile = ChefProfile.new(chef_profile_params)\n @chef_profile.user_id = current_user.id\n respond_to do |format|\n if @chef_profile.save\n format.html { redirect_to @chef_profile, notic... | [
{
"docid": "863f6c0d794bc25d2add3def4ff8ff98",
"score": "0.74059176",
"text": "def create\n @chef_profile = ChefProfile.new(params[:chef_profile])\n\n respond_to do |format|\n if @chef_profile.save\n format.html { redirect_to @chef_profile, notice: 'Chef profile was successfully create... |
aa2d1c80c86e53930267793878f3824e | PATCH/PUT /words/1 or /words/1.json | [
{
"docid": "81dd5122f5ce96fa027f4985e602bbe1",
"score": "0.6881122",
"text": "def update\n respond_to do |format|\n if @word.update(word_params)\n format.html { redirect_to @word, notice: \"Word was successfully updated.\" }\n format.json { render :show, status: :ok, location: @wor... | [
{
"docid": "34f570c5b0dca5507fa071fe1e287626",
"score": "0.7297528",
"text": "def update\n\t\t\t\t@word = Word.update(params[:word][:id], params[:word])\n\t\t\t\trender json: @word\n\t\t\tend",
"title": ""
},
{
"docid": "abf9ff08951f0a9be2b2ed67a2cabfa1",
"score": "0.72563744",
"text... |
e896db47ac9b0ac5b15fc7662af95c5b | Recommends item_count items to active_user | [
{
"docid": "9bd091b42b6eec53310b69d0120f6d85",
"score": "0.6780921",
"text": "def recommendations(active_user, item_count=1)\n predictions = []\n dividends, divisors = {}, {}\n\n co_rated_items = user_item_matrix[active_user].keys\n active_user_average_rating = average_rating(active_user, co... | [
{
"docid": "0978e997b6b3f5a514b6addb61838dff",
"score": "0.7181647",
"text": "def recommendations_for(active_user)\n recommend_by_item_based active_user\n end",
"title": ""
},
{
"docid": "86bce4237e4ea8f1c593a4d0b618484d",
"score": "0.7127317",
"text": "def set_items_coun... |
124de046c5cdb8bbe56156b57e7de1c1 | Add a configuration file/directory to the loader. | [
{
"docid": "a8fb59cc8a830b5df7bfdbe57aa66ee8",
"score": "0.0",
"text": "def add_path(paths, high_priority: false)\n paths = Array(paths)\n priority = high_priority ? (@max_priority += 1) : (@min_priority -= 1)\n paths.each do |path|\n source = SourceInfo.create_path_root(path)\n ... | [
{
"docid": "45d7b68f0ca049ee6a29adf78df8b2fb",
"score": "0.6852518",
"text": "def add_config_path(path,\n high_priority: false,\n source_name: nil,\n context_directory: :parent)\n @loader.add_path(path,\n hig... |
9b30a855da0044fe3ae121029eed1d22 | corresponding method for OpenERP osv.execute(self, db, uid, obj, method, args, kw) method | [
{
"docid": "b6622755fd85445f5c6e2455164d20fc",
"score": "0.71566516",
"text": "def rpc_execute(method, *args)\n rpc_execute_with_object(@openerp_model, method, *args)\n end",
"title": ""
}
] | [
{
"docid": "e46d357368d330e24f30185c58715989",
"score": "0.7104736",
"text": "def rpc_execute(method, *args)\n if args[-1].is_a? Hash\n args[-1] = self.class.ooor.global_context.merge(object_session[:context]).merge(args[-1])\n elsif args.is_a?(Array)\n args += [self.class.ooor.global_co... |
e8b6e9bb6d78f987cdfccac01d6391b9 | GET /sites GET /sites.json | [
{
"docid": "973714e02bde4321d89355da6bdee930",
"score": "0.77209103",
"text": "def index\n @sites = Site.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @sites }\n end\n end",
"title": ""
}
] | [
{
"docid": "aec4eac82736504bc87b505fbfbff1bd",
"score": "0.7517273",
"text": "def index\n respond_to do |format|\n format.html do \n @sites = Site.all\n end\n format.json do\n render json: Site.all\n end\n end\n end",
"title": ""
},
{
"docid": "fa6b3a... |
6eda509af1842071fe7abf4af98fb6e2 | DELETE /biketours/1 DELETE /biketours/1.json | [
{
"docid": "96f2d4750d88864f8e0c11059ef1fe5a",
"score": "0.73600245",
"text": "def destroy\n @biketour = Biketour.find(params[:id])\n @biketour.destroy\n\n respond_to do |format|\n format.html { redirect_to biketours_url }\n format.json { head :no_content }\n end\n end",
"titl... | [
{
"docid": "b1a17c1ee1af05c79fe156622df44818",
"score": "0.6883774",
"text": "def delete(path)\n begin\n response = client[path].delete :accept => 'application/json'\n rescue Exception => e\n puts e.inspect\n end\n end",
"title": ""
},
{
"docid": "... |
5bb7187aa975314ac75234c9e402d88a | Get the path of the current master file. = Output A string containing the location of the master file. | [
{
"docid": "94ed46af68a88428a55dcf22b56bcef2",
"score": "0.0",
"text": "def masterfile\n LaTeX.master(ENV['TM_LATEX_MASTER'] || ENV['TM_FILEPATH'])\nend",
"title": ""
}
] | [
{
"docid": "865138f0a52eb6c11330b9231090e14e",
"score": "0.7410419",
"text": "def current_path\n Dir.pwd\n end",
"title": ""
},
{
"docid": "37d30ba38fe2a0b8917c1f67e36e0b43",
"score": "0.7135577",
"text": "def current_path\n @@current_path || Dir.pwd\n end",
"... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "6468760566aaca3569d9d39a307fdc28",
"score": "0.0",
"text": "def set_sale\n @sale = Sale.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.6031952",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.6015048",
"text": "def... |
b95e0ce21e8b2d4fc57c46df1a446f0d | :designation = "X" or "O" :type = :human or :droid | [
{
"docid": "a16dc724ffd3aa8dbff916a42ea06dc6",
"score": "0.5596784",
"text": "def initialize(designation, type=:human, name=\"Random Name\")\n @designation = designation\n @type = type\n end",
"title": ""
}
] | [
{
"docid": "ec59e0445475921687bf8b528ada4132",
"score": "0.59438187",
"text": "def get_lg_type(str_line_designator)\n \tret_type = \"poem\"\n \tif ( str_line_designator =~ /\\d+/ || str_line_designator =~ /STZ/ || str_line_designator =~ /SZB/ || str_line_designator =~ /SZN/ )\n\t\tret_type = \"poem\"\... |
8f59bd92f4be4dfba089870800a9541d | This method is autogenerated. Do not change directly. | [
{
"docid": "858e6109f0ea0c21551840deb3d4c7f8",
"score": "0.0",
"text": "def to_sdd_xml(meta, xml)\n xml.send(meta[:xml_name]) do\n self.class.xml_fields.each do |field|\n if self[field[:db_field_name]]\n if self[field[:db_field_name]].is_a? Array\n logger.debug 'Transl... | [
{
"docid": "ef1e4c0cc26e4eec8642a7d74e09c9d1",
"score": "0.7373633",
"text": "def private; end",
"title": ""
},
{
"docid": "a02f7382c73eef08b14f38d122f7bdb9",
"score": "0.65087914",
"text": "def custom; end",
"title": ""
},
{
"docid": "a02f7382c73eef08b14f38d122f7bdb9",
... |
08ca9ca9525810f462ef351658ff2a79 | ===== PRIVATE METHODS ===== | [
{
"docid": "38cc703daa073cfce112de193f6d2150",
"score": "0.0",
"text": "def should_validate_organization?\n\t\troles.include?('Customer')\n\tend",
"title": ""
}
] | [
{
"docid": "ef1e4c0cc26e4eec8642a7d74e09c9d1",
"score": "0.84763384",
"text": "def private; end",
"title": ""
},
{
"docid": "3660c5f35373aec34a5a7b0869a4a8bd",
"score": "0.6923564",
"text": "def implementation; end",
"title": ""
},
{
"docid": "3660c5f35373aec34a5a7b0869a4... |
2e267253f61405863896aeae25fad225 | Renders Admin index page. | [
{
"docid": "60470a6c499be2ba91df948d9dc90b24",
"score": "0.0",
"text": "def index\n\t\t@number_of_users = User.count\n\t\t@number_of_courses = Course.count\n\t\t@number_of_assignments = Assignment.count\n\t\t@number_of_grades = Grade.count\n\t\t\n\t\t@users_per_course = 0\n\n\t\tCourse.all.each do |cour... | [
{
"docid": "77781f4ba419b78bcd4343aadde55ec6",
"score": "0.8578621",
"text": "def index\n render template:'admin/index', layout:'minimal'\n end",
"title": ""
},
{
"docid": "527aaceec4affbb4bd4ae8cbc8377920",
"score": "0.7799959",
"text": "def index\n\t\tlogger.info(\"(#{self.... |
4cef87ba6592aa85c48cf6cf07129d8f | Downloads flair from the subreddit This is limited to 1000 per request, use before/after to get "pages" | [
{
"docid": "f015896cc65971caeaf67578eef3a382",
"score": "0.6479631",
"text": "def get_flair_list subreddit, opts = {}\n logged_in?\n query = {\n limit: 1000,\n uh: @modhash\n }\n query.merge! opts\n get(\"/r/#{subreddit}/api/flairlist.json\", query: query)\n end... | [
{
"docid": "00e89752f5954934f4a987362c057ade",
"score": "0.668706",
"text": "def get_flair_list subreddit, opts = {}\n logged_in?\n raise ArgumentError, 'limit is too high/low' unless (1..1000).include?(opts[:limit]) or opts[:limit].nil?\n query = {\n limit: 1000,\n uh: @mod... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "40b2e4dbc7762c89c6ce5388ed02bd18",
"score": "0.0",
"text": "def set_vibe\n @vibe = vibe.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "bd89022716e537628dd314fd23858181",
"score": "0.6163163",
"text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n end",
"title": ""
},
{
"docid": "3db61e749c16d53a52f73ba0492108e9",
"score": "0.6045976",
"text": "def action_hook;... |
6271117b72a4d602d9ce9f5b010d28f9 | Create a new Certificate Revocation List Adds a new certificate revocation list (CRLs). The CRL is used to verify the client certificate status against the revocation lists published by the CA. For this reason, the administrator needs to add the CRL in certificate repository as well. The CRL can contain a single CRL or... | [
{
"docid": "beccf9653e5c8866250e29ed89544f11",
"score": "0.55442524",
"text": "def create_tls_crl_import_0(crl_id, tls_crl, opts = {})\n data, _status_code, _headers = create_tls_crl_import_0_with_http_info(crl_id, tls_crl, opts)\n data\n end",
"title": ""
}
] | [
{
"docid": "c32225ee7d061e7a76a1436b24f3da2b",
"score": "0.7188115",
"text": "def create_crl(info = {})\n root_ca = info[:ca]\n root_key = info[:ca_key]\n\n crl = OpenSSL::X509::CRL.new\n crl.issuer = root_ca.subject\n crl.version = 1\n crl.last_update = Time.zone.now\n crl.next_upd... |
dd854e210ceb7cee638c8f15ebf836f2 | Returns true if there is a draw | [
{
"docid": "8c4b9c7c377c98b5aa2454d0daf89319",
"score": "0.70001155",
"text": "def draw?\n @grid.each { |columns| columns.each { |cell| return false if cell.color == ' '}}\n return true\n end",
"title": ""
}
] | [
{
"docid": "064fd166838a59558cadffb4cb86caee",
"score": "0.82137674",
"text": "def draw? \n end",
"title": ""
},
{
"docid": "052334493e984d3718ca1f4f97c63d96",
"score": "0.80644065",
"text": "def draw?\n if not won?\n return full?\n else\n return false\n end\n en... |
81c6aa4febe752b35eea200e204af7e0 | POST /aquaria POST /aquaria.json | [
{
"docid": "61f6b7756e2c99d3002aa5805a5ffdf4",
"score": "0.5693431",
"text": "def create\n @aquarium = Aquarium.new(params[:aquarium])\n\n respond_to do |format|\n if @aquarium.save\n format.html { redirect_to @aquarium, notice: 'Aquarium was successfully created.' }\n format.js... | [
{
"docid": "5666db16feb8caca36389b543bf964a5",
"score": "0.64204466",
"text": "def create\n @agronomiaquimica = Agronomiaquimica.new(params[:agronomiaquimica])\n\n respond_to do |format|\n if @agronomiaquimica.save\n format.html { redirect_to @agronomiaquimica, notice: 'Agronomiaquimic... |
c811e363ae7d107e4db37b4a9a82f71d | GET /post186s/new GET /post186s/new.xml | [
{
"docid": "af26de24f77cf80ae0987517f5209bd1",
"score": "0.7543367",
"text": "def new\n @post186 = Post186.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @post186 }\n end\n end",
"title": ""
}
] | [
{
"docid": "237370d596b219c9076ed09e1aa324f3",
"score": "0.7572134",
"text": "def new\n @post185 = Post185.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @post185 }\n end\n end",
"title": ""
},
{
"docid": "879cb66276bd00e582f27d... |
2521e063ae83bde83e5a3f2c7d7e7a9d | VOID AsyncCancelComplete EVENT in DIOPCGroupEvent I4 arg0 CancelID [IN] | [
{
"docid": "73334c305e4e33fb38846e06523cbfc1",
"score": "0.7726169",
"text": "def AsyncCancelComplete(arg0)\r\n ret = _invoke(4, [arg0], [VT_I4])\r\n @lastargs = WIN32OLE::ARGV\r\n ret\r\n end",
"title": ""
}
] | [
{
"docid": "aec1619fe942e29636f9d061664cc0c5",
"score": "0.7255949",
"text": "def AsyncCancel(arg0)\r\n ret = _invoke(1610743833, [arg0], [VT_I4])\r\n @lastargs = WIN32OLE::ARGV\r\n ret\r\n end",
"title": ""
},
{
"docid": "aec1619fe942e29636f9d061664cc0c5",
"score": "0.7255949"... |
da90558c0de386a87efdbb06aa5e34c7 | GET /sobremesas GET /sobremesas.json | [
{
"docid": "3718559137a70acbb8967bb67187e2e3",
"score": "0.6672397",
"text": "def index\n @sobremesas = Sobremesa.all.order(:disponibilidade => :desc).paginate(:page => params[:page], :per_page => 10).search(params[:search])\n end",
"title": ""
}
] | [
{
"docid": "5ce97ae37a357cb38a020590a10f930c",
"score": "0.6238578",
"text": "def index\n @series = Serie.where(ativo: true).where(usuario: current_usuario)\n render json: @series.map(&:encode)\n end",
"title": ""
},
{
"docid": "712d88c607f6173833336e7f8f07fb8a",
"score": "0.60265... |
1bd08e79c183143b1197fb693f52f7e1 | Method to return the canvas to be gridded | [
{
"docid": "30ed79210fd1a5afc83d457f073ea06d",
"score": "0.73784095",
"text": "def canvas\n @canvas\n end",
"title": ""
}
] | [
{
"docid": "3a76d2e9627dacc5a41a025371a2c5f9",
"score": "0.71074754",
"text": "def get_canvas\n @canvas\n end",
"title": ""
},
{
"docid": "3a76d2e9627dacc5a41a025371a2c5f9",
"score": "0.71074754",
"text": "def get_canvas\n @canvas\n end",
"title": ""
},
{
"docid":... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "130e70ef68d3354adbe68e49e7431e1e",
"score": "0.0",
"text": "def reservation_params\n params.require(:reservation).permit(:desk_id, :description, :reservation_date, :reservation_pm, :reservation_am, :event, :data, :published_at, :coreid)\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... |