Physics texts like to define vector as something that transform like a vector and tensor as something that transform like a tensor, which is different from the definition in math books. I am having difficulty understanding this kind of definition. To me, it goes like this:   First we have a collection of bases or coordinate systems (do these represent reference frames?) and the transformations between them. A vector/tensor is an assignment of an array of numbers to each basis, and these arrays are related to each other by coordinate transformations.   I am wondering how coordinate systems and transformations are specified.    Do we need all possible coordinate systems and transformations to define a vector space or just a few of them? How to define the concept of basis and coordinate transformation without completing the very notion of vector?

I have a pretty good knowledge of physics, but couldn't deeply understand what a  is and why it is so fundamental.


Whenever I type a longer equation it gets unreadable very quickly. Is it possible to shorten the expression  \alpha(z,n)=\left( \sqrt{\frac{1}{2\pi i}} \sum_{k=1}^{\infty}\frac{z^k+n}{x^{2k}} \right)^n   by using characters in the latex code so that  \alpha shows as α \sqrt{} shows as √{} \frac{a}{b} shows as a/b (to spare brackets: a is in superscript and b is in subscript)   \sum shows as ∑ (there is another sigma for using it as a letter Σ) \infty shows as ∞   Meaning without super-/subscript we would have  α(z,n)=\left( √{1/2πi} ∑ k=1 ∞ z^k+n/ x^{2k} \right)^n.

I'm considering moving to Xe(La)TeX for the main reason that it allows me to use unicode in my LaTeX code, making said code easier to read, especially the math.  But I'm confused on how XeTeX typesets symbols based on my input. I see three possibilities:   Unicode chars are made active and XeTeX outputs the TeX symbols we know and trust. Unicode chars are piped (directly) through to the final (pdf, ps, dvi) document. A combination of the two.   With one of the advertised points of XeTeX being direct access to system UTF-8 fonts, I'm guessing (2) has a lot to do with it.  Beautiful Typesetting  But TeX has always been about beautiful typesetting, and a lot of effort has gone into making symbols and their spacing look good. Do we still get the same benefits with unicode output? (Do the symbols look the same? Nicer? Worse?) I believe some symbols do not come directly from a font, but have been painstakingly crafted in TeX itself.  Specifics  There are specific math constructs that get special treatment in TeX but also have unicode symbols. For example, for \cap and \bigcap there are respectively ∩ and ⋂. Do they both behave accordingly? What about √? Or are there packages that implement this sort of thing?  Are most unicode math symbols interpreted correctly with regard to math spacing? (\mathbin, \mathrel, \mathop, \mathopen, \mathclose)  Do math delimiters derived from unicode ⦃⦄ ⦅⦆ scale vertically as they should?  Are  handled appropriately?  Portability  Will the output be different when the code is compiled on different systems? Will my generated pdf/ps/dvi look different when viewed on different systems? Or are all relevant fonts automatically included?  unicode-math  Finally, what role does unicode-math play in this story?


I have a question concerning the proof of the continuity of $f(x) = \ln x$.     I read in a comment by Pedro Tamaroff to ncmathsadist's answer to  that this can be proved in two steps:   first by proving that $f(x)$ is continuous at $1$,  and then by using $\ln (xy) = \ln(x) + \ln(y)$.    However, I do not really see how to do it.   How does it actually work?

Prove that if $f:(0,\infty)→\mathbb{R}$ satisfying $f(xy)=f(x)+f(y)$, and if $f$ is continuous at $x=1$, then $f$ is continuous for $x>0$.   I let $x=1$ and I find that $f(x)=f(x)+f(1)$ which implies that $f(1)=0$. So, $\lim_{x\to1}f(x)=0$, but how can I use this to prove continuity of $f$ for every $x \in \mathbb R$?   Any help would appreciated. Thanks


I'm getting this message:     You can only ask 6 questions in a 24-hour period   Could you add a timer, so that I know how much time I have to wait?

I share a public IP with my colleagues here in the office, and sometimes I get the following error message:     Sorry, you are only allowed to ask 6 questions in a 24 hour period.   I was hoping if you guys can add a time reset indication like, "You will be able to ask again after 2 hours," where 2 hours is the remaining time till the 24 hours limit ends.  What do you think?


In a course of group theory an exercise is left with no indications :      Let $A$ be an abelian group of finite type and $a_1,\dots ,a_n$ a $\mathbb{Z}$-basis of $A$. Let $f : A \to A$ be a group homomorphism. Les $M=(m_{ij})$ be the matrix (invertible) defined by $\displaystyle f(a_j)=\sum_{i=1}^n m_{ij}a_i$ with $\det (M)\neq 0$. Show that $[A:\operatorname{Im}(f)]=|\det M |$, i.e the index of $\operatorname{Im}(f)$ in $A$ as a subgroup is precisely $\det (M)$.   I am not able to prove this fact, and need a bit of help. In fact I do not see where I can make $\det (M)$ appear. Can you give me some hints ?   Thank you

I am asked to show that if $\phi_A$ is the homomorphism from $\mathbb{Z}^k \rightarrow \mathbb{Z}^k$ given by $\phi_A(x)=xA$ then the index of $\phi(\mathbb{Z}^k)$ in $\mathbb{Z}^k$ is finite if and only if $A$ is nonsingular.    While this seems intuitive to me, one obstacle to proving this is that I am not quite sure of how to represent the index of a sublattice in a lattice! The way I understand it, $j\mathbb{Z}^k$ has index $j^k$ in $\mathbb{Z}^k$, for an integer $j$. I am used to indices in finite groups but not infinite groups, so is the trick to show this sort of correspondence?  Furthermore, I would like to know if this is a valid sketch of a proof:   If $A$ nonsingular, $A'$ is in Smith Normal Form ($PAQ=A'$) and $\det A'$ is nonzero, so the columns of $P^{-1}$ form a basis for $\mathbb{Z}^k$ and the columns of $AQ$ form a basis for the sublattice such that each column in the basis for the sublattice is an integral multiple of the columns in the basis for the lattice $\mathbb{Z}^k$, and since these multiples are given by the diagonal entries of SNF, we have that for every one point in the sublattice, there are $\prod a_i=\det A'=\det A$ points in the main lattice. If $A$ singular, we have the same as (1) except now at least one of these columns is a multiple $0$ times the column for the basis in the main lattice, so there are infinitely many points in the main lattice for each point in the sublattice.


I have the following question, whose inverse question can be done by the well-known Cauchy–Schwarz inequality. But I do not know how to solve this question:  Suppose that $\{a_n\}_{n=1}^\infty$ is a sequence of real numbers such that \begin{equation} \sum_{n=1}^\infty a_n b_n \quad \text{is a convergent series whenever}\quad\sum_{n=1}^\infty b_n^2<\infty. \end{equation} Show that $\sum_{n=1}^\infty a_n^2<\infty$.

Please help me with this question. I've been thinking about it for almost two days. Let $a_n$ a real series that have the following property: for every series $b_n$ in $l_2$: $\sum_{n=1}^\infty a_nb_n$ converges. prove that $a_n$ in $l_2$.


For small values of $l$, isomorphisms occur among certain of the classical algebras. Show that $B_2$ is isomorphic to $C_2$.   Well, both $B_2$ and $C_2$ have dimension $10$. $B_2$ consists of $5\times 5$ matrices, while $C_2$ consists of $4\times 4$ matrices. It seems to take too much work to exhibit an explicit isomorphism, and then computing to show that $\phi([x,y])=[\phi(x),\phi(y)]$, where $[x,y]=xy-yx$. How can we show that the two algebras are isomorphic?

both of Lie algebras of type $B_2$ and $C_2$ have dimension 10 and we can find two basis of them on page 3 in the book: . How could we show that these two Lie algebras are isomorphic by constructing an explicit correspondence between two basis of them. Thank you very much.


I wrote a compressing command in Ubuntu. However,the zip file produced also contain path folder leading to the target file in form of folder. I only need the target file alone in the zip file. This is the code I currently using.  zip -9pr /mnt/test/Raimi/temp/Testing.zip /home/tect/Loco/*txt   where mnt/test/Raimi/temp is the destination folder Testing.zip is the output I intended to produced and /home/tect/Loco is the Original file located.  Please help pointed out a fault in my command if found. Thank you in advance.

I have a folder that contains multiple files  folder  artifact1.app artifact2.ext2 artifact3.ext3 ...   My goal is to zip the file from outside this folder (so without using cd command) without including the folder dir. zip -r ./folder/artifact.zip ./folder/artifact1.app  This command includes the folder dir in the final zip. Any hints? Related question:


How can I kill the tail process after having found special command tail -f filename | grep -m1 " special string" | tee txtfile  After founding the "special string" the tail function needs to be killed to execute the rest of the program.

I want to terminate the tail command after having the match found and until then all the lines are written to another file. tail -f logfile | sed '/special string/q'  | tee output.txt  Output.txt will have the lines until special string is found. But the problem is, after that I want to end the tail command.


When I extend the chat window by clicking the right-down handle to enlarge the window (using Google Chrome), and when I input many lines full of words, the last line cannot be seen.   You see that the handle disappears and I always cannot edit the last line of words.    Can the chat window be extensible by mouse's moving up and down to resize the chat room?

You can currently only resize the text box in chat. Given that there's only a few pixels below the text box, this resizing doesn't help all that much.    Would it be possible to make the entire bottom div resizeable, rather than just the text box (with the height of the text box dependent on the height of the div)?  (No longer suggesting resizing the textbox itself upwards, as this doesn't appear to be a possibility)


The standard way of combining a citation with the amsthm package is to use :  \begin{thm}[\citep{...}].   However, suppose I want to name a particular theorem I am referencing. If we were outside the amsthm environment, we could just use \citep[Theorem blah]{...}, but attempting to do this in amsthm creates errors, i.e. :  \begin{thm}[\citep[Theorem blah]{...}]   does not work.  Are there any ways to get around this?

When I try to cite a book in such a way  \begin{theorem}[\cite[p.~90]{bibitem}] Theorem body. \end{theorem}   I've got an error because of multiple use of [ and ]. Is it possible to cite in such a way in theorem argument? Would be great if it could be done without redefine of \cite command.


"Many vendors can be seen selling it now in the city."  I came across this sentence online which is quite strange to me in terms of sentence structure (grammar). why do 2 verbs "seen" "selling" stand together? I wonder if that's a shortened version of a full sentence such as relative clause reductions?  For example: "We saw them selling it in the city" is a shortened version of this sentence: We saw them who was selling it in the city. (Relative clause reduction).  I am fine with the meaning of the sentence. I am just concerned about the grammar, the sentence structure.  I can easily understand this apparently similar sentence:  "Have you ever seen anyone walking the streets like that?"  But my sentence is quite different. Could someone show me the grammar point here? I still don't get how passive voice "can be seen" followed by a gerund "selling".

Have you ever seen anyone walk the streets like that? Have you ever seen anyone walking the streets like that?  Are both the above sentences grammatically correct? Do they mean the same?  I saw him kiss her the other day. I saw him kissing her the other day.  Are both the above sentences grammatically correct? Do they mean the same? And I'm sorry, if the latter two sentences come off immature .-. I couldn't come up with better sentences.


Can someone tell me the significance of * sign after a file name ?

I noticed that if I run ls -F on a directory, some of the entries have a * or a @ after them.   spuder@ubuntu:~$ ls -F /sbin acpi_available*   getpcaps*           lvmconf*                 ntfscp*        start-stop-daemon* agetty*           getty*              lvmdiskscan@             ntfslabel*     status@ alsa*             halt@               lvmdump*                 ntfsresize*    stop@ alsactl*          hdparm*             lvmsadc@      spuder@ubuntu:~$ ls -F ~ daq-0.6.1/  examples.desktop       noname-cache.lib  snort-2.9.1/   Templates/ Desktop/    jpgraph-1.27.1/        noname.sch        snortfiles/    Ubuntu One/ Documents/     According to the ls man pages   spuder@ubuntu:~$ man ls ... -F, --classify   append indicator (one of */=>@|) to entries ...   I'm guessing that @ means symbolic link,     What do these other indicators mean ( */=>@| )  ?


