Can we sometimes write the "of-phrases" without the definite article? I give few examples. Can we remove the definite articles marked boldly?  However, the identification of relevant covariates needed in modelling can often be challenging.   These allow transparent dealing with confounding bias by enabling the controlling of causal assumptions.   The provided code allows the full production of our findings.

I have a little issue with the use of zero versus definite article, since I tend to abuse the former one.  Consider the following sentences:        The issue described above influences the quality of software.   This general issue affects the speed of applications.   This affects the reliability of hardware.      The use of software, applications and hardware seems to me 'general', so according to what I know about english grammar, zero article should be used.  Suppose to add an adjective to 'specialize' such nouns, but still staying relatively general (i.e., not referring to specific applications).        The issue described above influences the quality of the? produced software.   This general issue affects the speed of the? deployed applications.   This affects the reliability of the? produced hardware.      In these last cases, is it mandatory to use the definite article or is zero article still acceptable? Is there grammar reference that justifies the answer?


Prove there is no bijective continuous function $f:[0,1] \to [0,1]^2$.  Here is my attempt so far: assume there a function $[0,1] \to [0,1]^2$ is continuous and surjective. We wish to show that it cannot be injective. Suppose in the contrary that it is injective. Then since the preimage of $f$ is compact and $f$ is bijective, its inverse $f^{-1}$ is a bijection from the unit square to $[0,1]$. Also, it is a uniform convergence.  I am also wondering if there is a not necessarily continuous bijection from the unit square to unit line.  I am not sure how to prove this problem. Any help would be great.

Is there a continuous bijection from $[0,1]$ onto $[0,1] \times [0,1]$? That is with $I=[0,1]$ and $S=[0,1] \times [0,1]$, is there a continuous bijection $$ f: I \to S? $$  I know there is a continuous bijection $g:C \to I$ from the Cantor set $C$ to $[0,1]$. The square $S$ is compact so there is a continuous function  $$ h: C \to S. $$ But this leads nowhere. Is there a way to construct such an $f$?  I ask because I have a continuous functional $F:S \to \mathbb R$. For numerical reason, I would like to convert it into the functional $$ G: I \to \mathbb R, \\ G = F \circ f , $$ so that $G$ is continuous.


I'm from the Philippines and will be emigrating to US soon, specifically Hawaii. I'll be selling my PC locally, but I wanted to bring my hard drives with me since they have my important files, and games that are worth TBs. It'll be more economic to simply bring these drives rather than re-downloading them all again (Steam).   After reading a lot of articles online, they say that customs has the right to inspect the contents of the hard drive and/or copy a full backup of it for further inspection. Though I'm fine with it, it's a bit uncomfortable that they can just take my private data and be on with it, for the sake of security. Encrypting my hard drive may be worse, since they'll ask me what are the contents of it, and detain me for further 'investigation', based on online news and such.  So all I'd like to ask - is it okay for me to bring 2 (two) 3.5 inch Internal HDDs with me on the flight, on my hand luggage and still retain my privacy? Is it safe to encrypt my files, or simply zip sensitive files instead?  If this will just get me in trouble, can I use a courier service and safely deliver the hard drives? I'm not sure if it's safe to do this, since I believe hard drives can be sensitive to shock.

I've read stories about border officials searching laptops when crossing the border in one direction or the other. Does this really happen, typically speaking?  As a US citizen, can I be forced to give them my laptop's password for any/no reason? I don't believe they are allowed to deny entry to the US to a US citizen? ....but who knows these days?  Canada can deny me entry for any reason, so that's fine. But in practice, does this even happen in either crossing direction?  EDIT - I've now made the trip. They didn't so much as glance in the direction of my laptop. My biggest issue turned out to be lack of international wireless data service!


I'm wondering whether questions on SE keep up-vote and view stats when they migrate. Moreover, do these stats no longer count for the current site and attribute to the migration site?

I posted a question which was closed as off-topic and it seems like it could fit on another site in the network. How can I go about moving it there?   What is migration? When can a question be migrated, and who can migrate it? When should I consider migration, and when is it inappropriate? What causes a migration to be blocked and what happens after? What causes a migration to be rejected and what happens after? Anything else I should know about migration?


I appreciated Marco's  explaining why the variance of a local polynomial regression increases monotonically in the degree. However, in the end of the proof, I find difficult to calculate each term in order to conclude the desired inequality.  If I pursue the proof from the last equation there, we can see that $$ \sigma^2 z^\top \left(X^\top X − X^\top q(q^\top q)^{−1}q^\top X\right)^{−1} z \geq \sigma^2 z^\top \left(X^\top X\right)^{−1}z = \mbox{Var}\left[\hat{y}_t\right],$$ by the arguments he mentioned. Then the following inequality holds for all $t\in \mathbb{R}$ $$\mbox{Var}[\hat{y}^∗_t] ≥ \mbox{Var}[\hat{y}_t]+ 2\sigma^2 t^k z^\top B_∗+\sigma^2 t^{2k} D_∗.$$ The conclusion is immediate if $2\sigma^2 t^k z^\top B_∗+\sigma^2 t^{2k} D_∗\geq 0$. Obviously $\sigma^2 t^{2k} D_∗≥0$ by construction of the Schur complement but I don't see how I can show that $2\sigma^2 t^k z^\top B_∗$ is positive for every $t$.  I don't see what I am missing.   Can anyone explain how to finish the proof?

How can I show that the variance of local polynomial regression is increasing with the degree of the polynomial (Exercise 6.3 in Elements of Statistical Learning, second edition)?  This question has been asked  but the answer just states it follows easliy.  More precisely, we consider $y_{i}=f(x_{i})+\epsilon_{i}$ with $\epsilon_{i}$ being independent with standard deviation $\sigma.$  The estimator is given by  $$ \hat{f}(x_{0})=\left(\begin{array}{ccccc} 1 & x_{0} & x_{0}^{2} & \dots & x_{0}^{d}\end{array}\right)\left(\begin{array}{c} \alpha\\ \beta_{1}\\ \vdots\\ \beta_{d} \end{array}\right) $$ for $\alpha,\beta_{1},\dots,\beta_{d}$ solving the following weighted least squares problem $$ \min\left(y_{d}-\underbrace{\left(\begin{array}{ccccc} 1 & x_{1} & x_{1}^{2} & \dots & x_{1}^{d}\\ \vdots\\ 1 &  &  &  & x_{n}^{d} \end{array}\right)}_{X}\left(\begin{array}{c} \alpha\\ \beta_{1}\\ \vdots\\ \beta_{d} \end{array}\right)\right)^{t}W\left(y-\left(\begin{array}{ccccc} 1 & x_{1} & x_{1}^{2} & \dots & x_{1}^{d}\\ \vdots\\ 1 &  &  &  & x_{n}^{d} \end{array}\right)\left(\begin{array}{c} \alpha\\ \beta_{1}\\ \vdots\\ \beta_{d} \end{array}\right)\right) $$ for $W=\text{diag}\left(K(x_{0},x_{i})\right)_{i=1\dots n}$ with $K$ being the regression kernel. The solution to the weighted least squares problem can be written as $$ \left(\begin{array}{cccc} \alpha & \beta_{1} & \dots & \beta_{d}\end{array}\right)=\left(X^{t}WX\right)^{-1}X^{t}WY. $$ Thus, for $l(x_{0})=\left(\begin{array}{ccccc} 1 & x_{0} & x_{0}^{2} & \dots & x_{0}^{d}\end{array}\right)\left(X^{t}WX\right)^{-1}X^{t}W$ we obtain $$ \hat{f}(x_{0})=l(x_{0})Y $$ implying that  $$ \text{Var }\hat{f}(x_{0})=\sigma^{2}\left\Vert l(x_{0})\right\Vert ^{2}=\left(\begin{array}{ccccc} 1 & x_{0} & x_{0}^{2} & \dots & x_{0}^{d}\end{array}\right)\left(X^{t}WX\right)^{-1}X^{t}W^{2}X\left(X^{t}WX\right)^{-1}\left(\begin{array}{ccccc} 1 & x_{0} & x_{0}^{2} & \dots & x_{0}^{d}\end{array}\right)^{t}. $$ My approach: An induction using the formula for the inverse of a block matrix but I did not succeed.  The paper  by D. Ruppert and M. P. Wand derives an asymptotic expression for the variance for $n\rightarrow\infty$ in Theorem 4.1 but it is not clear that is increasing in the degree.


I am running Ubuntu on a VM and am trying to download some packages, but every time I run sudo apt update or sudo apt-get update, I get a hash mismatch error. On looking up posts related to this, I even reset my sources list as was mentioned, but the error persists. Is there any other solution you might recommend? Is there something wrong with the installation itself? This is what I get: E: Some index files failed to download. They have been ignored, or old ones used instead.

When I check for updates, I get a "Failed To Download Repository Information" error.   This is what comes up under details:   W: Failed to fetch gzip:/var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_natty_main_source_Sources  Hash Sum mismatch,  E: Some index files failed to download. They have been ignored, or old ones used instead.


I would love to be able to augment the resolution of my desktop larger than that of my monitor.  Currently I am limited by the max resolution of my monitor.  In a previous laptop (toshiba) running WinXP, I was able to go beyond the monitor resolution, I get a big desktop where I can see only part of it with my monitor. I want this on my HP tm2 Win7. Is this possible?

I want to run the Microsoft SDK Simulator on Windows 7 but it requires 1280 x 960 or greater, whereas I have just 1280 x 800 on my laptop. I remember when using Windows XP it give me a lot of choices between resolutions even though the resolution of the screen is so small. On Windows 7 it doesn't offer other resolutions bigger than the maximum, is there any workaround or software that allows higher resolution? This is a video I took using Windows XP, you can see that when the resolution exceeds the maximum, not the whole desktop is shown on the screen but once I hover on the sides the desktop moves to show the hidden sides.   Note that I am not using any software and I didn't do any hardware modification, this has always worked for me, not like what the answers mentioned.


Looking for a detailed how-to on uninstalling Ubuntu 12.04.2 LTS. I've installed it alongside Windows 8.

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


The following code generate a vertical shift on the item 1. on the next slides. I don't know why and after few try, it's still moving when I go to next slides. Do you know why and how should I do to correct this ? I have the same problem for an other slide when the enumerate content appear on it.  \documentclass[hyperref={pdfpagemode=FullScreen},xcolor=table,t]{beamer}  \begin{document} \begin{frame} \frametitle{Frame Title} \begin{itemize}     \item<+-> first item     \begin{enumerate}         \item<+-> item 1.         \only<+>{         \begin{enumerate}[a.]             \item item a.             \item item b.             \item item c.         \end{enumerate}         }         \item<+-> item 2.     \end{enumerate} \end{itemize} \end{frame} \end{document}     Addition by @samcarter  The problem can be simplified a bit: a nested itemization influences the top alignment of the top-level itemization.  MWE:  \documentclass[t]{beamer}  \begin{document}  \begin{frame} \begin{itemize}     \item item 1. \end{itemize} \end{frame}  \begin{frame} \begin{itemize}     \item item 1.     \begin{itemize}         \item item a.     \end{itemize} \end{itemize} \end{frame}  \end{document}

