C++ | Using a custom class as key for unordered_map

Not very good in cpp I tried to create a map taking as key a pair of two values and as value an instance of another class. The key class is a Point, having a attribut X and Y.  The problem I found when using a map is that it used operator< to order the map and to find if two key are the same. But because I use a key with two values I cannot use it.  So I founded that unordered_map will prefer to use operator= for the verification, which I can use in my case.  But since then I couldn't create everything to make my class Point work as a key for my unordered_map.  I used as source :         My code :  I have put a clear version on a gist github :   I need to seperate everything between the .h and the .cpp. I can't only use a .cpp  Point.cpp :  bool operator==(const Point& a, const Point& b) {     return (a.X == b.X && a.Y == b.Y); }  namespace std {     template<>     struct hash<Point>     {         std::size_t operator()(Point const& p) const         {             std::size_t h1 = std::hash<int>{}(p.getX());             std::size_t h2 = std::hash<int>{}(p.getY());             return h1 ^ (h2 << 1);         }     }; }   Definition of the map in my MapUser.h :      std::unordered_map<Point, Biome*>* map;   Initialization of the map in my MapUser.cpp :      this->map = new std::unordered_map<Point, Biome*>();     Logs :  ... Building 5 actions with 16 processes...   [1/5] Point.cpp   [2/5] Procedural_Terrain.cpp   C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\INCLUDE\xhash(146): error C2064: le terme ne correspond pas ? une fonction qui prend 1 arguments   C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\INCLUDE\xhash(172): note: voir les informations de r?f?rence sur le mod?le de variable 'const bool _Nothrow_hash<std::hash<Point>,Point>' en cours de compilation   C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\INCLUDE\xhash(172): note: pendant la compilation de la fonction membre classe mod?le 'size_t std::_Uhash_compare<_Kty,_Hasher,_Keyeq>::operator ()<Point>(const _Keyty &) noexcept(<expr>) const'           with           [               _Kty=Point,               _Hasher=std::hash<Point>,               _Keyeq=std::equal_to<Point>,               _Keyty=Point           ]   C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\INCLUDE\unordered_map(404): note: pendant la compilation de la fonction membre classe mod?le 'Biome *&std::unordered_map<Point,Biome *,std::hash<Point>,std::equal_to<Point>,std::allocator<std::pair<const Point,Biome *>>>::at(const Point &)'   E:\Documents\GitHub\...\Source\...\Private\MapUser.cpp(51): note: voir la r?f?rence ? l'instanciation de la fonction mod?le 'Biome *&std::unordered_map<Point,Biome *,std::hash<Point>,std::equal_to<Point>,std::allocator<std::pair<const Point,Biome *>>>::at(const Point &)' en cours de compilation   E:\Documents\GitHub\...\Source\...\Private\MapUser.cpp(13): note: voir la r?f?rence ? l'instanciation classe mod?le 'std::unordered_map<Point,Biome *,std::hash<Point>,std::equal_to<Point>,std::allocator<std::pair<const Point,Biome *>>>' en cours de compilation   C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\INCLUDE\xhash(145): error C2056: expression non conforme      I also tried this :      template<>     struct equal_to<Point>     {         bool operator()(const Point& a, const Point& b)         {             return (a.getX() == b.getX() && a.getY() == b.getY());         }     };       this->map = new std::unordered_map<Point, Biome*, std::hash<Point>, std::equal_to<Point> >();   But I think in my case it just do the exact same thing.  Thanks for the ones that will take time to answer me, Have a nice day


Why do the directories /home, /usr, /var, etc. all have the same inode number (2)?

I find that under my root directory, there are some directories that have the same inode number:  $ ls -aid */ .*/  2 home/ 2 tmp/ 2 usr/ 2 var/ 2 ./ 2 ../ 1 sys/ 1 proc/   I only know that the directories' names are kept in the parent directory, and their data is kept in the inode of the directories themselves.  I'm confused here.  This is what I think when I trace the pathname /home/user1.   First I get into the inode 2 which is the root directory which contains the directory lists. Then I find the name home paired with inode 2. So I go back to the disk to find inode 2? And I get the name user1 here?


Some Arduino starter-kit projects show the resistor placed before the anode of a LED, coming from output, and others show it after the cathode, going to the ground. Is there any difference? Why?


How pass an exception function to function in Java?

I am working an application with Java, Hibernate and Postgres. The point of my question is the pass of throws because I don't catch Exception generated, ¿What I must correct?  public void seleccionarEquipo() throws Exception {     try{          this.integrantes = consultarIntegrantes();     }catch(Exception e){         System.out.println("{ERROR: " + e.toString() + "}");     } }  public List<Usuario> consultarIntegrantes() throws Exception {     System.out.println("calling...");     List<Usuario> usuarios = new ArrayList<Usuario>();     Session session = NewHibernateUtil.getSessionFactory().openSession();     Transaction transaction = session.beginTransaction();     try {         System.out.println("try...");         Query query = session.createQuery("Anything");         usuarios = query.list();     } catch (Exception e) {         System.out.println("error detected");         throw e;     }finally{         transaction.commit();         session.close();         return usuarios;     } }   Output:  Info:   calling... Info:   try... Info:   error detected   My application doesn't execute: System.out.println("{ERROR: " + e.toString() + "}");. What I do?  Thank you!


In a circuit one light-second long, does it matter where in the circuit the switch is placed?

