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
option httplog [ clf ] Enable logging of HTTP request, session state and timers May be used in sections : defaults | frontend | listen | backend yes | yes | yes | yes Arguments : clf if the "clf" argument is added, then the output format will be the CLF format instead of HAProxy's default HTTP format. You can use this ...
def option_httplog if @name_index @conf.insert(@name_index + @conf.length, " " + "option httplog " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def enable_logging(opts); end", "def option_tcplog\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"option tcplog \" + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n end\n end", "def show_log!\n @runopts[:show_log] =...
[ "0.63790876", "0.63711476", "0.62741053", "0.58580995", "0.5843947", "0.5825593", "0.57656646", "0.5705699", "0.565197", "0.5651486", "0.5651486", "0.560612", "0.5566816", "0.5562272", "0.5537523", "0.5525786", "0.5493156", "0.5457454", "0.5415215", "0.5404142", "0.5386007", ...
0.74681085
0
option http_proxy no option http_proxy Enable or disable plain HTTP proxy mode May be used in sections : defaults | frontend | listen | backend yes | yes | yes | yes Arguments : none It sometimes happens that people need a pure HTTP proxy which understands basic proxy requests without caching nor any fancy feature. In ...
def option_http_proxy if @name_index @conf.insert(@name_index + @conf.length, " " + "option http_proxy " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 end\n end", "def using_proxy?; end", "def http_proxy; en...
[ "0.70241475", "0.70227265", "0.6923236", "0.6826186", "0.67286557", "0.6718606", "0.66297597", "0.66125023", "0.659937", "0.65891784", "0.6538308", "0.6520247", "0.651881", "0.65087885", "0.6477701", "0.6449238", "0.6423405", "0.63937116", "0.6374858", "0.6374858", "0.6302098...
0.7367985
0
option independantstreams no option independantstreams Enable or disable independant timeout processing for both directions May be used in sections : defaults | frontend | listen | backend yes | yes | yes | yes Arguments : none By default, when data is sent over a socket, both the write timeout and the read timeout for...
def option_independant_streams if @name_index @conf.insert(@name_index + @conf.length, " " + "option independant-streams " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def configure_timeout(options, env)\n req = request_options(env)\n options[:inactivity_timeout] = request_timeout(:read, req)\n options[:connect_timeout] = request_timeout(:open, req)\n end", "def set_tcp_timeout(opts)\n opts = check_params(opts,[:timeouts])\n super(op...
[ "0.58219016", "0.5454524", "0.53710693", "0.5361061", "0.5334464", "0.53335327", "0.53142005", "0.52953917", "0.52305603", "0.52305603", "0.52305603", "0.52069324", "0.5198049", "0.51791674", "0.51791674", "0.51600784", "0.5157397", "0.50909674", "0.50909674", "0.50909674", "...
0.5611075
1
option logseparateerrors no option logseparateerrors Change log level for noncompletely successful connections May be used in sections : defaults | frontend | listen | backend yes | yes | yes | no Arguments : none Sometimes looking for errors in logs is not easy. This option makes haproxy raise the level of logs contai...
def option_log_separate_errors if @name_index @conf.insert(@name_index + @conf.length, " " + "option log-separate-errors " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def enable_logging(opts); end", "def option_httplog\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"option httplog \" + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n end\n end", "def configure_logging(loglevel)\n ...
[ "0.6078359", "0.5847702", "0.581825", "0.5704577", "0.5575243", "0.5546335", "0.5535977", "0.54523927", "0.5451452", "0.54480666", "0.54388326", "0.5413637", "0.54125506", "0.5407048", "0.5396817", "0.53622323", "0.5351362", "0.5351362", "0.5351362", "0.5307338", "0.53003", ...
0.6413859
0
option logasap no option logasap Enable or disable early logging of HTTP requests May be used in sections : defaults | frontend | listen | backend yes | yes | yes | no Arguments : none By default, HTTP requests are logged upon termination so that the total transfer time and the number of bytes appear in the logs. When ...
def option_logasap if @name_index @conf.insert(@name_index + @conf.length, " " + "option logasap " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def log_http(response)\n resp_template = '[http] Response: %s (%s bytes in %s seconds)'\n log_status = (response.status || 0)\n log_total_time = response.total_time.truncate(3)\n\n Wgit.logger.debug(\"[http] Request: #{response.url}\")\n Wgit.logger.debug(\n format(resp_templa...
[ "0.633781", "0.62884957", "0.5775267", "0.5772501", "0.57485425", "0.56958675", "0.56847924", "0.5598546", "0.55919164", "0.5555346", "0.5554399", "0.55443597", "0.54256237", "0.5422984", "0.5393031", "0.53504425", "0.53361434", "0.5336097", "0.5308649", "0.5291187", "0.52225...
0.5513691
12
option nolinger no option nolinger Enable or disable immediate session resource cleaning after close May be used in sections: defaults | frontend | listen | backend yes | yes | yes | yes Arguments : none When clients or servers abort connections in a dirty way (eg: they are physically disconnected), the session timeout...
def option_nolinger if @name_index @conf.insert(@name_index + @conf.length, " " + "option nolinger " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_keep_alive; end", "def keep_alive=(enable); end", "def no_session # :nologin: :norobots:\n end", "def keep_alive?; end", "def keep_alive?; end", "def forget; opt('forget'); end", "def configure_socket_keepalive\n @socket.setsockopt(Socket::SOL_SOCKET, Socket::SO_KEEPALIVE, true)\n if def...
[ "0.5739104", "0.5647372", "0.5575375", "0.5565999", "0.5565999", "0.5476981", "0.54743", "0.5449258", "0.5449258", "0.53929216", "0.5345648", "0.5345648", "0.5342323", "0.53338695", "0.5332308", "0.5332308", "0.5217775", "0.52045", "0.5198686", "0.51763237", "0.5172942", "0...
0.54500294
7
option originalto [ except ] [ header ] Enable insertion of the XOriginalTo 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 dif...
def option_originalto(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "option originalto " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 end\n end", "def proxy_header\n super\n end", "d...
[ "0.62028086", "0.6156808", "0.60640174", "0.59382284", "0.58764815", "0.5758062", "0.5663758", "0.557502", "0.5501717", "0.5441432", "0.53992623", "0.53537875", "0.5313941", "0.5304365", "0.53019524", "0.5268214", "0.5241666", "0.5221373", "0.5212263", "0.5198852", "0.5168806...
0.59745383
3
option socketstats no option socketstats Enable or disable collecting & providing separate statistics for each socket. May be used in sections : defaults | frontend | listen | backend yes | yes | yes | no Arguments : none
def option_socket_stats if @name_index @conf.insert(@name_index + @conf.length, " " + "option socket-stats " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def stats\n JSON.parse TCPSocket.new(@options[:stats_uri].host,@options[:stats_uri].port).read rescue {}\n end", "def tcp_statistics\n super\n end", "def stats(socket)\n stats = Time.now.to_i + \"\\n\" + \n @data.flatten + \"\\n\" + \n @expire.flatten + \"\\n\"\n soc...
[ "0.6387603", "0.61220145", "0.57937235", "0.57875735", "0.5768266", "0.56278056", "0.55786985", "0.5565503", "0.5563621", "0.5534466", "0.548821", "0.5434869", "0.53919894", "0.5330937", "0.5324928", "0.5297482", "0.5225905", "0.52161413", "0.521423", "0.51841646", "0.5175758...
0.77994186
0
option spliceauto no option spliceauto Enable or disable automatic kernel acceleration on sockets in both directions May be used in sections : defaults | frontend | listen | backend yes | yes | yes | yes Arguments : none When this option is enabled either on a frontend or on a backend, haproxy will automatically evalua...
def option_splice_auto if @name_index @conf.insert(@name_index + @conf.length, " " + "option splice-auto " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def option_splice_request\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"option splice-request \" + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n end\n end", "def setsockopt(*) end", "def option_splice_response\n ...
[ "0.57408786", "0.5407532", "0.52100605", "0.49986687", "0.4933622", "0.4890215", "0.48071867", "0.480331", "0.47818646", "0.47073337", "0.46344942", "0.4631445", "0.4611967", "0.46037138", "0.45904905", "0.45631155", "0.45092693", "0.45056313", "0.44873348", "0.44708586", "0....
0.5635836
1
option splicerequest no option splicerequest Enable or disable automatic kernel acceleration on sockets for requests May be used in sections : defaults | frontend | listen | backend yes | yes | yes | yes Arguments : none When this option is enabled either on a frontend or on a backend, haproxy will user kernel tcp spli...
def option_splice_request if @name_index @conf.insert(@name_index + @conf.length, " " + "option splice-request " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def options!\n request! :options\n end", "def option_splice_response\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"option splice-response \" + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n end\n end", "def optio...
[ "0.5753224", "0.5575854", "0.5359987", "0.5217141", "0.5213694", "0.5119207", "0.5101802", "0.5095142", "0.50796425", "0.5073082", "0.50708884", "0.50708246", "0.50431436", "0.50134206", "0.50067526", "0.4993935", "0.49870878", "0.49736166", "0.49309316", "0.49173614", "0.490...
0.6411068
0
option spliceresponse no option spliceresponse Enable or disable automatic kernel acceleration on sockets for responses May be used in sections : defaults | frontend | listen | backend yes | yes | yes | yes Arguments : none When this option is enabled either on a frontend or on a backend, haproxy will user kernel tcp s...
def option_splice_response if @name_index @conf.insert(@name_index + @conf.length, " " + "option splice-response " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def option_splice_request\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"option splice-request \" + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n end\n end", "def options!\n request! :options\n end", "def options...
[ "0.5947029", "0.5261011", "0.5147888", "0.5129761", "0.5068948", "0.50488526", "0.50115854", "0.50041384", "0.4997537", "0.49956965", "0.499281", "0.49565548", "0.4928683", "0.49228057", "0.4896864", "0.4896847", "0.48740494", "0.48508888", "0.48480767", "0.48465562", "0.4843...
0.6340864
0
option tcpsmartaccept no option tcpsmartaccept Enable or disable the saving of one ACK packet during the accept sequence May be used in sections : defaults | frontend | listen | backend yes | yes | yes | no Arguments : none When an HTTP connection request comes in, the system acknowledges it on behalf of HAProxy, then ...
def option_tcp_smart_accept if @name_index @conf.insert(@name_index + @conf.length, " " + "option tcp-smart-accept " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def option_tcp_smart_connect\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"option tcp-smart-connect \" + \"\\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_ind...
[ "0.68095386", "0.661285", "0.5612595", "0.5505284", "0.5465569", "0.54583275", "0.5443917", "0.54255116", "0.5366289", "0.5317486", "0.52865547", "0.5272648", "0.52699655", "0.5261151", "0.52528036", "0.5247451", "0.5233552", "0.5233552", "0.5233552", "0.5233305", "0.5214157"...
0.76642966
0
option tcpka Enable or disable the sending of TCP keepalive packets on both sides May be used in sections : defaults | frontend | listen | backend yes | yes | yes | yes Arguments : none When there is a firewall or any sessionaware component between a client and a server, and when the protocol involves very long session...
def option_tcpka if @name_index @conf.insert(@name_index + @conf.length, " " + "option tcpka " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def configure_socket_keepalive\n @socket.setsockopt(Socket::SOL_SOCKET, Socket::SO_KEEPALIVE, true)\n if defined?(Socket::TCP_KEEPINTVL) # Not available on JRuby\n @socket.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_KEEPINTVL, 10)\n @socket.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_KEEPCNT, 5)\n ...
[ "0.6350187", "0.6254876", "0.5749983", "0.5489303", "0.54744023", "0.5467926", "0.5455452", "0.54090416", "0.540336", "0.53844327", "0.5382317", "0.53743285", "0.532364", "0.5299195", "0.5278692", "0.5272781", "0.5240294", "0.52133656", "0.51830816", "0.51671886", "0.51314944...
0.6501613
0
option tcplog Enable advanced logging of TCP connections with session state and timers May be used in sections : defaults | frontend | listen | backend yes | yes | yes | yes Arguments : none By default, the log output format is very poor, as it only contains the source and destination addresses, and the instance name. ...
def option_tcplog if @name_index @conf.insert(@name_index + @conf.length, " " + "option tcplog " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def option_httplog\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"option httplog \" + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n end\n end", "def show_log!\n @runopts[:show_log] = true\n end", "def log(log)\n ...
[ "0.6410947", "0.6148379", "0.5907645", "0.581997", "0.5790708", "0.56987405", "0.56817704", "0.56754786", "0.5598337", "0.5598227", "0.5571043", "0.5522894", "0.5522894", "0.5508227", "0.5485397", "0.5473695", "0.5460682", "0.5390386", "0.53784275", "0.5361005", "0.53463244",...
0.74061644
0
ratelimit sessions Set a limit on the number of new sessions accepted per second on a frontend May be used in sections : defaults | frontend | listen | backend yes | yes | yes | no Arguments : The parameter is an integer designating the maximum number of new sessions per second to accept on the frontend. When the front...
def rate_limit_sessions(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "rate-limit sessions " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def session_rate_limit\n SessionTracker.where(session_id: request.session.id, created_at:(Date.today.beginning_of_day..Date.today.end_of_day)).count\n end", "def rate_limit!(namespace, limit: 5, minutes: 5)\n request_time = DateTime.now\n log_path = Rails.root.join(\"tmp/rate_limits/#{namespace...
[ "0.66160935", "0.64139426", "0.619632", "0.60447747", "0.5965418", "0.59531635", "0.5946389", "0.5899933", "0.58786553", "0.5860015", "0.5805738", "0.5714112", "0.57077646", "0.5662313", "0.56560755", "0.56533146", "0.56402266", "0.55999863", "0.55930376", "0.5589397", "0.558...
0.6879074
0
timeout client timeout clitimeout (deprecated) Set the maximum inactivity time on the client side. May be used in sections : defaults | frontend | listen | backend yes | yes | yes | no Arguments : is the timeout value specified in milliseconds by default, but can be in any other unit if the number is suffixed by the un...
def timeout_client(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "timeout client " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def request_timeout(type, options); end", "def timeout_seconds\n return 1200\n end", "def timeout\n @options[:timeout]\n end", "def timeout\n configuration[:timeout] || DEFAULT_TIMEOUT\n end", "def timeout\n configuration[:timeout] || DEFAULT_TIMEOUT\n end", "def client_close_timeou...
[ "0.7436326", "0.7305081", "0.7146722", "0.7116704", "0.7116704", "0.71095324", "0.70713127", "0.70631707", "0.7059187", "0.7022387", "0.7021354", "0.7014767", "0.70133114", "0.70097226", "0.6972749", "0.6951702", "0.69497174", "0.6936105", "0.6935456", "0.69067055", "0.690198...
0.0
-1
timeout httpkeepalive Set the maximum allowed time to wait for a new HTTP request to appear May be used in sections : defaults | frontend | listen | backend yes | 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, as...
def timeout_http_keep_alive(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "timeout http-keep-alive " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def http_timeout; end", "def http_timeout=(_arg0); end", "def keepalive_timeout?\n @keepalive_count ||= 0\n @keepalive_count += 1\n @keepalive_count > 10\n end", "def keepalive_timeout?\n @keepalive_count ||= 0\n @keepalive_count += 1\n @keepalive_count > 10\n end", "def...
[ "0.7611367", "0.71669835", "0.70251524", "0.6980712", "0.6950967", "0.67734176", "0.67314804", "0.67314804", "0.6708365", "0.66647106", "0.6587132", "0.6538235", "0.65241325", "0.6474129", "0.6473057", "0.64451385", "0.64407223", "0.6432197", "0.6422968", "0.6391287", "0.6391...
0.7175251
1
timeout httprequest Set the maximum allowed time to wait for a complete HTTP request May be used in sections : defaults | frontend | listen | backend yes | 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, as explai...
def timeout_http_request(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "timeout http-request " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def http_timeout; end", "def request_timeout(type, options); end", "def request_timeout()\n @req_timeout\n end", "def http_timeout=(_arg0); end", "def request\n HTTP.headers(request_headers).timeout(timeout_options)\n end", "def configure_timeout(options, env)\n req = request_opt...
[ "0.74034905", "0.73691654", "0.73101085", "0.718082", "0.6740937", "0.67071325", "0.65084493", "0.6399267", "0.6394433", "0.6390722", "0.63779455", "0.6359015", "0.6325552", "0.6323034", "0.6307443", "0.62704736", "0.6230794", "0.6201844", "0.6201844", "0.61998296", "0.619762...
0.70011455
4
timeout tarpit Set the duration for which tarpitted connections will be maintained May be used in sections : defaults | frontend | listen | backend yes | yes | yes | yes Arguments : is the tarpit duration specified in milliseconds by default, but can be in any other unit if the number is suffixed by the unit, as explai...
def timeout_tarpit(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "timeout tarpit " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def timeout=(timeout)\n @timeout = timeout\n end", "def timeout\n configuration[:timeout] || DEFAULT_TIMEOUT\n end", "def timeout\n configuration[:timeout] || DEFAULT_TIMEOUT\n end", "def setconnectiontimeout(timeout)\r\n setvalue(@@CONNECTION_TIMEOUT, timeout)\r\n end", "def timeout\n ...
[ "0.67986876", "0.67441636", "0.67441636", "0.6715555", "0.66807294", "0.6614057", "0.6477404", "0.6477404", "0.64752", "0.6438081", "0.6424638", "0.6412498", "0.6394951", "0.63785815", "0.63635683", "0.63385147", "0.63355947", "0.627813", "0.6276014", "0.627044", "0.627044", ...
0.6490966
6
appsession len timeout [requestlearn] [prefix] [mode ] Define session stickiness on an existing application cookie. May be used in sections : defaults | frontend | listen | backend no | no | yes | yes Arguments : this is the name of the cookie used by the application and which HAProxy will have to learn for each new se...
def appsession(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "appsession " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def session_options; end", "def session_options; end", "def session_remember\n httpsession = Thread.current[:hayabusa][:httpsession]\n raise \"Could not figure out HTTP-session.\" if !httpsession\n session = httpsession.session\n raise \"Could not get session-variable from HTTP-session.\" if !sessi...
[ "0.608007", "0.608007", "0.60393", "0.5954821", "0.5954821", "0.5830759", "0.566402", "0.55501914", "0.5514689", "0.543938", "0.5419195", "0.5415239", "0.53520006", "0.5297758", "0.5288431", "0.5223229", "0.52168816", "0.5216272", "0.52147007", "0.51934063", "0.51538", "0.5...
0.58623326
5
dispatch : Set a default server address May be used in sections : defaults | frontend | listen | backend no | no | yes | yes Arguments : none is the IPv4 address of the default server. Alternatively, a resolvable hostname is supported, but this name will be resolved during startup. is a mandatory port specification. Al...
def dispatch(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "dispatch " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def default_server(params = nil)\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"default-server \" + params.to_s + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n end\n end", "def default_submission_port; end", "def sta...
[ "0.65552706", "0.6176068", "0.6128563", "0.6032865", "0.5964412", "0.59472406", "0.592254", "0.5784611", "0.57814854", "0.57615", "0.5749535", "0.5717537", "0.5648452", "0.5624469", "0.5612942", "0.5609014", "0.5609014", "0.5609014", "0.5609014", "0.5609014", "0.5609014", "...
0.5150369
68
server [:port] [param] Declare a server in a backend May be used in sections : defaults | frontend | listen | backend no | no | yes | yes Arguments : is the internal name assigned to this server. This name will appear in logs and alerts. is the IPv4 address of the server. Alternatively, a resolvable hostname is support...
def server(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "server " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def server_port; end", "def server\n @_server ||= case options.fetch(:type, :tcp)\n when :tcp\n TCPServer.new options.fetch(:host, \"127.0.0.1\"),\n options.fetch(:port, 2010)\n when :unix\n UNIXServer.new options.fetch(:path)\n when :pipe\n FakeS...
[ "0.7070848", "0.6873863", "0.6812344", "0.6760017", "0.6648492", "0.66429853", "0.6550626", "0.6550626", "0.6550626", "0.6550626", "0.6550626", "0.6550626", "0.6550626", "0.6550626", "0.652395", "0.652395", "0.652395", "0.652395", "0.652395", "0.652395", "0.652395", "0.6523...
0.66699183
4
stick match [table ] [(if | unless) ] Define a request pattern matching condition to stick a user to a server May be used in sections : defaults | frontend | listen | backend no | no | yes | yes Arguments : is a pattern extraction rule as described in section 7.8. It describes what elements of the incoming request or c...
def stick_match(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "stick match " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def allow_stickers_and_memes=(value)\n @allow_stickers_and_memes = value\n end", "def allow_stickers_and_memes\n return @allow_stickers_and_memes\n end", "def sticky?\n !blunt?\n end", "def sticky?() end", "def stick_on(params = nil)\n if @name_i...
[ "0.4893165", "0.4754668", "0.47499517", "0.46786597", "0.4592352", "0.45677313", "0.45191994", "0.43769395", "0.43757007", "0.43149537", "0.43146363", "0.42839777", "0.42368314", "0.42158666", "0.4207473", "0.41610315", "0.41328314", "0.41018492", "0.40994835", "0.40982014", ...
0.5298248
0
stick on [table ] [(if | unless) ] Define a request pattern to associate a user to a server May be used in sections : defaults | frontend | listen | backend no | no | yes | yes Note : This form is exactly equivalent to "stick match" followed by "stick storerequest", all with the same arguments. Please refer to both key...
def stick_on(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "stick on " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def stick_match(params = nil)\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"stick match \" + params.to_s + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n end\n end", "def stick_store_request(params = nil)\n if @na...
[ "0.49803087", "0.48704386", "0.46630028", "0.44916084", "0.44744167", "0.44303694", "0.44239697", "0.43791693", "0.4373157", "0.4368924", "0.43359253", "0.42975017", "0.42845434", "0.42845434", "0.4269723", "0.42622367", "0.4260976", "0.42417702", "0.42319474", "0.41910058", ...
0.5099958
0
stick storerequest [table ] [(if | unless) ] Define a request pattern used to create an entry in a stickiness table May be used in sections : defaults | frontend | listen | backend no | no | yes | yes Arguments : is a pattern extraction rule as described in section 7.8. It describes what elements of the incoming reques...
def stick_store_request(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "stick store-request " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sticky?\n !blunt?\n end", "def sticky?() end", "def allow_stickers_and_memes=(value)\n @allow_stickers_and_memes = value\n end", "def stick_on(params = nil)\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"stick on \" + params.to_s + \"\\n...
[ "0.48614165", "0.47091535", "0.46862555", "0.45160544", "0.44828174", "0.44438702", "0.44152483", "0.44067183", "0.43721315", "0.43232748", "0.4303226", "0.42994106", "0.4272796", "0.42448458", "0.42162204", "0.42089182", "0.4147266", "0.41300932", "0.40820903", "0.40661025", ...
0.49012786
0
stick storeresponse [table ] [(if | unless) ] Define a request pattern used to create an entry in a stickiness table May be used in sections : defaults | frontend | listen | backend no | no | yes | yes Arguments : is a pattern extraction rule as described in section 7.8. It describes what elements of the response or co...
def stick_store_response(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "stick store-response " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fresh?(response); end", "def sticky?\n !blunt?\n end", "def accepts_seat?(table)\n RestClient::Request.execute(:method => :post, :url => seating_path, :payload => { :game_table_identifier => \"game_table_#{table.id}\" }, :timeout => TIMEOUT, :open_timeout => TIMEOUT) do |response, request, result|\n...
[ "0.45630306", "0.4462836", "0.44545275", "0.4411105", "0.43695188", "0.43432787", "0.42924297", "0.4288954", "0.42597377", "0.4244346", "0.422927", "0.42112622", "0.42008373", "0.4142782", "0.4131252", "0.41073996", "0.41051167", "0.4099976", "0.40917984", "0.40865973", "0.40...
0.5118923
0
tcpresponse content [(if | unless) ] Perform an action on a session response depending on a layer 47 condition May be used in sections : defaults | frontend | listen | backend no | no | yes | yes Arguments : defines the action to perform if the condition applies. Valid actions include : "accept", "reject". See "tcprequ...
def tcp_response_content(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "tcp-response content " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def condition(response)\ncondition = response.condition['text']\nend", "def process_response(behavior, _)\n behavior[:cookies] == 'none' ?\n 'unset beresp.http.set-cookie;' :\n '# Allow set-cookie responses.'\nend", "def response?\n\t\treturn ((self.type == PACKET_TYPE_RESPONSE) ||\n\t\t (self.ty...
[ "0.5791856", "0.56483334", "0.5621196", "0.5621196", "0.532311", "0.5291798", "0.5291798", "0.5275587", "0.5209164", "0.5134833", "0.51175076", "0.51137954", "0.5056427", "0.50526077", "0.50521344", "0.5040474", "0.50168794", "0.500518", "0.49764615", "0.49494374", "0.4948691...
0.52880013
7
tcpresponse inspectdelay Set the maximum allowed time to wait for a response during content inspection May be used in sections : defaults | frontend | listen | backend no | no | 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...
def tcp_response_inspect_delay(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "tcp-response 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_request_inspect_delay(params = nil)\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"tcp-request inspect-delay \" + params.to_s + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n end\n end", "def page_delay\n if ...
[ "0.58410877", "0.56431", "0.55460405", "0.54681575", "0.53387713", "0.5333312", "0.5286286", "0.5286286", "0.524569", "0.5241974", "0.52203035", "0.51848507", "0.51114166", "0.50856894", "0.50798804", "0.50577384", "0.50340855", "0.50339025", "0.50313646", "0.5024997", "0.502...
0.64594764
0
balance [ ] balance url_param [check_post []] Define the load balancing algorithm to be used in a backend. May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments : is the algorithm used to select a server when doing load balancing. This only applies when no persistence informati...
def balance(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "balance " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def balancer(*args)\n request = ::Hbase::BalancerUtils.create_balance_request(args)\n @admin.balance(request)\n end", "def balancer\n @balancer ||= RightSupport::Net::RequestBalancer.new(@@hostnames,\n :policy=>RightSupport::Net::Balancing::StickyPolicy)\n end", "def g...
[ "0.70786434", "0.63698536", "0.6224055", "0.5768745", "0.5709698", "0.5708225", "0.5662433", "0.5633097", "0.55545735", "0.5550597", "0.5455647", "0.5450211", "0.5445423", "0.5436696", "0.54355675", "0.5363733", "0.5350068", "0.532853", "0.5306826", "0.53054744", "0.5286475",...
0.61406475
3
cookie [ rewrite | insert | prefix ] [ indirect ] [ nocache ] [ postonly ] [ preserve ] [ domain ] [ maxidle ] [ maxlife ] Enable cookiebased persistence in a backend. May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments : is the name of the cookie which will be monitored, mod...
def cookie(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "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_persistence_method\n super\n end", "def install_persistent_cookie(name, cookie)\n cookies[name] = {\n :value => cookie,\n :expires => 10.years.from_now\n }\n end", "def cookie\n { :value => Crypt.encrypt(cookie_value), :expires => 1.year.from_now }\n end", "d...
[ "0.68130565", "0.67924446", "0.64455485", "0.63902175", "0.63651055", "0.63329715", "0.6313424", "0.62393343", "0.622766", "0.622766", "0.622766", "0.622766", "0.622766", "0.622766", "0.622766", "0.61818063", "0.61793435", "0.61615837", "0.6161395", "0.6121691", "0.6104844", ...
0.6252894
7
defaultserver [param] Change default options for a server in a backend May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments: is a list of parameters for this server. The "defaultserver" keyword accepts an important number of options and has a complete section dedicated to it. ...
def default_server(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "default-server " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def default_server\n server?(:default)\n end", "def set_default\n cmd = \"{\\\"id\\\":8,\\\"method\\\":\\\"set_default\\\",\\\"params\\\":[]}\\r\\n\"\n request(cmd)\n end", "def default_backend(params = nil)\n if @name_index\n @conf.insert(@name_index + @conf.length, \" ...
[ "0.7139431", "0.6366682", "0.6076432", "0.6076415", "0.60186476", "0.6004642", "0.5943158", "0.59419143", "0.59221417", "0.58695", "0.5853145", "0.58173895", "0.5772551", "0.57647413", "0.57239795", "0.5716677", "0.5716677", "0.570859", "0.5694658", "0.56882954", "0.5640477",...
0.7440289
0
fullconn Specify at what backend load the servers will reach their maxconn May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments : is the number of connections on the backend which will make the servers use the maximal number of connections. When a server has a "maxconn" parame...
def fullconn(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "fullconn " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def connection_limit\n super\n end", "def connection_limit\n super\n end", "def connection_limit\n super\n end", "def connection_pool_minimum_size\n super\n end", "def maxconn(params = nil)\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"...
[ "0.5747535", "0.5747535", "0.5747535", "0.56827843", "0.55723476", "0.55723107", "0.5300821", "0.5255107", "0.50196326", "0.50196326", "0.50196326", "0.4996234", "0.49373028", "0.49312776", "0.48868924", "0.4833809", "0.48199552", "0.48156306", "0.4785617", "0.47565135", "0.4...
0.6250401
0
hashtype Specify a method to use for mapping hashes to servers May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments : mapbased the hash table is a static array containing all alive servers. The hashes will be very smooth, will consider weights, but will be static in that weigh...
def hash_type(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "hash_type " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hash(key); end", "def server_hash\n @server_hash ||= {}.tap do |h|\n num_members.times do |idx|\n h[\"server.#{idx}\"] = \"127.0.0.1:#{base_port + FOLLOWER_PORT_OFFSET + idx}:#{base_port + LEADER_PORT_OFFSET + idx}\"\n end\n end\n end", "def set_hash(hash, ha...
[ "0.58698434", "0.5782209", "0.57004726", "0.56289655", "0.55620515", "0.55620515", "0.55620515", "0.55620515", "0.55620515", "0.55620515", "0.55620515", "0.5534332", "0.55253077", "0.55253077", "0.55253077", "0.55253077", "0.55253077", "0.55253077", "0.55253077", "0.55253077", ...
0.606278
0
httpcheck disableon404 Enable a maintenance mode upon HTTP/404 response to healthchecks May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments : none When this option is set, a server which returns an HTTP code 404 will be excluded from further loadbalancing, but will still rece...
def http_check_disable_on_404 if @name_index @conf.insert(@name_index + @conf.length, " " + "http-check disable-on-404 " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_404\n end", "def disable\n run \"#{try_sudo} /sbin/chkconfig httpd off\"\n end", "def option_httpchk(params = nil)\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"option httpchk \" + params.to_s + \"\\n\")\n else\n puts \"no #{@proxy_t...
[ "0.59286493", "0.5745417", "0.54460806", "0.51404613", "0.50853604", "0.49407065", "0.4927928", "0.4927928", "0.49124205", "0.4898907", "0.477246", "0.4748249", "0.47387248", "0.47152156", "0.4712807", "0.47040087", "0.47014055", "0.46978575", "0.46942174", "0.46589717", "0.4...
0.72201276
0
httpcheck sendstate Enable emission of a state header with HTTP health checks May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments : none When this option is set, haproxy will systematically send a special header "XHaproxyServerState" with a list of parameters indicating to ea...
def http_check_send_state if @name_index @conf.insert(@name_index + @conf.length, " " + "http-check send-state " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def option_httpchk(params = nil)\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"option httpchk \" + params.to_s + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n end\n end", "def connection_status_handshake; end", "def...
[ "0.55890495", "0.5511058", "0.54341847", "0.53237367", "0.514339", "0.5113268", "0.5092777", "0.5073062", "0.5073062", "0.5065802", "0.5065802", "0.5044175", "0.5008582", "0.5005152", "0.49911967", "0.49909195", "0.4986703", "0.49765286", "0.49617386", "0.496056", "0.49482363...
0.6599203
0
option abortonclose no option abortonclose Enable or disable early dropping of aborted requests pending in queues. May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments : none In presence of very high loads, the servers will take some time to respond. The perinstance connection...
def option_abortonclose if @name_index @conf.insert(@name_index + @conf.length, " " + "option abortonclose " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def server_close_timeout\n super\n end", "def client_close_timeout\n super\n end", "def with_force_shutdown; end", "def option_http_server_close\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"option http-server-close \" + \"\\n\")\n else\n put...
[ "0.66273504", "0.66166776", "0.6259695", "0.59087336", "0.59034806", "0.59001595", "0.588442", "0.5775868", "0.57755744", "0.5771932", "0.5771932", "0.574288", "0.5731502", "0.57180315", "0.57154727", "0.56729126", "0.56729126", "0.566586", "0.56631863", "0.5631439", "0.56181...
0.6035109
3
option acceptinvalidhttpresponse no option acceptinvalidhttpresponse Enable or disable relaxing of HTTP response parsing May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments : none By default, HAProxy complies with RFC2616 in terms of message parsing. This means that invalid c...
def option_accept_invalid_http_response if @name_index @conf.insert(@name_index + @conf.length, " " + "option accept-invalid-http-response " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def option_accept_invalid_http_request\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"option accept-invalid-http-request \" + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n end\n end", "def option_http_use_proxy_header\...
[ "0.6918262", "0.64957833", "0.6306193", "0.6011597", "0.5797624", "0.570236", "0.5674971", "0.56543255", "0.56318396", "0.5606058", "0.56024504", "0.5563361", "0.55335957", "0.55118155", "0.5503529", "0.54951745", "0.5494269", "0.54757726", "0.5466533", "0.546361", "0.5441515...
0.7425805
0
option allbackups no option allbackups Use either all backup servers at a time or only the first one May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments : none By default, the first operational backup server gets all traffic when normal servers are all down. Sometimes, it may...
def option_allbackups if @name_index @conf.insert(@name_index + @conf.length, " " + "option allbackups " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def backups\n if args.count == 0\n list_backups\n else\n command = shift_argument\n case command\n when 'list' then list_backups\n when 'info' then backup_status\n when 'capture' then capture_backup\n when 'restore' then restore_backup\n when 'public-url' then public_u...
[ "0.65338653", "0.62858206", "0.6081731", "0.5793215", "0.5680945", "0.5638725", "0.5625656", "0.5622793", "0.556335", "0.55630994", "0.5541506", "0.5491943", "0.5477891", "0.54724205", "0.5447304", "0.54284596", "0.54280716", "0.5332609", "0.5307504", "0.52789533", "0.5259497...
0.6497754
1
option checkcache no option checkcache Analyze all server responses and block requests with cacheable cookies May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments : none Some highlevel frameworks set application cookies everywhere and do not always let enough control to the de...
def option_checkcache if @name_index @conf.insert(@name_index + @conf.length, " " + "option checkcache " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _cache_control; end", "def vary_page_caching_on_user\n response.headers['Vary'] = 'Cookie'\n end", "def add_cache_control; end", "def set_cache_buster\n if !request.user_agent.blank? && !request.user_agent.scan(/Safari/).empty? && request.user_agent.scan(/Chrome/).empty? && Rails.env.developme...
[ "0.6598467", "0.65071136", "0.63907313", "0.63636905", "0.6292383", "0.6274146", "0.6226553", "0.6223698", "0.6194753", "0.6187166", "0.61547935", "0.6153278", "0.61410105", "0.6132082", "0.61315715", "0.6117804", "0.61112344", "0.61029273", "0.6091834", "0.6091834", "0.60918...
0.0
-1
option httpchk option httpchk option httpchk option httpchk Enable HTTP protocol to check on the servers health May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments : is the optional HTTP method used with the requests. When not set, the "OPTIONS" method is used, as it generall...
def option_httpchk(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "option httpchk " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def options\n\t\t# we don't support sending a payload in options' body.\n\t\treq = Net::HTTP::Options.new(@uri.path)\n\t\tdo_http req\n\tend", "def http_options; end", "def http_options\n {\n followlocation: true,\n ssl_verifypeer: false,\n ssl_verifyhost: 0\n ...
[ "0.64552015", "0.6408149", "0.62718207", "0.61751264", "0.60727316", "0.59418386", "0.5862569", "0.5855724", "0.5746011", "0.5735493", "0.5628684", "0.5627831", "0.5607448", "0.5579449", "0.55364555", "0.5528349", "0.5516864", "0.5508045", "0.55007964", "0.5494612", "0.548131...
0.6895899
0
option ldapcheck Use LDAPv3 health checks for server testing May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments : none It is possible to test that the server correctly talks LDAPv3 instead of just testing that it accepts the TCP connection. When this option is set, an LDAPv3...
def option_ldap_check if @name_index @conf.insert(@name_index + @conf.length, " " + "option ldap-check " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def config_ldap_start\n\n\t\t`chkconfig --level 3 ldap on`\n\t\t`service ldap start`\n\n\t\tldap_status = `service ldap status`\n\n\t\tif ldap_status.include? \"running\"\n\t\t\tputs \"LDAP Server was started correctly\"\n\t\telsif ldap_status.include? \"stopped\"\n\t\t\tputs \"LDAP server is not started or is not...
[ "0.61228746", "0.57786924", "0.568145", "0.557857", "0.54866964", "0.5462571", "0.5386442", "0.53445864", "0.5283377", "0.52426654", "0.5222904", "0.5171028", "0.51614475", "0.5158263", "0.5149581", "0.51305896", "0.51030135", "0.5100009", "0.50289404", "0.5017624", "0.498359...
0.68994695
0
option loghealthchecks no option loghealthchecks Enable or disable logging of health checks May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments : none Enable health checks logging so it possible to check for example what was happening before a server crash. Failed health chec...
def option_log_health_checks if @name_index @conf.insert(@name_index + @conf.length, " " + "option log-health-checks " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def option_httplog\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"option httplog \" + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n end\n end", "def healthchecks\n write_test = Add.write_test\n detect_inf...
[ "0.5879463", "0.58495456", "0.5593345", "0.557704", "0.557704", "0.5575489", "0.5571628", "0.55528736", "0.5478711", "0.545073", "0.53895146", "0.5373992", "0.5361114", "0.53488994", "0.52704626", "0.5269984", "0.5250105", "0.5247322", "0.5236136", "0.5222748", "0.5214386", ...
0.76303697
0
option persist no option persist Enable or disable forced persistence on down servers May be used in sections: defaults | frontend | listen | backend yes | no | yes | yes Arguments : none When an HTTP request reaches a backend with a cookie which references a dead server, by default it is redispatched to another server...
def option_persist if @name_index @conf.insert(@name_index + @conf.length, " " + "option persist " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def persistent; opt('persistent'); end", "def session_options; end", "def session_options; end", "def set_server_option(opt)\n check_connection\n @protocol.set_option_command opt\n self\n end", "def session_options=(_arg0); end", "def session_options=(_arg0); end", "def configure_server(optio...
[ "0.63972753", "0.5913194", "0.5913194", "0.5690943", "0.5609118", "0.5609118", "0.55722094", "0.5525373", "0.53693974", "0.5328258", "0.53195757", "0.5314855", "0.5291296", "0.52899265", "0.52772486", "0.5171412", "0.51213884", "0.51061875", "0.5096625", "0.5089374", "0.50735...
0.5222459
15
option redispatch no option redispatch Enable or disable session redistribution in case of connection failure May be used in sections: defaults | frontend | listen | backend yes | no | yes | yes Arguments : none In HTTP mode, if a server designated by a cookie is down, clients may definitely stick to it because they ca...
def option_redispatch if @name_index @conf.insert(@name_index + @conf.length, " " + "option redispatch " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def option_http_pretend_keepalive\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"option http-pretend-keepalive \" + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n end\n end", "def proxy_set?; end", "def proxy(arg = ni...
[ "0.5872812", "0.5871217", "0.5832561", "0.5765164", "0.56947327", "0.5663301", "0.55895805", "0.54510313", "0.54491943", "0.5411902", "0.53743947", "0.53637743", "0.53637743", "0.53637743", "0.53635526", "0.5352368", "0.534262", "0.53416806", "0.5325783", "0.52794194", "0.527...
0.6957322
0
option smtpchk option smtpchk Use SMTP health checks for server testing May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments : is an optional argument. It is the "hello" command to use. It can be either "HELO" (for SMTP) or "EHLO" (for ESTMP). All other values will be turned i...
def option_smtpchk(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "option smtpchk " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_smtp\n flag=false\n msg='smtp not ok'\n domain=self.from.split('@')\n @fromdomain = domain[1]\n if @mx.include?('google') or @mx.include?('live.com')\n # DO I Need to do this?\n flag=true\n msg=\"smtp not checked since google or live: #{@mx}\"\n else\...
[ "0.62937844", "0.6011013", "0.59502685", "0.58785325", "0.58006597", "0.5698716", "0.5698017", "0.5691927", "0.56627727", "0.56152993", "0.5602687", "0.5581644", "0.5554615", "0.5530576", "0.552612", "0.55238086", "0.5515456", "0.5509909", "0.55078965", "0.54964215", "0.54458...
0.69193834
0
option srvtcpka no option srvtcpka Enable or disable the sending of TCP keepalive packets on the server side May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments : none When there is a firewall or any sessionaware component between a client and a server, and when the protocol ...
def option_srvtcpka if @name_index @conf.insert(@name_index + @conf.length, " " + "option srvtcpka " + "\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.6432534", "0.62318563", "0.5937865", "0.5924224", "0.5890279", "0.57480574", "0.56775475", "0.55842537", "0.5555616", "0.5539672", "0.54944485", "0.5475333", "0.5437741", "0.54322463", "0.5409963", "0.537501", "0.5331424", "0.5293286", "0.528841", "0.5283442", "0.52815926"...
0.61657727
2
option sslhellochk Use SSLv3 client hello health checks for server testing May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments : none When some SSLbased protocols are relayed in TCP mode through HAProxy, it is possible to test that the server correctly talks SSL instead of ju...
def option_ssl_hello_chk if @name_index @conf.insert(@name_index + @conf.length, " " + "option ssl-hello-chk " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check(host, port = 443)\n # Connect\n s = TCPSocket.new(host, port)\n\n # Send ClientHello message\n s.write(TLS_HANDSHAKE)\n\n # Foolishly wait for ServerHelloDone message\n loop until read_tls_header_type(s) == 22 and read_tls_handshake_type(s) == 14\n\n # Send Heartbeat Request message\n s.write(TLS...
[ "0.620998", "0.6056316", "0.59055346", "0.5849379", "0.5777572", "0.5736927", "0.5688159", "0.55726254", "0.55262023", "0.55228275", "0.54870343", "0.5486102", "0.5479953", "0.54738885", "0.54738885", "0.54718083", "0.54654914", "0.5444903", "0.54209816", "0.54206616", "0.541...
0.75379586
0
option tcpsmartaccept no option tcpsmartaccept Enable or disable the saving of one ACK packet during the accept sequence May be used in sections : defaults | frontend | listen | backend yes | yes | yes | no Arguments : none When an HTTP connection request comes in, the system acknowledges it on behalf of HAProxy, then ...
def option_tcp_smart_connect if @name_index @conf.insert(@name_index + @conf.length, " " + "option tcp-smart-connect " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def option_tcp_smart_accept\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"option tcp-smart-accept \" + \"\\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...
[ "0.76642966", "0.661285", "0.5612595", "0.5505284", "0.5465569", "0.54583275", "0.5443917", "0.54255116", "0.5366289", "0.5317486", "0.52865547", "0.5272648", "0.52699655", "0.5261151", "0.52528036", "0.5247451", "0.5233552", "0.5233552", "0.5233552", "0.5233305", "0.5214157"...
0.68095386
1
option transparent no option transparent Enable clientside transparent proxying May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments : none This option was introduced in order to provide layer 7 persistence to layer 3 load balancers. The idea is to use the OS's ability to redi...
def option_transparent if @name_index @conf.insert(@name_index + @conf.length, " " + "option transparent " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def proxy_pass; end", "def using_proxy?; end", "def legitimate_proxy?; end", "def proxy_set?; end", "def using_authenticated_proxy?; end", "def set_proxy(address, port, user = T.unsafe(nil), password = T.unsafe(nil)); end", "def proxy_addr; end", "def set_proxy(addr, port = T.unsafe(nil), user = T.un...
[ "0.6645747", "0.6610411", "0.62377685", "0.6236428", "0.61575675", "0.61380184", "0.6122989", "0.61197346", "0.6101799", "0.60803884", "0.6027773", "0.5996738", "0.59944206", "0.5943108", "0.5922367", "0.5920919", "0.5878424", "0.5847405", "0.5835027", "0.5775556", "0.5770429...
0.5507955
42
persist rdpcookie persist rdpcookie(name) Enable RDP cookiebased persistence May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments : is the optional name of the RDP cookie to check. If omitted, the default cookie name "msts" will be used. There currently is no valid reason to c...
def persist_rdp_cookie(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "persist rdp-cookie " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def install_persistent_cookie(name, cookie)\n cookies[name] = {\n :value => cookie,\n :expires => 10.years.from_now\n }\n end", "def cookie=(val)\n @xmlrpc.cookie = val\n end", "def store_cookie variable_name\r\n command 'storeCookie', variable_name\r\n end", "def cooki...
[ "0.56595606", "0.553963", "0.5501733", "0.5201651", "0.51900125", "0.5058846", "0.50304186", "0.50249803", "0.50046", "0.49450755", "0.49293995", "0.49139562", "0.48801577", "0.48178372", "0.4815246", "0.4815246", "0.4804466", "0.4796358", "0.4794724", "0.47893977", "0.478393...
0.7226881
0
retries Set the number of retries to perform on a server after a connection failure May be used in sections: defaults | frontend | listen | backend yes | no | yes | yes Arguments : is the number of times a connection attempt should be retried on a server when a connection either is refused or times out. The default val...
def retries(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "retries " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nretries\n options[:nretries]\n end", "def with_retries(retries)\n @retries = retries unless retries.nil?\n self\n end", "def retry_options\n {tries: 15, sleep: 1}\n end", "def with_retry(retries: 3)\n retries = 0 if retries.nil? || retries.negative?\n\n 0.upt...
[ "0.7211911", "0.7065422", "0.68465495", "0.6666255", "0.66244525", "0.6561911", "0.62986517", "0.62084556", "0.62080985", "0.6202191", "0.6160445", "0.61290646", "0.6112286", "0.6110809", "0.6110281", "0.6075171", "0.60368276", "0.59638536", "0.5950893", "0.5943259", "0.59185...
0.6206097
9
stats auth : Enable statistics with authentication and grant access to an account May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments : is a user name to grant access to is the cleartext password associated to this user This statement enables statistics with default settings,...
def stats_auth(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "stats auth " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def authentication_statistics\n super\n end", "def stats\n StatsManager::StatsD.time(Settings::StatsConstants.api['user']['stats']) do\n if params[:id] == current_user.id.to_s\n # A regular user can only view his/her own stats\n @user = current_user\n elsif current_user.is_admi...
[ "0.65589666", "0.606022", "0.5943581", "0.5942245", "0.58613265", "0.57822627", "0.57800245", "0.5743967", "0.5702773", "0.569177", "0.5649449", "0.5621733", "0.55584353", "0.5550234", "0.55491465", "0.5542543", "0.5541573", "0.554153", "0.5538399", "0.5527657", "0.5516687", ...
0.66018707
0
stats enable Enable statistics reporting with default settings May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments : none This statement enables statistics reporting with default settings defined at build time. Unless stated otherwise, these settings are used : stats uri : /h...
def stats_enable if @name_index @conf.insert(@name_index + @conf.length, " " + "stats enable " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def statd_config\n Octo.get_config :statsd\n end", "def statistics(opts)\n opts = check_params(opts,[:server_names])\n super(opts)\n end", "def admin_stats\n logger.debug('Getting admin statistics') if @debug\n get('/api/admin/stats')\n end", "def enableDebriefingStats \n ...
[ "0.6153659", "0.577244", "0.57608646", "0.5758826", "0.5642294", "0.56324506", "0.55671304", "0.5554523", "0.5554523", "0.5550804", "0.55229926", "0.5522955", "0.5522955", "0.55184317", "0.551055", "0.55047435", "0.55047435", "0.5501837", "0.54869735", "0.54864377", "0.548252...
0.67021406
0
stats hideversion Enable statistics and hide HAProxy version reporting May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments : none By default, the stats page reports some useful status information along with the statistics. Among them is HAProxy's version. However, it is gener...
def stats_hide_version if @name_index @conf.insert(@name_index + @conf.length, " " + "stats hide-version " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def statd_config\n Octo.get_config :statsd\n end", "def server_page_stats(params)\n s = \"\"\n params[:stats].each do |stat|\n # Show counters at the top\n if stat.class == Counter and stat.conditions.server == params[:server]\n s << output_counter(stat:stat)\n end\n end\n ...
[ "0.58021957", "0.5715252", "0.5639647", "0.5615604", "0.5611665", "0.5596112", "0.55941737", "0.55139154", "0.55017275", "0.55009586", "0.54762655", "0.54613584", "0.54445255", "0.5428566", "0.54275197", "0.5417176", "0.540843", "0.54033375", "0.5382796", "0.5382796", "0.5380...
0.6851004
0
stats realm Enable statistics and set authentication realm May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments : is the name of the HTTP Basic Authentication realm reported to the browser. The browser uses it to display it in the popup inviting the user to enter a valid usern...
def stats_realm(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "stats realm " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def stats_auth(params = nil)\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"stats auth \" + params.to_s + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n end\n end", "def challenge\n 'Basic realm=\"%s\"' % realm\n...
[ "0.643567", "0.5825566", "0.5666438", "0.5521828", "0.54936147", "0.54858506", "0.5449929", "0.54005015", "0.5398471", "0.5378987", "0.53317016", "0.5273781", "0.5257405", "0.5255894", "0.5201734", "0.5192755", "0.5187281", "0.51703393", "0.5143579", "0.51407295", "0.51298684...
0.66375625
0
stats refresh Enable statistics with automatic refresh May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments : is the suggested refresh delay, specified in seconds, which will be returned to the browser consulting the report page. While the browser is free to apply any delay, i...
def stats_refresh(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "stats refresh " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def enable_refresh\n add option: \"-refresh=true\"\n end", "def refresh=(refresh)\n @options[:refresh] = refresh\n end", "def refresh=(value)\n conf['dashboard']['refresh'] = value.to_i\n end", "def refresh\n conf['dashboard']['refresh'].to_s\n end", "def refresh_interval\n @refres...
[ "0.6469464", "0.64555967", "0.6428985", "0.6369134", "0.5990112", "0.5990112", "0.5990112", "0.5882292", "0.5882292", "0.5827157", "0.5722472", "0.5722109", "0.5722109", "0.5705021", "0.569951", "0.5697138", "0.5672822", "0.5647774", "0.56401277", "0.56010264", "0.55425316", ...
0.6918765
0
stats showdesc [ ] Enable reporting of a description on the statistics page. May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes is an optional description to be reported. If unspecified, the description from global section is automatically used instead. This statement is useful for us...
def stats_show_desc(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "stats show-desc " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def stats_show_node(params = nil)\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"stats show-node \" + params.to_s + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return false\n end\n end", "def show_stat\n \t\tputs \"=============St...
[ "0.5405571", "0.53818417", "0.5362207", "0.534833", "0.5300508", "0.5294457", "0.52358943", "0.52181095", "0.5208032", "0.5183832", "0.5177179", "0.51650816", "0.51614404", "0.5128372", "0.509542", "0.50654745", "0.5050992", "0.5041236", "0.50239855", "0.501742", "0.49752557"...
0.6875235
0
stats showlegends Enable reporting additional informations on the statistics page : cap: capabilities (proxy) mode: one of tcp, http or health (proxy) id: SNMP ID (proxy, socket, server) IP (socket, server) cookie (backend, server) Though this statement alone is enough to enable statistics reporting, it is recommended ...
def stats_show_legends if @name_index @conf.insert(@name_index + @conf.length, " " + "stats show-legends " + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def html_report_stats\n @report << '<div id=\"title\"> General Statistics</div>'\n stat_tab = Ruport::Data::Table(%w[Stat Value])\n stat_tab << ['Number of servers Seen', @num_servers]\n stat_tab << ['Number of clients Seen', @num_clients]\n @num_by_cipher.each do |cipher, num|\n stat_tab << ['...
[ "0.5808059", "0.57640725", "0.5631291", "0.5620925", "0.55730987", "0.5557111", "0.5459166", "0.54346496", "0.5398556", "0.5305569", "0.5301888", "0.5292087", "0.5276891", "0.52575433", "0.52504766", "0.52277654", "0.52263314", "0.52263314", "0.518355", "0.51729965", "0.51646...
0.6700875
0
stats shownode [ ] Enable reporting of a host name on the statistics page. May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments: is an optional name to be reported. If unspecified, the node name from global section is automatically used instead. This statement is useful for us...
def stats_show_node(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "stats show-node " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def help_node_stats_data(name = nil)\n ns = __elasticsearch__.client.nodes.stats(:format => 'json')\n if name\n filtered_ns = ns['nodes'].keys.map do |k|\n [ k, ns['nodes'][k] ] if ns['nodes'][k]['name'] == name\n ...
[ "0.5758987", "0.55847585", "0.5400733", "0.527044", "0.5079799", "0.50696707", "0.50279015", "0.49855644", "0.49162826", "0.48884463", "0.476712", "0.4766105", "0.47424367", "0.47064832", "0.46464592", "0.46431327", "0.4591711", "0.4585582", "0.4577477", "0.45754603", "0.4562...
0.6735571
0
stats uri Enable statistics and define the URI prefix to access them May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments : is the prefix of any URI which will be redirected to stats. This prefix may contain a question mark ('?') to indicate part of a query string. The statist...
def stats_uri(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "stats uri " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def stats\n request :get, \"_stats\"\n end", "def stats\n request :get, \"_stats\"\n end", "def raw_stats\n url = URI.parse(stats_url)\n Net::HTTP.start(url.host, url.port) {|http|\n http.request(Net::HTTP::Get.new(url.path))\n }.body\nend", "def stats\n Client.current.get(\"#{reso...
[ "0.598839", "0.598839", "0.5889647", "0.5807647", "0.5742162", "0.57194406", "0.5710735", "0.570658", "0.5549233", "0.5545794", "0.5537007", "0.5533834", "0.55301124", "0.5505275", "0.54852295", "0.54639393", "0.54368895", "0.54348046", "0.54348046", "0.5434501", "0.54191697"...
0.67773414
0
timeout check Set additional check timeout, but only after a connection has been already established. May be used in sections: defaults | frontend | listen | backend yes | no | 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 u...
def timeout_check(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "timeout check " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def connect_timeout=(_arg0); end", "def timeout(*args, &blk)\n (@client ||= connect).timeout(*args, &blk)\n end", "def timeout\n configuration[:timeout] || DEFAULT_TIMEOUT\n end", "def timeout\n configuration[:timeout] || DEFAULT_TIMEOUT\n end", "def test_connect_timeout_get\n connect_ti...
[ "0.6674906", "0.6578574", "0.65774053", "0.65774053", "0.65204626", "0.65150464", "0.6444158", "0.6444158", "0.64132506", "0.636309", "0.6345745", "0.6338874", "0.63345855", "0.63211805", "0.6289646", "0.62809956", "0.626602", "0.62292933", "0.6221718", "0.6211981", "0.620412...
0.61417025
27
timeout connect timeout contimeout (deprecated) Set the maximum time to wait for a connection attempt to a server to succeed. May be used in sections : defaults | frontend | listen | backend yes | no | yes | yes Arguments : is the timeout value specified in milliseconds by default, but can be in any other unit if the n...
def timeout_connect(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "timeout connect " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def connect_timeout=(_arg0); end", "def connect_timeout; end", "def connect_timeout; end", "def setconnectiontimeout(timeout)\r\n setvalue(@@CONNECTION_TIMEOUT, timeout)\r\n end", "def timeout(*args, &blk)\n (@client ||= connect).timeout(*args, &blk)\n end", "def connect_timeout\n @conne...
[ "0.7657321", "0.7564982", "0.7564982", "0.74672455", "0.738646", "0.73222744", "0.7244933", "0.7089819", "0.70699453", "0.70600224", "0.70600224", "0.7030772", "0.6979871", "0.69323033", "0.68899006", "0.68894655", "0.68622214", "0.6831118", "0.6806111", "0.6778726", "0.67162...
0.69156003
14
timeout queue Set the maximum time to wait in the queue for a connection slot to be free May be used in sections : defaults | frontend | listen | backend yes | no | 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, as exp...
def timeout_queue(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "timeout queue " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def queue_respond_timeout(ttr=nil)\n if ttr\n @queue_respond_timeout = ttr\n else # accessor\n @queue_respond_timeout\n end\n end", "def test_timeout\n @client.queue_name = \"test_timeout\"\n clear_queue\n\n res = @client.messages.post(\"hello world timeout!\"...
[ "0.6522209", "0.63895273", "0.63643426", "0.63631856", "0.62775606", "0.6275269", "0.6275269", "0.6263997", "0.6229504", "0.61727893", "0.6130288", "0.61283886", "0.61099845", "0.60842496", "0.6041719", "0.60350066", "0.6010524", "0.59027314", "0.59027314", "0.5894746", "0.58...
0.6880297
0
timeout server timeout srvtimeout (deprecated) Set the maximum inactivity time on the server side. May be used in sections : defaults | frontend | listen | backend yes | no | 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 un...
def timeout_server(params = nil) if @name_index @conf.insert(@name_index + @conf.length, " " + "timeout server " + params.to_s + "\n") else puts "no #{@proxy_type} name assigned" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def server_timeout\n get_configuration 'server_timeout', @config\n rescue\n 60\n end", "def request_timeout(type, options); end", "def http_timeout=(_arg0); end", "def timeout_seconds\n return 1200\n end", "def http_timeout; end", "def configure_timeout(options, env)\n req = ...
[ "0.7570186", "0.7540286", "0.72406363", "0.7203524", "0.71984005", "0.71508557", "0.7148233", "0.7052276", "0.7052276", "0.70509076", "0.7024441", "0.70087355", "0.69895107", "0.6976874", "0.6940212", "0.69334435", "0.6897683", "0.6897683", "0.68775666", "0.6868583", "0.68547...
0.63504094
70
Compile the HAproxy configuration
def config if @name_index proxy_config = @conf[0].to_s + @conf.uniq[1..@conf.length].join + "\n" return proxy_config else puts "#{@proxy_type} name not defined" return false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def build_haproxy_file\n write_to_file_for(\"haproxy\") do\n servers=<<-EOS\n#{nodes.collect {|node| node.haproxy_entry}.join(\"\\n\")}\n EOS\n open(Application.haproxy_config_file).read.strip ^ {:servers => servers, :host_port => Application.host_port}\n end\n end", "def new_co...
[ "0.7043067", "0.6114202", "0.5908521", "0.57456154", "0.568664", "0.56707495", "0.56561834", "0.55792415", "0.5545544", "0.5532095", "0.5530307", "0.5526417", "0.5526417", "0.54916984", "0.5490266", "0.54832715", "0.5450701", "0.5445695", "0.5441748", "0.5439725", "0.54314697...
0.5037834
89
Typically, your create method would look up a user in the database, verify their login credentials, and then store the authenticated user's id in the session. We're not going to do any of that right now. Our sessions controller is just going to trust that you are who you say you are.
def create session[:name] = params[:name] if session[:name] == nil || session[:name] == "" redirect_to '/login' else redirect_to '/' end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n unless session[:user_id].present?\n user = User.create_user\n session[:user_id] = user.id\n end\n end", "def create\n # AR model which will interact with our database and create a new user\n user = User.new(user_params)\n saveUser = user.save\n \n if saveUser\n s...
[ "0.85909414", "0.8236107", "0.8198793", "0.8136512", "0.8135105", "0.81289476", "0.8106575", "0.80785817", "0.805498", "0.8038632", "0.80164695", "0.80068576", "0.80062395", "0.7997353", "0.7989529", "0.7987756", "0.7979254", "0.7978173", "0.79727936", "0.7958645", "0.7954066...
0.0
-1
Challenge is waiting for the ACME server to either verify or reject it
def pending? self.state == :created || self.state == :requested end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def meets_challenge?\n true\n end", "def get_challenge\n @ruby\n @done\n end", "def verify\n create_order\n start_challenge\n wait_verify_status\n check_verify_status\n rescue Acme::Client::Error => e\n retry_on_verify_error(e)\n end", "def chal...
[ "0.68206847", "0.6594621", "0.65844995", "0.6108281", "0.61070037", "0.60905945", "0.60721153", "0.6056076", "0.6009967", "0.5904447", "0.5887126", "0.5876501", "0.58056766", "0.5794553", "0.5793211", "0.5704552", "0.56895864", "0.56895864", "0.5688495", "0.5628519", "0.56172...
0.0
-1
Challenge has expired, and can no longer be used for verification
def expired? self.expires_at && Time.now > self.expires_at end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_expiration; end", "def verify_expiration; end", "def expired?; end", "def verify_expiration=(_arg0); end", "def verify_expiration=(_arg0); end", "def confirmation_period_expired?; end", "def meets_challenge?\n true\n end", "def token_expired\n @token.nil? || Time.now >= @token_exp...
[ "0.6956092", "0.6956092", "0.6807685", "0.6215418", "0.6215418", "0.61916035", "0.61831284", "0.6158185", "0.6091002", "0.60799086", "0.60646015", "0.60611534", "0.605913", "0.60439485", "0.60257894", "0.599205", "0.59887594", "0.5959455", "0.5904568", "0.5877121", "0.5875469...
0.0
-1
Domain authorization challenge is deployable to the linked grid service
def deployable? self.grid_service_id && self.pending? && !expired? end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def host_authorization; end", "def host_authorization; end", "def host_authorization=(_arg0); end", "def host_authorization=(_arg0); end", "def authorization; end", "def access_control\n \n end", "def valid_for_http_auth?; end", "def authorize\n end", "def authorize\n end", "def authorize(o...
[ "0.7352495", "0.7352495", "0.6693685", "0.6693685", "0.6254506", "0.5884871", "0.5864269", "0.58548003", "0.58548003", "0.58499885", "0.5842588", "0.5841009", "0.579253", "0.57782793", "0.57782793", "0.5768916", "0.5763036", "0.57362986", "0.5695538", "0.5680932", "0.56708163...
0.0
-1
Can this domain be reauthorized by the Kontena server?
def auto_renewable? return false unless grid_service case authorization_type when 'dns-01' false when 'http-01' true when 'tls-sni-01' true end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def host_authorization; end", "def host_authorization; end", "def exec_granted?(controler, xllave)\n\t\tauth = Execremotekey.where(\"controler= '#{controler}' AND llave = '#{xllave}' \").first\n\t\tif auth == nil\n\t\t\tredirect_to noautorizado_url, notice: \"No esta autorizado a entrar a esta opcion\"\n\t\t\t...
[ "0.61043626", "0.61043626", "0.604724", "0.59788686", "0.58186346", "0.5790141", "0.5773713", "0.5773713", "0.57414323", "0.56924844", "0.56924844", "0.56903327", "0.56903327", "0.5667568", "0.5646505", "0.5643909", "0.5643167", "0.5641655", "0.5630547", "0.562051", "0.559345...
0.55397284
23
GET /squadron_documents/1 GET /squadron_documents/1.json
def show @squadron_document = SquadronDocument.find(params[:id]) respond_to do |format| format.html # show.html.erb format.json { render :json => @squadron_document } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @squadron_document = SquadronDocument.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json => @squadron_document }\n end\n end", "def documents\n return bad_request unless params[:id] and request.format.json? || request.format.js? || request.fo...
[ "0.7180475", "0.695415", "0.68452567", "0.67464364", "0.67165697", "0.6702721", "0.66915715", "0.667267", "0.6655164", "0.6654005", "0.664761", "0.6626573", "0.66141087", "0.66141087", "0.66141087", "0.66141087", "0.66141087", "0.66141087", "0.66141087", "0.65871745", "0.6582...
0.79037803
0
GET /squadron_documents/new GET /squadron_documents/new.json
def new @squadron_document = SquadronDocument.new respond_to do |format| format.html # new.html.erb format.json { render :json => @squadron_document } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n \n @document = Document.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @document }\n end\n \n end", "def create\n @squadron_document = SquadronDocument.new(params[:squadron_document])\n\n respond_to do |format|\n if @squadron_do...
[ "0.76476735", "0.75850904", "0.7470828", "0.7441548", "0.74379236", "0.74379236", "0.74379236", "0.74379236", "0.74379236", "0.74379236", "0.74379236", "0.74379236", "0.74379236", "0.72719365", "0.71981454", "0.7109481", "0.7086746", "0.7079699", "0.7074157", "0.7043233", "0....
0.8114008
0
POST /squadron_documents POST /squadron_documents.json
def create @squadron_document = SquadronDocument.new(params[:squadron_document]) respond_to do |format| if @squadron_document.save format.html { redirect_to @squadron_document, :notice => 'Squadron document was successfully created.' } format.json { render :json => @squadron_document, :st...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @squadron_document = SquadronDocument.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json => @squadron_document }\n end\n end", "def create\n @document = Document.new(params[:document])\n\n respond_to do |format|\n if @document.save\n ...
[ "0.68216115", "0.65731335", "0.65251374", "0.6467038", "0.63983685", "0.6370824", "0.63393843", "0.6332797", "0.63280237", "0.6308282", "0.6291677", "0.6291677", "0.625019", "0.62436974", "0.62257034", "0.62150973", "0.6214229", "0.621407", "0.6210961", "0.6184453", "0.616232...
0.7889086
0
PUT /squadron_documents/1 PUT /squadron_documents/1.json
def update @squadron_document = SquadronDocument.find(params[:id]) respond_to do |format| if @squadron_document.update_attributes(params[:squadron_document]) format.html { redirect_to @squadron_document, :notice => 'Squadron document was successfully updated.' } format.json { head :ok } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def put_document index, id, document\n uri = URI(\"http://#{@host}:#{@port_s}/#{index}/_doc/#{id}\")\n req = Net::HTTP::Put.new(uri)\n req.body = document.to_json\n run(uri, req)\n end", "def create\n @squadron_document = SquadronDocument.new(params[:squadron_document])\n\n respond_to do |form...
[ "0.7061224", "0.69661355", "0.6790723", "0.6660207", "0.6534717", "0.6514356", "0.6363338", "0.6359216", "0.63313377", "0.6320046", "0.63084143", "0.6275998", "0.62428033", "0.6210395", "0.62096", "0.62033415", "0.6163589", "0.61630166", "0.61452085", "0.6133198", "0.6129009"...
0.7672286
0
DELETE /squadron_documents/1 DELETE /squadron_documents/1.json
def destroy @squadron_document = SquadronDocument.find(params[:id]) @squadron_document.destroy respond_to do |format| format.html { redirect_to squadron_documents_url } format.json { head :ok } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete\n @client.delete_document(@path)\n end", "def delete_document index, id\n uri = URI(\"http://#{@host}:#{@port_s}/#{index}/_doc/#{id}\")\n req = Net::HTTP::Delete.new(uri)\n run(uri, req)\n end", "def delete_document( doc_id: )\n params = {}\n params[:backtrace] = ...
[ "0.74225044", "0.7156504", "0.70361644", "0.69994044", "0.6996066", "0.6996066", "0.6996066", "0.6996066", "0.6996066", "0.69713736", "0.69713736", "0.6968517", "0.69599867", "0.69598824", "0.6927818", "0.6919883", "0.6919883", "0.6919883", "0.6919883", "0.6919883", "0.691988...
0.8013461
0
validates :tags_id, :presence => true validates :description, :presence => true validates :date_in, :presence => true validates :date_out, :presence => true
def validate_end_date_before_start_date return if date_out.nil? if date_out && date_in errors.add(:date_in, ": could not be after than Date out") if date_out < date_in end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def validate(tags)\n return tags if opts[:novalidate]\n\n tags.tap do |t|\n t.each_pair do |name, value|\n validate_method = \"validate_#{name}\".to_sym\n\n unless respond_to?(validate_method)\n raise Aur::Exception::InvalidTagName, \"cannot validate '#{name}'\"\n ...
[ "0.63624024", "0.6256308", "0.6226243", "0.61441076", "0.60347784", "0.6034018", "0.6034018", "0.6026333", "0.6009182", "0.60047114", "0.6002192", "0.59941673", "0.5984467", "0.5925385", "0.58932704", "0.5891759", "0.58573836", "0.5832517", "0.5825479", "0.58215904", "0.58082...
0.5816437
20
You may assume that every word contains at least one letter, and that the string will always contain at least one word. You may also assume that each string contains nothing but words and spaces =begin PROBLEM Input: string of words separated by spaces Output: string arugment with each word first and last letters swapp...
def swap(string) # swapped_words = [] string.split.each do |word| word[0], word[-1] = word[-1], word[0] # swapped_words << word end.join(' ') # swapped_words end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def swap_words(string)\n swapped = string.split(' ').map { |word| swap_characters(word) }.join(' ')\nend", "def swap(input)\n array = input.split(' ')\n array.map! { |word| word.chars }\n array.map! do |word|\n word[0], word[-1] = word[-1], word[0]\n word.join('')\n end\n array.join(' ')\nend", "de...
[ "0.81236714", "0.8015755", "0.80136126", "0.8009676", "0.80041033", "0.80002475", "0.7846596", "0.78314024", "0.77923983", "0.7790645", "0.7696593", "0.7687309", "0.76762015", "0.76663214", "0.76512885", "0.7627778", "0.7599986", "0.755612", "0.7535763", "0.7515355", "0.75128...
0.7729328
10
Time Complexity O(logn) n is the number itself Space Complexity O(logn)
def super_digit(n) return n if n/10 == 0 sum = n % 10 while n/10 != 0 n = n/10 sum += n % 10 end return super_digit(sum) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def solution(n)\n # write your code in Ruby 2.2\n a = Math.sqrt(n).floor\n a -= 1 while n % a != 0\n b = n / a\n (a + b) * 2\nend", "def solution(n)\n x = (n**0.5).floor\n (1..x).reduce(0) { |s, i| n % i == 0 ? s += (i * i == n ? 1 : 2) : s }\nend", "def process n\n i = 1\n while (2**i <= n)...
[ "0.6786572", "0.67022836", "0.66225535", "0.65753216", "0.65427095", "0.65403783", "0.65218854", "0.65008056", "0.6452183", "0.6397844", "0.63949513", "0.63835984", "0.6375167", "0.6372401", "0.6371695", "0.6348874", "0.6346927", "0.6342889", "0.6312363", "0.630731", "0.63005...
0.0
-1
Time Complexity O(logn) n is the number itself Space Complexity O(logn)
def refined_super_digit(n, k) return n if k == 1 && n/10 == 0 sum = 0 sum += super_digit(n) * k return super_digit(sum) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def solution(n)\n # write your code in Ruby 2.2\n a = Math.sqrt(n).floor\n a -= 1 while n % a != 0\n b = n / a\n (a + b) * 2\nend", "def solution(n)\n x = (n**0.5).floor\n (1..x).reduce(0) { |s, i| n % i == 0 ? s += (i * i == n ? 1 : 2) : s }\nend", "def process n\n i = 1\n while (2**i <= n)...
[ "0.6786572", "0.67022836", "0.66225535", "0.65753216", "0.65427095", "0.65403783", "0.65218854", "0.65008056", "0.6452183", "0.6397844", "0.63949513", "0.63835984", "0.6375167", "0.6372401", "0.6371695", "0.6348874", "0.6346927", "0.6342889", "0.6312363", "0.630731", "0.63005...
0.0
-1
Search for records in the OpenERP database
def search conditions, options = {} options = { :limit => false, :offset => 0 }.merge(options) remote.search normalize_conditions(conditions), options[:offset], options[:limit], options[:order], ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def search \n\n end", "def search\n\n end", "def search(records, field, criteria)\n records.where(\"#{field} = ?\", encrypt(criteria))\n end", "def search\n end", "def find_rows(field_name, record_id) \n results = CONNECTION.execute(\"SELECT * FROM #{self.table_name} WHERE #{field_nam...
[ "0.670045", "0.66665125", "0.6642561", "0.6624325", "0.6596792", "0.65461886", "0.6509469", "0.64770633", "0.64770633", "0.64770633", "0.64770633", "0.64770633", "0.64770633", "0.64770633", "0.64770633", "0.64770633", "0.64770633", "0.6462019", "0.6462019", "0.6456076", "0.64...
0.0
-1
Read records and instantiate them
def read ids, options = {} fields = if options[:fields].present? options[:fields] & attribute_names else attribute_names end context = options[:context] ids = ids.reverse if options[:reverse_flag] [].tap do |result| remote.read(ids,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize\n @records = []\n end", "def load\n records.load\n end", "def load\n super\n slice_records!\n\n self\n end", "def load record\n end", "def records\n @records ||= Records.new(klass, self)\n end", "def load\n ...
[ "0.7181095", "0.7066398", "0.6820436", "0.6734388", "0.6657776", "0.66326725", "0.6560496", "0.6556661", "0.65480304", "0.65133697", "0.6458802", "0.6428569", "0.63849586", "0.6371925", "0.6368946", "0.63248545", "0.62860096", "0.62666404", "0.62497354", "0.6245864", "0.62381...
0.56347936
79
Create a OpenObject record.
def create_record attributes, options = {} remote.create attributes, options[:context] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def open_new_object\n save_state\n oid = open_object\n close_object\n add_object(oid)\n reopen_object(oid)\n oid\n end", "def create objid\n DataObj.new @repo, self, objid, true\n end", "def create_record(http)\n json = %|{\n \"kind\": \"Article\",\n \"title\": \"Sample\",\n ...
[ "0.6599945", "0.64608973", "0.6166073", "0.61623484", "0.61372256", "0.60694516", "0.6043106", "0.6034696", "0.5956143", "0.5898627", "0.5829045", "0.57828873", "0.57601094", "0.5741773", "0.57365054", "0.5733989", "0.5715946", "0.5708137", "0.5706575", "0.56859094", "0.56781...
0.5759803
13
Fetch default attribute values from OpenERP database
def default_get options = {} options = { :fields => attribute_names, :context => {} }.merge(options) remote.default_get options[:fields], options[:context] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def default_attributes\n cfg_get(:default_attributes)\n end", "def default_attributes\n cfg_get(:default_attributes)\n end", "def index\n @default_attributes = DefaultAttribute.where(book_id: @book.id)\n end", "def default\n attributes.default\n end", "def default_at...
[ "0.6907192", "0.6821574", "0.67586607", "0.67175055", "0.66041183", "0.64611566", "0.6457253", "0.64355594", "0.64244187", "0.64121586", "0.63898116", "0.6311618", "0.62696713", "0.6265942", "0.6234969", "0.6178717", "0.6147285", "0.61247504", "0.6123465", "0.6122016", "0.611...
0.0
-1
Write values to records
def write_record ids, attributes, options = {} remote.write ids, attributes, options[:context] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def write(value)\n record.send(\"#{name}_data=\", value)\n end", "def write_record csv = nil\n csv ||= self.csv\n raise 'Record#add_record_to_csv: no associated CSV object.' unless csv\n\n csv << values\n end", "def writer(records)\n replace(records)\n end", ...
[ "0.69899523", "0.65954196", "0.6509647", "0.65039104", "0.6363114", "0.63128066", "0.62902343", "0.62503093", "0.61645436", "0.60934246", "0.6000402", "0.59911335", "0.598057", "0.5958215", "0.5925162", "0.59232134", "0.59094435", "0.5908512", "0.59065497", "0.58062595", "0.5...
0.61608773
9
Export data via OpenERPs export_data method (which is used by OpenERP to export to CSV)
def export_data ids, fields = attribute_names, context = {} remote.export_data(ids, fields, context)[:datas] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def export_data\n # This is the basic functionality for exporting the data from the database. By default the data\n # table (what is created when you save_data) is called ocdata, but it can be called anything else,\n # and the query can be more complex, returning, for example, only the most recent results...
[ "0.760873", "0.74203753", "0.73947394", "0.7185021", "0.7167422", "0.7164188", "0.705677", "0.7018363", "0.6981217", "0.6981217", "0.69701326", "0.6945554", "0.6939926", "0.69101626", "0.69092035", "0.6877925", "0.68575835", "0.68390423", "0.6786184", "0.6757218", "0.67566925...
0.6842666
17
Import data via OpenERPs import data method (which is used by OpenERP to import by CSV)
def import_data fields, datas, options = {} remote.import_data(fields, datas, options) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def import_csv_full\n \n end", "def import_csv_smart\n \n end", "def import_soepinfo1(filename=\"import/soepinfo1.csv\", group=\"v1\")\n @group = Group.find_or_create_by_name_and_study_id(group, id)\n Study.transaction do\n CSV.foreach(filename = filename, headers: true) do |row|\n @row...
[ "0.7383315", "0.7250373", "0.6965569", "0.6952633", "0.69330776", "0.69269407", "0.6833069", "0.6819116", "0.6787239", "0.6768085", "0.6722565", "0.66366595", "0.6608696", "0.6593976", "0.6593188", "0.6561007", "0.65397644", "0.65303755", "0.6527619", "0.65226144", "0.6514857...
0.69993246
2
Baseline implementation for the create_data_scan REST call
def create_data_scan request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_create_data_scan_request request_pb query_string_params = if query_string_params.any? ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n show_scan_limit_errors\n\n @scan.owner = current_user\n\n respond_to do |format|\n if !Scan.limit_exceeded? && @scan.save\n\n ScanManager.process @scan\n\n if @scan.scheduled?\n notify @scan, action: :scheduled\n ...
[ "0.61421824", "0.60998946", "0.60184205", "0.6001347", "0.59612817", "0.5932859", "0.58704877", "0.58534634", "0.5764187", "0.5684116", "0.564245", "0.56283975", "0.5607993", "0.5587112", "0.5473441", "0.54727006", "0.5453095", "0.54226387", "0.5401413", "0.5366035", "0.53394...
0.6234807
0
Baseline implementation for the update_data_scan REST call
def update_data_scan request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_update_data_scan_request request_pb query_string_params = if query_string_params.any? ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update!(**args)\n @data_scans = args[:data_scans] if args.key?(:data_scans)\n @next_page_token = args[:next_page_token] if args.key?(:next_page_token)\n @unreachable = args[:unreachable] if args.key?(:unreachable)\n end", "def update!(**args)\n @post_scan_actions_re...
[ "0.69605607", "0.6534894", "0.63362277", "0.63139874", "0.6234062", "0.6227214", "0.6014363", "0.6001941", "0.59477854", "0.5900488", "0.5869901", "0.5804314", "0.5784655", "0.5780924", "0.57791626", "0.5775544", "0.5763661", "0.57630175", "0.57568824", "0.5704264", "0.570426...
0.64685386
2
Baseline implementation for the delete_data_scan REST call
def delete_data_scan request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_scan_request request_pb query_string_params = if query_string_params.any? ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete(authToken, data)\n if data.nil? || !data.instance_of?(CopyleaksDeleteRequestModel)\n raise 'data is Invalid, must be instance of CopyleaksDeleteRequestModel'\n end\n\n verify_auth_token(authToken)\n\n path = \"/v3.1/scans/delete\"\n\n headers = {\n 'Content-Type' =...
[ "0.7065473", "0.65101063", "0.64922845", "0.6459527", "0.6395864", "0.63376", "0.63358134", "0.6284788", "0.62561506", "0.62511814", "0.6235573", "0.6174108", "0.6174108", "0.61659575", "0.61590695", "0.6158183", "0.6111631", "0.61024994", "0.6092804", "0.60902214", "0.608089...
0.7243907
0
Baseline implementation for the get_data_scan REST call
def get_data_scan request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_data_scan_request request_pb query_string_params = if query_string_params.any? ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def scan_rest; end", "def index\n @operation = request.request_parameters['operation'].blank? ? nil : request.request_parameters['operation']\n @resource_uri = request.request_parameters['resource_uri'].blank? ? nil : request.request_parameters['resource_uri']\n @access_token = request.request_parameter...
[ "0.65995413", "0.6077008", "0.6039311", "0.59182584", "0.5838029", "0.581411", "0.5813478", "0.5780191", "0.57560587", "0.5694144", "0.5692657", "0.5677878", "0.56648606", "0.56573945", "0.5644614", "0.56380385", "0.5590187", "0.55742395", "0.5563287", "0.54876626", "0.541266...
0.62811357
1
Baseline implementation for the list_data_scans REST call
def list_data_scans request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_data_scans_request request_pb query_string_params = if query_string_params.any? ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list\n response = @client.get 'scans'\n ::JSON.parse response.body\n end", "def index\n respond_with(@scans)\n end", "def scan_list\n http_get(:uri=>\"/scans\", :fields=>x_cookie)\n end", "def scan_rest; end", "def index\n ddep = {}\n rdep = {}\n ddep[:deleted] = false...
[ "0.72112477", "0.68760616", "0.6641525", "0.63890517", "0.63272804", "0.62988746", "0.62988746", "0.62846196", "0.61388814", "0.61040753", "0.6052935", "0.6041209", "0.5895268", "0.58795947", "0.5859043", "0.5757671", "0.573756", "0.56070215", "0.5530697", "0.5528669", "0.552...
0.6868322
2
Baseline implementation for the run_data_scan REST call
def run_data_scan request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_run_data_scan_request request_pb query_string_params = if query_string_params.any? ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def scan()\n scanConfig() ;\n scanTrailLog() ;\n analyzeDemandLog() ;\n end", "def scan_rest; end", "def scan\n @radar_scan, @known_items = import_data\n @results = Services::Scan.new(\n radar_scan: @radar_scan,\n known_items: @known_items,\n accuracy: MATCH_ACCURACY\n ...
[ "0.63196", "0.62971157", "0.6061645", "0.6055379", "0.58684057", "0.58619404", "0.5777341", "0.5772989", "0.57326144", "0.57253623", "0.5720126", "0.56771475", "0.56195116", "0.5585016", "0.55553484", "0.554124", "0.5496673", "0.54859644", "0.5468908", "0.5467688", "0.5449545...
0.6733274
0
Baseline implementation for the get_data_scan_job REST call
def get_data_scan_job request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_data_scan_job_request request_pb query_string_params = if query_string_params.any? ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @operation = request.request_parameters['operation'].blank? ? nil : request.request_parameters['operation']\n @resource_uri = request.request_parameters['resource_uri'].blank? ? nil : request.request_parameters['resource_uri']\n @access_token = request.request_parameters['access_token'].blank?...
[ "0.6008455", "0.5862691", "0.5807236", "0.580485", "0.576912", "0.57593465", "0.56754225", "0.56139684", "0.560938", "0.56087077", "0.55912113", "0.55809087", "0.55450207", "0.5535929", "0.5500818", "0.54841286", "0.54805905", "0.54774606", "0.54433405", "0.54265815", "0.5422...
0.7005781
0
Baseline implementation for the list_data_scan_jobs REST call
def list_data_scan_jobs request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_data_scan_jobs_request request_pb query_string_params = if query_string_params.any? ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n validate_arguments!\n\n options[:limit] ||= '10'\n options[:skip] ||= '0'\n jobs = api.get_jobs(options[:skip], options[:limit]).body['jobs']\n jobs.each do |job|\n if job['start_timestamp']\n job['start_timestamp'] = Time.parse(job['start_timestamp']).strftime('%A, %B %e, %Y...
[ "0.67049223", "0.6349951", "0.63115543", "0.6204074", "0.6132244", "0.6123801", "0.6105842", "0.60881203", "0.602232", "0.60155827", "0.5985202", "0.59510666", "0.59420437", "0.5938031", "0.5935135", "0.5928324", "0.5917445", "0.58982456", "0.58957905", "0.5885831", "0.588578...
0.72791034
0
verify that the token is actually valid by checking with the remote service
def verify_credentials return false unless has_credentials? # make sure we actually have an api token set begin if defined?(@api) valid = twitter_api.client.authorized? else twitter_api # just fetching it the first time does an authorized check valid = true end re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_auth_token\n halt 401 unless valid_user?(extracted_token)\n end", "def validate_token(token)\n object_from_response(Code42::TokenValidation, :get, \"authToken/#{token.to_s}\")\n end", "def check_token\n @usuario = Credentials.check_token(authorization: request.headers[\"Authorizat...
[ "0.7590293", "0.7463571", "0.7435255", "0.7411808", "0.7369245", "0.73615956", "0.7360585", "0.7308561", "0.7288094", "0.71815604", "0.71419513", "0.7137905", "0.71371216", "0.71327895", "0.7110723", "0.70889413", "0.7073892", "0.70615894", "0.7048476", "0.70330715", "0.70323...
0.6555327
74
return the url to the icon of the primary category if no primary is available, then return a default icon
def icon primary_category ? primary_category["icon"] : "https://foursquare.com/img/categories/none.png" end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def default_url\n \"\" + [version_name, \"default_cat_icon.png\"].compact.join('_')\n end", "def icon\n icon = Icon.where(:id => icon_id).first\n icon ||= package_branch.icon\n icon ||= package_category.icon\n\n icon\n end", "def flow_category_icon taxon\n icon = taxon.icon_file_name\n\n ...
[ "0.68877214", "0.6885576", "0.6841113", "0.67124933", "0.6626447", "0.65912366", "0.6525916", "0.62222975", "0.62153566", "0.6164024", "0.609732", "0.6087551", "0.6069216", "0.60522324", "0.6042597", "0.6022835", "0.600526", "0.60039353", "0.6002956", "0.60001487", "0.5982155...
0.81157446
1
returns the venue short url
def short_url @json["shortUrl"] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def short_url\n \"#{HOST_URL}/#{short_code}\"\n end", "def short_url\n response[\"shortUrl\"]\n end", "def short_url\n @short_url ||= client.shorten(long_url: url).link\n rescue => e\n Rails.logger.warn(\"Could not shorten bit.ly url #{e.message}\")\n url\n end", "def short\n Ra...
[ "0.75745964", "0.7450692", "0.74099916", "0.7331003", "0.7327901", "0.7223754", "0.7119402", "0.7035265", "0.6990073", "0.6990073", "0.6887395", "0.6887395", "0.6784651", "0.67615646", "0.6754699", "0.6738614", "0.6704511", "0.66832113", "0.6667666", "0.66644645", "0.65771544...
0.7406501
3
not all photos may be present here (but we try to avoid one extra API call) if you want to get all the photos, try all_photos
def photos return all_photos if @json["photos"].blank? @json["photos"]["groups"].select { |g| g["type"] == "venue" }.first["items"].map do |item| Foursquare::Photo.new(@foursquare, item) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def photos\n response = photo_search\n photos_response = response['photos']\n @photos = photos_response['photo'].each{|p| p.extend Flickr::PhotoHelper }\n @per_page = photos_response['perpage']\n @total = photos_response['total']\n @pages = photos_response['pages']\n @page = photos_response['p...
[ "0.7953037", "0.7869488", "0.7566076", "0.75151855", "0.74878615", "0.7485158", "0.74094117", "0.7348504", "0.73475194", "0.7305542", "0.7289449", "0.7259111", "0.7239253", "0.7224505", "0.71464443", "0.7119233", "0.70955086", "0.7079414", "0.7052873", "0.70279884", "0.701999...
0.7429965
7
Indicates if the client was supplied an OAuth access token
def token_authenticated? !!@access_token end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def client_has_valid_token?\n request.headers[\"Authorization\"] == Rails.application.credentials.guessing_access_token\n end", "def access_token?\n payload.typ == 'access'\n end", "def authorized?\n !!@access_token\n end", "def check_access_token(access_token)\n client = O...
[ "0.8034344", "0.79646194", "0.77921057", "0.77538687", "0.75788707", "0.756997", "0.74950445", "0.74911124", "0.7418664", "0.74065995", "0.73864436", "0.736017", "0.73579943", "0.73343354", "0.7311777", "0.72764695", "0.7182126", "0.71783924", "0.71716404", "0.7168311", "0.71...
0.74497306
9
Indicates if the client was supplied a bearer token
def bearer_authenticated? !!@bearer_token end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def client_has_valid_token?\n request.headers[\"Authorization\"] == Rails.application.credentials.guessing_access_token\n end", "def token_authenticated?\n !!@access_token\n end", "def token_authenticated?\n !!@access_token\n end", "def token_authenticated?\n !!access_token\n ...
[ "0.8261228", "0.7618821", "0.7618821", "0.7587054", "0.75487703", "0.7473389", "0.7473389", "0.7473389", "0.74643356", "0.7409758", "0.74094975", "0.74094975", "0.7325178", "0.7259577", "0.7221616", "0.7167359", "0.7137444", "0.7124933", "0.71162504", "0.71143645", "0.7088367...
0.80694795
1