I have two itemize environments, one is nested in the other. Somehow the nested itemize environment affects the vertical spacing of the adjacent item of the parent itemize environment. As you can see in the example below, the vertical space between b and c is slightly smaller than between a and b. If I remove the nested itemize environment, the vertical spacing between b and c is the same as between a and b. How can I achieve equally spaced items in an itemize environment nesting another itemize environment?    \documentclass{beamer}  \begin{document}   \begin{frame}     \begin{itemize}       \item a       \item b       \item c       \begin{itemize}         \item d         \item e       \end{itemize}     \end{itemize}   \end{frame} \end{document}


Let $a$, $b$ and $c$ be positive real numbers such that $a^3 + b^3 = c^3$. Prove that $$a^2 + b^2 - c^2 \gt 6(c - a)(c - b).$$    This problem is from the Indian MO 2009, however, I do not know how to approach it, any help?

If $a,b,c>0$ and $a^3+b^3=c^3$ then prove that $$a^2+b^2-c^2>6(c-a)(c-b)$$.  I tried factoring but things got more complicated. I dont think standard AM-Gm can be applied directly. Can somebody help me to proceed? Thanks a lot.


Suppose you have a ring R with 1. If this ring is finite, I think I can prove that any element with a 1-sided inverse also has a two-sided inverse. The question asks for a counter-example when the ring is infinite. I'm having trouble coming up with one.

Can I have a hint on how to construct a ring $A$ such that there are $a, b \in A$ for which $ab = 1$ but $ba \neq 1$, please? It seems that square matrices over a field are out of question because of the determinants, and that implies that no faithful finite-dimensional representation must exist, and my imagination seems to have given up on me :)


Most of the times, when I see a question being closed, two cases arise:   The question was closed by Community moderator (perhaps it was a dupe). The question was closed by 5 VtC's, and names of the voters are displayed.   Most of the times I see this in Stack Overflow, which is the most active site in the whole ecosystem.  What I noticed is the following: There is at least one site when questions are being closed unilaterally. This means that one moderator vote made the question be closed.  I expect that action be taken, say, when a blatantly aggressive behavior from the OP is taken, say:   Anything violating directly or indirectly the ToS or any manifestation of common sense (e.g.: direct aggression against a user or social group, SPAM, an attempt to exploit an XSS bug, ...), which will involve even harder sanctions than closure/deletion. A blatantly off-topic question (e.g. I go to Stack Overflow to ask about how to take care of two Trachemys Scripta turtles).   The question was not blatantly off-topic (edit although it was marked as off-topic since lately every site uses that reason as a wildcard) on the site or had any strange behavior, however was put on hold unilaterally. Regarding to me, one of my questions was closed in programmers.SE (say) for similar reasons but by five users, as most of the times occurs. And closing a question with five votes looks the usual to me. I always perceived this ecosystem was led by community, and not an administrator. This means: it was self-managed with downvotes and closures are agreed by multilateral parties.  I don't want to name the site, which had the particularly annoying case -to me-, because perhaps what I think is a wrong behavior is actually right and expected under certain conditions.  Edit  which:   Follows the good subjective guidelines (mainly because it asks about facts). Had a lot of upvotes, meaning the users found the question useful and even the answers were considered useful. They are about the game industry (which is one of the topics listed as allowed in the Help Center). But... It was closed by a single admin vote.   So tl;dr: What bothers me is that there are cases where I see closures by just one user (the administrator) instead of community consensus. Perhaps there's a reason for me to be wrong about this concern. Question: What am I missing here?

I know mods are supposed to step in to quickly close seriously problematic posts and otherwise allow the community to vote to close a post.  But what about when there are four close votes on a question, and I personally feel the question should be closed but isn't worthy of mod super-mega closing? Should I cast the final vote like a normal user (even though it's technically binding) or should I sit back and wait  for the community?  For me the problem is complicated because on UX.SE we hover close to the point where there's not enough high-rep activity to quickly close posts and I was one of those high rep users that used to VtC.  Should I always treat my mod close vote as binding and reserve it for extreme situations, or should I treat my close vote as "normal" when it's the fifth and final vote anyway?


This is my code but I want it to align to the left, more like the second part. \documentclass{article} \usepackage{mathtools}  \begin{document} \begin{gather*}     \sum F_x = 0 \\     F_{Ax}+F_{AF}+F_{BF}\cos(30)= 0     \\      \\     \sum F_y = 0 \\      F_{Ay}+F_{BF}\sin(30) = 0 \end{gather*}   \end{document}

Here is my split equation:  \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \begin{split} a_{ijk} =& \frac {Pr(M_{I} =2  \&  M_J=1 \& M_K =1 | I=i , J=j , K=k)}{Pr (M_I =1 \& M_J =1 \& M_K=1 | I=i , J=j)} \\             =& \frac {\mu_{ijk211}}{\mu_{ijk111}}\\ \end{split} \end{equation} \end{document}   I want to align this equation to the left. Is this possible in an equation environment?


How did we come to know that treating the differential notation as a fraction will help us in finding the integral. And how  do we know about its validity?  How can $\frac{dy}{dx}$ be treated as a fraction?  I want to know about how did u-substitution come about and why is the differential treated as a fraction in it?

In the book Thomas's Calculus (11th edition) it is mentioned (Section 3.8 pg 225) that the derivative $dy/dx$ is not a ratio. Couldn't it be interpreted as a ratio, because according to the formula $dy = f'(x)dx$ we are able to plug in values for $dx$ and calculate a $dy$ (differential). Then if we rearrange we get $dy/dx$ which could be seen as a ratio.   I wonder if the author says this because $dx$ is an independent variable, and $dy$ is a dependent variable, for $dy/dx$ to be a ratio both variables need to be independent.. maybe?


I was reading the corollary;     Let $\varphi :G\rightarrow G'$ be a homomorphism of finite groups. Then $$|G|=|\ker \varphi| \cdot |\text{im}\space \varphi|$$   Then I suddenly remember one of my 6-th or 7-th grade formula     Let $a,b\in \mathbb{N}$, then $$a \cdot b=\gcd (a,b) \cdot\text{lcm} (a,b)$$   Are these two result really related!! If so then what is $\varphi$ here?

Recently, I was informed that we can verify the famous formula about $\mathrm{lcm}(a,b)$ and $\gcd(a,b)$ which is $$\mathrm{lcm}(a,b)=\frac{|ab|}{\gcd(a,b)} $$ via group theory.   The least common multiple of two integers $a$ and $b$, usually denoted by $\mathrm{lcm}(a,b)$, is the smallest positive integer that is a multiple of both $a$ and $b$ and the greatest common divisor ($\gcd$), of two or more non-zero integers, is the largest positive integer that divides the numbers without a remainder.  I do not know if we can prove this equation by using the groups or not, but if we can I am eager to know the way someone face it. Thanks.


I want to say parking of McDonald's, i.e. using an apostrophe S. Would I say McDonald's's parking?

If the cricket ground Lord's is a possessive, what if you want to describe something belonging to Lord's? Would you say:     I was very impressed by Lord's's customer services.   It doesn't look right, so what is the correct way of writing it?


There is bold, there is italic, but what about underlining? Or strikethrough even? Coming from Microsoft Office or other areas of the Internet, not having a way to underline something or strikethrough irrelevant stuff seems weird to me, so where did the choice to not include it come from?

Why is it that italic and bold formatting is available while underline is not?  I guess it is voluntary, I'm just wondering why that would be the case.


The lemniscate $\ r^2 =\ a^2 \cos (2\theta) $ revolves about a tangent at the pole. What will be the volume generated?  I know the answer will be $ \frac  {\pi a^3}{4}$ But my question is how? Any help possible is requested.

The lemniscates $r^2 = a^2\cos2\theta$ revolves about a tangent at the pole. What is the volume generated by it ?  Please explain in detail. I found a couple of answers on finding surface areas, volumes but didn't understood it.  Can someone solve this. I'm stuck in the middle with integrations.


I called sudo apt-get update, i got something like this  Err http: //ppa.launchpad.net trusty/main i386 Packages   404  Not Found this  Err http: //ppa.launchpad.net trusty/main i386 Packages    404  Not Found and this is what the last line look like  W: Failed to fetch http: //ppa.launchpad.net/marlin-devs/marlin-daily/ubuntu/dists/trusty/main/binary-i386/Packages  404  Not Found W: Failed to fetch http: //ppa.launchpad.net/tiheum/equinox/ubuntu/dists/trusty/main/binary-i386/Packages  404  Not Found E: Some index files failed to download. They have been ignored, or old ones used instead.  SO, anyone can help me?? FYI, this is from Ubuntu 14.04

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors?


I've been given this question:     A bullet entering a target with an initial velocity of $ u $ loses $\frac {u}{n}$ of its velocity after penetrating a distance $ a $ into the target;  how much further will it penetrate?   My question is, doesn't some information about the nature of the bullet's acceleration need to given? How otherwise would I formulate the kinematic equations?

A bullet looses (1/n)th of its velocity passing through one plank. The number of such planks that are required to stop the bullet can be?  Logically, to me the answer seems to be infinity, as always a fraction of velocity will get reduced. But in my book the answer is n^2/(2n-1) (that comes from energy balance). What is correct?


