/**
* @param {number[]} nums
* @param {number} k
* @return {number}
*/
var firstStableIndex = function(nums, k) {
const n = nums.length;
// Build prefix max
const prefixMax = Array(n);
prefixMax[0] = nums[0];
for (let i = 1; i < n; i++) {
prefixMax[i] = Math.max(prefixMax[i - 1], nums[i]);
}
// Build suffix min
const suffixMin = Array(n);
suffixMin[n - 1] = nums[n - 1];
for (let i = n - 2; i >= 0; i--) {
suffixMin[i] = Math.min(suffix<?php
// Advantage of this approach is you can design visually in the editor first
function dlrg_filter_post_content( $content, $post ) {
if ( $post->post_type === 'event' ):
// -----
$content ='';
//------
endif;
return $content;
}
add_filter( 'default_content', 'dlrg_filter_post_content', 10, 2 );/**
* @param {number[]} nums1
* @return {boolean}
*/
var uniformArray = function(nums1) {
nums1.sort((a, b) => a - b);
let smallestOdd = null;
let smallestEven = null;
for (let x of nums1) {
if (x % 2 === 1 && smallestOdd === null) smallestOdd = x;
if (x % 2 === 0 && smallestEven === null) smallestEven = x;
}
// Check possibility of all-even
let allEvenPossible = true;
for (let x of nums1) {
if (x % 2 === 1) {
// odd needs## How to use `basename`
Example: in case `active.conf`
> btw this is setting file of hyprland
```bash
basename "active.conf"
# => active.conf
basename "active.conf" ".conf"
# => active
```
## How to convert
### Term
- `source-extension`: extension you wanna convert from.
- `target-extension`: extension you wanna convert to.
### How to Write
```bash
cd "your-target-directory"
for file in "*.source-extension"; do mv "$file" "$(basename "$file" ".source-extension").target-extension"; done/**
* @param {number[]} nums1
* @return {boolean}
*/
var uniformArray = function(nums1) {
// The problem allows us to transform each element by either:
// 1) keeping nums1[i], or
// 2) subtracting nums1[j] from it (j ≠ i)
//
// Because subtracting numbers can always produce either all-even
// or all-odd results depending on what parity exists in the array,
// it is ALWAYS possible to make the final array uniform in parity.
//
// Therefore the answer is ```bash
dirname "$(readlink -f ~/.zshrc)
```
On branch `branch_a`, after accidently committing and pushing to remote, here is how to revert the last commit, while keeping changes on another branch. Assuming that nobody else has contributed.
```bash
git switch branch_a
git status
# Optional safety pointer to the accidental commit
git branch backup/accidental-commit
# Remove the commit, keeping all its changes staged
git reset --soft HEAD~1
# Correct the remote branch
git push --force-with-lease origin branch_a
# Create the intended bran<a href=""class="btn">
<p>テキスト</p>
<span class="btn__icon">
<svg class="btn__icon--img" id="" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 14 14">
<path d="M1.3,6.2c-.4,0-.8.3-.8.8s.3.8.8.8v-1.5h0ZM13.2,7.5c.3-.3.3-.8,0-1.1L8.4,1.7c-.3-.3-.8-.3-1.1,0-.3.3-.3.8,0,1.1l4.2,4.2-4.2,4.2c-.3.3-.3.8,0,1.1s.8.3,1.1,0c0,0,4.8-4.8,4.8-4.8ZM1.3,6.9v.9h11.3v-1.6H1.3v.9-.2Z"/>
</svg>
</a>/**
* @param {string[]} classroom
* @param {number} energy
* @return {number}
*/
var minMoves = function(classroom, energy) {
const m = classroom.length;
const n = classroom[0].length;
let start = null;
const litters = [];
// Find S and all L
for (let i = 0; i < m; i++) {
for (let j = 0; j < n; j++) {
const c = classroom[i][j];
if (c === 'S') start = [i, j];
if (c === 'L') litters.push([i, j]);
}
}
const L# ruff: noqa: ANN401, D103, T201
"""Temporary script: group unique kelvin_simulation_ids by team_id from a JSON log export."""
import json
import sys
from collections import defaultdict
from collections.abc import Iterator
from pathlib import Path
from typing import Any
TEAM_KEY = "request_body.config.team_id"
SIMULATION_KEY = "kelvin_identifier"
def records(node: Any) -> Iterator[dict[str, Any]]:
"""Yield every dict in the structure that carries either key of interest."""
if isinst# Disable Django language cookie in development environment (localhost / 127.0.0.1)
LANGUAGE_COOKIE_ENABLED = True / False
# Alternatively, create a different cookie to each project
if DEBUG:
LANGUAGE_COOKIE_NAME = "ktivaivrit_language"
## 検証環境
- Arch Linux Omarchy: 3.8.2
- next: 16.2.12
- Supabase CLI: 2.111.0
- pnpm: 11.24.0
## 対象プロジェクト詳細
- [dont-buy](https://github.com/RyoK73/dont-buy.git)
- 認証機能あり:
- メール確認あり
## 1. remoteにDBをpushする
1. remoteへDBをリンクする:
```bash
pnpm exec supabase link --project-ref "your-project-ID"
```
2. pushする
```bash
pnpm exec supabase db push
```
## 2. Vercelの環境変数設定
Settings > Enviroments
> `NEXT_PUBLIC`環境変数は公開可能な変数限定です
- `NEXT_PUBLIC_SUPABASE_URL`:
- 取得方法: [Supabase](https://supabase.com/> [GitHub Corners](https://tholman.com/github-corners/)
ページ右上に配置するGitHubへのリンクアイコン
---
name: knowledge-ops
description: Knowledge base management, ingestion, sync, and retrieval across multiple storage layers (local files, MCP memory, vector stores, Git repos). Use when the user wants to save, organize, sync, deduplicate, or search across their knowledge systems.
metadata:
origin: ECC
---
# Knowledge Operations
Manage a multi-layered knowledge system for ingesting, organizing, syncing, and retrieving knowledge across multiple stores.
Prefer the live workspace model:
- cod/**
* @param {number[]} nums
* @return {number}
*/
var minimumDeletions = function(nums) {
const n = nums.length;
// Find the indices of the minimum and maximum elements
let iMin = 0, iMax = 0;
for (let i = 0; i < n; i++) {
if (nums[i] < nums[iMin]) iMin = i; // update min index
if (nums[i] > nums[iMax]) iMax = i; // update max index
}
// Normalize: L = leftmost index, R = rightmost index
let L = Math.min(iMin, iMax);
let R = Math.max(iMin