javascript – Como crear Boton que muestre día de la semana, correspondiente a fecha seleccionada en Input Type Date

Hola necesito crear un boton que muestre el día de semana y que se corresponda con la fecha seleccionada a partir de un input type date, estoy usando este código pero no doy con la solución. Soy nueva en este mundo y comenzando en Java. No logro ni siquiera un botón que muestre la fecha. No se que estoy haciendo mal.

<html>
      <head>
          <script type="text/javascript">


function mostrardiasemana(){ 
var d=new Date(document.getElementById("fecha").value);
d.setDate(d.getDay() + 1);

var dia=new Array(7);
dia(0)="Domingo";
dia(1)="Lunes";
dia(2)="Martes";
dia(3)="Miércoles";
dia(4)="Jueves";
dia(5)="Viernes";
dia(6)="Sábado";
var n= dia(d.getDay());
document.getElementById("fecha").innerHTML=n;


alert("La fecha seleccionada en el elemento fecha es un:" + n)}

 
   </script>
</head>
      <body>
                <form>
<p> Fecha de la Encuesta </p>
                <input type="date" id="fecha" name="fecha" min="2019-01-01"
                  max="2021-12-31" value="2019-01-01"/> 
 <button class="botonera" value="Mostrar Dia Semana" onclick="mostrardiasemana"> Mostrar <br/> Día Semana </button>

</form>
       </body>
       </html>

magento2 – Google recapcha wrong type with configuration

In my env.php I have setup the recapcha key for the v2 invisible type

        'recaptcha_backend' => [
            'type_recaptcha' => [
                'public_key' => null,
                'private_key' => null
            ],
            'type_invisible' => [
                'public_key' => 'myPlublicKey',
                'private_key' => 'myPrivateKey'
            ],
            'type_recaptcha_v3' => [
                'public_key' => null,
                'private_key' => null
            ]
        ],
        'recaptcha_frontend' => [
            'type_recaptcha' => [
                'public_key' => null,
                'private_key' => null
            ],
            'type_invisible' => [
                'public_key' => 'myPlublicKey',
                'private_key' => 'myPrivateKey'
            ],
            'type_recaptcha_v3' => [
                'public_key' => null,
                'private_key' => null
            ]
        ]

As a result in the admin recaptcha admin panel the fields remains empty except for v2 invisible as expected. This part seems to be fine.

enter image description here

