When is it acceptable to be impolite or rude

Question: Is it ever ok to be impolite or rude. Say an employee is not doing their job or won't help you when you paid for a service.
Comment: Can you first define 'impolite' or 'rude'?

Can everyone note how very clearly, JamesBond's super-villains are always extremely polite? How real-life Nazis are often portrayed the same way?

Isn't the real question whether ordinary people in potentially extreme situations can afford politeness in the same way powerful people can do whatever they choose?

I too often find myself being impolite or rude to people whose companies have let me down, or who themselves have let down their employers along with me.

When you're up against MegaBucks Corp, what are the other choices?
Comment: No, absolutely not, under no circumstances is it ever *mutar* to abase another human being.
Comment: See https://judaism.stackexchange.com/questions/109503/if-the-name-of-an-idol-is-used-as-an-exclamation-by-someone-is-laughing-forbidd/109504#109504
Comment: I think it's ok to be rude in certain circumstances, but mostly not.  If I'm being scammed for example I don't think it's wrong to one be rude, two expose them.  But I'm not a Jew so I'm only speaking on my own behalf.
Comment: @MauriceMizrahi methinks that you have an alternative answer to this question there, although it won't be an answer to the named examples in the question
Comment: Some days we don't offer greetings in the morning. In 'Merica, that's rude
Answer: No it is never ok to be rude. As Jews, we have to set the standard and example for others.
Indeed, this was the difference between Yaakov and Eisav. The Zohar on Parshas Toldos writes:

וַיַּעַשׂ גַּם הוּא מַטְעַמִּים וְגו'. (בראשית כ״ז:ל״א) יָקוּם אָבִי, דִּבּוּרֵיהּ הֲוָה בְּעַזּוּת, בִּתְקִיפוּ רוּחָא, מִלָּה דְּלֵית בָּהּ טַעֲמָא, יָקוּם אָבִי. תָּא חֲזֵי, מַה בֵּין יַעֲקֹב לְעֵשָׂו, יַעֲקֹב אָמַר בִּכְסִיפוּ דְּאֲבוֹי, בַּעֲנָוָה, מַה כְּתִיב, (בראשית כ״ז:י״ח) וַיָּבֹא אֶל אָבִיו וַיֹּאמֶר אָבִי. מַה בֵּין הַאי לְהַאי, אֶלָּא, דְּלָא בָעָא לְאִזְדַּעְזְעָא לֵיהּ, מַלִּיל בְּלָשׁוֹן תַּחֲנוּנִים, (בראשית כ״ז:י״ט) קוּם נָא שְׁבָה וְאָכְלָה מִצֵּידִי. וְעֵשָׂו אָמַר, יָקוּם אָבִי, כְּמַאן דְּלָא מַלִּיל עִמֵּיהּ.
"And he also had made savory food...Let my father arise" (Bereishis 27:31). His speech was impertinent, rough, and impolite. Come and behold the difference between Yaakov and Eisav. Yaakov talked to his father humbly, with humility. It is written, "And he came to his father, and said, My father" (Ibid. 18). The difference between the language of Eisav and Yaakov is that Yaakov did not want to frighten him. Thus, he spoke humbly, saying "arise, I pray you, sit and eat of my venison." Eisav, however, said "Let my father arise," as if he was not speaking to him.

In fact, even if the person being spoken to is not particularly nice, or acts in an incorrect way that warrants a reaction, it is still not right to take a rude tone.
Refer to the Gemara in Brochos 7a where a known heretic would regularly upset Rabbi Yehoshua ben Levi, by challenging him on the legitimacy of certain verses. Rabbi Yehoshua ben Levi, had enough and planned to curse him at the point in the day where G-d's anger, as it were, flares, thus making it more potent. However, at the desired time he fell asleep. From there he concluded:

שְׁמַע מִינַּהּ, לָאו אוֹרַח אַרְעָא לְמֶעְבַּד הָכִי. ״וְרַחֲמָיו עַל כָּל מַעֲשָׂיו״ כְּתִיב
Conclude from the fact that I nodded off that it is not proper conduct to do so, to curse people, even if they are wicked. "His mercy is over all His creations" (Psalms 145:9) is written even with regard to sinners. (William Davidson translation & notation)

A final point to note is that not only is it incorrect to be rude or impolite but it also has an adverse effect.
Refer to Eruvin 54a:

(סִימָן: ״עֲנָקִים״ ״לְחָיָיו״ ״לוּחוֹת״ ״חָרוּת״). אָמַר רַבִּי (אֱלִיעֶזֶר): מַאי דִּכְתִיב ״וַעֲנָקִים לְגַרְגְּרוֹתֶיךָ״, אִם מֵשִׂים אָדָם עַצְמוֹ כַּעֲנָק זֶה שֶׁרָף עַל הַצַּוָּאר וְנִרְאֶה וְאֵינוֹ נִרְאֶה — תַּלְמוּדוֹ מִתְקַיֵּים בְּיָדוֹ. וְאִם לָאו — אֵין תַּלְמוּדוֹ מִתְקַיֵּים בְּיָדוֹ
In light of the previous discussion, the Gemara cites several expositions of verses proposed by Rabbi Eliezer, while first providing them with a mnemonic: Chains, cheeks, tablets, engraved. Rabbi Eliezer said: What is the meaning of that which is written: "And chains about your neck" (Proverbs 1:9)? If a person makes himself like a chain that hangs loosely on the neck, i.e., if a scholar is not pushy and disruptive to others, and he is also seen but not seen, i.e., just as a chain is covered by clothes and hair, so too, the scholar does not let himself be seen, his Torah study will endure. But if not, if he acts in a rude and arrogant manner, his Torah study will not endure. (William Davidson translation & notation)
Answer: The Ramban advises in his Iggeres Haramban (Sefaria translation taken from here):

Accustom yourself to always speak all of your words calmly, to every
man and at every time. In doing so you will prevent your anger from
flaring, which is a bad attribute in a man which may cause him to sin.
Answer: There is only one situation where one is allowed to be rude, and that is when mocking idolatry:

אמר רב נחמן: כל ליצנותא אסירא, בר מליצנותא דעבודה זרה — דשריא.
Rav Nachman says: All mockery is forbidden, except the mockery of idol worship, which is
permitted [Megilla 25b]

Rav Ashi also says one is allowed to publicly mock a person who has a reputation of being a philanderer (following Rashi, R Steinsaltz).
Nowadays we don't have idolatry like in the gemara, and what we consider normal in today's society for a majority of people would be considered "promiscuous" by Rav Ashi's standards, so it's a question of if this still applies. I heard in a shiur that nowadays we would apply this to selfishness, which is a form of self-worship, as mocking the selfishness is a great way to highlight to a person how silly and childish they are being. CYLOR before applying this though!
Mockery is an insanely overpowered weapon - an extremely destructive one at that - so it must be weilded with extreme care in any permissible circumstances (which are few, if any), and generally avoided like we would avoid keeping a bomb in our possession.
Either way, none of this applies to your examples. Other answers have already explained at length that being rude is categorically forbidden in all such circumstances. The comments have raised that it might be ok to be rude to a corporation, but we wouldn't agree. A corporation is made up of valuable human beings who are just doing their job, and being rude to them is just as sacreligious as anything else (and generally doesn't help, it just makes the world a more sad, and stubbornly-angry place).


Reattaching to an existing screen session

Question: I have a program running under screen. In fact, when I detach from the session and check netstat, I can see the program is still running (which is what I want):
udp        0      0 127.0.0.1:1720          0.0.0.0:*                           3759/ruby

Now I want to reattach to the session running that process. So I start up a new terminal, and type screen -r
$ screen -r
There are several suitable screens on:
    5169.pts-2.teamviggy    (05/31/2013 09:30:28 PM)    (Detached)
    4872.pts-2.teamviggy    (05/31/2013 09:25:30 PM)    (Detached)
    4572.pts-2.teamviggy    (05/31/2013 09:07:17 PM)    (Detached)
    4073.pts-2.teamviggy    (05/31/2013 08:50:54 PM)    (Detached)
    3600.pts-2.teamviggy    (05/31/2013 08:40:14 PM)    (Detached)
Type "screen [-d] -r [pid.]tty.host" to resume one of them.

But how do I know which one is the session running that process I created?
Now one of the documents I came across said:
"When you're using a window, type C-a A to give it a name. This name will be used in the window listing, and will help you remember what you're doing in each window when you start using a lot of windows."
The thing is when I am in a new screen session, I try to press control+a A and nothing happens.
Comment: A fast way to select one from a *list* of multiple open screens, is `screen -r` followed by **a number 1, 2, 3 ...** in that list of screens.
Comment: With modern versions of `screen`, it is possible to rename the `sessionname` from within a started screen session: type ctrl-a + : followed by `sessionname `
Answer: There are two levels of "listings" involved here. First, you have the "window listing" within an individual session, which is what ctrl-A A is for, and second there is a "session listing" which is what you have pasted in your question and what can also be viewed with screen -ls.
You can customize the session names with the -S parameter, otherwise it uses your hostname (teamviggy), for example:
$ screen

(ctrl-A d to detach)
$ screen -S myprogramrunningunderscreen

(ctrl-A d to detach)
$ screen -ls

There are screens on:
    4964.myprogramrunningunderscreen    (05/31/2013 09:42:29 PM)    (Detached)
    4874.pts-1.creeper  (05/31/2013 09:39:12 PM)    (Detached)
2 Sockets in /var/run/screen/S-paul.

As a bonus, you can use an unambiguous abbreviation of the name you pass to -S later to reconnect:
screen -r myprog

