increasing density of beam light in volume rendering

I am simulating in animation a film projector with a light beam in volumetric.  On the pic attached you can see that the beam is quite light.. I want to densify the beam more like an intense light coming from the lens..  I attach the blend file  and a pic showing my current state.. I have tried to balance volume scatter and  absorption but with no satisfactory result.. Can you suggest something  Thanks


As a US Citizen, if I'm visiting the Schengen region, can I "work from home"?

I'm a US citizen.  I want to spend about 6 weeks vacation visiting my friends in France, Spain and Italy.  However, with taking this much consecutive time off from work my employer would require me to do daily check-ins (email and Skype).    It's also very likely I would have to spend up to 20 hours per week fixing untoward problems.  This would require me logging into my company laptop to write and submit code.  Any hours that I spend doing company work I would be paid as a normal employee (vs. PTO for the rest of the vacation).  Is this legal as a tourist?  EDIT:  I emailed the Spain consulate and received this replay: As a US citizen you can travel to Spain for up to 90 days without needing a Visa. You could also work for your US employer while visiting Spain.


Unable to login with Stack Exchange OpenID on Area 51

I get an error message stating  Unable to log in with your OpenID provider:  The openid.return_to parameter <long url> the request was made with.   I can log in fine on other Stack Exchange sites, including this one. I've tried from a couple of different computers. I'm using Firefox.


Independence of iid samples when function is applied to to one member of sample

I have tuples, $\{(X_i,Y_i)\}_{i=1}^n$, which are iid.  Suppose I introduce a new variable, $T_i = g(X_i)$, where the function $g$ is arbitrary. Is it true that $\{(T_i, Y_i)\}_{i=1}^n$ are iid as well? Is the following argument correct?    My reasoning:  for $i \neq j$:  \begin{align*} P(T_i \in A, Y_i \in B, T_j \in C, Y_j \in D) &= P(g(X_i) \in A, Y_i \in B, g(X_j) \in C, Y_j \in D) \\ &= P(X_i \in g^{-1}(A), Y_i \in B, X_j \in g^{-1}(C), Y_j \in D) \\ &= P(X_i \in g^{-1}(A), Y_i \in B) P(X_j \in g^{-1}(C), Y_j \in D) \\ \end{align*}  where $g^{-1}(A) = \{ x: g(x) \in A \}$.


(1) Prove or disprove: For any sets $X,Y,Z$ and any maps $f:X \to Y$ and $g:Y \to Z$, if $f$ is injective and $g$ is surjective, then $g \circ f$ is surjective.  So i proved previously that $f$ is injective if $g \circ f$ is injective, but then i also proved that if $g \circ f$ is surjective then $g$ is surjective. then this question appears, so how do i prove it that it is true or false? I'm saying it's true, because $g \circ f$ is bijective, so how do i go around proving it? Or my idea is already wrong? I need some help thanks.  (2) Show that (it is true in general that) for any sets $A,B$, one has $P(A) \cup P(B) \subseteq P(A \cup B)$.  I know that power set has exactly all the subsets of $A$ for $P(A)$. but I dont know how to start.


Questions relating to inclusion-exclusion principle

Today I came across the inclusion-exclusion principle for the first time. I believe I have understood it, however when I tried solving some questions on it, I got severely stuck. I couldn't solve any of them. Could you please suggest some questions of escalating difficulty, so that I can get a good grasp on the topic at hand? One of the questions is this one : , It was in a Greek contest-math book and I also found it on this site. The other question I couldn't find it on the internet, so I'll translate it: Find the number of solutions to the equation $x_1+x_2+x_3=100$, if for every $3\ge i\ge1$, xi is a non negative integer with $40\ge x_i$. I have found the solutions to both of these questions, the reason which I am posting them as well, is to give a better understanding to the reader of the post (as pointed out in the comments), of what level of questions in inclusion-exclusion principle are giving me difficulty


What are the drawbacks of XeTeX/XeLaTeX vs standard LaTeX?

I'm planning to switch back to \LaTeX{}, but I would like to be able to use any .ttf font that I need.  Back in the time I used to format any document with LaTeX I was comfortable with the terribly restricted list of available fonts (after I converted a couple, I learnt to accept the limitation). I don't think I can cope with that limitation again, as I will be needing to format corporate documents that sometimes use a given font.  And I don't want to go through the dantesque process of converting every font I need, as it certainly was a painly process that I would not like to repeat.  I've found that XeTeX (or XeLaTeX, are they the same?) enable the use of true type fonts painlessly, and in  some disadvantages of this engine are glimpsed, though not very detailed.  Hence my question, what are the drawbacks/limitations I would be facing if I decide to take the XeTeX route?


I made a server and used my IPv4 address for the IP. I decided to scratch that server and make a Bukkit server so I can use plugins. I tried to use my IPv4 address which I used for my other server but I keep getting the message [17:31:15 WARN]: ****FAILED TO BIND TO PORT!  Is there any thing I can do to get a new address to use or is there a way to delete the old server? Do I need to use a different computer? Please help! I've don't know how to fix this problem. If you have any suggestions please tell me and I'll give it a try.


Use of “f ” instead of “s” in historic, printed English documents

I was at a museum in London yesterday, and one of the items on exhibit is a document from the eighteenth century. It uses the letter f a lot where s should be used—for example, in Majefty.     Did the letter f once have the same sound as s today, or were some of those words actually spoken with an f ?


Mistake in Spivak's *Calculus on Manifolds*?

Didn't see this in any of the errata:    Problem 1-8(b): Suppose $T$ is a linear transformation. If there is a basis $x_1, \dotsc, x_n$ of $\mathbb{R}^n$ and numbers $\lambda_1, \dotsc, \lambda_n$ such that $Tx_i = \lambda_i x_i$, prove that $T$ is angle preserving if and only if all $|\lambda_i|$ are equal.    Counterexample: the linear transformation taking $(0,1)$ to itself and $(1,1)$ to $-(1,1)$ does not preserve the angles between those two vectors, although it is diagonalizable with all eigenvalues of norm $1$.  Did Spivak perhaps mean to require that the $x_i$ be an orthogonal basis?


$A\in M_n(F)$ is called cyclic, I have to show , the representation of A has the following form

$F$ ia a field. a matrix $A\in M_n(F)$ is called cyclic if there is a vector $v\in M_{1\times n}(F)$ such that $\{v, vA, . . . , vA^{n-1}\}$ is a basis for $M_{1\times n}(F)$ as a left vector space over $F$. I have to show , the representation of A in the above basis has the following form  $\begin{pmatrix} 0 & 1 & 0 & \ldots & 0 \\ 0 & 0 &1 & \ldots & 0 \\ \vdots & \vdots & \ddots & \ddots & \vdots \\ 0 & 0 \ldots & \ldots & 0 & 1 \\ a_{1} & a_{2} & \ldots & a_{n-1} & a_{n}  \end{pmatrix}$, for som $a_1 , a_2 , \ldots , a_n \in F$.


Java- Why do i get a Nullpointer exception?

