Snippets Collections
/* CSS */

.box{
  background:#E5E8EE;
  margin-bottom:10px;
  text-align:center;
  color:#B7B7B7;
  border-radius:12px;
}
<!--Html-->
<div class="box">
  <h2>A</h2>
</div>
<div class="box">
  <h2>B</h2>
</div>
<div class="box">
  <h2>C</h2>
</div>
print("uwu")
CREATE TABLE friends (
  id INTEGER,
  name TEXT,
  birthday DATE 
);
 
INSERT INTO friends (id,name, birthday)
VALUES (1,'Ororo Munroe', 'May 30th, 1940');
 
 
 
INSERT INTO friends (id,name, birthday)
VALUES (2,'Edward Nylander', 'July 30th, 1958');
 
INSERT INTO friends (id,name, birthday)
VALUES (3,'Taylor Olson', 'February 20th, 1958');
 
UPDATE friends
SET name = 'Storm'
WHERE id = 1;
 
ALTER TABLE friends
ADD email TEXT;
 
UPDATE friends
SET email = 'storm@codeacademy.com'
WHERE id = 1;
UPDATE friends
SET email = 'randomnumber@mst.edu'
WHERE id = 2;
UPDATE friends
SET email = 'manimissmydawgs@gmail.com'
WHERE id = 3;
 
--DELETE FROM friends
--WHERE id = 1;
 
SELECT * FROM friends;
ocrmypdf --language jpn data/file1.pdf data/file1_output.pdf
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":female-technologist::rocket::technologist:HACKATHON 2023  |   02 - 06 OCTOBER:female-technologist::rocket::technologist:"
			}
		},
		{
			"type": "context",
			"elements": [
				{
					"text": "*September 27, 2023*  |  WX Announcements",
					"type": "mrkdwn"
				}
			]
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "The Hackathon week is just around the corner, and we're thrilled to share what's happening in our offices to make this event extra special. \n\n\n\n *DAILY CATERING* \n\n :beverage_box:*MONDAY*- Brain Juice Monday: Start your week with a burst of energy! Enjoy delicious and healthy juices to kickstart your day. \n\n:croissant:*TUESDAY*- Breakfast Social: Join us for a morning social to fuel up with a hearty breakfast and connect with colleagues. \n\n:doughnut:*WEDNESDAY*- Afternoon Sugar Rush: Satisfy your sweet tooth with donuts and cupcakes in the afternoon. \n\n:stuffed_flatbread:*THURSDAY*- Fuel Up Lunch: A nutritious lunch to keep your energy levels high and your creativity flowing. \n\n:taco:*FRIDAY*- DIY Food Station: Customise your own meals at our DIY food station.\n\n\n\n But wait, there's more! We're not leaving our remote teammates behind; we're bringing them along virtually, so we can connect with our remote friends as well.\nStay tuned for more updates and details on this! \n\n\n\nThese activations are designed to keep you energised and inspired throughout the Hackathon. Stay tuned for more!\n\n\n\n *Thank you,*\n\n*WX* :wx:"
			}
		},
		{
			"type": "divider"
		}
	]
}
<script src="https://cdn.jsdelivr.net/npm/@feathery/react@latest/umd/index.js"></script>
<div id='container'></div>
<input type="hidden" name="xxTrustedFormCertUrl" id="xxTrustedFormCertUrl" value=""/>
<input id="leadid_token" name="universal_leadid" type="hidden" value=""/>

<script>
    (() => {
        Feathery.init('3d54b6a1-d231-4faf-a841-955f52016169');
        Feathery.renderAt('container', {formName: 'Xtimeshares'});

        const qp = new URLSearchParams(window.location.search);
        Feathery.setFieldValues({
            "utm_source": qp.get("utm_source") ?? "",
            "utm_medium": qp.get("utm_medium") ?? "",
            "utm_campaign": qp.get("utm_campaign") ?? "",
            "utm_term": qp.get("utm_term") ?? "",
            "utm_content": qp.get("utm_content") ?? "",
            "gclid": qp.get("gclid") ?? "",
            "fbclid": qp.get("fbclid") ?? "",
        });

        if (getUrlParameter("affid")) {
            if (getUrlParameter("r")) {
                console.log("have ef r");
                Feathery.setFieldValues({
                    "ef_affid": getUrlParameter("affid"),
                    "ef_o": getUrlParameter("o"),
                    "ef_sub1": getUrlParameter("sub1"),
                    "ef_sub2": getUrlParameter("sub2"),
                    "ef_sub3": getUrlParameter("sub3"),
                    "ef_sub4": getUrlParameter("sub4"),
                    "ef_sub5": getUrlParameter("sub5"),
                    "ef_r": getUrlParameter("r")
                });
            } else {
                console.log('loading ef script');
                var script = document.createElement('script');
                script.type = 'text/javascript';
                script.src = 'https://www.orangebluebird.com/scripts/sdk/everflow.vanilla.js';
                script.onload = addEf;
                document.body.append(script);
            }
        }

        function addEf() {
            if (EF) {
                var offerid = EF.urlParameter('o');
                if (!offerid) offerid = 6;
                var data = {
                    offer_id: offerid,
                    affiliate_id: EF.urlParameter('affid'),
                    sub1: EF.urlParameter('sub1'),
                    sub2: EF.urlParameter('sub2'),
                    sub3: EF.urlParameter('sub3'),
                    sub4: EF.urlParameter('sub4'),
                    sub5: EF.urlParameter('sub5'),
                };
                const transactionid = EF.urlParameter('r');
                if (transactionid) data['transaction_id'] = transactionid;
                var clickpromise = EF.click(data);
                Promise.resolve(clickpromise).then(function (value) {
                    const eftransid = EF.getTransactionId(offerid);
                    console.log('trans id', eftransid);
                    if (console) eftransid ? console.log("EF TransactionID", eftransid) : console.log("EF no transaction");
                    if (eftransid) {
                        Feathery.setFieldValues({
                            "ef_affid": data['affiliate_id'],
                            "ef_o": data['offer_id'],
                            "ef_sub1": data['sub1'],
                            "ef_sub2": data['sub2'],
                            "ef_sub3": data['sub3'],
                            "ef_sub4": data['sub4'],
                            "ef_sub5": data['sub5'],
                            "ef_r": eftransid
                        });
                    }
                });
            } else {
                console.error('no ef');
            }
        }

        async function addAdditionalData() {
            try {
                var sptrk = function () {
                    var o = "https://sp-trk.com/", t = "__spd", e = (new Date).getTime();
                    window[t] || (window[t] = {init: !1});
                    var c = window[t];
                    c.d || (c.d = []);
                    var s = c.d;

                    function v(t) {
                        var i = document.createElement("script");
                        i.id = "sptrk";
                        i.async = !0, i.src = t, document.head.appendChild(i)
                    }

                    c.init || v(o + "u");
                    var u = /^([a-z0-9]{8})-([a-z0-9]{2})$/;
                    return function () {
                        var t = arguments;
                        if (s.push(t), "config" == t[0] && !c.init && !c.a) {
                            c.init = !0;
                            var i = t[1], n = i.match(u), a = n[1], r = n[2];
                            if (!a || !r) throw"invalid id: " + i;
                            var d = Math.random().toString(36).substring(2, 15);
                            v(o + "t/" + a + "?" + ("a=" + e + "&o=" + d))
                        }
                    }
                }();

                sptrk('config', '6pp6xawn-01', {
                    campaign: 'xtimeshares'
                });

                sptrk('validate', 'reg', null, function (result) {
                    console.log('sptrk result', result, result?.s?.toString());
                    const score = result?.s?.toString();
                    Feathery.setFieldValues({"spiderscore": (score ?? "")});
                });
            } catch (e) {
                console.error('exception in adding vars', e);
            }
        }

        addAdditionalData();

        function getUrlParameter(name) {
            name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
            var regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
            var results = regex.exec(location.search);
            return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
        };
    })();

    function updateLeadId() {
        try {
            const v = document.getElementById("leadid_token").value;
            if (!v) {
                console.log("no leadid");
                return;
            }
            console.log("setting leadid to ", v);
            Feathery.setFieldValues({"jornaya": v});
        } catch (e) {
            console.error("failed to get jornaya", e);
        }
    }

    function updateTf() {
        try {
            const fv = document.getElementsByName("xxTrustedFormCertUrl")[0];
            if (!fv) {
                console.log("no trustedform", window.trustedForm);
                return;
            }
            const v = fv.value;
            console.log("setting trustedform to ", v);
            Feathery.setFieldValues({"trustedform": v});
        } catch (e) {
            console.error("failed to get trustedform", e);
        }
    }
