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
package gopromise | |
import ( | |
"context" | |
"errors" | |
"sync" | |
"time" | |
) | |
//Promise struct |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
<style> | |
#a { | |
height: 300px; |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>vertical center</title> | |
<style> | |
/* parent */ | |
.p { |
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
var oldHeadAppend = HTMLHeadElement.prototype.appendChild | |
HTMLHeadElement.prototype.appendChild = function () { | |
var args = [].slice.call(arguments) | |
var child = args[0] | |
if (child instanceof HTMLScriptElement) { | |
child.src = child.src + ('?ts=' + Date.now()) | |
} | |
return oldHeadAppend.apply(this, args) | |
} |
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
// 1 | |
// "internationalization" | |
function abbr (input) { | |
const length = input.length | |
if (length < 3) { | |
return input | |
} | |
return input[0] + (length - 2) + input[length - 1] | |
} |