How can i reduce the cost in Bitmap Heap Scan, Filter and Heap Block?

Looks like the query taking time in the second last step in which it mapping index to actually rows so can I optimize this query in any terms, I m not sure if something wrong with the index? and what is Heap Block means is this related to work_mem.

Postgres Configuration: RAM 16GB vCpu 4


CREATE TABLE main.user_resources (     id uuid NOT NULL DEFAULT (md5(((random())::text || (clock_timestamp())::text)))::uuid,     user_tenant_id uuid NOT NULL,     resource_name character varying(50) COLLATE pg_catalog."default" NOT NULL,     resource_value character varying(50) COLLATE pg_catalog."default" NOT NULL,     allowed boolean NOT NULL,     created_on timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,     modified_on timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,     created_by uuid,     modified_by uuid,     deleted boolean NOT NULL DEFAULT false,     deleted_on timestamp with time zone,     deleted_by uuid,     CONSTRAINT pk_user_resources_id PRIMARY KEY (id) ) 


SELECT "resource_name","resource_value","allowed" FROM "main"."user_resources" WHERE (("user_tenant_id"=abc') AND ((("resource_value" IN ('efg')) OR ("resource_name" IN ('BO','UB')))) AND ("deleted"=false)) ORDER BY "id";  


CREATE INDEX idx_user_resource_user_tenant_id_and_not_deleted     ON main.user_resources USING btree     (user_tenant_id ASC NULLS LAST)     TABLESPACE pg_default     WHERE deleted = false; -- Index: idx_user_resources_resource_name  -- DROP INDEX main.idx_user_resources_resource_name;  CREATE INDEX idx_user_resources_resource_name     ON main.user_resources USING btree     (resource_name COLLATE pg_catalog."default" ASC NULLS LAST)     TABLESPACE pg_default; -- Index: idx_user_resources_resource_value  -- DROP INDEX main.idx_user_resources_resource_value;  CREATE INDEX idx_user_resources_resource_value     ON main.user_resources USING btree     (resource_value COLLATE pg_catalog."default" ASC NULLS LAST)     TABLESPACE pg_default; -- Index: idx_user_resources_user_tenant_id  -- DROP INDEX main.idx_user_resources_user_tenant_id;  CREATE INDEX idx_user_resources_user_tenant_id     ON main.user_resources USING btree     (user_tenant_id ASC NULLS LAST)     TABLESPACE pg_default;  


Sort  (cost=3547.20..3556.41 rows=3686 width=64) (actual time=7.080..7.438 rows=4562 loops=1)    Sort Key: id    Sort Method: quicksort  Memory: 834kB    ->  Bitmap Heap Scan on user_resources  (cost=281.12..3328.84 rows=3686 width=64) (actual time=1.070..5.325 rows=4562 loops=1)          Recheck Cond: (((user_tenant_id = 'abc'::uuid) AND ((resource_value)::text = 'efg'::text)) OR ((resource_name)::text = ANY ('{BO,UB}'::text[])))          Filter: ((NOT deleted) AND (user_tenant_id = 'abc'::uuid))          Rows Removed by Filter: 6912          Heap Blocks: exact=2177          ->  BitmapOr  (cost=281.12..281.12 rows=11470 width=0) (actual time=0.834..0.835 rows=0 loops=1)                ->  Bitmap Index Scan on idx_user_resource_mlt  (cost=0.00..4.43 rows=1 width=0) (actual time=0.021..0.021 rows=3 loops=1)                      Index Cond: ((user_tenant_id = 'abc'::uuid) AND ((resource_value)::text = 'efg'::text))                ->  Bitmap Index Scan on idx_user_resources_resource_name  (cost=0.00..274.84 rows=11469 width=0) (actual time=0.812..0.812 rows=11735 loops=1)                      Index Cond: ((resource_name)::text = ANY ('{BO,UB}'::text[]))  Planning Time: 0.214 ms  Execution Time: 7.932 ms (15 rows) 

How Microsoft Junk Mail filter really works based in body content links?

I’m not here to discuss about DKIM, DMARC, SPF, or other of the hundreds of variables in the difficult path to get your email into the Inbox instead of Junk folder.

I’m here just about the links in the body content of the email, and I’ll tell you why.

I have been sending dozens of emails from a Google Apps mail account, to a account.

It was just TEXT, this text:

Hi there !!! Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sagittis imperdiet eros sit amet placerat. Aenean blandit efficitur eros non mattis. Integer vehicula nunc eget est vulputate, sit amet consequat ipsum feugiat. Aliquam massa odio, dignissim vel luctus in, aliquam sit amet est. Aliquam erat volutpat.   Phasellus egestas, dolor in tempor ullamcorper, tortor lectus auctor neque, vel suscipit diam tellus tempus tortor. Nam vulputate euismod ligula, ac tempor arcu tempus at. Donec ultricies velit sed justo mollis accumsan at nec nisi. Vestibulum a diam ac magna varius consectetur. Donec in justo vitae ex lacinia imperdiet. Nullam gravida urna leo. Etiam congue, dui a commodo feugiat, risus tellus tempor neque, eget vestibulum erat ex non augue.  If you want you can visit: https://xxxxxxxxx.xxxx  Donec pulvinar rutrum commodo. Cras porta facilisis bibendum. Pellentesque pretium est sem, ut varius diam suscipit quis. Aenean et eros auctor, rhoncus mi in, dignissim odio. Suspendisse suscipit enim lorem, quis interdum massa consectetur in. Integer suscipit eros sodales hendrerit tempor. Etiam finibus semper tellus, ac suscipit orci mollis eu. Pellentesque vehicula auctor ultrices. In hendrerit dolor quis lorem laoreet, vel convallis magna laoreet. Sed pulvinar non magna maximus dapibus.  Nullam semper lacus eget hendrerit dapibus. Morbi eget urna eleifend, consectetur elit ac, fermentum orci. Mauris et urna est. Mauris ac lacinia lectus. Vestibulum scelerisque tempor nibh ac eleifend. Nulla faucibus tellus blandit quam suscipit ultricies. Suspendisse finibus risus id lectus lobortis mattis.  Regards 

The only change was the ONLY link in all email content. Everything was exact the same. The content, the subject, the sender … I just changed that link.

What I saw is with some links, the email goes to Inbox folder With other links, it goes to the Junk folder.

Just that ! Just because of the domain name of the only link in the body content.

Why is that?

I try to figure out things like:

  • domain age
  • domain – ip and reverse
  • domain ip in ip’s blacklist
  • domain in domain’s blacklist
  • domain has https activated
  • and some other variables

but I can’t get any "rule" that satisfies why sometimes "that link" is "good" or not to Microsoft Junk Email Filter.

Does anyone know any clue in order to check the list of "good" domains and "bad" domains I have so we can all learn about this? ­čśë

What are all the spells that target undead? Or in a case does anyone know a site that can filter that

I’ve looked at the new gothic lineages and I wanted to personally look at the pros and cons of being dual as a Humanoid and an Undead/Construct or etc… and wanted to weigh out if it was worth the being an undead and being unaffected by poison and such, but vulnerable to turn undead and other targeting spells that focus on undead.

Modifying a CoBlocks Filter in Functions

I’m trying to modify slidestoshow parameter in CoBlocks Carousel block via my theme’s functions. Everything in the Codex implies modifying/passing the variable but looking at the code, it appears it’s an [anonymous function?] Forgive me if this term is incorrect.

I’ve tried both apply_filters() and add_filters() to replace the entire array rather than the individual key/value. I’ve tried removing the existing filter and adding it again but I’m not sure if the way it’s coded is preventing me from making my modification.

Do I need to call the plugin Class CoBlocks_Settings?

Here is the original plugin code:

$  block_content = sprintf( '<div class="%1$  s"><div class="coblocks-slick pb-8" data-slick="%2$  s">',     esc_attr( $  class ),     esc_attr(         wp_json_encode(             /**              * Filter the slick slider carousel settings              *              * @var array Slick slider settings.             */             (array) apply_filters(                 'coblocks_post_carousel_settings',                     array(                     'slidesToScroll' => 1,                     'arrow'          => true,                     'slidesToShow'   => $  attributes['columns'],                     'infinite'       => true,                     'adaptiveHeight' => false,                     'draggable'      => true,                     'responsive'     => array(                         array(                             'breakpoint' => 1024,                             'settings'   => array(                                 'slidesToShow' => 3,                             ),                         ),                         array(                             'breakpoint' => 600,                             'settings'   => array(                                 'slidesToShow' => 2,                             ),                         ),                         array(                             'breakpoint' => 480,                             'settings'   => array(                                 'slidesToShow' => 1,                             ),                         ),                     ),                 )             )         )     ) ); 

First, I tried just overriding it with:

apply_filters( 'coblocks_post_carousel_settings',  array( ... )); 

Second, here’s where I’m at in Functions:

apply_filters( 'coblocks_post_carousel_settings', 'my_filter_coblocks_carousel' ); function my_filter_coblocks_carousel() {     $  carousel = array(         'slidesToScroll' => 1,         'arrow'          => true,         'slidesToShow'   => $  attributes['columns'],         'infinite'       => true,         'adaptiveHeight' => false,         'draggable'      => true,         'responsive'     => array(             array(                 'breakpoint' => 1024,                 'settings'   => array(                     'slidesToShow' => 4,                 ),             ),             array(                 'breakpoint' => 600,                 'settings'   => array(                     'slidesToShow' => 4,                 ),             ),             array(                 'breakpoint' => 480,                 'settings'   => array(                     'slidesToShow' => 4,                 ),             ),         ),     );     return $  carousel; }  

Scrapping Google “reasonably” without triggering spam filter

My goal is to do some scrapes to get list of businesses per city.

I need to send about 500 emails per day, I use the inurl:contact to make sure that the results have a contact page, and then I extract the email address from that.

So I figure I might batches of about 2000 URL’s not sure yet…

Can I safely crawl 1000-5000 url results a day with the default proxies that come with scrapebox (using the option “harvest proxies”)

Add a functionality to quickly filter custom posts in Admin Area

I am creating a website for a doggie rescue, basically configuring the backend so they can manage dogs, volunteers, etc.

The legacy system had a feature where the user could start typing into an input field and all matching results would be displayed as you typed, most likely making ajax calls.

They would like to have this feature in WordPress. I tried using Admin Columns but you have to create the filter, modify the value and then click the Filter button and wait for it to load the results. I want to avoid the "click filter button and wait for page to come back with results" part.

One of the CPT that I am creating, volunteers, apparently has 40K records, and they would like to filter through them by using this "filter as you type" idea.

Is this possible from WPAdmin? I mean, adding a text input field that would filter all the posts using AJAX?


spam filter for contact-form.php doesnt work

I am trying in vain to include SPAM protection in the contact form … Can someone help me with this? It’s just getting worse with the spam messages! Google Recaptcha does not work … the checkout field is displayed, but no matter whether it is confirmed or not, the messages go out. Unfortunately, this is also the case with other plugins. In principle, a "simple" // "invisible" query would be enough for me. Most bots should fall for it … But I just don’t get it involved. I uploaded the original_code to github. Below is a file with "invisible" spam protection ….

/* ........................................................... Template Name: Kontaktformular * * * @file           contact-form.php * @filesource     wp-content/themes/handwerk/contact-form.php ............................................................ */ ?>  <?php  $  data = get_option('bo_options'); $  response = isset( $  data['contact']['bo_contact_response'] ) ? $  data['contact']['bo_contact_response'] : null; $  recipient = isset( $  data['contact']['bo_formmail_address'] ) ? $  data['contact']['bo_formmail_address'] : null; $  shdata = isset( $  data['contact']['bo_show_dataprot'] ) ? $  data['contact']['bo_show_dataprot'] : null; $  datalink = isset( $  data['contact']['bo_dataprot_page_url'] ) ? $  data['contact']['bo_dataprot_page_url'] : null; $  bloginfo = get_bloginfo('admin_email'); if ($  recipient == '') { $  rec = $  bloginfo; } else { $  rec = $  recipient; } $  sub = isset( $  data['contact']['bo_formmail_subject'] ) ? $  data['contact']['bo_formmail_subject'] : null; $  offerinfo = isset( $  data['contact']['bo_offer_info_text'] ) ? $  data['contact']['bo_offer_info_text'] : null;  if(isset($  _POST['submitted'])) {     if(trim($  _POST['checking']) !== '') {         $  captchaError = true;     } else {         if(trim($  _POST['contactName']) === '') {             $  nameError = __('Bitte tragen Sie Ihren Namen ein','bobox');             $  hasError = true;         } else {             $  name = trim($  _POST['contactName']);         }         $  phone = trim($  _POST['phone']);             $  subject = trim($  _POST['subject']);             if(isset($  _POST['objectName'])) {                 $  objectname = trim($  _POST['objectName']);             }         if(trim($  _POST['email']) === '')  {             $  emailError = __('Sie haben vergessen, eine E-Mail Adresse einzutragen');             $  hasError = true;         } else if (filter_var(trim($  _POST['email']), FILTER_VALIDATE_EMAIL))  {         $  email = trim($  _POST['email']);          } else {             $  emailError = __('Sie haben eine ung├╝ltige E-Mail Adresse eingetragen');             $  hasError = true;         }                  if(trim($  _POST['comments']) === '') {             $  commentError = 'Sie haben vergessen, eine Nachricht einzutragen';             $  hasError = true;         } else {             if(function_exists('stripslashes')) {                 $  comments = stripslashes(trim($  _POST['comments']));             } else {                 $  comments = trim($  _POST['comments']);             }         }         if(!isset($  hasError)) {              $  emailTo = $  rec;             $  msubject = $  sub;             $  body = " \n\nEine Anfrage zum Thema: $  objectname  \nvon:\nName: $  name \nEmail: $  email \nBetrifft: $  subject \nTelefon: $  phone \n\nNachricht: $  comments ";             $  headers = 'From: <'.$  emailTo.'>' . "\r\n" . 'Reply-To: ' . $  email. "\r\n";             $  headers .= "MIME-Version: 1.0\r\n";                 $  headers .= "Content-type: text/plain; charset=utf-8\r\n";                 $  headers .= "Content-Transfer-Encoding: 8bit";                          mail($  emailTo, $  msubject, $  body, $  headers);                           $  emailSent = true;          }     } } ?>   <?php get_header(); ?>                                   <div id="page-entry">                           <?php if(isset($  hasError) || isset($  captchaError)) { ?>         <h1>Sorry, <?php echo $  name;?></h1>             <p class="error">Bei der &Uuml;bermittlung hat es einen Fehler gegeben!<p>         <?php } ?>                                   <?php if(isset($  emailSent) && $  emailSent == true) { ?>      <div class="thanks">         <h2>Vielen Dank, <?php echo $  name;?></h2>         <p><?php echo $  response; ?></p>     </div>  <?php } else { ?>      <?php if (have_posts()) : ?>          <?php while (have_posts()) : the_post(); ?>                            <h1 class="post-title"><?php the_title(); ?></h1>                             <div class="contact-content">                  <?php the_content(); ?>                  <?php include ("google-map-iframe.php"); ?>         </div><!-- eof contact content -->                               <div class="contactform">           <?php if(isset($  _POST["object-title"])) { ?>         <div class="selected-offer">                               <p><?php echo $  offerinfo; ?> <a href="<?php echo $  _POST["object-link"] ?>"><?php echo $  _POST["object-title"] ?></a></p>                          </div>         <?php } ?>                        <form action="<?php the_permalink(); ?>" id="contactForm" method="post">           <div class="formcolumn"> <label for="contactName"><?php echo __('Ihr Name','bobox'); ?>*:</label><input required="required" type="text" name="contactName" id="contactName" value="<?php if(isset($  _POST['contactName'])) echo $  _POST['contactName'];?>" class="requiredField" /><?php if(isset($  nameError)) { if($  nameError != '') { ?><span class="error"><?php echo $  nameError;?></span> <?php } } ?>                            <label for="subject"><?php echo __('Betrifft','bobox'); ?>:</label>   <input type="text" name="subject" id="subject" value="<?php if(isset($  _POST['subject']))  echo $  _POST['subject'];?>" class="email" /> </div>          <div class="formcolumn">                  <label for="email"><?php echo __('Ihre E-Mail Adresse','bobox'); ?>*:</label>             <input required="required" type="text" name="email" id="email" value="<?php if(isset($  _POST['email']))  echo $  _POST['email'];?>" class="requiredField email" />                     <?php  if(isset($  emailError)) { if($  emailError != '') { ?>                         <span class="error"><?php echo $  emailError;?></span>                     <?php } }?>            <label for="phone"><?php echo __('Ihre Telefonnummer','bobox'); ?>:</label>   <input type="text" name="phone" id="phone" value="<?php if(isset($  _POST['phone']))  echo $  _POST['phone'];?>" class="email" />     </div>                 <div class="clear"></div>                                            <label for="commentsText"><?php echo __('Ihre Nachricht','bobox'); ?>*:</label>                     <textarea required name="comments" id="commentsText" rows="10" cols="30" class="requiredField"><?php if(isset($  _POST['comments'])) { if(function_exists('stripslashes')) { echo stripslashes($  _POST['comments']); } else { echo $  _POST['comments']; } } ?></textarea>                     <?php if(isset($  commentError)) { if($  commentError != '') { ?>                         <span class="error"><?php echo $  commentError;?></span>                      <?php } } ?>                                       <?php  if(isset($  shdata) && $  shdata == 'yes') { ?>  <div class="wr clearfix">                     <input required="required" type="checkbox" name="contactData" id="contactData" value="true"<?php if(isset($  _POST['contactData']) && $  _POST['contactData'] == true) echo ' checked="checked"'; ?> /><label class="shortleft agreelabel" for="contactData"><?php  echo sprintf( __( 'Ja, ich habe die <a target="_blank" href="%s">Datenschutzerkl&auml;rung</a> gelesen und bin damit einverstanden, dass meine Daten elektronisch erhoben und gespeichert werden. Meine Daten werden ausschlie&szlig;lich zweckgebunden zur Bearbeitung meiner Anfrage genutzt.', 'bobox' ), $  datalink ); ?>*</label></div><?php } ?>                                                <div class="screenReader" style="left: -9999px; position: absolute; top: -9999px;"><label for="checking" class="screenReader">If you want to submit this form, do not enter anything in this field</label><input type="text" name="checking" id="checking" class="screenReader" value="<?php if(isset($  _POST['checking']))  echo $  _POST['checking'];?>" /></div>                   <input type="hidden" name="objectName" id="objectName" value="<?php if(isset($  _POST["object-title"])) { echo $  _POST["object-title"]; } ?>" class="readonly " />                 <input type="hidden" name="submitted" id="submitted" value="true" />                  <button type="submit"><?php echo __('Nachricht jetzt absenden','bobox'); ?></button>                                                 </form>     </div>            <?php endwhile; ?>     <?php endif; ?> <?php } ?>     <div class="clear"></div> </div>     </div><!-- eof content -->  <?php get_footer(); ?> 

and here is "actually" a simple invisible checkbox.

$  errors = array();  //Pr├╝fen ob Formular abgesendet if(isset($  _POST['submit'])) {          //Spamcheck mit jedem neuem Absenden zur├╝cksetzen     $  spamcheck = false;       //Spamcheck     if(!empty($  _POST["repeat_email"]) || isset($  _POST["terms"])) {         $  errors[] = "Zusatzfelder wurden ausgef├╝llt, wir vermuten Spam und brechen hier ab.";        } else {         $  spamcheck = true;     }      // Eingaben Validieren     if($  spamcheck = true) {           if(empty($  _POST['name'])) { //Wenn Name leer             $  errors[] = "Bitte geben Sie Ihren Namen an";         }                  if(empty($  _POST['email'])){ //Wenn Email leer             $  errors[] = "Bitte Emailadresse angeben";         } elseif (filter_var($  _POST['email'], FILTER_VALIDATE_EMAIL) == false) { //Emailformat ├╝berpr├╝fen ab PHP 5.2             $  errors[] = "Bitte geben Sie ein g├╝ltige Emailadresse an";         }                          if(empty($  _POST['message'])){ //Wenn Nachricht leer             $  errors[] = "Bitte geben Sie Ihre Nachricht ein";         }          if(!isset($  _POST["gender"])){ //Wenn Spamcheck nicht markiert             $  errors[] = "Bitte best├Ątigen Sie den Spamcheck";         }                 }      if(isset($  _POST['submit']) && empty($  errors) && $  spamcheck == true) {         // Spamtest bestanden, alle erforderlichen Felder richtig ausgef├╝llt         // Eintrag in Datenbank oder Email Versand         echo "Alles richtig gemacht";     }  } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""> <html xmlns=""> <head>  <title>Tutorial: PHP Formular Spamschutz und Validierung ÔÇô Spam Emails verhindern auch ohne Captcha</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />      <script src=""></script> <script type="text/javascript"> $  (document).ready(function(){     $  ('.terms').append('<input type="text" name="repeat_email" value="test" />'); }); </script>  <style>     /*Demo Formular Styles*/     label { display:inline-block; width:100px; }     input { padding:5px; width:300px; }     input[type="checkbox"] { width:20px; margin-right:10px; }     textarea { width:410px; }        .terms { display:none; } </style>    </head>  <body>        <h2>Demo: PHP Formular Spamschutz und Spamabwehr ohne Captcha</h2>     <p><a href="">Zum Blogartikel &raquo;</a></p>          <noscript>Bitte aktivieren Sie Javascript zum Absenden des Formulars oder nutzen Sie eine der alternative Kontaktm├Âglichkeiten unter</noscript>        <?php if(isset($  _POST['submit']) && empty($  errors) === false) {?>       <div style="background:#FCC">           <strong>Bitte ├╝berpr├╝fen Sie Ihre Angaben!</strong><br />           <?php echo '<ul><li>'.implode('</li><li>',$  errors).'</li></ul>'; ?>       </div>       <?php } ?>                          <form id="phpform" method="post" action="formular-spamschutz.php">              <p><label for="name">Name<span>*</span></label>             <input type="text" name="name" value="<?=(isset($  _POST['name'])) ? $  _POST['name'] :''?>"></p>              <p><label for="email">Email<span>*</span></label>             <input type="text" name="email" value="<?=(isset($  _POST['email'])) ? $  _POST['email'] :''?>"></p>              <p><label for="message">Nachricht<span>*</span></label><br />             <textarea name="message" rows="8"><?=(isset($  _POST['message'])) ? $  _POST['message'] :''?></textarea></p>              <p><input type="checkbox" name="gender" <?=(isset($  _POST['human'])) ? "checked='checked'" : ''?>><span>*</span> Ich versende keinen Spam</p>              <p><input type="submit" name="submit" value="Absenden"></p>              <div class="terms">             Folgende Felder bitte frei lassen!             <input type="checkbox" name="terms">             </div>                   </form>         <p><a href="" target="_blank">Made with love by - Rico Loschke</a></p>  </body> </html> ``` 

GSA Proxy Scraper Automatic Export Filter by Type


could you add the feature to automatic export the Proxies by Type? So atm it will save all the working Proxies in a single file in my example a .txt file. But it would be great if there is the function to save the working Proxies by Type so there would be multiple Output files like Socks5.txt, Socks4.txt, Web.txt and Connect.txt