How to get a value from Error message?
Is it possible to assign numbers generated in an Error-Message?
AC: Why differentiate between Ground and Neutral? Current flows through a conductor connecting points at different potentials.  Leaving aside multi-phase details, common/conventional AC systems use a 3-wire setup:   Wire-1: a line/live/hot/phase wire presenting a point that oscillates between 2 potentials. Wire-2: a neutral wire presenting a point of unknown/unspecified and varying potential, that nevertheless presents some fixed/specified potential difference to Wire-1 at least some of the time. Wire-3: a ground/earth wire presenting a point at 0V potential difference to its immediate physical surroundings.   Wire-1 and Wire-2, in addition to some device that is to be powered, are used to construct a closed electrical circuit. Wire-3, leaving aside EMI/shielding concerns, is used to ensure that current will flow through it, rather than the device's user, if there ever occur any faults and the device's user comes in contact with Wire-1 or Wire-2.  Additionally to this however, Wire-2 and Wire-3 are at some point connected. This is done to ensure that Wire-2's potential remains close to that of Wire-3 .. which seems to be important for some reason.  Now the part I don't understand is why there needs to be a distinction between Wire-2 and Wire-3 at the power socket, if there is none a few meters further down the line.  I have tried to look this up, but all answers I could find so far seem incomplete. The answers depend on how the question is phrased:   If the question is phrased as "Why do we need Wire-3 in addition to Wire-2" the answer is because "Wire-2 may be at a substantial potential difference to its surroundings/user and thus endanger him/her if he/she ever comes in contact with it or Wire-1". If the question is phrased as "Why do we need Wire-2 in addition to Wire-3" the answer is because "Wire-2 is needed to form a closed electrical circuit" or phrased somewhat differently "Wire-2 is needed to create a potential difference to Wire-1 and thus for current to flow" .. with the argument further being that when taking practical considerations into account Wire-3 can't provide a reliable/stable potential difference to Wire-1 like Wire-2 can.   This doesn't really answer why there's a need to differentiate between Wire-2/Wire-3 though, considering how    Wire-3 remains Wire-3 and maintains 0V potential difference to its surroundings/user, regardless of whatever else happens around it .. since that is what it's supposed to do, or phrased differently, since that is the reason for Wire-3 being useful in the first place .. right?   and   Wire-2 is connected to Wire-3   What am I missing here?    Why is it safe to touch Wire-3 but not Wire-2, or why can Wire-3 provide a level of protection that Wire-2 can't?  Why differentiate between Wire-2 and Wire-3 at the power socket but then connect them further down the line? Using Iterator with ModelBuilder for clipping and splitting in ArcMap? For which values of $a$ does $a-2 \mid a^3+4$ I have to figure out a way to count how many sequences are there s.t:   My alphabet is $1$ up to $49$. Each number that is chosen, is chosen only once. The sequence is $6$ digits long. The sequence is in increasing order.  e.g that is a valid sequence: $(1, 2, 40, 42, 43, 49)$  and this is not: $(1, 2, 40, 25, 25, 12)$   I know that for the first 3 rules the answer is: $\binom{49}{6}\cdot 6!$  How do I deal with the fourth? How do I identify SMD components? (or how do I identify any component) KKT points and nonlinear optimality (theory) I have some questions about Karush Kuhn Tucker conditions. I am not clear about the theory. There are plenty of theorems and I am confused with it. Let us say we have the following problem: We have a general problem, not a convex problem. $$\min f(x)\\g_{j}(x)\le 0,\forall j\in J\\h_{k}(x)=0,\forall k \in K. $$ I will solve it.....Lagrange function, verifying primal feasibility, dual feasibility and complementary slackness and I will get some KKT points. Now what is the conclusion?  If I get no KKT point, can I say that the problem has no solution or what is the conclusion? If I get only one KKT point, is it a local minimum or even a global minimum? If I get more KKT points, what is the conclusion? In which case I will verify SOSC condition? If I get more KKT points or even for one point is it necessary? And the conclusion is what? The KKT points which satisfies the SOSC condition are strick local minimum and the poins which does not satisfy it are not the solution of the problem?  I am so sorry for so many questions, but any help would be very appreciated. Thank you very much in advance. On September 29th, I created the  tag for  Today, while checking the tag description, I saw that the  seems to be .  Why is that? Why has the Community user "stolen" the spot as author of the tag? Sum of a Hyper-geometric series. (NBHM 2011) How to find the sum of the following series $$\frac{1}{5} - \frac{1\cdot 4}{5\cdot 10} + \frac{1\cdot 4\cdot 7}{5\cdot 10\cdot 15} - \dots\,.?$$  I have no idea. I have written the general term and tested its convergence by Gauss' test for convergence, but they are neither the question nor the answer. How many Shutter Clicks on a New Camera considered normal?    I purchased a quotes new Nikon D750 and checked the shutter count and it has 264 Shutter Clik count on it.    Is that suspect of a returned purchase or used camera? Show that $\lim_{x \to +\infty}\left(f(x)+f'(x)\right)=0 \Rightarrow \lim_{x \to +\infty} f(x)=0$ How to show that $\lim_{x \to +\infty}(f(x)+f'(x))=0 $ implies $\lim_{x \to +\infty} f(x)=0$? etoolbox and tabularx -- problem with `appto` I'm trying to print worksheets. I have already implemented an automatic numbering for subtasks. I use tabularx for my subtasks (see the MWE below).  Yesterday, I tried to define a new macro called \task that has one optional argument which is the amount of points you can obtain for this particular question. I would like these optional arguments to be gathered with etoolbox's \appto command so that I can print them with my \credits command.  So far, this seems to be ind of struggling as tabularx is working on the tables several times. Every time tabularx calculates the width of X columns the points are appended to \credits which leads to an incorrect list of points.  Is there any way I can solve this problem? I'm currently stucked with this issue.  Plus, I don't know why my \task command does work. Why is the counter subtask not affected by tabularx's several trials?  \documentclass{scrartcl}  \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}  \usepackage{etoolbox} \usepackage{booktabs} \usepackage{ltablex} \usepackage{xifthen}  \def\credits{} \newcounter{subtask} \setcounter{subtask}{1} \renewcommand{\thesubtask}{\alph{subtask})} \newcommand{\task}[1][]{%     \ifthenelse{\isempty{#1}}{%         \thesubtask%         \stepcounter{subtask}%     }{%         \thesubtask%         \gappto\credits{(#1)}%         \stepcounter{subtask}%     }% }  \begin{document} \begin{tabularx}{\linewidth}[l]{l@{\hspace*{1ex}}X}     \task[1]    &amp;   TEXT1\\     \task       &amp;   TEXT2\\     \task[3]    &amp;   TEXT3 \end{tabularx} \credits \end{document}       The solution given by David Carlisle below causes a table that is too wide. How can this be undone?  \documentclass{scrartcl}  \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}  \usepackage[a6paper, showframe=true]{geometry}  \usepackage{etoolbox} \usepackage{booktabs} \usepackage{ltablex} \usepackage{xifthen}  \def\credits{} \newcounter{subtask} \setcounter{subtask}{1} \renewcommand{\thesubtask}{\alph{subtask})} \makeatletter \newcommand{\task}[1][]{%     \ifx\hfuzz\@tempdima% %   % tabularx trial do nothing     \else%         \ifthenelse{\isempty{#1}}{%             \thesubtask%             \stepcounter{subtask}%         }{%             \thesubtask%                 \gappto\credits{(#1 BE)\\}%             \stepcounter{subtask}%         }%     \fi } \makeatother   \begin{document}  \begin{tabularx}{\linewidth}[l]{l@{\hspace*{1ex}}X}     \task[1]    &amp;   Some longer text that exceedes the line width.\\     \task[4]    &amp;   TEXT2\\     \task[3]    &amp;   TEXT3 \end{tabularx} \credits  \end{document} Standard deviation of binned observations I have a dataset of sample observations, stored as counts within range bins. e.g.:  min/max  count 40/44    1 45/49    2 50/54    3 55/59    4 70/74    1   Now, finding an estimate of the average from this is pretty straight forward.  Simply use the mean (or median) of each range bin as the observation and the count as a weight and find the weighted average:  $$\bar{x}^* = \frac{1}{\sum_{i=1}^N w_i} \sum_{i=1}^N w_ix_i$$  For my test case, this gives me 53.82.  My question now is, what's the correct method of finding the standard deviation (or variance)?  Through my searching, I've found several answers, but I'm unsure which, if any, is actually appropriate for my dataset.  I was able to find the following formula both  and .  $$s^{2*} = \frac{ \sum_{i=1}^N w_i (x_i - \bar{x}^*)^2 }{ \frac{(M-1)}{M} \sum_{i=1}^N w_i }$$  Which gives a standard deviation of 8.35 for my test case.  However, the Wikipedia article on  gives both the formula:  $$s^{2*} = \frac{ \sum_{i=1}^N w_i}{(\sum_{i=1}^N w_i)^2 - \sum_{i=1}^N w_i^2} \sum_{i=1}^N w_i(x_i-\bar{x}^*)^2$$  and  $$s^{2*} = \frac{1}{(\sum_{i=1}^N w_i) - 1} \sum_{i=1}^N w_i(x_i-\bar{x}^*)^2$$  Which give standard deviations of 8.66 and 7.83, respectively, for my test case.  Update  Thanks to @whuber who suggested looking into Sheppard's Corrections, and your helpful comments related to them.  Unfortunately, I'm having a difficult time understanding the resources I can find about it (and I can't find any good examples).  To recap though, I understand that the following is a biased estimate of variance:  $$s^{2*} = \frac{1}{\sum_{i=1}^N w_i} \sum_{i=1}^N w_i(x_i-\bar{x}^*)^2$$  I also understand that most standard corrections for the bias are for direct random samples of a normal distribution.  Therefore, I see two potential issues for me:   These are binned random samples (which, I'm pretty sure, is where Sheppard's Corrections come in.)  It's unknown whether or not the data is for a normal distribution (thus I'm assuming not, which, I'm pretty sure, invalidates Sheppard's Corrections.)   So, my updated question is; What's the appropriate method for handling the bias imposed by the "simple" weighted standard deviation/variance formula on a non-normal distribution? Most specifically with regards to binned data.  Note: I'm using the following terms:     $s^{2*}$ is the weighted variance   $N$ is the number of observations.  (i.e. the number of bins) $M$ is the number of nonzero weights.  (i.e. the number of bins with counts) $w_i$ are the weights  (i.e. the counts) $x_i$ are the observations.  (i.e. the bin means) $\bar{x}^*$ is the weighted mean. Foreign key constraints failures Given the following tables:  CREATE TABLE `longdescs` (   `comment_id` int(11) NOT NULL AUTO_INCREMENT,   `bug_id` mediumint(9) NOT NULL,   `who` mediumint(9) NOT NULL,   `bug_when` datetime NOT NULL,   `work_time` decimal(7,2) NOT NULL DEFAULT '0.00',   `thetext` mediumtext NOT NULL,   `isprivate` tinyint(4) NOT NULL DEFAULT '0',   `already_wrapped` tinyint(4) NOT NULL DEFAULT '0',   `type` smallint(6) NOT NULL DEFAULT '0',   `extra_data` varchar(255) DEFAULT NULL,   PRIMARY KEY (`comment_id`),   KEY `longdescs_bug_id_idx` (`bug_id`),   KEY `longdescs_who_idx` (`who`,`bug_id`),   KEY `longdescs_bug_when_idx` (`bug_when`),   KEY `comment_id` (`comment_id`),   CONSTRAINT `fk_longdescs_bug_id_bugs_bug_id` FOREIGN KEY (`bug_id`) REFERENCES `bugs` (`bug_id`) ON DELETE CASCADE ON UPDATE CASCADE,   CONSTRAINT `fk_longdescs_who_profiles_userid` FOREIGN KEY (`who`) REFERENCES `profiles` (`userid`) ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=82727 DEFAULT CHARSET=utf8  CREATE TABLE `trace` (   `id` mediumint(9) NOT NULL AUTO_INCREMENT,   `comment_id` mediumint(9) NOT NULL,   `type` varchar(255) NOT NULL,   `short_hash` char(22) DEFAULT NULL,   `stack_hash` char(22) DEFAULT NULL,   `trace_text` mediumtext NOT NULL,   `quality` double NOT NULL,   PRIMARY KEY (`id`),   UNIQUE KEY `trace_comment_id_idx` (`comment_id`),   KEY `trace_short_hash_idx` (`short_hash`),   KEY `trace_stack_hash_idx` (`stack_hash`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8  ALTER TABLE trace ADD CONSTRAINT `fk_trace_comment_id_longdescs_comment_id` FOREIGN KEY (`comment_id`) REFERENCES `longdescs`(`comment_id`) ON UPDATE CASCADE ON DELETE CASCADE; ERROR 1005 (HY000): Can't create table 'bugs4.#sql-4bb_6f1d' (errno: 150)   MariaDB [bugs4]> show warnings;  | Level  | Code | Message | | Warning |  150 | Create table 'bugs4/#sql-4bb_6f1d' with foreign key     constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns.  | | Error   | 1005 | Can't create table 'bugs4.#sql-4bb_6f1d' (errno: 150)                                                                                                                       |   Any idea why I get that error? FYI I looked it up and it appears that it was a bug but not anymore. Are delphi variables initialized with a value by default? I'm new to Delphi, and I've been running some tests to see what object variables and stack variables are initialized to by default:  TInstanceVariables = class   fBoolean: boolean; // always starts off as false   fInteger: integer; // always starts off as zero   fObject: TObject; // always starts off as nil end;   This is the behaviour I'm used to from other languages, but I'm wondering if it's safe to rely on it in Delphi?  For example, I'm wondering if it might depend on a compiler setting, or perhaps work differently on different machines.  Is it normal to rely on default initialized values for objects, or do you explicitly set all instance variables in the constructor?  As for stack (procedure-level) variables, my tests are showing that unitialized booleans are true, unitialized integers are 2129993264, and uninialized objects are just invalid pointers (i.e. not nil).  I'm guessing the norm is to always set procedure-level variables before accessing them? Prove that the set of palindromes are not regular languages using the pumping lemma. Firstly I pick a language $xyz$ where $x = \epsilon$, $y = (abb)^{k}$, $z = (bba)^{k}$ where $|y| \ge$ the number of states in the automaton representing my language. Then $xyz = (abb)^k(bba)^k$ is a palindrome.  Now I split $y$ into $uvw$, where $v \ne \epsilon$ contains a state visited more  than once. If the language is regular then $xuv^iwz$ is within the language $\forall i \ge 0$.  I choose $i = 2$, then $uv^2w = (abb)^n$ where $n &gt; k$.  Then $xuv^2wz = (abb)^n(bba)^k$ where $n &gt; k$, which is not a palindrome.   Firstly, is my reasoning for this particular proof correct?  I'm unsure about how to properly apply the pumping lemma to this problem. And secondly the question asks me to state a proof for palindromes in general, whereas I only attempted to prove it for a single case. Is there an example I can choose which proves the conjecture for all palindromes? I assume not, seeing as I can't think of how that could be represented using regular expressions. Explanation for "emails"? leaflet geojson coordinate problem I just started to play with leflet/geojson a little. But my coordinates are not rendered properly and I have no clue what is going on.  My coordinates are: 52.23943, 4.97599. They work correct with the setView function.  var map = L.map('leaflet_map').setView([52.23943, 4.97599], 15);   But using a geojasonFeature they are, hmmm, 'projected', somewhere east of Somalia.  var geojsonFeature = {             "type": "Feature",             "properties": {             "name": "Coors Field",             "amenity": "Baseball Stadium",             "popupContent": "This is where the Rockies play!"             },             "geometry": {                 "type": "Point",                 "coordinates": [52.23943, 4.97599]             }         };         var myLayer = L.geoJson().addTo(map);         myLayer.addData(geojsonFeature).bindPopup("I am a gjson point.");   Anyone who knows what is happening here?  EDIT  Out of pure curiosity I changed the coordinates around [4.976143930893815,52.23925499011473] and the point appears at its correct location. A known bug!? $C(n,p)$: even or odd? Linux - Help, I'm running out of inodes! Is there a way to calculate the improper integral $\int_0^\infty \big(\frac{\ln x}{x - 1}\big)^2 dx$?  What have I tried:  $$\int_0^\infty \Big(\frac{\ln x}{x - 1}\Big)^2 dx = \int_0^1 \Big(\frac{\ln x}{x - 1}\Big)^2 dx + \int_1^\infty \Big(\frac{\ln x}{x - 1}\Big)^2 dx = \int_1^\infty \Big(\frac{\ln x}{x - 1}\Big)^2dx + \int_1^\infty\Big(\frac{\ln t}{\big(\frac{1}{t} - 1\big)t}\Big)^2dt = 2\int_1^\infty \Big(\frac{\ln x}{x - 1}\Big)^2dx$$  From the above statement we can conclude, that the integral does indeed converge, as $0 \leq (\frac{\ln x}{x - 1})^2 \leq \frac{C}{(x - 1)^{\frac{3}{2}}}$, for some constant $C$. However, this new form of the integral is not much helpful in finding its exact value.  I also tried substituting $z = \ln x$ , then $dz = \frac{dx}{x}$. Then the integral becomes reduced to $2\int_{0}^{\infty} \frac{z^2}{e^z(e^z - 1)^2}dz$, which, unfortunately, also does not seem to be any easier.