What is the best way to clean the sensor on a interchangeable lens camera (mirrorless or digital SLR)?

I've got a couple of spots of dust on the sensor of my Canon 20D. A rocket blower isn't shifting them, and I'm ridiculously scared of some of the more direct methods for cleaning sensors — what methods/systems have you tried, and how successful have they been?


When editing you can enter a one-line comment "Edit Summary".  It would be nice if a comment could be left when rolling back.  Can this be added at some time?


I am using biber for my citations for the first time, and although I followed all turtorials the command \printbibliography simply doesn't do anything. Who knows how to fix the problem? Please find the preamble below.  \documentclass[a4paper,12pt]{report} \usepackage{doi} \usepackage[dutch]{babel} % english or dutch \usepackage{csquotes} \usepackage[style=apa, backend=biber]{biblatex} \DeclareLanguageMapping{dutch}{dutch-apa} % map dutch to dutch-apa %\DeclareLanguageMapping{english}{english-apa} % map english to english-apa \addbibresource{ThesisBib.bib} \usepackage{listings} \lstset{language=Tex} \usepackage{graphicx} \usepackage{hyperref} \DeclareLanguageMapping{dutch}{dutch-apa} \DefineBibliographyStrings{dutch}{   andothers = {et\addabbrvspace al\adddot}} \DefineBibliographyStrings{dutch}{   nodate = {z\adddot j. \adddot} } \addbibresource{ThesisBib.bib} \usepackage{listings} \usepackage{lmodern} \lstset{language=Tex}  \usepackage{graphicx}  \usepackage{geometry} \usepackage{pdflscape} \usepackage{amsmath} \usepackage{fancyref} \usepackage{palatino} \usepackage{amssymb} \usepackage{float} \usepackage{lipsum}             %VERWIJDEREN VOOR UITVOER %\usepackage{apacite} \usepackage{multicol} \usepackage{xspace} \usepackage{booktabs} \usepackage[table,xcdraw]{xcolor} \usepackage{epstopdf} \usepackage[dutch]{babel} \selectlanguage{dutch} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{a4wide} \usepackage{url} \usepackage[small,bf,hang]{caption} \usepackage[toc,page]{appendix} \usepackage[T1]{fontenc} \usepackage{textcomp} \usepackage[nottoc]{tocbibind} \usepackage{microtype} \usepackage{lastpage} %\usepackage{natbib} \usepackage{fancyhdr} \bibpunct{(}{)}{;}{a}{,}{,} \AtBeginDocument{\renewcommand{\harvardand}{en}}  %Slight twist to accomodating for Dutch  \usepackage{mathpazo} \usepackage{eurosym} \usepackage{longtable} \usepackage{booktabs} \usepackage{hyperref} \setlength{\parindent}{4em} \setlength{\parskip}{1em}  %Latex logo \usepackage{doc}  \usepackage{titlesec}     \titleformat{\chapter}[display]        {\normalfont\LARGE\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}        \titlespacing*{\chapter}{0pt}{-50pt}{30pt}  \geometry{dvips,a4paper,margin=1.5in} \DeclareGraphicsRule{.tif}{.png}{.pdf}{`convert #1 `dirname #1`/`basename #1 .tif`.png} \newcommand{\qi}{(\textit{i})\xspace} \newcommand{\qii}{(\textit{ii})\xspace} \newcommand{\qiii}{(\textit{iii})\xspace} \newcommand{\qiv}{(\textit{iv})\xspace} \newcommand{\vbl}[1]{(\textit{#1})\xspace} \newcommand{\vblp}[1]{(\textit{#1})\xspace} \newcommand{\vblt}[1]{\textit{#1}\xspace} \newcommand{\var}[1]{\mbox{var}(#1)\xspace} \newcommand{\Var}[1]{\mbox{Var}(#1)\xspace} \newcommand{\cov}[1]{\mbox{cov}(#1)\xspace} \newcommand{\Cov}[1]{\mbox{Cov}(#1)\xspace} \newcommand{\coo}{CO\textsubscript{2}} \renewcommand\appendixtocname{Bijlagen} \renewcommand\appendixpagename{Bijlagen} \titleformat{\chapter}{\normalfont\bfseries}{\huge\thechapter}{1em}{\Huge} \pagestyle{fancy}     \fancyhf{}     \rhead{\nouppercase{\leftmark}}     \lhead{\textit{Bachelorscriptie Emotional Labor}}     \cfoot{Pagina \thepage~van \pageref{LastPage}} \frenchspacing \setlength{\parskip}{1.5mm}


how to change winetricks default wineprefix directory

I want to modify wineprefix installed with playonlinux using Winetricks.


Atheros AR9485 wifi disconnects randomly

I recently bought a new computer that has an Atheros AR9485 wireless NIC. So far it has been working ok except this one issue: Randomly (as far as I can tell) it will completely lose the internet connection. The indicator in the top panel will still say we are connected but the machine has no internet connectivity whatsoever.    I've been able to get it working again by simply disconnecting from my wireless AP and then reconnecting, but this is annoying. Is there anything I can do to make the connection more stable?    I have tried passing the nohwcrypt=1 to the driver, but that made it impossible to connect to any AP, it just infinity attempted to connect.  sudo modprobe -rfv ath9k sudo modprobe -v ath9k nohwcrypt=1   I've also tried upgrading my kernel to Linux 4.0 but the problem persists.    Exact chip:  02:00.0 Network controller [0280]: Qualcomm Atheros AR9485 Wireless Network Adapter [168c:0032] (rev 01)     Driver:    $ ls /sys/class/net/wlan0/device/driver/module/drivers pci:ath9k  platform:ath9k     and lsmod:  user@host:~$ lsmod | grep -e ath -e ndis ath3k                  20480  0  bluetooth             491520  9 bnep,ath3k,btusb ath9k                 147456  0  ath9k_common           32768  1 ath9k ath9k_hw              458752  2 ath9k_common,ath9k ath                    32768  3 ath9k_common,ath9k,ath9k_hw mac80211              724992  1 ath9k cfg80211              540672  4 ath,ath9k_common,ath9k,mac80211    output from wireless script:    I'm running Ubuntu 15.04 on Linux 4.0.0-040000-generic on a Lenovo G510.   I'm wondering now if I could possibly have anything to do with my wireless mouse, which also operates on 2.4GHz..


I have to insert a VLAN tag to an untagged incoming packet. In various Linux based network switches we have a provision to set the PVID of a port if the incoming packet is untagged. I am looking for something similar to that. Anyone know how ?


Integral version of Ampere's law: why current outside the surface does not contribute to $\oint B\cdot d\ell$?

I have a question about why this is true  $\oint B\cdot d\ell = \mu_0$ $I_{enclosed}$  My problem is that I am not really seeing visually or mathematically why the magnetic field generated by a current that doesn’t pass through the loop will not contribute to the integral.  Any advice or intuition is aprecciated thanks.


Simple calculus question: is applying l'Hopital's rule to $\sin(x) / x$ really circular reasoning?

So I know this is a dumb question maybe, but it has been in my head recently. I once told someone, on the topic of introductory calculus, that using l'Hopital's rule to calculate $$\lim\limits_{x\rightarrow 0} \frac{\sin(x)}{x}$$ is circular reasoning, because the limit we are looking for is the definition of the derivative of $\sin(x)$ at $x=0$. They argued that it is not because you can work out the derivative of cosine via its series representation without ever recurring to the definition.  Now, there are two ways that I know of to obtain the series representation of cosine: the obvious one is Taylor expansion, which obviously requires knowledge of all the derivatives, the other one is to prove the following statement:     If there exists two functions $f$ and $g$ such that $f'=g$ and   $g'=-f$, then they are unique.   Then you have to kind of get out of the hat the series representations and show that they respect the conditions listed above, which only involves deriving polynomials. Nonetheless, it seems to me that you still have to know the derivatives of sin and cos to then identify the two trigonometric functions with the series representations using their uniqueness.   My question is: is there really a way to obtain the series representation for sin and cos without knowing the derivatives, thus getting rid of the circularity of the reasoning?  This question is by no means practical and it's just a curiosity of mine, I'm not interested in other ways to calculate the limit, which is trivial.  EDIT:  I don't think this is a duplicate, as I said in my comment if you read the question that is linked, you will notice that what the OP means by "circular reasoning" is something on proving the limit using formulas about the area of circles, which has nothing to do with my question about series representations.


After watching the Harry Potter movies I became confused as to how wands and Magic work.  Some spells require wands, while others do not some spell seem to be spoken and others are unspoken which is very confusing. I was wondering if anyone could explain this to me


Prove that \begin{eqnarray} \lim\limits_{p\rightarrow +\infty }||f||_{L^p}=||f||_{L^\infty}. \end{eqnarray}

I am trying to prove this. We are told that $(X,\mathcal{X},\mu)$ is a measure space, and $\mu(X)=1$. We are also told that $f$ is a bounded, measurable function on $X$.   So how can I prove that \begin{eqnarray} \lim\limits_{p\rightarrow +\infty }||f||_{L^p}=||f||_{L^\infty}. \end{eqnarray} Any help please?


Would it be correct English to omit the "t" when pronouncing words that end with "cts" like "acts of parliament"?

Some native speakers seem to omit the "t" in words that end with "cts" and others don't. Is one way more correct than the other or is there any connotation to be observed? I can see no way to look this up in a dictionary.  To my mind other existing threads don't cover this question completely.


I'm very new to the TikZ environment. I'm trying to replace the "4" in the following graph by a Greek letter (ideally a \tau^{*}). Any idea ? Thanks in advance  \begin{document} \begin{tikzpicture}[     declare function={             gamma(\x)= 0.25*\x*\x*exp(-0.5*\x);     } ]  \begin{axis}[   no markers, domain=1:13, samples=200,   axis lines*=left, xlabel=$\tau$, ylabel=$V(\tau)$,   every axis y label/.style={at=(current axis.above origin),anchor=south},   every axis x label/.style={at=(current axis.right of origin),anchor=west},   xtick={4}, ytick=\empty,   enlargelimits=false, clip=false, axis on top,   grid = major,       xmin=0, ymin=0, ] \addplot [very thick,cyan] {gamma(x)};  \end{axis} \end{tikzpicture}  \end{document}


Present Perfect vs. Present Perfect Continuous

how are you?  Well, my biggest doubt at the moment is the difference between these two tenses. Actually, the more I study the more I have doubts with these tenses.      /         These similar threads helped me to clarify and reiterate my previous understanding.   I'm not posting in these threads because the site suggests avoiding asking for clarification (I don't know why because it would avoid new threads with the same content).  My main doubt is as follows:     I've lived in New York for two years.   In my understanding, the sentence above implies (1) that I lived in NY for two years and now I live in another place; or (2) I'm moving to another city after two years living in NY; or (3) I lived in NY for two years, then I moved to another place for some period and, finally, I'm returning. Is that correct?     I've been living in New York for two years.   Whereas the sentence above, in my understanding, implies that I lived in NY for two years and I still living there.  Anyway, many sources that I've already read say that these two sentences have the same meaning and are interchangeable. Therein lies my question. Is that correct? Because if these two sentences are interchangeable, it destroys all my understanding.  Thanks in advance.


