Given that time slows to a stand-still at the event horizon of a Black Hole, how long would it take a black hole to form, from the perspective of an outside observer?  It would seem, as a massive star collapses into a Black Hole, time on the surface of the star would slow as the gravity on the surface reaches the level of a black hole.  Within the collapsing star, gravity is less and time continues closer to normal speed.  Looking at it from the outside, far away, the black hole never quite forms.  As it would take an infinite amount of time.  Any thoughts on this?

One thing I know about black holes is that an object gets closer to the event horizon, gravitation time dilation make it move more slower from an outside perspective, so that it looks like it take an infinite amount of time for the object to reach the event horizon. It seems like a similar process should slow the formation of the black hole itself: As the star collapses, its gravitational time dilation make itself collapse more slowly. This make me wonder, are what astronomers claim to be black holes really black holes, or are they stars that progressively make themselves more similar to one without actually reaching the stage of having an event horizon?  EDIT: Contemplating one answer, I realize the question is ambiguous. What does finite time mean in general relativity. Here is a less ambiguous question: Is there a connected solution of 3+1 dimensional general relativity with one space-like slice not have a singularity, and another space-like slice having one.


I'm confused about how to hyphenate two locations in a single sentence. For instance:  "A New York and London-based agency focused on making brands heard."  or   "A New York- and London-based agency focused on making brands heard."  Which one is the right way to hyphenate?

If multiple hyphenated terms share the same latter half, and I wish to list them without repeating that latter half, how should the hyphens be placed?  For example:     I will be investigating control issues in ground-based, water-based, and air-based robots.   If I do not want to repeat based, could I write:     I will be investigating control issues in ground-, water-, and air-based robots.   Is it correct to just leave a hyphen dangling after ground and water?  If not, how should it be written? I know the original sentence doesn't sound too bad, but I really just want to know the punctuation rule (or the convention in American English if there is no rule).


I'm certain plurals are discussed endlessly, but I haven't located an answer to this specific usage:  In the following sentences I believe the first one is correct because it discusses a singular list or group containing multiple names, where the second one treats the group as if it is "multiple groups." Which sentence is correct?   Once you get the software set up, here is our names: Bob, Joe, Sam. Once you get the software set up, here are our names: Bob, Joe, Sam.   Thank you and kind regards!  Edited to add the list after the colon. So now that the singular "list" is shown do the answers below still apply? Is "2" still correct?

Here is the documents needed.     Here are the documents needed.       Which is grammatically correct and why? My guess would be the second one because of the plural form.


This is a  about redirecting from http to https in Apache Related:     I have an Appache web server which serves both http://example.com/ and https://example.com/. I want to redirect all http requests to https. Currently I'm using this .htaccess rule to redirect http requests to https. RewriteEngine On RewriteBase / RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}   It's working as expected for example.com but the same rule is not working for sub links, when I access existing links, like example.com/about it will still load in http, no redirection happens for existing links. How can I make Apache redirect all http requests to https?

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


is there any possible way to enlarge this toolbar where sheets are listed (Sheet 1, Sheet 2, Sheet 3, ...)? See the below screenshot:     In my case, these cards are so small that it's barely possible to click on it. Please help!

I am using LibreOffice 3.5.3.2 (Ubuntu 12.04) and the buttons to switch tabs in Calc are written with small fonts. They're so small I can't even read what is written on them.  I could not find a way to increase font size. Is this problem happenning only with me? Does anyone know a way to increase the font size of sheet names?


I am an Indian Citizen and have Irish Visitor visa and will be travel transiting through London Heathrow to Dublin. The stop over is 3 h 45 mins.  As I am transiting to common travel area (Ireland), it states on the website that I may need another type of visitor visa.  Statement from uk gov website 3. Visitor in Transit visa:     "You’ll need to apply for another type of visitor visa if you’ll be   either: travelling to the Republic of Ireland, the Channel Islands or   the Isle of Man"   What type of visa is that?

Is there a website or some other way to find out if I need a transit visa for a short stop in the UK on my way somewhere else? Ideally this should give me the answer for all nationalities, and take into account any other visas I may have.


From Einstein's principle of relativity space-time and mass are relative to the frame from which they are being observed.  Now would that mean a ball moving at the speed of light wrt to earth would become a black hole for an observer on earth but stay normal for an observer moving with the ball at same speed?  If not then how would you justify the observation of infinite relative mass ball not turning into a black hole from the earth frame of reference?

I'm a big fan of the podcast Astronomy Cast and a while back I was listening to a Q&A episode they did. A listener sent in a question that I found fascinating and have been wondering about ever since.   From the show :      Arunus Gidgowdusk from Lithuania asks: "If you took a one kilogram mass and accelerated it close to the speed of light would it form into a black hole? Would it stay a black hole if you then decreased the speed?"   Dr. Gay, an astrophysicist and one of the hosts, explained that she'd asked a number of her colleagues and that none of them could provide a satisfactory answer. I asked her more recently on Facebook if anyone had come forward with one and she said they had not.  So I thought maybe this would be a good place to ask.


Short version of my question: Why is it common practice in Python to initialize an empty list even when the size of the list might change many times such as the following:  arr = [] for i in range(10):    arr.append(i)   Isn't it computationally expensive to change the size of an array iteratively?  Long version of my question: I'm used to using MATLAB and am relatively new to Python. When I want to create an array, it is common practice in MATLAB to initialize an array of zeros of appropriate size, and then replace the elements of the array with the elements you want to end up with. This is because changing the size of an array iteratively in MATLAB is computationally expensive. Is there something about Python that avoids this expense? When I see people answer Python questions on this website that involve preinitializing a list to be added to, they always create an empty list and subsequently change the size, something I have always regarded as inefficient.

Code like this often happens: l = [] while foo:     # baz     l.append(bar)     # qux  This is really slow if you're about to append thousands of elements to your list, as the list will have to be constantly resized to fit the new elements. In Java, you can create an ArrayList with an initial capacity. If you have some idea how big your list will be, this will be a lot more efficient. I understand that code like this can often be refactored into a list comprehension. If the for/while loop is very complicated, though, this is unfeasible. Is there an equivalent for us Python programmers?


What is Moment generating function in layman terms. I am not able to understand what MGF is.

What is a Moment Generating Function (MGF)?  Can you explain it in layman's terms and along with a simple & easy example?  Please, limit using formal math notations as far as possible.


How do you find a square matrix $X$ from an equation of the type  $AX = XB$?  ($A$ and $B$ are known square matrices)  How do I scale the solution up to multiple $A$s and $B$s for a single unknown $X$, i.e.  $\forall_{i=1...n} A_i X=XB_i$  Besides finding a solution, I would like to know what the problem is called. I am sure it pops up in lots of different research areas, and must have been solved before, but I don't know what exactly to ask Uncle Google.  Thanks you all in advance.

I'd like to solve $AX -BX + XC = D$, for the matrix $X$, where all matrices have real entries and $X$ is a rectangular matrix, while $B$ and $C$ are symmetric matrices and $A$ is formed by an outer product matrix (i.e, as $vv^T$ for some real vector $v$) while $D$ is 'not' symmetric. $A,B,C,D$ matrices are fixed while $X$ is the unknown.  How can this equation be solved? Secondly, is there any case, where the solution of this equation has a closed form?


Can anybody please explain what the difference is between a function declaration and a function definition in JavaScript?

I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other?


More specifically, why does having two objects of different weights make the balance lean to one or the other then stop partway? Why does the balance not just keep tilting until it falls to the side? How can something be heavy enough to tip the balance but not heavy enough to make it tilt the rest of the way?

I'm talking about a beam balance(a simple weighing balance with a beam and two pans hung on either side)   As answered in a previous , the beam comes back to the original position when one side is pushed down and released because the centre of gravity of the beam is a little below the axis of rotation.   practically, when unequal weights are put to the pans, the beam gets tilted proportional to the weight added to each side. Yet, according to my knowledge, this cannot happen theoretically.  for example, if a weight of M is added to the left pan , and a weight of m is added to the right pan, and M>m, and the length of the beam is 2l, the torques acting around the point of rotation would be Ml- anticlockwise and ml-clockwise. Then the resultant torque would be (Ml-ml) anticlockwise. hence theoretically, the beam must rotate anticlockwise by nearly 90 degrees, which means the left pan (the pan with weight M) must move down as much as possible.(Please note the small torque due to the weight of the beam has been ignored)   But what really happens is the beam gets tilted proportional to the weight added to each side. How can this be?


I'm trying to read in a text file from the command prompt in C#, via   program.exe < textfile.txt    However, I cannot find the correct way to do this.  So far, I've only been able to pass the path and the filename to string [] args and then opening the file with the StreamReader class. While this is an acceptable alternative, I've been told that the method with "<", which I suppose is a redirection of standard input, offers advantages like not requiring file handling.  Can anyone give some insight into this?   edit: Program.exe is my C# application.

I know how to program Console application with parameters, example : myProgram.exe param1 param2.  My question is, how can I make my program works with |, example : echo "word" | myProgram.exe?


Let $G$ be a finite abelian group, $g\in G$ be an element of order $n$ and  $\xi = \exp (\frac{2\pi i}{n})$. I want to show that for each $0\leq i\leq n-1$, there are exactly $\frac{|G|}{n}$ group homomorphisms $G\to \mathbb{C}\setminus\{0\}$ which satisfy $g\mapsto \xi^i$. I applied the structure theorem of finite abelian group, but it doesn't seem to help me.

If $G$ is an abelien group, let $\hat{G}$ be the set of all   homomorphisms of $G$ into the group of nonzero complex numbers under   multiplication. If $\phi_1, \phi_1\in \hat{G}$ define $\phi_1\cdot  \phi_2$ by $(\phi_1\cdot \phi_2)(g)=\phi_1(g)\phi_2(g)$ for all $g\in  G$.      If $G$ is a finite abelian group prove that $o(G)=o(\hat{G})$ and $G$   is isomorphic to $\hat{G}$.   The case when $G$ is finite cyclic is easy because in this case $\hat{G} \cong G$. Let's consider the case when $G$ is abelian group of order $p^n$, $p$ - prime.   By Fundamental theorem on finite abelian groups we have the following: $$G=\langle a_1 \rangle_{p^{n_1}}\times \langle a_2 \rangle_{p^{n_2}} \times \dots \times \langle a_k \rangle_{p^{n_k}},$$  where $n_1\geq n_2\geq \dots \geq n_k>0$ and $n_1+\dots+n_k=n$.   Let $A_i=\langle a_i \rangle_{p^{n_i}}$ and $A_i$ are cyclic groups then $A_i\cong \hat{A_i}$. So we have the following $$G=A_1\times \dots \times A_k\cong \hat{A_1}\times \dots \times \hat{A_k}.$$  Then I was trying to think about $\hat{G}$ and I think that $\hat{G}=\hat{A_1}\times \dots \times \hat{A_k}$ which follows that $G\cong \hat{G}$.   How to prove rigorously that $\hat{G}=\hat{A_1}\times \dots \times \hat{A_k}$? I am not able to prove it.


