How to log in one time and can use multiple domain example : Google account can use ,  by single login  [Server side PHP]
Our company has multiple domains set up with one website hosted on each of the domains. At this time, each domain has its own authentication which is done via cookies.   When someone logged on to one domain needs to access anything from the other, the user needs to log in again using different credentials on the other website, located on the other domain.   I was thinking of moving towards single sign on (SSO), so that this hassle can be eliminated. I would appreciate any ideas on how this could be achieved, as I do not have any experience in this regard.  Thanks.  Edit: The websites are mix of internet (external) and intranet (internal-used within the company) sites.
Calculate line distances inside of polygons using ArcGIS for Desktop? I'm working with two data sets:   NHD polyline stream layer for my entire state HUC Watershed boundary Polygons for the entire state   I am looking for a way to calculate the total length of streams within each watershed boundary polygon, and would ideally like to have each polygon then attributed with the sum of stream miles within its boundary.  Can anyone help me? Inverse images of images, images of inverse images of a set of vectors What can be said about$\ f^{-1}(f(S))$ and$\ S$, where$\ f(S):=\{f(x):x \in S\}$?   I feel as if$\ f^{-1}(f(S))$ will be smaller than or equal in size (number of elements) to$\ S$.  For example, if$\ f(x)=x$, then$\ f(\{-1, 0, 1, 2\})=\{-1, 0, 1, 2\}$and$\ f^{-1}(f\{-1, 0, 1, 2\})=\{-1, 0, 1, 2\}$ (same size).  But if$\ f(x)=x^2$, then$\ f(\{-1, 0, 1, 2\})=\{0, 1, 4\}$ and$\ f^{-1}(f\{0, 1, 4\})=\{0, 1, 2\}$, which is a little bit smaller than$\ S$.   What can be said about$\ f(f^{-1}(U))$ and$\ U$, where$\ f^{-1}(U):=\{x \in X:f(x) \in U\}$?   The same size as each other? Always?? Multiplying two dimensional data by a constant Double calculation producing odd result I have been struggling for one hour with this simple problem (QGIS 1.8.0-Lisboa, Windows 7) :  I have a raster layer. I would like to display the label and not only the band value when I use the Identify Features button. Is it possible? Let $X_1$ and $X_2$ be two independent exponential random variables with the PDFs $f_{X_1}(x_1)=\lambda_1 \exp(-\lambda_1 x_1)$ and $f_{X_2}(x_2)=\lambda_2 \exp(-\lambda_2 x_2)$.   Let $X= \frac{X_1X_2}{X_1+X_2+a}$ be a r.v. for which I want to derive the CDF, where $a$ is a positive constant.  In other words, I need to calculate $\mathbb{P}\{X &lt;x \}$.  Any ideas or hints?  Edit (attempt):  Using a similar approach to that used , we have $X_1 \in [0, \infty)$ and  $X_2 \in [0, \frac{x(x_1+a)}{x_1-x})$. The latter interval results from: $\frac{x_1x_2}{x_1+x_2+a} &lt; x$, thus $x_2(x_1-x)&lt;x(x_1+a)$ which implies $x_2 &lt; \frac{x(x_1+a)}{x_1-x}$; but I am not sure if this is correct since $x_1-x$ can sometimes be negative (?). Based on the above, we can write: \begin{align}  \mathbb{P} \{ \frac{X_1X_2}{X_1+X_2+a} &lt; x \}  &amp; = \int_{x_1=0}^\infty \int_{x_2=0}^{ \frac{x(x_1+a)}{x_1-x}} \lambda_1 \exp(-\lambda_1 x_1) \lambda_2 \exp(-\lambda_2 x_2)  dx_2 dx_1  \\ &amp;= \int_{x_1=0}^\infty \left(1-\exp(-\lambda_2\frac{x(x_1+a)}{x_1-x}) \right) \lambda_1 \exp(-\lambda_1 x_1) dx_1  \\ &amp; = 1-\lambda_1 \int_{x_1=x}^\infty \exp(-\lambda_2\frac{x(x_1+a)}{x_1-x} ) \exp(-\lambda_1 x_1)   dx_1 \end{align} In the last equality: for the integral of $\lambda_1 \exp(-\lambda_1 x_1) dx_1$, I suppose that $x_1 \in [0,\infty)$, whereas for the second term I suppose that $x_1 \ge x$ (since $x_2$ should be positive) (?).  Is my approach correct ? UK visa refusal on V 4.2 a + c (and sometimes 'e') Many of the UK visa refusals we see here share a common pattern and the prevailing reasons refer to V 4.2 (a) and (c).    I do understand that, while the applicants may describe very different individual circumstances, there's a consistent pattern and, broadly, fall into specific categories:    Credibility (lifestyle, lack of ties, visit history, lies &amp; omissions) Funding (insufficient funds, provenance of funds, funds parking) Sponsorship (family, friends, employer)   Question: What most commonly triggers a UK visa refusal where V 4.2 (a) and (c) are given as the grounds?  Secondarily: Given that there is a clear pattern, to what extent are these refusals predictable? Does sponsorship make a difference? Is there a set of personal circumstances, however abstract, where a refusal is all but guaranteed? For example, why do those we see here on TSE who sought entry for the PLAB or British Army appear to be refused with a common theme? Is there a uniform shortcoming or is it just discrimination?   PLAB: What is about applications for a visa, for the purpose of sitting the Professional and Linguistic Assessments Board (PLAB) exam, that seem to invite refusals. After all, the test is given so that international medical graduates can show that they qualify to practise medicine in the UK. The first part, PLAB 1, can be taken in centres outside of the UK. However, PLAB 2 can be taken only in the UK. Why can't you can't get a visa just to sit the exam, promising that you'll leave immediately after?    British Army: Since Commonwealth citizens are eligible to apply online to join, even those who don't reside in the UK, why is it so difficult to get a visa just to attend an interview to see whether you are suitable? Even with an invitation from the Army, such visa applications seem to be unsuccessful. Isn't a career in the British Army a valid reason?     Lastly:  After such a refusal, what approaches would increase the chance of a successful application? Determinant of a block lower triangular matrix I'm trying to prove the following: Let $A$ be a  $k\times k$ matrix, let $D$ have size $n\times n$, and $C$ have size $n\times k$. Then,  $$\det\left(\begin{array}{cc} A&amp;0\\ C&amp;D \end{array}\right) = \det(A)\det(D).$$  Can I just say that $AD - 0C = AD$, and I'm done? 'undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' while compiling bochs I'm trying to compile bochs with this command:  ./configure --with-x11 --with-wx --enable-ne2000 --enable-iodebug --enable-disasm --enable-debugger --enable-e1000 --enable-usb --enable-pci   it works, but then when I run make I got:  usr/bin/ld: gui/libgui.a(gtk_enh_dbg_osdep.o): undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line   Any Help ? :/ Case field mapping with custom object fields? Plot a piecewise function with black and white disks marking discontinuities Conjugation: Do we cite authors or papers? When referencing to another work in a scientific paper, do we cite the paper or its author(s)?  This question is intended to clarify the conjugation of the verb that follows the reference -- especially in these cases:   One author, two papers:     Jane Doe (2015a, 2015b) list-s the very specific conditions under which...   -> lists (singular: referencing to Jane Doe) or list (plural: referencing to both papers) Several authors, one paper:     John Doe, et al. (2015) claim-s this and that.   -> claim (plural: referencing to the multiple authors of the paper) or claims (singular: referencing to the single paper). Bash/Korn shell script edited on Windows throws error '...^M: not found' I wrote a Bash script in Windows using Notepad++.  cxStopAllServicesOnSERVER.sh  #!/usr/bin/bash cd "/some/path" echo "Hi. Logs can be found at "`pwd`"/cxStartStopLogger.log" echo "["`date`"]*** STOPPING ALL SERVICES ON SERVER ***" &gt;&gt; "cxStartStopLogger.log" exit   Now after uploading it and setting the required file permissions, I tried executing it as follows:  bash-3.00$ cat cxStopAllServicesOnSERVER.sh #Let's have a look at the code. #!/usr/bin/bash cd "/some/path/" echo "Hi. Logs can be found at "`pwd`"/cxStartStopLogger.log" echo "["`date`"]*** STOPPING ALL SERVICES ON SERVER ***" &gt;&gt; "cxStartStopLogger.log"  bash-3.00$ # Code and hashbang 'looks' correct,  bash-3.00$ # if there is any issue with the format (EOL characters and such)  bash-3.00$ # we cannot see it using cat. bash-3.00$  bash-3.00$ sh cxStopAllServicesOnSERVER.sh cxStopAllServicesOnSERVER.sh[2]: /some/path^M:  not found Hi. Logs can be found at /some/path/cxStartStopLogger.log bash-3.00$ # Note that ^M appears at the end of the line.  bash-3.00$ bash -x cxStopAllServicesOnSERVER.sh + cd $'/some/path\r' : No such file or directory1.sh: line 2: cd: /some/path ++ pwd ' echo 'Hi. Logs can be found at /some/path/cxStartStopLogger.log Hi. Logs can be found at /some/path/cxStartStopLogger.log ++ date + echo '[Sun' Nov 18 00:28:17 EST '2012]*** STOPPING ALL SERVICES ON SERVER ***' bash-3.00$ # Note that '\r' return character appears at the end of the line.   Problem: When I change the code to korn shell I face the same issue. Appears that an incorrect character is getting added at the end of the line.   NOTE: I found the solution and have posted the same as an answer. Feel free to update or improve it to help other beginners that may face the same issue.  Thanks! Short description of the scoping rules? Ever since I upgraded to 13.10, the software updater does not show all the available updates. Some will appear and can be installed just fine, but once it claims that all software is up to date, using sudo apt-get upgrade shows that there are still more packages waiting to be updated. I can update them via the command line, but that only solves things temporarily. I'm not sure why some show up and others don't. How can I make Update Manager update all packages?  Update-manager shows this:    But apt-get shows this:   Thanks! How do I debug when the system freezes or when it crashes back to login? I am fairly new to Ubuntu and I was wonder what a good way is to debug when something crashes?   For example: I installed 11.04 and the default media player banshee makes my laptop crash after a few minutes of playing music. Since the system completely freezes and there is not error message it's hard to find out what is wrong.  Second problem I have is that sometimes the system crashes to login. I am suspecting it to be a Chromium or Flash but I am not 100% sure.  So anybody got some tips on how to debug stuff like this? I was surprised to discover my dictionary had this entry for dilemma:     a situation in which a difficult choice has to be made between two or more alternatives, esp. equally undesirable ones   The notion of dilemma meaning two or more flies against what I was taught about the word. The very idea of a  is specifically based on the number two.  Has my dictionary merely updated its definition to encapsulate the many people who use dilemma for more than two equal choices? Or was someone in my youth being unnecessarily pedantic? How do I batch convert many Word documents and have them saved as [originalfilename].pdf? Some text lines are italicized with no spaces between words My machine is currently running Windows 7. I have 2 partitions: OS (C:) and DATA (D:). I intend to do a native Ubuntu 14.04 install. Assuming I format my Windows OS partition, will I have full access to my D partition in Ubuntu ?