I do not understand how you can earn the . What do you have to do and where?

Formerly List of all badges with full descriptions.  What are badge name's requirements? Why didn't I get badge name ? Which badges can I earn multiple times?    Jump to:                    Note: Some badges are awarded based on score. The term score means the total number of upvotes minus the total number of downvotes.  Any badge with a *** next to it is one of 20 badges that count towards the  displayed on a moderator candidate in an election. The candidate score is a total of 40 points: the first 20 are awarded based on the user's rep divided by 1000 and rounded down; the second 20 represents the total number of unique badges earned of the 20 that count. Note that if the same badge is earned multiple times, it will only count once towards the candidate score.  Any badge with a "(retired)" next to it is no longer awarded, but is retained by users who previously earned them. See  for more info on what it means for a badge to be retired.       Visit the  of the  on any site to see a complete list of badges that you can filter by earned, unearned, or type.


At the end of Return of the Jedi, Luke has a vision of three persons:  Obi-Wan, Yoda, and some other fellow in Jedi robes. I asked myself: “Who is that third person?”, “Why is he there?”, and “How is the audience supposed to recognize him?”  It’s only with 20/20 hindsight—i.e., having subsequently seen Star Wars Episode II: Attack of the Clones and Star Wars Episode III: Revenge of the Sith—do we deduce that it was Anakin when he turned back from the Dark Side moments before his death as Darth Vader.  Seems to me to be able to identify that third person at the end of Return of the Jedi, the audience would have had to have been clairvoyant.

At the end of "Return of the Jedi" Anakin's head was replaced with the head of Hayden Christensen.   question asks when this was done, but what were Lucas' reasons for doing this?  All of the original Star Wars fans would surely be disappointed (as they were).  There is indeed proof that only the head on the ghost was changed, which makes it all the more ridiculous.    It seems that every time they release Star Wars on a new media they change something.  Why doesn’t it stay the same?


I'm trying something. I'm want to create new object and add in list. But I get NullPointerException. My code is private List<HisseModel> hisseListe=null;` HisseModel model = new HisseModel();         model.setSymbol("abv");         model.setChange("123");         model.setCurrency("234");          HisseModel model2 = new HisseModel();         model2.setSymbol("abv2");         model2.setChange("1232");         model2.setCurrency("2342");          hisseListe.add(model);         hisseListe.add(model2);`  Why it's not working ?

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


How do I enable Equal Cost Multi-path on the Linux kernel in Ubuntu? I want multiple routes to be concurrently present in my routing table. I was following this guide:

I'm interested in compiling a new kernel under Ubuntu 12.04 x86 64 bit.  I found  which is basically a mirror for  and there are a lot of steps (git, etc.) that appear useless to me.  With earlier releases/distros, I used to create a .config file and modify a Makefile if I needed to, then just run make and it's done.  Is there is a simple way to do this under Ubuntu?


I'm trying to solve a problem in Lee's topology book. In this book, a closed n-cell $D$ is any space homeomorphic to the closed unit ball. Then $\mathrm{Int} D$ , resp. $\partial D$ are the images of the open unit ball, resp. the boundary of the closed unit ball under such a homeomorphism. Given a continuous function $f: \partial D \rightarrow \left [ 0,1 \right ]$, he wants one to show that $f$ extends to a continuous function $F: D \rightarrow \left [ 0,1 \right ]$ that is strictly positive in $\mathrm{Int} D$. Obviously, it suffices to show this for a closed unit ball and I was thinking something like $$\left \|x  \right \|f\left(\frac{x}{\left \| x \right \|}\right) + \dfrac{1 -\left \| x \right \|}{2},$$ but that does not quite do it. Tietze's extension theorem is not in that book (and in fact is a weaker result). Any ideas? Thanks in advance.

I'm working in Lee's book on topological manifolds and have gotten stumped on the first question in chapter 5, the chapter on cell complexes.  The problem is:   Let $D$ and $D'$ be two closed cells not necessarily of the same dimension.     Show that any continuous map $f:\partial D \to \partial D'$ can be extended to a continuous map $F:D \to D'$ such that $F(Int \; D) \subseteq Int \; D'$. Given points $p \in Int \; D$ and $p' \in Int \; D'$, show that $F$ can be chosen so $F(p) = p'$. Show that if $f$ is a homeomorphism then $F$ can be chosen to be a homeomorphism.   I proved the first part roughly as follows: First suppose $D$ and $D'$ are convex and each contain $0$ in their interior (in their respective ambient spaces).  Then every element other than $0$ in $D$ can be expressed uniquely in the form $\lambda q$ where $q \in \partial D$ and $\lambda\in (0,1]$ (an equivalence relation on the chords connecting $0$ to boundary points partitions $D- \{0\}$).  I then define the map $F(\lambda q) = \lambda f(q)$ which is continuous since if $\lambda_n q_n \to \lambda q$ in $D$ then $F(\lambda_n q_n) \to F(\lambda q)$.  Lastly $\lambda q \in Int \; D$ implies $\lambda <1$ and so $\lambda f(q)$ is an interior point of $D'$ since $f(q)$ is a boundary point and $D'$ is convex.    Now if we suppose $D$ and $D'$ are arbitrary closed cells there are homeomorphisms $g_1: \overline{\mathbb{B}^n} \to D$ and $g_2: \overline{\mathbb{B}^m} \to D'$ (where possibly $m=n$) then we have that $g_2^{-1}\circ f \circ g_1$ is a continuous map between the boundaries of two closed balls and so by the first part can be extended to a continuous map $F:\overline{\mathbb{B}^n} \to \overline{\mathbb{B}^m}$.  The mapping $g_2 \circ F \circ g_1^{-1}$ is a continuous map that satisfies the desired claim.    My issue is that parts 2 and 3 don't seem (to me at least) to follow that easily from the proof I constructed.  Maybe my proof is wrong and I'm not seeing it, but more likely I think that I'm missing the spirit in which Lee is intending for us to approach this problem.


I made an alias ff and sourced it from ~/.zsh/aliases.zsh.  The aliases run well themselves:  alias ff ff='firefox --safe-mode'   and it runs as expected.  But when I try to run it under gdb I get:  > gdb ff GNU gdb (Debian 7.12-6+b1) 7.12.0.20161007-git Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> ... For help, type "help". Type "apropos word" to search for commands related to "word"... ff: No such file or directory. (gdb) quit   I tried using gdb firefox --safe-mode but that wouldn't run.   Can somebody identify what is wrong?

I am running Ubuntu 10.04 and I use upstart for daemon management.  My enterprise application is run as a daemon and must be run as root because of various privileges.  E.g.:  sudo start my-application-long-ID sudo stop my-application-long-ID etc   I would like to introduce an alias to abbreviate these commands as something like:  alias startapp='sudo start my-application-long-ID'   and run it as startapp and that works but I would prefer to not have sudo in the alias.  alias startapp='start my-application-long-ID'   does not when run using sudo startapp, returning sudo: startapp: command not found.  However, when I added the alias:  alias sudo='sudo '  sudo startapp now works but I am still curious why sudo ignores aliases.