</script>

<script id="LeadiDscript" type="text/javascript">
    (function () {
        var s = document.createElement('script');
        s.id = 'LeadiDscript_campaign';
        s.type = 'text/javascript';
        s.async = true;
        s.src = '//create.lidstatic.com/campaign/57ac61a3-8ad8-0718-a337-2ec2f9a2e7b5.js?snippet_version=2';
        s.onload = () => {
            setTimeout(updateLeadId, 1000);
        }
        var LeadiDscript = document.getElementById('LeadiDscript');
        LeadiDscript.parentNode.insertBefore(s, LeadiDscript);
    })();
</script>
<noscript><img
        src='//create.leadid.com/noscript.gif?lac=D72E3F2E-3225-101B-B5FA-061DF4DD4DEC&lck=57ac61a3-8ad8-0718-a337-2ec2f9a2e7b5&snippet_version=2'/>
</noscript>
<script type="text/javascript">
    (function () {
        var field = 'xxTrustedFormCertUrl';
        var provideReferrer = false;
        var invertFieldSensitivity = false;
        var tf = document.createElement('script');
        tf.type = 'text/javascript';
        tf.async = true;
        tf.src = 'http' + ('https:' == document.location.protocol ? 's' : '') + '://api.trustedform.com/trustedform.js?provide_referrer=' + escape(provideReferrer) + '&field=' + escape(field) + '&l=' + new Date().getTime() + Math.random() + '&invert_field_sensitivity=' + invertFieldSensitivity;
        tf.onload = () => {
            setTimeout(updateTf, 1000);
        }
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(tf, s);
    })();
</script>
<noscript><img src="//api.trustedform.com/ns.gif"/></noscript>
<script src="https://cdn.jsdelivr.net/npm/@feathery/react@latest/umd/index.js"></script>
<div id='container'></div>
<input type="hidden" name="xxTrustedFormCertUrl" id="xxTrustedFormCertUrl" value=""/>
<input id="leadid_token" name="universal_leadid" type="hidden" value=""/>

<script>
    (() => {
        Feathery.init('3d54b6a1-d231-4faf-a841-955f52016169');
        Feathery.renderAt('container', {formName: 'SSDI'});

        const qp = new URLSearchParams(window.location.search);
        Feathery.setFieldValues({
            "utm_source": qp.get("utm_source") ?? "",
            "utm_medium": qp.get("utm_medium") ?? "",
            "utm_campaign": qp.get("utm_campaign") ?? "",
            "utm_term": qp.get("utm_term") ?? "",
            "utm_content": qp.get("utm_content") ?? "",
            "gclid": qp.get("gclid") ?? "",
            "fbclid": qp.get("fbclid") ?? "",
        });

        if (getUrlParameter("affid")) {
            if (getUrlParameter("r")) {
                console.log("have ef r");
                Feathery.setFieldValues({
                    "ef_affid": getUrlParameter("affid"),
                    "ef_o": getUrlParameter("o"),
                    "ef_sub1": getUrlParameter("sub1"),
                    "ef_sub2": getUrlParameter("sub2"),
                    "ef_sub3": getUrlParameter("sub3"),
                    "ef_sub4": getUrlParameter("sub4"),
                    "ef_sub5": getUrlParameter("sub5"),
                    "ef_r": getUrlParameter("r")
                });
            } else {
                console.log('loading ef script');
                var script = document.createElement('script');
                script.type = 'text/javascript';
                script.src = 'https://www.orangebluebird.com/scripts/sdk/everflow.vanilla.js';
                script.onload = addEf;
                document.body.append(script);
            }
        }

        function addEf() {
            if (EF) {
                var offerid = EF.urlParameter('o');
                if (!offerid) offerid = 6;
                var data = {
                    offer_id: offerid,
                    affiliate_id: EF.urlParameter('affid'),
                    sub1: EF.urlParameter('sub1'),
                    sub2: EF.urlParameter('sub2'),
                    sub3: EF.urlParameter('sub3'),
                    sub4: EF.urlParameter('sub4'),
                    sub5: EF.urlParameter('sub5'),
                };
                const transactionid = EF.urlParameter('r');
                if (transactionid) data['transaction_id'] = transactionid;
                var clickpromise = EF.click(data);
                Promise.resolve(clickpromise).then(function (value) {
                    const eftransid = EF.getTransactionId(offerid);
                    console.log('trans id', eftransid);
                    if (console) eftransid ? console.log("EF TransactionID", eftransid) : console.log("EF no transaction");
                    if (eftransid) {
                        Feathery.setFieldValues({
                            "ef_affid": data['affiliate_id'],
                            "ef_o": data['offer_id'],
                            "ef_sub1": data['sub1'],
                            "ef_sub2": data['sub2'],
                            "ef_sub3": data['sub3'],
                            "ef_sub4": data['sub4'],
                            "ef_sub5": data['sub5'],
                            "ef_r": eftransid
                        });
                    }
                });
            } else {
                console.error('no ef');
            }
        }

        async function addAdditionalData() {
            try {
                var sptrk = function () {
                    var o = "https://sp-trk.com/", t = "__spd", e = (new Date).getTime();
                    window[t] || (window[t] = {init: !1});
                    var c = window[t];
                    c.d || (c.d = []);
                    var s = c.d;

                    function v(t) {
                        var i = document.createElement("script");
                        i.id = "sptrk";
                        i.async = !0, i.src = t, document.head.appendChild(i)
                    }

                    c.init || v(o + "u");
                    var u = /^([a-z0-9]{8})-([a-z0-9]{2})$/;
                    return function () {
                        var t = arguments;
                        if (s.push(t), "config" == t[0] && !c.init && !c.a) {
                            c.init = !0;
                            var i = t[1], n = i.match(u), a = n[1], r = n[2];
                            if (!a || !r) throw"invalid id: " + i;
                            var d = Math.random().toString(36).substring(2, 15);
                            v(o + "t/" + a + "?" + ("a=" + e + "&o=" + d))
                        }
                    }
                }();

                sptrk('config', 'pzomcfhz-01', {
                    campaign: 'ssdi'
                });

                sptrk('validate', 'reg', null, function (result) {
                    console.log('sptrk result', result, result?.s?.toString());
                    const score = result?.s?.toString();
                    Feathery.setFieldValues({"spiderscore": (score ?? "")});
                });
                const ipResponse = await fetch("https://api.numberverifier.com/ip");
                const ip = await ipResponse.text();
                Feathery.setFieldValues({"ipaddress": ip});
            } catch (e) {
                console.error('exception in adding vars', e);
            }
        }

        addAdditionalData();

        function getUrlParameter(name) {
            name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
            var regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
            var results = regex.exec(location.search);
            return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
        };
    })();

    function updateLeadId() {
        try {
            const v = document.getElementById("leadid_token").value;
            if (!v) {
                console.log("no leadid");
                return;
            }
            console.log("setting leadid to ", v);
            Feathery.setFieldValues({"jornaya": v});
        } catch (e) {
            console.error("failed to get jornaya", e);
        }
    }

    function updateTf() {
        try {
            const fv = document.getElementsByName("xxTrustedFormCertUrl")[0];
            if (!fv) {
                console.log("no trustedform", window.trustedForm);
                return;
            }
            const v = fv.value;
            console.log("setting trustedform to ", v);
            Feathery.setFieldValues({"trustedform": v});
        } catch (e) {
            console.error("failed to get trustedform", e);
        }
    }
</script>

<script id="LeadiDscript" type="text/javascript">
    (function () {
        var s = document.createElement('script');
        s.id = 'LeadiDscript_campaign';
        s.type = 'text/javascript';
        s.async = true;
        s.src = '//create.lidstatic.com/campaign/818649f4-9e6d-4a47-85bd-6b10737ebf46.js?snippet_version=2';
        s.onload = () => {
            setTimeout(updateLeadId, 1000);
        }
        var LeadiDscript = document.getElementById('LeadiDscript');
        LeadiDscript.parentNode.insertBefore(s, LeadiDscript);
    })();
