ACE Editor code view

https://codemirror.net/5/doc/manual.html#usage


Include in Header:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/codemirror.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/theme/monokai.min.css" />


<!--  EDITOR CONTENT  -->
<div wire:ignore>
    <div id="editor" style="height: 500px; width: 100%;"></div>
</div>
<!-- Hidden textarea to bind with Livewire -->
<textarea id="content" name="content" style="di

3011. Find if Array Can Be Sorted

You are given a 0-indexed array of positive integers nums. In one operation, you can swap any two adjacent elements if they have the same number of set bits . You are allowed to do this operation any number of times (including zero). Return true if you can sort the array, else return false.
/**
 * @param {number[]} nums
 * @return {boolean}
 */
var canSortArray = function(nums) {
    // Iterate through the array
    for (let i = 0; i < nums.length; i++) {
        for (let j = i + 1; j < nums.length; j++) {
            // If the current number is greater than the next number
            if (nums[i] > nums[j]) {
                // Calculate the number of set bits (ls) in the binary representation of both numbers
                let setbits1 = nums[i].toString(2).replace(/0/g, '').len

photon ↔ icms (device model)

photon ↔ icms (device model)
*.pyc
/.venv/

CAMBIARE TITOLI WIDGET DA H3 a P

<?php
add_filter( 'dynamic_sidebar_params', 'change_widget_titles', 20 );
function change_widget_titles( array $params ) {
    $widget =& $params[0];
    $widget['before_title'] = '<p class="widget-title">';
    $widget['after_title'] = '</p>';
    
    return $params;
}

見積もりのヒアリング方法

# ざっくり見積もり方法

## とりあえず分かってる要件を箇条書きしてもらう

### 困っていること

困っているけど実現方法が分からないこと。  

### やりたい事

困っていて実現方法にある程度想定があること。  

## やりとりはどのくらい必要か

### 基本2回必要

要件からある程度想像できる場合は1回以下でも大丈夫。  
ただし、想像しにくい案件の場合は2回ほどやりとりを持った方がいい。  
1回目は、基本的な要件を聞き取ってざっくり詰める。  
2回目は、1回目の要件から作ったプロトタイプを元に方向性があっているかと具体的な実現性について詰める。  
2回やってやっぱりできないという結論になる可能性もあると考えたほうがいい。  

## 最初の軽い打診にどう答える?

1回目のやりとりの前に軽いシステム化の打診があるはず。  
その際は「こんな感じの出来る?」程度の話であるはず。  
ほぼ分からないに等しいが出来るか出来ないか答えないといけない。  
その時点で出来ないなら「出来ない」と答え、分からないとき

Documentation - TRI/DAT/Transcore Data Guide

/*
Created Date: 2.20.2019
Created By: Chris Kendrick
Keywords: TRI, DAT, Transcore, Market, Spot, Shipper Contract
Description: this teaches you the basics of how TRI structures their data, what kind of TRI data echo stores in our DB, and how to get at the data


**************************************************************************************************************
DISCLAIMER
********************************************************************************************************

background-image

background-size: cover;
background-position: center;
background-repeat: no-repeat;

2914. Minimum Number of Changes to Make Binary String Beautiful

You are given a 0-indexed binary string s having an even length. A string is beautiful if it's possible to partition it into one or more substrings such that: Each substring has an even length. Each substring contains only 1's or only 0's. You can change any character in s to 0 or 1. Return the minimum number of changes required to make the string s beautiful.
/**
 * @param {string} s
 * @return {number}
 */
var minChanges = function(s) {
    let changes = 0;

    // Traverse the string in steps of 2
    for (let i = 0; i < s.length; i += 2) {
        // If the two consecutive characters are different,
        // we need to change one of them
        if (s[i] !== s[i + 1]) {
            changes += 1;
        }
    }

    return changes;
};

LC

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
A+#nMv)9rBi+7JA

横並びになっている要素の1つだけをstickyで追従させる

<div class="hoge"></div>
  <div class="foo" style="color:white;font-size:2rem;">ひだり</div>
  <div class="bar" style="color:white;font-size:2rem;">みぎ</div>
<div class="piyo"></div>

3163. String Compression III

Given a string word, compress it using the following algorithm: Begin with an empty string comp. While word is not empty, use the following operation: Remove a maximum length prefix of word made of a single character c repeating at most 9 times. Append the length of the prefix followed by c to comp. Return the string comp.
/**
 * @param {string} word
 * @return {string}
 */
var compressedString = function(word) {
    // Initialize an empty string to store the compressed result
    let comp = '';

    // While there are characters left in the word
    while (word.length > 0) {
        // Get the current character to process
        let currentChar = word[0];
        // Initialize the count for the current character
        let count = 0;

        // Count the number of consecutive occurrences of the current charact

GIT Repair commit

```
git add .
````

```
git commit --amend --no-edit
```
Si hace falta actualizar en Github
```
git push --force
```

testing_where_not_exist

SELECT CASE
    WHEN EXISTS (
        SELECT 1
        FROM fact_combination_selections_temp src
        JOIN $ENRICHED_SCHEMA.fact_combination_selections tgt
        ON src.combination_selection_rn = tgt.combination_selection_rn
        AND src.exchange_rate = tgt.exchange_rate
        AND src.bet_resettled_flag = tgt.bet_resettled_flag
    ) THEN 'true'
    ELSE 'false'
END AS match_exists;

Transformation float64 to float32 for numerical columns of pandas dataframe

df = df.astype({col: 'float32' for col in df.select_dtypes(include='float64').columns})

test_exists_clause

SELECT CASE
    WHEN EXISTS (
        SELECT 1
        FROM fact_combination_selections_temp src
        JOIN $ENRICHED_SCHEMA.fact_combination_selections tgt
        ON src.combination_selection_rn = tgt.combination_selection_rn
        AND src.exchange_rate = tgt.exchange_rate
        AND src.bet_resettled_flag = tgt.bet_resettled_flag
    ) THEN 'true'
    ELSE 'false'
END AS match_exists;