- có thể sử dụng để tạo các biến global, local.
- nếu được định nghĩa trong 1 scope cụ thể {} khi ra ngoài khỏi scope em sẽ không thể access được biến đó.
Ví dụ 1:
const title = "Apple Grade A iPhone 16 Pro Max 256GB White Titan"; | |
const regexes = [ | |
/\bApple(?=\s|$)/i, // Matches "Apple" | |
/\b(Apple\s*)?iPhone(?=\s|$)/i, // Matches "Apple iPhone" | |
/\bApple\s*Air\s*Pods?(?=\s|$)/i, // Matches "Apple Air Pods" | |
/\bApple\s*Watch(?=\s|$)/i // Matches "Apple Watch" | |
]; | |
function getBestMatch(title, regexes) { |
const puppeteer = require('puppeteer'); | |
import StealthPlugin from 'puppeteer-extra-plugin-stealth'; | |
// Apply the stealth plugin to avoid bot detection | |
puppeteer.use(StealthPlugin()); | |
(async () => { | |
// Define the proxy server and a random port within the specified range | |
const proxyHost = 'premium.residential.proxyrack.net'; | |
const proxyPort = Math.floor(Math.random() * (15000 - 10000 + 1)) + 10000; // Random port between 10000 and 15000 |
### _ListingToSpelling | |
ALTER TABLE "Item" | |
ADD CONSTRAINT "Item_id_unique" UNIQUE (id); | |
ALTER TABLE "_ListingToSpelling" | |
ADD COLUMN "itemId" text SET NOT NULL; | |
UPDATE "_ListingToSpelling" ls | |
SET "itemId" = CAST(i.id as uuid) |
# bew install | |
brew install [email protected] | |
brew install [email protected] | |
brew install mysql-connector-c | |
# pip install | |
pip install mysqlclient |
try { | |
await client.db(dbName).collection(`${collectionNamePrefix}`).aggregate([ | |
{ | |
"$group": { | |
_id: {ICCID: "$ICCID"}, // field which have duplicate value | |
dups: { $addToSet: "$_id" } , | |
count: { $sum : 1 } | |
} | |
}, | |
{ |
1. Download Ceritificate | |
2. Unzip | |
3. cd CER - CRT Files | |
4. In AWS CM console, select `Import a certificate` | |
5. Certificate body*: copy and paste content from STAR_billchecker_co_uk.crt | |
6. Certificate private key*: copy the private you generate before | |
7. CERTIFICATE chain: AAACertificateServices.txt -> SectigoRSADomainValidationSecureServerCA.txt -> USERTrustRSAAAACA.txt | |
== Done == |
Dear All, | |
I hope you are all doing well. Timeline is ASAP and please feel free to let me know the schedule if that needs any other info. | |
[Scope of works] |
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title></title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href=""> | |
</head> |
const employeeList = [ | |
{ | |
id: 1, | |
name: "kien", | |
department: "GRC", | |
age: 40 | |
}, | |
{ | |
id: 2, |