-
uninstall node
-
clean out npm and npm-cache in %APPDATA%
-
install NVM ( https://github.com/coreybutler/nvm-windows/releases )
-
install different versions of node
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <select [ngModel]="vm.selectedThing" | |
| (ngModelChange)="onSelectThing($event)"> | |
| <option [value]="null">-</option> | |
| <option *ngFor="let thing of vm.things" | |
| [value]="thing.id" | |
| [disabled]="thing.isDisabled"> | |
| {{thing.name}} | |
| </option> | |
| </select> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type Rectangle = { | |
| x: number, | |
| y: number, | |
| h: number, | |
| w: number | |
| } | |
| function areRectanglesColliding(a: Rectangle, b: Rectangle) { | |
| const i = a.x < (b.x + b.w); | |
| const ii = b.x < (a.x + a.w); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function arrayTo3DGrid(xMax, yMax, zMax) { | |
| let vertices = [] | |
| let totalVertices = xMax * yMax * zMax; | |
| let xySquare = xMax * yMax; | |
| for (let i = 0; i < totalVertices; i++) { | |
| let x = i % xMax; | |
| let z = Math.floor(i / (xySquare)); | |
| let ii = i - (z * xySquare); | |
| let y = Math.floor(ii / xMax); | |
| vertices.push(x, y, z); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| folder = 'D:\Projects\python\poems_need_fixing\\' | |
| for filename in os.listdir(folder): | |
| full_filename = folder+filename | |
| print " START " + filename | |
| r = open(full_filename,'r') | |
| lines = r.readlines() | |
| open(full_filename, "w").close() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| url = '<webpage address>' | |
| page = requests.get(url) | |
| from bs4 import BeautifulSoup | |
| soup = BeautifulSoup(page.text, 'html.parser') | |
| text = soup.find_all('h1')[0].get_text() | |
| file = open('data.txt', 'w') | |
| file.write(text) | |
| file.close() | |
| print(text) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| xargs -n 1 curl -L -O < list-of-files.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :root { | |
| --background-color: #fff; | |
| --font-color: #000; | |
| } | |
| @media (prefers-color-scheme: light) { | |
| :root { | |
| --background-color: #fff; | |
| --font-color: #000; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :root { | |
| --background-color: #fff; | |
| --color: #000; | |
| } | |
| @media (prefers-color-scheme: light) { | |
| :root { | |
| --background-color: #fff; | |
| --color: #000; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find . -name '*.*' | xargs wc -l |