Posts

xslt - Get child from node and pass into attribute -

sorry rivial question @ moment can not figure out. i have node in there childs, want these child , "print" these directly in attribute. please take @ code: <fo:declarations> <xsl:for-each select="//lb"> <xsl:for-each select="./dv-group/dv/download"> <xsl:value-of select="." /> <pdf:embedded-file filename="<xsl:value-of select="." />" src="url(test:///c:/users/muster/desktop/template_test/data/mappe1.xlsx)"/> </xsl:for-each> </xsl:for-each> </fo:declarations> i have try variable doesn't work too. any suggestions? thanks. the concept you're looking called attribute value template : in attribute values on literal result element (and in attributes of xsl: instructions too) can enclose xpath expressions in braces , evaluated , result substituted in outp...

nashorn replace Java.type with binding -

to invoke java js can use java.type . there way bind java class in bindings? so replace: scriptengine.eval("java.type('my.own.awesomeobj')"); with like: bindings bindings = new simplebindings(); bindings.put("awesomeobj", my.own.awesomeobj.class); scriptengine.setbindings(bingings, scriptcontext.global_scope); i working on framework want make lot of classes available js scripts, , preferably not use string concatenation , eval . throws exception message: awesomeobj not function, makes sense. nashorn distinguishes type java.lang.class instance, java (in java language, my.own.awesomeobj type, while my.own.awesomeobj.class instance of java.lang.class . can use type access static members, or constructor. can't use class object purpose. bad news is, can't directly obtain object nashorn uses representing types; it's instance of jdk.internal.dynalink.beans.staticclass , lives in restricted package. however, can evaluate in ...

Firefox add-on sdk uninstall hook -

i keep user data in simple-storage . when user uninstalls add-on want remove user data. there event or similar? this work in every file: require("sdk/system/unload").when(function(reason) { if (reason == "uninstall") { // uninstall stuff.. } });

transactions - Can you still lock rows exclusively (block readers) in a SQL Server db that has Snapshot Isolation and RCSI enabled? -

can still lock rows exclusively (block readers) in sql server db has snapshot isolation , rcsi enabled? i want xlock, rowlock select on table. yes, can lock rows exclusively (either using dml or locking hints). readers using snapshot isolation not blocked because don't take locks (on data). after all, not locking , blocking prime advantage of snapshot isolation.

php - Distant HasManyThrough -

i have 4 models: user client store opportunity the relationships defined such: user hasmany client client hasmany store store hasmany opportunity user hasmanythrough store, client (this works) the problem i'm attempting access user->opportunity relationship via built-in laravel relationships, doesn't seem if can without custom query or additional user_id column on opportunities table allow direct access (even though 1 can inferred store->client relationship). i'm not fan of nested foreach loops if can avoided. my question: is there way go 1 level deeper , directly access user's opportunities in scenario? actual model code , relevant relationships follows: user class user extends eloquent{ public function clients(){ return $this->hasmany('client'); } public function stores(){ return $this->hasmanythrough('store', 'client'); } public function proposals(){ return ...

java - Read username from smart card with Tomcat 7 -

i working on web-application runs on tomcat 7 server. want make site accessible via smart card, made clientauth="true" change in tomcat server.xml. i can access web-app smart card now, want able read username/alias smart card in web-app. efficient way this? also, modern browsers take care of crl checking when site requests client auth? thanks you have implemenent x509usernameretriever , pass class name this method of realm. realm should rest. guess after subjectaltname field retrieve upn of user.

php - html multiple file attribute -

i using html5 multiple attribute in file field, like <input type="file" name="image[]" multiple> and via php loop add images, problem occurring on localhost user can upload 9 normal size images on server can upload 2,3 images @ time how increase number of images uploaded or size of images uploaded??? i tried php ini_set('max_execution_time', 300); and set_time_limit(100); as no profit. create .htaccess in root of project, had in cakephp , paste these 2 lines in end of document php_value upload_max_filesize 60m php_value post_max_size 60m and save, , can select 20+ in 1 selections cheers!