query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
af009ae670dca650cdcc4adc0be061ec | Make sure build configuration is set correctly | [
{
"docid": "d36fa6aa0002a4a073f9a7816f19705f",
"score": "0.7460287",
"text": "def verifyBuildConfig\n # Make sure you're building with the \"Distribution\" configuration\n if (ENV['BUILD_STYLE'] != \"Distribution\") then\n abort(\"Build style is #{ENV['BUILD_STYLE']}, not Distribution. Aborting.\")... | [
{
"docid": "0f2073eb5c491c060ca3eec08dd20630",
"score": "0.72176826",
"text": "def verify_build_config\n # Make sure you're building with the \"App Store Distribution\" configuration\n if (ENV['BUILD_STYLE'] != \"App Store Distribution\") then\n abort(\"Build style is #{ENV['BUILD_STYLE']}, not App... |
af3620b91009ab5905acf053980d5ed7 | generate expired tokens from user id | [
{
"docid": "be999b191ec9938960eedeb3aad976f2",
"score": "0.8703819",
"text": "def expired_token_generator(user_id)\n JsonWebToken.encode({ user_id: user_id }, (Time.now.to_i - 10))\n end",
"title": ""
}
] | [
{
"docid": "e8be480657289f43ce7348f78a8412b1",
"score": "0.8705889",
"text": "def expired_token_generator(user_id)\n JsonWebToken.encode({ user_id: user_id }, (Time.now.to_i - 10))\n end",
"title": ""
},
{
"docid": "54b257cd91978e1e1ed1499075f0701d",
"score": "0.8687274",
"te... |
da6642361111879b2a78a0509c7b51d8 | Passed 'dir' exists and is a directory else exception | [
{
"docid": "0df58f9f6c7dc13bcc289b436df1ecda",
"score": "0.7605561",
"text": "def isDirExists(fs, dir)\n raise IOError.new(\"Does not exit: \" + dir.toString()) unless fs.exists(dir)\n raise IOError.new(\"Not a directory: \" + dir.toString()) unless fs.isDirectory(dir)\nend",
"title": ""
}
] | [
{
"docid": "e6b3edabd6fab4a4e5cd85e6a9f97292",
"score": "0.79995674",
"text": "def assert_directory_exists(dir)\n return if File.directory?(dir)\n raise Errno::ENOENT, \"Invalid directory '#{dir}'\"\n end",
"title": ""
},
{
"docid": "83d885ff0b8ef527536945141fbed5eb",
... |
9bffdb5ef927a37a964fe0c069519137 | MySQL 5+ supports savepoints | [
{
"docid": "443b282ff3c05107e7a7d7e6574f4a57",
"score": "0.6360455",
"text": "def supports_savepoints?\n server_version >= 50000\n end",
"title": ""
}
] | [
{
"docid": "5e877ebd351fe99809367ee89aa500ef",
"score": "0.7687718",
"text": "def supports_savepoints?; end",
"title": ""
},
{
"docid": "df38919ed09a5d0376d6729b2509c431",
"score": "0.7226165",
"text": "def begin_savepoint_sql(depth)\n \"SAVEPOINT autopoint_#{depth}\"\n end",... |
416bf1c12253ba1e4cc111b7dd478aaf | GET /sp_bsbs/new GET /sp_bsbs/new.json | [
{
"docid": "6b62d8c1a23d5b73bc7b3438faed57c5",
"score": "0.0",
"text": "def new\r\n @province_plus = \"省\"\r\n if [\"北京\", \"天津\", \"上海\", \"重庆\"].include?(current_user.user_s_province)\r\n @province_plus = \"市\"\r\n end\r\n\r\n if [\"西藏\", \"内蒙古\"].include?(current_user.user_s_province... | [
{
"docid": "a4b3ef6de2c890c85849f3e0abeabf6a",
"score": "0.7348708",
"text": "def new\n @bb = Bb.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @bb }\n end\n end",
"title": ""
},
{
"docid": "c477fa1a56b922809f0a3f6d87ff7041",
... |
f6bf49f4549441c14c9f7f4b6680745c | display remove team link | [
{
"docid": "6e385693b6955c137b0de8067fe25b9d",
"score": "0.7557612",
"text": "def remove_team_link(form_builder)\n if form_builder.object.new_record?\n # If the team is a new record, we can just remove the div from the dom\n link_to_function(\"Remove\", \"$(this).closest('.team').remove(); ... | [
{
"docid": "321db146970a470b27b55890a6061e87",
"score": "0.6608772",
"text": "def remove_membership_button(name)\n self.button(:title=>\"Remove membership from #{name}\")\n end",
"title": ""
},
{
"docid": "dd52f6f76c4e4e89fa2ea585c88761c2",
"score": "0.6526653",
"text": "def dest... |
136dc7d2b204c9912430f5d75f2b3be6 | to be called only by models having association with steps | [
{
"docid": "dc3576f9327619cbb466313bbd395399",
"score": "0.0",
"text": "def count_of_procedures_through_steps\n self.steps.map{|step| Procedure.unarchived.find_by_id(step.procedure_id)}.compact.uniq.count\n end",
"title": ""
}
] | [
{
"docid": "9dfc1e506ed986248413c75d0a6888f4",
"score": "0.6435848",
"text": "def has_one_association_names_for_steps\n {}\n end",
"title": ""
},
{
"docid": "d36b938a8c6673a42745012f13e251e0",
"score": "0.6303519",
"text": "def model_for_step(step)\n raise_no_model_for_ste... |
5994213c59e77ae26d101609c832533a | PUT /stores/1 PUT /stores/1.xml | [
{
"docid": "51b064feb97354e78873d8dc5b0249cf",
"score": "0.627916",
"text": "def update\n respond_to do |format|\n if @store.update_attributes(params[:store])\n format.html { redirect_to(@store, :notice => 'Store was successfully updated.') }\n format.xml { head :ok }\n else\... | [
{
"docid": "80ba1c1d6661570fa07b38ce96851403",
"score": "0.6485058",
"text": "def update\n @api_v1_store = Store.find(params[:id])\n\n if @api_v1_store.update(api_v1_store_params)\n head :no_content\n else\n render json: @api_v1_store.errors, status: :unprocessable_entity\n end\n ... |
a715442aba9b085389193321c4548be6 | Loads a single entity instance from the context For invocations from the command line, the ID of the instance to load can be pulled from the program arguments. For invocations by Alfred, an instance used earlier in the same workflow might be available in the environment. In the latter case it might not be necessary to ... | [
{
"docid": "f18c4866884f8f328ad38646b7fc96c2",
"score": "0.62529635",
"text": "def load_instance(_context)\n raise NotImplementedError\n end",
"title": ""
}
] | [
{
"docid": "d472860bacea4afa29ed58e35699f318",
"score": "0.6261711",
"text": "def execute\n command_context = create_context\n @command.process_arguments(command_context)\n if @command.is_a?(VPS::Plugin::EntityInstanceCommand) || @command.is_a?(VPS::Plugin::CollaborationCommand)\n ... |
993e371e38eeab3644e7257459a95b15 | Returns true if the passed response string indicated the action was sucessful | [
{
"docid": "21febcc9f54848f61b601b603b666de5",
"score": "0.0",
"text": "def check_response(response)\n response =~ /^Y,/ ? true : false\n end",
"title": ""
}
] | [
{
"docid": "5405a8cc513fbcc193ebee4e8b4657b9",
"score": "0.7943169",
"text": "def success?\n response.message == 'OK'\n end",
"title": ""
},
{
"docid": "40bced25e59859a7c24c4dd7f6e70202",
"score": "0.7806044",
"text": "def request_successful(response)\n\t\tresponse.code == \"... |
9a3c4c331511c121d06c140927ba2a48 | POST /product_range POST /product_range.xml | [
{
"docid": "78076da215ac12718cc8f02f7b41a86e",
"score": "0.73581547",
"text": "def create\n @product_range = ProductRange.new(params[:product_range])\n\n respond_to do |format|\n if @product_range.save\n flash[:notice] = 'Product_range was successfully created.'\n format.html { ... | [
{
"docid": "7287fcc3b1783cc82893724170eb2b30",
"score": "0.64771557",
"text": "def create\n @qty_range = QtyRange.new(qty_range_params)\n\n respond_to do |format|\n if @qty_range.save\n format.html { redirect_to @qty_range, notice: \"Qty range was successfully created.\" }\n for... |
5913cc2c60788e2c86723c2df92b8bfe | pin_timing method arguments: from the message request Should be '1,pin,1,pin2,0,pin3,1' First integer is timeset number If argument is '', default timing is created Default timeset number is 0, this is used if no timeset is explicitly defined cycle arg: 0 1 2 waveform : ___/\___ returns "P:" or error message This metho... | [
{
"docid": "3318523cbbff24dce4084c8ed4ac6606",
"score": "0.71869206",
"text": "def pin_timing(args)\n argarr = args.split(',')\n tset_key = argarr.delete_at(0).to_i\n new_timeset(tset_key) unless @cycletiming.key?(tset_key)\n [0, 2, 4].each do |event|\n @cycletiming[... | [
{
"docid": "affea8bb96e769a78405f5e500541228",
"score": "0.69920844",
"text": "def pin_timingv2(args)\n # get the tset number\n argarr = args.split(',')\n tset_key = argarr.delete_at(0).to_i\n new_timeset(tset_key)\n args = argarr.join(',')\n\n invalid_pins = []... |
04b696a553be453eb54abd5579c3b4ad | => should be false time complexity O(n) space complexity O(n) | [
{
"docid": "be554bd17e6dd7ea9795117f04dbdff6",
"score": "0.0",
"text": "def hash_two_sum?(arr, target_sum)\n\n hash = Hash.new(0)\n #keys => indices\n #value => value\n arr.each_with_index do |ele, idx|\n hash[idx] = ele\n end\n\n (0...hash.length - 1).each do |idx|\n return true if hash[idx... | [
{
"docid": "00ee2a773f8c3653a5307eecd31539c8",
"score": "0.7137248",
"text": "def solution(a)\n check_array = a.group_by{|n| n }\n (1..100001).each do |idx|\n return idx unless check_array[idx]\n end\nend",
"title": ""
},
{
"docid": "70e4778e3c82d210e8e4db513ad99f11",
"score": "0.7... |
db3318ddb60c2d12fd88c338d860b655 | _____________________________________________ Face detection _______________________ | [
{
"docid": "6b065d41ad4d4a8460e3c8157998fbb5",
"score": "0.58745396",
"text": "def detect_face_and_timestamps(filename)\n create_faces_directory\n cmd = detect_command filename\n logger.info cmd\n puts cmd\n success = system(cmd + \" > #{Rails.root}/log/detection.log\")\n if success &&... | [
{
"docid": "890591155253d74c8ac5ff6c1b9b7e32",
"score": "0.78596705",
"text": "def find_faces\n end",
"title": ""
},
{
"docid": "890591155253d74c8ac5ff6c1b9b7e32",
"score": "0.78596705",
"text": "def find_faces\n end",
"title": ""
},
{
"docid": "56fb4ee1000981aef10ab957... |
a2099a77c85e91272ae2f9e35b937953 | Only allow a trusted parameter "white list" through. | [
{
"docid": "6b2e6c6b751481be5466d74efeaf0648",
"score": "0.0",
"text": "def sales_order_params\n params.require(:sales_order).permit(:quantity, :shipment_date, :product_id, :customer_id)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7943618",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "f6060519cb0c56a439976f0c978690db",
"score": "0.69572574",
"text": "def permitted_params\n params.permit!\n end",
"title"... |
fe25d4080d0644dd7d8027a789f6a10a | Check if eqivalent. Takes advantage of globally unique names | [
{
"docid": "b83c86be5307bf95e6cdfb1fb64a46fb",
"score": "0.0",
"text": "def ==(other)\n bucket_name == other.bucket_name\n end",
"title": ""
}
] | [
{
"docid": "3cf459dd88abd46054e212a4e41308c4",
"score": "0.664538",
"text": "def legacy_curriculum?\n [TWENTY_HOUR_NAME, HOC_2013_NAME, EDIT_CODE_NAME, TWENTY_FOURTEEN_NAME, FLAPPY_NAME, JIGSAW_NAME].include? self.name\n end",
"title": ""
},
{
"docid": "9dce83c454a400dacc49d0ac28fc8e96",... |
8cb942a7f79748ff18ac956c9951fbd1 | Filter out enriched fields from ALMA because a lot of them can cause the stored MARC XML in Solr to exceed max field size. Note that the marc_view partial filters out nonstandard MARC tags on display side too. | [
{
"docid": "1d448d07114299f8b0f234e5666c4050",
"score": "0.0",
"text": "def get_plain_marc_xml\n lambda do |record, accumulator|\n accumulator << MARC::FastXMLWriter.encode(PlainMarcRecord.new(record))\n end\n end",
"title": ""
}
] | [
{
"docid": "60ab78ca3f7e5f7cb16ab2a024d7d77e",
"score": "0.560075",
"text": "def marc_era_facet\n ordinary_fields_spec = \"600y:610y:611y:630y:648ay:650y:654y:656y:690y\"\n special_fields_spec = \"651:691\"\n separator = \": \"\n\n extractor_ordinary_fields = MarcExtractor.new(ordina... |
6c79794b191be75e11871c66fc210240 | PATCH/PUT /caughts/1 PATCH/PUT /caughts/1.json | [
{
"docid": "3a935a3b4be8aa3db8d73cbe085f8d79",
"score": "0.6664103",
"text": "def update\n respond_to do |format|\n if @caught.update(caught_params)\n format.html { redirect_to user_caughts_path(params[:user_id]), notice: 'Caught was successfully updated.' }\n format.json { render ... | [
{
"docid": "d5eaea298e64625a71a15a970f3b75ed",
"score": "0.6270746",
"text": "def patch *args\n make_request :patch, *args\n end",
"title": ""
},
{
"docid": "ee492a40647304cf644980ad3467e02a",
"score": "0.6266012",
"text": "def update\n @trap = Trap.find(params[:id])\n\n re... |
b61a57ca1089b65f142930a710262bbb | Set the value of the VolumeId input for this Choreo. | [
{
"docid": "1e06b74500a784dbcde950dfbe1f8c63",
"score": "0.72834235",
"text": "def set_VolumeId(value)\n set_input(\"VolumeId\", value)\n end",
"title": ""
}
] | [
{
"docid": "2e6b037b4bb16ea9eed415622a8a4eae",
"score": "0.7476101",
"text": "def volume_id=(value)\n @volume_id = value\n end",
"title": ""
},
{
"docid": "878b9e5defd114d1ac49951dd063edf8",
"score": "0.64268637",
"text": "def set_volume\n @volume = Volume.find(params[:i... |
5292c69c8656c3cae1ec419c6949275e | Returns a full name | [
{
"docid": "01f8da3792ac9f35e6fe1c9a3d73e03f",
"score": "0.8186922",
"text": "def full_name\r\n \"#{first_name} #{last_name}\"\r\n end",
"title": ""
}
] | [
{
"docid": "5aeaf32d637775c1fa7570c1b3d9ac88",
"score": "0.89240783",
"text": "def full_name\n name\n end",
"title": ""
},
{
"docid": "5aeaf32d637775c1fa7570c1b3d9ac88",
"score": "0.89240783",
"text": "def full_name\n name\n end",
"title": ""
},
{
"docid":... |
7f13dcb503935cf9d805e8613b87bdcb | Fetch the HTTP connection handle for a given API version. | [
{
"docid": "7811c7be0456674f75bc7b7945f7a3d5",
"score": "0.74796945",
"text": "def http_handle(version: :v1)\n @__handles ||= {}\n\n if @__handles[version].nil?\n uri = API_ENDPOINTS[version]\n handle = Net::HTTP.new(uri.host, uri.port)\n handle.use_ssl = true\n @__handles[vers... | [
{
"docid": "657456ae476aaad2020aba40b5a8c679",
"score": "0.6233916",
"text": "def api_version\n @api_version ||= begin\n pool = self.pool.get_all[0]\n host = self.pool.get_master(pool)\n major = self.host.get_API_version_major(host)\n minor = self.host.get_API_version_mi... |
836dfb84f28a30f0dd939bb0fa37eb78 | Tells the user how to get an application specific password | [
{
"docid": "5c8b85ddca8b115f63f0a7466d7daf20",
"score": "0.0",
"text": "def handle_two_step_failure(ex)\n if ENV[TWO_FACTOR_ENV_VARIABLE].to_s.length > 0\n # Password provided, however we already used it\n UI.error(\"\")\n UI.error(\"Application specific password you provided u... | [
{
"docid": "6d7d65685d51f84f4ae3551d64369c40",
"score": "0.7449035",
"text": "def password\n prompt unless @password\n @password\n end",
"title": ""
},
{
"docid": "a5cd0dadd93f483fae9d4ab15905cf27",
"score": "0.7401652",
"text": "def password()\n perturb()\n end"... |
570285cbec008e03890cc7c2be20bc9e | % instance_variable_defined? : (Symbol or String) > Boolean | [
{
"docid": "4c1b226b3876cd68eb01629ff07524d6",
"score": "0.8507644",
"text": "def instance_variable_defined?(p0) end",
"title": ""
}
] | [
{
"docid": "d542760c7529943969fc2061a0343207",
"score": "0.82169485",
"text": "def class_variable_defined?(sym) end",
"title": ""
},
{
"docid": "7e67df0f9ebd268f3d23d2748d31b39e",
"score": "0.79009473",
"text": "def variable_definition?\n @variable\n end",
"title"... |
71a59a444c541ea3ce7893eeaf64b78e | GET /bookmarks/new GET /bookmarks/new.xml | [
{
"docid": "87ac2b69ec957a0c68383087e01adad1",
"score": "0.60632074",
"text": "def new\n @bookmark = Bookmark.new\n @page = @wiki.find_page(params[:page])\n respond_to do |format|\n format.html { render :layout => false } \n format.js {render_to_facebox }\n format.xml { rende... | [
{
"docid": "bf987c5df6eb0c8c84c74a10fa30d65e",
"score": "0.7544945",
"text": "def new\n @bookmark = Bookmark.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @bookmark }\n end\n end",
"title": ""
},
{
"docid": "bf987c5df6eb0c8c84c... |
f19a61cd6b3d4189a0c357915e64eca2 | Method to check if RegExp pattern array exists in Beaker::Result object's stdout or output instance attributes. | [
{
"docid": "706ba028a75603f84a383e721e0f9e7b",
"score": "0.6275159",
"text": "def search_pattern_in_output(output, patarr, resource_name, inverse, testcase,\\\n logger)\n patarr = hash_to_patterns(patarr, resource_name) if patarr.instance_of?(Hash)\n output = scrub_yang(out... | [
{
"docid": "293bda8032a55ce713ea62a34a1f7085",
"score": "0.6237159",
"text": "def pattern_match?\n @pattern_match\n end",
"title": ""
},
{
"docid": "61845309b9ccad1ea2eea24b600620e9",
"score": "0.6038651",
"text": "def pattern?\n !pattern.nil?\n end",
"title": ""
... |
4ea8f9955005cfaf44035c89f730f111 | Sets the attribute object | [
{
"docid": "b63157592d7c75d99cfb363c47588f71",
"score": "0.0",
"text": "def object=(_arg0); end",
"title": ""
}
] | [
{
"docid": "d508f29eea085d040ff4c00efa72b4ff",
"score": "0.8086476",
"text": "def set_attribute(name, value); end",
"title": ""
},
{
"docid": "9fa54a11d11bf2d28abfc3c1c4ac587a",
"score": "0.76869446",
"text": "def set attribute, value\n attributes[attribute] = value\n end",
... |
74c7ea796dc4beb896a51a99e9134694 | Fiscal Year for the Club is defined here. | [
{
"docid": "14d9a7552678648b93b7af831c737c19",
"score": "0.73288345",
"text": "def fiscal_year_start_date\n Date.today.month < 7 ? \"07/01/#{Date.today.year - 1}\" : \"07/01/#{Date.today.year}\"\n end",
"title": ""
}
] | [
{
"docid": "a1c9dabee18edcb7a9cd5926328a925a",
"score": "0.7979148",
"text": "def current_fiscal_year\n fiscal_year(current_fiscal_year_year)\n end",
"title": ""
},
{
"docid": "03795a2e5e1aac5acf0b99f7114292af",
"score": "0.7927809",
"text": "def fiscal_year\n super(fy_year)\n... |
d2e16c39fe00e394087714544590a108 | Constructor. Any inheritors of this class should call super to make sure this method is called. parent:: if supplied, the parent of this child will be set to the supplied value, and self will be added to the parent | [
{
"docid": "d35805301f76be0c25738699cc805a55",
"score": "0.6192642",
"text": "def initialize(parent = T.unsafe(nil)); end",
"title": ""
}
] | [
{
"docid": "92283a721ffb934dbccf959e2fb7b8c0",
"score": "0.8174621",
"text": "def initialize(parent)\n @parent = parent\n end",
"title": ""
},
{
"docid": "271a8d1eaaa4acb48074076b91c13330",
"score": "0.7921251",
"text": "def initialize(parent)\n @parent = parent\n ... |
75715f112b3c2ee51abd845f39fb2540 | Deselects all selected children | [
{
"docid": "dc88357c08cd6d0f7986cede86d0813c",
"score": "0.682087",
"text": "def deselect\n Array(selected).each { |item| item.remove_class :selected }\n end",
"title": ""
}
] | [
{
"docid": "cfdc968737347595c9ae635aae4c8729",
"score": "0.7366458",
"text": "def deselect_all\n selectable? and @native.clear_selection\n end",
"title": ""
},
{
"docid": "389199d8afa06b4e12e7c43edde87622",
"score": "0.7290006",
"text": "def unselect_all\n self.itineraries... |
6cb5d573dee41b9bf58d20812a460d84 | PATCH/PUT /projects/1 PATCH/PUT /projects/1.json | [
{
"docid": "d52513599673120858c409324f75ee02",
"score": "0.0",
"text": "def update\n respond_to do |format|\n if @project.update(project_params)\n format.html { redirect_to @project, notice: 'Project was successfully updated.' }\n format.json { render :show, status: :ok, location: ... | [
{
"docid": "e7f8ee5641911e33622dcbebcce61d0d",
"score": "0.731114",
"text": "def update\n @project.update_attributes!(project_params)\n json_response(@project)\n end",
"title": ""
},
{
"docid": "1ccd064902bda09d4ae7f92d826f3d43",
"score": "0.7226761",
"text": "def update\n ... |
a307815c08b617f6402af1fe7d90dd94 | Returns the string representation of the value. eg, "Hardback". | [
{
"docid": "65c6c86732fbc31841a4eb63cdb6e4ae",
"score": "0.82529134",
"text": "def to_str\n @value.to_s\n end",
"title": ""
}
] | [
{
"docid": "c7aee71851103658ff0d6ca96dc2529c",
"score": "0.83465606",
"text": "def to_str() @value.to_s end",
"title": ""
},
{
"docid": "aeba7d7802c83b2e8df8f41da63b6e10",
"score": "0.8312585",
"text": "def to_str\n @value\n end",
"title": ""
},
{
"docid": "17... |
24da1a2e6d34f86d5a78461126ac71d3 | Use an access token that has been previously generated. | [
{
"docid": "a6d3d94610ba50ac360ec9d7d2b0b96b",
"score": "0.7542742",
"text": "def use_access_token(token, secret)\n @access_token = OAuth::AccessToken.new(@consumer, token, secret)\n end",
"title": ""
}
] | [
{
"docid": "ff906741513d928b9fe7983ed05165a4",
"score": "0.8259125",
"text": "def acquire_access_token!\n access_token || generate_access_token\n end",
"title": ""
},
{
"docid": "24587279b4097ac17a0257dd6a20a272",
"score": "0.8008513",
"text": "def access_token\n @access_token... |
e7d6a33ed6731b23a523db3eb3a88630 | [0, 1, 2, => [2, 1, 0, 3, 4, 5, 5, 4, 3, 6, 7, 8] 8, 7, 6] [0, 1, => [1, 0, 2, 3] 3, 2, | [
{
"docid": "0aad6ff21d1c414880af662b453ffc3b",
"score": "0.0",
"text": "def flip_vertically\n case size\n when 3\n self.class.new(pixels.values_at(2, 1, 0, 5, 4, 3, 8, 7, 6))\n when 2\n self.class.new(pixels.values_at(1, 0, 3, 2))\n else\n fail\n end\n end",
"title": "... | [
{
"docid": "c332f645712bdc91213d5829455507ba",
"score": "0.6587698",
"text": "def repeated_number_ranges(arr)\n working_arr = []\n final_arr = []\n arr.each_with_index do |el, idx|\n working_arr << idx if el == arr[idx + 1] && el != arr[idx - 1]\n working_arr << idx if el != arr[idx + 1] && el ... |
ad020fe27eb95048375de61b9fc2183c | Floatnan? flt.nan? > true or false Returns +true+ if _flt_ is an invalid IEEE floating point number. a = 1.0 => 1.0 a.nan? => false a = 0.0/0.0 => NaN a.nan? => true | [
{
"docid": "1fa40d64c45a20330205dd4b60976206",
"score": "0.7096657",
"text": "def nan?\n end",
"title": ""
}
] | [
{
"docid": "52510157b14c25f9fb899e53b3ae217c",
"score": "0.7585733",
"text": "def nan?(value)\n value.is_a?(Float) && value.nan?\n end",
"title": ""
},
{
"docid": "cd1e10053232c74a1ea9d5ee95ab82cd",
"score": "0.7334336",
"text": "def finite?\n @special != 'i' && !self.nan?\n ... |
c7851f4da625365d1b3dfb787565b2eb | This is the action that gets called from the redbox in the expense form. | [
{
"docid": "3edcee06bb396954d1d32c41b7ec7b23",
"score": "0.0",
"text": "def create_for_expense\n @expense_type = @current_account.expense_types.build(params[:expense_type])\n if @expense_type.save\n # To display this expense type on the left header reusing partials.\n @expense = Expense.... | [
{
"docid": "e6d7c691bed78fb0eeb9647503f4a244",
"score": "0.68091595",
"text": "def action; end",
"title": ""
},
{
"docid": "e6d7c691bed78fb0eeb9647503f4a244",
"score": "0.68091595",
"text": "def action; end",
"title": ""
},
{
"docid": "e6d7c691bed78fb0eeb9647503f4a244",
... |
9a03378ecebb68a05d74f2e692860851 | PATCH/PUT /institutions/1 PATCH/PUT /institutions/1.json | [
{
"docid": "7163ae981f78f765ef298911008acd27",
"score": "0.0",
"text": "def update\n\n @acr = params[:acr]\n @admin_acr = params[:admin_acr]\n @current_institution = Institution.find(params[:id])\n \n if user_role_in?(:dmp_admin) \n @institution_pool = Institution.order(full_name: :a... | [
{
"docid": "42e4d81ce0f91ce996dcbc347df2958d",
"score": "0.6749158",
"text": "def update\n @response = self.class.put(\"#{@server_uri}/resource_name/#{@opts[:id]}.json\", :body => \"{'resource_form_name':#{JSON.generate(@opts)}}\")\n end",
"title": ""
},
{
"docid": "e930c7c91182d54623674... |
0d8eb1ba75f4933c4f1af93edd7b9541 | PUT method for updating in database a Post based on id | [
{
"docid": "564766c03bd51b21071404853a88778b",
"score": "0.0",
"text": "def update \n @post = Post.find(params[:id]) \n if @post.update_attributes(post_params) \n flash[:notice] = 'Post updated!' \n redirect_to posts_path \n else \n flash[:error] = 'Failed... | [
{
"docid": "c15df841c46caf2dfce1bba852642e37",
"score": "0.79513407",
"text": "def update\n post = Post.find(params[:id])\n error! :not_found if post.blank?\n post.update(post_params)\n expose post, serializer: PostSerializer\n end",
"title": ""
},
{
"docid":... |
37c7c767c19bb9954ec1e5b9dd3ffef5 | Confirmable field :confirmation_token, :type => String field :confirmed_at, :type => Time field :confirmation_sent_at, :type => Time field :unconfirmed_email, :type => String Only if using reconfirmable Lockable field :failed_attempts, :type => Integer, :default => 0 Only if lock strategy is :failed_attempts field :unl... | [
{
"docid": "691a92cde34928438dda886d013ed03f",
"score": "0.0",
"text": "def stressed?\n self.stress_state == :stressed.to_s\n end",
"title": ""
}
] | [
{
"docid": "cd515a3b0e15cc710b9f3cc27c637840",
"score": "0.6466006",
"text": "def confirmable\n apply_schema :confirmation_token, String\n apply_schema :confirmed_at, DateTime\n apply_schema :confirmation_sent_at, DateTime\n end",
"title": ""
},
{
"docid": "3f7fa5... |
b1b727be8b7473f677c624111571e3d4 | Creates an array with all available template functions | [
{
"docid": "0723b390976310efe5ab437e9cdf01a2",
"score": "0.52636397",
"text": "def get_available_template_types\n\t\tskin = @params['from']\n\t\tskin_dir = File.join(THEMES, skin)\n\t\toptions = []\n\t\tif File.exists? File.join(skin_dir, \"templates\", \"skin.liquid\")\n\t\t\toptions << create_checkbox... | [
{
"docid": "7ee071951f1d0713323bf05a767db8b7",
"score": "0.62844986",
"text": "def xkeys_new (*args); @template.factory :array; end",
"title": ""
},
{
"docid": "ef3ee57db02129c5ad536d2424966f4a",
"score": "0.60585433",
"text": "def templates=(_arg0); end",
"title": ""
},
{
... |
a862685e40556ad7149670ac1ab7c4dd | Helpers These are helpers to make things easier to map. They will typically return a function, so using an applicative operator such as the one found in rlet/functional.rb will work well Use this to map to a presenter Example: presentation_for :account do presents :contact, with: presenter(:contact, scope: :details) en... | [
{
"docid": "260ea76c3343fb0f5c6307d365789f2c",
"score": "0.62843895",
"text": "def presenter(name, opt={})\n attribute(name) | maybe(to_presentation(name, opt))\n end",
"title": ""
}
] | [
{
"docid": "3761903dd1f77daa2b6d3e5598804084",
"score": "0.63257015",
"text": "def to_presentation(name, opt={})\n ->(value) { presenters[name].call(value, opt) }\n end",
"title": ""
},
{
"docid": "550d5465c761b8b241a4db890c3a8b21",
"score": "0.62113976",
"text": "def exp... |
8a38f7ef742749b0136008d68cfda72d | GET /artists GET /album/:album_id/artists | [
{
"docid": "2422b5866e46b9e8532b79cadcf0e16b",
"score": "0.82649684",
"text": "def index\n if params[:album_id]\n @artists = Album.resolve(params[:album_id]).artist\n else\n @artists = Artist.order(:name)\n end\n\n render json: @artists\n end",
"title": ""
}
] | [
{
"docid": "41cd0235d319c81366c92eaede8c21ee",
"score": "0.8294919",
"text": "def artist_albums(artist, options = {})\n get \"artists/#{artist}/albums\", options\n end",
"title": ""
},
{
"docid": "e7e5f972886dc682f41831225f5d017e",
"score": "0.7823776",
"text": "def album... |
1445bc52d94965d3b6cc8bd4bb57cfc6 | nick handling, both changes and errors. Possible contexts: before RPL_WELCOME (during registration) after registration (normal operation) Events: welcome: last attempted nick change (includes the initial try) was successful nick: for previous nick change attempt (remove from queue, set nick) for last nick change attemp... | [
{
"docid": "1b24178b0c57ea33693a9a7bbef49ab2",
"score": "0.72638535",
"text": "def nick_change(who, what)\n if who = @client.state[:nick] && @client.state[:newnick] && what == @client.state[:newnick].first\n @client.state[:nick] = @client.state[:newnick].shift\n end\n end",
"title": ""
... | [
{
"docid": "3e60ff387d4ae7ec68a048f1a062b996",
"score": "0.80090845",
"text": "def handle_nick_taken\n logger.info \"Nickname '#{nickname}' on #{server} taken, trying next.\" \n logger.info \"Available Nicknames: #{nicks.empty? ? \"None\" : nicks.join(\", \")}\"\n if !nicks.empty?\n ... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "3e154cbd7ffd98f5597ba2a01a837399",
"score": "0.0",
"text": "def step_ingredient_params\n params.require(:step_ingredient).permit(:amount)\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... |
3eabf872fe97094e99641bd4e0701554 | Test that a user is logged in, during an acceptance test. To see if the user is logged in, we check the presence of a "Logout" link in the navbar. | [
{
"docid": "035967b8f13ca75032af9567a3de560c",
"score": "0.7336795",
"text": "def user_should_be_logged_in\n expect(page).to have_css 'div.navbar #user-dropdown', visible: true\nend",
"title": ""
}
] | [
{
"docid": "dc6c6cf7ef7906c47883c6733ae82b72",
"score": "0.7643982",
"text": "def admin_should_be_logged_in\n page.should have_content('Log Out')\n end",
"title": ""
},
{
"docid": "425c819eac7f4dda3d576d9301b7a182",
"score": "0.7464009",
"text": "def test_navigation_logged_in\n ... |
4f6507f5989fefd6af04ad56f71d0652 | Remove newline from all words | [
{
"docid": "8abfbcd168eb831af405a15304be4c62",
"score": "0.0",
"text": "def check_login(username, password)\n hashed_password = Digest::SHA2.hexdigest(password)\n\n @login_database.each_with_index do |data, index|\n return true if (data.include? username + \" || \" + hashed_password)\n end\n retu... | [
{
"docid": "9b8ecdc86118efa581d282942a71f0ab",
"score": "0.69252527",
"text": "def strip_newlines text\n text.gsub(/\\A\\n*(.*?)\\n*\\z/m, '\\1')\n end",
"title": ""
},
{
"docid": "8014774c8afe7714127174350dad67b9",
"score": "0.6884768",
"text": "def strip_newlines(input); end",
... |
78a035ba1fb30036f60dbbefe18ac67c | Dispatches to a kitten by removing the extra edcat/ which is available both in the request path as in the kitten's url. | [
{
"docid": "8260928c28f0cd23098cdee0dc66198a",
"score": "0.72727627",
"text": "def dispatch_kitten( kitten )\n path = plugin.request.path[6..-1] # strip off edcat/\n get_json \"#{kitten.url}#{path}\"\n end",
"title": ""
}
] | [
{
"docid": "61ad067016722fdbef4634bb0a305730",
"score": "0.66824013",
"text": "def dispatch_kitten( kitten )\n begin\n HTTParty.get(\"#{kitten.url}#{plugin.request.path}\").path\n rescue\n \"\"\n end\n end",
"title": ""
},
{
"docid": "cf78e4127d696ed6375bb3e1953d923a",
... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "1941be50ff94cf3633c5d94c6faa65d5",
"score": "0.0",
"text": "def set_nasa\n @nasa = Nasa.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.60320485",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.6013371",
"text": "de... |
0b21ccb789366ff5fdcd0db61beea457 | Produces a name from Lou Bega's Mambo 5 | [
{
"docid": "614f52abb7d52c648d5797491b6af74e",
"score": "0.0",
"text": "def mambo_no_5; end",
"title": ""
}
] | [
{
"docid": "3eacc68e5a2deb879e7f558e377f4f67",
"score": "0.7056096",
"text": "def human_from_name; end",
"title": ""
},
{
"docid": "7124e5852dd2c29c3724638b4d0aaa2a",
"score": "0.6966871",
"text": "def name\n \"Lord Admiral #{@name}\"\n end",
"title": ""
},
{
"docid":... |
188dc6f585c55d44612484b478c5bd78 | end of url_params method | [
{
"docid": "9307b2213a1d98f07da831bd5536f928",
"score": "0.0",
"text": "def verify_admin\n redirect_to root_url unless current_user.role_id == 1 || current_user.role_id == 2\n end",
"title": ""
}
] | [
{
"docid": "0ee18d9c0a677771257ab816c35b7370",
"score": "0.7866034",
"text": "def url_params\n []\n end",
"title": ""
},
{
"docid": "d59c8e8e881f2d9c10a26c9d412529b4",
"score": "0.78017867",
"text": "def url_params\n {}\n end",
"title": ""
},
{
"docid": "5c3050617... |
81500ed8d8a1265d42d54961d493b60f | Returns the base URI for this vocabulary class. | [
{
"docid": "285db895dfa65d6864ff18b08c4e2371",
"score": "0.0",
"text": "def to_uri\n RDF::URI.intern(to_s)\n end",
"title": ""
}
] | [
{
"docid": "46787a9ff2b3d75a685d5993081dd9b9",
"score": "0.77113557",
"text": "def base_uri\n self.class.base_uri\n end",
"title": ""
},
{
"docid": "b994ad3d260fadf4e472c8f93d885321",
"score": "0.74551934",
"text": "def base_uri\n RDF::URI(@options[:base_uri])\n end",... |
6ffa97f512ace17bfcec005e4a6dfb9a | Forward the arguments from an observer to this utility method that will attempt to find the relevant model for the given entities/objects. | [
{
"docid": "10ce85f30fe7492edd9b2a9962496219",
"score": "0.6207079",
"text": "def find_model_argument(*args)\n # First a valid model object is searched for.\n model = args.find { |arg|\n arg.is_a?(Sketchup::Model) && model.valid?\n }\n # Then we look for objects that might return a vali... | [
{
"docid": "ee68171f07403e9a7c06c68aa24876a9",
"score": "0.54770494",
"text": "def method_missing msg, *args, &block\n model = begin;\n Object.const_get msg\n rescue NameError\n end\n \n if model and model.respond_to?(:descends_from_active_record?) and model.descends_from_active_record?\n mod... |
de20c1556854f0471115a11755749c91 | Returns waiting time from an OTP itinerary | [
{
"docid": "7a40ba3f98d941b69e9b7776258505a7",
"score": "0.81290734",
"text": "def get_wait_time otp_itin\n return otp_itin[\"waitingTime\"]\n end",
"title": ""
}
] | [
{
"docid": "f479c249e31e11fcf034095fccbc4bba",
"score": "0.7317633",
"text": "def waiting_time\n metrics.waitTime\n end",
"title": ""
},
{
"docid": "024a7748772d7449139e905b588469d4",
"score": "0.71306545",
"text": "def wait_time\n @wait_time\n end",
"title": ""
},
... |
f6e9d859a71bd2fdd9e57e6c72a3e3d4 | verify that the given filename has a digest value | [
{
"docid": "f36d3d1d1ce90f254ddd80caa6d6d379",
"score": "0.73664314",
"text": "def valid?( filename )\n engine.hexdigest( IO.read( filename ) ) == hex\n end",
"title": ""
}
] | [
{
"docid": "af3191528816e2ef54338471b616a644",
"score": "0.76832074",
"text": "def file_digest(path); end",
"title": ""
},
{
"docid": "af3191528816e2ef54338471b616a644",
"score": "0.76832074",
"text": "def file_digest(path); end",
"title": ""
},
{
"docid": "af3191528816e2... |
c555280d4ec8f413f4ac749d7a217993 | FUNCTIONS RELATED TO BUILDING THE XML | [
{
"docid": "3a8f723cc7067c9ed09ce9f8e0e3f764",
"score": "0.0",
"text": "def add_credit_card(xml, creditcard)\n xml.tag!(\"CARD\") do\n xml.tag! 'CARDCODE', creditcard.verification_value if creditcard.verification_value?\n xml.tag! 'CARDNUMBER', creditcard.number\n xml.t... | [
{
"docid": "baacc66695a2e04f7909d2b07dfd1442",
"score": "0.7866771",
"text": "def xml; end",
"title": ""
},
{
"docid": "8267cfd31b92c0ae478b2eb092c1b456",
"score": "0.7350821",
"text": "def to_xml(*args); end",
"title": ""
},
{
"docid": "8267cfd31b92c0ae478b2eb092c1b456",... |
663965a2df5d365e5a48a976fa19eae8 | PUT /attris/1 PUT /attris/1.json | [
{
"docid": "dfd73a3746aa6f1c9d257cb5060da77e",
"score": "0.6673194",
"text": "def update\n @attri = Attri.find(params[:id])\n\n respond_to do |format|\n if @attri.update_attributes(params[:attri])\n format.html { redirect_to @attri, notice: 'Attri was successfully updated.' }\n ... | [
{
"docid": "85d2ed02d760acd40f7badcfec78a18a",
"score": "0.65345967",
"text": "def update!(params)\n res = @client.put(path, nil, params, \"Content-Type\" => \"application/json\")\n @attributes = res.json if res.status == 201\n res\n end",
"title": ""
},
{
"docid": "635c4b1edb7f1a7... |
70005625062af9976bbf327b2ae0ead1 | Retrieves all direct child comments for this post. | [
{
"docid": "3453c904466003288e466914db0ea8e6",
"score": "0.8100843",
"text": "def get_all_child_comments\n Comment.where(:parent_post_id => id, :parent_comment_id => nil)\n end",
"title": ""
}
] | [
{
"docid": "3d05467ffa69b1388df0cd894b52b51d",
"score": "0.74192744",
"text": "def recursive_comments\r\n child_comments = self.comments.all.map { |comment| comment.recursive_comments }\r\n [self, child_comments]\r\n end",
"title": ""
},
{
"docid": "197035c84fb955af3d391ffed67ab3ea",
... |
623b06d0a0c11f5bb2c8b7e8850b8818 | TODO: Complete order_goride_confirm method > DONE! This will be invoked after user finishes inputting data in order_goride method | [
{
"docid": "2a9b1f3c5577659952f46f023b4dc46b",
"score": "0.7085986",
"text": "def order_goride_confirm(opts = {})\n clear_screen(opts)\n form = View.order_goride_confirm(opts)\n\n case form[:steps].last[:option].to_i\n when 1\n form = opts\n\n cust = Location.find(form[... | [
{
"docid": "be236322ddcca33fe8b27cb879d9b4eb",
"score": "0.7579547",
"text": "def order_goride_confirm(opts = {})\n clear_screen(opts)\n form = View.order_goride_confirm(opts)\n \n\n case form[:steps].last[:option].to_i\n when 1\n order = Order.new(\n des_user:... |
64f7bf9e7ffaddd589092d665ddb6a00 | Get Spacing for Items Arranged Side by Side | [
{
"docid": "bbbaf2c7515e508df6718196be264d32",
"score": "0.65775096",
"text": "def spacing; 0; end",
"title": ""
}
] | [
{
"docid": "7aa6057d5a9e68078bc68ba887860979",
"score": "0.68131286",
"text": "def spacing\n @spacing ||= 1\n end",
"title": ""
},
{
"docid": "fc865f5df6413bbe66104fe77012a244",
"score": "0.6757586",
"text": "def spacing\r\n return 8\r\n end",
"title": ""
},
{
... |
6e7ea734e2e0d39c8ebdc2a9bb7c6c90 | POST /lifelines POST /lifelines.json | [
{
"docid": "b32ec5b9a368232a8f8e8808dcd6666d",
"score": "0.6875827",
"text": "def create\n @lifeline = Lifeline.new(lifeline_params)\n\n respond_to do |format|\n if @lifeline.save\n format.html { redirect_to @lifeline, notice: 'Lifeline was successfully created.' }\n format.json... | [
{
"docid": "15d9b65a20c91797a7e75b7c83a1117e",
"score": "0.61437833",
"text": "def create\n @lifepointe = Lifepointe.new(lifepointe_params)\n\n respond_to do |format|\n if @lifepointe.save\n format.html { redirect_to @lifepointe, notice: 'Lifepointe was successfully created.' }\n ... |
ae557396aee027ba0c1cab27a4b37f4b | Array of player ids in the database (not in_tournament_ids) | [
{
"docid": "824853f297729209453594061f2d13e1",
"score": "0.85677326",
"text": "def player_ids\n\t\tmy_ids = []\n\t\tplayers.each { |player|\n\t\t\tmy_ids << player.id\n\t\t}\n\t\treturn my_ids\n\tend",
"title": ""
}
] | [
{
"docid": "b1e0ed7018713bce612615c8c267b10d",
"score": "0.7402934",
"text": "def players\n gp = Player.where :instance_id => self.id\n gp.map { |p| p.user_id }\n end",
"title": ""
},
{
"docid": "8d4bba42083f9b51b52108231fa2317d",
"score": "0.73763883",
"text": "def member_ids... |
669be4aee2dfec1fe81512f9f091454b | retrieve json file based on imdbid | [
{
"docid": "4f79aa3c9e7a18a2ec3218da5613862b",
"score": "0.5666623",
"text": "def retrieve imdb_id\r\n #http://www.omdbapi.com/?i=tt0133093&plot=short&r=json\r\n host = \"http://www.omdbapi.com/\"\r\n #parms = \"title=Matrix\"\r\n #imdb_id = \"tt0133093\"\r\n if already_downloaded imdb_id\r\n re... | [
{
"docid": "f41498343cbdddca2a8cf15b72fecd54",
"score": "0.70179963",
"text": "def query_filedata(uid)\n json = {}\n id = uid.to_i\n dir = id%100\n dir = \"#{fs_root}/#{dir.to_s}/#{id}_lastread\"\n FileUtils.makedirs(dir)\n ... |
b528df07c2f2451137cd3d8b9ba5a622 | POST /faculty_types POST /faculty_types.json | [
{
"docid": "dd15724b2d93723e4dd84987b5a1303a",
"score": "0.7314875",
"text": "def create\n @faculty_type = FacultyType.new(faculty_type_params)\n\n respond_to do |format|\n if @faculty_type.save\n format.html { redirect_to faculty_types_path, notice: 'Faculty type was successfully crea... | [
{
"docid": "d907a53f73e255db227e72cd3a8bb5c9",
"score": "0.65278804",
"text": "def create\n @faculties = Faculty.create!(faculty_params)\n json_response(@faculties, :created)\n end",
"title": ""
},
{
"docid": "0cc5ff0f8401558f9932c6b384713c67",
"score": "0.63989925",
"text": "... |
5a71e2c22cc1f78f71061a962e370a87 | GET /lists GET /lists.json | [
{
"docid": "39b2989b08d00443569e8dbdc0e631f3",
"score": "0.65090376",
"text": "def index\n @lists = @organization.lists.all\n end",
"title": ""
}
] | [
{
"docid": "204ea0b7eb59c378fe80953052a21039",
"score": "0.80919707",
"text": "def get_lists\n response = rest(\"get\", \"lists\")\n\n return response[\"lists\"]\n end",
"title": ""
},
{
"docid": "4d64e2d693b959cc6ccbdba5e1269336",
"score": "0.7942851",
"text": "def get_list(l... |
8224875dddd41411b21a2fd342ae6eab | Write a single chunk to the body. Signal completion by calling `finish`. source://asynchttp//lib/async/http/body/writable.rb75 | [
{
"docid": "a80f6da16c40036e982d2c814a306fd2",
"score": "0.0",
"text": "def <<(chunk); end",
"title": ""
}
] | [
{
"docid": "32c52ddaca2bb4eefa38ea2bb819264a",
"score": "0.7701128",
"text": "def write(chunk)\n unless @connection.response_state == :chunked_body\n raise StateError, \"not in chunked body mode\"\n end\n\n @response_writer.write(chunk)\n end",
"title": ""
},
{
"doci... |
ced13c7b78f52b9750fe226981859cc9 | return youtube video_id from | [
{
"docid": "0000ac965b585d4a319abfb59819ab9c",
"score": "0.83401424",
"text": "def youtube_id(youtube_url)\n regex = /(?:youtube(?:-nocookie)?\\.com\\/(?:[^\\/\\n\\s]+\\/\\S+\\/|(?:v|e(?:mbed)?)\\/|\\S*?[?&]v=)|youtu\\.be\\/)([a-zA-Z0-9_-]{11})/\n match = regex.match(youtube_url)\n if match && ... | [
{
"docid": "f4c057d6add433b65479c933615db3d1",
"score": "0.91156834",
"text": "def youtube_video_id\n regex = /(?:.be\\/|\\/watch\\?v=|\\/(?=p\\/))([\\w\\/\\-]+)/\n youtube_id = youtube_video_link&.match(regex)&.[](1)\n end",
"title": ""
},
{
"docid": "ed53b399b31a70cd31557ba289c93d6c... |
c554e913cfb704be9eecde8bb60b6cb2 | The symlink will belong to the deploy user | [
{
"docid": "6e878cbff53aa8703962d42ea6dee02c",
"score": "0.5964323",
"text": "def monit_etc_app_symlink\n File.join(monit_etc_conf_d_path, \"#{user_app_env_file_name}.conf\")\n end",
"title": ""
}
] | [
{
"docid": "9bd50383a6083145de2e0385aa5f8215",
"score": "0.824189",
"text": "def app_user_symlinks(exec_action)\n link \"#{deploy_user_home_dir}/#{new_resource.name}\" do\n to deploy_to\n owner app_user\n group app_group\n action exec_action\n end\nend",
"titl... |
ffb10ec3fae53093dc0c26e05c659af8 | end of Date maniputaion code | [
{
"docid": "ec1d2874a49b00abd8e7316e934981cb",
"score": "0.0",
"text": "def create_goal(save = true, user = @jarek)\n g = Goal.new\n\n g.category = user.income\n g.period_type = :SELECTED\n g.period_start = Date.today\n g.period_end = Date.today\n g.goal_type_and_currency = 'PLN'\n ... | [
{
"docid": "b29effc1dbbc52c623e184beb9360927",
"score": "0.7812017",
"text": "def date; end",
"title": ""
},
{
"docid": "b29effc1dbbc52c623e184beb9360927",
"score": "0.7812017",
"text": "def date; end",
"title": ""
},
{
"docid": "b29effc1dbbc52c623e184beb9360927",
"sc... |
85ceb6a14de78dbe3f5d737bd232f047 | Factorizes n in factor base and returns an exponent bitvector | [
{
"docid": "05e0d2a3fecfc32e13aa4d34b3d2230e",
"score": "0.78779083",
"text": "def exponent_bitvector(n)\n vec = 0\n if n < 0\n vec = 1\n n = -n\n end\n bit = 2\n ([2] + @ps).each do |p|\n e = false\n while n % p == 0\n n /= p\n e = ... | [
{
"docid": "e39d5d6a2aed191a6e070e08aff3a0e0",
"score": "0.7324851",
"text": "def exponent(b, n)\n\nend",
"title": ""
},
{
"docid": "e39d5d6a2aed191a6e070e08aff3a0e0",
"score": "0.7324851",
"text": "def exponent(b, n)\n\nend",
"title": ""
},
{
"docid": "e39d5d6a2aed191a6e... |
a3beca39d4f814f5ddd97e043e018be3 | beginning of private methods anything below this line will be private strong parameters to ignore malicious form entries whitlisting/specifying the fields that we want! | [
{
"docid": "a4fc1f74322253d66376fdb2b8ec9ede",
"score": "0.0",
"text": "def job_params\n params.require(:job).permit(:title, :description, :company)\n end",
"title": ""
}
] | [
{
"docid": "f6d8ed39ec70b8b075d489ed42285b99",
"score": "0.7137057",
"text": "def sanitize_fields; end",
"title": ""
},
{
"docid": "ecc38ba6f8858b3cf648f79f1469e3b1",
"score": "0.6985973",
"text": "def sanitize_fields=(_arg0); end",
"title": ""
},
{
"docid": "b882de49bb2e... |
21d763209cbc7b70fdf6592e21367011 | Get label for rubric indicator | [
{
"docid": "e3165b5907c88c3b9082573cac5f5a36",
"score": "0.79958045",
"text": "def getIndicatorLabel(indicator, assessment, rubric)\n indicatorGrade = RubricGradeUtil.getIndicatorGrade(assessment, indicator, rubric)\n return indicatorGrade ? indicatorGrade.getOTIndicatorGrade().getLabel : '-'\nend",
... | [
{
"docid": "f500d57253e81b919aded05765aef463",
"score": "0.719685",
"text": "def name\n self.core_indicator.name\n end",
"title": ""
},
{
"docid": "cbb4a91be5c2284f3ce5d36cdde2f63d",
"score": "0.6875875",
"text": "def label\n return @label\n end",
"title": ""
},
{
... |
a74efd16b91e50961e15f83a72fbd915 | Add a product and the specified quantity to the CartLine Array. | [
{
"docid": "0e6bad77bc02a070aef66b9ce11ae3dd",
"score": "0.85917753",
"text": "def add_item(product, quantity)\n i = @cartlines.index { |o| o.productID == product.productID }\n if i == nil\n o = CartLine.new\n o.productID = product.productID\n o.quantity = quantity\n ... | [
{
"docid": "0affb2930dbde9edd5ec65cb10e6e0d2",
"score": "0.81760854",
"text": "def add_product(a_product, quantity=1, options={})\n return nil if a_product.nil?\n item = find(:first, a_product)\n if item\n item.quantity += quantity\n else\n item = self.cart_line_item(a_product, qua... |
17c9bffff66e97009e3e6acb02b536cc | deliver gets called from webhooks in stripe_controller.rb | [
{
"docid": "fed4330457a908d419b96698c757d4c8",
"score": "0.0",
"text": "def deliver(opts={})\n if self.event.price == 0\n deliver_free && deliver_maker(opts)\n elsif self.parent?\n deliver_parent(opts) && deliver_maker_daughter(opts)\n elsif self.minor?\n deliver_minor(opts) && d... | [
{
"docid": "75b2d522546ff54aecf998b0d849f4fd",
"score": "0.72194594",
"text": "def after_deliver\n end",
"title": ""
},
{
"docid": "f59b4155ed55de7ba272c4e94df38b0c",
"score": "0.72191507",
"text": "def after_deliver; end",
"title": ""
},
{
"docid": "f59b4155ed55de7ba272... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "6f06bdbd0a243d12f11b690da5402f8d",
"score": "0.0",
"text": "def set_survey_section\n @survey_section = SurveySection.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... |
82d2cf5aec792d41c4b5ccce1c9b212d | Add modules for SimpleBackend that is used for Yaml translations | [
{
"docid": "ae783bf68af26d395abe3b05d8709dd5",
"score": "0.6821853",
"text": "def include_modules\n ::I18n::Backend::Simple.send(:include, ::I18n::Backend::Flatten)\n ::I18n::Backend::Simple.send(:include, ::I18n::Backend::Pluralization)\n ::I18n::Backend::Simple.send(:include, ::I1... | [
{
"docid": "48da51aea05f435a2a24aa75ce8e27b0",
"score": "0.67279494",
"text": "def include_modules\n ::I18n::Backend::Simple.send(:include, ::I18n::Backend::Flatten)\n ::I18n::Backend::Simple.send(:include, ::I18n::Backend::Pluralization)\n ::I18n::Backend::Simple.send(:include, ::I... |
239365a4de63d97d4de71f2313b6eb6c | Add a container to the stack. | [
{
"docid": "37bc65e0aba7ad6b3f7825ac80cb0d34",
"score": "0.0",
"text": "def container(key, klass)\n type_conflict! klass, top[key] if top.is_a?(Hash) && top.key?(key) && ! top[key].is_a?(klass)\n value = bind(key, klass.new)\n type_conflict! klass, value unless value.is_a?(klass)\n p... | [
{
"docid": "6d4a2f588f722d15875de8d2fa2d3707",
"score": "0.7212205",
"text": "def add(el)\n @stack.push(el)\n end",
"title": ""
},
{
"docid": "6d4a2f588f722d15875de8d2fa2d3707",
"score": "0.72113633",
"text": "def add(el)\n @stack.push(el)\n end",
"title": ""
},
{
... |
e561e11bcf379ef5dc139c210017366b | Only allow a list of trusted parameters through. | [
{
"docid": "001222cf33b82d1e0cee87d1c00453a2",
"score": "0.0",
"text": "def ticketnote_params\n params.require(:ticketnote).permit(:notes, :troubleticket_id, :admin)\n end",
"title": ""
}
] | [
{
"docid": "c1f317213d917a1e3cfa584197f82e6c",
"score": "0.69497335",
"text": "def allowed_params\n ALLOWED_PARAMS\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6812623",
"text": "def strong_params\n params.require(:listing_member).permi... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "a83123c874f9d49a75bb502386faf211",
"score": "0.0",
"text": "def set_perfile\n @perfile = Perfile.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "bd89022716e537628dd314fd23858181",
"score": "0.6163163",
"text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n end",
"title": ""
},
{
"docid": "3db61e749c16d53a52f73ba0492108e9",
"score": "0.6045976",
"text": "def action_hook;... |
b1e55009c19508e3e8e0788bc795f963 | change vehicle sprite vehicle_id: 0 = boat, 1 = ship, 2 = airship | [
{
"docid": "e1549874b63550431a0a61ff6eb0c57f",
"score": "0.63692194",
"text": "def change_vehicle_graphic(vehicle_id, name, index)\n add_command(323, [vehicle_id, name, index])\n end",
"title": ""
}
] | [
{
"docid": "ecb2e42226f8198fcf4e41f150f06a50",
"score": "0.6210387",
"text": "def sprite(sprite_id:) @sprites[sprite_id] end",
"title": ""
},
{
"docid": "6ad6ba4eb1dd14203e80af7fbb5e9379",
"score": "0.61223084",
"text": "def change_sprite(params)\n $PokemonGlobal.dependentEvents.e... |
46cb47f367dd27b6221110e9a8a7c83f | write the index to a file in dst_dir and remove the base_dir part of the path for each filename | [
{
"docid": "2eefcfc2e489b1e5885fc03f5d6a0fa4",
"score": "0.61757743",
"text": "def serialize_section_index(dst_dir, base_dir)\n dst_dir.mkpath\n\n heading_db_path = dst_dir.join(HEADING_DB_BASENAME)\n Giblog.logger.info { \"writing json to #{heading_db_path}\" }\n\n File.write(headin... | [
{
"docid": "d34e988f807933c053d02d94e79fce7d",
"score": "0.65000993",
"text": "def export_index_to_dir(dir_path = File.join(Rails.root,\"db\", \"assets\",\n \"index_export\", ActiveModel::Naming.plural(self)))\n\n puts \"Exporting index to \\\"#{dir_path}\\\"\"\n Dir.mkdir(dir_pat... |
4293178be797c8cc9cb5f86088ab9f87 | Clears either the min or the inputs | [
{
"docid": "058bbcbaa2aa6b6ea9944a180a623fb3",
"score": "0.7594909",
"text": "def reset\n\t\t@n ? @inputs = [] : @min = 0\n\tend",
"title": ""
}
] | [
{
"docid": "dd664659dec073409d5999c7555457c3",
"score": "0.7014963",
"text": "def clear_input\n @input_values.clear\n end",
"title": ""
},
{
"docid": "aa7f165cd0d97fd6abe94709649e8ddb",
"score": "0.69293773",
"text": "def reset()\n @value = self.min\n end",
"title": "... |
ae79d7c5111c3c34cda2f6cb2113e7de | Is the given file a path (as opposed to just a name)? | [
{
"docid": "f4fe34160a6d43fddb1d2b7d6c453b78",
"score": "0.78019005",
"text": "def path?(file)\n /\\W/ =~ file\n end",
"title": ""
}
] | [
{
"docid": "a8505144173c562aee72bc8f706f5472",
"score": "0.84419334",
"text": "def file?(path)\n true\n end",
"title": ""
},
{
"docid": "316f54e693d992174fa19e7a0f006100",
"score": "0.8166177",
"text": "def file?(path); end",
"title": ""
},
{
"docid": "316f54e693d... |
ba4393e57c521bc2ff9f4abbba92dac4 | ECMA262 3rd 9.1 ToPrimitive() operator | [
{
"docid": "ea4fa66589cc24970da09d54497285c6",
"score": "0.5859807",
"text": "def to_primitive(hint)\n if @type == :object\n raise 'implement me'\n else\n return self\n end\n end",
"title": ""
}
] | [
{
"docid": "9e2da25250ecdfb6d55721c36b72e10a",
"score": "0.7216296",
"text": "def make_primitive number\n Primitive.convert number\n end",
"title": ""
},
{
"docid": "3c5aca9b6cf6b0cccb6e047feb18bc76",
"score": "0.68706256",
"text": "def typecast_to_primitive(value)\n value... |
906dcf343a53e02e3b4515c5525303e1 | DELETE /tables/1 DELETE /tables/1.json | [
{
"docid": "321405c668fcad09230663c3b461d9f4",
"score": "0.7401318",
"text": "def destroy\n @table = Table.find(params[:id])\n @table.destroy\n\n respond_to do |format|\n format.json { respond_with_success }\n end\n end",
"title": ""
}
] | [
{
"docid": "3492d9cad075a685ad9e30e90bfdbc3f",
"score": "0.7642302",
"text": "def delete_table\n unless params[:name].blank?\n table_name = params[:name]\n table = $dynamodb.tables[table_name] # makes no request\n table.delete \n \n respond_to do |format|\n format.html... |
ff1c5ec1713b3e9e80c1c80e9ce822c4 | out the current state. Define a method display_board that prints a 3x3 Tic Tac Toe Board | [
{
"docid": "6ad5cf6a2d9ef9c3834bd5c0f94dbb57",
"score": "0.0",
"text": "def display_board output = capture_puts{ display_board(board) }\nboard = [\" \",\" \",\" \",\" \",\" \",\" \",\" \",\" \",\" \"]\nif board.include? \" \"\n puts \" | | \"\n puts \"-----------\"\n puts \" | | \"\n put... | [
{
"docid": "16c478d6d2a8ecd93256cf55bd91bb63",
"score": "0.84691155",
"text": "def display_board\n\t\t@board_state.each_with_index do |val, index|\n\t\t\tif [0,3,6].include?(index) \n\t\t\t\tprint @board_state[index] + ' | ' \n\t\t\tend\n\t\t\tif [1,4,7].include?(index)\n\t\t\t\tprint @board_state[index... |
7a86ca7bc63e61534c9394ca467654bf | =============== STYLES =============================== This method sets explicit widths on all wrapped cells that do not already have widths asided. | [
{
"docid": "bea1f694c76f503fde0bbb43bd58689e",
"score": "0.6292783",
"text": "def calculate_width(container_width)\n width(container_width) unless table_width.to_i > 0\n \n cells.each { |c| c.calculate_width(default_cell_width) }\n end",
"title": ""
}
] | [
{
"docid": "64d5d2eaf1dd1a8254bc40d234ebea5e",
"score": "0.66513854",
"text": "def auto_adjust_widths\n column_widths = []\n\n rows.each do |row|\n row.columns.each_with_index do |col, i|\n column_widths[i] = [col.required_width, (column_widths[i] || 0)].max\n end\n ... |
ee5f6aac1dc2dc3c4c3fa99ff4e2105d | DELETE /credit_notes/1 DELETE /credit_notes/1.xml soft delete creditnote | [
{
"docid": "8ed1fbc333ba1c6590204e1a89b39820",
"score": "0.6334176",
"text": "def destroy\n @credit_note = @company.credit_notes.find(params[:id])\n @credit_note.fin_year = @financial_year.year.name\n respond_to do |format|\n if @credit_note.destroy\n @credit_note.register_user_acti... | [
{
"docid": "dbea448142b68e78b766c96cd245be61",
"score": "0.7821197",
"text": "def credit_note_delete\n doc = Builder::XmlMarkup.new(:target => out_string = \"\", :indent => 2)\n doc.instruct! :xml, :version => \"1.0\", :encoding => \"UTF-8\"\n doc.page {\n check_user(params[:u])\n if ... |
cabe5a11807e434a18d8294946ed9e90 | w int h int blocks list of blocks; must be (w h) in length | [
{
"docid": "0da0ac3872dda7ed118da85892eadea8",
"score": "0.6396514",
"text": "def initialize(w:, h:, blocks:)\n raise INVALID_DIMENSIONS_ERR unless (w * h == blocks.length)\n\n @w, @h = w, h\n @blocks = blocks\n end",
"title": ""
}
] | [
{
"docid": "e62a371518ce5f3615f8def5ca89a565",
"score": "0.7152647",
"text": "def get_blocks(img, size)\n block_size = (size % 2 == 0 ? 2 : 3)\n blocks = []\n\n 0.step(size - 1, block_size) do |i|\n 0.step(size - 1, block_size) do |j|\n tmp = \"\"\n 0.upto(block_size - 1) do |k|\n tmp... |
8f86147f127590245630e9708015a629 | =============================================================================== generate definition of static inlinable methods | [
{
"docid": "5e61675f16ab3361b88326297b75fd58",
"score": "0.7066628",
"text": "def addStaticInlMethods\n @method.methClass.addClassMembers(\n ['static int ' + STAT_INT_FLD_NAME + ' = 3;',\n 'static void statSet(int value) {' + STAT_INT_FLD_NAME + ' = value;}',\n 'static int statGet()... | [
{
"docid": "984cf45c8b06fdf366e340cb166699f8",
"score": "0.68625844",
"text": "def define_methods\n define_comparison_attrs\n define_compare\n define_hash\n define_inspect\n end",
"title": ""
},
{
"docid": "07967ba80547570b4e89e6d7d11db49c",
"score": "0.6452167",
"text":... |
6da5c286461190c7ed2023acdc752512 | Must have "Enable access for assistive devices" checked in System Preferences > Universal Access | [
{
"docid": "2304a69888acb799001797c99215c8bd",
"score": "0.0",
"text": "def execute_system_events(script) \n`osascript <<SCRIPT\ntell application \"System Events\" to tell process \"Safari\" \n\t#{script}\nend tell\nSCRIPT`\n nil\n end",
"title": ""
}
] | [
{
"docid": "b55e557dc4142286108afa56a0856820",
"score": "0.5944551",
"text": "def safely \n begin\n yield\n rescue StandardError => se \n STDERR.puts case se.error_number\n when -1719 then \"ERROR: Can't connect to iTunes. You need enable 'Access for assistive devices'. Head t... |
2a0869318caf5c989a72b1b5a6b656a0 | Verifies that all CSS elements are as expected before taking a snapshot. Args: page: Page object used by Percy for snapshotting. url: URL to be snapshotted. forbidden_css: Array of CSS elements that must not be found in the page. loading_incomplete_css: Array of CSS elements that must eventually be removed from the pag... | [
{
"docid": "b445b4bef5300f00d8acb043ead99697",
"score": "0.78191435",
"text": "def verifyCssElements(\n page, url, forbidden_css, loading_incomplete_css, loading_complete_css)\n page.has_no_css?('.i-amphtml-loader-dot') # Implicitly waits for page load.\n if forbidden_css\n forbidden_css.each d... | [
{
"docid": "92ebe09366ce6935d22fccb3bcc01cc5",
"score": "0.76208675",
"text": "def verifyCssElements(\n page, forbidden_css, loading_incomplete_css, loading_complete_css)\n page.has_no_css?('.i-amphtml-loader-dot') # Implicitly waits for page load.\n if forbidden_css\n forbidden_css.each do |cs... |
cda9efa4ba96bc75280f50785cd0d6a3 | Sets the url property value. The URL to the logic app endpoint that will be triggered. Only required for apponly token scenarios where app is creating a customCalloutExtension without a signedin user. | [
{
"docid": "c4315ec9c0b38ce5b9dff68219c8e3a0",
"score": "0.709092",
"text": "def url=(value)\n @url = value\n end",
"title": ""
}
] | [
{
"docid": "a657130e7cc3c599eb40fd09a36fdcd2",
"score": "0.76384974",
"text": "def url=(value)\n Api.proj_context_set_url_endpoint(self, value)\n end",
"title": ""
},
{
"docid": "4f027c7a79e2a72b7e2e7700cfa47305",
"score": "0.73905337",
"text": "def url=(value)\n @url = ... |
3b345f7cedcf11481ff3ffbc7d8a43b4 | INDEX OF USER'S FAVORITE LINKS | [
{
"docid": "46c4ee91554d6b1652ed2c4fa21bc000",
"score": "0.58678174",
"text": "def favorites\n params[:page] ||=1\n params[:per_page] ||=5\n @links = Link.where(\"Links.id IN (?) \", current_user.favorites).plusminus_tally.order('plusminus_tally ASC').page(params[:page].to_i).per_page(params[:p... | [
{
"docid": "dd7cd6003b385c4269f0002bce7cbcf0",
"score": "0.6313203",
"text": "def index\n @ulinks = Userlink.all\n end",
"title": ""
},
{
"docid": "3e37d2eb45bb69fced83d9fe66cfcfbc",
"score": "0.6273525",
"text": "def index\n @urls = Url.where(user_id: current_user)\n end",
... |
3f9dfada0ad81ebcde359995efce6490 | LEGACY: Iterations per second. | [
{
"docid": "33ae07b592dc0658ab256575159ff263",
"score": "0.0",
"text": "def ips\n @stats.central_tendency\n end",
"title": ""
}
] | [
{
"docid": "88b04cd4ed2c8d4c215d2c1702baad2d",
"score": "0.752279",
"text": "def my_benchmark(iterations)\n start_time = Time.now\n (1..iterations).each do\n yield\n end\n Time.now - start_time\nend",
"title": ""
},
{
"docid": "3870728d3b160fce787b5950ecc10cd6",
"score": "0.724693... |
022f0b8846db767f61354411a4d5476c | Deletes a `key` from the configured backend. | [
{
"docid": "16b26c73e50057fbbcff5ba549b6e1c8",
"score": "0.0",
"text": "def delete(key)\n success = nil\n err_msg = nil\n key_file = File.join(@root_path, key)\n if File.directory?(key_file)\n success = false\n err_msg = \"Key specifies a folder at '#{key_file}'\"\n else\n ... | [
{
"docid": "92e13de544a9403202641c9a18ce0764",
"score": "0.9007503",
"text": "def delete(key)\n backend.delete(key_prefix + key.to_s)\n end",
"title": ""
},
{
"docid": "a17ebe18574502de18690c8132efd064",
"score": "0.8976909",
"text": "def delete(key)\n @backend.del... |
badcb58664e04f45c4766c5d087cab47 | Called when user exits a widget Will invoke `:LEAVE` handler/event | [
{
"docid": "3a7e234fcb998fc6c6318a9f18d55857",
"score": "0.77121484",
"text": "def on_leave\n @state = :NORMAL # duplicating since often these are inside containers\n #@focussed = false\n if @handler && @handler.has_key?(:LEAVE)\n fire_handler :LEAVE, self\n end\n end",
"title":... | [
{
"docid": "4e39de750e00b2face6893aa4352be9b",
"score": "0.78856784",
"text": "def on_leave\n fire_handler :LEAVE, self\n end",
"title": ""
},
{
"docid": "2ae63e21743e1d3b49478c12cad0cfb4",
"score": "0.7642051",
"text": "def leave_handler(view, event)\n hide_me()\n ... |
94f66b16667697f50eb741985a48266d | DELETE /appreciation_merits/1 DELETE /appreciation_merits/1.json | [
{
"docid": "29fa767d6bf9afe3fca4a97850075570",
"score": "0.73046595",
"text": "def destroy\n @appreciation_merit = AppreciationMerit.find(params[:id])\n @appreciation_merit.destroy\n\n respond_to do |format|\n format.html { redirect_to @appreciation_merit.soi_form }\n format.json { he... | [
{
"docid": "ac120979957d78e58a2362ce388d4d9c",
"score": "0.67862415",
"text": "def destroy\n @appreciation = Appreciation.find(params[:id])\n @appreciation.destroy\n\n respond_to do |format|\n format.html { redirect_to appreciations_url }\n format.json { head :ok }\n end\n end",
... |
e561e11bcf379ef5dc139c210017366b | Only allow a list of trusted parameters through. | [
{
"docid": "eb029c4a6090bb4ffe4698b29abfd418",
"score": "0.0",
"text": "def project_params\n params.require(:project).permit(:name, :description, :organization_id)\n end",
"title": ""
}
] | [
{
"docid": "c1f317213d917a1e3cfa584197f82e6c",
"score": "0.6949874",
"text": "def allowed_params\n ALLOWED_PARAMS\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.68134874",
"text": "def strong_params\n params.require(:listing_member).permi... |
c5163f64cab4f9542a92a29dc5a551ce | Return truthy if is spam | [
{
"docid": "f17c90652368c20ba07ad326f0fe83a3",
"score": "0.66225195",
"text": "def ensure_not_spam!(params, feedback_form)\n if spam?(params[:content], params[:title])\n flash[:error] = t(\"layouts.notifications.feedback_considered_spam\")\n return render_form(feedback_form)\n else\n ... | [
{
"docid": "f10f5c354942dd6ceb54ceb6942637b9",
"score": "0.84075344",
"text": "def spam?(message)\n false\n end",
"title": ""
},
{
"docid": "2926eeb7c3fea2a4a3f7f7996305106b",
"score": "0.8249586",
"text": "def spam?\n !! spam\n end",
"title": ""
},
{
"doc... |
fe794d92349e02c362ea5553f6dd7077 | Create a Route if it does not exist. Update if it does. Will also create app if it does not exist. Put does not skip validation of zero values Update or Create a route | [
{
"docid": "d9b51c0489b0001822f9b4d0890a304a",
"score": "0.5596873",
"text": "def apps_app_routes_route_put(app, route, body, opts = {})\n data, _status_code, _headers = apps_app_routes_route_put_with_http_info(app, route, body, opts)\n return data\n end",
"title": ""
}
] | [
{
"docid": "4388177a0d13397107a61cb678931b48",
"score": "0.66194344",
"text": "def create_new_route route_name, type, value\r\n # the base uri for api requests\r\n query_builder = Configuration.BASE_URI.dup\r\n\r\n # prepare query string for API call\r\n query_builder << \"/routes/{r... |
fb40fa8c5d01290d3fb5b0f5103d2160 | lexer rule sql_separator! (SQL_SEPARATOR) (in sql_splitter.rb.g) | [
{
"docid": "77129d5434ce32b7d98a00824d887fd9",
"score": "0.8378681",
"text": "def sql_separator!\n # -> uncomment the next line to manually enable rule tracing\n # trace_in( __method__, 4 )\n\n type = SQL_SEPARATOR\n channel = ANTLR3::DEFAULT_CHANNEL\n # - - - - label initializa... | [
{
"docid": "e0dde3008939505c5a2eabf050d51103",
"score": "0.76716334",
"text": "def sql_separator_1!\n # -> uncomment the next line to manually enable rule tracing\n # trace_in( __method__, 5 )\n\n \n # - - - - main rule block - - - -\n # at line 73:5: ';'\n match( 0x3b )\n\... |