We have an AppExchange App which needs to fetch data from an external application via API Calls.  OAuth is setup in the external application. API calls need to happen in the context of individual user through this OAuth flow and NOT FOR a single Integration User. For using the External API, every user has to follow the OAuth flow and get authenticated once to the external application and their Access Token/Refresh Token needs to be stored in salesforce. The number of users can be more than 5k. So we need to store Access Tokens/Refresh tokens for these 5000 plus users in a secure way.  Can we use Named-Credentials in this scenario? Will there be any manual intervention for this? When we use Named-Credentials for this, can they be accessed in Apex?

My question is almost similar to one mentioned in 'Auth Provider with per-user Named Credential' (). I am trying to authenticate and make a API call when a new or existing Salesforce community users try to log in. The Authentication is provided by 3rd party (Cognito). So, the requirement is :  User to be authenticated using the 3rd party system for login. After successful authentication and before community page is displayed, the API call is to be made to 3rd party system to get more details about the user.  In order to achieve this:  Created an Open ID Connect Auth. Provider Use the registration handler on the Auth. Provider to create/link a new/existing user. Use a login flow for API call. Use Per User Identity Type Named Credential to make API calls.  No, where I am having issue is once the user has authenticated successfully, how do I allow the user to make API call without authenticating it again. I am getting the error: An Apex error occurred: System.UnexpectedException: You don't have permission to view this data, enter credentials for the named credential in your personal settings. Or ask your Salesforce admin for help. I believe this error is due to the fact that the user is not listed under 'Authentication setting for External Systems'. My requirement doesn't allow me to authenticate the user again, so how do I achieve this using either APEX or any other way?


I have problem with Ubuntu 14.04 installation. I have a Dell Inspiron 15 7559 notebook and UEFI.  Specs:   15.6-inch (3840 x 2160) 282ppi IPS touchscreen, glossy finish Windows 10 Home 2.6GHz Intel Core i7-6700HQ (3.5 GHz Turbo) 4 cores 8 threads Nvidia GeForce GTX 960M with 4GB GDDR5 + Intel HD Graphics 530 8GB 1600MHz DDR3L RAM   I wanted to dual boot Windows 10 alongside Ubuntu, so I step by step did the installation of the latest version. It was successful (but only when I changed parameters and added nomodeset), but after some time I noted that some programs froze or there were error messages (with some internal errors).  I found advice on the internet that said that 14.04 is a better version for my notebook, so I uninstalled the newest version (through Windows (remove partitions) and with program dual boot Repair Windows 10 repair boot and tried again to install an older version of Ubuntu.  It went normally without an error and again as previously separate HDD on two blocks and use the second on 3 partitions as in the guide. When I did all this it finally showed a message that everything was finished and restart your computer.  When I clicked the button the system didn't restart. It got stuck at a screen with mouse animation doing something, so it didn't finish the whole installation which should end by restarting (after clicking). It was just stuck at that screen and nothing else, so I had to force shutdown.     After many things from both pots and another I could successfully login to the desktop without errors or parameters, but got international errors from xorg after login /usr/bin/xorg -> which after some other research maybe is fixed by updates and reinstalling apport.  I have another big problem and it's that I still can't reboot or shutdown without sometimes CPU stuck (NMi watchdog). This stuck I previously when I had 16.04 fixed by swap on Nvidia but the 2nd post didn't work, moreover I can't without black screen swap to Nvidia driver. I tried 4x different driver versions.  I know that have many errors and better I would just format block with Ubuntu and have only Windows with 1TB HDD, and after some time buy a second HDD or SSD, but I still didn't want to give up, however after another try I admitted my inexperience with Linux, so I decided to uninstall it with OS-Uninstaller using a live USB. Maybe after some time I'll try again to install Ubuntu. Maybe when I have another HDD/SSD.

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


I keep getting this:     SQLSTATE[42000]: Syntax error or access violation: 1064 You have an   error in your SQL syntax; check the manual that corresponds to your   MySQL server version for the right syntax to use near ''TABLE 16''   But i can't find the error in my code:  $show = $conn->query('SHOW TABLES');  $show->setFetchMode(PDO::FETCH_NUM);  while($row = $show->fetch()) {    $tbl = "`".$row[0]."`";      $trunc = $conn->prepare('TRUNCATE TABLE :tbl');    $trunc->bindParam(':tbl', $tbl, PDO::PARAM_STR, 64);// sanitize data    $trunc->execute(); }   If i change it like this,it work:  $trunc= $conn->query('TRUNCATE TABLE `TABLE 16`');

Why can't I pass the table name to a prepared PDO statement?  $stmt = $dbh->prepare('SELECT * FROM :table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) {     var_dump($stmt->fetchAll()); }   Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do  $sql = "SELECT * FROM $table WHERE 1"


Let $x,y,z$ be pairwise coprime integers and $r$ an arbitrary integer $(rxyz\neq 0)$. It is evident that there exist relatively prime integers $a,b$ such that  $$rz=ax+by$$ However, how does one prove that $a,b$ exist? I know Bézout coefficients can do the tricks but there are not necessarily coprime. Please let me know. Thanks.

$(a,b)=1$ and $(b,c)=r$. Show that there are two coprime integers $x$ and $y$ satisfying $xa+yb=r$ and $c$ divides $x$.  I got $ua+vb=1$, then $uca+vcb=c$, then $muca+mvcb+nb=mc+nb=r$. But how to prove that $(muc,mvc+n)=1$?


I'm trying to write down a formula using \left( and \right). On some formulas, this works totally fine (see Example 1). However, on others I get a to me not explainable error message (see Example 2). Example 1: \begin{align*}     I(t) &= \cos\left(2\pi f_\Delta\int_{0}^{t}m(\tau)d\tau\right) \end{align*}  Example 2: \begin{align*}     I(t) &\times \cos\left(2\pi f_ct\right) = \frac{1}{2}\left(\cos( 2\pi f_ct - 2\pi f_\Delta\int_{0}^{t}m(\tau)d\tau) \\         &+ \cos( 2\pi f_ct + 2\pi f_\Delta\int_{0}^{t}m(\tau)d\tau)\right) \end{align*}  The error message: Extra }, or forgotten \right. \end{align*} Missing \right. inserted. \end{align*} Missing } inserted. \end{align*} Missing } inserted. \end{align*} Extra \right. \end{align*} Missing { inserted. \end{align*} Extra }, or forgotten \right. \end{align*} Missing \right. inserted. \end{align*} Missing } inserted. \end{align*} Missing } inserted. \end{align*} Extra \right. \end{align*} Missing \endgroup inserted. \end{align*} Misplaced \omit. \end{align*} Missing { inserted. \end{align*}  The error message's line numbers point to the \end{align*} of the block with Example 2. The first \left( is shown in the PDF while the corresponding \right) just disappears entirely. I'm really not sure what the difference between the two examples is and why it works with one but not the other. In Example 2, there are even still parentheses missing as I'd have to nest the \left( ... \right) for it to display correctly.

I have a very long equation that must be separated into two lines, and it has several pairs of nesting \left \right delimiters. Unfortunately, it seems that they need to be on the same line in order for them to work.  Also I'm using the align environment because I need the aligning functionality. Is there a way to have the size of delimiters automatically adjusted over multiple lines?


Let$ A$ and $X$ be invertible complex matrices such that $XAX^{−1} = A^2$ . Prove that there exists a natural number m such that each eigenvalue of A is an m-th root of unity.  i was taking the set $\{ \lambda , \lambda^1 , \lambda^{2} , \lambda^{3}, \dots, \lambda^{m} \}$  $\lambda$ is the eigenvalue of $ A$  I don't  know how  to show  that there exists a natural number m such that each eigenvalue of A is an m-th root of unity.  Pliz help  me  Thanks in advance

Let $A \in \mathbb{C}(n,n)$ and $k \geq 2$ be an integer such that $$A \sim A^k$$. Show that if $A$ is non-singular then each eigenvalue of $A$ is a root of unity.   Attempt: Since $A \sim A^k$, $$PA = A^kP$$ where $P$ is an invertible matrix. Since $A$ is invertible, $0$ cannot be an eigenvalue of $A$. Suppose $$Av = \lambda v \quad v \neq 0$$ then $$PAv = \lambda Pv$$ $$\therefore A^k(Pv) = \lambda (Pv) $$ but this implies that $Pv$ is an eigenvector of $A$. But the eigenvalues of $A^k$ are $\lambda^k$ $$\therefore \lambda^k=\lambda$$ which gives the conclusion required.   My questions is: Is the logic correct? If so, Am I missing any details? If not, then how could I approach this?   Thanks!


A radar system has a transmitter that emits radio waves called a radar signal, consisting of electromagnetic radiation. What happens when it meets with a strong superconductor, considering the fact that a superconductor expels magnetic fields. Will there be any reflection back to the radar receiver, or will the signal be refracted?

A type-I superconductor can expel almost all magnetic flux (below some critical value $H_c$) from its interior when superconducting. Light as we know is an electromagnetic wave. So what would happen if we shine a light deep into a type-I superconductor? Suppose the magnetic field of the light is significantly lower than $H_c$.  And what about type-II superconductors?


Prove:      If $f$ is a real-valued differentiable function such that $\lim_{x\to \infty}f'(x) = 0$ then $\lim_{x\to \infty}(f(x+1)-f(x))=0$.   Proof: We know $\lim_{x\to \infty}f'(x) = 0$.   (1)  By the mean value theorem there exists $c\in [x, x+1]$ such that $f'(c) = \dfrac{f(x+1)-f(x)}{1}$  $\iff \lim_{x\to \infty} f'(c) = \lim_{x\to \infty} f(x+1)-f(x) = 0$ by (1).  End of Proof.