So i have 2 different arrays that should be the same (?) that are just declared in different ways and are named differently:  public static int[][] box = new int[10][5]; public static int[][] testBox ={{0,0,0,0,0},{0,0,0,0,0},{0,0,0,0,0}, {0,0,0,0,0},{0,0,0,0,0},{0,0,0,0,0},{0,0,0,0,0},{0,0,0,0,0},{0,0,0,0,0}, {0,0,0,0,0}};   Now i have the followming Method:  public static boolean putProductIntoBox(int[] product) {      if ((getFreePositionToFit(product) != null) && (remainingWeight >= product[2])) {         for (int i = getFreePositionToFit(product)[0];i-getFreePositionToFit(product)[0] < product[1]; i++) {   67          for (int j = getFreePositionToFit(product)[1]; j-getFreePositionToFit(product)[1] < product[0]; j++) {                    testBox/box[j][i] =  product[3]; // <- testBox works , box not              }         }         remainingWeight -= product[2];         return true;     } else {         return false;     }  }   Now what really boggles me :   I go into the method with a product[0] being 10 (length of the product) and product[1] being 5 (width of the product).  Now look at line 4 of the method : If i run it with testBox[j][i] it works just fine  If it run the method with box[j][i] i get a NullPointerException in line 67  (The other methods in putProductIntoBox work fine , tested them)  Could someone tell me why that is and how i fix it ?  Thanks


from editor assignment pending to "Reviews Completed"

I submitted a paper to one of the Springer Journals through Editorial Manager almost 2 months back. The status changed from "editor assignment pending" to  "Reviews Completed" since past three days. Can anybody suggest what does it actually mean ? D


How long can pie batter stay in the refrigerator?

If I prepare a mixture for pumpkin pie or sweet potato pie, which has eggs in it, how long is it safe to stay refrigerated before I pour it in a pie shell and bake it?


I was correcting an ESL learner who said "It is the way how we write."  I realize "It is the way we write" is correct and "It is how we write" is correct, but "It is the way how we write" looks wrong to me, despite that when I say it out loud it sounds perfectly normal if I'm speaking fast. What I mean is, if an ESL learner said it, it would sound wrong. But when I say it as a native speaker, it seems okay though not felicitous. So I can't tell.  Is it grammatically wrong?


Delete all hidden files recursively in current directory

I have a directory which contains hidden files and by that I mean, not just the files whose name starts with . but also the files whose name contains ~ character at the end like somefile.txt~.  I want to delete only those files (the remaining files need to be unaffected) in an efficient way.  How I can achieve that with a single command ?  Ubuntu 14.04 Trusty Tahr.


I have to find $r'(t)$ and $||r'(t)||$ for $r(t)=<t,t,t^2>$, which I know how to do.  $r'(t)=<1,1,2t>$ $||r'(t)||=\sqrt{2+4t^2}$  The problem is that my professor didn't explain how to find where each curve hits the $x-y$ plane (if it hits).  I'm guessing that I have to make $z=0$, but where?


Weird UI bleeding. Anyone know the cause/fix?

I'm using Blender 2.71, and a day or two ago this weird UI glitch started occuring:   ^ Here's a screenshot of it.  The bleeding seems to trigger in various ways, the most common one being changing the user perspective viewing angle. The bleeding starts slow, going down one line at a time blurring the content (and diagonally, as you can see in the upper left).  Mousing over a bled UI element restores it to normal. I tried resetting to factory settings as well as changing the window size (full screen, small, etc) but to no avail.  I haven't had any graphical issues with other software (including games) so I doubt it's a graphics card issue.  I'm going to try and reinstall Blender and make sure my graphics drivers are up to date, hopefully that will work.  Any other suggestions?  Thanks in advance!


If $a \equiv r_i^2 \mod p_i$ for every prime divisor $p_i$ of $b$, then $a$ is a square modulo $b$.

Let $a,b,r_i\in \mathbb{Z}$. How to show that if $b$ is squarefree and $a \equiv r_i^2 \mod p_i$ for every prime divisor $p_i$ of $b$, then $a$ is also a square modulo $b$.  Approach: I think I have to use CRT in some way, but I don't see how it follows from that. Can someone explain it to me? Thanks!


Recently I have updated my postgresql version. I have also upgraded pgAdmin from 3 to 4. But I was unable to load shapefile. I didn't find any plugin called shapefile loader. How can I get the shapefile loader plugin in pgAdmin 4?


I got interested in the recursion  $$ a_{n+1} = a_n + \frac1{a_n} $$ in response to a question on this site (which I can no longer locate).   I thought this would be a relatively easy one to solve as an explicit function of $n$.  For instance, the closely related recursion  $$ b_{n+1} = \frac12 \left( b_n + \frac1{b_n} \right) $$ is the sequence of guesses in Newton's algorithm for $\sqrt{1}$, given a starting guess $b_0$, and that turns out to be $$ b_{2k} = \tanh\left( 2^{2k} x \right)\\ b_{2k+1} = \frac{1}{ \tanh\left( 2^{2k+1} x \right)}  $$ with $x = \tanh^{-1} b_0$.  But the recursion for $a$ is a tougher nut to crack.  Although I'd llike to have in in explicit form, that might not be practical (I tried various things, including Jacobi elliptic functions, but I nevery quite get the right identities).  This question asks to prove something about the asymptotic behavior of $a_n$ for the case of arbitrary  $a_0>0$, namely that   $$ \lim_{n\to\infty} \frac{H_n^4}{a_n} = \lim_{n\to\infty} \frac{a_n} {H_n^5}=0 $$ where $H_n$ are the harmonic numbers  $$H_n \equiv \sum_{m=1}^n \frac1m$$


Can a Power Set be a Subset or Element of its Set


Let $A \in L(V)$ where $V$ is finite-dimensional inner-product space such that $\langle x,y \rangle = 0 $ implies $\langle Ax,Ay \rangle = 0 $. Show that there exist $U$ and $\lambda$ such that  $A=\lambda U$ where $U$ is unitary operator on $V$ and $\lambda$ scalar.  I am given a Hint: If normed vectors $x$ and $y$ are orthogonal,$\langle x,y \rangle = 0 $ then $\langle x+y,x-y \rangle = 0 $.


If $p,q,r$ are all primes,and $p|qr-1$,$q|pr-1$ and $r|pq-1$,find all possible values of $pqr$.

If $p,q,r$ are all primes,and $p|qr-1$$~~~~~~~~~~~~~$$q|pr-1$$~~~~~~~~~~$ and $~r|pq-1$. Find all possible values of $pqr$.    My work: $qr-1=pk_1$ $pr-1=qk_2$ $pq-1=rk_3$ From the above equations, we can conclude that either $k_1,k_2,k_3$ are all even or one of the primes is $2$. I can also get that, $p^2q^2r^2=(pk_1+1)(qk_2+1)(rk_3+1)$ Now, I cannot proceed. Please help!


I like to use the Ctrl or Alt + Number shorcut to jump quickly to a specific tab. Problem is: When you have a lot of tabs open it is hard to look at them and quickly know which one is tab number 7.  Is there a way (extension possibly) to show a tab's number in its title? This way each tab would have a number added to its title right beside the . This way you could immediately tell which number you need to press to jump to a specific tab.  I use both  and Firefox, so I'm accepting answers for either one (though I'd prefer both =) ).


Approximate distribution of product of N normal i.i.d.? General case

Given  $N\geq30$ i.i.d. $X_n\approx\mathcal{N}(\mu_X,\sigma_X^2)$,  and NO assumptions about $\mu_X$ and $\sigma_X$, looking for:   accurate closed form distribution approximation of $Y_N=\prod\limits_{1}^{N}{X_n}$ asymptotic (?) approximation of same product    This is a general case, there are also some special cases:  A)   B)


Dualboot: I can access Ubuntu, but not Windows

today I installed Ubuntu in a new partition. I can boot Ubuntu, but not Windows. Here's a video showing the problem:   Is there a solution or all my Windows-related data is gone?  Greetings!  EDIT: Boot-Info pastebin link:


What happens after I grapple as Attack of Opportunity?

Assume that my character has Improved Unarmed Strike (to threaten squares nearby) and Improved Grapple (to prevent getting AoOs from grappling). Now, an enemy provokes attack of opportunity.  states that attempting to grapple is an attack, so it can be done as an attack of opportunity. Thus, my character decides to grapple instead of just attacking. My character hits the melee touch attack, and now he can grapple the opponent.  My question is:    states that holding by making opposed grappling check is actually a free action, which can be done only in my turn. Normally this shouldn't be a problem, but since this isn't my turn, it means I cannot perform my opposed grappling check. Does this mean I cannot maintain grapple until I get to my turn? Or, should I disregard the "free action" thing? If I successfully grab an opponent casting a spell with somatic component (via an AoO), what happens to the spell? I know that spellcasters cannot start casting spells with somatic component, but what happens to a spell that was being cast? This may be ridiculous, but can I grapple an opponent trying to grapple (without Improved Grapple) as an AoO?


Can infinite-dimensional vector spaces be decomposed into direct sum of its subspaces?

I'm reading Axler "Linear agebra done right" and in Chapter 1 he discusses subspaces and direct sum. My question is, are there subspaces of the infinite-dimensional vector spaces, e.g. a functional Banach space with sup norm $V$ that directly sum to the entire space $$V = U_1\oplus U_2$$ (except for trivial $U_1=\{0\}$, $U_2 = V$).


Optimizing Update Query with compound index

I tested an update between two large (~5 mil records each) which was taking 10 seconds or so per update. So, doing Explain for my very first time tested the select:  SELECT     T1.Z, T2.Z FROM     TableB T1 INNER JOIN TableL T2     on T1.Name=T2.Name     and T1.C=T2.C    and T1.S=T2.S    and T1.Number>=T2.MinNumber    and T1.Number<=T2.MaxNumber   Explain returned the following as possible keys:   Name C S Number   and chose C as the key.  I was told that my best bet was to make a compound key, and in the order of the select so I did  Alter Table TableB Add Index Compound (Name,C,S,Number)   And did an explain again, hoping it would choose my compound but now even though it shows the compound index as a possible key it still chooses Index C.  I read that I can force the index I want with:  SELECT     T1.Z, T2.Z FROM TableB T1 Force Index(Compound) INNER JOIN TableL T2     on T1.Name=T2.Name     and T1.C=T2.C    and T1.S=T2.S    and T1.Number>=T2.MinNumber    and T1.Number<=T2.MaxNumber   yet I am not sure if it makes any sense to over-ride MySql's selection and, given that if it doesn't help the update is going to take almost two years it doesn't seem like a smart thing to test.  Is there some step I am missin? Do I need to remove the other keys so that it chooses my compound one and if so how will I know if it will even make a difference (given that Mysql saw it and rejected it)?    Explain output on T1: (note: I did not yet add the Compound Index as the table is huge and it might be wasted time until I figure this out. I previously added it on a highly truncated version of the table but that won't help with this explain) Table1   select_type: simple type: ref  possible_keys:  Number,C,S,Name  key: Name  key_len: 303  ref: func  rows: 4  Extra: using where   Explain for Table2   select_type: SIMPLE type: ALL possible_Keys: MinNumber, MaxNumber key: key_length: ref: rows: 5,447,100 Extra:   Cardinality (only showing indexes relevant here as there are a few others):   Primary: 5139680 Name: 1284920 Number: 57749 C: 7002 S: 21


I installed Ubuntu alongside with my Windows 8. I have 3 partitions. After installing Ubuntu I am unable to boot into Windows 8.  The error screen that I get says:   Windows Boot Manager   Windows failed to start. A recent hardware or software change might be the cause.   To fix the problem:    1. Insert your Windows installation disc and restart your computer.    2. Choose your language settings, and then click "Next."   3. Click "repair your computer."  If you don't have this disc, contact your system administrator or computer manufacturer for assistance.     File: \Boot\BCD      Status: 0xc000000c      Info: The Boot Configuration Data for your PC is missing or contains errors.  I tried running Boot-Repair, but it still hasn't worked. Here's the . Also here's a screenshot from GParted.


Reviewer of PhD thesis doesn't allow me to write in the first person singular

In my PhD thesis, I often used the first person singular during the description of the problem and the discussion of the results. One comment from the reviewer states that because I did not use the third person, the entire thesis must be revised accordingly.  I understand that in a journal article one should use the third person to describe the problem and discuss the findings. However, I always supposed that one can use the first person in a PhD thesis because I saw many researchers doing so. Could anybody give me a suggestion about how to deal with the reviewer who doesn't accept my choice to write in the first person?


Is there a way to set font arial and font size 8.5pt using TexStudio? Which documentclass can apply font size 8.5pt?


Thank You for inviting Steve and {me/I}?

When writing a thank you note from a husband and wife, is it correct to write the note as...     "Thank you for inviting Steve and me to your home for the birthday celebration."    Or is it,     "Thank you for inviting Steve and I"?    This seems so simple but yet I get stumped every time :/


summation of multiplying series with negative terms

i know the summation of $1 \times 2 + 2\times 3 + 3\times 4 = \frac{k(k+1)(k+2)}3$ but this one has negative terms. so we need to find below  $$\sum_{i=1}^n(-1)^{i+1} (i(i+1))$$  e.g. $1\times 2 - 2\times 3 + 3\times 4 ....$  if you can share the derivation then it would be very great.


Unable to install the correct software version via apt

I installed KiCad using the Ubuntu Software application. It installed version 4.0.7 which seems to be outdated. When I started it I encountered cursor ghosting like in the screenshot below. This is usually fixed by installing the latest build, following  But no matter how hard I try I did not manage to install version 5.16. It always installs 4.0.7. $ sudo apt list kicad Listing... Done kicad/bionic,now 4.0.7+dfsg1-1ubuntu2 amd64 [installed]  $ sudo apt update Hit:1 http://de.archive.ubuntu.com/ubuntu bionic InRelease Hit:2 http://ppa.launchpad.net/kicad/kicad-5.1-releases/ubuntu bionic InRelease Hit:3 http://de.archive.ubuntu.com/ubuntu bionic-updates InRelease              Hit:4 http://de.archive.ubuntu.com/ubuntu bionic-backports InRelease            Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease               Reading package lists... Done                      Building dependency tree        Reading state information... Done All packages are up to date.  the source is being updated so why can't I get the software from it? How can I get a newer software version from a source other than the official Ubuntu repository?


Using jQuery to center a DIV on the screen

How do I go about setting a <div> in the center of the screen using jQuery?


How I can Sync Between Iphone 5s and Ubuntu 16.04 LTS

I have Iphone 5s and I want to have access to my photos, videos, music from Ubuntu laptop 16.04 LTS  I tried these 4 answers which are in this question and it did not work


Logistic regression with unbalanced sampling

Lets say I have a dataframe that looks like this:  groups <- floor(runif(1000, min=1, max=5)) activity <- rep(c("A1", "A2", "A3", "A4"), times= 250) endorsement <- floor(runif(1000, min=0, max=2)) value1 <- runif(1000, min=1, max=10) area <- rep(c("A", "A", "A", "A", "B", "C", "C", "D", "D", "E"), times = 100)  df <- data.frame(groups, activity, endorsement, value1, area)   printed:  > head(df)   groups activity endorsement   value1 area 1      1       A1           0 7.443375    A 2      1       A2           0 4.342376    A 3      1       A3           0 4.810690    A 4      4       A4           0 3.494974    A 5      3       A1           1 6.442354    B 6      1       A2           0 9.794138    C   I want to run a logistic regression (predicting endorsement from groups), but if you look at the area variable, A is very well represented, whereas B and E are not.  I'm not interested in the area variable itself, but the stats will be driven by areas that have high representation in the dataset, so I need to weight the data but I'm not sure the correct way to do it  This is the model I'd like to run:  library(lsmeans) model <- glm(endorsement ~ factor(groups), data=df, family=binomial(logit)) anova(model, test = "Chisq") lsmeans(model, pairwise ~ groups)   Without any adjustment, the "main effect" of groups and any pairwise differences will primarily be driven by any effects found in the most represented area (in the actual dataset area A has about 100x more subjects than any other area)  Whats the correct way to adjust for the unbalanced area representation? I thought about upsampling the minority groups (or even downsampling the majority group) but I feel like this would have adverse/artificial effects on the power of the test?


Usually I don't mind about LaTeX's compilation speed, because a paper of less than 20 pages is compiled rather fast.  However, I am working on a large document - A report with more than 80 pages.  Compilation times are starting to slow me down.  I saw the couple of answers here on this topic, but most of my graphics are external and I don't use Tikz.  As a matter of fact, I'm not sure what's slowing the compilation down, other than the amount of text and required layout.   What's your best speeding-tex-up trick, other than externalizing graphics and pre-compiling the preamble? How can I know what's slowing TeX down?


How to animate daily data in QGIS time manager plugin by changing color of polygon instead of plotting markers

I 'm a beginner in QGIS in general and geo spatial data visualization.  Given a vector type map (.tab file) of districts geographically spanning my business area and csv file containing weekly sales volume per district. I tried to animate the weekly sales per district using QGIS time manager plugin. How to animate data from the csv by changing the vector map color , instead of plotting separate colored markers ?  I expected my result would be like this :


How To Store Tamil Font in mysql database

<?php  $servername = "localhost"; $username = "root"; $password = ""; $dbname = "test"; $conn = mysqli_connect($servername, $username, $password, $dbname); $sql = "Insert into tbl (name) VALUES ('ஆன்லைனில்')"; $result = mysqli_query($conn, $sql);   But Its Store Db in        à®†à®©à¯à®²à¯ˆà®©à®¿à®²à¯


Does this map extend to a unique automorphism of the polynomial ring of an integral domain?

Suppose that $A$ is an integral domain. If $a,b$ are element of $A$ and $a$ is a unit, then how come the change of variable $X\mapsto aX+b$ extends to a unique automorphism of the polynomial ring $A[X]$, which equals the identity map when restricted to $A$?  Thanks for any ideas or ways to get started.


$d_1(x_1,y_1)$ and  $d_2(x_2,y_2)$ are metric on $X$ and $d(x,y)$ is defined as: $$d(x,y)= \sqrt{d_1(x_1,y_1)^2+d_2(x_2,y_2)^2}.$$ I am trying to show this is a metric. Can you give me some clue about proving the triangle inequality for $d$ ? Thank you for your help.


The dimension of the intersection of two vector subspaces

We're given: $$ V = Span\left\{ \begin{bmatrix} 2 \\ 2 \\ 2 \\ 1 \end{bmatrix}, \ \begin{bmatrix} 2 \\ 1 \\ 1 \\ 0 \end{bmatrix}, \ \begin{bmatrix} 5 \\ 4 \\ 1 \\ 1 \end{bmatrix}  \right\} \ \ \   \mathrm{and} \ \ \ W = Span \left\{\begin{bmatrix}1\\-3\\2\\1 \end{bmatrix} \right\} $$  and we're asked to find $\mathrm{dim}(V\cap W^{\bot})$  Here's my approach. First, by inspecting the basis of $W$, I managed to construct a basis for $W^{\bot}$, which is the following: $$W^{\bot} = Span \left\{\begin{bmatrix} 3 \\ 1 \\ 0 \\ 0 \end{bmatrix}, \begin{bmatrix} -2 \\ 0 \\ 1 \\ 0 \end{bmatrix} \begin{bmatrix} -1 \\ 0 \\ 0 \\ 1 \end{bmatrix}\right\}$$ Then, for each vector $\textbf{w}$ in the basis of $W^{\bot}$, I tried to see if the system $A\textbf{x}=\textbf{w}$ was compatible or not. In this case, I found out that the system was only compatible with two of the vectors in $W^{\bot}$, thus indicating me that $\mathrm{dim}(V \cap W^{\bot} ) = 2$ (which is correct).  What I do not get, however, is  that since the dimension of the intersection is $2$, why aren't two of the vectors in the basis of $V$ orthogonal to the vector which spans $W$ (that was my initial approach, i.e try to see which vectors of the basis of $V$ are orthogonal to the vector that spans $W$).  Also, I was wondering if there was a simpler/quicker way of doing this.


Print the key for the maximum out of data set

Currently my data set is:  {('NSW', '06'): 0.4, ('QLD', '06'): 0.2, ('VIC', '06'): 0.0, ('NSW', '07'): 0.2, ('QLD', '07'): 0.4, ('VIC', '07'): 0.0, ('NSW', '08'): 0.2, ('QLD', '08'): 0.2, ('VIC', '08'): 0.0, ('NSW', '09'): 0.2, ('QLD', '09'): 0.2, ('VIC', '09'): 0.0, ('NSW', '10'): 0.2, ('QLD', '10'): 0.2, ('VIC', '10'): 0.0, ('NSW', '11'): 0.2, ('QLD', '11'): 0.6, ('VIC', '11'): 0.0}   I have achieved this from doing:  key = (state,month)     if key not in rainfall_and_month:         rainfall_and_month[key] = rainfall     if key in rainfall_and_month:         rainfall_and_month[key] = min(rainfall, rainfall_and_month[key])   I wish to print out the largest value out of the key-value pairs. So basically I would like to make the code find "('QLD', '11'): 0.6", and then print out,  A-value: QLD B-value: 11   separately, so I would probably end up doing  print("A-value:", state) print("B-value:", month)   However I'm not sure as to how to find the largest value then extract those data points.


How do I tell exactly what time an answer was posted?

When answers to a question are posted it is indicated (above the poster's ID) in-terms of the time difference between now and the time of the post.  In the early minutes after an answer, that time is rounded to the minute.  Just curious, but does it round up or down?  Or does it go to the closest minute?  The reason I ask, is because on  today Joe and I posted within a short time of each other.  His did not appear until after I posted mine.  Yet, in the comments someone comes-out and accuses me of poaching Joe's answer saying "there's 2 minutes between the answers."  I wanted to reply with something to the effect of it being a potential difference of 61 seconds or so, but I didn't want to assume that it rounds-up.


Why are my pictures showing a dark band on one edge?

I run an online shop and I have been using Nikon 3100 for many years. Recently I started to notice that in all the pictures the right side slowly gets dark and there is a dark slit almost look like a vignette on the edge. I knew there were something not right but I could still use photoshop to solve that problem.   But all of sudden all the pictures are looking like that since yesterday. I use two strobe lights and manual mode to take studio pictures, strange thing is the shadow only appears in that circumstances. The pictures are absolutely normal when I use the other modes. My shutter speed is 1/250.   Can anyone tell me what’s wrong with my camera? Is it the shutter?


I'm interested in the different ways of proving this, any proof is welcome. I understand one way is the cosine sum/difference formula, another is using a right angled triangle. Are there any others? Thanks.


Moment Of Inertia and Stability of Rotation

In the last 10 seconds of the video,the guy says that the rotation is unstable, the the moment of inertia is intermediate, why is this so? Is it as rotation from the other axes also contribute?


How to prevent my app from crashing when handling any error?

I use a OnClickListener to execute a method this way :      b= (Button) findViewById(R.id.b);     b.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {             if (on){                 try {sendData("b");} catch (IOException e) {e.printStackTrace();}             }             else {Toast.makeText(getApplicationContext(), "You should turn bluetooth on!", Toast.LENGTH_SHORT).show();}         }     });   sendData method :  public void sendData(String s) throws IOException {     try {         byte[] byteString = s.getBytes();         outputStream.write(byteString);         outputStream.flush();         Toast.makeText(getApplicationContext(), s + "sent", Toast.LENGTH_SHORT).show();     }catch (IOException e) {         Toast.makeText(getApplicationContext(), s + "not sent", Toast.LENGTH_SHORT).show();         e.printStackTrace();} }   this makes my app crashes if on = true     03-28 08:37:09.733 28841-28841/com.android.map.brasrobotique   E/AndroidRuntime: FATAL EXCEPTION: main                                                                                Process: com.android.map.brasrobotique, PID: 28841                                                                                java.lang.NullPointerException                                                                                at   com.android.map.brasrobotique.MainActivity.sendData(MainActivity.java:221)                                                                                at   com.android.map.brasrobotique.MainActivity$2.onClick(MainActivity.java:77)                                                                                at android.view.View.performClick(View.java:4633)                                                                                at android.view.View$PerformClick.run(View.java:19270)                                                                                at android.os.Handler.handleCallback(Handler.java:733)                                                                                at android.os.Handler.dispatchMessage(Handler.java:95)                                                                                at android.os.Looper.loop(Looper.java:146)                                                                                at android.app.ActivityThread.main(ActivityThread.java:5602)                                                                                at java.lang.reflect.Method.invokeNative(Native Method)                                                                                at java.lang.reflect.Method.invoke(Method.java:515)                                                                                at   com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)                                                                                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)                                                                                at dalvik.system.NativeStart.main(Native Method)   how to prevent it from exiting?  thank you!


