In my controller I retrieve a list of products along with an image name, then scale the image down to the size needed by the view.  The images are now in memory, ready to be written to the response stream.  I know the client will send a response for each image but I have no idea how to hook into it to provide the image.  View code:      @foreach (var product in Model.Products)     {        @product.Name        &lt;img src="@product.Thumbnail"/&gt;        Priced From $@product.LowestPrice     }   Controller:      model.Products =        DataContext.Products.Where(p =&gt; p.Category.Name             .Equals(id)).Select(m =&gt; new ProductListItem                 {                    Name = m.Name,                    Thumbnail = ImageResizer.Resize(m.Image, 75, 100, &lt;normally I put the output stream here&gt;),                    LowestPrice = SqlFunctions.StringConvert( m.PriceSet.Prices.Min(p =&gt;p.Price1))                 }     );   Where ImageResizer.Resize() signature is  Resize(string imageName, int width, int height, Stream outputStream)   So my question I think should be- what do I put in for the image name and how do I listen for requests for each image that can be written to the stream?
Can I create a Controller that simply returns an image asset?  I would like to route this logic through a controller, whenever a URL such as the following is requested:  www.mywebsite.com/resource/image/topbanner   The controller will look up topbanner.png and send that image directly back to the client.  I've seen examples of this where you have to create a View - I don't want to use a View. I want to do it all with just the Controller.  Is this possible?
How to prove $\det(I+uv^\intercal)=1+v^\intercal u$ Let be $u,v\in\mathbb{R}^n$, then $\det(I+uv^\intercal)=1+v^\intercal u $ where $I$ denotes the identity matrix of order $n$. How to prove this?   what I did:   let be $A=\{n\in\mathbb{N}: \forall u,v \in \mathbb{R^n}, \det(I+uv^\intercal)\neq1+v^\intercal u  \} $, and suppose $A\neq \varnothing $, then for the well-orderer-principle there exists $n_0\in A$ such $n_0\leq n,\;\forall n\in A$. since $1\notin A,\; n_0\neq 1 \rightarrow n_0-1\in\mathbb{N}\setminus A  $ so: $$\forall u,v\in\mathbb{R^{n_0-1}}: \det(I+uv^\intercal)=1+v^\intercal u $$ Then, let be $u,v\in\mathbb{R}^{n_0}$, so $$\det(I+uv^\intercal)= \displaystyle\sum_{j=1}^{n_0}(-)^{1+j}a_{1j}\det(A_{1j})$$ where $a_{ij}=\begin{cases} u_iv_j+1 &amp; i=j \\ u_iv_j &amp; i\neq j \end{cases}$, and $A_{1j}$ is the  submatrix of $I+uv^\intercal$ that results deleting the i-file and j-column. Then I try to open the term for $j=1$ and try to use the relation for the new matrix of $n_0-1$ order with the determinant because it holds the same form but I have other terms which difficult me the work. Do you know other method?.  Ps. , in page 2 I've found something similar but I don't understand what it means PS. I'm taking a course of numerical analisys Runtime error : ERROR 000358: Invalid expression using SelectLayerByAttribute in ArcPy? I cannot for the life of me persuade SelectLayerByAttribute to work (I need to automate this for a complex script).  Working in ArcMap's python console on already loaded shapefile, the format below:  import arcpy from arcpy import env arcpy.env.workspace = r"C:/Users/.../working" arcpy.SelectLayerByAttribute_management("layer", "NEW_SELECTION", " 'ATTRIBUTE' = 'Criterion' ")   results in error:     Runtime error : ERROR 000358:   Invalid expression Failed to execute (SelectLayerByAttribute).   An alternative method:  import arcgisscripting import arcpy gp = arcgisscripting.create(9.3) gp.workspace = "C://...//working" sFile = "C://...//working//shapefile.shp" lyr = "layer" gp.makefeatureLayer_management(sFile, lyr) gp.toolbox = "management" gp.SelectLayerByAttribute("layer", "NEW_SELECTION", " 'ATTRIBUTE' = 'Criterion' ")   .. selects everything, including features that don't meet the criterion!  Does anyone have any idea what's going wrong?  I've read some pages on , but found no solution that works here. The working directory is correct. The attribute field and criterion are correctly specified (case sensitive etc), etc. Its very confusing. Does the verb "unvelcro" exist or what can we use instead? I know that the following word pairs exist:  button – unbutton tie – untie  Can we use an analogous process with the verb &quot;velcro&quot;? Turning water pump on/off using Arduino Uno R3 I'm trying to build a simple system to turn a water pump every 24 hours for 10-20 seconds. I have 5V pump. When I connect it to 5V, GND it works but when I connect it to pin 12 (or any other digital pin) and GND it does not work. Here's my sample sketch:  int led = 12;  void setup() {                   Serial.begin(9600);   pinMode(led, OUTPUT);      }  void loop() {   digitalWrite(led, HIGH); }   What am I doing wrong? Calculate limiting distribution of $\frac{\sum_{i=1}^n X_i}{\sum_{i=1}^n Y_i}$ Principle of Reflection on atomic level This well-observed phenomenon has, besides several others, always been a fascination to me. We are well aware of several theories, experiments, and practical applications of this well-known phenomenon, but is it established what goes on at the grassroots of reflection?  My high school teacher once told me that whenever light is incident on any reflecting surface, its electrons absorb the energy of the photon and release back the same energy. If this is actually true, then I have plenty of questions to continue, but if it is not, then what is reflection, and how and why does it take place? Why is it that we have to use the gerund form for the first example? I have been told that it is not grammatical to use the infinitive form.  For some verbs, it's okay:     I wanted to study English.   I had to study English.   I needed to study English.   I tried to study English.   I traveled to study English.   But, for some verbs, it's incorrect:     I ended up to study English.     Why is that the case? How do I use RelativeSource with WPF bindings and what are the different use-cases? Calculationg base-resistor between microcontroller and transistor I'm curious, when connecting my 2N2222 transistor's base to a PWM output pin on my Arduino, I know the Arduino can deliver a maximum of 40mA current. The 2N2222 only requires around 5 to 10 mA on it's base to switch the collector and emitter. Now, when calculating the base-resistor under "normal" conditions where I'm merely switching it directly from Vcc, the following applies:   However, when putting in a 500 ohm or 1K resistor in (1K for 5mA) directly it works great. But putting it in between the Arduino and the transistor, the transistor doesn't switch.  I suspect thus, that the resistance is too high of the base-resistor. Therefore, we may very well not need a base-resistor.  But, according to spec, the Arduino can deliver 40mA. So, am I correct in assuming the folling: 1) I should calculate the perceived resistance that the Arduino is giving, if it goes high to 5Volt and only gives 40mA, and then 2) Subtract that from the 500ohm resistor needed to make the transistor operate optimally.  Example:    So, I'm theorising that I have to then put in a 375 ohm resistor in to make the total resistance between the Arduino and the base resistor 500 ohm.  Somehow this doesn't feel right. Keep in mind, I'm not an electronic engineer, so I might have the cat by the tail here :P Why is BigDecimal returning a weird value? Propane gas fireplace pilot won't light scp from remote Linux to local Windows with spaces in local path To push a file from a Linux terminal to a Windows system, the following two examples work just fine.  scp /home/user.name/file.html user.name@local.ip.num:/C:/Users/user.name/test_folder/file.html  scp /home/user.name/file.html user.name@local.ip.num:"/C:/Users/user.name/test_folder/file.html"   I need to do this where the local folder has spaces and I cannot change the name,  say /C:/Users/user.name/test folder/  All of the following fail with the message scp: ambiguous target  scp /home/user.name/file.html user.name@local.ip.num:"/C:/Users/user.name/test folder/file.html"  scp /home/user.name/file.html user.name@local.ip.num:"/C:/Users/user.name/test\ folder/file.html"  scp /home/user.name/file.html user.name@local.ip.num:"'/C:/Users/user.name/test\ folder/file.html'"  scp /home/user.name/file.html user.name@local.ip.num:"/C:/Users/user.name/test\\ folder/file.html"  scp /home/user.name/file.html user.name@local.ip.num:"'/C:/Users/user.name/test\\ folder/file.html'"  scp /home/user.name/file.html user.name@local.ip.num:"/C:/Users/user.name/test\\\ folder/file.html"  scp /home/user.name/file.html user.name@local.ip.num:"'/C:/Users/user.name/test\\\ folder/file.html'"   How do I get this to work? "He added" vs. "Did he add" (inversion after negative adverb) newenvironment: error with \begin{align} and \end{align} What are integers $x$ and $n$ such as $ x^4+x^3+x^2+x+1 = n^2$? What are the integer numbers $x$ such as $x^4+x^3+x^2+x+1$ is the square of an integer?  $0$ and $-1$ are obvious answers, but how many are there? In the answer to , I was advised:      Yes you have to download the language pack. And you also have to go here: C:\Program Files (x86)\Origin Games\Dragon Age Inquisition\Data\Win32        In the folder loctext leave only the files en.sb and en.toc present, put the others in a folder named temp.   In the folder locfacefx make a copy of en.sb_DiP_STAGED and en.toc_DiP_STAGED, rename them to en.sb and en.toc. place the other language files into a temp folder   When I started the game the language was changed also into the interface. Take notes on what you have done and keep the original files in case something doesn't work, but for the moment that seem to work."   I have no en.sb_DiP_STAGED and en.toc_DiP_STAGED files in my Origin version of the game. Why use the Conjure Minor Elemental spell when its results are so unpredictable? The  spell states:  You summon elementals that appear in unoccupied spaces that you can see within range. You choose one the following options for what appears:  One elemental of challenge rating 2 or lower Two elementals of challenge rating 1 or lower Four elementals of challenge rating 1/2 or lower Eight elementals of challenge rating 1/4 or lower.   It seems like the only two things a player can select are the maximum CR of the elemental conjured, and, arguably, the location its summoned in. I am confused as to why you would want to use this spell given that its results are so unpredictable. Why would a wizard cast a spell that's essentially an open invitation to whatever elemental from a list decides to show up? You can't strategize around the spell very much because, as written, you don't choose what gets summoned, and you can easily end up with something you weren't counting on. It won't be useless, but why would you cast a spell that has such an unpredictable result? It's like the difference between the chromatic orb and chaotic bolt - if the chaotic bolt didnt have the chance to bounce. You'd never pick a random damage type over a damage type of choice. Why would you choose a spell that might do something you want over something that does exactly what you intend it to do? What are the situations in which you would use this spell that wouldn't be better solved by a spell of equal or lower level that has more predictable results? Continuously invertible operators I am trying to use mathematical induction to prove  $$(2n)!\ge2^n(n!)^2\quad\text{for }n\in\mathbb{N}$$  I am stuck at the $n=k+1$ point. What is the difference between "retired out" and "retired not out" in cricket?