Looking for DEM data of Brighton UK

Question: Where can I find accurate DEM data of Brighton UK with an attribute table to be used in ARC GIS, being used for a university GIS project and have struggled to find this data.
Comment: For open data I recommend researching/asking at the [opendata.se] Stack Exchange.
Comment: For Brighton you can use the Point Cloud opendata from Environment Agency (England & Wales) that can be processed to even higher resolution data for DEMs. LIDAR-LAZ-2015-TQ20sw has more coverage than the more recent 2016 version.
Answer: geostore 25cm, 50cm, 1m, 2m LiDAR
You will probably need to download a few tile to cover Brighton
http://www.geostore.com/environment-agency/survey.html#/survey?grid=TQ20
OS Terrain - 50m Grid or 10m Contours
https://www.ordnancesurvey.co.uk/opendatadownload/products.html
USGS SRTM 30m
https://earthexplorer.usgs.gov/
Answer: Just to add to the nice answer from @Clubdebambos, assuming you are studying at a UK-based university, you may also have access to the Edina Digimap as this also contains OS Terrain data where you can select the tiles you're interested in:

Contour lines and spot heights:

Merged digital terrain models:
Comment: @CharlieMason if you have downloaded the data as ascii just open it in Notepad, all the values are there. Some other raster formats will also open in Notepad. If you want to view in Arc convert the raster to points (Raster to Point tool) and view the attributes of the point which will have the X, Y and Z values.
Comment: @CharlieMason - Assuming you're talking about raster layers, QGIS at the moment does not support attribute table for rasters. Therefore, I can't test for Arc as I use QGIS. Apologies :)
Comment: Hi guys, thanks for your help. However, we've downloaded data from both of these sites but when opening in ARC map the data doesn't have an attribute table. How do we access this?

Looking for DEM data of Brighton UK


How does the ability of the creature in "The Man Trap" work?

Question: How does the ability of the creature in "The Man Trap" work?
Is it a mind trick, as it's indicated during the very first encounter with the away team (since each crew member seems to see a different woman) or does it actually assume the shape of a certain being?
If the former case were true, this ability would stand in stark contradiction to the way it got onto the Enterprise, since it must hence be assumed that the crew on board didn't realize that they beamed up not crewman Green but a monstrosity. If the latter case were true, this ability would be in stark contradiction to the first encounter, since the creature must shape-shift continually without anybody nearby noticing it.
Comment: If it actually changed shape, why did Kirk, McCoy and Scotty all see a different women on the planet _at the same time_?
Comment: You're right - yet, each of the options I mentioned seems to be contradictive to the rest of the episode in one way or the other. Hence my question.
Comment: That it would transmit different images seems like a dumb idea since McCoy might say, Nice dress, Nancy! and then Scotty might say, Wait a minute, she's wearing a pants suit! and maybe Kirk would see her dressed like the Orion enslaved girl.
Answer: Obviously that being was able to transmit abstract perception images.
At the first encounter, it had no concrete idea about what would be the most effective (defensive) appearance in the current situation, so it might have suggerated to be a "sexual attractive mate", so a woman might have seen a cute guy.
While going onboard the ship, it knew it had to be a certain crew member in order to stay covered, and thus chose a concrete suggeration.
Comment: Maybe then my assumption is simply wrong: I've always took it for granted that the person at the transporter panel has specifics concerning the subject/object to be beamed: whether it's a man or a thing - or some entity. If this weren't the case, the contradiction I assumed because of this premise would dissolve.
Comment: @schlossblick Out of universe, I think that capability was introduced in the TNG era.  I don't recall any evidence they could do that in ENT or TOS.
Comment: Thank you very much for the clarification - hence your comment and nibra's answer combined solved my question.
Answer: I think that the creature can actually shape-shift but also has telepathic abilities which allow it to appear as multiple women who have the same general body structure, so that if you touch her you wouldn't notice a difference between the three (as opposed to if you touched the creature in its true form). Her telepathic ability is further shown when she is able to speak Swahili to Uhura. Also when her powers are being described in the episode they describe her having the ability to assume any form, implying actual transformation rather than illusion as when they were describing the powers of the Talosians, but obviously she also possesses the ability of minor differences in how she looks depending on who is observing her but keeps the same general body structure.


Simultaneously applying for Schengen and UK tourist visas as an Indian citizen

Question: I am planning to go to UK and visit European countries on visitor visa, can we apply visa simultaneously in one application ?
Comment: At the moment this is only possible in China, UKVI has not announced any expansion of the pilot yet.  And the pilot itself is UK/Schengen via Belgium so there's a lot of work yet to do before all the members come online.
Answer: I don't see how you can, as you will need to surrender your passport for each visa application.
Unless there is an exception (apparently, such an exception exists in China), you will have to apply for one, receive your passport, then apply for the other.
Answer: NO.
Once you get your UK multiple-entry visa, you can use it to go to Ireland (including Northern Ireland) and Scotland. But, you can NOT use it to enter Schengen countries. You will need to apply for Schengen visa separately. See Main Destination to apply for Schengen visa - Indian Citizen to determine which consulate you should apply for a Schengen visa.
Comment: I think the OP know that he needs separate visas. The question is about whether it's possible to apply for both at the same time.


how to compile boost_thread for android NDK?

Question: I have a neeed to create threads and I am preferring to use boost threads! Firstly is this possible for android-ndk ?
If so, then I started to include boost_thread sources in my project.
I referred some stackoverflow posts where I found the need to define these
BOOST_THREAD_BUILD_LIB, BOOST_REGEX_NO_LIB
Defining these prevented me from getting the link error asking for "libboost_thread_*.lib"
However now its asking for "libboost_data_time_*.lib"
What should I define now ? And what else will I need to do to finally get the source compiled in my project.
Know that I can't use boost.build as it won't suit my need (compiler varies).
Answer: You can define BOOST_ALL_NO_LIB to turn on all the BOOST_*_NO_LIB options.


Connection to the remote SMTP host

Question: Make the story short: Couple of the days one of the drivers in the raid started failing. After we changed the driver and rebuild it, we were not able to start SQL server. Therefore we re-installed it and restored all our DBs from backups.
Now, before hard drive crash and before the SQL was re-installed all our custom programs on the Win 2008 R2 server were able to connect to the remote SMTP host (like smtp.gmail.com) and send emails. We also used SQL database Mail and we reconfigured it, however we still receiving massages like "could not connect to mail server".
Is it possible that during SQL Uninstall some of windows services was stopped and now it cannot connect to a remote SMTP host. Where should I look and what should I try?
Answer: ok, I found my error. In the process of the server restoring I set wrong IP on one NIC and DNS was not reachable...

Connection to the remote SMTP host


JCR (JackRabbit, ModeShape) vs. Graph (Neo4j)

Question: In order to store hierarchical data, can a graph database (Neo4j) be viewed as an alternative to JCR based solutions (ModeShape, JackRabbit)? Or do they belong to 2 different level of abstraction meaning that a JCR implementation could use Neo4j under the hood?
Thank you for your help.
Answer: Both, people are building CMS applications with Neo4j as storage backend (see http://structr.org)
A JCR implementation could also be done using Neo4j, some people worked on that in the past, we also have a group using Neo4j as backend storage for Apache Shindig.
Answer: You also might want to take a look at OrientDB (http://www.orientdb.org/) which combines features of a Graph-DB (as Neo4j) with those of a Document-DB. There even seems to be a prototype implementation using OrientDB as a storage-adapter for Jackrabbit (https://github.com/eiswind/jackrabbit-orient) that illustrates the implementation of such a hybrid approach.


How does Walt know that Gus intends to kill him?

Question: In Breaking Bad, season 3, after Walt kills the two dealers who murdered Tomas, he drives out into the desert where he meets Mike who then escorts him back to Gus's car. He suggests to Gus that he has two options: option "A" being to kill Walt and Jesse, and option "B" being to let it go and keep Walt cooking, meanwhile forgetting Jesse ever existed. It seems to me that Gus chooses option B, when he says "You'll need a new lab assistant [...] this time I choose".
However, even though the agreement seems to materialise with Gale back on the team, Walt admits to knowing about Gus's intentions (revealed to Gale a few scenes earlier) when visiting Laser Tag with Saul. He seems far beyond suspicious about it. How can he be so sure?
Answer: I think there are two main points that explain this:

First and foremost, this whole matter involves drug producers (Walter, Gus) that have already killed in the past to protect their interests. Walter is no dupe, he knows killing those two gunmen in S3E12 "Half Measures" (don't forget those were Gus' men after all!) has irremediably wiped out any remaining goodwill Gus had towards him: Gus is a very cautious trafficker and Walter's actions are anathema to how he conducts his business. Remember than in the previous episode, Mike visited Walter at his house and hinted that the best course of action for him would be to get rid of Jesse (even if Mike's visit was not ordered by Gus): Walter knows how Gus and Mike think and that they won't hesitate to get rid of threats to the business.
In addition, Walter notices that, after being enrolled back as his lab assistant, Gale is making many more questions about the cooking process than before, as if he was preparing to take over Walter's job. Excerpt from the laser tag conversation between Walter and Jesse:

[Walter] How are you holding up?
  [Jesse groans] You?
  [Walter] I got my old job back. At least until they kill me and Gale takes over.
  [Jesse] He's their boy, huh?
  [Walter] He's their boy.
  [Jesse] How long you think you've got?
  [Walter] Well, he asks a lot of questions about the cooking process. I try to be as vague as possible, but I got that guy Victor watching me, listening to every word I say. Maybe the only thing that's saving me is Gale's fastidiousness. Once he feels confident that he knows my entire method...
Answer: Walt notices heightened interest from Gale about the meth production process and assumes that Gus has talked to Gale about taking over. Logically, he concludes Gus wants to get rid of him.
Answer: Walt is smart and knows that there's no way that Gus is going to let things slide. Part of the reason he asked to replace Gale in the first place was because Gale was a very astute student and Walt was worried about being replaceable. Now that Walt had deliberately defied Gus, it was only a matter of time before he would be taken out and Walt knew that having Gale back meant Gus was hoping he could come up to speed so that they would no longer need Walt.


Iceland poppies

Question: I have a couple plants of Iceland poppies that bloomed back in the fall. I'd like to transplant them into a different container but I'm not sure if they can handle being moved/if it's the right time for that or if they'll even bloom again. Two plants are still looking alright, and there are little leaves sprouting up. Would those be ok to transplant too?
Answer: They are perennial plants, but they are fairly short lived and usually grown as annuals (sow the seed in spring for flowers in the same year) or biennials (sow the seed later in the year, so they flower earlier in the next year).
If yours are starting into growth again after winter you can transplant them now if you want to try it, but don't be disappointed if they don't do well.

Iceland poppies


Why "the Sun Tzu" instead of just "Sun Tzu"?

Question: I am reading a military history text that repeatedly refers to "the Sun Tzu" but does not give similar treatment to other authors (an example is "Clausewitz and the Sun Tzu disagree on ..."). I have never seen this usage of the definite article with the author's name, and it seems incorrect to me.
Comment: This seems very odd to me, as I have never seen Sun Tzu referred to with the definite article elsewhere. What's the name of the book?
Comment: Some nouns get "the" and some don't in English. It totally defies any attempt to find a general rule, all you can do is keep creating more and more small rules and claim that explains it. The Washington Monument but Faneuil Hall. The River Styx but Lake Ontario. Nine Inch Nails but the Moody Blues. NBC but the BBC.
Comment: @DavidSchwartz: What makes this unusual is that it is a person's given name, unlike the examples you give. The only other "legitimate" English case I can think of is "The Donald" Trump, but that's basically a nickname.
Comment: There are other examples where the thing is implied. For example, the Royal Albert Pub is frequently just called [the Royal Albert](http://www.royalalbertpub.com/).
Answer: The work (or collection of works) known as "The Art of War" is usually referred to as "by Sun Tzu" — but scholars have long thought that there were multiple authors, or that the work was actually written by someone else entirely: http://en.wikipedia.org/wiki/Sun_Tzu#Historicity.
Given so much scholarly ambiguity, the author of your text may simply not have wanted to commit to a definite opinion about the work's authorship.  (In a similar quandary, I would have referred to "the Art of War" throughout, but your author might have found that unwieldy.)
Answer: I concur with MT_Head's explanation, and have voted it up.
I did some research on this last night, and found examples of both uses.  First, a work that refers to the work as if it has a single author:

Next, a work that uses a definite article when referring to the work:

Lastly, a work with a footnote that delves into some of the authorship ambiguity that MT_Head so concisely described:

The three sources (in order of their appearance):
(1) Sun Tzu's Art of War: The Modern Chinese Interpretation
 by Tao Hanzhang & Yuan Shibing
(2) The Rules of Victory: How to Transform Chaos and Conflict–Strategies from The Art of War
 by James Gimian & Barry Boyce
(3) The Art of Rulership: A Study of Ancient Chinese Political Thought
 by Roger T. Ames
Incidentally, the first quote comes from the authors' introduction the The Art of War, where they assert: "It is indeed Sun Tzu who wrote the book and not, as some have suggested, the writings of someone else in his name."  I'm not going to weigh in on the authorship debate, however.  Someone much wiser than me once advised long ago,

Be extremely subtle, even to the point of formlessness. Be extremely mysterious, even to the point of soundlessness.

That seems like sound advice, especially when stepping into the minefield as a scholarly battle.
Comment: @Hugo: Exactly! Apparently, those who ascribe to the theory that _The Art of War_ was written by Sun Tzu don't use that convention, but those who believe the work had more of a conglomerate authorship sometimes refer to the work as a whole as _The Sun Tzu_.  Since no such ambiguity exists with Clausewitz, you don't see the two conventions used.  I think this might be caused, in part, by the translation from ancient Chinese to English.
Comment: But all those instances with the definite article are referring not to an author but to a title, because they are italicised: "the *Sun Tzu* by Sun Wu...", "the *Sun Tzu* was edited...", "the recent unearting of the *Sun Tzu Art of Warfare (Sun Tzu ping-fa)* fragments..." and "portions of the *Sun Tzu Art of Warefare*..."
Answer: It is common practice to refer to a work by the author's last name.
Imagine a band was playing a number of pieces by different authors. When starting rehearsal, the director could say

Pull out the Holst.

And would be referring to whichever piece of Holst's the band is playing, such as First Suite in Eb. So long as they are only playing one piece by each author, it isn't confusing.
In your case, I would imagine that the author is talking about Sun Tzu's The Art of War when he refers to "the Sun Tzu," given the context. My only other thought is that the author doesn't think of Sun Tzu as a person, but I don't see how or why he would do that.
Comment: This does happen when referring to a work, but in this case it seems it's referring to the person: "Clausewitz and the Sun Tzu disagree on ..."
Comment: Similar to thinking about [Nicholas Bourbaki](http://en.wikipedia.org/wiki/Nicolas_Bourbaki) perhaps? (Not a perfect analogy, admittedly)
Answer: "the Sun Tzu" would refer to "the BOOK by Sun Tzu," or Sun Tzu's book ("The Art of War"), as opposed to Sun Tzu, the PERSON.
At least that's the sense I get when the source is a book that is itself about military history.
Comment: @Hugo: May be the writer thought that Sun Tzu was a "title," e.g., "the Count of Monte Cristo.
Comment: This does happen when referring to a work, but in this case it seems it's referring to the person: "Clausewitz and the Sun Tzu disagree on ..."
Answer: The Tzu/Tze/Tse (子) in Sun Tzu, as well as in Lao Tze, Kong Tze (Confucius), etc. is not part of the person's given name, but more a title, meaning "teacher" or "master". So Sun Tzu means "Master Sun".
Perhaps the writer attached the "the" to indicate this (though it comes across as an affectation), similar to "The Emperor Haile Selassie" or "The Goddess Isis".


How do I create a vpn over another vpn?

Question: I am in a network that for accessing internet we must connect to vpn. also there exist another service for special bandwith for some users. So for accessing this service I must create another vpn. But when I try to connect this vpn, the connection of vpn server disconnected. Is there a way to create a vpn over another vpn -two vpn over
Comment: Depending on the particular VPN technology used, it may be impossible. You cannot, for instance, tunnel IPSEC over IPSEC (at least not on Linux), and some kinds of TCP encapsulation interfere with other types of TCP encapsulation. What kind of VPNs are the two?
Answer: From my testing NetworkManager (using nmcli) only supports one VPN connection at a time. You will need to write a script that manually invokes openvpn and place it in <code>/etc/NetworkManager/dispatcher.d/</code>. The script will need to query networkmanager to see if your other VPN connection has been made.
I wrote a script that automatically starts my VPN connection under certain conditions, maybe you can use it as a starting place.
Also, keep a close watch on your routing table. If you start a VPN while connected to another one, it could redirect traffic from the first VPN, disrupting both VPN connections.

How do I create a vpn over another vpn?


What does it mean to say "a paramagnetic material is attracted to an external magnetic field?"

Question: I'm just having a hard time wrapping my head around what actually goes on when a paramagnetic material is exposed to an external magnetic field. I understand that the individual dipoles line up so that they point in the direction of the field, but why does that need to happen for there to be magnetic attraction? And what exactly is being attracted in the first place? If I imagine the dipoles are caused by little rings of current, are the rings themselves pulled in the direction of the field? Also, what happens if the dipole starts out pointed out in exactly the opposite direction of the external field?
Answer: Let me explain the difference using a simple model of an atom - as consisting of electrons revolving in orbits around a heavy nucleus.
When a material is exposed to a magnetic field, the electrons move in such a manner as to oppose it. The material mildly repels the magnetic field.
However, if a material has unpaired electrons, it has a net molecular magnetic moment. An external magnetic field tries to align the molecule moments along its direction while the thermal agitation tries to randomize them. The competition between the ordering effect of the magnetic field and the disordering effect of heat results in a temperature dependent magnetic attraction of the material to the field, called paramagnetism. All materials are diamagnetic while those with unpaired electrons are paramagnetic. When paramagnetism exists, it overshadows diamagnetism by several orders of magnitude.
As alluded by @TZDZ, a complete understanding of magnetism requires a quantum mechanical treatment. However, this simple model usually suffices for a first introduction to the topic.
Answer: A paramagnetic material is attracted not by the magnetic field but the force on it is towards the direction in which the magnetic field is increasing. In a constant field it would stay in place. This follows from the simple fact that all systems try to obtain a potential energy minimum.
Answer: Magnetic forces are not easy to apprehend. Personally, I dislike magnets, so in a first step I will use coils. Consider two coils $S_1$ and $S_2$ along the $\vec{z}$ axis at a distance $d$ one from each other. They are fed by a current $\vec{i}=I\vec{e_\theta}$.
As you know, the magnetic field induced by each coil is like :

The magnetic field from $S_1$ on $S_2$ is $\vec{B}=B_z\vec{z}+B_r\vec{e_r}$. The force is $\vec{i}\wedge\vec{B}=-F\vec{z}$ : the second coil tends to be attracted by the first one. Reciprocally, if the material is diamagnetic, the magnetics domains will oppose the field (much like two magnets with same pole facing), so in my analogy the current of the second coil would be negative : the force would be in the opposite direction (repulsion).
Usually, the force between two magnets or a magnet and a magnetic material is calculate with regard to the energy. The first step is quantifying the energy between the magnets, and the force is deduced from the variation of energy in the volume between the magnets. The energy is lower when magnets are aligned and closer, thus the direction of force.
There is a whole article on wikipedia.
With coils, you can see the diminution of magnetic energy as the pooling of the fields of both coils.


How do you open the Eclipse web browser?

Question: Eclipse has a web browser, but I don't know any straightforward way to open it.  I know that if you go to the Eclipse market place and ask for more results it'll open, and if you make the browser open your html you can open it, but is there a more straightforward way to open it?  (For example, a button or menu option that says browser?)
Answer: The Web and Java EE perspective will reveal a button on the toolbar to open a new web browser.
Also, from Window > Show View you find the Internal Web browser view.
The former acts as an editor tab, the later not.
Answer: Right click a file in left Project Navigator, and in the pop up context menu, chse Open with ..., and then you can find it in sub menu.
Actually, I don't like to use it.
Comment: It's also listed in `Window>Show View>Other...`.  It's called the Internal Web Browser.
Comment: Hi! Any idea how to do it programmatically? That is, let's say if I've a html that is generated by my java project, how can automate the opening of browser and showing his html on it? Thanks.
Answer: You can add the button and menu option to launch the Internal Web Browser to any perspective.  Right click on the toolbar and select "Customize Perspective...".  Then click the Command Groups Availability tab and check the Web Browser command group in the list on the left to make it available.
Comment: seems it's by now been removed from there or just not available in some perspectives...
Answer: For Eclipse 4.6.3,
select Window > Preferences > (in the left pane)select )"General" tab and 'Web Browser'
// See figure below;
Answer: Eclipse Version: 2020-06 (4.16.0)
You can follow these steps in Eclipse.
Windows => Show View => Other => Internet Web Browser


Does $P_xP_y+Q_xQ_y=0 \implies$ "non-existence of limit cycle" for $P\partial_x+Q\partial_y$"? (Complex dilatation and limit cycle theory)

Question:
Let $X=P\partial_x+Q\partial_y$ be a vector field on the plane $\mathbb{R}^2$. Assume that we have :$$P_xP_y+Q_xQ_y=0$$ Does this imply that the vector field  $X$ is a divergence-free vector field  with respect to a Riemannian metric defined  out of singularities of $X$?  Obviously this would imply that  any  $X$  with $P_xP_y+Q_xQ_y=0$ can not have any limit cycle. But is it realy the case?

Namely, does the equality $P_xP_y+Q_xQ_y=0$ imply that $X=P\partial_x+Q\partial_y$  does not have any limit cycle?

Some approaches and  motivations I have examined:

Main Motivation: To our vector field $X=P\partial_x+Q\partial_y$ we associate the complex function $X=P(z)+iQ(z)$. Then we consider the  complex  dilatation of $X$ with $\mu(z)=\bar\partial X(z)/\partial X(z)$.
Let $\phi$ be the flow of the vector field $X$. So with a similar argument  for proof of   the standard variational equation one obtain that $$\begin{cases}(\partial \phi_t)'=\partial X(\phi_t(x))\partial \phi_t+\bar \partial X(\phi_t(x)) \partial \bar \phi_t\\ (\bar \partial \phi_t)'=\partial X(\phi_t(x)\bar \partial \phi_t+\bar \partial X(\phi_t(X))\overline{\partial \phi_t} \end{cases}$$
This imply that $\mu(\phi_t)'(x)=\frac{\bar\partial X(\phi_t(x))}{(\partial \phi_t)^2}exp\int_0^t div X(\phi_t (x))dt$
I observe that:
Simple Fact:  For a vector field $X=P\partial_x+Q\partial_y$ if the dilatation  $\mu(X(z))=\lambda$ is  a  constant map in $z$  with $|\lambda|=1$ then $X$ does not have any limit cycle.
Proof:
Assume that $\mu(X(z))=\lambda$ for  a  fixed complex number $\lambda$ with $|\lambda|=1$ .  So  after a linear change of  coordinate $H(z)=(\beta )z $ where $\beta$ is a complex number with $\beta^2 \lambda=1$ then we have $H^* X(z)=\beta X(z/\beta)$. Since $H$ is a linear function then it is  equal to its linear part. Since both $H$  and $H^{-1}$ are holomorphic maps then we have  \begin{equation}\label{eqq}\begin{split} \mu(H^*(X))(z)=\mu (H^{-1}\circ X \circ H)(z)\\&=\mu(X)(z)\times (\frac{ H'(z)}{|H'(z)|})^2=\lambda.\beta^2=1\end{split}
   \end{equation}.
For the  dilatation of functions  after right and left  composition with holomorphic maps  see page 9 Ahlfors lectesur on Quassi conformal mapping,Van Nostrand company,1966.
Note that $X$ and $H^*(X)$ are orbitally equivalent vector fields. So if we prove that every vector field $Y$ with $\mu(Y(z))=1$ can not have any limit cycle then the proof of the proposition would be  completed. But it is an obvious fact: let $Y=P\partial_x+Q\partial_y$ be a vector field whose dilatation function is identically equal to $1$. this implies that $P_y=Q_y=0$. So $P,Q$ are functions in $x$. It is an standard fact in the theory of ordinary differential equation that a one dimensional autonomous vector field can not posses a periodic orbit. We apply this to $x'=P(x)$. So $Y$ has no periodic orbit. An alternative Proof for  non existence of periodic orbit for the planar vector field $Y(x,y)=P(x)\partial_x+Q(x)\partial_y$ is the following: We have $[Y,\partial/\partial y]=0$. If $\gamma$ is a periodic orbit of $Y$, then there is a point $A=(x_A,y_A)$ on $\gamma$ whose $x$-cordinate $x_A$ is maximum on $\gamma$. Then $Y(A)$ is a vertical vector,i.e. $Y(A)$ is parallel to the $y$-axis.So $P(A)=0$. Then $P(x_A,y)=0,\;\;\forall y\in \mathbb{R}$. This shows that the vertical line $x=x_A$ is invariant under the flow of $Y$. This contradicts the fact that the  periodic orbit $\gamma$ intersects this invariant line. In fact this situation violates the uniqueness of solutions of ordinary differential equation. In fact this argument can be used to give a proof for the following Proposition which I found , as an exercise, in "Differentiable Manifold, by Prof. Siavash Shahshahani(His Persian lecture).
Proposition: let $X$ be a vector field on $\mathbb{R}^n$  such that $[X, \partial x_i]=0,\;\;i=1,2,\ldots,n-1$ then $X$ has no closed orbit.
This  simple observation leads us to the following guess:

Guess: If dilatation $\mu(X)$ is a real valued map then $X$ has no any limit cycle

Guess':(Equivalent formulation): If $X=P\partial_x+Q\partial_y$ satisfies $P_xP_y+Q_xQ_y=0$ then $X$ has no any limit cycle.

1)(The approach I examined) One can define a flat surface $\delta:\mathbb{R}^2 \to \mathbb{R}^3$  with $$\delta(u,v)=(P(u,v), Q(u,v),0)$$ then the first fundamental form of this surface is a diagonal matrix(the metric is diagonal). but I do not know how to continue with this situation? how can I prove that the vector field $X$ is a Killing vector field with respect to a  Riemannian metric?
The evidences showing the validity of my guess:
2)Every vector field in the form $f(x)\partial_x+g(y)\partial_y$  has no any closed orbit  since a gradient vector field can not posses non constant periodic orbit. However  there is example of such a gradient vector field which is not a divergence free vector field with respect to  any Riemannian metric defined on the complement of the singularities

Every  (Hamiltonian) vector field in the form $P(y)\partial_x+Q(x)\partial_y$ obviously is divergence free and  satisfies the underlying relation $P_xP_y+Q_xQ_y=0$

4)Every holomorphic function $f(z)=P(z)+iQ(z)$ determines a vector field $P\partial_x+Q\partial_y$. It satisfies $P_xP_y+Q_xQ_y=0$, thaks to CR equations. On the other hand it is obvious that any such a system does not have any limit cycle since the flow is a holomorphic map hence does not admit non isolated fixed point. but i do not know if in this case our vector field is divergence free with respect to an appropriate metric.