Prove that $a^{2^n} \equiv 1 \pmod{2^{n+2}},$ where $a$ is an odd integer.

Establish that if $a$ is an odd integer, then for any $n\ge1$ $$a^{2^n}\equiv1\pmod{2^{n+2}}.$$   [Hint: Proceed by induction on $n.$]   This is a problem from Elementary Number Theory by David M. Burton.  For $\underline{n=1},$ this statement is essentially saying that $$a^2\equiv1\pmod{2^3=8},$$ which is true because $a$ is odd. Suppose that this statement is true for $\underline{n=k}$. Then,$$a^{2^k}\equiv 1\pmod{2^{k+2}}.$$ Squaring this congruence, I arrived at $$a^{2^{k+1}}\equiv1\pmod{2^{k+2}},$$ but how do I change the modulus, i.e., $\pmod{2^{k+2}}\to\pmod{2^{k+3}}?$


Improving our spatial data by calculating "Close to Coastline", "Close to Park", "Close to Stadium" etc

A quick background for context is maybe helpful for this.  Essentially we have "vacation rentals" and I would like to add additional data to them automatically. We create booking websites for customers who have very niche sites, for example,    "Pet Friendly" rentals.  "Olympic Cottages" "Surfing Adventure Lettings".    Quite often each of our customers always ask the same questions,   "It would be awesome if we could plot the distance and sort properties based on their relative distance from XYZ".   Usually XYZ is something like a list of dog friendly beaches, or cycle tracks, or wine vinyards. So esesntially points of interests which are easily definable. In those cases, we've always just asked the customer to provide a list of the lat/lngs of every possible "point of interest" that they would like us to calculate distance from".  More recently we've been asked to include "Close to Coastline".   What I want is to come up with a standard way of automating this. My ideas so far are to create a shapefile. For example, let's say we wanted to do "Close to Coastline", we could use something like     At this point, I'm somewhat stuck in knowing how would be most efficient to calculate the distance from the edge of the coastline.   I'm thinking about being able to just create/add a shapefile per "concept" that the customer wants us to use for their product. But then do not know the process/tools available to me to know distance from each edge, or vector point.


Minecraft NEI it is stuck in recipe mode I tried everything. How to get it to cheat mode?

I'm just playing FTB Infinity and my cheat mode For NEI dose not work. I could really use some help. If anyone would know how to fix it I need the answer. I have image of my config if that helps


What exactly happens when you format/wipe a hard drive ? Is it overwritten with random data or something else ? Is the format process the same for all types of hard drives and for all brands ? Also, will it be harder to recover data from my hard drive if I format is repetedly, like 15-20 times ?


