Snippets Collections
function sortEvents(events) {
  //   return Object.keys(events)
  //     .sort()
  //     .reduce((sortedEvents, key) => {
  //       sortedEvents[key] = events[key];
  //       return sortedEvents;
  //     }, {});

  const sortedEvents = {};
  Object.keys(events)
    .sort()
    .forEach((key) => {
      sortedEvents[key] = events[key];
    });
  return sortedEvents;
}
function add_prefix_to_prices($price) {
    // قم بتحديد الكلمة أو التاج الذي تريد إضافته
    $prefix = '<div class=div_p>ajax</div>';

    // قم بإرجاع السعر مع الكلمة أو التاج
    return $prefix . $price;
}

add_filter('woocommerce_get_price_html', 'add_prefix_to_prices');
add_filter('woocommerce_cart_item_price', 'add_prefix_to_prices');
add_filter('woocommerce_cart_item_subtotal', 'add_prefix_to_prices');
@media (min-width:768px) and (max-width:920px) {
    nav ul {
        gap: 50px;
        margin-left: 0px;
    }

    .iknow {
        position: relative;
        right: 0px;
        align-items: center;
        /* top: 20px; */
        margin-top: 20%;
    }
    #aditya img{
        width: 11%;
    }
    .connect{
        top: 24%;
    }
    .banner h2{
        font-size: 16px;
        top: 16%;
    }   
    .banner {
        height: 113px;
    }
    #bannerimgrec{
        height: 115px;
    }
}
  @import url('https://fonts.googleapis.com/css2?family=Aclonica&display=swap');
  @import url('https://fonts.googleapis.com/css2?family=Aoboshi+One&display=swap');
  @import url('https://fonts.googleapis.com/css2?family=Amaranth&display=swap');
  @import url('https://fonts.googleapis.com/css2?family=Amaranth&family=Bubblegum+Sans&display=swap');
  @import url('https://fonts.googleapis.com/css2?family=Aldrich&display=swap');
  @import url('https://fonts.googleapis.com/css2?family=Andika&display=swap');
  @import url('https://fonts.googleapis.com/css2?family=Atma:wght@600&display=swap');
  @import url('https://fonts.googleapis.com/css2?family=Black+Ops+One&family=Ubuntu&display=swap');
  @import url('https://fonts.googleapis.com/css2?family=Candal&display=swap');
  @import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@700&display=swap');

  body {
      padding: 0;
      margin: 0;
      background: #392467;
      overflow-x: hidden;
      scroll-behavior: smooth;
      /* overflow-y: hidden; */
  }

  nav {
      display: flex;
      align-items: center;
      justify-content: space-between;
  }

  nav ul li a {
      text-decoration: none;
      font-family: 'Aoboshi One', serif;
      color: white;
      font-size: 25px;
  }

  nav ul li {
      list-style: none;
  }

  nav ul {
      gap: 90px;
      display: flex;
      margin-left: 46px;
  }

  .downloadcv a {
      position: absolute;
      right: 32px;
      top: 15px;
      list-style: none;
      text-decoration: none;
      /* font-family: 'Aclonica', sans-serif; */
      font-size: 25PX;
      color: white;
      font-family: 'Aoboshi One', serif;
      transition: all 0.4s ease-in-out;
  }

  .downloadcv a:hover {
      transform: scale(1.09);
      transition: all 0.4s ease-in-out;
  }

  .downloadcv img {
      width: 220px;
      position: relative;
      /* left: 37px; */
      right: 8px;
      top: 2px;
      /* height: 41px;*/
      transition: all 0.5s ease-in-out;
  }

  .banner a img {
      width: 11%;
      position: absolute;
      left: 3%;
      top: 75px;
  }

  .banner h2 {
      position: absolute;
      top: 25px;
      font-family: 'Amaranth', sans-serif;
      color: white;
      font-weight: 300;
      top: 18%;
      left: 18%;
      font-size: 20px;
  }


  .section h4 {
      font-family: 'Aoboshi One', serif;
      font-size: 15px;
      color: white;
      font-weight: 400;
      margin: 0;
  }

  .connect {
      display: flex;
      position: absolute;
      top: 29%;
      right: 2%;
      align-items: center;

  }

  .connectimg {
      display: flex;
      align-items: center;
      position: relative;
      margin-top: 9px;
      gap: 4px;

  }

  .connectimg li a {
      text-decoration: none;
  }

  .connectimg li {
      list-style: none;
      text-decoration: none;
  }

  #link img {
      width: 25px;
  }

  #x img {
      width: 19px;
  }

  .connectimg {
      margin-left: 5px;
  }

  .connectimg img {
      width: 20px;
  }

  .heading h1 {

      color: white;
      font-size: 70px;
      margin: 0;
      font-weight: 400;
      letter-spacing: 3px;
      /* font-family: 'Aclonica', sans-serif; */
      font-family: 'Aoboshi One', serif;
      text-shadow: 0px 8px 40px rgba(255, 255, 255, 0.316);
  }

  .heading h2 {
      font-size: 50px;
      margin: 0;
      letter-spacing: 3px;
      font-weight: 400;
      font-family: 'Aclonica', sans-serif;
      font-family: 'Aoboshi One', serif;
      color: white;
      text-shadow: 0px 8px 40px rgba(255, 255, 255, 0.316);

  }

  .heading {
      position: relative;
      top: 80px;
      left: 15%;
  }

  .iknow {
      position: absolute;
      right: 90px;
      align-items: center;
  }

  .iknow h1 {
      font-family: 'Bubblegum Sans', sans-serif;
      color: white;
      font-weight: 300;
  }

  .know {
      display: flex;
      justify-content: center
  }

  .img {
      display: flex;
      justify-content: center;
  }

  .img img {
      width: 60px;
  }

  .overlay {
      display: flex;
      justify-content: center;
      align-items: center;
      position: relative;
      top: 10rem;
      /* left: 11rem;
      right: 11rem; */
      /*width: 1000px;
      border-radius: 30px;
      height: 350px;
      background-color: #5D3587;
      margin-bottom: 30px; */
  }

  .inerabout {
      position: relative;
      left: 0%;
      top: -352px;
  }

  .inercontent {
      position: relative;
      top: -43vh;
  }

  .ul {
      line-height: 3;
      font-size: 1.3rem;
  }

  .about {
      display: flex;
      justify-content: center;
      align-items: center;
      text-align: center;
      margin: 0;

  }

  .about h1 {
      color: #FFF;
      margin: 0;
      margin-top: 20px;
      margin-bottom: 10px;
      font-family: 'Aclonica', sans-serif;
      font-size: 2.5rem;
      text-shadow: 0px 8px 40px rgba(0, 0, 0, 0.25);
      font-style: normal;
      font-weight: 400;
      line-height: normal;
  }

  .aboutcontent h1 {
      color: #D2D2D2;
      margin: 0;
      text-align: center;
      text-shadow: 0px 8px 40px rgba(0, 0, 0, 0.25);
      font-family: 'Aldrich', sans-serif;
      font-size: 1.8rem;
      font-style: normal;
      font-weight: 400;
      line-height: normal;
  }

  .aboutcontent p {
      font-family: 'Andika', sans-serif;
      color: #fff;
  }

  .aboutcontent ul li {
      font-family: 'Andika', sans-serif;
      color: #fff
  }

  .marquee {
      position: relative;
      top: 213px;
  }

  .marquee h1 {
      font-family: 'Ubuntu', sans-serif;
      font-size: 5rem;
      margin-bottom: px;
      color: #ffffff08;
  }

  .projects img {
      width: 28%;
  }

  .projects h1 {
      display: flex;
      justify-content: center;
      align-items: center;
      position: relative;
      top: -14vh;
      font-size: 3rem;
      color: white;
      font-family: 'Aclonica', sans-serif;
      text-shadow: 0px 8px 40px rgb(0, 0, 0);
  }

  .probg {
      display: flex;
      justify-content: center;
      align-items: center;
  }

  .project-flexo {
      display: flex;
      justify-content: center;
      align-items: center;
      /* right: -4%;
    position: relative; */
  }

  .ultable {
      display: flex;
      justify-content: center;
      align-items: center;
      text-align: justify;
  }

  /* .rectangle-shape{
    display: flex;
    justify-content: center;
    align-items: center;
  } */
  .bg-rec {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 10px;
      margin-left: 10px;
      margin-right: 10px;
      margin-bottom: 10px;
      margin-top: -69px;

  }

  .bg-rec li {
      list-style: none;
  }

  .bg-rec img {
      width: 100%;
      display: flex;
      border-top-right-radius: 10px;
      border-top-left-radius: 10px;
      transition: all 0.3s ease-in-out;
  }


  .text-rec {
      position: relative;
      top: -20px;
      /* color: white; */
      width: 100%;
      height: 15vh;
      background: #fff;
      border-bottom-right-radius: 10px;
      border-bottom-left-radius: 10px;
      transition: all 0.3s ease-in-out;
  }

  .text-rec:hover {
      box-shadow: 0px 8px 40px rgba(177, 177, 177, 0.397);
  }

  .text-rec h1 {
      font-family: 'Candal', sans-serif;
      color: #000;
      margin: 0;
      font-size: 20px;
      font-weight: 400;
      padding-left: 10px;

  }

  .text-rec p {
      font-family: 'Amarnath', sans-serif;
      font-size: 15px;
      font-weight: 400;
      color: #4f4f52;
      padding-left: 10px;
  }

  .text-rec a {
      text-decoration: none;
  }

  .marquee-projects {
      font-family: 'Ubuntu', sans-serif;
      font-size: 5rem;
      margin-bottom: 0px;
      color: #ffffff08;

  }

  .contactbg {
      display: flex;
      justify-content: center;
      align-items: center;
  }

  .contacthead-flexo {
      color: #D2D2D2;
      display: flex;
      justify-content: center;
      align-items: center;
      position: relative;
      top: -450px;
  }

  #c-us {
      font-size: 1.9rem;
      font-family: 'Ubuntu', sans-serif;
  }

  .p1 {
      font-size: 1.5rem;
      font-family: 'Ubuntu', sans-serif;
  }

  #bannerimgrec {
      width: 100%;
      height: 166px;
  }

  .p2,
  .p3,
  .p4 {
      font-size: 14.5px;
      font-family: 'Ubuntu', sans-serif;
      font-weight: 400;
  }

  .p3 a {
      color: #6b88ff;
  }

  footer {
      width: 100%;
      height: 8vh;
      background: #A367B1;
  }

  footer p {
      font-family: 'Ubuntu', sans-serif;
      font-weight: 600;


  }

  .copyrights {
      display: flex;
      justify-content: center;
      align-items: center;
      text-align: center;
      margin-top: -53px;
  }
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Aditya Mishra Portfolio</title>
    <link rel="stylesheet" href="index.css">
    <link rel="shortcut icon" href="png/AdityaColoRimg 1.png">
    <link rel="stylesheet" href="media.css">
    <script src="https://kit.fontawesome.com/yourcode.js" crossorigin="anonymous"></script>
</head>

