#modal #popup #javascript #vuejs 2017-05-08
Hey. Today we will pursue our dream for perfect modal. Being perfect means:
- Floats above everything else.
- Is not blocking.
- Supports nesting of any depth.
import { useCallback, useEffect, useState } from 'react'; | |
import { useSetRecoilState } from 'recoil'; | |
import { useKeycloak } from '@react-keycloak/web'; | |
import { commonNotification } from './common'; | |
/** | |
* Returns the auth info and some auth strategies. | |
* | |
*/ |
/* | |
* ============================================================================ | |
* | |
* Filename: day4.cpp | |
* | |
* Description: Day 4 of Advent of Code solution | |
* | |
* Version: 1.0 | |
* Created: 12/4/2019 7:23:58 PM | |
* Revision: none |
// https://medium.com/@romualdasromasdakeviius/using-vue-cli-to-build-wordpress-plugin-including-hmr-1a71dfdf05c2 | |
// https://medium.com/@devs_group/wordpress-vue-js-with-webpack-and-hot-reload-7c4faea9d0d9 | |
function is_develop_serve() | |
{ | |
$connection = @fsockopen('localhost', '8080'); | |
return $connection ? true : false; | |
} | |
// Inspired by https://twitter.com/coderitual/status/1112297299307384833 and https://tapajyoti-bose.medium.com/7-killer-one-liners-in-javascript-33db6798f5bf | |
// Remove any duplicates from an array of primitives. | |
const unique = [...new Set(arr)] | |
// Sleep in async functions. Use: await sleep(2000). | |
const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms))); | |
// or | |
const sleep = util.promisify(setTimeout); |
function Mutilator(data, name, context) { | |
this.n = name || `mutilation-${+new Date()}`; | |
this.d = data; | |
this.c = context || window; | |
this.isArr = function(p) { | |
return this.d[p].constructor == Array; | |
}; | |
this.dispatch = function(p, v, t) { | |
this.c.dispatchEvent( | |
new CustomEvent(this.n, { |
<?php | |
/** | |
* The class used to make certain taxonomies have a top level URL. | |
*/ | |
/** | |
* The Taxonomy_Top_Level_URL class. | |
*/ | |
class Taxonomy_Top_Level_URL { | |
/** |
// Import __ from i18n internationalization library | |
const { __ } = wp.i18n; | |
// Import registerBlockType() from block building libary | |
const { registerBlockType } = wp.blocks; | |
// Import the element creator function (React abstraction layer) | |
const el = wp.element.createElement; | |
/** | |
* Example of a custom SVG path taken from fontastic | |
*/ |
A collection of links to the "Master the JavaScript Interview" series of medium stories by Eric Elliott.
rebase
vs merge
).rebase
vs merge
)reset
vs checkout
vs revert
)git rev-parse
)pull
vs fetch
)stash
vs branch
)reset
vs checkout
vs revert
)