I was looking at this textbook example that was posted to reddit:    The accompanying comments basically thrashed it saying everything was wrong.   I had a specific question about it, though, and this is probably due to my not understanding how electric fields work.  If the switch is placed immediately before the light bulb (say, 6" away), will the light turn on almost immediately?  I fully understand that electricity doesn't generally behave instantaneously. My concern has to do with whether there will be some kind of charge buildup on the wire that if the switch is moved closer to the lightbulb, it will wind up lighting within the amount of time it takes light to travel between the switch and the bulb as opposed to the source and the bulb.


An error occured during vote count fetch - For a user with < 1K rep

AFAIK only users with reputation > 1K can view vote split on a post, by clicking the current vote score. For users with reputation < 1K clicking on the vote score does nothing.  But I got an error message when clicking the vote score on meta.stackoverflow.com (where my reputation < 1K)    Not a major one. But looks like a bug.  PS : Mac Mountain Lion, Chrome Version 27.0.1453.93


How to clip an Openlayers OSM Background to a Vector Boundary?

I'm new to QGIS. In my project i have two layers: one is my vector (city boundaries) and the other is the OSM (obtained with the plugin). How can I cut the OSM along the edges of the vector? I want to obtain only a region of the map, to save it as an image.


Why people using "x" to check if a variable is empty in shell, like `if [ "x${BASH_VERSION}" = "x" ]; then` ...?

Usually I use [ "${XXX}" = "" ] or [ -z "${XXX}" ] to check if XXX is empty. Is there any reason that I should use [ "x${XXX}" = "x" ]?


How to interpret A:B in linear regression? How to calculate A:B

In linear regression we can use A:B to show the first order interaction of variable A and B. But it is hard to know what effect was caused by A and what was caused by B. So I want to understand how exactly A:B worked


I'm trying to find integer solutions to $x^2 + 11 = y^3$. I guess it will work as follows: work in the ring of integers $\mathcal{O}_K$ of the number field $K = \mathbb{Q}(\alpha)$ with $\alpha = \sqrt{-11}$. This ring is $\mathcal O_K = \mathbb{Z}[\frac{1 + \alpha}{2}]$. Here te equation becomes $(x + \alpha)(x-\alpha) = y^3$.   Now I guess we should show that the ideals $(x+\alpha)$ and $(x-\alpha)$ are coprime in $\mathcal{O}_K$. It follows that $(x + \alpha) = I^3$ for some ideal $I\subset \mathcal{O}_K$. I already showed that the class group $Cl(\mathcal O_K)$ is trivial and therefore $I$ is principal. So up to units of $\mathcal O_K$ (but these are just $\pm 1$, so we do not need to worry about them) we have $x + \alpha = \left(a + b\frac{1 + \alpha}{2}\right)^3$ for some $a, b\in \mathbb{Z}$. This equation now yield some condition for $a$ and $b$ and we are able to find the solutions to $x^2 + 11 = y^3$, they are $(\pm 4, 3)$. I have two questions.   Is this proof correct (when given with all the details of course)? Do I miss something? How do I prove that $(x + \alpha)$ and $(x-\alpha)$ are coprime in $\mathcal O_K$ ? This probably should not be that hard, but I haven't succeeded yet.    Thanks!


Why do we call complex numbers “numbers” but we don’t consider 2-vectors numbers?

We refer to complex numbers as numbers. However we refer to vectors as arrays of numbers. There doesn’t seem to be anything that makes one more numeric than the other. Is this just a quirk of history and naming or is there something more fundamental?


Daily reputation cap doesn't account for reputation * loss* due to bounty awarded?

There are many Q&A's around this and the best explanation of daily cap model is from this answer that uses . It is an old answer but gives a good understanding.   My confusion is in applying this model to my situation yesterday.    On 31/12/2019, I awarded a bounty to , since it became eligible for bounty (2 days after posting it). Subsequently, I got more upvotes (including one accept) which exceeded the daily cap of 200. I am confused about this-loss of reputation due to bounty awarded by me preceeded subsequent gain of reputation so going by the bucket analogy, I should have my rep adjusted accordingly and those 6 up votes (at the bottom of table) should have been credited (rep should have been 177 instead of 117),  /reputation shows this   2 219845 (10)  1 219884 (2)  2 170717 (10)  2 219621 (10)  2 219845 (10) 2 219845 (10) 2 218537 (10)  2 219845 (10)  2 219892 (10)  2 219845 (10) 8 219821 (-100)  2 219845 (10)  2 219621 (10)  2 219845 (10)  2 219821 (10)  2 219845 (10)  2 219845 (10)  2 219845 (10)  2 219912 (10)  1 219912 (15)  2 219845 (10)  2 219845 (10)  2 219892 [10]  2 219845 [0]  2 219621 [0]  2 219845 [0]  2 219845 [0]  2 219845 [0]  2 219845 [0]  -- 2019-12-31 rep +117 = 27089 --   It is not the 6 votes I am bothered about, it is more about trying to correct my understanding  or have I stumbled upon an anomaly?


$A$ be a $2\times 2$ real matrix  with trace $2$ and determinant $-3$, consider the linear map $T:M_2(\mathbb{R})\to M_2(\mathbb{R}):=B\to AB$ Then which of the following are true?   $T$ is diagonalizable $T$ is invertible $2$ is an eigen value of $T$ $T(B)=B$ for some $0\ne B\in M_2(\mathbb{R})$    if $ A=\begin{pmatrix}a_{11}&a_{12}\\a_{21}&a_{22}\end{pmatrix}$ Then I have calculated that matrix of $T$ will be \begin{pmatrix}a_{11}&a_{12}&0&0\\a_{21}&a_{22}&0&0\\0&0&a_{11}&a_{12}\\0&0&a_{21}&a_{22}\end{pmatrix} so $T$ is invertible I can say as $\det T=(\det A)^2=9$, could any one help to find out others as true/false?


Best Pattern For Adding Commentary in align Environment?

I've been using the align environment to line up equations in proofs/explanations/etc and I like to place parenthetical commentary for each step, similar to the code below:  \documentclass{article} \usepackage{amsmath} \begin{document}  \begin{align*}   f(ax + by) & = f(ax) + f(by) & (By Property 1) \\              & = af(x) + bf(y) & (By Property 2) \\ \end{align*}  \end{document}   The problem I have with this is that the commentary completely distorts the overall alignment of the equation area; far too much space is allocated to the column containing the commentary.  I would like, insofar as it is possible, for the equations themselves to be aligned in the center of the page and for the commentary to simply appear on the right without affecting the overall justification of the equations. What's the best way to achieve this?


Why can't massless particle exceed speed of light?

Why massless particle can't exceed speed of light?


In the second volume of Feller's "An Introduction to Probability Theory and Its Applications", section VII.6 on Inversion formulas for Laplace transform starts with the limit  $\displaystyle{\lim_{\lambda\to\infty}e^{-\lambda\theta}\sum_{k\leq\lambda x}\frac{(\lambda\theta)^k}{k!}}$ or, in another form,  $\displaystyle{\lim_{n\to\infty}e^{-n}\sum_{k=0}^{an}\frac{n^k}{k!}}$.  Feller says that the above limit is $0$ if $a<1$ and $1$ if $a>1$, and refers to previous chapters.  I am interested in direct computation of the limit (related question  does not seen illuminating in this aspect), without references to Central Limit theorem (like seen in other similar questions; usage of Poisson variables is possible).


ROC curve and confusion matrix in classifier performance evaluation

I applied  two different classifiers against the same validation set. It turns out that classifier A is better than classifier B in terms of ROC curve. However, classifier B is better than classifier A in terms of confusion matrix. How to explain this kind of contradiction?


C programming getcwd variable manipulation

Basically I need an if statement of which the response is dependent upon the current working directory.  I have done some research on the topic and I believe that the getcwd() function is what I am looking for, but I can't figure out how to interface with it in an if statement.   I am new to C, and the program I am making needs to be located on the Desktop (btw its a UNIX system) for it to run properly and the if statement needs to determine whether it is located on said desktop or not.


Is there a standard array name for $@, like ${ARGS[@]}?

I don't expect it to be modifiable. That is, I don't expect it to enable something like ARGS=("${ARGS[@]}"), but only to simplify something like myarray=("${ARGS[@]/--unneeded-argument/}").  Note that the --unneeded-argument example is not meant to imply removing arguments is the reason why I'm asking. It's a question I've had in mind for years and I never got a definitive answer.


I know this has been asked before, but I can't seem to find the answer that I want. I want to read the X-men comics in order - the teams, the storylines, what happened when. For example, I've read about the split into two different groups after Xavier's death, but I want to read everything that made that happen. Any everything else in the universe.  Right now, I'm working on Volume 1 of the original Uncanny X-men, to be followed by Volumes 2 and 3. Since The New Mutants was introduced in this arc, I think I should read it next? But when do I read Astonishing X-men, or X-factor, or anything else? Does anyone have a list of some sort of where everything is supposed to go? I know, this is probably a hard question, but I just want a timeline of which titles I should read in order.   I guess I just need a title/group of characters timeline.  Thanks if anyone can help.  EDIT_ For all of those links given, I've already tried those. If they had what I needed, I wouldn't have bothered to post this question. As stated before, I've already started reading Uncanny X-Men. I want to read all of the comics. I just want to know the titles that I need to go by. For example, I think that New Mutants should be read next since it was published at the same time? Or am I wrong? Also, the Wikipedia article was only confusing; it just talked about story arcs, characters involved, which didn't help me in working out the different title order. Easy question: Titles in order, all X-men issues after Uncanny X-men  . Any help out there? (Not to be angry, but I knew about all of those other posts before I asked my question. I know to look before I randomly post crap that's been answered a hundred times.)


Query regarding permission for Indian to work as postdoc in UK

I am applying for a Postdoc in an UK University. They are asking whether I have permission to work in UK. How can I know my eligibility to work as Postdoc in UK? What type of visa issued by UK for postdocs?  Detail:     The University of Bath is a sponsor under the Points Based System. Where there are no suitable applicants from within the EEA, we may, depending on the position, be able to issue a Certificate of Sponsorship.   For further information, please refer to the UK Border Agency website (new window).      Please select one of the following options*          I am a British Citizen/EEA National.   I am not a British Citizen/EEA National and I am not currently eligible to work in the UK.   I am not a British Citizen/EEA National, but I am eligible to work in the UK. Please give the reason below.


Mobile SE sites not allowing edits to edits

When you have less than 2K rep and your edit goes in a queue, you are usually allowed to revise your edit while it is being reviewed, by clicking the edit button again on the question page. However, when on mobile SE sites, the edit button disappears when you have submitted an edit for review.    Editing  by  into the question: It seems that the cause of this is when the mobile site hides the edit link (when there is a pending edit), it doesn't check who is making the edit, which means that it hides it for your own as well as other's edits.


what is the greatest integer that divides $p^4-1$ for every prime number p greater than 5(this is a gre subject math problem)  I think that $p^4-1=(p^2+1)(p-1)(p+1)$,so  8 must divide all the $p^4-1$ for p>5,then I am stuck in how to continue analyze the question. can someone tell me how to find that greatest integer?  the choice is (A)12   (B)30   (c) 48   (d)120   (E) 240


90/180 rule while holding a swedish residence holder permit

I am an Indian citizen, holding a valid residence permit from Sweden. I have a confusion about 90/180 rule. For eg if I am planning to travel to France 12/06 to 18/06. It's just a 6 days trip. How long will I have to wait before my next trip within Schengen? Should I wait for 90 days until my next trip or can I make unlimited trip over a period of 90 days not exceeding the limit of 90 days over 180?


Calculate the following determinant of à matrix

good morning  I want to prove that $$D_n  = \det \begin{pmatrix}    x  & 0 & \cdots  &  \cdots  & 0      & 1 \\    -1 & x & 0       &  \vdots  & 0      & 2 \\    0  &-1 & \ddots  &  \ddots  & \vdots & \vdots  \\ \vdots & \ddots & \ddots & x & 0 & n-2 \\  0 &  \cdots & 0  & - 1 & x & n-1 \\   0 &  \cdots  & 0 & 0 & - 1 & x  \\ \end{pmatrix} $$  $D_n  = x^n  + x^{n - 1}  + \left( {n - 1} \right)x^{n - 2}  + \cdots( {n - m + 1} )x^{n - m}  +  \cdots + 3x^2  + 2x + 1$  thank you in advance


How can I compute eigenvalues or characteristic polynomial of this matrix? Please help.

\begin{pmatrix} 2na & -a & -a & -a & -a &  -a& -a\\   -a& a+b & 0 & 0 & -b & 0 & 0\\   -a& 0 & a+b & 0 & 0 & -b &0 \\   -a& 0 & 0 & a+b & 0 &  0&-b \\   -a& -b & 0 & 0 & a+b & 0 & 0\\   -a&  0&-b  & 0 & 0 & a+b &0 \\   -a&  0&  0&-b  & 0 & 0 & a+b \end{pmatrix}   I represent the matrix when $n=3$. There are block matrices $(a+b)I_3$ and $(-b)I_3$ above. I think the characteristic polynomial of this matrix for any natural number $n$ is calculated efficiently.  The rank is $2n$, so the characteristic polynomial should zero as the constant part. But I cannot calculate the determinant and I can't get zero when I put $t=0$ when I calculate $\text{char}(M)(t)$ for any $n$. Please give me a favor.


How does my lab's Helium-filled cathode ray tube produce a blue-ish glow?

In my university's lab, we have typical "e/m apparatus"'s, i.e. a cathode ray tube nested between a Helmholtz coil. Here is the manual for the device we are using.  When operating the device, we typically set the acceleration voltage to around $200 \text{V}-400\text{V}$, so that means the electrons flying in circular trajectories should have kinetic energies around $200 \text{eV}- 400 \text{eV}$. The tube is filled with low-pressure Helium, which gives rise to a blue-ish arc characterizing the electron trajectories.  My understanding is that the free electrons elastically scatter with the Helium atoms, mostly ionizing them. An electron will then join back with the ionized Helium atom, producing a photo-emission. Here are some crucial numbers for inert Helium:   To excite a single electron by a single level, i.e. $\text{(1s)}^2\rightarrow \text{(1s)(2s)}$: $\color{red}{19.8\,\text{eV}}$. To ionize a single electron, i.e. $\text{(1s)}^2\rightarrow \text{(1s)}$: $\color{red}{24.6\,\text{eV}}$ To ionize two electrons, i.e. $\text{(1s)}^2\rightarrow \text{(no electrons)}$: $\color{red}{79\,\text{eV}}$   None of these energies correspond to wavelengths of visible light (at all!). How then is there a blue-ish glow? Clearly my understanding of what is actually going is flawed.    [Sources]  [1] Helium energies:   [2] Energy to Wavelength converter:   [3] Lab Manual:


Good morning friends; can you help me create this document . Thanks.


Mothers and Fathers are called parents, grandmothers and grandfathers are called grandparents, so what do you call aunts and uncles?


Is time passing really differs on other planets/in interstellar?

I am aware of the idea of  (which I, by the way, asked  about) on speeds, that get close to the speed of light. Though, I wonder what other (if any) forces and laws affect time passing on other planets and in interstellar.    The following thought experiment might illustrate (at least I hope it will) what I am asking:   Say we have 10 clocks that run forever (i.e. they do not require rewinding at all), are perfectly synchronized and are not damaged by any external conditions on other planets (high temperatures, acids etc.). Now let's assume we have put a clock on the surface of each planet in our Solar System (i.e. Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto). Let us also assume that we never approached speed of light while transporting the clocks (say we used space bicycle, or something :-). The 10-th clock — we just released it (somewhere behind the Pluto, perhaps) to drift into interstellar space. Then we came back to Earth and waited (according to the clock we left on Earth) for exactly 1000 hours.   Assuming that nothing would cause clock in interstellar to move close to the speed of light, what time will be displayed on each of the clocks (given we could, somehow, check it simultaneously)? Would the results differ if we were able to synchronize all the clocks, exactly at the moment we started counting our 1000 hours from?


How to HTTP Request a URL in JavaScript?

In the below code I need to execute the newUrl:     ...   How to make it?


"Edit profile" section throws a generic 404 if I try to access it while suspended

While any of the other sections under "Edit Profile & Settings" do work normally.


How to add a string to the start and end of a cell?

I have lots of cells that contain unique text.   I'd like to add a
 to the start of the cell and a
 to the end of the string in the cell.   Turning this: Here is some text I've written. It's different in each cell. into this:
Here is some text I've written. It's different in each cell.
  I've tried =CONCATENATE("
",A1) but can't find a way to add something to the end of the cell as well?


In griffiths,   Why was the lowest chosen like that while in the ladder analogy, the lower energies are like $a_-^n\psi$? That is, why didnt he chose the lowest rung to be  $$a_-^n\psi$$


Is Hibernate an overkill for an Android application?

I'm looking for a good ORM for my android application and at first glance it seems like for a mobile device I would prefer to use something simpler maybe. The thing is I'm just assuming here with no real evidence, so I thought I would ask the community's opinion (maybe there's is someone that has been through the experience). It is a fairly large(for mobile) application and will be run on a dedicated tablet.  What does everyone else think ? Is Hibernate too much for an android application ? Will there be performance problems ?  What would you use instead if you think it is too much ?  I am aware there are other questions asking for alternatives, but I decided to ask since most of those questions simply assumed it was an overkill and asked for other options and I started wondering "Is it really and overkill ? Why ?" Due to my lack of experience I simply think it it, but can't really provide an answer if I'm asked to explain why. Is it performance ? Is it too much configuration (Which I don't mind) ?   Thanks!


I have a SOT23 electronic part AEWU9 - where can I find a datasheet?

I have a SOT-23 part with part number AEWU9 but couldn't find any datasheet on the net. Where can I search more for this part?


Does the word after a question mark start with a capital letter?

Should I write it like this? Or perhaps like this? Should I write it like this? or perhaps like this?   What about after an exclamation mark or semicolon?


Get current folder name by a DOS command?

Is it possible to get the current folder name (not current directory path)  by using a DOS command?  If so, how?  The closest I got was this but it doesn't do it:  for /f "delims=\" %%a in ("%CD%") do set CURR=%%a echo.DIR: %CURR%   note: the above attempt was me attempting to tokenize the string and get the last token set as the CURR variable.


prove that $\frac{1}{x}$ is not uniformly continuous on $(0,1)$

I would like to show that the function $\frac{1}{x}$ is not uniformly continuous on $(0,1)$ using two approaches.   First Approach:   We have the fact that if a function $f$ is uniformly continuous on an open interval $(a,b)$, then the function $f$ is bounded on $(a,b)$. By using its contrapositive, since $\frac{1}{x}$ is not bounded on $(0,1)$, it is not uniformly continuous.  Second Approach:  Proof by definition. Note that the definition of non-uniform continuity is:  There exists an $\epsilon_0>0$ such that for all $\delta>0$, there exists $x,y \in (0,1)$ such that $|x-y|<\delta$ but $|\frac{1}{x} - \frac{1}{y}| \geq \epsilon_0$.  Assume that $\delta < 1$. Let $x = y + \frac{\delta}{2} \in (0,1), y < \frac{\delta}{2} \in (0,1), \epsilon_0 = 1$. Then we have   $$|\frac{1}{x} - \frac{1}{y}| = |\frac{1}{y + \frac{\delta}{2}} - \frac{1}{y}| = \frac{\frac{\delta}{2}}{|y(y + \frac{\delta}{2})|} > \frac{\frac{\delta}{2}}{(\frac{\delta}{2})(\delta)} = \frac{1}{\delta} > 1 = \epsilon_0 $$  If $\delta \geq 1$, then let $\delta^{\prime} = \frac{1}{\delta}$ so that $\delta^{\prime} \leq 1$. The rest proceeds the same as above.   Question: Are my two approaches correct?


What model does Lightroom use for lens correction?

I use Adobe Lightroom to remove the barrel distortion from GoPro images. Does anyone know if this software uses the Brown-Conrady model to achieve the lens correction? If not which model does it use? From an extensive Google search I have done, I didn't come up with an answer.


Old series of SciFi adventure puzzle picture books

There used to be a series of adventure puzzle books at the local library where I grew up, and I have been having a real hard time tracking them down.   SciFi was a constant theme. As far as I remember, the books always took place on alien planets, or some other SciFi setting. The books almost always involved having to escape from some sort of predicament. The books were non-linear. For example, you might be asked to pick a direction and flip to a differant page. You might be given multiple possible solutions to a puzzle, each one pointing to a differant page. This was a less common element, as these books were not of the "choose your own adventure" sort, however, if you took the wrong path you could die. The books were vivid in colour, and had particularly strange artwork (even for a SciFi book - though these were the impressions of a 10 year old boy). In one book, the hero crash lands on an uncharted alien planet. Throughout the pages, the hero points out the particularly odd and amazing creatures and phenomenon encountered on the planet. I remember one scene where the hero has to escape from some giant alien frogs. In another scene, the hero is presented with a sort of maze, with three exits. Two exits led to other pages, and could be played on until successful completion. One exit led to the hero dieing a grizzly death. I read these books in a library in Sydney, Australia. At the very latest, I would have read them up to 1999. As I previously stated, the books heavily featured interesting art work depictions of the scene and puzzle. As such, the books were fairly large - about as tall as an A4 page, but wider.


Will my UGPA keep my application from even being looked at, despite having turned things around?

I'm an international student who recently applied to CS Ph.D. programs in the US and this thought's been eating me up. My undergrad background isn't actually in CS. I was originally a literature major and did a CS double major. I wasn't familiar with anything, so my GPA tanked. It's around 3.1-3.2/4.0. If you take the CS-only courses, then it's actually around 2.95/4.0. I'm a master's student right now, and I've managed to maintain a GPA of around 3.8-3.9/4.0. Aside from my UGPA I think my application isn't _that_ bad - good GRE/TOEFL scores, publications as a coauthor, and good LoR's. However, I've been consistently hearing that the undergrad GPA is "what matters most" and that it may keep me from having a person even reading my application. I personally think that's asinine and doesn't make any sense, but I suppose I'm not in a position to be voicing my opinion on that. I'm just wondering what the point of working hard to turn things around is if someone's application won't even be looked at. The anxiety's been even worse because I've been hearing of people who chose the same POI's as me getting interviews, and I  haven't been hearing anything yet. I was hoping that people more knowledgeable than I am may be able to provide their two cents. Thanks.


Why not n-tuples instead of functions for cartesian product of infinite indexed family of sets?

Following is the definition of Infinite Cartesian Products.   For cartesian product, why do not we just use cartesian product and get "n-tuples" instead of "arbitrary(possibly infinite) indexed family" of function sets? I am not sure but the reason might be that there is not any usual way to select from tuples unless a function used so functions used in first place. (Actually there is projection map definition in wiki article but not sure about it.) (This answer is also about n-tuple item access;  ) So, is not there any way other than functions to access n-tuple items? So, what is the point actually?


Removing an item from file when there is only 1 item

When I use my removeOrder() method it successfully takes the order from the list and then I have to use my save() method which runs this code.  I get thrown out with a null pointer exception because the method doesn't complete when there are 0 items in the list.  I need some help figuring this one out please.  I understand why i'm getting the null pointer exception, printWriter is null and my method wont iterate over the orderList if there are no orders in the list so it goes to out.close() and it can't close with a null value.  I just need help figuring out the best way to possibly do a if statement to make it work the way I want it too.      private void writeToFile(List<Order> orderList) throws      FlooringMasteryDaoFileException {     //PrintWriter out = null;     LocalDate date;      //if (orderList.size() >= 1)     for (Order dateOrder : orderList) { // iterate over my orderList      and then get the date from each Order, then format that date to a      string.         date = dateOrder.getDate();         String stringDate = formatDate(date);          try {             out = new PrintWriter(new FileWriter("order_" + stringDate      + ".txt"));         } catch (IOException e) {             throw new FlooringMasteryDaoFileException("Could not save      order data.");         }          for (Order currentOrder : orderList) {             if (currentOrder.getDate().isEqual(date)) {                  out.println(currentOrder.getOrderNumber() + DELIMETER                         + currentOrder.getCustomerName() + DELIMETER                         + currentOrder.getTaxRate() + DELIMETER                         + currentOrder.getProduct() + DELIMETER                         + currentOrder.getArea() + DELIMETER                         + currentOrder.getMaterialCost() + DELIMETER                         + currentOrder.getLaborCost() + DELIMETER                         + currentOrder.getTax() + DELIMETER                         + currentOrder.getTotal() + DELIMETER                         + currentOrder.getDate());             }         }         out.flush();     }      out.close(); }


How to force reboot ubuntu system when it hangs?

What is the command that is used to reboot the system in case of ubuntu Freezing and unable to do any operation ?


How to always share "Seagate Expansion" as F

We have 10 "Seagate Expansion" drives that we use in rotation as backup storage devices. Whenever we swap the drives over the share gets broken.  Is it possible since all the drives have the same name that we can keep the share as "F" whenever we swap the drives?  I have looked in the properties of the drives but cant see anything that looks like it will help remember the shared letter on the drive.  We are using them on a Windows Server 2008


I have a Toshiba laptop satellite with a 300GB hard drive and it is partitioned into six partitions and I want to cut/trim them to just dual-boot Windows 7 and Ubuntu 14.04, which is a reinstall so it /sda8. I had 13.10 which /sda6 and I also have 14.10 /sda7 all are ext4's and was able to reformat the partition 6 but I can't delete the partition and I keep getting:   CAN'T DELETE AS LONG AS A PARTION GRATER 6 IS MOUNTED   And I cant unmount /sda8 still, that what is running, also how would I get these other partitions removed after? Can I combine the old into one and change /sda8 to 6 so it will automaticaly load? I want to keep Windows 7 at present.


I have two lists of words:  $ head -n 15 words.txt > list1 $ tail -n 15 words.txt > list2   I paste them together into columns:  $ paste list1 list2   The result is this, with tabs between the columns:  2       Zwiebel 1080    zwieselite &c      Zwingle 10-point        Zwingli 10th    Zwinglian 11-point        Zwinglianism 12-point        Zwinglianist 16-point        zwitter 18-point        zwitterion 1st     zwitterionic 2,4,5-t Zwolle 2,4-d   Zworykin 20-point        ZZ 2D      zZt 2nd     ZZZ   I would like this instead, where there are more tabs between the columns on certain lines:  2               Zwiebel 1080            zwieselite &c              Zwingle 10-point        Zwingli 10th            Zwinglian 11-point        Zwinglianism 12-point        Zwinglianist 16-point        zwitter 18-point        zwitterion 1st             zwitterionic 2,4,5-t         Zwolle 2,4-d           Zworykin 20-point        ZZ 2D              zZt 2nd             ZZZ   How do I do this?


The continuity of $f(x,y) = \frac {\sin (xy)} {\sqrt {x^2 + y^2}}$ at $(0,0)$

I got a function:       $f(x,y) = \frac {\sin (xy)}  {\sqrt {x^2 + y^2}}$ if $(x,y) \not =  (0,0)$, otherwise $f(x,y) = 0$,   and I should look at its continuity in $(0,0)$   I tried the sandwich theorem but got slightly stuck unfortunately  $ 0 \le \left|\frac {\sin (xy)}  {\sqrt {x^2 + y^2}}\right| \le 1$   I was thinking that $\sin (xy)$ is a restricted function, but not sure what to with $\sqrt {x^2 + y^2}$ if $x,y$ are too small so I think my idea doesn't work. Then it would look like:  $ 0 \le \left| {\sin (xy)} \right| \le \sqrt {x^2 + y^2} = 0$  Any other idea please?


I'm trying to find a basis for the kernel for the following mapping:  Considering the linear transformation T: $M_{33} \rightarrow M_{33}  $ defined by $T(A) = .5(A + A^T)$. I know that this is basically asking for the basis under the condition that $T(A)=0$ which means that $A+A^T=0$ so $A^T = -A$.  I found that matrices that fit this condition are Skew Symmetric Matrices.  However, I'm not sure how to find the basis for the kernel of these matrices.


What's the proper way to minimize MySQL connection overhead in a multithreaded Python application?

I'm using Python's multiprocessing package to set up worker threads to do work and update the result to a MySQL database. What's the right way to set this up so that a database connection is not re-established each time a worker thread is initialized?


Coefficient Problem (polynomial expansion)

Let $C$ be the coefficient of $x^2$ in the expansion of the product $(1 - x)(1 + 2x)(1 - 3x)\cdots(1 + 14x)(1 - 15x).$ Find $|C|.$   Just to begin,  $(1-x)(1+2x) = -2x^2 + x + 1$  $(1-x)(1+2x)(1-3x) = 6x^3 - 5x^2 - 2x + 1$   But expanding on like this take too long.  In the end the terms will be like:  $(1 - 15x)(a_0 + a_1x^1 + a_2x^2 + ....)$  Then just looking at the $x^2$, it will be:  $(a_2x^2 - 15a_1x^2) = x^2(a_2 - 15a_1)$  But it it still a very hard problem, any hints?


WordPress and EverNote integration, any existing solutions?

Actually the tag and category system in WordPress and EverNote are very similar, almost exactly the same.   We can create a notebook/notebook group in EverNote, its counterpart in Wordpress is Category/Sub Category We can mutiple tag any note in EverNote, similarly we can tag any post in Wordpress as well!   Since the two are so similar to each other in categorizing the article, I am wondering whether there is a existing solution to automatically convert between the two.   Like one click to post my EverNote note to WordPress under the same category and same tag. Or pull down my WordPress article to my EverNote account under the same category and same tag.  Preferably it can also handle image\video uploading issues as well. :)  I saw a similar questions asked years ago:  So I was wondering is there any new update for this idea right now?


How to make a worldboard extend 1 block everyday

I want to make a minecraft survival world where the world boarder extends 1 block everyday. I tried using command blocks and daylight sensors but got confused.


Am I eligible to transit without visa in the UK?

I am transiting through the UK on my trip from the US to Italy. I am arriving at Heathrow and will be going through immigration to get to Stansted, where I'm catching my flight to Italy. I am a Vietnamese citizen but hold a US visa and last entered the US on such a visa in June. Although my citizenship may require me to apply for a transit visa, I'm wondering if I could do without by meeting the transit without visa concession:    You might be eligible for ‘transit without visa’ if:   you arrive and depart by air have a confirmed onward flight that leaves on the day you arrive or before - midnight on the day after you arrive have the right documents for your destination (eg a visa for that country) you’re travelling from (or on part of a reasonable journey from) Australia, Canada, New Zealand or the USA and it’s less than 6 months since you last entered that country with a valid entry visa.   Also worth noting: I am doing a short study course in England this fall for my study abroad program, and I have acquired the appropriate visa for that. Unfortunately the valid date on this visa is the start date of my course, which is after when I wish to transit through the UK to do my Europe trip. I figure re-applying for a visa or applying for a transit visa would be a fuss and am hoping to be able to qualify for the concession. I would appreciate any thoughts and advice.


I have installed windows 10 on my pc and I had Ubuntu before I install that. But after windows installation I couldn't boot Ubuntu since grub2 menu doesn't appear and it will directly boot to Windows. I need a way to get grub2 menu.


Is there a "Identity (Analysis)" tool for QGIS?

In ArcGIS, there is a tool called "." Say you have a bunch of points. Some points fall in polygons of interest, some don't. Each polygon has a unique ID. This tool will add a field to the points and assign the unique ID of the polygon that contains it. Is there a tool that does this in QGIS?   question does not ask the same question I am.


I want to bind a single property to two buttons for Visiblity. I am using BooleantoVisibility Converter. I am able to hide or show button based on the Property value. My issue is, I want to show only one of two buttons. Below is my Code. Is there a way to bind using "NOT" or I have to create a new Property ?   <telerik:RadButton Content="Close" x:Name="btnClose" Visibility="{Binding Path=IsNewRecord, Converter={StaticResource BoolToVisiblity}}" Command="{Binding CloseCommand}" CommandParameter="{Binding ElementName=ProductCombobox, Path=Text}"/>  <telerik:RadButton Content="Delete" x:Name="btnDelete" Visibility="{Binding Path=IsNewRecord, Converter={StaticResource BoolToVisiblity}}" Command="{Binding DeleteCommand}" CommandParameter="{Binding ElementName=ProductCombobox, Path=Text}"/>


Problem when appending to 2D list in python

First I have initialized mylist as follows :  buf = [] mylist = [] for i in range(0, 10):     mylist.append(buf)    Now mylist is like this :  mylist:  [[], [], [], [], [], [], [], [], [], []]   Now when I want to append a value to the first index like so:  mylist[0].append(3)   And I print mylist again I get this:  [[3], [3], [3], [3], [3], [3], [3], [3], [3], [3]]   Where it should only add the number 3 to the first list inside mylist as so:  [[3], [], [], [], [], [], [], [], [], []]   What is wrong with my code? when I don't use the above for loop to create embedded lists and I do it manually, I don't have this problem. And I need to do by using for loop because I need a huge embedded list, I put 10 there just for the sake of simplicity.


Comparing Types, Values and Objects in JavaScript (Not a duplicate)

Edit: This is not a duplicate question.  My function is different and doesn't use direct object comparison methods.  I am working through Eloquent Javascript book and in the fourth chapter, the last exercise required a function deepEqual that takes two arguments and compares them.    If the arguments are different types, it should return false. If the arguments are the same type and same value, it should return true otherwise, return false. If the arguments are both objects, their properties and values should be compared. The function call should return true if both objects have same properties and value in the same order. For example, if we have the following objects: object1 = {a: 1, b: 2}, object2 = {a: 1, b: 2}, object3 = {a: 2, b: 1}, comparing object1 and object2 should return true, but comparing object1 and object3 should return false. Lastly, if the objects have nested objects as parameters, a recursive call of deepEqual to compare the nested objects.    So, here is my solution. It is quite convoluted with if/else statements, pardon it.    function deepEqual(obj1, obj2){    var checkForSameTypes = (typeof obj1 === typeof obj2);    if(checkForSameTypes === true){      //same type but not objects     if(typeof obj1 !== "object" && typeof obj2 !== "object") {       if(obj1 == obj2){         return true;       }else{         return false;       }       // same type and objects     }else if(typeof obj1 === "object" && typeof obj2 === "object"){        //loop first object and compare properties with 2nd object       for(var prop in obj1){         if(obj2.hasOwnProperty(prop)) {          //if 2nd object has property "prop" compare           if(typeof obj1[prop] === "object" && typeof obj2[prop] === "object"){             //recursive call             deepEqual(obj1[prop], obj2[prop]);           }else if(obj1[prop] === obj2[prop]) {             //loop goes on to the next property             continue;            }else if(obj1[prop] !== obj2[prop]){             return false;           }          //it doesn't have property "prop" so return false         } else {           return false;         }       }       //finishes loop and all properties are the same       return true;      }    // they are not the same types so return false   } else {     return false;   } }   PROBLEM  The function works fine except when an argument is an object with nested objects.  Take these objects for example   var type = {go: {inside: "yes"}, come: 2}  var see = {go: {inside: "no"}, come: 2}   var fine = {when: 3, go: 4};`   When I compare type and see with a call to deepEqual(type,see);, this returns true which is wrong because the value of the property of the nested object go is different.  I have gone through the entire code on paper, line by line and do not know what I have to do, or if the recursive call isn't working to compare the properties rightly or I just don't have the knowledge yet.   Can anyone offer a solution? or and if possible a better way or thinking process to solve this case?   Note: The code only compares object properties and values. It doesn't need to compare constructors or prototypes.