<body>
    <div id="home">
        <header>
            <nav>
                <!-- <input type="checkbox" id="check">
                <label for="check">
                    <i class="fa fa-bars"></i>
                </label> -->
                <ul class="navbar">
                    <li>
                        <a href="#home" target="_blank">Home</a>
                    </li>
                    <li>
                        <a href="#work" target="_blank">Work</a>
                    </li>
                    <li>
                        <a href="#about" target="_blank">About</a>
                    </li>
                    <li>
                        <a href="#contact" target="_blank">Contact Us</a>
                    </li>
                </ul>
                <div class="downloadcv">
                    <img src="png/Rectangle 6.png" alt="">
                    <a href="https://drive.google.com/file/d/1SkGOJ3pkXJMJo15rz8pp0PyT_a-I2G8Z/view?usp=sharing"
                        target="_blank" download="mypdffile">Download CV</a>
                </div>
            </nav>
        </header>
        <section class="section">


            <div class="banner">
                <img src="png/Rectangle 8 (1).png" alt="" id="bannerimgrec">
                <a href="#" id="aditya"><img src="png/AdityaColoRimg 1.png" alt="">
                    <style>
                        #aditya img {
                            width: 10%;
                        }
                    </style>
                </a>
                <div class="text">
                    <h2>Hi, I am Aditya Mishra A passionate front-end <br> Dev Based in New Delhi, India.
                    </h2>
                </div>
            </div>
            <div class="connect">
                <div class="connecttext">
                    <h4>Lets Connect :
                    </h4>

                </div>
                <div class="connectimg">
                    <a href="https://www.linkedin.com/in/adityamishra95/" target="_blank" id="link"><img
                            src="portfolio design/LinkedIn-Logos/LI-In-Bug.png" alt=""></a>
                    <a href="https://github.com/adityamishra2023" target="_blank" id="git"><img
                            src="portfolio design/github-mark-white.png" alt=""></a>
                    <a href="https://twitter.com/adityamishra_95" target="_blank" id="x"><img
                            src="portfolio design/logo-white.png" alt=""></a>
                </div>

            </div>
    </div>
    </section>
    <section class="sectiontwo">
        <div class="heading">
            <h2>Front-End</h2>
            <h1>Developer</h1>
        </div>
        <div class="iknow">
            <div class="know">
                <h1>What I Know</h1>
            </div>
            <div class="img">
                <img src="portfolio design/icons8-html-logo-48.png" alt="">
                <img src="portfolio design/icons8-css-logo-48.png" alt="">
                <!-- </div> -->
                <!-- <div class="img"> -->
                <img src="portfolio design/icons8-javascript-48.png" alt="">
                <img src="portfolio design/icons8-bootstrap-logo-48.png" alt="">
            </div>
        </div>

    </section>

    <section class="sectionthree" style="margin-top: 23px;  margin-bottom: -15%;">


        <div class="marquee">
            <marquee behavior="scroll" direction="left">
                <h1>&nbsp;ABOUT ABOUT ABOUT ABOUT ABOUT ABOUT ABOUT ABOUT ABOUT ABOUT ABOUT ABOUT ABOUT ABOUT ABOUT
                    ABOUT ABOUT ABOUT ABOUT ABOUT ABOUT ABOUT ABOUT ABOUT ABOUT ABOUT ABOUT ABOUT ABOUT ABOUT ABOUT
                    ABOUT ABOUT ABOUT ABOUT ABOUT</h1>
            </marquee>
        </div>
        <div id="about">
            <div class="about-container">
                <div class="headoverlay">
                    <div clabass="overlay" style="display: flex;
                justify-content: center;
                position: relative;
                top: 150px;">
                        <img src="png/Rectangle 2.png" alt="">
                    </div>
                </div>
                <div class="inerabout">

                    <div class="overlaycontent">
                        <div class="about">
                            <h1>About</h1>
                        </div>
                        <div class="aboutcontent">
                            <h1>Front-End Developer </h1>
                            <div class="ultable">

                                <ul class="ul">
                                    <p>🛠️ What I bring to the table:</p>
                                    <li>
                                        Expertise in creating robust and responsive interfaces
                                    </li>
                                    <li>Proficiency in modern web development technologies and frameworks</li>
                                    <li>Extensive experience in translating design concepts into seamless,
                                        high-performance
                                        applications
                                    </li>
                                    <li>Commitment to staying on the cutting edge of industry trends</li>
                                    <li>Strong problem-solving skills with a focus on code quality and maintainability
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </section>
    <section>
        <div class="marquee-projects">
            <marquee behavior="scroll" direction="left">
                <h1 class="marquee-h1">&nbsp;PROJECT PROJECT PROJECT PROJECT PROJECT PROJECT PROJECT PROJECT</h1>
            </marquee>
            <div id="work">
                <div class="projects">
                    <div class="probg">
                        <img src="png/Rectangle 6.png" alt="">
                    </div>
                    <h1>Projects</h1>
                </div>
                <div class="rectangle-shape">
                    <div class="bg-rec">
                        <li id="red-box"><a href="https://netflix-project-11-2023.netlify.app/" target="_blank"><img
                                    src="portfolio design/netflixclone.png" alt="Netflix Project"></a>
                            <div class="text-rec">
                                <a href="https://netflix-project-11-2023.netlify.app/" target="_blank">
                                    <h1>Netflix Clone</h1>
                                </a>
                                <p>HTML, CSS</p>
                            </div>
                        </li>
                        <li id="pink-box"><a href="https://myntraclonework.netlify.app/" target="_blank"><img
                                    src="portfolio design/myntra.png" alt=""></a>
                            <div class="text-rec">
                                <a href="https://myntraclonework.netlify.app/" target="_blank">
                                    <h1>Myntra Clone</h1>
                                </a>
                                <p>HTML, CSS</p>
                            </div>
                        </li>
                        <li id="green-box"><img src="portfolio design/spotifyclone.png" alt="Spotify Clone">
                            <div class="text-rec">
                                <h1>Spotify Clone</h1>
                                </a>
                                <p>HTML, CSS</p>
                            </div>
                        </li>
                    </div>
                </div>
            </div>
    </section>
    <section>
        <div class="contact-container">
            <div class="marquee-projects">
                <marquee behavior="scroll" direction="left">
                    <h1 class="marquee-h1">&nbsp;LETS CONNECT LETS CONNECT LETS CONNECT LETS CONNECT LETS CONNECT LETS
                        CONNECT LETS CONNECT LETS CONNECT LETS CONNECT LETS CONNECT LETS CONNECT LETS CONNECT LETS
                        CONNECT LETS CONNECT LETS CONNECT LETS CONNECT </h1>
                </marquee>
            </div>
            <div id="contact">
                <div class="contactbg">
                    <img src="png/Rectangle 2.png" alt="">
                </div>
                <div class="contacthead-flexo">
                    <div class="contacthead">
                        <h1 id="c-us">Contact Us</h1>
                        <p class="p1"> 🚀 Cheers to creating engaging and memorable online <br> experiences!</p>
                        <p class="p2"> Let's connect! I'm always open to discussing exciting opportunities</p>
                        <p class="p3">📧 Email: <a
                                href="mailto:adityamishra80012@gmail.com">adityamishra80012@gmail.com</a>
                        </p>
                        <p class="p4">📍 Location: New Delhi, India </p>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <footer>
        <div class="copyrights">
            <p>Copyright © 2023. All rights are reserved</p>
        </div>
    </footer>
</body>

</html>
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
{
  ...
  "content_scripts": [
    {
      "matches": ["https://*.example.com/*"],
      "include_globs": ["*example.com/???s/*"],
      "js": ["content-script.js"]
    }
  ],
  ...
}
:root {
    --theme--page_preview-padding: 0;
}
.notion-table-view{
    padding-left:0;
    padding-right:0;
}
.fullWidth .notion-frame .notion-scroller.vertical .notion-page-content>.notion-collection_view-block .notion-scroller div.notion-table-view, .fullWidth .notion-frame .notion-scroller.vertical .notion-page-content>.notion-collection_view-block>div[style*="padding-left"],
.fullWidth .notion-frame .notion-scroller.vertical .notion-page-content>.notion-collection_view-block .notion-scroller div.notion-gallery-view{
  padding-left:0!important;
  padding-right:0!important;
}
.enhancer--tweak-normalise_table_scroll .notion-collection-view-body .notion-table-view {
  width: 100% !important;
  padding-left: 0!important;
  padding-right: 0!important;
}
.layout.layout-wide{
  --margin-width: 30px!important;
}
.fullWidth .notion-frame .notion-scroller.vertical .notion-page-content>.notion-collection_view-block div[style*=left][style*="position: sticky"]{
  left: 0px !important;
}
sudo docker container inspect  --format='{{.LogPath}}' <container-name>
sudo truncate -s 0 <path_to_log_file>
var print = Logger.log;

var webEngageLicense = '~2024b5d8';
var usersUrl = "https://api.webengage.com/v1/accounts/" + webEngageLicense + "/bulk-users";
var eventsUrl = "https://api.webengage.com/v1/accounts/" + webEngageLicense + "/bulk-events";

var headers = {
  "Authorization": "Bearer 426a654c-89b6-4595-af9c-fd3712af56f9",
  "Content-Type": "application/json"
}

/////////////////////////////////// MENU BUTTONS ///////////////////////////////////

// function onOpen() {
//   var ui = SpreadsheetApp.getUi();
//   var add_modules = ui.createMenu("USERS_DATA");
//   add_modules.addItem('TEST', 'users_to_WE_TEST').addToUi();
//   add_modules.addItem('UPSC FORM RESP', 'users_to_WE_UPSC_FORM_RESP').addToUi();
// }

/////////////////////////////////// MAP KEYS ///////////////////////////////////

function map_keys(sheetName) {
  var mapper_keys = {}
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var ActiveSheet = ss.getSheetByName(sheetName);
  var lastColumn = ActiveSheet.getLastColumn()
  var headers = ActiveSheet.getRange(1, 1, 1, lastColumn).getValues()[0]
  for (var k = 0; k < lastColumn; k++) {
    mapper_keys[headers[k]] = k
  }
  return (mapper_keys)
}

/////////////////////////////////// CALL API ///////////////////////////////////

function callApi(targetURL, method, payload, headers) {
  var options = {
    'method': method,
    'payload': payload,
    'headers': headers
  }
  try {
    var response = UrlFetchApp.fetch(targetURL, options);
  } catch (e) {
    // print(e)
    return [e, 0]
  }
  var respText = JSON.parse(response.getContentText());
  var respStatus = response.getResponseCode();
  return [respText, respStatus]
}

///////////////////////////////////////////// GENERATE USER ID /////////////////////////////////////////////

function generateUserId(row, prefix, startCounter) {
  // var prefix = "fmp_gf_";
  // var startCounter = 198230;
  var zeros = "000000";

  var idNumber = (startCounter + row - 1).toString()
  var uniqueUserId = prefix + (zeros + idNumber).slice(-7);

  return uniqueUserId;
}

//////////////////////////////////////// USER FETCHING FROM RESPONSE SHEETs ////////////////////////////////////////

