If $X$ is a metric space and $B$ is the Borel $\sigma$-algebra and $\mu$ is a measure on $(X,B)$.Define support of $\mu$ as the smallest closed set $F$ such that $\mu(F^{c})=0$. Let $X=[0,1]$. Show that if $F$ is a closed subset of $X$, then there exists a finite measure on $X$ whose support is $F$.   I thought that the obviuos choice to construct such a measure is as follows : $$\mu(A)=m(A\cap F)$$.  Where m is the lebesgue measure on $[0,1]$. But this example doesn't seem to work.   Thanks in advance for any help.

If $X$ is a metric space, $\mathcal B$ is the Borel $\sigma$-algebra, and $\mu$ is a measure on $(X, \mathcal B)$, then the $support$ of $\mu$ is the smallest closed set $F$ such that $\mu(F^c) = 0$. Show that if $F$ is a closed subset of $[0,1]$, then there exists a finite measure on $[0,1]$ whose support is $F$.  My Solution:   Let $F$ be a closed subset of $[0,1]$ and $\mu_F$ be defined by $\mu_F(B) = m(B \cap F)$ for any $B \in \mathcal B_{[0,1]}$. Since $F$ is a closed subset of $[0,1]$, it is in $\mathcal B_{[0,1]}$ and $\mu_F$ is a measure. The measure is finite since $\mu_F([0,1]) = m([0,1] \cap F) \leq m([0,1]) = 1$ and since $\mu_F(F^c) = m(F^c\cap F) = m(\emptyset) = 0$, the support of $\mu_F$ is $F$.   My questions:  Why do we need the condition that $X$ is a metric space to define the support?  Is my answer correct?


I have a table1 as  id  value1  Xmlvalue  1   abc    <value value1=abc id = 1>             2   abcd   <value value1=abcd id = 2>          3   defg   <value value1=defg id = 3>            4   def    <value value1=def id = 4>  5   ghi    <value value1=ghi id = 5>    and table2 as  id   value1  Xmlvalue    1,2  abc             3,4  def             5    ghi     I need output table as  id   value1  Xmlvalue    1,2  abc     <root><value value1=abc id = 1><value value1=abcd id = 2></root>        3,4  def     <root><value value1=defg id = 3><value value1=def id = 4></root>        5    ghi     <root><value value1=ghi id = 5></root>        Note: My XmlValue columns are of type varchar(max). I have used these columns in other queries in same store procedure and if I make these columns of type XML then it gives me error in group by.

I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)


So, I'm studying Category Theory, and I'm stuck with some questions. One of them is this one:  Can a functor $F:A \to B$, meaning, a functor $F$ from category $A$ to category $B$, have an image that is NOT a subcategory of $B$?  I can't really find a situation where this happens, but by my readings this is wrong of my part.  Thanks in advance.

On Hilton and Stammbach's homological algebra book, end of chap. 2, they wrote in general $F(\mathfrak{C})$ is not a category at all in general. But I don't quite get it. I checked the axioms of a category for the image, and I think they are all satisfied. Am I missing something? Thanks.


I'm using bind9  I have a zone file setup with a few subdomain A records. I'm wondering if I can create a subdomain record that points to an ip address on a specific port.  I'm currently updating the zonefile dynamically. I'd need some service with an API that can handle an infinite amount of subdomains. Also need to map udp and non http tcp ports.  I think I might need to use ip tables?

This is a  about DNS/Hostnames resolution to IPs/Ports   Example 1  I'm running a web server on port 80 and another on port 87. I would like to use DNS so that www.example.com goes to port 87. How can I accomplish this using DNS only?  Example 2  I'm running a service on my server on a non-standard port. How can I get clients to connect to this non-standard port automatically? Can I use DNS? Is there some application specific support where DNS could indicate the IP and Port?   Example 3  Do some application protocols specifically support hostname awareness, and allow special actions to be taken based on this information? Are there other questions on Server Fault that cover some of these?  Commandeering: This question was originally asking about running IIS and Apache on the same server, but the same concepts can be applied to any server software receiving connections from clients. The Answers below describe the technical problems and solutions of using DNS and application protocol support to assign a port number for a client to connect.


Let $(X,\mathcal O)$ be a scheme. If $\mathcal O(U)$ is integral for all affine open $U\subset X$, how to show that $\mathcal O(V)$ is also integral for general open subset $V\subset X$?

The following is the definition of integral scheme as mentioned   Let $X$ be a scheme. We say $X$ is integral if it is nonempty and for every nonempty affine open $\operatorname{Spec}(R)=U \subset X$ the ring $R$ is an integral domain.  How do I show that for any open set $U$, $\mathcal{O}_X(U)$ is an integral domain?


As for every two wheeler the centre of mass  will be much closer to earth in leaning position than in standing. but while moving it doesn't fall (lean).what kind of forces are preventing the falling of 2wheeler.

Why does a bike/bicycle fall when its speed is very low or close to zero and is balanced when going with a high speed?


I want to restrict duplicate words in an email using regex.  Currently I am using below regex that also restrict 2 consecutive dots (ex: a@gmail..com)  regexp: /A(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z][{a-z},0-9](?:[a-z0-9-]*[a-z0-9]){1-2}?)$/i,   Now I want to also restrict duplicate words in email for example :-  abc.xyz@gmail.com.com   It should not accepted second .com .

Is there a regular expression to validate an email address in JavaScript?


When my model gets pretty large and I try to rotate it, only certain view angles work. In other angles, it looks like it is breaking up or distorting. I am not trying to render and I'm not using a camera. I am using version 2.79. I tried updating to 2.81, and it did the same thing so I went back to 2.79 to get this project done. I have attached a couple pictures. One shows what it should look like and the next shows what the distorted image looks like. Help much appreciated!

I'm having an odd issue - When I try to zoom in on a detail using my MMB, the "camera" in the 3D view seems to be cutting off the exterior surface of my object and showing me the inside instead. I'd expect this behavior, but only when I was much more zoomed in.  If I zoom out a bit (one click on the scroll wheel) then I can see the exterior as I intend.  Is there any way to adjust this behavior?  Thanks!


I understand that having expertise in a a skill doubles your proficiency in it, but is it just the initial proficiency that's doubled or does it include proficiency you gain from leveling up?  e.g. If I had +2 persuasion and expertise in it it would be +4. If I then level up would it now be +6 or +8?

Bards get Expertise at level 3. How does this work?  For example, if I have a standard proficiency bonus of +2, and if I have proficiency in Perception with a Wisdom ability modifier of +2, then my Perception is +4. If I choose expertise in Perception, does it double the +4 to Perception +8, or does it double the proficiency bonus only to +4 for a total of Perception +6?


I am looking for the term describing when your hair grows kind of in a circular direction (defined by the direction of your hair root).  Many people have something like this on the back of their heads or even on their foreheads.  I found the term hair crown on dict.cc but I feel like this is either not the correct term for it or it is not very widely used. There is a German article on human hair including a section about these things but I could not find the English equivalent.  In German, these are called Haarwirbel meaning something like hair whirl.

What to call the area where the hair directions all change on the head? In Russian that term is макушка, and looking for the translation I find it to be top.   However, that is not a satisfactory answer, since some people have two areas on their head where the hair changes its direction.  Also, sometimes these areas are not on the top of their head.


Coulomb's law for the static electric field of a point charge is given by $$\overrightarrow{E}=\frac{1}{4\pi\epsilon_0}\frac{q}{r^2}\hat{r}$$ Now if we take the divergence of both sides of the above equation we will get $$\overrightarrow{\nabla}\cdot \overrightarrow{E}=\frac{q}{4\pi\epsilon_0}\left\{\frac{1}{r^2}\frac{\partial}{\partial r}\left(r^2\frac{1}{r^2}\right)\right\}$$ $$\Rightarrow \overrightarrow{\nabla}\cdot \overrightarrow{E}=0$$ But according to the differential form of Gauss's law $\overrightarrow{\nabla}\cdot \overrightarrow{E}$ should be equals to $\frac{\rho}{\epsilon_0}$; where $\rho$ is volume charge density. In this condition I can not understand where I have made mistakes or where I am logically wrong. So can any one please help me to get rid from this conceptual dilemma?

I just started in Griffith's Introduction to electrodynamics and I stumbled upon the divergence of $\frac{ \hat r}{r^2} \equiv \frac{{\bf r}}{r^3}$, now from the book, Griffiths says:  Now what is the paradox, exactly? Ignoring any physical intuition behind this (point charge at the origin) how are we supposed to believe that the source of $\vec v$ is concentrated at the origin mathematically? Or are we forced to believe that because there was a contradiction with the divergence theorem? Also how would the situation differ if $\vec v$ was the same vector function but not for a point charge? Or is it impossible?


I create an application codename one.  I want to connect it with the data base through json. I tetsted the service and I found ths error   Exception in thread "main" java.lang.NullPointerException     at com.codename1.io.NetworkManager.isAPSupported(NetworkManager.java:909)     at com.codename1.io.ConnectionRequest.<init>(ConnectionRequest.java:352)     at Services.ChallengeService.getList(ChallengeService.java:26)     at Services.test.main(test.java:22) Java Result: 1

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I see lots of different places with the same response for disabling SSL3 on chrome (adding --ssl-version-min=tls1 to the end of the execution of chrome.exe). But apparently this isn't working for my 64bit version of Chrome (version 40.0.2188.2 dev-m (64-bit)). Anyone have any ideas?  Also note that this is working just fine on 32 bit version on other systems.

As the question suggests: How to disable support of the SSL version 3 and set TLS version 1 as minimum (oldest) protocol supported in order to defend against POODLE.  One can test a browser with .  Basically, I haven't found a solution for Safari yet.


When using the verb "run", I realized that we can say "I ran 2 hours last night." without including the preposition "for". I wonder if we can do the same thing to "teach"?   I have taught more than 1000 hours in total.  or do we have to use "for"?  I have taught for more than 1000 hours in total.

The other day I heard someone say:       They've been going out a week; I mean, that's not (a) serious (relationship).     I wondered if she was speaking correctly, which is presumable, since she was a native American English speaker. But more often I here the for when people talk about duration. So is it also possible to leave out for? Maybe only in the informal register?   EDIT: There was a heavy stress on the word week. Does it play a role in this matter?  EDIT#2: ... OK. It's more suitable as an answer.


The MHC genes are widely polymorphic and hence cause an issue in tissue matching pre-transplantation. Why is there such a polymorphism?   I know that different polymorphisms in MHC can lead to variation in the immune response to the same offender. But then, if there is a difference, shouldn't there be a selection for those that mount a better response?   So, why the polymorphism?

