STEPS
-
Click on Help menu
-
Select Enter License
-
Then paste given KEY given at bottom
-
Finally click on Use License
import Konva from 'konva'; | |
import { ShapeConfig } from 'konva/lib/Shape'; | |
export class HistoryStat { | |
private static _instance: HistoryStat; | |
public _currentStat: any[] = []; | |
private _currentPointer: number = -1; | |
private _history: Array<Object[]> = []; |
const obj = { a: 1, c: 3, b: 2 } | |
// Map from object. | |
const myMap = new Map(Object.entries(obj)) | |
// Map to Object. | |
// NOTE: Keys will be cast to strings by `.toString`, so any "complex" key like for example `[1, 2]` will become `1,2` | |
const newObj = [...myMap.entries()] | |
.reduce((acc, [key, value]) => (Object.assign(acc, { [key]: value })), {}) |
STEPS
Click on Help menu
Select Enter License
Then paste given KEY given at bottom
Finally click on Use License
import { Directive, ElementRef, forwardRef, Input, Renderer2 } from '@angular/core'; | |
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; | |
import { fromEvent } from 'rxjs/observable/fromEvent'; | |
import { merge } from 'rxjs/observable/merge'; | |
import { timer } from 'rxjs/observable/timer'; | |
import { Subscription } from 'rxjs/Subscription'; | |
export const DEFAULT_VALUE_ACCESSOR : any = { | |
provide: NG_VALUE_ACCESSOR, | |
useExisting: forwardRef(() => NgControlOptionsDirective), |
As you start out with your Electron app, you'll start to notice some features which have been carried directly across from the browser realm but make less sense for a desktop app. Here are the ones I can remember:
In Electron just like in Chrome, if you hold down the Ctrl key (or ⌘ on Mac) while clicking a link it opens in a new window. For many SPA apps, this is undesired and will load another full copy of your app in another window. You can disable this by calling the following code once you've created a BrowserWindow
win = new BrowserWindow({ ... });
r""" | |
vCard_S30.py -- Convert vCards into suitable for Nokia Series 30+ format, or | |
How to solve the only one phone number per contact problem. | |
1) Import contacts "contacts.vcf" from Google account (vCard format). | |
2) Place it beside this script. | |
3) Run the script with Python 2.7. | |
4) Copy the result "backup.dat" into "Backup" folder on the phone SD card. | |
5) Restore contacts from backup on the phone. |
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
/** | |
* This code is licensed under the terms of the MIT license | |
* | |
* Deep diff between two object, using lodash | |
* @param {Object} object Object compared | |
* @param {Object} base Object to compare with | |
* @return {Object} Return a new object who represent the diff | |
*/ | |
function difference(object, base) { | |
function changes(object, base) { |
(function () { | |
"use strict"; | |
function createToast(message, imgUrl, imgAlt) { | |
// Namespace: Windows.UI.Notifications | |
if (typeof Windows !== 'undefined' && | |
typeof Windows.UI !== 'undefined' && | |
typeof Windows.UI.Notifications !== 'undefined') { | |
// Setup variables for shorthand | |
var notifications = Windows.UI.Notifications, |
/** | |
List of radio buttons. Unlike checklist, value is stored internally as | |
scalar variable instead of array. Extends Checklist to reuse some code. | |
@class radiolist | |
@extends checklist | |
@final | |
@example | |
<a href="#" id="options" data-type="radiolist" data-pk="1" data-url="/post" data-title="Select options"></a> | |
<script> |