Snippets Collections
function identity<T>(arg: T): T {
    return arg;
}

let output1 = identity<string>("myString");
let output2 = identity<number>(100);
function getFirstElement<T>(arr: T[]) {
    return arr[0];
}

const el = getFirstElement(["neil", "nithin","mukesh"]);
console.log(el.toUpperCase())
function identity<T>(value: T): T {
    return value;
}

// Using the generic function
let result = identity<number>(5); // here, T is replaced with number
console.log(result); // Output: 5

let value = identity<string>("Hello"); // here, T is replaced with string
console.log(value.toUpperCase());
function ReturnType<T>(val: T ): T {
    return val;
}

const elementstring = ReturnType("hello");
console.log(elementstring.toUpperCase())
console.log(typeof(elementstring))

const elementNumber = ReturnType(1254);
console.log(typeof(elementNumber))
eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiNTQ4Y2U1YzM0ZTczNDBjOWE2ZjlmZTIyYjE3ZDllN2U3YTFjZGZmMTE3MDIzNThmMDRiM2MzZjQ0NGUzMzk5ZWFjOTI4N2RlMDUyZTVhMzMiLCJpYXQiOjE3MDc0Njk3MTIuMjE1MTk4LCJuYmYiOjE3MDc0Njk3MTIuMjE1MjAyLCJleHAiOjQ4NjMxNDMzMTIuMjA2NDI1LCJzdWIiOiI0NzY0NyIsInNjb3BlcyI6W119.dyC6c_PQ9N7fm0_vno-YJt42Vft1qkjNp-9-YWm5-NK5dgVNryIP2S5-PqAneU7WQdznyWu_Ii3e5v9h_OhIfejhA5iON5JHYFc5G7SUtq_rUfnHvRhwqbAQ9ATLZFH5OAUsv8Mi_8TRDvxFrhTjVK6q1EDMm9hRNS_dMjawee-HL0E26vBNthpz3Iscw1CUDWcn10ygqYV-BFAYKinZkMc9gvMbMOim1KnYa7T2F2hy443Yme9Lj1tC3m-L-ocdIMdoN4yJHZm62vTQljyIiF6t0YWyJyPAjOxrOg5bH3VdUX_cMNijSRZA5VvxqPjF8z9UIXjtKTRgWomza-4sFe58wnln0CAryHg18rtlwugX46P8cPbrGaqdA195_hHC0NL9O_8L8fP-ntHKd7FFjIIWLPH4ZobBgiBTlyBsjYYTn4bfTZyeW_Ho3jeYDvPGBHkMGkqA406TSwkXpa8nHB_fCYfZf6glY2N1NxSKVFuhNYR-q3RHQY__qepGCZMXaVew4-D8HXyHbgw3oXsL8YjVxV5d2pzc77eIXeD-ctt5M_HTmhzZ2AC4DKsArELqaAPPNpxFCwKe7RY1B5Dnkj-aaYBwXV4U074g7waJI4tjZusZqT_GlxOlrQ2oby0UVLQ9xHp8sAV4sAq1yWD_pSVEREEQjEh6v6E6fyzJoM8
function getFirstElement(arr: (string | number)[]) {
    return arr[0];
}
const firstEle = getFirstElement(["neil", "nithin", "mukesh"]);
firstEle.toUpperCase()
function getFirstElement(arr: (string | number)[]) {
    return arr[0];
}
const firstEle = getFirstElement(["neil", "nithin", "mukesh"]);
console.log(firstEle);
var cls = new ClsCatTutores();
            cls.sps_Usuarios_DESBadge(nivelConsulta = Bit_Admin == true ? 1 : 0, cookie.Id_Usuario);



            viewModel.Id_Usuario = cookie.Id_Usuario;
            viewModel.json_Id_Nivel = JsonConvert.SerializeObject(Id_Nivel);
            viewModel.Bit_Admin = Bit_Admin;
            viewModel.Total_Tutores = cls.DtResult.Rows[2].Field<int>("total");
            viewModel.Total_Asesores = cls.DtResult.Rows[1].Field<int>("total");
            viewModel.Total_Coordinadores = cls.DtResult.Rows[0].Field<int>("total");
            viewModel.Busqueda_Permiso = Busqueda_Permiso;
powershell
New-Snapshot -VM "YourVMName" -Name "Pre-Update Snapshot" -Description "Snapshot before applying critical update."
sql
RESTORE LOG [YourDatabase] FROM DISK = N'/path/to/backup.bak' WITH FILE = 2, NORECOVERY, NOUNLOAD, STATS = 5
sql
BACKUP LOG [YourDatabase] TO DISK = N'/path/to/backup.bak' WITH NOFORMAT, NOINIT, NAME = N'YourDatabase-Transaction Log Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
bash
hdbnsutil -sr_register --name=Secondary --remoteHost=primaryHost --remoteInstance=00 --replicationMode=syncmem
bash
hdbnsutil -sr_enable --name=Primary
bash
aws s3 cp /path/to/hana/backups s3://your-hana-backup-bucket --recursive
bash
hdbsql -u SYSTEM -p YourSystemPassword -i YourInstanceNumber "BACKUP DATA USING BACKINT ('Full_Backup')"
SELECT: Esta cláusula se utiliza para seleccionar las columnas que deseas mostrar en los resultados de la consulta. Puedes asignar un alias a cada columna utilizando la palabra reservada "AS". Por ejemplo:

SELECT columna1 AS alias1, columna2 AS alias2

FROM: En esta cláusula, se especifica la tabla o tablas de donde se obtendrán los datos. Puedes asignar un alias a cada tabla utilizando la palabra reservada "AS". Por ejemplo:

FROM tabla AS alias_tabla

WHERE (opcional): Esta cláusula se utiliza para filtrar los datos según una o varias condiciones. Puedes utilizar alias de columna en las condiciones. Por ejemplo:

WHERE alias_columna = valor

GROUP BY (opcional): Si deseas agrupar los resultados según una o varias columnas, puedes utilizar esta cláusula. Puedes utilizar alias de columna en la cláusula GROUP BY. Por ejemplo:

GROUP BY alias_columna

HAVING (opcional): Esta cláusula se utiliza para filtrar los grupos de datos generados por la cláusula GROUP BY. Puedes utilizar alias de columna en las condiciones. Por ejemplo:

HAVING alias_columna = valor

ORDER BY (opcional): Si deseas ordenar los resultados de la consulta según una o varias columnas, puedes utilizar esta cláusula. Puedes utilizar alias de columna en la cláusula ORDER BY. Por ejemplo:

ORDER BY alias_columna ASC

Espero que esta explicación sea útil para comprender la estructura general de una consulta SQL con los alias y la palabra reservada "AS". Si tienes alguna otra pregunta, no dudes en hacerla.
/*Increase The Default Height Of The Text (HTML) Tab In The Divi Builder*/
.et-db #et-boc .et-l .et-fb-option--tiny-mce .et-fb-tinymce-html-input {
	height: 400px;
}
/**
 * dateUtils
 * Format Date using php's format string.  Date to/From ymd. Get Today's date as ymd or Date, with no time.
 *
 * @type {{todayYMD: (function(): string), ymdToDate: (function(*): Date), is_ymd: ((function(*): boolean)|*), today: (function(): Date), format: ((function((Date|string|number), string=, string=): string)|*), dateToYMD: (function(*): string), dateToDay: (function(*): Date), setLanguage(*): ({shortMonth, shortDay, longMonth, longDay})}}
 */