</script>
<noscript><img
        src='//create.leadid.com/noscript.gif?lac=D72E3F2E-3225-101B-B5FA-061DF4DD4DEC&lck=818649f4-9e6d-4a47-85bd-6b10737ebf46&snippet_version=2'/>
</noscript>
<script type="text/javascript">
    (function () {
        var field = 'xxTrustedFormCertUrl';
        var provideReferrer = false;
        var invertFieldSensitivity = false;
        var tf = document.createElement('script');
        tf.type = 'text/javascript';
        tf.async = true;
        tf.src = 'http' + ('https:' == document.location.protocol ? 's' : '') + '://api.trustedform.com/trustedform.js?provide_referrer=' + escape(provideReferrer) + '&field=' + escape(field) + '&l=' + new Date().getTime() + Math.random() + '&invert_field_sensitivity=' + invertFieldSensitivity;
        tf.onload = () => {
            setTimeout(updateTf, 1000);
        }
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(tf, s);
    })();
</script>
<noscript><img src="//api.trustedform.com/ns.gif"/></noscript>
<script src="https://cdn.jsdelivr.net/npm/@feathery/react@latest/umd/index.js"></script>
<div id='container'></div>
<script>
(() => {
    Feathery.init('3d54b6a1-d231-4faf-a841-955f52016169');
    Feathery.renderAt('container', { formName: 'Credit 1 Survey' });
})();
(async () => {
        try {
            var sptrk = function () {
                var o = "https://sp-trk.com/", t = "__spd", e = (new Date).getTime();
                window[t] || (window[t] = {init: !1});
                var c = window[t];
                c.d || (c.d = []);
                var s = c.d;
                function v(t) {
                    var i = document.createElement("script");
                    i.id = "sptrk";
                    i.async = !0, i.src = t, document.head.appendChild(i)
                }
                c.init || v(o + "u");
                var u = /^([a-z0-9]{8})-([a-z0-9]{2})$/;
                return function () {
                    var t = arguments;
                    if (s.push(t), "config" == t[0] && !c.init && !c.a) {
                        c.init = !0;
                        var i = t[1], n = i.match(u), a = n[1], r = n[2];
                        if (!a || !r) throw"invalid id: " + i;
                        var d = Math.random().toString(36).substring(2, 15);
                        v(o + "t/" + a + "?" + ("a=" + e + "&o=" + d))
                    }
                }
            }();
            sptrk('config', 'qgsekeel-01', {
                campaign: ''
            });
            sptrk('validate', 'lead', null, function (result) {
                console.log('sptrk result', result, result?.s?.toString());
                const score = result?.s?.toString()
                Feathery.setFieldValues({"spiderscore": (score ?? "")});
            })
        } catch (e) {
            console.error('exception in adding vars', e);
        }
    })()
</script>
// Hide prices
add_action('after_setup_theme','magik_activate_filter') ;

function magik_activate_filter()
{
   add_filter('woocommerce_get_price_html', 'magik_show_price_logged');
}

function magik_show_price_logged($price)
{
   if(is_user_logged_in() )
   {
      return $price;
   }
   else
  {
     remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
     remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );
     return '<a href="' . get_permalink(woocommerce_get_page_id('myaccount')) . '">Login to order</a>';
  }
}

//Option Two (If you decided to use Option One then don't add the following code)
add_filter('woocommerce_is_purchasable', 'my_woocommerce_is_purchasable', 10, 2);
function my_woocommerce_is_purchasable($is_purchasable, $product) {

	$isLoggedIn = is_user_logged_in();
	if(true == $isLoggedIn){
		//Make product purchasable to logged in user
		return true;
	}

	//Make product not purchasable to unlogged in user
	return false;
}
// Get form fields
const { 
    dob_month, 
    dob_day, 
    dob_year, 
    working, 
    seen_doctor, 
    have_attorney, 
    have_applied 
} = feathery.getFieldValues();

// Calculate age based on DOB
const birthDate = new Date(dob_year, dob_month - 1, dob_day);
const today = new Date();
let age = today.getFullYear() - birthDate.getFullYear();
const monthDifference = today.getMonth() - birthDate.getMonth();
if (monthDifference < 0 || (monthDifference === 0 && today.getDate() < birthDate.getDate())) {
    age--;
}

// Set the calculated age to the 'age' field
feathery.setFieldValues({ age: age });

// Check current time and day
const currentHour = today.getUTCHours() - 5; // Convert UTC to Eastern Time
const currentDay = today.getUTCDay(); // 0 is Sunday, 1 is Monday, etc.

// First Button Logic
if (
    (age >= 49 && age <= 62) &&
    (working === "part time" || working === "not working") &&
    seen_doctor === "yes" &&
    (have_attorney === "no" || have_attorney === "had") &&
    (have_applied === "first time" || have_applied === "previous")
) {
    if ((currentHour >= 9 && currentHour < 19) && (currentDay >= 1 && currentDay <= 5)) { // 9am-7pm EST Monday-Friday
        location.href = 'https://www.ssdi-approvals.com/thank-you-p';
    } else {
        location.href = 'https://www.ssdi-approvals.com/thank-you-p2';
    }
} 
// Second Button Logic (for the leftovers)
else {
    location.href = 'https://www.ssdi-approvals.com/thank-you-np';
}
AND  (i.System_Language__c like 'en_%' OR (i.Mailing_Country__c != 'CA' AND i.System_Language__c is null))
SELECT
j.TriggeredSendCustomerKey,
j.DeliveredTime as SendTime,
o.EventDate as OpenTime,
s.EmailAddress,
s.SubscriberKey
from [_Job] j
INNER JOIN [_Open] o ON j.JobID = o.JobID
INNER JOIN ENT._Subscribers s ON o.SubscriberID = s.SubscriberID
WHERE
o.isunique = 1 
AND o.EventDate > dateadd(d,-30,getdate()) 
AND j.TriggeredSendCustomerKey in ('163400','163399') 
/*!
 * Color mode toggler for Bootstrap's docs (https://getbootstrap.com/)
 * Copyright 2011-2023 The Bootstrap Authors
 * Licensed under the Creative Commons Attribution 3.0 Unported License.
 */

(() => {
  'use strict';

  const storedTheme = localStorage.getItem('theme');

  const getPreferredTheme = () => {
    if (storedTheme) {
      return storedTheme;
    }

    return window.matchMedia('(prefers-color-scheme: dark)').matches
      ? 'dark'
      : 'light';
  };

  const setTheme = function (theme) {
    if (
      theme === 'auto' &&
      window.matchMedia('(prefers-color-scheme: dark)').matches
    ) {
      document.documentElement.setAttribute('data-bs-theme', 'dark');
    } else {
      document.documentElement.setAttribute('data-bs-theme', theme);
    }
  };

  setTheme(getPreferredTheme());

  const showActiveTheme = (theme, focus = false) => {
    const themeSwitcher = document.querySelector('#bd-theme');

    if (!themeSwitcher) {
      return;
    }

    const themeSwitcherText = document.querySelector('#bd-theme-text');
    const activeThemeIcon = document.querySelector('.theme-icon-active use');
    const btnToActive = document.querySelector(
      `[data-bs-theme-value="${theme}"]`
    );
    const svgOfActiveBtn = btnToActive
      .querySelector('svg use')
      .getAttribute('href');

    document.querySelectorAll('[data-bs-theme-value]').forEach((element) => {
      element.classList.remove('active');
      element.setAttribute('aria-pressed', 'false');
    });

    btnToActive.classList.add('active');
    btnToActive.setAttribute('aria-pressed', 'true');
    activeThemeIcon.setAttribute('href', svgOfActiveBtn);
    const themeSwitcherLabel = `${themeSwitcherText.textContent} (${btnToActive.dataset.bsThemeValue})`;
    themeSwitcher.setAttribute('aria-label', themeSwitcherLabel);

    if (focus) {
      themeSwitcher.focus();
    }
  };

  window
    .matchMedia('(prefers-color-scheme: dark)')
    .addEventListener('change', () => {
      if (storedTheme !== 'light' || storedTheme !== 'dark') {
        setTheme(getPreferredTheme());
      }
    });

  window.addEventListener('DOMContentLoaded', () => {
    showActiveTheme(getPreferredTheme());

    document.querySelectorAll('[data-bs-theme-value]').forEach((toggle) => {
      toggle.addEventListener('click', () => {
        const theme = toggle.getAttribute('data-bs-theme-value');
        localStorage.setItem('theme', theme);
        setTheme(theme);
        showActiveTheme(theme, true);
      });
    });
  });
})();
Update the package with a lower version number. In this case, npm update vue. Optionally, you may want to npm update vue-loader too
const {
    array_totalUnsecuredDebt,
    array_credit_score,
    array_number_of_collections,
    fname,
    lname,
    zip_code,
    address_street,
    'email-address': email,
    'phone-number': mobile,
    'loan-amount-slider': loanAmountSlider
} = feathery.getFieldValues();

