Does the era of the music decide if a question fits here or on Music Fans SE?

Question: I think Why did Shostakovich not release his 4th, but did release his 5th symphony? is a question for Music Fans. Some people do think it's a good fit here. I think this is equivalent to "Why didn't Some Band ever release the songs intended for the record Watchamacallit", which would be shot down in flames here. What is the difference, except the age of the music.
Comment: I think there is always going to be a little bit of a grey area between MusicFans.SE and Music.SE. A very simple way to work out where a question would best be asked could be this: is the question simply asking for facts? (Eg. what year was this album released?) Yes - put it on MusicFans. Is the question asking for information which gives a greater understanding of the music or its context? (Eg. Has the rise of mp3 usage reversed the stylistic developments allowed by the use of the LP record?) Yes - put it on Music.SE.
Comment: @PatMuchmore: For clarity, I did not vote to close but just said in a comment that the question would be better suited for Music Fans SE. Some people seemed to disagree, hence this question. I am convinced that a similar question about more modern music would be closed post haste.
Comment: I'd happily see similar questions about much more recent music; I don't think the era of music should be a concern. The Shostakovich question hints at a deeper, more interesting, aspect of cultural and social history. Many, many aspects of recent music history could elicit similar questions.
Comment: As one of the people that commented on and was interested in the Shostakovich question, I just wanted to say that my interest in that question does not constitute a *lack* of interest in questions about rock or pop or hip-hop or anything else. It's just that I'm not as equipped to answer those questions. I would never vote to close something just because it's about something "non-classical".
Comment: Yeah, I suspect you're right. I'm all but totally on the sidelines in this particular debate. I just like answering questions if I know the answer or have something to add, regardless of which forum it should be on.
Answer: We are, in fact, in very interesting territory here. There is a good argument for suggesting that a historical question like this is better suited to the proposed Music Fans site. But musical analysis and musicology are not restricted to the score (or recording); they don't take place in a vacuum. It is perfectly valid, and in many respects desirable, for analysis of a piece of music to be informed (and enhanced!) by a historical and/or sociological perspective.
However, it is true that music from different eras and traditions does lend itself more readily to different analytical and musicological approaches. "Classical" music (or "composed" or "art" music) is readily analysed by means of the written score; popular and folk musics often make greater use of related "extra-musical" information when analysed.
But I would point out that any kind of music is open to different analytical approaches: popular music can be analysed using the "notes-on-the-page" (even if this is the result of transcription); "classical" music can be analysed taking into account a historical/sociological perspective. Crucially, I would say that whatever the analytical or musicological approach, all eras and traditions of music are equally valid, and should be treated as such on this site. All existing music is part of music history.
This does, though, require the Music.SE community to judge as a whole which questions and answers genuinely explore an interesting aspect of a piece of music. I don't think specific eras, types of music, artists or composers can be used to judge what is on or off topic.
Comment: I agree, in particular with your last paragraph.  This is an area where it seems best to take questions one at a time and let the line remain a little fuzzy so that a hard rule doesn't filter the good along with the bad.
Comment: A summary (caricature?) of this logic is that "interesting/useful/significant" questions are on-topic, but "uninteresting/non-useful/insignificant questions belong on Music Fans" -- This might be OK, but it has draw backs in terms of it being harder to provide objective, albeit approximate, guidance on where the line is.
Comment: @Dave, that's not a caricature, it's a fair comment. You've picked up on the one main concern I had with my own post (and comments). I decided to leave it "as is" though, to see how it contributed to the ongoing debate about where musicological questions should be posted. I would point out though, that factual information need not be inferior; to many users it may seem *more* useful/interesting/significant. I realise, though, that my wording may suggest otherwise, but I'll leave it that way...
Comment: I may have been a bit verbose on this page; my main point, from my answer and various comments is **"all eras and traditions of music are equally valid, and should be treated as such on this site. All existing music is part of music history."** Personally, I'm happy for both factual and analytical questions and answers to appear on *either* site...
Answer: I would say again what I said on my comment: I think a question like "Concerning Beethoven's 9th ..." would fit here, but a question like "Who is Justin Bieber referring to in 'Baby'?" would not.
Like you, I'm not 100% sure what eras are being concerned in Music History, but I believe that musicians that actually changed the music as people then knew it, can be considered on topic on the history.
Comment: Every conceivable question about Beethoven's 9th can't possibly be about musical practice and performance. It is also possible to pose a question about J. Bieber's songs that fits the scope here perfectly. It is quite clear to me that music from long dead dudes in wigs is considered Very Important here, and almost any question about it will do. This is one of those cases.
Comment: Yes, it's not about what the music is; it's about whether something interesting is being asked about it… From this point of view, I kind of agree with both Shev and MU...
Answer: Era should not be a factor when trying to decide if a question is on or off topic. Content should be as is with everything else on the site.
I think the bigger problem is there has not really been a lot of history questions asked on the site so what is on or off topic in this area seems to be somewhat unknown. For example, looking though the 71 history tagged questions we have I found this question "Vivaldi's "The Four Seasons", Who Chose the Title?" which while historical seems more fitting on a fan site then here and in my opinion probably should have been closed. I also found another question which is more about modern music "What is the history of considering Rock 'n' Roll to be "the Devil's music"?" which seems right at home here in my opinion.
I think in general we should discuss what qualifies as a history here especial when the fan site goes into beta, but I don't think we should judge based on era.
Answer: Just a suggestion: Perhaps a line can be drawn between "Songs" and "Works"/"Opus".
Rebecca Black - Friday is a clearly just a song.
Shostakovich - Opus 43, 4th Symphony is a work.
Given that Rebecca Black up until this point, is not referring to her songs as, Opus 13 - Friday, this is probably a pretty decent line to draw in the sand.
Comment: This seems excessive.  You would exclude virtually everything except modern orchestral music, basically?  On what basis?
Comment: At least in the scope of Music History questions. Tis alright though; by the looks of my vote count; this suggesting is not going anywhere. Difficult to answer.


Is FaceTime available on iPad?

Question: I'm trying to decide if I want to buy an ipad.  My question is, Will I be able to connect with family members who have iPhones on FaceTime if I have an iPad ?
Answer: Yes, the iPad also comes with the Facetime app, except not if you buy it in Saudi Arabia or the UAE, and if you buy it in China the audio will not work.
I think Skype works everywhere, and I have sometimes found it more reliable than facetime, but others have the opposite experience.
Comment: as long as you have sufficient bandwidth (EG WiFi, preferably) or solid LTE connectivity. If you go down to 3G or have spotty coverage Facetime may cut out or even refuse to work.
Comment: Are you saying Skype is most of the time less reliable and more subject to freezes? What does that have to do with FaceTime with iPhone users?
Comment: IMO. FaceTime works a lot better than Skype. I've noticed FaceTime working even under 2G connectivity while Skype couldn't even connect.

Is FaceTime available on iPad?


What does preliminary degree overview mean?

Question: I am reviewing the documents needed for a graduate program application. One of the documents is degree certificate. But for those who have not yet received it, it is stated that they can upload preliminary degree overview instead. What exactly is preliminary degree overview?
Answer: When applications for graduate programs are due, often the applicant does not have the degree qualifying for the graduate degree already in their pocket.
However, there is often the possibility to get an official document that shows the achievements of the student until the issuing date of the document. The "preliminary degree overview" is one name for this, while "transcript" is another (probably more common) one.
For applications, this document needs to show grades and courses that you took. An official letter stating for how long you have been studying will almost surely not do.


Can one reply to a question in the form of a tutorial?

Question: Sometimes it seems the most appropriate reply to a question is to provide a tutorial.
Is that appropriate or should one write the tutorial elsewhere? For example one could write the tutorial on a blog and provide a link to it. Is that the better option?
Answer: One of the aims of the site is to be the place for answers to all questions relating to photography and photographic editing. With that in mind, it would normally be better to outline the steps required in your answer, rather than linking to an external site.
As an aside, it's easier to spot a good answer that deserves being upvoted if it doesn't require a click through to an external site.
Comment: I should add that you shouldn't copy and paste other websites without their permission. By all means, summarise in your own words though.
Answer: I don't see anything wrong with a tutorial-style answer, assuming that it answers the question at hand.  If you were to link off the site, I think that you should, at minimum, provide a summarized version with the link.  Like Rowland said though, if possible, putting it all on this site would be preferred, simply because it makes it easier for others to find the answer, and also, it avoids dead-link problems in the future.
Answer: I'm skeptical personally. A unique and core value I see in sites like this one is summarization. I don't think it's necessary to import external content in bulk, and there's value in short, understandable summaries which point to the external content, whether it's created by the answerer him/herself or someone else, rather than the external content in full.
Comment: I tend to agree with this answer. A long, tutorial style reply tends to obscure the other answers, or even discourage others from adding their own answers. One of the strengths of this site is the diversity of replies that one sees. Your point about summarization is powerful. It allows one to quickly survey the replies/comments and then, by clicking through, to read the chosen answer in detail. So my belief is that tutorials are useful, powerful and in many cases advisable, but they should be kept somewhere else, for example that persons blog.
Answer: To directly answer your question about "tutorial-style answers", I've done something similar, although not exactly like this, myself:
How do I generate high quality prints with an ink jet printer?
The general M.O. at StackExchange is to present a question that can be answered. I don't think there is any problem with a tutorial-style answer, so long as it is in response to a valid, viable, useful question. I would encourage you to pose your own questions and offer tutorial-style answers if you think they can be useful building blocks for our community.
Even if you don't need to ask a question yourself, there may be others who DO need to, or would like to and aren't able to figure out how to properly ask it. By both asking and answering questions yourself that you have a good answer to can help build up our community. Search engines will eventually pick up the content of your question and answer(s), allowing those who search for similar content to find the helpful content you provide.


Combination of rotation around fixed point and waves