Having some trouble proving this:     If $f:\mathbb{R}\rightarrow \mathbb{R}$ is differentiable and $\lim_{x\to \infty } f^\prime(x)=0$ show: $\lim _{x\to \infty } (f(x+1)-f(x))=0$   Attempt: from $\int \lim _{x\rightarrow \infty } f^\prime(x) \mathrm{d}x=0$ we can say that $f^\prime(x)=const$ would we then have to show that  $\lim _{x\to \infty } (f(x+1))$ is also a constant? From there if we show that both are equal then the difference is zero. I am on the right track?  Thank you for the help.


I fit a logistic regression model with about ~10 numerical predictors, and got the following:  Full model is stat significant.  Here are the ANOVA results using ChiSq test.   None of the individual predictors are significant in the full model.  Here is the model summary.   Sample size is respectable (500 observations)  No evidence of collinearity (VIFs < 2, none of the pairwise correlations are >0.5, etc). Here is the VIF output for the model.    And when I drop enough variables (or use stepwise selection to reduce the model), the individual predictors eventually start becoming significant.. What might be operating here that I'm missing? Are there some other issues (besides collinearity or small sample) that might lead to such phenomenon (significant full model, insignificant predictors) in GLM as opposed to classic linear regression?

In a multiple linear regression, why is it possible to have a highly significant F statistic (p<.001) but have very high p-values on all the regressor's t tests?  In my model, there are 10 regressors. One has a p-value of 0.1 and the rest are above 0.9    For dealing with this problem see the .


I just purchaced a new cast iron pan, it is my first. I was wondering if there is a way to seaon it but without using bacon (I do not eat bacon for the same reasons Jules, in Pulp Fiction, does not eat bacon, but that's beyond the point).  All seasoning instructoins I found on the net, are about using bacon, or lard, or a similar product. What can I season it with?  Thanks.

I just purchased a new cast iron skillet. What's the best way to season it?   And if I need to re-season an old pan, is the process any different?


I got an auto generated code using Lambdas while developing a Xamarin application:  public override string this[int position] => throw new NotImplementedException();  public override int Count => throw new NotImplementedException();   What does the => operator mean in this context?  Thanks R

I have quickly read over the  documentation.  This kind of example has helped me to understand better, though:   delegate int del(int i); del myDelegate = x => x * x; int j = myDelegate(5); //j = 25   Still, I don't understand why it's such an innovation. It's just a method that dies when the "method variable" ends, right? Why should I use this instead of a real method?


Prove that for $x,y$ positive integers, $$\sum_{k=0}^{y-1}(-1)^k\frac{\binom{y-1}{k}}{k+x}=\frac{(x-1)!(y-1)!}{(x+y-1)!}$$  One way is to use the beta-gamma functions relation:  Is there a direct way to calculate the sum?

The  gives a simple formula for it in terms of the gamma function.  Using that and the fact that $\Gamma(n+1)=n!$, I can prove the following formula: $$ \begin{eqnarray*} \frac{a!b!}{(a+b+1)!} & = & \frac{\Gamma(a+1)\Gamma(b+1)}{\Gamma(a+1+b+1)}\\  & = & B(a+1,b+1)\\  & = & \int_{0}^{1}t^{a}(1-t)^{b}dt\\  & = & \int_{0}^{1}t^{a}\sum_{i=0}^{b}\binom{b}{i}(-t)^{i}dt\\  & = & \int_{0}^{1}\sum_{i=0}^{b}\binom{b}{i}(-1)^{i}t^{a+i}dt\\  & = & \sum_{i=0}^{b}\binom{b}{i}(-1)^{i}\int_{0}^{1}t^{a+i}dt\\  & = & \sum_{i=0}^{b}\binom{b}{i}(-1)^{i}\left[\frac{t^{a+i+1}}{a+i+1}\right]_{t=0}^{1}\\  & = & \sum_{i=0}^{b}\binom{b}{i}(-1)^{i}\frac{1}{a+i+1}\\ b! & = & \sum_{i=0}^{b}\binom{b}{i}(-1)^{i}\frac{(a+b+1)!}{a!(a+i+1)} \end{eqnarray*} $$ This last formula involves only natural numbers and operations familiar in combinatorics, and it feels very much as if there should be a combinatoric proof, but I've been trying for a while and can't see it. I can prove it in the case $a=0$: $$ \begin{eqnarray*}  &  & \sum_{i=0}^{b}\binom{b}{i}(-1)^{i}\frac{(b+1)!}{0!(i+1)}\\  & = & \sum_{i=0}^{b}(-1)^{i}\frac{b!(b+1)!}{i!(b-i)!(i+1)}\\  & = & b!\sum_{i=0}^{b}(-1)^{i}\frac{(b+1)!}{(i+1)!(b-i)!}\\  & = & b!\sum_{i=0}^{b}(-1)^{i}\binom{b+\text{1}}{i+1}\\  & = & b!\left(1-\sum_{i=0}^{b+1}(-1)^{i}\binom{b+\text{1}}{i}\right)\\  & = & b! \end{eqnarray*} $$ Can anyone see how to prove it for arbitrary $a$? Thanks!


I'm trying to get this  PatID   FacID   RxNo        RejectCd 121403  463     57074566    R9  121403  463     57074566    76 121403  463     57074566    88 121403  463     57074566    8C    To look like this             PatID   FacID   RxNo        RejectCd 121403  463     57074566    R9,76,88,8c   Tried using a pivot or doing it in stages but I'm stuck. Can't pivot because I don't have a field for the column names. Also don't know how many Reject Codes will actually exist till it runs but we can ignore that part for now. I think this will be really challenging for any SQL nerds out there. Thank u!

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 :)


Alas, I have found my posts in need of visual accompaniment and yet, I find not the mechanism to attach such images herein.  How, fine people of the support to Stack Overflow, does one attach a .png or .jpg file to their post?

Sometimes I need to upload, embed, or display inline an image in a question or answer. How can I do that?


Let $R$ be a commutative ring with identity and let $a\in R$ such that $a^{(n−1)}$ is not zero, but $a^n$ is zero for some positive integer $n$. Show that the factor ring $R[x]/(1−ax)$ is a zero ring, that is, $$ R[x]/(1−ax)=\{(1−ax)\} $$ I tried: let $b\in(1−ax)$, then $b=(1-ax)c=c-cax$ for some $c\in R$. Since $a^n$ is zero and $a^{(n-1)}$ is not zero, $a$ is a zero divisor. then $$ (b+(1-ax))^n=b^n+(1-ax) $$

Let $R$ be a commutative ring with 1, we define  $$N(R):=\{ a\in R \mid  \exists k\in \mathbb{N}:a^k=0\}$$  and  $$U(R):=\{ a\in R \mid a\mbox{ is invertible} \}.$$  Could anyone help me prove that if $a\in N(R) \Rightarrow 1+a\in U(R)$?  I've been trying to construst a $b$ such that $ab=1$ rather than doing it by contradiction, as I don't see how you could go about doing that.


I have a regression dataset where the features are on the order of ~ 400 variables and the dataset itself is around 300 samples. I tried to use Random Forest Regression (RFR) on the dataset and used either out-of-bag (oob) score or k-fold cv score to judge its performance. The kind of behavior I see right now that I'm trying to make sense of is that if I directly use RFR, no matter how many trees I use or what kind of parameter tuning I incorporate, I won't get a good performance, whereas if I incorporate a PCA before RFR, I can run a grid search for the number of PCs before RFR and at around 8 or 9 PCs, the processing flow could provide a somewhat descent score. The score would rise and fall around this "optimal PC number" when I sweep the number of PCs.  I'm trying to make sense of this behavior as I tried to use the same processing flow on a couple of toy datasets I found and usually with or without PCA won't change much for RFR performance. One of the concerns I had is that my dataset is a very noisy dataset, and most of the regression methods I tried so far won't provide much good performance except for this PCA-RFR flow. So I'm not sure if this is a garbage-in-garbage-out situation where this PCA-RFR thing just somehow overfit my dataset. On the other hand, my features are quite collinear to each other and I don't have that many data to train my model, so it kind of make sense that a PCA-preprocessing can help de-noise the dataset a bit and may also help to reduce the overfit of my training set with a smaller set of "reduced features", but RFR is kind of new to me so I'm not aware if there is any theory behind all these.  If anyone has seen this before and have a good explanation or have any reference paper on PCA-RFR behavior, please let me know and I'd be very much grateful.

Suppose I am running a regression $Y \sim X$. Why by selecting top $k$ principle components of $X$, does the model retain its predictive power on $Y$?   I understand that from dimensionality-reduction/feature-selection point of view, if $v_1, v_2, ... v_k$ are the eigenvectors of covariance matrix of $X$ with top $k$ eigenvalues, then $Xv_1, Xv_2 ... Xv_k$ are top $k$ principal components with maximum variances. We can thereby reduce the number of features to $k$ and retain most of the predictive power, as I understand it.   But why do top $k$ components retain the predictive power on $Y$?   If we talk about a general OLS $Y \sim Z$, there is no reason to suggest that if feature $Z_i$ has maximum variance, then $Z_i$ has the most predictive power on $Y$.   Update after seeing comments: I guess I have seen tons of examples of using PCA for dimensionality reduction. I have been assuming that means the dimensions we are left with have the most predictive power. Otherwise what's the point of dimensionality reduction?


I submitted a paper in april 2017 to the POP Journal, it took 18 days to secure a reviewer. After about 24 days the status said that review has been received and thereafter it said awaiting editor response.  Soon the status went again to securing reviewers. this time the reviewer was secured in about 23 days. It has been almost a month and it still shows review under process, generally the POP journal is fast. I don't know what I should do?

I  would be happy to have a short comment by somebody on following simple situation: I submitted my paper in beginning of January. In the end or January the status changed from the administration (Editor) to "under review". After that, this has not changed, it is still "under review". Is this normal. My field is history.   The journal doesn't indicate the review-times in the pages, but from the same publishing house's pages I have seen other journals of the same field and noted that the time may vary from 3-4 months up to one year.  I have decided that I will patiently wait, but I am starting to feel insecure about if they have forgotten to push the status-button. So, it would be nice just to know, does this sounds normal? Another article a couple of years ago in another journal didn't take that long.


