google sheets – Problem with invalid regular expression missing / (slash)

I have a spreadsheet. I want to send emails from the Apps Script.

The logic to send email as follows.

Only send 1 email to each unique value in Column A (Co Name) the content of the email will include data in all rows. Only send email where Column N value is “Y”.

Expected result:

The script will only send 3 emails:

Email 1: This is to remind that the following house lease contract of “HCMC 1” has expired.

  • Mr A – house lease expire on 11 Jul 2021
  • Mr B – house lease expire on 11 Jul 2021

Email 2: This is to remind that the following house lease contract of “HCMC 4” has expired.

  • Mr C – house lease expire on 11 Jul 2021

Email 3: This is to remind that the following house lease contract of “HCMC 5” has expired.

  • Mr D – house lease expire on 11 Jul 2021

I have this script below but leads to error “Problem with invalid regular expression missing /”. Please help me to correct it.

function HLReminderAtYE1(){
var SS = SpreadsheetApp.getActiveSpreadsheet();  //declare the spreadsheet
var Sheet = SS.getSheetByName("Tax_Master");  //declare sheet name
var Range = Sheet.getDataRange(); //to set the range as array
var Values = Range.getDisplayValues(); //to get the value in the array 
 
let fvs = Values.filter(function (item) { return item(13) == "Y" }); // filter only housecontract to remind at year end
 
/*var templateText = SS.getSheetByName("Template").getRange(1,1).getValue();*/
 const uniqueClient = ();
const map = new Map();
var messageBody,mailto;
    for (const item of fvs) { // create unique list
        if(!map.has(item(0))){
            map.set(item(0), true);    
            uniqueClient.push(item(0) );
        }
    } //end unique client create loop
    
    
    uniqueClient.forEach(function(client){ // loop through unique clients
       var messageList = ();
       fvs.forEach(function(row){ //loop through all rows to check for a match of unique client
        
          if(client == row(0)){
             messageList.push((row(1),row(7)));
             const messageBody = HtmlService.createTemplateFromFile("email");
                   messageBody.clientname = client;
             mailto =  row(12);
             htmlforemail = messageBody.evaluate().getContent();
            }
        }) // end inside matching row loop
        ;

            MailApp.sendEmail(
               mailto,          // email address
               client + "- House lease contract expire", // Subject line
               "",{htmlBody: htmlforemail}); 
    })// end unique client loop
}

I have the email template as follow

<!DOCTYPE html>
<html>
  <head>
    <base target="_top">
  </head>
  <body>
    <div>
      <div>
        <p> "Dear team,</p>
        <p> </p>
        <p> This is to notify that the house lease contract(s) of the below expats of <?= clientname ?> has expired. Please action accordingly.</p>
      </div>
      <div> 
       <? messageList.forEach(r=>{ ?> 
        
        
       <p> <?= r(1)?> house lease contract end on <?= r(2) ?> </p>
       <? })
      </div>
      <div>
          <p> ----------------- </p>
          <p> Sample email: </p>
          <p> Dear , </p>
          <p> </p>
          <p> The house lease contract(s) of the following expatriate employee(s) of <?= clientname ?> has expired. Please help provide us with the updated house lease contracts. Thank you.</p>
      <div>
        <p> </p>
        <p> Should you have any question, please contact us. </p>
        <p> </p>
        <p> Best regards, </p>
      </div>
  </body>
</html>

http – Hijacking URL that ends with a trailing slash

I am pentesting an API that will make a backend call to https://example.org/ and append any input you provide it (for example, if you provide test it will make the call to https://example.org/test). I am trying to achieve SSRF in this scenario, so my goal is to change the domain. I know if it had been https://example.org without the trailing slash, I could have done @anothersite.com (https://example.org@anothersite.com) or just .anothersite.com (https://example.org.anothersite.com).

However, the trailing slash prevents this.

Are there any other special URL characters or techniques that can be used in this scenario to either change the domain to another site or delete the trailing slash?

Let a slack app create slash commands for another app? (Custom -> Jira)

I am trying to automatically create a ticket every month in Jira. Jira has a slash command to create tickets, which I could use each month to create a ticket myself, but that would not be different than going to Jira and doing it myself.