(I am reconnected to the myprogramrunningunderscreen session)
Comment: Yes; there's a difference between `ctrl-A a` and `ctrl-A shift-A`. The latter prompted me to `Set window's title to:`. Make sure you're pressing shift for the second A.
Comment: A very not-obvious caveat with naming screen sessions is that if you name them with `-S`, you have to use at the very least an unambiguous abbreviation of the name following the ID number and dot in the screen session's full name when resuming, unlike the automatically generated session names, where you can include the ID and dot.
Comment: Typo, fixed. And this site will not let me post a comment that short without some additional text.
Comment: That ctrl+a a works for you? I press control + a at same time and then quickly press a again and nothing happens.
Comment: I do: "screen -r 21tweet" and get as reponse: "There is a screen on:
        3239.21tweet    (08/21/2015 09:14:35 AM)        (Attached)
There is no screen to be resumed matching 21tweet." What could this be?
Comment: "ctrl-A to detach"  Huh?
Answer: I had a case where screen -r failed to reattach. Adding the -d flag so it looked like this
screen -d -r

worked for me. It detached the previous screen and allowed me to reattach.  See the Man Page for more information.
Comment: IMO you should note what the '-d' switch does... FYI '-d' detaches an "attached" session (i.e. an existing session attached somewhere else), and '-r' reattaches locally.
Comment: To extend on this answer a bit - when you do a `screen -list` and see its in `(Attached)` mode this is the right command. It happens if you have a spotty connection. One of my main reasons for screen.
Comment: This one much easier ^
Answer: An easy way is to simply reconnect to an arbitrary screen with
screen -r

Then once you are running screen, you can get a list of all active screens by hitting Ctrl-A " (i.e. control-A followed by a double quote). Then you can just select the active screens one at a time and see what they are running. Naming the screens will, of course, make it easier to identify the right one.
Comment: okie how i name my screen?
Comment: @austin screen -S
Answer: I tend to use the following combo where I need to work on several machines in several clusters:
screen -S clusterX

This creates the new screen session where I can build up the environment.
screen -dRR clusterX

This is what I use subsequently to reattach to that screen session. The nifty bits are that if the session is attached elsewhere, it detaches that other display. Moreover, if there is no session for some quirky reason, like someone rebooted my server without me knowing, it creates one. Finally. if multiple sessions exist, it uses the first one.
Much kudos to https://support.dvsus.com/hc/en-us/articles/212925186-Linux-GNU-Screen-instructions for this tip a while back.
EDIT:
Also here's few useful explanations from man screen on cryptic parameters
       -d -r   Reattach a session and if necessary detach it first.

       -d -R   Reattach a session and if necessary detach or  even  create  it
               first.

       -d -RR  Reattach  a  session  and if necessary detach or create it. Use
               the first session if more than one session is available.

       -D -r   Reattach a session. If necessary  detach  and  logout  remotely
               first.

there is more with -D so be sure to check man screen
Answer: The output of screen -list is formatted like pid.tty.host. The pids can be used to get the first child process with pstree:
screen -list|cut -f1 -d'.'|cut -f2|xargs -n 1 pstree -p|grep "^screen"

You will get a list like this
screen(5169)---zsh(5170)---less(15268)
screen(4872)---zsh(4873)-+-cat(11364)
...

Answer: screen -d -r 4964

or
screen -d -r 4874

$ screen -ls
There are screens on:
4964.myprogramrunningunderscreen    (05/31/2013 09:42:29 PM)    (Detached)
4874.pts-1.creeper  (05/31/2013 09:39:12 PM)    (Detached)
2 Sockets in /var/run/screen/S-paul.


Differences between grep, fgrep and egrep

Question: What are the differences between  grep, fgrep and egrep? What are some examples of using them differently?
Answer: See man grep:

The  variant  programs  egrep,  fgrep  and  rgrep are the same as grep -E, grep -F, and grep -r, respectively. These variants are deprecated, but are provided for backward compatibility.

And
Pattern Syntax
   -E, --extended-regexp
          Interpret PATTERNS as extended regular expressions (EREs, see below).

   -F, --fixed-strings
          Interpret PATTERNS as fixed strings, not regular expressions.

   -G, --basic-regexp
          Interpret PATTERNS as basic regular expressions (BREs, see below).
          This is the default.

   -P, --perl-regexp
          Interpret PATTERNS as Perl-compatible regular expressions (PCREs).
          This option is experimental when combined with  the  -z  (--null-data)
          option, and grep -P may warn of unimplemented features.

Prefer grep -F whenever you have no pattern to match as it is a lot faster.
Use grep -E and especially grep -P only when Basic Regex does not fullfil your needs as the matching will be slower.
Answer: What's Difference Between Grep, Egrep and Fgrep in Linux? - TecMint explains the difference well. All three do the same thing with the same code, but have different options.
egrep is the same as grep-E, interpreting PATTERN as an extended regular expression. It treats meta-characters as is and doesn't substitute them as strings like in the original grep.  GNU's grep, which is used by Ubuntu, has  no  difference in available functionality between basic and extended syntax (unlike the original grep found in some other distros).
fgrep is the same as grep-F. interpreting PATTERN  as  a  list  of fixed strings (instead of regular expressions), separated by newlines, any of which is to be matched. It doesn't recognize regular expressions, nor any meta-characters. For searching any direct string, it's faster, so this is the version of grep which should be selected.


Is drinking water while standing haram?

Question: What does Islam say about drinking water while standing? Is it haram or simply not liked ?
Answer: Prophet Muhammad SAW forbade us from drinking and eating while standing. This hadith makes it clear:

Anas (May Allah be pleased with him) reported:
  The Prophet (ﷺ) forbade us from drinking while standing. Qatadah reported: "We asked him: 'What about eating?"' He said: "That is even worse, (or may be he said) more detestable."

Islamqa.info elaborates it and says that

The scholars reconciled these hadeeth by stating that the forbidding mentioned here does not mean that it is haram, rather it is to be understood as advice, and that it is better to drink whilst sitting.

And it turns out that drinking water while standing causes GERD (gastroesophageal reflux disease).
So, it is not haram, but harmful.
Answer: No, it is not Haram.
It is Mustahab (recommended) to drink water while sitting during nighttime and while standing at daytime.
Imam Sadiq a.s. said:

Drinking water while standing at nighttime causes bile in body.
  (reference of hadith: Man la yahduruhu al-Faqih, vol.3 page 353)

Imam Sadiq a.s. said:

Drinking water at daytime while standing causes more sweating and
  makes the power of body more. (reference of hadith: Man la yahduruhu
  al-Faqih, vol.3 page 353)

Imam Sadiq a.s. said:

Drinking water while standing at daytime makes the food digestible and
  tasty and drinking water while standing at nighttime causes bile (reference of
  hadith: Kitab al-Kafi, vol.6 page 383)

Referenecs:

food & drink -Permitted & Prohibited
www.islamquest.net
Answer: No, it's not haram at all. But it's well known that the prophet (PBUH) used to drink while sitting.

Al-Bukhaari (1637) and Muslim (2027) narrated that Ibn Mas'ood (may Allaah be pleased with him) said: I brought water to the Messenger of Allaah (peace and blessings of Allaah be upon him) from Zamzam and he drank whilst standing.

For more information about this, you can visit this page also:
http://islamqa.info/en/21147
Answer: Based on my research there are slightly contradictory hadith regarding this:

Narrated An-Nazzal: Ali came to the gate of the courtyard (of the
  Mosque) and drank (water) while he was standing and said, "Some people
  dislike to drink while standing, but I saw the Prophet (ﷺ) doing
  (drinking water) as you have seen me doing now." - Sahih al-Bukhari: USC-MSA web (English) reference : Vol. 7, Book 69, Hadith 519.

.

Anas reported Allah's Apostle (ﷺ) disapproved the drinking of water
  while standing. - Sahih Muslim: USC-MSA web (English) reference : Book 23, Hadith 5017.

Use these information for your decision or try some additional research and update us if you find a definite ans.
Also have a look here.

Is drinking water while standing haram?


Why are Ashre and Alenu considered communal prayers?

Question: Shulchan Aruch (OC 65) says to say "Sh'ma" with the congregation when they say it, and Mishna B'rura 9 there says the same is true of other things recited as a congregation such as "Ashre" and "Alenu". (Indeed, it is common practice that one recites "Alenu" when the congregation does even if he is not at that point in the service or is not praying at all.) In what sense are the latter two considered prayers that are recited communally (more so than most of the rest of the prayer service), that the Mishna B'rura mentions them as communally-recited prayers? That is, what makes them communal, whereas other prayers aren't necessarily so considered?
Comment: @ba So, basically the entire davening?
Comment: related http://judaism.stackexchange.com/a/22911/759
Comment: could be because in many congregations those are sung out loud.
Comment: The Mishnah Brurah is giving those as an example. Maybe he means anything said in public (as opposed to, for example, birchos hanehenin)
Comment: Related: http://judaism.stackexchange.com/q/38241
Comment: It may be worth noting that the _Mishnah Berurah_ seems to be following the language of the [_Ba'er Heitev_ there](https://he.wikisource.org/wiki/%D7%91%D7%90%D7%A8_%D7%94%D7%99%D7%98%D7%91_%D7%A2%D7%9C_%D7%90%D7%95%D7%A8%D7%97_%D7%97%D7%99%D7%99%D7%9D_%D7%A1%D7%94#.D7.A1.D7.A2.D7.99.D7.A3_.D7.91), but adding _Aleinu_ as another example.
Answer: Regarding Ashrei see this M.Y. answer. He cites Ramba"m and, more importantly Talmud Brachot which states that the beginning words refer "to those who dwell in your house". This is a reference to those that come to the Bet Midrash and to shuls. The Gemarah states that people would spend time meditating in the shul prior to the start of davening. Ramba"m clarifies the requirements moreso stating rules about if the Chazan stands or sits and what the congregation does. So, this definitely seems like a communal prayer.
Aleinu has an interesting history. It seems that it began as an individual prayer. This article indicates that the first mention of Alenu appears in Siddur Rash"i siman 419. Originally, Psalm 83 followed the Chazzan's Kaddish (Kadish Titkabel) and *aleinu was considered an "extra" tefillah recited by the individual, similar to what is commonly done now regarding the 6 Remembrances, 13 principles of Ramba"m, etc.
This article indicates that the communal concept of Aleinu began during the Crusade period. The main purpose was to implant the concept of unity of G-d  in the people's minds esp. during the time that the Crusaders where trying to deter our beliefs. Because of this concept of unity of G-d, many connected the requirement to say Aleinu only during those tefillot that had Shema, as they saw a relationship of the two. Thus, since Mincha had no Shema, they did not recite Aleinu at the end of Mincha.
Note that Eliyahu Rabba 237:4 says that even if one has said Aleinu individually, one who joins a congregation later on, must say Aleinu with the congregation.
So, it seems that we are following the latest custom, and it would seem that reciting Aleinu is definitely "communal".


Cron Job User Permissions

Question: Is it possible to run a cli.php without user and password if cron owner has sufficient privileges? Having added it my Joomla dashboard is over run with entries for the cron user logging in. The user I created I didn't give any special acl but it seems to work. I'm assuming due to my cron rights. Suggestions?
Thanks
Wallace
Answer: I'm not clear exactly what issue you're wanting to address here, but you might want to look at running 'cv' from cron instead of cli.php/cron.php.  That does not require a password and will not record as a login.
See https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#cv

Cron Job User Permissions


Using attribute-based line to style lines with different Color for WMS in GeoServer?

Question: I am trying to use the styling of WMS using the so called SLD. I never used it before and I was wondering if I can do styling of a layer which has lines based on property.
I found here that something like this is possible. They call it (attribute-based line).
What I don't understand is where to define these attributes.
My line data are stored in a postgis and loaded in a store in geoserver. My postgis table has 3 columns (id, geometry, typeOfRoad).
My question is: Can I use the typeOfRoad attribute to color different the lines different?
Is there an example?
Comment: Yes - look at http://docs.geoserver.org/stable/en/user/styling/sld-cookbook/lines.html for detailed examples of what you want to do.
Comment: Thanks. I downloaded the sample data and saw the table's structure. That helped.
Answer: The easy way I use to set up styling is to load your dataset in QGIS and style it with that. Use only simple style features like colour and width and do it on a single attribute.
The save that QGIS style as SLD, and copy paste that XML into GeoServer's style dialog. Trouble shoot that a bit to make sure it all came through, and you're good to go!
You do need to understand your data structure first if you're going to use pure SLD. And if you want to do all your styling in GeoServer, take a look at the CSS plugin, which makes it really easy, or use the OpenGeo Suite webapp GeoExplorer, which is a basic styling functionality.


When trying to quickly end the game, is it better to skip building cities?

Question: In Roll Through The Ages, there are two game-end conditions: all monuments have been built (collectively among all players), or any player has purchased 5 developments. I've played this game about five times, so I'm still pretty new to this. I usually play to build cities first, and then end on monuments and developments more-or-less simultaneously, but I wonder: If you're trying to finish the game very quickly on developments (while your opponents are still building up their cities), is it better to just try to buy a development every turn, or should you aim to build a city or two on the way there?
Comment: Just for clarification, you arent using the Bronze Age expansion rules.
Comment: Additionally, you concerned at all with points, or just the number of turns to end the game?
Comment: I'm not playing with the Late Bronze Age expansion at the moment (though I hear it's marvelous). I'm concerned with points because I'm hoping to win with this rushing strategy, but I know there will be a tradeoff between speed and points (starving yourself to death will end quickly, but may well have negative victory points at the end).
Answer: If you are trying to rush the game - which is certainly a valid strategy if your early rolls force you in that direction - just buy developments whenever you can. If you have fewer cities, every turn you spend playing catch-up is a turn your opponents with more cities can buy either more-expensive (and more VP) developments or monuments. You're trying to dash across the finish line before they can reap the benefits of their well-developed engines. You won't be able to make much use of your developments, so just get what you can afford and gives you points.
One advantage of this is that if you are threatening the end of the game, say with 4 developments, your opponents will have trouble committing to the big, efficient monuments (that aren't worth anything if incomplete) and will have to settle for the smaller ones that are worth fewer points per worker. This is particularly troublesome for them if you're later in the turn order.
If you or your friends finds that a rush strategy makes the game too short, you may prefer the official Late Bronze Age variant that user1873 alluded to.
Comment: While it is true, that with perfect rolls you can end the game in 5 turns (the fastest possible), I don't think that is as likely as I'd you buy a single city, and then buy developments. This question truly needs a statistical analysis that can determine how likely you are to win the game on a Turn 5-x with one strategy of buying a development card each turn, another buying a city, and then developments, etc. I have a feeling that the 1 city strategy will end the game sooner on average
Comment: I agree that you will probably have 4 cities even in a rush strategy. I decide to rush based on the results of the first 2-3 turns, rather than a priori; maybe you get an unhelpful coins roll when you could really wanted workers on turn 2, so I take a development I can afford and just go from there. It would be strange not to toss 3 workers at city #4 at some point there; trying for the fifth is what I'm arguing against.
Comment: Since you can.reroll anything but skulls though, that is the heart of the issue. For example, it might make sense to stop rolling if you hit 3 coins, but in all other first turn rolls it might be better to reroll any 1-2 coin rolls (45% chance or less of hitting it). At a minimum, I think this question needs a first turn analysis for all 216 first roll results and the "proper move"


How much does it typically take to activate an ESC system?

Question: I drive a 2015 Subaru Legacy 2.5i Premium. The electronic stability control for the vehicle is called Vehicle Dynamics Control (VDC), and its warning light is supposed to flash during activation of the skid suppression function or traction control function. All the related indicator lights seem to be functioning normally, but I did not see the light flash during a slight skid I had going around an on-ramp, even though I regained control readily. Later I purposefully skidded a bit in an empty parking lot, but didn't get it to turn on. I suppose that means the system hadn't activated in either case. So, how bad a skid, or what type of skid, does it take to activate a typical vehicle's ESC?
Answer: From what you describe the stability control should have kicked in.
Check the VDC/ESC light is on when the igntion is first turned on. That tells you the system is operation.
If you suspect a problem then take it the dealer. Sounds like you should be under warranty still.
Answer: If this is traction control then it may not have kicked in until there was sufficient rotational difference between the wheels - the system does not detedt a slight "churp" of one wheel fractionally spinning on pullaway.
Traction control is not the same as yaw control - so if the car slid sideways a small amount but the wheels correctly rotated relative to each other then the traction light would not illuminate. Not all vehicles have a yaw sensing system but most with abs do have traction control now.


How to create a floating blob?

Question: I was wondering how would i get a UV Sphere to act like the floating blob in the image?
As well as
Answer:  ⬅
(I realised too late that this is annoyingly slow. It can be easily fixed by speeding up the Empty's animation and by increasing the number of emitted particles per unit time)
Wobbliness

Add an Empty to your scene, and animate it in some ways using only rotation al location keyframes. You will use this empty to drive the coordinate space for the ripples on the blob's surface.

On your UV sphere, add a "Displace" modifier:

Set the Texture coordinates to "Object" and the Object to your Empty. Reduce the strength to around 0.4. Select "New texture" in the modifier, then go on the "texture" tab and select Type = "Clouds" and Size = 5.

The empty and the Displace texture, combined, will give a result similar to this:

Bubbles

Create another UV sphere and place it on a different Layer.

Select your main sphere, and add a Particle System. Apart from the default values, use Emission Number = 20; Use Modifier Stack = Yes; Render type "Object"; Dupli Object = ; Size = 0.500; Random Size = 0.600; Field Weights Gravity = -1

Bake the Particle cache and this is the result:

For enhanced smoothness
The two spheres can be Metaballs instead of UV spheres, but achieving the wobbliness would become more difficult
Comment: sorry I only intended to address your original question (the sphere's behaviour). I don't have time right now to talk about the character animation part, but I honestly think this would be a separate question
Comment: how would i get the eyes to blink??
Comment: nice, but what about the elastic/stretching effect?
Comment: Metaballs would provide that
Comment: yes, so perhaps hide a metaball under the main ball so that the bubble would look like emerging from it? You should edit your answer to add this idea
Comment: @moonboots feel free to enhance or add another answer. I don't have time to break down a metaball-based solution right now.(unfortunately one can't use a point density texture on the emitter of the particles itself, otherwise a dynamic displacement could have done the trick without adding extra objects)
Answer: As suggested by Nicola Sap, another solution for the bubbles could be using metaballs. It would allow you to get the elastic/stretchy effect:

Create a metaball and make it just a little bit smaller than your head object so that you'll never see it. Parent this metaball to the head.
Duplicate several times this metaball, scale down the duplications and keep them inside the head. These are the bubbles.
Move the bubbles, they will stretch when they'll get out of the first metaball, and they will seem to interact with the head.
Give your balls enough resolution in the Properties panel > Data > Metaball > Resolution.

How to create a floating blob?


Does the Savoy theatre London allow shopping bags in the theatre?

Question: I'm going to watch a show at the Savoy Theatre in London and planned to do some shopping beforehand. Will I be allowed to take this in with me? The website states that the cloakroom will not accept rucksacks, or suitcases??
Comment: Don't know about the Savoy Theatre specifically, but in most London theatres there is very very limited space, so having shoppings bags at your feet or under your seat is probably not an option.
Comment: If you've just got a few bags, even if the cloakroom doesn't accept them you can probably just take them in and put them down by your feet/under your seat; if you've got an absolute tonne of shopping you might struggle. But I don't know for certain hence the comment rather than answer.
Comment: @jcaron I've not been to the Savoy specifically but in London theatres there's still usually a bit of space between your bottom and the floor, especially if (like most) it has tip-up seats. There can sometimes be some behind the seat in front of you as well in the case of tiered seating.
Answer: When I saw a show at the Savoy Theatre earlier this year I brought an empty shopping bag with me (when I exited it contained the programme for the show). I've done that in several theatres, and also entered with a shopping bag containing the programme from a show I saw earlier that day, or the ticket for the show I was going to see later that day. I know I've had other small things in a shopping bag entering theatres in London, I also know that I've been at the Savoy theatre before, but I don't remember if I had anything in my bag back then.
As at most theatres, the guards at the doors wanted to look into my (and everyone else's) bag.
As you can't leave your bag in the cloakroom, you will have to bring it into the auditorium with you (or leave it, where it will probably be removed), so don't bring a ton of shopping. I just put my bag on the floor beneath my seat and like that everything worked.
Answer: You are likely to be allowed to take into the auditorium a shopping bag that's small enough to fit under your seat (they'll probably want to search it first for security purposes). There may not be very much space under your seat, some London theatres are quite cramped.
If you need to store something bigger (e.g. rucksack or suitcase) then I suggest one of the following:

Left Luggage at Charing Cross station (a few minutes walk from the theatre). Book here: https://www.left-baggage.co.uk/en
"Stasher" luggage storage service in the shop Gift London, which is on The Strand and looks to be very near the theatre. Book here: https://stasher.com/luggage-storage/london/stashpoints/the-strand-gift-london-856252379185 There's also a similar service named BagBnB which has a location nearby (it doesn't give the exact location until you pay - it may actually be the exact same shop as for Stasher): https://bagbnb.com/luggage-storage/london/trafalgar-square/luggage-storage-charing-cross-station

The "left luggage" services at the station are well-known and reliable. I don't know anyone who's used the Stasher/BagBnB services, but I'd expect them to be ok.
Hope that helps. BTW traffic in Savoy Court drives on the right-hand side of the road, don't get run over. :)
Comment: Victoria Coach Station is also a nice place to store bags, think it's about £5.50 for up to 24 hours storage. Though it's about 20-30 mins away from Savoy Theatre.


Backup of home folder store network and printer settings?

Question: Does restoring my home folder, restore network and printer settings on elementary os?
Answer: It shouldn't. Those are handled by the system and will be in system config files
/etc/NetworkManager is the directory where network settings are stored.
As for printer settings - the man pages says "The printers.conf file defines the local printers that are available. It is normally located in the /etc/cups directory and is generated automatically by the cupsd(8) program when printers are added or deleted."


How to deal with over-complication?

Question: I often catch myself doing code unnecessarily complicated (sad but true). Is there any set of rules, discipline, etc to help avoid that? (excluding the KISS principle, because I know it but often forget when it comes to the real code :)
Comment: Could you show some examples?
Comment: Learn the Zen way http://teddziuba.com/2010/10/taco-bell-programming.html
Comment: @ThorbjørnRavnAndersen - +50.  I have a boss that keeps saying that about my code and he can't seem to come up with any examples or reasons why it's complicated.  Most concrete he seemed to get is complaining about using aggregate initializers instead of memset!
Comment: Just stop adding new features to it and move to next class/module/library.
Comment: @tp1 That is probably not the best solution. Moving stuff to other modules won't solve anything. It may actually make things worse, as you lose the connection between actually connected things. Only separate features if they have no (close) connection.
Answer: As Antoine de St-Exupéry says: "A designer knows that he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away."
This is a difficult and common problem, but it's something you can address over the course of the next few years. Recognizing it's a problem is the most important step, and once you have learnt to correct the kinds of complications you tend to add, you'll start designing without them.
When I realized I had this problem early in my career, I found it helpful to analyze and reanalyze every class, function, member variable, local variable, and nested function calls to see if things could be consolidated or eliminated while still meeting the given requirements. Basically, code golf.
Comment: Terseness != simplicity.
Comment: @CrazyEddie - Agreed, and I did not mean to imply an equality.
Answer: I generally do these things to avoid over-complication

Before you start to code, make a plan and design an interface for your code. Always think about what your code is actually going to do and what it probably isn't. Be realistic about that, but don't use any quirky solutions. Each function in the interface should do exactly one thing, if possible what it does should only depend on its arguments.
A good measure to see whether your code is overcomplicated is deepness of nesting. Once my code is nested five or so levels deep, I know that something went wrong. Try to split your code into functions that express several steps of what you want to do. Expect the compiler to generate efficient code for you. Compilers are smart.
Split your code into modules that represent functional units of your program. Each module should contain a set of functions that are likely to be used together. Neither throw unrelated things into one module nor write a group of modules that are always used together.
Don't implement functionality you won't need, but keep in mind that one might want to expand your program
Comment: First bullet is easy with TDD
Comment: As an adjunct to the first bullet, if you can't describe what it is doing _without code_, is it really justified in its existence?
Answer: Maybe you should have a look at some literature about extreme programming. Those guys are very much trying to avoid unnecessary complexities. A common source for complexities is trying to generalize even if there is only one application of the generalized whatever. I think Kent Beck recommended to only generalize something if you have already implemented it in three different ways. For the first tries you should "do the simplest thing that could possibly work".
Comment: In TDD there's never just one application of an object since unless it's ONLY unit tested.
Answer: I'd like to think that I am pretty good at keeping things simple, at least when using C#, even though stack exchange is full of people who are better than me. You get better with experience. I personally do not like to plan ahead too much, particularly for small tools because I do not really know which exact direction I will move in until I sink my teeth into the project. So, I have to have something semi-working first. Once it does and I see no more potential hard spots, then I start trying to simplify things. Now, the easiest way to simplify things is to keep the UI and features simple to begin with. I have been making prototypes recently so sometimes it is easy for me to decide what goes in and what does not. If you have to give estimates and the code goes right into the core and will be highly scrutinized by QA, then you probably cannot afford the time to make everything perfect because of deadlines plus the quality better be good. In this situations you WANT to keep things simple in order to avoid/minimize the stress of missed deadlines.
If you have more freedom, and you want to delight the users while not taking a year to do it, then ask people for specific feedback. Do a random hall usability testing to make sure that other people can use the tool. Consult with more experienced colleagues on what a good approach might be. Implement something that works and post pieces on the code review site to see how others can solve the same problem better.
If you are about to decide between library A, library B or rolling your own - ask on Stack Overflow for advice. If you still are learning something such as CSS or SQL or XAML - ask on Stack Overflow.
You want to be breaking a problem up into pieces, find a good solution for each sub-problem and then put it all together.
Along the way you should utilize tools for re-factoring, style checking, TDD, etc.
For C# I would recommend Resharper, StyleCop. Try to find something for your language. Basically, you want to use your time efficiently so that you will have time for "post-mortem", refactoring, creating a library that
Once you are in the simplification/perfection stage, you are never quite done. This sucks if you have to move onto another project and not ever touch this code again unless fixing a bug. If the stakes are not as high, then you can go back to the older project and remove lines and lines of code once you discover generics, some library, etc. Did I mention that Stack Overflow is a great resource? Just do not be a http://slash7.com/2006/12/22/vampires/.
You can learn a lot from re-factoring old code, so that you will avoid making the same mistakes in the future. I hope this helps.
Answer: Even when I think I'm doing a good job of writing a program, chances are it can be simplified a lot.
I find the most useful thing to do is ask "Regardless of how it does it, what is this program supposed to accomplish?"
i.e. If it's a compiler, it is supposed to read a file of code and write something that can execute. As such, if it's doing nothing unnecessary, it will be I/O bound.
I've also found that performance tuning leads to simplifying, as in this example, so if you get pretty good at diagnosing performance and recoding to improve it, that alone will teach you what you may be doing that is needlessly complicated, so you learn not to do it.
(Often it is what you've been taught to do.)
Answer: I don't think I believe in the KISS principle anymore.  First of all, they were overrated...
Consider this function
void process_payment(payment const& p) {

    account * a = get_account();
    if (!a) {
       std::cout << "No account information.\n";
       return;
    }
    ...
}

That's as simple as it gets.  If we follow the KISS principle then we might do something like this.  The function is NOT simple to test since now we have to redirect standard output to something the tests can process.  You fix this by adding complexity to the function's interface by taking the output handle as a parameter.  This is not as simple as can be done and I've run into KISS adherents that really freak out over stuff like this...especially if they're fighting with their superiors about whether unit testing should be done.
Furthermore, what is "simple" is in the eye of the beholder.  Just the other day I caught shit for using a buffer object that grows as needed rather than malloc+memset+memcpy to copy a string handed to me by a network API.  In my opinion using a buffer object is simpler because it's already there, does what I need (albeit it will do more), etc...  In the other guy's opinion doing it by hand is simpler because the buffer is overkill.  He's of course right because he's the boss.
Yet more, when faced with the decision to use a global variable to allow access by many functions vs. passing this variable around as a parameter it is quite obvious that the former is much "simpler".  It's also rather obvious that in most cases it is the bad choice.  Adherents to KISS though pick the former and their code turns into this untested knot of spaghetti that isn't even possible to conceptualize since modularity and decoupling have all gone out the window in an effort to keep things "simple"...and yes, by an obvious and possibly naive measure of simple it is much simpler to reach out and grab touch global than it is to call a function existing only to hide this global or pass around a parameter.
Consider also this code:
void somethingAboutStrings(char* in) {
    char buffer[128];
    strcpy(buffer, in);
    ...
}

Very simple, that.  I've seen way too many KISS adherents writing C code that looks like that, including the one I've currently got hammering on everything I do as "complicated".  They assume so damn much and get way simpler than is safe to.  Anyone who knows the language knows that the function above is incredibly unsafe and WILL someday result in bugs that take hours and hours to resolve.  It's code like the above that give C and C++ bad names in fact and the industry is riddled with shit like this from basic apps to the financial industry and others...it's terrifying to me.  But this is "simple" and why would you write a bunch of error detection and buffer protection code when you know that the input is always going to be shorter than X?
The answer to that question is of course that someone isn't going to know that you have this internal and arbitrary size limit and will exceed it...or some bug up the line will--which is what happened.
After catching crap for the last 8 months from this KISS adherent I've become rather cynical of the idea and think it probably leads to more problems than catches them.  Writing reusable code is a good thing.  Writing tested code is a good thing.  Decoupling is a VERY good thing...and I would assert that in the end they make things easier to manage, easier to read, etc..  They are not, however "simple"; at least not in the way I've seen that word used of late.
Comment: "You keep using that word. I do not think it means what you think it means." - Inigo Montoya

How to deal with over-complication?


Is a 'dumbphone' mobile more secure for basic phone calls than a smartphone?

Question: By dumbphone I mean: no internet connection, very limited features, etc.
By more secure I mean: secure from malicious and direct hacking. I don't mean as in protected from government tapping/snooping; I don't mean from authorities who could be granted access somehow, through the mobile operator company.
Has the security of the basic phone call changed much, in the last 10 years ? Obviously smartphones have an endless number of new security holes as time goes on, a quick browse of Apple's security updates history, or searching Android in the tech news, proves this. But I'd suspect most of these vulnerabilities can be utilised because of the frequent connections to the internet made with them.
So, do smartphones utilise anything new [purely in] the initiation and connection of just the phone call itself ?
Comment: Does [this](https://en.wikipedia.org/wiki/Nokia_6650) qualifies as a dumbphone by your standards?
Comment: @DmitryGrigoryev It has some kind of java.... thing.   That could be a not-dumb phone, or a very dumb phone depending on your point of view.
Comment: Define "more secure", please. Consider that Macs are claimed to be "more secure" by the simple fact that not as many people use that OS so there's less bang-for-buck for hackers. Dumb/feature phones *could* be considered more secure by the simple fact that people might not be targeting them any longer.
Comment: Is there a real difference between "illicit hacking" and "government tapping/snooping?"
Comment: "Malicious" doesn't seem any better than "illicit". Government can be malicious, too. Maybe you wish to say that your only realistic target is protecting yourself from hackers with fewer resources than those of a nation state.
Comment: Note my question http://security.stackexchange.com/questions/124900/in-mobile-can-early-media-be-sent-from-the-phone would surely apply to dumb phones, where the mic attaches straightly to a simple and undocumented modem chip.
Comment: Do currently available dumbphones even operate on non-internet enabled radio standards?
Comment: @gerrit GSM usually **is** internet enabled.
Comment: @DoritoStyle Really?  I thought that was GPRS.
Comment: @Octopus Yes illicit was the wrong word, I thought too
Comment: I'm still not certain what your difference is. I think maybe you mean accessing the phone's data directly on the phone vs. accessing logs of your activity stored at the phone company?
Comment: Both of the above are the idea of what I mean. Free free to submit edit to question description.
Comment: Are you referring to modern "dumb" phones or the feature phones of the mid 2000's?
Answer:
Has the security of the basic phone call changed much, in the last 10 years ?
So, do smartphones utilise anything new [purely in] the initiation and connection of just the phone call itself ?

Yes. There are new technologies used to establish phone calls in cellular networks. Those new technologies mitigate some attacks which were possible due to flaws in the older ones. So if you use a "dumbphone" that runs on the older technologies you are subject to those attacks (i.e. the inverse is true, the smartphone is in this respect more secure).
The technologies used in the cellular networks basically evolved over time like this: 1st generation (analogue), 2nd generation (GSM etc.), 3rd generation (UMTS etc.), 4th generation (LTE etc.).
If you use a device running for example the GSM technology, an attacker might intercept your calls with hardware costs of only about $30 USD. Intercepting calls made with the newer technologies is harder up to a point where only nation state attackers can perform them.
Comment: Virtually all modern smarphones still support 2G, so they are still vulnerable to the same kind of attacks.
Comment: That's true, but the attacker would then need to perform a downgrade attack because those devices would only use the older technology if the newer one is not available.
Comment: A key point is that the attacker would need to be in cell range. If i infect your smartphone, i don't have to drive behind you with my RTLSDR / USRP to read your texts
Comment: @Hacktiker In most countries (excluding Austria AFAIK), a downgrade attack is a matter of standing in the area covered by the old 2G cell.
Comment: @DmitryGrigoryev agreed! That is why I set my smartphone to either connect LTE or show the antenna tower my best finger (not that one).
Comment: No offense, this misses the question completely, I feel, while being upvoted more than double of the next answer. The OP is not asking about using a GSM phone, but using a phone that *only* consists of the cellular network functionality, without the "smart" technology on top (i.e. without Android, iOS, Blackberry)...
Comment: My understanding of cellular networks, albeit limited, is that they all use SS7 which is fairly vulnerable to attack and the cellular network (XG) you are using is irrelevant making a basic phone no better than a smart phone.
Answer: Case in point: Snowden uses a feature phone (i.e. 'dumb phone). A few people would like to attack his phone, but even if they succeed, it's a very limited reward. OpenMOKO is an example of such a phone. An attacker will likely need a good working knowledge of the system he is trying to penetrate, and android is easy to persist on once in. Harder to persist on a classic Nokia.
With a HackRF One and OpenBTS it is still possible to IMSI catch (and downgrade crypto, and listen in on protocol data + calls), and in any case it is my understanding that when the phone modem is using DMA you are somewhat at the mercy of your telephony provider - who can silently push configs, over-the-air updates etc.
If possible, ensure that your phone cannot have its 4/3G downgraded to broken GSM. If using a smartphone, do not use default browsers, use apps that provide end-to-end crypto for IM and calls (WhatsApp, Wire, Signal (the last one is best), and if necessary VPN on public wifi.
Comment: Snowden's threat model might be a little different from the OP's.
Comment: "If possible, ensure that your phone cannot have its 4/3G downgraded to broken GSM." Is this setting available on any known phone? What would this feature be named?
Comment: @l0b0 as far as I know this feature is present on all sufficiently modern Android phones: on mine, it is in *Settings* > *Mobile networks* > *Preferred network type*, which then lets you select between *2G/3G*, *2G only*, or *3G only*. The setting in question would be *3G only*.
Comment: The reason for using a dumb (feature) phone in a case like Snowden's has nothing to do with the security of _calls_. If that was the only thing at stake (as this question asks) that data point would be irrelevant. The difference is in the surface provided for other kinds of attacks. The firmware of smartphones (including baseband radios, etc.) are often hackable from the network provider end of things and more likely to be turned into unwitting bugging devices than a less capable device. (Also turning them on and off, etc. is a lot faster if you're worried about the firmware being compromised.
Comment: @LéoLéopoldHertz준영 No it's not.
Comment: @LéoLéopoldHertz준영 http://shr-project.org/trac . less is more.
Comment: @l0b0 Android had a very well hidden menu which allowed this to be changed, though I'm not sure if it still does. I can't seem to find it today.
Comment: Why is signal best? That sounds pretty opinionated and subjective- "best" in security? Usability? Price?
Comment: It is open source. https://github.com/WhisperSystems/Signal-Android + https://github.com/WhisperSystems/Signal-iOS
Comment: And it will present both peers with a random phrase on each voicecall to make MiTM at least noticeable.
Comment: There was some talk recently about it being possible for WhatsApp's owner, Facebook, to silently decrypt all data passed theough the app. http://boingboing.net/2017/01/13/whatsapp-facebooks-ability.html - but regardless, it's better than raw SMS/voicecalls.
Comment: @l0b0 My stock Samsung Galaxy S5 has such option in network settings. I can choose between LTE/3G/2G, 3G/2G, 3G, 2G. If I set it to 3G, it does not connect to 2G networks.
Comment: @AndrejaKo Sounds great. But what will it do if 4(LTE)/3G coverage is unavailable (for any number of reasons)?
Comment: @Caleb Signal at least deals with voice calls in an ethical manner.
Comment: @user400344 Not use the phone or accept the possibility of interception, same way as it is with any other broken encryption method.
Comment: Can you give more examples of dump phones and their persistances, please? OpenMOKO is pretty deprecated.
Comment: @user400344 Yes, any proposal for phone with less functionalities? Any with only 4G or 3G? No GSM.
Comment: A raspberry pi zero with a module that supports 4G/LTE, an LTE antenna, and several USB batteries.
Answer: Sure, Internet connection and physical data intefaces like USB or microSD constitute attack vectors.
However, if you use your smartphone as a dumbphone (i.e. never enable data connections, never plug an SD card in it and never connect it to devices other than the official charger), the level of risk is nearly the same.
It can be argued that if your phone falls in the wrong hands, nothing will prevent the attacker from using those interfaces, or exploit Android bugs. But physical access is fatal for dumbphone security as well. Those devices also have debug interfaces and interface bugs which can be exploited.
Comment: it's very nearly fair to just say physical access is fatal to security period. if it's not, there's almost no way the device will be as usable and mobile as a phone
Answer: I think you might be conflating two different things when you say "more secure".
On the one hand, I'm sure that the old proprietary operating systems of 'dumb phones' could easily be hacked if the attacker could analyze the firmware, versus 'smart phones' where security, permissions and the safety of managed code prevent a lot. From that perspective 'smart phones' are vastly more secure.
However, if you look at the two phone types in terms of attack surface, there are vastly many more ways of attacking a 'smart phone' than a 'dumb phone'. If all your 'dumb phone' can do is text/call, the hacker is limited to physical access or cellular MitM attacks. Bring Bluetooth or internet connectivity into the picture and you open a couple more avenues. But on 'smart phones', someone could convince you to download a malicious app, or they could attack you through a legitimate app that has vulnerabilities, or they could phish you, etc.
However, if you had both a 'dumb phone' and a 'smart phone', and limited your activity ONLY to phone calls, I would still expect the 'smart phone' to be more secure with respect to targeted hacking.
Comment: I think you are underestimating the software complexity of non-smartphone cellphones.
Comment: *"old proprietary operating systems"* You mean like how Symbian is proprietary like Windows Phone is proprietary like Apple iOS is proprietary? The only real non-proprietary choice would be Android, but I strongly suspect that there are *plenty* of proprietary bits in a real-world Android installation even before you start adding apps yourself.
Comment: @MichaelKjörling a fair point - I suppose I'm more referring to hardware manufacturers who roll their own OS to cut costs - really just a menu system baked into firmware.
Comment: +1 for the attack surface. You need to have some dedicated, malicious neighbours if they set up an IMSI catcher. However, if the phone is an internet-connected computer, then every script kiddie on the internet is a potential attacker. And it's not only the number of potential attackers which expands the attack surface, it's also the user. With my old dumb phone, I made calls and sent texts. With my smartphone, I visit websites and install apps.
Answer: It can mitigate some risks but expose you to some other ones.
You see, in most smartphones (but not all), the cellular network interface is separate from the main CPU and only talks to it through a specific bus - if the mobile interface is compromised it's not game over just yet as the attacker still has to compromise the main CPU (though vulnerabilities in the code that controls the mobile interface, text message parsing like Stagefright, etc).
Feature phones, on ther other hand use an all-in-one chipset that runs both the OS as well as handle cellular communication. If that one is compromised the attacker gets full control of the phone straight away. It is also much easier to hide malware in a feature phone than a smartphone because you don't have to worry about future OS updates breaking it, or some advanced features like a Terminal (on Android and jailbroken iOS) which could allow someone knowledgeable to detect your malware.


How to assess predictive validity of a variable on the outcome?

Question: I am looking to assess the predictive validity of two measures (M1 and M2) on a binary outcome. After constructing my model, do I just calculate odds ratios and compare the odds ratios for the two measures?
Comment: What do you mean by predictive validity? There are several options: AUC, Brier-score, Sensitivity vs specifitity plot, etc.
Comment: I'm trying to see if M1 or M2 predicts the outcome better. I though AUC was to assess the validity of the model rather than specific variables within the model
Comment: Yes, it is global metric. So you want to compare if other variable is more powerful than other in some sense? What are their measurement units, that affects things?
Comment: yes that is what I want to do. The measurement units differ with one being categorical (0, 1, 2) and the other being count (1-27).
Comment: I think it will be quite different to have a change from category value 0 to 1 than to move one unit upwards in scale of your continuous variable...
Answer: Thanks for the additional info.
Now I can only suggest you to use likelihood ratio based test where change in the LR statistic without other variable is the interesting outcome.


Do Google Play Apps Work on the Pi

Question: This is probably very easy to answer but I am still trying to wrap my mind around ARM vs Intel type processors. I understand that you cannot run Windows 8 or Microsoft Word on the Pi because it is an ARM processor.  Does Android run on ARM and if so does that mean all apps on Google play would work with the Raspberry Pi(not considering the load on the GUI)? How can you know if something will run on an ARM processor?
Answer: The processor is not really the problem.  The reason Windows software does not generally work on ARM is because it is closed source and Microsoft have not released ARM versions.
Although Android has its roots in Linux the kernel is incompatible with the Linux kernel used on the Pi.
If you can find a way of running Android on the Pi you will be able to use Android apps.  No one has been able to find a satisfactory way to run Android on the Pi.
You find out if software will run on a platform by seeing if there is a version available for the operating system you want to use on a platform.  The pre-requisite is that the operating system itself will run on the platform.
Answer: ARM is actually a family of processor instruction sets.  The A/B/+ model pis  have a processor which is ARMv6, whereas the Pi 2 is ARMv7.  A few things to note about that:

ARMv7 is backward compatible with ARMv6, meaning an ARMv7 processor can run code compiled for ARMv6.  However, the inverse is not true: an ARMv6 processor cannot run ARMv7 code.
Most (but not all) Android devices are ARMv7 based; I don't know if there are any that are ARMv6.

To run an Android app, you need an Android userland; you cannot run them on a GNU/Linux system except with the use of an emulator.  Even if you could get this to work on a pi, it is going to be too slow to be worthwhile.  It is noticeably slow on an a big x86_64 desktop; the emulator is intended for development purposes.
You could install an Android userland on a pi.  Since there are few if any ARMv6 Android devices, finding such a userland will not be easy.  It is open source and can be compiled however, and people apparently have done this (see here halfway down), although it sounds like it is a pretty old version (2.3) -- but of course that article is two years old.
Android on the Pi 2 is much more feasible; besides the architecture, a big issue with Android is fitting it usefully within 512 MB of RAM.  1 GB, though, is enough.  I'd assume sooner or later this will happen.1
Razdroid is project which aims to port Android 4.0 to the pi, although it does not appear to be ready for prime time.

1. Perhaps the reason more effort hasn't been made here is because  there are already a number of ARMv7 dev boards in the Pi 2's niche that do have official Android images available.
Comment: I think some years ago i saw ARMv6 based Android (<= 2.3.x) devices! - they were low cost devices with less memory than 1GB and hardly any storage (needed SD-card for installing apps).
Comment: I have one of those! You mean like android 2.3.6? Some apps work and some don't without an sd card.

Do Google Play Apps Work on the Pi


Difference between this and that as a demonstrated adjective

Question: Two people talking about a man which is not present at that moment. One of them said how will you find this man?
Why did the people use this instead of that?
Answer: The use of both that and this is correct.
They used "this" because they were currently talking about the man, and hence, they were pointing to "this man they were talking about".
Comment: The fact that they were *pointing* at the man (that's not stated in the question—and, in fact, isn't possible because the question says that the man isn't present, unless you mean it figuratively) doesn't, itself, determine if it should be **this** or **that**. If you point at something in the distance, you use **that**; if you point at something next to you, you use **this**. It's not the pointing that determines the word, it's the distance between yourself and the object. (Either literally or figuratively.)
Comment: @JasonBassford I used **pointing** metaphorically, not literally.


What does the title Silver Linings Playbook mean?

Question: Yesterday I got to watch the movie Silver Linings Playbook. What is the theme of the movie and how is the title related to the context?
Answer: Football is incredibly important to the main character, Pat, and his family. In that context, a playbook is "a compilation of strategies the team would like to use during games". This usage is reinforced by the playbook graphics on the film's promotional materials.

The poster uses quotes from each character as explanations for their "plays", which I would say is equivalent to their outlook on life and strategies. At the beginning of the movie, Pat believes that if he works hard and improves himself, everything he wants to have happen will happen. He thinks that every bad thing will end up having a positive effect, leading him to his goal of reuniting with his wife as a better husband than before. The movie is primarily about him figuring out the strengths and failings of his absurdly optimistic approach, or "Silver Linings Playbook".
Comment: As the commentator that earned the "answered," I agree this explains the 'playbook' most astutely. (I presumed the original question was related to the 'silver linings,') but agree your response added much depth.
Answer: John Milton coined the phrase 'silver lining' in Comus: A Mask Presented at Ludlow Castle (1634) in reference to clouds. Since then the phrase has represented a prospect of hope or comfort in a gloomy (cloudy) situation.
To the less literary-inclined, the Grateful Dead had the song, "Touch of Grey" that's central theme was a silver lining.
A playbook suggests a means to attain that "silver lining."
Answer: Quoting from Wiktionary,

every cloud has a silver lining, proverb
In every bad situation there is an element of good.

And from Urban Dictionary:

phrase used to tell someone that there is a brighter side to the
  problem they are facing. the phrase comes from the fact that, every
  dark rain cloud has a silver edge, or lining.

So as other users commented, the silver lining describes a good side of something that is apparently bad. In the movie's plot, we can find that the main character Pat (Bradley Cooper) is having a bad time but when he meets Tiffany (Jennifer Lawrence) the situation is still bad but with a better approach.
Answer: From the Wikipedia page of the Novel-

Pat believes he has only been away a few months, but soon realizes it
  has been years, and struggles to piece together his lost memories and
  what has become of his wife, Nikki. He has a theory that life is a
  film created by God and that its "silver lining" will be the end of
  'Apart Time' with Nikki.

So this line shows the real intent of naming the novel this way and the movie just copied the title.
Comment: Down-vote........?


How do I get notifications for newly-created tickets in JIRA project, without enabling default notifications?

Question: I need to receive a notification whenever anyone creates a new ticket in my project in JIRA. But the admin has disabled the default notification feature.
I have been told to enable it by JIRA workflow notification.  How do I do that?
Answer: You may also create a Jira Automation to send you a mail every time a ticket is created. Details HERE.
Regardless of the approach, worth to discuss with the jira administration on how to collaborate with them on notifications.
Answer: There are some third-party plugins for this sort of functionality, but if you don't want to do that and your admin won't set up a notification schema, you have only three other choices that I'm currently aware of.

If you can get API access, you can query a JIRA board for all issues.
Treat it as a workflow issue, and ensure that users opening new issues tag you, e.g. add <code>@Satish-The-Agile-PM</code> somewhere in the ticket, or simply have it added to your new-issue templates.
Periodically check your project and add yourself as a watcher to all issues.

The notification schema is often problematic because most organizations use JIRA for individual assignment rather than assigning to teams with a distribution list address, so it can become quite noisy. Whether or not the schema can be fine-tuned for just your projects so that the only person annoyed is you is something you may need to discuss with your administrator. As I consider the default JIRA approach to individual tickets an inherent anti-pattern, I've never explored using that particular option the way you describe, so I can't advise you on how to do it that way.
Answer: Include the Custom Event in Notification Scheme.
But You will still need JIRA Administrator permission to configure the Notification Scheme so better to go with the 3rd option stated by Todd
"Periodically check your project and add yourself as a watcher to all issues."
Answer: You can also try going to Project settings > Workflows, select create workflow, enter a name for your workflow and select the project where you want to use it then click create.
On the workflow editor page, select add transition and select the transition to receive a notification when a new ticket is created then click add action.
From the list of actions, select send email as you would need to configure the email notification settings; once done, save and publish the workflow.


Event ID 534 logon Failure

Question: Cannot understand why the iuser_{machinename} is logged as in the event as logon failure: The user had not been granted the requested logon type at this machine.  Thank you
Answer: Sounds like an issue with User Rights Assignments for the anonymous access account in IIS. See the following Microsoft KB:
Error message when you try to view a Web site that is hosted on Internet Information Server 6.0 by using anonymous access: "401.1 Unauthorized: Logon failed"
Comment: Very good. WE are checking our settings; Thank you for your comments to this question.!

Event ID 534 logon Failure


C Pointer Question

Question: In my embedded c program I have a struct:
struct var{
    unsigned long value;
    unsigned long length;

    + More
}

An array of these structs is used to hold variables. Most of the variables stored are simply stored in 'value' and so the length is set to 1.
However, some of these variables are arrays and Im trying to store the start address in  'value'.
unsigned long lookup[10];
variables[x].length = 10;

Then I'm not quite sure how to store the address...
variables[x].value = lookup;
// lookup is a pointer so I cant put it into value

OR
variables[x].value = (unsigned long)lookup;
// value reads back through sprintf+uart as '536874692'
// which couldnt be a valid memory address!

I might just give up and add a pointer variable in the structure
EDIT:
I wanted to avoid adding the pointer to the struct becasue I would have to go back and rewrite the flash read/write functions to also save the pointer. These are pretty complicated and currently work so I'd rather not touch them!
Comment: why couldn't 536874692 be a valid address?
Comment: Just realised that. 536874692 is 20000EC4 which probably is valid...
Comment: Note that if your "flash read/write functions" don't know that lookup is a pointer, they won't know to save the data that it points at.
Answer: A cleaner option would be to use union.
 struct var{
     union {
        unsigned long numeric;
        void *ptr;
     } value;
     unsigned long length;

     + More
 }

You could optionally also include a type enum, as often done with union-using pieces.
Answer: You could store the address in value by casting it to an unsigned long, as you demonstrate. (I think the value you're getting is a valid address... in hex, it comes out as 0x20000EC4... looks like your embedded system's data segment starts at 0x20000000, huh?)
However, casting pointers to ints (or longs) is never "clean". Why not add an
unsigned long *starting_address;

to your struct? Then you can avoid the typecasts. If you're worried that this will require more memory, you can use a union that stores either an unsigned long *starting_address or an 'unsigned long value`, which is still cleaner than casting.
Comment: looks like 0x20000EC4 is valid, Thanks.
Answer: Assuming that the system pointer size is the same as that of an unsigned long (no gaurantee, check it with sizeof) you would use the cast. But this is messy and error prone. Consider using a union instead.
struct var{
    unsigned short type;
    union {
        unsigned long i;
        void *p;
    } value;
    unsigned long length;

