Fixing bug in kendo grid row cancel, when inline editing is used.

I had a strange problem in Kendo grid, when a the last row was canceled the values of the first row were shown in the last row.

The first fix was adding a cancel even handler:

cancel: function (e) {
                     this.cancelChanges();
                 }

This fixed the bug, but introduced an other one.

Now rows would persist the canceled values.

To fix both problem I changed the event handler to:

cancel: function (e) {
      this.cancelChanges();
}

I used kendo 2017.1.118

Visual Studio 2017 – How to fix: Unable to start debugging on the web server.

When I first started Visual Studio 2017 after a clean installation I got the error:

Unable to start debugging on the web server. IIS does not list a web site that matches the launched URL.

When debugging a new asp.net project.

Turns out I was not running Visual Studio 2017 as Administrator.

To fix this see:

https://olivierpaes.wordpress.com/2016/06/26/unable-to-start-debugging-on-the-web-server-iis-does-not-list-a-web-site-that-matches-the-launched-url/

or

http://stackoverflow.com/questions/10716956/iis-does-not-list-a-website-that-matches-the-launch-url

A very simple and unsafe :-), self-signed, CORS https node.js dev stub service in TypeScript


const https = require("https"); const fs = require("fs"); // To create the key.pem and cert.pem files for dev, use opensll: // openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem // // Cert and key are created for hosheader "stub.service.am.dev". // Make sure the hosts file on windows contains: // 127.0.0.1 stub.service.am.dev const options = { key: fs.readFileSync("./key.pem"), cert: fs.readFileSync("./cert.pem") }; const port = 4433; https.createServer(options, function (req: any, res: any) { // Allow calls from all domains, for all methods ans request headers. res.setHeader("Access-Control-Allow-Origin", "*"); res.setHeader("Access-Control-Allow-Credentials", true); res.setHeader("Access-Control-Allow-Methods", "*"); res.setHeader("Access-Control-Allow-Headers", "*"); res.end(`Request received on server. Path Hit: ${res.url}`); }).listen(port, function() { console.log(`Stub service listing on ${port}`); });


Just enter https://stub.service.am.dev:4433 and it should respond with:

Request received on server. Path Hit: undefined

Fix in IE – Angular 1.6.1 Disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match.

When using angular 1.6.1 in IE9, IE10, IE11, I was getting the error:


Disabling automatic bootstrap. <script> protocol indicates an extension,

document.location.href does not match.


This seemed to be an 1.5.x issue, that was fixed in 1.5.11, but I was getting the error in 1.6.1.

To fix the error I switched from automatic bootstrapping (ng-app) to manual bootstrapping.

So I changed: <html xmlns:ng="http://angularjs.org" id="ng-app" ng-app=”myapp">

to: <html>

And after my module declaration:

angular.module('myapp', []);

angular.element(document).ready(function () {
angular.bootstrap(document, ['myapp']);
});

Align radio buttons with label on one line

Use relative positioning for the input element and correct the top position of the input, based on the line-height of the element containing the input element.

image

<!DOCTYPE html>
< html>
< head>
    <meta charset="UTF-8">
    < title>Align radio button with label on one line</title>
    <link rel="icon" href="data:;base64,iVBORw0KGgo=">
   
    <!–<link rel="stylesheet" href="plain.css">
    <script type="text/javascript" src="plain.js"></script>–>
    <style>
        .radio-container {
            box-sizing: border-box;
            font-family: ‘Open Sans’, sans-serif;
            font-size: 13px;
            line-height: 30px;
            margin: 0;
             outline: 0;
            overflow: hidden;
            padding: 0;
        }

        .radio-container input {
             box-sizing: border-box;
            margin: 0;
            outline: 0;
            padding: 0;
            position: relative;
            top: 9px;
            vertical-align: top;
         }
    </style>
< /head>
< body>
    <h1>Align radio button with label on one line</h1>
    <div class="radio-container">
         <input name="red" type="radio" value="red" checked="checked">
        red
        <input name="green" type="radio" value="green">
        green
        <input name="blue" type="radio" value="blue">
        blue
    </div>
< /body>
< /html>

Fix: stand alone / offline update Chrome 52 to Chrome 54 doesn’t seem to work

I could run the offline / standalone Google Chrome 54 installer, but when I started Chrome after the installation, it was still Chrome 52, turned out Chrome 54 was added too the Program Files folder as: new_chrome, when I removed the chrome.exe and renamed the new_chrome.exe to chrome.exe the problem was resolved:

image