php – Al enviar formulario para cargar archivos al servidor el sweetalert se cierra inmediatamente después de dar clic en el botón `btnAgregarArchivo`

Este es el formulario donde se cargan los datos de los archivos al servidor, al dar clic en el botón <input class="image2" type="image" src="../Imagenes/mas.png" id="btnAgregarArchivo" alt="mas"/>

<form id="formArchivos" name="formArchivos" enctype="multipart/form-data" method="post">
      <p class="barra2">
         <input class="miboton2" type="file" name="nuevoArchivo()" id="nuevoArchivo()" multiple=""/>
         <input class="image2" type="image" src="../Imagenes/mas.png" id="btnAgregarArchivo" alt="mas"/>
      </p> 
</form>
        <script src="../../Libreria/Bootstrap4/jquery-3.5.1.min.js"></script>
        <script src="../../Libreria/Bootstrap4/sweetalert.min.js"></script>
        <script src="../js/gestorDocumentos.js"></script>
        <script type="text/javascript">
            $(document).ready(function(){
                $('#btnAgregarArchivo').click(function() {
                    agregarArchivosGestor();
                });
            });
        </script>

Aquí esta la función donde se carga la respuesta del sweetalert.

function agregarArchivosGestor(){
    var formData = new FormData(document.getElementById('formArchivos'));
    $.ajax({
        url: "../../Controlador/Documentos/guardarArchivos.php",
        type: "POST",
        datatype: "html",
        data: formData,
        cache: false,
        contentType: false,
        processData: false,
        success: function(respuesta) {
            console.log(respuesta);
            respuesta = respuesta.trim();
             if(respuesta == 1){
                 swal(":D","Agregado con exito","success");
             } else {
                 swal(":(","Fallo al agregar","error");
             }
        }
    });
}

8 – How do I render a form in a div through a javascript call

I’m trying to load a form into a div using a javascript call. I can get the form in the div, but nothing works (autocomplete fields, wysiwyg fields, custom submit handler).

I know I must be missing something, but I can’t figure out what it is.

What I have now to get the form:

$form = Drupal::formBuilder()->getForm('Drupalmy_moduleFormMyForm');
$renderable = (
   '#theme' => 'my_form',
   '#form' => $form,
);
$rendered = Drupal::service('renderer')->renderPlain($renderable);

$response = new AjaxResponse();
$response->setData($rendered);
return $response;

I’ve also tried renderRoot instead of renderPlain, but to no avail.

The twig file looks like this (very simple):

<div id="form-container">
    {% include 'header.html.twig' with {
        type : 'manual'
    } %}
    <div class="content">
        {{ form }}
    </div>
</div>

Any help will be greatly appreciated.

reference request – Band limited initial data : regularity for Navier–Stokes equation defined on a torus $mathbb{T}^m$

Consider the Navier–Stokes equation and the Euler equation defined on a torus (periodic solutions).
Let the dimensionality of the space $mathbb{T}^m$ be $mge 3$.

Link to the problem (paper “Existence and smoothness of the Navier–Stokes equation” by C. Fefferman).

Has it been investigated partially or conclusively, the regularity of the solutions when the initial data $u_0(x) = u(x,0)$ is a trigonometric polynomial of a certain degree?

References to any closely related research is also appreciated.

Design an ASP.NET Core app with Azure Data Warehouse

For my company, I have to explore existing apps and architectures for an azure app.
My requirements are to use C#, ASP.NET Core, and Azure.

The datas are provided by an internet app (which follows the above requirements) which downloads CSV files in some classes. I am rather sure it will be done like this so far.
Then, I would like to transfer it to an Azure Synapse Analytics (formerly Azure Data Warehouse).
Initially, I thought to use an ETL (for example SSIS), but is this absolutely necessary?
Indeed, I saw that I could save my datas to an Azure SQL database, and then export this to the DataWarehouse, using either SqlBulkCopy(in C#, which is good), or PolyBase. Is PolyBase a reliable tool in my case?
After all this, I will use an OLAP Cube but that’s an other story.

java – Extract a files in directory from war archive using ansible unarchive

I’d like to extract two files in directory from war.

the two files ]application.properties and logback.xml] are exists in this path /WEB-INF/classes/

For ansible I’ve tried:

- name: create application.propreties in /tmp
  unarchive:
    src: "/opt/application/../tomcat/00/webapps/application.war"
    dest: "/tmp"
    remote_src: yes
    extra_opts:
      - '/WEB-INF/classes/application.properties'
      - '/WEB-INF/classes/logback.xml'

But it doesn’t work of course. Any idea?

M2 Composer Update Abandoned Projects // ” Package XX is abandoned, you should avoid using it”

So when running composer update we are seeing more and more of “abandoned” projects. However we did not manually add this code in composer, it is often a dependency of some other program.

Question:

  • How can we find out which extension this package depends on?
  • Would we be able to update to the suggested packages for example container-interop/container-interop to psr/container manually or is this too risky?
    Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/container instead.
    Package facebook/webdriver is abandoned, you should avoid using it. Use php-webdriver/webdriver instead.
    Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
    Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
    Package sebastian/finder-facade is abandoned, you should avoid using it. No replacement was suggested.
    Package setasign/fpdi-fpdf is abandoned, you should avoid using it. No replacement was suggested.

mysql – Query para retornar quantidade minima de valores “diferentes”

Tenho uma tabela chamada clientes e essa tabela tem uma coluna status que pode ter +/- 3 tipos (novo, cancelado, pendente...)

preciso exibir uma quantidade de informações separadas por status, e ao invés de fazer isso com 3 queries, sendo um where para cada status, gostaria de saber se é possível numa só query retornar os 3 status com uma quantidade minima de cada um deles:

Exemplo atual:

Cliente::where('status', 'novo')->take(20)->get();
Cliente::where('status', 'cancelado')->take(20)->get();
Cliente::where('status', 'pendente')->take(20)->get();

é possível, em uma só query, retornar 20 resultados para cada status diferente?

dnd 5e – If the target of a Scrying spell succeeds on the saving throw against the spell, who is prevented from using the spell on them for the next 24 hours?

The description of the scrying spell states in part that:

On a successful save, the target isn’t affected, and you can’t use
this spell against it again for 24 hours.

However, this seems a bit ambiguous. Is only that character unable to use the spell on that target for 24 hours? Or can no one in the party use it on the target during that time? Does the source of the scrying matter?

For instance, consider a party that has a scrying eye homebrew magic item. A scrying eye is an item that allows a person to cast the scrying spell for up to ten minutes with a spell save DC of 15. It can only be used once per day, and then cannot be used again until the next dawn.

My homebrew scrying eye item is based off the official crystal ball magic item:

The typical crystal ball, a very rare item, is about 6 inches in diameter. While touching it, you can cast the scrying spell (save DC 15) with it.

I have lowered the spell save DC from the original to account for my item not requiring attunement.

The party has 2 spellcasters who both know the scrying spell.

If player A uses the scrying eye and fails, can they then cast scrying themselves again, as it is in effect the item that cast the spell and not the player? Can player B also attempt to cast scrying?

display – iMAC 18,3 with dual external 5K monitor

I would like to run a iMac 18,3 (Radeon Pro 580, i7 4.2 GHz) with two external 5K monitors (LG 27″ 27MD5KL).

Unfortunately, the iMAC 18,3 only supports one external 5K monitor (https://support.apple.com/kb/SP760?viewlocale=en_US&locale=de_DE)

Is there anything I could do to run two external 5K monitors? E.g. replace the iMac’s graphic card or use an eGPU?