What evolutionary process lead to so much variation in MHC? What is the advantage of having such variation?


I have connected a smartphone and would like to copy some file onto it using midnight commander. I've found out that the mount point is mtp://[usb:002,004]/Card/ however when I try to run cd mtp://[usb:002,004]/Card/ I get No such file or directory. How should I point to it in terminal?

I have an Android phone that connects with my computer via MTP. This works fine; I can see and transfer files with Nautilus. However, I often want to use the terminal to move large numbers of files, and I cannot seem to find the device anywhere in the filesystem tree. Nautilus reports the location as mtp://[usb:003,007]/, but it's not under /media or /mnt.  Does anyone know where it is?


Which sentence is correct:  Why don't you try to give up candy if you want to lose some weight? Why don't you try giving up candy if you want to lose some weight?

Are both try to save the file and try saving the file grammatically correct? If so, is there any difference in meaning?


I'm able to derive the formula where $p=1$ and $p=2$, but I don't see how the formula generalizes to higher powers without having to derive each one individually. Is there an inductive approach? What is the name of this series?

Is there explicit formula for the expression $1^n + 2^n + \dotsc + k^n\,$?  I know that for $n=1$ the explicit formula becomes $S=k(k+1)/2$ and for $n=3$ the formula becomes $S^2$. But what about general $n$?  I know there is a way using the Taylor expansion of $f(x)=1/(1-x)=1+x+x^2+\dotsc\;$, by differentiating it and then multiplying by $x$ and then differentiating again. Repeating this $n$ times, we get  $$\frac{d}{dx}(x\frac{d}{dx}(\dots x\frac{d}{dx}f(x))\dots )=1+2^nx^n+3^nx^n\dots.$$  Now do the same process but with the function $g(x)=x^{k+1}f(x)$. Then subtract them and we get $1+2^nx^n+\dots k^nx^n$. Because we have the explicit formulas $f(x)$ and $g(x)$ we can find the explicit formula by this process for arbitrary $n$. A big problem is that as $n$ grows, it is going take a lot of time finding the explicit formula. My question is therefore: are there other ways?


I have a action method in controller which returns json result as:  public ActionResult GetByDids(int id) {     AngularMVCEntities _db = new AngularMVCEntities();     var emps = _db.Employees.Where(x => x.Did == id).ToList();     return Json(emps, JsonRequestBehavior.AllowGet); }   And a code in angular js like:  app.controller('employeesController', function ($scope, $http) {     $scope.GetEmployeesByDid = function (did) {         alert('Get Employees By Id' + ' ' + did);         $http.get('/Employees/GetByDids', { params: { id: did } }).then(function       (response) {             $scope.Emps = response.data;         });     }; });   Output is:   How to convert the json DATE to string?

I have a controller action that effectively simply returns a JsonResult of my model. So, in my method I have something like the following:  return new JsonResult(myModel);   This works well, except for one problem. There is a date property in the model and this appears to be returned in the Json result like so:  "\/Date(1239018869048)\/"   How should I be dealing with dates so they are returned in the format I require? Or how do I handle this format above in script?


I'm looking for a grammar rule here with regards to a non-essential clause that is in the same place as an adjective and acting like a 2nd adjective. In a simple sentence, the 2nd adjective rule is clear:     (1) He was a tired, angry man.   But what to do in a complex sentence, when a 2nd adjective becomes a whole clause. Is it just like the simple sentence and without the comma:     (2)The political background of capitalism is a distinct, although not often explicitly and sharply defined identity among commercial movements in Europe.   Or does it get treated like a non-restrictive clause with a 2nd comma:     (3) The political background of capitalism is a distinct, although not often explicitly and sharply defined, identity among commercial movements in Europe.   I feel like the connection between defined and identity is quite strong, thus making this non-optional, in the same way angry and man is not optional.     (4) He was a tired, angry, man.   To me the above sentence is clearly wrong, so why is a comma not wrong in #3?  Help appreciated.

I am trying to teach myself punctuation rules. I have this sentence:     The Disney version generally considered both racist and sexist portrayed the female characters in stereotypical roles and presented ethnically diverse characters with stereotypical features.   I think the sentence needs a comma after sexist and before portrayed. I also think it needs a comma after roles because of what I have identified as a coordinating conjunction. I.e.:     The Disney version generally considered both racist and sexist, portrayed the female characters in stereotypical roles, and presented ethnically diverse characters with stereotypical features.   Did I punctuate the sentence correctly? Is this a coordinating conjunction?


Back in the 90's I heard this story of a guy who in the 70-80's lived remotely near the power lines and that he was very good in electrical engineering and that he had free electricity by using the power line as a primary of an air cored transformer.  Besides the utter danger of going anywhere near the power lines I find it unlikely that having the second coil at a safe distance (which might be at least 10 meter) still can make this arrangement act like an air-cored transformer.  Is this theoretically possible or is it just a myth?    Disclaimer !!!  This question is for pure scientific/theoretical/possibilities curiosity.   Messing with the high voltage power line and its proximity is very dangerous, potentially lethal and most certainly illegal.

The details are hazy as I recollect this from my nipper days.Many, many years ago.  “Persons were charged with stealing electricity by placing a large coil, somehow, near high voltage AC transmission lines.”  Is this feasible or was it perhaps an April fool’s article that I swallowed hook line and sinker in my youthful naivety.  There is a modern reason for this question.   Due to country wide cable and transmission tower spar actual theft. We are looking at placing modules with a gyroscope and Wifi module to form a mesh that will report if a tower is being “attacked”. Of course I will still have to test if the electronic gyroscope is sensitive enough for this. But one of the problems is going to be, how to power the unit? Solar will require an extra solar panel and battery. If I could tap into the radiated energy from the actual transmission line, great. Many modern SOCs don’t require much power and can sleep most of the time.  To clarify our needs. We are looking at building a device to sense if parts of the metal tower are being removed by scrap metal thieves. If too many parts are removed from the tower. It will buckle and earth the line. This is still at the feasibility stage.


So as I'm writing my own shell for school, I have to implement redirections.  I've looked at the GNU Bash manual, and a fair amount of tutorials, but I'm still having troubles understanding what exactly means the ampersand in these redirections. I know when I have to use them when using simple redirections, like &>file or 2>&- but I don't get the precise meaning of it.   Could someone explain?

I often see tutorials online that connect various commands with different symbols. For example:  command1 |  command2 command1 &  command2 command1 || command2     command1 && command2   Others seem to be connecting commands to files:  command1  > file1 command1  >> file1   What are these things? What are they called? What do they do? Are there more of them?    .


I've seen .  Voting to undelete will not work because it was deleted by a moderator, but I managed to vote for reopening for some reason.  I doubt this is intentional, perhaps not as important, but still.

I just successfully added my Close vote to a question on Stack Overflow that had already been deleted by the author.  The question can be found .        The only purpose I see for such functionality is perhaps to stop someone from escaping the initial surge of wrath from critics, then subsequently undeleting their question.  And that would be a pretty strange thing to guard against.  It seems far more likely that this is an oddity that was overlooked.  So I'm just curious - is voting to close a deleted question a bug, or is it ?  If by design, what is the rationale behind it?


In the beginning of the 5th book/ movie, Harry was charged for using underage magic in front of a muggle. Harry, in his defense, said that he had to use magic to fight Dementors. People laughed because they thought that a wizard of that age couldn't create a Patronus. Also, Dementors don't usually wander in muggle suburbs.  Why didn't court simply use Veritaserum (most powerful Truth Serum in existence) on Harry to know the truth? Wizengamot should have a stockpile of Veritaserum because it can be useful to it. Also, I don't think criminals can resist a Truth Serum, otherwise there's no point of their existence if we can't say with confidence that a subject under the influence of a Truth Serum is telling the truth.

The truth potion (Veritaserum) is one of the most powerful potions that forces the drinker to speak truth. Then why didn't Ministry used it in any criminal cases instead of long discussions and proceedings? I know there are antidotes to the potion (Dumbledore tells Harry in the 6th book , "Slughorn might have been carrying antidote to veritaserum ever since I asked him about the memory"), but why don't keep criminals in custody until the effect of the antidote wears out and then make them drink veritaserum. Won't that result in perfect judgement?


How do you set the default browser for all users back to Firefox in Ubuntu 16.04?

Is there an option to change my default browser for all my applications?


I'm using the external library of TikZ for speeding up the compilation of my LaTeX document.  In another thread, Christian Feuersänger reported that from December 2012, the external library uses MD5 checksums to find out whether a source file changed or not and whether the corresponding figure must be re-built in order to be up-to-date. This works fine for my figures that have been made using plain TikZ.  However, I also use pgfplots to plot the run of variables whose data is stored in an external txt file. This is a MWE of what I do and how I do it:  %%% this is the main.tex file %%% \documentclass{article} \usepackage{tikz} \usetikzlibrary{external} \usepackage{pgfplots} \tikzexternalize \tikzsetexternalprefix{./PDF/} \begin{document} \begin{figure}   \tikzsetfigurename{fluk-p}   \tikzpicturedependsonfile{data.txt}   \input{fluk-p.tex} \end{figure} \end{document}  %%% This is the fluk-p.tex file %%% \begin{tikzpicture}   \begin{axis}[xlabel={Zeit\,[s]}]      ] \addplot [color=red] table [x index=0,y index=1] {data.txt}; \addplot [color=blue] table [x index=0,y index=2] {data.txt};   \end{axis} \end{tikzpicture}  %%% This is the data.txt file %%% 0  1  2 1  2  1 2  1  2   If I change something in the fluk-p.tex file -- say the xlabel -- TikZ finds out correctly and re-builds the figure. But if I change something in the corresponding data.txt file TikZ does not notice this. I thought I could fix this issue with the \tikzpicturedependsonfile{data.txt} command but I was wrong obviously.  Can anybody help how I can make TikZ to notice changes not only in the fluk-p.tex but also in the data.txt?  Thanks in advance! Sven

