I'm fairly new all this, but I feel like I'm pretty close to making this work, I just need a little help! I want to create a DLL which can read and return the last line in a file that is open in another application. This is what my code looks like, I just don't know what to put in the while statement.  using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO;  namespace SharedAccess {     public class ReadShare {         static void Main(string path) {              FileStream stream = File.Open(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);             StreamReader reader = new StreamReader(stream);              while (!reader.EndOfStream)             {                 //What goes here?             }         }     } }

I need to process a large file, around 400K lines and 200 M. But sometimes I have to process from bottom up. How can I use iterator (yield return) here? Basically I don't like to load everything in memory. I know it is more efficient to use iterator in .NET.


Prove that in an ordered field $0\cdot x=0$ for every $x$.   I'm not sure how to go about proving something is true in an ordered field. What are the steps involved?

This is one of my first proofs about fields. Please feed back and criticise in every way (including style and details).  Let $(F, +, \cdot)$ be a field. Non-trivially, $\textit{associativity}$ implies that any parentheses are meaningless. Therefore, we will not use parentheses. Therefore, we will not use $\textit{associativity}$ explicitly.  By $\textit{identity element}$, $F \ne \emptyset$. Now, let $a \in F$. It remains to prove that $0a = 0$. \begin{equation*} \begin{split} 0a &=  0a +  0      && \quad \text{by }\textit{identity element }(+    ) \\    &=  0a +  a + -a && \quad \text{by }\textit{inverse element  }(+    ) \\    &=  0a + 1a + -a && \quad \text{by }\textit{identity element }(\cdot) \\    &= (0 + 1)a + -a && \quad \text{by }\textit{distributivity   }        \\    &= (1 + 0)a + -a && \quad \text{by }\textit{commutativity    }(+    ) \\    &=      1 a + -a && \quad \text{by }\textit{identity element }(+    ) \\    &=        a + -a && \quad \text{by }\textit{identity element }(\cdot) \\    &=  0            && \quad \text{by }\textit{inverse element  }(+    ) \end{split} \end{equation*} QED  PS: Is "Let $(F, +, \cdot)$ be a field." ok? Besides, I would not want to call $F$ a field, because $F$ is just a set. Also, what do you think about using adverbs like "Now"? How would you have said the associativity-thing?


Looking for a short story that takes place after the apocalypse/societal breakdown? Can’t remember much else about it except for the final scene. The protagonists find that the statues in the park/square? have had their heads removed and replaced with the carved heads of insects. I think they are being pursued as well.

This one, from the late 1950s or early 60s (I think), features the last girl in NYC, who drives her jeep up the stairs of the main library (with the lions). She feels bad about breaking the lock, but what's a girl to do, if she wants something to read? In summertime, she drives topless and, the author writes, her bosom dances enchantingly on the steps. She lives in the boathouse on the lake in Central Park. Mysterious insect-like aliens are eating the buildings in the City.... I didn't recognize a title in Budrys or Bester's isfdb bibliogs, so I may be wrong about the author. But not about the story details: it's a memorable one. Thanks in advance for helping ID this one!


I hold dual citizenship, Ghana and Mauritius. I currently reside in Ghana (departure country), and I am planning to travel to 3 countries in Southern Africa, Mozambique being the first port of entry. Although I will be departing from Ghana with my Ghanaian passport, I am planning to enter Mozambique (and the rest of the countries) using my Mauritian passport as it enjoys visa-free access to all 3 countries.  Given that the Mauritian passport will not have an exit stamp from Ghana, will immigration in Mozambique ask me why it doesn't have it? Will there be a complication entering on the Mauritian passport if I exited with the Ghanaian passport?

I am a citizen of two different countries, and have two passports.  How should I use my passports when traveling?


First I am not saying deep cloning one object to another.  I have one object:  var data1 = {                p1: values1,                p2: values2,                .....             };   value1 and value2 can be any data type, like object or array.  I have another object:  var data2 = {                p3: values3,                p4: values4,                .....             };   value3 and value4 can be any data type, like object or array.  Now I want to clone all data2's properties to data1.  The reason I want this is data1 is referenced, after data1's properties are changed I don't want to breake the reference.  If I do something like   data1 = clone(data2)   I will break the  reference.  Update:  What means by breaking the references:  var data1 = {              p1: value1           };  var data2 = {               p2: vale2           }; var ref = data1;   If I do:     data1 = clone(data2);     Now ref still point to the old data1, its value still be:  {    p1: value1 }   But I want ref be data2

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


I keep getting a false boolean value from the following comparison:  public boolean getHz1() {     return board[0][0] == board[0][1]             && board[0][1] == board[0][2]             && board[0][0] != null             && board[0][1] != null             && board[0][2] != null;  }   The relevant call in the driver class is:  do {         System.out.println("Your turn: ");         g1.play(s.nextInt(), s.nextInt(), s.next());         System.out.println(g1.getHz1()); } while (g1.getHz1() == false)   The "play" method takes 2 integers and a string value to put in the array, in this case "x".  When I print out the board[0][0], board[0][1] and board[0][2], all contain the string "x", but getHz1 still returns false.

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I'm guessing Newton, because of his integrals. But what proofs have been established, and which is the most mathematically intuitive one?  I was looking for the tag "circumference", supplied the newer synonym (in this field) perimeter. Apparently this tag is not related, since it was removed.  I will link the Wikipedia article on arc length from suggestions, even though I don't know if it fits; it certainly doesn't answer my question.    The proof is likely related to isoperimetry as per suggestion, but again I'm asking for proofs.    I heavily suspect any intuitive proof to not be analytic, since mine isn't. If someone made a simpler intuitive proof, I want to know it and who to credit; if someone made an analytic proof, I will use it as advanced course reference.

In this wikipedia, article  its stated that the circle is the closed curve which has the maximum area for a given arc length. First, of all, I would like to see different proofs, for this result. (If there are any elementary ones!)  One, interesting observation, which one can think while seeing this problem, is: How does one propose such type of problem? Does, anyone take all closed curves, and calculate their area to come this conclusion? I don't think that's the right intuition.


Is there a difference between a photo taken using GND filters or applying exposure blending in PP and the HDR technique?

I'd really like to stop blowing out the sky and/or underexposing the ground in my pictures. The traditional solution would be to use graduated ND filters, but taking multiple exposures and applying HDR postprocessing would also work (and some point-and-shoot cameras can even do that in-camera).  When should I use graduated ND filters, and when would HDR be a better bet? Or is it just a matter of personal preference?


I am trying to remember a movie I saw a long time ago, which I think was based on a book but impossible to find the title again on google.  A few elements I remember:   First I saw the movie on TV so it might have been straight to DVD, around 2005-ish The story starts with the main character has an accident/dies and wakes up in the water He reaches the shores and finds many other people just arrived as well It seems they reached like a vast empty alternate world, with no much human population so they wander around, kind of like prehistoric times They find some tribes of people who arrived previously in this alternate world and some of them are famous historical people, like Brutus or Caesar, but also more recent historical people  It seems like everyone ends up in this world after they die, but not in a heaven kind of way, more like alternate earth where everyone arrives around the same time The main story I dont remember but towards the end there is a huge blackish tower with some strangely advanced people (compared to the whole movie) inside who seem to control this world...and the movie kind of ends there.   For some reason, I seem to remember the title includes the words Tower or World but this I am completely unsure and my mind could be tricking me.  Do any of these details remind anyone of a specific book or movie?  Thanks a lot for your help.  Cheers

I am trying to find the name of a direct to TV movie, possibly a 2-3 part miniseries which I believe aired on the SciFi channel in the 90s. I don't remember who starred in it, but the movie opened with an astronaut attempting reentry whose shuttle ends up exploding. He awakes in a large bubble of air in a river and after reaching the surface and swimming to shore, meets several other people, from seemingly many different times throughout history (including one alien, who died on Earth).  Over the course of the movie, we learn the world is the afterlife, where everyone goes when they die. The major plot involves launching a steamboat (built by Mark Twain, no less) to travel up a river to the mountains, where the beings responsible for bringing everyone to this world are.  Does anyone know what the title of this movie/miniseries is?


Let $Y=(Y_1,Y_2)$ be a joint distribution with marginal distributions $Y_1$ and $Y_2$.  Let $X$ also be a random variable.  Is it the case that: $$\mathbf{Var}\left(\mathbf{E}(X|Y)\right)\geq\mathbf{Var}\left(\mathbf{E}(X|Y_1)\right)?$$ If so, how does one prove this?

$\textbf{Background:}$ When $\mathbb EX$ is hard to calculate, it is a common trick to use the following formula: $$\mathbb EX=\mathbb E[\mathbb E(X|Y)].$$ And similarly, $\mathbb VX$ can be calculated using the following formula: $$\mathbb VX=\mathbb E[\mathbb V(X|Y)]+\mathbb V[\mathbb E(X|Y)].$$ $\textbf{Question:}$ Recently, I saw similar formula for conditional expectation and variance as follows. $$\mathbb E(Y|X)=\mathbb E[\mathbb E(Y|X, Z)|X],$$ and $$\mathbb V(Y|X)=\mathbb E[\mathbb V(Y|X,Z)|X]+\mathbb V[\mathbb E(Y|X, Z)|X].$$ I do not know how to prove them. Could anyone provide some hint or reference, please? Thank you!


I have to call a program several times iterating a parameter. I would like to know if it is possible to run the for loop using multiple cores...  for ((par=4; par<=10 ; par++))  do     ./executeprog par  done   my attempt (using 7 cores):  seq 4 10 | parallel -j 7 --workdir $PWD ./executeprog {}

I have a list/queue of 200 commands that I need to run in a shell on a Linux server.   I only want to have a maximum of 10 processes running (from the queue) at once. Some processes will take a few seconds to complete, other processes will take much longer.   When a process finishes I want the next command to be "popped" from the queue and executed.  Does anyone have code to solve this problem?  Further elaboration:  There's 200 pieces of work that need to be done, in a queue of some sort. I want to have at most 10 pieces of work going on at once. When a thread finishes a piece of work it should ask the queue for the next piece of work. If there's no more work in the queue, the thread should die. When all the threads have died it means all the work has been done.  The actual problem I'm trying to solve is using imapsync to synchronize 200 mailboxes from an old mail server to a new mail server. Some users have large mailboxes and take a long time tto sync, others have very small mailboxes and sync quickly.


