If you haven't already set your NPM author info, now you should:
npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"
npm adduser
// Copyright 2019 cruzbit developers | |
// Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. | |
package main | |
import ( | |
"encoding/base64" | |
"encoding/hex" | |
"encoding/json" | |
"flag" |
// | |
// SnapCarousel.swift | |
// prototype5 | |
// | |
// Created by xtabbas on 5/7/20. | |
// Copyright © 2020 xtadevs. All rights reserved. | |
// | |
import SwiftUI |
test("mock implementation", () => { | |
const mock = jest.fn(() => "bar"); | |
expect(mock("foo")).toBe("bar"); | |
expect(mock).toHaveBeenCalledWith("foo"); | |
}); | |
test("also mock implementation", () => { | |
const mock = jest.fn().mockImplementation(() => "bar"); |
If you haven't already set your NPM author info, now you should:
npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"
npm adduser
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<body> | |
<script src="//d3js.org/d3.v7.min.js"></script> | |
<script src="https://unpkg.com/@hpcc-js/[email protected]/dist/graphviz.umd.js"></script> | |
<script src="https://unpkg.com/[email protected]/build/d3-graphviz.js"></script> | |
<div id="graph" style="text-align: center;"></div> | |
<script> | |
var dotIndex = 0; |
If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.
Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.
If in doubt about what git is doing when you run these commands, just
// | |
// SimpleScrollingStack.swift | |
// A super-simple demo of a scrolling UIStackView in iOS 9 | |
// | |
// Created by Paul Hudson on 10/06/2015. | |
// Learn Swift at www.hackingwithswift.com | |
// @twostraws | |
// | |
import UIKit |
Recommendations of unit types per media type:
Media | Recommended | Occasional use | Infrequent use | Not recommended |
---|---|---|---|---|
Screen | em, rem, % | px | ch, ex, vw, vh, vmin, vmax | cm, mm, in, pt, pc |
em, rem, % | cm, mm, in, pt, pc | ch, ex | px, vw, vh, vmin, vmax |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Visualizing PageRank Centrality</title> | |
<meta charset="utf-8" /> | |
</head> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<script src="http://d3js.org/colorbrewer.v1.min.js"></script> | |
<style> | |
svg { |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.