The density function for a random variable X is given in terms of a constant $c$.  Find the value of $c$.  What is the corresponding distribution function?  Sketch both the density and the distribution functions. Finally, find the probabilities.  5.1 $f(x)=0$ for $x<0$ and $f(x)=\frac{c}{(x+1)^4}$ for $0>x$   $P(X>4)$  $P(X<2)$  $P(1\le\ X<3)$   I get $c=3$ by taking the integral, and then I am a little confused as to why  $F(x)=1-\frac{1}{(x+1)^3}$  Is that because in solving for $c$, I ended up with $1=\frac{c}{3(x+1)^3}$, so substituting c in I get $1=\frac{1}{(x+1)^3}$?  And, then  $P(X>4)=1-P(X\le\ 4)$ $=1-(1-{1}{(1+4)^3})$ $=1/125$  $P(X<2)=1-{1}{(1+2)^3}$ $=26/27$  I guess I am a little confused about what $F(x)$ and $f(x)$ actually MEAN? And thus that leads to my confusion about what the differences between $>$ and $<$ and greater than or equal to are, etc etc in terms of the equations. The ones above I solved by comparing to the book but I still don't understand what they mean really.  So as a result, I don't really get how to solve $P(1\le\ X<3)$.  5.2 $f(x)=ce^x$ for $x<0$ and $f(x)=ce^{-x}$ for $0>x$  5.3 $f(x)=0$ for $x<-1$ or $x>2$ and $f(x)=cx^2$ for $-1<x<2$


