Posts

groovy - How to add multiple jars to the classpath of groovyConole/groovysh? -

groovy - How to add multiple jars to the classpath of groovyConole/groovysh? - this feels ridiculous have inquire this, can't seem add together multiple jar files classpath groovyconsole , groovysh. how add together multiple jar files classpath? here i've tried: groovyconsole -cp ~/lib/compile/jar/mysql-connector-java-5.1.32.jar:~/lib/compile/jar/ojdbc6-11.2.0.3.jar however, when execute code in console following: file:/users/charlie/lib/compile/jar/mysql-connector-java-5.1.32.jar file:/users/charlie/projects/fuseanalytics/./ file:/users/charlie/.gvm/groovy/current/lib/ant-1.9.3.jar file:/users/charlie/.gvm/groovy/current/lib/ant-antlr-1.9.3.jar file:/users/charlie/.gvm/groovy/current/lib/ant-junit-1.9.3.jar file:/users/charlie/.gvm/groovy/current/lib/ant-launcher-1.9.3.jar file:/users/charlie/.gvm/groovy/current/lib/bsf-2.4.0.jar file:/users/charlie/.gvm/groovy/current/lib/commons-cli-1.2.jar file:/users/charlie/.gvm/groovy/current/lib/commons-logging...

Docker stop exit code -1 if the default CMD is a shell script -

Docker stop exit code -1 if the default CMD is a shell script - i building tomcat container in docker supervisord. if default command in dockerfile cmd supervisord -c /etc/supervisord.conf and when dispatch docker stop command, container exits exit code 0. but instead if have cmd ["/run"] and in run.sh, supervisord -c /etc/supervisord.conf the docker stop command gives me exit code -1. on viewing logs, seems supervisord did not receive sigterm indicating exit request. 2014-10-06 19:48:54,420 crit supervisor running root (no user in config file) 2014-10-06 19:48:54,450 info rpc interface 'supervisor' initialized 2014-10-06 19:48:54,451 crit server 'unix_http_server' running without http authentication checking 2014-10-06 19:48:54,451 info supervisord started pid 6 2014-10-06 19:48:55,457 info spawned: 'tomcat' pid 9 2014-10-06 19:48:56,503 info success: tomcat entered running state, process has stayed > 1 seconds (starts...

c++ - How to work around `using K = ...` in MSVC 2012? -

c++ - How to work around `using K = ...` in MSVC 2012? - it appears msvc 2012 doesn't back upwards using k = ...; -type declarations. example, code: template <class map> inline void foo(map &m) { using k = typename map::key_type; using v = typename map::mapped_type; // ... } the result syntax error: error c2143: syntax error : missing ';' before '=' error c2873: 'k' : symbol cannot used in using-declaration how can work around missing feature of msvc 2012, without upgrading compiler? microsoft's back upwards c++11 incomplete, , 1 of things that's missing in vs2012. in case, should able utilize old-fashioned typedef; e.g.: typedef typename map::key_type k; the place workaround falls apart when type templated: template<typename t> using bar = foo<t>; // ok if compiler supports template<typename t> typedef foo<t> bar; // doesn't compile but still @ to the lowest degree ...

cq5 - CQ Basic Authentication -

cq5 - CQ Basic Authentication - i have requirement implement basic authentication @ dispatcher side i have below basic auth configuration in virtual host(www.abc.com) configuration file. <location /content/abc/jp-jp > authtype basic authname "private area" authbasicprovider file authuserfile /opt/cq/www/htdocs/password(this name of file, contains uname , password) require valid-user </location> when seek access www.abc.com/jp-jp getting basic auth prompt , authenticated succefully password file(username , password file ) located under /opt/cq/www/htdocs . after first prompt validated username , password , sec prompt displaying requires username , password .the server says (sling development). if disable basic authentication in apache sling authentication service of publish instance ..then it's redirecting me right page expected ..but unable publish contents author(blocked within replication agent queue). enabled back..but basic au...

temp tables - MySQL: Syntax error, unexpected '@', expecting ':' -

temp tables - MySQL: Syntax error, unexpected '@', expecting ':' - i want create temp table dynamically. passing column name parameter stored procedure. example: delimiter $$ create procedure sptemp(in nm varchar(50)) begin set @q = concat('create temporary table temptable  // error occuring here @q select distinct ', nm ,' col from table1'); prepare d from @q; execute d; deallocate prepare d; end$$ delimiter ; error: syntax error, unexpected '@', expecting ':' set @q = concat('create temporary table if not exists temptable (index(col)) engine=myisam (select distinct ', nm ,' col table1)'); as bonus - index of col column. mysql temp-tables dynamicquery

Need Help passing an instance variable to another method for insert in ruby on rails 4 -

Need Help passing an instance variable to another method for insert in ruby on rails 4 - i new ror , spent of day trying work. have tried using before_filter , cannot object insert in method. the view index, file selected in view , button validate file clicked calls method 'evaluate_media' in method, values based on file path , name selected , can insert record values in method. problem don't want automatic save. when 'evaluate_media' method done displays either save button or update button based on if file submitted exists in database. user can take save/update record or now. button calls 'save_file' action. problem info save in 'evaluate_media' action file not accessible save_file or update_file actions. believe session variables might reply not find examples setup correctly , working in application. can please tell me , show me proper code pass value 'evaluate_media' action save_file or update_file actions? here code as...

fft - how to find the peak(r,theta) from DFT spectrum in matlab? -

fft - how to find the peak(r,theta) from DFT spectrum in matlab? - suppose have matrix m apply dft on , shift centre img_fft = fft2(double(m)); img_spec = abs(img_fft); img_shift = fftshift(img_spec); then according question, how find peak of spectrum ,i.e. (u,v) of peak? lot! use find determine in image maximum value occurs. however, question says ignore dc value, largest component in spectrum far. such, should find maximum value, should dc value currently, , set nan . 1 time this, next maximum value you're searching reply question. as such, first: idx = find(img_shift == max(img_shift(:))); img_shift(idx) = nan; if set maximum value here nan , next time phone call find , disregard location , skip location when searching maximum value. now, phone call find again: [u,v] = find(img_shift == max(img_shift(:))); here, u horizontal location of image while v vertical position. should homecoming maximum peak not dc value. however, isn...