Noting that \path can be made to wrap arbitrary text as per , I would like to use \path instead of \verb inside of biblatex for the "verbatim" fields.  This would mean overriding both \verb and \endverb, see for example these lines in the .bbl file generated from the MWE below.      \verb{file}   \verb /Users/joe/Weholdthesetruthstobeself-evidentthatallmenarecreatedequalthattheyareendowedbytheirCreatorwithcertainunalienableRightsthatamongtheseareLifeLibertyandthepursuitofHappiness/dec.txt   \endverb   I'm confused about how that would work syntactically.  The image here shows desired line wrapping on "Path"; the (nice) behaviour for a  file name with lots of underscores; and the (not very nice) behaviour for file name without underscores.    Source code for the above:  % arara: pdflatex % arara: biber % arara: pdflatex % arara: pdflatex \documentclass{article}  \usepackage[style=reading,             entryhead=true,             entrykey=false,             natbib,             hyperref=false,             url=false,             doi=false,             %style=apa,             sorting=nyt,             isbn=false,             %backref=true,             firstinits=true,             minnames=13,             maxnames=35,             minbibnames=10,             maxbibnames=100,             parentracker=true,             defernumbers=true,             backend=biber]{biblatex}  \usepackage[hyphenbreaks]{breakurl} \PassOptionsToPackage{hyphens}{url}  \begin{filecontents}{\jobname.bib} @inproceedings{XXXXXX,   author = {PQR},   booktitle = {BBC},   keywords = {LLM},   title = {ARP},   year = {2010a},   file = {/Users/joe/We_hold_these_truths_to_be_self-evident_that_all_men_are_created_equal_that_they_are_endowed_by_their_Creator_with_certain_unalienable_Rights_that_among_these_are_Life_Liberty_and_the_pursuit_of_Happiness/dec.txt}, }  @inproceedings{YYYYYYYY,   author = {PQR},   booktitle = {BBC},   keywords = {LLM},   title = {ARP},   year = {2010b},   file = {/Users/joe/Weholdthesetruthstobeself-evidentthatallmenarecreatedequalthattheyareendowedbytheirCreatorwithcertainunalienableRightsthatamongtheseareLifeLibertyandthepursuitofHappiness/dec.txt}, } \end{filecontents}  \expandafter\def\expandafter\UrlBreaks\expandafter{\UrlBreaks%  save the current one   \do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j%   \do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t%   \do\u\do\v\do\w\do\x\do\y\do\z\do\A\do\B\do\C\do\D%   \do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M\do\N%   \do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X%   \do\Y\do\Z}  \addbibresource{\jobname.bib}  \begin{document}  Path: \path{/Users/joe/Weholdthesetruthstobeself-evidentthatallmenarecreatedequalthattheyareendowedbytheirCreatorwithcertainunalienableRightsthatamongtheseareLifeLibertyandthepursuitofHappiness/dec.txt}  \nocite{*}  \printbibliography  \end{document}


Co-variance matrix, Eigen vector and Eigen values

What does eigen vector with largest eigen value mean and how it has effect on covariance matrix?


Number of permutations of $n$ elements where no number $i$ is in position $i$

I am trying to figure out how many permutations exist in a set where none of the numbers equal their own position in the set; for example, $3,1,5,2,4$ is an acceptable permutation where $3,1,2,4,5$ is not because 5 is in position 5.  I know that the number of total permutations is $n!$. Is there a formula for how many are acceptable given the case that no position holds its own number?


Using induction for an easy proof for formal languages

I am having trouble to understand the way of using a induction for the following example:     Let $\Sigma \overset{\Delta} = \{a, b\}$ and $S_1 \overset{\Delta} = \{a^n \mid n \in \Bbb N\}$. Prove using induction that $$\forall w \in \Sigma^* . w \in S_1 \to \big( w = \lambda \lor (\forall \ 1 \le i \le |w| . (w)_i = a) \big) .$$   How to do that? Any help is upvoted.


iPad still makes notification noises when muted

I've noticed recently my iPad 3 (Retina) is making notification sounds for Facebook Messenger and some games even when the volume is turned completely down to show the muted symbol.  I'm running the latest version of iOS supported on the device as far as I know.  What's going on and how do I fix it, it's very annoying to be woken up by the device?!


Relation between shm and circular motion

I recently read in a book that combination of two simple harmonic motions of equal amplitude in perpendicular directions differing in phase by pi/2 is circular motion. I don't seem to understand this because I am not able to figure which two forces in circular motion are acting to cause two different simple harmonic motions.  Any explanation would be thoroughly appreciated


I am given that $E(X^2) = 1$ and $E(|X|) \geq a > 0$, as well as $\lambda \in [0,1]$. Somehow, I'm now expected to prove that $P(|X| \geq \lambda a) \geq (1-\lambda)^2a^2$.  Considering the context, I'm expecting to be using Markov's inequality, Chebyshev's inequality, Hölder's inequality, or Jensen's inequality. Unfortunately, as far as I can tell, each of them only give upper bounds, whereas I'm supposed to find a lower bound. I've of course already found that $P(|X| \geq \lambda a) \leq \frac{1}{\lambda^2a^2}$, but I again don't see how this is useful in anyway.  Thanks in advance for the help.


I think I found a bug on Stack Overflow, would like to have feedback if it is, so you can eventually fix it!  If I go on my personal profile in SO on the activity tab and select the suggestion button (in order to see all edits I have suggested) I see 19 entries:    However, if I select one of the suggested edits and follow the link I see in my Editor Stats that I actually have 20 edit suggestions, and so it looks as if one went lost.    What's going on?  Which stat is correct? (Don't know if it's of any use but I remember doing 20...)  EDIT:  new proof of bug added, if I go on my review section in the lateral tab I'll see this recapitulation, which goes against editor stats


What are the advantages for certain types of transformers?

I work designing medium voltage motor starters. Being an mechanical engineer, I still don't understand the advantages, disadvantages, and when to use certain types of transformers. When is wye-wye best? When is delta-delta best? When is delta-wye best? When is wye-delta best?


Here is a relatively simple question that I'm unable to solve :/  There are $10000$ closed lockers in a hallway. A man begins by opening all $10000$ lockers. Next, he closes every $2^{nd}$ locker. Then he goes to every $3^{rd}$third locker and closes it if it is open or opens it if it is closed. After his $10000^{th}$ pass in the hallway, in which he toggles only locker number $10000$, how many lockers are open?  Any insight anyone?


I think this proof is a bit sloopy, but the idea works right? If $G/Z(G)$ is cyclic, then $G$ is abelian.

Let $G/Z(G)$ be the quotient group with center $Z(G)$. If $G/Z(G)$ is cyclic, then $G$ is abelian.   I was thinking that since $G/Z$ is cyclic, this implies the induced projection isomorphic quotient map $\phi : G/Z \to G$ would give the result. So such a $\phi$ is given by say $$\phi(gZ(G)) = gz$$ for $z \in Z(G).$  I feel like I made an assumption that is incorrect. I looked up the canoical homomorphism and it appears it usually is a map $\pi : G \to G/Z$.


I've heard that salary inversion is a problem in academia, and it happens when Universities continue to hire new and highly qualified people at higher and higher salaries, but they don't increase the salaries of the existing faculty at the same rates.   I want to ask - why is this actually a problem?  Shouldn't salary be based on merit and qualifications, not how long you've sat at a particular desk?


Can a macroscopic body have wavelength as that of electron?

Einstein has suggested that light can behave as a wave as well as like a particle i.e, it   has dual character. In 1924, de-Broglie suggested that just as light exhibits wave and particle properties, all microscopic material particles such as electrons, protons , atoms, molecules, etc. also have dual character. They behave as a particle as well as a wave. This means that an electron which has been regarded as a particle also behaves like a wave. Thus, according to de-Broglie,       all the material particles in motion possess wave characteristics.     According to de-Broglie, the wavelength associated with a particle of mass m, moving with velocity v is given by the relation, $$\lambda=\frac{h}{mv}=\frac{h}{p}$$ where h is Planck's constant, v is the velocity and p(=mv) is momentum of the particles. The waves associated with material pariticles are called de Broglie waves.   My book says that:        "Although the dual nature of matter is applicable to all material objects but it is significant for microscopic bodies only. For large bodies, the wavelengths of the associated waves are very small and cannot be measured by any of the available methods. Therefore, practically these bodies are said to have no wavelengths. Thus, any material body in motion can have wavelength but it is measurable or significant only for microscopic bodies such as electron, proton, atom or molecule. This may be illustrated as follows:   The wavelength of an electron with mass $9.11*10^{-31}$kg and moving with the velocity of $10^6$ m/s is $7.28$ m as shown below:   $$\lambda=\frac{h}{mv}=\frac{6.63*10^{-34}kg m^2 s^{-1}}{(9.11*10^{-31}kg)(10^6m/s)}=7.28*10^{-10}m$$   This wavelength associated with the moving electron is of the same order of magnitude as of $X$-rays which can be easily measured."    I made an attempt to check the wavelength associated with a car of mass $10^{6}$ kg and moving with velocity of $9.11*10^{-31}$ m/s, and I got the wavelength associated with it as shown below: $$\lambda=\frac{h}{mv}=\frac{6.63*10^{-34}kg m^2 s^{-1}}{(10^6kg)(9.11*10^{-31}m/s)}=7.28*10^{-10}m$$ This shows that a car or any material object with mass $10^{6}$kg and moving with velocity $9.11*10^{-31}$m/s (almost at rest) has the wavelength same as that of an electron, but this result in contradiction with the statement of my book. And even I thought that it is practically impossible to see any wavelength associated with such mass of $10^{6}$kg.     I have heard about rest and relativistic mass, and theory of relativity, but I have naive idea about it. If I have made mistake there, correct me. Or else "is it that macroscopic body can have same wavelength as that associated with an electron?" Please explain.


Open set in a metric space is union of closed sets

Show that every open set $A$ is in a metric space $(X,d)$ is the union of closed sets.  This is a question on my analysis homework. I understand that this can only be true if we consider the union of infinite closed sets. However, I am not sure what I can do. I understand to prove a set is open, then a ball centered at an arbitrary point with a radius will be completely contained in the set. But what is the radius? Is this the correct approach?


I have a concurrent bag filled with strings like this:  var bag = new ConcurrentBag<string>();   The collection contains 100 strings from which I need to find a phrase like in following example:  "Galaxy S7" - search phrase   And lets say the titles are:  Samsung galaxy S4 Samsung galaxy S5 Samsung galaxy S6 Samsung galaxy S7   The output that I would get is:  Samsung galaxy S4 Samsung galaxy S5 Samsung galaxy S6   I've tried it with the method "Contains" that string has like following:  var _items = new ConcurrentBag<SearchItems>(); Parallel.For(0, xdoc.GetElementsByTagName("item").Count, index => {     if (negative != null && negative != "")     {         if (!xdoc.GetElementsByTagName("title").Item(index).InnerText.Contains(negative))         {             _items.Add(new SearchItems() {                      CurrentPrice = Convert.ToDouble(xdoc.GetElementsByTagName("convertedCurrentPrice").Item(index).InnerText),                      ItemID = xdoc.GetElementsByTagName("itemId").Item(index).InnerText,                      Title = xdoc.GetElementsByTagName("title").Item(index).InnerText });         }     }     else     {         _items.Add(new SearchItems() {                  CurrentPrice = Convert.ToDouble(xdoc.GetElementsByTagName("convertedCurrentPrice").Item(index).InnerText),                  ItemID = xdoc.GetElementsByTagName("itemId").Item(index).InnerText,                  Title = xdoc.GetElementsByTagName("title").Item(index).InnerText });     } });   The problem is, contains is not case sensitive and if I try to exclude   s7  and   S7  I don't get same results... I need some solution that is not case sensitive :/  Can someone help me out?


