‘R’ could be instantiated with an arbitrary type which could be unrelated to ‘Response’

Generic functions in TypeScript act as a function representing every possible specification of its generic type parameters, since it’s the caller of the function that specifies the type parameter, not the implementer: type GenericFunction = <T>(x: T) => T; const cantDoThis: GenericFunction = (x: string) => x.toUpperCase(); // error! // doesn’t work for every T … Read more

Maven error :Perhaps you are running on a JRE rather than a JDK?

I’ve been facing the same issue with java 8 (ubuntu 16.04), trying to compile using mvn command line. I verified my $JAVA_HOME, java -version and mvn -version. Everything seems to be okay pointing to /usr/lib/jvm/java-8-openjdk-amd64. It appears that java-8-openjdk-amd64 is not completly installed by default and only contains the JRE (despite its name “jdk”). Re-installing … Read more

error::make_unique is not a member of ‘std’

make_unique is an upcoming C++14 feature and thus might not be available on your compiler, even if it is C++11 compliant. You can however easily roll your own implementation: template<typename T, typename… Args> std::unique_ptr<T> make_unique(Args&&… args) { return std::unique_ptr<T>(new T(std::forward<Args>(args)…)); } (FYI, here is the final version of make_unique that was voted into C++14. This … Read more

Fatal error: “No Target Architecture” in Visual Studio

Use #include <windows.h> instead of #include <windef.h>. From the windows.h wikipedia page: There are a number of child header files that are automatically included with windows.h. Many of these files cannot simply be included by themselves (they are not self-contained), because of dependencies. windef.h is one of the files automatically included with windows.h.

Duplicate AssemblyVersion Attribute

Starting from Visual Studio 2017 another solution to keep using the AssemblyInfo.cs file is to turn off automatic assembly info generation like this: <Project Sdk=”Microsoft.NET.Sdk”> <PropertyGroup> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> </PropertyGroup> </Project> I personally find it very useful for projects which need to support both .NET Framework and .NET Standard.