getString() does not retrieve String bigger than 255 characters
VARCHAR size limit in Excel spreadsheets
Is it possible and if so how can you pass flags to the ShareLaTeX compiler which one would have passed as parameters to the LaTeX compiler?  I am using the minted package and need to pass the -shell-escape flag. Can I recover a file from /dev/null? Is the “sum of all natural numbers” unique? A while ago, there was a great hype about the “identity” $$\sum_{n=1}^{\infty} n = -\frac{1}{12}.$$  Apart from some series manipulations where the validity seems to be at least questionable, the derivation of this always goes through the zeta function:  Where the series converges, the zeta function is defined by $$\zeta(s) = \sum_{n=1}^{\infty}\frac{1}{n^s}$$ and outside that range by analytic continuation. And it turns out that inserting $s=-1$ formally results in $$\zeta(-1) = -\frac{1}{12} = \sum_{n=1}^\infty n$$  However looking at the series in isolation, there is no indication that the zeta function should be chosen.  An obvious way to get an analytic function that at one point gives the sum of all natural numbers is $$f(x) = \sum_{n=1}^{\infty} nx^n$$ at $x=1$, however (not surprisingly) that function diverges at $1$.  Therefore my question:     Is it possible to get another finite value for the series by analytic continuation of another series?   Concretely, do there exist continuous functions $f_1, f_2, f_3, \ldots$ such that   On some non-empty open subset $S$ of $\mathbb C$, $f(x)=\sum_{n=1}^\infty f_n(x)$ converges to an analytic function. At some point $x_0$, $f_n(x_0) = n$ for all positive integers $n$. The analytic continuation of $f$ is well defined and finite at $x_0$. $f(x_0) \ne -1/12$   What if we demand the functions $f_n$ to be analytic rather than just continuous? I want to validate a set of credentials against the domain controller. e.g.:  Username: STACKOVERFLOW\joel Password: splotchy   Method 1. Query Active Directory with Impersonation  A lot of people suggest querying the Active Directory for something. If an exception is thrown, then you know the credentials are not valid - as is suggested in .  There are some serious  however:   You are not only authenticating a domain account, but you are also doing an implicit authorization check. That is, you are reading properties from the AD using an impersonation token. What if the otherwise valid account has no rights to read from the AD? By default all users have read access, but domain policies can be set to disable access permissions for restricted accounts (and or groups). Binding against the AD has a serious overhead, the AD schema cache has to be loaded at the client (ADSI cache in the ADSI provider used by DirectoryServices). This is both network, and AD server, resource consuming - and is too expensive for a simple operation like authenticating a user account. You're relying on an exception failure for a non-exceptional case, and assuming that means invalid username and password. Other problems (e.g. network failure, AD connectivity failure, memory allocation error, etc) are then mis-intrepreted as authentication failure.   Method 2. LogonUser Win32 API   have suggested using the  API function. This sounds nice, but unfortunately the calling user sometimes needs a permission usually only given to the operating system itself:     The process calling LogonUser requires   the SE_TCB_NAME privilege. If the   calling process does not have this   privilege, LogonUser fails and   GetLastError returns   ERROR_PRIVILEGE_NOT_HELD.       In some   cases, the process that calls   LogonUser must also have the   SE_CHANGE_NOTIFY_NAME privilege   enabled; otherwise, LogonUser fails   and GetLastError returns   ERROR_ACCESS_DENIED. This privilege is   not required for the local system   account or accounts that are members   of the administrators group. By   default, SE_CHANGE_NOTIFY_NAME is   enabled for all users, but some   administrators may disable it for   everyone.   Handing out the "Act as a part of the operating system" privilege is not something you want to do willy-nilly - as Microsoft points out in a :     ...the process that is calling   LogonUser must have the SE_TCB_NAME   privilege (in User Manager, this is   the "Act as part of the Operating   System" right). The SE_TCB_NAME   privilege is very powerful and   should not be granted to any arbitrary user just so that they can   run an application that needs to   validate credentials.   Additionally, a call to LogonUser() will fail if a blank password is specified.    What is the proper way to authenticate a set of domain credentials?    I happen to be calling from managed code, but this is a a general Windows question. It can be assumed that the customers have the .NET Framework 2.0 installed. $S^2 \times S^2$ is diffeomophic to $G_2(\mathbb{R}^4)$ $G_2(\mathbb{R}^4)$ is the Grassmannian manifold of two-dimensional subspaces of $\mathbb{R}^4$. I would like a detailed proof. Can it be done explicitly? I mean, showing the map and checking its differentiability using charts? I want to copy all images on my computer to a single folder I'm trying to load a field value (machine name: field_theme_image) from a content of node value 3, in "page--front.tpl.php".  &lt;?php   $node=node_load(3);   print $node-&gt;field_theme_image[$node-&gt;language][0]['uri']; ?&gt;   Using the above code I'm not getting full URL value. Please see the image below. I can see the path value in Devel themer. Here is what I'd like to achieve in QGIS.   Is there a processing tool to remove the overlapping part of polygons?    It is also very important that they do not get merged during the process and that they keep their original attributes since I need to work with them afterwards. I have been using Ubuntu 12.04 for quite a while and have never had a problem come at me out of the blue like this. I'm trying to install python 3.2 on my Ubuntu system and every time I run the code to compile the python source, I get this error:  'Command 'sudo' is available in '/usr/bin/sudo' The command could not be located because '/usr/bin' is not included in the PATH environment variable. sudo: command not found'   I've also tried running gksudo command to view what my environment shows but I pretty much get the same error. Spatial query to return multiple values I have a woodland scheme advice layer that has a polygon for each area of advice (brown layer in the picture). I also have a polygon layer of UK local authorities (red boundary layer in the picture). I would like to perform a spatial query which returns the local authority name for each woodland advice scheme. This would work fine if each woodland advice scheme was found in just one local authority boundary. However many are found across a boundary of two different authorities. For instance, one scheme sits across the boundaries of the authorities of Fife and Angus. The scheme is the yellow selected polygon in the picture and the red line is the authority boundary. How do I get the spatial join to return a value of Fife; Angus (or something similar to identify two values) instead of just Fife or Angus. What is the value of $\sum\limits_{i=1}^\infty\dfrac{1}{p_{p_i}}$ where $p_n$ is the nth prime (and so $p_{p_n}$ is the $k$th prime, where $k$ is the $n$th prime) ?  Thus $\frac{1}{3}+\frac{1}{5}+\frac{1}{11}+...=$ ??  How do I efficiently decide if $\sum_{i=1}^\infty\dfrac{1}{p_{p_i}}\gt1$ is true without using a computer ?  I assume this infinite sum is an irrational number. Has this already been proven ? set css border to end in a 90 instead of a 45 degree angle "Always on Top" Windows with Java In Java, is there a way to have a window that is "Always on top" regardless if the user switches focus to another application?  I've searched the web, and all of the solutions lean to some sort of JNI interface with native bindings.  Truly this can't be the only way to do it?.. or is it? Why can't two series-connected diodes act as a BJT? Interpretation of R's lm() output The help pages in R assume I know what those numbers mean, but I don't. I'm trying to really intuitively understand every number here. I will just post the output and comment on what I found out. There might (will) be mistakes, as I'll just write what I assume. Mainly I'd like to know what the t-value in the coefficients mean, and why they print the residual standard error.   Call: lm(formula = iris$Sepal.Width ~ iris$Petal.Width)  Residuals:      Min       1Q   Median       3Q      Max  -1.09907 -0.23626 -0.01064  0.23345  1.17532    This is a 5-point-summary of the residuals (their mean is always 0, right?). The numbers can be used (I'm guessing here) to quickly see if there are any big outliers. Also you can already see it here if the residuals are far from normally distributed (they should be normally distributed).  Coefficients:                  Estimate Std. Error t value Pr(&gt;|t|)     (Intercept)       3.30843    0.06210  53.278  &lt; 2e-16 *** iris$Petal.Width -0.20936    0.04374  -4.786 4.07e-06 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1    Estimates $\hat{\beta_i}$, computed by least squares regression. Also, the standard error is $\sigma_{\beta_i}$. I'd like to know how this is calculated.  I have no idea where the t-value and the corresponding p-value come from. I know $\hat{\beta}$ should be normal distributed, but how is the t-value calculated?  Residual standard error: 0.407 on 148 degrees of freedom   $\sqrt{ \frac{1}{n-p} \epsilon^T\epsilon }$, I guess. But why do we calculate that, and what does it tell us?  Multiple R-squared: 0.134,  Adjusted R-squared: 0.1282    $ R^2 = \frac{s_\hat{y}^2}{s_y^2} $, which is $ \frac{\sum_{i=1}^n (\hat{y_i}-\bar{y})^2}{\sum_{i=1}^n (y_i-\bar{y})^2} $. The ratio is close to 1 if the points lie on a straight line, and 0 if they are random.  What is the adjusted R-squared?  F-statistic: 22.91 on 1 and 148 DF,  p-value: 4.073e-06    F and p for the whole model, not only for single $\beta_i$s as previous. The F value is $ \frac{s^2_{\hat{y}}}{\sum\epsilon_i} $. The bigger it grows, the more unlikely it is that the $\beta$'s do not have any effect at all. How can I chroot sftp-only SSH users into their homes? I want to give a client access to my server, but I want to limit those users to their home directories. I will bind-mount in any files I want them to be able to see.  I've created a user called bob and added him to a new group called sftponly. They have a home directory at /home/bob. I've changed their shell to /bin/false to stop SSH logins. Here is their /etc/passwd line:  bob:x:1001:1002::/home/bob:/bin/false   I've also changed the /etc/ssh/sshd_config to include the following:  Match Group sftponly         ChrootDirectory /home/%u         ForceCommand internal-sftp         AllowTcpForwarding no   When I try to log in as them, here's what I see   $ sftp bob@server bob@server's password:  Write failed: Broken pipe Couldn't read packet: Connection reset by peer   If I comment out the ChrootDirectory line I can SFTP in but then they have free rein over the server. I have found that ChrootDirectory /home works, but it still gives them access to any home directory. I have explicitly tried ChrootDirectory /home/bob but that doesn't work either.  What am I doing wrong? How can I limit bob to /home/bob/?  ----EDIT-----  Okay so I just had a look at /var/log/auth.log and saw this:  May  9 14:45:48 nj sshd[5074]: pam_unix(sshd:session): session opened for user bob by (uid=0) May  9 14:45:48 nj sshd[5091]: fatal: bad ownership or modes for chroot directory component "/home/bob/" May  9 14:45:48 nj sshd[5074]: pam_unix(sshd:session): session closed for user bob   I'm not entirely sure what's going on there,  but it suggests something is wrong with the user directory. Here is the ls -h /home output:  drwxr-xr-x 26 oli      oli      4096 2012-01-19 17:19 oli drwxr-xr-x  3 bob      bob      4096 2012-05-09 14:11 bob Trying to remap my left SUPER key (also called WINDOWS key) to left or right CONTROL key, with xkg I would like to create a reminder on Google Calendar every month on the 15th, but if the 15th in that month is a Friday/Saturday, I want it automatically to set it to the closest Sunday/Thursday. Is this possible? Lowest volume is still too loud—how can I make it even lower? The lowest volume I can get by pressing the volume keys is still too loud when I'm wearing headphones. How can I make it even lower?   I have a Mac Mini 2011 (5,1) running Mountain Lion. Why does my dock keep moving back to my other monitor? I have a larger, external monitor connected to my MacBook Pro and have arranged it such that the dock is in the external monitor (via System Preferences > Displays > Arrangement, by dragging the white bar to the larger screen). This works fine, except for the fact that every now and then, the dock will suddenly shift back to my MacBook screen, but when I open up Displays to change this back, the white bar is still on the external monitor. So I have to drag it to the smaller screen, and then drag it back to the external monitor.   It's a minor issue, obviously, but I've noticed that it has been happening more and more frequently and it's getting quite annoying. Perhaps there's something I've been doing unintentionally for this to happen?   I'm using Mavericks, 10.9.5.