Remark: Can complex dilatation be helpful in a systematic study of limit cycle theory? In the literature, are there some references which use dilatation to count the number of limit cycles?
Comment: You probably want some additional conditions, like that the vector field has no zeros?
Comment: @RyanBudney  No but we work on the complement of the singularities.We require that our vector field is divergence free out of singularities.
Answer: I can answer your following question.
Let $X=P\partial x+Q\partial y$ be a vector field on the plane $\mathbb{R}^2$. Assume that we have $P_xP_y+Q_xQ_y=0$.
Does this imply that the vector field $X$ is a divergence-free vector field with respect to a Riemannian metric defined out of singularities of X?
The answer is No.
$\operatorname{div} X = \operatorname{trace} \nabla X$  where $\nabla$ is the Levi-Civita covariant derivative of the Riemannanian metric. When $X = X^j\mathbf{d}_j$ (summation convention), then
$$
\operatorname{trace}\nabla X = (\nabla_iX)^i = (\mathbf{d}_iX + X^j \Gamma_{ij}^k\mathbf{d}_k)^i = \operatorname{div}_{\text{eucl}}X + X^j\Gamma_{ij}^i.
$$ The second term is in general nonzero
(probably it is zero for unimodular Riemannian metrics).
Comment: Dear Prof. Eschenburg  Thank you very much for your answer. You are well come to MO!
Comment: Where did you used the equation $P_xP_y+Q_xQ_y=0$?


Mesh "sticking" to vertices

Question:
When I add a subsurf modifier the mesh "sticks" to some of my vertices as if there was a double or mean crease add to it, but I'm very confident there isnt either. This has been happening alot recently and is very annoying. If anyone has any ideas I would appreicate it.
P.S-  sometimes deleting the vertices then recreating it fixes the problem and sometimes it doesn't either way it time consuming and not ideal
Answer: The normals were flipped the wrong way.
Comment: Congratulation  :) so probably you can also mark your answer as correct clicking on check icon under vote arrow as well. It lets others to know the Q was answered, visible from Q list too. Thanks

Mesh "sticking" to vertices


How to set a custom number field to default to 0

Question: I would like to set a custom number field to default to 0 as the default value. I tried entering 0 on the default formula editor and even tried 1*0 as the default value of the number field. I am always getting a null. How do i make a number field to default to 0? I am stumped
Buyan
Comment: It works for me...can you post some code that is not working? A concise unit test could be illustrative.
Comment: Works as expected for me as well. How are you creating the record? Apex? Standard Detail page?
Answer: One mechanism of creating a new record with the default values in Apex is to use the Schema.SObjectType.newSObject() method and specify that you want the instance created with the defaults (field values & Record Type).
The first parameter is the RecordType Id and the second parameter indicates if default values should be set for its custom fields.
// Create an account with predefined default values
Account acct = (Account)Account.sObjectType.newSObject(null, true);
// Provide a value for Name
acct.Name = 'Acme';
// Insert new account
insert acct;

Documentation: SObjectType Class


Explanation and Definition of Iwahori order