function fetch_users_from_sheet(sheetName) {
  var sheetConfigurations = {
    "UPSC_FORM_1": {
      url: "https://docs.google.com/spreadsheets/d/1a0AglRKvK8aqee1wWZnpkQDGQXLtMa9Gy3g7EgjgzSI/edit?resourcekey#gid=1768755200",
      shName: "Form Responses 1",
      startRow: 1,
      destinationSheetName: "Users_to_WE UPSC_FORM_1",
      emailIdx: 1,
      phoneIdx: 3,
      nameIdx: 6,
      prefix: "fmp_upsc1_",
      startCounter: 000000,
    },
    "UPSC_FORM_2": {
      url: "https://docs.google.com/spreadsheets/d/1a0AglRKvK8aqee1wWZnpkQDGQXLtMa9Gy3g7EgjgzSI/edit?resourcekey#gid=1244699291",
      shName: "google_form_leads",
      startRow: 1,
      destinationSheetName: "Users_to_WE UPSC_FORM_2",
      emailIdx: 1,
      phoneIdx: 2,
      nameIdx: 0,
      prefix: "fmp_upsc2_",
      startCounter: 000000,
    },
    "JUDI_FORM": {
      url: "https://docs.google.com/spreadsheets/d/1DZ9hwfJiW5-6JckwicpaVeGotgLEYm6RVScs2GhnXIk/edit#gid=0",
      shName: "Sheet1",
      startRow: 1,
      destinationSheetName: "Users_to_WE JUDI_FORM",
      emailIdx: 1,
      phoneIdx: 2,
      nameIdx: 0,
      prefix: "fmp_jud1_",
      startCounter: 000000,
    },
  };

  var sheetConfig = sheetConfigurations[sheetName];

  var sourceSheet = SpreadsheetApp.openByUrl(sheetConfig.url).getSheetByName(sheetConfig.shName);
  var lastRow = sourceSheet.getLastRow();
  var numRows = lastRow - sheetConfig.startRow + 1;
  var sourceData = sourceSheet.getRange(sheetConfig.startRow, 1, numRows, sourceSheet.getLastColumn()).getValues();

  var destinationSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(sheetConfig.destinationSheetName);
  var destinationData = destinationSheet.getDataRange().getValues();

  if (destinationData.length < sourceData.length) {
    var newRows = sourceData.slice(destinationData.length);
    for (var i = 0; i < newRows.length; i++) {
      var row = destinationData.length + i + 1;
      var email = String(newRows[i][sheetConfig.emailIdx]);
      var phone = String(newRows[i][sheetConfig.phoneIdx]);
      phone = (phone.length === 10) ? "91" + phone : phone;
      var name = String(newRows[i][sheetConfig.nameIdx]);

      if (email != "#ERROR!" && phone != "#ERROR!" && name != "#ERROR!" && phone.length == 12) {
        var uniqueUserId = generateUserId(row, sheetConfig.prefix, sheetConfig.startCounter);
        destinationSheet.getRange(row, 1).setValue(uniqueUserId);
        destinationSheet.getRange(row, 2).setValue(email);
        destinationSheet.getRange(row, 3).setValue(phone);
        destinationSheet.getRange(row, 4).setValue(name);
        destinationSheet.getRange(row, 5).setValue("TRUE");
      }
    }
  }
}

///////////////////////////////////////// USERS API - UPSC_FORM_1 /////////////////////////////////////////

function users_to_WE_UPSC1() {
  var mapper_keys = map_keys('Users_to_WE UPSC_FORM_1')
  SpreadsheetApp.flush()

  fetch_users_from_sheet("UPSC_FORM_1");

  var webEngageSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Users_to_WE UPSC_FORM_1');

  var StartRow = 2;
  var RowRange = webEngageSheet.getLastRow() - StartRow + 1;
  var WholeRange = webEngageSheet.getRange(StartRow, 1, RowRange, 6);
  var AllValues = WholeRange.getDisplayValues();

  var userList = [];
  var batchSize = 25;

  var userIndexList = [];
  var errorUserList = [];

  for (var idx in AllValues) {
    var currentRow = AllValues[idx];
    var status = currentRow[mapper_keys['status']];

    if (status !== "Success" && status !== "Error" && status !== "User Integrated") {
      var user_id = String(currentRow[mapper_keys['user_id']]);
      var email = String(currentRow[mapper_keys['email']]);
      var mobile = String(currentRow[mapper_keys['phone']]);
      var name = String(currentRow[mapper_keys['first_name']]);

      if (email != "#ERROR!" && mobile != "#ERROR!" && name != "#ERROR!" && mobile.length == 12) {
        var user = {
          'userId': user_id,
          'email': email,
          'firstName': name,
          'phone': mobile,
          'whatsappOptIn': true,
        };
        userList.push(user);
        userIndexList.push(idx);

        if (userList.length === batchSize) {
          var payload = { "users": userList }
          payload = JSON.stringify(payload);

          var [uploadResponse, respStatus] = callApi(usersUrl, "post", payload, headers);

          if (respStatus != 201) {
            print(payload);
            print(respStatus);
            errorUserList = errorUserList.concat(...userIndexList);
          }

          var userList = [];
          var userIndexList = [];
        }
        if (idx % 50 === 0) {
          print("Delay Added: 5 Sec");
          Utilities.sleep(5000);
        }
        webEngageSheet.getRange(parseInt(idx) + StartRow, mapper_keys['status'] + 1).setValue('User Integrated');
      }
      else {
        webEngageSheet.getRange(parseInt(idx) + StartRow, mapper_keys['status'] + 1).setValue('Error');
      }
    }
  }
  if (userList.length > 0) {
    var payload = { "users": userList }
    payload = JSON.stringify(payload);

    var [uploadResponse, respStatus] = callApi(usersUrl, "post", payload, headers);

    if (respStatus != 201) {
      print(payload);
      print(respStatus);
      errorUserList = errorUserList.concat(...userIndexList);
    }
  }

  if (errorUserList.length > 0) {
    print(errorUserList);
    for (var e in errorUserList) {
      webEngageSheet.getRange(parseInt(errorUserList[e]) + StartRow, mapper_keys['status'] + 1).setValue('Failed User Api');
    }
  }

  print("Done User Integration - UPSC_FORM_1");
}

////////////////////////////////////////////////// EVENTS API - UPSC_FORM_1 //////////////////////////////////////////////////

function users_to_events_UPSC1() {
  var mapper_keys = map_keys('Users_to_WE UPSC_FORM_1')
  SpreadsheetApp.flush()

  var webEngageSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Users_to_WE UPSC_FORM_1');

  var StartRow = 2;
  var RowRange = webEngageSheet.getLastRow() - StartRow + 1;
  var WholeRange = webEngageSheet.getRange(StartRow, 1, RowRange, 6);
  var AllValues = WholeRange.getDisplayValues();

  var eventName = "UPSC_FA";

  var eventUserList = [];
  var batchSize = 25;

  var userIndexList = [];
  var errorUserList = [];

  for (var idx in AllValues) {
    var currentRow = AllValues[idx];
    var status = currentRow[mapper_keys['status']];

    if (status === "User Integrated") {
      var user_id = String(currentRow[mapper_keys['user_id']]);
      if (user_id) {
        var eventUser = {
          "userId": user_id,
          "eventName": eventName
        };
        eventUserList.push(eventUser);
        userIndexList.push(idx);

        if (eventUserList.length === batchSize) {
          var payload = { "events": eventUserList }
          payload = JSON.stringify(payload);

          var [uploadResponse, respStatus] = callApi(eventsUrl, "post", payload, headers);

          if (respStatus != 201) {
            print(payload);
            print(respStatus);
            errorUserList = errorUserList.concat(...userIndexList);
          }

          var eventUserList = [];
          var userIndexList = [];
        }
        if (idx % 50 === 0) {
          print("Delay Added: 5 Sec");
          Utilities.sleep(5000);
        }
        webEngageSheet.getRange(parseInt(idx) + StartRow, mapper_keys['status'] + 1).setValue('Success');
      }
      else {
        webEngageSheet.getRange(parseInt(idx) + StartRow, mapper_keys['status'] + 1).setValue('Error');
      }
    }
  }
  if (eventUserList.length > 0) {
    var payload = { "events": eventUserList }
    payload = JSON.stringify(payload);

    var [uploadResponse, respStatus] = callApi(eventsUrl, "post", payload, headers);

    if (respStatus != 201) {
      print(payload);
      print(respStatus);
      errorUserList = errorUserList.concat(...userIndexList);
    }
  }

  if (errorUserList.length > 0) {
    print(errorUserList);
    for (var e in errorUserList) {
      webEngageSheet.getRange(parseInt(errorUserList[e]) + StartRow, mapper_keys['status'] + 1).setValue('Failed Event Api');
    }
  }

  print("Done User To Event - UPSC_FORM_1")
}

////////////////////////////////////////////////// USERS API - UPSC_FORM_2 //////////////////////////////////////////////////

function users_to_WE_UPSC2() {
  var mapper_keys = map_keys('Users_to_WE UPSC_FORM_2')
  SpreadsheetApp.flush()

  fetch_users_from_sheet("UPSC_FORM_2");

  var webEngageSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Users_to_WE UPSC_FORM_2');

  var StartRow = 2;
  var RowRange = webEngageSheet.getLastRow() - StartRow + 1;
  var WholeRange = webEngageSheet.getRange(StartRow, 1, RowRange, 6);
  var AllValues = WholeRange.getDisplayValues();

  var userList = [];
  var batchSize = 25;

  var userIndexList = [];
  var errorUserList = [];

  for (var idx in AllValues) {
    var currentRow = AllValues[idx];
    var status = currentRow[mapper_keys['status']];

    if (status !== "Success" && status !== "Error" && status !== "User Integrated") {
      var user_id = String(currentRow[mapper_keys['user_id']]);
      var email = String(currentRow[mapper_keys['email']]);
      var mobile = String(currentRow[mapper_keys['phone']]);
      var name = String(currentRow[mapper_keys['first_name']]);

      if (email != "#ERROR!" && mobile != "#ERROR!" && name != "#ERROR!" && mobile.length == 12) {
        var user = {
          'userId': user_id,
          'email': email,
          'firstName': name,
          'phone': mobile,
          'whatsappOptIn': true,
        };
        userList.push(user);
        userIndexList.push(idx);

        if (userList.length === batchSize) {
          var payload = { "users": userList }
          payload = JSON.stringify(payload);

          var [uploadResponse, respStatus] = callApi(usersUrl, "post", payload, headers);

          if (respStatus != 201) {
            print(payload);
            print(respStatus);
            errorUserList = errorUserList.concat(...userIndexList);
          }

          var userList = [];
          var userIndexList = [];
        }
        if (idx % 50 === 0) {
          print("Delay Added: 5 Sec");
          Utilities.sleep(5000);
        }
        webEngageSheet.getRange(parseInt(idx) + StartRow, mapper_keys['status'] + 1).setValue('User Integrated');
      }
      else {
        webEngageSheet.getRange(parseInt(idx) + StartRow, mapper_keys['status'] + 1).setValue('Error');
      }
    }
  }
  if (userList.length > 0) {
    var payload = { "users": userList }
    payload = JSON.stringify(payload);

    var [uploadResponse, respStatus] = callApi(usersUrl, "post", payload, headers);

    if (respStatus != 201) {
      print(payload);
      print(respStatus);
      errorUserList = errorUserList.concat(...userIndexList);
    }
  }

  if (errorUserList.length > 0) {
    print(errorUserList);
    for (var e in errorUserList) {
      webEngageSheet.getRange(parseInt(errorUserList[e]) + StartRow, mapper_keys['status'] + 1).setValue('Failed User Api');
    }
  }

  print("Done User Integration - UPSC_FORM_2");
}