const dateUtils = {
    version: "2024-02-22",

    dateToDay: function(date){return new Date((new Date(date)).setHours(0, 0, 0, 0) );
    },

    dateToYMD: function date(date) {return this.dateToDay(date).toISOString().split('T')[0];},

    today: function() {return new Date((new Date()).setHours(0, 0, 0, 0) );},

    todayYMD: function() {return this.today().toISOString().split('T')[0];},

    ymdToDate: function(ymd) {return ymd.length === 10 ? this.dateToDay(ymd) : new Date(ymd); },

    is_ymd: function(value, dateOnly = true) {
        if(value === null || !isNaN(value) || typeof value !== 'string')
            return false;
        if(dateOnly) {
            if(value.length !== 10)
                return false;
            const regex = /^\d\d\d\d[-.\\\/_](0[1-9]|1[0-2])[-.\\\/_](0[1-9]|[1-2][0-9]|3[0|1])$/gm;
            return value.match(regex) !== null;
        }
        if(value.length < 10 || value.length > 27)
            return false;
        const regex =
           /^\d\d\d\d[-.\\\/_](0[1-9]|1[0-2])[-.\\\/_](0[1-9]|[1-2][0-9]|3[0|1])($|([ T]([0-1]\d|2[0-4]):[0-5]\d:[0-5]\d))/gm;
        return value.match(regex) !== null;
    },

    /**
     * Formats a date according to the given format string in PHP style
     *
     * @param {Date|string|number} inputDate - The date to be formatted. Can be a Date object, a date string, or a timestamp.
     * @param {string} [formatPhpStyle="d/M/y"] - The format string to be used for formatting the date. Defaults to "d/M/y"
     *  https://www.php.net/manual/en/datetime.format.php.
     * @param {string} [language="en"] - Englinsh en, Spanish es
     * @returns {string} - The formatted date string.
     * @throws {Error} - If an error occurs during the formatting process.
     */
    format: function(inputDate, formatPhpStyle = "d/M/y", language = "en")  {
        let lang = this.setLanguage(language);
        if(inputDate === null)
            return "";
        try {
            function padZero(value) {return value < 10  ? `0${value}` : `${value}`;}
            let date;
            if(inputDate instanceof Date)
                date = inputDate;
            else if(typeof inputDate === 'object')
                return "[object]";
            else if(isNaN(inputDate))
                date = this.is_ymd(inputDate) ?
                    new Date(`${inputDate}T00:00:00`) : new Date(inputDate);
            else
                date = new Date(inputDate);

            const parts = {
                d: padZero(date.getDate()),
                j: date.getDate(),
                D: lang.shortDay[date.getDay()],
                l: lang.longDay[date.getDay()],
                w: date.getDay(),

                m: padZero(date.getMonth() + 1),
                n: date.getMonth() + 1,
                M: lang.shortMonth[date.getMonth()],
                F: lang.longMonth[date.getMonth()],

                Y: date.getFullYear(),
                y: date.getFullYear().toString().slice(-2),

                H: padZero(date.getHours()),
                G: date.getHours(),
                h: padZero(date.getHours() > 12 ? date.getHours() - 12 : date.getHours()),
                g: date.getHours() > 12 ? date.getHours() - 12 : date.getHours(),
                i: padZero(date.getMinutes()),
                s: padZero(date.getSeconds()),

                a: date.getHours() < 12 ? 'am' : 'pm',
                A: date.getHours() < 12 ? 'AM' : 'PM',
            };

            let skip = false;
            let ret = [];
            for(let i = 0, len = formatPhpStyle.length; i < len; ++i) {
                let c = formatPhpStyle[i];
                if(c === "\\") {
                    skip = true;
                    continue;
                }
                if(skip) {
                    skip = false;
                    ret.push(c);
                    continue;
                }
                ret.push(parts.hasOwnProperty(c) ? parts[c] : c);
            }
            return ret.join("");
        } catch(error) {
            console.log("ERROR: fmt.date arguments:", arguments);
            console.log("       fmt.date error:", error);
            return inputDate;
        }
    },

    setLanguage(language) {
        switch(language.toLowerCase()) {
            case 'es':
                return {
                    longMonth: ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto',
                        'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'],
                    shortMonth: ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'],
                    longDay: ['Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado'],
                    shortDay: ['Do', 'Lu', 'Ma', 'Mi', 'Ju', 'Vi', 'Sa'],
                };
            case 'en':
            default:
                return {
                    longMonth: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September',
                        'October', 'November', 'December'],
                    shortMonth: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
                    longDay: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
                    shortDay: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
                };
        }
    },

};
/*gift_slide1_bk_all*/
function gift_slide_bkg_all($gift_slide) {
    $ua = strtolower($_SERVER["HTTP_USER_AGENT"]);
    $isMob = is_numeric(strpos($ua, "mobile"));
    if ($isMob != 'mobile') {
        if ($gift_slide == 'one') { $gift_slide_number = 'slide1_type'; }
        if ($gift_slide == 'two') { $gift_slide_number = 'slide2_type'; }
        if ($gift_slide == 'three') { $gift_slide_number = 'slide3_type'; }
        if ($gift_slide == 'four') { $gift_slide_number = 'slide4_type'; }
        $slidetype = get_field($gift_slide_number, get_the_ID());
        if ($slidetype == 'photo editor') {
            if ($gift_slide == 'one') { $gift_field = 'gift_image'; }
            if ($gift_slide == 'two') { $gift_field = 'gift_image_2'; }
            if ($gift_slide == 'three') { $gift_field = 'gift_image_3'; }
            if ($gift_slide == 'four') { $gift_field = 'gift_image_4'; }
            $img_id = get_field($gift_field, get_the_ID());
            if (!empty($img_id)) {
                $media_url = wp_get_attachment_image_url($img_id, 'full');
                if (!empty($media_url)) {
                    return $media_url;
                }
            }
        } else {
            if ($gift_slide == 'one') { $gift_field = 'gif1'; }
            if ($gift_slide == 'two') { $gift_field = 'gif2'; }
            if ($gift_slide == 'three') { $gift_field = 'gif3'; }
            if ($gift_slide == 'four') { $gift_field = 'gif4'; }
            $media_id = get_field($gift_field, get_the_ID());

            if (!empty($media_id) && is_numeric($media_id)) {
                // Try fetching from the _cloudinary meta field
                $cloudinary_data = get_post_meta($media_id, '_cloudinary', true);
                if (isset($cloudinary_data['_cloudinary_url'])) {
                    $media_url = $cloudinary_data['_cloudinary_url'];
                    // Check if the media URL is from Cloudinary
        if (strpos($media_url, "cloudinary.com") !== false) {
            // Insert transformations for all media types
            $parts = explode('/upload/', $media_url);
            $media_url = $parts[0]. '/upload/f_auto,q_auto,so_2,e_blur:5000/'.$parts[1];
        }
                } else {
                    $media_url = wp_get_attachment_url($media_id);
                }
                $filetype = wp_check_filetype($media_url);
                if ($filetype['ext'] == 'mp4') {
                    if (strpos($media_url, "cloudinary.com") !== false) {
                        $parts = explode('/upload/', $media_url);
                        $transformed_media_url = $parts[0]. '/upload/f_auto,q_auto,so_2,e_blur:5000/'.$parts[1];
                        $transformed_media_url = str_replace(".mp4", ".jpg", $transformed_media_url);
                        return $transformed_media_url;
                    }
                } else {
                    return $media_url;
                }
            }
        }
        if (!empty($media_id) && !is_numeric($media_id)) {
            $media_url = $media_id;
            $filetype = wp_check_filetype($media_id);
            if ($filetype['ext'] == 'mp4') {
                $media_name = basename(get_attached_file($media_id));
                $media_name_jpg = str_replace(".mp4", ".jpg", "$media_name");
                return "https://res.cloudinary.com/drt2tlz1j/video/upload/f_auto,q_auto,so_2,e_blur:5000/fn/$media_name_jpg";
            } else {
                return $media_url;
            }
        }
    }
}
// register shortcode
add_shortcode('gift_slide_bkg_all', 'gift_slide_bkg_all');
Update Your Ubuntu Operating System:
------------------------------------
Step-1  //Install GIT//
sudo apt-get install git
 
