Can GML contain symbology?

Question: I know that KML can contain symbology in it. I understand that GML is the open version of it. Can GML contain symbology too?
Comment: GML predates KML standardisation but both are open standards. GML can contain symbology but AFAIK no one uses it.
Comment: @iant That could be worth writing up as a brief answer.
Answer:
I understand that GML is the open version of it.

Geography Markup Language (GML) is NOT the open stardards version of Keyhole Markup Language (KML), both are open standards controlled by the
Open Geospatial Consortium (OGC), for more details on these standards see the OGC standards.

Can GML contain symbology too?

Yes, GML has a gml:symbol property that allows you to define symbols

The gml:symbol property element specifies a graphical symbol used to render a geometry or a topology. A
  symbol is a description of graphical attributes of a graphical object without a particular, implicit meaning. It can be
  a description of a line, circle, polygon or more complex drawing. Using the symbol element, we can specify a
  particular symbol in two ways:

Remote: Just like any other remote property, the symbol property  as the gml:AssociationAttributeGroup attributes that allow for specifying a link pointing to a remote object.
Inline: The value of the gml:symbol property is the any specifier. This allows for specifying an arbitrary
  grammar for the symbol.

This element has two additional attributes: symbolType and transform. The symbolType attribute is an
  enumeration and can take one of three values: "svg", "xpath" or "other". Applications will rely on the value of this
  attribute to decide how to interpret the symbol.
  The transform attribute allows to specify a transformation expression that will be applied to the symbol in the
  rendering phase. Its type is string and the value is specified in SVG (transform attribute).

Reference: OpenGIS® Geography Markup Language (GML) Encoding
Standard (OGC 07-036)

Can GML contain symbology?


Why doesn't this violate the 2nd law of thermodynamics?

Question: Consider an ideal gas in a cylindrical container in a gravitational field, with a piston on top pushing down by gravity. The piston has some locking mechanism that locks it in place if it is displaced upwards enough that the temperature of the gas is some $1>>\epsilon>0$. If we wait long enough, enough particles will line up due to their random motion and push the piston upwards. We can make the piston arbitrarily thin and arbitrarily heavy. Eventually it will lock in some final top position and some arbitrarily small portion of kinetic energy is left in the gas. Since we can make the volume change arbitrarily small, while momentum phase space goes to zero, the entropy must have decreased in this process, but that can't happen, so what is wrong with this reasoning?
Comment: What do you mean by "the temperature of the gas is some $1>>\epsilon>0$"?
Answer: The system you design is not closed and cannot be closed to the volume your are postulating.
Entropy increases or stays constant is a statement involving the whole package, pistons containers and all. Entropy is lost through black body radiation, which cannot be isolated but has to be counted, and the thermal properties of the container and piston.
You are describing how pistons may fail over time by relaxation, but no problem with entropy and the second law.
Comment: Well, you are wrong in my opinion. Classical thermodynamics is a mathematical model for physical systems, physics, not mathematics and video game suppositions. The second law needs closed systems , period, otherwise entropy can decrease as in crystalization if the liquid is not taken into account, and all living things, if their total environment is not taken into account.
Comment: I am not wrong. I am asking a question in the context of classical thermodynamics. But I have found the answer. Why dont you go to all the questions on Newtonian mechanics, SR, and QM and tell them how wrong they are?
Comment: My answer is within the classical thermodynamic framework. The entropy statement ( entropy stays constant or increases) holds only for closed systems in classical thermodynamics of course.
Comment: Your answer is completely irrelevant, in classical thermodynamics you can have perfectly isolated systems, you can also have ideal gases, point particles and locks that dont deterioate. Your answer is analogous to saying that energy isnt conserved in newtonian mechanics because the universe is expanding.


Automorphisms of non-abelian groups of order 27

Question: What are the automorphism groups of non-abelian groups of order 27? (there are two non-abelian groups of order 27).
Comment: Could you please provide some motivation?
Comment: If G is a group of order p^3.q (p=/=2, q=/=3), then G always has a normal Sylow subgroup! So all groups of this type can be obtained using semidirect products (which are easy, can write presentations explicitely, and easier than other extention types, as cyclic, central etc). But to get all possible semidirect products, we would like to know automorphisms of groups of order p^3. I am working the case when G has order 54=2.(3^3). Here Sylow-3 subgroup is normal, order is 27, what are their automorphism groups? (for abelian case its easy).
Answer: The non-abelian group of order $p^3$ with no elements of order $p^2$ is the Sylow $p$-subgroup of $\operatorname{GL}(3,p)$.  Its automorphism group can also be viewed as a group of $3\times3$ matrices, the affine general linear group,
$$\operatorname{AGL}(2,p) = \left\{ \begin{pmatrix}a & b& e\\ c& d& f\\ 0 & 0 & 1\end{pmatrix} : a,b,c,d,e,f \in \mathbb{Z}/p\mathbb{Z},\; ad-bc ≠ 0 \right\}, $$
which is the semi-direct product of $\operatorname{GL}(2,p)$ on its natural module.
This description is reasonably famous, especially when considering non-abelian groups of order $p^{2n+1}$ with no elements of order $p^2$ whose center and derived subgroup have order $p$.  Instead of $\operatorname{GL}(2,p)$ you get a variation on $\operatorname{Sp}(2n,p)$, that simplifies to $\operatorname{GL}(2,p)$ when $n=1$.
The non-abelian group of order $p^3$ with an element of order $p^2$ and $p ≥ 3$ has as its automorphism group a semi-direct product of $\operatorname{AGL}(1,p)$ with the dual of its natural module, so you get all $3×3$ matrices
$$\left\{ \begin{pmatrix}a & b& 0\\ 0& 1& 0\\ c & d & 1\end{pmatrix} : a,b,c,d \in \mathbb{Z}/p\mathbb{Z},\; a ≠ 0 \right\}. $$
In both cases the "module part" of the semi-direct product is the group of inner automorphisms and the quotient ( $\operatorname{GL}(2,p)$ and $\operatorname{AGL}(1,p)$ ) are the outer automorphism groups.
You can read about some of this in section A.20 of Doerk–Hawkes, or Winter (1972).

Winter, David L.
"The automorphism group of an extraspecial p-group."
Rocky Mountain J. Math. 2 (1972), no. 2, 159–168.
MR297859
Doerk, Klaus; Hawkes, Trevor.
Finite soluble groups.
de Gruyter Expositions in Mathematics, 4. Walter de Gruyter & Co., Berlin, 1992. xiv+891 pp. ISBN: 3-11-012892-6
MR1169099
Comment: How the structure of permutation groups AGL(1,p)=Z_p:Z_(p-1)?
Comment: AGL(1,p) = { [a,b;0,1] : a,b in Z/pZ, a ≠ 0 } has a normal subgroup ( "a=1" ) of order p with complement ( "b=0" ) of order p-1.


Fourier transform of a function of bounded variation