Question: I am new to Blender (downloaded it this week) and I am currently modeling a very basic wave energy converter. It is supposed to move up and down with the waves and pivot around a rigid connection point. I have manually done this using keyframes to provide an idea of what I am looking for and attached it below. I was wondering if there is a way to do this automatically though so that I can play around with wave size, height, direction, etc. without having to worry about manually adjusting keyframes every couple of frames. When using copy location the object moves up and down on the y-axis (shown below) and I can't figure out to fix the pivot point. Also, when using that method the object doesn't seem to be following the waves very well so if there are any recommendations for that it would be appreciated. Thank you!
Answer: The idea is already the right one - you just need to break it down furter.
There are 3 different objects here:

The float, getting pushed up and down by the waves (copy location)
A fixed anchor
A connector, pointing from the anchor towards the float (locked track)

We can sample the position the float will have by creating some empties. These get projected (shrinkwrap modifier, project, align to normal ) on to the waves. A single one will do, but averaging over multiple ones makes everything smoother. While doing so we can also copy their direction to make it "follow" the slope of the waves.
The connecting rod needs to have its origin in the pivot point of the anchor. (move 3d cursor to pivot, origin to cursor)
Given that the float has its origin in the center, it's just a matter of finding the right axis in the "locked track"-modifier.

This isn't a physically correct setup, but it is easy to set up and doesn't require any simulations.
Comment: Would this still be possible if the connector is rigidly connected to the floating part? I have edited the original post and attached a picture of the Solidworks model this is based on to help visualize what I mean. Thank you! @IsmirEgal
Comment: Sure - if you model it as one solid piece, you only need "locked track"-Constraints on it to point at the empties. (And to make sure the origin is still on the pivot point on the right)
Comment: After doing that the locked track command is taking the wrong path. It essentially has the top of the float following the empty instead of the bottom. Therefore, the float is submerged. I have edited the original post with a picture to illustrate. I am sure at this point it is an easy fix but as of yet, I have been unable to figure it out. Thank you! @IsmirEgal
Comment: You can rotate the model in edit mode around the y (or x) axis untill the part sits at the right height. The center of this rotation has to be in the origin (where our joint would be), so you need to set the "transform pivot point" - which can be found in the center of the header - to "3d cursor"


How to intercept motionEvents and keyEvents that are generated by user interaction with the UI

Question: I've been trying to intercept motionEvents and keyEvents that are generated from the user interaction with the UI. So far I have explored these options:

dex injection (too complicated)
extended my activity class while intercepting the motionEvents using dispatchTouchEvent logging the event then passing it to super. dispatchTouchEvent(this will require extending all activity classes to my modified class and possibly restrict my application that already uses dispatchTouchEvent)
Using instrumentation to add listeners to the application(failed attempt, don't know if its possible)

Basically what I am trying to do is to implement an event recorder so by capturing motion and keyevents I can create a playback of the recording. One of the restrictions that I have is to be able to attach this recording to any android application therefore I need to minimize the recorders code mofication within the application itself for example I would like to add some jars then initialize them in the application like so:
<code>            public class Calculator extends Activity {

            public void onCreate(Bundle savedInstanceState) {

                initialize recorder here
            //application code
            }
            //calculator application code here
            }
</code>
Note: extending the activity class to a special class which has code that captures the events using dispatchTouchEvent then extending every other activity class from that special class is not a good idea because if the original activity has some code for dispatchTouchEvent then that function wont work in the extended special class.
Solutions from an OS perspective without changing OS code are also welcome(including c, c++)
Answer: You mentioned using event listeners, have you read this page?
http://developer.android.com/guide/topics/ui/ui-events.html


Moto X Pure Edition MetroPCS tethering

Question: Need help w Moto XPure Edition tethering on Metro. The plan I have came with tethering on there Phone but my Unlocked MXPE shows other devices connected but no internet connection. The lady at Metro says that because its not a metro phone but it is unlocked. Everything else worked but the tethering. What should I do? Do I need to root? Is there anyway to extract their Mobile hotspot app from my Metro phone and install on my Moto. I can't find it on the metro phone except on one of the screens and not the apps setting. Thanks Please help.
Rawfah
Answer: http://forum.xda-developers.com/moto-x-style/general/moto-x-pure-mvno-carrier-ting-vs-t3218182
One irritation with Ting was that tethering only worked on 3g. Which required manually setting the phone to 3g, after enabling the hotspot. You
MetroPCS in contrast does not allow tethering unless you purchase a metro branded phone.
I was able to work around the metro pcs tethering restriction by adding a "tether_dun_required=0" entry to the sqlite provider.settings file, and now it works perfect on LTE with the stock hotspot software.

Moto X Pure Edition MetroPCS tethering


Random String Chooser

Question: I was tasked with creating the class RandomStringChooser that prints the strings in the passed array in a random order, based on the for loop in the tester. If the number of iterations in the for loop is larger than the size of the array passed, then "NONE" should be returned. Look at the tester in the program for an example of how this is run.
I'm looking for feedback on code efficiency, neatness, and other nitpicks that can improve the look of my code. I'd very much like to kick bad habits to the curb.
import java.util.List;
import java.util.ArrayList;
import java.util.Random;

// Declare the RandomStringChooser class

public class RandomStringChooser {

    /** Declare any fields (instance variables) **/
    private ArrayList<String> wordArray;
    private Random r;

    /** Declare any constructors */
    public RandomStringChooser(String[] wordArray) {
        this.wordArray = convert(wordArray);
        this.r = new Random();
    }

    /**Convert array to arraylist**/
    private ArrayList<String> convert(String[] array) {
        ArrayList<String> arraylist = new ArrayList<String>();
        for(String string : array) {
            arraylist.add(string);
        }
        return arraylist;
    }

    /** Write the getNext method */
    public String getNext() {
        if(this.wordArray.size() != 0) {
            int index = r.nextInt(this.wordArray.size());
            String word = this.wordArray.get(index);
            if(word != null) {
                this.wordArray.remove(index);
                return word;
            }
            return "NONE";
        }
        return "NONE";
    }

    /** This is a main method for testing the class */
    public static void main(String[] args) {
        System.out.println("It should print the words in the array in a random order and then NONE twice");
        String[] wordArray = {"wheels", "on", "the", "bus"};
        RandomStringChooser sChooser = new RandomStringChooser(wordArray);
        //This loop will output the words in `wordArray` in random order, then "NONE" twice
        for (int k = 0; k < 6; k++) {
            System.out.println(sChooser.getNext() + " ");
        }
        //This loop will output the words in `wordArray` in random order, then stop
        for (int k = 0; k < 4; k++) {
            System.out.println(sChooser.getNext() + " ")
        }

     } // end of main

} // end of class

Comment: In the `k < 4` loop in `main()`, it will just print `NONE` four times.
Answer: Interface
When I see a method named get…(), I expect it to behave like a getter method: it should retrieve data, with no side-effects.  Your getNext(), though, has the side-effect of consuming one random element from the list.  Therefore, next() would be a more appropriate name than getNext().
Once you rename it, you'll see that your RandomStringChooser should probably just implement the Iterator<String> interface.  Java programmers instantly recognize an Iterator and know how one should behave.
Then, you'll see that the Iterator interface says that next() should throw NoSuchElementException when the elements have been exhausted — and that is what you should do too.  In fact, returning "NONE" as a special string to indicate a missing value is a bad practice.
Furthermore, if one of the input strings is in fact null, it shouldn't be the job of your RandomStringChooser to translate it to "NONE".
Consider changing the signature of the constructor to public RandomStringChooser(String... words).  The code will continue to work the same way, but you would also have the option of invoking it as new RandomStringChooser("wheels", "on", "the", "bus"), with multiple string arguments.
Efficiency
Whenever you extract a random element from the list, you call this.wordArray.remove(index).  Removing an element causes all of the subsequent elements to be copied over to fill the gap.  Therefore, if you randomly go through an n-element list, you will perform O(n2) copy operations, which is quite poor for efficiency.
A better idea would be to implement a Fisher-Yates shuffle, which just swaps one pair of elements per output string.
Miscellaneous
wordArray is poorly named: it's actually a java.util.List, not an array.
Your signposting comments are annoying noise to anyone who knows Java.
Suggested implementation
import java.util.Arrays;
import java.util.Iterator;
import java.util.NoSuchElementException;
import java.util.Random;

public class RandomStringChooser implements Iterator<String> {

    private Random r;
    private String[] words;
    private int n;

    public RandomStringChooser(String... words) {
        this.r = new Random();
        this.words = Arrays.copyOf(words, words.length);
        this.reset();
    }

    /**
     * Makes all words eligible to be chosen again, even if they have been
     * previously returned by next().
     */
    public void reset() {
        this.n = this.words.length;
    }

    public boolean hasNext() {
        return this.n > 0;
    }

    public String next() {
        if (!this.hasNext()) {
            throw new NoSuchElementException();
        }

        // Fisher-Yates shuffle
        int index = r.nextInt(this.n--);
        String word = this.words[index];
        this.words[index] = this.words[this.n];
        this.words[this.n] = word;
        return word;
    }

    /** This is a main method for testing the class */
    public static void main(String[] args) {
        System.out.println("It should print the words in the array in a random order and then NONE twice");
        RandomStringChooser sChooser = new RandomStringChooser(
            "wheels", "on", "the", "bus"
        );
        //This loop will output the words in `wordArray` in random order, then "NONE" twice
        for (int k = 0; k < 6; k++) {
            System.out.println(sChooser.hasNext() ? sChooser.next() : "NONE");
        }
        //This loop will output the words in `wordArray` in random order, then stop
        sChooser.reset();
        for (int k = 0; k < 4; k++) {
            System.out.println(sChooser.hasNext() ? sChooser.next() : "NONE");
        }
     }

}

Random String Chooser


for of loop that stops at last object of array

Question: I have a for of loop, for each item in the childElements HTMLCollection I want to subtract the height of the elements from the parent height.
let height = element[0].clientHeight;
const childElements = <[HTMLElement]>element[0].children;
let i = 0;
for (const childElement of childElements) {
    if (i !== childElements.length - 1) {
        height -= Math.ceil(childElement.clientHeight);
    }
    i++;
}
return height;

But I want to exclude the last HTMLElement in the collection from the for loop. I've now created a i variable that is checked against the length of the collection minus 1. If that's not the case the height of the element is subtracted and i is increased.
This works fine, but it feels like I'm doing two things (for of loop and while loop). Any suggestions?
Answer: It hit me,
function returnSuggestedColleaguesWithExpertiseHeight(): number {
    let height = element[0].clientHeight;
    const childElements = <[HTMLElement]>element[0].children;
    for (let i = 0; i < childElements.length - 1; i++) {
        height -= Math.ceil(childElements[i].clientHeight);
    }
    return height;
}


Is a 50mm lens suitable for product photography?

Question: I have a 50mm lens, and I am still a beginner.  Is this lens suitable for product photography, especially food?
Comment: Is it for a full-frame body or an APS-C one?
Comment: Any focal length is fine as long as you can get the framing you want in focus.
Comment: what is your camera? have you taken any pictures with your equipment yet? Could you post example image and add what you don't like about it?
Answer: If you have a specific style you're going for, link an image in your question and we could advise on lens selection. That being said, product photography more heavily relies on lighting and set up than anything else.
50mm should do you just fine to start. If you find yourself not getting the angle of view that you want for your shots, then we can start talking different lenses. Until then, use what you have.
Always let your skills outpace your gear, not the other way around.
Answer: Likely a 50mm lens will do the job. However you might appreciate some insight as to how focal length intertwines with format and the task at hand.
The fundamental focal length for any format (dimension of the image sensor or film) is a "normal" lens. Such a lens delivers what is said to be the "human perspective". Simply, a lens whose focal length is approximately the same as the corner-to-corner measure of the format delivers a "normal" perspective.
For the venerable full frame 35mm (FX) format, it measures 24mm height by 36mm length with a diagonal that measures 43mm = "normal" focal length. For the popular compact digital (DX), the frame measurements are 16mm height by 24mm length with a corner-to-corner measure of 30mm = "normal".
Mount a 43mm on an FX or a 30mm on a DX delivers "normal". The angles of view will be 53° diagonal and 45° horizontal. It is the diagonal angle of view that is most often quoted. Likely the same mentality that labels TV set size by their diagonal measure.
To be clear, this diagonal measure matched to focal length is not engraved in stone, it is common practice to round this value up for the FX to 50mm for convenience, and call this "normal".  This lash-up delivers 47°diagional 40° horizontal.
Now product photography is likely best served if the focal length chosen delivers a perspective that hovers around "normal". If the lens chosen is too short or too long, some perspective distortion will become apparent. However, most images are OK even if there is some distortion. If there is some distortion due to a mismatch of focal length, the product may be seen as peculiar in shape.
There are more elements to making a product appear natural. You might wish to pursue a study into photographic distortion control.
Anyway, the point is, what lens delivers a "normal" view is
intertwined with format size.
What format does your camera sport? What is the "normal" focal length for it?
Answer: 50mm tells you about the viewing angle of the camera.  It tells you neither about the preferred nor about the possible focusing distances and those highly influence the size of objects you can sensibly picture.
The typical 50mm full-frame prime lens offers a large aperture in order to get good subject separation for subjects the size of bridal pairs.  Most products will be significantly smaller than that unless you are selling cars.
For such a lens, the stipulation may be that if you are using F22 or smaller, you likely have an image with direct sunlight, meaning that aperture blades are formed in a manner where the diffraction delivers a pleasant "sun star".
In contrast, for a macro lens you have much smaller minimal focusing distances and small apertures are mostly there for depth of field reasons, so blades will be more rounded in order to avoid unnecessarily patterned diffraction.
It would be my guess that the problem with the 50mm lens will be mostly that it doesn't work all that well with small subjects.  You can extend focusing range with (typically achromatic, to avoid color seams) closeup lenses, but the results don't have the full geometric and image qualities one comes to expect from a single lens.
I've only now noticed that you stated "food photography" as your subject.  Assuming a 50mm camera on a full-frame camera with a sensor 36mm across, making a dessert bowl 18cm across fill the frame width will require a distance of 25cm (from the nodal point of the lens).  That's not a common focusing distance of a 50mm prime lens (unless, of course, it is a macro lens), so you may soon turn into the situation where you need closeup lenses to work with.  However, such distances are not common viewing distances either and have somewhat extreme perspective, so you'll end up either cropping from your full-frame photograph (and a good camera has a lot of leeway for cropping) or getting a longer lens eventually.
From a convenient distance of 1m, the scene width will be 72cm.  That's good for capturing a few set plates on a table or a rather large paella pan.  So it's unlikely you'll feel the need for wider focal lengths.
Now here is the point: you are a beginner.  You won't be shooting professional gigs for a long while.  Just get your experience with your current gear and figure out just where it will take you, and which subjects you are unsatisfied with because you just cannot take them in.  going from there, it will make sense thinking about what distances you want or need to cover.  Two tenners will buy you a full set of awful closeup lenses.  While you cannot make good photographs with them because of color fringing and corner unsharpness, you can write down which combination of them makes for which well-framed photographs in connection with your current equipment, in connection with what amount of cropping.
And that helps in deciding what other lenses and good closeup lenses (namely achromats) it might make sense to end up with eventually.
Just be prepared to experiment with making bad photographs until you figure out what you would want for good photographs in terms of magnification and distance.
Answer: 50 mm lens is a decent decision for subject photography too as its f/1.8 opening causes you to take photos even in low lighting. Now and then even a lightbox doesn't give enough light to splendid pictures, while f/1.8 aperture focuses around certain components keeping pointless ones obscured. This first-class product photography lens is furnished with Optical Steadyshot, which forestalls obscuring and ensures sharp pictures without a tripod. Because of a unique optical plan, the product photos are sharp and of high quality - with insignificant bending and chromatic abnormality.
Answer: It could be suitable and gives a very natural perspective. Sometimes this is what you want but this is an artistic choice primary.
What no one mentioned so far though is magnification. There are many 50mm lens and their exact field-of-view depends on the sensor-size but for food photography you need one of those lenses with a high magnification so that you can focus at close range.
So, a 50mm Macro lens would be more recommended. Some lenses can still give you a good magnification, say 0.5X, without being true macro lenses but would be  suitable too, depending on the size of the food items you are capturing. If you need closeup shots of leaves, cocoa beans, seeds, etc, a macro lens will better serve you.
Answer: I agree with all the previous answers. 50m lens is perfect for shooting food. Better with FF cameras, but also useful with APS-C (it is better long than short). Keep in mind that the depth of field is short with a FF and 50mm, so you have to use high F values.


A word for the level of disagreement/complaining that is socially acceptable?

Question: Say you are on a committee and you disagree with almost everything that the committee does. There is a certain level of dissent that you can get away with before people begin to ignore you and it stops being constructive. This "complaint quota" is what I'm trying to find a word for. If there is no word, what is another way to phrase this, specifically when you have "run out" of "complaint quota"?
Answer: Tipping point (sociology) — Wikipedia

In sociology, a tipping point is a point in time when a group—or a large number of group members—rapidly and dramatically changes its behavior by widely adopting a previously rare practice.
The phrase was first used in sociology by Morton Grodzins when he adopted the phrase from physics where it referred to the adding a small amount of weight to a balanced object until the additional weight caused the object to suddenly and completely topple, or tip. Grodzins studied integrating American neighborhoods in the early 1960s. He discovered that most of the white families remained in the neighborhood as long as the comparative number of black families remained very small. But, at a certain point, when "one too many" black families arrived, the remaining white families would move out en masse in a process known as white flight. He called that moment the "tipping point".

Journalists and academics have applied the phrase to dramatic changes in governments, such as during the Arab Spring.

Tipping point is not the only phrase from physics that has been in other fields as a metaphor for human behavior. Critical mass from nuclear physics is another.

From Malcolm Gladwell's "The Tipping Point"

The tipping point is that magic moment when an idea, trend, or social behavior crosses a threshold, tips, and spreads like wildfire.

From ODO

noun The point at which a series of small changes or incidents becomes significant enough to cause a larger, more important change.
"Brooding about this needless death, I reached the internal tipping point, where my guilt started to outweigh my pleasure."
Answer: Threshold — ODO

noun 2.2 The level at which one starts to feel or react to something
"Conditioned to expect immediate gratification, these youth have shorter attention spans and also a low threshold for boredom."
Answer: The final/last straw — Cambridge
(also the straw that breaks the camel's back)

the last in a series of unpleasant events that finally makes you feel that you cannot continue to accept a bad situation.
"Losing my job was bad enough, but being evicted was the final straw."
"She's always been rude to me, but it was the last straw when she started insulting my mother"


What happens when Mirror times out with Principal, but Principal does not timeout with Witness or Mirror?

Question: We have three SQL server 2008 r2 servers (principal, mirror and witness) setup for mirroring (with safety option).
I see in the Mirror server logs that there was a "The mirroring connection to TCP://PRINCIPAL:1234 has timed out" error for databaseA. However I do not see a similar error in the Principal server log. A failover did not occurr.
So from what I understand the Mirror was able to communicate with the Witness and but not the Principal.
The log entries after that in the Mirror server are:

Database mirroring is inactive for database 'databaseA'.
Starting up database 'databaseA'. Bypassing recovery for database 'databaseA'
because it is marked as a mirror database, which cannot be recovered.
Database mirroring is active with database 'databaseA' as the mirror
copy.

I do not see a timeout error in the Principal, but I do see these log entries at same time at the ones above:

Database mirroring is inactive for database 'databaseA'.
Database mirroring is active with database 'databaseA' as the principal copy.

Again, the database was never failed over (which is good because the Principal was up). My question is, Do the Witness somehow tell the Mirror that the Principal is up so that the Mirror does not fail over?
Answer: As I understand the internals of mirroring both the mirror and the witness would need to loose the connection to the principal for the failover to happen.


Power of a generator generates the group iff this power is coprime to the group order.

Question: Let $\langle g\rangle$ be a cyclic group of order $n$. Suppose $1\leq q \leq n-1$, I want to show that $g^q$ generates $\langle g\rangle$ if and only if $\gcd(n,q)=1$.
Suppose $g^q$ generates $\langle g\rangle$, then
$$
1,g^q,g^{2q},...,g^{(n-1)q}
$$
are all distinct and $g^{nq}=1$, since $n$ is the order of the group. Note that this is the lowest multiple of $q$ for which this is the case. Therefore $\operatorname{lcm}(q,n)=qn$ and it follows that $q$ and $n$ are coprime.
On the other hand, if $\gcd(q,n)=1$, then $\operatorname{lcm}(q,n)=qn$, we have $g^{nq}=1$ and hence all of
$$
1,g^q,g^{2q},...,g^{(n-1)q}
$$
are distinct again and $g^q$ is a generator.
Is my proof correct at all and is there maybe a more elegant argument?
Answer: Your proof seems correct to me.


What happens if your demesne is larger than the allowed size?

Question: What happens in CK2 if your demesne is larger than the allowed size, such as 6/4 or 6/3, over a large amount of time?
Answer: For each holding over your demesne limit you will suffer penalties:

Your vassals' opinion of you will drop (apparently by 10 for each holding over the limit; I experienced huge penalties myself after winning the crusade and conquering Jerusalem). I think that it takes 1/2 months before applying this penalty.
An income tax penalty (Wikia says -12.5% for each holding over the limit)
A bunch of bad events related to your holdings.

Remember that having a few more holdings is not always bad: you ensure that your vassals are under control (because you raise way more levies) and if you don't go too high, you usually make more money through direct taxes than from feudal taxes.
Comment: For holdings acquired in a conquest, it's more like a three month period, to give you time to distribute them among your bestest nobles and courtiers. The income penalty doesn't typically kick in unless you are grossly over the limit; one holding above the limit is typically safe, if you can live with the opinion drop.
Answer: You take a penalty to your taxes collected and your vassals' opinion of you. Other bad things can happen, such as an event where robbers run rampant in your holdings, further reducing your tax income.


Why does Vim have different cursor positions for different modes?

Question: Why does vim have different cursor positions for the different modes? First, in insert mode, the cursor is between characters (like every other editor), second, in command mode, the cursor is under a character, thus requiring an 'i' or 'a' to put it between characters for writing mode. I mean, why isn't the cursor always positioned between characters regardless of mode? This is related to the question Why does ESC move the cursor back in vim?
Answer: First of all, it is not always that way - in normal console, you cannot have a cursor between characters because the console is divided into fixed number of regions. Each region can display a character, but there is no available space "between" them. So what actually looks like cursor in console is really a contrast background under a character.
So the cursors you ask for are for convenience (a visual hint, where a character will be inserted) in case of the insert mode. In other modes, the more logical and backward-compatible view is used. (Note that in "command" mode, for example, many commands operate either on the character under the cursor - could there be a more intuitive way to indicate, which character this is?)


How am I suppose to access product purchase variables?

Question: I need to send an mail to customer on purchase.I am customizing the Invoice template.I need to show the product that he/she purchased when the email is sent.
Whenever a customer purchases a product from my store, system send sends an invoice mail to customer.However I need to customize the the default email template such that it also displays the product image in Invoice.In order to access the product id or image of a product from specific purchase I probably need a variable(as magento has variables which can be accessed in HTML) of a product.
Comment: What exactly are you asking?
Answer: Since there is now way to modify items grid and add a variable like {{var_productImage}} from admin, you will have to duplicate app/design/frontend/base/default/template/email/order/items/order/default.phtml to your template and add a new column

    <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(50, 50) ?> />

Comment: not exactly what was I looking for, but it was a help.Thank you.
Comment: if you want to add them to pdf invoice, maybe this could help you  http://inchoo.net/magento/magento-pdf-invoice-with-product-images-extension/


My meringue forms syrup beads on top

Question: Every time I make a pie , topped with meringue , little beads of sugary syrup form on the top of the meringue a few hours later. Why?
Answer: That's often referred to as weeping. A few things might help. Is your pie filling hot when you spread the meringue? If the filling is cool, the meringue will cook unevenly (the top before the bottom), causing weeping. If your filling is cool, put the pie in the oven for a few minutes before applying the meringue. Another thing that might help is equal amounts of cornstarch and sugar mixed with water (about twice as much water as solids) brought to a rolling boil and allowed to cool to just warm. Drop a couple of teaspoons of the resulting paste into the meringue when you're almost done whipping it. That will help to stabilize the meringue. Also, try not to cook meringue pies on humid days.
Weeping can also be caused by over (or under) cooking. Confused yet?
Oh, and one more thing. Try warming the whites before whipping. That's counter-intuitive for fluffy whites, but it does help it to cook evenly and keep it stable, especially if humidity is part of the problem. Heat gently and go for about the temp of hot tap water.
EDIT: Looking for more precise instructions for the warm meringue I found another similar option that might work better. Here are better instructions for cooked, or "Italian" meringue. http://www.ochef.com/727.htm
From that site:

Italian Meringue
  From The Way to Cook, by Julia Child
Ingredients:
For the Egg Whites:
2/3 cup egg whites (4 to 5 whites)
  A pinch of salt
  1/4 tsp cream of tartar
For the Sugar Syrup:
1-1/3 cups sugar
  1/2 cup water
Instructions:
Beat the egg whites at slow speed until the foam throughout, add the salt and cream of tartar, gradually increase the speed to fast, and beat to soft peaks. Turn the machine to slow as you complete the sugar syrup.
Bring the sugar and water to the simmer, swirl the pan to dissolve the sugar completely, cover tightly and boil to the soft-ball stage (234°F to 240°F; 112°C to 116°C on a candy thermometer).
Beating the egg whites at moderately slow speed, dribble into them the boiling syrup — trying to avoid the wires of the whip. Increase speed to moderately fast and beat until cool and the egg whites form stiff, shining, upstanding peaks. The meringue is now ready to use as your recipe directs.

OR
One-Step Italian Meringue
From Brilliant Food Tips & Cooking Tricks, by David Joachim

Also known as boiled icing, this type of meringue is traditionally made by beating hot sugar syrup into beaten egg whites. This version combines all of the ingredients in one bowl to save time. It should be made over a saucepan of simmering water so that the egg whites reach a temperature of at least 160°F (70°C) to kill any harmful bacteria.
Ingredients:
3 egg whites, at room temperature
  1 cup, plus 2 Tbsp sugar
  3 Tbsp cold water
  1/4 tsp cream of tartar
Instructions:
Combine the ingredients in a metal bowl. Place over a saucepan of gently simmering water and beat with an electric mixer on low speed, 4 to 5 minutes. Increase speed to high and beat until very thick, about 4 minutes more. Remove bowl from saucepan and beat off the heat until light and fluffy, another 4 minutes.
Yield: Makes about 4 cups
Answer: That happens to me, too. What I do is just blow on it, and it spread out and coat the Meringue evenly, creating a chewy, sweet layer on top. Hope this helps.
Answer: In pie meringues (not brittle), weeping can be caused by undissolved sugar granules that end up attracting water to themselves from the moist interior. If this is the cause, it can be mitigated by using a sugar syrup (not hot for French) or powdered sugar (which does contain starch too). Extreme over-beating may also be a possible cause--stopping right before stiff peaks should be good. The sugar should be added at the beginning or during the beating, resulting in a firmer and finer meringue. Too high oven temperatures can cause a problem too.
Source: Harold McGee

My meringue forms syrup beads on top


java.lang.OutOfMemoryError: Java heap space

Question: while using Jruby, i get this message.
Complete Java stackTrace
java.lang.OutOfMemoryError: Java heap space

how to resolve ?
Comment: You probably want to allocate fewer objects on the heap. Can you post a code snippet so we can understand what code you are trying to execute?
Comment: possible duplicate of [How to deal with "java.lang.OutOfMemoryError: Java heap space" error (64MB heap size)](http://stackoverflow.com/questions/37335/how-to-deal-with-java-lang-outofmemoryerror-java-heap-space-error-64mb-heap)
Answer: TLDR: jruby -J-Xmx1024m script_you_want_to_run.rb
As others have mentioned, your program is trying to allocate more memory than the max size the JVM is allowed to allocate.
Also as others have mentioned, you can configure Java to allow more memory allocation by telling it via the command line with the argument -Xmx1024m (as an example).
-Xmx is the argument for max memory, and the 1024m would be the memory size (the final m for megabytes). I think JRuby starts the JVM with max memory set to 512m already, so you'll probably want to be going higher than that.
To send the arguments to the JVM from the command line using jruby, you'll need to add -J in front of the argument, so your command line will look like this:
jruby -J-Xmx1024m script_you_want_to_run.rb

I also agree with the memory leak sentiments: If you're not really dealing with a ton of objects with the expectation that you might be seeing this error, then you might want to look into the possibility that your program is having unintended side effects.
Answer: Setting JRUBY_OPTS is the solution that worked best for me. It was mentioned in Koray's answer.
set JRUBY_OPTS=-J-Xmx2g

Answer: You can tune the JVM heap size using the -Xmx and -Xms JVM options: -Xmx for maximum heap size, and -Xms for initial heap size. E.g.:
java -Xms128m -Xmx256m BigApp

I usually use the same settings for the initial and max heap size.
In your case, it's really hard to say how to size the JVM without more information on what you're doing, when the problem occurs... Or maybe you just have a memory leak somewhere and increasing the heap size won't help, it will just make the problem occur later. In this case, the only solution is to fix the leak.
Last be not least, always keep in mind that the bigger the heap, the longer the major GC.
Answer: check the JVM version of the jruby with this command
jruby -v

If it returns this string it means that you are using an 32bit JVM therefore you can not set max heap size to >=2gb
jruby 1.7.3 (1.9.3p385) 2013-02-21 dac429b on Java HotSpot(TM) Client VM 1.6.0_37-b06 [Windows 7-x86]

You need to set your JAVA_HOME to your 64bit version of Java. e.g.
set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_09

You will see following output if you rub jruby -v command again
jruby 1.7.3 (1.9.3p385) 2013-02-21 dac429b on Java HotSpot(TM) 64-Bit Server VM 1.7.0_09-b05 [Windows 7-amd64]

You can see that you are now using 64bit version of JVM. After that you can set either jruby opts environment parameter as follows
set JRUBY_OPTS=-J-Xmx2g

or you can run your program as follows
jruby -J-Xmx2g <your ruby program>

Comment: I needed the `-S` flag as well, e.g `jruby -J-Xmx2g -S rails s puma`
Answer: Increasing the heap dump size might only be a band-aid.  You need to generate a heap dump by adding the proper proper argument:
java -XX:+HeapDumpOnOutOfMemoryError -mn256m -mx512

This will generate a file similar to java_*.hprof.  You can then use a bevy of open source tools to analyze the heap dump.  Java 1.6 ships with JHat, which is kind of buggy and doesn't analyze large heaps well.  I use this awesome Eclipse plugin:  Eclipse Memory Analyzer.
Once a report is generated from the heap dump, you can see which classes are taking up the most memory and you can use that as a starting point for debugging your code to find any memory leaks.
Answer: you can set your max heap to a larger size on the command line:
java -Xmx512m MyClass

Answer: Either you're leaking memory and you need to find why or you need to give Java more heap space:
java -Xmx512m ...

Answer: The message "Java heap space" indicates that new objects could not be allocated in the Java Heap. The error does not necessarily imply application memory leak. The problem could be as simple as a configuration issue, where the specified heap size (or the default size, if not specified) is insufficient for the application.
Potential sources of this Error and solutions: http://www.blogsoncloud.com/jsp/techSols/java-lang-OutOfMemoryError-Java-heap-space.jsp
Answer: I encounter a similar problem and I cannot find a satisfactory solution after googling for a few hours. If all you need is to set the Xms and Xmx params, here is what works for me:
ps aux | grep java
Find out what is actually running by jruby. Kill it (kill -9 process_id). Re-run the command with the native Java options on the command line.
Hope it helps.
By the way, I am using puma server with Jruby on Rails 4.0, and if anyone knows a more elegant solution, please let me know. I have tried everything (after_use_hook, .rvmrc, .bashrc, etc. etc.)
Thanks.
Comment: what do you mean by 'native java option'?


How does the parallel axis theorem explain the opening of a door?

Question: As I get closer and closer to the hinges of a door, it becomes harder and harder to open. However, the distance to the hinges is getting smaller and smaller, where the rotation is occurring. All the force I am applying to the door is parallel. In my experiment, I can push in one place, and then another place closer to the hinges. So the forces are parallel. So, by the parallel axis theorem: $I'=I+md^2$ and $d^2$ is getting smaller as I get closer to the hinges. I' is going down, so moment of inertia goes down and the door should be easier to open as I get closer to the hinges. However, the opposite is happening. Why does it appear that opening the door is breaking the parallel axis theorem?
Comment: "$d^2$ is getting smaller as I get closer to the hinges" - is it? Look up what $d$ represents. It's *not* the distance between the hinges and the place where you push.
Comment: Changing where you push does nothing to change the axis around which the door is spinning. It does, however, change the torque.
Answer: How does the parallel axis theorem explain the opening of a door? - It doesn't.
The moment of inertia of a door does not depend on where you push it.
The torque that you apply to a door depends on the magnitude of the force $F$ and the distance $d$ between the force and the hinges.
Suppose that you need to apply a certain torque $\tau_{\rm applied}$ to open the door in a reasonable time  whilst at the same time overcoming frictional torques at the hinges.
$\tau_{\rm applied} = F\,\times d$, so as the distance between force and hinge $d$ is reduced, the force that you apply needs to increase and if the distance is reduced too much you will not be able exert enough force on the door to open it.
Comment: The door's moment of inertia does depend on where the hinges are.  If the door swings about an axis other than the edge, the moment of inertia will be reduced and the door will be easier to open (sometimes outside doors in office buildings are like this).  However, the force required will still depend on what part of the door you push on.
Comment: The context of the question is a fixed door, whose hinges are in a fixed position. @Rich006
Comment: @LeeMosher, yes but when stating that the theorem doesn't apply here, it's useful to give an example where it does apply.
Comment: @LeeMosher - you're right that this is the contextual setup of the question, but the actual question is "Why does it appear that opening the door is breaking the parallel axis theorem?", and Rich006 is just addressing the root cause of this misconception, as this answer glosses over it.
Answer: The $d$ in the parallel axis theorem is the distance between the center of mass of the object and the axis around which this object is to rotate. The torque, on the other hand, is defined by the moment arm, which is a (projected) distance between the axis and the point of application of the force.
The position of the center of mass doesn't depend on where the force is applied, so parallel axis theorem is not applicable here.
Answer: It's because you are ignoring the inertia of the door, which resists its swinging open. also, as you apply force closer and closer to the hinge point, the torque you are applying to rotate the door becomes less and less and the amount of force needed to develop enough torque goes up and up.
Answer:
"As I get closer and closer to the hinges of a door, it becomes harder and harder to open."

True, but it does not become harder to open due to inertia, but rather the hinge reaction. Well, hinge reaction & distance to the center of mass.
Mass moment of inertia is a property of the body, and it has a different value depending on where on the body it is summed. The lowest value (and most commonly referred to) is the MMOI at the center of mass.
The parallel axis theorem gives us the value of MMOI at any other point displaced from the COM. In 2D this is simply $$I = I_{\rm COM} + m ( x^2 + y^2)$$
What you are asking about, is not the mass moment of inertia though. You are describing the effective mass of the door at the point of contact.
Imagine two scenarios, first a free floating door in space at rest, pushed by a unit force at some arbitrary location A, and the second scenario where the door is hinged in one end.

If you calculate the translational acceleration of point A due to a unit force $F$, you would have calculated the effective mass of the system at A. Sometimes this is called the reduced mass. It is estimated from $F = m_{\rm reduced} a_A$ where $a_A$ is the acceleration of A and $F$ is the applied force there.

Free Floating Door has no reaction forces so the equations of motion (simplified) are
$$\left.\begin{aligned}F & =m\left(a_{A}+d\,\alpha\right)\\
d\,F & =I\alpha
\end{aligned}
\right\} \;\begin{aligned}a_{A} & =F\left(\tfrac{1}{m}+\tfrac{d^{2}}{I}\right)\\
\alpha & =\tfrac{d\,F}{I}
\end{aligned}$$
From the above the effective mass of free floating door, pushed at a distance $d$ from the center of mass is
$$\boxed{ m_{\rm free} = \frac{m\,I}{I+m d^2} }$$
The above means that the maximum resistance we feel on a free-floating door is when we push at the center of mass and $d=0$. At that value $m_{\rm free} = m$. Any other value for $d$ increases the denominator and makes the resistance we feel less.

Pivoted Door Similar to the scenario above, with with an additional reaction force $R$, and a kinematic relationship between $a_A$ and $\alpha$ the rotational acceleration
$$ \left.\begin{aligned}a_{A} & =\left(c+d\right)\alpha\\
F+R & =m\left(a_{A}-d\,\alpha\right)\\
d\,F-c\,R & =I\alpha
\end{aligned}
\right\} \;\begin{aligned}a_{A} & =F\left(\tfrac{\left(c+d\right)^{2}}{I+mc^{2}}\right)\\
\alpha & =\tfrac{\left(c+d\right)\,F}{I+mc^{2}}
\end{aligned}$$
From the above the effective mass of pivoted door, pushed at a distance $c+d$ from the pivot is
$$\boxed{ m_{\rm pivot} = \frac{I + m c^2}{\left(c+d\right)^{2}} } $$
The above means that when we push at the pivot and $d=-c$ the effective mass we feel is infinite (as you mentioned in the question). From that point on any location $d>-c$ would reduce this value. The specific distance where $m_{\rm pivot} = m$ is to be found slightly to the right of the center of mass $d = \sqrt{c^2 + \tfrac{I}{m}} - c > 0$. Specifically for a thin slender object like a door you have $c=L/2$ and $I=\tfrac{m}{12} L^2$ which means the point where you feel the mass of the door is $d = \left( \tfrac{1}{\sqrt{3}} - \tfrac{1}{2} \right) L \approx 0.0777\,L$ or about 8% of the total length past the center of mass (middle).


Is it possible to create Android App Bundle (aab) for Google play with Wolfram language/Mathematica?

Question: Mathematica is excellent tool but I don't know if is it  possible to create Android App Bundle (aab) for Google play with Wolfram language/Mathematica or not?
Please advise or share your opinion/idea for this.
Comment: that's much more feasible (although likely not prebuilt). If you provide more details about what you're trying to do and some sample data people are more likely to help
Comment: What are you trying to do with this bundle? Distribute a copy of Mathematica to use? Almost certainly _impractical_. Not necessarily impossible, but the bundle would be massive and licensing would be a nightmare
Comment: @b3m2a1 thank you. I rent a webpage and use https://appsgeyser.com to convert the webpage to the Android App Bundle (AAB) to upload in the "Google play" so everyone can use the app to look information instead of searching on the web (people can open phone to use the app, they don't remember webpage). The problem is there is some errors that appsgeyser.com can't solve. The rent website can't modify and add more options, e.g compare price with others. The best for me is to make the web by myself and use the Mathematica tools to handle the options as well as convert to the AAB file. Please advise
Comment: @b3m2a1 Thank you. I first want to use WL/Mathematica to create Android App Bundle (AAB) for this example merrymart.asia to upload in the "Google play". The appsgeyser.com can't solve some problem when upload the AAB to the Google play. Secondly more complicate is to made an own app (similar/identical to the merrymart.asia). The app should be able to find and compare price from other web, such as amazon.com, with the problem here https://mathematica.stackexchange.com/questions/257411/how-to-use-webexecute-to-check-the-checkbox-and-to-select-the-item-in-dropdown-l  . Please advise me. Thank you
Answer: Wolfram Inc. changes this concept rather often but since some time the API are gathered into the Wolfram Alpha Pro product. The central page for product information is https://products.wolframalpha.com/api/. The learning path doing this is harder than coping with Wolfram Alpha Pro. You have to work rapidly with the Google Android API. The start is always on the Google Play Store and then make Yourself a Google Android Developer taking the Google course path to obey their strict app requirement policies and security policies.
From both starting points this community may not be the very best starting point. Seems a new topic. All the best.
The given link allows detailed API searches for the type of apps that are reasonable to  Wolfram Inc. For example on Intelligent Assistent they show API Rest code that is central to this type of Intelligent Assistant with Wolfram Alpha Pro. Like Google Developer API they work with templates that allow only for specialized and strongly typed app skeletons. Nevertheless, this may lead to very rich and nice adopted apps.
You can not go around making Yourself a Google Play Store Developer for broad Android purposes. To get on the faster learning track and not to spend too much money on App hosting and SEO capabilities far beyond the Google Android package head to MIT Appinventor. These offer a free-of-charge entry level for developing a first-level stub to upload on the Google Play Store.
Google offers free education Android developers too: Google Grow. The Wolfram Inc. part of Your project plan make Yourself an account on Wolfram Alpha Deveolper Portal.


The suitable brush for toes in sculpt mode?

Question: I'm trying to make a character in blender and stuck with feet in sculpting mode. I can't find suitable brush to create toes. I've tried to "grab" it, but it breaks my topology, tried to "snake hook" it, but the only thing i'm getting is a sharp hooks. For now, the best thing for me is a "blob", but maybe there is something more suitable, because it still looks ugly.
Comment: Do you want separated toes or just carvings?
Comment: @Blunder can you explain the difference between separated and carvings? I can't understand what you mean. I planning to rig it to get compatibility with ue4 skeleton.
Comment: I mean something like [this](https://i.stack.imgur.com/KzFgG.jpg) where the gaps are etched in but the toes are actually still joined together. I think sculpting separated individual toes is hard because they are very close together. And do you need these details when you want to rig and animate the feet anyway? It might be easier just to sculpt a rough base shape, do the retopology, and then bake the details into a normal map from a MultiRes modifier that is on the low-poly version.
Comment: @Blunder I already experienced how hard it is, but I think I should do it in this way to improve my skills faster. Even if i won't need it for rig and animation.
Answer: Blob is probably a good brush, don't forget to enable the Dyntopo option in order to create additional faces:

Also you can use the Inflate brush afterwards:
Comment: Thank you very much! Now it looks like I can work with it.


Procedure for responding to incorrect answers within a question

Question: I saw a question earlier today that had been answered incorrectly, and most of the comments in the question were criticizing and correcting the answer given, rather than answering the question that had been asked.  Is there a good balance between helping those that have asked the questions and helping those that have mistakes in their answers?
Comment: Can you link to that question?
Comment: I really don't get what scenario you are talking about here. What are "comments in the question"? Comments on the question that appear *under* the question (as they should)? Comments that the OP added into the body of the question? You say "correcting the answer" so are they comments on the answer (appearing under it)?
Answer: If a user tries to answer a question and fails to do it, did users who helped to make his answer correct helped OP? Yes. There is nothing wrong with trying to correct an answer.
If you still feel that the answer is wrong, just downvote - no need to flag it if its wrong, unless it is plain wrong and has to do nothing with question (however I doubt if in this case anyone will want to correct it).
Answer: i think it would be better if you would flag the answer itself as "Not an answer" for review purposes, and if you know the right answer post an answer about it, criticizing an incorrect answer would not help the community, rather you can comment to that answer if you want to correct the answer itself, helping both the user who posted the question and posted the incorrect answer was never wrong, we are a community and i think we should help everyone understand what the question really is.
Comment: No, "Not an Answer" flags should *not* be used for incorrect answers. They'll be rejected. Downvote and/or comment.


OpenCV parameters of Random Trees

Question: OpenCV provides an implementation of random forest named random trees and derived from a decision tree class. One parameter to train the random forest is the maximum depth, which in the provided examples is typically between 10 and 20. I learned that random forest is generally grown to its full depth and no pruning is done and, therefor, other random forest implementations do not provide a parameter of maximum depth. Why then, without consulting the source code, which might give the answer, does the OpenCV implementation provide this parameter and is it meaningful to limit the maximum depth in a random forest?
Answer: I've played with the max-depth parameter extensively and I think that they provide this in case your data set is large. In those instances, it may take a very long time for the trees to be fully grown. This is then compounded if you then ask for many trees (say, 1000+). Also, it is important to note that the Random Forest code actually uses the Decision Tree code for generating its trees and there's actually a hard coded maximum value for the max-depth parameter (which is set to 25). In other words, if you specify any value larger than 25 then it will just change your parameter to max-depth=25. It is possible to change the source code and then recompile (I've done this).
Comment: I just figured this out the hard way after a lot of training.  Wish I had stumbled upon this sooner.
Answer: there are lots of implementations that do provide max depth parameter. It is basically used as a method of reducing complexity of the tree classifier and therefore the variance of the estimator.
Comment: thanks for the information. i have two follow up questions: is this relevant to regression or to classification as well? is there a rule or procedure how to choose the optimal depth?
Comment: There are no established rules to choose optimal depth. Generally, Random forests work well when grown to full depth. Especially in classification. By default, the vanilla implementation in R grows trees until there are 5 obs. in the final nodes for regression and 1 for classification. From Experience I have seen an improvement for regression by growing the trees to maximum depth for some data sets. For some classification problems, especially if the classes are very imbalanced; setting larger final node sizes sometimes helps. Really, you have to play around with your specific problem.
Comment: Thanks for the clarification. If I understood you correctly, maximum depth is one parameter to further optimize the classifier in certain cases, but other parameters bear greater weight, e.g. the number of trees.
Comment: Meanwhile I re-read the random forests chapter of Hastie's et al "The Elements of Statistical Learning", which confirms the above statements.

OpenCV parameters of Random Trees


Parish Priest, Provost, Parson?

Question: What's the correct word for the priest who is in charge of a parish in Catholic Church? Provost seems to be of some higher rank, and Parson, I guess, refers to Anglican/Protestant Church? Also, should this position always begin with capital letter? So confusing...
Comment: Likely this will vary by country.
Answer: It's called parish priest or pastor:

This section concerns the priest who in the Code of Canon Law is referred to by the term parochus, which is some English-speaking countries is rendered as "the parish priest", in others as "the pastor".
The parish priest is the proper pastor of the parish entrusted to him. He exercises the pastoral care of the community entrusted to him under the authority of the diocesan Bishop, whose ministry of Christ he is called to share, so that for this community he may carry out the offices of teaching, sanctifying and ruling with the cooperation of other priests or deacons and with the assistance of lay members of Christ's faithful, in accordance with the law
(—canon 519 of the Code of Canon Law in the English translation by the Canon Law Society of Great Britain and Ireland, assisted by the Canon Law Society of Australia and New Zealand and the Canadian Canon Law Society)
The pastor (parochus) is the proper pastor (pastor) of the parish entrusted to him, exercising the pastoral care of the community committed to him under the authority of the diocesan bishop in whose ministry of Christ he has been called to share, so that for that same community he carries out the functions of teaching, sanctifying, and governing, also with the cooperation of other presbyters or deacons and with the assistance of lay members of the Christian faithful, according to the norm of law
(—canon 519 of the Code of Canon Law in the English translation by the Canon Law Society of America).)

(https://en.wikipedia.org/wiki/Hierarchy_of_the_Catholic_Church#Parish_priest.2Fpastor)
Comment: Indeed :-) It's going to be for the European reader. That's why I want to be so precise about the style ;-) Thx all again!
Comment: Ok, thx for the quotes. No difference in meaning then. However, as 'parish priest' only appears in the British translation, then I guess it sounds more European than 'pastor', doesn't it?
Comment: @shogun: How it sounds depends on who's listening.
Comment: @shogun According to the sources quoted in the Wikipedia article, it appears that "parish priest" is the accepted term in Great Britain and Ireland, while "pastor" is what the Roman Catholic Church uses in the US.
Comment: @shogun You're most welcome. As an aside: If an answer works for you, you might consider marking it as "accepted" for the sake of future visitors. I've looked at your other questions, and it seems some of the helpful answers were never marked as "accepted". More info here: http://english.stackexchange.com/tour.
Answer: That priest would be called the pastor (as the congregation is metaphorically his "flock of sheep").
If using the noun as part of a title, it is capitalized.
The Reverend John Doe, Pastor
St Somebody's R.C. Church
123 Main Street
Somewhere, NY 10019
Comment: "In the United States, the term pastor is used by Catholics for what in other English-speaking countries is called a parish priest. The Latin term used in the Code of Canon Law is parochus." (https://en.wikipedia.org/wiki/Pastor). I want to sound more British/European-English. I guess in Europe 'pastor' and 'reverend' are usually associated with Protestants. Wouldn't it be better to choose 'parish priest' then?
Comment: I had never heard the word.  +1
Comment: @shogun It's either "parish priest" or "pastor", see my answer below.
Comment: A parish can have several priests. They're all parish priests, but only one is the boss.
Comment: @TimRomano Aren't those "assistant priests" or "parochial vicars"? https://en.wikipedia.org/wiki/Hierarchy_of_the_Catholic_Church#Assistant_priests.2Fparochial_vicars
Comment: @A.P.  There seems to be quite a difference in terminology between the US and England here. Here, the man-in-the-pew would not use the phrase "parochial vicar" to refer to one of the underling priests.
Answer: There are many complications in this field: for example, originally a vicar (same etymology as vice-) was an assistant to the curate who had the 'care of souls'; nowadays it is the other way round.  Again, in my (Anglican) church the vicar and the parish priest are different people; given this complexity, trying to find 'the correct word' without being more specific is probably pointless.
In Britain and Europe generally, pastor is another term for priest, and as such
is never capitalised. Either (or parish priest) could be used in your context.

Parish Priest, Provost, Parson?


I am looking for an isekai light novel with overpowered items

Question: This story is set slightly into the future but there are not a lot of differences. He lives in his grandfather's house and finds a doorway of some kind. This doorway leads him to another world where he finds items that are overpowered with the help of a sort of game system. He levels up by fighting monsters and finds out that his world is not only populated with him and monsters. He also wears this sick red armor that kind of looks like lord Sauron's armor.
Answer: I believe you are looking for Isekai de Cheat Skill wo Te ni Shita Ore wa, Genjitsu Sekai wo mo Musou Suru ~Level Up wa Jinsei wo Kaeta~, or I Got a Cheat Ability in a Different World, and Became Extraordinary Even in the Real World. I'm basing this answer off of a manga I found with the same plot, that has a light novel of the same name.
In the first chapter of the manga we learn the main character's grandfather died and the house was left to the main character. He explores the house and finds a doorway to another world. The doorway connects to a house in the other world. when exploring the house he finds various weapons, one of which he uses when a monster attacks the house. A status screen then appears saying he leveled up from level 1 to 100, and all his stats increased from 1 to 1000.
Below is the cover for the manga i found, which shows the main character in armor.


Does tar preserve permissions if user IDs change?

Question: I need to backup some data with the "p" option on tar command. The problem is the place I'm going to restore this data will have all the same users, but those users may have different IDs. Does that make any difference to tar or will it restore permissions correctly by user name?
Answer: Summing up previous answers and adding some important information:

When creating archives, tar will always preserve files' user and group ID, unless told otherwise with --owner=NAME, --group=NAME. In either case, each file will always have an associated numeric user and group ID.

GNU tar, and perhaps other versions of tar, also store the user and group names, unless --numeric-owner is used. bsdtar also stores user and group names by default, but it had no support for --numeric-owner option when creating archives until version 3.0 (note that it supported the option when extracting archives since much longer).

When extracting as a regular user, all files will always be owned by the user. And it can't be any different, since extracting a file means creating a new one on the filesystem, and a regular user cannot create a file and give ownership to someone else.

When extracting as root, tar will by default restore ownership of extracted files, unless --no-same-owner is used, which will give ownership to root himself.

In GNU tar, bsdtar, and perhaps other versions of tar, restored ownership is done by user (and group) name, if that information is in the archive and there is a matching user in the destination system. Otherwise, it restores by ID. If --numeric-owner option is provided, user and group names are ignored and IDs are used. In either case, whenever numeric IDs are used, a matching user and group does not need to exist in the system.

Permissions and timestamps are also saved to the archive, and restored by default, unless options --no-same-permissions and/or --touch are used. When extracted by the user, user's umask is subtracted from permissions unless --same-permissions is used.

--preserve-permissions and --same-permissions are aliases, and have the same functionality as -p

Hope this helps clarify the issue! :)
Comment: Excellent answer; Answers this question as well as every other  question that may arise on the subject.
Comment: It should be noted that only recent versions of GNU `tar` allow specifying arbitrary names in `--owner` or `--group`, in the past `tar` did a gratuitous lookup in the current machine `/etc/passwd` and refused to run if there was no match.
Comment: @CMCDragonkai : `--owner` and `--numeric-owner` are not mutually exclusive, and serve very distinct purposes: `--owner=USERNAME` will override the files and dirs owner(s) when archiving the files, while `--numeric-owner` will simply not store the username, just his numerical ID.
Comment: What happens if you create an archive with specified name with `--owner` but also added in the `--numeric-owner` flag? How does tar deal with these competing requirements?
Answer: tar records permissions based on the UID and GID, not on the string associated with them.  So if the UID on one server was 3300 and that was linked to 'bob', on the new server the file will be owned by the user who has the UID 3300.
Virtual everything (I want to say everything, but you can never be 100% sure) on UNIX uses the UID:GID values, because that's what is actually stored at the filesystem level.  The name is just a simple lookup in the passwd file, the underlying checks are done using the numeric values.
Comment: GNU tar does save the user/group name data, too, because I can see it if I list an archive on a machine that doesn't have those users. There must be a way to get it to use that during extraction.
Comment: This answer is simply incorrect. `tar` *does* record owner names.
Comment: You most likely mean GID (group identifier), not GUID (Globally Unique Identifier).
Comment: Ah, that is not good ... I guess in most situations it's suitable. Unfortunately, not for me ... Thank you, EightBitTony.
Comment: tar on ubuntu 16.04+ clearly does _not_ store gid or uid... but instead the user/group names. This became a problem when I had to restore a backup of a server from a live environment that did not use the same name-id mapping. Upon booting into the restored system it was just a litany of permissions errors. I presume this to be the case on most GNU systems. The hacky solution I came up with was to over-write the passwd and group files in the live environment with those from the back up before running tar. Then promptly reboot to restore them.
Answer: If you are trying to transfer files between two systems, rsync will by default set the permissions by username instead of uid, looking at the usernames at both ends.  Only if the user doesn't exist on one of the systems will it copy it with the uid, unless you tell it otherwise.
Comment: This doesn't directly answer the OP's question, but anyone asking the OP's question ought to learn this, too.
Answer: User the --same-owner option to GNU tar. See http://www.gnu.org/software/tar/manual/html_section/Attributes.html
Comment: This is documented as the default for superusers, and seems to answer the OP's question differently than the accepted answer. (The link says that when GNU tar restores using --same-owner, it looks first for *names* in /etc/passwd.) The only outstanding issue is whether the OP's version of tar implements --same-owner.
Comment: The OP is using some Linux distro so better than even chance of using GNU tar, methinks. And going by the documentation it *is* possible while the accepted answer indicates it's not...
Comment: @Catcall - sorry, i accepted the answer without even having a chance to test it. Somethimes i just blindly trust people. Still, the person who answered was kinda right, since i wasn't restoring with "--same-owner" and then you've added to the answer. Too bad i can't accept both. I'm using debian squeeze which indeed does support "--same-owner". Thanks for the tip.
Comment: @Marius: I'm pretty sure you can change the accepted answer whenever you like. (I'll just point out that I haven't provided any answers to this question, only comments. I don't have any rep at stake.)