    + More
}

where you store the type in type.
Answer: I don't see the downside of putting a pointer in your structure. Do you want the memory to be in a continuous block? You could just do
struct var
{
   unsigned long *value;
   unsigned long length;

   unsigned long othervalue1;
   unsigned long othervalue2;
};

But don't forget to allocate memory for value separately by using malloc. Or if its a fixed amount of space you want use
unsigned long value[50];

Comment: I wanted to avoid adding the pointer to the struct becasue I would have to go back and rewrite my flash read/write functions to also save the pointer. Only value is stored in the flash and all the other struct members (not shown) are populated manually.
Answer: What happens if you sprintf+uart lookup.  What value does that give you?
Unless there was casting or sign extension involved, the actual data is the same.  It is just interpreted differently by sprintf.
Your solution to just use a pointer is good.  If you really wanted to use an int, you should use intptr_t, which is guaranteed to be big enough to fit a pointer.
Answer: Why not make the value a one-lenght array, when the length is 1? You wont be using more space anyway.
Answer: I'm not sure why you're not defining value as an unsigned long*.
Instead, do something like:
struct var{
  union{
    unsigned long solo_value;
    unsigned long* multi_values;
  }

  unsigned long length;
  + More
};

Also, alignment rules aren't enforced as strongly* on the stack as they are in the heap.  Though, if you're using any recent compiler they should be anyway...  you're probably smashing something with sprintf.  Pull out the value using a debugger or something more reliable.
*Technically malloc() et. al. enforce the 8-byte alignment rules, not the language.
Answer: Your best choice is to use an enum, as already stated:
typedef struct var{
     union {
        unsigned long numeric;
        void *ptr;
     } value;
     unsigned long length;

     // + More
 } composition_t;

