How can I prevent the profile photo of a certain user (Gravatar) from being shown to other users in the frontend?

Yes, I need a code for this. Plugin is not an option, I have to use the theme's functions.php file.

Maybe this filter would help:

apply_filters( 'get_avatar', string $avatar, mixed $id_or_email, int $size, string $default, string $alt, array $args )

I have the user ID.

html – How to prevent them from going to another page without being logged in to Django

I have seen other posts, but none resolves my doubts. I am starting in Django and would like to know how to do it. But what I always see is that they do it in conjunction with the Django user system, but how do I do it from a form that queries SQL Server or another SQL?

That is, the user and password consult it from an SQL query, if any, that gives access to the other routes on my site.

Any tutorial? Recommendation? Page?

mysql – How can I prevent the table from being marked as and the last (automatic) repair fail?

This is the second time in the past 4 days that one of the tables in my database has been corrupted. This is the error I saw in my Apache log:

PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE(HY000): General error: 144 Table (TABLE_NAME) is marked as crashed and last (automatic?) repair failed'

I managed to fix it manually using:

myisamchk -r -f $TABLE_NAME

But of course this is not a long-term solution.

I need to understand why this is happening so that I can prevent it from happening again in the future.

  • The total size of the database is 2 GB, 100 tables, 7.5 million rows.
  • The table in which it happened is the largest in the database: 1.2 million rows, 650 MB.
  • Server version: 5.5.50
  • Ubuntu 4/14/1
  • PHP 5.5.9
  • I checked and there was enough free space. So far it has not been an issue about RAM.
  • The host on which the database is located is c3.xlarge (8 GB RAM)

The database is on the server hard drive. I'm thinking of moving it to RDS. I wonder if that would help.

What do you suggest what I should do? Is there a way to analyze MySQL and understand where the problem is?

tls – How does VPN prevent man in the middle at ISP level?

When man-in-the-middle is at the ISP level (or even before ISP), it seems they can do the handshake. Swap keys provide a forged or copied certificate. The only thing you wouldn't know is the private key. But it seems like they are the client for the endpoint server and the server for the victim, they could create two encryption / decryption chains and two shared secrets, and nobody would be wiser. I think I get it wrong because people say that a VPN would protect against it. So the basic question is how an HTTPS website certificate at ISP level protects from people in the middle.

NAmecheap Email – Help us prevent .COM price hikes

We have important information for you that affects the price of your .COM domains.
What's happening?
Last month, ICANN, the domain name monitoring organization, announced significant changes to the contract with Verisign, Inc., which operates the .COM top-level domain (TLD).
ICANN has made these changes in secret without consulting the ICANN community or Internet users or including feedback. Although ICANN has done similar business behind closed doors in the past and ignored unified resistance, we are focused on fighting price increases that will harm our customers (and the Internet as a whole). This is a crucial time to raise our voices .COM domains make up 40% of all domain names registered online,
What does this change mean?
Wholesale registries charge a fixed fee per domain and year for Namecheap. Under this new agreement, Verisign may increase the wholesale price for .COM domain registrars by 8 annually over the next 10 years.
That will mean it Wholesale prices for .COM domains can be more than 70% higher than current prices over the next ten years, The contract also provides for other price increases, which will make it more expensive and ultimately make the availability of .COM domains more difficult and more expensive for everyone.
Why is ICANN doing this?
In addition to these contract changes Verisign agreed to provide ICANN with an additional $ 20 million over five years Initiatives by the ICANN domain name system without any clarity about how ICANN will spend the money or who will ensure that the funds are properly spent on the domain infrastructure.
What can you do to help?
These changes will have a significant impact on the Internet in the coming years, and only ICANN and Verisign have participated in this decision. If you want to make sure your voice is heard, let ICANN know how you feel about their recent decision. The public comment period is open until February 14, 2020.

Javascript – How do I prevent styles added to a data table from disappearing when an event occurs in a page link or column heading?

I use the jquery datatable plugin

I only use the sort and filter functionality, I stylize the data table, the page links, the table and the filters alone.

The problem I have is that the styles I added to the page links disappear when I click on a page link.

I tried to use it! Important so that my styles gain specificity, but it doesn't work and I want to style the data table.

