How do I get a number with two digits after the decimal using double type numbers in C#?

I'm coding a simple calculator, and it needs to be displaying 2 digits after the decimal, but I can't figure it out. The rest of the program works perfectly, and so does the quotient button, but it's just displaying too many digits after the decimal.  Here's what I have:  private double _leftop = 0; private double _rightop = 0; private double _quotient = 0;      private void BtnQuotient_Click(object sender, EventArgs e)     {         if (Double.TryParse(TxtLeftOperand.Text, out _leftop) == true &&     Double.TryParse(TxtRightOperand.Text, out _rightop) == true)         {             _quotient = _leftop / _rightop;             TxtResult.Text = Convert.ToString(_quotient);         }         else         {             TxtResult.Text = "Error";         }     }


Lost SF Story: S20 Spacecraft kidnaps people from Earth, Mars rebellion

The protagonist, a Human, flew an 'S20' Spacecraft. The area of the solar system covered was the asteroid belt to Earth, i.e. the Inner Solar System. After sleeping on this I have dredged up the following. The S20 came from Mars to Earth to kidnap people. I think the Mars colony was splitting/rebelling from earth. Mars had a secret HQ embedded in an Asteroid. I may have read this in the 1980's. The S20 may have been para-military and the pilot was male.


Onto mappings from S to the set of all subsets of S

QUESTION. If $S$ is any set, prove that it is impossible to find a mapping of $S$ onto $S^{\ast}$. ( $S^{\ast}$ is the set of all subsets of $S$).  MY PROOF:  I ask my proof is right or wrong.....  If $S$ has $n$ element then $S^{\ast}$ has $ 2^n$ elements. it means  $S^{\ast}$ have greater number of elements than $S$ so every member of  $S^{\ast}$ cannot be associated with an member of $S$ , because of pigeon hole principle which says, If $n > m$ pigeons are put into $m$ pigeonholes, there's a hole with more than one pigeon. and if a member of $S$ associate more than one member of $S^{\ast}$ function not defined so for function to be defined some member of $S^{\ast}$ should not be associated with any member of $S$ so function is not onto.


I am asked to solve the following question using central limit theorem. In an election between two candidates, A and B, one million individuals cast theirvote. Among these, 2000 know candidate A from her election campaign and vote unanimously for her.The remaining 998000 voters are undecided and make their decision independently of each other byflipping a fair coin.Approximate the probability pA that candidate A wins up to 3 significant figures.  It's easy to solve directly. PA = $\frac{0.5(10000-2000)+2000}{10000}$ = 0.501. However, I am quite confused about how to solve this problem by central limit theorem.


Calculate the multiplicative inverse modulo a composite number

I want to calculate   $ 8^{-1} \bmod 77 $   I can deduce  $ 8^{-1} \bmod 77$ to $  8^{59} \bmod 77 $ using Euler's Theorem.  But how to move further now. Should i calculate $ 8^{59} $  and then divide it by $ 77 $ or is there any other theorem i can use ?


I would like to handle a change event on elements dynamically created, and selected with each():  $("input[type=date]").each(function() {     $("#myForm").on("change", this, function() {         $(this).css({ color: "#B73132" });     }); });   on() doesn't seem to work.  I tried:  $this= $(this); // and    $this= this;with $("#form_cahier").on("change", $this, function() {   Nothing works, any idea ?


When using the hyperref package, is it possible to tell LaTeX not to create a link for some references?  In my case the page number is displayed in the footer in  \fancyhf[FC]{\thepage\ of \pageref{pg:end}}   which is what I want. Unfortunately every single page in the document then has a link to the final page, which is a bit silly.  Any ideas on how to fix that?


Every once in a while, we get a question asking for a book or other educational reference on a particular topic at a particular level. This is a meta-question that collects all those links together. If you're looking for book recommendations, this is probably the place to start.  All the questions linked below, as well as others which deal with more specialized books, can be found under the tag  (formerly ).  If you have a question to add, please edit it in. However, make sure of a few things first:   The question should be tagged  It should be of the form "What are good books to learn/study [subject] at [level]?" It shouldn't duplicate a topic and level that's already on the list   Related Meta:


I would like to know how much power I need for magnetic levitation.  $$P = Fv.$$  $F = F_g \approx \text{mass} \times 10$, okay. But $v = 0$! I can't believe I need no power to keep an object in the air. How does one explain this?


Difference between Varchar(max) and nvarchar(max)

I came across a question while buidling schema for my application.  When to use varchar(max) and nvarchar(max). I mean the exact use cases where it should be applied. I have surfed in net too but I was able to get the exact answer.  Could anyone suggest some exact usecase.


Is there a way of disabled byte-range requests in Apache?

I have a web page with a link to a PDF file (target="_blank").  If I click the link, the PDF reader just shows a grey screen within the Firefox browser.  If I copy that link and manually open it in a new tab, the PDF will display correctly, and subsequent requests made by clicking the original link now work, suggesting that the problem occurs when loading the file into the cache.  It appears as though the Adobe PDF reader plugin is making byte-range requests (I see lots of 206 responses) and I suspect that this may be the cause of the issue.  I am running an Apache webserver.  Has anyone had problems with Apache and Adobe's byte-range requests?  Are there any workarounds?  Perhaps a way of configuring Apache to ignore byte-range requests on PDFs?


I want to connect Ubuntu LTS via windows7 RDP. Is there any other settings these settings are not working.


$\left[\frac n1\right]+ \left[\frac n2\right] + \cdots+\left[\frac nn\right]+\left[\sqrt n\right]$ is even

Let $n$ be any natural number. Prove that $\left[\dfrac n1\right]+ \left[\dfrac n2\right] + \left[\dfrac n3\right]+\cdots+\left[\dfrac nn\right]+\left[\sqrt n\right]$ is even.    I tried this by taking two different cases, when, $n$ is even and when $n$ is odd. But I could not establish any relation between the two. Please help to solve this problem and thanks a lot in advance.  P.S. Although nothing is mentioned in the question I think $[\ ]$ stands for greatest integer function as otherwise the sum would be in a fraction which is not even as only natural numbers are regarded as even.


How to handle user input error handling on signup form

I'm designing a signup form and got stuck in a ux discussion on how to handle user input error handling. Which would you prefer of the following two scenarios? Or is there a third, better option?  Method 1: The submit button is always enabled. When clicking the submit button the form is either posted (if all fields are correct) or the wrong fields are marked for the user to correct.   Method 2: The submit button is disabled from start. When the user interacts with one of the form fields the rest of the fields are marked (with an error or are just highlighted) in order to emphasize that those fields also have to be filled out. When all fields are filled out correctly the submit button is enabled.


I have Xubuntu 64 bit 14.04, latest version of spotify and it seems to be working fine, but I see this error.    I tried  sudo apt-get update sudo apt-get upgrade sudo apt-get clean sudo apt-get autoclean sudo apt-get autoremove sudo dpkg --configure -a sudo apt-get install -f   But that do no fix it, I keep seeing  Reading package lists... Error! E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/repository.spotify.com_dists_stable_non-free_i18n_Translation-en%5fUS E: The package lists or status file could not be parsed or opened.


Finding the subsets of people sitting around a circular tables

Hello community! The problem you see above is a combinatorial problem that I could not solve. :c  This problem seemed easy to me at first like there are people $1,2,3, \ldots, n$ sitting on a circular table and I thought that it was easy using casework and stuff. However, when I really started doing this problem, this problem seemed harder than I thought. I thought about complementary counting but that clearly won't help. From the example given above, I tried first adding singleton sets: $n$. But how do I find out the number of sets with two elements and so on? Recursion?? I really don't know.  Any help would be much appreciated. Thanks.


Finitely generated ideal in boolean ring

A boolean ring is a commutative ring where $x^{2} = x$ for every $x$.  Why in such a ring a finitely generated ideal is principal ?


If $A$ an integral domain contains a field $K$ and $A$ over $K$ is a finite-dimensional vector space, then $A$ is a field.

Possible Duplicate:          I need to prove this result, but the only starting point I think of is to argue by contradiction, by assuming $x$ is non-invertible and extending it to a basis over $K$ but have no idea how to go further than that. Any ideas?


Accessing source code of built-in tools of ArcGIS for Desktop?

I want to see source code of built-in tool (just now "Intersect", later maybe another).   Is there any built-in function for its reading?


What does the phrase "happen to be" mean?

I saw  while in 1:19 Sec I have heard so:     "I happen to be pro-life"   What does it mean? I have tried to find it on some dictionaries (Cambridge, Oxford and Merriam Webster) and I didn't find the meaning.


Why is the Wheatstone bridge configuration almost always used for sensors over a simple voltage divider?

Everywhere it seems to be taken for granted that a Wheatstone bridge is more precise, accurate etc. I don't see why it would be any better than a voltage divider if I am directly measuring the voltage across the resistor in both cases. Especially these days when we can simply use an instrumentation amplifier for measuring the differential voltage which will provide minimal loading, will a bridge configuration provide any specific advantage over a simple voltage divider?


Is there a way to download something over network when it's downloaded by another PC in the network?

We have 4 PCs connected to each other. We all download our apps through Internet which uses our Internet bandwidth. Is there a way to share downloaded softwares through network to prevent others from downloading the same thing through Internet.


Self-deletion and un-deletion without any changes should reinstate the original close/delete votes

Currently, when a user self-deletes a post and subsequently undeletes it, any votes to delete or votes to close magically disappear as if they never happened. While that might make some sense if a user deleted a post to then significantly update it, it seems to make no sense in the case where nothing changed.  I would propose that if nothing happened between the delete and undelete events, the original votes on the post are reinstated.


Extracting Voice Memos from iPhone to iTunes

I am currently doing some coursework for my exams, and part of my IT project is to record some audio, and assess it. I recorded this audio on my iPhone, and I plan on using Audacity to edit it. I am having a problem with getting the voice memos off my iPhone, and that's preventing me from doing my coursework. Does anyone know what to do? I use iTunes 11.1.3


Pressing P leaves Blender frozen, how to get undo?

I was rigging a foot to a skeleton when I meant to click CtrlP, I pressed P. Nothing happened so I then clicked CtrlP and my entire skeleton and avatar turned white. My mouse does not show up inside the Blender screen and I don't want to close it and start over. I did save but I'll still lose quite a bit of work.  Is there a button I have pushed that can be undone via the keyboard?


British English for possessive 's when a names ends with "s"

My son has a teacher that he wishes to give a gift to, Mrs. Coomes.  What is the correct way to use what would normally be 's when the name ends with es? Another answer states adding es on the end however "Mrs. Coomeses buscuit tin" "feels" wrong.


I recently saw the sculpt January and decided to try out sculpting in blender, which I usually use for hard surface modelling with subsurfs. I saw people using Dyntopo, so i enabled it but whenever I get to a level of detail like 100000 polys the viewport lags hard. My cursor still moves, but the red circle freezes as it tries to follow it, making a slideshow, and so it draws just straight lines. Another way I can get this issue is with using a resolution of 50 constant detail with dyntopo on the basic 2x2x2 cube. It lags whenever I try to draw on it.  I'm on blender 2.79 with no addons installed. My P specs are b85-g41 PC Mate Mobo Intel i5 4460 3,2 Ghz CPU Nvidia Geforce GTX 970 3GB With 16 Gb of corsair RAM.  I have a WACOM bamboo tablet drivers, but am just testing with the mouse. I did use the tablet but it had the same problem.  I've reinstalled blender, tried older versions and tried it in steam. All to no avail. Any ideas?


