Posts

logging - What is the syntax of the FTP log file -

i'm trying go through of ftp logs examine issue i've experienced. log files have shorthand flags, don't know mean, , unable find sort of documentation on it. an example of line ftp log is: tue jan 05 17:18:22 2016 0 1.2.3.4 3581 /path/to/file/file.php _ o r username ftp 1 * c date , time obvious, 1.2.3.4 ip address, 3581 i'm assuming linux pid, username ftp account username. the ending of line, a _ o r username ftp 1 * c (except username , ftp ) i'm confused about. , 0 between date , ip address. is there documentation somewhere flags represent? based on https://svn.apache.org/repos/asf/httpd/mod_ftp/trunk/modules/ftp/ftp_log.c have following ftp-specific variables: these callbacks extend mod_log_config adding additional % directives follows: %..m mode used transfer file. single character printed, (ascii) or b (binary) %..f action taken on file (concationated needed) c - file compressed. u - file uncompressed. ...

javascript - ajax - sending data as json to php server and receiving response -

i'm trying grasp more should @ once. let's have 2 inputs , button, , on button click want create json containing data inputs , send server. i think should it, might wrong i've seen lot of different (poorly explained) methods of doing similar. var item = function(first, second) { return { firstpart : first.val(), secondpart : second.val(), }; }; $(document).ready(function(){ $("#send_item").click(function() { var form = $("#add_item"); if (form) { item = item($("#first"), $("#second")); $.ajax ({ type: "post", url: "post.php", data: { 'test' : item }, success: function(result) { console.log(result); } }); } }); }); ...

php - How to retrieve the data from a URL with an exclamation mark inside it? -

i retrieve content of website website build exclamation mark in url , doesn't seem work. things tried: <?php echo file_get_contents('https://domain.com/path/!weird.formatted?url=1'); echo file_get_contents('https://domain.com/path/%21weird.formatted?url=1'); echo file_get_contents(urlencode('https://domain.com/path/!weird.formatted?url=1')); echo file_get_contents(rawurlencode('https://domain.com/path/!weird.formatted?url=1')); i tried retrieve content php curl here seems exclamation mark problem. so how retrieve webpage? suggestions highly appreciate. update the url try retrieve content from: https://loket.bunnik.nl/mozard/!suite86.scherm0325?mpag=1070 so problem web page checking valid user agent/cookie. code used fix issue: <?php echo getpage("https://loket.bunnik.nl/mozard/!suite86.scherm0325?mpag=1070"); function getpage ($url) { $useragent = 'mozilla/5.0 (macintosh; intel mac os x 10...

ruby on rails - Assets Precompile When Explicitly Invoked, Breaks During Capistrano Deployment -

Image
i using rails 4.2, , capistrano 3. when run bundle exec rake assets:precompile , works out nice , dandy, when use capistrano deploy site, error during asset:precompile step. tasks: top => deploy:assets:precompile (see full trace running task --trace) deploy has failed error: exception while executing xxx@123.45.67.89: rake exit status: 1 rake stdout: rake aborted! sass::syntaxerror: invalid css after " */": expected "}", "" (sass):6831 /home/xxx/sites/my-app/shared/bundle/ruby/2.2.0/gems/sass-3.4.19/lib/sass/scss/parser.rb:1161:in `expected' /home/xxx/sites/my-app/shared/bundle/ruby/2.2.0/gems/sass-3.4.19/lib/sass/scss/parser.rb:1097:in `expected' /home/xxx/sites/my-app/shared/bundle/ruby/2.2.0/gems/sass-3.4.19/lib/sass/scss/parser.rb:1092:in `tok!' /home/xxx/sites/my-app/shared/bundle/ruby/2.2.0/gems/sass-3.4.19/lib/sass/scss/parser.rb:639:in `block' /home/xxx/sites/my-app/shared/bundle/ruby/2.2.0/gems/sass-3.4.19/lib/sass/scss/pa...

spring - In JSP, Field Path Uses HashMap<String,ArrayList<String>> (SpringMVC Form) -

suppose model field hashmap of strings arraylist's of strings. hashmap<string,arraylist<string>> map = new hashmap<string,arraylist<string>>(); for field binding, need point i-th item of arraylist of specific key in jsp. how do it? double-bracket notation work? assume 'key' , 'index' known jstl variables in jsp. <form:checkbox path="map[${key}][${index}]" /> what i'm doing is, field value, store path e.g. map['testkey'][4] which point to map.get("testkey").get(4); that doesn't work: org.springframework.beans.nullvalueinnestedpathexception: invalid property 'map[testkey][0]' note according ( binding map of lists in spring mvc ), problem because sub-objects not auto-growable, , need implement lazylist or growable list? arraylist growable spring mvc's forms, when used sub-collection, it's not? tricky. i solved problem following lazylist/lazyset implemen...

laravel - How I can ignore feature in behat? -

i using behat laravel . have features want ignore in tests. have inside features folder: - a.feature - b.feature - c.feature i want exclude feature c testing. @ moment if want exclude feature c tests have rename - example "c.feature.tmp". there more intelligent way ... in java or .net have @ignore annotation. you can give features don't want test tag @notesting , run behat this. behat --tags '~@notesting' the ~ sign not operator. or @grzegorz-zadja mentioned can use test suites . in feature file right above feature: can put tags. add @notesting there. see documentation .

App name with superscript text android -

i want name android application super script (uno ™ ). see tm smaller , of line. i used html.fromhtml(x +"<sup><font style=\"font-size:1;\">tm</font ></sup>")); also in strings.xml used <string name="app_name"> x<sup><font style="font-size:1;">tm</font></sup> </string> also doesn't work. how can this? you need use unicode symbol trademark instead. <string name="app_name"> name &#8482;</string> where &#8482; ™