show low in stock products - wordpress Woocommerce

https://stackoverflow.com/questions/64645772/show-low-in-stock-products

PowerShell - Archiving

Creating an archive (like a ZIP file) in PowerShell is straightforward, and you can do it using the `Compress-Archive` cmdlet. Here's a step-by-step explanation:

### 1. Basic Syntax of `Compress-Archive`
The general syntax for creating a ZIP archive with `Compress-Archive` is:
```powershell
Compress-Archive -Path <PathToFiles> -DestinationPath <PathToArchive>
```
- **`-Path`**: Specifies the files or folders you want to include in the archive.
- **`-DestinationPath`**: Specifies the path and na

Date Formatter Class js

/**
  * @version 17.09.2024
  * @author info@artemsites.ru
  * import { DateFormatterClass } from "/src/utils/DateFormatterClass.js"
  *
  * const dateFormatter = new DateFormatterClass('2024-03-28') // создаст экземпляр на указанную дату
  * const dateFormatter = new DateFormatterClass() // создаст экземпляр на текущую дату
 */
export class DateFormatterClass {
  constructor(dateString = new Date()) {
    this.date = new Date(dateString)
  }

  // Ср
  getNameDayWeekShort(date) {
    if (date) 

タグの中の文字の改行をそのまま改行として表示する

<style>
  .text {
    white-space: pre-wrap;
  }
</style>
<p class="text"></p>
<script>
  const text = document.querySelector(".text");
  text.textContent = "テキスト\nテキスト";
</script>

Shell - Utilities

# Count Files Within a Directory
## Using `ls` and `wc`
```bash
ls -1 /path/to/your/folder | wc -l
```

## Using `find`
```bash
find /path/to/your/folder -type f | wc -l
```

## Using `ls` with `-l` for Details (If you want to ensure no directories are counted)
```bash
ls -l /path/to/your/folder | grep '^-' | wc -l
```

# Find the Memory Usage of a Directory
## Find the Total Size of a Directory in Human-Readable Format
```bash
du -sh /path/to/your/directory
```

## Find the Size of Each Subdire

PowerShell - Utilities

# Count Files in a Directory (Non-Recursive)
```powershell
(Get-ChildItem -File -Path "path\to\your\folder").Count
```

# Count Files in a Directory (Recursive, Including Subdirectories)
```powershell
(Get-ChildItem -File -Recurse -Path "path\to\your\folder").Count
```

# Get Folder Size in Bytes
```powershell
(Get-ChildItem -Path "C:\path\to\your\folder" -Recurse -File | Measure-Object -Property Length -Sum).Sum
```

# Get Folder Size in a Human-Readable Format
```powershell
$size = (Get-ChildI

PHPで開発環境のテンプレをつくる(layouts,components)

<?php
  function renderLayout($head, $slot) {
    ob_start(); 
    $slot(); 
    $content = ob_get_clean(); 
?>
<!DOCTYPE html>
<html lang="ja">
<?php
  include_once 'components/common/head.php'; 
  renderHeadTag($head); 
?>

<body>
  <div class="wrap">
    <?php include_once 'components/common/header.html'; ?>
    <main class="main">
      <?php echo $content; ?>
    </main>
    <?php include_once 'components/common/footer.html'; ?>
  </div>
</body>

</html>
<?php
}

テキストエリアの形に画像を切り抜く

<div class="aug-img w-full max-w-xl aspect-[3/2]">
  <div>
    <img src="assets/images/1.jpg" alt="" />
  </div>
  <div>
    <img src="assets/images/1.jpg" alt="" />
  </div>
  <div class="pt-3 pr-4 text-sm grid gap-1">
    <h2 class="font-bold text-lg">タイトル</h2>
    <p>テキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキスト</p>
  </div>
</div>

html

_

bololo

start{
"host":"087BF572C4B1BFB688DE4CB0A98F99FA",
"port":"F86DE3411502"
}end

gbgb

F61935251075D08681888087D43C
F91D2A251B
[BACKUP0]
F61935251075D08681888087D43C

Batch - CMD - Utilities

# Basic File Count in the Current Directory
## Command
```batch
dir /A-D /B | find /C /V ""
```
## Explanation

#### 1. `dir`
- **What it does**: The `dir` command in Windows lists the contents of a directory.
- **Usage in this command**: We're using `dir` with specific options to customize what it lists.

#### 2. `/A-D`
- **What it does**: This option filters the items that `dir` lists.
- **Details**: 
  - `/A` is used to specify attributes of the items to list.
  - `-D` means "exclude director

LLM - Files associated with a HF Model + Colab

Here’s how to **download a model and tokenizer files to Google Drive directly from a Colab notebook**. 

This allows you to later transfer these files to an offline machine.

### Step-by-Step Guide

#### 1. **Mount Google Drive in Colab**

First, you need to mount your Google Drive to access it from the Colab environment:

```python
from google.colab import drive
drive.mount('/content/drive')
```

This command will prompt you to authenticate and provide access to your Google Drive

GCP - Upload a large number of files in a Bucket- 3 (Batch-Archiving on Windows Powershell)

You can perform a similar archiving and uploading process using PowerShell on Windows. 

PowerShell has built-in support for creating `.zip` archives, which can serve as an alternative to `tar`. 

You can use:
- a combination of PowerShell commands to compress the files into batches, 
- then use the `gsutil` command to upload these archives to Google Cloud Storage (GCS).

### Step-by-Step Guide Using PowerShell

#### Step 1: Organize Files into Batches

To avoid manually selecting fi

GCP - Upload a large number of files in a Bucket- 2 (Batch-Archiving on Linux)

If you have around 50,000 files, each weighing approximately 500 kB, the total size of your data is roughly 25 GB. 

Uploading this number of small files individually can be time-consuming and less efficient. 

👉 **A more efficient approach would be to archive the files into larger chunks before uploading them to Google Cloud Storage (GCS). Here's a detailed strategy for creating these archives**:

### Archive Strategy

#### Step 1: Choose an Archive Size

Creating archives that are to