This is a Stanford Analysis qual question. Any hints\ solutions\ references are highly appreciated.  Let $\mu$ be the Lebesgue measure on $[0,1]$. For $1<p<\infty$ construct   a subspace of $L^p([0,1],\mu)$, which is not dense in $L^p$ but is dense in $L^r$ for all $r<p$. a subspace of $L^\infty([0,1],\mu)$ which is dense in $L^p$ but not in $L^s$ for any $s>p$   I find is interesting that such a thing would hold because:  For 1. by Holder's inequality, for $1\leq q<p\leq \infty$, we have $L^p \subset L^q$.  But of course, the norms are different so I guess what we need is a subspace $M$ closed in $L^p$ but dense in $L^r$ for $r<p$.  Any help will be appreciated. Thanks in advance

So studying Qualifying Exam problems in Analysis I cam across this one:  For $1\lt r \lt p \lt s \lt \infty$  where $\mu$ denotes Lebesgue measure,  a) Construct a subspace of $L^p([0,1],\mu)$  such that $ \forall r$ the subspace is dense in $L^r([0,1],\mu)$ but not $L^p$.     b) Construct a subspace of $L^\infty([0,1,\mu)$ such that $ \forall s$ the subspace is dense in $L^p$ but not $L^s$.    Now $L^s\subset L^p \subset L^r$ since $\mu([0,1])\lt\infty$, so the issue is recognizing the norms are not equivalent for this to be possible.  I'm just not terribly familiar with subspaces of $L^p$ for $p\neq2$.  Is this just a matter of better knowing $L^p$ spaces or is there something bigger that I'm missing?


It's a known problem, but the standard solution doesn't seem to work for me any more. You can see the problem and the usual solution here:    It helped me fix the problem on Ubuntu 14.04, but today I have updated to 14.10, and the viber icon is now back on the same spot, blocking the "x", and the solution posted in that post doesn't seem to work anymore. Has anyone managed to move the icon on 14.10?

Can I somehow put Viber notification  on top of the Unity panel (near Dropbox and others)?! It's pretty ugly to stay in top left corner...


I want to write an algorithm such that what I have attached, I am somehow elementary in writing algorithms with latex. I do not want the exact answer, only a tip or an example similar to what I have attached.

I want to write an algorithm in a table for my paper. I tried to write it, but I want to write ''While'' instead of ''for'' in this algorithm. How can I do it? And I want to put the table everywhere in the text.  \begin{algorithm}     \caption{ OMP Algorithm     }     \label{alg1}     \begin{latin}         \begin{algorithmic}[1]             \REQUIRE Decomposition of signal $x$             \STATE\textbf{Input:}  signal $x \in \mathcal{R}^{m}$, Dictionary $\mathcal{G} \in \mathcal{R}^{m \times n}$,$\hat{x}=\emptyset$              \STATE  \textbf{Output:}  Decomposed signal $\hat{x}_{est}$ after $k$ iteration, Residual $R^{(k)}$       \STATE \textbf{Initialization} $R^{(0)}=x$             \STATE \textbf{for i=1:k do}             \STATE $l=\displaystyle{arg\max_{l=1,\dots ,l} |\langle g_l,R^{(i)} \rangle|}$ \qquad finding the atom in dictionary $\mathcal{G}$ with maximum correlation with residual.             \STATE $R^{(i+1)}=R{(i)}-a_l g_l^{(i)}$             \STATE $\hat{x}=\hat{x}+\langle R^{(i)},g_{l}^{(i)} \rangle g_{l}^{(i)}$       \STATE \textbf{end}         \end{algorithmic}     \end{latin} \end{algorithm}


I am trying to place the input field at the center of the page, any help. So far i have only been able to center the contents horizontal, the vertical centering has failed. <!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>Document</title>     <style>         .container {            display: flex;            align-items: center;            justify-content: center;          }         input[type=text] {             margin: 0;         }          form {             border: 1px solid blue;         }     </style> </head> <body>     <div class="container">         <form action="">             <input type="text">         </form>     </div> </body> </html>

I want to center a div vertically with CSS. I don't want tables or JavaScript, but only pure CSS. I found some solutions, but all of them are missing Internet Explorer 6 support.
Div to be aligned vertically
   How can I center a div vertically in all major browsers, including Internet Explorer 6?


I think I have to proceed by contradiction, but I don't know how to do it. Any suggestion?  Thanks for your help.

I'm giving a seminar talk on the ideal class group, and am looking for an example of a fractional ideal that is not invertible. Does know of a simple example in say $k[x,y]$ or $\mathbb{Z}[\sqrt{-3}]$. Such examples must exist but computation there is very hard.   Thanks.


There is an easy way to show that the function $$\sin:\Bbb C\to\Bbb C,\quad z\mapsto \sin(z)\tag1$$  is surjective? My work so far: observe that  $$\sin(x+iy)=\sin(x)\cosh(y)+i\cos(x)\sinh(y)\tag2$$  Then its clear that $\sin$ is $2\pi$ periodic, as in the real case. Then it seems enough to restrict the study of $\sin$ to the domain $A:=[0,2\pi)\times[0,\infty)$ for $\Bbb C\ni z\equiv x+iy\in\Bbb R+i\Bbb R$.  However I can't see a clever (an elementary) way to show the surjectivity of $\sin|_A$. Some help will be appreciated.  EDIT: clearly $\sin(A)$ is connected because $\sin$ is continuous. Moreover: choosing $x_k=k\pi/2$ (for $k\in\Bbb Z$) we can see that $\Bbb R$ and $i\Bbb R$ are subsets of $\sin(A)$.

I am trying to solve the following two problems:  1) Prove that the functions $\cos(z)$, $\sin(z)$ are surjective over the complex numbers.  2) Find all $z \in \mathbb C$: $cos(z) \in \mathbb R$ and find all $z \in \mathbb C$: $\sin(z) \in \mathbb R$.  For 1),I've tried to prove it for the function $\cos(z)$ (I suppose the other one is analogue)  so I've used the fact that $\cos(z)=\dfrac{e^{iz}+e^{-iz}}{2}$.  Let $w \in \mathbb C$, I want to show there exists $z \in \mathbb C : f(z)=w$, i.e., $\dfrac{e^{iz}+e^{-iz}}{2}=w$, multiplying by $2$ and then by $e^{iz}$ yields $e^{2iz}+1=2we^{iz}$ iff $e^{2iz}-2we^{iz}+1=0$.   I don't know if this approach is the correct one but here I've replaced $e^{iz}$ by $x$, so the solutions of the equation would be the roots of the polynomial $p(x)=x^2-2wx+1$, by the quadratic formula, I get that $x \in \{\dfrac{2w+w_0}{2},\dfrac{2w-w_0}{2}\}$, where $w_0^2=4w^2-4$.  Then, $e^{iz} \in \{\dfrac{2w+w_0}{2},\dfrac{2w-w_0}{2}\}$. At this point I got lost, I would like to explicitly show that $z$ exists and I can't see existence directly from the fact that $e^{iz}=\dfrac{2w+w_0}{2}$ or $e^{iz}=\dfrac{2w-w_0}{2}$.  First I thought of taking logarithm of both sides of the equation ir order to solve for $z$, but this is not a legitimate operation unless $e^{iz} \in \mathbb R$.   I couldn't go any farther.  For point 2) I have no idea what to do, should I use the identity $\cos(z)=\dfrac{e^{iz}+e^{-iz}}{2}$?  I would appreciate some help with the two points (specially with point 2), at least in 1) I could do something).   Btw, Happy new year!


I created a new tag for C/AL (Client/Server Application Language for Microsoft Dynamics NAV), which was recently approved. However, I just noticed that I have a typo. I am unable to suggest a synonym since I have yet to score 5 in the tag.  Can someone please fix the typo (or suggest the synonym)? Tag can be found .  The word client has been mispelled (cllient).

During the re-tagging of questions, tags sometimes become orphaned from existing questions.  Are these zombie tags ever removed from the ?  What if a tag is misspelled and needs to be removed? How do we get rid of it?


How do I round a float number if it returns a whole value? And, how do I round if it's like: 5/2 = 2.5  and NOT like this: 5/2 = 2.50000000

What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations.  I also would like only significant digits to be displayed - i.e. there should not be any trailing zeroes.  I know one method of doing this is to use the String.format method:  String.format("%.5g%n", 0.912385);   returns:  0.91239   which is great, however it always displays numbers with 5 decimal places even if they are not significant:   String.format("%.5g%n", 0.912300);   returns:  0.91230   Another method is to use the DecimalFormatter:  DecimalFormat df = new DecimalFormat("#.#####"); df.format(0.912385);   returns:  0.91238   However as you can see this uses half-even rounding. That is it will round down if the previous digit is even. What I'd like is this:  0.912385 -> 0.91239 0.912300 -> 0.9123   What is the best way to achieve this in Java?


Let $f,f_1,f_2,\ldots\colon\mathbb{R}\rightarrow\mathbb{R}$ be continuous functions in $L^2(\mathbb{R})$. Suppose that $\|f_n-f\|_2\rightarrow 0$ as $n\rightarrow 0$. Is it true that $f_n(x)\rightarrow f(x)$ for almost every $x$?  Without the continuity assumption, I remember this is not true. But what about with continuity?

It is stated in my professor's notes that, given a sequence $\{f_j\}$ of  $C_0^\infty(\Omega)$ functions (infinitely differentiable with compact support), and a function $g\in C_0^\infty(\Omega)$, all defined in an open set $\Omega\in\mathbb{R}^n$:  $$\|f_j-g\|_{L_p(\Omega)}\to0\implies|f_j(x)-g(x)|\to0\,\forall x\in\Omega$$  I was not able to prove it, however. Searching on the Internet, I found many counterexamples to the statement that $L^p$-convergence implies pointwise convergence, but they do not deal with $C_0^\infty(\Omega)$ functions, so it may also be true. Can anyone point to a proof or a counterexample?


It was with disbelief that I noticed Chromium has decided to , a shortcut which has been established almost universally across all browsers for decades.   This really, really irritates me as I navigate 'back' probably hundreds of times a day and backspace is by far the quickest way to do it.  I'm aware there are other options such as clicking the back button, Right click-> Back or Alt+Left, but all seem a little awkward for something as simple as going back.   Is there any way to enable the shortcut? Preferably without an extension?

Since start of this summer, I think that Google removed the option of using backspace for returning to previous page or so.   I was wondering, if there exist any chance, of undo-ing this thing? Is there such thing that would help me, such as downgrading Chrome or using any additional add-ons or something such as this for getting this glorious function back?  It's nearly impossible for me to forget this shortcut (as old habits die hard, lol) and keep pressing it and later on using the mouse to go back.