Is it possible to use the TikZ/external library and have pgfplots recreate a figure when a data file that is plotted changes? Say I have something like the following:  file.tex:  \documentclass{article}  \usepackage{tikz,pgfplots} \usetikzlibrary{external} \pgfplotsset{compat=newest} \tikzexternalize \newcommand{\figFilename}{}  \begin{document}   \begin{figure}[t]     \centering     \renewcommand{\figFilename}{thePlot}     \tikzpicturedependsonfile{\figFilename.tikz}     \tikzsetnextfilename{\figFilename}     \input{\figFilename.tikz}     \caption{The caption.}   \end{figure} \end{document}   thePlot.tikz:  \begin{tikzpicture}   \begin{axis}[     xlabel={$x$},     ylabel={$y$},]     \addplot+[only marks,mark=x]       table[x=x,y=y] {data.dat};   \end{axis} \end{tikzpicture}%   data.dat:  x y 0 20.44 1 20.06 2 19.76 3 19.54 4 19.40 5 19.34   If I change thePlot.tikz, the external library will detect that the figure is no longer up-to-date and recreate it. Is it possible to have the same effect when any of the plotted data files changes as well? I tried something along the lines of \tikzpicturedependsonfile{data.dat}, and it doesn't work. That wouldn't be an ideal solution anyway, as most times I use many data files in each plot and listing all dependent files manually would be more pain than gain.  So is there an easy, automated way for the external library to check all data files included in a tikzpicture and recreate the plot if at least one of them has changed?


I want to put my footnotes at the end, so I use endnoes (as here: ). But I would also like to be able to put several endnotes at the same point, just like with the footnotes (see here: )  My Naive attempt is to try:  \documentclass{article} \usepackage[multiple]{footmisc} \usepackage{endnotes}  \let\footnote=\endnote  \begin{document}  Some text.\footnote{A footnote}\footnote{And another one.}  \newpage  \theendnotes  \end{document}   But this not not produces the 'comma' separation i desire.  Any suggestions?

Consecutive footnotes can be separated by commas by invocation of the multiple option of the  package:    \documentclass{article} \usepackage[multiple]{footmisc} \begin{document} Comma delineation of consecutive footnotes fails upon conversion to endnotes% \footnote{First note.}% \footnote{Second note.}.% \end{document}   This comma delineation fails, however, if footnotes are converted to endnotes using the  package:    \documentclass{article} \usepackage{endnotes} \let\footnote=\endnote \usepackage[multiple]{footmisc} \begin{document} Comma delineation of consecutive footnotes fails upon conversion to endnotes% \footnote{First note.}% \footnote{Second note.}.% \theendnotes \end{document}   How can one preserve automated comma delineation of consecutive endnotes?