Does the covariant derivative of a product of unit vectors vanish?

Question: Consider the timelike unit vector $u^{\beta}$ which satisfies $u^{\beta}u_{\beta}=-1$. Its covariant derivative vanishes: $ \nabla_{\alpha}(u^{\beta}u_{\beta})=0 $ which means we can write this as $ g^{\mu\beta}\nabla_{\alpha}(u_{\beta}u_{\alpha})=0 $. Since the metric is non-degenerate, $ \mid\nabla_{\alpha}(u_{\beta}u_{\alpha})\mid=0 $ and it follows that the only solution is $ \nabla_{\alpha}(u_{\beta}u_{\alpha})=0 $. Does that follow in every case? Is there anything that prevents this result from holding?
Comment: You used the metric-compatibility of the connection to move the $g^{\mu\beta}$ outside the parentheses.
Answer: Your way of rewriting the equstion is not correct, since you have to $\alpha$'s as lower indices and one $\alpha$ as an upper index. It should read like $\nabla_{\alpha}(u^\beta u_\beta)=g^{\beta\gamma}\nabla_\alpha (u_\beta u_\gamma)$. (As mentioned in the comment by @TedShifrin, this uses metric compatibility.) The follwing arguement suffers from two mistakes: On the one hand, the expression can not be interpreted as a norm. It is the map, which associates to a vector the inner product of the derivative of $u$ in direction of that vector with $U$ itselft. To use non-degeneracy you would need to show that the inner product of a fixed object with all other objects vanishes to conclude that the first object is zero. (From vanishing of a norm you could only conclude that your object is light-like in a Lorentzian setting.)
One reasonable interpretation of the correct identity is that the trace of $\nabla_\alpha (u_\beta u_\gamma)$ over the last two indices vanishes. Alternatively, you can rewrite $ \nabla_\alpha (u_\beta u_\gamma)=u_\beta \nabla_\alpha u_\gamma+ u_\gamma \nabla_\alpha u_\beta$ and then contract with $g^{\beta\gamma}$ to conclude that $u^\beta\nabla_\alpha u_\beta$. This is the analog of the fact that constant norm of a vector field implies that the derivative is perpendicular to the field.
Comment: Yes, of course the indices were wrong as I copied over the wrong expression without realizing that. Sorry for the confusion. As Andreas points out, the contraction is equivalent to the sum of two identical orthogonal terms which add to zero. We can postulate $ \nabla_{\alpha}u_{\beta}u_{\gamma}=0  $ as the trivial solution. It is consistent with the vanishing of the $u^{\beta}\nabla_{\alpha}u_{\beta}=0  $ terms and no issues should arise because of the metric compatibility of the connection.


