get strings between 2 delimiter in python

I would like to get, from the following string "/path/to/%directory_1%/%directory_2%.csv"  the following list: [directory_1, directory_2]. I would like to avoid using split by "%" my string. I was hoping to find a regex that could help me. However I cannot find the correct one.  For now, I have the following:   re.findall('%(.*)%', dirty_arg)   which output ["directory_1%/%directory_2"]  Do you have any recommandation about that?  Thank you very much for your help.


Is the set $\{\frac{p}{q}:p,q\text{ prime}\}$ dense in the positive real numbers?

If $P$ is the set of all prime numbers, and we denote by $Q$ the set of all rationals which are of the form $\frac{p}{q}$, where $p$ and $q$ are both are prime numbers, then is $Q$ dense in set of positive real numbers?  I think not, since prime numbers are not uniformly distributed in the set of positive integers, but I can't  prove it.  Whereas I can prove that the set of rationals $\frac{m}{p}$, where $p$ is prime, is dense in positive reals.


Birthday Problem using Complement Probability

I'm having trouble attempting this question. In a group of $n$ people, what is the probability that at least $3$ have the same birthday?   I started off by saying Pr(At least $3$) $= 1 -$ (Pr(no $3$) + Pr($2$ share a birthday)).   However, how would i calculate that exactly $2$ people have the same birthday, or is this wrong? Any suggestions on how to continue?


My Ubuntu image VMware disk has grown to 5GB physical file size. It's a dynamically growing disk with the maximum capacity of 8GB. I cleaned some stuff inside Linux distro and now inside it occupies 3GB. Obviously the physical file size didn't shrink back automatically. Is there a way (if possible free of charge) to shrink this disk back to ~3GB?  I need this to fit the image on the DVD.


Unregistered users should be able to delete their own answers

I used to think that all users can delete their own posts, as long as these posts haven't gained a relevant number of upvotes. After seeing posts  again and again, I decided to verify my assumption and found out that you actually can't delete your own answers if you post from a low reputation, cookie based account.  Is there a reason for this or is this unintentional?  In my opinion even users without a "substantial" account should be able to change their minds and delete an answer if they think better of it.


Commuting operators in polar decomposition of normal operator

Let $V$ be a finite-dimensional vector space and $f$ be a normal operator on $V$. Let $f=PU$ be polar decomposition of $f$, where $P$-nonnegative, self-adjoint and $U$ - unitary(orthogonal) operator. Prove that $PU=UP$.  My attempt: Since $f$ is normal then $ff^*=f^*f$ and $f^*=U^*P$ then $ff^*=PUU^*P=P^2$ and $f^*f=U^*PPU=U^*P^2U.$ Combining them we get that $$P^2=U^*P^2U \Leftrightarrow UP^2=P^2U$$  I don't know what to do next.   Can anyone show how to prove this, please?


Continuous right derivative implies differentiability

A book of mine says the following is true, and I am having some trouble proving it. (I've considered using the Lebesgue differentiation theorem and absolute continuity, as well as elementary analysis methods.)     Let $f: [0, \infty) \rightarrow \mathbb{R}$ be continuous and have right derivatives at each point in the domain, with the right derivative function being continuous.  Then $f$ is differentiable.


What is the difference between $\frac{v_f + v_i}{2}$ and $\frac{\Delta x}{\Delta t}$, assuming acceleration is constant

It looks to me that both arrive at the same place, the average velocity. Do I use whichever one based on the data available to me?


How to serialize date without "/Date()/"

I am serializing following class to JSON and returning through API:  public class HighStockChart {     public string name { get; set; }     public IEnumerable<HighStockChartData> data { get; set; } }  public class HighStockChartData {     public DateTime x { get; set; }     public double y { get; set; } }   Now when I am doing a console log  for data , I am getting following format:  {x: "/Date(1519154100000)/", y: 392.61} {x: "/Date(1519179300000)/", y: 392.732} {x: "/Date(1519212600000)/", y: 392.732} {x: "/Date(1519173000000)/", y: 392.733} {x: "/Date(1519187400000)/", y: 392.757} {x: "/Date(1519169400000)/", y: 392.761}   But I need the data without /Date. Example format below:  {x: 1519154100000), y: 392.61}  {x: 1519179300000), y: 392.732}  Edit:  To build the date String I am doing ,  IEnumerable<HighStockChartData> stockChartXY = tag.Select(t => new HighStockChartData                     {                         x = DateTime.ParseExact(t.Date, "dd MMM yyyy HH:mm:ss:fff", null),                         y = double.Parse(t.Value)                     });  HistorianTagDetail historianTagDetailsresult = new HistorianTagDetail                     {                          Average = average,                         HighStockChartData = stockChartXY                     };  chartData = ChartHelper.CreateHighStockChart(tagDetails);  return Json(chartData);   By using jQuery to loop through and strip all data will work only if I am using q webClient. I have to find another solution , If I will try to send that as an email , using a service or use the chart in desktop application , then have to strip off the characters using C#.  Can I serialize the dates as Long (we have currently) but without "/Date()"?  Is there any custom attribute to set? Or Can I loop through object after serialization , remove the characters and then return?  ex:   chartData = ChartHelper.CreateHighStockChart(tagDetails); var jsonData =  Json(chartData);   var jDataList = new List<object>();   //Not actual code, just a theory I can think of  foreach(jData in jsonData) { //Do something to strip of the brackets //Add to a list  jDataList.Add(jData); } return jDataList;


Find $\ \limsup_{n\to \infty}(\frac{2^n}{n!}) $

Find$\ \limsup_{n\to \infty}(\frac{2^n}{n!}) $  The following 2 facts have already been proven.   $\ 2^n < n! $ for $n \ge 4$ (Proof by induction) $\ \frac{2^{n+1}}{(n+1)!} < \frac{2^n}{n!} $ for $\ n\ge 4 $   It would be sufficient to show that $\ \lim_{n\to \infty} \frac{2^n}{n!} = 0 $  However, what are some ways to show this?   I have found a proof using the definition of convergence.   (For all $\ \epsilon > 0 $, Find N such that if n >= N, $\ |\frac{2^n}{n!} - 0| < \epsilon $)  However, I was wondering if there was a simpler proof.  Thanks!


Mail : "Who will be doing the validation?" Reply : "Myself and Sarah will be doing validation"  I believe the usage of myself is incorrect here. It should be "Sarah and I will be doing validation". Correct me if I am wrong.


Selecting Maximum value for each unique ID

So i have a table (linked below) and for each unique PropertyID, i need to find the highest percentage value and extract that to a different table. I need to retain all the other attribute information as well, (which summarize or dissolve doesn't do).   I'm using ArcMap 10.3


Java: Handle logoff or shutdown on Windows and Linux

Is there a way for a Java GUI application to respond to system shutdown or logoff events, other than to use JNI?  (On Windows, the JNI would use WM_QUERYENDSESSION, on Linux?)  The method should allow the program to prompt users to save, etc., and then continue the logoff process.


Should I use OLS of fixed effects for this model?

I'm trying to estimate this model on immigration levels I found in a paper and I'm not sure if they used OLS or fixed effects, it says that its a simple OLS but then mentions adding the country fixed effects. can someone help?


I would like to get text in between line in pages

Am planning to make a resume in pages. I want some of the sub headings to come in between lines. I have attached the image which I want to add in my document.Can somebody please help me?    I am able to get a line below the word summary picture below,


What all is included in a creature's game statistics?

Many features and rules refer to a creature's "game statistics".  For example,  says:     The target's game statistics, including mental ability scores, are replaced by the statistics of the new form.   and Possess Corpse, an ability of a , says:     It otherwise uses the target's game statistics, gaining access to its knowledge and proficiencies but not its class features, if any.   Sometimes it instead just refers to "statistics" as in the description for a character with lycanthropy in the Monster Manual:     A character who becomes a lycanthrope retains his or her statistics except as specified by lycanthrope type.   What all is included in a creature's "game statistics" or "statistics"? Where in the rules is this defined?  Note that the term is used interchangeably between things intended for PCs and things intended for monsters and other creatures so answers should cover all those possibilities.


Remove "ibid" in footer citation with autocite

This is the header of my document \documentclass[12pt,a4paper]{report} \usepackage{import}  \usepackage[english]{babel} \usepackage[utf8]{inputenc} \textwidth=450pt\oddsidemargin=10pt  \usepackage{makeidx} \makeindex  \usepackage{graphicx} \usepackage{subcaption}  \setlength{\parindent}{1em} %indentazione paragrafo \setlength{\parskip}{0.5em} % spazio tra due paragrafi \renewcommand{\baselinestretch}{1.5} %interlinea  \usepackage{float}  \usepackage{enumitem}  \usepackage{csquotes} \usepackage[backend=biber, style=verbose-ibid, ibidpage=false]{biblatex} \bibliography{bibliography}  I'm using \autocite{} and biblatex package to cite into the footer page my references. But I'm in truble when I cite twice an article because into the footer appears the string "ibid".  How can I insert a cross-refence and avoid to have the "ibid" on the footer page ? Thanks


Does posting a preprint to the arXiv reduce the chances to acceptance?

Depending on the submission journal, there may be some explicit rules allowing or forbidding the posting of a preprint before the peer review process is complete. However, for those journals that don't forbid it, is there any evidence that doing so impacts negatively on the prospects for acceptance?


Calculating grid convergence (True North to Grid North)

I would like to know how to calculate the grid convergence angle between True North and Grid North for UTM maps. I am using ArcGIS 10.0 (ArcView licence). and have used the  tool from the Cartography toolbox. However, I would like to know how to calculate this angle myself (using Excel) to compare against the ArcGIS result?


Easiest way to convert a URL to a hyperlink in a C# string?

I am consuming the Twitter API and want to convert all URLs to hyperlinks.   What is the most effective way you've come up with to do this?  from  string myString = "This is my tweet check it out http://tinyurl.com/blah";   to  This is my tweet check it out http://tinyurl.com/>blah


I have a question regarding the red term below. This is the integration by parts during the derivation of the Euler-Lagrange equation for continuous systems. Why is this not the time derivative $d/dt$.... why do we use the partial? I have seen the equation expressed in both ways and wondered what the physicality's are.  \begin{equation} \int^{t_2}_{t_1}dt\frac{\partial \mathcal L}{\partial (\partial _t\phi)}\frac{\partial }{\partial t}\delta \phi =\frac{\partial \mathcal L}{\partial (\partial _t\phi)}\delta \phi \bigg|^{t_2}_{t_1}-\int^{t_2}_{t_1}\color{red}{\frac{\partial }{\partial t}}\bigg(\frac{\partial\mathcal L}{\partial (\partial _t\phi)}\bigg)\delta \phi dt \end{equation}  This particular Lagrange density is a function of $\mathcal L=\mathcal L(\phi,\dot \phi ,\partial _x\phi)$


I have more then 200 reputations on 3 sites          and    .   All sites are included in the combined flair. I don't want to show my Stack Overflow account on flair.  Is it possible to exclude it from the flair? Thanks!


Why do we have $\lim \sqrt {2 - \sqrt {2 + \sqrt {2 + \sqrt 2 ...}}} (1/2)^n = \pi $?

Why do we have $\lim \sqrt {2 - \sqrt {2 + \sqrt {2 + \sqrt 2 ...}}} (1/2)^n = \pi $ ?  Here $...$ means repeating $n$ times.  I assume it comes from repeated half-angle formulas.  Is this the case ? And if so, is there another way to prove the identity too  ???


I'm running 16.04 from a thumb drive and receiving an error message when I attempt to update package lists.  ubuntu@ubuntu:~$ sudo apt-get update Ign:1 cdrom://Ubuntu 16.04.4 LTS _Xenial Xerus_ - Release i386 (20180228) xenial InRelease Hit:2 cdrom://Ubuntu 16.04.4 LTS _Xenial Xerus_ - Release i386 (20180228) xenial Release Hit:4 http://archive.ubuntu.com/ubuntu xenial InRelease                         Get:5 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]      Get:6 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]        Fetched 216 kB in 0s (267 kB/s)                                                  ** (appstreamcli:5066): CRITICAL **: Error while moving old database out of the way. AppStream cache update failed. Reading package lists... Done   Any suggestions?


I'm writing a piece on the electron neutrino. There's plenty of excellent material out there, but I'm struggling to find anything definitive about their speed. There is for example evidence from :       Approximately two to three hours before the visible light from SN 1987A reached Earth, a burst of neutrinos was observed at three separate neutrino observatories. This is likely due to neutrino emission, which occurs simultaneously with core collapse, but preceding the emission of visible light.   Some reports mention an earlier burst which preceded the visible light . There are no reports that I know about described any neutrino lag. There's also the infamous OPERA  incident of 2011:     In 2011, the OPERA experiment mistakenly observed neutrinos appearing to travel faster than light. Even before the mistake was discovered, the result was considered anomalous because speeds higher than that of light in a vacuum are generally thought to violate special relativity, a cornerstone of the modern understanding of physics for over a century.   I didn't have much of an issue with this myself, and would point out that they didn't measure neutrinos to be going slower than light. And yet one can find assertions that . But is there any evidence of this? Do we have any evidence of slower-than-light neutrinos?   Edit: my question is different to  where the accepted answer is 6 years old, and says your question is equivalent to asking what the absolute mass of the neutrinos is. I'm definitely not asking that. I'm asking if we've ever seen a neutrino going slower than light. If the answer is no, because neutrinos can never go slower than light, this means that a neutrino is more like a photon than an electron. And that despite the claims associated with neutrino oscillation, that it doesn't have any mass at all.


I've to redirect users, after updating a node, to /node/NID path and not to /node/NID/latest (I'm using content moderation).  I've tried to add this on hook_node_update() but have been ignored (without warning or errors):  if (!$entity->isNew()) {     $path = URL::fromUserInput('/node/' . $entity->id())->toString();     return new RedirectResponse($path); }


Question on the output of a tricky C++ code about inheritance

I have the following piece of C++ code: #include <iostream>  using namespace std;  class X{     public:         int i; }; class Y: public X{     public:         int i; };   int main() {     X ob1;     X ob2;     Y ob3;     ob1.i = 1;     ob3.X::i=2;     ob3.i=3;     ob2=ob3;     cout << ob2.i; }  I expect it prints 3 (while it does 2) because ob2.i seems to me to be equivalent to ob3.i which was set to 3 but it seems that the compiler assumes this as the inherited i from the class X. Why?


Vertex group selecting face OUTSIDE the group!

I've just started learning Blender 2.8 but I'm having trouble with what seems like a glitch.  I have a shoe mesh which I have used knife on to create three stripes so that I can assign materials. I have created a vertex group for all the faces of each stripe.   When I select each individual stripe, the selection is fine, and I can select stripes 1 and 2 together. But when I select stripes 2 and 3, an extra face between the stripes is also selected.  I've tried breaking up this face, deleting it and re-making it, breaking up the adjacent face in the stripe, all kinds of things, but I cannot stop this behaviour from happening! As I'm so new to the software I keep thinking it's something I've done wrong, or neglected.  But I've removed the vertex groups and re-made them (several times) but the same behaviour occurs.


list = sorted(set(list)) list[:] = sorted(set(list)) list[::] = sorted(set(list))   I am new to Python, and the first thing I am noticing is that the syntax is concise, but non obvious.  For example, it is not clear what is going on in the three statements above. I ran them and got some results and seems like statement 1 is not updating the list, while statement 2 and statement 3 are. But, I am sure there is more going on here.  What do each of the above assignments mean?


Replace pattern with line from file using awk/sed

I have a file first.html which contains the following code:
 One

 Two
   Now I have another file second.txt which contains some values like:  hahaha hehehe   I want to replace the value in each occurence of "headerValue" with the value from the second file.  Eg. after replacement first.html will become
 hahaha

 hehehe
   The data from file second.txt is unrelated to the data from file first.txt


Show that $\lim_{n\to\infty} \frac{1}{n+1} \sum_{j=0}^{j=n} a_j*b_{n-j} = a*b$ when $\lim_{n\to\infty} a_n = a$ and $\lim_{n\to\infty} b_n = b$

This is a problem from Remmert, Schumacher, Theory of Functions, Chapter 0  Let $(a_n)_n, (b_n)_n$ two complex sequences with $\lim_{n\to\infty} a_n = a$ and $\lim_{n\to\infty} b_n = b$  Show that $\lim_{n\to\infty} \frac{1}{n+1} \sum_{j=0}^{j=n} a_j*b_{n-j} = a*b$  I wanted to split the sum like this  $|\frac{1}{n+1} \sum_{j=0}^{j=n} a_j*b_{n-j} -a*b| =$ $\frac{1}{n+1} |\sum_{j=0}^{j=n} (a_j*b_{n-j} -a*b)|$ $\leq$  $\frac{1}{n+1} |\sum_{j=0}^{j=N_0} (a_j*b_{n-j} -a*b)|$ + $\frac{1}{n+1} |\sum_{j=N_0+1}^{j=N_1} (a_j*b_{n-j} -a*b)|$ + $\frac{1}{n+1} |\sum_{j=N_1+1}^{j=n} (a_j*b_{n-j} -a*b)|$  where I wanted that for the middle terms, $j$ and $n-j$ should be big enough such that $a_j*b_{n-j}$ are close to $a*b$ and the other terms shouldn’t matter, because of the fixed $N_0, N_1$. Unfortunately I didn’t get anything meaningful. Can you give me a hint?


How does the 180 day Schengen rule reset?

I entered Sweden July 17 from the US. My 90 days were up on Oct. 14 however I applied for a tourist extension to extend 30 more days. I never got a response and the consulate told me I was okay to stay in the country until I got a response (even though I was there longer than 30 extra days). I ended up leaving Nov. 20.  The 180 days from July 17 would be Jan.12 2019. I stayed 120+ days of the 180 legally. Does a new  clock rest on Jan.12? I would like to re-enter Schengen country on Jan.13


Is it possible to merge two user profiles with different email ids?

I had created a Stack Overflow account 4-5 years back using an email id provided by the company for which I used to work back then.  I no longer work in that company and no longer have access to email address. So after a while I created this Stack Overflow account with my personnel email which I am using since then.  I came across the merge feature and gave it a try by filling in a form.  But as per the procedure it sends out two identical emails to both accounts to verify and confirm the merge.  As I no longer haver access to the older email address, I will not receive the second email by which I can merge two accounts.  Is there another way I can achieve this?


When stating a theorem in textbook, use the word "For all" or "Let"?

(Some report that my question is similar to another post. However, that post is talking about writing the "proof", rather than "stating" the theorem. "Proving" a theorem is NOT of the same structure and situation as "stating" a theorem. So this question is not duplicated to the other! Do not let it to be closed! And by the way, I'm also the OP of that question...) In writing a textbook, when we need to state a theorem that is a universal quantification, we can use the word  "for all ..."(or equivalently "for every", "for any", "for arbitrary", "for each")  or  "let ...",  Which of these ways is more ideal? Why? Although I think writing as "for all" is the more natural way to reflect the logical structure, that is a universal quantifier $\forall$, the popular style I have seen tends to use "let". Any theoretical aspect or experience is welcome. Example set 1.   For all natural numbers $n$, if $n$ is even, then $n$ squared is even.  Let $n$ be a natural number. If $n$ is even, then $n$ squared is even.    Example set 2.   Let $A,B$ be two sets. If for all $x\in A$, $x\in B$, then we say $A$ is a subset of $B$.  For all pairs $A,B$ of sets, if for all $x\in A$, $x\in B$, then we say $A$ is a subset of $B$.    Example set 3.   Let $Y$ be a subspace of $X$. Then $Y$ is compact if and only if every covering of $Y$ by sets open in $X$ contains a finite subcollection covering $Y$. (Munkres Topology Lemma 26.1)  For all subspaces $Y$ of $X$, $Y$ is compact if and only if every covering of $Y$ by sets open in $X$ contains a finite subcollection covering $Y$.    Example set 4.   For every $f:X\to Y$ being a bijective continuous function, if $X$ is compact and $Y$ is Hausdorff, then $f$ is a homeomorphism. (adapted by me, maybe ill-grammared?) For every bijective continuous function $f:X\to Y$, if $X$ is compact and $Y$ is Hausdorff, then $f$ is a homeomorphism. (adapted by me.) Let $f:X\to Y$ be a bijective continuous function. If $X$ is compact and $Y$ is Hausdorff, then $f$ is a homeomorphism. (Munkres Topology Theorem 26.6)    New added example set 5 (I skipped the quantification on $E,f:E\to\mathbb{R},L,c$, just focus on the key part here.)   If "$\forall\varepsilon>0,\exists\delta>0,\forall x\in E,0<|x-c|<\delta\rightarrow |f(x)-L|<\varepsilon$", then we say $f(x)$ converges to $L$ when $x$ approaches $c$. If, for all $\varepsilon>0$, there exists $\delta>0$ such that for all $x\in E$, if $0<|x-c|<\delta$ then $|f(x)-L|<\varepsilon$", then we say $f(x)$ converges to $L$ when $x$ approaches $c$. (Using "for all") If let $\varepsilon>0$, there is $\delta>0$, such that let $x\in E$, if $0<|x-c|<\delta$ then $|f(x)-L|<\varepsilon$", then we call $f(x)$ converges to $L$ when $x$ approaches $c$. (Using "let". I think this type is not natural. But I can't tell why.)


Can lose everything even when house is almost paid off?

I have a dumb question I've been wondering about. It doesn't apply to me; it's just theoretical.   Suppose there's an older couple who bought a house 27 years ago. They have faithfully made the payments on their mortgage, and currently their equity is 92%. Suddenly, the husband loses his job, and they can't make their mortgage payments. So the foreclosure process begins.   Am I correct that, if the foreclosure process is taken to conclusion and the couple loses their home, they will lose all of that 92% equity they built up? In other words, they will be treated the same as a young couple who currently has 4% equity in their home?  If that's true, then basically that means that a homeowner's risk increases as their equity increases. Which seems kind of perverse.  But maybe I am totally overlooking something; I don't have much experience with home ownership and have no experience with foreclosures.


How to get vector data from OSM to use in QGIS?

How do I get data from OpenStreetMap which I can then edit in QGIS layer by layer?  What is the best OSM output and what / how do I get to a suitable input for QGIS? OR...is there another approach to this?


Why do we not receive reputation by accepting a self-answer

Normally, when a user accepts an answer, he/she gets +2 reputation and the answerer gets +15 reputation.  My question is why is this rule not applied to accepted self-answers?  What is the logic behind this?


Can I use the Ubuntu installer to replace Windows Vista?

Can I use the installer to install Ubuntu and then go and delete Windows Vista while I'm running Ubuntu?


What site is best to ask about household appliances?

I am having a few issues with my iron at the moment and have searched for similar questions but there's doesn't appear to be a site. More specifically my question is:  How do I de-calc an iron when the button becomes too hot to hold in?  There are a few other related(ish) questions I have. Is there like a site for household questions or would such a site have to be proposed in Area 51?


How to get Linux console window width in Python

Is there a way in python to programmatically determine the width of the console? I mean the number of characters that fits in one line without wrapping, not the pixel width of the window.  Edit  Looking for a solution that works on Linux


Is there any strong enough pen-and-paper or mind cipher?

Some ciphers are talked about at , but (at the time of writing) I don't see an answer.   Are they strong enough, or are non-computer ciphers more or less just a toy and one should abandon using them for practical purposes?


I saw a comment posted under an Instagram picture & it said " I will deposit this much amount of money into your bank account call or text me for information" so I messaged this person and his name is John. I don't know where he lives I just have a number.  He said he would need my first and last name and my online banking information not my date of birth, SSN, Address, Bank Address, Routing number, or checking account number. I don't know if it's a scam because all they want is my name and online banking username and password.   So my question is if it is a scam or could he really be wanting to put money into my account? Oh yeah, he also said they'll send it through my account and I'll send half of it BACK through money gram or western union.     No I haven't given him any of my information.


How can I see which devices are synced with my Firefox?

I have set up Firefox Sync on several devices. I can give a name to each device, but, I could find no way to see the list of devices which I already synced. How can I get this information?


Let $R$ be a PID, let $B$ be a torsion $R$-module, and let $p$ be a prime in $R$. Show that if $pb = 0$ for some nonzero $b \in B$, then $\operatorname{Ann}(B)$ is a subset of $(p)$.  Well we can let $\operatorname{Ann}(B) = (t)$ for some $t \in R$ since it is an ideal in $R$. How to make use of the fact that $B$ is torsion (i.e. there is r in R such that rm=0 for each m in M) to prove the desired result?


What is the word for : "A person who, in general, does not agree with the general/popular opinion"?

I know that I am that person :D  With all seriousness, I am pretty sure there is a word for it, and I have seen it, but i forgot it.


replace a string with sed from specific lines

I do know how to replace a string from a specific line such as:   sed -i "<line number>s/<old string>/<new string>/g" <file name>   however I do not know how to replace a string from multiple lines for example from a line number 1 then 10 and then 100


Understanding the Fermi level and the Fermi-Dirac distribution

I'm confused about why the Fermi level is located inside the band gap in semiconductors because it's defined to be the energy level where an electron has a 50% chance to be, but there can't be electrons in the band gap. I now think they mean it's the energy where the Fermi-Dirac distribution reaches 50% but now I'm wondering what this distribution even means when there is a band gap. It's a distribution that gives the occupation probability for a certain energy (given a certain temperature). But why isn't the occupation probability zero in the band gap? Or does it give the occupation in case there was no band gap?   In any case, I was wondering how to interpret the picture below. On the left, the valence band is completely occupied. In the middle, there are a lot of states with a lower occupation probability in the valence band compared to the left, but very few in the conduction band with a higher (but still very small) occupation probability. But it can't be the case that there are suddenly less states being occupied because there are still as many electrons as before. So what am I getting wrong? And how can I interpret the Fermi-Dirac distribution better?  Thanks in advance.


Removing spaces from citations in BibLatex

I am using BibLaTeX to organize my references. I use it in the following way: \usepackage[backend=bibtex8,style=numeric,doi=false,maxbibnames=99,sorting=none]{biblatex}  However, when I cite several authors, eg. \cite{author1,author2,author3}  the results is: [10, 11, 12]. How can I remove the spaces between the numbers? Also, how could I set it to [10-12] instead of [10, 11, 12]?


$\frac{1}{p}+\frac{1}{q}+\frac{1}{r}=1 $ then Holder's inequality


How can I access the main class object from a function inside the class in Java?