Step-2 //Install Python//
sudo apt-get install python3-dev
 
Step-3
sudo apt-get install python3-setuptools python3-pip
 
Step-4 //Install Python Virtual Enviroment//
sudo apt-get install virtualenv
sudo apt install python3.10-venv
 
Step-5 //Install Software Properties Common//
sudo apt-get install software-properties-common

Step-6 // Install MYSQL Server//
sudo apt install mariadb-server
sudo service mariadb start
sudo service mariadb status
sudo mysql_secure_installation
 
Step-7 //Install Other Package//
sudo apt-get install libmysqlclient-dev
---------------------------
 
Step-8 // Setup the Server//
sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf

//--Empty or Clear Completly the CNF File and Copy the bellow Code and Paste it.....//
//Ctrl+s --- To Save file.
//Ctrl+x --- To Exit/Close the file.
=================================================
-------------------------------------------------

[server]
user = mysql
pid-file = /run/mysqld/mysqld.pid
socket = /run/mysqld/mysqld.sock
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
bind-address = 127.0.0.1
query_cache_size = 16M
log_error = /var/log/mysql/error.log


[mysqld]
innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci


[mysql]
default-character-set = utf8mb4

-------------------------------------------------
=================================================
-------------------------------------------------
 
Step-9 //Restart SQL//
sudo service mysql restart
sudo service mariadb restart
 
Step-10 // Install Redis Server//
sudo apt-get install redis-server
 
Step-11 // Install Curl//
sudo apt install curl 
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.profile

Step-12
// Install Node//
nvm install 18
nvm install 20
nvm install 21

Step-13 // Install NPM//
sudo apt-get install npm

Step-14 // Install Yarn//
sudo npm install -g yarn (if error than install followning command)
npm install -g npm@latest
npm install -g yarn


Step-15 // Install PDF//
sudo apt-get install xvfb libfontconfig wkhtmltopdf
 
Step-16 // Install Frappe-Bench//
sudo -H pip3 install frappe-bench
bench --version

Step-17 // Initialize/Install Frappe-Bench//
sudo pip install --upgrade pip
//bench init frappe-bench --frappe-branch version-15 --python /usr/bin/python3.10

------------------------------------------
bench init frappe-bench --frappe-branch version-15
or
bench init frappe-bench
or (For Beta Installation)
bench init frappe-bench --frappe-branch version-15-beta
-------------------------------------------
  
cd frappe-bench/
bench start
 
Step-18 // create a site in frappe bench//
bench new-site site1.local
bench use site1.local
 
Step-19 //Install Payment Module//
bench get-app payments
bench --site site1.local install-app payments

Step-20 //Download ERPNExt//
bench get-app erpnext --branch version-15
or (For Beta Installation)
bench get-app erpnext --branch version-15-beta
//---OR----//
bench get-app https://github.com/frappe/erpnext --branch version-15
bench get-app https://github.com/frappe/erpnext --branch version-15-beta

Step-21 //Install ERPNExt//
bench --site site1.local install-app erpnext

Step-22 //BENCH START//
bench start
-------------------------------------------------
-------------------------------------------------
  
INSTALL HRMS
-------------
Step-22 //Download & Install HRMS //
To Install the Latest Version:
Latest Vesion is Version-16.xxx
bench get-app hrms
or
To Install Version-15
bench get-app hrms --branch version-15
bench --site site1.local install-app hrms
-----------------------------------------

INSTALL LOAN / LENDING
----------------------
Step-23 //Download Lending/Loan App//
bench get-app lending
bench --site site1.local install-app lending
--------------------------------------------
// IF ERROR AFTER HRM INSTALLATION//
bench update --reset

//IF ERROR Updating...//
//Disable maintenance mode
bench --site site1.local set-maintenance-mode off


INSTALL EDUCATION MODULE
------------------------
Step-24 //Install Education Module//
bench get-app education
bench --site site1.local install-app education
----------------------------------------------

INSTALL CHAT APP
---------------
Step-25
bench get-app chat
bench --site site1.local install-app chat
-----------------------------------------

INSTALL Print Designer
----------------------
//Please note that print designer is only compatible with develop and V15 version.//
bench start
bench new-site print-designer.test
bench --site print-designer.test add-to-hosts
bench get-app https://github.com/frappe/print_designer
bench --site print-designer.test install-app print_designer
-------
http://print-designer.test:8000/
http://print-designer.test:8000/app/print-designer/

-----------------------
INSTALL INSIGHTS
----------------
bench start
bench new-site insights.test
bench --site insights.test add-to-hosts
bench get-app https://github.com/frappe/insights
bench --site insights.test install-app insights
-------
http://insights.test:8000/insights
-----------------------------------------------

// IF ERROR//
bench update --reset

Step
//Disable maintenance mode
bench --site site1.local set-maintenance-mode off
_________________________________________________

//WARN: restart failed: couldnot find supervisorctl in PATH//

sudo apt-get install supervisor
sudo nano /etc/supervisor/supervisord.conf

     [inet_http_server]
     port = 127.0.0.1:9001
     username = your_username
     password = your_password

sudo nano /etc/supervisor/supervisord.conf


[program:supervisord]
command=/usr/bin/supervisord -c /etc/supervisor/supervisord.conf
autostart=true
autorestart=true
redirect_stderr=true
environment=PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/path/to/your/virtualenv/bin"

sudo service supervisor restart

//Check Supervisor Status://
sudo service supervisor status
sudo service supervisor start
which supervisorctl

//Check Permissions://
sudo usermod -aG sudo your_username
supervisorctl status

//Activate Virtual Environment//
source /path/to/your/virtualenv/bin/activate

//supervisorctl status//
sudo supervisorctl status

cd ~/frappe-bench
bench restart
import $ from 'jquery';

if ($('.content-block').length > 0) {
	$('.content-block').attr({
		'data-aos': 'fade-up',
		'data-aos-once': true,
		'data-aos-delay': 200,
	});

	$('.content-block .wp-block-columns .wp-block-column:first-child').attr({
		'data-aos': 'fade-right',
		'data-aos-once': true,
		'data-aos-delay': 200,
		'data-aos-easing': 'ease-in-sine',
	});

	$('.content-block .wp-block-columns .wp-block-column:last-child').attr({
		'data-aos': 'fade-left',
		'data-aos-once': true,
		'data-aos-delay': 200,
		'data-aos-easing': 'ease-in-sine',
	});
}

if ($('.choose-us').length > 0) {
	$('.choose-us').attr({
		'data-aos': 'fade-up',
		'data-aos-once': true,
		'data-aos-delay': 200,
	});

	$('.choose-us .wp-block-columns .wp-block-column:first-child').attr({
		'data-aos': 'fade-right',
		'data-aos-once': true,
		'data-aos-delay': 200,
		'data-aos-easing': 'ease-in-sine',
	});

	$('.choose-us .wp-block-columns .wp-block-column:last-child').attr({
		'data-aos': 'fade-left',
		'data-aos-once': true,
		'data-aos-delay': 200,
		'data-aos-easing': 'ease-in-sine',
	});
}

