Snippets Collections
/* styles.css */

/* Change the text color of the <h1> element to red */
h1 {
    color: red;
}

/* Change the text color of the <p> element to blue */
p {
    color: blue;
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Text Color Example</title>
    <!-- Link your CSS file here -->
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <h1>Welcome to My Webpage</h1>
    <p>This is a sample paragraph with text that we'll style.</p>
</body>
</html>
}


#include <iostream>

using namespace std;

int main()
{
    int N ; 
    int X[N] ; 
    cin>>N ; 
    for(int i=0 ;i<N ;i++ ) { 
        cin>>X[i] ; 
    } 
    
    for(int i=0;i<N-1 ;i++ ){ 
        int M=X[i] ; //M=3
        int ind ; 
        for(int J=i+1 ;J<N ;J++){  // 0 1 2 3 4 
                                   // 1 3 2

            if(X[J]<M){
                M=X[J] ; 
                ind=J ;           //1 
                
            } 
            
         
    }  
    int temp =X[i] ; 
    X[i]=M ; 
    X[ind]=temp ;
    } 
    for(int i=0 ;i<N ;i++){
        cout<<X[i]<<" ";
    }
    
    

    return 0;
}
docker save <image>:<tag> | pigz > <image>.tar.gz
docker save <image>:<tag> | gzip > <image>.tar.gz
docker save <image>:<tag> | zstd > <image>.tar.zst

docker load -i <image>.tar.gz
docker load -i <image>.tar.zst
/*CSS*/
.wrap{
  background-color:#ccc;
  margin:0 auto;
  width:800px;
  padding:20px;
}

p{
  color:#999;
}

img{
  float:right;
  border-radius:10px;
}
<!--Html-->
<div class="wrap">
<p><img src="https://cdn.logo.com/hotlink-ok/logo-social.png" width="200px">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quis laboriosam consectetur 
quo obcaecati a ab sequi veritatis voluptas, repudiandae dignissimos beatae nesciunt 
perspiciatis! Ipsa odio et obcaecati minus, mollitia id!
Fugiat architecto suscipit officiis placeat porro nam exercitationem sit corporis eligendi, 
laborum quaerat enim quia obcaecati magnam voluptas accusantium soluta! Itaque voluptas porro 
nihil vel quos placeat! Quos, magni impedit.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quibusdam quasi nam soluta est. 
Ullam eligendi fugiat iusto id, laudantium nesciunt quo minima repellat nam vitae! Eum sunt 
esse reprehenderit voluptatibus.
Voluptatem, hic aut nesciunt maiores odio inventore provident necessitatibus fugit nisi 
expedita amet unde labore culpa, delectus doloribus molestiae incidunt officiis, reiciendis debitis. Recusandae libero autem rem necessitatibus nostrum enim!
</p>
</div>
const formatPrice = (price) => {
  let formattedPrice = new Intl.NumberFormat('en-AU', { // comes from the Numberforamatted API JS
    style: 'currency',
    currency: 'AUD'
  }).format((price/100).toFixed(2));
  return formattedPrice;
}
#include <stdio.h>

void swap(int* a, int* b) {
    int temp = *a;
    *a = *b;
    *b = temp;
}

int partition(int arr[], int low, int high) {
    int pivot = arr[high];  // Choose the last element as the pivot
    int i = (low - 1);     // Index of the smaller element

    for (int j = low; j <= high - 1; j++) {
        // If the current element is smaller than or equal to the pivot
        if (arr[j] <= pivot) {
            i++;  // Increment the index of the smaller element
            swap(&arr[i], &arr[j]);
        }
    }
    swap(&arr[i + 1], &arr[high]);
    return (i + 1);
}

void quickSort(int arr[], int low, int high) {
    if (low < high) {
        // Partitioning index
        int pi = partition(arr, low, high);

        // Recursively sort elements before and after partition
        quickSort(arr, low, pi - 1);
        quickSort(arr, pi + 1, high);
    }
}

int main() {
    int arr[] = {12, 11, 13, 5, 6, 7};
    int size = sizeof(arr) / sizeof(arr[0]);

    printf("Original Array: ");
    for (int i = 0; i < size; i++) {
        printf("%d ", arr[i]);
    }

    quickSort(arr, 0, size - 1);

    printf("\nSorted Array: ");
    for (int i = 0; i < size; i++) {
        printf("%d ", arr[i]);
    }

    return 0;
}
def partition(arr, low, high):
    pivot = arr[high]  # Choose the last element as the pivot
    i = low - 1  # Index of the smaller element

    for j in range(low, high):
        # If the current element is smaller than or equal to the pivot
        if arr[j] <= pivot:
            i += 1  # Increment the index of the smaller element
            arr[i], arr[j] = arr[j], arr[i]

    arr[i + 1], arr[high] = arr[high], arr[i + 1]
    return i + 1