Question: Can anyone explain what Iwahori order is? All I know is that it is mentioned here.
Comment: Questions will get better answers, and more upvotes, if you provide a little more background and/or motivation.
Comment: My background info is that someone used it in the answer I linked to and a Google search doesn't give me anything useful
Comment: It would help even more if you could indicate what level (roughly) your mathematical work/studies/interests are. Otherwise people might  waste time being overly technical, or pointing to more sophisticated variants that you have no interest in or use for...
Comment: I am completing my second honors level maths subject at Sydney University (roughly equivalent to graduate level in the US)
Comment: Thanks. Well, it seems that Iwahori order and Iwahori subgroups are an order of magnitude harder, or more technical, than your original question about the Jacobson radical - though since this is outside my own "safe zone", I might be wrong here.
Answer: I normally see this in terms of an "Iwahori subgroup"  (ie the the $\operatorname{GL}(2,A)$ version, versus the $M_2(A)$ version of the question you reference). For a general reductive group over a valuation ring $A$, you can consider the set of group elements that are in the Borel subgroup modulo the valuation ideal $I$. If you pick a larger parabolic subgroup (instead of the Borel) you can analogously define "parahoric" subgroups. These are generalizations of the standard $\Gamma_0(N)$ congruence subgroup of $\operatorname{SL}(2,\mathbb{Z})$. If instead of $\operatorname{GL}(n,A)$, you took $M_n(A)$, you would have a subring of matrices that are upper-triangular modulo $I$.
The Iwahori subgroups have nice properties related to buildings, and are useful as "levels" in the theory of admissible representations of reductive groups over local fields. Is there something specific you're wondering about?
Comment: That used a large number of words I have never even heard of
Comment: That's mathematics! (at least on some days...)
Answer: To translate Rob's answer above, you take a ring $R$ and ideal $I$, and take the ring of consisting of matrices with coefficients in $R$ such that the image in $R/I$ is upper-triangular.  This is a subring of all matrices.
The name "Iwahori order" is borrowed from the name "Iwahori subgroup" which refers to the invertible elements in this ring (usually in the case where R is a valuation ring, and I the valuation ideal).
Answer: I can give a concrete description of David Savitt's example (following your link).  Let $A = \mathbb{C}[\![ t]\!]$, the ring of formal Taylor series with complex coefficients.  It has a maximal ideal $\mathfrak{m} = t\mathbb{C}[\![t]\!]$, whose elements are those power series with vanishing constant term.  $M$ is then the ring of 2 by 2 matrices whose entries are formal Taylor series with complex coefficients.  The Iwahori order is the subring of matrices whose lower left entry lies in the maximal ideal, i.e., the constant term of the lower left entry is zero.
If you reduce the entries modulo $t$, $M$ maps onto the ring of 2 by 2 matrices with complex entries, and the Iwahori order maps onto the subring of upper triangular matrices.  Reduction modulo $t$ yields identical kernels for both rings, so you can think of an Iwahori as a pullback of rings.  If you consider the corresponding groups of invertible matrices, you get $GL_2(A)$, and the Iwahori subgroup, and reduction modulo $t$ yields $GL_2(\mathbb{C})$ and a Borel (i.e., maximal solvable) subgroup.
This construction generalizes straightforwardly to $n$ by $n$ matrices, where you demand that the constant terms vanish on the lower triangular part of the matrix.  The general definition of Iwahori subgroup does not need the general linear group - for any reductive algebraic group, it is defined by the property that reduction modulo the maximal ideal yields a Borel subgroup of the constant group.
In reference to Rob H.'s answer, a Bruhat-Tits building can be viewed as a combinatorial skeleton of a symmetric space.  If you are working over a finite field $F$ of order $q$, you can make a (poly-) simplicial complex whose vertices are elements of the quotient $G\big(F(\!(t)\!)\big)\big/G\big(F[\![t]\!]\big)$, and whose higher dimensional simplices are elements of parahoric quotients.  For $G = SL_2$, the only parahoric group is the Iwahori (so $SL_2\big(F(\!(t)\!)\big)\big/I$ defines the edge set), and you get an infinite $(q+1)$-regular tree.  Subgroups of $G$ (like the torus) let you define additional structures in the building, like chambers, apartments, galleries, etc.  The geometry of the building is quite useful for studying the representation theory of $G$ over local fields.
Comment: Lots of ideas here. I'll have to come back to this once I have a better grasp of some of the concepts mentioned here
Comment: Since @AndrewStacey has done some MathJaxification: do you prefer $\operatorname{SL}_2$ or $SL_2$?
Comment: I have a slight preference for the latter, but I don't think either choice will pose a significant obstruction to understanding.


Is Overwriting the PFILE with the database on dangerous?

Question: Quick question that I cannot seem to find the answer to. I have some indexes that I want to rebuild at a scheduled interval, but they are fairly large and fill up the archive_log_dest_3 if I leave them unattended. So, I wrote a script that changes the dest_3 parameter in the pfile to a much larger mount point, and then changes it back afterwards, but the script overwrites the PFILE with an updated version. Would overwriting the PFILE while the database is on and doing these index rebuilds be dangerous or not recommended? Thanks!
Comment: Rebuilding indexes on a regular basis is not a good idea; if the original allocations are good, or you let Oracle manage their size, all will be well.  Indexes will get bigger as time goes by; if you are rebuilding more than a few times a year, something else is wrong.
Answer: Why do you need it? pfile is read only once when database starts.
Use spfile and alter system set parameter = value scope=memoryor alter system set parameter = value scope=both.
Answer: Question: Is overwriting the PFILE with the database ON dangerous?
Answer: No. The PFILE is read only when the database starts, and that's if no SPFILE is there or if the PFILE argument is passed when invoking the startup command. Otherwise, when you start the database, the SPFILE is read for initial memory values, control files location and such basic information. After that, everything will remain in memory.
Note: If you change the PFILE at the OS level, you need to bounce the database to make the changes take effect.
On the other hand, using the ALTER SYSTEM SET ... SCOPE=MEMORY may be used as @ibre5041 suggested and achieve the result you want. Nevertheless, you're "losing" those archives from the original location, which makes me think you could as well add the NOLOGGING clause and avoid the generation of the logs that are filling up your storage.
So my personal suggestion would be to use the command
alter index <INDEX_NAME> rebuild parallel <#_OF_PROCS> NOLOGGING;

That will rebuild the index without generating archived log files.
Hope this helps you!


How can I polymorph in NetHack?

Question: How do you polymorph? What is the command or key I must use?
Comment: That's not how it works. You need a wand of polymorph or a ring of polymorph, you can't do it on-will.
Answer: You can't really polymorph at will.
There are 6 different types of things that can polymorph you.

Stepping on a polymorph trap will turn you into a random monster (magic-resistance will block this)