////////////////////////////////////////////////// EVENTS API - UPSC_FORM_2 //////////////////////////////////////////////////

function users_to_events_UPSC2() {
  var mapper_keys = map_keys('Users_to_WE UPSC_FORM_2')
  SpreadsheetApp.flush()

  var webEngageSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Users_to_WE UPSC_FORM_2');

  var StartRow = 2;
  var RowRange = webEngageSheet.getLastRow() - StartRow + 1;
  var WholeRange = webEngageSheet.getRange(StartRow, 1, RowRange, 6);
  var AllValues = WholeRange.getDisplayValues();

  var eventName = "UPSC_FA";

  var eventUserList = [];
  var batchSize = 25;

  var userIndexList = [];
  var errorUserList = [];

  for (var idx in AllValues) {
    var currentRow = AllValues[idx];
    var status = currentRow[mapper_keys['status']];

    if (status === "User Integrated") {
      var user_id = String(currentRow[mapper_keys['user_id']]);
      if (user_id) {
        var eventUser = {
          "userId": user_id,
          "eventName": eventName
        };
        eventUserList.push(eventUser);
        userIndexList.push(idx);

        if (eventUserList.length === batchSize) {
          var payload = { "events": eventUserList }
          payload = JSON.stringify(payload);

          var [uploadResponse, respStatus] = callApi(eventsUrl, "post", payload, headers);

          if (respStatus != 201) {
            print(payload);
            print(respStatus);
            errorUserList = errorUserList.concat(...userIndexList);
          }

          var eventUserList = [];
          var userIndexList = [];
        }
        if (idx % 50 === 0) {
          print("Delay Added: 5 Sec");
          Utilities.sleep(5000);
        }
        webEngageSheet.getRange(parseInt(idx) + StartRow, mapper_keys['status'] + 1).setValue('Success');
      }
      else {
        webEngageSheet.getRange(parseInt(idx) + StartRow, mapper_keys['status'] + 1).setValue('Error');
      }
    }
  }
  if (eventUserList.length > 0) {
    var payload = { "events": eventUserList }
    payload = JSON.stringify(payload);

    var [uploadResponse, respStatus] = callApi(eventsUrl, "post", payload, headers);

    if (respStatus != 201) {
      print(payload);
      print(respStatus);
      errorUserList = errorUserList.concat(...userIndexList);
    }
  }

  if (errorUserList.length > 0) {
    print(errorUserList);
    for (var e in errorUserList) {
      webEngageSheet.getRange(parseInt(errorUserList[e]) + StartRow, mapper_keys['status'] + 1).setValue('Failed Event Api');
    }
  }

  print("Done User To Event - UPSC_FORM_2")
}

////////////////////////////////////////////////// USERS API - UPSC_FORM_2 //////////////////////////////////////////////////

function users_to_WE_JUDI() {
  var mapper_keys = map_keys('Users_to_WE JUDI_FORM')
  SpreadsheetApp.flush()

  fetch_users_from_sheet("JUDI_FORM");

  var webEngageSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Users_to_WE JUDI_FORM');

  var StartRow = 2;
  var RowRange = webEngageSheet.getLastRow() - StartRow + 1;
  var WholeRange = webEngageSheet.getRange(StartRow, 1, RowRange, 6);
  var AllValues = WholeRange.getDisplayValues();

  var userList = [];
  var batchSize = 25;

  var userIndexList = [];
  var errorUserList = [];

  for (var idx in AllValues) {
    var currentRow = AllValues[idx];
    var status = currentRow[mapper_keys['status']];

    if (status !== "Success" && status !== "Error" && status !== "User Integrated") {
      var user_id = String(currentRow[mapper_keys['user_id']]);
      var email = String(currentRow[mapper_keys['email']]);
      var mobile = String(currentRow[mapper_keys['phone']]);
      var name = String(currentRow[mapper_keys['first_name']]);

      if (email != "#ERROR!" && mobile != "#ERROR!" && name != "#ERROR!" && mobile.length == 12) {
        var user = {
          'userId': user_id,
          'email': email,
          'firstName': name,
          'phone': mobile,
          'whatsappOptIn': true,
        };
        userList.push(user);
        userIndexList.push(idx);

        if (userList.length === batchSize) {
          var payload = { "users": userList }
          payload = JSON.stringify(payload);

          var [uploadResponse, respStatus] = callApi(usersUrl, "post", payload, headers);

          if (respStatus != 201) {
            print(payload);
            print(respStatus);
            errorUserList = errorUserList.concat(...userIndexList);
          }

          var userList = [];
          var userIndexList = [];
        }
        if (idx % 50 === 0) {
          print("Delay Added: 5 Sec");
          Utilities.sleep(5000);
        }
        webEngageSheet.getRange(parseInt(idx) + StartRow, mapper_keys['status'] + 1).setValue('User Integrated');
      }
      else {
        webEngageSheet.getRange(parseInt(idx) + StartRow, mapper_keys['status'] + 1).setValue('Error');
      }
    }
  }
  if (userList.length > 0) {
    var payload = { "users": userList }
    payload = JSON.stringify(payload);

    var [uploadResponse, respStatus] = callApi(usersUrl, "post", payload, headers);

    if (respStatus != 201) {
      print(payload);
      print(respStatus);
      errorUserList = errorUserList.concat(...userIndexList);
    }
  }

  if (errorUserList.length > 0) {
    print(errorUserList);
    for (var e in errorUserList) {
      webEngageSheet.getRange(parseInt(errorUserList[e]) + StartRow, mapper_keys['status'] + 1).setValue('Failed User Api');
    }
  }

  print("Done User Integration - JUDI_FORM");
}

////////////////////////////////////////////////// EVENTS API - JUDI_FORM //////////////////////////////////////////////////

function users_to_events_JUDI() {
  var mapper_keys = map_keys('Users_to_WE JUDI_FORM')
  SpreadsheetApp.flush()

  var webEngageSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Users_to_WE JUDI_FORM');

  var StartRow = 2;
  var RowRange = webEngageSheet.getLastRow() - StartRow + 1;
  var WholeRange = webEngageSheet.getRange(StartRow, 1, RowRange, 6);
  var AllValues = WholeRange.getDisplayValues();

  var eventName = "JUDI_FA";

  var eventUserList = [];
  var batchSize = 25;

  var userIndexList = [];
  var errorUserList = [];

  for (var idx in AllValues) {
    var currentRow = AllValues[idx];
    var status = currentRow[mapper_keys['status']];

    if (status === "User Integrated") {
      var user_id = String(currentRow[mapper_keys['user_id']]);
      if (user_id) {
        var eventUser = {
          "userId": user_id,
          "eventName": eventName
        };
        eventUserList.push(eventUser);
        userIndexList.push(idx);

        if (eventUserList.length === batchSize) {
          var payload = { "events": eventUserList }
          payload = JSON.stringify(payload);

          var [uploadResponse, respStatus] = callApi(eventsUrl, "post", payload, headers);

          if (respStatus != 201) {
            print(payload);
            print(respStatus);
            errorUserList = errorUserList.concat(...userIndexList);
          }

          var eventUserList = [];
          var userIndexList = [];
        }
        if (idx % 50 === 0) {
          print("Delay Added: 5 Sec");
          Utilities.sleep(5000);
        }
        webEngageSheet.getRange(parseInt(idx) + StartRow, mapper_keys['status'] + 1).setValue('Success');
      }
      else {
        webEngageSheet.getRange(parseInt(idx) + StartRow, mapper_keys['status'] + 1).setValue('Error');
      }
    }
  }
  if (eventUserList.length > 0) {
    var payload = { "events": eventUserList }
    payload = JSON.stringify(payload);

    var [uploadResponse, respStatus] = callApi(eventsUrl, "post", payload, headers);

    if (respStatus != 201) {
      print(payload);
      print(respStatus);
      errorUserList = errorUserList.concat(...userIndexList);
    }
  }

  if (errorUserList.length > 0) {
    print(errorUserList);
    for (var e in errorUserList) {
      webEngageSheet.getRange(parseInt(errorUserList[e]) + StartRow, mapper_keys['status'] + 1).setValue('Failed Event Api');
    }
  }

  print("Done User To Event - JUDI_FORM")
}

/////////////////////////////////////////////////////////////////////////////// TESTING ///////////////////////////////////////////////////////////////////////////////

function fetchUserData_TEST() {
  var sourceSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("ResponseSheet TEST");
  var destinationSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Users_to_WE TEST");

  var sourceData = sourceSheet.getDataRange().getValues();
  var destinationData = destinationSheet.getDataRange().getValues();

  if (destinationData.length < sourceData.length) {
    var newRows = sourceData.slice(destinationData.length);
    for (var i = 0; i < newRows.length; i++) {
      var row = destinationData.length + i + 1;
      var email = String(newRows[i][1]);
      var phone = String(newRows[i][2]);
      phone = (phone.length === 10) ? "91" + phone : phone;
      var name = String(newRows[i][3]);

      if (email != "#ERROR!" && phone != "#ERROR!" && name != "#ERROR!" && phone.length == 12) {
        var prefix = "test_1_"
        var startCounter = 400000
        var uniqueUserId = generateUserId(row, prefix, startCounter);
        destinationSheet.getRange(row, 1).setValue(uniqueUserId);
        destinationSheet.getRange(row, 2).setValue(email);
        destinationSheet.getRange(row, 3).setValue(phone);
        destinationSheet.getRange(row, 4).setValue(name);
        destinationSheet.getRange(row, 5).setValue("TRUE");
      }
    }
  }
  print("Done Test Fetching!");
}

////////////////////////////////////////////////// USERS API - UPSC_FORM_2 //////////////////////////////////////////////////