// Convert loanAmountSlider to string and append '000'
const postLoanAmount = (loanAmountSlider * 1000).toString();

// First Button Conditions
if (
    array_totalUnsecuredDebt >= 25000 &&
    array_credit_score >= 540 &&
    array_number_of_collections <= 6 &&
    array_totalUnsecuredDebt !== null &&
    array_credit_score !== null &&
    array_number_of_collections !== null
) {
    console.log("Redirecting to first URL (Webflow thank-you page)");
    const thankYouURL = `https://www.credit1finance.com/survey-bot?fname=${fname}&email=${email}&phone=${mobile}&post_credit_score=${array_credit_score}&post_loan_amount=${postLoanAmount}&post_unsecured_debt=${array_totalUnsecuredDebt}`;
    location.href = thankYouURL;
}

// Second Button Conditions
else if (
    array_totalUnsecuredDebt >= 15000 &&
    array_totalUnsecuredDebt <= 24999 &&
    array_credit_score >= 540 &&
    array_number_of_collections <= 6 &&
    array_totalUnsecuredDebt !== null &&
    array_credit_score !== null &&
    array_number_of_collections !== null
) {
    console.log("Redirecting to second URL (Webflow thank-you page)");
    const thankYouURL = `https://www.credit1finance.com/survey-bot?fname=${fname}&email=${email}&phone=${mobile}&post_credit_score=${array_credit_score}&post_loan_amount=${postLoanAmount}&post_unsecured_debt=${array_totalUnsecuredDebt}`;
    location.href = thankYouURL;
}

// Third Button Conditions
else if (
    array_totalUnsecuredDebt >= 10000 &&
    array_totalUnsecuredDebt <= 14999 &&
    array_totalUnsecuredDebt !== null
) {
    console.log("Redirecting to third URL");
    location.href = "https://www.credit1finance.com/thank-you-np";
}

// Fourth Button Conditions (Default Redirection)
else {
    const redirectURL = `https://rankpro.pngtrk30.com/MfmEN?transaction_id=${Math.random().toString(36).substr(2, 9)}&first_name=${fname}&last_name=${lname}&email=${email}&mobile=${mobile}&address=${address_street}&zip_code=${zip_code}`;
    console.log("Redirecting to fourth URL");
    location.href = redirectURL;
}
// Get form fields
const { fname, lname, zip_code, address_street, day_dob, month_dob, year_dob, ipaddress } = feathery.getFieldValues();

// Format DOB  
const monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
const monthNumber = monthNames.indexOf(month_dob) + 1;  
const formattedMonth = monthNumber < 10 ? `0${monthNumber}` : monthNumber;
const dob = `${year_dob}-${formattedMonth}-${day_dob}`;

// Fetch location data
fetch(`https://api.zippopotam.us/us/${zip_code}`)
  .then(response => response.json())
  .then(locationData => {
    console.log(locationData);
    const city = locationData.places[0]['place name'];
    const state = locationData.places[0]['state abbreviation'];

    // Send data to AWS Lambda function via API Gateway
    fetch('https://d35osst22fm25k.cloudfront.net/api/arrayio', {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'x-credmo-client-token': '0C083358-9D67-43CD-B2D7-895823D3AA0E'
      },
      body: JSON.stringify({
        appKey: '426AD318-E154-4A27-8BEB-23859F5AC7C9',
        firstName: fname,
        lastName: lname,
        dob: dob,
        address: {
          street: address_street,
          city: city,
          state: state,
          zip: zip_code,  
        },
        userConsent: {
          ipAddress: ipaddress,
          timestamp: new Date().toISOString(),
          url: 'https://www.credit1finance.com',
        },
        productCode: 'offers-2005-decision-1',  
      }),
    })
    .then(response => response.json())
    .then(data => {
      // Extract higher value from credit score range
      const creditScoreRange = data.results.credit_score;
      const higherCreditScore = parseInt(creditScoreRange.split('-')[1]);

      // Extract higher value from number_of_collections range
      const collectionsRange = data.results.number_of_collections;
      const higherNumberOfCollections = parseInt(collectionsRange.split('-')[1]);

      // Populate Feathery Hidden fields 
      feathery.setFieldValues({
        array_credit_score: higherCreditScore,
        array_credit_utilization: data.results.credit_utilization,
        array_number_of_repossessions: data.results.number_of_repossessions, 
        array_number_of_delinquencies: data.results.number_of_delinquencies,
        array_number_of_collections: higherNumberOfCollections,
        array_number_inquiries: data.results.number_inquiries,
        array_number_accounts: data.results.number_accounts,
        array_account_age: data.results.account_age,
        array_monthly_payments: data.results.monthly_payments,
        array_under_21: data.results.under_21,
        array_totalUnsecuredDebt: data.results.totalUnsecuredDebt, 
      });
    })
    .catch(error => console.error('Error:', error));
});
/*dat do <head> */

<script >
    jQuery(function($) {
        $(document).ready(function() {
            $("body ul.et_mobile_menu li.menu-item-has-children, body ul.et_mobile_menu  li.page_item_has_children").append('<a href="#" class="mobile-toggle"></a>');
            $('ul.et_mobile_menu li.menu-item-has-children .mobile-toggle, ul.et_mobile_menu li.page_item_has_children .mobile-toggle').click(function(event) {
                event.preventDefault();
                $(this).parent('li').toggleClass('dt-open');
                $(this).parent('li').find('ul.children').first().toggleClass('visible');
                $(this).parent('li').find('ul.sub-menu').first().toggleClass('visible');
            });
            iconFINAL = 'P';
            $('body ul.et_mobile_menu li.menu-item-has-children, body ul.et_mobile_menu li.page_item_has_children').attr('data-icon', iconFINAL);
            $('.mobile-toggle').on('mouseover', function() {
                $(this).parent().addClass('is-hover');
            }).on('mouseout', function() {
                $(this).parent().removeClass('is-hover');
            })
        });
    }); 
</script>



