Snippets Collections
Checking if a value exists?
if (in_array('admin', $roles, true)) {
    // true === strict check, avoids weird type bugs
}

Need to find the key instead?
$key = array_search('editor', $roles, true);
// Returns: 'editor'

Always use the strict mode (true) – otherwise, PHP might return unexpected results due to loose comparisons (like “0" == false).

Pro tip: If you do lots of lookups, consider flipping the array so the value becomes the key – that’s way faster.
Let’s clean some data:
$data = ['apple', '', null, 'banana', false];
$clean = array_filter($data);
// Result: ['apple', 'banana']

By default, array_filter() removes falsey values: null, false, ‘’, 0, etc.

But you can pass your own logic:
$even = array_filter([1, 2, 3, 4], fn($n) => $n % 2 === 0);
// Result: [1 => 2, 3 => 4]
Sometimes your data comes in two separate pieces. Maybe you read from a CSV file:
$headers = ['name', 'email', 'role'];
$row = ['Alice', 'alice@example.com', 'admin'];

To turn this into an associative array:
$user = array_combine($headers, $row);
/*
[
  'name' => 'Alice',
  'email' => 'alice@example.com',
  'role' => 'admin'
]
*/
$roles = ['admin' => 1, 'editor' => 2, 'viewer' => 3];

Need to look up the role name by ID?
$lookup = array_flip($roles);
// Result: [1 => 'admin', 2 => 'editor', 3 => 'viewer']
$users = [
    ['id' => 1, 'name' => 'Alice'],
    ['id' => 2, 'name' => 'Bob'],
    ['id' => 3, 'name' => 'Charlie'],
];

To get all the names:
$names = array_column($users, 'name');
// Result: ['Alice', 'Bob', 'Charlie']

Want to index them by ID?
$names = array_column($users, 'name', 'id');
// Result: [1 => 'Alice', 2 => 'Bob', 3 => 'Charlie']
<style>
        .dialog {
            display: none;
            position: fixed;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 1000;
        }
        .dialog-content {
            background-color: white;
            margin: 15% auto;
            padding: 20px;
            border-radius: 5px;
            width: 80%;
            max-width: 500px;
        }
    </style>
1.-<dialog id="myDialog" class="dialog">
      <div class="dialog-content">
          <h2>Dialog Title</h2>
          <p>This is a dialog box.</p>
          <button onclick="myDialog.close()">Close</button>
          <button onclick="myDialog.showModal()">Abrir Modal</button>
      </div>
	</dialog>
<script>
  const myDialog = document.getElementById('myDialog');
</script>

<button onclick="myDialog.showModal()">abrir Modal</button>
    
2.-<button id="openDialog">Abrir diálogo</button>

<dialog id="myDialog">
  <p>Este es un cuadro de diálogo</p>
  <button id="closeDialog">Cerrar</button>
</dialog>

<script>
  const openDialogButton = document.getElementById("openDialog");
  const dialog = document.getElementById("myDialog");
  const closeDialogButton = document.getElementById("closeDialog");

  openDialogButton.addEventListener("click", () => {
    dialog.showModal(); // Muestra el cuadro de diálogo en modo modal
  });

  closeDialogButton.addEventListener("click", () => {
    dialog.close(); // Cierra el cuadro de diálogo
  });
</script>
Aquí tienes ejemplos específicos para cada paso de crear contenedores Docker y conectarlos, explicados de forma que sea fácil recordarlos:

1.-Descargar la imagen
Comando:
docker pull nginx:latest
Esto descarga la imagen oficial de Nginx con la etiqueta "latest" desde Docker Hub. Si no especificas la etiqueta, se toma "latest" por defecto.

2.-Crear una red personalizada
Comando:

docker network create mired
Aquí creas una red llamada "mired" de tipo bridge, donde podrás conectar varios contenedores para que se comuniquen entre sí.

3.-Crear el contenedor con configuración
Comando ejemplo:

docker run -d --name mi_nginx -p 8080:80 -e "ENV=production" --network mired nginx:latest
Explicación:

-d: ejecuta el contenedor en segundo plano.
--name mi_nginx: asigna el nombre "mi_nginx" al contenedor.
-p 8080:80: expone el puerto 80 del contenedor en el puerto 8080 del host.
-e "ENV=production": define la variable de entorno ENV con valor production.
--network mired: conecta el contenedor a la red personalizada creada.
nginx:latest: usa la imagen nginx con la etiqueta latest.

4.-Conectar contenedores entre sí
Supongamos que creas dos contenedores en la red "mired":

docker run -d --name webapp --network mired nginx
docker run -d --name db --network mired mysql -e MYSQL_ROOT_PASSWORD=password
Ambos están en la misma red, por lo que el contenedor "webapp" puede acceder al "db" usando el nombre "db" como hostname.

Si quieres conectar un contenedor ya existente a la red después de crearlo:

docker network connect mired nombre_contenedor
Para recordar mejor cada paso, piensa:

"Pull" es traer la imagen al disco.

"Network create" es como hacer una calle para que los contenedores se hablen.

"Run" es poner en marcha el contenedor con nombre, puertos, y variables.

Ponerlos en la misma red es para que cooperen sin problemas.
Aquí tienes un resumen detallado y ordenado de los pasos para crear contenedores Docker y conectarlos, incluyendo descarga de imágenes, creación de redes, configuración de contenedores con puertos, nombres, variables de entorno y asignación de redes:

Descargar la imagen

Usar el comando docker pull nombre_imagen:etiqueta para descargar una imagen desde un repositorio (como Docker Hub).

Si no se especifica etiqueta, se descarga la etiqueta "latest" por defecto.

También puedes dejar que Docker la descargue automáticamente al crear un contenedor si la imagen no está local.

Crear una red personalizada (opcional)

Los contenedores por defecto se conectan a una red bridge predeterminada, pero puedes crear una red propia para una mejor gestión.

Comando para crear red tipo bridge: docker network create nombre_red

Esta red permitirá luego conectar contenedores entre sí fácilmente.

Crear el contenedor con configuración

Usar docker run para crear y ejecutar un contenedor.

Algunos parámetros útiles para configurar al crear el contenedor:

-p puerto_local:puerto_contenedor: Asigna y mapea puertos del host al contenedor.

--name nombre_contenedor: Asigna un nombre legible y gestionable al contenedor.

-e VAR=valor: Define variables de entorno para configurar la aplicación dentro del contenedor.

--network nombre_red: Conecta el contenedor a la red creada previamente o a la red deseada.

imagen:etiqueta: Especifica la imagen y la etiqueta (versión) que se usará.

Ejemplo del comando completo para crear un contenedor con esos parámetros:

bash
docker run -d --name mi_contenedor -p 8080:80 -e "API_KEY=abc123" --network mired mi_imagen:1.0
Esto creará un contenedor en segundo plano (-d), con nombre mi_contenedor, exponiendo el puerto 80 del contenedor en el puerto 8080 del host, definiendo una variable de entorno API_KEY, conectándolo a la red mired y usando la imagen mi_imagen con etiqueta 1.0.

Conectar contenedores entre sí

Si los contenedores están en la misma red personalizada, podrán comunicarse mediante sus nombres.

Para conectar contenedores existentes a una red, usar docker network connect nombre_red nombre_contenedor.

Estos pasos te permiten crear y configurar contenedores Docker con la flexibilidad para gestionar puertos, entornos, nombres y redes, lo cual es esencial para proyectos que involucren múltiples contenedores y servicios interconectados.
Opciones comunes incluyen:
-a o --all: Muestra todas las imágenes, incluidas las intermedias.
-q o --quiet: Muestra solo los IDs de las imágenes.
--filter: Filtra las imágenes según condiciones específicas.
--format: Formatea la salida de acuerdo con una plantilla personalizada.

si te sale este error hacer:
permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock
significa que tu usuario no tiene permiso para acceder al socket del daemon de Docker. Esto es común cuando Docker se instala y se usa sin permisos elevados o sin configurar el usuario adecuadamente.

Para solucionar esto, tienes dos opciones:
1.-Usar sudo temporalmente para ejecutar comandos Docker, por ejemplo:
sudo docker images
Esto funciona pero no es lo ideal a largo plazo porque cada comando Docker requeriría sudo.

2.-Configurar tu usuario para que pertenezca al grupo "docker", que tiene acceso al socket de Docker. Ejecuta estos comandos:

-Crea el grupo docker si no existe:
sudo groupadd docker

-Agrega tu usuario al grupo docker (reemplaza ${USER} por tu nombre de usuario o mantén la variable si estás en una terminal):
sudo usermod -aG docker ${USER}

-Para que los cambios tengan efecto, cierra la sesión de tu usuario y vuelve a iniciarla, o ejecuta:
su - ${USER}

-Ahora deberías poder ejecutar comandos Docker sin sudo, por ejemplo:
docker images

-Si sigues teniendo problemas, asegúrate de que el permiso del directorio .docker en tu home sea correcto con:
sudo chown "$USER":"$USER" ~/.docker -R
sudo chmod g+rwx ~/.docker -R
Con este procedimiento, el acceso al socket Docker debe quedar configurado para tu usuario y el error desaparecerá.
In the competitive realm of blockchain gaming, crafting in-game NFT assets that resonate with players demands a fusion of creativity, utility, and scarcity. 

Key strategies include:
Strategic Scarcity & Rarity Tiers
 Define clear rarity gradients—common, rare, epic, legendary—to cultivate desire and direct user acquisition funnels toward premium tiers. Controlled mint sizes amplify perceived value and fuel FOMO-driven sales.

Dynamic Metadata & Evolvability
 Implement on-chain or off-chain metadata that evolves based on player achievements, in-game milestones, or seasonal events. Mutable attributes encourage continued play and deepen emotional attachment.

Utility-Driven Mechanics
 Embed functional benefits—such as stat boosts, crafting components, or governance voting rights—within NFT attributes. Tangible in-game advantages differentiate collectibles beyond mere aesthetics.

Narrative Integration & Lore Alignment
 Anchor each asset within the game’s story universe via character backstories, lore-based quests, and episodic drops. Rich narratives transform NFTs into narrative milestones that players covet.

Community Co-Creation & Whitelisting
 Engage early adopters through design contests, whitelist allocations, and DAO-governed drops. Co-creation fosters ownership, drives organic marketing, and seeds a loyal ambassador network.

We maticz offers NFT Game Development Services blend these strategies into an end-to-end roadmap—from concept ideation and smart-contract deployment to marketplace integration and live-ops support. Empower your studio to launch NFT collections that not only stand out but also catalyze sustainable player economies and drive measurable ROI. 
1.-Preparar el entorno base:
Instala Docker y Docker Compose en tu sistema para poder construir y manejar contenedores.

2.-Crear estructura de proyecto Laravel:
Puedes crear el proyecto Laravel localmente o usar un contenedor PHP con Composer para generarlo.
Si ya tienes un proyecto Laravel, colócalo en una carpeta donde trabajes con Docker.

3.-Crear archivo Dockerfile para PHP + Apache2 + extensiones relevantes:
Usarás la imagen base oficial de PHP 8.4 con Apache.
Instalarás las extensiones necesarias para Laravel y PostgreSQL, por ejemplo: pdo_pgsql, pgsql, zip, curl, xml, mbstring.
Copiarás el código fuente Laravel al contenedor.
Ejemplo básico de Dockerfile:
FROM php:8.4-apache

RUN apt-get update && apt-get install -y \
    libpq-dev \
    libzip-dev \
    zip \
    unzip \
    && docker-php-ext-install pdo_pgsql pgsql zip bcmath

COPY . /var/www/html/

RUN chown -R www-data:www-data /var/www/html \
    && a2enmod rewrite
    
4.-Configurar Docker Compose para los servicios:
Define servicios para PHP-Apache y PostgreSQL.
Vincula volúmenes para código y datos persistentes.
Configura variables de entorno para Laravel (DB connection).
Ejemplo básico de docker-compose.yml:
version: '3.8'

services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "8080:80"
    volumes:
      - ./:/var/www/html
    depends_on:
      - db

  db:
    image: postgres:15
    environment:
      POSTGRES_DB: laravel
      POSTGRES_USER: laraveluser
      POSTGRES_PASSWORD: laravelpass
    volumes:
      - pgdata:/var/lib/postgresql/data

volumes:
  pgdata:

5.-Configurar archivo .env de Laravel:
Ajusta las variables para conectarse a la base de datos PostgreSQL dentro del contenedor:

DB_CONNECTION=pgsql
DB_HOST=db
DB_PORT=5432
DB_DATABASE=laravel
DB_USERNAME=laraveluser
DB_PASSWORD=laravelpass

6.-Construir e iniciar los contenedores Docker:
En la terminal, ejecutar:
docker-compose up --build
Esto facilita manejar dependencias y la base de datos dentro del entorno Docker.

Resumen y conceptos clave:
Dockerfile: define cómo construir la imagen personalizada PHP+Apache con las extensiones necesarias.
Docker Compose: orquesta múltiples contenedores (app y db), redes y volúmenes.
Volúmenes: aseguran que tu código y los datos de la base de datos persistan fuera de los contenedores.
Laravel .env: configura la conexión a la base de datos PostgreSQL dentro de la red Docker.
Comandos Artisan dentro del contenedor mantienen el entorno controlado y consistente.
Este proceso modular te permite entender cómo Docker puede contenerizar un proyecto web completo con backend, webserver y base de datos separados pero comunicados, facilitando el desarrollo y pruebas locales sin alterar tu sistema nativo.
cd /var/www/html/jobran/indicadores/
 php yii serve --docroot "backend/web"
en esta ruta:
/usr/local/sbin/ajustes_pantalla.sh

crear:
bajar la temperatura de color de la pantalla:
#!/bin/bash
# Ajustar temperatura de color
sct 2450
# Ajustar brillo con xcalib
xcalib -co 80 -a

Crea un archivo de servicio para systemd en /etc/systemd/system/, por ejemplo:
sudo nano /etc/systemd/system/ajustes_pantalla.service
codigo:
[Unit]
Description=Servicio de ajustes de pantalla
After=network.target

[Service]
Type=simple
ExecStart=/usr/local/sbin/ajustes_pantalla.sh
Restart=on-failure

[Install]
WantedBy=multi-user.target

Guarda y cierra el archivo.
Recarga systemd para detectar el nuevo servicio:
sudo systemctl enable ajustes_pantalla.service

sudo systemctl restart ajustes_pantalla.service

reducir brillo de pantalla: 
xcalib -co 80 -a

verificar el estado del servicio:
systemctl status ajustes_pantalla.service
cd /var/www/html/jobran/indicadores/
php yii serve --docroot "backend/web"

combinar dos base de datos sql

si quieres ver el contenido de un archivo sql puedes usar:
nano diferencias.sql 

ejemplo para entrar en una que tiene nombre separados por espacios:
cd BASES\ DE\ DATOS\ SQL/

instalar java 
sudo apt update
sudo apt install default-jre
sudo apt install default-jdk
java -version

instalar la herramiuenta para comparar dos bases de datos 
sudo apt update
sudo apt install apgdiff

comando para comparar dos bases de datos sql
apgdiff esquema1.sql esquema2.sql > cambios.sql

conectarse a postgres 

psql -h localhost -U postgres -W

crear la base de datos 
create database dbname;

si tienes el error de que el archivo tiene owner utiliza estos comando
1.-sed '/ALTER SEQUENCE .* OWNER TO/d' indicadores_jobran.sql > jobran_sin_owner.sql
sed '/ALTER SEQUENCE .* OWNER TO/d' indicadores_produccion.sql > prduccion_sin_owner.sql
3.-apgdiff --ignore-start-with jobran_sin_owner.sql prduccion_sin_owner.sql > diferencias.sql


este comando te permite buscar el archivo apgdiff en tu sistema
find ~ -name "apgdiff*.jar"

conectar a una base de datos 
psql -h localhost -U postgres -W


respaldar base de datos 
pg_dump -s -U nameuserdb -h host dbname > sqlcratedname.sql

respaldar sin permisos owner
pg_dump -s --no-owner -U postgres -h host dbname > sqlcratedname.sql

dar permiso para leer pero esto no es necesario 
ya que se insalo usando apt install
chmod +r apgdiff.jar

tambien puedes comparar 
Consultas SQL para comparar tablas y columnas
Si prefieres comparar directamente desde SQL, puedes consultar las tablas del sistema:

Listar tablas:

sql
SELECT table_name FROM information_schema.tables WHERE table_schema = 'public';
Listar columnas de una tabla:

Listar columnas de una tablas:
sql
SELECT column_name, data_type FROM information_schema.columns WHERE table_name = 'nombre_tabla';



El comando mv en Linux se utiliza principalmente para dos funciones importantes:

Mover archivos o directorios de una ubicación a otra dentro del sistema de archivos. Por ejemplo, puedes mover un archivo del directorio actual a otro directorio especificado. También permite mover directorios completos con todo su contenido.

Renombrar archivos o directorios. Al usar mv, si especificas un nuevo nombre en la misma ubicación, en lugar de mover, cambiarás el nombre del archivo o directorio.

mv [opciones] origen destino
{
  "FFlagDebugDisablePostFx": "False",
  "DFIntPostEffectBlurAmount": "10",
  "FFlagEnableDepthOfField": "True",
  "DFIntDepthOfFieldQuality": "1",
  "DFIntDepthOfFieldFarIntensity": "10",
  "DFIntDepthOfFieldNearIntensity": "10",
  "DFIntTaskSchedulerTargetFps": "200",
  "FFlagDebugPauseVoxelizer": "True",
  "FIntRenderShadowIntensity": "0",
  "DFFlagTextureQualityOverrideEnabled": "True",
  "DFIntTextureQualityOverride": "1",
  "DFIntDebugFRMQualityLevelOverride": "1",
  "DFIntRenderDistance": "500",
  "FFlagDisableGlobalShadows": "True",
  "FFlagDisablePostFx": "True",
  "DFIntReflectionQuality": "0",
  "DFIntWaterQuality": "0"
}
en linux postgres respaldo:
pg_dump -U usuario -W -h host -d basededatos > respaldo.sql
______________________________________________________________________________________

Para crear un clúster de base de datos PostgreSQL en Termux, puedes seguir estos pasos básicos:
Instala PostgreSQL en Termux:

pkg install postgresql

Crea un directorio donde se guardarán los datos de PostgreSQL (por ejemplo en tu home):
mkdir ~/datos_psql

Inicializa el clúster de base de datos PostgreSQL en ese directorio:
initdb ~/datos_psql

Inicia el servidor de PostgreSQL apuntando al directorio de datos creado:
pg_ctl -D ~/datos_psql start

Puedes crear una base de datos con:
createdb nombre_base_de_datos

Para acceder a la consola de PostgreSQL, usa:
psql nombre_base_de_datos

Para detener el servidor:
pg_ctl -D ~/datos_psql stop

Ver clústeres/instancias creadas (Debian/Ubuntu)
pg_lsclusters

En Termux, PostgreSQL generalmente se maneja como una única instancia manualmente configurada e iniciada en el directorio de datos que tú especifiques con initdb y pg_ctl. Para "ver el estado" o existencia de tu clúster en Termux, debes revisar manualmente si el directorio de datos existe y si el servidor está en ejecución, ya que no hay un comando integrado tipo pg_lsclusters.

Puedes hacer esto en Termux con comandos típicos del sistema, por ejemplo:

Ver si el directorio de datos está creado (ejemplo con directorio por defecto en Termux):

ls ~/datos_psql

Verificar si el proceso de PostgreSQL está corriendo:
ps aux | grep postgres


In the rapidly maturing smart‑contract arena, vetting a Solidity Development Company demands a structured due‑diligence framework—ensuring your dApp roadmap aligns with proven expertise and robust delivery pipelines.
Begin by evaluating demonstrable track records:

Portfolio Depth: Review past projects for diverse use cases—DeFi protocols, NFT marketplaces, and DAO governance systems—to validate end‑to‑end Solidity Development proficiency.

Audit Partnerships: Leading firms maintain collaborations with reputable security auditors (e.g., CertiK, OpenZeppelin), embedding formal review stages within their CI/CD workflows.

Open‑Source Contributions: Active contributions to core Solidity libraries, tooling (Hardhat, Truffle), or protocol specifications signal genuine community leadership and code ownership.

Agile Governance: Transparent sprint cadences, JIRA‑backed story tracking, and stakeholder demos demonstrate disciplined delivery and adaptive scope management.

DevSecOps Integration: Automated linting, static‑analysis checks, and unit‑testing coverage thresholds assure smart‑contract integrity before mainnet deployment.

Post‑Launch Support: SLA‑driven maintenance agreements—covering patch releases, security hotfixes, and upgradeable proxy patterns—underscore long‑term commitment.

We Maticz’s is the top Solidity Development Company embody these rigor metrics. Our enterprise teams blend audit‑grade coding standards with agile sprints and strategic token‑economy design—empowering entrepreneurs to de‑risk development, accelerate time‑to‑market, and secure lasting on‑chain value.
%ProgramFiles%/Google/Chrome/Application/chrome.exe --disable-background-timer-throttling
<manifest>
    ...
    <application>
        ...
        <provider
            android:name="com.example.MyCloudProvider"
            android:authorities="com.example.mycloudprovider"
            android:exported="true"
            android:grantUriPermissions="true"
            android:permission="android.permission.MANAGE_DOCUMENTS"
            android:enabled="@bool/isAtLeastKitKat">
            <intent-filter>
                <action android:name="android.content.action.DOCUMENTS_PROVIDER" />
            </intent-filter>
        </provider>
        ...
    </application>
</manifest>
En C, la función main devuelve un valor entero que indica el estado con el que el programa terminó y ese valor es enviado al sistema operativo.

Si usas return 0; al final de main, estás indicando que el programa finalizó correctamente, sin errores.

Si usas un valor diferente de 0, ese valor representa un estado de terminación anormal o un código de error o excepción. Por ejemplo, return 1; puede significar que ocurrió algún error durante la ejecución.

Este valor devuelto puede ser utilizado por otros programas, scripts o el sistema operativo para saber si el programa tuvo éxito o si ocurrió algún problema. Es común utilizar diferentes valores diferentes de cero para indicar distintos tipos de errores, facilitando así la gestión y diagnóstico cuando tu programa es ejecutado dentro de un entorno más grande, como scripts batch o sistemas operativos.

Además, existen constantes simbólicas estándar definidas en <stdlib.h> que puedes usar para estos fines:

EXIT_SUCCESS (equivalente a 0, indica éxito)

EXIT_FAILURE (indica fallo)

Ejemplos de uso:

int main() {
    // código
    return 0;
}

#include <stdlib.h>

int main() {
    if (/* algún error */) {
        return EXIT_FAILURE;  // Indica fallo
    }
    return EXIT_SUCCESS;  // Indica éxito
}
uses
  ZConnection, ZDataset;

var
  Conn: TZConnection;
  Query: TZQuery;
begin
  Conn := TZConnection.Create(nil);
  Conn.Protocol := 'postgresql';
  Conn.HostName := 'localhost';
  Conn.Database := 'mi_basedatos';
  Conn.User := 'usuario';
  Conn.Password := 'contraseña';
  Conn.Connect;

  Query := TZQuery.Create(nil);
  Query.Connection := Conn;
  Query.SQL.Text := 'SELECT * FROM tabla;';
  Query.Open;

  while not Query.EOF do
  begin
    writeln(Query.FieldByName('campo').AsString);
    Query.Next;
  end;

  Query.Close;
  Conn.Disconnect;
end.
program Promedio;
var
  n, i: integer;
  suma: real;
  numeros: array of real;
begin
  writeln('¿Cuántos números desea ingresar?');
  readln(n);
  SetLength(numeros, n);
  suma := 0;
  for i := 0 to n-1 do
  begin
    writeln('Ingrese el número ', i+1, ':');
    readln(numeros[i]);
    suma := suma + numeros[i];
  end;
  writeln('El promedio es: ', suma/n:0:2);
end.
program Primo;
var
  n, i: integer;
  esPrimo: boolean;
begin
  writeln('Ingrese un número:');
  readln(n);
  esPrimo := true;
  if n < 2 then
    esPrimo := false
  else
    for i := 2 to n div 2 do
      if n mod i = 0 then
      begin
        esPrimo := false;
        break;
      end;
  if esPrimo then
    writeln(n, ' es un número primo')
  else
    writeln(n, ' no es un número primo');
end.
program Factorial;
var
  n, i: integer;
  factorial: longint;
begin
  writeln('Ingrese un número:');
  readln(n);
  factorial := 1;
  for i := 1 to n do
    factorial := factorial * i;
  writeln('El factorial de ', n, ' es ', factorial);
end.
git clone https://github.com/tfkhdyt/termux-fpc.git

cd termux-fpc
./install.sh

pas nombre_archivo.pas
Si en tu proyecto Yii2 no tienes el archivo console.php, eso significa que no tienes configurada aún la aplicación para la consola (la línea de comandos), que es necesaria para ejecutar comandos como las migraciones.

Para resolverlo, debes crear ese archivo manualmente desde cero dentro de la carpeta config/ de tu proyecto.

Aquí te dejo un ejemplo básico y funcional para que crees tu propio archivo console.php de configuración para la consola en Yii2:

<?php

return [
    'id' => 'app-console',
    'basePath' => dirname(__DIR__),  // Ruta base de tu proyecto
    'controllerNamespace' => 'app\commands', // Ruta por defecto para los controladores de consola
    // Aquí agregas la configuración de conexión a la base de datos
    'components' => [
        'db' => [
            'class' => 'yii\db\Connection',
            'dsn' => 'mysql:host=localhost;dbname=tu_base_de_datos', // Cambia esto por tu configuración
            'username' => 'tu_usuario',
            'password' => 'tu_contraseña',
            'charset' => 'utf8',
        ],
    ],
    // Configurar el controlador de migraciones extendido de la extensión bizley
    'controllerMap' => [
        'migration' => [
            'class' => 'bizley\migration\controllers\MigrationController',
        ],
    ],
];

      Además de crear este archivo, asegúrate de tener el script de entrada para consola que por defecto es el archivo yii (sin extensión) que está en la raíz del proyecto, el cual usa este archivo de configuración para correr comandos. Este archivo debería lucir así:
      
      #!/usr/bin/env php
<?php
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');

require __DIR__ . '/vendor/autoload.php';
require __DIR__ . '/vendor/yiisoft/yii2/Yii.php';

$config = require __DIR__ . '/config/console.php';

$application = new yii\console\Application($config);
$exitCode = $application->run();
exit($exitCode);

Resumen de la solución si no tienes console.php
Crea el archivo config/console.php con la configuración mínima requerida (como conexión a DB, controlador de migraciones, etc.).

Asegúrate de tener el archivo ejecutable yii en la raíz del proyecto que carga esa configuración para comandos de consola.

Con eso ya podrás usar comandos Yii como yii migrate y el controlador personalizado para migraciones.
composer require --dev bizley/migration

Configurar el controlador en console.php:
Agrega esto para registrar el controlador de migraciones extendido:

¿Qué es el controlador en controllerMap?
En Yii2, los controladores son clases que contienen la lógica que se ejecuta cuando llamas a un comando o accedes a una ruta web.

En la aplicación de consola, cada comando corresponde a un controlador.

controllerMap es una configuración especial que permite registrar o sobrescribir controladores específicos para la aplicación.
'controllerMap' => [
    'migration' => [
        'class' => 'bizley\migration\controllers\MigrationController',
    ],
],
  Aquí se le está diciendo a Yii2 que cuando ejecutes comandos relacionados con migration (migraciones), debe usar NO el controlador de migraciones por defecto que trae Yii2, sino otro controlador que ofrece la extensión bizley/yii2-migration.
Ese controlador extendido está implementado en la clase PHP bizley\migration\controllers\MigrationController, que viene con la extensión que instalaste.
Esto permite agregar funcionalidades avanzadas al comando yii migration usando ese controlador.
return [
    'id' => 'app-console',
    'basePath' => dirname(__DIR__),
    'controllerMap' => [
        'migration' => [
            'class' => 'bizley\migration\controllers\MigrationController',
        ],
    ],
    // otras configuraciones...
];


¿Dónde se añade esto?
En el archivo console.php de configuración, que es un archivo donde se define un array grande con la configuración, agregarías esta parte dentro del array principal, generalmente así:

  Generar migraciones a partir de la base de datos existente:

Para generar migración de una tabla específica:
  php yii migration/create nombre_tabla

  Para generar migraciones para varias tablas separadas por coma:
  php yii migration/create tabla1,tabla2,tabla3
  
Para generar migraciones para todas las tablas de la base de datos:
  php yii migration/create "*"
{
  "DFIntTaskSchedulerTargetFps": 240,
  "FFlagDebugDisableTextureFiltering": true,
  "DFFlagDebugRenderForceTechnologyVoxel": true,
  "FIntDebugForceMSAASamples": 0,
  "FFlagDisablePostFx": true,
  "FIntRenderShadowIntensity": 0,
  "FFlagDebugSkyGray": true,
  "FFlagDisableShadows": true,
  "FFlagDisableReflectionProbe": true,
  "FIntDebugForcePhysicsThrottle": 1,
  "DFFlagDisableLightInfluence": true,
  "FIntTextureQualityOverride": 0,
  "FFlagDisableWaterReflection": true,
  "FFlagDisableWaterRendering": true,
  "FFlagDisableGlobalShadows": true,
  "FFlagDisableOutdoorAmbient": true
}
{
  "DFIntTaskSchedulerTargetFps": 200,
  "FFlagDebugDisableTextureFiltering": true,
  "DFFlagDebugRenderForceTechnologyVoxel": true,
  "FIntDebugForceMSAASamples": 0,
  "FFlagDisablePostFx": true,
  "FFlagDisableGraphicsQualityOverrides": true
}
For crypto-focused startups, a secure wallet is a non-negotiable part of the infrastructure. Cryptocurrency wallet development enables users to store, send, and receive digital assets with full control and security. Whether you’re launching an exchange, DeFi app, or NFT platform, a custom wallet boosts user trust and engagement. Startups can choose between hot wallets for convenience or cold wallets for added security. A reliable cryptocurrency wallet development company ensures proper encryption, multi-currency support, and compliance with industry standards. Cryptocurrency wallet development is more than storage—it's your gateway to long-term user retention.
Experience the future of decentralized trading with Cross DEX Development by Web5 Nexus. Our advanced solution seamlessly connects multiple decentralized exchanges across different blockchains, enabling users to trade assets effortlessly without switching platforms. With mixes of real-time liquidity, reduced gas fees, and secure smart contracts, We enable your decentralized Finance project to provide a seamless, scalable, and accessible experience. Whether you're launching a new platform or upgrading an existing one, Web5 Nexus ensures your DEX stays ahead with strong architecture, fast transaction speeds, and flawless Web3 integration. Our development services, which include multi-token exchanges and cross-chain asset bridging, are intended to remove troubles and provide countless opportunities in the cryptocurrency space. If you're looking to build the next-generation DEX with interoperability at its core, trust Web5 Nexus to bring your vision to life.

Know more >>> https://crossdex.web5.nexus/

Mail to :  connect@web5.nexus
// -- Plugin check ----------------------------------------------------------------
global proc uvCU_EnsureUnfold3D()
{
    if (!`pluginInfo -q -l "Unfold3D"`) {
        loadPlugin "Unfold3D";
        if (!`pluginInfo -q -l "Unfold3D"`) {
            error "Unfold3D plugin not available. Enable it in Plugin Manager and try again.";
        }
    }
}

// -- Helpers ---------------------------------------------------------------------
global proc string[] uvCU_GetExplicitUVs(string $sel[])
{
    string $uvs[] = `filterExpand -sm 35 -ex 1`;
    if (!size($uvs)) {
        string $uvConv[] = `polyListComponentConversion -toUV $sel`;
        $uvs = `filterExpand -sm 35 -ex 1 $uvConv`;
    }
    return $uvs;
}

// -- Camera planar (from current view) ------------------------------------------
global proc uvCU_PlanarFromCamera()
{
    string $sel[] = `ls -sl`;
    if (!size($sel)) error "Select mesh components or objects to project.";

    string $faces[] = `filterExpand -sm 34 -ex 1`;
    if (!size($faces)) {
        string $toFaces[] = `polyListComponentConversion -toFace $sel`;
        $faces = `filterExpand -sm 34 -ex 1 $toFaces`;
    }
    if (!size($faces)) error "Could not resolve faces from selection.";

    select -r $faces;
    polyProjection -type Planar -md p -constructionHistory 1;

    print "[UV] Camera-based planar projection applied from view.\n";
}

// -- Core: Cut + Unfold ----------------------------------------------------------
// Behavior per toggle:
//  - shellsOnly = 1  => strictly: polyMapCut then u3dUnfold with specific flags; TD is ignored.
//  - shellsOnly = 0  => original behavior: unfold all UVs on owning meshes; TD optional.
global proc uvCU_Run(float $td, int $mapSize, int $doSetTD, int $doShellsOnly)
{
    // Require seam edges
    string $edges[] = `filterExpand -sm 32 -ex 1`;
    if (!size($edges)) error "Select polygon edges (UV seams) first.";

    // Always cut along selected edges first
    select -r $edges;
    polyMapCut;

    if ($doShellsOnly)
    {
        // Edges -> UVs -> full shells (explicit UV selection)
        string $edgeUVs[] = `polyListComponentConversion -fromEdge -toUV $edges`;
        if (!size($edgeUVs)) error "No UVs found from selected seams.";
        select -r $edgeUVs;
        polySelectBorderShell 1;
        string $shellUVs[] = `filterExpand -sm 35 -ex 1`;
        if (!size($shellUVs)) error "Could not resolve UV shells from selected seams.";

        // Always Unfold3D with requested flags; ignore TD in shells-only mode
        uvCU_EnsureUnfold3D();
        select -r $shellUVs;
        // Flags requested: -ite 1 -p 0 -bi 1 -tf 1 -ms 1024 -rs 0
        u3dUnfold -ite 1 -p 0 -bi 1 -tf 1 -ms 1024 -rs 0;

        print "[UV] Cut + Unfold (Shells Only, basic flags) complete.\n";
        return;
    }
    else
    {
        // Original behavior: unfold ALL UVs on the meshes owning the selected edges
        string $owners[] = `ls -o $edges`;
        string $xforms[];
        for ($o in $owners) {
            string $p[] = `listRelatives -p -pa $o`;
            if (size($p)) {
                int $seen = 0; for ($t in $xforms){ if ($t==$p[0]){$seen=1;break;} }
                if (!$seen) $xforms[size($xforms)] = $p[0];
            }
        }

        // Select ALL UVs on those meshes
        select -cl;
        for ($t in $xforms) {
            string $uvs0[] = `polyListComponentConversion -toUV $t`;
            select -add $uvs0;
        }
        string $targetUVs[] = `filterExpand -sm 35 -ex 1`;

        // If still empty, seed projection and retry (rare)
        if (!size($targetUVs)) {
            for ($t in $xforms) {
                select -r $t;
                polyAutoProjection -lm 0 -pb 0 -ibd 1 -cm 0 -l 2 -sc 1 -o 1 -p 6 -ps 0.2 -ch 0;
            }
            select -cl;
            for ($t in $xforms) { string $uvs1[] = `polyListComponentConversion -toUV $t`; select -add $uvs1; }
            $targetUVs = `filterExpand -sm 35 -ex 1`;
            if (!size($targetUVs)) error "Could not resolve UVs.";
        }

        // Unfold3D (default options), optional Texel Density
        uvCU_EnsureUnfold3D();
        select -r $targetUVs;
        u3dUnfold;

        if ($doSetTD) {
            if ($td <= 0.0)  error "Texel Density must be > 0.";
            if ($mapSize <= 0) error "Map Size must be > 0.";
            select -r $targetUVs;
            texSetTexelDensity $td $mapSize;
        }

        print "[UV] Cut + Unfold (All UVs on mesh) complete.\n";
    }
}

// -- Separate: Auto Layout Now ---------------------------------------------------
global proc uvCU_LayoutNow(float $padding)
{
    string $curr[] = `ls -sl`;
    if (!size($curr)) error "Select UVs or mesh components to layout.";

    string $uvs[] = uvCU_GetExplicitUVs($curr);
    if (!size($uvs)) error "Could not resolve UVs from selection.";

    select -r $uvs;
    // padding is in UV units (0..1)
    polyLayoutUV -l 2 -sc 1 -fr 1 -ps $padding -ch 0;

    print ("[UV] Auto Layout done (Pad: " + $padding + ").\n");
}

// -- Checkbox callback: enable/disable TD-related controls -----------------------
global proc uvCU_ToggleTD()
{
    int $state = `checkBox -q -v uvCU_cbTD`;
    control -e -en $state uvCU_tdFld;       // enable/disable TD value
    control -e -en $state uvCU_msFld;       // enable/disable Map Size
    control -e -en $state uvCU_padFld;      // enable/disable UV Padding
    control -e -en $state uvCU_layoutBtn;   // enable/disable Auto Layout Now button
}

// -- Button callback to persist options & run ------------------------------------
global proc uvCU_OnRun()
{
    float $td        = `floatFieldGrp -q -value1 uvCU_tdFld`;
    int   $ms        = `intFieldGrp   -q -value1 uvCU_msFld`;
    int   $doTD      = `checkBox      -q -v      uvCU_cbTD`;
    int   $shellOnly = `checkBox      -q -v      uvCU_cbShells`;

    optionVar -fv "uvCU_texelDensity" $td;
    optionVar -iv "uvCU_mapSize"      $ms;
    optionVar -iv "uvCU_doSetTD"      $doTD;
    optionVar -iv "uvCU_shellsOnly"   $shellOnly;

    uvCU_Run($td, $ms, $doTD, $shellOnly);
}

// -- UI --------------------------------------------------------------------------
global proc uvCU_UI()
{
    string $win = "uvCutUnfoldTDWin";
    if (`window -exists $win`) deleteUI -window $win;

    window -title "ChatGPT X CS UV Tool" -widthHeight 540 400 $win;
    columnLayout -adj true -rs 6;

        // Top: toggles + main actions (both toggles default OFF)
        int   $defShell = 0;
        int   $defDoTD  = 0;

        checkBox      -l "Only shells from selected seams" -v $defShell uvCU_cbShells;
        checkBox      -l "Scale to density after unfold"   -v $defDoTD  -cc "uvCU_ToggleTD()" uvCU_cbTD;

        // Main row
        rowLayout -nc 2 -cw2 180 180 -ct2 "both" "both" -co2 2 2;
            button -label "CameraBased Planar" -c "uvCU_PlanarFromCamera();";
            button -label "Cut + Unfold"       -c "uvCU_OnRun();";
        setParent ..;

        separator -style "in";

        // Bottom: TD/Map/Pad + Layout Now
        float $defTD  = (`optionVar -exists "uvCU_texelDensity"`) ? `optionVar -q "uvCU_texelDensity"` : 8.0;
        int   $defMap = (`optionVar -exists "uvCU_mapSize"`)      ? `optionVar -q "uvCU_mapSize"`      : 2048;
        float $defPad = (`optionVar -exists "uvCU_padding"`)      ? `optionVar -q "uvCU_padding"`      : 0.005;

        floatFieldGrp -label "Texel Density (px/unit)" -numberOfFields 1 -value1 $defTD  uvCU_tdFld;
        intFieldGrp   -label "Map Size (px)"           -numberOfFields 1 -value1 $defMap uvCU_msFld;
        floatFieldGrp -label "UV Padding (0..1)"       -numberOfFields 1 -value1 $defPad uvCU_padFld;

        // Same width as the top row
        rowLayout -nc 1 -cw1 364 -ct1 "both" -co1 2;
            button -label "Auto Layout Now" -c "uvCU_LayoutNow(`floatFieldGrp -q -value1 uvCU_padFld`);" uvCU_layoutBtn;
        setParent ..;

        // Respect initial TD state (defaults OFF)
        control -e -en $defDoTD uvCU_tdFld;
        control -e -en $defDoTD uvCU_msFld;
        control -e -en $defDoTD uvCU_padFld;
        control -e -en $defDoTD uvCU_layoutBtn;

    showWindow $win;
}

// Launch UI
uvCU_UI();
[ExtensionOf(classStr(PurchReqWorkflow))]
final class PurchReqWorkflow_LOC_Finance_Extension
{

    public static void main(Args _args)
    {
        PurchReqWorkflow purchReqWorkflow = PurchReqWorkflow::construct();
        PurchReqTable purchReqTable;
        FormDataSource purchReqTableDS;
        if (_args)
        {
            purchReqTable = _args.record();
            purchReqTableDS = FormDataUtil::getFormDataSource(purchReqTable);
 
            if(purchReqTable)
            {
                if(purchReqTable.ProjectName == "" || purchReqTable.ProjectDuration == ""
                    || purchReqTable.ProjectObjectives == "" || purchReqTable.BusinessImpact == "")
                    throw error("Sorry you can't submit this request, please must be fill Project Description, Project Duration, Project Objectives and Business Impact.");
            }
        }
        next main(_args);
    }
}

// https://khadarmsdax.wordpress.com/2022/08/11/workflow-validation-before-submit-x/
// ===== UV Cut + Unfold (+ Pack / Texel Density / Padding) — Stable MEL (Maya 2026) =====

global proc uvCU_RunPad(float $td, int $mapSize, int $doSetTD, int $doPack, float $padding)
{
    if ($doSetTD && $td <= 0.0)  error "Texel Density must be > 0.";
    if ($doSetTD && $mapSize <= 0) error "Map Size must be > 0.";

    string $edges[] = `filterExpand -sm 32 -ex 1`;
    if (!size($edges)) error "Select polygon edges (UV seams) first.";

    string $owners[] = `ls -o $edges`;
    string $xforms[];
    for ($o in $owners) {
        string $p[] = `listRelatives -p -pa $o`;
        if (size($p)) {
            int $seen = 0; for ($t in $xforms){ if ($t==$p[0]){$seen=1;break;} }
            if (!$seen) $xforms[size($xforms)] = $p[0];
        }
    }

    select -r $edges;
    polyMapCut;

    // Select ALL UVs on those meshes
    select -cl;
    for ($t in $xforms) {
        string $uvs[] = `polyListComponentConversion -toUV $t`;
        select -add $uvs;
    }
    select -r `filterExpand -sm 35 -ex 1`;

    // If no UVs yet, seed a quick projection & reselect UVs
    if (!size(`ls -sl -fl`)) {
        for ($t in $xforms) {
            select -r $t;
            polyAutoProjection -lm 0 -pb 0 -ibd 1 -cm 0 -l 2 -sc 1 -o 1 -p 6 -ps 0.2 -ch 0;
        }
        select -cl;
        for ($t in $xforms) {
            string $uvs2[] = `polyListComponentConversion -toUV $t`;
            select -add $uvs2;
        }
        select -r `filterExpand -sm 35 -ex 1`;
    }

    // Unfold (Unfold3D tool entry)
    u3dUnfold;

    // Optional Texel Density
    if ($doSetTD) {
        texSetTexelDensity $td $mapSize;
    }

    // Optional Pack (padding in UV units 0..1)
    if ($doPack) {
        polyLayoutUV -l 2 -sc 1 -fr 1 -ps $padding -ch 0;
    }

    string $msg = "[UV] Cut + Unfold";
    if ($doSetTD) $msg += " + TD";
    if ($doPack)  $msg += (" + Pack (Padding: " + $padding + ")");
    print ($msg + ".\n");
}

// Camera planar from current view (your requested flags)
global proc uvCU_PlanarFromCamera()
{
    string $sel[] = `ls -sl`;
    if (!size($sel)) error "Select mesh components or objects to project.";

    string $faces[] = `filterExpand -sm 34 -ex 1`;
    if (!size($faces)) {
        string $toFaces[] = `polyListComponentConversion -toFace $sel`;
        $faces = `filterExpand -sm 34 -ex 1 $toFaces`;
    }
    if (!size($faces)) error "Could not resolve faces from selection.";

    select -r $faces;
    polyProjection -type Planar -md p -constructionHistory 1;

    print "[UV] Camera-based planar projection applied from view.\n";
}

// Button callback — query controls by explicit names and run
global proc uvCU_OnRun()
{
    float $td      = `floatFieldGrp -q -value1 uvCU_tdFld`;
    int   $ms      = `intFieldGrp   -q -value1 uvCU_msFld`;
    int   $doTD    = `checkBox      -q -v      uvCU_cbTD`;
    int   $doPack  = `checkBox      -q -v      uvCU_cbPack`;
    float $padding = `floatFieldGrp -q -value1 uvCU_padFld`;

    optionVar -fv "uvCU_texelDensity" $td;
    optionVar -iv "uvCU_mapSize"      $ms;
    optionVar -iv "uvCU_doSetTD"      $doTD;
    optionVar -iv "uvCU_doPack"       $doPack;
    optionVar -fv "uvCU_padding"      $padding;

    uvCU_RunPad($td, $ms, $doTD, $doPack, $padding);
}

// UI — controls are created with fixed names so callbacks never break
global proc uvCU_UI()
{
    string $win = "uvCutUnfoldTDWin";
    if (`window -exists $win`) deleteUI -window $win;

    window -title "ChatGPT X CS UV Tool" -widthHeight 420 300 $win;
    columnLayout -adj true -rs 6;

        float $defTD   = (`optionVar -exists "uvCU_texelDensity"`) ? `optionVar -q "uvCU_texelDensity"` : 8.0;
        int   $defMap  = (`optionVar -exists "uvCU_mapSize"`)      ? `optionVar -q "uvCU_mapSize"`      : 2048;
        int   $defDoTD = (`optionVar -exists "uvCU_doSetTD"`)      ? `optionVar -q "uvCU_doSetTD"`      : 1;
        int   $defPack = (`optionVar -exists "uvCU_doPack"`)       ? `optionVar -q "uvCU_doPack"`       : 1;
        float $defPad  = (`optionVar -exists "uvCU_padding"`)      ? `optionVar -q "uvCU_padding"`      : 0.005;

        // Name each control explicitly (last arg)
        floatFieldGrp -label "Texel Density (px/unit)" -numberOfFields 1 -value1 $defTD  uvCU_tdFld;
        intFieldGrp   -label "Map Size (px)"           -numberOfFields 1 -value1 $defMap uvCU_msFld;
        checkBox      -l "Scale to density after unfold" -v $defDoTD uvCU_cbTD;
        checkBox      -l "Pack after unfold"             -v $defPack uvCU_cbPack;
        floatFieldGrp -label "UV Padding (0..1)"       -numberOfFields 1 -value1 $defPad uvCU_padFld;

        separator -style "in";

        rowLayout -nc 3 -cw3 180 160 60 -ct3 "both" "both" "both" -co3 2 2 2;
            button -label "CameraBased Planar" -c "uvCU_PlanarFromCamera();";
            button -label "Cut + Unfold"       -c "uvCU_OnRun();";
            button -label "Close"               -c ("deleteUI -window " + $win);
        setParent ..;

    showWindow $win;
}

// Launch
uvCU_UI();
In crypto, smart systems beat constant manual effort. Crypto trading bot development gives startups and entrepreneurs a way to automate trading while maintaining full control over strategies. Features like backtesting, real-time alerts, and multi-strategy support make bots versatile tools for any trading style. They also help keep decision-making consistent in volatile markets. A trusted crypto trading bot development company ensures your system is secure, efficient, and adaptable. For founders, a trading bot is both a productivity tool and a growth driver.

string button.send_doc_via_docu_sign()
{
	Ownership_Change_Request_id = "5971686000098845399";
	get_Details = zoho.crm.getRecordById("Ownership_Change_Request",Ownership_Change_Request_id);
	//info get_Details;
	customer_id = get_Details.get("Customer_Name").get("id");
	//info customer_id;
	contact_Details = zoho.crm.getRecordById("Contacts",customer_id);
	//info contact_Details;
	buyer_email = contact_Details.get("Email");
	info buyer_email;
	buyer_name = contact_Details.get("Full_Name");
	info buyer_name;

	// Step 1: Get Attachment from Ownership Change Request
	OCR_attachments = zoho.crm.getRelatedRecords("Attachments","Ownership_Change_Request",Ownership_Change_Request_id);
	if(OCR_attachments.size() > 0)
	{
		firstAttachment = OCR_attachments.get(0);
		attachmentId = firstAttachment.get("id");

		// Step 2: Download the document from CRM
		response1 = invokeurl
		[
			url :"https://www.zohoapis.com/crm/v8/Ownership_Change_Request/" + Ownership_Change_Request_id + "/Attachments/" + attachmentId
			type :GET
			connection:"newzohocrm"
		];

		// Step 3: Convert to Base64
		base64_pdf = zoho.encryption.base64Encode(response1);

		// Step 4: Prepare document map for DocuSign
		doc = Map();
		doc.put("documentBase64",base64_pdf);
		doc.put("name","Sale Purchase Agreement");
		doc.put("fileExtension","docx");
		doc.put("documentId","1");

		// Step 5: Signers' Info
		buyer_email = contact_Details.get("Email");
		buyer_name = contact_Details.get("Full_Name");

		// Joint Buyer
		joint_buyer_name = "Shahzad Joint";
		joint_buyer_email = "muhammad.kaleem@leosops.com";

		// Manager
		manager_name = "Leos";
		manager_email = "m.awais@leosuk.com";

		// ===== SIGNER 1: Buyer =====
		sign_here_buyer = List();
		sign_here_buyer.add({"anchorString":"Signed by Individual Purchaser","anchorUnits":"pixels","anchorXOffset":"170","anchorYOffset":"28"});
		sign_here_buyer.add({"anchorString":"Signed for and on behalf of the Purchaser","anchorUnits":"pixels","anchorXOffset":"175","anchorYOffset":"12"});

		// Initial field
		initial_here_buyer = List();
		initial_here_buyer.add({"anchorString":"Purchaser’s initials","anchorUnits":"pixels","anchorXOffset":"12","anchorYOffset":"-7"});

		// Date Signed field
		date_signed_buyer = List();
		date_signed_buyer.add({"anchorString":"Date signed:","anchorUnits":"pixels","anchorXOffset":"175","anchorYOffset":"10"});

		tabs_buyer = Map();
		tabs_buyer.put("signHereTabs",sign_here_buyer);
		tabs_buyer.put("initialHereTabs",initial_here_buyer);
		tabs_buyer.put("dateSignedTabs",date_signed_buyer);

		signer1 = Map();
		signer1.put("email",buyer_email);
		signer1.put("name",buyer_name);
		signer1.put("recipientId","1");
		signer1.put("routingOrder","1");
		signer1.put("tabs",tabs_buyer);

		// ===== SIGNER 2: Joint Buyer =====
		sign_here_joint = List();
		sign_here_joint.add({"anchorString":"Signed by Joint Individual Purchaser","anchorUnits":"pixels","anchorXOffset":"175","anchorYOffset":"28"});

		initial_here_joint = List();
		initial_here_joint.add({"anchorString":"Initial by Joint Individual Purchaser","anchorUnits":"pixels","anchorXOffset":"175","anchorYOffset":"28"});

		date_signed_joint = List();
		date_signed_joint.add({"anchorString":"Date Signed by Joint Individual Purchaser","anchorUnits":"pixels","anchorXOffset":"175","anchorYOffset":"28"});

		tabs_joint = Map();
		tabs_joint.put("signHereTabs",sign_here_joint);
		tabs_joint.put("initialHereTabs",initial_here_joint);
		tabs_joint.put("dateSignedTabs",date_signed_joint);

		signer2 = Map();
		signer2.put("email",joint_buyer_email);
		signer2.put("name",joint_buyer_name);
		signer2.put("recipientId","2");
		signer2.put("routingOrder","2");
		signer2.put("tabs",tabs_joint);

		// ===== SIGNER 3: Develper =====
		sign_here_manager = List();
		sign_here_manager.add({"anchorString":"Signed for and on behalf of Developer:","anchorUnits":"pixels","anchorXOffset":"175","anchorYOffset":"28"});

		initial_here_manager = List();
		initial_here_manager.add({"anchorString":"Seller’s initials","anchorUnits":"pixels","anchorXOffset":"175","anchorYOffset":"-3"});

		date_signed_manager = List();
		date_signed_manager.add({"anchorString":"Date Signed by Seller","anchorUnits":"pixels","anchorXOffset":"175","anchorYOffset":"28"});

		tabs_manager = Map();
		tabs_manager.put("signHereTabs",sign_here_manager);
		tabs_manager.put("initialHereTabs",initial_here_manager);
		tabs_manager.put("dateSignedTabs",date_signed_manager);

		signer3 = Map();
		signer3.put("email",manager_email);
		signer3.put("name",manager_name);
		signer3.put("recipientId","3");
		signer3.put("routingOrder","3");
		signer3.put("tabs",tabs_manager);

		// Step 6: Recipients map
		recipients = Map();
		recipients.put("signers",{signer1,signer2,signer3});

		// Step 7: Envelope
		envelope = Map();
		envelope.put("documents",{doc});
		envelope.put("emailSubject","Please Sign the Sale Purchase Agreement");
		envelope.put("status","sent");
		envelope.put("recipients",recipients);

		// Step 8: Get DocuSign Access Token from CRM Variable
		access_token_response = invokeurl
		[
			url :"https://www.zohoapis.com/crm/v6/settings/variables/5971686000102746225"
			type :GET
			connection:"newzohocrm"
		];
		access_token = access_token_response.get("variables").get(0).get("value");

		// Step 9: Send envelope via DocuSign
		headers = Map();
		headers.put("Authorization","Bearer " + access_token);
		headers.put("Content-Type","application/json");

		response = invokeurl
		[
			url :"https://demo.docusign.net/restapi/v2.1/accounts/60bf62d5-5696-443e-8b93-74f5da67f9b7/envelopes"
			type :POST
			parameters:envelope.toString()
			headers:headers
		];
		info response;
		envelopeId = response.get("envelopeId");

		update_map = Map();
		update_map.put("Envelope_ID", envelopeId);
		Update_Rec= zoho.crm.updateRecord("Reservation_", Ownership_Change_Request_id, update_map);
	}
	else
	{
		info "No attachments found on Ownership Change Request record.";
	}
	return "";
}
# Circumference of Circle
r = int(input("Enter radius of circle : "))
c = 2*3.14*r
print("Circumference of Circle is : ", c)

# Area of Circle
area = 3.14*r*r
print("Area of Circle is : ", area)
# Perimeter of Rectangle 
l = int(input("Enter length : "))
b = int(input("Enter breadth : "))
perimeter = 2*(l + b)
print("Perimeter of Rectangle is : ", perimeter)

# Are of Rectangle 
area = l*b
print("Area of Rectangle is : ", area)
# Sum of 3 Numbers
x = int(input("Enter 1st no. : "))
y = int(input("Enter 2nd no. : "))
z = int(input("Enter 3rd no. : "))
sum = x+y+z
print("Sum of these nos. is : ", sum)
import pandas as pd
list1=[-10,-20,-30]
ser = pd.Series(list1)
print(ser*2)
Are you ready to kickstart your own dynamic sports wagering platform using a customizable Bet365 clone script that aligns perfectly with your brand identity?Plurance offers an cutting-edge sports betting platform development solution that prioritizes the security of your business and player data.Our Ready-made Bet365 Clone Script includes features like user registration and profile management, diverse betting options, live odds and real-time updates, a secure payment gateway, a robust admin dashboard for streamlined operations, and compatibility across web and mobile platforms to enhance user experience, support, and management.We also offer a free live demo so you can experience the platform before you launch. 

Get in touch with our team today and take the first step toward launching your own betting platform

Book a free demo

Website – https://www.plurance.com/bet365-clone-script

Call/WhatsApp – +918807211181

Telegram – Pluranceteck

For free demo/cost – https://www.plurance.com/contact-us
DROP TABLE team_kingkong.tpap_risk116_breaches;
 
-- CREATE TABLE team_kingkong.tpap_risk116_breaches AS
INSERT INTO team_kingkong.tpap_risk116_breaches
SELECT DISTINCT B.*, C.category, D.txnType, D.txnType1, D.osVersion, D.initiationMode
, IF(D.upi_subtype IS NOT NULL, D.upi_subtype, IF(C.category = 'LITE_MANDATE', 'UPI_LITE_MANDATE', '')) AS upi_subtype
, 'upi_oc141_mcc7995_betting_v3' AS rule_name
, 'Breaches' as breach_reason
FROM
    (SELECT txn_id,
    MAX(CASE WHEN participant_type = 'PAYER' THEN vpa END) AS payer_vpa,
    MAX(CASE WHEN participant_type = 'PAYEE' THEN vpa END) AS payee_vpa,
    MAX(CASE WHEN participant_type = 'PAYEE' THEN mcc END) AS payeeMccCode,
    MAX(DATE(created_on)) as txn_date,
    MAX(amount) AS txn_amount,
    MAX(created_on) AS txn_time
    FROM switch.txn_participants_snapshot_v3
    WHERE DATE(dl_last_updated) BETWEEN DATE'2025-01-01' AND DATE'2025-01-31'
    AND DATE(created_on) BETWEEN DATE'2025-01-01' AND DATE'2025-01-31'
    GROUP BY 1)B
inner join
    (select txn_id, category
    from switch.txn_info_snapshot_v3
    where DATE(dl_last_updated) BETWEEN DATE'2025-01-01' AND DATE'2025-01-31'
    and DATE(created_on) BETWEEN DATE'2025-01-01' AND DATE'2025-01-31'
    and upper(status) = 'SUCCESS'
    AND category = 'VPA2MERCHANT') C
on B.txn_id = C.txn_id
INNER JOIN
    (SELECT txnid
    , regexp_replace(cast(json_extract(request, '$.requestPayload.payerType') AS varchar),'"','') AS payerType
    , regexp_replace(cast(json_extract(request, '$.requestPayload.payeeType') AS varchar),'"','') AS payeeType
    , JSON_EXTRACT_SCALAR(request, '$.requestPayload.initiationMode') AS initiationMode
    , regexp_replace(cast(json_extract(request, '$.evaluationType') as varchar), '"', '') AS upi_subtype
    , regexp_replace(cast(json_extract(request, '$.requestPayload.osVersion') as varchar), '"', '') AS osVersion
    , json_extract_scalar(request, '$.requestPayload.txnType') AS txnType
    , json_extract_scalar(request, '$.requestPayload.txnType1') AS txnType1
    FROM tpap_hss.upi_switchv2_dwh_risk_data_snapshot_v3
    WHERE DATE(dl_last_updated) BETWEEN DATE'2025-01-01' AND DATE'2025-01-31'
    AND json_extract_scalar(response, '$.action_recommended') <> 'BLOCK'
    AND regexp_replace(cast(json_extract(request, '$.evaluationType') as varchar), '"', '') = 'UPI_TRANSACTION'
    )D
ON B.txn_id = D.txnid
WHERE payeeMccCode = '7995'
AND ((LOWER(D.osVersion) LIKE '%android%' AND txnType = 'COLLECT')
OR (D.osVersion LIKE 'iOS%' AND txn_amount > 2000 AND txnType = 'COLLECT')
OR (txnType NOT IN ('PAY', 'DEBIT') AND txnType1 = 'CR' AND initiationMode = '00')
OR (D.initiationMode NOT IN ('00', '04', '05', '10')));     
star

Thu Aug 14 2025 19:13:28 GMT+0000 (Coordinated Universal Time) https://medium.com/@catcatduatiga/php-arrays-like-a-pro-7-powerful-tricks-youll-wish-you-knew-sooner-92e33e836ed1

@agungnb #php

star

Thu Aug 14 2025 19:10:56 GMT+0000 (Coordinated Universal Time) https://medium.com/@catcatduatiga/php-arrays-like-a-pro-7-powerful-tricks-youll-wish-you-knew-sooner-92e33e836ed1

@agungnb #php

star

Thu Aug 14 2025 19:07:59 GMT+0000 (Coordinated Universal Time) https://medium.com/@catcatduatiga/php-arrays-like-a-pro-7-powerful-tricks-youll-wish-you-knew-sooner-92e33e836ed1

@agungnb

star

Thu Aug 14 2025 19:05:29 GMT+0000 (Coordinated Universal Time) https://medium.com/@catcatduatiga/php-arrays-like-a-pro-7-powerful-tricks-youll-wish-you-knew-sooner-92e33e836ed1

@agungnb

star

Thu Aug 14 2025 19:02:58 GMT+0000 (Coordinated Universal Time) https://medium.com/@catcatduatiga/php-arrays-like-a-pro-7-powerful-tricks-youll-wish-you-knew-sooner-92e33e836ed1

@agungnb #php

star

Thu Aug 14 2025 18:45:07 GMT+0000 (Coordinated Universal Time)

@jrg_300i #docker

star

Thu Aug 14 2025 14:05:02 GMT+0000 (Coordinated Universal Time)

@jrg_300i #docker

star

Thu Aug 14 2025 14:00:35 GMT+0000 (Coordinated Universal Time)

@jrg_300i #docker

star

Thu Aug 14 2025 13:46:48 GMT+0000 (Coordinated Universal Time)

@jrg_300i #docker

star

Thu Aug 14 2025 13:16:03 GMT+0000 (Coordinated Universal Time) https://maticz.com/nft-game-development

@Rachelcarlson

star

Thu Aug 14 2025 13:10:31 GMT+0000 (Coordinated Universal Time)

@jrg_300i #php #laravel #docker #compose

star

Thu Aug 14 2025 11:55:03 GMT+0000 (Coordinated Universal Time) https://www.firebeetechnoservices.com/blog/metatrader-clone

@aanaethan ##metatrader ##metatraderclonescript

star

Thu Aug 14 2025 10:47:31 GMT+0000 (Coordinated Universal Time) https://bettoblock.com/casino-game-development-company/

@adelinabutler ##casino ##casinogamedevelopment ##casinogamedevelopers ##casinogame ##casinogamedevelopmentservices

star

Thu Aug 14 2025 05:32:39 GMT+0000 (Coordinated Universal Time) https://www.thecryptoape.com/coinpayments-clone-script

@Davidbrevis #coinpaymentsclone script

star

Thu Aug 14 2025 05:31:45 GMT+0000 (Coordinated Universal Time) https://www.thecryptoape.com/p2p-cryptocurrency-exchange-development

@Davidbrevis #p2pcrypto exchange development

star

Thu Aug 14 2025 05:31:02 GMT+0000 (Coordinated Universal Time) https://www.thecryptoape.com/binance-clone-script

@Davidbrevis #binanceclone script

star

Wed Aug 13 2025 18:16:02 GMT+0000 (Coordinated Universal Time)

@jrg_300i #php #laravel

star

Wed Aug 13 2025 18:14:42 GMT+0000 (Coordinated Universal Time)

@jrg_300i #php #laravel

star

Wed Aug 13 2025 18:10:53 GMT+0000 (Coordinated Universal Time)

@jrg_300i #php #laravel

star

Wed Aug 13 2025 16:46:12 GMT+0000 (Coordinated Universal Time)

@enojiro7

star

Wed Aug 13 2025 13:46:57 GMT+0000 (Coordinated Universal Time)

@jrg_300i #php #laravel

star

Wed Aug 13 2025 13:09:17 GMT+0000 (Coordinated Universal Time) https://www.alwin.io/ai-development-services

@tessa #ai #aidevelopment #aidevelopmentcompany #aidevelopmentservice

star

Wed Aug 13 2025 10:25:12 GMT+0000 (Coordinated Universal Time) https://maticz.com/igaming-software-development

@carolinemax

star

Wed Aug 13 2025 08:33:13 GMT+0000 (Coordinated Universal Time) https://maticz.com/solidity-development-company

@Rachelcarlson

star

Wed Aug 13 2025 07:04:37 GMT+0000 (Coordinated Universal Time) https://webextension.org/listing/always-active.html?version

@Asneedarazali

star

Tue Aug 12 2025 20:02:17 GMT+0000 (Coordinated Universal Time) https://developer.android.com/reference/android/provider/DocumentsProvider

@Asneedarazali

star

Tue Aug 12 2025 16:28:03 GMT+0000 (Coordinated Universal Time)

@jrg_300i #php #laravel

star

Tue Aug 12 2025 16:02:18 GMT+0000 (Coordinated Universal Time)

@jrg_300i #php #laravel

star

Tue Aug 12 2025 16:01:08 GMT+0000 (Coordinated Universal Time)

@jrg_300i #php #laravel

star

Tue Aug 12 2025 16:00:41 GMT+0000 (Coordinated Universal Time)

@jrg_300i #php #laravel

star

Tue Aug 12 2025 16:00:13 GMT+0000 (Coordinated Universal Time)

@jrg_300i #php #laravel

star

Tue Aug 12 2025 15:54:47 GMT+0000 (Coordinated Universal Time)

@jrg_300i #php #laravel

star

Tue Aug 12 2025 15:19:23 GMT+0000 (Coordinated Universal Time)

@jrg_300i #php #laravel

star

Tue Aug 12 2025 15:15:46 GMT+0000 (Coordinated Universal Time)

@jrg_300i #php #laravel

star

Tue Aug 12 2025 15:01:32 GMT+0000 (Coordinated Universal Time)

@enojiro7

star

Tue Aug 12 2025 15:01:06 GMT+0000 (Coordinated Universal Time)

@enojiro7

star

Tue Aug 12 2025 11:07:34 GMT+0000 (Coordinated Universal Time) https://www.opris.exchange/cryptocurrency-wallet-development/

@valentinavalen

star

Tue Aug 12 2025 10:49:27 GMT+0000 (Coordinated Universal Time) https://crossdex.web5.nexus/

@Clarapeters #crossdex #defi #cryptotrading #blockchain #dex

star

Tue Aug 12 2025 10:24:53 GMT+0000 (Coordinated Universal Time)

@enite

star

Tue Aug 12 2025 08:53:16 GMT+0000 (Coordinated Universal Time)

@MinaTimo

star

Tue Aug 12 2025 07:42:24 GMT+0000 (Coordinated Universal Time)

@enite

star

Tue Aug 12 2025 06:08:01 GMT+0000 (Coordinated Universal Time)

@usman13

star

Tue Aug 12 2025 02:44:08 GMT+0000 (Coordinated Universal Time)

@root1024 ##python

star

Tue Aug 12 2025 02:42:04 GMT+0000 (Coordinated Universal Time)

@root1024 ##python

star

Tue Aug 12 2025 02:39:53 GMT+0000 (Coordinated Universal Time)

@root1024 ##python

star

Tue Aug 12 2025 02:12:42 GMT+0000 (Coordinated Universal Time)

@root1024 ##python ##pandas ##dataframe

star

Mon Aug 11 2025 12:05:09 GMT+0000 (Coordinated Universal Time) https://www.plurance.com/bet365-clone-script

@Auroraceleste

star

Mon Aug 11 2025 07:33:40 GMT+0000 (Coordinated Universal Time)

@shubhangi.b

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension