Spark Structured Streaming StartingOffsets – Stack Overflow

I suspect the startingOffsets are not right . How do i print back to verify the spark structured Streaming options ?

val df = sparkSession
  .readStream
  .format("kafka")
  .option("kafka.bootstrap.servers", "host1:port1,host2:port2")
  .option("subscribe", "topic1")
  .option("startingOffsets", "{"topic1":{"1":100,"0":120}}"
)
 .load()```

Array PHP com foreach – Stack Overflow em Português

Olá, tenho um conjunto de array e queria dar print_r em um dado especifico.

Exemplo do retorno em Array:

Array 
    ( 
        (nro) => 1
        (cnpj) =>  
        (nm) => Teste 
        (id) => 123123
    ) 
Array 
    ( 
        (nro) => 2
        (cnpj) =>  
        (nm) => Teste 
        (id) => 123123 
    ) 
Array 
    ( 
        (nro) => 3
        (cnpj) =>  
        (nm) => Teste 
        (id) => 123123
    ) 

E estou tentando utiliza-lo desta forma, porém sem sucesso só me traz o dado do ultimo array, e gostaria de obter todos os dados do elementos (nm) de todos arrays:

while( $row = sqlsrv_fetch_array( $queryResultado, SQLSRV_FETCH_ASSOC) ) {
        
            $form_select = '<select name="select" id="select" class="form-control">';
            $form_option = "<option value=''></option>";    

            foreach( $row as $item ){                           
                                                    
                    $form_option    .= "<option value='{$item('id')}'>{$item('nm')}</option>";                              
            }
                            
            $form_select .= $form_option;
            $form_select .= '</select>';
}

c – Interpolação linear – Stack Overflow em Português

Obrigado por contribuir com o Stack Overflow em Português!

  • Certifique-se de responder à pergunta. Entre em detalhes sobre a sua solução e compartilhe o que você descobriu.

Mas evite

  • Pedir esclarecimentos ou detalhes sobre outras respostas.
  • Fazer afirmações baseadas apenas na sua opinião; aponte referências ou experiências anteriores.

Para aprender mais, veja nossas dicas sobre como escrever boas respostas.

vba – VB.NET datetimepicker – Stack Overflow

I have a form in which I can choose the date (datetimepicker) and check it in checkbox.

If the user selects and checks the date, data goes to the database.
If the user does not want to mark it, then the database should have a null value.

Instead, the database does not show null, but the default date.

my datetimepicker in database is as null date type.
I can not understand, maybe I should put “if” function in here:

Private Sub RefferalDate_ValueChanged(sender As Object, e As EventArgs)

differential equations – Overflow during computation

The following code display the Predictor-Corrector approach to solve the four dimensional Fractional-Order Delay Differential system,

The below code works fine for some values of $tau$ but it gives an overflow error message for other values of $tau$ for example, when $tau=0.10$ and n=4500(smax=300 in the code) I get error message which says that an overflow occurred during computation.

a1 = 2.1; b1 = 0.01;
c1 = 2.6;
Subscript(m, 1) = 8.4;
Subscript(m, 2) = 6.4;
Subscript(m, 3) = 2.2;
f(t_, x_, y_, z_, w_) := x*(y - a1) + (Subscript(m, 1)* w) + z;
g(t_, x_, y_, z_, w_) := -(b1*y) + (Subscript(m, 2)* w) - x^2 + 1;
d(t_, x_, y_, z_, w_) := -(c1*z) + (Subscript(m, 3)* w) - x;
q(t_, x_, y_, z_, w_) := -x*y*z;
(Alpha) = 0.93;
h = 0.01;
t(0) = 0;
x0 = 2;
y0 = 0;
z0 = -0.2;
w0 = 0.4;
tau = 0.10; nn = Round(tau/h); smax = 300; n = nn*smax;
Do(x(i) = x0; y(i) = y0; z(i) = z0; w(i) = w0;, {i, -nn, 0});
For(k = 1, k <= n, k++, b(k) = k^(Alpha) - (k - 1)^(Alpha); 
  a(k) = -(2*k^((Alpha) + 1)) + (k - 1)^((Alpha) + 1) + (k + 
       1)^((Alpha) + 1););
Do(Do(x1(i) = x(i - nn); y1(i) = y(i - nn);, {i, 0, s*nn}); 
 For(j = (s - 1)*nn + 1, j <= s*nn, j++, t(j) = j*h; 
  p(j) = (h^(Alpha)*
       Sum(b(j - A)*f(A*h, x(A), y1(A), z(A), w(A)), {A, 0, j - 1}))/
     Gamma((Alpha) + 1) + x(0);
  l(j) = (h^(Alpha)*
       Sum(b(j - B)*g(B*h, x1(B), y(B), z(B), w(B)), {B, 0, j - 1}))/
     Gamma((Alpha) + 1) + y(0); 
  r(j) = (h^(Alpha)*
       Sum(b(j - C)*d(C*h, x1(C), y(C), z(C), w(C)), {C, 0, j - 1}))/
     Gamma((Alpha) + 1) + z(0);
  o(j) = (h^(Alpha)*
       Sum(b(j - H)*q(H*h, x(H), y(H), z(H), w(H)), {H, 0, j - 1}))/
     Gamma((Alpha) + 1) + w(0);
  x(j) = (h^(Alpha)*(Sum(
          a(j - K)*f(h*K, x(K), y1(K), z(K), w(K)), {K, 1, j - 1}) + 
         f(h*j, p(j), l(j), r(j), 
          o(j)) + ((j - 1)^((Alpha) + 1) - (-(Alpha) + j - 1)*
             j^(Alpha))*f(0, x(0), y(0), z(0), w(0))))/
     Gamma((Alpha) + 2) + x(0);
  y(j) = (h^(Alpha)*(Sum(
          a(j - F)*g(F*h, x1(F), y(F), z(F), w(F)), {F, 1, j - 1}) + 
         g(h*j, p(j), l(j), r(j), 
          o(j)) + ((j - 1)^((Alpha) + 1) - (-(Alpha) + j - 1)*
             j^(Alpha))*g(0, x(0), y(0), z(0), w(0))))/
     Gamma((Alpha) + 2) + y(0);
  z(j) = (h^(Alpha)*(Sum(
          a(j - G)*d(G*h, x1(G), y(G), z(G), w(G)), {G, 1, j - 1}) + 
         d(h*j, p(j), l(j), r(j), 
          
          o(j)) + ((j - 1)^((Alpha) + 1) - (-(Alpha) + j - 1)*
             j^(Alpha))*d(0, x(0), y(0), z(0), w(0))))/
     Gamma((Alpha) + 2) + z(0);
  w(j) = (h^(Alpha)*(Sum(
          a(j - R)*q(R*h, x1(R), y(R), z(R), w(R)), {R, 1, j - 1}) + 
         q(h*j, p(j), l(j), r(j), 
          o(j)) + ((j - 1)^((Alpha) + 1) - (-(Alpha) + j - 1)*
             j^(Alpha))*q(0, x(0), y(0), z(0), w(0))))/
     Gamma((Alpha) + 2) + w(0););, {s, 1, smax})
lst = Table({t(i), x(i)}, {i, n});
lst1 = Table({x(i), y(i), z(i)}, {i, n});
ListLinePlot(lst, PlotRange -> Full, 
  Frame -> True, PlotLabel -> "(Alpha)=0.93,(Tau)=0.10", 
 FrameStyle -> Black, 
  FrameLabel -> {t, x}, LabelStyle -> Directive(Blue, Bold), 
  PlotStyle -> Purple)
 ListPointPlot3D(lst1, PlotRange -> Full, 
  AxesLabel -> {x, y, z}, PlotLabel -> "(Alpha)=0.93,(Tau)=0.10", 
  LabelStyle -> Directive(Black, Bold, FontFamily -> "Helvetica"), 
  TicksStyle -> Black, PlotStyle -> Purple)

Could anyone please solve this issue.

VSCode GitHub Error – Stack Overflow en español

Ya tengo mi cuenta de GitHub logueada a VSCode, y por más que intento no me funciona el botón de Initialize Repository y si le doy a Publish to Github me crea un repositorio vacio en Github y ya. He tratado con comandos en el terminal pero saltan errores y no hay manera de hacer push, solo me pasa con VSCode con IntellJ y NetBeans no
introducir la descripción de la imagen aquí

network – Do you have to be on the same WIFI for a Buffer Overflow attack to work?

I know how Buffer Overflows work

You have to learn a little more about that…

in order to do them do you have to be on the same WIFI as your victim.

That’s not even close to be correct.

You need to send a packet to a specific device on a specific port.

No, this is normal network traffic.

Therefore, unless port forwarding was enabled on that specific port for that specific device

… you cannot send packets to the destination. And that have nothing to do with a buffer overflow.

how would you exploit a buffer overflow vulnerability if you were on different WIFI?

You use countless other ways, and exploiting a vulnerability on the same WIFI is not the fastest or the easiest way.


A buffer overflow happens when a program copies more data into a buffer than the available space. That data may come from the network, or from a text, or decoding an image. Anything that reads data, no matter from which source, can be vulnerable.

To exploit a buffer overflow without being on the same WIFI network, send an email with a crafted JPG file when the victim uses an outdated email client. Or a special PDF for a vulnerable Adobe Reader application. Or send the victim an USB drive with a LNK file and a special icon. There are lots of ways to exploiting a buffer overflow and the majority of them does not need you to be on the same network.

Javascript Virtual Keyboard Installation – Stack Overflow

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.

How can hackers find buffer overflow without source code?

I am a student in networking, we learn cybersecurity, but we don’t learn buffer overflow vulnerabilities in depth, I understand how it works, but I don’t understand how an hacker can detect this vulnerability. Is that very difficult or can be done easily with some techniques ?

Traducir error laravel Excel – Stack Overflow en español

Estoy haciendo una importación utilizando el paquete de maatwebsite excel, estoy mostrando los errores de validación, pero necesito traducir o cambiar el texto que especifica en que fila esta el error.

introducir la descripción de la imagen aquí

Este esta es mi validacion:

public function rules(): array
{
    return (
        
        'ncf'                       => 'required|min:11',
        'tipo_de_ingreso'           => 'required',
        'fecha_de_comprobante'      => 'required',
        'monto_facturado'           => 'required',
        'itbis_facturado'           => 'required|numeric',
    );
}