if ($('.process').length > 0) {
	$('.process').attr({
		'data-aos': 'fade-up',
		'data-aos-once': true,
		'data-aos-delay': 200,
	});
}

if ($('.cta').length > 0) {
	$('.cta').attr({
		'data-aos': 'fade-up',
		'data-aos-once': true,
		'data-aos-delay': 200,
	});
}

if ($('.contact-form').length > 0) {
	$('.contact-form .wp-block-columns .wp-block-column:first-child').attr({
		'data-aos': 'fade-right',
		'data-aos-once': true,
		'data-aos-delay': 200,
		'data-aos-easing': 'ease-in-sine',
	});

	$('.contact-form .wp-block-columns .wp-block-column:last-child').attr({
		'data-aos': 'fade-left',
		'data-aos-once': true,
		'data-aos-delay': 200,
		'data-aos-easing': 'ease-in-sine',
	});
}

if ($('.accordion').length > 0) {
	$('.accordion').attr({
		'data-aos': 'fade-up',
		'data-aos-once': true,
		'data-aos-delay': 200,
	});

	$('.accordion .wp-block-columns .wp-block-column:first-child').attr({
		'data-aos': 'fade-in',
		'data-aos-once': true,
		'data-aos-delay': 200,
		'data-aos-duration': '2000',
	});

	$('.accordion .wp-block-columns .wp-block-column:last-child').attr({
		'data-aos': 'fade-in',
		'data-aos-once': true,
		'data-aos-delay': 200,
		'data-aos-duration': '2000',
	});
}

if ($('.professional-services').length > 0) {
	$(
		'.professional-services .wp-block-columns .wp-block-column:first-child',
	).attr({
		'data-aos': 'fade-right',
		'data-aos-once': true,
		'data-aos-delay': 200,
		'data-aos-easing': 'ease-in-sine',
	});

	$('.professional-services .wp-block-columns .wp-block-column:last-child').attr(
		{
			'data-aos': 'fade-left',
			'data-aos-once': true,
			'data-aos-delay': 200,
			'data-aos-easing': 'ease-in-sine',
		},
	);
}

if ($('.image-text').length > 0) {
	$('.image-text').attr({
		'data-aos': 'fade-up',
		'data-aos-once': true,
		'data-aos-delay': 200,
	});

	$('.image-text .wp-block-columns .wp-block-column:first-child').attr({
		'data-aos': 'fade-right',
		'data-aos-once': true,
		'data-aos-delay': 200,
		'data-aos-easing': 'ease-in-sine',
	});

	$('.image-text .wp-block-columns .wp-block-column:last-child').attr({
		'data-aos': 'fade-left',
		'data-aos-once': true,
		'data-aos-delay': 200,
		'data-aos-easing': 'ease-in-sine',
	});
}
if ($('.expertise').length > 0) {
	$('.expertise').attr({
		'data-aos': 'fade-up',
		'data-aos-once': true,
		'data-aos-delay': 200,
	});
}
wp.domReady(function () {
	wp.blocks.registerBlockStyle('core/button', {
		name: 'link-btn',
		label: 'Link Btn',
	});
});
import $ from 'jquery';
import '../../node_modules/waypoints/lib/jquery.waypoints';

class StatisticsOne {
	constructor(element) {
		this.$element = $(element);
		this.$counter = this.$element.find('.counter__count');
		this.init();
	}

	init() {
		this.$counter.each((index, element) => {
			let $this = $(element);
			let countTo = $this.attr('data-count');

			$this.waypoint({
				handler: function (direction) {
					$({ countNum: $this.text() }).animate(
						{
							countNum: countTo,
						},
						{
							duration: 3000,
							easing: 'linear',
							step: function () {
								$this.text(Math.floor(this.countNum));
							},
							complete: function () {
								$this.text(
									Math.abs(this.countNum) > 999
										? Math.sign(this.countNum) *
												(Math.abs(this.countNum) / 1000).toFixed(1) +
												'K+'
										: Math.sign(this.countNum) * Math.abs(this.countNum) + '+',
								);
								Waypoint.destroyAll();
							},
						},
					);
				},
				offset: '90%',
			});
		});
	}
}

$('[data-statistics-one]').each((index, element) => new StatisticsOne(element));
$('.search-tab__tabs li:first-child').addClass('active');
		$('.search-tab__content').hide();
		$('.search-tab__content:first').show();

		$('.search-tab__tabs li').click(function () {
			$('.search-tab__tabs li').removeClass('active');
			$(this).addClass('active');
			$('.search-tab__content').hide();

			var activeTab = $(this).find('a').attr('href');
			$(activeTab).fadeIn(700);
			return false;
		});
$('.faq__tab:first').addClass('active');
		$('.faq__tab').click(function (e) {
			e.preventDefault();
			$('.faq__tab').not(this).removeClass('active');
			$('.faq__content').not($(this).next()).slideUp();
			$(this).toggleClass('active');
			$(this).find('.icon').toggleClass('icon-up icon-down');
			$(this).next().slideToggle();
		});
function scrollBanner() {
      jQuery(document).on('scroll', function(){
      var scrollPos = jQuery(this).scrollTop();
        jQuery('.home_banner').css({
          'top' : (scrollPos/4)+'px',
        });
      });    
      }
scrollBanner(); 


// With out function


jQuery(document).ready(function(){
	
	jQuery(window).on('scroll', function(){
		var scrollTop = jQuery(window).scrollTop();
		jQuery('.home_banner').css({'top': (scrollTop/4) +'px'});
		
	});
});
jQuery('img').each(function($){
            var $img = jQuery(this);
            var imgID = $img.attr('id');
            var imgClass = $img.attr('class');
            var imgURL = $img.attr('src');

            jQuery.get(imgURL, function(data) {
                // Get the SVG tag, ignore the rest
                var $svg = jQuery(data).find('svg');

                // Add replaced image's ID to the new SVG
                if(typeof imgID !== 'undefined') {
                    $svg = $svg.attr('id', imgID);
                }
                // Add replaced image's classes to the new SVG
                if(typeof imgClass !== 'undefined') {
                    $svg = $svg.attr('class', imgClass+' replaced-svg');
                }

                // Remove any invalid XML tags as per http://validator.w3.org
                $svg = $svg.removeAttr('xmlns:a');

                // Replace image with new SVG
                $img.replaceWith($svg);

            }, 'xml');

        });
/**
 * Filters the next, previous and submit buttons.
 * Replaces the form's <input> buttons with <button> while maintaining attributes from original <input>.
 *
 * @param string $button Contains the <input> tag to be filtered.
 * @param object $form Contains all the properties of the current form.
 *
 * @return string The filtered button.
 */
add_filter('gform_submit_button', 'input_to_button', 10, 2);
function input_to_button($button, $form)
{
  $dom = new DOMDocument();
  $dom->loadHTML('<?xml encoding="utf-8" ?>' . $button);
  $input = $dom->getElementsByTagName('input')->item(0);
  $new_button = $dom->createElement('button');
  $new_button->appendChild($dom->createTextNode($input->getAttribute('value')));
  $input->removeAttribute('value');
  foreach ($input->attributes as $attribute) {
    $new_button->setAttribute($attribute->name, $attribute->value);
  }

  $classes = $new_button->getAttribute('class');
  $classes .= " btn is-style-with-arrow";
  $new_button->setAttribute('class', $classes);
  $input->parentNode->replaceChild($new_button, $input);

  return $dom->saveHtml($new_button);
}
/**
 * Attach icon class to the menu title
 *
 * @param $sorted_menu_items
 * @param $args
 * @return mixed
 */