i am using MariaDB.  i have a table with 50 columns.  i want to create a simple query like SELECT * FROM myTable but the id column is a binary UUID which needs converting into human readable format, like this: SELECT LOWER(CONCAT(   SUBSTR(HEX(id), 1, 8), '-',   SUBSTR(HEX(id), 9, 4), '-',   SUBSTR(HEX(id), 13, 4), '-',   SUBSTR(HEX(id), 17, 4), '-',   SUBSTR(HEX(id), 21) )) FROM myTable  the problem is, AFAIK, i now have to explicitly name each subsequent 49 columns if i want to get them all.  now i know this is dumb, and i'm sure there is a correct way to do this but i can't find how to do what i want: simply get all 50 columns with this ONE modified SELECT.  it striked me a something that is doable, regardless of how or which column needs modifying, but i haven't been able to find such information. if this were just mySQL, i could use the built-in commands for managing UUIDs, but MariaDB doesn't have those; they didn't make it into the last update as they'd hoped.  :P so how can i build a query that does what i need it to do? EDIT: for the knucklehead that flagged this with 'already answered', READ THE TITLE. I do NOT want to exclude a column, I want to MODIFY one. >_>

I'm trying to use a select statement to get all of the columns from a certain MySQL table except one. Is there a simple way to do this?  EDIT: There are 53 columns in this table (NOT MY DESIGN)


I noticed that my Winter bash hat, which is hovering over my profile picture on the profile site, has the following issue:  When scrolling down on the page, the hat scrolls with you as if it had a 'position: absolute' on it. This is weird I think it's worth fixing.  Does anyone else see this behavior?

When visiting my profile on the mobile app, my hat scrolls with the page:    It doesn't stay linked to my icon at the top. I'm on an iPhone 6+ running iOS 9.2 and version 1.4.1 of the SE app.


How do I backup my computer to a server with rsync? I've tried this:  sync -avH STUFF/ -e ssh username@remotehostip:/folder/backupfolder/   and I get this:  sending incremental file list rsync: ERROR: cannot stat destination "/folder/backupfolder/": Permission denied    (13) rsync error: errors selecting input/output files, dirs (code 3) at main.c(653)   [Receiver=3.1.2]   I'm using ssh keys and root login is disabled

I would like to be able to back up all my settings and files to a dedicated external hard drive in a way that makes (1) all the backup files accessible and (2) would allow me to restore my system is there is a crash.   Is there an app for this or any pointers?  Thank so much.


With google's Nexus devices it is possible to make so-called .  Is it possible to make a Photo Sphere with an ordinary digital camera?

I am currently working to design a flash virtual tour, but I know little about how the photographs are taken.  Ideally I'd like to be able to take a set of 6 shots from a single focal point, and be able to align them seamlessly into a cube form. The other solution is to take a special fisheye image, and stretch it dynamically in flash.  I've seen examples of both as virtual tours, and ones formatted as a rotating cube are more responsive and have a higher image quality. The airbus and Cruden Homes are definitely in the cube format, I'm not entirely certain which format the New York VT uses:        I have a set of questions, the first is the most important, the others may become separate questions if I don't get an answer here:   How are those photos taken? Is there a specific mount that can be used? How long does it take to set up? How much post-processing is necessary on the images?


I am trying to write proceeding paper. But I have lines exceeding. How to align the lines exceeding?  Example:      \documentclass[journal]{IAENGtran}      \usepackage[fleqn]{amsmath}     \usepackage{upgreek}      \usepackage{amssymb}      \usepackage[utf8]{inputenc}     \usepackage{caption}     \usepackage[mathscr]{euscript} \begin{document} Thomas Edison was born on 11 February 1847. He was one of the outstanding geniuses of technology and he obtained patents for more than one thousand inventions including the electric light bulb, the record player and an early type of film projector. He also created the world's first industrial research laboratory.  He was born in Milan, Ohio and he was always an inquisitive boy. By the time he was 10 he had set up a small chemical laboratory in his house after his mother had shown him a science book. He soon became fascinated with electrical currents and it remained the main interest of his life.  In 1869, he borrowed a small amount of money and became a freelance inventor. In the same summer, there was a crisis in the New York financial district called Wall Street when the new telegraphic gold-price indicator broke down. Edison was called in to repair it and he did it so well that he was given a job as supervisor with the Western Union Telegraph Company. They later commissioned him to improve the Wall Street stock ticker that was just coming into use. He did so and produced the Edison Universal Stock Printer, which immediately brought him a fortune of $40,000. With this money, he set up as a manufacturer in order to produce electrical machines.      \begin{equation}  2000000x+30000000000y-6000000000000z=400000000000000 \end{equation} \end{document}

I am having the following equation:  \begin{equation}   Q(\lambda,\hat{\lambda}) = -\frac{1}{2} P(O \mid \lambda ) \sum_s \sum_m \sum_t \gamma_m^{(s)} (t) \left( n \log(2 \pi ) + \log \left| C_m^{(s)} \right| + \left( \mathbf{o}_t - \hat{\mu}_m^{(s)} \right) ^T C_m^{(s)-1} \left(\mathbf{o}_t - \hat{\mu}_m^{(s)}\right) \right) \end{equation}   which does not very well fit on one line. How can I split this over two lines? What I have in mind is that I specify the splitting place, and that the first line is left aligned and the second line right aligned to make clear that it is still the same equation.  The linebreak \\ does not work.


i am not able to create object of LO class. the code is below.  Tem.h    #ifndef TEM_H_    #define TEM_H_     #include <iostream>    #include <exception>    #include "UDPTest.h"     template<class T>    class Tem : public std::exception {    public:     T* UDPt;     Tem( T& t) throw();     virtual ~Tem() throw();    };     template<class T>    class LO :public Tem<T> {     char* mez;    public:     LO() throw() ;     char* what() const throw();     virtual ~LO() throw();    };     template<class T>    class AT :public Tem<T>{     char* mez;     public:     AT() throw();     char* what() const throw();     virtual ~AT() throw();     };     #endif /* TEM_H_ */    Tem.cpp    #include "Tem.h" #include <iostream> using namespace std;   template<class T> Tem<T>::Tem(T& t) throw() : exception(){ UDPt = t; // TODO Auto-generated constructor stub } template<class T> Tem<T>::~Tem() throw() { // TODO Auto-generated destructor stub }  template<class T> LO<T>::LO()  throw() { cout<<"LO constructor"<<endl; } template<class T> LO<T>::~LO() throw(){ } template<class T> char* LO<T>::what() const throw(){ return "Lockout validation failed.";  }  template<class T> AT<T>::AT() throw(){ cout<<"AT validation failed."<<endl; } template<class T> char* AT<T>::what() const throw(){ return "Active Task validation failed."; } template<class T> AT<T>::~AT() throw(){ }      UDPTest.h   #ifndef UDPTEST_H_ #define UDPTEST_H_  class UDPTest { public: int udp; int tcp; UDPTest(); virtual ~UDPTest();  };  #endif /* UDPTEST_H_ */     templatetest.cpp  #include <iostream> #include "Tem.h" #include "UDPTest.h" //#include <exception> using namespace std;  int main() { cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!! try{     throw LO<int>();     //LO<int> loo; }catch(exception& e){     cout<<"got"; } return 0; }   in the main function i am creating LO class object and throwing, LO class is inheriting Tem class which is template, inside Tem class i have a pointer of UDPTest class.   As i know, i am doing mistake somewhere but i am not able to know. please help me  Thanks

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


So I installed Ubuntu on Windows from Store. But I don't want it on my C disk, I don't have many space there. I would like to move to another disk, I also would like to use external HDD

I have just installed Bash for Windows 10 and it works good.  It keeps its files in C:\Users\{my user name}\AppData\Local\Lxss. The main problem is that it is located in the C:\ directory which has very few space. I want to move it to D:\, which has 1 TB of space.  Is it possible to change root folder for Bash in Windows 10?


System stopped working yesterday, couldn't find boot device. I pulled out the SSD and connected it externally to a fully working drive dock, even tried a second one, to see if I could get any data. It starts out uninitialized so I of course initialize it, but that's about as far as it gets. 256 GB SSD showing up as 0 MB or 128 KB as shown from the below screenshots. Windows thinks it's "working properly". I've told Windows over and over that it's not, but it won't listen. Got any ideas? Opening Disk Management for the first time, initialize disk:  Shows Online but no partitions, not even a blank partition:  Comes up as "Generi L oader SATA Devic USB Device"??? but "working properly"  Everything 0 MB:  diskpart shows 128 KB:  Opened EaseUS and it too shows 128 KB with no partition information:  Ran a surface test since that's about all I can do, only scanned 256 sectors, but they're good:  Thank you!

What steps can I take to try to recover lost or inaccessible data from any storage device?  Answers:   This applies to any computer storage device, e.g. internal/external hard drives, USB sticks, flash memory. The most important thing is to STOP using it, any type of I/O can ruin your chances of a recovery.     We have separate questions covering common problems with USB flash drives in greater detail:


Example:  Mark, with whom you spoke at the party, will be joining us.  or is it  Mark, with whom you spoke with at the party, will be....

I was looking at the title of :     To whom does the Islamic State sell their oil?   and it sounds strange to me. Shouldn't the word order be the following?     Whom does the Islamic State sell their oil to?   Or are both correct? And what is the rule that dictates the correctness?


I have an HDD, with files that I don't want to be "stolen".   The HDD is used by my employees. They need the files (pdf-s, some portable program and html files) for their work, but I don't want them to copy some of it to a pendrive or anywhere. What are my options? I can't disable copy on an HDD...

I am trying to make folder that everyone can view and can't copy,modify.    For all answers.I thinking about specially ms office files. I tried following methods  Software  - copy protect    - anti copy    This method can't protect save as and upload  MS office macro    Users can enable,disable macros.  MS office restriction    This is best choice but can't protect from file uploading.   Almost I found the solution. Way is combination of MS office restriction and restrict access from browsers using firewall or antivirus. But I don't exact how to do this.


I want to copy a bak file from sql server 2019 and restore it to a sql server 13.0.5026.0. The conversion from one version to another that I have seen this far is using a . However, I need to do this non-interactively, so I need a command line utility. How?

When trying to restore a backup to a SQL Server Express 2008 database I got the following error:  Restore failed for Server '...\SQLEXPRESS'.  (Microsoft.SqlServer.SmoExtended) System.Data.SqlClient.SqlError: The database was backed up on a server running version 10.50.1600.  That version is incompatible with this server, which is running version 10.00.2531.  Either restore the database on a server that supports the backup, or use a backup  that is compatible with this server. (Microsoft.SqlServer.Smo)   Is there a way to get a backup which is compatible with the older (in my case 10.00.2531) version from the newer (in my case 10.50.1600) version of SQL Server Express?


