I am very new to Drupal. My project requires me to create a custom module. I am working with Headless Drupal and I want to make a POST request. I cannot pass the POSTMAN Body to my Request argument in my custom POST request. This is my routing.yml file dashboardmodule.post:  path: '/dashboardmodule/post'  defaults: { _controller: '\Drupal\dashboardmodule\Controller\ApiController::post' }  methods:  'POST'  requirements:   _access: 'TRUE'  This is what I have tried in my Controller -   public function post(Request $request) {    if ( strpos( $request-&gt;headers-&gt;get( 'Content-Type' ), 'application/json' )  ===  0) {     $data = json_decode( $request-&gt;getContent(), TRUE );     $request-&gt;request-&gt;replace( is_array( $data ) ? $data : [] );    }    $response['message'] = 'Post request successful';   $response['body'] = $request;   return new JsonResponse( $response );  }  In POSTMAN, I have Content-Type and X-CSRF-Token Header and I have a request body. How to successfully pass that data into my post method? Am I missing something? Any help would be appreciated!
I ajaxly call a route and pass data to it, In my controller, I want to get $_POST['var'] , $_POST['var2'], it seems because of using HttpFoundation in drupal 8, $_POST and $_GET are not exists in old method, How I can access $_POST parameters in custom Controller?
Input field for decimal property My VF tags:  &lt;apex:column &gt;     &lt;apex:facet name="header"&gt;Sales Price&lt;/apex:facet&gt;     &lt;apex:inputText value="{!prod.SalesPrice}"/&gt;     &lt;/apex:column&gt;   Controller code:  public string SalesPrice{get; set;} oli.UnitPrice =decimal.valueOf(pi.SalesPrice);   It works when a user insert 15 and 15.00 but it doesn´t with 15,00(comma).  I m using apex:inputText linked to a controller apex property because apex:inputfield is not allowed.  I´ve tried with apex:input with type=number but it doesn´t look good, (small button to increase/decrease inserted value). Is there another Visualforce tag that i can use with a property? Is the only solution to replace comma with dot in the controller? Create Generic method constraining T to an Enum Entire function with vanishing derivatives? Let $f:\mathbb{C}\rightarrow\mathbb{C}$ be an entire function. And assume that at each point, one of it's derivatives vanishes.  What can you say about $f$?  A hint suggests that $f$ must be a polynomial. Show that the sequence $a_{n+1}=a_{n}+\dfrac{a^2_{n}}{n^2}$ is upper bounded Let $\{a_{n}\}$ be defined with $a_{1}\in(0,1)$, and  $$a_{n+1}=a_{n}+\dfrac{a^2_{n}}{n^2}$$ for all $n\gt 0$.  Show that the sequence is  upper bounded.  My idea: since  $$a_{n+1}=a_{n}\left(1+\dfrac{a_{n}}{n^2}\right)$$ then $$\dfrac{1}{a_{n+1}}=\dfrac{1}{a_{n}}-\dfrac{1}{a_{n}+n^2}$$ then $$\dfrac{1}{a_{n}}-\dfrac{1}{a_{n+1}}=\dfrac{1}{a_{n}+n^2}$$ so $$\dfrac{1}{a_{1}}-\dfrac{1}{a_{n+1}}=\sum_{i=1}^{n}\dfrac{1}{a_{i}+i^2}$$ since $$a_{n+1}&gt;a_{n}\Longrightarrow \dfrac{1}{a_{i}+i^2}&lt;\dfrac{1}{a_{1}+i^2}$$ so $$\dfrac{1}{a_{n+1}}&gt;\dfrac{1}{a_{1}}-\left(\dfrac{1}{1+a_{1}}+\dfrac{1}{2^2+a_{1}}+\cdots+\dfrac{1}{a_{1}+n^2}\right)$$ But the RHS might be $\lt0$ for a sufficiently large starting value; for instance, with $a_{1}=\dfrac{99}{100}$ then $$\dfrac{1}{a_{1}}-\left(\dfrac{1}{1+a_{1}}+\dfrac{1}{2^2+a_{1}}+\cdots+\dfrac{1}{a_{1}+n^2}\right)&lt;0,n\to\infty$$  see:   so this method won't let me bound the series and I don't know what else to do. We know that $221 = 17*13$. So we can check if the system has roots to both of those equations separately, which it does:  $x^{5} \equiv 2$ mod $13$ has the solution $6 + 13n$ and $x^{5} \equiv 2$ mod $17$ has the solution $15 + 17n$.   I got these numbers from wolfram, I have no idea how to solve this problem WITHOUT a calculator. And even after finding these numbers. How would one obtain a solution modulo $221$? I was thinking the Chinese Remainder Theorem but I am under the assumption that CRT only applies to problems with powers of $x$ which are $1$.  Thanks. Error while writing strcat() using pointers In viewing the weekly list of rep change, I see  on top: razpeitia2 5 16  member for: 2 years, 7 months link #1 week rank +8529 change 727 total reputation 2,286 week reputation    How can someone with 727 total have 2286 for the week with no bounties?  Call me curious.  Is this a bug or something else here? Why can't I press the Install button when installing applications from unknown sources? I'm trying to sideload an application, as seen in the picture below.    I have allowed the installation of applications from unknown applied actions in settings, but I can't seem to press the install button. The cancel button works correctly and installing applications via adb install works correctly. What's the problem?  EDIT: For those who have this problem, using ChainFire's  will correct it because the app uses hardware compositing, and Android doesn't notice a "layer" on top of the current screen. Reference — What does this symbol mean in PHP? The indexer into Dictionary throws an exception if the key is missing.  Is there an implementation of IDictionary that instead will return default(T)? I know about the TryGetValue() method, but that's impossible to use with LINQ. Would this efficiently do what I need?: myDict.FirstOrDefault(a =&gt; a.Key == someKeyKalue);  I don't think it will as I think it will iterate the keys instead of using a Hash lookup. Stopping xcode from indexing Is it possible to use the enumerate/itemize environment within the proof/remark environment in a nice way? What is $1^k+2^k+\cdots+ (p-1)^k$ modulo $p$? (From Ireland and Rosen). What is the difference between re.search and re.match? What would you call a word that doesn't exist in or translate well into another language? I've run into this situation several times, being a native Spanish speaker.   There are some words you just can't translate into another language. Is there a particular word to describe this?  I'm not refering to idioms.  Also, if its a noun, people tend to use them by surrounding them in quotes. Is this appropiate?  Example:     I arrived at around 5 pm and had some quesadillas.   Edit:  I also meant to cover words that exist in English, but cannot be translated into another language.   Example:      There isn't a word for "drive-thru" in your language. How can I generate and print a 32 bit sequence of 0s and 1s in Qiskit or IBM Q experience quantum lab using quantum random number generator implementation? If $a_k\geq0$ is a decreasing sequence converging to $0$, do we have $\lim_{n\to\infty}\frac{\sum_{k=1}^n a_k}n = 0$? How does the lens diameter influence photo quality? I have tested two different 50mm lenses in my camera. One was a Nikkor 50mm ∅52mm. The other one was a Sigma 50mm ∅72mm. I took some pictures with both lenses using the same setup for aperture and shutter speed, but couldn't notice significant differences in the quality of the pictures.   So, how does the diameter affects the photo quality, if it does? What advantages would the ∅72mm lens have over the ∅52mm one? I made a map with annotations in QGIS 3.0.  This is how it looks like in the layout view:    If I print the map as PDF, one would expect to get the PDF to be WYSIWYG, right? However, it looks like this (it's about half the size):    Is there a way to influence the the scaling of the Annoations? I already tried to play with the Scale and Magnifier in the map view. I also tried to change the Scale in the map item.   The strange thing is, I believe it worked a few days ago. But today I installed QGIS 3.0 on a new PC and it showed the same behaviour... Show image in panel I'd like to show an image (png, preferably) in my panel. Does anyone know if this is supported through labels or template_XX UIPanels?