Posts

spring mvc - Why do I get java.net.SocketException: Connection reset when deploying app? -

i trying deploy web application on machine. doesn't app. , when attempted, got - java.net.socketexception: connection reset: warning *********** netbeans http monitor ************ request cannot recorded because netbeans http monitor module disabled. monitorfilter::warning: monitor filter must first filter in chain. notifyutil::java.net.socketexception: connection reset @ java.net.socketinputstream.read(socketinputstream.java:209) @ java.net.socketinputstream.read(socketinputstream.java:141) @ java.io.bufferedinputstream.fill(bufferedinputstream.java:246) @ java.io.bufferedinputstream.read1(bufferedinputstream.java:286) @ java.io.bufferedinputstream.read(bufferedinputstream.java:345) @ java.io.filterinputstream.read(filterinputstream.java:133) @ sun.net.www.protocol.http.httpurlconnection$httpinputstream.read(httpurlconnection.java:3335) @ sun.nio.cs.streamdecoder.readbytes(streamdecoder.java:284) @ sun.nio.cs.streamdecoder.implread(streamdecoder.java:326) @ sun.nio.cs.stream...

In JavaScript, what are the differences between "recursion", "a non-terminating procedure that happens to refer to itself", and "repeated scheduling"? -

this question intended canonical question/answer disambiguation descriptive term "recursion", or "recursive". , extent applicable, "a non-terminating procedure happens refer itself" , "repeated scheduling". in javascript definitions of , differences between "recursion"; "a non-terminating procedure happens refer itself"; , "repeated scheduling" i see term "recursion" used when function repeated calls itself, though unambiguous definition of "recursion" in javascript ? rarely have viewed terms "a non-terminating procedure happens refer itself" or "repeated scheduling" used when describing pattern of function; "recursive" or "recursion" used describe pattern within body of function call, function call made original function began process. in javascript , when "recursion" not applicable particular function pattern; , unambiguous d...

image processing - ImageMagick - alpha channel extract, different results (darker) on 6.7 vs 6.9 -

Image
i'm working in cross-platform environment results of same, simple alpha channel extraction operation different between imagemagick 6.7.7-10 , imagemagick 6.9.3-7. the command extract alpha channel is: convert image.png -alpha extract alpha.png or equivalently: convert image.png -channel -separate alpha.png here original, 6.7 output, , 6.9 output: testing original in gimp, in middle of top dark bar, can see original alpha value 80% or 204: the 6.9 output has grayscale value of 204, while 6.7 output has grayscale value of 154. now question: believe 6.9 version correct, visual result provided 6.7 version. can understand how 6.7 version working (maybe different formula / luminence / color space?) , same result 6.9 version? maybe apply curve 6.9 output? or switch make use different formula / color space? (do color spaces apply pngs?) post processing 6.9 output simple gamma adjustment gives close approximation of 6.7 output: convert /tmp/alpha_channel_6....

typescript - Angular 2 select or deselect checkboxes on condition -

please, note want avoid jquery , use angular 2. being said, here plunk i have custom checkboxes, more 1 can selected. storing selected items in array this: eventchkarr: = []; updatechecked(value: any, event: any) { if (event.target.checked) { this.eventchkarr.push(value); } else if (!event.target.checked) { let index = this.eventchkarr.indexof(value); this.eventchkarr.splice(index, 1); } } when user selects more 1 check box, modal pops (this modal not popping in plunk reason) , ask if want select multiple checkboxes. now, trying if user clicks on no button last clicked button before modal popup remain checked , on user's further clicking 1 checkbox selected @ time. if click on "yes" multiple checkboxes can selected. but, how achieve that, help? tia. https://plnkr.co/edit/yu4p3zsq3qah9vby8m3i?p=preview you can save checked value of each checkbox in 'eventtypechkbox' ar...

wordpress - How can i embed videos from websites with no embed option? -

i looking embed videos websites not offer oembed support. here example emdeb support : openload.co/f/mi7ehbgpov

c# - Reply with "Is Typing" message in Microsoft botframework -

Image
i developing chatbot using microfsoftbotframework on c#.net , luis cognitive services. i want when user type should reply typing or bot typing.. public async task<httpresponsemessage> post([frombody]activity activity) { trace.traceinformation($"type={activity.type} text={activity.text}"); if (activity.type == activitytypes.message) { //await microsoft.bot.builder.dialogs.conversation.sendasync(activity, () => new contactonedialog()); //implementation of typing indication connectorclient connector = new connectorclient(new system.uri(activity.serviceurl)); activity istypingreply = activity.createreply("shuttlebot typing..."); istypingreply.type = activitytypes.typing; await connector.conversations.replytoactivityasync(istypingreply); await conversati...

Should a wrong parameter passed via REST call throw an error? -

i accessing rest calls, when passed wrong parameter request not throw http error. should design changed throw http error or wrong parameter can passed rest call. example 1:(parameters optional) https://example.com/api/fruits?fruit=apple give list of apple elements example 2: https://example.com/api/fruits?abc=asb give list of fruits my question related example 2, should example 2 throw error or behaving properly? it's pretty common ignore parameters aren't expecting. think example 2 behaving should. i know depending on browser append variable timestamp make sure rest call wouldn't cached. like: https://example.com/api/fruits?ihateie=2342342342 if you're not explicitly doing parameter can't see harm in allowing it.