didn't render correctly. I ran into the problem several times when trying to write the post, where SE would only display {{content.field.caption}} instead of the whole code block. Also, the incomplete output is formatted text when this bug occurs rather than fixed-width code style.  It's reproducible in this post, just delete the blank line after "The whole code block is:"  The whole code block is:

{{ content.field_caption }}

Consider the following piece of Markdown code:  This is some regular text.      >>> def factorial(n):     ...     return 1 if n < 2 else n * factorial(n - 1)     ...   * This is a list item.      >>> def factorial(n):     ...     return 1 if n < 2 else n * factorial(n - 1)     ...    Notice that the second code block is preceded by a list item.   Why is the factorial code not properly formatted under these circumstances? To demonstrate the problem, I'll insert the Markdown code show above:    This is some regular text.  >>> def factorial(n): ...     return 1 if n < 2 else n * factorial(n - 1) ...     This is a list item                 def factorial(n):       ...     return 1 if n < 2 else n * factorial(n - 1)       ...               This applies to numbered as well as unnumbered lists.


I would like to multiply a single column in a .txt file by a variable and then write to another .txt file. What am I missing from the awk line? Appreciate any help in advance.  !/bin/bash  FILES=/path/to/files for f in ${FILES} do     echo $f     wc -l $f     B=10000000     TOTALLINES="$(wc -l $f | cut -f1 -d' ')"     echo "TOTALLINES: ${TOTALLINES}"     SCALINGFACTOR=$(echo "100000000 / $TOTALLINES" | bc -l)     echo "scaling_factor:  ${SCALINGFACTOR}"     awk '{printf($1"\t"$2"\t"$3"\t"$4 * "${SCALINGFACTOR}")}' $f"_prepped.txt" > $f"_normalized.txt"  done

Here is my script (to find the files that contain a specified pattern):  find . -type f \     -exec awk -v vawk="$1" '/'"$vawk"'/ {c++} c>0 { print ARGV[1]; exit 0 } END { if (! c) {exit 1}}' \{\} \;   I would like to use my script with an argument §:  MyScript.sh pattern   My problem is that I don't manage to put the $1 variable in awk.  When I try to debug my script  bash -x MyScript.sh pattern   Here is the output :  + find . -type f -exec awk -v vawk=pattern '// {c++} c>0 {print ARGV[1] ; exit 0 } END { if (! c) {exit 1}}' '{}' ';'   The $vawk variable seems to be empty.  Any idea?


I searched all over the internet and always found contradicting answers concerning the following topic.  In this sentence:     I would rather be alone than to go out tonight.   if I apply grammar rules it would have to be "than go out tonight",  but I found a lot of people who saw nothing wrong with the first version. I want to be sure about it and get a correct answer!

I don't know if "rather than to" is correct or if there is a better turn of phrase:     Note that our aim is to show [...] rather than to run [...]


Trying to get the gui up and running to control my HP printer/scanner.  Not quite sure what to do as it seems something has changed with hplip support.  I did run this command hplip-3.20.6.run  but seem to think this was a no,no.  So how to uninstall and what to do from here? Any help appreciated. Thanks Craig.

Let's assume that one has some HP printer and/or scanner and checked its support status on the corresponding page of HPLIP site - .  So one have the following information: the device Model name, Min. HPLIP Version and Driver Plug-in need.   What should one install to make Ubuntu fully support the HP printer and/or scanner?


Am new to client side application development, need some clarity on below mentioned issue.  I have one object  var obj1={'name':'Sachin'}  I assign that object to obj2   var obj2=obj1.   Now my obj2 and obj1 objects both are same  Now by using obj2 I change the name property value like  obj2.name="Dravid";   Now my obj1 and obj2  both name property values turned to be 'Dravid' because of 'sigletone' behavior of JSON object? is it correct?  Now my question is:  if I made my obj1 is empty like     obj1={}   then why my obj2 is not turned to be empty ?  still it show obj2={'name':'Dravid'}  What is the reason behind that ?  Could please help me on this.  thanks in advance...

The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?


I am a seafarer and im on vacation now, and I have a schengen visa, I want to visit my girlfriend in netherlands. Can i use my schengen visa which is valid for 90 days and has multiple entry on it?

My wife was just issued a multiple entry visa by France, which is good for one year.  Our first trip will be to France, the issuing country.  My question is: after we leave the EU and return, must future trips also start in France? Or may we go directly to (say) Greece from the US on a later visit?


So we know electric field is directed away from a positive charge and is towards a negative charge. But in an electric dipole we define a quantity called electic dipole moment which is directed from negative to positive (arbitrarily fixed direction). But then later it is also told that the electic field in a dipole(along axial line) is also in the direction of dipole moment. But how can electric field be directed from negative to positive? Shouldn't it be the opposite that the direction is directed from positive to negative charge?  I'm sorry if my question sounds naive. I'm currently in initial stages of learning.

An  is defined as $p = q\times d$ (for two point charges $\pm q$ separated by a distance $d$).    What is the physical meaning of this quantity?  Why does the direction of the electric dipole moment go from the negative charge to the positive charge? Another way of saying this, why electric dipole moment is a vector quantity?


The attached image is self explanatory. 74 is not the sum I can add by the given notifications.

In the top bar, the green “achievements” number shows +14. But when I open the dropdown, I see four items totalling +20. Why does the total not match the sum of the items?    No lower entries were highlighted.


While I've found similar posts, I have not found a perfect answer and thought I'd share my cleaning routine in case that is creating a problem.  I purchased a pre-seasoned Lodge skillet about a year ago. I also have my Grandmothers old Wagner that looked to be well seasoned as well. My issue is that the Lodge currently is fairly lumpy on the bottom and food will pick up quite a few black flakes.  I've tried taking a spatula to it to try to pick up some of it and then wiping it, but it doesn't get much of it.  I think when the pan is hot more comes off. My cleaning routine is this:  After using pan, I boil hot water in it to pick up any of the baked on food.  I "scrape" it as it's boiling with a wooden spatula.  Then dump the hot water and rinse with just plain water wiping it dry with a paper towel.  I then will add a little oil (either grape-seed or regular olive oil) and wipe that around the entire pan with a paper towel.  Then putting the pan back on the hot burner to "cure".   All along I've thought of this as a mini curing session each time I use it which is a lot.  But maybe it's too much somehow?  Or maybe the boiling of the water in it after use is too much?  I can't figure out what I'm doing wrong.  I do the same thing with all of my cast iron pans and I have varying degrees of "not smooth" bottoms.  Including the Wagner.  Please help!  I definitely do not have that baby smooth surface like others speak of.  Thanks in advance!

I have a small cast iron pan which I am working with, trying to make sure I understand seasoning/cleaning before moving on to a larger one. I seasoned with flaxseed oil (4 light coats, hour in the oven), and have cooked a few things - I made some Ghee, fried some onions, stuff like that. After each I washed with hot water (no soap), heated until dry on the stove and coated with a thin layer of canola oil.  Now, when I take a dry paper towel and rub it on the pan, a black residue shows up on the paper towel. I can't feel anything with my fingers and I haven't noticed anything cooking with it. I'm fairly confident this occurred after the initial seasoning - although I'm not sure I did this exact test with the paper towel.  Is this a) normal, or b) what is wrong and c) how can I fix it?  There are quite a few questions (and good answers!) regarding cast iron cookware on this site but I haven't been able to find one that deals with this specific issue.


How can I put the output of head -15 textfile.txt to a variable $X to use it in an if command like this:   if $X = 'disabled' then   ?

I have an operation using cut that I would like to assign result to a variable  var4=echo ztemp.xml |cut -f1 -d '.'   I get the error:     ztemp.xml is not a command   The value of var4 never gets assigned; I'm trying to assign it the output of:  echo ztemp.xml | cut -f1 -d '.'   How can I do that?


It looks to me that various articles of mine have huge parts of missing citations from various published papers from other people. For example, by checking adsabs.harvard.edu, I find many more citations to my papers, but they are not included properly thus missing in Google Scholar.     Where/How do I send emails to Google Scholar to reach out for this issue?

I've noticed, for citations, that some BibTeX files provided by google scholar are having regular errors (I believe these are errors).  For bib items, there is the "pages" field, in which we could input a range or a number of pages an article has. I've found at least two journals (in a short time span) whose articles have a wrong "pages" field. For instance  @article{baffou2009heat, title={Heat generation in plasmonic nanostructures: Influence of                  morphology},   author={Baffou, G and Quidant, R and Girard, C},   journal={Applied Physics Letters},   volume={94},   number={15},   pages={153109},   year={2009},   publisher={AIP} }   or   @inproceedings{ammari2015super,   title={Super-resolution in high-contrast media},   author={Ammari, Habib and Zhang, Hai},   booktitle={Proc. R. Soc. A},   volume={471},   number={2178},   pages={20140946},   year={2015},   organization={The Royal Society} }   Similarly, this last paper is not a proceeding, but an article from the journal "Proceedings of the Royal Society".   Probably there are some other mistakes around.  I know that these data are collected automatically, but, is there any way to report the errors to help google scholar to perfect their algorithms?


I'd like to create a function that takes a template vector object as an argument, which is defined by two template parameters: a type and a dimension.  For example, Vec<float, 3> is a 3D float vector, Vec<int, 2> is a 2D int vector, etc.  I want to create a function that can take a float-type Vec of arbitrary dimension.  I began with this function signature which compiles:  template<int D> void myFunc(Vec<float, D> v);   I'd like to call it like this, which doesn't compile:  // for 2D myFunc<2>(Vec<float, 2>(x, y)); // for 3D myFunc<3>(Vec<float, 3>(x, y, z));   and so on.  Is this possible with C++? I suppose overloading the function is a possibility, but I'd like to know if this is possible/practical anyway.  Other details: in my real implementation, this function is a part of a class which is not a template class. I don't need to resolve which dimension I am passing in since the class already knows about the expected dimension from an internal parameter.  Here is the error produced:  Undefined symbols for architecture x86_64: "int MyClass::myFunc<2>(Vec<float, 2>)", referenced from:     _main in test-1e56b5.o     ld: symbol(s) not found for architecture x86_64     clang: error: linker command failed with exit code 1 (use -v to see invocation)     make: *** [all] Error 1   Thanks.

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


Also, If you are traveling 1 mph under the speed of light on a train and throw a baseball in front of you at 20mph what would a viewer outside the train see?

Let's say I fire a bus through space at (almost) the speed of light in vacuum. If I'm inside the bus (sitting on the back seat) and I run up the aisle of the bus toward the front, does that mean I'm traveling faster than the speed of light? (Relative to Earth that I just took off from.)