The spell of polymorph, cast at you (at yourself or possibly by a monster, though I don't think they cast that spell)

Wand of polymorph, zapped at you. Monsters can't do this, but you can also zap yourself.

Wearing the ring of polymorph (not polymorph control) will cause you to polymorph at random intervals and into random monsters (beware, you can just as easily turn into a dragon as a lichen).

Drinking (and maybe thrown at you) a polymorph potion.

Eating a chameleon or doppelganger (both natural shape-shifters) corpse. Note the doppelganger corpse counts as cannibalism for humans.

Becoming a werecreature, either wererat, werewolf, or werejackal, will randomly polymorph you into your animal/human form. Praying, eating wolfsbane, or quaffing holy water will fix you however.

In wizard mode, the extended command #polyself also works.

Note if you are already polymorphed into a magic-resistant monster (most common is grey dragon), some of these methods won't polymorph you.
For more information about the effects of polymorphing, see the Nethack wiki page on polymorph.
All forms of polymorph other than being a werecreature and #polyself in wizard mode don't let you control what you turn into.
In addition, ring of polymorph and being a werecreature don't let you control when you polymorph. Eating a shapeshifter corpse, being cast at/zapped, and drinking polymorph potions apply immediately, and only polymorph you once.
While a werecreature, you can only polymorph to and from your wereform and normal form.
Finally, with a ring of polymorph control you can always control the result of a polymorph, including not changing at all. This will also stop transforming into/from your wereform if applicable, but will not stop you from gaining lycanthropy in the first place.
Comment: There's also a potion of polymorph. And I have a vague memory that eating chameleon meat polymorphs you as well.
Comment: @Kaivosukeltaja oh thanks, forgot about the potion. And yeah, chameleons do that.
Comment: Monsters will not zap polymorph wands except at themselves in vanilla NetHack. They may zap them at you in some particularly evil forks.
Comment: @WoobleI I thought I remembered having that happen in vanilla, but okay. Fixing.
Comment: If you're in wizard mode, #polyself also works
Answer: Doppelganger corpses will polymorph you, as well. And, if you happen to be a lycan (werecreature), you will polymorph into that particular creature at random (often, inconveniently or worse) or you can quaff unholy water to change at will.  Regardless of how you polymorph, changing back still takes an unspecified amount of time between 500 and 1500 turns of the time counter or dying in monster form.  As a lycan, you might be able to pray out or eat wolfsbane or quaff holy water (all of which "cure" you of the affliction). Be sure to summon some pets before curing yourself, you may get a pack of winter wolves orbe able to poly your pack of rats/jackals into something really formidable later.
Comment: (note that doppelgangers are considered human, and count as cannibalism for human players)

How can I polymorph in NetHack?


Does this sentence analyzed correctly through Tree Diagram?

Question:  Hello,I used X-bar theory to analyze this sentence ( The big brown dog with fleas watched the birds beside the hunter)
The subject of the sentence is NP of pre-modifier,head and post-modifier. I think the modifiers before the head should be branched from a single node, thus the analysis for NP will be ternary. Is it possible with X- bar theory to analyze tree diagram into ternary branching?.
Comment: There are ten million versions of X-bar theory. Whether or not all branching is binary is a feature that distinguishes theories. So you have to specify which theory you are referring to.
Comment: X-bar syntax was invented by Chomsky in 1970. It is now used by most theories of syntax, except au courant Minimalism, i.e. it is used in every ST descendant up to Minimalism, in LFG, GPSG, and HPSG. Not every theory has an IP. Are you stipulating that the existence of IP is assumed, and we're supposed to guess what the remaining theoretical assumptions are? It would be simpler if you just named a work that identifies the properties of your theory. LGB? REST? Kayne Antisymmetry?
Comment: As you said that X-bar theory works only with binary branching. So, is the analysis correct of the above sentence???
Comment: I said that only some versions of X-bar theory require binary branching. To determine if this is correct, you have to specificy the particular sub-theory you're working with.
Comment: I used the analysis of non-lexical categories IP category, though I did not understand what you mean by sub-theory?? I read about X-bar theory, it has properties and schema
Comment: I know that there are TP, CP, DP categories and I chose IP to analyze the above sentence. I think GB stands for Government and Binding theory, though I did not know what is L?? I adopt GB module. Can you explain what is REST??
Comment: I think Kayne Antisymmetry talks about the structural relations of constituents using c-command.
Answer: Okay, so let's start with DP hypothesis. DP hypothesis simply suggests that NP is a dependency of a determiner in lexicon, which means [the dog] is DP, not an NP. You can test this on such structures having Adj and N at the same time. If you keep assuming the D is complement of N (and an AdjP will always be adjunct of NP), the structure below would be grammatically valid:
*yellow the car

But it is not. So let's try this on DP hypothesis, saying that NP is complement of D terminal:
the yellow car

Now it seems okay.
Coming to your tree, you must correct the I-spec and P-comp according to this hypothesis and you are good to go.

However, I'm assuming you are taking a syntax class, which means this is the visible part of iceberg. You have still lack of knowledge of v, the roles on v and V (I mean the usual movement from v-spec to I-spec, but it depends on situation) etc. I mean I gave a tree, but it is not still valid for current generative grammar, I made it because it is based on your givings above, it is valid to your current state.
You can get an information on DP hypothesis here for now. However, I recommend Radford's syntax books as a reference, those are great.
The Valid Tree of Late Government and Binding Theory (Phases Not Included)
Comment: Thanks for this explanation, I assume my tree is wrong?? for I-spec I read some references that are used IP instead of I'', like Ouhalla's Introducing Transformational Grammar. As for movement, my concern now is declarative sentences, movement is concerned with question. I read about DP and it is used mostly with TP hypothesis.Unfortunately, I 'm not taking any syntax class.
Comment: I'' and IP does not really have a significant difference. Some uses double single quotation mark instead of P, that's all. Coming to TP, all I know is TP is used for a while before, then now it has become IP again. I don't really know the reason, however I think the agreement particles created some problems on theory (like question transformation in Turkish is blocked due to several varieties of agreement particles, maybe some other languages too), that was why TP is used for a while, then it has become IP again. | Your tree is not wrong, just not suitable for current theory. I'll edit soon.
Comment: Edited. The tree above makes sense of late Government and Binding theory, right before the minimalist program. Don't forget that phases not included.
Comment: Thanks a lot , you really provided me with good info. about drawing trees
Answer: The question of whether some version of X-bar theory permits a ternary branching structure for the subject in your example is beside the point for the example, because the example doesn't have a ternary structure.  X-bar theory doesn't have anything to do with it.
We can test for where the N' constituents are by constructing examples with parts of the subject taken as antecedents for the pro-form "one", since only an N' can be such an antecedent:

The big brown dog with fleas watched the birds beside the hunter, and the small blue one with worms ran away in terror. ["dog" is N']
   The big brown dog with fleas watched the birds beside the hunter, and the small blue one ran away in terror.  ["dog with fleas" is N']
   The big brown dog with fleas watched the birds beside the hunter, and the small one ran away in terror. ["brown dog with fleas" is N']
   The big brown dog with fleas watched the birds beside the hunter, and the same one ran away in terror. ["big brown dog with fleas" is N']

("brown dog" and "big brown dog" could also be N'.)


Does animation make use of any Artificial Intelligence?

Question: I have always wondered if the animation technology used in film-making uses AI to any extent.
Answer: Yes, quite frequently, particularly in crowd simulation.  Actors within the crowd are programmed with particular behavior types and will interact with each other to form a more lifelike crowd.  The interactions are usually fairly simple, but it is a form of AI.  I'm not sure if it is still around, but one of the early programs used for this was actually called "Behavior".
Some procedural animation could also be described as a form of AI as well.  For example, when a character needs to walk across uneven terrain, it can be possible to setup a physics simulation and have the character alter their movements to maintain balance.  This is really also a form of AI combined with physics simulation.
There are probably others as well, but those are the first two that come to mind as relatively common uses.
Comment: Crowd simulation is indeed a big one. For Lord of the Rings, Peter Jackson, knowing he'd never be able to afford live actors for large crowd scenes, commissioned a crowd simulation application now called Massive, and that application has been used in many movies since (and not just PJ's). There are other ones as well; Pixar created one to plug into Renderman, and it was used for Finding Nemo to simulate the schools of fish in various scenes. That one used a form of neuroevolution to achieve variances in motion between fish.
Answer: I don't think it's very common. They use animators, which may have set movements, which they can queue at certain times. Self-interactive AI seems like it would take too much time to program and reprogram.
Comment: This is simply inaccurate.  For primary character animation, you are correct.  Animators can do a better job of making fluid natural movement, or even more often, motion capture is used for actual actors giving performances, however for digital extras (particularly crowds), behavior is almost always AI driven since it would be prohibitively expensive and unnecessary to do it by hand.  IK (Inverse Kinematics) and physics simulation allow for reasonably clean and natural movement to be computer generated since a lot of movement is governed by physics, it just isn't very expressive.
Comment: More informations can be found [here](http://en.wikipedia.org/wiki/Crowd_simulation).  It also isn't new, Softimage|Behavior was introduced in 2002 and was a rebranding of Motivate made by The Motion Factory.  That might not be the first such software either, it's just the first I personally used.


Using sum of logarithms of primes to prove the number of primes up to $n$ is $O(n/\log n)$

Question: I need to show that the number of primes up to $n$ (i.e. $\pi(n)$) is $O(n/\log n)$.
In the previous exercise of this question I proved that ${\displaystyle \sum_{i=1}^{\pi(n)}\log p_{i}} \leq Cn$ for some constant $C$ (where $p_i$ is the i-th prime number) . I thought I needed to do something like $${\displaystyle \sum_{i=1}^{\pi(n)}\log p_{i}\geq\sum_{i=\lfloor\pi(n)/2\rfloor}^{\pi(n)}\log p_{i}\geq\frac{\pi(n)}{2}\cdot\log p_{\frac{\pi(n)}{2}}}
  ,$$ and then if I show that $\log p_{\frac{\pi(n)}{2}}=O(\log n)$ then I can prove what I need, but I didn't manage to. I am kinda out of ideas right now. Any clues people?
Comment: @BrentJ: This is much weaker than the prime number theorem.
Comment: This is the Prime Number Theorem. Do you need hints or an answer? I'd say there are plenty of both online
Comment: When I searched some through the net ive found many proofs, but none of them was elementary. The point in my question is to prove it using what I proved in the first exercise. I think it should be pretty elementary. If you have any hints on what I can do from here it will be very helpful.
Comment: I'm not sure how the sum of logs works in to the proof. I know Erdos did an elementary proof (I think there is some controversy or something) and Atle Selberg did an elementary proof. I would suggest trying to find the latter if no one ends up answering. An elementary proof is going to be pretty involved
Comment: @Aryabhata you're absolutely right. Thanks for pointing that out
Answer: The function you have from the previous exercise is the Chebyshev function. Let us call it $A(x)$.
You can now use Abel's identity to prove what you are seeking.
You have already shown
$$ \sum_{1 \lt k \le x} a(k) = A(x) \le cx$$
(where $a(x) = \log x$ if $x$ is prime, and $0$ otherwise)
(look at the Abel's Identity link to understand the choice of notation)
To use Abel's theorem, we take $f(x) = \frac{1}{\log x}$
And get
$$ \pi(x) = \sum_{1 \lt k \le x} \frac{a(k)}{\log k} \le \frac{cx}{\log x} + \int_{2}^{x} \frac{c}{\log ^2 t}\text{d}t = O\left(\frac{x}{\log x}\right)$$
Note: What you are trying to prove is much weaker than the prime number theorem.
Answer: Of course partial summation is the most instructive way of doing this. However here is another answer which does not depend on anything:
Assuming that we have proved $$\sum_{p \leq x} \log p \leq C x,$$
for some positive constant $C>0$ and all $x >1,$ we have
$$\Big(\pi(x)-\pi(x^{\frac{1}{2}}) \Big)\log(x^{\frac{1}{2}})
\leq
\sum_{x^{\frac{1}{2}}<p\leq x} \log p
\leq C x.$$
Now using the trivial bound $\pi(x^{\frac{1}{2}})\leq x^{\frac{1}{2}},$
we get that
$$\pi(x)\leq 2C \frac{x}{\log x}+x^{\frac{1}{2}} =O(\frac{x}{\log x}).
$$


What kind of air compressor do I need for a proper auto body point job?

Question: I want to repaint my 2001 Lexus ES300. If I were to buy or rent an air compressor, what kind of specifications do I need for it? I.e. the minimum CFM, HP, etc.
Comment: It all depends on the spray equipment you have (or are contemplating on buying). Look at [this page](http://www.spraygunworld.com/Information2/CFM.htm) as it might help.
Comment: Great page. The answer is in there. What's the rating in the gun, Twinbird?
Comment: Thanks for that link! I have not considered the rating in the gun yet, but I'll look into it. Perhaps I will end up having someone do the job for me, I see now that it's a lot more complicated than I originally thought.
Answer: I apologize for such a long answer.  Your question is not simple.
Most higher quality coating for metal require a hardener, etc.  This makes things more complicated.  I would get someone more experience to do your paint job for you unless you plan to do a lot of painting in the future, then watch a lot of you tube videos or take some classes.
There are two type of paint spraying large amounts of coatings.
There is airless paint sprayer or air sprayed paint.
Airless paint sprayers are basically the ones used to paint houses etc.  They atomize the paint into tiny particles to fill every tiny gap and crevice.  I would recommend using a small tip on the gun to get a nice slow flow of paint.  if the paint comes out to fast you can get runs droplets from low pressure that will ruin your paint job.  If you have never used a paint sprayer before I would practice on some other project before trying to paint metal.
If you are going to use the "classic movie" traditional body shop air compressed gun,  You will need a massive tank that costs $800+.  They need to be able to compress enough air to continuously work.  The tanks at the store usually tell who what they are rated for.  This method also requires you buy a special gun with a tank attacked to it where the paint is stored, it will come with a gravity fed reservoir (tank is above the gun) or a air displacing reservoir (tank is under the gun in front of trigger).  The guns usually require 30-40 PSI.  This needs to be continuous, if the pressure drops the guns does not atomize the coating like it should, causing larger (splatter) droplets to come out the tip which will ruin your paint job.
First you need to sand the car, then prime the car, then paint the car, then seal the car, last you need to polish the car.  This is why paint jobs are so expensive.  Some paints come with primer built in and can be purchased at auto parts stores.  You will still need to spray a clear coat sealer and polish/ buff the car for hours.
There is a lot of skills that need to be learned to get a higher quality paint job.  Also there is strict EPA regulations on capturing and filtering all the chemicals out to the air before being discharged to the exterior / public.
P.S. I recommend you search on craigslist for a body/paint guy who has the experience and is looking for extra work.  They will usually do the same or similar quality work as a regular shop for a fraction of the price!
Comment: You forgot to mention High Volume Low Pressure (HVLP) guns, which do not require near the pressure or the volume of air. These can be used in conjunction with smaller air compressors, which can more easily keep up with the demand of the HVLP guns. 20-30 gallon, 2-3hp compressors can handle the 9-15cfm needed to run these.[See here](http://www.spraygunworld.com/Information2/CFM.htm) for more details. Also, you neglected to mention having a filter on the air hose to remove moisture and contaminants. This is *very* important for any type of quality job.
Comment: Thank you for the answer and for the comment as well, you've both really cleared things up for me!
Comment: Your welcome.  We are just trying to get the big picture in your direction without diving in to deep since it is a VERY specialized subject.  To be honest neither of us have scraped the surface.
Comment: Need to do further research but HVLP is the airless type right Paul  High volume Liquid Projection...
Comment: Everyone can do as they see fit, but I used a 8gal 2hp compressor with an HVLP gun. Sanded to bare metal, applied urethane primer, followed by single stage urethane paint. It's not a show stopper, but it turned out very well! The fault with it was definitely more a lack of experience on my part than bad equipment. A bigger compressor would have been great, but mine got the job done. Everyone loves to brag about their overkill, overpriced snap-on tools. What is "necessary"? Like I said, everyone should do as they see fit.


Is it possible to cast dtype of scipy CSR matrix to NPY_FLOAT?

Question: I have a scipy CSR matrix that was constructed from a COO matrix as follows:
coord_mat = coo_matrix((data, (row, col)), dtype=np.float64)

It is being used as an input to a library with an underlying C implementation, and I believe that the dtype of my matrix is double(np.float64). However, I'm encountering the following error:
ValueError: Buffer dtype mismatch, expected 'flt' but got 'double'

I went to do some research and found the scipy C-api, which informed me that the NPY_FLOAT data type is converted to a 32-bit float in C, while the current data type I have corresponds to a 64-bit double. Am I on the right track here? If so, how do I cast the type of the array? I'm not entirely sure how I can call on the NPY_FLOAT object in order to cast it.
Any help on this matter would be deeply appreciated!
Answer: I'm not sure about the C interface, I'll try to explain the coo_matrix part.
Since you are using the tuple input it splits that into 3 variables
obj, (row, col) = arg1

then it assigns those to attributes
self.row = np.array(row, copy=copy, dtype=idx_dtype)
self.col = np.array(col, copy=copy, dtype=idx_dtype)
self.data = np.array(obj, copy=copy)

and since you specified a dtype
if dtype is not None:
   self.data = self.data.astype(dtype)

If data, row and col are already arrays, any you didn't specify the dtype, the sparse matrix can use those inputs as attributes without copying.  Your dtype parameter will produce a copy.
The sparse matrix is not a numpy array, but rather an object that has 3 arrays as attribute.  The matrix accepts the astype method, which probably does that same self.data.astype action.  So I think you case comes down to: can you cast any array to that type.
Comment: Thanks for the input! That's precisely the problem I'm facing, I suspect I need to cast the array to a `NPY_FLOAT` dtype in order to ensure compatibility - alas I'm not sure how to do so and I can't find documentation online so I've no clue as to whether I'm even on the right track or not.


Mini bike coleman ct200u wont start and kick backs when i pull the string

Question: Mini Bike coleman ct200u wont start i bought it off facebook market place i went to look at it he says it takes usually 3 pulls for it to start and he showed me the choke off gas on and kill switch facing forward he started it took it for a little spin brought it back i took it home and it no start could it have to do something with me taking the front tire off trying to put it in the car?
Comment: Its really confusing if u know anything that would help please let me know thxx!
Comment: You have the choke off when starting hot. You use choke when starting from cold, and turn it off as soon as the engine will run without it.
Comment: @WeatherVane yea ik thx tho
Comment: You can phone him and ask.
Answer: Have you cleaned the carb maybe the jets are blocked change the spark plug check the tank maybe the fuel has been sat awhile and don't be scared to really pull the string not all the way out or you will break it be strong the pullback could be it trying to start but not enough momentum
If it has a kill switch maybe the problem
Or the spark cover is not on properly
Some times different weather can change the bikes performance (hot day No air) humid, it will need to be adjusted on the carb can be a air screw, or a fuel screw, probably not the problem
3 thing
Spark
Fuel
Oxygen
If one of these is out you will have a problem
To much fuel
Black and wet spark plug, if running excessive fuel being spat out the exhaust,  back fires Running too rich
Spark or no spark, maybe a weak spark plug or the CDI
Oxygen if you breathe too much on the bike you will then steal the oxygen from the bike so hold your breath, kick start or string GO MENTAL untill it starts and then breathe again If failure to START throw object on floor and tell it you mean nothing to me,


What was the civil weapons legislation under Hitler?

Question: Was possession of weapons prohibited, encouraged, allowed to members of some organizations, or what?
Answer: As @Nathan Cooper indicated, under Hitler, most of the civil weapons legislation was not actually Hitler's - he inherited strong gun control laws from Weimar Republic (aside from total prohibition for the Jews since 1938).
However, the laws were written in a way that allowed pretty much unlimited restrictions and limitations by people in power, within the framework of that legislation:

Guns were required to have serial numbers
anybody owning one without a serial number had to have one stamped on it.
Permitting was mostly left up to the police.
Permits were only given to people of "undoubted reliability" who demonstrated a "need" for a gun (Hello from New York City).

Note the laxensess of definitions. The last bullet point was such that pretty much anyone you didn't want to have a gun wouldn't have one.

A very detailed discussion is in the second half of the Straight Dope article here (the first half was mostly devoted to debunking an infamous Hitler's gun control "quote").
Comment: What that was in practice? Were civil weapons widespread or rare?
Comment: This answer ignores the way in which gun laws where loosened under the Nazi regime.I also disagree with the framing of the Nazis as anti-gun, the Nazis where not pro or anti gun in the way it' undestood right now in the US.
Answer: Germany had very tough gun laws after WWI, which were gradually relaxed during the Weimar Republic and the Nazi regime. I'll paraphrase German Wikipedia:

Immediately after WWI, private gun ownership was outlawed, however this was impossible to enforce because guns were not registered. Especially post Freikorps right wing militias (Schwarze Reichswehr) were well armed

In 1928, Germany got its first unified gun law. Private gun ownership was allowed. However, prospective buyers had to prove their "reliability" and an actual need for the weapon. Weapon owners needed a Waffenbesitzkarte and a Waffenschein (a license to be carried on the person)

After 1933, the Nazis used the existing laws to harass Jews and political enemies: the police would withdraw the permit and use this as a pretext to search someones premises for weapons. This was targeted widely at Jews (in '33, Berlin's police chief withdrew all weapons permits from Jews) but also at other political enemies.

Later, the Nazis would control who gets a gun: gun laws were relaxed for party members (a license was no longer necessary to carry a handgun, starting at certain ranks within NSDAP, SA, SS or Hitler Youth among others), while "Gypsies" and other were banned from gun ownership. Jews were excluded from gun or ammunition manufacture and sale. at the same time, the restrictions on longarm ownership were relaxed, permits were only required for handguns. A specific goal of this law was Wehrhaftmachung des Deutschen Volkes, to ready Germans for war.

Later in 1938, after the November pogroms, a bylaw specifically forbade Jews guns or any other form of weapon ownership

Another element of gun politics where gun clubs - I have not found much information, but in 1936 all gun clubs where gathered under the roof of the *Deutscher Schützenverband," in 1938 they were put under control of the SA. Contemporary historiography looks more closely at the politics of the individual clubs (many of which, especially the more sport oriented ones, submitted quite willingly). It appears however the politics re. gun clubs was also motivated militarily - train Germans to shoot.
So you certainly can say that in the 20ties, Germany increased gun rights - from none at all to legal gun ownership, based on permits. To answer the the question if gun ownership in certain groups where "prohibited, encouraged, allowed", I think we can identify three broad trends.

allowed, maybe encouraged: handgun ownership for "reliable" Nazis
allowed, maybe encouraged: longarm ownership for most Germans, in the hope that a population that practices shooting makes better soldiers. I think the regimes interest in gun clubs could point to "encourage" but this would require more research
prohibited: potential political opponents, Jews and Gypsies, gun laws and bylaws where also used to harass these groups

I don't know if the Nazi or Hitler ever systematically laid down their thoughts on private gun ownership, I don't think there were coherent pro- or anti-gun views in place. Rather it was general Nazi-politics that also shaped gun policies:

Antisemitism, in that Jews where excluded from gun cliubs, gun ownership and gun making
disarming political opponents
militarization of society that called for broad training with and accessibility of longarms
Nazis wanted the tools to terrorize their opponents, or protect themselves
(mostly) the (usually local) police that used the laws passed on a federal level to harrass Jews, Gypsies


What is the difference between $L^2$ norm and $\ell^2$ norm?

Question: I can find no precise definitions on the internet for the $L^2$ and $\ell^2$ norms. Certain websites keep switching between the two. Can someone please help me?
Comment: The first is for function spaces, the latter for spaces of sequences.
Comment: The $\ell^2$ norm is a special case of the $L^2$ norm on a measure space (http://en.wikipedia.org/wiki/Measure_(mathematics)) for the counting measure.
Comment: I meant, could you please define them for me? It it is square root of the integral of the function or the square root of the summation of the discrete sums of the function?
Answer: The scalar product on $L^2$ is given by $\langle f,g\rangle=\int_X \bar{f}{g} \ d\mu$, whereas the scalar product on $\ell^2$ is given by $\langle x,y\rangle =\sum_{i \in \mathbb{N}} \bar{x_i} y_i$. In both cases the norm is given as usual in Hilbert spaces by $\lVert f\lVert=\sqrt{\langle f,f\rangle}$.
So $\ell^2$ is a special case of $L^2$ with $X=\mathbb{N}$ and the counting measure $\mu$.
Comment: $\ell^p$ is sometimes used to denote the spaces of functions over other discrete spaces, e.g. $\ell^2(\mathbf Z)$.
Answer: Regarding the switching I would like to add that $L^2([0,1])$ and $\ell^2$ are isomorphic as Hilbert spaces (as they are both separable and infinite-dimensional). That means: If $(f_n)_{n\in\mathbb N}$ is an orthonormal basis of $L^2([0,1])$, for example the basis $\{\exp(2\pi i n \,\cdot\,) : n \in \mathbb Z\}$, then
\begin{align*}
   L^2([0,1]) &\to \ell^2\\
          f   &\mapsto (\left<f, e_n\right>)_n
\end{align*}
is an isometric isomorphism of Hilbert spaces, so especially $\|f\|_{L^2} = \|(\left<f, e_n\right>)_n\|_{\ell^2}$.


How do I detect whenever two UIImageView overlap?

Question: I have two UIImageViews, one of them is moving from left to right, the other one is touch draggable. iI want NSLog to show up a message on console whenever imagetwo overlaps imageone. How Do I do this?
Answer: You can use the CGRectIntersectsRect function to easily test rectangle intersection, provided the UIImageViews share the same superview (more exactly, have the same coordinate space).
Likely you will need to add code like the following:
  -(void) touchesEnded:(NSSet *) touches {
    if(CGRectIntersectsRect([imageViewA frame], [imageViewB frame])) {
      NSLog(@"Do something.");
    }
  }

to the UIView that hosts both image views, or a similar method that is called whenever the drag is completed.
Comment: If they don't share the same coordinate space: `BOOL intersects = CGRectIntersectRect( viewA.bounds, [ viewA convertRect:viewB.bounds fromView:viewB ] )`
Answer: try something like this.
if (CGRectContainsRect([myImageView1 frame], [myImageView2 frame])) {
        NSLog(@"Overlaped, it's working!");
}

Answer: You can use:
CGRectIsNull(CGRectIntersection(view1.bounds, view2.bounds));
Answer: In Swift 3.0 has become...
if (self.image2P.bounds.contains(self.image3P.bounds)) {
    print("Overlaped, it's working!")
}


Book about a brother and sister living in a futuristic world

Question: It was 1981-1982 when I read it.  My female English teacher told me to read it...not the class.  Not sure when it was written?  I remember it was written from the sister's perspective.  There seemed to be no parents from what I remember.  And it was underground or something...not like real earth.  I would love to know what it is!  The teacher I had died in the late 80's so there's no way to try to contact her.  Thought I would try the net.  Thanks for your time!!
Comment: That, unfortunately, covers a LOT of books!  Do you have any more recollections?  Perhaps the cover?  Any commonly used phrases in the book?  Any plot info?  The more you can provide, the better a chance of getting a good answer..
Comment: The City of Ember is too new for the timeframe you mention.. But it was based on Suzanne Martel's 'The City Under Ground' (aka [Surreal 3000](http://www.collectionscanada.gc.ca/read-up-on-it/015020-5003-e.html)) which might also fit, although I believe both protagonists were male.
Comment: I feel like it was a newer book at the time?  Not sure?  I kept thinking it was Madeleine L'Engle but when I poked around Amazon none of the plots sounded right.  I was 12 at the time so...it's a shame I don't remember more since I did read it multiple times!  The memory is so vague...
Comment: This reminds me on a book I read a long time ago, but it's vague... Did it involve a social structure, where the average was worshipped, and every person having not average properties (beauty, intelligence, etc.) were considered aberrations, and were oppressed?
Comment: Madeline L'Engle, COULD fit, if you are remembering certain aspects of the [Time Quartet](http://en.wikipedia.org/wiki/Time_Quartet); Several of the books are from Meg's (the sister) perspective, there are a number of 'not real earth' settings, etc. Do the names Meg, Charles Wallace and Calvin O'Keefe ring any bells? Or Mrs. Whatsit, Mrs. Which or Mrs. Who? She's written other books (many of them), but the Time Set is the most often recommended by English Teachers in my experience. Remember any character names, if the above don't ring any bells?
Comment: vsc, I don't remember anything like that in there.  Does sound interesting though!  Wouldn't that be something?!
Comment: Hey Keith.  I do kind of remember Meg.  But the thing that threw me when I was looking is I definitely don't remember the Mrs. Whatsit, etc.  Were they separate from the story with Meg?  I checked about The City Under Ground and that was a no go.  I'll have to poke around at the Time Quartet when I get a chance...off to watch Mentalist.  ;)  I'll definitely check it out more tomorrow.  Thanks for the info!
Comment: Yeah.  Definitely not.  I just was on Amazon.  I keep hoping they will suggest a book at the bottom but no go!  The titles all sound familiar but there were no parents.  Maybe I need to be hypnotized!  :P  It's like it's on the tip of my brain!
Comment: vcs, I just saw This Time of Darkness where a girl is shunned for knowing how to read.  Maybe that's the one you're thinking of?
Answer: I'm thinking it might be The Girl Who Owned a City by O.T. Nelson. It was written in 1975 and during the '80s was often an "enrichment" selection on grade school book lists, meaning it was given to children who breezed through the regular class reading lists.
A virus kills all the adults, and society falls apart.  A girl and her younger brother become the central unifying figures of a group of children who establish a society in a school building, which they fortify and barricade against marauding child gangs, so that a fair part of the book has the protagonist-children living exclusively indoors in semidarkness. It is written in omniscient third-person, but focuses mostly on the girl's point of view.
Comment: Interesting fact, the book was set in a suberb in Chicago. I too read this in grade school (While living near Chicago) and was quite impressed to divine it was set not far from where I was reading.
Answer: For some reason your question made me think of "Podkayne of Mars" by Robert A. Heinlein, although it only fits some of your description. A brother and sister are traveling in a spaceship. The story is told mostly through digital journal entries made by the sister (the brother hacks into her journal and makes some entries also.)
Answer: This sounds like "Why Weeps the Brogan?" by Hugh Scott
The brother and sister (the POV character - point) are trapped in a buried museum (thus "underground") with hostile spiders and a mysterious creature called "The Brogan", although you have to work that out (and a lot else besides) by yourself. Some catastrophe has befallen them and their parents are no longer around (point). The book is essentially a big puzzle whereby nothing is initially explained. The story gradually reveals who they are, how they came to be there, who or what the Brogan is and why it weeps. The writing is quite stylised and it won the Whitbread in 1981 according to Blog Post about Why Weeps the Brogan? by Hugh Scott (thus likely to be a recommendation by an English teacher).
I hope it's the right book!
Answer: This sounds like one of the books from the Chthon or Phthor series by Piers Anthony.
Comment: I suspect not; those were both a bit heavy on the sex, not to mention S&M for most High School English teachers to recommend.  (I'm assuming High School, as they are rarely called just 'english teachers' at higher levels.) Also, neither was from a "Sister's" perspective.  Chthon was from Anton Five's perspective, and, if I remember correctlu, Phthor was from his son's.
Answer: Ender's Game by Orson Scott Card!
Comment: While Ender's Game does match some of the recalled details, it was not written from Valentine's (the sister) perspective. The book version was also not released until 1985. The original short story was published in 1977, but does not include a sister as a character in any way.


How handle a 5 year old who delays going to the toilet and soils his pants?

Question: My 5 year old son goes to kindergarten. When it's toilet time he is the show-off.  He was toilet trained but now delays going to the toilet for play or TV watching. He once said monsters are there so I put up a dinosaur picture that he chose since he said dinosaurs scare away monsters but he is still delaying going to the toilet and soils his pants. How to handle it now?
Comment: Not an answer, but an insight:

There is a concept called "flow". It is a repeditive action which is just the right amount of challenging and constantly provides small moments of gratification. It can apply to almost everything from skiing to doing your dishes, but it is particularly strong in good computer games (and can appear by watching television).

It is one of the mayor aspects of flow that humans are more focused on the activity and tend to forget about bodily needs like hunger or the need to visit a toilet.

Read more about flow, you might find insight and solutions :-)
Answer: We were starting to see delay toilet use, so we introduced specific times of the day our son has to try regardless if he feels like it.

Once in the morning as before going downstairs and starting the day.
Once before dinner.
Throughout the day we encourage him to tell us when he as to go.

Some of these times if he does this without complaints we reward via a sticker on a progress chart that can be used as a trip to the book store to buy a book or new dinosaur.
Still early and a work in progress for us.
@Rororo is correct on the flow state. Perhaps mandatory pause and breaks in the action?


Original image not saving?

Question: When i'm uploading a picture, WordPress doesn't save the original image, just the thumbnails? That's why when i'm setting a featured image, the link is broken. Any help to to save the original image by uploading it via media library?
Comment: Thanks Tim, problem solved. I guess the issue is with the file permissions.
Comment: Hi Keith, welcome to WPSE. It sounds like something _might_ be off with file permissions, but that's just a guess. Worth checking. Can you try setting the permissions for `wp-content/uploads` to 755? If you don't know how to do that see https://codex.wordpress.org/Changing_File_Permissions
Comment: Glad you solved it!
Answer: The default image sizes of WordPress are "thumbnail", "medium", "large" and "full" (the size of the image you uploaded). These image sizes can be configured in the WordPress Administration Media panel under Settings > Media. This is how you can use these default sizes with the_post_thumbnail():
<code>the_post_thumbnail();                  // without parameter -> 'post-thumbnail'

the_post_thumbnail( 'thumbnail' );       // Thumbnail (default 150px x 150px max)
the_post_thumbnail( 'medium' );          // Medium resolution (default 300px x 300px max)
the_post_thumbnail( 'large' );           // Large resolution (default 640px x 640px max)
the_post_thumbnail( 'full' );            // Full resolution (original size uploaded)

the_post_thumbnail( array(100, 100) );  // Other resolutions
</code>
for more information to see https://developer.wordpress.org/reference/functions/the_post_thumbnail/
Comment: Thanks for your answer purvik7373, and welcome to WPSE, however this isn't what the question asks.

Original image not saving?


PDF.zip file password forgotten and need to reset

Question: I have an old PDF.zip file that is password secured. Naturally I can't remember it.
Is there a way to change it or disable it?
Comment: The other answer is only for Zip archive using AES, which might not be the case here.
Comment: True.   http://security.stackexchange.com/q/5447/971 might be relevant if it isn't encrypted with AES.  If their question is not covered by either of those two links, the author can post a new question (or edit this one) with the details of their specific zip file.  In particular, they should tell us what it *was* encrypted with, if it wasn't AES and wasn't the weak "standard" encryption.
Answer: Some Zip archives use the old PKZIP encryption, which uses a weak homemade stream cipher. The attack is described here (implementing it is a nice exercise for crypto students, by the way). Tools which apply that attack exist (use Google to find some). Windows XP inherent abilities at "Zip password protection" use this weak algorithm; see this answer for some details.
Other Zip-aware tools rely on AES encryption, which won't be as easily broken. If that is the case, then your only hope is to try some brute force on the password, in case it was chosen by a human being and thus possibly in range of a dictionary attack. This may fail if the password is strong enough.


SSIS SQL Command datetime parameter with timezone offset

Question: I am designing a SSIS package to transform data from SQL DB to another SQL DB. I'm using OLE DB source and have Query written as SQL Command. I'm passing a datetime parameter which will be read via SSIS variable from XML configuration file. In Config file I'm setting date as '2/16/2011 2:00:00 AM'. This parameter is being used in the query from SQL Command to get the data inserted/updated after given date. When I run the SSIS package I'm not getting correct data. To dig this further, I had run SQL Profiler to check the value of the parameter being sent and noticed that whenever the SQL Command query is being called, it is suffixing offset (-08:00) to the parameter. Is there any way to not to set the offset when SSIS runs?
Comment: What is the Data Type of your SSIS variable, and of your destination column?
Answer: When I set up an OLEDB source and use it to query a datetime field in a table, it returns the correct values.
eg: select FULLDATETIME from  where FULLDATETIME = '12/5/2010 02:00:00 AM'
I get the following result:
2010-12-05 02:00:00
Sounds like you could be querying a datetimeoffset field. You'll need to adjust your literal value with dateadd(), eg select dateadd(mi, datediff(MI, getutcdate(),GETDATE()), '2/16/2011 2:00:00 AM')


How to get an NT hash from registry?

Question: I want to manually get the NT hash from the registry (without any tool). Let's say just for the administrator. I know that it must be stored in the SAM area of the registry somewhere so I tried to extract it from there. I found the location HKLM\SAM\SAM\Domains\Account\Users\000001F4 (1F4=500=Admin) and there the value "V" with some binary content. The only useful documentation for the V binary is this link: http://www.beginningtoseethelight.org/ntsecurity/index.htm but that info is very old and I'm not sure if that is still correct with current Windows 7 and Windows 8. Also, if I extract the NT hash like described there, it doesn't match what I get if I set the password to "123" (I would expect 3dbde697d71690a769204beb12283678, but got 1509c04cb2a3e20eba3fde1ac5f8589f). So the question again: How to manually extract the NT hash from the registry?
Comment: I don't know the internals of how Windows stores the hashes, but a difference in the hash could be [accounted for by a salt](http://security.stackexchange.com/questions/14025/why-is-using-salt-more-secure)
Comment: An API will be needed to read the hash if the one you located is wrong or incomplete.  The premise of this question is that regedit & file browsing tools built into the OS are sufficient to view the hash.  That may not be the case, and the value may be stored in binary using a non documented API that is restricted to a specific calling process.   Your question seems to think linux-like where you can browse to a ./etc/passwd file.  That's not necessarily the case with Windows OSs... but I don't know for sure.
Comment: Simple answer http: you are not asking a security question. The question you have asked is basic windows OS functionality. It has been perfectly well answered in any case.
Comment: Hi @makerofthings7, best answer so far. Let me know if I should edit the post somehow. Yes, if Windows is now using a salt, that would explain everything. Are you sure about that? It would be new to me that Windows now uses salting. Any source for that? Since what version? And which salt is being used? The username, SID or something completely different? I think Windows is NOT using salting at all (for several reasons), but convince me if you have any reliable source for that.
Comment: @http You need to challenge your assumptions or else you will dismiss the correct answer because it does not match what you expected.
Comment: @makerofthings7 Fully understood. It *is* stored in a binary with an undocumented API. Well not even an API, the Registry API is public, just the format is private. I want to read the binary myself; it's documented in the link I provided, but the documentation there might be outdated. So the idea with the salt was just an educated guess then?
Comment: @schroeder I don't know what assumptions you are talking about and what I should "challenge". I'm not aware of making any assumptions. Please explain.
Comment: @http the assumption is that the hash you generated must be the same as the one in the Registry.
Comment: @schroeder I'm just assuming it is stored somewhere, obviously in the registry, in the SAM area, because it was always there. Where exactly is the question. It might be obfuscated, salted, whatever. So that's the question; how it is stored exactly. Have you read the description in the link? That clearly describes how it worked in XP and is a good start. I don't see any difference in Windows 7/8, but it's just not working for some reason, so maybe it's just XORed with some Windows-installation-ID or something. My question is HOW is it stored there?
Comment: This question appears to be off-topic - please rethink what it is you are aiming to get. I have read the extensive comments, and it does look like you aren't paying attention to the answers you are getting. They do answer the question you have written. Once you have a firm question, ask it.
Comment: @Rory Alsop: First of all, the question is not off-topic. Why should it be? My question was to find out how to get the hash. Nobody answered that yet. All I got was to boot with other systems and general stuff like that. The question is firm and clear. Let me know if I can improve it in any way.
Comment: @RoryAlsop: How the Windows hash is stored is not a security question? I wonder what is then. And yes, as of yesterday I have an answer in the link that schroeder added in his EDIT, although no answer here on SE. But I would accept that link as answer anyway. But as you closed this question as off-topic, I can't.
Comment: You have asked how to get the hash from the registry. Not a security question. Sorry.
Answer: How to extract the hashes from the registry without 3rd party tools
This is the bare-bones answer to the question posed by the OP:
<code>reg.exe save HKLM\SAM MySam
reg.exe save HKLM\SYSTEM MySys
</code>
In these files are the local user hashes (not AD). From here, a simple hex script can be written to pull out the individual hashes.
The next question is: are you happy with the just hashes, or do you want to reverse engineer them to the plaintext versions? That question is not asked, so I will assume that it is not desired.
Edit:
This post explains how to script ways to extract hashes.
Comment: I'm interested in this "simple hex script". Well, I don't even need a script, just a description what to get from where exactly. Yes, just the hashes. Only Admin one is sufficient.
Comment: @http Then you need to radically alter your question.
Comment: I think the question is really clear. I don't know how to improve it. Let me know if you can. I asked how to get the hash. No idea why I should radically alter it.
Comment: I just saw your link ("This post") in the edit. That post there is very helpful. It says that SysKey is generating a bootkey that is generated from other values stored in the Class attribute of some other keys etc. I haven't read/understood/verified everything yet. Why don't you give that as an answer? I thought we are not allowed to post a simple link as an answer and all answers have to get copied here. Such an answer would answer my original question.
Comment: I finished reading the "This post" and see that the calculation of the 16-byte boot key is missing. Would that be a new question?
Answer: The hashes are stored in the Windows SAM file. This file is located on your system (depending on your installation paths) at X:\Windows\System32\config but is not accessible while the operating system is booted up. These values are also stored in the registry at HKEY_LOCAL_MACHINE\SAM, but again this area of the registry is also not accessible while the operating system is booted.
There are known ways (and tools) to reverse engineer the hashes to retrieve the passwords and vice-versa, but I am not going to help you with that because...

Questions asking us to break the security of a specific system for you are off-topic unless they demonstrate an understanding of the concepts involved and clearly identify a specific problem.

EDIT
Since you have physical access, one of the most effective methods is to boot the computer into a different operating system. If you are comfortable using Linux then this means you can simply boot to a Linux live CD that is capable of reading NTFS drives, mount the Windows partition, and copy the SAM file to external media. Work on that copy by looking at "SAM\Domain\Account\Users". The rest is up to you.
On a sidenote I would like to warn you about playing with such system areas if you are using Encrypted File System (EFS) on anything released after Windows XP/2003. If you change something in the wrong place there (like resetting passwords or modifying other hashes), it might cause the operating system to lose its EFS keys which introduces a whole new bunch of problems which you don't even want to think about. That's why you'll only want to work with a copy of the SAM file.
EDIT 2
Just found your previous question "https://security.stackexchange.com/questions/37899/how-to-brute-force-nt-hash-to-password" and I'm starting to understand why you keep asking for the "exact hash location" and "hash identification".
Therefore, a little reminder: security.SE is not here to help you hack or crack anything. Please check the rules instead of looping the question in the comments area. Thanks.
Comment: @http Let's assume that e-sushi is correct. That means that the relevant hashes are loaded into memory at bootup and the sources are locked. That means that to get what you are looking for, you need to look in the memory, or be outside of the OS to read the hashes and salts. Look at the source code of the tools you know. Where do they look?
Comment: @http Please read what I wrote: **not accessible while the operating system is booted**. You will have to use another OS (Windows, Linux) to access the data from the non-booted windows install you want to analyze. Besides that, I think that marking the locations "X:\Windows\System32\config" and "HKEY_LOCAL_MACHINE\SAM" in bold is enough indication where to look? To make sure you get it: even if you would be able to run regedit as SYSTEM, **your OS is booted** and the related areas **not accessible while the operating system is booted** so you will not be able to see the hidden and locked data.
Comment: @http I can't help you as long as you ignore what I write... I never stated you need *"wizard"* software to help you find the hash locations; I said you need another *"OS"*. Since you keep repeating your "no tool" mantra over and over again, let me remind you that no one can read disk-data with the naked eye. You will need a hex-editor to see the relevant raw bytes. But no special "password crackers" or "hash fetchers" needed. As for the repeated location question, I'll quote my EDIT: *"SAM\Domain\Account\Users"*. You want to do it manually? Use separate OS + HexEdit and get your hands dirty.
Comment: @http Please note that after I post this comment, I won't be replying here anymore to avoid a discussion loop. Besides that, I think time has come to point you to *"Please avoid extended discussions in comments."*, *"Can I get data analysed here? Can I challenge people to decode something? No. Such questions are not helpful."* and http://meta.crypto.stackexchange.com/questions/100/do-we-want-challenge-analyse-this-questions-and-if-so-what-constraints-if-any Have a nice day.
Comment: @http **Please avoid extended discussions in comments.** Security.SE is not a "forum". Besides, your question was put on hold as "off-topic" two days ago. From my perspective — for a good reason…
Comment: I understand that the file cannot be read while it's in use, but the registry can be accessed (you just need to change permissions). I do know how to calculate the hashes and what tools to use. Also, my question is not a specific system. I want to know where to get the hash value from the registry; where exactly it is located. If I run Registry Editor as system, *I am* the system and the system must be able to read the values there. So where is it? Is the key I mentioned not correct? I do know pwdump and all these tools, but I want to do it manually, so I need the knowledge.
Comment: @http Added an **edit** to my answer to give you a push into the right direction.
Comment: I am not asking how to get the hash by a tool. I know all the other methods. I know I can't access the file while the system is running. But the lsass process has to have access while the system is running, so don't tell me it's not possible to access the hash while the system is booted up. Worst case would be to inject code into lsass process. But lsass also runs only as SYSTEM, which I can do as well. So to repeat my question: Where does lsass read the hash from? Or if you had a copy of the SAM registry, where would you read the hash from? (without any tool)
Comment: I'm not ignoring anything, I just said I do have access to SAM\Domain\Account\Users already, even in the running system. I don't know why you would need another system when I can open all keys already. But if you feel better, just assume I'm running the regedit from another system started from a boot disk. I still don't know which exactly is the hash. Was the information in my original post correct then? And why is the hash wrong?
Comment: @schroeder That's a good answer. (No idea on how I can upvode comments.) But if this would be correct, what happens if I change the password? That can't be just in memory, otherwise it would be the old one on next boot. And I see that the value in that binary changes when I change the password. So the hash must be there somewhere/somehow.
Comment: @e-sushi: You're wrong. First (in EDIT2) you make a wrong link to another unrelated question. Don't mix things that don't belong together. Second, I'm not asking to help to crack a specific system. I'm here to get knowledge. I know my passwords. Otherwise *any* pentesting question would be off-topic.

How to get an NT hash from registry?


Is it safe if I forgot to put the handbrake on when I turn off the car?

Question: Earlier today, I forgot to put the handbrake on when I turn off our car. Is it totally safe or is it dangerous to our car? My car has an automatic transmission.
Comment: I never use handbrake on automatic trans cars, Yes it is safe.
Comment: Manual or Automatic Transmission?
Comment: I don't in winter on a manual - just leave it in gear - freezing issues avoided.
Comment: Automatic Transmission
Answer: If the vehicle is an automatic and the transmission is left in park then yes it will be ok. However it is advised that the handbrake is used when the vehicle is parked.
If its a manual vehicle, then you should apply the handbrake even if the car is left in gear. Not just when you're around hilly areas either, as strong winds can cause a vehicle to start moving as can passing trucks etc. Also say the vehicle is hit by another vehicle whilst parked.. if there is no handbrake applied your vehicle would then be able to go rolling away causing perhaps another accident or injury to someone else.
Comment: Why is the handbrake required if the car is in gear?
Comment: Because say for example the car is shunted whilst parked etc it could still jump out of gear.. And if that occurred on an incline etc.. Well I guess you know the rest.