Calc and \settocdepth break \tikzexternalize

This might well be the strangest TeX behaviour I've ever seen and that's saying a lot. The following really is a MWE as far as the header is concerned:  \documentclass{memoir} \settocdepth{subsection} \usepackage{calc} \usepackage{pgfplots} \usepgfplotslibrary{external} \tikzexternalize \begin{document} \begin{center} \begin{tikzpicture}     \begin{axis}[view={45}{45}]     \addplot3[surf,samples=20,domain=-1:1,domain y=-1:1]         {1-exp(-x^2-y^2)};     \end{axis} \end{tikzpicture} \end{center} \end{document}   Take away either package calc or the \settocdepth definition and everything will be fine. When both are present, though, pdflatex -shell-escape will stop and the following will be in the output log:  ! Undefined control sequence. \@calc@post@scan ...st@scan \else \def \calc@next                                                                                {\calc@error #1}\fi \fi \f... l.14 \end{tikzpicture}   If I wanted to file a bug report, I wouldn't even know where :/ Does anybody else see this behaviour and can you tell what's causing it?


Clipping Multiple Polygons in Single Layer using QGIS?

I have about 10K polygons for a single layer. Many of these polygons are overlapping. I would like to clip the polygons and either have the overlap merge to one of the polygons or even split in the middle if possible.   There is an example below:  Overlap    Clipped and merged    I've used the Clipper Plugin tool which works great, but is very manual, and would like to see if anyone has found a batch process?


I have CANON EOS-600D DSLR. few days before I was on my terrace to capture some sunset scenes. When I was returning It was almost dark but I saw a bat flown to  nearby tree and hung itself there. I started taking its pictures with flash on but was not able to adjust the 55-250mm lens properly. Later by seeing the previous images I did some trial and error and successfully clicked the pictures. But is there any faster way to do the same? I am a beginner and trying to learn of my own.


How to run next bash line even when set -e is switched

Say I have something like this:  set -e; echo 'doing some stuff' false; status=$? post_hook send-message-elsewhere-with-status $status   One way to do what I want is:  set -e; echo 'doing some stuff' ( set +e false; status=$? post_hook send-message-elsewhere-with-status $status )   but is there some other way?


Can the reanimation jutsu bring back a person at any age?

In Naruto Shippuuden, does the Summoning: Reanimation Jutsu bring a dead person to the real world at any wanted age? (Young/Adult/Old) Or does it bring the person back at the age they died?  Because we have seen that Reanimation Jutsu brought back the Third Hokage as on old geezer. Which was the same as when he was at deathbed. But Madara Uchiha was revived as a younger version of himself, instead of his old age.


Intuition behind the residue at infinity

The residue at infinity is given by:  $$\underset{z_0=\infty}{\operatorname{Res}}f(z)=\frac{1}{2\pi i}\int_{C_0} f(z)dz$$  Where $f$ is an analytic function except at finite number of singular points and $C_0$ is a closed countour so all singular points lie inside it.  It can be proven that the residue at infinity can be computed calculating the residue at zero.  $$\underset{z_0=\infty}{\operatorname{Res}}f(z)=\underset{z_0=0}{\operatorname{Res}}\frac{-1}{z^2}f\left(\frac{1}{z}\right)$$  The proof is just to expand $-\frac{1}{z^2}f\left(\frac{1}{z}\right)$ as a Laurent series and to see that the $1/z$ is the integral mentioned.  I can see that we change $f(z)$ to $f(1/z)$ so the variable tends to infinity.  But, is there any intutive reason of why we introduce the $-1/z^2$ factor?


How to pin a website to the Windows 8 Start screen with Internet Explorer as default browser?

Possible Duplicate:          I'm not sure if I like the whole idea of Start screen yet, but I would find it more useful with certain web based sites as a tiles in the group.  This question is similar to my other one at:  but this is meant to cover only those using IE as their default!


Why does `cat foo | sed 's/bar/qux/'` > foo` erases the contents of foo?

$ cd /tmp $ echo bar > foo $ cat foo bar $ cat foo | sed 's/bar/qux/' qux $ cat foo | sed 's/bar/qux/' > foo $ cat foo   The last cat foo shows that the contents of the file have been erased. Why is that?


Can't load gnome-terminal on Debian Stretch, "Non UTF-8 locale is not supported!"

I've just completed a fresh install of Debian Stretch on a server that had previously been running Jessie, with /home preserved.  Now gnome-terminal fails to load.  Here's syslog:  18:29:02 alan dbus-daemon[918]: Activating via systemd: service name='org.gnome.Terminal'     nome-terminal-server.service' 18:29:02 alan systemd[899]: Starting GNOME Terminal Server... 18:29:02 alan gnome-terminal-server[4714]: Non UTF-8 locale (ANSI_X3.4-1968) is not supported! 18:29:02 alan systemd[899]: gnome-terminal-server.service: Main process exited, code=exited, status=8/     18:29:02 alan systemd[899]: Failed to start GNOME Terminal Server. 18:29:02 alan systemd[899]: gnome-terminal-server.service: Unit entered failed state. 18:29:02 alan systemd[899]: gnome-terminal-server.service: Failed with result 'exit-code'. 18:29:27 alan org.gnome.Shell.desktop[1003]: Error constructing proxy for org.gnome.Terminal:/org/    erminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: Timeout was reached 18:29:46 alan firefox-esr.desktop[1732]: Promise resolved while context is inactive 18:29:47 alan firefox-esr.desktop[1732]: Promise rejected after context unloaded: Message manager     ected 18:31:02 alan dbus-daemon[918]: Failed to activate service 'org.gnome.Terminal': timed out   I assumed that the non-UTF locale was the problem, and tried the following fixes based on googling:  Set /etc/environment to contain  LANG="en_GB.UTF-8" LCALL="en_GB.UTF-8"   Set /etc/default/locale to  LANG=en_GB.UTF-8   and rebooted.  Locale now returns  root@alan:/etc# locale LANG=en_GB.UTF-8 LANGUAGE= LC_CTYPE=en_GB.UTF-8 LC_NUMERIC="en_GB.UTF-8" LC_TIME="en_GB.UTF-8" LC_COLLATE="en_GB.UTF-8" LC_MONETARY="en_GB.UTF-8" LC_MESSAGES="en_GB.UTF-8" LC_PAPER="en_GB.UTF-8" LC_NAME="en_GB.UTF-8" LC_ADDRESS="en_GB.UTF-8" LC_TELEPHONE="en_GB.UTF-8" LC_MEASUREMENT="en_GB.UTF-8" LC_IDENTIFICATION="en_GB.UTF-8" LC_ALL=   but gnome-terminal still won't load.  Is this really a locale problem?  Where would gnome-terminal be getting its locale from?  What else could cause this?


passing parameters to a funcion: do I need to use an alias?

Can I use the same var name when passing a value to a function in Python, like this?:  def function(i):     z=i+1     print (z)  for i in range (0,100):     function(i)   Or should I do it like this:  def function(x):     z=x+1     print (z)  for i in range (0,100):     function(i)   what is the best practice?


How many rings that have special effects can one character wear at a time while still having all of the special effects

So i was wondering how many magical rings can one character wear at once while still retaining their special effects.


Need help with proof of intermediate value theorem

However i need hint on how to disprove that $f(c)$ cannot be less than zero.  Thanks


Private Set Intersection Polynomial Computation

I am trying to implement the protocol mentioned in Section 3.4 of “” in Java.  In the Second Step, the Client computes a polynomial of degree $n$ over the finite field.  For $C=\{1,2\}$, will the Polynomial be $x^2-3x+2$?  Can the polynomial have negative coefficients over the finite field? If yes, how do I encrypt the negative coefficients using Additive ElGamal?


I am using this code to generate a C3.js linechart but encountering an error in console as      Uncaught ReferenceError: c3 is not defined       at index.html     <!DOCTYPE html> <html lang="en">  <head>   <meta charset="UTF-8">   <title>C3Charts</title>   <script>     //Column data     var chart = c3.generate({       bindto: '#chart',       data: {         columns: [           ['data1', 30, 200, 100, 400, 150, 250],           ['data2', 50, 20, 10, 40, 15, 25]         ]       }     });   </script> </head>  <body>    <div id="chart">    </div>    <!-- Load c3.css -->   <link href="bower_components/c3/c3.css" rel="stylesheet" type="text/css">    <!-- Load d3.js and c3.js -->   <script src="bower_components/d3/d3.min.js" charset="utf-8"></script>   <script src="bower_components/c3/c3.min.js"></script> </body>  </html>     Looking out for a solution


char *str vs char str[] : segmentation issue

#include <stdio.h> #include <conio.h>  void test(char *p) {      p = p + 1;      *p = 'a'; }  int main() {     char *str = "Hello";     test(str);     printf("%s", str);     getch();     return 0; }   When I run this code it gives segmentation error ? why is this happening. The const theory is not clear to me... whereas if I declare str as char str[], it does the job. Are they not both basically the same things ?


What is the typical post processing work flow for amateur photographers?

I love photography; I hate postprocessing.  Seeing that I am an amateur, not just by virtue of not getting paid for it, but also being rather new to the whole affair, I already am used to most of my shots just not being that great. While reading blogs and websites I get the impression that condensing ~100 frames in maybe a handful of shareworthy photos is not rare.  But even so, after a vacation quite a few photos have accrued. What is a common workflow to sort, post-process and share photographs for a beginner? What are common postprocessing steps? What kind of automations do people use?    Edit: I phrased the question generically so that it can be of use to as many people as possible. But I understand that without anything to go by, it might be a bit hard to answer. Therefore, while I own no paid-for software, this is what I use:   I have an EOS 500D crop camera as picture source and I use  for development,  for any touching up I need to do. (Which is not much, so far.)  (in a VM) is my photo catalog. My destination is my Flickr stream for the most part, sometimes I send photos directly to family and friends.   On the input side, I mostly am in practice mode; shooting whatever I can place in front of my lens. I have not yet picked a specialty. I would like to minimize time spent fine-tuning photos in software. These sort of "batch processes" are a part I realize is important, but not much fun to me.  I am quite computer-literate, so I am not afraid of piecing together tools that can be of use, but the more "" this can be, the more people who don't spend their life in front of a PC can benefit too. :) If spending money on something will make my life easier, I am quite willing to consider it. However as photography does not bring any income, something as large as Photoshop (for example) is somewhat hard to justify as an investment.


A vast majority of humans get at least some grey hair as they age. As far as I know this applies to both genders and all races. Presumably this means that at least some grey haired humans have noticeable reproductive advantage, or maybe they had it in the recent past.  Theoretically, because this feature is so prevalent, there must be a strong evolutionary pressure to keep it. Am I right? If so, what is it?


Messing up sum of two random variables with the same exponential distribution.

Suppose that $P(X_{1} = x) = P(X_{2} = x) = \frac{1}{a} e^{-\frac{x}{a}}$ and $Y = X_{1} + X_{2}$. I am trying to find $P(Y = y)$. What I've done is \begin{align} P(Y = y) &= \int P(X_{1}=x_{1})P(X_{2}=x_{2})P(Y = y| X_{1} = x_{1}, X_{2} = x_{2}) dx_{1}dx_{2} \\          &= \int  \frac{1}{a} e^{-\frac{x_{1}}{a}} \frac{1}{a} e^{-\frac{x_{2}}{a}} \delta(y - x_{1} - x_{2})dx_{1}dx_{2} \\          &=  \int  \frac{1}{a} e^{-\frac{x_{1}}{a}} \frac{1}{a} e^{-\frac{y-x_{1}}{a}}dx_{1} \\          &= \frac{1}{a^{2}} \int e^{-\frac{y}{a}}dx_{1} \\          &=\frac{1}{a^{2}} e^{-\frac{y}{a}} \int dx_{1} \end{align} Which goes to infinity and even if I renormalize it I get $\frac{1}{a}e^{-\frac{y}{a}}$ which I know is not the correct answer. What exactly am I doing wrong?


The terminal shows this when it opens:  bash: /home/atlas/.bashrc: line 73: syntax error near unexpected token `[' bash: /home/atlas/.bashrc: line 73: `if [ -x /usr/bin/dircolors ] ; then '   I've tried to fix it using:  cp /ect/skel/.bashrc ~/   And I get this:  cp: cannot stat `/ect/skel/.bashrc': No such file or directory   I'm unsure of why this is doing this and how to fix it. I had previously been in the .bashrc file messing around and apparently I've messed something up. All I want to do is to restore the .bashrc file to default settings.


I have a little problem that i can't explain :  I have my query working with pdo in php like this  :    $table = "Potatatoe";     $sql = $pdo->prepare('SELECT  * FROM EATABLES WHERE FOOD = ? ');     $sql->execute(array($table));     $data = $sql->fetchAll(PDO::FETCH_ASSOC);     var_dump($data);exit;   The vardump will return some datas.  But my problem is i have an array of tables   $tables = array("T_tab1", "T_tab2", "T_tab3", ..);   And i would like to run a query SELECT * FROM [eachtable in the array] So i have :   $sql = $pdo->prepare('SELECT  * FROM ? ');             $sql->execute(array($table));             $data = $sql->fetchAll(PDO::FETCH_ASSOC);             var_dump($data);exit;   with $table which is from an foreach on $tables  So why i can't have something like this "SELECT * FROM ?" with ? equals to a string ?  Any help would be appreciated !


Interpreting coefficients for Poisson regression

I don't understand how to interpret the coefficient from a Poisson regression relative to the coefficient from an OLS regression.  Suppose I have time series data, my left-hand side variable is number of games won per year, and my main right-hand side variable is NASDAQ value. If my preferred specification is to interpret the model as in percentage terms, I take the log transformation of games won.  I can also take the log of the NASDAQ to say how much a 1 percent increase in the NASDAQ would increase the percent of games won.  Now, I acknowledge that a Poisson model might make sense because the data for games won are counts and not continuous.  I run the regression with say many, many control variables.    Would I not do a log-transformation on games won and instead use only games?      When I get the coefficients, do I do some sort of marginal effects calculation (as can be done for probit)? How do I interpret these coefficients? How do I compare the interpretation of the Poisson to OLS--either the OLS that is log-transformed or the OLS that is not?  I know this sort of question has been asked before, but I still don't quite get it.


wireframe is invisible and only the outline is visible. in object mode

In Edit mode, the object looks normal. but in Object mode, the wireframe is not visible and only the outline is visible. I downgraded the graphics card because I thought it might be a problem, but there is still a problem. By the way, rendering works normally. I tried reinstalling the blender and graphics driver, but the problem remains the same. Now version is 'RadeonSoftwareAdrenalin2020 20.11.2' Upgraded version is '20.12.1'


Should one buy the Pathfinder book when the content is available for free on d20pfsrd.com?

Does the  core rulebook contain any information that is not included already on  that would make it worth it to buy the PDF version of the manual? Or does it only have extra descriptive text?


On generalised character counting number of solutions of $x^n = 1$

This is an exercise from M.Isaac's book on character theory of finite groups (exercise 4.6, Pg 60):  Let $n \in {\mathbb{N}}$ and assume that $\chi^{(n)} \in {\mathrm{Irr}}(G)$ for every $\chi \in {\mathrm{Irr}}(G)$. Show that $G = H \times A$, where $A$ is abelian and ${\mathrm{g.c.d.}}(|H|, n) = 1$. Here $\chi^{(n)}(g) := \chi(g^n)$.  The first hint was: Let $d = {\mathrm{g.c.d.}}(|G|, n)$. Show that it is no loss to assume that ${\mathrm{g.c.d.}}(|G|/d, n) = 1$. [The conclusion is sort of obvious. Surely a priori it is difficult to find a subgroup $H$ with ${\mathrm{g.c.d.}}(|H|, n) = 1$]   The second hint was: Let $A = \bigcap_{\chi \in {\mathrm{Irr}}(G)} {\mathrm{ker}}(\chi^{(n)})$. Show that $A = \{ g \in G ~:~ g^n = 1 \}$ and $|A| = d$.     The first statement follows from the definition of $\chi^{(n)}$ itself. ${\textbf{ It is not so clear why $A$ must be abelian}}$. It is easy to realise $A$ being kernel of $\rho^{(n)}$, where $\rho$ is the regular character. The problem is many of the $\chi^{(n)}$ will coincide for different $\chi \in {\mathrm{Irr}}(G)$.  The third hint was: Let $H = \bigcap \left\{ {\mathrm{Ker}}(\chi) ~:~ \chi \in {\mathrm{Irr}}(G), \chi^{(n)} = 1_{G} \right\}$. Show that $[G : H] = d$.  Assuming the previous step, one can apply Schur-Zassenhaus theorem to conclude this. ${\textbf{Is there any direct way?}}$


Virtual Box Toolbar Hidden. How to show?

After the first installation there was a menu bar in the marked area. But now it is hidden. How can I make it visible again?


Positive eigenvalues and/or positive definiteness of $A^+DA$

I have stumbled across the following fact in robotics.   Let $A$ an $m\times n$ matrix with $rank(A)=n$. Consider also a diagonal matrix $D$ with positive entries. The following two claims are posed:   Is $A^+DA$ is positive definite where $A^+$ is the pseudoinverse matrix of $A$?  Are the eigenvalues of $A^+DA$ positive? This is obvious if for example $A$ is a square matrix.   Edit: I just found an example showing that claim 1. is not true in general. Specifically, for $$A=\left[\matrix{1 & 1\\0 & 1}\right]\qquad,\qquad D=\left[\matrix{10 & 0\\0 & 0.1}\right]$$ then  $$A^+DA+(A^+DA)^T=\left[\matrix{20 & 9.9\\9.9 & 0.2}\right]$$ which is not positive definite.


Where are commands `fg`, `bg` and `jobs` installed?

fg, bg and jobs are used for job management. And for some reason (maybe it's just me), I'm not able to find where their binaries are nor their manpages (whereis prints no information). which gives no output. The commands themselves work just fine, though.  I ran commands like find /bin bg, but with no hits. I also ran find / bg to cast a wide net.


Prove $\left(1+\frac{x}{n}\right)^n < e^x$, where $x$ is any positive real number and $n$ is any positive integer.

I am having trouble with my homework problem, it says:      Suppose that $n$ is a positive integer and that $x > 0$. Show that   $$\left(1+\frac{x}{n}\right)^n < e^x.$$    I have proved the base case, but I am unsure how to proceed with the induction step. The question continues:      and, if $x < n$, then   $$e^x < \left(1-\frac{x}{n}\right)^{-n}$$   Also, by choosing a suitable $n$, deduce that $2.5 < e < 2.99$.   I would like a hint to help me along if anyone can help. Thanks!


Example of subgroup of Direct Product which is not in usual form

I wanted to find group $A\times B$ such that it has subgroup which is not of form $C\times D$ where $C < A$ and $D <B$. Actually I think this is wrong I tried to get proof. But my friend told this is true . that it possible to have group with such prpoerty  ANy suggestion is appreciated


Given a group G and its subgroup H that creates cosets, prove that cosets form a group iff H - is a normal subgroup. I've tried to find any good prove but I failed - most of the sources (including ProveWiki) provide this statement "as is" and other sources provide incorrect proves like here:    6:54 - brackets are opened as the operation is commutative - but in fact, it not necessarily true.    Can you, please, tell why there's a huge leap between statement that   product of two elements from two cosets must be contained by the third coset and this operation should be associative <=>  subgroup ability to form up equal left and right cosets.  Or give me, please, prove of the statement, I'll try to understand the leap.


I use \includegraphics command to insert image to the document. But how can I add a border around this image w/o any margin between border lines and image? It seems to be very easy, but I can't find it in the documentation.


This may be a duplicate of  but I am not quite able to say so. Also, the answers linked there are just one level more abstract than is helpful to my limited understanding.  I have a bezier curve.  I want to give an offset distance. I would then like to know, given the vertices and control points in the given curve, at what positions should the vertices and control points be in the second, offset curve?  I think that my curve is relatively simple, at its most complex it would approximate an inchworm: start out flat, curve up then back down, and then flat again (left to right).  I am using  (vertex() and bezierVertex()) in case that's helpful.


I was the given the follow definition     Definition: If $D$ is simply connected space then each cycle is homologous to zero   So it we look at a point, let say $p$ in the middle of the ring and on the paths one that is clockwise and the other which is anti-clockwise the cycle is zero, but because we can take $2$ paths that sum up to $\neq 0$ then a ring is not simply connected space?


i cant install libmagickcore-dev,libmagickwand-dev in ubuntu 20.04

I tried to install them buy sudo apt-get install libmagickcore-dev libmagickwand-dev  it gives Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  libmagickcore-dev : Depends: libmagickcore-6.q16-dev but it is not going to be installed  libmagickwand-dev : Depends: libmagickwand-6.q16-dev but it is not going to be installed E: Unable to correct problems, you have held broken packages.  If I try to install libmagickwand-6.q16-dev sudo apt-get install libmagickwand-6.q16-dev       Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  libmagickwand-6.q16-dev : Depends: libmagickcore-6.q16-dev (= 8:6.9.10.23+dfsg-2.1ubuntu11.2) but it is not going to be installed E: Unable to correct problems, you have held broken packages.  pls, can anyone help me? If I Run sudo apt-cache policy libmagickcore-dev libmagickwand-dev libmagickwand-6.q16-dev libmagickcore-dev:   Installed: (none)   Candidate: 8:6.9.10.23+dfsg-2.1ubuntu11.2   Version table:      8:6.9.10.23+dfsg-2.1ubuntu11.2 50          50 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages          50 http://us.archive.ubuntu.com/ubuntu focal-updates/universe i386 Packages          50 http://us.archive.ubuntu.com/ubuntu focal-security/universe amd64 Packages          50 http://us.archive.ubuntu.com/ubuntu focal-security/universe i386 Packages      8:6.9.10.23+dfsg-2.1ubuntu11 50          50 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 Packages          50 http://us.archive.ubuntu.com/ubuntu focal/universe i386 Packages libmagickwand-dev:   Installed: (none)   Candidate: 8:6.9.10.23+dfsg-2.1ubuntu11.2   Version table:      8:6.9.10.23+dfsg-2.1ubuntu11.2 50          50 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages          50 http://us.archive.ubuntu.com/ubuntu focal-updates/universe i386 Packages          50 http://us.archive.ubuntu.com/ubuntu focal-security/universe amd64 Packages          50 http://us.archive.ubuntu.com/ubuntu focal-security/universe i386 Packages      8:6.9.10.23+dfsg-2.1ubuntu11 50          50 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 Packages          50 http://us.archive.ubuntu.com/ubuntu focal/universe i386 Packages libmagickwand-6.q16-dev:   Installed: (none)   Candidate: 8:6.9.10.23+dfsg-2.1ubuntu11.2   Version table:      8:6.9.10.23+dfsg-2.1ubuntu11.2 50          50 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages          50 http://us.archive.ubuntu.com/ubuntu focal-security/universe amd64 Packages      8:6.9.10.23+dfsg-2.1ubuntu11 50          50 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 Packages


Input power rating on power supplies - how does max amp draw apply to 220V

If a power supply says the input power is 100-240V, ~1.5A, I'm assuming that the "1.5A" draw would be at 100V, not at 240V, right?  I.e. would the total max watts be 150W regardless of the input voltage?    The context of this is trying to determine the maximum draw for something based on the input power specs on its power supply to ensure a circuit doesn't get overloaded if too much is on it.  I want to make sure to get the max draw correct whether this is in the US at 110V or Europe at 220V.    As a side question, the output rating on this supply is 19V, 3.42A.  Does that mean that it's pretty inefficient?


Is there a way to have/lock unique index values of the Enum object in Javascript?

Reading the  of dealing with  in Javascript, I am still uncertain because I can compare the value with a forged value, while I should compare only to a "enum" type value:   var DaysEnum = {"monday":1, "tuesday":2, "wednesday":3, ...}  Object.freeze(DaysEnum)   switch( day ){    case "monday":      return "Hello"    case "tuesday":      return "Hi"    case "blahblahday":      return "No"  }   The strings I made the switch to compare against ("monday", "tuesday", "blahblahday") are totally free from my "enum type: DaysEnum", can be provided by the user and this could lead to some subtle errors not spotted by the interpreter (like typos).  Is there a way to have/lock unique index values of the Enum object?


Straight lines - product of slope of perpendicular lines.

Let $l$ be a line with slope $\frac{1}{0}$, and $m$ a line with slope $0$.  Now, line $l$ is perpendicular to line $l$, therefore the product of the slope of line $l$ and the slope of line $m$ equals $-1$. This implies that $\frac{1}{0} \times 0 = -1$!


How could it be that a noun (aircraft and ship) can get a pronoun of "she"?

I saw a  and the announcer said (39:25) on the ship building that "the super-tanker is not what she was a few months ago... Now she's painted".   The same thing I saw in a  (0:03) on aircraft: "she is the latest model.."   Therefor I am wondering why this ship or aircraft get the pronoun "she"?


Inserting a math equation to a LibreOffice presentation

In a LibreOffice Impress presentation (Version 5.1.4.2 on Ubuntu 16.04), when I click Insert -> Object -> Formula, I see a visual toolbar that lets me add elements of an equation such as fractions etc. However:   The inserted formula is in a very small font (18 pt), and I do not find any way to enlarge it, neither within the formula editor nor outside it. Outside the editor, I can enlarge the font of the box, but it has no effect. It is very cumbersome to insert formulas through the visual editor. Is there a way to insert formulas in a plain text markup, like in Writer?


I know this is a potentially silly question but thinking about how both can fly in the newer versions of their respective franchises (and  from the official Doctor Who tumblr), I just have to ask:  Was the R2 design inspired by Daleks?


remote desktop gateway licensing mode for administrator only usage

I have setup a remote desktop gateway but only intend to use it for administrative access to servers.  Correct me if I am wrong but as long as I am only using the RD Gateway for administrative purposes and limit it to two connections per server at a time I don't need licenses.  If that is true then, how do I get the gateway to not expire after the grace period?


I would like to check hostnames to make sure they follow the standard naming convention in Bash Shell. Let say the hostname is ab-cde-01 wolf@linux:~$ h='ab-cde-01' wolf@linux:~$ echo $h ab-cde-01 wolf@linux:~$   I started by building if else loop and it's working just fine. wolf@linux:~$ if [ $h = 'ab-cde-01' ]; then > echo $h is a valid name > else > echo $h is an INVALID name > fi ab-cde-01 is a valid name wolf@linux:~$   However, when I try to use regex to replace numbers with [0-9], I'm getting an invalid name. wolf@linux:~$ if [ $h = 'ab-cde-0[0-9]' ]; then > echo $h is a valid name > else > echo $h is an INVALID name > fi ab-cde-01 is an INVALID name wolf@linux:~$   update 1: =~ operator =~ operator used as suggested ... wolf@linux:~$ if [ $h =~ 'ab-cde-0[0-9]' ]; then > echo $h is a valid name > else > echo $h is an INVALID name > fi bash: [: =~: binary operator expected ab-cde-01 is an INVALID name wolf@linux:~$   update 2: double bracket wolf@linux:~$ if [[ $h =~ 'ab-cde-0[0-9]' ]]; then > echo $h is a valid name > else > echo $h is an INVALID name > fi ab-cde-01 is an INVALID name wolf@linux:~$    What's wrong in this code? How to fix it? Is this the right/most efficient way to check hostname against certain standard?  update 3: Actual answer for my own reference too wolf@linux:~$ if [[ $h =~ ab-cde-0[0-9] ]]; then > echo $h is a valid name > else > echo $h is an INVALID name > fi ab-cde-01 is a valid name wolf@linux:~$   Lessons learned  Use double bracket instead of single bracket No quote in regex


I got a single-entry Schengen visa from Italian embassy. Now I am planning to visit first Rome after that from Rome to Paris by plane. So can I travel to Paris by plane from Rome, will immigration ask me something? Or can I travel by train only?


How do trees lift water higher than 10 meters?

The atmosphere pressure is 10 meters of water (approx). This means that it is impossible to lift water higher than 10 meters with vacuum or сapillary action (on Earth, under normal conditions).  There are trees higher than 10 meters.  How do they lift water to their tops?  UPDATE  In other words: how cohesion-tension theory can be true if it apparently contradicts the laws of physics?   UPDATE 2  Atmospheric pressure helps to rise the water, not resists rising. What is resisting is water weight. When water column is 10 meters high, then atmospheric pressure can't help anymore.   Any adhesion/cohesion mechanism can't help here too, because it acts only in thin molecular layer. To transfer action force further the pressure is required, which is insufficient at 10 meters.  UPDATE 3  If we had capillary small enough to rise water to 10 meters and then we will build smaller capillary which we expect will rise water higher, we will fail. Water column will break and does not climb higher than 10 meters.     Menisci acts like small piston and can't help rising water higher than 10 meters.  UPDATE 4  Common pressure distribution in capillary is follows:    $P_0$ is atmospheric pressure. As you see, right under menisci, the pressure is lowered by $2 \sigma / R$ where $R$ is the radius of menisci and $\sigma$ is surface tension. The entire term is called "Laplace pressure". As you see, it can't supersede atmospheric pressure, because water continuity will be broken in the case.  I.e. no any menisci can rise water higher than 10 meters.  The existence of higher trees PROVES that there are some other significant mechanisms, not adhesion/cohesion, not capillary.  UPDATE 5  Current version, as I understood it, is based on a declaration, that a water, if put into thin capillary, can behave like a solid body. Particularly, it can resist tension up to minus 15 atmospheres.   This is a tensile strength of concrete, so I don't believe that without additional proofs.  I think it is just not hard to make thin tube, put water into it and check, how high it can climb.  Was it done ever?


Inspired by the question   I understand the simple out of universe answer is likely "they hadn't come up with the ideas of the newer models yet". But I was wondering if there was some official in universe answer to explain why this would be. Would it not have been better for Skynet to send back a T-1000 first? Maybe a T-X or something? Surely they would have succeeded without Arnold to stop them.    My best guess is that the T-800 was more easily accessible in the shortest amount of time possible, as I imagine Skynet had to rush to use the time machine as quickly as possible once the Resistance had basically won. But is this addressed at any point?


I'm trying to install a newer version on a nettop (Acer Aspire Revo) that is running an older version. I have an external DVD drive that appears to be booting up ok, but when I get to the "Install Ubuntu" page, the display just goes off! The DVD drive still wizzes around for a bit and then nothing!  Any ideas?


Hi I am looking at buying a used Canon 5d Mk1. I currently have a Canon 50d I know there is a megapixel difference and I need some advice on if I should upgrade to the 5d mk1 or stick with the 50d? 50d is crop sensor but has more megapixels than the 5d MK1.


How to distinguish between multiple input devices in C#

I have a barcode scanner (which acts like a keyboard) and of course I have a keyboard too hooked up to a computer. The software is accepting input from both the scanner and the keyboard. I need to accept only the scanner's input. The code is written in C#. Is there a way to "disable" input from the keyboard and only accept input from the scanner?  Note: Keyboard is part of a laptop...so it cannot be unplugged. Also, I tried putting the following code      protected override Boolean ProcessDialogKey(System.Windows.Forms.Keys keyData)     {       return true;     } But then along with ignoring the keystrokes from the keyboard, the barcode scanner input is also ignored.  I cannot have the scanner send sentinal characters as, the scanner is being used by other applications and adding a sentinal character stream would mean modifying other code.  Also, I cannot use the timing method of determining if the input came from a barcode scanner (if its a bunch of characters followed by a pause) since the barcodes scanned could potentially be single character barcodes.  Yes, I am reading data from a stream.  I am trying to follow along with the article: Distinguishing Barcode Scanners from the Keyboard in WinForms. However I have the following questions:   I get an error NativeMethods is inaccessible due to its protection level. It seems as though I need to import a dll; is this correct? If so, how do I do it?  Which protected override void WndProc(ref Message m) definition should I use, there are two implementations in the article? Am getting an error related to [SecurityPermission( SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)] error CS0246: The type or namespace name 'SecurityPermission' could not be found (are you missing a using directive or an assembly reference?). How do I resolve this error? There is also an error on the line containing: if ((from hardwareId in hardwareIds where deviceName.Contains(hardwareId) select hardwareId).Count() > 0) Error is error CS1026: ) expected. Should I be placing all the code in the article in one .cs file called BarcodeScannerListener.cs?   Followup questions about C# solution source code posted by Nicholas Piasecki on :   I was not able to open the solution in VS 2005, so I downloaded Visual C# 2008 Express Edition, and the code ran. However, after hooking up my barcode scanner and scanning a barcode, the program did not recognize the scan. I put a break point in OnBarcodeScanned method but it never got hit. I did change the App.config with the id of my Barcode scanner obtained using Device Manager. There seems to be 2 deviceNames with HID#Vid_0536&Pid_01c1 (which is obtained from Device Manager when the scanner is hooked up). I don't know if this is causing the scanning not to work. When iterating over the deviceNames, here is the list of devices I found (using the debugger):   "\??\HID#Vid_0536&Pid_01c1&MI_01#9&25ca5370&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}"  "\??\HID#Vid_0536&Pid_01c1&MI_00#9&38e10b9&0&0000#{884b96c3-56ef-11d1-bc8c-00a0c91405dd}"  "\??\HID#Vid_413c&Pid_2101&MI_00#8&1966e83d&0&0000#{884b96c3-56ef-11d1-bc8c-00a0c91405dd}"  "\??\HID#Vid_413c&Pid_3012#7&960fae0&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd}" "\??\Root#RDP_KBD#0000#{884b96c3-56ef-11d1-bc8c-00a0c91405dd}" "\??\ACPI#PNP0303#4&2f94427b&0#{884b96c3-56ef-11d1-bc8c-00a0c91405dd}" "\??\Root#RDP_MOU#0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd}" "\??\ACPI#PNP0F13#4&2f94427b&0#{378de44c-56ef-11d1-bc8c-00a0c91405dd}"  So there are 2 entries for HID#Vid_0536&Pid_01c1; could that be causing the scanning not to work?  OK so it seems that I had to figure out a way to not depend on the ASCII 0x04 character being sent by the scanner...since my scanner does not send that character. After that, the barcode scanned event is fired and the popup with the barcode is shown. So thanks Nicholas for your help.


I have Windows 7 64 bits Home Premium with 2x4GB Ram, but the system shows only 4.75GB available in Windows.


How to add samtools in the PATH permanently

I installed samtools executables within my bin directory under home directory. Installation works perfectly well. I am using Ubuntu 14.04 version and it has .profile and .bashrc in my home directory which looks like this which I asked in my previous post.    I want to add my /home/user/bin directory permanently in my PATH so that when I open the terminal, it automatically has samtools in the path. My .profile says to put /home/user/bin in the path but it is not executable.  How can I do it?  I have to run it like this after opening the terminal  . .profile which samtools /home/user/bin/samtools   Hope to hear from you guys  Thanks


I am stuck on a single view in my project. I can't get the file toolbar at the top or the timeline at the bottom.


$a\in \mathbb{N}$, $p$ prime, $a<p$ prove that $a\mid p+1\iff\exists\, b,c\in\Bbb N:\dfrac{a}{p}=\dfrac{1}{b}+\dfrac{1}{c}$

$a\in \mathbb{N}$, $p$ prime, $a<p$ prove that $a\mid p+1\iff \exists\, b,c\in\Bbb N:\dfrac{a}{p}=\dfrac{1}{b}+\dfrac{1}{c}$ my attempt: $a\cdot b \cdot c=p\cdot(b+c)$ . i dont know how to use the given $a\mid p+1$


Windows 10 Multiple Desktops - Equivalent Keyboard Shortcut of CTRL+ALT+SHIFT+LEFT/RIGHT in Ubuntu?

Recently had to switch from Ubuntu to Windows 10 for work.  I see Windows finally added multiple desktops.  CTRL + SUPER + LEFT/RIGHT  switch desktops which is great.  In Ubuntu CTRL + ALT + LEFT/ RIGHT do the same.  In Ubuntu you can also take the current application in focus to a new Desktop via  CTRL + ALT + SHIFT + LEFT / RIGHT  Is there an equivalent to this in Windows 10?


Help with Minecraft plugin replacing default tp

As the title states, I am having trouble with entity teleporting in Minecraft. I know that I am doing it correct as it works in singleplayer, so I figured it would be a plugin that is stopping me from teleporting entities. The command I am using is /tp @e[name=o] ~ ~300 ~, and the plugins on my server are:     AsyncWorldEditInjector, WorldEdit, Installer, VoxelSniper, Skript,   CustomServerMessages, Buycraft, ColoredSigns, Vault, Multiverse-Core,   PermissionsEx, EmptyWorldGenerator, WorldGuard, Tablist, CoreProtect,   ItemRenamer, BuycraftAnnouncer, NoLeafDecay, WildSkript, ProtocolLib,   HolographicDisplays, mcMMO, VoidWorld, Essentials, ArmorStandEditor,   AsyncWorldEdit, EssentialsProtect, AuctionHouse, EssentialsSpawn,   EssentialsGeoIP, WirelessRedstone, EssentialsAntiBuild,   FakePlayersOnline, TitleManager, CraftBook, EssentialsChat   If you know how to fix this or what plugins to remove/disable please inform me. Thanks.


Problem with installing package (python-qt4)

I wanna install tuxcut it says i need package python-qt4. I try sudo apt install python-qt4 but it unable to found package python-qt4.


What if I don't want to allow anybody to edit my question?

Sometimes I want to keep my question as it is and want clarification on it. So I don't want to allow edits on it. Sometimes it happens that some authors change the question in a way that changes the meaning of my question. How I can do this?


Prove that: $P(A) \bigcap P(B) = P(A\bigcap B)$

How to prove: $$P(A) \bigcap P(B) = P(A\bigcap B)$$  I got that this is true by taking values and checking. Ex: $ A = {\{1.2\}}$ $P(A)= {\{\emptyset, \{1\},\{2\},\{1,2\}\}}$ $ B = {\{2,3\}}$ $P(B)= {\{\emptyset, \{2\},\{3\},\{2,3\}\}}$ So, $$P(A) \bigcap P(B)= {\{\emptyset,\{2\}\}}=P(A\bigcap B)$$ But how to prove it in general? Any ideas or hints would be appreciated!


I am new to LaTeX and trying to learn it by writing a CV. I tried to add a photo of me in the document. The code is below:  \documentclass[a4paper, 12pt]{article}  \usepackage{graphicx}  \begin{document}   \begin{figure}[h!]     \centering       \includegraphics[width=0.5\textwidth]{taufique}   \end{figure} \end{document}   'taufique' is the name of the jpg image file. It's located in the same directory where tex file is placed. I compiled with pdflatex but it is not being compiled. Error report says that compiler can't find the image file. What's the problem?


While checking the convergence of the series $\sum u_n, u_n = \frac{n^n x^n}{n!}$ for $x>0$, we used ratio test to say that for $0< x < \frac1e$ $\sum u_n$ is convergent and for $\frac1e < x<\infty$ $\sum u_n$ is divergent.  We use Logarithimic Test for the case $x = \frac1e$, where we came across computing the limit $$\lim_{n \to \infty} n+n^2 \log \frac{n}{n+1}$$ but I am stuck in finding the limit.


Is there any limit to the number of PPA's I can add to the system? Why?

I came across a post which suggests:      Do Not instruct people to add PPAs unless it is necessary   And one of the reason it has mentioned:     There is a finite number of PPAs that a user can add.   Really?  Is there any limit to adding PPA's to the system? Why?  Also, on what factors do the limit depend?


I wanted to replace windows 7 with Ubuntu.   Is it possible to try Ubuntu from USB, like a fully functional Ubuntu?, want to test sound, WiFI connectivity etc. Is there an option to exit from the above option, in case I dont want to install Ubuntu, try it later after fixing something?


How do I put my StackOverflow User Flair on my blogger blog?

I have a blog hosted by blogger, and I'd like to add StackOverflow's "user flair" to the sidebar or something. How do I do that?


How to request that collaborators add my supervisor's name to a manuscript

I am collaborating with a foreign author. As I am still pursuing my degree, I have to add my supervisor's name in that paper, even though my supervisor has  not contributed to the preparation of this manuscript.  How should I ask my collaborator (foreign author) to include my supervisor's name as a third author? I need some help in this.   Edited: As my supervisor has told me to add his name, I am obliged to add. I have no other options left. I am asking how should I write and request to my collaborator to include my supervisor name in the manuscript. Also, I am afraid whether my collaborator will feel odd or bad if I request him to do that.  Please help me: what should I say to my collaborator so that he may give third authorship to my supervisor?


Will I be able to get a US Business / Tourist VISA after a trip in Vietnam

I am french and I have planned to visit Vietnam for a week or two with a tourist visa.  It seems like a silly question to me but I'd rather be sure. Somebody told me that if I visit this kind of country (country that have bad history with the US or communist countries) I might get in trouble if I want to obtain a business / tourist visa for the US later in my life.  Is this true? Can a visa request be denied or more difficult because I visited certain countries before in my life?  Edit: I have seen the duplicate, I understand that it can happen with some middle-east countries these days, but could it happen with some asia countries too? I get that there is no official list and that it depends alot of the immigration guy questionning you, but is Vietnam / Laos / China and other countries like that are as badly seen in the US as some of the middle-east countries?


Which help pages can be changed, by a site's community moderator?

Each site's help center contains a number of help pages.  Which of these can be edited for a specific site by a community moderator on that site?  (To be clear, I am asking about ♦-moderators, not community managers or Stack Exchange employees.)


How can i run a command script by opening it in a terminal by clicking on it

I can run a command from my terminal. Think as in : Terminal # ls -l -> output etc. If I want to run a script I can drag it into the terminal or specify it's location like, /usr/script and run it.  But here is my question: Is it possible and how can I run a command script by simply clicking on it on my desktop? I already set it to be opened by the terminal application but when I click it it does not run.  The command I want to run is nwipe.  This is my script:  .#!bin/bash  sudo nwipe   (ignore the dot in front of #).  PS nwipe does not run without sudo.  Ubuntu Xenial 16.04


I try to develop some code that loops through a set of geometries (ordered by id)  and deletes from the next neighboring geometry based on the size, but  my syntax seems at the loop seems to be incorrect.  When I run:  WITH firstblocks AS(  SELECT  ST_Buffer(ST_Line_Substring(the_geom, 8*n/length,   CASE     WHEN 8*(n+1) < length THEN 8*(n+1)/length     ELSE 1   END),4, 'endcap=flat join=mitre mitre_limit=3.0' ) As the_geom  FROM   (SELECT    ST_LineMerge(geom) AS the_geom,   ST_Length(geom) As length   FROM example_route_single_feature   ) AS t  CROSS JOIN generate_series(0,CEIL(length/8)::int) AS n WHERE n*8/length < 1  )  SELECT the_geom FROM firstblocks;  DO $do$ BEGIN     FOR i IN the_geom LOOP         IF ST_Area(i) <= ST_Area(lead(i))          THEN             ST_Difference(i, lead(i)) ;         ELSE              ST_Difference(lead(i), i) ;         END IF;     END LOOP; END      $do$   I get the error:  SQL error: WITH firstblocks AS(  SELECT  ST_Buffer(ST_Line_Substring(the_geom, 8*n/length,   CASE   WHEN 8*(n+1) < length THEN 8*(n+1)/length   ELSE 1   END),4, 'endcap=flat join=mitre mitre_limit=3.0' ) As the_geom    FROM   (SELECT    ST_LineMerge(geom) AS the_geom,   ST_Length(geom) As length   FROM example_route_single_feature   ) AS t    CROSS JOIN generate_series(0,CEIL(length/8)::int) AS n WHERE n*8/length < 1  )  SELECT the_geom FROM firstblocks;  DO $do$ BEGIN   FOR i IN the_geom LOOP      IF ST_Area(i) <= ST_Area(lead(i))       THEN            ST_Difference(i, lead(i)) ;         ELSE            ST_Difference(lead(i), i) ;         END IF;     END LOOP; END        $do$ returned 0 [ERROR:  syntax error at or near "the_geom" LINE 26:   FOR i IN the_geom LOOP                     ^ ]   I'm a PostGIS beginner and not so fit with the PostgrSQL-Syntax, so I would be very happy if someone can point whats wrong with the code.  I'm using PostGIS 2.5.1


Help with Bayesian derivation of normal model with conjugate prior

I'm reading  to work on the foundations of my understanding of Bayesian analysis. In the first chapter, about normal models, I'm having some trouble working the posterior distribution by myself.  For the model with known variance and conjugate prior for the mean $N(0, \sigma^2)$, the derivation seems straightforward (pages 29 and 30):  $$\pi(\mu\mid D_n) \propto \mathrm{exp}\{-\mu^2/2\sigma^2\}\mathrm{exp}\{-[n(\bar{x}-\mu)^2 + s^2]/2\sigma^2\}$$ $$\propto \mathrm{exp}\left\{-\frac{\mu^2 + n\mu^2 - 2n\mu\bar{x} +n\bar{x}^2 + s^2}{2\sigma^2}\right\}$$  $s^2$ drops off because it does not depend on the $\mu$ parameter; $n\bar{x}^2$ is almost what we need to complete the square, but not quite so, so I guess we also drop it off and substitute it for the proper term:  $$\propto \mathrm{exp}\left\{-\frac{(n+1)\mu^2 - 2n\mu\bar{x}}{2\sigma^2}\right\}$$ $$\propto \mathrm{exp}\left\{-\frac{(n+1)\left(\mu^2 - \frac{2n\mu\bar{x}}{n+1} + \frac{n^2\bar{x}^2}{(n+1)^2}\right)}{2\sigma^2}\right\}$$ $$\propto \mathrm{exp}\left\{-\frac{(n+1)\left(\mu - \frac{n\bar{x}}{n+1}\right)^2}{2\sigma^2}\right\}$$  So far, so good. But when it comes to the unknown mean, unknown variance model with prior $N(0, \sigma^2)$ and $\frac{1}{\sigma^2} \sim Exp(1)$, we can't drop off the $n\bar{x}^2$ term anymore because now the denominator inside the exponential function depends on the parameter $\sigma^2$.  So I have come to a similar point deriving the joint posterior for $\mu$ and $\sigma^2$:  $$\propto \mathrm{exp}\left\{-\frac{2 + \mu^2 + n\mu^2 - 2n\mu\bar{x} +n\bar{x}^2 + s^2}{2\sigma^2}\right\}\sigma^{-(n+5)}$$ $$\propto \sigma^{-1/2}\mathrm{exp}\left\{-\frac{(n+1)\mu^2 - 2n\mu\bar{x} +n\bar{x}^2}{2\sigma^2}\right\}\mathrm{exp}\left\{-\frac{2+s^2}{2\sigma^2}\right\}(\sigma^2)^{-(\frac{n+2}{2})-1}$$  The part to the right is already the core of the Inverse-Gamma function derived in the book, but I can't see how to complete the square for the normal density function without adding another term to the second Inverse-Gamma parameter. Indeed, in the general case, this parameter value should also have a $\frac{n\bar{x}^2}{n+1}$ term (as, e.g., ).   So I decided to compare both solutions by simulation using Metropolis-Hastings to obtain posterior draws of both parameters. Surprisingly (or not), the book solution uses the correct formula for the scale parameter for the Inverse-Gamma, $\frac{2 + s^2}{2}$, and if we add the term based on the sample mean, the density curve does not quite fit (Edit: not really, see below) . What am I missing here?    Edit: I'm starting to think that the book might indeed be mistaken. Completing the square in the first exponential makes it necessary to add a $\frac{n\bar{x}^2}{n+1}$ term that can only go in the second exponential term. So I tried my hand again with simulations, adding a JAGS model with the same definition to compare to my homemade solution (which had a coding error when I posted the question), and now it seems that the correct formula for the second Inverse-Gamma parameter is indeed $\frac{2 + s^2 + \frac{n\bar{x}^2}{n+1}}{2}$. Here's a plot with the simulated and theoretical densities for the posterior distribution (data = rnorm(100, 50, 10)):


What is the difference between if and whether?

Let me know if I picked up the right file Let me know whether I picked up the right file  Could anyone tell me the differences between them? Can we use ‘if’ and ‘whether’ in present, past, and future tenses as well?


Calculate $\int_0^{\frac \pi 2} \log(\sin x)dx$ using Feynman's trick

$$\int_0^{\frac \pi 2} \log(\sin x)dx$$ I tried to use the following substitution, where $I(1)$ is the target integral: $$I(b) = \int_0^{\frac \pi 2} \log(b\sin x)dx \implies I'(b) = \frac \pi {2b}$$ Doing a definite integral on $I'(b)$, I get $$I(1)-I(l) = -\frac \pi 2 \log(l) \implies I(1) = I(l) - \frac \pi 2 \log(l)$$ where $l$ is the lower limit of the integral. I am unable to find a suitable value of $I(l)$ to carry out this substitution. Any help is appreciated!


Unresolved external symbol when using template function inside a class

Inside UIHandling.h:  enum eType{...};  class UIHandling : public exception { ... UIHandling(eType); template <class T>   UIHandling(eType, T); ... }   Inside another file CompaniesMap I call the second constructor many times using different enums and second variables of different types (double, unsigned int, eType, etc...)  I get the following errors:  1>CompaniesMap.obj : error LNK2019: unresolved external symbol "public: __thiscall UIHandling::UIHandling<double>(enum eType,double)" (??$?0N@UIHandling@@QAE@W4eType@@N@Z) referenced in function __catch$?addCompany@CompaniesMap@@UAEXXZ$2 1>CompaniesMap.obj : error LNK2019: unresolved external symbol "public: __thiscall UIHandling::UIHandling<__int64>(enum eType,__int64)" (??$?0_J@UIHandling@@QAE@W4eType@@_J@Z) referenced in function __catch$?addCompany@CompaniesMap@@UAEXXZ$4 1>CompaniesMap.obj : error LNK2019: unresolved external symbol "public: __thiscall UIHandling::UIHandling<unsigned int>(enum eType,unsigned int)" (??$?0I@UIHandling@@QAE@W4eType@@I@Z) referenced in function __catch$?changeHoldingAmount@CompaniesMap@@UAEXXZ$0 1>CompaniesMap.obj : error LNK2019: unresolved external symbol "public: __thiscall UIHandling::UIHandling<class Date>(enum eType,class Date)" (??$?0VDate@@@UIHandling@@QAE@W4eType@@VDate@@@Z) referenced in function "public: virtual void __thiscall CompaniesMap::postponeExpiryDate(void)" (?postponeExpiryDate@CompaniesMap@@UAEXXZ) 1>D:\Asaf\C\VS\hw5\HW5\Debug\HW5.exe : fatal error LNK1120: 5 unresolved externals   Do I need to define the class itself to be a template? If so than why? If not, why do the errors appear?


Science fiction short story about lost group of mechanics

The main character lives on a sparsely populated world, where everyone goes to school to become mechanics, only they have lost the knowledge of why they are learning, so they are all skilled at something they don't understand  Meanwhile, outside in the rest of the galaxy there are almost no working spaceships, and we follow a new character tasked with finding new ones to salvage she lands on the planet and ends up taking the other character with him in his ship, the guy ends up fixing his ship, I specifically remember him fixing the air conditioner on the ship. The pilot realizes that his side of the Galactic conflict now has a way to fix all of their ships and I think that's where it ends.  I remember reading the story around 2012, but it is most likely from an anthology, possibly from the 80s or 90s


I have proved {(α→β),(β →γ)}  ⊢ (α→γ) } using formal deductions using Modus Ponens and the three axiom of H2 :  A1: A -> (B-> A) A2: (A-> (B->C)) -> ((A-> B) -> ( A -> C))  A3: (( ¬ A) -> ( ¬B)) -> ( B -> A)   However now my professor is asking me to prove :   (1) (α→β) ⊢ (β →γ)→(α→γ) and (2) ⊢ (α→β)->((β →γ)→(α→γ)). I am stuck on it since proving their existence with the deduction theorem is not enough. I must use formal deductions, any help for this ? Thank you


How to read this mathematics value: 10^9

I have this value    How to read that in English? translating from my native language, I would say     Ten base of nine.   but is that really correct?


Is it possible to un-equip power armor frames from NPCs?

I've made my way to Corvega Assembly Plant and have encountered a "Raider Scum" enemy in Power Armor with a Fatman. I've killed him and could loot his power armor parts, as well as everything he had equipped with the exception of his power armor frame which he seems to be wearing still.   I am aware that NPCs can steal power armor frames with an intact fusion core, but is there a way to get frames from (preset) NPCs?


How do i store output of the function into an array

DATA SET file name "demo.txt"  ID|SAL|COL|PER|TAG|GER 1"|"1.11"|"2.22"|"1.1"|"2.2"|D" 2"|"1.234"|"3.234"|"2.2222"|"2.34"|"B" 3"|"1.234"|"35.23"|"3.2"|"2.34"|"A"   I have created a function which will automatically calculate decimal column sum below is the function I am calling that function in main.sh script   demo() { FILE_NAME="$1" COLUMN_NAME="$2"  alpha=( $(awk -F"|" 'NR==1{for(i=1;i<=NF;i++){if ($i ~ /'$COLUMN_NAME'/){print i;}}}' $FILE_NAME) )  for each in "${alpha[@]}" do    awk -F'"?\\|"?' '{T+=$('$each')} END { printf "%.2f\n", T }' $FILE_NAME   done  }   Script : main.sh   #function called in main.sh script   demo demo.txt 'SAL|COL|PER|TAG'   issue is how do i get the output into an array   below is the output i am getting need to store into array1   3.57 40.68 6.52 6.88   second array is this below output getting from another program   array2={3.57 40.68 6.52 6.88}   **so that I can match the array1 with array 2 position value    array1[0] with array2[0]  array1[1] with array2[1]  array1[2] with array2[2]  array1[3] with array2[3]    if all succeed should display success status as YES  i have solution which is partially working ... help me with some solution  so that i can store each value of an array to array1   FILE_NAME="$1" COLUMN_NAME="$2"  alpha=( $(awk -F"|" 'NR==1{for(i=1;i<=NF;i++){if ($i ~ /'$COLUMN_NAME'/){print i;}}}' $FILE_NAME) )  declare -a array=();  for each in "${alpha[@]}" do         #var=($(awk -F'"?\\|"?' '{T+=$('$each')} END { printf "%.2f\n", T }' $FILE_NAME))         mapfile -t array <<< "$(awk -F'"?\\|"?' '{T+=$('$each')} END { printf "%.2f\n", T }' $FILE_NAME)"         #awk -F'"?\\|"?' '{T+=$('$each')} END { printf "%.2f\n", T }' $FILE_NAME done  echo "${array[@]}"


Number of ways to write n as a sum of k nonnegative integers

How many ways can I write a positive integer $n$ as a sum of $k$ nonnegative integers up to commutativity?  For example, I can write $4$ as $0+0+4$, $0+1+3$, $0+2+2$, and $1+1+2$.    I know how to find the number of noncommutative ways to form the sum: Imagine a line of $n+k-1$ positions, where each position can contain either a cat or a divider. If you have $n$ (nameless) cats and $k-1$ dividers, you can split the cats in to $k$ groups by choosing positions for the dividers: $\binom{n+k-1}{k-1}$. The size of each group of cats corresponds to one of the nonnegative integers in the sum.


How to hide "internal" polygon boundaries?

Our task is to draw a lake with a solid outer perimeter line and no lines between internal wetlands, shoals and shallows? 'Tis a relatively straightforward process with Arcinfo coverages and Regions, but alas, that is no longer a viable option for us, the datasets we use now are too large and the lack coverage editing ability in Arcmap crucial. Can  solve our dilemma? Is it possible to create something like the below without resorting to creating (and managing) duplicating, or triplicating, geometries whose sole purpose is better looking maps?    (click through for more detail)  With a feature class: Boundary between river and lake is visible. Keeping them as distinct polygons in one feature class allows a name attribute (the river and laker differ). Elsewhere the heavy line implies a sharp boundary between lake and shallows/intermittent lake, however the actual edge is indeterminate, fluctuating with seasons and high-low water cycles. The line should be implied rather than drawn.  With regions: One geometry, multiple attribute tables, multiple representations.   Outer perimeter (ordinary high water mark) is cleanly delineated No apparent division between lake and river, but they still know which is which Shallow/intermittent waters are symbolized appropriately, with river shallows distinguished from lake shallows.   See  for a map package simulation of what we're trying to achieve and the source arcinfo region coverage from which it is built.


Including name change for transgender person in genealogy

I'm modifying a genealogy (updating an old, written one, that is) which includes a trans man. We will have him listed as male (of course), and will not be recording the (apparent) change in gender (from female).   I'm unsure of how or if to note his name change from a very female-sounding name to a very male-sounding name. This also includes a change of last name.   I'm thinking of doing this in the same way we do other name changes:  "John Smith (nee Ellen Brown)" or something along those lines. This would also not record the year in which the name was changed, which is fine by me. My concern is that this is "dead-naming" him, which is generally looked down upon. The alternative is to not note any change, but I'm afraid that could be confusing to people who don't yet know of the change.   Any expert guidance on how to proceed?


Why would \includegraphics work for a .png but not .eps?

The following displays the .png figure in the pdf but not the .eps figure:  \documentclass[12pt]{article}  \usepackage{graphicx} \usepackage{epstopdf}  \begin{document}  \begin{figure}[htb]     \includegraphics[width=5.0in]{mcs.eps} \end{figure}  \begin{figure}[htb]     \includegraphics[width=5.0in]{Broncos.png} \end{figure}  \end{document}   Space is reserved in the pdf for the .eps figure even though it is not displayed. I am using MikTeX 2.9 and TeXMaker 5.0.4.  Any thoughts would be appreciated.


How can I add a context menu to the Windows Explorer for a Java application?

How would one go about adding a submenu item to the windows explorer context menu (like for example 7-Zip does) for a Java application?


Change name in terminal to something shorter

So on every line in terminal, it leads with something like this:  bs7280@bs7280-Lenovo-IdeaPad-U530-Touch:~/path/to/dir$   is there a way to make this shorter, without all of the useless text out front? so maybe it looks something like this:  bs7280:~/path/to/dir$


I am trying to install a tool called Stacer, to clean junk files from my PC (Ubuntu 20.04 LTS).  The app is installed but everytime is use sudo apt-get update && sudo apt-get upgrade, I get the following error     Ign:11  focal InRelease   Err:12  focal Release     404  Not Found [IP: 2001:67c:1560:8008::15 80]   Reading package lists... Done   E: The repository ' focal Release' does not have a Release file.   N: Updating from such a repository can't be done securely, and is therefore disabled by default.   N: See apt-secure(8) manpage for repository creation and user configuration details.   What should I do?  EDIT 1 The question is not answered at .  They suggest to remove the PPA. But the error message says it is disabled by default. So there might be a way to enable it.


Why does string theory have such a huge landscape?

I was browsing through Foundations of Space and Time, a compilation of essays on various theories of quantum gravity. The following passage in the introduction intrigued me:     Each compactification leads to a different vacuum state.... at least one state should describe our Universe in its entirety.... the enormous number (~10^500 at last count) of solutions, with no perturbative mechanism to select mechanism to select among them, leads some critics to question the predictive power of the theory..Even more worrying is that, while the theory is perturbatively finite order by order, the perturbation series does not seem to converge.   I don't know anything about string theory and so I could not make head or tails this. All I know is that ~$10^{500}$    is a very large number.    What exactly is a 'solution' in string theory? Is it a spacetime metric of some sort or the terms of a S-matrix of some sort?   Why are there so many 'solutions'?  I thought string theory was supposed to be finite, why do perturbative series still diverge? Is there any experimental technique to limit the number of 'solutions'?   Will experimental techniques be able to pinpoint a solution within present day string theorists' lifetimes too? If not, how long will it take before we can experimentally probe these things?  Are string theorists completely relaxed about these issues? Or are they in anguish?


Exploit PHP File Found in /tmp directory

I have been alerted to by our system that a PHP shell has been found in the /tmp directory. Firstly - I would like to know how it could have got here and why it would be here - is there any way PHP can be executed at this level?  Secondly it has somehow been uploaded through a WordPress installation - tracing how this happened won't be easy but does anybody have a general idea how this might have been? There are no public facing upload forms on the site.  Thanks, Chris.


Finding values of $a$ which this system of linear equations has one, no solution, or infinite solutions

Given the following equation: $x+ay -z = 1$ $x+y -az = a$ $2x-4y +2az = -2$ Determine the value of $a$ (if any) for which the system has no solutions. Determine the value of $a$ (if any) for which the system has exactly one solution. Determine the value of $a$ (if any) for which the system has infinitely many solutions And in case the system has infinite solutions, find them So I'd like to put the coefficients of $x,y,z$ into a matrix like the following: $\begin{pmatrix} 1 & a & -1 \\ 1 & 1 & -a \\ 2  & 4 & 2a \end{pmatrix}$ And I want to do this by the method of checking when the determinant not equals to $0$. So I calculate it and got to a place where $(a-1)(-4a-6)$ which means that $1$ or $-3/2$ will zero the determinant. So I realize that if $a$ will be $0$ or $3/2$ then the system has no solutions, but then I don't know how to continue, How do I find out about the unique infinitely soulutions? I guess for unique solution $a$ needs to be not $0$ or $3/2$ but for some reason I can't put it all together..


How do I make a Stack Exchange site without going through the whole Area 51 thing?

I really want an answer for this since I don't know how to make an Stack Exchange site. I want to make one just for myself and my friends and my friends' friends. Is there any way I can do this? I saw something saying that you can make a Stack Exchange for free, but I don't know if that's true.


What's more important in choosing a PhD program, advisor or institution?

In terms of judging a doctoral program--and possibly also relevant for postdoc-ships(?)--which is the more important consideration, who your advisor is or the institution at which you study?  Obviously both are important, but when it comes down to it, which should weigh more heavily?  For example:  Professor Alpha is a premiere name in the field, but he's set up at Southern State University, an otherwise middling school. Perhaps he's there because he's a big fish in a small pond and gets carte blanche and limitless resources to do what he wants. His graduate students are thus treated similarly.  On the other hand, Professor Beta is a new, unproven professor at Top University, a world-renowned, leading institution. He personally may not have the resources and freedom as Professor Alpha, but he's at an institution whose name carries weight. Therefore the school certainly has the capacity for the same, if not more, resources, but access for Professor Beta's grad students will be more limited as they must be shared with other professors' groups.  Assuming all else is equally appealing (funding, location, research topics, etc), which offer do you choose, or which program would you hold in higher regard?  (The situation doesn't have to be so stark as like Harvard vs. Middle-Of-Nowhere University, but it makes the point clearer.)


'Modern' Introduction to or Summary of SUSY and BSM?

The title really says it all. I am looking for a (preferably friendly and compact) modern introductory text on supersymmetry (SUSY) and beyond-the-standard-model (BSM) particle physics.  As a little bit of background, I am a first-year graduate student working on experimental particle physics (ATLAS). I have some exposure to quantum field theory (Mandl & Shaw, a little bit of Schwartz) and am reasonably comfortable with standard-model particle physics (Halzen & Martin, Thomson).  Most of the materials that come up when I search for such books in SUSY and/or BSM seem too mathematical and/or outdated (some written by some of the first developers of the concept). Despite not finding definitive SUSY signatures yet, particle physics has achieved a lot since the first theoretical development of SUSY, and I am somewhat surprised that it is so difficult to find a nice modern summary of the theory and it status.  So, to sum up: I am looking for study material for introduction to SUSY and BSM. In particular, if I were to be picky, I would prefer it is was (a) relatively modern, (b) not too mathematical/theoretical, but more emphasis on phenomenology and searches for them in experiments, and (c) gives some perspectives on the current status of SUSY.  Any recommendation?


I want to create a recursion pseudocode that will executed in O(logn) complexity and i want it to find the lower f(i) < 0 and f[1....n] which f(1) >0 and f(n)<0  prodedure fanc(A[n] , p , q )  //(this is my array,first digit of A ,last digit of A) if A[n/2] >= 0      return fanc(A[n/2] , A[n/2] , A[n-1]) else      return fanc(A[n/2] , A[0] , A[n/2 -1]) if p<q    print p else    print q   I know that somehow i have to end the recursion. Also i would like to know if i am in the correct path and if u have any good thoughts for this problem!    Better text of assignment copied from :     Let an integer function f:{1,2,3...n} be monotonic and defined in {1,2,3...n} and suppose that f(1) > 0 and f(n) < 0. We would like to find the smallest integer i with f(i) < 0. Design an algorithm for this purpose that run in O(logn).


What is the algorithmic complexity of malloc()/free()/new/delete/delete[]?

I would suspect that delete[] is O(n) and the others are O(1), but I want to be sure. Then again, it doesn't seem right that you would get constant time for allocating a variable amount of memory.


Which fits better "more important" or "more importantly"?

Sorry - I always think the question is obvious when plainly it is not.    Should I use "important" or "importantly" in the introductory phase of this sentence:  "Appellant's argument is premature.       More important, the argument lacks merit.   or      More importantly, the argument lacks merit.


How is the price of a magic weapon or armor determined if it's enhanced some more later?

I'm not sure my phrasing is the best so let me try an example;  I have a masterwork dagger (valued at 302 gp) and I decide to get it enhanced with a +1.  That would mean I pay 2,000 gp and the dagger is now worth 2,302 gp.  I now want the dagger to have a total enhancement of +3.  Do I pay the base price of 18,000 gp or the base price minus what I already payed, making it 16,000 gp?  Similarly, let's say I have another masterwork dagger and wish to get a +5 on it right away.  Do I just pay the base price of 50,000 gp?


How to uninstall Viber when apt-get remove fails?

I am trying to uninstall Viber but I can't. This is what happens:  $ sudo apt-get remove viber  Reading package lists... Done Building dependency tree        Reading state information... Done E: The package viber needs to be reinstalled, but I can't find an archive for it.   How can I uninstall Viber successfully?


I want some text to appear as below:    The code I have written for it is :   \begin{landscape} Design Summary (This page shows how to use landscape format in Appendix.)\\ \texttt{---------}\\ Design Summary:\\ Number of errors: 0\\ Number of warnings: 0\\ Logic Utilization:\\ Number of Slice Flip Flops: 3,899 out of 33,280 11\%\\ Number of 4 input LUTs: 3,717 out of 33,280 11\%\\ Logic Distribution:\\ Number of occupied Slices: 2,198 out of 16,640 13\%\\ Number of Slices containing only related logic: 2,198 out of 2,198 100\%\\ Number of Slices containing unrelated logic: 0 out of 2,198 0\%\\ *See NOTES below for an explanation of the effects of unrelated logic.\\ Total Number of 4 input LUTs: 3,890 out of 33,280 11\%\\  \end{landscape}   The output I am getting is as below:    In my output, the word design summary in the 1st line is starting after a couple of spaces. I need it to start from extreme left as can be seen in the 1st picture. Please suggest a solution.


Voldemort was very fluent in Avada Kedavra. He never ever hesitated before using that. Also, there was no thumbs down in using it. Avada Kedavra was quick and effective.  Why didn't Voldemort kill Snape with Avada Kedavra?


How to call an element in an 2D python array

I'm trying to change the value of a certain element in a 2D array. the 2D array is a num1 by num2 matrix with every element as 0. I'm trying to change the Rth row Cth column of the matrix to 1  matrix = [] def make_matrix(num1, num2):     row = []     for i in range(num1):         row.append(0)     for i in range(num2):         matrix.append(row)  def change_to_one(R, C):     matrix[R-1][C-1] = 1  make_matrix(3, 2) change_to_one(2, 1) print(matrix)   it prints [[1, 0, 0], [1, 0, 0]] instead of [[0, 0, 0], [1, 0, 0]]


How to copy 5 newest files from one directory to another and delete the old copies

How can I copy the 5 newest files from a directory to another in a "new to old" order.


Construct a Borel set on R such that it intersect every open interval with non-zero non-"full" measure

This is from problem $8$, Chapter II of Rudin's Real and Complex Analysis.  The problem asks for a Borel set $M$ on $R$, such that for any interval $I$, $M \cap I$ has measure greater than $0$ and less than $m(I)$.  I was thinking of taking the Cantor approach: taking $R$ to be the union of $[a,b]$ with $a$ and $b$ rationals, and for each $[a,b]$ we construct Cantor sets inside it. During theconstruction of each Cantor set, in order to have positive measure on it, we need to take off smaller and smaller intervals from it, namely the proportion goes to $0$. As a result, these Cantor sets are extremely "dense" on their ends. If for an interval $I$ it intersects with the Cantor set on $[a,b]$ while $b-a>>m(I)$, we shall expect the measure of intersection to be rather close to $m(I)$ and then we lose control on these cases.  Is there any way to fix this or shall I consider other approaches?  Thank you


Get location where file is being created

I have some legacy code that creates and writes to a file.  The problem is, I have no idea where this file is being saved to.  I'm trying to write something that will give me the path of where the file is being saved, but I'm failing.  I thought readlink seemed like the best way to go about this, but I can't even get readlink to return the location of my test program:  #include <stdio.h> #include <string.h> #include <unistd.h>  char* savefm(char* savename) {  FILE *tfp; char buf[1024]; ssize_t len;  tfp = fopen(savename,"w"); fprintf(tfp,"Write to file\n");  len = readlink("proc/self/fd", buf, 1023); buf[len]='\0';  if(len == -1)     perror("readlink"); else     printf("The path to this file is: %s\n", buf);      if (tfp == NULL)          return("INVALID");     else          return("VALID"); }  void main(int argc, char *argv[]) {  char *filename; char buf[1024];  ssize_t len = readlink("proc/self/exe", buf, 1023); buf[len]='\0';  if(len == -1)     perror("readlink"); else     printf("The path to this process is: %s\n", buf);  filename = savefm("file1");  if (filename == "VALID")      printf("VALID\n"); else      printf("INVALID\n"); }   And the output is:  readlink: No such file or directory readlink: No such file or directory VALID   This is confusing to me, as  1) The program is printing VALID, meaning the file descriptor was successfully created 2) In my test directory where I'm running this, the file "file1" is created and written to, so I KNOW the file exists, because it's right there.  Any assistance is appreciated, either with fixing readlink or other methods for getting the path of the file.  I'm running Solaris 11.3.


Which one should be the correct term escape speed or escape velocity? In one book it is given Speed whereas in another its velocity.


Google Form can be edited, or not viewed at all - where is the view only option?

I am trying to create a Google Form. I am unfamiliar with Google Forms, but I am familiar with Google Sheets and Docs. I'm having a problem with the form, however.   When I go to the Sharing Settings for the form, and change who has access, the options show up properly. If I select any of the 'on' settings, however, there is no pull-down to select 'can view' as there should be. The only option is 'can edit'. I do not want this option, as then anyone I send the form to can change its structure outright.   Turning the sharing off doesn't work, as placing the link into a different browser (and different Google account) simply returns a message that I don't have permission to view the form. I did some research, and someone said to leave the sharing off and simply get the URL from the 'view live form' button. That button exists only in the old forms, so I switched back to that with the form, clicked the button, got the link, pasted it into the other browser, and was still told I didn't have permission.   I can find nothing in Google about this problem that has worked.   Either I'm doing something wrong or Google Forms are unusable. Is it a bug or am I just missing a step?


Functional Equations and information theory: $f(xy)=f(x)f(y)$ for all $x,y\in[0,1]$

What is the solution of the functional equation $f(xy)=f(x)f(y)$  for all $x$ and $y$ in $I$ where $f$ is a real-valued mapping with domain the unit closed interval $I$?


The book  (page 18) defines the expected value of prediction error as \begin{align}  \operatorname{EPE}(f) &= \operatorname E(Y - f(X))^2\\  & = \int [y - f(x)]^2 \Pr(dx, dy) \end{align} Why is it like above? Why not as below to be consistent with any expected value definition? $$ \operatorname{EPE}(f) = E(Y - f(x))^2 = \iint  [y - f(x)]^2  \Pr(x,y) d(x) d(y)$$ What does $\Pr(dx, dy)$ even mean?


I want to allow the insertion of a hiperlink (like www.google.cl) on a textarea that also can have text (similar to this page when creating a new question). The problem is that I don't know how to allow it, because sending the "a" TAG to the server (running asp.net), the server responds saying that the request is malicious. I was thinking about using encodeURIComponent, but I don't want to allow all HTML posibilites (for security reasons also).  Obviously when getting the information from the server and putting it on a "p" TAG, the hiperlink must work as a hiperlink.  What's the better approach?  Sending information written by the user to the server (example):  $.post({     url: url,     data: {         content: encodeURIComponent($('#textarea_content').val())     } });   Getting information from server and showing it to the user (example):  $.get({     url:url }).done(function(data) {      $('#p_content').text(data); }   NOTE: I don't want to deactivate post validation (validateRequest="false").


The checklist for my Mongolian visa application mentions     Copy of the bio-data page of your current passport (including passport of other nationality)   What's a bio-data page?


Getting error as Mysql: command not found

I am running lampp on linux and trying to access Mysql using command line, but getting error as -bash: mysql: command not found


Where did unicoins and unicorn powers has gone?

yesterday when I visited  and  there was a banner of unicoins in right sidebar     after mining and collecting unicoins I purchased “No downvotes, please” Unicoins power and also got some downvotes on this question   and upvotes on this question  now where all my powers and unicoin has gone? was it a  ?


Selecting a random image from an image array

I have this Image Array which consists of 10 images.  int[] MyArray = new int[10];{     MyArray[0] = R.drawable.a;     MyArray[1] = R.drawable.b;     MyArray[2] = R.drawable.c;     MyArray[3] = R.drawable.d;     MyArray[4] = R.drawable.e;     MyArray[5] = R.drawable.f;     MyArray[6] = R.drawable.g;     MyArray[7] = R.drawable.h;     MyArray[8] = R.drawable.i;     MyArray[9] = R.drawable.j; }   I have an image view in my activity which i want to fill with a random image from the image array. How do I go about doing this, any help?  To view an image from the array in an image view I use this code  ImageView ImgView = (ImageView)findViewById(R.id.imageView); ImgView.setImageResource(MyArray);


I'm trying to understand the core ideas of Python and I've come across to a nice article that explains passing the parameter reference to an object. For instance;  def add_to_list(list_to_add, value):   list_to_add.append(value)   will be able to change the original list_to_add parameter while;  def change_list(list_to_add):   list_to_add = [1, 2, 3, 5]   won't do anything.  I am currently writing a basic linked list print function where it is simply like;  class Node:   def __init__(self, val, next=None):     self.val = val     self.next = next  root = Node(2, Node(3, Node(4, Node(5, Node(6)))))  def print_list(root):   while root:     print root.val,     root = root.next   print ''   And you've guessed it right. It didn't change the root's value. Now my question is how come this happens. Is it because the python classes are immutable?


If $(x_n)$ is an unbounded increasing sequence then $\sum (1-x_n/x_{n+1})$ diverges

Let {$x_n$} be monotone increasing sequence of positive real numbers. Show that if {$x_n$} is unbounded, then $\sum_{n=1}^{\infty}(1-\frac{x_n}{x_{n+1}})$ diverges.


How to fix broken macbook pro retina 2015 key (key cap, clip and little nub are fine)

So the n key on my macbook is broken. There isn't an issue with the key cap or the scissor clip underneath the issue seems to be coming from the little sensor thingy underneath. I was fixing an issue with a different key and made the mistake of taking apart the n key to see how to put the other one back together. Well, now I am left with a broken n key. Is this something I could fix myself, a hardware issue or a software one? I have tried all the other suggestions online about slow keys and enabling mouse keys but nothing is working. After noticing the issue the n key would respond really slowly after being pressed and then the letter n would appear randomly when I typed, but now it isn't functioning at all. Currently typing by using cmd+v to paste the n. Any help would be appreciated, thanks in advance!


How can I make a holographic material in cycles?

I'm talking about those holographic designs you sometimes see on stickers and foil, not free floating holograms. .  I also want this to change colors as real ones do when you rotate them.  I came across  that shows it's possible, but it doesn't list a method.  It's similar to iridescence, . I don't see a clear path from the linked iridescence example to what I want.


We are in the process of creating a web game where username is part of a user profile from the get go. This username will be visible to the user within the main game screen and also in the leader-boards and the profile page for everyone to view.  Since we don't want the username to either be truncated or continue in a second line, what is the optimal solution in regards to the minimum and maximum characters length?  Furthermore, what is the min/max characters for a password? Is there any reason to restrict the user from using as many as he wants?  Been thinking to be able to use alphanumeric characters, periods and underscores for usernames with min/max set to 4-12, but I don t know if there is a best common practice to follow here.  Thanks in advance for your help


If I convert a BezierCircle to mesh from curve, it just disappears

This is the curve I want to turn into a mesh:   This is what the outliner looks like:   Someone on this forum told me to select the BezierCircle, go to Object>Convert to>Mesh from curve  But if I do that, it looks like this:   I've messed around with this thing for literal hours, and I just can't figure it out. All I want is for Blender to turn that handle, into a mesh which I can edit like any other mesh.  This information may also be needed:


Is it possible to install Ubuntu on my iMac OSX 10.8.5?

it's possible to  install Ubuntu on my  iMac OSX 10.8.5....    Do You guys have any tutorial on  because I am a dummy... or somewhere where I can learn.


I have a question about a data analysis that I am running. I am analyzing the results of a survey in which (expectedly) there exists far fewer people in one group than in another. This survey is an Honours project about enhancement drug use, and I have ~40 users and ~590 non-users. Obviously there is a huge difference between the sizes of these groups! I am interested in differences in means on a particular study processes scale. I have the following questions:  Is it a problem to use an ANOVA in this case (where the groups are so different in sample size)? I know that the Levene's test is sensitive to differences in sample size (such that it is far more likely to be significant); and this is the case in my data, p < .05. Regardless, Welch and Brown-Forsythe tests still reveal a statistically significant differences in mean scores on this scale.  Given that the Welch and Brown-Forsythe tests still reveal significant differences between groups, would I be wrong in concluding that these do in fact exist (despite violating the initial Levene's assumption)?  Is there are more robust way to investigate this research question, taking into account the disparity in group sizes?


I read an Theorem that states:     Let $A$ and $B$ be non-empty sets, and let $f:A \to B$ be a function,   then the function $f$ has a right inverse if and only if $f$ is   surjective.   The Theorem proof uses Axiom of Choice. My question is, if Axiom of Choice is not true, then is this Theorem false? My question is because I tried to find a proof that not uses the axiom but I did not found it and this result is very important because it implies, with another statement, that a function $f$ has an inverse if and only if $f$ is bijective.


"I am not pretty sure about what to do" what does PRETTY exact meaning out here?   What places we can use it?


After training the kmeans model, how can i obtain the number of classes of the model? i've tried with get(), getInfo() and doesnt work.      Value that must to be extracted   // STEP 1: Import image we wish to classify var l8 = ee.ImageCollection('LANDSAT/LC08/C01/T1')  // Remove the clouds var cloud_free = ee.Algorithms.Landsat.simpleComposite({   collection: l8.filterDate('2018-01-01', '2018-12-31'),   asFloat: true })  // STEP 2: Draw your box which you will sample from!   // Make the training dataset. var training = cloud_free.sample({   region: geometry,   scale: 30,   numPixels: 5000 });  // Step 3: Create the clusterer and train it, play around with // number of classes var clusterer = ee.Clusterer.wekaKMeans(3).train(training);  print('clusterer',clusterer instanceof ee.ComputedObject);  var to_print = clusterer.getInfo();  print('clusterer_info',clusterer.toString());  print(typeof clusterer);  var clusterer_list = ee.List(clusterer);  print('clusterer_list',clusterer_list);  print(typeof clusterer_list);   //var to_print_2 = clusterer.get('nClusters');  //print(to_print_2);  //var to_print_3 = clusterer.Filter.filterMetadata('nClusters','equals',3);  //print(to_print_3);  // Step 4: Classify our image var classified = cloud_free.cluster(clusterer); print(classified); var cluster_1 = classified.eq(0); print('min',cluster_1);   // Display Map.setCenter(-122.31040963183364, 37.782065864682096, 11) Map.addLayer(classified.randomVisualizer(), {}, 'clusters');


I am not a native speaker and I get confused with the use of the words 'people' and 'they'. Do the following sentences mean the same?        When people heard the news, the bravest volunteers came forward with   help.      When they heard the news, the bravest volunteers came forward with   help.   Can we use 'they' in front of the noun phrase as in the second sentence?


Colored right and left fences in mathmode

I have colored my fences \right( and \left( by grouping my fences into the same scope by following a comment  by @Bardaigorl.   Is there a better way to accomplish my goal of getting the fences the same color?  \documentclass[11pt]{amsart} \usepackage{amsmath,amssymb}  \usepackage{graphicx} \usepackage{tikz}   % Loads the xcolor package.  \newcommand{\N}{\mathbb{N}}  % The natural numbers. \newcommand{\eu}{\ensuremath{\mathrm{e}}}   % The Euler number, `e'. \newcommand{\iu}{\ensuremath{\mathrm{i}}}   % The imaginary unit `i'. \newcommand{\du}{\ensuremath{\mathop{}\!\textnormal{\slshape d}}}   % A slant roman differential operator.  %%% The following redefinition of \textcolor [from stackexchange] preserves the spacing around binary operators in mathmode. \makeatletter \renewcommand*{\@textcolor}[3]{%   \protect\leavevmode   \begingroup     \color#1{#2}#3%   \endgroup } \makeatother  \begin{document} Let's see what we can do with Euler's formula, $\eu^{\vartheta \iu } = \cos{\vartheta} + \iu \sin{\vartheta}$ when we think in terms of a very, very long polynomial, and include appropriate substitutions for each occurrence of $\iu^{n }$ for $n \in \N$.  \[ \eu^{\vartheta \iu } = 1  \textcolor{red}{-} \frac{\vartheta^2}{2!} + \frac{\vartheta^4}{4!}  \textcolor{red}{-} \frac{\vartheta^6 }{6!} + \frac{\vartheta^8}{8!} \textcolor{red}{-} \frac{\vartheta^{10}}{10!}+ \cdots + \textcolor{green!65!black}{\iu} {\color{green!65!black}\left( {\color{black}\vartheta \textcolor{red}{-} \frac{\vartheta^3}{3!} + \frac{\vartheta^5}{5!} \textcolor{red}{-} \frac{\vartheta^7}{7!} + \frac{\vartheta^9}{9!}  \textcolor{red}{-} \frac{\vartheta^{11}}{11!} + \cdots} \right)}. \] \end{document}


How do I stop Windows from installing applications on update?

After installing the Windows Anniversary Update for Windows 10, I realized that there seems to be a feature that lets Microsoft install third-party applications from the Microsoft Store on my system, without my consent or knowledge (for example,  or ).  Anticipating that this might happen again in the future, is there a way to disable these kind of third-party application installations for future updates? Or will I always have to search and uninstall all these applications after each update?


Ubuntu Won't Detect My Operating Sysytem

I want to install Ubuntu 12.04 on my Toshiba Qosmio laptop, that is preinstalled with Windows 8. I would like to install it side-by-side with Windows, not erase Windows 8. However, the installer does not detect any operating system. How can I fix this?  *NOTE: My laptop has two hard drives, could this be the problem? I am booting Ubuntu from a DVD with Ubuntu correctly written to it. I am booting it with secure boot disabled and with the BIOS set to CSM Boot, not UEFI mode. The boot mode is set to boot from DVD drive, but that isn't the problem here. I am sure about all the stuff I just listed above. There is no chance it is wrong.  This is not a duplicate of another question this question  because none of the answers given works for me.  Thanks


Why did the distance requirement for my buddy change?

I noticed that the walking distance has changed from 3km for 1 candy to 0.75km for 1 candy. Is this a new update? Is it a glitch? Is it because I've walked an x amount of km's already?


I have problem and I cant install someone help me packages have unmet dependencies: wine1.6: Depends: wine1.6-i386?

I marked the problem i cant install with ubuntu center and Synaptic i cant repair !!   The following packages have unmet dependencies: wine1.6: Depends: wine1.6-i386 (= 1: 1.6.1-0ubuntu1 PPA1 ~ ~ precise1) but it is not installable E: Unmet dependencies. Try 'apt-get f install' with no packages (or specify a solution).  64 bit 12.04LTS  and tried update to ubuntu 14.04 but I cant update too..


Say I have the following Function  function FooController (){   this.foo = function () {     alert('foo');   } }  FooController.prototype.bar = function () {   alert('bar'); }   Is there a difference between these two syntaxes? Why would I use one over the other? Is there a performance hit?


Is there a way of shuffling the questions (not only the answers) using eqexam?


Through watching a tutorial on how to calibrate blender's 3d camera to a 2d picture, I learned that we could use the Blam addon.  The tutorial said to get into "movie clip editor", import the 2d image, add a new grease pencil layer, then draw out lines to represent perspective lines...  I'm not able to find the grease pencil tool and new layer in movie clip editor.  Please see screen shot.How do I access grease pencil in movie clip editor?  Good tutorial links on calibrating 3d camera to 2d pictures are welcome, too.  Thanks!


What can be P(0), when $P(x^2+1)=(P(x))^2+1$ and P(x) is polynomial?

What can be $P(0)$, when $P(x^2+1)=(P(x))^2+1$ and $P(x)$ is polynomial?  Let $P(0)=0$, then $P(1)=1$, $P(2)=2$, $P(5)=5$, $P(26)=26$, $P(677)=677$ ... and so on. Then $P(x)=x$, because all the points on $y=P(x)$ are $y=x$.  If $P(0)=2$, then $P(x)=(x^2+1)^2+1$ for the same reason.  But when $P(0)=3$, we have that $\lim_{x→∞}\log_xP(x)$ does not converge into an integer. So I think $P(x)$ cannot be a polynomial.  Then what are the values of $P(0)$ that makes $P(x)$ polynomial?


Completely ignoring the sexist aspect of the word, is using "he" as a gender neutral pronoun grammatically correct or incorrect? I'm well aware that using "he" may come off as sexist or politically incorrect and that it's better to use "they" but grammatically is it correct?


Given $a \in \{1,2,...,250\}$ and $b \in \{0,1,...,1000\}$  $a$ and $b$ are chosen randomly, how does one calculate the probability of $a > b$?


The sentence below often appears in a "blank" page of books.  "This Page Intentionally Left Blank"  Why there's no linking verb after the subject (Page)? e.g.:  This Page Was Intentionally Left Blank   If the adverb in the original sentence is removed, we only have:  This Page Left Blank  So I wonder why the original sentence without a linking verb often appears in books. Is it not odd without a linking verb? Based on my understanding of the original sentence, it means that the page left itself blank, which is odd for me. Hope to get some clarifications about this.


Enable thumbnail preview when uploading files in Google Chrome/Firefox?

I have google chrome and when I upload photos to Facebook or Imageshack I cannot find a way to show thumbnails, only detail view. I also tried this in Firefox. This is quite important as it is stopping my friend from switching to Ubuntu over Windows.  Included a picture of the File Upload window, how do I  change this to a thumbnail view rather than the current list?


Solving an integral with substitution method

I want a hint for the following integral: $$\int \frac{dx}{x^{2}\sqrt{1- a^{2}+x^{2}}}$$ where $a$ is a real constant.  In fact,  $$\int \frac{dx}{x^{2}\sqrt{1- a^{2}+x^{2}}} = -\frac{\sqrt{1- a^{2}+x^{2}}}{x(1- a^{2})}$$ why?


Showing that the geodesics in hyperbolic upper half-plane model are half circles

I am currently working on some differential geometry and I came across the following question.     Let $H = \{(x,y)\in \mathbb{R}^2|y>0\}$, this is the hyperbolic plane (the upper half-plane model). The first fundamental form is   $$ \frac{dx^2+dy^2}{y^2}. $$   Write down the geodesic equation of the hyperbolic plane and show that geodesics in $H$ are either straight lines with constant $x$ or a half circle with center on the $x$-axis.   I have found that the geodesic equations are $$ \frac{d}{dt}\bigg[ \frac{\overset{.}{x}}{y^2} \bigg] =0 $$ $$ \frac{d}{dt}\bigg[ \frac{\overset{.}{y}}{y^2} \bigg] = \frac{-1}{y^3}(\overset{.}{x}^2+\overset{.}{y}^2). $$  From this its easy to see that $\overset{.}{x} = Cy^2$ for some constant $C$, and so if $C=0$ we find the straight-line solutions. However I am struggling to show that there are also circular solutions. Using the second geodesic equation I am also able to show that  $$ \overset{..}{y} = \frac{\overset{.}{y}^2}{y}-\frac{\overset{.}{x}^2}{y}. $$   However I have not been able to make any more progress after this.


OK, very basic question here.  I read lots of books, searched quite a bit, and every description I read seemed to talk about the flow of electrons and right away go too deep in theory for me to grasp the basic principle of their use.  I understand a resistor limits the "flow", so that an LED doesn't blow up for example. But I fail to understand exactly what a resistor does to current and voltage...  Do resistors affect both current and voltage? In what manner?


How to match a self repeating pattern using regex

I’m wondering if it’s possible to use regex to find all occurrences of a repeating string in another string  For a simple example find aaa in aaaaaaaaaaaaaaa   If I’ve counted properly it happens 13 times so an answer that finds 13 rather than 5 occourances would be good.   Another example   abcabc in abcabcabcabc where it repeats 3 times


Prove/Disprove: For any sets $X$ and $Y$, $\overline{X\cap Y} = \bar{X}\cup\bar{Y}$  Extra question in my proofs homework, similar to another question I posted, but not exactly the same I don't think. How would I start with this?


Transitioning to Ubuntu - Complete Newbie

I just wanted to ask on what would you recommend. I am casual Windows user and I plan on transitioning to Linux, based on what I've read so far it seems that Ubuntu is a good fit however what I'm planning to do is try it out on my old laptop first, and by old I mean very old, here's the specs of the laptop:  CPU: Intel Celeron M 440 1.86 GHz, RAM: 2gb ddr2 Video: Intel Graphics Media Accelerator 950  I was wondering on whether what is the best that this laptop can handle. I initially tried to install it using Wubi? I installed the 14.04.6 32-bit but whenever I tried to boot it it goes directly to grub command prompt, I've read on some sources that a reboot should it fix it but to no avail it doesn't so I'm wondering if I did something wrong or is there an incompatibility with Ubuntu and my hardware,  Thanks!


Singular or plural verb with two subjects

Possible Duplicate:          I'm writing an interrogative sentence questioning someone else's writing:  "Is grammar and spelling correct?"  Can I use the singular verb "is" or must it be the plural verb "are"?  (The sentence is one of a list of interrogative questions about the quality of writing, e.g. "Are words in the right order?" "Does the copy flow?")


Do disconnected complex lie groups exist?

Is it possible for a complex Lie group to be disconnected? What about a compact complex Lie group?


Unique random Generator from a given set of values

I had previously asked for a random number generator from within a range(), say 1-40, but this time around I am looking for a way in which a list of "unique" numbers is randomly generated from  a given set of values eg. 1,45, 23, 90, 23 etc.  Also, in the previous question, the program seems to generate the same random values every time it is executed and not saved.


Good day, it seems easy but I still find it difficult to understand why we return to the same spot when we jump despite the Earth revolving beneath us. Can someone explain?


I know how to check , but is there a way to tell if a site is built with Drupal 7?


Can magnetic fields be redirected and focused at one point?

I know that magnetic fields can be redirected, but... given a situation where you have static magnetic field over a large area, and you want to quickly change the magnetic field strength. Is it feasible to redirect nearby fields and curve the field towards a single point, thus increasing flux density and strength?  the answer with the cone is great and all but are there any alternatives?