Posts

java - How to check the log4j version in wildfly 10 and upgrade it? -

when go directory {wildfly_home}/modules/system/layers/base/org/apache/log4j/main i see module.xml file inside it, no log4j jar there. so have 2 questions: how can check version of log4j packed wildfly 10 ? is possible upgrade log4j version of wildfly module ?

Dynamically create array of HTML elements with typescript in Angular 2/4 -

i want dynamically add divs using loop typescript in angular. want reproduce following pseudocode in .ts component file: i: number = 4; arrayofhtmlelements: html elements = []; in range (1, i): create div @ index i'm assuming slide array of html elements .html component file using: <li *ngfor="let arrayofhtmlelement of arrayofhtmlelements; let = index">{{i + 1}}: {{arrayofhtmlelements}}</li> you should iterate on objects , create inner html in template this: const heroes = [ { name: 'spiderman' }, { name: 'superman' }, { name: 'superwoman!' } ] template: ` <ul> <li *ngfor="let hero of heroes"> <div>{{hero.name}}</div> </li> </ul> `

mysql - SQL group by months, display empty months -

i got sql fiddle minimal data. database contains on 1000 output columns query couldnt load sqlfiddle. i display months years found. in example car 1 sold in 2003 , display empty months 2003. for car 2 sold in 2003 , 2004. display empty months 03 , 04. i have read lot of similar questions , think simple join month table should trick. dont know how joins properly. me out on one? sql fiddle here: http://sqlfiddle.com/#!9/14b2f5/3 also real query in mysql workbench , output this . can see feb. 2003 missing there. display "1952 alpine renault 1300" - "0" - "february 2003" instead of nothing now.

What is the best practice for a polymer menu? -

i want build polymer app has drawer menu inside goes different pages when different items clicked. so far i've considered 3 options: option 1 using <iron-selector> in starter-kit . option 2 using <paper-button> , add on-click function route desired page. a few of these inside <app-drawer> : <paper-button on-click="gotopage" id="my-page-one">page 1</paper-button> and function in script: gotopage(e){this.set("route.path", "/" + e.srcelement.id);} option 3 using <paper-menu> , <paper-item> inside similare option 2: <paper-item on-click="gotopage" id="my-page-one">page 1</paper-item> which 1 considered best practice? better options?

swing - Manage Java CardLayout JPanels created with different classes -

Image
i need simple example of how manage multiple jpanels (created different classes) in 1 jframe using cardlayout (or else?). illustrative example of need: panel a : panel b : example of file structures: // gui.java public class gui { ... ... ... } // panela.java public class panela { ... ... ... () { jpanel pnl = new jpanel(); pnl.setbackground(color.orange); jbutton btn = new jbuttn("show panel b"); pnl.add(btn); } public void actionperformed(actionevent ae) { ... } } // panelb.java public class panelb { ... ... ... () { jpanel pnl = new jpanel(); pnl.setbackground(color.green); jbutton btn = new jbuttn("show panel a"); pnl.add(btn); } public void actionperformed(actionevent ae) { ... } } i found lot of examples doing this, jpanels created in same class jbuttons fields listener access them. tried edit example...

c++11 - Why does making this virtual destructor inline fix a linker issue? -

if have pure virtual class interfacea consists solely of pure virtual destructor, why have define destructor inline ? i don't error when try link it. below admittedly contrived example, illustrates point. point not compile me using cmake , g++. however, if change interfacea destructor definition follows - inline interfacea::~interfacea(){}; compiles. why this? inline keyword do? // interfacea.h, include guards ommitted clarity class interfacea { public: virtual ~interfacea() = 0; }; interfacea::~interfacea(){}; // a.h, include guards ommitted clarity #include "interfacea.h" class : public interfacea { public: a(int val) : myval(val){}; ~a(){}; int myval; }; // auser.h, include guards ommitted clarity #include "interfacea.h" class auser { public: auser(interfacea& ana) : mya(ana){}; ~auser(){}; int getval() const; private: interfacea...

vba - FOR loop in Excel - find and replace -

Image
i have following code sub cleancat() dim integer = 1 50 columns("a").replace what:="cat" & i, replacement:="category" & i, lookat:=xlpart, searchorder:=xlbyrows, matchcase:=false, searchformat:=false, replaceformat:=false columns("a").replace what:="cat " & i, replacement:="category" & i, lookat:=xlpart, searchorder:=xlbyrows, matchcase:=false, searchformat:=false, replaceformat:=false columns("a").replace what:="category " & i, replacement:="category" & i, lookat:=xlpart, searchorder:=xlbyrows, matchcase:=false, searchformat:=false, replaceformat:=false columns("a").replace what:="category" & i, replacement:="category" & i, lookat:=xlpart, searchorder:=xlbyrows, matchcase:=false, searchformat:=false, replaceformat:=false columns("a").replace what:="cat" & i, replacement:="catego...