Adding users to a Facebook Messenger group after the sole admin leaves

This question is very similar to this one: Deleted myself from Facebook group and cannot regain access but specifically for a Facebook Messenger chat.

I was the sole admin of a Facebook Messenger chat, left the chat, and now no one can add me back because no one else is an admin. When someone tries it says new people need to be approved by admins, but there are no admins listed.

Can anyone promote themselves to be the new admin or is there another workaround?

random – Adding noise to the data

I have not used WhiteNoiseProcess before. But looking at help, what you can go is generate the noise (called noiseData below) and then add it, point by point, to your input?

p = WhiteNoiseProcess(.5); (*mean 0 and standard deviation 0.5 say*)
noiseData = RandomFunction(p, {0, 10});
ListPlot(noiseData)

Mathematica graphics

Now add the above to your data. This is your data before

myData = Transpose({Range(0, 10), Range(0, 10)});
ListLinePlot(myData)

enter image description here

This is your data after adding the noise

ListLinePlot(myData + Normal(noiseData)((1)))

enter image description here

Adding default gateway using nmcli – Centos 8

I am trying to add 2 default gateways on my Centos8 server with different interface names and metrics. I have a route file for each interface with the route “default via metric “. This is not working as I don’t see the routes when I specify “ip route show all”. Looks like NetworkManager is not considering the route files with default gateway. So I add the default route using “ip route add” command. This becomes a problem since this doesn’t persist on reboot. Any idea how to achieve this and make it persistent?

payment gateway – Adding paygate buttons to HTTP-only website?

Let’s say that I have a website where I want to sell homemade goods. I want customers to be able to pay for the goods without too much hassle.

A common option is to use buttons provided by a payment service like PayPal. The website uses HTTP, however, and the hosting service does not allow SSL certificates without paying for a higher hosting plan. What are the risks of using similar payment methods on my website?

One attack I am aware of, is that of an attacker redirecting the traffic to their own website — which pretends to be the payment service. I am not sure if this is even a concern for this case.

To be clear:

  • Purchases on the website will be rare, so there will be little opportunity for an attacker to intercept payments.
  • The website is hosted by a hosting service, similar to WordPress.

plugin development – Adding dropdown list to tutor lms registration form

Tutor lms plugin gives instructions of adding phome number field to its registration form as in this link
https://docs.themeum.com/tutor-lms/developers/custom-field-on-registration/

I have added dropdown list field that appears on the frontend yet I can’t display the result of this field on the backend and I don’t know what is the alternative code in the profile.php file and user-profile.php metabox file as mentioned for the phone number example on tutor website for the dropdown list field.

Would someone please help me regarding that. I am new to coding.
——-‐———–
For coding I entered this code through code snippet to frontend
if(isset($_POST(‘formSubmit’)))
{
$aUniversities = $_POST(‘formUniversities’);

  if(!isset($aUniversities)) 
  {
    echo("<p>You didn't select any Universities!</p>n");
  } 
  else 
  {
    $nUniversities = count($aUniversities);

    echo("<p>You selected $nUniversities Universities: ");
    for($i=0; $i < $nUniversities; $i++)
    {
      echo($aUniversities($i) . " ");
    }
    echo("</p>");
  }
}

//Then I entered this code in the registration.php file of the the plugin

‘Select your University:

Ahram Canadian University
Misr International University
Other


I tried similarcode on profile.php and user-profile-fields.php (of the metabox) but they don’t seem to work

What is wrong or missing? Kindly advise.

seo – Sitelink search box does not appear on Google after adding JSON-LD SearchAction to my site yesterday

I added the JSON-LD code to my site but search bar did not appear. What is the reason for this? am i doing something wrong?

 <script type="application/ld+json">
        {
        "@context": "https://schema.org",
        "@type": "WebSite",
        "url": "https://www.example.com/",
        "potentialAction": {
        "@type": "SearchAction",
        "target": "https://www.example.com/search?term={search_term_string}",
        "query-input": "required name=search_term_string"
        }
        }
    </script>

sharepoint online – When adding an item programmatically the workflow 2013 will raise access denied

I have defined a workflow which gets fired when adding items on listA. and if i directly add an item inside listA using the UI the workflow will work well. but on listB i have a remote event receiver which programmatically create a list item inside listA.

