Posts

xaml - WPF Usercontrol with content presenter for a group of buttons -

i'm trying figure out how create user control act modal group of togglebuttons. don't want go radio button route because user has able deselect everything. need list support vertical , horizontal presentation. i'd have control looks in xaml. <mycontrol> <grid> <grid.columndefinitions>...</grid.columndefinitions> <togglebutton /> <togglebutton /> <togglebutton /> ... <togglebutton /> </grid> </mycontrol> i think grid may not correct layout option here since don't know how many buttons i'll have. you handle routed checked event according following sample code. xaml: <grid togglebutton.checked="grid_checked"> <grid.columndefinitions> <columndefinition /> <columndefinition /> <columndefinition /> </grid.columndefinitions> <togglebutton content=...

javascript - Conditional Formatting in Angular -

Image
here conditional formatting feature in microsoft excel color bars represent percentage in comparing highest value. is there anyway achieve html5 using either css or javascript? or maybe using additional angular library well. i'm thinking using clip-path feature may not supported on browsers do mean this ? you can simple in vanillajs. must elements const elnodes = document.queryselectorall('.element'); const elements = [...elnodes]; get values , find max value const elementsvalues = elements.map((el) => parsefloat(el.children[1].textcontent)); const maxvalue = math.max(...elementsvalues); finally change width of elements based on value: elements.foreach((el) => { el.children[0].style.width = 100 / (maxvalue / parsefloat(el.children[1].textcontent)) + '%'; }); wiki

How to code play stop button on android studio -

i need advice code below. i'm trying create simple apps when people click play button, music start playing, , when people click stop button, music stop playing. i'm using single button 2 task start , stop. i test on android simulator, start , stop button working wanted to. problem occurred when build apk file , play on device. stop button cannot work wanted to. if press stop button, music restart playing beginning. any ideas problem? thank you. btn_playstop.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { if (btn_playstop.ispressed()) { if (player.isplaying()) { player.stop(); try { player.prepare(); } catch (illegalstateexception e) { e.printstacktrace(); } catch (ioexception e) { e.printstacktrace(); } ...

c# - Bot emulator calling/accessing the wrong Message Controller -

Image
in vs solution, there 3 projects below: 1) bot2015 2) bot2015_2 ( startup project ) 3) db bot2015_2 startup project whenever try test bot2015_2 bot application via emulator, calls message controller of first project i.e. bot2015 (that issue here). should access message controller of start project i.e. bot2015_2. if unload bot2015 , test application, same thing happening, never calls correct message controller i.e. of bot2015_2. please me on this! thank you. double check port using communicate emulator. emulator use communicate controllers. to specify port web application project uses iis express in solution explorer, right-click name of application , select properties. click web tab. in servers section, under use local iis web server, in project url box change port number. to right of project url box, click create virtual directory, , click ok. in file menu, click save selected items. to verify change, press ctrl+f5 run project. new ...

Angular services: best pratice for observables -

i'm in process of moving basics of angular learning more best practices. i've started trying adopt more reactive approach lately, there 1 thing can't find answer googling. now, can have following simple method in service: public getsomething(): observable<something> { return this._http.get("api path") } so, in calling component, obviously, can subscribe , notified when changes streamed. if there several parts of application should notified change? so, alternative, like: private _somethingsubject: subject<something> = new subject<something>(); public something$: observable<something> = this._somethingsubject.asobservable(); public getsomething() { return this._http.get("api path") .subscribe((something) => { this._somethingsubject.next(something) }) } now, consumer of service can listen changes something$. of course, need know there connection between "detached...

javascript - html drop-down button not working -

can tell me wrong drop-down button. not working in chrome. here html code- <!doctype html> <html lang="en"> <head> <title>iconmaker</title> <meta charset=utf-8"> <meta name= "viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/y6pd6fv/vv2hjna6t+vslu6fwyxjcftcephbnj0lyafsxtsjbbfadjzaleqsn6m" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> </head> <body> ...

c# - Mobile application for Dynamics AX -

in our organisation trying develop mobile application/website front-end dynamics ax 2012. following architecture suggested microsoft ( https://technet.microsoft.com/en-us/library/dn155874.aspx ). even though acs deprecated in azure architecture suggested microsoft forced use acs have created after requesting azure team. dynamics ax architecture suggsted microsoft steps followed per document: we have setup following items , stuck @ 1 place: setup 3 windows 2012 r2 servers running on single domain - first 1 ax & dc, second 1 adfs server, , third 1 middle tier wcf service - done & tested individually setup of dynamics ax 2012 server aif service exposed in inboud ports - done setup adfs server , create few users - done, listening service bus according event logs & tested authentication using powershell console. create sample console application call adfs token , pass azure service bus - adfs returning token , acs returning token setup middle tier service sit ...