PGFplots 3d: Creating a filled solid of revolution

I have searched throughout the internet for a solution, but since I'm not that skilled with pgfplots, I need your help. For several examples I want to draw solids of revolution, but filled ones. I started with this one:  \documentclass{scrartcl}  \usepackage{mathtools} \usepackage{amssymb} \usepackage{pgfplots} \pgfplotsset{width=10cm, compat=1.8}  \begin{document}  \begin{center} \begin{tikzpicture}     \begin{axis}[         title={Rotation um die x-Achse},         colormap/greenyellow,         view={15}{30}]              \addplot3[             surf,             shader=faceted,             samples=50,             domain=0:6,y domain=0:3*pi/2,             z buffer=sort]         (x,{(((2*x^4)/27) - ((4*x^3)/9)) * cos(deg(y))}, {(((2*x^4)/27) - ((4*x^3)/9)) * sin(deg(y))});     \end{axis} \end{tikzpicture} \end{center} \end{document}   It's open on the upper side and you can see "into" the shape. Since I need the volume of the shape in my examples, I wanted them cuts to be solid areas, like you cut them away with a knife. In the end, I like this quarter area to be half opaque, so you know it's the full object, but also be able to see if it's solid inside or hollow.  I have seen , but those links and other questions here didn't fit.  I also have some examples, where you need to calculate the volume of two rotated functions, one subtracted from the other. So there would be a hollow inside.  I'm not quite sure how to explain it, maybe I can create a decent drawing to make it clear. I hope you can help me! Thanks!


How to achieve photo with no blurred background

When zooming I want to keep background not blurred. Is this even possible? I will have multiple cameras pointing at one object from different distances can I get a flat picture on all of the cammeras without getting Dof if yes how?


If I know that $EX^4=1$ and $EX\leq0$, how do I get an upper bound for $EX^3$? I know that by Jensen's inequality, $EX^3\leq1$, but I need the upper bound less than 1.


How to handle relative urls correctly with a nginx reverse proxy