but when the remote event receiver create an item inside listA, the workflow will raise this error:-

Retrying last request. Next attempt scheduled in less than one minute. Details of last request: HTTP Forbidden to https://****/_api/web/lists(guid'd20db253-4447-4133-99b0-757eee9eb37e')/Items(212)?%24select=ID%2CProjectCurrentUpdate Correlation Id: 4590651d-d586-53c6-9ebc-5db114ddcfbe Instance Id: 1cf54ed9-97ee-4de3-b361-edbef338b249 

Access denied. You do not have permission to perform this action or access this resource. 

certificates – Adding Expect-CT header to HTTP response

In the security test report, I have a recommendation to add Expect-CT header to the HTTP response from web application, additionally developers set this to:

Expect-CT: max-age=0, report-uri=

I am not sure if it is a good idea to add this header. According to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Expect-CT:

“The Expect-CT will likely become obsolete in June 2021. Since May 2018 new certificates are expected to support SCTs by default. Certificates before March 2018 were allowed to have a lifetime of 39 months, those will all be expired in June 2021.”

So because certificates are expected to support SCTs by default I do not think that this header makes any sense.

When it comes to configuration according to https://scotthelme.co.uk/a-new-security-header-expect-ct/ max-age=0, report-uri= means:

“This policy is deployed in report-only mode and if the browser doesn’t receive CT information that it’s happy with, referred to as not being ‘CT Qualified’, rather than terminate the connection it will simply send a report to the specified report-uri value.”

Because I don’t have uri here, the report will not be sent, so there is no additional security at all.

On the other hand I see that some popular websites like Linkedin still use this header, the example from Linkedin:

Expect-CT: max-age=86400, report-uri="https://www.linkedin.com/platform-telemetry/ct"

javascript – Safri browser adding extra hours to my time

I have a datetime2 coming from sql which displays in a template as follows

{{>~formatDateTime(enddate, “dd/MM/yyyy HH:mm”)}}

Which calls the following formatDateTime function

function formatDateTime(dateTime, format)***//the datetime that gets passed in here looks like ("2021-08-01T10:00:40")*** {

    if (dateTime instanceof Date && dateTime.getFullYear() == 2050) {
        return dateTime.format("HH:mm");
    }
    if (!format) {
        format = "dd MMM yyyy";
    }

    if (!(dateTime instanceof Date)) {
        dateTime = new Date(dateTime);
    }

    return dateTime.format(format);
};

in chrome and other browsers it works fine it gives me the datetime as follows 2021/08/01 10:00:40 as it is in sql
but in safari it doesnt give me the same datetime back as in sql it returns 2021/08/01 12:00:40

see the time is different

how can i fix this?

register sidebar – After adding widget the style is messing up

I add a widget area to a wordpress theme but the style is somehow not matching with html
here is the image
before adding widget

enter image description here

after adding widget

enter image description here

functions.php

<?php
//Adding the css and js files
function gt_setup(){
    wp_enqueue_style('google-fonts','https://fonts.googleapis.com/css?family=Roboto|Roboto+Condensed|Roboto+Slab');
    wp_enqueue_style('font-awesome','https://use.fontawesome.com/releases/v5.1.0/css/all.css');
    wp_enqueue_style('style',get_stylesheet_uri());
    // wp_enqueue_script($handle,$src,$deps,$ver,$in_footer);
    wp_enqueue_script('main',get_theme_file_uri('/js/main.js'),NULL,'1.0',true);
}
add_action('wp_enqueue_scripts','gt_setup');

//Adding theme support

function gt_init(){
    add_theme_support( 'post-thumbnails' );
    add_theme_support('title-tag');
    add_theme_support('html5',
     array('comment-list','comment-form','search-form')
     );
    }
add_action('after_setup_theme','gt_init');

//Project post type
function gt_custom_post_type(){
    register_post_type('project',
    array(
     'rewrite'=> array('slug'=>'projects'),
     'labels' => array(
       'name' => 'Projects',
       'singular_name' => 'Project',
       'add_new_item' => 'Add New Project',
       'edit_item' => 'Edit Project'
     ),
     'menu-icon' => 'dashicons-clipboard',
     'public' => true,
     'has_archive' =>true,
     'supports' => array(
       'title' , 'thumbnail' , 'editor' , 'excerpt' , 'comments'
     )
    )
  );
}
add_action('init','gt_custom_post_type');