What is Function Point Analysis?

Question: What does function Point Analysis Mean?
is it that its used for cost estimation of a software? or are there any proper definition that would define function Point Analysis?
Can you please give me a short description on it.
Comment: I can't believe you haven't tried wikipedia :-) https://en.wikipedia.org/wiki/Function_point
Comment: I did try many sites. but i just wanted a precise and clear meaning of it.
Answer: While I agree with Leo's answer, I'll try a more practical description:
What it is
Function Point Analysis (FPA) is one of currently five standards for Functional Sizing (see ISO/IEC 14143) as approved by ISO. FPA is actually the widely used short term for the ISO/IEC 20926 standard titled "IFPUG Functional Size Measurement".
FPA is a means to rate (the term 'measure' is actually misleading) the amount of functional requirements to software. To achieve this rating, a technique is used that was known as 'functional decomposition' in earlier times. This concept is in fact very close to describing requirements with 'use cases', even though the detailed rules and notations are quite different.
In short, the functional requirements are decomposed into 'elementary functions', which then are rated each with a point value. The total of points for all elementary functions is used as an indication of the 'size' or amount of requirements. This is called the 'functional size' expressed in the unit of 'function points' (fp).
The natural representation of a functional decomposition is the functional tree.
The FPA standard also has a set of rules for rating changes to existing applications, thus it can be used to rate the functional requirements for the adaption of extension of existing systems ('enhancements' or 'releases').
What it is not
FPA is not an effort estimation technique by itself. Obviously, the relation between the size of functional requirements and the implementation effort can be and often is rather loose. Function points can be used as (one) input to more complex estimation models (such as COCOMO), which have to take into account all other effort drivers.
FPA is not a 'software metric' - functional size is always related to the user requirements fulfilled by software. While you can count and measure lines of code or code complexity, functional size is the result of an analytical process.
When to use it
FPA can be helpful to estimate the effort for a software project in an early stage, when the requirements are known, but the details of implementation have not yet been specified or evaluated. The functional requirements are reflected in the functional size, the non-functional requs need to be input in an estimation model. You need to have/use a good and proven (and trusted) model, otherwise the functional size is useless for this purpose.
FPA can also help to rate the 'value' of an application in the sense of 'recovery costs'.
Eventually, in the context of IT client/vendor relationships, FPA can be used as a basis for pricing. Clients are invoiced based on an agreed 'price per fp' instead of an hourly rate.
When not to use it
By definition, FPA requires a basic understanding of the functional requirements. Thus, if you do not have or know the functional requirements, it will be difficult if not impossible to use FPA.
FPA is also not suited to rate the performance of individuals, as it is a rather holistic rating for an application and cannot to be used to size only parts of it.
Comment: It would have been better, had to provided examples. Also your text seems confusing. You said in beginning `FPA is not an effort estimation technique` while later you said `FPA can be helpful to estimate the effort for a software project`. At least it sounds confusing to me. I believe. something can be used for effort estimation or can't be used at all. Would you like to clarify ?
Comment: Nomen est omen ;-) If it helps to change my statement to 'FPA is not an effort estimation technique **by itself**' I'm happy to do so. The paragraph 'When to use it' tells you, that, to derive a effort estimate from FPA, you need a reasonable (effort estimation) model.
Comment: :-P Yes the comment is helping me and I guess it would help other too !
Answer: the authoritative answer, from IFPUG
http://www.ifpug.org/about-ifpug/about-function-point-analysis/