I want to make a setup with command blocks that will, if you hold a specific item, elevate you 100 blocks. For example, when you hold an ender pearl named "Sky Orb", you would be teleported 100 blocks up each couple of seconds. I already have the necessary commands:  /scoreboard objectives add Holding dummy /scoreboard players set @a Holding 0 /scoreboard players set @a Holding 1 {SelectedItem:{id:"minecraft:ender_pearl",tag:{display:{Name:"Sky Orb"}}}} /tp @a[score_Holding_min=1] ~ ~100 ~    Basically, the main problem is the delay. You should only be teleported every 2 seconds or so. Does anyone know a setup for this?  (I'm using the 1.9 snapshots)

I found 11 questions like this on gamingSE already, but none of them have proper and up-to-date answers. So I'm creating this Q&A:  How do you either activate a command x seconds/minutes/hours/… in the future or every x seconds/minutes/… in a loop?  Repeating command blocks and ticking functions execute 20 times per second, redstone is  in many situations and most of the extremely fancy solutions, like falling blocks in cobwebs, have broken over time or are needlessly complicated.


Light is an electromagnetic radiation contrary to the law of electromagnetism that states that: an accelerated charge produce electromagnetic wave. Please explain.

How can light be called electromagnetic if it doesn't appear to be electric nor magnetic?  If I go out to the sunlight, magnets aren't affected (or don't seem to be).  And there is no transfer of electric charge/electrons (as there is in AC/DC current in space).   In particular, the  (which light is supposed to be composed of) have no electric charge (nor do they have ).   I'm looking for an explanation that can be appreciated by the average non-physicist Joe.


Im making a spleef mini-game map, and i want to give players already enchanted Shovels. I managed to find how to put restrictions on the shovels so they just break Snow, but I couldn't find how to put efficiency enchantments together /give @p diamond_shovel 1 0 {"minecraft:can_destroy":{"blocks":["snow"]}}  How do i modify this to enchant the shovels?

I'm used to creating Java Edition Minecraft maps, where NBT can be used to set many different block, item, and entity properties, like an item's CanPlaceOn/CanDestroy list, a chest's items, and more! To open my maps up to more players, I've started creating maps on Minecraft Bedrock Edition as well. But NBT is inaccessible from commands in BE, which I knew before, but didn't know how much of a problem I would have creating these complicated command chains. One of the things that I've always been doing is giving players items with custom item names, lores, enchantments, and other properties. But there is a problem. All this would have been done in NBT in Java Edition. In Bedrock, NBT is inaccessible from commands, meaning the commands I used in JE don't work. Are my dreams crushed?


I have seen   $$\int_0^\infty e^{-ix}x^{s-1} \ \mathrm{d}x = i^{-s}\Gamma(s)$$ in a few posts regarding Mellin tranforms or a few difficult integrals. How can we prove this equality? I assume it can only be proven by residue theory.

Can we find a closed form for this integral: $$\int_0^\infty e^{-ix} x^{\alpha -1} \mathrm{d}x$$  I am assuming it requires complex analysis and the use of Cauchy's residue theorem, but is there any elementary way other than complex analysis to evaluate this? I am not asking for a solution; a hint or guidance would not be overlooked. Thank you in advance!


If $f:X \to Y$ is a function and $U$ and $V$ are subsets of $X$, then $f(U\cap V) \subseteq f(U) \cap f(V) $.  I know that if this statement dealt with equality it would be false, but what about this? I have a feeling it is true since $\emptyset$ would be a subset of any set. Any proofs/guidance would be appreciated.

I am struggling to prove this map statement on sets.   The statement is:   Let $f:X \rightarrow Y$ be a map.   i) $\forall_{A,B \subset X}: f(A \cup B)=f(A) \cup f(B)$ ii) $\forall_{A,B \subset X}: f(A \cap B) \subset f(A) \cap f(B)$ iii) $f$ is injective $ \Longleftrightarrow$ $\forall_{A,B \subset X}: f(A \cap B)=f(A) \cap f(B)$  My problem is: I know how to operate on sets, I know how to operate on sets, but I don't know how and where to start the proof,  the biggest problem in mathematics, I think.   Thanks for help!


I tried to use vphantom{...} and overleaf does not take breaqn package, so I still have the question:  I have the following formula, but I get an error with it that I can't fix. What is wrong here really?   \begin{equation}  \begin{split}      \psi(x)=\sum_{j=1}^l\sum_{v=0}^{m_j-1}U_v(x,\mu)V_{m_j-1-v}(\psi,\mu)\left|_{\mu=\mu_j}\\      +\int_{-\infty}^{\infty}\frac{\sqrt{\mu}}{\pi\alpha(\sqrt{\mu})\alpha(-\sqrt{\mu})}\left\{e^+(x,\sqrt{\mu})e^+(\psi,-\sqrt{\mu})\\+e^-(x,\sqrt{\mu})e^-(\psi,\sqrt{-\mu})\right\}d\mu   \end{split}  \end{equation}   The preamble is:  \documentclass{article} \usepackage{hyperref} \usepackage{amssymb} \usepackage{MnSymbol} \usepackage[utf8]{inputenc} \usepackage{amsmath} \newcommand{\norm}[1]{\left\lVert#1\right\rVert} \newcommand{\R}{\mathbb{R}} \newcommand{\C}{\mathbb{C}} \newcommand\Setst[3][big]{\csname #1l\endcsname\{ #2 :    \begin{array}[t]{@{}l@{}}#3\csname #1r\endcsname \}\end{array}} \usepackage{amssymb} \usepackage{amsfonts} \usepackage{mathtools} \usepackage[mathscr]{euscript} \usepackage{mathrsfs} \usepackage{yfonts} \usepackage{setspace}     \doublespacing \usepackage{imakeidx} \makeindex[columns=1, title=Alphabetical Index]   \newcommand{\footremember}[2]{%     \footnote{#2}     \newcounter{#1}     \setcounter{#1}{\value{footnote}}% } \newcommand{\footrecall}[1]{%     \footnotemark[\value{#1}]%   and the comment by overleaf is:  Extra }, or forgotten \right. Missing \right. inserted. Missing } inserted. Extra \right. Missing { inserted.   Thanks

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


can someone please tell me how to download wine so that I can open exe. files.  Many Thanks, Dave.

Can .exe and .msi files (Windows software) be installed in Ubuntu?


What is the possible spin configuration of photon?  And does spin has any relation with polarization?

I understand how one associates the spin of a quantum particle, e.g. of a photon, with intrinsic angular momentum. And in electromagnetism I have always understood the polarization of an EM wave as the oscillations of the E and M field, not necessarily being  aligned with the direction of propagation of the wave.     Questions:   But when one talks about the polarization of a photon in Quantum Mechanics, how does it really differ from its spin?  Are they somehow related and what's the physical idea behind photon polarization in contrast to photon-spin? Feel free to use mathematical reasonings as well if you see it fit!


Want do some slides in my app.  In the activity the following code works fine, but in the fragments the app crashes and says something like:     java.lang.NullPointerException: Attempt to invoke virtual method 'void   android.support.v4.view.ViewPager.setAdapter(android.support.v4.view.PagerAdapter)'   on a null object reference How can I fix this?   JAVA      viewPager = (ViewPager) findViewById(R.id.viewPager);      sliderDotspanel = (LinearLayout) findViewById(R.id.SliderDots);      ViewPagerAdapter viewPagerAdapter = new ViewPagerAdapter(this);      viewPager.setAdapter(viewPagerAdapter); // HERE ERROR      dotscount = viewPagerAdapter.getCount();     dots = new ImageView[dotscount];      for(int i = 0; i < dotscount; i++){          dots[i] = new ImageView(this);         dots[i].setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), R.drawable.nonactive_dot));          LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);          params.setMargins(8, 0, 8, 0);          sliderDotspanel.addView(dots[i], params);      }   XML  <android.support.v4.view.ViewPager     android:id="@+id/viewPager"     android:layout_width="match_parent"     android:layout_height="0dp"     app:layout_constraintBottom_toBottomOf="parent"     app:layout_constraintTop_toBottomOf="@+id/view2" />

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


How can I force the ubuntu 16.04 to use all the cores to compile or make opencv 3?  I have found a website to change a cmake file called OpenCVFindLibsPerf.cmake, on this blog   But it did not work! Maybe because I have already TBB  Any idea?  thanks

Quick question: what is the compiler flag to allow g++ to spawn multiple instances of itself in order to compile large projects quicker (for example 4 source files at a time for a multi-core CPU)?


I compile the same tex using two commands:  latexmk --pvc --pdfps ./main.tex   and  latexmk --pvc --pdf ./main.tex   Then view both pdf files using evince, at the same scale (170%). The result using --pdfps (on the left) has heavier font that the result using --pdf (on the right):    Do you know why?  Update: Here comes a minimal example:  $ cat main.tex \documentclass{article}   \usepackage{amsthm} \usepackage{amsfonts} \usepackage{amsmath} \usepackage{amssymb}   \title{Compare}  \begin{document} \maketitle $$ a_\textit{ivanov} \wedge b_\mathit{sidorov} \rightarrow \text{petrov}^{2^{x}} $$  \end{document}   Running pdffonts gives:  $ pdffonts ./pdf.pdf name                                 type              encoding         emb sub uni object ID ------------------------------------ ----------------- ---------------- --- --- --- --------- JADGUW+CMR17                         Type 1            Builtin          yes yes no       4  0 GFYLUX+CMR12                         Type 1            Builtin          yes yes no       5  0 IEHANU+CMMI10                        Type 1            Builtin          yes yes no       6  0 WLJBIP+CMTI7                         Type 1            Builtin          yes yes no       7  0 GHNOGE+CMSY10                        Type 1            Builtin          yes yes no       8  0 UWWUVN+CMR10                         Type 1            Builtin          yes yes no       9  0 RKDUWA+CMR7                          Type 1            Builtin          yes yes no      10  0 EUVFVQ+CMMI5                         Type 1            Builtin          yes yes no      11  0  $ pdffonts ./ps.pdf name                                 type              encoding         emb sub uni object ID ------------------------------------ ----------------- ---------------- --- --- --- --------- RRWQTJ+CMMI5                         Type 1C           WinAnsi          yes yes no      22  0 EBFDMR+CMR7                          Type 1C           WinAnsi          yes yes no      20  0 AFJYHC+CMR10                         Type 1C           WinAnsi          yes yes no      18  0 ILWBCN+CMSY10                        Type 1C           Custom           yes yes no      16  0 OFQOVE+CMTI7                         Type 1C           WinAnsi          yes yes no      14  0 IEOASN+CMMI10                        Type 1C           WinAnsi          yes yes no      12  0 LWIAFV+CMR12                         Type 1C           WinAnsi          yes yes no      10  0 ZGILVG+CMR17                         Type 1C           WinAnsi          yes yes no       8  0   The --pdfps version uses Type 1C fonts, which may be the reason...