function users_to_WE_TEST() {
  var mapper_keys = map_keys('Users_to_WE TEST')
  SpreadsheetApp.flush()

  fetchUserData_TEST();

  var webEngageSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Users_to_WE TEST');

  var StartRow = 2;
  var RowRange = webEngageSheet.getLastRow() - StartRow + 1;
  var WholeRange = webEngageSheet.getRange(StartRow, 1, RowRange, 6);
  var AllValues = WholeRange.getDisplayValues();

  var userList = [];
  var batchSize = 25;

  var userIndexList = [];
  var errorUserList = [];

  for (var idx in AllValues) {
    var currentRow = AllValues[idx];
    var status = currentRow[mapper_keys['status']];

    if (status !== "Success" && status !== "Error" && status !== "User Integrated") {
      var user_id = String(currentRow[mapper_keys['user_id']]);
      var email = String(currentRow[mapper_keys['email']]);
      var mobile = String(currentRow[mapper_keys['phone']]);
      var name = String(currentRow[mapper_keys['first_name']]);

      if (email != "#ERROR!" && mobile != "#ERROR!" && name != "#ERROR!" && mobile.length == 12) {
        var user = {
          'userId': user_id,
          'email': email,
          'firstName': name,
          'phone': mobile,
          'whatsappOptIn': true,
        };
        userList.push(user);
        userIndexList.push(idx);

        if (userList.length === batchSize) {
          var payload = { "users": userList }
          payload = JSON.stringify(payload);

          var [uploadResponse, respStatus] = callApi(usersUrl, "post", payload, headers);

          if (respStatus != 201) {
            print(payload);
            print(respStatus);
            errorUserList = errorUserList.concat(...userIndexList);
          }

          var userList = [];
          var userIndexList = [];
        }
        if (idx % 50 === 0) {
          print("Delay Added: 5 Sec");
          Utilities.sleep(5000);
        }
        webEngageSheet.getRange(parseInt(idx) + StartRow, mapper_keys['status'] + 1).setValue('User Integrated');
      }
      else {
        webEngageSheet.getRange(parseInt(idx) + StartRow, mapper_keys['status'] + 1).setValue('Error');
      }
    }
  }
  if (userList.length > 0) {
    var payload = { "users": userList }
    payload = JSON.stringify(payload);

    var [uploadResponse, respStatus] = callApi(usersUrl, "post", payload, headers);

    if (respStatus != 201) {
      print(payload);
      print(respStatus);
      errorUserList = errorUserList.concat(...userIndexList);
    }
  }

  if (errorUserList.length > 0) {
    print(errorUserList);
    for (var e in errorUserList) {
      webEngageSheet.getRange(parseInt(errorUserList[e]) + StartRow, mapper_keys['status'] + 1).setValue('Failed User Api');
    }
  }

  print("Done User Integration - TEST");
}

////////////////////////////////////////////////// EVENTS API - JUDI_FORM //////////////////////////////////////////////////

function users_to_events_TEST() {
  var mapper_keys = map_keys('Users_to_WE TEST')
  SpreadsheetApp.flush()

  var webEngageSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Users_to_WE TEST');

  var StartRow = 2;
  var RowRange = webEngageSheet.getLastRow() - StartRow + 1;
  var WholeRange = webEngageSheet.getRange(StartRow, 1, RowRange, 6);
  var AllValues = WholeRange.getDisplayValues();

  var eventName = "Testing User Event";

  var eventUserList = [];
  var batchSize = 25;

  var userIndexList = [];
  var errorUserList = [];

  for (var idx in AllValues) {
    var currentRow = AllValues[idx];
    var status = currentRow[mapper_keys['status']];

    if (status === "User Integrated") {
      var user_id = String(currentRow[mapper_keys['user_id']]);
      if (user_id) {
        var eventUser = {
          "userId": user_id,
          "eventName": eventName
        };
        eventUserList.push(eventUser);
        userIndexList.push(idx);

        if (eventUserList.length === batchSize) {
          var payload = { "events": eventUserList }
          payload = JSON.stringify(payload);

          var [uploadResponse, respStatus] = callApi(eventsUrl, "post", payload, headers);

          if (respStatus != 201) {
            print(payload);
            print(respStatus);
            errorUserList = errorUserList.concat(...userIndexList);
          }

          var eventUserList = [];
          var userIndexList = [];
        }
        if (idx % 50 === 0) {
          print("Delay Added: 5 Sec");
          Utilities.sleep(5000);
        }
        webEngageSheet.getRange(parseInt(idx) + StartRow, mapper_keys['status'] + 1).setValue('Success');
      }
      else {
        webEngageSheet.getRange(parseInt(idx) + StartRow, mapper_keys['status'] + 1).setValue('Error');
      }
    }
  }
  if (eventUserList.length > 0) {
    var payload = { "events": eventUserList }
    payload = JSON.stringify(payload);

    var [uploadResponse, respStatus] = callApi(eventsUrl, "post", payload, headers);

    if (respStatus != 201) {
      print(payload);
      print(respStatus);
      errorUserList = errorUserList.concat(...userIndexList);
    }
  }

  if (errorUserList.length > 0) {
    print(errorUserList);
    for (var e in errorUserList) {
      webEngageSheet.getRange(parseInt(errorUserList[e]) + StartRow, mapper_keys['status'] + 1).setValue('Failed Event Api');
    }
  }

  print("Done User To Event - TEST")
}
class Solution {
    public int longestConsecutive(int[] nums) {
        if(nums.length==0)
            return 0;
        HashSet<Integer>set=new HashSet<Integer>();
        for(int num:nums)
        {
            set.add(num);
        }
        int ans=1;
        for(int num:nums)
        {
            int count=1;
            if(!set.contains(num-1))
            {
                while(set.contains(num+1))
                {
                    num++;
                    count++;
                }
                ans=Math.max(num,count);
            }
        }
        return ans;
    }
}
import os
from google.cloud import storage
import openai
from openai import OpenAI
import requests
from google.oauth2 import service_account

def upload_to_google_cloud(local_file_path, bucket_name, destination_blob_name, credentials_json):
    # Initialize the Google Cloud client
    storage_client = storage.Client.from_service_account_json(credentials_json)
    bucket = storage_client.bucket(bucket_name)
    blob = bucket.blob(destination_blob_name)

    # Upload the file
    blob.upload_from_filename(local_file_path)

    # The public URL can be used to directly access the uploaded file via HTTP
    return blob.public_url

def upload_folder(folder_path, bucket_name, credentials_json):
    urls = []
    for filename in os.listdir(folder_path):
        if filename.lower().endswith(('.png', '.jpg', '.jpeg')):
            local_file_path = os.path.join(folder_path, filename)
            destination_blob_name = filename
            url = upload_to_google_cloud(local_file_path, bucket_name, destination_blob_name, credentials_json)
            urls.append(url)
    return urls

def save_urls_to_file(urls, file_path):
    with open(file_path, 'w') as file:
        for url in urls:
            file.write(url + '\n')
    print(f"URLs saved to {file_path}")

# Example usage
folder_path = 'C:/Users/Cibe/Downloads/apartments'
credentials_json = 'C:/Users/Cibe/Google-Json/credentials.json'
bucket_name = 'monkempire-test-1'

 #Upload the folder and get URLs
#uploaded_urls = upload_folder(folder_path, bucket_name, credentials_json)

 #Save the URLs to a file
#(uploaded_urls, 'uploaded_images_urls.txt')


def read_urls_from_file(file_path):
    with open(file_path, 'r') as file:
        return [line.strip() for line in file.readlines()]


client = OpenAI(api_key='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')


def generate_description(text):
    try:
        response = client.chat.completions.create(
            model="gpt-4-vision-preview",
            messages=[
                {
                    "role": "user",
                    "content": [
                        {"type": "text", "text": "You are a real estate agent, and you want to generate a sales description of the listing based of the pictures."},
                        {
                            "type": "image_url",
                            "image_url": {
                                "url": text,
                            },
                        },
                    ],
                }
            ],
            max_tokens=150,
        )
        return response.choices[0]
    except Exception as e:
            return str(e)


# Example usage
file_path = 'uploaded_image_url.txt'

# Read URLs from the file
#image_urls = read_urls_from_file(file_path)
with open('uploaded_image_url.txt', 'r') as file:
    image_urls = file.read().rstrip()

# Generate and print descriptions for each image
description = generate_description(image_urls)
print(f"Description for the image:\n{description}\n")
import java.util.ArrayList;
import java.util.Scanner;

public class StudentInformationSystem {

    private static ArrayList<Student> students = new ArrayList<>();
    private static Scanner scanner = new Scanner(System.in);

    public static void main(String[] args) {
        while (true) {
            displayMenu();
            int choice = scanner.nextInt();
            scanner.nextLine(); // Consume the newline character

            switch (choice) {
                case 1:
                    addStudent();
                    break;
                case 2:
                    viewStudentList();
                    break;
                case 3:
                    searchStudent();
                    break;
                case 4:
                    System.out.println("Exiting program. Goodbye!");
                    System.exit(0);
                default:
                    System.out.println("Invalid choice. Please try again.");
            }
        }
    }

    private static void displayMenu() {
        System.out.println("Student Information System Menu:");
        System.out.println("1. Add Student");
        System.out.println("2. View Student List");
        System.out.println("3. Search for Student");
        System.out.println("4. Exit");
        System.out.print("Enter your choice: ");
    }

    private static void addStudent() {
        System.out.print("Enter student ID: ");
        int id = scanner.nextInt();
        scanner.nextLine(); // Consume the newline character

        System.out.print("Enter student name: ");
        String name = scanner.nextLine();

        students.add(new Student(id, name));
        System.out.println("Student added successfully!");
    }

    private static void viewStudentList() {
        if (students.isEmpty()) {
            System.out.println("No students in the system yet.");
        } else {
            System.out.println("Student List:");
            for (Student student : students) {
                System.out.println("ID: " + student.getId() + ", Name: " + student.getName());
            }
        }
    }

    private static void searchStudent() {
        System.out.print("Enter student ID to search: ");
        int searchId = scanner.nextInt();
        scanner.nextLine(); // Consume the newline character

        boolean found = false;
        for (Student student : students) {
            if (student.getId() == searchId) {
                System.out.println("Student found: ID: " + student.getId() + ", Name: " + student.getName());
                found = true;
                break;
            }
        }

        if (!found) {
            System.out.println("Student with ID " + searchId + " not found.");
        }
    }

    private static class Student {
        private int id;
        private String name;

        public Student(int id, String name) {
            this.id = id;
            this.name = name;
        }

        public int getId() {
            return id;
        }

        public String getName() {
            return name;
        }
    }
}
import java.util.ArrayList;
import java.util.Scanner;

public class StudentInformationSystem {

    private static ArrayList<Student> students = new ArrayList<>();
    private static Scanner scanner = new Scanner(System.in);

    public static void main(String[] args) {
        while (true) {
            displayMenu();
            int choice = scanner.nextInt();
            scanner.nextLine(); // Consume the newline character

            switch (choice) {
                case 1:
                    addStudent();
                    break;
                case 2:
                    viewStudentList();
                    break;
                case 3:
                    searchStudent();
                    break;
                case 4:
                    System.out.println("Exiting program. Goodbye!");
                    System.exit(0);
                default:
                    System.out.println("Invalid choice. Please try again.");
            }
        }
    }

    private static void displayMenu() {
        System.out.println("Student Information System Menu:");
        System.out.println("1. Add Student");
        System.out.println("2. View Student List");
        System.out.println("3. Search for Student");
        System.out.println("4. Exit");
        System.out.print("Enter your choice: ");
    }