function wti_add_arrow_to_parent_menu_item($sorted_menu_items, $args)
{
	foreach ($sorted_menu_items as $menu_item) {
		if (array_search('menu-item-has-children', $menu_item->classes) != FALSE) {
			$menu_item->title = $menu_item->title . '<svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
				<path d="M19.9201 9.44995L13.4001 15.97C12.6301 16.74 11.3701 16.74 10.6001 15.97L4.08008 9.44995" stroke="#fff" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
				</svg>';
		}
	}

	return $sorted_menu_items;
}
// Dropdown arrows to parent menu items
add_filter('wp_nav_menu_objects', 'wti_add_arrow_to_parent_menu_item', 10, 2);
import $ from 'jquery';

class Header {
	constructor(element) {
		this.$element = $(element);
		this.$burger = this.$element.find('.header__burger');
		this.$Nav = this.$element.find('.nav-main');
		this.$hasSub = this.$element.find('.menu-item-has-children');
		this.$menuArrow = this.$element.find('i.fa-angle-down');
		this.$menuBg = this.$element.find('.header__menu-bg');
		this.init();
	}

	dropDown() {
		let winW = $(window).width();
		if (winW < 991) {
			if (
				this.$element.find('.menu-item-has-children .fa-angle-down').length == 0
			) {
				this.$hasSub.prepend('<i class="fa fa-angle-down"></i>');
			}
		} else {
			this.$hasSub.children('.fa-angle-down').remove();
		}
	}

	init() {
		$(document).ready(() => {
			this.dropDown();
		});

		$(document).on(
			'click',
			'.menu-item-has-children .fa-angle-down',
			function () {
				$(this).parent().toggleClass('active');
				$(this).parent().children('a:first').toggleClass('active');
			},
		);

		$(window).resize(() => {
			this.dropDown();
		});

		$(window).scroll(function () {
			if ($(window).scrollTop() > 50) {
				$('.header').addClass('sticky');
			} else {
				$('.header').removeClass('sticky');
			}
		});

		this.$burger.click((e) => {
			e.preventDefault();
			if ($(e.currentTarget).hasClass('opened')) {
				$(e.currentTarget).removeClass('opened').attr('aria-expanded', 'false');
				this.$Nav.slideUp(300).parent().removeClass('active');
			} else {
				$(e.currentTarget).addClass('opened').attr('aria-expanded', 'true');
				this.$Nav.slideDown(300).parent().addClass('active');
			}
		});

		this.$menuBg.click((e) => {
			e.preventDefault();
			this.$burger.removeClass('opened').attr('aria-expanded', 'false');
			this.$Nav.slideUp(300).parent().removeClass('active');
		});

		$(document).on('click', '.fa-angle-down', function (e) {
			e.preventDefault();
			if ($(this).hasClass('active')) {
				$(this).removeClass('active');
				$(this).parent('li').children('.sub-menu').removeClass('active');
			} else {
				$(this).addClass('active');
				$(this).parent('li').children('.sub-menu').addClass('active');
			}
		});
	}
}

$('[data-header]').each((index, element) => new Header(element));
jQuery(document).on('click', '#loadMore', function () {
        jQuery('#loading-image').show();
        jQuery(document).find('#load-data').addClass('show-overlay');
        var cat_name = jQuery('.slider-feature-section').find('.current-cat').attr('data-slug');
        data_page = jQuery(this).attr('data_page');
        jQuery(this).parents('.show-more').remove();
        jQuery.ajax({
            type: "post",
            url: TOPNZCASINOPUBLIC.ajaxurl,
            data: {
                action: "load_more",
                page: data_page,
                cat_name: cat_name
            },
            success: function (response) {
                jQuery("#load-data").append(response);
                jQuery('#loading-image').hide();
                jQuery(document).find('#load-data').removeClass('show-overlay');
            }
        });
    });
module.exports = {
  content: ['./src/**/*.{html,js,tsx}', './components/**/*.{js,ts,jsx,tsx}'],
  theme: {
    extend: {
      colors: {
        primaryColor: '#E17446',
        primaryColorHover: '#db5b24',
        primaryText: '#111130',
        primaryBlue: '#2b5a9c',
        textLight: '#9e9ebc',
        Gray: '#8f9bad',
        f6f9fd: '#f6f9fd',
        dddddd: '#dddddd',
        inputborder: '#e8e8e8',
        borderColor: '#ebebeb',
        green: '#008f02',
        lightGreen: '#e2f2e2',
        orange: '#f05c00',
        orangeLight: '#fcede4',
        redLight: '#fde5e5',
        red: '#f00000',
        border1: '#ebebeb',

        themecolor: '#E17446',
        hoverthemecolor: '#db5b24',
      },
      backgroundImage: {
        close: 'url(/public/images/colse.png)',
        trendBG1: 'url(../../public/images/blog-img.jpg)',
      },
      boxShadow: {
        inputFocus:
          'rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px',
        headerFix: 'rgba(0, 0, 0, 0.1) 0px 10px 50px',
        sibarToggle: '-4px 5px 5px #0000000d',
        sibarToggleRTL: '5px -4px 6px #0000000d',
      },
      spacing: {
        '5px': '5px',
        '10px': '10px',
        '14px': '14px',
        '15px': '15px',
        '18px': '18px',
        '20px': '20px',
        '25px': '25px',
        '30px': '30px',
        '35px': '35px',
        '40px': '40px',
        '45px': '45px',
        '50px': '50px',
        '55px': '55px',
        '60px': '60px',
        '65px': '65px',
        '70px': '70px',
        '75px': '75px',
        '80px': '80px',
        '85px': '85px',
        '90px': '90px',
        '95px': '95px',
        '100px': '100px',
        '106px': '106px',
        '120px': '120px',
        unset: 'unset',
      },
      fontFamily: {
        charter: 'var(--charterFont)',
        sohne: 'var(--sohneFont)',
        poppins: 'var(--poppins)',
        gloock: 'var(--gloock)',
      },
      fontSize: {
        0: '0',
        '5px': '5px',
        '10px': '10px',
        '14px': '14px',
        '15px': '15px',
        '16px': '16px',
        '17px': '17px',
        '20px': '20px',
        '22px': '22px',
        '25px': '25px',
        '28px': '28px',
        '30px': '30px',
        '35px': '35px',
        '40px': '40px',
        '45px': '45px',
        '50px': '50px',
        '55px': '55px',
        '60px': '60px',
        '65px': '65px',
        '70px': '70px',
        '75px': '75px',
        '80px': '80px',
        '85px': '85px',
        '90px': '90px',
        '95px': '95px',
        '100px': '100px',
        unset: 'unset',
      },
      lineHeight: {
        1: '1',
        '5px': '5px',
        '10x': '10px',
        '15px': '15px',
        '19px': '19px',
        '22px': '22px',
        '20px': '20px',
        '25px': '25px',
        '28px': '28px',
        '30px': '30px',
        '32px': '32px',
        '35px': '35px',
        '36px': '36px',
        '40px': '40px',
        '42px': '42px',
        '46px': '46px',
        '45px': '45px',
        '50px': '50px',
        '52px': '52px',
        '55px': '55px',
        '60px': '60px',
        '65px': '65px',
        '70px': '70px',
        '75px': '75px',
        '80px': '80px',
        '85px': '85px',
        '90px': '90px',
        '95px': '95px',
        '100px': '100px',
        unset: 'unset',
        Normal: 'normal',
      },
      zIndex: {
        1: '9',
        2: '99',
        3: '999',
        4: '9999',
        5: '99999',
        6: '999999',
      },
      borderRadius: {
        '5px': '5px',
        '10px': '10px',
        '15px': '15px',
      },
      screens: {
        768: '768px',
        992: '992px',
        1200: '1200px',
        1300: '1300px',
        1400: '1400px',
        1500: '1500px',
        1600: '1600px',
        1700: '1700px',
      },
      animation: {
        slow: 'wiggle 2s linear',
      },
      keyframes: {
        wiggle: {
          '0%': { transform: 'transform(164.25px)' },
          '100%': { transform: 'rotate(0px)' },
        },
      },
    },
  },
}
/* Remove WooCommerce block styles */
function ya_remove_block_css() {
    wp_dequeue_style( 'wc-block-style' ); // WooCommerce
}
add_action('wp_enqueue_scripts','ya_remove_block_css', 100);
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException
import pandas as pd
import time