/*css*/
/*adjust the new toggle element which is added via jQuery*/
ul.et_mobile_menu li.menu-item-has-children .mobile-toggle,
ul.et_mobile_menu li.page_item_has_children .mobile-toggle,
.et-db #et-boc .et-l ul.et_mobile_menu li.menu-item-has-children .mobile-toggle,
.et-db #et-boc .et-l ul.et_mobile_menu li.page_item_has_children .mobile-toggle {
	width: 44px;
	height: 100%;
	padding: 0px !important;
	max-height: 44px;
	border: none;
	position: absolute;
	right: 0px;
	top: 0px;
	z-index: 999;
	background-color: transparent;
}
/*some code to keep everyting positioned properly*/
ul.et_mobile_menu>li.menu-item-has-children,
ul.et_mobile_menu>li.page_item_has_children,
ul.et_mobile_menu>li.menu-item-has-children .sub-menu li.menu-item-has-children,
.et-db #et-boc .et-l ul.et_mobile_menu>li.menu-item-has-children,
.et-db #et-boc .et-l ul.et_mobile_menu>li.page_item_has_children,
.et-db #et-boc .et-l ul.et_mobile_menu>li.menu-item-has-children .sub-menu li.menu-item-has-children {
	position: relative;
}
/*remove default background color from menu items that have children*/
.et_mobile_menu .menu-item-has-children>a,
.et-db #et-boc .et-l .et_mobile_menu .menu-item-has-children>a {
	background-color: transparent;
}
/*hide the submenu by default*/
ul.et_mobile_menu .menu-item-has-children .sub-menu,
#main-header ul.et_mobile_menu .menu-item-has-children .sub-menu,
.et-db #et-boc .et-l ul.et_mobile_menu .menu-item-has-children .sub-menu,
.et-db #main-header ul.et_mobile_menu .menu-item-has-children .sub-menu {
	display: none !important;
	visibility: hidden !important;
}
/*show the submenu when toggled open*/
ul.et_mobile_menu .menu-item-has-children .sub-menu.visible,
#main-header ul.et_mobile_menu .menu-item-has-children .sub-menu.visible,
.et-db #et-boc .et-l ul.et_mobile_menu .menu-item-has-children .sub-menu.visible,
.et-db #main-header ul.et_mobile_menu .menu-item-has-children .sub-menu.visible {
	display: block !important;
	visibility: visible !important;
}
/*adjust the toggle icon position and transparency*/
ul.et_mobile_menu li.menu-item-has-children .mobile-toggle,
.et-db #et-boc .et-l ul.et_mobile_menu li.menu-item-has-children .mobile-toggle {
	text-align: center;
	opacity: 1;
}
/*submenu toggle icon when closed*/
ul.et_mobile_menu li.menu-item-has-children .mobile-toggle::after,
.et-db #et-boc .et-l ul.et_mobile_menu li.menu-item-has-children .mobile-toggle::after {
	top: 10px;
	position: relative;
	font-family: "ETModules";
	content: '\33';
	color: #00d263;
	background: #f0f3f6;
	border-radius: 50%;
	padding: 3px;
}
/*submenu toggle icon when open*/
ul.et_mobile_menu li.menu-item-has-children.dt-open>.mobile-toggle::after,
.et-db #et-boc .et-l ul.et_mobile_menu li.menu-item-has-children.dt-open>.mobile-toggle::after {
	content: '\32';
}
/*add point on top of the menu submenu dropdown*/
.et_pb_menu_0.et_pb_menu .et_mobile_menu:after {
	position: absolute;
	right: 5%;
	margin-left: -20px;
	top: -14px;
	width: 0;
	height: 0;
	content: '';
	border-left: 20px solid transparent;
	border-right: 20px solid transparent;
	border-bottom: 20px solid #ffffff;
}
/*adjust the position of the hamburger menu*/
.mobile_menu_bar {
	position: relative;
	display: block;
	bottom: 10px;
	line-height: 0;
}
/*force the background color and add a rounded border*/
.et_pb_menu_0.et_pb_menu .et_mobile_menu,
.et_pb_menu_0.et_pb_menu .et_mobile_menu ul {
	background-color: #ffffff!important;
	border-radius: 10px;
}
define( 'RECOVERY_MODE_EMAIL', 'myemail@example.com' );
from collections import deque

visited_states = []
total_moves = 70
expanded = 0
count = 0

class Node:
    def __init__(self, state, parent, operator, depth, cost):
        self.state = state
        self.parent = parent
        self.operator = operator
        self.depth = depth
        self.cost = cost

def create_node(state, parent, operator, depth, cost):
    return Node(state, parent, operator, depth, cost)

def expand_node(node):
    expanded_nodes = []
    
    temp_state = move_down(node.state)
    temp_node = create_node(temp_state, node, "down", node.depth + 1, node.cost + 1)
    expanded_nodes.append(temp_node)

    temp_state1 = move_up(node.state)
    temp_node1 = create_node(temp_state1, node, "up", node.depth + 1, node.cost + 1)
    expanded_nodes.append(temp_node1)

    temp_state2 = move_left(node.state)
    temp_node2 = create_node(temp_state2, node, "left", node.depth + 1, node.cost + 1)
    expanded_nodes.append(temp_node2)

    temp_state3 = move_right(node.state)
    temp_node3 = create_node(temp_state3, node, "right", node.depth + 1, node.cost + 1)
    expanded_nodes.append(temp_node3)

    return expanded_nodes

def move_left(state):
    swap = state.copy()
    idx = swap.index(0)
    if (idx == 0 or idx == 3 or idx == 6):
        return swap
    else:
        swap[idx - 1], swap[idx] = swap[idx], swap[idx - 1]
        return swap

def move_right(state):
    swap = state.copy()
    idx = swap.index(0)
    if (idx == 2 or idx == 5 or idx == 8):
        return swap
    else:
        swap[idx + 1], swap[idx] = swap[idx], swap[idx + 1]
        return swap

def move_up(state):
    swap = state.copy()
    idx = swap.index(0)
    if (idx == 0 or idx == 1 or idx == 2):
        return swap
    else:
        swap[idx - 3], swap[idx] = swap[idx], swap[idx - 3]
        return swap

def move_down(state):
    swap = state.copy()
    idx = swap.index(0)
    if (idx == 6 or idx == 7 or idx == 8):
        return swap
    else:
        swap[idx + 3], swap[idx] = swap[idx], swap[idx + 3]
        return swap

def bfs(start, goal):
    if (start == goal):
        return [None]
    else:
        to_be_expanded = []
        current_node = create_node(start, None, None, 0, 0)
        to_be_expanded.append(current_node)

        for i in range(total_moves):
            temp_expanded = []
            size = len(to_be_expanded)

            for j in range(size):
                if (to_be_expanded[j] in visited_states):
                    continue

                node_array = expand_node(to_be_expanded[j])

                for x in range(4):
                    if (node_array[x].state == goal):
                        count = i + 1
                        return node_array[x]
                    else:
                        temp_expanded.append(node_array[x])
                        visited_states.append(node_array[x].state)

            to_be_expanded.clear()
            to_be_expanded = temp_expanded.copy()
            temp_expanded.clear()

    return None

def main():
    method = 'bfs'
    length = 0
    x = 0
    x = x + 1

    board_input = input("Enter the initial state values (comma-separated): ")
    board_split = board_input.split(',')
    starting_state = [int(i) for i in board_split]

    goal_input = input("Enter the goal state values (comma-separated): ")
    goal_split = goal_input.split(',')
    goal_state = [int(i) for i in goal_split]

    if (len(starting_state) == 9 and len(goal_state) == 9):
        result = bfs(starting_state, goal_state)
        if result == None:
            print("No solution found")
        elif result == [None]:
            print("Start node was the goal!")
        else:
            print("Total number of moves needed =", result.cost)
            path = []
            path.append(result.state)
            current = result
            flag = True

            while flag:
                parent = current.parent
                prev_state = parent.state
                path.append(prev_state)
                current = parent

                if (prev_state == starting_state):
                    flag = False

            path.reverse()
            print("Step-wise Sequence of states from start to goal is ")
            for state in path:
                print(state[0], "|", state[1], "|", state[2])
                print(state[3], "|", state[4], "|", state[5])
                print(state[6], "|", state[7], "|", state[8])
                print()
    else:
        print("Invalid input")

if __name__ == "__main__":
    main()


.container {
   display: flex;
   flex-wrap: nowrap;
   overflow-x: auto;
   -webkit-overflow-scrolling: touch;
   -ms-overflow-style: -ms-autohiding-scrollbar; 
 }
.item {
  flex: 0 0 auto; 
}
#cssDisplay {
  background-color: #FFFFFF;
  color: #000000;
  border: 3px solid #1D2ECC;
  padding: 3px;
  margin: 3px;
  font-family: arial;
  font-style: normal;
  font-weight: normal;
  font-size: 16px;
  font-variant: normal;
  line-height: 20px;
  background-image: url(img2.png);
  background-repeat: repeat;
  background-position: 50% 50%;
  background-attachment: scroll;
  position: static;
  border-radius: 8px;
  box-shadow: -1px 1px 1px #4A4A48;
}
add_filter('woocommerce_add_to_cart_redirect', 'custom_add_to_cart_redirect');

function custom_add_to_cart_redirect($url) {
    global $woocommerce;
    $checkout_url = wc_get_checkout_url();

    return $checkout_url;
}
PRIVATE_KEY="85ffb028c98378602f3985302673390bd50cac7e43b6f7485b99165061e0adfd"
var payload = {
   "items":[
      {
         "className":"cmdb_ci_computer",
         "values":{
            "name":"acanpiesx01"
         }
      }
   ]
};

