/**
* @param {number[]} nums
* @param {number} target
* @param {number} start
* @return {number}
*/
var getMinDistance = function(nums, target, start) {
// We'll track the smallest distance found so far.
// Start with Infinity so any real distance will be smaller.
let minDist = Infinity;
// Scan through the entire array once.
for (let i = 0; i < nums.length; i++) {
// Only care about positions where nums[i] matches the target.
if (nums[i] === target) {
/**
* PART 1: Split cart into separate shipping packages by class.
* Each package shows as its own labeled shipping line at checkout.
*
* Update the 3 slugs below to match your exact WooCommerce shipping class slugs
* (WooCommerce > Settings > Shipping > Shipping Classes — use the "Slug" column).
*/
add_filter( 'woocommerce_cart_shipping_packages', 'split_cart_by_shipping_class' );
function split_cart_by_shipping_class( $packages ) {
$cart = WC()->cart->get_cart();
if # `<システム名>` 要件定義書
| 項目 | 内容 |
|------|------|
| プロジェクト名 | `<記入>` |
## 用語集
> 記入ガイド: 本書中で使用する固有名詞・略語・業界用語を定義する。読み手が前提知識なしで読めることを目標とする。
| 用語 | 定義 |
|------|------|
| SPA | Single Page Application。初回ロード後はクライアントサイドで画面遷移を行う Web アプリケーション方式。 |
| SLA | Service Level Agreement。提供するサービス品質の合意指標(稼働率、応答時間 等)。 |
---
# 第1章 はじめに
## 1. 背景
> 記入ガイド: なぜ本システムが必要になったのかを記述する。現状の課題、ビジネス上の要求、外部環境の変化(法改正、技術革新、競合動向 等)を含める。
>
> 例: 当社では従来、経費精算を Excel テンプレートと紙の領収書による申請で運用してきた。リモートワークの定着により紙の物理回付が困難となり、申請者・承認者・経理部門のいずれ# ボットによる大量アクセスに対するコスト調整の原則
## 1. レート制限(Rate Limiting)
### 1.1 制限単位
| 単位 | 説明 |
|------|------|
| IPアドレス | 送信元IPごとにリクエスト数を制限する |
| APIキー | 発行したキーごとにリクエスト数を制限する |
| ユーザーID | 認証済みユーザーごとにリクエスト数を制限する |
| セッション | セッションIDごとにリクエスト数を制限する |
### 1.2 アルゴリズム
| アルゴリズム | 動作 |
|--------------|------|
| Token Bucket | トークンを一定速度で補充し、リクエストごとにトークンを消費する。バースト許容。 |
| Leaky Bucket | リクエストをキューに格納し、一定速度で処理する。出力レートが一定。 |
| Fixed Window | 固定時間枠(例:1分間)内でリクエスト数をカウントする。境界でリセット。 |
| Sliding Window | 移動する時間枠内でリクエスト数をカウントするimport math
from dataclasses import dataclass
from typing import Callable, Dict, Optional, Tuple
import torch
import torch.nn as nn
import torch.nn.functional as F
# =========================================================
# Configuration
# =========================================================
@dataclass
class ModelConfig:
input_dim: int
context_dim: int
latent_dim: int = 128 # dz
hidden_dim: int = 128 # dh
num_heads: int = 8
dropout: floa/**
* @param {string} word
* @return {number}
*/
var minimumDistance = function(word) {
// Keyboard coordinates for A–Z
const pos = {};
const layout = [
"ABCDEF",
"GHIJKL",
"MNOPQR",
"STUVWX",
"YZ"
];
for (let r = 0; r < layout.length; r++) {
for (let c = 0; c < layout[r].length; c++) {
pos[layout[r][c]] = [r, c];
}
}
const dist = (a, b) => {
const [x1, y1] = pos[a];
const [x2uvicorn название раздела:app --port 8001 - запускpython3 -m venv venv - создать venv
source venv/bin/activate - активировать
which python - проверить
deactivate - выйти из venv[Subject]: A complex, vintage Chicano tattoo-style graphic composition featuring a large menacing skull wearing aviator sunglasses and a snapback cap reading 'Nawf Side'. Below the skull is elaborate, ornate gothic typography reading 'TRILLA THAN THA REST' intertwined with decorative flowing ribbons. At the base sits a classic 90s luxury lowrider sedan with wire spoke wheels, flanked by stacks of hundred dollar bills, a smoking double styrofoam cup, a giant faceted diamond, and a smaller skull r{
"mcpServers": {
"firecrawl-mcp": {
"command": "npx",
"args": [
"-y",
"firecrawl-mcp"
],
"env": {
"FIRECRAWL_API_KEY": "fc-0b4d8657290a4ffdacee91bb1614089d"
}
},
"exa": {
"command": "npx",
"args": [
"-y",
"exa-mcp-server"
],
"env": {
"EXA_API_KEY": "e030e9c4-3bbb-47d1-ae23-7f12dce7ed2a"
}
},
"mem0-mcp": {
"url": "https://mcp.mem0.ai/mcp"
}
}
}/**
* @param {number[]} nums
* @return {number}
*/
var minimumDistance = function(nums) {
const lastTwo = new Map(); // value -> [prevPrev, prev]
let ans = Infinity;
for (let i = 0; i < nums.length; i++) {
const v = nums[i];
if (!lastTwo.has(v)) {
lastTwo.set(v, [i]); // first occurrence
continue;
}
const arr = lastTwo.get(v);
if (arr.length === 1) {
// second occurrence
arr.push(i);
Level Up Coding
You're reading for free via Fareed Khan's Friend Link. Become a member to access the best of Medium.
Member-only story
Building Claude Code with Harness Engineering
Multi-agents, MCP, skills system, context pipelines and more
Fareed Khan
Fareed Khan
Follow
78 min read
·
4 days ago
933
6
Read this story for free: link
As of early 2026, Claude Code crossed $1 billion in annualized revenue within six months of launch. It did not get there because of better prompts. It gotLevel Up Coding
You're reading for free via Fareed Khan's Friend Link. Become a member to access the best of Medium.
Member-only story
Building Claude Code with Harness Engineering
Multi-agents, MCP, skills system, context pipelines and more
Fareed Khan
Fareed Khan
Follow
78 min read
·
4 days ago
933
6
Read this story for free: link
As of early 2026, Claude Code crossed $1 billion in annualized revenue within six months of launch. It did not get there because of better prompts. It gotAWSTemplateFormatVersion: 2010-09-09
Description: Trusted Advisor - Exposed Access Key Detection & Alerting
Parameters:
Organization:
Description: Organization name being deployed to
Type: String
MinLength: 1
NotificationHTTPS:
Description: HTTPS (PagerDuty) Endpoint for SNS Topic Subscription
Type: String
MinLength: 1
Resources:
########################
## SNS TOPIC
########################
SNSTopicAlerts:
Type: AWS::SNS::Topic
Properties:
/**
* @param {number[]} nums
* @return {number}
*/
var minimumDistance = function(nums) {
const pos = new Map();
// Collect positions for each value
for (let i = 0; i < nums.length; i++) {
if (!pos.has(nums[i])) pos.set(nums[i], []);
pos.get(nums[i]).push(i);
}
let ans = Infinity;
// For each value, check triples of consecutive indices
for (const [val, arr] of pos.entries()) {
if (arr.length < 3) continue;
for (let i = 0; i + 2 <<nav>
<a href="#">Home</a>
<a href="#">About</a>
<a href="#">Articles</a>
<a href="#">Contact</a>
</nav>