real analysis: shows each continuous function $ f $ in $[a,b]$ is the uniform limit of a sequence of polynomials $ (q_ {n}) $, where $ q_ {n} (x) = x ^ {n} p_ {n} (x) $

Yes $ 0 notin (a, b) $, show that each function continues $ f $ in $ (a, b) $ is the uniform limit of a sequence of polynomials $ (q_ {n}) $, where $ q_ {n} (x) = x ^ {n} p_ {n} (x) $ for polynomials $ p_ {n} $.

A solution for this question was presented (Show that each function continues in a closed interval is the uniform limit of a sequence of polynomials), but I worked with my teacher and he provided me with a different solution, but I am trying to understand the thinking behind mainly The initial steps.

Solution:

1) Define: $$ F (x) = Bigg { begin {array} {11}
f (x), y x in (a, b) \
frac {f (a)} {a} (x-a) + f (a) & x in (0, a)
end {array} $$

2) According to the Weirstrauss approximation theorem (not Stone – Weirstrauss, but the simplest version). There is a polynomial $ p_ {n} (x) a F (x) $ evenly in $ (0, b) $.

3) Define polynomial $ q_ {n} (x) = p_ {n} (x) – p_ {n} (0) $. Note: $ p_ {n} (0) a 0 = f (0). $

4) Therefore: $$ | q_ {n} (x) – f (x) | _ { infty} = sup_ {x in (a, b)} | q_ {n} (x) – f (x) | leq sup_ {x in (a, b)} | q_ {n} (x) – F (x) | leq sup_ {x in (a, b)} | p_ {n} (x) – F (x) | + | p_ {n} (0) | < frac { epsilon} {2} + frac { epsilon} {2} = epsilon $$

5) Therefore, we show that $ q_ {n} (x) to f (x) $ uniformly and in particular this means $ q_ {n} (0) = 0 $. So, according to the fundamental theorem of algebra, this implies $ q_ {n} (x) $ it's the way $ q_ {n} (x) = x ^ g (x) $, for some polynomials $ g (x) $.

Thoughts:
I am working hard to try to raise my mathematical thinking. As such, I have some questions about the process my teacher went through:

1) Where did the idea of ​​defining this new function come from? $ F (x) $ comes from? He mentioned that he wanted to create an extension and I vaguely understand what it meant, but I don't see how he came to that conclusion. As in "we have our function $ f (x) $ and for Weirstrauss there is a sequence of approximate polynomials … "This is what went through my mind, but he obviously knew how to extrapolate even more from that.

3) Why define the polynomial? $ q_ {n} (x) $ in the way it was done? What was the impetus for this movement?

5) I see how the FTA can be applied at this stage, but I would never have thought to show the uniform convergence in this fashipn and then draw the conclusion that was drawn. It is as if he knew that this should be the process to arrive at the result before even solving the problem.

These things are tormenting my brain, because I didn't have a written solution beforehand and just noted that the question took about 15 minutes and solved it. I was working hard for a day and made no progress. What kind of questions should I ask myself between each step to improve my problem-solving / test writing skill set?

plotting – Riemann leaves of the logarithm function

I am using Michael Trott's codes to visualize the Riemann Logarithm sheets:

Import["http://www.mathematicaguidebooks.org/V6/downloads/
RiemannSurfacePlot3D.m"]
rsurf[func_] := 
Grid[{{RiemannSurfacePlot3D[w == func, Re[w], {z, w}, 
ImageSize -> 400, 
Coloring -> Hue[Rescale[ArcTan[1.4 Im[w]], {-Pi/2, Pi/2}]], 
PlotPoints -> {40, 40}, Boxed -> False], 
RiemannSurfacePlot3D[w == func, Im[w], {z, w}, ImageSize -> 400, 
Coloring -> Hue[Rescale[ArcTan[1.4 Re[w]], {-Pi/2, Pi/2}]], 
PlotPoints -> {40, 40}, Boxed -> False]}}];


rsurf /@ {Log[z]}

However, the code produces two images:

enter the description of the image here

enter the description of the image here

The first is the correct sheets of the Logarithm function. What does the second image represent?

python – Apply column function

I want to perform a random forrest, but before that I want to convert data into numeric fields. Three variables have "T" or "N". To do that, I created a function, however, there is still some problem. Could you help me please?

d = {& # 39; Y & # 39 ;: 1, & # 39; N & # 39 ;: 0}

data = dane.apply (lambda x: x.map (d) if x.values ​​== & # 39; Y & # 39; or x.values ​​== & # 39; N & # 39; else x, axis = 0)

It's wrong ?
Thanks in advance,

How does the standard deviation of the exact w.r.t function work while setting the splunk alert?

I've been trying to set up an alert to see the increase in traffic in terms of standard deviation
I am setting the upper limit as follows:

upperBound = (avg + stdev * exact (4)).

However, I can't understand what avg + stdev meansExact mean (4) in terms of point and deviation? What will be the peak in traffic if I write as (avg + stdevexact (4))?

Therefore, how are the following different? and what should i choose

avg + stdev * exact (5))

avg + stdev * exact (4))

avg + stdev * exact (3))

avg + stdev * exact (2))

How to verify a deprecated function or not in a custom module?

I created a custom module in drupal 8 for a specific purpose.

Is there a tool to evaluate my custom module that contains obsolete functions?

Best practice: remove the function module before regenerating?