Sure I'm not the first one that tried to serve a domain example.com from a example.net/bbb, but I haven't found a solution yet.  My NGINX configuration follows the  and looks something like this:  server {     listen 80;     server_name example.net;     root /path/to/aaa;      location /bbb/ {         proxy_pass http://example.com/;         proxy_set_header Host $host;         proxy_set_header X-Real-IP $remote_addr;     }      location / {         try_files $uri $uri/ /index.html;     }     location ~ \.(svg|ttf|js|css|svgz|eot|otf|woff|jpg|jpeg|gif|png|ico)$ {         access_log off;         log_not_found off;         expires max;     } }   I can manage to render the root of example.com in example.net/bbb but:  ISSUE 1  example.net/bbb/some/path doesn't work as expected and the index.html of example.net is rendered.  ISSUE 2  Any asset in example.com/assets gives 404 because the browser look for example.net/assets. Be great if I could solve this without placing absolute paths everywhere.


Stuck at 98.7% complete in Stranger Things. What am I missing?

I have completed every level and every quest (that I know of) in the game, but I am only at 98.7% complete.  I have found all 8 Eggos, all 8 VHS tapes, all 12 garden gnomes, and all 40 heart pieces. I've unlocked Eleven and watched the movie in the Hawk Theater.  In my inventory, I have 3 backpacks, an aluminum bat, a D-cell flashlight, a Canadian tuxedo, a 20-sided die, a spiked club, and a Ghostbusters lunchbox. I also have the hazmat suit, dynamite, flowers, and the key, but those are all required to complete the game anyway. There are no quest items remaining and I've talked to everyone in the game.  What am I missing?  I'm playing on hard if that makes a difference.


Sequence $\{a_n\}$ and $\{b_n\}$ satisfy $a_n \to c, b_n \to c $ , and $a_n\lt c \lt b_n $. $f'(c) $ exists. Prove $$\frac{f(a_n)-f(b_n)}{a_n-b_n}\to f'(c)$$ I have a rough idea like this, $$\frac{f(a_n)-f(b_n)}{a_n-b_n}=\frac{f(a_n)-f(c)-(f(b_n)-f(c))}{a_n-b_n}=\frac{f(a_n)-f(c)}{a_n-b_n}-\frac{f(b_n)-f(c)}{a_n-b_n}=\frac{f'(c)\cdot(a_n-c)}{a_n-b_n}-\frac{f'(c)\cdot(b_n-c)}{a_n-b_n}=f'(c)$$ But obviously not strictly. So how to do this thing strictly?


Why is my button not conforming to the rest of my webpage?

This is the code in my view:   @model SuburbanCustPortal.Models.CustomerModel   @{      ViewBag.Title = "Customer Summary"; }
Customer Summary Screen

      Please select an account below or add an existing account.
      @using (Html.BeginForm()) {       @Html.ValidationSummary(true, "Account     creation was unsuccessful. Please correct the errors and try again.")
      <fieldset>        <legend>Existing Accounts</legend>         @Html.Action("ExistingAccounts2")
          <input type="submit" value="Add an Account" />
      </fieldset>
  }   I have this code in the partial view that is being called by the above:   @model SuburbanCustPortal.Models.CustomerModel
  @foreach (var usr in ViewBag.CustomerData)  {
              @using (Html.BeginForm("ShowCustomer","Customer"))        {          <input class="button" id="@usr.AccountId" type="submit" value="Submit" />        }      	      @usr.Branch@usr.AccountNumber	      @usr.Name	      @usr.DeliveryStreet
  }

   It displays like this:    Why is my button showing up above the rest of the text?  I have no css on the site at this point so that shouldn't interfere...  What am I overlooking?


I have recently been looking at the hidden IV's of my pokemon and I noticed that the pokemon I get from hatching tends to be quite a bit higher than what I find in the wild. Do hatched pokemon tend to have higher IV's than ones in the wild?


How to compute $\int {\frac{1}{{4 - 9{x^2}}}dx} $?

How can I evaluate the following integral  $$\int {\frac{1}{{4 - 9{x^2}}}dx} $$


What is it called when you use the word 'you' like in this sentence to refer to any person and not just you specifically?

While having a conversation, I say: "When you say atheist, most people would imagine an anti-religious person". What I meant by 'you' is actually anybody. When I am using 'you' in such a manner, what am I doing? Is there a name/word for it? Is it using a 'figure of speech'?   Thank you


Create Blank Space after special character at end of a word

I am writing part of a text where i need danish encoding/characters. The main language however is english. So i choose to add the special chars in textmode. I am facing now the problem that if a word ends on a special character it gets automatically concatenated with the next word. So   p\aa folks    should be   på folks    but it is   påfolks    I am using now some horizontal spacing makros like \, but is there a more elegant way? Also i haven't found a macro which provides the default space between two words


It is apparently the case that if $X_i \sim N(0,1)$, then  $X_1 X_2 + X_3 X_4 \sim \mathrm{Laplace(0,1)}$  I've seen papers on arbitrary quadratic forms, which always results in horrible non-central chi-squared expressions.  The above simple relationship does not seem at all obvious to me, so (if it is true!) does anyone have a simple proof of the above?


How to bake chicken with a slight crunch?

Lately, I’ve been eating a lot at my favourite local fast casual restaurant. What I keep noticing is that they bake their chicken strips with a very slight burnt crust. This gives a really nice, almost crunchy bite to the chicken. I’d love to know how to bake the chicken to get it like this.


What file sizes and formats are most appropriate for enlarging and projecting an image onto a large wallspace for painting?

I think my title question says it all. I have hand drawn some designs (A3) that will be projected onto a 9m X 7m brick wall. This design will be painted as a mural.  I'm concerned about the appropriate file size and format to use as I need to retain a clear image to work with.


The question is quite similar to  and I was trying to rely on the top answer, but still am a bit confused, so any explanation and help will be much appreciated.  Assume I have a bunch of ciphertexts with the same key. I need to decipher one of them. At the moment I understand that I need to XOR the desired one with each of the rest, but I am confused whether I should do it one by one or XOR it will all at once?  Where do I go from there checking whether there's been a space or no, surely all of them will have spaces in different places? How do I recover the symbols then? Thank you so much.


How come if $\ i\ $ not of the following form, then $12i + 5$ must be prime?

I know if $\ i\ $  of the following form $\ 3x^2 + (6y-3)x - y\ $ or $\ 3x^2 + (6y-3)x + y - 1, \ \ x,y \in \mathbb{Z}^{+},i \in \mathbb Z_{\ge 0}$,  then $\ 12i + 5\ $ must be composite number, because:  $12(3x^2 + (6y-3)x + y - 1) + 5 = 36x^2 + (72y - 36)x + (12y - 7) = (6x + 12y - 7)(6x  + 1)$  How come if $\ i\ $ not of the following form $\ 3x^2 + (6y-3)x - y\ $ and $\ 3x^2 + (6y-3)x + y - 1\ $,  then $12i + 5$ must be prime? $\ x,y \in \mathbb{Z}^{+},i \in \mathbb Z_{\ge 0}$.  For example: $\ 5 = \ 3*1^2 + (6*1-3)*1 - 1\ $ ,when $\ x = y = 1\ $, as proved before,$\ 5*12+5\ $ must be composite number;  $\ 0, \ 1. \ 2.\ 3.\ 4\ $ can't of the following form $\ 3x^2 + (6y-3)x - y\ $ and $\ 3x^2 + (6y-3)x + y - 1\ $,  $\ 12*0 + 5 = 5\ $, $\ 5 $ is prime,$\ 12*1 + 5 = 17\ $, $\ 17 $ is prime, and so on, sure this is true and there's a long proof, but too long to see.


Can you create concatenate variable names in LaTex?

I would like to create variables to hold strings like f(x)=3x+1 to be inputted into an exam questions.  I can create variables like \funA, \funB, … et cetera. The problem is how do I reference them using A, B, … et cetera.  \documentclass[12pt]{exam}  % conditional statements \usepackage{xifthen}  \newcommand{\exam}{A}  \newcommand{\funA}{$s(t) = 12t^2 -7t + 16$} \newcommand{\funB}{$s(t) = 16t^2 +3t + 10$} \newcommand{\funC}{$s(t) = 12t^2 + t + 10.$}  \begin{document}  \begin{questions}  \question % I would like \fun\exam to return \funA when \exam = a. Sadly it doesn't   The position of an object moving along a straight line is given by \fun\exam. Find the average velocity of the object over the interval $[1,1+h]$ where $h>0$ is a real number.  \question % this works but is a lot to write when accommodating 10 stored functions  \ifthenelse{\equal{\exam}{A}}     {         \newcommand{\function}{$s(t) = 12t^2 -7t + 16.$}     }     {         \ifthenelse{\equal{\exam}{B}}             {                 \newcommand{\function}{$s(t) = 16t^2 +3t + 10.$}             }             {                 \newcommand{\function}{$s(t) = 12t^2 + t + 10.$}             }     }  The position of an object moving along a straight line is given by \function\ Find the average velocity of the object over the interval $[1,1+h]$ where $h>0$ is a real number.  \end{questions} \end{document}


What is the difference between \mathbin vs. \mathrel?

These seem to be very similar as they both separate two operands. When would one be used over the other? Is there any difference in the math spacing surrounding them?  How would the spacing in these relate to to the spacing produced by \mathop?


How do I prevent Google Analytics from sending cookies to cookie-less subdomains?

I'm trying to keep GA from setting cookies on static files like images. All the files concerned are loaded from cookie-free subdomains. Is there a way to exclude these subdomains from getting the cookie that is set by Google Analytics?


How to integrate $\int_{0}^{\infty}\frac {\sin^{2n+1}x}{x} dx$

Question: How to prove that $$\int_{0}^{\infty}\frac {\sin^{2n+1}x}{x} dx=\frac {π(2n)!} {2^{2n+1}(n!)^2},\qquad n\ge 0$$   This integral looks tricky, i tried many methods but all fails due to $(2n+1)$ in power which makes difficult to proceed further.  I'm very interested to see the proof.


Schengen visa canceled due to itinerary change?

I applied and got a multi entry C Schengen visa from France valid for 3 months. My original trip was  France- 5N,  Austria- 3N,  Czech Republic- 1N,  Germany 6N,  France- 1N  However, we decided that we want to spend some time in Greece instead of France so now the itinerary is  France- 1N,  Greece- 4N,  Austria- 4N,  Czech Republic- 2N,  Germany 4N  France- 1N  At first I applied to France because I will be in Germany and France for the same amount of days and France is my port of entry. With the itinerary change, France is still my port of entry but I will be adding a different country and staying at some countries for longer/shorter that I  never mentioned to the embassy. Will they revoke my visa because I will be making these changes? I have heard stories about visas being canceled because the original hotel reservation was canceled. I am an Indian citizen living in the United States if that helps.


Error: BrokenCount > 0. Clashing Dependencies

I use OnlyOffice but I required LibreOffice Document Writer for some use. However, it show the error that "Unable to install "LibreOffice Writer": Error while installing package: trying to overwrite '/usr/bin/soffice' which is also in package openoffice-debian-menus 4.1.7-9800".  sudo apt --fix-broken install Generates the error: "E: Sub-process /usr/bin/dpkg returned an error code (1)".  sudo dpkg --configure -a Generates: Errors were encountered while processing: libreoffice-style-tango libreoffice-style-colibre libreoffice-core libreoffice-math libreoffice-writer libreoffice-base-core python3-uno   Help is highly appreciated. Thanks in advance.


I have a table that has path1, path2, and sha1 value.  For any values of path2 and sha1, there can be multiple values of path1.  I just want one of those paths.  I don't really care which one.  I'm thinking I can do a group by for path2 and sha1.  Now I just need to select one of the values of path1.  I suppose I could select the minimum value of path1 but that would be doing extra work that isn't really needed.  Google tells me that Microsoft has "FIRST" but I don't see that in the postgres pages.  Plus... I'd like to stick with normal SQL if possible.


Getting a time difference in Java LocalDateTime and converting it to String format

I'm taking a time difference between two LocalDateTime values. I'm using the Duration for that. And now I want to convert it into hh:mm:ss format as a String value. I've been checking how this can be done but still no luck. Any guidance will be appreciated.    LocalDateTime startTime = some value  LocalDateTime endTime = some value  Duration totalWaitingDuration = Duration.between(endTime, startTime);  String waitingTime = String.valueOf(totalWaitingDuration.toHours());    In this, I'm getting the time difference only in hours. How can i get it in hh:mm:ss format?


Why can I listen to my mobile phone's radio clearly inside the bus, inside the train, but not inside the elevator? Also, there is an interference of radio signal when the train is accelerating or decelerating. What is the reason behind this?


Do Skyrim mods work with the Special Edition?

I typically play Skyrim with a number of mods installed, and while I'm excited to try the Special Edition, there are a few mods that I'd much rather not play without.  Can I install mods built for the normal Skyrim game with the Special Edition, or do I have to wait until mod authors write new versions before I can play with those mods?


cron.hourly sendmail errors even though my scripts do not involve sending mail

I have only one very simple shell script in /etc/hourly.cron. It just controls a Twitter bot- it runs a short python script that posts to Twitter using tweepy. It does not involve email or any sendmail commands.   I had this set up for nearly a year with no problems, but now it is failing with odd errors related to sendmail.  First, in /var/log/syslog, I was getting this:  Dec 30 10:17:01 sarah-ThinkPad-X220 CRON[29527]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly) Dec 30 10:17:02 sarah-ThinkPad-X220 cron[865]: Please install an MTA on this system if you want to use sendmail! Dec 30 10:17:02 sarah-ThinkPad-X220 CRON[29526]: (root) MAIL (mailed 2136 bytes of output but got status 0x00ff from MTA#012)   I then installed postfix to try to debug this and got this:  Dec 30 15:17:01 sarah-ThinkPad-X220 CRON[4542]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly) Dec 30 15:17:03 sarah-ThinkPad-X220 cron[865]: sendmail: fatal: open /etc/postfix/main.cf: No such file or directory Dec 30 15:17:03 sarah-ThinkPad-X220 postfix/sendmail[4546]: fatal: open /etc/postfix/main.cf: No such file or directory Dec 30 15:17:03 sarah-ThinkPad-X220 CRON[4541]: (root) MAIL (mailed 250 bytes of output but got status 0x004b from MTA#012)   I am a cron novice and have no idea why an MTA would be needed at all. Any help would be appreciated.


How can I split one string into two variables in TypeScript?

I have a string SVchnsSoQQjr5kafygOh,,,Skyrim and I'm trying to put the first 'string' into a variable, the 'Skyrim' into another variable and remove the ',,,'  I've tried .substr()  Expected output:   str = 'SVchnsSoQQjr5kafygOh,,,Skyrim'  strOne = 'SVchnsSoQQjr5kafygOh' strTwo = 'Skyrim'


Do you still collect a noble if the day ends?

If there is one noble left in line and you play "fled to England" to discard it (thus, ending the day) do you collect a noble from the new day?


How to insert php variable containing 's in sql statement?

$insert = mysql_query("INSERT INTO tblmovie VALUES(' ', '$title', '$genre', '$duration', '$year', '$artists', '$director', '$description', '$name')");   This is my sql statement. The only thing wrong is that $title doesn't accept "Assassin's Creed" because it contains an apostrophe(') s resulting in sql syntax error:     You have an error in your SQL syntax; check the manual that   corresponds to your MySQL server version for the right syntax to use   near 's Creed', 'Action', '2:20:21', '2016', 'Michael Fassbender',   'Justin Kurzel', 'C' at line 1   How do I fix this?


How to make scoreboard show teams instead of players?

I am trying to make it to where points for teams are shown in the scoreboard but I can only manage to get player names on there, what command do I use? On 1.16


Find the exact match of the ID which is always located one line below pattern through grep

I would like to know the code for grep to check for two matches one after the other. For example I have the following text from one of the search files:  @<TRIPOS>MOLECULE   ← pattern 1532                ← ID 17 17 SMALL NO_CHARGES   I need to find the exact match of the ID which is always located one line below pattern and then retrieve the file name from which ID was located.  I used the following command:  grep -Pzo '@<TRIPOS>MOLECULE'(?:.*\n)*?\K1532' filename   but I got files containing 1532 as well as for 153284. I need code for exact ID match.


Are security.ubuntu.com updates eventually merged into normal updates?

Upon my observation, seems new packages will first appear in security.ubuntu.com, but if you upgrade later, they will appear in XX.archive.ubuntu.com (depends on your config),  Was that true ?


Star Trek Viewing Order + Other Questions

I am interested in watching Star Trek and have a few questions about doing so. Firstly, I have never watched anything with an 'old' feel to it. For some reason I just can't get into them but I hope that's not the case with Star Trek.  I have seen the first 10 minutes of 'Star Trek: The Original Series' and it was too much to for me. Is it possible to skip this series?  This order has been recommended but not sure if it's good:   Star Trek Films 1 through 6 Star Trek: The Next Generation Star Trek Film 7 Star Trek: Voyager Star Trek Films 8 through 10 Star Trek: Deep Space Nine Star Trek: Enterprise   Also do the new movies have any significant relationship with any of these previous TV series/movies? So is it possible to watch them without watching any of the rest? It seems like a completely new canon so not sure.


I tried to install R on my Ubuntu 16.04 LTS. However, I have errors that I can not solve for several hours. I first tried to install the bionic version and after the xenial version. Both methods produced the same errors. I do not know which one to use, it's confusing for me. I followed this procedure to install it.  sudo echo "deb http://cran.rstudio.com/bin/linux/ubuntu xenial/" | sudo tee -a /etc/apt/sources.list  gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9 gpg -a --export E084DAB9 | sudo apt-key add - sudo apt-get update sudo apt-get install r-base r-base-dev   When I execute sudo apt-get install r-base r-base-dev, I get the following errors :   sudo apt install r-base r-base-dev Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  r-base : Depends: r-base-core (>= 3.5.2-1bionic) but it is not going to be installed           Depends: r-recommended (= 3.5.2-1bionic) but it is not going to be installed           Recommends: r-base-html but it is not going to be installed  r-base-dev : Depends: r-base-core (>= 3.5.2-1bionic) but it is not going to be installed E: Unable to correct problems, you have held broken packages.  I have tried several solutions on different topics but they have no effect on the problem.  Thank you in advance for your help.


How to change SharePoint Mysite Quota for a particular user only?

I want to change the storage quota for particular user only.  For example I have 200 users where by default user will get 100 MB as per individual quota template but for particular users this can be 500MB or 1GB....


How to automatically reinvest in non-dividend paying funds

I've read Einsteins quote stating "The most powerful force in the universe is compound interest." However, everywhere I read this is basically only possible with dividend paying stocks and then applying a dividend reinvestment plan.  Is there a re-investing strategy like this for non-dividend paying mutual funds (or even non-dividend paying stock)? I figured that the only way would be to sell all your funds and then buy x+1 funds again, but this would cause a big loss because of transaction costs from the broker.


Why is English written and read left to right?

Why is English written and read from left-to-right as opposed to right-to-left, top-to-bottom, or (not even sure any language does this) bottom-to-top?


I want to avoid repeating the following code many times since I use plenty VBOs:     glBindBuffer(GL_ARRAY_BUFFER, VBOs[0]);     glBufferData(GL_ARRAY_BUFFER, sizeof(vertices1), vertices1, GL_STATIC_DRAW);      glBindBuffer(GL_ARRAY_BUFFER, VBOs[1]);     glBufferData(GL_ARRAY_BUFFER, sizeof(vertices2), vertices2, GL_STATIC_DRAW);      glBindBuffer(GL_ARRAY_BUFFER, VBOs[2]);     glBufferData(GL_ARRAY_BUFFER, sizeof(vertices3), vertices3, GL_STATIC_DRAW);      glBindBuffer(GL_ARRAY_BUFFER, VBOs[3]);     glBufferData(GL_ARRAY_BUFFER, sizeof(vertices4), vertices4, GL_STATIC_DRAW);   I tried to simplify this code with a cycle. Here is what I tried to do: std::string aux = "vertices";     std::string aux2;     int aux3;     std::string aux4;      const void* aux5;     for (int i = 0; i <= 13; i++) {         aux3 = i++;         aux4 = std::to_string(aux3);         aux2 = aux + aux4;         aux5 = aux2.c_str();         glBindBuffer(GL_ARRAY_BUFFER, VBOs[i]);         glBufferData(GL_ARRAY_BUFFER, sizeof(aux2), aux5, GL_STATIC_DRAW);     }  It didn't work out. It still shows a figure with the last color I used but doesn't paint the other figures. Is there a way to make that cycle work or should I continue repeating the code like above? Thanks for the help. I also tried simplifying the VAOs section in the code with a cycle and it worked. Here is how I did it: glGenVertexArrays(14, VAOs);      for (int i = 0; i <= 13; i++) {          glBindVertexArray(VAOs[i]);         glBindBuffer(GL_ARRAY_BUFFER, VBOs[i]);         glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 3 * sizeof(float), (void*)0);         glEnableVertexAttribArray(0);     }


How to prove $\,x^a-1 \mid x^b-1 \iff a\mid b$

How to prove $x^a-1\mid x^b-1 \iff a \mid b$, where $x \ge 2$ and $a,b,x \in \Bbb Z$.  I've tried the following in attempting to solve this:  $$a\mid b \Rightarrow aq=b \Rightarrow x^{aq}=x^b \Rightarrow x^ax^q=x^b$$  Because $x^q \in \Bbb Z$, it follows that $x^a\mid x^b$.  This is as far as I have gotten; any help getting further is appreciated.  Note: It may be that this identity is not true at all?


How do I prove the following:  Show that if $A$, $B$ and $C$ are three events such that $P(A \cap B \cap C) \neq 0$ and $P(C | A \cap B)$ = $P(C|B)$, then $P(A| B \cap C) = P(A | B)$.  Here is my attempt  $P(C|A \cap B) = { {P(A \cap B \cap C)} \over {P(A \cap B)}} = P(C|B) = {{P(C \cap B)} \over {P(B)}}$  Now, I do not know what to do. I am hoping somebody can help me. This is not a homework problem.  Bob


Let's say I perform linear regression on some data that produces the following $R^2$: $\text{RSS} = 1966815.13$ $\text{TSS} = 2145213.91$ $R^2 =  0.083$ Now let's say I bucket (take the average of successive equal size windows) the data and perform the exact same linear regression. This time the $R^2$ is: $\text{RSS} = 1187.56$ $\text{TSS} = 4758.32$ $R^2 =  0.75$ What have I just done here? I clearly haven't improved the explanatory power of the model over the original data, yet I've hacked the $R^2$ by averaging. What's the bias / variance argument of why this occurs? A graphical representation:  Edit: I've reduced the total variance of the data, but the bias remains unaffected. When (if ever) is this a valid statistical approach?


Windows Hardware Error: "LiveKernelEvent", with code 144 and Locale ID: 1033

Repeated error  I have been repeatedly encountering the following error when my laptop freezes. It may occur multiple times during the day, and should take several minutes to recover.  Source Windows  Summary Hardware error  Date 11/1/2018 10:11 AM  Status Not reported  Description A problem with your hardware caused Windows to stop working correctly.  Problem signature Problem Event Name: LiveKernelEvent Code:   144 Parameter 1:    3003 Parameter 2:    ffffad8c0b1a75c8 Parameter 3:    40010002 Parameter 4:    0 OS version: 10_0_17134 Service Pack:   0_0 Product:    256_1 OS Version: 10.0.17134.2.0.0.256.48 Locale ID:  1033   More details  Per my best reflection, the hardware error occurs when I am using the laptop on its docking station. Here is what I observe:   While using the laptop as normal, the "freeze" will occur and I can hardly operate the laptop: mouse cursor won't move continuously and Alt+Tab won't be able to switch across two windows. Shortly after (usually several minutes), things will go back to normal. Upon inspecting through the Performance tab in Task Manager, there had been no spike in anything, be it CPU, Memory or Disk. When I open the View reliability history tool, I will find another entry of Windows Hardware Error   Machine specification:   Thinkpad T480, i7-8650U (newly replaced module thanks to the manufacture)   With the same pair of docking stations, an older unit of T480 has had exactly the same problem.  Docking station: . Same issue has occurred on two identical docks with  slightly different monitors and accessories. OS specification: OS build 17134.376. Most recent collection of "reliability report":    Possible solutions   First, I would like to learn what exactly went wrong, hardware-wise: the manufacturer's support team did not bother too much with the precise error messages, and have ordered me to reinstall the Windows OS up to 5 times in total. [This is what they called "debugging".]   Please advise if you can decipher the recurrent "Hardware error".   Secondly, I will try to push the manufacturer to replace the docking stations, and see if the same "freezing problem' persists.


I have a some empty html files that i want to write. I am trying this  cat account_settings/account_settings.html >> assets/assets.html, users/users.html   to attempt to write to the files assets.html and users.html.  How can I write to multiple files?


Is this a bed bug??? Small insect with tail thing found in bed

Couldn’t find any other ones, no bites, is very very very small like almost fruit fly size


How to Return JTable Cell Value From Class A to Class B

I would like to know why I am getting a NullPointerException when I am trying to return JTable cell value from class A to class B.   Any valuable feedback or suggestions to overcome the issue are highly appreciated!


I am a current high school student and I am very interested in physics, especially particle physics (that stuff is super cool!). Unfortunately, my school only teaches classical physics, so I have to continue my study at home. I've read several books and watched videos and online lectures on quantum mechanics and have gotten a basic overview of the big ideas, but when I try to dig even just a little bit deeper the math immediately gets too confusing to handle. Beyond basic summaries and oversimplifications, what other resources can I use to continue studying physics but avoid getting frustrated by math that I don't understand?      EDIT  Based on feedback so far, I think the question I should really be asking is "What are some resources that can help teach me the prerequisite math I need to know for quantum mechanics?"


How do we switch to another folder using terminal commands?

In olden days of DOS, we had cd command to switch folders. The case does not seem same like DOS. Please help


Term meaning careful and thorough, almost excessively so

I'm trying to think of a term which means that one expends extra effort or materials in making sure that something is done properly, to an almost excessive or extravagant extent.  One good is example  is .  I'd like to think of equivalents which, similarly, don't have a negative connotation - equivalents which imply thoroughness.  'Overzealous', for example, has a similar meaning but implies negative excess.  It could be a word or phrase.    I'd like to use the word or phrase to describe an approach, i.e. 'I did it X way because it was sure to cover everything, a [word or phrase goes here] approach.'    So far, many of the suggestions have been negative in connotation:  Over-designing  Pedantic  Nitpicky  These are all undesirable traits and therefore not what I was looking for. Meticulous is more what I was looking for, but is less suitable when talking about one specific act.  The context is something like:  'It was likely that the necessary part lay between 5-10, but we took all of 1-20 in order to make certain that we got it.'  That is a belt-and-braces approach.


Showing that, if $n,10$ are coprime, then the last $3$ digits of $n^{101}$ will be the same as $n$'s.

Let $n$ be a positive integer where $n$ and $10$ are coprime number. Prove that then the last 3 digits of $n^\text{101}$ will be equal to the last 3 digits of $n$.   SOURCE: Bangladesh Math Olympiad  I basically know how to find the last digit of a base with a large exponent. Whatever the exponent in the event of one digit such as $1, 5, 6$ and $9$ will be, the last digit of the number will always result in that specific number which we have used.  So, the last 3 digit of $n$ can be constructed in $^4P_3$ ways with having that 4 digits $1, 5, 6$ and $9$ respectively. But how to determine only that distince value of $n$ and justify that the number and $10$ are coprime number>  The instruction of any kind of reference or any good books related with decimal expansion or number theory will be very helpful for me in the case of a beginner and some basic conception because there is no availability of satisfactory books written on number theory in our country which I have read some. Thanks in advance.


How to sort text in sqlite3 with specified locale?

Sqlite3 by default sorts only by ascii letters. I tried to look in google, but the only thing I found were informations about collations. Sqlite3 has only NOCASE, RTRIM and BIARY collations. How to add support for a specific locale? (I'm using it in Rails application)


Can't use sudo and couldn't access root user to fix it after running chmod -R 777 /usr/

I used these commands to allow access to git clone katoolin to be stored in usr  sudo chmod -R 777 /usr/ sudo chown www-data:www-data /usr/   I don't know which one ruined my sudo access. Also, I don't have access to root. I tried entering into recovery mode then into root shell and used commands from  but it didn't work.  Kind of new to it. Some help would be helpful.


How to test if exception is raised when calling socket.send

This is my first time testing a socket interface using mocking. I have a class which invoked the _socket.sendto() method. I would like to test if an exception is raised.   class socketUDP(object):      def __init__(self, host="127.0.0.1", port=2003):         self.host = host         self.port = port          self._socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)       def send(self, metric, value):          message = "%s %f\n" % (metric, value)          try:             self._socket.sendto(                 message, (self.host, self.port))         except Exception, e:             # I would like to test if this exception is raised             print "Could not relay data: %s" % e   Update: I am writing some unit tests for the send method and one of the tests I want to do is to see if an exception was raised


Does 1/3 =.3 repeating or is it a close representaion

My sons math teacher said that .9 repeating is equal to 1. With the argument that 1/3 =.3 repeating, 2/3= .6 repeating, and 3/3 = 1.  My arguement is that 1/3 is not actually = to .3 repeating and that as expressed as a decimal, is as close as we can get.  Thoughts?


Show the polynomial $[(x - a_1) \cdots (x - a_n)]^4 + 1$ is irreducible

Suppose $a_1, \dots, a_n$ are distinct integers and let $$ f(x) = [(x - a_1) \cdots (x - a_n)]^4 + 1. $$ Show that $f(x)$ is irreducible over $\mathbb{Q}$. For the case $f(x) = [(x - a_1) \cdots (x - a_n)]^2 + 1$, I supposed $f(x)$ was reducible ($f(x) = g(x)h(x)$) and got to a contradiction manipulating the degrees of $g(x)$ and $h(x)$, using a result concerning the $n$ values $a_1, \dots, a_n$ for which $f(x) = 1$. However, I tried to adapt this same argument here and it didn't work because now the degree of $f$ is higher ($4n$) and the contradiction doesn't arise immediately. How should I proceed?


Obtaining knowledge from a random forest

Random forests are considered to be black boxes, but recently I was thinking what knowledge can be obtained from a random forest?  The most obvious thing is the importance of the variables, in the simplest variant it can be done just by calculating the number of occurrences of a variable. The second thing I was thinking about are interactions. I think that if the number of trees is sufficiently large then the number of occurrences of pairs of variables can be tested (something like chi square independence).  The third thing are nonlinearities of variables. My first idea was just to look at a chart of a variable  Vs score, but I'm not sure yet whether it makes any sense.    Added 23.01.2012 Motivation    I want to use this knowledge to improve a logit model. I think (or at least I hope) that it is possible to find interactions and nonlinearities that were overlooked.


I need help with selecting correct title for technical article

I am a technical writer, tasked with producing a tutorial on PHP programming. In the latest work on the series, I've titled my article:  "An Overview of PHP Data Types and Variable Concepts"  The editorial team is asking whether the title should be "...Variable Concepts" or "...Variables Concepts". Which title would be correct both technically and grammatically?  Note: There are multiple types of "data" and multiple types of "variables" in the PHP Programming language.


Can laptop supporting 1333MHz DDR3 have one 1333MHz DDR3 + 1600MHz DDR3 RAM

I have Dell XPS 15 laptop with two RAMs:   Samsung 4GB Corsair 8GB CMSO8GX3M1A1333C9  DDR3-1333/PC3-10600  SO-DIMM Memory Module  204-pin Configuration  9-9-9-24 CAS Latency   Both these running fine for at least an year. Now I want to remove 4GB RAM and buy another 8GB one by Corsair. But this one is a bit different model. The specs are as below:   Corsair 8GB CMSO8GX3M1A1600C11  DDR3-1600/PC3-12800  SO-DIMM Memory Module  204-pin Configuration  9-9-9-24 CAS Latency   So the only difference between Two corsair's is that the one I currently have is DDR3-1333/PC3-10600, while the one which I am planning to buy is DDR3-1600/PC3-12800. Will these work together well in dual channel?


How can I specify a long list of math operators?

The preambles of my LaTeX documents often include many many lines of \DeclareMathOperator instructions, e.g.  \DeclareMathOperator{\Rep}{Rep} \DeclareMathOperator{\Tet}{Tet} \DeclareMathOperator{\Maps}{Maps} \DeclareMathOperator{\Diff}{Diff}   Is there a nice way to map some macro over a list, so I could do this more concisely, and with less copying and pasting when I add a new math operator?


How can I customize word definition in Vim? The default is a series of character like _,[a-zA-Z] are considered as word. I'd like to add some other chars to this definition.


Why is ANOVA taught / used as if it is a different research methodology compared to linear regression?

ANOVA is equivalent to linear regression with the use of suitable dummy variables. The conclusions remain the same irrespective of whether you use ANOVA or linear regression.   In light of their equivalence, is there any reason why ANOVA is used instead of linear regression?   Note: I am particularly interested in hearing about technical reasons for the use of ANOVA instead of linear regression.   Edit  Here is one example using one-way ANOVA. Suppose, you want to know if the average height of male and females is the same. To test for your hypothesis you would collect data from a random   sample of male and females (say 30 each) and perform the ANOVA analysis (i.e., sum of squares for gender and error) to decide whether an effect exists.  You could also use linear regression to test for this as follows:  Define:  $\text{Gender} = 1$ if respondent is a male and $0$ otherwise. $$ \text{Height} = \text{Intercept} + \beta * \text{Gender} + \text{error} $$ where: $\text{error}\sim\mathcal N(0,\sigma^2)$  Then a test of whether $\beta = 0$ is a an equivalent test for your hypothesis.


Disable password request from suspend - 18.04

How can I disable password request after suspend in Ubuntu 18.04? I have already turned off the screen lock but that didn't fix it.  I am new Ubuntu user. There seems to be lots of information on how to fix this in older versions.


I just discovered very strange thing while testing my internet connection. My ping is smaller than it should be. For example ping time to Arizona State University is about 14ms.  eryk@eryk-pc:~$ ping www.asu.edu PING www.asu.edu.cdn.cloudflare.net (104.16.51.14) 56(84) bytes of data. 64 bytes from 104.16.51.14: icmp_seq=1 ttl=60 time=13.8 ms   I'm living in Poznań in Poland so my distance to Arizona State University in a straight line (very optimistic assumption) is about 10000 km. Considering the fact that ping time is a time for two directions (to the target and back to home). So my ping packet have to cross 20000 km distance. Speed of light is 300 000 km per second that is 300km per millisecond. So the smallest possible time to ping Arizona State University with my packet travelling at a speed of light is  20000/300=67ms   I have noticed similar results for servers located in Australia and some other States of America. Is my internet connection five times faster than light?


How do I overwrite my game data in Shall We Date?: Ninja Assassin+ by deleting my old Game Center account for it on my old iPhone? Because my current data on my new phone is more up to date than the data on my old phone. How do I sync or overwrite the data so it can be the same data as on my new phone ? I also have the Game Center update on both phones  .


Accessing multidimensional arrays in a class (c++) giving a compiler error, but works for single dimension arrays, why?

Background to the question:   I have been writing a small program to solve the daily Reddit challenge (details of the challenge are posted  for those interested).  While doing so, I appreciate my design is not the best, but i opted to write a class as an interface for carrying out different operation in a specific order of +1, +number, -1 and -number. Then in my main code I simple called operation.calculate(baseNumber) or operation.incrementOperation() to move to the next designated operation. However I hit an issue when trying to implement the class which I can't understand why it won't work. The code I was trying to implement was:  class DesignatedOperation {  public:      DesignatedOperation() : operationId(0) {}     ~DesignatedOperation() {}      void incrementOperation()     {         operationId += 1;         if (operationId > 3) { operationId = 0; }     }      int calculate(int number)     {         int op1 = operations[operationId, 0];         int op2 = operations[operationId, 1];         return (op1 + number * op2);     }  private:      int operationId;     int operations[4][2] = { 1, 0, 0, 1, -1, 0, 0, -1 };  };   However I am not able to compile this as I get the error for the lines accessing the operations array with the square brackets:     a value of type "int *" cannot be used to initialize an entity of type   "int"   Now looking through examples for tutorials such as , I can't figure out why this is not working. Now as a workaround I found I could using a single dimension array changing the code to the following:  class DesignatedOperation     {  public:      DesignatedOperation() : operationId(0) {}     ~DesignatedOperation() {}      void incrementOperation()     {         operationId += 2;         if (operationId > 6) { operationId = 0; }     }      int calculate(int number)     {         int op1 = operations[operationId];         int op2 = operations[operationId+1];         return (op1 + number * op2);     }  private:      int operationId;     int operations[8] = { 1, 0, 0, 1, -1, 0, 0, -1 };  };   Question at hand  I know this appears trivial but I was trying to google if this is a specific issue with using multidimensional arrays in classes like this but I wasn't much luck working exactly what is going here, beside me missing an obvious mistake.   Not sure if anyone else has encountered this or knows the underlying reason why my code can't access the array?  I can change the code on those to lines to allow it to compile by de-referencing the array as if it was a pointer but this doesn't make sense to me as I have not declared operations as a pointer to an array and it's within the scope of the class. Running this compiled code produces garbage output, as I would expect.  Any pointer in the right direction would be really appreciated, Thanks.  For reference I am using Microsoft Visual Studio Community 15 (Microsoft Visual C++ 2015).


How to track the total network data in a month

I can see the data transferred (internet Download/Upload) in the current session from the System Monitor. But I want something that keeps track of all the data transferred and I can see how much data was used in a month or two. Preferably a GUI tool.


On a hp pavilion entertainment pc running windows vista have been unable to get it to boot from a usb drive.


Using PCA for finding features most affecting a given label

I have a training test with 3000 samples, 100 features per sample.  For each sample, there is also a label column with the sample "price" - continuous variable with infinite values possible (think of price of a house, for example)  My end goal is to build a model, based on the training set, which predicts a new sample "price".  In order to do so, I would first like to perform some dimensionality reduction, such as PCA, but I want to perform it so it would give me as a result, manipulated data set, with samples containing only the most affecting features in regard to the price label.  e.g. get transformed data set, with only X features that actually have an impact on the specific "price" column value  How can I achieve that in R?


Rendering bug when having a tag followed by a link

I just tried to post an answer, which contained a link right after a tag. The used markdown:  [tag:ios-app] [tag page][1]   Which renders as:      [tag page]   Is this a bug or just something that isn't supported?  This works as expected though:  [tag:ios-app] [tag page](https://meta.stackexchange.com/tags/ios-app/topusers)   Which renders as:


How do I /give a NAMED Item that also can only be Placed on a Specific Block?

I know how to /give a Named Item & How to Only have it Placed on a Specific Block.  but how/is there a way to Merge these 2 Commands?  {display:{Name:"[\"ITEMNAME\"]"}}   &   {CanPlaceOn:["minecraft:lime_wool"]}


Can someone explain "diff = \ floor(a - b))" in Python?

I am a beginner in python and I am trying to understand the statement. It is diff  = \ floor(a - b)). What does the \ mean in this statement? Thank you.