def quickSort(arr, low, high):
    if low < high:
        # Partitioning index
        pi = partition(arr, low, high)

        # Recursively sort elements before and after partition
        quickSort(arr, low, pi - 1)
        quickSort(arr, pi + 1, high)

if __name__ == "__main__":
    arr = [12, 11, 13, 5, 6, 7]

    print("Original Array:", arr)

    quickSort(arr, 0, len(arr) - 1)

    print("Sorted Array:", arr)
import React from 'react';

class MyComponent extends React.Component {
  render() {
    const isLoggedIn = true;


    return (
      <div>
        <p>{isLoggedIn? "We have a user" : "No user"}</p> 
      </div>
    );
  }
}

export default MyComponent;
condition ? expression_if_true : expression_if_false;
private void WheelsAnimation()
    {
        for (int i = 0; i < wheelCollider.Length; i++)
        {
            Vector3 pos = new Vector3(0, 0, 0);
            Quaternion quat = new Quaternion();
            wheelCollider[i].GetWorldPose(out pos, out quat);

            // Update Wheel Prefabs rotation and position
            wheelPrefabs[i].transform.rotation = quat;
            wheelPrefabs[i].transform.position = pos;
        }
    }
function arrayDiff(a, b) {
  return a.filter(x => !b.includes(x))
}
let lastLcp;
const po = new PerformanceObserver((entryList) => {
  const entries = entryList.getEntries();
  for (const entry of entries) {
    if (entry.startTime !== lastLcp) {
      console.log(
        `New LCP: ${entry.startTime}ms
Size: ${entry.size} px^2
HTML: ${entry.element ? entry.element .outerHTML.slice(0, 80): "(no element)"}`
      );
      lastLcp = entry.startTime;
    }
  }
});
po.observe({ type: "largest-contentful-paint", buffered: true });
def merge(arr, left, right):
    i = j = k = 0

    while i < len(left) and j < len(right):
        if left[i] < right[j]:
            arr[k] = left[i]
            i += 1
        else:
            arr[k] = right[j]
            j += 1
        k += 1

    while i < len(left):
        arr[k] = left[i]
        i += 1
        k += 1

    while j < len(right):
        arr[k] = right[j]
        j += 1
        k += 1

def merge_sort(arr):
    if len(arr) > 1:
        mid = len(arr) // 2
        left = arr[:mid]
        right = arr[mid:]

        merge_sort(left)
        merge_sort(right)

        merge(arr, left, right)

if __name__ == "__main__":
    input_str = input("Enter space-separated integers to sort: ")
    arr = [int(x) for x in input_str.split()]

    print("Original Array:", arr)

    merge_sort(arr)

    print("Sorted Array:", arr)
def merge(arr, left, right):
    i = j = k = 0

    while i < len(left) and j < len(right):
        if left[i] < right[j]:
            arr[k] = left[i]
            i += 1
        else:
            arr[k] = right[j]
            j += 1
        k += 1

    while i < len(left):
        arr[k] = left[i]
        i += 1
        k += 1

    while j < len(right):
        arr[k] = right[j]
        j += 1
        k += 1

def merge_sort(arr):
    if len(arr) > 1:
        mid = len(arr) // 2
        left = arr[:mid]
        right = arr[mid:]

        merge_sort(left)
        merge_sort(right)

        merge(arr, left, right)

if __name__ == "__main__":
    arr = [12, 11, 13, 5, 6, 7]    
    print("Original Array:", arr)    
    merge_sort(arr)    
    print("Sorted Array:", arr)
#include <stdio.h>

void merge(int arr[], int left[], int leftSize, int right[], int rightSize) {
    int i = 0, j = 0, k = 0;

    while (i < leftSize && j < rightSize) {
        if (left[i] < right[j]) {
            arr[k++] = left[i++];
        } else {
            arr[k++] = right[j++];
        }
    }

    while (i < leftSize) {
        arr[k++] = left[i++];
    }

    while (j < rightSize) {
        arr[k++] = right[j++];
    }
}

void mergeSort(int arr[], int size) {
    if (size > 1) {
        int mid = size / 2;
        int left[mid];
        int right[size - mid];

        for (int i = 0; i < mid; i++) {
            left[i] = arr[i];
        }
        for (int i = mid; i < size; i++) {
            right[i - mid] = arr[i];
        }

        mergeSort(left, mid);
        mergeSort(right, size - mid);
        merge(arr, left, mid, right, size - mid);
    }
}

