Artificial intelligence will spur economic growth and create new wealth. Machines that “think” like humans will help solve huge problems, from curing cancer to climate change. Yet millions of human…
Month: January 2016
Creating a URL shortener using ASP.NET WepAPI and MVC
In this tutorial, I use several techniques and tools. I use Microsoft Visual Studio 2015 and the latest version of all components. ASP.NET MVC: Microsoft’s modern web application framework. As…
Throw vs Throw e
Some people asked me the different between those two following code: Code 1 try { ... } catch (Exception ex) { throw ex; } Code 2 try { ... }…
C# Faster way to truncate a string
Very often I found this problem and now I got a solution! I’ve compared some methods and I was decided which one. But I verified time (if you want to…
Calculate the execution time of a method
I found a simple code to know the execution time of a method. First of all you have to import the following namespace: using System.Diagnostics; Then you use Stopwatch to…
String to Hex - Hex to String Convert
You can convert a string to hex or vice-versa with this methods. Example for real world; You want set / get some data from URL, but if your data has…
Regular expression for UK postcode
I’m looking for an answer to my regular expresssion problem in c#. I’m looking for a match on a specific postcode format and have run into problems. Here you can…
OWIN and Facebook: the developers of this app have not set up this app properly for Facebook Login?
Did you received this error when you try to login in your Owin app with Facebook? App Not Set Up: This app is still in development mode, and you don’t…
C# ASP.NET MVC OWIN and Twitter authentication error
We have an MVC project using OWIN Framework to allow our users to authenticate using Twitter. However starting today, we have been getting this exception when trying to authenticate: System.Security.Authentication.AuthenticationException:…
ASP.NET MVC Return image dynamically drawn in controller
If you have problem returning dynamically drawn image from controller below informations may help. The task looks easy and should be achieved with this code: public ActionResult Image(string text) {…
ASP.NET MVC OWIN and Microsoft account
Register an app in the Microsot Account Developer Center Go to the Microsoft Account Developer Center and create a new application. After you have registered the application take note of…
Microsoft cuts off Windows 8's security updates on January 12
Windows 8 is about to get a lot less secure. After January 12, Microsoft will stop offering security patches for the three-year-old operating system. Users will have to upgrade to…
Support Ending for the .NET Framework 4.0, 4.5 and 4.5.1 on Tuesday
In less than a week Microsoft will formally end support for versions 4.0, 4.5, and 4.5.1 of the .NET Framework. Users should upgrade to a later version such as the…
Microsoft is pulling the plug on Internet Explorer 8, 9, and 10 next Tuesday
Microsoft is ending support for Internet Explorer 8, 9, and 10 next week on January 12th, releasing a final patch encouraging users to upgrade to one of the company’s more…
The current type, is an interface and cannot be constructed. Are you missing a type mapping?
You might have missed to register your Interface and class (which implements that inteface) registration in your code. e.g if the error is "The current type, xyznamespace. Imyinterfacename, is an…
Microsoft CEO Satya Nadella explains why it doesn't matter if only a handful of people have a Windows phone
Microsoft CEO Satya Nadella has explained in an interview with BuzzFeed why the company is not concerned about the market share of its mobile operating system, which is about 1.7%…