I'm trying to use the Noto font for my entire document. Using mathspec this works fine for text and math fonts. However, using a comma in math mode produces a serif font-like comma instead of the one provided by the Noto font family. How can I change that? Here's a minimal example:  \documentclass[a4paper,12pt]{scrartcl} \usepackage{amsmath} \usepackage{mathspec} \setmathrm{NotoSans-SemiCondensedLight} \setmathfont(Latin){NotoSans-SemiCondensedLightItalic} \setmathfont(Digits){NotoSans-SemiCondensedLight} \setmainfont{NotoSans-SemiCondensedLight} \begin{document} \noindent 1,234\\ $1{,}234$ \end{document}   which yields    EDIT:  Using the proposed lines  \makeatletter \DeclareMathSymbol{,}{\mathpunct}{\eu@LatinLowercase@symfont}{`,} \makeatother   yields a somewhat similar, but not identical comma symbol compared to the main and math fonts (see below). Is there a way to use the exact same comma from the same font?

I am using XeTeX and have the following short document:  \documentclass[a4paper,12pt]{article} \usepackage{amsmath,amsthm} \usepackage[MnSymbol]{mathspec} \usepackage[no-sscript]{xltxtra} \defaultfontfeatures{Mapping=tex-text} \setallmainfonts{Minion Pro}  \begin{document}  $\phi, \varphi, \delta \ldots A \vee B$  \end{document}    Now no matter what font I am using the punctuation marks in math mode (commas, dots, \ldots etc.) come out in Computer Modern. Is there a way to change this?


After a long period of relative malaise, the Games Workshop miniature wargaming company seems to have attained enormous heights of financial success starting around 2017. After spending a while growing in the £3,000 range, they have recently crossed the £9,000 threshold.  I don't follow financial news that much, so maybe it's just my limited perspective, but this is by far the highest stock price per share I have ever seen, for any company in any sector. Given the business they're in and the number of fans their products have, Games Workshop seems to me - as a layman - like it would attract a fair number of 'sympathy investors' (i.e., people who don't otherwise own a stock portfolio going "Well, they're my favourite company, I think I'll buy a share", with little intent to trade beyond that). But their absurdly high price per share puts them utterly out of the reach of any such casual investors. Is there a good reason to refrain from splitting at such a high stock price? Is the 'casual investor' effect I described above perhaps much smaller than I expect (small enough to be negligible)?

When Apple was in the high $600 or so range, it split 6 times and made it more affordable to purchase more shares for less, even though the value was technically the same. I see companies like Google are extremely high per share and am wondering why or why not they would or wouldn't split their stock right now.


I tend to browse websites with the browser taking up half the screen. This way, I can do multiple things at once, such as edit my code on the left half of the screen while researching documentation or tricks on the right (note: I usually do not have access to multiple monitors, as I use school computers most of the time). Unfortunately, of the many websites I visit for programming assistance, the Stack Exchange sites are one of the worst. Stack Exchange doesn't respond the the smaller browser size, making it hard to access the different features of the site. As an example, I took this screenshot visiting the site on my personal monitor, which has resolution 1920x1080 and is a rather large 24 inches:     Not too bad, but I cannot easily find the "Ask Question" button. Side-ways scrolling is such a dismal thing, but at least I can kind of see the HNQ list. This works okay with this monitor, but ideally the Questions, Tags, Users, Badges, Unanswered, and "Ask Question" buttons would be shifted further to the left to make them accessible on a smaller browser.    Things are about to get bad...    My laptop's monitor is a sad 1366x768 and 15.6 inches. This is what it looks like on my laptop. I know that my laptop's monitor is rather small compared to monitors out there, but I still expect to be able to use the site easily:    It's barely possible to navigate! Where is the "Questions" button? Only due to my repeated use of the site do I know that that tiny sliver of orange is how I can visit the question list. Let's try this out on the most popular  (rather, the top answer to it):    I can't even read the entire question. Sure, I could scroll to the right, but that is not something I ever remember how to do when navigating web pages.  Is there some reason why the Stack Exchange sites are not responsive to the browser size? Is the assumption just that the users of the site use big/multiple monitors (meaning targeting employees rather than random internet users)? Would the images and text just scale badly for some reason?

When will SO stop wasting real estate of my screen by having static width layout?  EDIT  It would be very interesting to hear how does Joel, being UI specialist, feel about this. JoelOnSoftware site has fluid layout...


In the book Harry Potter and the Prisoner of Azkaban, Sirius Black does have a wand in the episode at the Shrieking Shack. But he himself tells Harry that he had no chance of chasing  the Dementors away in Azkaban without a wand. How would Sirius have acquired his wand after his escape from Azkaban?

Sirius Black and a few Death Eaters escape Azkaban and seem to operate after that with their wands intact.  How come?  If a mere expulsion from Hogwarts entails wand destruction (as happened with Hagrid), shouldn't an Azkaban sentence entail the same?  And even if we imagine that the perceived impossibility of escape from Azkaban made it seem unnecessary to destroy the wand, this would apply to Sirius but not to Death Eaters.  PS: Two comments suggested that the escapees acquired new wands. It would be nice to have a more definitive answer than just a suggestion or a list of possibilities. Thanks.  PPS: Returning the personal property to a released prisoner is one thing, but the wand is a different matter: this is usually the tool of the crime, and I don't see how it can be argued that it should be returned and not destroyed. Again, Hagrid had his wand destroyed and he was not even sentenced to Azkaban.  PPPS: Maybe wand destruction is only done for non-fully-qualified wizards?


I heard a voice mail message in the evening. What should I say: "You had left a message for me" or "you left a message for me"?

Non-native speakers often get confused about what the various tenses  and aspects mean in English. With input from some of the folk here I've put together a diagram that I hope will provide some clarity on the matter.  I offer it as the first answer to this question. Consider it a living document. Input is welcome, and good suggestions will be  incorporated into the diagram.    Nota bene: What this is not is a discussion of whether there are  more than two tenses in English. , to which this question is not intended to supply arguments one way or the other.  Here, the aim is to provide an overview of what constructions English-speaking people use for conveying information about actions referring to past, present, and future, and to provide it first and foremost to precisely the people who are likely to use "tense" as a catch-all term in their search, rather than to linguists who know better.  Breaking News There is now an excellent ELU blog article titled  . It is highly recommended reading.


As of now it's set to ⌘Q everywhere which is very unintuitive and being next to ⌘W, which I use a lot, it's very annoying too.  ⌘Esc doesn't do anything (on my laptop at least) and I think it makes sense to remap the quit action to it. I think I can do it one by one - one app at a time. But is there a way I can change it for all the apps at once - from one setting, or using some tool?  And I would like ⌘Q to do something else or nothing at all.

I use cmd+tab, cmd+W, cmd+A a lot and I don't remember how many times I hit cmd+Q accidentally.  Is it possible to change the shortcut for quitting applications from cmd+Q to something else (not to disallow using keyboard to quit applications), ideally for applications all at once (not to do it for individual application one by one)?


When you have the card face down then you morph the card to face up, does it suffer summoning sickness? My friend has lots of them in his deck and I'm not too sure and would like to know whether they suffer from summoning sickness the turn they are morphed.

Note: this is intended to be a canonical question about summoning sickness.  "Summoning sickness", broadly, is the rule that stops you from attacking or paying {T} costs with a creature that you just played. But how exactly does it work? How does it interact with other rules and effects?  For example, if I'm trying to figure out how a creature is affected:   Does the status matter (tapped/untapped, face down/face up, etc.)? What if it came into play, but I didn't cast it? What if it's a token? What if it was on the battlefield when my turn started, but it wasn't a creature? What if it stops being a creature? What if it's a creature and also another card type? What if it's a double-faced card that just transformed? What if it changes control? What if it's a copy of another creature? Which of the creature's activated abilities can I use? Are any of its other abilities affected? Can I tap the creature to pay a cost that is not a {T} cost?   (These examples are primarily taken from questions about summoning sickness that have already been asked on the site)


Let $M$ be a finitely presented $R$ module and $0 \to N' \to N \to M \to 0 $ be an exact sequence with $N$ a finitely generated $R$ module. Prove that $N'$ is also a finitely generated $R$ module.  By $M$ finitely presented $R$ module we mean there is a ses $0 \to K \to F \to M \to 0$ where $F$ is free of finite rank and $K$ is finitely generated $R$ module. I proved the case when $N$ is free of finite rank but can't show it in this case. Any help will be appreciated. Thanks.

Let $R$ be a ring (unital, not necessarily commutative), $M$ a finitely presented left $R$ module. Suppose $m_1,\ldots,m_n\in M$ generate $M$. This determines a surjection $f:R^n\to M$.     Must the kernel of $f$ be finitely generated?   This is true by definition if the generating set $m_1,\ldots,m_n$ is the one coming from the finite presentation of $M$.


I have noticed that wetting something almost always changes its colour. For example sprinkling water onto a t-shirt creates darker spots on the fabric; but this effect is not limited to fabric, almost everything once wet appears darker. Why is that?

When something gets wet, it usually appears darker. This can be observed with soil, sand, cloth, paper, concrete, bricks...  What is the reason for this? How does water soaking into the material change its optical properties?


I came across the word "[b]ilingual" when reading  from Medical News Today.com.  Prof. Marian explains in the paper that "[b]ilinguals' ability to seamlessly switch between two distinct communication systems masks the considerable control exerted at the neural level."  This is my first time to see that way of using "[]" brackets like "[b]ilingual", and I wonder what it means or how you use it. Could you explain it?

I have difficulty understanding why in  approximately half of the quotes start with a letter in square brackets. What is the reason? Some examples:  "[S]ame-sex segregation is a group phenomenon that arises from social processes that are related to gender identity and labeling common to all members of a sex, rather than to similarities in sex-typed activities." "[t]he mental analog of sex: one's maleness, femaleness, etc., as seen from their own perspective"


I have been trying (unsuccessfully) to automate a script (or at least the actions contained within) that I run in Terminal each time a reboot my system, to enable the WiFi.   I have been following as many of the responses on this forum as to how to autommate actions at startup as I can and focused most of my attention around using upstart. Since there is no apparent sign that my script (or any derivation I can come up with) has run I decided I needed to turn debug logging on in initctl and watch what happens with my "script" when events get triggered. Low and behold, initctl is not writing to /var/log/syslog.  Where is it writing to and/or why is it not writing there? I have a directory in /var/log called upstart but all that is in that directory is archive files. For the record I'm running 13.04 with the latest updates applied.

On Ubuntu 12.04, I can find Upstart log messages in /var/log/syslog.  Commands:  # initctl log-priority info # initctl emit hello   Log:  Apr  1 01:56:56 precise64 kernel: [ 8365.820425] init: Connection from private client Apr  1 01:56:56 precise64 kernel: [ 8365.821130] init: Handling hello event   On Ubuntu 13.10, the messages do not appear in syslog or anywhere else under the /var/log directory, although commands like logger hello work as expected. Should I be looking for them somewhere else? Is there a configuration setting I need to change somewhere?  There’s a  from somebody who seems to be having the same problem on Ubuntu 13.04, and more  and  that may also be describing the same problem. Unfortunately, these questions offer no leads for the problem.


What is this animal?    Characteristics:   Has a long curved bill. Has green upper body and a dark black lower body. Likes petunias. Hovers like a hummingbird but is a bit smaller. Has small rear feather-like tufts and is very odd shaped. Moved quickly from flower to flower.

This picture is take from my village in Gujarat, India. I think it is a small bird which I have never seen before. It is smaller than an Indian hummingbird and even smaller than a neem tree leaf. You can see the leaf and the flowers. That flower's diameter is maybe a half inch so you can see how small the bird is. This bird has a very little trunk like a butterfly. You can't see this in the picture, but I saw it. This bird sucks liquid from flowers by that trunk.


This may have been asked before, but I cannot make sense of it. I need a script which simply toggles the eye of my collection named "Animation". I have enabled my viewport by using bpy.data.collections["Animation"].hide_viewport = False The eye however is closed and I need to open it with a script. Any help is appreciated.

Hi Blender coders and artists.  I am updating one of my add-ons for Blender 2.8 and have run into some  issues finding the appropriate way to hide a collection that is added to my scene.  I want to deselect the eyeball on the toolbar with a python command in a script but I don't want to disable the collection in the view-port entirely as it is used as a collection in a particle system.   I just want to deselect the eyeball circled in green below.  Anyone know the python API for this?


I'm creating a php script that will use another php script (login.php) file to store database login information. This file will sit within the public_html directory of the website to interact with the mysql database.  I'm wondering what the best approach to file security would be, so that someone can't access the login.php file containing the login credentials.

When a PHP application makes a database connection it of course generally needs to pass a login and password. If I'm using a single, minimum-permission login for my application, then the PHP needs to know that login and password somewhere. What is the best way to secure that password? It seems like just writing it in the PHP code isn't a good idea.


Background/Business Case  I'm a recruiter who uses spreadsheets to organize the work I've done with candidates with respect to a certain job vacancy.   Like , I would like to have a pipeline that shows how my candidates are going through a certain progression or pipeline. I've put the different statuses of the pipeline here:    In the following figure, you can see that I've entered my candidates data, and I've put conditional formatting so that they are color depending on the status they're in:   Question  Notice how in this screenshot, i sorted the candidates according to the status alphabetically:    However, i want it sorted according to the same order available in the pipeline status depicted above, ie according to this order: - initial contact - interested - discussing - ..  any ideas?

I have a table of choir members with a “name” and a “voice type” column. How can I write a query that orders them by decreasing pitch level of the voice type (i.e. soprano > contralto > tenor > bass)?  Is there in the  something similar to ?  I also tried the , but it does not seem to have an option for custom ordering, either.


I received an email a few minutes ago noting that my bounty had expired. On clicking through to the question I'd posted it on, it said there was still over half an hour left. The notification in my inbox lined up with the email, both about 43 minutes early.  That's great that you warn me, but it's confusing as can be to be told something before it's actually true. I suggest either fixing the verbiage in the notices or waiting to send it out until it's actually true!

Noticed this many times but was too lazy to post.  So I see a message in my inbox that bounty is completed and now in grace period, however its title says that "bounty expiring soon"    Wonderful (not wonderful of course). I click it, and... guess what?    Ok. So 49 mins left. But the main problem is that time traveling is . (if it is not, please forbid it).


I didnt understand the truth table for $p \implies q$ (where $p$ and $q$ are statements). Can someone please explain it to me?  It would be better if someone explains with an example.

We have the following argument: $P \implies Q$ (Premise 1) $P$ (Premise 2) $—$ $∴Q$ (Conclusion)  The accompanying truth table is:    I don't understand this section of my textbook:     The premises are both true only in line four of the table, and in this   line the conclusion is true as well.      You can also see from the truth table that both premises are needed to   make this argument valid. But if we were to change the truth table for   the conditional statement to make P → Q false in the first line of the   table, then the second premise of this argument would no longer be   needed.       We would end up with the conclusion that, just from the single   premise P → Q, we could infer that Q must be true, since in the two   lines of the truth table in which the premise P → Q would still be   true, lines two and four, the conclusion Q is true too.   My thinking:  If we would change the $P → Q$ to be false in the first line of the truth table. Then why couldn't the conclusion be false as well? I don't understand what line $2$ and $4$ have anything to do with line $1$?


I saw this approximation in some notes:    $n! \approx   e^{-n}*n^n*\sqrt{2\pi n}$    What is this approximation? How is it derived? Is it a known formula?

I need a proof of stirling's formula which uses the riemann's sum and trapezoid approximation to come up with $ \frac {n!}{(n/e)^n \sqrt n}$ $ \rightarrow C$ where $C$ is derived from Wallis product. I tried searching the internet but was not able to come up with anything.


My database table has a column whose datatype is datetime, so when queried it returns HH:MM:SS. However, using Python it returns (datetime.timedelta(0, 57360),).  This is obviously the time difference in seconds. How do I convert the returned object into a string in the format HH:MM?

I'm having trouble formatting a datetime.timedelta object.  Here's what I'm trying to do:    I have a list of objects and one of the members of the class of the object is a timedelta object that shows the duration of an event.  I would like to display that duration in the format of hours:minutes.  I have tried a variety of methods for doing this and I'm having difficulty.  My current approach is to add methods to the class for my objects that return hours and minutes.  I can get the hours by dividing the timedelta.seconds by 3600 and rounding it. I'm having trouble with getting the remainder seconds and converting that to minutes.  By the way, I'm using Google AppEngine with Django Templates for presentation.


How can we prove the following?  $$ \sum_{n=1}^{\infty} \frac{n}{2^n} = 2 $$  It would be great to see multiple ways, or hints, about how this can be proven.   I know this is a power series $\sum_{n=0}^\infty c_n \, (x-a)^n$ where $c_n = n$ and $x = \frac{1}{2}$ and $a = 0$, but otherwise I am stuck.

How can I evaluate $$\sum_{n=1}^\infty\frac{2n}{3^{n+1}}$$? I know the answer thanks to , but I'm more concerned with how I can derive that answer. It cites tests to prove that it is convergent, but my class has never learned these before. So I feel that there must be a simpler method.  In general, how can I evaluate $$\sum_{n=0}^\infty (n+1)x^n?$$


I have a 'Tour' object with multiple 'Steps' associated to it through a master-detail relationship. I display the 'Steps' with an accordion that queries all of them based on the currentRecordId. I want to have a 'Delete' button for each step within the accordion and onclick it would take in the step.Id and delete that step from the database. My JS file works as needed right now, but I'd like to be able to delete from within the accordion. @AuraEnabled(cacheable=true) public static List<Step__c> getSteps(Id tourId){     return [SELECT Id, Name FROM Step__c WHERE Tour__c =: tourId]; }  @AuraEnabled public static void deleteStep(Id stepId){     List<Step__c> steps = [SELECT Id FROM Step__c WHERE Id =: stepId];     delete steps; }  Example Html: <lightning-accordion allow-multiple-sections-open>     <template if:true={steps.data}>         <template for:each={steps.data} for:item="step">             <lightning-button label="Delete" variant="destructive" onclick={deleteStep}></lightningbutton>             <!-- Code to grab {step.Id} and give it to Javascript that calls Apex function to delete -->         </template>     </template </lightning-acordion>  Example JS: deleteStep(){     deleteStep({stepId: accordionStepId}) //something like this     .then(result => {         this.message = 'it worked';     })     .catch(error => {         this.error = 'is this even possible';     }); }

I have a table that looks something like this   Here's my code I haven't tried a lot.  HTML:  <template>

Name

Phone

Email

             <template for:each={contacts.data} for:item="contact">

{contact.Name}

{contact.Phone}

{contact.Email}

                             <lightning-button variant="base" data-key={contact.Id} label="Edit" title="Base action" onclick={handleEdit} class="slds-m-left_x-small"></lightning-button>                             <lightning-button variant="base" data-key={contact.Id} label="Delete" title="Base action" onclick={handleDelete} class="slds-m-left_x-small"></lightning-button>

             </template>

 </template>   JS:  import { LightningElement, api, wire, track } from 'lwc'; import getContacts from '@salesforce/apex/ContactManager_CTRL.getContacts';  export default class ContactTable extends LightningElement {     @api recordId;     @track editLabel;     @track deleteLabel;     @wire(getContacts, {accountId: '$recordId'}) contacts;      handleEdit() {         console.log('======== :: called');     }      handleDelete() {         console.log('======== :: called' + this.deleteLabel);     } }   on click of the edit button I want to send a contact id or contact as a parameter, is there a way to achieve this?  How can I achieve this in LWC?


I have the Fourth Edition of Introduction to Electrodynamics by David J. Griffiths, published by Pearson.  I have found this erratum in Chapter 5 Magnetostatics, page 234 .     We can see that "Product rule number 6" is written and no asterisk or dagger is there, so I looked in Chapter 1 and found this on page 21    The "rule" which he is using is actually rule number 4.    I have seen the list of errata in the  but couldn't find it.

Applying the divergence to Eq. $47$, we obtain $$ \mathbf{\nabla} \cdot \mathbf{B} = \frac{\mu_{0}}{4\pi} \int \nabla \cdot \left( \mathbf{J} \times \ \frac{\hat{\mathbf{r}}}{r^2}\right) d\tau^{'}. \tag{48}$$ Invoking the product rule number $6$, $$\nabla \cdot \left(\mathbf{J} \times \ \frac{\hat{\mathbf{r}}}{r^2}\right)=\frac{\hat{\mathbf{r}}}{r^2}\cdot(\nabla \times \mathbf{J})-\mathbf{J}\cdot\left(\mathbf{\nabla} \times \frac{\hat{\mathbf{r}}}{r^2}\right)\; .\tag{49} $$ But $\nabla \times \mathbf{J}=0$, because $\mathbf{J}$ doesn't depend on the unprimed variables, while $\mathbf{\nabla} \times \frac{\hat {\mathbf{r}}}{r^2}=0$, so $$\mathbf{\nabla} \cdot \mathbf{B}=0\;.\tag{50}$$  I have the Fourth Edition of Introduction to Electrodynamics by David J. Griffiths, published by Pearson. I have found this erratum in Chapter 5 Magnetostatics, page 234 . It's just a normal triple product manipulation, i.e. $$ \vec a \cdot \left(\vec b \times \vec c \right) = \vec b \cdot \left( \vec a \times \vec c \right) = \vec c \left(\vec b \times \vec a\right)$$ Therefore, I think that an "equal to" sign is missing between the expressions on the RHS of Eq. $(49)$. I searched for  but couldn't find it.


Hello everyone,  I have a simple struct C which contains 3 variables. Then I have two structs, A and B, where B is derived from A. All in all, B contains the same 3 types of variables as in my simple struct C.  (Note: C++ structs are used)  My questions:   Can I cast between C and B as in my example below, i.e. is it allowed or do I have to look at something special (memory)? My example below produces no valgrind mem error. However, I want to be sure what you  think about it. Am I right, that if B inherits from A, the variables from struct A are put before (or afterwards - depending on architecture) the variables of B in memory, i.e. do I have everytime an "ordered" memory which  fits to struct C ordering/memory? Or can it happen, that e.g. the "type" variable from A is between the "str" and "value" variable?   Hope you can help me! Thanks in advance.  Example (C++11 style):  #include <memory> #include <string> #include <iostream>  struct a {     unsigned int type;      a(unsigned int t) : type(t)     {} };  struct b : public a {     std::string str;     unsigned int value;      b() : a(2), str("Hello"), value(1)     {} };  struct c {     unsigned int type;      std::string str;     unsigned int value;      c() : type(1), str("World"), value(42)     {}; };  int main(int argc, char*argv[]) {     // Bottom up     {         std::cout << "Bottom Up" << std::endl;          c* ptr2 = new c();          std::cout << ptr2->type << std::endl;         std::cout << ptr2->str << std::endl;         std::cout << ptr2->value << std::endl;          std::shared_ptr<b>ptr;         ptr.reset(reinterpret_cast<b*>(ptr2));          std::cout << ptr->type << std::endl;         std::cout << ptr->str << std::endl;         std::cout << ptr->value << std::endl;         std::cout << std::endl;     }      // Top down     {         std::cout << "Top down" << std::endl;         std::shared_ptr<b>ptr(new b());          std::cout << ptr->type << std::endl;         std::cout << ptr->str << std::endl;         std::cout << ptr->value << std::endl;          c* ptr2 = reinterpret_cast<c*>(ptr.get());          std::cout << ptr2->type << std::endl;         std::cout << ptr2->str << std::endl;         std::cout << ptr2->value << std::endl;     }       return 0; }

If I have a class as follows     class Example_Class     {        private:          int x;           int y;         public:           Example_Class()           {               x = 8;              y = 9;          }        ~Example_Class()         { }     };   And a struct as follows  struct {    int x;    int y; } example_struct;   Is the structure in memory of the  example_struct simmilar to that in Example_Class  for example if I do the following  struct example_struct foo_struct; Example_Class foo_class = Example_Class();  memcpy(&foo_struct, &foo_class, sizeof(foo_struct));   will foo_struct.x = 8 and foo_struct.y = 9 (ie: the same values as the x,y values in the foo_class) ?  The reason I ask is I have a C++ library (don't want to change it) that is sharing an object with C code and I want to use a struct to represent the object coming from the C++ library. I'm only interested in the attributes of the object.  I know the ideal situation would be to have Example_class wrap arround a common structure between the C and C++ code but it is not going to be easy to change the C++ library in use.


This is my first time working on a project like this, and i'm not sure where to turn next or how i should go about launching.  Currently the site consists of PHP and html files in a "/public_html" directory with godaddy hosting.   I don't know much about bandwidth or server requirements needed. But clients create directories (unknowingly) and users can view the content generated for the specific clients directory. I estimate to start, there would be around 25 clients with anywhere from 2-30 active users viewing the clients generated pages.  How can i make this scaleable? So i won't have to worry about switching hosts? Do i just go with a typical godaddy (or any other hosting company) plan? Im new to this.

This is a "catch-all" question designed to serve as an answer for all questions about choosing web hosting.  Pro Webmasters no longer accepts new questions about how to choose hosting.  All future questions pertaining to finding web hosting should be closed as a duplicate of this question. For more information about this policy please see .    How to find web hosting that meets my requirements?  What we're looking for in answers to this question are the basics about web hosting:   What is web hosting? What is the difference between shared, VPS, and dedicated hosting? How does a content delivery network relate to web hosting? Anything else you feel is helpful in finding a web host.   What we do not want is:   Endorsements or recommendations for specific web hosts We do not want your experience or other subjective information (just the facts please)


I am configuring Config Server Firewall and here is the default config for ICMP. I have read on the internet that disabling or limiting ICMP can cause huge headaches on your server. However I have also read it can help prevent some times of DDOS.  Do you think i should rate limit and if yes at what rate?  # Allow incoming PING ICMP_IN = "1"  # Set the per IP address incoming ICMP packet rate # To disable rate limiting set to "0" ICMP_IN_RATE = "1/s"  # Allow outgoing PING ICMP_OUT = "1"  # Set the per IP address outgoing ICMP packet rate (hits per second allowed), # e.g. "1/s" # To disable rate limiting set to "0" ICMP_OUT_RATE = "0"

This is a  about DoS and DDoS mitigation.   I found a massive traffic spike on a website that I host today; I am getting thousands of connections a second and I see I'm using all 100Mbps of my available bandwidth.  Nobody can access my site because all the requests time out, and I can't even log into the server because SSH times out too!  This has happened a couple times before, and each time it's lasted a couple hours and gone away on its own.  Occasionally, my website has another distinct but related problem: my server's load average (which is usually around .25) rockets up to 20 or more and nobody can access my site just the same as the other case.  It also goes away after a few hours.  Restarting my server doesn't help; what can I do to make my site accessible again, and what is happening?  Relatedly, I found once that for a day or two, every time I started my service, it got a connection from a particular IP address and then crashed.  As soon as I started it up again, this happened again and it crashed again.  How is that similar, and what can I do about it?


My friend was asking "from which European cities can you fly non-stop to Mumbai?"  Similarly I'd like to know all cities in Europe with non-stops to Hong Kong.  (Note too that ideally it would be better to know "dailies"... since once a week etc kind of sucks.)  The only way I know to do this currently:if you go to the online live departures board for an airport, say Zurich, and if you look through a couple of day's worth, you will indeed, discover, pretty much all the non-stop flights from that city!  This is not ideal, so someone may have a better answer.  So, the best way to find this info?  All the non-stop possibilities from X to which European cities?

Assume that you want to go to Oslo. You want to aggregate all airports that are 100 kilometres from Oslo. This includes at least Gardemoen, Rygge and some others probably.  Is there any service that tracks all flights that go there?  Similarly for any other city.


I have a 18-55mm zoom lens with no Infinity symbol on it. Let's assume I want to capture stars in night. There are three ways to do it (If I am not wrong)   Use Auto focus (If your camera is able to set it) Use manual focus Use focus point to set focus  Auto Focus:  Now, What if I set my lens to Auto focus and put it to lowest F-stop (No zoom) number Is it not equivalent to setting infinity focus because I am allowing lens to capture the maximum light and allowing light to hit lens in parallel way?  Infinity Focus: As I mentioned that I don't have infinity sign on my lens. So, I set my lens on MF mode and rotate focus ring in clockwise (Assuming Infinity is on that side) and the zoom ring is exactly at the same position (same f-stop number) as I had in Auto focus mode. Isn't it going to capture the same image like I am having in Auto focus?  Last question is What is the use of 8-focusing point in Night photography? Will it play role when I have to capture only Moon (Assuming I am able to set the focus point on moon in night)?

I have a kit lens which has no markers. What would be a recommended way to find infinity focus on this lens?  I plan to shoot objects at night -- not necessarily stars or the moon. So, adjusting the focus using the viewfinder may not be an option.


I'm looking for a task manager for Windows 7 that shows which process is currently reading/writing on my HDD. I like how the Windows 8 and Windows 10 task manager shows the HDD activity in percent for every process. Is there a custom task manager for Windows 7 that is also has this functionality?  Thanks in advance!

Is there a utility for Windows that operates similarly to iotop for Linux?  I'm looking for simple tool that can tell me what applications are writing to disk and how much they're actually writing.


I have a class and there are some properties in it. I had written the getters and setters for those properties. Here is my code:  [DataMember] public string FullName {     get { return string.Format("{0} {1}", this.Name1, this.Name2); }     set { FullName = value; } }   But the problem is when I set values to Full Name..  var customer = new Customer {      FullName = customerPhone.Customer.FullName };   It gives the following exception..     An unhandled exception of type 'System.StackOverflowException'   How can I write the set property correctly?

I know java and would normally put in getter/setter methods. I am interested in doing it in C# with the following code, but it throws a StackOverflow exception. What am I doing wrong?  Calling Code  c.firstName = "a";   Property Code    public String firstName; {     get     {         return firstName;     }     set     {         firstName = value;     } }


Consider the following simple example:  \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[x=.2cm,y=.2cm]   \draw[ultra thick,opacity=0.5] (0,-1) -- (0,1);   \draw[ultra thick,opacity=0.5] (-1,0) -- (1,0); \end{tikzpicture} \begin{tikzpicture}[x=.2cm,y=.2cm]   \draw[ultra thick,opacity=0.5] (0,-1) -- (0,1) -- (-1,0) -- (1,0); \end{tikzpicture} \end{document}   The output looks like this:    What is interesting about this is of course the intersection of the lines at (0,0). It looks more dark in the left picture, which is presumably caused by the fact that TikZ actually draws the paths one-after-the-other, which yields a higher total opacity (combining both lines). In the second, right picture, the lines are all drawn in one go, which meas that the crossing will only be drawn once, after which the opacity will be applied.  This is all good, but my question is: Is there any way I can make sure that TikZ draws intersections of paths "correctly" (as in, double-layers them) also when drawing a single path in one go (that is, make the intersection in the right picture look like the one in the left picture), or is this a futile exercise?

How can I set the transparency so that the arrow belongs to the same transparency group as the path?    \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{decorations.markings} \begin{document} \begin{tikzpicture}   \tikzset{%     > = stealth,     arrow over path/.style = {%       decoration = {%         markings,         mark = at position .5 with {\arrow {>};}       },       postaction = decorate     }   }   \draw[arrow over path, semitransparent] (0,0) -- (1,1); \end{tikzpicture} \end{document}


Evaluate of number represented by the infinite series   $$\sqrt{\tfrac{1}{3} + \sqrt{\tfrac{1}{3} + \sqrt{\tfrac{1}{3} + \cdots }}}$$

(Fitzpatrick Advanced Calculus 2e, Sec. 2.4 #12)  For $c \gt 0$, consider the quadratic equation $x^2 - x - c = 0, x > 0$.  Define the sequence $\{x_n\}$ recursively by fixing $|x_1| \lt c$ and then, if $n$ is an index for which $x_n$ has been defined, defining  $$x_{n+1} = \sqrt{c+x_n}$$  Prove that the sequence $\{x_n\}$ converges monotonically to the solution of the above equation.  Note: The answers below might assume $x_1 \gt 0$, but they still work, as we have $x_3 \gt 0$.    This is being repurposed in an effort to cut down on duplicates, see here: .  and here: .


I would like to change color from div class. I searched the net for some info, but it's not working for me.  I have css style class in which I have property background-color, and I want to change this property from JS file.  I want in class gmBox change background-color:, how I can do this, from JS file?    .gmBox {   vertical-align: middle;   padding: 10px;   margin: 5px;   background-color: yellow;   color: black;   font-size: 23px;   border-radius: 5px; }
GM12

Anyone know a simple method to swap the background color of a webpage using JavaScript?


My project is a web project based on Java, Spring Boot, Hibernate, SQL and I want to know if I have payments in it, what is the best way to handle them. For example, I have: Controller A:   pay():     serviceA.pay();  Service A: @Transactional   pay():     serviceB.doesSomePaymentStuffDoesNotTrowException() @Transactional;     serviceC.payThrowsPaymentException() @Transactional;  What is the better exception type for a payment exception, checked or unchecked? How do you define and handle payment exceptions? Also, I would be grateful if you give me some material that I can read to enrich my knowledge on this subject. I know that the checked exceptions do not cause rollback on @Transactional methods, but the checked ones do.

In Java (or any other language with checked exceptions), when creating your own exception class, how do you decide whether it should be checked or unchecked?  My instinct is to say that a checked exception would be called for in cases where the caller might be able to recover in some productive way, where as an unchecked exception would be more for unrecoverable cases, but I'd be interested in other's thoughts.


Blender 2.79b, Win7/64... I've combined several mesh objects into one (using Join) in order to operate on them all with one Boolean shape without having to duplicate lots of modifiers (and other things).  However, at least one part of my new combined object seems to ignore the Boolean modifier. Here's the object:    I've highlighted the part which doesn't get Booleaned.  Here's the result of Boolean intersection with a scaled cylinder:    Also, note that the corresponding component on the left side is completely absent when the Boolean modifier is applied.  For completeness, here's the Boolean flipped to Difference mode. Again, one of these components is absent, and one is unclipped, but the other way around from the Boolean=intersect case:    So, I'm wondering... These components are identical, and so one was a copy of the other, flipped and translated. I didn't apply the location or rotation before joining. So I'm thinking that maybe when the Boolean modifier is active, one of these components is correctly clipped, but the other one is flipped and translated to be on top of the first one, and is missed by the Boolean modifier. Maybe.  However, what I'm missing is understanding how the rotation and position of components can persist even when they're all combined into one object. And more importantly... how to fix this! I tried separating by loose parts, then applying position and rotation to those two components, then re-joining, but it didn't change anything.  Or maybe it's nothing to do with rotation and position, but there's some strange property of these polygons...?  Ideas?

I'm trying to model an , but it's not going so well when it comes to the magazine of the weapon.   Next to the magazine is a mesh. I want to cut holes in the mag with that mesh. But the magazine just goes invisible or connects with the mesh when trying to execute the Boolean Modifier. I have tested to invert the normals and some other stuff, but it isn't working.


I've searched many references, but now I'm stuck. What I understand so far is that a transistor is made up from two diodes, and as far as I know, the function of diode is only allow a current flow from one direction (ideal diode).  I've looked at this diagram of transistors:    For PNP transistor: If I trigger the Base with some small current, Ib, how can the current from the Collector flow to the Emitter, if there's a diode there (in the Emitter)?  Same question with NPN transistor.  I'm stuck here....

Another form of the question is: will joining two diodes with wires (pn-np) make a transistor-equivalent?  I read that they are not equivalent, but why?


I already searched for questions about forward declaration but couldn't find a answer to my case.  I have a class Foo:  Foo.h  #pragma once  #include <string>  namespace aaa::xxx::yyy::zzz {     class Foo {     public:         Foo() = default;          std::string get_value() const         {             return m_value;         }          void set_value(const std::string& value)         {             m_value = value;         }     private:         std::string m_value{};     }; }   This class Foo is used in annother class Bar:   Bar.h  #pragma once  namespace aaa::xxx::yyy::zzz  {     class Foo; }  namespace aaa::bbb::ccc::ddd {     using Foo = aaa::xxx::yyy::zzz::Foo;      class Bar      {     public:         Bar() = default;          Foo get_foo() const;     private:         Foo m_foo{};     };  }   Bar.cpp  #include "Bar.h"  #include "Foo.h"  namespace aaa::bbb::ccc::ddd {     using Foo = aaa::xxx::yyy::zzz::Foo;      Foo Bar::get_foo() const     {         return m_foo;     }  }      Now i dont know what i did wrong with the forwad declaration. I declared class Foo before class Bar with its namespace but still its states that class Foo is undefined.  So the Question is how to forward class Foo correctly?  EDIT: Changing Foo m_foo{}; to Foo m_foo; as suggested still produces the same error.

I am looking for the definition of when I am allowed to do forward declaration of a class in another class's header file:  Am I allowed to do it for a base class, for a class held as a member, for a class passed to member function by reference, etc. ?


I have around 6-7 DOMAINS hosted on linode server where apache is a webserver. One domain is ssl configured and other runs on http only.   Suppose  is ssl configured .  others are   http://www.example1.com  http://www.example2.com http://www.example3.com        http://www.example4.com       What would be the dynamic rule if someone put  or others get redirect to  and so on  like in virtalhost something like     <If "%{HTTP_HOST} != 'example.com'">      Redirect permanent / http://%{HTTP_HOST}/  </If>   above written hack doesn't work . any help?

Previously I asked a question here:  about setting up secure and non-secure domains on a single IP.  Opinions were mixed, but it appears SNI hold the solution. Unfortunately I cannot get it work as required.    — Works as expected  — Presents domaina.com certificate, not as expected. I would like it to not respond to SSL requests.   I would like my server to only send the certificate for domaina.com and no other host names, even if this means sending a 403 error to non-SNI clients. My current configuration on vanilla Ubuntu Server 12.04 LTS is below:  Ports.conf  … <IfModule mod_ssl.c>     NameVirtualHost *:443     Listen 443 </IfModule> …   Domain A Virtual Host  <VirtualHost *:80>     ServerName   domaina.com     ServerAlias  www.domaina.com     DocumentRoot /var/www/domaina.com/public     ErrorLog     /var/www/domaina.com/logs/error.log     CustomLog    /var/www/domaina.com/logs/access.log combined </VirtualHost>  <IfModule mod_ssl.c> <VirtualHost *:443>     ServerName   domaina.com     ServerAlias  www.domaina.com     DocumentRoot /var/www/domaina.com/public     SSLEngine on     SSLCertificateFile      /etc/apache2/ssl/domaina.com.crt     SSLCertificateKeyFile   /etc/apache2/ssl/domaina.key     SSLCertificateChainFile /etc/apache2/ssl/domaina.com.ca-bundle </VirtualHost> </IfModule>   Domain B Virtual Host  <VirtualHost *:80>     ServerName   domainb.com     ServerAlias  www.domainb.com     DocumentRoot /var/www/domainb.com/public     ErrorLog     /var/www/domainb.com/logs/error.log     CustomLog    /var/www/domainb.com/logs/access.log combined </VirtualHost>   apache2ctl -S  VirtualHost configuration: wildcard NameVirtualHosts and _default_ servers: *:443                  is a NameVirtualHost          default server domaina.com (/etc/apache2/sites-enabled/domaina.com:12)          port 443 namevhost domaina.com (/etc/apache2/sites-enabled/domaina.com:12) *:80                   is a NameVirtualHost          default server domaina.com (/etc/apache2/sites-enabled/domaina.com:3)          port 80 namevhost domaina.com (/etc/apache2/sites-enabled/domaina.com:3)          port 80 namevhost domainb.com (/etc/apache2/sites-enabled/domainb.com:1) Syntax OK   How can you get rid of the defaults?


My words (phone numbers) may have in the beginning "00" or "+".   Example number phone:   00xxx xx xxxxxxx +xxx xx xxxxxxx (+xxx) xx xxxxxxx (00xxx) xx xxxxxxx   I have:  Regex regexObj = new Regex(@"^\(?[+( ]?([0-9]{3})\)?[) ]?([0-9]{2})[- ]?([0-9]{7})$");  if (regexObj.IsMatch(TextBox1.Text)) {     // IF OK     string formattedPhoneNumber = regexObj.Replace(TextBox1.Text, "(+$1) $2 $3"); }   How to put it in the regular expression? For now I can only put the "+", and "(" , ")"    thanks

I'm trying to put together a comprehensive regex to validate phone numbers. Ideally it would handle international formats, but it must handle US formats, including the following:   1-234-567-8901 1-234-567-8901 x1234 1-234-567-8901 ext1234 1 (234) 567-8901 1.234.567.8901 1/234/567/8901 12345678901   I'll answer with my current attempt, but I'm hoping somebody has something better and/or more elegant.


I was trying to install wine through the Ubuntu software as seen in the screenshot below:    but got a error saying that it has unmet dependencies.  I am running Ubuntu 18.04 LTS on my desktop with AMD Ryzen 5 (1600), 1050ti Nvidia graphics card  what should I do to resolve this problem?

After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


Looking for a book about linear algebra that explains everything, and shows real usage examples. I mean that everything that written in the book is to solve real problems.  The examples can be in ANY field.   I saw here some recommendation for "Linear Algebra Done Right", but I don't see that it have examples.  In other words: I looking for a book that starts with a problem, and then teach the minimum required knowledge to solve the problem. And then shows the next problem that linear algebra solves.  I have read   (It is not opinion-based, an answer that mentions a book that have this  mind will be accepted)

I am looking for suggestions, it has to be a self study book and should be able to relate to applications to real world problems. If it is more computer science oriented , that would be great.


While away from the UK in Zambia my wife ran the update through package manager and now we have no icons.  We have the wallpaper but cannot do anything!

When I login, nothing happens.   I am presented with my desktop wallpaper.    No Dash, no Launcher, nothing.


My goal is simple. Whenever someone makes a called on my phone I want to be able to use my computer as a headset. This way I could use my Mic to talk back at the person on the other end, and my headphones to listen.   I'm running Ubuntu Linux 15.10, and using a bluetooth dongle 4.0   Progress.. I have no problems pairing my phone with my computer, nor any issue with sending files over the bluetooth connection. The phone, however, doesn't see the computer during calls.   Anyone out there knows what to do?

I am trying to use a Bluetooth headset on an Ubuntu PC. I am able to connect phone to pc via BT. I can stream music to PC. But cannot hear call audio. I have checked in Android phone logs, and BT sco link is established. But when making a call or virtual call (play audio through sco path in Android phone) the audio is not audible in PC headset. SCO packets are NOT appearing in btmon logs either. Anyone successfully done this?  version- ubuntu 16.04 Installed- bluez, ofono, pulseaudio pactl sink: Name- bluez_sink.22_22_8E_DE_B9_2B,             Name: alsa_output.pci-0000_00_1b.0.iec958-stereo pactl source: Name-bluez_sink.22_22_8E_DE_B9_2B.monitor               Name: alsa_input.pci-0000_00_1b.0.analog-stereo


It's , because this question isn't about shredding files that already deleted, it's about deleting them in the first place in a way that recovery software wouldn't find it. I delete photos, but this software  still recovers them. I think photos are really deleted, and those that restored are thumbnails, because when I restore them they doesn't look that sharp. I delete photos through the Gallery application. I tried to clean Gallery app cache, that doesn't help. I tried to use firmware (preinstalled by manufacturer) that cleans Android of junk (like cache etc), but the application above still finds it. And I don't know how to completely remove the files. It's like I've got a device with undeletable files and starting really hate Android (it's really betrayal and annoying behavior). So if you could recommend some application may be (preferably from a well known company or free software, like those  from F-Droid repository) I would appreciate it. Thanks.

Is there a good way for shredding my Android's free space to ensure data cannot be recovered? I want to permanently shred my deleted files in free space. I have heard of secure eraser and ishredder.


how do you create an apostrophe, but with letters? I'm having trouble on the web finding how to do it with letters instead of quotation, any help here?

Seemingly simple, but I cannot find anything relevant on the web.  What is the correct HTML code for an apostrophe? Is it &#8217;?


I have a table with a composite key (a,b) wherein I want to return the first key and the count of the second key that have the exact same set. For example if we have:  a | b ------- 01 | 2 01 | 3 02 | 1 02 | 2 02 | 3 03 | 2 04 | 2 04 | 3   Since 01 and 04 have the same second column (2,3) and the others have none we get: 01 | 1 02 | 0 03 | 0 04 | 1   This should apply to any set of composite keys (a,b) and not its not just inclusion but equality we're looking for.

I am given the schema: EMPLOYEE(Fname,Ssn,Dno) DEPARTMENT(Dname,Dnumber,Mgr_ssn,Mgr_start_date) PROJECT(Pname,Pnumber,Plocation,Dno) WORKS_ON(Essn,Pno) fiddle:  Primary keys are given in bold. The question: Is it possible to define a view that will report the following detail for each employee: Ssn and the number of employees who work on exactly the same set of projects? Explain why not or given an SQL query. My idea was to find unique pairs of employees and check if projects worked by first employee equal those of the second one (this was done by using set operation except as if s1 except s2 union s2 except s1 is empty than it seems like s1 and s2 are equal) My attempt for this was: SELECT e1.ssn,count(e2.ssn) FROM EMPLOYEE e1, EMPLOYEE e2 WHERE e1.ssn < e2.ssn AND NOT EXISTS (  (  (SELECT Pno  FROM WORKS_ON w1  WHERE w1.Essn = e1.Ssn)  EXCEPT ALL  (SELECT Pno  FROM WORKS_ON w2  WHERE w2.Essn = e2.Ssn)  )   UNION ALL    (  (SELECT Pno  FROM WORKS_ON w2  WHERE w2.Essn = e2.Ssn)  EXCEPT ALL  (SELECT Pno  FROM WORKS_ON w1  WHERE w1.Essn = e1.Ssn)  ) ) GROUP BY(e1.ssn)  Does this query look correct? Also is there a neater way of doing this? As a final side note what exactly determines if it is impossible for us to construct an SQL query for a problem?


What is the past tense of learn?  Is it learned or learnt?  I've seen people use "learnt" in articles I've read on the internet and I didn't or haven't seen crazy words like this when I was in jr high or high school (which was a while ago).  Is "learnt" a real word or is this like people mis-using the word "loose" when they mean "lose"?

In my very first question, Carlo made an edit stating that learnt is a rare past tense of learn. I am accustomed to using learnt for past tense and learned as an adjective (as in He is a learned scholar.) I checked into a couple of dictionaries and they say both are valid past tenses. Do I stand a risk of not being understood if I use learnt?  In a similar vein, should dreamed be used as a past tense for dream instead of dreamt? I can't think of other such conflicts, but I guess there must be more.


I am iterating over an array in python:  for g in [ games[0:4] ]:     g.output()   Can I also initialise and increment an index in that for loop and pass it to g.output()?  such that g.output(2) results in:  Game 2 - ... stuff relating to the object `g` here.

How do I access the index in a for loop like the following?  ints = [8, 23, 45, 12, 78] for i in ints:     print('item #{} = {}'.format(???, i))   I want to get this output:  item #1 = 8 item #2 = 23 item #3 = 45 item #4 = 12 item #5 = 78   When I loop through it using a for loop, how do I access the loop index, from 1 to 5 in this case?


I was trying in vain to use a rotated ellipse today and finally got it to work in an extremely hackish way. Trying to follow up, I turned to the manual (pg. 26):  You can also append an ellipse to the path using the ellipse operation. Instead of a single radius you can specify two of them, one for the x-direction and one for the y-direction, separated by and: \tikz \draw (0,0) ellipse (20pt and 10pt); To draw an ellipse whose axes are not horizontal and vertical, but point in an arbitrary direction (a “turned ellipse” like) you can use transformations, which are explained later. The code for the little ellipse is \tikz \draw[rotate=30] (0,0) ellipse (6pt and 3pt);, by the way.  Now, perhaps I just didn't understand transformations well enough, but I assumed that: \draw[rotate=angle] (x,y) ellipse (width,height);  would produce an ellipse centered at (x,y), rotated by angle and with the eccentricity values of width and height. Instead, I seem to be getting an ellipse rotates about the origin if (x,y) is anything other than (0,0). Here was my test: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}  \draw (0,0)--(10,0); \foreach \x in {0,...,10}   \draw (\x,0)--(\x,-.1) node[anchor=north] {\x};  \draw (0,0)--(0,10); \foreach \y in {0,...,10}   \draw (0,\y)--(-.1,\y) node[anchor=east] {\y};  \draw[help lines] (0,0) grid (10,10);  \draw (5,5) ellipse (10pt and 20pt);   \draw[rotate=45] (5,5) ellipse (10pt and 20pt);  \end{tikzpicture} \end{document}  This produces the first ellipse at (5,5) as expected. The second, though, shows up rotated but at approx. (0,7). What am I missing? Why is rotate rotating it "about" something rather than just putting it at the coordinates and rotating it in place?

I am trying to create a beamer animation using tikz, but I can't even get basic rotating of a tikz image working as desired.  I have a rectangle specified by  \draw[rounded corners,dotted] (-3.5,0) rectangle (-0.5,2);   I would like to rotate this rectangle about the point (-1,.5) (which is near the bottom right corner of the rectangle).  I've tried:  {\rotatebox[origin=c,x=-1,y=.5]{130}{             \draw[rounded corners,dotted] (-3.5,0) rectangle (-0.5,2);}}   But this produces an error.  If I just use the origin=c option, it compiles, but it rotates the rectangle about the point (0,0).  I've also tried it with just the x=-1,y=.5 (without the origin option), and it fails to compile.  I have searched the documentation, which is where I learned about the options x=xdim and y=ydim.  However, I can't find a single example demonstrating how these options should be used.  Any suggestions would be greatly appreciated.    Also, if there is a better command for rotating things that will be more suitable for use in a beamer animation, please let me know.  Thanks!


If $∫_0^{π/2} \cos ^nxdx=I_n$, prove that $nI_n=\left(n-1\right)I_{n-2}, \left(n>1\right)$  I took $\cos ^nx$ as $\cos ^{n-2}x\cos ^2x$ and replaced $\cos ^2x$ with $1-\sin ^2x$. Then integrated using by parts. Could not arrive at the given result

I am trying to prove  $$\int\cos^n x \ dx = \frac{1}n \cos^{n-1}x \sin x + \frac{n-1}{n}\int\cos^{n-2} x \ dx$$  This problem is a classic, but I seem to be missing one step or the understanding of two steps which I will outline below.   $$I_n := \int\cos^n x \ dx = \int\cos^{n-1} x \cos x \ dx \tag{1}$$  First question: why rewrite the original instead of immediately integrating by parts of $\int \cos^n x \ dx$?  Integrate by parts with $$u = \cos^{n-1} x, dv = \cos x \ dx \implies du = (n-1)\cos^{n-2} x \cdot -\sin x, v = \sin x$$  which leads to  $$I_n = \sin x \ \cos^{n-1} x +\int\sin^2 x (n-1) \ \cos^{n-2} x \ dx \tag{2}$$  Since $(n-1)$ is a constant, we can throw it out front of the integral:  $$I_n = \sin x \ \cos^{n-1} x +(n-1)\int\sin^2 x \ \cos^{n-2} x \ dx\tag{3}$$  I can transform the integral a bit because $\sin^2 x + cos^2 x = 1 \implies \sin^2 x = 1-\cos^2 x$  $$I_n = \sin x \ \cos^{n-1} x + (n-1)\int(1-\cos^2 x) \ \cos^{n-2} x \ dx \tag{4}$$  According to Wikipedia as noted , this simplifies to:  $$I_n = \sin x \ \cos^{n-1} x + (n-1) \int \cos^{n-2} x \ dx - (n-1)\int(\cos^n x) \ dx \tag{5}$$  Question 2: How did they simplify the integral of $\int(1-\cos^2 x) \ dx$ to $\int(\cos^n x) \ dx$?  Assuming knowledge of equation 5, I see how to rewrite it as  $$I_n = \sin x \ \cos^{n-1} x + (n-1) I_{n-2} x  - (n-1) I_{n} \tag{6}$$  and solve for $I_n$. I had tried exploiting the fact that  $$\cos^2 x = \frac{1}{2} \cos(2x) + \frac{1}{2} $$  and trying to deal with $\int 1 \ dx - \int \frac{1}{2} \cos (2x) + \frac{1}{2} \ dx$  which left me with $\frac{x}{2} - \frac{1}{4} \sin(2x)$ after integrating those pieces. Putting it all together I have:  $$I_n = \sin x \ \cos^{n-1} x + (n-1) I_{n-2} x \left(-(n-1) (\frac{x}{2} - \frac{1}{4} \sin 2x) \right) \tag{7}$$  but I'm unsure how to write the last few terms as an expression of $I_{something}$ to get it to match the usual reduction formula of   $$\int\cos^n x \ dx = \frac{1}n \cos^{n-1}x \sin x + \frac{n-1}{n}\int\cos^{n-2} x \ dx$$


I have filenames like:  Some Text (1).jpg Some Text (2).jpg .. Some Text (15).jpg Some Text (16).jpg .. Some Text (101).jpg Some Text (102).jpg   And I would like to add 0 befor the numbers, so that I have always 3 numbers. The upper examples would become:  Some Text (001).jpg Some Text (002).jpg .. Some Text (015).jpg Some Text (016).jpg .. Some Text (101).jpg Some Text (102).jpg   Is there any way to automate that?

I've got bunch of files with ill-formed numbering:  prefix-#.ext       | for files with number 1-9 prefix-##.ext      | for files with number 10-99 prefix-###.ext     | for files with number 100-999   Due to further processing I need all of their names to be in format: prefix-###.ext. Is there any easy way to do that?


What are the helper functions available in javascript to copy all properties from one object to another?   I believe we can copy all properties from one object to another by using simply a "for" loop.   But are there any other methods available which we can just chain to an object and achieve the goal?

What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists.


Let $K/E/F$ be a tower of algebraic extensions. How do I prove that $[K:E]_s[E:F]_s = [K:F]_s$? This is done in all the books I searched for finite extensions (when it follows trivially from a counting argument).  The corresponding article at stacks project suggests taking $\sup$ in $[K':E']_s[E':F]_s = [K':F]_s$ over $K'/F$ finite, $E' := E \cap K'$, but it is far from obvious that this yields the first relation.  I would appreciate a reference for this; I need it in a proof that all extensions $\mathbb{F}_p \to K$ are separable in the general sense.  Edit: Of course, since the counting argument remains valid in the infinite case, it is enough to check that, for any (infinite) algebraic extension $E/F$, $[E : F]_s = |\mathrm{Hom}(E, \overline{F})|$, where $\overline{F}$ is some algebraic closure of $F$ and the morphisms extend some given morphism $F \to \overline{F}$.

In what follows, let $E / F$ be an algebraic extension, $h(x),f(x)\in F[x]$ polynomials, $h(x)$ irreducible.   Definitions.   We say $h(x)$ is separable if it has not repeated factors. We say $f(x)$ is separable if all its irreducible factors are separable. We say $\alpha\in E$ is separable over $F$, if its minimal polynomial over $F$ is. The extension $E/F$ is separable if all the elements of $E$ are separable over $F$. We define the field $$\newcommand\sclo{\operatorname{Scl}}\sclo_F E= \{\alpha\in E : \text{ $\alpha$ is separable over $F$ }\}$$ as the separable closure of $F$ in $E$. The separability degree of the extension $E/F$ is defined as $$[E:F]_s = [\sclo_F E:F].$$   Now, suppose the extension $E/F$ is finite.  My question is: how can one proof that with these definitions, if $B$ is an intermediate field of the extension $E / F$, then $$[E:F]_s = [E:B]_s[B:F]_s?$$  I know that the purpose of the separability degree is to count in how many ways we can extend certain injective homomorphism to an automorphism. If one starts defining separability degree this way, as done in the book by Lang, the result follows without much difficulty.  I wonder how to achieve it in this way.


I am making select compiled queries as shown   but my question is how to make compiled queries for Insert and Update?  mine Insert query is  DataClassesDataContext db = new DataClassesDataContext(); tbl_desc_index tabledesc = new tbl_desc_index(); tabledesc.ed_journal_id = Convert.ToInt32(Server.HtmlEncode(Request.Cookies["j_id"].Value)); tabledesc.editor_id = Convert.ToInt32(Server.HtmlEncode(Request.Cookies["editorid"].Value)); tabledesc.short_desc = ck1.Text; tabledesc.abt_journal = ck2.Text; tabledesc.aim_scope = ck3.Text; tabledesc.indexed_in = ck4.Text; db.tbl_desc_indexes.InsertOnSubmit(tabledesc); db.SubmitChanges();   Update query is   DataClassesDataContext db = new DataClassesDataContext();  var update = db.tbl_desc_indexes.First(p => p.ed_journal_id == Convert.ToInt32(Server.HtmlEncode(Request.Cookies["j_id"].Value)) && p.editor_id == Convert.ToInt32(Server.HtmlEncode(Request.Cookies["editorid"].Value)));   update.short_desc = ck1.Text;  update.abt_journal = ck2.Text;  update.aim_scope = ck3.Text;  update.indexed_in = ck4.Text;               db.SubmitChanges();

All,  So I've got all my select queries in LINQ-to-SQL converted to using CompiledQueries to speed things up.  Works great so far for select statements, but I haven't been able to figure out how to pre-compile insert, update, or delete statements.  Granted, when you're inserting, deleting or updating in LINQ-to-SQL, you have to use the object model.  But obviously somewhere along the way it generates a query, which would be nice to pre-compile and store in a static member.  Is this possible?  What is LINQ performance like for updates, deletes and inserts when its not pre-compiled?  I could see it being a lot faster than the selects, because what they do underneath is a lot simpler and less "dynamic"...


I know that ++variable adds 1 to the variable, but what about variable++ and variable--?

Is there a difference in ++i and i++ in a for loop? Is it simply a syntax thing?


Based on my very basic current understanding of decibels in electronics, it is said that I should use the db = 10Log(p1/p2) formula if I want to calculate the power ratio in db between two values and the db = 20Log(v1/v2) formula if I want to calculate the voltage (or current) db ration between two values.  Although I understand how these formulas are derived, I don't understand why we need two formulas (one for power and one for voltage), are two formulas really necessary? I am asking this because as far as I understand, the calculated db value by itself is just a ratio between two values and if that is the case, isn't a ratio just a ratio and nothing more?  In other words, in my head, a doubling of power or doubling of voltage is the exact same thing! Both values are being doubled so I would expect the same db ratio result from both comparison (power and voltage). Below are two examples:  Example for power:  P1 = 200; p2 = 100;  db = 10Log(p1/p2) = 3 db.   Example for voltage:  v1 = 200; v2 = 100;  db = 10Log(v1/v2) = 3 db ... (notice not using 20Log(v1/v2) formula here)   The logic above makes sense to me because I see doubling as doubling, it does not matter to me if we are doubling power or doubling voltage, both measurements are being doubled so why should't they have the same db value? Specially since we already specify watts or volts on the db units result (dBm, dBv dBu, dBc, etc)?  What am I missing?  Thanks.

1) Why does power gain use a coefficient of 10 unlike the other two?  2) Why can't power gain be negative?


I would like to be able to find find the difference between an employee's join date and today.  Here is my C# code:      DateTime JoinDate = Convert.ToDateTime(TextBox1.Text );     DateTime TodayData = DateTime.Now;     TimeSpan servicePeriod = TodayData - JoinDate;     Response .Write ( servicePeriod);   It gives an incorrect answer:  1.11:52:52.6477489    The format of TextBox1.Text is MM/dd/yyyy.  I want the output in Years, Months and Days.

What is the recommended way of formatting TimeSpan objects into  a string with a custom format?


I have forgotten my Gmail password and have lost my phone SIM card.  How can I recover access to my email account?

I have forgotten the password or username for my Google account, or I'm unable to access my account for other reasons.  How can I recover my account?  (This Q&A is meant as a general description for all Google and Gmail username/password questions. See: )