Skip to content

Instantly share code, notes, and snippets.

@TunaYagci
TunaYagci / DeepReplace.js
Created July 6, 2018 11:13
replace value by key in object
const deepReplace = (objectToBeReplaced, replaceMap) => {
if (!objectToBeReplaced) {
return;
}
if (!replaceMap || replaceMap.size < 1) {
return objectToBeReplaced;
}
/*
Most map tile providers use 256px square tiles so Leaflet's basic zoom algorithm looks like this:
256 * Math.pow(2, zoom);
If you're working with vector layers you can extend one of leaflet's default CRSs
and make it return tile sizes in smaller increments. This can be very helpful when using
fitBounds() with layer groups, so the zoomed group fits better within the map bounds:
E.g., extending L.CRS.EPSG3857 (the default CRS):
@TunaYagci
TunaYagci / triangle.asm
Created April 18, 2017 21:07
Assembly Triangle
;Tuna Yağcı
org 100h
;write char from al
writeChar MACRO
mov ah, 2
mov dl, al
int 21h
ENDM
;------------------