web = 'https://twitter.com/'
path = r"C:\Drivers\chromedriver-win64\chromedriver.exe"
options = webdriver.ChromeOptions()
service = Service(executable_path=path)
options.add_experimental_option("detach", True)
options.add_argument('window-size=1920x1080')

driver = webdriver.Chrome(service=service, options=options)
driver.get(web)  # Open the webpage

# Wait for the login button to be clickable
login_button = WebDriverWait(driver, 10).until(
    EC.element_to_be_clickable((By.XPATH, '//a[contains(@href, "/login")]'))
)
login_button.click()
time.sleep(2)

# Wait for the username input field to be visible and then enter username
user_name = WebDriverWait(driver, 10).until(
    EC.visibility_of_element_located((By.XPATH, '//input[contains(@autocomplete, "username")]'))
)
user_name.send_keys("mnis00014@gmail.com")

# Wait for the next button to be clickable and then click
next_button = WebDriverWait(driver, 10).until(
    EC.element_to_be_clickable((By.XPATH, '//div[contains(@role, "button")]//span[text()="Next"]'))
)
next_button.click()

time.sleep(2)

# Wait for the password input field to be visible and then enter password
password = WebDriverWait(driver, 10).until(
    EC.visibility_of_element_located((By.XPATH, '//input[contains(@autocomplete, "current-password")]'))
)
password.send_keys("Tw@mnis@2024")

# Wait for the login button to be clickable and then click
login_button = WebDriverWait(driver, 10).until(
    EC.element_to_be_clickable((By.XPATH, '//div[contains(@role, "button")]//span[text()="Log in"]'))
)
login_button.click()

# closing driver
# driver.quit()
#include <stdio.h>

int main()
{
    int q[5], average, total;
    
    printf("Enter 5 quiz scores:");
    for (int i=0; i<=4; i++)
    {
      scanf("%d", &q[i]);  
      total= total+q[i];
    }
    
    
    
    average=total/5;
    
    
    printf("The average is %d", average);
    return 0;
}
from netCDF4 import Dataset
import netCDF4 as nc
import numpy as np
import xarray as xr
from wrf import getvar, vinterp, ALL_TIMES
import os
from datetime import datetime
import dask
from dask.distributed import Client

client = Client(n_workers=16)
@dask.delayed
def WriteSurfVariables(inputDir,outDir,file):
    inputnc=Dataset(inputDir+"/"+file)
    varlist=['slp','T2','td2','uvmet10','Q2','PSFC','RAINC','RAINNC','SWDOWN','GLW','HFX',
        'LH','OLR','SNOW','SST','QFX']
    for var in varlist:
        outvar=getvar(inputnc,var,timeidx=ALL_TIMES)
        del outvar.attrs['projection']
        outvar.to_netcdf(outDir+var+"_"+file) 
#n_worker=16
now = datetime.now() 
print(now) 
#results2d = []
results3d = []
inputDir="/blue/dhingmire/Prod_Outputs/ERA5/1981/d2"
outDir="/blue/dhingmire/Processed_data/ERA5/testDir/"
for file in os.listdir(inputDir):
    
    results3d.append(WriteSurfVariables(inputDir,outDir,file))
    #results3d.append(Write3DVariables(inputDir,outDir,file))

#dask.compute(results2d)
dask.compute(results3d)

    
now = datetime.now()
print("now =", now)
import xarray as xr
import numpy as np
from typing import *
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
#import proplot as pplt
import datetime as dt
import warnings
warnings.filterwarnings('ignore')
import os
import sys
import geocat.comp.interpolation
import dask


from dask.diagnostics import ProgressBar
from datetime import datetime

from dask.distributed import Client, LocalCluster
cluster = LocalCluster()
client = Client(cluster)

import warnings
warnings.filterwarnings("ignore")

client

def func(obj, ps,hyam,hybm,orog):
    p0Con=100000.0
    newLevs=np.array([100000., 97500., 95000., 92500., 90000., 87500., 85000., 82500., 80000.,
               77500., 75000., 70000., 65000., 60000., 55000., 50000., 45000., 40000.,
               35000., 30000., 25000., 22500., 20000., 17500., 15000., 12500., 10000.,
               7000., 5000., 3000., 2000., 1000., 700., 500., 300., 200., 100.], dtype=float)
    ta_new=geocat.comp.interpolation.interp_hybrid_to_pressure(obj[:,:,:,:], ps[:,:,:], hyam,
                    hybm, p0=p0Con, new_levels=newLevs,
                    lev_dim='lev', method='linear', extrapolate=True, variable='temperature',
                                                           t_bot=obj[:,0,:,:], phi_sfc=orog)
    return ta_new
OroDir='/blue/dhingmire/scripts/regridCMIP6ToERA5/vertical_interp/'
### constants
p0Con=100000.0
newLevs=np.array([100000., 97500., 95000., 92500., 90000., 87500., 85000., 82500., 80000.,
               77500., 75000., 70000., 65000., 60000., 55000., 50000., 45000., 40000.,
               35000., 30000., 25000., 22500., 20000., 17500., 15000., 12500., 10000.,
               7000., 5000., 3000., 2000., 1000., 700., 500., 300., 200., 100.], dtype=float)
#newLevs
inOroF=xr.open_dataset(OroDir+'orog_fx_CESM2_historical_r11i1p1f1_gn.nc')
orog=inOroF.orog*9.80616
#orog.plot()
InDir='/blue/dhingmire/CMIP6_WRFIn/CESM2/historical/ta/'
OutDir='/blue/dhingmire/CMIP6_WRFIn/CESM2/historical/remapped/ta/'

p0Con=100000.0
newLevs=np.array([100000., 97500., 95000., 92500., 90000., 87500., 85000., 82500., 80000.,
               77500., 75000., 70000., 65000., 60000., 55000., 50000., 45000., 40000.,
               35000., 30000., 25000., 22500., 20000., 17500., 15000., 12500., 10000.,
               7000., 5000., 3000., 2000., 1000., 700., 500., 300., 200., 100.], dtype=float)


