What are some good FOSS or free tools for editing STL files for 3D Printing?

Question: I'd like to customize and modify some parts on Thingiverse, beyond just simple scaling for 3D printing.
I've been looking for some tools that convert the STL files into something that is easily edited, but so far all that I've found are really buggy and crash frequently as soon as one loads a reasonably complex model.
Are there any free open source software tools that people can recommend that handle STL importing and editing? If not FOSS, what about just "free or nearly free for hobbyists, ed, non-commercial?
Comment: Please note that STL, as a file type, is not designed to be edited and is susceptible to corruption if brought between multiple CAD programs. For this reason, it is often difficult to convert an STL back into a file type that is "CAD friendly". It's like crumpling a piece of paper or opening a JPEG a million times.
Comment: I'm not sure about that. Sounds more like there being different revisions of the format and/or some 3d editors not creating the files properly which other 3d editors with more strict parsing will not load, than a limitation of a format. Personally I've created as well as edited STL files in Blender and used them in Repetier Host and I've never had an issue loading a file in both.
Comment: @LeoErvin I was trying to convey the issues of 3D editors not importing/exporting properly as you said. Look into the following Wikipedia page as one of my sources https://en.wikipedia.org/wiki/STL_(file_format) . For a program like Blender, which can heavily rely on proper orientation of the triangulated solid, it is understandable that you haven't encountered an issue. However, there are other (not as well developed) applications that may choose to ignore or not use certain parameters within the file as they are not within scope of the application. So, just be careful which software you use.
Comment: They exist; Blender for one. An exhaustive list is off topic here.
Answer: You can use OpenSCAD. It's a script based powerful CAD open source software under GPL.
On Thingiverse, a lot of things are made with this CAD software (the Customizer flagged ones) and you can just download their source code (.scad) and directly edit them !
You can also import existing STL and edit them like they were a primitive shape like a cube. You can then interact with them by doing binary operations, adding parts, etc.
It is hard to start with if you have never coded, but that's worth it :

