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
import * as Express from 'express'; | |
import { Router } from 'express' | |
import { createProxyServer } from 'http-proxy'; | |
// ส่วนนี้คือ http server ของ front-ui | |
const frontendRouter = Router(); | |
frontendRouter.all('/', (req, res) => { | |
res.redirect('/index.html') | |
}) |
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
import * as Express from 'express'; | |
import { Router } from 'express' | |
const frontendRouter = Router(); | |
frontendRouter.all('/', (req, res) => { | |
res.redirect('/index.html') | |
}) | |
frontendRouter.get('/index.html', (req, res) => { |
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
0D 0A is the message delimiter | |
SEND | |
12 12 00 51 0D 0A // Q ? Send Q at the first time after configuration notification is done | |
12 12 00 4D 31 0D 0A // M1 maybe this is instruction initialize? ( the scaler answer '@') | |
12 12 00 44 30 30 2E 35 0D 0A // this is 'D00.5' means Data type 0 (clothes weight), value = 0.5 and then machine return 1B 12 00 44 30 0D 0A | |
12 12 00 44 31 31 0D 0A // this is D11 (gender 1 is male (see GE)) | |
12 12 00 44 32 30 0D 0A // this id D20 (body type 0 is standard) | |
12 12 00 44 33 31 37 33 2E 30 0D 0A // this is D3173.0 this is height | |
12 12 00 44 34 33 32 0D 0A // 'D432' this is age |
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
npm install -g bs58 | |
BS58_SECRET=<YOUR_SECRET> NODE_PATH="$(npm config get prefix)/lib/node_modules" node -e "console.log(new Uint8Array(require('bs58').decode(process.env.BS58_SECRET)))" |
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
export const Badthing = (): MethodDecorator => { | |
return ( | |
target: Object, | |
key: string | symbol, | |
descriptor: PropertyDescriptor, | |
) => { | |
const originalMethod = descriptor.value; | |
console.log("Badthing"); |
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
type Message = Uint8Array; | |
class BluetoothControl { | |
collectScanResult() { | |
} | |
private _onDiscoverCallback: (device: BLEDevice) => void |
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
class Class1 { | |
int i = 0; | |
} | |
class Class2 extends Class1 { | |
} | |
void main() { |
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
class Class1 { | |
static Class1 instance = new Class1(); | |
int i = 0; | |
} | |
class Class2 { | |
void set i(int val) { | |
Class1.instance.i = val; | |
} |
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 renderDiamond(input) { | |
let preSpace = (input - 1) / 2 | |
let postSpace = (input - 1) / 2 | |
let output = "" | |
let f = (input - 1) / 2 | |
for (var line = 0; line < input; line++) { | |
for (var col = 0; col < input; col++) { |
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
package com.company; | |
// สร้างโปรแกรมที่สามารถ วาด * ออกมาเป็นรูป เลขาคณิต 3 แบบ | |
// - สี่เหลี่ยมจตุรัส | |
// - สามเหลี่ยม | |
// - ข้าวหลามตัด | |
// โดยที่มี input เป็น int ที่ 0 < n < 20 | |
class Shape { |
NewerOlder