then use the lenght member to discriminate the type of data:
composition_t array[2];
unsigned long lookup[10];

// Just a plain unsigned long value
array[0].value.numeric = 100;
array[0].length= 1;

// An array of 10 long values
array[0].value.ptr= lookup;
array[x].length = 10;

Answer: Bear in mind that an unsigned long is not guaranteed to hold a pointer, although it's likely to in embedded systems.  Do the standard thing and use a union, as other answers suggest.  A union will Do The Right Thing in any standard-conforming implementation, not just what you're using right now.  Further, it has the advantage of saying what you mean, which is always valuable when somebody who doesn't immediately grok the code (maybe you, a year later) has to deal with it.
Answer: Are you aware of offsetof?
http://en.wikipedia.org/wiki/Offsetof
I'm not sure what you're really trying to do, but storing the address of one structure member in the same structure seems unnecessary.
There's also a container_of macro (google it) which is built using offsetof and that might also be useful.

C Pointer Question


Why do we play bagpipes, get drunk, and wear green on Moshe Rabbeinu's Yahrzeit

Question: So today is Moshe Rabbeinu's Yahrzeit, and there are many people in the streets commemorating this by wearing green and drinking.  There is also a large prevalence of bagpipes.  I was wondering what the source for this minhag is.

This question is Purim Torah and is not intended to be taken completely seriously. See the Purim Torah policy.
Comment: This question seems specific to this year, incidentally. I know that our PTJ policy is quite flexible, but, part of it states the concept of encouraging answers. Perhaps, questions such as these need to be re-evaluated in terms of current or future policy?
Answer: The bagpipes are a type of horn. We blow horns on Moshe's yahrtzeit to commemorate the horns on Moshe's skin as stated:
Exodus 34:29:

