Possible Duplicate:          I have a geoserver 2.1.x installation with SLD stylization. I have used a property to label the polygons which forms a map.  But the issues is the labels are getting repeated as in the figure   Is there any way to prevent this from happening??    What I have done so far ---   I have tried to use the geoserver Vendor option for grouping of polygons with perticular label        <VendorOption name="group">yes</VendorOption>    but this doesn't help.   I have used a custom solution suggested by someone from the mailing list ..   <Geometry>             <ogc:Function name="centroid">                     <ogc:PropertyName>the_geom</ogc:PropertyName>                   </ogc:Function>                </Geometry>    but removes the multiple labels, but adds some unwanted artifacts into the map, and I want to avoid using that...   I also tried the metatiling functionality by doing this -   tiling:true, tileorigin: [map.maxExtent.left,map.maxExtent.bottom],    This removes certain multiple labels but not all...    Any other solutions??


How to add next height number in Order Attributes inside the Add new page.

By default, when a new page is added it will be given the next highest number not already assigned to a page.


$$\int_{-\pi}^{\pi} \frac{2x(1+\sin(x))}{1+\cos^2(x)} \ \mathrm dx$$ My attempt: $$\int_{-\pi}^{\pi} \frac{2x(1+\sin(x))}{1+\cos^2(x)} \ \mathrm dx =\int_{-\pi}^{\pi} \frac{2x}{1+\cos^2(x)} \ \mathrm dx+\int_{-\pi}^{\pi} \frac{2x\sin(x)}{1+\cos^2(x)} \mathrm dx$$ $$=0+\int_{-\pi}^{\pi} \frac{2x\sin(x)}{1+\cos^2(x)} \ \mathrm dx$$ I'm not sure how to proceed further. Integration by parts doesn't seem promising. Neither does any substitution. Any suggestions?


Java, passing variables/objects into a function

I'm interested to know exactly what's happening under the bonnet when passing a variable or object into a function.  When passing an object or variable into a function, is a new copy of the object/variable created in the new scope? (A set of parentheses constitutes a scope in java right?). Or is the reference to the existing variable/object in memory passed in? Although that would only make sense for a global object/variable?


Is there a thread on this site where someone can practice mardown

I've been trying to use markdown in comments and they never come out right.   When starting a thread, the system show what the markdown will eventually produce before you submit it. That's great. Responding by adding a comment has no such preview facility and every time I hit the enter key to get to a new line (force of habit) it uploads an unfinished comment. That's rude.  I'd like to have a practice thread where anyone can just add comments. Is that asking too much?


Unity: set y rotation messed up the object

I created 3 boxes, then align the three to form some sort of a gate, I set the parent to an empty object so that I can easily move it. And I add box collider inside the gate.     When I try to rotate it on Y axis, the boxes deforms    I just want to rotate the Y, not deformed it. Here are the object          Is this related to the transformation I created before?  Something that requires to apply the transformation first? like in blender3d?


How to convert the xmltex supporting files to binary file format like (FMT) conversion on LaTeX