Function Point Analysis (FPA) is a sizing measure of clear business
  significance. First made public by Allan Albrecht of IBM in 1979, the
  FPA technique quantifies the functions contained within software in
  terms that are meaningful to the software users. The measure relates
  directly to the business requirements that the software is intended to
  address. It can therefore be readily applied across a wide range of
  development environments and throughout the life of a development
  project, from early requirements definition to full operational use.
  Other business measures, such as the productivity of the development
  process and the cost per unit to support the software, can also be
  readily derived.The function point measure itself is derived in a
  number of stages. Using a standardized set of basic criteria, each of
  the business functions is a numeric index according to its type and
  complexity. These indices are totaled to give an initial measure of
  size which is then normalized by incorporating a number of factors
  relating to the software as a whole. The end result is a single number
  called the Function Point index which measures the size and complexity
  of the software product.
In summary, the function point technique provides an objective,
  comparative measure that assists in the evaluation, planning,
  management and control of software production.

ps. the IFPUG definition is what is taken as certain in the Court here in Brazil, when someone has any kind of dispute about function points (mostly because Government contracts are usually defined in FPs)

What is Function Point Analysis?


Cloudformation template with EC2 using docker compose

Question: I'm relatively new to Cloudformation, and had a few questions about my template and best practices. I'm facing a few hurdles, and there is a lot of information out there, it's a bit overwhelming, so any feedback would be highly appreciated. I'm not looking for detailed code etc. just some good insights on how I can improve my steps.
I'm trying to set up a basic Node/Express API:

