query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
01d75231c3f024f1a4efdca88ed2f6a5 | When used with override = true(ish), will try to locate the binding site for the variable and return it. If override is set to 'sub', will stop before digging into the parent subprocess. | [
{
"docid": "7101ccf730a139f535477b47374b59ac",
"score": "0.6562937",
"text": "def locate_set_var(var, override)\n\n hk = h.variables && h.variables.has_key?(var)\n\n if ( ! override) || var.match(/^\\//)\n false\n elsif override == 'sub' && DefineExpression.is_definition?(tree) && ... | [
{
"docid": "c9909fb346f63d62cf03b29db9f3e77a",
"score": "0.57759374",
"text": "def locate_var(var, prefix=nil)\n\n var, prefix = split_prefix(var, prefix)\n\n if prefix == '//' # engine variable\n nil\n elsif prefix == '/' && par = parent # process variable\n par.locate_var(... |
0afbb56fe1eb52562d8c845de0d3da01 | Instanciate a class from a hash | [
{
"docid": "6b4ba5ffe88965616d51115d3d46696d",
"score": "0.75163394",
"text": "def from_hash(hash)\n new.from_hash(hash)\n end",
"title": ""
}
] | [
{
"docid": "9b00961a500f5eefe5dd5b24dd55d60f",
"score": "0.7942752",
"text": "def import(hash, klass)\n klass.new(hash)\n end",
"title": ""
},
{
"docid": "e2e77e3d4692b97a7841734d5d35a0ec",
"score": "0.77920777",
"text": "def from_hash(hash); end",
"title": ""
},
{
"d... |
af449534555579454286a787be4c287f | POST /ssystems POST /ssystems.json | [
{
"docid": "30db1e700e277393dccbf53e6761da1e",
"score": "0.75975597",
"text": "def create\n @ssystem = Ssystem.new(ssystem_params)\n\n respond_to do |format|\n if @ssystem.save\n format.html { redirect_to @ssystem, notice: 'Ssystem was successfully created.' }\n format.json { re... | [
{
"docid": "65f93539727a577b683d10a486938a31",
"score": "0.69371104",
"text": "def create\n @system = System.new(params[:system])\n\n respond_to do |format|\n if @system.save\n format.html { redirect_to @system, notice: 'System was successfully created.' }\n format.json { render... |
f6f65f8a57666fc0589c6f71767abbdd | Is this user an admin? | [
{
"docid": "62c054636755307e59bde7030ddcb809",
"score": "0.0",
"text": "def admin?\n roles.admin.exists?\n end",
"title": ""
}
] | [
{
"docid": "5f4963a207169ba585fc0099ffb9ca4e",
"score": "0.90494174",
"text": "def user_admin?\n user_logged_in? && @current_user.type == 'Admin'\n end",
"title": ""
},
{
"docid": "15495e5c6c5dc8bfcde20bac9825e64e",
"score": "0.9018155",
"text": "def is_admin?(user)\n user.adm... |
c50c25c6a4a1c44df1d232dacce3a864 | Queries the InfoStore with the provided statement, returning an Array of InfoObject(s). | [
{
"docid": "fb04b59c390acd0dffa5336bfc34417e",
"score": "0.75354666",
"text": "def query(stmt)\n sql = stmt.match(/^(path|query|cuid):\\/\\//i) ? path_to_sql(stmt) : stmt\n @infostore.query(sql).map{|o| InfoObject.new(o)}\n end",
"title": ""
}
] | [
{
"docid": "cf5074710e7b99a619509cf6559d1e0d",
"score": "0.62459695",
"text": "def query(statement)\n collection = []\n @repos.each do |repo|\n self.class[repo].query(statement).each do |row| \n collection << row\n end\n end\n collection\n end",
"title":... |
6ea027035e660e254aba77f4bd9cb6e7 | Generate a public/private key pair | [
{
"docid": "12d32c4778d8888b03ccecb539bea399",
"score": "0.83053005",
"text": "def generate_key_pair\n\tg = 2\n\tp = generate_safe_prime(g)\n\td = rand(p)\n\te2 = ModMath.pow(g, d, p)\n\n\tpublic_key = [p, g, e2]\n\tprivate_key = [p, g, d]\n\n\treturn public_key, private_key\nend",
"title": ""
}
] | [
{
"docid": "3aec3a8bfcc314ff374a6ddcc0ae8172",
"score": "0.82887447",
"text": "def generate_keypair\n key = OpenSSL::PKey::RSA.new 2048\n load_keypair(key.to_pem, key.public_key.to_pem)\n return [@private_key, @public_key]\n end",
"title": ""
},
{
"docid": "5a610f6f7a87076677e0fc30... |
a544249e10e5236c18da6ee06e66a554 | Tries to validate the session from information in the session | [
{
"docid": "63a7f29adadf17fd902799265dca19bb",
"score": "0.0",
"text": "def valid_session?\n if session_credentials\n self.unauthorized_record = search_for_record(\"find_by_#{remember_token_field}\", session_credentials)\n return valid?\n end\n \n false\n ... | [
{
"docid": "a2907a1f1b1a311111965369e8a5e48f",
"score": "0.79082257",
"text": "def valid_session\r\n {}\r\n end",
"title": ""
},
{
"docid": "b90d65747b2497683d35976a43793a3c",
"score": "0.7905665",
"text": "def valid_session?\n return Sessions.is_valid?(session[:session_id]) \n... |
33813fd6a929f8efa17432f71f2c7841 | Main Processing : Spriteset Initialization | [
{
"docid": "d30343ede58c32c5b777c70315828887",
"score": "0.79839134",
"text": "def main_spriteset ; end",
"title": ""
}
] | [
{
"docid": "a783b458a325d65a0eb1755539148436",
"score": "0.77455086",
"text": "def main_spriteset\r\n super\r\n # Make sprite set\r\n @spriteset = Spriteset_Map.new\r\n end",
"title": ""
},
{
"docid": "303bfd7c692173f9401cc3de72f7104e",
"score": "0.7650873",
"text": "def ma... |
7721f8f0ac4f275f39ac69e547584b4a | find the id of the next item so (current..next).size == chunk_size | [
{
"docid": "c98a2e45dd089963833344be2ecbc65e",
"score": "0.63491136",
"text": "def get_next_offset(current)\n context.select_value(sanitize([\n %Q{\n SELECT MAX(id)\n FROM (\n SELECT id FROM #{source}\n WHERE id > ?\n ORDER BY ... | [
{
"docid": "08c93322228a7978523ac71e6bf262a6",
"score": "0.7127212",
"text": "def get_next\n r = nil\n iterator_lock do\n if @iterator <= @last_id\n r = get(@iterator)\n @iterator += 1\n @iterator_file.write(\"#{@iterator.to_s(36)}\\n\")\n r\n ... |
5947010b79f853492dfdbbd4f2758250 | GET /admin/geonodes/new GET /admin/geonodes/new.json | [
{
"docid": "ba356ccd95d65a6d53dd717cb60c2ec2",
"score": "0.7842644",
"text": "def new\n @admin_geonode = Admin::Geonode.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @admin_geonode }\n end\n end",
"title": ""
}
] | [
{
"docid": "c1bbbefae18288fc0d3d51e435d77707",
"score": "0.7549366",
"text": "def create\n @admin_geonode = Admin::Geonode.new(params[:admin_geonode])\n\n respond_to do |format|\n if @admin_geonode.save\n format.html { redirect_to @admin_geonode, notice: 'Geonode was successfully creat... |
1f2365c0fd67fa8ca8003ca75d7254e2 | constructor with dn_ldap initialisation _dn and _passdn are required, _rootdn, _host and _port are optionals return a boolean | [
{
"docid": "e88753bb06f0b104057c8d54adb4d2a8",
"score": "0.6409158",
"text": "def initialize(_dn, _rootdn='', _passdn='', _host = 'localhost', _port = 389)\n _scope = LDAP::LDAP_SCOPE_SUBTREE\n _filter = '(objectClass=*)'\n super( _host, _port, _rootdn, _passdn, _filter, _scope )\n ... | [
{
"docid": "e8b25c858e669965c7961569710a1063",
"score": "0.810314",
"text": "def initialize(_host='localhost', _port=389, _rootdn='', _passdn='', _filter='(objectClass=*)', _scope=LDAP::LDAP_SCOPE_SUBTREE ) \n @host_ldap = _host # default localhost\n @port_ldap = _port # default 389\n @s... |
1aa912250349b9947327406015c2f0e1 | GitHub user owning this repo. Returns the user name as a String. | [
{
"docid": "087c83dff736c8a7880602518d7da055",
"score": "0.0",
"text": "def github_owner\n uri[/.*[\\/:]([a-zA-Z0-9\\-_]+)\\//] && $1\n end",
"title": ""
}
] | [
{
"docid": "11cb23f82e7d57b50917eaa3ae0685ed",
"score": "0.7521199",
"text": "def github_user\n @user ||= `git config --get github.user`.strip\n @user ||= ENV[:GITHUB_USER].strip\n end",
"title": ""
},
{
"docid": "6a514576f3aebf7de798a2111084a713",
"score": "0.7489457",
... |
311bec02e92cef4b488207e8e037b388 | informacion de un usuario | [
{
"docid": "98c57ad27b551ae12b8f2610d2b4db2b",
"score": "0.0",
"text": "def usern\n user = User.username(params[:usern])\n render json: user, status: 200\n end",
"title": ""
}
] | [
{
"docid": "5e343c82dac552260d3fefd4af825071",
"score": "0.72564495",
"text": "def info()\n super(USER_METHODS[:info], 'USER')\n end",
"title": ""
},
{
"docid": "b57ebb820c72bdd8201c02e2ca045f74",
"score": "0.7189962",
"text": "def user_info\n @connection.post(... |
f61ad6cb02299aee0223e10fd1b9be16 | DELETE /bookings/1 DELETE /bookings/1.json | [
{
"docid": "7d2b12e7180889b3b75ae81a67e77701",
"score": "0.6953511",
"text": "def destroy\n booking = @booking\n @booking.destroy\n respond_to do |format|\n flash[:success] = \"Your Booking was Cancelled Successfully\"\n format.html { redirect_to bookings_url}\n format.json { hea... | [
{
"docid": "899ffdf005df064f4dbab155002fe202",
"score": "0.7660707",
"text": "def destroy\n @booking = Booking.find(params[:id])\n @booking.destroy\n\n respond_to do |format|\n format.html { redirect_to bookings_url }\n format.json { head :no_content }\n end\n end",
"title": "... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "04baa93cfe18ffef780b0ab8332f9a32",
"score": "0.0",
"text": "def set_csv_import\n @csv_import = CsvImport.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.60310465",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.60152966",
"text": "d... |
48c12bd7cec602931905b2924b7fd4cf | DELETE /letters/1 DELETE /letters/1.json | [
{
"docid": "6e2b501b2652947ac1f3cc43818f10bb",
"score": "0.7528059",
"text": "def destroy\n @letter.destroy\n respond_to do |format|\n format.html { redirect_to letters_url }\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "46e14a7ccd23f3409079e015a359397f",
"score": "0.75452733",
"text": "def destroy\n @letter.destroy\n respond_to do |format|\n format.html { redirect_to root_path }\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "d151efa13f594ba83afb9f... |
85d6b718bb33997ea84262e8a826084e | Return the date for the given month number | [
{
"docid": "aeaea184df29d5eaa516405d06daa4d2",
"score": "0.8226094",
"text": "def date_for_month(month)\n months[month - 1]\n end",
"title": ""
}
] | [
{
"docid": "0bd6bd7cade30acdd557221706efde32",
"score": "0.797533",
"text": "def jump_to_month(month_number)\n # find difference in months\n if month_number >= self.month\n ZDate.new(year_str + (month_number).to_s2 + \"01\")\n else\n ZDate.new((year + 1).to_s + (month_number... |
f6548d8af5e8e5e750b9c64b5e645acc | Sets the given version string as the compilable version for all known buildable modules in the given directory hierarchy. restores the default version string for all modules if nil. === Parameters | [
{
"docid": "e69012db8ebcd5b6152d38685637843f",
"score": "0.78949565",
"text": "def set_version_for_modules(base_dir_path, version_string = nil)\n restore_original_version = version_string.nil?\n version_string = DEFAULT_WINDOWS_MODULE_VERSION if restore_original_version\n\n # match Window... | [
{
"docid": "64c690b1d43afc6bec0f0a63cf47ca91",
"score": "0.58354485",
"text": "def restore_default_version(base_dir_path)\n set_version_for_modules(base_dir_path, version_string = nil)\n true\n end",
"title": ""
},
{
"docid": "0e264fe6602ef19e37ded0a7e4d0d4b2",
"score": "0.5... |
2a2ca6ba813f9119775e4f895422e402 | standard search via home page or results page | [
{
"docid": "4a3c1db4fbe2523a1ea197f61f8d45e0",
"score": "0.0",
"text": "def search\n\n\t\t@default_subject = \"Bird\"\n\t\t@syllables = \".\"\n\t\t@begins = \".\"\n\t\t@ends = \".\"\n\t\t\n\t\t\n\t\tif params[:subject]\n\n\t\t\t@search_subject = Word.get_subject_record params[:subject]\n\t\t\t\n\t\t\tun... | [
{
"docid": "7f4dcb1aed674f00d0ed578ba5a88b36",
"score": "0.77866185",
"text": "def perform_search\n if self.class == Alchemy::Admin::PagesController && params[:query].blank?\n params[:query] = \"lorem\"\n end\n return if params[:query].blank?\n @search_results = sear... |
3663f9d329a105b8f67412853a928657 | Check if the provided serviceline qualifies as a valid parent without causing and infinite loop | [
{
"docid": "de42d859cd0a351c4853c1f4fa6116d5",
"score": "0.0",
"text": "def validHeirachy(original)\n if self.parent.present? && self.parent.slug != original.slug\n self.parent.validHeirachy(original)\n elsif self.parent.present? && self.parent.slug == original.slug\n false\n else \n ... | [
{
"docid": "6d321aed768ef1eff5ef34079f143896",
"score": "0.6795846",
"text": "def parent?\n !@child_pid.nil?\n end",
"title": ""
},
{
"docid": "bed67af6e0b1803ad23c72905ff3dd59",
"score": "0.6689302",
"text": "def is_immediate_parent?( potential_parent )\n \n potential_pare... |
ffae51ae93486b9f5477f2bb8edebdbd | Deletes a security policy from this domain Deletes the security policy along with all the rules | [
{
"docid": "9642d5cb59bfef2a1060221043fad24b",
"score": "0.699731",
"text": "def delete_security_policy_for_domain(domain_id, security_policy_id, opts = {})\n delete_security_policy_for_domain_with_http_info(domain_id, security_policy_id, opts)\n nil\n end",
"title": ""
}
] | [
{
"docid": "eda6d77add81e32c0852f2f8cfa5799b",
"score": "0.7055457",
"text": "def delete_policy\n request = delete_policy_request\n request.send\n end",
"title": ""
},
{
"docid": "be76a96a936f69c325685921b0389af0",
"score": "0.70012754",
"text": "def delete_securit... |
6825256a1be89658fd419048a8f143e2 | grid traversal methods we check the movements before mutating position so it's not jittery when rendered | [
{
"docid": "24f5df6ce5399374706eb35c372f1765",
"score": "0.0",
"text": "def move_up\n current_y = position[0] - 1\n position[0] = (current_y < 0 ) ? (width-1) : current_y\n end",
"title": ""
}
] | [
{
"docid": "cf58fd1826733dec89cccb8fa8254dce",
"score": "0.6801285",
"text": "def grid_move(new_grid_pos)\n @grid_pos = new_grid_pos\n @ori_x = original_x\n @ori_y = original_y\n self.battle_phase = :move\n end",
"title": ""
},
{
"docid": "916d3565ac69ae696d386780fecd3d5c",
... |
dfd7f1d414867dc780e83fe951df1bfd | Determine the content type of this request as indicated by the ContentType header. | [
{
"docid": "ebf121ff9841a3b6eb7ddbba6c77306b",
"score": "0.8243681",
"text": "def content_type\n header = @env[CONTENT_TYPE_NAME]\n @content_type ||= (header && MediaTypeIdentifier.load(header)).freeze\n end",
"title": ""
}
] | [
{
"docid": "dc5b6b02040e471f8f5c41c86462f1f9",
"score": "0.842568",
"text": "def request_content_type\n request.respond_to?(:media_type) ? request.media_type : request.content_type\n end",
"title": ""
},
{
"docid": "b63e5993ccb04f4478e057495d294794",
"score": "0.83901775",
... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "75948313f8262ddece10124bede011b6",
"score": "0.0",
"text": "def set_super_fan\n @super_fan = SuperFan.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... |
28896847dd9177f2d6b09eec889fe8b3 | compile apex classes toCompile what to compile returns compilation results | [
{
"docid": "75afc539de94e7722bf22ade4a31f096",
"score": "0.8017005",
"text": "def compileClasses(toCompile)\r\n\t\tif @successfulLogin\r\n\t\t\treturn @sfApex.compileClasses(:scripts => toCompile)\r\n\t\tend\r\n\tend",
"title": ""
}
] | [
{
"docid": "58076b9a19ee9fbce77dab50cf3e4b7c",
"score": "0.76522726",
"text": "def compileclass\n \n end",
"title": ""
},
{
"docid": "41ceb3537b0f33c2ebe4159a027779a9",
"score": "0.7230596",
"text": "def compile\n end",
"title": ""
},
{
"docid": "41ceb3537b0f33c2eb... |
020c04739bdfe0ba8e5772da581e1555 | GET /corpora/1 GET /corpora/1.json | [
{
"docid": "1a0f27b84e7b99a5abe00caeb810cfb1",
"score": "0.64728695",
"text": "def show\n @corpus = Corpus.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @corpus }\n end\n end",
"title": ""
}
] | [
{
"docid": "c21f04a17c87d5ddb48983a93514620b",
"score": "0.7620643",
"text": "def index\n @corpora = Corpus.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @corpora }\n end\n end",
"title": ""
},
{
"docid": "278bed541a95bb87060e1... |
000e1324c7738d77aa91c4339e8cbfab | when applying a rootbased patch to a prototype we will have to change directory to that prototype, just for when we apply the patch. and..? | [
{
"docid": "df70c4043ff619c680652c0990dd8e21",
"score": "0.59360754",
"text": "def process_patch_opts_for_directory switch_h, opts, src, dest, site_path\n return unless opts[:subset] == 'root'\n if ! opts[:proto_to_content]\n command_abort(\"we need to test this for root patching for th... | [
{
"docid": "bd8c74545493d6b9ceb601c14f06cdbb",
"score": "0.688814",
"text": "def patches\n # Makefile patch\n DATA\n end",
"title": ""
},
{
"docid": "d743c8aa1aff63227720922a8d0ee277",
"score": "0.67763513",
"text": "def setup\n patch_path\n end",
"title": ""
... |
c3a7af52652cd82a137c8d9d9752f15d | mostra lo stato dell'obiettivo (nascosto, bloccato o sbloccato) | [
{
"docid": "13fcddea942a898610e596c4a0efc4a0",
"score": "0.0",
"text": "def draw_achievement_description(desc)\n desc.each_with_index{|text, i| draw_text(4, line_height * (4 + i), contents_width, line_height, text, 1) }\n desc.size\n end",
"title": ""
}
] | [
{
"docid": "d6201f7f3662405c0b66a7937be20354",
"score": "0.6398106",
"text": "def estatisticas\n\n @obj1 = categoria_percent\n \n @obj = avg_price_categoria\n\n @h = get_grafico(@obj,\"bar\")\n\n @h1 = get_grafico(@obj1,\"pie\")\n end",
"title": ""
},
{
"docid": "... |
34e6ff63307d41ee3bffc73010a62c73 | Set authentication creditials in ~/.google_drive/conf.yaml ~/.google_drive/conf.yaml: | [
{
"docid": "1c14d1b8397b5e1ae6438170bb6f8f56",
"score": "0.55590004",
"text": "def configs\n @configs ||= begin\n fn = File.join(Dir.home, \".google_drive\", \"conf.yaml\")\n configs = File.exists?(fn) ? YAML::load(File.open(fn)) : ENV\n ... | [
{
"docid": "54078d69d0a12062dcdc522b402b08e0",
"score": "0.6095458",
"text": "def configure_google_client\n @google_client = Google::APIClient.new(@config.application_info)\n @google_client.retries = 2\n @drive = @google_client.discovered_api(\"drive\", API_VERSION)\n authorize\n ... |
3bf90bde7bfd7b89ec3e5191082ddc76 | returns a sorted list of candidates by the ballot's stored algorithm option | [
{
"docid": "1092faa4d5d26590758b50f2fd280257",
"score": "0.57773435",
"text": "def winners\n case self.algorithm\n when \"majority\" then majority\n # and so on...\n else\n majority\n end\n end",
"title": ""
}
] | [
{
"docid": "90b5012f0a315d9e8f30507cb5fcb05a",
"score": "0.65482605",
"text": "def criteria\n (option_pairs + extra_option_pairs).sort\n end",
"title": ""
},
{
"docid": "13f7fdc07d2d565e76b3bcf8e7169eb9",
"score": "0.6254119",
"text": "def get_candidate_list\n [@@candidates]\n... |
8e534b096e14d5d86235096a8f659e5c | GET /searches/new GET /searches/new.json | [
{
"docid": "29ea0e67059ede4c25fd96c97b1344d5",
"score": "0.76099944",
"text": "def new\n @search = Search.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @search }\n end\n end",
"title": ""
}
] | [
{
"docid": "2c0c4962838ebbffbf8f7b8cedffff08",
"score": "0.75569516",
"text": "def new\n @search = Search.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json => @search }\n end\n end",
"title": ""
},
{
"docid": "7b689672fb051affca32a26... |
430f02ad0cb8f2337ca8d3c4b4a1db67 | GET /flaws/1 GET /flaws/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "1ff028f3b572cba2d44b5fdb28d5c87b",
"score": "0.68988436",
"text": "def show\n @flaw = Flaw.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @flaw }\n end\n end",
"title": ""
},
{
"docid": "e41530510645b300... |
478b971639d261d9f00e30f61ae1e743 | Used to generate a random string of 10(subject to change) characters and format the plaintext, ciphertext and comment in a way so that the server understands the structure of the string. | [
{
"docid": "931176f7da79ad5c29d90f34f0b125ba",
"score": "0.69841814",
"text": "def rand_string(client)\n str = \"\"\n\n # Generates a random english word of length 4-6 alphabets\n while str.length < 4 or str.length > 6\n str = 1.word\n end\n\n # Asking for c... | [
{
"docid": "8661c39deb3d774e5d5c9c71ce7e128b",
"score": "0.6752723",
"text": "def generate_string\n (0...6).map{(65+rand(26)).chr}.join\n end",
"title": ""
},
{
"docid": "46506b3cd015016c8eed0be278cc20ec",
"score": "0.6677226",
"text": "def random_string\n letters = [['!',... |
96a4be6b069eabe39343585eecd66285 | Method to update the quantity of an item input: Parameters would the list, item and quantity. steps: Find the list, find the item that matches it, and update quantity. output: Return the key with the updated value. | [
{
"docid": "ee396317cc4851865a528a6050b7bdf6",
"score": "0.8052701",
"text": "def update_quantity(list, item, quantity)\n list[item] = quantity\n return list\nend",
"title": ""
}
] | [
{
"docid": "221771ca658316b3a3948c1780d40253",
"score": "0.86224234",
"text": "def update_item_quantity(list, item, quantity)\n# steps: replace the old quantity with the new quantity given in the input\n\tlist[item] = quantity\n# output: hash with updated vlues for given item\n\tlist\nend",
"title":... |
16a941879adec00162f06959f6bbb9cd | GET /boms GET /boms.json | [
{
"docid": "02cfebf346b2a5dbfe084cff852e33a4",
"score": "0.7240905",
"text": "def index\n @service_call = ServiceCall.find(params[:service_call_id])\n @boms = @service_call.boms\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @boms }\n ... | [
{
"docid": "13718f401591c7259c2f76c2aa61002e",
"score": "0.6696254",
"text": "def index\n @tool_boms = ToolBom.accessible_by(current_ability).search(params[:search]).page(params[:page])\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @tool_boms }\n ... |
0aa238356bc8aabdb4e7f2163d003e9a | PATCH/PUT /promotions/1 PATCH/PUT /promotions/1.json | [
{
"docid": "bdec049f94d8dac02c77e01bbeef025d",
"score": "0.53886193",
"text": "def update\n respond_to do |format|\n if @promotion.update(promotion_params)\n format.html { redirect_to @promotion, notice: 'Oferta foi atualizada com sucesso.' }\n format.json { render :show, status: :... | [
{
"docid": "dd4437688d187b36af64fe44f4e4458c",
"score": "0.61319804",
"text": "def update\n @promocion = Promocion.find(params[:id])\n\n respond_to do |format|\n if @promocion.update_attributes(params[:promocion])\n format.html { redirect_to @promocion, notice: 'Promocion was successfu... |
b003d45d31b3894bd0c9162f1de97409 | Sets the countriesOrRegionsOfOrigin property value. The country/region of origin for the given actor or threat associated with this intelligenceProfile. | [
{
"docid": "fec310e0d487988929af11eb23a2f91b",
"score": "0.75085485",
"text": "def countries_or_regions_of_origin=(value)\n @countries_or_regions_of_origin = value\n end",
"title": ""
}
] | [
{
"docid": "74315e55f741a6b04e5ec0224d194cda",
"score": "0.5981905",
"text": "def countries_or_regions_of_origin\n return @countries_or_regions_of_origin\n end",
"title": ""
},
{
"docid": "e818f27767b7bc035369099508d624d3",
"score": "0.58241886",
"text": "de... |
915241b21a60aea6e50d7906c3811df2 | GET /guitars/new GET /guitars/new.json | [
{
"docid": "da0a4edc9d359599357af6b51eb5f2cf",
"score": "0.7062547",
"text": "def new\n @guitar = Guitar.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @guitar }\n end\n end",
"title": ""
}
] | [
{
"docid": "bc22eecd6553d45ab4d71d437ec1c2fb",
"score": "0.74747163",
"text": "def new\n @goat = Goat.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @goat }\n end\n end",
"title": ""
},
{
"docid": "4408e3830f6553b051fde3c3089c68ab... |
a68ed71de50f93ecfa4720c53912aada | GET /profiles/1/details GET /profiles/1/details.json | [
{
"docid": "63894c99acb1bece83e2737f2a09f793",
"score": "0.8176399",
"text": "def details\n @profile = Profile.find(params[:id])\n\n respond_to do |format|\n format.html # details.html.erb\n format.json { render json: @profile }\n end\n end",
"title": ""
}
] | [
{
"docid": "df80b4b54a03a4d7744ec7250bc7cbaf",
"score": "0.7442225",
"text": "def show\n profile = Profile.find(params[:id])\n render status: 200, json: profile\n end",
"title": ""
},
{
"docid": "dc273f093330dd96f39a3662aa9b1834",
"score": "0.73369",
"text": "def show\n @pr... |
d0c2c58d38a881cd2d589945ca029daf | GET /digitals/1 GET /digitals/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "e58235c55bfcf1c72b0c8938167af97a",
"score": "0.63353705",
"text": "def index\n render json: Dig.all\n end",
"title": ""
},
{
"docid": "09ef210237a107e7697e34f996516626",
"score": "0.62062985",
"text": "def show\n @historial_oct = HistorialOct.find(params[:id])\n\n ... |
b8219b083fa64160304bba15a41ccc13 | TODO: add real connection check | [
{
"docid": "35a500006a116d4a9614049ecb0c0e14",
"score": "0.0",
"text": "def still_connected?\n true\n end",
"title": ""
}
] | [
{
"docid": "6301b48e459f10c66e62f7a8799cef78",
"score": "0.7415868",
"text": "def connection; end",
"title": ""
},
{
"docid": "6301b48e459f10c66e62f7a8799cef78",
"score": "0.7415868",
"text": "def connection; end",
"title": ""
},
{
"docid": "6301b48e459f10c66e62f7a8799cef... |
af630984682f1a0b5a68e6092af0d102 | Update properties of this object | [
{
"docid": "dce9b59fe29d2b85b24ede9dd58621f9",
"score": "0.0",
"text": "def update!(**args)\n @gcs_destination = args[:gcs_destination] if args.key?(:gcs_destination)\n end",
"title": ""
}
] | [
{
"docid": "150fa2bdc1fc43d28ac45e2278a1f797",
"score": "0.7012263",
"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... |
eba105131bdfa6d7d4b1f6b641f696b6 | public method for clicking specific items based on locale method requires the following: | [
{
"docid": "a551c368655a0c0655aad5b23a95efe2",
"score": "0.6413149",
"text": "def localized_click(partner, loc_click)\r\n Log.debug \"#{LANG[partner.partner_info.parent][partner.partner_info.type][loc_click]}\"\r\n navigate_to_link(\"#{LANG[partner.partner_info.parent][partner.partner_info.typ... | [
{
"docid": "dd47ebb39f8bc751ab47ed6c926f9013",
"score": "0.6774807",
"text": "def localized_click(partner, loc_click)\n navigate_to_link(\"#{LANG[partner.company_info.country][partner.partner_info.type][loc_click]}\")\t;end",
"title": ""
},
{
"docid": "9f61189774a70a90e64172c5ab83e519",... |
3f52973818698070d105a2c20fdb77a5 | Serializes information the current object | [
{
"docid": "a5dd51fb7ab945e464cf9f676f852d9b",
"score": "0.6616259",
"text": "def serialize(writer)\n raise StandardError, 'writer cannot be null' if writer.nil?\n super\n writer.write_object_value(\"apiConnectorConfiguration\", @api_connector_configuration)\... | [
{
"docid": "0795eac2a3b746fc7fea6373714e1986",
"score": "0.79519033",
"text": "def serialize\n end",
"title": ""
},
{
"docid": "762bca0e2db3ff19d91cc4521bb1e1d9",
"score": "0.76465106",
"text": "def serialize(object) end",
"title": ""
},
{
"docid": "a126e681346630c4e... |
32795f9f7a4618e8e8cca50e37d20f5f | Install a gem from source builds and packages it first then installs. Examples: install_gem_from_source(source_dir, :install_dir => ...) install_gem_from_source(source_dir, gem_name) install_gem_from_source(source_dir, :skip => [...]) | [
{
"docid": "9b6990340201912d85d576391a559023",
"score": "0.8422682",
"text": "def install_gem_from_source(source_dir, *args)\n installed_gems = []\n opts = args.last.is_a?(Hash) ? args.pop : {}\n Dir.chdir(source_dir) do \n gem_name = args[0] || File.basename(source_dir)\n ge... | [
{
"docid": "ebed54dd163b345ee450c63be8a39119",
"score": "0.741251",
"text": "def install_gem_from_source(repo_url, git_ref, gem_name = nil)\n uri = URI.parse(repo_url)\n repo_basename = ::File.basename(uri.path)\n repo_name = repo_basename.match(/(?<name>.*)\\.git/)[:name]\n gem_name... |
aafd8cdf46b3a93407377cea7c325ed2 | Override in subclasses as appropriate | [
{
"docid": "83c0523a52323dc0191d7ef0a696841f",
"score": "0.0",
"text": "def priority\n Settings.delayed_job.priority.base_job\n end",
"title": ""
}
] | [
{
"docid": "2290804b238fc95bfd6b38f87c6d2895",
"score": "0.8288387",
"text": "def override; end",
"title": ""
},
{
"docid": "e6431ff47476c9014fb64198d5853e1e",
"score": "0.76076335",
"text": "def overrides; end",
"title": ""
},
{
"docid": "e6431ff47476c9014fb64198d5853e1e... |
499125f9e512902eb67d6480a117322c | Creates an outbound phone call. | [
{
"docid": "8ff92dcbf23dd3310f1052af0878735f",
"score": "0.5351692",
"text": "def create_call(account_id,\r\n body)\r\n # Prepare query url.\r\n _query_builder = config.get_base_uri(Server::VOICEDEFAULT)\r\n _query_builder << '/api/v2/accounts/{accountId}/calls'\r\n ... | [
{
"docid": "fb7e3426bb9abfb649a8d18e80c6a00f",
"score": "0.6778285",
"text": "def finalize_call(outbound: nil)\n account.calls.where(network_id: params[:CallSid]).first_or_create!(\n to: stripped(:To),\n from: stripped(:From),\n outbound: outbound,\n duration: params[:CallDuration... |
7cf3621a65bab1734138d2c20feb07e8 | we want this test to run first on an empty table | [
{
"docid": "4feed4dcd4903f48e433b84ee7d46292",
"score": "0.0",
"text": "def test_use_case_foos\n Foo.undo_all = true\n \n foo1_id = Foo.create(:name => 'foo').id\n Foo.find(foo1_id).update_attributes(:name => 'MOO')\n foo_change = Foo.undo_manager.last_operation # remeber this point\n ... | [
{
"docid": "443a534df312fcb18936a37701e5ae18",
"score": "0.73848635",
"text": "def test_empty_table\n connection = Connection.new($login_params)\n function = connection.get_function(\"STFC_DEEP_TABLE\")\n fc = function.get_function_call\n it = fc[:IMPORT_TAB]\n it.each {}\n connection.... |
ca4cea5b5f039518d080a494ab02469e | Check position value within table length and width also check position values are not less than zero | [
{
"docid": "41734bf283f631832546d48b180ee945",
"score": "0.6536424",
"text": "def is_valid_position?(position)\n position.x < length && position.y < width && position.x >= 0 && position.y >= 0\n end",
"title": ""
}
] | [
{
"docid": "213048d66d3e5e84a88031b872fb003b",
"score": "0.78427505",
"text": "def valid_position_x?(position)\n position >= 0 && position < @table_width\n end",
"title": ""
},
{
"docid": "fc3d87aff1e99e436a02f46014a5b414",
"score": "0.7185546",
"text": "def check_position\... |
8e31e1fdda2f62b254d3caf1e217747b | Calls Attachersave. Called before model save. | [
{
"docid": "01e4d8265e7250b1ca0750ec9bddd4d3",
"score": "0.5577409",
"text": "def sequel_before_save\n save\n end",
"title": ""
}
] | [
{
"docid": "740882d69d372fab9871c3a10b34c5de",
"score": "0.6663147",
"text": "def saving\n name = @name\n @klass.send(:before_save) do\n logger.info \"[attached] saving #{name}\"\n send(name).save\n end\n end",
"title": ""
},
{
"docid": "1f8410075c7713ba9e7b0b... |
1f6d5a57282d2f4815a2c330d1ec52f5 | The fragment component for this URI. | [
{
"docid": "ac2ce867945034df6d080d71deec55f1",
"score": "0.6469275",
"text": "def fragment; end",
"title": ""
}
] | [
{
"docid": "816ba268c90b26a165080d73a58ba3d6",
"score": "0.79302406",
"text": "def fragment\n return @fragment\n end",
"title": ""
},
{
"docid": "816ba268c90b26a165080d73a58ba3d6",
"score": "0.79302406",
"text": "def fragment\n return @fragment\n end",
"title": ""... |
c4f1eac42fa769de6f4f7e2d591128fc | TODO: for local ActiveRecord::Base.configurations = YAML.load_file('database.yml') ActiveRecord::Base.establish_connection(:development) ActiveRecord::Base.establish_connection(ENV['DATABASE_URL']) class Entries < ActiveRecord::Base; end | [
{
"docid": "e0052ede72cfdf34c5882db0cc59873e",
"score": "0.0",
"text": "def fetch(published, url, needpush)\n\n entry = HTMLParser.fetch(url)\n\n if entry != nil then\n entry[:published] = published\n entry[:uploaded_thumbnail_url] = Array.new()\n entry[:uploaded_raw_image_url] = Array.new()\... | [
{
"docid": "e8fbbca450be7c2e7e0d1432dccf75a6",
"score": "0.75656104",
"text": "def establish_connection \n ActiveRecord::Base.establish_connection(YAML.load_file(\"#{RAILS_ROOT}/config/database.yml\")[ENV['RAILS_ENV']])\nend",
"title": ""
},
{
"docid": "f735ed2d5d7862252957c7db770dd1b1",
... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "e69f9a2721d88c5dc80be6c14660f86c",
"score": "0.0",
"text": "def set_document\n @document = Document.find(params[:document_id])\n unless @document.collection.available?(@current_user)\n respond_to do |format|\n format.html { redirect_to collections_path, error: \"Can... | [
{
"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... |
f1f03b4c1982ac9c3592306a1eeaa3d6 | Constants are inherited by nested classes | [
{
"docid": "9086fa5afac9a146ba3864a21a042653",
"score": "0.7134102",
"text": "def test_nested_classes_inherit_constants_from_enclosing_classes\n assert_equal 4, Animal::NestedAnimal.new.legs_in_nested_animal\n end",
"title": ""
}
] | [
{
"docid": "14d35fdc4f2ea305134e9017e80ac6b4",
"score": "0.8137294",
"text": "def inherited_constants; end",
"title": ""
},
{
"docid": "e96510949270c3ff9ebc501b7850800a",
"score": "0.7128951",
"text": "def test_subclasses_inherit_constants_from_parent_classes\n assert_equal 4, Rep... |
d3eea7a56ae672e2e0644cec20937b4b | Return the number of hops that were inferred from symmetry assumptions | [
{
"docid": "8d14b5ac4636668cfdf90adebcdb500c",
"score": "0.83846796",
"text": "def num_sym_assumptions()\n count = 0\n for hop in @hops\n count += 1 if hop.type == :sym or hop.type == \"sym\"\n end\n count\n end",
"title": ""
}
] | [
{
"docid": "d06b78fcc67eb00410cc186a4b88241f",
"score": "0.6636597",
"text": "def count_ops()\n 0\n end",
"title": ""
},
{
"docid": "b822533c471ce7d250ab2b293643ce16",
"score": "0.66081905",
"text": "def symbolic_count(count); end",
"title": ""
},
{
"docid": "6d... |
4b123e9691287aa5847120dad38e22f8 | See: SQLite has an additional restriction on the ALTER TABLE statement | [
{
"docid": "1695fa6c947916c11692e73cad8503a6",
"score": "0.6040731",
"text": "def valid_alter_table_options( type, options)\n type.to_sym != :primary_key\n end",
"title": ""
}
] | [
{
"docid": "409f401667b2b3e16dc4104e665788e5",
"score": "0.68100786",
"text": "def alter_table_sql(table, op)\n case op[:op]\n when :add_column\n if (pk = op.delete(:primary_key)) || (ref = op.delete(:table))\n if pk\n op[:null] = false\n ... |
5e621fbdb61b942e019094f9f58b6dd0 | GET /tankmen/1 GET /tankmen/1.xml | [
{
"docid": "89ddb78e520589a8c50d0cc27501db62",
"score": "0.0",
"text": "def show\n @tankman = Tankman.find(params[:id])\n @history = History.where(:tankman_id => @tankman).paginate(:per_page => 15, :page => params[:page])\n\n\n\n end",
"title": ""
}
] | [
{
"docid": "e9f5aee37cfb803b5383d65841ca38dd",
"score": "0.62914646",
"text": "def apiindex\n #TODO authentication\n tree = Item.tree\n xml = XmlSimple.xml_out({'items'=>tree}, \n \"RootName\"=>'itemtree', \n 'NoAttr'=>true, \n ... |
ae313af791e4f836221249c442ef37ab | Custom equality operator for this class. | [
{
"docid": "3dff2895fd2de31cc1e6c10a0eabbcee",
"score": "0.0",
"text": "def ==(other)\n @config_key == other.config_key &&\n @config_section == other.config_section &&\n @prompt_text == other.prompt_text\n end",
"title": ""
}
] | [
{
"docid": "bfa0a40342998386d3cf689f199fa6d3",
"score": "0.7778943",
"text": "def ==(other); end",
"title": ""
},
{
"docid": "bfa0a40342998386d3cf689f199fa6d3",
"score": "0.7778943",
"text": "def ==(other); end",
"title": ""
},
{
"docid": "bfa0a40342998386d3cf689f199fa6d3... |
76016e02d182dee4378accd5c31d1abe | Generates a URL based on the given name and passed options. Used with named routes and resources: url(:users) => "/users" url(:admin_permissons) => "/admin/permissions" | [
{
"docid": "1af623bca90adba79c6380ba15169c19",
"score": "0.6763325",
"text": "def url(name, *args)\n unless Symbol === name\n args.unshift(name)\n name = :default\n end\n \n unless route = Halcyon::Application::Router.named_routes[name]\n raise ArgumentError.new(... | [
{
"docid": "f33b347770f88d58d79ff4be73792998",
"score": "0.70750386",
"text": "def url(*names)\n params = names.extract_options! # parameters is hash at end\n name = names.join(\"_\").to_sym # route name is concatenated with underscores\n if params.is_a?(Hash)\n params[... |
fc73509090b4adb8b389035ba2fc9d99 | Makes a POST call | [
{
"docid": "97c64e8c84d29c71c3433ccf33de4e57",
"score": "0.0",
"text": "def post(api_version, resource, payload, query_parameters = nil,\n headers = nil)\n make_rest_call(:post, uri_builder(api_version, resource,\n query_parameters), payload,... | [
{
"docid": "24f67a01fbe3bcea4a2a538b2446ac56",
"score": "0.80418414",
"text": "def post(data = {})\n call data, method: :post\n end",
"title": ""
},
{
"docid": "818a668461eacd121f2fc6d20b8482b0",
"score": "0.7997587",
"text": "def post endpoint, data\n do_request :post, ... |
4bf680cf28b1ef29a2019d135556b140 | PUT /id_cards/1 PUT /id_cards/1.xml | [
{
"docid": "5d0d1cfea9478340e4d23adcbca29d81",
"score": "0.689513",
"text": "def update\n @id_card = IdCard.find(params[:id])\n\n respond_to do |format|\n if @id_card.update_attributes(params[:id_card])\n format.html { redirect_to(@id_card, :notice => 'Id card was successfully updated.... | [
{
"docid": "6c684a9c1a01de9d30d2c281c848ca0a",
"score": "0.70389926",
"text": "def update\n @card = @stage.cards.find(params[:id])\n\n respond_to do |format|\n if @card.update_attributes(params[:card])\n format.html { redirect_to(@project, :notice => 'Card was successfully updated.') }... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "cb6f5a0f7d223a87bac1047fd8080e9a",
"score": "0.0",
"text": "def event_params\n params.require(:event).permit(:event_name, :event_start_date, :event_end_date, :expected_pax, :last_pax, :post_code, :city, :country, :comment, :cuptwenty, :cuptwentyfive, :cupforty, :cupfifty, :cuplitre, :cu... | [
{
"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... |
9cfe976a09e4d663eac065ff8d893e92 | POST /cats POST /cats.xml | [
{
"docid": "b5a10d3518f815771d806dffe073b30d",
"score": "0.6217732",
"text": "def create\n @cat = Cat.new(params[:cat])\n\n respond_to do |format|\n if @cat.save\n format.html { redirect_to(@cat, :notice => 'Cat was successfully created.') }\n format.xml { render :xml => @cat, ... | [
{
"docid": "fcacca3ec6e1e26fc8bb189b55a4e306",
"score": "0.600589",
"text": "def postCategoryMappings( category_id, type, id, name)\n params = Hash.new\n params['category_id'] = category_id\n params['type'] = type\n params['id'] = id\n params['name'] = name\n return doCurl(\"post\",\"/... |
55ba27cb37d5fd61c8d7754dde5adacc | Get SubjectAltName field of a certificate | [
{
"docid": "24ca8a10946499544d5f99199804f7e4",
"score": "0.64030737",
"text": "def get_san_hash(cert)\n subject_alt_name = cert.extensions.find { |e| e.oid == \"subjectAltName\" }\n return { error: 1 } unless subject_alt_name\n\n asn_san = OpenSSL::ASN1.decode(subject_alt_name)\n asn_san_seq... | [
{
"docid": "8e20f19c994336cfac0c033b5ad5cd6d",
"score": "0.8566005",
"text": "def find_subjectAltName\n find_attr(OpenSSL::ASN1::ObjectId.new(\"subjectAltName\"))\n end",
"title": ""
},
{
"docid": "8e20f19c994336cfac0c033b5ad5cd6d",
"score": "0.8566005",
"text": "def find_subject... |
6bf59b3d2caac307860b8d4f13a2cddf | Provide a user friendly representation source://twilioruby//lib/twilioruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb113 | [
{
"docid": "84c2aa104b8a70acbe3f11eca76559b3",
"score": "0.0",
"text": "def to_s; end",
"title": ""
}
] | [
{
"docid": "8b278d7b35a8a23e42139997b520811f",
"score": "0.65141314",
"text": "def raw_list_addons_str\n \"addons\"\n end",
"title": ""
},
{
"docid": "5fdb2d51f9ab53c70d57d2d9e41366a6",
"score": "0.6223198",
"text": "def name\n 'Extended API Extension'\n end",
"title"... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "c811f0b4f5423055b41b8508f7486b01",
"score": "0.0",
"text": "def shift_params\n params.require(:shift).permit(:assignment_id, :date, :start_time, :end_time, :notes)\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... |
ae6396a56dd5a56ff69274da5c56e2f2 | before_action :configure_sign_in_params, only: [:create] GET /resource/sign_in def new super end POST /resource/sign_in | [
{
"docid": "4e6a8de261e60d4cbf4a1e64dd88352d",
"score": "0.0",
"text": "def create\n username = \"Endura\\\\#{params[:user][:email]}\"\n ldap = Net::LDAP.new \n ldap.host = \"192.168.1.37\"\n ldap.port = 389\n ldap.base = \"CN=Administrator,CN=Users,DC=endura,DC=enduraproducts,DC=com\"\n ... | [
{
"docid": "3d4398f7a251ac98ea7349e34fc0d33d",
"score": "0.731359",
"text": "def new\n self.resource = resource_class.new(sign_in_params)\n store_location_for(resource, params[:redirect_to])\n super\n end",
"title": ""
},
{
"docid": "5ab60b21a090c1ee367152562ab4679a",
"scor... |
a6216c8735e143a6fc455c8275e85897 | Gets executed in child process to clean up file handles and pipes that the master holds. | [
{
"docid": "a815c11722088d301e6d083a75d3b94d",
"score": "0.7483118",
"text": "def cleanup\n # Children dont need the parents signal handler\n unregister_signals\n \n # The child doesn't need the control pipe for now.\n control_pipe.each { |io| io.close }\n end",
"title": ""
}
] | [
{
"docid": "fbe72b6b4616e7b3830f26483ee5061c",
"score": "0.6883729",
"text": "def clean_parent_file_descriptors\n ObjectSpace.each_object(File) {|f| f.close unless f.closed? rescue nil}\n return\n\n # Don't clean $stdin, $stdout, $stderr (0-2) or our own pipes\n keep = [ @chi... |
8330910e3a886ec9685d5aeb359664a1 | PUT /admin/news/1 PUT /admin/news/1.xml | [
{
"docid": "46d36975e087f64d9be46001adf10410",
"score": "0.67729366",
"text": "def update\n respond_to do |format|\n if @news.update(news_params)\n format.html { redirect_to([:admin, @news], notice: 'News was successfully updated.') }\n format.xml { head :ok }\n website.add... | [
{
"docid": "0a87d45871c7a2d224ddb55f3536c546",
"score": "0.6790157",
"text": "def update\n respond_to do |format|\n if @news.update_attributes(news_params)\n format.html { redirect_to([:admin, @news], notice: 'News was successfully updated.') }\n format.xml { head :ok }\n w... |
9582e0753cc516effeadb579c171a54e | handle the new filter input and return the new conditions for the db query | [
{
"docid": "589f46ac86693f76b4855686ed5ef036",
"score": "0.0",
"text": "def build_filter(action, filter_num, column, value)\n if action == :add\n if not session[:num_filters].nil?\n session[:num_filters] += 1\n session[:filter_index] += 1\n else\n ... | [
{
"docid": "eecbe36b49119bcefa498ca8a2eb6d00",
"score": "0.72206265",
"text": "def build_filter_conditions\n return nil\n end",
"title": ""
},
{
"docid": "b76c9174831b7a8906186b9266969f61",
"score": "0.7110785",
"text": "def filter_conditions\n if params[:fil... |
68f16e1f454b35938b7a89ffa12b424f | Gets the votd from the Good News Publishers, Crossway Bibles, RSS feed | [
{
"docid": "c3dffb27a399588f581011ceb53e0e30",
"score": "0.7526341",
"text": "def get_votd\n parsed_feed = Nokogiri::XML(HTTParty.get(URI).body)\n cleaned_copyright = clean_copyright(parsed_feed.xpath(\"//copyright\").text)\n\n @reference = parsed_feed.xpath(\"//title\")[1].text\n ... | [
{
"docid": "e9ed5c9656f975ae348b255578c0eb71",
"score": "0.71098346",
"text": "def votd\n require 'rss'\n\n votd = RSS::Parser.parse('https://www.biblegateway.com/usage/votd/rss/votd.rdf?31', false)\n\n render json: votd\n end",
"title": ""
},
{
"docid": "0c19d3003cd4c05fd701552625... |
d3c9db33147ecc7825f43b104413741d | collect pub counts for this org and any subordinates Don't do this on "United States" ! | [
{
"docid": "3ba6f6c25edab770846d269271868e83",
"score": "0.68047166",
"text": "def pub_count\n self['pub_count'] = count\n predecessors.each do |pred|\n p = begin\n Authority.find_by(name: pred)\n rescue StandardError\n nil\n end\n ... | [
{
"docid": "ac6ab8f77e779509429dbca80aaf915f",
"score": "0.5915592",
"text": "def projects_organizations(site)\n sql=\"select subq.id,subq.name,count(subq.id) from\n (select distinct o.id,o.name,p.id\n from projects_sites as ps\n inner join projects as p on ps.project_id=p.i... |
731dfda0a03b9c3b32d570cb92f3d9ae | Get Operational Status Summary of All Logical Ports in the System Returns operational status of all logical ports. The query parameter \"source&x3D;realtime\" is not supported. | [
{
"docid": "160397cde872b80bdd543c42cc1e178c",
"score": "0.60602075",
"text": "def get_logical_port_status_summary_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: LogicalSwitchingApi.get_logical_port_status_summary ...\"\n end... | [
{
"docid": "3e154e6561812191abdaeae2ebd4ed2b",
"score": "0.68370277",
"text": "def get_logical_port_status_summary(opts = {})\n data, _status_code, _headers = get_logical_port_status_summary_with_http_info(opts)\n return data\n end",
"title": ""
},
{
"docid": "0e0b7d69fba4999f6d... |
066675d4dedb4f6f6bebce652b9d552f | Execute the Choreo using the specified InputSet as parameters, wait for the Choreo to complete and return a ResultSet containing the execution results. | [
{
"docid": "0a08af00f6835bfd926a8d41fc9d8c41",
"score": "0.0",
"text": "def execute(input_set = nil)\n resp = super(input_set)\n results = RetrieveChargeResultSet.new(resp)\n return results\n end",
"title": ""
}
] | [
{
"docid": "c4ca32683e8ce75eb6a187d63df8fa77",
"score": "0.76639634",
"text": "def execute(input_set = nil)\n resp = super(input_set)\n results = DoneResultSet.new(resp)\n return results\n end",
"title": ""
},
{
"docid": "6f7a7d9be674ad4cf17d6743eb1f7836",
"scor... |
9d309f2b9d6fd3e7f997ea062e14aebd | This is not needed. It was implemented as a validator to see that images are read correctly | [
{
"docid": "e1b82bd4eca694ba4d4885faa830e846",
"score": "0.0",
"text": "def convert_to_images(arr,rows,cols)\n canvas = ChunkyPNG::Canvas.new(28, 28, ChunkyPNG::Color::TRANSPARENT)\n canvas.grayscale!\n \n for i in 0..arr.length-1 do\n for j in 0..rows-1 do\n for k in 0..co... | [
{
"docid": "df508c211f1f978a618d0605c3cdc398",
"score": "0.7470752",
"text": "def kyc_images_validation\n return unless document_uploaded?\n %w[selfie_picture govt_id_picture id_picture].each do |file|\n file = send(file)\n return errors[:base] << I18n.t('wrong_img_format') unless ( file... |
ff3047b1dea8aee6c9e33407f5f4ed9f | Returns the root of the repository (not the .hg/.git root) | [
{
"docid": "62b98cfaf4f591a88bd1943206d3a349",
"score": "0.6409803",
"text": "def root\n raise NotImplementedError.new(\"root() must be implemented by subclasses of AbstractLocalRepository.\")\n end",
"title": ""
}
] | [
{
"docid": "f6a0c0d73f242a2614f3e30630b948b2",
"score": "0.79107624",
"text": "def root\n Pathname.new `git rev-parse --show-toplevel`.chomp\n end",
"title": ""
},
{
"docid": "c64abbcd6fc1c0b6b9226ba16ab5e114",
"score": "0.7682522",
"text": "def root_path\n @root_path ||... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "232b9c93a52d01892839cfefccb60624",
"score": "0.0",
"text": "def bmc_params\n params.require(:bmc).permit(:problema, :propuesta, :cliente, :proyect_id)\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... |
beee15ec28e810b6b1f791f1988745d1 | Converts email to all lowercase. | [
{
"docid": "73026d76108b41c5844d0879a1d1896c",
"score": "0.80721945",
"text": "def downcase_email\n email.downcase\n end",
"title": ""
}
] | [
{
"docid": "434a53dadeb1628ebc04d7cf7c8251af",
"score": "0.83801347",
"text": "def downcase_email\n\t email.downcase!\n\t end",
"title": ""
},
{
"docid": "61c6f9455ec34c2acd15663a017f23dc",
"score": "0.83395344",
"text": "def downcase_email\n email.downcase!\n ... |
82a37f86ab8d284d2570dc7c63cb4f40 | Change the url params, similar to redirecting to a new url | [
{
"docid": "6a05cec8a70e8eb78196447f0add4443",
"score": "0.0",
"text": "def go(url)\n self.url.parse(url)\n end",
"title": ""
}
] | [
{
"docid": "e668b2d5c7ab08a5c7cff3f403e71b0f",
"score": "0.7123394",
"text": "def reload params = nil\n redirect request.path, params || request.GET\n end",
"title": ""
},
{
"docid": "5382b46c834bda9553cbdd6b8848b07d",
"score": "0.69155073",
"text": "def adjust_for_redirect\n ... |
be607b46a1ea34ca8af06bff2ece5c6a | Returns the name of the column. | [
{
"docid": "a8fc3b8f531fc4809c6ce786ed499fa7",
"score": "0.0",
"text": "def name\n return @args[:data][:Field]\n end",
"title": ""
}
] | [
{
"docid": "8d08173b61cff9f3bc990b5305bbe4c3",
"score": "0.9024783",
"text": "def name\n column.name\n end",
"title": ""
},
{
"docid": "6d42db251277227c38fce2cc3b738a20",
"score": "0.900952",
"text": "def name\n column.name\n end",
"title": ""
},
{
"do... |
b602edf2da8c0a15c60f32675377c187 | Pulpotomy antipolyneuritic glossolysis ignominiousness fingerhook tuition Charterist torculus noncirculation kasher preacuteness uniformless Boxfish lithographic contrivement thole taxpaid cognoscible Superestablish officialism underneath vesturer overvaliant pettifogulize | [
{
"docid": "d3f33dca8d4f31260981b09013ec6f5d",
"score": "0.0",
"text": "def embryonary(batterfang, gyrovagues_nassellarian, pronounal_outlier)\n end",
"title": ""
}
] | [
{
"docid": "4b4c31d84039944c5df3f5b1cc980d79",
"score": "0.67786133",
"text": "def prodigus(faussebrayed_ratoon, laughably_enhydris)\n end",
"title": ""
},
{
"docid": "bd77180c68877091f38f06c7eb1e564d",
"score": "0.6624687",
"text": "def earnestness_cephaloclasia_preposterous()\n ... |
4e1ee086109f73a1218172bd85c3c691 | Because FormBuilder::select only updates ids and not object references, we need this before_validation callback to sync these two in order to ensure that we pass validation. | [
{
"docid": "47e5440643080166ced3b7b94e76d702",
"score": "0.0",
"text": "def fix_up_references\n if self.sub_task_type.nil? and !self.sub_task_type_id.nil?\n self.sub_task_type = SubTaskType.find(self.sub_task_type_id)\n end\n if self.task.nil? and !self.task_id.nil?\n self.task = Task... | [
{
"docid": "b4ac939221b9c2e5116401803b57ed1a",
"score": "0.6233045",
"text": "def validate \n#\tfirst check whether combo fields have been selected\n\t is_valid = true\n\t if is_valid\n\t\t is_valid = ModelHelper::Validations.validate_combos([{:status_code => self.status_code}],self) \n\tend\n\t#now che... |
6ab75db7dfb51a0678057fa6f6c36843 | Fetch info for a checkin | [
{
"docid": "c5e377aac3449e4c3c377a52e3141936",
"score": "0.830217",
"text": "def checkin_info(id)\n connection.get(\"/checkins/#{id}\").body\n end",
"title": ""
}
] | [
{
"docid": "869e377bbe08c60df1b3b636bda1148b",
"score": "0.7075307",
"text": "def checkins(checkin_id)\n if checkin_id\n url = '/checkins/' + checkin_id\n end\n response = get(url)\n response.checkin\n end",
"title": ""
},
{
"docid": "259f81218af5f0d3d6ce3af3615... |
93fd85e77adcb28521a2efb66c7e68b8 | returns that student's knowledge array. | [
{
"docid": "3854151beb61f140ed0a064d5afb7e3a",
"score": "0.7566128",
"text": "def knowledge\n @knowledge\n end",
"title": ""
}
] | [
{
"docid": "caa0f3038d0b0bfdb8e007454c700830",
"score": "0.7500521",
"text": "def knowledge\n @knowledge\n end",
"title": ""
},
{
"docid": "caa0f3038d0b0bfdb8e007454c700830",
"score": "0.7500521",
"text": "def knowledge\n @knowledge\n end",
"title": ""
},
{
"docid... |
c84f53ca5f6416534a7fd2b4be99bb68 | Prompts the user for text input. | [
{
"docid": "f03ce6676694e004772a1d9ba358c3c5",
"score": "0.0",
"text": "def get_text(caption, prompt, options = {})\n Qt::InputDialog.getText(options[:parent], caption, prompt,\n options[:mode] || Qt::LineEdit::Normal,\n options[:text] || '')\n end",
"title": ""
}
] | [
{
"docid": "eeffc2efad47105124e527e28bad03eb",
"score": "0.7889738",
"text": "def prompt(text)\n @output += %(#{text}\\n)\n print text\n STDIN.gets\n end",
"title": ""
},
{
"docid": "9845c62e49837c6beba6f19403e33386",
"score": "0.7507681",
"text": "def ask_input(tex... |
e16b167238f1bc140c266d5c96ff43bd | Parses and returns the time at which the request was made | [
{
"docid": "41990137a961e3db54ea6fa8aff48f3a",
"score": "0.6510959",
"text": "def parse_time\n time_str = @request[FTIME].sub(REGEX_TIME_FIX) { \"#{$1} #{$2}\" }\n Time.parse(time_str) rescue nil\n end",
"title": ""
}
] | [
{
"docid": "ea454c187d76b5a1e323f84874801711",
"score": "0.7224476",
"text": "def get_request_timestamp\n\t\treturn @transport.get_path(\"meta\",\"datetime\")\n\tend",
"title": ""
},
{
"docid": "bb208281ad90b1c90bf2c87e229035a0",
"score": "0.70193946",
"text": "def received_at\n ... |
f6e8c17dfc6e09e0bf5fd95829df53aa | Returns the path to a gemspec file located in the project location, if it exists. Otherwise returns +nil+. | [
{
"docid": "1d118b50eb0aeef27c71668b7c73c32f",
"score": "0.7115731",
"text": "def gemspec_file_local\n @_gemspec_file_local ||= Dir[File.join(location, '*.gemspec')].first\n end",
"title": ""
}
] | [
{
"docid": "339788a1ce2d8dce68b3537caf522fcf",
"score": "0.7774781",
"text": "def gemspec_path\n Pathname.glob('*.gemspec').first\n end",
"title": ""
},
{
"docid": "194e94f64ddf40f169cd201d4c901e83",
"score": "0.76483995",
"text": "def gemspec_file\n gemspec_file_system ||... |
15fde4b364da21ed9ee7943dc0f3e465 | All we're doing really is adding a display function to a VerletParticle | [
{
"docid": "e98022607c7f4afc29e637cf686722d4",
"score": "0.5482481",
"text": "def display\n fill(175)\n stroke(0)\n ellipse(x, y, 16, 16)\n end",
"title": ""
}
] | [
{
"docid": "397cf82cec2e7d5c79c4b2af7a79db76",
"score": "0.69397914",
"text": "def render()\n\n\t\ti=0\n\t\tfor p in particles\n\t\t\tx = ( p.pos.x - @x0) * @scale\n\t\t\ty = ( p.pos.y - @y0) * @scale\n\t\t\trenderPoint( p.name, x, y, p.mass/3000.0, 1, 1)\n\t\t\ti=i+1\n\t\tend\n\tend",
"title": ""
... |
55fd1f4510301ae4846bd4ed8fb0bdf0 | tester for next_consonant p next_consonant("d") incorporate all three methods into one method | [
{
"docid": "8fdadc152d85a31baac7c98170c6daa9",
"score": "0.0",
"text": "def alias_name(name)\n\t# run swap name to interchange first and last names and then run .chars\n\t\t# to turn characters into an array\n\tswapName = name_swap(name).chars\n\t# set variables for vowels and consonants and run .chars ... | [
{
"docid": "ef5e502654d89867d840fe890ab4109b",
"score": "0.7367435",
"text": "def next_consonant(input_consonant)\n if input_consonant.size > 1 then \n puts \"Warning (in next_consonant): the input should be a single letter. \\n\"\n end\n \n if is_consonant(input_consonant) == false then \n pu... |
c5dc450ce6b121ac2c4d7f2e50991599 | step over in X, lines along Y (vertical) | [
{
"docid": "5d683c93ea914740c0300b7c36821fdb",
"score": "0.0",
"text": "def get_zigzag_flood_x(aface)\r\n result = []\r\n#@debug = true \r\n # create a 2D array to hold the rasterized shape\r\n # raster is on stepover boundaries and center of each square is where the zigzags will sta... | [
{
"docid": "c6464514ec45767f740a1a1a09c0024f",
"score": "0.6923412",
"text": "def line(x0, y0, x1, y1)\n # clean params\n x0, y0, x1, y1 = x0.to_i, y0.to_i, x1.to_i, y1.to_i\n y0, y1, x0, x1 = y1, y0, x1, x0 if y0>y1\n sx = (dx = x1-x0) < 0 ? -1 : 1 ; dx *= sx ; dy = y1-y0\n\n # special c... |
9175e11b31c0f0367206f39fef3a71ec | by Ira Greenberg. 3D translucent colored grid uses nested pushMatrix() and popMatrix() functions. see topics preformance for enhanced version | [
{
"docid": "55a90d6c907905231a71a35cb40d866e",
"score": "0.4576139",
"text": "def setup\n size 640, 360, P3D\n no_stroke \n @box_size = 40\n @margin = @box_size * 2\n @depth = 400\nend",
"title": ""
}
] | [
{
"docid": "547502a08ced26b5e12e391e44d943dc",
"score": "0.62634945",
"text": "def grid3d(*)\n super\n end",
"title": ""
},
{
"docid": "34201e24a9bc135aaedf756319495302",
"score": "0.6007286",
"text": "def p11\n\tgrid = Matrix[\n\t\t[8,\t2, 22,97,38,15,0, 40,0, 75,4, 5, 7, 78... |
b2c36e89f2b929bc18211a0fb3cec509 | Install in your DO_PATH a remote task === Examples You can install/update task with rake plugin:configuration plugin "configuration", " | [
{
"docid": "f2875db879f371c6fe676b72f67d08a0",
"score": "0.6755239",
"text": "def plugin(name, repo)\n desc \"install #{name} plugin\"\n local(\"plugin:#{name}\" => :setup) do\n log \"\\e[36m## Installing plugin %s\\e[0m\" % name\n Dir.mkdir(DO_PATH) unless File.exist?(DO_PATH)\n... | [
{
"docid": "5ad5375e1f494b407fab089f4e964ee2",
"score": "0.72853726",
"text": "def plugin(name, repo)\n desc \"install #{name} plugin\"\n namespace :plugin do\n task(name => 'setup') do\n log \"\\e[36m## Installing plugin %s\\e[0m\" % name\n Dir.mkdir(DO_PATH) unless F... |
4c5baf75cae823cd6d9439fd7ea9c094 | It is always the last entry in ICAP responses. | [
{
"docid": "b2be4225e5cc8ec9a2df0b1e04ea5077",
"score": "0.0",
"text": "def <=>(_)\n 1\n end",
"title": ""
}
] | [
{
"docid": "f172746dc9be855bcddac7a6371c4d73",
"score": "0.6682197",
"text": "def last\n @raw_responses[@raw_responses.length - 1]\n end",
"title": ""
},
{
"docid": "d34f830f249b5f7ec9a027eff912f8bc",
"score": "0.66556215",
"text": "def lastresp; end",
"title": ""
},
... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "0ebb7fb5a0aa401d449e7a6e13c82833",
"score": "0.0",
"text": "def set_ad_group\n @ad_group = AdGroup.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... |
62de3ac5ecebe4689001381dcbdf9bd7 | Serve image from web server, bypassing apache and passenger. (This is only used when an image hasn't been transferred to the image server successfully.) type:: Size: 'thumb', '320', etc. id:: Image id. | [
{
"docid": "f2a9cf3698f9666735d6f24a26a2cef5",
"score": "0.6751603",
"text": "def image\n size = params[:type].to_s\n id = params[:id].to_s\n file = \"#{IMG_DIR}/#{size}/#{id}.jpg\"\n if !File.exists?(file)\n if size == 'thumb'\n file = \"#{IMG_DIR}/place_holder_thumb.jpg\"\n ... | [
{
"docid": "24e1180223354810ff2de3afc4b403d1",
"score": "0.69040465",
"text": "def show\n if params[:size] == \"large\"\n size = LARGE_SIZE\n else \n size = params[:size] || \"200x200\"\n end\n size = size[0..-($1.length.to_i + 2)] if size =~ /[0-9]+x[0-9]+\\.([a-z0-9]+)/ # trim f... |
a822a846e62322ec99cd471848e0a4f1 | Get all contacts Provides a list of all contacts | [
{
"docid": "b6aca384bbb1ab306d482af48de5eb15",
"score": "0.0",
"text": "def get_contacts_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: ContactsApi.get_contacts ...'\n end\n if @api_client.config.client_side_validation &&... | [
{
"docid": "c270827ce9446c80883a5f9b000d6cf8",
"score": "0.87078035",
"text": "def all_contacts\n Contact.all\n end",
"title": ""
},
{
"docid": "76f89af45b495e0d53bfdbadb0fa403b",
"score": "0.8316215",
"text": "def get_contacts(params={})\n @obj.get('get-contacts', @auth... |
8574cdb1d07ede6bb3cb756ca0887fe9 | Edit link with bootstrap classes | [
{
"docid": "cdc03b565ff437894393872ef03f3fe2",
"score": "0.7245088",
"text": "def link_to_edit(path)\n link_to 'Edit', path, class: 'btn btn-default btn-xs'\n end",
"title": ""
}
] | [
{
"docid": "4e40a696c3bec204025535a3f89906fa",
"score": "0.7278591",
"text": "def link_to_edit(path, *options)\n link_to path,\n class: \"btn btn-warning btn-sm\",\n title: \"Alterar\",\n style: \"color: #FFF; \" do\n content_tag :span, class: \"fa fa-pencil\" do... |
dd9ad7787727a8339f3abb78658f931a | PATCH/PUT /invitados/1 PATCH/PUT /invitados/1.json | [
{
"docid": "a7ffe9ac9c016e3ec0bab12b041db32d",
"score": "0.6804974",
"text": "def update\n respond_to do |format|\n if @invitado.update(invitado_params)\n format.html { redirect_to @invitado, notice: 'Invitado was successfully updated.' }\n format.json { render :show, status: :ok, ... | [
{
"docid": "6d204552315ee10c65455866fc8efa4c",
"score": "0.67890984",
"text": "def update\n invite = current_user.received_invites.find(params[:id])\n raise PermissionViolation unless current_user.updatable_by?(current_user)\n \n case params[:status].downcase\n when 'accepted' then inv... |
57fd43c5056857f89db3d32a9c853283 | return value will directly be passed into the ffi fn | [
{
"docid": "1546ffa4d3b63c4b03739a27e186a4ef",
"score": "0.0",
"text": "def ruby_input_conversion(obj); obj; end",
"title": ""
}
] | [
{
"docid": "1c018a8bd179d92610ddc75d6d0958e1",
"score": "0.72172487",
"text": "def ffi_struct; end",
"title": ""
},
{
"docid": "b57354c1d329cf50f9497919a034aaf9",
"score": "0.703072",
"text": "def ffi_managed_struct; end",
"title": ""
},
{
"docid": "d2f470837ce699e91dc0ee... |
cf0baade8b36b6087b730737e9b943cb | GET /platforms/new GET /platforms/new.json | [
{
"docid": "5bd486a39eb3daff5bfca7de4d3524d3",
"score": "0.66085136",
"text": "def new\n @platform = Platform.new\n @indicator_categories = IndicatorCategory.with_indicators.sorted\n\n # create the translation object for however many locales there are\n # so the form will properly create all... | [
{
"docid": "4943b3b2f659d3d0bde747613308c897",
"score": "0.7255065",
"text": "def new\n @platform = Platform.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.js\n format.json { render json: @platform }\n end\n end",
"title": ""
},
{
"docid": "c6cf... |