## Plotting a vector field from spherical coordinates

I am trying to plot an integral that is in spherical coordinates, but I am a bit lost. I think that my only issue is converting to cartesian, everything I have seen on how to do this has gone a bit over my head. Here is my code (sorry about the formatting):

$$\vec{E}=\sigma k \int_0^R\int_0^{2\pi}[\frac{(r\sin\theta\cos\phi-r’\cos\phi’)\textbf{i} +(r\sin\theta\sin\phi-r’\sin\phi’)\textbf{j}+(r\cos\theta)\textbf{k}}{(r^2+r’^2-2rr’\cos\phi\cos\phi’\sin\theta-2rr’\sin\theta\sin\phi\sin\phi’)^{3/2}}]r’d\phi’dr’$$

\[ScriptR][\[Phi]_, r_, \[Theta]_, \[Phi]1_,     r1_] := {r*Sin[\[Theta]]*Cos[\[Phi]] - r1*Cos[\[Phi]1],     r*Sin[\[Theta]]*Sin[\[Phi]] - r1*Sin[\[Phi]1], r*Cos[\[Theta]]};  \[ScriptR]Norm[\[Phi]_, r_, \[Theta]_, \[Phi]1_, r1_] :=    Sqrt[(r*Sin[\[Theta]]*Cos[\[Phi]] -          r1*Cos[\[Phi]1])^2 + (r*Sin[\[Theta]]*Sin[\[Phi]] -          r1*Sin[\[Phi]1])^2 + (r*Cos[\[Theta]])^2] // Simplify;  ele[\[Phi]_?NumericQ, r_?NumericQ, \[Theta]_?NumericQ] := \[Sigma]*k*    NIntegrate[(\[ScriptR][\[Phi], r, \[Theta], \[Phi]1,          r1]/\[ScriptR]Norm[\[Phi], r, \[Theta], \[Phi]1, r1]^3)*      r1, {\[Phi]1, 0, 2*\[Pi]}, {r1, 0, R}];  VectorPlot3D[  ele[\[Phi], r, \[Theta]] /. {\[Sigma] -> 200, k -> 9*10^9, R -> 0.5,     r*Sin[\[Theta]]*Cos[\[Phi]] -> x, r*Sin[\[Theta]]*Sin[\[Phi]] -> y,     r*Cos[\[Theta]] -> z}, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}] 

I am worried part of my issue is in the function that I made, but I am most certain that calling replace all like this is not a viable way to transform coordinates.

Edit: added the integral I am trying to solve. The [ScriptR] is the vector in the numerator, and [ScriptR]Norm is the cube root of the denominator

## How to count field with multiple values in MYSQL

I have a MySQL database and Table1 has a column that can get four distinct values e.g 1,2,3,4. Is it possible to create one query to count 4s and all the other values together?

For example

     column1 row1    1 row1    4 row1    2 row1    4 row1    3 

should produce 2 and 3, two 4s and the rest values.

## what’s the field before ssh-rsa in know_hosts on Raspbian GNU/Linux 9 (stretch)

ssh-gen by default creates a public key like

ssh-rsa AAAAB3NzaC1yc2E…6OEBTVwLRP1Ocyr user@DESKTOP-8BL3U5O

The Raspbian 9 has a different format

What is the field before ssh-rsa. How to generate it so id_rsa.pub can be inserted into know_hosts?

## How can I change field values of posts before displaying

I have wordpress project with woocommerce. What I’m trying to achieve is to change values before displaying them on the view page.

For example depending on session/cookie I want to change the language of post title and content

Using the hooks the_title, the_content I was able to achieve it. The problem is when I try to do the same for the_excerpt hook, it’s just never called.

Relevant code from functions.php :

add_filter('the_title', 'custom_lang_title');  function custom_lang_title($title){ if($  otherlang){         return get_field('lang_title');     }else{         return $title; } } add_filter('the_content', 'custom_lang_desc'); function custom_lang_desc($  content){     if($otherlang){ return get_field('lang_content'); }else{ return$  content;     } }   //The code below does not work  add_filter('the_excerpt', 'custom_lang_excerpt');  function custom_lang_excerpt($desc){ if($  otherlang){         return get_field('lang_excerpt');     }else{         return $desc; } }  I’m completely new to wordpress, so if don’t really know what other info can be helpful. I can provide more info on request. ## Which messages are included in (D)TLS Finished message’s verify_data field for session resumption The https://tools.ietf.org/html/rfc5246#section-7.4.9 states which messages are included for PRF computation that is included in Finished messages It is clear for ‘regular’ (initial) handshake But assume that the client wants to resume the DTLS session Client sends the ClientHello with previous SessionID field The server responds with ServerHello, sends ChangeCipherSpec (not included for verify_data computation) and Finished Which messages should be included for verify_data field computation in Finished message sent from server? A. Should it be only the most recent (resuming) ClientHello and ServerHello B. Should it be the most recent (resuming) ClientHello and ServerHello plus previous (initial in our example) handshake messages? Originally asked: https://crypto.stackexchange.com/questions/77016/which-messages-are-included-in-dtls-finished-messages-verify-data-field-for-s but I’m unsure which forum it belongs to ## How to calculate the cache index and the tag field? “For a memory organization with 2GB of main memory, 32K cache size, and cache organized as 8-byte-blocks, directed mapped: Suppose you have an access to memory address 0x0005B432. What is the cache index? What is the tag field?” Please help me, I don’t know how I am supposed to solve this exercise. Also I need to find the cache index and the tag field of following memory addresses: 0x0005B436 0x0005B438 0x0003B437 ## disable (read only) a field if within a custom post type name I have two bidirectional fields ‘album_band’ in two different custom post types ‘album’ and ‘band’. this field allow multiple selection and is mandatory in ‘album’ I’ve been trying to disable or set it as ‘read only’ this field in one custom type ‘band’ (backend side) to avoid empty value in ‘album’ but without success many thanks for your help ## How to access repeater field of a custom field? I have a custom post type called donation_group it has a custom_field called donate_pages which is a repeater field. This donate_pages has again fields called donation_object and amount_received. I want to access these custom fields in my controller ie php file. This is the code I have tried so far $  donation_group_posts = Timber::get_posts(array(         'post_type' => 'donation_group'     ));      foreach ( $donation_group_posts as$  dg_post ) {         $dg_donate_pages =$  dg_post -> donate_pages;         echo "dg_donate_pages", \$  dg_donate_pages;     } 

When I echo dg_donate_pages, I am only getting the number of rows that repeater field has. How can I get its values?

## Why is there no tag for finite field?

I’ve seen a few questions at stack overflow related to finite field, which seem like they belong here, since they are questions about algorithms and/or implementations which are not language specific and could refer to software and/or hardware implementation.

However there is a tag for finite fields at

https://math.stackexchange.com

so perhaps finite field related questions should go there?