How can I check for duplicate nongroupable fields in a SOQL query?

I want to check for records that have the same data as other records in case a mistake was made during data upload.  I want something like a self-join in SQL:  SELECT Id FROM My_Object__c a, My_Object__c WHERE a.Start_Date = b.Start_Date AND a.Student_Number = b.Student_Number AND a.Id != b.Id   Or  SELECT Id FROM My_Object__c WHERE Start_Date IN (SELECT Start_Date FROM Enrolment_c)   However, these give errors.  SELECT COUNT(Id), Student_Number__c, Study_start__c FROM Enrolment__c GROUP BY Study_Start__c, Student_Number__c ORDER BY COUNT(Id) DESC LIMIT 10   Gives Line: 1, Column: 1 System.UnexpectedException: field 'Student_Number__c' can not be grouped in a query call  Note that I cannot use GROUP BY as some of my fields such as Student_Number are not groupable.


local variable refernced before assigement error

I am very new to codding and am trying to make a game I can call my own. I don't undertand what the error means but here is my code:  import pgzrun import math import random  WIDTH = 800                       #5 HEIGHT = 600 CENTER_X = WIDTH/2 CENTER_Y = HEIGHT/2 CENTER = (CENTER_X, CENTER_Y) FONT_COLOR = (221, 160, 221)      #10 ozol = 0  game_over = False  ozolith = Actor("ozolith")        #15  def draw():     screen.clear()     ozolith.draw()     draw_counters(ozol)           #20  def place_ozolith():     ozolith.x = CENTER_X     ozolith.y = CENTER_Y                                   #25 def draw_counters(ozol):     screen.draw.text(str(ozol), fontsize=40, center=CENTER, color=FONT_COLOR)  def on_mouse_down(pos):     if ozolith.collidepoint(pos): #30         ozol += 1         place_ozolith     else:         quit()                                   #35 place_ozolith  pgzrun.go()   Here is the error message   Traceback (most recent call last):   File "C:\Program Files\Python38\python-games\GameCraft\GameCraft.py", line 38, in <module>     pgzrun.go()   File "C:\Program Files\Python38\lib\site-packages\pgzrun.py", line 31, in go     run_mod(mod)   File "C:\Program Files\Python38\lib\site-packages\pgzero\runner.py", line 113, in run_mod     PGZeroGame(mod).run()   File "C:\Program Files\Python38\lib\site-packages\pgzero\game.py", line 217, in run     self.mainloop()   File "C:\Program Files\Python38\lib\site-packages\pgzero\game.py", line 247, in mainloop     self.dispatch_event(event)   File "C:\Program Files\Python38\lib\site-packages\pgzero\game.py", line 172, in dispatch_event     handler(event)   File "C:\Program Files\Python38\lib\site-packages\pgzero\game.py", line 164, in new_handler     return handler(**prepped)   File "C:\Program Files\Python38\python-games\GameCraft\GameCraft.py", line 31, in on_mouse_down     ozol += 1 UnboundLocalError: local variable 'ozol' referenced before assignment   It happens once I click on the image which is stuck on the top left corner.