I noticed that there is a subtle difference of font rendering result between pdflatex and xelatex. xelatex tend to be slightly bolder compared to pdflatex. Even the file thumbnails in file manager look different (btw. I'm using Lubuntu linux).    I've tried using default font (Computer Modern) and Charter (\renewcommand*\rmdefault{bch}), they still look different.  % Computer Modern % Compiled using both PDFlatex and XeLaTeX % XeLaTeX result is slightly bolder  \documentclass[12pt]{article} \usepackage[a5paper, margin=20mm]{geometry} \usepackage{kantlipsum} \begin{document} \kant \end{document}   Computer Modern (PDFlatex):      Computer Modern (XeLaTeX):      Here's Charter...  % Charter font % Compiled using both PDFlatex and XeLaTeX % XeLaTeX result is slightly bolder  \documentclass[12pt]{article} \usepackage[a5paper, margin=20mm]{geometry} \usepackage{kantlipsum} \renewcommand*\rmdefault{bch} \begin{document} \kant \end{document}   Charter (PDFlatex):      Charter (XeLaTeX):      Do you have the same experience? Do you think it's normal? How to fix it? Thank you.  PS: screenshots are taken from Texmaker's PDF preview (75% magnification).  PS 2: I'm using Lubuntu linux, Texmaker, and default pdf viewer (Evince 3.10.3). I cannot compare using another OS.  UPDATE:  I tried another viewer, qpdfview (still under Lubuntu linux). The issue still persists. When viewed on an android tablet (using Acrobat and Google PDF viewer), they're just fine. There is no difference. So.. it is a viewer issue (as @Robert's commented below).  Here're screenshots of qpdfview...


I have these three files, main.cpp, DynamicArray.cpp, DynamicArray.h. In both cpp files I include DynamicArray.h and I get the following errors.  $ g++ main.cpp DynamicArray.cpp  /tmp/ccDGRYws.o: In function `testDynamicArray()': main.cpp:(.text+0x11): undefined reference to `DynamicArray<int>::DynamicArray()' main.cpp:(.text+0x1d): undefined reference to `DynamicArray<int>::DynamicArray()' main.cpp:(.text+0x39): undefined reference to `DynamicArray<int>::~DynamicArray()' main.cpp:(.text+0x5a): undefined reference to `DynamicArray<int>::add(int)' main.cpp:(.text+0x72): undefined reference to `DynamicArray<int>::size()' main.cpp:(.text+0xb8): undefined reference to `DynamicArray<int>::~DynamicArray()' main.cpp:(.text+0xc9): undefined reference to `DynamicArray<int>::~DynamicArray()' collect2: error: ld returned 1 exit status   When I change the DynamicArray.h in  main.cpp to DynamicArray.cpp it works fine. Why is it not working with the .h?  main.cpp  #include <iostream> #include <assert.h>  #include "DynamicArray.h"  void testDynamicArray(){      DynamicArray<int> array1;     array1 = DynamicArray<int>();      int initialSize = 10;        for (int i = 0; i < initialSize; i++) {         array1.add(i);     }      assert(array1.size() == initialSize);      std::cout << "All tests for DynamicArray pass." << std::endl; }    int main(){     testDynamicArray(); }   DynamicArray.cpp  #include "DynamicArray.h" #include <iostream>  template <typename T> DynamicArray<T>::DynamicArray(){     numElements = 0;     arraySize = 10;     theArray = new T[arraySize]; }  template <typename T> DynamicArray<T>::~DynamicArray(){     delete[] theArray;     }  template <typename T> int DynamicArray<T>::size(){     return numElements; }  template <typename T> bool DynamicArray<T>::isEmpty(){     return (numElements == 0); }  template <typename T> void DynamicArray<T>::increaseSize(){         T* tempArray = new T[arraySize * 2];          for(int i = 0; i <= numElements; i++) {             tempArray[i] = theArray[i];         }          delete[] theArray;         theArray = tempArray;          arraySize *= 2; }  template <typename T> void DynamicArray<T>::insert(T newElement, int index){     if (numElements == arraySize) {         increaseSize();     }      for (int i = numElements; i >= index ; i--) {         theArray[i] = theArray[i-1];     }      theArray[index] = newElement;     numElements++; }  template <typename T> void DynamicArray<T>::add(T newElement){     if(numElements == arraySize)         increaseSize();      theArray[numElements] = newElement;      numElements++; }  template <typename T> T DynamicArray<T>::get(int index){     return theArray[index]; }  template <typename T> bool DynamicArray<T>::deleteIndex(int index){      if(index < 0 || index >= numElements)         return false;      for (int i = index; i < numElements-1; i++)      {         theArray[i] = theArray[i+1];     }      numElements--;      return true; }   DynamicArray.h  #ifndef DYNAMICARRAY #define DYNAMICARRAY  template <typename T> class DynamicArray{     private:     T* theArray;     int numElements;     int arraySize;     void increaseSize();      public:     DynamicArray();     ~DynamicArray();     int size();     bool isEmpty();     void insert(T newElement, int index);     void add(T newElement);     bool deleteIndex(int index);     T get(int index); };  #endif

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


I'm pretty new to java. I'm getting java.lang.NullPointerException error when trying to run my servlet on the server. Can someone advise what the problem is the way I have called getAllStaff?  static StaffDAO dao = new StaffDAO(); static ArrayList<Staff> staffList = null;  public void doGet(HttpServletRequest request,         HttpServletResponse response)                 throws ServletException, IOException {      staffList = dao.getAllStaff();      request.setAttribute("staff", staffList);


In , I encountered this sentence:     Fortunately, no such fate awaits Americans should the federal government shut down on October 1st.   I cannot understand how the two complete clauses — no such fate awaits Americans and *should the federal government shut down on October 1st — made up this sentence.   Is should a conjunction meaning while?

I saw a sentence like this:     Wilkinson is contesting the release, and threatened to sue should it be released.   I could understand it but do you know what do they call this kind of use of "should" in grammar?


I'm having trouble conceptually understanding the fact that the insert and get operations have an amortized running time of O(1) in Java's Hashmap (simplified to a hash table). Note that in my example the table is created at maximum capacity, meaning it will only need to be expanded one time, when the load factor of 75% is met. Get will also never be called on an invalid target.  Amortized running time is calculated via O(total cost)/operation count.    For insert, an element is added to the bucket corresponding to a particular slot in the hash table. As the newest value is always added to the end of the bucket, the values for this are:   Total cost = find bucket + place at end of bucket, all O(1) time Number of operations = find bucket + place at end of bucket Therefore, Amortized Running Time = (find bucket + place at end of bucket)/(find bucket + place at end of bucket), or O(1)   The only aspect that confuses me here is if the added element places the table over its load factor, resizing it. What steps would Java perform here, and why would it remain O(1) Amortized Running Time?    For get, the time to find a bucket is constant, and finding a match could take anywhere from 1 operation (target is the first value in the bucket) to n operations (all entries are in the same bucket and the target is at the bottom). In this case:   Total cost = find bucket + number of steps to find target in bucket, all 1 time unit Number of operations = find bucket + number of steps to find target in bucket Therefore, Amortized Running Time = (find bucket + number of steps to find target in bucket)/(find bucket + number of steps to find target in bucket), or O(1)     This is my attempt to apply the amortization thought process to these operations, but as I'm fairly new to the concept, I'm not sure whether my logic is correct, and was hoping to get some feedback as to whether a) I'm right or b) where I'm going wrong. Any help is appreciated.

What is meant by "Constant Amortized Time" when talking about time complexity of an algorithm?


How can I prove that $\sqrt{2}$ is irrational with the ideal $$\{n \in \mathbb{Z} \mid n\times \sqrt{2} \in \mathbb Z\}?$$