Question: I know if $f\in L^2(\mathbb R)$ is two times continuously differentiable, then we must have that the Fourier transform is integrable. Is there any more relaxed condition than this? For example if $f$ is continuously differentiable and $f^\prime $ is of bounded variation, will it imply that $f^\prime$ is integrable. Assume that all the functions are compactly supported.
Comment: No, for example the FT of  step function has decay $1/x$. (I assume that a hat is missing and you're asking if a BV function has integrable FT.)
Comment: When f is of bounded variation the Fourier sine transform F^s(f) and the Fourier cosine transform F^c(f) -which form the Fourier transform of a function f := F^f(f)= F^c(f) -i F^s(f) have different behavior. Respectively, F^s(f) is not (HK-)integrable while F^c(f) is.
Answer: If $f'$ is of bounded variation, then $\hat{f}$ will be integrable. To see this, note that by your assumptions, $f''$ (in the sense of tempered distributions) is a finite complex-valued measure, so that $\widehat{f''}$ is bounded, meaning that $|\hat{f}(\xi)|\lesssim 1/(1+|\xi|^2)$.


Possible to view PHP code of a website?

Question: Is it possible to somehow view another websites php files/codes?
Or to rephrase the question, Can my php codes be viewed by anybody except for those who have access to the file?
If so, how can I best prevent this?
Ps: Server OS is Ubuntu 9.10 and PHP version is 5+ (Apache2)
Answer: A bug or security vulnerability in the server (either Apache or the PHP engine), or your own PHP code, might allow an attacker to obtain access to your code.
For instance if you have a PHP script to allow people to download files, and an attacker can trick this script into download some of your PHP files, then your code can be leaked.
Since it's impossible to eliminate all bugs from the software you're using, if someone really wants to steal your code, and they have enough resources, there's a reasonable chance they'll be able to.
However, as long as you keep your server up-to-date, someone with casual interest is not able to see the PHP source unless there are some obvious security vulnerabilities in your code.
Read the Security section of the PHP manual as a starting point to keeping your code safe.
Answer: By using exploits or on badly configured servers it could be possible to download your PHP source. You could however either obfuscate and/or encrypt your code (using Zend Guard, Ioncube or a similar app) if you want to make sure your source will not be readable (to be accurate, obfuscation by itself could be reversed given enough time/resources, but I haven't found an IonCube or Zend Guard decryptor yet...).
Answer: Noone cand read the file except for those who have access to the file. You must make the code readable (but not writable) by the web server.  If the php code handler is running properly you can't read it by requesting by name from the web server.
If someone compromises your server you are at risk.  Ensure that the web server can only write to locations it absolutely needs to.  There are a few locations under /var which should be properly configured by your distribution.   They should not be accessible over the web. /var/www should not be writable, but may contain subdirectories written to by the web server for dynamic content.  Code handlers should be disabled for these.
Ensure you don't do anything in your php code which can lead to code injection.  The other risk is directory traversal using paths containing .. or begining with /.  Apache should already be patched to prevent this when it is handling paths.  However, when it runs code, including php, it does not control the paths.  Avoid anything that allows the web client to pass a file path.

Possible to view PHP code of a website?


The clean URL test failed in drupal 7

Question: The clean URL test failed. It was working correctly on my local computer, when I uploaded it to server I got this message and I could not enable the clean url. What should I do to enable it? I have uploaded the htaccess also.
Comment: Check if the .htaccess file is considered at least -- add some random text to .htaccess and you should get a 500 Internal Server Error page. If so, that means your .htaccess file is executed by server.
Answer: There are a number of requirements you'll need to confirm are met on the server. After confirming Apache is allowing your local .htaccess configuration override (as per Ayesh's comment) I'd start by checking info.php to see if mod_rewrite is loaded.
Make sure you remove info.php when you're done checking as you should not have this on a production server.
Answer: have a look at Configure clean URLs, suppose you are using apache2

enabled mod-rewrite in apache
sudo a2enmod rewrite
vi /etc/apache2/sites-enabled/000-default, change AllowOverride from None to All

<Directory /var/www/>
   Options Indexes FollowSymLinks MultiViews
   AllowOverride All
   Order allow,deny
   allow from all
</Directory>

vi httpd.conf, add this

<Directory /var/www/>
      RewriteEngine on
      RewriteBase /
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</Directory>

2. restart apache

sudo service apache2 restart

Answer: If your entire site is password protected (via cpanel/.htaccess) Then the test will not pass. This may not be the solution but is worth checking.
I disabled password protection by commenting out the following lines in my .htaccess file.
AuthType Basic
AuthName "public_html"
AuthUserFile "/home/********/.htpasswds/public_html/passwd"
require valid-user

Run the test again, if it passes, tick the box then be sure to uncomment the previously commented lines.

The clean URL test failed in drupal 7


What is the benefit in the Prologue "spoiling" the play in Romeo and Juliet?

Question: In the Act 1 Prologue to the play Romeo and Juliet by William Shakespeare

Two households, both alike in dignity,
In fair Verona, where we lay our scene,
From ancient grudge break to new mutiny,
Where civil blood makes civil hands unclean.
From forth the fatal loins of these two foes
A pair of star-cross'd lovers take their life;
Whose misadventur'd piteous overthrows
Doth with their death bury their parents' strife.
The fearful passage of their death-mark'd love,
And the continuance of their parents' rage,
Which, but their children's end, nought could remove,
Is now the two hours' traffic of our stage;
The which if you with patient ears attend,
What here shall miss, our toil shall strive to mend.

Shakespeare spoils the whole play, telling the audience the entire premise of two lovers meeting and that they eventually "take their life". Surely revealing this at the start of the play kills of tension as the audience already knows Romeo and Juliet will die at the end? If so, what benefit was their for revealing this information at the start of the play?
Comment: There are more reasons to enjoy a play other than the surprise at a plot twist that a spoiler ruins. One thing to take away from this prologue is that maybe this surprise was less valued in relation to other things at the time the play was created.
Comment: Maybe the disease we know as spoilerphobia did not exist in Shakespeare's time? The play is not a whodunit, where the audience match wits with the detective in figuring out the clues.
Comment: If you don't want to claim that it's inherently bad, then maybe you shouldn't use the word "spoil".
Comment: It kills the tension? Why should there be tension?
Comment: Can I just say the question doesn't claim to want there to be more/less tension or whether or not revealing key end features are inherently bad, but rather what **benefit** there is in doing this.
Comment: @SleepingGod but it seems to me that requiring a spoiler to have a benefit implicitly makes the non-spoiler way the better. Why should that be better? Why should a benefit be needed for "spoiling"?
Comment: It seems to me that some plays, like King Lear, are much less enjoyable for audiences that don't know what's coming. I think that some members of the audience, even today, just can't anticipate the totally bleak resolution; and when it comes, they often hate it. I love the play Lear, perhaps partly because I don't harbor that expectation of some little solace in the ending, let alone the much bigger solace of a happy ending for Romeo and Juliet.
Answer: You have to remember, the audience is well aware that a tragedy usually ends in the deaths of many of the main characters; therefore, I would argue that the enjoyment of the play is derived from an exploration of a set of themes that require the audience's understanding of the direction the play is moving in, in order to allow for emphasis to be placed on these themes (rather than the plot). The enjoyment of the play does not come from learning that everyone dies in the end.
"Oh, it was a tragedy! I see, what a clever play. I did not see that coming!"
Comment: Also, I understand that Shakespeare's audience was already familiar with the story, that "doomed lovers" was a whole subgenre of literature in the 16th century, with other plays about Italian doomed lovers being common. So the prologue didn't really spoil anything, any more than a movie about Little Red Riding Hood would spoil something by it talking about the wolf eating the grandma in the first scene.
Answer: If Shakespeare had depended on surprise for his plays to be enjoyable, you would never have heard of him. People would see the play once, get the full effect, and then there would be no point in going again.
Roger Ebert said, "It's not what a movie is about, it's how it is about it." The same goes for plays. Shakespeare tells you the ending up front because he wants you to not just wait for the surprise, but to watch how it happens to them. There are many different causes: their parents, their friends, their youth, even something as simple as a message that went astray.
It's much like your own life. Spoiler alert: you're going to die. What matters is how you live between now and then. As actors, we strive for authenticity at each moment. The question we constantly ask, "What is it that the character wants most in the entire world? What is preventing them from getting it?" That's how enjoyable performances are constructed: the intensity of each instant, regardless of the outcome.
There's a wonderful moment in the film Shakespeare in Love, where Juliet rises and asks, "Where is my love?". The audience is in tears, and one answers her: "Dead!" The audience member knows what's going on, but Juliet doesn't. The moment is powerful because we know what she's about to learn. She's being carried by forces more powerful than herself, and the tragedy is in how she reacts to them, instant by instant.
Shakespeare's audiences knew the ending of Romeo and Juliet before he even set pen to paper. Shakespeare rarely constructed novel stories. He repeated well-known tropes. The audience didn't sit through it in order to get a surprise ending; if anything, that would have annoyed them.
And that's true of modern audiences as well. When you go catch a James Bond movie, you don't need a spoiler alert that Bond wins and the villain loses. In a rom-com, it doesn't matter whether boy-gets-girl-back really follows boy-meets-girl and boy-loses-girl: they have different effects, but what's important is how he goes about getting her rather than his success.
To repeat myself for one final redundancy: the benefit of "spoiling" the ending is that the audience is relieved of the pressure of guessing how it turns out, and get to focus instead on the individual moments. If you just wanted to know the end of the play, Shakespeare would tell you, "Save your penny: they die."1 The reason you sit through the two hours traffic on that stage is to see how they get to die.

Actually, I don't see him turning down cash. Theater is always on the brink of bankruptcy.
Comment: "Spoiler alert: you're going to die." - nice :-D
Comment: Props for that Ebert quote!  The man knew the medium.
Comment: *"The audience is in tears, and one answers her: "Dead!" (...) The moment is powerful because we know what she's about to learn. She's being carried by forces more powerful than herself (...)"* __ somebody has suggested that the great & enduring popularity of tragedies in literature, drama, film and news is due to the universal human need for periodic emotional catharsis which these provide through sorrow not directly related to the story's audience. Recall the three-hanky-weepies of Hollywood and Bollywood! People need to cry. Which is why *"a surprise ending (...) would have annoyed them."*
Answer: Ah, but the prologue doesn't spoil the ending of Romeo and Juliet! Take a look at those lines again:

From forth the fatal loins of these two foes
  A pair of star-cross'd lovers take their life;
  Whose misadventur'd piteous overthrows
  Doth with their death bury their parents' strife.

So these "star-cross'd" lovers will die to bury their parents' strife. Many of Shakespeare's tragedies end with the main characters dying, so it's likely that the audience already knew that the main characters would likely die, and the prologue might be slyly hinting that they will "take their [own] life" (although that line clearly means "take their lives [from forth the fatal loins ...]", thanks @DLosc!), but doesn't tell you anything about why this death comes about. The audience knows something sad is coming, but they don't know what it will be yet.
In my opinion, this prologue sets you up to think that the suicide will be engineered by the lovers, perhaps of the "if we can't be together, life isn't worth it" variety. As you watch the play, however, things seems to get better and better for Romeo and Juliet while things get worse and worse for the Montagues and the Capulets: they meet! They fall in love! They get married! A cunning plan is hatched so that Juliet can run away from her family and be reunited with her husband! All this time, the audience is thinking, "Wait a minute, this is a tragedy? And the prologue told me that they're going to kill themselves? How will we get there from here?"
And then, boom, a letter goes awry, Romeo decides to kill himself and, just like that, the audience knows where this is going. Without the prologue, they would spend Act 5 wondering if Romeo's plan can be stopped; with it, they are certain that his plan will succeed. This lends additional tragedy to the scenes of Romeo planning his death and Friar Laurence learning that Romeo doesn't know about the scheme, since the audience already knows that these schemes will fail, that Romeo will die, and that this will almost certainly lead to Juliet's own death. I'd argue that, without the prologue, Act 5 could have been longer, with more potential interruptions to Romeo's plan -- and further increasing the audience's hopefulness -- before a surprising finish. But Shakespeare opted to let the audience get ahead of the story, giving them a longer period of time to feel sad for the characters before their actions destroy their own lives.
This makes this more like the end of Julius Caesar (where Caesar's ghost tells the non-history-buffs Brutus' final fate, who then has time to reconcile himself to it), rather than the end of Othello (where Iago's plan succeeds right to the end, when it is unexpectedly revealed and some small sense of justice is restored). It's also a bit like an episode of TV where the teaser shows you, say, a street covered with the debris from an explosion, and the audience then spends the rest of the show trying to work out how that happened.
Comment: I don't read "take their life" as a reference to their suicide; rather, it completes the previous line: "From forth the fatal loins" of the Montagues and Capulets, Romeo and Juliet "take their life." In other words, they spring from the loins of their ancestors. (Of course, there are plenty of other phrases that tell us Romeo and Juliet are going to die.)
Answer: The fact that the introduction tells us what is going to happen is a sort of meta-game that the playwright is playing with the story. Their love is "star-cross'd" and "death-mark'd" - by TELLING the audience what is about to happen, it more heavily impresses upon the viewer that this is an outcome which was fated from the start. Thus, the sense of tragic fate permeates all actions that happen in the course of the play by providing us with the awareness of their deaths before the story even begins.
Think how the story would change if you didn't know until the last moment how it was going to end - it might feel much more heroic at times, and you might even begin to believe that you are attending a comedy at times. Tipping his hand early in the story forces us to see all future events in their full, tragic light.
Answer: The short answer is that there is the idea that knowing the ending harms the literary work only holds for material that depends on a "twist ending", such as The Sixth Sense.  But even with that film, knowing the ending allows one to glean more from the material on subsequent viewing, in terms of references and foreshadowing.
For me, having seen many productions of R&J, the criteria for determining if the production "works" is if the audience is screaming inside for Romeo not to drink the poison, despite knowing he's going to drink the poison.  Same with Juliet when she wakes up and finds him dead.
Romeo and Juliet is one of the most famous plays of all time.  In fact, it is a testament to the strength of the text that it has worked for centuries, despite everyone knowing the ending.
Work that is "ruined" by spoilers is always lesser work, based on gimmick (the big "twist") as opposed to artistic merit.  Which is not to say such work has no merit, just that it is in a different category to narratives that are experienced again and again by an audience that already knows the story.
Comment: +1 (ruining your perfect 1111 rep). As Hamlet [put it](https://chat.stackexchange.com/transcript/1037?m=38123059#38123059), a classic can be defined as "a book that you can read every day for your entire life and still find new things". Replace "book" and "read" by "play" and "watch", and the same applies here. And obviously you'll know the ending when you watch it the 2nd to nth times, so the story still has to *work* even for people who know exactly how it's going to go.
Answer: The type of prologue that can be found at the beginning of Romeo and Juliet (at least in the 1579 and 1599 quartos but not in the 1623 folio edition) was not unusual in Elizabethan drama. It can also be found in, for example, Gorboduc, or Ferrex and Porrex by Thomas Norton and Thomas Sackville (1561/1562), George Gascoigne's prose comedy Supposes (1566) and the first edition of Selimus (published in 1594).
G. Blakemore Evans writes in his edition (The New Cambridge Shakespeare, 1984),

Cast as a 'Shakespearean' sonnet, this prologue-chorus serves as what was called 'The Argument of the Tragedie' (Gorboduc (1561)), usually prefixed to both tragedies and comedies written under classical or neo-classical influence (...).

Jill L. Levenson writes in her edition of Romeo and Juliet (The Oxford Shakespeare, 2000),

The prologue both imitates a common practice of contemporary tragedies written for the public stage and and followed Brooke's 'Argument', (...).

Levenson assumes that the prologue was performed in the theatre (i.e. it was probably not just added for the benefit of readers).
When reading the prologue of Romeo and Juliet, one realises that it does not really "spoil" that much. It does not tell you why or how those two families revive their feud, whether the deaths of the two lovers is related to the feud, why exactly they take their own lives, let alone how and under what circumstances. For example, when Juliet takes the drug that induces a death-like sleep (in Act IV, scene 1), there is no reason why the audience would assume she would at some point take her own life, unless they expect the story to follow a similar pattern as Pyramus and Thisbe. But since most of the audience was not familiar with ancient literature, it is unlikely that the prologue would have spoilt much of the play.
In addition, a literary work is more than just its plot; how a story is presented is very important. Based on the prologue, one would not imagine, for example, that the play contains so much comedy.
I think the impression of the prologue as being a spoiler stems from the fact that some readers who are already familiar with it, project their knowledge onto those first fourteen lines. A theatre goer who is unfamiliar with the story would not guess what the play's plot is like, especially when being engrossed in the play makes them forget what exactly the prologue has said.
Answer: Picture yourself as a theatergoer in Elizabethan England. It would be much like going to the googleplex and choosing what to watch. "Action? Romantic comedy? How about that blockbuster we've seen a dozen times?" The point is, you know what you're getting when you buy your ticket. You've picked a certain genre because you want a certain experience.
And in Elizabethan England as today, an original story is hard to find. The audience had probably seen other versions of Romeo and Juliet already. "Is this the one where the two kids kill themselves? Oh, yeah, it is." You might learn something, but what you mainly want is to be entertained for a couple of hours--and to have something to talk about at the water cooler the next day.
Another reason for the prologue was to give the audience a tl;dr. If you got occupied for a while with something else (and there was plenty of else to occupy you), you could easily pick up the thread again. It's not just about giving you the ending, it's about giving you the whole story.
If you've gone to the movies for tension, you've gone to the wrong place. The good guy wins, the couple get over their misunderstandings, the cops track down the killer. There are just enough exceptions to prove the rule. Shakespeare knew his audience, and audiences haven't changed.
Comment: The [googleplex](https://en.wikipedia.org/wiki/Googleplex)??
Comment: Also, it's ironic that you include "the couple get over their misunderstandings" as an example of something that always happens, in a question about Romeo & Juliet :-)
Comment: Right. It's a trailer. The trailer always has the best bits in it.


How does something like elemental oxygen oxidize anything if each atom's valence shell is full?

Question: Been learning in biology about $\ce{O2}$'s role as an oxidizing agent, but I don't really understand how $\ce{O2}$ can take electrons from anything if it's not reactive....
Comment: Also, see this: https://chemistry.stackexchange.com/questions/90773/why-is-oxygen-an-oxidizing-agent
Comment: And before I forget, welcome to Chemistry.SE! Take the [tour] to familiarize yourself with the site! We hope you enjoy your stay!
Comment: O2 is pretty reactive, even though each atom's valence shell is full.
Comment: @Mithoron But that question doesn't have an answer that metaphorically explains everything as domestic abuse.
Answer: Most compounds consist of atoms that have "filled" their valence shells. It is basically what defines "reasonably" stable molecules. That does not mean that they cannot react with other molecules. Nature always seeks to find the lowest energies possible for its molecules, and the oxygen molecule has a very high potential energy.
The oxygen molecule is like two bullies who live together. They'd rather find a pair of victims that are weaker than themselves, split up and live an abusive but for them good life alongside their weaker partners. There are worse compounds out there, like the homicidal maniac Chlorine Trifluoride who will rip apart the stablest of marriages to abominable and atrocious results.
Comment: Lolz, nice vivid answer. I take it that's because oxygen is so electronegative. Thanks.

Edit: but wouldn't it take something more electronegative than oxygen (ie fluorine) to break the bond of an oxygen to another oxygen?
Comment: @JurpBurper Victims and bullies. Or bullies and homicidal maniacs. As long as there is difference between them and the resulting molecule(s) are stable  reaction can happen. If a molecule that is highly electronegative find a molecule that is much less so, and the ambient temperature is high enough for it to happen, the reaction will happen and the result is one or more averagely electronegative ones. It is like hot and cold, nature prefers lukewarm.


How to detect interior vertices in groups of 2d polygons? (E.g. ZIP Codes to determine a territory)

Question: I am looking for a method, preferably in PHP, to analyze a group of polygons to detect the outer boundaries of the group.
Specifically, this is for a Google Maps v3 application that renders territories. Each polygon in the territory is a ZIP Code. I'm trying to detect and draw only the territory boundary. Here's a mock-up of what I'm trying to accomplish:

The challenges I face in solving this problem:

ZIP Codes within each territory can be (and often are) non-contiguous (see the red and green territories in the example above).
ZIP Codes are not necessarily convex, so a convex hull technique wouldn't work (maybe I'm wrong?)
Although it looks like it in the image above, vertices are rarely truly redundant from one ZIP to another. Each lat/lon coordinate (i.e. each vertex of the polygon) has 10 decimal points of precision. I have already tried and rejected a rounding technique as it never produced a clean data set that still resembled the original shape.

On the positive side, these territories never change once they're established. Therefore, this process can be run offline to calculate and store the resulting territory polysets.
Clarification:
My data is stored at the ZIP Code level. Each ZIP Code is defined by one or more large sets of lat/lon coordinates. Each lat/lon coordinate defines a single vertex in the Google Maps polygon. As with the bigger territories, each ZIP Code may or may not be convex, and it may or may not be a single contiguous polygon.  The larger territory is simply stored as a list of ZIP Codes; no polygonal data is stored for territories--which is the problem I'm trying to solve here.
Many thanks in advance for any pointers in the right direction.
Comment: Much depends on how your data is structured.  You want to remove the boundaries that have the same color to both sides.
Comment: Thanks, Joseph. Unfortunately, I don't have access to the color as it's rendered by Google Maps at run-time.  All I have stored is the polygon vertex coordinate sets for each ZIP Code.
Comment: how many vertices do you have to process?
Answer: It sounds like you have a list of which zip codes relate to which territories. You also have a polygon for each zip code.
If this is the case, then the solution is fairly straightforward. The key observation/assumption is that bordering zip codes should share edges, which need to be removed. If this isn't the case, then the following is a moot point.
For each territory:
Create a dictionary that is keyed to the sorted edge, and which it's item is a list of polygons with that edge. Then go through the polygons in the territory and fill out the dictionary. This may be tricky as you need to ensure that Edge(A,B) is the same as Edge(B,A), which could be done by sorting the points in the edge.
Once you've gone through all of the polygons, you'll end up with essentially a table of edges and which polygon they are associated with. Convert this table into a graph, ignoring all edges that are in two or more polygons, although the "or more" is probably not possible. The result should be an undirected cyclic graph, that you should be able to extract the territory polygon from the graph using an algorithm similar to depth-first search.
The performance should be O(N), where N is the total number of edges/vertices.
Comment: Wow, M C.  Thank's for the tip.  You're right about your assumptions.  I'm going to do some R&D along these lines and see what I come up with. I'll post back my results.


Brownout (low voltage) Detection on msp430F2274

Question: I work on a Texas Instruments msp430f2274 with a battery. I want to know, when the supply voltage is low.
I found information about a "Supply Voltage Supervisor" but apparently it is not present in all devices of the msp430x2xx family. My controller has a brownout detection circuit and this triggers a POR (Power on Reset).
Now to the problem. I don't know how to use this POR signal or the BOR circuit. How do I detect low voltage on my controller and trigger specific events to save my data.
Comment: I suspect you'd have more luck on a forum dedicated to TI processors (assumning that's what a msp43... is).  But generally Power On Reset is a hardware signal that resets the circuitry.  By that time it's too late.
Comment: Generally you would have to enable these in a config or fuse bit unless they are enabled by default.  POR would then happen by itself - though you may be able to check some register on boot to see if that is why you are booting.  Brown out may be able to fire an interrupt on which you could save a small amount of state.
Comment: The [data sheet](http://www.ti.com/lit/ds/symlink/msp430f2274.pdf) has a couple of pages on POR/BOR, but doesn't seem too helpful otherwise.
Comment: Assuming your MCU has a ADC, just use that to convert on the supply voltage divided down. This would require a voltage reference, but the MCU *probably* has one built in, so all you'd need would be a few resistors. As a bonus, you could also monitor the battery charge.
Answer: From MSP430x2xx Family User's Guide (slau144):

The brownout reset circuit detects low supply voltages such as when a supply voltage is
  applied to or removed from the VCC terminal.  The brownout reset circuit resets the device by triggering a POR signal when power is applied or removed.  The operating levels are shown in Figure 2-2.

This suggests that the brownout detection signal is not available to the firmware.  If you want to detect low battery you need a different means.  Probably some sort of external circuit triggering an interrupt when battery voltage drops to just above the "brownout" level.
Comment: A little further down it says "Additionally, the watchdog timer, oscillator fault, and flash memory flags can be evaluated to determine
the source of the reset." So after a reset there is probably a way to conclude it came from BOR rather than another source.
Answer: A Brown Out Reset will not work well for your situation. The Trigger Voltage V(B_IT-) for Brown Out Reset for the F2274 is listed at 1.71 Volts Max. Other MSP430x2xx chips, like the MSP430G2553 show it as 1.35 Volts Typical. When VCC drops below that trigger voltage, quickly (In the order of micro and nano seconds), the Brown Out circuit triggers a POR/BOR reset, for up to 2 milliseconds after the voltage goes back up past the hysterics voltage (V(B_IT-) + ~ 150 mV), ≤ 1.8V max).
It's intended to protect against quick power drops, that are less than a full power disconnect (A POR happens if VCC drops below 1 ~ 1.19 volts i.e. total power loss). Things like inrush voltage drops or lack of proper decoupling capacitors.
It happens automatically. The only thing you can do is check for a few flags to determine that the mcu reset itself. A Reset means you lost any unsaved ram variables already!
It is not a low voltage supervisor.
It does not stop problems from the voltage dropping below 1.8 V minimum to the trigger voltage. It does not stop clock issues from running the clock at a higher speed than the voltage it requires. For example, 16mHz requires 3.3V or higher. If the voltage drops below that, and you are still at 16 mHz Bad, Undefined things will happen.
Use a Voltage Supervisor, or make your own from the ADC.


How can I find the domain (fqdn) for my machine if hostname doesn't return domain info and domainname returns empty?

Question: As per the this question's title, hostname doesn't return domain info and domainname returns empty. I want to find out the full machine and domain for the machine I'm using (Mac OS X 10.5.8). How can I go about doing this? Tks.
Answer: host `hostname`

will have what you are looking for. To extract just the fully qualified domain name
host `hostname` | sed 's/\([^ ]*\)\ .*/\1/'

Of course; this only really works if you've applied the AlwaysAppendSearchDomains fix to mDNSResponder. In some cases, for example you are behind a VPN, no amount of coaxing that I've found will give you the domain name if the infrastructure has not been able to set it for you.
Answer: Probably you don't have a domain defined right now
Comment: Thanks for the prompt reply Dominik. I haven't got a hand in the network itself but is there anything I can do as a client to get that domain to set itself?
Comment: Did you get your IP by DHCP ?
Comment: Yeap. IP is auto-assigned via DHCP. If I do a DNS lookup using $ host `hostname` it does show me the full domain.
Comment: In that last comment it hostname should be wrapped in backticks.


How do you ascertain the quality of your data?

Question: How do you assess the quality of your data? In data scientists' world, we come across several data. We often crunch numbers without formally assessing its quality due to various reasons. One such reason is we need to meet deadlines for reports & publications. I am wondering if anyone has adopted or come across a method/guidelines that help to find issues within the data (time-saving tips), so we can analyze the data efficiently. Please share your experience, tips, etc.
Comment: This question is too broad and needs to be framed as a question rather than a seed for a discussion.
Answer: This entirely depends on what you wish or aim to do with your data, and what you mean by your tag data-cleaning. This can involve the technical process of sanitising data i.e. fixing broken XML, but also the manual deletion of outliers etc.
Are you going to perform statistics to measure the correlation between certain variables?
Or:
Are you going to include the data into a machine-learning solution?
In any case, you can plot descriptive statistics to get an impression of the quality of your data, such as:

Box-plots to detect outliers
Standard deviation, mean, mode, median to assess if it's normally distributed or not
More, don't know from the top of my head

Remember that those measures give you an impression of the quality of your data, but even good measurements can come from bad data, and possibly vice versa.
In short, the best way of assessing the quality of your data is to assess the quality of your results, which are acquired generally after several experiments. Only then will you see how well your data is suited for the problem you are trying to solve. That - or you need to get your hands dirty and examine the data qualitatively before you use it.
Data (in assumingly large quantities) are generally used to identify certain patterns within the phenomena described by the data. It is very important to describe your task in terms of a (research) question and a proposed solution or hypothesis. Then, you can assess whether the data is suitable for your particular (research) project. Keep in mind that, theoretically, you can try to answer numerous questions on the same data, or answer the same question on different data sets. The goal is the right balance.
Answer: Your question is very broad, and therefore I won't offer very specific answers.  You asked for "time-saving tips" but there are many and they depend on context.
Instead, I'll offer a general set of heuristics that are useful most of the time.

Start with a specification or definition of what "quality" means for your analysis, and therefore for your data.
Use definition/specification in 1) to enumerate the types of errors, omissions, missteps, modifications, etc. that might arise in the course of data collection and recording.  This enumeration will always be provisional because there could be ways that quality could be degraded that you didn't think of originally.
Use 2) to define inspection and test methods that might reveal the existence of any of these types of errors, omissions, etc.  The default method is "eyeballing" -- having a knowledgeable, experienced person looking at the data to see if it looks right.
When you uncover errors, omissions, etc. try to determine the root causes and generating processes. E.g. erroneous data in dozens of columns resulted from an "off-by-one" bug in the ETL job that generated/translated the data from source files.
Using 2), 3) and 4), define processes that might either correct erroneous data or mitigate the effects of data quality problems.  E.g. Soundex transformation of names can mitigate effects of misspelling, but can't mitigate people misusing the "name" field to enter notes: e.g. "Nelson - DO NOT CALL".  Be aware that any process you might use to correct or mitigate errors or problems might create new errors or problems (e.g. truncation of numerical data).
After you perform your analysis, look back at the data and ask "Could these results be the result of data quality problems rather than true/accurate/appropriate data?"  In other words, double check.


