mariaclara

mariaclara
inicio{
"host":"26150F15271B0970C964CACF77FF",
"porta":"3F3524"
}fim

Regex For Remove All Search

^.*[keyword].* as part of find all/replace all

Story Featured Thumbnail List

![](https://cdn.cacher.io/attachments/u/3hcvbnw9zj03k/5wxaYJ_RpOW3tpwPmjN6PE_dP3dT3JVw/ygoy8cdcz.png)
<div class="component c-stories c-stories--rotator-list flex">
  <div class="c-stories__thumbnails">
        <ul data-bind="foreach: thumbnails">
            <li tabindex="0" data-bind="css: { 'c-stories__active': active }, click: $component.slickGoTo, onEnter:$component.slickGoTo ">
                <div class="c-stories__item-inner relative">
                    <div class="c-stories__active-indicator">
                        <span>
                            Now Viewing
                     

2812. Find the Safest Path in a Grid

You are given a 0-indexed 2D matrix grid of size n x n, where (r, c) represents: A cell containing a thief if grid[r][c] = 1 An empty cell if grid[r][c] = 0 You are initially positioned at cell (0, 0). In one move, you can move to any adjacent cell in the grid, including cells containing thieves. The safeness factor of a path on the grid is defined as the minimum manhattan distance from any cell in the path to any thief in the grid. Return the maximum safeness factor of all paths leading to cell (n - 1, n - 1). An adjacent cell of cell (r, c), is one of the cells (r, c + 1), (r, c - 1), (r + 1, c) and (r - 1, c) if it exists. The Manhattan distance between two cells (a, b) and (x, y) is equal to |a - x| + |b - y|, where |val| denotes the absolute value of val.
/**
 * @param {number[][]} grid
 * @return {number}
 */
var maximumSafenessFactor = function(grid) {
    // Get the size of the grid
    const n = grid.length;

    // Define the directions for moving to adjacent cells
    const directions = [[1, 0], [-1, 0], [0, 1], [0, -1]];

    // Helper function to check if a cell is within the grid boundaries
    const isInBound = (r, c) => r >= 0 && r < n && c >= 0 && c < n;

    // Initialize the distance array with Infinity and the queue as empty
    co

JSON Access

import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;

import java.io.*;
import java.util.*;

public class ContactListToJson {
    public void WriteToJson() {
        // Create a JSON array to store contacts
        JSONArray contacts = new JSONArray();

        // Create a sample contact
        JSONObject contact1 = new JSONObject();
        contact1.put("name", "John");
     

blenderで作ったモデルをthree.jsで描画する

<canvas id="myCanvas"></canvas>
<script type="importmap">
  {
    "imports": {
      "three": "https://cdnjs.cloudflare.com/ajax/libs/three.js/0.163.0/three.module.min.js"
    }
  }
</script>
<script src="assets/js/script.js" type="module"></script>

Afficher stat des lignes par rapport des polygones qui intersect (seulement 50% est à l'interieur du polygone)

# Afficher stst des lignes par rapport des polygones


![](https://cdn.cacher.io/attachments/u/3fx93fy4dqwj6/-QLJU6xUcvyDp1Wa2LUWYJIHrSF6b-GZ/dw6qxw3ci.png)


```python
"nom_com" || '_' ||  "CODE_INSEE"  ||  '\n'  ||  '\n'  || 
to_string(round(coalesce(aggregate(
	layer:='stat',
	aggregate:= 'sum',
    expression:=$length,
    filter:=(
        "ft" LIKE '%_DET_DETECT%' AND length(intersection($geometry, geometry(@parent))) / length($geometry) > 0.5
    )
), 0), 2)) || ' m ----- Detection OK ---

Singularity HPC ERD high / standard mem

module load singularity
singularity run \
    --cleanenv \
    --bind /hpspor01/tenant1/users/pc_bix/kraken_db/:/hpspor01/tenant1/users/pc_bix/kraken_db/ \
    --bind /hpspor01/tenant1/users/matt.hewitt/utilities:/hpspor01/tenant1/users/matt.hewitt/utilities \
    /hpspor01/tenant1/users/pc_bix/hpcdocker.sif 

module load singularity
singularity \
    shell \
    --cleanenv \
    --bind /hpspor01/tenant1/users/pc_bix/kraken_db/:/hpspor01/tenant1/users/pc_bix/kraken_db/ \
    --bind /

Vue.js - Suspense

<template>
  <div>
    <h1>Async Component Example</h1>
    <suspense>
      <template #default>
        <AsyncComponent />
      </template>
      <template #fallback>
        <LoadingSpinner />
      </template>
    </suspense>
  </div>
</template>

<script setup>
import { defineAsyncComponent } from 'vue';

const AsyncComponent = defineAsyncComponent(() =>
  import('./AsyncComponent.vue')
);
</script>

textFluffy


export function textFluffy() {
  $(".text-fluffy").each(function () {
    var html = "";
    $(this)
      .contents()
      .each(function () {
        if (this.nodeType === 3) {
          var text = $(this).text();
          var lines = text.split("\n");
          lines.forEach(function (line) {
            var words = line.split(" ");
            words.forEach(function (word) {
              if (word.length > 0) {
                html += "<div>";
                for (var i = 0

Trie木

Reference: https://ja.wikipedia.org/wiki/%E3%83%88%E3%83%A9%E3%82%A4_(%E3%83%87%E3%83%BC%E3%82%BF%E6%A7%8B%E9%80%A0)

```
struct TrieTree {
  int count = 0;                                                                     unordered_map<char, TrieTree> child;
};

int CountByTrieTree(const vector<string>& S) {
  int ans = 0;

  TrieTree root;
  for (const auto& s : S) {
    TrieTree* tree = &root;
    for (char c : s) {
      if (!tree->child.contains(c)) {
        tree->child.emplace(c, TrieTr

HTMX execute javascript code before after htmx makes an ajax request

<button
  hx-post="/api/v1/title"
  hx-on:htmx:before-request="emptyDiv('#titles_container')"
  hx-on:htmx:after-request="doSomething()"
  type="button"
  class="btn btn-primary"
>
  Generate Title
</button>

AIを使ったシステム案など

# 思考材料

* GPT-4o はかなり有用
* Dify を使うと GPTs 的なものがかなり簡単に作れる
* Dify の便利な点は、ナレッジの追加がしやすい、処理の流れを作りやすい
* Dify の問題点は1アプリにつき入力は最初の1回しか出来ないこと(ただし入力項目は複数作れる)、チャットボットでのやり取りみたいなことをやるならアプリが複数必要そう
* Dify はローカル環境を作れる点も便利
* Dify の商用利用は可能そうだが一部条件があるようなので注意
* GPT-4o を使うと回答に縛りを設けやすい(例えば、質問内容に対して A か B のみで回答してくださいなど)
* 上記の仕組みを使えば Dify での質問分離器を活用しやすい
* チャットボットを作り、自社のプロダクト情報をナレッジとして与えて、質問者の要望に応じて適切なプロダクトを案内するなどの使い方が出来そう

# 参考記事

[GPT-4o を味見してみたらスゴかった](https://homemadegarbage.com/gpt4o-01)  
[GPT4oを使って、訓練

Get-DistinguishedNameParent

function Get-DistinguishedNameParent {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]
        [string]$distinguishedName
    )
    begin {}

    process {
        foreach ($Item In $distinguishedName) {
            $ParentOctets = $Item.Replace('\,', 'R3S3RV3D4R3PLAC3').Split(',') | Select-Object -Skip 1
            $ParentRaw = $ParentOctets -join ','
            $ParentRaw.Rep

Build -MultiPASS

Saved from https://github.com/seanec327/multipass
cd <multipass>
apt install devscripts equivs
mk-build-deps -s sudo -i

cd <multipass>
git submodule update --init --recursive
mkdir build
cd build
cmake ../
make

sudo apt update
sudo apt install libgl1 libpng16-16 libqt6core6 libqt6gui6 \
    libqt6network6 libqt6widgets6 libxml2 libvirt0 dnsmasq-base \
    dnsmasq-utils qemu-system-x86 qemu-utils libslang2 iproute2 \
    iptables iputils-ping libatm1 libxtables12 xterm

sudo <multipass>/build/bin/multipassd &
mkdir -p ~/.local/share/multipass/

Vue.js - Renderless pattern

<!-- MouseTracker.vue -->
<script setup>
import { ref, onMounted, onUnmounted } from 'vue'
  
const x = ref(0)
const y = ref(0)

const update = e => {
  x.value = e.pageX
  y.value = e.pageY
}

onMounted(() => window.addEventListener('mousemove', update))
onUnmounted(() => window.removeEventListener('mousemove', update))
</script>

<template>
  <slot :x="x" :y="y"/>
</template>

<!-- Usage: -->
<template>
	<MouseTracker v-slot="{ x, y }">
  	Mouse is at: {{ x }}, {{ y }}
	</MouseTracker>
</templ