Posts

javascript - How to add a signIn button in a website and update it based on user authentication -

i working on playframework believe question more general topic of web implementation. creating website want put signin button on top right corner of home page , update based on user authentication. i.e. if user logged in there my profile , logout button , if not there signin button. know how implement using different pages uses different routes, in case can load complete page don't want load complete page instead use popup window signin/signup , want user redirect on same page after signing in ( click on signin -> signin form popup -> submit -> signed in ) url shouldn't changing in process. have seen type of design in many popular websites don't know how build one. i did research , found, can using jquery's ajax call. of ajax call can request data server in background (here request html) , update current page dom. in case supposed update dom of navbar's top right corner request html part don't know how it? new website designing, design or t...

CSS page-break-after for background image -

is there way use css property of page break background image? page-break-after:always; i m using repeat background image , when writing print stylesheet, there way ensure background image on single page, background image end @ bottom of page , split.

properties - Gradle task check if property is defined -

i have gradle task executes testng test suite. want able pass flag task in order use special testng xml suite file (or use default suite if flag isn't set). gradle test should run default standard suite of tests gradle test -pspecial should run special suite of tests i've been trying this: test { if (special) { test(testng_special.xml); } else { test(testng_default.xml); } } but undefined property error. correct way go this? if (project.hasproperty('special')) should it. note you're doing select testng suite won't work, afaik: test task doesn't have test() method. refer https://discuss.gradle.org/t/how-to-run-acceptance-tests-with-testng-from-gradle/4107 working example: test { usetestng { suites 'src/main/resources/testng.xml' } }

Stop SAS EG project if error is encountered -

i tried putting before programs (using option include code in pre-processing): options errorabend; it trigger warning popup next files executed. example: a -­> b -> c -> d if has error, popup saying error occured , server has disconnected, however, b, c, , d run. want project execution stop @ a. i have several old projects tens if not hundreds of programs , therefore don't consider using macro ( is there way make sas stop upon first warning or error? ) while checking errors option. what can done? thank you! edit: sas entreprise guide 7.1 i think best way write in macro, like: %macro error_check; 'your process a'; %if &syserr > 0 %then %do; %goto exit; %end; /* if systemerror value greater zero, go exit directly */ 'your process b'; 'your process c'; 'your process d'; %exit: /* careful, not semicolon*/ %mend; just try not put %if &syserr loop inside "data-run sta...

.net - How to read weight from scale using ethernet connection -

hi first post please bare me. i have mettler toledo xs32000l scale , trying read weight via ethernet connection , vb.net (2010) application. have found plenty of information/code serial(com) connection nothing ethernet connection. communication mode: client & server remote host address: 192.168.0.2. remote host port number: 8001 local server port number: 8000 (scale ip: 192.168.0.1) i able ping scale reply. have tried using hyperterminal no luck. appreciated, , post can many others come. thanks! other resources code vb application serial connection: http://control.com/thread/1240210560 another helpful link(but not me): http://vb.net-informations.com/communications/vb.net_socket_programming.htm alright - despite criticism, going post solution after hours of researching. created tcp client , modified settings (ip, port, etc.) helps future programmers! imports system.net.sockets public class form1 private sub form1_load(byval sender system.object, byval e...

c++ - How to compose a hierarchy of decorated classes without copying data -

i have 3 classes hierarchically related: pattern , has protected field _panels of type std::vector<panel> . panel , in turn, has protected field _edges , of type std::vector<edge> . edge , finally, has protected field _verts , of type std::vector<eigen::vector2f> . i have pure virtual class renderable , has pure virtual function virtual void render() . want create specialized versions of each of 3 classes inherit renderable , example: class vpattern : public pattern, public renderable { public: void render() { ... } protected: ... private: ... }; // class vpattern however, _panels field still contain instances of panel , , not vpanel . mean have put drawing logic edge , panel in draw function of pattern , not ideal. is there different approach here i'm not seeing avoid this? using wrapper class more suitable approach? is there reason can't have drawable virtual class has pure virtual function draw() drawable descen...

java - Failed to load class "org.slf4j.impl.StaticLoggerBinder" after loading required dependencies -

i building maven project , deploying in jetty server , issue. in ${jetty_home}/lib, having jcl-over-slf4j-1.7.2.jar, jul-to-slf4j-1.7.2.jar, slf4j-api-1.7.2.jar. along maven project, having <dependency> <groupid>org.slf4j</groupid> <artifactid>slf4j-log4j12</artifactid> <version>1.7.2</version> </dependency> <dependency> <groupid>org.slf4j</groupid> <artifactid>slf4j-api</artifactid> <version>1.7.2</version> <scope>provided</scope> </dependency> in mvn dependency tree, slf4j, see following: [info] +- org.slf4j:slf4j-log4j12:jar:1.7.2:compile [info] | \- log4j:log4j:jar:1.2.17:compile [info] +- org.slf4j:slf4j-api:jar:1.7.2:provided (scope not updated compile) apart this, have commons-logging-1.2.jar bundled project. build maven project , if run using eclipse je...