I have an array   a.value =  [a,b,c,d,e,f]  How can I convert to comma seperated string like   a.value = "a,b,c,d,e,f"  Thanks for all help.
I have a one-dimensional array of strings in JavaScript that I'd like to turn into a comma-separated list. Is there a simple way in garden-variety JavaScript (or jQuery) to turn that into a comma-separated list? (I know how to iterate through the array and build the string myself by concatenation if that's the only way.)
Alternating sum of binomial coefficients: given $n \in \mathbb N$, prove $\sum^n_{k=0}(-1)^k {n \choose k} = 0$ What is the meaning of the beta-coefficient for an interaction term in a crossover study? I have asked a similar question here:  I am puzzled by the interpretation for an interaction term. In my data my Y is an interval variable with the health outcome of an experiment. I have used an interaction term in which I have interacted the condition with the predisposition of the subject considering health status at base level. They are both categorical variables (factor variables in R).  Now it gets complicated because the Condition was two treatments: in treatment A subjects got the placebo first and then the real medicine whereas in treatment B they go the real medicine first and the placebo second. All it changes is the order.   Health outcome = a + Condition * Health.Base   I have the worst state of health at the base level as my reference category I find that interaction with the Condition is statistically significant but I am not sure how to interpret this.  I use the lm() function of R (although my design looks more like an ANOVA) and in the output I get the b coefficient in an output that looks like this:  ConditionB:Health.Base.So.and.So         (Beta and p-value) ConditionB:Health.Base.Excellent         (Beta and p-value)   A statistically significant interaction term for those in Excellent health at baseline would mean that they are affected by the Condition B more than Condition A compared to the reference category people (Poor health at baseline). Is this right? What does the beta-coefficient represent?   If I would like to examine for each Health category at the base line separately without comparing to a reference category I would have to code each category as a dummy variable. However, in this case I would compare whether membership to a specific health status at the base line significantly changes between conditions compared to those who belong to the other health statuses at the base line. Is this right? Again, what does the beta-coefficient represent?  Would it be right to assume that the choice of the interaction between the Condition and the dummy variables is easier to interpret?  --- EDIT --- R output:  Call: lm(formula = HealthOutcome ~ Condition * HealthStatus,      data = datA)  Residuals:     Min      1Q  Median      3Q     Max  -1.5957 -0.5942 -0.2640  0.4423  2.4423   Coefficients:                                        Estimate Std. Error t value     Pr(&gt;|t|)     (Intercept)                            2.595652   0.053044  48.934  &lt; 2e-16 *** ConditionCondB                        -0.001449   0.077071  -0.019    0.985     HealthStatusSo.and.So                 -0.331693   0.078094  -4.247  2.35e-05 *** HealthStatusExcellent                 -0.836724   0.092692  -9.027  &lt; 2e-16 *** ConditionCondB:HealthStatusSo.and.So   0.137490   0.110612   1.243    0.214     ConditionCondB:HealthStatusExcellent  -0.199787   0.133943  -1.492    0.136     --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Residual standard error: 0.8045 on 1059 degrees of freedom   (68 observations deleted due to missingness) Multiple R-squared:   0.16, Adjusted R-squared:  0.156  F-statistic: 40.33 on 5 and 1059 DF,  p-value: &lt; 2.2e-16 Proving the set of points at which a function diverges to $\infty$ is countable Let $f\colon\mathbb{R}\to\mathbb{R}$. Prove that the set    $$\{x \mid \mbox{if $y$ converges to $x$, then $f(y)$ converges to $\infty$}\}$$ is countable.   My book told me to consider  $g(x)=\arctan(f(x))$, then it said "it is easy to see the set is countable." But I still can't understand what it mean. How to convert Strings to and from UTF8 byte arrays in Java In Java, I have a String and I want to encode it as a byte array (in UTF8, or some other encoding). Alternately, I have a byte array (in some known encoding) and I want to convert it into a Java String. How do I do these conversions? How to assess the similarity of two histograms? Given two histograms, how do we assess whether they are similar or not?  Is it sufficient to simply look at the two histograms? The simple one to one mapping has the problem that if a histogram is slightly different and slightly shifted then we'll not get the desired result.  Any suggestions? Need help in proving that $\frac{\sin\theta - \cos\theta + 1}{\sin\theta + \cos\theta - 1} = \frac 1{\sec\theta - \tan\theta}$ We need to prove that $$\dfrac{\sin\theta - \cos\theta + 1}{\sin\theta + \cos\theta - 1} = \frac 1{\sec\theta - \tan\theta}$$  I have tried and it gets confusing. Why are the solutions of polynomial equations so unconstrained over the quaternions? Where can I find the location of downloaded .deb files?  I want to copy this folder before I reinstall Ubuntu so I don't have to redownload the packages.  I am running Ubuntu 12.10 32-bit.  How can I do this? Temporal Table that doesn't use system time We want to implement temporal tables in SQL Server 2016. We are creating a Datawarehouse and developing Type 2 Slowly changing Dimension Tables.  For the BeginDate, we want it to be dependent on transaction date and not the current getdate time. We are reprocessing a history of transactions. Example below, customer has gym or bank status, and goes from inactive, to active, or pending, dependent on transaction date.  We currently have this.  CREATE TABLE dbo.Department (     CustomerId int primary key,     MembershipStatus int,     TransactionDate datetime  );   We we would like to create a table like this.  CREATE TABLE dbo.DepartmentHistory (     CustomerId int primary key,     MembershipStatus int,     TransactionDate datetime,     BeginDatetime datetime,     EndDatettime datetime  );   Example usage would be:   first Customer Transaction on 3/5/2018 as Pending P        +------------+--------+-----------+---------+     | CustomerId | Status | BeginDate | EndDate |     +------------+--------+-----------+---------+     | 1          | P      | 3/5/2018  | NULL    |     +------------+--------+-----------+---------+    second transaction is 4/21/2018 is Active A        +------------+--------+-----------+-----------+     | CustomerId | Status | BeginDate | EndDate   |     +------------+--------+-----------+-----------+     | 1          | P      | 3/5/2018  | 4/21/2018 |     | 1          | A      | 4/21/2018 | NULL      |     +------------+--------+-----------+-----------+ Is there a unique solution for this quadratic matrix equation? From what I can gather, there are three categories:   Never use GET and use POST Never use POST and use GET It doesn't matter which one you use.   Am I correct in assuming those three cases? If so, what are some examples from each case? I am trying to under stand how to build a barrel shifter using multiplexers. I understand how the barrel shifter works but I don't get how you decide the number of multiplexers to use, and how the shifting is done with the multiplexer basically.  So far wikipedia doen't help much. And the best I have so far is   But it does not really answer my question. In my calculator why does $\sqrt4 -2=-8.1648465955514287168521180122928e-39?$ I have tried this on my Windows 7 calculator with $\sqrt9 -3 $ it too gives some weird answer- ie$1.1546388020691628168216106791278e-37$. And so for any $n$(positive) $\sqrt n^2-n= wierd_ .answer$ Why does this happen? Am hesitant to ask yet one more embarrassing question, but I can't seem to see the problem with the \foreach in the MWE. It should produce several horizontal lines but only produces the one with the yValue as specified in the \newcommand{\yValue}{0.3}:  Code: \documentclass{article} \usepackage{pgfplots}  \newcommand{\yValue}{0.3}  \begin{document} \begin{tikzpicture} \begin{axis} [  ymin=0,  ymax=1,  xmin=0,  xmax=1, ]  \foreach \yValue in {0.00,0.1,...,1.00} {     \draw [red] (axis cs:0,\yValue) -- (axis cs:1,\yValue); }  \end{axis} \end{tikzpicture} \end{document} Fresh Windows-10 Install A Windows-7 laptop was upgraded to Windows-10 during the Microsoft free upgrade period when they were nudging users to migrate away from 7 to 10.  The system is sluggish and crash prone: I would like create a fresh install with a new SSD from a Windows 10 install .iso burned to a USB drive.  Is it possible (and how can) the the license-key from the old drive be recovered and migrated to a fresh install?   If this is not the right question to ask, I would appreciate edits to the questions: thank you. I'm using a docker image as a base for my own development that adds the jessie backports repository in its Dockerfile and uses that to install a dependency. This image uses the following command to add the repository:  echo "deb http://ftp.debian.org/debian jessie-backports main" &gt;&gt; /etc/apt/sources.list   The problem is that fetching packages from the backports repository now  fails with the following error (this used to work previously):  W: Failed to fetch http://ftp.debian.org/debian/dists/jessie-backports/main/binary-amd64/Packages 404  Not Found  W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages  404  Not Found   I looked on that server, and those paths are indeed not present there.  I tried to figure out on the Debian backports site whether this particular repository should still be available, and I didn't find any indication that this was deprecated or something like that.  Is this a temporary issue with the repository, or is the jessie-backports repository not available anymore? And if this is not a temporary issue, what options do I have to use this or an equivalent repository without upgrading to the newer Debian stable version? Why a mono-atomic crystal layer (2D) can't be stable? According to Peierls and Landau, 2D crystals were thermodynamically unstable. They can't exist! Of course, this theory was disapproved in 2004 (example: graphene).  What is the general definition of stability of a general system?  What is the thermodynamics' stability? I'd like to use a sequence of boxes to show how TeX works. I read some time ago that everything (or almost) in TeX are boxes.  So, how to show only the TeX boxes that surround each character, each line, each paragraph?  I'd like something similar to the image below, not fbox which contains blank space around it. Bash : compare two strings with space I am trying to write a bash script which run a command and compare the result with another string.   #!/bin/bash -x  STATUS=`/root/setup_ha show --password-file=/root/password | grep "&gt;HA State" | awk '{print $3}' |  cut -c 2-`  TEST=`echo $STATUS` if [[ "$TEST" == "ON Master" ]]; then echo CLUSTER CRITICAL else   echo CLUSTER OK MASTER fi   As the Original string is on two lines, I echo it in a new variable TEST. The New variable have the output of the command on one line.  Here is the Bash debug output :  ++ /root/setup_ha show --password-file=/root/password ++ grep '&gt;HA State' ++ awk '{print $3}' ++ cut -c 2- + STATUS='ON Master' ++ echo 'ON' Master + TEST='ON Master' + [[ ON Master == \O\N\ \M\a\s\t\e\r ]] + echo CLUSTER OK MASTER CLUSTER OK MASTER   I also tried the following test :  if [[ "$TEST" =~ "ON Master" ]]   The thing is bash is not able to compare the strings it is always false.  Any idea ?   EDIT :  Here is the output with the first answer :  + STATUS='ON Master' ++ echo 'ON' Master + TEST='ON Master' + '[' 'ON Master' == 'ON Master' ']' + echo CLUSTER OK MASTER CLUSTER OK MASTER   Still  not working ON seems weird on line 3, plus in my bash it takes green color ! How to fix broken taskbar icons in Windows 7