outfiles=os.listdir(OutDir)
for file in os.listdir(InDir):
    print(file)

    inTemp=xr.open_dataset(InDir+file)

    ps=inTemp.ps
    hyam=inTemp.a
    hybm=inTemp.b
    ta=inTemp.ta

    ta_ref=geocat.comp.interpolation.interp_hybrid_to_pressure(ta[0,:,:,:], ps[0,:,:], hyam,
                    hybm, p0=p0Con, new_levels=newLevs,
                    lev_dim='lev', method='linear', extrapolate=True, variable='temperature',
                                                           t_bot=ta[0,0,:,:], phi_sfc=orog)
    chunk=10
    for t in np.unique(inTemp.time.dt.year.values):
        year=str(t)
        print(year)
        startDate=year+'-01-01'
        endDate=year+'-12-31'
        outF=OutDir+'ta_6hrPlev_'+year+'.nc'
        outFname='ta_6hrPlev_'+year+'.nc'
        
        if(not outFname in (outfiles)): 
        
            taIn=ta.sel(time=slice(startDate,endDate)).chunk({'lat': -1, 'lon': -1, 'time': chunk, 'lev':-1})
            psIn=ps.sel(time=slice(startDate,endDate)).chunk({'lat': -1, 'lon':-1, 'time': chunk})
            ta_Sample=ta_ref.expand_dims(dim={"time": ta.sel(time=slice(startDate,endDate)).time}).chunk({'lat': -1, 'lon': -1, 'time': chunk, 'plev':-1})


            mapped = taIn.map_blocks(func, args=[ psIn, hyam, hybm, orog],template=ta_Sample)
            ta_=mapped.persist()
            fb=ta_.chunk(time=100)
            fb.to_netcdf(outF)
            del(mapped)
            del(ta_)
            del(fb)
class TLoadComplete{
    constructor( callbackFunc, frequency ){
        this.callback = callbackFunc || (()=>{ console.log("completed")});
        this.frequency = frequency || 500;
    }
 
    start(){
        if (this.started) return;
        this.started = true;
        let me = this;
        this.images = [...document.images];
        this.interval = setInterval(()=>{
            let result = me.images.filter(el => !el.complete).length == 0 && document.fonts.ready;
            if (result) {
                me.callback();
                console.log("completed");
                me.stop();
            }
        }, me.frequency)
    }
 
    stop(){
        clearTimeout(this.interval);
        this.started = false;
    }
}
<link rel='preconnect' href='https://fonts.gstatic.com' crossorigin>
<link rel='preload' as='style' href='https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap'>
<link rel='stylesheet' href='https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap'>
.et_header_style_left #et-top-navigation nav > ul > li > a,
.et_header_style_left .et-fixed-header #et-top-navigation nav > ul > li > a {
 padding-bottom: 15px;
}
#top-menu li {
 padding-right: 5px;
}
#et-top-navigation {
 padding: 20px 0 !important;
}
#top-menu li a {
 background: #C1B2AB; /*** CHANGES THE BACKGROUND COLOR ***/
 padding: 15px 20px;
 border-radius: 3px;
}
#top-menu li a:hover,
#top-menu li li a:hover {
 color: #fff !important;
}
#top-menu li a:hover {
 background: #559CAD !important; /*** CHANGES THE BACKGROUND COLOR ON HOVER ***/
}
#top-menu li.current-menu-item > a {
 background: #edc77b; /*** CHANGES THE BACKGROUND COLOR OF THE CURRENT PAGE LINK ***/
}
#top-menu .menu-item-has-children > a:first-child:after {
 content: none;
}
#top-menu li > a:hover {
 box-shadow: 0 10px 0 0 #F15A29 !important; /*** COLOR AND THICKNESS OF THE LINE ON HOVER ***/
 padding-bottom: 34px;
 opacity: 1 !important;
}
#top-menu li li a {
 padding-bottom: 6px !important;
}
#top-menu li.current-menu-item > a,
.et-fixed-header #top-menu li.current-menu-item > a {
 border: 10px solid #F15A29; /*** COLOR AND THICKNESS OF THE BOX ***/
 padding: 10px;
 margin-bottom: -10px;
}
#top-menu .current-menu-item a::before,
#top-menu .current_page_item a::before {
 content: "";
 position: absolute;
 z-index: 2;
 left: 0;
 right: 0;
}
#top-menu li a:before {
 content: "";
 position: absolute;
 z-index: -2;
 left: 0;
 right: 100%;
 bottom: 50%;
 background: #15bf86; /*** COLOR OF THE LINE ***/
 height: 3px; /*** THICKNESS OF THE LINE ***/
 -webkit-transition-property: right;
 transition-property: right;
 -webkit-transition-duration: 0.3s;
 transition-duration: 0.3s;
 -webkit-transition-timing-function: ease-out;
 transition-timing-function: ease-out;
}
#top-menu li a:hover {
 opacity: 1 !important;
}
#top-menu li a:hover:before {
 right: 0;
}
#top-menu li li a:before {
 bottom: 10%;
}
/**
 * Allow SVG
 *
 * @param $mimes
 *
 * @return mixed
 */
if (!function_exists('pac_da_mime_types')):
    function pac_da_mime_types($mimes)
    {
        $mimes['svg'] = 'image/svg+xml';
        $mimes['svgz'] = 'image/svg+xml';

        return $mimes;
    }
endif;
/**
 * Fixes the issue in WordPress 4.7.1 being unable to correctly identify SVGs
 *
 * @param $data
 * @param $file
 * @param $filename
 * @param $mimes
 *
 * @return array|mixed|null
 */
if (!function_exists('pac_da_fix_mime_type_svg')):
    function pac_da_fix_mime_type_svg($data = null, $file = null, $filename = null, $mimes = null)
    {
        $ext = isset($data['ext']) ? $data['ext'] : '';
        if (strlen($ext) < 1) {
            $exploded = explode('.', $filename);
            $ext = strtolower(end($exploded));
        }
        if ('svg' === $ext) {
            $data['type'] = 'image/svg+xml';
            $data['ext'] = 'svg';
        } elseif ('svgz' === $ext) {
            $data['type'] = 'image/svg+xml';
            $data['ext'] = 'svgz';
        }

        return $data;
    }
endif;
/**
 * Allow SVG To Upload From Admin Side Only To Specific Roles
 *
 * @return void
 */
if (!function_exists('pac_da_allow_svg')):
    function pac_da_allow_svg()
    {
        if (current_user_can('administrator')) {
            add_filter('upload_mimes', 'pac_da_mime_types');
            add_filter('wp_check_filetype_and_ext', 'pac_da_fix_mime_type_svg', 75, 4);
        }
    }

    add_action('admin_init', 'pac_da_allow_svg');
endif;
$.ajax({
    url: 'ruta/al/controlador',
    method: 'GET',
    dataType: 'json',
    success: function(response) {
        // Manipula los datos recibidos en la respuesta
        for (var i = 0; i < response.length; i++) {
            var nombre = response[i].nombre;
            var apellido = response[i].apellido;
            var cedula = response[i].cedula;
            console.log(nombre + ' ' + apellido + ' - ' + cedula);
        }
    },
    error: function(xhr, status, error) {
        // Maneja los errores de la solicitud
        console.error(error);
    }
});
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/html "access 1 month"
ExpiresByType text/css "access 1 month"
ExpiresByType text/javascript "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType image/svg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType application/pdf "access 1 month"
ExpiresByType application/javascript "access 1 month"
ExpiresByType application/x-javascript "access 1 month"
ExpiresByType application/xhtml+xml "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 4 days"
</IfModule>
add_action( 'rest_api_init', 'custom_cart_endpoint' );
  
function custom_cart_endpoint() {

    register_rest_route(
        'wc-api/my-custom-cart/v1', 
        '/cart',
        [
            'methods' => 'GET',
            'callback' => 'get_cart_data',
        ]   
    );

}
  