Here is my code, if you click on a page link or column heading, the styles of my page links will be hidden.

How can I ensure that my styles continue to be applied even if the page links or column headers are clicked?

      body {
            display: flex;
            margin: 0;
            padding: 0;
            padding-left: 1rem;
            padding-right: 1rem;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background-color: #ffffff;
            font-family: san-serif;

        .table-box {
            width: 890px;
            height: 400px;
            overflow-y: scroll;
            box-shadow: 0 10px 100px rgba(0, 0, 0, 0.5);
            margin-left: auto;
            margin-right: auto;

        table {
            width: 100%;

        td {
            border: 1px solid #005277;
            border-collapse: collapse;

        tr th:nth-child(1) {
            backround-color: pink;

        th {
            background-color: #1e305b;
            color: white;

        td {
            padding: 10px;

        thead {
            position: sticky;
            top: 0;

        .news-section {
            display: grid;
            grid-template-rows: ""

        .filter-controls-wrapper {
            margin-bottom: 16px;
            display: flex;
            justify-content: flex-end;

        input(type="search") {
            border: 1px solid transparent;
            border-radius: 2rem;
            padding-bottom: 5px;
            padding-left: 16px;
            padding-right: 16px;
            padding-top: 16px;
            padding-bottom: 16px;
            transition: 0.2s border-color ease-in-out;

        * {
            font-family: 'Source Sans Pro', sans-serif;

        label {
            font-size: 24px;

        input(type="search"):focus {
            border-color: navy;


        /*PAgination here*/
        .label-page {
            width: 80px ;
            height: 25px ;
            margin: 0 10px ;
            border-radius: 999px ;
            background: crimson ;
            cursor: pointer;
                0 5px 5px -5px rgba(crimson, 0.15),
                0 10px 10px -5px rgba(crimson, 0.15),
                0 15px 15px -5px rgba(crimson, 0.15),
                0 20px 20px -5px rgba(crimson, 0.15) ;
            transition: 0.25s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            padding: 10px;

            width: 120px;

        .dataTables_paginate {
            margin-top: 16px;
            display: flex;
            justify-content: center;
            align-items: center;
        .dataTables_paginate span{
            display: flex;
            justify-content: center;
            align-items: center;
title options
Tiger Nixon
Garrett Winter
Ashton Cox 6
Cedric Kelly 41
Airi Satou 55
Ashton Cox 6
Tiger Nixon 2

How can I prevent cards from being repeated in the same Anki session?

When I click on "Again" while studying a card, I want it not to be presented again in the same session, even if the session lasts about 10 minutes, which is longer than the shortest repetition time, about 1 minute. (I use Anki 2.1.)

For example, when I enter 100 new cards, I want to be able to open a session and go through all the cards that mark each card as "again," even though I remember most of them well. Close the session and repeat the process one or more times later in the day or the next day before continuing with normal use of Anki. This is what I like to do right from the start, as a kind of informal reminder session or test in which each card is presented exactly once and each card is left at the lowest level for the next session. It is annoying at this point in time when some cards are presented twice or more, as it can take a long time before the last cards are presented to me.

I suppose a workaround would be to set the first learning step longer than the session length, but I was wondering if there is a method that does not require changing the learning step length.

I should add that minutes don't mean a lot to me when it comes to Anki because there is no device that I run on, that I keep on, or that I want Anki to catch my eye, even if it is on. I plan to use Anki a few times a day when I have the opportunity to, and make cards in stacks of about 100 and check those cards a few times as described in the second paragraph before doing Anki leave the distance of repetition.

8 – Prevent the update hook from running until the configuration is imported?

I have added a new field to an existing content type and want to set its default value and all existing nodes of that type.

For this purpose, I added an update hook to my module, which batches nodes of this type and sets the value to true.

If this is done before the configuration import, this will fail because the field does not yet exist.

Is there a way to prevent the update hook from being processed until a specific configuration is imported?

I added this in the update hook, but I'm not sure if that would be effective enough:

if (!$node->hasField('field_show_generic_listing')) {
  throw new UpdateException('Cannot continue - import the latest configuration to add the new field to this node type.');