I would like to have my custom slackbot send these slash commands on my behalf.

Problems so far:
I can’t seem to get the bot to activate a slash command even if it types something with a slash in it.
Jira slash command opens a modal to get more information, so it’s not just “/Jira create detailsdetailsdetails

Any other solutions to recurring tickets for Jira that doesn’t require a paid plugin are welcome as well.

magento2.3 – Elasticsearch not able to search for term with a slash / in it

I am using Elasticsearch and Elasticsearch not able to search for term with a slash / in it . This issue is solved on version 2.4 and what i am using is version 2.3.5 . I don’t plan an upgrade in near future. What kind of workaround would you suggest for this problem?

When i use slash and search this is a part of the error message i get .
{“0”:”{“error”:{“root_cause”:[{“type”:”query_shard_exception”,”reason”:”failed to create query: {n “query_string” : {n “query” : “sku: …

c++ – Spinning slash wheel to represent an Ongoing operation

I have written a simple program to represent the computer is doing an operation. It is suppose to show a rotating slash character to the user with every second passed however the program does not work as intended. It shows all the characters instead of cleaning the screen and show just the spinning slash character.

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>

int main(){
char wheel(3) = {'\','|','/'};

int j=0;
int i = 0;
while(j<6){
    printf("(%c)",wheel(i));
    sleep(1);
    system("clear");
    i++;
    if(i>2) i=0;
    j++;
}


return 0;
}

adb push and wrong slash -> bootloop

I have my brand new Doogee S96 Pro which is now not able to boot.

I made a great fail:

instead of

adb push myfile.zip /sdcard/

i wrote

adb push myfile.zip sdcard

From that moment, no more boot.
I can’t get what I did, but I now can only boot in the TWRP recovery.

Someone could give me a tip on what I did and how to solve the issue? Thank you.

hack and slash – Pointers for making my first video game

I have had a love for video games for years. Hack and slash, rpg, mmorpg, racing, first and thrid person shooters, and open world, story driven games. I’m looking to start in making my own and first ever game. I will be doing this by myself, on my own time, and my own money, so I’m doing this for mainly practice and honing my skills, so no big, overly ambitious ideas yet, but I’m looking for what would be a good program to start breaking ground in training myself in making video games and being able upload them.

terminal – First slash missing in the path of files found by locate

I have a contab as root like this :

0 */4 * * * cd /private/var/root && ./locate.updatedb

I have an alias for locate command in ~/.zshrc :

alias locate='locate -d /var/db/locate.database'   

and when I do a “$ locate Table_Synthesis_GREY_” , in all the full paths of files found, the first slash is missing (slash character missing before Users below) – here the ouput :

Users/henry/Projects/JUNK_AND_OLD/Travail_9_Paper_Combinaison_et_Methode_des_biais_communs_pour_ma_These_SAUVEGARDES/TABLES_FLAT_AND_NON_FLAT_to_include_into_my_Phd_paper_LAST/Table_Synthesis_Main_05_AOUT_2020/temp/Table_Synthesis_GREY_IMPORTANT_SAVE_5_AOUT_2020.run.xml
Users/henry/Projects/JUNK_AND_OLD/Travail_9_Paper_Combinaison_et_Methode_des_biais_communs_pour_ma_These_SAUVEGARDES/TABLES_FLAT_AND_NON_FLAT_to_include_into_my_Phd_paper_LAST/Table_Synthesis_Main_05_AOUT_2020/temp/Table_Synthesis_GREY_IMPORTANT_SAVE_5_AOUT_2020.tex
Users/henry/Projects/JUNK_AND_OLD/Travail_9_Paper_Combinaison_et_Methode_des_biais_communs_pour_ma_These_SAUVEGARDES/TABLES_FLAT_AND_NON_FLAT_to_include_into_my_Phd_paper_LAST/Table_Synthesis_Main_05_AOUT_2020/temp/Table_Synthesis_GREY_IMPORTANT_SAVE_5_AOUT_2020.zip
Users/henry/Projects/JUNK_AND_OLD/Travail_9_Paper_Combinaison_et_Methode_des_biais_communs_pour_ma_These_SAUVEGARDES/TABLES_FLAT_AND_NON_FLAT_to_include_into_my_Phd_paper_LAST/Table_Synthesis_Main_05_AOUT_2020/temp/Table_Synthesis_GREY_IMPORTANT_SAVE_5_AOUT_2020_ORIGINAL_INTO_zip_here.pdf
Users/henry/Projects/JUNK_AND_OLD/Travail_9_Paper_Combinaison_et_Methode_des_biais_communs_pour_ma_These_SAUVEGARDES/TABLES_FLAT_AND_NON_FLAT_to_include_into_my_Phd_paper_LAST/Table_Synthesis_Main_AFTER_05_AOUT_2020/FLAT_Synthesis/Table_Synthesis_GREY_FLAT.docx

How to make appear this firt slash before Users ? – I would like results as :

/Users/henry/Projects/JUNK_AND_OLD/Travail_9_Paper_Combinaison_et_Methode_des_biais_communs_pour_ma_These_SAUVEGARDES/TABLES_FLAT_AND_NON_FLAT_to_include_into_my_Phd_paper_LAST/Table_Synthesis_Main_AFTER_05_AOUT_2020/FLAT_Synthesis/Table_Synthesis_GREY_FLAT.docx

and not :

Users/henry/Projects/JUNK_AND_OLD/Travail_9_Paper_Combinaison_et_Methode_des_biais_communs_pour_ma_These_SAUVEGARDES/TABLES_FLAT_AND_NON_FLAT_to_include_into_my_Phd_paper_LAST/Table_Synthesis_Main_AFTER_05_AOUT_2020/FLAT_Synthesis/Table_Synthesis_GREY_FLAT.docx

nginx – RewriteRule conflict and trailing slash

We are migrating a website to our cPanel infrastructure. The customer hosted the website on his own infrastructure using Nginx. He sent to us his Nginx configuration files and we converted them to Apache Rewrite rules. The final result (showing only the relevant lines) looks like this:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ouvidoria/$ /ouvidoria/index.php
RewriteRule ^((^/.)+)/?$ index.php?id=$1 (L)
RewriteRule ^news/(.*)/?$ noticias.php?id=$1 (L)

Everything work as expected, except for one page, which is /ouvidoria. This specific page has a directory with the same name on public_html, so the RewriteRule points to the ouvidoria/index.php file. The problem is that for some reason when we access the /ouvidoria URL we get redirected to /ouvidoria/?id=ouvidoria, which seems to be falling on the penultimate rule. So this is the first problem to be solved.

The second is that we can access the URL with a trailing slash (/ouvidoria/) and it won’t append ?id=ouvidoria, but, the website was developed in a way that the side menu is loaded accordingly to the URL. It will only load without a trailing slash. Even if we remove the problematic rule from the first problem (which is not a solution, because it is needed in other pages), it redirects /ouvidoria to /ouvidoria/, thus failing to load the menu.

Any help on how to make these rules work will be appreciated.

rewrite – Remove php/html extention and trailing slash from url using nginx

I need to remove the .php and .html extension and the trailing slash from the url without impairing access to existing directories.

I am currently using the following nginx configuration:

rewrite ^/(.*)/$ /$1 permanent;

index index.php index.html;
location ~ / {
    rewrite ^/((0-9)+)/((^/)+)$ /event.php?id=$1&title=$2 last;
    try_files $uri $uri/ $uri.html $uri.php$is_args$query_string;
}

location ~ .php$ {
    try_files $uri =404;
}

It works but I can’t access existing folders (expected behavior since ending with a slash produces an infinite redirection). I have tried to fix it with a try_files but it has not worked:

location / {
    try_files $uri $uri/ @notexists;
}
location @notexists {
    rewrite ^/(.*)/$ /$1 permanent;
    rewrite ^/((0-9)+)/((^/)+)$ /event.php?id=$1&title=$2 last;
    try_files $uri $uri/ $uri.html $uri.php$is_args$query_string;
}

And by the way, I would like to know how to optimize the code for greater efficiency. I’m new with Nginx…