Office 2011 asks for product key after upgrading to SSD Superduper

MS-Office has detected that the HDD has been upgraded to a SSD and is now read only until the Product Key is entered.  Is the product key in one of the files, which can be read?  How can the product key be recovered from the existing drive?  OSX: El Capitan 10.11.6    Office 2011  This question is slightly different from:    in the sense that I am seeking to pull the key from the existing system files or database.  I have tried the .plist solution, however, the activation problem persists: not sure why copying the .plist file to the SSD  a second time would work, when Superduper copied it over along with a .lock file.  This question is slightly different from:     Device is Macbook Pro and not a iMac Hard drive is not recovered (ghosted via SuperDuper)   Any techniques to extract the product key is appreciated.  The laptop was purchased second hand and had office installed / activated on the original HDD.  Office must check to see if drive has been changed.


Why do people grunt while playing tennis?

A lot of tennis players, from professional to recreational, grunt when they hit the ball while playing tennis. Is there a reason for this?   related:


I'm reading through  for the , which contains this figure on page 16:    This is of course an instrumentation amplifier that apparently uses an inverting amplifier's output instead of a ground in the lower-right corner of the above figure, but what really perplexes me is the 100 kΩ resistors attached directly to the noninverting inputs of three of the four amps. I don't recall seeing an instrumentation amplifier circuit in books or application notes that have them, and all of the instrumentation amplifiers I've built using the three op-amp scheme works fine without them.  The datasheets specifies an input resistance of 1012 Ω, which is 10,000,000 times greater than 100 kΩ, so it doesn't seem to add anything to the already high-impedance JFET inputs. I thought perhaps it has something to do with input bias currents, but that's just me making a wild stab in the dark.  Curiously, figure 26 in the same datasheet (page 18) shows a two-op-amp version of an instrumentation amplifier without the 100 kΩ resistors at the noninverting op-amp inputs!  What's the purpose of the 100 kΩ resistors at the noninverting inputs in the above circuit? Am I missing something completely obvious?


I'm currently working through some old code and I started to wonder,  is there actually any difference between:  public class XmlExport : IXmlExport {     private readonly IJobRepository jobRepository = new JobRepository(); }   and  public class XmlExport : IXmlExport {     private readonly IJobRepository jobRepository;      public XmlExport()     {         jobRepository = new JobRepository();     } }   Are there any advantages to initializing inside the constructor?  or is it just the same code?


Do I have to buy a second wildcard certificate for a subdomain?

We already have a wildcard certificate for *.mycompany.com. Our network has hosts that are only reachable internally. All of them belong to the internal.mycompany.com subdomain. There is a private server with the host name server.internal.mycompany.com on which I deployed our wildcard certificate.  When I visit the web server I get a host name mismatch error. Do I really have to get another wildcard certificate for *.internal.mycompany.com or is there another (free!?) way to use our wildcard certificate for all of our subdomains and its subdomains without getting an error in the browser?


Why are lens apertures usually 1.4, 1.8, 2.8, 4...?

Why are lens apertures usually of only certain sizes? 1.4, 1.8, 2.8 and so on. Why not 1.6, 2.5 or any other sizes?


Weird red dotted rectangle appearing in blender, how do I delete it?

I'm not even able to select it, also don't think its an object. Please help.


Need help finding movie or show (not anime) about a tentacle girl

I saw this movie or show can't remember few years ago. It's not an anime or animation pretty sure. I dont remember much but I remember a scene. The girl had tentacle legs? And she and this guy was running from her dad most likely and they hide in this dark room. She reveals her tentacle legs and they probably ended up in bed together. They run away and she goes in the water to save him I think but she ends up getting shot. If anybody knows please answer and thank you! This has been on my mind and I just really want to watch it again to stop thinking about it and relieve my brain.


Non-negative operator & self-adjoint operator

I am wondering how to show that:  if $A$ is a non-negative operator, then $A$ is self-adjoint.    Def. 1. $A$ is non-negative if $\langle Ax,x \rangle \geq 0$ for $\forall x\in H$, where $H$ is a Hilbert space.  Def. 2. $A$ is self-adjoint if $A = A^*$.


Prove that exists such n so $| \sin(n)- \frac 1 2| < \epsilon$

Prove that for each $\epsilon > 0$ it's possible to find such n, so $| \sin(n)- \frac 1 2| < \epsilon$.    Let's represent $n$ as $n = 2\pi k +x,\space\space x \in(-\pi,\pi),\space\space k \ge0,\space k \in \mathbb{N}$ Then we could say, rewrite original statement like that: $\exists x: x \in (\arcsin(\frac 1 2 -\epsilon),\arcsin(\frac 1 2 +\epsilon))$ But I'm not sure where to go from here. I'm really not experienced with such kind of proofs, so I would appreciate a suggestion. Purpose of solving this is pure self-educational for me, so I would like to receive a suggestion only, not the whole ready answer. Thank you.


The situation is as following: I have a .txt file that includes series of letters all divided bij newlines Here's a small part of the file:  lrtjxz lrtjhs lrtsxv lrtvsw lrtywj lrtyws lrxwwv lrvhsx lryjts lrytwv lrzvwj lzwscr lzjrww lzjroj lzjrvs lzjrhs lzojvs   I created a script that would count the number of times one of these lines is alphabetically ordered. But for some reason it echo's nothing not even 0.  Script:  cat file.txt | while read line do alphabeticSorted=$(echo $line | grep -o . | sort) if [ "$line" == "$alphabeticSorted" ] then count=$((count + 1)) fi done  echo "$newCount"   Does anyone know what I am doing wrong?


When moving comments to chat, retain comment upvotes as chat upvotes (not stars)

I'm proposing to modify chat to include special chat rooms where there are no stars, but upvotes instead. I've read the previous propositions similar to this one where upvotes get converted to stars and every time the rebuttal is "but upvotes aren't start and there are no upvotes in chat". So add them. It's that simple. Just add a bool to the code of the room that says this is a migrated comment thread, not a regular chat room and re-skin the stars to look like upvotes.  With all the fuss about chat rooms and revisiting the rules, I think this won't take too much developers' time to implement something that's been in demand for a long time. I don't think I need to bring up the argument about how upvotes/stars help figure out the public opinion (or how they're used not perfectly in line with the rulebook definition).  If you think this is a bad idea, I'd like to hear your reasoning. Also I'd like to read the staff's thought about this.


can someone help me with this error in my latex project? I tried different things different times and I cant figure it out   :/


How does QGIS calculate distances when the data is not projected (WGS84)?

I am playing a bit around with Qgis 2.14.6 to understand how it deals with distance measurement.  I took a line-shapefile that I saved in 3 different coordinate systems (4326, 32642 and a national one that doesn't exist in Qgis yet).  Using 32642 and the national one, the length is quite similar (6442m vs. 6428m)  But using 4326 (unprojected WGS84), I get 8057m  In all cases, I just used the Field Calculator and introduced $length.  I was already positively surprised that the result using 4326 was in meters and not in degrees.  To calculate the distance on the dataset in 4326, I assume that Qgis does some kind of re-projection in the background. Does anyone know which one?   Shapefiles here if anyone wants to play around:   EDIT - adding more info after more tests  As you can see, now both my shapefile and the project are in EPSG:4326, so unprojected:    Here the rough measurement of my shapefile, with the Qgis measure tool:   When I use the field calculator, the preview gives me a value in degrees, while the result seems to be in meters:      This would mean that the function $length, like the measurement tool, always gives a result in meters, but using a very coarse approximation of the degrees => meters transformation:    Is this a bug? or should it really behave like this? I find it at best counter-intuitive (but maybe it's just me) and, at worse, completely misleading (it makes very little sense to use, everywhere on earth, the length of 1 degree at the Equator). Any input or opinion here? Should I open a bug report (at least for the inconsistency between the preview and the actual result)?


My company has created lots of computer software but one issue we have is with login timeouts.  Some developers want to make them shorter for security, while most users want it be infinite?  Is there ever a justification to have no login timeout? How short is too short?


failing to install oracle-java7-installer,displaying 'E: Sub-process /usr/bin/dpkg returned an error code (1)'

I was setting up up android-studio referring to . While installing oracle-java7-installer, this error is displayed:  sudo apt-get install oracle-java7-installer [sudo] password for cyan:  Reading package lists... Done Building dependency tree        Reading state information... Done oracle-java7-installer is already the newest version (7u80+7u60arm-0~webupd8~1). The following package was automatically installed and is no longer required:   snap-confine Use 'sudo apt autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y Setting up oracle-java7-installer (7u80+7u60arm-0~webupd8~1) ... Downloading Oracle Java 7... --2017-11-27 08:40:47--  http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz Resolving download.oracle.com (download.oracle.com)... 223.223.158.138, 223.223.158.136 Connecting to download.oracle.com (download.oracle.com)|223.223.158.138|:80... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz [following] --2017-11-27 08:40:47--  https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.58.58.93, 2600:140f:7:18e::2d3e, 2600:140f:7:18d::2d3e Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.58.58.93|:443... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1511752368_824528560c20825821ecbcac8f4e9be9 [following] --2017-11-27 08:40:48--  http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1511752368_824528560c20825821ecbcac8f4e9be9 Connecting to download.oracle.com (download.oracle.com)|223.223.158.138|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2017-11-27 08:40:50 ERROR 404: Not Found.  download failed Oracle JDK 7 is NOT installed. dpkg: error processing package oracle-java7-installer (--configure):  subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  oracle-java7-installer E: Sub-process /usr/bin/dpkg returned an error code (1)   How do I fix this error? I did a fresh installation of Ubuntu 16.04.