int main() {
    int arr[] = {12, 11, 13, 5, 6, 7};
    int size = sizeof(arr) / sizeof(arr[0]);

    printf("Original Array: ");
    for (int i = 0; i < size; i++) {
        printf("%d ", arr[i]);
    }

    mergeSort(arr, size);

    printf("\nSorted Array: ");
    for (int i = 0; i < size; i++) {
        printf("%d ", arr[i]);
    }

    return 0;
}
#include <stdio.h>

void merge(int arr[], int left[], int leftSize, int right[], int rightSize) {
    int i = 0, j = 0, k = 0;

    while (i < leftSize && j < rightSize) {
        if (left[i] < right[j]) {
            arr[k++] = left[i++];
        } else {
            arr[k++] = right[j++];
        }
    }

    while (i < leftSize) {
        arr[k++] = left[i++];
    }

    while (j < rightSize) {
        arr[k++] = right[j++];
    }
}

void mergeSort(int arr[], int size) {
    if (size > 1) {
        int mid = size / 2;
        int left[mid];
        int right[size - mid];

        for (int i = 0; i < mid; i++) {
            left[i] = arr[i];
        }
        for (int i = mid; i < size; i++) {
            right[i - mid] = arr[i];
        }

        mergeSort(left, mid);
        mergeSort(right, size - mid);
        merge(arr, left, mid, right, size - mid);
    }
}

int main() {
    int size;

    printf("Enter the number of elements: ");
    scanf("%d", &size);

    int arr[size];

    printf("Enter %d integers separated by spaces: ", size);
    for (int i = 0; i < size; i++) {
        scanf("%d", &arr[i]);
    }

    printf("Original Array: ");
    for (int i = 0; i < size; i++) {
        printf("%d ", arr[i]);
    }

    mergeSort(arr, size);

    printf("\nSorted Array: ");
    for (int i = 0; i < size; i++) {
        printf("%d ", arr[i]);
    }

    return 0;
}
docker commit -c "CMD 'redis-server'" CONTAINERID
# This function chooses at random which action to be performed within the range 
# of all the available actions.
def ActionChoice(available_actions_range):
    if(sum(PossibleAction)>0):
        next_action = int(ql.random.choice(PossibleAction,1))
    if(sum(PossibleAction)<=0):
        next_action = int(ql.random.choice(5,1))
    return next_action

# Sample next action to be performed
action = ActionChoice(PossibleAction)
#include <iostream>
using namespace std;

