query
stringlengths
7
9.55k
document
stringlengths
10
363k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
POST /study_process_graphics POST /study_process_graphics.json
def create study_process_graphic_params.permit! @study_process_graphic = StudyProcessGraphic.new(study_process_graphic_params) @study_process_graphic.study_year = @year respond_to do |format| if @study_process_graphic.save StudyPeriod.create!(group: Group.find(study_process_graphic_params...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def study_process_graphic_params\n params[:study_process_graphic]\n end", "def set_study_process_graphic\n @study_process_graphic = StudyProcessGraphic.find(params[:id])\n end", "def create\n @yh_graphic = YhGraphic.new(yh_graphic_params)\n\n respond_to do |format|\n if @yh_graphic.s...
[ "0.66570973", "0.64235497", "0.62875855", "0.6036023", "0.5930794", "0.59113735", "0.5838849", "0.5786757", "0.5758487", "0.5721615", "0.57127506", "0.5606245", "0.5563881", "0.55529636", "0.5540442", "0.55155003", "0.54582405", "0.5457343", "0.5430608", "0.5415303", "0.54036...
0.6535871
1
PATCH/PUT /study_process_graphics/1 PATCH/PUT /study_process_graphics/1.json
def update study_process_graphic_params.permit! @study_process_graphic.study_year = @year respond_to do |format| if @study_process_graphic.update(study_process_graphic_params) format.html { redirect_to study_year_study_process_graphics_path(current_user.current_year), notice: 'График учебного...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_study_process_graphic\n @study_process_graphic = StudyProcessGraphic.find(params[:id])\n end", "def update\n\n sub_obj_non_attributes = study_params.select { |key| !key.to_s.match(/_attributes$/) }\n\n @study = Study.find(session[:current_study_id])\n\n \n if ! sub_obj_non_attributes....
[ "0.6211921", "0.61590815", "0.61230254", "0.61092263", "0.60904443", "0.6080203", "0.6051632", "0.6043299", "0.60067093", "0.60023886", "0.59911215", "0.5968679", "0.59477866", "0.5939497", "0.5923779", "0.5899618", "0.5881114", "0.5845188", "0.5829415", "0.5792861", "0.57843...
0.6268448
0
DELETE /study_process_graphics/1 DELETE /study_process_graphics/1.json
def destroy @study_process_graphic.destroy respond_to do |format| format.html { redirect_to study_year_study_process_graphics_path(current_user.current_year) } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @yh_graphic.destroy\n respond_to do |format|\n format.html { redirect_to yh_graphics_url, notice: '그래픽 삭제 되었습니다.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @svgpost = Svgpost.find(params[:id])\n @svgpost.destroy\n\n respond_to do |format|\n ...
[ "0.67413825", "0.67361754", "0.66747", "0.66472226", "0.66472226", "0.66440994", "0.6622081", "0.6607785", "0.6596698", "0.6570126", "0.654865", "0.6544669", "0.65296227", "0.6527802", "0.6527802", "0.651902", "0.6518173", "0.6506636", "0.65034354", "0.6502952", "0.6501169", ...
0.73461187
0
Use callbacks to share common setup or constraints between actions.
def set_study_process_graphic @study_process_graphic = StudyProcessGraphic.find(params[:id]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_required_actions\n # TODO: check what fields change to asign required fields\n end", "def action_hook; end", "def run_actions; end", "def define_action_hook; end", "def actions; end", "def define_action_helpers\n if super && action == :save\n @instance_helper_module.class_...
[ "0.6163163", "0.6045976", "0.5946146", "0.591683", "0.5890051", "0.58349305", "0.5776858", "0.5703237", "0.5703237", "0.5652805", "0.5621621", "0.54210985", "0.5411113", "0.5411113", "0.5411113", "0.5391541", "0.53794575", "0.5357573", "0.53402257", "0.53394014", "0.53321576"...
0.0
-1
Never trust parameters from the scary internet, only allow the white list through.
def study_process_graphic_params params[:study_process_graphic] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def strong_params\n params.require(:user).permit(param_whitelist)\n end", "def strong_params\n params.require(:listing_member).permit(param_whitelist)\n end", "def allow_params_authentication!; end", "def allowed_params\n ALLOWED_PARAMS\n end", "def default_param_whitelist\n [\"mode\"]\n...
[ "0.69792545", "0.6781151", "0.67419964", "0.674013", "0.6734356", "0.6591046", "0.6502396", "0.6496313", "0.6480641", "0.6477825", "0.64565", "0.6438387", "0.63791263", "0.63740575", "0.6364131", "0.63192815", "0.62991166", "0.62978333", "0.6292148", "0.6290449", "0.6290076",...
0.0
-1
Compare the existing collection data and the expected collection data. Uses RSpec matchers and raises expectation failures if there is a mismatch.
def verify_collection_data(expected_collection_data, actual_collection_data) if expected_collection_data.nil? expect(actual_collection_data).to be nil elsif expected_collection_data.empty? expect(actual_collection_data).to be_empty else expect(actual_collection_data...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_collection_data(actual_collection_data)\n expected_collection_data = test_instance.outcome_collection_data\n if expected_collection_data.nil?\n expect(actual_collection_data).to be nil\n elsif expected_collection_data.empty?\n expect(actual_collection_data).to be_e...
[ "0.8444723", "0.6530125", "0.64918965", "0.63959306", "0.6176236", "0.61725456", "0.61725456", "0.61646885", "0.6164618", "0.615604", "0.6153838", "0.607333", "0.60522723", "0.60206616", "0.59452873", "0.5921305", "0.58912486", "0.58901095", "0.5831789", "0.5810795", "0.58091...
0.8162981
1
Compare the actual operation result to the expected operation result. Uses RSpec matchers and raises expectation failures if there is a mismatch.
def verify_operation_result(expected, actual) if expected.is_a?(Array) if expected.empty? expect(actual).to be_empty else expected.each_with_index do |expected_elt, i| # If the YAML spec test does not define a result, # do not assert the op...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_operation_result(actual)\n expected = test_instance.expected_outcome.result\n if expected.is_a?(Array)\n if expected.empty?\n expect(actual).to be_empty\n else\n expected.each_with_index do |expected_elt, i|\n verify_result(expected_elt,...
[ "0.8215741", "0.672147", "0.667109", "0.65152216", "0.6482703", "0.64753395", "0.6343312", "0.62442267", "0.621628", "0.6213952", "0.6173803", "0.61452717", "0.61081946", "0.60975665", "0.60449654", "0.60351056", "0.6030017", "0.6030017", "0.6011876", "0.59977293", "0.5941452...
0.7869561
1
This variant used by change stream tests which provide the first N events rather than all of them.
def verify_command_started_event_min_count(expected_events, actual_events) if actual_events.length < expected_events.length raise RSpec::Expectations::ExpectationNotMetError.new, <<-EOT Expected at least #{expected_events.length} events, got #{actual_events.length} events. Expected events: #{expected_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def last_n_events(n)\n events.where(['date < ?', Date.today]).first(5)\n end", "def read_many(number_of_events=1)\n synchronize {\n until (events ||= []).size == number_of_events\n events += read_many_nonblock(number_of_events)\n end\n events\n }\n end...
[ "0.66051054", "0.6494608", "0.63043016", "0.607406", "0.59808236", "0.594656", "0.58508337", "0.5846559", "0.58443356", "0.58418626", "0.5839313", "0.5831889", "0.5819548", "0.579139", "0.5767415", "0.5711054", "0.5669564", "0.56540644", "0.5589946", "0.55581117", "0.5541105"...
0.5220165
47
Calculates the array index for percentile
def percentile_index(percentile) index = (self.samples_count * percentile.to_f / 100).to_i index.zero? ? index : index - 1 end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def percentile_by_count(array,percentile)\n count = (array.length * (percentile)).floor\n verbose \"Array entry at 95th percentile: #{count-1}\"\n array.sort[count-1]\nend", "def vector_percentile\n c = size - indexes(*Daru::MISSING_VALUES).size\n ranked.recode! { |i| i.nil? ? nil : (i.quo(c...
[ "0.7829975", "0.698845", "0.69248", "0.6827005", "0.6801123", "0.6786471", "0.67509186", "0.6549195", "0.6249993", "0.62332886", "0.62073535", "0.61893827", "0.6137981", "0.61111194", "0.59693515", "0.5938742", "0.5927578", "0.58859193", "0.5876815", "0.5862637", "0.58608127"...
0.79774183
0
POST /gyms contains part of the autocomplete functionality and global variable current_user takes the newly created gym_id.
def create puts gym_params puts params @gym = Gym.find_or_create_by(gym_params) current_user.update_attribute(:gym_id, @gym.id) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_gym\n @gym = Gym.find(params[:id])\n end", "def set_gym\n @gym = Gym.find(params[:id])\n end", "def set_gym\n @gym = Gym.find(params[:id])\n end", "def set_gym\n @gym = Gym.find(params[:id])\n end", "def create\n @gym = Gym.new(gym_params)\n\n respond_to do |fo...
[ "0.60929817", "0.60929817", "0.60929817", "0.60929817", "0.5936325", "0.5931475", "0.58190924", "0.57564044", "0.5517952", "0.5494301", "0.54905957", "0.5380702", "0.5343608", "0.5322131", "0.53097904", "0.51518685", "0.51472265", "0.51466584", "0.51443845", "0.5129162", "0.5...
0.6119306
0
Use callbacks to share common setup or constraints between actions.
def set_gym @gym = Gym.find(params[:id]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_required_actions\n # TODO: check what fields change to asign required fields\n end", "def action_hook; end", "def run_actions; end", "def define_action_hook; end", "def actions; end", "def define_action_helpers\n if super && action == :save\n @instance_helper_module.class_...
[ "0.6163163", "0.6045976", "0.5946146", "0.591683", "0.5890051", "0.58349305", "0.5776858", "0.5703237", "0.5703237", "0.5652805", "0.5621621", "0.54210985", "0.5411113", "0.5411113", "0.5411113", "0.5391541", "0.53794575", "0.5357573", "0.53402257", "0.53394014", "0.53321576"...
0.0
-1
Never trust parameters from the scary internet, only allow the white list through.
def gym_params params.require(:gym).permit(:gym_name) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def strong_params\n params.require(:user).permit(param_whitelist)\n end", "def strong_params\n params.require(:listing_member).permit(param_whitelist)\n end", "def allow_params_authentication!; end", "def allowed_params\n ALLOWED_PARAMS\n end", "def default_param_whitelist\n [\"mode\"]\n...
[ "0.69792545", "0.6781151", "0.67419964", "0.674013", "0.6734356", "0.6591046", "0.6502396", "0.6496313", "0.6480641", "0.6477825", "0.64565", "0.6438387", "0.63791263", "0.63740575", "0.6364131", "0.63192815", "0.62991166", "0.62978333", "0.6292148", "0.6290449", "0.6290076",...
0.0
-1
TODO confirm function returns false upon failing 7Zip integrity test
def seven_zip_valid?(target) puts "** 7-Zip integrity checking '#{target}'" if Rake.application.options.trace sh %Q["#{RubyInstaller::SEVEN_ZIP}" t "#{target}" > NUL 2>&1] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def archive_ok?\n #todo, we lack any real heuristic for this.\n true\n end", "def zip?\n begin\n ::Zip::File.open input.path\n true\n rescue ::Zip::Error\n false\n end\n end", "def assure_zip_path\n assure_created_zip\n zip_path\n end", "def zip_file?\n @target_file....
[ "0.70543617", "0.67575276", "0.66672623", "0.6527473", "0.6451671", "0.62711334", "0.624796", "0.62022245", "0.6117504", "0.6115377", "0.60750616", "0.60731965", "0.60616475", "0.5986837", "0.5986119", "0.59794796", "0.5967903", "0.59604126", "0.5935011", "0.59337205", "0.587...
0.8041289
0
Set the base address. Values in following tables will be changed simultaneously: got plt symbols one_gadgets
def address=(val) old = @address @address = val [@got, @plt, @symbols].compact.each do |tbl| tbl.each_pair { |k, _| tbl[k] += val - old } end @one_gadgets&.map! { |off| off + val - old } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_address\n end", "def setbase(base)\n\t\t\t@base = base\n\t\tend", "def base=(b)\n b = Addressable::URI.parse(b.to_s)\n b.fragment = nil\n @base = b.to_s\n end", "def prober_address\n super\n end", "def addr(*) end", "def addr(*) end", "def start_addr\n ba...
[ "0.6460656", "0.6290786", "0.5975442", "0.5837168", "0.5707047", "0.5707047", "0.5695727", "0.56194913", "0.55448437", "0.5483983", "0.543929", "0.54119676", "0.54119676", "0.539209", "0.53744406", "0.53744406", "0.53744406", "0.53744406", "0.5361148", "0.53545356", "0.534540...
0.5822895
4
Return the protection information, wrapper with color codes.
def checksec [ 'RELRO:'.ljust(10) + { full: Rainbow('Full RELRO').green, partial: Rainbow('Partial RELRO').yellow, none: Rainbow('No RELRO').red }[relro], 'Stack:'.ljust(10) + { true => Rainbow('Canary found').green, false...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def protections\n @descriptive_detail.protections\n end", "def protection\n return @protection\n end", "def inspect\n inspected = super\n\n # mask password\n inspected = inspected.gsub! @password, \"*******\" if @password\n # Only show last 4 of token, secr...
[ "0.6286242", "0.6059296", "0.5946817", "0.5946817", "0.5930752", "0.5908452", "0.5880249", "0.55549824", "0.552433", "0.54831904", "0.54419315", "0.5431563", "0.5426153", "0.53933847", "0.5381764", "0.5381119", "0.5380033", "0.5360142", "0.5349474", "0.53467447", "0.5340799",...
0.508037
48
The method used in relro.
def relro return :none unless @elf_file.segment_by_type(:gnu_relro) return :full if dynamic_tag(:bind_now) flags = dynamic_tag(:flags) return :full if flags && (flags.value & ::ELFTools::Constants::DF_BIND_NOW) != 0 flags1 = dynamic_tag(:flags_1) return :full if flags1 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def private; end", "def refutal()\n end", "def probers; end", "def relatorios\n end", "def specie; end", "def specie; end", "def specie; end", "def specie; end", "def schubert; end", "def suivre; end", "def custom; end", "def custom; end", "def r; end", "def r; end", "def rossini; e...
[ "0.76992834", "0.71019346", "0.6996563", "0.6856005", "0.6847232", "0.6847232", "0.6847232", "0.6847232", "0.6722399", "0.6703763", "0.6622469", "0.6622469", "0.64762634", "0.64762634", "0.64703643", "0.63957494", "0.638359", "0.63254577", "0.6307507", "0.627992", "0.6275723"...
0.0
-1
Is this ELF file has canary? Actually judged by if +__stack_chk_fail+ in got symbols.
def canary? @got.respond_to?('__stack_chk_fail') || @symbols.respond_to?('__stack_chk_fail') end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def valid_elf_file?(path)\n # A light-weight way to check if is a valid ELF file\n # Checks at least one phdr should present.\n File.open(path) { |f| ELFTools::ELFFile.new(f).each_segments.first }\n true\n rescue ELFTools::ELFError\n false\n end", "def external_frame?(f)\n !!(...
[ "0.68888384", "0.61224407", "0.6086435", "0.6074105", "0.59867394", "0.5939508", "0.59135467", "0.58053", "0.57794654", "0.5779216", "0.57592094", "0.57571256", "0.5737101", "0.5737101", "0.5703242", "0.56788814", "0.5674128", "0.5673914", "0.5654198", "0.56386817", "0.563462...
0.7780978
0
Is this ELF file a positionindependent executable?
def pie? @elf_file.elf_type == 'DYN' end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def executable_real?() end", "def executable?() end", "def executable?\n sort == ::EXECUTABLE\n end", "def is_executable?(file)\n mime = `file -b --mime-type #{file}`\n mime.start_with?('application/x-executable')\n end", "def executable?\n true\n end", "def executable?\n...
[ "0.7094103", "0.705571", "0.68946064", "0.6881211", "0.67422736", "0.6671741", "0.6619914", "0.6497478", "0.63588125", "0.63523686", "0.6304863", "0.6297226", "0.62709045", "0.62709045", "0.6212056", "0.6212056", "0.61935705", "0.6146743", "0.6100999", "0.60729635", "0.604533...
0.58816826
26
There's too many objects inside, let pry not so verbose.
def inspect "#<Pwnlib::ELF::ELF:#{::Pwnlib::Util::Fiddling.hex(__id__)}>" end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mu_pp(obj); end", "def too_many_hops?; end", "def countUnknown _obj, _args\n \"_obj countUnknown _args;\" \n end", "def countFriendly _obj, _args\n \"_obj countFriendly _args;\" \n end", "def probers; end", "def p!(*objs)\n raise((objs.size < 2 ? objs.first : objs).inspect)\n ...
[ "0.6032287", "0.5906373", "0.5858343", "0.5849008", "0.5822613", "0.57692647", "0.5764609", "0.5747095", "0.5721387", "0.55658895", "0.5453655", "0.5385582", "0.53773695", "0.534597", "0.5341511", "0.533989", "0.5322336", "0.53012085", "0.52648544", "0.52534217", "0.52471465"...
0.0
-1
Returns onegadgets of glibc.
def one_gadgets return @one_gadgets if @one_gadgets gadgets = OneGadget.gadgets(file: @path, details: true, level: 1) @one_gadgets = gadgets.map { |g| g.offset + address } @one_gadgets.instance_variable_set(:@gadgets, gadgets) class << @one_gadgets def [](idx) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gadget\n fetch('doraemon.gadgets')\n end", "def index\n @gadgets = Gadget.all\n end", "def gadget; end", "def gadget; end", "def get_allergy_names\n allergies.map {|a| a.name}\n end", "def bridges_list\n get \"bridges\"\n end", "def index\n @gadget_files = GadgetF...
[ "0.68129504", "0.6025752", "0.5903082", "0.5903082", "0.55741835", "0.5305166", "0.5145887", "0.511616", "0.5004571", "0.49152416", "0.49091002", "0.47750914", "0.47524676", "0.47436005", "0.47312337", "0.46959424", "0.4685232", "0.46680328", "0.4635985", "0.46358854", "0.462...
0.7222669
0
Get the dynamic tag with +type+.
def dynamic_tag(type) dynamic = @elf_file.segment_by_type(:dynamic) || @elf_file.section_by_name('.dynamic') return nil if dynamic.nil? # No dynamic table presents, might be statically linked. dynamic.tag_by_type(type) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tag_value(type)\n pattern = reserved_patterns[type]\n tag = tags.detect { |t| t.match?(pattern) }\n return unless tag\n\n tag.match(pattern)[type]\n end", "def tag\n node.type_id\n end", "def type(type)\n types.each { |t| return t if t.id =~ /^#{Regexp.escape(type)}$...
[ "0.69914526", "0.63334155", "0.6205722", "0.61525345", "0.6112227", "0.6109916", "0.6102558", "0.5965979", "0.58963597", "0.58746785", "0.5824909", "0.5824909", "0.5824909", "0.5788704", "0.5784393", "0.5779396", "0.5774145", "0.57569134", "0.57479554", "0.57351637", "0.57174...
0.81427497
0
magic offset, correct in i386/amd64. Load all plt symbols.
def load_plt # Unlike pwntools-python, which use unicorn emulating instructions to find plt(s). # Here only use section information, which won't find any plt(s) when compile option '-Wl' is enabled. # # The implementation here same as pwntools-python 3.5, and supports i386 and amd64 only...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_symbols\n @symbols = OpenStruct.new\n @elf_file.each_sections do |section|\n next unless section.respond_to?(:symbols)\n\n section.each_symbols do |symbol|\n # Don't care symbols without a name.\n next if symbol.name.empty?\n next if symbol....
[ "0.54220283", "0.5233969", "0.48285007", "0.47145987", "0.46856618", "0.4644766", "0.46377087", "0.46015993", "0.45977378", "0.4588388", "0.45627362", "0.45622322", "0.45198393", "0.45006835", "0.44948262", "0.4492411", "0.44793844", "0.44770768", "0.44761342", "0.44734433", ...
0.6776731
0
Load all exist symbols.
def load_symbols @symbols = OpenStruct.new @elf_file.each_sections do |section| next unless section.respond_to?(:symbols) section.each_symbols do |symbol| # Don't care symbols without a name. next if symbol.name.empty? next if symbol.header.st_val...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_all\n load(*@mappings.keys)\n end", "def load_all; end", "def load_all; end", "def load_all; end", "def symbols_in_program_memory\n @symbol_set.symbols_in_memory(:program_memory)\n end", "def load_queries\n queries = {}\n QUERIES.each do |symbol|\n File.open(QUERIES_PA...
[ "0.6672298", "0.63823277", "0.63823277", "0.63823277", "0.63228714", "0.6060429", "0.6034294", "0.5991559", "0.59709615", "0.59697384", "0.59504604", "0.5928321", "0.5908833", "0.58927506", "0.58871204", "0.5866882", "0.58425426", "0.5811998", "0.580583", "0.5804666", "0.5798...
0.6953296
0
Creates a new film instance
def initialize(slug, details={}, &events) @slug = slug.split("/").last @url = "http://letterboxd.com/film/#{@slug}/" @pulled = false @pulling = false @events = {} # assign each detail to a method details.each do |key, value| # only assign valid attributes to a film ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\t\t\n\t\t@movie = Movie.new\n\tend", "def new\n @movie = Movie.new\n end", "def create\n @movie = Movie.new(movie_params)\n end", "def create\n @movie = Movie.new(movie_params)\n end", "def create\n new_movie = Movie.new\n\n new_movie.title = params[:title]\n new_movie.ye...
[ "0.71408933", "0.7039521", "0.701826", "0.701826", "0.6994255", "0.69421464", "0.68163735", "0.68163735", "0.68163735", "0.68149173", "0.67620194", "0.67451787", "0.6727537", "0.66236967", "0.66230536", "0.6604407", "0.65961754", "0.65275866", "0.6506127", "0.6506127", "0.650...
0.0
-1
Assign events to instance
def on(event, &block) if block_given? if (@@valid_events.include? event) define_singleton_method(event, block) else puts "Error: trying to assign invalid event | Letteropend::Film, event: #{event}" end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def events\n @_events ||= self.class.events.dup\n end", "def events=(_); end", "def events\n @events ||= RubyEvents::Events.new(self)\n end", "def init_event_holders\n @txtout_events = Array.new\n @resmon_events = Array.new\n end", "def events; end", "def events; end", "d...
[ "0.67573416", "0.66960603", "0.66344076", "0.63791007", "0.6363595", "0.6363595", "0.6363595", "0.6363595", "0.6363595", "0.6363595", "0.6363595", "0.6363595", "0.6356987", "0.6308317", "0.62957686", "0.6292205", "0.624226", "0.61992615", "0.6160879", "0.6153788", "0.6103081"...
0.55077577
67
Goes to Letterboxd and pulls html page with nokogiri
def pull_data @pulling = true model_updating # pull the page from the url page = Nokogiri::HTML(open(@url)) # get the title for the film title = page.css("h1.film-title").text define_singleton_method(:title, lambda{title}) # get the runtime for the film runtim...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_page\n @page = Nokogiri::HTML(@browser.html)\n end", "def load_page(uri) # searchText, type\n Nokogiri::HTML(Net::HTTP.get(URI(uri)))\n end", "def get_page\n\tpage = Nokogiri::HTML(open(\"https://coinmarketcap.com/all/views/all/\"))\n\treturn page\nend", "def parse_page\n @doc = N...
[ "0.6580941", "0.65792054", "0.6508216", "0.6504776", "0.6471391", "0.6424649", "0.6424649", "0.6416287", "0.64122695", "0.64122695", "0.64025724", "0.638964", "0.63777757", "0.6375637", "0.6365655", "0.63578063", "0.6349314", "0.6309667", "0.6206388", "0.6192479", "0.6191394"...
0.0
-1
Get the transaction amount
def get_script_hash(*params); raise('Stub or mock required.') end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gettransactionamount\r\n @transactionamount\r\n end", "def amount\n @amount ||= begin\n amount = Txaction.calculate_amount(params[:amount]).to_d.abs\n amount = -amount if params[:amount_type] == 'spent'\n amount\n end\n end", "def get_amount\n\t\t@amount\n\tend", "def amount\n ...
[ "0.86405426", "0.7816963", "0.7666092", "0.74447054", "0.7413214", "0.73885393", "0.73562", "0.7341451", "0.7336479", "0.7331436", "0.72906876", "0.7259266", "0.72542775", "0.72219723", "0.72087413", "0.71851796", "0.7179275", "0.716917", "0.70907015", "0.70844716", "0.707975...
0.0
-1
GET /air_connections GET /air_connections.json
def index @air_connections = AirConnection.all end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @connections = Connection.all(:include => :user)\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @connections }\n end\n end", "def index\n @connections = Connection.all\n end", "def index\n @connections = Connection.all\n end", "d...
[ "0.6664985", "0.6500473", "0.6500473", "0.6333957", "0.63307315", "0.62424195", "0.62346154", "0.60917145", "0.6074119", "0.6029872", "0.59620416", "0.5957343", "0.58914363", "0.57994133", "0.578795", "0.5745939", "0.57430106", "0.57342494", "0.5710657", "0.5695351", "0.56899...
0.759533
0
GET /air_connections/1 GET /air_connections/1.json
def show end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @air_connections = AirConnection.all\n end", "def show\n connection = connection_from_params\n if connection.nil?\n head 404\n else\n render jsonapi: connection_from_params, serializer: Connection::Serializer\n end\n end", "def show\n @connection = Connection.find(para...
[ "0.73007625", "0.6712123", "0.66953623", "0.6630418", "0.65858334", "0.64741325", "0.64741325", "0.62595224", "0.62590885", "0.62281275", "0.613907", "0.6071448", "0.6048948", "0.5984007", "0.5960753", "0.58872944", "0.5878906", "0.5837783", "0.5765056", "0.57642496", "0.5756...
0.0
-1
POST /air_connections POST /air_connections.json
def create @air_connection = AirConnection.new(air_connection_params) respond_to do |format| if @air_connection.save format.html { redirect_to @air_connection, notice: "Air connection was successfully created." } format.json { render :show, status: :created, location: @air_connection } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @connection = Connection.new(connection_params)\n @connection.origin_interface = @interface\n\n respond_to do |format|\n if @connection.save\n format.html { redirect_to device_interfaces_url(@interface.device), notice: 'Connection was successfully created.' }\n format.json ...
[ "0.6301355", "0.61801296", "0.6175456", "0.61667866", "0.6066582", "0.60584897", "0.59954715", "0.5931878", "0.59077877", "0.57690936", "0.57661206", "0.5764946", "0.5745752", "0.5573412", "0.5570004", "0.5484489", "0.5480959", "0.5419958", "0.5398855", "0.536336", "0.5299898...
0.7083078
0
PATCH/PUT /air_connections/1 PATCH/PUT /air_connections/1.json
def update respond_to do |format| if @air_connection.update(air_connection_params) format.html { redirect_to @air_connection, notice: "Air connection was successfully updated." } format.json { render :show, status: :ok, location: @air_connection } else format.html { render :edit ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n respond_to do |format|\n if @connection.update(connection_params)\n format.html { redirect_to @connection, notice: \"Connection was successfully updated.\" }\n format.json { render :show, status: :ok, location: @connection }\n else\n format.html { render :edit, status...
[ "0.62616295", "0.625932", "0.62364763", "0.60631585", "0.6051056", "0.6014539", "0.59876484", "0.59784865", "0.59724504", "0.5761581", "0.57591826", "0.5662922", "0.5660827", "0.5655829", "0.5609215", "0.5608701", "0.55719", "0.55459684", "0.5538344", "0.5516047", "0.5515095"...
0.6630477
0
DELETE /air_connections/1 DELETE /air_connections/1.json
def destroy @air_connection.destroy respond_to do |format| format.html { redirect_to air_connections_url, notice: "Air connection was successfully destroyed." } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @connection.destroy\n respond_to do |format|\n format.html { redirect_to connections_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @connection = Connection.find(params[:id])\n @connection.destroy\n\n respond_to do |format|\n format.html { re...
[ "0.7198307", "0.71550196", "0.71550196", "0.7140771", "0.70448285", "0.6970015", "0.694085", "0.69043523", "0.68523604", "0.6759388", "0.6728772", "0.66047657", "0.6594384", "0.6568223", "0.65634555", "0.6538161", "0.65190774", "0.6508969", "0.6480568", "0.643536", "0.6405865...
0.72033775
0
Use callbacks to share common setup or constraints between actions.
def set_air_connection @air_connection = AirConnection.find(params[:id]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_required_actions\n # TODO: check what fields change to asign required fields\n end", "def action_hook; end", "def run_actions; end", "def define_action_hook; end", "def actions; end", "def define_action_helpers\n if super && action == :save\n @instance_helper_module.class_...
[ "0.6163163", "0.6045976", "0.5946146", "0.591683", "0.5890051", "0.58349305", "0.5776858", "0.5703237", "0.5703237", "0.5652805", "0.5621621", "0.54210985", "0.5411113", "0.5411113", "0.5411113", "0.5391541", "0.53794575", "0.5357573", "0.53402257", "0.53394014", "0.53321576"...
0.0
-1
Only allow a list of trusted parameters through.
def air_connection_params params.require(:air_connection).permit(:origin_airport_id, :destination_airport_id, :aircraft, :distance, :segment_number, :economy_seats, :buisness_seats, :first_class_seats) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def allowed_params\n ALLOWED_PARAMS\n end", "def strong_params\n params.require(:listing_member).permit(param_whitelist)\n end", "def parameters_list_params\n params.require(:parameters_list).permit(:name, :description, :is_user_specific)\n end", "def param_whitelist\n [:role, :title]\...
[ "0.69497335", "0.6812623", "0.6803639", "0.6795365", "0.67448795", "0.67399913", "0.6526815", "0.6518771", "0.64931697", "0.6430388", "0.6430388", "0.6430388", "0.63983387", "0.6356042", "0.63535863", "0.63464934", "0.63444513", "0.6337208", "0.6326454", "0.6326454", "0.63264...
0.0
-1
Add default exceptions handler: print error message to log
def log_errors! if AnyCable.config.debug? # Print error with backtrace in debug mode AnyCable.capture_exception do |e| stack = e.backtrace backtrace = stack ? ":\n#{stack.take(20).join("\n")}" : "" AnyCable.logger.error("#{e.message}#{backtrace}") end el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def log_error(exception); end", "def error_handler(exception)\n puts exception\n end", "def exception_handler; end", "def error_handler\n begin\n yield\n rescue => exception\n options = Rails.env.development? ? {:backtrace => exception.backtrace, :class => exception.class.to_s} : {}\n ...
[ "0.7566581", "0.75490797", "0.71765304", "0.7079568", "0.6985045", "0.69633365", "0.69436234", "0.69136566", "0.6913028", "0.68951046", "0.68699086", "0.669874", "0.65987897", "0.6539804", "0.65297115", "0.6525473", "0.65252507", "0.65251714", "0.65190655", "0.6518078", "0.64...
0.0
-1
GET /stamentacount_details GET /stamentacount_details.json
def index @conciliabank_details = ConciliabankDetail.all end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def count_details\n # TODO respond with xml, only if valid session, otherwise return nil\n team = Team.find_by_id( params[:id] )\n if team\n render json: \"#{I18n.t('meeting.total_attended_meetings')}: \" +\n team.meetings.collect{|row| row.id}.uniq.size.to_s +\n ...
[ "0.65481746", "0.6409173", "0.63452196", "0.629636", "0.62912184", "0.62820077", "0.6139054", "0.60913163", "0.6073779", "0.6017227", "0.6014635", "0.59853786", "0.59720135", "0.59015566", "0.589305", "0.58914334", "0.58895665", "0.58895665", "0.58588576", "0.58539724", "0.58...
0.0
-1
GET /stamentacount_details/1 GET /stamentacount_details/1.json
def show end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show\n @statuspagamento = Statuspagamentoe.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @statuspagamento }\n end\n end", "def showdetails\r\n @salle = Salle.find(params[:id])\r\n\r\n respond_to do |format|\r\n format.ht...
[ "0.6492629", "0.6468401", "0.6384369", "0.6288174", "0.625325", "0.6228483", "0.61934805", "0.6170052", "0.61267763", "0.61053187", "0.6059731", "0.6043762", "0.60303694", "0.60267276", "0.6021708", "0.6009111", "0.60049033", "0.5997218", "0.59742165", "0.5971549", "0.5969785...
0.0
-1
POST /stamentacount_details POST /stamentacount_details.json
def create @conciliabank_detail = ConciliabankDetail.new(conciliabank_detail_params) @conciliabank_detail.conciliabank_id = @conciliabank.id respond_to do |format| if @conciliabank_detail.save @conciliabank_detail[:cargo] = @conciliabank.get_subtotal("cargos") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @filament_count = FilamentCount.new(filament_count_params)\n\n respond_to do |format|\n if @filament_count.save\n format.html { redirect_to @filament_count, notice: 'Filament count was successfully created.' }\n format.json { render :show, status: :created, location: @filament...
[ "0.601071", "0.5982438", "0.58497787", "0.58466303", "0.58285916", "0.58236206", "0.57734364", "0.57699335", "0.5735195", "0.57331514", "0.565128", "0.56374514", "0.56238145", "0.56132275", "0.5608527", "0.5608489", "0.5603329", "0.55959666", "0.5577808", "0.55757815", "0.556...
0.0
-1
PATCH/PUT /stamentacount_details/1 PATCH/PUT /stamentacount_details/1.json
def update respond_to do |format| if @conciliabank_detail.update(conciliabank_detail_params) @conciliabank_detail[:cargo] = @conciliabank.get_subtotal("cargos") @conciliabank_detail[:abono] = @conciliabank.get_subtotal("abonos") @conciliabank[:saldo_final] = @conciliabank[:sa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n respond_to do |format|\n if @filament_count.update(filament_count_params)\n format.html { redirect_to @filament_count, notice: 'Filament count was successfully updated.' }\n format.json { render :show, status: :ok, location: @filament_count }\n else\n format.html { re...
[ "0.6418514", "0.63193893", "0.62144613", "0.6129086", "0.6099314", "0.60610175", "0.60454893", "0.6031501", "0.6029785", "0.60184675", "0.6012647", "0.6006675", "0.59945697", "0.5993622", "0.5969591", "0.5961761", "0.59561443", "0.5955075", "0.59518266", "0.5949564", "0.59495...
0.5797848
71
DELETE /stamentacount_details/1 DELETE /stamentacount_details/1.json
def destroy if @conciliabank_detail.destroy @conciliabank[:saldo_final] = @conciliabank[:saldo_inicial] - @conciliabank.get_subtotal("cargos") + @conciliabank.get_subtotal("abonos") @conciliabank.update_attributes(:saldo_final=> @conciliabank[:saldo_final]) flash[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @detail = Detail.find(params[:id])\n @detail.destroy\n\n\n respond_to do |format|\n format.html { redirect_to new_detail_path }\n format.json { head :no_content }\n end\n end", "def destroy\n @summary.destroy\n respond_to do |format|\n format.html { redirect_to sum...
[ "0.7174936", "0.7150048", "0.71220404", "0.706093", "0.7025681", "0.7009972", "0.6998428", "0.69959134", "0.69934773", "0.69912064", "0.6975225", "0.697119", "0.69706553", "0.696514", "0.6958271", "0.6957087", "0.6953833", "0.694693", "0.6936312", "0.6933395", "0.6933079", ...
0.0
-1
Use callbacks to share common setup or constraints between actions.
def set_conciliabank @conciliabank = Conciliabank.find(params[:conciliabank_id]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_required_actions\n # TODO: check what fields change to asign required fields\n end", "def action_hook; end", "def run_actions; end", "def define_action_hook; end", "def actions; end", "def define_action_helpers\n if super && action == :save\n @instance_helper_module.class_...
[ "0.6163163", "0.6045976", "0.5946146", "0.591683", "0.5890051", "0.58349305", "0.5776858", "0.5703237", "0.5703237", "0.5652805", "0.5621621", "0.54210985", "0.5411113", "0.5411113", "0.5411113", "0.5391541", "0.53794575", "0.5357573", "0.53402257", "0.53394014", "0.53321576"...
0.0
-1
Never trust parameters from the scary internet, only allow the white list through.
def conciliabank_detail_params params.require(:conciliabank_detail).permit(:fecha, :tipomov_id, :cargo, :abono, :concepto, :nrocheque) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def strong_params\n params.require(:user).permit(param_whitelist)\n end", "def strong_params\n params.require(:listing_member).permit(param_whitelist)\n end", "def allow_params_authentication!; end", "def allowed_params\n ALLOWED_PARAMS\n end", "def default_param_whitelist\n [\"mode\"]\n...
[ "0.69792545", "0.6781151", "0.67419964", "0.674013", "0.6734356", "0.6591046", "0.6502396", "0.6496313", "0.6480641", "0.6477825", "0.64565", "0.6438387", "0.63791263", "0.63740575", "0.6364131", "0.63192815", "0.62991166", "0.62978333", "0.6292148", "0.6290449", "0.6290076",...
0.0
-1
If success: 1. AccountsMailerwelcome (throught 10 minutes) 2. AccountsMaileremail_confirmation 3. AdminMailernew_registration
def create @account = Account.new(account_params) respond_to do |format| if @account.save format.html { send_emails_after_create_and_redirect } else format.html { render :new } end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def admin_notify\n UserMailer.signup_notification(self).deliver_later!(wait: 1.minute)\n end", "def send_activation_or_reset_mail\n end", "def after_confirmation # Send welcome mail after user is successfully registered\n send_user_mail\n end", "def send_signup_notification\n deliver_ac...
[ "0.6861275", "0.6783999", "0.67784864", "0.6696721", "0.66867006", "0.6653439", "0.6614353", "0.6608267", "0.6601683", "0.6558464", "0.6525151", "0.652256", "0.65016985", "0.64772785", "0.64744055", "0.64468944", "0.64201736", "0.64082855", "0.64053994", "0.6404574", "0.64033...
0.0
-1
If Email changed: 1. Email becomes unconfirmed 2. Send AccountsMaileremail_confirmation
def update respond_to do |format| if @account.update(account_params) unconfirm_email && send_email_confirmation if new_email? format.html { redirect_to data_path } else format.html { render :edit } end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def maybe_deliver_email_confirmation!(controller)\n if email_changed_previously?\n deliver_email_confirmation! controller\n true\n else\n false\n end\n end", "def email_changed_notification\n if self.email_changed? and (self.email != self.temp)\n self.token = self.class.make_toke...
[ "0.80764055", "0.78640455", "0.7669647", "0.7591811", "0.7591811", "0.7539452", "0.75140053", "0.74831843", "0.74715734", "0.7466186", "0.7454465", "0.74425894", "0.7435885", "0.7423404", "0.73544246", "0.7339964", "0.73303455", "0.73073816", "0.72700804", "0.7250964", "0.724...
0.6529477
90
backend code for pages/home
def home following = Array.new #checks the database for who the user is following. for @f in current_user.following do following.push(@f.id) end #only posts from users in the following array are collected. @posts = Post.all.where("user_id = ?", following) @newPost = Post.new end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def homepage\n end", "def homepage\n end", "def home\n\t\t# Home Page\n\tend", "def homepage\n end", "def homepage\n end", "def home\r\n \r\n end", "def home; end", "def home\n end", "def home\n end", "def home\n end", "def home\n end", "def home\n\t\t\n\tend", "def ...
[ "0.7827458", "0.7827458", "0.78029096", "0.7748833", "0.7748833", "0.7633302", "0.75348604", "0.7510889", "0.7510889", "0.7510889", "0.7510889", "0.7507489", "0.7507489", "0.7461934", "0.7429554", "0.7387946", "0.7387946", "0.7387946", "0.7387946", "0.73877186", "0.73877186",...
0.0
-1
backend code for pages/profile
def profile # grab the username from the URL as :id if (User.find_by_username(params[:id])) @username = params[:id] else # redirect to root redirect_to root_path, :notice=> "User not found!" end #only posts by that specific user are collected from the database @posts = P...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def profile\n\n end", "def profile\n \n end", "def profile\n end", "def profile\n end", "def profile\n end", "def profile\n end", "def profile\n end", "def profile\n end", "def myprofile\n \n end", "def manage_profile\n begin\n @has_link_access = true\n if ...
[ "0.77576935", "0.7717316", "0.77117103", "0.77117103", "0.77117103", "0.77117103", "0.77117103", "0.77117103", "0.7285149", "0.7222826", "0.7160537", "0.710853", "0.710358", "0.6965076", "0.6965076", "0.6889922", "0.6811917", "0.68020415", "0.68020415", "0.6801952", "0.678413...
0.0
-1
backend code for pages/explore
def explore #all posts are collected from the database @posts = Post.all @newPost = Post.new end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def page; end", "def page; end", "def page; end", "def page; end", "def page; end", "def page; end", "def page; end", "def page; end", "def page; end", "def page; end", "def page; end", "def page; end", "def pages; end", "def pages\n end", "def page\n\n end", "def page; self end", ...
[ "0.72159576", "0.72159576", "0.72159576", "0.72159576", "0.72159576", "0.72159576", "0.72159576", "0.72159576", "0.72159576", "0.72159576", "0.72159576", "0.72159576", "0.69503516", "0.6822869", "0.6788639", "0.6616359", "0.65477765", "0.6496891", "0.6496891", "0.648243", "0....
0.0
-1
add route in the routes
def addRoute(id, likes, dislikes) @routes.push({:id => id, :likes => likes, :dislikes => dislikes}) averageRanking = likes * 1.0 / (likes + dislikes) totalRanking = 0 for i in 0..(@averageRank.count) totalRanking = totalRanking + averageRanking end average = (totalRanking + averageRanking) / totalR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_route(route)\n @routes << route\n route\n end", "def add_route(*args)\n custom_routes << args\n end", "def add_route(*p, &b)\n @routes ||= routes.dup\n @routes.route(*p, &b)\n end", "def add(new)\n @routes << new\n end", "def add_route( verb, path, route )\n\t\tre = Re...
[ "0.79578084", "0.7784945", "0.7777993", "0.7764368", "0.7527066", "0.75023293", "0.7448169", "0.744112", "0.7407885", "0.73927414", "0.73927414", "0.7336456", "0.73074186", "0.7304935", "0.72638375", "0.72418606", "0.72418606", "0.72418606", "0.72418606", "0.72418606", "0.724...
0.0
-1
sort route by average ranking and return the sourted routes
def sort for j in 1..(@averageRank.count-1) key = @averageRank[j][:average] key_id = @averageRank[j][:id] i = j - 1 while i >= 0 && @averageRank[i][:average] < key do @averageRank[i+1] = @averageRank[i] i = i - 1 end @averageRank[i+1] = {:average => key, :id => key_id} end return @...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sort_by_rating(nearby_places)\n nearby_places.sort_by! {|place| place.values[0][:rating]}\n\n nearby_places.reverse\nend", "def avg_route_difficulty area\n avg = 0.0\n keine_angabe = 0\n area.routes.each { |r| \n keine_angabe += 1 unless uiaa_grades.index(r.grade) > 0\n ...
[ "0.6274828", "0.6209442", "0.6020283", "0.601928", "0.58713025", "0.5772728", "0.5686474", "0.5684429", "0.5669193", "0.55659485", "0.55437714", "0.55298334", "0.5505535", "0.5465914", "0.5462287", "0.5430279", "0.5416273", "0.5410403", "0.5408839", "0.54034626", "0.537578", ...
0.5742094
6
note that immediately a user clicks d buynow button we are notified immediately.this controller's notify method is called back as defined in ur routes.rb file and as specified in d buy now form. add typhoeus,yajlruby to gem file,update ur route.rb eg match '/notify', :to => 'notificationsnotify', :as=>"notification_url...
def notify @transaction_id = params[:transaction_id] do_notify end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def send_notification\n\n\n end", "def notifications\n end", "def ipn_notification\n @params = params\n ipn = PaypalAdaptive::IpnNotification.new\n ipn.send_back(env['rack.request.form_vars'])\n if ipn.verified?\n @payment= PaymentDetail.new \n @payment.transaction_id = params[\"tr...
[ "0.6708138", "0.64588046", "0.64362705", "0.633393", "0.62985396", "0.62459564", "0.62314314", "0.6221679", "0.62170666", "0.6172942", "0.6114108", "0.6102045", "0.60607684", "0.60586697", "0.6054076", "0.60299104", "0.60208786", "0.5979271", "0.59094435", "0.5899933", "0.589...
0.0
-1
GET /roombots/1 GET /roombots/1.json
def show @roombot = Roombot.find(params[:id]) respond_to do |format| format.html # show.html.erb format.json { render json: @roombot } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @roombot = Roombot.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @roombot }\n end\n end", "def room_descriptions_method\r\n my_port = 8081\r\n htttproomnumber = $roomnumber\r\n roomsNtext = \"/#{htttproo...
[ "0.6967724", "0.6481098", "0.64768505", "0.6441064", "0.63709295", "0.63524634", "0.6292288", "0.62591743", "0.62585855", "0.62585855", "0.62585855", "0.6249713", "0.62404895", "0.6169591", "0.6133257", "0.61182874", "0.6089097", "0.6082337", "0.60410243", "0.6014471", "0.600...
0.7426516
0
GET /roombots/new GET /roombots/new.json
def new @roombot = Roombot.new respond_to do |format| format.html # new.html.erb format.json { render json: @roombot } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @serverroom = Serverroom.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @serverroom }\n end\n end", "def new\n @room = Room.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @room }\n ...
[ "0.7597024", "0.7586095", "0.7586095", "0.7586095", "0.7586095", "0.7586095", "0.7586095", "0.7551047", "0.7546739", "0.7473391", "0.7404163", "0.7344363", "0.7344363", "0.7250068", "0.7143183", "0.7137924", "0.71342224", "0.70814484", "0.7009097", "0.70014465", "0.69711393",...
0.8181133
0
POST /roombots POST /roombots.json
def create @roombot = Roombot.new(params[:roombot]) respond_to do |format| if @roombot.save format.html { redirect_to @roombot, notice: 'Roombot was successfully created.' } format.json { render json: @roombot, status: :created, location: @roombot } else format.html { render...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @roombot = Roombot.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @roombot }\n end\n end", "def create\n @room = Room.new(params[:room])\n\n if @room.save\n render :json => @room, :status => :created, :location => @room\n else\...
[ "0.65421516", "0.6342124", "0.6324309", "0.63113546", "0.62862456", "0.6189565", "0.61673486", "0.61517197", "0.61270064", "0.6101769", "0.6022901", "0.6022901", "0.59956974", "0.59900737", "0.59647447", "0.5937864", "0.5929619", "0.5919583", "0.5900642", "0.5900642", "0.5900...
0.73714644
0
PUT /roombots/1 PUT /roombots/1.json
def update @roombot = Roombot.find(params[:id]) respond_to do |format| if @roombot.update_attributes(params[:roombot]) format.html { redirect_to @roombot, notice: 'Roombot was successfully updated.' } format.json { head :no_content } else format.html { render action: "edit" ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n @room = Room.find(params[:id])\n\n if @room.update_attributes(params[:room])\n head :ok\n else\n render :json => @room.errors, :status => :unprocessable_entity \n end\n end", "def update\n if @room.update(room_params)\n head :no_content\n else\n render json: @r...
[ "0.6642186", "0.6519652", "0.6488228", "0.64010745", "0.6279128", "0.6271072", "0.6207832", "0.61701274", "0.6167093", "0.6120756", "0.6100272", "0.6076576", "0.60309863", "0.59882385", "0.5927061", "0.592493", "0.59095377", "0.5908029", "0.58986", "0.5895727", "0.5894071", ...
0.7104252
0
DELETE /roombots/1 DELETE /roombots/1.json
def destroy @roombot = Roombot.find(params[:id]) @roombot.destroy respond_to do |format| format.html { redirect_to roombots_url } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @bot = Bot.find(params[:id])\n @bot.destroy\n\n respond_to do |format|\n format.html { redirect_to bots_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @chat_room.destroy\n\n respond_to do |format|\n format.html { redirect_to chat_rooms_url }\...
[ "0.7339985", "0.69926685", "0.6975979", "0.6964853", "0.6956193", "0.6946178", "0.6944143", "0.6921289", "0.6885672", "0.6876208", "0.68276566", "0.68217814", "0.6810671", "0.68105936", "0.6793924", "0.6789472", "0.6774089", "0.67628884", "0.6751881", "0.6719285", "0.6715848"...
0.79043037
0
puts checkSum([1, 2, 3, 4, 5], 4) A = [4,3,1,4,5,3,5,10] and sum = 11 return true if there are 2 int in the array A can add up to sum; otherwise return false time complexity ~ nlog(n) space complexity ~ heap memory (n)
def checkSum(array, sum) if array.nil? or array.empty? return false else sortedArray = [] sortedArray = array.sort # n*log(n) length = sortedArray.count rightPointer = length - 1 leftPointer = 0 result = false while leftPointer < rightPointer ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bad_two_sum?(arr, target_sum) #O(n^2)\n (0...arr.length).each do |i|\n (i+1...arr.length).each do |j|\n return true if arr[i] + arr[j] == target_sum\n end\n end\n false\nend", "def sum_to_n? arr, n\n #arr.product(arr).any? {|c| sum(c) == n && c[0] != c[1] } ----1.3\n arr = arr.sort\n low ...
[ "0.79421765", "0.78386617", "0.7812766", "0.7758477", "0.77427995", "0.77335674", "0.77294225", "0.7699643", "0.7695859", "0.7685212", "0.7682538", "0.7668967", "0.7665634", "0.7638484", "0.76303947", "0.7625632", "0.76241237", "0.7621834", "0.76204884", "0.7590366", "0.75799...
0.79416984
1
acl [flags] [operator] ... Declare or complete an access list. May be used in sections : defaults | frontend | listen | backend no | yes | yes | yes Example: acl invalid_src src 0.0.0.0/7 224.0.0.0/3 acl invalid_src src_port 0:1023 acl local_dst hdr(host) i localhost See section 7 about ACL usage.
def acl(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "acl " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def effective_acl(parsed_labels=[])\n acl\n end", "def conf_acl\n ace = $ts.dut.call(\"mesa_ace_init\", \"MESA_ACE_TYPE_ANY\")\n ace[\"id\"] = 1\n action = ace[\"action\"]\n action[\"port_action\"] = \"MESA_ACL_PORT_ACTION_REDIR\"\n action[\"port_list\"] = \"#{$port_list[0]}\"\n ace[\"p...
[ "0.67493206", "0.67466664", "0.6571179", "0.65634096", "0.6444603", "0.6414731", "0.6372042", "0.6348217", "0.6205802", "0.61642414", "0.61616826", "0.61289966", "0.61289966", "0.6112961", "0.6065413", "0.6059047", "0.60282195", "0.6023319", "0.6007082", "0.6005223", "0.60046...
0.687706
0
bind []: [, ...] bind []: [, ...] interface bind []: [, ...] mss bind []: [, ...] transparent bind []: [, ...] id bind []: [, ...] name bind []: [, ...] deferaccept bind []: [, ...] acceptproxy bind / [, ...] bind / [, ...] mode bind / [, ...] [ user | uid ] bind / [, ...] [ group | gid ] Define one or several listenin...
def bind(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "bind " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bind(host, port = 0)\n @bind_host = host\n @bind_port = port\n end", "def bind(host, port)\n @bind_host = host\n @bind_port = port\n end", "def bind_to_activated_sockets(bind = T.unsafe(nil)); end", "def bind(*) end", "def configure_socket(options, env)\n bind =...
[ "0.6988143", "0.67536914", "0.67316", "0.67079866", "0.66825765", "0.6641307", "0.6425533", "0.64045537", "0.6203619", "0.61837894", "0.61811405", "0.6096755", "0.6064458", "0.6064458", "0.60400486", "0.60396844", "0.5971752", "0.5969472", "0.59685844", "0.5946865", "0.591362...
0.626622
8
capture cookie len Capture and log a cookie in the request and in the response. May be used in sections : defaults | frontend | listen | backend no | yes | yes | no Arguments : is the beginning of the name of the cookie to capture. In order to match the exact name, simply suffix the name with an equal sign ('='). The f...
def capture_cookie(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "capture cookie " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cookie_hash_length\n super\n end", "def inspect\n \"#<CGI::Cookie: #{self.to_s.inspect}>\"\n end", "def collect_cookies_from_response; end", "def show_cookies\n if request.post? || params[:who] == 'peter'\n ls = cookies[LIFESIZE_COOKIE]\n if ls\n @cookie_value = JSON.p...
[ "0.56386775", "0.5450616", "0.5420307", "0.541283", "0.5335003", "0.52834153", "0.52492344", "0.52106076", "0.5188208", "0.51853305", "0.51427907", "0.51293844", "0.5095516", "0.5073049", "0.50607663", "0.5041523", "0.50372756", "0.4989865", "0.49714938", "0.49714938", "0.497...
0.6477185
0
id Set a persistent ID to a proxy. May be used in sections : defaults | frontend | listen | backend no | yes | yes | yes Arguments : none Set a persistent ID for the proxy. This ID must be unique and positive. An unused ID will automatically be assigned if unset. The first assigned value will be 1. This ID is currently...
def persistent_id(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "id " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_id(id)\n unless id.nil?\n @id = id\n end\n @id\n end", "def id=(v)\r\n @id = v\r\n end", "def id=(value)\n @id = value\n end", "def id=(value)\n @id = value\n end", "def id=(value)\n @id = value\n e...
[ "0.68630767", "0.67549103", "0.6681997", "0.6681997", "0.6681997", "0.6681997", "0.6681997", "0.6681997", "0.6681997", "0.65197676", "0.6462914", "0.6446187", "0.63963866", "0.6345291", "0.6343384", "0.6337245", "0.63274825", "0.63274825", "0.63274825", "0.63274825", "0.63274...
0.6803373
1
redirect location [code ] [(if | unless) ] redirect prefix [code ] [(if | unless) ] Return an HTTP redirection if/unless a condition is matched May be used in sections : defaults | frontend | listen | backend no | yes | yes | yes If/unless the condition is matched, the HTTP request will lead to a redirect response. If ...
def redirect(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "redirect " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def redirect(location, status = '302'); request.redirect(location, status); end", "def redirect\n if !params[:redirect].blank? && redirection = Redirect.find_by_redirect_url(params[:redirect])\n query_string = URI.parse(request.url).query rescue nil\n redirect = query_string.blank? ? redirection.url...
[ "0.70428455", "0.67988104", "0.67931074", "0.6778719", "0.6706352", "0.6586971", "0.65831536", "0.65279204", "0.6452172", "0.6445682", "0.64307934", "0.64124787", "0.64068586", "0.6362905", "0.6362905", "0.6361802", "0.6361214", "0.633983", "0.63029635", "0.6299886", "0.62895...
0.0
-1
reqadd [(if | unless) ] Add a header at the end of the HTTP request May be used in sections : defaults | frontend | listen | backend no | yes | yes | yes Arguments : is the complete line to be added. Any space or known delimiter must be escaped using a backslash ('\'). Please refer to section 6 about HTTP header manipu...
def reqadd(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "reqadd " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_headers; end", "def add_headers\n @headers.each do |field, value|\n @request_header << \"#{field}: #{value}\"\n end\n end", "def add_headers(current_string)\n return current_string if @headers.nil?\n string_headers = @headers.map { |k, v| \" -H '#{k}:#{v}' \" }.join(\"...
[ "0.6249891", "0.6003389", "0.5963309", "0.59345573", "0.5824031", "0.5817432", "0.5759948", "0.5751788", "0.5691498", "0.56503046", "0.5619861", "0.5591335", "0.5583971", "0.55774665", "0.55773073", "0.5541635", "0.54699445", "0.5434062", "0.5409535", "0.5389786", "0.53871304...
0.5757036
7
reqallow [(if | unless) ] reqiallow [(if | unless) ] (ignore case) Definitely allow an HTTP request if a line matches a regular expression May be used in sections : defaults | frontend | listen | backend no | yes | yes | yes Arguments : is the regular expression applied to HTTP headers and to the request line. This is ...
def reqallow(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "reqallow " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def url_allowlist; end", "def url_allowlist=(_arg0); end", "def match(req)\n end", "def acceptable_request!(env)\n case Halcyon.config[:allow_from].to_sym\n when :all\n # allow every request to go through\n when :halcyon_clients\n # only allow Halcyon clients\n raise Exce...
[ "0.6145977", "0.6087625", "0.59965926", "0.58963615", "0.5862099", "0.57849073", "0.5681396", "0.5655004", "0.5632282", "0.5620649", "0.56048644", "0.5604146", "0.5516354", "0.54931986", "0.5492846", "0.5486541", "0.5485615", "0.54765975", "0.5465744", "0.5464669", "0.5462595...
0.61584795
0
reqdel [(if | unless) ] reqidel [(if | unless) ] (ignore case) Delete all headers matching a regular expression in an HTTP request May be used in sections : defaults | frontend | listen | backend no | yes | yes | yes Arguments : is the regular expression applied to HTTP headers and to the request line. This is an exten...
def reqdel(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "reqdel " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def head_re(pattern, &hndlr)\n @j_del.headWithRegEx(pattern) { |j_req| hndlr.call(HttpServerRequest.new(j_req)) }\n end", "def delete_empty_headers(res)\n res[1].delete_if{|_, v| v.is_a?(String) && v.empty?}\n res\n end", "def strip_headers\n %w(return-receipt-to domaink...
[ "0.5927491", "0.59236914", "0.5841575", "0.5818984", "0.56924343", "0.56823236", "0.564638", "0.5606568", "0.5543939", "0.55265325", "0.54994416", "0.54829466", "0.548125", "0.54679704", "0.54507035", "0.54313874", "0.5410748", "0.5337399", "0.533128", "0.5330461", "0.5313396...
0.5799324
4
reqdeny [(if | unless) ] reqideny [(if | unless) ] (ignore case) Deny an HTTP request if a line matches a regular expression May be used in sections : defaults | frontend | listen | backend no | yes | yes | yes Arguments : is the regular expression applied to HTTP headers and to the request line. This is an extended re...
def reqdeny(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "reqdeny " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rspdeny(params = nil)\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"rspdeny \" + params.to_s + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n end\n end", "def url_allowlist=(_arg0); end", "def url_allowlist; end"...
[ "0.5922046", "0.5863939", "0.585894", "0.58442813", "0.5781187", "0.57579094", "0.56982934", "0.56431615", "0.56221735", "0.5526119", "0.5493521", "0.5493398", "0.5455111", "0.5445175", "0.5434851", "0.54134184", "0.536397", "0.53621113", "0.53574455", "0.5353594", "0.5340869...
0.63083184
0
reqpass [(if | unless) ] reqipass [(if | unless) ] (ignore case) Ignore any HTTP request line matching a regular expression in next rules May be used in sections : defaults | frontend | listen | backend no | yes | yes | yes Arguments : is the regular expression applied to HTTP headers and to the request line. This is a...
def reqpass(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "reqpass " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def match(req)\n end", "def filter_request(req)\n @authenticator.each do |auth|\n next unless auth.set? # hasn't be set, don't use it\n if cred = auth.get(req)\n if cred == :skip\n # some authenticator (NTLM and Negotiate) does not\n # need to send extra header ...
[ "0.56982625", "0.5522463", "0.55050886", "0.545292", "0.5448882", "0.53347605", "0.5297022", "0.5296708", "0.5259509", "0.525517", "0.52452254", "0.5216849", "0.5215538", "0.52066094", "0.52022624", "0.5181692", "0.51608545", "0.51302946", "0.5126483", "0.51169306", "0.510896...
0.5134222
17
reqrep [(if | unless) ] reqirep [(if | unless) ] (ignore case) Replace a regular expression with a string in an HTTP request line May be used in sections : defaults | frontend | listen | backend no | yes | yes | yes Arguments : is the regular expression applied to HTTP headers and to the request line. This is an extend...
def reqrep(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "reqrep " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def patch_re(pattern, &hndlr)\n @j_del.patchWithRegEx(pattern) { |j_req| hndlr.call(HttpServerRequest.new(j_req)) }\n end", "def head_re(pattern, &hndlr)\n @j_del.headWithRegEx(pattern) { |j_req| hndlr.call(HttpServerRequest.new(j_req)) }\n end", "def match(req)\n end", "def conditional_requ...
[ "0.5715626", "0.5707676", "0.56208307", "0.5323239", "0.5292776", "0.52858126", "0.510855", "0.50546134", "0.5052188", "0.5009535", "0.5007037", "0.4989007", "0.49865088", "0.4983313", "0.49826583", "0.49756664", "0.49578047", "0.48999196", "0.48981476", "0.4887973", "0.48745...
0.5625651
2
reqtarpit [(if | unless) ] reqitarpit [(if | unless) ] (ignore case) Tarpit an HTTP request containing a line matching a regular expression May be used in sections : defaults | frontend | listen | backend no | yes | yes | yes Arguments : is the regular expression applied to HTTP headers and to the request line. This is...
def reqtarpit(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "reqtarpit " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def match(req)\n end", "def conditional_requests=(_arg0); end", "def set_request_from_bot_flag\n res = http_user_agent.match(/\\b(Baidu|Baiduspider|Gigabot|Googlebot|thefind|webmeup-crawler.com|libwww-perl|lwp-trivial|msnbot|SiteUptime|Slurp|ZIBB|wget|ia_archiver|ZyBorg|bingbot|AdsBot-Google|AhrefsBot|FatB...
[ "0.59841216", "0.5876246", "0.585789", "0.585789", "0.585789", "0.56228465", "0.56228465", "0.5546882", "0.5533186", "0.5532001", "0.5368206", "0.5270743", "0.5260497", "0.5222638", "0.5198931", "0.51957923", "0.5129314", "0.51283145", "0.5127976", "0.5104663", "0.5080338", ...
0.4861078
40
rspadd [(if | unless) ] Add a header at the end of the HTTP response May be used in sections : defaults | frontend | listen | backend no | yes | yes | yes Arguments : is the complete line to be added. Any space or known delimiter must be escaped using a backslash ('\'). Please refer to section 6 about HTTP header manip...
def rspadd(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "rspadd " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_headers; end", "def add_headers(current_string)\n return current_string if @headers.nil?\n string_headers = @headers.map { |k, v| \" -H '#{k}:#{v}' \" }.join(\"\")\n current_string + string_headers\n end", "def header(str)\n # {{{\n if @output_started\n raise \"HTTP-H...
[ "0.65501356", "0.6051181", "0.5972791", "0.5897582", "0.58486545", "0.5839632", "0.56836885", "0.5681854", "0.56376535", "0.56346506", "0.5628348", "0.56047297", "0.5592573", "0.5567937", "0.5540674", "0.55083233", "0.55028135", "0.5498465", "0.549828", "0.5488629", "0.548328...
0.5153266
76
rspdel [(if | unless) ] rspidel [(if | unless) ] (ignore case) Delete all headers matching a regular expression in an HTTP response May be used in sections : defaults | frontend | listen | backend no | yes | yes | yes Arguments : is the regular expression applied to HTTP headers and to the response line. This is an ext...
def rspdel(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "rspdel " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete_empty_headers(res)\n res[1].delete_if{|_, v| v.is_a?(String) && v.empty?}\n res\n end", "def remove_headers!\n response.headers['sid'] = nil\n response.headers['utoken'] = nil\n end", "def delete_response_header(key)\n new(\n response_headers: ConnSupport:...
[ "0.6227533", "0.6116389", "0.574124", "0.5702534", "0.5694777", "0.5597199", "0.55653894", "0.5556911", "0.55139834", "0.5505129", "0.54890704", "0.5464929", "0.54435295", "0.53973144", "0.538094", "0.5318966", "0.5272224", "0.5272224", "0.5249136", "0.52396464", "0.5234938",...
0.550795
9
rspdeny [(if | unless) ] rspideny [(if | unless) ] (ignore case) Block an HTTP response if a line matches a regular expression May be used in sections : defaults | frontend | listen | backend no | yes | yes | yes Arguments : is the regular expression applied to HTTP headers and to the response line. This is an extended...
def rspdeny(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "rspdeny " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def forbidden_response(env)\n if head_request?(env)\n [ 403, { \"content-type\" => \"text/plain\", \"content-length\" => \"0\" }, [] ]\n else\n [ 403, { \"content-type\" => \"text/plain\", \"content-length\" => \"9\" }, [ \"Forbidden\" ] ]\n end\n end", "def passive\n\...
[ "0.63062763", "0.6276659", "0.60433626", "0.59263325", "0.57369965", "0.5695154", "0.5594332", "0.55495965", "0.55175966", "0.55124414", "0.5510133", "0.5504362", "0.54899716", "0.5438712", "0.5425718", "0.5424516", "0.53767544", "0.53646296", "0.5333245", "0.5303819", "0.530...
0.6242801
2
rsprep [(if | unless) ] rspirep [(if | unless) ] (ignore case) Replace a regular expression with a string in an HTTP response line May be used in sections : defaults | frontend | listen | backend no | yes | yes | yes Arguments : is the regular expression applied to HTTP headers and to the response line. This is an exte...
def rspirep(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "rspirep " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rewrite(response)\n body = ''\n response.each{ |s| body << s.to_s }\n [body.gsub(PATTERN, '\\\\1\\\\2?\\\\3')]\n end", "def patch_re(pattern, &hndlr)\n @j_del.patchWithRegEx(pattern) { |j_req| hndlr.call(HttpServerRequest.new(j_req)) }\n end", "def run(req, res)\n to_run = match(req)\n...
[ "0.5738687", "0.5303186", "0.5286975", "0.5274767", "0.51685363", "0.5151826", "0.51491845", "0.51088667", "0.50520927", "0.49881238", "0.49512225", "0.49506018", "0.49150476", "0.4906345", "0.48967147", "0.4889949", "0.487192", "0.4860373", "0.48579597", "0.4835436", "0.4810...
0.49839777
10
tcprequest inspectdelay Set the maximum allowed time to wait for data during content inspection May be used in sections : defaults | frontend | listen | backend no | yes | yes | yes Arguments : is the timeout value specified in milliseconds by default, but can be in any other unit if the number is suffixed by the unit,...
def tcp_request_inspect_delay(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "tcp-request inspect-delay " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tcp_response_inspect_delay(params = nil)\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"tcp-response inspect-delay \" + params.to_s + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n end\n end", "def test_connect_time...
[ "0.6134461", "0.56197196", "0.55067843", "0.53514737", "0.5342525", "0.5309033", "0.5183574", "0.5116141", "0.5101734", "0.5034408", "0.4981904", "0.4963279", "0.49456567", "0.49326327", "0.49255782", "0.49224278", "0.49167746", "0.49123213", "0.4900231", "0.48941356", "0.489...
0.6352649
0
use_backend if use_backend unless Switch to a specific backend if/unless an ACLbased condition is matched. May be used in sections : defaults | frontend | listen | backend no | yes | yes | no Arguments : is the name of a valid backend or "listen" section. is a condition composed of ACLs, as described in section 7. When...
def use_backend(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "use_backend " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def backend=(backend); end", "def add_backend(backend)\n hash = fetcher.client.post(\"#{Director.put_path(self)}/backend/#{backend.name}\")\n !hash.nil?\n end", "def backend\n @backend ||= Configurator.new(self, :backend)\n end", "def set_backend(val)\n end", "def enable_backend\n ...
[ "0.62597877", "0.6171045", "0.61057305", "0.60474443", "0.60446876", "0.5971875", "0.59574145", "0.5942606", "0.5923958", "0.5923958", "0.58561695", "0.5828212", "0.57601583", "0.57491326", "0.57088196", "0.56641626", "0.5602009", "0.55307835", "0.5462744", "0.54582304", "0.5...
0.6462224
0
description Add a text that describes the instance. Please note that it is required to escape certain characters ( for example) and this text is inserted into a html page so you should avoid using "" characters.
def description(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "description " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def description; @text; end", "def text\n self.title + \" -- \" + self.description\n end", "def description(text)\n content_for(:description) { text }\n end", "def description(text)\n content_for(:description) { text }\n end", "def description\n @description = \"Espresso\"\n end", "def de...
[ "0.76979774", "0.76070464", "0.72707355", "0.72697127", "0.717895", "0.7137823", "0.7122164", "0.71200997", "0.71004856", "0.7083653", "0.70361114", "0.7013962", "0.7004421", "0.6999896", "0.6943973", "0.6925209", "0.6925209", "0.69234276", "0.69157803", "0.69157803", "0.6887...
0.0
-1
backlog Give hints to the system about the approximate listen backlog desired size May be used in sections : defaults | frontend | listen | backend yes | yes | yes | no Arguments : is the number of pending connections. Depending on the operating system, it may represent the number of already acknowledged connections, o...
def backlog(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "backlog " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def listen(backlog)\r\n SocketError.check if (ret = Winsock.listen(@fd, backlog)) == -1\r\n ret\r\n end", "def set_backlog\n @backlog = Backlog.find(params[:id])\n end", "def backlog\n @queue.size\n end", "def add_tcp_listener(host, port, optimize_for_latency = T.unsafe(nil), backlog =...
[ "0.67622757", "0.6351747", "0.6278291", "0.6110242", "0.59280497", "0.54628104", "0.5449129", "0.5379912", "0.53506345", "0.5297461", "0.5297461", "0.5140828", "0.51323545", "0.51030785", "0.50653994", "0.50190985", "0.5017197", "0.50030124", "0.4748347", "0.4747259", "0.4726...
0.6345886
2
bindprocess [ all | odd | even | ] ... Limit visibility of an instance to a certain set of processes numbers. May be used in sections : defaults | frontend | listen | backend yes | yes | yes | yes Arguments : all All process will see this instance. This is the default. It may be used to override a default value. odd Th...
def bind_process(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "bind-process " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def port_for(process, instance, base=nil)\n if base\n base + (@processes.index(process.process) * 100) + (instance - 1)\n else\n base_port + (@processes.index(process) * 100) + (instance - 1)\n end\n end", "def set_processes count\n @processes = count\n end", "def process(process_na...
[ "0.6306573", "0.59705025", "0.5619595", "0.5495701", "0.5392817", "0.5392817", "0.5345877", "0.53230625", "0.53019255", "0.52867633", "0.5283808", "0.523399", "0.5200553", "0.51500964", "0.51315033", "0.5113928", "0.50921756", "0.5082006", "0.507764", "0.5052304", "0.50494975...
0.69255465
0
default_backend Specify the backend to use when no "use_backend" rule has been matched. May be used in sections : defaults | frontend | listen | backend yes | yes | yes | no Arguments : is the name of the backend to use. When doing contentswitching between frontend and backends using the "use_backend" keyword, it is of...
def default_backend(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "default_backend " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def default_backend\n attributes_class.defaults[:backend]\n end", "def backend\n @backend ||= Configurator.new(self, :backend)\n end", "def backend\n @backend ||= self.class.backend\n end", "def backend_name\n config['backend']\n end", "def default_backend\n case environment\...
[ "0.6949522", "0.6724965", "0.6544158", "0.6501689", "0.6490113", "0.64519686", "0.6419564", "0.633596", "0.6323573", "0.6322462", "0.6299263", "0.6209517", "0.6193002", "0.6121443", "0.60741484", "0.60545987", "0.5923589", "0.5829339", "0.5816214", "0.5816214", "0.5785184", ...
0.7260709
0
disabled Disable a proxy, frontend or backend. May be used in sections : defaults | frontend | listen | backend yes | yes | yes | yes Arguments : none The "disabled" keyword is used to disable an instance, mainly in order to liberate a listening port or to temporarily disable a service. The instance will still be creat...
def disabled if @name_index @conf.insert(@name_index + @conf.length, " " + "disabled " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def disable\n @service.disabled = true\n end", "def disable!\n @disabled = true\n end", "def disable\n @disabled = true\n end", "def disable!\n @enabled = false\n end", "def disable\n @enabled = false\n end", "def disable!\n @enabled = false\n end", "def ...
[ "0.7422599", "0.73847157", "0.7355022", "0.7246445", "0.7211398", "0.71354914", "0.71113753", "0.69921595", "0.6981472", "0.6972395", "0.6903797", "0.6788629", "0.6786621", "0.6725253", "0.66480476", "0.66480476", "0.66126835", "0.6584959", "0.65817136", "0.6571579", "0.65706...
0.6156363
44
enabled Enable a proxy, frontend or backend. May be used in sections : defaults | frontend | listen | backend yes | yes | yes | yes Arguments : none The "enabled" keyword is used to explicitly enable an instance, when the defaults has been set to "disabled". This is very rarely used. See also : "disabled"
def enabled if @name_index @conf.insert(@name_index + @conf.length, " " + "enabled " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_enabled\n\t\t\tself.enabled = true\n\t\tend", "def enable\n @enabled = true\n end", "def enabled=(value)\n configuration.enabled = value\n end", "def enabled=(value)\n @enabled = value\n end", "def enabled=(value)\n @enabled = value\n ...
[ "0.72965795", "0.72560203", "0.72557163", "0.72372186", "0.72372186", "0.72372186", "0.7167744", "0.7032313", "0.6866346", "0.6866346", "0.68215185", "0.68215185", "0.68215185", "0.68215185", "0.68215185", "0.68215185", "0.68215185", "0.6777339", "0.6685483", "0.6674754", "0....
0.62550306
51
errorfile Return a file contents instead of errors generated by HAProxy May be used in sections : defaults | frontend | listen | backend yes | yes | yes | yes Arguments : is the HTTP status code. Currently, HAProxy is capable of generating codes 400, 403, 408, 500, 502, 503, and 504. designates a file containing the fu...
def errorfile(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "errorfile " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def config_error(path, error); end", "def script_error(path, error); end", "def error\n expires_in 1.month, public: true\n set_metadata({ 'title' => translate('errors.error') })\n render status: request.env['PATH_INFO'][1, 3].to_i\n end", "def error\n expires_in 1.month, public: true\n set_me...
[ "0.587922", "0.5730276", "0.56434196", "0.56417954", "0.5595627", "0.5595627", "0.557397", "0.5537964", "0.54794616", "0.5451226", "0.54415447", "0.5362514", "0.5350698", "0.5348973", "0.5307924", "0.5296926", "0.52944547", "0.5278069", "0.52676874", "0.52638704", "0.5262288"...
0.62142295
0
errorloc Return an HTTP redirection to a URL instead of errors generated by HAProxy May be used in sections : defaults | frontend | listen | backend yes | yes | yes | yes Arguments : is the HTTP status code. Currently, HAProxy is capable of generating codes 400, 403, 408, 500, 502, 503, and 504. it is the exact content...
def errorloc(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "errorloc " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_redirect_error_status(status)\n end", "def error(url); end", "def errorloc302(params = nil)\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"errorloc302 \" + params.to_s + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false...
[ "0.61902857", "0.6159834", "0.61070704", "0.60986906", "0.60533446", "0.60533446", "0.6025683", "0.59825176", "0.583906", "0.5757598", "0.56254077", "0.56254077", "0.56158894", "0.56095904", "0.55874014", "0.5575803", "0.55255693", "0.5517339", "0.5505765", "0.5488877", "0.54...
0.6139465
2
errorloc302 Return an HTTP redirection to a URL instead of errors generated by HAProxy May be used in sections : defaults | frontend | listen | backend yes | yes | yes | yes Arguments : is the HTTP status code. Currently, HAProxy is capable of generating codes 400, 403, 408, 500, 502, 503, and 504. it is the exact cont...
def errorloc302(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "errorloc302 " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_redirect_error_status(status)\n end", "def redirect uri, *args\n if @env[HTTP_VERSION] == 'HTTP/1.1' && @env[REQ_METHOD] != 'GET'\n status 303\n else\n status 302\n end\n\n @response[LOCATION] = url_to(uri.to_s)\n halt(*args)\n end", "def assert_redirect(res, location)\n ...
[ "0.67699426", "0.6758186", "0.65564907", "0.6508397", "0.64051884", "0.63670474", "0.6334208", "0.62698936", "0.6254329", "0.6254329", "0.6239308", "0.62113476", "0.61996746", "0.61975884", "0.6147517", "0.6136939", "0.61347914", "0.61226475", "0.60926074", "0.60811174", "0.6...
0.6808282
0
errorloc303 Return an HTTP redirection to a URL instead of errors generated by HAProxy May be used in sections : defaults | frontend | listen | backend yes | yes | yes | yes Arguments : is the HTTP status code. Currently, HAProxy is capable of generating codes 400, 403, 408, 500, 502, 503, and 504. it is the exact cont...
def errorloc303(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "errorloc303 " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_redirect_error_status(status)\n end", "def redirect uri, *args\n if @env[HTTP_VERSION] == 'HTTP/1.1' && @env[REQ_METHOD] != 'GET'\n status 303\n else\n status 302\n end\n\n @response[LOCATION] = url_to(uri.to_s)\n halt(*args)\n end", "def redirect(uri)\n [ 303, {'Con...
[ "0.668149", "0.6667157", "0.65169746", "0.6375428", "0.6369497", "0.63394487", "0.6211722", "0.6210864", "0.6207462", "0.61649626", "0.6129008", "0.6064138", "0.6064138", "0.6019637", "0.60077673", "0.6001714", "0.59897023", "0.59716946", "0.59540546", "0.58933717", "0.587534...
0.63079333
6
grace Maintain a proxy operational for some time after a soft stop May be used in sections : defaults | frontend | listen | backend yes | yes | yes | yes Arguments : is the time (by default in milliseconds) for which the instance will remain operational with the frontend sockets still listening when a softstop is recei...
def grace(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "grace " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def shutdown_grace_timeout\n @shutdown_grace_timeout || 2\n end", "def signal_stop_graceful\n @stop_state ||= :graceful\n interrupt_server_polling_sleep\n nil\n end", "def signal_restart_graceful\n @signal_operation_queue << :restart_graceful\n interrupt_server_polling_sleep...
[ "0.6654904", "0.6138152", "0.5966499", "0.5899103", "0.5650344", "0.56295204", "0.5586086", "0.55385566", "0.54519856", "0.5448553", "0.54158074", "0.5336104", "0.5332446", "0.5314161", "0.523368", "0.5214535", "0.5189002", "0.51783687", "0.51645845", "0.51548666", "0.5104801...
0.5809107
4
log global log [ []] Enable perinstance logging of events and traffic. May be used in sections : defaults | frontend | listen | backend yes | yes | yes | yes Arguments : global should be used when the instance's logging parameters are the same as the global ones. This is the most common usage. "global" replaces , and w...
def log(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "log " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def log\n advanced[:log]\n end", "def logger ; @log end", "def log (msg, **kwargs) Log.write(msg, :info, kwargs) end", "def log(msg)\n\t\tSyslog.info(msg) if @verbose\n\tend", "def use_logger(value)\n @global_logger = value\n end", "def log\n @log ||= Logging.logger[sel...
[ "0.658421", "0.640847", "0.6322689", "0.62707204", "0.6246547", "0.61563283", "0.6153785", "0.6137346", "0.6111844", "0.6111081", "0.6090111", "0.6087019", "0.60777175", "0.6055407", "0.6031118", "0.6027236", "0.6018616", "0.6008637", "0.5996187", "0.59815854", "0.59815854", ...
0.0
-1
maxconn Fix the maximum number of concurrent connections on a frontend May be used in sections : defaults | frontend | listen | backend yes | yes | yes | no Arguments : is the maximum number of concurrent connections the frontend will accept to serve. Excess connections will be queued by the system in the socket's list...
def maxconn(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "maxconn " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def connection_pool_maximum_size\n super\n end", "def connection_limit\n super\n end", "def connection_limit\n super\n end", "def connection_limit\n super\n end", "def max_concurrent_connections=(max_concurrent_connections)\n if !max_concurrent_connections.nil? && max_c...
[ "0.6777156", "0.67510927", "0.67510927", "0.67510927", "0.6629229", "0.63601387", "0.61491036", "0.6106337", "0.6030891", "0.6022845", "0.59730947", "0.58697563", "0.58697563", "0.58697563", "0.57928413", "0.56819725", "0.5663974", "0.5640938", "0.56374544", "0.56374544", "0....
0.67259437
4
monitornet Declare a source network which is limited to monitor requests May be used in sections : defaults | frontend | listen | backend yes | yes | yes | no Arguments : is the source IPv4 address or network which will only be able to get monitor responses to any request. It can be either an IPv4 address, a host name,...
def monitor_net(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "monitor-net " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_monitor_rule(params)\n pool_name = get_param(params, :pool)\n node_ip = get_ip(params)\n node_port = (params[:port] || 80).to_i\n if @environment.in_dry_run_mode\n notify(:msg => \"[#{@name}] Would set monitor rule for node #{node_ip}:#{node_port} in pool #{pool_name} on load bal...
[ "0.57321966", "0.5525894", "0.54089457", "0.5387147", "0.5355853", "0.53126985", "0.5294555", "0.5287686", "0.517866", "0.517866", "0.517866", "0.517866", "0.517866", "0.517866", "0.5168826", "0.51514626", "0.51180387", "0.5115027", "0.5096386", "0.5091993", "0.50808513", "...
0.681879
0
monitoruri Intercept a URI used by external components' monitor requests May be used in sections : defaults | frontend | listen | backend yes | yes | yes | no Arguments : is the exact URI which we want to intercept to return HAProxy's health status instead of forwarding the request. When an HTTP request referencing wil...
def monitor_uri(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "monitor-uri " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def monitor(query, set=nil)\n is_valid_with_error(__method__, [:ipv4, :domain], query)\n if domain?(query)\n query = normalize_domain(query)\n end\n if set.nil?\n get('actions/monitor', {'query' => query})\n else\n is_valid_with_error(__method__, [:bool], set)\n ...
[ "0.5232287", "0.5069834", "0.49675688", "0.49512118", "0.49512118", "0.48016512", "0.47926345", "0.47381735", "0.47179583", "0.46719736", "0.46035635", "0.46035635", "0.45643938", "0.45556533", "0.45430663", "0.44943264", "0.44858816", "0.44287586", "0.44105822", "0.44033954", ...
0.58841187
0
option acceptinvalidhttprequest no option acceptinvalidhttprequest Enable or disable relaxing of HTTP request parsing May be used in sections : defaults | frontend | listen | backend yes | yes | yes | no Arguments : none By default, HAProxy complies with RFC2616 in terms of message parsing. This means that invalid char...
def option_accept_invalid_http_request if @name_index @conf.insert(@name_index + @conf.length, " " + "option accept-invalid-http-request " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def option_accept_invalid_http_response\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"option accept-invalid-http-response \" + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n end\n end", "def option_http_use_proxy_heade...
[ "0.7043071", "0.6574725", "0.6272453", "0.597798", "0.5800663", "0.5762276", "0.57428676", "0.57131827", "0.5706991", "0.56793445", "0.5670583", "0.5658232", "0.56409997", "0.5607534", "0.5601622", "0.5599038", "0.5595749", "0.5589883", "0.55814314", "0.55643505", "0.5560849"...
0.7286004
0
option clitcpka no option clitcpka Enable or disable the sending of TCP keepalive packets on the client side May be used in sections : defaults | frontend | listen | backend yes | yes | yes | no Arguments : none When there is a firewall or any sessionaware component between a client and a server, and when the protocol ...
def option_clitcpka if @name_index @conf.insert(@name_index + @conf.length, " " + "option clitcpka " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def option_tcpka\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"option tcpka \" + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n end\n end", "def option_http_pretend_keepalive\n if @name_index\n @conf.insert...
[ "0.6434557", "0.6353623", "0.59452903", "0.5641194", "0.564049", "0.55898756", "0.5518319", "0.5490267", "0.5489193", "0.54624057", "0.5400317", "0.5371942", "0.53669703", "0.5362584", "0.5260885", "0.5242664", "0.5230351", "0.5207075", "0.51431197", "0.51407766", "0.510115",...
0.6170611
2
option contstats Enable continuous traffic statistics updates May be used in sections : defaults | frontend | listen | backend yes | yes | yes | no Arguments : none By default, counters used for statistics calculation are incremented only when a session finishes. It works quite well when serving small objects, but with...
def option_contstats if @name_index @conf.insert(@name_index + @conf.length, " " + "option contstats " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def send_agent_stats\n curr_time = Time.now\n\n if curr_time - @last_stat_flush > @stats_interval\n t = Process.times\n # amount of user/system cpu time in seconds\n Hastur.gauge(\"hastur.agent.utime\", t.utime, curr_time)\n Hastur.gauge(\"hastur.agent.stime\", t.s...
[ "0.56934357", "0.562362", "0.5569159", "0.53394103", "0.529139", "0.5234651", "0.5216196", "0.52068436", "0.5202748", "0.516957", "0.5088859", "0.5088859", "0.50743794", "0.50729454", "0.50720674", "0.5065869", "0.5065869", "0.50642073", "0.50322497", "0.50202674", "0.4982722...
0.6862157
0
option dontlognormal no option dontlognormal Enable or disable logging of normal, successful connections May be used in sections : defaults | frontend | listen | backend yes | yes | yes | no Arguments : none There are large sites dealing with several thousand connections per second and for which logging is a major pain...
def option_dontlog_normal if @name_index @conf.insert(@name_index + @conf.length, " " + "option dontlog-normal " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verbose_logging; end", "def enable_logging(opts); end", "def disable_verbose_log()\n PureHailDB.ib_cfg_set(\"print_verbose_log\", :bool, false)\n end", "def autoflush_log; end", "def autoflush_log; end", "def redirect_log(options={})\n ActiveRecord::Base.logger = Logger.new(options.fetch(:to...
[ "0.60488003", "0.5952865", "0.5837414", "0.5711785", "0.5711785", "0.5711306", "0.5690205", "0.56598765", "0.56138104", "0.56096333", "0.55402267", "0.5521506", "0.5513701", "0.5472398", "0.54533607", "0.54456085", "0.54456085", "0.541361", "0.5413085", "0.5405126", "0.539345...
0.6109973
0
option dontlognull no option dontlognull Enable or disable logging of null connections May be used in sections : defaults | frontend | listen | backend yes | yes | yes | no Arguments : none In certain environments, there are components which will regularly connect to various systems to ensure that they are still alive....
def option_dontlognull if @name_index @conf.insert(@name_index + @conf.length, " " + "option dontlognull " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def option_dontlog_normal\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"option dontlog-normal \" + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n end\n end", "def enable_logging(opts); end", "def option_tcplog\n ...
[ "0.64034206", "0.6116583", "0.59380627", "0.59336895", "0.58482957", "0.57933974", "0.56522465", "0.56182456", "0.5617578", "0.56158894", "0.56069356", "0.55920607", "0.5585854", "0.55837786", "0.5578204", "0.5578204", "0.5578204", "0.5578204", "0.5578204", "0.5578204", "0.55...
0.71563256
0
option forceclose no option forceclose Enable or disable active connection closing after response is transferred. May be used in sections : defaults | frontend | listen | backend yes | yes | yes | yes Arguments : none Some HTTP servers do not necessarily close the connections when they receive the "Connection: close" s...
def option_forceclose if @name_index @conf.insert(@name_index + @conf.length, " " + "option forceclose " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def option_http_server_close\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"option http-server-close \" + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n end\n end", "def option_httpclose\n if @name_index\n @...
[ "0.67810136", "0.6620157", "0.64293426", "0.6356246", "0.620848", "0.58231246", "0.57951874", "0.5727011", "0.5726318", "0.5697394", "0.5673046", "0.5542271", "0.54472834", "0.54464775", "0.543653", "0.5397966", "0.53640085", "0.53380007", "0.53373134", "0.53339237", "0.53339...
0.540056
15
option forwardfor [ except ] [ header ] Enable insertion of the XForwardedFor header to requests sent to servers May be used in sections : defaults | frontend | listen | backend yes | yes | yes | yes Arguments : is an optional argument used to disable this option for sources matching an optional argument to specify a d...
def option_forwardfor(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "option forwardfor " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def insert_xforwarded_for_header_mode\n super\n end", "def option_http_use_proxy_header\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"option http-use-proxy-header \" + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n ...
[ "0.67546195", "0.6573523", "0.6047343", "0.60298777", "0.58673245", "0.5724127", "0.5709031", "0.5704291", "0.56832564", "0.5598673", "0.55803317", "0.55668515", "0.54993445", "0.5471029", "0.5465268", "0.54400796", "0.5428987", "0.54210895", "0.53939945", "0.53810143", "0.53...
0.59077936
4
option httppretendkeepalive no option httppretendkeepalive Define whether haproxy will announce keepalive to the server or not May be used in sections : defaults | frontend | listen | backend yes | yes | yes | yes Arguments : none When running with "option httpserverclose" or "option forceclose", haproxy adds a "Connec...
def option_http_pretend_keepalive if @name_index @conf.insert(@name_index + @conf.length, " " + "option http-pretend-keepalive " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def option_httpclose\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"option httpclose \" + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n end\n end", "def option_http_server_close\n if @name_index\n @conf.ins...
[ "0.58160305", "0.5813357", "0.5808354", "0.57832444", "0.5737728", "0.5578984", "0.5520641", "0.53210664", "0.52897334", "0.52340394", "0.5224807", "0.516158", "0.51538354", "0.5130729", "0.5125694", "0.5109284", "0.5067677", "0.49913397", "0.49708718", "0.49614567", "0.49534...
0.682594
0
option httpserverclose no option httpserverclose Enable or disable HTTP connection closing on the server side May be used in sections : defaults | frontend | listen | backend yes | yes | yes | yes Arguments : none By default, when a client communicates with a server, HAProxy will only analyze, log, and process the firs...
def option_http_server_close if @name_index @conf.insert(@name_index + @conf.length, " " + "option http-server-close " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def option_httpclose\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"option httpclose \" + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n end\n end", "def server_close_timeout\n super\n end", "def option_http_p...
[ "0.68956697", "0.65736496", "0.61783385", "0.6068128", "0.5967146", "0.5789777", "0.5643025", "0.5551794", "0.55327916", "0.55290896", "0.5459598", "0.53899765", "0.535587", "0.5340105", "0.5313772", "0.5313772", "0.5312022", "0.5299798", "0.5299798", "0.52931404", "0.5293140...
0.7374095
0
option httpuseproxyheader no option httpuseproxyheader Make use of nonstandard ProxyConnection header instead of Connection May be used in sections : defaults | frontend | listen | backend yes | yes | yes | no Arguments : none While RFC2616 explicitly states that HTTP/1.1 agents must use the Connection header to indica...
def option_http_use_proxy_header if @name_index @conf.insert(@name_index + @conf.length, " " + "option http-use-proxy-header " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def proxy_connect_header; end", "def option_http_proxy\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"option http_proxy \" + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n end\n end", "def proxy_header\n super\n ...
[ "0.7151104", "0.697491", "0.69008416", "0.687219", "0.6810409", "0.66292924", "0.6583849", "0.65658337", "0.656217", "0.65014094", "0.6468451", "0.644535", "0.64179176", "0.63744867", "0.63318163", "0.6320238", "0.6263524", "0.62593704", "0.6233744", "0.6225171", "0.62240225"...
0.7736818
0
option httpclose no option httpclose Enable or disable passive HTTP connection closing May be used in sections : defaults | frontend | listen | backend yes | yes | yes | yes Arguments : none By default, when a client communicates with a server, HAProxy will only analyze, log, and process the first request of each conne...
def option_httpclose if @name_index @conf.insert(@name_index + @conf.length, " " + "option httpclose " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def option_http_server_close\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"option http-server-close \" + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n end\n end", "def closekeepalive\n response.headers['Connection'...
[ "0.7432158", "0.6191084", "0.60711396", "0.6006419", "0.5894718", "0.5776552", "0.57534117", "0.5722221", "0.56470454", "0.5644637", "0.5611129", "0.55859536", "0.5570855", "0.5545269", "0.55451596", "0.55092067", "0.55081594", "0.54967165", "0.5460018", "0.5416999", "0.53879...
0.7487701
0