Snippets Collections
document.addEventListener("DOMContentLoaded", function() {
  const addIcon = document.getElementById("add-icon");
  const dropdownMenu = document.getElementById("dropdown-menu");
  const wordInput = document.getElementById("word-input");
  const numWordsInput = document.getElementById("num-words-input");
  const generateButton = document.getElementById("generate-button");
  const resultElement = document.getElementById("word-list");
  const resetButton = document.getElementById("reset");
  const saveButton = document.createElement("button");
  saveButton.id = "save-button";
  saveButton.textContent = "Save";
  resetButton.insertAdjacentElement("afterend", saveButton);
  const modal = document.getElementById("listModal");
  const modalBody = document.getElementById("modal-body");
  const createListButton = document.getElementById("create-list");
  const viewListButton = document.getElementById("view-list");
  const closeModalButton = document.getElementById("close-modal");
  const deleteAllButton = document.createElement("button");
  deleteAllButton.id = "delete-all";
  deleteAllButton.textContent = "Delete All";
  closeModalButton.insertAdjacentElement("afterend", deleteAllButton);

  // Store lists in local storage
  let lists = JSON.parse(localStorage.getItem('lists')) || [];
  let definitionMap = {};

  // Toggle dropdown menu visibility
  addIcon.addEventListener("click", function() {
      dropdownMenu.style.display = dropdownMenu.style.display === "block" ? "none" : "block";
  });

  // Hide the dropdown menu if the user clicks outside of it
  document.addEventListener("click", function(event) {
      if (!addIcon.contains(event.target) && !dropdownMenu.contains(event.target)) {
          dropdownMenu.style.display = "none";
      }
  });

  // Create List button click handler
  createListButton.addEventListener("click", function() {
      openCreateListModal();
  });

  // View List button click handler
  viewListButton.addEventListener("click", function() {
      openViewListModal();
  });

  // Close modal when the user clicks on Close button
  closeModalButton.addEventListener("click", function() {
      modal.style.display = "none";
  });

  // Close modal when the user clicks outside of the modal
  window.addEventListener("click", function(event) {
      if (event.target === modal) {
          modal.style.display = "none";
      }
  });

  // Create Flip Card
function createFlipCard(word) {
  const card = document.createElement('li');
  card.classList.add('flip-container');
  card.innerHTML = `
    <div class="flip-card">
      <div class="front">${word}</div>
      <div class="back">${definitionMap[word] || 'Definition not found'}</div>
    </div>
  `;

  card.addEventListener('click', () => {
    card.querySelector('.flip-card').classList.toggle('flipped');
  });

  return card;
}


  // Generate random words with definitions
  async function generateRandomWords() {
      resultElement.classList.remove("error");

      const words = wordInput.value.split(",").map(word => word.trim()).filter(word => word !== "");
      if (words.length === 0) {
          resultElement.classList.add("error");
          resultElement.innerHTML = "Please enter some words separated by commas.";
          return;
      }

      const numWords = Math.min(numWordsInput.value, words.length);
      let selectedWords = getRandomWords(words, numWords);

      resultElement.innerHTML = ''; // Clear previous results
      for (const word of selectedWords) {
          const definition = await fetchDefinition(word);
          definitionMap[word] = definition;
          resultElement.appendChild(createFlipCard(word));
      }
      updateWordCounter();
  }

  // Get random words from the list
  function getRandomWords(words, numWords) {
      const shuffled = words.sort(() => 0.5 - Math.random());
      return shuffled.slice(0, numWords);
  }

  // Fetch word definition from API
  async function fetchDefinition(word) {
      try {
          const response = await fetch(`https://api.dictionaryapi.dev/api/v2/entries/en/${word}`);
          if (!response.ok) {
              if (response.status === 404) {
                  return "Definition not found.";
              }
              throw new Error("Network response was not ok.");
          }
          const data = await response.json();
          if (data && data[0] && data[0].meanings && data[0].meanings[0] && data[0].meanings[0].definitions && data[0].meanings[0].definitions[0]) {
              return data[0].meanings[0].definitions[0].definition;
          } else {
              return "Definition not found.";
          }
      } catch (error) {
          console.error("Error fetching definition:", error);
          return "Definition not found.";
      }
  }

  // Attach event listeners to buttons
  generateButton.addEventListener("click", generateRandomWords);
  resetButton.addEventListener("click", function() {
      resultElement.innerHTML = "";
      wordInput.value = "";
      numWordsInput.value = 1;
      updateWordCounter();
  });

  // Save button click handler
  saveButton.addEventListener("click", function() {
      const words = wordInput.value.split(",").map(word => word.trim()).filter(word => word !== "");
      if (words.length === 0) {
          alert("Please enter some words to save.");
          return;
      }
      const listName = prompt("Enter the name of the list:");
      if (listName) {
          lists.push({ name: listName, words });
          localStorage.setItem('lists', JSON.stringify(lists));
          alert(`List "${listName}" saved.`);
      } else {
          alert("List name cannot be empty.");
      }
  });

  // Function to open create list modal
  function openCreateListModal() {
      // Clear previous content of modal body
      modalBody.innerHTML = "";

      // Create input field and submit button for entering list name
      const inputField = document.createElement("input");
      inputField.setAttribute("type", "text");
      inputField.setAttribute("placeholder", "Enter the name of the list");
      inputField.style.marginRight = "10px";

      const submitButton = document.createElement("button");
      submitButton.textContent = "Create";
      submitButton.addEventListener("click", function() {
          const listName = inputField.value.trim();
          if (listName) {
              lists.push({ name: listName, words: [] });
              localStorage.setItem('lists', JSON.stringify(lists));
              modal.style.display = "none"; // Hide modal after creating list
              alert(`List "${listName}" created.`);
              inputField.value = ""; // Clear input field
              openViewListModal(); // After creating, open view list modal
          } else {
              alert("Please enter a valid list name.");
          }
      });

      const cancelButton = document.createElement("button");
      cancelButton.textContent = "Cancel";
      cancelButton.addEventListener("click", function() {
          modal.style.display = "none";
      });

      modalBody.appendChild(inputField);
      modalBody.appendChild(submitButton);
      modalBody.appendChild(cancelButton);

      modal.style.display = "block"; // Display modal
      dropdownMenu.style.display = "none"; // Hide dropdown menu
  }

  // Function to open view list modal
  function openViewListModal() {
      if (lists.length === 0) {
          modalBody.innerHTML = "<p>No lists available.</p>";
      } else {
          modalBody.innerHTML = ""; // Clear previous content

          lists.forEach((list, index) => {
              const listItem = document.createElement("div");
              listItem.className = "list-item";
              listItem.textContent = list.name;

              // Add view, open, and delete buttons for each list item
              const viewButton = document.createElement("button");
              viewButton.textContent = "View";
              viewButton.addEventListener("click", function() {
                  openWordListModal(index);
              });

              const openButton = document.createElement("button");
              openButton.textContent = "Open";
              openButton.addEventListener("click", function() {
                  openList(index);
              });

              const deleteButton = document.createElement("button");
              deleteButton.textContent = "Delete";
              deleteButton.addEventListener("click", function() {
                  lists.splice(index, 1);
                  localStorage.setItem('lists', JSON.stringify(lists));
                  openViewListModal(); // Refresh view after deleting
              });

              listItem.appendChild(viewButton);
              listItem.appendChild(openButton);
              listItem.appendChild(deleteButton);
              modalBody.appendChild(listItem);
          });
      }

      modal.style.display = "block"; // Display modal
      dropdownMenu.style.display = "none"; // Hide dropdown menu
  }

  // Function to open word list modal
  function openWordListModal(listIndex) {
      // Clear previous content of modal body
      modalBody.innerHTML = "";

      // Display list name
      const listName = document.createElement("h2");
      listName.textContent = lists[listIndex].name;
      modalBody.appendChild(listName);

      // Display words
      const wordList = document.createElement("ul");
      lists[listIndex].words.forEach(word => {
          const wordItem = document.createElement("li");
          wordItem.textContent = word;
          wordList.appendChild(wordItem);
      });
      modalBody.appendChild(wordList);

      // Add input field and button for adding words to the list
      const wordInputField = document.createElement("input");
      wordInputField.setAttribute("type", "text");
      wordInputField.setAttribute("placeholder", "Enter words separated by commas");
      wordInputField.style.marginRight = "10px";

      const addButton = document.createElement("button");
      addButton.textContent = "Add";
      addButton.addEventListener("click", function() {
          const words = wordInputField.value.split(",").map(word => word.trim());
          lists[listIndex].words.push(...words);
          localStorage.setItem('lists', JSON.stringify(lists));
          openWordListModal(listIndex); // Refresh view after adding words
      });

      const closeButton = document.createElement("button");
      closeButton.textContent = "Close";
      closeButton.addEventListener("click", function() {
          modal.style.display = "none";
      });

      modalBody.appendChild(wordInputField);
      modalBody.appendChild(addButton);
      modalBody.appendChild(closeButton);

      modal.style.display = "block"; // Display modal
  }

  // Function to open list and populate the main search bar
  function openList(listIndex) {
      wordInput.value = lists[listIndex].words.join(", ");
      modal.style.display = "none"; // Hide modal
  }

  // Delete all button click handler
  deleteAllButton.addEventListener("click", function() {
      if (confirm("Are you sure you want to delete all lists?")) {
          lists = [];
          localStorage.setItem('lists', JSON.stringify(lists));
          openViewListModal(); // Refresh view after deleting all lists
      }
  });

  // Function to update word counter
  function updateWordCounter() {
      const wordCount = wordInput.value.split(",").filter(word => word.trim() !== "").length;
      document.getElementById("word-counter").textContent = `${wordCount} words`;
  }

  // Event listener to update word counter when input changes
  wordInput.addEventListener("input", updateWordCounter);

  // Initial call to update word counter on page load
  updateWordCounter();
});
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Random Word Generator</title>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  <link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
  <div class="header">
    <h1>Random Word Generator</h1>
    <i id="add-icon" class="fa fa-plus" aria-hidden="true"></i>
    <div id="dropdown-menu">
      <button id="create-list">Create List</button>
      <button id="view-list">View List</button>
    </div>
  </div>

  <input type="text" id="word-input" placeholder="Enter words separated by commas">
  <p id="word-counter">0 words</p>
  <input type="number" id="num-words-input" min="1" value="1">
  <button id="generate-button">Generate Random Words</button>
  <button id="reset">Reset</button>
  <div id="result">
    <ul id="word-list"></ul>
  </div>

  <!-- Modal for displaying lists -->
  <div id="listModal" class="modal">
    <div class="modal-content">
      <div class="modal-header">
        <span class="close">&times;</span>
        <h2>Lists</h2>
      </div>
      <div class="modal-body" id="modal-body">
        <!-- List items will be displayed here -->
      </div>
      <div class="modal-footer">
        <button id="close-modal" class="close">Close</button>
      </div>
    </div>
  </div>

  <script src="script.js"></script>
</body>
</html>
/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 500px;
  max-height: 80vh; /* Limit height */
  overflow-y: auto; /* Add scroll if needed */
  border-radius: 10px;
}

.modal-header, .modal-body, .modal-footer {
  padding: 10px;
}

.modal-header {
  border-bottom: 1px solid #ddd;
}

.modal-footer {
  border-top: 1px solid #ddd;
  text-align: right;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover, .close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* Header and Dropdown Styles */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

#dropdown-menu {
  display: none;
  position: absolute;
  background-color: white;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  z-index: 1;
}

#dropdown-menu button {
  display: block;
  width: 100%;
  padding: 10px;
  border: none;
  background: none;
  text-align: left;
}

#dropdown-menu button:hover {
  background-color: #ddd;
}

#add-icon {
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

#add-icon:hover {
  color: #666;
}

/* Input and Button Styles */
body {
  font-family: Arial, sans-serif;
}

#word-input {
  width: 50%;
  padding: 10px;
  font-size: 18px;
}

#num-words-input {
  width: 20%;
  padding: 10px;
  font-size: 18px;
}

#generate-button {
  background-color: #4CAF50;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#generate-button:hover {
  background-color: #3e8e41;
}

#result {
  margin-top: 20px;
}

#word-list {
  font-size: 24px;
  font-weight: bold;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-gap: 10px;
  padding: 0;
  list-style-type: none;
}

#word-list li {
  background-color: #f7f7f7;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  text-align: center;
}

/* Reset Button Styles */
#reset {
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
  letter-spacing: 2px;
  text-decoration: none;
  text-transform: uppercase;
  color: #000;
  cursor: pointer;
  border: 3px solid;
  padding: 0.25em 0.5em;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
  position: relative;
  user-select: none;
}

#reset:hover {
  background-color: #333;
  color: #fff;
}

#word-input:focus, #num-words-input:focus {
  border-color: #aaa;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#generate-button:active {
  transform: translateY(2px);
}

#result {
  background-color: #f9f9f9;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 10px;
}

#word-list li:nth-child(even) {
  background-color: #fff;
}

/* Flip Card Styles */
/* Flip Card Styles */
.flip-container {
  perspective: 1000px;
  display: inline-block;
  margin: 10px;
}

.flip-card {
  position: relative;
  width: 150px;
  height: 150px;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.flip-card.flipped {
  transform: rotateY(180deg);
}

.flip-card .front, .flip-card .back {
  position: absolute;
  width: 100%; /* Ensure both sides take the full width */
  height: 100%; /* Ensure both sides take the full height */
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* Prevent overflow of content */
  text-align: center; /* Center text horizontally */
  padding: 10px; /* Ensure padding does not push text out */
}

.flip-card .front {
  background-color: #fff;
  color: black;
  font-size: 18px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.flip-card .back {
  background-color: #f9f9f9;
  color: black;
  transform: rotateY(180deg);
  border: 1px solid #ddd;
  border-radius: 5px;
}

/* Responsive font size to fit content */
.flip-card .front, .flip-card .back {
  font-size: calc(10px + 1vw); /* Adjust size dynamically based on viewport width */
}
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":star: What's on in Melbourne this week! :star:"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Hey Melbourne, \n\n Happy Monday! We hope you are loving the launch of our new *Boost Days!* \n\n As part of our <https://xpresso.xero.com/blog/featured/more-opportunities-to-come-together-with-xeros-connect/|*Xeros Connect Strategy*>, you'll experience supercharged days at the office every *Wednesday* and *Thursday*. \n\nPlease see below for what's on this week! "
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-7: Wednesday, 7th August",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n:coffee: *Xero Café*: Café-style beverages and sweet treats.\nThis week we are offering Caramel Slice (GF), Chocolate Florentines (GF) and Happy Face Biscuits!\n:clipboard: *Weekly Café Special*: _White Chocolate Mocha_\n:late-cake: *Afternoon Tea*: Provided by *Brisk Catering* from *2pm* in the *L1, L2 and L3* kitchens!\n:massage:*Wellbeing - Massage*: Book a session <https://bookings.corporatebodies.com/|*here*> to relax and unwind. \n *Username:* xero \n *Password:* 1234"
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-8: Thursday, 8th August",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":coffee: *Xero Café*: Café-style beverages and sweet treats \nThis week we are offering Caramel Slice (GF), Chocolate Florentines (GF) and Happy Face Biscuits! \n:clipboard: *Weekly Café Special*: _White Chocolate Mocha_ \n:breakfast: *Breakfast*: Provided by *Kartel Catering* from *8:30am - 10:30am* in the Wominjeka Breakout Space.\n "
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*LATER THIS MONTH:*"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*Thursday, 22nd August*\n :blob-party: *Social + (Nashville Theme)*: Drinks, food, and engaging activities bringing everyone together. Make sure you put on your cowboy/cowgirl hats and join us for the party! :cowboy-twins:"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Stay tuned to this channel for more details, check out the <https://calendar.google.com/calendar/u/0?cid=Y19xczkyMjk5ZGlsODJzMjA4aGt1b3RnM2t1MEBncm91cC5jYWxlbmRhci5nb29nbGUuY29t|*Melbourne Social Calendar*>, and get ready to Boost your workdays!\n\nLove,\nWX Team :party-wx:"
			}
		}
	]
}
\\upload
string wwwRootPath = _webHostEnvironment.WebRootPath;
string fileName = Guid.NewGuid().ToString() + Path.GetExtension(file.FileName);
string fileWebPath = Path.Combine(@"~\file\path", fileName).Replace('\\', '/');
string filePath = Path.Combine(wwwRootPath, @"file\path", fileName);
using (FileStream fileStream = new FileStream(filePath, FileMode.Create))
{
    file.CopyTo(fileStream);
}
function solve(){
    const xhttp = new XMLHttpRequest();
    xhttp.onreadystatechange = function() {
        if (this.readyState == 4 && this.status == 200) {
        document.getElementById("data").innerHTML = xhttp.responseText;
        }
    };
    xhttp.open("GET", "https://cors-anywhere.herokuapp.com/https://tiny-news-api.herokuapp.com/api/news", true);
    xhttp.send();
}
solve()
<input type="text" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/^0[^.]/, '0');" />
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":newspaper:  STAY IN THE KNOW  :newspaper:"
			}
		},
		{
			"type": "context",
			"elements": [
				{
					"text": "*August 1, 2024*  |  Office Announcements",
					"type": "mrkdwn"
				}
			]
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Stay in the loop about what's happening at the office such as upcoming visitors, onsite meetings, lunches, and more. Don't miss out- check out the <https://calendar.google.com/calendar/u/0?cid=Y18wMjUxOTA3NjU4ZWRkMjBkMGMyZDBlYzk3NWI0NGJmMzM1YzFiNDY5NDAyMDg1ZTlkOGZmODE1NDQ3NjIxMDY5QGdyb3VwLmNhbGVuZGFyLmdvb2dsZS5jb20|*Calgary Happenings Calendar*>"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":calendar: |:lunch: *THURSDAY LUNCH SCHEDULE* :lunch: | :calendar: "
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "`8/1` *strEATS Beltline Kitchen*"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "`8/8` *Jerusalem Shawarma*"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "`8/15` *Wakado Ramen*"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "`8/22` *Dedicate Healthy Kitchen*"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "`8/29` *K-Thi Vietnamese Cuisine*"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":loud_sound:*FOR YOUR INFORMATION* :loud_sound:"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":holiday-potato: *Upcoming Public Holiday*: Monday, 5th August  \n\n :standup: *Canada Stand Up* \n *August 15th*- Hosted by Intern Engineer, *Daniel Iseoluwa*"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":WX: *WX offers comprehensive event planning services, including:*\n - Assistance with logistics and coordination \n - Access to a network of vendors for catering, supply ordering, etc.\n\n _Note: Even if you don’t need our assistance but are using the office space, kindly inform WX._ "
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":tada: *Happy Birthday* :tada: to all Xeros celebrating their birthdays this August! We hope you have an amazing day :party_wiggle: "
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "context",
			"elements": [
				{
					"type": "mrkdwn",
					"text": ":pushpin: Have something important to add to our calendar or need some assistance? Get in touch with us by logging a ticket via the <https://xerohelp.zendesk.com/hc/en-us/requests/new?ticket_form_id=900001672246| *HelpCentre*>. We are here to help!"
				}
			]
		}
	]
}
<input type="number" onKeyPress="if(this.value.length==6) return false;"/>
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](code_of_conduct.md)
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":star: Introducing Xero Boost Days! :star:"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Hey Calgary! \n\nWe're excited to announce the launch of our Boost Day Program!\n\nStarting this week, as part of our <https://xpresso.xero.com/blog/featured/more-opportunities-to-come-together-with-xeros-connect/|*Xeros Connect Strategy*>, you'll experience supercharged days at the office every *Thursday*. Get ready for a blend of delicious food, beverages, wellness activites, and fun connections!\n\nPlease see below for what's on this week! "
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-1: Thursday, 1st August",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":coffee: *Premium Coffee Experience*: Enjoy the in office coffee. Keep an eye out for your new coffee machine which will set up soon with new flavors and milk to enjoy. \n:lunch: *Lunch*: Provided by *strEATS Beltline Kitchen* at *12:00PM*.\n"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*LATER THIS MONTH:*"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*Thursday, 15th August*\n :standup: *Stand Up* hosted by Intern Engineer, *Daniel Iseoluwa*  Join us to hear updates, celebrate Xero's and say hello to our newest hires! "
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Stay tuned to this channel for more details, check out the <https://calendar.google.com/calendar/u/0?cid=Y18wMjUxOTA3NjU4ZWRkMjBkMGMyZDBlYzk3NWI0NGJmMzM1YzFiNDY5NDAyMDg1ZTlkOGZmODE1NDQ3NjIxMDY5QGdyb3VwLmNhbGVuZGFyLmdvb2dsZS5jb20|*Calgary Happenings Calendar*>, and get ready to Boost your workdays!\n\nLove,\nWX Team :party-wx:"
			}
		}
	]
}
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":star: Boost Days - What's on this week! :star:"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Happy Monday Singapore! We're excited to kickstart another great week in the office with our new Boost Day Program :zap: Please see below for what's coming up! "
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-26: Monday, 26th Aug",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n:coffee: *Café Partnership*: Café-style beverages with Group Therapy Coffee\n:breakfast: *Lunch*: Provided by *Group Therapy Café* from *12PM - 2PM* in the Kitchen."
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-31: Wednesday, 28th Aug",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n:blob-party: *Social +*: Get ready for some Nashville style hot chicken from *Chix Hot Chicken* with different spicy levels to challegnes yourselves at 4pm in the Kitchen!:chilli:"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Stay tuned to this channel for more details, check out the <https://calendar.google.com/calendar/u/0?cid=Y19lZTA1MmE0NWUxMzQ1OTQ0ZDRjOTk2M2IyNjA4M[…]MjRmZmJhODk0MGEwYjQ4ZDllQGdyb3VwLmNhbGVuZGFyLmdvb2dsZS5jb20|*Singapore Social Calendar*>, and get ready to Boost your workdays!\n\nLove,\nWX Team :party-wx:"
			}
		}
	]
}
Open "imports/theme.nss" and change dark option to default or auto

dark = default

Save changes, press CTRL + RIGHT-CLICK to reload settings.
[
    {
        "$lookup": {
            "from": "participant",
            "localField": "participantId",
            "foreignField": "_id",
            "as": "participants"
        }
    },
    {
        "$unwind": {
            "path": "$participants",
            "preserveNullAndEmptyArrays": true
        }
    },
    {
        "$lookup": {
            "from": "subscription",
            "localField": "participantId",
            "foreignField": "userId",
            "as": "subscriptions"
        }
    },
    {
        "$unwind": {
            "path": "$subscriptions",
            "preserveNullAndEmptyArrays": true
        }
    },
    {
        "$lookup": {
            "from": "subscriptionPlan",
            "localField": "subscriptions.planId",
            "foreignField": "_id",
            "as": "subscriptionPlans"
        }
    },
    {
        "$unwind": {
            "path": "$subscriptionPlans",
            "preserveNullAndEmptyArrays": true
        }
    },
    {
        "$match": {
            "nutritionistID": {
                "$oid": "64782249defe1c75d7689cbd"
            }
        }
    },
    {
        "$match": {
            "subscriptions.planId": {
                "$exists": true
            }
        }
    },
    {
        "$match": {
            "participants": {
                "$exists": true
            }
        }
    },
    {
        "$match": {
            "participants": {
                "$exists": true
            }
        }
    },
    {
        "$match": {
            "active": true
        }
    }
]




//query 2
[
    {
        "$lookup": {
            "from": "participant",
            "localField": "participantId",
            "foreignField": "_id",
            "as": "participants"
        }
    },
    {
        "$unwind": {
            "path": "$participants",
            "preserveNullAndEmptyArrays": true
        }
    },
    {
        "$lookup": {
            "from": "subscription",
            "localField": "participantId",
            "foreignField": "userId",
            "as": "subscriptions"
        }
    },
    {
        "$unwind": {
            "path": "$subscriptions",
            "preserveNullAndEmptyArrays": true
        }
    },
    {
        "$lookup": {
            "from": "subscriptionPlan",
            "localField": "subscriptions.planId",
            "foreignField": "_id",
            "as": "subscriptionPlans"
        }
    },
    {
        "$unwind": {
            "path": "$subscriptionPlans",
            "preserveNullAndEmptyArrays": true
        }
    },
    {
        "$match": {
            "nutritionistID": {
                "$oid": "64782249defe1c75d7689cbd"
            }
        }
    },
    {
        "$match": {
            "subscriptions.planId": {
                "$exists": false
            }
        }
    },
    {
        "$match": {
            "participants": {
                "$exists": true
            }
        }
    },
    {
        "$match": {
            "participants": {
                "$exists": true
            }
        }
    },
    {
        "$match": {
            "active": true
        }
    }
]



for tavishi table is -> userNutrionistMapping
// app/static/js/navigation.js

document.addEventListener('DOMContentLoaded', () => {
    document.getElementById('home-button').addEventListener('click', () => {
        window.location.href = '/home';
    });

    document.getElementById('salled-button').addEventListener('click', () => {
        window.location.href = '/salled';
    });
});
= (StartDate as date, WorkDays as number) =>
let
WorkDays2 = (WorkDays*2)+7,
startDate = if Date.DayOfWeek(StartDate)=5 then Date.AddDays(StartDate,2) else
if Date.DayOfWeek(StartDate)=6 then Date.AddDays(StartDate,1) else StartDate,
ListOfDates = List.Dates(startDate, WorkDays2,#duration(1,0,0,0)),
DeleteWeekends = List.Select(ListOfDates, each Date.DayOfWeek(_,1) < 5 ),
WorkDate = List.Range(DeleteWeekends,WorkDays,1),

Result = WorkDate{0}

in
Result
<div style="background: #123456; color: blue; border-radius: 25px; padding: 20px; border: 15px solid #abced8;">
    <h2><span style="color: #ffffff;">Heading2 Here</span></h2>
    <p><span style="color: #ffffff;">Text here</span></p>
    <h3><span style="color: #ffffff;">Heading3 Here</span></h3>
    <p><span style="color: #ffffff;">More text here.</span></p>
</div>
<div style="background: #123456; color: blue; border-radius: 25px; padding: 20px; border: 15px solid #abced8;">
    <h2><span style="color: #ffffff;">Introduction</span></h2>
    <p><span style="color: #ffffff;">If some Imperial Stout has a change of heart about a Jamaica Red Ale near a Rolling Rock, then the Home brew beyond a colt 45 procrastinates. A Mango Beer for an Ellis Island IPA, a Red Stripe from some ESB, and the dorky Heineken are what made America great! When a bull ice reads a magazine, a Budweiser Select reads a magazine. If a highly paid Hommel Bier ridiculously negotiates a prenuptial agreement with some bill from an ESB, then the Hazed and Infused around a Pilsner self-flagellates. The psychotic bottle barely writes a love letter to the Hommel Bier.</span></p>
    <h3><span style="color: #ffffff;">The tanked crank case</span></h3>
    <p><span style="color: #ffffff;">When you see the Hefeweizen, it means that a self-loathing bull ice daydreams. Some blue moon about another Lone Star buries the college-educated Coors. A Sam Adams usually befriends the shot, but a miller light from some Ellis Island IPA dumbly makes a pact with a bill.</span></p>
</div>
selector {
    animation: spin 1s linear infinite;
    animation-play-state: paused;
    animation-delay: calc(var(--scroll) * -1s);
  }

@keyframes spin {
	100% {
		transform: rotate(360deg);
	}
}
/*ממקם את שדה ההסכמה בסוף הטופס מתחת לכפתור*/
selector .elementor-field-type-acceptance {
    order:4;
}

/*מעגל פינות ומיישר את הצ'בוקס*/
selector .elementor-field-option *, input[type=checkbox]:checked:before{
    border-radius: 100px;
    transform: translate3d(0px, 5px, 0px)
}

/*מעצב את המצב הלא מסומן*/
selector .elementor-field-option input[type=checkbox] {
		-webkit-appearance: none;
		border:3px solid #E70F57;
		padding:8px;
		display: inline-flex;
		width:8px;
		height:8px;
}

/*מעצב את המצב המסומן*/
input[type=checkbox]:checked:before
 {
        content: '\f00c';
        color: white;
		font-size:10px;
		padding-right: 3px;
		line-height: 19px;
        font-weight: 600;
        background-color: #E70F57;
		width:16px;
		height:16px;
        font-family:'Font Awesome\ 5 Free';
		transform: translate3d(8px, -8px, 0px);
		position: absolute;
}
selector::before {
    content:"";
    width: 50px;
    height: 50px;
    background-image: url('/image.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
    width: 100%;
}
selector .swiper-wrapper {
    transition-timing-function: linear;
}
selector{
    animation-name: floating 3s ease-in-out infinite;
}

@keyframes floating {
    from { transform: translate(0,  0px); }
    50%  { transform: translate(0, 15px); }
    to   { transform: translate(0, -0px); }
}
selector{
    animation:spin 15s linear infinite;
}


@keyframes spin { 100% {
    transform: rotate(360deg); }

}
selector{
    -webkit-mask-image: url(/wp-content/uploads/2023/01/file.svg);
    mask-image: url(/wp-content/uploads/2023/01/file.svg);

    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;

    mask-size: 100%;
    -webkit-mask-size: 100%;

    -webkit-mask-position: center bottom;
    mask-position: center bottom;
}
@media only screen and (min-width: 1024px) {
selector{
    color: red !important;
}
}
@media only screen and (max-width: 1024px) {
selector{
    color: red !important;
}
}
border-style: none;
border-style: hidden;
border-style: dotted;
border-style: dashed;
border-style: solid;
border-style: double;
border-style: groove;
border-style: ridge;
border-style: inset;
border-style: outset;
margin: 50px 50px 50px 50px;

margin: 50px;
margin-top: 50px;
margin-right: 30px;
margin-bottom: 50px;
margin-left: 80px;
padding: 50px 50px 50px 50px;

padding: 50px;
padding-top: 50px;
padding-right: 30px;
padding-bottom: 50px;
padding-left: 80px;
background: linear-gradient(180deg, #0000 60%, #FED130 60%, #FED130 85%,  #0000 80%);
star

Fri Aug 02 2024 07:28:49 GMT+0000 (Coordinated Universal Time) HS

@focuskatiso

star

Fri Aug 02 2024 04:19:22 GMT+0000 (Coordinated Universal Time)

@fori44w #javascript

star

Fri Aug 02 2024 04:17:52 GMT+0000 (Coordinated Universal Time)

@fori44w #html

star

Fri Aug 02 2024 04:15:36 GMT+0000 (Coordinated Universal Time)

@fori44w #css

star

Fri Aug 02 2024 01:28:26 GMT+0000 (Coordinated Universal Time)

@WXAPAC

star

Thu Aug 01 2024 20:10:02 GMT+0000 (Coordinated Universal Time)

@mr_effaty

star

Thu Aug 01 2024 19:51:38 GMT+0000 (Coordinated Universal Time) https://github.com/ahmetkabacali/CORS-Error-Solution-main/blob/main/main.js

@Bh@e_LoG

star

Thu Aug 01 2024 19:41:21 GMT+0000 (Coordinated Universal Time) https://intelx.io/

@whois

star

Thu Aug 01 2024 17:23:40 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/469357/html-text-input-allow-only-numeric-input

@webmaster30 #html

star

Thu Aug 01 2024 17:16:19 GMT+0000 (Coordinated Universal Time)

@WXCanada

star

Thu Aug 01 2024 17:09:24 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/49623745/html-numeric-input-allow-6-digits-only

@webmaster30 #html

star

Thu Aug 01 2024 16:14:46 GMT+0000 (Coordinated Universal Time) https://www.contributor-covenant.org/

@isopet

star

Thu Aug 01 2024 13:05:27 GMT+0000 (Coordinated Universal Time)

@WXCanada

star

Thu Aug 01 2024 10:10:46 GMT+0000 (Coordinated Universal Time) devtools://devtools/bundled/devtools_app.html?remoteBase

@DobbyLee

star

Thu Aug 01 2024 08:14:59 GMT+0000 (Coordinated Universal Time)

@FOHWellington

star

Thu Aug 01 2024 06:20:45 GMT+0000 (Coordinated Universal Time) https://nilesoft.org/forum/viewtopic.php?t=18

@Curable1600 #windows #app

star

Thu Aug 01 2024 05:48:50 GMT+0000 (Coordinated Universal Time) http://octoprint.local/#tab_plugin_bedlevelvisualizer

@amccall23

star

Thu Aug 01 2024 04:51:26 GMT+0000 (Coordinated Universal Time)

@CodeWithSachin #aggregation #mongodb #$objecttoarray #$addfiels

star

Wed Jul 31 2024 23:04:58 GMT+0000 (Coordinated Universal Time) https://chatgpt.com/

@Black_Shadow

star

Wed Jul 31 2024 17:30:35 GMT+0000 (Coordinated Universal Time)

@darshcode

star

Wed Jul 31 2024 15:25:01 GMT+0000 (Coordinated Universal Time)

@chaelaz

star

Wed Jul 31 2024 15:13:14 GMT+0000 (Coordinated Universal Time) https://learn.maricopa.edu/courses/810369/pages/div-box

@chaelaz

star

Wed Jul 31 2024 13:43:43 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:43:29 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:43:24 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:43:20 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:43:17 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:43:14 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:43:10 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:43:07 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:43:04 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:43:01 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:42:57 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:42:53 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:42:49 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:42:47 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:42:44 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:42:41 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:42:23 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:42:20 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:42:18 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:42:15 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:42:13 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:42:10 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:42:08 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:42:01 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:41:59 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:41:56 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:41:52 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

star

Wed Jul 31 2024 13:41:50 GMT+0000 (Coordinated Universal Time) https://schooliner.com/codesheet/

@lipi44 #css

Save snippets that work with our extensions

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