This is a bit of an odd one.  Someone (Probably roommate), somehow, installed something onto my computer that opens a "unsavory" website in my default browser every 10~15 minutes. It's not browser related, as I tried uninstalling chrome and it simply followed me to IE. I've also checked my downloads folder, and I can't find any evidence someone downloaded something either. How can I tell what process is causing this to happen?  Thanks for any help
What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.
How to render an ASP.NET MVC view as a string? I want to output two different views (one as a string that will be sent as an email), and the other the page displayed to a user.  Is this possible in ASP.NET MVC beta?  I've tried multiple examples:  1.      If I use this example, I receive the "Cannot redirect after HTTP   headers have been sent.".   2.      If I use this, I seem to be unable to do a redirectToAction, as it   tries to render a view that may not exist. If I do return the view, it   is completely messed up and doesn't look right at all.   Does anyone have any ideas/solutions to these issues i have, or have any suggestions for better ones?  Many thanks!  Below is an example. What I'm trying to do is create the GetViewForEmail method:  public ActionResult OrderResult(string ref) {     //Get the order     Order order = OrderService.GetOrder(ref);      //The email helper would do the meat and veg by getting the view as a string     //Pass the control name (OrderResultEmail) and the model (order)     string emailView = GetViewForEmail("OrderResultEmail", order);      //Email the order out     EmailHelper(order, emailView);     return View("OrderResult", order); }   Accepted answer from Tim Scott (changed and formatted a little by me):  public virtual string RenderViewToString(     ControllerContext controllerContext,     string viewPath,     string masterPath,     ViewDataDictionary viewData,     TempDataDictionary tempData) {     Stream filter = null;     ViewPage viewPage = new ViewPage();      //Right, create our view     viewPage.ViewContext = new ViewContext(controllerContext, new WebFormView(viewPath, masterPath), viewData, tempData);      //Get the response context, flush it and get the response filter.     var response = viewPage.ViewContext.HttpContext.Response;     response.Flush();     var oldFilter = response.Filter;      try     {         //Put a new filter into the response         filter = new MemoryStream();         response.Filter = filter;          //Now render the view into the memorystream and flush the response         viewPage.ViewContext.View.Render(viewPage.ViewContext, viewPage.ViewContext.HttpContext.Response.Output);         response.Flush();          //Now read the rendered view.         filter.Position = 0;         var reader = new StreamReader(filter, response.ContentEncoding);         return reader.ReadToEnd();     }     finally     {         //Clean up.         if (filter != null)         {             filter.Dispose();         }          //Now replace the response filter         response.Filter = oldFilter;     } }   Example usage  Assuming a call from the controller to get the order confirmation email, passing the Site.Master location.  string myString = RenderViewToString(this.ControllerContext, "~/Views/Order/OrderResultEmail.aspx", "~/Views/Shared/Site.Master", this.ViewData, this.TempData); Estimating Spline curve by OLS. Is a good idea to fix the knots at Chebyshev sites? I am writing my master's degree thesis on a novel method for fixing knots in an adaptive way and while reading the literature I've found many references to the so-called Chebyshev sites. This sites or points are basically the roots of the Chebyshev polynomials, and there's a proof showing that the Lebesgue constant (a measure that allows us to see how good is a polynomial interpolation) is very close to its lower bound if we put our knots in those sites. A practical guide to splines (De Boor, 1972) for example provides such a proof.  Anyway I am not interested in polynomial interpolation with splines, but in regression using LASSO on a set of B-splines . On Numerical methods in economics (Judd, 1998) it's stated that the results regarding the 'optimality' of the Chebyshev sites hold also for the regression case, but there is no proof showing that the latter is true.  I would like to know if it's a good idea to estimate the regression using B-splines constructed over a knot sequence given by the Chebyshev sites, since in the OLS framework I am not interested on minimising the Lebesgue constant but rather I want to minimise the $\| \cdot \|_2^2$. In many articles I've found phrases like "we will set the knots at the Chebyshev sites, that are well known to be good..." making allusion to the results presented in De Boor, but ignoring that those refer to the interpolation case.  If your could put some light on the problem I will be very grateful. Flexible table with calculating column width fails starting from division by 10 Why do we use the object instead of the subject pronoun in constructions like "stupid me"? I'm trying to find out how come we say lucky me and stupid us rather than lucky I and stupid we. My understanding is that this is not a recent invention, but a relic from the distant past where it was a dative construction. However, I don't see the reason for using any case other than the nominative in this construction to begin with.        He went surfing. → Lucky him went surfing.   I got pulled over. → Stupid me got pulled over.   They bought a house. → Thoughtless them bought a house.      This is rather intriguing. After thinking about it for a while, I couldn't come up with any other language, Germanic or otherwise, where simply introducing an adjective would dictate a change of grammatical case. This appears to be an English peculiarity. How far can it be traced back? Can anyone comment on its background? Hyphens in words with prefixes like neo-Nazism I have a question regarding the use of hyphens in words with certain prefixes. For example,     Neo-Nazism   Neo-Confucianism   Neo-liberal     are words with a hyphen, but     Neoplatonism   Neocolonialism   are words without hyphens. I'm especially confused with neo-Confucianism and neoplatonism: one contains  a hyphen and a capital letter and the other doesn't.  Is there a specific rule for hyphens in words with prefixes or is it purely arbitrary? class C {   T a; public:   C(T a): a(a) {;} };   Is it legal? How to use Launchctl for schedule application I try to work with Launchctl and have a question:  How can I set up an application to run in a few minutes using Launchctl? (for example, open the program MyApp.app with arguments "hello" "world" Every 10 minutes)  I know that it can easily be done by creating Launch Agent, I looking for a way to do it using Launchctl directly to programmatically. How to recover from a Nvidia fail on Ubuntu 16.04? I have an older Nvidia video card and my PC crashes when installing the driver for the video card in Ubuntu 16.04. When I get to the login screen but no further: after entering my password, the system went into a loop and returned always back to the login screen [with funny stripes present].   How do I fix this problem? I am trying to follow the best practice design patterns for triggers but get the error Constructor not defined: [CaseTriggerHandler].(). What am I missing?  Trigger  trigger CaseTrigger on Case (before insert, before update, before delete, after insert, after update, after delete, after undelete) {      CaseTriggerHandler handler = new CaseTriggerHandler();      //Before Insert     if(Trigger.isInsert &amp;&amp; Trigger.isBefore){         handler.OnBeforeInsert(Trigger.new);     }     //After Insert     else if(Trigger.isInsert &amp;&amp; Trigger.isAfter){         handler.OnAfterInsert(Trigger.new);     }     //Before Update     else if(Trigger.isUpdate &amp;&amp; Trigger.isBefore){         handler.OnBeforeUpdate(Trigger.old, Trigger.new, Trigger.newMap);     }     //After Update     else if(Trigger.isUpdate &amp;&amp; Trigger.isAfter){         handler.OnAfterUpdate(Trigger.old, Trigger.new, Trigger.newMap);     }     //Before Delete     else if(Trigger.isDelete &amp;&amp; Trigger.isBefore){         handler.OnBeforeDelete(Trigger.old, Trigger.oldMap);     }     //After Delete     else if(Trigger.isDelete &amp;&amp; Trigger.isAfter){         handler.OnAfterDelete(Trigger.old, Trigger.oldMap);     }     //After Undelete     else if(Trigger.isUnDelete){         handler.OnUndelete(Trigger.new);     } }   Handler      public with sharing class CaseTriggerHandler {      private boolean isExecuting = false;      public CaseTriggerHandler(boolean isExecuting){         this.isExecuting = isExecuting;     }      public void OnBeforeInsert(List&lt;Case&gt; newCases){         //EXECUTE BEFORE INSERT LOGIC     }      public void OnAfterInsert(List&lt;Case&gt; newCases){         //EXECUTE AFTER INSERT LOGIC     }      public void OnBeforeUpdate(List&lt;Case&gt; oldCases, List&lt;Case&gt; updatedCases, Map&lt;Id, Case&gt; CaseMap){         //BEFORE UPDATE LOGIC     }      public void OnAfterUpdate(List&lt;Case&gt; oldCases, List&lt;Case&gt; updatedCases, Map&lt;Id, Case&gt; CaseMap){         //AFTER UPDATE LOGIC     }      public void OnBeforeDelete(List&lt;Case&gt; CasesToDelete, Map&lt;Id, Case&gt; CaseMap){         //BEFORE DELETE LOGIC     }      public void OnAfterDelete(List&lt;Case&gt; deletedCases, Map&lt;Id, Case&gt; CaseMap){         //AFTER DELETE LOGIC     }      public void OnUndelete(List&lt;Case&gt; restoredCases){         //AFTER UNDELETE LOGIC     }      public boolean IsTriggerContext{         get{ return isExecuting;}     } } How to add a node in the middle of the line with tikz? Outlook Rule - Move mail that is READ and Older than X days Outlook 2010. Want to create a rule that moves all mail from my inbox to another folder:   Has been read Is older than X days   I was looking at Auto-archiving, but it does not seem to let me be this specific with my criteria. Convergence of $\sum\limits_{n=2}^\infty \frac{1}{n^\alpha \ln^\beta (n)} $ for nonnegative $\alpha$ and $\beta$ Study the convergence of the following series: $$\sum_{n=2}^\infty \frac{1}{n^\alpha \cdot\ln^\beta(n)} \text{ where }\alpha,\beta \geq 0 $$   Applying d'Alembert criterion I have that $$ \lim_{n\to\infty} \frac{n^\alpha  \ln^\beta(n)}{(n+1)^\alpha  \ln^\beta (n+1)} = \lim_{n\to\infty} \left(\frac{n}{n+1}\right)^\alpha\left(\frac{\ln(n)}{\ln (n+1)}\right)^\beta = 1$$ so the nature of the series is inconclusive.  If $\alpha = \beta = 0$, then the series diverges, since $\sum_{n=2}^\infty 1 = \infty$.  Should I study the rest of the cases (i.e. if $\alpha = 0, \beta &gt; 0$ the root test and the ratio test are also inconclusive). What is the best form to study the series?.  Thanks in advance Proof if $a \vec v = 0$ then $a = 0$ or $\vec v = 0$ I'm kicking myself over this one, but I just can't seem to make the argument rigorous. From Axler's Linear Algebra Done Right:  for a vector space $V$ with an underlying field $F$:  Take an element $a$ from $F$ and $\vec{v}$ from $V$. $a\vec{v}=\vec{0}\implies a=0 $ or $ \vec{v}=\vec{0}$  After only being able to come up with half of a direct proof, I tried doing this by proving the contrapositive $a\neq 0 \wedge \vec{v} \neq \vec{0} \implies a\vec{v}\neq \vec{0}$  Say $a\vec{v}=\vec{u}$. Since $a$ is non-zero, we can divide both sides by $a$.  $$\vec{v}=\frac 1 a \vec{u}$$  If $\vec{u}$ were $\vec{0}$ then by  $$\frac 1 a \vec{0}=\frac 1 a (\vec{0}+\vec{0})\implies\frac 1 a \vec{0}=\vec{0}$$ $v$ would be $0$ as well. Since it isn't by assumption, $\frac 1 a \vec{u}$ cannot be zero and so $\vec{u}$ cannot be as well.   Is this fully rigorous? It seems like a very simple question, but I'm not sure about it. Namely, the last step of $\frac 1 a \vec{u}\neq 0 \implies \vec{u}\neq 0$ doesn't seem obvious. I think I need to use the $1\vec{v}=\vec{v}$ axiom, but I'm not sure how.  Is there a more direct proof? This whole contrapositive business seems a bit clunky for something so simple. introduces  which will allow the introduction of new literal syntax based on existing literals (int, hex, string, float) so that any type will be able to have a literal presentation.  Examples:  // imaginary numbers std::complex&lt;long double&gt; operator "" _i(long double d) // cooked form {      return std::complex&lt;long double&gt;(0, d);  } auto val = 3.14_i; // val = complex&lt;long double&gt;(0, 3.14)  // binary values int operator "" _B(const char*); // raw form int answer = 101010_B; // answer = 42  // std::string std::string operator "" _s(const char* str, size_t /*length*/)  {      return std::string(str);  }  auto hi = "hello"_s + " world"; // + works, "hello"_s is a string not a pointer  // units assert(1_kg == 2.2_lb); // give or take 0.00462262 pounds   At first glance this looks very cool but I'm wondering how applicable it really is, when I tried to think of having the suffixes _AD and _BC create dates I found that it's problematic due to operator order. 1974/01/06_AD would first evaluate 1974/01 (as plain ints) and only later the 06_AD (to say nothing of August and September having to be written without the 0 for octal reasons). This can be worked around by having the syntax be 1974-1/6_AD so that the operator evaluation order works but it's clunky.   So what my question boils down to is this, do you feel this feature will justify itself? What other literals would you like to define that will make your C++ code more readable?    Updated syntax to fit the final draft on June 2011 I'm heading to India next week and have a connection in Munich, Germany. I made the mistake of booking a flight with only an hour and a half layover (freaking out!) and I'm wondering if I'll have to go through customs in Munich or if I can pass right on through. How to make a table from two lists? How do I connect to a MySQL Database in Python? How do I connect to a MySQL database using a python program? How to get rid of blank pages in PDF exported from SSRS I have a two-page SSRS report. When I exported it to PDF it was taking 4 pages due to its width, where the 2nd and 4th pages were displaying one of my fields from the table. I tried to set the layout size in report properties as width=18in and height =8.5in.  It gave me the whole table in a single page of PDF, but I am still getting the 2nd and 4th pages blank.   Is the way I am doing it incorrect?  How else can I get rid of those blank pages? The 1st law of thermodynamics If a gas expands adiabatically will the work done be positive or negative?  I think it will be positive as $\delta W=p dV$ and we have a positive sign due to the work done by the gas is positive as it pushes to expand. But this site has the negative of the answer I obtain.   (See adiabatic processes section) How do I get my players to form a PC party without just forcing them to? I believe that it is generally a good thing that all the PCs travel together, as a "party". This way the GM has to manage one environment – not, say, five. The problem is how the GM can ensure such a relationship between the characters.  One simple and really great solution is to require the players to design their characters so that they know each other. This has the added advantage of cross-backstories – as the players try to adjust their stories to fit together, they get and create hooks for more narrative!  However, I am now experimenting with giving the players complete freedom at character creation and later meeting in-game. No luck so far.  It is not easy, as trusting someone with your life (what happens during combat) is not a trivial thing. Furthermore, people generally like others with the same behaviour/interests/skin colour. Fantasy is all about diversity – you do not character-generate a strong man with a sword, no, you generate a half-ogre with an axe never before seen!  How can the GM get players, with diverse characters who are strangers to each other, decide to have their PCs act as a coherent group. I absolutely want to avoid asking my players to just solve this through metagaming ("Hey Joe, think of a way to get together with those, I can't story-tell two separate groups at the same time!").  I'm not having the stereotypical problem where a bunch of PCs meet for the first time and are automatically so paranoid of strangers that they start trying to kill each other. My players have just created a bunch of characters who have their own legitimate interests, and are faithfully following those in completely different directions that don't result in a classic "party". I put the PCs in great peril together and everyone escaped by their own devices, but now I have to figure out get the guy who ran for the hills back together with the couple that entered the city. And, I want to do it by resorting only to reasonable in-game events, not out-of-game metagame suggestions.