Can a thrown magic pebble be a target to the enlarge spell?  For that matter, can anything from an arrow to a hurled table become enlarged while in mid-air and if so how would you suggest fantasy physics would work on this? The enlarge spell states that the target doubles in all sizes but the weight is times eight.  Would the (stone, for example) maintain its velocity and hit the target with 8x its weight?  We all know that F = m*a. How would you suggest to handle this DMG wise? As always thanks in advance my fellow Dungeoneers.

One of my players is constantly bugging me about using Enlarge/Reduce to reduce a boulder to a smaller size and then hurl it via the spell Catapult, cancel the concentration on Enlarge/Reduce before the impact, and let the enemy be smashed by a much bigger one.  Can the Enlarge/Reduce and Catapult spells be combined in this way?


We have 2 wires that were attached to a non functional baseboard heater when we bought our house.We've since removed the heater, but cannot locate the breaker to stop power to the wires. We've gone thru each breaker 1 by 1, and the tester still lights up/beeps. We would like to place an outlet there. Any suggestions on how to proceed on locating which breaker/fuse?

I need to find my doorbell transformer in order to change it for a more powerfull one (ring pro doorbell). I have opened the chime and i can see the transformer wire going in my basement, i did follow it using a tone device and it goes inside of a finished room... I have no idea after if it goes back up or in the attic. Attic is hardly accessible, in summer it's worse. It is hard to follow after that even with the tone because all cables related to that breaker will ring too. I have check inside the light fixtures, can it be in the light switch? Also, my chime says : "use with transformer 16V 10VA", i must change the chime too since my new one is 16V 30VA?   Update :  I have looked inside and outside of the electrical panel. I have also a utility room with the ceiling not finished and i cannot see anywhere my cable so it is getting transformed somewhere before. I have seen a transformer and some of them can be attached to the outside of a switch box/electrical box. The basement got a suspended ceiling so i can just cut the wire near a electrical box and wire the new transformer there but it would trigger me to know there is a dead cable with electricity somewhere. Also, does the chime can handle the new transformer? Even if the VA is higher?  Update :  I ended up cutting the cable near an outlet in the basement drop-ceiling. I wired the new transformer and it is working. My quest following the cables always ended up going into a finished ceiling so i could not find the old transformer. I don't like that but one day i will find the old one and remove it, i will use an endoscope camera with a led light to help me. Thanks everyone.


Two days ago I got some upvotes on stackoverflow but my Tags report doesn't show it:  Is there a way to manually update it or should I wait for the site to update it automatically - btw how often are tags for answers calculated for each user?

From my , I learned that all tag related info on profile will be updated daily at UTC 03:00.  However, something is wrong here. It's now UTC 05:00+, but my tag number, say 93 (c++) is not updated against yesterday. I am pretty sure about this and I did earn some more points throughout the day. Sorry for not be able to capture the screenshot yesterday, but I did check this number 10 hours ago (which belongs to yesterday, also 93).  Is there a bug happening here? Or updating time different?    UPDATE: As of 24 Jan, the tags are still not updated with the proper values.  UPDATE2: Fixed around 25 Jan, UTC 03:00, at least for me.


Does a laptop with Ryzen 3 2200u and Vega 3 work without issues with stock install of Debian 9 or Ubuntu 18.04?  I dont want to install drivers! Not to mention compile a patched kernel.  I have to choose between Core i3 6006u and Ryzen 3 2200u.  I know that Intel SoCs work out of the box on Linux. So they seem like a safe choice.  Any experiences? Does anyone of you own such a laptop?

Do Ryzen 3 2200u laptops work without issues with stock install of Debian 9 or Ubuntu 18.04?  I do not want to install nor patch nor compile!  I have to choose between Core i3 6006u and Ryzen 3 2200u. I know that Intel SoCs work out of the box on Linux. So they seem like a safe choice.  Any experiences? Does anyone of you own a Ryzen3 laptop and tried Linux on it?


I am having Dell Inspiron 3542 with 0RK2KV motherboard, Intel i3-4005U CPU and 4GB of RAM and I wish to upgrade my RAM. Now the  mentions the maximum RAM support to be 16GB DDR3L 1333/1600 or LPDDR3 1333/1600 whereas  says  The maximum memory supported on Dell Inspiron 3542/3543 is 8GB DDR3L with clock speed of 1600 MHz.  So, what should I go for...8GB or 16GB? It's clear that I can go for DDR3L which is unanimously said by both but I'm bit confused about the max size supported. It's clear that I want to go for the best available performance but also do not want to waste the money if at all 16GB is not supported. Could anyone please help?

I don't have any knowledge in hardware and would like to know which RAM should I buy for my laptop.  How do I discover what RAM I need & how much my machine can take?  I have a Razer Blade 15 (RZ09-02705F76) 2018 but don't know if there is a specific type or format of RAM that suits it and don't know where to find this information.


My app needs to check and see if it is already running when launching so it doesn't open a second time. I have a system tray icon that can make the application visible = False. Works great. However, I need to make sure the user looks at the system tray for the notifyicon if the app is already running.  Private Sub mainWindowSmall_Load(sender As Object, e As EventArgs) Handles MyBase.Load         Dim p() As Process         p = Process.GetProcessesByName("TSC Tool Box")         If p.Count > 0 Then             MessageBox.Show("The TSC Tool Box is already running. Check System tray!", _             "Warning !!!", MessageBoxButtons.OK, _             MessageBoxIcon.Error, MessageBoxDefaultButton.Button2)             Me.Close()         Else             totalOnLoad()         End If     End Sub   VB.NET | winforms

This has been a problem that I haven't been able to figure out for sometime.  Preventing the second instance is trivial and has many methods, however, bringing back the already running process isn't.  I would like to:   Minimized: Undo the minimize and bring the running instance to the front. Behind other windows: Bring the application to the front.   The language I am using this in is VB.NET and C#.


So I just learned: $$K_{max} = hf - \phi$$($\phi$ for ionization energy)  I wonder what will happen if $K_max$ is zero. Will it be attracted back to the ionized atom it has come from since it doesn't have any energy to move away from it?

So I was taught that:  Kinetic Energy (of electron) = Energy (of photon) - Ionization Energy  If E(photon) = IE, then KE=0 of the electron.   What does this physically/theoretically mean?   My current thoughts/interpretation is that enough energy/force is applied to ionize the electron so it is 'sufficiently far' from the atom, and then I guess it just moves with whatever speed it is moving at with natural kinetic laws, since no more energy/force is being applied....?  Any clarifications would be greatly appreciated, thanks in advance.


Whenever I boot, when I type systemctl status mysql.service, I see MySQL is running. I want to manually activate MySQL whenever I need it. I forget to turn off every single time I don't need the service. How can I get the setup I want?

Currently, my MySQL server starts on every server boot. For a couple reasons, this is undesirable behavior. Is there a way to disable this behavior?


Light is a non-mechanical wave. It means that it does not require a medium to travel. But the characteristics of the medium to affect light. That s why refraction occurs, right?  I also read somewhere that the mass density of a medium does not affect it's speed of light, but instead it's optical density does so.  What would a quantitative definition of optical density be? Why is it not related to mass density and how does it affect the speed of light?  Why does the presence of more mass in less volume (more mass density) not affect the speed of light?  Thanks!

The optical density of a medium is quantified by its refractive index $n$. Does it have any correlation with the mass/number density of the medium? In other words is an optically denser medium must have a greater mass density compared to an optically rarer medium?


Throughout my undergrad, I was solely focused on grades, university life, and getting a job. While I did talk to professors outside of class, whether related to class work or my own 'math research' (a hobby), I don't feel I have enough of a connection with any of them to ask for a good letter of accommodation for my grad school application. I'm honestly unsure what everyone else did. Maybe I was suppose to have worked with a professor in their research/teaching? I didn't even take those courses like "Topics in __" that have a small amount of independent study in my first three years. I guess I sort of thought I was suppose really get to know the professors and perhaps dip my feet into the research world in 4th year. Well, it's 4th year now, and it was really hard to get close to any professors with covid19 in the shadows. I have only communicated with them through email and faceless zoom chats. Is it really that bad to get recommendations from professors that don't know you that well? I do have good grades, but perhaps not good enough to scream them to the heavens in some professor's one sentence recommendation... Edit: This is for a university in Canada

I know you should build a good network with your professors as early as possible, not only it will help your study, but also you can get great recommendation letter from them.   But not all students aim at graduate school when they start their undergraduate, for example, I only became interest in research and decide on going to graduate school after my third year of undergraduate. At that time, I have done a research project with a professor and certainly I can ask him for one. However, most schools require 2-3 recommendation letters.  I know a good recommendation letter should speak about the candidate research potential instead of 'did well in my class', but in my case, only my undergraduate adviser can speak about that. What should I do besides asking recommendation letter from professors I get A grade in their classes?


Let $f$ be an analytic function defined on open unit disc such that range of f is contained in $\Bbb{C}\setminus(-\infty,0]$. Then I need to tell whether $f$ must be a constant function. I was thinking of discarding this by an example. But I am not able to find one. Please help.

Let $f$ be an analytic function on $\mathbb{C}$ which takes values in $\mathbb{C}\backslash(-\infty,0]$, i.e. takes values in the complement of the nonpositive part of the real axis. Show that $f$ is constant.  My first observation is that there is a branch of the square root defined on $\mathbb{C}\backslash(-\infty,0]$ which takes positive real values along the positive part of the real axis. But I am not sure what do from thereon out. Any help would be appreciated!


i am making a regex expression in which i want to only match wrong tags like
 *some text here, some other tags may be here as well but no ending 'p' tag*

Affectionately Inscribed

TO

HENRY BULLAR,

(of the western circuit)
PREFACE
   like in the above same text i want to get the result as
(of the western circuit)
 and nothing else should be captured. im using this but its not working
[^\(
\)]*
   please help

I am making a regex expression in which I only want to match wrong tags like:
 *some text here, some other tags may be here as well but no ending 'p' tag*

Affectionately Inscribed

TO

HENRY BULLAR,

(of the western circuit)
PREFACE
   In the above same text I want to get the result as
(of the western circuit)
 and nothing else should be captured. I'm using this but its not working:
[^\(
\)]*
   Please help.