Is it right to say "you wanna join?" to invite someone to join me for the activity

Question: Is it right to say "you wanna join?" to invite someone to join me for the activity? Is it causal English or not grammatical at all. thanks. I know it's correct to say "you wanna join me?", however i wonder if "you wanna join" works as well here. Thank you
Comment: Note that **causal** is the wrong word. Try **casual**.
Answer: You wanna join [me]? is a very informal (or casual, if that is what you mean) way of asking Do you want to join [me]? It is neither correct nor grammatical, but it is idiomatic as a representation of informal speech.
If you leave out the me it means Do you want to join [the activity]?
Comment: perfect thanks it's weird that i searched about "do you wanna join" on ludwig and youglish  but only few results show up, thought i was wrong. so, do people use "you wanna join" often in everyday english?
Comment: People younger than I am may do! To me, _D'you want to join [the group or activity]?_ or _Would you like to join?_ would be more natural.
Answer: The word join can mean DO TOGETHER or BECOME A MEMBER. If you want to use the DO TOGETHER meaning, it requires an object, for example join me or join us, or a preposition join with....
The BECOME A MEMBER meaning can be used without an object, as long as it's clear what group or organization somebody became a member of:

It's a great club. Why don't you join?

I would therefore assume that "You wanna join?" was asking whether I wanted to become a member of some club or organization.
Another option to consider is join in. You would use that if you are part of a group of people doing something, and wish to invite another person to participate.