A seemingly simple question that I could not figure out. Pgfplots uses very narrow bars in the following image. How can I make them wider? Ideally, they should also be closer together. I just want to make use of the available space...    Using , I was already able  to get fairly close to what I want.    However, there is still some space wasted on the left and the right side...  Edit: Apparently, this is possible using enlarge x limits={abs=1,rel=0.4}.    Code for the first Figure:  \documentclass{standalone} \usepackage{pgfplots} \usetikzlibrary{}  \begin{document}  \pgfplotstableread[row sep=\\,col sep=&]{     x & y & z \\     0        & 1       & 2           \\     1        & 3      & 1           \\ }\data  \begin{tikzpicture} \begin{axis}[ ybar, %bar width=2cm, legend columns=2,  legend style={at={(0.5,1.12)},anchor=north}, symbolic x coords={0,1}, xtick={0,1} ] \addplot table[x=x,y=y]{\data}; \addplot table[x=x,y=z]{\data}; \legend{y, z} \end{axis} \end{tikzpicture}  \end{document}   Code for the second Figure:  \documentclass{standalone} \usepackage{pgfplots} \usetikzlibrary{}  \begin{document}  \pgfplotstableread[row sep=\\,col sep=&]{     x & y & z \\     0        & 1       & 2           \\     1        & 3      & 1           \\ }\data  \begin{tikzpicture} \begin{axis}[ ybar, width=5cm, xmin=0, xmax=1, bar width=11, enlarge x limits={abs=1}, legend columns=2,  legend style={at={(0.5,1.22)},anchor=north}, xtick=data ] \addplot table[x=x,y=y]{\data}; \addplot table[x=x,y=z]{\data}; \legend{y, z} \end{axis} \end{tikzpicture}  \end{document}


Can you convert String to Int inside if else?

I've been fiddling with this for a bit but I can't get it to run. Everything works except for the last section where I want it to give the month as a number. Is there a better way to do this? What I'm getting is that, whenever I run the program, the section where I want it to give me the number month always gives me the else value of 0. Yes, I know I can use a switch, and I have a version that works completely fine as a switch, but I need it to work as an if/else.  Is there anything I can do in this case?  import java.util.Scanner;  public class Months {      static Scanner userInput = new Scanner(System.in);      public static String idString(){           return "Months, Kain R, csscXXXX";      }      public static void main(String[] args) {          System.out.println("Enter the month:");          String userMon = userInput.nextLine();          if (userMon.charAt(0) > 90 ) {             userMon = userMon.substring(0,1).toUpperCase() + userMon.substring(1);         }          else {             userMon = userMon;         }          System.out.println("You entered " + userMon);          userMon = userMon.substring(0, 3).toUpperCase();           System.out.println("Its abbreviation is " + userMon);           if (userMon == "JAN") {             userMon = "1";         }         else if (userMon == "FEB") {              userMon = "2";         }         else if (userMon == "MAR") {             userMon = "3";         }         else if (userMon == "APR") {             userMon = "4";         }         else if (userMon == "MAY") {             userMon = "5";         }         else if (userMon == "JUN") {             userMon = "6";         }         else if (userMon == "JUL") {             userMon = "7";         }         else if (userMon == "AUG") {             userMon = "8";         }         else if (userMon == "SEP") {             userMon = "9";         }         else if (userMon == "OCT") {             userMon = "10";         }         else if (userMon == "NOV") {             userMon = "11";         }         else if (userMon == "DEC") {             userMon = "12";         }         else {             userMon = "0";         }           System.out.println("This is month number " + userMon);     } }


We can delete answers in desktop version. I would like same feature in iOS app. It is currently missing as an option. We can already delete comments. This request is for the ability to delete answers.


MySQL won't INSERT last item from for loop into database

