Posts

node.js - Resetting a Node application to a known state when testing with supertest -

i write black box tests against node applications using supertest. app loads database fixtures , black box tests exercise database strenuously. i'd reset app state between tests (so can run different combinations of tests without having worry particular database state). the ideal thing able reload app another: var app = require(../app.js).app; but happens once when run mocha (as should require calls). think can wrapping tests in multiple mocha calls batch file, developers used running npm test , , them keep doing that. how this? the require function cache result , won't re-run module. can delete module cache: delete require.cache[require.resolve('../app')]; if didn't work, can try resetting whole cache: require.cache = {} but might introduce bugs, because modules developed in way thinking executed once in whole process runtime. the best way fix write module minimum global state, means instead of storing app module-level value , requ...

Crossreferencing in xtext - also for native types -

i'm trying set xtext grammar has following characteristics. sketch(!): class: properties += property* ; resource: properties += property* ; link : // no classes here, no common resource , class [resource] <-> [resource] ; basictype: 'int' | 'long' ; property: // not supported name ':' basictype | [resource] | [class] // tried // name ':' eobject ; my question is: how can solve situation, crossreference property type 'resource' or 'class' or basictype? i tried eobject basetype , resolve crossreferences in custom scopeprovider , dont know how use basictypes (int or long) type properties. first can introduce common supertypes defining rule dont call parent: child1 | child2 then can reference things defined somewhere else. have define them explicitely or change grammar xtext entity example, primitive type

wso2is - Update user password methods breaks in external Read Write LDAP mode of WSO2 Identity Server -

i using external apacheds ldap wso2 is. can update user password via management console well. works fine. tried use useradmin service this. used changepasswordbyuser method in that. have consumed service using soapui. can send first update request fine. looked @ ldap , update succeeded. can log in management console using updated password. when tried update second time onwards using updated password, sends response, <soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:body> <soapenv:fault> <faultcode>soapenv:server</faultcode> <faultstring>can not access directory service</faultstring> <detail> <ns:useradminuseradminexception xmlns:ns="http://org.apache.axis2/xsd"> <useradminexception xsi:type="ax2627:useradminexception" xmlns="http://org.apache.axis2/xsd" ...

java - Disabling of all GWT child widgets works strange -

i need disable childs widgets of custom panel. have such method this: public static void disablechilds(widget widget) { if(widget instanceof haswidgets) { iterator<widget> iter = ((haswidgets) widget).iterator(); while(iter.hasnext()) { widget element = iter.next(); //window.alert(element.getclass().tostring()); if(element instanceof hasenabled) { ((hasenabled) element).setenabled(false); } disablechilds(element); } } } the problem code works on firefox(24.5.0) , if window.alert(element.getclass().tostring()); is uncommented. not want work on chrome(35.0.1916.114) @ all. i grateful help.

symfony - Different versions of PHP on OS X 10.9 -

i trying symphony framework installed on laptop (running os x 10.9 mavericks), far can't started because of error messages the first thing not being error seems have multiple versions of php running , remove except latest version (5.5.12). can please tell me how can achieve this? i compiled , built newest version of php source , installed (which should replace original version), seeing 2 different versions when using phpinfo() webpage , php -v command line: phpinfo(): php version 5.4.24 php -v: php 5.5.12 (cli) (built: may 29 2014 11:21:46) i compiled , built newest version of php source , installed (which should replace original version), seeing 2 different versions when using phpinfo() webpage , php -v command line: php command line 100% different php loaded via apache module. wiping out old version won’t solve issue & might cause other issues. don’t ever attempt that. instead install version of php want run , edit apache config load proper...

Where and how ASP.NET MVC 5 implement jQuery/AJAX validation during registration and Login -

i using built-in mvc 5 template in visual studio 2013. far saw, mvc 5 framework seems it's implemented jquery/ajax validation during registration , login, because when tried input invalid data account and/or password fields, error messages appear without refreshing page. so can please explain how mvc 5 framework achieve effect? guess using css classes? as of mvc3, using jquery's unobtrusive validation , described in blog post brad wilson . post walks through how unobtrusive validation works, , how ms applies attributes fields.

SAS proc tabulate questions -

my dataset looks this: id var1 var2 var3 1 0 1 b 0 0 1 b 1 1 0 0 0 0 1 1 1 my expected output be: id var1 var2 var3 2 1 3 b 1 1 1 can this? i've not access sas right try following:- proc tabulate data = in; class id; var var:; table id, sum=''*(var1 var2 var3); run;