const lock = new H5lock({
width: number,
height: number,
container: Element|id,
chooseType ?: 2|3|4|5, // default is 3: 3×3
inputEnd(pwd){
console.log('Pattern Lock Value Is:', pwd);
}
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="Convert RGBA to RGB"> | |
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
<meta charset=utf-8 /> | |
<title>Vladimir Bergier</title> | |
<style> | |
div { | |
width: 100%; |
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
{"version":1,"resource":"file:///Users/miloslaw.politowski/dev/olxeu-pwa/packages/core/config/moduleFederation/sharedLibraries.test.js","entries":[{"id":"I2jX.js","timestamp":1649672643237},{"id":"QD5D.js","timestamp":1649672723002},{"id":"0LjU.js","timestamp":1649927046401},{"id":"DmJh.js","timestamp":1649927453691},{"id":"T4f2.js","timestamp":1649927483075},{"id":"fvhg.js","source":"undoRedo.source","timestamp":1649927493567},{"id":"Xgn3.js","timestamp":1649927585064},{"id":"0ndm.js","timestamp":1649927595563},{"id":"GpZe.js","timestamp":1649927758053}]} |
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
// __op_temp_null_: 说明缓存取中没有东西 | |
Object.defineProperty(global, "__op_temp_null_", { | |
value: Symbol("Operators Object NULL") | |
}); | |
const op_temp_key = Symbol("Operators Object TEMP"); | |
Object.defineProperty(global, "__op_temp__", { | |
get() { | |
const res = this[op_temp_key]; | |
// 取值后马上移除引用关系 | |
this[op_temp_key] = global.__op_temp_null_; |
domToImg.dom = document.body;
domToImg.download(location.protocol + "//" + location.host + "/build/main.css");
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
<head> | |
<script> | |
if (window.localStorage && window.localStorage._tk_cache) { | |
document.documentElement.classList.add('wf-active'); | |
var script = document.createElement('script'); | |
script.innerHTML = localStorage._tk_cache + ";(function () {var timeout = setTimeout(function () {document.documentElement.classList.remove('wf-active');}, 300); Typekit.load({ async: false, active: function () { clearTimeout(timeout); }});})();"; | |
document.head.appendChild(script); | |
} | |
window._tk_onload = function () { | |
var req = new XMLHttpRequest() |
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
#target Illustrator | |
var requiredABsize = 1700; //px | |
var activeDoc = app.activeDocument; | |
var abActive = activeDoc.artboards[ activeDoc.artboards.getActiveArtboardIndex() ]; | |
var abProps = getArtboardBounds(abActive); | |
var scale = findRequiredScale(abProps); | |
if (scale > 1) |
We want to upload file to a server with POST HTTP request. We will use curl functions.
// data fields for POST request
$fields = array("f1"=>"value1", "another_field2"=>"anothervalue");
// files to upload
$filenames = array("/tmp/1.jpg", "/tmp/2.png");
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
// polyfill window.getMatchedCSSRules() in Chrome | |
if ( typeof window.getMatchedCSSRules !== 'function' ) { | |
var ELEMENT_RE = /[\w-]+/g, | |
ID_RE = /#[\w-]+/g, | |
CLASS_RE = /\.[\w-]+/g, | |
ATTR_RE = /\[[^\]]+\]/g, | |
// :not() pseudo-class does not add to specificity, but its content does as if it was outside it | |
PSEUDO_CLASSES_RE = /\:(?!not)[\w-]+(\(.*\))?/g, | |
PSEUDO_ELEMENTS_RE = /\:\:?(after|before|first-letter|first-line|selection)/g; | |
// convert an array-like object to array |
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 React from 'react'; | |
import Handsontable, {DropdownEditor} from 'handsontable'; | |
import extend from 'lodash/extend'; | |
const AutocompleteEditor = Handsontable.editors.DropdownEditor; | |
export function enhancerRenderer(func) { | |
return (...args) => { | |
args[1].innerHTML = ReactDOMServer.renderToString(func.apply(null, args)); | |
return args[1] | |
} |