Skip to content

Instantly share code, notes, and snippets.

View annibuliful's full-sized avatar
😥
stressful

jarupong pajakgo annibuliful

😥
stressful
View GitHub Profile
[
{
"invTransactionId": 5,
"createAt": "2020-04-19T18:10:54.090Z",
"updateAt": "2020-04-19T18:10:54.090Z",
"productInfo": {
"productId": 2,
"newCode": "Kamren"
},
"inventoryInfo": [
{
"subCategoryId": 2,
"newCode": "{{$randomFirstName}}",
"type": "IN-HOUSE",
"oldCode": "{{$randomFirstName}}",
"name": "{{$randomFirstName}}",
"description": "product Description",
"caution": "product Caution",
"specification": "product product spect",
"packingList": {
{
"subCategoryId": 1,
"newCode": "{{$randomFirstName}}",
"type": "IN-HOUSE",
"oldCode": "{{$randomFirstName}}",
"name": "{{$randomFirstName}}",
"description": "product Description",
"caution": "product Caution",
"specification": "product product spect",
"priceValues": [
handleUpload(files){
if (event.target.files && event.target.files[0]) {
const file = event.target.files[0];
const reader = new FileReader();
reader.onload = e => this.imageSrc = reader.result;
reader.readAsDataURL(file);
}
}
const generator = (pattern) =>
pattern.replace(/[x]/g, c => {
const r = (Math.random() * 16) | 0;
const v = c == 'x' || 'X' ? r : (r & 0x3) | 0x8;
return v.toString(16);
});
generator("xxxxxx");
const http = require("http");
const fs = require("fs");
const { promisify } = require("util");
// convert callback To Async
// const readAsync = promisify(fs.readFile);
// convert CB to Async with promise
const readAsync = fileName => {
return new Promise((resolve, reject) => {
{
"message": "created",
"customerId": 5,
"saleId": 1,
"customerCode": "N/1234/041",
"customerStatus": "pending",
"companyId": 1,
"taxNumber": "1111",
"branchType": "none",
"customerType": "clinic",
{
"categoryId": 1,
"productCode": "aaaaa",
"name": "wwwww",
"isHidden": true,
"discountPercentage": 100,
"description": "product Description",
"caution": "product Caution",
"specification": "product product spect",
"note": "note",
-- question 1
CREATE PROCEDURE proc_customerOrder @date DATE, @orderCount INT
AS BEGIN
SELECT
Orders.OrderNum,
Orders.OrderDate,
Orders.CustomerNum,
COUNT(OrderLine.NumOrdered) AS AmountOrder,
SUM(OrderLine.QuotedPrice) AS SumPrice
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h> //Header file for sleep(). man 3 sleep for details.
#include <pthread.h>
#define FOUR_SEAT 1
#define TWO_SEAT 2
#define ONE_SEAT 4
#define ONE_MINUTE 60