וַיְהִ֗י בְּרֶ֤דֶת מֹשֶׁה֙ מֵהַ֣ר סִינַ֔י וּשְׁנֵ֨י לֻחֹ֤ת הָֽעֵדֻת֙
  בְּיַד־מֹשֶׁ֔ה בְּרִדְתּ֖וֹ מִן־הָהָ֑ר וּמֹשֶׁ֣ה לֹֽא־יָדַ֗ע כִּ֥י
  קָרַ֛ן ע֥וֹר פָּנָ֖יו בְּדַבְּר֥וֹ אִתּֽוֹ׃
And it came to pass, when Moses came down from mount Sinai with the
  two tables of the testimony in Moses' hand, when he came down from the
  mount, that Moses knew not that the skin of his face sent forth horns
  while He talked with him.

Wearing green is because regarding Moshe's sister, Miriam, it says:
Numbers 12:14:

וַיֹּ֨אמֶר יְהוָ֜ה אֶל־מֹשֶׁ֗ה וְאָבִ֙יהָ֙ יָרֹ֤ק יָרַק֙ בְּפָנֶ֔יהָ
  הֲלֹ֥א תִכָּלֵ֖ם שִׁבְעַ֣ת יָמִ֑ים תִּסָּגֵ֞ר שִׁבְעַ֤ת יָמִים֙
  מִח֣וּץ לַֽמַּחֲנֶ֔ה וְאַחַ֖ר תֵּאָסֵֽף׃

And the LORD said unto Moses: 'If her father had made her face greenish, should she not hide in shame seven days? let her be shut up without the camp seven days, and after that she shall be brought in again.'
Miriam was envious of Moshe's beautiful wife, and usuall envious people are green. But since Miriam became leprous, she turned white instead of green, and Moshe prayed for Miriam's healing. Moshe was a humble man, so in the merit of his prayers, even though G-d had said, "If only her father would have made her green", that would have happened, when she was envious. However, since she was envious of such a humble person such as Moshe, she turned white instead of green, all in Moshe's merit.
The drinking minhag is easier to explain. Moshe's yahrtzeit is exactly 1 week before Purim. Getting drunk on this date is practice for Purim. (Note, that drinking on Moshe's yahrtziet is not a universal minhag. Some people are not allowed to get drunk for health reasons, and others can drink a ton of beer and never get drunk.) However, we want to guarantee that there is at least one Shabbat between Moshe's yahrtzeit and Purim so that people can rest from their stupor and let it wear off. If it were less than a week, people might still be drunk when reading the Megilla if there was no intervening Shabbat. More than 1 week, and they might feel out of practice. Also, beer, the cheapest alcoholic beverage, loses almost all of its strength after a week. Thus, the minhag to drink on Moshe's yahrtzeit, a week before Purim.
Comment: @Nic. Thanks. And, you thought that the translation of the 2nd verse had something to do with spit... See why you need to view things on this site to get new insights?
Comment: This was great, I love it!
Comment: FWIW, I was also thinking about something along the lines of "sham rock", i.e. Moshe hitting the stone "that sham", etc.
Comment: @Nic Clever name. It's better than a name I have seen for a Jewish music band (usually plays at weddings). The band leader's name is Marvin, so he called his group "Marvin Besimcha". And, no, he plays during months besides Adar, though, this past year, he made twice as much business as in many other years ;-)
Answer: This was the cause of Moshe's death. When he saw so many people in the streets commemorating wearing green and drinking,and also the large prevalence of bagpipes he just could not deal with it anymore.
Comment: He literally could not even.
Answer: I believe they were descendants of the Mixed Multitudes hoping, with the demise of Moses, they can have a second shot at the Golden Calf.