Suitability of mysql on a raid 5 server with raid card

I would like to ask is mysql ok to run a on a raid 5 server. The raid is done using  hardware raid and not software. I saw some older links like this  which gives negative opinion on settings raid 5? As time pass I guess hardware have improve and I guess it should be better now ? Any opinion ?


Make logical/physical volumes invisible to certain programs or users (to prevent hard drives spinning up)?

Windows has a serious problem with hard drives.   I have a bunch of hard drives (6+) which I use only occasionally for storage, accessing them perhaps twice a day on average. The rest of the time, I keep them spinned down for obvious reasons.  The problem is, Windows (and/or the many poorly-written programs running on it) just loves to spin up these hard drives every so often. I've used diagnostic tools such as Process Monitor to see if there's any specific trigger, but there's not. Many different programs (example: Photoshop, games, etc.) can simply get "nosy" and try to sniff the properties of your drives or storage volumes for no apparent useful reason.  The spin-up process also takes a long time because of the number of drives involved. So launching Photoshop takes over a minute instead of the couple of seconds it should take because it has to wait for all of my drives to spin up (even though it's not actually using them, at all).  Is there a way to simply hide or otherwise completely restrict access to these storage-only drives at a volume level, so that they simply don't exist to any snooping programs except those I explicitly allow?  EDIT: NOT A DUPLICATE  I posted a  but this question is different. The solutions posed in that question still allow the logical volume names to be seen (e.g. by using the mountvol command). Therefore, restricting access at the "drive letter" level is not enough. I want to be able to restrict access to (or limit visibility of) the actual volumes themselves.  Again, this question is not a duplicate: I am asking how to hide low-level volumes, not drives. They are different beasts.


Biber.exe infected by Trojan BackDoor.Generic18.ALDX

My antirus software AVG 2014 just detected that there seem to be a Trojan in the biber.exe program which was last updated on June 6, 2014 and is in the package miktex-biber-bin. Has anybody else had the same problem?