I'm looping through some data to display on my page, and then insert each loop to a row in a database (personal learning exercise for PHP and MySQL).  The for loop runs 5 times (for example, sometimes it may loop more/less), and I am able to successfully insert the data for the first 4 loops, but am having difficulty figuring out why the last loop won't insert into the database.  All 5 loop iterations display on my page, I'm not quite sure why the last loop won't insert into the database.  Here is my for loop that includes the MySQL code:  $artworksIterations = 1  count($artworksTitle[$x]) = 5  for ($x = 0; $x < $artworksIterations; $x++) {     for ($y = 0; $y < count($artworksTitle[$x]); $y++) {         $savedartworksTitle = $artworksTitle[$x][$y];         echo "TITLE: " . $savedartworksTitle . "
";         $savedartworksArtist = $artworksArtist[$x][$y];         echo "ARTIST: " . $savedartworksArtist . "
";         $savedartworksYear = $artworksYear[$x][$y];         echo "YEAR: " . $savedartworksYear . "
";         $savedartworksMedium = $artworksMedium[$x][$y];         echo "MEDIUM: " . $savedartworksMedium . "
";         $implodeGene = implode(", ", $artworksGene[$x][$y]);         echo "GENRES: " . $implodeGene;         $savedartworksDisplay = $artworksDisplay[$x][$y];         echo "

";         echo "
----
";         $sql = "INSERT INTO Artworks (title, artist, year, medium, display, genres) VALUES ('$savedartworksTitle', '$savedartworksArtist', '$savedartworksYear', '$savedartworksMedium', '$savedartworksDisplay', '$implodeGene');";         mysqli_query($conn, $sql);     } // end of y } // end of x   Any help would be deeply appreciated. Thank you :)


integral domain with a field as a subring

I would like to know if my solution to the following exercise is correct.  Let $A$ be an integral domain (with a unit) which has a field $\mathbb K$ as a subring and such that $A$ is a finite-dimensional vector space over $\mathbb K$.  Show that $A$ is a field.  Here is what I do : let $n=dim_{\mathbb K}A$. Let $x$ be in $A$. Then $\{1,x,x^2,...,x^n\}$ is a linearly dependent family in A as a vector space. Therefore there exist $\beta_0,\beta_1,...,\beta_n \in \mathbb K$ such that $$\sum_{i=0}^{n}\beta_ix_i=0$$ Therefore $$\beta_1x+\beta_2x^2+...+\beta_{n-1}x^{n-1}+\beta_nx^n=-\beta_0$$  So $$x(\beta_1+\beta_2x+...+\beta_nx^{n-1})=-\beta_0$$  Since $\beta_0 \in \mathbb K$ it has an inverse so $$x \times (\beta_1+\beta_2x+...+\beta_nx^{n-1})(-\beta_0^{-1})=1$$  Therefore $x$ has an inverse, therefore $A$ is a field. Is there anything to add or to justify ? Where does the integrity of the ring come in ? Thanks in advance for your time.


Please explain this:  int main() {        float f = 0.7;     if(f<0.7)         printf("Y");     else         printf("N");     return 0; }   Output: Y  But, for this code  int main() {     float f = 0.8;     if(f<0.8)          printf("Y");     else            printf("N");     return 0; }   Output is N. What causes such difference in the output? Please try to explain in detail. Thanks in advance.


Does window OS required to run Wine and Ubuntu?

I wanted to use ubuntu as my OS but Indiabulls trading platform is not supporting for on line trading. Alternatively I was told that "wine" will be helpfull. Does this mean that I need to have both windows OS and UBUNTU? actually what that means?


Is there an Ideal Liquid Law? Or Solid Law?

There is an Ideal Gas Law, but why isn't there one for liquids or solids? Is it because they are much too hard to predict or that solids and liquids vary drastically in their reaction to temperature and pressure then do gases, thereby nullifying the need for a Law that could apply to all?


Backup Entire USB Drive Containing Bootable Partitions in Debian

What's the best way to backup a USB drive with bootable data on it?  For instance, I have what's called an ESXi server on a bootable USB, it's basically a linux variant with multiple partiions.  What's the best way to back it up in case the original USB drive fails and the server needs to be put back together in a hurry?  It seems my desires are:   1  Keep the backup solution as simple as possible 2  Keep system online for when system files are routinely backed up 3  Make drive replacement easy   So with dd alone, criterion 1 and 3 are met possibly with...   sudo dd if=/dev/sdc | gzip > /storage/backups/esxi-usb-backup-2014-nov.gz   but someone on the internet criticized using dd due to geometry not being garanteed between drives.  I didn't really understand what they meant because they were inarticulate, but I understand that a replacement drive of the same spec as the original may contain more bad sectors than the original and thus may not be able to fit all the partitions from the original on it.  Is that what he meant?  Would a workaround be to only allocate 80% of the thumb drive to leave slack for bad sectors?  That's still an option at this point I believe.    If 1 and 3 are met with DD, then I can use ssh and rsync the file system to a backup location, then when the USB drive eventually dies, I can flash a new drive using the dd image, and then rsync the files over thereafter, accomplishing 2 and 3 (but not really achieving 1).  Does anyone know of a more practicle solution?


Can anyone explain how I can make a partition to install Windows 10, with gParted? The main partitions are locked, as shown in the screenshot.    I am a beginner and I am struggling with several issues, so I need Windows 10 along with Linux.


Concatenate multiple column names into 1 column SQL

I am struggling with small problem here. I have a table with 4 columns   Column1 | Column2 | Column3 | Column4 NULL.........NULL.........NULL.........NULL ABC..........NULL..........XYZ...........NULL    Column 1,2 & 3 may have some value or null, column4 is null When any of the column1,2 or 3 are not null, I have to update column4 with that column name. I am expecting following result   Column1 | Column2 | Column3 | Column4 NULL.........NULL.........NULL.........NULL ABC..........NULL..........XYZ...........Column1,Column3    Can anyone guide me how can I achieve this result. Any help is appreciated. Thanks in advance.


Process for transfereing from boil kettle to fermenter

At the moment the most frustrating part of my brewday is getting the cold wort into the fermenter. Here is my process. I have a 20 litre saucepan that i use as a kettle that does not have a tap. At flame out I add my immerseion chiller that is plumbed into my kitchen sink tap. When I have reached temperature I remove the chiller and whirlpool and leave it to rest to 30 minutes. I am use a siphon to rack directly into the plastic bucket fermenter.  The problem is that the siphon always gets clogged with the hops after i have only transfered about 20% of the wort. I have also tried carefully pouring the wort through a seive, but this sort of depfeats the point of the whirlpool and also the seive got blocked with hops as well. All in all i end up wasting a lot of the wort because i am afraid of getting a lot trub in the fermenter.  What are the best processes to use with my current equpment to get the wort into the fermenter?


Choosing IRLS over gradient descent in logistic regression

I am currently reading Bishop [1] and got confusion on why should we take IRLS (Iterative Re-weighted Least Square) as it seems that using gradient descent that with one derivative at a time would solve the problem, what is the meaning of introducing Hessian matrix? Or did I understand anywhere wrong with that algorithm?   Could it be faster? Why? What does "re-weighted" mean here? Isn't that gradient descent also updates their weight iteratively so the weights are also "re-weighted"? The method that IRLS takes is Newton-Raphson, which could give exactly the same result with standard least square solution in linear regression model as below.   $$ w_{new}\; =\; w_{old}\; -\; H^{-1}\nabla E(w) $$  $$ \nabla E(w) = \sum_{n\; =\; 1}^{N}{\left( w^{T}\phi _{n}-t_{n} \right)}\phi _{n}\; =\; \phi ^{T}\phi w\; -\; \phi ^{T}t $$  $$ \nabla\nabla E(w) = \sum_{n\; =\; 1}^{N}{\phi _{n}}\phi _{n}^{T}\; =\; \phi ^{T}\phi  $$  $$ w_{new}\; =\; w_{old}\; -\; \left( \phi ^{T}\phi  \right)^{-1}\left\{ \phi ^{T}\phi w_{old}\; -\; \phi ^{T}t \right\}\; =\; \left( \phi ^{T}\phi  \right)^{-1}\phi ^{T}t $$  Therefore I just wonder, when the method once applied in linear regression, is there only one iteration that the algorithm is required to run?  [1]: Bishop, Christopher (2006), Pattern Recognition and Machine Learning, Springer-Verlag New York


In regards to removing a program from a computer, I want to know why a program must be uninstalled versus deleting the program's files. I bet I can answer my own question by stating that programs must be installed in the first place and therefore must be uninstalled to remove.  However, I have always wanted to know some details as to why deleting a program's files (i.e. deleting its folder and all subfolders) does not effectively remove the program from my computer. Just seems like it would.


What is the difference between UNION and UNION ALL?


Partial minimization of function over variables

In Boyd and Vandenberghe's textbook on Convex Optimization, is claimed that:      We always have $$ \underset{x,y}{\text{inf}\; f(x, y)} = \underset{x}{\text{inf}}\;\tilde{f}(x) $$   where $$ \tilde{f}(x) = \text{inf}_y\;f(x, y).$$ In other words, we can always minimize a function by   first minimizing over some of the variables, and then minimizing over the remaining   ones.    My question is the following (since it is unclear to me from the context): does this applies only to convex functions or to every function?


Why first method much slower than second?

Please make me understand why does it happens. When I try to determine run time of my methods, the first one is always more slower than second. Even if I will change order of methods and their invokes, the first one will always be slower.  import java.util.Arrays;  public class FindTheUniqueNumber {      public static double findUniq(double arr[]) {         Arrays.sort(arr);         if (arr[0] != arr[1])             return arr[0];         else             return arr[arr.length - 1];     }      public static double findUniq3(double[] arr) {         Arrays.sort(arr);         return arr[0] == arr[1] ? arr[arr.length-1]:arr[0];     }      public static void main(String[] args) {         final long endTime, startTime = System.nanoTime();         findUniq(new double[]{ 1, 1, 1, 2, 1, 1 });         endTime = System.nanoTime();         System.out.println("Code took "+(endTime-startTime)+" nano seconds");          final long endTime2, startTime2 = System.nanoTime();         findUniq3(new double[]{ 1, 1, 1, 2, 1, 1 });         endTime2 = System.nanoTime();         System.out.println("Code took "+(endTime2-startTime2)+" nano seconds");     } }   and results are like  Code took 357969 nano seconds Code took 5103 nano seconds   Doesn't matter which one I invoke first. As fact it will runs much slower. Even if I made the methods identical.


Where can I get a clean ISO of a specific build of Windows 10?

I need to repair my Windows 10 installation. Where can I get a clean ISO (with install.wim, no Install.ESD, so that I can run DISM against the WIM) of the specific Windows 10 build required for this?  In my case, I need the Anniversary update (Build 14393), Creators Update (Build 15063) or Fall Creators Update (Build 16299.15).


Is there a way, using C#, to determine if a port is available?  I'd like to check before I start up a WCF ServiceHost instance using a port that's already used :-)


Python quit working and now I get "Illegal instruction: 4" message

I have an old iMac running High Sierra and I use the Anaconda distribution of python 3.7. I've been using Anaconda for over 2 years and it has worked fine. I have a test code I've run over 100 times to be sure my python still works after doing something stupid on my computer.  About a week ago I was trying to get a python script to run and input some bad parameters into the code. This appeared to lock up my computer and without thinking I manually restarted my computer.  Now I can't seem to get python to work no matter what I do. Before this I had run python scripts using Atom and VSCode. Both worked fine and I checked both out with my test code many times. I would also run Python from the command line and it worked fine as well. Now when I try to run a script in Atom or VSCode it doesn't work. Sometimes it gives me an "Illegal instruction: 4" message.  And other times I get "No module named vpython found. Even though I installed vpython on my machine using conda install vpython.  When I run my test code from the terminal I get an immediate return which says "Illegal instruction: 4". My test code doesn't use vpython.   I have deleted and reinstalled the Anaconda Python twice. I do not have time machine working on my computer so I'd like to fix this issue. Does anyone know why I keep getting the illegal instruction 4 when I run from the command line?  Details:   macOS 10.13.6 Python:  which python3 /Users/myname/opt/anaconda3/bin/python3    I just wrote a simple script and it ran fine in the terminal. The script read in a number and printed it back out and also printed version of python it was using. The source code is:  num = int(input("Enter a number: "))     print(num) import sys  print(sys.version)   Adding any one of these three lines to the above script causes the illegal instruction 4 output.  import numpy as np from scipy.optimize import curve_fit import matplotlib.pyplot as plt   So it seems to be something due to these import commands. Although import system works fine!


"Java is pass-by-value" - However, there are things that confuses me. Please take a glimpse of my example  public class Main {      public static void main(String[] args) {          StringBuilder myBuilder = new StringBuilder("Michael");          editString(myBuilder);          System.out.println(myBuilder);      }      public static void editString(StringBuilder x){         x.append(" Ardan");     }  }   Output:  Michael Ardan   And this example:  public class Main {      public static void main(String[] args) {          int myInt = 10;          editInt(myInt);          System.out.println(myInt);      }      public static void editInt(int x){         x ++;     } }   Output:  10   I tried reading other articles and it all says that Java is always pass-by-value. I've done some test scenario. Comparing both example to each other made me think that Java's Objects are pass-by-reference and primitive types are pass-by-value. However, if you tried to replace the int primitive type into Integer Object, the result would be the same. I would love if somebody explain these two examples here.


$f_n\to f$ almost everywhere and $\|f_n\|_{L^2}\to \|f\|_{L^2}$ implies $\|f_n-f\|_{L^2}\to 0$

Let $f_n\in L^2(\mathbf{R})$ be a sequence of square integrable functions, $f_n\to f$ almost everywhere, and $\|f_n\|_{L^2}\to \|f\|_{L^2}$. Prove that $\|f_n-f\|_{L^2}\to 0$.   I want to use the dominated convergence theorem but I don't know how to control $\|f_n\|_{L^2}^2$.


As far as I thought, the following should work, however I get:  Python 3.4.5 (default, Nov  9 2016, 16:24:59) [GCC 4.8.5 20150623 (Red Hat X.X.X-XX)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> '\\' '\\' >>> '\'   File "<stdin>", line 1     '\'       ^ SyntaxError: EOL while scanning string literal   Am I missing something?   I'm expecting '\\' to return \.


I am using a custom file upload button in my web app. I want the user to see that they have chosen a file so I change the html of a div to show the file name.   Here is my jquery:  $("input[type=file]").change(function() {     var filename = $("input[type=file]").val();     $("#share-file-name p").html(filename); });   Now, this works great, except for the fact that the value of the input is:  C:\fakepath\photo.jpg   So that's what the user sees. I just want them to see the "photo.jpg" part. How can I use my jquery to strip everything except for the file name?  Thanks!


What are good commercial stock graphic sites for websites/applications?

I am looking for good websites providing royalty free stock images for pay.  I'm not looking for sites that make images available for free and require attribution or non-commercial use; they're already covered in .  I'd also like hear some comments of the service:   What kind of payment options they offer?   e.g. do you have to buy a bulk of credits or can items be bought separately? Sometimes buying bulk credits won't suit my projects.  How much do they have content?   e.g.  is interesting  for its payment options, but I found its supply lacking.  How is the overall content quality?   e.g. does the site have vast disperse in quality, which usually is the case with big, major sites (such as  or does the site have strict quality requirements?    What sites do you use to buy graphics / backgrounds / images for commercial design purposes?


Terminal-App: What’s in front of colon and why does it change with a different network?

When I open the terminal-app, there is this default code. However, it changes depending on the network: This is how it looks like in my local coworking office: Last login: Thu Aug 13 14:49:57 on ttys000 HUAWEI_P20-12345678:~ user$   This is how it looks like at home or with wlan disconnected: Last login: Thu Aug 13 14:51:36 on ttys000 MyMac:~ user$   I don't know what a HUAWEI P20 should be? I have an iPhone and I can't believe that the coworking office has a cellphone as router? Did my computer get hacked? What does this line mean and what difference does it make? Furthermore, what does ttys000 mean? btw, MyMac is obviously the name of my computer and I replaced my username with "user".


How to change the name of media device from terminal

I was trying to change the name of my portable HDD from terminal. usually the rename command is used or sometimes mv.  I am getting this error.  /media/dishank$ rename virus\ BOX/ virus_box virus\ BOX/ Search pattern not terminated at (eval 1) line 1.


Symbolic link not working as expected when changes user

Symbolic link not working, using standard UBUNTU 16 LTS... It shows "Permission denied" where I expected to get access, not working even after chown.  Full example:  sudo rm /tmp/file.txt  # if exist, remove  cd ~ sudo chmod 666 data/file.txt ls -l data/file.txt    # "-rw-rw-rw-" as expected more data/file.txt     # working fine sudo ln -sf $PWD/data/file.txt /tmp/file.txt  # fine ls -l /tmp/file.txt    # "lrwxrwxrwx",  /tmp/file.txt -> /home/thisUser/file.txt more /tmp/file.txt     # fine  sudo chown -h postgres:postgres /tmp/file.txt  sudo more /tmp/file.txt   #  NOT WORK! but its is sudo! and 666!


My win 7 ultimate computer has been professionally hijacked and configured to limit local access, windows, tools, etc. I cannot change their settings to take back control of my home computer.   They use accounts above Admin so as to lock me out to change them.  Services are added that I don't need, password protected with their accounts and dependencies are changed so if you can turn off a service the hijack depends on it will turn off other services you must have.  They also grey out the ability to change some of the services. So you cannot remove their account or turn it off.  The network is hijacked and encrypted and sent usually ip v6 sometimes through my ip4 port.  If you delete the network settings it has to reboot and if you reboot it goes back to the hijack settings.   Is there a script that could put win 7 ult back in my control and delete the services that a stand alone home computer not a client or server computer or on any group need that would prevent this hijack.  A script that could put all settings and services back to original default and delete any startup or autorun scripts that could reconfigure the system would help.  Ideally a script to set the system for use as a home computer will ALL of the un-needed services uninstalled or locked off.  Anyone have any such configuration script that would free my computer?


I'm trying to experiment with Minion Math for the first time. Unfortunetly   \setmathfont{Minion Math}   under XeLaTeX causes the following error which I don't understand:  ! Font \l_fontspec_font has only 8 fontdimen parameters. <recently read> \l__um_font   l.147     \setmathfont{Minion Math}  ? h To increase the number of font parameters, you must use \fontdimen immediately after the \font is loaded.   LuaLaTeX runs fine. Complete set of font commans is as follows:  \usepackage{fontspec} \defaultfontfeatures{Ligatures={TeX}} \setmainfont{Minion Pro} \setsansfont[Scale=MatchLowercase]{Corbel} \setmonofont[Scale=MatchLowercase]{Myriad Pro} \usepackage[math-style=ISO,bold-style=ISO]{unicode-math} \setmathfont{Minion Math}   Log files gives the following information just before the error:  \g__fontspec_family_MinionMath_int=\count276 ................................................. . fontspec info: "defining-font" .  . Font family 'MinionMath(0)' created for font 'Minion Math' with options . [Ligatures={TeX},BoldItalicFont={},ItalicFont={},Script=Math,SizeFeatures={{S ize=10.95-},{Size=8-10.95,Font=Minion . Math,Style=MathScript},{Size=-8,Font=Minion Math,Style=MathScriptScript}}]. .   .  This font family consists of the following NFSS series/shapes: .   . - 'normal' (m/n) with NFSS spec.: <10.95->"Minion . Math/OT:script=math;language=DFLT;mapping=tex-text;"<8-10.95>"Minion . Math/OT:script=math;language=DFLT;+ssty=0;mapping=tex-text;"<-8>"Minion . Math/OT:script=math;language=DFLT;+ssty=1;mapping=tex-text;" . - 'small caps'  (m/sc) with NFSS spec.:  . - 'bold' (bx/n) with NFSS spec.: <->"Minion . Math/B/OT:script=math;language=DFLT;mapping=tex-text;" . - 'bold small caps'  (bx/sc) with NFSS spec.:  .................................................   What should I change in my source file?


Concurrent Modification Exception in Java

I am getting the ConcurrentModificationException while executing this code. I am unable to figure out why it is happening?  private void verifyBookingIfAvailable(ArrayList<Integer> list, int id) {          Iterator<Integer> iterator = list.iterator();         while (iterator.hasNext()) {                 int value = iterator.next();                 if (value == id) {                     int index = list.indexOf(id);                      if (index != -1) {                         list.remove(index);                     }                 }         }     }   Thanks in advance.


root@mcdartey-hp-g56-notebook-pc:/home/mcdartgey# dpkg -i google-chrome-stable_current_amd64.deb Selecting previously unselected package google-chrome-stable. (Reading database ... 221126 files and directories currently installed.) Preparing to unpack google-chrome-stable_current_amd64.deb ... Unpacking google-chrome-stable (51.0.2704.63-1) ... dpkg: dependency problems prevent configuration of google-chrome-stable:  google-chrome-stable depends on libappindicator1; however:   Package libappindicator1 is not installed.  dpkg: error processing package google-chrome-stable (--install):  dependency problems - leaving unconfigured Processing triggers for man-db (2.7.5-1) ... Processing triggers for gnome-menus (3.13.3-6ubuntu3) ... Processing triggers for desktop-file-utils (0.22-1ubuntu5) ... Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160415-0ubuntu1) ... Rebuilding /usr/share/applications/bamf-2.index... Processing triggers for mime-support (3.59ubuntu1) ... Errors were encountered while processing:  google-chrome-stable


Can I get the CPU temperature and fan speed from the command line in OS X?

Is there a command I can run from the command line in OS X to get the current CPU temperature and/or the fan speed(s)?  To be more specific, I'd like to be able to get the same info available in the  under the Fans and Temps tabs on the command line.   I'd like to be able to find these values at the command line so it could be scripted and plugged into a monitoring setup on my Mac - I have a data-nerd desire to collect and graph these values (and other stats) on my Macbook over time.  On Linux, it seems like this would be possible by reading a pseudo-file under the /proc directory, but I'm not sure how to do the equivalent on OS X (if it exists).


What is the mysterious area 51 link on the right hand menu of the  for?


Review Audit failed when "late answer" answer is a duplicate

I just got a review audit where the "late answer" was a duplicate of the accepted answer, but flagging it on that basis failed the review. That seems like a bug to me.  Question here:   I found that by clicking the question to view the entire Q&A, and noticed that the copy was from a generic "user12345" account (probably with 1 rep as well) and the original from a real-looking account. Viewing the whole Q&A is often useful when reviewing, especially late answers (which are often repeats of earlier points, disagreements with those, or random addendums better submitted as edits). I looked at the duplicate and thought "weird, rep harvesting maybe?" so I clicked "needs moderator attention" and wrote "copy and paste of accepted answer". FAIL!  I think that this review type can't ever work, because to avoid the problem I found you'd need to make up whole new "late answers" which by definition the review bot can't know anything useful about. Either that or to pass you'd just need to take any action at all, including upvoting the original of the duplicated answer. Which I didn't do, BTW, because I had no idea or opinion about the question or answer.  (this is not a duplicate of "What are review tests", it predates that and focuses on a particular defect within the process. See the comments below).


Let $a \in \mathbb{R}, a>1,$ and consider the equation $$ze^{a-z}=1$$ How many solutions does this equation have in the unit disk, and how many of those solutions are real?   My attempt to solve was to use the Argument Principle on the function $f(z)=ze^{a-z}-1$, in hopes of recovering the number of zeroes that way. The integral I attempted to compute for this was $$\int_{|z|=1} \frac{e^{a-z}-ze^{a-z}}{ze^{a-z}-1}dz=\int_{|z|=1}\frac{1-z}{z-e^{z-a}}dz$$  I do not know how to proceed from here, as the $e^{z-a}$ in the denominator seems problematic. Thanks for your help!


destructor is not being called after object goes out of scope

Consider this example :  #include <iostream> using namespace std;  class MyClass { public:     ~MyClass() { cout << "DTOR OK !" << endl; } };  int main(void) {     MyClass test();     MyClass* pTest = new MyClass();     delete pTest; }   Why "DTOR OK !" is not printed twice ? why the destructor of the local object "test" is not called ?  When the destructor is private, I've noticed that there is only a compile error for delete pTest; but not for the local object ? what's happening here ?


Desktop is empty after upgrading to 16.04, can't log in on tty

I upgraded to Ubuntu 16.04. It turns on and I type the password. It's accepted and a "system problem detected" pop up appears when I open my computer. After I click cancel it closes but the screen is empty, only the desktop picture is shown.   I tried to open the terminal with CtrlAltT but nothing. I opened CtrlAltF1 and when I want to login it says login incorrect (I typed my username and password correctly), and I can't do anything on my computer. What should I do? I don't want to lose my files.


I know that energy stored in electric field / unit volume = $\frac{1}{2} \epsilon\,E^2$.  so can I say that for any configuration calculating $\int \frac{1}{2} \epsilon\, E^2 \,d^3r$ over whole space - gives me the potential energy stored stored in the system  for instance for $Q_1$ and $Q_2$ ....separated by distance $d$,  $\int \frac{1}{2} \epsilon\, E^2 \,d^3r$ over whole space $= \frac{KQ_1Q_2}{d} $?


JQuery .after() method does not insert element with correct properties

What I am trying to do is add a commenting feature to my web application. Ideally here is the setup:
     Comment 1

     Comment 2

   $(".comment-add").click(function() {     var c = ""     var b = "" + c + ""     var a = "
" + b + "
"     $(this).parent().after(a); });   The plus symbol will be a glyphicon that when clicked turns into an editable comment. I already have that working so for now just ignore that. The issue I'm having is that when the (+) symbol is clicked, I would like it to generate a new (+) after it that can also be click to generate another (+).  In the fiddle, you can see that the first (+) can be repetitively click to generate more (+)'s but those generated cannot be clicked.  Here is the fiddle, I feel like I'm close I am just having trouble figuring it out.


Title frame hides part of button highlight on Lollipop

When selecting a button on the Android app, it highlights in a clearer shade of blue. On Lollipop (not tested other versions), however, the small frame around the the screen title remains solid-blue, as shown in the two following images:     Of course this is a super-minor bug, but it costs nothing to report it! (This is my first Meta contribution, I hope it fits into the good usages!)


Bug: Whenever I'm around Farkas he acts like my follower?

Every time I go to the Companions place and when Farkas is there, he is always following me around and I'm automatically focused to him as if he's talking to me. And when I cancel the talk, 3 seconds later I focus to him again, and again. I have to fast travel away from him for him to stop. I did add him as my follower repeatedly in order to increase my skills and get my money back, but now I see that that may be the source of this bug.


Why OS is installed on C: drive by default?

When I install an OS, particularly Windows on my machine, why does it's on C drive? And where is the name B:\ ?  I know A: is the floopy drive. I even know OS can be installed on any drive other than C:.  But what's makes it special about C:\ and not any other alphabet?


Are there typographical systems that allow creating text which isn't always uniform?

I was reading  on this site, and this was a sample of a cursive font from that discussion:     I really like it, but immediately noticed that it could not have been written by a human, because of how perfectly similar all of the t's and d's looked.   I think that creating convincing "dynamic" typefaces would be an interesting challenge. I don't know of any particularly good applications for it, other than to help out those folks with terrible handwriting, who don't have artistic skill, or who have disabilities (hooray for speech recognition!).   There should be a set of several glyphs for each character, so that they may be randomly chosen when typeset.   In order to get letters to flow together (as they should when using a cursive style) it seems like there needs to be ways to specify "regions" where lines can be bent to accomodate different combinations.   When not dealing with cursive, it is a much simpler problem, but I still don't know of any systems which focus on facilitating the creation of "variable" print. It would be dead simple: an extended font file, and a RNG.    So what I want to know is, has anybody else ever been bothered by this issue, where no cursive font has ever looked convincing? Are there any typographical systems which do these things I describe?


How to do a full nandroid backup via pc using adb or anything or any software specialised for it.


Identity map on coproduct as 'linear combination'

Let $\mathcal{C}$ be a category, and suppose for all objects $X, Y$ of $\mathcal{C}$, Mor$_{\mathcal{C}}(X,Y)$ is equipped with the structure of an Abelian group, such that the composition of morphisms is bilinear.   Now it can easily be shown that Mor$_{\mathcal{C}}(X,X) =:$ End$_{\mathcal{C}}(X)$ is a ring (under composition as multiplication). (In the absence of any knowledge about the Abelian group structure, distributivity still arises from bilinearity in this case.)  Now let $(S, i, j)$ be a coproduct (or sum) of objects $X$ and $Y$.  It can then be shown (ask me for the proof), that there exist unique morphisms $p : S \rightarrow X$ and $q : S \rightarrow Y$ such that $p \circ i = \text{id}_X, p \circ j = 0_{YX}, q \circ i = 0_{XY}$ and $q \circ j = \text{id}_Y$.  To demonstrate: $i \circ p + j \circ q = \text{id}_S$  The first thing to observe is that by bilinearity,  $$(i \circ p + j \circ q) \circ i = i \circ \text{id}_X + j \circ 0 = i$$ and $$(i \circ p + j \circ q) \circ j = i \circ 0 + j \circ \text{id}_Y  = j $$  What we need however, is that $(i \circ p + j \circ q) \circ f = f$ for all morphisms $A \xrightarrow{f} S$. If somehow $i$ and $j$ would generate any such morphism, we would be done (as $(i \circ p + j \circ q) \circ (i+j) = i+ j $), but I wouldn't know what 'generate' would mean in this context.  The last step would be to show that for all morphisms $S \xrightarrow{g} B$, $g \circ (i \circ p + j \circ q) = g$, but I suppose this will be similar to the first problem.   I'm afraid there is so much to unpack in the suggested other proof (what are preadditive categories, wedges, mediators, what is monic, jointly monic, etc.?) that I don't see how this is relevant to this (very elementary) exercise in my first introduction to category theory. You need to be a lot further along in the subject to understand all that, and my question is still very much worthwile for those who don't know all that jargon.


C preprocessor macros with variable arguments, logger

I would like to develop a simple set of logger macros for debugging and program flow control. The first approach is working quiet well, but there are some small issues which bothers me.  logger.h  #ifndef LOGGER_H #define LOGGER_H  #include <stdio.h> #include <stdint.h>  #ifdef DEBUG #define DEFAULT_STREAM (stdout) #define MESSAGE_IDENTIFIER_LENGTH ((uint8_t) 10) #define FUNCTION_NAME_LENGTH ((uint8_t) 20) #define FILE_PATH_LENGTH ((uint8_t) 40)  #define LOG_MESSAGE(STREAM, MESSAGE_IDENTIFIER, ...) \     do { \     fprintf(STREAM,"[ %*.*s ] [ %*.*s ] [ %*.*s:%04d ]: ", \                     MESSAGE_IDENTIFIER_LENGTH, MESSAGE_IDENTIFIER_LENGTH, MESSAGE_IDENTIFIER, \                     FUNCTION_NAME_LENGTH, FUNCTION_NAME_LENGTH, __FUNCTION__, \                     FILE_PATH_LENGTH, FILE_PATH_LENGTH, __FILE__, __LINE__ \                     ); \     fprintf(STREAM, __VA_ARGS__ ); \     fputs("\n", STREAM); \     } while (0)  #define LOG_INFO(ARGS...) LOG_MESSAGE(DEFAULT_STREAM, "INFO", ARGS) #define LOG_ERROR(ARGS...) LOG_MESSAGE(DEFAULT_STREAM, "ERROR", ARGS) #define LOG_WARNING(ARGS...) LOG_MESSAGE(DEFAULT_STREAM, "WARNING", ARGS)  #else #define LOG_MESSAGE(STREAM, MESSAGE_IDENTIFIER, ...) ((void) 0) #define LOG_INFO(ARGS...) ((void) 0) #define LOG_ERROR(ARGS...) ((void) 0) #define LOG_WARNING(ARGS...) ((void) 0)  #endif  #endif // LOGGER_H   I'm using two times fprintf and one time fputs within the macro. But i would rather use fprintf just one time. Because i would expect an overhead if calling fprintf three times.  I have seen that many developers wrap statements like printf within a do{}while() clause. Even if it's just one statement. Can someone tell me the reason for this.  I am also happy about any other suggestions for improvement.


Unable to lock administration directory, while updating from command line

I am new to Ubuntu and I am trying to update Ubuntu via command line .  So, there is an error occur I don't know how to figure it out. I am using Ubuntu version 15.04 [Vivid Vervet]   sudo apt-get update E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/ E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)  E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?


Expanding universe - does the Hubble red shift come from gravity?

Measurement of the expansion of the universe is based, in part, on the red shift of light. The speed of light is a constant, although some people argue that it may be changing over time, I am going to ignore that argument for now. But light can lose energy to gravity. In other words, if you look light from a large mass, it will be red shifted by the gravity of the mass. So, while light from our sun travels at the same speed all across the solar system, it is red shifted at the edge of our solar system.  So, does the red shift used by Hubble come from expansion or from gravity?  Are we measuring expansion by assuming that light does not lose energy to the gravity it has escaped?


$A^2X = X$ show that $AX = X$, if $A_{ij} > 0$ and $x_{i} > 0$

Let $A$ and $X$ be matrices $n \times n$ and $n \times 1$, respectively, with all entries real and strictly positive. Assume that $A^2 X = X$. Show that $A X = X$.   What I thought:  (i) $A^2 X = X \Rightarrow A (A^2 X) = A (X)$ for distributive law $ A(A^2 X) = A A (Ax) = AX \Rightarrow A^2(AX) = (AX)$, i.e., $A^2 Y = Y$ for $Y=AX$.  (ii) $A^2 X = X \Rightarrow (A^2-I)X = 0$. Be $X = (x_1,x_2,\ldots,x_n)^t$. So, $x_i > 0 \quad\forall i \in \{1,2,\ldots,n\}$. So, $det(A^2 - I) = 0 \Rightarrow det(A-I) = 0$ or $det(A+I) = 0$.  But, if $det(A+I) = 0 \Rightarrow (A+I)Y = 0 \Rightarrow AY = -Y$.   So $Y\neq X$ because if $A_{ij}>0 \quad and \quad x_i > 0 \Rightarrow AX \neq -X$  So, $det(A-I) = 0 \Rightarrow$ There is a vector Z that  $(A-I)Z = 0 \Rightarrow AZ = Z$.  So, I need conclude that Z = X.


Bathroom Lit only from the Window - Too Dark

So my idea was to build a bathroom that is lit only by its window, so I put it together and tried it out, but it didn't come out as I was expecting to, of course I'm a newbie at blender so I thought I ask for some help with it. The result was a too dark scene, besides some light leaking from the walls but that may be simpler to solve, my biggest problem is the very dark room.  I tried increasing the emission strength of the Sun Light I put outside, tried 1, then 14, then 50 just to see how it would be, the render image bellow is with the strength set to 50.  I tried turning off the visibility of the window's glass, it did improve a tiny little bit, but almost not noticeable.  I'm using cycles, the images bellow show the result I got, the solid mode view, outside the bathroom, the node scheme of the sun light I'm using and the node scheme of the glass texture it is used in the window glass.


I want to completely replace Ubuntu with Lubuntu

I accidentally issued some commands I thought were safe in the terminal, and I ended up with no System Settings and lots of other missing functionality, but the OS still boots normally. I've decided I want to install Lubuntu instead of fixing Ubuntu for a fresh start and since my laptop is running on a 1GHz dual core AMD CPU.  I created a bootable USB as I usually do and placed Lubuntu 17.10 amd64 using Rufus 2.14.1086. I have GRUB that was installed with Ubuntu upon first install I still have Win8.1 which I still want to keep.  PS: I also tried creating a startup disk from Ubuntu  The question is: How can I boot from USB with GRUB2 so I can overwrite Ubuntu?


I am using biblatex, and used the following to include it:  \usepackage[babel, german=quotes]{csquotes} \usepackage[style=authoryear,natbib=true]{biblatex} \bibliography{bib}   and at the end:  \printbibliography[heading=none]   And I'm struggling with the format of the .bib-file. The problem is, that I have three kinds of "authors":   John Doe John Doe, Jonny Doey, Elvis Presley Apache Corporation   Regarding the third one, I found {{Apache Corporation}} as author to be what I need. The first and the second are more interesting. What I need is a consequent way to display the names.  Currently for the first, in my bibliograph, I find surname, firstname, so Doe, John, in .bib-file its "John Doe", for multiple names, its the same syntax in .bib-file, but in the bibliography it's showing as firstname, lastname and the same for the other names, instead of last name, first name, when citing, its showing only the first one mentioned (so in my case only John Doe), whereas with only one author, its showing only the surname when citing.  I hope you understand what I mean. To be sure about that, an example.  1. @BOOK{....., AUTHOR="John Doe",....} 2. @BOOK{....., AUTHOR="John Doe, Jonny Doey, Elvis Presley",....}   First one will show as Doe, John in bib and as Doe when citing. Second one will show as John Doe, Jonny Doey, Elvis Presley in bib (notice now its firstname, surname and not the other way) and as John Doe when citing (notice is the full name and not only the surname).   What can i do to have this consequently, so no matter how many authors, its in bib always surname, firstname and when citing always only the surname?


I need to prove that $(H,+)$ is a cyclic sub-group of $(\mathbb{Z},+)$ when $H=\{30x+42y+72z:x,y,z\in\mathbb{Z}\}$.  Attempt: First, $H\subseteq \mathbb{Z}$ since the addition of integer numbers, yields an integer number. Now, we show the closure of $H$ with ($+$). Therefore, let $a_1=30x_1+42y_1+72z_1$, $a_2=30x_2+42y_2+72z_2$. We shall show that $a_1+a_2\in H$. Thus: $$a_1+a_2=30x_1+42y_1+72z_1+30x_2+42y_2+72z_2=30(x_1+x_2)+42(y_1+y_2)+72(z_1+z_2)\in H$$ In addition, we should show the existence of the opposite number, for each number in $H$. Hence, let $H \ni h=30x_1+42y_1+72z_1$. We define $H \ni h^{-1}=30(-x_1)+42(-y_1)+72(-z_1)$, therefore, we have that: $$h+h^{-1}=30(x_1-x_1)+42(y_1-y_1)+72(z_1-z_1)=0+0+0=0$$ Therefore, $(H,+)$ is a sub-group of $(\mathbb{Z},+)$. The last is to show that $(H,+)$ is a cyclic group, so for that, we shall look at the Gcd of $(30,42,72)$, when $(30,42,72)=6$, so by the definition of being in $H$. $$H=\{30x+42y+72z:x,y,z\in\mathbb{Z}\}$$ So $30x+42y+72z=6(5x+7x+12z)=6k$, when $k\in \mathbb{Z}$ then 6 is a creator element of $H$, thus, $(H,+)$ is cyclic. In conclusion, we have that $(H,+)$ is a cyclotomic sub-group of $(\mathbb{Z},+)$.  I don't know If I got it right, and my way is correct, so I will be glad if you can tell me whether my attempt for that question is correct, or not.  Thanks!


How can credit card companies offer a cash back program?

Many credit cards offer cash rewards or similar programs which effectively amount to a small % discount (at the CC company's expense) for various purchases.  For instance, American Express has  of the first $6000 spent in supermarkets per year.  Granted the card has an annual fee ($75) but it is very small in comparison: A reasonable person might spend $300 a month, hence $3600 a year, on groceries, which they are buying anyway. From this they get $216 back, and they have already covered the fee and ended up $141 "in the green".  If one were to use this bonus to its fullest, spending $6000 at supermarkets, that would be $360 cash back, $285 after fees. On top of this there is still a 1% cash back after the first $6000.  This seems like a lot of money! If someone gets this card and only uses it at supermarkets (and why not, since the supermarket cash back is the biggest reason to get this card) then they end up with Amex basically paying them a few hundred every year just to use their card, almost like a negative annual fee. Doesn't Amex lose money on this?  I know that CC companies charge a transaction fee but if you spend to the $6000 bound you end up getting 4.75% of your spending paid back after the annual fee. Surely no merchant would agree to a 5% transaction fee, so the company is still losing some money on rewards even after the annual card fee and transaction fee.  Obviously, some people will underutilize the card and solve the problem:   Maybe they go to an ineligible merchant and get only the lower 1% cash back (but even if you shop only at the 1% stores, if you spend at least $625 a month you still break even on the annual fee) Maybe they spend too little on groceries and don't even make back their annual fee (but, as pointed out in the previous item, you would have to be spending hardly any money for this to happen) Maybe they don't pay their balance in full and end up paying the hefty interest and late fees (but the card requires a good credit score which this sort of person is unlikely to have)   But from the company's point of view, why even have the optimal users, like the $6000 in supermarkets and nothing else guy (not actually that unlikely, since the card requires good credit in the first place, members will be people who manage their personal finances well), who are just a money sink? For instance, they could say the cash back can only be redeemed for interest/late fee payment.  How are high cash-back programs like this a good idea for the company? I can think of some possibilities:   The promise of driving more customers through the rewards allows Amex to negotiate an even higher transaction fee with the merchants (but then you'd think they would expand the program to other merchants such as electronics retailers or online stores) They are losing money but gaining market share The "optimal users" who break even are a necessary evil, the profit comes from people who hope to get the rewards but instead end up losing money on the annual fee or late payments, and it makes up for the money lost on people who really do save money with the card   But which one is it?


I have a model edited with blender. I selected all my meshes and made CTRL-A to reset scale and location. Since then, 8 of my meshes have some akward kind ob cube around them. What is it and how can I hide these cubes? I must have done a bad manipulation here but I don't know when and how I made it. Google is not helping me there neither.


Is "not unpleasant" a double negative, and hence bad grammar?  See the first answer (by Ham and Bacon) to , for the basis of this question:     "Did you enjoy the movie?"      "Well, I didn't not enjoy it, but..."   Are all "not un..." forms incorrect?  They are very widely used, much more so than the blatant "not not" or "didn't not", etc.


Why does error propagation in CBC mode encryption affect two blocks?

From :  Error propagation It was common to discuss the "error propagation" properties as a selection criterion for a mode of operation. It might be observed, for example, that a one-block error in the transmitted ciphertext would result in a one-block error in the reconstructed plaintext for ECB mode encryption, while in CBC mode such an error would affect two blocks.  I read  similar post before. And I can understand that in CBC decryption, only two blocks are affected due to error propagation (error in 1 block). But, for the same case in CBC encryption, why are still only two blocks affected? It looks like all the following blocks will be affected.


When I run the latest version of sp_blitz I get the following: Warning: Null value is eliminated by an aggregate or other SET operation.     Msg 1934, Level 16, State 1, Procedure sp_Blitz, Line 3467      INSERT failed because the following SET options have incorrect settings: 'QUOTED_IDENTIFIER'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations.   It seems no one else is having this problem except me. What have I done wrong?


SSH issues: Read from socket failed: Connection reset by peer

I compiled OpenSSH_6.6p1 on one of our server. I am able login via SSH to the upgraded server. But I am not able to connect to other servers running OpenSSH_6.6p1 or OpenSSH_5.8 from this. While connecting I am getting an error as below.  Read from socket failed: Connection reset by peer   On the destination server in the logs, I am seeing it as below.  sshd: fatal: Read from socket failed: Connection reset by peer [preauth]   I tried specifying the cipher_spec [ ssh -c aes128-ctr destination-server ] as mentioned in  and was able to connect. How can configure ssh to use the cipher by default? Why is the cipher required here?


Why a lot of people use random.seed() at the beginning of their python code

A lot of people use random.seed() at the beginning of their python code in training a machine learning model. As I understand they want to control the randomness therefore they can compare different hyper-parameters, but as demonstrated in the following piece of python code, the random int number is controlled only when you set seed every time before you use it. Why do they bother to set seed if it did not control the randomness in the training process? >>> random.seed(5) >>> random.randint(1,10) 10 >>> random.randint(1,10) 5 >>> random.seed(5);random.randint(1,10) 10 >>> random.seed(5);random.randint(1,10) 10  Example of set seed code def set_seed(seed: int = 42):     random.seed(seed)     np.random.seed(seed)     os.environ["PYTHONHASHSEED"] = str(seed)     torch.manual_seed(seed)     torch.cuda.manual_seed(seed)  # type: ignore     torch.backends.cudnn.deterministic = True  # type: ignore     torch.backends.cudnn.benchmark = True  # type: ignore  The set_seed has been called only once.


What is the connector on this laptop hard disk drive called?

I have a ten year old internal hard disk from a now useless laptop. I want to find a case/converter to use it like an external USB drive. There are loads of these for desktop (2.5in) drives, but I can't seem to find any that appear to be compatible with my hard disk, which has an unusual connector:      It looks nothing .  So the question is: What is this connector called, and is it even possible to find a USB case for it?


Task Page Recurrence functionality on a VF page

Has anyone replicated the task recurrence functionality on a VF page? can give me some help thanks in advance.


Relation between baryonic mass and luminosity

I have one simple question: How do we know that dark matter is not just ordinary matter which is simply not luminous? For example if we would take a black rock and put it somewhere in the universe, then we would not be able to see it, because there is not any radiation in the visible spectrum coming from this object.  My question also relates to the question: How do we know that the relation between baryonic mass and luminosity of one object is correct? (which relation does one use usually in this context?)


How did Dr. Zoidberg get his degree in medicine?

Dr. Zoidberg is a terrible doctor. How did he manage to pass his course?


Cannot mark accepted answer for one of my questions

So I noticed my accepted answer rate went to 79% on SO. I went to mark answers on a couple of ancient questions that never got answered properly.   However, for one of these I cannot mark an answer.   The question in question is   What does one do when this happens?


How to handle answers that are duplicates of existing answers

The following answer hit the low quality post queue:   Now the answer is extremely similar to many of the already upvoted answers on the question, most of which are from 2009 - but in addition the linked answer provided no explanation to the code, whereas the upvoted answers did.  The "Recommend Deletion" comments don't really fit, so I don't know if it's valid to recommend deletion, but I wouldn't say the answer "Looks Ok" either.  What should be done (if anything) in cases like this?   EDIT  The answer has since been removed apparently, but either way I've been bit by the automated audit function before in the LQP queue, so I wanted to try to understand what the outcome of situations like this would be - sure you can downvote the answer as one of the comments on this question stated, but that doesn't really help with the queue.


Why is text files compressed folder bigger than the original folder?

I am compressing 3 text files around 80 bytes each by a python code. I start with the following size of the folder:  And when I compress it, it's the following size:  It appears to be bigger than the original folder. Isn't it supposed to be compressed? The 3 files are some basic NotePad text files.  Why is the compressed folder bigger?


$f$ be analytic function, could any one tell me how to find the value of $$\int_{0}^{2\pi} f(e^{it})\cos t \,\mathrm dt$$   I am not able to apply any complex analysis result here, could any one give me hint?


C++ not compiling because its say the file doesn't exist but it is in the same directory

in a folder I got the following files:  book.h, book.cpp , card.h, card.cpp  these are the content of the book.h  class book {  public:         string title;         string author;         string get_title();         string get_author();  }  book::book(string title, string author){    title = title;    author = author; }   this is my book.cpp:  #include <book.h> #include <iostream> #include <string>  using namespace std;  string book::get_title(){    return title; }  string book::get_author(){  return author; }  int main(){  cout << ¨it works! \n¨  }   I I try to compile using g++ -c book.cpp, I keep getting an error message saying:  book.cpp:1:18: fatal error: book.h: No such file or directory compilation terminated.


Beam size and material for 15 feet long swing

I need to create a 15 feet span beam for kid swing (300 lbs load / 150 lbs and 2 swings assumption). One end will bolt to the tree (just for convenience).  What "treated lumber" lumber size and material I should use? Or is it better / cheaper to use metal pipe (from the plumbing department)?  I guess 4x8x16 or two (2) 2x8x16 would do it according to this website . But I do like a clean look of metal. My wife would concern about big piece of lumber running on top of the kid (that looks heavy visually).


Javascript - What is the difference between self-invoking and the normal function invocation?

I am confusing with the use of closure and self-revoking in Javascript. When I run this code, each time I click the Button the counter increases by 1. It seems that the function assigned to "add" is self-invoking function.        <!DOCTYPE html>    <button type="button" onclick="myFunction()">Count!</button>
0
          However, when I call the function like the code below, the counter value is always 1.    <!DOCTYPE html>    <button type="button" onclick="myFunction()">Count!</button>
0
          Could anyone tell me the difference between the two examples, and what goes under the hood? Thanks for you help.


How to actually use Python in Android Studio with Chaquopy?

I want to write Android apps using Chaquopy. I followed the first few steps from  to integrate python into studio. My question is where do I actually write the python code in android studio (should i write it in jupyter notebook and upload it somehow or can I create a py file in the studio environment?) and is their anything I should add in addition to the steps mentioned on the website above?


My question: Is it bad from a SEO perspective to index different html pages that have (nearly-) identical content?  I am hosting an AngularJS webapp that serves static html pages to search crawlers. I don't want any JS-managed content to be omitted from search engines, so I generated different html files for small variants of the same page.  Example:   A page that contains 3 tabs will generate 3 html files, one with each tab content  A page with a carousel will generate a html file for each instance of the carousel  A page with a content-rich modal will create an html page for that modal, with the content of the 'master page' grayed out in the background.  Different languages generate different html files. However, as english is the fallback language, the generated content for 2 different urls is identical when translations are not available.    The result is that there is a lot of "common" content which appears in many different html files served to crawlers.  Is this a recommended approach?


So I wrote a method which takes a string and converts each letter into an int via for loop. Each time the loop executes, I made it print out each value and add the value to a int array. The letter values should be from 0 to 25 which is why I have the c - 97. The print statements print the right number for each letter however at the end I also have it print out the entire array and I get a weird thing that it's printing. I don't think I'm adding the value correctly to the array so what am I doing wrong?   public int[] stringToIntArray(String text){     int ascii;     char c;     int a;     int[] array = new int[text.length()];     for (int i=0; i<text.length(); i++){         c = text.charAt(i);         a = c - 97;         array[i] = (a);             if (i != array.length - 1){                 System.out.print(a + ", ");             } else {                 System.out.print(a + " ");             }      }      System.out.print(array);     return array; }


How does Windows know recognize an SSD as an SSD and not a HDD?

I have an SSD mounted in an external enclosure and it was installed as a Windows to Go workstation. The external enclosure has a VL716 chipset and the connection to the PC is done via an USB Type-C cable from the enclosure to USB 3.0 type A.  Windows however shows the following picture (disregard the Iomega drive, that has an HDD inside):    So it's not recognizing the drive as an SSD, the correct picture would be like this:    That was when the SSD was mounted directly to a SATA port of the machine. Wondering if it had something to do with the enclosure I changed it to another USB 3.0 one that uses a different chipset, this time is a JMicron one; but to no avail.  Interestingly, TRIM commands do make it to the disk with both enclosures when issued via PowerShell for example:  Optimize-Volume -DriveLetter D -ReTrim -Verbose   But since Windows doesn't identify it as an SSD I fear it'll try to defragment the drive instead of just issuing a TRIM. I could disable the weekly or daily optimization of Windows and set up an scheduled task to issue TRIM manually but I would rather know what Windows does or how it recognizes SSDs, maybe there's a bug that needs to be reported or I'm missing a step but the Windows to Go installation was performed officially (i.e. not using third party tools) and directly into the SSD, it wasn't cloned.  I apologize for the long read, but I wanted to give you as much details as possible, and if something is missing just let me know to amend the question.


I have XP Pro on C drive and there is plenty of room left on said drive. I read to use "Windows installer for Ubuntu Desktop". It seems to create to partition but does it also install Ubuntu at the same time?  I can put Ubuntu 12.04 64 bit onto my USB drive. Is making the partition with  Windows installer a two part operation? First make the partition then go and do the install of Linux.


When I earn some reputation, I get this message:    Furthermore in my Tags tab, I can see some numbers near tags:    But it's not clear to me. What is 42 and 10? And what is tag reputation?


I don't know if it's correct to ask this question here. I am a programming enthusiastic and have recently started competitive programming. The problem I face recently is for every question I have to type this whole code almost 25 times a day.   #include <iostream>  //other headers or macros go here  using namespace std;  int main(){     return 0; }   I have searched for this question on google but couldn't find the answer. Though it's not a programming question there are many competitive coders out there who use vim or VI as their default text editor and would be benefitted by knowing the answer for this question.  Also it would be much better if the method you propose doesn't slow down opening of vim by great factor Thank You


Programmatically combining images in PHP

I'm a big fan of Yahoo's  for speeding up websites. One of the recommendations is to combine images where possible to cut down on size and the number of requests. However, I've noticed that while it can be easy to use CSS sprites for layouts, other image uses aren't as easily combined. The primary example I'm thinking of is a blog or article list, where each blog or article also has an image associated with it. Those images can greatly affect load time and page size, especially if they aren't optimized. What I'm looking for, in concept or in practice, is a way to dynamically combine those images while running them through a loss-less compression using PHP.   A few added thoughts or concerns:   Combining the images and generating a dynamic CSS stylesheet to position the backgrounds of the images might be one way to go about it, but I also worry about accessibility and semantics. As far as I understand, CSS images should be used for layout elements and the img tag (with the alt attribute) should be used for images that are meant to convey information. I could set the image as a background to a div element and substitute a title attribute for the alt attribute, but I'm unsure about the accessibility and semantic implications of doing so. Might the GD library be a good candidate for something like this? Can you recommend other options?


show why a post was off-topic in close-vote reviewing

I notice that when I review a post in the close-vote review queue that has been voted as off-topic, I only see at the top that the post was off-topic. I have no idea of finding out why it is off-topic unless I click "close", then select "off-topic" as the reason, then see which reasons have the blue marker that indicates other people voted like that. So I requested that instead of a generic message like "This question is off-topic", to see a message such as "Questions require valid code to reproduce the problem".


"Software Updater" & "Software & Updates" not working

I havent used my Ubuntu for quite a long time.  Today, when I booted Ubuntu (14.04 LTS), the software updater and Software & Updates (from Settings) are not working.  The software updater's window will show up for around 1 sec, but it will close automatically. Software & Updates is never shown, no matter how many times I click the icon. Note that neither of them show any error message.  Those 2 features were working perfectly the last time I used Ubuntu. I want to do some system upgrade and update.  For now, I use sudo apt-get update && sudo apt-get upgrade. This command runs very fast, meaning (I think) my Ubuntu is not updated properly. The update from software updater always has a big size hence the download should be slower.  What should I do?   Can I just uninstall and reinstall both of them? If I can, how to do it?  Just to clarify, I don't want to upgrade my Ubuntu version (I want the LTS one), I just want to upgrade the software/packages I used.  Thanks for your time.


How do I transfer from Terminal 1 to Terminal 2 at Dubai International Airport?

I am traveling with connecting flight where I have two different tickets: from Kiev, transit Dubai, to Kigali, Rwanda.


I am trying to learn a C# and I am trying to use get and set with string. However, with various errors it either refuses to compile or crash with stack overflow using System; using System.Dynamic; using System.Security.Cryptography.X509Certificates;  namespace CshEssentials {     class Program     {         public string a         {             get             {                 Console.WriteLine($"Hello {a}"); return "0";             }             set             {                 a = value;             }         }         static void Main(string[] args)         {             a = Console.ReadLine();         }      } }


Can i upgrade my gingerbread android (v 2.3.6) to icecream sandwish android (v 4.0)


Prove that one of the sides of a Pythagorean triangle is a multiple of 3.

Prove that if $\{a,b,c\}$ forms a Pythagorean triple, then at least one of the three numbers must be divisible by $3$. Need some help with this one.


Evaluating series with factorial denominator (sanity check).

Is my approach to evaluating this series correct?   $$\sum_{n=1}^\infty \frac{n}{(n+1)!}$$  Has partial sum equivalent to:  $$S_m = \sum_{n=1}^m \frac{n}{(n+1)!} = \sum_{j=2}^{m+1} \frac{j-1}{j!} = \sum_{j=2}^{m+1} \frac{1}{(j-1)!} - \sum_{j=2}^{m+1} \frac{1}{j!} $$  For $j$ such that $m+1>j>2$ the terms of the left sum are cancelled by the terms of the right, leaving  $$ S_m =1-\frac{1}{(m+1)!}$$  Hence $ \lim_{m\rightarrow\infty} S_m  = 1$  Apologies for this one. The book I am using hasn't really offered anything on series with factorial denominators (yet). Thanks!


I saw the following:  $$\begin{align}  \int \tan x \ \mathrm{d}x &= \int \sin x \sec x \ \mathrm{d}x \\  \int \tan x \ \mathrm{d}x &= -\cos x \sec x - \int - \cos x \sec x \tan x \ \mathrm{d}x \\ \int \tan x \ \mathrm{d}x  &= -1 +  \int \tan x \ \mathrm{d}x \\ 0 &= -1   \end{align}$$  I figure the mistake has to do with constants of integration, but I can't quite point it. Can someone explain to me what happens, please? I browsed a bit around here, looking for $0=1$ and the tag fake-proofs, but I didn't found it, so I apologize in advance in case this is a duplicate of something (just provide me the link and I'll delete this, no problems).  Thanks!


What causes these inconsistent dark bands in some of my photos from an indoor event?

Yesterday I took photos of an event at school.  The lighting was poor so I increased the iso to 3200, shutter speed was between 80 and 250 and the aperture between 2.8 and 4.0.  Canon EOS500  about 10% of the photos got this weird horizontal black area. The position of the black area is not the same,  Sometimes it is in the middle, sometimes it is in the upper or lower part of the frame  Is this an artifact from the lighting frequency? or can it be a shutter problem?


Akka actors (Scala) How to get heap dump on out of memory

How to configure the Akka application to generate the heap dump on crash (out of memeory). Tried searching but could not find the information. Can some one help me on this?


What is the purpose of the backup user installed by default?

from /etc/passwd:  backup:x:34:34:backup:/var/backups:/bin/sh   The home directory listed is /var/backups which is owned by root:root. Here are the contents of the home directory:  total 4.1M drwxr-xr-x  2 root root   4.0K May 29 11:17 ./ drwxr-xr-x 13 root root   4.0K May 28 00:32 ../ -rw-r--r--  1 root root    11K May 28 20:16 apt.extended_states.0 -rw-r--r--  1 root root   1.4K Apr 28 16:50 apt.extended_states.1.gz -rw-r--r--  1 root root   1.2K Apr 14 21:06 apt.extended_states.2.gz -rw-r--r--  1 root root   1.1K Apr  7 13:45 apt.extended_states.3.gz -rw-r--r--  1 root root   1.1K Mar 28 22:00 apt.extended_states.4.gz -rw-r--r--  1 root root   1.1K Mar 18 22:26 apt.extended_states.5.gz -rw-r--r--  1 root root    970 Mar 14 23:52 apt.extended_states.6.gz -rw-r--r--  1 root root   1.6M May 28 20:16 dpkg.status.0 -rw-r--r--  1 root root   432K May 27 23:04 dpkg.status.1.gz -rw-r--r--  1 root root   431K Apr 28 16:50 dpkg.status.2.gz -rw-r--r--  1 root root   426K Apr 14 21:06 dpkg.status.3.gz -rw-r--r--  1 root root   420K Apr  7 13:45 dpkg.status.4.gz -rw-r--r--  1 root root   418K Mar 28 22:00 dpkg.status.5.gz -rw-r--r--  1 root root   416K Mar 20 21:08 dpkg.status.6.gz -rw-------  1 root root    918 May 28 20:12 group.bak -rw-------  1 root shadow  758 May 28 20:12 gshadow.bak -rw-------  1 root root   1.8K May 28 20:12 passwd.bak -rw-------  1 root shadow 1.2K May 28 20:12 shadow.bak   Obviously, these are backup files of some sort but which process is creating them? I did a quick find to see if this user owned anything but it didn't turn up much:  $ sudo find / -user backup /var/mail/backup


How to really force delete a file / folder in Windows 10

This 'question' is more of a possible solution to others who were in the same scenario that I was stuck in for a few days.  I had a file that had been created after a failed software install, inside two folders which were owned by a special 'shared' user who cannot login - it's just a way to access network shares without my main account details.  I tried all the usual solutions, take ownership, third party programs, delete from command line - nothing was working... the file apparently didn't exist whenever I tried to delete it, and deleting folders gave permissions errors regardless of owner.


How should I edit WPF data that exists outside a C# task? I have defined a UI using the standard WPF template. The grid contains only:  <TextBlock x:Name="myTextBox" Text="Original Text" />   In my code I have:  using System.Threading.Tasks; using System.Windows;  namespace UpdateGUI {   public partial class MainWindow : Window   {     private int myInt;      public MainWindow()     {       InitializeComponent();        myInt = 0;       Task.Factory.StartNew(() =>       {         myInt++;         myTextBox.Text = "New Text";       });     }   } }   This throws the following exception:     The calling thread cannot access this object because a different thread owns it.   Which thread owns myTextBox?  Why don't I see this error when I edit myInt?


Option to subscribe to notifications on a specific posts comments

Since some useful answers to other's questions sometimes later turn out be be wrong or receive comments that can provide valuable additional information, it would be great to be able to subscribe to comment-notifications on individual posts (that one doesn't own) instead of having to favourite the entire question. Maybe even with some noise filter like "only notify me of comments with at least [n] great comment votes" option.  This would also be useful to allow subscribing to the currently accepted answer to ones own questions, since


I am studying parabolas, but the way exponents are distributed is confusing me to oblivion.  $(y_2 – 2)^2$  $y_2^2 – 4y_2^2 + 4$   I do not understand how can the first expression be simplified to the next. Could someone please provide an explanation?


How can I fix the Skyrim Forever Mourning Bug if I have already returned to Jorrvaskr with the witches' heads?

I have already returned to Vilkas after killing the witches; it then went into forever mourning mode. I did not realise this was a glitch at first, and now have far too much play time after to throw away in order to go back to before the bug. I have tried running through the silver hand place and got the helm of Winterhold (without killing anyone), which I then returned, however the bug remains. Is there any way around it?


There is a spider on the window of my office that I've been trying to identify for the past few days but can't quite figure it out. My coworker thinks it's a Furrow Orb Weaver but I'm not sure. My office is located near Raleigh, NC and unfortunately I'm on the third floor and the spider always faces away from me, so these are the best pictures that I could get.  [