Why are my file permissions on Apache being reset?

Question: We recently switched from using PCs at work to Macs, so I'm new to the *nix way of doing things. I have the default Apache running that shipped with 10.5, but I've noticed that when I drag files from a Windows server to my machine, the permissions are changed. Specifically, I'm writing data to an XML file, and occasionally after swapping some files back and forth, it stops working.
Can someone help me understand why this is happening and how I can either force Windows to respect the original file permissions (they were set on my machine when I created the file) or apply a less secure set of default permissions when the files are moved from Windows to Mac?
A couple facts to be aware of:

I'm using the Cornerstone Subversion client.
I can use Terminal if you spell it out for me.
Ultimately I'm uploading these files via Transmit to a Linux server in another location.
I'm already familiar with using Get Info to change the file permissions, but maybe I'm doing something wrong.
I'm logged in as root. (I know, bad bad bad.)

I should also mention I know this is a simple question that should have a simple answer, but I've googled up and down without finding it. I need your help.
Thanks.
Answer: It would be incredibly helpful if you could drop to the Terminal, use cd to navigate to the folder with the files that don't work because of permissions and then type: ls -l  (those are both lowercase Ls back there).
If you start from your home folder, it'll look something like this:
<code>macbookpro:~ artlogic$ cd Sites
macbookpro:Sites artlogic$ ls -l
total 8
drwxr-xr-x  6 artlogic  staff   204 Mar 11  2008 images
-rw-r--r--  1 artlogic  staff  2628 Mar 11  2008 index.html
macbookpro:Sites artlogic$
</code>
Please paste the output into this thread.  Knowing what Apache is changing the permissions to would help.
On a side note, Apache generally runs under a different user and permission level than the logged in user and so if it's somehow creating or overwriting files it may be changing the permissions that way.
Comment: Thanks, James. That's useful information. What I'm looking for is an explanation of why permissions are being changed and, if possible, how I can prevent that behavior.
Comment: Sorry - I actually meant to ask you to paste your output into your comment so we can see what the permissions are being changed to.


Good classifiers for small training sets

