query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
2f4149f025b5cc319cec9753d76dfe8c | connect each node bidirectional | [
{
"docid": "35dcdb569cd2d809203e3b163e902a96",
"score": "0.0",
"text": "def add_edge(source:, target:, weight:)\n connect_graph(source, target, weight) # directional graph\n connect_graph(target, source, weight) # non directed graph (inserts the other edge too)\n end",
"title": ""
}
] | [
{
"docid": "8232ab8888334f94806b8d492926327e",
"score": "0.7961947",
"text": "def connect_nodes_bidirectionally(node1, node2)\n structure[node1][:incoming] << node2\n structure[node1][:outgoing] << node2\n\n structure[node2][:incoming] << node1\n structure[node2][:outgoing] << node1\n\n n... |
c3ea417ed801c95f5dac7427899508dd | Same as Azure::Armrest::ResourceServicelist but returns all resources for all resource groups. Normally this is capped at 1000 results, but you may specify the :all option to get everything. | [
{
"docid": "9a524b9d91ec71e09efd1fed677beebe",
"score": "0.7100854",
"text": "def list_all(options = {})\n url = build_url(nil, options)\n response = rest_get(url)\n\n if options[:all]\n get_all_results(response)\n else\n Azure::Armrest::ArmrestCollection.cr... | [
{
"docid": "5a4080142d45680c32c6745e636233b9",
"score": "0.7505827",
"text": "def list(resource_group, options = {})\n url = build_url(resource_group, options)\n response = rest_get(url)\n\n if options[:all]\n get_all_results(response)\n else\n Azure::Armres... |
e6a5c405767c84fb13e4175ca2f252c3 | GET /admin/news_types GET /admin/news_types.json | [
{
"docid": "700f3899208017f7373d34e0d0e5f5e8",
"score": "0.6312674",
"text": "def index\n if params[:field].present? && params[:keyword].present?\n @news_types = NewsType.all.where([\"#{params[:field]} like ?\", \"%#{params[:keyword]}%\"]).page(params[:page]).per(params[:per])\n else\n @... | [
{
"docid": "4267aebd88dc666edcda416ccf9f5f38",
"score": "0.72701234",
"text": "def index\n @type_news = TypeNews.all\n end",
"title": ""
},
{
"docid": "d192451b72d64a8211ddee0188ee2d45",
"score": "0.6796354",
"text": "def index\n @admin_article_types = Admin::ArticleType.all\n... |
ffa720536104fcf822428373d4298357 | generate all valid strings of parenthesis given n number of pairs | [
{
"docid": "81249a90c0c60179c3afa81f85257314",
"score": "0.8050546",
"text": "def make_valid_parens(n)\n valids = [\"()\"]\n return \"\" if n == 0\n x = 1\n while x < n\n new_arr = []\n valids.each do |str|\n new_arr << \"(#{str})\"\n end\n valids.each ... | [
{
"docid": "817b74f6f4144ff1a56c94df7776d67c",
"score": "0.75795376",
"text": "def generate_parentheses(n)\n if n <= 1\n return [\"()\"]\n end\n ret = []\n generate_parentheses(n - 1).each do |pair|\n ret << pair + \"()\"\n ret << \"(\" + pair + \")\"\n ret << \"()\" + pair\n end\n ret... |
296a0da3a5ec064f64efcafdf0a1615f | Write a method that returns a boolean indicating whether a string has repeating letters. Capital letters count as repeats of lowercase ones, e.g., repeating_letters?("Aa") => true | [
{
"docid": "78970ab5ab9e0b836e01002336bccd89",
"score": "0.82091814",
"text": "def repeating_letters?(str)\r\n # your code goes here\r\n str = str.downcase.split(\"\")\r\n temp = \"\"\r\n i = 0\r\n while i < str.length\r\n if temp.include?(str[i])\r\n return true\r\n else\r\n temp... | [
{
"docid": "80ba39a181b8975b262532138b063bbf",
"score": "0.8943327",
"text": "def repeating_letters?(str)\n str.downcase.chars.uniq.length != str.length\nend",
"title": ""
},
{
"docid": "0be06fbdec6fca604d8a39c1c2af0401",
"score": "0.8876545",
"text": "def repeating_letters?(str)\n ... |
506dc734bebeead74b000ef454f237e9 | Get Offensive Animation ID for Normal Attacks | [
{
"docid": "4cac815a662b00b547a99b90d1aa0d00",
"score": "0.638782",
"text": "def animation1_id\n weapon = $data_weapons[@weapon_id]\n return weapon != nil ? weapon.animation1_id : 0\n end",
"title": ""
}
] | [
{
"docid": "da090c29e803b14aa67084bcf4ad1507",
"score": "0.6918191",
"text": "def animation1_id\n return $data_enemies[@enemy_id].animation1_id\n end",
"title": ""
},
{
"docid": "da090c29e803b14aa67084bcf4ad1507",
"score": "0.6918191",
"text": "def animation1_id\n return $data... |
0a687c0717a21d0fe348a3be666d627d | Pseudopreordered array of nodes. Children will always follow parents, but the ordering of nodes within a rank depends on their order in the array that gets passed in | [
{
"docid": "7dfb25f5a49019e8ddcee0cc32793f9e",
"score": "0.0",
"text": "def sort_by_structure(nodes)\n arranged = nodes.is_a?(Hash) ? nodes : arrange_nodes(nodes.sort_by{|n| n.structure || '0'})\n arranged.inject([]) do |sorted_nodes, pair|\n node, children = pair\n sorted_nodes ... | [
{
"docid": "c07cb8c765bf10a84fef5f02845b99cf",
"score": "0.65265447",
"text": "def parent_nodes(n)\n ans = []\n for_each_link do |i,j|\n ans << i if j == n\n end\n ans\n end",
"title": ""
},
{
"docid": "113289d3842fcaa1046111768485a0f5",
"score": "0.6196381",
"text"... |
3c39bb2a14ee7897bab73a6bf679e4b0 | MySQL supports GROUP BY WITH ROLLUP (but not CUBE) | [
{
"docid": "fc46aee5ba18a390e10d9b7e0fea18b7",
"score": "0.47107163",
"text": "def supports_group_rollup?\n true\n end",
"title": ""
}
] | [
{
"docid": "03d8c6b995876226d79baabf45cb928c",
"score": "0.63915116",
"text": "def rollup(after_rollup = nil)\n unless @groups.empty? then #zgroups\n k_first = nil\n @groups.each_key do |k| #zgroups\n k_first = k if k_first.nil? # remove duplicate calculete with this\n ... |
afc8fc0ee9d7254dc76f2fd0cea8da9a | next few insance methods, pushes new pets into pets hash | [
{
"docid": "9b7c65617a352d606f8a298433df32bd",
"score": "0.5790715",
"text": "def buy_fish(name)\n @pets[:fishes] << Fish.new(name)\n end",
"title": ""
}
] | [
{
"docid": "ae8f53555f78b3af24a8957d6ea69ded",
"score": "0.7064096",
"text": "def add_pet_to_stock(pet_shop_hash, new_pet)\n pet_shop_hash[:pets] << new_pet\nend",
"title": ""
},
{
"docid": "36fef1003270a486ed62e567bdd5611a",
"score": "0.6945831",
"text": "def buy_dog(name)\n#know s... |
8b4cd4d68c8c425fc05838a10392c041 | DELETE /drivers/1 DELETE /drivers/1.json | [
{
"docid": "1716e4ef0eac0cbf9db756105ebeb601",
"score": "0.7263908",
"text": "def destroy\n @driver.destroy\n respond_to do |format|\n format.html { redirect_to drivers_url }\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "3cba4dc681ce82781af183cb20a0eca2",
"score": "0.73493415",
"text": "def destroy\n @driver = Driver.find(params[:id])\n @driver.destroy\n\n respond_to do |format|\n format.html { redirect_to drivers_url }\n format.json { head :no_content }\n end\n end",
"title": ""
... |
01348a22509ee7ec6812087b174b353b | Uploads text to use as evidence for a dispute challenge. | [
{
"docid": "e0a194ea0166fae75e169d12999f5bd6",
"score": "0.56163585",
"text": "def create_dispute_evidence_text(dispute_id:,\n body:)\n new_api_call_builder\n .request(new_request_builder(HttpMethodEnum::POST,\n '/v2/dis... | [
{
"docid": "0d171d9096d42fcf040852ad221801ff",
"score": "0.643318",
"text": "def save_text_passage(text)\n Tempfile.open(\"text_passage\") do |f|\n f.write(text)\n f.rewind\n file.attach(io: f,\n filename: \"#{name}.txt\",\n c... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "5ce90b0bd0e20701e1a33e2ea561906c",
"score": "0.0",
"text": "def user_params\n params.require(:user).permit(\n :name,\n :email,\n :password,\n :avatar,\n :password_confirmation,\n :search,\n roles_attributes: %i[permission id]\n )\n end",
"title":... | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.69792545",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6781151",
"text": "def strong_params\n params.requ... |
f26f3442eb6af3f1781172748843557a | get index in internal list of current player | [
{
"docid": "70c6bf1abfead92d563fbafe8b28bcce",
"score": "0.84717065",
"text": "def list_index_of(player)\n (@list.index(player)+1) % @list.count\n end",
"title": ""
}
] | [
{
"docid": "541de2d18eb53e1088f088f08e5e025c",
"score": "0.71985954",
"text": "def player_last_index(index = 0)\n temp_id = self.last_registered_player_id\n if temp_id == -1 || temp_id == nil\n #if no one is signed up\n return nil\n elsif index > self.roster_co... |
9a3abe62965d7b70ee364a1444edd51d | Test if the submission has been denied. (moderation flag is false) | [
{
"docid": "e88be9c7d117c1d838ddbc9dfc342d00",
"score": "0.81352735",
"text": "def is_denied?\n (moderation_flag == false) ? true : false\n end",
"title": ""
}
] | [
{
"docid": "8b131b547d93115ff3ba172c7162c30e",
"score": "0.7926395",
"text": "def is_denied?\n return false if moderation_flag || moderation_flag == nil\n true\n end",
"title": ""
},
{
"docid": "0c139f1cd878c164f3816036d044e693",
"score": "0.7004931",
"text": "def deny()\n ... |
558045e779d7ac7ffb415c701e9c951b | As Neofiles treats files as immutables, this method updates only auxiliary fields: description, no_wm etc. Returns nothing. | [
{
"docid": "1b692d8bcb8a89022a37c8ffb45d296d",
"score": "0.7986624",
"text": "def file_update\n file, data = find_file_and_data\n file.update data.slice(:description, :no_wm)\n render plain: '', layout: false\n end",
"title": ""
}
] | [
{
"docid": "e035bcb9ea8587c98a92078ee7b2e0fd",
"score": "0.6351894",
"text": "def update_metadata(_, _)\n interpret_visibility # Note: this modifies the contents of attributes!\n update_visibility(attributes[:visibility]) if attributes.key?(:visibility)\n # generic_file.visibility = attri... |
6933b77ae4d5f9d862e91cc1462060a3 | walking over arrays and symbolizing all nested elements | [
{
"docid": "74ba4b55486add3e417a88773cf888c4",
"score": "0.0",
"text": "def array(ary, &block)\n ary.map { |v| _recurse_(v, &block) }\n end",
"title": ""
}
] | [
{
"docid": "6938a04f58e70c7cb16b6fe4f0ab1f83",
"score": "0.6912671",
"text": "def nested(array)\n\tarray.map! { |i| \n\t\tif i.is_a?(Integer)\n\t\t\ti + 5 \n\t\telsif i.is_a?(Array)\n\t\t\ti.map! { |x| x + 5}\n\t\tend\n\t\t}\t\n\tp array\nend",
"title": ""
},
{
"docid": "ef606975972471145a8b... |
080ab857b20bc0d8d86d8eddb829e3d7 | Allows API access to certain methods skips here should be paired with calls in allow_api_access | [
{
"docid": "a8d59fed9a81bf37385bccb4bb4db64f",
"score": "0.62077004",
"text": "def api_actions\n [:import, :only_in_council, :only_in_lpi, :error_records]\n end",
"title": ""
}
] | [
{
"docid": "b2c825dd84b56fbbf329fb43652eec60",
"score": "0.7819572",
"text": "def api_only!; end",
"title": ""
},
{
"docid": "10718d42cac5d82a7c1d9e2550ce2f06",
"score": "0.7629115",
"text": "def api_only; end",
"title": ""
},
{
"docid": "10718d42cac5d82a7c1d9e2550ce2f06"... |
6df703852b627ba043d7c64ba09a8ab2 | Determine whether this test should be skipped, given a list of unsupported features. | [
{
"docid": "9095416796e85d1a7f74079d75edc151",
"score": "0.68356925",
"text": "def skip_test?(client, features_to_skip = test_file.features_to_skip)\n return true if pre_defined_skip?\n\n if @skip\n @skip.collect { |s| s['skip'] }.any? do |skip|\n contains_featu... | [
{
"docid": "52dfeb8caae8161e047129dc136e0aba",
"score": "0.7344223",
"text": "def skip_unless_supported(tests)\n pattern = tests[:platform]\n agent_only = tests[:agent_only] | false\n if agent_only && agent.nil?\n msg = \"Skipping all tests; '#{tests[:resource_name]}' \"\\\n '(or ... |
30fe3ab1250abeb6de03fbe185a5c152 | GET /containers/1 GET /containers/1.json | [
{
"docid": "edd84ba48df570405d529323bc4ee83c",
"score": "0.0",
"text": "def show\n @container = Container.find(params[:id])\n user_session[:current_container]=@container.label\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @container }\n forma... | [
{
"docid": "9ad0c2ce4f1dea0d1243e3c6fab942c3",
"score": "0.7074826",
"text": "def index\n @containers = Container.all\n end",
"title": ""
},
{
"docid": "fbf5ae28f0495375aece4560c8830851",
"score": "0.6794176",
"text": "def index\n user_session[:current_container]=nil\n if p... |
747e3bdd1c705580c008674d0ce15922 | Public: Creates a child class of Yacl::Define::Cli::Parser block an optional block will be evaluated in the context of the created class. The child class is created once, and the block is evaluated once. Further class to this method will result in returning the already defined class. | [
{
"docid": "c116ac74122358d7ff09174e463ff3c1",
"score": "0.78133017",
"text": "def parser( &block )\n nested_class( 'Parser', Yacl::Define::Cli::Parser, &block )\n end",
"title": ""
}
] | [
{
"docid": "f4a9d5d8f60ebe7b05c3b27c85a9cab5",
"score": "0.65774",
"text": "def initialize block_parser\n @block_parser = block_parser\nend",
"title": ""
},
{
"docid": "6bc76d7de175355dd155d7df3e2d0a58",
"score": "0.5960093",
"text": "def initialize(name, parser, &block)\n @nam... |
230933533142c3edd8f28bd8578d3b6f | region The "signature_file" accessors | [
{
"docid": "9a343595a5404fd433cdf84a7a2aa3ce",
"score": "0.6735983",
"text": "def signature_file=(content_raw)\n _set_signature_file(content_raw)\n end",
"title": ""
}
] | [
{
"docid": "58154047e23cbe686dd1fea45c7a1a9b",
"score": "0.76589847",
"text": "def stored_signature; end",
"title": ""
},
{
"docid": "781335ee1597596882e69216c4215bf5",
"score": "0.72519076",
"text": "def signature_key; end",
"title": ""
},
{
"docid": "75397bcf1d312042e4d... |
9b5888143523f867fb053a546aa6819e | Take the users response and save it to the assignment Hope that it doesnt fail . . . | [
{
"docid": "bde2a9b01826de605e1ae84ced558861",
"score": "0.6033012",
"text": "def grade\n @assignment = Assignment.find(params[:id])\n @user = @assignment.user\n @assignment.update_attributes(:response => params[:response])\n @assignment.save\n @assignment.grade\n if @assignment.save\n... | [
{
"docid": "ccddfdb51df57bc47e924ac4502ed214",
"score": "0.61829054",
"text": "def store(response); end",
"title": ""
},
{
"docid": "ccddfdb51df57bc47e924ac4502ed214",
"score": "0.61829054",
"text": "def store(response); end",
"title": ""
},
{
"docid": "8900b81c7cff6320b9... |
27358a79d80a90cd4721e110aacdc23b | Returns answers that haven't been put into the game yet | [
{
"docid": "980c562c39d97995af980e7b3552c8b4",
"score": "0.7179262",
"text": "def available_answers\n answers - answers_in_game\n end",
"title": ""
}
] | [
{
"docid": "4da21a82a490c4890aa1288963d866fc",
"score": "0.7100722",
"text": "def missing_answers\n @missing_answers ||= visible_questionings.select{ |qing| qing.required? && answer_for_qing(qing).nil? }\n end",
"title": ""
},
{
"docid": "38240117d5cac36b272ae5a69f2f67e0",
"score": "... |
27630e7aa07c769e2e12f311d88ca023 | method to swap players | [
{
"docid": "02709b1cc4c232fe6ce8b214170931af",
"score": "0.8568772",
"text": "def swap_players\n if @current_player == @all_players.first\n @current_player = @all_players.last\n else\n @current_player = @all_players.first\n end\n end",
"title": ""
}
] | [
{
"docid": "f9aeb14f79ee80d488a0cf4d574a8418",
"score": "0.83973795",
"text": "def switch_players\n if @current_player == @player1\n @current_player = @player2\n else\n @current_player = @player1\n end\n end",
"title": ""
},
{
"docid": "120ef50d6... |
0b7a5c7d40e1cfff0319abba878589d6 | Adds a specified amount to the corresponding row of the passed skill | [
{
"docid": "319f92ec91fc2eecceed22c64b611c1e",
"score": "0.70873755",
"text": "def add_experience(skill, amount)\n eventual = self[SKILLS[skill].last] + amount\n update_exp(skill, eventual)\n end",
"title": ""
}
] | [
{
"docid": "2639d3ddec9b3b25b9c028df35fb4e0f",
"score": "0.65511817",
"text": "def increase_quantity(i)\n self.update_columns(quantity: quantity + i)\n end",
"title": ""
},
{
"docid": "e3240bb71c1aec813df033a6e082059b",
"score": "0.6484114",
"text": "def add_quantity(added_amount... |
1f5c166d4332bf0413bdfa3d2b946ef6 | Question EXCEL Export Methods Calculates the total span of columns for a design detail | [
{
"docid": "b7b3af9a586c71b2cd98ac6ba5990b68",
"score": "0.0",
"text": "def getQuestionColSpanByArm(arm_id,q_name)\n return getQuestionEXCELLabelsByArm(arm_id,q_name).size()\n end",
"title": ""
}
] | [
{
"docid": "f2172fbd6fb5a32857a6785a58a2b8a6",
"score": "0.6696586",
"text": "def getTotalDesignDetailsEXCELSpan(reportset)\n dd_ncols = 0\n for ddidx in 0..getNumDesignDetailsItems() - 1\n if showDesignDetails(ddidx)\n # For each dd to show - get the total number... |
3f3ac4168bfbe739851af97110db654d | Perform hash on some integer | [
{
"docid": "f5e2de18084a23cc2860ac67d776f5df",
"score": "0.7178767",
"text": "def calculate_hash(val)\n return ((val ** 2000) * ((val + 2) ** 21) - ((val + 5) ** 3))\n end",
"title": ""
}
] | [
{
"docid": "915e95cecb173cd28ac11a5599fd5173",
"score": "0.7649625",
"text": "def hash(n)\n Digest::SHA1.hexdigest(n.to_s).to_i(16).modulo(@l)\n end",
"title": ""
},
{
"docid": "bc580928dbeb530f6de51550b1f1ea76",
"score": "0.7625239",
"text": "def hash\n num = @high << 64\n ... |
166981e555d7a758b936a00ba939531b | This method is used to let the player choose the desired move. Can only be | [
{
"docid": "f84846be09ef1bada1f86500d8e66f25",
"score": "0.0",
"text": "def move\r\n @turn_grid = Array.new\r\n loop do\r\n puts \"It's \" + @symbol.to_s + \" turn. Please chose the row of your\"\r\n puts \"move, between 0 and 2.\"\r\n @pos1 = (gets.chomp.to_i)\r\n ... | [
{
"docid": "a868f98734e33d8418f2a1d8635a7977",
"score": "0.7229683",
"text": "def select_move\n puts \"It's #{@player.color}'s turn. Please enter your move/command.\"\n input = gets.chomp.downcase.split(\"\")\n check_move_input(input)\n end",
"title": ""
},
{
"docid":... |
57d43294890f8636f8b1a742f54259b6 | Builds the error from the raw JSON response and the specified status code. | [
{
"docid": "0ca3792415d0c28af3b0200fede85d86",
"score": "0.5738062",
"text": "def initialize(headers, errors, status_code)\n @headers = headers\n\n if errors.is_a?(Array) || !errors\n @errors = (errors || []).map do |error|\n OpenStruct.new(error['error'])\n en... | [
{
"docid": "7261ba5c107cfd2b06d1535b15babe59",
"score": "0.7565914",
"text": "def build_error(msg, status)\n {\n json: {\n errors: [\n {\n \"status\": Rack::Utils::SYMBOL_TO_STATUS_CODE[status].to_s,\n \"title\": msg,\n \"detail\": msg\n ... |
62881b9f2547d7effa578e7b05e5b90e | Returns the names of all branches containing the given commit. | [
{
"docid": "8e9e0494c8328ce3780d30f116d078c1",
"score": "0.7334887",
"text": "def branches_containing_commit(commit_ref)\n `git branch --column=dense --contains #{commit_ref}`.\n sub(/\\((HEAD )?detached (from|at) .*?\\)/, ''). # ignore detached HEAD\n split(/\\s+/).\n reject {... | [
{
"docid": "068b74a1ecdda33d7b06897f6bd941a4",
"score": "0.69083405",
"text": "def get_branch_names(repo)\n repo.heads.collect(&:name)\n end",
"title": ""
},
{
"docid": "2a7c8edca55ca615665bc632fd8f094b",
"score": "0.69041085",
"text": "def branches_containing_commit(commit_r... |
bc55dcdc46c827af4090822aa69998df | Return the Puppet::Util::IniConfig::Section for this yumrepo resource | [
{
"docid": "2039c8d6fdb75ebdc2c90cbf5717f8a5",
"score": "0.5020899",
"text": "def section\n self.class.section(self[:name])\n end",
"title": ""
}
] | [
{
"docid": "dfc87e749fff507dd985736ebef9cf00",
"score": "0.6193932",
"text": "def config_section\n node.manifest.config.send(self.class.instance_variable_get(:@config_section_name))\n end",
"title": ""
},
{
"docid": "4d8243ea2ea1e44d023ef27799151c60",
"score": "0.57753265",
... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "acb1a4b8fdbd5c70c4e8321cb26c99c0",
"score": "0.0",
"text": "def set_voluntario_temporal\n @voluntario_temporal = VoluntarioTemporal.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... |
d36e938fb1e5ab5e1cc41fc233794136 | PATCH/PUT /generators/1 PATCH/PUT /generators/1.json | [
{
"docid": "9c8719b898941994e1632bf9cd4fb1d8",
"score": "0.626261",
"text": "def update\n respond_to do |format|\n if @generator.update(params[:result])\n format.html { redirect_to(generators_path(@generators))}\n format.json { head :no_content }\n else\n format.html { ... | [
{
"docid": "bbba1e8745a5d2a35295e52db03004e1",
"score": "0.66659075",
"text": "def update\n @generator = Generator.find(params[:id])\n\n respond_to do |format|\n if @generator.update_attributes(params[:generator])\n format.html { redirect_to @generator, notice: 'Generator was successfu... |
630f50335c2455756d2a4bc538338ce0 | Encode the temporal expression into +codes+. | [
{
"docid": "acb7b492fe2e784dcd2a7833e28deaf0",
"score": "0.6693738",
"text": "def encode(codes)\n encode_list(codes, @terms)\n codes << encoding_token\n end",
"title": ""
}
] | [
{
"docid": "63e9d5d022bf2e6f7e34a0593930b108",
"score": "0.7303541",
"text": "def encode(codes)\n encode_list(codes, @days)\n codes << encoding_token\n end",
"title": ""
},
{
"docid": "5423129967f7111cf0ae8f61634dc7b4",
"score": "0.72753364",
"text": "def encode(codes)\n... |
1900059fce3c62ce933fd145ebb1d3a5 | Lists PlayerStreamerInstance records from the API as a list. Unlike stream(), this operation is eager and will load `limit` records into memory before returning. | [
{
"docid": "1fce18446c7daef2d7bcaaf81fab08e3",
"score": "0.0",
"text": "def list(order: T.unsafe(nil), status: T.unsafe(nil), limit: T.unsafe(nil), page_size: T.unsafe(nil)); end",
"title": ""
}
] | [
{
"docid": "a9c66823cc6063f85623f1ea34d13e1b",
"score": "0.71183115",
"text": "def list(limit: nil, page_size: nil)\n self.stream(limit: limit, page_size: page_size).entries\n end",
"title": ""
},
{
"docid": "a9c66823cc6063f85623f1ea34d13e1b",
"score": "0.71183115",
... |
d6302d00676c767636834c299db10498 | Returns the IndexedDirectory in which the Document is included. Returns nil if no corresponding dir is found. | [
{
"docid": "1a2f7f2f9dfdf741abadeeb48d6141b1",
"score": "0.7279886",
"text": "def indexed_directory\n Picolena::IndexedDirectories.keys.find{|indexed_dir|\n dirname.starts_with?(indexed_dir)\n }\n end",
"title": ""
}
] | [
{
"docid": "a905ba9f8fdab23356d8b981cf37c325",
"score": "0.6587496",
"text": "def directory_index\n @directory_index = @hash.fetch(\"DirectoryIndex\")\n return @directory_index\n end",
"title": ""
},
{
"docid": "a6b21096ff3c7b76ff30f0436128b528",
"score": "0.62946534",
"... |
40608f0b6e12b77dbf6779f66cb5fb89 | we no longer support the & syntax | [
{
"docid": "ba4746c6f53b628213dd84013a23ba25",
"score": "0.0",
"text": "def formatflag(engine=nil,format=nil)\n case getvariable('distribution')\n when 'standard' then prefix = \"--fmt\"\n when /web2c/io then prefix = web2cformatflag(engine)\n when /miktex/io the... | [
{
"docid": "f7ce46b9bb7aa287ddba7f14eac70536",
"score": "0.6763258",
"text": "def ampersand!\n # -> uncomment the next line to manually enable rule tracing\n # trace_in( __method__, 12 )\n\n type = AMPERSAND\n channel = ANTLR3::DEFAULT_CHANNEL\n\n \n # - - - - main rule blo... |
41d6cb57fbf4914fdd18fdf76f1ae860 | PATCH/PUT /events/1 PATCH/PUT /events/1.json | [
{
"docid": "c88e9b236d93f48c2ec6088b49b0c50a",
"score": "0.0",
"text": "def update\n @event = Event.find(params[:id])\n redirect_to events_path if @event.update(event_params)\n end",
"title": ""
}
] | [
{
"docid": "dc4ff2adcbcefec9118bdd7e8716ad75",
"score": "0.73754156",
"text": "def update\n event = event.find(params[\"id\"]) \n event.update_attributes(event_params) \n respond_with event, json: event\n end",
"title": ""
},
{
"docid": "0050f781a1e526879347940817ef65b8",
"scor... |
48dfa14350048879a4914d97e2cb7101 | Return true if user is authorized for wiki, otherwise false | [
{
"docid": "bef02d3a39d23039d560a2d812e4d0f8",
"score": "0.0",
"text": "def authorize_for(group)\n current_user.becomes(LearnUser).allowed_to?(group)\n end",
"title": ""
}
] | [
{
"docid": "af7717b0ec8df7061416ece094d86fe6",
"score": "0.85034037",
"text": "def authorized?\n if self.respond_to?(\"mini_wiki_authorized\")\n @authorized = mini_wiki_authorized\n else\n @authorized = true;\n end\n end",
"title": ""
},
{
"docid": "c9183a13bea1383a67ac96... |
98d678713563ff78be616c6ed21d10c0 | Returns a list of all posts, filtered by argument. get all (this is a very expensive query) d.posts_all get all posts matching ruby d.posts_all(:tag => WWW::Delicious::Tag.new('ruby')) === Options :tag:: a tag to filter by. It can be either a WWW::Delicious::Tag or a +String+. | [
{
"docid": "c5dc597ed5e27f96e93b3134a842f706",
"score": "0.6833269",
"text": "def posts_all(options = {})\n params = prepare_posts_params(options.clone, [:tag])\n response = request(API_PATH_POSTS_ALL, params)\n parse_post_collection(response.body)\n end",
"title": ""
}
] | [
{
"docid": "5caf6ca47905bf18f1bbb5a15fca4db2",
"score": "0.6671368",
"text": "def posts\n Post.filter(:tag_id => self.tag_id)\n end",
"title": ""
},
{
"docid": "1f2734168447ea52501b03277749f199",
"score": "0.6384473",
"text": "def all(options = {})\n response= handle_errors ... |
02c29bc2d0b64784e9969e94c34361ec | Input: [1,2,3,4,5,6,7] and k = 3 Output: [5,6,7,1,2,3,4] Explanation: rotate 1 steps to the right: [7,1,2,3,4,5,6] rotate 2 steps to the right: [6,7,1,2,3,4,5] rotate 3 steps to the right: [5,6,7,1,2,3,4] | [
{
"docid": "ce23992d82bc2ce9130eccbf5333fe85",
"score": "0.79773325",
"text": "def rotate(a, k)\n return a if k == 0\n b = []\n length = a.length\n\n rotate = length - k\n\n b[0..k] = a[rotate..-1]\n b[k..-1] = a[0..rotate-1]\n\n b\nend",
"title": ""
}
] | [
{
"docid": "b4bf92d8e07faa55681faec837b6a1d7",
"score": "0.8515881",
"text": "def rotate(nums, k)\n result = []\n len = nums.length\n for i in (len-k)...len\n result << nums[i]\n end\n \n for i in (0...len-k)\n result << nums[i]\n end\n \n result.each_with_index do |n, j|\n nums[j] = ... |
979710dca7d96962cc0b6fe92e8ca92f | Adds input options for the underlying data source. | [
{
"docid": "576d8fd2f11092748e7c1cee34a32567",
"score": "0.0",
"text": "def options(options)\n options.each do |key, value|\n jreader.option(key, value.to_s)\n end\n self\n end",
"title": ""
}
] | [
{
"docid": "8cd86353d0a08444a310e001b9a8c168",
"score": "0.6219003",
"text": "def fill_in_inputs(options, default_options={})\n\n end",
"title": ""
},
{
"docid": "8699ee122509e34a8fe02f9cbf3e3028",
"score": "0.6202875",
"text": "def additional_data_options=(value)\n ... |
3ae21d6429b1057d0e8628caee94c3a7 | time: iterator to compare elements is O(n)? how does recursion affect the time complexity? space: O(n) or O(nlogn) ask ned about how to come up with time and space complexities for both versions o quick sort, in place and out of place. | [
{
"docid": "2aa1fa010f9406784ebcd276c3d8be85",
"score": "0.7014678",
"text": "def quick_sort_in_place! arr, s_idx = 0, e_idx = arr.length-1\n\n e_idx = 0 if e_idx < 0\n if e_idx - s_idx < 1\n return\n end\n\n pivot_idx = partition_and_idx! arr, s_idx, e_idx\n quick_sort_in_place! arr, s_idx, piv... | [
{
"docid": "7543c28f0fe2f08b354b0d4a0dec08df",
"score": "0.742857",
"text": "def in_place_quick_sort(collection, left, right)\n if left < right\n pivot_index = right\n q = partition(collection, left, right, pivot_index)\n in_place_quick_sort(collection, left, q-1)\n in_place_quick_sort(coll... |
16895b5f50ab8ecc5b6a01da6f9cce51 | Set a SockJS socket handler. This handler will be called with a SockJS socket whenever a SockJS connection is made from a client | [
{
"docid": "3eea3ef3339e9ca6ce13f62972dff224",
"score": "0.6507073",
"text": "def socket_handler\n if block_given?\n @j_del.java_method(:socketHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(::VertxApex::SockJSSocket.new(event)) }))\n return self\n ... | [
{
"docid": "593fda371688071fc88f0c2f0ae2cdf7",
"score": "0.6507575",
"text": "def socket_handler\n if block_given?\n @j_del.java_method(:socketHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::VertxWeb::SockJSSocket)) })... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "6e28b76cfa1065a59dfdb2e1149bd779",
"score": "0.0",
"text": "def argumentative_answer_params\n params.fetch(:argumentative_answer, {})\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... |
2372dcfff5901b88b819c3f009bbf144 | GET /eatables GET /eatables.json | [
{
"docid": "b465b3555abf772ffb5385ebe53a03f0",
"score": "0.70169157",
"text": "def index\n @eatables = Eatable.all\n end",
"title": ""
}
] | [
{
"docid": "a19aa1746ca3ee1e66222e054c011fab",
"score": "0.65352094",
"text": "def abilities\n get('/ability/')\n end",
"title": ""
},
{
"docid": "7245a99b2919dc773c2b0b84e3eda56b",
"score": "0.62024826",
"text": "def index\n @weapons = Weapon.all\n\n render json: @weap... |
90f145efec21976d815eddb6831c34b6 | Returns the path to the Chef binary, taking into account the `binary_path` configuration option. | [
{
"docid": "e19b564bfe0850d636f5be501a36e625",
"score": "0.86206806",
"text": "def chef_binary_path(binary)\n return binary if !@config.binary_path\n return File.join(@config.binary_path, binary)\n end",
"title": ""
}
] | [
{
"docid": "e2c1511bbd6b43b66caecc0087be96ac",
"score": "0.86471826",
"text": "def chef_binary_path()\n binary = \"chef-#{@client_type}\"\n return binary if !@config.binary_path\n return win_friendly_path(File.join(@config.binary_path, binary))\n end",
"title": ""
},
{
... |
0ad721d3a15077bc38b87c0e2b245cc6 | Get Work Type By Id | [
{
"docid": "75a9cce4b87283945431f5de45600983",
"score": "0.63574094",
"text": "def time_work_types_id_get(id, opts = {})\n data, _status_code, _headers = time_work_types_id_get_with_http_info(id, opts)\n return data\n end",
"title": ""
}
] | [
{
"docid": "f471cec4788ed16e01272865fa6bca71",
"score": "0.6943259",
"text": "def get_work_by_id( work_id )\n\n begin\n return GenericWork.find( work_id )\n rescue => e\n end\n\n return nil\n end",
"title": ""
},
{
"docid": "19ee5b7c76fca67edcc95c3ba0659c6d",
"scor... |
c484767abdb7e31956b7d98e4810b4d5 | Find the view_as configuration for the first model reference, if there is one for :edit. Only returns true if :edit is defined and is one of the not embeddable types. If not defined, it is considered embeddable. | [
{
"docid": "c53f0c3d122682904f5fff0c725c30a8",
"score": "0.6522998",
"text": "def editable_model_not_embeddable?(mrs)\n mrs.first.to_record_options_config&.dig(:view_as, :edit)&.in?(NotEmbeddedOptions)\n rescue StandardError\n nil\n end",
"title": ""
}
] | [
{
"docid": "f8d470cdb59414a3df31380f6d53657d",
"score": "0.6361252",
"text": "def view_embedded?\n params[:view_as]&.in? %w[embedded simple-embedded]\n end",
"title": ""
},
{
"docid": "6d2e44acd288d8743909fddc494982c8",
"score": "0.61787933",
"text": "def can_edit?(doc_type)\n ... |
5e8fc267d7896e2a2cc032158f30eb94 | Capture a screenshot defining global method to capture screenshot | [
{
"docid": "ae58403aa690b856526fb494f7cdfae8",
"score": "0.70506966",
"text": "def screenshot(filename)\n basepath = File.join(File.dirname(__FILE__), 'screenshot')\n # Create dir if not exists\n Dir.mkdir basepath, 0755 if not File.exist? basepath\n #%x(mkdir -p #{basepath})\n # Capture screenshot... | [
{
"docid": "ad0ccc9c6cc1741e29ba0501add60caf",
"score": "0.83892643",
"text": "def capture_screen\n create_screenshot\n end",
"title": ""
},
{
"docid": "9c5e2acfaf7cd18889829bbe12a2390b",
"score": "0.83231276",
"text": "def take_screenshot; end",
"title": ""
},
{
... |
fdd9b89dd052bf10fb2073ab5b4a30f3 | name level Master 1 All Admin 2 Group Admin 3 User 4 | [
{
"docid": "f3d51b61d0a88a5f7e3349618d69d275",
"score": "0.0",
"text": "def can_approve_member?\n\t\t[1,2].include? level\n\tend",
"title": ""
}
] | [
{
"docid": "c1aaf7b72d1dbcff167775dcfed89341",
"score": "0.63854927",
"text": "def admin_level\n 5\n end",
"title": ""
},
{
"docid": "cde42d94e10acb94d48f6053274cc14c",
"score": "0.63132095",
"text": "def admin_status\n if self.user_admin\n if self.user_admin.level == 1\n... |
d22b2d5b9fa9dab8299ccbca00df67e6 | Check that current user is not an admin (i.e. is a student) | [
{
"docid": "124e3e1ccc4d618390b1ee50742f9cb0",
"score": "0.7720522",
"text": "def non_admin_user\n if !@signed_in || current_user.sk.admin\n render 'errors/access_refused' and return\n end\n end",
"title": ""
}
] | [
{
"docid": "56133566c3d48201530afb16121a300c",
"score": "0.79185563",
"text": "def is_admin_user\n not_found(\"You don't have sufficient privileges to complete that action\") if !current_signed_in_resource.is_admin?\n end",
"title": ""
},
{
"docid": "c3b2987df08482b3765b5032a8cf099f",
... |
c54c65248fe4d452ed0b59cef85ec973 | can override this method to skip or change certain column declarations | [
{
"docid": "a226277809c7f569106006aab170087b",
"score": "0.0",
"text": "def autoreport_column(column)\n return if column.name == report_model.primary_key\n\n name, reflection = report_model.reflections.find { |_, reflection| reflection.foreign_key == column.name }\n case\n ... | [
{
"docid": "701eaad1f52b775c74439fc0d9a80ebf",
"score": "0.79129964",
"text": "def ignored_columns; end",
"title": ""
},
{
"docid": "d91606483ecb357b3f3febcdf3541210",
"score": "0.7316791",
"text": "def reset_column_information\n @columns_except_type = nil\n super\n ... |
1bc3897697a0913181bda5bf24adba41 | create should call set_vars and save! if successful and return true otherwise, it should raise an exception | [
{
"docid": "4c02af7b41c62e87b20ff5e8dd22c074",
"score": "0.6653096",
"text": "def create(opts={})\n return false #override me\n\n end",
"title": ""
}
] | [
{
"docid": "e732b8b7e932649a82f5fac9512a37b3",
"score": "0.73121816",
"text": "def create!\n setup\n true\n end",
"title": ""
},
{
"docid": "d012f180af0585fb2a86293b5c6e94ed",
"score": "0.71777785",
"text": "def save\n # begin\n create_or_update\n... |
d263c81d26a636805cc5d4ec9476d949 | Tells if there is any connection. | [
{
"docid": "219848a90c8812688c34ce9795abadf9",
"score": "0.84209037",
"text": "def has_connection?\n return !@connections.empty?\n end",
"title": ""
}
] | [
{
"docid": "bf1d9cf3699b8af413c4a61e5662c484",
"score": "0.8179092",
"text": "def connected?\n !connections.empty?\n end",
"title": ""
},
{
"docid": "bf1d9cf3699b8af413c4a61e5662c484",
"score": "0.8179092",
"text": "def connected?\n !connections.empty?\... |
9a00157fdad4c5203d10ba3d3fc93133 | Set the correct working status for the command module | [
{
"docid": "32610ae69331c8f42933e026b86a0c25",
"score": "0.70729864",
"text": "def set_command_module_status(command_mod)\n case command_mod.verify_target()\n when BeEF::Core::Constants::CommandModule::VERIFIED_NOT_WORKING\n command_module_status = BeEF::Core::Constants::CommandModule::... | [
{
"docid": "0bd5c78fd42893d895b6b562754ad4ee",
"score": "0.770665",
"text": "def mark_working!; self.status = 1 end",
"title": ""
},
{
"docid": "0bd5c78fd42893d895b6b562754ad4ee",
"score": "0.770665",
"text": "def mark_working!; self.status = 1 end",
"title": ""
},
{
"doc... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "1dfeb1742268d111798fc5e0253b5388",
"score": "0.0",
"text": "def set_venta\n @venta = Venta.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... |
0094f4119ed351a4ee87a3eb001e74be | Add a PlainLocal to the local table. | [
{
"docid": "a7650086923e4426e6b391f4d812d35b",
"score": "0.6548758",
"text": "def plain(name)\n locals << PlainLocal.new(name) unless has?(name)\n end",
"title": ""
}
] | [
{
"docid": "f535160e676fa9cc734ff2c71bf09196",
"score": "0.5868491",
"text": "def create_local_datum(_name, local_datum_type)\n LocalDatum.create(name, local_datum_type)\n end",
"title": ""
},
{
"docid": "2c0e82d6f2bad3348a2e62cae48c16db",
"score": "0.5733348",
"text"... |
a10c90814c6935d51eda0b0fa992d872 | Notify the GUI that we are quitting | [
{
"docid": "319e155e616cbe59b18f1724c4fc27f7",
"score": "0.67914134",
"text": "def notifyExit\n # Stop Timers of the Controller\n @TimersManager.killTimers\n # Notify everybody\n notifyRegisteredGUIs(:onExiting)\n # Delete any integration plugin instance\n @Options[:intPlug... | [
{
"docid": "4539598914155804b98f5e3f34a9c0f4",
"score": "0.72316206",
"text": "def quit\n Gtk.main_quit\n end",
"title": ""
},
{
"docid": "40b1c12cbbc4f450ca29d6cb4f87d665",
"score": "0.71999997",
"text": "def on_prompting_for_quit\n end",
"title": ""
},
{
"docid... |
004780168103b4ae075c202283dcf6e9 | PATCH/PUT /location_admins/1 PATCH/PUT /location_admins/1.json | [
{
"docid": "bea9c21f16a55029dc2210ac7f38ebb7",
"score": "0.7065082",
"text": "def update\n respond_to do |format|\n if @location_admin.update(location_admin_params)\n format.html { redirect_to @location_admin, notice: 'Location admin was successfully updated.' }\n format.json { ren... | [
{
"docid": "e867a1dbdfeef04f242c3e1537600459",
"score": "0.6971257",
"text": "def update\n @admin_location = Admin::Location.find(params[:id])\n\n respond_to do |format|\n if @admin_location.update_attributes(params[:admin_location])\n format.html { redirect_to @admin_location, notice:... |
9ad6e0b05df318d2aac6acbff5d2c9ad | Return an episode's partial level scores and splits using 2 methods: 1) The actual episode splits, using SimVYo's tool 2) The IL splits Also return the differences between both | [
{
"docid": "78ab947ac6e23f706270cd11ec9ca52b",
"score": "0.54808253",
"text": "def send_splits(event)\n # Parse message parameters\n msg = event.content\n ep = parse_highscoreable(msg, mappack: true)\n ep = ep.episode if ep.is_a?(Levelish)\n raise OutteError.new \"Sorry, columns can't be analyzed y... | [
{
"docid": "3804c8411650f5b03cc09f4051b00463",
"score": "0.5662043",
"text": "def split(more: false, realtime_end_ms: nil, gametime_end_ms: nil) # rubocop:todo Metrics/AbcSize Metrics/CyclomaticComplexity Metrics/MethodLength\n prev_segment = segments.order(segment_number: :asc).where(realtime_end_ms... |
b8e34771b4d44a279c2e5d59c32eb7ac | POST /person_interests POST /person_interests.json | [
{
"docid": "31b2b40d639be572deba60c613ec4a55",
"score": "0.7466398",
"text": "def create\n @person_interest = PersonInterest.new(params[:person_interest])\n\n respond_to do |format|\n if @person_interest.save\n format.html { redirect_to @person_interest, notice: 'Person interest was su... | [
{
"docid": "ea118c1ba9ede7500485fad5f72f061e",
"score": "0.72515744",
"text": "def create\n @interest = Interest.new(params[:interest])\n \n respond_to do |format|\n if @interest.save\n format.json { render :json => @interest,\n :status => :created, :location => @interest }\n... |
7a84ae1d8b32a287930eb7366fc22522 | Apply limit clause to source, return new source. | [
{
"docid": "228efdc4a022c9b1466df069c8a00a36",
"score": "0.64134747",
"text": "def handle_limit(source, limit)\n raise NotImplementedError\n end",
"title": ""
}
] | [
{
"docid": "b70e39e2d8d687ae0ced94f44a1b43ff",
"score": "0.7638134",
"text": "def limit limit\n _clone._tap do |c|\n c.limit_clause = limit\n end\n end",
"title": ""
},
{
"docid": "17b5d62ed9ecdc500031152482a93a9e",
"score": "0.7352204",
"text": "def apply... |
6c1d3c4ebc8271e178c2bd6f050bd931 | Interrupt callback. Default is to rethrow the error. | [
{
"docid": "e62d6cad739cc08488089164fa202d1f",
"score": "0.78127074",
"text": "def interrupt(ex)\n raise ex\n end",
"title": ""
}
] | [
{
"docid": "f13bd98bde12492472306628123b87af",
"score": "0.69893223",
"text": "def interrupt!\n @interrupted = true\n end",
"title": ""
},
{
"docid": "cf86e20e8d99e582e8d82f2e18385547",
"score": "0.68582815",
"text": "def do_with_interrupt_handling\n yield if block_g... |
dee3e1aa3ab259f7a0019b1c04e43001 | Sets the car color to white as a default, tank as full, resets the distance Increments the total car count and most popular color for the class | [
{
"docid": "d7ebf91f180b21a78d32bec3bd6926d2",
"score": "0.72677714",
"text": "def initialize(color = \"white\")\n\t\t@fuel = 10\n\t\t@distance = 0\n\t\t@color = color\n\t\t@@total_car_count += 1\n\t\tif @@car_colors.include?(color)\n\t\t\t@@car_colors[color] += 1\n\t\telse\n\t\t\t@@car_colors.merge!(co... | [
{
"docid": "c37823f98fc808ee563b3374fe377b7c",
"score": "0.6577933",
"text": "def paint_car(new_paint_color)\n\t\tnew_paint_color.captialize!\n\n\t\t@@cars_per_color.each_key { |color| \n\t\t\tif color == new_paint_color\n\t\t\t\t@@cars_per_color[color] += 1\n\t\t\telse\n\t\t\t\t@@cars_per_color[new_pai... |
49da1f866ad149ad8015b219e795e3d7 | Custom attribute writer method with validation | [
{
"docid": "4b90328cea1c8e0052633a685202bb78",
"score": "0.0",
"text": "def version=(version)\n if !version.nil? && version.to_s.length > 255\n fail ArgumentError, 'invalid value for \"version\", the character length must be smaller than or equal to 255.'\n end\n\n if !version.nil?... | [
{
"docid": "5a0bcdaca95c21b13aacca36f9fad742",
"score": "0.6955513",
"text": "def _write_attribute(attr_name, value); end",
"title": ""
},
{
"docid": "5812dd7a37c0eccc3d9481c23d74c649",
"score": "0.69278884",
"text": "def write_attribute(attr_name, value); end",
"title": ""
},
... |
6d81d8a57ac71ae9912a23889b29c49f | Decorate this node with the decorators set up in this node's Document | [
{
"docid": "656cf2584457c8a220b91c87899accbc",
"score": "0.72329766",
"text": "def decorate!\n document.decorate(self) if document\n end",
"title": ""
}
] | [
{
"docid": "516a643505b3632c319abedaf4e318be",
"score": "0.76000273",
"text": "def decorate(node); end",
"title": ""
},
{
"docid": "516a643505b3632c319abedaf4e318be",
"score": "0.76000273",
"text": "def decorate(node); end",
"title": ""
},
{
"docid": "23e1799af78830dbe652... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "34ea466128aabaf23a3a2fffc218c14b",
"score": "0.0",
"text": "def set_sale\n @sale = Sale.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... |
c569a9851e33ada7edb53ce6b7690d5a | The constructor which takes a hash containing configuration parameters. Valid configuration parameter names are as follows. :host :service_owner_api_key :service_owner_api_secret :service_api_key :service_api_secret | [
{
"docid": "d619be9a1024847c88656c9d71f8d9b5",
"score": "0.8686222",
"text": "def initialize(config = {})\n @host = extract_value(config, :host)\n @service_owner_api_key = extract_value(config, :service_owner_api_key)\n @service_owner_api_secret = extract_value(conf... | [
{
"docid": "1380f426d47592b2617c1c5781dda504",
"score": "0.75518495",
"text": "def initialize(host, api_key: nil, api_secret: nil)\n @host = host\n @api_key = api_key\n @api_secret = api_secret\n\n end",
"title": ""
},
{
"docid": "029df89b47cf12d735b64ccfa0a694bc",
"sco... |
1b8eb0fcd57cb55c17296275e362928d | Returns true/false on whether the adapter you want to use is supported for the cache. | [
{
"docid": "c73644116117ab920cf26089889c9a52",
"score": "0.89256847",
"text": "def adapter_supported?(a = cache_conn_instance.get(cache_name).class)\n return !unsupported_adapters.include?(a)\n end",
"title": ""
}
] | [
{
"docid": "9e17cfda38819dc511c5d5e33118551e",
"score": "0.708397",
"text": "def cacheable?\n @cacheable\n end",
"title": ""
},
{
"docid": "b9645c258ad8c17f17de7a05bc0e9774",
"score": "0.7032771",
"text": "def enabled?\n @cache_enabled\n end",
"title": ""
},
{... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "a097fc15ff4615d838d930f25eff9164",
"score": "0.0",
"text": "def set_trajetpumd\n @trajetpumd = Trajetpumd.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... |
a8ca66ce8969524108ca9a69ecd00f07 | spaces_around return all the spaces around player,nil if nothing | [
{
"docid": "0c884b9a1379cb937876a6b7e1dd1f33",
"score": "0.66671693",
"text": "def spaces_around(direction = @directions)\n spaces = []\n directions.each{|d|\n spaces << @warrior.feel(d)\n }\n spaces\n end",
"title": ""
}
] | [
{
"docid": "bab4ccd25f2091cb9fc1ef8fab2aee83",
"score": "0.7000021",
"text": "def getSpaces playerData\r\n spaces = []\r\n\tgame.spaces.each do |space|\r\n\t if space.owner==playerData\r\n\t spaces.push(space)\r\n\t end\r\n\tend\r\n\treturn spaces\r\n end",
"title": ""
},
{
"docid":... |
a5a62982c25876cee47c8d7393406ee2 | GET /day_types GET /day_types.json | [
{
"docid": "be8937b24aeb275f3d955bf618f471ab",
"score": "0.74145824",
"text": "def index\n @day_types = DayType.all\n end",
"title": ""
}
] | [
{
"docid": "1d5a8df29d75f859bd804141ed274b59",
"score": "0.6838959",
"text": "def appointment_types(params = {})\n scope 'default'\n get('schedule/appointmenttypes/', params)\n end",
"title": ""
},
{
"docid": "0a7c5b04b264bddb270b86799b6ee88f",
"score": "0.6699223",
"tex... |
5ff47ea373a54f73392a7dc065a7c7ab | puts middle_way([1, 5, 3], [1, 4, 2]) puts middle_way([2, 4, 1, 2, 8], [5, 2, 3]) | [
{
"docid": "ce7e858721a14f21d8a2103838989c56",
"score": "0.0",
"text": "def either_2_4(list)\n count = 0\n index = 0\n\n list.each do |i|\n if i == 2 && i == list[index + 1] || i == 4 && i == list[index + 1]\n count += 1\n end\n index = index + 1\n end\n\n ... | [
{
"docid": "82bd3e8f7ae1492164acc25bc0d343e4",
"score": "0.771687",
"text": "def middle_way(list1,list2)\n new_list = []\n if list1.size % 2 == 1\n middle1 = list1[list1.size/2]\n new_list.push(middle1)\n else\n middle1 = (list1[list1.size/2] + list1[list1.size/2 - 1]) / 2.... |
1807ca7d3d6b5b18b0a5edcb9288003e | Changes the image encoding format to the given format See even === Parameters [format (to_s)] an abreviation of the format === Yields [Magick::Image] additional manipulations to perform === Examples image.convert(:png) source://carrierwave//lib/carrierwave/processing/rmagick.rb122 | [
{
"docid": "94dcbe5a87c89069aedff785f9502ffd",
"score": "0.58119386",
"text": "def convert(format); end",
"title": ""
}
] | [
{
"docid": "323e48d7ef1c60eee89b7e94a5c91710",
"score": "0.80231905",
"text": "def convert!(format)\n process! do |img|\n img.format = format.to_s.upcase\n img\n end\n end",
"title": ""
},
{
"docid": "b1dfeb88a3f74adde7e5bfa4654c397e",
"score": "0.77777934",
... |
ef6afaf77ac97a643a8bcaa80174319b | Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or `cancelSearch` to end this search session. | [
{
"docid": "dd8693b027a1f477c462aceb974f7d55",
"score": "0.0",
"text": "def perform_search(query:, include_user_agent_shadow_dom: nil)\n {\n method: \"DOM.performSearch\",\n params: { query: query, includeUserAgentShadowDOM: include_user_agent_shadow_dom }.compact\n }\n ... | [
{
"docid": "8a88b46ec241509964467a147da7db5b",
"score": "0.70465994",
"text": "def search(search_string)\n GoogleAjax::Search.web(search_string)[:results]\n end",
"title": ""
},
{
"docid": "e19b54d744b9a98b743c4a39f7475bf9",
"score": "0.6821071",
"text": "def search(string, o... |
4f13f4eae84c9588b250b7363161c298 | Add a sheet to the colleection of worksheets. sheetname (string) is the name of the worksheet tab objectType (string) is the type of object you're sending in. objects is your collection of ActiveRecord objects. Here's an example | [
{
"docid": "1174e13e8ae640ccff10e5ab22a42186",
"score": "0.83755636",
"text": "def addWorksheetFromActiveRecord(sheetname, objectType, objects)\r\n\t \r\n\t objects = [objects] unless objects.class == Array\r\n\t \r\n\t item = [sheetname.to_s, objectType.to_s, objects]\r\n\t @work... | [
{
"docid": "9e5b25433ecbb5da613c1466d53bc5f5",
"score": "0.7027272",
"text": "def worksheet (sheetname, objectType,objects)\r\n\t\r\n\t buffer =\"\"\r\n\t xm = Builder::XmlMarkup.new(buffer) # stream to the text buffer\r\n\t type = ActiveRecord::Base.const_get(objectType.classify)\r\n\t ... |
a623c224c50a24adbaae38b2618a9961 | Array that contains all elements from both arguments in sorted order. You may not provide any solution that requires you to sort the result array. You must build the result array one element at a time in the proper order. Your solution should not mutate the input arrays. Examples: merge([1, 5, 9], [2, 6, 8]) == [1, 2, ... | [
{
"docid": "a67036cd9608751dabb63e74ff08ebc2",
"score": "0.7564297",
"text": "def merge(arr1, arr2)\n temp_arr = arr1 + arr2\n merged_and_sorted_arr = []\n until temp_arr.empty?\n merged_and_sorted_arr << temp_arr.delete(temp_arr.min)\n end\n merged_and_sorted_arr\nend",
"title": ""
}
] | [
{
"docid": "96c8753148bde25390fce7fe16abed10",
"score": "0.79365045",
"text": "def merge_sorted_arrays(array1, array2)\nend",
"title": ""
},
{
"docid": "6f60487bfc4e8a574087197197847e54",
"score": "0.78782606",
"text": "def merge(array_1, array_2, return_array)\n if array_1 ==... |
1634fb39b752b0055018579c54d4b735 | Invoke the appropriate behavior when duplicate columns are present. | [
{
"docid": "112aa356215eafd8b203361cf4478988",
"score": "0.7347326",
"text": "def handle_duplicate_columns(cols)\n message = \"#{caller(*CALLER_ARGS).first}: One or more duplicate columns present in #{cols.inspect}\"\n\n case duplicate_columns_handler_type(cols)\n when :raise\n rai... | [
{
"docid": "e561074ca1b6c3d619b3e12ad733b567",
"score": "0.7389071",
"text": "def on_duplicate_columns(handler = (raise Error, \"Must provide either an argument or a block to on_duplicate_columns\" unless block_given?; nil), &block)\n raise Error, \"Cannot provide both an argument and a block to on... |
09c27c91b6739ffc032e95908572940e | GET /article_categories/1 GET /article_categories/1.xml | [
{
"docid": "0d7b9d99e3a105c3be3468b1cf8b1418",
"score": "0.0",
"text": "def show\n @article_category = ArticleCategory.find(params[:id])\n respond_to do |format|\n format.html # show.html.erb\n format.xml do\n result=Array.new\n @article_category.articles.each do |article|\... | [
{
"docid": "8fb11c432a8bb2c5fc11d5fb6181b5b5",
"score": "0.7126932",
"text": "def get_categories\n body = build_request(2935, 1501, \"ACTIVEHEADINGS\")\n response = send_to_localeze(body)\n xml_doc = respond_with_hash(Nokogiri::XML(response.to_xml).text)\n end",
"title": ""
},
{
"... |
ca1c5d58debba8aabf61cb05b14cdf03 | File activesupport/lib/active_support/core_ext/hash/reverse_merge.rb, line 17 | [
{
"docid": "a9b1924f105d809d777a825968723cbc",
"score": "0.64788365",
"text": "def fwf_reverse_merge!(other_hash)\n # right wins if there is no left\n merge!( other_hash ){|key,left,right| left }\n end",
"title": ""
}
] | [
{
"docid": "3510460842b8e7c11a5592ac47934064",
"score": "0.74726707",
"text": "def reverse_merge(other_hash); end",
"title": ""
},
{
"docid": "3510460842b8e7c11a5592ac47934064",
"score": "0.74726707",
"text": "def reverse_merge(other_hash); end",
"title": ""
},
{
"docid":... |
54111c72f90856e4894558367c96aa56 | Free the native resources associated with this object. This will be done automatically on garbage collection if not called explicitly. | [
{
"docid": "3295da3def6916f003b523f1ffe1b56c",
"score": "0.6217724",
"text": "def destroy\n if @finalizer\n @finalizer.call\n ObjectSpace.undefine_finalizer(self)\n end\n @ptr = @finalizer = nil\n \n self\n end",
"title": ""
}
] | [
{
"docid": "43ea462322034edf1887a49e6b806f24",
"score": "0.80773443",
"text": "def free\n self.autorelease = false\n FFI::Platform::POSIX.free(self) unless null?\n end",
"title": ""
},
{
"docid": "351b8b3b55fbcd3bae90e78246ff234e",
"score": "0.7961796",
"text": "def free... |
ab38ccf8a9f913635f2f368fb9b5e783 | Outputs a single line of Applescript code | [
{
"docid": "166f68d3c06dabee9b0f5d5ac0c343b6",
"score": "0.0",
"text": "def output(command)\n @buffer << command.gsub(/'/, '\"')\n end",
"title": ""
}
] | [
{
"docid": "824717868fc085286c451d7a053cdecf",
"score": "0.63589495",
"text": "def show(output = $stout)\n pp(@code,output)\n end",
"title": ""
},
{
"docid": "69131b46218acd5bca092241785e30a6",
"score": "0.629022",
"text": "def execute_applescript(scpt)\n File.... |
d32e40913252f847bdcd79e2f24f37cc | Returns the maximum size of the queue. | [
{
"docid": "5d5fad07c583c408469854669388857d",
"score": "0.0",
"text": "def max\n @max\n end",
"title": ""
}
] | [
{
"docid": "5f021a251b7c09b660e41a7afd09f6c1",
"score": "0.8248831",
"text": "def max_queue_count()\n @max_queue_count\n end",
"title": ""
},
{
"docid": "ac95e731273bb5e66c281e458d3f4f68",
"score": "0.78035843",
"text": "def queue_size\n _get(\"/system/queue-size\") { ... |
c6546d675b9c537427043c8b99179a4d | p first_anagram?("dog", "god") true p first_anagram?("dog", "cat") false Phase II: Write a method second_anagram? that iterates over the first string. For each letter in the first string, find the index of that letter in the second string (hint: use Arrayfind_index) and delete at that index. The two strings are anagram... | [
{
"docid": "c0c653d987fcf805a5ebba89c48da75e",
"score": "0.85427636",
"text": "def second_anagram?(str1, str2)\n str1_array = str1.chars\n str2_array = str2.chars\n\n str1_array.each_with_index do |char, idx|\n if str2_array.include?(char)\n index2 = str2_array.index(char)\n ... | [
{
"docid": "53cb0fc7623df3e7ec13dc1e3044cca4",
"score": "0.87325275",
"text": "def second_anagram?(string1, string2)#time O(n) #space O(n)\n string2 = string2.split('')\n string1.each_char do |char|\n index = string2.index(char) \n if !index.nil?\n string2.delete_at(index)\n end\n end\n... |
d4073b475d8c0f96981d1f99fdcb3b39 | Read in keys from file and find the locations of the values | [
{
"docid": "e764801336cc61dba43cfc5b0200d2cc",
"score": "0.6410773",
"text": "def search_from_file\r\n\t\tprint_search_header\r\n\t\tsearch_keys = File.readlines(\"SEARCH.txt\")\r\n\t\tsearch_keys.each do |key|\r\n\t\t\tresult = search(key.chomp)\r\n\t\t\tif result == -1\r\n\t\t\t\tprint_search(key.chom... | [
{
"docid": "49409aa31127ef44bbebf82915457c12",
"score": "0.6888244",
"text": "def read_keys\n keys = File.open(\"nod32keysfile.txt\", \"r\").read\n fkeys = keys.each_line { |line| }\nend",
"title": ""
},
{
"docid": "e591bc65d46c6df6cc4e81a75ff8634b",
"score": "0.6572232",
"text": "... |
37c4e531f5b56d23c44a00c1ee06b80e | The default hook used by oauth to specify the redirect url for failure. | [
{
"docid": "56eb7b90c071c2e8f183deee3351668f",
"score": "0.59467137",
"text": "def after_oauth_failure_path_for(scope)\n new_session_path(scope)\n end",
"title": ""
}
] | [
{
"docid": "99145c8a4adfe75e8fc1b8cebdfdbe5f",
"score": "0.7053104",
"text": "def default_redirect_uri_callback(uri, res)\n newuri = urify(res.header['location'][0])\n if !http?(newuri) && !https?(newuri)\n warn(\"#{newuri}: a relative URI in location header which is not recommended\")\n ... |
f09dc7e4e5107a8a854d1070be3e4dca | GET /perfis GET /perfis.xml | [
{
"docid": "8ba453c30296107b0b0f75318899ca32",
"score": "0.5874237",
"text": "def index\n @perfis = Perfil.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @perfis }\n end\n end",
"title": ""
}
] | [
{
"docid": "9754e7c0da3eae7e2f38fb7601ed2b3d",
"score": "0.6114356",
"text": "def index\n @perf_benchmarks = @app.perf_benchmarks.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @perf_benchmarks }\n end\n end",
"title": ""
},
{
... |
9d90a9110782d22af47750be92de1285 | Returns a list of visible notes | [
{
"docid": "215ecedb2aacf813f46f8a99d5d503c7",
"score": "0.68945974",
"text": "def visible_notes\n user = params.permit(:latitude, :longitude)\n center = Geokit::LatLng.new(user[:latitude], user[:longitude])\n render json: GeoNote.within(base_radius, units: :meters, origin: center).all.select{|... | [
{
"docid": "ca92948ffcf07b788b2b98a9db173a6e",
"score": "0.67997223",
"text": "def visible_collapsed_note_ids\n els = browser.find_elements(xpath: '//div[contains(@id, \"note-\")][contains(@id, \"-is-closed\")]')\n els.map do |el|\n parts = el.attribute('id').split('-')\n (parts[2] == 'i... |
7e790dc12bf740124ce3cd9291d2941c | Sets the attribute path | [
{
"docid": "e0cd18bac032a42bea08e60c0698a868",
"score": "0.0",
"text": "def path=(_arg0); end",
"title": ""
}
] | [
{
"docid": "1b1b78f85d5a7e4aa1409d535a3e894d",
"score": "0.7495515",
"text": "def path=(new_path)\n write_attribute path_field, new_path\n end",
"title": ""
},
{
"docid": "2a53347d060952a7f5d8407b89087959",
"score": "0.7032812",
"text": "def attr_rw_path(*attrs)\n ... |
1b62bcfb9664ffdf65fc384081d96bd3 | check if we need password to update user data ie if password or email was changed extend this as needed | [
{
"docid": "68fff63841293eaa0f31009d93148ca7",
"score": "0.0",
"text": "def needs_password?(user, params)\n\t\tuser.email != params[:user][:email] ||\n\t\tparams[:user][:password].present?\n\tend",
"title": ""
}
] | [
{
"docid": "c9743bca949c13607bf05812f71f2e1b",
"score": "0.79863393",
"text": "def supplied_password_on_update?\n !params[:user][:id].nil? && !params[:user][:password].blank? && !params[:user][:password_confirmation].blank?\n end",
"title": ""
},
{
"docid": "0de39ecc8b8bd65f1895d4eb5... |
fe2f56c3ac9edcba89da55e235b03384 | Generate a multicast and globally unique MAC address | [
{
"docid": "466bb5565b52fd3eb98fe77ba0aab349",
"score": "0.7401642",
"text": "def test_gen_mac_unicast_globally_unique\n mac = RFauxFactory.gen_mac(multicast: false, locally: false)\n first_octect = mac.split(':')[0].to_i(16)\n mask = 0b00000011\n assert_equal first_octect & mask, 0\n end",... | [
{
"docid": "87c2303dfccc7c0b86059a347d87e370",
"score": "0.8006559",
"text": "def generate_mac\n if locate_config_value(:macaddress).nil?\n ('%02x' % (rand(64) * 4 | 2)) + (0..4).reduce('') { |s, _x|s + ':%02x' % rand(256) }\n else\n locate_config_value(:macaddress)\n end\n ... |
f6507bae5f8bf67a5abfe74cf55baaee | Returns a collection of subject alternative names requested. If no alternative names were requested, this returns an empty set. | [
{
"docid": "3d0e42cf6354a07ebf7d84761820a44d",
"score": "0.7841749",
"text": "def subject_alternative_names\n @_subject_alternative_names ||= begin\n if attribute = read_attributes_by_oid('extReq', 'msExtReq')\n set = OpenSSL::ASN1.decode(attribute.value)\n seq = set.value.first\n ... | [
{
"docid": "d8bbb64e37068744730da7f311111394",
"score": "0.6685873",
"text": "def subject_names\n @subject_names ||= sw_subject_names\n end",
"title": ""
},
{
"docid": "90a58f32cc79ffd88e877a4425885254",
"score": "0.61344117",
"text": "def alternative_full_names\n @a... |
88d872848912e07a71fe0efc76714c70 | This corresponds to /admin/:id where :id is the admin id This route is where most admin actions will be handled Such actions include: verifying educators, approving DMCA takedowns | [
{
"docid": "18bd9f30de6d19aecf290db0e732f0a3",
"score": "0.0",
"text": "def show\n @educators = Educator.where(verified: [false, nil]).all\n @dmcas = Dmca.all\n end",
"title": ""
}
] | [
{
"docid": "ee3ed234f4863daf711b690c0c13e6b1",
"score": "0.7651359",
"text": "def admin\n #TODO\n end",
"title": ""
},
{
"docid": "db2dfae624d1b925cc4609a18175f5b2",
"score": "0.744634",
"text": "def admin\n end",
"title": ""
},
{
"docid": "db2dfae624d1b925cc4609a181... |
4ff748337ef91219032bff613e86f4c0 | DELETE /situacaodemandas/1 DELETE /situacaodemandas/1.json | [
{
"docid": "37076fa91a0d080d395d813de635e57d",
"score": "0.7171058",
"text": "def destroy\n @situacaodemanda.destroy\n respond_to do |format|\n format.html { redirect_to situacaodemandas_url, notice: 'Situacaodemanda was successfully destroyed.' }\n format.json { head :no_content }\n ... | [
{
"docid": "b1a17c1ee1af05c79fe156622df44818",
"score": "0.72866964",
"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": ... |
a2099a77c85e91272ae2f9e35b937953 | Only allow a trusted parameter "white list" through. | [
{
"docid": "62d9e9690c7315c0fd13c2c4569f2436",
"score": "0.0",
"text": "def search_session_params\n @search_session_params ||= params.require(:search_session).permit(:search_type, :query, :results_count, :convertable_id, :convertable_type, :ui_session_data)\n end",
"title": ""
}
] | [
{
"docid": "c1f317213d917a1e3cfa584197f82e6c",
"score": "0.7121987",
"text": "def allowed_params\n ALLOWED_PARAMS\n end",
"title": ""
},
{
"docid": "b32229655ba2c32ebe754084ef912a1a",
"score": "0.70541996",
"text": "def expected_permitted_parameter_names; end",
"title": "... |
467f2bde5d5ff976413322fbcf83798f | :callseq: create_time > string Get the creation time of this run as an instance of class Time. | [
{
"docid": "937b30911863592df3cc24f884c6e766",
"score": "0.7425324",
"text": "def create_time\n Time.parse(@server.read(links[:createtime], \"text/plain\", @credentials))\n end",
"title": ""
}
] | [
{
"docid": "ead0f72fa3c385c99f0f3921809fdc20",
"score": "0.82655436",
"text": "def create_time\n Time.parse(@server.get_run_attribute(@uuid, @links[:createtime]))\n end",
"title": ""
},
{
"docid": "7d0d2603a100d500e1265f1999c7fe5a",
"score": "0.7640868",
"text": "def create_t... |
39ff7fecad13e432a68fce185888bdf3 | Set the Time To Live (TTL) in seconds. | [
{
"docid": "124b03a7b011a95c6d48e92fec96b25f",
"score": "0.7786453",
"text": "def ttl_in_seconds=(value)\n @ttl_in_seconds = value\n refresh_rates_expiration! if ttl_in_seconds\n end",
"title": ""
}
] | [
{
"docid": "3fe24cb91b9e4939af9c785d7e28a9ac",
"score": "0.79687583",
"text": "def ttl_in_seconds= value\n @ttl_in_seconds = value\n refresh_rates_expiration! if ttl_in_seconds\n end",
"title": ""
},
{
"docid": "abb47fb769cfed1d77eb558c77f457ba",
"score": "0.7869... |
6ed7e2d150d60538802413c950a6e3a5 | GET /conversations/1 GET /conversations/1.json | [
{
"docid": "44bb47d1aed75d45bef28b065797d16b",
"score": "0.0",
"text": "def show\n redirect_to conversation_messages_path(@conversation)\n end",
"title": ""
}
] | [
{
"docid": "a76ae7f2f37f33be4d203540ecee7005",
"score": "0.7849923",
"text": "def show\r\n @conversation = current_user.mailbox.conversations.find(params[:id])\r\n render json: @conversation\r\n end",
"title": ""
},
{
"docid": "5d5b520ece06808f670fba74b4592a7a",
"score": "0.777195... |
27c399bfd61cf25ba75edd6ff3b7a48b | Rolls back a savepoint. | [
{
"docid": "1f78ee113fc517cc825c53a609dbaf67",
"score": "0.7490998",
"text": "def rollback_savepoint(name)\n execute %(ROLLBACK TO SAVEPOINT #{name};)\n end",
"title": ""
}
] | [
{
"docid": "953b18f6f29ecab0951789c10e1c4278",
"score": "0.7907303",
"text": "def rollback_to_savepoint\n execute(\"ROLLBACK TO SAVEPOINT #{current_savepoint_name}\")\n end",
"title": ""
},
{
"docid": "12c2a294db2a00f31686bd611775ab71",
"score": "0.74708563",
"text": "def... |