I have been looking at controller classes in .NET Core with constructors that take IMemoryCache arguments but cannot see where the passed objects come from originally. For instance, this example declaration from : public class HomeController : Controller {     private IMemoryCache _cache;      public HomeController(IMemoryCache memoryCache)     {         _cache = memoryCache;     } }  Where would this constructor be called and how is the IMemoryCache object instantiated in the first place? Is this something that happens behind the scenes with .NET Core that does not have to be coded explicitly? I have seen similar examples using an ILogger object, so my question would also apply to that.
There have been several questions already posted with specific questions about , such as when to use it and what frameworks are there for it. However,  What is dependency injection and when/why should or shouldn't it be used?
R cannot be resolved - Android error Physics are not simulated past a certain frame? What is the procedure to load LAS files in QGIS 2.0.1? What is the present procedure to load LAS files in QGIS 2.0.1?  After some searching I found a paper outlining the procedure; however, it was for 1.8.something, and related posts here are all rather dated. Is Con modifier × level added to HP every level-up? Area 51 is miscounting my proposal followers I know of one person who is following my proposal who doesn't show up on the proposal webpage.    My proposal is for quantitative finance: .  It shows 19 people following the proposal (on the side of the page), and the total listed at the top of the page is 19 followers.  Yet one user is not listed: .  This makes me wonder if other followers are also not being counted? Is it "I" or "me" in "Keep Tom and I/me updated"? How to resolve merge conflicts in Git repository? How can I get id,class or name attr an element with jquery SQL Server compatibility with New TLS Standards The major browsers are moving beyond SSL3.0 and TLS1.0 . The PCI Security Council has declared an end-of-life date for these protocols to be considered sufficiently strong encryption.   We need to move away from these protocols, to use newer and stronger ones. On Windows servers, you can very easily disable these old protocols, and instead offer only TLS1.1 or greater.  However, as noted , Microsoft SQL Server 2008 R2 and SQL Server 2012 (Standard, at least) both will not start if those lower protocols are disabled.  However, there are a growing number of versions of MS SQL Server.  There are SQL Server Standard, Business Intelligence, Enterprise, Express, Web, and Compact editions.  And of course there is SQL Server 2008, 2012, 2014, and (in pre-release) 2016.  Which of these editions support or will support the use of only TLS1.1 or greater protocols? In a conference on elliptic curves (an introduction to the subject), the speaker said that an elliptic curve (I.e. an equation of the form $y^2=x^3+ax+b $ where the RHS has distinct roots) is, in the complex space, a torus/Riemann surface of genus 1.  What is meant by that? Are we talking about a 2-dimensional manifold the 4D space? Compound Adjectives and -ed A colleague asked me this question, and I couldn't come up with an answer that satisfied him, so I'm wondering if anyone can help:  Why does a man with a short temper become a short-tempered man? In other words, why do you need the -ed at the end?  Are there any special rules for this? Unbiased estimator for geometric distribution parameter p Install suspension forks on non-suspension bike Drop "not constructive", combine "noisy", reword "rude" and "other" comment flags I keep going around in circles with this problem:  Given the functions $f:X\to Y$ and $g:Y\to Z$, if $g\circ f:X\to Z$ is bijective, then prove $f$ must be one-to-one and $g$ must be onto. I was able to prove this without difficulty. However the second part of the problem has me stumped:  a) Find functions $f,g$ where $g\circ f$ is bijective but $f$ fails to be onto.  b) Find functions $f,g$ where $g\circ f$ is bijective but $g$ fails to be one-to-one.  My attempt for (a): Let $f:\mathbb{R}\to \mathbb{R}^+$ be defined by $f(x)=e^x$ and $g:\mathbb{R}^+\to \mathbb{R}$ be defined by $g(x)=\ln(x)$. Then $g\circ f(x)=g(f(x))=g(e^x)=\ln(e^x)=x$ which is bijective, $g$ is onto and $f$ fails to be onto... or so I thought. Upon closer inspection $f$ $\underline{is}$ onto for the given codomain $\mathbb{R}^+$.  And now I'm stuck in a rut. Anyone out there have any hints? Can I submit/ArXiv without my advisor? I am being blocked from publishing my work I joined a research group of a faculty member in 201x, and worked with her for three years. During that time, I collaborated with a large hospital to perform research in the domain of medical informatics. I spoke about my research at two conferences; one was a talk, and the other was a poster presentation. My advisor asked me to write up the research in a paper around the second year, which I did. Around the third year, I decided to switch research groups, because of the relationship between me and my advisor going sour, and not having funding from her (I used to work part-time to fund my PhD research).  Once this happened, she withdrew her support from me publishing my paper and ordered that I give up my work to a fellow grad student. I told her, that my manuscript is in its Nth revision, and that I would like to take it to completion as first author. She was dismissive and didn’t offer any comments on my work. I told her, that, should I pass on my work, I would like to discuss authorship issues in advance, which she wasn’t ready to discuss. She ganged up my new advisor against me, and together they forced me to give up my code, results, paper drafts. I had to then leave the university without a degree.  Fast forward couple of years, I receive an email from a student in her lab (the student whom I had to hand over my work to), saying that they are publishing a paper, and have decided I am the fourth author. I read the paper and found out that it uses my experimental setup and design, data collection, and one of the ideas I had presented (the idea wasn’t the main crux of my paper, but I believe it was novel).  I want to   Publish my original draft in ArXiv/BioArXiv, as first author. Request my advisor to cite my work in their publication.    Given how she behaved with me, I know that despite what I am asking for sounds fair, she is likely to object.  I am asking the community: Can I go ahead and ArXiv it without her permission? I could add her as an author, but not take her permission. Also, if you have any other ideas on how to deal with this situation please let me know.  (For the record, this was at a top-10 school in the US in an engineering department). How do I create subdomain like  ? Do i have to access htaccess somehow? Is it actually simply possible to create it via pure php code or I need to use some external script-server side language?  To those who answered: Well, then, should i ask my hosting if they provide some sort of DNS access?? How do I complete the square from the point I have left off at, and is this correct so far?   I have a normal prior for $\beta$ of the form $p(\beta|\sigma^2)\sim \mathcal{N}(0,\sigma^2V)$, to get:  $p(\beta|\sigma^2)=(2\pi\sigma^2V)^\frac{p}{2}\exp[-\frac{1}{2\sigma^2}\beta^T\beta]$  where $\beta^T\beta$ is   $\sum\limits_{i=1}^p \beta_i^2$.  My likelihood has a normal distribtuion for the data points y of the form $p(y|\beta,\sigma^2)\sim\mathcal{N}(B\beta,\sigma^2I)  $  $p(y|\beta,\sigma^2)=(2\pi \sigma^2V)^\frac{n}{2}\exp[-\frac{1}{2\sigma^2}({\bf y}-{\bf B}{\bf \beta})^T({\bf y}-{\bf B}{\bf \beta})]$  (Note that $\beta$ is a matrix/vector too, \bf does not work.)  To get my posterior for $\beta$ I combined the above, took the exponential parts only, and then expanded to get:  $\exp[-\frac{1}{2\sigma^2}({\bf y}^T{\bf y}-{\bf y}^T{\bf B}\beta-\beta{\bf B}^T{\bf y}-\beta^T{\bf B}^T{\bf B}\beta)]\exp[-\frac{1}{2\sigma^2}({\bf \beta}^T{\bf B})]$.  I dropped the $({\bf y}^T{\bf y})$ term, as is not a function of $\beta$.  Putting into one expression without the exponential:  $-\frac{1}{2\sigma^2}(-{\bf y}^T{\bf B}\beta-\beta{\bf B}^T{\bf y}-\beta^T{\bf B}^T{\bf B}\beta+{\bf \beta}^T{\bf B})$.  I know I need to combine the similar terms and get into the form of the multivariate normal distribution, which is what I am aiming for, but I am unsure how to do this? I probably have to add an extra term to the expression to get it into the correct form?  Note: This is not homework, it's a project, but my Bayesian working knowledge is not good at all and so I need to understand the working out. I intend to integrate out the $\beta$ and then the $\sigma^2$ after getting into the multivariate form. How can I manually interpolate string escapes in a Perl string? Automatically redirect anonymous user from unanswered duplicate question to corresponding answered version Duplicate questions that use different words to describe the same problem are important for people to find the content via search engines. But the user experience when an anonymous user arrives at a duplicate is less than ideal.  They have to notice the duplicate link and understand that the answer they are looking for is likely behind that link. I don't think this is all that obvious to someone without experience with an SE site.  I propose to just redirect users to the duplicate automatically if the closed duplicate has zero answers. In that case they need to follow the link to the duplicate in any case, so we might as well redirect them to it in the first place.  I could imagine this being problematic with search engines, as we would be displaying different content than what the search engines see. If that is too problematic I would suggest to show a very obvious link to the duplicate in the answers section for anonymous users.