Bayesian inference of marginal likelihood using ABC

Question: I have the following situation: suppose data $D = \{x_i\}$ iid are generated through some process with density function $f(x_i | \alpha, \beta)$ (which I think will be negative binomial) and we'd like a posterior on $\alpha$:
$f(\alpha | D) \propto \pi(\alpha) \; f(D|\alpha)=\pi(\alpha)\int d\beta \; \pi(\beta) \; \Pi_i\; f(x_i|\alpha,\beta)$
where the integral over $\beta$ is analytically intractable. What are the options here?
I've thought about MCMC sampling where I estimate the likelihood for each proposed $\alpha$ through numerical integration over $\beta$, but I'm worried that this will be prohibitively time consuming (especially since $f(x_i|\alpha,\beta)$ needs marginalised over a couple of other parameters).
The other option I've read about is approximate bayesian computation, and I'm wondering if it really is as simple as drawing an $\alpha$ from $\pi(\alpha)$ and similarly for $\beta$ then simulating $D$?
Comment: I am not sure if I understand your question - perhaps you could just do MCMC sampling from $p(\alpha,\beta \mid D)$ and discard the $\beta$s? See answers to http://stats.stackexchange.com/questions/125570/ http://stats.stackexchange.com/questions/134027/ ?
Comment: Thank you! It hadn't occurred to be that by sampling from the joint density you could very cheaply find the marginal. I think this solves it.
Answer: Answer in comments by @Juho Kokkala :
    flag
I am not sure if I understand your question - perhaps you could just do MCMC sampling from p(α,β∣D)
and discard the βs? See answers to stats.stackexchange.com/questions/125570 stats.stackexchange.com/questions/134027 ?
"Thank you! It hadn't occurred to be that by sampling from the joint density you could very cheaply find the marginal. I think this solves it. "


iTunes Backup security code not working

Question: I have a backup of my iPhone 5 on my computer and I had a security code that I know I used but as I just got a new iPhone 6S, the backup is not working as it is stating the security number I am putting in is wrong so is there a way around this or a way to reset the code of the backup that I no longer have the phone? I need this backup and I can't get into it....help! Thanks.
Answer: Unfortunately there is no way to access a password protected backup without having the correct password (passwords are there for a reason). You can check if you have an iCloud backup available from your iPhone 5, but as far as the iTunes backup you won't be able to access it until you enter the correct password.
Apple specifically mentions that "There is no way to recover your information or turn off Encrypt Backup if you lose or forget the password", so you just might be out of luck on this one.
This page might help, good luck.

iTunes Backup security code not working


How does the Fine Structure Constant Vary with Energy?