This is a problem from "" (specifically, exercise set 2 #9), which is one of my math texts. Please note that this isn't homework, but I would still appreciate hints rather than a complete answer.  The problem reads as follows:     If 3p2 = q2, where $p,q \in \mathbb{Z}$, show that 3 is a common divisor of p and q.   I am able to show that 3 divides q, simply by rearranging for p2 and showing that  $$p^2 \in \mathbb{Z} \Rightarrow q^2/3 \in \mathbb{Z} \Rightarrow 3|q$$  However, I'm not sure how to show that 3 divides p.    Edit:  Moron left a comment below in which I was prompted to apply the solution to this question as a proof of $\sqrt{3}$'s irrationality. Here's what I came up with...  [incorrect solution...]  ...is this correct?  Edit:  The correct solution is provided in the comments below by Bill Dubuque.


I would imagine this is a fairly common situation, but I haven't found it discussed:   I vote to close a question as a duplicate of a specific other question. The asker edits the question so that it's no longer a duplicate of the question I chose. I retract my vote. The edited question is a duplicate of a different question. I can't vote to close because I already voted and retracted.   If I know right away that the edited question is a duplicate of a different question, how can I switch the question that it's a duplicate of without retracting my vote?  There should be a way to this because otherwise I have to keep my vote for a question that the current question is not a duplicate of, or I have to retract my vote and lose the ability to vote that the question really is a duplicate (of some other question).   Is there a way to do this, and if not can we create a way to do it?  Example from today:  I voted to close  on Mi Yodeya as a duplicate. The question was then edited and I retracted my close vote. In the  (I can't guarantee how long it will still be there) I pointed out that it might be a duplicate of a different question, but I was unable to cast a close vote.

tl;dr Users that have retracted a close vote should be able to vote again on that same question. I don't believe there is any danger in allowing this, provided some controls are in place (see below). Long Version As a 3k+ user, I want to look at a question at any point in time and determine whether it belongs on this site and, if not, state exactly why it doesn't in a close vote. People who write questions are free to edit them at any time. As a result, close votes can become invalid and the new  was introduced as a response to this. While I welcome the new feature, I wonder why we have stuck with the "you can only vote once" paradigm. If I'm monitoring a question to the extent that I withdraw my close vote, why shouldn't I be allowed to vote again if subsequent edits render the question unsuitable? I propose that if you retract your close vote on a question, you should be allowed to vote again. Note that by implementing this feature, one would also be able to change a close vote (by retracting and then selecting a different close reason). To combat willy-nilly vote changing (which may confuse other users), I propose one of the following defences:  An edit must occur between retraction and re-voting. This ensures something has changed in order to make the user want to vote to close again.  A time limit ensures that X minutes must pass between retraction and re-voting.  No specific restrictions are enforced, but the reputation required to re-vote is raised to something higher than 3k. The idea being that more experienced close voters are unlikely to change close reasons lightly. Perhaps this could be a tantalising rep target at 7.5k (to fill the void between 5-10k).   A  was asked previously, but I'm hoping some of my defences listed above will negate the fears listed in the accepted answer. Example Use Case #1 A poor question is raised and the OP receives several close votes and comments. Being a good user, the OP then adjusts the question to meet the quality standards of the site. One or more close-voters retract their vote now that the question is good enough. But wait! A duplicate has now been found, which wasn't spotted originally due to the poor quality of the question. None of the retracting close-voters can vote to close as a duplicate and are forced to leave a comment. Hopefully passing 3K+ users will spot the comment and act accordingly, but unnecessary time is wasted. This question should be on the close queue and heading for death. Example Use Case #2 Commonly on Stack Overflow, a user will present insufficient information to diagnose a problem. Perhaps their code example doesn't compile or they haven't provided definitions of all the referenced methods. I will leave a comment to indicate this and, after a small grace period, will vote to close with "This question appears to be off-topic because it lacks sufficient information to diagnose the problem.". If the user edits their question and adds the info, I retract my close vote. But I often realise the question should be closed for another reason, e.g. a duplicate or the new(ish) reason: "This question was caused by a problem that can no longer be reproduced or a simple typographical error.". Example Use Case #3 Perhaps the most common: you find a reasonable duplicate and vote to close. But then... you find the most wonderful, exact duplicate you could imagine. Too late, your vote is cast. You can retract it, but you can't then easily kick the ball rolling on a new closure with the real duplicate. Sure, a comment might cause things to start, but often it doesn't. Flagging for diamond attention isn't appropriate. This can also happen when the OP refutes the original duplicate and provides some extra information that steers you towards a related but different duplicate.


Is there an updated list of current laptops which have been found to work well under Ubuntu (other than the common "n best linux laptops of YYYY" articles)?  There appears to be a page for  but laptops are not among the categories of hardware listed.

I am buying a new desktop PC in early 2013, anyway this question should apply to someone intending to buy a new laptop/ultrabook as well.  This machine is not meant for gaming, and if I ocasionally do it, I can survive with minimum graphics. However I may need some heavy multimedia edition or multitasking at times, so basically  my greatest priority is a good processor, after that perhaps average graphic card (if onboards are not enough, I am still not informed enough about that), at least 4GB of RAM with possibility of expansion.  I know there are some PC models specially designed to ship with Ubuntu, which is the OS I use the most these days. However, most people around me use Windows and some software with unsupported versions for Linux and not having a Windows license becomes a bit problematic.  Given that, I would like to find information about which PC models or even manufacters currently on the market have the best compatibility with Ubuntu, I am still undecided between building my own desktop or buying a pre-made model, so I would like to find information both for certified models and certified hardware or even Ubuntu partners that may work closely with Canonical.  Where to find this information in order to make sure that I will have a good experience with Ubuntu on my new PC in the years to come?


I have a folder with multiple sub-folders and files. They are all similar in name but the only difference is the patient's number  Example  Analysis/Patient_01/Brain/image_patient_01_merged.nii Analysis/Patient_02/Brain/image_patient_02_merged.nii Analysis/Patient_03/Brain/image_patient_03_merged.nii . . .   and so on.  In the main folder (Analysis) I want to make a script to do the same thing for each .nii file in a loop.  example   fslstats image_patient_01_merged.nii -M fslstats image_patient_02_merged.nii -M fslstats image_patient_03_merged.nii -M . . . .   In other words, I need to do the same analysis on the nii files in each subdirectory.

How do I work recursively through a directory tree and execute a specific command on each file, and output the path, filename, extension, filesize and some other specific text to a single file in bash.


Hi I use FileZilla to transfer files to the server via FTP.  I connected to FileZilla from my computer months ago. I entered the server address, port & administration password on to the startup window of the software & checked the "Always connect to this server" option ON. So, every time I start FileZilla, It connects to my server automatically & I never had to remember my credentials.  I know it's in the software itself..somewhere...like in a cache memory or something. I need to get those details. How can I take those credentials from the FileZilla client installed in my desktop pc.? Is it even possible?  Here's an image.


(1) $ \forall x ( P(x) \lor  Q(x))  \iff     \forall x (P(x)) \lor \forall x (Q(x) )     $, is this the same as writing $ \forall x ( P(x) \lor  Q(x))  \equiv     \forall x (P(x)) \lor \forall x (Q(x) $ ? As the truth table for iff requires both sides to evaluate to true or both sides to evaluate to false, in order for the statement to be true? (2) I cannot convince myself that the above iff statement is false, I tried this counter-example: Let the domain of discourse be {2}, P(x) = x is even, Q(x) = x is odd. Then wouldn't both sides of the iff statement evaluate to true, since P(x) is true, Q(x) is false, then $P(x) \lor Q(x)$ is true?. I am not exactly sure how the scope of the quantifier affects the truth values of the predicates? Would appreciate any help to clear this doubt, thanks!

I have to prove if the following statement is true or false $$\forall x : (P(x) \lor Q(x)) \Leftrightarrow \forall x : P(x) \lor \forall x : Q(x)$$  I understand the first statement as, for every $x$, at least one of the functions $P$, $Q$ is true. For the second statement, at least one of the functions $P$, $Q$ is true for every $x$. Is this correct? When yes, how could I prove this? Using the distributive law will clearly render me the wrong result.


I have added a document in a document library. I am trying to hide an option from ECB Menu     How do you hide any options from ECB Menu?  Update: Each item has a column "x" with different values. So, depending on those values, I would like to hide/show various ECB Menu options. To be clearer, item1 may show "Custom ECB option" whereas item2 may not show "Custom ECB option".

I am currently trying to write javascript within a script editor to hide the 'View Properties' and 'Edit Properties' items in the ECB.  I have found many solutions that edit the core.js file. However, that is not preferable for me as there are multiple sites adn this is not for every site and every library. Eventually this will be applied to a certain library but right now I would just like this to work in general before I worry about that.  I have tried removing the item when the menu is loaded using the below javascript. Where #mp6_0_3 is the id of the 'Edit Properties' menu item.  <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"> </script>   <script language="javascript" type="text/javascript">  $(document).ready(function() {     $('.ms-core-menu-list').live('mouseover', function() {         $('#mp6_0_3').parent().hide();         $('#mp6_0_3').remove();            }); }); </script>


I have an application from where I suppose to run another console based exe and read the output of that console application? Assume the console application is third party exe which writing it using printf.

How do I launch an app and capture the output via stdout and maybe stderr?  I am writing an automated build system and I need to capture the output to analyze. I'd like to update the svn repo and grab the revision number so I can move the files in autobuild/revNumber/ if successful. I also would like to build using make and upload the compile text to my server for everyone to see the warnings and errors on a failed build.  I can't find the system() function, but I found the CreateProcess() function on MSDN. I am able to launch what I need but I have no idea how to capture the stderr and stdout.  I notice the process launches separately unless I set a breakpoint and keep my app exiting which it then will keep all the text in my app console window. I would also want to wait until all processes are finished and then scan the data it produced to do any additional operations I need. How do I do any of this?


This is my preamble:  \documentclass{beamer} \usetheme{CambridgeUS} \usepackage{graphicx,mathabx}  \begin{document}  \begin{frame} \titlepage \frametitle{}  \end{frame}  \begin{frame} \frametitle{Main Results} \framesubtitle{Graphical Analysis} \begin{figure}[h!] \centering\includegraphics[width=0.6\textwidth] {example-image} \caption{Effect of increasing $\widecheck{G}$, and decreasing $\widehat{G}$ on $x^*$} \end{figure} \end{frame}  \begin{frame} \frametitle{Appendices} \framesubtitle{Appendix 2} \begin{table}[htbp] \caption{Parametric values} \begin{center} \begin{tabular}{|c|c|c|}\hline Parameter & Value\\\hline $\alpha$ & 0.6\\ $\beta$ & 0.5\\ $\widehat{G}$ & 90\\ $\widecheck{G}$ & 50\\ $\bar{P}$ & 10\\\hline \end{tabular} \end{center} \end{table} \end{frame}  \end{document}   I want to number my figures and tables, such as "Figure 1: The title", "Table 1: Title". Right now, I have just "Figure:" and "Table:". This is for all the figures and tables, and they're not numbered. Also, I want the colons included.

I am giving a presentation and therefore I am using the  class. I have included some figures and it works, but there is no number after "Figure".  My code:  \documentclass{beamer}  \usepackage{graphicx} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage[english]{babel} \usepackage{listings} \usepackage{xcolor} \usepackage{eso-pic} \usepackage{mathrsfs} \usepackage{url} \usepackage{amssymb} \usepackage{amsmath} \usepackage{multirow} \usepackage{hyperref} \usepackage{booktabs} \usepackage{wallpaper} \usepackage{bbm} \usepackage{cooltooltips} \usepackage{eso-pic} \usepackage{everyshi} \usepackage{calc} \usepackage{graphicx} \usepackage{ifthen} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{animate} \usepackage[singlespacing]{setspace} \usepackage[absolute,overlay]{textpos} \usepackage{enumerate} \usepackage{hyperref} \newenvironment{changemargin}[2]{%   \begin{list}{}{%     \setlength{\topsep}{0pt}%     \setlength{\leftmargin}{#1}%     \setlength{\rightmargin}{#2}%     \setlength{\listparindent}{\parindent}%     \setlength{\itemindent}{\parindent}%     \setlength{\parsep}{\parskip}%   }%   \item[]}{\end{list}}  \setbeamercolor{frametitle}{fg=red,bg=white}  \hypersetup{pdfpagemode=FullScreen} \renewcommand*{\UrlFont}{\normalfont}  \usetheme{Goettingen} \useinnertheme{circles} \beamertemplatenavigationsymbolsempty  \setbeamerfont{page number in head/foot}{size=\large} \setbeamertemplate{footline}[frame number]   %%% \begin{document}  \frame[plain]{ \titlepage }  \setbeamertemplate{background canvas}[default]  \frame{ \frametitle{}  \begin{figure} \begin{center} \includegraphics[scale=0.2]{varweakness} \caption{VaR as a quantile} \end{center} \end{figure}  }   \end{document}   Which gives the following frame with the figure:    (I am not sure what is causing the problem, therefore I did not delete any package.)  How can I get a number, e.g. Figure 1:?


desktop I am currently running 18.04 on a hdd, i wish to install a new ssd and clean install of 20.04 onto it and keep the hdd with 18.04  how should i config the ssd and on which drive should grub be installed?  thanks

I am going to be buying a second hard drive for my desktop here pretty soon, because my current hard drive is a piece of junk running windows 7. What I want to know is how to install Ubuntu on the second drive. I am looking for a non complicated answer as I am not familiar with the Ubuntu lingo. I am so sick of Windows.. I used Ubuntu before but it didn't work properly. When I installed it, it said I didn't have enough space... Even though I had 600GB to use. Anyway if anyone can help me out it would be much appreciated. Thanks


Prove, formally that: $\log_2 n! \ge n$ for all integers $n>3$.   Hint: first prove that $n! ≥2^n$, for all integers $n >3$.  So far what I have:   Base case, $n = 4$,  $4! = 24$  $2^4 = 16$.  Therefore, it is true when $n = 4$.  So how do I proceed from here?  I know I can log the whole equation which will lead to $\log_2 n!$ and $n$. But the linkage seems to be missing. Sorry for the untidiness about the math symbols. I am trying to input them correctly but apparently I am not doing it right.

Possible Duplicate:          Prove by induction that $n!>2^n$ for all integers $n\ge4$.  I know that I have to start from the basic step, which is to confirm the above for $n=4$, being $4!>2^4$, which equals to $24>16$.  How do I continue though. I do not know how to develop the next step.  Thank you.


If one has an account on any of the SE sites (Stack Overflow, Super User etc.), in order to delete their account, they can do so from their profile page. Numerous similar questions have been asked and answerers are always directed to this page:    However, even after one has deleted all their accounts and one is not a participant of any of the communities, one continues to be logged in when they visit www.stackexchange.com. Now, if one clicks on any of the communities (Stack Overflow, Meta etc.), they are first asked to join. But how does one delete their master account, so that instead of being asked to join, they are first asked to log in?

How can I delete my Stack Exchange account(s)? Also,  What happens to my content? Can I request it be deleted as well? What if I'm suspended, rate-limited, or banned from posting questions or answers? What will happen to my votes? Will other users be impacted? Why wasn't my account deleted immediately after the timer expiring? What will happen to my pending bounties and close, reopen, delete, or undelete votes? I want my account deleted on all Stack Exchange sites. How do I do this? Will my profile on chat be removed once I delete my site account?   For more information, see "" in the .


I need a script that counts the number of .zip (zip files ends with monday_abc.zip) files in a folder on windows 2008 server.  Is it also possible to find the last modified zip files and the number of files in the last modified zip file ?

How can use dir command to check how many .txt files there are in a folder (for example,  C:\Temp\)?


I want to implement multiple jQuery plugins for a small application. I have the list of plugins names and the plugins. How can I call a plugin having its name stored in a variable? So, instead of this: $("div#exercise-container").demo_plugin_for_exercise1();  $("div#exercise-container").demo_plugin_for_exercise2();  I want to have a var plugin_name = "demo_plugin_for_exercise1";  and use it to call the plugin with that name.

I have the name of a function in JavaScript as a string. How do I convert that into a function pointer so I can call it later?  Depending on the circumstances, I may need to pass various arguments into the method too.  Some of the functions may take the form of namespace.namespace.function(args[...]).


I have a  that notify me when some thing is modified on a directory.  I need to make indicator that takes over the notifications instead of pop up at my screen. I want the notifications to be displayed using this indicator.  So basically the question is devided into two parts:   How to make my own indicator? How to redirect the notifications to be displayed on the indicator?   Using Ubuntu 12.04

I'm interested in Unity indicators and wonder if there is any tutorial on how to program them. I can use the sources of the existing ones as last resort, but I'd prefer a more friendly approach because my programming skills are quite limited.


I am trying to print out names with their associated information. I want their age, salary, insurance, etc. I am trying to use a for loop to accomplish this, but I'm obviously missing something. I also don't want it to total the ages, I want it individually. I just can't find a way to print all of my information.  public static double printArray(int[] noclue, String[] name, double[] age, double[] salary, double[] insurance, double[] expense, double[] savings)  {     int total = 0;     String names = "";          for (int i = 0; i < noclue.length; i++)     {              total = total + noclue[i]           names = name[i];              } return total; return names; }    }   In the main:  System.out.println(array.printArray(noclue, name, age, salary,insurance, expenses, savings));

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


I'm working with  and I'm wondering if it's rather a library than a framework, the author himself describes SlateJS as:      A completely customizable framework for building rich text editors   Okay so it's a library at the end ? ReactJS is also a completely customizable creator of web application in a some point of view _  Just to review theses concepts,  any hint would be great, thanks

What is the difference between a framework and a library?   I always thought of a library as a set of objects and functions that focuses on solving a particular problem or a specific area of application development (i.e. database access); and a framework on the other hand as a collection of libraries centered on a particular methodology (i.e. MVC) and which covers all areas of application development.


See the below image (I'm not allowed to embedd the image yet). The reading before this exercise in my course gives the proof for the following corollary: Every Pythagorean triple is similar to one arising from the Babylonian method.

I have been reading about Pythagorean triples from the wiki page link .  It says that a pythagorean triple consists of 3 positive integer's $ a, b, c $ such that $ a^2 + b^2 = c^2 $.  Also if all the integers in a triple say $ a, b, c $ are relatively prime then the triplet is called Primitive Pythagorean triplet.  As I was reading more in this article it also described about generating  triple using Euclid's formula.  the formula is as follows :  $ a = m^2 - n^2, b = 2mn, c = m^2 + n^2 $ where $ m > n > 0 $  for any 2 values of $m$ and $n$ the above formula will give a Pythagorean Triple.  To get a Primitive Pythagorean triple, $m$ and $n$ have to co-prime and not both odd.  I wanted to understand the proof of this formula.  I don't understand this part of the proof which is also given in the wiki page.  "As ${{\tfrac {m}{n}}}$ is fully reduced, m and n are coprime, and they cannot both be even. If they were both odd, the numerator of ${\displaystyle {\tfrac {m^{2}-n^{2}}{2mn}}}$ would be a multiple of 4 (because an odd square is congruent to 1 modulo 4), and the denominator 2mn would not be a multiple of 4. Since 4 would be the minimum possible even factor in the numerator and 2 would be the maximum possible even factor in the denominator, this would imply a to be even despite defining it as odd. Thus one of m and n is odd and the other is even, and the numerators of the two fractions with denominator 2mn are odd. Thus these fractions are fully reduced (an odd prime dividing this denominator divides one of m and n but not the other; thus it does not divide m2 ± n2). One may thus equate numerators with numerators and denominators with denominators, giving Euclid's formula"


We've been discussing it for a while where I work and we didn't find an answer:  Does declaring a function like this:  function myFunction(){   //... }   Made a difference on the performances than doing it like this:  var func = function myFunction(){   //... }   If not, where is the difference ?

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


My friend and I want to connect to the same Minecraft: Pocket Edition world. She wants to connect to one of my worlds, however every time we try get on the same world my game won't show up on her screen.  She can't get on my world I can get on one of hers.  We're both on the same Wi-Fi. I've tried searching for fixes to this problem however I can't find it useful answer.  I have an Android device and she has an Apple device.

My friend has a Galaxy Nexus and I just got an HTC One X, and we both have the newest version of Minecraft Pocket Edition.   We want to play on a server together (we will be sitting right next to each other), but when I opened the game and made it visible (I was connected to the local WiFi network and he was connected to the same one), he couldn't access it, and vice-versa when he tried to host.   Am I missing a step or do we have to be over the data network? Does the game host phone have to be running as a mobile hotspot?


I need a compatible version of Ubuntu for my computer that has only 248 MB of RAM. Would it be possible to remove Windows XP?

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


I'm mathematician so I don't know much about thermodynamics, so I'm sure what I'm asking should be really dumb for a physicist, anyway... Gravitational force acts creating hierarchical structures, like in the solar system. This structures are quite ordered and in a special configuration in relation to casual distribution of matter. So what I'm asking is: how the entropy of the solar system (or other gravitational systems) can be thought increasing instead of decreasing?  Thanks in advance!  Edit: I'm interested in locally increasing or decreasing, I'm sure that if I balance the whole Universe it will result an entropy positively increasing.

On John Baez's website, , he discusses the problem of how entropy increases when a cloud of ideal gas collapses gravitationally (no black holes - keeping it simple).  But he doesn't give away the answer - instead he implies that, I presume, either gravitons or photons are released during collapse and these increase the overall system entropy.  Can someone please answer which it is, gravitons or photons?  If gravitons (or gravity waves), then does this mean that pre-20th century physicists, with no notion of gravity waves, would have concluded that gravitational attraction violates the 2nd law?  And if photons, then what about if the gas particles were totally neutral - wouldn't they not emit any EM radiation in that case?  Or am I wrong that gravitons or photons are the answer? Thanks!


In Jonathan Coulton's "Sticking It To Myself," the first word or phrase in one line (bolded) often also serves as the last word in the next line without repetition:  And I heard everything you said Those things to try to get inside my head Is full ...   Sticking it to my- Self-control That's not the only thing I lack A plan Just my own gun against my Back down now and let this hostage Go away  This is as opposed to the chorus of The Wanted's "Glad You Came," which does something similar but repeats the word on the next line:  Turn the lights out now Now I'll take you by the hand Hand you another drink Drink it if you can Can you spend a little time? Time is slipping away Away from us, so stay Stay with me, I can make Make you glad you came  What The Wanted's "Glad You Came" does by repeating the last words of one line in the start of the next line is called anadiplosis, but the name of the rhetorical scheme or literary device I'm seeking is that of the first example where the words at the end of one line are not repeated but instead themselves become the words that start the next line. Is there a name for this rhetorical scheme or literary device? If so, what is it?

Is there a name for when one phrase ends with a word that starts the next phrase. For instance:     life is a peach and cream   Or     sunscreen in the eye for detail   Or (from Dave Eggers' Heartbreaking Work of Staggering Genius)     JFKFC


I have a 1 TB HDD and a 120 GB SSD. On the HDD I have all my data along with Steam and—currently—all my games. On the SSD I have Windows 7 and programs, but there's 50 GB of unused space that I wish to use for the games I most commonly play on Steam (for quicker loading times, etc).  To summarize, I want to have this situation:   120GB SSD (C:\): Windows, programs, and a few Steam games. 1TB HDD (D:\): data, Steam, and most games.   Is this possible? If not, what other choices do I have to do something similar?

I want to build a new PC with a smallish SSD.  I'd like to be able to install some of my games onto the drive (those I care about loading quickly or I play frequently), but have the rest of them on a larger, slower drive.  Anybody know if this is possible?  I'm kind of guessing it's not, but figured I'd ask anyway.


I'm trying to create lists for my presentation in beamer. Itemize environments are compiled, but the bullet points are not shown. Enumerate environments cannot be compiled however. Even if I try something as simple as  \begin{frame} \begin{enumerate} \item Test \end{enumerate} \end{frame}   I get the error message: ! TeX capacity exceeded, sorry [grouping levels=255].  Any help would be greatly appreciated!

I am using the enumitem package in a beamer presentation. When I added a usepackage directive for it, the bullets in front of itemize lists disappeared.  I tried restoring them by using  \setbeamertemplate{itemize item}{\scriptsize\raise1.25pt\hbox{\donotcoloroutermaths$\blacktriangleright$}} \setbeamertemplate{itemize subitem}{\tiny\raise1.5pt\hbox{\donotcoloroutermaths$\blacktriangleright$}} \setbeamertemplate{itemize subsubitem}{\tiny\raise1.5pt\hbox{\donotcoloroutermaths$\blacktriangleright$}} \setbeamertemplate{enumerate item}{\insertenumlabel.} \setbeamertemplate{enumerate subitem}{\insertenumlabel.\insertsubenumlabel} \setbeamertemplate{enumerate subsubitem}{\insertenumlabel.\insertsubenumlabel.\insertsubsubenumlabel} \setbeamertemplate{enumerate mini template}{\insertenumlabel}   but that didn't help.  Is there a way to set up bullets in beamer when using the enumitem package? I want to actually set a latex symbol or even an .png image of my own.


If a multi class Paladin/ Eldritch Knight cast Shield of Faith, and then as a reaction cast shield, would they get a +7 Bonus to their AC?

My understanding, confirmed by the answer to this question:  is that anywhere an actual +N bonus to AC is listed, they all stack.  So does the following work, or is there some conflict between some of these that would not allow them to be used together?  Barbarian 1 / Cleric 1 / Wizard 5  Unarmored, with a shield. Con 18, Dex 15   Base AC is 10 + 2 (dex) + 4 (con) = 16 Shield (+2 AC) raises this to 18   Casts Haste as an action and Shield of Faith as a Bonus Action (a house rule allows 2 concentration spells):   Haste gives +2 AC, for AC 20 Shield of Faith gives +2 AC, bringing AC up to 22   If she ever gets hit, cast Shield as a reaction:   an additional +5 to AC bringing AC up to 27 for one round   I know all of these would stack, but does anything prevent them from all being used together?


I know that the net force on a system of dipoles is zero because internal forces cancel out, but the same is not true for the torque. I wanted to know why does this happen. And is it related to any conservation law? I solved the forces and torque for the below problem for context.

Question Consider two dipoles $({p_1}\hat{i}$ and ${-p_2}\hat{j})$ kept in the $x-y$ plane at $(0,0)$ and $(d,0)$ respectively. Calculate the torque about the COM. Approach 1 Suppose we select the COM as the origin. Then, we label the 4 particles $1,2,3,4$. Let their position vectors be  $r_{1},r_{2}..etc$. Then, when we consider the Force on the $i$th particle due to the $j$th particle= $F_{ij}$. The Torque about the COM.= $r_{i}\times F_{ij}$. When we sum these torques over all particles, and use the following facts:  $F_{ji}=-F_{ij}$ $r_{i}-r{j}=r_{ij}$ $r_{ij}\times F_{ij}=0$  $$r_{1}\times({F_{21}+F_{31}+F_{41})}+r_{2}\times({F_{12}+F_{32}+F_{42})}$$ $$+r_{3}\times({F_{13}+F_{23}+F_{43})}+r_{4}\times({F_{14}+F_{24}+F_{34})}$$ $$= (r_{1}-r_{2})\times F_{12}+(r_{1}-r_{3})\times F_{13} ....$$ $$=0 + 0 ...0$$ We conclude that the net Torque about the COM is is zero. This is somewhat expected, there are no "external" elements in our system. (In fact, this argument suggests that the Torque about any point in the x-y plane is zero. We will still end up with the same expression, as the difference of two position vectors is independent of the choice of the origin.) Approach 2 However, qualitatively, when we use our knowledge of electric fields, we can see that both dipoles seem to experience an anticlockwise torque. They will add up, and thus The net torque is non zero. This appears to be a contradiction. The latter finding is bizarre in the sense that it seems to suggest that the angular momentum of an isolated system is not constant. And the only way that argument 1 can be wrong , is if: $$F_{ij}=-F_{ji}$$ does not hold. I have seen this happen, but the explanation was that the "3rd law of motion" is actually a statement of the conservation of momentum, and in that particular case, some portion of the momentum (of the particles) was carried away by the associated electromagnetic field. I don't think that something of this sort is responsible for my particular case, since there is no $B$ field, and therefore no $S$, which appears in the momentum density of the fields. Apart from this, the two arguments seem to be quite valid individually. So what's going on here? My initial thought was that the fields might be storing angular momentum, but like I said, there is no $B$. Edit 1: I think I have a hypothesis: In approach 2, as the dipoles rotate for some time say $dt$ , they start producing a $B$ field (since we now have moving charges). We now have both $E$ and $B$ fields, so we actually have an angular momentum associated with the field, which perhaps cancels out with the angular momentum produced by the dipoles(=$(T1 +T2)dt$).


There is a question which was raised almost 7 years ago which should probably be updated.    It should be noted that the answer is no longer accurate IMHO as the compiler has advanced in the last 7 years.  I suspect it was even inaccurate at the time, but it was so long ago it is hard to say.  Is there a process for handling answers which are locked but become in accurate over time as people still follow this advise even if the language and compilers have moved on.

The image is broken in my  to the "favorite programmer cartoon" question. I'd be happy to fix this, but I can't (not enough rep? not a moderator?).  Here's the image in the Internet Archive:


This question arose while reading Velleman's How to Prove It in section 2.3. For context, the definition of ∩F is { x |∀A ∈F(x ∈ A)}={ x |∀A(A ∈F → x ∈ A)} and ∪F is { x |∃A ∈F(x ∈ A)}={ x |∃A(A ∈F∧x ∈ A)}. F is a family of sets.  The question, however, doesn't have much to do with these definitions than it does with the title and a more generalized issue of these two statements when used with respect to sets. Why is the definition for ∩F defined as ∀A(A ∈F → x ∈ A) but not ∀A(A ∈F∧x ∈ A)? Aren't they both saying checking for the same conditions: that A belongs to F and x belongs to A?   I understand why they aren't the same by transforming the definition for ∩F into a logical statement:  ∀A(A does not belong to F or x belongs to A), which is obviously different than ∀A(A ∈F∧x ∈ A).     I suppose I just need some convincing in some way other than a logical statement.

Textbook(Discrete Mathematics with Applications by Susanna S. Epp) says that  $\forall x$ in $D$, $p(x)$ can be written as $\forall x$ in $D$$\to p(x)$,  $\exists x$ in $D$, $p(x)$ can be written as $\exists x$ in $D$$\land p(x)$.  but I am wonder, does it make no sense to say that   $\forall x$ in $D$, $p(x)$ can be written as $\forall x$ in $D$$\land p(x)$,  $\exists x$ in $D$, $p(x)$ can be written as $\exists x$ in $D$$\to p(x)$?  I cannot understand why can $\forall x$ in $D$, $p(x)$ / $\exists x$ in $D$, $p(x)$ be written as    $\forall x$ in $D$$\to p(x)$ / $\exists x$ in $D$$\land p(x)$   but $\forall x$ in $D$$\land p(x)$ / $\exists x$ in $D$$\to p(x)$.


I have ubuntu 16.04 LTS in my Dell Laptop.   I see my .profile file for current user. It has something like this written,   # ~/.profile: executed by the command interpreter for login shells. # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login # exists. # see /usr/share/doc/bash/examples/startup-files for examples.   However, when I try to open this file,   luvpreet@DHARI-Inspiron-3542:~$ cd  /usr/share/doc/bash/examples/ bash: cd: /usr/share/doc/bash/examples/startup-files: No such file or directory   I guess the startup-files might have moved on to some different path. Please explain  Where I can see that which files are executed on starting the terminal ?

Simple enough question: is there some shell command (or GUI method) I can use that, given the path to a file on my system, tells me what package put it there? Assuming the file did in fact come from a package, that is.  Bonus question: what if it's a file that isn't installed on my system? Is there, say, a website that will let me look up a file and see what packages, if any, provide it?


I was attempting to convert all the characters in a Pandas column into strings, in this manner:  df_sample1['county'] = df_sample1['county'].astype(str)   While doing so, I encountered the following error:     UnicodeEncodeError: 'ascii' codec can't encode character u'\xc9' in   position 38: ordinal not in range(128)   A similar problem has been discussed on  and the suggested solution included "You have to discover in which encoding is this character at the source."  I don't know what encoding my column is in - I was expecting only  ASCII Character given that they are county names. Is there a way to find out which characters are the truant ones, and if so, can I convert them all to UTF-8? Or in general, how do I find out what the encoding of the characters is?

I received some text that is encoded, but I don't know what charset was used. Is there a way to determine the encoding of a text file using Python?  deals with C#.


Prove that an $n×n$ matrix with entries $+1$ or $-1$ has determinant divisible by $2^{n-1}$.

Let $A_{n \times n}$ be a $n$ by $n$ matrix with all entries equal to $\pm 1$. I want to show $\text{det}(A)$ is divisible by $2^{n-1}$. How can I appraoch this?


I'm trying to use the psgo package to insert some go diagrams into a sharelatex file, but the boards are failing to render. Here's a minimal example:  \documentclass{article} \usepackage{psgo} \begin{document} \begin{psgoboard} \end{psgoboard} \end{document}   This results in the bad jumble of letters and numbers below:    How can I fix this? I feel like I'm missing something obvious, but I'm not sure what.

I thought that PSTricks package was not possible to use in pdfLaTeX but .   How can I force pdfLaTeX to use PSTricks then?


Our child is ready to switch from a five-point harness child car seat to a car booster seat, and we looked at a couple of models in a store. We saw one model that has clips on it to clip into the anchors that the five-point harness uses.  Is there any point to this? The difference is that a five-point harness replaces the regular seat belts and must be strongly connected to the car's frame. A booster seat just holds the seat belt in a safe position on the child's body. I don't think there's any tension between the car and the booster seat in a crash, so why would it need to be anchored?  Has anyone seen any reliable information on this feature?

We have the Graco AFFIX Backless Booster Car Seat with Latch System, but our new babysitter's car does not have LATCH.  Would there be any difference between using this seat without LATCH (just with the seatbelt) and buying a LATCH-less booster seat?


I want create an app using ios Swift, where first app can launch second app on click of the button. I am able to launch web Url's on click of the button but not the application. Please guide me through how to provide the URL scheme for the same.  Thanks in advance.

Is it possible to launch any arbitrary iPhone application from within another app?, For example in my application if I want the user to push a button and launch right into the Phone app (close the current app, open the Phone app).  would this be possible? I know this can be done for making phone calls with the tel URL link, but I want to instead just have the Phone app launch without dialing any specific number.


we develop a cloud software and we have the problem with loading javascript in Chrome. We change a javascript file on our server, but some users' chrome does not load this and keeps working with an old version that is not compatible.   I am not able to explain 1.000 users how they can delete cache. CTRL+F5 does not work. What can I set to tell Chrome: "Hey, there is a new version!"? Any help?  We compile assets (javascript).

We are currently working in a private beta and so are still in the process of making fairly rapid changes, although obviously as usage is starting to ramp up, we will be slowing down this process.  That being said, one issue we are running into is that after we push out an update with new JavaScript files, the client browsers still use the cached version of the file and they do not see the update.  Obviously, on a support call, we can simply inform them to do a ctrlF5 refresh to ensure that they get the up-to-date files from the server, but it would be preferable to handle this before that time.  Our current thought is to simply attach a version number onto the name of the JavaScript files and then when changes are made, increment the version on the script and update all references.  This definitely gets the job done, but updating the references on each release could get cumbersome.  As I'm sure we're not the first ones to deal with this, I figured I would throw it out to the community.  How are you ensuring clients update their cache when you update your code?  If you're using the method described above, are you using a process that simplifies the change?


I have an array of elements of type determined by template: SomeType array[10]; I have pointer to required class object: RequiredType * objectList; I do assignment: objectList = (RequiredType)array; How can I call RequiredType() constructor to construct an object at pointer location where memory is already allocated? This question also applies to any situation where you have allocated mamory at which you have to cnstruct an object.

Has anyone here ever used C++'s "placement new"? If so, what for? It looks to me like it would only be useful on memory-mapped hardware.


Which of them is the proper preposition to use.   Most people say "on the shelf", but I have seen "in the shelf" as well.

A showcase is a shelved container, but is usually enclosed. So do we put something on the showcase or in the showcase?  You could use this extract as an example to show the meaning of the word:     The girl never blinked or turned aside. I was maybe twenty feet away; and her look was so strong, I had to glance down. On the showcase beside me was a pear-wood mandolin perfectly made. I strummed it once and tried to pretend I knew how to tune it. When I had it sounding halfway right, I looked again. Now the girl was smiling, and her mother was striding on towards me as if I'd made some last mistake.      You could always use your own everyday English for examples.


The Stack Exchange policy seems to be to disallow edits of fewer than six characters. However, often in technical subjects an edit of a single character can make a critical difference.  I just experienced this , where I wanted to correct a key-stroke sequence for a computer operation. The correction amounted to a single character, changing M-x to C-x. The hack I came up with, and for which I am embarrassed to have had to resort, was to add a sequence of x's to the end of the post. My intent was to follow-up that with a second edit to delete the x's. Quite a kludge.  Please either provide me guidance on how to properly perform these types of edits, or consider changing the policy for some or all Stack Exchange sites.

I recently came across an  by  which contained a link to a specification that has since been moved. When attempting to edit the link, a change which involved the subtraction of only 4 characters, I ran up against the 6 character minimum requirement.  Ordinarily this would not be an issue. A less experienced poster would likely have other things within the answer that could be changed (). In fact, this seems to be the answer on every meta post relating to this topic (, , etc...).  The problem here, since I don't have 2k reputation, is that BalusC writes excellent answers... with the reputation to back them up. I don't feel there is anything in the post (besides the link) that would benefit from me editing.  What is the standard practice here?   Flag the post and explain my situation in the notes (for someone with higher reputation)? Comment on the post and hope that a) visitors read the comments or b) the OP gets notified and updates their post? Make edits, for the sole purpose of increasing characters, providing no benefit and possibly hurting the quality of the post?   For reference, the EL Specification in the post should be changed to , if someone wants to go ahead and take care of this.


My sister, daughter and I all took DNA tests for fun. My sister and I show up on Ancestry as "close family," and share 1864 Centimorgans, and we do not share any relatives that my daughter and I share on one my father's side of the family.   I wonder whether she may be only a half sibling?    I am hesitant to ask to see her matches, and my other siblings are dead.   Any ideas how to pursue?

My son recently had a match come up as close family the match is male and 1814cm.    His only living grandfather is already in our tree at 1857cm.  All other grandparents are deceased and have never participated in Ancestry DNA.    When I review the shared matched between my son and the matched male they have matches consistent with my ex-husbands family.  However none of my ex husbands brothers (his uncles) have done DNA testing.   My son has no grandchildren.    Is it possible that 1814cm could be the child of one of my ex husbands brothers children or am I looking at the possibility that there is a half sibling to my son?


I want to show that if $A$ is normal then  $$ A v = \lambda v \implies A^* v = \bar{\lambda} v $$  I can show that $A^*v$ is also an eigenvector of $A$, using the fact that $A$ and $A^*$ commute, but I know that this doesn't imply $A^* v \propto v$. So I'm not sure where to go from here. Thanks.  EDIT: The top answer solves the problem, but I would like to know how to prove this result using the polarisation identity as suggested below. This is not the approach taken in the other questions on this site, linked to in the comments below.

I just wanted to make sure that the following statement is true:  Let $A$ be a normal matrix with eigenvalues $\lambda_1,...,\lambda_n$ and eigenvectors $v_1,...,v_n$. Then $A^*$ has the same eigenvectors with eigenvalues $\bar{\lambda_1},..,\bar{\lambda_n}$, correct?


I need a picture at my visualforce page and I tried to add the slds-icons. The version with the "{!URLFOR(..." works, but I can't use the settings like slds-icon_x-small, if I use the version without "{!URLFOR(..." the picture doesn't appear.    <svg class="slds-icon slds-icon-text-default slds-icon_x-small" aria-hidden="true">     <use xlink:href="**{!URLFOR($Asset.SLDS, 'assets/icons/utility-sprite/svg/symbols.svg#announcement')}**"></use>   </svg>    <svg class="slds-icon" aria-hidden="true">     <use xlink:href="**/assets/icons/standard-sprite/svg/symbols.svg#account**"></use> </svg>   What is the mistake?

Script 1: Does not Work  <apex:page >     <apex:stylesheet value="{!URLFOR($Resource.slds221, 'assets/styles/salesforce-lightning-design-system.min.css')}"/>     <svg aria-hidden="true" class="slds-icon slds-icon--x-small slds-icon-text-default slds-is-sortable__icon">         <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{!URLFOR($Resource.slds221, 'assets/icons/utility-sprite/svg/symbols.svg#email')}"></use>     </svg> </apex:page>   I can't see any icon on my page. However when I remove stylesheet reference it renders fine. What am I missing  Script 2: This Works (Removed slds-static reference)  <apex:page >     <svg aria-hidden="true" class="slds-icon slds-icon--x-small slds-icon-text-default slds-is-sortable__icon">         <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{!URLFOR($Resource.slds221, 'assets/icons/utility-sprite/svg/symbols.svg#email')}"></use>     </svg> </apex:page>


Inspired by the title of ...  An  gains the following feature:     Arcane Ward   Starting at 2nd level, you can weave magic around yourself for protection. When you cast an abjuration spell of 1st level or higher, you can simultaneously use a strand of the spell's magic to create a magical ward on yourself that lasts until you finish a long rest...   While the ward has 0 hit points, it can't absorb damage, but its magic remains. Whenever you cast an abjuration spell of 1st level or higher, the ward regains a number of hit points equal to twice the level of the spell.   The  spell is classified as Conjuration. But it can duplicate any other spell.   If the spell being duplicated is Abjuration, can it start and/or charge up the Arcane Ward? Or it is still considered Conjuration?

is a conjuration spell that is able to be used to duplicate lower level spells as follows:     The basic use of this spell is to duplicate any other spell of 8th level or lower. You don't need to meet any requirements in that spell, including costly components. The spell simply takes effect.   When used in this way, does the resulting spell count as a conjuration spell or whatever the school duplicated spell is?    As an example (since there was some confusion): say I used wish to cast  on a creature. After a period of time passes I cast detect magic on the creature. What school of magic do I detect?


I'm on Windows 10 64-bit version 1511 (OS Build 10585.545).  Recently my Chrome updated to version 53.0.2785.89 m (64-bit) and since then I get this error when entering :  NET::ERR_CERT_COMMON_NAME_INVALID      I can access meta ELU.SE if I manually remove the "https" from it or click the button to "proceed ... (unsafe)". But what's happening?  EDIT: The proposed duplicate is simply a part of more linked duplicates. I see that this problem has happened to many before me, but why did I start seeing this issue just after Chrome updated to version 53? I understand that SE's HTTPS setup isn't perfected yet, but how do I solve my problem for now?

Steps to reproduce:   In Firefox (with ), visit a non-trilogy Stack Exchange site (for example, ) Get redirected to the HTTPS version Click on meta link (for example, )   What should happen:   Meta site opens   What happens instead:   "This Connection is Untrusted" message appears:      meta.movies.stackexchange.com uses an invalid security certificate. The certificate is only valid for the following names: *.stackexchange.com, stackexchange.com, meta.stackexchange.com, *.meta.stackexchange.com, *.stackoverflow.com, stackoverflow.com, serverfault.com, stackauth.com, sstatic.net, meta.serverfault.com, superuser.com, meta.superuser.com, stackapps.com, openid.stackauth.com (Error code: ssl_error_bad_cert_domain)   Notes:   It also happens if you visit  instead (you get redirected to HTTPS and the error occurs) Another random example,  Trilogy metas work,  works (but  doesn't - I am not sure what gave me that link) Replacing URL with https://*.meta.stackexchange doesn't work   Here is the screenshot:


If I have a string such as:  "You id is (1) and your number is (0000000000)"  What is the best way to extract these these strings into a list of strings. The numbers between the brackets can increase in digits thus searching for the strings between the brackets is a better technique.  I can use the code below to extract the first string between brackets.  var myString = "You id is (1) and your number is (0000000000)"; var firstNumberBetweenBrackets = myString.Split('(', ')')[1]; // would return 1

I have a string User name (sales) and I want to extract the text between the brackets, how would I do this?   I suspect sub-string but I can't work out how to read until the closing bracket, the length of text will vary.


I know touch & echo for creating an empty file. But how can I create an empty file in the home directory in one line? I have tried touch ~/boo.txt but it's creating the file. I'm new to shell, I need to know two approaches of creating an empty file in Home directory from another directory. TIA

How can I create an empty file from the command line?