var jsonUntil = new JSON();
var input = jsonUntil.encode(payload);
var output = SNC.IdentificationEngineScriptableApi.identifyCI(input);
gs.print(output);
for ([expresion-inicial]; [condicion]; [expresion-final])sentencia
<div class="custom-shop">
	<div class="row">
	    <div class="col-md-12 col-md-12">
	    	<div class="cart">
	    		<?php echo do_shortcode( '[yith_wcwl_add_to_wishlist]' ); ?>
	    	    <a href="<?php echo get_site_url(); ?>/cart/?add-to-cart=<?php echo $product->get_ID(); ?>"><img src="<?php echo get_template_directory_uri() ?>/images/product-basket.png" alt=""></a>
	    	</div>
			<div class="image">
	            <a href="<?php the_permalink(); ?>">
	            	<img src="<?php the_post_thumbnail_url('full'); ?>">
	            </a>
	        </div>
	    	<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>

	    </div>
	</div>
</div>
int n=-1234;
		int r=0;
		n = n<0?-n:n;
		while(n>0){
		    int n1=n%10;
		    r=r*10+n1;
		    n/=10;
		}
		System.out.println(r);
		
		int n=8;
		int n1=0,n2=1;
		System.out.print(n1+" "+n2+" ");
		for(int i=2;i<n;i++){
		    int s=n1+n2;
		    System.out.print(s+" ");
		    n1=n2;n2=s;
		}
		
		int n1=98,n2=56;
		int s=Math.min(n1,n2);
		int l=Math.max(n1,n2);
		while(l%s!=0){
		    s=l%s;
		}
		System.out.print(s);

        int n=42;
        int m=n/2;
        int s=0;
        for(int i=1;i<=m;i++){
            if(n%i==0){
                s+=i;
            }
        }
        System.out.print(s==n);
        
        String s1="silent";
        String s2="listen";
        char[] arr1=s1.toCharArray();
        char[] arr2=s2.toCharArray();
        Arrays.sort(arr1);
        Arrays.sort(arr2);
        System.out.print(Arrays.equals(arr1,arr2));


		27-09-23===================================
          
        int []arr = {6,0,3,5,1,4,2};
		for(int i=0;i<arr.length-1;i++){
		    for(int j=i+1;j<arr.length;j++){
		        if(arr[i]>arr[j]){
		            arr[i]=arr[i]+arr[j];
		            arr[j]=arr[i]-arr[j];
		            arr[i]=arr[i]-arr[j];
		        }
		    }
		}
		for(int i:arr){
		    System.out.print(i+" ");
		}
		
		int a=10,b=21;
		a=(a+b);
		b=a-b;
		a=a-b;
		System.out.println(a+" "+b);

        String s="reppeaated";
        char c[]=s.toCharArray();
        Arrays.sort(c);
        char s1=' ';
        for(int i=0;i<c.length-1;i++){
            if(c[i]==c[i+1]){
                s1=c[i];
                continue;
            }
            if(i+1==c.length-1)
                System.out.print(c[i+1]);
            if(c[i]!=s1)
                System.out.print(c[i]);
        }
webpack.mix.js
اضف .vue()    عمل تغير فقط اضف ----
----------------------------------------------------------







const mix = require('laravel-mix');

/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel applications. By default, we are compiling the CSS
 | file for the application as well as bundling up all the JS files.
 |
 */

mix.js('resources/js/app.js', 'public/js').vue()
    .postCss('resources/css/app.css', 'public/css', [
        //
    ]);
rock = '''
    _______
---'   ____)
      (_____)
      (_____)
      (____)
---.__(___)
'''

paper = '''
    _______
---'   ____)____
          ______)
          _______)
         _______)
---.__________)
'''

scissors = '''
    _______
---'   ____)____
          ______)
       __________)
      (____)
---.__(___)
'''


print("Welcome to ROCK PAPER SCISSORS !! ")

user_choice = input("What do you choose? Type 0 for Rock, 1 for Paper or 2 for Scissors. \n")

if user_choice == "0":
  print(f"You chose: \n {rock}")
elif user_choice == "1":
  print(f"You chose: \n {paper}")
elif user_choice == "2":
  print(f"You chose: \n {scissors}")


import random



computer_choice = random.randint(0, 2)

if computer_choice == 0:
  print(f"computer chose:\n {rock}")
elif computer_choice == 1:
  print(f"computer chose:\n {paper}")
elif computer_choice == 2:
  print(f"computer chose:\n {scissors}")


if user_choice == "0" and computer_choice == 1:
  print("You lose")
elif user_choice == "1" and computer_choice == 2:
  print("You lose")
elif user_choice == "2" and computer_choice == 0:
  print("You lose")


elif user_choice == "1" and computer_choice == 0:
  print("You won!")
elif user_choice == "2" and computer_choice == 1:
  print("You won!")
elif user_choice == "0" and computer_choice == 2:
  print("You won!")


elif user_choice == "0" and computer_choice == 0:
  print("It's a tie!")
elif user_choice == "1" and computer_choice == 1:              or               elif computer_choice == user_cchoice
  print("It's a tie!")                                                              print("It's a Tie!")
elif user_choice == "2" and computer_choice == 2:
  print("It's a tie!")
row1 = ["⬜️","️⬜️","️⬜️"]
row2 = ["⬜️","⬜️","️⬜️"]
row3 = ["⬜️️","⬜️️","⬜️️"]
map = [row1, row2, row3]
print(f"{row1}\n{row2}\n{row3}")

position = input("Where do you want to put the treasure? ")

if position == "11":
    treasure_1 = row1[0] = "x"
    print("You Treasure is placed now! Arghh!! = {treasure_1}")
elif position == "21":
    treasure_2 = row1[1] = "x"
    print(f"You Treasure is placed now! Arghh!! = {treasure_2}")
elif position == "31":
    treasure_3 = row1[2] = "x"
    print(f"You Treasure is placed now! Arghh!! = {treasure_3}")
elif position == "12":
    treasure_4 = row2[0] = "x"
    print(f"You Treasure is placed now! Arghh!! = {treasure_4}")
elif position == "22":
    treasure_5 = row2[1] = "x"
    print(f"You Treasure is placed now! Arghh!! = {treasure_5}")
elif position == "32":
    treasure_6 = row2[2] = "x"
    print(f"You Treasure is placed now! Arghh!! = {treasure_6}")
elif position == "13":
    treasure_7 = row3[0] = "x"
    print(f"You Treasure is placed now! Arghh!! = {treasure_7}")
elif position == "23":
    treasure_8 = row3[1] = "x"
    print(f"You Treasure is placed now! Arghh!! = {treasure_8}")
elif position == "33":
    treasure_9 = row3[2] = "x"
    print(f"You Treasure is placed now! Arghh!! = {treasure_9}")

print(f"{row1}\n{row2}\n{row3}")
Bank Roulette
names_string = input("Give me everybody's names, separated by a comma. ")

names = names_string.split(", ")

import random
name_length = len(names)
payer = random.randint(0, name_length -1)
final_payer = names[payer]

print(f"{final_payer} has to pay the bill today.")
print("Welcome to Heads or Tail")
print("We're always here to solve your problem \n")
import random

toss_answer = random.randint(0, 1)

if toss_answer == 0:
    print("Sorry Bad Luck Tails, Heads won")
else:
    print("Sorry Bad Luck Heads, Tails won")
print('''
*******************************************************************************
          |                   |                  |                     |
 _________|________________.=""_;=.______________|_____________________|_______
|                   |  ,-"_,=""     `"=.|                  |
|___________________|__"=._o`"-._        `"=.______________|___________________
          |                `"=._o`"=._      _`"=._                     |
 _________|_____________________:=._o "=._."_.-="'"=.__________________|_______
|                   |    __.--" , ; `"=._o." ,-"""-._ ".   |
|___________________|_._"  ,. .` ` `` ,  `"-._"-._   ". '__|___________________
          |        :?|`"=._` , "` `; .". ,  "-._"-._; ;              |
 _________|___________| ;`-.o`"=._; ." ` '`."\` . "-._ /_______________|_______
|                   | |o;    `"-.o`"=._``  '` " ,__.--o;   |
|___________________|_| ;     (*) `-.o `"=.`_.--"_o.-; ;___|___________________
____/______/______/___|o;._    "      `".o|o_.--"    ;o;____/______/______/____
/______/______/______/_"=._o--._        ; | ;        ; ;/______/______/______/_
____/______/______/______/__"=._o--._   ;o|o;     _._;o;____/______/______/____
/______/______/______/______/____"=._o._; | ;_.--"o.--"_/______/______/______/_
____/______/______/______/______/_____"=.o|o_.--""___/______/______/______/____
/______/______/______/______/______/______/______/______/______/______/_____ /
*******************************************************************************
''')
print("Welcome to Treasure Island.")
print("Your mission is to find the treasure.")