Question: Like my topic, how does the fine structure constant vary with energy?
I looked it up and found:
$$\alpha_{eff}(q^2) = \frac{\alpha}{1-\frac{\alpha}{3\pi}\ln(\frac{-q^2}{Am_e^2})},$$
where $\alpha^{-1} \approx 137$, $A=\exp(5/3)$, and $m_e$ is the electron mass.
Consider two beams of particles with the same mass with the momenta:
$$p_1=(E,\vec{p}), p_2 = (E,-\vec{p}),$$
what would "$-q^2$" be in this case?
Answer: First, the standard formula would be
$$\alpha(q^2) = \frac{\alpha(\mu_0^2)}{1-\frac{2\alpha(\mu_0^2)}{3\pi}\ln\frac{q^2}{\mu_0^2}}$$
where the reference energy scale $\mu_0$ can indeed be chosen to be the electron mass, as in your formula, except for that $\exp\frac{5}{3}$. I have never seen that: where did you get your formula?
Then, I could write several paragraphs of theory to explain to you that in all rigour $q^2$ is arbitrary, and so is the reference point $\mu_0$, but I am not sure how useful that would be as if you had the theoretical baggage to understand what is called renormalisation, you would not be asking this question.
So I'll cut the chase and tell you that a pragmatic value would be to choose $q$ as the centre of mass energy of your two particles.
Comment: I believe OP uses the Peskin and Schroeder equation 12.89, page 424.


Popup dialog box manager using PureMVC

Question: I am developing a a game in Flash using the PureMVC framework. From time to time I need to show dialog pop-up window to get a user response back (e.g. "Cancel", "OK" and other kinds of asynchronous user feedback) while "locking" the background for interactivity.
I need some management for my pop-ups: all pop-up notifications should be stacked up, so that if two (or more) pop-up messages are initiated at the same time I show them one by one.
What's the best practice here? Should I employ a proxy to manage my pop-ups (sounds unreasonable). How do I get feedback back from my dialog? using notifications?
Answer: You can probably store popup instances in Proxy and manage them with commands.

Popup dialog box manager using PureMVC


Powerpoint Presentation on the Mobile Phones?

Question: Want to display the Powerpoint Presentation on the Mobile, let me know if it can be achieved in SharePoint 2010?
Answer: If available Office Web Apps will let you natively open and present a PowerPoint presentation.  If you don't need to keep this "in house" you can leverage it via SkyDrive (Microsoft has Office Web Apps integrated with SkyDrive).
SharePoint 2010 Enterprise also contains the same PowerPoint functionality without Office Web Apps.
Comment: Unable to access the skydrive from Windows Mobile 6.1.4 Emulator..Should I need to install any apps?
Comment: I don't think you will find much support for any of MS latest for WinMo6.  Your best bet is probably to export PPT as images, and then use a brief bit of JavaScript to cycle thru them on mouse clicks. Something like this: http://net.tutsplus.com/tutorials/html-css-techniques/how-to-create-presentation-slides-with-html-and-css-2/
Answer: I am pretty sure, if you create a SharePoint page using page viewer webpart by following this Tutorial, you will be able to view it on mobile as power point presentation as well.
Hope it helps.
Comment: Without PowerPoint app service you can't access the PPT on the page viewer webpart


How to hedge against lack of volatility

Question: Say you have a trading system that works best when markets are most volatile. What would be the best way to hedge against lack of volatility ? For example, 2008, 2009 was highly volatile and it has been trending down since. What's the best way to hedge and if VIX is the best one ?
Comment: I am not betting against volatility! Infact, the trading system does better during volatile times. The question was how to best hedge against **lack** of volatility ?
Comment: Betting against volatility is a very dangerous proposition; you never know when the world will blow-up. Best bet is to just create a different strategy that works in less-volatile times.
Comment: Isn't simply selling volatility the easiest option here?! You make money (orhedge in other words) on time decay
Answer: If you're mostly trading equities, sell 2-3 month VIX futures, otherwise sell straddles on your non-equity assets or consider the new CME volatility futures on gold, oil, Euro.
chrisaycock isn't wrong: even if your trading system does better during volatile periods, you should be careful not to over-hedge, since losses on your short vol position(s) will probably come faster than profits from your core system.
Answer: Hedge the risk of low-volatility by engaging in a variance-swap. Peter Carr and Lurien Wu wrote "Variance Risk Premia" on the topic.
Answer: Write Iron Condors.
Preferably, with expiration between 21 and 45 days. Pick short strikes (call and puts) around the 30 delta for aggressive trades, and around 18 for conservative trades. Keep in mind that a 'conservative' Iron Condor blows up much worse than an aggressive one.
You always risk the spread value of your call or put spread (whichever is greater) less the credit received. The typical Iron Condor is balanced, so the call spread and put spreads are equal in risk. You only take risk on one side or the other because in our world, prices can only be at one place at a time.
This trade generates an initial credit and has positive time decay. It is short volatility and will lose 'paper' value if volatility increases or price moves towards the short strikes.
By no means would I recommend this trade, but for illustration purposes, an SPX Iron Condor this morning before the market opens is marked at $2.80 credit for strikes of 1290/1295 (put) 1345/1350 (call). This is for the Jun expiry, which is only 21 days away. The short strikes are the ones in the middle, and are sitting at about 30 deltas. Ostensibly, there is a 30% chance SPX expires higher than 1345 and a 30% chance it expires lower than 1295 by expiration. This gives you a small edge but keep in mind that Iron Condors have an expected return of zero.
Zero. Nada. Zip. You've been warned.
Comment: What is "the 30 delta" here? Is it delta of 0.3?
Answer: Hedging against lack of volatility is per definition a spurious concept. Hedging is done exactly to AVOID volatility.
It is obvious that during volatile periods there is much more potential to make profits (for speculators) since the frequency of prices going up and down is per definition high(er).
So hedging against lack of volatility is not possible. And from the above, TIME is the key here. Volatility is basically (quick) changes in prices over (short) periods of time. The only thing one can do is to stretch the time frame by trading further away contracts.
Comment: obviously, he wants to hedge against moves in the profit of his system, not against the price movement of a stock.
Comment: some trading strategies perform better when there is high volatility. Hence hedging against low volatility can makes sense.

How to hedge against lack of volatility


How to stop a currently running cron job?

Question: How can I stop a cron job which is currently running?
Comment: The three answers below interpret this question in three ways. @GURU, could you please clarify what you would like to do? Would you like to kill a process started by cron that is now running, or would you like to prevent the job running in the future?
Answer: You can do this the same way you'd stop any process.
To stop a currently running cron job, you can do one of the following:
pkill process-name

or if you know the PID (you can determine it by running ps):
kill 1234