function get_cart_data() {



}
/*style the back to top button on hover*/
body .et_pb_scroll_top:hover {
	background-color: rgb(224, 43, 32) !important;
	color: rgb(237, 240, 0) !important;
}
/*style and position the back to top button*/
body .et_pb_scroll_top {
	background-color: rgb(12, 113, 195) !important;
	color: rgb(237, 240, 0) !important;
	padding: 10px 20px 10px 10px !important;
	right: 20px !important;
	bottom: 125px !important;
	border-radius: 5px !important;
}
/*add text to the back to top button*/
body .et_pb_scroll_top:after {
	content: "Back To Top" !important;
	font-family: Open Sans, sans-serif !important;
	line-height: 30px !important;
	font-size: 22px !important;
	position: relative;
	top: -2px;
	margin-left: 10px !important;
}
star

Fri Feb 09 2024 09:49:14 GMT+0000 (Coordinated Universal Time)

@aditya_revankar #typescript

star

Fri Feb 09 2024 09:30:02 GMT+0000 (Coordinated Universal Time)

@aditya_revankar #typescript

star

Fri Feb 09 2024 09:24:36 GMT+0000 (Coordinated Universal Time)

@aditya_revankar #typescript

star

Fri Feb 09 2024 09:21:29 GMT+0000 (Coordinated Universal Time)

@aditya_revankar #typescript

star

Fri Feb 09 2024 09:13:06 GMT+0000 (Coordinated Universal Time)

@yuvalba

star

Fri Feb 09 2024 08:41:37 GMT+0000 (Coordinated Universal Time)

@aditya_revankar #typescript

star

Fri Feb 09 2024 08:26:18 GMT+0000 (Coordinated Universal Time)

@aditya_revankar #typescript

star

Thu Feb 08 2024 22:40:14 GMT+0000 (Coordinated Universal Time)

@gerardo0320

star

Thu Feb 08 2024 22:15:20 GMT+0000 (Coordinated Universal Time)

@Gavslee

star

Thu Feb 08 2024 22:13:45 GMT+0000 (Coordinated Universal Time)

@Gavslee

star

Thu Feb 08 2024 22:12:43 GMT+0000 (Coordinated Universal Time)

@Gavslee

star

Thu Feb 08 2024 22:11:52 GMT+0000 (Coordinated Universal Time)

@Gavslee

star

Thu Feb 08 2024 22:10:55 GMT+0000 (Coordinated Universal Time)

@Gavslee

star

Thu Feb 08 2024 22:02:53 GMT+0000 (Coordinated Universal Time)

@Gavslee

star

Thu Feb 08 2024 21:59:18 GMT+0000 (Coordinated Universal Time)

@Gavslee

star

Thu Feb 08 2024 19:13:43 GMT+0000 (Coordinated Universal Time)

@jrg_300i #undefined

star

Thu Feb 08 2024 18:15:20 GMT+0000 (Coordinated Universal Time)

@hedviga

star

Thu Feb 08 2024 16:05:17 GMT+0000 (Coordinated Universal Time)

@ppSan #html #javascript #date #format

star

Thu Feb 08 2024 14:21:52 GMT+0000 (Coordinated Universal Time)

@FOrestNAtion

star

Thu Feb 08 2024 13:17:25 GMT+0000 (Coordinated Universal Time) https://maticz.com/web-development

@carolinemax

star

Thu Feb 08 2024 11:46:21 GMT+0000 (Coordinated Universal Time)

@Taimoor

star

Thu Feb 08 2024 11:44:46 GMT+0000 (Coordinated Universal Time)

@divyasoni09 #jquery

star

Thu Feb 08 2024 11:43:41 GMT+0000 (Coordinated Universal Time)

@divyasoni09 #php

star

Thu Feb 08 2024 11:42:00 GMT+0000 (Coordinated Universal Time)

@divyasoni09 #jquery

star

Thu Feb 08 2024 11:41:26 GMT+0000 (Coordinated Universal Time)

@divyasoni09 #jquery

star

Thu Feb 08 2024 11:39:10 GMT+0000 (Coordinated Universal Time)

@divyasoni09 #jquery

star

Thu Feb 08 2024 11:37:20 GMT+0000 (Coordinated Universal Time)

@divyasoni09 #jquery #javascript

star

Thu Feb 08 2024 11:35:37 GMT+0000 (Coordinated Universal Time)

@divyasoni09 #jquery

star

Thu Feb 08 2024 11:28:13 GMT+0000 (Coordinated Universal Time)

@divyasoni09 #php

star

Thu Feb 08 2024 11:27:12 GMT+0000 (Coordinated Universal Time)

@divyasoni09 #jquery #php

star

Thu Feb 08 2024 11:25:49 GMT+0000 (Coordinated Universal Time)

@divyasoni09 #jquery

star

Thu Feb 08 2024 11:19:20 GMT+0000 (Coordinated Universal Time)

@divyasoni09 #jquery

star

Thu Feb 08 2024 11:14:02 GMT+0000 (Coordinated Universal Time)

@divyasoni09 #tailwindcss

star

Thu Feb 08 2024 07:20:10 GMT+0000 (Coordinated Universal Time)

#php
star

Thu Feb 08 2024 05:34:10 GMT+0000 (Coordinated Universal Time)

@mnis00014 #python #selenium #scraping

star

Thu Feb 08 2024 01:12:53 GMT+0000 (Coordinated Universal Time)

@diptish #dask #xarray #parallel

star

Thu Feb 08 2024 01:11:37 GMT+0000 (Coordinated Universal Time)

@diptish #dask #xarray #parallel

star

Thu Feb 08 2024 00:08:49 GMT+0000 (Coordinated Universal Time)

@marcopinero #javascript

star

Wed Feb 07 2024 23:26:35 GMT+0000 (Coordinated Universal Time)

@davidmchale #css #google #font #preload

star

Wed Feb 07 2024 20:29:39 GMT+0000 (Coordinated Universal Time) https://www.elegantthemes.com/blog/divi-resources/beautiful-css-hover-effects-you-can-add-to-your-divi-menus

@mraimondi3

star

Wed Feb 07 2024 20:29:29 GMT+0000 (Coordinated Universal Time) https://www.elegantthemes.com/blog/divi-resources/beautiful-css-hover-effects-you-can-add-to-your-divi-menus

@mraimondi3

star

Wed Feb 07 2024 20:17:47 GMT+0000 (Coordinated Universal Time) https://www.elegantthemes.com/blog/divi-resources/beautiful-css-hover-effects-you-can-add-to-your-divi-menus

@mraimondi3

star

Wed Feb 07 2024 19:58:22 GMT+0000 (Coordinated Universal Time) https://www.peeayecreative.com/how-to-temporarily-allow-svg-file-uploads-in-divi-for-admin-users-only/

@mraimondi3

star

Wed Feb 07 2024 19:52:30 GMT+0000 (Coordinated Universal Time)

@jrg_300i #undefined

star

Wed Feb 07 2024 19:35:03 GMT+0000 (Coordinated Universal Time) https://rankmath.com/blog/add-expires-headers-wordpress/

@mraimondi3

star

Wed Feb 07 2024 19:26:40 GMT+0000 (Coordinated Universal Time)

@mebean #ور #بريس

star

Wed Feb 07 2024 19:26:28 GMT+0000 (Coordinated Universal Time) https://www.peeayecreative.com/how-to-style-and-customize-the-divi-back-to-top-button/

@mraimondi3

star

Wed Feb 07 2024 19:26:09 GMT+0000 (Coordinated Universal Time) https://www.peeayecreative.com/how-to-style-and-customize-the-divi-back-to-top-button/

@mraimondi3

star

Wed Feb 07 2024 19:25:54 GMT+0000 (Coordinated Universal Time) https://www.peeayecreative.com/how-to-style-and-customize-the-divi-back-to-top-button/

@mraimondi3

Save snippets that work with our extensions

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