Are Blanks, Spaces, and tabs part of a string?

Is there a difference between a space and a blank?   Are tabs, spaces, blanks considered characters?


What is the time derivative $\frac{d}{dt}(\exp(\hat A))$ of operator exponential $\exp(\hat{A})$?

Assuming that the operator $\hat{A}$ does not necessarily commute with $d \hat A/dt$, what is $$\frac{d}{dt}(\exp(\hat A))~?\tag{1}$$ Is it $\exp(\hat A(t)) \frac{d \hat A}{dt}$ or $\frac {d\hat A}{dt} \exp(\hat A(t))$ and why?  EDIT: Actually here is my original question: I was asked to show that  $$\frac{d(\exp{A})}{dt} \exp{(-A)} = \sum_{n=0}^{\infty} \frac{1}{(n+1)!} L^n_A(\frac{dA}{dt}),\tag{2}$$ with $$L_A(X) = [A,X], \qquad L^2_A(X) = [A,[A,X]],\qquad \ldots \tag{3}$$  I thought the Baker–Campbell–Hausdorff formula said  $$\exp{(A)} B \exp{(-A)} = \sum_{n=0}^{\infty} \frac{1}{n!} L^n_A(B),\tag{4}$$  and so comparing the two equations above, I would get  $$\frac{d\exp(A)}{dt} = \exp{(A)} \frac{dA}{dt}\tag{5}$$ (by plugging in $B = \frac{dA}{dt}$). Now that it seems that this is not true, does it mean that the identity I was asked to prove is also not true?


I'm studying Differential Manifolds using Manfredo do Carmo's Book (Riemannian Geometry) and although I see no mention of this in Do Carmo's book, it's really easy to see a Riemannian Manifold as a metric space (if $M$ is the manifold, using $d_M(x,y) = \inf\{L(\gamma) \colon \gamma$ is a curve on $M$ and $a,b \in \gamma([0,1])\}$, where $L(\gamma)$ is the length of the curve $\gamma$.  Is the topology induced in $M$ (viewed as a set) by the metric $d_M$ the same of $M$ as topological space?   My problem to solve this self-proposed question was analyzing the open balls of $(M,d_M)$. References and Hints are appreciated.


I used the amsthm-package to define definitions, theorems and lemmas. Besides, I defined examples as follows:  \newtheoremstyle{examplestyle} {2pt} {2pt} {} {} {\bfseries} {:} {3pt} {} \theoremstyle{examplestyle} \newtheorem{example}{Example}[chapter]   Now I would like to make a list of examples (similar to \listoffigures). I tried to use the ntheorem-package, but that is not compatible with amsthm. Does anyone know if it is possible to create a list of examples without having to change the things I defined so far and how to do so?  Thanks!


I have  a short question about Datatypes. Why do i get this kind of number if i put a leading 0 for a number that i declared to be a long-type? I just dont get what the zero is making to the number.  For example:  1010L -> 1010   0101L -> 65


I had asked this question before and got a partial answer.  Let $A$ be a Dedekind domain with quotient field $K$, $L$ a finite separable extension of $K$ of degree $n$, and $B$ the integral closure of $A$ in $L$.  The ideal norm $N_{L/K}$ is usually defined multiplicatively by the formula $N_{L/K}(\mathfrak P) = P^f$, where $P = \mathfrak P \cap A$ and $f = f(\mathfrak P / P)$.    Another way to define it is as follows: for fractional ideals $M$ and $N$ of $B$, the localizations $M_P$ and $N_P$ are free $A_P$-modules, so there is a $K$-module automorphism $\psi$ of $L$ for which $\psi(M_P) = N_P$.  One then defines the module index $[M_P : N_P]_{A_P}$ to be $Det(\psi)A$.  More generally one defines the module index $[M : N]_A$ to be $$ \prod\limits_P P^{\nu_P [M_P : N_P]_{A_P}}$$ If $M$ is a fractional ideal of $B$, one can define the norm $N_{L/K}(M)$ to be $[B : M]_A$.  (see Cassels and Frohlich, first section of Algebraic Number Theory)  I have seen a proof using Smith Canonical Form that these definitions agree when $M$ is a prime ideal, but I have yet to see a simple general proof that the norm (defined in the latter way) is multiplicative.  The "long" way of doing this is to look at the completions of $K$ with respect to the $\nu_P$, and then look at the ways in which $\nu_P$ may be extended to $L$ (which correspond to the prime ideals lying over $P$).  The special case $A = \mathbb{Z}$ is more clear, because the module index $[B : M]_{\mathbb{Z}}$ is just the ideal generated by the cardinality of $B/M$.


No Sound (Dummy Output) error Ubuntu 19.10

I am using Ubuntu 19.10 for few months. Suddenly voice output is not working. In-spite of trying reinstalling sound drives and tried all options despite that  it is not working. Any inputs to it?


What is meant by globally hyperbolic spacetime?

Can somebody explain what is meant by ?  What other kinds can there be?


Is there a possibility to 'render' latex code with your browser?  I have some *.tex files which I would like to render a HTML version of (with HTML-navigation, hyperlinks, etc). However - running some tex2html converter everytime is quite annoying, especially since I use a lot of special packages that are not supported by most converters I tried so far, so I would need to post-process the files everytime I change something in my source document, which happens very often.  What I would really like to have is a javascript library that parses a TeX file and renders an HTML webpage from it using DOM. It doesn't need to be complete in the sense that all CTAN packages are supported, but it should be extendable in the sense that I can plug in my own javascript code to render some self-defined environments and commands.  So what I'm looking for is a javascript to HTML interpreter. Is there such a thing, or would I need to write something up myself?  PS: I know about MathJax, which does an excellent job at rendering math, but I would like to render whole documents, including preamble and custom command definitions.


How can I get a line break in a theorem headline?

I have a theorem title, which is longer then the page width. How do I get the title in two lines?  \begin{theorem}[this title is to long for one line] the theorem \end{theorem}


What is the reasoning behind the fringe logo design? Why two F's back to back? I'm watching the series on Netflix and wanted to know can across this page through Google search.


When do I have to use 'will' instead of 'going to'?

Does going to only express an intention and will some kind of prediction that doesn't necessarily happen?  EDIT: Thanks for all your answers. I asked this question because I always fail to complete exercises like this from an ESL book:   We  will fly to Venice in June. (Correct: But, how can I be sure that I'm not sick in June?) Philipp will be 15 next Wednesday (Correct: Since his birthday is a fixed day, this will happen). They will get a new computer. (Wrong: Why?, If I need a new computer, I simply get a new one) In 2020 people are going to buy more hybrid cars.  (Wrong, Why? Who can tell for sure).


Wake timers don't wake computer from sleep mode

I'm got a custom built PC running 64 bit Windows 7 Ultimate. So far everything works great except for one thing: it will not wake up from sleep mode for a wake timer or scheduled task.  Sleep mode itself works great. If it's sleeping, it wakes successfully when I press the power button, mash the keyboard, wiggle the mouse, or send a WOL packet. The only problem is wake timers. I even tried the program  but it looks like that uses wake timers, so it doesn't do anything for me either.  And yes, wake timers are enabled:    Any ideas on how to fix the problem, or troubleshoot it? I'd imagine that there would be a log somewhere telling me exactly why the wake timers are having trouble, but if there is I haven't found it.