OpenSCAD is a software for creating solid 3D CAD models. It is free software and available for Linux/UNIX, Windows and Mac OS X. Unlike most free software for creating 3D models (such as Blender) it does not focus on the artistic aspects of 3D modelling but instead on the CAD aspects. Thus it might be the application you are looking for when you are planning to create 3D models of machine parts but pretty sure is not what you are looking for when you are more interested in creating computer-animated movies.
Comment: OpenSCAD isn't a bad solution - however tweaking parts is a bit challenging as there isn't a way, AFAIK to measure an existing object to offset and tweak accordingly.
Comment: Good point mentioning OpenSCAD! When downloading from Thingiverse editing the .scad files directly is nice solution - if you know how to use it.
Comment: If you have programming background, OpenSCAD is easy (but read up on the unusual scope rules); but if the original author was drawing in a GUI instead of coding, it may be hard to get any useful (human-readable) code out of their models and into OpenSCAD. Models of people, terrains, etc. are likely to be done with a GUI like Blender; engineered parts are likely to be done with OpenSCAD.
Answer: If you want to do basic edits to an STL, a program such as MeshMixer might be right for your. It offers the ability to combine and subtract models, add custom supports, and similar, in a fairly straight forward manner.
An alternative that allows your to do complex editing of STLs would be Autodesk Fusion 360. Here you can import STLs into meshes, which you then may convert into solids for further editing. It is more work to use, but a very flexible solution; you can i.e choose to only convert certain faces to solid, or use the mesh as a reference point for other designs.
As far as I know, neither of these are FOSS (free and open source),  but both are free for non-commercial use.
Comment: +1 for Meshmixer, love doing small fixes with it. It can't rescue everything, but it is certainly unique in its approach to modifying files (much more akin to literal sculpting than anything else I've used). Fusion360 often has issues with complex STL files (since it doesn't natively work in the STL format, so files have to be converted to the Fusion 'language').
Answer: There is no argument that the most successful FOSS 3D editor is Blender. It can both import and export STL files and export to STL or many other formats (DAE, OBJ, 3DS, FBX, DXF, WRL) so you can both use it to edit STL models as well as just use it as a STL converter.
https://www.blender.org/
Comment: Hi @Leo. I have downvoted your question, and here is why: stating that "There is no argument that..." strongly indicates that you cover up your own personal opinion as a fact - something that is frowned upon in the SE community. I suggest you either back up this statement, or find a somewhat more humble reformulation.
Comment: Blender is successful - and I'm not debating that.  My question wasn't meant to instill a pissing match.  That said - Blender is really more oriented at animation; and editing models for 3D printing is kind of a "hack", being that it is geometry is "unit-less". Hence one can model proportionally, but then you have to scale to the real world outside of Blender.
Comment: I don't care if it strongly indicates that it is my own personal opinion *in your opinion*. Statistically Blender is successful in all areas, which are feature completeness, stability, siz eof community (help), popularity (download count, number of users), development phase. These are statistics/facts. Whether my own opinion is also involved or not is even irrelevant at this point. So if you're going to downvote an answer which might be the best option for the person asking the question (the whole purpose of Q&A) for the sake of the "spirit of SE" then go ahead. I simply find that illogical.
Comment: please understand me correctly: I am not saying Blender isn't a great software, and perhaps the best alternative in this case. However, *there is no argument* that there are other 3D editors that can edit STL files as well (see what I did there?). In other words, I'm not disagreeing with you, but simply asking if you would consider rephrasing it. Whether you do or not is entirely up to you, but I believe your answer will be *better* if worded differently.
Comment: Tormod, please understand that I'm not talking like this because of my emotions, nor am I a fan of the software Blender, I'm just stating what I believe to be a fact. I see no reason to reword what I said simply because I believe what I said to be true. I don't think this is the situation where one needs to not seem biased or sound humble. As I mentioned, there are facts to back up what I said. Please understand that what you said about what SE community likes is also simply your opinion which I can disagree with. No pissing match here.
Comment: Jim, Blender is a 3d modeller which has taken a generalist approach like many other 3d modellers, meaning that it can do many things, it is not design specifically for one task. I can tell you with 100% certainty that Blender is not more oriented at animation making. Like I said, it's a general 3d modeller.  And geometry is not unitless, you can choose Metric or Imperial mode in this menu: http://i.imgur.com/D1mdhDy.png  By default it is "none" or "Blender Units" which is more useful for other things when you're better off thinking in relative dimensions rather than real world units.
Comment: Continued: there is also an addon for people who use it for 3d printing which is included with Blender now. http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Modeling/PrintToolbox  Not that it is necessary, but there's even that.
Comment: @LeoErvin just edited your answer to help maintain integrity to the "political correctness" of your response.
Comment: Sorry I could not approve that as in the link there was no statistical data, just mention that it has 3d printing tools built-in...
Comment: @LeoErvin, I'm sorry for my own negative response to your question. For some reason, the formulation provoked me, which it probably shouldn't have.
Comment: @Tormod Haugene. No problem, I believe political correctness is overused these days, for a Q&A site I just don't see a place for it, as I think it will both make the questions and the answers longer and therefore less readable, that's why I write like this.  Now if you asked me to mention some sources to my claims that would be reasonable to me.
Comment: @LeoErvin, I guess I'm more of the scientific writer type where you never make a claim without backing it up without at least 5 references. :-)
Comment: As someone who's in the 3d field I know almost everyone here knows what the major 3d modellers are capable of (Max, Maya, Blender, C4D, etc.) but we don't keep bookmarks to the things which led us to learn that. I'll try to dig up the facts.
Comment: @LeoErvin The link that I tried to add to your response was a SE link, which is preferred over another website link. Did you have a look at the link in the posted question? It leads to an article providing sound statistical evidence that Blender is most used in the 3D printing community.
Comment: Only a link that Blender has some tools for 3d printer users. Not a link that Blender is the most successful FOSS 3d editor which was what some people didn't like (FOSS means "free and open source", not about 3d printing).
Answer: I have used Wings 3D (http://www.wings3d.com) for just that purpose. It is very easy to use, and has many other useful functions built in. Not only can you reform the mesh, but you also you have the ability to import and export many other meshes such as .obj, and etc. When you have completed your modifications you can export them in one of several formats (I find it easier to just keep it in .stl) and then use netfab (also has a free version with some limitations as compared to the paid version) to fine tune the mesh if it is not printable in its current format. Wings will export your modifications in .stl format, but you may have to fine tune to get rid of holes blemishes and etc., and you can view your changes in several views such as Gaussian and other forms.
If you decide to try Wings 3D you need to go through the tutorials, since there is a multitude of possibilities, including making your own meshes, beginning with several basic forms such as squares, cubes, cylinders and several other basic geometrical figures.
Using these two programs I have been able to modify many meshes and arrive at a very printable object. One of the features of Wings which has been quite valuable is the smoothing app which reduces the sharp division lines on some models.
Since both programs are free you can try them and uninstall them if they do not fill your needs. Blender is also an excellent free program, but I find Wings to be much simpler to use.
Hope this helps
Comment: Wow, this is actually pretty well maintained surprisingly.  I will need to try this out.  As a software dev myself, I'm intrigued just because it's written in Erlang.  For those looking for the site: http://www.wings3d.com
Answer: If you want a WYSIWYG-style editor and are not content with OpenSCAD, I found 123D Design (Autodesk, definitively not FOSS but free for hobbyists) to have (on a Mac) a compromise between power and ease of use that most appealed to me.
If you insist on FOSS probably Blender comes closest, but I found it to be too idiosyncratic in interface and tools to be usable.


How do you Download a minecraft map on the XBox360?

Question: A youtube user made a map, but I don't know how to download it.
I am trying to download a map to Minecraft on the Xbox 360 - can I do this? If yes, how?
Answer: Note: This answer is for windows.
Required

Computer
USB Drive
Xbox 360 Console

Steps
Plug in your USB Drive into the front of your Xbox.
Boot up your Xbox 360. Navigate to "system settings" (click the home button and go all the way to the right to find this). Navigate to Storage. Open "hard drive" storage, or "system" storage (wherever you store your profiles and games) and move your profile to the USB drive. Open your xbox storage, click "Games", and then "Minecraft". Click on a world you don't need and move it into your USB drive.
Now we will go into your computer. Disconnect your USB drive from the Xbox and plug it into your computer.
Download Horizon from here (this may be
falsely detected at a virus, but Horizon is safe to download).
Now download a Minecraft Xbox 360 map you would like to play (as a ".bin" file).
Now open horizon and you should see your USB drive on the right side in the file area. Now open Games, you should see Minecraft. Right click Minecraft and click inject file. Choose the map you downloaded. Click on the new map and transfer it to your profile. After the transfer is successful, close horizon and eject your USB drive.
Go back to the Xbox 360 and plug your USB drive in your Xbox.
Navigate to "system settings" (click the home button and go all the way to the right to find this).
Open storage and go in your USB drive. Move the Minecraft world you just downloaded to your Xbox storage. Move your profile back to your Xbox storage.
Once all that is done, go to Minecraft and you should be able to play the map!
Answer: Unfortunately, you cannot trivially download custom maps to the Xbox 360 version of Minecraft.
Answer: Horizon will give you a virus, but there is another option, download Modio 5 and get a .bin or .so file of the map. When you have the map, go into Modio 5 and click "Open a Save", then choose the file and download it to your account, make sure to have your account and minecraft game on the usb, or it wont work. Please dont say clickbait, it works.


Why is it an equivalent definition of a triangulated full subcategory?

Question: We know that an additive full subcategory $\mathcal{S}$ of a triangulated category $\mathcal{T}$ is called a triangulated subcategory if it is closed under isomorphism, shift and if any two objects in a distinguished triangle in $\mathcal{T}$ are in $\mathcal{S}$, then so is the third. See Neeman's book section 1.5. Why is it equivalent to that the inclusion functor is exact in the sense that it preserves distinguished triangles? And what if assuming any additive subcategory which may not be full?
Comment: Crossposted: http://mathoverflow.net/questions/206829/why-is-it-an-equivalent-definition-of-a-triangulated-subcategory
Comment: Neeman's definition (1.5.1 [here](https://homepage.mi-ras.ru/~akuznet/homalg/Neeman%20Triangulated%20categories.pdf)) does assume that $S$ is full.
Comment: I would like to note that if one uses [05QM](https://stacks.math.columbia.edu/tag/05QM) as definition for triangulated subcategory (more general than Neeman's definition), then a triangulated subcategory (not necessarily full) $\mathcal{D'}$ of $\mathcal{D}$ is [replete](https://ncatlab.org/nlab/show/replete+subcategory) in $\mathcal{D}$ if and only if for all distinguished triangles $X\xrightarrow{f}Y\xrightarrow{g}Z\xrightarrow{h}X[1]$ of $\mathcal{D}$, if at least one of $f,g,h$ is in $\mathcal{D}'$, then so are the other two.
Answer: Let's contemplate the two possible definitions of triangulated subcategory that OP is hinting at. For simplicity, the translation functor of a triangulated category (that I shall denote as $[1]$) is always assumed to be an automorphism. The class of distinguished triangles of a (pre)triangulated category $\mathcal{D}$ is called the (pre)triangulated structure of $\mathcal{D}$.

Definition 1. Let $\mathcal{D}$ be a (pre)triangulated category. Let $\mathcal{D}'\subset\mathcal{D}$ be an additive subcategory such that $\mathcal{D}'[1]=\mathcal{D}'$.

$\mathcal{D}'$ is a Neeman (pre)triangulated subcategory of $\mathcal{D}$ if it is a full replete subcategory satisfying that for every distinguished triangle $X\to Y\to Z\to X[1]$ in $\mathcal{D}$, if $X,Y$ are in $\mathcal{D}'$, then $Z$ too (by TR2, this is the same as saying that if two out of three among $X,Y,Z$ are in $\mathcal{D}'$, then so is the third).
$\mathcal{D}'$ is an SP (pre)triangulated subcategory of $\mathcal{D}$ if $\mathcal{D}'$ is a (pre)triangulated category whose (pre)triangulated structure is contained in the (pre)triangulated structure of $\mathcal{D}$.

(The second definition is the Stacks Project one, 05QM; it is also the same as Definition 10.1.9.iii in Kashiwara, Schapira, Categories and Sheaves.) OP is asking why does the first definition imply the second one. That is:

(Q) If $\mathcal{D}'\subset\mathcal{D}$ is a Neeman (pre)triangulated subcategory, what is the (pre)triangulated structure on $\mathcal{D}'$ turning it into an SP (pre)triangulated subcategory of $\mathcal{D}$?

The answer to (Q) is: it is the distinguished triangles in $\mathcal{D}$ whose objects all lie in $\mathcal{D}'$. Let's see why.
Remark 2. Let $\mathcal{D}$ be a pretriangulated category. If $\mathcal{D}'\subset\mathcal{D}$ is a full SP pretriangulated subcategory, then the triangulated structure of $\mathcal{D}'$ is as big as it can get, and it is fully determined by the objects of $\mathcal{D}'$. More precisely, the distinguished triangles of $\mathcal{D}'$ turn out to be exactly the distinguished triangles $\Delta=(X,Y,Z,f,g,h)$ in $\mathcal{D}$ such that $X,Y,Z\in\operatorname{ob}\mathcal{D}'$. Indeed, by (TR1)$_{\mathcal{D}'}$ there is is a d.t. $\Delta'=(X,Y,Z',f,g',h')$ in $\mathcal{D}'$. By Lemma 014B, $\Delta\cong\Delta'$. Since $\mathcal{D}'$ is full, this is an isomorphism of triangles in $\mathcal{D}'$. By (TR1)$_{\mathcal{D}'}$, the triangle $\Delta$ is distinguished in $\mathcal{D}'$.
In other words, if $(\mathcal{D},[1])$ is a triangulated category and $\mathcal{D}'\subset\mathcal{D}$ is a full additive subcategory such that $\mathcal{D}'[1]\subset\mathcal{D}'$ and $[1]:\mathcal{D}'\to\mathcal{D}'$ is an automorphism, then either $\mathcal{D}'$ can be endowed with a unique triangulated structure turning it into a triangulated subcategory of $\mathcal{D}$ or there is no such triangulated structure at all. Here is a criterion to detect the positive situation.
(A preadditive subcategory of a preadditive category is a subcategory with a preadditive structure such that the inclusion functor is additive.)

Lemma 3. Let $(\mathcal{D},[1],\mathcal{T})$ be a (pre)triangulated category.
Let $\mathcal{D}'$ be a non-empty full preadditive subcategory of $\mathcal{D}$ preserved under $[1]$ and $[-1]$.
Then $\mathcal{D}'$ is additive and an SP (pre)triangulated subcategory of $\mathcal{D}$ if and only $\mathcal{D}'$ is compatible with the (pre)triangulated structure of $\mathcal{D}$ in the following sense:
$(*)$ Given any morphism $f : X \to Y$ in $\mathcal{D}'$ there exists
a distinguished triangle $(X, Y, Z, f, g, h)$ in $\mathcal{D}$
such that $Z$ is isomorphic to an object of $\mathcal{D}'$.

Note that in $(*)$ it doesn't matter which distinguished triangle we pick. If $\mathcal{D}'$ satisfies the compatibility condition and $f:X\to Y$ is in $\mathcal{D}'$, then by Lemma 014B, for any d.t. $(X,Y,Z,f,g,h)$ in $\mathcal{D}$, it holds that $Z$ is isomorphic to an object of $\mathcal{D}'$.
Proof. It is clear that if $\mathcal{D}'$ is additive and an SP (pre)triangulated subcategory of $\mathcal{D}$, the compatibility condition holds. Conversely, suppose the compatibility condition holds. Let's see first that $\mathcal{D}'$ is additive. Pick any object $X$ in $\mathcal{D}$. By (TR1), the triangle $X\xrightarrow{1_X}X\to 0\to X[1]$ is distinguished. Thus, $(*)$ implies that $\mathcal{D}'$ has a zero object. On the other hand, by Lemma 05QT(3) and (TR2), the triangle $Y[-1]\xrightarrow{0}X\to X\oplus Y\to Y$ is distinguished. Now $(*)$ implies that $\mathcal{D}'$ has the direct sum for $X$ and $Y$. This shows that $\mathcal{D}'$ is additive. If there is a (pre)triangulated structure $\mathcal{T}'$ on $\mathcal{D}'$ turning it into a a (pre)triangulated subcategory of $\mathcal{D}$, by Remark 2 it has to be
$$
\mathcal{T}'=\{(X,Y,Z,f,g,h)\in\mathcal{T}\mid X,Y,Z\in\operatorname{ob}\mathcal{D}'\}.
$$
Verification that $\mathcal{T}'$ constitutes a (pre)triangulated structure on $\mathcal{D}'$ is now an exercise on using the axioms. We will leave this to the reader. $\square$
It then follows that every Neeman (pre)triangulated subcategory is an SP (pre)triangulated subcategory in a canonical way, which answers (Q).

Bonus: We can weaken the definition of Neeman (pre)triangulated subcategory to a preadditive subcategory and drop the repleteness requirement, and still get the same (see Lemma 5 below).

Lemma 4. Let $\mathcal{D}'$ be an SP (pre)triangulated subcategory of a (pre)triangulated category $\mathcal{D}$. Then $\mathcal{D}'$ is replete in $\mathcal{D}$ if and only if for all distinguished triangles $(X,Y,Z,f,g,h)$ in $\mathcal{D}$, if at least some morphism of $f,g,h$ is in $\mathcal{D}'$, then so are the other two.

Proof. ($\Rightarrow$). Suppose $(X,Y,Z,f,g,h)$ is a d.t. in $\mathcal{D}$ such that some of $f,g,h$ is in $\mathcal{D}$. By (TR2), without loss of generality $f\in\operatorname{Mor}(\mathcal{D})$. By (TR1) in $\mathcal{D}'$, there is a distinguished triangle $(X,Y,Z',f,g',h')$ in $\mathcal{D}'$. By Lemma 014B in $\mathcal{D}$, there is $c:Z\to Z'$ such that $(1,1,c):(X,Y,Z,f,g,h)\to (X,Y,Z',f,g',h')$ is an isomorphism of triangles. Thus both $Z$ and $c$ are in $\mathcal{D}'$. Hence $g=c^{-1}\circ g'$ and $h=h'\circ c$ are also in $\mathcal{D}'$.
($\Leftarrow$). Suppose $\alpha:X\to X'$ is an isomorphism in $\mathcal{D}$, and that $X'\in\operatorname{Ob}\mathcal{D}'$. By Lemma 05QR, the triangle $(X,X',0,1,1,0)$ is distinguished in $\mathcal{D}$. Since $0:0\to X$ is in $\mathcal{D}$, so is $\alpha$. $\square$

Lemma 5. Let $\mathcal{D}$ be a (pre)triangulated category. Suppose $\mathcal{D}'$ is a full preadditive subcategory of $\mathcal{D}$ satisfying that for every d.t. $X\to Y\to Z\to X[1]$ in $\mathcal{D}$, if $X,Y$ are in $\mathcal{D}'$, then $Z$ too. Then $\mathcal{D}'$ is a Neeman (pre)triangulated subcategory (i.e., $\mathcal{D}'$ is replete in $\mathcal{D}$ and $\mathcal{D}'$ is additive).

Proof. By Lemma 3, $\mathcal{D}'$ is additive and there is a unique (pre)triangulated structure on $\mathcal{D}'$ turning it into an SP (pre)triangulated subcategory of $\mathcal{D}$. By Lemma 4, $\mathcal{D}'$ is replete in $\mathcal{D}$. $\square$
Comment: I would like to note that Lemma 3 is a restatement of [05QX](https://stacks.math.columbia.edu/tag/05QX).
Answer: A triangulated functor $F\colon \mathcal T'\to \mathcal T$ must preserve structures. So we have $F$ commutes with translations (aka shifts/suspensions) and takes triangles in $\mathcal T'$ to triangles in $\mathcal T$.
If $\mathcal T$ is a triangulated category and $\mathcal T'$ is a full additive subcategory of $\mathcal T'$, we ask when the inclusion functor $i\colon \mathcal T'\hookrightarrow \mathcal T$ gives us an induced triangulated subcategory as its essential image. By induced, we mean a definition of triangles and translation that comes from restrictions of translation and triangles in $\mathcal T$.
So let's look at why these three criteria are reasonable:
(1) Closed under isomorphisms: Since the substructure is given by the essential image, we should have $\mathcal T'$ closed under isomorphism.
(2) Closed under translations: Clearly, if the translation of $\mathcal T'$ is inherited from $\mathcal T$ the restriction to $\mathcal T'$ must factor through itself.
(3) 2 of 3: If $\mathcal T'$ has triangles consisting of all those triangles in $\mathcal T$ such that all objects of the triangle are in $\mathcal T'$, we need only consider two of three since cones of morphisms in $\mathcal T'$ must be in $\mathcal T'$ (it is triangulated) and translation allows us to consider any two.


Homeomorphism definition

Question: I was told by my professor that homeomorphisms are continuous maps with continuous inverse, but do those conditions also imply that the map is bijective?
Comment: There are three properties at play: 1) The map is continuous. 2) The map has an inverse. 3) The inverse is also continuous. One of those properties in particular is both a necessary and sufficient condition for the map to be bijective.
Comment: In a word, Yes.
Comment: Only bijective functions can exhibit true inverses.
Answer: It was inconvenient that your professor worded it this way. From the get-go, saying that a homeomorphism is continuous function with a continuous inverse assumes that we have some function $f$, and that its inverse, $f^{-1}$, exists. Off-the-bat, just cause we have a function $f$, it does not mean that it has an inverse.
In addition, the way your professor phrased it doesn't make it clear whether we are talking about a subset of the range, or the whole range itself: in a homeomorphism, we must have the whole range, which is something your professors phrasing neglected to capture.
If I were you, I would just forget about what your professor said. It is kind of circular. Just to make it clear. By definition, a homeomorphism is a function $h$, from a topological space $X$, to a topological space $Y$, such that the following hold:

$h$ is 1-1
$h$ is onto
$h$ is continuous
$h^{-1}$ is continuous

Note, we do not say $h^{-1}$ exists here: this is a consequence of $h$ being 1-1, as we can always create $h^{-1}$ in such a case. ALSO, we imply that the image of $h$ is all of its range: this is captured by saying that $h$ is a bijection.
Comment: @user317935 Think abut that one for a little longer: Are $X$, $Y$ topological spaces?!?
Comment: Suppose $f: X  \rightarrow Y $ is continuous. Suppose there exists $g: Y \rightarrow X$ is continuous satisfying $g \circ f$ is the identity function on $X$ and $ f \circ g$ is the identity function on $Y$, then is $f$ a homeomorphism?
Answer: Yes, if a function is a homeomorphism, it is bijective. The converse is not true: consider the function that wraps $[0,1)$ around the unit circle (can you define this? Why is this interval half opened?) Here, one of the conditions for a homeomorphism is violated.
Similarly, consider the function that takes the step function to the x-axis. This is continuous, but its inverse is not. Homeomorphisms preserve properties that we care about, such as connectedness.
Answer: A function that has an inverse is injective, or one-to-one.  Every one-to-one function is onto some set.  So a continuous function with a continuous inverse is a homeomorphism onto some set even if there is some larger target set.
However, if $f:A\to B$ is continuous and has an inverse and its inverse is also continuous, that does not mean $f$ is a homeomorphism from $A$ to $B$.  Rather, $f$ is a homeomorphism from $A$ to some subset of $B$, which may or may not be all of $B$.
Among the simplest instructive examples of a continuous bijection whose inverse is not continuous is $\theta\mapsto e^{i\theta}$ from $[0,2\pi)$ to the circle.
Comment: So, you are using words loosely in a way that will confus a reader just learning terms? Given a function from $A$ to $B$, an inverse is, amongst other thing, a function from $B$ to $A$. Using the term to mean something else is only going to confuse a beginner, either now or later.
Comment: It is used in set theory, in topology. It is used in all standard math courses that I have ever taken.
Comment: It seems to be common convention be that if someone writes "$f\colon A\to B$ has an inverse", then the domain of that inverse is implicitly $B$. It's at best misleading to say "$f\colon A\to B$ is invertible" if all one means is that $f$ is injective.
Comment: Every function with an inverse is a bijection. Are you talking about a one-sided inverse?
Comment: @ThomasAndrews : I'm talking about an inverse whose domain is some subset of $B$, which need not be all of $B$.
Comment: @ThomasAndrews : That may be a definition used in category theory, but it is not universal. $\qquad$
Comment: A function has a left-inverse if and only if it is injective, and a function has a right-inverse if and only if it is surjective. An inverse is usually take to be simultaniously a left- and right-inverse.

Homeomorphism definition


Template embedding in gwt application

Question: I have template with its css and html.Now I want to get all the look
and features (compatibility) of that template in my gwt application.
I am not getting the right way to do that.
One way which I thought is that for control there will be a .html
file , which will be added to the gwt root panel using frame.I also
don't know it is right way or not.
Please help me out to embed all the look and feature of the template
to the gwt application.
Answer: You can simply use your html template as the GWT host page.
The tricky part is using GWT Widgets. GWT Widgets, especially layout panels, produce their own html, which might not match your template and/or css.
You might get around that somewhat by wrapping Widgets around existing html by using widget.wrap(element) method. This method is available on some widgets: Label, TextBox, etc..
Also, if your css is class-oriented, you might get by by setting proper style classes of widgets: widget.setStyleName(className).

Template embedding in gwt application


Blender running at a crawl after NVidia update

Question: I can't say exactly the NVidia update was the cause but several other people and I have experienced a problem with Blender slowing to a crawl in the last few days. If you are having this same problem and are running Windows 10 with a NVidia GPU go to this Blender URL for more info:
https://developer.blender.org/T50650
I got this auto update from NVidia 2/13/2017 which is when I started having the problem:
NVIDIA - Display - 12/29/2016 12:00:00 AM - 220.127.116.1154
Check your update history. On Windows 10 do this:
Select the Start  button, then select Settings  > Update & security  > Update History (in the right hand column near the top in blue).
Comment: Is this a question, or an answer for what to do if your blender is running at a crawl?
Comment: This is not a blog, answering your own questions is possible on this site though and we welcome the effort. However if this is for future reference then please edit your question and write it in the form of a question so it is easier to find by searching or future users, then provide the solution for your problem as an actual answer bellow.
Comment: This is an attempt to find an answer. I know of a lot of people having what sounds like the same problem I am having. All of them say this has come up in the last few days, not months ago. I may not be great at blog etiquette, but I do know how to fix a problem and that is to get all people involved looking at the problem.
Comment: Sorry. I'm not use to solving problems in this type environment, but you make a good point that I'll adhere to in the future.
Answer: It looks like the problem has been solved for at least myself and some other people. I and at least one other person sent a bug ticket to NVidia. NVidia stated the auto update I received was a generic Windows update and not one from NVidia. They recommended getting the appropriate driver form this URL: http://www.nvidia.com/Download/Find.aspx?lang=en-us and follow the NVidia instruction for installing it. I did the Advanced install and clicked the button to erase all of the old drivers to prevent any conflicts. It worked great and I think my Blender is running faster. I also downloaded the HP driver for this card as NVidia recommends, but it was more than 2 years old. I'll just keep it for a backup.
I hope this solves the problem for others.


Implication of Earnshaw theorem to the orbit of the moon

Question: Can we apply Earnshaw theorem in circular/elliptical/hyperbolic orbits? I was wondering how did the moon stop at its current stationary orbit. It seems to me the fragments that gave origin to the moon didn't have the minimum kinetic energy to escape Earth's gravitational field and they had a velocity component that got conserved and another one that decreased as moon's got distance. Still, this result seems to kind of contradict Earnshaw's theorem as this orbit should not be stable. Any thoughts?
Answer: No, Earnshaw's theorem applies to statics. It doesn't apply to a dynamical equilibrium.
Comment: are you saying the circular orbit is stable?
Comment: Any orbit of two gravitational objects is stable. Earnshaw's theorem is about multiple fixed charges where only one of the charges is free to move. The problem you describe is dynamic: both objects can move.
Comment: I disagree, in order for an orbit to be stable the gravitational aceleration must be contrary to the displacment from equilibrium position. A body can lose its orbit forever if it moves one centimeter closer to the attracting body. The moon should fall back on Earth after some time


Why does a non contact AC voltage detector detect voltage on a DC line that is not flowing

Question: I have two non contact voltage detectors (Klein and Greenlee) ..both are rated to detect AC voltage with a sensitivity range from 50 to 1000 V. I used these detectors on 9 different cell phone power adapters with only the USB cable attached to the adapter (so no current is flowing). On 5 of the power adapters it states that the output is DC at about 5 V with a range from 0.3 to 1.0 amps.  Everything I have researched says that these non contact detectors will only detect AC voltage; not DC.  On four of these adapters I detect voltage and on one I do not.  The results are the same for both detectors and are repeatable.  Can anyone explain why these detectors that are rated for AC use at 50 to 1000V apparently can detect voltage on a DC supply at about 5 V??  ...and why voltage is not detected on one (1) of the power adapters??
Comment: Conducted emissions would be my guess. One might be galvanically isolated whereas the othersare not. Not really my area of expertise, so just commenting.
Comment: And you may be able to get some of them to behave differently if you plug them in upside down into the wall socket and so switch the live and neutral.
Answer: They are not detecting the DC voltage of the power supply. They are detecting the AC that is present due to leakage current in the power supply.
Every power supply will have leakage, and when the power supply is not grounded, this leakage current has no low resistance return path, and will create a voltage.
This can be detected by non contact AC voltage detectors.
Switch mode power supplies have this by design (C1), or by parasitic effect of the transformer inside.