I have 20 identical small form factor pc that are going to be used as digital signage machines. we are using ubuntu on them. So my question is, is there some way that i can install on one machine everything that is needed (ubuntu, digital signage software teamviewer chrome etc) then do a image and install it on another pc?  Something like norton ghost.  All machines are identical regarding hardware. It would save a lot of time for me.  Thanks in advance.

If I want to make a backup of everything I have done since the fresh install of Ubuntu, what are the possible options? What all should I backup? I want to get all the settings that I changed, all the packages I installed, etc.


When I run this code everything works as intended until the last line where I get the following error:  TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'str'   If I'm understanding this correctly X and Y are being recognized as strings (literally the letters X and Y).  Not the variables representing the integer the user input.  So how do I get Python to see the user input and not the string?  My apologies for asking something so basic but I've searched around and haven't found an answer, or at least not one I understand.    print("Hello!") x = input("Please enter the number to be raised:") print("Confirmed.  We are going to raise", x) y = input("Please enter the power you want it raised to:") print("Confirmed.  Raising", x, "to the power of", y) print (x**y)

In Python, how can I parse a numeric string like "545.2222" to its corresponding float value, 545.2222? Or parse the string "31" to an integer, 31?  I just want to know how to parse a float str to a float, and (separately) an int str to an int.


I am a wring a custom class called queue that uses iterator. I have an Iterator class in a seperate file called iterator.py. I get the error below when I try to iterate using for loop.   from iterator import Iterator     class Abstractstruc(object):         def __init__(self):             assert False         def __str__(self):             return "<%s: %s>" %(self.__class__.__name__,self.container)  class Queue(Abstractstruc,Iterator):      def __init__(self, objecttype=object):         self.container=[]         self.size=0      def add(self, data):         self.container.append(data)       def  remove(self):         self.container.pop(0)       def __getitem__(self,index):         return self.container[index]       def __iter__(self):         return Iterator(self.container)  if __name__=='__main__':      q=Queue(int)     q.add(5)     q.add(4)     q.add(6)      for i in q:        print i   iterator.py  class Iterator(object):     def __init__(self, wrapped):         self.wrapped = wrapped         self.offset = 0      def __next__(self):         if self.offset>=len(self.wrapped):             raise StopIteration         else:             item = self.wrapped[self.offset]             self.offset+=1             return item   I get this error message  <Queue: [5, 4, 6]> <Queue: [4, 6]> 4 Traceback (most recent call last):   File "queue.py", line 78, in <module>     for i in q: TypeError: iter() returned non-iterator of type 'Iterator'   I do not understand why it is not returning an iterator. what fixes needed here?

How would one create an iterative function (or iterator object) in python?


When you install a program like postgresql, it installs several programs for its last version.  Once installed how remove all those packages? because using  apt-get remove postgresql   removes only that head package

I've searched the net for such information and found different command lines, like these ones:  sudo apt-get remove application sudo apt-get remove application*  sudo apt-get remove --purge application sudo apt-get remove --purge application*  sudo apt-get purge application sudo apt-get purge application*   So, what is the correct way? Is it necessary to use that "*"?  After that, I also found these commands:  sudo updatedb sudo locate application sudo rm -rf (file/folder name)


I have a website that loads an iframe with a webpage, but my restriction is that it has to be running under my iframe, and it is not suppose to redirect the parent page to its address by using top.location.href javascript function from within the iframe.  Is there anyway to block that top.location.href = ''; is executed? without having to install any extensions or change the browser settings (since it is viewed by the public through a browser).

Some websites have code to "break out" of IFRAME enclosures, meaning that if a page A is loaded as an IFRAME inside an parent page P some Javascript in A redirects the outer window to A.  Typically this Javascript looks something like this:  <script type="text/javascript">   if (top.location.href != self.location.href)      top.location.href = self.location.href; </script>   My question is: As the author of the parent page P and not being the author of the inner page A, how can I prevent A from doing this break-out?  P.S. It seems to me like it ought to be a cross-site security violation, but it isn't.


Assuming that a person has understanding of theory of Lie groups, Lie algebras and basic quantum mechanics, what is the simplest route to gain a basic understanding of the SM of particle physics? Are there any particular books suited for people with this background?

I found Sean Carroll's "A No Nonsense Introduction to General Relativity" (about page .  pdf ), a 24-page overview of the topic, very helpful for beginning study.  It all got me over the hump of learning the meaning of various terms associated with GR, most of which I had heard before without understanding.  It also outlined the most important examples.  Is there a similar document for quantum field theory, which presents the main equations, briefly describes the main ideas, and summarizes the most important applications and results so that the reader can feel the lay of the land before studying in depth?


I would like to top align an image with a text. The problem is that the text is aligned with the baseline of the image.  The current code I have is this:  \documentclass[margin,line]{res} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{graphicx} \usepackage{hyperref}      \begin{document}  \begin{resume}  \section{\sc Section X} Lorem ipsum dolor sit amet, sit phaedrum qualisque at. Elit honestatis interesset ut vim, tota dicunt mnesarchum te his. Vim partem voluptua maiestatis te. Vel ea diam alia inciderint, vix ad quot scribentur. Ponderum phaedrum eum ad, affert expetendis eum ne. Ei vis dictas maluisset, est volutpat contentiones ne.  \section{\sc Projects}  \begin{tabular}[t]{@{} lr}     \vspace{0pt}     \begin{tabular}[t]{@{} ll}         Name: & --Name-- \\         Type: & --Type-- \\         Webpage: & \href{}{www.example.com}     \end{tabular}     &     \vspace{0pt}      \includegraphics[width=1.618cm, height=1.618cm]{logo.png} \end{tabular}  \section{\sc Section Z} Quis zril epicurei et mel, usu soleat luptatum cu. Est ut veri convenire gubergren. Sed ad liber appareat erroribus, cum id porro error posidonium. Et eius perfecto has, mei phaedrum aliquando in, vel ponderum salutandi te. Suscipit ocurreret principes ad vis, vim id tale clita vivendum. Sale debitis persecuti pri ex.  \end{resume}  \end{document}   Generated ouput:    Desired output:    I tried doing the tabular in line #18 like this: \begin{tabular*}{\textwidth}[t]{@{} lr} but gives me an error. Also tried inserting \hfill between lines #25 and #26 but didn't do anything.  My approach is based on  previous answer.  How can achieve the desired output?

is there a way to create a table with 2 columns, in the left column should be some text, in the right column should be a picture.  The problem is - to align both to the left, top corner. The image seems to be inserted as an inline object, so it pushes the text down, from the top.                            _____________________                          |                     |                              |                     | Some text is pushed down |                     |   What i want is:  Some text is pushed down  _____________________                          |                     |                              |                     |                          |                     |   Here is the code:  \begin{tabular}{\textwidth}{ l l } Some text & \includegraphics{images/image.png} \\ \end{tabular}


I am part of a small research project where we are leading field experiments in a small watershed, on some remote location far away from our research institute.   I have a series of vector data, shapefiles actually, consisting of various points, lines, polygons, each one representing some specific entity on the field: either rain gage stations, drillings, boreholes, contours, roads, parcels, etc... Also, for those entities, I have some photos taken with a camera to illustrate the actual state of the entity.  I would like to build a series of maps. I want them to be interactive, so that people can choose thematic layer entities of interest and display them, measure distances, etc. Also, it would be good to run them locally on the browser, without the need to install some third party software.  I don't have a clear idea on the way to go. Can anyone help pointing me in the right direction ?

I want to start working on a web map at work to map some of our statistics by city.    I have an idea, but I'm not exactly sure where to start.   Are there any definitive resources that provide step by step guidance on how to do this?


On the Android app, when I got the new privilege to edit questions and answers instantly, the privilege icon is missing in the "Achievements" tab in the topbar:    The is supposed to be a picture there, which is an up and down arrow picture like this screenshot on my computer:    So can we add the privilege icon back into the "Achievements" tab in the topbar please?

Icons for privilege are not visible on mobile site as well as mobile app  (on Android). Android app    Mobile website


I'm currently trying to retrieve the contents of a webpage (JSON) that updates very regularly. Ideally, I would like to download the data from this URL every 10 minutes and save it, appending it to a growing data structure of updates.  Is there a way to repeatedly run a python function at a user-defined interval (10 minutes)?   In my case, I'm able to download a url using the below code, but wish to add data to it every 10 minutes.  with urllib.request.urlopen(URL) as url: data = json.loads(url.read().decode()) print(data)

I would like to know how to put a time delay in a Python script.


In some stackexchange questions, some people posted code in making the code plot the curves iteratively. However, when I try mine, the orange curves do not show up. Here is the code:  \begin{figure}[H]\centering             \begin{tikzpicture}                 \def\Bound{(5*sqrt(2) - sqrt(150 - 100*sqrt(2)))/2}                 %\def\radius{4}                 %\def\startPt{acos( (5+\radius + sqrt((5+\radius)^2 - 50) )/(2*\radius) - 1 )}                 %\def\endPt{acos( (5+\radius - sqrt((5+\radius)^2 - 50) )/(2*\radius) - 1 )}                 \begin{axis}[                     %xmin=0,xmax=4500,                     %ymin=0,ymax=0.3,                     xmin=0,xmax=10,                     ymin=-5,ymax=5,                     axis lines=center,                     axis line style=->, xlabel = {$t$}, ylabel={$V\left(t\right)$},                     axis equal,                     legend cell align = {left},                     every axis y label/.style={at={(0,1)},anchor=south},                     every axis x label/.style={at={(1,0)},anchor=west},                     title= {Invariant Set Plots},                   domain=0:15,samples=300,legend pos=outer north east]                     \addplot [color = blue, thick, domain = -10:10] {x - 5};                     %\addlegendentry{$V_0 = 0.01$};                     \addplot [color = red, thick, domain = 0:2*pi] ({\Bound + \Bound*cos(deg(x))}, {\Bound*sin(deg(x))});                      \foreach \y in {3, 3.5,4,4.5}{                         \def\radius{\y};                         \def\startPt{acos( (5+\radius + sqrt((5+\radius)^2 - 50) )/(2*\radius) - 1 )};                         \def\endPt{acos( (5+\radius - sqrt((5+\radius)^2 - 50) )/(2*\radius) - 1 )};                         %\pgfmathtruncatemacro{\tmp}{100 - \x*20};                         \addplot[color = orange, thick, domain = \startPt:360-\endPt] ({\radius + \radius*cos(x)}, {\radius*sin(x)});                     }                     %\addplot [color = orange, thick, domain = \startPt:360-\endPt] ({\radius + \radius*cos(x)}, {\radius*sin(x)});                     %\addplot [color = orange, thick, domain = 0:3]{\startPt/360};                     %\addlegendentry{$V_0 = 0.5$};                     %\addplot [color = brown, thick, domain = 0:15] {1/(1-(1-1)*exp(-2*x))};                     %\addlegendentry{$V_0 = 1$};                     %\addplot [color = orange, thick, domain = 0:15] {1.5/(1.5-(1.5-1)*exp(-2*x))};                     %\addlegendentry{$V_0 = 1.5$};                     %\addplot [color = purple, thick, domain = 0:15] {2/(2-(2-1)*exp(-2*x))};                     %\addlegendentry{$V_0 = 2$};                 \end{axis}             \end{tikzpicture}              \caption{Optimal Curves.}         \end{figure}   In fact, when I try change the color over each iteration as shown in the code below:      \foreach \x/\y in {0/3, 0.5/3.5, 1/4, 1.5/4.5}{                         \def\radius{\y};                         \def\startPt{acos( (5+\radius + sqrt((5+\radius)^2 - 50) )/(2*\radius) - 1 )};                         \def\endPt{acos( (5+\radius - sqrt((5+\radius)^2 - 50) )/(2*\radius) - 1 )};                         \pgfmathtruncatemacro{\tmp}{100 - \x*20};                         \addplot[color = orange!\tmp!yellow, thick, domain = \startPt:360-\endPt] ({\radius + \radius*cos(x)}, {\radius*sin(x)});                     }   I even get an error message saying that it's an Undefined control sequence at the \end{axis} command.  Does anybody know what is going on with the code?

