This is typescript and hook implemented version of @epeli s example https://gist.github.com/epeli/10c77c1710dd137a1335#file-webviewautoheight-js
I hope it will be useful for you
cheers!
/* | |
Target Server Type : MYSQL | |
Target Server Version : 50505 | |
File Encoding : 65001 | |
Date: 2015-03-05 14:23:53 | |
*/ | |
SET FOREIGN_KEY_CHECKS=0; |
public static class MyAlerts | |
{ | |
public const string SUCCESS = "success"; | |
public const string ATTENTION = "attention"; | |
public const string ERROR = "error"; | |
public const string INFORMATION = "info"; | |
public static string[] ALL | |
{ | |
get |
var list = readHugeList(); | |
var nextListItem = function() { | |
var item = list.pop(); | |
if (item) { | |
// process the list item... | |
nextListItem(); | |
} | |
}; |
console.log(sum(2,3)); // Outputs 5 | |
console.log(sum(2)(3)); // Outputs 5 |
console.log(0.1 + 0.2); | |
console.log(0.1 + 0.2 == 0.3); |
(function(){ | |
var a = b = 3; | |
})(); | |
console.log("a defined? " + (typeof a !== 'undefined')); | |
console.log("b defined? " + (typeof b !== 'undefined')); |
const dns = require('dns'); | |
const mailcheck = require('mailcheck'); | |
const isDomainMXValid = (domain) => { | |
return new Promise((resolve, reject) => { | |
dns.resolveMx(domain, (err, mxs) => { | |
if (err) { | |
reject(err); | |
} | |
resolve(!!(mxs && mxs.length > 0 && mxs[0].exchange)); |
export const makeReq = (url: string | undefined, data = '', headers: any = {}, timeout = 5000): Promise<string> => { | |
if (!url) { | |
throw 'url must be defined!'; | |
} | |
const contentLength = Buffer.byteLength(data, 'utf-8'); | |
headers['Content-Length'] = contentLength; | |
headers['Content-Type'] = 'text/xml; charset=utf-8'; | |
headers['Connection'] = 'keep-alive'; |
This is typescript and hook implemented version of @epeli s example https://gist.github.com/epeli/10c77c1710dd137a1335#file-webviewautoheight-js
I hope it will be useful for you
cheers!