*.pyc
/.venv/
/**
* @param {number} num
* @return {number}
*/
var maximumSwap = function(num) {
// Convert the number to an array of digits
let digits = num.toString().split('').map(Number);
// Create a copy of the digits array to track the max digits to the right
let maxDigits = [...digits];
for (let i = maxDigits.length - 2; i >= 0; i--) {
maxDigits[i] = Math.max(maxDigits[i], maxDigits[i + 1]);
}
// Traverse the digits array to find the first place where a swap woul
Si queremos en php mostrar un texto como error:
```
return "<div class='advertencia'>" .__("Identificador de herramienta incorrecto") . "</div>";
```
Si es una función que se llama por OPS, por js, podemos retornar
```
$this->quid->error("lo que sea");
```
import pandas as pd
import yfinance as yf
etf = 'SPY'
# etf = 'QQQ
trend = "downtrend"
# trend = "uptrend"
window = 30
year = 2024
start_date = '2019-01-01'
end_date = '2024-10-01'
data = yf.download(etf, start=start_date, end=end_date)
filtered_data = data['Adj Close'].to_frame('close_price')
filtered_data.index.names = ['period']
# print(filtered_data)
trends_detected = pytrendseries.detecttrend(filtered_data, trend=trend, window=window)
pytrendseries.vizplot.plot_trend(filtered_data, trend
const registry = new FinalizationRegistry((heldValue) => {
console.log(`${heldValue} がガベージコレクションされました`);
});
function createObject() {
const obj = {};
// objがGCされたときにコールバックが呼ばれるようにする
registry.register(obj, "対象オブジェクト");
return obj;
}
let myObject = createObject();
// myObjectを明示的にnullに設定し、GCの対象にする
myObject = null;
/**
* @param {number} a
* @param {number} b
* @param {number} c
* @return {string}
*/
var longestDiverseString = function (a, b, c) {
let result = ''; // Initialize the result as an empty string
let prev = [null, null]; // Keep track of the last two characters added to result
let len = 0; // Initialize the length tracker
// Run the loop until all characters are exhausted
while (a > 0 || b > 0 || c > 0) {
// If 'a' has the highest count and doesn't violate the "a
/* Tags: Swap Merge History Duplicate Correlation ID Health Dashboard Dedupe Task SCCM SerialNumber Sync
Migrates historical data (IN/PRB/CHG, etc) from duplicate CI we are deleting to the correct CI we are keeping
Do cascade delete while deleting the duplicate CI.
Close De-Dupe task.
Clear the Discovery source & correlation ID for CI we are keeping.
Clear the Correlation ID data from Sources (sys_object_source) table.
*/
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// NOTE! Ensure all sections of this
```plaintext
etc
└── prometheus
├── apps.json
├── password_file.txt
├── prometheus.yml
├── rules
│ ├── general.yml
└── web-prometheus-config.yml
```
# triton-lang API
## base
```
import triton
import triton.language as tl
@triton.jit
def kernel(...):
...
def execute(...):
kernel[(x, y, z)](...)
```
## 1
```
pid = tl.program_id(axis=0)
```
const cookieAxeptio = () => {
const checkCapatcha = (vendorChoice) => {
// Vérifie si le service reCAPTCHA a été accepté
if (vendorChoice) {
console.log("rend");
//Si le consentement pour reCAPTCHA est donné, charger dynamiquement le script Google reCAPTCHA
script = document.getElementById("gform_recaptcha-js");
if (!script) {
console.log("scrip loaded");
var recaptchaScript = document.createElement("script");
recaptchaScript.src =
"https://www.google.com/reca
# Comandos básicos
Poetry es una herramienta de gestión de dependencias y empaquetado en Python que simplifica la gestión de proyectos. Aquí tienes algunos comandos básicos para manejar dependencias con Poetry:
## 1. **Inicializar un proyecto nuevo**:
```sh
poetry init
```
Este comando te guiará a través de una serie de preguntas para configurar un nuevo proyecto de Poetry. Básicamente crea el archivo pyproject.toml. Este archivo es utilizado para definir las dependencias d
// --------------------------
// ES Utils / ScrollFixed
// --------------------------
export class ScrollFixed {
/**
* スクロール制御&スクロール制御の解除をコントロール
* @class
*/
constructor() {
/** body要素を取得 */
this._bodyElement = document.body;
/** スクロール量を保存するための変数 */
this._scrollY = 0;
/** style属性を保存するための変数 */
this._previousStyle = "";
/** 重複して発火しないようにするフラグ変数 */
this._isScrollFixed = false;
}
/**
* スクロールを制御する
// -------------------------
// ES Utils / MediaQuery
// -------------------------
export class MediaQuery {
/**
* ブレイクポイントによってコールバックを呼び出す
* @class
* @param {object} options 設定
* @see https://developer.mozilla.org/ja/docs/Web/API/MediaQueryList ドキュメント
* @see https://zenn.dev/no4_dev/articles/878f4afbff6668d4e28a-2 参考記事
*/
constructor(options = {}) {
this._options = {
breakpoint: options.breakpoint || null,
onEnter: options.on
// -----------------------------
// ES Utils / ScrollObserver
// -----------------------------
export class ScrollObserver {
/**
* 要素を監視し、画面内に入る/出るによってコールバックを呼び出す
* @class
* @param {HTMLElement} element 監視するDOM要素
* @param {object} [options] オプション設定
* @param {Function} [options.onEnter] 要素が画面に入ったときのコールバック
* @param {Function} [options.onLeave] 要素が画面から出たときのコールバック
* @param {HTMLElement|null} [options.root] ビューポートとして使う要素
* @param {string} [options.rootMarg
# Automated Code Style
## black (ESSENTIAL and alternative to ruff)
Code style formatting automatically.
Possible in pre-commit.
https://black.readthedocs.io/en/stable/
`> black main.py`
## ruff (ESSENTIAL and alternative to black allthough more complete)
Code style linting for checking and formatting automatically.
It is more completed than black because not only include formatting, checking as well.
Possible in pre-commit and poetry.
https://pypi.org/project/ruff/
```
ruff check