Just like the title says, I am getting a null pointer exception whenever I try to call the iterator from my driver. The error points to this specific location in my class:    public Iterator<E> iterator() {     return new IteratorHelper(); }      class IteratorHelper implements Iterator<E> {     private int iteratorIndex;     private long modCheck;     Node<E> current;      public IteratorHelper() {          iteratorIndex = 0;         modCheck = sequenceNumber;         current = head;     }      public boolean hasNext() {         if (modCheck != sequenceNumber)             throw new ConcurrentModificationException();         return iteratorIndex < currentSize;     }      public E next() {         if (!hasNext() && current != null)             throw new NoSuchElementException();         iteratorIndex++;         current = current.next;         return current.data; //NPE <<<<<<<<<<     }      public void remove() {         throw new UnsupportedOperationException();     } }   }  Why am I getting a NPE?


This series is mostly fantasy fiction, till the end bit. I think I read this story in the mid to late 90's possibly early 2000's     The stones or gems or, the thing they use to gain the powers in the first place are alien in nature and sentient.   There is a man who uses a staff as a focus. He has power of both Water and Air, and using both he can control the weather. There was another, at one time, who controlled both Earth and Fire, but this combination drove him crazy and the weather user had to stop the fire user.  However, the fire user had a son, a weakling with a frail body who (I think) was being forced to take up his fathers powers, to gain the strength and knowledge to be able to control the Earth power, however if I recall correctly, he did not want the boy learning Fire, as he would lose control just like his father did.  As his focus, he eventually took up a sword, which was uncommon for an elemental user, but was told that as long as he holds it, and stores his power within it, it can realistically be whatever he wants it to be.  I dont really remember the meat of the trilogy, just the beginning, bits of the middle, and the end.     In the end, he decided to take on the power of fire, but this indeed proved too much for him to handle and the power was going to go lose. The weather user said that if he lost control, he would break the sword which housed his power, and the boy would die. While struggling to regain control, he ended up falling on more of the gem things, I think taking 12-24 or something into his body instead of the typical 2-4 people use. This was WAY WAY to much and easily overpowered him, and the weather user broke the sword, but all of those gems were sentient, and repaired the damage. To avoid losing control, the boy threatened to kill himself, which would kill all the beings as well. They tried to call his bluff, but the boy was not bluffing. Faced with either dying or becoming subservient, they chose the later, and the boy became the most powerful elemental user of all time (though he still only had the knowledge of Earth and Fire, I always assumed he could do more now)   The book ended with him coming back, unscathed, and meeting with the weather man again, before heading out.  I think the boy had a girlfriend too? Unsure.


Given an infinite number of monkeys and an infinite amount of time, would one of them write Hamlet?

Of course, we've all heard the colloquialism "If a bunch of monkeys pound on a typewriter, eventually one of them will write Hamlet."  I have a (not very mathematically intelligent) friend who presented it as if it were a mathematical fact, which got me thinking... Is this really true?  Of course, I've learned that dealing with infinity can be tricky, but my intuition says that time is countably infinite while the number of works the monkeys could produce is uncountably infinite.  Therefore, it isn't necessarily given that the monkeys would write Hamlet.  Could someone who's better at this kind of math than me tell me if this is correct?  Or is there more to it than I'm thinking?


Digital signature forging on a server, after entity authentication

Lets assume there is a guy called Ben, he contacts some server for a ticket number and the server returns a random number to him. Ben then signs that number and sends it back to the server, which checks if its valid or not and accepts Ben's connection if it is. Assuming Ben then signs and sends emails on this server using his private key.  Pretend he uses the same private key to log in to a server and sign his emails. How could Ben's emails be forged. Assuming that the authentication mechanism signs the bare challenge without hashing, while for emails Ben signs the hash of the message body.  Only idea that come to mind at this point is it could be more or less an attack such as a Kerberos attack, where a malicious entity pretends to be the server and gives false positives to Ben. It could also be a chosen message attack or possibly having used the onetime of ElGamal signature again. What other things could it be and if one were to run into such a thing, what could be done to prevent it happening?


I recently linked my Microsoft Office account to my school to have access to Office for students. Right after linking my account, I couldn't login to my computer again with my 4-digit pin code and got the message: "your organization has set the following pin code requirements. Your pincode has to be at least 6 digits long."   I had to change my pincode but I want to change it back to my original 4-digit one. Some internet research has made me enable gpedit.msc, but when I try to find the PIN complexity setting in gpedit (Computer Configuration\Administrative Templates\System\PIN Complexity) it just isnt't there.   Another possible path in gpedit I found on the internet to do this was: Computer Configuration > Administrative Templates > Windows Components > Windows Hello for Business > PIN Complexity, but that also didn't work as I don't have "Windows Hello for Business"   I also tried resetting my computer to the date before I joined my 'organization', but that didn't work either.   Does anyone have an idea how I can resolve this issue?


Is there any general rule for what the derivative of $f(x)^{g(x)}$ (where $f(x),g(x)$ are differentiable functions) is in terms of $f(x),g(x),f'(x),g'(x)$.  In other words is there something analogous to product,chain and quotient rules for such expressions?


Preserve presence of last newline when assigning to variable

In bash, when an output is captured into variable using $(...), an annoying newline is appended. However, I have an output that sometimes ends in a newline, and sometimes not. I want the output to be captured as-is.  In my real problem, the strings may contain several lines, but the last may or may not close with a newline, and this property should be preserved.  In the style of , my minimal working example looks like this:  #!/bin/bash  newlinetest() {     if [ "$1" = 'with' ]; then         printf '%s\n' 'Text with newline'     else         printf '%s' 'Text without newline'     fi }  s="$(newlinetest with ; printf '%s' 'x')" s="${s%?}" printf '%s%s%s\n' '(' "${s}" ')' s="$(newlinetest without ; printf '%s' 'x')" s="${s%?}" printf '%s%s%s\n' '(' "${s}" ')'   It does what it should do, but IMHO this looks like an ugly hack. Is there any other elegant way to solve this? Maybe something that involves mapfile or read? A solution without external tools would be very welcome.


I have a calculus II final coming up and this question came up in a past final exam:  $$\int_{6}^{16} \frac{dx}{\sqrt{x^3 + 7x^2 + 8x - 16}} = \frac{\pi}{k},$$  where $k$ is a constant. Find $k$.  My progress so far:  $$\int_{6}^{16} \frac{dx}{\sqrt{(x - 1)}(x + 4)} = \frac{\pi}{k}$$  The answer is: $k = 6\sqrt{5}$  I do not know where to from from this step. Any helps or hints will be greatly appreciated! Thank you.  EDIT: $(x + 4)$ not $(x + 2)$ in the denominator.


Number of ways to select k people from a round table of n people so that no two selected people sit next to each other.    I tried the followings.  k = 1, Number of ways = n  k = 2, Number of ways = n * (n-3)  k = 3, for the first person, we have n choices        for the second person: Case 1: we can select the person sitting next next to the first person, so we have 2 choices for the second person, and the third person we have n-5 choices. Case 2: we select the remaining people other than those in case 1, so we have n-5 choices for the second person, and the third person we have n-6 choices. Then, the number of ways = Case 1 + Case 2 = n*2*(n-5) + n*(n-5)*(n-6)  For k >= 4, it seems that there are many cases for each step, so is there any better way to generalize the formula to select k people?


I have a Postgres database which contains details on clusters of servers, such as server status ('active', 'standby' etc). Active servers at any time may need to fail over to a standby, and I don't care which standby is used in particular.   I want a database query to change the status of a standby - JUST ONE - and return the server IP that is to be used. The pick can be arbitrary: since the status of the server changes with the query, it doesn't matter which standby is selected.  Is it possible to limit my query to just one update?  Here is what I have so far:  UPDATE server_info SET status = 'active'  WHERE status = 'standby' [[LIMIT 1???]]  RETURNING server_ip;   Postgres doesn't like this. What could I do differently?


Field calculator: Adding coordinate fields to attribute table with DECIMAL DEGREE values instead of UTM

I have a shapefile layer with several points, each with its own ID. The attribute table just shows the IDs of these points. Now I want to add two new fields with the coordinates (lon/lat). I'm using QGIS 3. Principally, this works fine by using the $x / $y expression. The problem for me now is: These expressions return the coordinates as UTM, e.g. 351660.879 / 5056379.192. But I'd like to have the decimal degree equivalent! In case of the example 13.1280 / 45.6465 Is there any option that leads the field calculator to return decimal degrees?


What prevents a f/1.8, 24 mm - 70 mm or similar range zoom lens from being made?

I see that it is common to have professional grade lenses such as 24-70mm lenses made at f/2.8. After using a 50mm/1.8, I was wondering what would prevent a more versatile zoom lens to be made that operates at f/1.8 or even lower. I assume the prime lens can be made at f/1.2 even, because the optics are simpler at a fixed focal length. So, I'm wondering what prevents lens makers from making such a zoom lens at f/1.8 or lower. Is there a technical reason that degrades image quality (I understand the 50 is not at its sharpest at 1.8) or is it most likely a commercial decision?  EDIT: My question is different than . I'm specifically asking as to why it appears in primes while it doesn't appear in zoom lenses, which the other answers do not address.


Grid polygon generation by converting meter to degree using Python

When given a shapefile as below as an Input, I would like to generate a 100x100 meter polygon grid using python.   I went through   and   but still am not able to achieve the end result.   Based on  my code is as below (similar to the post), grids are not created within polygon extent but is created somewhere outside.   Which part have I made a mistake?  import geopandas as gpd from shapely.geometry import Polygon import numpy as np poly = gpd.read_file('point.shp') xmin,ymin,xmax,ymax = poly.total_bounds print(xmin,ymin,xmax,ymax) #-118.77194444444446 38.61038888888889 -118.66961111111112 38.78205555555555 length = 100 wide = 100 cols = list(range(int(np.floor(xmin)), int(np.ceil(xmax)), wide)) rows = list(range(int(np.floor(ymin)), int(np.ceil(ymax)), length)) rows.reverse() polygons = [] for x in cols:     for y in rows:         polygons.append( Polygon([(x,y), (x+wide, y), (x+wide, y-length), (x, y-length)]) )  grid = gpd.GeoDataFrame({'geometry':polygons}) grid.to_file('grid.shp')


What's the meaning of the PHP token name T_PAAMAYIM_NEKUDOTAYIM?

What's the story behind the ::'s sometimes token name  T_PAAMAYIM_NEKUDOTAYIM   I'm mainly interested in knowing if   This is an abbreviation for something else. This is a phrase in a language other than English, and if so what's the language and what's a rough translation. This is some obscure-to-me programming term. Drunk developers.


Are static fields open for garbage collection?

Given an hypothetical utility class that is used only in program setup:  class MyUtils {    private static MyObject myObject = new MyObject();    /*package*/static boolean doStuff(Params... params) {        // do stuff with myObject and params...    } }   will myObject be garbage collected when it is no longer being used, or will it stick around for the life of the program?


How i can to add a significant 0 to int?

Help me, how to add a significant 0 to number variable (int, float, ecc)?  int s = 0; -> 00 int m = 0; -> 00 int h = 0; -> 00


Jquery Dynamic Button to call HTML Form Action

I have the following HTML code which allows me to remove a product when the button Remove is clicked.

         <form method="POST" class='form-product-ajax' action='{% url "shopping-cart-remove" %}' data-endpoint='{% url "shopping-cart-remove" %}'>             {% csrf_token %} {% for item in cart.items %}
                 {{ item.quantity}} x {{ item.product.name }} {{ item.subtotal }}                     <input type="hidden" name='id' value='{{ item.product.id }}'>                     <button class='remove-btn'>remove</button>                 	                 {% endfor %}
         </form>

         {{ cart.total }}

   I want to get this working using Jquery/Ajax and currently stuck on the following point. I can dynamically create a Remove button and I assign a class of 'remove-btn' to it but I still can't remove a product. How do I code the Jquery so that clicking on the dynamically generated button executes the action specified on the HTML form action?                   $.each(data.products, function(index, value) {                      console.log(value)                      console.log(data.count)                      var removeSpan = thisForm.find(".remove-btn")                      cartBody.append("
" + value.quantity + " x" + "	"+ value.name + "	" + "£" + value.price + "	" + "<button type='submit' class='remove-btn'>Remove</button>
")


Create a custom CRS based on a known PSM

We have some CAD data that's based off a  (PSM) (details below). How do I create a CRS so that the data can be brought into GDA94 (4283)?  PSM: 110326 GDA94 Lat: 12D 39M 50.5201"S Lon: 141D 50M 49.8383"E E: 591994.116 N: 8599867.976 Zone: 54 Order: 1st Class: A Adjustment: GSA - WEIPA Control  This seems to be the reverse process of  or am I mistaken?  Basically, the question is how to bring a dataset that is fixed to a position that has GPS coordinates (is real world) into real world coordinates as a whole.


This might be the tiniest bug ever but there seems to be an extra space between follow or close and flag on questions.  This shot is from this site.        This one is from a site where I have close too.        You can see, there are three spaces, not two between the last two options.  A bit of looking around seems to show that this occurs when the delete button is not present and questions with the delete option show fine.


How to use a flyback diode on a +/-12V motor

I've got a motor hooked up to +12V on one side and -12V on the other, being driven in both directions by a Motor controller (). We were getting voltage spikes in the common ground after sending big impulses to the motor, so we put a flyback diode from the negative cable to the positive cable. However, this caused the motor to be less responsive in the reverse direction. How do we correctly prevent voltage spikes in the ground from this type of motor?


Is there more to an interface than having the correct methods

So lets say I have this interface:  public interface IBox {    public void setSize(int size);    public int getSize();    public int getArea();   //...and so on }   And I have a class that implements it:  public class Rectangle implements IBox {    private int size;    //Methods here }   If I wanted to use the interface IBox, i can't actually create an instance of it, in the way:  public static void main(String args[]) {     Ibox myBox=new Ibox(); }   right? So I'd actually have to do this:  public static void main(String args[]) {     Rectangle myBox=new Rectangle(); }   If that's true, then the only purpose of interfaces is to make sure that the class which implements an interface has got the correct methods in it as described by an interface? Or is there any other use of interfaces?


How to find the sum of $\sum_{n=0}^{\infty} \frac{z^{3 n}}{(3 n) !}$?

I'm really stuck with this problem and I hope some of you could give me a hint. Consider the functions: $$f(z)=\sum_{n=0}^{\infty} \frac{z^{3 n}}{(3 n) !}, \quad f^{\prime}(z)=\sum_{n=0}^{\infty} \frac{z^{3 n+2}}{(3 n+2) !}, \quad f^{\prime \prime}(z)=\sum_{n=0}^{\infty} \frac{z^{3 n+1}}{(3 n+1) !}, \quad f^{\prime \prime \prime}(z)=f(z)$$ I need to find the sum of each of these series. My first thought was to show that: $$f(z)+f^{\prime}(z)+f^{\prime \prime}(z)=\sum_{n=0}^{\infty} \frac{z^{3 n}}{(3 n) !}+\sum_{n=0}^{\infty} \frac{z^{3 n+2}}{(3 n+2) !}+\sum_{n=0}^{\infty} \frac{z^{3 n+1}}{(3 n+1) !}=\sum_{n=0}^{\infty} \frac{z^{n}}{n !}=e^{z}$$ And then solve this differential equation. However, officially I haven't had a course in differential equations. So is there another way I can solve this using basic Complex Analysis? I hope some of you can guide me in the right direction, what theorems could be useful?


E = electric field V = electrostatic potential r = distance ' = derivative   E = - (V)'   therefore if E increases V decreases Also if r increases E decreases                                                      because  E=kq/r^2 From 1 & 2, if r increases then V increases But V=kq/r, so if r increases V decreases   Why does the 3rd point contradict with the 4th ?


How to deal with SQL column names that look like SQL keywords?

One of my columns is called from. I can't change the name because I didn't make it. Am I allowed to do something like SELECT from FROM TableName or is there a special syntax to avoid the SQL Server being confused?


I am in the situation where I want delimiters that are bigger that \big, but smaller than \Big (see example).  \documentclass{article}  \usepackage{mathtools} \usepackage[libertine]{newtxmath} \begin{document} \[\Bigl(\bigl(\text{some formula}\bigr)\Bigr)\] \end{document}   With newtxmath, the outside delimiters are a lot bigger than the  \bigdelimters inside, but I want them only slightly bigger. scalebox from the graphicxpackage doesn't seem to be satisfactory.


Anyone want to comment on sudo bash in comparison to sudo su and sudo -i?  I know sudo -i is the preferred because "environment".  I've gotten into the bad habit from years ago when I was a kid in a basement of using sudo bash.  I know it's rather kludgy and awkward, but it works.  I'm looking for a precise and compelling argument to cut my brain free from this habit.  Please tell me why my method is trash? I need an intervention.


How could the universe be infinite (what is meant by that)?

I'd like to know what is thought of when saying the universe is infinite.  I've read about what is meant when astronomers are speaking of a "flat" universe and I have read that its size is most likely infinite. Yet Google couldn't forward me to a site where it's actually explained what that should mean.    These are some sites I looked but which did not explain it:   , another Phys.SE question   , on esa.int , on www.space.com


I went to Ubuntu and went to the download page, chose 32 bit, for an older machine, made a CD.  When everything was said and done, I have Linux Mint 16 on the machine....how did that happen?  I'm new to Linux, but I can't find anywhere that it says this is what I was downloading.  Is it because I chose 32 bit?  Is it a screw up in the mirror?  Any help is appreciated.


I understand the properties of logarithms. However I am curious if a calculator uses  complex power series, slide rule program, Taylor series, or a form of an algorithm to solve for log"base"n(x).


The network manager nm-applet has disappeared from the panel of my Ubuntu 14.04 and I don´t have connection to internet

When I try to run it from the command line, I receive an error:  ** (nm-applet:2403): WARNING **: Could not initialize NMClient /org/freedesktop/NetworkManager: The name org.freedesktop.NetworkManager was not provided by any .service files  (nm-applet:2403): nm-applet-WARNING **: Error connecting to ModemManager: Error calling StartServiceByName for org.freedesktop.ModemManager1: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ExecFailed: Cannot launch daemon, file not found or permissions invalid  (nm-applet:2403): nm-applet-WARNING **: Could not find ShellVersion property on org.gnome.Shell after 5 tries  (nm-applet:2403): nm-applet-WARNING **: Failed to register as an agent: (2) The name org.freedesktop.NetworkManager was not provided by any .service files


A bijective function between a square and its side

Is there a simple geometric proof that there exists a continuous bijective function between a square and its side?    And is there some explicit continuous function or formula $f^1(z)\mapsto (x,y)$ and $f(x,y)\mapsto z$, with $(x,y) \in [0,1]\times[0,1]$ and $z \in [0,1]$?  And is there a constructive proof that two sets of the same cardinality have a bijective function?


What is the attack bonus with a Javelin of Lightning?

I have a lv3 Dragonborn Fighter, and I am still completing the sheet. I need to know the attack bonus for the Javelin of Lightning in order to use it. I usually just stick to what the DM says.


It would be nice to have the ability to check in the chat rooms via chat. I personally would use this frequently if available, and I'm sure others out there would as well.


Are damage over time effects buffed retroactively from damage buffs?

If I cast Haunt on an enemy and it's ticking along, and then later cast Piranhas on the same enemy (which gives a 15% damage bonus against affected enemies), will Haunt do more damage for the duration of the Piranhas, or does Haunt have to be re-cast to gain the effects of the new damage buff?


Dollar-cost-averaging interval based on decay of autocorrelation?

I've read descriptions of DCA as buying more of something when it's cheap, and less when it's expensive.  In contrast, if you buy much of that thing all at once, you may be buying the whole load at a peak or trough price, i.e., you're either way worse off or way better off.  This means it's more of a gamble due to its uncertainty.  In a sense, with DCA, you end up buying at the temporally local average price.  As a conceptual toy problem, I pondered what would be a good frequency at which to make DCA purchases.  I haven't been able to see an intuitive answer over the years, but I'm wondering if this next idea might be a good rough guide.  The fluctuations in the price of a thing to buy has a slow and fast variations.  You'll never average out the slower fluctuations unless you intend to make DCA purchases forever.  Would it be a good idea to look at the autocorrelation of the price function in time, gauge the time interval that it takes to fall "relatively" flat, then choose a DCA purchase interval to be that time?  My thinking is that, with purchases made at that interval, the prices are uncorrelated, so you end up averaging out the faster fluctuations.


Using 'she don't care' in The Beatles' song 'Ticket to Ride'

She's got a ticket to ride,   She's got a ticket to ride,   She's got a ticket to ride,   But she don't care.     It sounded odd to me. So why is it used that way?


The set $C[0,1]$ is the set of all continuous functions $f:[0,1]\to \mathbb{R}$. Show that $C[0,1]$ is a vector space. Note: for $f,g$ (as elements of) $C[0,1]$, we define $(f+g)(x) = f(x)+g(x)$ and for a scalar $c,$ $(cf)(x) = cf(x)$.  The first step in showing that something is a vector space is to show that vector $u$ + vector $v$ is in $V$.   I don't know what I'm supposed to assign as $u$ and $v$, though. Please help. Thanks.


I am flying from Germany to India with Qatar Airways, in economy class. My total baggage should not exceed more than 30 kgs.  My question is, can I break down this 30 kgs allowance into two bags, as long as the total weight doesn't exceed more than 30 kgs?  I checked the website, there's no information given about the number of pieces that can be checked in - it only mentions the total weight up to 30 kgs.


Because of a particular user's constant blathering, retaliatory comments, harping on everything, and generally destroying all enjoyment I've had in the Struts 2 tag, I'm asking for the ability to filter a user's comments, and preferably answers.


How to set the chapter style in report class?

I want to set chapters to look like 'bigger' sections.  Now in the report class I have a style like:     Chapter 1      Introduction      1.1. Section   What I want to achieve is:        Introduction         1.1. Section   I don't want to change the document class.


What would be the adjectivalform of something related to "sound"?

An example sentence would be:  There is some music that is the ____ equivalent of poetry to me.  It's not quite "musical" since I want the word to be more closely related to sound whereas music is a kind of sound. I thought of "sonorous," given its Latin root, but the definition of that is "(of a person's voice or other sound) imposingly deep and full" and I'm looking for a word that is more neutral. I also thought of "phonetic" but that is more closely related to speech.


htaccess rewriterules for multiple pages with parameters

In main page index.php I have two href (like menu) for objective.php and news.php For both objectives and news I sent variables like:           The idea is to load content for each page separately and to change the url's to symbolic links like:  /MyTest_proj/corporate-objectives   /MyTest_proj/meetings     I've tried in many ways to rewrite rules in htaccess especially to rewriterule for both pages but most of time work only for the first rewriterule for example:    RewriteRule ^([-a-zA-Z0-9]+)?$ objectives.php?menu=$1   RewriteRule ^([-a-zA-Z0-9]+)?$ news.php?article=$1     which obviously both page match the same paterns and the meetings was loaded in objectives.php otherwise (or in other case) I got the 401 error... The question is how do I must put and to write these rewriterules and conditions if there is any to work for both pages ?


What is all N that make $2^N + 1$ divisible by 3?

When $N = 1$, $2^N + 1 = 3$ which is divisible by $3$.  When $N = 7$, $2^N + 1 = 129$ which is also divisible by $3$.  But when $N = 2$, $2^N + 1 = 5$ which is not divisible by $3$.  A quick lookout can determine that when $N$ is an odd number, $2^N + 1$ is divisible by $3$. If is that correct, how can it be proven? Otherwise, what is the counterexample and the correct $N$?  Can this be made into a more general form, for example $2^N + C$ or something similar?


How did Norris get infected with the alien in the movie "The Thing"?

How did Norris get infected, or is the movie "not clear"? Also could it be a plot device to ratchet up the tension between the characters in an already volatile situation that blows up?  What I am asking is:   Is the non mentioning of how he got infected a plot thing that will serve a later purpose? Was this an omission because of time constraints?


Pearson correlation for comparing models

I want to know if I can use Pearson correlation coefficient (i.e. whether my PS satisfies its usage or I need to look at other correlation measures) to study the extent of correlation between 2 vectors of data: PS: I have 10 ML models and 100 data sets, and build all models on all data sets. I want to see how correlated the model predicted average error (on all 100 data sets) between any two models are. There will be ${}^{10}C_2$ model pairs. The idea is that if model $i$ and model $j$ show similar average errors for each data set, then I should see a large correlation in average errors of these two models. Can I use Pearson correlation for this task?


I want to do something like this in Java    public void giveMoney(String userId, int money) {     synchronized (userId) {          Profile p = fetchProfileFromDB(userId);         p.setMoney(p.getMoney() + userId);         saveProfileToDB(p);      }    }   But of course, synchronizing on a string is not correct. What's a correct way to do something like this?


Why does (("+k").split("k"))[0] not equal "+"? I am so confused.  Program:  //The Control Test String a = "+"; System.out.println(a); System.out.println((byte) a.charAt(0)); System.out.println(a == "+");  //The Error a = (("+k").split("k"))[0]; System.out.println(a); System.out.println((byte) a.charAt(0)); System.out.println(a == "+");   Output:  + 43 true + 43 false  -- Why?   So why in the world does a "+" not equal a "+"?!


Why does LD keep outputting "no version information available"

On every loading of a lib, I get the error:     no version information available   This lib has been compiled on another PC (ubuntu 10.04) than the one running it (mandriva 2010.2).  $ ldd /usr/local/gnu-eabi-4.5.2/i686-pc-linux-gnu/arm-eabi/lib/libbfd-2.21.so /usr/local/gnu-eabi-4.5.2/i686-pc-linux-gnu/arm-eabi/lib/libbfd-2.21.so: /lib/libz.so.1: no version information available (required by /usr/local/gnu-eabi-4.5.2/i686-pc-linux-gnu/arm-eabi/lib/libbfd-2.21.so)  linux-gate.so.1 =>  (0xffffe000)  libz.so.1 => /lib/libz.so.1 (0xb77a7000)  libc.so.6 => /lib/i686/libc.so.6 (0xb7655000)  /lib/ld-linux.so.2 (0xb787a000)   Edit: the workaround didn't work.


apt update docker.com Release 404 not found

I recently try to install docker using this method  curl -fsSL get.docker.com -o get-docker.sh sh get-docker.sh   but it doesn't worked for me maybe broken packages or something after that I installed docker && docker compose using apt method and that's working good but when I try to update or upgrade my system I can see following messages I don't actually know what was the issue please give me a solution thanks.  $ sudo apt-get update  Hit:1 http://ppa.launchpad.net/daniruiz/flat-remix/ubuntu bionic InRelease Hit:2 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease                                     Hit:3 http://security.ubuntu.com/ubuntu bionic-security InRelease                                   Ign:4 http://dl.google.com/linux/chrome/deb stable InRelease                                        Hit:5 http://dl.google.com/linux/chrome/deb stable Release                                          Hit:6 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease                                   Hit:7 http://lk.archive.ubuntu.com/ubuntu bionic InRelease                                          Ign:9 https://download.docker.com/linux/debian bionic InRelease                                     Hit:10 http://lk.archive.ubuntu.com/ubuntu bionic-updates InRelease                                 Err:11 https://download.docker.com/linux/debian bionic Release                                        404  Not Found [IP: 13.35.8.98 443] Hit:13 http://lk.archive.ubuntu.com/ubuntu bionic-backports InRelease                               Hit:12 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease Reading package lists... Done                                 E: The repository 'https://download.docker.com/linux/debian bionic Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.   $ sudo apt-get upgrade  Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done The following packages have been kept back:   libxml2 libxml2:i386 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.   How can I remove from my source list because I don't need it anymore


Since last year, I have been using and iPhone 5s with iOS7 version.  My Problems are:   I haven't been able to decline an incoming call for some time. There are two User interfaces available for incoming call. One interface has the option to Decline with red button. In the other interface, I can't find the option to decline.


Does photon have size measurement because of its particle nature like electron's 3.86*10^-13m etc..


I know there are already a lot of answers to this question , but I just want to clear a doubt.  For the question above we consider $ \sigma \neq 1 \in S_n$ , now , there exists some $\alpha$ , $\beta$ $\in \{1,2,3,....,n\}$ such that $\sigma(\alpha) = \beta$.  Since $n \geq 3$ , there exists $\gamma \in  \{1,2,3,....,n\}$ where $ \gamma \neq \alpha$ and $\gamma \neq \beta$.  So , we take $\tau = (\beta \gamma)$ and prove that $\sigma \tau \neq \tau \sigma$ , where $ \sigma = (\alpha \beta)$.  My question is , $\sigma$ and $\tau$ we've taken , wouldn't commute anyway , since they are not disjoint , so what's the point of taking $\tau = (\beta \gamma)$ ?  Can anyone help ?


Who or whom again but I think slightly different

'Voters Will Know Who to Blame': I saw this headline in  today. I think it should be whom. Is whom now obsolete?


I deleted ubuntu and now I can't boot into windows!

This error comes up everytime   failed to load image grub error efi failed to start image   Then I get redirected to boot menu and every option has the same effect i.e the same error. I even tried inserting a recovery drive through usb and it resulted in the same error.


What is the reason behind the current Order of Operations? (PEMDAS)

After reading through a few other questions I was just asking myself: How was the Order of Operations defined, and why is it this specific order and not a different one?  Most of us know things like multiplication/division before addition/subtraction, parentheses first, etc - but what's the actual reason behind it? I'm probably biased by following those rules since childhood, so I can't really think of any other way.  2 + 2 x 2 = 6 and not 8  But if the order would be changed, let's say to "addition/subtraction before multiplication/division" would that order still work if we assume that mathematics would build up on it? Or is there some strange mathematical problem if we would be using a different order?  Of course, parentheses have a grouping function so they should always come first - I'm mainly talking about the exponents, multiplication/division, addition/subtraction (and maybe other operations left out).


How to prevent SQL (mySQL) Injection through plain escaping (not using prepared statements)

First of all, let's get one thing straight, while im sure it's not the ONLY solution to sql injections, PREPARED STATEMENTS ARE BETTER and MORE SECURE... that's granted.   So let's not debate it anymore, as I just needed to explore the escaping options and target the user inputs rather than the statement..   (a bit of back story)  I have a huge application w/ lots of basic SQL statements which i need to make "safer" in a short period of time. Converting all statements to PDO is a monster of a task which requires resources not available to this situation.   But good thing is that there's a hook in the application where ALL incoming $_GET/$_POST passes through a function before making available as plain variable in the scripts... ( eg.globalize($_POST) )  So i'm looking to target that function instead and focus on "cleaning" user input ...   I pretty much got a good grasp of SQL injection techniques, and basically much of its concept, such as: 1) Whenever there is user input involved in a statement, that's when the attacker has an opportunity 2) The main mission is to break your statement's quoting by simple single or double quotes as string, or character codes, in the attacker's input..  3) Escaping is good at preventing SQL injections except for that situation when the DATABASE character encoding is able to ready multibyte representations of those nasty illegal strings and the script based escaping misses it.  Based on the above premise, what if:  1) All my SQL Statements follow a standard where user input is quoted using single quotes ALWAYS, therefore there is no guess work for me anymore on what type of quote i need to escape (single quotes)  2) all user inputs (POST / GET) go through a function (eg. globalize() ) that basically addslashes() and globalizes each variable   3) This is an intranet application and the scripts can be made aware of the database encoding support.  QUESTION: What are the threats currently available in the above situation and how can we handle them?  ...i personally was looking into simply adding routines to the globalize() function similar to mysql_real_escape_string()  .. or go as far as "tweaking" the SQL statements to use mysql_real_escape_string() as that is a lot easier/faster to do than programming statements on each sql query..   PS Of course this script may never be as secure as prepared statements, but i just need to make it hard enough for most attackers (not looking to 100% bullet proof it as it is not that worth it)


I'm just getting started with NN in tensorflow/keras, and need some basic guidelines for what to do. I'm going to use pretrained model, and set of random images - totally random, few (~20) of them. Now, I want to evaluate how model is performing. I would like to generate some plots or score that would show, lets say low values -> indicating that model is not trained to recognize this kind of objects, and high values when predictions are good. What should I keep track of? Overall model prediction certainty? It's not done via model.validate - rigt? Validation is made with validation dataset with correct labels, right? I know its a broad question, but any answer will help!


How to deal with a slow SecureRandom generator?

If you want a cryptographically strong random numbers in Java, you use SecureRandom. Unfortunately, SecureRandom can be very slow. If it uses /dev/random on Linux, it can block waiting for sufficient entropy to build up. How do you avoid the performance penalty?  Has anyone used  as a solution to this problem?  Can anybody confirm that this performance problem has been solved in JDK 6?


Negative Binomial Distributing finding X

The number of injuries at a college football game has the following probability distribution:  Probability 0.14 0.33 0.23 0.17 0.09 0.04 Number of injuries 0 1 2 3 4 5  The coach must file a report whenever there is more than one injury in any game.  Calculate the expected number of football games to be played before the first game in which there are at least four injuries.


Can you suggest a LaTeX editor that can be used to typeset math documents? I've never used but I want to adopt one. Please, something simple to use


Globally set the default folder for Windows Explorer in Windows 7

In Windows 7, how can I set the default folder shown by Windows Explorer when it gets launched with Win+E?  ( explains how to do this with some unspecified version of Windows, but the solution does not work on Windows 7.)  I know that it is possible to change the command line used by the Windows Explorer shortcut in the start menu so that launching this shortcut opens a certain folder.  This is not sufficient for me; I would like to set the default globally, so that Explorer opens a certain folder even when invoked without arguments, or when invoked with the standard Win+E shortcut.


Difference between run time and compile time determination

I created an interface and a stack. Now i can call the stack by a reference from that interface or directly as well. I am unable to understand why I should take the reference route. The book I am referring to says its run time implementation so its better. Please can somebody explain it


unbalanced data is an issue that can effect the performnce of classification model ,several remides can be done to balance the data two of them are upsampling and downsampling , my questions is :   how do you know which method is the best for your model ? is it true that we need to compare f1-score rather than accuracy score ? do we also need to conduct a model for the unbalnced data and compare it to the upsampled/downsampled models    PS: doing cross validation to check al of them will take a lot of time especially with data that have large observations and complex models


I'm looking for ways to say "I'm having a bad hunch", or more like a bad feeling about something upcoming. The gut-wrenching feeling that something bad will happen.


New, extremely simple golden ratio construction with two identical circles and line. Is there any prior art?

This question is different from a previously asked question (linked above) as this golden ratio construction only utilizes two circles and a line, and is thus far simpler than the golden ratio construct in a previously asked question, which uses two squares, a circle, and a line.  Thanks!  Illustrated below, please find a new, extremely simple golden ratio construction with just two identical adjacent circles and a line, wherein the ratio of the red line to the blue line is the golden ratio PHI (1.6180....)   Is there any prior art?  I have been searching long and hard, but cannot find a similar golden ratio construction.    The simple construction is created as follows.   draw two adjacent circles with the same diameter. draw a line from the top of one circle through the center of the second circle. the ratio of line segment h to line segment g (the red segment to the blue segment) will then be exactly PHI or 1.6180....   I've been searching numerous books/online websites/resources for any previous similar constructions.  If you know of any, please do share!  Thanks!  P.S. User @Peter Woolfitt provides a seemingly very nice proof here of a slightly different construction, and any more proofs, either trigonometric or geometric would be weclome!


How can I avoid to return HTML markup for access denied?

I've developed a custom controller that serves as a simple endpoint, POST method. This controller has custom access control. Custom access is done by looking for a header in the HTTP request, by making the controller object a service as well. Everything works great. Except that when I return AccessResult::forbidden() .. I get the HTML of the access denied page .. and I don't really want that .. I'd like to return just a short bit of JSON. What can I do to return something that is JSON, and not the Access Denied page HTML, for this particular route, when the access() method returns AccessResult::forbidden() ? I've read that appending ?_format=json to the url works, and in my case it does. Is there anyway to achieve the same result without adding this url parameter?


What's the longest wavelength single photon we've ever observed?

At short wavelengths, our light detectors tend to be photon counters (e.g. CCD light sensor). At longer wavelengths, we use antennas and bolometers that tend to add up energy instead of counting photons. What is the longest wavelength at which we have "single isolated photon" type detection? Or, at least low number of discrete photons counted directly?


An idempotent operator is compact if and only if it is of finite rank

Would you help me to solve this problem. Show that an idempotent operator on hilbert space is compact if and only if it has finite rank.


I am using JUNIT 4. I tried to assert the exception using the below code , but it did not work.  @Rule public ExpectedException thrown = ExpectedException.none(); thrown.expect(ApplicationException.class);   However when I annotated using the below , it worked and test passed.  @Test(expected=ApplicationException.class)   Please let me know if I am missing something.  import org.junit.Rule; import org.junit.rules.ExpectedException;  public class Test {      @Rule     public ExpectedException exception = ExpectedException.none();      @org.junit.Test     public void throwsIllegalArgumentExceptionIfIconIsNull()     {           exception.expect(IllegalArgumentException.class);         toTest();     }      private void toTest()     {         throw new IllegalArgumentException();     } }


Finding key in a list of dictionaries and sorting the list

Having a JSON-like structure:  {     "shopping_list": [         {             "level": 0,             "position": 0,             "item_name": "Gold Badge"          },         {             "level": 1,             "position": 10,             "item_name": "Silver Badge"          },         {             "level": 2,             "position": 20,             "item_name": "Bronze Badge"          }     ] }   I'm trying to sort the list by key.  However, when trying to get them by:  k = [c.keys()[0] for c in complete_list["shopping_list"]]   I get TypeError: 'dict_keys' object does not support indexing.   How to get keys? How to sort the list by specified key?


I want to set forwarding IP address on a router. What port is used in OS X for remote desktop?


Divergence of $\sum\limits_{k=1}^n \frac{a_n}{S_n}$ where $S_n = \sum\limits_{k=1}^n a_k$, when $S_n$ diverges

Let $a_n$ be a positive sequence such that $S_n = \sum\limits_{k=1}^n a_k$ diverges.   I'm trying to prove $\sum\limits_{k=1}^n \frac{a_n}{S_n}$ diverges.   I tried summation by parts, limit comparison and Stolz theorem in many different combinations and am still stuck with nothing.


What happens when 2 readied actions trigger at the same time?

The Setting:  Two wizards both ready the Polymorph spell targeting each other.  They both choose the same trigger.  In this example let us say the trigger is someone shouting “now.”  What happens?  Does the reaction casting of Polymorph from each wizard happen at the same time resulting in both wizards being transformed? Or no?  If not, why?


Is this use of the progressive authentic (i.e. idiomatic)?

There is general consensus that     I have been waiting for you for 6 hours.   is grammatically correct, and idiomatically authentic.  For example, our appointment was for 9 am, and when you show up at 3 pm, I tell you how long I've been waiting for you.  There is another sentence sometimes attempted by English language learners for the same situation:  It's been 6 hours since I was waiting for you.   Does this sentence work in the 9am appointment, 3 pm arrival situation?  (This question is motivated by  and a concern that English language learners might not capture just how rarely the since-progressive construction would be usable in English.)


How to give root access to a wine application

I installed Dreamweaver 8 on Kubuntu with Wine, and I've already installed LAMP. Now I'm trying to give Dreamweaver root access to my var/www/html directory so I can write some PHP scripts but I can't find any way of doing that—is it possible?  Also is there any other native Linux app that is as good as Dreamweaver (with syntax highlighting)?


Why $x$ cannot be zero in $y=\frac{1}{\frac{1}{x}}$

I have had this question for quite some time now but never tried to look for the answer but now it bugs me. When simplifying $y=\dfrac1{\frac1x}$ we get $y=x$ where $0$ is defined ,I presume it is because the denominator can not be zero in a fraction ? Even if that is true what is wrong with it being zero as we get zero eventually : $$y=\frac{1}{\frac{1}{0}}$$ $$y=\frac{1}{\infty}=0$$ Sorry if this is very naive :(


Why python loop for matrix (from lists) with changing element gives not correct output?


I know I can add KML files once I have unzipped the KMZ files, but is there a way to open KMZ files directly?   When I try to open a kmz file on QGIS 1.8.0 on Windows XP, through the all files filter, it does not accept it as a valid format.   Am I doing something wrong?   Does this all depend on OGR support?


Adding background color to \verb or \lstinline command without \Colorbox

Update:  In addition to my previous post, here's a screenshot to give you a better visual example. This was created with HTML and CSS for demo only.  In CSS, the code part is made using font-family: monospace, sans-serif;, background: #EFF0F1;, display: inline-block;, and padding: 2px 5px;.  I wonder if there's a simple way to mimic this style in LaTeX using \lstinline (or better options) without \Colorbox (if possible). All instances of \lstinline would have the same style.  What I mean by simple is that I thought I could just write something (once) inside \lstset{} in the preamble--which is simple--rather than typing \Colorbox in every instances of \lstinline--which is long and awful for a novice like me. Otherwise, using \Colorbox would be just fine.    Original question:  I need to create inline codes with gray background using either \verb or \lstinline. I've read  which use \Colorbox which works great!  My question: Could we achieve the same effect just using \lstinline alone, without \Colorbox so it would be more simple?  \documentclass{article} \usepackage{xcolor} \usepackage{listings} \definecolor{mygray}{rgb}{0.8,0.8,0.8} \lstset{% basicstyle=\ttfamily, breaklines = true, backgroundcolor=\color{mygray}, } \usepackage{realboxes} \begin{document}  % demo using \lstinline only This is \lstinline|my code|  % demo using \lstinline and \Colorbox This is \Colorbox{mygray}{\lstinline|my code|}  \end{document}


I have learned that, for creating a regression model, we have to take care of categorical variables by converting them into dummy variables. As an example, if, in our data set, there is a variable like location:   Location  ---------- Californian NY Florida   We have to convert them like:  1  0  0 0  1  0 0  0  1   However, it was suggested that we have to discard one dummy variable, no matter how many dummy variables are there.   Why do we need to discard one dummy variable?


php Sanitising String Before MySQLi Statement

There seems to be a lot of information about this issue all over the internet with no real clarity on required steps.  I am trying to create a 'catch-all' function to prepare strings prior to storage to DB.  function sanitiseThis($string) {    $string = trim($string);    $string = htmlentities($string);    $string = mysqli_real_escape_string($string);    return $string; }   is the trim()/htmlentities() necessary?


How can I find the method that called the current method?

When logging in C#, how can I learn the name of the method that called the current method? I know all about System.Reflection.MethodBase.GetCurrentMethod(), but I want to go one step beneath this in the stack trace. I've considered parsing the stack trace, but I am hoping to find a cleaner more explicit way, something like Assembly.GetCallingAssembly() but for methods.


Having trouble uncompressing a few files

So I have to uncompress 4 different files. When I do  file file1 file file2 file file3  file file4   for example, different messages are displayed. For example one starts like "gzip compressed data, …, another starts like RAR archive data, v1d, os: Unix…, another starts like compress'd data 16 bits…  I am not really sure how to differentiate between the different uncompressing commands. Which one would I use for each?  For those who asked, the filenames are actually file1, file2, etc. They have no visible extensions at all.


Do I ever get the last key for the 4th house?

I'm pretty far along in the game, and I still haven't caught wind of a key for the last house in the village. Is there actually any way to get into the last house, or does is remain locked for the entire game?


In the Suggested Edits Reviewer Stats, I saw that the Reviewer has no commas and lots of "and"s:  Whereas the Editor Stats do have commas and don't run on.  Small bug, but can we give the stats some commas so it's less of a mouthful?


I need a poll inside my content types.  Sometimes the users create an article and like to create a poll directly into the node they created. They don't want to create an extra poll with no connection to the original article.  So how can I get the poll functionality inside a different content type?


How to indicate that specific sections of a page can be swiped

There are a lot of mobile UI design patterns that support swiping, and these are designed based on interaction and animation that indicate the behaviour. Examples include the 'swipe/pull down to refresh' and also the page flip when users swipe left or right.   I also know that there are some applications that show swiping interactions for only specific sections of a page, but I generally don't see any cues or hints to suggest that this behaviour is possible. An example of a discussion about this for Android applications . Are these supposed to be discoverable interactions or are there some standard notations for this type of behaviour?


How many 0's are in the end of this expansion?

How many $0's$ are in the end of:  $$1^1 \cdot 2^2 \cdot 3^3 \cdot 4^4.... 99^{99}$$  The answer is supposed to be $1100$ but I have absolutely NO clue how to get there.  Any advice?


Would   $$ \frac{{\rm d}^2 x}{{\rm d}t^2} + \omega^2 x = {\rm (constant)}$$ be an SHM?  My instinct is no, as acceleration would not be zero at x = 0, but a solution in my book uses this equation to find angular frequency for an SHM.


Why is the ampere a base unit and not the coulomb?

I always thought of current as the time derivative of charge, $\frac{dq}{dt}$. However, I found out recently that it is the ampere that is the base unit and not the coulomb. Why is this? It seems to me that charge can exist without current, but current cannot exist without charge. So the logical choice for a base unit would be the coulomb. Right?


What are the limits on the amount of slaves per master?

I currently have a Master with 2 slaves, all running MySql 5.5.  What are the limitations on the amount of slaves I can connect to a single master? what parameters should be taken into affect?


how can i switch to the new instance of browser in python selenium webdriver

I am using selenium webdriver with python. I am not able to find a way in python by which I can switch the webdriver to a new browser.  My web application have  multiple links and buttons  Clicking on any of  them leads to a new browser window being opened.    for clicking on buttons and link I have used below code   driver.find_element_by_css_selector("input[type=\"submit\"]").click() driver.find_element_by_id("btn1").click() driver.find_element_by_css_selector("#linksPlace > #OIT> a").click()   For selecting subsequent browser windows, I have used below code  for handle in driver.window_handles:     print handle     driver.switch_to_window(handle)     driver.get_window_position(handle)     driver.save_screenshot('E:\Selenium scripts\demo.png')   However  I am not able to navigate to that new browser window. I have used below command as well, but things didn't work       driver.switch_to_window(driver.window_handles[-1])   Is there any way by which I can navigate to new browser window? I have seen that there are functions which exist in java and c# to do the same, but struggled so far in python.


Two string's which (I think) are identical do not return true when checking if the same

I have two strings, one is inputted by the user and one is the name of a thread. I inputted the name which should be the same as the thread. To verify this I have the program output  System.out.println("DS:" + DeamonMain.threadNameFinal + "CN:" +getName());   Which prints   DS:Thread-66CN:Thread-66   Now these appear to be the same string. However, when I have it test the validity of this using   boolean factChecker = DeamonMain.threadNameFinal == getName(); System.out.println(factChecker);   it prints false...  Why is this? Does this have to do with getName()? How are the string different and why so?


Can any harmonic function on $\{z:0<|z|<1\}$ be extended to $z=0$?

After looking at this question for quite some time, I've asked a couple of other students, and they also couldn't seem to come up with an answer.  This is from an old qualifying exam at our university.  Let $u$ be a harmonic function bounded on the set $\{z:0 < |z| < 1\}$.  Can it always be defined at the point $ z= 0$ to become harmonic on the whole unit disk?  The standard argument with the logarithm doesn't work here, as it must be bounded on the punctured disk, and the logarithm blows up at $0$.   Also, we can't use any kind of harmonic conjugate argument because our domain is not simply connected.  Thus, I think it's probably true, but I haven't been able to come up with a proof.   Thanks in advance for any help!


is definitely one of the most amazing phenomenon that I have heard in a while.  Some examples:   The pressure from the  can perturb the motion of artificial satellites as the momentum is exchanged creating a perturbing force. The  in Australia intend to use high powered lasers to perturb the orbit of space debris, sending space junk in to our atmosphere with the intention that it will burn up!   Question  It has most certainly happened to everyone in the community where you've gone to bed only to realise that you've forgot to close the door. On a much smaller scale, yet equally as annoying as space debris.    What would be the magnitude of photon pressure required to cause a force big enough to close a bedroom door?


I can't make bootable USB on 2008 iMac 2008 running El Capitan

I have 2008 iMac and OS X El Capitan on it. I will make bootable USB drive for my friend, but I can't. I format my USB as Mac Os Extended and GUID parition map, then I downloaded InstallMacOSX.dmg file from apple; double click on it and I have installmacosx.pkg. (I can't find The El Capitan installer to the /Applications folder). I click on this package and I have an ALERT: "OS X v10.11.6 is already installed on this computer. Use the Updates page to install the 10.11 update or if you would like to download the full OS X installer click Continue". I click continue and have to select destination disk, but when I select my external USB drive, I have the message: "OS X can't be installed on this disk. macOS isn't installed". Can you help me?


Does enhanced for always run first-to-last?

Using Java's enhanced for loop, I have for quite some time avoided using the structure if I needed the processing to be in any particular order (for example: printing out the values in a table in the same order as the collection). It seems obvious that that should be the case, but on the other hand, the syntax of the structure seems to imply that I should not rely or know about that.   Perhaps embarrassingly, I have not been able to track down any documentation that explicitly says enhanced for loops are processed in first-to-last order. Does such documentation exist, and if so, where can I find it?


Right word for repeating something several times to make one believe that the thing is true

What's the right word for repeating something several times to make one believe that the thing is true?


Why does the UK have 4 national football (soccer) teams?

Currently there is the  in football (soccer) taking place and the UK has 3 teams participating: England, Wales and North Ireland. It could have been 4 if Scotland qualified. It is the same for FIFA World Cups, the UK always sends four teams to the qualifications.  The UK seems to be the only country in the world which has 4 football teams even though it is considered as one country almost everywhere.  Why does the UK / why is the UK allowed to send more than one team to international football tournaments? Is it actually the same for other sports?  I already asked almost the same question on , and the answers see the reasons in history. However, there are many countries who have a similar history like the UK of smaller uniting states.


I am implementing TLS 1.2 and using ECDHE_RSA_AES_128_GCM_SHA256 cipher suit.  According to RFC 5246 finished messages have {verify_data[verify_data_length]} and verify_data = PRF(master_secret, finished_label, hash(handshake_messages)  Some people said client finished contain Authentication tag and nonce along whit verify data. Can anyone tell me the structure of finished message in this cipher suit and exactly the size of verify data, authentication tag and nonce.  Below is my Client Finished message @Makif can you tell me how may bytes are encrypted and where is authentication tag in this message?    @Makif, Got it.  -8 byte nonce  -16 byte ciphertext  -16 byte authentication tag  Total is 40 byte but my finished message contain 48 bytes. What is about last 8 byte?


How does an app (e.g. Whatsapp) automatically detect when the phone receives a 2FA SMS verification code without being granted SMS read permissions?

When installing some apps (for example Whatsapp) the user is required to receive a verification code on the phone via SMS.   I have noticed that some apps automatically verify this code as soon as the text message is received by the phone, without the user having to open the SMS message or type the code manually. The app does this without being granted any permissions by the user to access or read their calls and texts.  How is this possible, and is it a privacy or security concern?


Prove that $\nabla_{\mathrm X} \mbox{tr} (\mathrm A \mathrm X^{-1} \mathrm B) = - \mathrm X^{-\top} \mathrm A^\top \mathrm B^\top \mathrm X^{-\top}$

Prove that $$\nabla_{\mathrm X} \mbox{tr} (\mathrm A \mathrm X^{-1} \mathrm B) = - \mathrm X^{-\top} \mathrm A^\top \mathrm B^\top \mathrm X^{-\top}$$   My proof is below. I am interested in other proofs.    My proof  Let   $$f (\mathrm X) := \mbox{tr} (\mathrm A \mathrm X^{-1} \mathrm B)$$  Hence,  $$\begin{array}{rl} f (\mathrm X + h \mathrm V) &= \mbox{tr} (\mathrm A (\mathrm X + h \mathrm V)^{-1} \mathrm B)\\ &= \mbox{tr} (\mathrm A (\mathrm X ( \mathrm I + h \mathrm X^{-1} \mathrm V))^{-1} \mathrm B)\\ &= \mbox{tr} (\mathrm A ( \mathrm I + h \mathrm X^{-1} \mathrm V)^{-1} \mathrm X^{-1} \mathrm B)\\ &= \mbox{tr} (\mathrm A ( \mathrm I - h \mathrm X^{-1} \mathrm V + O (h^2)) \mathrm X^{-1} \mathrm B)\\ &= \mbox{tr} (\mathrm A \mathrm X^{-1} \mathrm B) - h \, \mbox{tr} ( \mathrm A \mathrm X^{-1} \mathrm V \mathrm X^{-1} \mathrm B) + O (h^2)\\ &= f (\mathrm X) - h \, \mbox{tr} ( \mathrm X^{-1} \mathrm B \mathrm A \mathrm X^{-1} \mathrm V ) + O (h^2)\end{array}$$  Thus, the directional derivative of $f$ in the direction of $\mathrm V$ at $\mathrm X$ is  $$D_{\mathrm V} f (\mathrm X) = - \mbox{tr} ( \mathrm X^{-1} \mathrm B \mathrm A \mathrm X^{-1} \mathrm V ) = - \mbox{tr} ( (\mathrm X^{-\top} \mathrm A^\top \mathrm B^\top \mathrm X^{-\top})^\top \mathrm V ) = - \langle \mathrm X^{-\top} \mathrm A^\top \mathrm B^\top \mathrm X^{-\top}, \mathrm V \rangle$$  and, lastly,  $$\nabla_{\mathrm X} \mbox{tr} (\mathrm A \mathrm X^{-1} \mathrm B) = - \mathrm X^{-\top} \mathrm A^\top \mathrm B^\top \mathrm X^{-\top}$$


prevent from ddos attacks with nginx and apache (and haproxy?)

Sometimes i have ddos attacks on my server. I'm trying to prevent from this. I'm using Nginx to serve static content and as a reverse proxy and Apache to serve php applications.  When the attack starts, I have a lot of (eg. 3000 IP addresses) that want to reach my page the same time but there is only one IP address per 4 - 5 seconds. But if there is a lot of attackers I still have 400 requests per seconds, but from different IP. So I have problem with blocking it because IP connection rate limit in Nginx doesn't work in this situation. I have about 100 websites on that server. During the attack, Nginx works ok, but the Apache is completely dead, Nginx cannot connect to the upstream for not only the attacked site but for all sites on the server.  I have no problem with the situation that during the attack, the attacked site doesn't work, but I want to other sites works without impact.  I need solution that not move attack away, but i want to have working server that can be able to serve other sites when one is being attacked.  Could you help me in some way? I'm thinking about using haproxy in front of Nginx. I would add one backend for each site with concurrent connection limit for about 40 connections. Do you think if it is a good idea? Or maybe you have other ideas how to prevent this kind of attacks?


I own a Canon EF-S 17-55mm f/2.8 IS USM Lens. The other day I was trying to take a photo with the camera pointed directly towards the ground and mounted on a tripod. When I let go of the lens after adjusting the zoom, it would fully extend on its own due to gravity.  I am not certain if it has just now started doing this or if it has always done it and I haven't noticed because I am normally holding the lens while shooting. Is this normal behavior for this lens? If not is there an adjustment I can make to eliminate this behavior?


Syntax error while deleting files with `(` character in the name

I'm trying to delete a file using the console with this command rm ./google-chrome-stable_current_amd64(1).deb  but I get a syntax error. What is wrong with this command?


For which primes p is the polynomial irreducible in $\mathbb{Z}_p[x]$

I'm studying for an upcoming exam, and have been given the following question:      For which primes p is the polynomial $f(x) = x^2 + x + 1$ irreducible in $\mathbb{Z}_p[x]$?   I think I can use Eisenstein's Criteria here, but I am confusing myself as I try to apply it. Any help is appreciated!


Do spice containers need to be hermetic?

Spice containers purchase  I'm planning on upgrading my spice storage. Reading some advice online (e.g. , and ) I came to the conclusion that spice containers should:   Not be exposed to direct sunlight and high temperatures Be airtight   Which means that either you store it inside of some closed cupboard/wardrobe/room or you have containers which do block light and are in a relatively shady place. And the containers need to be airtight.  Available solutions  I've been browsing for some containers available online in my country and the 2 most sensible options I've seen are these:       The problem  The first one is hermetic (it has some rubber around the lid) but it's clear glass. The other one does not have the rubber, just a regular twist-off lid, but it's amber glass.  It'll be hard for me to find any space inside of cupboards to store all of my spices (I need at least 30), so I'd rather buy amber glass container, which I believe will effectively block the sunlight, even when kept on the counter. But I can't find any hermetic amber-glass containers, only ones with regular lid.  The question  Is that regular twist-off lid enough to keep spices airtight and fresh? Or should I focus on buying a hermetic container (like the one in clear glass). I could then for example paint them black to block the sunlight.


I read this phrase in a book:     Today, you're likely to be a tiger snack.   Is that correct? I mean are not we supposed to write tiger's snack instead?


Do "I'm through it" and "I'm done" have the same meaning?


If a,b,c are positive real numbers such that a + b + c = 1 , then find the minimum value of $\frac{(1+a)(1+c)(1+c)}{(1-a)(1-b)(1-c)}$

I tried by solving inequality of numerator and denominator Numerator: $(1+a)(1+c)(1+c) \leq \frac{(3 + a + b + c)}{3} = \frac{(3 + 1)}{3} = \frac{4}{3}$ Denominator: $(1-a)(1-c)(1-c) \leq \frac{3 - (a + b + c)}{3} = \frac{(3 - 1)}{3} = \frac{2}{3}$ By combining the 2 equations $\frac{Numerator}{Denominator} \leq \frac{4/3}{2/3} = 2$ But that's not the answer (I know I found max value). Can anyone help me? Is the method I am following can be used in other types of question? Solving Numerator and denominator inequality and than dividing both inequatlity.... ANSWER: 8


if $A$ is Abelian group , $B$ is subgroup of $A$ , Is $B \times A/B \cong A$?

If $A$ is abelian group and $B$ is a subgroup of $A$, $B$ is normal subgroup of $A$.  Is it true that $B \times A/B \cong A$?  I ask because I was watching an online lecture from a course in abstract algebra at Harvard extension school.   And the lecturer (whose name is Peter) was taking about vector spaces and said that if $V$ is a vector space and $W$ is a subspace, then $V/W \times W \cong V$.  So the question which I thought of is: "is this true for all Abelian groups?"   Also, is there a less restricted condition on groups which will make this property hold?


We know from the  that it is accepted only in a limited way in answers and frowned upon if found to be spammy. We know from  that it can be deleted at any time from comments if the comment is not relevant or spammy.  But what about the chat? This leaves chat to be the only legitimate place to promote products or services that the user is affiliated to (albeit in an ad-like way).  What is your opinion?


Confused about 0 intercept in logistic regression in R

I'm exploring the effects of removing the intercept in a logistic regression model.  Assume a model:  $$logit(Y = 1) = \beta_1 x + \beta_2z + 0$$  with $x$ and $z$ being categorical variables with 2 levels each and no intercept.  I understood that having no intercept with categorical predictors produce coefficients that compare the $P(Y = 1)$ in each level of the two predictor against a null case where $P(Y=1) = 0.5$ or $logit(Y=1) = 0$.  I noticed a phenomenon that can understand. Using glm() function in R if you change the order of the variable in the right hand part of the formula, the coefficients change too. But even more oddly, the coefficient of the first variable is always the same.  Here's an R demo:  y <- as.factor(sample(rep(1:2), 30, T)) x <- as.factor(sample(rep(1:2), 30, T)) z <- as.factor(sample(rep(1:2), 30, T))  coef(glm(y ~ x + z - 1, binomial) #        x1         x2         z2  #-0.1764783  0.3260739 -0.1335192  coef(glm(y ~ z + x - 1, binomial)) #        z1         z2         x2  #-0.1764783 -0.3099976  0.5025523    As you can see the first predictors have the same coefficient while the other are different in the two models.  Here is what I expected and instead behave differently than what I though:   Since every level of the two predictors is compared to the same null case, I expected to have the same coefficients in the two models, independently from the order in which I use them. I expected to see the coefficients of every level of every predictor, instead the coefficient for the 1 level of the second predictor is not shown. I therefore assume that only the first variable is compared against the null case, while the second is compared against a reference level; but what is this level? Is it $P(Y = 1 | X = 1 \cap Z = 1)$? Reproducing one of the models WITH the intercept we get:  coef(glm(y ~ x + z - 1, binomial) #        x1         x2         z2  #-0.1764783  0.3260739 -0.1335192  coef(glm(y ~ x + z, binomial)) #(Intercept)         x2          z2  #-0.1764783   0.5025523  -0.1335192    As expected x1 become the intercept, and x2 is likely relative to x1. z1 is missing also in this case and z2 is the same as in the model without intercept.  Thus should I assume that the comparison against the null case $P(Y = 1) = 0.5$ is made only for the first variable in a formula, while the other are compared against the usual intercept? Is this behavior normal? What about the fact that the first coefficient has the same value whichever the order of the predictors in the formula? What if I want to compare all level of each predictor against the null case and have a coefficient for all levels? Or it's theoretically impossible for some reason I don't get?


I am sending an email address value to a third party service. I have following regex to validate email addresses:   `^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})$`   but suppose someone tries to send as email address:  'WQWQQWWQQWQWWQWQQWW@WEOIWEOIEWOIEWIOWEIOEWIOEWPIOWEPOIWEPEWIOPIOWEOIWEOIEWIOWIOEWIOPEWIOPWIOEPIOWPEIOEWOIEWOIPIOEW.COM'    this address is valid and then I get error in response object from the service.  My question is, what can be the possible maximum character limit for the domain part?


The example code is ok.  if ($xxx != false) {     echo 'xxxxxxxxxxx'; } else {     echo 'aaaaaaaaaaa'; }  // result: xxxxxxxxxxx   if ($xxx !== 0) {     echo 'xxxxxxxxxxx'; } else {     echo 'aaaaaaaaaaa'; }  // result: aaaaaaaaaaa   But this one confuses me   if ($xxx != 0) {     echo 'xxxxxxxxxxx'; } else {     echo 'aaaaaaaaaaa'; } // result: aaaaaaaaaaa   $xxx is string, why this code returns me false? I have read the document  but still don't understand about it.


Why does my infant bang her head sideways in sleep?

Age 2.5 months.  I swaddle her and put her in my lap. When she's asleep I notice her banging her head sideways. Also, today I tried Kangaroo Care and put her naked on my chest (on her stomach), when she was asleep I found her banging her head on my chest.  What could cause this?


It is always told as a fact without explaining the reason. Why do two objects get charged by rubbing? Why one object get negative charge and other get positive ?


Problem with characters in SSH with MingW32 and not super-user

I am connecting to my server with SSH from Windows 10 with MINGW32 (Git).  When I connect and user the root user everything works correctly but when I login with another user and use special characters like backspace or similar, the console shows incorrect characters and I can't erase.  An example:  root@sample:/# php -r 'echo "I can write\n";' I can write root@sample:/# php -r 'echo "I can erase without problem\n";' I can erase without problem root@sample:/# su sample $ php -r 'echo "I can write some characters";' I can write some characters $ php -r 'echo "I cant erase and I cant use the up arrow for repeat the last command";' I cant erase and I cant use the up arrow for repeat the last command$ $ ^[[A  : not found $ : 16: $ trying erase^H^H^H^H^H   With Putty I have not problems.  Regards and thanks.


Wake-on-LAN works with Windows 8 but not with Ubuntu

I have a PC that has a Windows 8 partition and an Ubuntu 13.04 partition.  I am trying to get wake-on-lan to work.  Everything works fine on the Windows 8 partition: I can wake-on-lan from both the sleep state and the shutdown state. However, when I shutdown Ubuntu using:  sudo shutdown -h now   I cannot wake the PC through my LAN. Is this because the network interface is getting turned off? What command can I use or how can I reconfigure Ubuntu so that wake-on-lan still works?  Also, if I do not use the -h option in the shutdown command, the PC does not actually shutdown; it just freezes up on me.  Using ethtool, I found that it says:  Supports Wake-on: pumbg Wake-on: g ... Link detected: yes   My etc/network/interfaces says this:  auto eth0 iface eth0 inet dhcp       up ethtool -s eth0 wol g   EDIT: I have found that if I shut down the PC by simply holding the power button, then wol works. If I shutdown using the command line or through the Ubunutu GUI, then it does not work. So I think the issue is not that it is not being setup properly, but that something is overriding it or shutting it off when I shut down properly. Are there are any scripts that get run at shutdown?  I have added  NETDOWN=no   to both etc/default/halt and etc/init.d/halt


What is this element on the far right of schematic described as "270 OHM"? Is this some kind of inductor? What is its purpose in this device (this is a reference design of dc-dc power supply of sim900 taken from its datasheet) and what would be an exemplary part number?


Every irreducible component of $X$ has dimension at least $n - r$.

In my algebraic geometry course, somewhere in a proof we've used the fact that, for $f_1, \ldots, f_r \in K[x_1, \ldots, x_n]$ and $X = V(f_1, \ldots, f_r) \subset \mathbb A^n$, every irreducible component of $X$ has dimension at least $n - r$ but I really don't understand why this is true. We have see the following result that may help.  Let $X$ be an irreducible affine variety. If $f \in A(X)$ is non-zero, every irreducible component of $V(f)$ has  dimension $\dim X - 1$.  I have the intuition that we have to use the above property, but I am not able to write the details. Could one of you help me ?


Is it possible to kill a single query in oracle without killing the session?

I would like to be able to kill a user's query in Oracle 10.2.0.4 without killing their entire session.  This would allow the query to end, but not log that user out of their session, so they can continue making other queries.  Is this possible at all?  Or is the blunt hammer of killing the session the only way to go about ending a query's execution?


I have modelled half of character and added Mirror modifier to it.  Now there are 2 vertices in the bottom that refuse to connect.  First, I can't move them by X axis towards each other for some reason. Also, I've tried every option that Alt+M has to offer but it didn't do anything.  P.S Also if anyone knows why the shading is so massive, that would be helpful too.


Why my Chrome extension event doesn't work?

I'm trying to create a chrome extension. I had a problem with the affectation of event for the new element that i append to the dom of site with  content. Js  If I add an event to an element' 'for example class'  exist already in the page, it works correctly. Just for my new appended element((in the code iadded a button ,the event is just an alert to test))  function tst() {   myclass = $("._3hg-._42ft");   myclass = myclass.not(".supp");   myclass.addClass("supp");   var patt = /https:\/\/(.)*\.facebook\.com\/(.)*\/(posts|photos|videos)\/(\w|\.|\d)*/g;   for (i = 0; i < myclass.length; i++) {     result = patt.exec(myclass[i]);     myclass.append('<button class="fact" id=' + result[0] + ' style="position: absolute;">fact</button>');   };    /* this is a simple event*/   /***********************/   $(".fact").on('click', function() {     alert("no event work ");   });


Wifi stopped working on my Ubuntu 14.04 on a Dell XPS 13 Ultrabook. I looked at  question and ran the wireless script.  is the link to the script I generated. Can someone please help me with the situation.   I don't see any Wifi networks. I tried reinstalling the Broadcom drivers and it didn't work.When I search for additional drivers in my system settings, it already shows that BCM4352 driver is in use.


I understand that angular momentum is a vector, etc..  But, what really happens when some object, say a ball for example, is set to rotate along two axes? What would the resulting motion look like?


Copy and Modify selected text in different application

I have a windows application running at the backend. I have functions in this applications mapped to hot keys. Like if I put a message box into this function and give hot key as Alt+Ctrl+D. then on pressing Alt, Ctrl and D together the message box comes up. My application is working fine till this point.   Now I want to write a code inside this function so that when I am using another application like notepad, I select a particular line of text and press the hot key Alt + Ctrl + D it is supposed to copy the selected text append it with "_copied" and paste it back to notepad.   Anyone who has tried a similar application please help me with your valuable inputs.


I am getting the response as mentioned below:  AFMomFormDetails now has {\"sigName\":\"qwer\",\"contName\":\"asdf\",\"signature\":\"zxcv\"} after the move  var resStr = response; var retStr = resStr.substring(resStr.indexOf("{"), resStr.indexOf("}")+1); var strObj  = retStr.replace(/\\/g, ""); $scope.fdetails=JSON.stringify(strObj);   I am unable to bind the values in angularjs. Can anyone please help me?


How can I make billiard without using Rigidbody?

Unity's physics engine isn't deterministic (ie. the results aren't always the same on all computers) so I haven't Idea that how billiard games Implemented.Is there a way to Implementing fake and deterministic  physic in unity? I mean I want to make billiard without using Rigidbody    I found this open source project that didn't use physic! this is what I need but unfortunately it's full c++ and I haven't enough time to convert it to c#


How to get value from string javascript?

I have this string var a = toNormal("sdf45sdf4sdf45sd4f5s4df"), b = toNormal("fg45df4g5dfg5df"), c = toNormal("s5d4f5sd4fsdfdd5c"); ... other code  how to get "sdf45sdf4sdf45sd4f5s4df", "fg45df4g5dfg5df" and "s5d4f5sd4fsdfdd5c"? my try $pattern = '/a = toNormal("(.*)");/'; preg_match($pattern, $html, $matches);