Please read the 2 comments in the following code.  public class Field extends LinearLayout {     public void init() {         setOnFocusChangeListener(new OnFocusChangeListener() {             @Override             public void onFocusChange(View v, boolean hasFocus) {                  // I want to access the main object 'Field' here(not the class, the object)             }         });      // to be clear the object referred as 'this' from HERE should be accessed from where the above comment is.     } }   Is this possible? Is there a keyword to access the main class object from a function inside the object?


What causes the gap in shadows underneath an object?

In the following render:   You can see that the shadow of the pink plate on the table isn't complete, as if it is somehow lit. However, if I lift the plate substantially off the table, this problem goes away. I was wondering what causes this? Everything in the scene, except the plate, has no materials assigned, and my lighting setup is the standard one at boot up:    That's a point light. And the mesh of the plate looks like this:


If a mother's love can negate the effects of Avada Kedavra, is Harry the only wizard loved by his mum?

Tons of people die by this spell, the premise of the books is that Harry is the one person to survive it, ever. This is explained by saying his mother loved him so much that he was shielded. I can't imagine no other wizard ever has been in the same situation. Voldemort killed many many people and the situation in the Potter house, a mother refusing to give up her son, must have been something he saw quite often. What was so special about this situation that caused the spell to backfire, because if simply loving your son (a lot) is enough to shield him from death a lot more people should've survived. Even if wanting to sacrifice yourself for your son (like Lily) is required, that must've happened before...    I don't think the linked question's answers answer my question. I'm assuming the exact same situation as with Lily and Harry must've happened before with other people. There has to be something more that sets it apart, simply wilfully protecting someone until the end even though you can choose to step aside is not a unique situation, think about two lovers being threatened by Avada Kedavra.    Edit: I understand that it's the sacrifice that triggered the protection, not the dying. My point is that Lily responded like any mother would and that death-eaters are the types of people who like to give mothers the chance to give up on their son to stay alive.


I'm looking into possibilities to align track data from a GPX file with known roads, perhaps coming from OSM.  So far I'm able to show the tack as such on a map powered by leaflet. Since the app should be as easy to use as anyhow possible I look for web based and if possible fully automated solutions.  The GPX files are stored in a standard CouchDB, so is the App itself.  I think about an approach in which users can upload their GPX file. Once they do the map goes into an edit mode that shows the track and may already suggest a "road only" version of the track. In a best case scenario all the user has to do is to accept the suggestion.  How could something like that be done? Are there any libraries or plugins doing that?


How to write conditional equations with one-sided curly brackets

I want to write a conditional expression such as the following.    What is the best way to express such conditional expressions in Latex?


I composed a question on Stack Overflow which had lots of text. I tried to format it, mostly using <pre> tags but was unable to post it. The website gave the warning that my post contains improperly formatted code.  To seek any guidance on how to properly format it I tried to post the same question with the whole body blockquoted but then I got another warning - This looks like spam.  So I'm putting my question body up on  for any guidance I can get.


I'm using Ubuntu 13.10. I have installed Vidalia and Tor Browser but when I click on vidalia nothing happens.No Icon in the tray nor any Firefox pop up.  However, vidalia appears to be running (shown in the System Monitor).  I have downloaded Tor Browser Bundle and extracted it then ran the start-tor-browser file but nothing happens. What am I missing?  .


How do I reference a PHP variable from a separate javascript file?

Say I have someJavascript.js file and somePHP.phpfile. In my php file, I have some $foo. How do I set a var something = $foo if it's in a different file?   Things I tried:   var something = '<?php echo $foo ?>'; - This just gave me a string of exactly that phrase. var something = '<?php echo json_encode($foo); ?>'; Same thing, just a string.    Any help would be greatly appreciated! Thanks.


exponential of Covariance of two variables in logs, cov(X,Y)=exp(X)*exp(Y)*cov[ln(X),ln(Y)]

I am stuck in calculating steady state in a model that has covariances in logs.  I am wondering in general if the following accurate.  cov(X,Y)=exp(X)*exp(Y)*cov[ln(X),ln(Y)]  if that is accurate could you please let me know which theorem/textbook could be useful?  Thanks a lot and wish you a nice evening


in this C program when i am using  printf("%c",*(name+5));   then program works fine but when i am using   *(name+5) = '#';   then program causes crash  #include <stdio.h> void main(void) {     char * name;     name ="Hello World !";     puts(name);     *(name+5) = '#'; // here is error      puts(name); }


How to make bash substitution $(<"filename") silent

I want to replace cat:  var=$(cat "filename" 2>/dev/null)   by bashism syntax:  var=$(<"filename")   The problem is that I don't know how to make the bashism silent to avoid such warnings:  bash: filename: No such file or directory   I've tried this:  var=$(2>/dev/null <"filename")   but it does not read existing files into var anymore.


Why is work done by non-conservative force around a closed path not zero?

If work done by a conservative force in a closed loop is zero then why is the work done by a non conservative force not equal to zero. Since in both the cases the body moves in a closed path so the displacement must be equal to zero.


Why does "du -b" show a different size than "right click" ⇨ "properties" inside file browsers?

The command  du -b /home/user/directory   shows a completely different file size than displayed by a manual "right click" on the same directory and selecting "Properties" inside common file browsers like Nautilus, PCManFM, Windows Explorer or others.    Examples for requesting the file size:   Via file browser: "Right click" ⇨ "Properties" on a directory shows an apparent (real) file size of 8.141.120 bytes. On the other hand, the used disk space has 8.155.136 bytes and is a bit higher (because of fragmenting etc.). Via du -b: Shows an inexplicable size of 8.145.216 bytes (which is neither the apparent size nor the used disk space of the previous method with file browser).   I already know that the  instead of the apparent size of the directory. With du -b one can change that default behavior to display the apparent (real) size instead. Nevertheless, in "Properties", both the real size as well as the used disk space are completely different from the mentioned output of du -b.    What is the reason for that? Which CLI-command do I have to use if I want to show the real (apparent) file or directory size which has exactly the same value like displayed in file browsers via "Right click" ⇨ "Properties"?  I ask for that because I want to create some simple bash script to compare the real sizes of content on HDD1 and HDD2 after performing a backup. This should be compared within a high possible bit accuracy. A comparison of the used disk spaces won't make sense in that case, because they are very different on both drives.


Why isn't chmod doing what I want it to?

I have created short bash script to run some program 10 times and save the output to a file. While I was setting the executable permissions I thought that it would be nice to remove the write permission, so that the script can not be changed without sudo/root access. But what I got was this:  use@ubuntu:~/some/folder$ sudo chmod -w Run_SIM.sh  chmod: Run_SIM.sh: new permissions are r-xrwxr-x, not r-xr-xr-x   Why?


How to create gnome-terminal as a child process of my process

I've used electron to create desktop application on Ubuntu 14.04 Desktop and used spawn in child_process to create child process. However, when I tried to create gnome-terminal, its parent process is not electron according to pstree.  My code is:  var spawn = require("child_process").spawn; spawn("gnome-terminal");   According to pstree,   init───lightdm───lightdm───init───gnome-terminal   Expected result:  init───lightdm───lightdm───init───bash───npm───sh───node───electron───electron───electron───gnome-terminal


How does the dot product convert a matrix into a scalar?

I am learning linear algebra, and I am a bit confused by the dot product and how the answer to the process turns out to be a scalar rather than a matrix.  For $2$ vectors with $2$ components, I learned that dot product is equivalent to a $1 \times 2$ row vector left multiplied by a $2 \times 1$ column vector.   The result of such a multiplication should result in a $ 1 \times 1 $ vector.   But I am learning that the dot product somehow transforms the result into a scalar, rather than a $ 1 \times 1 $ vector.  Maybe I am missing something but the difference between a $ 1 \times 1 $ vector and a scalar seems important, because you can multiply a scalar by a matrix of any size, but you can only left-multiply a $ 1 \times 1 $ vector by another matrix with $1$ row.  Thanks for any help in understanding this.


Save attachments from many emails at once in Outlook?

Someone sent me 200 emails overnight, with one file attachment apiece. sigh  I'm expecting another 200 each night for the next three nights (the emails come from a server, so asking them to batch them isn't possible).  The file attachments have unique filenames, so is there a straightforward way to save the attachments from the entire group of emails at once?  I'd hate to have to open each email individually, right click, save, rinse, repeat...  I'm fluent in VBA, very comfortable creating Excel macros, so I can imagine it should be relatively easy to traverse a given folder for all messages and save attachments for each, but I haven't written an Outlook macro before, not familiar with the object hierarchy.


So, I will run an email campaign and I want to calculate the difference between the current NPS score and the one after the campaign, to see if the campaign is actually making any impact at all. By the way, the sample sizes are going to be different. So my question is, what statistic calculation can I use for this?   Additional details, the score is ranked from 1 to 10. The sample sizes are different sizes, around 30 and 100. The hypothesis is that the testing of the sample averages are statistically different.


We received a turkey recently which was meant to be 'fresh'. When it arrived it was frozen on the inside. We are told that the fridge was probably set a bit low so the turkey froze on the inside.   I'm not rocket surgeon, but I would have thought that meat would always freeze from the outside in, and then thaw from the outside in. Meaning in this case that the only way for the turkey's inside to be frozen would be for the whole turkey to have frozen and then partially thawed.   My question: is it possible for meat to freeze on the inside first or is by butcher pulling a fast one?


installing *.CLS (e.g., ASL.CLS) with MikTex on windows 7 pro

when I try to compile   \documentclass[bibother]{asl} \begin{document} foo bar baz \end{document}   I get the error: "file 'asl.cls' not found". According to some postings it seems that asl.cls must be installed via running initexmf utility, e.g.,     initexmf --admin --update-fndb   but did not help me. I got the following error: 'Option --admin requires admin privileges' and if I do      initexmf --update-fndb   there are no errors, but I still can't compile tex code (same latex error).  Any suggestions?


Regexp match word but allow for nonlatin letters

const myWord = "ölkorv";  myWord.replace(/\w\S*/g, function(txt) {         return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); });   This returns: "öLkorv". So basicly I understand that \w will only match on latin letters, how would I accomplish the same thing but allow of ÅÄÖ?


Could not open port /dev/ttyACM0 Error after every restart

I'm getting the error could not open port /dev/ttyACM0 : [Error 13] Permission denied : '/dev/ttyACM0 '  To solve this error I write the coomand  sudo chmod a+rw /dev/ttyACM0 which solves the problem for that active session only. Once I turn off my NUC or restart the same error is thrown again and again.


How to create a xml file with specific structure using Php and Mysql?

$sql = "SELECT * FROM users ORDER BY RAND() LIMIT 100"; $xml = new SimpleXMLElement('<xml/>'); $result = $conn->query($sql);  if ($result->num_rows > 0) {     while ($row = $result->fetch_array()) {         $users = $xml->addChild('users');         $users->addChild('Id',$row['sno']);         $users->addChild('lat',$row['lat']);         $users->addChild('long',$row['lng']);         $users->addChild('address',$row['address']);         } $conn->close();    //Create the XML file     $fp = fopen("users100r.xml","wb"); //Write the XML nodes     fwrite($fp,$xml->asXML());     fclose($fp);     echo $xml->saveXML(); ?>   I want to create an XML file using the above code, but the problem is that it did not generate a required structure, which I actually needed.  I need an XML file with following structure. How can I generate it?  <users> <point id="1" lat="24.24707031" lng="68.16540527" address="Pakistan"/> <point id="2" lat="34.24707031" lng="63.16540527" address="Lahore"/> <point id="3" lat="28.24707031" lng="55.16540527" address="Karachi"/> </users>


difference between I EXPECTED and I HAD EXPECTED

What is the difference between "I expected" and "I had expected"?


Consider the Radial Basis Kernel $$K(x,z) = \exp\left(-\frac{\|x−z\|^2}{2\sigma^2}\right)$$ Is it possible to find a feature map in this case? Is it necessary that an explicit feature map exists with all kernels?


Can While loop in a function use variables defined outside the function as a condition? I'm confused

I Just need some clarification on why while loop cannot use variables outside the function. It keeps saying the variables has not been assigned yet even though it has. Does it has something to do with precedence? On how python sets up variables? Or is it just unique to while loops? test1 = True test2 = True  while test1:     print("Test 1 " + str(test1))     test1 = False  def test_loop():     print("Test 2 " + str(test2))     # while test2:     #     print("Test 2 " + str(test2))     #     test2 = False test_loop()    OUTPUT:  Test 1 True  Test 2 True  This works fine when the while loop in the function(test_loop)is commented out. Just to test if I can use the variable test2 and print it out. On which it can. But when I UNCOMMENT the while loop in the function, the variable test2 is unassigned. Which confuses the hell out of me. I get this error:  in test_loop print("Test 2 " + str(test2))  UnboundLocalError: local variable 'test2' referenced before assignment


I've posted this question before; but no one has reacted, so I try it once more.  I'm having trouble with making a parallel version of a bilingual play. Each dramatis personae should have a own indent. Based on the dramatis-package I use:  \newcommand\einzugjid{\hangindent=5mm\hangafter=1} %for Hebrew page  \newcommand\speaker[1]{\noindent{#1} \einzugjid }  \newcommand\einzug{\hangindent=5mm\hangafter=1} %for German page  \newcommand\speakerd[1]{\noindent {\textsc{#1}} \einzug }   But the indent only appears with the German page. Any ideas how I can get this work for the Hebrew page too?  Example:      % arara: xelatex  \documentclass[10pt,twoside]{scrbook} \KOMAoptions   {     fontsize=10pt,     paper=24cm:16cm,     pagesize=pdftex,     DIV=calc,   }    \usepackage[parfill]{parskip} \usepackage[series={A,B,C}]{reledmac} \usepackage{reledpar}   \usepackage{fontspec} \usepackage{polyglossia, xunicode} \usepackage{libertine} \setmainfont[Ligatures=TeX]{Linux Libertine}   \setmainlanguage{german}  \setotherlanguage{hebrew}  \newcommand\einzugjid{\hangindent=5mm\hangafter=1}  \newcommand\speaker[1]{\noindent{#1} \einzugjid }  \newcommand\einzug{\hangindent=5mm\hangafter=1}  \newcommand\speakerd[1]{\noindent {\textsc{#1}} \einzug }  \begin{document}   \begin{pages} \begin{Leftside} \begin{hebrew}  \setRTL  \beginnumbering   \pstart {\RL{\speaker{First.} {גם אַתה}.   אייער פראַה און קינדער זעללע לעבע! אייער פראַה און קינדער זעללע לעבע!  אייער פראַה און קינדער זעללע לעבע! אייער פראַה און קינדער זעללע לעבע! אייער פראַה און קינדער זעללע לעבע!  אייער פראַה און קינדער זעללע לעבע! אייער פראַה און קינדער זעללע לעבע! אייער פראַה און קינדער זעללע לעבע!  אייער פראַה און קינדער זעללע לעבע!}}  \pend   \pstart {\RL{\speaker{Second.}  מייא איהר לייט, מער זעללט נאך אַביסכה וואַרטע מיט דעם עססע איך ווילל ערשט  דען שופט רופע לאָססע, דער זאָלל אַהך מיט עססע. האַלט אַביסכה אין! שמואל, רוהף אמויהל דען. }}\pend       \endnumbering \end{hebrew}\end{Leftside}   \begin{Rightside}  \beginnumbering  \pstart \speakerd{First.} Lorem Ipsum dolor sit amed? Lorem Ipsum dolor sit amed! Lorem Ipsum dolor sit amed.  Lorem Ipsum dolor sit amed? Lorem Ipsum dolor sit amed! Lorem Ipsum dolor sit amed.  Lorem Ipsum dolor sit amed? Lorem Ipsum dolor sit amed! Lorem Ipsum dolor sit amed. \pend   \pstart \speakerd{Second.} Lorem Ipsum dolor sit amed. Lorem Ipsum dolor sit amed.Lorem Ipsum dolor sit amed.Lorem Ipsum dolor sit amed.Lorem Ipsum dolor sit amed \pend \endnumbering  \end{Rightside} \end{pages} \Pages  \end{document}


If energy is only defined up to a constant, can we really claim that ground state energy has an absolute value?

Sorry if this is really naive, but we learned in Newtonian physics that the total energy of a system is only defined up to an additive constant, since you can always add a constant to the potential energy function without changing the equation of motion (since force is negative the gradient of the potential energy).   Then in Quantum Mechanics we showed how the ground state of a system with potential energy $V(x) = \frac{1}{2} m \omega^{2} x^{2}$ has an energy $E_{0}=\frac{1}{2} \hbar \omega $.   But if we add a constant to $V(x)$ won't that just shift the ground state energy by the same constant? So in what sense can we actually say that the ground state energy has an absolute value (as opposed to just a relative value)? Is there some way to measure it?   I ask this in part because I have heard that Dark Energy might be the ground state energy of quantum fields, but if this energy is only defined up to a constant, how can we say what it's value is?


I'm trying to create a new UI for database project. However, I keep getting a nullpointerexception at creating a new GUI object, and when adding content. Here is my code:  class DatabaseGUI extends JFrame implements ActionListener {  JTextField input; JTextArea restult; JButton loadButton; JButton saveButton;    public static void main(String[] args){      DatabaseGUI databaseGUI = new DatabaseGUI();     databaseGUI.setVisible(true);  }  DatabaseGUI(){      this.setTitle("Emplyoee Database");     this.setDefaultCloseOperation(EXIT_ON_CLOSE);     Container content = getContentPane();     content.setLayout(new FlowLayout());      content.add(saveButton);   }


How to configure the gzip compressor for JSON response?

I am implementing REST resource endpoints to expose drupal content. Request to fetch this content is accepting gzip compressor but in response headers, this is not available.     I confirmed whether gzip is enabled in the server or not by viewing any content. In node view I can see the Content-Encoding: gzip in the Response headers. I tried manually to add headers in REST resource like below:  $response->headers->set('Content-Encoding', 'gzip');   But this is leading to below error:    Can anybody help me in this regard?


Before you participate on Winter Bash the popup looks like this:    Is it ethically to name 2020 a great year despite global wide COVID-19 pandemic which took so many lives?


Prove If $0<x<y$, then $x^{\frac{1}{n}}< y^{\frac{1}{n}},\, n\in \mathbb{N}$

Graphically I can see that. But i don't know how to prove this. We have to prove using the fact that $x^n <y^n$ Any help please.


Story about a Giant Creature landing on earth?

In the story people see a speck on the moon which keeps getting bigger day by day and eventually the creature lands on earth. I don't know if this is in the beginning or middle of the story. I read this excerpt about the landing in one of my old English Textbooks. The speck growing and landing is described in detail along with perception and thoughts of people.  (This is not "Heresies of the Huge God", I read it to confirm that.)  Update: As per accepted answer, this and its possible duplicate question have same answer. But both questions are referring to different excerpts of same story. The excerpt I am referring to doesn't mention the robot. It is all about the appearance and arrival of the dragon.


Linear Function: f(ax + by) = af(x) + bf(y) vs y = ax+b.

I studied a linear function definition in our Machine Learning course:  f(ax + by) = af(x) + bf(y)   Using this definition, we can prove that y = ax + b is NOT a linear function. This is counter-intuitive to me.   For example: f(x) = 2x + 3 is NOT linear. f(0 + 1) = f(1) = 5 but f(0)+f(1) = 3+ 5 = 8.  Hence f(0+ 1) != f(0)+f(1)   We all know that y =  ax + b is a line function (I know this is a linear function for ages), but it is not linear according to this definition. I am very confused.  In what situation we should use the above definition?  Recourse:


C++ floating point numbers incorrect output

So, I'm new to C++ and I have come across a weird behavior. This is my code #include <iostream> #include <iomanip>  using namespace std;   int main() {     float fValue = 123.12;     cout << fixed << "Value: " << fValue << endl;     return 0; }   Now the output is kind of weird. For different fValues the output is different e.g: fValue: 123.12   Output: 123.120003 fValue: 1234.12   Output: 1234.119995 fValue: 1234.1231   Output: 1234.123047 So, not sure what I'm doing wrong here or what the problem is.


Related;    This is the theorem i need to prove;  "Let $E(\subset \mathbb{R})$ be closed subset and $f:E\rightarrow \mathbb{R}$ be a contiuous function. Then there exists a continuous function $g:\mathbb{R} \rightarrow \mathbb{R}$ such that $g(x)=f(x), \forall x\in E$."  I have tried hours to prove this, but couldn't. I found some solutions, but ridiculously all are wrong. Every solution states that "If $x\in E$ and $x$ is not an interior point of $E$, then $x$ is an endpoint of a segment of at most countable collection of disjoint segments.". However, this is indeed false! (Check Arthur's argument in the link above)  Wrong solution Q4.5;    Just like the argument in this solution, i can see that $g$ is continuous on $E^c$ and $Int(E)$. But how do i show that $g$ is continuous on $E$?


Do UV filters serve any other purpose on modern lenses other than to protect them?

Are camera sensors sensitive to UV light? I thought that all modern cameras have UV protection 'built in'.   Do UV filters serve any purpose nowadays other than protecting the lens from dirt, scratches and finger prints? If so, why don't we just put clear filters on the lens?


I have created two bezier circles, then converted them to meshes. When I press tab to enter edit mode, the objects appear completely black.   You can see the exact tutorial I am    Why do they appear black, and not have any subdivisions? Is this a problem with blender, or is there a setting I need to change?   Edit Mode   Edit Mode + Wireframe view


How to install software on an offline ubuntu PC? My "online" PC is running windows

Good evening everybody! The "setup": My "online PC": Running Win10, I don't want to bother with installing another OS on that machine. My "offline PC": Running ubuntu 15.04 32bit. It has never been connected to the internet and I want to keep it that way. The problem / question I want to download software on my online windows PC, transfer it to the offline ubuntu PC (with a USB-drive or whatever) and then install it there. I have only found tutorials and infos for running two ubuntu PCs and "exchanging" software between them, but not really anything for downloading stuff on a windows machine and then installing it on a ubuntu machine. And like I said, I don't want to set up a second OS on that "online PC". So, is there a (noob-friendly) way to do this? (I have almost 0 experience with ubuntu or linux in general, I know that you can use "get-apt" to install software on ubuntu if an internet connection is available, or something like that) Why? I only have one PC (a laptop actually) that is connected to the internet, all my other devices are offline, for privacy / security reasons. (I know, I am a bit paranoid, and yes, I know that beeing paranoid and running Win10 is a bit of a contradiction)


Proper punctuation and quotation marks when 2 separate quotations

“It doesn’t have to be a huge event to make a difference, Jones said. “Any kind of activity-related event that can include a fundraising component can be directed toward charity.”


Force required to insert dielectric in a capacitor connected to a battery

This is a sum in a reference book( H.C. Verma, concepts of phycics). A dielectric slab is being inserted in a parallel plate capacitor as shown in the diagram. The width of the plates is given to be $b$. We need to find the force exerted by the capacitor on the slab. The solution given in the book is as follows: As voltage across the capacitor is same, the two sections are in parallel $\therefore c = c_1 + c_2 =\frac {\epsilon_0 b} {d} [l + x(k-1)]$ $ U=\frac 1 2 cV^2$ $F=-\frac {dU}{dx} = -\frac {V^2}{2} \frac {dc}{dx} = -\frac {\epsilon_0 b V^2(K-1)}{2d}$ I have some doubts about this solution. Firstly, the force is independant of $x$ which is a bit weird. We can see that the force is zero when $x=l$. Thus, the potential energy should have a maxima at $x=l$, which isn't seen here. Secondly, the charge on the plates is continuously changing, so current is flowing from the battery. Thus, there should be some heat that is generated, which is not taken into account.


Javascript check given date is greater than current date in (d/m/yyyy) date format shows false

In database my date is stored in D/M/YYYY format eq:(7/1/2021) var todayDate = (  new Date().getDate() +   "/" +   (new Date().getMonth() + 1) +   "/" +   new Date().getFullYear() );  console.log(todayDate);  shows current date as 14/1/2021 when i compare to know which date is greater it  shows false console.log(todayDate > date);// date stored in database(7/1/2021)  can anyone please solve this and thanks in advance


How to construct a multi-qubit controlled rotation with variable angle?

I'm trying to construct a circuit that performs the quantum transformation :    Where $f$ is some function. Is there a way to do it without going through every possible value of $i$ ?


JQuery issues after using load to load external html

I am using the code below to load html into my page:  $(document).ready(function () {     $('#loadingArea').load('includes/template1.html');  });   It works great but for some reason when I use any query to target any divs belonging to the loaded html file it won't work for example:  template1.html contains:  Button Inside the Template  If I try to use:  $("#mybutton").click(function(){      alert('Something');          });   It will not work.  How can I fix this?


Why did Tony take off his suit in the Hydra base?

In Avengers: Age of Ultron, while the Avengers are invading the Hydra base to get Loki's scepter, Tony finds a hidden passage, and then takes off his suit to explore, leaving it to guard the entrance.  But why would he take off the suit, leaving himself defenseless if anyone was in the room?


If I ask bash to echo the -1th argument it prints hb1:  echo $-1 hb1   Why? What is it accessing?


I am given the following question : Let $G$ be a finite group and $\chi$ an irreducible character. What is $\sum_{g\in G}\chi(g)?$ This is the sum of a row of the table character. I know the orthogonality relations but I never read that the sum of the rows in a character table are something particular.


Apps started to crash left and right - is it the recent WebView issue?

I'm using Xioami MI 9 SE. Over the past day or two, I've started experiencing mysterious crashes on startup with several applications, including a Radio receiver app (local to Israel); Opera occasionally, APKPure; and one or two others. Now, I noticed other people experiences something similar on their Samsung phones, and also a few new items about a multi-app-crash issue:  so I thought my situation may be related. However, the workaround suggested at the link doesn't work for me, since MIUI doesn't even show an "Android System Webview" app. So, could it be the same issue? ANd - how do I restore my system to working order? Note: Downloading and installating the latest APKPure version does not seem to resolve the crash.


Hello guys  When I run   sudo nano /etc/proftpd/proftpd.conf  I get this error :   sudo unable to resolve host localhost.localdomain  I'm trying to set DefaultRoot to /var/wwwas per the following screenshots.    When I press CTRl + X then write Y and press enter,/kbd> it give me this error     Can someone please tell me how to resolve this problem?


Ubuntu 16.04: No sidebar/playlist in Totem

I can't get the playlist to show in Totem. The Help page says "To show or hide the playlist, choose View ▸ Sidebar or click on the Sidebar button, and choose Playlist on the top of the sidebar." But when I choose View, there is no Sidebar option, nor is there any Sidebar button.


Longman Advanced Learners' grammar says: (p 27/7)   Dad would always help us out financially when we were at university, however difficult it was for him.   Is it correct to use 'would' in this context?   Or should it be:  1b. Dad always helped us out financially when we were at university, however difficult it was for him.


Appearance of "is is" in speech patterns

Possible Duplicate:             For the past few years I've been noticing a curious phenomenon.  People are quite commonly saying things like "... the problem is is that we don't have access to ...".  It appears that the first "is" has been grafted onto the semantic unit of "the problem" and is no longer being perceived as being present, so the speaker has to add the second "is".  I first thought that this might be related to situations where a repeated "is" is valid, such as  ... the question is "Is this our only option?" ...   but it seems to occur mostly in constructs of the form  ... the [x] is that ...   instead.  I seem to be very sensitive to this and hear it several times a day, often on local or national news broadcasts.  In fact, it's now jarring (in a good way) when I hear someone NOT repeating "is".   Is there a name for this phenomenon? Is it as rampant as it appears to me?


I have a file of JPEG images of our Agents that need to be reduced to 1MB so my boss can add them into his database. How can I reduce their sizes?


If $\lim\limits_{x\to\infty} xf(x) = L$, then $\lim\limits_{x\to\infty} f(x) =0$

Show that if $f: (a,\infty) \rightarrow \mathbb R$ such that $$\lim_{x\to \infty} xf(x) = L$$ where $L \in \mathbb R, $  then  $$ \lim_{x\to \infty} f(x) = 0.   $$


Friends,  Do you know of a neat proof of the linear independence (over $\mathbb{C}$) of the functions $f(t) = e^{at}$ and $g(t)=e^{bt}$ when $a$ and $b$ are linearly independent over $\mathbb{Q}$?


Minimum distance from a point to nearest line among multiple lines shapefile

I am new to QGIS. I am looking for any plugin or any manual method in QGIS for finding minimum distance (perpendicular distance) from a point which is part of one shapefile to nearest line among many lines which is part of another shapefile.   MMQGIS is not useful for this purpose.


No Audio in Ubuntu GNOME 17.04, Realtek ALC892

This is my first venture into using Linux. Things have been mostly smooth, but I have run into an issue with sound: there is none.  I have checked this site, Google, and various other areas to no avail. I am by no means a novice user, but as stated above I am largely ignorant to how Linux handles driver compiles and installation. Any help, even just a point in the right direction, would be greatly appreciated!   System:   AMD Ryzen 1700X MSI X370 SLI Plus Motherboard with Realtek ALC892 chipset. OS: Ubuntu GNOME 17.04, Kernel: 4.11.0    Everything works so far except there is no sound. I have followed several guides that have claimed [SOLVED] on the issue but no luck for me. The most recent guide I have tried has been Realteks own, included in the Linux 3.0 Driver package.  The Realtek HD Audio device shows in BIOS and is enabled. However the hardware device does not show up once i boot into Linux. In sound settings only "Dummy Output" is shown as a virtual device. No hardware device is detected. I am assuming this is because the driver failed to install correctly in Ubuntu. The device outputs sound just fine in Windows 7 and 10.  Following their guide, I end up with a few errors in the ./config, make, and make install steps. I'll include the output here.  I am sure that the sound issue is due to this driver install process ailing, but I am not sure how to fix it.    Some of the errors I encountered:  checking for kernel version... 4.11.0-041100-generic checking for GCC version... Kernel compiler:  Used compiler: gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406 *** NO PREDEFINED KERNEL COMPILER IS DETECTED *** Assuming the same compiler is used with the current system compiler. *** Please make sure that the same compiler version was used for building kernel. checking for built-in ALSA... no checking for existing ALSA module... yes     error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time] "Compiled on " __DATE__ " for kernel %s"     Makefile:167: recipe for target 'compile' failed make: *** [compile] Error 2     make[1]: Entering directory '~/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore' mkdir -p /lib/modules/4.11.0-041100-generic/kernel/sound/acore cp snd-hrtimer.ko snd-hwdep.ko snd-page-alloc.ko snd-pcm.ko snd-rawmidi.ko snd-timer.ko snd.ko /lib/modules/4.11.0-041100-generic/kernel/sound/acore cp: cannot stat 'snd-hrtimer.ko': No such file or directory cp: cannot stat 'snd-hwdep.ko': No such file or directory cp: cannot stat 'snd-page-alloc.ko': No such file or directory cp: cannot stat 'snd-pcm.ko': No such file or directory cp: cannot stat 'snd-rawmidi.ko': No such file or directory cp: cannot stat 'snd-timer.ko': No such file or directory cp: cannot stat 'snd.ko': No such file or directory ~/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/Rules.make:48: recipe for target 'modules_install' failed make[1]: *** [modules_install] Error 1 make[1]: Leaving directory '~/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore' Makefile:206: recipe for target 'install-modules' failed make: *** [install-modules] Error 1


Problem with \pspicture in a simple plain TeX code

Just writing the following very simple program I had some problems. I use to write in plain TeX and in this case I tried to make a picture with PSTricks and first of all sized it with \pspicture. The program is:  \input pstricks \pspicture (0,0)(5,5) \endpspicture \bye   but when I compiled with TeX, I encountered the following error:  Command Line:   tex.exe --src --interaction=errorstopmode "figura.tex" Startup Folder: C:\Users\MT\Documents\TeX  This is TeXk, Version 3.14159265 (TeX Live 2015/W32TeX) (preloaded format=tex)  Source specials enabled. (./figura.tex (c:/texlive/texmf-dist/tex/generic/pstricks/pstricks.tex we are running tex and have to define some LaTeX commands ... (c:/texlive/texmf-dist/tex/generic/xkeyval/pst-xkey.tex 2005/11/25 v1.6 PSTricks specialization of xkeyval (HA) (c:/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex (c:/texlive/texmf-dist/tex/generic/xkeyval/xkvutils.tex (c:/texlive/texmf-dist/tex/generic/xkeyval/keyval.tex)) 2014/12/03 v2.7a key=value parser (HA) (c:/texlive/texmf-dist/tex/generic/xkeyval/xkvtxhdr.tex 2005/02/22 v1.1 xkeyval TeX header (HA)))) (c:/texlive/texmf-dist/tex/generic/pstricks/pst-fp.tex `pst-fp' v0.05, 2010/01/17 (hv)) (c:/texlive/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex (c:/texlive/texmf-dist/tex/generic/pgf/utilities/pgfutil-common-lists.tex)) (c:/texlive/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex (c:/texlive/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex)) (c:/texlive/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex (c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex (c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex (c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex) (c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex) (c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code.tex (c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex) (c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code .tex) (c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex) (c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.comparison.code.te x) (c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base.code.tex) (c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code.tex) (c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex) (c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integerarithmetics .code.tex))) (c:/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex) )) `PSTricks' v2.64b  <2015/14/11> (tvz) (c:/texlive/texmf-dist/tex/generic/pstricks/pstricks.con)) ! Undefined control sequence. \endpspicture ...z@ \box \pst@hbox \else \fboxsep                                                    =0pt \fbox {\rule [-\pst@s... l.5 \endpspicture  ? x No pages of output. Transcript written on figura.log.  _____________________________________________________________________   TeX Compilation Report (Pages: 0)   Errors: 1   Warnings: 0   Bad Boxes: 0 _____________________________________________________________________   What's the problem?


How to tell if an add on is present. Using Python

I want to add a button to a script that will detect if an add-on is present and then enable additional options if it is. I'm not sure how to go about locating this in python itself. But I think this would work better than having options that boot into an error if the add-on isn't present.   for example: if addon_prefs.automirror:  Wouldn't I need to be more specific to query the add ons folder?


Using the squeeze theorem to determine a limit $\lim_{n\to\infty} (n!)^{\frac{1}{n^2}}$

Currently learning how to use the squeeze theorem to determine a limit.  The exercise I'm working on is finding the limit of:   $\lim \ (n!)^{\frac{1}{n^2}}$  So far what I have is:   $\lim \ (n!)^{\frac{1}{n^2}} = \lim \ e^{\frac{1}{n^2}ln(n!)}$  So I know that $1 = e^0 \leq \lim \ e^{\frac{1}{n^2}\ln(n!)}$   But I need help determining what should be on the other side of the equality.   I'm trying to look at $\frac{\ln(n!)}{n^2}$ but I'm having trouble determining its limit as it approaches infinity.  Does $n^2$ increase faster than $\ln(n!)$? Could someone show me why which one increases faster?  If so the inequality would just be:  $1 = e^0 \leq \lim \ e^{\frac{1}{n^2}\ln(n!)} \leq e^0 = 1$   So our limit would just be $1$, right?  Thanks in advance.


Automatic utility for tex source indentation

Is there any indentation tool for (la)tex?  I currently use TexShop under Mac OSX, so I can either use a TexShop plugin or a command line tool.


A function $f$ is such that $$f(a+b)=f(ab)$$ for all natural numbers $a,b\ge{4}$ and $f(8)=8$. Prove that $f(x)=8$ for all natural numbers $x\ge{8}$


I have a site with copyright content and do not want any RSS on it! I cannot have the content distributed legally. Specifially all categories have a default /feed that can be added to the end of the URL. I just found google was indexing this feed, but more importantly anyone who knows wordpress structures can figure it out anyway.  Is there a way to remove RSS functionality across all categories (/feed)? I looked around the internet and there are older solutions for removing one category found here:   A more indepth question is how to completely remove all RSS.  This solution  is not very sound from a maintenance perspective as quoted "It's also super hackish and will probably break at some point in the future". Also I'm not sure how this would impact SEO to have an active link go to your homepage.  I would prefer that the links not exist versus doing a 302. Is this possible?  Is editing the .htaccess to redirect the best solution? This is what I had in mind but it seems messy.


I want to prove the following$$n - 2\sqrt{n} = \Theta(n)$$  Is it correct to say $$n -1 \leq n \leq n +1 => f(n)=n=\Theta(n)$$ $$\sqrt{n}\leq|-2\sqrt{n}| = 2\sqrt{n}\leq3\sqrt{n} =>g(n)=-2\sqrt{n}=O\sqrt{n}$$  So:     $n - 2\sqrt{n} = max(O(n),O(\sqrt{n}))=O(n)$ And:  $n - 2\sqrt{n} = max(\Omega(n),\Omega(\sqrt{n}))=\Omega(n)$ So:     $n - 2\sqrt{n} = \Theta{n}$  Edit: I am not interested in the solution to this problem , but whether my methodology for solving the problem is correct or not.


Why does the Community user approve and reject edits?

Why does the Community user sometimes approve or reject edits? How does a machine know if my edit is valid? What does it mean if my edit was rejected by Community?     See also:


Is the following sentence grammatically incorrect?


Why shouldn't I use Objective C 2.0 accessors in init/dealloc?

In   to  he states that "In general you should not use accessor methods in dealloc (or init)." Why does mmalc say this?  The only really reasons I can think of are performance and avoiding unknown side-effects of @dynamic setters.  Discussion?


Best option for storing Images in mysql DB for android app?

Hi i am developing an android application for a project in college , for the application i am using a WAMP server with a MySql DB running on my laptop, i am using PHP files to communicate with the DB from the android app. I am wondering what would be my best option to store images from the application. Would i be better of storing the images in a directory on the server and store location in the DB or would it be better to encode the image directly into the database?  thanks  (the application is a online shopping model and the images would be uploaded for each item for sale.)


Euclid theory problem on number theory for p divides the binomial coefficient.

let p be a prime and let n be any integer satisfying 1<= n <= p-1.  Prove that p divides the binomial coefficient (p,n) = p!/[(p-n)!n!]  i know that p|p! but p does not divides 1/[(p-n)!n!] since 1/[(p-n)!n!] < p.


How can we prove that $\sum_{i=1}^n\cos\left(i\pi\frac kn\right)=0$, if $k\in2\mathbb N\setminus\left\{0\right\}$

How can we prove that $$\sum_{i=1}^n\cos\left(i\pi\frac kn\right)=\begin{cases}n&\text{, if }k=0\\ 0&\text{, if }k\in2\mathbb N\setminus\left\{0\right\}\\-1&\text{, if }k\in2\mathbb N+1\end{cases}$$ where $n\in\mathbb N$. I suppose it's an easy application of some trigonometric identities, but I wasn't able to figure it out.


This is a very weird behavior. Lately, whenever I am trying to find a process on console with ps aux | grep foo, it is returning a grep: command not found. Ok, that could be something that I changed and did wrong, but the problem is that, after a few tries, it suddenly knows what grep is:  MM:.dev$ ps aux | grep foo -bash:  grep: command not found MM:.dev$ ps aux | grep foo -bash:  grep: command not found MM:.dev$ ps aux | grep foo -bash:  grep: command not found MM:.dev$ ps aux | grep foo MM            70953   0,0  0,0  2699108    744   ??  Ss   10:32AM   0:08.77 foo bar MM             3756   0,0  0,0  2423356    204 s004  R+   10:12AM   0:00.00 grep foo   Any ideas why is this happening?  As suggested, this is what I get when a enter type grep after both, the one failing and the one working:  MM:.dev$ ps aux | grep foo -bash:  grep: command not found MM:.dev$ type grep grep is /usr/bin/grep MM:.dev$ ps aux | grep foo MM             5694   0,0  0,0  2433796    676 s006  S+   10:47AM   0:00.00 grep foo MM:.dev$ type grep grep is /usr/bin/grep


How to use quotation marks when quoting more than one paragraphs?

When quoting on a website like Stack Exchange, we have block quotes:  like these  but if they aren't available, and I want to use "double quotation marks": "then the quote is enclosed in them like this". Now it is ok for a single paragraph, I can put "..." at the beginning and the end of the paragraph. For example, from : "The next period in the history of English was Early Modern English (1500–1700). Early Modern English was characterised by the Great Vowel Shift (1350–1700), inflectional simplification, and linguistic standardisation." That's OK. But what if I quote multiple paragraphs? Should I use "..." at the beginning and end of each paragraph separately? Example: "The next period in the history of English was Early Modern English (1500–1700). Early Modern English was characterised by the Great Vowel Shift (1350–1700), inflectional simplification, and linguistic standardisation." "The Great Vowel Shift affected the stressed long vowels of Middle English. It was a chain shift, meaning that each shift triggered a subsequent shift in the vowel system. Mid and open vowels were raised, and close vowels were broken into diphthongs." "English began to rise in prestige, relative to Norman French, during the reign of Henry V. Around 1430, the Court of Chancery in Westminster began using English in its official documents, and a new standard form of Middle English, known as Chancery Standard, developed from the dialects of London and the East Midlands" Is that the correct way? Or is there any other way to do so?


what is SALSA20 Nonce and its requirements

what is the source of nonce in SALSA20 algorithm.  basically who provides the value of nonce in SALSA20 algorithm


If two functionals have the same kernel, then one is a multiple of the other

I would like some help with this exercise.  Suppose that $f_1,\ f_2 \in V^*$ and that $\text{Ker} f_1 = \text{Ker} f_2$. Show that $f_1 = k f_2$ for some scalar $k$.  I expect your suggestions.  Thanks!


I'm looking for an algorithm that sorts strings similar to the way files (and folders) are sorted in Windows Explorer. It seems that numeric values in strings are taken into account when sorted which results in something like  name 1, name 2, name 10   instead of  name 1, name 10, name 2   which you get with a regular string comparison.  I was about to start writing this myself but wanted to check if anyone had done this before and was willing to share some code or insights. The way I would approach this would be to add leading zeros to the numeric values in the name before comparing them. This would result in something like  name 00001, name 00010, name 00002   which when sorted with a regular string sort would give me the correct result.  Any ideas?


Overstayed as a minor. Will I get the ESTA approval?

I moved to the US when I was 5 and moved back to my home country at the age of 13. Its been 13 years since then. I want to travel to the US for a short holiday and was wondering if I would get denied the ESTA for the Visa Waiver. Specially since I have to answer "yes" to the "8) Have you ever stayed in the United States longer than the admission period granted to you by the U.S. government?" question. I know that overstaying as a minor doesn't really count for ban purposes, but I'm not sure what will happen when I apply.  Any insights? Thanks :)


I am using an ImageSwitcher View to create an infinite loop between 3 pictures.. Every second another image is being displayed in the View.   My code is the following..   I am getting the following error message:   "java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setImageResource(int)' on a null object reference"  This would say I am not instantiating the ImageSwitcher, which I believe I am..  What am I missing?   public class SecAct_Foto_Fragment extends Fragment {      int counter = 0;     View rootView;     private ImageSwitcher pic_image_switch;     private Handler pic_image_switch_handler;      @Nullable     @Override     public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {          rootView = inflater.inflate(R.layout.sec_act_photo_layout, container, false);          pic_image_switch = (ImageSwitcher) rootView.findViewById(R.id.foto_groot_imageswitch);          pic_image_switch_handler = new Handler(Looper.getMainLooper());          pic_image_switch_handler.post(new Runnable() {             @Override             public void run() {                 switch (counter) {                     case 0:                         pic_image_switch.setImageResource(R.drawable.run_mount);                         break;                     case 1:                         pic_image_switch.setImageResource(R.drawable.run_away);                         break;                     case 2:                         pic_image_switch.setImageResource(R.drawable.run_rocks);                         break;                 }                 counter += 1;                 if (counter == 3) {                     counter = 0;                 }                 pic_image_switch.postDelayed(this, 1000);             }         });          return rootView;     } }   Fragment XML :        <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout     xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     xmlns:tools="http://schemas.android.com/tools"     android:background="@color/white"     android:layout_width="match_parent"     android:layout_height="match_parent">       <ImageSwitcher         android:id="@+id/foto_groot_imageswitch"         android:layout_width="match_parent"         android:layout_height="220dp"         android:background="@color/black"         android:contentDescription="@string/topscreen_picture_secondactivity"         android:padding="3dp"         android:scaleType="fitXY"         app:layout_constraintRight_toRightOf="parent"         app:layout_constraintTop_toTopOf="parent"         app:srcCompat="@drawable/run_rocks"         />      <ImageView         android:id="@+id/knoppen"         android:layout_width="120dp"         android:layout_height="25dp"         android:layout_marginBottom="264dp"         android:contentDescription="@string/threebuttons_secondact"         app:layout_constraintBottom_toBottomOf="parent"         app:layout_constraintHorizontal_bias="0.501"         app:layout_constraintLeft_toLeftOf="parent"         app:layout_constraintRight_toRightOf="parent"         app:srcCompat="@drawable/but_left" />  </android.support.constraint.ConstraintLayout>


familly of Radially open sets in $\mathbb{R}^2$

A subset $U\in\mathbb{R}^2$ is called radially open if for every point $x\in U$, $U$ contains an open segment through $x$ in every direction, that is for every $v\in\mathbb{R}^2$, $|v|=1$, there exists $\epsilon>0$ such that $x+sv\in U$ for every $s\in (-\epsilon,\epsilon)$. I proved that the familly of radially open sets is a topology on $\mathbb{R}^2$.   What are the induced topologies of this topology on a straight line of $\mathbb{R}^2$ and on a circle ?


Does Stack Exchange offer themes (just like in gmail) where the user can choose his best liked theme for each site?  If not, how about having it?


Preventing malicious user from accessing a page after logout

I capture a Get request to an .aspx file with the help of Burp Suit, When I log out of my application by using FormsAuthentication.SignOut();, If I repeat the previous authenticated GET request it successfully gets the content of page, How can I prevent this from happening?


Probability of real roots for $x^2 + Bx + C = 0$

Question: The numbers $B$ and $C$ are chosen at random between $-1$ and $1$, independently of each other. What is the probability that the quadratic equation $$x^2 + Bx + C = 0$$ has real roots? Also, derive a general expression for this probability when B and C are chosen at random from the interval $(-q, q)$ for and $q>0$.  My approach: since we're trying to find the probability of real roots. We should first realize when it has imaginary roots. So, $$B^2 - 4aC < 0$$ $$a = 1$$ $$B^2 < 4C $$ I'm not sure where to go from here. How do I now find the probability of $B$ being greater than $4C$?


Are there such things as internal-external forces?

An example of an internal force is the tension in the spring of a harmonic oscillator. An example of an external force is the gravity on a pendulum.  Are there any forces that are both internal and external? Are the fields generated by a force field internal, external, or (if they exist) internal-external?  EDIT: My question is different from the "suggested" post because I'm asking for whether there exists a third category, while the suggested post is asking for an explanation of the difference between internal and external forces.


How many numbers are in the Fibonacci sequence below a given threshold?

Assuming I'm asked to generate Fibonacci numbers up to N, how many numbers will I generate? I'm looking for the count of Fibonacci numbers up to N, not the Nth number.  So, as an example, if I generate Fibonacci numbers up to 25, I will generate:   1, 1, 2, 3, 5, 8, 13, 21 that's 8 numbers   How do I calculate this mathematically for an arbitrary "n"?


Hey guys Im a little confused with the concept of plane waves and how to perform an expectation value. Let me show you by an example. Suppose you have a wave function of the form  $\psi_{\boldsymbol{p}_{0}}(x)=f(p_{0})e^{\frac{i}{\hbar}\boldsymbol{p}_{0}\cdot\boldsymbol{x}}$  where $\boldsymbol{p}_{0}=(0,0,p_{0})$ and suppose you want to perform an expectation value of the position of the particle, that is  $<x>=f^{2}(p_{0})\int\,d^{3}\boldsymbol{x}\,x\,e^{\frac{i}{\hbar}\boldsymbol{p}_{0}\cdot\boldsymbol{x}}e^{-\frac{i}{\hbar}\boldsymbol{p}_{0}\cdot\boldsymbol{x}}=f^{2}(p_{0})\int\,d^{3}\boldsymbol{x}\,x$  wich I think is nonsense. But if you define an arbitrary momentum vector $\boldsymbol{p}'=(p_{1}',p_{2}',p_{3}')$, and perform the transition probability  \begin{align} \left<\psi_{\boldsymbol{p}'}(\boldsymbol{x})|\,x\,|\psi_{\boldsymbol{p}_{0}}(\boldsymbol{x})\right>&=f(p')f(p_{0})\int\,d^{3}\boldsymbol{x}\,xe^{-\frac{i}{\hbar}(\boldsymbol{p}'-\boldsymbol{p}_{0})\cdot\boldsymbol{x}}=f(p')f(p_{0})\int\,d^{3}\boldsymbol{x}\left( i\hbar\frac{\partial}{\partial p_{x}'}\right)e^{-\frac{i}{\hbar}(\boldsymbol{p}'-\boldsymbol{p}_{0})\cdot\boldsymbol{x}}= \\ &=i\hbar f(p')f(p_{0})\frac{\partial}{\partial p_{x}'}\delta^{3}(\boldsymbol{p}'-\boldsymbol{p}_{0})=-i\hbar\delta^{3}(\boldsymbol{p}'-\boldsymbol{p}_{0})\frac{\partial}{\partial p_{x}'}\left( f(p')\right)f(p_{0}) \end{align}  where I made use of the property $f(x)\delta'(x)=-f'(x)\delta(x)$. So now with my new expresion I have a meaningful result and I can evaluate for $\boldsymbol{p}'=\boldsymbol{p}_{0}$ and get a result that I wasnt able to get with the first method. What I'm doing wrong or the the second way is the correct way to do it? Thanks!


How to apply Zorn's Lemma on open intervals

Every chain in the open interval $(0,1)\subset\mathbb{R}$ has an upper bound, but $(0,1)$ has not a maximal. I use the $<$ as the usual meaning "the less than ordering".  What happened in this example since it contradicts Zorn's Lemma.


In one of our production servers, we need to enable xp_cmdshell for some app functionality.   With our current security measures, it is disabled in all instances and needs to be enabled for just one specific SQL Server.   How bad is it to enable xp_cmdshell? Is it really a big thing to worry about? Any specific measure that can be taken to enable it and still limit its use?   Our application team has created a trigger which kicks off another invoice process and they need xp_cmdshell for that.


What's the difference between say:     "The project will be on GitHub",      "The project will be in GitHub" and      "The project will be at GitHub"?


Generating a number between a given range and 0

I am trying to generate a random number between a given range and 0. The code given below helped me to generate a number between the given range.  (int)(Math.random() * 13 + 4);   Is it possible to modify this code to generate a value between 4 and 10 and also 0


how can i clean up all the extra files on my computer running ubuntu 13.10?

I have a 3 TB internal harddrive and i figured that it would last me a long time. well its filled up and i have no clue how. i do have a couple duplicated movies but only about 40GB in movies all together. and about 30GB in music and 70GB in pictures. so i can't for the life of me figure out why my harddrive is filling up. any ideas? ive already looked at my stats and all i can find is it saying how much is used and not used. when i look at what is using what it all looks right. ive tried a duplicate file finder but that only worked for music for some reason and there were like 70,000 files i would have to manually delete. i don't know what else to do.


Multiple website are using my content using my IP in their A records

How can I make all that domains that use my server IP in their A records to redirect to my main website instead of displaying my content?


Why do my LED lights stay on, even when the switch is off?

I have two LED lamps in my corridor, and when I switch them off, they keep emitting light (not very strong, but it's annoying at night).  What can it be? How can I fix it?


Output traffic on different interfaces based on destination port

My question is basically the same as .  I have two interfaces eth1 (10.0.0.2) and wlan0 (192.168.0.2). My default route is for eth1. Let's say I want all https-traffic to go through wlan0. Now if I use the solution suggested in the other question, https traffic will go through wlan0, but will still have the source-address of eth1 (10.0.0.2). Since this address is not routeable for the wlan0 gateway, answers won't ever come back. The easy way would be to just set the bind-addr properly in the application, but in this case it is not applicable.  I figure I need to rewrite the src-addr:  # first mark it so that iproute can route it through wlan0 iptables -A OUTPUT -t mangle -o eth1 -p tcp --dport 443 -j MARK --set-mark 1 # now rewrite the src-addr iptables -A POSTROUTING -t nat -o wlan0 -p tcp --dport 443 -j SNAT --to 192.168.0.2   Now tcpdump sees the outgoing packets just fine and ingoing packets arrive for 192.168.0.2, however they probably never end up in the application, because all I ever get to see, is that the application is resending the SYN-packet, although the SYN-ACK was already received.  So I thought, maybe I need to rewrite the incoming address too:  iptables -A PREROUTING -t nat -i wlan0 -p tcp --sport 443 -j DNAT --to 10.0.0.2   but that didn't work either. So I’m kind of stuck here. Any suggestions?


function foo(a) {   function a() {     return 8;   }   return a();   y = 9; } console.log(foo() + " " + y);   This gives an undefined error for variable y.  function foo(a) {   y = 9;    function a() {     return 8;   }   return a(); } console.log(foo() + " " + y);   This prints 8 9 in the browser console.  If we declare a variable without the var keyword than it becomes global variable.  Why first function does not follow the idea?


Determine the convergence of $\sum\limits_{n=2}^\infty \frac{\sqrt{n+1}}{n(n-1)}$

So I need to know the convergence of this sum. The integral test does not seem to work (WolframAlpha gives a confusing answer which implies it's not the correct method). I also tried the limit comparison test for various harmonic series, but they are all inconclusive. I'm also not getting very far with the ratio test. $$ \sum_{n=2}^\infty \dfrac{\sqrt{n+1}}{n(n-1)} $$


Creating a $6$-integer subset without repetition with no consecutive integers from $\{1,2,\dots,20\}$

How many subsets of six integers chosen without repetition from $1,2,\dots, 20$ are there with no consecutive integers?  I am unsure of where to begin with this problem.


How to give permission to a directory which including lots of images

I want to run my project on localhost and i gave permission to all directories including in my project.  But the problem is in Image directory. how can i give permission to each and every images. it is quit difficult for me because there is lots of images in my image folder.  I used sudo chmod 777 < directory>


Is there a way to include a prefix to the figure number?

The publisher requires that I have captions and references of resp. to figures that include the chapter number. So in chapter 27 it has to be figure 27.1, 27.2, ... in the captions. \refhas to be adapted as well. How can this be done?


Prove that the absolute value of a product is the product of the absolute values of factors.

Theorem. $|a||b|=|ab|$  Proof. Applying the definition of absolute value, the left hand side of the equation could be either $a\times(-b)$ or $(-a)\times(b)$ or $a\times b$ or $(-a)\times(-b)$. For this reason we could have either $-ab$ or $ab$.  If we apply the definition of absolute value to the right hand side of our equation, we discover that we could have either $-ab$ or $ab$. So the theorem is proved.  Is this proof valid? Is it elegant from a mathematical viewpoint?  Thank you.  Edit: The definition of absolute value I am using above is the following: $$|x|=\begin{cases}x, & \text{if $x\ge0$}\\-x,&\text{if $x<0$}\end{cases}$$


I just wonder if moderators earn any money or earn a salary for being moderators - or do they do it just to help out on the site?


I first had windwos 7, then I installed Ubuntu alongside and when my laptop starts I can choose between ubuntu and windows (the ubuntu boot screen) .  Now I have installed another ubuntu inside the windows 7 using virtual box. I want to remove that first ubuntu installation and free up its partiotion. Can I do it without making any problems for the windows and boot screen?


Derive a formula to find the number of trailing zeroes in $n!$

Possible Duplicate:          I know that I have to find the number of factors of $5$'s, $25$'s, $125$'s etc. in order to do this. But how can you derive such a formula for any number $n$?


When you block a caller are they notified they are blocked?


Find all mapping from array/tuple to another array/tuple in python?

How to get all mapping from input array to another array. Some thing like below ?  a = ("a", "b", "c") b = ("d", "e")  Expected output a-d a-e b-d b-e c-d c-e  My current approach a = ("a", "b", "c") b = ("d", "e")  x = zip(a, b) # [('a', 'd'), ('b', 'e')]   Current solution for i in a:    for k in b:       print(i, k)  Any Advance API or faster method than current approach in python ?


I am exploring the world of the REST API for the first time, I have already had to deal with it through the use of Slim, but now I want to be a homemade solution, considering that I don't need any framework for make a simple Rest Api. What I have done is create a page like this:  <?php $method = $_SERVER['REQUEST_METHOD']; $request = explode("/", substr(@$_SERVER['PATH_INFO'], 1));  switch ($method)  {   case 'PUT':     echo "PUT";     break;   case 'POST':     echo "POST";     break;   case 'GET':     echo "GET";     break;   case 'DELETE':     echo "DELETE";       break;   default:     handle_error($request);       break; }   My goal is to implement an access token, I think passing it in the header but I'm not sure (I'm looking for a secure mode). However if I run this from the command line:  curl -X GET http://localhost/v1   I get GET, just to give an example of how it should work. And so for all other inquiries. Now the real question is: how can I call the methods in the switch only if I passed a token? For example, at the top of the page will be performed control will be carried out such a check:  if(!isset($_SERVER['AUTH_USER']))  {     exit('TOKEN not provide'); }   Another question is how to pass the token via curl? Because if I do it through ... I can read the header via curl but how would it work?  UPDATE:  As mentioned by @Paradoxis I've tried with:  url http://localhost/v1 -H "Authorization: <token>"   but seems that I fail to take the header. I spend my time to understand why the header isn't passed, so in my code I've add this line:  print_r(apache_request_headers());   and this is the result:  Array  (    [Host] => localhost    [User-Agent] => curl/7.46.0    [Accept] => */*    [Authorization] => <token> )   How you can see in the request_headers I can see correctly in the header, but I can't catch it through the use of $_SERVER['Authorization'] or $_SERVER['HTTP_Authorization']


Suppose that $K$ is an algebraic extension of a field $F$. Suppose that $R$ is a ring with $F\subseteq R\subseteq K$. I'm trying to prove that $R$ is a field. But I have no idea. Anyone can help me?


I need to access some of my files really fast, so I have some shortcuts on my Desktop,  but I want them even faster so I prefer to have a shortcut to my files just in the dock, panel, or somewhere like that.    In Ubuntu 18.04 (using GNOME) is there any way to add a shortcut to a specific file or document to the Ubuntu dock?  As my question is marked as a duplicate to  I need to clarify that I want my files on the dock not on the desktop etc.


How can laser interferometry be used to measure path difference smaller than wavelength of laser light?

The currently proposed Gravitational wave detection apparatus consists of Michelson Interferometer which is supposed to measure distances of the order of $10^{-22}$m. But the wavelength of the light used is in the order of micrometers ($10^{-6}$m). How is this possible? The conventional way to measure distance is by counting the interference fringes. But for path difference smaller than wavelength of laser light this is not possible.


Python - add key-value pair to dictionary in array

Question is in title. I can't make it work:  >>> data = [{}] * 2 >>> data[1].update({3:4}) >>> data [{3: 4}, {3: 4}]   key-value pair adds to all elements of array. I expected to receive that:  [{}, {3: 4}]


saned accepting scans initiated on scanner/MFP

I'd like to use my Raspberry Pi as a home print and scanner server. I successfully made it to half way, installed hplips and cups, we can print now from OSX, Windows, Ubuntu and Android, there's sane/saned and I can scan from the command line.  I'm wondering if there's a way to set it up so that when I push the scan button on my multifunctional device, it saves the scan with default settings and an incremental file name in a folder that's shared with samba.


Why is there a separate symbol for partial derivatives?

The concept of a partial derivative is very simple: for a multivariate function $f$, the partial derivative of $f$ with respect to a single variable $x$ is computed by treating the other variables as constants and differentiating $f$ with respect to $x$.  As a student of Calculus I, I do not fully understand the need for a $\partial y / \partial x$.  As far as I know, the special “partial” $\partial$ does not change the process of the computation.  In addition, I have become confused as the calculus of my physics course increases in difficulty.  Take a three-dimensional position vector $\vec r = \vec x + \vec y + \vec z$ and an electric field vector $\vec E$ that varies with $\vec r$.  If $V$ denotes electric potential, then $\Delta V = -\int \vec E\cdot d\vec r$.  On a review sheet that my teacher created, he expanded this, saying     $$\begin{align} E_x &= -\partial V / \partial x \\ E_y &= -\partial V / \partial y \\ E_z &= -\partial V / \partial z \end{align}$$   Given the standard setup of a partial derivative, I see no issue with this.  However, our standard formula chart reads that     $$E_x = -\frac{dV}{dx}$$   and this genuinely confuses me since our calculations of field potential are almost always expanded to multiple dimensions.  What is the need for a $\partial f / \partial x$ notation, and why are sources (at least in physics, the only application of partial derivatives I encounter during the course of the school day) inconsistent?


Automatic keyboard input to Linux system

I am using a Linux system. The X-Window will be closed if keyboard idles for 5 minutes. One way to avoid the closure of X-Window is to press the ENTER key within 5 minutes. My question: Is there an automatic way to "press" ENTER key from keyboard?  I tried the following command from a script but failed:  echo -ne "\r" > /dev/myTTY   or  echo -ne "\n" > /dev/myTTY   The newline or CR appears in the command line, but system did not seems to have received the command.