int main()
{
    int points_a[3] = {1, 2, 3};
    int points_b[3] = {4, 5, 6};
    int points_c[3] = {7, 8, 9};
    
    // Good Practice
    int points[3][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
    cout << points[1][2]; // 6
    cout << points[2][0]; // 7
    cout << points[2][2]; // 9
    
    // Bad Practice
    // int points[3][3] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
    // cout << points[1][2]; // 6
    // cout << points[2][0]; // 7
    // cout << points[2][2]; // 9
    return 0;
}
#include <iostream>
using namespace std;

int main()
{
    int nums[4];
    
    nums[0] = 100; // First Element
    nums[1] = 200; // Second Element
    nums[2] = 300; // Before Last Element
    nums[3] = 400; // Last Element

    cout << "Element 1: " << nums[0] << "\n";
    cout << "Element 2: " << nums[1] << "\n";
    cout << "Element 3: " << nums[2] << "\n";
    cout << "Element 4: " << nums[3] << "\n";
    
    nums[1] = 1000; // Second Element
    
    cout << "Element 2: " << nums[1] << "\n";
    
    int anums[] = {100, 200, 300, 400, 500, 600}; // 24 bytes / 4 bytes (1 array) 
    cout << "Array Elements Count Is: " << sizeof(anums) / sizeof(anums[1])<< "\n";
    
    
    return 0;
}
<!--Html-->

<div class="box">
	<p>Hi I'm here.</p>
</div>
/*CSS*/

.papa{
    position: relative;
    background-color:#EFF1F5;
    text-align: center;
    height: 200px;
    border-radius: 10px; 
}

.child{
    position: absolute;
    top:10px;
    left: 10px;
    background-color:#002bc7;
    color: #fff;  
    padding: 50px;
    border-radius: 10px;   
}
<div class="papa">
<div class="child"><h2>Child</h2></div>
</div>
/*CSS*/
span{
    position: relative;
    top:20px;
    font-weight: bold;
    background-color:#0037FF;
    color:#fff;
}
<!--Html-->
<p>Hi I'm<span>here.</span>ya</p>
/*CSS*/

a{
  padding:10px;
  color:#4285F4;
  text-decoration:none;
  background-color:#E0F0FF;
  border-radius:8px;
}
<!--Html-->

<a href="#">btn</a>
<a href="#">btn1</a>
/* 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
star

Thu Sep 28 2023 10:10:17 GMT+0000 (Coordinated Universal Time)

@Remi

star

Thu Sep 28 2023 10:08:11 GMT+0000 (Coordinated Universal Time)

@Remi

star

Thu Sep 28 2023 07:49:29 GMT+0000 (Coordinated Universal Time) https://www.onlinegdb.com/online_c++_compiler

@70da_vic2002

star

Thu Sep 28 2023 07:16:49 GMT+0000 (Coordinated Universal Time) https://maticz.com/binance-clone-script

@jamielucas #drupal

star

Thu Sep 28 2023 07:08:18 GMT+0000 (Coordinated Universal Time) https://www.cnblogs.com/yzpopulation/p/15865936.html

@huangxinyu #commandline

star

Thu Sep 28 2023 05:35:57 GMT+0000 (Coordinated Universal Time)

@abab

star

Thu Sep 28 2023 05:29:14 GMT+0000 (Coordinated Universal Time)

@abab

star

Thu Sep 28 2023 03:55:48 GMT+0000 (Coordinated Universal Time)

@davidmchale #javascript

star

Thu Sep 28 2023 02:06:24 GMT+0000 (Coordinated Universal Time)

@prachi

star

Thu Sep 28 2023 02:05:29 GMT+0000 (Coordinated Universal Time)

@prachi

star

Wed Sep 27 2023 19:25:04 GMT+0000 (Coordinated Universal Time)

@Emmanuel

star

Wed Sep 27 2023 19:22:52 GMT+0000 (Coordinated Universal Time)

@Emmanuel

star

Wed Sep 27 2023 18:22:43 GMT+0000 (Coordinated Universal Time)

@juanesz

star

Wed Sep 27 2023 18:02:34 GMT+0000 (Coordinated Universal Time) https://dnevnik.ru/marks

@Serkirill

star

Wed Sep 27 2023 18:01:50 GMT+0000 (Coordinated Universal Time) https://dnevnik.ru/marks

@Serkirill

star

Wed Sep 27 2023 16:25:18 GMT+0000 (Coordinated Universal Time)

@Paloma

star

Wed Sep 27 2023 15:38:27 GMT+0000 (Coordinated Universal Time) https://www.debugbear.com/docs/metrics/largest-contentful-paint

@dpavone

star

Wed Sep 27 2023 14:29:33 GMT+0000 (Coordinated Universal Time)

@prachi

star

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

@prachi

star

Wed Sep 27 2023 14:11:36 GMT+0000 (Coordinated Universal Time)

@prachi

star

Wed Sep 27 2023 14:10:03 GMT+0000 (Coordinated Universal Time)

@prachi

star

Wed Sep 27 2023 12:52:20 GMT+0000 (Coordinated Universal Time) https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign

@Paloma

star

Wed Sep 27 2023 12:32:46 GMT+0000 (Coordinated Universal Time) https://www.udemy.com/course/microservices-with-node-js-and-react/learn/lecture/19223722

@jalalrafiyev

star

Wed Sep 27 2023 07:59:17 GMT+0000 (Coordinated Universal Time) https://github.com/PacktPublishing/Artificial-Intelligence-By-Example/blob/master/Chapter01/mdp02.py

@paolo #python

star

Wed Sep 27 2023 07:46:47 GMT+0000 (Coordinated Universal Time)

@akaeyad

star

Wed Sep 27 2023 07:35:31 GMT+0000 (Coordinated Universal Time)

@akaeyad

star

Wed Sep 27 2023 07:35:15 GMT+0000 (Coordinated Universal Time)

@abab

star

Wed Sep 27 2023 07:25:59 GMT+0000 (Coordinated Universal Time)

@abab

star

Wed Sep 27 2023 07:24:27 GMT+0000 (Coordinated Universal Time)

@abab

star

Wed Sep 27 2023 07:14:54 GMT+0000 (Coordinated Universal Time)

@abab

star

Wed Sep 27 2023 07:10:15 GMT+0000 (Coordinated Universal Time)

@abab

star

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

@abab

star

Wed Sep 27 2023 06:46:03 GMT+0000 (Coordinated Universal Time)

@abab

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

Save snippets that work with our extensions

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