Suppose we have $n\times n$ matrices $A, B$, and there is no information about singularity of $A, B$.   Also $C$ is a $n\times n$ projection matrix, i.e. singular matrix and it is not the zero metrix.  If $AC=BC$, can we say that $A=B$?  All comments would be appreciated.

I'm solving a exercise, and the following question has arisen:     Let $A,B,C$ be non-zero matrices, if $AB=CB$ then is $A=C?$   I already have a partial solution when $A,B,C$ are square matrices and $B$ is invertible: in this case $A=CBB^{-1}=CI_n=C$.  This result is valid in general case? (I mean, when the matrices are arbitrary)  Thanks!


Is there a way on Linux (CentOS if that matters) to enable regular users to use ports below 1024? (open listening TCP socket on that port)  Currently I understand that only root has privileges to use those ports.

I have Googled about a solution for quite some time, but couldn't find an answer.   I am on Ubuntu Linux and want to run a server on port 80, but due to security mechanism of Ubuntu, I get the following error:      java.net.BindException: Permission denied:80   I think it should be simple enough to either disable this security mechanism so that port 80 is available to all users or to assign required privileges to the current user to access port 80.


From what I can remember, RSA is something like this:   Generate 2 distinct prime numbers $p$ and $q$ that have similar bit length. Compute $n=pq$ and $\phi(n)=(p-1)(q-1)$ Compute $e$ such that $1<e<\phi(n)$ and $\gcd(\phi(n),e)=1$. It is optimal for $e$ to be prime Compute $d$ such that $ed\equiv1\pmod{\phi(n)}$ To encrypt a message $m$ into cipher $c$, compute $c=m^e\pmod{n}$ To decrypt a cipher $c$ into message $m$, compute $m=c^d\pmod{n}$   But for large $m$ values, this does not necesssarily work.  Let me use an example to demonstrate what I mean:   Let $p=1999$, $q=2039$, and $e=65537$ (note, all of $p$, $q$ and $e$ are prime) Compute $\displaystyle n=pq=1999\times2039=4075961$ Compute $\displaystyle \phi(n)=(p-1)(q-1)=1998\times2038=4071924$ Compute $d$ such that $65537d\equiv1\pmod{4071924}$  by solving the Linear Diophantine Equation $\displaystyle 65537x-4071924y=1$   Steps to solve (using a bad implementation of the Extended Euclidean Algorithm)  $\displaystyle 65537\times63-1\times4071924=56907$  $\displaystyle 1\times65537-1\times56907=8630$  $\displaystyle 1\times56907-6\times8630=5127$  $\displaystyle 1\times8630-1\times5127=3503$  $\displaystyle 1\times5127-1\times3503=1624$  $\displaystyle 1\times3503-2\times1624=255$  $\displaystyle 1\times1624-6\times255=94$  $\displaystyle 1\times255-2\times94=67$  $\displaystyle 1\times94-1\times67=27$  $\displaystyle 1\times67-2\times27=13$  $\displaystyle 1\times27-2\times13=1$  Therefore, these things can be substituted:  $\displaystyle 1\times27-2\times(1\times67-2\times27)=5\times27-2\times67=1$  $\displaystyle 5\times(1\times94-1\times67)-2\times67=5\times94-7\times67=1$  $\displaystyle 5\times94-7\times(1\times255-2\times94)=19\times94-7\times255=1$  $\displaystyle 19\times(1\times1624-6\times255)-7\times255=19\times1624-121\times255=1$  $\displaystyle 19\times1624-121\times(1\times3503-2\times1624)=261\times1624-121\times3503=1$  $\displaystyle 261\times(1\times5127-1\times3503)-121\times3503=261\times5127-382\times3503=1$  $\displaystyle 261\times5127-382\times(1\times8630-1\times5127)=643\times5127-382\times8630=1$  $\displaystyle 643\times(1\times56907-6\times8630)-382\times8630=643\times56907-4240\times8630=1$  $\displaystyle 643\times56907-4240\times(1\times65537-1\times56907)=4883\times56907-4240\times65537=1$  $\displaystyle 4883\times(63\times65537-1\times4071924)-4240\times65537=303389\times65537-4883\times4071924=1$  Through calculation, we conclude that $\displaystyle d=303389$ because $\displaystyle 65537\times303389\equiv1\pmod{4071924}$  Example 1  Encryption  Let $m=113$, then, $c\equiv(113^{65537})\pmod{4075961}=3345792$  Decryption  Let $c=3345792$, then, $m\equiv(3345792^{303389})\pmod{4075961}=113$  It works this time! Good!  Example 2:  Encryption  Let $m=33555553$, then, $m\equiv(33555553^{65537})\pmod{4075961}=2621940$  Decryption  Let $c=2621940$, then, $m\equiv(2621940^{303389})\pmod{4075961}=947865$  It does not work this time! What the ----?  Is this message too big to be encrypted? If so, how do we make it smaller?

I'm going to encrypt the characters Zhu, and decrypt them using RSA. I'm using the public key $\{e, n\}$ and private key $\{d, n\}$. The values of $e$, $d$ and $p$ I get from my textbook: $e = 17$, $d = 53$, $n = 77$.  It works fine when the number is smaller than 76, but in my example below, it doesn't work:  z = 90  h = 104  u = 107  e = 17 d = 53 n = 77  print z,h,u  c_z = z ** e % n c_h = h ** e % n c_u = u ** e % n  print c_z, c_h, c_u  p_z = c_z ** d % n p_h = c_h ** d % n p_u = c_u ** d % n  print p_z, p_h, p_u   The outputs are:  90 104 107 62 69 46 13 27 30     Do you have any idea what's going wrong?


Given the following two sentences.   There are more than one people. There is more than one people.   Which one of them is grammatical, both of them, any one of them or none of them? The noun people (presumably collective) is generally plural. Therefore, the former sentence seems to be correct (this is usually the case in my local languages).  It is something similar to the case, where zero is (mostly) considered plural though intuitively it should be singular. Moreover, it should be safe to say, there is more than one person instead of saying, there are more than one person. but I'm not sure about people, when used in such constructs. Sorry for this simple question :)

While adding to an Answer to  question, I needed to use the above phrase, and I suddenly realised I was unsure whether to write "is" or "are".   There is more than one way to skin a cat. If there are more than one species of cat, we will flay each species differently.   I don't think that second example above sounds quite right to me (disregarding the meaning - sorry!), but in my original Answer I felt "is" would have been even worse.  Is "are" always wrong here? If so, what exactly is the rationale? If not, is there a case where it's unquestionably preferred – and why is that?    Note that in both the problematic Answer and my example attempting to mimic the same context more briefly, the writer doesn't know how many there are. There may be one, more, or even none.  Getting even more specific, the writer might have an opinion on how many there might be, and wish to convey his leanings by choice of verb form if language allows this to be done succinctly.


I've used JavaScript before where we use arrays. I'm following a textbook that teaches Python. I'm now learning about lists. They sound exactly like arrays. Is list simply the Python word for array, or does Python have arrays and lists which are different things?

If you are creating a 1d array, you can implement it as a List, or else use the 'array' module in the standard library.  I have always used Lists for 1d arrays.  What is the reason or circumstance where I would want to use the array module instead?  Is it for performance and memory optimization, or am I missing something obvious?


I have a table (core_customer_information) and I want to create a SQL query in php that uses the variable $code and updates the activated field in my table.   $code = mysqli_real_escape_string($conn, $_GET['code']);   $check = mysqli_query("SELECT * FROM core_customer_information WHERE activation_code='$code' AND activated='1' ");           if ( mysqli_num_rows($check) == 1)          {             die ('The account has already been activated');          }         else          {             $activate = mysqli_query("UPDATE core_customer_information SET activated='1' WHERE activation_code='$code'");             echo ('Your account has know been activated <br>');              echo $code;          }   First of all, I check whether the activated is equal to 1, in which case the account is classed as activated, and if not, I then create an UPDATE query to update the activated field of this class.   My problem is that the query isn't updating my table and I'm unsure where the problem is at.   I would appreciate if someone could take a look for me please.

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I have been trying to use my Minecraft custom made skin i have used it in singleplayer and multiplayer working and lately I have been playing singleplayer no problem but when i play multiplayer i don't see my skin but other people do and yes i have bought minecraft  this is my skin just in case there is a problem with it:

I made a skin by using Skincraft and I exported it to minecraft.net. I chose my skin and uploaded it. At the top it says,      "Your skin has been changed! Please wait a few seconds for it to   update."   I went to Minecraft, clicked singleplayer and chose a random world at the top. I looked at my character, but it's still default. Multiplayer won't load for some reason. I don't know what I've done wrong!


I consulted some dictionaries, for example in  the entry for graphic reads     very clear and powerful:   a graphic description/account   He insisted on describing his operation in graphic detail while we were eating lunch    but I am still confused by the meaning of "graphic language" in such a sentence:     WARNING: This story contains graphic language.   Why is language called ‘graphic’, what is its origin?

Googling "graphic video" revelas that it is something like "video with violence", yet I can't find "graphic video" in a dictionary.   of "graphic" sometimes give a hint:     depicted in a realistic or vivid manner:     Example: graphic sex and violence.   , but the definition doesn't not imply any violence, only the example.  Is it appropriate to use the term "graphic video" just for a realistic or picturesque video? Isn't "graphic video" a tautology (video implies relating to graphics, like audio to sound)? Is it some euphemism?


