Posts

angular - Primeng Button not showing label -

i have primeng button in angular4 application. label of button not displaying.button displaying small without label. <div id="main"> <form #newjobcleanupform="exform" (ngsubmit)="onsubmit(exampleform)"> <label class="stylelabel" for="jobnumber"><span>job number</span> <input type="text" pinputtext class="styletext" id="jobnumber" required [(ngmodel)]="jobnumber" name="jobnumber"> <button pbutton type="button" label="click"></button></label> </form> </div> this issue caused missing import of primeng's buttonmodule. please add import same module, component defined in. import {buttonmodule} 'primeng/primeng'; ... @ngmodule({ imports: [ ... buttonmodule ] ...

java Mailgun email validation API response not working -

can 1 please? i have created test mailgun domain , have public , private api key. i using jersey client validate email address using mailgun api. don't json response instead string "mailgun magnificent api". below piece of code public static clientresponse validateaddress() { client client = client.create(); client.addfilter(new httpbasicauthfilter("api", myapikey)); webresource webresource = client.resource("https://api.mailgun.net/v3/sandboxxxxx.mailgun.org/validate"); clientresponse response = webresource.queryparam("address", "mamta.solanki@ecrebo.co.uk").accept("application/json").type(mediatype.application_json_type).get(clientresponse.class); return response; } public static void main(string args[]) { clientresponse res = validateaddress(); system.out.println(res);}

arduino - How to find specific Teensy in COM list -

i new first project making skype notification cube teensylc , leds. know can hard-code com port communications if unplug , use different plug com port changes. i'd able plug board in , have software find automatically. [edit] it looks didn't express myself first time, let me try again. if call serialport.getportnames() array of {"com1", "com2", "com3"}. if make new serialport() using names properties same. there's nothing can see differentiate teensylc other com port. what best way find teensy board without knowing com port?

html5 - What event will capture the resizing of the browser window? -

i have custom slider, shown when user clicks on font awesome button.this model works quite me. add event listener slider object focusout event, , show or hide slider. i notice when user resizes browser screen, not seen focusout, because in case slider not disappear ( to). so question is, event capture resizing of browser window, in order me hide slider way? thanks!

sapui5 - How to d3.js in UI5? (View.xml | controller.js) -

i have ui5 webapp sites. how can add d3 graph webapp. dont know how should write in view(xml) , controller (js). can me please? greetings florian imo, not question, rather request write application you. not problem if willing pay :) try more specific , own investigation in advance. example: overflow , sap , etc.. the last link contains pretty need know. high level overview: create custom control using sap.ui.core.control.extend override metadata + ui5 controls lifecycle methods (like oonafterrendering) write renderer put there d3js coding

rest - Are public POST routes dangerous if they don't hit the database? -

i'm creating simple calculator api. on there have endpoint named /calculate . can post few params , run calculation. i'm using basic authentication know isn't have enabled testing. my question is: having route open public hit bad idea? type of issues face or if it's simple calculations not problem? any insight dangers brings great, thanks!

javascript - How to change a parameter inside an object? -

begginer here. var player() = { isdrunk: false } how set isdrunk true after player uses item "beer"? (completely made-up example) to answer question player.isdrunk = true so have var player = { lefthanded: false, righthanded: true, isdrunk: false }; and then function drinkbeer(player) { player.isdrunk = true; } then can pass players drinkbeer function needed. alternatively can put function inside player object if want each individual player have drinkbeer() function can use change own isdrunk property calling player.drinkbeer() that this: var player = { lefthanded: false, righthanded: true, isdrunk: false, drinkbeer: function() { isdrunk = true; } };