@Autowired and static method

You can do this by following one of the solutions: Using constructor @Autowired This approach will construct the bean requiring some beans as constructor parameters. Within the constructor code you set the static field with the value got as parameter for constructor execution. Sample: @Component public class Boo { private static Foo foo; @Autowired public … Read more

How to create an instance of anonymous interface in Kotlin?

Assuming the interface has only a single method you can make use of SAM. val handler = Handler<String> { println(“Hello: $it”) } Since version 1.4 Kotlin supports SAM for interfaces defined in Kotlin. That requires prefixing the interface keyword with fun fun interface Handler<C> { fun call(context: C); } If you have a method that … Read more

PHP DOMDocument errors/warnings on html5-tags

No, there is no way of specifying a particular doctype to use, or to modify the requirements of the existing one. Your best workable solution is going to be to disable error reporting with libxml_use_internal_errors: $dom = new DOMDocument; libxml_use_internal_errors(true); $dom->loadHTML(‘…’); libxml_clear_errors();

RESTful password reset

Unauthenticated users We do a PUT request on a api/v1/account/password endpoint and require a parameter with the corresponding account email to identify the account for which the user wants to reset (update) the password: PUT : /api/v1/account/password?email={email@example.com} Note: As @DougDomeny mentioned in his comment passing the email as a query string in the url is … Read more

where is gacutil.exe?

gacutil comes with Visual Studio, not with VSTS. It is part of Windows SDK and can be download separately at http://www.microsoft.com/downloads/details.aspx?FamilyId=F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=en . This installation will have gacutil.exe included. But first check it here C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin you might have it installed. As @devi mentioned If you decide to grab gacutil files from existing installation, note … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)