OpenSource ATI driver - Fan running at full speed all the time

I know this is a common problem and have read other topics but couldn't resolve. Anyways yesterday I found a solution - I have 2 graphic cards (hybrid) and they were both on. So I turned one off and installed Jupiter for power management and from there on the fans were quiet and I was happy as hell.  However (:)), yesterday evening I also updated the system and the fan and it's noise came back. I checked whether I am using only 1 graphics card and I am.  c0dehunter@mintBox ~ $ sudo lshw -c video [sudo] password for c0dehunter:    *-display                       description: VGA compatible controller        product: RS780M/RS780MN [Mobility Radeon HD 3200 Graphics]        vendor: Hynix Semiconductor (Hyundai Electronics)        physical id: 5        bus info: pci@0000:01:05.0        version: 00        width: 32 bits        clock: 33MHz        capabilities: pm msi vga_controller bus_master cap_list rom        configuration: driver=radeon latency=0        resources: irq:18 memory:c0000000-cfffffff ioport:c000(size=256) memory:fbcf0000-fbcfffff memory:fbb00000-fbbfffff   Maybe the problem is (false) temp reading from GPU?  c0dehunter@mintBox ~ $ sensors acpitz-virtual-0 Adapter: Virtual device temp1:        +44.0°C  (crit = +105.0°C)  k10temp-pci-00c3 Adapter: PCI adapter temp1:        +47.0°C  (high = +70.0°C)                        (crit = +115.0°C, hyst = +110.0°C)  radeon-pci-0200 Adapter: PCI adapter temp1:       +127.5°C     The thing that is weird is that if I boot into Windows the fan is still at full power (previously it wasn't). Did I f--- up my hardware with software? :)  //OH, yes - I forgot to mention that my laptop is not hot at all. The temps are about 50°C.


jquery doesn't find particular element in ng-repeat

Starting with the following html code  <div ng-repeat="item in list">     <input type="text" class="texter"> </div>   I use jquery to listen on keypress on any input listed.  $('.texter').keypress(function(e){     console.log(this); }   but nothing happens. Even with  $('input').keypress(function(e){     console.log(this); }   Basically, I want to get the element where keypress event is fired.  Is there a way to get it with jquery?  Note that I already searched for an answer before asking but none seems to do what I'm expecting.


I'm bad at grammar, and a foreign friend learning English asked me for help with understanding something. Recently in a conversation, he said "Each of these destinations show that by...", but the person he was talking to corrected him saying that he should have said "shows". My friend wants to know if he should say show, or shows, but I don't know.


HowTo redirect HTTP to HTTPS on the same httpd?

Here is what I have got:   CentOS 5.4 (32-bit)    installed Apache httpd (Server version: Apache/2.2.11 (Unix)) mod_rewrite already presents   Question: how to redirect simple  to  not using VirtualHost defines?  PS: tried to find in later answers on SF, but doesn't find nice solution.  Thanks.


Can I reuse a Windows 7 key on a new computer if I format the old computer?

1) Recently I've decided to replace multiple components in my computer because my hard drive is failing and my motherboard and such need an upgrade. Since the pc was built for me, I have a retail version of Windows 7. Is there any way to deactivate Windows 7 on my old computer and use the same disk and license key on the new computer I plan on building? Or will I just get "Windows errors"?   2) I'm assuming if I format my old computer I should be able to reuse the product key, correct? How does one go about formatting the computer?  3) My copy of Windows 7 is for a 32-bit processor, will it work if I get a 64-bit cpu and then upgrade to Windows 10 (the 64-bit version)? (I used the Windows Media Creation tool to dl Windows 10 to a flash drive so I'll have the upgrade even after July 29th)  Sorry for so many questions, all the forums I've looked at have confused me even more


Text for post buttons is no longer visible (in most cases) in iOS app on iPad OS 13.1

It seems there is an issue with font size.   App Version: 1.6.6.2 Device: Unknown (iPad 7,3) OS Version: Version 13.1 (Build 17A844)


Where should I put the file `inconsolata.sty'

When I run the R CMD check MYpackagePATH form a terminal on the package directory, then the error said that   ! LaTeX Error: File `inconsolata.sty' not found.   So, I download the file inconsolata.zip. But I am not sure where should I put the file.


Why do ICs have NC (No Connection or No Function) pins?

In case they have no use to the end users and have no function, why are they given as pins instead of being just closed? Some ICs have even 4-5 NC continuously (in accordance to their pin number).


Calculate time difference between times past midnight

I have two lists of time, one a set of starts and the other a set of ends, I want to calculate the duration between them and sum them.  When the end time goes past midnight, I experience a problem. I can calculate the difference between the times correctly, but the sum of the duration is incorrect.  Here is the data and the result:    Here are my formulas:


Pay to create a bounty regardless of reputation

As discussed here:  offering actual money as a bounty sets the wrong incentives. However I would suggest giving users the ability to pay with money for offering a bounty regardless of their reputation. The bounty would still count as reputation for the receiving user but would not be discounted from the paying user's reputation.


Ubuntu connect drops. Worked for a while then started dropping again

It worked, the it dropped, then it worked, now it won't connect to wireless. Brand new Asus laptop that came with ubuntu is connected. The problem seems to be with Ubuntu. It keeps asking for authorization codes for my neighbors signals as well as my signal which the asus is connected to.


Showing only legend items that are actually displayed on map in ArcGIS Desktop?

Using ArcGIS Desktop, is there a way for the legend, to only show the subitems that are displayed on the map?


Logical Sessions not closing at MongoDB 4.2

How do I close my all idle connections in MongoDB as forcefully?


I was updating my pokemon go and it said i had to delete it then log back in.

Now it doesn't recognise my email address so i cannot log in again.  please help.  how do i log back in to my account, or has anyone had the same issue


Site recommendation for theoretical questions about Computer Organization and Architecture

First of all, many people will backlash saying you should do some research. But believe me I did. But none of the blog posts or sites found by Google Search helped me with my problem. Hence I have come here asking for a site recommendation for my study related questions. The situation is there was a multiple choice question asking to select which of the following among them is/are true. The subject is COA (Computer Organization and Architecture). And the question is purely theoretical. It was about the definitions of CO (Computer Organization) and CA (Computer Architecture). However the options provided got me very confused. My textbooks didn't help me either, because they are explaining the facts in more cumbersome words, and the exact definition is stated nowhere that I can find. Hence my question, is there a site on SE network where such questions are on-topic? Also, is Academia the place where I should be visiting, since I thought this is more of a technical subject and might not be suitable therein? I think Stack Overflow and Software Engineering is not acceptable either, because there is no code.


How to disable SMS notification during phone call?

I call somebody, or somebody calls me, we are talking. Now, during the call I got SMS and I cannot hear anything because the SMS notification is playing.  So how to disable this notification when call is active? Thank you in advance.  Samsung Galaxy Ace 2, Android 2.3.  Note: I am interested in setting this once and for good. Not something I have to remember to switch off each time I make/get a call.


How regular is the climate situation in SOIAF?

How stable is the period of the multi-annual seasons?  I know this is deliberately kept vague by the author, but there has been much speculation that the climate has some magical elements, and also that it has something to do with the doom of Valyria.  A simple explanation for multi-annual seasons would be simply a planet with a longer orbit than Earth. For simple orbits, the period is determined only by distance from the sun (for instance Jupiter has a 12 year cycle) and this could easily explain the longer seasons if we assume SOIAF's sun is stronger to compensate for being farther away.  However, if the reason was astronomical, the summer/winter cycle would have be very regular. I know that the books mention that some winters are longer than others, but this is separate from periodicity. For instance, on Earth, a given place may have a winter that lasts 3 months one year and 4 months another, but this doesn't change that the peaks of winter will on average be 12 months apart.  On the other hand, if the seasons occur because of a magic spell or something like that, or perhaps some kind of geologic (eg. fluctuating heat output of the planet's core) or atmospheric phenomena (for instance like our ice ages that happen once every couple dozen hundreds of years, but much faster), they need not follow a very strict schedule.  Which version does SOIAF's world most closely correspond to? Is the summer/winter cycle on a stable period? If not, is the period changing unpredictably, or has it steadily increased or decreased over the years?


All Stack Exchange site logos are showing up as the 3D Printing one

This just started happening on non-meta sites:    Meta Stack Exchange's logo in the "Featured on Meta" section seems to have been replaced with some site's logo. Mousing over the icon does produce "Meta Stack Exchange" as normal, and the link works.  It even happens in the reputation and inbox dropdowns no matter what site they're visited on:    All the HNQs are showing as being from 3D Printing now:


Why can't reference variables be reassigned to another Immutable object?

This link  talks about Integer class being immutable and thus its value can't be changed. I understand that immutable objects can't be changed but their reference variable can change to point to another object can't they? Hence, by that logic, shouldn't the reference variable integer simply point to another Integer object with value 10 while the Integer object with value 5 remains unchanged in the heap? But the output remains unchanged public static void main(String[] args)  {     Integer integer=5;     System.out.println(integer);          modifyInteger(integer);     System.out.println(integer); }  public static void modifyInteger(Integer integer) {     integer=10; }


How to check if some packages can be removed

I want to minimize my Ubuntu system, which means that I'm trying to remove the installed packages by default as many as I can.  My goal is to get a minimized Ubuntu system so that I can run my own cpp project (of course I will install cmake, gcc on my own).  For now, my method is to use apt or dpkg to list all packages installed, then to remove one package from the list and reboot, if the system can be rebooted normally, I'm gonna say that the package can be removed.  As you see, this method is very bad because it takes so much time.  I just want to know if there is some better way to do so.


During a fault, how does current flow through the earth wire when the earth wire has no return path? Doesn't the earth wire in earth grounding terminate at a copper plate located deep underground, making the current flow unidirectional with no return path?


"only then can you do" vs "only then you can do"

What is correct in a sentence: "Only then can you do" or "only then you can do" ?


simplify $\sum_{n \geq0 } \binom{2n}{n}\frac{1}{2^n}t^n$

How to simplify $$\sum_{n \geq0 } \binom{2n}{n}\frac{1}{2^n}t^n$$ to show it equals $(1-2t)^{-1/2}$?  Here is a proof I came up with, but I use the fact that I know what the answer should be, so I am a bit dissatisfied with it. By the binomial theorem, the coefficient of $t^n$ in the  $(1-2t)^{-1/2}$  is $\binom{-1/2}{n}(-2)^n$, and we want to show this equals $\binom{2n}{n}\frac{1}{2^n}$. This can be done via induction; it amounts to showing  $$ 1 \cdot 3 \cdot 5 \cdots (2n-1)\cdot 2^n = (2n)(2n-1)\cdots (n+1)$$ which can be easily proved via induction.  I tried using $\binom{2n}{n}=\sum_{i}\binom{n}{i}\binom{n}{n-i}$


Suppose someone ask a question, then in base of the answer I gave, he/she change the question to something else. Now the my answer is meaningless looking like a copy of a part of the question. What am I supposed to do? Should I delete the answer?


I want to run .py script:   python /home/project/manage.py slope_update   If I run it from shell it's OK, but in cron does not work:  */10 * * * * root python /home/project/manage.py slope_update   What wrong?   I edit my /etc/crontab file from root   SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin  # m h dom mon dow user  command 17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly 25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --repo$ 47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --repo$ 52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --repo$ #  */10 * * * * root /usr/bin/python /home/project/manage.py slope_update    With user quanta help:   */10 * * * * root /usr/bin/python /home/project/manage.py slope_update >> /tmp/foo.log 2>&1  cat foo.log  Unknown command: 'slope_update' Type 'manage.py help' for usage.  Why slope_update try to use as command, but must have as parameter If this "python /home/project/manage.py slope_update" run in terminal it's work. Why?


I am trying to make a script that switches files at different times of days so that my settings are pulled at different times like a day mode and a night mode.  If I have a file 1, 2, and 3 which 3 is a group of settings for my server. I want to switch out 1 to become 3 from 8am to 6pm. then I want 2 to become 3 from 6pm to 8am automatically. How can I do this though shell script? I just want to basically do a cp -v 1 3 then cp -v 2 3 on a schedule how would I accomplish this? thanks in advance! I don't want to do it through cron i want to do it through shell script only, if possible!!


Show that for a set of vectors to be linearly independent in a subfield $F$ of a larger field $G$, they must be linearly independent in $G$.

$F$ is a subfield of a larger field $G$.  Let $ v_1, v_2,\ldots,v_m $ be vectors in $F^n $. Show that $ v_1, v_2,\ldots,v_m $ are linearly independent in $ F^n $ $iff$ they are linearly independent in $G^n$.  Edit:  I know that if I extend this set of vectors to a basis of $F^n$ and form a square matrix, this matrix is invertible over $F$, hence it's also invertible over $G$ since $F^n \subset G^n$,   however I'm failing to work the way the question is asking me to.


Health risk to my unborn child due to alcohol and drug use before finding out I was pregnant?

We were not planning on getting pregnant so we both were not practicing healthy living habits! The only time  we were not careful having sex was only a few days (2days) after my last period which I knew was not in the fertile range. But that only time got me pregnant.  We are over the moon but so worried as I have been consuming alcohol pretty much 2 weekends last month (not excessive but some shots) and I smoked weed like every day but not excessive only a small amount like one of two puffs a day but that was mixed with tobacco. Also two weeks after my last period we partied and I had half an ecstasy too. Had I known I was pregnant I would have never touched any of those! I love kids, they are my favorite but I'm so upset without knowing I might have caused damage to my baby!   Please advise! I'm in to the 5th week now and from the moment I knew I was pregnant I stopped all and I started eating and drinking a lot of water, taking vitamins needed etc. But I am still worried of the substances I may have put in my body without knowing I was pregnant.


Is there any model explaining why would a particle revolve around another one in an elliptical orbit?

The reason for asking this question is to understand the elliptical orbits of planets and why aren't they circular, we know that if a particle moves with an initial velocity perpendicular to the gravitational force of another particle, it orbits it in a circle as the perpendicular acceleration is constantly changing the direction of the velocity.  I recently came across , and didn't see him explain why are the orbits elliptical.  But I did some research on it and I learnt that a particle can move around/orbit another particle in any of the four conic sections, all I want now is to compare the conditions of a circular orbit(I know them) to the ones for an elliptical orbits(that's why you're here).   If theoretically planets should orbit in circles then my guess would be that modeling the planets and their stars as particles when they aren't even perfect spheres and the effects of external gravitational fields is the reason.


find . -type d -mtime +1 only shows one file in a 4 day span

I was trying to use find with -mtime +1 to find all directories older than 24 hours but having issues getting this done. I understand that using -mtime +n should remove n*24 hours of data but it seems to only find one folder to remove - 2019-07-05.  Why doesn't it also offer the 2019-07-06 folder?  From find man page:  -mtime n File's  data  was  last modified n*24 hours ago.     Example:  [user@craptaindee mysql] find /some/folder/mysql/ -type d -mtime +1 /some/folder/mysql/2019-07-05  [user@craptaindee mysql] find /some/folder/mysql/ -type d  /some/folder/mysql/ /some/folder/mysql/2019-07-07 /some/folder/mysql/2019-07-06 /some/folder/mysql/2019-07-08 /some/folder/mysql/2019-07-05   Here are the timestamps on the folders  drwxr-xr-x 2 root root 4096 Jul  5 23:40 2019-07-05 drwxr-xr-x 2 root root 4096 Jul  6 23:40 2019-07-06 drwxr-xr-x 2 root root 4096 Jul  7 23:40 2019-07-07 drwxr-xr-x 2 root root 4096 Jul  8 13:00 2019-07-08   I was able to complete my task using -mmin but I don't understand why -mtime doesn't act as I would expect from the man page. Also, -ctime doesn't show the other directory either.   EDIT: I completed these tests just before making this post in the early afternoon in the Pacific Timezone at roughly ~13:00 on July 08 2019.


I have some experience with highfrequency circuit analysys. However I am a newbie in PCB design. I am analysing this circuit:  (starts on page 36) and regularly see things like "OMIT" for headerpins or components like resistors or so.  e.g.:   p41 (6/6): the boxheader(?) on the left. P40 (5/6): R48 on the dev board are two small surfaces with some soldering on it but no component apparently. I can hardly see myself (de)soldering resistors on my new dev board...   Why is this being mentionned? What do the people who made the PCB mean by this?  I mean if this part has to be omitted, why did they even place it on the PCB?  Thx


example of process s.t. $X_t\sim Y_t$ for all $t$, but $(X_t)$ and $(Y_t)$ has not the same finite dimensional distribution

To prove that two processes $(X_t)$ and $(Y_t)$ has the same distribution, I proved that $X_t\sim Y_t$, but my teacher said that it's not enough, I have to prove that they I the same finite dimensional distribution, i.e. that $(X_{t_1},...,X_{t_n})$ and $(Y_{t_1},...,Y_{t_n})$ has same distribution for all $t_0<...<t_n$. So could you give me an example of processes s.t. $X_t\sim Y_t$ for all $t$, but $(X_t)$ and $(Y_t)$ has not the same finite dimensional distribution ? I can't find any.


How to turn vulnerable sql queries into parameterized queries PHP

I have this code which I understand is vulnerable but I'm having trouble making a safe prepared statement out of it. Anyone with any idea of how to arrive to the point of getting an array of member records stored in variable $userrecord and number of rows stored in $rowsnumber help me out. I've not used MySQLi prepared statements before  /*This query returns member records in an array format*/ $querymember = "SELECT * FROM members WHERE phone='$providedphone' ";  $member = mysqli_query($conn,$querymember);  // Number of rows $rowsnumber = $member->num_rows;  // User record (Entity) $userrecords = $member->fetch_array(MYSQLI_NUM);   What I've tried  $stmt = $mysqli->prepare("SELECT * FROM members WHERE phone = ?"); $stmt->bind_param("s", $providedphone); $stmt->execute();  // To get number of rows $rowsnumber = $stmt->num_rows;  // To get user records $userrecords = $stmt->get_result();


What is the value of $\csc^2\frac{\pi}{14}+\csc^2\frac{3\pi}{14}+\csc^2\frac{5\pi}{14}$?

How to compute     $$S=\csc^2\frac{\pi}{14}+\csc^2\frac{3\pi}{14}+\csc^2\frac{5\pi}{14}$$   I tried to rewrite it in terms of $\sin$  $$ \csc^2\frac{\pi}{14}+\csc^2\frac{3\pi}{14}+\csc^2\frac{5\pi}{14}= \frac{1}{\sin^2\frac{\pi}{14}}+\frac{1}{\sin^2\frac{3\pi}{14}}+\frac{1}{\sin^2\frac{5\pi}{14}}=\\ \\  \frac{\sin^2\frac{3\pi}{14}\sin^2\frac{5\pi}{14}+\sin^2\frac{\pi}{14}\sin^2\frac{5\pi}{14}+\sin^2\frac{\pi}{14}\sin^2\frac{3\pi}{14}}{\sin^2\frac{\pi}{14}\sin^2\frac{3\pi}{14}\sin^2\frac{5\pi}{14}}$$  then i used  $$2\cos x\cos y=\cos(x-y)+\cos(x+y)\\ 2\sin x\sin y=\cos(x-y)-\cos(x+y)$$  then i found \begin{align} S &= 2\frac{\left(\cos\frac{\pi}{7}-\cos\frac{4\pi}{7}\right)^2+\left(\cos\frac{2\pi}{7}-\cos\frac{3\pi}{7}\right)^2+\left(\cos\frac{\pi}{7}-\cos\frac{2\pi}{7}\right)^2}{\left(\cos\frac{\pi}{7}-\cos\frac{4\pi}{7}\right)\left(\cos\frac{2\pi}{7}-\cos\frac{3\pi}{7}\right)\left(\cos\frac{\pi}{7}-\cos\frac{2\pi}{7}\right)} \end{align}  i made a simplification and used again the transformation of product on sum and arrived at \begin{align} S &= 4\frac{6-5\cos\frac{\pi}{7}+2\cos\frac{2\pi}{7}-4\cos\frac{3\pi}{7}+2\cos\frac{4\pi}{7}-4\cos\frac{5\pi}{7}+\cos\frac{6\pi}{7}}{5-8\cos\frac{\pi}{7}+6\cos\frac{2\pi}{7}-5\cos\frac{3\pi}{7}+4\cos\frac{4\pi}{7}-3\cos\frac{5\pi}{7}+\cos\frac{6\pi}{7}} \\  & \cos\frac{6\pi}{7}=-\cos\frac{\pi}{7} \hspace{5mm}  \cos\frac{5\pi}{7}=-\cos\frac{2\pi}{7} \hspace{5mm} \cos\frac{4\pi}{7}=-\cos\frac{3\pi}{7} \\ S &= 4\frac{6+6\left(-\cos\frac{\pi}{7}+\cos\frac{2\pi}{7}-\cos\frac{3\pi}{7}\right)}{5+9\left(-\cos\frac{\pi}{7}+\cos\frac{2\pi}{7}-\cos\frac{3\pi}{7}\right)} \end{align}     $$-\cos\frac{\pi}{7}+\cos\frac{2\pi}{7}-\cos\frac{3\pi}{7}=-\frac{1}{2}$$   $$S=4\frac{6-3}{5-\frac{9}{2}}=4\frac{3}{\frac{1}{2}}=4\cdot3\cdot2=24$$


Does a Ring of Mind Shielding affect the dream spell?

The party warlock recently acquired a  in Tales from the Yawning Portal   The altar to the Elder Elemental God in the Steading of the Hill Giant Chief  The party patron is a spellcaster who is in a city distant from them.  She is about to contact them via the spell  for an update on their progress in resolving the mission she has set them upon, and does not know about the ring.  She wants a much longer conversation than sending would allow, but has not used dream before to contact them and they do not know that she is planning to do so. Dream is a 5th level illusion spell, and will allow her to contact the party as follows:  If the target is asleep, the messenger appears in the target’s dreams and can converse with the target as long as it remains asleep, through the duration of the spell.  Note that the contact is automatic and there is no saving throw, so long as she does not use the spell to attack the target with a nightmare. The ring says that  Creatures can telepathically communicate with you only if you allow it.  Will the ring protect against the automatic contact from the spell? If the warlock can use the ring to decide whether or not to 'receive the call' while he sleeps, will he know who the sender is, or who the sender is purporting to be, before he makes this decision? For me, the answer hinges on how I should understand "telepathically" in this description, as the natural English meaning of 'communicating feeling at a distance' which could include the Dream spell, or as a specific term that applies only to abilities specifically using the word telepathy, such as various feats, spells, and creature languages.  Thus, an answer able to clarify this would be particularly helpful to me.  However, any answer that resolves the question is welcome. Related:


What do you call someone who is always asking for favours?

What can I call someone (a friend) who is always asking for favours such as:     if you are going downtown, can you buy this for me please or, can you lend me your car for an hour or, if you have some spare time, can you post this letter for me please because I am so busy today   He doesn't seem to realise or,  pretends not to, that there is a limit to asking for help or favours from other people.


Question about proof for $S_4 \cong V_4 \rtimes S_3$

In my book they give the following proof for $S_4 \cong V_4 \rtimes S_3$ :  Let $j: S_3 \rightarrow S_4: p \mapsto  \left( \begin{array}{cccc} 1 & 2 & 3 & 4 \\ p(1) & p(2) & p(3) & 4 \end{array} \right)$  Clearly, $j(S_3)$ is a subgroup $S_4$ isomorphic with $S_3$, hence $j $ is injective. We identify $S_3 $ with $ j(S_3$). Also $V_4 \triangleleft S_4$ and clearly $V_4 \cap S_3 = \{I\}$. We now only have to show that $S_4 = V_4S_3$. Hence $V_4\cap S_3 = \{I\}$, we know that $\#(V_4S_3) = \#V_4 \#S_3 = 4 \cdot 6 = 24 = \#S_4$ thus $S_4 = V_4S_3$, which implies that $S_4 \cong V_4 \rtimes S_3$.  However, I am wondering what the function $j$ is actually used for in the proof? (I do not see the connection.)


Let $f:[0,\infty [\to \mathbb R$ a continuous function such that $\int_1^\infty \frac{f(x)}{x}dx$ converge. Prove that $$\int_0^\infty \frac{f(ax)-f(bx)}{x}dx$$ converge and compute this integral.  Attempts  For the convergence : Since for all $t>0$, $$\int_t^\infty \frac{f(ax)}{x}dx\quad \text{and}\quad \int_t^\infty \frac{f(bx)}{x}dx$$  converge, we have that $\int_0^\infty \frac{f(ax)}{x}dx$ and $\int_0^\infty \frac{f(bx)}{x}dx$ that converge, and thus $$\int_0^\infty \frac{f(ax)-f(bx)}{x}dx.$$  But how I can compute this integral ?


Executing queries throws an error because of a Apostrophe

I've been developing a website and since the beggining I've been thinking of how to solve this problem.  So here it is:  My website as alot of input fields, and with that, I came to notice that if a user uses ' there's an SQL error.     I've search for similiar problems and i did not find any, but I believe I might be searching the wrong way.   This is how I execute my queries:  I created a function for my queries:  function query($sql) {       $stmt = $conn->prepare($sql);     $stmt->execute(); }   And then I use it like this:  $sql = "INSERT INTO users(fname,lname,username) VALUES('$fname','$lname','$username')"; $stmt = $dbconn->query($sql); // $dbconn is the variable of my db connection class   I thought about using str_replace to replace the ' with a \ but then if a user uses \ then it will be converted to a ' and it's not that great of a solution.


While constructing Lagrangian of QED, we don't add the mass term for photon $\dfrac{1}{2} m^{2}A_{\mu}A^{\mu}$ because gauge invariance does not allow. I want to ask, whether "$\bf{Theoretically}$", is this the only reason we don't have mass term. I know why we need this term to vanish by using the experimental facts, but I feel like I am missing something while constructing the lagrangian for QED. Please stay within the domain of Quantum field theory and Lagrangian formulation while answering (if possible).


Can't add ppa:x2go/stable error in 14.04 LTS

This problem has kept many Ubuntu users like me from using x2go and we are forced to choose vnc or other alternatives.    sudo add-apt-repository ppa:x2go/stable cannot add ppa: ppa:x2go/stable please check that the ppa name or format is correct


I am installing RAGE on my PC, after installing it fully I go to play and Steam wants me to download 17.9GB, would that be updates or what? I cant play until I download that and my internet is capped and I cant download is there away around this??


"a" vs "an" before parenthesis: which indefinite article should I use when adding parentheses before the subject?

I want to write a remark in parenthesis between an indefinite article and the rest of the subject. If I didn't write this clarification then using the "a" article would be correct; however for the clarification alone "an" should be used. Which one of the following examples is correct? Both sound weird to my ears.  This experiment used an (arguably small) set of data. This experiment used a (arguably small) set of data.


is there a function in python that delays a program from running for n number of seconds? I am trying to achieve something like this:  print("Hello") delay(5) #delays the program by 5 seconds print("World!")   Any help will be greatly appreciated, Thank you!


I am developing a set of plug-ins for QGis (2.14). Every time I need to try it out I must quit and relaunch QGis. Is there any way to force QGis to reload the plug-ins without restarting it?


Probability of a run of k successes in a sequence of n Bernoulli trials

I'm trying to find the probability of getting 8 trials in a row correct in a block of 25 trials, you have 8 total blocks (of 25 trials) to get 8 trials correct in a row. The probability of getting any trial correct based on guessing is 1/3, after getting 8 in a row correct the blocks will end (so getting more than 8 in a row correct is technically not possible). How would I go about finding the probability of this occurring? I've been thinking along the lines of using (1/3)^8 as the probability of getting 8 in a row correct, there are 17 possible chances to get 8 in a row in a block of 25 trials, if I multiply 17 possibilities * 8 blocks I get 136, would 1-(1-(1/3)^8)^136 give me the likelihood of getting 8 in a row correct in this situation or am I missing something fundamental here?


Why is income tax generally not in a continuous "spectrum"?

With respect to the countries about which I am familiar, income tax is partitioned into tax "brackets", meaning that the rate of taxation varies discretely. Different tax rates are therefore applied to different "blocks" of an individual's annual income. The UK, for example, also has a personal allowance - a pot of money an individual can earn tax-free.  This system seems counter-intuitive to me - it complicates annual tax calculation, as income needs to first be partitioned. Why not apply a continuous and smooth (but obviously non-linear) scale to taxation. The rate would approach a limit and start slow, forming a kind of sigmoid-shaped distribution. The tax rate could then be applied in one motion and could be arguably more "fair."  I'm editing this because it seems to have received many responses - which I didn't anticipate, so I'll offer some of my reasoning behind the question.  In my eyes, and from going through some of the comments & answers which skewed my opinion slightly, I see the following pros and cons:  Pros   The commonly held perspective of "There's no point in taking that job for $N/annum because I'd be taxed through the roof." at some salary thresholds would be partially diminished. There's no two ways about it - it would give finer-grained control over income taxation at the expense of  ease-of-understanding. It could offer a fairer tax system, in spite of public impression of complexity. Tax is digital in many countries - we shouldn't have to be narrow-minded about the possibilities for tax any more. Tax tables are (or at least should be) a thing of the past.   Cons   Personal finance has hitherto been blessed with ease of calculation, even with pen and paper. This would throw a spanner in the works. Would there be a limit to how complex the function could become? Could governments exploit the system by making the function so convoluted or employ devious mathematical techniques (e.g. around the rounding of pennies) as to extort certain parts of the populous? The system cannot be changed to accommodate one group without affecting all, however marginally. (Actually, this isn't completely true if a piecewise function is adopted, but that's going even further down the rabbit hole.) This would seriously impact political campaigns for example, as intention can not be so easily conveyed. The fragile tax legal framework would be seriously threatened by such a major change.


How do I insert a text from variable at the certain line of a text file?

I want to insert a text from variable at the certain line of a text file.  $cat foo hello hello $var=`cat foo` $echo "$var" hello $cat bar some text   I want to insert $var into second line, but sed does not read the content of the variable:  sed -i -e '2i$var\' bar hello $var world   I guess because of two identical words in foo, I'm getting this:  sed: -e expression #1, char 11: extra characters after command


How do you make a block kill you in Minecraft 1.13?

I'm trying to make a block kill you when you touch it using command blocks in 1.13.  I tried using answers, but when I put /execute, it's white, and when I put /execute @p it's red.


Should OK button be on left of Cancel button or vice versa?   Are there any studies suggesting either of the solutions?


Mods folder missing from .minecraft folder

I have Windows 10 and when I go to look in my .minecraft folder in the AppData folder, the mods folder is not there.    How can I find the mods folder?


Jonny was about to sit down when his father came into the house.   What does this "about" mean?  What usage is this?


I don't like seeing negative score as the value of a question. I don't know, maybe it's just me, but it just does not look good when a question has a -1 or -5 score.  This is especially annoying when someone adds a negative vote to your question. I even feel offended when my own question suddenly becomes a -1 or lower.  I have a feature request: Allow negative votes as before but when displaying a score, show the 0 score instead.   This may be implemented easily like score=max(0, score) or something like that.  The negative votes will still be allowed but will only affect questions that already have some positive score, will have no affect on 0 scored questions.  What do you think?


How do we form the possessive of a noun that is possessive in form?

Bloomingdale's has a summer collection. Whose is it? Bloomingdale's's?


Why I am being taken to Windows 7 and can't boot into Ubuntu 13.04 after installation?

After finished installation I am not able to boot in to Ubuntu, I tried to use the Boot-Repair software, but I got no luck with the Recommended Repair.  So, as instructed, I type here the URL returned by the Boot-Repair program:


Windows 10 - can not change default program of file

I'm using Windows 10 and I wanted .pie files to be opened with a jar file I created, so I used assoc and ftype as follows:  assoc .pie PieLang ftype PieLang=java -jar pielang.jar "%1"   assoc .pie does return .pie = PieLang, and ftpe PieLang does return PieLang=java -jar pielang.jar "%1", so everything should work.  However, everytime I open a .pie file, no matter if I do it using double click or using CMD, it will always open with Notepad.  Is there any way I can fix that?  EDIT: Now I can't change .py files either. But somehow pdf files it does let me change  EDIT2: It doesn't work on file properties as well. Instead, when I choose a program as default on the menu, it opens on that program one time, but it doesn't change the default  EDIT3: Ramhound's solution doesn't work as I said before.  (Asked in StackOverflow and my question was marked "on hold" and they told me to post my question here, so I did)


Let $A, B$ matrices $n\times m$ and $m\times n$ respectively so that $AB=I_n$ and $BA=I_m$. Show that $n=m$.


How to put giant parentheses around text

I want to make something that looks like this:    /                \ |     Text goes    | |     in here      |  \                /   The whole thing should be centered in the page, with the text centered between the parentheses, and everything should be in the text font (I'm using XeTeX and the text font is different than the math font). I'd like the option to independently change the size of (1) the parentheses and (2) the text inside. Also, the fonts should be able to be made arbitrarily large, i.e., larger than Huge.


Why you shouldn't upsample before cross validation

I have an imbalanced dataset and I am trying different methods to address the data imbalance. I found this  that explains the correct way to cross validate when oversampling data using SMOTE technique. I have created a model using AdaBoost algorithm and set the following parametres to be used in Grid Search:     ada = AdaBoostClassifier(n_estimators=100, random_state=42)     params = {         'n_estimators': [50, 100, 200],         'random_state': [42]     }  According to the article, this is the wrong way to oversample:     X_train_upsample, y_train_upsample = SMOTE(random_state=42).fit_sample(X_train, y_train)          # cross-validate using grid search          grid_naive_up = GridSearchCV(ada, param_grid=params, cv=kf,                                   scoring='recall').fit(X_train_upsample,                                                         y_train_upsample)     grid_naive_up.best_score_  0.6715940782827282     # test set     recall_score(y_test, grid_naive_up.predict(X_test))  0.2824858757062147 Whereas the correct way to oversample is like so:     from imblearn.pipeline import Pipeline, make_pipeline          imba_pipeline = make_pipeline(SMOTE(random_state=42),                                    AdaBoostClassifier(n_estimators=100, random_state=42))     cross_val_score(imba_pipeline, X_train, y_train, scoring='recall', cv=kf)     new_params = {'adaboostclassifier__' + key: params[key] for key in params}     grid_imba = GridSearchCV(imba_pipeline, param_grid=new_params, cv=kf, scoring='recall',                             return_train_score=True)     grid_imba.fit(X_train, y_train);       # How well do we do on our validation set?     grid_imba.best_score_  0.29015614186873506     # compare this to the test set:     y_test_predict = grid_imba.predict(X_test)  0.2824858757062147 So, according to the article, the first method is wrong because when upsampling before cross validation, the validation recall isn't a good measure of the test recall (28.2%). However when using the imblearn pipeline for upsampling as part of the cross validation, the validation set recall (29%) was a good estimate of the test set recall (28.3%). According to the article, the reason for this is:  When upsampling before cross validation, you will be picking the most oversampled model, because the oversampling is allowing data to leak from the validation folds into the training folds.  Can anyone explain to me simply how the oversampling allows data to leak into the validation and causes the overfitting? And why does this problem not occur in the imblearn pipeline?


Can you still print boarding passes at the airport if you checked in online?

I'm flying to Tokyo. The flight was sold through Finnair. The first leg is operated by American Airlines. The second and final legs are operated by Finnair.  When I checked in online, it said that some airports on my journey (didn't say which one) don't allow mobile boarding passes?? Meaning I will need a physical copy.  Unfortunately I don't have easy access to a printer. Will I still be able to print all my boarding passes at the airport even though I already checked in online?


I'm using an Airport Extreme 802.11n (2nd Generation), running firmware version 7.6.3  I'm connecting to it via a Mac Mini running 10.8.4  I'm trying to diagnose a backup software issue, where the software wants to open a number of files in the directory structure of a disk mounted and shared from the Airport Extreme. There are around 420 files in the directory structure.  I replicated the directory structure on a local disk, and made a test program (in Java, for what it's worth) that opened each file (i.e. obtained a file descriptor) for each file.   I've already changed the default launchctl limits and ulimit settings to be higher for OS X.  When running the test program that opened the files on the local disk, it worked, but it failed on the Airport Extreme over AFP, as well as when I mounted the Airport Extreme volume over SMB.  This is the failure message (over SMB, when mounting in AFP the error was "Too many open files in system".  Exception in thread "main" java.io.FileNotFoundException: /Volumes/XXX/Crashplan    Backup/485670197192556908/cpbf0000000000006343267/cpbdf (Too many open files)   at java.io.FileInputStream.open(Native Method)   at java.io.FileInputStream.<init>(FileInputStream.java:120)   at java.io.FileInputStream.<init>(FileInputStream.java:79)   at AFPTest.main(AFPTest.java:105)   Is this a known issue, and is there any way I can increase the number of open files the Airport Extreme can serve simultaneously?  My ulimit -a settings are:  $ ulimit -a Maximum size of core files created                           (kB, -c) 0 Maximum size of a process’s data segment                     (kB, -d) unlimited Maximum size of files created by the shell                   (kB, -f) unlimited Maximum size that may be locked into memory                  (kB, -l) unlimited Maximum resident set size                                    (kB, -m) unlimited Maximum number of open file descriptors                          (-n) 1000000 Maximum stack size                                           (kB, -s) 8192 Maximum amount of cpu time in seconds                   (seconds, -t) unlimited Maximum number of processes available to a single user           (-u) 709 Maximum amount of virtual memory available to the shell      (kB, -v) unlimited   And launchctl limit:  $ launchctl limit cpu         unlimited      unlimited filesize    unlimited      unlimited data        unlimited      unlimited stack       8388608        67104768 core        0              unlimited rss         unlimited      unlimited memlock     unlimited      unlimited maxproc     709            1064 maxfiles    1000000        1000000


Status from decision in process to with editor meaning in Elsevier review system

In the Elsevier review system, my paper status was initially "with editor" then "under review" then "under editor evaluation" then "decision in process" and now again "with editor."  What does this mean?


Is it possible to make copy constructor with initialization line using another constructor of the same class?

Is this possible to write copy constructor like the code below? (using another constructor in the init line)  Fish::Fish( int fin, int gills) {     m_finCount = fin;     m_gillsCount = gills; }  Fish::Fish(const Fish & other):Fish(other.m_finCount,other.m_gillsCount) {  // all in init line  }


How to call different project targets at runtime not a different app in Objective C

I am working on an application where I want to have some way where I will be able to run only selected project target at run time, maybe on click of a button. But I am not able to get the idea of how to link these targets and call the appropriate one at run time.  Below are some screenshots of my project:      Here, I have created multiple project in a single one. But getting confused about how to connect these.  What I want is, for example, if I click on button 1 on login page, then only first project should run and similarly, if I click on button 2 , then only second project should run, and so on.


embed a terminal command in a beamer presentation

I know this may be extravagant, but I was wondering if it was possible to embed a terminal command in a beamer pdf that can be launch by clicking on it. My idea is that during my presentation, I could just click on a button displayed on my slide to launch a program. This way, I don't have to quit the presentation and open a terminal window. I'm using mac OSX and I need the view the pdf with Adobe Reader. Is there a way to do it without using php forwarding like in ? Edit: I tried this code: \begin{filecontents*}{shell.command} #!/usr/bin/env sh echo "Hello, World!" \end{filecontents*}  \documentclass{beamer}  \begin{document}  \begin{frame}     \href{run:shell.command}{here} \end{frame} \end{document}  And Adobe Reader says it can't find an app to open the file. I also tried opening the file with Safari and it shows the script file, it doesn't run it. This is annoying because if I click on the shell.command file through the Finder, it simply runs it, as it should.


When searching for primes why is prime * prime > number a case to ignore?

That is to check to see if a number is a prime we check if it is divisible by previous primes.  However if the number we are checking is number, and prime * prime > number, where number is the number we are checking then...  we know all primes after this will not be a factor of number.  Why is this conceptually?  // simple code implementing this concept function findPrimes(N) {   const primes = [2];   main: for (let i = 3; i <= N; i += 2) {     for (let j = 1, prime; prime = primes[j++];) {       if (prime * prime > i) break; // this line here       if (i % prime === 0) continue main;     }     primes.push(i);   }   return primes; }


got Internal Server error while running a jsp page in local tomcat server

while successful login reporting a error   actual source code


Multiplication principle and permutation

Definition of Multiplication principle in Principles and Techniques in combinatorics by Chuan-Chong, Khee-Meng is given as:      Let $$\prod_{i=1}^rA_i=A_1\times\dots\times A_r=\{(a_1,\dots,a_r) | a_i\in A_i, i=1,\dots,r\}$$ denote the cartesian product of the finite sets $A_1,\dots,A_r.$ Then $$\left\vert \prod_{i=1}^r A_i \right\vert=|A_1|\times\dots\times|A_r|.$$   I want to know how this principle is applies in defining $P_r^n=n(n-1)\cdots2\cdot1$, ie, what are sets $A_1,\dots,A_r$ here?


I found this discrepancy today:    It seems like my most recent upvote to  isn't being counted here.  So which is it?    resurfacing? That tab is now cached, as of this afternoon? Some new bug?


$\lim_{z \to a} f(z) = L$ iff $\forall z_n s.t. z_n \to a$ as $n \to \infty, f(z_n) \to L$

I'm trying to prove this lemma, but I'm stumped. This lemma is presented first thing after the definition of a limit for complex functions, so I don't have previous results to use here.  The left hand statement translates to:  $\forall \varepsilon > 0, \exists \delta > 0$ such that $0 < |z - a| < \delta \implies |f(z) - L| < \varepsilon$  Right hand statement translates to:  $\forall (z_n)$ s.t. $z_n \to a$, $f(z_n) \to L$  Any guidance would be appreciated


Divergence of reciprocal of primes, Euler

On Wikipedia at  currently is:  \begin{align}  \ln \left( \sum_{n=1}^\infty \frac{1}{n}\right) & {} = \ln\left( \prod_p \frac{1}{1-p^{-1}}\right)   = -\sum_p \ln \left( 1-\frac{1}{p}\right) \\  & {} = \sum_p \left( \frac{1}{p} + \frac{1}{2p^2} + \frac{1}{3p^3} + \cdots \right) \\  & {} = \sum_{p}\frac{1}{p}+  \sum_{p}\frac{1}{2p^2} +  \sum_{p}\frac{1}{3p ^3} +  \sum_{p}\frac{1}{4p^4} + \cdots  \\  & {} = \left( \sum_p \frac{1}{p} \right) + K \end{align}  And then Wikipedia says that $K<1$, without any explanation. How do we know that $$\sum_{p}\frac{1}{2p^2} +  \sum_{p}\frac{1}{3p ^3} +  \sum_{p}\frac{1}{4p^4} + \cdots$$ is equal to a constant $K<1$?


HIV spreads only through body fluids. If a mosquito bites an HIV infected individual and then an uninfected individual, will the virus spread  to the new individual?


Abbreviations list by using \DeclareAcronym : delete \ac{cip}

I have one problem related to Abbreviation list:   First I define the abbreviations: such as   \DeclareAcronym{cip}{ short = CIP , long = Common Industry Protocol, class = abbrev }  \DeclareAcronym{gprs}{ short = GPRS , long = General Packet Radio Services, class = abbrev }   Then   \ac{cip} \ac{gprs}  \printacronyms[include-classes=abbrev,name=Abbreviations]   The result is like this:  Common Industry Protocol(CIP),General Packet Radio Services(GPRS)  Then Abbreviation list..  My question is how can the system does not show the Bold part, only showing the abbreviation list.  Because when I delete  \ac{cip} \ac{gprs} The list is empty, so nothing shows up...Can anyone help me with this


Statistics problem: 15 seats 15 passengers, At least one has taken his correct seat

The problem is as follows, There are 15 passengers, each with their assigned seat. They can take their correct seat, or not. find probability of A - Atleast one passenger has taken his correct seat. What I have started with is this: $P(A_i)$ - probability of passenger i taken his correct seat ( while the others can but don't have to) is: $$P(A_i) = \frac{(n-1)!}{n!} $$ I also think that maybe I should find the opposite, probability of NONE of the passengers taking their correct seat that is $ P(\overline A ) $ However I am stuck here, and don't know how to proceed


What are the rules about laptops and the United States?

Early in June I'll be travelling to the US..  I've heard various bits of news about the rules for taking laptops to the US. That they won't be allowed in hand baggage, or they won't be allowed at all, or no change has taken effect yet, or that they only apply from certain starting points.   What are the rules for taking a laptop on a flight from the UK to the US?  Where can I find up-to-date information on this?


I'm new to photography. I got a Nikon D3100 with the 18-55 kit lens.  I was looking to buy a f/1.8 prime lens, and I found two options:   AF-S DX NIKKOR 35mm f/1.8G   AF-S DX NIKKOR 50mm f/1.8G   How should I go for choosing one or the other?


Want to turn off "note" level messages in GCC

When I compile a C (no pluses) program using GCC, there are several levels of messages possible, like warning, error, and note.  The note messages are useless and distracting.  How do I make them go away using the command line?  (I don't use any sort of IDE.)    Example: /home/user/src9/AllBack3.c:129:9: note: each undeclared identifier is reported only once for each function it appears in.


Consider the following question I've just had answered:    Which would be the correct answer to mark as accepted?  The shorter answer was given first (in the comments) (let's also assume as a hypothetical, second case scenario that it was posted as an answer first). The more elaborate, in-depth answer was posted shortly after.  Does the more thorough answer get accepted? Or could it merely be adding extra noise to what the shorter answer has suggested? Or is this subjective?


Japanese input on 16.04 with Fcitx and Mozc

Typing Japanese on Ubuntu used to mean , but ibus-mozc has been :     Ubuntu 15.10 is supposed to start using Fcitx rather than ibus as their default input method (input method framework), which is another reason for me to hesitate to spend my time to improve ibus-mozc    claims that Fcitx has become the default:     Recommended frameworks for input methods are IBus and Fcitx. The latter is the default framework in Ubuntu for Chinese, Japanese, Korean and Vietnamese.   This claim is disputed, but even if not default, now after upgrading from 2015.10 to 2016.04 ibus-mozc has  that makes it unusable for me, so I would like to switch to fcitx-mozc.  QUESTION: How to switch Ubuntu 2016.04 from ibus-mozc to fcitx-mozc? I see a  16.04 package, but I guess there is more to do than just installing the package? What is the recommended procedure?


Fixing M4A file which got currupted due to not closing the file properly while writing

I have an audio recording that I did with my phone. The recording was running for 3 hours when my battery ran dry. The file is 121 megabytes so it does contain the data, but the file ending and metadata must be corrupted as it can't be played. Is there any way to get the data back?


How can the Hubble telescope see the light from galaxies that are millions of light years distant?

The Hubble Space Telescope is in the news every now and then. How can it photograph galaxies that are millions of light years from Earth?  We can understand that light comes from galaxy and Hubble "catches" it. But does nothing come between the galaxy and Hubble that absorbs or scatters the light over a distance of say 30 million light years? How? Or is there any other concept?


A function and its Fourier transform cannot both be compactly supported

I am stuck on the following problem from Stein and Shakarchi's third book.   I can't figure out how to use the hint productively. Once I know $f$ is a trigonometric polynomial, I see how to finish the problem, but I don't know how to conclude that $f$ is a trigonometric polynomial.  I tried substituting in the Fourier transform in the formula for Fourier coefficients and switching the order of integration, but I couldn't get that to work. I can't think of any more ideas.  Problem: Suppose $f$ is continuous on $\mathbb{R}$. Prove $f$ and $\hat f$ cannot both be compactly supported unless $f=0$.  Hint: Suppose $f$ is supported in $[0, 1/2]$ and expand it in a Fourier series in $[0,1]$. Show $f$ must be a trigonometric polynomial.  This question was asked before, but with different hypotheses and in the context of complex analysis. Please do not close as a duplicate.


In email applications should the text of the cover letter be stated directly in the email or be attached in a separate file?

When applying for example to a postdoc position, is it appropriate to write the text of the cover letter directly into the email, or should it be attached as a seperate file?  One advantage of stating the content of the cover letter directly in the email I could see is that there are good changes that the potential future employer reads it before opening any other ducuments, such as the curriculum vitae, list of publications, etc that might be attached.


Based on my answer , I would like to propose the implementation of a tag black list.  The black list should contain a list of tags that should NOT be used on the site and disallow people with tagging rights to use these tags, for example the case of using the belongs-on tags.  I would also suggest increasing the tagging rep limit however this was previously covered .   Additional Options  As mentioned by  the list should only be accessible by moderators and possibly 10K moderators to ensure that the list is kept tidy. However for 10k moderators a voting process will be put in place to add a tag to the blacklist.  The list should also be updated when moderators merge tags. The removed tag should automatically be added to the black list.  Blacklisted tags can appear as strikethroughs on the tag field when editing or adding a new question, and be validated accordingly.  Additional Nice to Have  When tags are edited they should not bump questions, as this ends up creating a lot of noise on the homepage.


I'm studying managing  system, but actually need a set of instructions, how exactly could i add a repository to my  account (through terminal)? That may sound obvious for many of you, but I'm struggling in attempts to figure that out by my own.  What I want to do is:   login to github (via terminal, enter my account details) create a repo (in my git account folder) push files from my local repository to that newly created repository (upload existing projects in it)   Any help would be appreciated.


Defining bijective function $f:\mathbb{N}\times\mathbb N\to\mathbb N$

I want to prove that $\mathbb N\times \mathbb N$ is countable set using cantor first diagonal method:  where every-time we count the elemnts on the digonal with the direction of the arrow ($(1,1)\mapsto1,(2,1)\mapsto 2,(1,2)\mapsto3,(3,1)\mapsto4$ etc). I know that if I had same problem with $\mathbb N \cup{0}\times \mathbb N \cup{0}$ I could define cantor's function by $f(x,y)=\frac {(x+y+1)(x+y)}{2}+y$  which I'm not sure its' bijective. How can I define a function according to my scheme? EDIT: The question is NOT about proving $\mathbb N\times \mathbb N$ is countable but on writing appropriate bijective function for the described diagonal method.


Where is "the URL in a HTTP request message"?

HTTP: The Definitive Guide says     An origin server that isn’t virtually hosted, and doesn’t allow   resources to differ by the requested host, may ignore the Host header   field value. But any origin server that does differentiate resources   based on the host must use the following rules for determining the   requested resource on an HTTP/1.1 request:         If the URL in the HTTP request message is absolute (i.e., contains a scheme and host component), the value in the Host header is ignored   in favor of the URL.   If the URL in the HTTP request message doesn’t have a host, and the request contains a Host header, the value of the host/port is obtained   from the Host header.   If no valid host can be determined through Steps 1 or 2, a 400 Bad Response response is returned to the client.      Where is "the URL in the HTTP request message"?  Is it the one in the request line (in the first line in a HTTP request, after method such as GET)?  Thanks.


Bullied boy given immense powers by an alien race who destroys the human race

Looking to identify a short story I read in a sci-fi anthology as a child, about an angry, bullied somewhat misanthropic boy who is given immense near-omnipotent powers by an alien intelligence. I read this in English, sometime in the late 1990s/early 2000s. He goes on to use this power to destroy the human race, which causes him to age terribly in a very short amount of time. At the end of the story he is a lonely old man stripped of the powers he held briefly, and is alone on an isolated Earth. The aliens then proceed to invade Earth.


Why is outer block getting value of inner block

please see the code below myduplicates = iterationProc(2, [1, 2, 3, 1]); console.log(myduplicates);  function iterationProc(curItem, currArr) {   let duplicates = -1; // line A   currArr.forEach((item, index) => {     if (curItem === item) {       duplicates += 1; // line B     }   });   return duplicates; // line C }  I am having some difficulty understanding scoping concepts. I have commented three lines A,B, and C. At line B the variable duplicates is getting the value from line A due to lexical scoping in javascript. I understand this. But in my understanding since line C is an outer block as compared to line B so variable duplicates at line C should not get value from line B but retain the value from line A. However at line C the variable does get the value from variable at line B. What am i missing ?


Could you tell me which is correct in the following situation:  I have one parrot, its feathers are of different colors. Which is the correct way to speak about the parrot:        I have a parrot. It is blue and white and green and yellow.   I have a parrot. It is blue, white, green, and yellow.      Some say that the 1st variant is obsolete, the second is correct. Others tell me the 1st is correct, while the pattern of enumeration in the second option suits the situation when one speaks about several objects, not one.  So which one is correct? May be you can suggest a grammar book where this rule is stated?


When an option expires does that constitute a buy or sell

A similar question recently asked about stock sales and option buys triggering wash sale rules.  If an option expires, is that considered a buy/sale ?  What I mean is: let's assume I have a call option with a target date of August 16. Now I sell the underlying stock somewhere before that (after July 16th). Does that trigger wash sale rules (if the option expires in the money, exercised by default) ?  Is an option expiring out of the money considered a sale ?


Uncovering lines in an equation in split environment

How does one uncover lines in a multi-line equation one by one? I have taken a careful look at the answers provided . It hasn't solved my problem. For example, my equation is the following and I want to uncover the two lines one at a time. Any help would be greatly appreciated.  \documentclass{beamer} \usepackage{amsmath, amsfonts, amssymb, cancel} \begin{document} \begin{frame} \frametitle{Steady State Relationship between $O^m, O^a$} \begin{equation} \begin{split} (\rho +\sigma\bar\omega^m)O^m&=O^a-\phi L^a-\phi L^r-\eta O^r\\ \frac{O^m}{O^a}&=\frac{1-\phi l^a-(\phi l^r+\eta) O^r/O^a}{\rho +\sigma\bar\omega^m} \end{split} \end{equation} \end{frame} \end{document}


Is it OK to drill vertically through a joist?

I just bought a new house and I'm looking to run some cables. One of the areas I would like to run it to would require drilling through a 2x10 sistered joist. Realizing that going through the joist should be a last resort, if the hole is 1/4" and in the middle of one of the joists will this weaken the integrity?  I have seen lots of articles about drilling through the depth of a joist, but very few regarding drilling vertically.


Instead of having captions such as Caption 2.1, Caption 2.2 and so on, I would like to have Caption 1, Caption 2 etc. in my document, e.g. the captions which are not related to the chapters. I am using the following code:  \begin{figure}[!ht]   \centering     \includegraphics[width=0.7\textwidth]{prizemlje}     \caption{Osnova prizemlja \cite{5}} \end{figure}


Stupid issue with animate function of jQuery

Sorry for bad english.   The animate function of jQuery work fine at line 2. But at line 3 doesn't work... why?     $('.opac').hover(function(){       $('img', this).animate({opacity: '0.6'}, 500);     $('p', this).animate({background: 'orange'}, 500);      });   The HTML is this:

text here...

   Thanks! ps: the developer tool doesn't give any error...


How to upgrade from12.10 now that 13.04 is EOL?

I am trying to upgrade my Ubuntu virtual machine (currently 12.10) to 13.04 and then eventually to 13.10. I ran the update manager and it says "The software on this computer is up to date. However, Ubuntu 13.10 is now available (you have 12.10)."   If I hit the 'upgrade...' button will it install 13. 04 or 13. 10? I know it is highly recommended that users update from version to version and I am worried if I just hit 'upgrade...' button then something might get messed up upgrading straight to 13. 10 if it skips over 13.04. Any ideas?


if(!ad.Street__c.contains('XXYYZZ'))   {      ForNewRecord.add(ad);   }   I have this piece of code in my class. Where XXYYZZ is a value which can be changed any time. I dont want to hard code in the Class. How can i use Custom Label here.


If $f(x/n)\to0$ when $n\to\infty$, for every $x$ and $f$ is continuous, then $f(x)\to0$ when $x\to0$, or not?

Let $f:(0,\infty)\to \Bbb R$ be continuous and such that for each $x>0$ the sequence $\{f(\frac{x}{n})\}\to 0$.     Does it imply that $\lim_{x\to 0^+} f(x)=0$?   My try:Fix $x>0$.Since $f$ is continuous then $\lim _{n\to \infty}f(\frac{x}{n})=f(\lim_{n\to \infty} \frac{x}{n})=f(0)\implies f(0)=0$  Since $f$ is continuous and $f(0)=0\implies \lim _{x\to 0^+} f(x)=0$  Is the solution correct?In the book it is  given to use the Baire Category Theorem.


How do I kill background processes / jobs when my shell script exits?

I am looking for a way to clean up the mess when my top-level script exits.  Especially if I want to use set -e, I wish the background process would die when the script exits.


Where can I purchase UAE Dirham with good deal in Dubai?

Although Travelex and other foreign exchanges are located in Dubai airport, the exchange rate and fee is quite high.  Where can I purchase UAE Dirham in Dubai with good deal?


NO UBNLDR error while booting from unetbootin

I was trying to install Ubuntu14.04.1 using Unetbootin. I downloaded the .iso file and followed the steps as outlined in the official tutorial.   However after I select the Unetbootin option from the  boot options, nothing happens. It gets stuck at this screen , which says   Try (hd0,0): FAT16: No UBNLDR  Try (hd0,1): NTFS5: _  After searching the web for this issue, I couldn't find anything conclusive. Am I missing something here?   Also, the .iso image that I downloaded has the name "ubuntu-14.04.1-desktop-amd64 ". Can this be the cause of this? My system is a Win7 system with Intel Centrino, 3GB RAM.   I found a thread where somebody posted about the issue in Vista, and it mentioned setting the boot device correctly.     I tried to run the bcdedit command, but I'm not sure how to get the GUID of Unetbootin.  I saw another thread with the same issue that is currently unanswered :    Can somebody help me here.


If $f$ is integrable then $|f|$ is also integrable

Show that if $f$ is integrable on $[a, b]$ then $\lvert f \rvert$ is also integrable. Hint: Show that $$U (P , \lvert f \rvert) − L(P , \lvert f \rvert) ≤ U (P , f ) − L(P , f ).$$ I have: $$U (P , \lvert f \rvert) \ge U (P , f )$$ and $$ L(P , \lvert f \rvert) \ge L(P,f)$$ Thus, $$U (P , \lvert f \rvert) − L(P , \lvert f \rvert) ≤ U (P , f ) − L(P , f ).$$


What happens to someone whose horcrux is destroyed when they are "dead"?

Say for instance, Voldemort is just chilling in Albania, possessing snakes and having fun when, out of the blue, some mad man destroys his Horcruxes?  Considering that he is already on 'earth' would the destruction of his Horcruxes push him to the other side? Or are Horcruxes only needed to tether you to 'earth' upon death? Just something that exists to stop you progressing but once stopped you won't be pushed on until you die again.   What would happen to him?  For the purposes of this question we shall assume that all fragments of Voldemorts soul currently encased or attached to anything are destroyed


I have decided to use KOMA for my new project. I'm writing in Spanish so I have to indent every first paragraph line, but I also want to include a paragraph separation of 1/2 line.  If I set KOMAoption to parksip=false I get the indentation but not the space between paragraphs. If I set parskip=half, the otherway around.  The only option I found is setting parskip=half and after begin{document} include \setlength{\parindent}{1em}. But then, I don't know if someother spacing settings in KOMA will be changed.  Is there any option I haven't found in KOMA that makes it possible to do it in a more elegant way.  Any comment is more than welcome.


When in Demon Form, are demons vulnerable to mortal frailties?

When a Demon is in Demonic Form, does he gain any intrinsic protection against mundane concerns like breathing or falling unconscious? In particular, when in Demonic Form do/are demons:  need to breath? immune to poisons? fall unconscious? (ie do they stay conscious on full lethal?) suffer from wound penalties for having damage in last 3 boxes? need to consume food/water? need to sleep?  The last two are only really a concern to demons who have burnt their last cover. However this can happen in play, and is pretty significant for any burnt NPCs. Is seems odd that a swarm of glass beetles clinging together into the shape of a man might have any issues with being poisoned. But I can't find it clearly stated, whereas it is clearly stated in Werewolf (the Forsaken).


Define calculated column of BOOLEAN/TINYINT(1) type in a View?

I'm configuring a View which contains calculated columns that should be returning Boolean results. Here's an anonymised version of the view:  CREATE VIEW `ItemView` AS SELECT Item.ID     ,ItemProperty1     ,ItemProperty2     ,ItemProperty3     ,EXISTS(SELECT ItemComponent.ItemID FROM ItemComponent WHERE ItemComponent.ItemID = Item.ID) AS Operation1Required     ,Item.Property4 <> ItemType.Property AS Operation2Required FROM Item INNER JOIN ItemType     ON Item.TypeID = ItemType.ID ORDER BY ItemProperty2 ASC   At the moment, MariaDB metadata says that the type for the "Operation1Required" and "Operation2Required" columns is INT, even though they are both expressions with fundamentally Boolean results.  I want them to be BOOLEAN/TINYINT(1), because the view is being read by a strongly-typed client which is expecting Boolean values for these columns.  But the CAST() and CONVERT() functions in MySQL/MariaDB 10.1 don't seem to be able to convert to TINYINT(1).  Is there another way I can specify the correct data type for these calculated columns in the View?  I looked at  and tried it out, but the results of IF(expression, TRUE, FALSE) still seem to be INT according to phpMyAdmin's report of the view's structure.


I want to find an example where the Spectrum is equal to the Continuous Spectrum in C[0,1]; $\sigma_c(A)=\sigma(A)$

I tried to find this example but the condition $\overline{\operatorname{range}(\lambda I -A)}=C[0,1]$ is too hard to prove. Anyone could help me?


I am buing assamble self PC for playing games.  I am wondering, all the drivers, which are most likely for Windows, can i just use them on Ubuntu?  So if i understand you right, it will automaticaly detect the drivers, no need for installs ? or it find custom drivers for ubuntu.  This is the setup, will there be any problem with it?


Create a self creating box like in this video

I'd like to create a simple line box that draws itself that I can import in Blender's VSE.   This can be done in after effects like in this video tutorial:   What methods would be best to recreate this and could I use such methods to creat other simple self revealing shapes a simple well?   Many thanks for any help!


I getting an error when I passing values between two activities using intent. "Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference" first activity intent code  private void add() {     String name = nameAdd.getText().toString();     String date = dateAdd.getText().toString();     Intent intent = new Intent(this,Anniversary.class);     intent .putExtra(NAME,name);     intent .putExtra(DATE,date);     startActivity(intent); }  the second activity where I get the error in .setText private void add() {     Intent intent = getIntent();     String name = intent.getStringExtra(Add.NAME);     String date = intent.getStringExtra(Add.DATE);      Datetxt.setText(date);   // error here     Nametxt.setText(name);   // and here }


Does axiom of foundation/regularity protect against Russell-like paradoxes?

In ZF set theory the axiom of regularity (also called axiom of foundation) says that:     In all nonempty sets x there is an element y such that x∩y=∅   As I been told that  of the axiom is to prohibit constructions as $x\in x$, but is this a possible strategy?  Given a binary predicate $R$, written in infix notation, there are unitary predicates $p$ such that:  $\qquad \exists y \forall x: x R y \leftrightarrow p(x)$.  But there also are some convincing counterexamples:   $  p(x) \leftrightarrow \neg(x R x)$ $  p(x) \leftrightarrow \neg(x R f(x))$, where $f$ is any surjection $  p(x) \leftrightarrow$ all chains $x_1 R x, \: x_2 R x_1, \: x_3 R x_2,  \ldots \:$ are finite.   I think there is a major mistake to try to avoid certain paradoxical loops. First, there are no guarantees that every possibility is prohibited. And second, it seems pathological to make constructions that avoid certain proof-techniques (it's like the attitude of a shyster).  So, what protection comes from this axiom? Historically, has it anything to do with the Russell-predicate $x\notin x$?  See also


Why can't I adopt children despite having a steading in Falkreath?

I bought two pieces of land. One from Morthal, and one from Falkreath. Morthal was the first plot of land I purchased. I only finished half of it. I bought the plot of land in falkreath because I liked the nature better. I finished the house completely in Falkreath. Every time I try to adopt a child off the streets it keeps saying "I have a place but no room for you" Even though I have the bedrooms in my Falkreath house. Why can I not adopt a child and have him/her live at my house in Falkreath?


$e^{\left(\pi^{(e^\pi)}\right)}\;$ or $\;\pi^{\left(e^{(\pi^e)}\right)}$. Which one is greater than the other?

$\newcommand{\bigxl}[1]{\mathopen{\displaystyle#1}} \newcommand{\bigxr}[1]{\mathclose{\displaystyle#1}} $ $$\large e^{\bigxl(\pi^{(e^\pi)}\bigxr)}\quad\text{or}\quad\pi^{\bigxl(e^{(\pi^e)}\bigxr)}$$ Which one is greater?    Effort. I know that $$e^\pi\ge \pi^e$$  Then $$\pi^{(e^\pi)}\ge e^{(\pi^e)}$$  But I can't say $$e^{\bigxl(\pi^{(e^\pi)}\bigxr)}\le \pi^{\bigxl(e^{(\pi^e)}\bigxr)}$$  or  $$e^{\bigxl(\pi^{(e^\pi)}\bigxr)}\ge \pi^{\bigxl(e^{(\pi^e)}\bigxr)}$$


Forbid mouse pointer to go to second monitor windows 10 while in extend mode?

I am using windows 10 extend mode for my second monitor. I am using full screen browser mode on my primary monitor to play a game and have dragged a video to my second monitor.   After I have dragged my video (which is now playing) to my second monitor, I want to forbid my mouse pointer to be able to cross over from my primary monitor on to my second monitor which is the default behaviour with this extend mode.   Is there any way I can assign prefferably a hotkey to disable this behaviour and lock my mouse pointer to my primary monitor?


Adult websites open on visiting any website in my chrome

Since, past few days, an adult website opens on visiting any website in Google Chrome. I have re-installed my chrome, and ever reset my chrome settings. Is their any option to prevent this virus? I even format my windows, and it was good for few days, now again the virus is creating   Edit: The same problem is present in all my vireless devices, Laptop, Andorid Tablet (Nexus 7), Phone (Nexus 5)


Mysql strip time component from datetime

I need to do a date comparison in Mysql without taking into account the time component i.e. i need to convert '2008-11-05 14:30:00' to '2008-11-05'  Currently i am doing this:  SELECT from_days(to_days(my_date))   Is there a proper way of doing this?


Is there a way to show that $e^x=\lim_{n\to \infty }\left(1+\frac{x}{n}\right)^n$?

I know that $$e:=\lim_{n\to \infty }\left(1+\frac{1}{n}\right)^n,$$ by definition. Knowing that, I proved successively that $$e^{k}=\lim_{n\to \infty }\left(1+\frac{k}{n}\right)^n,$$ when $k\in \mathbb N$, $k\in \mathbb Z$ and $k\in\mathbb Q$. Now, I was wondering : how can I extend this result over $\mathbb R$ ? I tried to prove that $f_n(x):=(1+\frac{x}{n})^n$ converge uniformly on $\mathbb R$ but unfortunately it failed (I'm not sure that it's even true). Any idea ?    My idea was to define the function $x\longmapsto e^x$ as $$e^x=\begin{cases}e^x& x\in \mathbb Q\\ \lim_{n\to \infty }e^{k_n}&\text{if }k_n\to x \text{ and }(k_n)\subset \mathbb Q\end{cases}.$$ But to conclude that $$e^x=\lim_{n\to \infty }\left(1+\frac{x}{n}\right)^n,$$ I need to prove that $f_n(x)=\left(1+\frac{x}{n}\right)^n$ converge uniformly on a neighborhood of $x$, but I can't do it. I set $$g_n(x)=f_n(x)-e^x,$$ but I can't find the maximum on a compact that contain $x$, and thus can't conclude.


I am trying to figure this out:  $\mathscr{S}=\big\{(a_n),(b_n),\dots \big\}$ is a finite set of real, null sequences. Does there exist a sequence $(\epsilon_n)$, where $\epsilon_k=\pm 1$ for each $k$, such that: $$\forall\;(x_n)\in\mathscr{S}:\quad \sum_n \epsilon_n x_n<\infty\;?$$  A special case of this problem was posed by one of my lecturers: does every null sequence in $\mathbb{C}$ admit a sequence $(\epsilon_n)$ of signs such that $\sum\epsilon_nz_n$ converges?   The answer is yes. We can always choose signs so that $|\epsilon_1z_1+\cdots\epsilon_nz_n|\leq \sqrt{3}$ for all $n$, with some assumptions on $|z_n|$.  The geometric nature of the proof prevents me from generalising though. Any ideas how to deal with the general case?


How to remove Encrypted flag when copying a file from a HDD to a USB drive?

Environment: Windows 7, but applies to other EFS-compatible Windows versions  I have a file that is encrypted using standard Windows EFS encryption. When I copy that file to a USB drive using Total Commander or Explorer, the file stays encrypted at the destination.   Such encrypted file is inaccessible on any other Windows PC where my USB drive gets plugged in. I could import my personal certificates on that PC, but that's about the last thing I would like to do.  I would like the copying process automatically decrypt my file when the file is copied to a removable drive. Is there a way to tell Windows to do that?  A brute-force way to decrypt the file on-the-fly would be to switch to FAT as a file system on my USB drive, but I don't want to do that either.  Thanks in advance for any hints!


How can I automatically have my Trash emptied when disk space gets below a certain point?

Sometimes my hard drive gets low on space, and various things don't work properly until I empty the Trash and free up some space. I know there are applications that empty the Trash after a set interval—but what I want is an app or script (or other means) to empty the Trash whenever there's e.g. less than 2GB of free space on a given hard drive.


Isn't a subshell created when I run the `bash` command?

Isn't a subshell created when I run the bash command? For example, after executing bash, I cannot access the value of a non-exported variable. In this case, is the environment I switch to with the bash command not a subshell running under the current bash shell? :~$ value="testing" :~$ echo $value testing :~$ bash :~$ ps f   PID TTY      STAT   TIME COMMAND    82 tty1     S      0:00 -bash    97 tty1     S      0:00  \_ bash   124 tty1     R      0:00     \_ ps f :~$ :~$ echo $value :~$ exit exit :~$ export value :~$ bash :~$ echo $value testing :~$


How would you implement an LRU cache in Java?

Please don't say EHCache or OSCache, etc. Assume for purposes of this question that I want to implement my own using just the SDK (learning by doing). Given that the cache will be used in a multithreaded environment, which datastructures would you use? I've already implemented one using  and , but I'm curious if any of the new concurrent collections would be better candidates.  UPDATE: I was just reading through  when I found this nugget:     If you need constant-time access and want to maintain the insertion order, you can't do better than a LinkedHashMap, a truly wonderful data structure. The only way it could possibly be more wonderful is if there were a concurrent version. But alas.   I was thinking almost exactly the same thing before I went with the LinkedHashMap + Collections#synchronizedMap implementation I mentioned above. Nice to know I hadn't just overlooked something.  Based on the answers so far, it sounds like my best bet for a highly concurrent LRU would be to extend  using some of the same logic that LinkedHashMap uses.


Can anyone explain why reference value in output

public class Test {     public char[] reverse(String list) {                    char[] ch=list.toCharArray() ;            for (int i = 0, j = list.length() - 1; i < j; i++, j--) {               char temp=ch[i];               ch[i]=ch[j];               ch[j]=temp;            }            return ch;         }     public static void main(String args[]) {       Test test = new Test();       String a="HELLo";       char[] b=test.reverse(a);                 System.out.println(a);       System.out.println(b);       System.out.println(a+b);    } }   Output: HELLo oLLEH HELLo[C@38462f90  In last s.o.p output is reference while for same vairable b in second s.o.p is string value. Please explain reason


How can I edit two materials simultaneously?

Whenever I open a new shading window, whatever I do in one is just mirrored on the other. If I click a node in one window, the same node and material get selected in the other. I can't edit two shaders at once. How can I edit two shaders simultaneously?


Can I take two laptops to India from United States? One bought in India and one in US

I will be landing at New Delhi airport. The worth of new laptop  (Lenovo Yoga Idea Pad 13) is about $1000 and old one (Macbook Pro) is > 1 lakh INR. I want to leave the new laptop in India. I have a copy of bill with me but not the original bill. I want to know if I have risk of being charged with custom duty.


Detail in the use of the Residue Theorem for $\int\limits_{-\infty}^{\infty}\frac{\cos(2x)-1}{x^2}dx$

As usual, I have a ridiculously specific question about a tiny detail of a tiny calculation. There is a tremendous amount of context, so fair warning. I don't need a solution to this whole problem. I need a solution to one specific part, and it is a minor detail. I'll show what I've got so far, and point out my concern at the end.  Our problem is to use residue calculus to compute: $$\int\limits_{-\infty}^{\infty}\frac{\cos(2x)-1}{x^2}dx.$$  We note that this is equal to the real part of the easier-to-work-with integral: $$\int\limits_{-\infty}^{\infty}\frac{e^{2ix}-1}{x^2}dx,$$ and we use a "hippo's back" contour, formed by the positively-oriented half-circle $|z|\leq R$ in the upper half-plane and the line along the real axis from $-R$ to $R$, interrupted from $-\varepsilon$ to $\varepsilon$ by the negatively oriented half-circle in the upper half-plane of radius $\varepsilon$, so as to 'jump' over the simple pole at $z=0$.  Since this contour contains no poles or singularities, etc., the integral of our integrand around it is zero by Cauchy's Theorem. It is also a simple matter to show that the large half-circle's contribution is zero in the limit $R\to\infty$. So now we are left with the fact that in the limit $\varepsilon\to 0$, we obtain:  $$\int\limits_{-\infty}^{\infty}\frac{e^{2ix}-1}{x^2}dx=\lim\limits_{\varepsilon\to 0}\int\limits_{C_\varepsilon}\frac{e^{2iz}-1}{z^2}dz,$$  where $C_\varepsilon$ is the little negatively-oriented half-circle mentioned above.  Now, I know the trick in which the value of the right-hand side happens to give exactly $\pi i \text{Res}(f,0)$ (that is, half of what the full circle would give), and can use it to show that the result is $-2\pi$.  Okay, thanks for reading this far. Here is my actual question: Without resorting to tricks like the half-residue thing, how can we get this result from the right-hand side? That is, how do we prove rigorously that:  $$\lim\limits_{\varepsilon\to 0}\int\limits_{C_\varepsilon}\frac{e^{2iz}-1}{z^2}dz=-2\pi$$  I have been using the parametrization $z=\varepsilon e^{-it}$ with $t\in[0,\pi]$, where the negative in the exponential deals with the negative orientation, which almost always works in these situations, but not here, since the $\varepsilon$ does not entirely cancel from the denominator then as it usually does in these types of problems.  I have confirmed the result with Wolfram-Alpha using the original problem statement, and also noted a few other things, like that the original integrand can be expressed as $\frac{\sin^2(x)}{x^2}$, but gotten nowhere with that.  In a pinch, I'll use the 'half-residue' trick, but being able to do this simply from basic principles would be nice.


Rope with no slack tied around the world

Imagine a "rope" (for want of a better word) is wrapped all the way around the Earth, to the point that you can hold both ends.  There is no slack on the rope, i.e. it doesn't stretch. It also isn't caught on anything on the Earth's surface and no friction applies to it, if that matters.  If I pull one end in one hand, would the other end move instantaneously? I don't see why it wouldn't but it's hard to imagine it moving straight away when it's wrapped around such a distance.  I'm no physicist so I might not be accounting for something obvious, or it is just that simple. Because of this I also wasn't sure how to tag this. Thanks.


You need at least 8.6 GB to install Ubuntu. This computer has 8.0 GB. (Lenovo Yoga 730-15 Dual-Boot Error)

I'm trying to install Ubuntu 18.04 in dual-boot on my Lenovo Yoga 730-15 (8 GB RAM, 212 GB storage, i5 processor) with Windows installed. During the installation, I get this error message:  You Need At Least 8.6 GB disk space to install Ubuntu, This computer has only 8.0 GB.   I did the following steps:   Downloaded Ubuntu 18.04 from the . Created a bootable 8 GB pen-drive using Rufus for my system's UEFI BIOS Mode.  Created a 40 GB partition on my C:\ drive.   Boot Steps:   Pressed F12, which took me to the OS selection menu. Selected Install Ubuntu, which took me to the Ubuntu installation screen. Selected keyboard language. After selecting the language, the above problem occured.   What should I do?


How would Conjured Animals work as mounts in combat?

A previous question "" suggests that a Druid could use a summoned animal as a mount.  However, how might this work in combat?  Would the conjured animal act and be controlled like any other mount?    Furthermore, could a conjured animal act as a mount for another party member?  Per the spell (emphasis mine):     The summoned creatures are friendly to you and your companions. Roll   initiative for the summoned creatures as a group, which has its own   turns. They obey any verbal commands that you issue to them (no action   required by you). If you don't issue any commands to them, they defend   themselves from hostile creatures, but otherwise take no actions.   Could the summoned animal be controlled as a mount by the other party member?  What if the druid commanded the conjured animal to obey the commands of the other party member, or ask as a mount?  Do summoned fey spirits act like the animals form they take?


How can i access remote desktop Xubuntu from Ubuntu14

i have server that works on xubuntu. How can i access it from my laptop that runs Ubuntu?


I got an assignment to prove that in a straight homogeneous rod, you can always choose a coordinate system in such a way that  $$\int_S x_1 \, dx_1 \, dx_2=0 $$  $$\int_S x_2 \, dx_1 \, dx_2=0 $$  $$\int_S x_1x_2 \, dx_1 \, dx_2=0$$  where $S$ is the cross section of the rod  Now, intuitively, I can understand that the first two expressions basically state that if you find the mass center of the rod, then all you have to do is to put the origin of the coordinate system in the mass center, and the integrals turn out to be zero. What I'm curious about is whether or not this is a good enough of an explanation, and also, a hint on how to obtain the third equality.


Why is Kinetic Energy = (-) Total Energy and Potential Energy = 2 $\times$ Total Energy?

I came across this relation while reading on the Bohr atomic model. Are there any other forces for which these relations hold good?


I have recently installed a custom ROM and cannot find the Play Store. It seems like all apps that belong to Google are missing.  How can I install the Google Apps Package (Play Store, ...) on my Android device?


The line produced by \not looks bad on wider symbols

When using \not together with wider symbols such as \Leftrightarrow the diagonal line produced by \not is placed too far to the left. How can the line be properly aligned? For example the following code \documentclass{article}  \begin{document}  \(\not\subset\)% Looks good  \(\not\approx\)% Looks good  \(\not\leftrightarrow\)% \not line is too far to the left  \(\not\Leftrightarrow\)% \not line is too far to the left  \end{document}  produces the following output where the last two symbols has got a misaligned diagonal line  Also, maybe the lines may need other changes than alignment to look good.


I've been using Drupal for several years, but only just dipping a toe in with Drush - I've bought an ebook tutorial and working my way through. I've installed Composer, and used it to install Drush. The tutorial book specified a particular build of Drush to install (7.0.0-alpha5). I've navigated to a drupal folder and run   drush st    to get installation info which works fine. The tutorial explains that you don't have to navigate into the drupal folder to do this, instead using  drush --root=PATH-TO-DRUPAL-SITE st   however this brings an error:   Fatal error: Call to undefined function conf_path()   Googling this error suggests this a problem with the version of Drush and to upgrade.  SO I've navigated into the .composer/vendor/drush/drush folder and run      composer global update but composer says nothing to update, confirming the version as 7.0.0-alpha5 - I assume this is not the latest 7.x version, so do I need something changing in the composer.json file?


Maximum likelihood function for mixed type distribution

In general we maximize a function   $$ L(\theta; x_1, \ldots, x_n) =  \prod_{i=1}^n f(x_i \mid \theta) $$  where $f$ is probability density function if the underlying distribution is continuous, and a probability mass function (with summation instead of product) if the distribution is discrete.  How do we specify the likelihood function if the underlying distribution is a mixture between a continuous and a discrete distribution, with the weights on each depending on $\theta$ ?


Using variable in a LIMIT clause in MySQL

I am writing a stored procedure where I have an input parameter called my_size that is an INTEGER. I want to be able to use it in a LIMIT clause in a SELECT statement. Apparently this is not supported, is there a way to work around this?  # I want something like: SELECT * FROM some_table LIMIT my_size;  # Instead of hardcoding a permanent limit: SELECT * FROM some_table LIMIT 100;


I am trying to install ubuntu on my pc but i can't.I can't find what problems are. Booting from dvd and getting to the purple screen and after that installing ubuntu,but it goes to black screen with a cursor blinking and nothing happens. My PC Spec: Mainboard:Foxconn H61AP-S cpu:Intel Celeron G460 ram:Kingmax 4 GBs DDR3 VGA:Nvidia Geforce 210 HDD:1TB Toshiba i have winodws 7 64bit installed on my pc.by the way, i tried many ways.nomodeset, noalpic, acpi=off and others.and also tried installing from USB, But outcome was the same.


I am posting UTF-8 (Hindi) data via $.POST and getting this ( à¤®à¤¨à¤®à¥‹à¤¹à¤¨ à¤¸à¤¿à¤‚à¤¹ ) in my mysql db

I am posting UTF-8 (Hindi) data via $.POST. I am getting this: à¤®à¤¨à¤®à¥‹à¤¹à¤¨ à¤¸à¤¿à¤‚à¤¹ in my MySQL database.  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">   is added in pages.  $.post("submit_answer_submit.php", {     qid: qidx,       answer: answerx }, function(data, status){   How do I add "Content-Type:"?


How can I detect browser tab refresh or close using javascript

I have one problem, I have a javascript function which I want to use when the browser is closed, How can I detect that a browser is being closed?    I have made some research on that I got solution like onunload or beforeunload but both the functions are being executed when I am reloading the page, Is there any solution that I can differentiate reload and browser/tab close.


$f$ is continuous, if $f_n$ continuous and $f_n\to f$ uniformly

Let $(X,d_X)$ and $(Y,d_Y)$ be metric spaces. $f_n: X\to Y$ with $n\in\mathbb{N}$ and $f:X\to Y$ functions. $f_n$ is continuous for every $n$ and $f_n\stackrel{n\to\infty}{\longrightarrow} f$ uniformly.       Then $f$ is continuous.   Here is my proof:  Let $x\in X$ and $\epsilon >0$ be arbitrary.  Since $f_n\to f$ uniformly it exists $N\in\mathbb{N}$ such that $d_Y(f_N(x), f(x))<\epsilon/3$ for every $x\in X$.  As $f_N$ is continuous we have for $x_0\in X$ and $\delta > 0$, that $d_Y(f_N(x),f_N(x_0))<\epsilon/3$ if $d_X(x,x_0)<\delta$.  This gives us:  $$\begin{align}d_Y(f(x),f(x_0)&\leq d_Y(f(x), f_N(x))+d_Y(f_N(x), f(x_0))\\ &\leq d_Y(f(x), f_N(x))+d_Y(f_N(x), f_N(x_0))+d_Y(f_N(x_0), f(x_0))\\ &< \epsilon/3+\epsilon/3+\epsilon/3=\epsilon\end{align}$$  Thanks in advance for your correction.


Browse to updaload image from modal dialog

I know modal over a modal  is not good UX. But I have a modal window and I am going to place a file upload(browse) component to upload a image for user. I am not really sure, will that break any UX by opening up the second dialog (window) to browse a file? Any suggestions, should I do or do not? Appreciate your comments. NOTE: This is not the modal over another modal, it is modal over a system file upload popup.


How insert Event in calnder without using intent in Android?

Here is code:     i am trying to add event to calender without using intent..here i put code.but getting some error.help me out.and got null pointer exception as given below.what to do now?   btn_create_without_intent.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {             // Construct event details             long startMillis = 0;             long endMillis = 0;             Calendar beginTime = Calendar.getInstance();             beginTime.set(2015, 9, 21, 7, 30);             startMillis = beginTime.getTimeInMillis();             Calendar endTime = Calendar.getInstance();             endTime.set(2015, 9, 21, 8, 45);             endMillis = endTime.getTimeInMillis();              // Insert Event             ContentResolver cr = getContentResolver();             ContentValues values = new ContentValues();             TimeZone timeZone = TimeZone.getDefault();             values.put(CalendarContract.Events.DTSTART, startMillis);             values.put(CalendarContract.Events.DTEND, endMillis);             values.put(CalendarContract.Events.EVENT_TIMEZONE, timeZone.getID());             values.put(CalendarContract.Events.TITLE, "Android Example");             values.put(CalendarContract.Events.DESCRIPTION, "Android Example");             values.put(CalendarContract.Events.CALENDAR_ID, 3);             Uri uri = cr.insert(CalendarContract.Events.CONTENT_URI, values);              // Retrieve ID for new event             String eventID = uri.getLastPathSegment();         }     });   And getting this error:  E/DatabaseUtils﹕ Writing exception to parcel java.lang.NullPointerException         at com.android.providers.calendar.CalendarProvider2.insertInTransaction(CalendarProvider2.java:2523)         at com.android.providers.calendar.SQLiteContentProvider.insert(SQLiteContentProvider.java:96)         at android.content.ContentProvider$Transport.insert(ContentProvider.java:192)         at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:152)         at android.os.Binder.execTransact(Binder.java:338)         at dalvik.system.NativeStart.run(Native Method) java.lang.NullPointerException         at android.os.Parcel.readException(Parcel.java:1333)         at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:182)         at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:136)         at android.content.ContentProviderProxy.insert(ContentProviderNative.java:415)         at android.content.ContentResolver.insert(ContentResolver.java:730)         at mockapp.techforce.com.calendereventexample.MainActivity$1.onClick(MainActivity.java:52)         at android.view.View.performClick(View.java:3571)         at android.view.View$PerformClick.run(View.java:14247)         at android.os.Handler.handleCallback(Handler.java:605)         at android.os.Handler.dispatchMessage(Handler.java:92)         at android.os.Looper.loop(Looper.java:137)         at android.app.ActivityThread.main(ActivityThread.java:4517)         at java.lang.reflect.Method.invokeNative(Native Method)         at java.lang.reflect.Method.invoke(Method.java:511)         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:993)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)         at dalvik.system.NativeStart.main(Native Method)


Launcher, menubar and window borders disappeared in Ubuntu 16.04

After upgrading to 16.04 from 15.10 it was running smoothly for about one week, then it started getting random crashes and freezes and now all the windows borders disappeared. I would include a screenshot but the keyboard shortcut for screenshots doesn't work.  Launcher is missing, and the global menu/ top bar is also missing. Right now my firefox window is maximized to the top and fills the screen like if I had pressed F11 to run it fullscreen. None of the keyboard shortcuts work.  Can't open a terminal using Ctrl + Alt + T. I finally managed to get a terminal open and ran unity --debug and this is the result. [opened the terminal using ctrl+space to open synapse, apparently that works and also copying in terminal and pasting firefox also works]  unity --debug unity-panel-service stop/waiting unity7 stop/waiting unity-panel-service start/running, process 2515 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". /usr/bin/compiz (core) - Info: Loading plugin: core /usr/bin/compiz (core) - Info: Starting plugin: core [New Thread 0x7ffff3638700 (LWP 2588)] /usr/bin/compiz (core) - Info: Loading plugin: ccp /usr/bin/compiz (core) - Info: Starting plugin: ccp [New Thread 0x7fffeb20e700 (LWP 2590)] compizconfig - Info: Backend     : gsettings compizconfig - Info: Integration : true compizconfig - Info: Profile     : unity [New Thread 0x7fffeaa0d700 (LWP 2591)] /usr/bin/compiz (core) - Info: Loading plugin: composite /usr/bin/compiz (core) - Info: Starting plugin: composite /usr/bin/compiz (core) - Info: Loading plugin: regex /usr/bin/compiz (core) - Info: Starting plugin: regex /usr/bin/compiz (core) - Info: Loading plugin: commands /usr/bin/compiz (core) - Info: Starting plugin: commands /usr/bin/compiz (core) - Info: Loading plugin: resize /usr/bin/compiz (core) - Info: Starting plugin: resize /usr/bin/compiz (core) - Info: Loading plugin: place /usr/bin/compiz (core) - Info: Starting plugin: place /usr/bin/compiz (core) - Info: Loading plugin: move /usr/bin/compiz (core) - Info: Starting plugin: move /usr/bin/compiz (core) - Info: Loading plugin: snap /usr/bin/compiz (core) - Info: Starting plugin: snap /usr/bin/compiz (core) - Info: Loading plugin: session /usr/bin/compiz (core) - Info: Starting plugin: session /usr/bin/compiz (core) - Info: Loading plugin: imgpng /usr/bin/compiz (core) - Info: Starting plugin: imgpng /usr/bin/compiz (core) - Info: Loading plugin: compiztoolbox /usr/bin/compiz (core) - Info: Starting plugin: compiztoolbox /usr/bin/compiz (core) - Error: Plugin 'opengl' not loaded.  /usr/bin/compiz (core) - Info: Loading plugin: mousepoll /usr/bin/compiz (core) - Info: Starting plugin: mousepoll /usr/bin/compiz (core) - Info: Loading plugin: vpswitch /usr/bin/compiz (core) - Info: Starting plugin: vpswitch /usr/bin/compiz (core) - Info: Loading plugin: workarounds /usr/bin/compiz (core) - Info: Starting plugin: workarounds /usr/bin/compiz (core) - Error: Plugin 'opengl' not loaded.   There is one error of opengl plugin not loading. Is that the problem?


I am wondering if there exists any formula for the following power series :  $$S = r + r^2 + r^4 + r^8 + r^{16} + r^{32} + ...... + r^{2^k}$$  Is there any way to calculate the sum of above series (if $k$ is given) ?