- Install Git for Windows
- Install Node
- Install Python 2.7.3
- Install Microsoft Visual Studio 2015 Community
- Open the command prompt as Administrator, run the following commands, then close the command prompt (a new prompt is required before the new environment variables will be available)
- npm install -g npm
- (Upgrades to npm v3, which no longer nests dependencies indefinitely. No more "maximum path length exceeded" errors due to the 260 character path limit in Windows, or needing to delete node_modules with rimraf.)
- setx PYTHON C:\Python27\python.exe /m
- (May need to change path to your custom install directory.)
- npm install -g npm
- Open a new command prompt and run the following commands. If these install without errors, you have bypasse
This file contains 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
<html> | |
<head><title>Canvas Delaunay Triangulation</title></head> | |
<body></body> | |
<script type="text/javascript"> | |
var img = new Image(); | |
img.onload = init; | |
img.src = './bg_10.jpg'; | |
var display, source; | |
var points = [], drew = []; |
This file contains 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
class Node { | |
constructor(parent, id) { | |
this.id = id; | |
this.child = []; | |
this.parent = parent; | |
} | |
setChild(child) { | |
this.child.push(child); | |
} |
This file contains 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
# DOCKER | |
docker build # Builds Docker images from a Dockerfile | |
docker run -it <container id> bash # Run bash inside docker container | |
# CONTAINERS | |
docker ps -a # List running containers | |
docker container ls -a # List containers | |
docker restart <container> # Restart container | |
docker stop $(docker ps -aq) # Stop all containers | |
docker rm $(docker ps -a -q) # Remove all containers |
This file contains 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
//https://medium.com/@gajus/my-favorite-css-hack-a7f447026cf2 | |
//"The problem is that unless the element on the page has a solid background or it is a picture, | |
// you do not see how does it fit into the layout, e.g. most of the text nodes, pictures with | |
//transparency, etc." | |
* | |
background-color: rgba(255, 0, 0, 0.2) | |
outline: 1px solid blue | |
* | |
background-color: rgba(0, 255, 0, 0.2) |
This file contains 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 http from "./httpService"; | |
import _ from "lodash"; | |
class Weather { | |
constructor(location, dayTime) { | |
if (_.isString(location) == false || _.isString(dayTime) == false) { | |
throw new Error("Invalid parameters"); | |
} |
Domknięcie występuje wtedy gdy funkcja może zapamiętać oraz uzyskać dostęp do swojego zakresu leksykalnego nawet po jej wykonaniu na zewnątrz tego zakresu:
function hello(name) {
//ta zmienna nie zostanie zapamiętana ponieważ
// nie jest używana przez zwracaną funkcję
let zmienna = "zmienna";
// default exports
export default 42;
export default {};
export default [];
export default (1 + 2);
export default foo;
export default function () {}
export default class {}
export default function foo () {}
This file contains 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
/*! CSS.supports() Polyfill | |
* https://gist.github.com/codler/03a0995195aa2859465f | |
* Copyright (c) 2014 Han Lin Yap http://yap.nu; MIT license */ | |
if (!('CSS' in window)) { | |
window.CSS = {}; | |
} | |
if (!('supports' in window.CSS)) { | |
window.CSS._cacheSupports = {}; | |
window.CSS.supports = function(propertyName, value) { |
This file contains 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
em++ ../main.cpp ../stringFormat.cpp \ | |
-Os -g1 \ | |
-s WASM=1 \ | |
-s MALLOC=emmalloc \ | |
-s ALLOW_MEMORY_GROWTH=1 \ | |
-s EXPORT_ES6=1 \ | |
-s MODULARIZE=1 \ | |
-s 'EXPORT_NAME="LongerSubSequence"' \ | |
-s 'ENVIRONMENT="web"' \ | |
--bind \ |
OlderNewer