Posts

web crawler - use htmlunit how to get modal dialog element -

i want go website https://console.mobra.in htmlunit tool, login input in modal box, how username input element or login form? use queryselector method in htmlunit. usernamebox = currentpage.queryselector("[placeholder='username or email address']"); passwordbox = currentpage.queryselector("[data-ng-model='user.password']"); to above css selector, may install chrome extension 'css selector' of using selectorgadget . if works, please tick answer, or otherwise please leave comment below.

java - c3p0 reconnect after network outage -

the application connects ms sql server. uses c3p0 combopooleddatasource in tomcat , spring environment. when application loses database connection , gets few seconds later, application recovers connection , can continue querying db (as network back). network outage longer, application needs more 10 minutes recover db connection after network came back. i see these logs when db connection after 10 minutes: [warning] exception on close of inner statement.java.sql.sqlexception: invalid state, connection object closed. @ net.sourceforge.jtds.jdbc.tdscore.checkopen(tdscore.java:481) [warning] [c3p0] pooledconnection has signalled connection error still in use! [warning] [c3p0] error has occurred [ java.sql.sqlexception: invalid state, connection object closed. ] not reported listeners!java.sql.sqlexception: invalid state, connection object closed. here spring-config.xml configuration: <bean id="commondatasource" abstract="true" class="com.mcha...

xilinx - Does aborting a partial FPGA reconfiguration possibly result in an undefined state? -

i'm working on reconfiguration controller reconfigurable cpu. 1 of features tried implement handle crc errors properly, , allow aborts during reconfiguration. using virtex7 board , described in ug702.pdf (page 98) reloading bitstream after crc error isn't problem, abort can performed shown in ug470_7series_config.pdf (page 48) . at first glance seems work described in documentation, on crc error reconfiguration controller notifies cpu , cpu gives controller fresh bitstream. also, cpu can send controller abort command , controller abort described in docs. hovewer, seems work sporadically, whole system freezes, nonsensical exceptions, , unconditional jumps not taken seems. i not sure whether messed somewhere or expected, since containers partial bitstreams go interconnected pipeline , bus. remember have read in xilinx pdf bitstream not configured until desynch command @ end of bitstream encountered. mean fabric not affected until full partial bitstream loaded onto fab...

python/numpy versatile max function -

in python (possibly including numpy) there various maximum , max , amax functions, extent covered in stackoverflow questions, none of them seems solve rather obvious need of computing the maximum of mixed arguments , i.e. matching following requirements: any argument iterable (tuple, list, numpy array) or number ... , recursively, i.e. iterable in turn contain numbers , iterables iterables turning out empty, , none items, should not affect max only if arguments empty output should given default if arguments contain nan, should propagated (i think automatic) i seeking solution versatile, compact , proper pythonic point of view. nb. tried code myself little success. not attach many attempts because ugly, , don't work either, , above all, believe misleading , time waste of possibly can help. question long. anyway, here 1 of attempts, doesn't work: <!-- language: python --> def flexmax1(aa): ''' works on 1 argument, breaks into: ...

jquery - Svg animation doesn't play in Mozilla properly -

i have page loads svg file loading image , goes home screen. svg animation plays in chrome , opera not in mozilla. i typed keyframes didnt worked.any suggestions? mozilla latest update. here code of svg <svg version="1.1" id="layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewbox="0 0 1224 260.429" style="enable-background:new 0 0 1224 260.429;" xml:space="preserve"> <defs> <style type="text/css"> <![cdata[ .st0{fill:#ffffff;stroke:#000000;stroke-miterlimit:5;} .st1{fill:#ffffff;stroke:#000000;stroke-width:2;stroke-miterlimit:5;} .st2{fill:none;} ]]> .st0{ stroke-dasharray: 2000; stroke-dashoffest: 0; -webkit-animation:dash 7s linear forwards; -o-animation:dash 7s linear forwards; -moz-animation:dash 7s linear forwards; animation:dash 7s linear forwards; } .st1 { stroke-dasharray: 2000...

Cant import product image in magento 1.9 -

when importing product images getting error invalid image file type using .png , .jpg( /2811292016_05_26_12_10_13pm.jpg ). please me solve issue csv file

javascript - not able to load java script files and bower_components/angular/angular.js -

when run localhost:3000 server , i'm getting these errors in console: http://localhost:3000/bower_components/angular/angular.js failed load resource: server responded status of 404 (not found) http://localhost:3000/controller.js failed load resource: server responded status of 404 (not found) it working if put angular.js script in index.html instead of putting seperately in controller.js , don't know why i'm getting error when use script tags. the directory diagram this -files -bower_components -angular -index.html -controller.js -server.js this index.html file <!doctype html> <html ng-app="app"> <head> <style> #list { margin-left:320px; font-size: 40px; font-family:verdana; } button { color:yellow;background-color:red;text-align:center;cursor:pointer; -webkit-transition-duration: 0.4s; transition-duration: 0.4s; font-size:40px; padding: 14px 32px; } button:hover { background-color:peachpu...