Then, In my config.php I want to say to the recaptcha frontend to activate the capcha under the contact us page

        'recaptcha_frontend' => [
            'type_for' => [
                'contact' => true,
                'customer_login' => null,
                'customer_forgot_password' => null,
                'customer_create' => null,
                'customer_edit' => null,
                'newsletter' => null,
                'paypal_payflowpro' => null,
                'product_review' => null,
                'sendfriend' => null,
            ]

But after that…when I check what I have in my contact input field…it’s the v3 invisible type instead of the v2 one. I’m a little bit confused about it.

enter image description here

nodes – Clip sites to a specific content type

I’m searching for a possibility to clip websites to Drupal much like the Clipper Chrome extension for Notion or Evernote.

In Notion, it lets me add Youtube videos to any database, takes the page title, the platform icon, the thumbnail, the URL and embeds the video to a new entry in my database. I would like to do the same with Drupal and expend on the data which is clipped like getting the channel and create a relation from one content type to another.

entities – Clip (web)sites to a specific content type in drupal

i’m searching for a possibility to clip websites to drupal much like the “Clipper” chrome extensions for notion or evernote? (https://chrome.google.com/webstore/detail/save-to-notion/ldmmifpegigmeammaeckplhnjbbpccmm?hl=de)

In notion it lets me add youtube videos to any database, takes the page title, the platform icon, the thumnail, the url and embeds the video to a new entry in my database. I would like to do the same with drupal and expend on the data which is clipped like getting the channel and create a relation from one content type to another.

content type – How do I make fields for documents but not the doc set they reside in?

I need to be able to create document sets where each document with the doc set has a required field, without requiring that that field be required when the doc set is created.

When I click on “+ New” in our document library, the only option is to create a new document set. This is how we want it, but at the Doc Set level, we only care about a location and borrower name as seen in the following image:
Required Fields for Document Set

Once we click save, however we need to have a required column (called “Borrower Doc Type”) that ensures users designate what type of borrower document they’re uploading to the document set. This is a Choice column that will be different for each document with in the doc set. We have tried the following:

  • adding the custom “Borrower Doc Type” column to the Doc Set as required – This makes it so that the user is prompted to add the “Borrower Doc Type” when the doc set is created, but that is wrong because there is no single Doc Type that applies to the entire Document Set. We just need to know the document type of the files added to the doc set.
  • adding the custom “Borrower Doc Type” column to the document library – This ensures that the user doesn’t have to enter the Borrower Doc Type when the document set is created, but it does not make the column required for documents uploaded to the document set.

We’re using SharePoint Online via Office365. I feel like I’m running around in circles trying to figure this out, but I’m positive it should be a simple solution.

content type – Hot do I make fields for documents but not the doc set they reside in?

I need to be able to create document sets where each document with the doc set has a required field, without requiring that that field be required when the doc set is created.

When I click on “+ New” in our document library, the only option is to create a new document set. This is how we want it, but at the Doc Set level, we only care about a location and borrower name as seen in the following image:
Required Fields for Document Set

Once we click save, however we need to have a required column (called “Borrower Doc Type”) that ensures users designate what type of borrower document they’re uploading to the document set. This is a Choice column that will be different for each document with in the doc set. We have tried the following:

  • adding the custom “Borrower Doc Type” column to the Doc Set as required – This makes it so that the user is prompted to add the “Borrower Doc Type” when the doc set is created, but that is wrong because there is no single Doc Type that applies to the entire Document Set. We just need to know the document type of the files added to the doc set.
  • adding the custom “Borrower Doc Type” column to the document library – This ensures that the user doesn’t have to enter the Borrower Doc Type when the document set is created, but it does not make the column required for documents uploaded to the document set.

We’re using SharePoint Online via Office365. I feel like I’m running around in circles trying to figure this out, but I’m positive it should be a simple solution.

Why the change in visa type from Visa to Entry Clearance and the reduced validity from 2 years to 6 months

In 2018 I applied for UK standard visitors Visa and was successfully issued 2-year with Visa which has the resemblance of the schengen Visa. In 2021 I applied for another 2-year visa and instead I got Entry Clearance Visa and for only 6 months. Why the change in visa type and the reduced validity time. Can I get refunded for the difference in visa fees of 2 years (GBP390) to 6 months visa (GBP 95).

linux – Is there any way to understand what type of server downtime I am facing?

I have a remote server with no physical attendance 24×7. But sometimes I have faced a downtime due to either network related issues or power outages.

But because I am sitting afar from my server I am unable to determine whether it is a loss of processing time due to power outage or is it a network related disconnection. As a result in both the cases I simply can’t do SSH into my server.

Is there a way I can figure out what type of downtime I am facing? For instance there could be an application that sends me an SMS alert in case of network downtime. But still it would need internet I guess to work..

Any suggestions would help on this.

7 – Field type where big data is not loaded into memory if not needed

Background

Normally when an entity is loaded in D7, the ‘field_attach_load’ step will load all the data from fields into the entity object.

The field_sql_storage_field_storage_load() loads the data from all columns by default.

On a page with a view, this could happen for many entities.

Use case

We want to create a field to be used for very long html.

This content should only be loaded on specific pages where this html is actually being displayed.

Problem

We want to avoid the big html from being loaded into memory in the field_attach_load step, to avoid memory problems.

Solutions considered so far

I think we would need a custom field type with its own loading logic.
I have not found any contrib solutions yet.

The obstacle seems to be the default field_attach_load logic, which always loads all the columns from the field table. I don’t see a way around that.

We could store the data in a separate table, but this would need babysitting to keep the extra table in sync with the field table.

txt record – Multicast DNS Name conflict detected of type 16(TXT queries)

I am working on OPC UA discovery mechanisms, and currently stuck at the middle of an issue.
I am having a LDS server capable of mDNS(port 4840). I have another data server running on port 4841 which also has mDNS enabled. Both the servers advertise their services using mDNS records.

As per theory and the specification document, for the data server to be discoverable in the client, it should register to the LDS.
Now if I deregister the data server/shut it down, I see SRV,PTR packets with TTL=0 in the wireshark trace. However,I dont see any TXT queries with TTL=0, as a result the server details are not removed completely.

The server code was implemented by the open62541 stack, which basically uses the mDNSD library to build the code on.
However, how do I make sure that the TTL=0 packet is seen for TXT queries as well so that it will force a complete deregistration.
Otherwise while i register again for a specific requirement, I would see an error like :
Multicast DNS Name conflict detected of type 16(TXT queries)

Please let me know.

Regards,
Rak