Solve the problem

{ write the code }

martincarlsen.com

FTP deploy from Azure DevOps article image

Here follows a guide of how to setup Azure DevOps (former VSTS) to deploy from a Git repository to a web server via FTP. Demo Project Prep I´ve prepared a Git demo project in ADO containing HTML and CSS that we are going to deploy. Pipeline Head over to the Build and release section to create […]

Fast image resizing using WPF rendering support article image

Sharing is caring I was cleaning up among old projects today and stumble on some image manipulation stuffs. This was used in a web application to scale images in real-time on the server, storing them on disk and serve them to the web browser by calling a url. Instead of using the Windows GDI+, the […]

NoSQL databases gives an interesting point of view in modern application design. There are different kinds of them and one common characteristic is that they are optimized for fast data access. For masterdata a normal choice would be a relations database, but will in some cases not perform well especially when it comes to data […]

Securing Media In Umbraco article image

This is about securing files in the media section in Umbraco CMS (v7.5.x). There are more than one approach to accomplish this. In this article we will take advantage of the URL routing in ASP.NET MVC to route media to a custom controller. In short we will: Create a member group and a member that […]

Here follows a code snippet that will verify if an url exists. It creates a web request using HEAD and tries to get its response. HEAD as request method will boost performance of the request, since no content is downloaded. In some cases the remote server exists but doesn´t allow HEAD as request method and […]

I was recently having some issues with a webjob in Azure. It was calling a Web API 2 endpoint (also running on Azure). But the process took to long and server shuts down the connection before it finished. Well it actually didn’t take that much time; approximately 4 minutes. After some digging it seemed that Azure […]

Here´s a little sunday PoC I wanted to share with you: remote control a presentation using HTML5 web sockets. Ingredients: Swipe JavaScript touch slider. Microsoft.WebSockets NuGet package. Even if it´s not actively developed and only works with Windows 8 or higher. Some lines of vanilla JavaScript and C# 😉 Client-side The client (index.html) is just some […]

Weather Section article image

A few weeks ago I was contacted by Andrea Ballerino, an Italian web designer, about the JavaScript widget Show Me The Weather. He has been working with a new website for a kitesurfing school, in Prea Beach in Brazil, called Play Kite School. Now he´s using it on the website showing weather conditions and wind force. I really like the […]

Ever had problem with JSON data sometimes array and sometimes object that will cause the deserialization process to fail? Anyway, if you´re to encounter this “phenomenon” it is possible to handle building a custom JsonConverter that inherits the abstract Newtonsoft.Json.JsonConverter class. Usage: And:

Here’s a little code snippet that will handle caching of objects using http runtime cache. If object exists in cache it will be returned. If not it will be reloaded using the supplied method, inserted into cache and returned back. Usage:

pMVC article image

Update: pMVC source code now hosted on GitHub. pMVC is not a framework nor a class library. It´s a simple MVC model for the PHP plattform. pMVC is a simple MVC model with structure and separate of concerns in mind. It does not contains all the fancy full-fledged framework stuffs like Zend Framework, Code Igniter […]

There are multiple ways of parsing an RSS or Atom feed in .NET like XmlDocument and XDocument classes. If you´re running .NET Framework 3.5 and above it´s also possible to use the SyndicationFeed class and it is as simple as this: Here follows a snippet to parse multiple feeds into one using the SyndicationFeed class and some LINQ (I love LINQ :-)). […]

Oerinfo article image

A new version of Flight Info has been released, now called Oerinfo (OER is the airport code for Örnsköldsvik Airport). It has been rewritten from the ground-up. Here follows short information about the new version. Check it out! Less is more The layout has been cleaned up and only the most important information are shown. The rest […]

Show Me The Weather article image

The Yahoo developer network offers APIs and tools for developers to use in projects. The Yahoo! Query Language (YQL) is used to retrieve and manipulate data. One interesting product is the weather API where you can get weather information from a specified location, including 5-day forecast, wind, atmosphere, astronomy conditions, and more. There´s possible to lookup […]

Modal is a simple modal overlay written in JavaScript for modern browsers. The main goal is to keep it small, clean and without third-party library dependencies. Demos Minimalistic Boostraped Video For more information and download please visit the GitHub repo.

Flight Info article image

I grew up in the northern part of Sweden, and part of me is still up there, even though I lived in the south for several years now. Travel to my native place by air is a quick and efficient way. However, I´ve been missing a mobile friendly timetable for arriving and departing flights and […]

Pdfcrowd is a HTML to PDF creation sevice wich lets you create PDF from web pages and raw HTML code. You can also convert HTML to PDF online. They also provide a free save to PDF service – a strightforward way to save your web pages to PDF. What you need to do is place […]

Netflix Watchlist article image

Update: Netflix has, after this article was published, made a playlist feature available called “My List”. To follow in the footsteps of the preceding article about Userscripts: I´ve been missing a watchlist or favourites feature on Netflix.com. I´ve been talking to the support about this and it seems that a queue feature is available, but […]

Userscripts and Tampermonkey article image

I really like the new Outlook.com mail service from Microsoft because it´s clean and minimalistic. But the advertising on the right side is really annoying, especially when you´re working in a smaller browser window. This is where Userscripts entering. Userscripts allows you to install and run scripts (typically a brief of JavaScript code) and make […]

Custom made windows applications has become something I´ve been using more often in web projects to test functionality, migrate data or just extract information from a specific environment. It has helped to speed up the development, structure the project and make some parts easier to built. So here´s a tip to query the AD hierarchy […]