How to turn a local network of Ubuntu computers into effectively one computer controlled by a single 'master´ computer on the same network? I think the question is clear. To clarify, I would like to be able to have computers on my LAN contribute to computing tasks run from my 'main' machine. For example, if I am video editing on the 'main' machine, the OS should send other jobs to the LAN computers to execute, and all this automatically, as if it were one machine.


Does every world in Minecraft have all biomes at some distance from spawn?

(P.S. I already know there is a relatively similar question  but it didn't gave me the info I needed, apart of it being 2 years old, when MC was still beta... It could be obsolete by now...)  I know that some seeds have very few biomes that actually have resources in them. Take, for example, GLORIOUS, with its infinite ocean (1.5.2, haven't checked for my new 1.6.2). Or how about This Seed sucks with its infinite jungle? (But that one doesn't work in the later version.)  I already know that you will always find 3 dungeons at max 1 km from your spawnpoint, but I only find villages occasionally and if I do it may take MC weeks. And how about GLORIOUS? Will I have to travel FOREVER to find a desert or a underwater village? Or maybe I need eons of luck to find a rare mushroom island in any random seed?


Why does apt-get install a newer dependency than supported by the specified package

I have encountered a problem where a package, at a specific version, requires another package, also at a specific version, but Apt-Get selects a newer version of the dependency and then fails.  I have experienced this with Puppet Lab's MCollective and the Nginx Mainline PPAs and likely other packages so my question is about the general approach to Apt-Get dependency resolution but I will use Nginx as my example.  I have a package mirror (built with Aptly) containing the v1.7.5 of the nginx-full package and all its dependencies and also the newer v1.7.6 package and all its dependencies.  If I execute apt-get install nginx-full=1.7.5-1+trusty1 then the install fails with the message:  The following packages have unmet dependencies:  nginx-full : Depends: nginx-common (= 1.7.5-1+trusty1) but 1.7.6-1+trusty1 is to be installed   However, if I execute apt-get install nginx-full=1.7.5-1+trusty1 nginx-common=1.7.5-1+trusty1 then installation succeeds.  When I have both versions 1.7.5 and 1.7.6 of the nginx-common package on the mirror and the nginx-full package explicitly states it requires 1.7.5 of nginx-common, and nginx-full is the package I've requested, why does apt-get still select the incompatible 1.7.6 version of nginx-common?  Here is the output of dpkg -s nginx-full after installing 1.7.5 showing the exact version dependency constraint:  Version: 1.7.5-1+trusty1 Depends: nginx-common (= 1.7.5-1+trusty1), libc6 (>= 2.14), ...   In this instance, the chain of exact versions required is short so the workaround is easy but there are at least two problems for me:   Other packages have much longer chains of dependencies that are tedious to discover and then append to the apt-get command line. Until a newer version of a dependency is published to a package mirror it is easy to be unaware of the impending issue.   What I can't comprehend is why the dependency resolution is apparently ignoring the exact version constraint on the specified package. More importantly I'd like to know how I can ask Apt-Get to honour the constraints without having to manually replicate the package metadata onto my apt-get parameters.


New user, new install, Wifi doesn't work

Brand new to Ubuntu/Linux. Trying to get HP Mini netbook working better. It was unusable with Windows 7 (too slow).  So far it flies with Ubuntu, but no WiFi. I can see all the WiFi connections from my home, the neighbors, etc. I believe it connected briefly during installation, but I can't get it to connect now.   This is a clean install. The WiFi for all other home devices is working fine. Network specs are below. One of the moderators said it should work. The wired interface is working great, BTW.  Thank you in advance for your help  Machine is HP Mini 110. Ubuntu version is 13.04. Would I have better luck with 12.04?  01:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E    PCI Express Fast Ethernet controller [10ec:8136] (rev 04) Subsystem: Hewlett-Packard Company Device [103c:148a] Kernel driver in use: r8169  02:00.0 Network controller [0280]: Broadcom Corporation BCM4313 802.11b/g/n Wireless    LAN Controller [14e4:4727] (rev 01) Subsystem: Hewlett-Packard Company Device [103c:145c] Kernel driver in use: wl


$p$ prime, Group of order $p^n$ is cyclic iff it is an abelian group having a unique subgroup of order $p$

I've just read from An introduction to the theory of groups from Rotman's the following theorem:     Theorem 2.19. Let $p$ be a prime. A group $G$ of order $p^n$ is cyclic   if and only if it is an abelian group having a unique subgroup of order $p$.      Proof Necessity follows at once from Lemma 2.15. For the converse, let    $a \in G$ have largest order, say $p^k$ (it follows that $g^{p^k} = 1$ for   all $g \in G$). Of course, the unique subgroup $H$ of order $p$ is a subgroup   of $\langle a\rangle$. If $\langle a\rangle$ is a proper subgroup of $G$,   then there is $x \in G$ with $x \not \in \langle a\rangle$ but with   $x^p \in \langle a\rangle$; let $x^p = a^l$. If $k = 1$, then $x^p = 1$ and   $x \in H \subset \langle a\rangle$, a contradiction; we may, therefore,   assume that $k>1$. Now $$1 = x^{p^k}=(x^p)^{p^{k-1}}=a^{lp^{k-1}},$$   so that $l = pm$ for some integer $m$, by Exercise 2.13. Hence,   $x^p = a^{mp}$, and so $1 = x^{-p}a^{mp}$. Since $G$ is abelian,   $x^{-p}a^{mp} = (x^{-1}a^m)^p$, and so   $x^{-1}a^m \in H \subset \langle a\rangle$.   This gives $x \in \langle a\rangle$, a contradiction. Therefore,   $G = \langle a\rangle$ and hence is cyclic.   As usual, there is some trivial part of the proof which I don't understand: I don't see why "If $\langle a\rangle$ is a proper subgroup of $G$, then there is $x \in G$ with $x \not \in \langle a\rangle$ but with $x^p \in \langle a\rangle$", I understand the rest of the proof. I would appreciate if someone could explain to me that statement.


Sum of radii of intersecting circles internally tangent to another circle

Let $T$ be a circle with centre at $O$ and radius $R$. Two other circles $T_1$ and $T_2$ with centres at $O_1$ and $O_2$, respectively, are tangent internally to $T$. $T_1$ and $T_2$ intersect one another at the points $A$ and $B$. Find the sum of the radii of $T_1$ and $T_2$, $R_1 + R_2$, if $\angle OAB = \pi/2$. The answer should be expressed in terms of $R$ and the coordinates of the points $O_1$ and $O_2$ (relative to $O$).  (This was a question posted by someone who subsequently deleted his/her account. The question originally generated a lot of comments - and was eventually put on hold - because the OP hadn't made it clear enough. Some of us thought the question is sufficiently interesting to be re-opened so I've cleaned it up and re-posted it anew. The original question is found  but may have been deleted by the time you read this)


When interacting with different elements and applying multiple actions it  may be quite convenient in some situations if we could do:  WebElement myInput = driver.findElement(By.id("my-input-id")); myInput.clear().sendKeys("test");   Instead of:  WebElement myInput = driver.findElement(By.id("my-input-id")); myInput.clear() myInput.sendKeys("test");   But, the problem is , sendKeys() and other "action" methods cannot be chained as is - they return void and not the current WebElement.  What would be the easiest way to achieve chaining multiple actions?


I tried to change the HTML form, input type file. Here is my code:  HTML, form id = form  <input class="upload_file" type="file" id="file" name="file" />   .CSS  I tried both: .upload_button{   background: url('../images/upload_btn_bg.png') no-repeat;   width: 200px;    height: 40px; }  #form input[type=file]{   background: url('../images/upload_btn_bg.png') no-repeat;   width: 200px;    height: 40px; }   None of both of those methods works. I did see from some website, like facebook, youtube, google or twitter, they have different style. Wonder how they do it.


How to search all Stack Exchange sites for a specific tag

(I'm assuming that some tags exist on more than one site.)  e.g. I tried doing search across all sites (i.e. here on META), for the tag iOS, by using syntax of [iOS], but the results seem to indicate that it's just finding string matches, rather than restricting the search to just tags.  If this is even possible, what should such a search's syntax look like?


Stack Exchange appears to be less suitable for inexperienced coders than it used to be before

In the past, the programming sites of Stack Exchange (e.g. Stack Overflow) used to accept fairly straightforward questions about HTML, CSS, JS and alike, scripting in powershell or BASH or simple problems in C#.  However, these days such questions appear to be downvoted and closed.  What happened to those communities an why aren't they accepting simple questions anymore?


In the cases below, do I always have to use 'may' instead of 'can'? Both sound correct to me however, I had read explanations that said that 'may' should be used after 'so that'.  I came earlier so that I may help them. I came earlier so that I can help them.  Please be on time so that we may leave before 5. Please be on time so that we can leave before 5.  Thanks


Probability distribution of $\omega'(n)$.

$\omega(n)$ is the number of distinct prime factors of $n$ and $\omega'(n)$ is the number of distinct prime factors of $n$ with multiplicity. For example if $p,q$ are prime numbers then $\omega(p^2q)=2$ and $\omega'(p^2q)=3$.  What is the distribution of $\omega'(n)$ for $n$ between $2^m$ and $2^{m+1}$ where $m$ is a sufficiently large integer?  Do we have with probability at least $\frac12$ at least $\log\log n$ indistinct factors?


A "fast" way for  computing $ \prod \limits_{i=1}^{45}(1+\tan i^\circ) $?

Which  is the fastest paper-pencil approach to compute the product $$ \prod  \limits_{i=1}^{45}(1+\tan i^\circ) $$


Ubuntu 14.10 : Wifi does not work after suspend

I just installed Ubuntu 14.10 as a dual boot with Windows 7.  It seems to work fine, except when I suspend Ubuntu 14.10 and then resume, I cannot connect to WiFi networks (the computer cannot seem to detect any). When I restart the computer, it can connect again.  Is there any solution to this problem? I would like to use Ubuntu without having to completely shut down every time.  I've tried to look up solutions, the only one I found was to type this into terminal  sudo killall NetworkManager      But this does not do anything.  In case it helps, my WiFi PCI card is a tp-link TL-WN951N.


Where to ask question about software for recording the screen on Windows 10

I have no idea where to post such questions. Specifically on which site. My question: I want to record my screen including the sound from the laptop and the input from my microphone. What is good software for that on Windows 10?


Google chrome is reading characters backwards

Google Chrome is my favorite browser, and I can't imagine going on without it. Suddenly (without closing and re-opening) the browser; chrome has been reading characters upside down, very weird:    Chrome version:    I tried restarting my browser and my MAC (running OS X Yosemite 10.10), but the error keeps on coming.


Many people are evolving their pokemons based on the CP. However, there's a growing number of people evolving based on Moves instead of CP. In other words, choosing pokemons that have the highest Moves to keep, even if it isn't necessarily the highest CP. I am new to pokemon and don't quite understand the difference between the two. Thus, which strategy is better?


Why is Ubuntu 14.04 so slow on my laptop?

I just installed Ubuntu 14.04 on a Dell laptop with 1.7Ghz Pentium M and 1Gbyte memory.  Graphics are Intel® 852GM/855GM x86/MMX/SSE2, OS type is 32bit.  The whole system is VERY slow. When I launch the applications manager, for example, I need to wait in order to see the letters I typed appear!  It is as if the CPU was overloaded and no memory available, but I only have Firefox running.  How can I make the system run smoother? It used to have Windows XP installed and it worked fine.


Epsilon-Delta Proof of a Lebesgue Integral

Let f be a non-negative Lebesgue measurable function with $\int_\mu\ f \,d\lambda< \infty$. Show that for each $\epsilon>0$, there exists a $\delta>0$ such that $\lambda(E)<\delta$ implies $\int_E\ f \,d\lambda< \epsilon$.  --I think I need to use the simple function $\phi=f\chi_E$ such that $\phi<f$ but I do not see how to tie that into the standard epsilon-delta proof with a finite l Lebesgue integral.  --I also know that $\lambda(A_c)\leqslant(1/c)\int_E\ f \,d\lambda$ from the previous problem so I am assuming I will need to use that.


Papers published during undergraduate degree: can they form the basis to a PhD?

I'm presently finishing up my undergraduate degree in Mathematics, and have written a number of papers, three of which have been published in reputable combinatorial journals (think journals published by Elsevier and Springer). From these three, I am the sole author on two of them. Given that I have invested so much time and energy on 'extra curricular activities' (as my head of department calls them), can they serve as the basis to a PhD thesis? Which is to say, can a considerable part of a thesis consist of previous work which has not been used to obtain any other degree? This final remark is important, I feel. A fourth paper with my supervisor is in the works, but the material presented there will appear in my undergraduate dissertation. I am then of the opinion that this material should not be used toward another degree. If it helps, I attend a northern European university, and intend on doing a PhD in Europe/UK/USA. Edit: I would like to perhaps mention the motivation for asking this question. I have heard stories of people doing research in their private capacity, then doing a PhD in quite a short period of time (a year or so), since they had a lot of material already. I cannot imagine this being the case however. What are your thoughts on this?


How to download packages on Mac OS X to install to ubuntu 16.04?

I have ubuntu 16.04 LTS and a mac. I would like to know how could I do to downloads packages on my mac with internet to transfer it to my ubuntu without internet at work. I need packagees like eclipse and git to be able to install them with no internet on my ubuntu computer. I have tried lots of programs like sushi huh or keryx through wine but even by updating packages list I can't find what I want. Thanks for any help! This is not a duplicate post because the how to download packages for offline use thread has no answers for mac users!


Why is "f" in a singular replaced with "v" in its plural?

For example, "wife" is "wives" in plural, as is knife, strife, etc. What's the reason and/or etymology behind this?


I haven't seen any code like this before, what is it?

Can anyone tells me why this is allowed in c++, and what is it? const char* a = (10, "What");


Why $\mathbb{Q}$ is not a projective $\mathbb{Z}$-module?

From the fact that $\operatorname{Hom}_{\mathbb{Z}}(\mathbb{Q},\mathbb{Z})=0$, how do we conclude that $\mathbb{Q}$ is not a projective $\mathbb{Z}$-module?


Lower limit of $\sqrt[n]{1^n+2^n+...+n^n}$ with sandwich rule

I was asked to find (by the sandwich rule) the limit of: $$\lim_{n\rightarrow \infty}{\sqrt[n]{1^n+2^n+...+n^n}}$$  The upper limit is quite immidiate: $C_n = \sqrt[n]{n^n+n^n+...+n^n}$.  As for the lower part I'm facing quite an understanding conflict:  I'm looking for $A_n$ for which: $$\forall n\in \mathbb{N}: a_n \leq \sqrt[n]{1^n+2^n+...+n^n}$$ So I wanted to pick $\sqrt[n]{1^n+1^n+...+1^n}$  but I have a dillema: $$\lim_{n\rightarrow \infty}{\sqrt[n]{1^n+1^n+...+1^n}} = 1$$ OR $$\lim_{n\rightarrow \infty}{\sqrt[n]{1^n+1^n+...+1^n}} = \infty$$   Since $1$ to any power is $1$ we obviously get: $1^n=1$. Therefor we have $$\lim_{n\rightarrow \infty}{\sqrt[n]{1^n+1^n+...+1^n}} = \lim_{n\rightarrow \infty}{\sqrt[n]{n}} = 1$$ Since $n \rightarrow \infty$ we have infinite amounts of $1$'s. Therefore we virtually have $\infty$ under the $\sqrt[n]{}$ sign.   Ultimately I can't seem to determine what's the limit: $\lim_{n\rightarrow \infty}{\sqrt[n]{1^n+1^n+...+1^n}}$.  Is there a ground rule that helps me decide? I'm more prone to decide to go with what I know: $$\lim_{n\rightarrow \infty}{\sqrt[n]{n}} = 1$$ But since I have an inifinite number under the root, Im a bit skeptical. Plus, I already know the answer is $\infty$, but I insist on solving this conflict of mind.


I don't quite understand the Trace with regards to underage Wizards performing magic

Well, as the trace is present upon an underage Wizard before he comes of age, hence the Ministry being able to detect underage magic immediately whenever the underage Wizard does it, I still don't quite understand the following situations.  (Is it traceable by location or by person?)  When Dobby did the Hover Charm (Year 2), the Ministry couldn't differentiate whether it was indeed Dobby or Harry Potter who performed it. Suggesting the Ministry detect some kind of magic at a particular address they have on record as being resident to an underage wizard?  However, when Arthur Weasley visited Harry Potter at Privet Drive (Year 4), he did a lot of magic, including magically dodging the teacups Mr. Dursley was throwing as him, and as well as performing an anti-Engorgment charm to return Dudley's tongue to a normal size. So how come did the Ministry differentiate who actually performed magic?  Moreover, at The Burrow, what happens if an underage Harry or Ron performs magic? Can't simply the elders say they performed magic instead?  Update: After reading two answers below I'm still confused. If magic is location based, Tonks, Madeye and Dumbledore all do a lot of magic at Privet Drive and Harry is never caught. Additionally, can't Harry do magic at The Burrow and Mrs. Weasley simply say she did it instead. Whereas if Magic is person based, obviously it isn't because they could differentiate that Dobby performed the magic and not Harry.


Can the comment deletion modal popup be replaced, or at least tweaked?

Modal dialog popups have always been a great bugbear most everywhere, and it just got worse - or perhaps simply more noticeable. At least for Chrome v29.0.1547.57m, there are some changes that cause the following problems when deleting comments:   The popup is only centred horizontally, appearing centre-top of the view port; the popup is blocking between windows and tabs - sure this didn't happen before; the style adjustments actually make an obviously horrible thing one has to address into a very subtle thing one has to address - there is no ping!, no flashing, or jumping to the thing that needs attention etc.)     FireFox had altered the look of the popup a while back, though the effects are not as bad.  Hopefully these are all some manifestations of some terrible mistake that managed to get checked in and deployed and will be fixed, like, yesterday. In the meantime, and in case it is a design decision, can we either:   replace it with an "in-page markup popup", or try to tweak it so as to at least be centre of the viewport?


How do I include linked data to a Page in Page manager?

Given two pieces of data, for example two entities, two nodes; when viewing one of them, how do I pull in data for the other one into Page manager/Panels?


in widows I used to open any txt editor - set Numlock active and while holding Alt using the number pad type 0169 and get the ascii copyright © - How do I get direct ascii access in Linux / Ubuntu Studio Using Mousepad or any txt editor?


Prove that  $(x_1+\dots+x_n)^2 \leq n(x_1^2 + \dots+x_n^2)$  for all positive integers n and all real numbers $x_1,....,x_n$  I am attempting a proof by induction but wasn't sure if i need the Cauchy-Schwarz Inequality or perhaps another way other than induction to prove this.  Proof   $n=1$ true  assume true for $n=k$  Now for $n= k+1$  $(x_1 + \dots +x_k + x_{k+1})^2 \leq \dots$


Creating bathymetry surface from xyz in GRASS?

I am trying to create a 3D bathymetry surface from xyz data.   There is approximately 300,000 points with lat, long and z (depth data). The data is sonar point data similar to LiDAR data.  I want to use GRASS and I'm looking around for the right functions.  I can import the data to grass with v.in.ascii -z and I tried using v.extrude which killed my computer (must be the number of points).  I might be able to create contours in QGIS and use v.to.rast and r.surf.contour but I think I'll lose resolution if it works at all.  I'm not familiar with GRASS and I guess that, this is probably a relatively easy thing to do but I've hit a wall with it. I would imagine someone has encountered this before.


How can I prove this power set relation?

Please show me how can I prove this relation: $$P(A \cap B) = P(A) \cap P(B)$$ I have no idea how to prove these kind of relations that include power sets.


Given a Banach space: $E$ and chosen a Hamel basis: $\mathcal{B}$  Any vector induces a (noncanonical) algebraic linear functional by: $$\delta:E\to E^*:\delta_b(b'):=\delta_{b,b'}\text{ defined linearly and extended linearly}$$ How to show that the induced linear functionals are continuous iff the Banach spaces is finite dimensional?


How to solve $\binom{n+m}{k} = \sum_{i=0}^{k} \binom{m}{i} \binom{n}{k-i} $

How to prove  this?   $n$, $m$ and $k \in \mathbb{N_{0}} $  $$\binom{n+m}{k} = \sum_{i=0}^{k} \binom{m}{i} \binom{n}{k-i}$$


Can I use apt-get or aptitude to install software to non standard location?

When I install a software using apt-get it installs to default locations i.e to /usr/bin, /usr/lib, /usr/share and etc. For example when I install "Meld Diff Viewer" using  sudo apt-get install meld   and use whereis command to find its location, I get the following output  adnan@adnan-laptop:~$ whereis meld meld: /usr/bin/meld /usr/lib/meld /usr/share/meld /usr/share/man/man1/meld.1.gz   Is there any way to change the install location. Lets say if I want to install it in /usr/local/ can I do it using apt-get or aptitude? I know I can compile it from source and specify prefix option to configure script or make install but it would be better (and really easier) if I could do it using apt-get as I would be able to use uninstall, upgrade and other stuff that apt-get offers


I noted there are some similar questions for my problem on this list, but none of them solve my issue. So I post it here again: Hi, I try to compile LaTeX thesis use the following steps: $ git clone https://gitlab.kwant-project.org/jbweston/thesis.git thesis.git $ cd thesis.git $ make [...] ! Package mathspec Error: `amsmath' must be loaded earlier than `mathspec'.  See the mathspec package documentation for explanation. Type  H <return>  for immediate help.  ...                                               l.54 \RequirePackage{amsmath}  ? No pages of output. Transcript written on build/thesis.log. make: *** [Makefile:14: thesis.pdf] Error 1  Any hints for solving this issue? Regards


What is the difference between "Everybody has something to hide" and "Everybody's got something to hide"?

What is the difference between "Everybody has something to hide" and "Everybody's got something to hide" if any?


Why sets of nonzero measure contain almost all the point from Borel-cantelli Leems?

The question referred from this discussion   I understand the proof of the Leems.But i still don't get "Then almost all x ∈ R belong to at most finitely many of the E_Ks"? i understood that if x belongs to infinitely E_k then the set contain all such x has measure 0 but how it implies finitely many x's belongs to that set? or infinitely many x ∈ R belong to at most finitely many of the Ek's? how i can get a contradiction?  THanks in advance for the help.


How to remove Kite Coding Assistant malware that keeps reinstalling itself?

Kite Coding Assistant is a REALLY annoying piece of software that installed itself when I installed Anaconda. It acts like rootkit malware. It starts running in the background as soon as I start up my computer and then pops up whenever I go to use my Python editors (Spyder, Pycharm, and others). I am concerned that it monitors my coding and computer activity, and sends messages and files back to its Russian developers. I first tried killing it using Task Manager, and then Windows Process Explorer when that did not stop it. I tried using the Kite coding assistant uninstaller, but that did not work. It appears to have re-installed itself again on an update of Spyder. I next tried removing it from the Windows Registry but it won't let me delete the last few registry keys. This is supposed to be an AI assistant, not a Russian rootkit. What is the best way to remove malware like this that keeps reinstalling itself?


Approaches to finding potential collaborators and co-authors

Based on my recent  and  by Stephan Kolassa, I would like to solicit the community's thoughts, advice and best practices on the topic of finding potential collaborators and co-authors (especially from a beginner's perspective).  Initially, I thought that it is a rather simple question with a most likely and obvious answer to it is simply to intensively network, interact with relevant people and publicize your own ideas, thoughts and projects (in other words, build your academic "brand"). However, while the core idea is most likely to follow the above-mentioned common sense, on second thought, there might be much more to it, such as various important strategic and tactical considerations that I could have missed.


Variadic template member function header/source file

In the abc.h file I have a class:  class ABC {     public:          template <typename... Args>         ABC(Args... args);      protected:          template <typename Type, typename... Args>         void processArguments(Type &argument, Args... args);          template <typename Type>         void processArguments(Type &argument);          template <typename Type>         void doSomethingWithTheArgument(Type &argument); };   Then, I created abc.cpp with the following:  template <typename... Args> ABC::ABC(Args... args) {     processArguments(args...); }  template <typename Type, typename... Args> void ABC::processArguments(Type &argument, Args... args) {     doSomethingWithTheArgument(argument);     processArguments(args...); }  template <typename Type> void ABC::processArguments(Type &argument) {     doSomething(argument); }  template <typename Type> void ABC::doSomethingWithTheArgument(Type &argument) {     std::cout << argument << std::endl; }   And just some test.cpp:  int main() {     ABC abc(1, 2, 3, "somehing", 2 + 5);     return 0; }   And then I wanted to build it with the following command line:  g++ --std=c++11 abc.cpp test.cpp   And then bang!  /tmp/ccflWDpf.o: In function `main': test.cpp:(.text+0x3b): undefined reference to `ABC::ABC<int, int, int, char const*, int>(int, int, int, char const*, int)' collect2: error: ld returned 1 exit status   And when I put whole code in a single xyz.cpp file the code compiles fine. Does it tells that implementation of variadic templates cannot be provided in different translation unit?


Energy changes due increasing plate separation of unconnected charged capacitor

If a capacitor is charged by a source with constant voltage, $V$, the energy, $W$, stored by a capacitor of capacitance $C$ is given by:  $$ W = \frac{1}{2} QV = \frac{1}{2} V^{2}C = \frac{Q^{2}}{2C} $$  where $Q$ is the charge stored on the plates.  If the capacitor is now disconnected, and its capacitance is changed by increasing the distance between the plates, its energy must increase since work is being done by moving charge under the influence of an electrical field. Furthermore, since the plates are not connected to anything, it can be assumed that charge is conserved.  The method for calculating the change in energy that I have seen in textbooks and on the internet is to calculate $Q$ for the pre-separated case, calculate $C$ for both cases, then use:  $$ W = \frac{Q^{2}}{2C} $$  to give $$ \delta W = \frac{Q^{2}}{2} \left( \frac{1}{C_{2}} - \frac{1}{C_{1}} \right) $$  where $C_{2}$ is capacitance post-separation, $C_{1}$ is capacitance pre-separation and $\delta W$ is the change in energy.  This seems naive to me. That formula was for the process of charging a capacitor from a constant voltage with the $\frac{1}{2}$ arising from the potential difference that charge is raised by decreasing as more charge is deposited.  With constant $Q$, we can say that:  $$ dW = QdV $$  and integrate to give:  $$ \delta W = Q(V_{2} - V_{1}) $$  where $V_{2}$ is the post-separation voltage and $V_{1}$ is the pre-separation voltage. Substituting $Q = CV$ then gives:  $$ \delta W = Q^{2} \left( \frac{1}{C_{2}} - \frac{1}{C_{1}} \right) $$  i.e. double the textbook answer.  Am I missing something?


Generally when we flag a post (using normal or 'other' option) it is finally handled by moderator as helpful or declined (or disputed by 10K users). But there are few case where a flag is actually handled by OP and it always results as helpful flag.   Let me explain, I flag this  (visible to 10K user). It was non programming question and after 2 downvotes OP deleted that question. Once OP deleted the question it results to me as 1 increment in my helpful flag.  So my question is, Here which flag rule apply that always results as helpful flag and never as declined flag ?


C program/assembly works great but exit with code 5/26

So,I have this assembly inline C program to count how many of each letter of the alphabet are there in a string. I am working with Visual Studio 2019 and the program works but when it prints the values it exits with code 5 when in release mode and with code 26 when in debug. I need it to exit with code 0. Is there any problem with the assembly part or is there anyway I can force exit 0?  #include <stdio.h>  void main() {          char string[] = "This iS A sTriNg";           unsigned short occurrence[26];       __asm     {         SUB EAX, EAX         SUB EBX, EBX         SUB EDX, EDX         SUB EDI, EDI         MOV AL, 97d                                EmptyArray :         MOV occurrence[2 * EBX], 0         INC EBX         CMP BX, 25         JG EndLoop         JMP EmptyArray  EndLoop:           SUB EBX, EBX         MOV BL,string[0]         CMP BL,0         JE End         XOR EBX,EBX  //----------------------------------------------Control every string letter------------------------------------------------------------------------          Loop:             MOV CL, string[EDX]             CMP AL, CL                        JE OccurrenceLowecase             SUB AL, 32                                CMP AL, CL             JE OccurrenceUppercase             ADD AL, 32                                     INC EDX                                         CMP ECX, 0d                                       JE  ChangeLetter             JMP Loop  //-------------------------------------------Occurrence Lowercase--------------------------------------------------------------------------------------------  OccurrenceLowercase:                 INC BX             MOV occorrenze[2 * EDI], BX                        INC EDX                                        JMP Loop  //-------------------------------------------Occurrence Uppercase--------------------------------------------------------------------------------------------  OccurrenceUppercase:             INC BX             MOV occorrenze[2 * EDI], BX                        INC EDX               ADD AL,32             JMP Loop   //-------------------------------------------Change verification letter-------------------------------------------------------------------------          ChangeLetter:                 INC AL                //Increment AL to pass to the other letter             INC EDI             SUB EBX, EBX                         SUB EDX, EDX                          CMP AL, 91d             JE End             CMP AL, 123d          //Control if AL has the value after z or Z              JE End             JMP Loop   //----------------------------------------------THE END-----------------------------------------------------------------------------------         End:     }       {         int i;         for (i = 0; i < 26; i++)         {             printf("%c: %d\n", 97 + i, occurrence[i]);         }     } }


Most Makefile users use the commandline. Thus they have no need of evoking it in the GUI. But Makefile can be used as an administration tool for the users too.  In my case, a clerk is tasked to maintain a document which changes daily, and as soon as she saves the file, the "source" is changed. I want her to convert it to PDF, stamp the PDF with a given template, encrypt it, merge it with a few other files, and produce three variations for different departments with different stamps.  I have a Makefile for that purpose, already written. Is there a way to let her evoke the Makefile without putting me to the mire of doing additional commandline training? She can save the document, evoke Makefile, and be done.  P.S. This is not about how to execute a shell script or an .EXE file because there is no shell scripts or .EXE files or any executable files in the question at all.


I need a bit of help with this.      She is a photographer but that camera is her brother's-in-law     or:        She is a photographer but that camera is her brother-in-law's   I am aware that I could change the construction to make things easier, like:      She is a photographer but that camera belongs to her brother-in-law       However, I would really like to find out what's the correct way to write the sentence.


If mass is added to a toy car does it affect its speed making it faster

If mass is added to a toy car (29.7g) and dropped down a wooden ramp would it affect its speed making it go faster? I know friction comes in to play to, so if you could give me an answer or an equation to show this that would be.


What is the preferred method to achieve the C++ equivalent of java's instanceof?


I got Ubuntu 18.04.3 installed on my laptop, but the tech that did it for me forgot the password he used!  Because of travel, I cannot let him sort out the problem; I have to do it myself, as I need the laptop.  How do find out what password he used or how can I reset it?  I have found official instruction for it online that simply don't work - they lead to different screens and possibilities than those described.  I  am more confused than ever.  Can some one help me?  I am NOT a tech, but I can open a terminal, so  please do not assume I know any more than that.


Prove the identity $ \sum_{i=0}^n {n \choose i} i = n2^{n-1} $ using combinatorial proof.


Dual-boot boot menu does not show up after installing Ubuntu 15.10 alongside Windows 10

I have installed Ubuntu 15.10 alongside Windows 10 with UEFI. To install Ubuntu, I chose the option install alongside Windows 10 or something similar to this. Then I created a new partition for Ubuntu and installed it. After installation, the boot menu did not show up. Initially I thought Ubuntu has not been installed, but when I plugged in the USB drive and wanted to install Ubuntu I saw an option of reinstalling Ubuntu on my machine. So, I found out that Ubuntu is installed. Pressing F8 and F12 also does not help. Can anyone help me bring up the GRUB boot menu? In Windows, I also entered the command bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi in cmd, but still the boot menu does not show up.  Reply (Himanshu) : Just boot in bios and, if you can, add boot option with name say ubuntu and path EFI/ubuntu/shimx64.efi. No need for live PCB or anything. Move the boot option to top. This is for dell GUI bios but I assume it works for all. Or you may want to see  or , where you can enable Windows Boot Loader for one boot or forever as you wish, and boot Ubuntu from it. If you want now, you can use the installed Ubuntu terminal to use the commands update-grub to use GRUB instead. (Not enough reputation to answer properly btw.)


A process with multiple possible roots/causes

How do you call a process/phenomenon that can have multiple causes? For example, a disease can result from many factors (not necessarily their interplay but instead when different causes manifest in different age/genetic groups). I am seeking for a noun (if not, an adjective), primarily in the context of studying such a phenomenon (a "nightmare" doesn't work) - a "multiroot", a "bundle" but more scientific.    Example:   The mechanism of the process is still debated and may be a multiroot (=multiple mechanisms can operate simultaneously to cause the process).


How do you overlay an image on a shader in Cycles?

I'm trying to overlay an image on top of a shader to create the effect of having printed onto metal like so:    I'm using an Anisotropic shader for the underlying brushed metal and have UV Mapped a PNG (with alpha channel) for the printed portions. I've tried using a Mix and an Add shader to combine the two but it doesn't give the effect I'm after. Instead, it looks like the metal was stained with a translucent film, rather than over-printed with an opaque ink/paint.  Here's my shader so far:   How can I achieve this over-printed effect?


It's really confusing to choose the correct tense between simple past and present perfect.  Let's assume one situation:  Every student has to bring his/her own name tag to the class, but today I forgot to bring it. If a professor notices that I'm not with the name tag now, she would ask me:   'Don't you have your name tag?'   Then I would say:   'Yes. I have the name tag but I forgot to bring it', right?   But is it okay for me to say:   'Yes. I have the name tag but I didn't bring it', or 'Yes. I have the name tag but I haven't brought it.'   Which one is correct between 'I didn't bring it' and 'I haven't brought it'? (So confusing to pick up the right tense.)


How to set the node ID to start with 100,000?

I am running a new site with Drupal 7.  I want the node ID to start with 100,000.   How do I set it? I don't want the node start with node 1.


Jquery, cannot read checkbox value after checkbox is appended

My main goal is to get the amount that whatever the user has keyed in the textbox if the checkbox next to it is checked and sum all amount of the checked checkboxes.  But the current problem that I'm facing is, I can't even get the checkbox value after it is appended.  How to solve this problem?     $('#add_exercise').on('click', function() {      $('#exercises').append('
<input type="text" name="amount"><input type="checkbox" name="exercise[]" class="boxes"><button class="remove">x</button>
');     return false; //prevent form submission });  $('#exercises').on('click', '.remove', function() {     $(this).parent().remove();     return false; //prevent form submission });  $('.boxes').on('change', function() {      console.log('qwe') });  <form method="post" action="#">      Exercises      <fieldset id="exercises">
             <input type="text" name="amount" value="">             <input type="checkbox" name="exercise[]" class="boxes"><button class="remove">x</button>
     </fieldset>      <button id="add_exercise">add exercise</button>  </form>


How can I include multiple graphics from the same pdf in my beamer?

I usually use  \begin{figure}     \includegraphics{figure.pdf} \end{figure}   To include a figure that is in a one-page .pdf file into my beamer presentation. Now I have a pdf with multiple pages. On some pages there are figures I would like to include at different spots in beamer. Can I do this directly from beamer or do I first need to split up the pdf file into multiple files addressed separately from TeX?   Using the above code will simply include the first page of the pdf; but what if I need, say, the second or third?


This is a canonical question   How do I jailbreak an iPhone or iPad (to install a package manager like Cydia or Sileo for tweaks) on:   iOS/iPadOS 13 iOS 12 iOS 11 iOS 10 iOS 9 iOS 8


In how many ways can a teacher sit k students on n chairs so that no 2 students sit next to each other?

There are $n$ chairs in a row. In how many ways can a teacher sit k students on these chairs so that no $2$ students sit next to each other (and obviously no $2$ students sit on $1$ chair)?   I think that is not a typical stars and bars problem. It is not exactly $\binom{n-1}{k-1}$ right?


How can I get this setup in Cycles (for cell shade)

I'm using a material setup in Blender Internal for cell look. I want to use same setup for Cycles but I can't get exact same result. In this setup; I can select shadow color and direction in color ramp. And also this setup works good in viewport.


I'm flying out of Charlotte, NC on June 3rd with my 13 yr old beagle in cargo.  Will the temperature in cargo be 85 degrees or higher?  If so, I've been told they won't fly her!


Compare two files, show lines in file1 but not in file2

Let's say I have two files - file1 and file2. I want to compare those files, but output only lines that are in file1 and not in file2. How can I do it?


Relation between black hole mass and size applied to observable universe

If I apply the relations given in  and  to the values for the mass of the observable universe (obtained from Wolfram alpha) as M=3.4 10^54 kg, then I get a diameter of 1.1 10^28 m, about 10 times the estimated diameter of the obs. universe at 8.8 10^26 m. Clearly in the same ballpark. Tinkering with the mass, and excluding dark energy (for lack of 'rest mass'?) reduces the input to 28% of M, and that produces a black hole diameter only 3 times too big. Now, is this coincidence? Reading , I find no other remark addressing this 'coincidence' than Johannes's (quote) The radius of the observable universe equals the Schwarzschild radius of the total mass of the observable universe (unquote). Is Johannes' statement correct and generally accepted? If so, what is the logic here?  Edit: from"": "... we'd have shown that the Schwarzschild radius of the mass of the observable universe is equal to it's radius. Sadly it doesn't quite work. The dimension R is the current size of the observable universe, which is around 46.6 billion light years, while the size used in Hubble's law, re, is the current apparent size 13.7 billion light years." So we are to conclude that the 'close fit' (apart from a factor 3 or so) between the Schwarzschild radius and the estimated mass (apart from dark energy) is indeed a numerical coincidence? Please note that John Rennie's argument introduces the 'critical density' and Hubble's Law, while the relation between mass and radius of a black hole allow us to input a mass and obtain a radius without that.


MS-SQL index not using all the available columns as seek predicates

I have a SQL Server query on a large table (>17 million rows) that sometimes does not populate all the predicates before performing an index seek, which results in not filtering out enough rows and slowing the query down significantly (hours).   Microsoft SQL Server 2005 database is used and this SQL query is generated by Hibernate.  Here is how the simplified query looks like:  SELECT MAIN_TABLE.FIELD_1,        MAIN_TABLE.FIELD_2,        MAIN_TABLE.FIELD_3,        MAIN_TABLE.FIELD_4,        TABLE_1.FIELD_1,        TABLE_1.FIELD_2,        TABLE_2.FIELD_1,        TABLE_2.FIELD_2,        TABLE_3.FIELD_1 FROM MAIN_TABLE      INNER JOIN TABLE_1 ON MAIN_TABLE.TABLE_1_ID = TABLE_1.ID      INNER JOIN TABLE_2 ON MAIN_TABLE.TABLE_2_ID = TABLE_2.ID      LEFT OUTER JOIN TABLE_3 ON MAIN_TABLE.TABLE_3_ID = TABLE_3.ID WHERE MAIN_TABLE.SOME_ID IN (SELECT SOME_ID FROM PARTITION_VIEW                               WHERE PARTITION_VIEW.SOME_FIELD_1 = [VALUE_1]                              AND PARTITION_VIEW.SOME_FIELD_2 = [VALUE_2]                              AND PARTITION_VIEW.SOME_FIELD_3 = [VALUE_3]) AND MAIN_TABLE.DATE BETWEEN [DATE_RANGE_1] AND [DATE_RANGE_2] AND TABLE_1.STATE = [STATE]   The PARTITION_VIEW is a UNION of materialized views that all have index on columns  SOME_FIELD_1, SOME_FIELD_2, and SOME_FIELD_3.  In the MAIN_TABLE, we have an index on columns DATE and SOME_ID and this is the index that gets utilized which is correct.   When I checked the query plan from the SQL Server Management Studio, I found that in some cases such as when the date range is large (one year), the predicate used is the DATE column only. Then only after all the rows are within the given date range are found, the result set is filtered out by the given SOME_IDs.   It seems like the query optimizer did not pick the best query plan available.   When the exact query is directly executed from SQL Server Management Studio, everything performs correctly. This suboptimal query plan is used only when the query is executed from the application through Hibernate.  One thing I tried was to create actual table PARTITION_TABLE which copied over all the data from the PARTITION_VIEW and retrieved SOME_IDs from the PARTITION_TABLE, then the index on MAIN_TABLE was using all the predicates (SOME_ID, DATE). I want to keep using the view if possible since it automatically reflects the changes.  Is it possible to keep using the union of materialized views and ensure that the index on the MAIN_TABLE will always retrieve the SOME_ID on the where clause first so that it can be used as part of the predicate in the index?


CRTP derived() method in multiple level inheritance

I am wondering why the follow does not work:  template<typename Derived> struct Base0 {     const auto& derived() { return static_cast<const Derived& >(*this);} }  template<typename Derived> struct Base1: Base0<Base1<Derived>> {     auto foo () { return derived().foo_impl();} }  struct Foo: Base1<Foo>> {     auto foo_impl () { return "foo";} }   It complains  that derived() is not a member. Changing derived()  to this->derived() works, but I guess this will get Base1<Base0<Foo>>& instead of Foo& (which is not desired), right?  Alternatively, we can do the follow:  template<typename Derived> struct Base0 {     const auto& derived() { return static_cast<const Derived& >(*this);} }  template<typename Derived> struct Base1: Base0<Derived> {     // for some reason, "this->" is still needed here, why???      auto foo () { return this->derived().foo_impl();} }  struct Foo: Base1<Foo>> {     auto foo_impl () { return "foo";} }   But I am not sure if this is the conventional way of doing multilevel inheritance using CRTP. Any comments?


MySQL: grant SELECT to all databases except system

I need to add an user able to read all my databases. So I create:  create user 'reader' identified by 'password'; grant select on *.* to 'reader';   The problem with this is that the user is able to read also system tables like mysql.user, which I think is a security problem. I tried to revoke the select privilege on that table:  revoke SELECT ON mysql.* from 'reader';   But I get   ERROR 1141 (42000): There is no such grant defined for user 'reader';   What am I doing wrong? Is there another way to achieve what I want?  Or manipulating the grant tables is the only way?


Combinatorics pigeonhole principle with matrix

Let A be a 100 x 100 matrix such that every number from {1, 2, ... 100} shows in A exactly 100 times.  Prove that there's a row or a column with at least 10 different numbers.  The context is the Pigeonhole Principle.  EDIT: theres a solution to this questuion here:   but the problem is that I dont understand how to prove the part which is said to be "clearly  I couldn't solve it by myself, when trying every strategy I know for solving Pigeonhole problems.


Determine set of points in the complex plane that satisfies the following equation

Thanks for taking your time.  I've been given the following problem:  Determine and plot set of points in the complex plane that satisfies the following equation  $ |z-2| + |z+2|=5 $  where $ z = x+iy$.  My first approach was to square both sides, but what I ultimately get is the square of a binomial, which when expanded gives me the product of square roots:  $ 2\sqrt{((x+2)^2+y^2)((x-2)^2+y^2)}$  which I don't know what to do with.   Can anyone provide some insight? Tanks!


GLM: verifying a choice of distribution and link function

I have a generalized linear model that adopts a Gaussian distribution and log link function. After fitting the model, I check the residuals: QQ plot, residuals vs predicted values, histogram of residuals (acknowledging that due caution is needed). Everything looks good. This seems to suggest (to me) that the choice of a Gaussian distribution was quite reasonable. Or, at least, that the residuals are consistent with the distribution I used in my model.   Q1: Would it be going too far to state that it validates my choice of distribution?  I chose a log link function because my response variable is always positive, but I'd like some sort of confirmation that it was a good choice.   Q2: Are there any tests, like checking the residuals for the choice of distribution, that can support my choice of link function? (Choosing a link function seems a bit arbitrary to me, as the only guidelines I can find are quite vague and hand-wavey, presumably for good reason.)


struct size not as expected when using bit fields

With the below code:  struct S { unsigned char b1 : 3; int i; };   I can deduce that char b1 is of 1 byte and using 3 bits of that and int is 4 bytes but when I try to print out the size of S, I get it 8 bytes instead of 5 bytes(1 for char+4 for int) as I expected and this is something I am not understanding by obvious. Can something explain why size of S is 8 bytes?


I have a MacBook Air running on OS X 10.9, and I need to recover a password.  I figured out the hash, which is 554bc9ec674ff1476b67a02518cd9e4a, but I don't know how to decrypt it.  This is super important, all help appreciated.  Thanks in advance!


How to remove key+value pair from an object of Array

I want to remove property 'b' from all objects how i remove???   let result=[     {        'id':'1',        'b':'asd'     },     {        'id':'2',        'b':'asd'     },     ...     ,     {         'id':'2000',        'b':'asd'     },  ]     // delete object.b; its only for object and want to remove from whole     //  array 2000 records     Using foreach loop is it correct way to delete key + value pair from array of objects


Security updates for the universe repository for LTS releases?

What happens if there is a security problem in a package in the universe repository four years after the 12.04 LTS release; will the package be updated from upstream, patched, or left alone?  It's my understanding that the "5 years of support & security updates" applies only to the core of Ubuntu -- anything in Main repository.  Not for things in the Universe repository.    For a more specific example -- if I install Ruby now, and want to use it for the next several years on 12.04 and it has a security vulnerability; while this might be patched in the upstream (so I could always download the latest from their website and compile it myself or use a PPA), will this upstream fix be migrated into the precise package repositories? What about backports?


How do I increase the open files limit for a non-root user?

This is happening on Ubuntu Release 12.04 (precise) 64-bit Kernel Linux 3.2.0-25-virtual  I'm trying to increase the number of open files allowed for a user. This is for my eclipse java application where the current limit of 1024 is not enough.  According to the posts I've found so far, I should be able to put lines into   /etc/security/limits.conf like this:  soft nofile 4096 hard nofile 4096   to increase the number of open files allowed for all users.  But that's not working for me and I think the problem is not related to that file.  For all users, the default limit is 1024, regardless of what is in /etc/security/limits.conf (I rebooted after changing that file)  $ ulimit -n 1024   Now, despite the entries in /etc/security/limits.conf I can't increase that:  $ ulimit -n 2048   -bash: ulimit: open files: cannot modify limit: Operation not permitted The weird part is that I can change the limit downwards, but can't change it upwards - even to go back to a number which is below the original limit:  $ ulimit -n 800 $ ulimit -n 800  $ ulimit -n 900  -bash: ulimit: open files: cannot modify limit: Operation not permitted   As root, I can change that limit to whatever I want, up or down. It doesn't even seem to care about the supposedly system-wide limit in /proc/sys/fs/file-max  # cat /proc/sys/fs/file-max 188897  # ulimit -n 188898 # ulimit -n  188898   But even I get eclipse to run as root, my application still crashes because of "Too Many Open File" exception!   So far, I haven't found any way to increase the open files limit for a non-root user.  How should I properly do this? I have looked at several other posts but no luck!


Why doesn't multiplying square roots of imaginary numbers follow $\sqrt{a} \times \sqrt{b} = \sqrt{ab}$?

I've been following a series on understanding about how imaginary numbers came to be, and in the series, it mentions that imaginary numbers mostly follows the algebra rules for real numbers, such as adding or multiplying by real numbers. However, it specifically mentions this "inconsistency(?)" about multiplying square roots of imaginary numbers do not follow the rule for multiplying square roots of real numbers, namely $\sqrt{a} \times \sqrt{b} = \sqrt{ab}$. For example, why can't I do this: $\sqrt{-2} \times \sqrt{-3} = \sqrt{(-2)(-3)} = \sqrt{6}$, which I know is the wrong answer. In the past, I've just memorized to factor out the imaginary parts first, and that $i^2 = -1.$ However, can anyone show me an explanation for this, or tell me where I could learn more about it?


Is there any way to Import a table from Latex to Excel or any other format ?


Python: date.time strptime format for YYYY-MM-DDTHH:MM:SS?

Hello I am trying to find how I should write a certain format for the Python strptime function because I cannot find this particular format anywhere. My plan is to add a x amount years to a date time format string, then return that string back While I can understand that you need to provide a certain format like "%y-%m-%d" for the function. I cannot find the format for this one: 2021-04-12T20:00:00 Can someone help me?


Possibly repair or recover data from a failing NTFS drive

My 1TB NTFS data drive seems to be failing and is no longer accessible. It doesn't appear in drive or device manager on windows. The drive only has the one NTFS partition. However I can see the drive when booting into ubuntu. It accurately picks up the drive size and free space, but is unable to mount a partition. Google seems to suggest it's a partition table failure, however I am can not be sure. Is this a software failure or something physical? And is it repairable without losing data on the partition? The drive only has the one NTFS partition.


All going good, but when i wry to insert something like It's Man's Isn't it Like this then problem.  $Query = "INSERT INTO `9154804_data` (`Parent`, `Name`) VALUES ($Section, $inputdata);"; $InsertData = $mysqli->query($Query); if ($InsertData){     $InsertID   =  $mysqli->insert_id;     $Return['Success']  = "Successfully added."; }else{     $Return['Error']    = "Something went wrong!"; }


Configuring the Dock to be Spaces-centric

I use multiple displays, and the available options for Spaces that I am aware of allow surprise Space-switching, even when working in a completely different space.  Ideally, interacting with the Dock will only affect the same Space on the same display on which I used the Dock. This means:   If app clicked in Dock, and no copy of app is running on any space, then start the app and confine it to the current Space. If app clicked in Dock, and the program is already running in another Space, then either 1) open a new window if the program allows this, or 2) silently move the app to the current Space without disturbing or changing any other Space or display. If app clicked in Dock, and the program is already running in the current Space, then change focus to the app.   Specifically: - Clicking an icon in the Dock should rarely affect any other Space. - Clicking an icon in the Dock must never affect which Space is displayed on which display  OS X Yosemite 10.10.2, MacBook Pro 2012. (Dock set to auto-hide, and pops up at the bottom of any screen when I put the mouse there.)


How to switch 7 wires with a single on/off slide switch

I am working on a project, where I want to build a raspberry pi into a nintendo 64 console, and be able to switch between with a single switch. By that I mean, I want to be able to use a single slide switch to either switch on the raspberry, or the n64.   I already figured the most stuff out, but I need help with wiring the controller port.   I have a n64 to USB controller adapter, which is connected to the raspberry. Each controller has 3 pins, VIN, GND and Data. I have 2 ports I need to switch. I also need to switch the usb Power for the raspberry.   So, I need a single switch, which has 2 states (ON, OFF), to switch the n64 controller ports to either the n64 console, or to my USB adapter. It also needs to switch the 2 wire power for the raspberry. I made some pictures to visualize it better:  So here is how it should be for to work with the regular N64. The controller ports are wired to the n64 console, and the raspberry power is not connected.    Then, when you switch it over to work with the raspberry, the n64 controller ports should go to the USB adapter, and the raspberry power is connected.    Now, my problem is I don't know how to achieve that. I know there are slide switches with enough pins, but they have multiple possibilities, not only two.   I also need something small, since the n64 case is small and doesn't have a lot of space.   Any ideas?


I have read the excellent answers to  - my question is specifically about usage.   Is there a best practice for deciding between the variants geometric and geometrical in writing? A  shows that geometrical was more popular until about 1965, when they switched. What grammatical rules, if any, would be relevant here?


How can I add new logical partition?  I already have an extended partition, so I tried to use GParted to add a new logical partition.   I tried to resize the extended partition, but such an option is not available. I tried to add a new logical partition but it only gave primary partition options.


Let $f : \mathbb{R}^{n} \rightarrow \mathbb{R}$ be continuous function. Prove that preimage of any closed subset in $\mathbb{R}$ is closed subset in $\mathbb{R}^{n}$.  I have no idea where should I start


Proving that $\left|\Re\left( \frac{1+i\sqrt{7}}{2}\right)^n\right| \to \infty$

Let $u_n=\displaystyle\Re\left( \frac{1+i\sqrt{7}}{2}\right)^n$ Prove that $|u_n| \to \infty$  This appeared in a recent issue of French Revue de la Filière Mathématiques, as it was reportedly asked during an oral exam. The editor deems it is an "extremely difficult problem", and uses Skolem–Mahler–Lech theorem to prove the result. They're also looking for a proof an undergraduate could find. Do you know one ?


Let $f:\mathbb{R}\to\mathrm{S}$, where $\mathrm{S}\subseteq\mathbb{R}$, be a strictly increasing (decreasing) function. I wish to find out whether its inverse $f^{-1}$ is also strictly increasing (decreasing) or not. While a proof for this exists online, I will provide a counterexample that seems to contradict the conclusions in the proof.  The proof can be found in:   I will for simplicity only consider a strictly increasing function. From the provided link above we have that: \begin{align*} x < y & \quad\Leftrightarrow\quad f(x) < f(y) \\ f^{-1}(x) < f^{-1}(y) & \quad\Leftrightarrow\quad f^{-1}(f(x)) < f^{-1}(f(y)) \\ f^{-1}(x) < f^{-1}(y) & \quad\Leftrightarrow\quad x < y \\ \end{align*} Thus, if $f$ is a strictly increasing function, then so is $f^{-1}$.  Now for the counterexample. With some loss of generality, let $f:\mathbb{R}\to\mathbb{R}_{++}$ be a strictly positive function, where $\mathbb{R}_{++}=\{ x\in\mathbb{R}: x>0\}$. Furthermore, for an inverse it follows that $f^{-1}(x)f(x)=f(x)f^{-1}(x)=1$. Then from  \begin{align*} x < y & \quad\Leftrightarrow\quad f(x) < f(y) \end{align*} we can rewrite the right-hand side as  \begin{align*} f^{-1}(y)=\frac{1}{f(y)}<\frac{1}{f(x)}=f^{-1}(x) \end{align*} which implies that if $f$ is a strictly increasing function, then its inverse $f^{-1}$ is strictly decreasing.  Please provide comments if and why my counterexample is invalid. Thank you in advance.


About a year ago my wordpress website was hacked & some company decided to go nuts and actually do some "SEO" on the various links it created. Some of the pages would show up on google as "payday cash advance" instead of "portfolio".  The issue has been resolved, but now as I've been doing GOOD seo, I've noticed (when checking backlinks) that there are TONS of links still on the internet (mostly broken sites now) that have links to my website with titles like: "get a loan today" and so on.  Is there a way to remove these links ? Can I tell google to ignore them ?   Help !


How can I enable mp4/h264 as an output option in Fedora Linux?

I know it is possible to output a render as a video in mp4/h264 (as well as mkv, etc) however, it does not appear as an option for me.    This is blender 2.64.2, on linux (FC17), ffmpeg version 0.10.7:   $ ffmpeg -codecs|grep 264 D V D  h264            H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 D V D  h264_vdpau      H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (VDPAU acceleration)  EV    libx264         libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10  EV    libx264rgb      libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB   $ ffmpeg -formats|grep mp4  D  mov,mp4,m4a,3gp,3g2,mj2 QuickTime/MPEG-4/Motion JPEG 2000 format   E mp4             MP4 format   The file /usr/share/blender/2.64/scripts/startup/bl_ui/properties_render.py has the following lines (snipped for brevity):   class RENDER_PT_encoding(RenderButtonsPanel, Panel):      return rd.image_settings.file_format in {'FFMPEG', 'XVID', 'H264', 'THEORA'}      layout.menu("RENDER_MT_ffmpeg_presets", text="Presets")      if ffmpeg.format in {'AVI', 'QUICKTIME', 'MKV', 'OGG'}:     elif rd.ffmpeg.format == 'H264':   which leads me to believe that it should give me at least those options. How do I enable them? I've looked all over the place and cannot find the solution online.    edit:  This is the official fedora build, blender-2.64a-3.fc17.i686.rpm   installed from the fedora updates repo.


If I cast All is Dust, does land count as colored permanents?


If I have no user input, should use prepared statement

I am currently working on the store page for my website. I am connecting  to my database where data for the products is stored. The page has no user input, it just displays the data such as product name, price etc. My question is, can/should I implement prepared statements in order to prevent from SQL injection. If I can't use prepared statements are there any other forms of security I should implement in my website? Here is my current code:     <?php  $connect = mysqli_connect('localhost', 'root','', 'cart'); $query = 'SELECT * FROM products ORDER by id ASC'; $result = mysqli_query($connect, $query);  if ($result):     if(mysqli_num_rows($result)>0):         while($product = mysqli_fetch_assoc($result)):         ?>
             <form method="post" action="view_product.php?action=add&id=<?php echo $product['id']?>">
<a href="view_product.php?product=<?php echo $product['id'] ?>">                     <img src="<?php echo $product['image'];?>" />
<a href="view_product.php?product=<?php echo $product['id'] ?>">                         <?php echo $product['name'];?>

<?php echo $product['price'];?>

             </form>
         <?php                     endwhile;                 endif;           endif;             ?>  When clicking on a certain product it redirects to another page where additional info is displayed for the particular product. I am using a query for that, could I use prepared statements for it? <?php $query = 'SELECT * FROM products WHERE id = "'.$_GET['product'].'"'; ?>  Thank you in advance!


I am trying to get it on my mac, so do I download the windows version onto a USB and then upload it from there because I can't find a mac version.


How many subgroups of $\Bbb{Z}_4 \times \Bbb{Z}_6$?

I have been trying to calculate the number of subgroups of the direct cross product $\Bbb{Z}_4 \times \Bbb{Z}_6.$ Using Goursat's Theorem, I can calculate 16. Here's the info:  Goursat's Theorem: Let $G_1 \times G_2$ be a group and let $A/B$ be a subquotient of $G_1$ and $C/D$ be a subquotient of $G_2.$ Also, $\varphi: A/B \to C/D$ is an isomorphism. Then there exists a bijection from the set of all subgroups of $G_1 \times G_2$ and the set of all triples $(A/B, C/D, \varphi)$.  So I counted all the subquotients of $\Bbb{Z}_4$ (there are 6) and all the subquotients of $\Bbb{Z}_6$ (there are 9). There are only 2 isomorphisms. I label them $\varphi_1: \{ 0 \} \to \{ 0 \}$ and $\varphi_2: \Bbb{Z}_2 \to \Bbb{Z}_2$ (because every subquotient is isomorphic to either $\{0\}$ or $\Bbb{Z}_2$). Both of these isomorphisms has only one possible automorphism. So we need only calculate the different combinations of mappings from $A/B$ to $C/D.$  For $\varphi_1,$ there are $3 \times 4 = 12$ possible mappings. For $\varphi_2,$ there are $2 \times 2 = 4$ possible mappings. Thus, there should be a total of 12+4=16 isomorphisms. By Goursat's Theorem, there must be 16 subgroups of $\Bbb{Z}_4 \times \Bbb{Z}_6$.  Only problem is, when I look at every subgroup lattice for $\Bbb{Z}_4 \times \Bbb{Z}_6$, there are only 15 subgroups!  Using my method above (Goursat's Theorem), what am I doing wrong? Or, am I looking at the wrong subgroup lattice (less likely)?  P.S. Let me know if you need more info about my counting methods.


How do I publish the work of my elderly father, a "fringe" scientist?

I am trying to figure out the best way to publish my elderly father's life work. He says he would be considered a "fringe" scientist or an independent researcher. Should we self-publish? The subject matter would be of great interest to those interested in earth-moon systems, and the Egyptian Pyramids. How should we proceed?


Bounty page is not loading when sorting by offered or earned

When click on view more in earned and offered  bounty section it give Not found error message          same happen with the earned. It happens  when url have   &sort=offered or  &sort=earned param   but when do not have  those param, its working fine (?tab=bounties works fine)


Why did the Resistance automatically assume the use of this tech in The Last Jedi?

In The Last Jedi:     The Resistance fleet is tracked through hyperspace by the First Order after they make their jump away from their old base.   As soon as the FO ships appear, the Resistance immediately come to the (correct) conclusion as to the tech that was used.  Why would they assume the use of this tech, that they have never encountered before, as opposed to the more common technique of     tracking a ship through the use of a homing beacon.


How could "printf (cout)" change uninitialized local variable?

I made a mistake and used uninitialized local variable in a function and happened to find a single line of "cout" could change the uninitialized value. To simplify, I show the problem as follow.  #include <stdio.h>  void foo(void){   int i;   printf("%d\n", i);   i = 777; } int main(void){   foo();   //cout << "hello!" << endl;   foo();   return 0; }   The line I comment out will change the output from (unknown#;777) to (unknown#;hello!;0). Could someone help explain?  Thanks.


having problem with squidGuard. Need help

when i write down this command on my terminal for configuring squidguard squidGuard -d  this error shows up  squidGuard: error while loading shared libraries: libdb-4.6.so: cannot open shared object file: No such file or directory


My new laptop doesn't have a disk drive and I was wondering if I could download the game online without using a single cd Ill have to purchase cataclysm and mop so I can play again  Do I just use my key code on battle net and load the game on there


How do I interpret the "d" in derivative notation?

I recently decided to declare as an applied math major and I've realized that I don't think I fully understand what derivative notation actually means. I'm kinda worried that I might have missed something and it may affect my progress in more advanced math classes like ODE which I'm taking right now. I have always assumed that $\frac{dy}{{dx}}$ is just notation for a specific operation: $$ \frac{dy}{{dx}} = \mathop {\lim }\limits_{h \to 0} \frac{{y\left( {x + h } \right) - y\left( x \right)}}{h} $$ I understand that this is the definition of a derivative but this doesn't seem to be the full story. For example what does $dx$ mean by itself? In practice it seems like  $\frac{dy}{{dx}}$ is a ratio between two values $dy$ and $dx$ that have a mathematical meaning on their own. For example, its common to multiply both sides of an equation by $dx$. People say that $dx$ is just a small change in $x$ but what does that actually mean? One possible answer that I've just sorta assumed without thinking about it too much was $$dx = \mathop {\lim }\limits_{a \to 0} (x + a) - x $$ But this seems wrong because it just evaluates to $dx =  \mathop {\lim }\limits_{a \to 0} a = 0$. Reading wikipedia articles about differential notation isn't helping much but it sounds like the meaning of $dx$ has changed over time? The specific thing that prompted my question was a problem in my ODE class. Take a linear differential equation that looks something like this: $$ \frac{dy}{{dx}} + y = x^2 $$ I know what to do in order to solve this but the solution feels hand wavey. If you multiply both sides by the integrating factor $e^{x}dx$ and then integrate both sides you get $$ \int e^{x}dy + e^{x}ydx = \int e^{x}x^2 dx $$ I just don't know how to interpret the RHS of the equation. Do I integrate with respect to x or y? Do I just integrate the $dx$ and $dy$ terms separately? Doing that doesn't give you $e^{x}y$ which is the actual answer. Edit: some people are suggesting that in integral notation $dx$ is just sort of syntactical, it just shows where the end of the integration operation is. I am unsatisfied with this answer. If its just syntactical, then you would evaluate the ODE like this $$ \int (e^{x}\frac{dy}{{dx}} + e^{x}y) dx \\ $$ If I am understanding the syntax argument correctly, you should be able to split this integral into two parts like this: $$ \int e^{x}\frac{dy}{{dx}}dx + \int e^{x}y dx =  e^xy + e^xy = 2e^xy $$ But this doesn't appear to be consistent with my ODE textbook, which says the actual answer is $e^xy$. They justified that by saying that the derivative of $e^yx$ is $e^{x}\frac{dy}{{dx}} + e^{x}y$ by the chain rule. This feels handwavey and leads me to believe that $ \int e^{x}\frac{dy}{{dx}}dx + \int e^{x}y dx $ is not notationally equivalent to $\int (e^{x}\frac{dy}{{dx}} + e^{x}y) dx$


Here is my code: System.out.println("Enter Username: "); String unm=System.console().readLine();  System.out.println("Enter Password: "); char[] pwd=System.console().readPassword();  System.out.println("Welcome: " + "" + " Your password is " + new String(pwd));  Why am I getting this error?  Enter Username:   Exception in thread "main" java.lang.NullPointerException at Cons.main(Cons.java:13)


%1 is not a valid Win32 application for php_mysql.dll

Im trying to set up a  AMP installation on my windows 8 laptop. However, Im not being able to get PHP to talk to MySQL. When I start apache server, the following error log is generated   PHP Warning:  PHP Startup: Unable to load dynamic library 'ext\\php_mysql.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0 PHP Warning:  PHP Startup: Unable to load dynamic library 'ext\\php_mysqli.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line ..   Any idea why this could be happening?  Relevant portion of php.ini  ;extension=php_bz2.dll extension=php_curl.dll extension=php_fileinfo.dll extension=php_gd2.dll ;extension=php_gettext.dll ;extension=php_gmp.dll ;extension=php_intl.dll ;extension=php_imap.dll ;extension=php_interbase.dll ;extension=php_ldap.dll ;extension=php_mbstring.dll ;extension=php_exif.dll      ; Must be after mbstring as it depends on it extension=php_mysql.dll extension=php_mysqli.dll ;extension=php_oci8.dll      ; Use with Oracle 10gR2 Instant Client ;extension=php_oci8_11g.dll  ; Use with Oracle 11gR2 Instant Client ;extension=php_openssl.dll ;extension=php_pdo_firebird.dll extension=php_pdo_mysql.dll ;extension=php_pdo_oci.dll ;extension=php_pdo_odbc.dll extension=php_pdo_pgsql.dll extension=php_pdo_sqlite.dll extension=php_pgsql.dll ;extension=php_pspell.dll ;extension=php_shmop.dll


How to distribute weight properly in this situation?

I want to travel long distances with a mountain bike, and I have an army backpack that's wide, 55L, weights around 15-20kg total. I do not have a bike yet so I cannot test it, but I wonder if it won't cause problems in regards of weight distribution?  I'm planning to put it above the back tire on an attachable metal holder (the standard one) and strap it around my waist so it wouldn't fall down.  Would this work? I'm worried about weight distribution and it making me fall down, especially if I'm riding on an uneven road.  Please ask questions if you need to.


I wanted to adjust the size of my desktop background image, but could not see any options in Settings -> background for doing so. I came here and found these two questions:   and  . Both feature an image of Settings -> appearance with a number of options, and I have a vague memory that I had something like that once, but it is nowhere to be found now. These questions are 7 and 4 years old as of this writing. I did find something called 'Appearance' in the Ubuntu Store. Did this functionality get moved into that app?   I am no master of gimp, but I also tried using it to reduce the size of my image, and frankly, I can't even tell if Ubuntu accepted my 'set as background' command, because it still looks the same size. Are there any other options here?


Quite simple question really, I am using Blender 2.80 on Windows 10, Intel + Nvidia based system. Blender runs really well, no problems, however, when I have finished with Blender and close the app there is a console (command) window that briefly flashes up. It is too quick to read the messages, but I do see "error" in the list of messages. I would like to somehow keep this console open on Blender quit so I can read the messages and fix any issues. Or is it possible to get Blender to log the messages to a file for later reading?


I'm developing an application for iPhone with a screen where the user will track his progress. Something like so, as seen in the Two Dots game:    Currently I plan on creating this using constraints and size classes. But I feel its too much of work for each screen size. I've set a background UIImageView and I place different circles, manually hardcoding the position. The curved path in my case is made of a texture. So I can't plot it using Bezier Curves either.  Is there an easier way to do it? Perhaps using SpriteKit or Cocos2D-x?


Clear recent created file names in WinSCP

I would like to know how to clear recent created file names that appearing in the dialogue box when creating a new file:  I tried a lot without success


The  of sabbatical doesn't match how I think of an academic sabbatical. What does it mean to go on academic sabbatical, and does it depend on the country?


I like to use my real name and photo on some Stack Exchange sites that are relevant to my career (e.g. Stack Overflow) but use a pseudonym on other Stack Exchange sites (such as Gaming). Partly, because I want that if possible employers Google my name they see relevant things for my career, not me commenting on games or that sort of stuff.  Right now if I go to a new SE site automatically a new account is created with my name. I can change the name and e-mail, but there is still a tab with my other accounts. Is there a way to hide this?   I found this question:  but that is only about CVs.


Suppose $ \alpha, \beta>0 $. Compute: $ \int_{0}^{\infty}\frac{\cos (\alpha x)-\cos (\beta x)}{x}dx $

Suppose $ \alpha, \beta>0 $. Compute:   $$ \int_{0}^{\infty}\frac{\cos (\alpha x)-\cos (\beta x)}{x}dx $$   Here is what I do: $$\begin{align} \int_{0}^{\infty}\frac{\cos (\alpha x)-\cos (\beta x)}{x}dx &= \int_{0}^{\infty}dx\int_{\alpha}^{\beta}\sin (yx)dy\\ &=\int_{\alpha}^{\beta}dy\int_{0}^{\infty}\sin(yx)dx\\ & \\ &   \qquad\text{let $ yx=u $}\\ & \\ &=\int_{\alpha}^{\beta}\frac{1}{y}dy\int_0^{\infty}\sin u du\\ &=\int_{\alpha}^{\beta}\frac{1}{y}dy\left( -\cos u|_{\infty}+\cos u|_0 \right)\\ &=\log\frac{\beta}{\alpha}(-\cos(\infty)+1)\\ &=\log\frac{\beta}{\alpha}-\cos(\infty)\log\frac{\beta}{\alpha} \end{align}$$  But $ \cos(\infty) $ does not exist right? Does it mean the integral actually diverse?  Edit: The question comes from   Who can point out my mistake in the above deduction?


Example of a non-surjective isometric mapping on a totally bounded metric space

This question originates from this terrific  by Qiaochu Yuan. For convenience, I copy it here.     Proposition: Any isometry[isometric mapping] $f : X \to X$ of a compact metric space is bijective.      Proof. $f$ is clearly injective. Suppose $f$ is not bijective. Then $f(X)$ is compact, so given $x \in X \setminus f(X)$ the distance   $\text{dist}(x, f(X))$ is positive. Pick $\epsilon < \text{dist}(x, > f(X))$. Let $N$ be the smallest positive integer for which $X$ admits   a cover by $N$ open sets of diameter less than $\epsilon$. No such set   containing $x$ can intersect $f(X)$, but by pulling back along $f$ it   follows that we can find a cover of $X$ by $N-1$ open sets of diameter   less than $\epsilon$; contradiction.   The answer assumes that there exist $x$ such that $\text{dist}(x, f(X))$ is positive, that is to say, $X\backslash f(X)$ has an non-empty interior. This assumption is true due to the fact that $X$ is compact and thus complete.   However, the rest of the proof does not rely on the fact that $X$ is compact. It's true that compactness implies the existence of a cover by $N<\infty$ open sets of diameter less than $\epsilon$, but the latter does not imply compactness. To ensure the existence of such a cover, we just need $X$ to be totally bounded, i.e. $\forall \epsilon,\exists a_1,\ldots,a_n\in X, X\subseteq \cup_{i=1}^nB(a_i,\epsilon)$.  So can anyone give a (counter)example, showing that if $X$ is not compact but is totally bounded, then $f$ can FAIL to be surjective?


Why Prolog and Lisp over cpp\C\C# for creating Artificial intelligence?

I saw That Prolog and Lisp are two languages that I should use if I want to create an Artificial intelligence software.  What so special with that both, that isn't with C++\C\C#? Its mean its more easier to create Artificial intelligence softwares with this? or there is really more functionality I can use for achieve my target, that with the others I have not.?


Convolutional Neural Network - how to ensure filters of same layer learn different features?

Reference:      To form a richer representation of the data, each hidden layer is   composed of multiple feature maps, $\{h^{(k)}, k=0..K\}$. The weights W   of a hidden layer can be represented in a 4D tensor containing   elements for every combination of destination feature map, source   feature map, source vertical position, and source horizontal position.   What I can't understand: let's say we slide 2 3-D filters across image, producing two feature maps.    How we can be sure, that parameters of our 2 filters won't move close to same value through backpropagation? So that we won't obtain from 3 channels (RGB) two channels, which are highly correlated?  And the more filters I want to introduce, the less obvious for me that some of them (at least) or many of them (in worst case) won't be basically similar vectors in weights space ($w_{1}, w_{2}, w_3 ... w_n .$)


Establish if the matrix $A\in M_3 (\Bbb{Z}_9)$  $$     \begin{bmatrix}     1 & 2 & 3 \\     2 & 3 & 0 \\     0 & 3 & 6     \end{bmatrix} $$  is invertible, and if so, find the inverse matrix.


Kolmogorov - Smirnov Test in Python Example

This is a very simple example, I'm simulating normally distributed data in Python, and performing a Kolmogorov - Smirnov Test on my sample to check the goodness-of-fit(of the sample distribution compared with a Normal distribution) Code: from matplotlib import pyplot as plt  import numpy as np  from scipy import stats  data = stats.norm.rvs(5, 10, size=1000)  plt.hist(data)  print(stats.kstest(data, 'norm'))   KstestResult(statistic=0.57991242997450898, pvalue=0.0)  However, the p-value I get is very small!-> which means I have to reject the Null hypothesis, and conclude that the sample does not follow the distribution. Could someone explain what I'm doing wrong here?


Why is the antiderivative of $\frac{1}{1+x^2}=\tan^{-1}(x)$?

My textbook says the antiderivative of $\frac{1}{1+x^2}$ is $\tan^{-1}(x)$.   To confirm this to myself I took the derivative of $\tan^{-1}(x)$ expecting to get $\frac{1}{1+x^2}$ , but instead I ended up with $-\frac{1}{\sin^2(x)}$. So why is $\tan^{-1}(x)$ the antiderivative of $\frac{1}{1+x^2}$ if the  derivative of $\tan^{-1}(x)$ is not $\frac{1}{1+x^2}$? Shouldn't the derivative of the antiderivative of a function give you the original function?


Problem with PostgreSQL/QGIS converting long/lat to suitable projection/SRID

I'm sure it's a simple question but this is all very new to me and after a lot of internet searching my points are still in the sea!  I have a set of UK postcode data that I have converted into latitude and longitude. I also have a UK counties shapefile.  The code that I have used to convert the latitude/longitude to a geometry point column is as follows:  ALTER TABLE colic ADD COLUMN longlat geometry(POINT,27700); update colic set longlat = st_setsrid(st_point( longitude, latitude), 27700);   And this produces a column that has values as follows (I've only included a couple!):     "0101000020346C000048BF7D1D3867E83FC05B2041F1334A40"   "0101000020346C0000F085C954C1A8F7BFA1F831E6AE954A40"   "0101000020346C000020D26F5F07CEF4BFE3361AC05B504A40"   "0101000020346C00007D3F355EBA49F73FB6847CD0B3614A40"   The .prj from my shapefile is:     PROJCS["British_National_Grid", GEOGCS["GCS_OSGB_1936",   DATUM["D_OSGB_1936", SPHEROID["Airy_1830",6377563.396,299.3249646]],   PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],   PROJECTION["Transverse_Mercator"],   PARAMETER["False_Easting",400000.0],   PARAMETER["False_Northing",-100000.0],   PARAMETER["Central_Meridian",-2.0],   PARAMETER["Scale_Factor",0.9996012717],   PARAMETER["Latitude_Of_Origin",49.0], UNIT["Meter",1.0]]   And I set its SRID to 27700 when I upload it using the PostGIS shapefile uploader.  In PG Admin, when I ask:  select st_srid(geom) from counties limit 1; select st_srid(longlat) from colic limit 1;   I get 27700 for both.  But... when I try any spatial query I get no response, and when I load the layers into QGIS, the point data are off the tip of Cornwall in the North Atlantic, and only represented as one dot on the scale of the counties map.    If I zoom in on them, they are 'there', but just not in East Anglia where they should be!    This is my first attempt at both SQL and mapping - I'm sure there is something really simple that I have missed but I would be so grateful if someone could help me.


I can not see the right-most vertical bar given the following code:  \documentclass{beamer} \usepackage{pgfplots} \usepackage{tikz} \usetikzlibrary{arrows,positioning}   \begin{document} \begin{frame} \begin{tikzpicture} \begin{axis}[ybar interval,ytick style={draw=none},title={Redisuals Magnitude},       xlabel={Iteration (k)},       ylabel={$\|\rho_{k}\|_{\infty}$},       yticklabels={,,},xticklabels={,,},ylabel style={rotate=-90},xmin=0, xmax=8] \addplot coordinates { (0, 10) (1, 5) (2, 2.5) (3, 1.25) (4, 0.625) (5, 0.3125) (6, 3)}; \end{axis} \end{tikzpicture} \end{frame} \end{document}   How is it possible? How can I fix it?


Does $f(0)=0$ and $\left|f^\prime(x)\right|\leq\left|f(x)\right|$ imply $f(x)=0$?

Let $f:\mathbb{R}\to\mathbb{R}$ be a function such that $f(0)=0$ for all real numbers $x$, $\left|f^\prime(x)\right|\leq\left|f(x)\right|$. Can $f$ be a function other than the constant zero function?   I coudn't find any other function satisfying the property. The bound on $f^\prime(x)$ may mean that $f(x)$ may not change too much but does it mean that $f$ is constant?  I thought for a while and found that $f^\prime(0)=0$ and by using mean value theorem, if $x\neq0$ then there's a real number $y$ between $0$ and $x$ such that $\left|f(x)\right|=\left|xf^\prime(y)\right|\leq\left|xf(y)\right|$. Anything further?


Could it be that Goldbach conjecture is undecidable?

The result closest to Goldbach conjecture is Chen's theorem [Sci. Sinica 16 157–176], the proposition ``1+2''. It is natural to ask if it is likely that under our arithmetic axioms the Goldbach conjecture is an undecidable proposition.