Question: What are good classification methods in the case of continuous independent variables (features) and a small training set (particularly where the number of training examples is approximately equal to the number of independent variables)? Here, small means about 50. I am particularly interested in being able to know which variables are "significant". Ideally, I'm looking for a method for which the training step is computationally efficient; I care much less about the computational cost for the actual classification task.
Comment: Without using the lasso, and even perhaps using it, the probability of finding the "right" variables is exceedingly low with this sample size.  If variables are colinear it's even worse.  Make sure that finding features is more important to you than prediction, and avoid classification accuracy as it takes a very large sample size for that improper scoring rule to have sufficient precision.
Comment: Have you tried logistic regression with a LASSO penalty? That's the first thing I'd try.
Comment: I'm just at the stage of gathering ideas, so haven't tried anything, but thanks for the suggestion Stefan.
Answer: First of all, you may want to have a look at the Elements of Statistical Learning. They discuss variable selection as well as different regularization techniques in chapter 3 (never mind it being about regression).
If you think your variables are basically not correlated, and should go either into the model or not, then you may want to have a look at random forests. They try to cope with the small sample size problem by building a large number of models from slightly varying subsets of the data (subsetting both cases and variates). In addition, they can tell you how many decision trees use which variate, which could help your variable selection.
However, if you think your variates may be correlated, methods like PCA-LDA or PLS-LDA may be more appropriate. If you chain them correctly, you can even derive coefficients that tell you how much of the original variates goes into what LD function. (You can ask me for R code, if that helps).
I'd go for LDA instead of logistic regression here, as LR tends to need more training cases.
Comment: Thanks. Some R code demonstrating the chaining you describe would be really useful, if not too much trouble.
Comment: Thanks. I'm not actually using R, and I was simply looking to understand your suggestion better by reading your code, so please don't count on any sensible bug reports :-)
Comment: Oh, OK. Look into pcalda.R or plslda.R. The idea is to train an LDA model in the PCA/PLS scores space. If you make sure that the centering is the same for PCA(PLS) and LDA, then you can calculate "overall" coefficients by matrix-multiplying the PCA rotation matrix (PLS weights) with the LDA coefficients.
Answer: You want to keep your model as simple as possible so it won't overfit. This usually means making simple assumptions about the distribution the data comes from.
Some possibilities are Naive Bayes, Logistic Regression, some type of decision tree, maybe linear SVM (without playing with the external parameters too much).
Also, you should try to have a very small number of features. You can try various feature selection methods, but if you want to learn about the importance of the original features, try not to distort the feature space (e.g. no PCA).
Comment: Thanks. Naive Bayes was my initial thought, but I don't know about variable selection for that. Any suggestions?
Comment: @Chris one thing you can do for any method, is to test the performance (in cross-validation) for subsets of variables and conclude about the importance of variables from that (for example, leave one variable out on each run. This is not necessarily comprehensive, but it is often useful in practice and is easy to do for small datasets and simple models.


Grabbing a user_group in MODx

Question: Currently I have a Client login area. In this login area I was going to create a snippet that shows certain information for 'Admin' users.
I had a feeling I could use
<code><?php
if ($modx->getLoginUserType()) {
   echo 'hi';
} else {}
?>
</code>
However, all User Types are web.
I was also looking around and found a script that prints out web-users of a web-group:
http://modxcms.com/forums/index.php/topic,43139.0.html
Any Advice?
Answer: <code>$test = $modx->isMemberOfWebGroup( array(
    'Editors'
));
if ($test === true) {
    // Is a member of the group
} else {
    // Is not a member of the group
}
</code>
see: http://wiki.modxcms.com/index.php/API:isMemberOfWebGroup

Grabbing a user_group in MODx


Can I combine a few sub master pages to one main master page?

Question: In my document I want to have three different headers and five different backgrounds and one footer. Do I need to create a separate master page for each combination of header-background-footer? Or maybe there is a way to apply a few master pages to one regular page? Thanks.
Comment: Well you can give one sub master to a master page. The easiest method would be to just drag one master on top of another master. With that you can technically have as many sub masters as you want, if you chain it by giving each sub master their own sub master. It might not be as easy as I make it sound. In fact, it probably isn't. Just thinking about this made my head hurt.
Answer: Well, in total that's 15 different possible configurations. You could definitely create masters for all 15 (16 actually 1 for the footer then drag that master to the other 15). This is probably the easiest method.
I don't think this would be easier than just creating 6 masters (5 background + 1 footer) and then manually adding the desired header to each page.
With so many combinations, no matter how you set things up it'll be a bit complex.
You can apply one master to another master, but I'm unaware of any feature which allows you to apply multiple master pages to a single page.
Comment: Scott, it's the same feature that allows you to apply one master to another master, that also allows more masters to be added to that chain. Let's say we have 5 masters: `Master 1` - `Master 5`. We make `Master 5` the sub master of `Master 4`. We make `Master 4` sub master of `Master 3`. We make `Master 3` sub master of `Master 2`. We make `Master 2` sub master of `Master 1`. Now `Master 1` has 4 sub masters. The rest depends on what content each master has and how it is placed.
Comment: True, it could be handled that way. I'm just not certain it would be *less* confusing. In addition, the stacking order may be an issue unless you carefully plan what master is applied to what master. Using base masters, then creating additional masters for the combinations results in 25 masters (5 background, 3 header, 1 footer + 15 varying combinations)... I don't know that that's better than just setting up 16 with all the combinations. :)
Comment: I didn't say it would be usable in this case. I just wanted to let you know that it's in fact possible to chain masters.
Comment: Cool. I was aware. I was just thinking of the "backgrounds" which could *possibly* limit the  ability to apply masters on top of masters on top of masters.
Comment: Well you were speaking generally in the last paragraph of your answer and so was I in my comment. As a side note, it is very usable method in many many cases, it just doesn't reaally help with this one.


Saving information of all current apps on Mac

Question: I want to reset my (oldish) MacBook Pro (13-inch, Late 2011) by wiping the hard drive and re-installing OS X. Is there a way to save information on all the applications I have currently installed so as to make the re-establishing easier?
Comment: You try to wipe it and then put everything back? So why do you want to wipe it in the first place?
Comment: As @MaxRied says, what's the point? Nuke & pave demands you start from scratch, not restore from a backup. The only change you're about to make is the date modified of some of your files.
Comment: You do have a backup, I assume?
Comment: Yes. Both Timemachine and Backblaze (plus Dropbox of some documents).
Comment: Unless you've configured something special, all your applications are on the TM backup then.
Comment: What is "_... so as to make the re-establishing easier_" supposed to mean?
Answer: Seeing as you said you have Time Machine already set up then there is nothing you need to do. Go ahead and reinstall OS X and once you're finished restart and hold Command + R at the start up chime, there you will be given the option to restore from a Time Machine backup. OS X El Capitan: Recover your entire system
Answer: As another option than herculeesjr's answer, you can, instead of restoring from the Time Machine disk directly,

Reinstall OS X from command+R (Recovery HD)
When the Mac reboots and asks to set up, select the option to restore from a Time Machine backup. You can choose which apps, files, users, etc. you want to copy over.
Comment: I think you can chose whether to instal all apps or no apps, all extra files or no files. Can you update if you have a way to pick and choose some apps in the recovery? A screen shot of that in action would be excellent.
Comment: @bmike I said they can choose which files to restore, although I'm not erasing my Mac just to get screenshots (which may not even work since no-one is logged in).
Answer: I open Launchpad and save a screen shot of the important apps. Just back up these images or copy them to iCloud documents or a USB drive before erasing.
If you curate your screens and put the important apps on the first page or two and have less apps, this is easier to do. (And refreshes your memory of what apps you considered important)
Also, with Time Machine, you can just browse the application folder or use spotlight while in Time Machine to locate any app you had installed. Lastly, the full accurate list is saved by System Information - you can save a full report to your desktop and then open that file on any other Mac (or a new install on the same Mac) to see what you had. For the command line people, system_profiler SPApplicationsDataType and also the SPInstallHistoryDataType if you care to see what was installed when.
I love fresh installs since I get to decide which apps I really need and have an easy safety net if I cleared too much.


folders of apps not downloaded created in my memory card

Question: I use Sony Xperia Z phone
Recently i noticed that in my phone some empty folders of applications like hike and hookup are created. I did not download these applications...so how these folders came in my memory card. I had recently mounted my memory card in my friends phone which had these apps.. is it possible that these folders got copied from his phone to my memory card ? please help.
Answer: Yes exactly. Applications create (not copy) required folders as soon as a memory card is mounted. There is nothing to worry about and you can delete them manually. As an extra note - these folders are created for saving media files received and backup files.
Comment: Thank u Mr. Mani for ur reply. But i have one more querry. To check the above, I put a new memory card in my samsung galaxy note phone which has hike as well as hookup apps. Here in this memory card no such folders were created. So is it that these empty folders are created in some phones and not in others because i tried this on 3 memory cards and none of them got such empty folders created. Pls help.
Comment: Latest google restrictions doesn't allow accessing memory card for saving data or installing by almost all the apps. Maybe the previous phone allows that.
Comment: Sorry i did not understand this. Could u explain in simple language please.
Comment: Latest versions of android doesn't support apps to be installed on memory card and also doesn't support moving applications to SD card. Previous versions support these things.


Re-georeference an image that already has a spatial information

Question: I have an aerial image that already has geo-spatial information (already georeferenced), but the original georeferenced location is very rough (not accurate). I wanted to create ground control points and georeference the image again to a more accurate location. Do I have to remove the spatial information of the original image and make it as a raw image first? Or can İ make GCPs directly on the original image (which is already georeferenced)?
Comment: Can you use GDAL tools?
Comment: İ made GCPs using QGİS  Georeferencer tool. It worked . İt produced a new georeferenced map.. But the GCPs table is very strange. It treats the original image as a map but not arrays of pixels. But when İ used the same GCPs  table in GDAL command line, it gave me an error image.
Comment: Sorry, I do not understand what you mean with arrays of pixels. The QGIS georeferencer sets negative values for the pixel Y coordinates, they must be turned positive for GDAL `-gcp`.
Answer: Already georeferenced image can be georeferenced with QGIS georeferencer without removing old georeference info first. However, georeferencer does not update the old image but it writes out a new image.
It is also possible to update the georeference of the image without writing the pixels again but in this case the old georeference information must be wiped first for example with gdal_edit utility https://gdal.org/programs/gdal_edit.html. It is a Python script and therefore  GDAL Python bindings must be installed on the computer. Usage:
gdal_edit -unsetgt image.tif

This works if GDAL is installed with OSGeo4W but otherwise it may be necessary to run the script as
python [path_to]gdal_edit.py -unsetgt image.tif

New ground control points can be added to the image with the same gdal_edit utility.
If GDAL Python utilities are not available and QGIS georeferencer does not feel like the best tool it is also possible to make a clean copy of the image with gdal_translate:
gdal_translate -of GTiff -co profile=baseline --config GDAL_PAM_ENABLED NO  input.tif clean_out.tif

In the command the config option --config GDAL_PAM_ENABLED NO prevents writing of an additional .aux.xml file that stores the georeferencing info and other metadata that was removed from the GeoTIFF. That may have an affect on further processing. Instead of using the config option it is also possible just to delete the .aux.xml file.
Comment: Thank you very much! So is it theoretically not correct to re-georeference a GeoTif image? I have to remove the georeference information prior to making GCPs?
Comment: You can open already georeferenced image with QGIS georeferencer, measure new ground control points and run the process that creates a new image. In  this scenario you can use the GeoTIFF as-is.  If you want to fix the existing image without creating a copy you must delete the old georeference and add more accurate ground control points with gdal_edit. QGIS georeferencer does not overwrite but you can  use it for measuring the gcps for GDAL tools.