I have a pgfplots axis, displaying some data. The ticklabels are defined manually, so the standard font used is the base text font.   What I would like to do is to obtain tick labels using the math font of my document without putting all of my ticklabels in math mode using $ ... $.  Basically, I think I just need to add some ticklabel style={font=\mathseries} but I don't know what command to use instead of \mathseries.  I apologize in advance for this somewhat dummy question.  CLOSE EDIT     I used  in the duplicate link, not the accepted answer.   Edit: I  updated the MWE, removing mtpro2, which actually changes the output, but not the issue.  MWE  \documentclass[tikz]{standalone} \usepackage{pgfplots} \usepackage{times} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture}  \begin{axis}[% width=5cm, height=5cm, at={(0cm,0cm)}, scale only axis, plot box ratio=1 1 1, xmin=0, xmax=10, xtick={0,2,4,6}, % HERE THE LABELS DEPEND ON THE MATH MODE xticklabels={$0.12$,0.12,$0.345$,0.345}, ymin=-0.5,ymax=9.5, ytick=\empty, zmin=0.0000e+00, zmax=10, view={-4.4000e+01}{5.9600e+01}, axis x line*=bottom, axis y line*=left, axis z line*=left, ticklabel style={font={\footnotesize}}, ]  \end{axis} \end{tikzpicture}% \end{document}   Result without mtpro2   Result with mtpro2   As you can see, the labels within $ ... $ and the other labels have different fonts.  Edit 2 Comment regarding the use of assume math mode from pgfmanual v3.0.1a p954     /pgf/number format/assume math mode={hbooleani} (default true)   Set this to true if you don’t want any checks for math mode. The initial setting checks whether math   mode is active using \pgfutilensuremath for each final number.   Use assume math mode=true if you know that math mode is active. In that case, the final number is   typeset as-is, no further checking is performed.   Edit 3 I added a xticklabel={$\pgfmathprintnumber{\tick}$} after the xticklabels={...} call. I actually overwrites the manually defined xticklabels and uses the values in xtick but gives the desired math output...  Updated MWE  \documentclass[tikz]{standalone} \usepackage{pgfplots} \usepackage{times} \pgfplotsset{compat=newest} \pgfplotsset{xticklabel={\pgfmathprintnumber[assume math mode=true]{\tick}}} \begin{document} \begin{tikzpicture}  \begin{axis}[% width=5cm, height=5cm, at={(0cm,0cm)}, scale only axis, plot box ratio=1 1 1, xmin=0, xmax=10, xtick={0,2,4,6}, % HERE THE LABELS DEPEND ON THE MATH MODE xticklabels={$0.12$,0.12,$0.345$,0.345}, %PRINTS THE TICKS IN MATH MODE BUT NOT THE MANUALLY SET TICKLABELS xticklabel={$\pgfmathprintnumber{\tick}$}, ymin=-0.5,ymax=9.5, ytick=\empty, zmin=0.0000e+00, zmax=10, view={-4.4000e+01}{5.9600e+01}, axis x line*=bottom, axis y line*=left, axis z line*=left, ticklabel style={font={\footnotesize}}, ] \end{axis} \end{tikzpicture}% \end{document}

Preface:  An axis plotted with  is usually using the current math font for its ticklabels. But if they are overwritten by e.g. xticklabels={-8,-6,...,8} then the current text font is used. Also an axis label ylabel={Y} would be in text font unless put explicitly in math mode ylabel={$Y$}. However it would be nice, if  one hadn't to do so.   Question:  I'm aiming to ensure that pgfplots always uses the current math font. But please assume that the classic font commands like \rmfamily are screwed up by the corporate design I'm supposed to use, e.g. assume: \renewcommand{\rmdefault}{\sfdefault}  It works if I explicitly define a font  \newcommand{\pgfmathfont}{\fontfamily{pxfonts}\selectfont}   and pass it to pgfplots together with assume math mode=true:  \begin{axis}[ font = \pgfmathfont,  tick label style={/pgf/number format/assume math mode=true} ]   But it requires that I insert the name of the current math font. How can I do that automatically? How to get the currently used math font to insert it into the macro?    MWE  \documentclass{beamer}  \usetheme{Warsaw} \usefonttheme{professionalfonts} \usepackage{pxfonts} \usepackage{pgfplots}  % screwed up by Corporate Design \renewcommand{\rmdefault}{\sfdefault}  % I'd like this line to be generic! \newcommand{\pgfmathfont}{\fontfamily{pxfonts}\selectfont} %           put current math font here   X  \begin{document}  \begin{frame}  This is a basic equation:    \[ x + y = 42\]  \begin{tikzpicture}     \begin{axis}[ %   font = \rmfamily, % makes no sense here     font = \pgfmathfont,      xlabel={$x$-label: I want to be in math font!},     ylabel={Y},     xtick={-4,-3,...,4},     xticklabels={-8,-6,...,8}, %   xticklabels={$-8$,$-6$,...,$8$}, % does not work     tick label style={/pgf/number format/assume math mode=true}     ]      \addplot {x^2};      \end{axis} \end{tikzpicture}  \end{frame}  \end{document}     Everything related to  is no option at all!  Thank you!


If the electrons and protons are moving in a circuit, then they should cancel each other after crossing the barrier? How is it working?

On a systems level, I understand that as electrons are pushed into a wire, there is a net field and a net electron velocity.  And I've read that the net electron drift is slow.  But electricity travels through the wire, essentially at c, and I want to understand that mechanism.  My apologies if my question is poorly stated, I know bare bones undergraduate quantum theory circa 1990s but it doesn't explain the motion of electricity in detail.  Here's my conception, I'm hoping someone will fill in the holes, ha ha.  An electron moves into the wire.  It's got a kinetic energy.  After travelling a short distance, it spontaneously emits a photon, which hits another electron in a valence shell.  That electron then presumably does the same.  If this conception is simply wrong, please enlighten me.  The questions that arise:   Presumably at this level, electrons are acting more like waves and less like particles, but is there any classical component in the picture, ie are electrons coming in imparting other electrons with kinetic energy through repulsion, or does it not work that way? If electrons momentarily have energy, then pass it on by a photon, what determines when that photon is emitted, and what frequency it will be?  I assume that electrons in this cloud are not limited by any kind of exclusion principal, and that any frequencies are possible? Why should a photon emitted by an electron be in the direction of travel?  Conservation of momentum tells me that if an electron is moving, the photon should be emitted in that direction, slowing the electron, but could an electron emit a photon in the opposite direction?  If it did, I assume it would somehow have had to absorb energy from elsewhere? That sounds possible by analogy with quantum tunneling. What is the mechanism by which electrons propagating increase the temperature of the material?  Are they transmitting energy to the electrons in the valence shell, which tug at the nucleus, do some photons hit the nuclei directly, or is there some other way?  Presumably, electricity travels slower than light, because there is some time in each exchange, and some time when electrons are moving at sublight speeds before emitting a photon.  By how much is this slower than light, and what is the speed of each interaction?


I am coding this below functionality where I need to run a class which takes some parameters this will perform an action on the server that is given in the url ....  oracle.ucm.client.DownloadTool --ping --URL=abz.com --param1=abc --param=xyz   And this class is present in a jar which I have included in the build path.  Executing this manually through command line looks something like this:  bash$ java -classpath ".jar file location" abc.xyz.DownloadTool --ping --url=www.google.com --username=xyx --password=abc   Please let me know how to program this.

What is a good way of parsing command line arguments in Java?


I need to prove that function  $\mathbb R × \mathbb R → \mathbb R $ : $f(x,y) = \frac{|x-y|}{1 + |x-y|}$ is a metric on $\mathbb R$. First two axioms are trivial; it's the triangle inequality which is pain. $\frac{|x-y|}{1 + |x-y|}$ + $\frac{|y-z|}{1 + |y-z|} ≥ \frac{|x-z|}{1 + |x-z|} ⇒ \frac{|x-y| + |y-z| + 2|(x-y)(y-z)|}{1 + |x-y| + |y-z| + |(x-y)(y-z)|}≥ \frac{|x-z|}{1 + |x-z|}$, but then I am stuck. Can somebody show me way out of this?

I'm studying for actuarial exams, but I always pick up mathematics books because I like to challenge myself and try to learn new branches.  Recently I've bought Topology by D. Kahn and am finding it difficult.  Here is a problem that I think I'm am answering sufficiently but any help would be great if I am off.  If $d$ is a metric on a set $S$, show that  $$d_1(x,y)=\frac{d(x,y)}{1+d(x,y)}$$ is a metric on $S$.  The conditions for being a metric are $d(X,Y)\ge{0}, d(X,Y)=0$ iff $X=Y$, $d(X,Y)=d(Y,X)$, and $d(X,Y)\le{d(X,Z)+d(Z,Y)}$.  Thus, we simply go axiom by axiom.  1)  Since both $d(x,y)\ge{0}$ and $1+d(x,y)\ge{0},$ it is clear that $d_1(x,y)\ge{0}$.  (Is this a sufficient analysis?) 2) $d_1(x,x)=\frac{d(x,x)}{1+d(x,x)}=\frac{0}{1+0}=0$. 3) $d_1(x,y)=\frac{d(x,y)}{1+d(x,y)}=\frac{d(y,x)}{1+d(y,x)}=d_1(y,x).$ 4) $d_1(x,y)=\frac{d(x,y)}{1+d(x,y)}\le{\frac{d(x,z)+d(z,y)}{1+d(x,z)+d(z,y)}}=\frac{d(x,z)}{1+d(x,z)+d(z,y)}+\frac{d(z,y)}{1+d(x,z)+d(z,y)}\lt\frac{d(x,z)}{1+d(x,z)}+\frac{d(z,y)}{1+d(z,y)}=d_1(x,z)+d_1(z,y).$  However, #4 is strictly less, not less than or equal to, according to my analysis, so where did I go wrong?


I have a 13" Macbook Pro 2010. Should I download the 32-bit version or the 64-bit version of Ubuntu?

What is the difference between 32-bit and 64-bit Ubuntu? I've heard the 64-bit platform performs better and can detect more than 4GB of RAM. Also, while some apps haven't ported to 64-bit yet, ia32-libs lets a 64-bit machine run them.  If so, why not promote 64-bit over 32-bit?


I tried sudo apt-get install skype and it shows Unable to locate package skype  How should I install it ?

I want to install Skype, but I can't locate it in Software Center or by using Synaptic Package Manager. Can anyone help me?


I need the following template for Elsevier journal, which can generate a paper like the one in the image  P.S. I have tried to download it from the Elsevier site but I could not found it...

I'm making my journal using . Here is an example of PDF output file:   However, I've reviewed some papers from Elsevier, and I can see the difference. For example:   How can I create the PDF file similar to the second picture? Thanks.


I want to change my splash screen image.but I cant found where is the bl_app_template_user location.I dont found the default splash screen image in that folder     this is my zip file    im using windows 7 professional 64 bit thanks alot

The default Splash screens are cool, but I'd like to add some of my own work to remind me of how awesome I am (no, not really).    Is it possible to customize/change the splash screen?


Is there a way in QGIS to edit 2 different features from 2 different layers at once.  For example I selected a point in a point layer and a polygon in a polygon layer and I want to move them to another place at the same time.  I can enable editing on both layer but I still have to move my features one after the other which means I can't graphically move my 2 features by exactly the same x and y. That is a problem since I want them to stay at the same place relative to each other.  I found  from 7 years ago saying it is not possible. I'm wondering if the situation has changed

I have several line layers (route, pipes, cables) that share the same geometry and would like to edit them simultaneously.   Is there a way to easily snap the geometry of the pipes and cables layers to the route layer so that I can simply change the geometry of the route layer and don't have to repeat all changes on the other two layers as well?  To clarify, I plan a fibreglass route and have three layers. The first one describes the route that I have to take to pass all homes that have to be connected. The second one contains the pipes in which the cables lie and the third layer is the cable layer. So all features on those layers have to have the same geometry. Once I change the pathway of the route layer, I have to apply the same changes to the other two layers to ensure that they are still aligned with the route layer. I'm not sure whether I understand your comments correctly, but I use the basic editing tools in QGIS 3.


