Template class definition inside C++ library
Why can templates only be implemented in the header file?
Which parsers are available for parsing C# code?  I'm looking for a C# parser that can be used in C# and give me access to line and file informations about each artefact of the analysed code. Do we say "-1 thing" or "-1 things"?  I am interested in both      two things minus one thing(s)    and      minus/negative one thing(s) How can I gzip standard in to a file and also print standard in to standard out? I want to execute a command, have the output of that command get gzip'd on the fly, and also echo/tee out the output of that command. i.e., something like: echo &quot;hey hey, we're the monkees&quot; | gzip --stdout &gt; my_log.gz  Except when the line executes, I want to see this on standard out: hey hey, we're the monkees How can you prove that the normal equations: $(X^TX)\beta = X^TY$ have one or more solutions without the assumption that X is invertible?  My only guess is that it has something to do with generalized inverse, but I am totally lost. How do I show a function on 2-adic units is continuous (using the 2-adic metric)?   I'd be happy to learn the general rule or definition. But in particular I need to show that $f(x)=\dfrac{3x+1}{2^{v_2(3x+1)}}$ is continuous at all odd numbers.  Since the function is isometric in $\lvert\cdot\rvert_2$, i.e. since $\lvert f(x)\rvert_2=\lvert x\rvert_2$ every orbit of the function is duplicated, multiplied by any power of $2$.  This can therefore be formulated in various ways; as a function though the odd numbers, through the dyadic rationals, but the following seems good to work with.  If we let $n$ be a positive integer and $k$ be the power of $2$ we can define:  $f(2^k(2n+1))=(3(2n+1)+1)\cdot2^k\cdot\lvert3(2n+1)+1\rvert_2$  So $f(2^k(2n+1)=(3n+2)\times2^k\times\lvert3n+2\rvert_2$  Here is what I have so far:  I think to prove continuity in the 2-adic metric I need $\lvert x_n-x\rvert_2=0\implies\lvert f(x_n)-f(x)\rvert_2=0$  I think $k$ and $n$ are independent so I think I can examine them independently.  Taking $k$ to infinity brings both $x$ and $f(x)$ to zero so that seems to satisfies the continuity requirement.  Moving on to $n$; this seems to be an exercise in proving convergence within odd integers which are in a sense a subset of the 2-adic units.  I know all Cauchy sequences in these converge to 2-adic units but not much more than that.  However I do have a little insight into this particular function.  For example if we examine the inputs $x$ which map to any given output of $f(x)$, it can fairly easily be shown that these $x$'s take the form of a set $\left\{4^mp+\dfrac{4^m-1}{3}:m,n\in\mathbb{N}\right\}$ so, at least for any given output $f(x)$ the inputs always converge to $x=\frac{-1}{3}$ as the intervals between them become large powers of $2$.  In fact the orbit of the function $a(2^kx)=2^k(4x+1)$ on variation of $x$ and holding $k$ fixed is in a sense orthogonal to $f(x)$; which is a restatement of the above except not in closed form. Let $G$ a group with normal subgroups $M,N$ such that $M\cap N=\{e\}$.   i) Show that for every $m\in M$ and for every $n\in N$, $mn=nm$.   ii) If $G$ is generated by $M\cup N$ then $G\cong M \times N$.   This is an homework question for abstract algebra. I think I can prove $i)$. But I have no idea how to prove $ii)$. Can anybody give me a hint for this one ?    Here my proof for i): Let $n \in N$ and let $m\in M$. Let $x=mnm^{-1}n^{-1}$. As $N$ is normal subgroup, $mnm^{-1} \in N$. Therefore $x \in N$.  As $M$ is normal subgroup , $nmn^{-1} \in M$. Since $m\in M$, then $x=m(nm^{-1}n^{-1})\in M$. This implies that $c\in M \cap N$, then $c\in \{e\}$, then $c=e$, and we get $mn=nm$. INT(5) vs SMALLINT(5): numbers in parenthesis after the numeric type It seems common that PBX and other telephone hardware use a positive-ground power supply, where the "hot" line is at -48v.  What's the reason for that? Something very odd is happening here.   I have a query that looks like this.  SELECT CAST(FT.DOP AS SMALLINT) FROM TRACKING_DATA WHERE date &gt; @mydate and identifier = 0000000000   When run as a raw query it returns data just fine.  When i place it in a stored procedure that alters the where clause it throws this error.  Msg 244, Level 16, State 2, Procedure myprocedure, Line 107 [Batch Start Line 2] The conversion of the varchar value '58629' overflowed an INT2 column. Use a larger integer column.   So here is the oddity. I go through all the possible data for that where clause with a query like this.  SELECT DISTINCT DOP FROM TRACKING_DATA where identifier = 000000000000   and  SELECT DISTINCT CAST(DOP AS smallint) FROM TRACKING_DATA where identifier = 000000000000   And this is what i get back.  17 12 9 19 8 14 6 16 11 13 7 10 0 18 5 15 4   Nowhere does it have anything remotely too large for a SMALLINT. So i thought, ok maybe its a non-printable ASCII character. But i can't find any.  I'm a little perplexed at the moment. It runs find as a raw query, explodes as a procedure and all possible data based on the where is valid. My only suspicion is that the query plan is doing something odd with filtering or maybe runs with different validation when run as a procedure. Using "nor" in a list without "neither" I don't understand this. These identities are given in the online notes for MIT's 18.01 calculus class. It's related to taking the sum of two trig functions and transforming them into a single trig function. I can use the formulas to do this, but I am having trouble finding anything on the internet to use a proof for my understanding.  Thanks for any responses!  EDITED (added after the first answer):  Sorry, the identity goes like this:  $A\sin{k(x-c)}=a\sin{kx}+b\cos{kx}$ ,  with the relationships  $a=A\cos{kc}$ , $b=-A\sin{kc}$ , $A=\sqrt{a^2+b^2}$ , and $\tan{kc}=-b/a$ What color are Nissa, Worldwaker's lands? simple process builder failing with error "failed to access the value for variable because it hasn't been set or assigned" Note: This error might look like a familiar error but the   resolution mentioned in the  is not working in the below case and I am not sure why, hence posting this question.   Problem description:   I have a process builder on case object set to fire for every time new record is created. Criteria is set to 'Formula evaluates to True' with below formula: AND(NOT(ISBLANK([Case].AccountId)),ISPICKVAL([Case].Account.Active__c,'Yes')) With immediate action set to update custom field on the Case object. Custom field Active__c on the Account object is type picklist with two possible values 'yes' and 'no'.   Screenshots of the process builder:        Creating a case as shown in the below screenshot with very minimal details and especially not populating account details:    Throws below error:     The flow failed to access the value for   myVariable_current.Account.Active__c because it hasn't been set or   assigned.   Relevant data from log file:     22:14:31.0 (12479016)|WF_FLOW_ACTION_BEGIN|09L370000000FEJ 22:14:31.13   (13607478)|FLOW_CREATE_INTERVIEW_BEGIN|00D37000000H8hr|300370000008ZTl|301370000004weE   22:14:31.13   (15394571)|FLOW_CREATE_INTERVIEW_END|5525dfa7819c33f438ce3cef9b6c15c668d8ff2-3d11|Test   22:14:31.15 (15820974)|FLOW_START_INTERVIEWS_BEGIN|1 22:14:31.15   (16674702)|FLOW_START_INTERVIEW_BEGIN|5525dfa7819c33f438ce3cef9b6c15c668d8ff2-3d11|Test   22:14:31.15 (35470120)|FLOW_ELEMENT_ERROR|The flow failed to access   the value for myVariable_current.Account.Active__c because it hasn't   been set or assigned.|| 22:14:31.15   (35479812)|FLOW_START_INTERVIEW_END|5525dfa7819c33f438ce3cef9b6c15c668d8ff2-3d11|Test 22:14:31.15 (35517783)|FLOW_START_INTERVIEWS_END|Interview error.   Aborting all.|5525dfa7819c33f438ce3cef9b6c15c668d8ff2-3d11|Test   22:14:31.15 (35528335)|FLOW_START_INTERVIEWS_END|1 22:14:31.0   (35588898)|WF_FLOW_ACTION_ERROR|09L370000000FEJ|300370000008ZTl|Error   executing flow: test, FlowDefId: 300370000008ZTl, FlowVersionId:   301370000004weE 22:14:31.0   (35612585)|WF_FLOW_ACTION_ERROR_DETAIL|An unhandled fault has   occurred in this flowAn unhandled fault has occurred while   processing the flow.  Please contact your system administrator for   more information. 22:14:31.0   (35683203)|WF_FLOW_ACTION_END|09L370000000FEJ   URL to the complete debug log :  (Note: You can see from the log that there are no other workflow rules or triggers on the case object).  My analysis: When the first condition inside the AND expression is evaluating as false, why is it trying to evaluating the second condition to check the custom field on the Account object? It shouldn't right?  Any help?  EDIT: I am looking to solve this using option 'Formula Evaluates to True' only because I have other complex criteria like checking the day(Mon vs Tue and etc) of the case creation. How can I connect two different DC power sources together? How can I connecting two different DC power sources together? for example 15Vdc(5Amp) with 5Vdc(2Amp). I want to make one DC source (20Vdc,7Amp) by more powerful supplies. I would like to parse a string such as p1=6&amp;p2=7&amp;p3=8 into a NameValueCollection.  What is the most elegant way of doing this when you don't have access to the Page.Request object? Consider:  I need to do this. I need do this.  My English grammar knowledge tells me that &quot;need&quot; doesn't have the same status as the modal verbs &quot;may&quot;, &quot;can&quot;, &quot;should&quot; and what not. Hence the second usage where two verbs appear consecutively is incorrect. But yesterday, my native English speaking friends (Americans) told me that &quot;I need compute this.&quot; is a perfectly grammatical sentence, and one is simply omitting the &quot;to&quot;. How can this be? Is it a colloquial usage but grammatically incorrect, or is it grammatically correct? If it is grammatically correct, is it because &quot;need&quot; is a semi-modal verb? EDIT: in particular, is it okay to use &quot;need compute&quot; in a scientific paper? EDIT2: the exact phrase that raised the question was &quot;The advantage of this representation is that we need only compute sums and products&quot; Easier/better way to compute and store a value that's accessed as a property? the largest integer $n$ for which $n+5$ divivides $n^5+5$? When we divide $n^5+5$ by $n+5$, we get a remainder $-620$, i.e., $n^5+5=K(n+5)-620$ , now how to proceed further? I want to mount the device /dev/sda3 to the directory /foo/bar/baz. After mounting the directory should have the uid of user johndoe. So I did:  sudo -u johndoe mkdir /foo/bar/baz stat -c %U /foo/bar/baz johndoe   and added the following line to my /etc/fstab:  /dev/sda3 /foo/bar/baz ext4 noexec,noatime,auto,owner,nodev,nosuid,user 0 1   When I do now sudo -u johndoe mount /dev/sda3 the command stat -c %U /foo/bar/baz results in root rather than johndoe. What is the best way to mount this ext4-filesystem with uid johndoe set? I can't understand where the final keyword is really handy when it is used on method parameters.    If we exclude the usage of anonymous classes, readability and intent declaration then it seems almost worthless to me.   Enforcing that some data remains constant is not as strong as it seems.    If the parameter is a primitive then it will have no effect since the parameter is passed to the method as a value and changing it will have no effect outside the scope.  If we are passing a parameter by reference, then the reference itself is a local variable and if the reference is changed from within the method, that would not have any effect from outside of the method scope.    Consider the simple test example below. This test passes although the method changed the value of the reference given to it, it has no effect.  public void testNullify() {     Collection&lt;Integer&gt; c  = new ArrayList&lt;Integer&gt;();           nullify(c);     assertNotNull(c);            final Collection&lt;Integer&gt; c1 = c;     assertTrue(c1.equals(c));     change(c);     assertTrue(c1.equals(c)); }  private void change(Collection&lt;Integer&gt; c) {     c = new ArrayList&lt;Integer&gt;(); }  public void nullify(Collection&lt;?&gt; t) {     t = null; }