The leakage current is very low, below a few hundred uA or even less. You might have noticed a "buzz" feeling touching some appliance, that is the result of this leakge.
Large appliances can leak a higher current, and this might give a tingle.
Answer: They may be rated for 50V AC, with some degree of accuracy. But they can pick up lower voltages. And they aren't picking up 5V DC, they are picking up 5V AC! Because the way that these power adapters work is by using transformers, rectifiers and switching regulators, which cut in and out at a few thousand cycles. The 5V DC you see is really rapidly alternating current with a reference of 2.5V above 0, instead of your typical 60V to -60V 50Hz mains AC voltage.
It's like the illusion of persistence of vision. Flash a light fast enough and your eyes can't tell the difference between the light always on or flashing.
Secondly, there could be some AC coupling on the DC side, and that can often be picked up by both non-contact and contact voltage meters. Enough that my DMM with auto detection gets confused when I measure some DC power supplies.


distribution of $\{na\}$ when $a$ is irrational number

Question: (by $\{x\}$ I mean the fraction part of the real number $x$)
If $a$ is an irrational number and $n$ is a integral number, what is the distribution of $\{na\}$? I'm asking for some continuous function $f:[0,1]\to\mathbb R$ such $\int_{\alpha}^{\beta}f(x)\;dx$ gives the probability that $\{na\}$ falls between $\alpha$ and $\beta$.
When I calculated it for a bunch of irrational number, from $n=1$ to $10000$, I found that it's very close to uniform distribution. It's well known that {na} with a proper choose of $a$ could be arbitrary close to any real number in the $[0,1]$ interval. But this claim is more than that and wants the distribution to be uniform.
I think that a quite simple simple proof may exist: If $a$ was rational, say $p/q$, a uniform discrete distribution have been existed. I mean if $n$ goes to infinity the number would fall into $[i/q,(i+1)/q]$ interval with probability $1/q$. Now If we could approximate $a$ with a rational $p/q$, with "sufficiently small" error, the same would happen for a. That is, {na}s would also fall into the $[i/q,(i+1)/q]$ with probability $1/q$. if $q$ goes to infinity the distribution would become continuous.
And at last ... I think $a = p/q + c/(q^2)$ where $c$ is smaller than or equal to one, is a sufficiently good approximation. Good in the sense that such an approximation causes a uniform distribution.
Comment: http://en.wikipedia.org/wiki/Equidistribution_theorem
Comment: @kvphxga, there's one way to find out what's covered in that book....
Comment: Kuipers and Niederreiter's *Uniform Distribution of Sequences* is another good textbook source for this and related material.
Comment: many thanks ... are distributions like {ab^n} or similar distributions covered in the textbook?
Answer: The distribution is known to be uniform (a result due to Weyl, I believe). An excellent reference for this (and much else) is Dym and McKean's book on harmonic analysis.
Comment: Graham, Knuth, and Patashnik's *Concrete Mathematics* (p. 87, second edition) says that the result was discovered independently by Bohl, Sierpinski, and Weyl at about the same time in 1909.
Answer: For rational $a$ the answer (explicit bound for the error term) is given by Ostrowski's theorem (Ostrowski A. Bemerkungen zur Theorie der Diophantischen Approximationen,-Abh.
Math. Sem Hamburg, 1922, 1, s. 77-98). It depends on the sum of partial quotients in continued fraction expansion of number $a$. For real number it is sufficient to take good rational approsimation (one of convegents). See also Khintchine A. Ya. Ein Satz uЁber KettenbruЁche, mit arithmetischen Anwendungen. — Mathematische Zeitschrift, 18: 1 (1923), 289–306.
Answer: For what it's worth, in the language of measures one can reformulate your statement as
$$\mu_n:=\frac{1}{n}\sum_{k=1}^n\delta_{k\alpha}\rightharpoonup\mathcal{L}^1$$
on the circle $\mathbb R/\mathbb Z$ (in the weak-* topology, meaning $\int f\,d\mu_n\to\int f\,d\mathcal{L}^1$ for any continuous $f$). Any limit measure $\mu_\infty$ has total mass $1$ and is invariant under the translation $\tau_\alpha$ (as $\|(\tau_\alpha)_*\mu_n-\mu_n\|\to 0$), so
$$\int e^{-2\pi i nx}\,d\mu_n=:\widehat{\mu_\infty}(n)=\widehat{(\tau_\alpha)_*\mu_\infty}(n)=e^{2\pi i n\alpha}\widehat{\mu_\infty}(n)$$
and thus
$\widehat{\mu_\infty}(n)=0$ for $n\neq 0$, $\widehat{\mu_\infty}(0)=1$. By uniqueness, $\mu_\infty=\mathcal{L}^1$. By compactness of measures we are done.


Programmatically determine how many comments a blog post has

Question: What is the most efficient way to determine how many comments a particular blog post has? We want to store the data for a new web app. We have a list of permalink URl's as well as the RSS feeds.
Answer: If the blog is controlled by you, a "Select count(commentid) FROM comments WHERE postID = 2" will possibly the best thing. If you only have the URL but still it's your blog/db, you need to create a subquery "WHERE postID = (SELECT whatever FROM posts WHERE permalink = url)" or whatever your way to join the comments to the posts from a URL.
If it's a remote blog, you have the problem that each blog has different HTML. Essentially, you're going to need to build a parser that parses the HTML and looks for repeating elements like "div class=comment". But that will be mostly a manual labour for each different blogs.
Some blogs may have better ways like a comment count somewhere in the HTML or some interface, but i'm not aware of any standardized way.
EDIT: If you got a Comment-RSS feed, you may have luck using a mechanism that counts XML nodes, like XPath's Count.
Answer: If I understand correctly, you want a heuristic to estimate the number of comments in an HTML page which is known to be a blog post, yes?
Very often, a specific blog will have some features which make it easy to work out. If you look at mine over at http://kstruct.com/ you'll see that all the pages with comments say 'X Responses', so if you were able to do some work on a per blog basis, it's probably not really difficult.
If you needed something generic, I guess there are a few common features that comments have that you might be able to detect. For one, any links in them are quite likely to have rel="nofollow" attributes, so seeing that within a block might imply that it's a comment.
The main interesting thing to look for would be changes in the structure of posts for m the same site. For example, there's also a very good chance that each comment will have its own anchor so people can link directly to it, so you could look at the differing numbers of <a name="XXX"> tags in a given page on the same site to get an idea of the relative numbers of comments.
As Michael Stum pointed out, if the pages have a Comment-RSS feed, your life is made a lot easier because you can get the comment data in a structured format.
All in all, though, I think it's going to be quite a challenging problem to solve in general.
Answer: Blogs almost always have an RSS feed for comments. If you have that, then you can determine the exact number of comments, since the feeds 99% of the time follow a standard. Even if the blog is your own, if you are already generating an RSS feed, then don't bother making a call to your DB. You already did that to generate the feed, so it makes sense that you would just traverse the XML nodes. That way you don't have additional overhead (depending on how often you want to get this information).


Moving Away from NFS

Question: I've been working on moving more and more services away from a reliance on NFS, and I'm wondering what others have done with this issue.  I know there are distributed file systems out there, and I have some experience using one of them (mogilefs).  I'm curious to know what other people have used to move away from NFS, especially in regards to user-uploaded content.  In the web domain specifically, assuming a user uploads content to a specific web server -- what do you do to make that content available across your clusters?   I've considered rsync to the rest of the machines in the cluster, or simply to a single content server, but am curious as to what others have done to approach this problem.
Answer: Databases (traditional SQL or NoSQL like MongoDB) are a common solution to this problem.
Store the content that needs to be shared in the database, and retrieve it from your front-end web servers.
Another fairly common solution is a SAN with shared access.