Is it correct to use dash ... dash here?

I'm having a sentence:     The largest rocket ever built - the Saturn V, which launched the first space station and sent astronauts to the Moon ... remains the most powerful vehicle in history.   I wonder whether it is correct to put another dash in the blank. Thank you!


"I didn't go to the office yesterday". "I didn't go to work yesterday"

I didn't go to the office yesterday. I didn't go to work yesterday.  Why is the article 'the' omitted in the second sentence.


Python Compilation as executable stand alone application?

I wrote a small program in Python. Actually it's not even a program really :p.   It's just this:      print(1+1)   When I saved it, it saved it as py1.py (a python file). And apparently, Python files can be executed, and it executed fine.  Is there anyway to be able to compile it into bytecode? Also is there a way to make it a stand alone application?  I could be getting terms wrong, I'm more of a Java person. I'm new to Python.  Thanks!


Word for dislike of doing things unnecessarily

Is there a name for people who can't stand doing things unnecessarily resulting in waste? (Of time, energy, money etc)  E.g. I consider myself to be a ______. I can't stand unnecessary waste.  Like how a pacifist is someone who doesn't have an affinity towards violence.


I think a netbook I'm tasked with getting back into shape might have the Vundo/Virtumonde virus. I've run MS Security Essentials, Malwarebytes and Spybot but it's not spotting it.   I know this is a hard one to detect (and harder to remove). Before I go through the hassle of ordering system restore CDs (or just putting Ubuntu on this thing and being done with it) I wanted to be sure it, indeed, has this virus. Is there a spyware/anti-virus/malware app that is known to be able to detect the Vundo virus?


I am looking for a general formula for $$D_n=\frac{d^n}{dx^n}x^x$$ Here's what I've gotten so far:  $n=0$: $$D_0=x^x$$ $n=1$: $$D_1=x^x(\log x+1)$$ $n=2$: $$D_2=x^{x-1}+x^x(1+2\log x+\log^2 x)$$ And then I gave up. But I would be surprised if there wasn't a general formula.   In any case, I am trying to find $D_n$ so that I can create a Taylor series for $x^x$. If this isn't the way to go, please point me in the right direction or give me a series representation for $x^x$


Find a closed form for  $$S_n = 1 \cdot 1! + 2 \cdot 2! + \ldots + n \cdot n!.$$ for integer $n \geq 1.$ Your response should have a factorial.  Another induction problem, I tried some examples but they didn't really tell me anything.


why does the hot water boiler used for heat, open up and release water then close back up?

hot water boiler, occasionally opens and closes releasing water to floor. just started doing this (cold weather) does the relief valve need replaced? or is this a common action?


When should you use WP_Query vs query_posts() vs get_posts()?

It seems like half the tutorials in the  and around the blogosphere use  and half use . They all do similar things, so when should I use one over the others?


Workflows are getting suspended for other users than me

I created a site in SharePoint 2013 and some workflows in SharePoint Designer 2013. Now I am testing it and I can see that everything is working great when I am operating only on items, that I created.    When I try to start a workflow on item created by another user an error occurs and whole workflow is suspended.  When I try to run site workflow, which loops through all items in my list it will work well until it meets item created by another user.   I am the site owner, I have full control permissions. I gave other users access to my site by adding NT Authority\Authenticated Users to default Site Members group.  Do you know what is causing suspending my workflows?  Edit:  Error description:     RequestorId: 67c7e8af-caf5-10a9-0000-000000000000. Details: An   unhandled exception occurred during the execution of the workflow   instance. Exception details: System.ApplicationException: HTTP 401   {"Transfer-Encoding":["chunked"],"X-SharePointHealthScore":["0"],"SPClientServiceRequestDuration":["57"],"SPRequestGuid":["67c7e8af-caf5-10a9-a476-6227e56256d6"],"request-id":["67c7e8af-caf5-10a9-a476-6227e56256d6"],"X-FRAME-OPTIONS":["SAMEORIGIN"],"Cache-Control":["max-age=0,   private"],"Server":["Microsoft-IIS/8.5"],"WWW-Authenticate":["Negotiate","NTLM"],"X-AspNet-Version":["4.0.30319"],"X-Powered-By":["ASP.NET"],"MicrosoftSharePointTeamServices":["15.0.0.4617"],"X-Content-Type-Options":["nosniff"],"X-MS-InvokeApp":["1;   RequireReadOnly"],"Date":["Fri, 07 Jul 2017 04:32:40 GMT"]} at   System.Activities.CodeActivity.InternalExecute(ActivityInstance   instance, ActivityExecutor executor, BookmarkManager bookmarkManager)   at   System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor   executor, BookmarkManager bookmarkManager, Location resultLocation)


Is it at all possible to open a 3rd party iPad app in a mac (xcode emulator, for example)

Someone asked me this - I think the answer is no for a number of reasons, but I wanted to confirm. Is there any way to open an iPad app on a mac desktop or laptop?  For example I download a publisher's ipad reader - call it the WSJ's, for example - could I run it on my iMac and buy issues etc?


Everything moves, not just the selected vertex

I go into edit mode for an object, select vertex mode, select one of the squares, then pull the arrow it moves just the square like it is suppose to. If I resize it then go into edit mode it no longer does this.  When I select vertex select a square, then go to move that square everything moves now, not just the vertex. Why?   I have already reset everything back to default settings and it is still doing this. It wasn't doing this yesterday, but today it is.


Can someone earn money from Credit Card Cash Back by buying and selling back and forth?

If I understand cash back programs correctly, the Credit Card companies give you back a percentage of the money you spent on a purchase. 1% would give you back $1 on a $100 purchase.  If this is the case why can't two people (or more) just buy and sell to each other the same product back and forth to earn cash back?


Ways to perceive something: textually, visually, acoustically?

Textual describes something as being in text form. I can read something that is textual. Something that is visual can be viewed. I can listen to something that is acoustical in nature? I don't think acoustical is the right word. What word am I looking for?


why calculate result is -3.0531133177192E-16

Why the code's result is that? -3.0531133177192E-16  I think the result should be zero.          $a = floatval('-0.92');         $b = floatval('-0.55');         $c = floatval('1.38');         $d = floatval('0');         $e = floatval('0.09');         $temp=$a+$b+$c+$d+$e;         var_dump($temp);         die();   I'm a php fresher, I'm really confused by this result, So any answer will be appreciated.


Cannot install latest version of a package

I would like to install the latest version of a package called libqt5core5a.  I ve checked the  and there is a version I am interested in.  Let's check the current installed version of that package:    userk@dopamine:~$ sudo apt-cache policy libqt5core5a    libqt5core5a:   Installed: 5.5.1+dfsg-16ubuntu7.6   Candidate: 5.5.1+dfsg-16ubuntu7.6   Version table:   *** 5.5.1+dfsg-16ubuntu7.6 500         500 http://it.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages         500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages         100 /var/lib/dpkg/status      5.5.1+dfsg-16ubuntu7 500         500 http://it.archive.ubuntu.com/ubuntu xenial/main amd64 Packages   I ve tried a quick  $ sudo apt-get update && sudo apt-get upgrade   Checked again the installed version and noticed that no upgrade occured.  Tried then with a more specific request and got a not found error...  $ sudo apt-get install libqt5core5a=5.12.2+dfsg-4ubuntu1  Reading package lists... Done Building dependency tree        Reading state information... Done E: Version '5.12.2+dfsg-4ubuntu1' for 'libqt5core5a' was not found   Checking again other commands to see the latest available version on the remote repository and:  $ aptitude versions libqt5core5aPackage   libqt5core5a:                         p   5.5.1+dfsg-16ubuntu7                     xenial                500  i   5.5.1+dfsg-16ubuntu7.6                   xenial-security,xenia 500   Package libqt5core5a:i386: p   5.5.1+dfsg-16ubuntu7                     xenial                500  p   5.5.1+dfsg-16ubuntu7.6                   xenial-security,xenia 500   How do I install a specific version of a package on Ubuntu 16.04?


Printing content of file from nth line to nth line [Shell Scripting]

** > Hey buddies I have a file having names of 200 countries.I want to print names of countries from 50th line to 80th line .How can  i do so in bash?? **


How do remove the CD / DVD install as a source for apt-get packages when installing new features?

I'm running a Ubuntu server (9.0.4 'Jaunty') as a VMware image.  It's a real pain on the odd occasion I need to install a new package to have to fish out the install CD-ROM, and make it available to the VMware image so I can continue the package install.  Is there any way to take the original installation media out of the list of source packages - I'm assuming all packages will be available on the internet.  Thanks.


Is the arXiv a good way to get feedback on one's work?

I have developed a method to process images I use for my research. It's nothing revolutionary but I think it might be useful to others than me, and why not, be worthy of being published somewhere (at least for me to cite when I use it).   As it is outside my primary field of research, nobody in my direct lab vicinity can help evaluating its scientific value or novelty (I did a bit of literature research and didn't find any obvious precedent). Normally I would just put it as an appendix in the first article where I use it, but this one is quite long to describe and completely out of my field. It would thus be off-topic in the journals in which I usually publish.  I though of seeking collaboration from someone in my university who works in signal/image processing, I don't know anyone personally and I foresee possible political issues, authorship quarrels, etc. I would nonetheless like to get some sort of evaluation before submitting to a journal. As an outsider, I wouldn't like to waste an editor's time and make a fool of myself.  I have zero experience submitting to the arXiv, by looking at the website it's not clear how/if there is an active system of feedback, even informal.   Is it advisable to submit my methods paper there and expect a feedback?


How can I summon an entity with motion relative to where I'm facing?

So for a while now, I've been trying how to figure this out ever since the new '^ ^ ^ ' command was introduced. I've always done research but I wasn't able to find something reliable or something I was looking for.  An example of what I mean by this question is something like dropping an axe and having an invisible armor stand, decorated with the axe, fly in the direction I was facing. Simply put, just being able to fire a moving projectile relative to where the player is facing.  Thank you for any help!


which year TRIM was first used on SSD’s?

New here, so apologies if it has been asked before.  I was curious as to whether Its known when TRIM first started being implemented into SSD’s?


Got java.lang.NoClassDefFoundError: org/apache/batik/dom/svg/SAXSVGDocumentFactory when using Interleaved2Of5 Barcode format

I am trying to print a list of barcodes, data for which which will be sent to the JasperReports jrxml in a List of Strings.  I am successful in printing the barcodes using barbeque format, but now I have to change the format of barcode to barcode4j Interleaved2Of5. I have added the following dependencies in my pom.xml:  <dependency>     <groupId>net.sf.barcode4j</groupId>     <artifactId>barcode4j</artifactId>     <version>2.1</version> </dependency>  <dependency>     <groupId>org.apache.xmlgraphics</groupId>     <artifactId>batik-bridge</artifactId>     <version>1.11</version> </dependency>   But still getting the below error while running the code:  java.lang.NoClassDefFoundError: org/apache/batik/dom/svg/SAXSVGDocumentFactory  Can any one tell me if there is any issue with the dependecies added or I need to add any other dependecies?


Unity: When attaching my custom camera script camera shakes when player starts to move fast

