how to install ubuntu 12.04 on a new laptop
How do I install Ubuntu?
Boolean variable returns as string from javascript function How can I use a command to delete all files in Downloads whose dates added are greater than 1 year? I am using a Mac. How can I use a command to delete all files in ~/Downloads whose dates added are greater than 1 year? Can I play against or with Xbox 360 players through my Xbox One? Is it possible to play against and with Xbox 360 players through my Xbox One? Equivalent of String.format in jQuery Probability to choose specific item in a "weighted sampling without replacement" experiment Given $n$ items with weight $w_n$ each -- what is the probability that item $i$ is chosen in a $k$-out-of-$n$ "weighted random sampling without replacement" experiment? Can a closed-form solution that depends only on $w_i / w_\cdot$ be derived ($w_\cdot = \sum_j w_j$.)?   EDIT: A solution that depends only on $w_i / w_\cdot$ is impossible. Assume $n=3$, $i=1$, $w_1 = 1$, and two cases: (1) $w_2 = 1, w_3 = 1 + \varepsilon$, (2) $w_2 = 2, w_3 = \varepsilon &gt; 0$. In case (1) the probability is almost $2/3$, in case (2) it is almost $1$, but in both cases $w_1 = 1$ and $w_\cdot = 3 + \varepsilon$.  What I have tried so far to solve the problem:  Let $P^n_k(w, i)$ be the probability that item $i$ is chosen in an $k$-out-of-$n$ experiment with weight vector $w$. In the first draw, the item is chosen with probability $w_i / w_\cdot$. Otherwise, we are looking for the probability to choose this item in a $k-1$-out-of-$n-1$ experiment, with the same weight vector except for the item that has been selected. Hence:  $$ P^n_k(w, i) = w_i / w_\cdot + \sum_{j \neq i} w_j / w_\cdot \cdot P^{n-1}_{k-1}(w - j, i) $$ $$ = w_\cdot^{-1} \left( w_i + \sum_{j \neq i} w_j \cdot P^{n-1}_{k-1}(w - j, i) \right) $$  with $w-j$ being "the vector $w$ without the $j$th element".  How to solve this recurrence relation? (If it is correct at all...) Method defined as testMethod do not support web service callouts, test skipped Give us better search-by-score syntax Is there really a way to make a true toon shader material in Cycles? Is there a way to make a true toon shader material in Cycles?  Here's, in order of importance, what would be ideal to find in such a shader:   Must use Cycles Must be an actual shader Must not rely on lighting Must be independent of camera position Must react directly to lighting rather than manually having to change it to emulate it Should be easily made into a node-group Should have the following configurability:   Main color Darkness color Shadow depth (how far the shadow goes from the unlit side)    Below, I'll be listing some already-found methods and their flaws:    Cycles's Toon BDSF:  Source: Blender  Result:    Node setup:    Cons:   Not a clear-cut two-color shading Reacts to diffusion of surrounding objects      Mask &amp; Ramp:  Source:   Result:    Node setup (Compositor):    Cons:   Very grainy Does not support colour textures Not easy to change shadow depth in a nodegroup Not a material, requires compositor Requires use of object indexes     Shadeless Fresnel:  Source:   Result:    Node setup:    Cons:   Uses camera's direction Ignores lighting Not easy to change shadow depth in a nodegroup     Shadeless Normal:  Source:   Result:    Node setup:    Cons:   Ignores lighting Direction of shadow is manually changed Not easy to change shadow depth in a nodegroup   However, this one is easily the best one. It's pretty great, and would work still images very well.    That's all I've got. Does anyone else have any methods that fall under most of the criteria I listed above? Also note that OSL is totally fine, if it works. I am in trouble with polarization and entanglement. Let's consider three cases : Case 1) : Statistical mixture of $|H\rangle$ and $|V\rangle$ polarized photons Case 2) : Photons in a superposition state $1/\sqrt{2}(|H\rangle+|V\rangle)$ Case 3) : Photons which are entangled with twin ones in $1/\sqrt{2}(|H,H\rangle+|V,V\rangle)$ state Which experiments can be conducted to differentiate the case  statistical mixture from the case  superposition state ?   Which experiments can be conducted to differentiate the case  statistical mixture from the case  entangled photons in superposition state ?   Using a $45^\circ$ polarizer I think you can differentiate case 1/case 2 but not case 1/case 3 I don't know how to differentiate case 1/case 3 except maybe using quantic tomography and Wigner function. Is it true ? Is there any other simpler way ? Thanks a lot for your answer and sorry for this maybe dummy question... How are "related" questions selected? Can a player character use the Misty Step spell to bring another character or creature with them when they teleport? I am an Eladrin elf and have the ability to use the misty step spell to teleport with my clothing and items. However, can I grapple a party member (or NPC or other creature) and use the misty step spell to bring them with me when I teleport? Would they have to be willing? This is NOT an installation problem question. I've had both op sys working fine side-by-side for a couple of weeks now. I'm using Ubunutu 12.04 64-bit.  This morning when I tried to switch from Win8 to Ubuntu, it just rebooted into Win8. No grub screen whatsoever. This is the 3rd machine I've had dual-booting &amp; have never seen this, but then Win8 is a 1st for me &amp; has thrown some pretty awesome blocks in the path to get to here. Atrocious op sys...  I'm assuming the ASUS updater did this yesterday. (ASUS R503U)  So, do I just put the Ubuntu disk in &amp; reinstall grub? $A^TA+I$ is always invertible? Is there a graceful way to handle passing a list of ids as a parameter to a stored procedure?   For instance, I want departments 1, 2, 5, 7, 20 returned by my stored procedure. In the past, I have passed in a comma delimited list of ids, like the below code, but feel really dirty doing it.   SQL Server 2005 is my only applicable limitation I think.  create procedure getDepartments   @DepartmentIds varchar(max) as   declare @Sql varchar(max)        select @Sql = 'select [Name] from Department where DepartmentId in (' + @DepartmentIds + ')'   exec(@Sql) What defines the maximum size for a command single argument? I was under the impression that the maximum length of a single argument was not the problem here so much as the total size of the overall argument array plus the size of the environment, which is limited to ARG_MAX. Thus I thought that something like the following would succeed:  env_size=$(cat /proc/$$/environ | wc -c) (( arg_size = $(getconf ARG_MAX) - $env_size - 100 )) /bin/echo $(tr -dc [:alnum:] &lt;/dev/urandom | head -c $arg_size) &gt;/dev/null   With the - 100 being more than enough to account for the difference between the size of the environment in the shell and the echo process. Instead I got the error:  bash: /bin/echo: Argument list too long   After playing around for a while, I found that the maximum  was a full hex order of magnitude smaller:  /bin/echo \   $(tr -dc [:alnum:] &lt;/dev/urandom | head -c $(($(getconf ARG_MAX)/16-1))) \   &gt;/dev/null   When the minus one is removed, the error returns. Seemingly the maximum for a single argument is actually ARG_MAX/16 and the -1 accounts for the null byte placed at the end of the string in the argument array.  Another issue is that when the argument is repeated, the total size of the argument array can be closer to ARG_MAX, but still not quite there:  args=( $(tr -dc [:alnum:] &lt;/dev/urandom | head -c $(($(getconf ARG_MAX)/16-1))) ) for x in {1..14}; do   args+=( ${args[0]} ) done  /bin/echo "${args[@]}" "${args[0]:6534}" &gt;/dev/null   Using "${args[0]:6533}" here makes the last argument 1 byte longer and gives the Argument list too long error. This difference is unlikely to be accounted for by the size of the environment given:  $ cat /proc/$$/environ | wc -c 1045   Questions:   Is this correct behaviour, or is there a bug somewhere? If not, is this behaviour documented anywhere? Is there another parameter which defines the maximum for a single argument? Is this behaviour limited to Linux (or even particular versions of such)? What accounts for the additional ~5KB discrepancy between the actual maximum size of the argument array plus the approximate size of the environment and ARG_MAX?   Additional info:  uname -a Linux graeme-rock 3.13-1-amd64 #1 SMP Debian 3.13.5-1 (2014-03-04) x86_64 GNU/Linux Quickly read the last line of a text file? NOTE: Signing up or Logging in via OpenID is no longer officially supported from any of our sites. Currently,  is still on the internet, but we are in the process of completely removing it.    Stack Overflow was an early and strong supporter of . We built our sign up/log in flow around it. We were idealistic and had , but these hopes weren't realized. Over the years people have wondered if  is . We've had to remove support as OpenID providers  or .  The time has come to part ways. The reality is OpenID support has created a ton of complexity in our codebase and the number of users actively using OpenID simply don't justify that cost. Users have spoken with their actions. You prefer Google, Facebook and Stack Exchange (aka email/PW) based account auth.     Of our 9,813,747 accounts around one-tenth of a percent are actively using OpenID (defined as having visited a site in the past 12 months). If you include all the inactive accounts it is still less than 2.9% of all accounts.  So, what is the plan?   DONE - Remove the ability to create a new account with most OpenID providers DONE - Add the ability to  DONE - Convert Launchpad (used on  ) to OAuth DONE - Remove creating new accounts with Steam from  (Steam removed support for OAuth. Only 454 accounts that use Steam have visited Arqade in the past 6 months.) DONE - We will email all users that rely on deprecated OpenID credentials and request that they  DONE - Run an announcement banner for any user who signs in with deprecated OpenID credentials urging them to  DONE - End support for logging in via OpenID  In progress - Remove  (note: only 0.2% of authorized sites in the last year have been non-Stack Exchange sites.)   Obviously, if your account relies on OpenID, then make life easy and go now and .   If you've forgotten what you credentials you use to login, then  to refresh your memory. If you don't see one of the three account types shown in the image below (Google, Facebook or Stack Exchange) then click the "add more logins" button to add one of them to your account.    Remember, SE OpenID accounts are really email/pw accounts handled through complicated OpenID code path. They will be migrated to a simpler email/pw only code path as a part of this change. No extra work required on your part. What is the difference between "till" and "until"? What is the difference between till and until?    When to use till or until? Please explain with examples. Auto mount a disk drive in ubuntu 14.04 LTS (Bookmark directory not found) I'm using ubuntu 14.04 LTS. When I start my pc and click on any bookmark from the file manager it shows this error:   Unable to find the requested file. Please check the spelling and try again. Unhandled error message: Error when getting information for file '/media/angel/DOC/edu': No such file or directory   But when I open DOC drive and again clink on the same bookmark it works properly. Can anybody tell me why is this happening and how to solve this issue?   Edit: Output of lsblk is following: (ubuntu is installed in sda5)  NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT sda      8:0    0 119.2G  0 disk  ├─sda1   8:1    0  91.3G  0 part  ├─sda2   8:2    0     1K  0 part  ├─sda5   8:5    0  24.1G  0 part / └─sda6   8:6    0   3.8G  0 part [SWAP] sdb      8:16   0 465.8G  0 disk  ├─sdb1   8:17   0  93.2G  0 part  ├─sdb2   8:18   0     1K  0 part  ├─sdb5   8:21   0  93.2G  0 part  ├─sdb6   8:22   0  89.3G  0 part  ├─sdb7   8:23   0  93.2G  0 part  ├─sdb8   8:24   0  93.2G  0 part  └─sdb9   8:25   0   3.8G  0 part  sr0     11:0    1  1024M  0 rom     After opening the disk drive the output of lsblk is bellow:   NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT sda      8:0    0 119.2G  0 disk  ├─sda1   8:1    0  91.3G  0 part  ├─sda2   8:2    0     1K  0 part  ├─sda5   8:5    0  24.1G  0 part / └─sda6   8:6    0   3.8G  0 part [SWAP] sdb      8:16   0 465.8G  0 disk  ├─sdb1   8:17   0  93.2G  0 part  ├─sdb2   8:18   0     1K  0 part  ├─sdb5   8:21   0  93.2G  0 part  ├─sdb6   8:22   0  89.3G  0 part /media/angel/DOC ├─sdb7   8:23   0  93.2G  0 part  ├─sdb8   8:24   0  93.2G  0 part  └─sdb9   8:25   0   3.8G  0 part  sr0     11:0    1  1024M  0 rom   The output of sudo blkid gives the following information about sdb6:  /dev/sdb6: LABEL="DOC" UUID="04280A22280A12FA" TYPE="ntfs" Interpreting the residuals vs. fitted values plot for verifying the assumptions of a linear model Consider the following figure from Faraway's Linear Models with R (2005, p. 59).    The first plot seems to indicate that the residuals and the fitted values are uncorrelated, as they should be in a homoscedastic linear model with normally distributed errors. Therefore, the second and third plots, which seem to indicate dependency between the residuals and the fitted values, suggest a different model.  But why does the second plot suggest, as Faraway notes, a heteroscedastic linear model, while the third plot suggest a non-linear model?  The second plot seems to indicate that the absolute value of the residuals is strongly positively correlated with the fitted values, whereas no such trend is evident in the third plot. So if it were the case that, theoretically speaking, in a heteroscedastic linear model with normally distributed errors  $$ \mbox{Cor}\left(\mathbf{e},\hat{\mathbf{y}}\right) = \left[\begin{array}{ccc}1 &amp; \cdots &amp; 1 \\ \vdots &amp; \ddots &amp; \vdots \\ 1 &amp; \cdots &amp; 1\end{array}\right] $$  (where the expression on the left is the variance-covariance matrix between the residuals and the fitted values) this would explain why the second and third plots agree with Faraway's interpretations.  But is this the case? If not, how else can Faraway's interpretations of the second and third plots be justified? Also, why does the third plot necessarily indicate non-linearity? Isn't it possible that it is linear, but that the errors are either not normally distributed, or else that they are normally distributed, but do not center around zero?