l_or_r = input("You're at a crossroad. Where do you want to go type 'left' or 'right'.\n  ").lower()
if l_or_r == 'right':
  s_or_w = input("You are at a lake do you want swim across it or wait for a boat type 'swim' or 'wait'.\n ").lower()
  if s_or_w == 'swim':
    doors = input("You arrived at a island unharmed. There is a house with three doors 'red', 'blue' and 'yellow' which color do you want to choose.\n  ").lower()
    if doors == 'red':
      print("You are burned by fire. Game Over.")
    elif doors == 'blue':
      print("You are eaten by Vampires. Game Over.")
    elif doors == 'yellow':
      print("YAY you WIN!! You found the Treasure, there is lots of Gold, Money and Gifts in that room.")
  elif s_or_w == 'wait':
      print("Your boat has been attacked by piranahas. Game Over.")
elif l_or_r == 'left':
  print("You fell into a hole. Game Over.")
print("Welcome to the Love Calculator!")
name1 = input("What is your name? \n")
name2 = input("What is their name? \n")

lowered_name1 = name1.lower()
lowered_name2 = name2.lower()


name1_T = lowered_name1.count("t")
name1_R = lowered_name1.count("r")
name1_U = lowered_name1.count("u")
name1_E = lowered_name1.count("e")

name1_true = name1_T + name1_R + name1_U + name1_E

name2_T = lowered_name2.count("t")
name2_R = lowered_name2.count("r")
name2_U = lowered_name2.count("u")
name2_E = lowered_name2.count("e")

name2_true = name2_T + name2_R + name2_U + name2_E

name1_L = lowered_name1.count("l")
name1_O = lowered_name1.count("o")
name1_V = lowered_name1.count("v")
name1_E = lowered_name1.count("e")

name1_love = name1_L + name1_O + name1_V + name1_E

name2_L = lowered_name2.count("l")
name2_O = lowered_name2.count("o")
name2_V = lowered_name2.count("v")
name2_E = lowered_name2.count("e")

name2_love = name2_L + name2_O + name2_V + name2_E

true_names = name1_true + name2_true

love_names = name1_love + name2_love

str_true_names = str(true_names)
str_love_names = str(love_names)

LOVE_SCORE = str_true_names + str_love_names

LOVE_SCORE_int = int(LOVE_SCORE)

if LOVE_SCORE_int < 10 or LOVE_SCORE_int > 90:
    print(f"Your score is {LOVE_SCORE_int}, you go together like coke and mentos.")
elif LOVE_SCORE_int >= 40 and LOVE_SCORE_int <= 50:
    print(f"Your score is {LOVE_SCORE_int}, you are alright together.")
else:
    print(f"Your score is {LOVE_SCORE_int}.")


print("Welcome to the Love Calculator!")
name1 = input("What is your name? \n")
name2 = input("What is their name? \n")

lowered_name1 = name1.lower()
lowered_name2 = name2.lower()

names_T = lowered_name1.count("t") + lowered_name2.count("t")
names_R = lowered_name1.count("r") + lowered_name2.count("r")
names_U = lowered_name1.count("u") + lowered_name2.count("u")
names_E = lowered_name1.count("e") + lowered_name2.count("e")

true = names_T + names_R + names_U + names_E

names_L = lowered_name1.count("l") + lowered_name2.count("l")
names_O = lowered_name1.count("o") + lowered_name2.count("o")
names_V = lowered_name1.count("v") + lowered_name2.count("v")
names_E = lowered_name1.count("e") + lowered_name2.count("e")

love = names_L + names_O + names_V + names_E

str_true = str(true)
str_love = str(love)

love_score = str_true + str_love

int_love_score = int(love_score)

if int_love_score < 10 or int_love_score > 90:
    print(f"Your score is {int_love_score}, you go together like coke and mentos.")
elif int_love_score >= 40 and int_love_score <= 50:
    print(f"Your score is {int_love_score}, you are alright together.")
else:
    print(f"Your score is {int_love_score}.")
print("Welcome to the rollercoaster!")
height = int(input("What is your height in cm? "))
if height > 120:
    age = int(input("What is your age?"))
    if age < 12:
        bill = 5
    elif age <= 18:
        bill = 7
    elif age >= 45 and age <= 55:
        bill = 0
    elif age > 18:
        bill = 12

    want_photos = input("Do you want photos type Y or N.")
    if want_photos == "Y":
            bill += 3
            print(f"The final bill is ${bill}.")
    else:
            print(f"The final bill is ${bill}")
else:
    print("Sorry you have to grow taller before you can ride.")
print("Welcome to Python Pizza Deliveries!")
size = input(" What size of pizza do you want? S, M, or L")
bill = 0

small_size = 15
medium_size = 20
large_size = 25

if size == "S":
    bill = small_size
elif size == "M":
    bill = medium_size
else:
    bill = large_size

pepperoni = input("Do you want pepperoni? Y or N")
if pepperoni == "Y":
    if size == "S":
        bill += 2
    else:
        bill += 3
else:
    bill

extra_cheese = input("Do you want extra cheese? Y or N")
if extra_cheese == "Y":
    bill += 1
else:
    bill

print(f"The final bill is ${bill}.")
year = int(input("Which year do you want to check?"))
if year % 4 == 0:
    if year % 100 == 0:
        if year % 400 == 0:
            print("It's a leap year.")
        else:
            print("It's not a leap year.")
    else:
        print("It's a leap year.")
else:
 print("It's not a leap year.")
print("Welcome to BMI calculator 2.O")

weight = float(input("Please enter your weight in kg:\n"))
height = float(input("Please enter your height in m:\n"))
BMI = round(weight / height ** 2, 2)
if BMI < 18.5:
    print(f"Your BMI is {BMI}, you are underweight")
elif (BMI > 18.5) and (BMI < 25):
    print(f"Your BMI is {BMI}, you have a normal weight")
elif (BMI > 25) and (BMI < 30):
    print(f"Your BMI is {BMI}, You are slightly overweight")
elif (BMI > 30) and (BMI < 35):
    print(f"You BMI is {BMI}, You are clinically obese")
else:
    print(f"Your BMI is {BMI}, you are clinically obese")
number = int(input("Which number do you want to check"))
if number % 2 == 0:
    print("This is an even number.")
else:
    print("This is an odd number.")
bill = float(input("What was the bill? "))
tip = int(input("what percentage tip would you like to give? 10, 12, 15? "))
people_to_split = int(input("How many people are there to split? "))
total_bill = bill * (1 + tip / 100)
bill_per_person = round(total_bill / people_to_split, 2)
print(f"each person needs to pay {bill_per_person}")
age = int(input("What is your current age?"))
new_age = 90 - age
days_left = new_age * 365
weeks_left = new_age * 52
months_left = new_age * 12
print(f"you have {days_left} days, {weeks_left} weeks and {months_left} months left.")
print("Welcome to BMI calculator")

weight = float(input("Please enter your weight in kg:\n"))
height = float(input("Please enter your height in m:\n"))
BMI = weight / height ** 2
new_BMI = int(BMI)
print(f"Your BMI is {new_BMI}")
num = input("Please enter a two digit number.")
digit_1 = num[0]
digit_2 = num[1]
result = int(digit_1) + int(digit_2)

print(result)
star

Wed Sep 27 2023 06:38:30 GMT+0000 (Coordinated Universal Time)

@abab

star

Wed Sep 27 2023 06:28:08 GMT+0000 (Coordinated Universal Time)

@abab

star

Wed Sep 27 2023 02:55:55 GMT+0000 (Coordinated Universal Time)

@uwu

star

Wed Sep 27 2023 02:46:38 GMT+0000 (Coordinated Universal Time) https://www.youtube.com/watch?v=nwLV5Txc8jM&ab_channel=Codecademy

@cruz

star

Wed Sep 27 2023 02:19:41 GMT+0000 (Coordinated Universal Time)

@kimthanh1511

star

