This file contains hidden or 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 num1 = {min: 1, max: 2, step: 0.1} | |
const num2 = {min: 1, max: 50, step: 0.25} | |
num1.val = num1.min | |
while (num1.val < num1.max) { | |
let result1 = num1.val + num1.step | |
let frac1 = result1.toString().split('.')[1] || '' | |
let adj1 = 0 | |
if (frac1.length > 10 && frac1.slice(2,4)=='49') { |
This file contains hidden or 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 hidden or 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 hidden or 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
// [email protected] 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 hidden or 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 hidden or 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
// [email protected] 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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; |
NewerOlder