I want to make a freeze time effect (also known as a bullet-time effect) in blender. so the camera is moving, but everything in the frame stands still. I already have a smoke simulation and I want to pause it on one frame. while the smoke simulation is paused the camera should move around the smoke. Does anyone have an idea how doing that? Thank you for your answer. (I am in cycles)

So  i have a scene with a few objects, and a water simulation in the scene. However I want to animate the camera turning around in the scene, while the water simulation is frozen in time. So something like a time freeze effect. But when ever I try to render an animation it renders the water simulation too. I just need one frame of the water simulation. Is there a way to do this?


When I google for an answer, and one of the top hits is a stack overflow topic, it almost always (>90%) has been closed as being "non-constructive".  I know there is a policy against topics that lead to debates, but my observation indicates that there must be value to aggregating "debates".  When studying a new aspect of programming, these debates can quickly catch someone up on major views and pros/cons, even when there is no definite answer (which is also useful information!!! scientist speaking here).  Has there been any testing to see if there is actually any significant downside to keeping these open?  Especially if there has been a large number of incoming referrals (like from Google) to certain topics?  Update: A common trigger is when looking for a good tool(s) to do a job.  SO topics often come up in these types of searches and are hugely helpful... which is sort of funny when you notice it's been closed... then you wonder if the information is no longer up-to-date.

Recommendations are a recurring topic on multiple Stack Exchange (SE) sites. Some sites allow recommendations (ex: ), some do not (ex: ). There are many reasons for that and I can still remember animated discussions on this subject on the Gaming meta. Then there is that existential problem with Sci-Fi SE, "What problems does answering a question on this site solve?"  The only common problem I can think of is What to read/watch next?, which obviously led to a big number of recommendation questions, later slightly disguised as list question. And the main trouble with these questions isn't objectivity at all, some of them aren't even subjective. It's the fact that they don't have an answer - they are open ended. -  Those questions are monstrously popular because:  There's an actual problem to be solved,  or  This problem is quite common.  In view of the  blog post, a recommendation question fails the "real questions have answers, not items or ideas or opinions." criteria. But it's still a "practical, answerable questions based on actual problems that you face. " and it requires expertise to answer. The problem is that there are multiple acceptable answers, and the asker is not the best person to evaluate the best answer because he doesn't know which one is the best compared to the others, and he cannot test it in short term. Even the need to accept an answer is questionable. So, is a recommendation question an acceptable kind of list-type question or should it be closed just like any other list-type questions?


I'm using Flex version 3.6 and I have a requirement to sort a data grid by two columns. When I click on a column header, the sort arrow displays over it.  What I'm trying to do now is when I click on 1 particular column, it will sort on two columns. That part's working.   But I've noticed that the sort arrow indicator that usually appears over a sorted column has disappeared. I'm using a subclass of DataGrid, so after I sorted, I tried to use placeSortArrow()but I noticed in DataGridHeader.as that sortArrowis null.  protected function headerReleaseListener(event:DataGridEvent):void {     if(event.columnIndex == 0)     {         event.preventDefault();          var sort:Sort = new Sort();         sort.fields = [new SortField("@name",true, true), new SortField("@address",true, false)];          ArrayCollection(this.dataProvider).sort = sort;         ArrayCollection(this.dataProvider).refresh();     } }   What I'd love to have is to specify on which column the sort arrow should appear on, whether a column is sorted by 1 or more columns. Does anyone know if this is possible?

In Flex I'm using the following code to allow sorting in a DataGrid (the data is paged and sorted serverside).            private function headerReleaseHandler(event:DataGridEvent):void         {             var column:DataGridColumn = DataGridColumn(event.currentTarget.columns[event.columnIndex]);              if(this.count>0)             {                 if(this.query.SortField == column.dataField)                 {                     this.query.SortAscending = !this.query.SortAscending;                 }                 else                 {                     this.query.SortField = column.dataField;                     this.query.SortAscending = true;                 }                 this.fill();             }              event.preventDefault();         }    This works perfectly, except that the arrows that indicate sorting isn't shown. How can I accomplish that?  Thanks! /Niels


My  input box must accept the following combination  (123) 123-4567 or 123-123-1234   Can anyone help me out to make regular expression?

I'm trying to put together a comprehensive regex to validate phone numbers. Ideally it would handle international formats, but it must handle US formats, including the following:   1-234-567-8901 1-234-567-8901 x1234 1-234-567-8901 ext1234 1 (234) 567-8901 1.234.567.8901 1/234/567/8901 12345678901   I'll answer with my current attempt, but I'm hoping somebody has something better and/or more elegant.


Is there a way to delete all items in my Stack Exchange inbox? There doesn't to be a 'clear inbox' button.

Is there any facility to clear inbox message? If I want to delete some of the messages from inbox, then is it possible?


Suppose I have 8 teams $A_1,\ldots, A_8$, competing in different 8 games $X_1,\ldots, X_8$. For example $X_1 = soccer, X_2 = basket ball, \ldots,$ . In the morning there are 4 games $X_1,X_2,X_3,X_4$ take place, with 16 matches. In the afternoon there are another 4 games $X_5,X_6,X_7,X_8$ take place with 16 matches again. Can I schedule (I can freely choose any game) such that:  a) Every team participate in 4 different games in the morning and 4 different games in the afternoon.  b) Every team has a change to meet with another 7 teams?  c) Each games need two teams to play in one match?

Hi there I am planning a ”Scavenger hunt”-like activity (I have no other words for this event), and I am having trouble creating the schedule.   The idea of this hunt/run/game/competition is that 10 teams will battle each other at X different mini games. The games on are team vs. team based, meaning that there will always be two teams on each post and one winner and one loser.  I require that every team fights every other team. Meaning that team 1 will have to meet team 2, 3, 4, 5, 6, 7, 8, 9, and 10, and team 2 will have to meet team 1, 3, 4, 5, 6, 7, 8, 9, 10 (and so forth). The amount of mini games must be so, that every team only meets the other teams ONCE each, but still they have to meet every team.  How many posts do I need to create, and how could I schedule the overall activity? (A table of rounds and teams would be much appreciated).


Let $\mathcal{M}_1,\dots,\mathcal{M}_r$ be all the maximal ideals of an Artin ring $A$ which is a finite $\mathbb{K}$-algebra; so let $A/\mathcal{M}_1\cdots\mathcal{M}_r$ be a $\mathbb{K}$-vector space. Which is its dimension?  Is it a general case that the number of maximal ideals in $A$ is equal to $\operatorname{dim}_{\mathbb{K}} A+1$?

Let $K$ be a field and let $R$ be a $K$-algebra with unity which is finite dimensional as a $K$-vector space. Prove that $R$ has only finitely many prime ideals all of which are maximal. (Hint: Chinese remainder theorem)   My attempt: We have $R \simeq K^n$, for some $n$, as vector spaces. I claim that there are finitely many ideals of $K^n$. Let $I$ be an ideal of $K^n$ and $(a_1, a_2,...,a_n) \in I$. For every entry $a_i$, we have two choices, either $a_i=0$ or not.  So we get $2^n$ many cases, and any case give a particular ideal of $K^n$ which are distinct from others.  Is my proof correct or am I missing some point? If it is true, how can we give a proof by using the Chinese remainder theorem? Thanks!


I have a sugar daddy who wants me username & password to my bank to send me my money. So what I did was I opened a new account with only $25 in it at a totally separate bank from my main one. Should I not share my info even though it only has $25 in it? I have never been a sugar baby before.

Someone is offering to pay me in a sort of sugar daddy/sugar baby arrangement. They want to make online deposits to me, and they're asking me for my online banking username and password. Is that information alone enough for them to be able to take my money out of my account, or am I safe?


I tried reading online articles about this but I'm still not understanding when it is correct.   The sentence:         "Logic is not for people like you and me."      Is this accurate and in which context could this change to "you and I"?  If the word "logic" was replaced by an adjective would that change anything?

In high school we learned to say "than I" and "as I" because you could potentially add an "am" to the end of the sentence.  Examples:  "She is smarter than I."  (Think: "...than I am.") "He is as tall as I."  (Think "...as I am.")  So analogously, shouldn't it be "like I" as well:  "He is sincere, just like I."  (Think: "... like I am.")  But universally, it seems that we use "like me".  Where does this reasoning break down?  Is there history here?


I accidentally deleted all bootloaders (Windows Boot Manager and Grub). If I start my laptop it doesn't found any bootloaders. How can I reinstall at least Windows 10 boot manager and/or GRUB afterwards?

I have a computer that dual-boots (or tri-boots) Windows 8 Release Preview, Windows 7, and Ubuntu 12.04. Grub boots between Windows 8 and Ubuntu; for which I use primarily. Recently, I decided to remove Ubuntu, as I hardly used it. I deleted the Ubuntu partition accidentally before replacing the Grub bootloader. Now, whenever I want to boot the machine, it gives me the "grub-rescue" prompt -- I am unable to boot into either Windows (8 nor 7), nor Ubuntu (except via USB, of course). I do not have any Windows 7/8 recovery media, so that isn't an option. Please note that after I deleted the Ubuntu partition, I put the PC into hibernate, and then turned it on. This means the C:\ [Windows 8] drive cannot be mounted. I don't know if that is bad, but it definitely doesn't make things better.  I am currently booting Ubuntu via USB, in an effort to restore the Windows bootloader. I have looked into using boot-repair to solve the problem using the instructions , although after attempting to apply the changes, it gave the error: "Please install the [mbr] packages. Then try again." I don't know why I'm getting this error; is there a way to install the 'mbr packages?' I honestly don't know what exactly they are, nor how to install them. Are there any other options I have not yet exhausted to be able to boot back into Windows, in the case that there is a better way? I want to set the bootloader to boot into Windows 8, but booting into either Windows 7 or 8 is fine (I can use EasyBCD from there). Is there a simple solution to this? I've checked BIOS, and I haven't been able to find a way to boot into Windows.


I have the follow code in a js file:      $(".dropmenu").on("click", function(event){       event.preventDefault();       $(this).parent().find("ul").slideToggle();     });   And i have the follow code in my webpage:  var append="
";  $.each(items, function(i, v){   append += "
 Option " +               "
" +                  "
somelink
" +               "

";  }  $("div").append(append);   The point is when my ul tag its filled, the click event doesn't fire. I think because the class into anchor is dynamic.  How can I add the click event after the append function?

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I find many people (especially UFO-ologists) are quick to say there is an interplay between magnetism and gravity, especially when explaining antigravity of UFOs.   On the other side, I see those who are disciplined in science and  reasonably sceptical are quick to refute the relationship of the two forces.   Hence my question:   To what extent are magnetism and gravity related and unrelated?  I've already seen .  I'd like to know what modern science has to say between the both the relationship and difference between the two forces. A summary, some formulas, and modern references would be greatly appreciated.

In classical mechanics, we had Newton's law of gravity $F \propto \frac{Mm}{r^2}$.  Because of this, all laws of classical electrostatics applied to classical gravity if we assumed that all charges attracted each other due to Coulomb's law being analogous.  We can "tweak" classical electrostatics to fit gravity.  In modern physics, does the reverse work?  Can we "tweak" General Relativity to accurately describe electrostatics or even electromagnetism?


