website concept widget


jQuery('body').append('<div class="draft-notice">Website Concept</div>')

css:
    position: fixed;
    right: 0;
    top: 50%;
    transform: rotate(90deg) translate(0, -57px);
    background: white;
    padding: 15px;

3723. Maximize Sum of Squares of Digits

You are given two positive integers num and sum. A positive integer n is good if it satisfies both of the following: The number of digits in n is exactly num. The sum of digits in n is exactly sum. The score of a good integer n is the sum of the squares of digits in n. Return a string denoting the good integer n that achieves the maximum score. If there are multiple possible integers, return the maximum ​​​​​​​one. If no such integer exists, return an empty string.
/**
 * @param {number} num
 * @param {number} sum
 * @return {string}
 */
var maxSumOfSquares = function(num, sum) {
    // A positive num-digit number has sum from 1 to 9 * num.
    if (sum < 1 || sum > 9 * num) return "";

    let result = "";

    // The first digit must be at least 1.
    let digit = Math.min(9, sum);
    result += digit;
    sum -= digit;

    // Fill the remaining digits with as much of the sum as possible.
    for (let i = 1; i < num; i++) {
        digit = Math.min(9, su

LIMOUSINE SEARCH

[ limousine search](http://limousinesearch.com/)

VS Code Harnesses

# Les harnesses d'agents dans VS Code (GitHub Copilot)

> État de la documentation officielle au 14 octobre 2026 (VS Code 1.141, docs datées du 7 octobre 2026).
> Fonctionnalité en évolution rapide : vérifier les release notes avant toute décision structurante.

## Préambule

Depuis l'été 2026, la zone de saisie du chat Copilot dans VS Code affiche un sélecteur
supplémentaire, le **Session Target** (souvent appelé « harness picker »), avec les entrées
**Copilot**, **Local**, **Cloud**, **Claude*

General_Listening_Set_1_Test_2

May
Truman
6 p.m.
horse riding
30
7
6
5
400
100
L
S
F
R
A
C
C
D
F
G
farmers
field
growth
acidity
season
hard copy
30th of April
2000
appendicies
graduate
A
A
C
B
A

variance
guidance
shorthand
nervous

date stuff

  $(function() {
    $(".date").attr("type","date");
    var current = formatCurr(new Date());
      const myDate = Temporal.PlainDate.from(current);
      const newDate = myDate.add({ days: 92 });
    var expiry = newDate.toString(); 
    //console.log(current + " / " + expiry); 
      $(".date").attr("min", current);  
      $(".date").attr("max", expiry);  
        
    function formatCurr(date) {
      return [
        date.getFullYear(),
        padTo2Digits(date.getMonth() + 1

3727. Maximum Alternating Sum of Squares

You are given an integer array nums. You may rearrange the elements in any order. The alternating score of an array arr is defined as: score = arr[0]2 - arr[1]2 + arr[2]2 - arr[3]2 + ... Return an integer denoting the maximum possible alternating score of nums after rearranging its elements.
/**
 * @param {number[]} nums
 * @return {number}
 */
var maxAlternatingSum = function(nums) {
    const n = nums.length;
    const plusCount = Math.ceil(n / 2);

    // Sort by square value so the biggest squares can go in '+' positions.
    nums.sort((a, b) => a * a - b * b);

    let score = 0;

    for (let i = 0; i < n; i++) {
        const square = nums[i] * nums[i];

        // Smaller squares go to '-' positions, largest plusCount squares go to '+' positions.
        if (i < n - plusCoun

check Postgres database size in Railway db console

psql -U db_username -d db_name
SELECT pg_size_pretty(pg_database_size(current_database())) AS database_size;

Border radius + overflow (simple solution for better visual scrollbar)

div.outer {
	background: hotpink;
	width: 400px;
	margin: 30px;
	border-radius: 30px;
	padding-block: 12px;        
}

div.inner {
	max-height: 276px;          
	overflow-y: auto;
	margin: 10px;
	padding: 1rem;
}

div.inner::-webkit-scrollbar {
	width: 10px;
}

div.inner::-webkit-scrollbar-track {
	background: transparent;
	margin-block: 20px;           
}

div.inner::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, .7);
	border-radius: 100vw;
}

/* Not Chr

2897. Apply Operations on Array to Maximize Sum of Squares

You are given a 0-indexed integer array nums and a positive integer k. You can do the following operation on the array any number of times: Choose any two distinct indices i and j and simultaneously update the values of nums[i] to (nums[i] AND nums[j]) and nums[j] to (nums[i] OR nums[j]). Here, OR denotes the bitwise OR operation, and AND denotes the bitwise AND operation. You have to choose k elements from the final array and calculate the sum of their squares. Return the maximum sum of squares you can achieve. Since the answer can be very large, return it modulo 109 + 7.
/**
 * @param {number[]} nums
 * @param {number} k
 * @return {number}
 */
var maxSum = function(nums, k) {
    const MOD = 1000000007n; // Use BigInt because squares can exceed safe integer range

    // bitCount[b] = how many numbers in nums have bit b set
    const bitCount = new Array(30).fill(0);

    // Step 1: Count the set bits at each position across all numbers
    for (const num of nums) {
        for (let b = 0; b < 30; b++) {
            // (num >> b) & 1 checks if bit b is set
    

Export CSV from JetBrains PyCharm so that Hebrew will be imported to EXCEL correctly

Create a CSV exporter with BOM
JetBrains has published an official workaround specifically for this problem. 

YouTrack
1. Open the Database tool window in PyCharm.
2. Open a table and locate the Data Extractors dropdown.
3. Choose Go to Scripts Directory (or open the extractor configuration).
4. Make a copy of the built-in scripted CSV Groovy extractor.
5. Rename the copy to CSV UTF-8 BOM.
6. Add this line at the very beginning of the script:
    OUT.append('\uFEF)
    
Source: https://chatgpt.

Valkey Tips and Tricks

# Valkey Tips and Tricks

## Access data in a docker container

1. Access the cli utility: `valkey-cli -a <password>` or for more security `VALKEYCLI_AUTH="$(cat /opt/bitnami/valkey/secrets/valkey-password)" valkey-cli`
2. Access the data, example `GET key` or `HGETALL key`. Use the `Valkey Essential Queries Cheat Sheet` below.

## Sentinel

* Find who is the current master: `VALKEYCLI_AUTH="$(cat /opt/bitnami/valkey/secrets/valkey-password)" valkey-cli -p 26379 SENTINEL get-master-addr-by-name 

Goal

$goal 請你負責完成這個任務。

【任務目標】
請完成:{你真正想完成的最終任務}

【完成標準】
只有在以下條件全部成立時,才算真正完成:
1. {可驗證結果 1}
2. {可驗證結果 2}
3. {可驗證結果 3}

【硬性限制】
執行期間必須遵守:
1. 不得 {禁止事項 1}
2. 必須 {限制事項 2}
3. 只可使用 {允許範圍}
4. 若涉及高風險操作,先採用保守方案並保留可回退路徑

【執行方式】
你要自主規劃所需步驟,逐步執行,不要把問題丟回給我,除非你真的被阻塞。
每完成一個重要階段,都要自行檢查目前結果是否更接近完成標準。
如果發現錯誤、衝突或效果不佳,先自己修正,再繼續推進。
優先選擇改動最小、風險最低、最容易驗證的路徑。
不要為了看起來完成而跳過驗證。

【驗證要求】
你每次宣稱完成前,必須明確驗證:
1. {驗證方法 1}
2. {驗證方法 2}
3. {驗證方法 3}

【失敗處理】
如果某條路徑失敗,先嘗試替代方案。
如果仍無法完成,請清楚回報:
1. 卡在哪裡
2. 你已嘗試過什

PHP: security hardening

# PHP.ini
## Disable functions in php.ini
`disable_functions = exec,system,passthru,shell_exec,proc_open,proc_close,popen,escapeshellcmd,escapeshellarg,show_source,readfile,parse_ini_file,ini_alter,dl`

## Other config in php.ini (production mode)
 - don't show a version of PHP \
  `expose_php = Off`
 - lock access for a project's folders<sup>*</sup> \
  `open_basedir = /var/www/myapp:/usr/share/php:/tmp`
 - other directives
    ```ini
    log_errors = On
    error_log = /var/log/php-errors.log

2778. Sum of Squares of Special Elements

You are given a 1-indexed integer array nums of length n. An element nums[i] of nums is called special if i divides n, i.e. n % i == 0. Return the sum of the squares of all special elements of nums.
/**
 * @param {number[]} nums
 * @return {number}
 */
var sumOfSquares = function(nums) {
    const n = nums.length;
    let sum = 0;

    // Check every 1-indexed position
    for (let i = 1; i <= n; i++) {
        // A position is special if it divides n
        if (n % i === 0) {
            // Convert from 1-indexed position to 0-indexed array index
            const value = nums[i - 1];

            // Add the square of the special element
            sum += value * value;
        }
    }

2333. Minimum Sum of Squared Difference

You are given two positive 0-indexed integer arrays nums1 and nums2, both of length n. The sum of squared difference of arrays nums1 and nums2 is defined as the sum of (nums1[i] - nums2[i])2 for each 0 <= i < n. You are also given two positive integers k1 and k2. You can modify any of the elements of nums1 by +1 or -1 at most k1 times. Similarly, you can modify any of the elements of nums2 by +1 or -1 at most k2 times. Return the minimum sum of squared difference after modifying array nums1 at most k1 times and modifying array nums2 at most k2 times. Note: You are allowed to modify the array elements to become negative integers.
/**
 * @param {number[]} nums1
 * @param {number[]} nums2
 * @param {number} k1
 * @param {number} k2
 * @return {number}
 */
var minSumSquareDiff = function(nums1, nums2, k1, k2) {
    const k = k1 + k2;

    const diff = [];
    let totalDiff = 0;

    // Build the array of absolute differences.
    for (let i = 0; i < nums1.length; i++) {
        const d = Math.abs(nums1[i] - nums2[i]);
        diff.push(d);
        totalDiff += d;
    }

    // If we have enough operations to remove every di