//remove url field from comment form
 function prefix_disable_comment_url($fields){
     unset($fields('url'));
     return $fields;
 }
 add_filter('comment_form_default_fields','prefix_disable_comment_url');
 //Sidebar
 function gt_widgets(){
     register_sidebar( 
     array(
     'name' => 'Main Sidebar',
     'id' => 'main_sidebar',
     'before_title' => '<h3>',
     'after_title' => '</h3>'
     )
     );

 }
 add_action('widgets_init','gt_widgets');
//Filters
function search_filter($query){
    if($query->is_search()){
        $query->set('post_type',array('post','project'));
    }
}
add_filter('pre_get_posts','search_filter');

//front-page widget
function gt_widgets_init() {

    register_sidebar(
        array(
            'name'          => __( 'Frontpage'),
            'id'            => 'section-source',
            'description'   => __( 'Add widgets here to appear in your frontpage.'),
            'before_widget' => '<section id="section-source">',
            'after_widget'  => '</section>',
            'before_title'  => '<h2 class="section-heading">',
            'after_title'   => '</h2>',
        )
    );

}
add_action( 'widgets_init', 'gt_widgets_init' );


?>

front-page.php

<?php get_header();?>

    <div id="banner">
        <h1>&lt;GTCoding/&gt;</h1>
        <h3>Learn coding from scratch</h3>
    </div>

    <main>
        <a href="<?php echo site_url('/blog');?>">
            <h2 class="section-heading">All Blogs</h2>
        </a>


        <section>
           <?php
        $args =  array(
         'post_type' => 'post',
         'posts_per_page' => 2
        );
        $blogposts = new WP_Query($args);

        while($blogposts->have_posts()){
            $blogposts->the_post();

      ?>
            <div class="card">
                <div class="card-image">
                    <a href="<?php echo the_permalink(); ?>">
                        <img src="https://wordpress.stackexchange.com/<?php echo get_the_post_thumbnail_url(get_the_ID()); ?>" alt="Card Image">
                    </a>
                </div>

                <div class="card-description">
                    <a href="<?php echo the_permalink(); ?>">
                        <h3><?php the_title(); ?></h3>
                    </a>
                    <p>
                       <?php echo wp_trim_words(get_the_excerpt(),30); ?>
                    </p>
                    <a href="<?php echo the_permalink(); ?>" class="btn-readmore">Read more</a>
                </div>
            </div>
          <?php } 
            wp_reset_query(); 
          ?>

        </section>

        <a href="<?php echo site_url('/projects');?>">
            <h2 class="section-heading">All Projects</h2>
        </a>


        <section>
           <?php
            $args =  array(
             'post_type' => 'project',
             'posts_per_page' => 2
            );
            $projects = new WP_Query($args);

            while($projects->have_posts()){
                $projects->the_post();

          ?>
            <div class="card">
                <div class="card-image">
                    <a href="<?php echo the_permalink(); ?>">
                        <img src="https://wordpress.stackexchange.com/<?php echo get_the_post_thumbnail_url(get_the_ID()); ?>" alt="Card Image">
                    </a>
                </div>

                <div class="card-description">
                    <a href="<?php echo the_permalink(); ?>">
                        <h3><?php the_title(); ?></h3>
                    </a>
                    <p>
                       <?php echo wp_trim_words(get_the_excerpt(),30); ?>
                    </p>
                    <a href="<?php echo the_permalink(); ?>" class="btn-readmore">Read more</a>
                </div>
            </div>
          <?php } 
            wp_reset_query(); 
          ?>

        </section>


              <?php 
               dynamic_sidebar( 'Frontpage' ); 
              ?>




      <!-- <h2 class="section-heading">Source Code</h2>

        <section id="section-source">
            <p>
                Lorem ipsum dolor sit amet consectetur adipisicing elit. Rerum neque qui delectus ad dolor blanditiis perferendis praesentium
                consectetur aut sed provident obcaecati aspernatur perspiciatis, dolores nobis pariatur ipsum vel corrupti!
            </p>
            <a href="#" class="btn-readmore">GitHub Profile</a>
        </section>-->

      <?php get_footer();?>

i see a extra div is generated when i inspect element
enter image description here

how i fix this?