I want to back up my Ubuntu so that I can restore it like a new install OS

Can I do this with pre-installed back-up application in Ubuntu?


How to put a div in the middle of the page

Not in the middle of the page, as in margin: 0 auto; I'm talking about in the center as in top to bottom. Thank you in advance!


Unable to SSH to my virtual machine via Windows Power Shell ISE

I have a Linux VM guest running in my vmWare host that I want to access using Windows PowerShell ISE. I normally can SSH to my VM, but I cannot with Windows PowerShell ISE.  When I try to do SSH to my virtual machine, the SSH Operation is gets stucked and will not show me any further console or message. I am using an SSH Client that comes with GIT, Windows 8.1 and vmWare Workstation 10.  PS C:\> ssh esis@192.168.255.142 ssh : Warning: Permanently added '192.168.255.142' (RSA) to the list of known hosts. At line:1 char:1 + ssh esis@192.168.255.142 + ~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : NotSpecified: (Warning: Perman...of known hosts.:String) [], RemoteException     + FullyQualifiedErrorId : NativeCommandError


Resizing or expanding a CoreStorage volume

I bought a new SSD with 750 GB and made two partitions: 600 GB and 150 GB. The smaller one was thought to be a Bootcamp partition one day, but to date it was just another unused partition. When I needed more space, I decided to merge these two partitions. The partition was created with Mavericks, the merge was done with Yosemite.  I opened Disk Utility and the "minus" button. Disk Utility told me both partitions would be merged then. However it miserably failed. My main hard disc suddenly had errors which couldn't be repaired and even two of my other external hard discs could not be mounted any longer.  I eventually restored the hard disc from Time Machine, which worked well.  My second partition is now listed as free:    Unfortunately I can't resize the 600 GB partition nor can I create a new partition using the free space.  Diskutil reveils the following:  ~  diskutil list /dev/disk0    #:                       TYPE NAME                    SIZE       IDENTIFIER    0:      GUID_partition_scheme                        *750.2 GB   disk0    1:                        EFI EFI                     209.7 MB   disk0s1    2:          Apple_CoreStorage                         599.6 GB   disk0s2    3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3 /dev/disk1    #:                       TYPE NAME                    SIZE       IDENTIFIER    0:                  Apple_HFS Macintosh HD           *599.3 GB   disk1                                  Logical Volume on disk0s2                                  XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX                                  Unencrypted   Also diskutil brought up this:  ~  diskutil cs list CoreStorage logical volume groups (1 found) | +-- Logical Volume Group 9D2BA4BA-xxxx-xxxx-xxxx-xxxxxxxxxxxx     =========================================================     Name:         Macintosh HD     Status:       Online     Size:         599640592384 B (599.6 GB)     Free Space:   6111232 B (6.1 MB)     |     +-< Physical Volume 29A9A02B-xxxx-xxxx-xxxx-xxxxxxxxxxxx     |   ----------------------------------------------------     |   Index:    0     |   Disk:     disk0s2     |   Status:   Online     |   Size:     599640592384 B (599.6 GB)     |     +-> Logical Volume Family 2FA7892F-xxxx-xxxx-xxxx-xxxxxxxxxxxx         ----------------------------------------------------------         Encryption Status:       Unlocked         Encryption Type:         None         Conversion Status:       NoConversion         Conversion Direction:    -none-         Has Encrypted Extents:   No         Fully Secure:            No         Passphrase Required:     No         |         +-> Logical Volume 7BF42B7B-xxxx-xxxx-xxxx-xxxxxxxxxxxx             ---------------------------------------------------             Disk:                  disk1             Status:                Online             Size (Total):          599282155520 B (599.3 GB)             Conversion Progress:   -none-             Revertible:            No             LV Name:               Macintosh HD             Volume Name:           Macintosh HD             Content Hint:          Apple_HFS   I have tried this:    fsck -fy (The volume Macintosh HD appears to be OK.)   but it wouldn't help. It said I couldn't recover because it wasn't created in a way it would support (sorry for missing the exact message).  I then have learned that Apple_CoreStorage might indicate my disk is encrypted, which might explain why I can't resize it. It doesn't explain why I can't create a new partition to me.  What are my options to make my hard disk available in a single partition with size 750 GB?