On push to Git repo

Build Docker image and push to private AWS ECR repo
After successful push, deploy Cloudformation template that provisions

An EC2 + security group with Elastic IP assigned
Run docker compose in Userdata of EC2 to get app up and running

This is my UserData (I do need some specific help here!)
UserData: !Base64 |
        #!/bin/bash -ex
        yum update -y
        yum install docker -y
        service docker start
        usermod -a -G docker ec2-user
        echo "Start Docker service"
        apt-get update
        apt-get install docker-compose-plugin
        apt install amazon-ecr-credential-helper
        echo "APT-GET update complete"
        echo "{ \"credHelpers\": { \"<my_acc_id>.dkr.ecr.<my_region>.amazonaws.com\": \"ecr-login\" } }" > ~/.docker/config.json
        systemctl restart docker
        echo "
        version: "3.9"
        services:
          my-app:
            image: <acc_id>.dkr.ecr.<my_region>.amazonaws.com/my-repo
            environment:
              STAGE: staging
              VIRTUAL_HOST: my-customdomain.com
              VIRTUAL_PORT: 3000
            ports:
              - "3000:3000"
            restart: always
            networks:
              - my-network

          https-portal:
            image: steveltn/https-portal:1
            ports:
              - '80:80'
              - '443:443'
            links:
              - my-app
            environment:
              STAGE: production
            volumes:
              - /var/run/docker.sock:/var/run/docker.sock:ro
            networks:
              - my-network

        volumes:
          https-portal-data:
        networks:
          my-network:
            driver: bridge
        " > docker-compose.yaml
        docker compose up -d