using scp to copy files from 1 unix server to another regularly and performing certain actions. to do this quickly I wish to use a unix script which does the scp and inputs the password required to complete the scp.  I have tried the expect command to send the password throught the unix command line however unable to achieve this so far.  sample commands  scp ./abc.txt hostname/abc.txt expect "*password:*" send "mypassword\r"   I get these errors:  couldn't read file "password: ": no such file or directory myscript.sh[5]: send: not found [No such file or directory]   am I missing something?

I know it is not recommended, but is it at all possible to pass the user's password to scp?  I'd like to copy a file via scp as part of a batch job and the receiving server does, of course, need a password and, no, I cannot easily change that to key-based authentication.


We have the search box on our ListViewWebPart - via Display Search Box - and the searches time-out (rarely it works straight-away), with the icon just going around in circles.  Interestingly, if we visit the list view page itself (e.g. by clicking on the ListViewWebPart header), the search works every time.   Could there be some script or other issue on the Site Masterpage vs the System Masterpage that could be causing the problem? Our masterpages aren't too different.

UPDATE after trying the OOTB list app:  I have a strange issue with placing a list view web part on a publishing page layout.  The searchbox is displaying, but when I search it does not load any results (the spinner never stops spinning).  The javascript console spits out:      inplview is undefined   so I tried referencing inplview.js. This makes the error message disappear, but still no luck with loading search results. Filtering and sorting works great though.  Note that this it true both for custom XSLT webpart and for the "App" for the list.


It is a well established fact that accelerating charges, positive or negative, emit radiation. Why then does a neutral object made up of equal amounts of positive and negative charge not emit any radiation when accelerated?

For example an electron radiates when accelerated. So does a positron. But is the radiation emitted by accelerated positronium the sum of the radiation emitted by each separately? If not, why not? If so, does this provide a way of testing whether a given neutral particle is composite? For example, does a neutron bremsstrahlung when decelerated?


Please before you mark this as a dupe, I did refer to this s.  I have a Matfer carbon steel that won't hold seasoning at all.  I first attempted the Cooks Illustrated .  I was very careful to follow the instructions carefully.     I got a nice root-beer colored seasoning that looked tough but food stuck to it like there was no seasoning at all and it came right off.  I redid this several times, each time I:   made sure each coat was very very very thin, wiped all but the sheen off baked the pan for a full hour each coat at 500F with full hour cool-down ensured each coat was not tacky applied 5 to 10 coats used very fresh pure flaxseed oil Completely cleaned the pan of seasoning between attempts with ovencleaner and scotchbrite   All very time consuming and ultimately ended in failure.  I also referred to  and followed the tips there.  I additionally followed everything on this  article.  I just can't get this to work.   I also tried a traditional seasoning.   That doesn't stay either.  I use wooden utensils.   The food just sticks and pulls the seasoning right off. I don't ever wash the pan.  One other thing I've noticed - on subsequent seasonings, no matter how thin I have the flaxseed oil on the pan, at the end of a baking cycle, it appears to pull together into little droplets.   Even with the oil practically wiped off the pan with just a nanometer thick coating.   I'm wondering if the oven cleaner messed up the pan or something.  It didn't do this when I first had the pan (though the seasoning still was a failure)  Any ideas?   I'm about ready to send this pan to goodwill.     Note I have no problem keeping seasoning on a lodge cast iron pan.

I have two carbon steel skillets from De Buyer. They are no stainless steel skillets so I have to season them. I did this with the flaxseed oil method (apply a thin coat of oil, then eat on the stove burner (not oven for me) until it smokes a lot. Wait and redo it 5-6 times.)  Just after seasoning my skillets are perfect (black and with a smooth surface). But when I start cooking a steak, the seasoning is deteriorating. Indeed, I use to add some olive oil before my meat. In the part of the pan where there is no meat, the olive oil polymerizes and create some ugly and sticky bubbles. I cannot remove these hard oil bubbles when cleaning with salt and hot water.   So, every time I cook something with requires high heat (like steak), the oil I added just before the food is polymerizing and ruins my smooth seasoning. On my older skillet, the surface is no smooth at all anymore.   How can I avoid this and maintain a smooth seasoning? How can I remove the oil bubbles?   Here is the kind of skillet I have (I took the picture from Internet):    Here is one of mine skillet. It is the new one and I use it only a couple of times. The surface is still smooth but you can see on the top the formation of oil bubbles:   Here is my older skillet. As you can see the surface is not smooth at all:


Transform the NFSA with transition table  XABFSa{}{}{}{F}b{F}{}{A,S}{A,F} and starting state S inta a DFSA and give the transition table of that DFSA. Place the letter X (uppercase) in the top left corner of the matrix. Your states in the first column and inputs in the first row can be in the order of your choice.  The question then offers a 7×3 matrix to be filled in.  Unsure how to transform the NFSA with transition table.  This is my answer but it is incorrect  Im unsure as to what I've done wrong!

Transform the NFSA with transition table  $$\begin{array}{ccc} X&a&b\\ A&\{\}&\{F\}\\ B&\{\}&\{\}\\ F&\{\}&\{A,S\}\\ S&\{F\}&\{A,F\} \end{array}$$  and starting state $S$ inta a DFSA and give the transition table of that DFSA. Place the letter $X$ (uppercase) in the top left corner of the matrix. Your states in the first column and inputs in the first row can be in the order of your choice.  The question then offers a $7\times 3$ matrix to be filled in.  Unsure how to transform the NFSA with transition table.  This is my answer but it is incorrect.  $$\begin{array}{ccc} X&a&b\\ \{S\}&\{F\}&\{A,F\}\\ \{F\}&\{\}&\{A,S\}\\ \{A\}&\{\}&\{F\}\\ \{A,F\}&\{\}&\{A,F,S\}\\ \{A,S\}&\{F\}&\{A,F\}\\ \{A,F,S\}&\{F\}&\{A,F,S\} \end{array}$$


They say that a car is a depreciating asset and so leasing a car works better than buying one. I heard this from folks and car salespersons. Although I understand the aspect of leasing cars meaning not having to spend on repairs, I don't understand how leasing is better.  It seems that leasing is fine if you assume that the car will run into repairs after the leasing period. But this may not be true always. I feel like I may be missing something here. Any analysis to help understand?  Clarification: I have heard from a few persons (sales and otherwise) that it mathematically makes sense on a depreciating asset. So their recommendation would be to just lease a car after another forever instead of ever buying it. So I am considering average leasing vs avg buying in installments (EMI) case, not extreme examples.