    private static void addStudent() {
        System.out.print("Enter student ID: ");
        int id = scanner.nextInt();
        scanner.nextLine(); // Consume the newline character

        System.out.print("Enter student name: ");
        String name = scanner.nextLine();

        students.add(new Student(id, name));
        System.out.println("Student added successfully!");
    }

    private static void viewStudentList() {
        if (students.isEmpty()) {
            System.out.println("No students in the system yet.");
        } else {
            System.out.println("Student List:");
            for (Student student : students) {
                System.out.println("ID: " + student.getId() + ", Name: " + student.getName());
            }
        }
    }

    private static void searchStudent() {
        System.out.print("Enter student ID to search: ");
        int searchId = scanner.nextInt();
        scanner.nextLine(); // Consume the newline character

        boolean found = false;
        for (Student student : students) {
            if (student.getId() == searchId) {
                System.out.println("Student found: ID: " + student.getId() + ", Name: " + student.getName());
                found = true;
                break;
            }
        }

        if (!found) {
            System.out.println("Student with ID " + searchId + " not found.");
        }
    }

    private static class Student {
        private int id;
        private String name;

        public Student(int id, String name) {
            this.id = id;
            this.name = name;
        }

        public int getId() {
            return id;
        }

        public String getName() {
            return name;
        }
    }
}
//////////////////////////////// TESTING USER FETCHING FROM ANOTHER SHEET ////////////////////////////////

function fetchUserData_TEST() {
  var sourceSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("ResponseSheet TEST");
  var destinationSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Users_to_WE TEST");

  var sourceData = sourceSheet.getDataRange().getValues();
  var destinationData = destinationSheet.getDataRange().getValues();

  if (destinationData.length < sourceData.length) {
    var newRows = sourceData.slice(destinationData.length);
    for (var i = 0; i < newRows.length; i++) {
      var row = destinationData.length + i + 1; // 1-based index
      var email = newRows[i][1];
      var phone = newRows[i][2];
      phone = (phone.length === 10) ? "91" + phone : phone;
      var name = newRows[i][3];

      if (name && email && phone) {
        var prefix = "test1_"
        var startCounter = 300000
        var uniqueUserId = generateUserId(row, prefix, startCounter);
        destinationSheet.getRange(row, 1).setValue(uniqueUserId);
        destinationSheet.getRange(row, 2).setValue(email);
        destinationSheet.getRange(row, 3).setValue(phone);
        destinationSheet.getRange(row, 4).setValue(name);
        destinationSheet.getRange(row, 5).setValue("TRUE");
      }
    }
  }
  print("Done Test Fetching!");
}

//////////////////////////////// TESTING USER INTEGRATING API ////////////////////////////////

function pushUsersDataToWE_TEST_USERS() {
  var mapper_keys = map_keys('Users_to_WE TEST')
  SpreadsheetApp.flush()

  fetchUserData_TEST();

  var webEngageSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Users_to_WE TEST');

  var StartRow = 2;
  var RowRange = webEngageSheet.getLastRow() - StartRow + 1;
  var WholeRange = webEngageSheet.getRange(StartRow, 1, RowRange, 6);
  var AllValues = WholeRange.getDisplayValues();

  var headers = {
    "Authorization": "Bearer " + webEngageApiKey,
    "Content-Type": "application/json"
  }

  var usersUrl = webEngageUrl + "v1/accounts/" + webEngageLicense + "/bulk-users";

  var userList = [];
  var batchSize = 25;

  for (var idx in AllValues) {
    var currentRow = AllValues[idx];
    var status = currentRow[mapper_keys['status']];

    if (status !== "Success" && status !== "Error" && status !== "User Integrated") {
      var user_id = String(currentRow[mapper_keys['user_id']]);
      var email = String(currentRow[mapper_keys['email']]);
      var mobile = String(currentRow[mapper_keys['phone']]);
      var name = String(currentRow[mapper_keys['first_name']]);

      if (email != "#ERROR!" && mobile != "#ERROR!" && name != "#ERROR!" && mobile.length >= 10) {
        var user = {
          'userId': user_id,
          'email': email,
          'firstName': name,
          'phone': mobile,
          'whatsappOptIn': true,
        };
        userList.push(user)

        if (userList.length === batchSize) {
          var payload = { "users": userList }
          payload = JSON.stringify(payload);

          var [uploadResponse, respStatus] = callApi(usersUrl, "post", payload, headers);

          if (respStatus != 201) {
            print(payload);
            print(respStatus);
          }

          var userList = [];
        }
        if (idx % 100 === 0) {
          Utilities.sleep(5000);
        }
        webEngageSheet.getRange(parseInt(idx) + StartRow, mapper_keys['status'] + 1).setValue('User Integrated');
      }
      else {
        webEngageSheet.getRange(parseInt(idx) + StartRow, mapper_keys['status'] + 1).setValue('Error');
      }
    }
  }
  if (userList.length > 0) {
    var payload = { "users": userList }
    payload = JSON.stringify(payload);

    var [uploadResponse, respStatus] = callApi(usersUrl, "post", payload, headers);

    if (respStatus != 201) {
      print(payload);
      print(respStatus);
    }
    print(uploadResponse)
  }

  print("Done Test Integration!");
}

//////////////////////////////// TESTING EVENT API ////////////////////////////////

function pushUsersDataToWE_TEST_EVENTS() {
  var mapper_keys = map_keys('Users_to_WE TEST')
  SpreadsheetApp.flush()

  var webEngageSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Users_to_WE TEST');

  var StartRow = 2;
  var RowRange = webEngageSheet.getLastRow() - StartRow + 1;
  var WholeRange = webEngageSheet.getRange(StartRow, 1, RowRange, 6);
  var AllValues = WholeRange.getDisplayValues();

  var headers = {
    "Authorization": "Bearer " + webEngageApiKey,
    "Content-Type": "application/json"
  }

  var eventUserList = [];
  var batchSize = 25;

  var eventsUrl = webEngageUrl + "v1/accounts/" + webEngageLicense + "/bulk-events";

  var eventName = "Testing User Event 2";

  for (var idx in AllValues) {
    var currentRow = AllValues[idx];
    var status = currentRow[mapper_keys['status']];

    if (status === "User Integrated") {
      var user_id = String(currentRow[mapper_keys['user_id']]);
      if (user_id) {
        var eventUser = {
          "userId": user_id,
          "eventName": eventName
        };
        eventUserList.push(eventUser)

        if (eventUserList.length === batchSize) {
          var payload = { "events": eventUserList }
          payload = JSON.stringify(payload);

          var [uploadResponse, respStatus] = callApi(eventsUrl, "post", payload, headers);

          if (respStatus != 201) {
            print(payload);
            print(respStatus);
          }

          var eventUserList = [];
        }
        if (idx % 100 === 0) {
          Utilities.sleep(5000);
        }
        webEngageSheet.getRange(parseInt(idx) + StartRow, mapper_keys['status'] + 1).setValue('Success');
      }
      else {
        webEngageSheet.getRange(parseInt(idx) + StartRow, mapper_keys['status'] + 1).setValue('Error');
      }
    }
  }

  if (eventUserList.length > 0) {
    var payload = { "events": eventUserList }
    payload = JSON.stringify(payload);

    var [uploadResponse, respStatus] = callApi(eventsUrl, "post", payload, headers);

    if (respStatus != 201) {
      print(payload);
      print(respStatus);
    }
    print(uploadResponse)
    print(payload)
    print(respStatus)
  }

  print("Done Test Event!")
}
/* Import Google font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

/* Global styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: #E3F2FD;
}

/* Chatbot toggler button */
.chatbot-toggler {
  position: fixed;
  bottom: 30px;
  right: 35px;
  outline: none;
  border: none;
  height: 50px;
  width: 50px;
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #724ae8;
  transition: all 0.2s ease;
}

body.show-chatbot .chatbot-toggler {
  transform: rotate(90deg);
}

.chatbot-toggler span {
  color: #fff;
  position: absolute;
}

.chatbot-toggler span:last-child,
body.show-chatbot .chatbot-toggler span:first-child  {
  opacity: 0;
}

body.show-chatbot .chatbot-toggler span:last-child {
  opacity: 1;
}

/* Chatbot container */
.chatbot {
  position: fixed;
  right: 35px;
  bottom: 90px;
  width: 420px;
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.5);
  transform-origin: bottom right;
  box-shadow: 0 0 128px 0 rgba(0,0,0,0.1),
              0 32px 64px -48px rgba(0,0,0,0.5);
  transition: all 0.1s ease;
}

body.show-chatbot .chatbot {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

/* Chatbot header */
.chatbot header {
  padding: 16px 0;
  position: relative;
  text-align: center;
  color: #fff;
  background: #724ae8;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h2 {
  font-size: 1.4rem;
}

.chatbot header span {
  position: absolute;
  right: 15px;
  top: 50%;
  display: none;
  cursor: pointer;
  transform: translateY(-50%);
}

/* Chatbox styles */
.chatbot .chatbox {
  overflow-y: auto;
  height: 510px;
  padding: 30px 20px 100px;
}

/* Scrollbar styles */
.chatbot :where(.chatbox, textarea)::-webkit-scrollbar {
  width: 6px;
}

.chatbot :where(.chatbox, textarea)::-webkit-scrollbar-track {
  background: #fff;
  border-radius: 25px;
}

.chatbot :where(.chatbox, textarea)::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 25px;
}

/* Chat message styles */
.chatbox .chat {
  display: flex;
  list-style: none;
}

.chatbox .outgoing {
  margin: 20px 0;
  justify-content: flex-end;
}

.chatbox .incoming span {
  width: 32px;
  height: 32px;
  color: #fff;
  cursor: default;
  text-align: center;
  line-height: 32px;
  align-self: flex-end;
  background: #724ae8;
  border-radius: 4px;
  margin: 0 10px 7px 0;
}

.chatbox .chat p {
  white-space: pre-wrap;
  padding: 12px 16px;
  border-radius: 10px 10px 0 10px;
  max-width: 75%;
  color: #fff;
  font-size: 0.95rem;
  background: #724ae8;
}

.chatbox .incoming p {
  border-radius: 10px 10px 10px 0;
}

.chatbox .chat p.error {
  color: #721c24;
  background: #f8d7da;
}

.chatbox .incoming p {
  color: #000;
  background: #f2f2f2;
}

/* Chat input styles */
.chatbot .chat-input {
  display: flex;
  gap: 5px;
  position: absolute;
  bottom: 0;
  width: 100%;
  background: #fff;
  padding: 3px 20px;
  border-top: 1px solid #ddd;
}

.chat-input textarea {
  height: 55px;
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  max-height: 180px;
  padding: 15px 15px 15px 0;
  font-size: 0.95rem;
}

.chat-input span {
  align-self: flex-end;
  color: #724ae8;
  cursor: pointer;
  height: 55px;
  display: flex;
  align-items: center;
  visibility: hidden;
  font-size: 1.35rem;
}

.chat-input textarea:valid ~ span {
  visibility: visible;
}