Status:
Cloudformation template deploys successfully, all resources set up. But the Userdata doesn't run, so my EC2 never sets up my app.
Issues / Questions:

The Userdata never ran, I can't find see any of the above echo statements in the logs /var/log/cloud-init.log. When I SSH into the instance I can't find any of these files. How do I debug this better?
Is there a better way to get the docker-compose data in there? writing the whole file in the UserData script seems inefficient. Is there a better way to do this?
On code update, Cloudformation stack is updated, this does not run Userdata(?) (I know it only runs when an instance is first created, but I would like some confirmation that Cloudformation update does not trigger this.
What is the best practice here if I want to re-run docker compose in my Ec2 after every Cloudformation deploy? If it does trigger Userdata, what could be wrong here?
Is this an ideal flow? Are there any improvements I can make here, considering I'm not an expert, but willing to spend some time learning where required.

I appreciate anyone taking the time to answer these questions. Thanks!
Answer: So I found some answers over time, posting them here in case it helps anyone.

The Userdata never ran, I can't find see any of the above echo statements in the logs /var/log/cloud-init.log. When I SSH into the instance I can't find any of these files. How do I debug this better?
ANS: There was an error in my Userdata, I SSHed into the instance and ran the script manually to debug and fix all issues.

On code update, Cloudformation stack is updated, this does not run Userdata(?) (I know it only runs when an instance is first created, but I would like some confirmation that Cloudformation update does not trigger this
ANS: Cloudformation terminates the old instance and spins up a new one on each deploy, this causes the Userdata to be run each time.

Is this an ideal flow? Are there any improvements I can make here, considering I'm not an expert, but willing to spend some time learning where required.
ANS: It was not. The primary reason I was doing this was to fire async requests from one lambda to another, without waiting for the results. This is not possible, as the lambda will not wait for any requests that you do not await meaning you still have to wait for those operations. I tried asynchronous invocation but it still did not work (For those interested I posted a question about it here). So I switched to using SNS to publish messages from one lambda to trigger another, achieving my requirement for fire and forget requests.


Postfix canonical map for forwarding

Question: Because of problems of IP/domain reputation (my server and domain very recent), I had to use Amazon SES as SMTP relay to be able to not have my mails flagged as spam.
My setup with Amazon was working fine, but impossible for me to do mail forwarding using Amazon SMTP, because the adress of the FROM header must be verified.
What I decided to do is to only send through Amazon the mails directly sent from my server, and to just use my own SMTP for the forwarding stuff. (Because the mails are signed by other servers with good reputation, even if the mail is sent by my server, its not flagged as spam)
To do that, I used the following settings :
relayhost =
sender_dependent_relayhost_maps = hash:/etc/postfix/relayhost_maps

sender_canonical_maps = regexp:/etc/postfix/sender_canonical
sender_canonical_classes = envelope_sender
smtpd_data_restrictions = check_sender_access pcre:/etc/postfix/sender_access

relayhost_maps :
firstname.lastname@example.com [email-smtp.eu-west-1.amazonaws.com]:25
@domain2.tld [email-smtp.eu-west-1.amazonaws.com]:25
@domain3.tld [email-smtp.eu-west-1.amazonaws.com]:25
@domain4.tld [email-smtp.eu-west-1.amazonaws.com]:25
@domain5.tld [email-smtp.eu-west-1.amazonaws.com]:25

sender_canonical :
/.*/    firstname.lastname@example.com

sender_access :
/(.*)/  prepend X-Envelope-From: <$1>

I'm relaying all the mails of my domain through amazon, except for domain1 which will be used for forwarding with the address email@example.com.
I need to rewrite the envelope address, to be able to forward the mails.
My problem is that I would like to rewrite the envelope address only for the mails coming from outside of my server that I forward to external webmail.
All the mails sent directly from my users webmails have to go through Amazon.
Answer: After more research, it seems like the way to do what I want is to use regexp in the the sender_canonical file.
I tried to write the following expression, but it seems there is something wrong.
/^((?!@domain1.tld)(?!@domain2.tld)(?!@domain3.tld)(?!@domain4.tld)(?!@domain5.tld).)*$/gm firstname.lastname@example.com

EDIT : I finally found the correct way to write the expression :
!/@email@example.comemail@example.comemail@example.comfirstname.lastname@example.com/    firstname.lastname@example.com

Postfix canonical map for forwarding