Snippets Collections
$ 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;
}
#include <iostream>
using namespace std;

int SumOfNNaturalNumbers(int n)
{
  if(n == 1)
    return 1;
    
  return (n + SumOfNNaturalNumbers(n-1));
}

int main() 
{
  int n;
  cin >> n;
  
  cout << "Sum of first " << n << " natural numbers: " << SumOfNNaturalNumbers(n) << endl;
  return 0;
}
#include <iostream>
#include <vector>
using namespace std;

int Fibonacci(int n, vector<int>& memoVector)
{
  if(n == 0 || n == 1)
    return n;
    
  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 << n << "th Fibonacci number: " << Fibonacci(n-1, memoVector) << endl;
  
  return 0;
}
//data
"locations": [
	{
	"name": "Business Academy Australia",
	"lat": -33.8688,
	"lng": 151.2093,
	"website": "https://www.businessacademyaustralia.com.au",
	"tel": "0290198888",
	"email": "info@businessacademyaustralia.com.au",
	"category": "Campus",
	"governmentService": true,
	"formattedLocality": "Sydney, NSW 2000",
	"providerId": "13579",
	"locationId": "4001",
	"registeredTrainerId": "24680",
	"isVetFeeProvider": false,
	"locationTypeId": null,
	"facilities": null,
	"service": null,
	"apprenticeshipTraineeship": true,
	"minimumFee": 1400,
	"maximumFee": 2800,
	"isVetFeeCourse": false,
	"isAvailableOnline": true,
	"isAvailablePartTime": true,
	"deliveryModes": ["In-person"]
	},
	{
	"name": "Entrepreneur Education",
	"lat": -27.4698,
	"lng": 153.0251,
	"website": "https://www.entrepreneureducation.com.au",
	"tel": "0733332222",
	"email": "info@entrepreneureducation.com.au",
	"category": "Campus",
	"governmentService": true,
	"formattedLocality": "Brisbane, QLD 4000",
	"providerId": "98765",
	"locationId": "4002",
	"registeredTrainerId": "13579",
	"isVetFeeProvider": false,
	"locationTypeId": null,
	"facilities": null,
	"service": null,
	"apprenticeshipTraineeship": true,
	"minimumFee": 3800,
	"maximumFee": 4700,
	"isVetFeeCourse": true,
	"isAvailableOnline": false,
	"isAvailablePartTime": false,
	"deliveryModes": ["Online","Hybrid"]
	},
	{
	"name": "Small Business Training Institute",
	"lat": -27.9687807,
	"lng": 153.4066696,
	"website": "https://www.sbtinstitute.com.au",
	"tel": "0388885555",
	"email": "info@sbtinstitute.com.au",
	"category": "Campus",
	"governmentService": false,
	"formattedLocality": "Melbourne, VIC 3000",
	"providerId": "54321",
	"locationId": "4003",
	"registeredTrainerId": "67890",
	"isVetFeeProvider": false,
	"locationTypeId": null,
	"facilities": null,
	"service": null,
	"apprenticeshipTraineeship": false,
	"minimumFee": 2200,
	"maximumFee": 4100,
	"isVetFeeCourse": true,
	"isAvailableOnline": true,
	"isAvailablePartTime": true,
	"deliveryModes": ["In-person"]
	},
  
  
  // using groupby to group locations based on the items in the delivery modes values
  
   	// shows array of arrays
    const getDeliveryItems = items.map((item) => item.deliveryModes);
    console.log({ getDeliveryItems });

    //flatten all the arrays combined into one array and sort each one by their name key
    const flattened = items.flatMap((item) => item.deliveryModes.map((mode) => ({ ...item, mode }))).sort((a, b) => a.name.localeCompare(b.name));

    console.log({ flattened });

    // use grouping to separate out by a new mode key
    let modesGrouped = Object.groupBy(flattened, ({ mode }) => mode);
    console.log({ modesGrouped });
	// In-person: Array(5), Online: Array(4), Hybrid: Array(1)}

    Object.keys(modesGrouped).forEach((key) => {
        // remove the mode key by returing ...rest
        modesGrouped[key] = modesGrouped[key].map(({ mode, ...rest }) => rest);
    });

    console.log({ modesGrouped }); //

   // destructuring
   const { Hybrid: hybrid, ["In-person"]: inPerson, Online: online } = modesGrouped;
   console.log({ hybrid, inPerson, online });







// another example

const apprenticeshipValues = Object.groupBy(items, ({ apprenticeshipTraineeship }) => apprenticeshipTraineeship);

        console.log(apprenticeshipValues[true]);
        console.log(apprenticeshipValues[false]);

        // // desctructuring the objects into an array
        const { true: apprenticeshipTraineeship = [],
               false: nonapprenticeshipTraineeship = [] } = apprenticeshipValues;
        
		console.log({ apprenticeshipTraineeship });
        console.log({ nonapprenticeshipTraineeship });
const items = [
    { name: "Item1", price: 450 },
    { name: "Item2", price: 1500 },
    { name: "Item3", price: 350 },
    { name: "Item4", price: 2000 },
    { name: "Item5", price: 1200 },
    { name: "Item6", price: 300 }
];

const groupedItems = items.reduce((groups, item) => {
    // Define price ranges
    let groupKey = "";
    if (item.price < 500) {
        groupKey = "Under 500";
    } else if (item.price > 1000) {
        groupKey = "Above 1000";
    }

    // Add item to appropriate group
    if (groupKey) {
        if (!groups[groupKey]) {
            groups[groupKey] = [];
        }
        groups[groupKey].push(item);
    }

    return groups;
}, {});

console.log(groupedItems);


// json
{
    "Under 500": [
        { "name": "Item1", "price": 450 },
        { "name": "Item3", "price": 350 },
        { "name": "Item6", "price": 300 }
    ],
    "Above 1000": [
        { "name": "Item2", "price": 1500 },
        { "name": "Item4", "price": 2000 },
        { "name": "Item5", "price": 1200 }
    ]
}
<!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>
    /* General Styles */
    body {
      font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
      margin: 0;
      padding: 0;
      background-color: #2C4555;
      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: 500px;
      text-align: center;
    }
    
    /* Logo */
    .logo {
      width: 200px;
      margin-bottom: 20px;
      margin-top: 20px;
    }
    
    /* Headings */
    h1 {
      margin-bottom: 20px;
      font-size: 24px;
      color: #ffffff;
    }
    
    /* Form Groups */
    .form-group {
      margin-bottom: 15px;
      text-align: left;
    }
    
    label {
      display: block;
      margin: 10px 0 5px;
      font-weight: bold;
      color: #ffffff;
    }
    
    /* Input Fields */
    input[type="email"],
    input[type="password"],
    input[type="file"] {
      width: 100%;
      padding: 10px;
      margin-bottom: 10px;
      border-radius: 5px;
      background: #24343D;
      color: #ffffff;
      border: none;
      outline: none;
    }
    
    input::placeholder {
      color: #b0b8bf;
    }
    
    /* Buttons */
    button,
    input[type="submit"] {
      width: 100%;
      background-color: #007BFF;
      color: #ffffff;
      border: none;
      padding: 12px;
      border-radius: 5px;
      cursor: pointer;
      font-size: 16px;
    }
    
    button:hover,
    input[type="submit"]:hover {
      background-color: #0056b3;
    }
    
    /* Row with label + file input side by side */
    .row-flex {
      display: flex;
      align-items: center;
      gap: 0.8em;
      flex-wrap: wrap;
    }
    
    /* Message Boxes */
    #creditsBox,
    #messages {
      background: #24343D;
      padding: 15px;
      min-height: 50px;
      border: 1px solid #007BFF;
      margin-top: 15px;
      white-space: pre-wrap;
      border-radius: 5px;
      color: #ffffff;
      text-align: left; /* Align text to left */
    }

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

    footer a {
      color: #ffffff;
      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">
    <h1>Aropha's Biodegradation Prediction Platform</h1>
    <form id="arophaForm">
      <!-- Email -->
      <div class="form-group">
        <label for="email">Email:</label>
        <input
          type="email"
          id="email"
          name="email"
          placeholder="Enter your email"
          required
        />
      </div>

      <!-- Password -->
      <div class="form-group">
        <label for="password">Password:</label>
        <input
          type="password"
          id="password"
          name="password"
          placeholder="Enter your password"
          required
        />
      </div>

      <!-- Check Credits button -->
      <div class="form-group">
        <button id="checkCreditsBtn" type="button">
          Check Your Credits
        </button>
      </div>

      <!-- Spreadsheet (.xlsx) label next to file chooser -->
      <div class="form-group row-flex">
        <label for="spreadsheet" style="margin-bottom: 0;">
          Spreadsheet (.xlsx):
        </label>
        <input
          type="file"
          id="spreadsheet"
          name="spreadsheet"
          accept=".xlsx"
          required
        />
      </div>

      <!-- Submit Template Spreadsheet button -->
      <div class="form-group">
        <button id="submitBtn" type="submit">
          Submit Template Spreadsheet
        </button>
      </div>
    </form>

    <!-- Displays credit info from the server -->
    <div id="creditsBox"></div>

    <!-- Displays messages for final spreadsheet submission -->
    <div id="messages"></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>
    // Utility: convert ArrayBuffer to Base64
    function arrayBufferToBase64(buffer) {
      let binary = '';
      const bytes = new Uint8Array(buffer);
      for (let i = 0; i < bytes.length; i++) {
        binary += String.fromCharCode(bytes[i]);
      }
      return btoa(binary);
    }

    // 1) Check Your Credits
    document.getElementById('checkCreditsBtn').addEventListener('click', async () => {
      const creditsBox = document.getElementById('creditsBox');
      creditsBox.textContent = 'Checking credits...';

      const email = document.getElementById('email').value.trim();
      const password = document.getElementById('password').value;

      if (!email || !password) {
        creditsBox.textContent = 'Please enter Email and Password first.';
        return;
      }

      // Construct JSON payload
      const json_data = {
        email,
        password,
        filename: 'filename_blank',
        raw_data: 'blank'
      };

      try {
        const response = await fetch('https://modelserver.aropha.com/run_twin_engines', {
          method: 'POST',
          headers: { 'Content-Type': 'application/json' },
          body: JSON.stringify(json_data)
        });

        if (!response.ok) {
          try {
            const errorData = await response.json();
            console.log('Full error response:', errorData);
            if (errorData.detail) {
              creditsBox.textContent = errorData.detail;
            } else {
              creditsBox.textContent = `Error: ${JSON.stringify(errorData, null, 2)}`;
            }
          } catch (jsonError) {
            const rawError = await response.text();
            console.error('Raw error response:', rawError);
            creditsBox.textContent = `Error: Could not parse JSON. Raw response: ${rawError}`;
          }
          return;
        }

        const responseData = await response.json();
        if (typeof responseData.credits !== 'undefined') {
          creditsBox.textContent = `You have ${responseData.credits} credits remaining.`;
        } else {
          creditsBox.textContent = 'Credits info not found in server response.';
        }
      } catch (err) {
        creditsBox.textContent = 'Error: ' + err;
      }
    });

    // 2) Submit the form (spreadsheet upload)
    document.getElementById('arophaForm').addEventListener('submit', async function (event) {
      event.preventDefault(); // Prevent normal form POST

      const messagesDiv = document.getElementById('messages');
      messagesDiv.textContent = 'Preparing and uploading...';

      const email = document.getElementById('email').value.trim();
      const password = document.getElementById('password').value;
      const fileInput = document.getElementById('spreadsheet');

      if (!fileInput.files || fileInput.files.length === 0) {
        messagesDiv.textContent = 'Please select a spreadsheet file.';
        return;
      }

      const file = fileInput.files[0];
      const filename = file.name;

      // Read the file as an ArrayBuffer
      let fileBuffer;
      try {
        fileBuffer = await file.arrayBuffer();
      } catch (err) {
        messagesDiv.textContent = 'Error reading file: ' + err;
        return;
      }

      // Convert the ArrayBuffer to Base64
      const raw_data_b64 = arrayBufferToBase64(fileBuffer);

      // Construct JSON payload
      const json_data = {
        email,
        password,
        filename,
        raw_data: raw_data_b64
      };

      // POST to Aropha modelserver
      try {
        const response = await fetch('https://modelserver.aropha.com/run_twin_engines', {
          method: 'POST',
          headers: { 'Content-Type': 'application/json' },
          body: JSON.stringify(json_data)
        });
        
        if (response.status === 422) {
          const responseData = await response.json();
          if (responseData.detail) {
            messagesDiv.textContent = responseData.detail;
          } else {
            messagesDiv.textContent = JSON.stringify(responseData, null, 2);
          }
          if (responseData['flag data']) {
            const flagBase64 = responseData['flag data'];
            const byteChars = atob(flagBase64);
            const byteNumbers = new Array(byteChars.length);
            for (let i = 0; i < byteChars.length; i++) {
              byteNumbers[i] = byteChars.charCodeAt(i);
            }
            const byteArray = new Uint8Array(byteNumbers);
            const blob = new Blob([byteArray], { type: 'application/gzip' });
  
            const now = new Date();
            const currentDate = now.toISOString().split('T')[0];
            const currentTime = now.toTimeString().split(' ')[0].replace(/:/g, '-');
            const templateFileName = filename.replace(/\.[^/.]+$/, '');
            const dynamicFileName = `flag_notes_${templateFileName}_${currentDate}_${currentTime}.gz`;
  
            const downloadUrl = URL.createObjectURL(blob);
            const link = document.createElement('a');
            link.href = downloadUrl;
            link.download = dynamicFileName;
            document.body.appendChild(link);
            link.click();
            document.body.removeChild(link);
            URL.revokeObjectURL(downloadUrl);
          }
          return;
        } else if (!response.ok) {
          try {
            const errorData = await response.json();
            console.log('Full error response:', errorData);
            if (errorData.detail) {
              messagesDiv.textContent = errorData.detail;
            } else {
              messagesDiv.textContent = `Error: ${JSON.stringify(errorData, null, 2)}`;
            }
          } catch (jsonError) {
            const rawError = await response.text();
            console.error('Raw error response:', rawError);
            messagesDiv.textContent = `Error: Could not parse JSON. Raw response: ${rawError}`;
          }
          return;
        }
  
        if (response.status === 200) {
          const message = await response.json();
          messagesDiv.textContent = message.detail;
        }
  
      } catch (err) {
        messagesDiv.textContent = 'Error submitting data: ' + err;
      }
    });
  </script>
</body>
</html>
<!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>
    /* General Styles */
    body {
      font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
      margin: 0;
      padding: 0;
      background-color: #2C4555; /* Matching 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: #007BFF;
      color: white;
      border: none;
      padding: 12px;
      border-radius: 5px;
      cursor: pointer;
      font-size: 16px;
    }

    button[type="submit"]:hover {
      background-color: #0056b3;
    }

    /* 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: #007BFF;
      color: white;
      border-radius: 5px;
      cursor: pointer;
    }

    .close-button:hover {
      background: #0056b3;
    }

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

    .info a {
      color: #007BFF;
      text-decoration: none;
    }

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

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

    footer a {
      color: #ffffff;
      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>
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":star: What's on in Melbourne this week! :star:"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n\n Hey Melbourne, happy Monday! Please see below for what's on this week. "
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": "Xero Café :coffee:",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n :new-thing: *This week we are offering:* \n\n *_Insert Sweet Treats_* \n\n *Weekly Café Special*: *_Insert Coffee Special_*"
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": " Wednesday, 25th September :calendar-date-25:",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n\n:lunch: *Lunch*: From *12pm* in the L3 kitchen + Wominjeka breakout space!"
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": "Thursday, 26th September :calendar-date-26:",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":breakfast: *Breakfast*: Provided by *Kartel Catering* from *8:30am - 10:30am* in the Wominjeka Breakout Space."
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Stay tuned to this channel, and make sure you're subscribed to the <https://calendar.google.com/calendar/u/0?cid=Y19xczkyMjk5ZGlsODJzMjA4aGt1b3RnM2t1MEBncm91cC5jYWxlbmRhci5nb29nbGUuY29t|*Melbourne Social Calendar*> :party-wx:"
			}
		}
	]
}
#include <iostream>
using namespace std;

int main() 
{
    
    int arr[]={1,2,3,4,5,6};
    for (int i = 0; i < 6; i++) {
        if (arr[i]%2==0){
          arr[i]=arr[i]+10;
        }
        else arr[i]=arr[i]*2;
         cout<<arr[i]<<" ";
    }
    
    return 0;
}
=DATEVALUE(CONCATENATE(RIGHT(AL9,4),"-",SUBSTITUTE(SUBSTITUTE(AL9,RIGHT(AL9,5),""),"/","-")))
public with sharing class DependentPicklistController {

    public static Map<String, DependentPicklistWrapper> getDependentPicklistValuesFiltered(String dependentField, List<String> keys) {
        Map<String, DependentPicklistWrapper> dependentPicklistValues = getDependentPicklistValues(dependentField);

        for (String currentKey : dependentPicklistValues.keySet()) {
            if (!keys.contains(currentKey)) {
                dependentPicklistValues.remove(currentKey);
            }
        }

        return dependentPicklistValues;
    }

    public static Map<String, DependentPicklistWrapper> getDependentPicklistValues(String dependentPickListField) {
        List<String> splitString = dependentPickListField.split('\\.');
        Schema.SobjectField dependentField = Schema.getGlobalDescribe().get(splitString[0]).getDescribe().fields.getMap().get(splitString[1]);
        Map<String, DependentPicklistWrapper> dependentPicklistValues = new Map<String, DependentPicklistWrapper>();
        Schema.DescribeFieldResult dependentFieldResult = dependentField.getDescribe();
        Schema.sObjectField controllerField = dependentFieldResult.getController();

        Schema.DescribeFieldResult controllerFieldResult = controllerField.getDescribe();
        List<Schema.PicklistEntry> controllerValues = (controllerFieldResult.getType() == Schema.DisplayType.Boolean ? null : controllerFieldResult.getPicklistValues());

        String base64map = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';

        for (Schema.PicklistEntry entry : dependentFieldResult.getPicklistValues()) {
            if (entry.isActive() && String.isNotEmpty(String.valueOf(((Map<String, Object>) JSON.deserializeUntyped(JSON.serialize(entry))).get('validFor')))) {
                List<String> base64chars = String.valueOf(((Map<String, Object>) JSON.deserializeUntyped(JSON.serialize(entry))).get('validFor')).split('');
                for (Integer i = 0; i < (controllerValues != null ? controllerValues.size() : 2); i++) {
                    Schema.PicklistEntry controllerValue = (Schema.PicklistEntry) (controllerValues == null
                        ? (Object) (i == 1)
                        : (Object) (controllerValues[i].isActive() ? controllerValues[i] : null));

                    Integer bitIndex = i / 6;
                    if (bitIndex > base64chars.size() - 1) {
                        break;
                    }
                    Integer bitShift = 5 - Math.mod(i, 6);
                    if (controllerValue == null || (base64map.indexOf(base64chars[bitIndex]) & (1 << bitShift)) == 0) {
                        continue;
                    }
                    String apiName = controllerValue.getValue();
                    if (!dependentPicklistValues.containsKey(apiName)) {
                        dependentPicklistValues.put(apiName, new DependentPicklistWrapper(new LabelValueWrapper(controllerValue.getLabel(), apiName)));
                    }
                    dependentPicklistValues.get(apiName).addPicklistEntry(new LabelValueWrapper(entry.getLabel(), entry.getValue()));
                }
            }
        }
        return dependentPicklistValues;
    }

    public class LabelValueWrapper {
        @AuraEnabled
        public String label { get; set; }
        @AuraEnabled
        public String value { get; set; }

        public LabelValueWrapper(String label, String value) {
            this.label = label;
            this.value = value;
        }
    }

    public class DependentPicklistWrapper {
        @AuraEnabled
        public List<LabelValueWrapper> dependentPicklist;
        @AuraEnabled
        public LabelValueWrapper entry;

        public DependentPicklistWrapper(LabelValueWrapper entry) {
            this.dependentPicklist = new List<LabelValueWrapper>();
            this.entry = entry;
        }

        public void addPicklistEntry(LabelValueWrapper picklistEntry) {
            this.dependentPicklist.add(picklistEntry);
        }
    }
}
1) React Toast
for toast notififcation

2) React Spring (it is a cool lib) - https://react-spring.dev/
for animation --- npm i @react-spring/web

3) react-transition-group
for tailwind transition 

4) clsx + tailwindmerge = cn
for conditional class
  ------------------------------
  import clsx, { ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";

export function cn(...classes: ClassValue[]) {
  return twMerge(clsx(...classes));
}
===================================

5) cva 
class-variant-authority

6) shadcn
component library

7) floating-ui - https://floating-ui.com/
for floating tooltip. I think it was previously called popper.js
npm install @floating-ui/react

8) DOMPurify - npm i dompurify
Dompurify is a JavaScript library that provides a fast and secure way to purify HTML content.
It is specially designed to prevent Cross-Site Scripting (XSS) attacks by eliminating any potentially harmful scripts from user input.
Dompurify accomplishes this by parsing the HTML and DOM elements, filtering out unsafe tags and attributes, and ensuring that only safe content is concluded on the web page.

9) TipTap - https://tiptap.dev/docs - look for Editor 
npm install @tiptap/react @tiptap/pm @tiptap/starter-kit
Tiptap lets you create a fully customizable rich text editor using modular building blocks. It offers a range of open-source and Pro extensions, allowing you to configure every part of the editor with a few lines of code. The API lets you customize and extend editor functionality.

10) React Hook Form - https://www.react-hook-form.com/
npm install react-hook-form

11) react-responsive - npm i react-responsive
for useMediaQuery

12) millionjs millionlint

13) open editor - https://github.com/zjxxxxxxxxx/open-editor
npm i @open-editor/vite -D

14) React Scan - https://react-scan.com/monitoring
npm i react-scan

15) usehooks-ts - usehooks-ts.com
npm I usehooks-ts

16) https://react-select.com/home#getting-started
npm i --save react-select

17) @open-editor/vite - https://npm.io/package/@open-editor/vite
for locating the code in vscode via browser

18) https://headlessui.com/
for accordians and popovers
function app() {
    const message = "Hello from App!";
    
    // Function that will use `this` correctly
    function showMessage() {
        console.log(this.message);
    }
    
    const button = document.querySelector("button");
    
    // Bind `this` inside the event listener to the `app` function
    button.addEventListener("click", showMessage.bind({ message }));
}

// Initialize the app
app();
 const overlayDivStyles = {
                    backgroundColor: "red",
                    width: "100%",
                    height: "100%",
                    display: "flex",
                    justifyContent: "center",
                    position: "absolute",
                    zIndex: 2,
                };

  const domOverlay = document.createElement("div");
  domOverlay.classList.add("map-overlay");
  domOverlay.innerHTML = `<h4>No locations exist with these current filters<h3>`;
  //assign my styles to the overlay Div
  Object.assign(domOverlay.style, overlayDivStyles);
System.debug('Teste');
function getComponentConnections(componentName=''){
    if(!componentName){return};
    var currentPage=window.cells.PageManager.TemplateManager.selected;
    const component=[...window.cells.TemplateManager.templates[currentPage].childNodes].find((e)=>e.localName===componentName);
    window.$00=component;
    const componentConnections=component.cellsConnections;
    console.log('mine ',component,' connections:',componentConnections)
}
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

star

Tue Feb 11 2025 05:29:40 GMT+0000 (Coordinated Universal Time)

@erika

star

Tue Feb 11 2025 05:26:37 GMT+0000 (Coordinated Universal Time)

@Rohan@99

star

Tue Feb 11 2025 05:19:35 GMT+0000 (Coordinated Universal Time)

@Rohan@99

star

Tue Feb 11 2025 04:11:51 GMT+0000 (Coordinated Universal Time)

@davidmchale #grouping #reduce #groupby()

star

Tue Feb 11 2025 03:36:13 GMT+0000 (Coordinated Universal Time)

@davidmchale #grouping #reduce

star

Tue Feb 11 2025 01:08:40 GMT+0000 (Coordinated Universal Time)

@emma1314

star

Tue Feb 11 2025 01:08:07 GMT+0000 (Coordinated Universal Time)

@emma1314

star

Mon Feb 10 2025 23:09:34 GMT+0000 (Coordinated Universal Time)

@FOHWellington

star

Mon Feb 10 2025 16:37:31 GMT+0000 (Coordinated Universal Time) https://www.mongodb.com/try/download/community

@TuckSmith541

star

Mon Feb 10 2025 14:17:12 GMT+0000 (Coordinated Universal Time)

@erika

star

Mon Feb 10 2025 13:48:57 GMT+0000 (Coordinated Universal Time)

@erika

star

Mon Feb 10 2025 13:44:58 GMT+0000 (Coordinated Universal Time)

@erika

star

Mon Feb 10 2025 13:25:39 GMT+0000 (Coordinated Universal Time) https://code.yandex-team.ru/a8e372db-beb5-4959-b040-fe59c8fe6a79

@mark522

star

Mon Feb 10 2025 13:05:55 GMT+0000 (Coordinated Universal Time)

@macie3k #apex #salesforce

star

Mon Feb 10 2025 12:56:24 GMT+0000 (Coordinated Universal Time)

@StephenThevar #react.js

star

Mon Feb 10 2025 11:34:49 GMT+0000 (Coordinated Universal Time) undefined

@alexrw

star

Mon Feb 10 2025 11:34:33 GMT+0000 (Coordinated Universal Time)

@alexrw

star

Mon Feb 10 2025 10:22:21 GMT+0000 (Coordinated Universal Time) https://beleaftechnologies.com/centralized-cryptocurrency-exchange-development

@kavyamagi

star

Mon Feb 10 2025 02:49:32 GMT+0000 (Coordinated Universal Time)

@davidmchale

star

Sun Feb 09 2025 23:30:48 GMT+0000 (Coordinated Universal Time)

@davidmchale #styles #div #object

star

Sun Feb 09 2025 22:50:55 GMT+0000 (Coordinated Universal Time)

@yanBraga

star

Sun Feb 09 2025 21:08:38 GMT+0000 (Coordinated Universal Time)

@jjesal

star

Sun Feb 09 2025 10:36:24 GMT+0000 (Coordinated Universal Time)

@erika

Save snippets that work with our extensions

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