/* Responsive styles for smaller screens */
@media (max-width: 490px) {
  .chatbot-toggler {
    right: 20px;
    bottom: 20px;
  }

  .chatbot {
    right: 0;
    bottom: 0;
    height: 100%;
    border-radius: 0;
    width: 100%;
  }

  .chatbot .chatbox {
    height: 90%;
    padding: 25px 15px 100px;
  }

  .chatbot .chat-input {
    padding: 5px 15px;
  }

  .chatbot header span {
    display: block;
  }
}
const chatbotToggler = document.querySelector(".chatbot-toggler");
const closeBtn = document.querySelector(".close-btn");
const chatbox = document.querySelector(".chatbox");
const chatInput = document.querySelector(".chat-input textarea");
const sendChatBtn = document.querySelector(".chat-input span");

let userMessage = null; // Variable to store user's message
const API_KEY = "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"; // Paste your API key here
const inputInitHeight = chatInput.scrollHeight;

const createChatLi = (message, className) => {
    // Create a chat <li> element with passed message and className
    const chatLi = document.createElement("li");
    chatLi.classList.add("chat", `${className}`);
    let chatContent = className === "outgoing" ? `<p></p>` : `<span class="material-symbols-outlined">smart_toy</span><p></p>`;
    chatLi.innerHTML = chatContent;
    chatLi.querySelector("p").textContent = message;
    return chatLi; // return chat <li> element
}

const generateResponse = (chatElement) => {
    const API_URL = "https://api.openai.com/v1/chat/completions";
    const messageElement = chatElement.querySelector("p");

    // Define the properties and message for the API request
    const requestOptions = {
        method: "POST",
        headers: {
            "Content-Type": "application/json",
            "Authorization": `Bearer ${API_KEY}`
        },
        body: JSON.stringify({
            model: "gpt-3.5-turbo",
            messages: [{role: "user", content: userMessage}],
        })
    }

    // Send POST request to API, get response and set the reponse as paragraph text
    fetch(API_URL, requestOptions).then(res => res.json()).then(data => {
        messageElement.textContent = data.choices[0].message.content.trim();
    }).catch(() => {
        messageElement.classList.add("error");
        messageElement.textContent = "Oops! Something went wrong. Please try again.";
    }).finally(() => chatbox.scrollTo(0, chatbox.scrollHeight));
}

const handleChat = () => {
    userMessage = chatInput.value.trim(); // Get user entered message and remove extra whitespace
    if(!userMessage) return;

    // Clear the input textarea and set its height to default
    chatInput.value = "";
    chatInput.style.height = `${inputInitHeight}px`;

    // Append the user's message to the chatbox
    chatbox.appendChild(createChatLi(userMessage, "outgoing"));
    chatbox.scrollTo(0, chatbox.scrollHeight);
    
    setTimeout(() => {
        // Display "Thinking..." message while waiting for the response
        const incomingChatLi = createChatLi("Thinking...", "incoming");
        chatbox.appendChild(incomingChatLi);
        chatbox.scrollTo(0, chatbox.scrollHeight);
        generateResponse(incomingChatLi);
    }, 600);
}

chatInput.addEventListener("input", () => {
    // Adjust the height of the input textarea based on its content
    chatInput.style.height = `${inputInitHeight}px`;
    chatInput.style.height = `${chatInput.scrollHeight}px`;
});

chatInput.addEventListener("keydown", (e) => {
    // If Enter key is pressed without Shift key and the window 
    // width is greater than 800px, handle the chat
    if(e.key === "Enter" && !e.shiftKey && window.innerWidth > 800) {
        e.preventDefault();
        handleChat();
    }
});

sendChatBtn.addEventListener("click", handleChat);
closeBtn.addEventListener("click", () => document.body.classList.remove("show-chatbot"));
chatbotToggler.addEventListener("click", () => document.body.classList.toggle("show-chatbot"));
function prefix_add_footer_styles() {
	wp_enqueue_style( 'child-main-styles', get_stylesheet_directory_uri() . '/style.css' , '', '');
};
add_action( 'get_footer', 'prefix_add_footer_styles' );
I wonder why people choose on-demand applications over traditional business models. With the fact that the market value of the On Demand Services app is predicted to expand by $335 Billion by 2025. It is secure enough to say that the economy of on-demand is drastically enlarging at a rapid pace. 

Here let’s see the popular industries that leverage the On-demand applications.

Food Delivery
E-commerce & Retail
Transportation

When it comes to developing an on-demand application for your business, Maticz provides you the cutting-edge solutions with their On-demand app development. Their team of proficient developers and designers is equipped with the knowledge and talents that are required to develop an innovative and user-friendly app that will assist you in reaching your desired goals. By hiring on-demand app developers in India you can develop an application that provides convenience, saves your precious time, is cost-effective, offers more opportunities, is eco-friendly, and is user-friendly. 
from fastapi import FastAPI, HTTPException, Security, status
from fastapi.security import APIKeyHeader


api_keys = [
    "my_api_key"
]

app = FastAPI()

api_key_header = APIKeyHeader(name="X-API-Key")

def get_api_key(api_key_header: str = Security(api_key_header)) -> str:
    if api_key_header in api_keys:
        return api_key_header
    raise HTTPException(
        status_code=status.HTTP_401_UNAUTHORIZED,
        detail="Invalid or missing API Key",
    )

@app.get("/protected")
def protected_route(api_key: str = Security(get_api_key)):
    # Process the request for authenticated users
    return {"message": "Access granted!"}

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)


wget https://blah/blah/stats --header="X-API-Key: key1"
from fastapi import FastAPI
from fastapi.responses import StreamingResponse
import io
import pandas as pd

app = FastAPI()

@app.get("/get_csv")
async def get_csv():
    df = pd.DataFrame(dict(col1 = 1, col2 = 2), index=[0])
    stream = io.StringIO()
    df.to_csv(stream, index = False)
    response = StreamingResponse(iter([stream.getvalue()]),
                                 media_type="text/csv"
                                )
    response.headers["Content-Disposition"] = "attachment; filename=export.csv"
    return response
  const updateHandler = async () => {
    const code = tabs[activeIndex]?.code;

    const updateQueryData = {
      queryName: tabs[activeIndex]?.name,
      query: code,
      email: user.email,
    };
    const updatedQuery = await QueryDataService.updateQuery(
      tabs[activeIndex].id,
      updateQueryData,
    );
    console.log('A========>', savedQueryList);
    const findSavedIndex = savedQueryList.findIndex(
      (query) => query.id === updatedQuery.id,
    );
    tabs[activeIndex] = {
      ...tabs[activeIndex],
      code: updatedQuery.query,
      name: updatedQuery.queryName,
      email: updatedQuery.email,
      id: updatedQuery.id,
      ismodified: false 
    };
    if (findSavedIndex > -1) {
      savedQueryList[findSavedIndex] = {
        ...updatedQuery,
      };
    }
    setSavedQueryList([...savedQueryList]);
    setTabs([...tabs]);
    // showUpdate();
  };
//{ Driver Code Starts
// C++ program to remove recurring digits from
// a given number
#include <bits/stdc++.h>
using namespace std;


// } Driver Code Ends
    

class Solution{
    //Function to find the leaders in the array.
    public:
    vector<int> leaders(int a[], int n)
    {
        vector<int>ans;
      for(int i=0 ; i<n ; i++)
      {
          int j;
          for( j=i+1 ; j<n ; j++)
          {
              if(a[i]<a[j])
              {
                  break;
              }
            
          }
           if(j==n)
              {
                  ans.push_back(a[i]);
              }
      }
    return ans;
        
    }
};

//{ Driver Code Starts.

int main()
{
   long long t;
   cin >> t;//testcases
   while (t--)
   {
       long long n;
       cin >> n;//total size of array
        
        int a[n];
        
        //inserting elements in the array
        for(long long i =0;i<n;i++){
            cin >> a[i];
        }
        Solution obj;
        //calling leaders() function
        vector<int> v = obj.leaders(a, n);
        
        //printing elements of the vector
        for(auto it = v.begin();it!=v.end();it++){
            cout << *it << " ";
        }
        
        cout << endl;

   }
}

// } Driver Code Ends



//{ Driver Code Starts
// C++ program to remove recurring digits from
// a given number
#include <bits/stdc++.h>
using namespace std;


// } Driver Code Ends
    

class Solution{
    //Function to find the leaders in the array.
    public:
   vector<int> leaders(int a[], int n)
    {
        vector<int>v;
        int maxi=INT_MIN;
        for(int i=n-1 ; i>=0 ; i--)
        {
            if(a[i]>=maxi)
            {
                maxi=a[i];
                v.push_back(maxi);
            }
        }
        reverse(v.begin(),v.end());
        return v;
    }
};

//{ Driver Code Starts.

int main()
{
   long long t;
   cin >> t;//testcases
   while (t--)
   {
       long long n;
       cin >> n;//total size of array
        
        int a[n];
        
        //inserting elements in the array
        for(long long i =0;i<n;i++){
            cin >> a[i];
        }
        Solution obj;
        //calling leaders() function
        vector<int> v = obj.leaders(a, n);
        
        //printing elements of the vector
        for(auto it = v.begin();it!=v.end();it++){
            cout << *it << " ";
        }
        
        cout << endl;

   }
}

// } Driver Code Ends
@import url('https://fonts.googleapis.com/css2?family=Montserrat&family=Nunito+Sans:opsz@6..12&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
    text-decoration: none;
    color: var(--text-color);
    font-family: 'Nunito Sans', sans-serif;
    user-select: none;
}

:root{
    /* --primary-color: #3498db; */
    --primary-color: #1e90ff;
    --secondary-color: #f5f5f5;
    --white:#fefefe;
    --dark:#303030;
    --text-color:#4a4a4a;
    --border:#eee;
    --border-focus:#bbb;
}

*::selection {
    background-color: var(--primary-color);
    color: var(--white);
}

*::-webkit-scrollbar {
    height: .5rem;
    width: 4px;
}

*::-webkit-scrollbar-track {
    /* background-color: var(--secondary-color); */
    background-color: transparent;
}

*::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 0;
}

html {
    /* font-size: 62.5%; */
    overflow-x: hidden;
    scroll-behavior: smooth;
    scroll-padding-top: 10rem;
}
Alternate command for 1 GPU:

sockeye-train \
    --prepared-data prepared --validation-source dev.en.bpe \
    --validation-target dev.de.bpe --output model --num-layers 6 \
    --transformer-model-size 1024 --transformer-attention-heads 16 \
    --transformer-feed-forward-num-hidden 4096 --amp --batch-type max-word \
    --batch-size 5000 --update-interval 80 --checkpoint-interval 500 \
    --max-updates 15000 --optimizer-betas 0.9:0.98 \
    --initial-learning-rate 0.06325 \
    --learning-rate-scheduler-type inv-sqrt-decay --learning-rate-warmup 4000 \
    --seed 1
<?php

/**

 * The template for displaying the footer.

 *

 * @package GeneratePress

 */

​

if ( ! defined( 'ABSPATH' ) ) {

    exit; // Exit if accessed directly.

}

?>