What is the sum of all the numbers in the sequence $1^2 + 3^2 + 5^2 + 7^2 + 9^2 + \ldots + k^2$. Note that all the numbers being squared in the sequence are all odd numbers.  This is what I have done so far (sorry if the images are an inconvenience, but this was the clearest way to display my working out):     I am a little stuck on what to do next and how to obtain $\frac{n (4n^2 - 1)}{3}$ as the final result as this is what I am meant to end up with. It would be really appreciated if anyone could make suggestions towards completing and improving my method. Thanks! :)

Is there an analytical expression for the summation $$1^2+3^2+5^2+\cdots+(2n-1)^2,$$ and how do you derive it?


Given a real $x$ and an integer $N \gt 1$, prove that there exist integers $h$ and $k$ with $0 \lt k \le N$ such that $|kx-h|\lt 1/N$. Hint. Consider the $N+1$ numbers $tx-[tx]$ for $t=0,1,2,\dots, N$ and show that some pair differs by at most $1/N$.  I'm trying to prove this hint. Let $a_t=tx-[tx]$ for $t=0,1,2,\dots, N$, and assume that for every different pair $|a_i-a_j| \ge 1/N$.   I can't lead to a contradiction from this. I would greatly appreciate any help.

This is a problem from Apostol's $\textit{Mathematical Analysis}$. He provides a hint: Consider the $N+1$ numbers $tx-[tx]$ for $t=0,1,\ldots,N$ and show that some pair differs by at most $1/N$, where $[x]$ is defined as the greatest integer $\leq x$.   I have defined $a_t:= tx-[tx]$. I know $a_t \in [0,1)$ for every $t=0,1,2,\ldots,N$. How can I show that there exists $i,j \in \lbrace{0,1,\ldots,N\rbrace}, i \neq j$ such that $N\lvert{a_i-a_j\rvert}$ < 1? I've been stuck on this problem for a quite a while. A hint would be much appreciated.


I've seen a lot of profiles with a much higher reputation than mine, owned by people who never answered a single question.  (Which I think is OK, and fair. After all, they probably are much more useful to the SO community than I am.)  But I really think it would be nice having separated reputations on each profile page, measuring how much of the reputation is made a) by answering questions and b) by asking them.  PS: I'm not asking to change the way the overall reputation is computed. PPS: This question should be a duplicate - I just cannot believe anyone else has thought about that before. But I was not able to find anything. PPPS: This is my first meta question, so please "be gentle" :P

I would like to request a pie chart to see how a user got his or her reputation. This could be placed on the profile page. Sections could contains percentages like:  14 Questions - 200 points - 28.41% 20 Answers   - 400 points - 56.82%  2 Edits     -   4 points -  0.57%  1 Bonus     - 100 points - 14.20%     Image: artist rendering of a pie. It does not have to look this way. It might even be a chart per tag or even per topic .


class Main(QtGui.QMainWindow):     self.process = QtCore.QProcess(self)     QtCore.QObject.connect(self.process,QtCore.SIGNAL("finished(int)"),self.processCompleted)      def processCompleted(self):         self.ui.statusText.setText("Finished")     self.process.startDetached(command,arguments)   I am not able to get the finished signal emitted here. Can anybody help me here.

Do I get a finished signal if I start a QProcess using startDetached()? I'm trying to start a process, but I need to be able to get an event when the process has terminated.


When using the "in" operator to check whether an element exist in a numpy array, is there any way to also get the index of that element? Thank you

Given a list ["foo", "bar", "baz"] and an item in the list "bar", how do I get its index (1) in Python?


I am presently in high school trying to understand the Bohr's theory. I somewhat familiar with Maxwell's laws but very soon I'll learn about them thoroughly. So please could anyone explain with respect to the EM theory why does Bohr's stationery orbit does not radiate energy?

We all learn in grade school that electrons are negatively-charged particles that inhabit the space around the nucleus of an atom, that protons are positively-charged and are embedded within the nucleus along with neutrons, which have no charge. I have read a little about electron orbitals and some of the quantum mechanics behind why electrons only occupy certain energy levels. However...  How does the electromagnetic force work in maintaining the positions of the electrons? Since positive and negative charges attract each other, why is it that the electrons don't collide with the protons in the nucleus? Are there ever instances where electrons and protons do collide, and, if so, what occurs?


We all know how to convert an infinite repeating decimal to fraction. It is simple. But now I have these fractions 10/23, 3/29, etc. I know these fractions can be written in infinite repeating decimal, but the repeating digits are too long ( over 10 digits), so it cannot show fully on the calculator screen. So is there any algorithm to find the repeating decimal digits by calculator ? thanks very much.

For simple fraction, we can easily convert it to repeating decimal by calculator. Ex. $\frac 1 3 = 0.33333\ldots$, $\frac 1 7=0.(142857),\ldots$ But some fraction fraction like $10/29, 1/97,...$ The repeating part of them are too long, so it can't fully show on the calculator. So is there any algorithm  to find the repeating part for that fraction?


I have a mesh that has been created in MakeHuman. I have imported it into blender to apply some python scripts on it. But, they require that the mesh must be triangular. So, my question is, is there any way to convert from quad to triangular mesh in blender or even MakeHuman?

I need to create test file for my program. But it only accepts polygons with 3 vertices - triangles as input. How can I convert all polygons of some object into triangles?  I know how to select all faces, but how to split them into triangles.


In most cases, the user is modifying the array directly within the original loop. In my case, the array is being modified by a method being called inside of the loop, outside of the loop's control. I need a way for an outsider to be able to add a value or remove a value in response to an event.  I am currently working on an event system for things such as input. The event system is mostly working, however there are times where in response to an event, a listener will actually wish to stop listening for events (For example, if a user clicks the mouse button to leave one menu, the listener for that menu will remove itself from the input listeners).  The issue with this though is that when a listener removes itself in an event listener method, it modifies the array being looped through in order to call said event methods. This results in a ConcurrentModificationException. One solution I've come up with is cloning the list so that it is not the one being modified during the loop. However, I would assume this could be resource intensive and reduce performance by a lot.  Another functioning system I've come up with is having two lists (one for adding, and for removing) when looping through the listeners. If the add or remove methods are called during a loop, these lists will have those values added to them. At the end of the loop, the values are added and removed accordingly. The issue with this is that requires state management and can look quite messy. Is there a better way to get around this issue than the two things I just described?  /**  * The base listener.  */ public interface Listener {      /**      * Called when an event occurs.      *      * @param id      *      the ID of the event.      */     public void event(int id);  }  /**  * The test implementation of the base listener.  */ public class TestListener implements Listener {      @Override     public void event(int id) {         if(id == 0xDEADBEEF) {             /*              * This is where the error occurs.              */             TestSystem.removeListener(this);         }     }  }  /*  * The revolutionary system that does foo and bar!  */ class TestSystem {      private static final ArrayList<Listener> LISTENERS = new ArrayList<Listener>();      /**      * Adds a listener.      *      * @param listener      *      the listener to add.      */     private static void addListener(Listener listener) {         LISTENERS.add(listener);     }      /**      * Removes a listener.      *      * @param listener      *      the listener to remove.      */     private static void removeListener(Listener listener) {         LISTENERS.remove(listener);     }      /**      * Calls an event.      *      * @param event      *      the event to call.      */     private static void callEvent(Consumer<? super Listener> event) {         for(Listener listener : LISTENERS) {             event.accept(listener);         }     }      public static void main(String[] args) {         addListener(new TestListener()); // Add listener         callEvent(listener -> listener.event(0xDEADBEEF)); // Call event     }  }   If you need anymore information, please let me know in the comments. The stack trace being produced from this code is:  Exception in thread "main" java.util.ConcurrentModificationException     at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:909)     at java.util.ArrayList$Itr.next(ArrayList.java:859)     at org.ardenus.engine.list.ConcurrentLoop.callEvent(ConcurrentLoop.java:72)     at org.ardenus.engine.list.ConcurrentLoop.main(ConcurrentLoop.java:81)

We all know you can't do the following because of ConcurrentModificationException:  for (Object i : l) {     if (condition(i)) {         l.remove(i);     } }   But this apparently works sometimes, but not always. Here's some specific code:  public static void main(String[] args) {     Collection<Integer> l = new ArrayList<>();      for (int i = 0; i < 10; ++i) {         l.add(4);         l.add(5);         l.add(6);     }      for (int i : l) {         if (i == 5) {             l.remove(i);         }     }      System.out.println(l); }   This, of course, results in:  Exception in thread "main" java.util.ConcurrentModificationException   Even though multiple threads aren't doing it. Anyway.  What's the best solution to this problem? How can I remove an item from the collection in a loop without throwing this exception?  I'm also using an arbitrary Collection here, not necessarily an ArrayList, so you can't rely on get.


I have a question regarding limits.  Recently in a math class, my teacher states that $\frac{\sin x}{x}$ goes to $1$ hence in the case of a $\lim_{x\to 0} \frac{x}{\sin x}$, the answer is $1$.  Why is that so? Shouldn't the answer be $0$ in this case?

How can one prove the statement $$\lim_{x\to 0}\frac{\sin x}x=1$$ without using the Taylor series of $\sin$, $\cos$ and $\tan$? Best would be a geometrical solution.  This is homework. In my math class, we are about to prove that $\sin$ is continuous. We found out, that proving the above statement is enough for proving the continuity of $\sin$, but I can't find out how. Any help is appreciated.


