Posts

Run Selenium Java Code on Jenkins master using shell -

i'm trying run java selenium code on jenkins using shell command. java file needs 3 .jar files in order run. tired, among other commands, javac "*.jar" myfile.java not working. i'm pulling code form repository , master node running redhat 6. when run javac myfile.java follwoing error messgae: java version "1.8.0_92" java(tm) se runtime environment (build 1.8.0_92-b14) java hotspot(tm) 64-bit server vm (build 25.92-b14, mixed mode) clusterreloadaut.java:3: error: package org.openqa.selenium not exist import org.openqa.selenium.by; ^ clusterreloadaut.java:5: error: package org.openqa.selenium not exist import org.openqa.selenium.webdriver; ^ clusterreloadaut.java:6: error: package org.openqa.selenium.firefox not exist import org.openqa.selenium.firefox.firefoxdriver; ^ clusterreloadaut.java:11: error: cannot access webdriver static webdriver driver = new firef...

javascript - nodejs adding double quotes to command arguments? -

example: ffmpeg -i test.mkv -metadata title="test 123" -c copy temp.mkv ffmpeg sees ""test 123"" . happens spawn() , execfile() if run same command in windows shell ffmpeg sees correctly "test 123" so what's nodejs? here's nodejs code: var process = spawn('ffmpeg', [ '-i', infile, '-metadata', 'title="test 123"', '-c', 'copy', outfile ]); you need switch "title='test 123'" since double quotes have precedence on single quotes. stdin should parse right title="test 123" .

php - How to get two forms on one submit -

this question has answer here: how submit 2 forms in 1 page single submit button 3 answers i have 2 forms this: <h2>first form</h2> <form id="first-form"> <table> <tr> <td> <input type="text" name="left[]" value=""> </td> <td> <input type="text" name="right[]" value=""> </td> </tr> <tr> <td> <input type="text" name="left[]" value=""> </td> <td> <input type="text" name="right[]" value=""> </td> </tr> <tr> <td> <input type="text" name="left[]" value...

Match function of Excel with different sheets -

i want use match function lookup array in different sheet. here trying: = match( "lead-poi-bba concours", sheet_13_15!f5 : sheet_13_15!o5) but giving error #n/a i tried changing = match( "lead-poi-bba concours", 'sheet_13_15'!f5 : 'sheet_13_15'!o5) but again reverts = match( "lead-poi-bba concours", sheet_13_15!f5 : sheet_13_15!o5) giving same error #n/a where making mistake no need refer sheet twice. sheet!range = match( "lead-poi-bba concours", sheet_13_15!f5:o5)

Using Spring MVC Upload image to /webapp/resources/images directory -

i follow approach uploaded "/var/www/java/football/src/main/webapp/resources/images" folder here need specify complete path , question root path directly "webapp/resources/images" no need specify complete path, how root path ? @requestmapping(value="/savedeal",method=requestmethod.post) public string savedeal(@modelattribute("savedeal") deal deal,bindingresult result,@requestparam("couponcode") multipartfile file,httpservletrequest request){ if(!file.isempty()){ try{ byte[] bytes=file.getbytes(); system.out.println("byte data :"+bytes); string filename=file.getoriginalfilename(); file newfile = new file("/var/www/java/football/src/main/webapp/resources/images"); if (!newfile.exists()){ newfile.mkdirs(); } file serverfile = new file(newfile.getabsolutepath()+file.separator+filename); buff...

php - WordPress translate functionality -

i know __() function double underscore function, people call translate string.what's actual name of __(),_e functions in wordpress ? all of series of functions translating strings said -- don't have specific "name" per-say, operation perform. there quite few different ones: __() - retrieve translation of $text . _e() - display translated text. _x() - retrieve translated string gettext context. _ex() - display translated string gettext context. _n() - translates , retrieves singular or plural form based on supplied number. _nx() - translates , retrieves singular or plural form based on supplied number, gettext context.

c++ - How does std::invoke(C++1z) work? -

namespace detail { template <class f, class... args> inline auto invoke(f&& f, args&&... args) -> decltype(std::forward<f>(f)(std::forward<args>(args)...)) { return std::forward<f>(f)(std::forward<args>(args)...); } template <class base, class t, class derived> inline auto invoke(t base::*pmd, derived&& ref) -> decltype(std::forward<derived>(ref).*pmd) { return std::forward<derived>(ref).*pmd; } template <class pmd, class pointer> inline auto invoke(pmd pmd, pointer&& ptr) -> decltype((*std::forward<pointer>(ptr)).*pmd) { return (*std::forward<pointer>(ptr)).*pmd; } template <class base, class t, class derived, class... args> inline auto invoke(t base::*pmf, derived&& ref, args&&... args) -> decltype((std::forward<derived>(ref).*pmf)(std::forward<args>(args)...)) { return (std::forward<derived...