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
| 020-08-22 17:12:15.229 [INFO ] INFO o.s.b.w.e.t.TomcatWebServer [main] - Tomcat initialized with port(s): 8080 (http) | |
| 2020-08-22 17:12:15.331 [INFO ] INFO o.a.c.h.Http11NioProtocol [main] - Initializing ProtocolHandler ["http-nio-8080"] | |
| 2020-08-22 17:12:15.333 [INFO ] INFO o.a.c.c.StandardService [main] - Starting service [Tomcat] | |
| 2020-08-22 17:12:15.416 [INFO ] INFO o.a.c.c.StandardEngine [main] - Starting Servlet engine: [Apache Tomcat/9.0.29] | |
| 2020-08-22 17:12:24.925 [INFO ] INFO o.a.j.s.TldScanner [main] - At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. | |
| 2020-08-22 17:12:25.914 [INFO ] INFO o.a.c.c.C.[.[.[/rd-admin-api] [main] - Initializing Spring embedded WebApplicationContext | |
| 2020-08-22 17:12:25.915 [DEBUG] DEBUG o.s.w.c.ContextLoader [main] - Published root WebApplicationContext as Servlet |
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 withoutAsyncAwait = (() => { | |
| const getFirstName = new Promise<string>((resolve) => { | |
| resolve('tim') | |
| }); | |
| const getLastName = new Promise<string>((resolve) => { | |
| resolve('cook') | |
| }); | |
| const displayFullname = new Promise<string>((resolve) => { | |
| let fullname = ''; | |
| getFirstName.then((resp: string) => { |
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
| input text search server side processing เมื่อมีการกรอกข้อมูลใดๆ ให้ทำการ | |
| call api โดยการแนบข้อมูลทั้งหมดจากใน text นั้นไปเสมอ | |
| condition: | |
| - หลังจากกรอกตัวอักษรใดๆ เสร็จสิ้นแล้ว เมื่อเวลาผ่านไป 500ms ให้ทำการ call api | |
| - ระยะเวลาระหว่างการกรอกข้อมูลแต่ละตัวอักษรน้อยกว่า 500ms ห้าม call api | |
| - ในกรณีที่ call api ไปแล้วเกิดการกรอกตัวอักษรใดๆ ให้ทำการยกเลิก request | |
| ก่อนหน้าทุกครั้งเสมอ ต้องไม่ได้ผลลัพธ์ใดๆ กลับมาเพราะทำการยกเลิก request แล้ว | |
| *หมายเหตุ: ใช้ promise ในการ mock api และ random response time ใหม่ทุกครั้งที่ call |
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 responseFromApi = { "transactionId": "7063c660-3ffa-4272-8d26-c64aae2d660e", "timestamp": 1594959997353, "statusCode": "S0000", "statusMessage": "Successfully processed.", "domainName": "root", "data": { "mapResponse": [{ "confKey": "master.operator", "confValue": "{\"operatorList\":[{\"code\":\"OP01\",\"name\":\"DTAC\",\"description\":\"dtn\"},{\"code\":\"OP02\",\"name\":\"DTN\",\"description\":\"dtn\"}]}", "confType": "J", "remark": "JSON Array Object" }, { "confKey": "master.sim.size", "confValue": "{\"simSizeList\":[{\"code\":\"01\",\"name\":\"H\",\"description\":\"Haft size\",\"boxSize\":500},{\"code\":\"02\",\"name\":\"P\",\"description\":\"Plug-in\",\"boxSize\":500}]}", "confType": "J", "remark": "JSON Array Object" }, { "confKey": "master.form.factor", "confValue": "{\"formFactorList\":[{\"code\":\"F01\",\"name\":\"2FF\",\"description\":\"2FF\"},{\"code\":\"F02\",\"name\":\"2+3+4FF\",\"description\":\"2+3+4FF\"},{\"code\":\"F03\",\"name\":\"MFF2\",\"description\":\"MFF2\"}]}", "confType": "J", " |
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
| 'use strict'; | |
| const { | |
| sanitizeEntity | |
| } = require('strapi-utils'); | |
| const buildError = (httpStatus, payload) => { | |
| return { | |
| status: httpStatus, | |
| body: JSON.stringify({ | |
| error: payload |
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
| <template> | |
| <div class="test-container"> | |
| <client-only> | |
| <div v-for="itemKey of Object.keys(items)" :key="itemKey"> | |
| <masonry | |
| :cols="{ default: 4, 1000: 3, 700: 2, 400: 1 }" | |
| :gutter="{ default: '30px', 700: '15px' }" | |
| class="masonry-layout" | |
| > | |
| <div |
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 firestoreService = require('firestore-export-import'); | |
| const moment = require('moment'); | |
| // const serviceAccount = require('../../smart-farmer-web-dev-key.json'); | |
| // const serviceAccount = require('../../smart-farmer-web-test-key.json'); | |
| const serviceAccount = require('../../kasettongroo.json'); | |
| exports = module.exports = async(req, res) => { | |
| // const databaseURL = 'https://smart-farmer-web-dev.firebaseio.com'; |
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 moment = require('moment'); | |
| const _ = require('lodash'); | |
| const Excel = require('exceljs'); | |
| const striptags = require('striptags'); | |
| const backup = require('./backup_prod_2019-12-26.json'); | |
| const source = 'analytic_source.xlsm'; | |
| const fn = { | |
| cells: 0, |
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 admin = require('firebase-admin'); | |
| const appConstant = require('../const'); | |
| const QUERY_LIMIT = 1000; | |
| const cleanTempSession = async () => { | |
| const db = admin.firestore(); | |
| const now = new Date(); |
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 admin = require('firebase-admin'); | |
| const appConstant = require('../../const'); | |
| exports = module.exports = async (req, res) => { | |
| let response = {}; | |
| try { | |
| const db = admin.firestore(); | |
| const postId = uuid4(); | |
| const currentDatetime = new Date(); |
NewerOlder