Despite its infinitesimal market share, there are valid reasons to target the BlackBerry 10 platform. Adding BlackBerry 10 as a target platform to a Cordova-based project is as easy as running the cordova platform add blackberry10 command on your terminal. However, if you try to deploy your app to the device and run cordova run blackberry10, you might stumble upon the following error message:
blackberry-nativepackager cannot be found on the path. Aborting.
It seems as if we are missing the native platform SDK here. In this article, I want to show you which steps are required in order to successfully run and debug your Cordova-based app on your BlackBerry 10 phone. Please note that I’m using OS X, so the exact steps may and will differ on other platforms.
If you are working with Node.js Package Manager (npm), you will usually retrieve npm packages from the official registry of npm (https://registry.npmjs.org) and publish own packages there. But in some cases, you might want to keep packages private, such as internal components. For this purpose, you could either go with npm which offers paid plans and on-premises installations of the package registry or you could alternatively decide to run a custom repository server. Sinopia is such a private npm repository server, which in addition acts as a proxy for the official npm package registry and caches downloaded packages. This saves bandwidth and continues to work if the internet connection or the original package registry is down.
npm has a concept of scoped packages, where similar or related packages are grouped together. Angular 2 utilizes this concept in its packages named like @angular/core, with angular being the scope and core being the package name. But if you try to install a scoped package via Sinopia, the installation fails. In the Sinopia logs, you will see an error message similar to:
http < -- 404, user: undefined, req: 'GET [email protected]%2fcompiler', error: no such package available
Microsoft Windows for Workgroups (WfW) 3.11, released back in 1993, was the first operating system I ever used. As the name suggests, WfW was designed for networking in workgroups of a few people and workstations. This included centralized authentication, file and printer sharing based on Microsoft NetBEUI or NetBIOS (transported for example over Novell’s IPX/SPX protocols). This however was restricted to a local network.
In 1993, the Internet and its protocols were invented for a long time and the World Wide Web (WWW) based on Internet protocols started to emerge. But WfW didn’t ship with a TCP/IP stack and thus was incapable of connecting to the Internet. Luckily, this stack is available as a separate download which will allow us to connect to the Internet using WfW 3.11 even today. Nostalgia alert!
Detecting clicks on a component is easy in Angular 2: Just use the (click) event binding, pass a function from the component’s instance and you are done. However, if you need to detect clicks outside of your component, things are getting tricky. You will usually need this for custom implementations of drop-down lists, context menus, pop-ups or widgets.
As this is a functionality which you might use more often, you should wrap it in a reusable directive. Angular 2 offers a syntactically nice way to implement such a directive. So let’s go ahead and implement a simple click-outside directive in Angular 2!
tl;dr: Implementing this directive is super easy. If you feel lazy, just run npm i angular2-click-outside.
One of our customers at Thinktecture recently wanted to set up an auto deployment of its GitLab repository to an App Service hosted by Microsoft Azure. If you want to set up auto deployments for GitLab, you might be disappointed because this service is not included in the list of available services. Setting up auto deploy from GitLab.com or on-premises editions of GitLab is a manual process—luckily, it’s an easy one.
GitLab.com is a very popular service, as it allows free private Git repositories with up to ten gigabytes in size. If this still doesn’t suit your needs or you want to host the software yourself, GitLab also offers on-premises editions (Community Edition, free and Enterprise Edition, paid per user and year).
Microsoft Azure is a popular cloud service, offering so-called App Services (free plans available). App Services are used for hosting web apps or back-ends based on .NET, Node.js, Java, PHP and other technologies. An App Service can be set up to auto deploy changes that are pushed to a certain branch of a Git repository.
Here’s how to do it for GitLab.com or on-premises editions of GitLab:
Angular 2 is the next version of Google’s popular SPA framework. If you’re not yet familiar with it, you can find an overview here. In this article, I will focus on the dependencies of Angular 2. Whereas AngularJS (1.x) could either be run stand-alone or on top of jQuery, Angular 2 requires some third-party dependencies, which we’ll take a look at in this article:
Angular 2 is the upcoming all-new Single-Page Web Application (SPA) framework from Google. It’s the successor to the well-known AngularJS, which was first published in 2009.
Do you remember? In 2009, Windows 7 was released, which included Internet Explorer 8 as the default browser. The work on HTML5 just started. And the iPad wasn’t even on the market. Since then, the world and the web have changed a lot: Mobile internet usage surpassed desktop usage. Fully-fledged business applications are built using HTML5. And web technologies are on par with their native counterparts in terms of functionality and performance. Angular 2 wants to address these changes by being:
Starting from Beta 1, Angular 2 applications don’t seem to run in Internet Explorer anymore—although Angular 2 officially supports Internet Explorer versions 9 to 11 and it worked like a charm in Beta 0. This is due to missing ECMAScript 2015 (ES6) shims which es6-shim doesn’t include. This can be easily solved by adding the missing shims which are buried deep in Angular’s package.
For a couple of years now, TeXstudio is my favorite IWE (Integrated Writing Environment) for LaTeX. Last year, I switched from Windows to OS X, but I didn’t take my LaTeX environment with me. Since I’m going to need LaTeX more often in the next time, I finally set it up on OS X 10.11 El Capitan. Unfortunately, this was not an easy task. And here’s why:
Installing MacTeX and TeXstudio
The most common TeX distribution on Mac is MacTeX, and this distribution is incredibly huge: MacTeX’s installation package is about 2.3 gigabytes in size. The distribution contains all important TeX binaries, Ghostscript and some GUI tools for managing packets or modifying global TeX settings. (There’s also a way smaller distribution called BasicTeX, whose package is only 109 megabytes in size. However, I haven’t tested this distribution in combination with TeXstudio.)
On Mac OS X, everything looked nice. But on Windows, the column headers were oddly shifted and did not match the content columns. While investigating the bug, we found out that the columns were shifted by exactly 17 pixels to the left. But why 17 pixels? And not 5, 10, 15 or anything power of 2?