AJAX, jQuery & how to bypass the same-origin policy

AJAX und Cross-DomainToday’s post is intended to give a brief introduction to the topic of AJAX with jQuery, as well as to cover the topic of cross domain (policy) and to show how you can use small tricks to send AJAX requests across multiple domains. Before we start, however, we will give you a quick introduction to the topic. If you are already familiar with the topic and are only interested in the AJAX cross-domain workaround, you can safely skip the first part of the article.
What is AJAX and how does it work in jQuery?
AJAX is an abbreviation and stands for “Asynchronous JavaScript And XML”. Contrary to the opinion of some people on the Internet, it is not a programming language, but rather a pattern, i.e. a way of programming something. By means of AJAX web content can be retrieved via Javascript, […]

Update Node.js and NPM via commandline

How to update NodeJS and NPM via ShellToday’s article falls into the category “reminder”. Every few months I write smaller projects with Node.js. But before I start, I’d like to update to the latest version, and that’s where the dilemma starts. Every time I forget the command line commands for it.
Therefore, here are the short and concise CMD/Shell/Bash commands for updating Node.js and NPM. Once for macOS (OSX) / Linux and once for Windows.
Update NPM on Linux and macOS (OS X)

sudo npm install -g npm

Whether the update was successful can be tested with the following command.
npm -v
Update NPM on Windows
The following commands have to be set in Powershell (Start -> “powershell” -> right click -> Run as Administrator). Each line corresponds to one command.

Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
npm […]

Best Practice: Convert 1 and 0 to true and false in Javascript

1 und 0 zu true und false in Javascript
Today there will be only a very short post. There are certainly many ways to convert 0 and 1 in Javascript to true and false.
The following way to reach the wanted result I’ve seen today. I think it is probably the shortest and most elegant way to go. In addition, it works not only for integer values, but also for the string representations of 0 to 1.
So this is the stuff I like to add to my personal “POP”-collection (pearls of programming)…
0 and 1 to true and false
To convert the integers 0 and 1 to boolean, it is sufficient to use the not-operator twice.

var thisIsFalse = !!0; //false
var thisIsTrue = !!1; //true

Why it works? Here is a short explanation. 1 is a valid value and thus true. When we write !1 now, then we create a false condition […]

Open SAP GUI from HTML out of your webbrowser

SAP aus Browser aufrufenSome time ago I got into a discussion about whether it is possible to open transactions in the SAP GUI out of the browser. The opinion of the colleagues was unanimous – start SAP GUI from browser is something not be done.
However I have maintained and created a small proof-of-concept. Because it works. Ok, it’s not pretty, but it works. And that’s how to call the SAP GUI from the browser.
sapshcut.exe and what you can do with it
The solution works (among other things) using the sapshcut.exe (short for SAP Shortcut). This .exe file allows to start the SAP GUI parameterized. The possible parameters ranging from user via logon language up to the executed transaction. A complete list of possible parameters can be obtained by calling the sapshcut.exe with the parameter -?. (See screenshots below.)
sapshcut.exe - help from cmd