Tue Sep 26 2023 23:44:44 GMT+0000 (Coordinated Universal Time) https://app.slack.com/block-kit-builder/T49PT3R50#%7B%22blocks%22:%5B%7B%22type%22:%22header%22,%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22:female-technologist::rocket::technologist:HACKATHON%202023%20%20%7C%20%20%2002%20-%2006%20OCTOBER:female-technologist::rocket::technologist:%22%7D%7D,%7B%22type%22:%22context%22,%22elements%22:%5B%7B%22text%22:%22*September%2027,%202023*%20%20%7C%20%20WX%20Announcements%22,%22type%22:%22mrkdwn%22%7D%5D%7D,%7B%22type%22:%22divider%22%7D,%7B%22type%22:%22section%22,%22text%22:%7B%22type%22:%22mrkdwn%22,%22text%22:%22The%20Hackathon%20week%20is%20just%20around%20the%20corner,%20and%20we're%20thrilled%20to%20share%20what's%20happening%20in%20our%20offices%20to%20make%20this%20event%20extra%20special.%20%5Cn%5Cn%5Cn%5Cn%20*DAILY%20CATERING*%20%5Cn%5Cn%20:beverage_box:*MONDAY*-%20Brain%20Juice%20Monday:%20Start%20your%20week%20with%20a%20burst%20of%20energy!%20Enjoy%20delicious%20and%20healthy%20juices%20to%20kickstart%20your%20day.%20%5Cn%5Cn:croissant:*TUESDAY*-%20Breakfast%20Social:%20Join%20us%20for%20a%20morning%20social%20to%20fuel%20up%20with%20a%20hearty%20breakfast%20and%20connect%20with%20colleagues.%20%5Cn%5Cn:doughnut:*WEDNESDAY*-%20Afternoon%20Sugar%20Rush:%20Satisfy%20your%20sweet%20tooth%20with%20donuts%20and%20cupcakes%20in%20the%20afternoon.%20%5Cn%5Cn:stuffed_flatbread:*THURSDAY*-%20Fuel%20Up%20Lunch:%20A%20nutritious%20lunch%20to%20keep%20your%20energy%20levels%20high%20and%20your%20creativity%20flowing.%20%5Cn%5Cn:taco:*FRIDAY*-%20DIY%20Food%20Station:%20Customise%20your%20own%20meals%20at%20our%20DIY%20food%20station.%5Cn%5Cn%5Cn%5Cn%20These%20activations%20are%20designed%20to%20keep%20you%20energised%20and%20inspired%20throughout%20the%20Hackathon.%20Stay%20tuned%20for%20more%20updates%20and%20details%20on%20these%20exciting%20events!%20%5Cn%5Cn%5Cn%5Cn%20*Thank%20you,*%5Cn%5Cn*WX*%20:wx:%22%7D%7D,%7B%22type%22:%22divider%22%7D%5D%7D

@FOHWellington

star

Tue Sep 26 2023 23:44:19 GMT+0000 (Coordinated Universal Time) https://blogs.msmvps.com/bsonnino/2016/11/24/alternate-data-streams-in-c/

@dhfinch

star

Tue Sep 26 2023 17:58:18 GMT+0000 (Coordinated Universal Time)

@nikanika4425

star

Tue Sep 26 2023 17:57:42 GMT+0000 (Coordinated Universal Time)

@nikanika4425

star

Tue Sep 26 2023 17:41:18 GMT+0000 (Coordinated Universal Time)

@nikanika4425

star

Tue Sep 26 2023 17:27:30 GMT+0000 (Coordinated Universal Time)

@haibatov

star

Tue Sep 26 2023 17:03:39 GMT+0000 (Coordinated Universal Time)

@nikanika4425

star

Tue Sep 26 2023 14:47:06 GMT+0000 (Coordinated Universal Time)

@shirnunn

star

Tue Sep 26 2023 14:35:54 GMT+0000 (Coordinated Universal Time)

@shirnunn

star

Tue Sep 26 2023 14:02:24 GMT+0000 (Coordinated Universal Time)

@destinyChuck #javascript

star

Tue Sep 26 2023 13:39:52 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/43397688/how-do-i-fix-a-vue-packages-version-mismatch-error-on-laravel-spark-v4-0-9

@oday #javascript

star

Tue Sep 26 2023 12:23:38 GMT+0000 (Coordinated Universal Time)

@nikanika4425

star

Tue Sep 26 2023 12:22:12 GMT+0000 (Coordinated Universal Time)

@nikanika4425

star

Tue Sep 26 2023 12:05:10 GMT+0000 (Coordinated Universal Time)

@hedviga

star

Tue Sep 26 2023 08:51:12 GMT+0000 (Coordinated Universal Time)

@Roelinde #php

star

Tue Sep 26 2023 07:24:55 GMT+0000 (Coordinated Universal Time) https://pypi.org/project/streamlit-chat/

@neuromancer

star

Tue Sep 26 2023 07:23:35 GMT+0000 (Coordinated Universal Time)

@ronin_78 #c++

star

Tue Sep 26 2023 06:26:13 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/40559629/how-to-make-a-horizontal-scrolling-carousel-using-flexbox

@hirsch #html #css

star

Tue Sep 26 2023 06:05:32 GMT+0000 (Coordinated Universal Time) https://www.cssportal.com/css-style-editor/

@SapphireElite #css

star

Tue Sep 26 2023 05:47:43 GMT+0000 (Coordinated Universal Time)

@Alihaan #php

star

Tue Sep 26 2023 05:44:57 GMT+0000 (Coordinated Universal Time)

@azeezabidoye

star

Tue Sep 26 2023 05:28:08 GMT+0000 (Coordinated Universal Time)

@azeezabidoye

star

Tue Sep 26 2023 03:00:48 GMT+0000 (Coordinated Universal Time)

@RahmanM #ire #identify #ci

star

Mon Sep 25 2023 23:49:38 GMT+0000 (Coordinated Universal Time) https://developer.mozilla.org/es/docs/Web/JavaScript/Reference/Statements/for

@marcton

star

Mon Sep 25 2023 21:56:58 GMT+0000 (Coordinated Universal Time)

@hamzakhan123

star

Mon Sep 25 2023 20:11:50 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/74607996/how-to-add-custom-local-fonts-to-a-nextjs-13-tailwind-project

@MuhammadAhmad

star

Mon Sep 25 2023 19:53:13 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/48220709/how-to-safely-remove-laravel-debugbar

@oday #php

star

Mon Sep 25 2023 19:28:31 GMT+0000 (Coordinated Universal Time) https://www.onlinegdb.com/online_java_compiler

@samee

star

Mon Sep 25 2023 19:24:48 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/65607153/how-to-fix-the-error-you-may-need-an-appropriate-loader-to-handle-this-file-typ

@oday #javascript

star

Mon Sep 25 2023 19:21:07 GMT+0000 (Coordinated Universal Time)

@Duhita0209

star

Mon Sep 25 2023 19:20:05 GMT+0000 (Coordinated Universal Time)

@Duhita0209

star

Mon Sep 25 2023 19:19:16 GMT+0000 (Coordinated Universal Time)

@Duhita0209

star

Mon Sep 25 2023 19:18:24 GMT+0000 (Coordinated Universal Time)

@Duhita0209

star

Mon Sep 25 2023 19:17:18 GMT+0000 (Coordinated Universal Time)

@Duhita0209

star

Mon Sep 25 2023 19:15:48 GMT+0000 (Coordinated Universal Time)

@Duhita0209

star

Mon Sep 25 2023 19:08:35 GMT+0000 (Coordinated Universal Time)

@Duhita0209

star

Mon Sep 25 2023 19:07:36 GMT+0000 (Coordinated Universal Time)

@Duhita0209

star

Mon Sep 25 2023 19:06:24 GMT+0000 (Coordinated Universal Time)

@Duhita0209

star

Mon Sep 25 2023 19:05:23 GMT+0000 (Coordinated Universal Time)

@Duhita0209

star

Mon Sep 25 2023 19:04:34 GMT+0000 (Coordinated Universal Time)

@Duhita0209

star

Mon Sep 25 2023 19:03:11 GMT+0000 (Coordinated Universal Time)

@Duhita0209

star

Mon Sep 25 2023 19:02:15 GMT+0000 (Coordinated Universal Time)

@Duhita0209

star

Mon Sep 25 2023 18:59:59 GMT+0000 (Coordinated Universal Time)

@Duhita0209

star

Mon Sep 25 2023 18:59:06 GMT+0000 (Coordinated Universal Time)

@Duhita0209

Save snippets that work with our extensions

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