Posts

vim - Commenting out a function with NerdCommenter -

is there way this? know can obvious ones ,c , ,cs but don't think there's binding commenting out entire function... from anywhere inside function, do: va{,c<space> off course, can map something: :map ,o va{,c<space> so pressing ,o inside function comment (or uncomment if commented).

jasper reports - Average line in time series with iReport -

how can draw average line in time series? solutions there few ways this: perform in-line trend analysis , write chart customizer perform calculations. see also: trend analysis using iterative value increments best fit curve trend line use integrated statistical package database perform statistical analysis. see also: non-linear regression models in postgresql using r use third-party tool perform analysis. see: http://www.revolutionanalytics.com/ in-line analysis the disadvantage performing analysis in-line jasperreports plots single value @ time. customizer write have calculate trend based on past data points, rather analysis on data points @ end. cause slight skew data line. integrated stats package the disadvantage using statistics package have find way integrate database. (you have learn corresponding statistical functions perform analysis.) third-party tool the disadvantage here might have pay product, or support. integration easiest. re...

perl - Question about compile-time-errors -

#!/usr/bin/env perl use warnings; use 5.012; "no semicolon" "world"; "world"; "world"; "world"; "world"; # syntax error @ ./perl1.pl line 7, near "say" # execution of ./perl1.pl aborted due compilation errors. . #!/usr/bin/env perl use warnings; use 5.012; $character = "\x{ffff}"; "hello"; "hello"; "hello"; "hello"; "hello"; # unicode non-character 0xffff illegal interchange @ ./perl1.pl line 5. # hello # hello # hello # hello # hello why doesn't second script tell me, there compile-time-error? when can't - "use warnings fatal => qw(all);" - catch error try::tiny or block-eval, can conclude, compile-time-error? #!/usr/bin/env perl use warnings fatal => qw(all); use 5.012; use try::tiny; $character; try { $character = "\x{ffff}"; } catch { die "---------- caught error ----------\n"; }; ...

Java & Multiline Batch Files -

i try run batch file in java, file performed not completely. code like: runtime.getruntime().exec("cmd /c call "+path); when try run manually, without java, batch works correct. batch file contains next code: cd c:\downloads\ if not exist documents mkdir documents move *.odt documents move *.doc documents if not exist archives mkdir archives move *.tar archives move *.gz archives if not exist music mkdir music move *.mp3 music java complete batch fifth line. has faced this? hm, batch , stoped again here . , java code: link . if add somename.ogg downloads folder, script goes next line. folders (archives, documents etc) exists, , downloads folder doesn't contain *.zip, *.tar, *.docx, *pdf files, these lines passed without problems. why stoped precisely @ ogg-line? i think problem there bug in batch script. msdn documentation if command states this: you cannot use if command test directly directory, null (nul) device exist in every director...

php - My E-Mails Always Go To Spam Folder -

in server send mails php mails go spam folders. did spf record thing didn't matter. use google apps service domain. please help mail original: delivered-to: mektup@gmail.com received: 10.42.178.133 smtp id bm5cs95762icb; fri, 31 dec 2010 19:49:46 -0800 (pst) received: 10.223.112.1 smtp id u1mr875459fap.109.1293853785941; fri, 31 dec 2010 19:49:45 -0800 (pst) return-path: <apache@loft1397.serverloft.eu> received: loft1397.serverloft.eu (loft1397.serverloft.eu [82.25.120.6]) mx.google.com esmtps id 17si15455863fau.0.2010.12.31.19.49.45 (version=tlsv1/sslv3 cipher=rc4-md5); fri, 31 dec 2010 19:49:45 -0800 (pst) received-spf: pass (google.com: best guess record domain of apache@loft1397.serverloft.eu designates 82.25.120.6 permitted sender) client-ip=82.25.120.6; authentication-results: mx.google.com; spf=pass (google.com: best guess record domain of apache@loft1397.serverloft.eu designates 82.25.120.6 permitted sender) smtp.mail=ap...

e commerce - Algorithms for matching based on keywords intersection -

suppose have buyers , sellers trying find each other in market. buyers can tag needs keywords; sellers can same selling. i'm interested in finding algorithm(s) rank-order sellers in terms of relevance particular buyer on basis of 2 keyword sets. here example: buyer_keywords = {"furry", "four legs", "likes catnip", "has claws"} and have 2 potential sellers need rank order in terms of relevance: seller_keywords[1] = {"furry", "four legs", "arctic circle", "white"} seller_keywords[2] = {"likes catnip", "furry", "hates mice", "yarn-lover", "whiskers"} if use intersection of keywords, not discrimination: both intersect on 2 keywords. if divide intersection count size of set union, seller 2 worse because of greater number of keywords. seem introduce automatic penalty method not correcting keyword set size (and don't...

javascript - Can I declare local/temp variables within a jQuery template? -

is possible declare new variables within jquery template syntax? i'm hoping achieve equivalent of (which not work): {{var test = "test"}} <div> ${test} </div> this pretty lame, 1 trick might work is: {{each(i, test) ["test"]}} blah blah ${test} blah {{/each}} i'm not 100% sure using array constant expression that; i'll set fiddle. ( edit yes works :-)