Here is my player code.  Rigidbody rb;  Vector3 currMovement; public float jumpSpeed = 10; public float moveSpeed = 10; public float rotSpeed = 180;  float distToGround;  public float posSmoothTime = 0.5f; float currPos; float targetPos; float posVel;  public float rotSmoothTime = 0.5f; float currRot; float targetRot; float rotVel;  void Start() {     rb = GetComponent<Rigidbody>();     distToGround = GetComponent<Collider>().bounds.extents.y; }  bool isGrounded() { return Physics.Raycast(transform.position, Vector3.down, distToGround + 0.1f); }  void Update() {     Move(); }  void Move() {     // Rotation smoothing.     targetRot = Input.GetAxisRaw("Horizontal") * rotSpeed * Time.smoothDeltaTime;      if (targetRot > 360)         targetRot -= 360;     if (targetRot < 0)         targetRot += 360;     currRot = Mathf.SmoothDampAngle(currRot, targetRot, ref rotVel, rotSmoothTime * Time.smoothDeltaTime);      transform.eulerAngles += new Vector3(0, currRot, 0);      // Movement smoothing.     targetPos = Input.GetAxisRaw("Vertical") * moveSpeed;      currPos = Mathf.SmoothDamp(currPos, targetPos, ref posVel, posSmoothTime * Time.smoothDeltaTime);     currMovement = new Vector3(0, 0, currPos);     currMovement = transform.rotation * currMovement;      if (isGrounded())     {         if (Input.GetButtonDown("Jump"))             rb.velocity += Vector3.up * jumpSpeed;     }      rb.position += currMovement * Time.smoothDeltaTime; }   I have a Rigidbody attached to my player. I think the problem is with my camera script. Here is my camera script.  public Transform player; Quaternion targetLook; Vector3 targetMove; public float smoothLook = 0.5f; public float smoothMove = 0.5f; public float distFromPlayer = 5, heightFromPlayer = 3; Vector3 moveVel;  void LateUpdate() {     CameraMove(); }  void CameraMove() {     targetMove = player.position + (player.rotation * new Vector3(0, heightFromPlayer, -distFromPlayer));     transform.position = Vector3.SmoothDamp(transform.position, targetMove, ref moveVel, smoothMove);      targetLook = Quaternion.LookRotation(player.position - transform.position);     transform.rotation = Quaternion.Slerp(transform.rotation, targetLook, smoothLook); }   }  The player is not an parent of my camera. When I parent the player to my camera the shake stops. But I want a custom smooth camera movement with my custom scirpt, so I can't make the player a parent of the camera.


Where to place 'only' relative to prepositions?

I know that questions about the placement of 'only', are often asked here; accordingly, I searched for an answer to my question before posting it.  Question  Where are focusing adverbs placed relative to prepositions?  For example,   For his presentation, he needed to talk only about tomatoes. For his presentation, he needed to talk about only tomatoes.   My Attempt to Answer the Question  In both examples, it seems to me that 'only' is placed close enough to what it is intended to modify (the topic of the subject's discourse: tomatoes) that I cannot see any justifiable misinterpretations.  One of the examples sounds better to me, but at this point in my studies, I am more interested in what the traditional rules of grammar require, than in how the wordings sound.


How to make the Terminal make a noise on command completion?

Let's say I run a command which takes a long time to do its stuff, but I don't want or need to look at it the whole time, and as I need to do some other stuff as well I might get into that and forget to check on how the command is doing for some time... Then when I finally do check I may find that the command finished 3 hours ago and needed my attention then... Or perhaps it didn't need my attention, if I had seen that it had finished at the time I would have had more time to run more commands...  So I was wondering if there is a way to get it so that when a command or program has been run, whenever it finishes and returns to $, for it to make a little sound, like play an mp3 file or something? Though it would be acceptable just to get this working in gnome-terminal, I would like it in as many CLI environments as possible including the TTYs if that would be possible... I am running Ubuntu GNOME 15.10 with GNOME 3.18.


How do I stop cell phone interference on my wired speakers?

I read , and while it does explain what's going on, it doesn't give any solutions. I'm using Creative A60 speakers (I think I bought these back in 2011, but not sure), plugged in through 3.5mm audio jack in the back of my computer. They're beeping/buzzing regularly when my phone is on my computer desk. I don't have any room to move my phone away from my speakers in a way that doesn't increase the risk of accidentally pushing it off, so I'm looking for an alternative option to make this interference go away. It's extremely annoying, especially when it happens at 11 PM when everyone else is asleep, and I want to get rid of it, preferably without buying new speakers. How do I stop this interference?


Why does the sizeof operator when used on structures always gives different number of bytes  than actually used by the structure to store the data(what i expect)?


I have a string variable which is receiving a Guid. I need to convert this string back to Guid as the database field is of type Guid.  I tried using:    Guid myGuid = Guid.Empty;; myGuid = Guid.Parse(myId);   But keep getting Format Exception; Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).  Below is my code:   public string addVehicleDetails(string vname, string vtype, string regNumber, string ftype, string fefficiency, string insby, DateTime datecreated, string myId)         {              string result = string.Empty;             tblVehicleDetail myVehicleDetails = new tblVehicleDetail();           //  Guid myGuid = Guid.Empty;             System.Guid myGuid = new Guid(myId);            // myGuid = Guid.Parse(myId);             try {                 // Add details into vehicle details                 myVehicleDetails.VehicleName = vname;                 myVehicleDetails.VehicleType = vtype;                 myVehicleDetails.RegistrationNumber = regNumber;                 myVehicleDetails.FuelType = ftype;                 myVehicleDetails.FuelEfficiency = fefficiency;                 myVehicleDetails.InsuranceBy = insby;                  myVehicleDetails.DateCreated = datecreated;                 myVehicleDetails.Guid = myGuid;                  dc.tblVehicleDetails.InsertOnSubmit(myVehicleDetails);                  dc.SubmitChanges();                  return result = vname;              }             catch(Exception exp)             {                 exp.ToString();                 return result = "Error in Adding Vehicle Details.";             }         }   Any solution for this?


An element of a group has the same order as its inverse

If $a$ is a group element, prove that $a$ and $a^{-1}$ have the same order.   I tried doing this by contradiction.    Assume $|a|\neq|a^{-1}|$  Let $a^n=e$ for some $n\in \mathbb{Z}$ and $(a^{-1})^m=e$ for some $m\in \mathbb{Z}$, and we can assume that $m < n$.  Then $e= e*e = (a^n)((a^{-1})^m) = a^{n-m}$. However, $a^{n-m}=e$ implies that $n$ is not the order of $a$, which is a contradiction and $n=m$.  But I realized this doesn't satisfy the condition if $a$ has infinite order. How do I prove that piece?


Can I convert a Minecraft: Education Edition world to Bedrock Edition?

I made a world in Education Edition and would like to continue playing in Bedrock. I exported the world, but when I try and open it in Bedrock it says:   This level was saved from Minecraft: Education Edition. It cannot be loaded.  Is there a way to load it?


trigger PaymentTrigger on Money_Received__c (after insert, after update, after delete) {      Money_Received__c moneyReceived = [SELECT Reservation__c FROM Money_Received__c];      Reservation__c reservation = [SELECT Id, Name, Total_Recieved__c FROM Reservation__c where Id =: moneyReceived.Reservation__c];     Decimal totalReceived = reservation.Total_Recieved__c;      if(Trigger.IsInsert){         for(Money_Received__c payment: Trigger.new){             totalReceived += payment.Amount_Received__c;         }         update reservation;     }      if(Trigger.IsDelete){          for(Money_Received__c payment: Trigger.old){             totalReceived -= payment.Amount_Received__c;         }         update reservation;     } }   I'm trying to write a trigger that sum up payments.  reservation__c and money_received__c are look-up relationship.  sum of Money_Received__c. Amount_Received__c  should be equal to Reservation__c. Total_Recieved__c.  I wrote this trigger, but gives me an error message saying     PaymentTrigger: execution of AfterInsert caused by: System.QueryException: List has more than 1 row for assignment to SObject Trigger.PaymentTrigger: line 3, column 1   Any suggestions on how to fix this? Also, how do I write 'trigger.updated'?  your help is appreciated.


I uninstalled QGIS by deleting OSGEO4W folder. Then when I try to install it again using osgeo4w setup, I get this "zip.dll was not found" error message. Does anyone have the same issue?


How can I contact Stack Overflow support?

How can I contact someone on stackoverflow.com to check my post history?(I think I uploaded a question on a certain date but it is shown as being uploaded yesterday, I did try deleting it more than one time). I need to contact someone who can help me with post history issues.


Past and Present Perfect tenses in a sentence. Sequence of events

I have a question concerning Past and Present Perfect tenses/the sequence of events.  "As my school project, I have written a 44-pages-long research paper in which I had analysed the risk behaviours of 110 students and gave the assessment of the risk of future occurrence of cardiovascular diseases by my own developed risk assessment models."  I am not sure if this is the correct way to say it. I would appreciate every piece of advice.


analytic function on $\mathbb{C}$ such that $f\Bigl(\frac{1}{2n}\Bigr)=f\Bigl(\frac{1}{2n+1}\Bigr)=\frac{1}{2n}$

I was working out some problems from a entrance test paper, and this problem looked a bit difficult.    Does there exist an analytic function on $\mathbb{C}$ such that $$f\biggl(\frac{1}{2n}\biggr)=f\biggl(\frac{1}{2n+1}\biggr)=\frac{1}{2n} \quad \ \text{for all} \ n\geq 1?$$   I did apply $f$ repeatedly to get some more insights about the problem, but couldn't get anything from it. So how do i solve this one?


I am writing a literature survey for papers from 2000 to 2017. Should I use a present tense or past tense when I am describing methods that were used in those papers?


If I make a new recipe in Breath of the Wild, is it recorded anywhere? If so, how do I view the recipes I've discovered. I thought the help text indicated something like this when I first made something, however; I don't remember what it says or how to find my recipes.


Actually I can prove the fact that $\sin(\mathbb{Z})$ is dense in $[-1,1]$ using the result that "any non trivial subgroup of the additive group of $\mathbb{R}$ is either cyclic or is dense in $\mathbb{R}$."  But my problem is to prove that $\sin(\mathbb{N})$ is dense in $[-1,1]$. Here $\mathbb{N}$ is the set of Natural numbers and $\mathbb{Z}$ is the set of integers.


2 arrays in javascript. One inherits another?

var t1 = [2,4,7,9]; var t2 = t1; console.warn(t2); // [2, 4, 7, 9] t1[1] = 7; console.warn(t2); // [2, 7, 7, 9]   Why? :) I can't understand. t2 is inheits t1?


Why do Bunsen burners burn blue in the center? What element is being burned?  Why does the sun glow yellow, and not blue-a Bunsen burner is much cooler and yet it burns blue. Is it because the relative size, or are they two different phenomena? (i.e. black body radiation and something else?)


How to install gnome-tweak-tool in Ubuntu 17.10

I am unable to install gnome-tweak-tool in Ubuntu 17.10  ubuntu@ubuntu:~$ sudo apt-get install gnome-tweak-tool Reading package lists... Done Building dependency tree        Reading state information... Done Package gnome-tweak-tool is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'gnome-tweak-tool' has no installation candidate   How can I solve this?


How does this equality on vertices in the complex plane imply they are vertices of an equilateral triangle?

I've read that if the complex numbers $a_1$, $a_2$ and $a_3$ are the vertices of a triangle in the complex plane such that $$ a_1^2+a_2^2+a_3^2=a_1a_2+a_2a_3+a_1a_3 $$ then the vertices are actually those of an equilateral triangle.  I tried to see why this by first shifting the vertex $a_1$ to the origin, and considering the triangle with vertices $0$, $a_2-a_1$ and $a_3-a_1$. The given equation holds if and only if $$ (a_2-a_1)^2+(a_3-a_1)^2=(a_2-a_1)(a_3-a_1) $$ which is equivalent to saying $$ \frac{a_2-a_1}{a_3-a_1}+\frac{a_3-a_1}{a_2-a_1}=1. $$ Letting $\frac{a_2-a_1}{a_3-a_1}=x$, this gives the quadratic $x+\frac{1}{x}=1$, and so I solve for $x$ to be  $$ \frac{a_2-a_1}{a_3-a_1}=x=\frac{1\pm\sqrt{-3}}{2}=e^{\pm i\pi/3}.$$  I'm not sure where I'm going now. How can I conclude that such a relation implies the vertices form an equilateral triangle? Thank you.


Prove that $$\cos \left( \frac{2\pi}{7} \right) + \cos \left( \frac{4\pi}{7} \right) + \cos \left( \frac{8\pi}{7} \right) = - \frac12$$  I feel that this is quite an easy problem but I am not able to prove it. I know to solve if the angles are in arithmetic progression. Please help.


Why would Luffy chant "Gomu Gomu No" every time he is attacking? Is it mandatory to chant the corresponding fruit name for every devil's fruit user?

From the first episode of One Piece Luffy chants "Gomu Gomu No" to start his attack, it is also seen in other devils fruit users too. Is there any particular reason for it?


How to compute partial trace of $U ( \rho_A \otimes \rho_B) U^+$?

In  (pg 16), he makes the following step.  Let $| \mu\rangle $ and $ | \nu \rangle $ be basis vectors of the Hilbert space $B$, wherein $|0\rangle $ lies.  Let $| i\rangle$ and $ | j \rangle $ be basis vectors of the Hilbert space $A.$  $$\textrm{tr}_B (U_{AB} ( \rho_A \otimes |0\rangle \langle 0| ) U_{AB}^+ )$$  $$= \sum_{ \mu} \langle  \mu | U_{AB} |0\rangle \rho_A \langle 0|U_{AB}^+ | \mu \rangle $$  ...where $\langle  \mu | U_{AB} | 0 \rangle $ is a matrix whose elements are   $$(\langle i| \otimes \langle \mu |)  U_{AB} (| 0 \langle \otimes | j \rangle)$$  I'm new to partial traces and operators acting on product states, so I've been reading about it, but I can't figure this one out. There is no explanation why this should be the case in the notes. Is there a property of the partial trace which makes it easy to compute something of the form $\textrm{tr}_B(U (\rho_A \otimes \rho_B )  U^+)$ ?  I have heard that it helps to expand in a basis, but I do not know how to do that in this sort of space. I think if I could put the expression inside the trace in terms of some linear combination  $$\sum_{i,j} c_{i,j} |i\rangle \langle i| \otimes|\mu\rangle \langle \mu|$$  then I could figure it out from there. Advice on this would be greatly appreciated.


Todo comments:Not include and left align?

Is there a way to to do a \todo*{Hello} and not have the note show up in the ToDo and Notes area? Does anyone know how to do that? Or vise versa?  Also, what about in the left side margin instead. I think it would be easier to read and actually more manageable over there, than off to the left side.  \documentclass[a4paper,12pt]{article} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \title{Notepad}  % Comments and \todo notes package \newcommand{\cmmnt}[1]{} % \cmmnt{} \usepackage[colorinlistoftodos]{todonotes}\setlength{\marginparwidth}{3.5cm}     % \todo{Comment}    % \todo[noline]{}   % \todo[inline]{}     % \todo[color=red!50]{Revision}     % \todo[color=blue!40]{Improve}     % \todo[color=purple!50]{Nice}  \begin{document}     \todo[color=red!50]{Revision} \todo[color=blue!40]{Improve} \todo[color=purple!50]{Nice}  \listoftodos[ToDo's and Notes]  \end{document}


Where should I ask general questions about my project?

I have a solution for a problem in my country. I decided to make a small project about it, not a startup. I need some advice about my project (which kind of server should I rent, for example). Should I ask it on Stack Overflow? My question has no code.


I have a hp envy m6 notebook. running windows 8.1 genuine on my machine, i want to know how to install Ubuntu 14.04 on my machine as a dual boot? please give me a proper guide. and also tell me can i run adobe photoshop cc and lightroom 5.4 on ubuntu ?


I am using Intellij and used to use Alt+F1 to navigate between different views. I have begun to use Intelij in Ubuntu but when I press Alt+F1 the first icon on the launcher will be activated. I could not find this keyboard shortcut under Ubuntu shortcuts. I wonder if it is possible to change this shortcut key for focus on launcher.


Why the function javascript give me the same value

Why the function give me the same value when I want it to change every time I choose other radio buttom     <form>     <input type="radio" id="male" name="gender" value="male">     Male
     <input type="radio" id="female" name="gender" value="female">     Female
     <input type="radio" id="other" name="gender" value="other">     Other     <button onclick="addSpan()">Try it</button>  </form>  this is function


What is the distribution of the rounded down average of Poisson random variables?

If I have random variables $X_1,X_2,\ldots,X_n$ that are Poisson distributed with parameters $\lambda_1, \lambda_2,\ldots, \lambda_n$, what is the distribution of $Y=\left\lfloor\frac{\sum_{i=1}^n X_i}{n}\right\rfloor$ (i.e. the integer floor of the average)?  A sum of Poissons is also Poisson, but I am not confident enough in statistics to determine if it is the same for the case above.


I am using bootstrap for my simulation.  The number of the population is flexible for each case, and the sample size is decided by a certain percentage. For example, I have a 10,000 population, and I decide to use 10% for each iteration of bootstrap, so the sample size is 1,000.  In practice, I found it is hard to decide how many times to run the bootstrap is enough. With less simulation, the results appear insufficiant, while with a large number of simulation they are purely redundant.  May I know if there is a method that can help me to decide the number of iterations to run?


The stix2 package has been released recently:   In the documentation it is said that to be able to use it, one just needs to add \usepackage{stix2}. However, there is no stix2.sty included (there are only *.dtx, *.map,...).   How can I install this package from the provided files?  I was able to use the STIX Two font in XeLaTex, but I would like to see how it looks like in pdfLaTeX (I don’t like the ugly math symbols of the unicode-math package in XeLaTeX).   Thanks for your help!


How to recover important files from corrupted hard disk that keeps on loading

I had dual boot in my hard disk, but one day my system hanged and when i tried to restart it,i ran into grub recovery mode, then later i tried again but i was not able to view any sector list in my harddisk by using the ls command in grub recovery terminal, so i took the hard disk out and by using SATA to USB adapter connected it to my other system, Using gparted when i tried to look in my 1TB partitions, It just kept on loading(Image attached). Even in the file explorer i can see 2-3 new folders but on getting inside them it keeps on loading. I am not able to test any disk checking/recovery option because on using those softwares with hdd it just keeps on loading finding the disk, what should i do ??


I have a trajectory and a map that I have divided in segments. I want to locate each point (using for its id its time-stamp) to the appropriate segment, using qgis. How can I accomplish this?


How do I know if I should be using int32_t or uint32_t?  I have found a few descriptions of them (signed/ unsigned) but that hasn't helped me understand this much coming from a java background. So under which scenarios would I use these two options? Specifically I need a variable to hold a 32 bit binary value, but a general answer would be fine as well.


How to split a string in java by a non printable ascii character (Example - Record Seperator)

In C# this would work -  String[] elements = sample.Split((char)30);  What is the java equivalent?


I have a 3 display windows 8 system.  Two are 24" monitors and one is a 27" monitor.  The 27" monitor is in the middle and one of the 24" monitors is flipped portrait on the right.  When I go to the screen resolution dialog box in Windows the 24" monitor and the 27" monitor appear to be the same size.  This means that the edges of the window don't line up.  Similarly the 27" monitor and the portrait monitor don't line up in the sense that when the mouse goes from the top of the 27" monitor to the portrait monitor, the pointer jumps downward.  However if I go from the bottom of the 27" monitor to the portrait monitor the pointer lines up correctly and transitions smoothly.      The screen Resolution window correctly identifies my 27" monitor as a Dell S2740L and the driver is up to date.  Also if it is relevant, the 27" monitor is hooked up using HDMI, the left monitor is hooked up using DVI and the portrait monitor is hooked up with HDMI -> DisplayPort with an Active HDMI to DisplayPort adapter.


Should "anymore" be used only in a negative statement or question?

I don't know why this is so, but I've always believed that the word anymore should only be used in a question or negative statement.     Do you go there anymore?   Don't do that anymore.   But I often hear people use it in a declarative sentence, such as     Anymore, I eat pizza with pepperoni.     To me this is just wrong. Am I wrong?


Add additional sub-groups to the new Badge page & related Feedback

On the  (A+), there are sub-groups under the major groups.  For example, the Participation Badges group has related badges Commentator and Pundit sub-grouped, and Quorum and Convention sub-grouped.  I am of the opinion at least 1 of the following additional sub-groupings should be made:  Question Group   Student & Scholar Investor & Altruist Promoter & Benefactor   Alternately, one sub-group of Investor, Altruist, Promoter & Benefactor    Answer Group   Teacher, Enlightened, Guru Consider moving Generalist to Tag Badges Group or the bottom of the Answer Group if Tag Badges is moved immediately below Answer Group.   Participation Group   Talkative & Outspoken Caucus & Constituent Precognitive & Beta   Tag Badges  Move this group to either the bottom of all groups or below the Answer Group. Its current placement here creates a weird artificial barrier, especially with users who have no Tag Badges.  Moderation Group   Informed & Analytical Taxonomist & Synonymizer Critic & Supporter Disciplined & Peer Pressure Suffrage, Vox Populi & Civic Duty   Alternately, one sub-group of Critic, Supporter, Suffrage, Vox Populi & Civic Duty  add Cleanup and Organizer to the Editor sub-group add Citizen Patrol to the Deputy sub-group   NOTE: Since this is now status-completed, but only a select portion was completed, the rest of the request has been broken into 2 additional questions:


In , I encountered this sentence:     Fortunately, no such fate awaits Americans should the federal government shut down on October 1st.   I cannot understand how the two complete clauses — no such fate awaits Americans and *should the federal government shut down on October 1st — made up this sentence.   Is should a conjunction meaning while?


Asking a question with lots of source code

I've seen responses using , where the code is broken up into html, css, javascript and the output.  Q: If I have a post that includes a lot of code, is is better to post it to an outside source, or simply paste it into my question in a code block?


C++: Overload << Operator with templates

Unfornately I couldn't find a post regarding my following problem. I want to write a litte class which overloads the <<-Operator to get variable types of data using templates. The .h-file of my class looks like this:  class MyClass {      private:        ...      public:         template <typename> void operator<<(T data); };   The CPP-file:  template <typename T> void MyClass::operator<<(T data) {     ...     return; }   Now I want to use my class:  MyClass mc; mc << "Test"; mc << 123;    But my gcc compiler won't compile it giving me following error message:  undefined reference to `void MyClass::operator<< <char const*>(char const*)'   or if i use int for example:  undefined reference to `void MyClass::operator<< <int>(int)'   What am I doing wrong??? Can Someone help me?


I switched to "Cycles Render" instead of "Blender Render" and my object is now fully white. I would like to render my object with it's material. I have been looking for solutions for quite some time and I'm not quite sure.


Changed shifters and chain isn't in same spot

My friend changed out the shifters on his bike and his rear derailleur isn't on the right sprocket based on what his shifter says. How can you fix this?


Does "$\exists \delta >0$ S.T $||x(0)-x_e||<\delta\Rightarrow \displaystyle \lim_{t\rightarrow \infty}||x(t)-x_e||=0$" imply stability?

Recall the definition of stable and Asymptotically stable:   A fixed point $x_e$ of a vector field is called (Lyapunov) stable if $\forall \varepsilon>0,\exists \delta(\varepsilon)$ such that $\forall ||x(0)-x_e||<\delta \Rightarrow ||x(t)-x_e||<\varepsilon,\forall t\geq 0$ A fixed point $x_e$ of a vector field is called asymptotically stable if it's stable and the condition mentioned in the title "$\exists \delta >0$ S.T $||x(0)-x_e||<\delta\Rightarrow \displaystyle \lim_{t\rightarrow \infty}=||x(t)-x_e||=0$"  is true.   So, my question is the that if the second condition in asymptotically stable implies stable? If not, what counter example can we take?  I guess the second condition doesn't imply stable. "stable" means I start my flow close to the fixed point $x_e$ and it will be always close but not necessarily convergent to $x_e$. And "asymptotically stable" means, besides the stability, the flow will not only be just close to $x_e$ but also converges to it in the end.  Thus, from this point of view, the second condition cannot imply "stable", because there definitely exists a flow that it will finally converge to $x_e$ but it won't necessarily be close to $x_e$ all the time, which means it might detour for a certain period and come back. However, I have hard time finding such flow.   I would really appreciate if you can help me find an example of such flow.


Abbreviated author names with initials at the end in the reference list

I use TexMaker with TeXworks to write a paper. The comments I use are given below.  \documentclass[12pt,a4paper]{article} \usepackage[numbers,sort & compress]{natbib}  \begin{document}  \section{Section_1} \section{Section_2} \section{Section_3}  \bibliographystyle{unsrt,firstinit=true} \bibliography{Bibfile}  \end{document}   I generated Bibfile using Mendeley. In the LaTeX generated file, following issues are there:   Author names are abbreviated and some are not; I need all authors name in all the references abrreviated. In some references, issue numbers also present. I want to remove it. In some references, month is also displayed before the year (may 2015). But I need only the year.   Simply, the format I want is the following:  "Charles, A. B. and Daniel, B. C., Title of the Paper, Journal Name, Vol_No.: Page_Numbers, Year."  Thanks in advance for any help/hint to solve these issues.


Does every magic rod, wand, crystal, orb, and staff count as an arcane focus?

The various magic rods, wands, staves, etc. in the DMG all have certain abilities. But do they also count as arcane foci for the purpose of not needing material components for all your other spells?


Is it "legal" to CREATE and DROP #SomeTable more than once?

I've got my code sort of segregated as "coherent blocks" that I can insert into a longer "configuration script" over and over, and one of the patterns I'm using is this:  CREATE TABLE #WidgetSetting  (     WidgetID bigint not null,     Name nvarchar(100) not null,     Value nvarchar(max) not null,     CreateDate datetime not null )  INSERT VALUES  MERGE TABLES  DROP TABLE #WidgetSetting   But now SSMS is complaining that the object already exists by the next time the CREATE TABLE fires. What gives?  I think it's obvious I'm going to have to declare the table once at the beginning of the script, truncate instead of drop, but it's frustrating, naturally, to not be able to just drop the table and use the same name again.


Word that means "fashionable thinking of the day"

Help! I forgot to write down a very useful word, all I've got are a few possible definitions from memory, "fashionable thinking of the day" "trendy idea / way of thinking" The word is short, maybe 4 or 5 letters. The word looks and sounds like "ersatz", using the "tz" sound I believe. I've tried different anagram generators with no luck! Same for Google, which thinks I want to read articles? You're my only hope, what's the word?


Some questions are getting closed as duplicates - good, the system is working. Unfortunately, some are getting closed as duplicates of other questions which are already deleted. This leaves all 1-9,999 reputation users left scratching their heads when they try to view the duplicate. Even worse, imagine being the author of the question and having your question closed as a duplicate when the original question isn't accessible.  I think something is wrong. Today I undeleted a question (left it closed) since it was referenced in the close-reason for another question. Comments indicated that people were clearly irritated that they could not access the duplicate     [Comment] Ok, who thought it was a good idea to close this as duplicate of a deleted question, which most people cannot even see? For the record, I'm reopening - clearly there's enough interest in this question. – Kobi 14 hours ago   ---   [Comment] The PosibleDuplicate link is broken. Voting to reopen. – Rahul G 7 hours ago   ---   [Flag] Closed as duplicate of a deleted question, fail. Thanks for moderating. – {username removed} 14 hours ago   My undelete-action was short-lived, as a few users returned to delete the post again.  It certainly cannot be desirable to reference posts that the vast majority of users cannot even see, especially when the author of the redundant question cannot see (at the time of writing this, the author has a reputation of 18).  I'm not sure what the solution is to this, but I'd like to hear some ideas.  Questions  Question:  Duplicate of:


Unity - How can I make my player's gun point at the cursor, not the player itself?

I'm making a 2D top-down shooter in unity. Currently, I'm using the code below to point my player towards my cursor at all times, this works but isn't exactly what I want.  //Find the mouse position on the camera view Vector3 mousePoint = theCamera.ScreenToWorldPoint(Input.mousePosition);  //Find how the mouse relates to the object's position Vector3 difference = mousePoint - transform.position; difference.Normalize();  //Find wanted angle of rotation float rotZ = Mathf.Atan2(difference.y, difference.x) * Mathf.Rad2Deg; Quaternion newRotation = Quaternion.Euler(new Vector3(0.0f, 0.0f, rotZ + adjustmentAngle));  //Apply wanted angle of rotation transform.rotation = Quaternion.Lerp(transform.rotation, newRotation, Time.deltaTime * smoothing);   While this works, my player's gun isn't in the centre of my player so when the gun fires it actually skims past the cursor missing slightly.  How can I get my player to rotate so his gun is what points towards the cursor rather than himself? I have a child GameObject at the end of the barrel of his gun used to Raycast and stuff which I figure can be used?


Why is center of gravity a different quantity than center of mass?

I thought the center of mass equation was derived for general forces, $$\sum{\vec{F_{ext}}}=M\vec{a_{CM}}$$  Then suddenly when the external force on the $i$ particle is of the form $m_ig_i$, where $g_i$ varies throughout the body, we have to use this equation:  $$\vec{W}=M\vec{a_{CG}}$$  where $CG$ is a different point than $CM$. So, what makes gravity special?  EDIT: I'm not asking the difference between them. They have different formulas, so obviously they have different values when $g$ is not constant.  I'm asking why doesn't the resultant gravitational force or $W$ can't be thought of as acting on the center of mass when the center of mass equation is derived for any general external force.


How to avoid interference in wireless communication?

I am working on wireless communication system. We are using around 10 pairs of transmitter and receivers. We are using atmega16 microcontroller for encoding and decoding by USART ports.  Now we are able to transmit the data and receive the same in the receiver end, but there is a major problem, when we are finding the 2 transmitter data coming at the same time. The receiver is unable to get it due to interference.  Suppose one transmitter sends "SENDA" at the meanwhile another transmitter sends "GETTS", at that time the receiver can not receive proper data. As all the transmitters and receivers are working in same frequency, so this interference is occurring. How can I resolve this issue?


I have a Material that someone else created that I import into my file. I would like to have this first import be a "Master" copy and duplicate that one for when I would assign it to an object. I could then modify the copied material without affecting the original Material that was imported. That way if I accidentally change one of the attributes, I can easily "reset" it by copying the unaltered default. Is there a way to do this?


can't find my windows partition files in ubuntu

i have recently started using ubuntu and i dont know where to find the files from my earlier installed windows in ubuntu i had huge datas in previous partitons in D and E drive


Do lenses with the same f-stop but different focal length gather the same amount of light?

I'm taking images of a light source in a scientific labratory, and I thought I had a good grasp on all these things, but now i'm second guessing myself after some results.  The most important thing is for me to get the most light intesity to my camera sensor from my source.  As we all know, the available light drops off as 1/r^2 from the source.  So, being closer in principle gives you a better chance of getting more light.    However, diferent lenses have different abilities to gather light, based on their aperture size (which is reported as an f-stop value).    So, a typical question for us is this:  If we have a given light source that we are imaging, and we have two different lenses with two different focal lengths but the SAME minimum f-stop (e.g. 1.4), which one will gather more light? Assuming we adjust the distance from the source so that each lens images the same size area.  so, maybe we have a 25mm f1.4 lens and a 50mm f1.4 lens.  If they're both positioned to image the same region (i.e., the 50mm lens is further from the source than the 25mm lens), which would gather more light?


How can I create an UnsubEvent using AmpScript in a Landing Page

In Salesforce Marketing Cloud (SFMC), I want to unsubscribe a contact from a single publication list by using a form on a landing page.  I also want to create an Unsub event in SFMC when they submit the form.  There is some sample code from SFMC Help documents  that seems to do that for external sites. Will it work in a SFMC hosted landing page? Do I need to edit the code much?


I am new to server management and earlier I used shared hosting and thought to go for VPS and get more for my websites. VPS specs:  RAM: 12GB CPU: 4 Core Intel E5 SSD: 300GB Server: Apache OS: Ubuntu 16.04 PHP: 7.0 FCGI Stack: Virtualmin Script: Wordpress Number of website: 1(Going to host 5 more websites if server can withstand with it) Cache plugin: W3 Total Cache   I installed memcached on my VPS and want to tune it to serve static file at faster rate. Since I don't know what can be done so I have included my memcached file:  # Run memcached as a daemon -d  # Log memcached's output to /var/log/memcached logfile /var/log/memcached.log  # Start with a cap of 4096 megs of memory -m 4096  # Default connection port is 11211 -p 11211  # Run the daemon as memcache -u memcache  # Specify which IP address to listen on. -l 127.0.0.1   Reason for tuning: Better performance and when running 5 WordPress sites. I purchase popup traffic which is 1000-3000 per 1 minute. So, I want to server each page from memcached and I want to know if there's some tuning needed for this  Please let me know what can be done in order to tune up my website.