(substituting the actual PID)
Comment: @UWU_SANDUN: You can use `pgrep` or `grep` the output of `ps`. There's nothing special about a process run from `cron`. You would just search for the process under its own name. You can also do `ps fauxww | grep -A 1 '[C]RON'` and lines below the line(s) will show jobs being run by `cron`. You can adjust the number 1 higher to see subprocesses if any.
Comment: how to list which currently running cron jobs ?
Comment: Note you must be running cygwin as admin to kill processes. See [here](https://stackoverflow.com/q/4090301/6854489) for more info on that.
Comment: Using Ubuntu I typed what @takanuva15 suggested, `ps fauxww | grep -A 1 '[C]RON'`. This lists the current cron jobs running, so thereafter you can note the PID down and execute `# kill -9 PID`. Thanks!
Comment: @russellhoff: `-9` should only be used as a last resort because it prevents the process from doing any cleanup as it exits.
Comment: On mac I needed to do `ps -A` to show the cron job
Answer: Strange, no one has mentioned this method:
$ crontab -e

In the opened editor, delete line of the task you want to stop or insert a # sign, save and exit
e.g.
before
* * * * * some_script1
* * * * * some_script2

after
* * * * * some_script1
#* * * * * some_script2

or
* * * * * some_script1

restart the service after making changes by
sudo service cron reload

Comment: This doesn't stop a currently running cron job, it stops future cron jobs that will be launch by cron.
Answer: To stop running cron job .First get the process id of your command with
top -p $(pgrep -d',' your_command)
eg:-
top -p $(pgrep -d',' httpd)
and run
kill PID replace PID with process id
Answer: If you are using Redhat (RHEL)/Fedora Core/Cent OS Linux use the following command :
/etc/init.d/crond stop

If you are using Debian or Ubuntu Linux the following command :
/etc/init.d/cron stop

P.S : You should be root to do these things
Comment: i think  it stops all crons .to stop particular cron may i know the command
Comment: This stops the `crond` daemon, does it also stop anything it spawned?  You also generally always want `crond` running on a typical Linux system; there's a lot that usually depends on it running.
Comment: can u pls suggest any command sen
Comment: I dont think it is possible in a straight way.. Maybe we should go for a hack.
Answer: First type ps aux to see what all processes are running.
Then note down the PID of each process you want to stop
Then type
kill {PID} for each process.
Also do have a look at these links (superuser links) :
Verify-that-a-cron-job-has-completed
ps-aux-output-meaning
Answer: You can edit the cron table and comment out the task in question. Switch to the user that controls the task, export your editor of choice into the environment, then use crontab -l:
$ su - root
...
# EDITOR=vi; export EDITOR
# crontab -l

Comment: That lists the crontab. Use `crontab -e` to edit it. For systems that have it, it's preferable to use `sudo` instead of `su`. Also, `crontab -e` would work for the user (or root) crontab, but not the system crontab (e.g. `/etc/cron*`).
Answer: If you want to remove all the crontabs that are running (the commands will be lost):
crontab -r

... or If you want to stop some commands on crontab:

Open crontab to edit:

 crontab -e

Comment the commands in the crontab that needs to be stopped and save it. You can comment using '#'.
Answer: This is my take on this, which I use from time to time.
First, let's find the process IDs of the processes cron has started by using:
systemctl status cron

This will give you a nice little process tree.
Each process' ID are the numbers displayed to the left of the process' name.
So, if my process ID for a process started by cron is 2234225, then I'll simply go:
kill 2234225

I can check either with:
systemctl status cron

or
top

that the process has been terminated.
Just remember, if the process in question is set to be started as defined by the crontab
crontab -e

then, the process in question will become activated again, just with a different process ID.
Comment: Something like `ps ax | grep $PID` is far more functional than using top to check for processes, especially when there are more than a dozen.
Answer: Working for me for linux
pkill -9 crontab

Kills all process having process name crontab
Answer: First of all check the working process with this command.
ps -o pid,sess,cmd afx | egrep "( |/)cron( -f)?$"

This command's output is
599  599 cron
4288  599 \_ CRON

and now kill the process with this command
pkill -s 4288

Answer: If you are using Redhat (RHEL)/Fedora Core/Cent OS Linux use the following command :
$ sudo systemctl status crond
If you are using Debian or Ubuntu Linux the following command :
$ sudo systemctl status cron


Portable heat/air system

Question: Okay it is clear that the portable heat and air system has to be vented outside for the air conditioning but does it have to be vented outside for the Heat? I have an idylist portable heating and cooling system
Answer: Electric heating elements like they use in the Idylist units do not need venting. Some units do work like a heat pump and may have some condensate that will need to be drained. The amount of condensate will depend on the humidity and the length of time the unit is running but for heat no vent is needed.

Portable heat/air system


At what rate do weapons drop in CS:GO?

Question: What are the CS:GO weapon drop rates? Does the drop chance on an achievement idle server go down if you're idling?
Answer: Supposedly, the system has changed and idling won't get you items, something I have observed to seem true in the game. I don't think you will ever get the formula, it is a secret and information won't leak because weapons can be monetized.
Related / Duplicate : How do I get item drops?
Valves's FAQ linked in the above answer
Edit : I forgot to mention it but the drop rates go down over time, if you have like X % chance to drop an item per game, it will decay and reset to X % at the end of the week. This ensures people don't spend too much time farming weapons, or find new ways to idle, probably.
Answer: Not going to lie, I was idling last week and still got item drops so it does still give you items, just not as often.
Comment: It would be good if you could back your answer up with some evidence.

At what rate do weapons drop in CS:GO?


How to put unfinished education on a resume

Question: What is the best way to put on your resume you attended some college, but do not have a degree?
Comment: This could vary on several factors. Are you currently attending that college? Do you have any plans to complete your degree?
Comment: Are you currently a student, or did you leave college entirely?
Comment: Related - http://workplace.stackexchange.com/questions/13311/should-i-put-my-2nd-undergraduate-studies-that-i-did-not-finish-on-my-resume
Answer: You almost need to just to explain gaps in employment
Attended College X from date start - date end
If you had a declared major and were accepted into that major then state it
If you say attended rather BS or BA ... it is clear you did not graduate
If you were just going part time and did not really get far enough to take any advanced courses then maybe leave it off
If you dropped a PhD for a Masters then just list the Masters.  If you got 1/2 way through a 4 year degree and settled for a junior college then just list the junior college.  If you you took algebra and English dropped out and got Ds then don't list it.  Ask yourself if you would like to produce the transcript if asked.
Comment: I disagree with the leaving it off. If you attended any College I think that it would be best to put it down within, let's say 2 years. To me it shows that you have ambition. I feel differently about a man who went to College part time and had to quit due to time constraints/other responsibilities, than a man who worked the same job and seemingly didn't try to improve his situation.
Comment: @zfrisch Any college?  6 credits into a 2 or 4 year degree does not show ambition.   Quit due to time constraints - I would think this is someone that is not good at managing time.  Other responsibilities - OP gave no indication of extenuating circumstances.  I just answered the question as I read it.
Comment: Still, I think it's applicable. It's my opinion and it may be biased based on my experience with the education system, but yes, I think it's valid. I had to work full time while attending full time school and didn't qualify for financial aid until years after my friends had already graduated. There are a billion reasons why school doesn't work out, but if you at least attempt I'll give someone the benefit of the doubt. I guess it really depends on who's reading your resume.
Comment: @zfrisch Cool.  I guess I would not just list two classes unless I had a good reason why I only finished two classes.


Can I still use my visa?

Question: My passport expires in May. I have a US visa, but my passport is in my maiden name. I'm planning on making a new passport with both my maiden and married last names. Will I be able to  use the visa? I need to know what to do. Thank you.
Answer: The visa is still valid. In fact, once you get your new passport, the old one will be returned to you as it still bears a valid visa and you will have to travel with both passports.
The US State Department has a great FAQ site which states the following:

If your visa is still valid you can travel to the United States with
  your two passports, as long as the visa is valid, not damaged, and is
  the appropriate type of visa required for your principal purpose of
  travel. (Example: tourist visa, when your principal purpose of travel
  is tourism). Both passports (the valid and the expired one with the
  visa) should be from the same country and type (Example: both
  Uruguayan regular passports, both official passports, etc.). When you
  arrive at the U.S. port-of-entry (POE, generally an airport or land
  border) the Customs and Border Protection Immigration Officer will
  check your visa in the old passport and if s/he decides to admit you
  into the United States they will stamp your new passport with an
  admission stamp along with the annotation "VIOPP" (visa in other
  passport). Do not try to remove the visa from your old passport and
  stick it into the new valid passport. If you do so, your visa will no
  longer be valid.

For your name change, it is recommended to get a new visa with your new name, but your old visa remains valid.

If your name has legally changed through marriage, divorce, or a court
  ordered name change, you will need to obtain a new passport.  Once you
  have a new passport, the Department of State recommends that you apply
  for a new U.S. visa to make it easier for you to travel to and from
  the United States.

You should travel with evidence of your name change (such as a court document - make sure it is in English) in case you are asked.
If you require to have your name changed on your visa, just go through the process of applying for a non-immigrant visa. Once you reach the interview, explain your circumstances. Make sure you bring evidence of your name change.

Can I still use my visa?


Capturing HttpResponse StatusCodes

Question: I'm trying to capture a HttpResponse StatusCode in a @future method so I can then send it to an email to alert a dev of a possible issue and also alert the Salesfroce user of the error. I have found post on how to handle REST errors but not HttpResponse StatusCode. Is there a best practice or are they interchangeable?
Answer: Probably it would be a better idea to add to the email message both status code and status message. Status code is provided not for human readability but more for identifying the status of the request and to not be dependent on server implementation. Different servers could provide different messages for the same status. So that is why you should better to use both.
Comment: thank you for your input. I was thinking of using a switch statement over and if then else to shuffle through the different status codes. Are switch statements useful in apex or are they unnecessary extra work?
Comment: It depends what are you going to implement. If you send email to dev it would be enough to send what I wrote above and maybe some additional information about request, like parameters. You may add this if something went wrong. Successful requests are not needed to be emailed, it's overhead.

Capturing HttpResponse StatusCodes


What documentation is needed for receiving gifts, and how many may you receive per year in the US?

Question: I have recieved a 10k gift from a family friend, and another 9k from a different family friend all for a car. When it comes to tax season, do I need to claim anything on these gifts? And do the donors need to file anything, since both of the amounts are under the allowed tax free 14k limit, what is necessary so I do not get audited?
Comment: Gift taxes, if applicable, would apply to the donor, not the recipient. (I'd also add that unless you are trying to cheat on your taxes, an audit is as likely to find something in your favor as something against you, and for an individual it's usually pretty straightforward; it's a nuisance, not something to be especially afraid of.)
Comment: Was the gift a check or cash? does either friend run a business and did you do anything to help your friend?
Answer: Neither you nor the donors need to file any tax returns on the matter. Keep the paper trail to show in case of an audit.


What would be the disadvantage of creating an array of really big size on 64 bit systems?

Question: Operating systems like Linux work on the principle of Copy-on-write, so even if you are allocating an array of say 100 GB, but only use upto 10GB, you would only be using 10 GB of memory. So, what would be the disadvantage of creating such a big array? I can see an advantage though, which is that you won't have to worry about using a dynamic array, which would have the cost of reallocations.
Comment: This would require a very big page table, which has limits in most OSs
Comment: Unless you really need 100GB of continuous memory for a single purpose you will need some way to manage that memory. That is, an allocator.
Comment: @pythonic - copy-on-write has nothing to do with the behavior here. Copy on write means that some page is mapped into your process, with read bit set and write bit unset, and the entire contents are copied if you write. It is used, for example, for CoW file mappings and fork and so on. What you are referring to is lazy page allocation. It doesn't involve a copy and the pages aren't mapped in at all. Only a VMA is set up and then when you access the page, you get a page fault and the kernel maps in a new zeroed page.
Comment: I'm not sure copy-on-write is relevant to your ability to allocate 100GB.
Comment: Possible disadvantage: getting OOM-killed without being able to debug the cause?
Comment: Why not? Basically when you are allocating 100 GB, you are only occupying an adress space, which is plenty on a 64 bit system. Copy-on-write means you are not actually using the memory until you touch it.
Comment: So you used a clever trick to save yourself dynamic allocation overhead by relying on the OS to do dynamic allocation?
Comment: No, I'm just asking from a theoretical perspective.
Comment: @pythonic: "Why not?" Because that's just not how real Linuxes work. They usually *overcommit*, and the allocation only results in a new page mapping being created *when you access it*. (It's at that *time of access* that COW becomes relevant.)
Comment: Sorry but the memory allocation is not done in RAM? Basically you cannot allocate such an amount of memory for the array. Or am I wrong?
Comment: Another problem (not mentioned yet by answers) is that you reduce your ability to detect bugs (e.g. dodgy pointers and bad array indexes) because there's a higher chance that they'll hit the huge array instead of causing a `SIGSEGV`.
Comment: Another problem (also not mentioned) is that you can't really free the pages after they allocated if they're no longer being used. This means that for some cases you might only be using a fraction of the huge array at a time, but because it's a different fraction at different times you end up leaking memory everywhere.
Comment: Finally; despite these problems the idea can work in limited circumstances. I use "sparse arrays" (as I like to call them) heavily in a micro-kernel; where I can control overcommit behaviour and (when memory is needed elsewhere) can scan the array/s for "allocated but no longer in actual use" pages and free them.
Answer: The main disadvantage is that by doing this you are making a strong assumption about how exactly the standard library allocators1 and the underlying Linux allocators work. In fact, the allocators and underlying system do not always work as you mention.
Now, you mentioned "copy on write", but what you are likely really referring to is the combination of lazy page population and overcommit. Depending on the configuration, it means that any memory you allocate but don't touch may not count against memory limits and may not occupy physical memory.
The problem is that this often may not work. For example:

Many allocators have modes where they touch the allocated memory, e.g., in debug mode to fill it out with a known pattern to help diagnose references to uninitialized memory. Most allocators touch at least a few bytes before your allocated region to store metadata that can be used on deallocation. So you are making a strong assumption about allocator behavior that is likely to break.
The Linux overcommit behavior is totally configurable. In practice many server-side Linux users will disable it in order to reduce uncertainty and unrecoverable problems related to the OOM killer. So your claim that Linux behaves lazily is only true in for some overcommit configuration and false for others.
You might assume that memory is being committed in 4K chunks and adjust your algorithm around that. However, systems have different page sizes: 16K and 64K are not uncommon as base page sizes, and x86 Linux systems by default have transparent huge pages enabled, so you may actually be getting 2,048K pages without realizing it! In this case you may end up committing nearly the entire array, depending on your access pattern.
As mentioned in the comments, the "failure mode" for this type of use is pretty poor. You think you'll only use a small portion of the array, but if you do end up using more than the system can handle, at best you may get a signal to your application on some random access to a new page, but more like the oom killer will just kill some other random process on your machine.

1 Here I'm assuming you are using something like malloc or new to allocate the array, since you didn't mention mmaping it directly or anything.
Comment: No, you didn't.
Answer: Real-world operating systems don't simply allow your program to access all memory available - they enforce quotas.   So a 64-bit operating system, running on hardware with enough physical memory, will simply refuse to allocate all that memory to any program.    This is even more true if your operating system is virtualised (e.g. some hypervisor hosts two or more operating systems on the same physical platform - the hypervisor enforces quotas for each hosted operating system, and one of them will enforce quotas for your program).
Attempting to allocate a large amount of memory is therefore, practically, an effective way to maximise likelihood that the operating system will not allow your program the memory it needs.
While, yes, it is possible for an administrator to increase quotas, that has consequences as well.     If you don't have administrative access, you need to convince an administrator to increase those quotas (which isn't necessarily easy unless your machine only has one user).   A program that consumes a large amount of memory can cause other programs to be starved of memory - which becomes a problem if those other programs are needed by yourself or other people.   In extreme cases, your program can starve the operating system itself of resources, which causes it and all programs it hosts to slow down, and compromises system stability.    These sort of concerns are why systems enforce quotas in the first place - often by default.
There are also problems that can arise because operating systems can be configured to over-commit.  Loosely speaking, this means that when a program requests memory, the operating system tells the program the allocation has succeeded, even if the operating system hasn't allocated it.  Subsequently, when the program USES that memory (typically, writes data to it), the operating system is suddenly required to ACTUALLY make the memory available.    If the operating system cannot do this for any reason, that becomes a problem for the program (which believes it has access to memory, but the operating system prevents access).   This typically results in some error condition affecting program execution (and often results in program termination).   While the problems associated with over-committing can affect any program, the odds are markedly increased when the program allocates larges amount of memory.
Comment: To be fair, the user isn't asking why it's bad to _use_ a large amount of memory, but whether the strategy of allocating but not using (hence not populating the pages) is reasonable. Most of the reasons above don't apply to that case, since the process isn't using any more physical memory or mapped virtual pages versus the alternative that allocates more sparsely. In particular the usual `ulimit` settings aren't going to kick in here, only `ulimit -v` will work and it is quite problematic since it doesn't count the right thing.
Comment: .... except that allocating a 100GB array and only using 10GB of it (which the OP did ask about) would still commit the 100GB.   The OP did not ask about sparse allocation, only sparse usage (using 1 part in 10) of a block allocated by the program.
Comment: In general, on Linux, it does not commit the 100 GB. Pages are committed one-by-one (or possibly in small groups with fault-around for a file mapping) on first access. That's the trick that allows you to allocate an array much bigger than your physical memory plus swap as long as you don't access much of it.