Am hesitant to ask yet one more embarrassing question, but I can't seem to see the problem with the \foreach in the MWE. It should produce several horizontal lines but only produces the one with the yValue as specified in the \newcommand{\yValue}{0.3}:  Code: \documentclass{article} \usepackage{pgfplots}  \newcommand{\yValue}{0.3}  \begin{document} \begin{tikzpicture} \begin{axis} [  ymin=0,  ymax=1,  xmin=0,  xmax=1, ]  \foreach \yValue in {0.00,0.1,...,1.00} {     \draw [red] (axis cs:0,\yValue) -- (axis cs:1,\yValue); }  \end{axis} \end{tikzpicture} \end{document}


I have a ListView in which I am display Facebook friend's Image and name.Right now what I am doing is that I am showing 7 friends at once and have a load more button that displays next 7 and so on.     Now what I want do is show all the names but with a default pic in the ImageView and refresh only if it is showing on the screen without blocking the UI. eg If user is seeing Mr X on the screen then only I get his picture and show it in the ImageView without blocking the UI.

I am using a ListView to display some images and captions associated with those images. I am getting the images from the Internet. Is there a way to lazy load images so while the text displays, the UI is not blocked and images are displayed as they are downloaded?   The total number of images is not fixed.


Below is the code to search for text between the two tags <title> and </title>  url = "https://www.ilsole24ore.com/rss/italia--attualita.xml" r = requests.get(url) testo = r.text pattern = "<title>(.*?)</title>" result = re.findall(pattern, testo) for i in result:     print(i)   And so far everything is ok.  Now I want to find all the text (and also internal tags) between the two external tags <item> and </item>, changing the search pattern to:  pattern = "<item>(.*?)</item>"   But it doesn't find any match.  Where is my mistake?

For example, this regex  (.*)<FooBar>   will match:  abcde<FooBar>   But how do I get it to match across multiple lines?  abcde fghij<FooBar>


After asking a professor a question through e-mail and receiving an answer, is it polite that a student send a short e-mail simply saying "Thanks" as an acknowledgment that the answer was received and appreciated? I'm thinking of sending this but am not sure if it might be considered annoying or unnecessary  (as I'm not sure how busy the professor is, or how many emails he/she has to sort through every day.)  Is there some widely agreed-upon etiquette for this?

Sometimes there are cases in a e-mail correspondence with academia staff (professors and bureaucrats) in which I don't know which is the best practice. I wonder if there is any best practice for the following cases:  Reply to a reply: when I ask for information via e-mail, and the reply gives me all the information I want, should I send an email just to thank them, or is this considered a bad, time-consuming practice?   How does a professor react to this kind of reply? And what about a bureaucrat (who maybe receives more e-mail)?  If I asked for an internship and he gave me a negative response, is not replying to him considered rude or normal?


The formula for the number of monomials in variables $w,x,y,\ldots,z$ of degree $m$ (where e.g. $x^iy^jz^k$ degree $m=i+j+k$) is $$\binom{m+n-1}{n-1},$$ where $m$ is degree of monomial and $n$ is the number of distinct variables in that monomial(e.g. in $x^2y^3z^4~, m=9,n=3$).  My book describes that the formula is same as that of number of ways of placing identical objects into distinct boxes as these two situations are similar.  But I can't find how are they similar... Kindly help me with this...

says that the number of different monomials of degree $M$ in $N$ variables is $$\frac{(M+N-1)!}{M!(N-1)!}\; .$$ Can anyone explain why this is true?


How does one insert a "\" (backslash) into the text of a LaTeX document? And how does one insert a "~" (tilde)? (If you insert \~, it will give you a tilde as an accent over the following letter.)    I believe \backslash may be used in math formulae, but not into text itself. Lamport's, Kopka's, and Mittelbach's texts have said as much (but no more), and so left me hanging on how to get a backslash into regular text.


I’m probably misreading but there seems to be a slight difference in the definition of Glasser’s Master Theorem between  and .  The difference lies in the substitution $u$ and $\phi(x)$ with $u$ having $x - a - \sum$ over $x - \sum$.  Are these equivalent? Is there an error with one?

Citing from  and one of its references, , following hold:  Glasser's master Theorem For $f$ integrable,  $\Phi(x) = |a|x - \sum_{i=1}^N \frac{|\alpha_i|}{x-\beta_i}$ and $a$, $\alpha_i$, $\beta_i$ arbitrary real constants the identity \begin{equation}     \mathrm{PV}\int_{-\infty}^\infty f(\Phi(x)) dx =     \mathrm{PV} \int_{-\infty}^\infty f(x) dx     \label{Glasser}     \tag{1} \end{equation} holds.  Now consider \begin{align*}     \Phi_1(x) &= |a|x - \sum_{i=1}^N \frac{|\alpha_i|}{x-\beta_i} \\     \Phi_2(x) &= x - \sum_{i=1}^N \frac{|a\alpha_i|}{x-|a|\beta_i} \end{align*} Then, by Glasser's theorem \ref{Glasser} $$\mathrm{PV}\int_{-\infty}^\infty f(\Phi_1(x)) dx = \mathrm{PV} \int_{-\infty}^\infty f(x) dx = \mathrm{PV}\int_{-\infty}^\infty f(\Phi_2(x)).$$  However, under the change of variables $y = |a| x$ \begin{equation}     \mathrm{PV}\int_{-\infty}^\infty f(\Phi_1(x)) dx =     \frac{1}{|a|}\mathrm{PV} \int_{-\infty}^\infty f(\Phi_2(y)) dy.     \label{my Idea}     \tag{2} \end{equation}  Thus, I assume Glasser's theorem only holds for $|a| = 1$; a quick numerical check seems to support Eq. \ref{my Idea}. Is Wikipedia and MathWorld wrong about this?


When you click on the + button you get a new option. When you click on the new + button created it doesn't work, why?

     Ask your question here:
     <textarea id="questionInput"></textarea>

     <button id="save">Save</button>     <button id="refresh" style="display:none">Amend question</button>

       Option 1

       <textarea class="opt" id="option1"></textarea>	       <button type="button" class="plus btn btn-default">  </button>         <button type="button" class="minus btn btn-default">  </button>

     <button id="doThis">Decide</button>

You should:

   $(document).ready(function() {     //Write question     //Save question, replace over input     $("#save").on("click", function() {         //get value of question         var question = $("#questionInput").val();         //replace over label         $("#replace").text(question);         //hide input         $("#questionInput").hide();         //hide save button         $("#save").hide();         //show refresh button         $("#refresh").show();         //on click of refresh re-enable input field and save button     });     //Onclick of refresh button enable amend question     $("#refresh").on("click", function() {         $("#replace").text("Ask your question here:");         $("#questionInput").show();         $("#save").show();         $("#refresh").hide();     });     //Decide on number of answers     $(function() {         var counter = 1;         $('.plus').on("click", function(event) {             event.preventDefault();             counter++;             var firstRow = $('
Option' +' '+counter+'
' +             '
<textarea class="opt" id="option1"></textarea>	' +       '<button type="button" class="plus btn btn-default">  </button>'+         '<button type="button" class="minus btn btn-default">  </button>	'+     '
');              $('table.options').append(firstRow);         });     });          //delete an answer option         $('.minus').click(function(event) {             event.preventDefault();             $(this).destroy(firstRow);         });             //On click, get values of answers & choose random answer         $("#doThis").bind("click", function() {             var optionone = $("#option1").val();             var optiontwo = $("#option2").val();             var optionthree = $("#option3").val();             var optionfour = $("#option4").val();             var optionfive = $("#option5").val();             var arrayList = [optionone, optiontwo, optionthree,                 optionfour, optionfive             ];             var decide = arrayList[Math.floor(Math.random() *                 arrayList.length)];             $("#verdict").text(decide);         }); // end of dothis click event }); // end of ready   It will be easier to view this on the js fiddle

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I've known the following:  $$\lim_{n\to\infty}\sum_{k=1}^{n}\frac{k^k}{n^n}=1.$$  Then, I got interested in the following similar limitation: $$\lim_{n\to\infty}\sum_{k=1}^{n}\frac{k^n}{n^n}$$  By using computer, it seems that   $$\lim_{n\to\infty}\sum_{k=1}^{n}\frac{k^n}{n^n}=\frac{e}{e-1}.$$  However, I haven't been able to prove this.  I need your help.

I can show that the following limit exists but I am having difficulties to find it. It is $$\lim_{n\to \infty} \sum_{k=1}^n \frac{k^n}{n^n}$$ Can someone please help me?


I came to know that std::endl is actually a performance barrier in programs with lots of stream outputs are there. If that is the case, can anyone share the actual necessity of using std::endl while coding in C++?

Many C++ books contain example code like this...  std::cout << "Test line" << std::endl;   ...so I've always done that too. But I've seen a lot of code from working developers like this instead:  std::cout << "Test line\n";   Is there a technical reason to prefer one over the other, or is it just a matter of coding style?