I have 9 partitions of which one is unallocated and i want to merge this unallocated partion to sdb11 partition on which my ubuntu is installed?


Replacing one column with another column in csv files

I have a file1 with the following:  1,joe,jim,bob,sally,mark,sue,etc,etc 2,julie,barbra,joe,jim,bob,sally,mark,sue,etc,etc 1,clarie,mike,joe,jim,bob,sally,,etc,etc 2,matt,alivia,joe,jim,bob,mark,sue,etc,etc 1,julie,claire,joe,jim,bob,sally,mark,sue,etc,etc 2,sophia,joe,jim,bob,sally,mark,sue,etc,etc   I would like to change it so column 1 was in numerical order and write to file2:  1,joe,jim,bob,sally,mark,sue,etc,etc 2,julie,barbra,joe,jim,bob,sally,mark,sue,etc,etc 3,clarie,mike,joe,jim,bob,sally,,etc,etc 4,matt,alivia,joe,jim,bob,mark,sue,etc,etc 5,julie,claire,joe,jim,bob,sally,mark,sue,etc,etc 6,sophia,joe,jim,bob,sally,mark,sue,etc,etc   my file1 has over 100,000 lines and has 65-90 columns per line.


macOS: Blacklisting applications and processes

I need something like a firewall, but instead of restricting network traffic, I want to be able to restrict scripts, applications, and processes in general from being allowed to run/execute in the first place.   Rather than having to constantly keep checking for rogue processes, troubleshooting, and terminating them individually. I just want them to:       a) Die. Quickly, quietly, without manual user intervention.    Or (preferably):        b) Be prevented from ever spawning in the first place.  PS: I don't think the old chmod utility is really appropriate at this level. I think I recall reading about an Apple style .plist/.xml solution for this kind of thing. I don't know enough about it to say if it's the right approach though.


Trying to keep track of the updates to all the great, user-developed add-ons is fairly frustrating (at least for me). Is there currently a centralized resource where all these amazing add-ons are kept and updated in one location?  If there isn't such a resource, would it be possible to have blender query the collection of installed add-ins and then iterate through on-line references looking at version #'s for add-ins?  Since, as far as I know, it hasn't been done...I have to ask if there are any major flaws in the concept. Of course, in my dream scenario, there would be a "voting" front-end that would allow users to see what the most popular and useful add-ons are and where you don't have to read pages (and pages) of threads.


Weird behaviour of array of Python objects

Thank you for supporting Python learners, who got stuck! I'd like to create an array of objects and encountered some weird behaviour of Python. Here's the code: class Box:     def __init__(self, row, col):         self.row = row         self.col = col     def __str__(self):         return f"this is box[{self.row}][{self.col}]"  # instancing the boxes boxes = 3*[3*[None]]  for i in range(2):     for j in range(2):         boxes[i][j] = Box(i, j)         print(boxes[i][j]) print() print(boxes[0][0])  And this is the output: this is box[0][0] this is box[0][1] this is box[1][0] this is box[1][1]  this is box[1][0]  The last print statement shows the problem: When you call boxes[0][0], you get boxes[1][0]. Python seem to stick with the last instanced row index. This problem does not occur with list of objects, only with arrays. I suspect a limitation in Python (I'm using 3.8.5). I searched the web, but found nothing. What do you think is the problem here? How would you create this array of objects? Thank you very much for your help!


What is the expected norm $\mathbb E \lVert X \rVert$ for a multivariate normal $X \sim \mathcal N(\mu, \Sigma)$?

$\DeclareMathOperator\E{\mathbb E} \DeclareMathOperator\Var{\mathrm{Var}} \newcommand\R{\mathbb R} \DeclareMathOperator\N{\mathcal N} \DeclareMathOperator\tr{\mathrm{tr}}$Suppose $X \sim \N(\mu, \Sigma)$, where $\mathrm{supp}(X) = \R^n$. We can assume $\Sigma$ to be nonsingular. What is $\E \lVert X \rVert$?  If $\Sigma = \sigma^2 I$, then $\lVert X \rVert / \sigma$ follows a , which has known mean (in terms of a ). That gives in this case $$ \E \lVert X \rVert = \sigma \sqrt{\frac{\pi}{2}} \; L_{{1/2}}^{{(n/2-1)}}\left({\frac {-\lVert \mu \rVert^{2}}{2 \sigma}}\right)\, ;$$ if we further assume $\mu = 0$ then it becomes a chi distribution and $$ \E \lVert X \rVert = \sigma \sqrt {2} \, \frac{\Gamma((n+1)/2)}{\Gamma(n/2)} .$$  In the general case, we have an easy upper bound via Jensen's inequality. Letting $C^T C = \Sigma$ and $Z \sim \N(0, I)$: \begin{align} \left( \E \lVert X \rVert \right)^2 &< \E \lVert X \rVert^2 \\&= \E \lVert \mu + C Z \rVert^2 \\&= \lVert \mu \rVert^2 + 2 \mu^T C \E Z + \E \tr( Z^T C^T C Z ) \\&= \lVert \mu \rVert^2 + \tr( C^T C \,\E Z Z^T ) \\&= \lVert \mu \rVert^2 + \tr( \Sigma ) ,\end{align} where the inequality is strict since we've assumed $\lVert X \rVert$ is not degenerate.  We also have a lower bound in the same way: since $\lVert \cdot \rVert$ is convex, $\E \lVert X \rVert \ge \lVert \E X \rVert = \lVert \mu \rVert$. (I previously had something more complicated here, based on  of the function $z \mapsto \lVert \mu + C z \rVert$, but it gave a worse bound.)  Can we tighten these bounds or, preferably, find an exact expression for $\E \lVert X \rVert$ in the general case? If not, what about the diagonal but non-spherical case, or $\mu = 0$, or other interesting subcases?    There's been some discussion on this site of the distribution of $Y = \lVert X \rVert^2$, particularly  and . If we have the full distribution of $Y = \lVert X \rVert^2$, we may be able to find $\E \sqrt{Y}$. That distribution is gross, though, and analytical answers seem difficult.


What gives an elementary particle a charge?

We know that proton is positive, and electron is negative. But where does come notion of negativity and positivity? Does charge come from some specific particles, or they specific order?


How to set default folder view to "list"?

I have another somehow weirdly easy question: I would like to use the List view for ALL folders in Ubuntu. Is there some kind of template that I could use?


How can I restrict a group to reading only two particular folders with Windows Server?

I have a group of users on Windows Server 2003 who need to be able to read the contents of two directories but not be able to access anything else on the server (including read-only access).  One of the directories is K:\projectFour\config — and the other is similarly formatted — so it would be okay for group members to be able to list the contents of K:\ and K:\projectFour\ but not actually read anything in those directories.  I've found several resources via SF/Google, including how to restrict individual folders/drives and how to allow users to only run specific executables, but that information ultimately didn't solve my issue.  Sorry if this is a really simple thing to do, I'm usually a developer and don't know the first thing about servers or group policies.  Finally, I should mention that this isn't a fully concrete question, as it will be implemented eventually but I don't personally have a copy of Windows Server 2003 to test with right now.


pyqgis : Load WMS layer and make him invisible (qgis 3.4.3 )

I am loading WMS layer in Python console with simple code. Then I try to make the layer invisible in TOC, but not success. I run the code in QGIS 3.4.3 in Python console in Windows 10.  from qgis.core import QgsLayerTreeLayer,QgsProject   from PyQt5.QtCore import Qt  url_cur= "url='https://ags.iplan.gov.il/arcgis/rest/services/PlanningPublic/Xplan_2039/MapServer' layer='0'"  layer = iface.addRasterLayer( url_cur, 'a1', "arcgismapserver")  QgsProject.instance().addMapLayer(layer,False)  treeLay0 = QgsLayerTreeLayer (layer)  treeLay0.setItemVisibilityChecked (Qt.Unchecked )


Is there a faster way to get the dimensions of a jpg image from a file than using System.Drawing.Image.FromFile

Width and Height of an image inside a jpg file can be retrieved by reading all file data into an Image.   System.Drawing.Image img = System.Drawing.Image.FromFile("a.jpg"); var w = img.Width var h = img.Height   This is costly however and if only width and height are needed, there might be a better way.  So I wonder if there is a less resource intensive way to get the image dimensions. In my (common) scenario, the jpg is uploaded to the web server and the web application shall just get width and height and store that. I thought, the jpg file format might have width and height as easy readable metadata and if so, someone knows how to access it.