​

    </div>

</div>

​

<?php

/**

 * generate_before_footer hook.

 *

 * @since 0.1

 */

do_action( 'generate_before_footer' );

?>

​

<div <?php generate_do_attr( 'footer' ); ?>>

    <?php

    /**

     * generate_before_footer_content hook.

     *

     * @since 0.1

     */

    do_action( 'generate_before_footer_content' );

​

    /**

     * generate_footer hook.

     *

     * @since 1.3.

     *

     * @hooked generate_construct_footer_widgets - 5

     * @hooked generate_construct_footer - 10

     */
42
    do_action( 'generate_footer' );

​

    /**

     * generate_after_footer_content hook.

     *
let iframe = document.createElement("iframe");
iframe.src = "https://en.wikipedia.org/wiki/Main_Page";
document.body.appendChild(iframe);
//{ Driver Code Starts
#include <iostream>
using namespace std;


// } Driver Code Ends
class Solution{
    public:
    // Function to find equilibrium point in the array.
    // a: input array
    // n: size of array
    int equilibriumPoint(long long a[], int n) 
    {
        int i=0;
        int curr=0;
        int sum=0;
        for(int i=0 ; i<n ; i++)
        {
            sum+=a[i];
        }
        while(i<n)
        {
            curr+=a[i];
            if(curr==sum)
            {
                return i+1;
            }
            else
            {
                sum-=a[i];
            }
            i++;
        }
        return -1;
    }

};

//{ Driver Code Starts.


int main() {

    long long t;
    
    //taking testcases
    cin >> t;

    while (t--) {
        long long n;
        
        //taking input n
        cin >> n;
        long long a[n];

        //adding elements to the array
        for (long long i = 0; i < n; i++) {
            cin >> a[i];
        }
        
        Solution ob;

        //calling equilibriumPoint() function
        cout << ob.equilibriumPoint(a, n) << endl;
    }
    return 0;
}

// } Driver Code Ends
 if(n<m) return "No";
    
    map<int,int> mp;
    for(int i=0;i<n;i++)
    {
        mp[a1[i]]++;
    }
    
    for(int i=0;i<m;i++)
    {
        if(mp.find(a2[i]) != mp.end())
        {
            if(mp[a2[i]] == 0)
            {
                return "No";
            }
            
            mp[a2[i]]--;
            
            continue;
        }else{
            return "No";
        }
    }
    return "Yes";
}





string isSubset(int a1[], int a2[], int n, int m)
{
      int i=0;
      int count=0;
	int j=0;
	sort(a1,a1+n);

    sort(a2,a2+m);
	while(i<n and j<m)
		{
			if(a1[i]==a2[j])
			{
			    i++;
				j++;
				count++;
		
			}
			else if(a1[i]<a2[j])
			{
			    i++;
			}
			else
			{
			    return "No";
			}
		
		}
	if(count==m)
	{
		return "Yes";
	}
	return "No";
}
add_filter( 'elementor_pro/custom_fonts/font_display', function( $current_value, $font_family, $data ) {
	if ( 'Lobster' === $font_family ) {
		$current_value = 'block';
	}
	return $current_value;
}, 10, 3 );
add_filter( 'elementor_pro/custom_fonts/font_display', function( $current_value, $font_family, $data ) {
	return 'swap';
}, 10, 3 );
star

Sat Dec 23 2023 14:33:30 GMT+0000 (Coordinated Universal Time)

@Paloma #vue.js #js

star

Sat Dec 23 2023 13:49:53 GMT+0000 (Coordinated Universal Time)

@mebean #بهار #جو #لد

star

Sat Dec 23 2023 11:05:03 GMT+0000 (Coordinated Universal Time) https://filetransfer.io/data-package/PqVlozHU#link

@Jevin2090

star

Sat Dec 23 2023 11:02:28 GMT+0000 (Coordinated Universal Time) https://laravel.com/docs/10.x/installation

@rashed

star

Sat Dec 23 2023 10:27:58 GMT+0000 (Coordinated Universal Time)

@saa_adit

star

Sat Dec 23 2023 10:27:34 GMT+0000 (Coordinated Universal Time)

@saa_adit

star

Sat Dec 23 2023 10:26:52 GMT+0000 (Coordinated Universal Time)

@saa_adit

star

Sat Dec 23 2023 03:01:36 GMT+0000 (Coordinated Universal Time) https://zhuanlan.zhihu.com/p/545762616

@mikeee

star

Sat Dec 23 2023 01:40:13 GMT+0000 (Coordinated Universal Time) https://developer.chrome.com/docs/extensions/reference/manifest/content-scripts

@K #json/5

star

Sat Dec 23 2023 00:05:25 GMT+0000 (Coordinated Universal Time)

@leninzapata #css

star

Fri Dec 22 2023 23:18:44 GMT+0000 (Coordinated Universal Time)

@swina

star

Fri Dec 22 2023 16:50:58 GMT+0000 (Coordinated Universal Time)

@aatish

star

Fri Dec 22 2023 16:38:47 GMT+0000 (Coordinated Universal Time) https://leetcode.com/problems/longest-consecutive-sequence/

@sumanthbijapur

star

Fri Dec 22 2023 16:28:45 GMT+0000 (Coordinated Universal Time)

@darshcode #excel

star

Fri Dec 22 2023 16:01:09 GMT+0000 (Coordinated Universal Time)

@ivxn

star

Fri Dec 22 2023 15:36:19 GMT+0000 (Coordinated Universal Time) https://ru.bongacams26.com/members/purchase-tokens?spd

@fathulla666

star

Fri Dec 22 2023 15:22:59 GMT+0000 (Coordinated Universal Time)

@Fahrine #java

star

Fri Dec 22 2023 15:21:46 GMT+0000 (Coordinated Universal Time)

@Fahrine #java

star

Fri Dec 22 2023 14:00:26 GMT+0000 (Coordinated Universal Time)

@aatish

star

Fri Dec 22 2023 11:51:05 GMT+0000 (Coordinated Universal Time)

@rajat

star

Fri Dec 22 2023 11:49:55 GMT+0000 (Coordinated Universal Time)

@rajat

star

Fri Dec 22 2023 10:27:50 GMT+0000 (Coordinated Universal Time)

@mubashir_aziz

star

Fri Dec 22 2023 10:10:35 GMT+0000 (Coordinated Universal Time) https://maticz.com/how-to-create-a-crypto-trading-bot

@jamielucas #drupal

star

Fri Dec 22 2023 09:37:50 GMT+0000 (Coordinated Universal Time) https://medium.com/@valerio.uberti23/a-beginners-guide-to-using-api-keys-in-fastapi-and-python-256fe284818d

@quaie #python #fastapi

star

Fri Dec 22 2023 09:11:04 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/61140398/fastapi-return-a-file-response-with-the-output-of-a-sql-query

@quaie #python #fastapi #pandas

star

Fri Dec 22 2023 06:45:21 GMT+0000 (Coordinated Universal Time)

@Jevin2090

star

Fri Dec 22 2023 06:22:52 GMT+0000 (Coordinated Universal Time) https://www.reddit.com/r/Netsuite/comments/11auah6/border_radius_in_advanced_htmlpdf_templates_is/

@mdfaizi

star

Fri Dec 22 2023 06:22:14 GMT+0000 (Coordinated Universal Time) https://bfo.com/products/report/docs/userguide.pdf

@mdfaizi

star

Fri Dec 22 2023 04:05:18 GMT+0000 (Coordinated Universal Time)

@nistha_jnn #c++

star

Thu Dec 21 2023 21:43:19 GMT+0000 (Coordinated Universal Time) https://web.telegram.org/k/

@fathulla666

star

Thu Dec 21 2023 16:28:02 GMT+0000 (Coordinated Universal Time)

@Gift_Jackson #css

star

Thu Dec 21 2023 15:48:02 GMT+0000 (Coordinated Universal Time) https://awslabs.github.io/sockeye/tutorials/wmt_large.html

@mzeid #python

star

Thu Dec 21 2023 13:06:23 GMT+0000 (Coordinated Universal Time) https://fr.ldplayer.net/support/catalog?tab

@bhlotfi

star

Thu Dec 21 2023 13:05:03 GMT+0000 (Coordinated Universal Time) https://fr.ldplayer.net/support/catalog?tab

@bhlotfi

star

Thu Dec 21 2023 12:05:36 GMT+0000 (Coordinated Universal Time) https://www.addustechnologies.com/p2e-nft-game-platform-development-company

@jonathandaveiam #p2egamedevelopment #p2e #playtoearn

star

Thu Dec 21 2023 10:01:01 GMT+0000 (Coordinated Universal Time) https://machinelearningmastery.com/feature-selection-with-real-and-categorical-data/

@elham469

star

Thu Dec 21 2023 09:11:03 GMT+0000 (Coordinated Universal Time) https://edgeburg.com/wp-admin/theme-editor.php?file

@ZXCVBN #undefined

star

Thu Dec 21 2023 06:48:53 GMT+0000 (Coordinated Universal Time) https://microsoftedge.github.io/edgevr/posts/attacking-the-devtools/

@jakez

star

Thu Dec 21 2023 06:48:20 GMT+0000 (Coordinated Universal Time) https://microsoftedge.github.io/edgevr/posts/attacking-the-devtools/

@jakez

star

Thu Dec 21 2023 06:24:23 GMT+0000 (Coordinated Universal Time)

@nistha_jnn #c++

star

Thu Dec 21 2023 05:59:20 GMT+0000 (Coordinated Universal Time)

@nistha_jnn #c++

star

Thu Dec 21 2023 05:12:31 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/75700830/ability-to-choose-between-multiple-pdf-templates-on-a-netsuite-transaction-form

@mdfaizi

star

Thu Dec 21 2023 05:08:09 GMT+0000 (Coordinated Universal Time) https://www.knightsofthenet.com/contact

@mdfaizi

star

Thu Dec 21 2023 03:57:19 GMT+0000 (Coordinated Universal Time) https://www.30minutetowing.com/

@tony513

star

Thu Dec 21 2023 03:24:13 GMT+0000 (Coordinated Universal Time) https://developers.elementor.com/elementor-pro-2-7-custom-fonts-font-display-support/

@naunie

star

Thu Dec 21 2023 03:23:43 GMT+0000 (Coordinated Universal Time) https://developers.elementor.com/elementor-pro-2-7-custom-fonts-font-display-support/

@naunie #font-web #woff

star

Thu Dec 21 2023 02:02:45 GMT+0000 (Coordinated Universal Time) undefined

@mikeee

star

Thu Dec 21 2023 00:21:22 GMT+0000 (Coordinated Universal Time) https://bs2web2.at/blacksprut/

@fathulla666

star

Thu Dec 21 2023 00:21:01 GMT+0000 (Coordinated Universal Time) https://bs2web.at/

@fathulla666

star

Wed Dec 20 2023 22:03:15 GMT+0000 (Coordinated Universal Time) https://www.tinkoff.ru/mybank/accounts/debit/5787321206/?internal_source

@Majorka_Lampard

Save snippets that work with our extensions

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