I will try to convert the xmltex supporting files like (xmltex.tex, xmltex.xmt, xmltex.cfg, .sty, .cls) to binary file format like (.fmt) format conversion.  I already posted my question with MWE for the following link:   I use the following latex package options like `mylatexformat.sty'' and also try the below mentioned command lines:  latex -ini -jobname="filename" "&latex filename.cls\dump"  etex -initialize -save-size=20000 -stack-size=20000 -jobname="filename" "&latex" mylatexformat.ltx """filename.cls"""   But (.xmt, xmltex.tex, .cfg) files are not supporting this (fmt) file font conversions.  How to acheive the successful FMT transformation on xmltex support files. It's possible to convert those file format (.xmt, .cfg, xmltex.tex) to fmt format. Could you please anyone advice on this.


Show that $G\neq\bigcup_{g\in G}gHg^{-1}$ for any $H\subsetneq G$

I want to show that for some proper subgroup $H\subsetneq G$ ($G$ finite) we always have $$G\neq\bigcup_{g\in G}gHg^{-1}$$ My attempt so far is letting $G$ act on the set $M$ of its subgroups of order $|H|$ by conjugation: $$\begin{matrix}G.M\end{matrix}\to M\\g.H\mapsto H^g$$  The stabilizer $G_H$ obviously then contains $H$, so $G.H$ is not empty and therefor we have that $|G.H|$ is a non trivial divisor of $|G|$. How do I continue from here?


I have come across some shots from other people and they create something like an illusion to me and trick me of the scale of the actual scenery.  For example, this shot by  on Unsplash made me think that this it is miniature; some sort of Meccano, plastic model or a 3D recreation. It looks too perfect and clean!   Proof that it is actually real can be seen when you zoom-in and notice there's a person near the front of the bus, some too fine detail on the roof of the bus stop and some other details.  I have tried to capture pictures in a similar style using a DJI Mavic Pro Platinum drone, tried editing with Photoshop, but I can't give my shots that feeling.  What do you think the camera configuration and settings are? Is this effect entirely made with graphic manipulation? Any hint or advice will be highly appreciated!


I want to create a granite tile design in blender. But I dont know how to get the white dot like pattern on my mesh ( like in the picture attached). Someone please tell me how to acheive this.


Javascript type conversion from String to number

I have a problem where 20 character string converted the JS new NUMBER method.  var x4 = "22222222222222222222"; var x5 = "22222222222222222229"; Number(x4)  parseInt(x5);     //Output 22222222222222220000 22222222222222220000   I was expecting to get the same value as the variable but in number format but I dont know whats wrong here. What is the best way to convert string to number will any number of digits.


Assign to a wide vector copies of a narrow vector

X is n bits long. Y is n*k bits long. I want to assign copies of X to fill Y. As follows: assign Y = { X , X , ... , X } ; I know how to do it with a loop - but is there a quicker alternative ?


\documentclass{article} \begin{document} \begin{equation*} P^*(A) = \begin{cases} 1 & \quad \omega_0 \in A, \\ 0 & \quad \omega_0 \notin A. \end{cases} \end{equation*} \end{document}   When I used the above code to display a piecewise expression, I got the following:    Clearly, the curly brace appeared in the expression is too big, how can I adjust it so the display is more satisfactory? Thanks in advance.  P.S: My preamble:  \usepackage{setspace}  \doublespacing \usepackage[margin = 1.5in]{geometry} \usepackage{float}  \usepackage{graphicx} \usepackage{color}  \usepackage{amsmath}  \usepackage{amsfonts}  \usepackage{amsthm} \usepackage{bm}  \usepackage{framed} \usepackage{verbatim} \usepackage{natbib} %\usepackage[symbol*]{footmisc} \usepackage[stable]{footmisc} \usepackage{mathtools} \usepackage{mathrsfs} \usepackage{amssymb} \usepackage{hyperref}    \newcommand{\eps}{\varepsilon} \newcommand{\rational}{\mathbb{Q}} \newcommand{\real}{\mathbb{R}} \newcommand{\integer}{\mathbb{Z}} \newcommand{\nn}{\mathbb{N}} \newcommand{\complex}{\mathbb{C}} \newcommand{\Ell}{\mathcal{L}} \newcommand{\mean}{\mathbb{E}} \newcommand{\prob}{\mathbb{P}} \newcommand{\dd}{\mathop{}\!\mathrm{d}} \newcommand{\overbar}[1]{\mkern 1.5mu\overline{\mkern-1.5mu#1\mkern1.5mu}\mkern 1.5mu} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator*{\diam}{diam\,} \newcommand{\Riemann}{\mathscr{R}}  \theoremstyle{definition} \newtheorem{defn}{Definition}[section] \newtheorem{defns}{Definitions}[section] \newtheorem{exmp}{Example}[section]  \theoremstyle{plain} \newtheorem{thm}{Theorem}[section] \newtheorem{lem}{Lemma} \newtheorem{prop}{Proposition} \newtheorem*{cor}{Corollary}  \theoremstyle{remark} \newtheorem*{rem}{Remark}


Equivalences of bounded sets definitions

$\newcommand{\diam}{\operatorname{Diam}}$ $\newcommand{\R}{\mathbb{R}}$ Consider: D1: Let $(X,d)$ a metric space, we have that $M \subseteq X$ is bounded if $\diam(M) < \infty$ D2: Let $(X,+,\cdot,0,1,<)$ an ordered field, we have that $M \subseteq X$ is bounded if it has an upper and lower bounds. For $M \subseteq R$. Show that $M$ is bounded as a subset of the ordered field $( \R,>)$ if and only if $M$ is bounded as subset of the metric space $(\R,d)$ where $d(x,y) = |x-y|$


I'm working through . At the end of the "Create a systemd Unit File for uWSGI" in the article they discuss the www-data user.  What is this and why is it important?


How to install pip for python 3 in ubuntu 12.04 LTS

I am trying to install the Pillow module for python 3.3, but for that  I need to install pip. Every time that I install pip it installs for python 2.7, any help?


I would like to place figures in my document in certain subsections. Normally I would achieve this with float using [H]. But this would mean, that the figures are at fixed points in my text and sometimes this just doesn't look good.   I already found this question:   How can I tell LaTeX use subsections as float barriers instead of sections.


I just started to learn mathematical logic. I'm a graduate student. I need a book with relatively more examples. Any recommendation?


I saw the other questions regarding this problem. I am trying to approach it a bit differently.   We can write $g(x)$ as $(D^r+D^{r-1}+D^{r-2}+...+D+1)f=g(x) \implies \frac{(D^{r+1}-1)}{(D-1)}f(x)=g(x) \implies f(x) = (1+D^{r+1}+...)[g(x)-g'(x)]=g(x)-g'(x) \geq 0$.   [$r$ =$deg f(x)$, $f(x)$ is a polynomial, greater or equal to zero for all $x$. ]  Now, $1 \geq g'(x)/g(x) \implies e^x \geq \ln{g(x)}$, which is defined for all $x$. Now, $g(x)$ has to be $>0$ $\forall x$, for that to occur.   Can someone take it from here?


Good resources/tutorials/tips for beginner doing automation?

I've just started automating all the tests our team has (~5000). I'm using Telerik Test Studio for the Silverlight automation. I have some tests written, but I'm quickly realizing that with each test it's becoming harder to maintain. Here are some things I'm wondering:   In Telerik, each test seems to have its own Elements Page, even though they're testing the same Silverlight page. Can I not just reference another test's Elements Page? That would make copy/pasting steps a lot easier since then I wouldn't have to add the elements to each test's Element Page individually. Does automation allow for running tests on different computers? We have some tests that find folders through a SL directory browser dialog, but even though I'm navigating to tests through object name (not by point/click mouse movement) if I run these tests on another computer it won't properly navigate to that directory.  Are there any good books that can help a beginner learn best practices so I don't create 5k automated tests that aren't maintainable?


How to use the Parallel package with proper environment options?

If I use:  \begin{Parallel}[c]{0.47\textwidth}{0.47\textwidth} \ParallelLText{paragraph 1 left} \ParallelRText{paragraph 1 right} \ParallelPar \ParallelLText{paragraph 2 left} \ParallelRText{paragraph 2 right} \ParallelPar \end{Parallel}   I get:  paragraph 1 left          paragraph 1 right paragraph 2 left          paragraph 2 right                     1   If I use:  \begin{Parallel}[p]{\textwidth}{\textwidth} \ParallelLText{paragraph 1 left} \ParallelRText{paragraph 1 right} \ParallelPar \ParallelLText{paragraph 2 left} \ParallelRText{paragraph 2 right} \ParallelPar \end{Parallel}   I get:                      1  paragraph 1 left                     2  paragraph 1 right                     3  paragraph 2 left                     4  paragraph 2 right                     5   What should I use in order to get:                      1  paragraph 1 left paragraph 2 left                     2  paragraph 1 right paragraph 2 right                     3   ? Can this be achieved with parallel? If not, what are the options?  Please let me specify that I'm starting to work on a book (+300 pages) that will have to be entirely in the desired form (even pages in one language and odd pages in another language; all paragraphs will have to be synchronized, e.g. paragraph#1_right will be the translation of paragraph#1_left).


So I'm trying to update the User Information List in SharePoint (hidden list). My User Profile Service and Mysites are all synced correctly with the most up-to-date information. Is there a particular Timer Job that will update the User Information List though?


When I attempt to login to Area 51, with the Stack Exchange OpenID, it gives me the following error:  Unable to log in with your OpenID provider: The openid.return_to parameter () does not match the actual URL () the request was made with.  [I removed parts of the links to keep my private information private.] This has happened to me every time I have tried to login to Area 51 in the last few weeks.


C++ static object declaration in .cpp file

This is my code structure: Flashtraining.h #ifndef Flashtraining_h #define Flashtraining_h  #include "Enhanced_SPIFlash_Marzogh\\SPIFlash.h"  class Flashtraining {    static SPIFlash myflash; //Should it be declared outside private/public? Does it matter?   public:     bool start_new_training();     bool stop_training();     /*Some more methods*/   private:     bool _Check_or_Initialize();                     };  Flashtraining.cpp #include "Flashtraining.h" SPIFlash Flashtraining::myflash;  bool Flashtraining::start_new_training(){ /*Do smth. with myflash object*/ }  bool Flashtraining::stop_training() {   /*Also do smth. with myflash object*/ }  main.cpp #include "Flashtraining.h"  Flashtraining training; //Create object of class Flashtraining  training.start_new_training(); //Ignoring the main funcion, return values etc.  SPIFlash has no constructor and only non-static members. If you need this file too, comment and I will provide it, but I am sure it is not the problem here. My problem: When executing this code, I get C:\Users\--\Flashtraining.cpp.o: In function `Flashtraining::_Check_or_Initialize()':  C:\Users\--\Flashtraining.cpp:265: undefined reference to `SPIFlash::begin(unsigned char, unsigned long)'  C:\Users\--\Flashtraining.cpp:268: undefined reference to `SPIFlash::getJEDECID()'  Note: _Check_or_Initialize() is one of the functions declared in the Flashtraining.cpp file. It is declared just like the other ones I have provided. The functions in SPIFlash are declared non-static and implemented correctly. What I don't understand: Because I use the static keyword, I can just declare an object(myflash of type SPIFlash) in the header file (Flashtraining.h) without initializing it, right? This also prevents redefinitions. Because of the One definition rule in c++, I initialize the variable once in Flashraining.cpp, where it is used. I then should be able to use (.) notation to access non-static members (the functions, like myflash.start_training()), or not? Why is this giving me an undefined reference and how can I fix it? I looked at  post and think that I changed my code accordingly, but it doesn't work. Additional information: This is .ino code, which is based on c++. Everything written in c++ works normally. Using -std=gnu++11.


We have a the presentation ${\rm SL}(2,3)=\langle x,y,z:x^3=y^3=z^2=xyz \rangle$. Can we do the same for SL$(n,\mathbb{Z}_p).$ I have seen the presentation of SL$(n,\mathbb{Z})$ .      How can we give a presentation of SL$(2,\mathbb{Z}_p)?$


Looking for efficient data recovery software

Deleted a folder (just regular old empty trash) on my MacBook Pro internal SSD that I thought I was backed up, turns out it wasn't. I stopped using the computer as to preserve the blocks where the data is written and booted up an old computer to do recovery. I Don't have any experience with data recovery software, wondering if anyone knows any good applications? Preferably that allow me to preview deleted data before I pay for the application (or if there's a free one that I'm overlooking? But I'm not hopeful about that). Lots of things come up on google but it's hard to differentiate one from another in terms of quality.


Checking for null before event dispatching... thread safe?

Something that confuses me, but has never caused any problems... the recommended way to dispatch an event is as follows:  public event EventHandler SomeEvent; ... {     ....     if(SomeEvent!=null)SomeEvent(); }   In a multi-threaded environment, how does this code guarantee that another thread will not alter the invocation list of SomeEvent between the check for null and the invocation of the event?


How do I replace the stem of an outdoor frost-free faucet?

I'm replacing the faucet handle (below). But  I can't figure out how to remove the stem  (in photo above the red outlined area). So I'm thinking I need to remove the stem as well. But I can't see inside to see how to do that.  This  explains what the stem is, but not how it connects to the water source, or how to remove/replace it.  I'm also a little worried that if I get it disconnected I won't be able to reconnect it. (Right now the faucet works, it's just hard to close. If I break the stem, I'll have to leave the water off til a plumber visits!)  Photo taken from above. The water source is at top of photo (wall). Faucet handle is at bottom of photo.


What lightsaber training did Luke Skywalker receive?

Luke's only on-screen lightsaber training was given by Obi-Wan Kenobi during the hyperspace jump to the Alderaan system.  Did Luke receive further lightsaber training prior to the final battle on the Death Star II? If yes, how did he receive these training?  Seeking answers for Disney canon as well as the Legends EU canon.


If I throw a ball at a black hole, will the ball exceed the speed of light when it reaches the event horizon?

The escape velocity of a black hole at the event horizon is the speed of light, this means an object that is dropped from the top of the black hole's gravitational well will reach the speed of light (just like an object dropped from the top of earth's gravitational well will reach 15km/s when it hits earth's surface, ard 15km/s is earth's escape velocity at earth's surface). So what if the ball is thrown towards the ground? In the earth example, it will reach 15.01km/s, and in the black hole example it will reach 300,000.01km/s. Does this mean the speed of light in not a speed limit?


Number of pairs with product less than a given number.

How can we find out the number of positive integer pairs with product less than a specific value. Can someone help me with this.


Credit Card Requirement Free Trial - User Experience

Web based application requires a credit card to signup for a free 30 day trial account for which I have got mixed reviews, because application does not enforce any limit on the usage and companies like AWS already run on the model that requires credit card to signup of free 30 days trial.  What is the right user experience? Is having a credit card a mandatory thing to create a free trial?


Choice of sites while flagging posts as beloning to other SE-site

When flagging a post as off-topic I can choose that "This question belongs on another site in the Stack Exchange Network". From there I can choose one of 5 sites (meta, superuser, tex, dba, sharepoint).  It is not clear to me why you can choose superuser, since one level up you can already flag this question to be better asked at the superuser-site.  But what I am missing most is the ability to choose another site like e.g. math.superuser.com (or other Stack Exchange sites). Are there any plans to broaden the list or is the omission intentional?


PGFplots with fillbetween and standalone class

I am trying to produce a picture showing the mean value theorem for definite integrals. To do this I am using pgfplots with fillbetween. However, when using the standalone class I get a lot of blank space in the produced pdf file that shouldn't be there.  MWE:  \RequirePackage{luatex85} \documentclass{standalone} \usepackage{ifluatex} \ifluatex   \usepackage{fontspec}   \setmainfont{Calibri}   \usepackage{unicode-math}   \setmathfont{Cambria Math} \else   \usepackage[utf8]{inputenc} \fi  \usepackage{pgfplots} \usepgfplotslibrary{fillbetween}  \begin{document} \begin{tikzpicture}[scale=1.5]   \begin{axis}[axis equal image,%     axis lines=middle,%     axis line style=thick,%     clip=false,%     xmin=0,%     xmax=4,%     ymin=0,%     ymax=2.5,%     every axis x label/.style={       at={(ticklabel* cs:1.025)},       anchor=west,     },%     every axis y label/.style={       at={(ticklabel* cs:1.025)},       anchor=south,     },%     xlabel=$x$,%     ylabel=$y$,%     ticks=none,%     axis line style={->}]     \addplot[thick,samples=200,domain=1:1.7436,name path=fEn]       (x,{(x-2)*cos(3*pi*deg(x)/5) + 1});     \addplot[thick,name path=cEn] coordinates {       (1,1.2537) (1.7436,1.2537)};     \addplot+[thick,fill=green!20] fill between [of=fEn and cEn];      \addplot[thick,samples=200,domain=1.7436:2.6975,name path=fTo]       (x,{(x-2)*cos(3*pi*deg(x)/5) + 1});     \addplot[thick,name path=cTo] coordinates {       (1.7436,1.2537) (2.6975,1.2537)};     \addplot+[thick,fill=red!20] fill between [of=fTo and cTo];      \addplot[thick,samples=200,domain=2.6975:3,name path=fTre]       (x,{(x-2)*cos(3*pi*deg(x)/5) + 1});     \addplot[thick,name path=cTre] coordinates {       (2.6975,1.2537) (3,1.2537)};     \addplot+[thick,fill=green!20] fill between [of=fTre and cTre];      \addplot[thick,samples=200,domain=1:3]       (x,{(x-2)*cos(3*pi*deg(x)/5) + 1}) node[near       start,yshift=0.75cm,xshift=-0.125cm]{$y = f(x)$};     \addplot[thick,densely dashed,domain=0:1.2537] (1.7436,1.2537 - x)       node[below]{$c$};     \addplot[thick] coordinates {       (1,1.2537) (3,1.2537)};     \addplot[thick,densely dashed,domain=0:1.309] (1,1.309 - x)       node[below]{$a$};     \addplot[thick,densely dashed,domain=0:1.809] (3,1.809 - x)       node[below]{$b$};   \end{axis} \end{tikzpicture} \end{document}   Any thoughts?


How can I put text over a picture (.jpg, say) in a tex document? I have a graphic in my document as a .jpg:  \begin{figure}[ht!] \centering \includegraphics[scale=.4]{graphic_1.jpg} \caption{The map $\phi_0$ } \end{figure}    and I want to label certain parts of it with some mathematical symbols. I'd prefer to do this without tikz, but if someone has a solution using it, then that would be fine.  Thanks.


Finding positive integer(s) $n$ for which $3^{n-1} + 5^{n-1} | 3^{n} + 5^{n}$: Is my solution correct?

The problem is the following  Find all positive integers $n$ such that $3^{n-1} + 5^{n-1}$ divides $3^{n} + 5^{n}$.  And I attempted as the following: As  $3^{n-1} + 5^{n-1}\ |\ 3^{n} + 5^{n}$, $$3^{n-1} + 5^{n-1}\ |\ 3^{n} + 5^{n} - 5(3^{n-1} + 5^{n-1}) = -2\cdot 3 ^ {n-1}$$ And $$3^{n-1} + 5^{n-1}\ |\ 3^{n} + 5^{n} - 3(3^{n-1} + 5^{n-1}) = 2\cdot 5 ^ {n-1}$$ These expressions say that $$2\cdot 3 ^ {n-1} = p(3^{n-1} + 5^{n-1}) \quad \textrm{for some odd} \  p \in \mathbb{Z}^{+}$$ And $$2\cdot 5 ^ {n-1} = q(3^{n-1} + 5^{n-1}) \quad \textrm{for some odd} \  q \in \mathbb{Z}^{+}$$ By addition, it becomes clear that $q = 2 - p$. Hence, the last expression is equivalent to $2\cdot 5 ^ {n-1} = (2 - p)(3^{n-1} + 5^{n-1})$. Solving for $p$, it is equal to $\frac{2\cdot3^{n-1}}{3^{n-1} + 5^{n-1}}$. Here, $p$ is odd only for $n = 1$, hence it is the only solution. Is this attempt a solution for the problem? And for the effort, Thanks!


What methods exist for taking a European vehicle from the continental countries to Iceland?

Hopefully straightforward; as a European citizen in possession of a full driving license and legal vehicle; how can one take that vehicle (or motorbike) to Iceland?   Assume that any departure point in Europe is cost-effective to reach/use.


I have Ubuntu and Windows 10 installed on 2 different drives. How do I remove Ubuntu?

I found an old SSD and decided to use it for Ubuntu on my desktop where I only had Windows 10. I installed it and everything worked fine (dual booting, that is). Turns out that the reason the SSD was lying around was because it was broken.   So I figured that I would just remove the SSD and proceed with only Windows 10 but when I remove the SSD, I can't boot at all. I get into some sort of grub rescue environment.  As they were on different hard drives, I don't understand how I could mess up the Windows 10 SSD mbr?  Any suggestions for how to get out of this?  tl;dr Ubuntu on one SSD, Windows 10 on one SSD. I want to physically remove the Ubuntu SSD and only run W10. How?


do-release-upgrade disables third party software sources. Easy way to re-enable them?

I recently upgraded my Ubuntu from 19.04 to 20.04. And as always, the first thing that happens is that all third party software sources are disabled.  I'm sure there are good reasons to do that and I don't mind going back in and re-enabling them afterwards. But it is such a trivial and half way mechanical task that I can't imagine that some tool doesn't exist to help user here.    Basically such a tool would check all disabled software sources with a comment like "Disabled by upgrade to.." (the exact wording eludes me) then look at the deb source, go out and check which Ubuntu release is the most recent under the "dist" folder, and enter that name in the Distribution field.  Do anyone know of such a tool?


What are your favorite English language tools?

To prevent myself from asking an obvious, silly question multiple times: What are the English language tools you found most useful?  I found  extremely useful for looking up .   Please, one tool per answer.


Using the relation $\ e^{ix} = \cos(x) + i\sin(x)$ and substituting for $\ x = \pi$, we have the well-known Euler identity, $ e^{i\pi} = -1$. Substitute also for $ x = -\pi $, we have $ e^{-i\pi} = -1$. So we can say $ e^{i\pi} = e^{-i\pi}$ and taking $\ln$ on both sides, $i\pi=-i\pi$. There is clearly something wrong here. Can some help me to figure out what's wrong?  EDIT :  I actually had a confusing output from my calculator while trying to solve the problem :


$\mathbb Z_{p^n}$ is not the direct product of any family of its proper subgroups

I'm trying to solve this question of Hungerford's Algebra book:     $S_3$ is not the direct product of any family of its proper subgroups.   The same is true of $\mathbb Z_{p^n}$.   The first claim is easy: we note that every subgroup of $S_3$ is of order $2$ or $3$ by Lagrange, since its subgroups are of prime order, they are cyclic, then abelian, but $S_3$ is not abelian, contradiction because $S_3$ is not abelian while the direct product of abelian groups has to be abelian.  My problem is with the second claim, I need help.


How to get a set of values from a list so that the order of the set is such that the order in the list is still preserved in the set?

The list in my actual code is too large. Is there a way to get the desired output. An efficient way will be preferred. Here is my code:  import sys def function():     listt=["the","cat","sat","on","the","mat","which","is","on","the","floor"]     print (sorted(set(listt))) function()  Output:['cat', 'floor', 'is', 'mat', 'on', 'sat', 'the', 'which'] Expected Output:["the","cat","sat","on","mat","which","is","floor"]


I am also facing same problem. I have already installed opensuse, fedora17(facing some problems so deleted). But 12.04 is giving me issues. I was able to install 10.04 on my machine by wubi. Later on I have tried all the versions of Ubuntu but unable to get it worked. Please help me I am starving here, I want to use Unity :'(  Or help me installing UNITY on my OPENSUSE12.01.  I tried same copy  on Dell Inspiron by my USB and it's booted in few seconds but my laptop doesn't.  One more thing I would like to mention. My all OS's(except Windows :P) freezes after installtion till the installation of graphics driver of 'nVidia 8200m' by command line.


Did Ariana Dumbledore's portrait dig the tunnel to Hogwarts?

The entertaining but often deliberately inaccurate CinemaSins channel put out this video some time ago:                                  At 5:24, they have this dialogue:     RON: Don't remember this [the tunnel from the Hog's Head Inn to the Room of Requirement] on the Marauder's Map.   NEVILLE: That's because it never existed til now.   JEREMY (V.O.): So... a magical painting of Dumbledore's sister just dug a secret tunnel to Hogwarts.  THAT I am totally down with and have no questions about. [Goes on to ask why they didn't do this in the previous seven movies.]    Do the books clarify this? Did CinemaSins accidentally on purpose leave out the part where the movie clarifies this? Or did Neville actually mean the tunnel was brand new?   Charitably, I'd like to interpret Neville's "now" as "this year or thereabouts" rather than "literally right now".  That would certainly be consistent with Ron never having seen the tunnel on the Marauder's Map.  But I would be interested in hearing if Dumbledore's Army or anyone else had been using the tunnel before this point in the story. It does seem very convenient to the plot that they can just smuggle Harry and company into Hogwarts as soon as they arrive in Hogsmeade.


Why is gradient the direction of steepest ascent?

$$f(x_1,x_2,...x_n):\mathbb{R}^n \rightarrow \mathbb{R}$$ The definition of the gradient is  $$ \frac{\partial f}{\partial x_1}\hat{e}_1 +\  ... +\frac{\partial f}{\partial x_n}\hat{e}_n$$  which is a vector.  Reading this definition makes me consider that each component of the gradient corresponds to the rate of change with respect to my objective function if I go along with the direction $\hat{e}_i$.  But I can't see why this vector (defined by the definition of the gradient) has anything to do with the steepest descent.  Why do I get maximal value again if I move along with the direction of gradient?


Weight Distribution of Binary Hamming Code

How will I be able to apply a hamming code that is a single error correcting code,any non-codeword is distance 1 from a unique codeword to show that the weight distribution of the binary hamming code $H_2(r)$ follows the recurrence relation $\begin{pmatrix} n \\ \omega \end{pmatrix}=A_\omega+(\omega +1)A_{\omega +1}+(n-\omega +1)A_{\omega -1}$, for $\omega \geq 1$ where n is the length of $H_2(r)$?


How to know which word in British English ends with '-ise' or '-ize' (e.g. organise and realize)? I am an editor and this has been a constant matter of confusion for me.


Please instruct me on how to light myself on fire

Luftrausers is a quick, light, nigh-monochrome game of flying around in a configurable plane, shooting enemies, and dying quickly. During the game, there are missions you need to achieve: kill any 10 enemies, kill enemies while firing nonstop, kill specific enemies, score X points (by killing enemies), etc. Something enemy something kill something.  Then there's the current mission I'm on: kill 50 enemies while on fire. How does being on fire work? I usually manage to rack up a few of these every game, but I haven't figured out what "being on fire" means. I've tried getting to a low amount of health and then killing enemies, but that doesn't work — or at least not consistently.  So how do I set myself on fire? How long do I remain on fire, and is there something I'm doing that's putting me out?


Installing Ubuntu aside OS X and Windows

My current config is this- I have OS X Mavericks 10.9.2 and Windows 8.1 installed via Boot Camp. I'd like to install Ubuntu too on my mac- I figured I could do it with rEFInd? Or does the Boot Camp not allow this sort of stuff? How should I proceed with Installation?  Thanks!


Is it possible to include one CSS file in another?


Execution of AfterInsert caused by: System.StringException: Invalid id: () - where have I gone wrong?

We've had a community deployment and my brain is fried and I just whipped up a quick class that is throwing the below error. What have I done wrong here?     Error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, MSI_UserTrigger:   execution of AfterInsert caused by: System.StringException: Invalid   id: () : [] () : []: ()   What I am trying to accomplish is:   When a new user is created and is active, if they are linked to a ContactId and part of a specific profile (by name), add their ContactId to a Set<ID> Then loop through contacts where the Id is in the set, and update the Community_User__c field to TRUE      Trigger:   trigger MSI_UserTrigger on User (after insert) {       if(Trigger.isAfter){          if(Trigger.isInsert){              MSIUserTriggerHandler.executeAfterInsert(Trigger.new);          }      } }      Class:   public with sharing class MSIUserTriggerHandler {     private static final String COMMUNITY_PROFILE = 'Community Knowledge User';     private MSIUserTriggerHandler() {}      public static void executeAfterInsert(List<User> newList){         setCreatedCommunityUsers(newList);     }      private static void setCreatedCommunityUsers(List<User> newList){         List<User> usersWithContacts = new List<User>();         List<Contact> contactsToUpdate = new List<Contact>();         Set<ID> contactIds = new Set<ID>();          for(User u: newList){             if(u.ContactId == null && u.ContactId == ''){                 continue;             }             if((u.ContactId != null && u.ContactId != '') && u.Profile.Name == COMMUNITY_PROFILE && u.isActive == true){                 contactIds.add(u.ContactId);             }         }          for(Contact c : [Select Id,Name,Community_User_Created__c from Contact where Id in :contactIds]){             if(!c.Community_User_Created__c){                 c.Community_User_Created__c = true;                 contactsToUpdate.add(c);             }         }         update contactsToUpdate;     } }   Am I not adding the ID correctly to the Set<ID>, or am I querying wrong in my for(Contacts) loop?


I keep getting this thing where it says    no matter what I do. So I thought I'd log out. But I can't.    What should I do?


Proving Convexity of Multivariate Function using Conditional Univariate Convexity

I have a function $f:\mathbb{R}^p\rightarrow\mathbb{R}$. For the purposes of illustration let's say that $p=2$. I want to prove that $f$ is convex. Suppose I can show that both  $f(\alpha x_1 + (1-\alpha)x_2,y)\leq\alpha f(x_1,y)+(1-\alpha)f(x_2,y) \quad \forall y \in \mathbb{R}$  and  $f(x,\alpha y_1 + (1-\alpha)y_2)\leq\alpha f(x,y_1)+(1-\alpha)f(x,y_2) \quad \forall x \in \mathbb{R}$  is true, i.e. I can show that the resulting univariate functions obtained by holding all but one of the arguments fixed is convex.  Is this sufficient to prove that $f$ is convex in $x$ and $y$? Namely  $f(\alpha x_1 + (1-\alpha)x_2,\alpha y_1 + (1-\alpha)y_2)\leq \alpha f(x_1,y_1) + (1-\alpha)f(x_2,y_2)$.  I am looking for a proof or counter example.   Merely applying each conditional inequality sequentially gives $f(\alpha x_1 + (1-\alpha)x_2,\alpha y_1 + (1-\alpha)y_2)\leq \alpha^2 f(x_1,y_1) + \alpha (1-\alpha) f(x_1,y_2) + \alpha (1-\alpha) f(x_2,y_1) + (1-\alpha)^2 f(x_2,y_2)$  If $f$ is a convex function, this implies the first two univariate inequalities of this post. This post is asking if the reverse direction holds.


I cant find the solution for a regex that looks for a pattern but only in a specific range of the string  I want to find $ $ but only if it is in the 5-7 position of the string and it doesnt matter which character is between those two  Example  xxxx$x$xxxxx would match xx$x$xxxxxxx would not


I do not know where to start, any hints are welcome.


$1988x^2  + bx +8991$ and  $8991x^2 +bx + 1988$  have a common root, what are the possible values of b?  I tried getting solutions using the quadratic formula and interchanged the $\pm$ to get the values of b but it seemed looked like i was bashing it and the numbers were getting too high. What is the proper approach to this problem?


Mounting a squashfs filesystem in read-write

I have a Clonezilla installation on a USB stick and I'd like to make some modifications to the operating system. Specifically, I'd like to insert a runnable script into /usr/sbin to make it easy to run my own backup command to make backups less painful.   The main filesystem lives under /live/filesystem.squashfs on the USB FAT-32 partition.   How can I mount this read/write on my Linux machine in order to be able to add/remove/change files? I'm running an Ubuntu 12.04 derivative.


What if l run "sudo apt uninstall sudo"?

I did not run this command in terminal,but what will happen if i did?i'm just curious.And if something bad happens,how can we solve this?


Prove that $2^n +1$  in never a perfect cube  I've been thinking about this problem, but I don't know how to do it. I know that if $m^3=2^n+1$, then  $m$ should be an odd number, but I 'm not able to get to a contradiction.


I am getting this error when I try to boot my system

dev/sda5:%20clean,1538857/37347328%20files,%2013595168/149369856%20blocks  I'm getting that error when I boot my system.


How to Remove Annoying Magazine/Book Entries from Ubuntu Software Center

Whenever I try to search the Ubuntu Software Center for apps, my results list is flooded with magazine and book entries. Is it possible to remove these annoying entries?  Thanks!


"Select driver to be installed" issue while installing Windows 7 from USB

The start of this question is copied from . And stems from the first comment underneath.     Just now while installing Windows 7 from a bootable USB which wasn't   successfully because of some bizarre Select driver to be installed.   issue, before the setup had even started, after which I thought of   connecting my passport drive which has Ubuntu on it to check what was   wrong, which too didn't boot because of (no the Ubuntu wasn't   corrupted I checked it elsewhere, worked fine).   The main question:  I have tried all the driver that were at my disposal, no use. Any solutions?  Bonus question:  What is the technical reason behind it? Detailed would be much appreciated


How to convert a number to words in MS Excel Android app automatically?

Excel macros are unsupported in Android and there is also no SpellNum function. I want a function which can convert a number to words. Also, I am unable to find any relevant ways of doing so in the Google Sheets Android app. Is there any way we can achieve this?


Ways of merging two incomparable sorted lists of elements keeping their relative ordering

Suppose that, for a real application, I have ended up with a sorted list A = {$a_1, a_2, ..., a_{|A|}$} of elements of a certain kind (say, Type-A), and another sorted list B = {$b_1, b_2, ..., b_{|B|}$} of elements of a different kind (Type-B), such that Type-A elements are only comparable with Type-A elements, and likewise for Type-B.  At this point I seek to count the following: in how many ways can I merge both lists together, in such a way that the relative ordering of Type-A and Type-B elements, respectively, is preserved? (i.e. that if $P_M(x)$ represents the position of an element of A or B in the merged list, then $P_M(a_i)<P_M(a_j)$ and $P_M(b_i)<P_M(b_j)$ for all $i<j$)  I've tried to figure this out constructively by starting with an empty merged list and inserting elements of A or B one at a time, counting in how many ways each insertion can be done, but since this depends on the placement of previous elements of the same type, I've had little luck so far. I also tried explicitly counting all possibilities for different (small) lengths of A and B, but I've been unable to extract any potential general principle in this way.


alert immediately after text field get a value - javascript

I have a text field which is getting values from some process. I mean the user is not giving any input to this text field directly! Now my problem is that I want the value of that text field immediately after it changes. I tried   oninput and onchange   Here is the  of what I have tried. Both events want to focus of that area please tell me is there any way to achieve this


Homogenization, what it is in inequalities and how to utilize it to its fullest.

I have just learnt about homogenization, however I don't really understand it and I can't really utilize it ( this is where I learnt about it). Could you please explain to me how to use it optimally? Moreover I found a question on IMO 2020, which I believe can be solved using homogenization. It goes as follows: Let the real numbers $a, b, c, d$ be such that $a\ge b\ge c \ge d >0$ and $a+b+c+d=1$. Prove that: $(a+2b+3c+4d)a^ab^bc^cd^d<1$ I attempted to solve it by saying that RHS is equal to $(a+b+c+d)^a$, but then I realized that this doesn't help and it doesn't homogenize the inequality either. Then I tried using AM-GM on LHS and getting something which can be homogenized, however I did not succeed there either. Could you please explain to me how to use homogenization optimally and how this question could be solved using it?


Rules of thumb for minimum sample size for multiple regression

Within the context of a research proposal in the social sciences, I was asked the following question:  I have always gone by 100 + m (where m is the number of predictors) when determining minimum sample size for multiple regression. Is this appropriate?  I get similar questions a lot, often with different rules of thumb. I've also read such rules of thumb quite a lot in various textbooks. I sometimes wonder whether popularity of a rule in terms of citations is based on how low the standard is set. However, I'm also aware of the value of good heuristics in simplifying decision making. Questions:  What is the utility of simple rules of thumb for minimum sample sizes within the context of applied researchers designing research studies? Would you suggest an alternative rule of thumb for minimum sample size for multiple regression? Alternatively, what alternative strategies would you suggest for determining minimum sample size for multiple regression? In particular, it would be good if value is assigned to the degree to which any strategy can readily be applied by a non-statistician.


Upgrade Desktop form 14.04 LTS "No new release found"

I've verified that "Notify me of new Ubuntu version" is set to "For long-term support versions" in Software & Updates. Yet when I run do-release-upgrade I get "No new release found." Please help.


Desktop not showing well using vncserver on ubuntu 15.10

Currently using ubuntu 15.10 on azure and installed the gnome and vnc4server latest version on ubuntu. Please find log file below:  Current VNC client screen:    $ cat .vnc/myhost1\:1.log    --cut-- VNCSConnST:  Server default pixel format depth 16 (16bpp) little-endian rgb565 VNCSConnST:  Client pixel format depth 8 (8bpp) colour-map Window manager warning: Invalid WM_TRANSIENT_FOR window 0x20000c specified for    0x20000b (I        nitialization error). Error org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name    'org.gnome.ze        itgeist.Engine': no such name amdxdg-su: no graphical method available for invoking '/usr/bin/amdcccle' as 'root'  $ cat .vnc/xstartup unset SESSION_MANAGER  [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources  vncconfig -iconic &  gnome-panel & gnome-settings-daemon & metacity & nautilus -n & gnome-terminal &   How to get 24bit color with wide screen (Now I getting square screen in vnc client)


Replace new line + 4x space to new line in stdout

I need join 2 lines into one in stdout - replace new line AND 4x space with one space but new line without space don't touch  tcpdump -vvv ... -l | xyz   this is output:  2014-06-06 AAA     BBB 2014-06-06 CCC     DDD   but I need:   2014-06-06 AAA BBB 2014-06-06 CCC DDD


Formula to calculate beta matrix in multivariate analysis

I have to implement a multivariate analysis on  $n$ random variables with a sample of $m$ data points. I would like to get a matrix with the $\beta$ (as in $n$ $\beta$ vectors put together).   Is there an analytical formula for that or do I have to calculate each vector individually and put them back together ?  Also is there a formula that would give me directly a vector of the estimation error for each variable?


Is it possible to drive a capacitive touch screen work as a touch simulator?

I want to simulate a finger touch/move/etc. on capactive touch screen. Obviously using a robot arm and stylus pen is a solution, but it was expansive and the structure was too complex. It would be elegant if we can lay something (another capactive touch screen) on the original screen and drive it to simulate a finger.  I learned that a capactive touch screen is somewhat a row/column selection capacity matrix. So is it possible to make a driver system to activite certain areas in the screen and make it recognized as a finger touch?   want to simulate a static touch area, but I want a CONTROLLABLE/PROGRAMMABLE  activition of ANY area in the screen.


I was recently looking at my network profile, and one of my PPCG questions, , was listed as 5 votes.  However, when I clicked the link, here is the result:       Simple math says that 9 - 3 = 6, 6 =/= 5. Don't tell me this is caching, because the question was last upvoted on May 27.


Prove that $\int_{0}^{\pi /2} \sin(\sin(x))\,\mathrm dx \le 1$  If a function $f$ is Riemann integrable on $[a,b]$, $f$ is bounded on $[a,b]$. If I show $x \mapsto \sin(\sin(x))$ is Riemann integrable then I would know that $f$ is bounded. I can not write $\int \sin(\sin(x)) \mathrm dx$ as a function so, what would I do here?


I generally have an doubt about QGIS. Is it possible to Trace the feature in QGIS?  As in the case like ArcGIS for Desktop which has a tool called "Trace" in its Editor Toolbar? If yes, how we can do  it?


Boostrap/CSS Always keep content perfectly centred on page

I've been try to make my content stay centred at all time. I have the width centred with: text-aligned, but I can't figure out how to vertically centre my content. Here is the code for the element:  HTML:

HELLOWORLD

CREATED BY JOHN DOE
     <button class="btn">Signup</button>
   CSS:   .content {   text-align: centre; }  .content h1{   color: white;   font-family: NoveBold;   font-size: 150px;   line-height:94% }  .content p{   color: white;   font-family: NoveLight;   font-size: 30px; }  .content img{ }  .content btn { }   Does anyone know a fix on how to automatically vertically align this content so its centred on the page?


As a Syrian, will I need a transit visa for Stockholm Arlanda airport?

I am a Syrian citizen. In a month’s time I am going to China, transitioning in Istanbul from Beirut.  My return ticket is from China to Istanbul, transitioning in Stockholm Arlanda.  Will I need a transit visa for Stockholm?


localization of man pages on Linux (Ubuntu)

Is there an option to output a manual page in a different language? I don't want to change the computer language completely, but only specific manual pages. For example  $ man -English man Man is a manual program … $ man -Russian man Инструцтия для Unix, BSD и Linux. …


As shown from figure my thesis title. I want to increase or decrease the size to adjust the title in two or three rows. I have tried by putting \Huge, \Large, \tiny and many more command but no change occurs. please give me any good suggestion? The tex file also sent.  \begin{document}  \title{\vspace{-2in} \textbf{Development of a Pulsed Laser Deposition System and the Growth of Fluoride Thin Film}}  \author{ By\\  \Large \vspace{-0.1in}\textbf{Maisum Ali}\\ \small \vspace{+0.4in}\textbf{(PPHF13E020)}\\ \vspace{-0.4cm}\textsc{A thesis submitted in the partial fulfillment} \\ \vspace{-0.4cm}\textsc{of the requirement for the degree of}\\ \vspace{-0.4cm}\textsc{Master of Philosophy}\\ \vspace{+0.3in}\textsc{in Physics.}\\ Supervised by\\ \vspace{+0.3in}\textbf{Dr. Muhammad Anwar-ul-Haq}\\ \vspace{+0.3in}\includegraphics[scale=0.67]{UoSlogo}\\ \vspace{-0.4cm}\textsc{Department of Physics}\\ \vspace{-0.4cm}\textsc{University of Sargodha}\\ \vspace{-0.4cm}\textsc{Sargodha, Pakistan} } \date{\textbf{2016}}    \maketitle


Why are FM radio waves less susuceptible to interference than AM?

When studying modulation of radio waves (or of most electromagnetic waves for that matter) I came across that question. Why are FM waves less susceptible to interference than AM waves? I know that in FM waves the frequency has been modulated to carry the signal by superimposing the signal wave to the carrier wave and for AM the amplitude has been varied by a similar process however what I don't understand is why FM radio waves are less susceptible to interference. Is it because when two waves interfere it is easier to change the amplitude as compared to the frequency, if so why? I can't think of any proper explanations so any help would be appreciated.  EDIT: This question has been marked as a duplicate however I don't understand the solutions from the other question. Also I fear that asking for clarification on that question will not gain the attention necessary as it is from 2 years ago.


How do I migrate default home flexi page assignment from one organization to another using ANT Migration Tool?

I have FlexiPage Home_Page_Default.flexipage assigned as Default Home Lightning Page for all profiles in one sandbox. I need to migrate it to another sandbox and assign as Default Home Lightning Page for all profiles in the destination sandbox.   I am able to retrieve and deploy that flexipage but looks like I am not able to assign it automatically as Default Home Lightning Page for all profiles in the destination sandbox using Force.com ANT Migration Tool or changeset.  Is that possible to migrate default home flexi page assignment from one organization to another using ANT Migration Tool or changeset?  If this is possible then how?


Why does Gaussian elimination not preserve similarity of a matrix?

I am trying to understand reduction of an unsymmetric real square matrix to Hessenberg form from Numerical Recipes Vol. 3.  In it, the author states that one does not use Gaussian elimination for reducing to Hessenberg form because the Gaussian elimination does not preserve similarity and hence ends up changing the eigenvalues of the matrix, which is undesirable.  Why does Gaussian elimination not preserve similarity?   Also, what conditions decide whether a particular matrix transformation preserves similarity?  Heres a  to where I found it. In case you cant view that, it's on page 594 of Numerical Recipes in C++ (Volume 3).


If $W_1$ and $W_2$ are subspaces of a finite dimensional vector space $V$, then $$(W_1\cap W_2)^{0}=W_1^0+W_2^0$$.   Attempt Suppose $f\in W_1^0+W_2^0$. Then $f=f_1+f_2\in W_1^0+W_2^0$ ,where $f_1\in W_1$ and $f_2\in W_2^0.$ Now for $z\in (W_1\cap W_2)$, $f(z)=(f_1+f_2)(z)=f_1(z)+f_2(z)=0+0=0$. Therefore, $f\in (W_1\cap W_2)^0$. Thus $W_1^0+W_2^0\subseteq (W_1\cap W_2)^0$.  How to prove this part $(W_1\cap W_2)^0\subseteq W_1^0+W_2^0$. Let $f\in (W_1\cap W_2)^0$ then $f(z)=0$ for $z\in (W_1\cap W_2)$. How to proceed next? Any hint. Thanks in advance.


I am working on a Project in which the I am using vectors since the size of array is unknown initially. Does using arrays instead of vectors reduce the run time of code?If Yes, Then How can i initialize/declare the array of unknown size i.e. Size of array is variable(based on input)? "OR" Is it better to use vectors only?  Note :- I want to know Which better reduces the Execution time of Program.


Images uploaded to imgur are showing broken image icons with a link containing the image description (which is usually just the generic "enter image description here"). When I click on the link I get a "Bad gateway" error at imgur.com. Is there a problem at Imgur?  Maybe the problem is resolving itself? As I was writing this question I uploaded the image below, and it first showed as a broken image, but it recovered while I was writing. But if I go to other questions I still see broken images, e.g. .


where are packeges from Ubuntu Software Center downloaded to?

the location of the downloaded/installed programs and packages from software Center?


Emails from a VPS server usually go to spam folder?

I found that the emails sent from my VPS server usually go to the spam folder in popular email providers such as hotmail or gmail.  Is it because the VPS IP has been marked as a spam server? (Other account using this VPS IP have/had been sending spam emails)  Any solution for this kind of situation?


Acquiring drive names (as opposed to drive letters) in Java

On my Windows machine, my main hard drive has the letter C: and the name "Local disk".   To list the drive letters in Java on Windows, the File object has the static listRoots() method. But I can't find a way to acquire the drive names (as opposed to the drive letters) on Windows.  Has anyone tried this before?


How can I replace Line Breaks within a string in C#?


Can modern power supplies use North American 240V (hot-hot-ground)?

Simple question: Most power supplies are auto-sensing between 110V/120V and 220V/240V. This begs the question, can they use 240V in North America i.e. connected to both hots (red and black)?


How to show that $ \sum_{n = 0}^{\infty} \frac {1}{n!} = e$?

How to show that $\sum\limits_{n = 0}^{\infty} \frac {1}{n!} = e$ where $e = \lim\limits_{n\to\infty} \left({1 + \frac 1 n}\right)^n$?   I'm guessing  this can be done using the Squeeze Theorem by applying the AM-GM inequality. But I can only get the lower bound.   If $S_n$ is the $n$th partial sum of our series then,   $$ \left({1 + \frac 1 n}\right)^n = 1 + n\cdot\frac{1}{n} + \frac{n(n - 1)}{2}\cdot \frac{1}{n^2} + \cdots + \frac{n(n - 1)\ldots(n - (n -1))}{n!} \cdot \frac{1}{n^n} $$  $$ \le 1 + \frac{1}{2!} + \cdots + \frac{1}{n!} =S_n $$  How can I show that $S_n \le $ a subsequence of $\left({1 + \frac 1 n}\right)^n$ or any sequence that converges to $e$?


Javascript code does not work after rendering partial

<% if @questions_counter == 2 %>    <% if @finish == 0 %>     $("#initial-question-frame").fadeOut('fast');     $("#next-question-frame").html("<%= escape_javascript(render(:partial => "question", :locals => {:question => @question, :finish_btn => @finish_btn })) %>").fadeIn();   <% else %>     $("#next-question-frame").html("<%= escape_javascript(render(:partial => "grade", :locals => {:correct_answers => @correct_answers, :grade => @grade, :total_questions => @total_questions })) %>").fadeIn();   <% end %> <% else %>    <% if @finish == 0 %>     $("#next-question-frame").html("<%= escape_javascript(render(:partial => "question", :locals => {:question => @question, :finish_btn => @finish_btn })) %>").fadeIn();   <% else %>     $("#next-question-frame").html("<%= escape_javascript(render(:partial => "grade", :locals => {:correct_answers => @correct_answers, :grade => @grade, :total_questions => @total_questions })) %>").fadeIn();   <% end %> <% end %>  $(document).ready(function(){     $(":checkbox").on('change',function() {       var that = this;        if (!$(this).parent().hasClass("remember-label")){         $(this).parent().css("background-color", function() {             return that.checked ? "#C0E9F7" : "";         });       }      });      $("input[type=radio]").on('change',function() {       $(this).parents().eq(1).siblings().css("backgroundColor","");       $(this).parents().eq(1).css("backgroundColor","#C0E9F7");      });  });   Under normal circumstances the javascript code if the page is reloaded properly it works. If its like this though it does not work. When i click on label which wraps the inputs and it has correct for attribute, nothing happens not even the checkbox/radio button gets checked.  <label for="choice_<%= choice.id %>">             <%= radio_button_tag("choice","#{choice.id}",false,class:"radio big-radio") %>             <% if choice.image? %>               <%= image_tag rewrite_url(choice.image_url(:resized)), class:"choice-image" %>             <% else %>               <%= choice.description %>             <% end %>            </label>


Proof that an injection between sets in one direction implies existence of a surjection in the opposite direction - cardinality

It seems to me that proving this requires invoking the axiom of choice, but I'm not entirely sure. Prove: If there is an injection $\mathit{p :D_1 \hookrightarrow D_2}$, then $\exists$ a surjection $\mathit{q : D_2 \twoheadrightarrow D_1}$, where $\mathit{q \cdot p = id_{D_1}}$


I have this very simple code. I am trying to figure out how I can simultaneously alter the object reference in the array with the object reference that was first placed into the array. I want to know how to bind the two references/values.  In JavaScript, which is very similar to Java in terms of passing by value, the best we probably can do is to use Object.observe() like so:   but with Java, I wonder if there is a good way to do this without writing your own library?   public class ArrayRefVal {      public static void main(String[] args) {         ArrayList<Object> al = new ArrayList<Object>();         Object s = new Object();         al.add(s);         s = null;         System.out.println(al.get(0));     } }   likewise:  public class ArrayRefVal {      public static void main(String[] args) {         ArrayList<Object> al = new ArrayList<Object>();         Object s = new Object();         al.add(s);         al.set(0, null);         System.out.println(s);     } }   turns out JavaScript has the same behavior as Java on this one. How can I somehow bind the element in the array with the object s, such that when I change the element in the array it changes the original object?  Did I mention this already? I want to know how to bind the two references/values.


I am running a Linux instance on ec2, snap sorting of image is disabled.  While trying to un-install open-jdk from the system. I stupidly run the command  sudo apt-get remove open*   It started removing many packages, so I stopped the process by Ctrl+C.  I did it twice:   sudo apt-get remove open* sudo apt-get remove openjdk*   I stopped the process (Ctrl+C) in between for both of them.  Now I see that my other application are not working, because of the packages removed.  Please advice, how can I go back to the state before apt-get remove.  Thanks in advance.


Property of a continuous function with $f(0)=f(2)$

Suppose that $f$ is a continuous function on $[0,2]$ such that $f(0)=f(2)$.We have to show that there is a real number $c$ in the interval $[1,2]$, such that $f(c)=f(c-1)$.  I am completely lost on this question. I have tried fiddling with Rolles theorem and the Mean Value Theorem but it hasn't worked.


Name for categorical product inside a monoid

If a monoid is a category with a single object, is there a "monoid-theoretical" concept that the categorical product translates to? As an analogue, in a poset the product translates to the notion of meet (and the coproduct to its dual, the join).  Just by unwinding the definition one can see that this boils down to the existence of two monoid elements $p_1$ and $p_2$ such that for every $x$ and $y$ in the monoid there's a unique element $\langle x,y \rangle$ that factors as $x = p_1\langle x,y \rangle$ and $y = p_2\langle x,y \rangle$; the question is whether the concept is a known and/or useful one.  Incidentally, if the monoid in question is a group then the existence of a product makes the whole thing collapse into the trivial group; this might or not hint that the concept I'm looking for is "too boring" to have a name. In fact it suffices for one of the projections to be right cancellable, or for the pair $\langle x,x\rangle$ to be left cancellable for some $x$, to make the whole thing collapse.


Was the homing beacon ever removed from the Falcon?

In the novelization of Star Wars: The Force Awakens Unkar Plutt runs into Rey at Maz's place due to a covert Imperial Homing Beacon, which he says is old technology.   Is this beacon the same one that Tarkin put on there those many years before, or was a new one added in between the events of A New Hope and The Force Awakens?


How do I prove that:  $$\sin(1)+\sin(2)+\cdots+\sin(n)=\frac{\sin\left(\frac{n+1}2\right)\sin\left(\frac n2\right)}{\sin\left(\frac12\right)}?$$  I have tried to to use the formula $\sin(2x)=2\sin(x)\cos(x)$ but without any success.


Consider the line $a+bt$ where $a,b>0$. Let $B(t)$ be Brownian motion and let $\tau=\inf\{t>0:B(t)=a+bt\}$ be the first hitting time of that line, with the understanding that $\tau=\infty$ if the line is never hit. I want to compute the probability that Brownian motion hits that line, i.e. $P(\tau<\infty)$.  There are two steps in my work that I am not confident in.  Define the process $X(t)=B(t)-bt$ and let $T_a=\inf\{t>0:X(t)=a\}$, again with $T_a=\infty$ if $X(t)$ does not hit $a$. Then $\tau$ and $T_a$ have the same distribution (unsure about this) so we may instead calculate $P(T_a<\infty)$.  Let $\tilde{a}>0$ and define $T_{a,-\tilde{a}}=\inf\{t>0:X(t)=a \text{ or } X(t)=-\tilde{a}\}$ with $T_{a,-\tilde{a}}=\infty$ if $\{a,-\tilde{a}\}$ is never hit. The process $e^{2bX(t)}$ is a martingale and Doob's Optional Stopping theorem gives  $ \begin{align*} E(e^{2bX(T_{a,-\tilde{a}})})&=1, \\ e^{2ba}P(X(T_{a,-\tilde{a}})=a)+e^{-2b\tilde{a}}P(X(T_{a,b})=-\tilde{a})&=1. \end{align*} $  Letting $\tilde{a}\to\infty$,  $\begin{align*} e^{2ba}\lim_{\tilde{a}\to\infty}P(X(T_{a,-\tilde{a}})=a)&=1, \\ \lim_{\tilde{a}\to\infty}P(X(T_{a,-\tilde{a}})=a)&=e^{-2ba}, \\ P(T_a<\infty)&=e^{-2ba}. \end{align*} $  The last step where I say $\lim_{\tilde{a}\to\infty}P(X(T_{a,-\tilde{a}})=a)=P(T_a<\infty)$ I am also unsure about.


I don't know the correct answer how this reduction should've be done. Should I simply put λfx.fx in a place of m and λzy.zzy in a place of n?  (λmnfx.mf(nfx) λfx.fx λzy.zzy)


Install Specific Version of Ruby with `apt-get install ruby-full ruby-dev`

When I execute apt-get install ruby-full ruby-dev I am getting ruby 2.3. I want ruby 1.9.3.  How do I get it to install ruby 1.9.3?  I'm using Ubuntu 16.0.4 Xenial.


I am using this IC in boost converter configuration :   It steps up the voltage from 16.5V to 23V.   It drives a load current of 270mA.  I need to calculate the input current of the converter.   I understand that output power/input power is efficiency.   Since I know the output power, can I take the efficiency value from the graph 21 of the attached datasheet (86.8% approx - obtained from fig 21 graph) and find the input power?   With the input power, and since I know the input voltage, I can calculate the input current.   Is this the right way?   And I want to check if all the components at the output of the IC are properly rated.   Which parameters and components should I check and how to check?    Sorry for the poor image quality. The two transistors are taken from the SWE pin.


There's an old play on words that goes like so:     Grammar: The difference between helping your uncle Jack off a horse, and helping your uncle jack off a horse.    I've been told that it should instead be:     Grammar: The difference between helping your uncle, Jack, off a horse and helping your uncle jack off a horse.    Is either of these correct? Why?


Is the standard deviation always strictly less than the range?

Just been playing around with standard deviation and it seems it is always less than the range. Is this true in general, and if so, how could we prove it?  I do not really understand the answer to the duplicate question, and was looking for an answer that utilised the standard deviation formula.


8-ball pool: can you call an object and the eight-ball in the same shot?

In playing 8-ball pool, if you have only your final object ball remaining, can you call the object ball and the 8-ball at the same time, as long as the object ball is pocketed first, and win the game?


What could cause askubuntu to be displayed wrongly?

On my main machine, I installed some fonts manually, by copying them to /usr/local/share/fonts/ amd then running sudo fc-cache -fv as sudgested in  answer. Now some askubuntu sites look like this:    and I cannot see the posts I write. Are the two events related? Or, how can I arrive at the bottom of this? Using another Firefox profile on the same machine, does give me the same problem.Using chrome however does not.    I have tried clearing the cache in the browser. I also reinstalled fonts by running:  sudo apt install --reinstall $(dpkg -S /usr/share/fonts/truetype | cut -sd: -f1 | tr -d ,)   as suggested in an answer to  question.


Speed optimization on WP site, Remove query strings from static resources

I am using GTMetrix to test the speed of one of my sites. The report says that I should 'Remove query strings from static resources'  Resources with a "?" in the URL are not cached by some proxy caching servers. Remove the query string and encode the parameters into the URL for the following resources...  How can I do that and is it recommended?


How to prove A→B is equivalent to ¬B→¬A?

A→B is equivalent to ¬B→¬A This comes from a member called 6005 as an answer to my question:  Any proof or reference for this rule ?


Differential euqation for a pendulum: $ {d^2\alpha \over dt^2} + {g \over L} \cdot \alpha = 0 $

The differential equation $$ {d^2\alpha \over dt^2} + {g \over L} \cdot \alpha = 0 $$  describes a 1-dimensional mathematical pendulum, where $\alpha $ is the angle, $ g = 9.82 $, and $ L = 0.2 $ is the lentgh of the string. What is the position of the pendulum after 1 second if the velocity at time equals zero is $ 0 $ m/s and the angle at time equals zero is $ {\pi \over 60} $ radians.  To my understanding this is a homogenous equation, ergo  $$ y'' + Cy = 0$$  And with the help of the characteristic equation I get the complex roots $ Ci \, $ and $ -Ci $.  This is a farily simple differential equation, but I have a feeling my calculations so far are wrong (mainly because I didn't expect to see complex roots for this equation).


NullPointerException when reading from Database

I am building a contacts app and have created a database for it. Each time I run it, it shows the exception below.   Sample of logcat error:  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.util.ArrayList.size()' on a null object reference         at com.example.joey.sqlite.MainActivity.onResume(MainActivity.java:48)         at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1257)         at android.app.Activity.performResume(Activity.java:6076)         at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3039)         at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3081)          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2447)          at android.app.ActivityThread.access$800(ActivityThread.java:156)          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1351)          at android.os.Handler.dispatchMessage(Handler.java:102)          at android.os.Looper.loop(Looper.java:211)          at android.app.ActivityThread.main(ActivityThread.java:5389)          at java.lang.reflect.Method.invoke(Native Method)          at java.lang.reflect.Method.invoke(Method.java:372)          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020)          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)    How can I resolve it?  The error is reported to be in the for loop:  @Override protected void onResume() {      DBHelper dbHelper = new DBHelper(this);      namesList = new ArrayList<String>();     for (int i=0; i< dbHelper.getAllContacts().size();i++){         namesList.add(dbHelper.getAllContacts().get(i).getName());     }      adapter = new ArrayAdapter(getApplicationContext(),android.R.layout.simple_list_item_1,namesList);      list.setAdapter(adapter);     super.onResume(); }   Sample For Database Read Method:  public ArrayList<Contact> getAllContacts() {     SQLiteDatabase db = this.getReadableDatabase();     ArrayList<Contact> contactArrayList = new ArrayList<Contact>();      Cursor cur = db.rawQuery("select * from " + TABLE,null);     cur.moveToFirst();     while (cur.isAfterLast() == false) {         try {             Contact contact_new =  new Contact();             contact_new.setName(cur.getString(cur.getColumnIndex(NAME)));             contact_new.setEmail(cur.getString(cur.getColumnIndex(EMAIL)));             contact_new.setPhone(cur.getString(cur.getColumnIndex(PHONE)));              contactArrayList.add(contact_new);             cur.moveToNext();              return contactArrayList;          } catch (Exception ex) {             ex.printStackTrace();             return null;         }     }     return null; }


Proving $R-S$ contains a prime ideal when $S$ is a multiplicative set

I'm mainly trying to prove that      If $0\not \in S\subseteq R$ is a multiplicative subset of a   commutative ring $R$ with identity. Then $R-S$ contains a prime ideal.   Now, by using Zorn's lemma, one can show that $R-S$ contains a maximal ideal I. In fact, I is a prime ideal as well, so we need to show this.To do that, I assumed the opposite, i.e $\exists a,b \in R$ s.t $ab\in I$, but $a,b \not \in I$. Then looked each case. However, I stuck when $a,b \in R-[S\cup I]$. The following is what I've done for this case;  Proof:  In this case, our assumptions are $a,b\in R-[S\cup I]$ and $I + (a) = J$, where $J$ is an ideal in $R$ and $J \cap S \not = \emptyset$.   These imply that; $S^{-1}(I + (a)) = S^{-1} J$, but since $J \cap S \not = \emptyset$, by a theorem that we proved in the class, $S^{-1} J = S^{-1}R$.Therefore, it must be true that $\exists (i\in I, r\in R, s_1,s \in S)$ s.t  $$\frac{i+ra}{s_1} =\frac{1}{s}$$ but this implies $\exists s_2 \in S$ s.t  $$ s_2(is + sra -1 s_1) = 0 \quad \Rightarrow \quad (s_1 s )i + (s_1 s r) a = (s_1 s )1,$$ ,so $$(b s_1 s )i + (s_1 s r) ab = (s_1 s )b.$$ Observe that by our assumption $ab\in I$, so $(s_1 s)b \in I$.  Now, at the point, I don't know how to proceed, so I would appreciate any help or hint because I stuck at this point for over a week now.  Edit  Thanks for the great answers; however, but I'm specifically interested in how to continue from the point where I stuck.


Single word between learning and mastering?

Is there single word that describes that I learned and became proficient in using a skill but is not as strong as mastered.  I want to say, "I (blank)ed a new technique." I learned it, but I have also become quite proficient in using it. Although I am proficient, I wouldn't say I have mastered the technique.


Where does the phrase "doctored" originate?

This is a phrase I’m particularly confused about, because it’s used often when something is manipulated or changed.  For example, sometimes images surface online that are clearly Photoshopped, but people refer to them as “doctored” images. Why use the word “doctored” here?


How to remove chapter numbering without removing it from table of contents

It seems I have spent two days trying to find out the solution to my problem. I have just finished typing my M.Sc thesis using Latex (MIKTEX 2.9). Unfortunately, all my chapters begin with the chapter number at the top left corner of a page. My supervisor asked me to remove that numbering of the chapters without removing them from the table of contents.  I have tried my best to do that but I failed. The last attempt I made is \chapter*{chapter title}, the moment I compiled my work, I found out that it began sectioning from 0.1, 0.2, and so on, which I don't like.    I have this code inside my thesis:  \chapter* {\quad \quad \quad \quad \quad\quad \large{CHAPTER ONE}} \addcontentsline{toc}{chapter}{CHAPTER ONE}  %Introduction}{} \pagenumbering{arabic} \onehalfspacing \begin{center} \textbf{\large \quad INTRODUCTION} \end{center}  \section{Introduction} This chapter gives a brief highlight on the concept of the Newton and quasi-Newton methods for solving nonlinear system of equations. The chapter contains motivation of the study, the aim and objectives, scope and limitations, methodology of the research. It includes some basic fundamentals and definitions of some basic terms.     After compiling, it gives me this:  CHAPTER ONE  INTRODUCTION  0.1 Introduction This chapter gives a brief highlight on the concept of the Newton and quasi- Newton methods for solving nonlinear system of equations. The chapter contains motivation of the study, the aim and objectives, scope and limitations, methodol- ogy of the research. It includes some basic fundamentals and definitions of some basic terms.   NB: Please observe how the section "Introduction" is numbered. I want it to be numbered 1.1 not 0.1.


USB data transfer with a separate power source

The car I recently bought has a built in USB but only provides 500mA.   I want to use a cable like the one below to connect my iPhone to the built-in USB to play music/satnav on the car stereo, but I want my iPhone to draw a power from my powerful car charger (4.2A).   I understand that connecting two power sources together with this kind of cable is not a great idea, I'd have to modify it but disconnecting power (+) wire from one cable. Related discussions (below) say that both 'host' devices have to have a common ground. The car's USB and the car charger ground are common so this should work.   Will it work and recognise my iPhone?    Update: Jailbroken iPhone will show you what the current is during charging. It'll show around 2000mA when the phone is off. With the screen and other things on it shows over 1700mA. Using iPad charger in the screenshot.     Related, but I thought my question could possible be more specific as it's to do with cars. By reading those I think the answer to my question is yes, however I'd like a confirmation from you guys.


I am experiencing a strange problem by using the GRASS toolbox on QGIS 2.14.3 Essen.  Even if in settings>options>CRS I select to use the project CRS when creating new layers, the results of GRASS toolbox tools, like r.watershed and r.fill.dir,  have an "user-defined CRS" with code 100000, even if the project CRS is EPSG 20137.  How can I solve this?


Variance of Sum of N Discrete Uniformly Distributed Random Variables.

A box contains $N$ identical balls numbered $1$ through $N$. Of these balls, $n$ are drawn at a time. Let $X_1,X_2,...,X_n$ denote the numbers on the $n$ balls drawn. Let $S_n = \sum_{i=1}^{n}X_n$. Find $\mathbb{Var}(S_n)$. $\textbf{My Solution}$: In the whole section, I have taken that $$X_i \sim U\{1, N\}$$ where $U\{1, N\}$ represents the discrete uniform distribution over integers $\{1, 2, ..., N\}$. Lets $Y= X_1 + X_2$ $$P(Y = y)$$ $$= P(X_1 + X_2 = y)$$ $$= P(X_1 = y - X_2)$$ $$= \sum_{x=1}^{y-1}P(X_1 = y - x|X_2=x)P(X_2=x)$$ $$= \sum_{x=1}^{y-1}{1 \over N^2} = {y-1 \over N^2}$$ Hence $P(X_1+X_2 =y) = {y-1 \over N^2}$ Lets $Z= X_1 + X_2 + X_3 = Y + X_3$ $$P(Z = z)$$ $$= P(Y + X_3 = z)$$ $$= P(X_3 = z - Y)$$ $$= \sum_{y=2}^{z-1}P(X_3 = z - y|Y=y)P(Y=y)$$ $$= \sum_{y=2}^{z-1}{1 \over N}.{y-1 \over N^2} = {(z-1)(z-2) \over 2N^3}$$ Hence $P(X_1+X_2+X_3 = z) = {(z-1)(z-2) \over 2N^3}$ This is going to be complicated very soon. Please suggest some better method than my approach.


Was the "Eye of Sauron" Sauron's actual physical form?

During the time frame of the Lord of the Rings, was the Eye of Sauron Sauron's actual physical form? If not, what form did he have?


What is the reason for the exponential speed-up of quantum computers?

In quantum computers the following two effects should be seen:  If an operator acts on an arbitrary qubit $Q_n$ of a quantum system $S$ consisting of several qubits than we get a new quantum system $S'$ where the amplitudes of all qubits have changed.  If an operator acts on one qubit of a quantum system $T$ consisting of two entangled QuBits than both qubits are affected.   So which one of these is the reason for the exponential speed-up expected from quantum computers?


pls notice that r is a rational number:) how to solve $\lim_{x\rightarrow 1}\frac{x^r -1}{x-1}$ without using L Hospital?

$\lim_{x\rightarrow 1}\frac{x^r -1}{x-1}$  r is Rational_number, with L Hospital rule is this easy to solve, but how could I solve it in another way?


Can't find Ubuntu Bash Root directory in Windows 10

I have installed Ubuntu Bash for Windows 10 on my PC, but I cannot find my root directory in which the bash works in. I know that it should be located in  C:/Users/[Username]/Appdata/Local/Lxss   but it's not there. I have verified that my files exist but the directory does not show, even with hidden files shown. Any help would be much appreciated!


Is the current in a resistor different from that in a circuit?

My understanding is that since Current = Charges/Time. If there exists a resistance to the flow of charges, then that must mean the charges slow down, meaning that more time is required to pass through a point. So, the current should then decrease. But, since this opposition to the flow of charges doesn't exist in the ENTIRE circuit, it should really only decrease the current in the resistor, right?


Convergence of Poisson random variables with divergent parameter

There is a sequence of independent random Poisson variables $Y_1, Y_2,\ldots$ with divergent parameter $Y_i \sim \text{Poisson}(\frac{1}{n})$. Does this sequence converge almost surely? In $L^2$ space? In probability?  I am really confused as I did some research on my own and almost every question I come up to has to do with the sum of a sequence; but I do not believe this has to do anything with the sum of $Y_n$ right? to prove it converges almost surely, I have to prove that $Y_n$ approaches the limit of $e^{-1}*\sum_{i=1}^{\infty} 1/i$? Any hints would be appreciated. Thanks.


Question: Let $m,n\in\mathbb{N}$, prove that if $n|m$, $F_n|F_m$.  I've tried to use induction, but I don't really know where to start since there's $2$ numbers:  $n$ and $m\ \dots$ I did induction before with just $1$ number, like proving $1+2+\cdots+n=\frac{n(n+1)}{2}$, that's only dealing with one number $n$, but with this I have no clue how to do it.  Can anyone give me a little hint on how to start, I don't want you to do whole problem for me but can I have some hint so I know where to start?  Thanks for the help!


I am new to python and one of the things every newbie do come across is the slice operator. I have a list:  li=[1,2,3,4,5,6,7]   As per my understanding calling li[:-1] is same as calling li[0:-1] and it is but when using it with a negative steps things do not work exactly as I thought they would. So getting to my question why the result of   print(li[:-3:-2]) # is 7   but the result of  print(li[0:-3:-2]) # is []   Looking forward to some explanation of how the negative step is being treated in this scenario.


Group of positive rationals under multiplication not isomorphic to group of rationals

A question that may sound very trivial, apologies beforehand. I am wondering why $( \mathbb{Q}_{>0} , \times )$ is not isomorphic to $( \mathbb{Q} , + )$. I can see for the case when $( \mathbb{Q} , \times )$, not required to be positive, one can argue the group contains elements with order 2 (namely all negatives). In the case of the requirement for all rationals to be positive this argument does not fly. What trivial fact am I missing here?


Differences between to get up and getting up

What's the difference between Kids hate getting up early in the morning. and Kids hate to get up early in the morning.


substring cannot work in implement class, but charAt is able?

I'm a newbie in java programming. I have a problem with substring and charAt. When I use substring, the result is 0.0. However, when I substitute it with charAt, it works normally. Can you explain why substring does not work in the implementation class in the case below? Can you also show me the solution for that by using substring or any other methods if they're applicable? package N07;  import java.util.Scanner;  public class E5_15 {     public static void main(String[] args) {         System.out.println("Enter a letter grade: ");         Scanner in = new Scanner(System.in);         String grade = in.next();                  Grade gr = new Grade();         System.out.println("Numberic grade: " + gr.getNumericGrade(grade));      } }  class Grade{     double score = 0;     final double add_or_subtract = 0.3;          public double getNumericGrade(String g) {         if (g.substring(0) == "A") {             score = 4;         if (g.charAt(0) == 'B') {             score = 3;         }  Here is the result with substring Enter a letter grade:  A Numberic grade: 0.0  Here is the result with charAt Enter a letter grade: B Numeric grade: 3.0  Thanks


Why do people sometimes use the past perfect form of a verb when the past would suffice? (e.g. "you had mentioned")

I noticed that my American friends tend to use the past perfect form when they use the verb mention in its past form, almost despite of the context of the sentence. I hear them say  "you had mentioned" a lot more often even in situations where the use of simple past would have been perfectly fine. Have you noticed it too and is it one of those unwritten rules, or is there a more formal explanation to it?  It seems like there was more verbs like that, but I am having a hard time remembering it now. If I do, I will edit the post and likely change the title to accommodate other verbs.


is it possible to open and edit a file inside of a zip file using php?

I'm working on a WordPress theme which needs abit of configuration to be working properly.  When i say configuration, i mean config.php needs to be edited slightly (setting some variables value).  Now i was wondering if it is possible to be able to go into a zip file, make a complete temporary duplicate (for a specific user. Maybe using session ID's?) AND edit the config.php file in the duplicate to set some variables value. Then close the temporary zip file and echo a link out to the file for the user, ready for download.  The variables value that will be set will be from a form on my site where users will download the theme.  Is this just wishful thinking, or do I have a chance?  Thanks!


Prove sequences are both convergent, given $ a_{n+1} = \sqrt{a_{n}b_{n}} $ and $ b_{n+1} = \frac{a_{n} + b_{n}}{2} $

Define two sequences $ a_{n} $ and $ b_{n} $ as $ a_{1} = 1 $, $ b_{1} = \sqrt{2} $, and  $ a_{n+1} = \sqrt{a_{n}b_{n}} $ and $ b_{n+1} = \frac{a_{n} + b_{n}}{2} $  How can we show that the sequences are convergent. I tried to use the monotonic sequence theorem by showing that $a_{n} > a_{n+1}$ for all $n$ and $b_{n} > b_{n+1}$ for all $n$ . But the sequence $ a_{n} $ and $ b_{n} $ are defined   as a product of $ a_{n}, b_{n} $ and the average of $ a_{n}, b_{n} $ [They consist of two sequence $ a_{n} $ and $ b_{n} $.] And then I don't know where to start.  My question is how can we solve this kind of problem systematically? Please give me some suggestions on where can I get started.


subversion checkout only modified files in jenkins

Is there any way to check out only modified files through subversion commands because I want only modified files to be in my working copy Jenkins to build only modified files?


My computer won't boot up, how do I transfer files to an external hard drive?

I'm having problems booting Windows 7, and I need to extract files from the computer's hard drive onto an external hard drive.  When I insert the Windows 7 DVD, I get two options, formatting and repairing. When I try to repair the system, the process runs very slow and I am asked to reboot the computer when finished, even though the problem is not solved.  How do I transfer data off my system's hard drive onto an external hard drive? My computer is a Dell laptop running Windows 7.


Can a non-square matrix be called "invertible"?

Let $R$ be a commutative ring with $1 \neq 0$.  It is known that $R^{n} \hookrightarrow R^{m}$ implies $n \leq m$ and $R^{n} \twoheadrightarrow R^{m}$ implies $n \geq m$, and I might use this without mentioning (though I don't think I did). Isomorphisms are $R$-module maps if not mentioned otherwise.  Let $m \geq n$ and consider $R^{n} = R^{n} \times 0 \times \cdots \times 0 \subseteq R^{m}$. We have $\text{Hom}_{R}(R^{n}, R^{m}) \simeq M_{m \times n}(R)$ via $\phi \mapsto M(\phi) = (c_{ij})$ where $\phi(e_{j}) = \sum_{i=1}^{m}c_{ij}e_{i}$. Take any $R$-linearly independent $y_{1}, \cdots, y_{n} \subseteq R^{m}$ and define an $m \times n$ matrix $A = (a_{ij})$ via $y_{j} = b_{1j}e_{1} + \cdots + b_{mj}e_{m}$.  If we understand $e_{j}$ with $1 \leq j \leq n$ as $n \times 1$ column matrix in $R^{n}$ when we multiply an $m \times n$ matrix to it on its left, then $Ae_{j} = y_{j}$ for $1 \leq j \leq n$. Thus, we can understand this matrix as an injection $A : R^{n} \hookrightarrow R^{m}$.  By definition $A$ is an $m \times n$ matrix, but if what I wrote is correct, then $A|_{R^{n}}$ must be an isomorphism $R^{n} \simeq \bigoplus_{j=1}^{n} Ry_{j}$. I am not trying to find an invertible matrix to $A$, but is it okay to think of it as an embedding like how I described?


A conjectured closed form of $\int\limits_0^\infty\frac{x-1}{\sqrt{2^x-1}\ \ln\left(2^x-1\right)}dx$

Consider the following integral: $$\mathcal{I}=\int\limits_0^\infty\frac{x-1}{\sqrt{2^x-1}\ \ln\left(2^x-1\right)}dx.$$  I tried to evaluate $\mathcal{I}$ in a closed form (both manually and using Mathematica), but without success.   However, if  is provided with a numerical approximation $\,\mathcal{I}\approx 3.2694067500684...$, it returns a possible closed form:  $$\mathcal{I}\stackrel?=\frac\pi{2\,\ln^2 2}.$$ Further numeric caclulations show that this value is correct up to at least $10^3$ decimal digits. So, I conjecture that this is the exact value of $\mathcal{I}$.     Question: Is this conjecture correct?


In connected motion, arent the tension of string and weight of body action and reaction forces? so shouldnt they be equal in magnitude?

I cant comprehend how the tension on the string become less when the body is accelerated downwards?


After downloading a program file from the internet how do you install it?

I have downloaded Flash Player 11.5.0 into my Downloads. How do I install it? It is a tar.gz file. Please easy steps through the terminal. I am new to Linux, and want to learn more about it.


My problem is that I don't know how to include \section*{Some Title} in \rightmark. Currently \rightmark is working fine for all types of pages e.g. list of figures, list of tables, table of content etc. But when there is a page wiith \section*{Some Title}, \rightmark is empty.  Any suggestions how to solve my problem?  MWE:  \documentclass[a4paper,listof=totoc,bibliography=totoc]{scratcl}  \usepackage[headsepline,automark]{scrlayer-scrpage} \clearpairofpagestyles \ihead{Musterhausarbeit\\ \rightmark{} \\ \markboth{#1}{#1}} \ofoot{\thepage}  \renewcommand*{\titlepagestyle}{empty}  \addtokomafont{section}{\clearpage}  \begin{document}     \tableofcontents     \newpage      \listoffigures     \newpage      \listoftables     \newpage      \section*{Some title}     \addcontentsline{toc}{section}{Some title}     \newpage      \section{Some more title} \end{document}


Eigen vectors of a matrix formed by other matrix whose eigen vectors are known.

If $B$ has eigenvalues $1, 2, 3$ and $C$ has eigenvalues $4, 5, 6$, and $D$ has eigenvalues $1, 8, 9$, what are the eigenvalues of the $6 x 6$ matrix $$A = \begin{bmatrix} B & C \\ 0 & D \end{bmatrix}$$ $'0'$ means zero $3 x 3$ matrix So far I am only able to figure out that the trace of matrix $A$ is $30$ by adding eigen values of $B$ and $C$. Stuck after that can't use the determinant property as we don't know the other values of matrix $A$.


Refresh @ApplicationScoped bean gives nullpointer

First I'd like to clear out that I know what a NullPointerException is and how to handle that. My question is about how to access the @ApplicationScoped bean that is created on server startup, through the scheduler that I would like to run once a day. All I get now is a new bean, which is null at the beginning and not the already created bean. The scheduler does the initiation of the bean so I end up with two beans, one that is updated by the scheduler (all the time) and one that is used when navigating in the web application.  So...  I have a web application with a @ApplicationScoped bean. This one is loaded from database on Tomcat startup. This means that if something is changed in database in some other way than through the web application the changes won't be viewable until the Tomcat has been restarted. So I thought I could make a Schedule to reload this @ApplicationScoped bean on a specific time during the day. The trouble is that I get a whole new @ApplicationScoped bean. So how should I do to get the current bean updated and not a new one?  I've tried the solution in this tread:  without any luck. My bean is still null.  I've also looked at the following threads without really solving my problem:      My ApplicationBean.java  import javax.enterprise.context.ApplicationScoped;  @Named(value = "applicationBean") @ApplicationScoped public class ApplicationBean {     @PostConstruct     public void init() {         //load variables from db     } }   My ScheduleTaskConfig.java  @WebListener public class ScheduleTaskConfig implements ServletContextListener {      private ScheduledExecutorService scheduler;      @Override     public void contextInitialized(ServletContextEvent event) {         Reloader reloader = new Reloader(event.getServletContext());         scheduler = Executors.newSingleThreadScheduledExecutor();         scheduler.scheduleAtFixedRate(reloader, 2, 3, TimeUnit.MINUTES);     }      @Override     public void contextDestroyed(ServletContextEvent sce) {         scheduler.shutdownNow();     } }   My Reloader.java  public class Reloader implements Runnable {      private ServletContext context;      public Reloader(ServletContext context) {         this.context = context;     }      @Override     public void run() {         ApplicationBean applicationBean = (ApplicationBean) context.getAttribute("applicationBean");         if (applicationBean != null) {             applicationBean.init();         }     } }   I just don't know what is wrong. I don't understand how to solve this.  I know I've written that the schedule should run every 3 minutes but when I get this to work the schedule should run once a day.  Is there a better way to do this or have I just forgotten something? I've googled the whole day without getting forward so I really need help. Thank you.  Edited: So my servlet context is up and my listener is notified before my application context is up?  What if I use the webpage then my application context is up (?) but my scheduler still doesn't work, the bean in the scheduler is still a new one and not the one I've been using when navigating in the web application. Or am I just confused over this? :) Thank you for your help.  Edited: I'm using Primefaces 6.0 and I suppose this bean is a JSF bean. Other beans used are Spring beans imported from a model class. Sorry for the confusion I have removed the Spring notation and added Primefaces instead. I hope this clears things out. Thank you


Can you get back to the original state of the levels?

I'd like to play again some moons, things like when the Desert was frozen over, or New Donk City at night. They were great to play setpieces.  But do I have to play the game again from the start to see them again? or is there a way to trigger a rerun of the original state of the level?


How to block drivers built-into Kernel, i.e. drivers who are not a module

I configured and compiled Linux kernel with nouveau driver built-into kernel, i.e. with <*> as opposed to <M> when doing make menuconfig inside Linux kernel source directory.   Now, I intend to use another driver rather than nouveau. If nouveau was a module, I would add a line like blacklist nouveau inside /etc/modprobe.d/blacklist.conf  What should I do now.


Overload Resolution: What is the role of explicit and the initialization syntax?

Suppose I have an immutable String class as follows:  #include <iostream> #include <string>  class String { public:     explicit String(const char *Value) : Size(std::strlen(Value)), Value(new char[Size + 1])     {         std::memcpy(this->Value, Value, Size + 1);         std::cout << Value << ", novice." << Size << std::endl;     }     template <typename T, std::size_t N> String(const T (&Value)[N]) : Size(N - 1), Value(new char[N])     {         std::memcpy(this->Value, Value, N);         std::cout << Value << ", expert." << Size << std::endl;     }     ~String()     {         delete[] Value;     } private:     const std::size_t Size;     char *Value; };  void main() {     auto &s = "Welcome to C++";     String string = s;     String str {s};     String st(s);     return; }   I want to know the role explicit plays and how the initialization syntax makes a difference when the constructor overload is chosen.    I understand that for str and st, I am explicitly calling the constructor that takes a pointer to const char, so they print out:  Welcome to C++, novice. Welcome to C++, novice.   But I don't understand why for string  Welcome to C++, expert.   is printed out. Please clarify how the overload is being selected.


I'm working on some quiz script, found one from internet, everything works like a charm, but i need to modify for security reasons. Actually i use $_GET , but i'm afraid about sql injections.  I'll let here all my script, and if someone can help me with suggestions, will be great. I tried so many things to make script non-vulnerable, but even .htaccess didn't helped me!  1.php quiz page with form  <?php     //Set question number     $number = (int) $_GET['n'];      //Get total number of questions     $query = "select * from questions";     $results = $mysqli->query($query) or die($mysqli->error.__LINE__);     $total=$results->num_rows;      // Get Question     $query = "select * from `questions` where question_number = $number";      //Get result     $result = $mysqli->query($query) or die($mysqli->error.__LINE__);     $question = $result->fetch_assoc();       // Get Choices     $query = "select * from `choices` where question_number = $number";      //Get results     $choices = $mysqli->query($query) or die($mysqli->error.__LINE__);   ?>  <?php echo $question['question'] ?>  <form method="post" action="../p/process.php" class="table-responsive"> <?php while($row=$choices->fetch_assoc()): ?>  <button type="submit" class="btn btn-info btn-block" name="choice" value="<?php echo $row['id'] ?>"><?php echo $row['choice']; ?></button>  <?php endwhile; ?>                                                                                <input type="hidden" name="number" value="<?php echo $number; ?>" /> </form>   process.php page   //Check to see if score is set_error_handler     if (!isset($_SESSION['score'])){        $_SESSION['score'] = 0;     }  //Check if form was submitted if($_POST){     $number = $_POST['number'];     $selected_choice = $_POST['choice'];     $next=$number+1;     $total=10;      //Get total number of questions     $query="SELECT * FROM `questions` LIMIT 10";     $results = $mysqli->query($query) or die($mysqli->error.__LINE__);     $total=$results->num_rows;      //Get correct choice     $q = "select * from `choices` where question_number = $number and is_correct=1";     $result = $mysqli->query($q) or die($mysqli->error.__LINE__);     $row = $result->fetch_assoc();     $correct_choice=$row['id'];        //compare answer with result     if($correct_choice == $selected_choice){         $_SESSION['score']++;     }      if($number == $total){         header("Location: ../final.php");         exit();     } else {             header("Location: ../f/1.php?n=".$next."&score=".$_SESSION['score']);     } }   As like i said, everyhing works fine, i'm ussing that script for 2 months already, but i'm afraid. Current URL looks like: f/1.php?n=1&score=1 Will be nice if someone can help me. Thank you


Problem understanding Many-Worlds Theory

If Everett's Many-Worlds Theory (MWT) was true, wouldn´t it mean, that each split into two (or n) worlds, would correspond to 2 (or n) equally likely probable outcomes of the currently considered wave function? But real wave functions have probability distributions with very varying probabilities for the outcomes and it does not sound consistent to have the world split into e.g. 0.2 worlds with outcome A and 0.8 worlds with outcome B, right? A split into 1 world with outcome A and 4 worlds with outcome B, would solve this - but for the price of many extra worlds and the impossibility to allow for irrational probabilities. So is this the final prove, that MWT is nonsense? I don´t believe it can be so easy. So, where´s my mistake? I´m curious about your thoughts.


How to install Chrome browser properly via command line?

I am trying to install chrome browser via command line.  I tried this:  $ apt-cache search chrome browser   The results show that the proper term is "chrome-browser," so I tried that:  $ sudo apt-get install chrome-browser   And then "Y" for the Y/n question.  But the installation threw errors.  Does someone see anything wrong with the commands I issued?


I'm running a series of tasks getting an integer as parameter, but the output is not as expected  static void Main(string[] args) {  var tasks = new List < Task > ();   for (int i = 0; i < 20; i++) {   tasks.Add(new Task(async () => await MeuIp(i)));  }   Parallel.ForEach(tasks, task => {   task.Start();  });   Console.ReadKey(); }  static async Task MeuIp(int i) {  var r = await request.Ip();   Console.WriteLine(i + " " + r); }   Expected  0 ... 1 ... 2 ... 3 ... 4 ... 5 ...   Actual Output


Hardware requirement for video streaming to 50000 concurrent users

I need to serve about 50k users with environment of video streaming and other media like images, audio and browsing static pages html, css and js files so i will assume that all 50k will be streaming videos at same time to get max hardware needed


Problem that I am facing:  So naturally I decided to shift to the polar co-ordinates, however when I try to simplify the expression remains very complicated and despite using the fact that sin and cos belong to [-1,1] I cannot get any conclusive bound.  Thanks


Let $a_n=\frac{n!}{n^n}$ be a sequence. Prove that $\limsup(a_n)=0$.  I know that the series $\sum^{\infty}_{n=1} \frac{n!}{n^n}$ converges, so the nth term must converge to 0. But I cannot use the convergence of series to prove this.   Basically what I have is: The sequence $a_n$ is decrescent and bounded by 0 $(a_n>0 \; \forall n)$, therefore is convergent and it's limit is the $\limsup(a_n)$.   So I must show that $\lim\frac{n!}{n^n}=0$  Let $\epsilon>0$, prove that exists $n_0 \in \mathbb{N}$ such that, if $n>n_0$  $$\left|\frac{n!}{n^n}-0\right|<\epsilon \Rightarrow -\epsilon<\frac{n!}{n^n}<\epsilon$$  I know that $\frac{n!}{n^n}>=-\epsilon$ because $\frac{n!}{n^n}>0$.  How can I prove that $\frac{n!}{n^n}<\epsilon$?