Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
const withPWA = require('next-pwa') | |
module.exports = withPWA({ | |
pwa: { | |
dest: 'public' | |
} | |
}) |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Node Inspector", | |
"type": "node", | |
"request": "launch", | |
"args": ["${workspaceRoot}/src/service.ts"], | |
"runtimeArgs": ["-r", "ts-node/register"], | |
"cwd": "${workspaceRoot}", |
.container { | |
background-color: #c1c1c1; | |
height: 500px; | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
} | |
.btn { | |
background-color: orange; |
module.exports = (string) => { | |
return string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, '$1-$2').toLowerCase(); | |
}; |
# Import the public repository GPG keys | |
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - | |
# Register the Microsoft Ubuntu repository | |
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list | |
# Update apt-get | |
sudo apt-get update | |
# Install PowerShell |
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |