Snippets Collections
<div class="menu">
    <a href="#">Home</a>
    <a href="#">Sobre</a>
    <a href="#">Jogos</a>
    <a href="Login"></a>
</div>
#include <iostream>
using namespace std;
#include <climits>


int main() 
{
    int arr[]={23,53,13,43,24};
    int n= sizeof(arr)/ sizeof(arr[0]);
    int mx=arr[0];
    
    for(int i=0;i<n;i++){
      mx=max(arr[i],mx);
      
    }
     
    int rr=INT_MIN;
    
    for(int i = 0;i<n;i++){
      if(arr[i]!=mx) rr= max(arr[i],rr);
    }
    cout<<rr;
    
    
    
    
    return 0;
}
$(document).ready(function() {
    var itemsPerPage = 10; // Número de itens por página
    var items = $("tbody tr");
    var pagination = $(".pagination");
    // Função para atualizar a exibição dos itens com base na página atual
    function updateDisplay(pageNum, filteredItems) {
        var start = (pageNum - 1) * itemsPerPage;
        var end = start + itemsPerPage;
        filteredItems.hide().slice(start, end).show();
    }
    // Função para atualizar a paginação
    function updatePagination(numPages, currentPage) {
        pagination.empty();
        for (var i = 1; i <= numPages; i++) {
            var pageLink = $("<a href='#' class='page-link'>" + i + "</a>");
            if (i === currentPage) {
                pageLink.addClass("current-page");
            }
            pagination.append(pageLink);
        }
    }
    // Função para aplicar a paginação
    function applyPagination(searchTerm, currentPage) {
        var filteredItems = items;
        if (searchTerm !== "") {
            filteredItems = items.filter(function() {
                return $(this).text().toLowerCase().indexOf(searchTerm) > -1;
            });
        }
        var numItems = filteredItems.length;
        var numPages = Math.ceil(numItems / itemsPerPage);
        
        // Atualizar a paginação
        updatePagination(numPages, currentPage);
        // Exibir a página atual dos itens filtrados
        updateDisplay(currentPage, filteredItems);
    }
    // Adicionar evento de input para o campo de pesquisa
    $("#search").on("keyup", function() {
        var searchTerm = $(this).val().toLowerCase();
        applyPagination(searchTerm, 1); // Ao pesquisar, volte para a primeira página
    });
    // Executar a paginação ao carregar a página
    applyPagination("", 1); // Iniciar na primeira página
    
    // Adicionar evento de clique para trocar de página
    pagination.on("click", "a.page-link", function(e) {
        e.preventDefault();
        var pageNum = $(this).text();
        var searchTerm = $("#search").val().toLowerCase();
        
        applyPagination(searchTerm, parseInt(pageNum)); // Atualizar a página atual
    });
});
000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000a2a8299afdb9d394598485b0b7745acf3ee219ec0000000000000000000000000000000000000000000000bdbc41e0348b300000
[{"inputs":[{"internalType":"uint256","name":"_dailyDistribution","type":"uint256"},{"internalType":"uint256","name":"_recipientsLimit","type":"uint256"},{"internalType":"uint256","name":"_durationInDays","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dailyDistribution","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"distribute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"distributions","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"recipientsLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
input_text = "<fim_prefix>def print_hello_world():\n    <fim_suffix>\n    print('Hello world!')<fim_middle>"
inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))
# pip install -q transformers
from transformers import AutoModelForCausalLM, AutoTokenizer

checkpoint = "bigcode/starcoder"
device = "cuda" # for GPU usage or "cpu" for CPU usage

tokenizer = AutoTokenizer.from_pretrained(checkpoint)
model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device)

inputs = tokenizer.encode("def print_hello_world():", return_tensors="pt").to(device)
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))
 const courseData = (e) => {
        const { currentTarget } = e;
        // get all the dataset information
        const name = currentTarget?.dataset?.name ?? "";
        const id = currentTarget?.dataset?.code ?? "";
        const funded = currentTarget?.dataset?.funded ?? "";
        const demand = currentTarget?.dataset?.demand ?? "";
        const mode = currentTarget?.dataset?.mode ?? "";
        const options = currentTarget?.dataset?.training ?? "";

        // create object from the current course clicked dataset attributes above
        const course = {
            courseName: name,
            courseId: id,
            funding: funded,
            demand: demand,
            delivery: mode,
            training: options,
        };

        return course;
    };


//or

 function getListData(data) {
        if (!data) return [];
        // console.log(data);
        return data?.map((item) => ({
            name: item?.name ?? "",
            category: item?.category ?? "",
            web: item?.website ?? "",
            tel: item?.tel ?? "",
            email: item?.email ?? "",
        }));
    }

getListData(items);
const toggleClass = (element, className, force) => {
     element.classList.toggle(className, force);
    };


const div = document.querySelector("div");

// Toggle the class "active" on the div
toggleClass(div, "active");

// Force add the class "highlight"
toggleClass(div, "highlight", true);

// Force remove the class "hidden"
toggleClass(div, "hidden", false);



        const box = document.querySelector(".box");
        const button = document.getElementById("toggleBtn");

        button.addEventListener("click", () => {
            toggleClass(box, "active");
        });




 const toggleSpan = (currentTarget, force = true) => {
        const compareBlock = currentTarget.closest(".compare-block");
        if (!compareBlock) return;

        const currentSpan = compareBlock.querySelector("span");
        if (currentSpan) {
            toggleClass(currentSpan, "show", force);
            if (currentSpan.className.indexOf("show") > -1) {
                currentSpan.setAttribute("aria-hidden", "false");
            } else {
                currentSpan.setAttribute("aria-hidden", "true");
            }
        }
    };
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>🔬 Aropha AI Biodegradation Prediction Platform</title>
  <style>
    @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

    /* General Styles */
    body {
      font-family: 'Roboto', sans-serif;
      margin: 0;
      padding: 0;
      background: #475d63; /*background*/
      color: #ffffff;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      height: 100vh;
    }

    .container {
      background: #1E2A34;
      padding: 30px;
      border-radius: 10px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
      width: 90%;
      max-width: 400px;
      text-align: center;
    }

    /* Logo */
    .logo {
      width: 200px;
      margin-bottom: 20px;
    }

    h2 {
      margin-bottom: 20px;
      font-size: 24px;
      color: #ffffff;
    }

    label {
      display: block;
      margin: 10px 0 5px;
      text-align: left;
      font-weight: bold;
      color: #ffffff;
    }

    input {
      width: 100%;
      padding: 10px;
      margin-bottom: 10px;
      border: 1px solid #ccc;
      border-radius: 5px;
      background: #24343D;
      color: #ffffff;
      border: none;
      outline: none;
    }

    input::placeholder {
      color: #b0b8bf;
    }

    .error {
      color: red;
      font-size: 14px;
      display: none;
    }

    button[type="submit"] {
      width: 100%;
      background-color: #224a80; /* Dark button background */
      color: white;
      border: none;
      padding: 12px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 16px;
      font-weight: bold;
      transition: all 0.3s ease;
    }

    button[type="submit"]:hover {
      background-color: #234471; /* Hover color */
      color: #ffffff;
    }

    /* Modal Styles */
    .modal {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.6);
      display: none;
      justify-content: center;
      align-items: center;
      z-index: 1000;
    }

    .modal-content {
      background: #1E2A34;
      padding: 20px;
      border-radius: 8px;
      max-width: 500px;
      width: 90%;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
      text-align: center;
      color: #ffffff;
    }

    .close-button {
      margin-top: 20px;
      padding: 10px 20px;
      border: none;
      background: #222a35; /* Dark button background */
      color: white;
      border-radius: 8px;
      cursor: pointer;
      font-weight: bold;
      transition: all 0.3s ease;
    }

    .close-button:hover {
      background: #66ccff; /* Hover color */
      color: #ffffff;
    }

    /* Additional Info */
    .info {
      text-align: center;
      margin-top: 20px;
      font-size: 14px;
      color: #b0b8bf;
    }

    .info a {
      color: #66ccff; /* Link color */
      text-decoration: none;
    }

    .info a:hover {
      text-decoration: underline;
    }

    /* Footer Styles */
    footer {
      text-align: center;
      padding: 10px;
      color: #b0b8bf;
      font-size: 14px;
      margin-top: 20px;
    }

    footer a {
      color: #66ccff; /* Link color */
      text-decoration: none;
    }

    footer a:hover {
      text-decoration: underline;
    }
  </style>
</head>
<body>

  <div class="container">
    <img src="https://www.users.aropha.com/static/assets/img/logo-rectangular.png" alt="Aropha Logo" class="logo">
    <h2>Create an Account</h2>
    <form id="signup-form">
      <label for="first_name">First Name</label>
      <input type="text" id="first_name" name="first_name" placeholder="Optional">

      <label for="last_name">Last Name</label>
      <input type="text" id="last_name" name="last_name" placeholder="Optional">

      <label for="email">Email</label>
      <input type="email" id="email" name="email" required>

      <label for="password">Password</label>
      <input type="password" id="password" name="password" required>

      <label for="confirm_password">Re-enter Password</label>
      <input type="password" id="confirm_password" name="confirm_password" required>
      <p class="error" id="error-message">Passwords do not match.</p>

      <button type="submit">Sign Up</button>
    </form>
    <!-- Additional Info for Password Reset -->
    <div class="info">
      <p>
        Forgot your password? Reset it <a href="https://www.users.aropha.com/login.html" target="_blank">here</a>.
      </p>
    </div>
  </div>

  <!-- Modal for displaying messages from your endpoint -->
  <div id="messageModal" class="modal">
    <div class="modal-content">
      <p id="modalMessage"></p>
      <button class="close-button" id="closeModal">Close</button>
    </div>
  </div>

  <footer>
    <p>
      Follow us on <a href="https://www.linkedin.com/company/aropha/">LinkedIn</a> | &copy; 2025 Aropha Inc. All Rights Reserved.
    </p>
  </footer>

  <script>
    document.getElementById("signup-form").addEventListener("submit", function(event) {
      event.preventDefault(); // Prevent default form submission

      var password = document.getElementById("password").value;
      var confirmPassword = document.getElementById("confirm_password").value;
      var errorMessage = document.getElementById("error-message");

      if (password !== confirmPassword) {
        errorMessage.style.display = "block";
        return;
      } else {
        errorMessage.style.display = "none";
      }

      let formData = new FormData(document.getElementById("signup-form"));

      fetch('https://modelserver.aropha.com/register', {
        method: 'POST',
        body: formData
      })
      .then(async response => {
        let responseData;
        try {
          responseData = await response.json(); // Try parsing as JSON
        } catch (error) {
          responseData = await response.text(); // Fallback for non-JSON responses
        }

        console.log("Server response:", responseData); // Debugging log

        let message = "";
        if (typeof responseData === "object") {
          message = responseData.detail || responseData.message || JSON.stringify(responseData, null, 2);
        } else {
          message = responseData;
        }

        document.getElementById("modalMessage").textContent = message;
        document.getElementById("messageModal").style.display = "flex";
      })
      .catch(error => {
        console.error("Fetch error:", error);
        document.getElementById("modalMessage").textContent = "An error occurred. Please try again.";
        document.getElementById("messageModal").style.display = "flex";
      });
    });

    // Close modal
    document.getElementById("closeModal").addEventListener("click", function() {
      document.getElementById("messageModal").style.display = "none";
    });
  </script>
</body>
</html>
<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Tutorials and Documentation - Aropha AI</title>
  <style>
    @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');
    
    /* General Styles */
    body {
      font-family: 'Roboto', sans-serif;
      margin: 0;
      padding: 0;
      background: #ffffff;
      color: #222a35;
    }
    .wrapper {
      max-width: 1200px;
      margin: 0 auto;
      border-radius: 15px;
      padding: 20px;
      margin-top: 140px;
    }
    .top-bar {
      background: #222a35;
      color: #ffffff;
      padding: 15px 0;
      text-align: center;
      font-weight: bold;
      font-size: 1.5em;
      display: flex;
      flex-direction: column;
      align-items: center;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      z-index: 1000;
    }

    .logo-container {
      display: flex;
      justify-content: center;
      width: 100%;
      padding: 10px 0;
    }

    .top-bar img.logo {
      height: 50px;
    }

    .nav-container {
      display: flex;
      justify-content: center;
      width: 100%;
      padding: 10px 0;
    }

    .button-container {
      display: flex;
      gap: 20px;
      align-items: center;
    }

    .btn {
      color: #ffffff;
      text-decoration: none;
      font-size: 14px;
      font-weight: normal;
      transition: all 0.3s ease;
      padding: 5px 10px;
    }

    .btn:hover {
      color: #66ccff;
    }

    .btn.active {
      color: #66ccff;
    }

    /* Content Styles */
    .content {
      padding: 20px 40px;
      text-align: left;
    }
    section {
      margin-bottom: 40px;
      padding: 20px;
      border-radius: 10px;
      background: #eeeeee;
      color: #222a35;
    }
    h1 {
      text-align: center;
      color: #222a35;
      font-size: 2.5em;
      margin-bottom: 40px;
    }
    h2 {
      color: #222a35;
      border-bottom: 2px solid #66ccff;
      padding-bottom: 8px;
    }
    p { line-height: 1.6; }
    .img-center {
      display: block;
      margin: 0 auto;
    }
    
    /* Table styles */
    .table-container {
      overflow-x: auto;
    }
    table {
      width: 100%;
      border-collapse: collapse;
      margin: 20px 0;
    }
    th, td {
      padding: 12px;
      text-align: left;
      border: 1px solid #ddd;
    }
    th {
      background-color: #222a35;
      color: white;
    }
    tr:nth-child(even) {
      background-color: #f9f9f9;
    }

    footer {
      text-align: center;
      padding: 20px 0;
      background: #222a35;
      color: #ffffff;
      border-radius: 10px;
      margin-top: 40px;
    }
  </style>
  <script src="https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.min.js"></script>
  <script>
    mermaid.initialize({
      theme: 'default',
      securityLevel: 'loose',
      startOnLoad: true
    });
  </script>
</head>
<body>
  <div class="top-bar">
    <div class="logo-container">
      <img src="https://www.users.aropha.com/static/assets/img/logo-rectangular.png" alt="Aropha Logo" class="logo">
    </div>
    <div class="nav-container">
      <div class="button-container">
        <a href="/home.html" class="btn">Home</a>
        <a href="/user_registration.html" class="btn">User Registration</a>
        <a href="/tutorials.html" class="btn active">Tutorials and Documentations</a>
        <a href="/activate_free_trial.html" class="btn">Activate Free Trial</a>
        <a href="/aropha_data_submission.html" class="btn">Data Processing and Credits</a>
        <a href="/Biodegrability_screening_case_study.html" class="btn">Biodegradability Case Study</a>
        <a href="/purchase_ai_engine_credits.html" class="btn">Purchase Credits</a>
      </div>
    </div>
  </div>

  <div class="wrapper">
    <div class="content">
      <section>
        <h2>Chemical Data Entry</h2>
        <p>Chemical data can be provided in one of three ways:</p>
        <ul>
          <li>Full SMILES notation of the substance</li>
          <li>in-silico Polymer Synthesis from Monomer Units</li>
          <li>IR Data Entry</li>
        </ul>
        <img src="images/image 7.png" alt="Chemical Data Entry" class="img-center" style="max-width:90%;">
      </section>

      <section>
        <h2>AI Engines</h2>
        <p>Our intelligent engine selection system helps you choose the perfect AI model for your specific needs. Follow the flowchart below to identify the most suitable engine for your material:</p>
        
        <div class="mermaid">
          graph LR
              SM[Small Molecule] --> Q1{Molecular Weight?}
              Poly[Polymer] --> Q2{Known Degree of Polymerization?}
              Q1 -->|MW ≤ 1000| Former[Aropha Former]
              Q1 -->|MW ≥ 1000| Grapher[ArophaGrapher]
              Q2 -->|No, or DP ≤ 100| Former
              Q2 -->|Yes, DP ≤ 2000| Grapher
              Q2 -->|Custom| ArophaPolyformer[ArophaPolyformer]

              classDef default fill:#ffffff,stroke:#222a35,stroke-width:2px,color:#222a35
              classDef decision fill:#222a35,stroke:#66ccff,stroke-width:2px,color:#ffffff
              
              class SM,Poly,Former,Grapher,ArophaPolyformer default
              class Q1,Q2 decision
        </div>

        <div class="table-container">
          <h3>Engine Specifications</h3>
          <table>
            <thead>
              <tr>
                <th>AI Engine</th>
                <th>Chemical Space</th>
                <th>Degree of Polymerization</th>
                <th>Suggested MW for small molecules</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>Aropha Former</td>
                <td>Small Molecule + Macromolecular Polymer</td>
                <td>&le; 100</td>
                <td>&le; 1000</td>
              </tr>
              <tr>
                <td>ArophaGrapher</td>
                <td>Small Molecule + Macromolecular Polymer</td>
                <td>&le; 2000</td>
                <td>&ge; 1000</td>
              </tr>
              <tr>
                <td>ArophaPolyformer</td>
                <td>Macromolecular Polymer</td>
                <td>Custom</td>
                <td>N/A</td>
              </tr>
            </tbody>
          </table>
        </div>
      </section>

      <section>
        <h2>Material Morphology</h2>
        <p>
          We consider the impact of material morphology. Please select the shape type that best matches your material from our list and provide the relevant parameters.
        </p>
        <img src="images/image 5.png" alt="Material Morphology" class="img-center" style="max-width:70%;">
      </section>

      <section>
        <h2>Method</h2>
        <p>
          You can choose from 60 standard methods for your experiment or design a customized method tailored to specific environmental conditions.
        </p>
        <img src="images/image 6.png" alt="Method" class="img-center" style="max-width:70%;">
      </section>
    </div>
  </div>

  <footer>
    <p>
      Follow us on <a href="https://www.linkedin.com/company/aropha/">LinkedIn</a> | &copy; 2025 Aropha Inc. All Rights Reserved.
    </p>
  </footer>
</body>
</html>
  let grouping = items.reduce((obj, item) => {
            const key = item.providerId;
            if (!obj[key]) {
                obj[key] = [];
            }

            obj[key].push(item);

            return obj;
        }, {});
   const textModal = document.querySelectorAll(".text-trig");

	textModal.forEach(textLinkModal);


function textLinkModal(trigger) {
        // eslint-disable-next-line no-undef
        const modal = document.querySelector(".check-footer__modal");
        // eslint-disable-next-line no-undef
        const closeBtn = document.querySelector(".check-footer__content .close");
        if (!modal || !closeBtn) return;

        // add open on click
        trigger.addEventListener("click", function () {
            const isOpen = modal.classList.contains("open");
            if (!isOpen) {
                modal.classList.add("open");
            }
        });
        // remove open on click
        closeBtn.addEventListener("click", function () {
            modal.classList.remove("open");
        });

        // remove open if the click occurs on the modal and that click has a class of open
        // this stops the modal from disappearing if the user clicks  on the content of the modal
        modal.addEventListener("click", function (e) {
            const el = e.currentTarget;
            if (e.target === modal && el.classList.contains("open")) {
                el.classList.remove("open");
            }
        });
    }
// where we have two arrays of checked and unchecked 

 function onHandleCheckbox(checkbox) {
        // create a new attay of objects with the value and checked status
        checkbox.addEventListener("change", () => {
            const status = [...trainingRadioBtns].map((btn) => ({
                value: btn.value,
                checked: btn.checked,
            }));
            // update global checkedValues array with objects of items that are checked then another with items unchecked
            checkedValues = status.filter((btn) => btn.checked).map((btn) => btn.value);
            notSelected = status.filter((btn) => !btn.checked).map((btn) => btn.value);
            // console.log("selected", checkedValues);
            // console.log("not selected", notSelected);

            // return values to the filteredItems array that match the below
            filteredItems = locations.filter((item) => {
                // Each individual match condition for filtering from the checkedvalues array or the notselected array
                const matchesFunded = (checkedValues.includes("governmentService") && item.governmentService) || notSelected.includes("governmentService");
                const matchesOnline = (checkedValues.includes("isAvailableOnline") && item.isAvailableOnline) || notSelected.includes("isAvailableOnline");
                const matchesPartTime = (checkedValues.includes("isAvailablePartTime") && item.isAvailablePartTime) || notSelected.includes("isAvailablePartTime");
                const matchesApprentice = (checkedValues.includes("apprenticeshipTraineeship") && item.apprenticeshipTraineeship) || notSelected.includes("apprenticeshipTraineeship");
                const matchesVetFeeCourse = (checkedValues.includes("isVetFeeCourse") && item.isVetFeeCourse) || notSelected.includes("isVetFeeCourse");

                // Check if the item matches All of the selected filters and return
                return matchesFunded && matchesOnline & matchesPartTime & matchesApprentice & matchesVetFeeCourse;
            });

            // updating functions
            noLocationsOverlay(filteredItems);

            checkLoadButton(filteredItems);

            displayLocations();

            updateMarkers(filteredItems);
        });
    }
SELECT * 
FROM (
    SELECT date_part(year, date::date) AS y,
           date_part(month, date::date) AS m

    FROM table_name
    
) subquery

WHERE y >= 2024;
date >= date_trunc('day', getdate() - interval '30 days') AND date < getdate()
select 
TO_CHAR(TO_TIMESTAMP(date, 'YYYY-MM-DD HH24:MI:SS'), 'YYYY-MM-DD') AS date_2

from 

where TO_TIMESTAMP(date_2, 'YYYY-MM-DD HH24:MI:SS')
      BETWEEN '2022-01-01'::DATE AND '2024-12-31'::DATE)
to_date(column,'YYYY-MM') AS "month"
openUrl(zoho.appuri + "record-pdf/Generate_Certificate_Report/" + input.ID + "/","same window");
add_filter('post_type_link', 'custom_post_type_link', 10, 3);
function custom_post_type_link($permalink, $post, $leavename) {
    if (!($post instanceof WP_Post)) {
        return $permalink;
    }

    if ($post->post_type === 'movies') {
        return get_home_url() . '/' . $post->post_name . '/';
    }

    return $permalink;
}

add_action('pre_get_posts', 'custom_pre_get_posts');
function custom_pre_get_posts($query) {
    global $wpdb;

    if (!$query->is_main_query()) {
        return;
    }

    // Get the requested post name
    $post_name = $query->get('name'); // Use 'name' instead of 'pagename'

    if (empty($post_name)) {
        return;
    }

    // Fetch post type from database
    $result = $wpdb->get_row(
        $wpdb->prepare(
            "SELECT wpp1.post_type, wpp2.post_name AS parent_post_name 
             FROM {$wpdb->posts} AS wpp1 
             LEFT JOIN {$wpdb->posts} AS wpp2 ON wpp1.post_parent = wpp2.ID 
             WHERE wpp1.post_name = %s LIMIT 1",
            $post_name
        )
    );

    if (!$result) {
        return; // Ensure we have a valid result
    }

    $post_type = $result->post_type; // Fix: Define $post_type

    if ($post_type === 'movies') {
        $query->set('post_type', $post_type);
        $query->set('name', $post_name);
        $query->is_single = true;
        $query->is_page = false;
    }
}
$ docker compose up --build
$ git clone https://github.com/Davidnet/docker-genai.git
HcmWorker::userId2Worker(curUserId());
hcmWorker = HcmWorker::find(HcmWorker::userId2Worker(curUserId()));
         
// not working
hcmWorker = hcmWorker::find(DirPersonUser::findUserWorkerReference(userId));
// bitwise AND operator example

let a = 12; 
let  b = 25; 

result = a & b; 
console.log(result); // 8 
<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Tutorials and Documentation - Aropha AI</title>
  <style>
    @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');
    
    /* General Styles */
    body {
      font-family: 'Roboto', sans-serif;
      margin: 0;
      padding: 0;
      background: #ffffff;
      color: #222a35;
    }
    .wrapper {
      max-width: 1200px;
      margin: 0 auto;
      border-radius: 15px;
      padding: 20px;
      margin-top: 140px;
    }
    .top-bar {
      background: #222a35;
      color: #ffffff;
      padding: 15px 0;
      text-align: center;
      font-weight: bold;
      font-size: 1.5em;
      display: flex;
      flex-direction: column;
      align-items: center;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      z-index: 1000;
    }

    .logo-container {
      display: flex;
      justify-content: center;
      width: 100%;
      padding: 10px 0;
    }

    .top-bar img.logo {
      height: 50px;
    }

    .nav-container {
      display: flex;
      justify-content: center;
      width: 100%;
      padding: 10px 0;
    }

    .button-container {
      display: flex;
      gap: 20px;
      align-items: center;
    }

    .btn {
      color: #ffffff;
      text-decoration: none;
      font-size: 14px;
      font-weight: normal;
      transition: all 0.3s ease;
      padding: 5px 10px;
    }

    .btn:hover {
      color: #66ccff;
    }

    .btn.active {
    color: #66ccff;
    }

    /* Content Styles */
    .content {
      padding: 20px 40px;
      text-align: left;
    }
    section {
      margin-bottom: 40px;
      padding: 20px;
      border-radius: 10px;
      background: #eeeeee;
      color: #222a35;
    }
    h1 {
      text-align: center;
      color: #222a35;
      font-size: 2.5em;
      margin-bottom: 40px;
    }
    h2 {
      color: #222a35;
      border-bottom: 2px solid #66ccff;
      padding-bottom: 8px;
    }
    p { line-height: 1.6; }
    .img-center {
      display: block;
      margin: 0 auto;
    }
    
    /* Table styles */
    .table-container {
      overflow-x: auto;
    }
    table {
      width: 100%;
      border-collapse: collapse;
      margin: 20px 0;
    }
    th, td {
      padding: 12px;
      text-align: left;
      border: 1px solid #ddd;
    }
    th {
      background-color: #222a35;
      color: white;
    }
    tr:nth-child(even) {
      background-color: #f9f9f9;
    }

    footer {
      text-align: center;
      padding: 20px 0;
      background: #222a35;
      color: #ffffff;
      border-radius: 10px;
      margin-top: 40px;
    }
  </style>
</head>
<body>
  <div class="top-bar">
    <div class="logo-container">
      <img src="https://www.users.aropha.com/static/assets/img/logo-rectangular.png" alt="Aropha Logo" class="logo">
    </div>
    <div class="nav-container">
      <div class="button-container">
        <a href="/user_registration.html" class="btn">User Registration</a>
        <a href="/tutorials.html" class="btn active">Tutorials and Documentations</a>
    
        <a href="/activate_free_trial.html" class="btn">Activate Free Trial</a>
        <a href="/aropha_data_submission.html" class="btn">Data Portal and Credits</a>
        <a href="/Biodegrability_screening_case_study.html" class="btn">Biodegradability Case Study</a>
        <a href="/purchase_ai_engine_credits.html" class="btn">Purchase Credits</a>
      </div>
    </div>
  </div>

  <div class="wrapper">
    <div class="content">
      <section>
        <h2>Chemical Data Entry</h2>
        <p>Chemical data can be provided in one of three ways:</p>
        <ul>
          <li>Full SMILES notation of the substance</li>
          <li>in-silico Polymer Synthesis from Monomer Units</li>
          <li>IR Data Entry</li>
        </ul>
        <img src="images/image 7.png" alt="Chemical Data Entry" class="img-center" style="max-width:90%;">
      </section>

      <section>
        <h2>AI Engines</h2>
        <p>Select the AI engine that best suits your experiment.</p>
        <div class="table-container">
          <table>
            <thead>
              <tr>
                <th>AI Engine</th>
                <th>Chemical Space</th>
                <th>Degree of Polymerization</th>
                <th>Suggested MW for small molecules</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>Aropha Former</td>
                <td>Small Molecule + Macromolecular Polymer</td>
                <td>&le; 100</td>
                <td>&le; 500</td>
              </tr>
              <tr>
                <td>ArophaGrapher</td>
                <td>Small Molecule + Macromolecular Polymer</td>
                <td>&le; 2000</td>
                <td>&ge; 500</td>
              </tr>
              <tr>
                <td>ArophaPolyformer</td>
                <td>Macromolecular Polymer</td>
                <td></td>
                <td></td>
              </tr>
            </tbody>
          </table>
        </div>
      </section>

      <section>
        <h2>Material Morphology</h2>
        <p>
          We consider the impact of material morphology. Please select the shape type that best matches your material from our list and provide the relevant parameters.
        </p>
        <img src="images/image 5.png" alt="Material Morphology" class="img-center" style="max-width:70%;">
      </section>

      <section>
        <h2>Method</h2>
        <p>
          You can choose from 60 standard methods for your experiment or design a customized method tailored to specific environmental conditions.
        </p>
        <img src="images/image 6.png" alt="Method" class="img-center" style="max-width:70%;">
      </section>
    </div>
  </div>

  <footer>
    <p>
      Follow us on <a href="https://www.linkedin.com/company/aropha/">LinkedIn</a> | &copy; 2025 Aropha Inc. All Rights Reserved.
    </p>
  </footer>
</body>
</html>
#include <iostream>
#include <vector>
using namespace std;

void HeapPermutation(vector<int>& nums, int size)
{
    if (size == 1) 
    {
        for (int num : nums)
            cout << num << " ";
        cout << endl;
        
        return;
    }

    for (int i = 0; i < size; i++) {
        HeapPermutation(nums, size - 1);

        if (size % 2 == 1) 
            swap(nums[0], nums[size - 1]);
        else 
            swap(nums[i], nums[size - 1]);
    }
}

int main() {
    int n;
    cin >> n;
    
    vector<int> nums(n);
    for (int i = 0; i < n; i++)
        cin >> nums[i];

    HeapPermutation(nums, n);

    return 0;
}
Get-ChildItem -Path "C:\Users\infer\AppData\Roaming\Vortex\downloads\cyberpunk2077\carreragt_colors" -Directory -Recurse -Filter "archive" | ForEach-Object {
>>     Copy-Item -Path $_.FullName -Destination "C:\Users\infer\AppData\Roaming\Vortex\downloads\cyberpunk2077" -Recurse -Force
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

class MainClass {

  public static string QuestionsMarks(string str) {
      string clean = Regex.Replace(str, @"([^\d\?])", string.Empty);
      var matches = Regex.Matches(clean, @"(\d)(\?{3})(\d)");
      var results = new List<int>();

      foreach (Match m in matches){
        int a = Convert.ToInt32(m.Value.First().ToString());
        int b = Convert.ToInt32(m.Value.Last().ToString());

        results.Add(a+b);
      }

      string final = results.Count != 0 && results.All<int>(r => r == 10) ? "true" : "false";

      return final;
  }

  // keep this function call here
  static void Main() {


    Console.WriteLine(QuestionsMarks(Console.ReadLine()));
    
  } 

}
<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>🔬 Aropha AI Biodegradation Prediction Platform</title>
  <style>
    @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');
    
    /* General Styles */
    body {
      font-family: 'Roboto', sans-serif;
      margin: 0;
      padding: 0;
      background: #ffffff;
      color: #222a35;
    }
    .wrapper {
      max-width: 1200px;
      margin: 0 auto;
      border-radius: 15px;
      padding: 20px;
      margin-top: 100px; 
    }
    .top-bar {
      background: #222a35;
      color: #ffffff;
      padding: 25px 30px;
      text-align: left;
      font-weight: bold;
      font-size: 1.5em;
      display: flex;
      align-items: center;
      
      /* fix in the top */
      position: fixed; 
      top: 0;
      left: 0;
      width: 100%;
      z-index: 1000; /* make sure it's always in the top */
    }

    .top-bar img.logo {
      height: 50px;
      margin-right: 15px;
    }
    header {
      background-color: transparent;
      text-align: center;
      padding: 20px;
      margin-top: 120px;
    }
    header h1 {
      font-size: 2.5em;
      color: #222a35;
    }
    .content {
      padding: 20px 40px;
      text-align: left;
    }
    section {
      margin-bottom: 40px;
      padding: 20px;
      border-radius: 10px;
      background: #eeeeee;
      color: #222a35;
    }
    h2 {
      color: #222a35;
      border-bottom: 2px solid #66ccff;
      padding-bottom: 8px;
    }
    p { line-height: 1.6; }
    .img-center {
      display: block;
      margin: 0 auto;
    }
    
    /* Buttons */
    .button-container {
      display: flex;
      justify-content: center;
      gap: 20px;
      margin-top: 20px;
    }
    .btn {
      display: inline-block;
      padding: 12px 24px;
      font-size: 16px;
      font-weight: bold;
      text-align: center;
      text-decoration: none;
      border-radius: 8px;
      transition: all 0.3s ease;
    }
    .btn{
      background: #222a35;
      color: #ffffff;
      font-weight: bold;
    }
    .btn:hover {
      background: #66ccff;
      color: #ffffff;
    }
    
    /* Footer Styles */
    footer {
      text-align: center;
      padding: 20px 0;
      background: #222a35;
      color: #ffffff;
      border-radius: 10px;
    }
  </style>
</head>
<body>
  <div class="top-bar">
    <img src="https://www.users.aropha.com/static/assets/img/logo-rectangular.png" alt="Aropha Logo" class="logo">
  </div>
  <header>
    <h1><p>AI for Bridging Cheminformatics and Biostatistics</p>
      <p>Biodegradation Simulation</p>
    </h1>
  </header>
  <div class="wrapper">
    <div class="content">
      <section style="text-align: center;">
        <div class="button-container">
          <a href="/user_registration.html" class="btn">User Registration</a>
          <a href="/tutorials.html" class="btn">Tutorials and Documentations</a>
          <a href="/activate_free_trial.html" class="btn">Activate Free Trial</a>
          <a href="/aropha_data_submission.html" class="btn">Data Processing Portal and Check Credits</a>
          <a href="/Biodegrability screening case study.html" class="btn">Biodegrability screening case study</a>
          <a href="/purchase_ai_engine_credits.html" class="btn">Purchase Simulation Credits</a>
        </div>
      </section>
    <section>
        <!-- introduction -->
        <img src="images/background_img.webp" alt="Background Image of Aropha AI Platform" class="img-center" style="max-width:50%;">
        <h2>Introduction to ArophaAI</h2>
        <p>
            <strong>Digital Twin Simulation to Streamline Biodegradability Testing</strong>
        </p>
        <p>
          ArophaAI is a digital twin simulation platform that bridges cheminformatics and biostatistics using AI-powered engines. It enables you to replicate biodegradability tests within a software environment, allowing you to design experiments, adjust variables, and analyze how your product or material behaves under various testing conditions.        </p>
        <p>
          <strong>Why ArophaAI?</strong>
        </p>
        <p>
            The goal of ArophaAI is to reduce the reliance on physical screening tests through digital simulations, enabling you to focus laboratory resources on validation rather than exploration. This allows you to gain confidence in your material’s biodegradation profile before submitting samples for physical testing, ultimately saving resources and time.
        </p>
        
        <h2>How ArophaAI Works</h2>
        <p>
            You will input your product’s chemical formula and configure the test parameters, including the testing method, inoculum options, temperature, and pH. Once the simulation runs, you will receive results similar to lab-based biodegradability testing, including a biodegradation curve over time and a submission-ready template. These digital results can replace up to 90% of lab screening tests.
        </p>
      </section>
      <!-- why Aropha AI -->
      <section>
        <h2>Data Securtiy (Aiming for ISO27001)</h2>
        <p>Designed with privacy at its core, the pipeline ensures zero visibility into your data: no data is printed, stored on hard drives, or retained on persistent storage — even temporarily. All computations performed entirely in RAM and results are securely delivered back to you.</p>
      </section>
      <!-- Spreadsheet Template Section -->
      <section>
        <h2>Spreadsheet Template for Batch Data Submission</h2>
        <p>
          We have simplified parameter selection for our complex AI methodology by providing a well-structured spreadsheet template.
          To run inferences on our processing server, simply submit your experimental design using this template.
          Your submitted data is never stored in our database; all computations are performed entirely in memory.
          Once processing is complete, you will receive your final results via secure email.
        </p>
        <p>
          To buy simulation creditsrequest a blank copy of the spreadsheet template, please contact our sales team at 
          <a href="mailto:sales@aropha.com">sales@aropha.com</a>.
        </p>
        <p>
          To check your credits or submit your spreadsheet template, please visit our 
          <a href="/aropha_data_submission.html"> Biodegredation Data Processing Portal</a>.
        </p>
      </section>

      <!-- Chemical Data Entry Section -->
      <section>
        <h2>Chemical Data Entry</h2>
        <p>Chemical data can be provided in one of three ways:</p>
        <ul>
          <li>Full SMILES notation of the substance</li>
          <li>in-silico Polymer Synthesis from Monomer Units</li>
          <li>IR Data Entry</li>
        </ul>
        <img src="images/image 7.png" alt="Chemical Data Entry" class="img-center" style="max-width:90%;">
      </section>

      <!-- AI Engines Section -->
      <section>
        <h2>AI Engines</h2>
        <p>Select the AI engine that best suits your experiment.</p>
        <div class="table-container">
          <table>
            <thead>
              <tr>
                <th>AI Engine</th>
                <th>Chemical Space</th>
                <th>Degree of Polymerization</th>
                <th>Suggested MW for small molecules</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>Aropha Former</td>
                <td>Small Molecule + Macromolecular Polymer</td>
                <td>&le; 100</td>
                <td>&le; 500</td>
              </tr>
              <tr>
                <td>ArophaGrapher</td>
                <td>Small Molecule + Macromolecular Polymer</td>
                <td>&le; 2000</td>
                <td>&ge; 500</td>
              </tr>
              <tr>
                <td>ArophaPolyformer</td>
                <td>Macromolecular Polymer</td>
                <td></td>
                <td></td>
              </tr>
            </tbody>
          </table>
        </div>
      </section>

      <!-- Material Morphology Section -->
      <section>
        <h2>Material Morphology</h2>
        <p>
          We consider the impact of material morphology. Please select the shape type that best matches your material from our list and provide the relevant parameters.
        </p>
        <img src="images/image 5.png" alt="Material Morphology" class="img-center" style="max-width:70%;">
      </section>

      <!-- Method Section -->
      <section>
        <h2>Method</h2>
        <p>
          You can choose from 60 standard methods for your experiment or design a customized method tailored to specific environmental conditions.
        </p>
        <img src="images/image 6.png" alt="Method" class="img-center" style="max-width:70%;">
      </section>
    </div>
  </div>

  <footer>
    <p>
      Follow us on <a href="https://www.linkedin.com/company/aropha/">LinkedIn</a> | &copy; 2025 Aropha Inc. All Rights Reserved.
    </p>
  </footer>
</body>
</html>
<!DOCTYPE html>
<html>

<head>
    <link rel="stylesheet" href="style.css">
</head>

<body>
    <div class="background"></div>
    <img class="bird" src="logo.png" alt="bird-img">
    <div class="message">
        Press Enter To Start Game
    </div>
    <div class="score">
        <span class="score_title"></span>
        <span class="score_val"></span>
    </div>
    <script src="gfg.js"></script>
</body>

</html>
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
    width: 100vw;
}

.background {
    height: 100vh;
    width: 100vw;
    background-color: skyblue;
}

.bird {
    height: 100px;
    width: 160px;
    position: fixed;
    top: 40vh;
    left: 30vw;
    z-index: 100;
}

.pipe_sprite {
    position: fixed;
    top: 40vh;
    left: 100vw;
    height: 70vh;
    width: 6vw;
    background-color: green;
}

.message {
    position: fixed;
    z-index: 10;
    height: 10vh;
    font-size: 10vh;
    font-weight: 100;
    color: black;
    top: 12vh;
    left: 20vw;
    text-align: center;
}

.score {
    position: fixed;
    z-index: 10;
    height: 10vh;
    font-size: 10vh;
    font-weight: 100;
    color: goldenrod;
    top: 0;
    left: 0;
}

.score_val {
    color: gold;
}
// Background scrolling speed
let move_speed = 3;
  
// Gravity constant value
let gravity = 0.5;
  
// Getting reference to the bird element
let bird = document.querySelector('.bird');
  
// Getting bird element properties
let bird_props = bird.getBoundingClientRect();
let background =
    document.querySelector('.background')
            .getBoundingClientRect();
  
// Getting reference to the score element
let score_val =
    document.querySelector('.score_val');
let message =
    document.querySelector('.message');
let score_title =
    document.querySelector('.score_title');
  
// Setting initial game state to start
let game_state = 'Start';
  
// Add an eventlistener for key presses
document.addEventListener('keydown', (e) => {
  
  // Start the game if enter key is pressed
  if (e.key == 'Enter' &&
      game_state != 'Play') {
    document.querySelectorAll('.pipe_sprite')
              .forEach((e) => {
      e.remove();
    });
    bird.style.top = '40vh';
    game_state = 'Play';
    message.innerHTML = '';
    score_title.innerHTML = 'Score : ';
    score_val.innerHTML = '0';
    play();
  }
});
function play() {
  function move() {
    
    // Detect if game has ended
    if (game_state != 'Play') return;
    
    // Getting reference to all the pipe elements
    let pipe_sprite = document.querySelectorAll('.pipe_sprite');
    pipe_sprite.forEach((element) => {
      
      let pipe_sprite_props = element.getBoundingClientRect();
      bird_props = bird.getBoundingClientRect();
      
      // Delete the pipes if they have moved out
      // of the screen hence saving memory
      if (pipe_sprite_props.right <= 0) {
        element.remove();
      } else {
        // Collision detection with bird and pipes
        if (
          bird_props.left < pipe_sprite_props.left +
          pipe_sprite_props.width &&
          bird_props.left +
          bird_props.width > pipe_sprite_props.left &&
          bird_props.top < pipe_sprite_props.top +
          pipe_sprite_props.height &&
          bird_props.top +
          bird_props.height > pipe_sprite_props.top
        ) {
          
          // Change game state and end the game
          // if collision occurs
          game_state = 'End';
          message.innerHTML = 'Press Enter To Restart';
          message.style.left = '28vw';
          return;
        } else {
          // Increase the score if player
          // has the successfully dodged the 
          if (
            pipe_sprite_props.right < bird_props.left &&
            pipe_sprite_props.right + 
            move_speed >= bird_props.left &&
            element.increase_score == '1'
          ) {
            score_val.innerHTML = +score_val.innerHTML + 1;
          }
          element.style.left = 
            pipe_sprite_props.left - move_speed + 'px';
        }
      }
    });

    requestAnimationFrame(move);
  }
  requestAnimationFrame(move);

  let bird_dy = 0;
  function apply_gravity() {
    if (game_state != 'Play') return;
    bird_dy = bird_dy + gravity;
    document.addEventListener('keydown', (e) => {
      if (e.key == 'ArrowUp' || e.key == ' ') {
        bird_dy = -7.6;
      }
    });

    // Collision detection with bird and
    // window top and bottom

    if (bird_props.top <= 0 ||
        bird_props.bottom >= background.bottom) {
      game_state = 'End';
      message.innerHTML = 'Press Enter To Restart';
      message.style.left = '28vw';
      return;
    }
    bird.style.top = bird_props.top + bird_dy + 'px';
    bird_props = bird.getBoundingClientRect();
    requestAnimationFrame(apply_gravity);
  }
  requestAnimationFrame(apply_gravity);

  let pipe_seperation = 0;
  
  // Constant value for the gap between two pipes
  let pipe_gap = 35;
  function create_pipe() {
    if (game_state != 'Play') return;
    
    // Create another set of pipes
    // if distance between two pipe has exceeded
    // a predefined value
    if (pipe_seperation > 115) {
      pipe_seperation = 0
      
      // Calculate random position of pipes on y axis
      let pipe_posi = Math.floor(Math.random() * 43) + 8;
      let pipe_sprite_inv = document.createElement('div');
      pipe_sprite_inv.className = 'pipe_sprite';
      pipe_sprite_inv.style.top = pipe_posi - 70 + 'vh';
      pipe_sprite_inv.style.left = '100vw';
      
      // Append the created pipe element in DOM
      document.body.appendChild(pipe_sprite_inv);
      let pipe_sprite = document.createElement('div');
      pipe_sprite.className = 'pipe_sprite';
      pipe_sprite.style.top = pipe_posi + pipe_gap + 'vh';
      pipe_sprite.style.left = '100vw';
      pipe_sprite.increase_score = '1';
      
      // Append the created pipe element in DOM
      document.body.appendChild(pipe_sprite);
    }
    pipe_seperation++;
    requestAnimationFrame(create_pipe);
  }
  requestAnimationFrame(create_pipe);
}
<!DOCTYPE html>
<html>

<head>
    <link rel="stylesheet" href="style.css">
</head>

<body>
    <div class="background"></div>
    <img class="bird" src="logo.png" alt="bird-img">
    <div class="message">
        Press Enter To Start Game
    </div>
    <div class="score">
        <span class="score_title"></span>
        <span class="score_val"></span>
    </div>
    <script src="gfg.js"></script>
</body>

</html>
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
    width: 100vw;
}

.background {
    height: 100vh;
    width: 100vw;
    background-color: skyblue;
}

.bird {
    height: 100px;
    width: 160px;
    position: fixed;
    top: 40vh;
    left: 30vw;
    z-index: 100;
}

.pipe_sprite {
    position: fixed;
    top: 40vh;
    left: 100vw;
    height: 70vh;
    width: 6vw;
    background-color: green;
}

.message {
    position: fixed;
    z-index: 10;
    height: 10vh;
    font-size: 10vh;
    font-weight: 100;
    color: black;
    top: 12vh;
    left: 20vw;
    text-align: center;
}

.score {
    position: fixed;
    z-index: 10;
    height: 10vh;
    font-size: 10vh;
    font-weight: 100;
    color: goldenrod;
    top: 0;
    left: 0;
}

.score_val {
    color: gold;
}
// Background scrolling speed
let move_speed = 3;
  
// Gravity constant value
let gravity = 0.5;
  
// Getting reference to the bird element
let bird = document.querySelector('.bird');
  
// Getting bird element properties
let bird_props = bird.getBoundingClientRect();
let background =
    document.querySelector('.background')
            .getBoundingClientRect();
  
// Getting reference to the score element
let score_val =
    document.querySelector('.score_val');
let message =
    document.querySelector('.message');
let score_title =
    document.querySelector('.score_title');
  
// Setting initial game state to start
let game_state = 'Start';
  
// Add an eventlistener for key presses
document.addEventListener('keydown', (e) => {
  
  // Start the game if enter key is pressed
  if (e.key == 'Enter' &&
      game_state != 'Play') {
    document.querySelectorAll('.pipe_sprite')
              .forEach((e) => {
      e.remove();
    });
    bird.style.top = '40vh';
    game_state = 'Play';
    message.innerHTML = '';
    score_title.innerHTML = 'Score : ';
    score_val.innerHTML = '0';
    play();
  }
});
function play() {
  function move() {
    
    // Detect if game has ended
    if (game_state != 'Play') return;
    
    // Getting reference to all the pipe elements
    let pipe_sprite = document.querySelectorAll('.pipe_sprite');
    pipe_sprite.forEach((element) => {
      
      let pipe_sprite_props = element.getBoundingClientRect();
      bird_props = bird.getBoundingClientRect();
      
      // Delete the pipes if they have moved out
      // of the screen hence saving memory
      if (pipe_sprite_props.right <= 0) {
        element.remove();
      } else {
        // Collision detection with bird and pipes
        if (
          bird_props.left < pipe_sprite_props.left +
          pipe_sprite_props.width &&
          bird_props.left +
          bird_props.width > pipe_sprite_props.left &&
          bird_props.top < pipe_sprite_props.top +
          pipe_sprite_props.height &&
          bird_props.top +
          bird_props.height > pipe_sprite_props.top
        ) {
          
          // Change game state and end the game
          // if collision occurs
          game_state = 'End';
          message.innerHTML = 'Press Enter To Restart';
          message.style.left = '28vw';
          return;
        } else {
          // Increase the score if player
          // has the successfully dodged the 
          if (
            pipe_sprite_props.right < bird_props.left &&
            pipe_sprite_props.right + 
            move_speed >= bird_props.left &&
            element.increase_score == '1'
          ) {
            score_val.innerHTML = +score_val.innerHTML + 1;
          }
          element.style.left = 
            pipe_sprite_props.left - move_speed + 'px';
        }
      }
    });

    requestAnimationFrame(move);
  }
  requestAnimationFrame(move);

  let bird_dy = 0;
  function apply_gravity() {
    if (game_state != 'Play') return;
    bird_dy = bird_dy + gravity;
    document.addEventListener('keydown', (e) => {
      if (e.key == 'ArrowUp' || e.key == ' ') {
        bird_dy = -7.6;
      }
    });

    // Collision detection with bird and
    // window top and bottom

    if (bird_props.top <= 0 ||
        bird_props.bottom >= background.bottom) {
      game_state = 'End';
      message.innerHTML = 'Press Enter To Restart';
      message.style.left = '28vw';
      return;
    }
    bird.style.top = bird_props.top + bird_dy + 'px';
    bird_props = bird.getBoundingClientRect();
    requestAnimationFrame(apply_gravity);
  }
  requestAnimationFrame(apply_gravity);

  let pipe_seperation = 0;
  
  // Constant value for the gap between two pipes
  let pipe_gap = 35;
  function create_pipe() {
    if (game_state != 'Play') return;
    
    // Create another set of pipes
    // if distance between two pipe has exceeded
    // a predefined value
    if (pipe_seperation > 115) {
      pipe_seperation = 0
      
      // Calculate random position of pipes on y axis
      let pipe_posi = Math.floor(Math.random() * 43) + 8;
      let pipe_sprite_inv = document.createElement('div');
      pipe_sprite_inv.className = 'pipe_sprite';
      pipe_sprite_inv.style.top = pipe_posi - 70 + 'vh';
      pipe_sprite_inv.style.left = '100vw';
      
      // Append the created pipe element in DOM
      document.body.appendChild(pipe_sprite_inv);
      let pipe_sprite = document.createElement('div');
      pipe_sprite.className = 'pipe_sprite';
      pipe_sprite.style.top = pipe_posi + pipe_gap + 'vh';
      pipe_sprite.style.left = '100vw';
      pipe_sprite.increase_score = '1';
      
      // Append the created pipe element in DOM
      document.body.appendChild(pipe_sprite);
    }
    pipe_seperation++;
    requestAnimationFrame(create_pipe);
  }
  requestAnimationFrame(create_pipe);
}
Array.prototype.slice.call(document.querySelectorAll('input[type="checkbox"]')).forEach(function(e){e.setAttribute("checked","checked");});  
import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.jira.groovy.user.FieldBehaviours

//copy object in single-select field onto global Numeric field

def formField = getFieldById(getFieldChanged()) // "Estimated Story Points" field
def storyPointsField = getFieldByName("Story Points") // Numeric Field

def estimatedStoryPointsValue = formField.getValue()

if (estimatedStoryPointsValue) {
    try {
        // Convert the selected option into a numeric value
        def numericValue = estimatedStoryPointsValue.toString().toInteger()
        storyPointsField.setFormValue(numericValue)
    } catch (Exception e) {
        storyPointsField.setError("Invalid selection: Unable to convert to a number.")
    }
} else {
    storyPointsField.setFormValue(null) // Clear if no value selected
}
Creating a Successful MMORPG is quite a complex process that goes far beyond coding skills. It needs a passion for storytelling, world-building, and craft an interactive universe that delivers a seamless experience for players.

When it comes to an MMORPG game development company, it brings advanced technology and design expertise to ensure your game runs smoothly across multiple platforms. Their deep understanding of player engagement and community-building assists you to create a loyal and active user base.

With ongoing support and updates, these companies assure your game remains competitive and continues to evolve with player expectations. Partnering with Maticz - a leading MMORPG game development company can elevate your project by leveraging their expertise in designing immersive and dynamic virtual worlds that captivate players and deliver gaming experiences.
height: 200px;
    object-fit: cover;
'' Based on:
'' Displaying a List of All VBA Procedures in an Excel 2007 Workbook
''     from the Ribbon (June 2009)
'' by Frank Rice, Microsoft Corporation
'' http://msdn.microsoft.com/en-us/library/dd890502(office.11).aspx#

'' set a reference to the Microsoft Visual Basic for Applications Extensibility 5.3 Library

Sub GetProcedures()
  ' Declare variables to access the Excel workbook.
  Dim app As Excel.Application
  Dim wb As Excel.Workbook
  Dim wsOutput As Excel.Worksheet
  Dim sOutput() As String
  Dim sFileName As String

  ' Declare variables to access the macros in the workbook.
  Dim vbProj As VBIDE.VBProject
  Dim vbComp As VBIDE.VBComponent
  Dim vbMod As VBIDE.CodeModule

  ' Declare other miscellaneous variables.
  Dim iRow As Long
  Dim iCol As Long
  Dim iLine As Integer
  Dim sProcName As String
  Dim pk As vbext_ProcKind

  Set app = Excel.Application

  ' create new workbook for output
  Set wsOutput = app.Workbooks.Add.Worksheets(1)

  'For Each wb In app.Workbooks
  For Each vbProj In app.VBE.VBProjects

    ' Get the project details in the workbook.
    On Error Resume Next
    sFileName = vbProj.Filename
    If Err.Number <> 0 Then sFileName = "file not saved"
    On Error GoTo 0

    ' initialize output array
    ReDim sOutput(1 To 2)
    sOutput(1) = sFileName
    sOutput(2) = vbProj.Name
    iRow = 0

    ' check for protected project
    On Error Resume Next
    Set vbComp = vbProj.VBComponents(1)
    On Error GoTo 0

    If Not vbComp Is Nothing Then
      ' Iterate through each component in the project.
      For Each vbComp In vbProj.VBComponents

        ' Find the code module for the project.
        Set vbMod = vbComp.CodeModule

        ' Scan through the code module, looking for procedures.
        iLine = 1
        Do While iLine < vbMod.CountOfLines
          sProcName = vbMod.ProcOfLine(iLine, pk)
          If sProcName <> "" Then
            iRow = iRow + 1
            ReDim Preserve sOutput(1 To 2 + iRow)
            sOutput(2 + iRow) = vbComp.Name & ": " & sProcName
            iLine = iLine + vbMod.ProcCountLines(sProcName, pk)
          Else
            ' This line has no procedure, so go to the next line.
            iLine = iLine + 1
          End If
        Loop

        ' clean up
        Set vbMod = Nothing
        Set vbComp = Nothing

      Next
    Else
      ReDim Preserve sOutput(1 To 3)
      sOutput(3) = "Project protected"
    End If

    If UBound(sOutput) = 2 Then
      ReDim Preserve sOutput(1 To 3)
      sOutput(3) = "No code in project"
    End If

    ' define output location and dump output
    If Len(wsOutput.Range("A1").Value) = 0 Then
      iCol = 1
    Else
      iCol = wsOutput.Cells(1, wsOutput.Columns.Count).End(xlToLeft).Column + 1
    End If
    wsOutput.Cells(1, iCol).Resize(UBound(sOutput) + 1 - LBound(sOutput)).Value = _
        WorksheetFunction.Transpose(sOutput)

    ' clean up
    Set vbProj = Nothing
  Next

  ' clean up
  wsOutput.UsedRange.Columns.AutoFit
End Sub
Looking for a high-performance mobile app to boost your business? Our expert mobile app development services bring your ideas to life with cutting-edge technology and seamless user experience.
🔹 iOS & Android App Development – Scalable, feature-rich apps
🔹 Custom App Solutions – Tailored to your business needs
🔹 UI/UX Design – Engaging & intuitive interfaces
🔹 Cross-Platform Development – Reach a wider audience
🔹 End-to-End Support – From ideation to deployment & maintenance
✅ Stay ahead in the digital world with our expert mobile app solutions!
📞 Call/WhatsApp - +91 7904323274
🌐 Website - https://www.beleaftechnologies.com/mobile-app-development-company
📩 DM us now to turn your vision into reality! 🚀 
Option Explicit
                      'Remember to add a reference to Microsoft Visual Basic for Applications Extensibility 
                      'Exports all VBA project components containing code to a folder in the same directory as this spreadsheet.
                      Public Sub ExportAllComponents()
                          Dim VBComp As VBIDE.VBComponent
                          Dim destDir As String, fName As String, ext As String 
                          'Create the directory where code will be created.
                          'Alternatively, you could change this so that the user is prompted
                          If ActiveWorkbook.Path = "" Then
                              MsgBox "You must first save this workbook somewhere so that it has a path.", , "Error"
                              Exit Sub
                          End If
                          destDir = ActiveWorkbook.Path & "\" & ActiveWorkbook.Name & " Modules"
                          If Dir(destDir, vbDirectory) = vbNullString Then MkDir destDir
                          
                          'Export all non-blank components to the directory
                          For Each VBComp In ActiveWorkbook.VBProject.VBComponents
                              If VBComp.CodeModule.CountOfLines > 0 Then
                                  'Determine the standard extention of the exported file.
                                  'These can be anything, but for re-importing, should be the following:
                                  Select Case VBComp.Type
                                      Case vbext_ct_ClassModule: ext = ".cls"
                                      Case vbext_ct_Document: ext = ".cls"
                                      Case vbext_ct_StdModule: ext = ".bas"
                                      Case vbext_ct_MSForm: ext = ".frm"
                                      Case Else: ext = vbNullString
                                  End Select
                                  If ext <> vbNullString Then
                                      fName = destDir & "\" & VBComp.Name & ext
                                      'Overwrite the existing file
                                      'Alternatively, you can prompt the user before killing the file.
                                      If Dir(fName, vbNormal) <> vbNullString Then Kill (fName)
                                      VBComp.Export (fName)
                                  End If
                              End If
                          Next VBComp
                      End Sub
                      
#include <iostream>
#include <vector>
using namespace std;
 
int Fibonacci(int n, vector<int>& memoVector)
{
  if(n == 0 || n == 1)
    return 1;
    
  if(memoVector[n] != -1)
    return memoVector[n];
    
  return memoVector[n] = Fibonacci(n-1, memoVector) + Fibonacci(n-2, memoVector);
}
 
int main() 
{
  int n;
  cin >> n;
  vector<int> memoVector(n+1, -1);
  
  cout << "Ways to reach " << n << "th stair: " << Fibonacci(n, memoVector) << endl;
  
  return 0;
}
star

Thu Feb 13 2025 20:50:48 GMT+0000 (Coordinated Universal Time)

@DaviRolam

star

Thu Feb 13 2025 15:25:10 GMT+0000 (Coordinated Universal Time)

@meherbansingh

star

Thu Feb 13 2025 14:44:01 GMT+0000 (Coordinated Universal Time)

@jdeveloper #php

star

Thu Feb 13 2025 14:29:05 GMT+0000 (Coordinated Universal Time) https://etherscan.io/verifyContract-solc?a

@mathewmerlin72

star

Thu Feb 13 2025 14:28:51 GMT+0000 (Coordinated Universal Time) https://etherscan.io/verifyContract-solc?a

@mathewmerlin72

star

Thu Feb 13 2025 14:28:31 GMT+0000 (Coordinated Universal Time) https://etherscan.io/verifyContract-solc?a

@mathewmerlin72

star

Thu Feb 13 2025 11:32:32 GMT+0000 (Coordinated Universal Time) https://huggingface.co/bigcode/starcoder

@zerozero

star

Thu Feb 13 2025 11:32:01 GMT+0000 (Coordinated Universal Time) https://huggingface.co/bigcode/starcoder

@zerozero

star

Thu Feb 13 2025 10:28:02 GMT+0000 (Coordinated Universal Time) https://dnevnik.ru/r/omsk/marks/school/47519/student/1000014996211/current

@bobraSlada

star

Thu Feb 13 2025 10:25:23 GMT+0000 (Coordinated Universal Time) https://dnevnik.ru/r/omsk/marks/school/47519/student/1000014996211/current

@bobraSlada

star

Thu Feb 13 2025 02:22:10 GMT+0000 (Coordinated Universal Time)

@davidmchale

star

Thu Feb 13 2025 02:20:11 GMT+0000 (Coordinated Universal Time)

@davidmchale #toggle #force

star

Thu Feb 13 2025 00:01:52 GMT+0000 (Coordinated Universal Time)

@emma1314

star

Wed Feb 12 2025 23:58:57 GMT+0000 (Coordinated Universal Time)

@emma1314

star

Wed Feb 12 2025 23:20:21 GMT+0000 (Coordinated Universal Time)

@davidmchale #reducer #reduce

star

Wed Feb 12 2025 23:00:05 GMT+0000 (Coordinated Universal Time)

@davidmchale #modal #text

star

Wed Feb 12 2025 22:58:02 GMT+0000 (Coordinated Universal Time)

@davidmchale #checkbox #conditionals

star

Wed Feb 12 2025 18:53:38 GMT+0000 (Coordinated Universal Time) https://ezcash50.casino/my/payments/deposits

@senio231312

star

Wed Feb 12 2025 17:56:01 GMT+0000 (Coordinated Universal Time)

@kastokes

star

Wed Feb 12 2025 17:49:00 GMT+0000 (Coordinated Universal Time)

@kastokes

star

Wed Feb 12 2025 17:48:06 GMT+0000 (Coordinated Universal Time)

@kastokes

star

Wed Feb 12 2025 17:44:24 GMT+0000 (Coordinated Universal Time)

@kastokes

star

Wed Feb 12 2025 13:26:50 GMT+0000 (Coordinated Universal Time)

@RehmatAli2024 #deluge

star

Wed Feb 12 2025 11:13:29 GMT+0000 (Coordinated Universal Time) https://www.coinsclone.com/best-non-kyc-crypto-exchange/

@Flynnrider #non #kyc #crypto #exchange

star

Wed Feb 12 2025 10:59:12 GMT+0000 (Coordinated Universal Time) https://docs.docker.com/guides/genai-video-bot/

@TuckSmith541

star

Wed Feb 12 2025 10:58:19 GMT+0000 (Coordinated Universal Time) https://docs.docker.com/guides/genai-video-bot/

@TuckSmith541

star

Wed Feb 12 2025 09:52:04 GMT+0000 (Coordinated Universal Time)

@MinaTimo

star

Wed Feb 12 2025 06:58:36 GMT+0000 (Coordinated Universal Time)

@ez_nada999

star

Wed Feb 12 2025 06:55:42 GMT+0000 (Coordinated Universal Time)

@ez_nada999

star

Wed Feb 12 2025 06:51:42 GMT+0000 (Coordinated Universal Time) https://www.programiz.com/javascript/bitwise-operators

@wasimmohammad

star

Wed Feb 12 2025 06:50:48 GMT+0000 (Coordinated Universal Time)

@emma1314

star

Wed Feb 12 2025 04:22:22 GMT+0000 (Coordinated Universal Time)

@chicovirabrikin #nodejs

star

Wed Feb 12 2025 02:43:23 GMT+0000 (Coordinated Universal Time)

@rivermin #c#

star

Tue Feb 11 2025 21:20:31 GMT+0000 (Coordinated Universal Time)

@emma1314

star

Tue Feb 11 2025 16:50:39 GMT+0000 (Coordinated Universal Time) https://www.geeksforgeeks.org/flappy-bird-game-in-javascript/

@MaccAndChez #javascript

star

Tue Feb 11 2025 16:50:01 GMT+0000 (Coordinated Universal Time) https://www.geeksforgeeks.org/flappy-bird-game-in-javascript/

@MaccAndChez #javascript

star

Tue Feb 11 2025 16:37:34 GMT+0000 (Coordinated Universal Time)

@selmo

star

Tue Feb 11 2025 13:44:50 GMT+0000 (Coordinated Universal Time)

@belleJar #groovy

star

Tue Feb 11 2025 12:34:37 GMT+0000 (Coordinated Universal Time) https://maticz.com/mmorpg-game-development

@austinparker #mmorpggame #mmorpggamedevelopment #mmorpggamedevelopmentcompany

star

Tue Feb 11 2025 10:38:41 GMT+0000 (Coordinated Universal Time) https://appticz.com/poloniex-clone-script

@davidscott

star

Tue Feb 11 2025 09:34:09 GMT+0000 (Coordinated Universal Time) https://innosoft.ae/blockchain-software-development/

@Hazelwatson24 ##blockchain ##blockchainsoftware

star

Tue Feb 11 2025 08:21:57 GMT+0000 (Coordinated Universal Time)

@erika

star

Tue Feb 11 2025 06:31:14 GMT+0000 (Coordinated Universal Time) https://peltiertech.com/list-vba-procedures-by-vba-module-and-vb-procedure/

@acassell

star

Tue Feb 11 2025 06:29:47 GMT+0000 (Coordinated Universal Time) https://beleaftechnologies.com/mobile-app-development-company

@kavyamagi #mobileappdevelopmemnt #appdevelopment

star

Tue Feb 11 2025 06:25:25 GMT+0000 (Coordinated Universal Time) https://www.experts-exchange.com/articles/1457/Automate-Exporting-all-Components-in-an-Excel-Project.html

@acassell

star

Tue Feb 11 2025 06:21:35 GMT+0000 (Coordinated Universal Time)

@Rohan@99

star

Tue Feb 11 2025 06:15:41 GMT+0000 (Coordinated Universal Time) https://www.addustechnologies.com/bet365-clone-script

@Seraphina

star

Tue Feb 11 2025 05:59:15 GMT+0000 (Coordinated Universal Time) https://beleaftechnologies.com/crypto-otc-trading-platform-development

@smithtaylor #crypto #trading #development

Save snippets that work with our extensions

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