Since the functions will not delete existing files (if you delete the last component referenced in an .inc file), what is the recommended way to clean the function module folder just before clicking on the " Generate function "?

c – How to replace the cubeSgemm function with higher row maltlication

I am working with OpenPose version 1.2. I replaced the cublasSgemm function with my code. But when I run I got the wrong result. Please show me what my problem is
This is the code

void caffe_gpu_gemm(const CBLAS_TRANSPOSE TransA,
const CBLAS_TRANSPOSE TransB, const int M, const int N, const int K,
const float alpha, const float* A, const float* B, const float beta,
float* C) {
  // Note that cublas follows fortran order.
  int lda = (TransA == CblasNoTrans) ? K : M;
  int ldb = (TransB == CblasNoTrans) ? N : K;
  cublasOperation_t cuTransA =
      (TransA == CblasNoTrans) ? CUBLAS_OP_N : CUBLAS_OP_T;
  cublasOperation_t cuTransB =
      (TransB == CblasNoTrans) ? CUBLAS_OP_N : CUBLAS_OP_T;
  // here is the cublasSgemm that I replaced
  //CUBLAS_CHECK(cublasSgemm(Caffe::cublas_handle(), cuTransB, cuTransA,
  //   N, M, K, &alpha, B, ldb, A, lda, &beta, C, N));  
  //cudaDeviceSynchronize();

  float* A_cpu = (float *)malloc(M*K*sizeof(float));
  float* B_cpu = (float *)malloc(K*N*sizeof (float));
  float* C_cpu = (float *)malloc (M*N*sizeof (float));
  float * D_cpu = (float *)malloc (M*N*sizeof (float));
  cudaMemcpy( A_cpu, A, M*K, cudaMemcpyDeviceToHost);
  cudaMemcpy( B_cpu, B, K*N, cudaMemcpyDeviceToHost);
  cudaMemcpy( D_cpu, C, M*N, cudaMemcpyDeviceToHost);

  for (int i =0; i

My environment
Ubuntu 16
Cuda 8.0
OpenPose version 1.2

Nor can I try to directly print the value of the pointer A, B in the caffe_gpu_gemm function. I believe that this data was processed in GPU mode and found a cuda environment. Please show me two problems:
1. How can I print the value of pointer A, B?
2. What is the problem with my major row multiplication when I replaced the cubeSgemm functions?

Best practice: remove the function module before regenerating? (D7)

Since the functions will not delete existing files (if you delete the last component referenced in an .inc file), what is the recommended way to clean the function module folder just before clicking on the " Generate function "?

php – "Very few arguments to work" Receive Id as a parameter in a function – Laravel

I have two tables (user table and registered user table), the information is displayed on a form, with a shipment, I pass the information from the user table to the registered user table, but I am trying to update and create in the same function.

The update will add the value 1 in the "Status" column (means that it has been added to registered users).

In creating, I pass the data from the user table and copy it to the registered user table.

The creation method works without errors, the problem and when it reaches the update method, the following error appears

Very few arguments to work App Http Controllers userRegisteredController :: add (), 2 past and exactly 3 expected

Call to action function:

@csrf @method('post')

my controller:

    use Appusuario;

public function adicionar(usuarioResgistro $model, usuarioRegistroRequest $request, $id)
{   

    $model->create($request->all());

    $modelDiscovery = objectDiscovery::whereId($id)
    ->update((
        'status' => 0
    ));

    Alert::toast('Descoberta adicionada com sucesso!', 'success');
    return redirect()->back();
}

plsql – Function to trigger a JSON in PL / SQL

Good morning, could you help me with an orientation to formulate or create a function in PL / SQL that triggers a JSON that comes as follows Ex: {Status: ERROR, Id: 0, Message: There is an open case for the victim , with the same classification (Process, Application and Condition). The case cannot be created.}
The idea is to remove the chains that are in front of the colon ":",
I have created a query that does, but I would like to implement it in a function. I am new to the world of PL language.

SELECT substr ('{Status: MASS ERROR, Id: 0, Message: There is an open case for the victim}',
        INSTR ('{Status: MASS ERROR, Id: 0, Message: There is an open case for the victim}', 'Status:') + 7, —> Bring the string after 'Status:'
        instr (substr ('{Status: MASS ERROR, Id: 0, Message: There is an open case for the victim}',
         INSTR ('{Status: MASS ERROR, Id: 0, Message: There is an open case for the victim}', 'Status:') + 7), 'Id:') – 2
              ) STATE,

   substr('{Estado:ERROR MASIVO,Id:0,Mensaje:Existe un caso abierto para la victima}',
    INSTR('{Estado:ERROR MASIVO,Id:0,Mensaje:Existe un caso abierto para la victima}','Id:')+3,
    instr(substr('{Estado:ERROR MASIVO,Id:0,Mensaje:Existe un caso abierto para la victima}',
     INSTR('{Estado:ERROR MASIVO,Id:0,Mensaje:Existe un caso abierto para la victima}','Id:')+3),'Mensaje:')-2
          ) ID,
    REPLACE(substr('{Estado:ERROR MASIVO,Id:0,Mensaje:Existe un caso abierto para la victima}',
    INSTR('{Estado:ERROR MASIVO,Id:0,Mensaje:Existe un caso abierto para la victima}','Mensaje:')+8
    ),'}','') mensaje           

FROM dual;

Thank you.