How can i print without "\n" and with parameters  Example:  Print this : print("%d, %d" % (a, b)) without newline   I tried this (but don't work): print("%d, %d" % (a, b),end="")  I have this :     File "./test.py", line 9     print("%d, %d" % (a, b), end="")                                 ^                            SyntaxError: invalid syntax

I'd like to do it in Python. What I'd like to do in this example in C: #include <stdio.h>  int main() {     int i;     for (i=0; i<10; i++) printf(".");     return 0; }  Output: ..........  In Python: >>> for i in range(10): print('.') . . . . . . . . . . >>> print('.', '.', '.', '.', '.', '.', '.', '.', '.', '.') . . . . . . . . . .  In Python print will add a \n or space, how can I avoid that? Now, it's just an example, don't tell me I can first build a string then print it. I'd like to know how to "append" strings to stdout.


If $f:W\rightarrow X$, $g:X\rightarrow Y$, and $h:Y\rightarrow Z$, does $h \circ (g \circ f) = (h \circ g) \circ f$? How can I justify this?

My intent is to show that a composition of bijections is also a bijection by showing the existence of an inverse.  But my approach requires the associativity of function composition.  Let $f:  X \rightarrow Y, g:  Y \rightarrow Z, h:  Z \rightarrow W$ be functions.  $((f \circ g) \circ h)(x) = h((f \circ g)(x)) = h(g(f(x)))$, and $(f \circ (g \circ h))(x) = (g \circ h)(f(x)) = h(g(f(x)))$.  However, I am having problems in justifying that the two compositions, $(f \circ g) \circ h$ and $f \circ (g \circ h)$, have the same domain and range.  When I consulted ProofWiki, whose link is at the bottom, I got even more confused.  Specifically, for $(f \circ g) \circ h = f \circ (g \circ h)$ to be defined, ProofWiki requires that dom$g =$ codom$f$ and dom$h =$ codom$g$.  First of all, I think that it should be dom$g =$ range$f$ ....  Moreover, as you can see in the example below, you actually have to adjust domains and ranges of $f, g, h$ for the requirement to hold true.  Let $f: \mathbb R \rightarrow \mathbb R$ be $f(x) = 2x$, $g: \mathbb R^+ \rightarrow \mathbb R$ be $g(y) = ln(y)$, $h: \mathbb R \rightarrow \mathbb R$ be $h(z) = z - 10$.   Then $((f \circ g) \circ h)(x) = ln(2x) - 10 = (f \circ (g \circ h))(x)$, with dom$((f \circ g) \circ h) = \mathbb R^+$ = dom$(f \circ (g \circ h))$.  As a result, we need to set dom$f = \mathbb R^+$, range$f = \mathbb R^+$; dom$g$, range$g$, dom$h$, and range$h$ remain the same.  Am I allowed to do that?  This adjustment implies that when we say dom$f = X$, $f$ must be defined for all elements in $X$, but $X$ may not be the entire set of elements for which $f$ is defined.


Is it correct  that $$\lim_{n->\infty}n!^{1/n}=\infty?$$ how to prove it using basic properties of sequence?

How do I prove that $ \displaystyle\lim_{n \to{+}\infty}{\sqrt[n]{n!}}$ is infinite?


The following MWE fits 5 references on the page. As soon as I uncomment the color command (\myblue), it only fits four, with nothing else having changed.   Related: one open question that I still have is  This one has to do with color at the beginning (or end) of a paragraph; here, I use color inside a paragraph inside an environment...  \documentclass{article} \usepackage{xcolor} \def\mysmall{\trivlist\item\small} \def\endmysmall{\endtrivlist} % \newcommand{\myblue}{\color{blue}} \providecommand{\myblue}{}  \usepackage{lipsum} \begin{document}     \lipsum[1]      \section{Conclusion}     \lipsum[6]      \begin{mysmall}         Black and black and black and black and black and black and black and \myblue{}blue: \lipsum[4]     \end{mysmall}      \begin{thebibliography}{3}         \small         \bibitem{Bla}Bla and bla and bla and bla and bla and bla and bla and bla and bla and bla and bla         \bibitem{Bla}Bla and bla and bla and bla and bla and bla and bla and bla and bla and bla and bla         \bibitem{Bla}Bla and bla and bla and bla and bla and bla and bla and bla and bla and bla and bla         \bibitem{Bla}Bla and bla and bla and bla and bla and bla and bla and bla and bla and bla and bla         \bibitem{Bla}Bla and bla and bla and bla and bla and bla and bla and bla and bla and bla and bla         \bibitem{Bla}Bla and bla and bla and bla and bla and bla and bla and bla and bla and bla and bla     \end{thebibliography} \end{document}   I have been able to further minimize my problem to this MWE:  \documentclass{article} \usepackage{color} \newcommand{\blue}{} % \renewcommand{\blue}{\color{blue}} \begin{document}     \begin{itemize}         \item Black and \blue{}blue.     \end{itemize}      \section{This moves down when the above is blue.} \end{document}

For some reason space is added after my equation when I colour it. This does not happen if the colour is added to text.  Is there a simple way to prevent this from happening, like a global setting (I am not interested in manually adjusting the space with \vspace{-1cm})? Perhaps there is a better way to colour my equation (another package, another command, etc), or in other words, am I doing something wrong?    \documentclass[12pt]{standalone}  \usepackage{amsmath} \usepackage{color}  \begin{document}  \begin{minipage}{4cm} \begin{equation*}     a = b + c \end{equation*} \begin{align*}     a - b &= c\\     a-c & b \end{align*} \end{minipage}  \vline  \begin{minipage}{4cm} \begin{equation*} \color{blue}    a = b + c \end{equation*} \begin{align*}     a - b &= c\\     a-c & b \end{align*} \end{minipage}  \end{document}   For reference,  doesn't seem to solve my problem, ie, adding \fboxsep0pt to my preamble did not change the output.   EDIT The comment With {\color{blue}a = b + c} there is no additional space ... solves part of the problem, but it doesn't work when using for example align (it gives an error):  \begin{align*} {\color{blue}    a - b &= c}\\     a-c &= b \end{align*}   If I try to fix this using the command twice leaving the & outside, the spacing around = is wrong:  \begin{align*} {\color{blue}    a - b} &{\color{blue}= c}\\     a-c &= b \end{align*}


In the Alien movie, Kane is attacked by an alien facehugger which implants an embryo inside him. The embryo gestates in seemingly a matter of hours to become a chestburster.                                  In the Aliens movie, the marines find the colonists glommed to bulkheads inside the generator. Long dead. Mostly, that is. One colonist is still alive serving as an incubator for the queen's offspring.  The marines kill an infant alien after it bursts from a colonist's chest.                                  According to , after most of the marines are killed, the survivors say a rescue would take another 17 days, the amount of time for a ship to reach them from Earth. Using that, we can assume Newt was alone on colony LV-426 for at least 17 days and perhaps a couple of weeks longer.  Did the alien embyros take weeks to gestate in the second movie? Or was the hapless colonist captured by aliens mere hours before the marines arrived?  How much time do alien chestbursters gestate inside human hosts?  Answers from the movies, canon books, script writers, or other authentic sources are appreciated.

I just watched  and when the alien leaves the host it's tiny. A few minutes later in the movie they encounter the alien and it's now fully grown and is larger than a human. I don't know how much time actually goes by in the movie but it couldn't be more then a few hours, it seems to grow extremely fast. How fast does it actually grow?


How to change machine name in Ubuntu; as in my case it is written as Lenov@G500, and I want to change both names i. Lenovo and G500. how it can be done through Terminal.

I want to change the OS hostname but I do not want to restart.  I have edited /etc/hostname but it requires a restart to get implemented. How to avoid this?


Here are two fragments out of Hatcher's book (see  for the full book).  Questions: (1) Does this mean we get a long exact sequence which has the form $$\dots \to\tilde{H}_n(A) \to \tilde{H}_n(X) \to H_n(X,A) \to \tilde{H}_{n-1}(A) \to \tilde{H}_{n-1} \to \dots$$ Or do I need to modify the $H_n(X,A)$ by $\tilde{H}_n(X,A)$ or something like that? (2) Can someone explain the second paragraph in the picture in some detail? I was not able to understand what Hatcher was trying to explain. Thanks in advance for any help.

Suppose that $X$ is a topological space and $x_0\in X$. Prove that $\widetilde{H_n}(X)=H_n(X,x_0)$ for all $n\geq 0$.  We have a short exact succession  $$0\to S_*(x_0)\to S_*(X)\to S_*(X,x_0)\to 0$$  where $i_*:S_*(x_0)\to S_*(X)$ is the mapping induced by the inclusion and $p_*:S_*(X)\to S_*(X,x_0)$ is the mapping induced by the projection.  So by the Zig-Zag theorem we have a long exact sequence in homology  $$...\to H_n(x_0)\to H_n(X)\to H_n(X,x_0)\to H_{n-1}(x_0)\to...$$  From here it follows that if $n-1>0$ then $H_{n-1}(x_0)=H_n(x_0)=0$ and so $H_n(X,x_0)\cong H_n(X)=\widetilde{H_n}(X)$ if $n>1$.  If $n=1$ then I have  $$...\to H_1(x_0)\to H_1(X)\to H_1(X,x_0)\to H_{0}(x_0)\to H_0(X)...$$  where $H_0(x_0)\cong \mathbb{Z}$ and $H_1(x_0)=0$.  But note that $H_{0}(x_0)\to H_0(X)$ is injective, so we can deduce that there is an exact sequence $0\to H_1(X)\to H_1(X,x_0)\to 0$ and so $H_1(X,x_0)\cong H_1(X)\cong \widetilde{H_1}(X)$but I do not know what to do in the case of $n=0$. Could someone help me please, thank you very much.


Can you recommend a good reference for learning linear algebra with an eventual goal of applying tools from matrix theory? I have Axler's Linear Algebra Done Right and Horn&Johnson's Matrix Analysis books, but I am not sure whether to learn matrix theory, I should study linear algebra first; and if that is the case, whether Axler is the best to study.  Any help is appreciated. Thank you.

I'm looking for a book to learn Algebra. The programme is the following. The units marked with a $\star$ are the ones I'm most interested in (in the sense I know nothing about) and those with a $\circ$ are those which I'm mildly comfortable with. The ones that aren't marked shouldn't be of importance. Any important topic inside a unite will be boldfaced.  U1: Vector Algebra. Points in the $n$-dimensional space. Vectors. Scalar product. Norm. Lines and planes. Vectorial product.  $\circ$ U2: Vector Spaces. Definition. Subspaces. Linear independence. Linear combination. Generating systems. Basis. Dimesion. Sum and intersection of subspaces. Direct sum. Spaces with inner products.  $\circ$  U3: Matrices and determinants. Matrix Spaces. Sum and product of matrices. Linear ecuations. Gauss-Jordan elimination. Range. Roché Frobenius Theorem. Determinants. Properties. Determinant of a product. Determinants and inverses.  $\star$ U4: Linear transformations. Definition. Nucleus and image. Monomorphisms, epimorphisms and isomorphisms. Composition of linear transformations. Inverse linear tranforms.  U5: Complex numbers and polynomials. Complex numbers. Operations. Binomial and trigonometric form. De Möivre's Theorem.  Solving equations. Polynomials. Degree. Operations. Roots. Remainder theorem. Factorial decomposition. FTA. Lagrange interpolation.  $\star$ U6: Linear transformations and matrices. Matrix of a linear transformation. Matrix of the composition. Matrix of the inverse. Base changes.   $\star$ U7: Eigen values and eigen vectors Eigen values and eigen vectors. Characteristc polynomial. Aplications. Invariant subspaces. Diagonalization.   To let you know, I own a copy of Apostol's Calculus $\mathrm I $ which has some of those topics, precisely:   Linear Spaces Linear Transformations and Matrices.   I also have a copy of Apostol's second book of Calc $\mathrm II$which continues with   Determinants Eigenvalues and eigenvectors Eigenvalues of operators in Euclidean spaces.   I was reccommended Linear Algebra by Armando Rojo and have Linear Algebra by , which seems quite a good text.   What do you reccomend?


I have: a = {'name':'alfred','class':'2'} b = {'year':'1990','town':'NY'}  And I want to merge a and b to get: {'name':'alfred','class':'2', 'year':'1990','town':'NY'}  So far I created a new dict and iterate through both to set key values pairs.

I have two Python dictionaries, and I want to write a single expression that returns these two dictionaries, merged (i.e. taking the union).  The update() method would be what I need, if it returned its result instead of modifying a dictionary in-place. >>> x = {'a': 1, 'b': 2} >>> y = {'b': 10, 'c': 11} >>> z = x.update(y) >>> print(z) None >>> x {'a': 1, 'b': 10, 'c': 11}  How can I get that final merged dictionary in z, not x? (To be extra-clear, the last-one-wins conflict-handling of dict.update() is what I'm looking for as well.)


I am used to using apt to install and upgrade my applications. To an extent, I'm relying on the repositiories I use to be sane and thus keep my machine in a good state.  What is best-practice for keeping my manually installed application up-to-date? Is it simply a case of regularly checking the application's website for new releases and patches?

I'm having some difficulties exactly understanding how the the whole update thing work in Ubuntu and good practice for installing software.  I understand I have a  /etc/apt/sources.list file where all my repositories are listed, and that these repositories are queried when I use apt-get update - to later be used with e.g. apt-get upgrade.  This makes perfect sense and I recently installed spotify by adding deb http://repository.spotify.com stable non-free to this "sources" list.    But then I got confused...  When I went to download Google Chrome I merely had to download and grab a .deb file, and Chrome installed with no problem... but I don't see any new entry in /etc/apt/sources.list...  So how does apt-get update know where to query concerning Chrome updates?  Has it somehow been added to one of the already listed repositories in the sources file?  I would like all my installed software to be encompassed by the update function.


How can I show that  $$ \mathrm d(a\wedge b)=(\mathrm d\,a)\wedge b + (-1)^{q}a\wedge(\mathrm d\,b) $$  for a $q$-form $a$ and an $r$-form $b$?

How can we prove the following relation for differentiating the wedge product of a p-form $\alpha_p$ and a q-form $\beta_q$$$d(\alpha_p\wedge\beta _q)=d\alpha_p\wedge\beta_q+(-1)^{p}\alpha_p\wedge d\beta_q$$


All elementary SI units, except the kilogram, have been redefined depending of a physical constant.  However kilogram still depends on the International Prototype Kilogram. Why is this? Is there no possibility of defining it depending on Planck's constant, for example, or some other constant?

I read that there is an effort to define a kilogram in terms that can exactly be reproduced in a lab. Why has it taken so long to get this done? It would seem this should be fairly important.  Edit: Today I got around to finding the references.  You can see the international prototype of the kilogram IPK is the artifact whose mass defines at present the SI unit of mass . You can also go  where you will see a link on the possible future revision to the SI. It sounds like this may happen in the next few years.   I am not surprised that it takes years of R&D and millions of dollars to do this. However, that's peanuts compared to what was spent on LHC. I am not saying LHC was not worth the cost - it just seems that we could have a modern definition of a kilogram by now if a few governments wanted to make it a priority.   Does anyone here know if this effort has been given the investment that it deserves?


I wanted to import from the section of historic data high/low prices in weekly ranges. For example from this site:  I tried =INDEX(IMPORTHTML("hhttps://www.investing.com/indices/us-30-historical-data", "TABLE", 12), 2, 3) to get any(!) data from the site into google but it shows error with parsen Has anyone working solution?

Google Sheets has several import functions   IMPORTDATA IMPORTFEED IMPORTHTML IMPORTXML   Sometimes the above functions returns errors like #N/A Imported content is empty and would like to be sure that there isn't a problem with the resource content to be imported.  How do I know if these functions are able to get the content that I looking to import?  I know that there also exist IMPORTRANGE but that function only is able to import content from Google Sheets spreadsheets


Why is my  suddenly missing 2200+? What's going on here??? I have about 2250+ reputation earlier today, but now only 16 left. Also my user name has been changed...  Hope it's not my new year gift... :(

This user is only displaying 56 rep.   But surely (s)he has much more than that.        The user has also never given out any bounties.  Also, badges are missing:


When executing the add field command in arcpy it always appends the field at the end of an attribute table.   Can someone help me write a code where a field can be inserted in the middle of an attribute table by parsing the data in the fields that would come after the new row to a dictionary, then deleting those rows, adding the new field and then recreating the old fields that were deleted and parsing the data back into the fields?   I know it seems like a lot of extra work but there are times when this would be helpful.

Using ArcGIS 10.0, is it possible to reorder the fields in a file geodatabase, and have the order persisted to the database?  We considered exporting to XML, and writing a parser to change the field order, then re-creating a new database from the XML. This seems like a laborious process.  Another idea is to import the existing field definitionss into Excel, re-order them, export to CSV, then write a Python script to create these fields in a new Geodatabase. Does a script like this exist, before we write it from scratch?  Unfortunately the ArcGIS Diagrammer doesn't seem to support field re-ordering.  Are there any scripts or hacks we could use to simplify this process?


In Python, I can write a map literal like this:  mymap = {"one" : 1, "two" : 2, "three" : 3}   How can I do the equivalent in C++11?

What is the right way of initializing a static map? Do we need a static function that will initialize it?


I have many tables in Ms Excel, and I need to export to a latex file to write an article. I don't want include a figure, I want to copy/import a table from Microsoft Excel.  Then I need an easy method to transform something like this:  Linha;Diâmetro, D;Espessurra, t;Área Transversal, At ; Poço - Manifold;10.75 pol;0.625 pol;19.880 pol²;0.013 m² Manifold - Costa;22 pol;0.5 pol;33.772 pol²;0.022 m²     In this:  \begin{table}[htbp]   \centering   \caption{Add caption}     \begin{tabular}{rcccc}     \hline     Linha & Diâmetro, D & Espessurra, t & \multicolumn{2}{c}{Área Transversal, At } \\     \hline     Poço - Manifold & 10.75 pol & 0.625 pol & 19.880 pol² & \textbf{0.013 m²} \\     Manifold - Costa & 22 pol & 0.5 pol & 33.772 pol² & \textbf{0.022 m²} \\     \hline     \end{tabular}%   \label{tab:addlabel}% \end{table}%

I'm writing a report in LaTeX and I'm using excel to calculate, make graphs and tables. What would you recommend me to do to import it to latex?  I have tried taking print-screen and import as figures, but if the image scale isn't 100% it gets blurry and ugly.  I've been trying to export, print and save selected area as pdf. But no matter what I try, it exports with selected paper size. So it has a huge margin and I think it would take to much time to make a custom paper size for each figure.  Any thoughts?


Are the following two code snippets equivalent?  Snippet One  \[     a + b = c  \]   Snippet Two  \begin{displaymath}     a + b = c  \end{displaymath}

I once learnt, that it is uncool to use $$, but why is that? Why does \[ not act as a abbreviation to \begin{align}? I noticed, that there is a difference, since one cannot use & and \\ inside a block started with \[.


I have global variable $MY_VAR. How can I execute second command only if the variable has value: echo $MY_VAR && echo "Show me only if variable $MY_VAR has value"

I have seen the following technique used many times on many different shells, to test if a variable is empty:  if [ "x$1" = "x" ]; then      # Variable is empty fi   Are there any advantages on using this over the more canonical if [ -z "$1" ]? Could it be a portability issue?


Problem :   determine all prime numbers such that :   $1+p+p^{2}+p^{3}+p^{4}=m^{2}$ , $m\in \mathbb N$ My try :   $p=2$ so we find : $1+2+4+8+16=31≠m^{2}$   $p=3$ so we find :   $1+3+9+27+81=9^{2}$   $p=5$ so we find :   $1+5+25+125+625≠m^{2}$  $.$ $.$ $.$ so how many numbers ??   if we find :  $m^{2}≤1+p+p^{2}+p^{3}+p^{4}≤(m+1)^{2}$  then we can say no prime number $p>3$   but how I find $m,m+1$ ??

Let $p$ be a prime number. Find all $p$'s such that $p^4 + p^3 + p^2 + p +1$ is a perfect square.   I tried rewriting the expression as  $p^4 + p^3 + p^2 + p +1 = x^2 \iff (p^2 + p)(p^2 + 1)=(x - 1)(x + 1)$. Then I think I need to bound this using $x$ but am not sure how to.


I have seen some photos where a far-away object looks much bigger compared to nearby objects. Apparently this is called lens compression and it has to do with the focal length of a lens. How can I achieve this effect? How does it work?

This is another perspective distortion question. I understand that perspective distortion is primarily a function of capture and viewing distance, but I am still working on fully understanding the causes of the "flattening" of scenes that is credited to telephoto lenses.  This seems to refer to our ability to discern the differences in size attributable to differences in distance from the lens for subjects beyond a certain distance from the lens. If this is correct, then is it just that with the longer distance from the subject when using a telephoto lens, this compression happens closer to the foreground, rather than in the mid- or background with a wide lens?  Is it fair to say that the compression effect occurs at a certain distance from the photographer regardless of lens, but the field of view influences how close to the foreground this effect takes place? Can you share any information to help people like me understand this?


When I run   ls | sort -S  I get   sort : option requires an argument -- ´S´  Why I can't sort the list of my files with the sort option by size? I know that I can use only the ls command alone.

I would like to list all files in the order of big to small in size and the files could be present anywhere in a certain folder.


I am trying to understand how to best approach adjusting a camera track to get the error down to something < 0.5 px  Video clip is 141 frames, HD There are 8 markers/tracks All of these tracks look good when I visually inspect them  The solve gives me 2.48 px and the the graph, tells me that some of the tracks have errors around 3-5. I can't visually see why it is so:  If I select one of the tracks, "Track.001":  and follow that during the 141 frames, I dont see why it is so bad, see this video:  The "quick view", in the top right, its just a "mush", not clear at all, so it is hard to use, but from what I can tell, the track is on point. If someone is interested in helping a newbie out, I can upload the PNG files (248 MB) and the project file. ---- EDIT ---- After adding about 4 more tracks, the error goes up to 169.09 px. When testing different "Refine" options, no change. The weirdest thing is that I can see the "per frame average error" (blue line below), but when looking for a blue line per track, there is none:

Whenever I do camera tracking in Blender the reconstruction is always zooming out or not on the axis. I have a great quality camera, but the end results of the camera tracking always has the model sliding. If you have a solution please tell me.


Supposing we have a natural isomorphism $\tau : S \rightarrow T$ between functors $S,T : \mathscr{C} \rightarrow \mathscr{D}$, how exactly do we show that if $S$ is faithful, then so is $T$?  If $S$ is faithful, then it is injective on the hom-sets, i.e. if $f = g$, then $S(f) = S(g)$. I also know that the components of the natural transformation form a commutative square defined by $\tau \circ S(f) = T(f) \circ \tau$, and that the ultimate implication I want to show is (probably along the lines of?)  $$f = g \;\;\; \Rightarrow \;\;\; S(f)=S(g) \;\;\; \Rightarrow \;\;\; T(f)=T(g)$$  (with the first implication being given as stated by $S$ being faithful).  I've tried playing with around with some of the compositions but the closest I've gotten would be $T(\tau(f)) = T(\tau(g))$ (which came from $S(f)=S(g)$, composing on the right by $\tau$ which is injective, and then applying the definition from the commuting square) which I don't think is sufficient. Really, I'm starting to think that the composition idea isn't going to work, and that proving such things from a categorical perspective is a little bit more nuanced than we'd see in, say, a set theory class, and maybe I'm just not thinking "categorically", so to speak? I'm not sure.  Anyhow, sorry for the dumb question, but any ideas?

If $F,G: C \rightarrow D$ are functors between regular categories and $F \Rightarrow G$ is a natural isomorphism, is it true that if $F$ is faithful {resp. full) then $G$ is full?  I believe this is true but would like some confirmation.  What about if $F$ is essentially surjective?  Is it necessarily true that $G$ is essentially surjective?  Thanks.


To Use Icon after the label?  Ex:     (Or)  To Use Icon before the label?

Assuming I'm optimizing for making it as fast and easy as possible for most users to find the button they need, what's the optimal ordering?


After solving the equation $ abc=a!+b!+c!     $ in natural numbers which yield $a=1,b=2, c=3$ i tried to attempt the above question given in title. However i am not getting any clue. As far i think, may be some logical reasoning will be required just like one attempts to solve problems like $AA+BB=AB$ etc. But here in this question how shall i proceed to solve it? Thanks in advance

My teacher in Math Team gave the following question to us.     Solve $$a!b!=a!+b!+c!$$ where $a$, $b$ and $c$ are nonnegative integers.   I found only one solution by trial and error and it is $(a,b,c)=(3,3,4)$.  Any help is appreciated!


I just want today's date  to be the default value in the input that is using jQuery UI's datepicker:  <input id="mydate" type="text" />   I tried the below code but it didn't work:  var currentDate = new Date();   $("#mydate").datepicker("setDate",currentDate);

I have a very simple jQuery Datepicker calendar:  $(document).ready(function(){     $("#date_pretty").datepicker({      }); });   and of course in the HTML...  <input type="text" size="10" value="" id="date_pretty"/>   Today's date is nicely highlighted for the user when they bring up the calendar, but how do I get jQuery to pre-populate the textbox itself with today's date on page load, without the user doing anything?  99% of the time, the today's date default will be what they want.


While users may (and do) exercise their right to change their profile display name would it be useful to have a "Username History" or "Formerly known as" section in the profile. This could show the most recent (or two or three) most recent usernames of the user.  I know it's a fairly trivial idea but if a user changes the name and avatar I get confused who some people are - I am not a clever man.

It'd be nice if each user's profile page showed what previous names that user had recently used.


At the moment, I largely forget about light and light sources in my games. I assume that my players can see everything around them without stopping to think about whether it should actually be pitch black in this dungeon.  What techniques can I use to improve my tracking of light and light sources?

One thing I’ve been struggling with as a newbie GM is keeping track of how light or dark a certain room is. My players and I have been playing a D&D 5e starter campaign with me as the GM. I might read in the campaign book something like:        This is Area 4, area 4 is dark.      … however, in either the thrill of the actual game or in the confusion of battle, I forget that Area 4 is, in fact, dark.  I thought this was because I was running a published campaign that I didn’t make or internalize but when we played a campaign I made myself last week, I still had the same problem.   How do I remember to describe light, light sources, and darkness?  My shortcomings in this regard have resulted in my players not lighting a single torch for the whole duration of The Lost Mines of Phandelver. I feel like this is a problem as I feel like I’m taking a level out of the game that greatly affects ambiance and style of play.


So far I've proved the following:   $2n \geq \ln(2n) > \ln(n+2)$   for $n \geq 3 $  The proof must be without the use of calculus but I have no idea on how to proceed.


Trying to make a simple typography animation but when I go to the render tab, nothing shows up

A scene I made is not rendering, at all. This grey screen stays the same and nothing changes.  Here are my settings:  [


I'm making a program that will print out a set of savings for tomorrow only, and i wanted to specify what date tomorrow was, which i did like this:  Tomorrow = datetime.date.today() + datetime.timedelta(days=1)   Which gives the outpu:  2016-04-11   as you can see, it does give tomorrows date like planned, except it does it in the YYYY-MM-DD format, which is my issue. is there a way to have tomorrows date printed in the DD-MM-YYYY format? Cheers

This is my code:  import datetime today = datetime.date.today() print(today)   This prints: 2008-11-22 which is exactly what I want.  But, I have a list I'm appending this to and then suddenly everything goes "wonky". Here is the code:  import datetime mylist = [] today = datetime.date.today() mylist.append(today) print(mylist)   This prints the following:   [datetime.date(2008, 11, 22)]   How can I get just a simple date like 2008-11-22?


I saw the sentence: "the crowd took its guns and its swords" in French the other day; now I'm wondering if it's right in English. Since the crowd is singular, why do we say "their guns and their swords"? This question is asking about pronoun agreement. The linked-to answer concerns verb agreement. In addition the answers there say that verb agreement may be driven by pronoun agreement later in the verb phrase! So it seems that the answers there presuppose the possible existence of plural pronouns, but don't say when or why PRONOUNS (not verbs) should be plural in the case of mass nouns.

Should I use "was" or "were" in the following context?     A huge crowd were/was present there.


I proceeded like this. Let $a \leq b$. Since $gcd(a,b)=lcm(a,b)$, then $gcd(a,b)^2=ab$ Now $gcd(a,b)=\pm\sqrt ab$ which is an integer. So b must be of the form $am^2$ so the numbers are a and $am^2$ whose gcd is clearly a. hence $gcd(a,b)=a=\pm am$ which implies $m=\pm 1$ so $b=am^2=\pm a$ which is proved. I do not know how to prove the converse.

Show that for $ a,b ∈ Z^+,\,$ if $[a,b]=(a,b),\,$ then $a=b$.                    Prove if GCD if a and b is equal to LCM of a AND b then  $a=b$


I've read on some websites that it's bad to defrag an ssd. But I'm reading on this website now and one person was like "You didnt do any harm its just not necessary to defrag it." I feel like that's wrong since every other website I've read says it will damage the ssd.

Possible Duplicate:          Is there an advantage to it?  I mean, SSD is essentially random access memory.


While I do know that $\frac{dy}{dx}$ isn't a fraction and shouldn't be treated as such, in many situations, doing things like multiplying both sides by $dx$ and integrating, cancelling terms, doing things like $\frac{dy}{dx} = \frac{1}{\frac{dx}{dy}}$ works out just fine.  So I wanted to know: Are there any particular cases (in single-variable calculus) we have to look out for, where treating $\frac{dy}{dx}$ as a fraction gives incorrect answers, in particular, at an introductory level?  Note: Please provide specific instances and examples where treating $\frac{dy}{dx}$ as a fraction fails

I have been forewarned about it, I have read the  here, but I haven't seen a counter example where it doesn't work. I know that it isnt really a fraction, but does it effectively get the same result in all cases, or are there counterexamples I must be warned about.   I do not mean obvious counter examples, like $$\frac{dy}{dx}+\frac{du}{dv} = \frac{dydv+dxdu}{dx dv}$$ which as far as I know doesn't really mean anything.


I am trying to create two objects from one class. The objects add scroll listeners to the document and change change the divs provided by the instance.   However, creating a second class instance ignores the first and does not do anything to the provided div.  class MyClass{   constructor(parameter){     self = this;     self.parameterA = parameter;     self.myClassMethod = self.myClassMethod.bind(self);     document.addEventListener("scroll", self.myClassMethod)   }    myClassMethod(){     $('.class').each(function(){       console.log(self.parameter); //Returns only the second instance's parameter (parameter B)       $(this).children('.'+self.parameter).fadeIn('slow');//only fades in second instance     })   }  }  var testA = MyClass(parameterA); var testB = MyClass(parameterB);   Edit: In this code I have to use the this of the constructor and the .each() function.

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


What is the SciFi story where a guy has to traverse a deadly alien 'trap' (it says in the story that it's possibly a trap or a puzzle but the tech is so advanced that they can't understand it) where the man dies a usually grisly death but is reanimated to test it again and again, each time getting a little further into the maze?

It might be a short story or it might be a novel. It must be before 1972 because I read it in my youth and I am OLD.  The following is very impressionistic.  There is a multidimensional/not of this Earth/alien artifact-like tunnel.   Picture a long, perhaps transparent, storm drain like structure sitting in a field but with an opening on only one end.  It is the subject of a lengthy investigation/exploration that has cost many lives. An instrumented investigator enters the "tunnel" and makes the exact movements that his predecessors have made, advancing until he must do something original at which point he survives and a new "move" is added to the list of correct moves or he is destroyed and a "move" is added to the list of things to be avoided at that point.  I remember absolutely nothing else about the work except that (I hope central) feature.


Residuals vs. Fitted Values plot    Can someone tell me which OLS assumptions might be violated according to the figure and why? Moreover, what are the consequences for the point estimators and the standard errors?

Consider the following figure from Faraway's Linear Models with R (2005, p. 59).    The first plot seems to indicate that the residuals and the fitted values are uncorrelated, as they should be in a homoscedastic linear model with normally distributed errors. Therefore, the second and third plots, which seem to indicate dependency between the residuals and the fitted values, suggest a different model.  But why does the second plot suggest, as Faraway notes, a heteroscedastic linear model, while the third plot suggest a non-linear model?  The second plot seems to indicate that the absolute value of the residuals is strongly positively correlated with the fitted values, whereas no such trend is evident in the third plot. So if it were the case that, theoretically speaking, in a heteroscedastic linear model with normally distributed errors  $$ \mbox{Cor}\left(\mathbf{e},\hat{\mathbf{y}}\right) = \left[\begin{array}{ccc}1 & \cdots & 1 \\ \vdots & \ddots & \vdots \\ 1 & \cdots & 1\end{array}\right] $$  (where the expression on the left is the variance-covariance matrix between the residuals and the fitted values) this would explain why the second and third plots agree with Faraway's interpretations.  But is this the case? If not, how else can Faraway's interpretations of the second and third plots be justified? Also, why does the third plot necessarily indicate non-linearity? Isn't it possible that it is linear, but that the errors are either not normally distributed, or else that they are normally distributed, but do not center around zero?


I know computers, I have been fixing them and building them for over a decade... but I don't know the exact electronics of them.  My personal desktop PC is making an irregular, but constant, extremely high pitched chirping noise. I know this could be my hard drive, but I've heard that noise before and I believe this is a capacitor or part of the electronics. This noise is right at the edge of my hearing and I can feel it more than I can hear it.   After a while, it starts to give me a headache and makes me physically sick.   How long will this last? Is there anything I can do to fix it (short of replacing the entire motherboard)?  My Motherboard:

I have many different AC adapters and power supplies for a variety of devices, ranging from small 5V/1A USB chargers to laptop power adapters and desktop PSUs. However, I often hear a whining noise from  some of these power supplies. This happens most often when they are not connected to a device or otherwise in use, and stop making noise when I connect a load to it such as by plugging in a device that is not fully charged.  Why do some AC adapters and power supplies make this whining noise? Why do some not make this noise? Is there anything I can do to suppress it?


I went on a hunting trip for the  hat on .    and three of my answers to tumbleweeds were accepted:      No activity since May 2016. No comments and no edits until I posted the answer (). 60 views now, but it had less views when it was accepted. Accepted 2017-01-04 21:00:28Z (22 hours ago).     There was an edit 6d 23h+ before my answer, but I posted after it earned the Tumbleweed badge. Accepted 2017-01-04 13:14:29Z (yesterday).     There were some comments before my answer, but after the Tumbleweed badge. This one probably did not meet the requirements due to the comments. Accepted 2017-01-03 13:11:40Z (2 days ago)    All 3 questions earned the . However, I did not get the Lifesaver.   Is there a requirement I am not considering or is it a bug?

The hat's description says     answer a question qualifying for the Tumbleweed badge that gets accepted   During the winter bash, I  a question that is a , and it got accepted; yet I did not get the hat. However  answer  and did get the hat. (What was the difference?)  So what are the exact requirements to get the  hat?


I'm having a function that I want to evaluate with different parameter combinations, e.g.  params1 = [1, 6, 100] params2 = [True, False] params3 = ["blue", "red", "green"]   Here is my straight forward attempt to do this:  res = np.zeros((len(params1), len(params2), len(params3)))  for i1, p1 in enumerate(params1):     for i2, p2 in enumerate(params2):         for i3, p3 in enumerate(params3):             res[i1, i2, i3] = myfunc(p1,p2,p3)   This works, but adapting it to more complex scenarios is not only cumbersome but more importantly makes the code messy and thus increases the chance of mistakes.  My next approach to handle this in a more structured way would be to write a recursive function that would starts one for loop in one parameter and then inside this loop call itself.  But since my problem seems like a quite general problem, I wonder if there is a better (e.g. more basic or neat) way to address this.  EDIT: Thanks for the helpful comments. It was suggested to use for params in itertools.product(params1, params2, params3): myfunc(*params).  Unfortunately does not do the trick for me, since I also need the indices. I edited my code, since this crucial part was missing.  I should also give more background on what I want to use this for, since this seems like a standard problem to me and there might be completely different approaches: I want to evaluate the numeric output of myfunc in some part of it's high dimensional parameter space, to later explore it and in particular look for maxima and minima under constraints (e.g. minima for parameter2 = True). Therefor my approach was to evaluate it in that part of the space and store the result in the numpy array res.  Again, thanks a lot for any suggestions.

How can I get the Cartesian product (every possible combination of values) from a group of lists?  Input:   somelists = [    [1, 2, 3],    ['a', 'b'],    [4, 5] ]   Desired output:  [(1, 'a', 4), (1, 'a', 5), (1, 'b', 4), (1, 'b', 5), (2, 'a', 4), (2, 'a', 5) ...]


I have a box bounded by min_x, min_y, max_x, max_y, I also have a multipolygon = poly contained in that box. I'm trying to equidistantly scatter points throughout that box, outside of that multipolygon, for the eventual purpose of using a modified A* algorithm to find a route between two points. Right now, I can generate points as such: from shapely.geometry import Point import numpy as np  x_range = np.linspace(min_y,max_y,round((max_y - min_y)*2.5),False) y_range = np.linspace(min_x,max_x,round((max_x - min_x)*2.5),False)  points = [] point_dict = dict() i = 0  for x in x_range:     j = 0     for y in y_range:         p = Point(y,x)         if not poly.contains(p):             points.append(p)             point_dict[i,j] = p         j+=1     i+=1  They're in an x-y grid along the map, but I think a more efficient/natural way to generate points for a path would be to create this grid then add a repulsion factor to each point so they're all pushed away from each other inversely proportional to their distance AND from the multipolygon and the bounding box. Eventually I imagine this would end up in some state equilibrium. I stumbled upon the following question: . And was able to get an idea for how someone might approach this problem, but I'm still unsure how I could bound points to keep themm inside of a box and outside of the polygon/multipolygon that the box also contains.

I have a box bounded by min_x, min_y, max_x, max_y, I also have a multipolygon = poly contained in that box. I'm trying to equidistantly scatter points throughout that box, outside of that multipolygon, for the eventual purpose of using a modified A* algorithm to find a route between two points. Right now, I can generate points as such: from shapely.geometry import Point x_range = np.linspace(min_y,max_y,round((max_y - min_y)*2.5),False) y_range = np.linspace(min_x,max_x,round((max_x - min_x)*2.5),False) points = [] point_dict = dict() i = 0 for x in x_range:     j = 0     for y in y_range:         p = Point(y,x)         if not poly.contains(p):             points.append(p)             point_dict[i,j] = p         j+=1     i+=1  They're in an x-y grid along the map, but I think a more efficient way to generate points for a path would be to create this grid then add a repulsion factor so they're all pushed away from each other inversely proportional to their distance from one another AND from the multipolygon and the bounding box. Eventually I imagine this would end up in some solid state equilibrium. Right now I maintain a list of reference for each of the 8 nearest points to each point as follows: edge_list = [] for point in point_dict:     for i in [point[0]-1, point[0], point[0]+1,point[0]+2,point[0]-2]:         for j in [point[1]-1, point[1], point[1]+1,point[1]+2,point[1]-2]:             try: #we already excluded points s.t. poly.contains(point)                 if not point_dict[point].distance(point_dict[i,j]) == 0:                     edge_list.append([point, (i,j), point_dict[point].distance(point_dict[i,j])])             except:                 pass             j+=1         i+=1  Right now I use this edge list so that I can construct a graph and run djikstra's algorithm on it. By constraining it to the <= 8 nearest points, I reduce the number of edges that need to be checked foreach point. My problem here is two-fold:  I have little idea how I would accomplish this repulsion addition computationally I don't know how I would maintain a reference for the n-nearest points to each point after the equilibrium is reached.


This may be a duplicate question but i can't solve this problem.  navbar.php:
 Create New User
   and in my main php file i enclude navbar.php as follow.   <?php $this->load->view("includes/headTag"); ?>         <?php $this->load->view("includes/dashboard_navbar.php"); ?>     <?php $this->load->view("includes/sub_dashboard.php"); ?>     <?php $this->load->view("includes/main_dashboard.php"); ?>           <?php $this->load->view($path); ?>      <?php $this->load->view("includes/footerScripts.php");?>        now using a test.js file i change the value of $path and load a new file. The problem is jquery events are not registered to file contents and html elments added dynamically.  I know about   $("parent-selecter").on("event","child-selecter",callback(){});  but here i'm totally confused what to do. Should i use something like  $("body").on("event","child-selecter",callback(){});   or?  Any help is appreciated

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I stumbled over a probability paradox on the internet:  If you choose an answer to this question at random, what is the chance that you will be correct? A) 25% B) 50% C) 60% D) 25%  Given that "at random" means choosing each option with equal probability, each option had a chance of 25% to be correct. But since there are 2 options with 25% as the solution, we get 50% of being correct. In this case, B) would be correct. But then again, the probability of choosing B) at random would be 25%. And so on. Does this paradox have a name? Is there something I can read on it?

I found this math "problem" on the internet, and I'm wondering if it has an answer:     Question: If you choose an answer to this question at random, what is the probability that you will be correct?      a. $25\%$      b. $50\%$      c. $0\%$      d. $25\%$   Does this question have a correct answer?


I was wondering is there a way to download a Youtube videos with 2 or more Subtitles using Youtube-DL and ignore auto-generated subtitles?

I downloaded Python and youtube-dl, on my desktop I saved the file yt-dl.py. My goal is to download video with subtitles. I opened cmd, wrote cd Desktop, pressed enter, after I dragged the file yt-dl.py on the cmd and then I don't know how download video with subtitles (I only know how download video without subtitles: after dragged file, I enter a space and after the link of video). What command could I use to download video with subtitles? (In the figure there is a mistake: the file is yt-dl.py instead of yt-dll.py)   Thank you for your time.  P.S. I tried the command --write-srt --sub-lang en '' found on  but it does not work. The link which I used is  instead of .    In the file yt-dl.py there is .


I am trying to replace all strings that can contain any number of blank spaces followed by an ending ";", with just a ";"  but I am confused because of the multiple blank spaces.  "ExampleString1            ;" -> "ExampleString1;" "ExampleString2  ;" -> "ExampleString2;" "ExampleString3     ;" -> "ExampleString3;" "ExampleString1 ; ExampleString1 ;" -----> ExampleString1;ExampleString1   I have tried like this: example.replaceAll("\\s+",";") but the problem is that there can be multiple blank spaces and that confuses me

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


Given difficult learning task (e.g high dimensionality, inherent data complexity) Deep Neural Networks become hard to train.  To ease many of the problems one might:   Normalize && handpick quality data  choose a different training algorithm (e.g RMSprop instead of Gradient Descent) pick a steeper gradient Cost function (e.g Cross Entropy instead of MSE) Use different network structure (e.g Convolution layers instead of Feedforward)   I have heard that there are clever ways to initialize better weights. For example you can choose the magnitude better: Glorot and Bengio (2010)   for sigmoid units: sample a Uniform(-r, r) with $r =    \sqrt{\frac{6}{N_{in} + N_{out}}}$ or hyperbolic tangent units: sample a Uniform(-r, r) with $r =4    \sqrt{\frac{6}{N_{in} + N_{out}}}$   Is there any consistent way of initializing the weights better?

I have just heard, that it's a good idea to choose initial weights of a neural network from the range $(\frac{-1}{\sqrt d} , \frac{1}{\sqrt d})$, where $d$ is the number of inputs to a given neuron. It is assumed, that the sets are normalized - mean 0, variance 1 (don't know if this matters).  Why is this a good idea?


Fermat's little theorem states that if $p$ is a prime number, then for any integer $a$, the number $a^{p} − a $ is an integer multiple of $p$. In the notation of modular arithmetic, this is expressed as $a^{p} \equiv a \pmod p.$  Using this theorem prove:  Given a prime number $p$, show that if there are a positive integer $x$ and a prime number $a$ such that  $p$ divides  $\frac{x^{a}-1}{x-1}$, then either $a = p$ or $p \equiv 1 \pmod a$.  $$p\mid\frac{x^{a}-1}{x-1}$$  So, I'm thinking: $$\frac{x^{a}-1}{x-1} = x^{a-1}+x^{a-2}+...+1$$  I tried the telescoping technique but that doesn't work, assuming $a = p$, shows that $x^{p-1}\equiv 1 \pmod p$.  So, what else can I do?

Fermat's little theorem states that if $p$ is a prime number, then for any integer $a$, the number $a^p − a$ is an integer multiple of $p$. In the notation of modular arithmetic, this is expressed as $$a^p \equiv a \mod p.$$  Use Fermat's little theorem to prove that:  Given prime number $p$, show that if there are positive integer $x$ and prime number $a$ such that  $p$ divides   $\frac{x^a – 1}{x – 1}$, then either $а= p$ or $p \equiv 1 \mod a$.  I tried to connect  $\frac{x^a – 1}{x – 1}$ to the theorem, but without any success..  Anything will help.. Thanks in advance


For Fedora OS  I'm still learning here, but I need help to insert a command for example "XXX" to say that I have a file that contains 1000 lines of single product names. I need to write a command to basically print specific lines, such as:  print line 50-100 from MyProductList.sh  This is just an example to give you an idea. inside the file will simply be 1000 lines of 1 worded products. One word on each line.   The result I need might look like this:  50. tea 51. coffe 52. orange 53. banana 54. etc

If I use cat -n text.txt to automatically number the lines, how do I then use the command to show only certain numbered lines.


How many solutions of the equation $ax^2 +by^2 = 1$ are there with $(x, y) ∈ \mathbb{F}_{p} ×\mathbb{F}_{p}$ where $a, b$ are integers whose product is not divisible by $p$?  This was a recommended problem from my professor for algebraic number Theory, any insight into the best method of solving this or similar problems would be appreciated.  edit: $p \in \mathbb{Z}$ is a prime edit 2: I do not believe this is a duplicate. In the claimed possible duplicate, you assume the number os solutions and go about proving $gcd(ab,p) = 1$. My proof would go the other way, and still the questions differ in the fact

What I need to show is that  For $\gcd(ab,p)=1$ and p is a prime, the number of solutions of the equation $ax^2+by^2\equiv 1\pmod{p}$ is exactly $$p-\left(\frac{-ab}{p}\right)\,.$$  I got a hint that I have to use Legendre symbol from the answer. I think that I may count a solution one by one. What I did : $$(ax)^2 \equiv a-aby^2 \pmod{p}$$ It suffices to count $y$ such that $(\frac{a-aby^2}{p})=1$. I tried to use the complete residue system or a primitive root but it didn't work. The factorization also didn't work. I think that the pigeonhole principle may not work because it just says the existence. Thanks in advance.


Prove that for all $a,b \in\mathbb{R}$, $a·b=0$ if and only if $a=0$ or $b=0$. Using these field axioms:  (A1) Addition is commutative (A2) Addition is associative (A3) Addition has a neutral element $0$ (A4) Any element has an additive inverse (A5) Multiplication is commutative (A6) Multiplication is associative (A7) Multiplication has a neutral element $1$ (A8) Any non-zero element has a multiplicative inverse (A9) Multiplication distributes over addition   My answer: Suppose $𝑎𝑏=0$ and by (A6) $𝑏=1⋅𝑏=(𝑎^{−1}⋅𝑎)⋅𝑏=𝑎^{−1}⋅(𝑎⋅𝑏)$. Either $𝑎=0$ or it is not. If a does not equal $0$,then by (A8),there is a unique element $𝑎^{−1}=(1/𝑎)∈ℝ$ such that $𝑎^{−1}⋅(𝑎⋅𝑏)=𝑎^{−1}⋅0=0$ thus $b=0$

The proof I have starts of with $\;xy=0\;$ in a field.   Then $x^{-1}$ exists because it is a field.  Then $x^{-1} xy=x^{-1} 0$.  Therefore $y=0$.  But surely if an integral domain can not have any zero divisors, how can we end the proof by saying $y=0$? Surely then y is a zero divisor and hence the field is not an integral domain?


Wouldn't taking down the Empire have been easier with two Jedi? I'm looking for in-universe reasons and storytelling explanations.

In Episode V, The Empire Strikes Back, when Luke is leaving Dagobah, Obi-Wan, as a Force Ghost, says, "He is our last hope."  Yoda replies, "No, there is one other."  Was Yoda planning on training Leia as a Jedi, either in case Luke was killed or converted, or in addition to Luke?


For any two positive integers ${n_1,n_2}$, the relationship between their greatest common divisor and their least common multiple is given by  $$\text{lcm}(n_1,n_2)=\frac{n_1 n_2}{\gcd(n_1,n_2)}$$  If I have a set of $r$ positive integers ${n_1,n_2,n_3,...,n_r}$, does the same relationship hold? Is it true that  $$\text{lcm}(n_1,n_2,n_3,...,n_r)=\frac{\prod_{i=1}^r n_i}{gcd(n_1,n2,n_3,...,n_r)}$$  I feel like this should be easy to prove, but I'm struggling to get a handle on it.

If I know the GCD of 20 numbers, and know the 20 numbers, is there a formula such that I input the 20 numbers and input their GCD, and it outputs their LCM? I know that $$\frac{\left| a\cdot b\right|}{\gcd(a,b)} = \text{lcm}(a,b).$$ So is it$$\frac{\left| a\cdot b\cdot c\cdot d\cdot e\cdot f\right|}{\gcd(a,b,c,d,e,f)}?$$If not, what is it?


I have a html page and on GO button i have write redirecting code   window.location.replace(url);   I put this page in iframe and on click on GO button result page should open in the existing page replacing the url of the browser but it is opning in iframe only... I tried <base target="_parent" /> also but no luck

What JavaScript do I need to use to redirect a parent window from an iframe?  I want them to click a hyperlink which, using JavaScript or any other method, would redirect the parent window to a new URL.


In my drive D I see these strange folders:    I can't delete the file

I cannot remove the folders shown in the screenshot below:    They seem to be trash related to .NET installations. They are very ugly and annoying.  Is there a safe way to remove these folders?


My question is : How can I print only article of 2012 from my bib file?  For more clear, consider command \printbibliography[type=article]. This command only print article of .bib file. I want print only article with year=2012.  Thanks in advance.

With biblatex and Biber, is it possible to print all the bibliography (\printbibliography) from (let's say) 2003 to 2008 in one section? And then in another section print all the bibliography from 2009 to 2016?


I have a script that I call via . ./env/setenv.sh. In this script, I'm calling a python script that's also located in ./env/.   My current directory is along the lines of ~/dev/project/ and I'm calling into ~/dev/project/env via . ./env/setenv.sh  My attempts (${dirname $0}) to reference the location of setenv.sh from within itself hasn't been successful, because my current working directory is considered /bin rather than ~/dev/project/env/ (I assume due to me sourcing it with .)  What other options do I have for referencing the current working directory of the setenv.sh script, so that it can call my .py script from within the same directory?  e.g.,  WORKING_DIR=$(dirname "$0") echo $WORKING_DIR export VAR=$(python $WORKING_DIR/script.py)"   When called via . ./env/setenv.sh prints: /bin, and can't locate script.py

Is it possible that a sourced shell script knows its location? I've read  but the answers focus on bash and tcsh and fail if a POSIX shell is used. .  A solution doesn't need to be 100% reliable. It's unlikely that the path contains hard or symlinks.  # sourcing the script should yield the absolute path to the script . somedir/thescript  # within “thescript” -> /tmp/foo/bar/somedir   Some background: The script is part of an existing application containing dozens of binaries in a bin directory in a known location (varies per architecture) relative to the sourced script. To use the application the user sources the script which prepends the bin directory to the PATH, so the application's binaries can be easily invoked in the current shell (whichever shell that might be).


Can you help me?  If $f$ and $f'$ are continuous at $[a,b]$ (where $a,b\mathbb{\in R}$), then $\forall\epsilon>0$ exists a polynomial $p$ such that $\left\Vert f-p\right\Vert _{\infty}\leq\epsilon$ and $\left\Vert f'-p'\right\Vert _{\infty}\leq\epsilon$.

The Stone-Weierstrass Theorem tells us that we can approximate any continuous $f:\mathbb{R}^n\to\mathbb{R}$ arbitrary well on a compact subset of $\mathbb{R}^n$ by some polynomial. Suppose that $f$ is continuously differentiable, under what conditions can we guarantee we can find a polynomial $p$ such that $p$ approximates arbitrarily well $f$ and the partial derivatives approximate of $p$ arbitrarily well those of $f$ (on a compact subset of $\mathbb{R}^n$)? References are welcome. See below for my (probably naive) approach to the question.    It is straightforward to find conditions if $n=1$: Let $K:=[a,b]\subseteq\mathbb{R}$ and let $K_+$ denote some open cover of $K$. Suppose that $f:K_+\to\mathbb{R}$ is continuously differentiable and let $f'$ denote its derivative. Then, by Weierstrass's approximation Theorem we have that there exists a polynomial $q$ such that   $$||f'(x)-q(x)||\leq \varepsilon$$  for all $x\in K$. Choose some $y\in K$. For any $x\in K$ define  $$p(x):=f(y)+\int_y^xq(t)dt.\quad\quad(*)$$  By the Fundamental Theorem of calculus we have that $p'=q$. So for any $x\in K$  $$||f(x)-p(x)||=\left|\left|\int_y^x (f'(t)-q(t))dt\right|\right|\leq \int_y^x ||f'(t)-q(t)||dt\leq \varepsilon||x-y||\leq \varepsilon (a-b).$$  However, the above argument doesn't work in higher dimensions because the analogue of $(*)$ does not imply that $\nabla p = q$ (since not every vector of polynomials spans a gradient field). Can anyone suggest a way around this? That is, a way to to show that for continuously differentiable $f:\mathbb{R}^n\to\mathbb{R}$ and for any $\varepsilon>0$, we can always find a polynomial $p$ such that   $$||f(x)-p(x)||+||\nabla f(x)-\nabla p(x)||\leq \varepsilon$$  for all $x$ in some compact set $K$? Feel free to add extra conditions on $K$, if it makes life easier.


I'm using JabRef to manage my references, the  package and jpe bibliography style.  When I use the \bibliography{ } command to generate the reference list, the urls of the documents cited also appear by default, but I dont want them to show.   I'm not sure if its an issue with JabRef, natbib, or the bibliography style. Any idea of how to remove them?

When building my bibliography using the    \bibliographystyle{plainnat}    The output looks like     [88] G. R. Ruetsch and M. R. Maxey. Small-scale features of vorticity   and pas- sive scalar fields in homogeneous isotropic turbulence.   Physics of Fluids A: Fluid Dynamics, 3(6):1587, 1991. ISSN 08998213.   doi: 10.1063/1.857938. URL   .   I'd like to omit of some of the fields, such as URL and ISSN.  Is this possible? If so, what do I need to do?  (Note: My BibTex was made using Mendley)


While I am executing my perl script, I am getting following error: Can't locate Text/Unidecode.pm in @INC (you may need to install the Text::Unidecode module)

I get this error:  Can't locate Foo.pm in @INC  Is there an easier way to install it than downloading, untarring, making, etc?


centos@ip-10-0-5-4 ~ $ sudo ls -l /var/solr/data/new_core/_default/* zsh: no matches found: /var/solr/data/new_core/_default/* centos@ip-10-0-5-4 ~ $ sudo ls -l /var/solr/data/new_core/_default/  total 4 drwxr-xr-x. 3 root root 4096 Mar 28 07:34 conf

I think there must be simple answer to this, but I can't figure out why this isn't working!  I have a folder in my home directory (well, a few levels down) called installed-plugins. I want to transfer all the contents of that folder (about 15 .jar files) to a different folders, also called installed-plugins.  This is what I am trying:  $ sudo mv /home/jira-plugins/installed-plugins/* /var/atlassian/application-data/jira/plugins/installed-plugins/                                                                                mv: cannot stat `/home/jira-plugins/installed-plugins/*': No such file or directory   What is my error?  The folder is definitely not empty. Here is the ls output:  $ sudo ls /home/jira-plugins/installed-plugins analytics-client-3.15.jar                                  plugin.2223138796603023855.jira-importers-plugin-6.0.30.jar atlassian-chaperone-2.0.3.jar                              plugin.330169947367430109.jira-fisheye-plugin-6.2.8.jar atlassian-client-resource-1.0.jar                          plugin.4363048306537053933.jeditor-2.1.7.2.jar atlassian-pocketknife-api-commons-plugin-0.19.jar          plugin.4438307615842123002.jira-ical-feed-1.0.4.jar atlassian-pretty-urls-plugin-1.8.jar                       plugin.461510159947098121.jira-issue-collector-plugin-1.2.5.jar base-hipchat-integration-plugin-7.8.24.jar                 plugin.5630909028354276764.atlassian-universal-plugin-manager-plugin-2.7.8.jar base-hipchat-integration-plugin-api-7.8.24.jar             plugin.6920509095052318016.atlassian-bonfire-plugin-2.9.13.jar hipchat-core-plugin-0.8.3.jar                              plugin.6952408596192442765.atlassian-bonfire-plugin-2.8.2.jar hipchat-for-jira-plugin-1.2.11.jar                         plugin.7079751365359230322.jira-importers-bitbucket-plugin-1.0.8.jar jira-email-processor-plugin-1.0.29.jar                     plugin.7451827330686083284.atlassian-universal-plugin-manager-plugin-2.21.4.jar jira-fisheye-plugin-7.1.1.jar                              plugin.7498175247667964103.jira-importers-redmine-plugin-2.0.7.jar jira-ical-feed-1.1.jar                                     plugin.7803627457720701011.jira-importers-plugin-3.5.3.jar jira-issue-nav-components-6.2.23.jar                       plugin.7977988994984147602.jira-bamboo-plugin-5.1.6.jar jira-servicedesk-2.3.6.jar                                 plugin.8372419067824134899.jira-importers-plugin-5.0.2.jar jira-workinghours-plugin-1.5.5.jar                         plugin.9081077311844509190.jira-fisheye-plugin-5.0.13.jar plugin.1260160651631713368.stp-3.0.11.jar                  plugin.9128973321151732551.jira-fisheye-plugin-6.3.10.jar plugin.2076016305412409108.jira-fisheye-plugin-3.4.10.jar  plugin-license-storage-plugin-2.8.jar plugin.218965759549051904.jira-importers-plugin-6.1.5.jar  querydsl-4.0.7-provider-plugin-1.1.jar plugin.2211202876682184330.jira-ical-feed-1.0.12.jar       stp-3.5.10.jar


A.   Prove three distinct complex numbers $z_1,z_2,z_3$ lie on a straight line iff     $\bar{z_1}z_2+\bar{z_2}z_3+\bar{z_3}z_1=r$ which $r$ is a real number.   B.    Prove three distinct complex numbers $z_1,z_2,z_3$ lie on a straight line iff there are non-zero $\lambda_1,\lambda_2,\lambda_3$ such that $\lambda_1+\lambda_2+\lambda_3=0$ and $\lambda_1z_1+\lambda_2z_2+\lambda_3z_3=0$    I already knew one condition is $z_1-z_2=r(z_2-z_3)$ for some real number . But don't know how to infer these two conditions. Any hints would be helpful.

Prove:  $$\bar{z_1}z_2+\bar{z_2}z_3+\bar{z_3}z_1 \in \mathbb R \iff z_1, z_2, z_3  \text{ are along the same line}$$  My attempt:  Since $z+\bar{z} =2  \operatorname{Re}z \in \mathbb R$, so we can transform like that: $$\bar{z_1}z_2+\bar{z_3}z_2+\bar{z_3}z_1 + \bar{z_1}z_1 \in \mathbb R$$ next $$(\bar{z_1}+\bar{z_3})(z_1+z_2) \in \mathbb R$$ But we should have something like $$\frac{z_1+z_3}{z_1+z_2} \in \mathbb R$$  So, what is missing?  Thanks a lot!


Due to various trials and errors and installation of Kubuntu 18.04 LTS, I have a clean install on a 120 GB SSD but I do not see the 3 TB HD where I would like to put /home.  I'm ready to reinstall if more efficient. Indeed, the HDD is only visible when installing. It is not visible with Kubuntu Partition Manager (KPM).  $ lsblk -a NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT loop0    7:0    0         0 loop  loop1    7:1    0         0 loop  loop2    7:2    0         0 loop  loop3    7:3    0         0 loop  loop4    7:4    0         0 loop  loop5    7:5    0         0 loop  loop6    7:6    0         0 loop  loop7    7:7    0         0 loop  sda      8:0    0 111,8G  0 disk  ├─sda1   8:1    0   512M  0 part /boot/efi └─sda2   8:2    0 111,3G  0 part / sdb      8:16   1         0 disk  sdc      8:32   0         0 disk  sr0     11:0    1  1024M  0 rom  $ df -a Sys. de fichiers blocs de 1K  Utilisé Disponible Uti% Monté sur sysfs                      0        0          0    - /sys proc                       0        0          0    - /proc udev                 8152164        0    8152164   0% /dev devpts                     0        0          0    - /dev/pts tmpfs                1637404     1416    1635988   1% /run /dev/sda2          114337956 17937500   90549320  17% / securityfs                 0        0          0    - /sys/kernel/security tmpfs                8187000   163692    8023308   2% /dev/shm tmpfs                   5120        4       5116   1% /run/lock tmpfs                8187000        0    8187000   0% /sys/fs/cgroup cgroup                     0        0          0    - /sys/fs/cgroup/unified cgroup                     0        0          0    - /sys/fs/cgroup/systemd pstore                     0        0          0    - /sys/fs/pstore efivarfs                   0        0          0    - /sys/firmware/efi/efivars cgroup                     0        0          0    - /sys/fs/cgroup/cpu,cpuacct cgroup                     0        0          0    - /sys/fs/cgroup/pids cgroup                     0        0          0    - /sys/fs/cgroup/cpuset cgroup                     0        0          0    - /sys/fs/cgroup/net_cls,net_prio cgroup                     0        0          0    - /sys/fs/cgroup/perf_event cgroup                     0        0          0    - /sys/fs/cgroup/freezer cgroup                     0        0          0    - /sys/fs/cgroup/devices cgroup                     0        0          0    - /sys/fs/cgroup/memory cgroup                     0        0          0    - /sys/fs/cgroup/rdma cgroup                     0        0          0    - /sys/fs/cgroup/blkio cgroup                     0        0          0    - /sys/fs/cgroup/hugetlb systemd-1                  0        0          0    - /proc/sys/fs/binfmt_misc mqueue                     0        0          0    - /dev/mqueue debugfs                    0        0          0    - /sys/kernel/debug hugetlbfs                  0        0          0    - /dev/hugepages configfs                   0        0          0    - /sys/kernel/config fusectl                    0        0          0    - /sys/fs/fuse/connections /dev/sda1             523248     6232     517016   2% /boot/efi tmpfs                1637400       16    1637384   1% /run/user/1000 /dev/fuse                  0        0          0    - /run/user/1000/doc   [edit] Now visible with Gnome Utility Disk but not in Dolphin

I have got a dual boot system here with a couple of partitions:     Windows 7 OS partition Another partition for office data One partition for Ubuntu And of course one 100Mb partition auto-made by Windows And just like Windows one swap partition by Ubuntu   Of course, I wanted to have a separate partition for /boot and /home which I have not got here, so I would like to do that if it’s possible. Can I install GParted in my system and create a new partition by shrinking my existing / partition, then mount /home under it somehow? I don't want to mess up my system. Some concrete advice required here.


We have an issue that our application database gets log full because we have a schedule job to write to a flat table for reporting purpose every hour in the application database. I wonder if we should create another reporting database, and write the data into the flat tables in reporting database, will it take care of the log full issue since we are now writing to a different database?

This one seems to be a common question in most forums and all over the web, it is asked here in many formats that typically sound like this:  In SQL Server -  What are some reasons the transaction log grows so large? Why is my log file so big? What are some ways to prevent this problem from occurring? What do I do when I get myself on track with the underlying cause and want to put my transaction log file to a healthy size?


I want to implement a script on my server which will automatically send email alerts if the disk usage goes over 90% . My filesystem is data/u01 and the mount point is /u01  #!/bin/bash  ADMIN=some1@xyz.com  ALERT=90  df -h | egrep -v 'data/u01/u01' | awk '{ print $5 " " $1 }' | while read output;   do  usep=$(echo $output | awk '{ print $1}' )  echo $usep  if [ $usep -ge ${ALERT%} ]; then    echo  "Alert: Almost out of disk space $usep"    df -h | mail -s "Alert: out of disk space $usep"  $ADMIN  fi  done   ...........  but i am getting following error :  capacity  ./iv.sh: line 8: [: capacity: integer expression expected 23%  ./iv.sh: line 8: [: 23%: integer expression expected 0%

I want to implement a script on my server which will automatically send email alerts if the disk usage goes over 90% and second email alert when it goes over 95%. My filesystem is abc:/xyz/abc and the mount point is /pqr.  I have tried this:  ADMIN="someone@def.com"  ALERT=90  df -H | grep -vE 'abc:/xyz/pqr | tmpfs |cdrom' | awk '{ print $5 " " $1 }' | while read output; do    usep=$(echo $output | awk '{ print $1}' | cut -d'%' -f1 )    partition=$(echo $output | awk '{ print $2 }' )      if [ $usep -ge $ALERT ]; then        mail -s "Alert: Almost out of disk space $usep" $ADMIN      fi    done   But I am getting an error which says  line 7: [: Use: integer expression expected


I am under a DDOS attack. I'm trying to locate the IP address that is making 1100+ connections, however, when running the following command, it shows a 1100+ connection, but the ip address column is blank. By the way, I'm using CSF firewall to block connections.     netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort   | uniq -c | sort -n   This is what it returns. Notice the blank column next to "1157".        1    xxx.xx.xx.xxx       1    xx.xxx.xxx.xx       2    xx.xxx.xxx.xxx       2    xx.xx.xxx.xxx       3    xx.xxx.xxx.xx      63    xx.xxx.xxx.xxx    1157   How can I find that missing IP address?  Thanks.

This is a  about DoS and DDoS mitigation.   I found a massive traffic spike on a website that I host today; I am getting thousands of connections a second and I see I'm using all 100Mbps of my available bandwidth.  Nobody can access my site because all the requests time out, and I can't even log into the server because SSH times out too!  This has happened a couple times before, and each time it's lasted a couple hours and gone away on its own.  Occasionally, my website has another distinct but related problem: my server's load average (which is usually around .25) rockets up to 20 or more and nobody can access my site just the same as the other case.  It also goes away after a few hours.  Restarting my server doesn't help; what can I do to make my site accessible again, and what is happening?  Relatedly, I found once that for a day or two, every time I started my service, it got a connection from a particular IP address and then crashed.  As soon as I started it up again, this happened again and it crashed again.  How is that similar, and what can I do about it?


I need to create a variable in a different script from the main one in my game I am working on, with  and .  For example:  def test():     a = 10 def testing():     return a   Then I run code like this:  import (script name) script name.test() script name.testing()   And after this, it gives an error. How can I fix this problem?

What exactly are the Python scoping rules?  If I have some code:  code1 class Foo:    code2    def spam.....       code3       for code4..:        code5        x()   Where is x found?  Some possible choices include the list below:   In the enclosing source file In the class namespace In the function definition In the for loop index variable Inside the for loop   Also there is the context during execution, when the function spam is passed somewhere else. And maybe  pass a bit differently?  There must be a simple reference or algorithm somewhere.  It's a confusing world for intermediate Python programmers.


I want to tag each line of an array that is inside the { symbol. For the example bellow I use align, but a solution with equation, subequation or some other "top" structure might also work.  Here is an example:  \begin{align} \mathbf{S} = \left\{ \begin{array}{lll} a & \text{name a} \\ b & \text{name b} \\ c & \text{name c},  \end{array} \right. \end{align}   I would like to have number-letter tag for each line of this structure, i.e. (1a), (1b) and (1c) for example.

As much as I have tried, it doesn't seem possible to use separate labels when using a casesconstruction (from the amsmath package).  Ideally, I would like to be able to write something like  \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} f(x)=\begin{cases}   1&x\geq0\label{positive}\\   0&x<0\label{negative} \end{cases} \end{equation} \end{document}   and later refer to both cases at different places. What would be the best way to achieve this result?


My regex validates words (also containing numbers), but words that have accents are not validating correctly.  /^[a-zA-Z0-9_]*$/i.test(word)   For example:  car => true  plantas => true  avião => false (but this should be also true)   What should I change in my regex to also work with accents?

What is the easiest way to match non-ASCII characters in a regex? I would like to match all words individually in an input string, but the language may not be English, so I will need to match things like ü, ö, ß, and ñ. Also, this is in Javascript/jQuery, so any solution will need to apply to that.


I am making a table in a two-column document and one of the table columns is running out of the page. This is a sample of the table. I would like to wrap the last column in the table. How can I solve this?  \begin{table}[b]  \caption{} \label{snps.tab}% \begin{tabular*}{\columnwidth}{@{}lllll@{}} \toprule SNP & Chromosome & Gene & LOD score & Annotation \\ \colrule rs33321100 & chr17 & Srd5a2 & 3.79 & 3-oxo-5-alpha-steroid 4-dehydrogenase 2 \\ \botrule \end{tabular*}% \end{table}

I have a table with long heading names. I want to fix the the width of the columns. When I do so the text flows out if the column. Any suggestion about fixing it.  Here is the example   \begin{table*}[ht] \begin{tabular}{|l|r|r|r|r|r|} \hline Image & Score  & here is a lot of text & agian a lot &a lot and a lot& and the same here\\ \hline a \(left\) & 1 & 1 & 1 & 1 & 1  \\ \hline b \(right\)&  1 &1 & 1 & 1 & 1  \\  \end{tabular}  \end{table*}


I am interested in doing something like the following.  \documentclass{article}  \usepackage{amsmath}  \newenvironment{customeq}{\begin{equation}\begin{split}}{\end{split}\end{equation}}  \begin{document}  This is an equation. \begin{customeq} x=5 \end{customeq}  \end{document}   However, when I try to do this, I get an error saying that \begin{split} has been ended by \end{customeq}.  Is there a way to get around this issue?

I'm trying to define a new environment that consists of a split environment inside an equation environment. But I'm getting an error. Here's what I'm doing:  \documentclass[a4paper,12pt]{article} \usepackage[brazil]{babel} \usepackage[utf8]{inputenc} \usepackage{amsmath} \newenvironment{example}{\begin{equation}\begin{split}}{\end{split}\end{equation}}  \begin{document} \begin{example}oi\end{example} \end{document}   And the error message I'm getting is:   ERROR: LaTeX Error: \begin{split} on input line 8 ended by \end{example}.   I then tried a few other cases. If I remove the splits and define example to be just equation, it runs fine. If I remove the equations and define example to be just split, I get the exact same error message.  In other words: I only get this error when split is involved. Is there a way to make this work?  EDIT: The reason I'm doing this, is because I want a convenient way to create split-equations. I know it's similar to align. I prefer split-equations because the entire line of equations gets a single number for referencing (it's even placed in the middle line). align, however, will force me to \notag each line, otherwise I get a number for each line in the equation (which tends to get messy when equations are long and numerous). It's not the end of the world, but the split-equation combination is just quicker and easier (if I can manage to define a command for it).  Alternatively, the multline environment is not appropriate either, because it doesn't let you manually align each line (like aligning the equal signs). Instead it only lets you push everything left or right.  EDIT2: I just tried this:  \newenvironment{example}{ \begin{equation}\split}{\endsplit \end{equation}}   and got this error  ERROR: LaTeX Error: \begin{equation} on input line 8 ended by \end{example}.   Which is weird, because removing \split and \endsplit entirely doesn't return any errors (so it's not equation's fault).


Suppose $F(k,x)$ be a secure PRF over $(\mathcal{K},\mathcal{X},\mathcal{Y})$ where $\mathcal{K} = \mathcal{X} = \mathcal{Y} = \{0,1\}^n$ $$F'(k, x) = F(F(k, 0^n), x) \; $$ Trying to get the intuition to prove it is secure PRG else given will be not by contrapositive... but cannot from the reduction of it. How to formulate it to prove it is secure?

Assume that $F: \{0,1 \}^n \rightarrow \{0,1 \}^n$ is PRF. Examine if the following functions are PRFs: $$ \begin{align} 1. \, F_1(k,x) &= F(k,x) \oplus x \\ 2. \, F_2(k,x) &= F\left(F(k,0^n), x\right) \\ 3. \, F_3(k,x) &= F\left(F(k,0^n), x\right)|| F(k,x) \end{align} $$ where $||$ denotes concatenation.  Attempt: For $1.$ a standard distinguisher would be: $x_1 \oplus x_2 == y_1 \oplus y_2$, where $x_1, x_2$ are two inputs and $y_1, y_2$ are their outputs respectively. So $F_1$ is not a PRF. For $2.$ I believe that $F(k,0^n) = k'$ acts as a key, so $F_2(k',x) = F(k',x)$ should still be a PRF. For $3.$ I would say that the concatenation of two PRFs would still be a PRF, since you combine two pseudorandom outputs together to yield $F_3$'s output. Can you verify my results?


I'm new to jni programming. I'd like to pass a float array from java to jni, allocate sufficient memory dynamically to float array in jni side, store some values in the jfloatArray, and access it in java. I don't want to return the jfloatArray, just modify the input float array passed. I tried the below method but it is not modifying my java float array. How to achieve this?  Java Code:      float[] pointList = null;     outputBitmap = callJNIFunc(pointList, inputBitmap);  JNI Code:  Bitmap callJNIFunc(JNIEnv *env, jfloatArray pointListInPixels, jobject inputBitmap) {   pointListInPixels = (env)->NewFloatArray(pointListSize.M * 2);   env->SetFloatArrayRegion(pointListInPixels, 0, pointListSize.M * 2, pointFloats); }   I read from  that this can be achieved by passing a Custom Object. However, I'm not quite sure how to do this from jni for a java Object containing float array like this  public class CustomObject{   public  float[] points;   public float[] getPoints() {     return points;   }    public void setPoints(float[] points) {     this.points = points;   }  }

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


I am completely new to Linux. I just installed Ubunt 20.04 LTS. I tried to install BURG on my Ubuntu but then it failed (I tried it several times). Now I keep getting this error for most of the thingss I try to do with using the termnal. Error is displayed below: nana@nana-HP:~$ apt list –installed E: Type '“deb' is not known on line 55 in source list /etc/apt/sources.list E: The list of sources could not be read. nana@nana-HP:~$   This notification is also on my screen even after restart.  Thanks!

Every once in a while I see users having issues to update due to errors like this:  E:Type 'ain' is not known on line 1 in source list /etc/apt/sources.list.d/some-ppa.list'   with varying types/line numbers/source list files (often after removing a PPA).  How can such an error be fixed?


I'm trying to link my JasperReport to my Application form but I got this error and I don't know ,how to fix it     Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory       at net.sf.jasperreports.engine.util.JRLoader.(JRLoader.java:68)       at net.sf.jasperreports.engine.JRPropertiesUtil.loadProperties(JRPropertiesUtil.java:99)       at net.sf.jasperreports.engine.DefaultJasperReportsContext.initProperties(DefaultJasperReportsContext.java:94)       at net.sf.jasperreports.engine.DefaultJasperReportsContext.(DefaultJasperReportsContext.java:71)       at net.sf.jasperreports.engine.DefaultJasperReportsContext.(DefaultJasperReportsContext.java:59)       at net.sf.jasperreports.engine.JasperCompileManager.getDefaultInstance(JasperCompileManager.java:84)       at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:459)       at treasury.treasIraqi2.jButton_printActionPerformed(treasIraqi2.java:981)   Specifically at this line:           jr = JasperCompileManager.compileReport(path);  And these are my codes:(at Print Button)  try{                  Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");         } catch (ClassNotFoundException ex) {             Logger.getLogger(treasIraqi2.class.getName()).log(Level.SEVERE, null, ex);         }          String url = "jdbc:sqlserver://localhost:1433;databaseName=treasurydb";         Connection conn = null;         try {             conn = DriverManager.getConnection(url, "sa", "oraclee");         } catch (SQLException ex) {             Logger.getLogger(treasIraqi2.class.getName()).log(Level.SEVERE, null, ex);         }          String path = "D:\\NetBeansProjects\\treasuryApplication\\src\\treasury\\newReport.jrxml";         JasperReport jr = null;         try {             jr = JasperCompileManager.compileReport(path);         } catch (JRException ex) {             Logger.getLogger(treasIraqi2.class.getName()).log(Level.SEVERE, null, ex);         }           JasperPrint jp = null;         try {             jp = JasperFillManager.fillReport(jr, null, conn);         } catch (JRException ex) {             Logger.getLogger(treasIraqi2.class.getName()).log(Level.SEVERE, null, ex);         }           JasperViewer.viewReport(jp);         conn.close();

I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this?


I've been asking a lot of questions on Stack Overflow and recently one of my questions was down voted 3 times, after which I voluntarily closed it. Since then though, my questions seem to be getting hardly any views and no answers (when normally they are answered within moments).  I'm not sure what seems to be causing this but I'm wondering if I'm in some sort of hell ban or sin bin. Does Stack implement such a thing?

Given , I must say I think the idea (making that user's content visible to only them) is a good one.  However, the people in whose hands that power will be placed terrify me.  Jeff is saying that he doesn't like that bans can degenerate into meta-discussions about the fairness of banning, and in that respect I agree with him. But the meta-discussions do accomplish one thing -- they get more than one person to look at the ban and weigh in on what they think.  This isn't that I don't trust moderators (or, indeed, diamond moderators), but I don't trust any one single human being with an irrevocable and complete banhammer, where there's no potential to dispute things. (And if the user doesn't know they're banned, there's no potential for dispute)  Basically, I'd sleep a lot more soundly at night knowing that if one of these "enhanced bans" are put into place, that at least two people have looked at the "problem child", and only after more than one person has signed off on such a ban, does that go into effect. I don't care exactly what that process is, but I don't want to have to worry about pissing off a moderator and getting banned as a result.  We all get pissed off here -- it's part of any community. But "the nuclear option(s)" need(s) to be decided upon by someone with a cool head, not someone who's pissed off.


I've been struggling with installing Ubuntu 13.04 on my laptop (I believe it's Asus N56VZ). I'm running on pre-installed Windows 8 and even though I'm able to install Ubuntu (13.04) and boot it by setting it as the primary boot option from BIOS, I'm unable to perform a clean dual boot (the Windows dual boot screen doesn't show up, instead it just boots to Windows if boot manager is set as the primary boot option).  I've tried:   EasyBCD, no luck with it. I get a screen asking for Windows installation CD with this option. Boot-repair. I used ubuntu boot repair from a live session. It corrupted the booting totally; I got booted to grub resque ("something too small" (not sure about the exact message) when booting Windows, unknown filesystem when booting the Ubuntu). I had to change the boot to my LiveUSB and uninstall Ubuntu with Os-Uninstall in order to get Win8 operational.   Here's the paste that Boot-Repair created:

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


Please read the following text. This text is part of Leonardo Sauskind's book. It says that the relation F = m v is reversible. Why?

In the book of classical mechanics, Leonard Susskind says that Aristotle's equation of motion (F = mv) is reversible. But in the second lecture Theoretical Minimum 'videos say that F = mv is not reversible !!!! Finally, which one is right?


I have made an bedroom it looks fine in the viewport render but when I actually render it the chairs doesn't show. I got the object from Blenderkit but I also got some other stuff that shows like the katana Viewport:  Render:

This is meant to solve this problem once and for all. What is every reason an object isn't showing up in a render or viewport in when using the cycles render engine?


Is there a way to pluralize a quotation? E.g.,     He was greeted with a chorus of “Hello”s.   or     Her daring earned “Ooh”s & “Ahh”s from around the room.   With actual dictionary words (“Hello” in the first example), simple plurals might do, without quotes: “He was greeted with a chorus of hellos.”  With ad hoc onomatopoeic words like “ooh” & “ahh”, though, can I pluralize them without confusing the reader? Is italicizing part of the word acceptable: “Her daring earned oohs & ahhs from around the room”?

When writing (a blog post, script, etc..) what is the proper way to indicate two or more instances of a single letter? For instance, in Monty Python's Bookshop Sketch:     C: I wonder if you might have a copy of "Rarnaby Budge"?      P: No, as I say, we're right out of Edmund Wells!      C: No, not Edmund Wells - Charles Dikkens.      P: (pause - eagerly) Charles Dickens??      C: Yes.      P: (excitedly) You mean "Barnaby Rudge"!      C: No, "Rarnaby Budge" by Charles Dikkens.  That's Dikkens with two Ks, the      well-known Dutch author.      P: (slight pause) No, well we don't have "Rarnaby Budge" by Charles Dikkens      with two Ks, the well-known Dutch author, and perhaps to save time I      should add that we don't have "Karnaby Fudge" by Darles Chickens, or      "Farmer of Sludge" by Marles Pickens, or even "Stickwick Stapers" by Farles      Wickens with four M's and a silent Q!!!!!  Why don't you try W. H. Smith's?      C: Ah did, They sent me here.   I had always believed that plural never uses an apostrophe before the 's' (it's only used for possession), but I have rarely seen in written material the format "four Ms". (On a side note, whoever wrote  also used "two Ks".)  On a side note, and perhaps this should be a separate question, if a Compact Disc is a CD, then two Compact Discs would be two CDs right? (I see "CD's" written everywhere)