I'm running a postfix installation on ubuntu 10.04 LTS with multiple domains. The relay access requires authentication with STARTTLS. This morning one of the user accounts logged in and sent hundreds of spam mails as I can see from the log. The actual owner of this account informed me of receiving multiple DSN Mails.  The logs do not show any signs of a bruteforce attack for the password, so I'm guessing there are only 2 options left:  a) The users password has been stolen (i've already changed it and since then no further incedences occured) b) There's something wrong with the authentication mechanism.   Does anybody have further suggestions on how to investigate on such a topic?  Here is a snippet of the log, when the authentication happend:  Apr 28 09:17:44 vs1909 postfix/smtpd[13325]: connect from unknown[217.76.201.194] Apr 28 09:17:45 vs1909 postfix/smtpd[13325]: 1458F1409A: client=unknown[217.76.201.194], sasl_method=PLAIN, sasl_username=mail@xxxxxx.tld

This is a  about Server Security - Responding to Breach Events (Hacking)   See Also:                  Canonical Version I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism:   What are my first steps? When I arrive on site should I disconnect the server, preserve "evidence", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning?   Original Version       2011.01.02 - I'm on my way into work at 9.30 p.m. on a Sunday because our server has been compromised somehow and was resulting in a    attack on our provider. The servers access to the Internet   has been shut down which means over 5-600 of our clients sites are now   down. Now this could be an FTP hack, or some weakness in code   somewhere. I'm not sure till I get there.      How can I track this down quickly? We're in for a whole lot of   litigation if I don't get the server back up ASAP. Any help is   appreciated. We are running Open SUSE 11.0.            2011.01.03 - Thanks to everyone for your help. Luckily I WASN'T the only person responsible for this server, just the nearest. We managed   to resolve this problem, although it may not apply to many others in a   different situation. I'll detail what we did.      We unplugged the server from the net. It was performing (attempting to   perform) a Denial Of Service attack on another server in Indonesia,   and the guilty party was also based there.      We firstly tried to identify where on the server this was coming from,   considering we have over 500 sites on the server, we expected to be   moonlighting for some time. However, with SSH access still, we ran a   command to find all files edited or created in the time the attacks   started. Luckily, the offending file was created over the winter   holidays which meant that not many other files were created on the   server at that time.      We were then able to identify the offending file which was inside the   uploaded images folder within a  website.      After a short cigarette break we concluded that, due to the files   location, it must have been uploaded via a file upload facility that   was inadequetly secured. After some googling, we found that there was   a security vulnerability that allowed files to be uploaded, within the   ZenCart admin panel, for a picture for a record company. (The section   that it never really even used), posting this form just uploaded any   file, it did not check the extension of the file, and didn't even   check to see if the user was logged in.      This meant that any files could be uploaded, including a PHP file for   the attack. We secured the vulnerability with ZenCart on the infected   site, and removed the offending files.      The job was done, and I was home for 2 a.m.            The Moral   - Always apply security patches for ZenCart, or any other CMS system for that matter. As when security updates are released, the whole   world is made aware of the vulnerability.   - Always do backups, and backup your backups.   - Employ or arrange for someone that will be there in times like these. To prevent anyone from relying on a panicy post on Server   Fault.


I am trying to read the nested elements in the xml below. So far I have been able to read data in chantier/data element, but now the problem lies in how can I read the data inside <questions><sitePreparation> and <ctm>? Xml file and code have been shorted a bit because they are too long. Any help is much appreciated.  <?xml version="1.0" encoding="UTF-8"?> <Audit>     <controls>         <guid>            0001         </guid>         <templateVersion>                     1.0         </templateVersion>     </controls>     <chantier>         <data>             <V2>V2</V2>             <V3>V3</V3>             <V3_1>V3_1</V3_1>             <V4>V4</V4>             <oresTiersPanel>                 <S1_2>S1_2</S1_2>             </oresTiersPanel>             <agentsTiersPanel>                 <S1_2_2>S1_2_2</S1_2_2>             </agentsTiersPanel>         </data>         <questions>             <sitePreparation>                 <P1_Question>P1_Q</P1_Question>                 <P6_Question>P6_Q</P6_Question>             </sitePreparation>             <ctm>                 <C1_Question>C1_Q</C1_Question>                 <C2_Question>C2_Q</C2_Question>                 <C2_1>C2_1</C2_1>             </ctm>         </questions>     </chantier> </Audit>     private static void ReadXml() {     XDocument xdoc = XDocument.Load("sipp.xml");      if (xdoc.Root != null)     {         var chantier = from ch in xdoc.Root.Elements("chantier").Elements("data")                        let agentsTiersPanel = ch.Element("agentsTiersPanel")                        where agentsTiersPanel != null                        select new             {                 v2 = (string)ch.Element("V2"),                 v3 = (string)ch.Element("V3"),                 v3_1 = (string)ch.Element("V3_1"),                 v4 = (string)ch.Element("V4"),                 S1_2_2 = (string)agentsTiersPanel.Element("S1_2_2"),                 S1_2_2_1 = (string)agentsTiersPanel.Element("S1_2_2_1"),                 S1_2_3 = (string)agentsTiersPanel.Element("S1_2_3"),                 S3 = (string)ch.Element("S3"),                S3_1 = (string)ch.Element("S3_1"),                 P1_Question = (string)ch.Element("P1_Question")             };          foreach (var item in chantier)         {             Console.WriteLine(item.v2 + " " + item.v3);         }     } }

I got this XML file:  <root>     <level1 name="A">         <level2 name="A1" />         <level2 name="A2" />     </level1>     <level1 name="B">         <level2 name="B1" />         <level2 name="B2" />     </level1>     <level1 name="C" /> </root>   Could someone give me a C# code using LINQ, the simplest way to print this result: (Note the extra space if it is a level2 node)  A   A1   A2 B   B1   B2 C   Currently I got this code:  XDocument xdoc = XDocument.Load("data.xml")); var lv1s = from lv1 in xdoc.Descendants("level1")            select lv1.Attribute("name").Value;  foreach (var lv1 in lv1s) {     result.AppendLine(lv1);      var lv2s = from lv2 in xdoc...??? }


I have an innocent question.  What is time?  Can travelling near the speed of light make a person younger relative to others who don't? Then, is there any impact on the body (atoms, molecules etc) of the person who travels at almost light speed? If so, what is the nature of that effect?

This is an attempt to gather together the various questions about time that have been asked on this site and provide a single set of hopefully authoritative answers. Specifically we attempt to address issues such as:   What do physicists mean by time? How does time flow? Why is there an arrow of time?


I am facing certificate error when recording HTTP(S) request in jmeter 2.11.  For testing purpose i am using  but the moment i access the URL after starting proxy server,i get the certification error on webpage.  I have installed the jmeter Root-CA certificate multiple times but still no success. Please advise.

I'm using Apache JMeter 2.3, which now supports "attempt HTTPS spoofing" under the Proxy Server element.   I've tried this on several different servers, and have had no success.  Has anyone been able to successfully record from an HTTPS source with this setting?  Or barring successfully recording, can anyone share a work-around? When available, I simply have HTTPS turned off at the server level, but this is not always feasible. Thoughts?


T=$\left\{R\vert R \text{ is a total order over } \mathbb{N}\right\}$  Prove that T and $2^\mathbb{N}$ are equinumerous.

Let's define a set $T_A$ which is the set of all total order relations on $A$.  This set is a subset of the set of all $2$-adic relations on $A$: $$T_A \subset \mathcal P(A^2) $$   1-Which is the cardinality of $T_A$?  2-Which is the standard notation for the set $T_A$?


How can I search my entire Linux filesystem for all python files (files with extension .py)? I know I can do find -name filename but how can I do it for file type?

I want to search for all .conf files in /etc/. I tried grep -r *.conf /etc, but the result isn't right. What am I doing wrong?


I'm making a soldier with night vision goggles on his head with Illustrator.  I have duplicate the right half of the NVG into the left half.  However, if I were to make any changes on the right half, the changes wouldn't carry over to the left half. The other way around wouldn't work either.  Is there a way to sort of "bind" them together, so that changes to one will carry over to the other?

Is there any any "Symmetry Modifier" option in illustrator?   Let's say I want to create a head that is totally symmetric. I created one half then mirrored it to get another half. Flipped the other half, aligned them and joined them together with Pathfinder→Unite option.   Now I modified some portion of the right half outline. But how can I get that same modification to be updated on the left option? I thought it would happen automatically.


Inspired by the recent question: ""  Answers there are basically debating whether improvised attacks with magic items count as magical attacks when perhaps there are options besides improvised attacks with magic items to accomplish that goal.  To hopefully get at something there, I'm asking this separately; I'm wondering whether an improvised attack made using a magic item (like a broom of flying or even throwing a ring of spell storing) actually counts as magical and thus overcomes resistances to non-magical attacks/damage.   Note that the other question asks about any way to accomplish having improvised attacks count as magical, and I'm asking whether this specific method works (instead of having it be disagreed upon in answers over there).

Stemming from , there seems to be ambiguity if a magic item being used for an improvised attack is a magical attack. The PHB describes an improvised weapon as:  Sometimes characters don’t have their Weapons and have to Attack with whatever is at hand. An Improvised Weapon includes any object you can wield in one or two hands, such as broken glass, a table leg, a frying pan, a wagon wheel, or a dead Goblin. Often, an Improvised Weapon is similar to an actual weapon and can be treated as such. For example, a table leg is akin to a club. At the GM’s option, a character proficient with a weapon can use a similar object as if it were that weapon and use his or her Proficiency Bonus.  Is the improvised weapon attack with a magic item considered a "magical improvised weapon" if it doesn't fall into the second descriptor of being "similar to an actual weapon"? Some similar, but not exactly the same, questions have been asked, such as .


According to the definition of $\epsilon$-$\delta$ of a limit we have:  $\forall \epsilon \gt 0$, $\exists \delta \gt 0$ such that  $$0 \lt |x-a| \lt \delta \implies |f(x)-L|\lt \epsilon$$  Now I tried to prove $$\lim_{x \to 0}\frac{\sin x}{x}=1$$  We are given $\epsilon$ and we need to figure out $\delta$  So we have:  $$\left|\frac{\sin x}{x}-1\right|\lt \epsilon$$  Assuming $x \gt 0$ we get  $$|\sin x-x|\lt x\epsilon$$  and for $x \gt 0$ we have $x \gt \sin x$  So  $$x-\sin x\lt x\epsilon$$  $$x(1-\epsilon)\lt \sin x \lt 1$$  So we get  $$x \lt \frac{1}{1-\epsilon}$$  Hence $$\delta=\frac{1}{1-\epsilon}$$  Now I took $\epsilon=0.01$ to get $\delta=\frac{100}{99}=1.0101\cdots$  Now $$\left|\frac{\sin 1.0101...}{1.0101...}-1\right|=|0.8384-1|=0.161$$  But $$0.161 \gt \epsilon=0.01$$  Why is this contradictory?

It is well known that   $$\lim_{x \rightarrow 0} \frac {\sin(x)}{x} = 1$$  I know several proofs of this: the geometric proof shows that $\cos(\theta)\leq\frac {\sin(\theta)}{\theta}\leq1$ and using the Squeeze Theorem I conclude that $\lim_{x \rightarrow 0} \frac {\sin(x)}{x} = 1$, other proof uses the Maclaurin series of $\sin(x)$. My question is: is there a demonstration of this limit using the epsilon-delta definition of limit?


I have used biber succesfully, but now I have ran into a problem. My pdf files look like this: This citation is not working (eco_theory_1979).  When I typeset this tex file:  \documentclass[a4paper,12pt]{article} \usepackage{fontspec} \usepackage[norsk]{babel} \usepackage[style=apa,backend=biber]{biblatex} \DeclareLanguageMapping{norsk}{norsk-apa} %\addbibresource{test.bib} \bibliography{test}  \begin{document}  This citation is not working \parencite{eco_theory_1979}.  \printbibliography  \end{document}       Here is the bib file  @book{eco_theory_1979,     Address = {Bloomington, {IN}},     Author = {Eco, Umberto},     Date-Added = {2014-07-28 17:35:21 +0000},     Date-Modified = {2014-07-28 17:35:21 +0000},     Isbn = {0253202175, 9780253202178},     Publisher = {Indiana University Press},     Title = {A theory of semiotics},     Year = {1979}}   This is what the log file reports:  No file test.bbl. LaTeX Warning: Citation 'eco_theory_1979' on page 1 undefined on input line 13. LaTeX Warning: Empty bibliography on input line 15. LaTeX Warning: There were undefined references. Package biblatex Warning: Please (re)run Biber on the file: (biblatex)                test (biblatex)                and rerun LaTeX afterwards.   Previously I have compiled similar files without problems. There seem to be a problem that no bbl file is created. I am using TexPad on a Mac and have tried to compile in several ways (autodetect, bibtex...) I will be very happy if anyone can help

I'm trying to use biblatex and when I compile my document I get an error like the following:  Windows  data source C:\Users\<username>\AppData\Local\Temp\par-5061756c\ cache-890efc00b3ca6b775c7d44a325c1349fb2a3a3bd\inc\lib/Biber/LaTeX/recode_data.xml not found in .   Mac  data source /var/folders/v2/rld0ls7d2935gkvqv5hfr1x00000gn/T/par-616c616e/ cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/LaTeX/recode_data.xml not found in .   Linux  data source /tmp/par-6963617269756d/cache-f37ab610b7d79b2720a8ee3732849c6821705520 /inc/lib/Biber/LaTeX/recode_data.xml not found in .


I recently spilled some brake oil on my brake pads and now they barely work, and they squeak (which I believe is normal for contaminated pads.)

In trying to change the brake pads on my mountain bike, I managed to get oil on my new pads and empty out all the brake fluid, and consequently also get some oil on the disc. I took the bike to the shop and they are now telling me I need to change the pads and the disc. I can understand the pads, but do I really need to change the disc or is the guy (girl actually) just scamming me. The disc is not soaking in oil, from what I can tell it just has a bit of oil here and there.


I have Windows 10 installed in my laptop and i'd like to install Ubuntu 18.04 too. I just create a bootable USB and install Ubuntu (with the option 'Install alongside Windows 10')? Is there anything I need to do with Secure Boot? As i see in System Information my BIOS Mode is in Legacy and secure boot is unsupported. Do I proceed with the installation or do I have to change any values from BIOS or anywhere else?

I would like to see a full how-to guide on how to install Ubuntu.


I just saw a user who has   to  a question on Meta. Judging by the edit comments, the user seems to be mistaken about the nature of Meta Stack Overflow.  I would like to point this out to the user, but this user has no posts on any Stack Exchange sites; this user's reputation comes strictly from suggested edits.  Can we @-comment the submitter of a rejected edit? It would be helpful in showing editors how the system works.

Within the canonical answer on  it is clear that post editors can be replied to.      Notifications apply to the author, users with active bounties,   commenters (associated to current non-deleted comments), and editors   of the question or answer that you are commenting on—users not in that   list cannot be notified. You can also notify a ♦ moderator who closed   the question. The question and answers are all considered   independently. For example, if Alice was the author of, commented on,   or edited the question or her answer, then you cannot notify her by   commenting on Bob's answer (unless Alice also participated in that   answer), and vice versa.   However, thanks to , it has become clear that this only applies to approved editors (in addition to binding editors). I wish to request that comment replies be extended to include any user who suggested a rejected edit on the post.  Background The reason I would wish to reply to a rejected editor would be if their edit, while inappropriate, hinted at important information; for example that the answer was wrong or incomplete. In those cases I may wish to encourage them to outline this in a comment or competing answer.


I have no idea where to start this question.

Show that there doesn't exist a relation $\succ$ between complex numbers such that (i) For any two complex numbers $z,w$, one and only one of the following is true: $z\succ w,w\succ z,$ or $z=w$ (ii) For all $z_1,z_2,z_3\in\mathbb{C}$ the relation $z_1\succ z_2$ implies $z_1+z_3\succ z_2+z_3$. (iii) For all $z_1,z_2,z_3\in\mathbb{C}$ with $z_3\succ 0$, then $z_1\succ z_2$ implies $z_1z_3\succ z_2z_3$.  Suppose $i\succ 0$. From (iii) we have $i^2\succ 0$, so $-1\succ 0$, so applying (ii) we get $0\succ 1$. But repeating (iii) on $-1\succ 0$ we get $1\succ 0$, a contradiction. So either $i=0$ or $0\succ i$. How can I proceed from here?


We have a system that automatically uppercase's all characters in the salesforce 18 character ID, so for example 0060H00000mbAZlQAM versus 0060H00000MBAZLQAM. Salesforce does not accept the latter as valid whereas the former is valid, which is contrary to our memory of how the case insensitive ID's worked. Is there any information on how to get the proper case sensitive ID from the case insensitive ID (One where the 15 char bit has had its cases jumbled up)?

I have an 18 character SFDC ID. I was under the impression that I should be able to create a link to that record using the following pattern: https://<org server>.salesforce.com/<id>  For example: https://na12.salesforce.com/00TU000000Nf5NP  That link works fine for me. However, when I try to link to the same object using the 18 character, case insensitive ID (ex. https://na12.salesforce.com/00tu000000nf5npmaz), I get the following error:     Insufficient Privileges      You do not have the level of access necessary to perform the operation   you requested. Please contact the owner of the record or your   administrator if access is necessary.   What exactly is the problem? If all I have is the 18 character ID, how can I create a link back to the correct SalesForce record?


I'm working on simple encrypt/decrypt machine in Java with decorators(FilterOutputStream and FilterInputStream). I have done CipherOutputStream which works fine, encrypt message and then write it into file. But when I want to read bytes to decrypt them and save something strange happens. While reading first package from buffor (buffor is set to send me 32 bytes) it always return "[B@b59d31", and when I read next packages its still the same.(https://imgur.com/a/BaAjqVA) Someone can explain me what can be wrong? Here's my CipherOutputStream: package gof.decorator;  import java.io.*;  public class CipherInputStream extends FilterInputStream {           public CipherInputStream(InputStream inputStream) {         super(inputStream);     }          public byte[] decrypt(byte[] b) { //here is my decrypt code, it doesnt matter         return b;     }          @Override     public int read() throws IOException {         try {             int val = super.read();             if (val == -1)                 close();             return val;         } catch(IOException e) {             close();             throw e;         }     }     @Override     public int read(byte[] b,int off, int len) throws IOException {         try {             System.out.println(b.toString());             int val = super.read(decrypt(b),off,len);             if (val == -1)                 close();             return val;         } catch(IOException e) {             close();             throw e;         }     }     @Override     public int read(byte[] b) throws IOException {         return read(b,0,b.length);     }  }   And here is how I'm copying my encrypted file to newFile: private void copyAndClose(InputStream in, OutputStream out, int buffor) throws IOException {         byte[] array = new byte[buffor];         int count;         while ( (count=in.read(array)) != -1) {                 out.write(array,0,count);         }         in.close();         out.close();     }

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 doing a sort of donut for my first time in Blender. I'm at a point where my icing is seen from the different views except when I'm in the rendeder view. I tried a few things like enable camera in the ray visibility or some others but no one works. It really weird because the springles on top of it are shown but not the icing. Can someone help me, I'm a beginner on it so I don't know how to fix it ?? Below there are the first image that is from the viewport shading and the second one is from the render. Thank you in advance.

Just started out Blender, and as my first project, I made Blender Guru's donuts. The problem is, when I go rendering, there are A MASSIVE amount of sprinkles, quite different from the Viewport. Here are some screenshots:      You can find the file ! Any help is appreciated!


Greetings, I've recently came across this poster and would like to learn how the background effect was achieved, can you please suggest tips in order to start moving on.

I know it can  be done using Wind filter. I have tried. But it's not giving the fusion of multiple colors like this. I am unable the get feel of multiple layers of multiple colors.


i want to assign one object to an other object to change one object and still have the original object remain unchanged. Since the two objects become just one in the storage with two pointers pointing at it this does not work. How do copie objects with different pointers but the same values.  What is the propper way to do that? $(document).ready(function(){          var object1 = new theObject("hello");              var object2 = new theObject("hello again");              object1 = object2;          object1.value = "newValue";          //  object1.value = "new Value"     //  object2.value = "new Value"  //should be "hello again"        alert("object1: " + object1.value + " object2: " + object2.value );    });  class theObject{     constructor(value){         this.value = value;     } }  this works but its not so nice if you have a return value that is an object: var objKeys = Object.keys(object1); for (let objKey of objKeys){     object1[objKey] = object2[objKey]; }

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 am trying to upgrade from 15.04 to Ubuntu 16.04.01 on a Lenovo ThinkPad T410 and the upgrade has frozen while unpacking libyates 5.2.0 and the terminal screen has a microsoft EULA for configuring ttf-mscorefonts-installer which appears to require acceptance but the  button isn't really there as it is a txt doc. What to do??

After a recent update, ttf-mscorefonts-installer prompted me to accept its license agreement.     ┌─────────────────┤ Configuring ttf-mscorefonts-installer ├─────────────────┐  │                                                                           │   │ TrueType core fonts for the Web EULA                                          │                                                                               │ END-USER LICENSE AGREEMENT FOR MICROSOFT SOFTWARE                             │                                                                               │ IMPORTANT-READ CAREFULLY: This Microsoft End-User License Agreement           │ ("EULA") is a legal agreement between you (either an individual or a          │ single entity) and Microsoft Corporation for the Microsoft software           │ accompanying this EULA, which includes computer software and may include      │ associated media, printed materials, and "on-line" or electronic              │ documentation ("SOFTWARE PRODUCT" or "SOFTWARE"). By exercising your          │ rights to make and use copies of the SOFTWARE PRODUCT, you agree to be        │ bound by the terms of this EULA. If you do not agree to the terms of          │ this EULA, you may not use the SOFTWARE PRODUCT.                              │                                                                               │                                  <Ok>                                         │                                                                           │   └───────────────────────────────────────────────────────────────────────────┘    Screenshot:   For some reason my terminal will not allow me to accept, or for some reason I am pressing the wrong hotkey...  I've tried every letter on the keyboard and Enter among others...  I'm sure there is a very simple and obvious solution to this.  I've also just tried to remove the package completely however the terminal states that due to the package not being correctly installed, I should reinstall the package before removing it.  Very frustrating!  Essentially, because I cannot successfully install this package, I can't really ever upgrade my system because I always have to end up terminating the terminal with the license agreement (thus the upgrade fails).


An example being:  "The chain of kindness begins with donations from individuals, foundations and businesses who (or that) truly believe in our mandate and mission."

I generally use the rule of thumb of using who when referring to a person and that when referring to an object. Example:  Jim is someone who makes me smile. I was nearly knocked out by the ball that hit me.  But what about when we're talking about an organisation?  I am forever indebted to the charities who helped me. I am forever indebted to the charities that helped me.  The former seems somewhat warmer, if that makes sense, although the latter feels more correct. What should I use? And how about this:  I'm really happy with the insurance company who helped me with my claim. I can't stand them, they're the insurance company that ripped me off.  To me the former evokes a team of helpful people while the latter evokes a cold heartless corporate entity. Is this just a matter of style and so should go with my instincts, or should I aim for what is 'correct?'


Do both sentences (below) have the same meaning?  He was doing landscape work before he was hired by the taxi company. He had been doing landscape work before he was hired by the taxi company.

Non-native speakers often get confused about what the various tenses  and aspects mean in English. With input from some of the folk here I've put together a diagram that I hope will provide some clarity on the matter.  I offer it as the first answer to this question. Consider it a living document. Input is welcome, and good suggestions will be  incorporated into the diagram.    Nota bene: What this is not is a discussion of whether there are  more than two tenses in English. , to which this question is not intended to supply arguments one way or the other.  Here, the aim is to provide an overview of what constructions English-speaking people use for conveying information about actions referring to past, present, and future, and to provide it first and foremost to precisely the people who are likely to use "tense" as a catch-all term in their search, rather than to linguists who know better.  Breaking News There is now an excellent ELU blog article titled  . It is highly recommended reading.


Can we set somehow Nemo or Nautilus, to show hidden files per directory like the sorting, for example?

I wanted to add classpath to my JDK. While searching a way to do it I noticed everyone open .profile file using terminal. But when I want to open and edit it with a text editor I couldn't see that file in Home folder.  Can someone tell me why is this. And also if possible how can I access .profile in home folder the GUI way.


I use Ubuntu 13.04 32bit in a dell studio 1537. Its been a couple of days, I see a error/warning sign (a red triangle with exclamation sign in it) on the top bar. Clicking on it the message says, "The update information is outdated. This may be caused by network problems or by a repository that is no longer available. Please update manually by clicking on this icon and then selecting 'Check for updates' and check if some of the listed repositories fail." There is no network problem since internet works fine. When I check for updates, shows your computer is up to date   is the output of sudo apt-get update

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors?


On the Stack Overflow mobile app I couldn’t figure out how to award an answer, but I was able to do it on the Stack Exchange mobile app.  Thus, I had a better experience with the Stack Exchange app over the Stack Overflow app. Are there any benefits to having both apps? Can I do everything on the Stack Exchange app that I can do on the Stack Overflow app? I’d also like for the Stack Overflow app to add the functionality of awarding answers. I think that may be a bug.

So, if someone wants to install the Stack Exchange apps on Android, they search the Google Play store, and they find two different Stack Overflow/Exchange apps. This is quite confusing, since both seem official and are made by the same developer.    To see what all this is about, I have installed both of them. It seems like the Stack Overflow app only allows users to browse Stack Overflow questions, while the Stack Exchange app allows browsing of all SE sites. But, other than that, they are the same app. Both seem to look the same, are updated at the same time, and have the exact same updates.  So, why have two apps?


This is a weird question, I know, it's simply food for thought. It states in the PHB that casting a wish spell for any other effect than duplicating another spell causes a stress that can, among other things, cause you to never be able to cast the spell again. Now lets say you have two wizards who can cast this spell and one loses its ability to cast the wish spell, would the other wizard be able to use the wish spell to let the other mage regain it's ability to cast the spell?

After reading this question on , I started wondering if there are ways for them to regain that ability.  I figured a Divine Intervention is probably strong enough as that is a god's power, as well as a second caster casting wish to undo the first wish (and thereby undoing its effects).  Are these valid ways of regaining the ability to cast wish?


Apologizing for the simple question as I'm still learning C#, is there a way to use one function that does some math, and returns the output but not having to create multiple functions (each for different types)? So instead of copying and pasting the same function and changing 'int' to 'float' and 'double' etc, can I make them all work within 1 function?  So I don't have to have:  public int DoMath(int input) {      //do stuff     //return some int }  public float DoMath(float input) {      //do stuff     //return some int }

Can anyone tell me if there is a way with generics to limit a generic type argument T to only:   Int16 Int32 Int64 UInt16 UInt32 UInt64   I'm aware of the where keyword, but can't find an interface for only these types,  Something like:  static bool IntegerFunction<T>(T value) where T : INumeric


I'm struggling to prove $$k\binom{n}{k}=n\binom{n-1}{k-1}$$   Here's what I'm doing:  $$k\binom{n}{k}=\frac{k\cdot n!}{k!(n-k)!}=\frac{k\cdot n\cdot(n-1)!}{k(k-1)!(n-k)!}=n\frac{(n-1)!}{(k-1)!(n-k)!}$$  I see the problem that in the denominator we have $(n-k)!$ I guess it should be $(n-(k-1))!=(n-k+1)!$ to make the whole fraction equal $n\binom{n-1}{k-1}$  What's the problem?

I've seen many posts regarding a combinatorial proof of the following question. But for a non-combinatorial proof would the following method work? Also... is this the easiest way to arrive at a proof? It seems to be rather verbose.  Show the formula $k {n\choose k} = n {n-1 \choose k-1}$ is true for all integers $n,k$ with $0\le k \le n$.  My answer:  Observe that  $$\begin{align*} {n\choose k}&= \frac {n}{k} {n-1 \choose k-1}\\ &= \frac {n}{k}\left[ {n-2 \choose k-2} + {n-2 \choose k-1}\right]\\ &= \frac {n}{k}\left[ \frac{(n-2)!}{(k-2)!(n-2-(k-2))!} + \frac {(n-2)!}{(k-1)!(n-2-(k-1))!}\right]\\ &= \frac {n}{k}\left[ \frac{(n-2)!}{(k-2)!(n-k)!} + \frac {(n-2)!}{(k-1)!(n-k-1)!}\right]\\ &= \frac{(n-1)!}{(k-1)!(n-k)!} + \frac {(n-1)!}{(k)!(n-k-1)!}\\ &= \frac{(n-1)!}{(k-1)!(n-1-(k-1))!} + \frac {(n-1)!}{(k)!(n-1-k)!}\\ &={n-1 \choose k-1} + {n-1 \choose k}={n \choose k}. \end{align*}$$


I bought a new letterbox lock (Burgwächter ZBK-70, ), but the bar is too short. I'd like to exchange that bar, but I have no clue how to loosen the bolt. So far, I tried it with telecom pliers, but it didn't work. What is this black washer-like thing underneath the nut, by the way?

I would like to remove the wheel that is being held in by this contraption:     I tried to use a standard socket wrench, but couldn't get just the right size: 1/2" or 13mm seems too small; 5/8" or 14mm seems too big. Also, I'm not sure if there's a trick involving the black part.  What's that called? Is there a special technique?  The other end of the rod looks the same.


I was looking for a file in my source and tried both locate and find. Surprisingly locate was searching in entire machine and was faster than find, which was searching only in current directory and sub directories.    Here are my shell commands for both:  find . -name vendorsetup.sh # takes 50 seconds to search all files in curren -sub directories.  locate vendorsetup.sh # takes 20 seconds to search file in whole machine.   Why this?

Searching a keyword in linux terminal using the locate command gives answer in a short time. What is the search algorithm used?


I need a good resource to learn matrices and all its properties through geometry. I feel geometry gives an insight into many matrix operations and a good resource will be useful for many students who wish to get a better insight into matrices.

I'm interested in knowing some geometric interpretation of matrices. Can you suggest any lecture note or textbook or anything else about it? I've just finished an undergraduate course in linear algebra, so do not suggest any linear algebra book please, I just want to know more about this topic. Examples of what a mean by "geometric interpretation" are  and .


As far as I know, square brackets are used to enclose an expression usually in if else statements.  But I found square brackets being used without the "if" as follows:  [ -r /etc/profile.d/java.sh ] && . /etc/profile.d/java.sh   in the following script.  #!/bin/bash### BEGIN INIT INFO   # Provides:          jbossas7   # Required-Start:    $local_fs $remote_fs $network $syslog   # Required-Stop:     $local_fs $remote_fs $network $syslog   # Default-Start:     2 3 4 5   # Default-Stop:      0 1 6   # Short-Description: Start/Stop JBoss AS 7   ### END INIT INFO   # chkconfig: 35 92 1    ## Include some script files in order to set and export environmental variables   ## as well as add the appropriate executables to $PATH.   [ -r /etc/profile.d/java.sh ] && . /etc/profile.d/java.sh   [ -r /etc/profile.d/jboss.sh ] && . /etc/profile.d/jboss.sh    JBOSS_HOME=/sw/AS7    AS7_OPTS="$AS7_OPTS -Dorg.apache.tomcat.util.http.ServerCookie.ALLOW_HTTP_SEPARATORS_IN_V0=true"   ## See AS7-1625   AS7_OPTS="$AS7_OPTS -Djboss.bind.address.management=0.0.0.0"   AS7_OPTS="$AS7_OPTS -Djboss.bind.address=0.0.0.0"    case "$1" in       start)           echo "Starting JBoss AS 7..."           #sudo -u jboss sh ${JBOSS_HOME}/bin/standalone.sh $AS7_OPTS           ##  If running as user "jboss"           #start-stop-daemon --start --quiet --background --chuid jboss --exec ${JBOSS_HOME}/bin/standalone.sh $AS7_OPTS   ## Ubuntu           ${JBOSS_HOME}/bin/standalone.sh $AS7_OPTS &       ;;       stop)           echo "Stopping JBoss AS 7..."           #sudo -u jboss sh ${JBOSS_HOME}/bin/jboss-admin.sh --connect command=:shutdown            ##  If running as user "jboss"           #start-stop-daemon --start --quiet --background --chuid jboss --exec ${JBOSS_HOME}/bin/jboss-admin.sh -- --connect command=:shutdown     ## Ubuntu           ${JBOSS_HOME}/bin/jboss-cli.sh --connect command=:shutdown       ;;       *)           echo "Usage: /etc/init.d/jbossas7 {start|stop}"; exit 1;       ;;   esac    exit 0     What do square brackets do without the "if"? I mean, exactly, what do they mean when used in that context?  This isn't a duplicate of  in which the OP used "if" which I don't have a problem with. In this question, brackets were used in a counter intuitive way. That question and this question may have the same answer but they are two different questions.

I'm confused with using single or double brackets. Look at this code:  dir="/home/mazimi/VirtualBox VMs"  if [[ -d ${dir} ]]; then     echo "yep" fi   It works perfectly although the string contains a space. But when I change it to single bracket:  dir="/home/mazimi/VirtualBox VMs"  if [ -d ${dir} ]; then     echo "yep" fi   It says:  ./script.sh: line 5: [: /home/mazimi/VirtualBox: binary operator expected   When I change it to:  dir="/home/mazimi/VirtualBox VMs"  if [ -d "${dir}" ]; then     echo "yep" fi   It works fine. Can someone explain what is happening? When should I assign double quotes around variables like "${var}" to prevent problems caused by spaces?


Prove $(n-1)! = -1 \ (\textrm{mod n})$ iff n is prime  I can understand how the first part of the proof $(n-1)!=-1 \ (\textrm{mod n})$ is true if n is prime simply by testing it out. However, I'm unsure of how to go about proving it.

How can I show that $(n-1)!\equiv-1 \pmod{n}$ if and only if $n$ is prime? Thanks.


When I cite a paper in the main text with more than 2 authors I want biblatex to add et al. This is happening but at the end of the document in References only one author is shown with et al.  \usepackage[backend=biber,style=authoryear,dashed=false,natbib=true,url=true,bibencoding=utf8]{biblatex}   This is what I get    Any ideas please?

I'm using the  package to add citations and a bibliography to my LaTeX document. I've noticed that only the first author plus "et al." is displayed for works with more than three authors. That's fine with me for in-text-citations, but I'd rather have the complete author information in the bibliography. How can I do that?


I was playing Minecraft 1.14.4 Java Edition, and I'm not the owner of this PRO (my friends and I paid for this server and it included a lot of features and open 24/24) multiplayer server. I was running from the beach that I made it myself into the house (I made the house above water surface) to get some stuffs, suddenly the game stopped and it told me that “Connection Lost”.   After trying to reconnect a few times, finally I can get to the game. As usual, people will spawn in the place that they stood last time, everything disappeared and I dived into the water below my house. At first I thought it was not 100% loading so I restarted the game and it still showed me that a part of my house disappearing. The strange thing that the house was missing in the perfect way (rectangle). And there is no one in the server except me because that time was around 3:15am.  I am really messed up now and I have no idea of what is going on... Can someone help me to figure out why my house disappeared?  Bellow are some images of where my house is missing.  Update: I came to check all the houses of my friends and some of them have this problem. But I have the biggest house damage. Our houses are very FAR (so far) away from each other and it takes us about 5-8 min to walk to each other’s houses.

I was playing Minecraft 1.6.2 survival mode (normal difficulty), and I built a house. Then I went far away to explore a cave. When I got back, part of my house had simply disappeared.     As you can see, a part of my house just vanished. There used to be walls and a roof, but not anymore.     The stranger thing is, the wooden floor just turned into a perfect square of dirt.    There also used to be a pond nearby, but part of the pond also turned into dirt. (as indicated by the redstone circuit.)    Fences are gone. My iron golem and a cat are nowhere to be found. The whole area encircled by the redstone simply turn into dirt.  I thought of a creeper explosion. Yes, I might have left the gate open, and yes a creeper might be able to sneak into the house, (if it managed to get pass my two cats). It seems unlikely that an explosion would occur. There is no hole on the ground, and the roof is gone too. I don't think the blast radius is that large. The house was fine when I left. Doesn't a creeper has to be near me to trigger an explosion?  I am really puzzled. Can somebody explain what happened? I would be very grateful.


Trying to write a regular expression to check if the sentence as metacharacters "I need to make payment of $50 for the purchase, should i use CASH|CC". In this sentence i need to identify if metacharacters are present. \\\\$ or ^(\\\\$)\\$. What is the right syntax for Pattern.matches("^([\\\\$]$)", text); to identify the special characters. I don't need to replace just identify if the sentence contains these characters.

I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?


On Ubuntu 17.10 it looks like user can just run reboot without sudo and my computer just reboots. This does not feel safe to me and it is not what I am used to. Is there a way to disable this and require password?

For whatever reason, we do no longer need to be root (or using sudo) to run /sbin/shutdown, /sbin/reboot etc.  This seems to be because those executables are now symlinks to /bin/systemctl which handles everything as normal user.  However, what if I want shutdown and reboot to require root authentication again? How can I achieve this?


As I understand it the following shows all take place in the same shared universe:   Arrow Flash Constantine Vixen Legends of Tomorrow Supergirl ()  Freedom Fighters: The Ray   And any others that arrive.   In what order should these shows be viewed? How do they fit together chronologically?

The two TV shows  and  cross over (or so I'm told).  I've only been watching Arrow so far, and Barry Allen has . Do I need to start watching Flash episodes?  What order do I need watch these shows in?


My input field allows only characters, no digits. I want when I type that the first character is in caps and small follows and anywhere is space do same, caps and small follows, and only one space should be allowed in the input field.   $(function() {   $('#txttName').keydown(function(e) {     if (e.shiftKey || e.ctrlKey || e.altKey) {       e.preventDefault();     } else {       var key = e.keyCode;       if (!((key == 8) || (key == 32) || (key == 46) || (key >= 35 && key <= 40) || (key >= 65 && key <= 90))) {         e.preventDefault();       }     }   }); });
Name
 <input id="txttName" value="">

Is there a simple way to convert a string to Title Case? E.g. john smith becomes John Smith. I'm not looking for something complicated like , just (hopefully) some kind of one- or two-liner.


I upgraded a Mac to Mojave and found it did not function the same as previous OS. I get a lot of people want to move forward, but I wish to go back to how my Mac was  I now need to clean install Sierra again & try to get back to my comfort zone OS.  How do I plan and execute that?

Sometimes it's hard to search for older versions of macOS & OS X  on the App Store.  This is an attempt to provide the canonical QA for this issue, as per the Meta QA -  I expect it to be modified over time to hopefully become a complete information resource.  How can I get any older version of a Mac OS to be able to run as a VM, or to reinstall on my Mac?


How can I add a logout link in my websites menu? Is there a PHP code or link that I can use to be able to do this?  Thanks

I can't find a way to add the log in link to the new theme of WordPress, Twenty Twelve. I did find a lot of answers on the older theme, where . However, this do not work for me.  Does anyone have a solution for this? You can see my homepage here:


How do I put an image as my background in Google Docs?

How do I create an image behind text in Google docs (the text editor part)?


There is a red exclamation sign in the notification area. When I run sudo apt-get update the state of terminal is below:  Ign http: //bd.archive.ubuntu.com trusty/universe  Translation-en_US Fetched 3,826 kB in 54s (70.5 kB/s) N: Ignoring file 'getdeb.list.bck' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension<br> W: GPG error: http: //download.opensuse.org ./ Release: The following signatures were invalid: KEYEXPIRED 1436387333 W: Failed to fetch http: //ppa.launchpad.net/disper-dev/ppa/ubuntu/dists/trusty/main/source/Sources  404  Not Found W: Failed to fetch http: //ppa.launchpad.net/disper-dev/ppa/ubuntu/dists/trusty/main/binary-amd64/Packages  404  Not Found W: Failed to fetch http: //ppa.launchpad.net/disper-dev/ppa/ubuntu/dists/trusty/main/binary-i386/Packages  404  Not Found    E: Some index files failed to download. They have been ignored, or old ones used instead.   How should I proceed?

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors?


I'm creating a script to do rebooting of computers, and I need to report the success or failure of the shutdown.exe command as part of my script logging.  I'm having an issue with redirecting the output of failed shutdown.exe processes to a file.  Here is my command line:  shutdown.exe -r -t 50000 -m \\top34.top.local > c:\output.txt   When I run this, I see the following message on my screen: "top34.top.local: The entered computer name is not valid or remote shutdown is not supported on the target computer. Check the name and then try again or contact your system administrator.(53)", which is I am expecting, but c:\output.txt is blank - and does not contain this error.  My script needs to output this line to a text file for logging purposes.  I have also tried to wrap it around a CMD, like such:  cmd /c shutdown.exe -r -t 50000 -m \\top34.top.local > c:\output.txt   But this too produces no result.  I have also tried the double >> (append), but this makes no difference.  I've done a fair bit of investigation, and it appears that shutdown.exe will redirect output of successful commands to stdout, but not failed commands.  How can I get it to redirect both successful and failed commands to my file?  Running Windows 2012 R2

So I'm trying to run foo.exe, but I don't want the output to the terminal but into a file. Running foo.exe > foo.txt should accomplish this for me, but it's not. When I'm running the exe-file, I get the output. The exe is working fine in other words. However, when I try to send the output to a file, the only thing I get is this:  'c:/Program' is not recognized as an internal or external command, operable program or batch file.   This only shows up when I try to send it to a file. Thinking that it could be the path (which is c:\Program Files (x86)\ and so on) which is misinterpreted, I tried specifying the output file like so: foo.exe > c:\test.txt, but still no joy.  So, aside from stating that the binary that I am trying to run is poorly written, is there anything I can do to remedy this? Keep in mind that I do get valid output when simply running the exe, it just won't print nicely to a file. Obviously the output is there, the question is if there is some way to catch it.


This is the following question from   This given have bold, but I just want ordinary without bold. How can I do that?    \documentclass{article} \usepackage{bm} \newcommand{\uvec}[1]{\boldsymbol{\hat{\textbf{#1}}}} \begin{document} $\uvec{\i} \uvec{\j} \uvec{k}$ \end{document}   I had tried:  \newcommand{\uvec}[1]{\hat{\textbf{#1}}}   and   \newcommand{\uvec}[1]{\boldsymbol{\hat{#1}}}   not working.

I've been typesetting some equations, and I've found that the default behavior accents like \hat, \bar, \tilde, etc. makes a rather small and easily-missed mark. Is there some way to make the accents stand out more? In particular, is there any way to make them appear in bold (without affecting the letter they are over)?


As above. Just to avoid confusions, and prevent pro trolling... I wonder if there is dedicated place to  ask questions about Apache and WAMP

After reading , I think it might be useful to have a separate question for this subject.  Let me quote a part of :     SU and SF are generally not great places for WAMP questions...   Particularly when asked on SO, these nearly always involve someone   working with their development or testing setup (rather than, say, a   home or production server environment). If you see someone   recommending SF or SU for such questions, politely correct them.   So the argument is that since  is closely related to development, it belongs on Stack Overflow.  My concern is twofold:   It being development is irrelevant, issues appearing while using WAMP can also appear in a production environment. There might be more expertise on the subject over at .   Perhaps not many people will support my view, but it's worth asking so everybody knows how to handle such questions: what does the community think?


I'm a novice mathie - only calculus courses until this past semester, when I started Foundations of Mathematics (a bit of naïve set theory, introduction to basic proofs.)  Up to now, I have been able to complete proofs assigned by using parity, simple modular math, greatest common divisor, etc.  That being said, I am stuck on developing a proof for this.  Let $A$ and $B$ be sets. $A \cap(B-A) = \emptyset$.  The methods I have at my disposal are direct, contrapositive, and contradiction.  I would appreciate a gentle nudge in the right direction. This one has me stumped.

An exercise asks me to prove the following: $$A \cap (B-A) = \varnothing$$ This is what I did:  I need to prove that $A \cap (B-A) \subseteq \varnothing$ and $\varnothing \subseteq A \cap (B-A)$  The second one seems to be obvious by definition (not sure if it is fine to say that in a test).  But the first one goes like this: $$x \in A \cap (B-A)$$ $$x \in A \land x \in (B-A)$$ $$x \in A \land (x \in B \land x \notin A)$$ $$(x \in A \land x \notin A) \land x \in B$$ $$(x \in A \land x \notin A)$$ Since there is a contradiction... err... the proof... is good.  Okay, that's my problem. I think that the procedure is fine, but clearly I am unable to word it out (well, I don't even know if it is valid at all). Is it valid? How can I... "prove that my proof is correct"? I don't really see this contradiction as an obvious indicator of $A \cap (B-A) \subseteq \varnothing$


Is there any efficiency way to separate a string into two when detecting the first line break in the String  for example, the String like this:  String str = "line 1\n"+              "line 2\n"+              "line 3\n";   so what i want to do just separate "line 1" from the string, and the rest as another string, so finally the result as below:  string1 = "line 1"; string2 = "line 2\n"+           "line 3\n";

I'm trying to split text in a JTextArea using a regex to split the String by \n However, this does not work and I also tried by \r\n|\r|n and many other combination of regexes. Code:  public void insertUpdate(DocumentEvent e) {     String split[], docStr = null;     Document textAreaDoc = (Document)e.getDocument();      try {         docStr = textAreaDoc.getText(textAreaDoc.getStartPosition().getOffset(), textAreaDoc.getEndPosition().getOffset());     } catch (BadLocationException e1) {         // TODO Auto-generated catch block         e1.printStackTrace();     }      split = docStr.split("\\n"); }


I have project documents in D:/myprojects/payrole  In these "payrole" i have different files and different sub folders  I need to copy the files and subfolders to  E:/myprojects/payrole  copying files and subfolders from D drive to E drive   how can i do these process in windows application using c# ? please give me some idea

I want to copy the entire contents of a directory from one location to another in C#.  There doesn't appear to be a way to do this using System.IO classes without lots of recursion.  There is a method in VB that we can use if we add a reference to Microsoft.VisualBasic:  new Microsoft.VisualBasic.Devices.Computer().     FileSystem.CopyDirectory( sourceFolder, outputFolder );   This seems like a rather ugly hack. Is there a better way?


The \ref command for one of my figures is outputtig question marks ("??") instead of the reference, but it's working fine for the other figures.  Code:  \documentclass[10pt,a4paper]{article}  \usepackage[latin1]{inputenc} \usepackage{amsmath} \usepackage{textcomp} \usepackage[labelfont=bf]{caption} \usepackage{tikz} \usepackage{calc} \usepackage{array} \usepackage{multirow} \usepackage{listings} \usepackage{framed} \usepackage{lmodern}  \lstset{ basicstyle=\ttfamily, columns=fullflexible, frame=single, breaklines=true, postbreak=\mbox{\textcolor{red}{$\hookrightarrow$}\space}, }  \usepackage{float} \usepackage{xcolor} \usepackage{amsfonts} \usepackage{amsmath} \usepackage{array}  \newcolumntype{L}[1]{>  {\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} \newcolumntype{C}[1]{>  {\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} \newcolumntype{R}[1]{>  {\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}  \usepackage{makecell} \usepackage{amsthm} \usepackage{thmtools} \usepackage{ragged2e} \usepackage{amssymb} \usepackage{longtable} \usepackage{graphicx}   \usepackage{chngcntr} \counterwithin{figure}{section} \counterwithin{equation}{section}  \newcommand\ddfrac[2]{\frac{\displaystyle #1}{\displaystyle #2}}   \usetikzlibrary{calc} \usetikzlibrary{quotes, angles, arrows}  \newcommand{\degre}{\ensuremath{^\circ}}  \begin{document}  The ``proof'' from the Journal of Irreproducible Results breaks down at the very last equality: if we construct a figure following the instructions given in that text, the segment $\overline{AD}$ will always land on the left of both $\overline{AD}$ and % $\overline{AP}$---see figure \ref{quadrilateral}---, and thus $x\neq\angle PAD-\angle PAB$, but $x=360\degre-\angle PAD-\angle PAB$. In fact, the figure shown in the problem statement is incorrect, since it corresponds to a quadrilateral whose $|\overline{AD}|\neq|\overline{BC}|$ % (see figure \ref{bad-figure}), while the ``proof'' requires  $|\overline{AD}|=|\overline{BC}|$ in order to work.  \begin{figure} \caption{...} \label{quadrilateral} \end{figure}  \begin{figure} \label{bad-figure} \caption{...} \end{figure}  \end{document}   Output:    Any idea why?

\documentclass{article} \usepackage{algorithm}  \begin{document} \setcounter{section}{54} \section{A section with no label} \begin{algorithm} \label{myalg} \caption{An algorithm with the label `myalg'.} \end{algorithm} Reference to myalg: \ref{myalg}. \end{document}   With this code, the reference givens 55 (the section number); if I move the label after the caption command, I get the correct reference (1).  Why should this be the case? I find it confusing: when thinking about an algorithm as an environment, you expect to be able to label it right after you began it. At the very least I would expect some kind of error or "??" to appear, rather than the previous environment or reference-able entity being used.


I frequently come across questions in the Close Vote Review where it seems that more than one, if not several close reasons apply. I'm wondering if there is a prescribed method for addressing these; which close reasons should take precedence?  Simply put: If a question is asked that is unclear, too broad, off-topic because they haven't included valid code to reproduce their issue, and off-topic because they haven't demonstrated an understanding of the problem being solved what is the correct response?

My question is not the same as . I'm not asking about automated system behavior.    Consider the following hypothetical questions being posted on, e.g., Stack Overflow:   Which car over there best matches my eyes? (broad, local, nonconstructive, off topic) Help my facebook is broken it wast yesterday? (broad, off topic, local) How can I make my programmers stop putting gum in my hair? (local, nonconstructive)   When I inevitably go to close such questions, I'm not sure what reason to select: is it more off topic than overly broad? Is it more localized than not constructive?  Perhaps off topic gets priority because the OP could fix localized and broad issues, but not the topic? On the other hand, .  When a question qualifies for multiple reasons to close, which reasons should get priority? In what order should priority be distributed?


I have a recent asus motherboard with an i7 processor and i've got a nvidia 670gtx connected to it.  For various reasons/experimentation purposes i'd like to connect my monitor to the intergrated graphics adapter rather than my gtx 670 card.  If i connect it to the motherboard's DVI connector the screen does not display any image on POST, nor when i'm actually in my OS, if i move the connector to the GTX card i get an image however.  Why is this happening? how can i use the intergrated graphics port to connect my monitor? (it must not involve disconnecting the GTX card)

I've got an Asus P8Z77 motherboard with a core i7 3770 processor, and a Geforce 660 video card. I'm running Windows 8.   While I primarily use the latter, there's situations where I want to use the HD4000 video adaptor built into the core processor - for example where I want to take advantage of quicksync. How would I do this?


I am trying to do a title and credits in a way of a simple motion graphic text reveal but when I add a modifier to a plane it doesn't see any text object to apply a difference operation to.

I have used Hexagon for years but find that it sometimes crashes when trying to do Boolean operations with texts.  I have been trying to make the two tables of the Ten Commandments and have been trying to use Blender.  I did it about two years ago in Blender and lost everything on my computer so I am trying again with the latest version of Blender and am having difficulty.  I start with a cube and then get it close to the dimensions I would think the Ten Commandments might look like. I then bevel the top using the bevel modifier. But in doing it this way I don't have any cross sub divisions on the face of the object. I have tried sub dividing first but then I find that I can't bevel the top arches as far as I would like. I still don't know how to add divisions after I bevel the top. Yes I am still a novice at this program.  In any case I did figure out how to make text and turn them into an object. When I make the texts I do all four of the commandments for one side and then the other six for the other side. So this makes allot of texts to cut out.  When doing the Boolean operation in Difference sometimes nothing happens. I am thinking I need to have some sub - divisions on the face of the sized cube after it is beveled but am not really sure if this is the problem.  This whole thing about normal's is still Greek to me. I have watched some videos on how to cut letters into a cube but for some reason it does not work this easy after I bevel the top of the cube. Or it could be that Blender does not like a bunch of texts all at once.  Could someone show me a video or give me some simple steps to make my project work?


I've forgotten my Stack Exchange password and I no longer have access to my email.  But, I'm already logged in Stack Exchange app in my Android smartphone (that's where I'm asking from)  What can I do to gain access to my account and log in from my computer?

I took a walk in the park and my old account fell out of my pocket. Can someone help me finding it or creating a new one? I do not want to miss my questions and answers.


When I type in any plaintext to an Enigma machine () the substitution does not seem to follow any pattern. In other words, there is no cycle in the use of enciphering alphabets (defined as the number of switches done when turning a plaintext letter to a ciphertext letter - which can vary from 0 to 26).   But since the key is the alignment of the rotors, there must be a finite key length even though it probably is longer than any plaintext ever would be. I imagine if you keep writing long enough, the rotors will eventually align in a way they already were. If I'm right - how long is the key?  And if the key is much longer than any plaintext, wouldn't that mean the Enimga is a one-time pad? From what I can read, the OTP is defined as an algorithm with a key longer than the plaintext. Is this wrong?

I'm trying to calculate the amount of settings the enigma machine has. I have found several sites regarding this topic, but it seems like there are two answers to my question. The first answer is 158,962,555,217,826,360,000 and the second is 107,458,687,327,250,619,360,000. Where the difference is that in the second answer, it has been taken into account that the notched rings on the enigma could be set as well, giving 26 * 26 = 676 more settings than the first answer.   But which answer is the right one, and why? How many possible different Enigma machine settings are there and how can one determine this number?