While I'm no fan of NFS I will say that if it's working for you, designed and implemented well, and relatively trouble-free you can probably continue using it nearly indefinitely.  Moving away from it is great, but if there's no compelling reason other than "Ew, it's NFS!" don't kill yourself trying to get rid of it...
Comment: Agreed, I'm definitely not going to kill myself moving away from it, but for new services we are implementing we'd like to avoid it. Existing services that run great, likely won't be touched for a long time.  I hadn't considered using a DB to store binary data, but maybe a NoSQL db would be appropriate in this case.
Comment: The advantage of a "document database" like MongoDB here is that it avoids some of the overhead of SQL and can be pretty efficient at storing these sorts of things.  It's also initially cheaper (capital & probably time) than SAN-based solutions.  It's a toss-up for long-term cost as you scale up (many MongoDB machines for sharding versus SAN equipment and infrastructure).
Answer: If you are looking for Cluster Filesystems, there are plenty open/closed solutions available.
Just to name a few: GFS, Lustre, GlusterFS, OCFS2, Veritas Cluster FS.
The last one is a commercial enterprise FS, but out of experience the best one.
Edit: Forgot to mention that any of these should resist on a SAN device shared across all Cluster Nodes. It is also a requirement for Veritas CFS.
Comment: @dechris: GFS and OCFS2 are shared-disk filesystems. They need a SAN that all nodes can access. Lustre and GlustreFS are distributed filesystems. They do not need shared storage. I don't know about the Veritas product.
Answer: I keep the hell away from any sort of cluster filesystem, after spending a year trying (and failing) to keep GFS running in any sort of sane fashion.  It's ridiculously complicated, and doesn't perform worth a damn under load.  This assessment extends by association to every other cluster filesystem I've looked into -- the number of moving parts, lack of effective documentation, and general fragility of the whole Rube Goldberg contraption makes every part of me go "aieeeeeee!"
I've had great success, on the other hand, with using higher-level, application-specific abstractions -- thinking about what the application specifically needs to do with the data involved, and then providing a means of doing just that.  It's fairly uncommon that data in a web application actually needs a full POSIX filesystem abstraction to the data in the application; instead, it can get away with some more functional verbs.  That is the access layer between your web tier and data.
For instance, take images.  If you have them, you probably currently shove those onto your NFS server and the webservers pull them off and manipulate them as needed.  But what do you actually do to them?  They're each identified by a unique key, you store them (a PUT request), retrieve them (a GET request), delete them (a DELETE request), and maybe get them in different sizes (a GET request with a couple of parameters) -- hey presto, there's a REST API for that.  Don't like REST?  SOAP, XML-RPC, whatever floats your boat.  Hell, you don't even have to use HTTP (although it's a natural choice for web applications, because your GET requests can be sent directly to the fileservers).  Whatever means of resizing you might perform (and caching of those resizes) can be handled on the storage server, which saves on network bandwidth, localises the logic involved in dealing with them, and keeps the stored images close to the processing power that manipulates them (closer == faster == awesome).
Scaling these storage systems is usually easier than scaling a generalised fileserver, too.  They don't need scaling as quickly, because they're more efficient, but when they do, it's a simple matter of determining a sharding algorithm and implementing it in a few key places.  I like the simplicity of determining how many (for example) images a single server can support, and then use id / capacity to get the number of the server to use for any given image request.
This isn't the first time I've written this answer; see this question for a slightly different take on this issue.
Comment: I really like this idea, different, and simple.  Thanks!

Moving Away from NFS


In need of best font colour

Question: Can someone help with the font colours for my poster which has an image with combination of white colour and shadow and different shades of black
Comment: Show us the poster.
Answer: To choose the best color, you need to think about some aspects:

what you want to express (joy, sadness);
it is the message more important than the image, it is the central element?
with black and white, any color can be used, but is important too if the predominant color is the first or the second one.

Your poster's color palette may be defined by using a custom palette suited to your brand or an event.
If the text is the most important, the color palette should include sufficient contrast between different elements.

In need of best font colour


Derivation of curl of magnetic field in Griffiths

Question: Can someone please derive how $$\frac{d}{dx} f(x-x') = -\frac{d}{dx'} f(x-x')~?$$
In Griffiths electrodynamics, this is directly mentioned. I'm really confused, can someone elaborate!
Comment: Yes definitely, but it's a pretty standard and common book so I don't think it's too much out of context in the question.
Comment: Would it make sense to mention in this question the fact that "Griffiths" is a particular textbook?
Comment: https://en.wikipedia.org/wiki/Chain_rule
Comment: @Ruchi u haven't accepted any answer in all your questions you can do so by selecting the tick on the left of an answer to accept it
Comment: Oh! Thanks for letting me know! @anusha
Answer: This follows directly from the chain rule:
$$\frac{\partial}{\partial x}[f(x-x')] = f'(x-x')\frac{\partial}{\partial x}[x-x'] = f'(x-x')$$
whereas $$\frac{\partial}{\partial x'}[f(x-x')] = f'(x-x')\frac{\partial}{\partial x'}[x-x'] = -f'(x-x').$$ (Here I take $f'(x-x')$ to mean that (total) derivative of $f$ with respect to its single independent variable.)
Thus, we see that the two expressions are simply the negations of each other. More complex versions of this can similarly be derived for other vector calculus operators, such as $$\nabla_x f(x-x') = -\nabla_{x'} f(x-x'),$$ where $\nabla_x$ denotes the gradient with respect to $x$. I think this is also explained in Griffiths somewhere, but hopefully this explanation suffices.
Hope this helps.
Comment: Think of f as a function f(t), where here t happens to equal x - x'. Then in both cases f' is taken to mean df/dt evaluated at t = x-x'. Again, this is basically the chain rule, so I'd recommend reviewing that.
Comment: I have a very silly doubt, but in the first case f', the total derivative of f is wrt x(it's single independent variable) and in the second case f', the total derivative of f is wrt x' .... Then, how is df/dx= df/dx' ??!
Answer: I think that this can come from this argument:
You can prove that $$\frac{\vec{x}-\vec{x}'}{|\vec{x}-\vec{x}'|^3}=-\nabla\left(\frac{1}{|\vec{x}-\vec{x}'|}\right)$$
If you take this change $$\vec{x}\rightarrow\vec{x}'$$ and $$\vec{x}'\rightarrow\vec{x}$$ the previous equality become $$\frac{\vec{x}'-\vec{x}}{|\vec{x}'-\vec{x}|^3}=-\nabla'\left(\frac{1}{|\vec{x}'-\vec{x}|}\right)$$
From the two equations you can get that $$\nabla\left(\frac{1}{|\vec{x}-\vec{x}'|}\right)=-\frac{\vec{x}-\vec{x}'}{|\vec{x}-\vec{x}'|^3}=\frac{\vec{x}'-\vec{x}}{|\vec{x}'-\vec{x}|^3}=-\nabla'\left(\frac{1}{|\vec{x}'-\vec{x}|}\right)$$
I hope it is useful, by the way, i check the book Classical electrodinamycs second edition of Jackson in the page 33. Bye!
Comment: This is needlessly complicated, it's simply the chain rule
Comment: @NiharKarve note though that this derivation is valid for a function of vectors. The chain rule is more complicated for vectors (NB I know that you can hide that behind notation), and while the question is posed in terms of a scalar argument, the problem is about functions of vectors, so this answer actually addresses the real problem without assuming that the reader knows the chain rule of vector analysis or how it relates to the scalar version.


Enumerating Connections to WiFi

Question: I am hosting WiFi from my ethernet-connected Windows machine. Is there any way for me to check how many devices are connected?
Answer: There are a number of free utilities to enumerate connected WiFi devices, such as Nirsoft's Wireless Network Watcher and alternatives. You can also use the router's web interface to view connections, or the (paid) professional version of Glasswire, which also displays network traffic.
The image below shows the interface for Wireless Network Watcher. Note that MAC Address, Device Name and User Text can be falsified, but if you know the parties using your WiFi, you can verify this information when each connects.
As with any software, check before using it that is does not contain malware with pestudio or VirusTotal.
Comment: As a highly valued member of Super User, please review [How to recommend software](https://meta.superuser.com/a/5330/213131) for **minimum required information** and suggestions on how to recommend software on Super User.  In particular, a brief overview of the specific features in the software that the OP is interested in would be a great addition to your answer.

Enumerating Connections to WiFi


Can I request email only communications?

Question: I am on my way out of an employee contract. Done in two months. My employer has gotten increasingly more hostile and will guilt trip me over phone like "Do you know how much time I have given you off this year?" All PTO I used was earned. Can I request for him to only communicate via email for the remainder of my time there? I want everything in writing from here on out.
Comment: You can request anything you like.  Whether your employer will honor that request is doubtful.  Just be professional and keep your mouth shut.  You're done in 2 months!
Comment: Talk to your manager and HR about these things.
Comment: In which jurisdiction are you in?
Answer: Can you request it?  Sure.  Is it likely that your boss is going to comply with that request?  No.
If your goal is to ensure that your boss doesn't put pressure on you to stay, you're probably out of luck.  You can ensure that everything is in writing by sending a follow up email every time you have a phone call that summarizes what was discussed.  It isn't obvious to me that there is a benefit to you in having a paper trail of these conversations, however.  Unless you think that your boss is actually harassing you or violating some other company policy and you're willing to go to HR to try to have him stop, it isn't obvious what written communication is going to accomplish.
Comment: In addition to this excellent advice, I would recommend that the OP reads this book https://www.amazon.com/When-Say-No-Feel-Guilty/dp/0553263900
Answer: I would setup my Cell Phone with a generic message "I'm unable to answer the phone right now, please send me an Email" and I would update my voicemail with something similar.
Whenever my Boss would ring, I'd ignore either use the quick answer feature (to send them a txt) or let it go to Voicemail.
Then, I'd follow up by email:
"Hi Boss,
Sorry I missed your call, what is the issue?"
Basically, don't answer the phone, ensure everything is done in writing.
Comment: That seems pretty unprofessional.  It is entirely reasonable for the OP's boss to want to speak to them, and entirely unreasonable for the OP to refuse.  2 months probably isn't long enough for this to escalate to dismissal but they'd be well and truly burning their bridges with this employer.  Justin Cave's answer of documenting and calls would create a paper trail demonstrating any bad behaviour from the boss while retaining good relations with the rest of the company.


how to i add/remove photos in the ios 10 movie feature

Question: not sure how iOS 10 chooses the images for its People movies, but i'd like to add/subtract some.  anyone know how to do this?
Answer: How to edit your title, music, duration, and photos in a Memories slideshow
Launch the Photos app from your home screen.

Tap Memories in the menu bar at the bottom of the screen. It looks
like a triangle with an arrow circling it.
Tap the memory you would like to see.
Launch the photos app from your home screen, tap Memories and the
select the memory you would like to see.

Tap the play button on the large photo at the top of the screen.
Tap the screen anywhere.
Tap the pause button that appears at the bottom of the screen.

Tap the editing menu in the lower right corner.
Tap on title, music, duration, or photos & videos to adjust your
settings.
Tap Done when you are happy with your settings.


Xubuntu 14.04.1 LTS - Thumb drive not auto-mounting

Question: Xubuntu 14.04.1 will not auto-mount my USB thumbdrive automatically when it is already connected to the computer.  This happens every time during the initial bootup/startup and/or after a restart of the computer.  Xubuntu will detect the presence of the thumbdrive but will not "auto-mount".  I have to manually mount the drive.  On the other hand, with no thumbdrive connected (inserted) to the computer and then, perform a startup or restart and then, connect the thumbdrive manually to the computer, Xubuntu 14.04.1 will detect and automatically mount the drive.  Is this an "unresolved" issue with Xubuntu?  Is there any fix for this?
Answer: I saw a suggestion elsewhere about using KDE partition manager to recreate the existing filesystem on a usb stick, tried that on mine as I was not able to automount. It erases the drive but now it works! I also had to go into system settings and check the boxes for automount, but that was only accessible after the filesystem recreate.
Comment: @Ralph: I had to read your answer 3 times to understand that it really *was* an attempt to actually answer the question.  **:-(** Anyway, the OP is asking about auto-mounting during boot, so could you expand your answer and test out whether your solution actually mounts a thumb drive during boot?
Comment: How is it related to the question?
Comment: well, I guess my answer is perhaps not directly addressing automount at boot, just automount in general. I don't know for sure if it would help, but it might since it solved my automount issues. I wanted to suggest it as something to try that may solve the problem.


Linux Mint 15 : how to share wifi connection with other devices connected to Ethernet port?

Question: My laptop connects to our apartment network via Wifi.  I'd like to share this connection using the laptop's Ethernet port, i.e. be able to plug another system into Ethernet and have it also use the Wifi.  How do I do this?
Answer: Your wifi interface works logically like a normal network card.
You can configure your machine as bridge. I followed linuxfoundation's tutorial to bridge in networking.
If you are now connected to 2 networks and only one of these two networks allows connection to Internet, maybe you want to provide web connection to all the machines in your private area by using your machine. It's called web-proxy and squid is the server package you need to do the work. Squid's wiki provides configuration examples for different situations.
Comment: Please before you do anything review your company security policy. Some network manipulation may be considered as a hacking tentative in some cases. Just for advice !
Comment: Thanks for the response.  I tried setting up a bridge, but when I tried to add wlan0 to the bridge I get the error "can't add wlan0 to bridge br0: Operation not supported".
Answer: Apparently this is difficult.
From http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge it seems the problem lies in your wireless card's driver as it states "Many wireless cards don't allow spoofing of the source address".
This is probably (?) a security issue.
This website also mentions "If you urgently need to have a wireless LAN card which is able to bridge, you should use one of those having the prism chipset onboard (manufactured by Harris Intersil)." I don't know how current this information is, so there might be other cards with this functionality.
I think you could try this: https://wiki.debian.org/BridgeNetworkConnections#Bridging_with_a_wireless_NIC
I didn't get all the steps, so I am not sure it overcomes the driver spoofing limitation.
An easier alternative is to use packet forwarding (ipchains and masquerading) to forward tcp/udp packets (which is what I think is what you want to do anyway, you are not trying to set up a cluster with a custom network architecture, right?). This is "easier". An example is http://www.tldp.org/LDP/nag2/x-087-2-masq.configuration.html. Perhaps you can google and find something more current or easier to understand.
One of the problems that I found with using packet forwarding is that it tends to break if you add a phone with an usb cable and set it to tether or change any parameter on the wifi. Also so to get it to work you will need to think about your network structure a little bit.
This also runs on a higher level of osi layer, so it is also slightly slower.
Anyway, good luck.


Invoking smart contracts

Question: how can i restrict my smart contract getting invoked by any account in the network.can i tell the EVM itself to check(validate the account) is allowed to invoke the smart contract even before entering the smart contract for execution
Comment: Could you elaborate more on what you want to achieve?
Answer: As the contract developer, you can choose to program your contract functions to only be accessible by certain accounts. However, this can only be done as a part of the smart contract execution, not beforehand. It would not be possible today to add such a restriction before any of the contract logic is run.
This is commonly seen in smart contracts with the OnlyOwner modifier which gets used on functions which should only be called by the "owner" of the contract.
You can see the OnlyOwner modifer being defined here: OpenZeppelin - Ownable.sol
Ultimately, the code is quite simple, it adds the following requirement:
require(msg.sender == _owner);

This line will fail if the calling address does not match the _owner value that has been previously defined.
You could add code similar to this in front of any of your functions to make those function calls fail if unauthorized users try to access it. You can imagine turning the _owner variable into an array or mapping of addresses who are authorized to call the functions, and then you would update your modifier to check whether the msg.sender is authorized based on that list.

Invoking smart contracts


what are the implications of using a 45kW ACS580 ABB VSD on a 22kw induction motor?

Question: What are the implications of using a 45kW ACS580 ABB VSD on a 22kW induction motor?
Comment: On top of what Neil said, I'm thinking there may be a protection setting on the very low end of the speed spectrum which may also need adjusting. Your manual will tell. I would be very suprised if anything breaks.
Comment: Will I be wrong if I set all parameters as per motor name plate?
Comment: No, that should fix everything for you.
Answer: It means the ACS580 will run nice and cool. The motor will only take the power it wants.
If it has programmable current limits, you may want to halve the default settings, to help protect the motor if it became overloaded, though the primary protection for this would be a thermal trip on the motor itself.
Comment: Thanks Neil..I will set all the motor parameters as per name plate.
Answer: You're spending more money than you need to. If you have one "Lying around" no problem, but if we double rate every component and have to buy the equipment your wasting money.For example, If your motor only needs to do 10kw of work why would you use a 22kw motor? inefficient, also if you have a constant load on the motor just use the VFD for starting i.e. switch the motor DOL once it's running instead of running the VFD constantly, also inefficient.
Comment: Only if you have to buy either the ACS580 or a lower power unit.  If you have the ACS580 lying around, using *it* will be the most economical option.
Answer: The nominal VFD kW rating is the maximum motor kW rating. The VFD kW rating may need to be higher than the motor kW rating in various situations.

The VFD output current rating must also be equal or greater than the motor full-load current rating. Some motors, such as those with more than 4 poles, may have a higher than typical current rating.
The nominal kW rating is the rating for light duty use. For heavy duty, refer to the table in the manual.
The drive may need to be derated for altitude or ambient temperature higher than the nominal limits. Refer to the derating instructions in the manual.
If the drive is to be mounted in an IP55 enclosure, derating is required. Refer to the derating factors in the manual.
If the switching frequency must be set above 4 kHz, the drive will need to be derated.
Theoretically, mean time before failure (MTBF) for any electronic device is inversely proportional to component operating temperature. It may be desirable to increase the drive kW rating to reduce the component operating temperature and increases MTBF.

The VFD is designed to assure the proper performance and provide protection for a range motors of various power, current, frequency, and voltage ratings and number of poles. The drive start-up procedure requires the motor rating plate data to be entered into the drive to make that possible.
Answer: I don't know specifically about the ABB drive but in some VFDs that use Vector Control, the settings for motor current values will not go below 50% of the rated current of the drive. This is because the current sensing devices inside of the drive have a tolerance for their accuracy and when the motor is too small PLUS lightly loaded, the Vector Control algorithm my not be able to accurately track the extremely low values of current it is seeing, which affects performance and low speed torque accuracy, which is likely why you wanted Vector Control in the first place.
If you are using a VFD in simple open loop V/Hz (Scalar) control mode, it makes no difference at all. In fact in that mode the VFD may not even know if the motor is connected or not.
Answer: The answer here is that the input power wiring to the VFD must be sized for the drive's nameplate input current, even though there will never be a demand for this much current.
See ABB NOTES: Sizing VFDs for HVAC Applications, Based on the National Electrical Code


How to convert cook time and temp from 9" round cake pans to standard cupcakes?

Question: I am making carrot cake "cupcakes" from a recipe meant for round 9" cake pans (3 layers, if that matters).  The cake pans are supposed to cook 25-30 min at 350.  How should I cook the cupcakes?  Thanks!
Answer: Since I don't know exactly your receipe, the receipe I convert time to time makes 22 cupcakes.  You line muffin pans with with paper liners, scoop the batter about 3/4 full in the cupcake cups, and if your receipe does not have crushed pineapple in the batter, I really suggest you add about 1/2 can of crushed pineapples, without the juice, into the batter when you are mixing the batter. This makes  the cupcakes super moist as well as the cake. Don't mix the batter too much.  Preheat oven to 400 degrees  and bake 10 minutes and then reduce oven to 350 degrees and cook 30 to 35 more minutes.  At the 25-30 minute point check one cupcake with a toothpick to see is comes out dry and if dry they are are ready, or if just a touch wet you need a few more minutes.  Remember that they still cook in the cupcake pan AND I ALWAYS USE THE BIG MUFFIN PAN.  If you choose to use the regular sized cupcake pans I feel you should check at 15-20 minutes with the toothpick test. If the cupcake is wet then cook 5-10 minutes more.  Remember, IF YOU LEAVE IN THE CUPCAKE PAN AFTER TAKING OUT OF THE OVEN, THEY ARE STILL COOKING, SO IF READY TAKE OUT FAST.  Also another tip I learned years ago, if you have empty cupcake holes, fill with a little water, I don't remember why, but in some way it helps your cupcakes.  Enjoy!


According to Pentecostal doctrine why is a Catholic Christening not a valid Baptism?

Question: I've got a Pentecostal friend who says that my Christening (Catholic doctrine) does not count as it is not a true Baptism to receive the Holy Spirit. Why don't Pentecostals accept Catholic Christening?
Comment: You may be aware that the RCC does not view many Pentacostal baptisms as valid.  Can you please explain why you think this is anything beyond a *quid pro quo.*
Comment: Second question, can you clear up whether or not you were baptized in the Roman Catholic Church, or not?  Depending upon which Pentacostal church you are dealing with, some have baptism via the trinity, and some only in the name of Jesus.
Comment: The answer is probably that most pentecostals are credobaptists. There would I'm sure be some paedobaptist pentecostals, who might accept Catholic baptisms.
Comment: I am aware that probably RCC does not accept any baptisms exepts the ones provided by themselves. Does knowledge of wheater I've been baptized within the RCC change your answer?
Answer: There are two common Pentecostal doctrines that are at play here:
1. Pentecostal beliefs on Water Baptism
Firstly the general belief with regard to (water) Baptism is that it is for believers only; this is called credobaptism (or just believer's baptism) and is a belief that almost all Pentecostals hold in common with Baptists. It means that any form of infant baptism (not just Catholic christening) would be regarded as an invalid "baptism". They may also emphasize the form of the baptism as well, with full immersion being required for a valid baptism.
2. Pentecostal belief on Baptism in the Holy Spirit
The defining belief of Pentecostals (ie their distinguishing belief from other evangelicals etc; their raison d'etre) is their teaching that the baptism of the Holy Spirit is an important experience in the life of a believer that is subsequent to their regenerative salvation (new birth) and is also distinct from water baptism (although it is possible for them to occur simultaneously); this is also known as the doctrine of subsequence. According to this doctrine, the baptism of the Holy Spirit is received by faith for the purpose of empowerment to witness for Christ (who has already been received as Lord and Saviour) and may occur before (eg household of Cornelius) or after water baptism (eg early Ephesian believers). Pentecostals most commonly believe that the sign of having received the baptism of the Holy Spirit is
"speaking in tongues" (a human or heavenly language that has not been learned naturally).

The above applies for the majority of Pentecostal denominations, but a notable exception are Oneness Pentecostals who have some quite disctinct beliefs:

The majority of Pentecostals do not view baptism as essential for salvation, and likewise, most Pentecostals are Trinitarian and use the traditional Trinitarian baptismal formula. However, Oneness Pentecostals view baptism as an essential and necessary part of the salvation experience and, as non-Trinitarians, reject the use of the traditional baptismal formula. - wikipedia/Pentecostalism


Redirect outgoing traffic on port 80 to local httpd with iptables/ebtables

Question: What I want
I have to implement a very specific setup with squid, dansguardian and nginx. I'm being very specific here on purpose since similar questions often ask for more information to give accurate answers. Also, I don't usually do network stuff and my current solution is the result of picking up puzzle pieces from other Stack Exchange questions and answers, so please excuse/correct any mistakes/misunderstandings I made so far.
Essentially, I want to block any attempts to access the internet through ports 80 and 443, unless said ports are accessed via the proxy on port 3128. The reason for this is so that the proxy and Dansguardian can filter/block undesired webpages. We decided to go with a non-transparent proxy so we can employ the non-invase SSL blocking. This part is already working.
However, if the client tries to access the web directly, instead of dropping the attempt, the Magic Box should redirect the client to a step-by-step guide on how to set up the proxy.
We do have wpad set up to eliminate the need to configure the client's devices manually. However OSX and Linux, and more importantly iOS and Android do not have wpad support enabled by default (or don't support it outright). Our first idea was to leave the client instructions on how to set up their devices on paper. However, my boss wants me to set the redirect variant since it would be better for the client to instantly see why the internet doesn't work right away.
Here's a visual aid to the desired setup. Not pictured is the fact that enp1s0 and enp2s0 are part of the bridge br0.

The network diagram shows all the relevant physical devices. Marked red are the devices we cannot touch or configure. Marked green are our devices.
The diagram "Inside the Magic Box" shows the desired routing decisions
The current situation
Our original ebtables/iptables rules, where we would leave step-by-step config guides on paper, looked like this
ebtables -A FORWARD -p ipv4 -i lo -o enp1s0 --ip-proto tcp --ip-destination-port 80 -j ACCEPT
ebtables -A FORWARD -p ipv4 -o enp1s0 --ip-proto tcp --ip-destination-port 80 -j DROP
ebtables -A FORWARD -p ipv4 -i lo -o enp1s0 --ip-proto tcp --ip-destination-port 443 -j ACCEPT
ebtables -A FORWARD -p ipv4 -o enp1s0 --ip-proto tcp --ip-destination-port 443 -j DROP

In order to allow redirecting the client to a step-by-step guide in-browser when the internet is accessed without proxy, we changed the rules to the following
ebtables -t broute -A BROUTING -i lo -j ACCEPT
ebtables -t broute -A BROUTING -p IPv4 --ip-proto tcp --ip-destination-port 80 --ip-destination ! 192.168.2.75 -j redirect --redirect-target DROP
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 192.168.2.75:80

With these rules, whenever I try to access the internet directly with a browser, I see these packets showing up in iptable's PREROUTING chain. Meanwhile, the nginx httpd is still accessible and internet through proxy is also working.
The part that is not working is the redirect to the nginx httpd. The Browser just tells me that the server can't be reached and the nginx access log also doesn't show any activity.
I have tried the following things as well but none have solved the problem
* Setting up SNAT and MASQUERADE rules in the POSTROUTING chain
* Setting net.ipv4.ip_forward to 1
* Setting net.ipv4.conf.all.route_localnet to 1
At this point I am beginning to think that I made a mistake so minute that my ignorance on the finer details of ebtables/iptables doesn't allow me to see it, or that what I want to do is simply not possible with iptables/ebtables.
Answer: All you have to do is to point all the traffic on port 80 to specific IP address and port. Right? If so :
iptables -A PREROUTING -s 192.168.2.0/24 ! -d 192.168.2.0/24 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.2.75:3128

Where --to-destination is the ip of your squid server.
Comment: I have tried the following command `iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 192.168.2.75:80`, which does not work and should be broader. Also, I am trying to redirect traffic to the nginx httpd on port 80, not to the squid server. This is done to show on-screen instructions on how to config the proxy since the squid-server is being run as a non-transparent proxy.


How to check the command server status of a remote Queue manager in MQ.Need shell scripting for this

Question: This is for IBM MQ.I am having 2 servers with Different IP address. A,B are the Queue managers present on server 1. c,d are the queue managers present on server2. I need to check the command server status of Queue mangers c,d from server 1.I need the shell scripting for this. Please help me. If you know any commands also please let me know.
Comment: Hey Challa - Please include a list of things that you've already tried, so that we can better help you.
Answer: If you can run a command on the same server as the queue manager resides, then you can use the command dspmqcsv to show the status of the IBM MQ Command Server.
However, if you are only able to run a command on a remote machine, then you could connect with an MQ client to the queue manager and put a PCF command message on the command server queue and see if you get an answer. If you get an answer then the command server is running, if you don't, it isn't.


How should I disclose site/game affiliation?

Question: I answered a question about a game published by the company for which I work. I've indicated my affiliation in my profile. Is that sufficient, or should I indicate it in the answer as well?
Comment: @NickT The "spamming" policy requires people to disclose affiliation when promoting your own products.
Comment: @NickT As badp said, my concern is about violating site policy. I'm here to provide quality answers, ask good questions, and occasionally moderate. IMO, My content should be voted on based on its quality, not because I work for a specific company. :)
Comment: Are you worrying about some conflict of interest or just trying to taut yourself as a definitive expert?
Comment: Nice to see on the site a high rep user that work in video games industry.
Answer: This comes up often on Stack Overflow due to things like Facebook, Microsoft, and Google employees answering questions about their respective platforms, and as long as you're not promoting your game but merely answering a question already about it, you're actually discouraged from signing your posts with your affiliation:

In general I would consider this a signature block, which is not necessary. I agree that removing the signature block is the correct thing to do here, since it's ultimately more words on the page that don't necessarily answer the question. Here at Stack Exchange we have an irrational love of signal-to-noise ratio. :)
The key point is that you're not promoting any specific technology, you are merely answering existing questions that are already about that technology.
Obviously mention your affiliation with [your company] in your user profile, of course, since that's relevant and interesting to anyone who wanted to know what your background is.

But if you do happen to promote your game in your answer, you must disclose your affiliation in your answer. To me, promoting your company's product instead of merely answering a question about it would be something like this:

Question: How can I change my character's name in TERA?
Answer: You can change your character's name by using the TERA Name Change Service™, which  only costs $12.95. If you do it this week, there's a special where they'll rename your character and your friend's for the same low price.
Answer: At the end of the day, it's not who you are or who you work for, but the quality of answer that gets you the accepted answer.
As long as you're successfully answering the question, I don't think it matters who you are, especially if your answer stands well without that knowledge.
In questions, it's a little bit of a different boat, since you would presumably know better than most of Gaming's experts, and might be seen as advertising - but as for answers?
We like it when folks intimately familiar with the software post answers. But, if you don't feel the need to state your association, and there's no benefit to doing so in terms of appearing authoritatively knowledgeable about the subject, don't worry about it. You're never going to punished for posting quality content.


How to change Swap partition to add more

Question: I play a lot of Minecraft/Tekkit. I have quite a bit of lag issues and my brother told me to add more VM RAM. He said it's called Swap Partitioning on Linux. I am looking for a simple solution, I can't access my su(it's not accepting my password). I am running Ubuntu 13.04. I have 2gb RAM and 250 hard drive space. Please help. My laptop is a Presario Compact from the stone age, does that change anything?
Comment: "I can't access my su(it's not accepting my password)" You are never going to get this to work without your sudo password.
Answer:
in Ubuntu, you use sudo to temporarily gain root privileges. you generally don't use su, although you can do sudo su or sudo -i
you need root privileges to change the partition layout on your disks, and swap is usually handled as a partition in Ubuntu.
i recommend to use gparted to change your partitions. install it via software centre if it is not installed.
add another swap partition in gparted on unused disk space. if you do not have any unused disk space left, you have two options:

resize existing partitions (MAKE A BACKUP FIRST, and possibly you need to do the resize from a live-cd boot)
consider using a swap file instead of a swap partition: see http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/

generally a good read: https://help.ubuntu.com/community/SwapFaq
Comment: I loaded gparted and it says I have 49.49MiB available on /boot. Is that space usable to create a swap?
Comment: 50 MB is not enough. we are talking about gigabytes that are (probably) needed here. also, leave the partition for /boot alone as it contains low level stuff and configuration, including your bootloader and kernels. tell us more about the other partitions or use the swap-file approach mentioned above, as it is less error-prone/causes less serious problems if something goes wrong.
Comment: Well I read both web pages above before I posted here. One of the two sites says that I should see the swap partition on gparted. I do not see a swap partition there, but If I go to System Monitor it shows that I have 83.5 MiB(4.1%) of 2GiB. So I'm not sure what the problem is.


Is it possible to use custom resolution for Macbook Pro with Intel HD 4000?

Question: I have a 13" Macbook Pro with Intel HD 4000 chipset and I am wondering, if it is possible to set it use higher resolution then 1280 x 800?
Answer: No it is not possible. The screen is what is limiting the resolution.
That does mean that you can set up and use an external monitor with higher resolution as you can read on: http://www.apple.com/macbook-pro/specs/
Comment: The card itself can handle up to 2560 * 1440. But the max display resolution is once again limited by something else: the outgoing port. Generally you would not be able to go higher then 1920 * 1080 with any other solution then using a DisplayPort-cable to hook up to your monitor.
Comment: thanks for the quick reply. Do you happen to know what is the maximum supported resolution by the Intel HD 4000? In other words what is the largest resolution I can get with an external display. I tried to check the hardware specs on the link you gave me but there is nothing there...
Answer: yes it is possible i am sporting 1440 x 900 res using switchresx
Comment: Great tip, thanks! Is it stable for you?


Protocol fuzzing of a java application

Question: I need to fuzz a communication between a client-server application written in Java. Already set up a MITM (burp), so I am able to see every request. The request body is a soap-xml document where some keys are exchanged.
I would like to fuzz the request header and the request body also, where the keys are placed. What would be the best choice? Is there any fuzzer which is suited more to request header or to the xml body fuzzing? Is there any preferred libary/fuzzer for fuzzing Java?
Answer: I would look at using the Intruder in Burp Suite.
Capture an initial request using the proxy, send it to the intruder then you can mark your fuzzing candidates including headers

Configure your list of payloads that would like to fuzz with and launch the attack

as you can see, we have replaced the headers and can see the responses
Comment: Well, yes I know this option. I am more interested in a scenario, where you know the product and the communication, so you are able to reproduce the protocol also. Therefore, it is possible to send crafted(fuzzed) requests to the server.

Protocol fuzzing of a java application


Sudo as another user and run command

Question: I am doing an online course and the current exercise sees me learning more about sudo. I had to log in as another user and run a command to acccess a password.
In my sudo exercise I have finally got myself logged in as the pseudo user with the discovered password from the first part of the question. Now I have to access a token in the file /root/token.txt. Whilst logged in as the user pseudo I can see from sudo -l the following:
user pseudo may run the following commands on sudo
            (ALL) NOPASSWD:  ALL

if I cd to the / directory and run ls -la I get
drwx------   2  root root 4096 Jun 18 1521 root

From the above I deduce only the owner has rwx permissions and that the owner is root. What I am struggling with is how do I access the token file when it would appear to me that I need root access, HELP please?
Comment: Do you know how to use `sudo` to execute commands that normally can be used by `root` only?
Comment: Hi Jos, yes I am familiar with sudo to execute commands normally only permissible by root. What i was confused by was how the command should be to open the file directly.
Answer: Since user pseudo may run ALL commands, you should be able to access the file regardless of the directory's owner given that you are already logged in as pseudo e.g.
sudo cat /root/token.txt

Answer: Consider sudo as a bash command with options: -u for user, -g for group, where the "default" group is 0, and uid=root.
You can now make a special group, "root" - as here. I prefer to call it "admin" or "Administrators" and both "uid" and "gid" must match.

Sudo as another user and run command


How do I remove a menu from a theme?

Question: I have a very simple question, how do I remove a menu from a WordPress site? Is there a plugin out there that can handle this or do I have to go into my theme's code and remove something from there?
Answer: In your admin panel, go to Appearance > Menus > Manage Locations
There you make sure that none of the theme locations have a menu assigned.
Alternatively, you can modify your theme.
If you want to do that, search for calls to wp_nav_menu.
If you take theme twentyfourteen, you have 2 files: header.php and sidebar.php
in header.php the portion to update looks like

<?php _e( 'Menu', 'twentythirteen' ); ?>

            <a class="screen-reader-text skip-link" href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentythirteen' ); ?>"><?php _e( 'Skip to content', 'twentythirteen' ); ?>
            <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
            <?php get_search_form(); ?>

Note: if you want to modify a theme, create a child theme as your modifications would be overwritten when you update the theme.
Comment: Thanks you for response, I looking to remove the actual menu as it is and not the content in it
Comment: I believe what FranceImage tried to say is that you need to go here: http://www.yourdomain.com/wp-admin/nav-menus.php?action=locations.
Comment: I updated the answer in case you want to update the html markup to remove the navbar altogether

How do I remove a menu from a theme?


Finding free building height dataset for major cities around world?

Question: I am searching for building/property data which include building height, building area, lot size, and building type classifications(preferably as complete as possible). I am working on an Earthquake Model for highly urbanized locations, especially those around fault lines.
Comment: If asked today, or if in need of any follow up, I think the [opendata.se] Stack Exchange would be the place to ask this.
Answer: The only thing that even comes close AFAIK is the national cadastre.
NCD
This organization might have part of it. You will likely have to assemble it yourself.
National Cadastre dot org
Comment: Your link only covers the data model.  Do you have a link to data?
Answer: Maybe a possible approach few cities have 3d models for many of their buildings in google earth. Perhaps you can check whether these can be downloaded and used in another tool?
http://www.google.com/sketchup/3dwh/index.html
CityGML is an approach to provide such a data in a more standardized way, but I don't think they have much data available.
http://www.citygmlwiki.org/index.php/Main_Page
Answer: Here is one approach to try and find building heights.
<code>https://www.developmentseed.org/blog/2014/08/07/processing-lidar-point-cloud/
</code>

The idea is to download the open street map building footprints dataset.
Got mine from here: http://download.geofabrik.de/
Download lidar data from here: http://earthexplorer.usgs.gov/
Do a spatial join with the lidar points on the building boundaries
Find the max height of the points for each building.
Answer: There was a previous question (Finding footprint data for US buildings?) just regarding building data. In the USA, Massachusetts has both building data and lot outlines (I'm not sure about building type classifications).
I would also explore OpenStreetMap as perhaps this data exists for some countries.
Comment: Yes, in OpenStreetMap (some) buildings are tagged as such. See also this new Wiki page: http://grass.osgeo.org/wiki/Extrude_2D_polygons_to_3D ("Creating a 3D city model" from OpenStreetMap).


Help with paleography in a 16th century grant

Question: I'm transcribing/translating a 16th century document relating to my ancestors, but struggling with a few words. One in particular is proving difficult - the contracted last word on the 1st line of the supplied text. I can see sh and 3 minims, possible 'a' indicated on the 's'. Not sure what the word could be expanded to - possibly an occupation and possibly in the plural as there is a Thomas Norgate (not shown) as well as John.  Any ideas would be much appreciated.
Comment: (Not posting this as an answer because of too low confidence level) My first impression was something like ... *de waxtoneshire* ... and googling for "Waxton shire" does yield some results which might (not) be relevant for the manuscript's time frame...
Comment: Have you come across Du CANGE, Charles du Fresne, 1610-1806? His Glossarium mediae et infimae latinitatis (in 10 vols) is on line through ARCHIVE. I checked vol six for occupations beginning SH < https://archive.org/details/glossariummediae06duca/page/n247  where Shawaldres (Gall *chevaliers*) ( a yeomen farmer, I believe provides own weapons, and horse) caught my eye. Abbreviated here to Shw. Would that fit? Sing. or plural. Not quite an occupation. The page refers you to SCH also::: https://archive.org/details/glossariummediae06duca/page/n117
Comment: Haven't seen this material before, thanks for the reference.  Shawaldres seems unlikely... but you never know.  I think shopa might be taking things in the right direction.  What do you think the latin term for a shopkeeper/grocer would be?
Answer: Thanks for your interesting question.
I think the key is the sequence  ..ptonesh..  which suggests Northamptonshire to me.

et Joh.is Norgate de Naptoneshir

If that doesn't seem likely, Du CANGE, Charles du Fresne, 1610-1806   Glossarium mediae et infimae latinitatis (in 10 vols) is on line through ARCHIVE. I checked vol six p.247 for occupations beginning SH and found

Shawaldres ( Gallic chevaliers)

The text could be an abbreviation 'Shw' Would that fit? Sing. or plural. Not quite an occupation. The page refers you to SCH also::: archive.org/details/glossariummediae06duca/page/n117 which offers other possible occupations.
Comment: Hugh, thanks for your answer. However, I think the first line reads 'et Joh[ann]is Norgate de waxtone' before the word I am trying to decipher. Any further suggestions would be gratefully received.


What would happen if a character died of an allergy?

Question: Ok, I know this sounds really weird. I just don't know where to ask. Anyway, one of my characters sneaks into the woods and gets bitten by an insect (it's a long story). She has a severe allergic reaction and dies before her family finds her the next morning. What exactly would happen after? Like would her parents have to fill out a lot of paperwork? Would there be a whole police investigation? I have no idea how this works, so anything helps. Thanks in advance!
Comment: The answer (which you will need to research yourself) will be dependent not only on jurisdiction – Yorkshire? Kuwait? Alabama? Papua New Guinea? Norway? A fantasy place like Lake-town in Middle Earth? – and time – now, or 1920, or 2050, or 1200 CE? – but also characters and context – e.g. is the family high nobility or common criminals or undocumented immigrants? Best advice: look up some questions on this site about *how to research your story*. :-)
Comment: Hi yum_kat23. You'll have to do your own research; this question is off-topic. Please refer to the [help] and [tour].
Answer: Don't forget the endless details outside of the legal ones:
If you've ever seen the unexpected death of a close relation, there's more to the story there. People are stunned and disoriented. Reality seems broken and it's hard to focus. Some launch themselves into the details of planning the burial and funeral; ordering flowers, arranging meals, paying organists, etc. Often this is to avoid dealing with feelings. Others wander in a fog. Families under the best of conditions are conflicted about things. Aunt X only cares if the funeral is Lutheran, while cousin Y is convinced it's their fault because they didn't go with the person.
If the body is found by strangers, then the identity of the body needs to be established. This may mean the stereotypical viewing or confirmation by some more extensive method like dental records. A person with an injury or whose body was disfigured by what killed them may be problematic (I don't know how much the swelling from anaphylactic shock goes down after death).
From a legal standpoint, the question becomes, "Is there doubt that this was an accident?" If there is any doubt, the body is held by the coroner until a ruling can be made. If questions arise then the body may be held indefinitely until it is no longer evidence. Generally, once an autopsy is done, they try to release the body to the family for burial. If a charge is brought, the body may be held longer because the defence may request a second autopsy by their own experts.
If the body needs to be transferred, this is usually taken care of by undertakers. Interstate burials can be a little more complex, but a good mortician will make a lot of problems melt away.
After the service, if the person has any assets there are endless poorly coordinated appointments even for those who arranged everything carefully. Few unexpected deaths are well orchestrated. These are frequently young people with relatively few assets, but almost no planning. Older folks often have detailed plans with burial sites, churches, music, and carefully written wills. The real awkward folks are those old enough to have jobs and kids, but not old enough to think they'll die.
Answer: When my brother died of a drug overdose all my parents had to do was identify the body and make funeral arrangements.   I don't think   they will have to do much more than that.


How do I get bids or listed NFTs using the cardano serialization libray?

Question: We're building a marketplace for cardano and we're aware that the owned tokens/nfts can be fetched via the getBalance() function. How do we get the bids or lists (for sale) for a particular owner address? Is this stored and decoded somewhere in the blockchain much like the owned nfts? THanks
Answer: You cannot get the bids and the listings of NFTs directly from the wallet that is bidding or selling. You need to know which Marketplace (smart contract) has that wallet used and get the information from there.
For example, you can check the contracts of the most popular Marketplace in Cardano (jpg.store) here: https://github.com/jpg-store/contract-v2
Answer: Actually, you can't get bids information from blockchain itself.
Since those information are on marketplace smart contract (Jpg.store).
But you can get these information using some provided API.
For example, you can use api which is provided by CNFT.TOOLS.
https://cnft.tools/
Here is example of api.
https://api.cnft.tools/api/external/${policyId}/
This api will give you the current price, and whether nfts are on sale or not, and their metadata, etc...
Hope this will help you.


Secure and magento / downloader

Question: I would secure my / downloader. I wish that no one is accessing this road except me how to configure this?
Answer: The best way to secure the downloader is removing the folder from PROD to avoid security and code issues. See this answer for some more info and ideas.

Secure and magento / downloader


Diebold Mariano test for non time-series data

Question: Can the Diebold Mariano test be used to compare the MSE of two models (trained on the same data) for non time series data?
Answer: Yes, it can. There is nothing in the construction of the test that would make it unsuitable for non time series data. However, note the following subtlety: the test is for comparing forecasts, not models. As Diebold puts it in his "Comparing Predictive Accuracy, Twenty Years Later: A Personal Perspective on the Use
and Abuse of Diebold–Mariano Tests" (2015) paper (ungated version here),

The Diebold–Mariano (DM) test was intended for comparing forecasts; it has been, and remains, useful in that regard. The DM test was not intended for comparing models. Much of the large ensuing literature, however, uses DM-type tests for comparing models, in pseudo-out-of-sample environments. In that case, simpler yet more compelling full-sample model comparison procedures exist; they have been, and should continue to be, widely used. The hunch that pseudo-out-of-sample analysis is somehow the "only," or "best," or even necessarily a "good" way to provide insurance against in-sample overfitting in model comparisons proves largely false. On the other hand, pseudo-out-of-sample analysis remains useful for certain tasks, perhaps most notably for providing information about comparative predictive performance during particular historical episodes.


~なあに at the end of a sentence

Question: I borrowed a Japanese children's book from the library to practice and of course I'm stuck on the title. It is called ごあいさつなあに。I know the first part means greetings or welcome, but I can't find any information online about the ending part tacked on. I figure its a colloquial type of thing.
Comment: 一応辞書に・・・ http://ejje.weblio.jp/sentence/content/なあに
Answer: It's just a singsongy way of saying the word 何{なに} ("what").
There seems to be a whole series of these picture books with titles ending in なあに, which would all translate into English as something like "What's [X]". So there's おてんきなあに "What's the Weather?", このかたちなあに "What's This Shape?" and so forth. This one, ごあいさつなあに, would be something along the lines of "What are Greetings?"

～なあに at the end of a sentence