3217. Delete Nodes From Linked List Present in Array

You are given an array of integers nums and the head of a linked list. Return the head of the modified linked list after removing all nodes from the linked list that have a value that exists in nums.
/**
 * Definition for singly-linked list.
 * function ListNode(val, next) {
 *     this.val = (val===undefined ? 0 : val)
 *     this.next = (next===undefined ? null : next)
 * }
 */
/**
 * @param {number[]} nums
 * @param {ListNode} head
 * @return {ListNode}
 */
var modifiedList = function(nums, head) {
    // Create a set from the nums array for O(1) look-up time
    const numSet = new Set(nums);

    // Create a dummy node to handle edge cases where the head needs to be removed
    let dummy

wifi hotspot

iw list | grep -A 10 "Supported interface modes"
sudo nmcli dev wifi hotspot ifname wlp1s0 ssid "ACE 2.4G 1st Floor" password "server***1###alt"
sudo nmcli connection show
sudo nmcli connection down Hotspot

Playwright Tracing

val pageContext = buildUesBrowserContext(...)

//Creating tracing
pageContext.tracing().start(Tracing.StartOptions().setScreenshots(true).setSnapshots(true))
val page = pageContext.newPage()

try {
  ...
} finally {
    pageContext.tracing().stop(Tracing.StopOptions().setPath(Path("C:\\My\\Path\\log\\test.zip")))
}

// Then load the zip file to https://trace.playwright.dev/

log formData in console

let postData = new FormData(form);
postData.keys().forEach(
    (key) => {
        console.log(key);
        console.log(postData.get(key));
    }
);

TRANSFORMERS - Queries, Keys and Values - Analogy

Let’s break down the concepts of **Queries**, **Keys**, and **Values** in a way 
that’s easy to follow,
- first using an **analogy**
- then showing how they work in a **practical example**.


### **Analogy: Finding a Book in a Library**

Imagine you're in a library, and you're looking for a book about "dogs." Here's how you would do it:

1. **Query**: This is your search request. 
In this case, it’s “*I want books about dogs*.” That’s your **query**: **what you’re looking for**.
   

TRANSFORMERS - ATTENTION - Global Analogy

To explain attention mechanisms in Transformers simply, think of it like this:

Imagine you're reading a book. When you read each word, your brain doesn’t just 
focus on that word alone — it relates it to previous words and keeps the context 
in mind. **Some words or sentences are more important than others in understanding the meaning 
of a passage, so your brain pays more “attention” to those important parts**.

In Transformers, attention mechanisms do something similar. Instead of read

Python FastAPI w/ Express Webhooks Setup

### Setup
* Set up the ngrok config file to use 2 servers
* `ngrok start` to run them both

---

### Webhooks (Express App)
* Ensure `.env` file has up to date credentials
* If referring to the dynacomAPI, make sure that url is set (will be dynamic,
so ensure it is up to date)

### API (Python)
* `local.settings.json`
```
    "FUNCTIONS_WORKER_RUNTIME": "python",
    "AzureWebJobsStorage": "UseDevelopmentStorage=true",
    "AzureWebJobsFeatureFlags": "EnableWorkerIndexing",
```
* ensure settings

Ngrok Configurations

### NGROK Set up 2 servers
* run `ngrok config check` to check the location of the config file
* edit it with the following:
```
version: "2"
authtoken: 2YJjpBQ8t2xvdDsUIp88JVV18aY_2BdjVXeg7vxiDoMM1xurX

tunnels:
  first:
    addr: 3000
    hostname: pangolin-enough-mammoth.ngrok-free.app
    proto: http
  second:
    addr: 7071
    proto: http
```
* first 2 lines are default
* use `first` and `second` to add servers
  * the first one can use a hostname if account created (or paid)
  * second on

Debug mysql

➜  brew services list | grep mysql

➜  brew services start mysql
Error: Formula `mysql` has not implemented #plist, #service or installed a locatable service file

➜ tail -n 50 /usr/local/var/mysql/*.err

dyld[99581]: Library not loaded: '/usr/local/opt/icu4c/lib/libicuuc.72.dylib'
Referenced from: '/usr/local/Cellar/mysql/8.0.33_1/bin/mysqld'

➜ nano ~/.zshrc
export PATH="/usr/local/opt/mysql/bin:$PATH"

➜ source ~/.zshrc

➜  ~ brew info mysql
==> mysql: stable 9.0.1 (bottled)

formidable export file ko có link

Mình sử dụng plugin formidable để tạo form, sau đó dùng 1 plugin https://softlabbd.com/integrate-google-drive-pricing/ để đẩy các file lên google drive. 
Tuy nhiên, khi mình xuất CVS từ các entries thì đường link đẫn đến google drive bị mất.

- formidable/classes/helpers/FrmCSVExportHelper.php
- formidable/classes/controllers/FrmXMLController.php
- integrate-google-drive-premimum/includes/class-hooks.php

Tìm `//hoang` để sửa. Nếu plugin update thì thay id.
```php
//hoangweb: 121,124
		if(!empty

DB IT

Server=DELL;Database=ITpipesUserMobile;User Id=itpipes;Password=Itpipes;

clara

inicio{
"host":"g/bkGOgcH2a0IvySBZAXrQeEo/IjKg==",
"portacmd":"ndRUBkt/zz7KELXl",
"portaimg":"mkLEjWt6Z4y20g==",
"pronto":"RlUKy4l8k2P+NI0=",
"ipv":"T7fcOpUzbaUY",
"contador":"B45qj4/oIqt+7WkIbKVLORXAaYsE8nobsRBfw8LSEKNi1bCQNQz5xpcUZCKVxnhhrDbxAguQ4tLLXVFJ34uR6jQEhL8=",
"chaveid":"Z3J4qdbf5mF5gQhsZVFOdQ==",
"spammer":"PHBD0MvX9H2bvYsgqQ=="
}fim

2028. Find Missing Observations

You have observations of n + m 6-sided dice rolls with each face numbered from 1 to 6. n of the observations went missing, and you only have the observations of m rolls. Fortunately, you have also calculated the average value of the n + m rolls. You are given an integer array rolls of length m where rolls[i] is the value of the ith observation. You are also given the two integers mean and n. Return an array of length n containing the missing observations such that the average value of the n + m rolls is exactly mean. If there are multiple valid answers, return any of them. If no such array exists, return an empty array. The average value of a set of k numbers is the sum of the numbers divided by k. Note that mean is an integer, so the sum of the n + m rolls should be divisible by n + m.
/**
 * @param {number[]} rolls
 * @param {number} mean
 * @param {number} n
 * @return {number[]}
 */
var missingRolls = function(rolls, mean, n) {
    // Calculate the total number of rolls (observed + missing)
    const m = rolls.length;
    const totalRolls = n + m;

    // Calculate the total sum required for the mean
    const totalSum = mean * totalRolls;

    // Calculate the sum of the observed rolls
    const observedSum = rolls.reduce((acc, roll) => acc + roll, 0);

    // Calculate th

Conversion float64 to float32 for all numerical columns in a given df

df = df.astype({col: 'float32' for col in df.select_dtypes('float64').columns})

Enable Touch ID Fingerprint For `sudo` in iTerm and Terminal (macOS)

https://gist.github.com/divspace/661349c8eb3997ad9461754baa8a3a4a
Open your sudo file:
```sh
sudo nano /etc/pam.d/sudo
```

Add the following after the first line:

```sh
auth       sufficient     pam_tid.so
```

In iTerm, go to the Advanced section in Preferences and set Allow sessions to survive logging out and back in to No.