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 charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>transformers AI v.2</title> | |
<meta property="og:title" content="transformers AI"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.css" integrity="sha512-mG7Xo6XLlQ13JGPQLgLxI7bz8QlErrsE9rYQDRgF+6AlQHm9Tn5bh/vaIKxBmM9mULPC6yizAhEmKyGgNHCIvg==" crossorigin="anonymous" referrerpolicy="no-referrer" /> | |
</head> |
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 charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>transformers AI</title> | |
<meta property="og:title" content="transformers AI"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.css" integrity="sha512-mG7Xo6XLlQ13JGPQLgLxI7bz8QlErrsE9rYQDRgF+6AlQHm9Tn5bh/vaIKxBmM9mULPC6yizAhEmKyGgNHCIvg==" crossorigin="anonymous" referrerpolicy="no-referrer" /> | |
</head> |
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
// jsat66@gmail.com 2014-6-22 | |
// for all Thai people with love, use at your own risks. | |
(function () { | |
' use strict' | |
// number to string, pluginized from http://stackoverflow.com/questions/5529934/javascript-numbers-to-words | |
var translates = { | |
en : { |
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 charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>$now expression</title> | |
<meta name="description" content="ทดสอบชุดคำสั่งเกี่ยวกับวันที่ และช่วงเวลา"> | |
<meta property="og:description" content="ทดสอบชุดคำสั่งเกี่ยวกับวันที่ และช่วงเวลา"> | |
<meta property="og:title" content="$now expression"> |
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
// jsat66@gmail.com 2014-8-3 | |
// for all people with love, use at your own risks. | |
/* | |
// $now object initial with current date | |
$now | |
// following method return self instance | |
.adj({d: d, m: m, y: y}) | |
.adj(value, ['day', 'week', 'month', 'quater', 'year']) | |
.set({d: d, m: m, y: y}) | |
.set(value, ['day', 'month', 'year']) // default is day |
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
const soap = require("soap"); | |
// reference - https://www.rd.go.th/42535.html | |
const url = "https://rdws.rd.go.th/jsonRD/vatserviceRD3.asmx?wsdl" | |
const wsdl_options = {timeout: 1 * 60 * 1000} | |
const method = "Service" | |
const args = { | |
username: "anonymous", |
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
// ==== getSchema ==== | |
// https://developers.google.com/datastudio/connector/build#define_the_fields_with_getschema | |
// legacy response - https://developers.google.com/datastudio/connector/reference#getschema | |
var RECCOUNT = 'Record_Count'; | |
function schemaFromSample(samples, _fields) { | |
var names = []; | |
var dataTypes = {}; | |
var solveType = function (doc, k, deep, kbase) { |
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
function configService(config) { | |
var fn = { }; | |
fn.get = function (key) { | |
return config[key] || ''; | |
} | |
fn.eval = function (key) { | |
var exp = fn.get(key) |
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
// ==== getData ==== | |
// https://developers.google.com/datastudio/connector/build#fetch_and_return_data_with_getdata | |
function getData(request) { | |
// https://developers.google.com/datastudio/connector/reference#request_3 | |
var rconfig = request.configParams; | |
var cs = configService(rconfig); | |
// https://developers.google.com/datastudio/connector/reference#scriptparams | |
var isSample = request.scriptParams && request.scriptParams.sampleExtraction; |
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
// https://developers.google.com/datastudio/connector/error-handling#user-facing-errors | |
function showError(errorText, debugText) { | |
var cc = DataStudioApp.createCommunityConnector(); | |
cc.newUserError() | |
.setText(errorText) | |
.setDebugText(debugText) | |
.throwException(); | |
} |
NewerOlder