I am wondering if it is possible to change the output of a \newcommand after it is used once? I am creating a template for video transcription and I want the names to appear in full once, and then just the first letter in subsequent lines.  I would like to do the following:  \documentclass{report} \newcommand{\mycommand}[1]{NameOfPerson: #1} % what do I change here? \begin{document}  \mycommand{Transcription of what the person says here} \mycommand{Another line from the same person}  \end{document}   And the output to look something like:  NameOfPerson: Transcription of what the person says here  N: Another line from the same person    I am new to LaTeX so please forgive me if this is a simple question!

I want to create a command that changes its output the second time it gets called. For example, I want it to yield 1 the first time it's called, and 2 the second time:  \newcommand\mycommand { do stuff } \mycommand % yields 1 \mycommand % yields 2   My idea was to define a global variable, something like \hasbeencalled, and globally redefine that variable if the command has been called. Something like:  \def\hasbeencalled{0} \newcommand\mycommand[1] {     \ifnum\hasbeencalled=0         1         \global\def\hasbeencalled{1}     \else          2     \fi }   But this doesn't work. Somehow the global redefinition happens retroactively and changes it so that I get the output  \mycommand % yields 2 \mycommand % yields 2   But if I take away the \global, then I get   \mycommand % yields 1 \mycommand % yields 1   What can I do?


I have a .  When pedaling (actually only under load, not when just turning the crank while it's on a stand) the bottom bracket squeaks or chirps. I first thought it was birds chirping;  then I realized they were remarkably regular in their chirping.  Then I realized it was my bike. The sound has definitely gotten worse over time.  What should I be looking at in terms of fixing this?  Do I need to replace the bottom bracket?

Recently the cranks on my bike started to creak. I checked with my usual "bike-bible" . They recommended dis-assemble, lubricate, re-assemble.  So I did that.  Remove cranks. Remove spindle. Clean. Lubricate. Reassemble.  No, the creak is still there.  (To find out the source-area of the sound I had a friend riding the bike slowly while I ran alongside listening. And the sound where coming from the area of the bottom bracket/cranks. I am happy no neighbor saw me...)   For each revelation of the cranks there are two creak-noises.  If I, when on the bike, push down with both feet I hear a noise. Turn 180 degrees without pressure, push down again and there is the noise again. If I am "too soft", low pressure there are no sound. Since I have clips I have tried to only work with one foot to keep a constant load during a revelation, there where no detectable sound then.  Anyone have any idea what is wrong on the bike? And how I should fix it?  /Leif


I'm using ubuntu 14.04 LTS and I'm so new to it as I was using windows before.  As poeple told me I need three partitions ( Swap , ext4 , partition for normal files and folders ) it was recommended to me to make the third partition's format NTFS but it actually askes me to mount it every time I boot up my laptop over and over again .  My question is "Is there any other format which is used for normal data for ubuntu or Is there any solution for it ?"  My thanks in advance .

I'm installing ubuntu onto a new laptop with 24gb SSD and a 500gb HDD. I wanted to put / and swap onto the SSD and /home onto the HDD. Is there anything I shouldn't use ext4 for?  I do not ever intend to dual boot. Ubuntu only.


I have a string that in plain text is "1:2:3:4". I need to get the individual numbers from the string and then convert them into their own integers to be handled later. How do I extract the numbers from the string sequentially and turn them into their own ints (as in I need 4 different integers). Thank you.

I'm trying to iterate over the words of a string.  The string can be assumed to be composed of words separated by whitespace.  Note that I'm not interested in C string functions or that kind of character manipulation/access. Also, please give precedence to elegance over efficiency in your answer.  The best solution I have right now is:  #include <iostream> #include <sstream> #include <string>  using namespace std;  int main() {     string s = "Somewhere down the road";     istringstream iss(s);      do     {         string subs;         iss >> subs;         cout << "Substring: " << subs << endl;     } while (iss); }   Is there a more elegant way to do this?


When I open my launcher and type in my correct e-mail and my correct password, I press login and it says: 'Could not connect to server'. Does anyone know how to fix this or is Minecraft down?

What do I do? I looked at a similar question to mine and there was an answer saying to make sure Java is allowed past the firewall. So I checked and it already is. I've tried uninstalling and installing both Minecraft and Java but nothing has changed.  says that all services are fine, so what's going on? I bought a 2nd account to use as an alternative in-game account and now I can't log in.  (I cleared the email and password boxes for obvious reasons in this screenshot: security purposes)


I would like to create a list of the multiple geodatabases that sit in my local SQL Express Workgroup SDE server.   I have set up a connection using the "Database Connections\Connection to MyComputer_SQLEXPRESS.sde", but there doesn't seem to be any arcpy functions that expose the geodatabases.   It seems to identify the connection to a workspace, but doesn't give any information for what is in the workspace.   I know I can connect to each geodatabase separately and retrieve information about each of them, but I really need to get just a list of the geodatabases themselves.

I am trying to populate a folder with ArcSDE database connection files for all the databases within a server instance.  I need to be able to do this for several of our servers.  Although I know within SQL Server how to get a list of DB names from the sys.databases table, using the arcpy function CreateDatabaseConnection I cannot specify "sys" or "master" to make the connection.  Therefore, I need to know the name of a database currently in the server.  I am not sure how to make the check without hard-coding a name.  import arcpy arcpy.env.overwriteOutput = True  #Input the location where the database connection files will be stored connectionLocation = "F:/FolderName"  #Get the list of servers arcpy.CreateDatabaseConnection_management(out_folder_path= arcpy.env.scratchFolder,out_name= "GIS_USERCONFIG" ,database_platform="SQL_SERVER",\                                           instance = "XXXXXXX" ,account_authentication="DATABASE_AUTH",username="user",password="password",\                                           save_user_pass="SAVE_USERNAME",database= "GIS_USERCONFIG",schema="#",version_type="TRANSACTIONAL",version="dbo.DEFAULT",date="#") sdeConn = arcpy.ArcSDESQLExecute(arcpy.env.scratchFolder + "/GIS_USERCONFIG.sde") serverListSQL = sdeConn.execute("Select name from userservers") serverList = [] for i in range(0,len(serverListSQL)):     serverList.append(serverListSQL[i][0])  #Make a folder for each server instance and build the connection files for all DBs in the server instance for server in serverList:     folder = connectionLocation + "/" + server     if arcpy.Exists(folder):         print server + " folder already created"     else:         try:             arcpy.CreateFolder_management(connectionLocation, server)             print "Created Folder " + server         except:             print "failed to create folder " + server      #     arcpy.CreateDatabaseConnection_management(out_folder_path= arcpy.env.scratchFolder,out_name= server ,database_platform="SQL_SERVER",\                                           instance = server ,account_authentication="OPERATING_SYSTEM_AUTH",\                                           database= "master",schema="#",version_type="TRANSACTIONAL",version="dbo.DEFAULT",date="#")     sdeConn = arcpy.ArcSDESQLExecute(arcpy.env.scratchFolder + "/" + server + ".sde")     dbListSQL = sdeConn.execute("Select name from sys.databases")     dbList = []     for i in range(0,len(serverListSQL)):         dbList.append(dbListSQL[i][0])     for db in dbList:         arcpy.CreateDatabaseConnection_management(out_folder_path= folder ,out_name= db,database_platform="SQL_SERVER",\                                           instance = server ,account_authentication="OPERATING_SYSTEM_AUTH",\                                           database= db,schema="#",version_type="TRANSACTIONAL",version="dbo.DEFAULT",date="#")   Basically my issue is with the 2nd call for the function "CreateDatabaseConnection_management" since it needs a database that exists in the database (and I could not use "master or sys").  If you open this as a tool in arcmap, the input is a drop-down box that populates choices based on the databases in the chosen server instance.  Is there a way to do this in the code?


I have a function that has a few possible return values. As a trivial example, let's imagine it took in a positive int and returned "small", "medium", or "large":  def size(x):     if x < 10:         return SMALL     if x < 20:         return MEDIUM     return LARGE   I am wondering the best way to write & define the return values. I am wondering about using Python function attributes, as follows:      def size(x):     if x < 10:         return size.small     if x < 20:         return size.medium     return size.large  size.small = 1 size.medium = 2 size.large = 3   Then my calling code would look like:  if size(n) == size.small:     ...   This seems like a nice built-in "enum", possibly clearer/simpler than creating a module-level enum, or defining the 3 values as global constants like SIZE_SMALL, SIZE_MEDIUM, etc. But I don't think I've seen code like this before. Is this a good approach or are there pitfalls/drawbacks?

I'm mainly a C# developer, but I'm currently working on a project in Python.  How can I represent the equivalent of an Enum in Python?


So, I did the following question and got 2 different answers.  Question: A lighthouse located 300 metres from a straight shoreline sweeps its beam of light around in a circle at a constant rate of 1 revolution every 60s. Let $\theta$ be the angle (in radians) that the beam of light makes with the perpendicular to the shoreline. How fast (in metres per second), is the beam moving along the shoreline when it is at $\frac{\pi}{6}$ radians from the perpendicular?  Solution 1 When the question is done by defining distance along the shore as $x$ and finding $\frac{dx}{dt}$, this is what we get:  $\frac{dx}{dt}=\frac{dx}{d\theta}\frac{d\theta}{dt}=\left(300\sec^2 \frac{\pi}{6}\right)\left(\frac{2\pi}{60}\right)=\frac{40\pi}{3}$  Solution 2 When the question is done by resolving $v=r\omega$, this is what we get:  $\frac{dx}{dt}=v\cos \frac{\pi}{6} = \frac{300}{\cos \frac{\pi}{6}} \cdot \frac{2\pi}{60} \cdot \cos \frac{\pi}{6} =10\pi$  Why would the 2 solutions give different answers?

This is not homework. I have the solutions, I just can't understand why mine are wrong.  The problem states: A revolving beacon $3600$ feet off a straight shore makes $2$ revolutions per minute. How fast does its beam sweep along the shore, (a) at the point on the shore nearest the beacon? (b) at the point on the shore $4800$ feet away from the beacon?  My solutions (second one is wrong): I didn't feel I needed calculus to solve (a). Basically the beacon is travelling 2 times the circumference of a circle of radius 3600 feet at (assumedly) constant speed in 1 minute, so $$C = 2 \pi r = 7200 \pi$$ and therefore $v = 14400 \frac{feet}{minute}$, which is going to be the instantaneous speed at any point on the circumference of that circle, and this agrees with the solution in the book.  For (b), I figured that since the point is $4800$ feet away from the beacon, I could just again take the constant speed of the beacon along the circumference of a circle of radius 4800 this time and have that be the instantaneous speed at any point along the circumference of that circle, and therefore at the point on the shore $4800$ feet away from the beacon.  Which gives me $$C = 2 \pi r = 9600 \pi$$ and $v = 19200 \frac{feet}{minute}$.  However, the book disagrees with that result, and states:  Measuring the distance, $x$, along the shore from the foot of the perpendicular from the beacon to the shore and taking $A$ as the angle between this perpendicular and the beam, we have $x = 3600 \tan{A} $. Hence, $\frac{dx}{dt}=\frac{14400 \pi}{\cos^2{A}}$, making the answer to (b) $25600 \pi \frac{feet}{minute}$.  I don't understand why my answer to (b) is wrong. If constant speed made sense as instantaneous speed at a point given a radius of $3600$, why doesn't it work for a radius of $4800$. I fail to see how the two questions are fundamentally different.


inside PhpMyAdmin i see the Hebrew well. but when i get the info, mySql Return question marks ???? ???? ??? i tried to put utf-8 at the header, my database collection is utf8_general_ci <?php  header('Content-Type: text/html; charset=utf-8'); $conn = new PDO("mysql:host=$servername;dbname=$DbName;charset=utf8", $username, $password); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);    $mySql = " SELECT * FROM categories_list ";      $stmt = $conn->prepare($mySql);   $stmt->execute();     $categorieList = $stmt->FetchAll(PDO::FETCH_ASSOC);

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


When I go to any profiles it shows me the last online status for that profile under visits > seen.     seen X mins ago   However, I sometimes don't want to let everyone knows that I've visited the site a while ago.Can we just turn this setting off so that no one will be able to know if I'm online or not?

I've just noticed that someone can Google my name and instantly know If I'm on Stack Overflow, because it shows the "seen 6 minutes ago."  It's shown on the results screen, the searcher doesn't even have to click the search result.  Aside from having respect for Google search and feelings of joy for Stack Overflow getting good ratings there, I find it a bit "big-brother" creepy.  Why do we need "last seen," anyway?  At a minimum I'd expect it to keep track using dates, not exact times.  But it should be removed altogether.


I need to run these simple queries on a table with millions of rows:  SELECT COUNT(*) FROM "subscriptions" WHERE "subscriptions"."project_id" = 123;   SELECT COUNT(*) FROM "subscriptions" WHERE "subscriptions"."project_id" = 123 AND "subscriptions"."trashed_at" IS NULL;   The count result for both queries, for project 123, is about 5M.  I have an index in place on project_id, and also another index on (project_id, trashed_at):  "index_subscriptions_on_project_id_and_created_at" btree (project_id, created_at DESC) "index_subscriptions_on_project_id_and_trashed_at" btree (project_id, trashed_at DESC)   The problem is that both queries are extremely slow and take about 17s each.  These are the results of EXPLAIN ANALIZE:        QUERY PLAN                                                                                --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------  Aggregate  (cost=2068127.29..2068127.30 rows=1 width=0) (actual time=17342.420..17342.420 rows=1 loops=1)    ->  Bitmap Heap Scan on subscriptions  (cost=199573.94..2055635.23 rows=4996823 width=0) (actual time=1666.409..16855.610 rows=4994254 loops=1)          Recheck Cond: (project_id = 123)          Rows Removed by Index Recheck: 23746378          Heap Blocks: exact=131205 lossy=1480411          ->  Bitmap Index Scan on index_subscriptions_on_project_id_and_trashed_at  (cost=0.00..198324.74 rows=4996823 width=0) (actual time=1582.717..1582.717 rows=4994877 loops=1)                Index Cond: (project_id = 123)  Planning time: 0.090 ms  Execution time: 17344.182 ms (9 rows)         QUERY PLAN                                                                                --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------  Aggregate  (cost=2047881.69..2047881.70 rows=1 width=0) (actual time=17557.218..17557.218 rows=1 loops=1)    ->  Bitmap Heap Scan on subscriptions  (cost=187953.70..2036810.19 rows=4428599 width=0) (actual time=1644.966..17078.378 rows=4994130 loops=1)          Recheck Cond: ((project_id = 123) AND (trashed_at IS NULL))          Rows Removed by Index Recheck: 23746273          Heap Blocks: exact=131144 lossy=1480409          ->  Bitmap Index Scan on index_subscriptions_on_project_id_and_trashed_at  (cost=0.00..186846.55 rows=4428599 width=0) (actual time=1566.163..1566.163 rows=4994749 loops=1)                Index Cond: ((project_id = 123) AND (trashed_at IS NULL))  Planning time: 0.084 ms  Execution time: 17558.522 ms (9 rows)   What is the problem?  What can I do to improve the performance (i.e. count in a few seconds)?

This is a spin-off from comments to the previous question:      Using PostgreSQL 9.4, there always seems to be a Recheck Cond: line after bitmap index scans in query plans output by EXPLAIN.  Like in the EXPLAIN output of the referenced question:   ->  Bitmap Heap Scan on table_three  (cost=2446.92..19686.74 rows=8159 width=7)       Recheck Cond: (("timestamp" > (now() - '30 days'::interval)) AND (client_id > 0))       ->  BitmapAnd  (cost=2446.92..2446.92 rows=8159 width=0)             ->  Bitmap Index Scan on table_one_timestamp_idx  (cost=0.00..1040.00 rows=79941 width=0)                   Index Cond: ("timestamp" > (now() - '30 days'::interval))             ->  Bitmap Index Scan on fki_table_three_client_id  (cost=0.00..1406.05 rows=107978 width=0)                   Index Cond: (client_id > 0)    Or in the output of EXPLAIN ANALYZE for a simple, huge table (with very little work_mem):  EXPLAIN ANALYZE SELECT * FROM aa WHERE a BETWEEN 100000 AND 200000;    Bitmap Heap Scan on aa  (cost=107.68..4818.05 rows=5000 width=4) (actual time=27.629..213.606 rows=100001 loops=1)   Recheck Cond: ((a >= 100000) AND (a <= 200000))   Rows Removed by Index Recheck: 758222   Heap Blocks: exact=693 lossy=3732   ->  Bitmap Index Scan on aai  (cost=0.00..106.43 rows=5000 width=0) (actual time=27.265..27.265 rows=100001 loops=1)         Index Cond: ((a >= 100000) AND (a <= 200000))    Does that mean index conditions have to be checked a second time after a bitmap index scan? What else can we learn from the EXPLAIN output?


When going vegetarian, there is a problem; where can one get the protein he/she used to get from meat?  How can one create a healthy and balanced vegetarian diet, so as to get the proper nutrition people get when they eat meat, which eating it?

An ovo-lacto vegetarian includes both eggs and dairy products in his diet, but meat is completely excluded. In a regular non-vegetarian diet, meat is very important and provides many benefits if properly consumed.  I've heard of many problems that can be induced by vegetarianism, because the body stops receiving important nutrients and it's common that the diet is not changed to compensate for the lack of meat.  How should an ovo-lacto vegetarian compensate? The meat benefits are lost, and the body still needs them. Which changes in diet should a vegetarian perform to keep receiving the nutrients that the meat stopped providing?  In other words, what diet should a ovo-lacto vegetarian have to be healthy without meat?


I installed nginx then I installed apache2, after a while I removed apache2. After a couple of weeks I noticed something strange when I accessed http://localhost: nginx handles the request but when I type in my IP address or anyone in my network types in my IP, it results in an apache2 page loading saying it's correctly working.  I purged and removed Apache but I still can't get rid of this problem, tried reinstalling and purging again then restarting. Any ideas of what could be the problem?  PS my computer doesn't recognize apache2 as being installed in anyway and all Apache files and binaries are not found even when I manually search for them.  root@elite-HP-Pro3500-G2-MT-PC:/home/elite# whereis apache2 apache2: root@elite-HP-Pro3500-G2-MT-PC:/home/elite# sudo service apache2 start Failed to start apache2.service: Unit apache2.service failed to load: No such file or directory. root@elite-HP-Pro3500-G2-MT-PC:/home/elite# sudo apt-get purge apache2 apache2-utils Reading package lists... Done Building dependency tree        Reading state information... Done Package 'apache2' is not installed, so not removed Package 'apache2-utils' is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.

It seems a simple apt-get remove apache2 does not completely remove apache2 as I can still see it on one of the processes when running top. How does one remove apache2 completely on his ubuntu server?  It's not removed indeed:  ~# which apache2 /usr/sbin/apache2 ~# whereis apache2 apache2: /usr/sbin/apache2 /etc/apache2 /usr/lib/apache2 /usr/share/apache2 /usr/share/man/man8/apache2.8.gz   But when I do apt-get remove apache2 again:  # apt-get remove apache2 Reading package lists... Done Building dependency tree Reading state information... Done Package apache2 is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


How should i phrase this?  She wished it was as easy as he thought.  or   She wished it were as easy as he thought.

Possible Duplicate:          Which one is the correct form: "Wish I was here" or "wish I were here"? I've heard both of them many times but I don't know which one is correct.


I have the following error when try to build an OR expression composed with another two expressions:  The binary operator Or is not defined for the types 'System.Func'2[Alarm,System.Boolean]' and 'System.Func'2[Alarm,System.Boolean]'.  What I want to do is combine two Expression methods in a third method with OR operator, as follows:  //First expression method private static Expression<Func<Alarm, bool>> _unacknowledged()  {     return alarm => alarm.AcknowledgeDate == null; }  //Second expression method private static Expression<Func<Alarm, bool>> _occurring() {     return alarm => alarm.OccurrenceFinalDate == null; }  //Third expression method (that combines the above) private Expression<Func<Alarm, bool>> _unacknowledgedOrOccurring() {     //This is where exception is raised     var expr = Expression.Lambda<Func<Alarm, bool>>(         Expression.Or(_unacknowledged(), _occurring())     );      return expr; }   The expected practical clause that I want using the _unacknowledgedOrOccurring() call must be similar to this:  alarmList.Where(alarm =>      alarm.AcknowledgeDate == null ||     alarm.OccurrenceFinalDate == null )   It's possible to do this? What exactly I'm missing?   Thanks in advance.

I have two expressions of type Expression<Func<T, bool>> and I want to take to OR, AND or NOT of these and get a new expression of the same type  Expression<Func<T, bool>> expr1; Expression<Func<T, bool>> expr2;  ...  //how to do this (the code below will obviously not work) Expression<Func<T, bool>> andExpression = expr AND expr2


I got a brand new Canon Rebel T6i and along with it came an ef-s 18-55mm lens, and a Polaroid studio series .43x wide angle lens (which I believe is a telephoto lens). The camera worked fine, but after I put the Polaroid lens on the 18-55mm lens, the 18-55mm lens is completely out of focus, and only acts normally with the Polaroid lens on. Is this normal? Would a factory reset on the camera do anything?

I bought a Canon D3300 bundle. This is my first dSLR. It came with a couple lenses. On Easter, I decided to use a wide angle lens to get all the action. Now I can't use my camera without this lens because it is so blurry. I have tried putting it on Auto, and restarting it. For now I'm just not getting it. I want to use my 18-55mm lens. Please help.


I often use these two words when I try to describe my experimental results. I wonder whether they can be used in the same situation. I searched these two words with WikiDiff, but still cannot get a clear explanation.

The dictionary for accuracy says:        The quality or state of being correct or precise.   The ability to perform a task with precision.      And for precision:        The quality, condition, or fact of being exact and accurate.   Marked by or adapted for accuracy and exactness      Are these nouns interchangeable? If not, how to decide whether to use one or another?


If I want to describe a person/group and then refer to something of theirs. Would these be permissible?   The guy in charge's hat It is the people of France's doing It is everyone else's fault The electrified fence's voltage   Which more commonly would be phrased like:   The hat of the guy in charge The people of France did it Everyone else is at fault The voltage of the electrified fence   If it is not what are the rules? Or where can I find the rules pertaining to this construction? In my native language the former examples can all be constructed like singular compound words, where the ownership would be indicated at the end of just one word.

Possible Duplicate:          What is the correct way of these two sentences?   The queen of England's crown The queen's of England crown   Strictly linguistically, sentence 2 should be the correct one, since the crown belongs to the queen and not to England but it sounds really awkward to pronounce.


I have written the following script which takes the path of the "download" directory from the user and then displays the filenames one by one using a for loop . Now someone may wonder why would I use a for loop in order to display the filenames in the download directory. Well, that's because I need to write a different shell script which requires the for loop with the filenames of the download directory as the list of the for loop and with the following script I want to verify that the input taken in this way works fine. #!/bin/sh  echo "Enter path of your download directory" read download_dir for file in `ls $download_dir` ; do     echo $file done  Now while running the above script, I give the input as ~/Downloads as my download directory path is /home/priyanka/Downloads. But it shows the following output: Enter path of your download directory ~/Downloads ls: cannot access '~/Downloads': No such file or directory  But if I write the above script as : #!/bin/sh  download_dir=~/Downloads for file in `ls $download_dir` ; do     echo $file done  Then, ~/Downloads is correctly expanded as /home/priyanka/Downloads and ls works fine. I guess when I use read statement and take the input from user then the input is automatically enclosed within single quotes(' ') due to which the shell does not recognize the metacharacters and as a result does not expand them (Here, the metacharacter ~). I may be wrong, but that is what my observation tells as in the output of the first script in the error message ~/Downloads is written within single quotes i.e. '~/Downloads'. But I want the first script to work as I want to take the input of the path of the download directory from the user and then work on it. How can I do that in general which will also cover the inputs involving metacharacters ? Any help will be highly appreciated. Thanking in advance.

When I open up a bash prompt and type:  $ set -o xtrace $ x='~/someDirectory' + x='~/someDirectory' $ echo $x + echo '~/someDirectory' ~/someDirectory   I was hoping that the 5th line above would have went + echo /home/myUsername/someDirectory.  Is there a way to do this?  In my original Bash script, the variable x is actually being populated from data from an input file, via a loop like this:  while IFS= read line do     params=($line)     echo ${params[0]} done <"./someInputFile.txt"   Still, I'm getting a similar result, with the echo '~/someDirectory' instead of echo /home/myUsername/someDirectory.


Let $p$ and $q$ be distinct primes.Suppose that $H$ is a proper subset of the integers and $H $is a group under addition that contains exactly three elements of the set {$p,p+q,pq,p^q,q^p$}.Determine which of the following are the three elements in $H$.     a.  $pq,p^q,q^p$      b. $p,p+q,q^p$      c. $p,p^q,q^p$      d. $p,pq,p^q$

Let $p$ and $q$ be distinct primes. There is a proper subgroup $J$ of the additive group of integers which contains exactly three elements of the set $\{p,p+q,pq,p^q,q^p\}$. Which three elements are in $J$?  I know the solution is $\{p,pq,p^q\}$. However I do not understand why. I thought $J$ can not even be a finite group. Maybe there is serious misunderstanding of the problem. Can anyone give me a hand? Thanks.


Any one able to get proper MTP connection setup for Galaxy S2?  Ubuntu 12.04 detects my device and automatically mounts it but it's only partial.  The problems are:   When I connect my device it immediately shows the above shown error:      Unable to mount Android: Error initialising camera: -60: Could not   lock the device  In nautilus, if I select the device, It takes a very long time (At least a minute ) before it shows any device content.  Support is only partial. I can copy and delete but cannot read them. Photos can be read but if I try to play mp3 it fails. Try opening apk file it fails with following dialog:    So my question is what settings are to enables to set it up so that that I have 100% MTP connection. I don't think I need to setup a new MTP connection as has been described on various blogs to get MTP. Because I think Ubuntu already detecting it and just needs to tweak a setting or two to give Ubuntu full control of my device.  If there is no other way other than following those blogs then how do I tell Ubuntu to stop automatically mounting my device so that I can setup manually a MTP connection.

Since Ubuntu 13.04 storage access to external devices via MTP is supposed to work out of the box via a GVFS-MTP module.      While this question is about the Galaxy Nexus, other Android devices as well as Windows Phones and MTP enabled media players are also supported.      For troubleshooting see .     I am having quite a bit of problems getting file-transfers working over MTP with the Galaxy Nexus. I am using Kubuntu 11.10 64-bit, and this is what I have done and the results I get:   Added rule for device in /etc/udev/rules.d/51-android.rules. The rule is the following and works for adb:  SUBSYSTEMS=="usb", ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="6860", MODE="0666", OWNER="leob" #Galaxy Nexus  Restarted udev (and computer just to make sure).   Adb works, and all methods for reading from the device via MTP seems to work (I have tried mounting with mtpfs, gmtp and using the mtp-tools package directly). When I try to write to the device however, nothing I have tried works.  As an example, running mtp-newfolder test_dir 0 0 gives the following output:  libmtp version: 1.1.0 Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7510/Galaxy Tab 10.1. Folder creation failed. ERROR: Could not close session!   If I run mtp-folders after a failed mtp-newfolder without re-plugging the device, I get the following output:  Attempting to connect device(s) Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7510/Galaxy Tab 10.1. PTP_ERROR_IO: failed to open session, trying again after resetting USB interface LIBMTP libusb: Attempt to reset device mtp-folders: Successfully connected Friendly name: (NULL) Error 1: Get Storage information failed. Error 2: PTP Layer error 02fe: get_all_metadata_fast(): could not get proplist of all    objects. Error 2: (Look this up in ptp.h for an explanation.) Error 2: PTP Layer error 02fe: get_handles_recursively(): could not get object handles. Error 2: (Look this up in ptp.h for an explanation.) LIBMTP_Get_Storage() : Resource temporarily unavailable OK.   Accompanied by the following in dmesg:  [ 1000.912082] usb 2-4: reset high speed USB device number 7 using ehci_hcd [ 1001.045877] usb 2-4: usbfs: process 3166 (mtp-folders) did not claim interface 0 before use   Does anyone have any idea about what to do?  EDIT:  I also tried the PTP mode. Again, reading works fine, but I cannot write anything to the device.


I have a raster of 500m resolution based on MODIS sinusoidal projection, so I first converted it to WGS84. In order to create a 500m fishnet of the WGS84 raster in ArcGIS, I first converted the raster to points. Then, in the Fishnet tool, I entered 0.005 as cell height and width value to approximate a 500m grid polygon based on the approximation that 0.01° = 1.11 km. My area is in the Pacific North West in the US. Did I enter the correct(approximate) cell size value or is there a more accurate way to this?

I am planning to create a NetCDF file from a script (Github). My shapefile is in GCS_WGS_1984 (this is one of the required files for the script). Now, the script requires to define the cell/pixel height and width in degrees. Furthermore, my purpose is to create a grid pixel/cell equivalent to a 500 m by 500 m pixel/cell. I am also posting the lines (degree values don't represent 500 m) where it's asking to define these values for further reference. Moreover, the project area is located in the Pacific North West (US). ###Cell height and width in degree, Edit accordingly cell_h=0.05 cell_w=0.05  Update Based on Mr. Stimsons' comment I have updated my question so that it can make more sense: How can I approximate geographic coordinates (WGS 84) to 500 m? That way I will be able to determine the pixel height and width and replace those values in the code with appropriate values approximating a 500 m by 500 m pixel in degree.


In database design, is it a good way to use an auto-increment integer field as the primary key?  For Example, I have a tenant table, tenant_id is unique. In this case, do I need a auto_increment key?  What the benefits of the auto_increment primary key and when to use it?  Thank you.

I understand one benefit of surrogate/artificial keys in general - they do not change and that can be very convenient. This is true whether they are single or multiple field - as long as they are 'artificial'.  However, it sometimes seems to be a matter of policy to have an auto-incrementing integer field as the primary key of each table. Is this always the best idea to have such a single-field key and why (or why not)?  To be clear, this question is not about artificial vs natural - but about whether all artificial keys should be single-field


Consider the following MWE:  \documentclass{script}  \usepackage{pgfplots}  \begin{document}     \begin{tikzpicture}         \begin{axis}[             xlabel = $x$,             ylabel = $y$         ]             \addplot table {                 30000 30000                 40000 40000                 50000 50000                 60000 60000             };         \end{axis}     \end{tikzpicture} \end{document}   pgfplots will plot the given points just fine. The only problem for me is that it writes the axis multiplier (10^4 in this case) at the end of the axis.      I would like to have the multiplier to be part of the respective axis label. In particular I'd like to achieve something like this: x [10^4] (same for the y-label)    Therefore I thought whether there might be a way to suppress pgfplots from writing the multiplier itself and use some macro holding this multiplier in order to append it to my labels.    Does somebody know how to get the desired behaviour?

I'm trying to put xtick scale label (defined by pgfkey /pgfplots/xtick scale label code/.code) in x axis label, between variable name and unit.  I've tried executing using the option xlabel = {$ x $ (\pgfkeysvalueof{/pgfplots/xtick scale label code/.code} m)} to put in but this doesn't work.  I've also tried the following xtick scale label code/.code={\pgfkeyssetvalue{/pgfplots/xlabel}{#1}} to force PGFPlots to change my xlabel but it doesn't work as well.  I know I can do this by hand, but I'm interested in automatic approach. Is there a workaround or a solution to this?  My MWE is:  \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.14}  \begin{document}      \begin{tikzpicture}     \begin{axis}[         scaled x ticks=true,         scaled y ticks = false,         y tick label style={/pgf/number format/fixed},         %xtick scale label code/.code={\pgfkeyssetvalue{/pgfplots/xlabel}{#1}},         xlabel = {$ x $ (\pgfkeysvalueof{/pgfplots/xtick scale label code/.code} m)},         ylabel = {$ y $},     ]      \addplot[line width=3pt] coordinates {(0.0,0.0)(100,1)(400,2)(10000,0)};      \end{axis}     \end{tikzpicture}  \end{document}   Output from this code is:


two numbers gcd and lcm are respectively 6 and 600. What is the possible pairs of two numbers?

These two exercises I encountered recently seem to develop some type of connection between GCD and LCM I can't quite figure out. Exercise 1:  Find all the numbers $x$ and $y$ such that: $a) \ GCD(x,y)=15, \ LCM(x,y)=150$ $b) \ GCD(x,y)=120 \ LCM(x,y)=1320$ $c) \ GCD(x,y)=100 \ LCM(x,y)=990$  Exercise 2:   Find all the numbers $m,n$ such that $GCD(m,n)=pq , \ LCM(m,n)=p^2qs$  where $p,q,s$ are prime  The first thing that is known to me is that $GCD(x,y) \cdot LCM(x,y)= x \cdot y$ Also $LCM(x,y)$ is at most $x \cdot y$ while $GCD(x,y)$ is at most $\max \{x,y\}$. Last thing is that $GCD(x,y)|LCM(x,y)$. Using all this I tried to solve the first exercise: $a)$ First two obvious pairs are $x=15, y=150$ and $y=15, x=150$. Now neither of the numbers can be bigger than $150$ or smaller than $15$. So we are looking for numbers in the range $15-150$ that satisfy $x \cdot y = 15 \cdot 150$ Another such pair is $(x,y)=(30,75), \ (x,y)=(75,30)$. Similarly for $b)$ we find that the only possible values are permutations of the set {$120,1320$} and in $c)$ since $100$ does not divide $990$ no such numbers exist. Now exercise 2 is what made me think there is actually another connection I'm not quite aware of since now it's about arbitrary prime numbers and the previous method doesn't work anymore. My intuition is that it has something to do with $GCD$ or $LCM$ of the $GCD(x,y), \ LCM(x,y)$


Let $(X,d)$ be compact. Show: for a map $f$ that when $\forall x, y \in X$ with $x\neq y$   $d(f(x),f(y))<d(x,y)$ is fulfilled.  Then $f$ has a unique fixed point.

Assume $K$ is a compact metric space with metric $\rho$ and $A$ is a map from $K$ to $K$ such that $\rho (Ax,Ay) < \rho(x,y)$ for $x\neq y$. Prove A have a unique fixed point in $K$.  The uniqueness is easy. My problem is to show that there a exist fixed point. $K$ is compact, so every sequence has convergent subsequence. Construct a sequence ${x_n}$ by $x_{n+1}=Ax_{n}$,$\{x_n\}$ has a convergent subsequence $\{ x_{n_k}\}$, but how to show there is a fixed point using $\rho (Ax,Ay) < \rho(x,y)$?


How can I do by command line in terminal that an administrator should become standard (normal)?

If you give a user sudo privileges how can I remove the sudo privileges and make the user become just a regular user?  I used:  sudo adduser username sudo   Now I've changed my mind.


For testing purpose, I want to activate or not a filtering with the command head.  For example, the command below could outputs a lot of lines  #!/bin/bash produce_a_lot_of_lines   I want to set on demand a filter with head, depending on a variable. A way The sample below works:  #!/bin/bash function filter() {   [[ "$HEAD" =~ [0-9]+ ]] && head -n $HEAD || cat } produce_a_lot_of_lines | filter   Is there a cleaner/more efficient/better way to achieve this?

Say I've got the following pipeline:  cmd1 < input.txt |\ cmd2 |\ cmd4 |\ cmd5 |\ cmd6 |\ (...) |\ cmdN > result.txt   Under certain conditions I would like to add a cmd3 between cmd2 and cmd4. Is there a way to create a kind of conditional pipeline without saving the result of cmd2 into a temporary file? I would think of something like:  cmd1 < input.txt |\ cmd2 |\ (${DEFINED}? cmd3 : cat ) |\ cmd4 |\ cmd5 |\ cmd6 |\ (...) |\ cmdN > result.txt


long int triagedOut = 0;  printf("%i", triagedOut);   main.c|89|warning: format '%i' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=]|  I actually get that message twice for the same line.  ??? OK, so I will change it to the long int specifier "l" and, then... printf("%l", triagedOut);   main.c|89|warning: conversion lacks type at end of format [-Wformat=]| main.c|89|warning: too many arguments for format [-Wformat-extra-args]|  And I get these two messages twice, too. I don't even know how there could be too many of anything.  Just 1 of everything.  What's it trying to tell me?

The printf function takes an argument type, such as %d or %i for a signed int. However, I don't see anything for a long value.