Deb packages on MacOS

Question: I've been trying to run steam, and more specifically Saints Row 3 on my MacBook air, to no avail. I was wondering if there was a way to install Deb packages on Mac so I could run a Linux version of steam? Sort of like Wine.
Comment: What makes you think that hacking your system to run a game in Steam within Wine based on Debian packages is easier than fixing whatever problems you had with running the game within the macOS version of Steam?
Comment: If you want to run Linux, get a VM (e.g. VirtualBox) and proceed from there.
Comment: Booting into Linux will not turn the built-in graphics into a GeForce GT 630 or Radeon HD 685 (which seems to be the minimum for the game) :-)
Comment: Saints Row is not officially supported on MacOS. This seemed like an easier way to go than finding a new computer.
Comment: I did try dual booting Ubuntu, but I had problems with the built-in graphics (Intel HD 4000 and opengl 4.1 apparently don't play nice.)
Comment: It might not run well, but I'm hoping it'll at least work
Answer: You can't install/run Debian packages natively, the kernel and a lot of required data structures are vastly different. Usually people who want to run Linux code

set up a VM and install Linux within in. VirtualBox is a (good) cost-free solution here, there are also Parallels and VMware which offer more features but aren't free
install Linux in a second partition and dual-boot either Linux or macOS. Install instructions depend on Mac hardware, macOS version and Linux distribution.

Neither way will compensate for underpowered hardware though (the graphics to run the game in your case).
Comment: While not the answer I was looking for, I suppose you're not wrong. Thanks for the help.

Deb packages on MacOS


How should I integrate Bitcoin payments in an online service?

Question: I am implementing a website where some users can create surveys and pay the people that complete them with bitcoins. What steps should I follow to implement this payment system? Like, information needed from each party, steps to take to confirm payment, etc.
Comment: If you need some consulting on Bitcoin-related issues, you can contact me - ThePiachu-gmail-com . I will also try to answer your question soon, once I deal with some things.
Answer: Survey order:

You ought to have a system that uniquely identifies the survey and assigned it some string of characters. This can be just a simple number, or something more complex.
You need to use that unique id to request a Bitcoin address form bitcoind with a unique account name derived from that id. I would also advise hashing the account name, so in case your wallet gets compromised your customers' information won't get leaked.
You will present that Bitcoin address to the survey owner to send their Bitcoins to.
You should periodically check bitcoind for new transactions. In order to avoid double-spends, you should wait until you get at least 1 confirmation (preferably 6) on the transaction before letting the survey go live.

Survey is live:

You need to have a system that uniquely identifies the users filling out the survey, so they won't do the same survey twice.
Each user will need to provide their withdraw address (and you should check whether it is okay)
You should track who fills out a particular survey and keep a log of their addresses. This way you would be able to make a single payment to all of them at the end of the day, rather than make an individual payment to each person. This would save you money on transaction fees.
You can either make payments from the account unique to the survey, or move all the money into a single payout account and send payments from there. The latter would make the user receive only one payment, rather than be spammed with many. And again, this would lower your transaction fees.
You need to keep track of how much money is left for each survey and when to switch it off. You can either do that internally, or through appropriate balances in bitcoind (moving money from the account each time someone completes the survey).

These should be the basics. As always, keep your wallet secure, password protected and backed up. In case you have any more questions, you can always ask them on this StackExchange. If you need consulting, you can contact me (ThePiachu-gmail-com).
Answer: I used on client website open source Bitcoin Payment Libriary (php/mysql) -
https://github.com/cryptoapi/Payment-Gateway


When an intersection is contained in a minimal prime ideal

Question: For a commutative ring $R$ with identity, it is well known that if a finite intersection of ideals is contained in a prime ideal $\frak{p}$, then one of them is contained in $\frak{p}$. I am looking for an equivalent condition on $R$ under which if an arbitrary intersection of ideal is contained in a minimal prime ideal $\frak{p}$, then one of them is contained in $\frak{p}$. Or is there any research paper related to that?
Comment: For the types of commutative rings that arise most often in algebraic geometry, this will almost never be true.  I guess that it is trivially true for an Artinian local ring, but that is the only "natural" example that I can see.
Comment: Just some food for thought, imagine I'm working on ${\mathbb A}^n_{\mathbb C}$ and I choose some curve.  Consider the maximal ideals $\mathfrak{m}$ corresponding to the closed points of that curve.  Their intersection is the prime ideal $P$ corresponding to the curve itself, but obviously no $\mathfrak{m}$ is contained in $P$.
Answer: I would extend Jason's comment to say that this condition trivially holds in any Artinian ring since in those rings every intersection of ideals is a finite intersection. It seems that indeed this is the only case.
Let $R$ be an arbitrary noetherian ring and $\mathfrak m$ an arbitrary maximal ideal in $R$. If $R$ is not an integral domain, let $\mathfrak p\subset R$ be a minimal prime ideal contained in $\mathfrak m$ and let $A:=R/\mathfrak p$.
Clearly $A$ is an integral domain and $\overline{\mathfrak m}:=\mathfrak m/\mathfrak p$ is a maximal ideal in $A$. By the Krull intersection theorem $\cap_n \overline{\mathfrak m}^n=0$.
It follows that then $\cap_n\mathfrak m^n\subseteq \mathfrak p$ in $R$. If $R$ satisfied the desired condition, then this would imply that  $\mathfrak m^n\subseteq \mathfrak p$ for some fixed $n\in \mathbb N$. But then $\mathfrak m= \mathfrak p$ is both maximal and minimal. This is true for every maximal ideal, so $\dim R=0$ and hence $R$ is Artinian.
I leave it for you to decide about the non-noetherian case.
Answer: Let us say that an ideal $I\leq R$ has property $(\ast)$, by way of definition, if whenever an intersection of ideals is contained in $I$ then one of the ideals in the intersection is contained in $I$.
Lemma:  Let $R$ be a commutative ring with $1.$  Let $P\leq R$ be a prime ideal.  If $P$ satisfies $(\ast)$ then $P$ is a maximal ideal.
Proof.  Assume $P$ satisfies $(\ast)$.  After replacing $R$ by $R/P,$ we may as well assume $P=0.$
Let $L$ be the intersection of all the non-zero ideals of $R.$  Since $(0)$ satisfies $(\ast),$ we see that $L\neq (0).$  Such an ideal is called a little ideal.  It exists if and only if a ring is subdirectly irreducible.  In particular, since $R$ is a domain it must be a field (by Proposition 12.4 in Lam's "A First Course in  Noncommutative Rings").  QED
So, a ring satisfying your condition must always have Krull dimension $0$.  I'm sure your condition has been studied in the literature, but I'm not sufficiently familiar with the commutative algebra literature to find it quickly.


How to control the position of an IK bone using another object

Question: I have a character who needs to open a cupboard. The simplest way to do that seems to be to add a ChildOf constraint to his hand controller, link it to an Empty which is parented to the cupboard and positioned at the same place as the doorknob, and then animate the door's rotation..... except that when I do this, the whole rig moves. (It's quite funny, but not what I want.) How do I have the empty affect only the position of the hand controller?
Answer: Doh. I was using an object constraint (which was causing the whole object - ie, the rig - to move) rather than a (second) bone constraint. Which I needed because it's, you know, a bone.
As you were...
Comment: Well, glad you found out by yourself!  Don't forget to key down your bone's transforms before and after keying down the ChildOF constraint influence, it might save you from some headaches down the line.


How can I show my games in Xbox Games list?

Question: AFAIK, steam adds games to installed programs list when installed, which allows me to add them to my Xbox Games list (and record etc. without stutter etc.), but my Windows 10 install wiped my system (I had backup of games) and I got it back, but as it isn't installed on this installation of Windows, it doesn't see it, how can I get them to display on programs list, allowing me to mark it as a game.
Comment: Did you backup the games through Steam or just manually? If you did it through Steam, try using the built-in _Restore Backup_ function.
Comment: @Svj0hn I actually had my games in B (it is like my D drive), and when Windows reset C (i picked upgrade and it wiped only C :/), and not B, so I just binded it. ezpzls.
Answer: Steam (and possibly other similar clients)
You should be able to move your games to the proper location ("SteamLibrary\steamapps\common\ [Game Name]" usually) and installing them again from Steam.
Normally, in this case, Steam will recognize that the files are already present and won't download them again. Instead it will run some small verification routine.
"Loose games"
If you have games that weren't installed through Steam, try running once and see if they show up, but most likely you'll need to install them again.
Comment: Yeah... no. http://imgur.com/zSLCw4E I hope it fixes itself, if it ends up working, I'll gild yo-- set this as answer. Thanks anyways.
Comment: It actually didn't recognise it.
Comment: Make sure it's in the exact right path for the library that you specify it to be installed in. Have a look at [this question](http://gaming.stackexchange.com/questions/158045/get-steam-to-realize-i-have-games-already-installed) for a similar issue.
Comment: it is in the same library :/ And I have a comment on that, lol.


What woodwind instruments have easier embouchure?

Question: I've been stuggling playing the trumpet because of the lip position. Do woodwind instruments have less pressure on the lips or have easier embouchure compared to brass?
If you had to rank the difficulty for the embouchure, what would it be?
Comment: I see many answers that share different opinions, but nothing fully answers the question because it is too broad.  Can you clarify what you mean?  Which instrument has the easiest embouchure TO START as a beginner trying to produce a tone?  Which has the least pressure on the lips?  Rank the difficulty of embouchure of players at a professional level?
Comment: I would like to know what is easy for beginners! I played percussion for 3 years and tried trumpet for around a bit more than half a year. I am still struggling to make a good sound due to the pressure on the lips/hard embouchure. I was thinking of trying out woodwinds.
Comment: Hi! I thought I'd explain my vote to close. We discourage questions to which the answer is a simple list, [for a number of reasons](https://music.meta.stackexchange.com/q/161/78419). I suggest editing to focus more on what you're really looking for. Maybe tell a bit more about exactly what about trumpet embouchure gives you trouble, and ask about how you can either overcome it, or how you can pick another instrument based on this issue.
Answer: It depends on how you define 'easier', but if you are having problems with the trumpet you might have more success with a woodwind instrument.
In terms of physical effort and pressure on the lips the flute is easiest, although it can take a long time to get a good sound.
Bassoon and the larger saxophones have a mostly relaxed embouchure, clarinet and the smaller saxophones rather less relaxed.
If you are having trouble with the trumpet, you certainly won't want to start on oboe, probably the most difficult of the woodwinds.
Comment: For me the answer is definitely bassoon, and definitely not flute. Flute is the only instrument to make me want to cry with frustration.
Comment: I'm sceptical concerning the ranking of bassoon, which I would have placed as a bit easier than oboe. I consider *mostly relaxed* as misleading, even if admitting that it varies significantly between the different registers.
Comment: @guidot My experience was that air and flick keys are the challenges on the bassoon in the upper register. Either way the bassoon embouchure is more relaxed everywhere than clarinet is everywhere. Oboe I never really was able to play very high. Nor flute.
Comment: All I remember of our saxomophonist is waiting a half an hour for them to get their reed wet. Maybe try the recorder.
Answer: The difference between a brass instrument and a woodwind is that on a brass instrument the lips themselves need to create the pitch (so in some sense the lips are part of the instrument). This is not the case with woodwinds. Woodwinds have some sort of mouthpiece that creates the sound, with the pitch depending on the tube.
This does of course not mean that embouchure does not matter. On a woodwind you need to use embouchure to control the mouthpiece. The probably most easy instrument with regards to embouchure is the recorder. The recorder and capped reed instruments do have the least requirements on embouchure, as you do not have direct contact to the element creating the sound. Traverse flute is more special, as you need to direct the air properly. Uncapped reed instruments will require you to control the vibration of the reed using your embouchure. Generally single reed instruments are less demanding in terms of embouchure.
Another aspect is the resistance of the instrument, so how much force you need to blow the air through. This depends very much on the type of mouthpiece. The recorder is easy to blow, the traverso does not even have this problem. But with reed instruments the reed will partially close the mouthpiece, increasing the pressure necessary to get the air flowing. Especially on the Oboe you'll blow the air through a very thin tube and a very narrow reed, which means it is relatively hard to push air through (on the other hand this means you need very little air to operate the instrument. But this then also depends on the mouthpiece and on the reed. You might find that two different reeds feel completely different.
So you see there is multiple things that go into how hard an instrument is to blow, which makes it hard to give a definite ranking. Each wind instrument will have very specific demands to embouchure, and this differs vastly between woodwinds and brass. So if your problem with trumpet is maintaining specific pitches then no woodwind would have that issue. If your issue is that you do not have enough strength in your lips you'd probably prefer a flute. If you do have strength but lack the control to properly coordinate them a flute would not be the best idea, rather you might go for a clarinet or a saxophone.
But then the problem might come from a different source. Often beginners will use much more force than what is necessary, and maybe your struggle is that you do not need as much force as you think you do.
Comment: "if your problem with trumpet is maintaining specific pitches then no woodwind would have that issue." I'm assuming I don't understand what you're trying to say here because what I think you're trying to say is not in any way correct from my experience.  All of the woodwinds have pitches that are difficult to maintain. They also all have easier pitches.
Comment: @ToddWilcox From my experience the hard notes on woodwinds are not hard to maintain, but hard to get sounding in the first place. But my point is that while on a brass instrument you need to maintain a specific pitch with your embouchure, on woodwinds you do not. It is not intended to mean: All notes are easy on a woodwind.
Comment: I think I still don't understand. "Maintain a specific pitch with your embouchure" has two interpretations I can think of. One is required on both woodwinds and brass, and the other is required on neither. Perhaps you mean that on brass, unlike woodwinds, one's lips are actually opening and closing at the fundamental frequency of the note? If that's what you mean, of course it's true but doesn't relate to the difficulty either way, as far as I can tell. The resonance of the instrument does a lot of the work of making the lips open and close on brass ("slotting").
Answer: Clarinet is generally reckoned to be the 'easiest' wind instrument to get started on. (Unless you include recorder, melodica, harmonica etc. of course.)
But whatever problems you're having with trumpet, pressure should be among them.  The idea is to NOT press hard...
Comment: Oh I disagree. I mean, it's small and portable and the fingering is easier than oboe or bassoon, but the embouchure is hardest of all of them except maybe flute. Bassoon was easiest for me in terms of embouchure but even plastic student bassoons are very expensive, heavy, and unwieldy. Also bassoon fingering is a bit out there. But the question is specifically about embouchure and clarinet cannot be the easiest embouchure.
Comment: Recorder is easier to start on than clarinet, I think.
Answer: Embouchure only, easiest to hardest:

Bassoon
Low saxophones
Flute low register
Alto sax and clarinet low register maybe tied
Oboe low register
Higher saxes and higher registers on saxes
Flute higher registers
Oboe higher registers
Clarinet higher registers

However, fingering difficulty is another matter - easiest to hardest:

Flute
Saxophones
Clarinet
Bassoon
Oboe

Overall I found bassoon easiest to play despite fingering and oboe hardest, without any doubt.
All woodwinds are easier for me than trumpet or French horn. I can't compare with trombone, euphonium, or tuba. I do think you'll find that any woodwind except perhaps the flute is less frustrating in terms of embouchure than trumpet. I felt like the trumpet was trying to kill me. For air pressure demands, I don't think you'll find the oboe to be more relaxing than trumpet. Bassoon if you have money and space to carry and store something large, clarinet if you don't mind horrible squeaks for the first 12-24 months. Flute if you've never gotten lightheaded from hyperventilating. Saxophone if you love rock or jazz.
But the best thing to do would be to rent each one for a month and try them out.
Comment: Recorder is a woodwind.
Comment: @DarrelHoffman Actually, better-quality plastic recorders, like the Yamaha 300 series, are better than a lot of the low-end wooden recorders out there. I totally agree about the junk that little kids get, though.
Comment: @BrianTHOMAS Yeah, my first thought as well, and it's by *far* the easiest in terms of  embouchure.  There's a reason they give them out to preschoolers as a sort of "my first instrument".  It takes basically no effort to make a sound out of them, though fingering requires some skill.  You might want to spring for a quality wooden one rather than the plastic junk they give to little kids though.  It's not *that* expensive to get one that's out of the "trash" range.
Comment: I find bassoon fingerings a lot harder than the other woodwinds, especially in the higher register. Other woodwinds have been improved over the years by designers such as Boehm and Triebert to make their fingering systems simpler and more rational, but bassoon, for whatever reason, has not seen as much improvement, so its fingerings are IMHO more difficult. C#, I'm looking at you...
Comment: @Dalbergia I agree, for me oboe fingers are just slightly more confusing and challenging. I mean **two** octave keys?