【解決方法】JavaScript関数をVB6に変換


こんにちは、この JavaScript 関数を vb6 に変換するにはどうすればよいですか?

JavaScript
function TParams () {
        this.length = 4;
        this.Rut    =  "";
   this.Perfil     = "";
   this.erc = 0;
   this.ercdesc="";
   }

[Spanish translated and removed]

解決策 4

GenerateUniqueIdWithAlphanumeric: async () => {
// 戻り値 Math.random().toString(36).slice(2) + randomBytes(1).toString(‘hex’) + new Date().getTime();
let nodeId = Math.floor(Math.random() * (100000 – 10)) + 100000;
シーケンス = 0 とします。
lastTimestamp = 0 とします。

let timestamp = new Date().getTime();

if (タイムスタンプ === lastTimestamp) {
シーケンス++;
} それ以外 {
シーケンス = 0;
lastTimestamp = タイムスタンプ;
}

// タイムスタンプ、ノード ID、シーケンス番号を組み合わせて一意の ID を生成します
let uniqueId = timestamp.toString(32) + nodeId.toString(32) + sequence.toString(32);

uniqueId を返す
}

解決策 1

英語で投稿してください。より多くの人があなたの質問を読むことができます (したがって、回答できます)。

コメント

タイトルとURLをコピーしました