Regarding the practice of "cast lots". Was this done by Jews only or did others practice it?

Question: Regarding the practice of 'cast lots' in the Old Testament. Was this used by Jews only or did others use this method?
Comment: Matthew 27:35 says that Roman soldiers cast lots.  So do Mark 15:24 and Luke 23:34. John 19:24 gives more detail.
Answer: Regarding the practice of "cast lots". Was this done by Jews only or did others practice it?
The casting of lots was almost universally done in most cultures in the Old Testament times.

In Judeo-Christian tradition
Casting of lots occurs relatively frequently in the Bible, and many biblical scholars think that the Urim and Thummim served this purpose. The Hebrew Bible contains several examples of the casting of lots as a means of determining God's will:

In the Book of Leviticus 16:8, God commanded Moses, "And Aaron shall cast lots upon the two goats; one lot for the LORD, and the other lot for the scapegoat."
According to Numbers 26:55, Moses allocated territory to the tribes of Israel according to each tribe's male population and by lot.
In Joshua 7:14, a guilty party (Achan) is probably found by lot.
In the Book of Joshua 18:6, Joshua says, "Ye shall therefore describe the land into seven parts, and bring the description hither to me, that I may cast lots for you here before the LORD our God." The Hebrews took this action in order to know God's will as to the dividing of land between the seven tribes of Israel who had not yet "received their inheritance". (Joshua 18:2).
In the First Book of Samuel 14:42, lots are used to determine that it was Jonathan, Saul's son, who broke the oath that Saul made, "Cursed be the man that eateth any food until evening, that I may be avenged on mine enemies." (1 Samuel 14:24).
In the Book of Jonah 1:7, the desperate sailors cast lots to see whose god was responsible for creating the storm: "Then the sailors said to each other, 'Come, let us cast lots to find out who is responsible for this calamity.' They cast lots and the lot fell on Jonah."

Other places in the Hebrew Bible relevant to divination include:

Book of Proverbs 16:33: "The lot is cast into the lap, but its every decision is from Yahweh and 18:18: The lot settles disputes, and keeps strong ones apart."
Book of Leviticus 19:26 KJV "... neither shall you practice enchantment, nor observe times." The original Hebrew word for enchantment, as found in Strong's Concordance, is pronounced naw-khash'. The translation given by Strong's is "to practice divination, divine, observe signs, learn by experience, diligently observe, practice fortunetelling, take as an omen"; and "1.to practice divination 2.to observe the signs or omens". Times in the original Hebrew is pronounced aw-nan'. Its translation in Strong's is "to make appear, produce, bring (clouds), to practise soothsaying, conjure;" and "1. to observe times, practice soothsaying or spiritism or magic or augury or witchcraft 2. soothsayer, enchanter, sorceress, diviner, fortuneteller, barbarian...". In the Hebrew-Interlinear Bible, the verse reads, "not you shall augur and not you shall consult cloud".
Deuteronomy 18:10 "let no one be found among you who [qasam qesem], performs [onan], [nahash], or [kashaph]".2 qasam qesem literally means distributes distributions, and may possibly refer to cleromancy. Kashaph seems to mean mutter, although the Septuagint renders the same phrase as pharmakia (poison), so it may refer to magic potions.
In the Book of Esther, Haman casts lots to decide the date on which to exterminate the Jews of Shushan; the Jewish festival of Purim commemorates the subsequent chain of events.
In I Chronicles 26:13 guard duties are assigned by lot.
To Christian doctrine perhaps the most significant ancient Hebrew mention of lots occurs in the Book of Psalms, 22:18 "They divide my garments among them, and for my clothing they cast lots." This came to be regarded as a prophecy connecting that psalm and the one that follows to the crucifixion and resurrection of Jesus, since all four gospels (for example, John 19:24) tell of the Roman soldiers at Jesus's crucifixion casting lots to see who would take possession of his clothing. (That final act of profanation became the central theme of The Robe, a 1953 film starring Richard Burton.) -
A notable example in the New Testament occurs in the Acts of the Apostles 1:23–26 where the eleven remaining apostles cast lots to determine whether to select Matthias or Barsabbas (surnamed Justus) to replace Judas. - Cleromancy (Wikipedia)

The Jewish Encyclopedia is very clear that other pagan cultures in the Old Testament cast lots:

Means of determining chances. Primitive peoples, and occasionally those on a higher plane of culture, resort to lots for the purposes of augury. They spin a coconut or entangle strips of leather in order to obtain an omen. Thieves especially are detected by the casting of lots, etc. (Tylor, "Primitive Culture," German ed., i. 78-82). The pagans on a ship with Jonah under stress of a storm cast lots in order to find out who among them had incurred the Divine anger (Jonah i. 7). Haman resorted to the lot when he intended to destroy the Jews (Esth. iii. 7). The Greek heroes cast their lots into Agamemnon's helmet in order to ascertain who should fight with Hector ("Iliad," vii. 171). In ancient Italy oracles with carved lots were used.
In Ancient Israel:
The ancient Israelites likewise resorted to the lot for the most varied purposes. Rhabdomancy was known as late as Hosea (Hos. iv. 12); and Ezekiel (Ezek. xxi. 26 et seq.) mentions the arrow-oracle of the King of Babylon, which was still used a thousand years later among the pagan Arabians (Wellhausen, "Reste Arabischen Heidenthums," 2d ed., pp. 126 et seq.; comp. Sprenger, "Leben und Lehre des Mohammed," i. 259 et seq.; Huber, "Ueber das Meiser-Spiel der Heidnischen Araber," Leipsic, 1883). As the priestly lot-oracles are discussed under Ephod, Urim and Thummim, and Teraphim, the present article deals merely with the lot in secular life. Joshua discovers the thief, and Saul the guilty one, by means of the lot (Josh. vii. 16 et seq.; I Sam. xiv. 42; comp. I Sam. x. 20 et seq.). Primitive peoples divide land and other common property by means of the lot. In Hebrew the word for "lot" ("goral") has retained the meaning of "share"; it has also acquired the more general meaning of "fate" (Isa. xvii. 14, lvii. 6; Jer. xiii. 25; Ps. xvi. 5; Dan. xii.). The land west of the Jordan is divided among the several tribes by lot (Num. xxvi. 55 et seq., xxxiii. 54, xxxiv. 13, xxxvi. 2; Josh. xiii. 6, xiv. 2, xv. 1, xvii. 1, xviii. 6-10, xix. 51, xxiii. 4; Ps. lxxviii. 55, cv. 11; comp. Ezek. xlv. 1, xlvii. 22). Jewish tradition, finding offense in this kind of allotment, declared that the land was really divided under the inspiration of the Holy Spirit, the lot being merely the visible means of confirming the division for the people (Sifre, Num. 132; B. B. 122a). Prov. xvi. 33 and xviii. 18 indicate that lots were cast in legal controversies. The wicked "part my garments among them, and cast lots upon my vesture" (Ps. xxii. 19; comp. Matt. xxvii. 35; John xxix. 24). Booty of war is divided by lot (Joel iv. 3; Nahum iii. 10; Ob. 11; see also Judges xx. 9; Neh. x. 35, xi. 1; I Chron. xxiv. 5, xxv. 8, xxvi. 13 (see Herzog-Hauck, "Real-Encyc." 3d ed., xi. 643 et seq.).
In Talmud and Midrash.
According to the etymology of the word "goral," the lots were probably small stones, or sticks, as Hos. iv. 12 indicates. They were thrown, or possibly shaken (Prov. xvi. 33, "into the lap"), so that one fell out, whereby the case in question was decided. It can not be ascertained whether a tablet with writing on it is meant in Lev. xvi. 8, as the Mishnah assumes (Yoma iii. 9, iv. 1). At the time of the Second Temple the lot was prominent in the Temple cult, and customs were developed, after Biblical example, whereby the several offices were apportioned by lot. The priests drew lots in all cases where differences might arise (Yoma 37a, 39a-41a, 62a-63b, 65b; Zeb. 113b; Men. 59b; Ker. 28a). In Tamid i. 2 the overseer of the Temple calls for the lot; and Yoma 24b records a discussion whether the priests shall draw lots in holy or in secular garments. Lots were cast four times in succession (Yoma iv. 1). The Prophets increased the four classes of priests that returned from the Diaspora to twenty-four; they mixed up the names of the additional ones and placed them in an urn (κάλπη) and then let each of the four original classes of priests draw five names (Tosef., Ta'an. ii. 1, and parallel passages). The urn was originally made of cypresswood; but the high priest Ben Gamala had one which was made of gold (Yoma iii. 9); hence drawing lots from it created a sensation (Yer. Yoma 41b, below). In the sanctuary the lots were taken out by hand (Yoma 39b, 40a). The lot was either a black or a white pebble (Yer. Yoma iv., beginning), or was made of olive-, nut-, or cypress-wood (Yoma 37a). A third kind, consisting of pieces of paper with writing on them (πιττάκιον), is frequently mentioned.
Many facts seem to indicate that choosing by lot was common in post-Biblical times. Moses chose the seventy elders (Num. xi. 26) by selecting six men from each of the twelve tribes, and then placing seventy-two pieces of paper (πιττάκιον), of which two were blank, into an urn, one being drawn by each man. He proceeded similarly in determining the 273 first-born who were to pay each five shekels ransom, 22,273 tickets in all being drawn (Yer. Sanh. 19c, below, and parallel passages). Eldad and Medad were, according to Targ. Yer. to Num. xi. 26, among the elders who drew lots. Jacob's sons also drew lots to decide who should take Joseph's coat to their father (Gen. R. lxxxiv.). Achan attempted to bring the casting of lots into discredit when he said to Joshua: "If I order you and the high priest Eleazar to draw lots, one of you will certainly be pronounced guilty" (Sanh. 43b). Nebuchadnezzar's casting of lots (Ezek. xxi. 25 et seq.) is mentioned; but, according to the vernacular of the time, the Greek word κλῆρος is used, which occurs also inActs i. 26 (Lam. R., Preface, No. 5; Midr. Teh. x. 6; comp. ib. x. 5 on casting of lots among the Romans, and Krauss, "Lehnwörter," ii. 545b). - Lots (Jewish Encyclopedia)
Comment: "Many facts seem to indicate that choosing by lot was common in post-Biblical times."  -  Did you intend "Post-Biblical"? If you did, what do you mean?  If you meant "pre-Biblical", again, what do you mean by that?  Cheers
Answer: Esther 3:7 - Haman cast lots, that is the Pur in the city of Susa during the Persian Empire to decide what day they would annihilate all the  Jews.  It seems as if it was an accepted practice within the administration of the Persian royal court.
From "Pur",the "lot" in the Akkadian language (Esther 9:24) the Jewish festival of Purim on 14 and 15 of Adar, a month before Passover, is named.

Because Haman the son of Hammedatha the Agagite, the enemy of the Jews, had plotted against the Jews to destroy them, and had cast Pur, that is the lot, to consume them, and to destroy them;
But when Esther came before the king, he commanded by letters that his wicked plot, which he devised against the Jews, should return upon his own head, and that he and his sons should be hanged on the gallows.
Wherefore they called these days Purim after the name of pur  (Esther 9:24-26).

[[  Incidentally, and interestingly, the passage Esther 9:24-26 leaves ajar the possibility that "Purim" is named after the word "son", because a stress is put upon the fact Haman was a son, and that the plot included his own sons who were all hanged.
"Son" in Persian is "pur"/"pour".
I quote: the suffix "-pour" in Persian surnames is the same as the Greek "-opoulos", which means "son of", eg Amanpour: "Son of Aman". ( https://www.quora.com/What-does-pour-mean-in-Persian-names-such-as-Aryanpour-and-Amanpour ).
So some Jews of old might have said the word comes from Persian "son" and some from Akkadian "lot", so the Bible writer remained a bit ambiguous so as to please everybody. ]]
Comment: Thanks Andrew, I appreciate your thoroughness.


Chord books and theory

Question: I have some basic knowledge on chords but I was wondering what books on chords and theory were the best for expanding my musical knowledge? As in, intermediate to advanced level books ?
Comment: It's hard to tell from the question what exactly you need. Ricky Rooksby's "How to Write Songs on Guitar" has a lot of great material on chords, melody and harmony -- not only relevant to guitar.
Comment: Yeah, I look back seeing how generic the question was. My fault for not explicitly stating. I believe my intentions were to pick up different types of chord structures, since I tend to stick with the few that I know the best.
Answer: It depends. I wouldn't use the Kostka and Payne if you're just wanting to learn about chords, structures, and basic voice leading. You're not very specific in your question. Do you want to learn more about theory the way Reina is describing, or something more contemporary? I would recommend the following books:
Contemporary Music Theory (Level One) - Mark Harrison
The Everything Music Theory Book - Marc Schonbrun
Those are two good ones to start with. There's a really good free book offered by some conservatory that I found online a while back. Check here:
Basic Music Theory
It's long, but quite good for fundamentals, and even includes some jazz and blues theory as well. You can't print the book out, but you can download the PDF. So if you have an iPad or some other tablet, it's great to have on the go!
Hope that helps!
Comment: +1 Heath, you've given a great thorough answer. I've got a strong background in theory, but only in the classical realm. You've put together a great list here.
Comment: Thank you to the comments and answers, everyone. This gives me a great starting place to investigate.
Answer: These are online rather than books, but have the added value that you can hear the output or link directly to video:

http://www.chordwheel.com/ (which is also available as an iPhone app) is great for theory around what chords can work well together
http://www.guitar-chords.org.uk/ - is exactly what it says - a huge list of chord diagrams
Answer: The book I used through college, and still use quite often now, is Tonal Harmony by Kostka and Payne. The current edition is quite pricey. But I picked up an old edition a few years ago for just a couple of bucks. Theory doesn't really change, so go with the old edition.
What's great about that text is that it goes sequentially through all of tonal harmony and theory: naming chords, chord progressions, structural analysis, and even gets into 20th century theory.
There's an accompanying workbook, but the text has practice sets and analyses at the end of each chapter that are great.
Answer: If you want to learn about music theory, chords, chord progressions, and chord viocings in jazz music, and related genres, I believe that 'The Jazz Theory Book' by Mark Levine is one of the best and most comprehensive. It guides you from the basics all the way through to the most advanced. It could keep you busy for years.
Good luck on your endevour!

Chord books and theory


How to interpret a histogram to know whether the photo is under or over exposed?

Question: Yes, the books might have been written on this but not being a technical person, I'd like to understand in short and easy to understand language - How to interpret a histogram to know whether the photo is under or over exposed?
Comment: Look at your picture instead of the histogram! A picture is over or under exposed if you can't see details in dark or light parts where you want to see them.
Answer: Frankly, you can't. If you look at the histogram of this image  it will look wrong. But the image is neither over-, nor underexposed.
Comment: General case in art is something that escapes me ;) Seriously, the histogram you refer to is of the brightness of the final image, not of the exposure of the latent (raw) image. Another thing to consider is that exposure is an artistic tool. Yet one more is that in certain situations only the brightness of the subject matters, and the histogram needs to be of the selection. Each subject has its own brightness range, optimally, so, again, no general case.
Comment: Technically this image is over- AND underexposed, although you could argue that it was exposed for the wall. Usually though, under- and overexposure are meant in the sense of clipping blacks and whites, which is clearly the case here. It is not badly exposed, just over- and underexposed. :)
Comment: thanks about the pretty image but I request you to consider answering with reference to a general case.
Comment: Why do you say the histogram will look wrong? If the photographer understands what the histogram is telling her, and if this is the kind of image she's trying to create, the histogram will look (and will *be*) correct in the context of the photog's goal.
Comment: Histogram does not show where on the image the certain level occurs. Histogram is a one-dimensional report, hiding the tonal distribution over the whole image. How much the histogram needs to climb the left and right wall is also unclear, spotmeter is a better tool because it allows to control the result instead of reshooting. For a rendered image, eyedropper is a great aid.
Comment: Dear J0hj0h, you do not know that as you have not seen the original. Exposure and brightness are two different, nearly independent concepts.
Answer: If the histogram is shifted very much to the right, the photo may be overexposed, and if it is shifted very much to the left, the photo may be underexposed. But as the comments and other answer have pointed out, it's not a solid rule.
If the histogram is cut off, like the first image, it means there are blown out highlights (ie unrecoverable detail in very bright things, like clouds (but again, as shown in the image in the other answer, blown-out highlights or blacks are sometimes desirable eg B&W photography)).
(Possibly) overexposed:

(Probably) underexposed:
Comment: I don't think it's possible for a histogram to *definitively* say whether a photo is over- or underexposed. It can certainly accurately show the relative distribution of tones, but it's entirely possible for a photograph to contain a lot of blown highlights or blacks yet still be correctly exposed (product photography, for example). On its own it is simply a tool, and without the context of the accompanying photograph it is only telling a part of the story.
Comment: you didn't show what is "balanced"?
Comment: I think you can perfectly guess what "balanced" is
Answer: Image sensors and image files only have a limited storage space and dynamic range. If the dynamic range of the scene is bigger than the one the camera can capture and store, details will get lost. The technical term for this loss is clipping.
Since the histogram shows the amount of blacks to its far left and whites to its far right, a big spike to those ends is typically avoided. It suggests that the scene had many details in those areas, but the image simply cuts out (or clips) those details and shows a solid color (black or white) instead. A technically well exposed image would have all its colors inside the bounds of the histogram, meaning that no detail had to be left out.
As Iliah Borg pointed out, over- and/or underexposing does not necessarily mean having a bad exposure. In the picture he provided this clearly is intentional and pleasing.
Nevertheless, that case is an exception. Most of the time, you want to retain as much detail as possible, to be able to play with or pronounce later on. If you really want to keep as much details as absolutely (technically) possible, you can take a look at exposing to the right.
Do not get caught up too much in the mechanics, though. Iliah Borg made it very clear that having a pleasing overall image is more important than having a technically well exposed image. ;)


Does the Hexblade warlock's Hex Warrior feature change Booming Blade to use your Charisma modifier?

Question: Since the Hexblade warlock's Hex Warrior feature changes your pact weapon's attack modifier to use Charisma instead, does it also turn booming blade's modifier from Strength to Charisma?
Answer: Hex Warrior and booming blade can work together.

When you attack with that weapon, you can use your Charisma modifier, instead of Strength or Dexterity, for the attack and damage rolls. This benefit lasts until you finish a long rest.

"That weapon" being either the daily touched weapon or the Pact of the Blade weapon. I'll call it the HW-weapon for short.
When you cast booming blade, you have to make a melee attack with a weapon. Usually, that involves using either the Strength or Dexterity modifier, because that's how the typical rules for attacks work - not because booming blade asks you to use either modifier.
If you make that melee attack with your HW-weapon, then you follow the Hex Warrior rules as you would for any attack with your HW-weapon and add your Charisma modifier instead of Strength or Dexterity.
The key point here is that Hex Warrior does not modify the booming blade cantrip; rather, it modifies the melee weapon attack made as part of the booming blade cantrip.
Answer: Booming Blade has no modifiers
Booming Blade adds thunder damage to your weapon's normal effects. Those normal effects include your Charisma modifier for your pact weapon. Booming Blade doesn't undo the Hex Warrior effect, but neither is there any modifier to apply to the Booming Blade's effect because of it.
Answer: Booming Blade is an additional and independent effect
The Hexblade warlock's Hex Warrior feature (Xanathar's Guide to Everything, p. 55) partly says:

Whenever you finish a long rest, you can touch one weapon that you are proficient with and that lacks the two-handed property. When you attack with that weapon, you can use your Charisma modifier, instead of Strength or Dexterity, for the attack and damage rolls.

The booming blade spell description (SCAG, p. 142) states

As part of the action used to cast this spell, you must make a melee attack with a weapon against one creature within the spell's range, otherwise the spell fails. On a hit, the target suffers the attack's normal effects, and it becomes sheathed in booming energy until the start of your next turn. If the target willingly moves before then, it immediately takes 1d8 thunder damage, and the spell ends.
This spell's damage increases when you reach higher levels. At 5th level, the melee attack deals an extra 1d8 thunder damage to the target, and the damage the target takes for moving increases to 2d8. Both damage rolls increase by 1d8 at 11th level and 17th level.

As a Hexblade warrior, you use Charisma as your damage mod for the attack's initial damage (whatever type that is) plus an amount of thunder damage from booming blade.
Then, if the target moves willingly, it receives an additional amount of thunder damage. You do not add your Charisma modifier to either the initial damage or movement-based damage dealt by booming blade.
Comment: The wording in your rules quotes (mainly the second quote) didn't match the actual wording of the descriptions. I've edited the quote accordingly (and added DNDBeyond links and page numbers for easy reference).


Start new CiviCRM site in Drupal 7 or wait for Drupal 8?

Question: We are interested in a fresh start for our organization with a new website using CiviCRM and Drupal. However, we're not sure if we should wait for the CiviCRM integration with Drupal 8 since it's the most recent version of Drupal, or start our full build in Drupal 7.  Any feedback is welcome.
Comment: Thanks to those who answered this question. Choster your insight was particularly helpful. Unfortunately since I posted anonymously I couldn't reply directly. I still prefer the forum to stack-exchange.....need 50pts to make a simple comment. :(
Comment: You now have 50 points, @HPCiviCRM :)
Answer: The short answer is easy, which you can take away from Does CiviCRM work with Drupal 8 and how can I help? — CiviCRM is not yet fully functional with Drupal 8. You can see issues tagged for Drupal 8 in JIRA, and even better, help test and develop the Drupal 8 branch code.

The long answer is more complicated, and depends on your organization's development timetable, technology cycle, technical resources, use of Drupal for other purposes than hosting CiviCRM, first-adopter culture or lack thereof, and like factors.
First of all, Drupal 7 is not going away any time soon. It will continue to be supported until three months after the release of Drupal 9, which is not anticipated until 2020 or 2021 at the earliest. The large installed base of Drupal 6 prompted vendors to develop a long-term support mechanism. Considering that Drupal 8 is by any account a much bigger change from 7 than 7 was from 6, and that 7 has an even wider installed base than 6 did, one may reasonably expect that there will be demand for a Drupal 7 LTS version as well.
Now, if your organization already has plans in motion to end your own use of Drupal 7, getting support to launch a new D7 project may be hard. In that case, you might be better-off waiting for CiviCRM 5 and full Drupal 8 support later in the year. On the other hand, if your organization will support D7 for the forseeable future, launching on D7 with an eye to updating to D8 in a few years may make sense. Or, if you are new to Drupal altogether, and you have technical expertise in Symfony, Twig, and other D8 technologies, you may be better off skipping D7 for now, and having to re-learn all that's changed for D8 in the near future.
Most of my clients on CiviCRM do not have dedicated IT resources, and rely on our company to handle maintenance and updates. These clients we are keeping on D7 for now, and will probably not migrate them to D8 for at least another year, until the future of modules like Webform are more certain. We are also keeping an eye on the Backdrop CMS project, a fork of Drupal 7. There is a request for Backdrop support in JIRA, but as there is not much demand for the product (yet?), movement is slow.
And finally, if your organization does not or will not use Drupal for any other purposes other than to house CiviCRM, you might weigh whether WordPress should be considered.
Comment: Great answer. Perhaps worth noting that since webform-civicrm is such a great benefit that not having this in D8 is currently a big loss. Good to raise Backdrop. I thought some work had been done on this at Feb sprint but the JIRA is older than that
Comment: There's now an official CiviCRM 4.7 release for Backdrop CMS https://download.civicrm.org/civicrm-4.7.20-backdrop.tar.gz
Answer: I am working with an organization that has been struggling with that question. They were originally planning to upgrade their Drupal 6 site to D8, but D8 progress has been so slow (notably lack of webform module & incomplete CiviCRM integration) that they have decided to switch to Backdrop. Backdrop-CiviCRM integration is functionally complete, as is the Webform module. They are sponsoring work to port the Webform-CiviCRM integration module, which will complete their needs.
Comment: Do you feel like updating here too? http://civicrm.stackexchange.com/questions/264/will-civicrm-work-with-backdrop. I can but don't want to steal your thunder
Comment: Looking at the webform-civi module code it doesn't look like it'll be too hard of a port so that's good news.
Answer: See Does CiviCRM work with Drupal 8 and how can I help?  and Drupal 8 - what's the status?
Much depends on your timeframes and ability/willingness to help address the issues referenced there.  It would be great if your org can help push forward the Drupal 8 work.


How do I change the default font size for reading in Mail 6.0?

Question: How do I change the default font size for reading the body of messages in Mail 6.0? I know that I can use ctrl++, but I want the reading pane to default the body of the message to a larger font without lowering the default resolution.
Comment: Can I bump this question? the defaults write com.apple.mail MinimumHTMLFontSize method no longer works
Answer: This is a setting that can be changed in Mail Preferences. Open the dialog box by clicking:
Mail > Preferences (or Cmd + ,) > Fonts & Colors > Message Font > Select...
A dialog box should display with text options for you to customize.
Comment: That only changes the message font for my outgoing messages. It has no effect on the size of the font for the body of the incoming message.
Comment: Interesting. I tested it, and it increased the font size for all my message content (incoming and outgoing, header info, and body). One very important thing to note, is that there is no way to change the font size of incoming HTML emails. For example, emails such as receipts, or shipping confirmation from Amazon.com will not be affected by your customizations. On the other hand, all normal text emails will be adjusted.
Comment: Any other suggestions?
Comment: Some messages are in a large enough font.  The majority are still small. Could it be that almost all incoming messages are in HTML? I can still increase the reading size by cntrl + on the small font messages.
Comment: It's entirely possible. If the emails with small text come from online retailers, they're probably HTML, if they're from an individual, they probably adjustable font size. Send yourself a test message, then change the font, and see if it changes the message that you received from yourself.
Comment: Most are from individuals on a list serve. What I want to do is set mail so that when I open a message, no matter what the sender is using for a font size, the body of the message is large enough to read, say Century 24.
Answer: I just tried this and it worked for me:
http://www.pitt.edu/~hunter3/ComputerHelp/mailappfont.htm
How to permanently change the font size of the body of emails in Mac OS X's Mail program (i.e. manually get past missing font option for that reading or preview pane).
Command and A, then Command and + will increase the font size in the reading or preview pane of Mail.app, but how to make that larger size the default? If you go into the Preferences (in the Mail menu), there is a font section where you can customize font family and size for just about everything but that reading pane (crazy oversight).
First close Mail.app, then go to the Go menu (when in Finder or just click on any blank area of your desktop) and select Utilities, the double-click Terminal, then type defaults write com.apple.mail MinimumHTMLFontSize 14 then hit enter/return then reopen Mail.app to make sure the changes have been made.
Note: the default is 12, and if you want larger than 14, just replace that number with whatever font size you want.


Does ElGamal Encryption create a different key for each block sent?

Question: I ask about ElGamal algorithm. Is ElGamal algorithm used new key for each encryption process. in other word it should we use new key for each chunk? For example, if we have message that has four block each block less than $P$. Where $P$ is the prime number used in ElGamal. How many keys should be used to encrypt this message?
Comment: [cross-posted on SO](http://stackoverflow.com/questions/19214424/does-elgamal-encryption-create-different-key-for-each-sending-block)
Answer: If you have the setting of $G$ being a prime order $p$ group (written multiplicatively) generated by $g$ and your public-secret key pair is $(pk,sk)=(y=g^x,x)$, then encrypting a single message $m\in Z_p$ amounts to choosing $k\in_R Z_p$ and computing $(c_1,c_2)=(g^k,my^k)$.
If you have a message $m=(m_1,\ldots,m_l) \in Z_p^l$, then the ciphertext would be $((g^{k_1},m_1y^{k_1}),\ldots,(g^{k_l},m_ly^{k_l}))$ with the $k_i$'s being distinct (but the public key $y$ is the same, since it is intended for one receiver).
Observe, that when using the same $k$ for two messages, say $m_1$ and $m_2$, then you can infer non-trivial information about the messages from the ciphertexts $(g^k,m_1y^k)$ and $(g^k,m_2y^k)$, since computing $m_1y^k(m_2y^k)^{-1}$ gives you $m_1(m_2)^{-1}$. Consequently, choosing a fresh randomizer $k_i$ for every block is essential.
Nevertheless, if you have to encrypt multiple blocks in practice, you would use KEM/DEM style hybrid encryption for the sake of more efficiency.
A side note: if you encrypt a message $m\in Z_p$ under distinct public-keys $y_1,\ldots,y_n$, then you can re-use the randomness $k$. This means, that instead of choosing $k_1,\ldots,k_n \in_R Z_p$ and sending $((g^{k_1},my_1^{k_1}),\ldots,(g^{k_n},my_n^{k_n}))$, you can choose $k\in_R Z_p$ and send $(g^k,my_1^k,\ldots,my_n^k)$ which saves you computation and bandwidth. You may look here for a general treatment of this so called randomness re-use in multi-recipient encryption: journal paper or the previous paper versions paper1, paper2 for further details.
Comment: Efficiency is not the only reason why we don't do that. You should also note that encrypting blocks separately is insecure (according to most natural definitions of security). You can freely replace and reorder blocks in the ciphertext.
Comment: Yes, thats another and from a security point of view more important reason to avoid it. Replacing will still be an issue for a single ciphertext, if you do not use additional measures to guarantee authenticity. Say you sign all ciphertext pairs together or the message prior to encryption, then you eliminate this reordering and replacing issue (although there is still the efficiency issue). But even if you send only one encrypted message per time interval (say one per minute) and even if you authenticate your message, you still have to avoid re-using the randomizers $k$.


Theories of musical texture

Question: I know the basic distinctions of polyphonic/homophonic/heterophonic/monophonic, but I would be interested in either a formal attempt to describe how to distinguish one from the other, a more fine-grained description of differences in musical texture, or an exploration of the range of textural possibilities that falls within each of these "basic" types of texture.  Do you know of any online/print resources that explore this topic, or do you have any ideas?
Answer: It's all to do with how much independence each of the voices has.  Your lineup pretty much goes from most independence to least, although homophony and heterophony might be swapped around. JS Bach is a prime example of polyphony.  If I really wanted to generalize, Bach is more polyphonic and Handle more homophonic.  Handel loves a beautiful melody, especially in his vocal works, and often gives chordal accompaniment, which is regarded as more homophonic.
Heterophony is perhaps closer to monophony in that it is basically one melody or voice, accompanied by some sort of variation on that voice.  Good examples can be found in Britten's Church Parables.  Monophony is self explanatory and the easiest to recognize.
Gosh, it's hard to be that specific, sorry.  In a truly contrapuntal piece like a Bach fugue, each voice is fully independent (at any given time) and interesting, so maybe an 8.  In a homophonic piece the top voice is the most interesting usually, with the other voices rhythmically linked or subservient, but not using the same notes as they give harmony, so maybe a 4 or 5?.  With heterophony there is little independence of the voices, as they are directly linked in shape and pitch, so maybe a 3?
Comment: Thanks for your response!  Do you know how exactly you'd go about measuring independence of voice, say on a scale of 1-10?
Answer: In homophonic music, the voices tend to move mostly together rhythmically.  Sometimes, one voice will have more movement, but as all the voices change the harmony together, this shows their interdependence. Thus the harmony moves in a "vertical" column and is fairly easy to analyze.  This is easy to see in a lot of classical piano sonatas. The LH harmony and RH melody might each have some melodic interest, but both are forming the melody w/ harmonic accompaniment and move together.
In polyphonic music, the voices move independently, both melodically and rhythmically. Polyphonic music can be as simple as a kids' round (think Frere Jacques or Row, Row, Row Your Boat) or as complex as a 6-voice Bach fugue. The focus is more on the melodic nature of the lines rather than the vertical harmonic structure. Harmony exists, but it happens in passing based on how the different voices create consonance and dissonance with each other as they interact. Polyphonic music is analyzed more in regards to where the melodic material is repeated in the different voices, and the harmonic structure has more to do with large sections of the piece than with individual chords.

Theories of musical texture


simply changing csv header in apache Mahout classifier input produces different model?

Question: I'm trying to go through the Mahout classifier example (donut.csv ). but I found that simply changing the name of some columns in the header row, and changing the corresponding predictor variable name in the classifier command, would lead to a different model. this does not make sense.
first , you obtain the donut.csv by
mahout cat donut.csv |tail -40 > donut0.csv

(the "tail" was because mahout cat produces some initial info lines )
then we use the following commands to train donut0.csv : (as is suggested from "Mahout in action" book )
mahout trainlogistic --input donut0.csv \
--output ./model \
--target color --categories 2 \
--predictors x y a b c  --types numeric \
--features 20 --passes 100 --rate 50

it gave the following output
color ~ 7.068*Intercept Term + 0.581*a + -1.369*b + -25.059*c + 0.581*x + 2.319*y
      Intercept Term 7.06759
                   a 0.58123
                   b -1.36893
                   c -25.05945
                   x 0.58123
                   y 2.31879
    0.000000000     0.000000000     0.000000000     0.000000000     0.000000000    -1.368933989     0.000000000     0.000000000     0.000000000     0.000000000     0.581234210     0.000000000     0.000000000     7.067587159     0.000000000     0.000000000     0.000000000     2.318786209     0.000000000   -25.059452292
12/04/27 09:29:21 INFO driver.MahoutDriver: Program took 789 ms (Minutes: 0.01315)

but if simply change the column "x" in the header to "xa", and corresponding predictor name in the command, the output model completely changes.
$ head -3 donut4.csv
xa,y,shape,color,k,k0,xx,xy,yy,a,b,c,bias
0.923307513352484,0.0135197141207755,21,20,4,8,0.852496764213146,0.0124828536260896,0.000182782669907495,0.923406490600458,0.0778750292332978,0.644866125183976,1
0.711011884035543,0.909141522599384,22,20,3,9,0.505537899239772,0.64641042683833,0.826538308114327,1.15415605849213,0.953966686673604,0.46035073663368,1

mahout trainlogistic --input donut4.csv \
--output ./model \
--target color --categories 2 \
--predictors xa y a b c  --types numeric \
--features 20 --passes 100 --rate 50

color ~ 6.380*Intercept Term + -1.913*a + -0.577*b + -23.236*c + 2.647*xa + 3.009*y
      Intercept Term 6.38017
                   a -1.91308
                   b -0.57676
                   c -23.23552
                  xa 2.64657
                   y 3.00925
    0.000000000     0.000000000     0.000000000     0.000000000     0.000000000    -0.576759549     0.000000000     0.000000000     2.646572912     0.000000000    -1.913075634     0.000000000     0.000000000     6.380173126     0.000000000     0.000000000     0.000000000     3.009245162     0.000000000   -23.235521029
12/04/27 10:21:10 INFO driver.MahoutDriver: Program took 728 ms (Minutes: 0.012133333333333333)

I have not verified the new model, maybe it also fits the data, but simply changing a name supposedly should have NO effect on how the algorithm works. right??
thanks
Yang
Answer: I doubt it was the header change. I would much more readily expect it's because of different values of random values chosen in the algorithm. Try two runs with no changes to see if anything changes.
Answer: It has to do with feature hashing. The feature names are used to determine where in the feature vector the weights are placed.
In the 20 News groups example the feature vector is done in the org.apache.mahout.classifier.sgd.TrainNewsGroups class. The call
Vector v = helper.encodeFeatureVector(file, actual, leakType, overallCounts);

is what actually creates the feature vector.
It is using 'feature hashing', such that multiple features can be "hashed" into the same index in the vector. The actual feature hashing occurs in the NewsgroupHelper class using the following encoder:
    private final FeatureVectorEncoder encoder = new StaticWordValueEncoder("body");

You pass in 20 features (using the --features 20) command line argument, but only use 5 features (--predictors xa y a b c).
Looking back at the NewsgroupHelper code, the encoder.addToVector(word, Math.log1p(words.count(word)), v); call, it adds the word to the encoder. What is obviously happening is that for the 'x' feature, the hash index is not colliding with the other 5 features. However, when you use the 'xa' feature, it the hash collides with another of the names and adds their weight to the feature vector.
If you look at the org.apache.mahout.vectorizer.encoders.StaticWordValueEncoder encoding method, it uses the int n = hashForProbe(originalForm, data.size(), name, i); method to calculate the feature index: originalForm is the name of the feature, data.size() is the number of features, name is the constant name of the encoder, and i is the "probe number" which is changed.
TL;DR The 'x' and 'xa' names collide in the feature hashing, and you are not looping over enough probes to find a set of encoded vectors where you do not have a collision.


Can I disable Google Contacts' new search everywhere feature?

Question: Google Contacts preview searches everywhere when you search your contacts.  I find it makes it very difficult to search my own contacts because of the feature.  Is there a way to disable it?
Answer: Doesn't look like it, no. I'd have expected some sort of search operator (in:my-contacts perhaps?) but it doesn't look like they have any. It is a preview, after all.
Your recourse is probably to go back to the existing contacts manager.
I'd suggest, at least, using the "Send feedback" tool to let Google know that you would like to see changes to the search.
Comment: Agreed. Sorry, I didn't read past the first two sentences before adding an answer.
Answer: Yes. Opt out of the new Google Contacts Preview. That will fix search!
Also, use the Send Feedback feature to report how the Preview search doesn't work for you. With enough reports and anecdotes, the team will understand.


Does your wudu break if a dog licks you?

Question: I know that you're supposed to wash the part of your body where a dog has licked seven times. But do you also have to redo your wudu?
Answer: Salam and Alhamdulillah,
No. Touching things are impure does not break wudu. If a dog licks you, then you are still in the state of wudu all you need to do is wash the area the dog licked you 7 times and one of these times being with soil or soap as the Prophet (saw) said that if a dog licks the utensil of any of you then discard what is in it and wash the utensil 7 times and one of the times being with soil. Many scholars agree that soap can be used in replacement for soil. However touching things impure does not break wudu. The things that break wudu are clear such as peeing, pooping, passing gas or wind, deep sleep and eating camel meat and according to some scholars touching the private parts. According to one Hadith, laughing out loud during salah will also break wudu but scholars different on its authenticity and some scholars were of the view that this Hadith is not strong or authentic and that it is a weak Hadith. There are a couple of Hadiths that state to do wudu after drinking camel's milk but this is not a very strong Hadith and was classed as weak by Al-Albani. Even if it is Sahih and authentic the meaning is that it is mustahab (recommended or encouraged) to do wudu after drinking camel's milk but not mandatory But touching things that are impure does not break wudu
Comment: JazakAllah Khair akhi


Sharepoint-hosted app-instance of an app in the same site

Question: I have created a sharepoint-hosted survey app and deployed to my site.I am able to create a single survey with this app.But when i need to create another survey in the same site,Im not able to add the app again to the site.I need the app to behave like SP survey list.How can create multiple instance of the app in the same site.
What logic is used in SP survey list?Can anyone provide a solution?
Answer: Installing multiple instance of App on single site is not possible. You can do it in different sites.
But still if you want to achieve this then you can try with different settings as we use in WebParts.
Please have a look to this
source


C# client object model to connect to SharePoint online

Question: I am trying to connect to SharePoint online site using SharePointOnlinecredentials.
I am just passing the user ID and the password( secure string form) and just retrieveing the web.Title.  the code when i run on my local system is running fine without any issues and I can see the web title on the console as it is dotnet console application.
But when I am trying to run the application from another server, I am receiving the below error.
System.Net.WebException: Unable to connect to the remote server --->
System.Net.Sockets.SocketException: A connection attempt failed because the connected
party did not properly respond after a period of time,
or established connection failed because connected host has failed to respond (host IP and port here) at
System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at
System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception) --- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
at Microsoft.SharePoint.Client.SPWebRequestExecutor.GetRequestStream()
at Microsoft.SharePoint.Client.ClientContext.GetFormDigestInfoPrivate()
at Microsoft.SharePoint.Client.ClientContext.EnsureFormDigest()
at Microsoft.SharePoint.Client.ClientContext.ExecuteQuery()
Answer: The error shows there is connection error between the server and SharePoint online, confirm the server has internet access first.
If you could access SharePoint online from the server directly, try to use Fiddler to troubleshoot the console app request.


Using predicted probabilities and bayesian inference to update beliefs

Question: I'm currently working on a project to predict the likelihood of an outcome. I'd like to implement a system where the belief the event will happen is updated after running the model on new data. However, I'm having trouble figuring out exactly how to implement that. Any explanations of updating beliefs using Bayes theorem would be helpful.
Comment: Bayesian data analysis is a huge field. There's [a textbook of that name](http://www.stat.columbia.edu/~gelman/book/) that I think you should find a copy of in order to figure out the next step forward.
Answer: Anything that can be done in the classical, frequentist statistical approach, has a Bayesian counterpart.
Beliefs can be described, under certain assumptions, as probability distributions. You can take a given PDF as your prior belief, combining it with the Likelihood function of your data through Bayes theorem, and obtain a posterior distribution describing your updated belief in light of the empirical evidence provided.
Unfortunately I have no information of your problem at hand, on what data you are working with, and their nature.
If you are interested in Bayesian statistical models I suggest you to take a look at an R package called JAGS, that you can use to implement pretty much any Bayesian model, and with ready-to-go MCMC algorithms.
I wish I could be more specific, please provide more details about your problem and your data.


Electron degeneracy pressure

Question: Why is it that in stars undergoing gravitational collapse electron degeneracy kicks in? Why couldn't the electrons form energy bands like in semiconductors?
Comment: I'm not very sure, but I would think that the most likely reason is temperature. The collapsing star has a temperature in the million Kelvin range, whereas the energy bands are in the room temperature range.
Answer: Quantised energy levels/bands arise from electrons moving in a potential well. In say a white dwarf, the degenerate electrons can have kinetic energies of order 100-keV to 1MeV and can usually be assumed to behave like (almost) free particles. In which case there are a set number of available momentum eigenstates per unit volume
$$ g(p)\,dp = \frac{8 \pi p^2}{h^3}\,dp ,$$
where $p$ is the momentum. The electrons fill up all the available energy states (because of the Pauli exclusion principle) up to the Fermi momentum/energy.
There are small corrections made to account for the fact that positive charge is concentrated in nuclei whilst the electrons are (almost) uniformly distributed (electrostatic corrections). Below densities of $10^{7}$ kg/m$^3$ (brown dwarfs, planets) the assumption of a uniform electron distribution breaks down, the Fermi (kinetic) energies move to an atomic scale and further corrections need to be made (Thomas-Fermi corrections) which assume the electrons move in the spherically symmetric potential of a nucleus.

Electron degeneracy pressure


Cooking raw chicken beside heating quesadillas

Question: In a kitchen that has only a flat top to cook with, is it safe to cook raw chicken on it and at the same time heat a quesadillas on the same surface but on opposite side of the flat top?
Comment: I'm not sure I see the point, since cooking raw chicken takes several minutes (at least) and heating a quesadilla takes maybe 20 seconds. Why not just cook the chicken first?
Answer: Of course you can.  The question is whether it is a good idea or not in terms of food safety.
What you don't want to have happen is for raw chicken juices to splatter onto the quesadilla, especially after it has been flipped so that the side where the juices splatter will not be cooked again.
In actual practice, you have to assess the risks:

How much juice will splatter, and how far?
Will the quesadilla still be hot enough (or be turned) to kill any pathogens anyway?
Will enough settle on the quesadilla to have any significant chance of being a real risk?   (The risk of infection increases with the quantity of pathogens present.)

In practice, unless you are serving at-risk populations like the immune-compromised, elderly, or very young children, the risk is probably quite low as long as the foods are far enough apart that the juice is not flowing from the chicken to the quesadilla.
In a professional food service environment, you probably should not do this; at home, you must assess your own tolerance for risk.


Do spayed cats still spray?

Question: If I get my indoor female cats spayed, will they no longer spray? Or will they just spray for territorial reasons only?
Comment: Related [How long after neutering will a **male** cat continue to mark/spray territory?](http://pets.stackexchange.com/questions/6788)
Comment: @JamesJenkins: Thanks. I wonder if this applies, _mutatis mutandis_, to female cats.
Comment: I am not sure. Quotes in the answer there, seem to be gender specific. The possibility of different answers exist with your question.
Comment: As I understand it, they can, but it's a lot rarer than male cats continuing to spray. I don't have references so I'm not adding this as an answer.
Answer: Any cat can spray if sufficiently motivated to. It is a natural response.
Spaying does, however, remove a very strong trigger for a female cat. Biology demands that she broadcast to tomcats that she is ready for breeding, so come and get it.  After spaying, that motivation goes away entirely.
But spaying may also be a signal for other cats to stay away, a claiming of ownership. If this is the driving force, then spraying could persist until whatever causes this distress is handled in some way.
Answer: Female domestic cats to do not "spray." Males do, not females. Females don't mark territory in any way.
If a female is urinating outside the litter box that is an entirely different issue.
Sometimes inappropriate urination locations can be a sign of a health problem which might need prompt attention.
We go by the rule that if a cat's condition or behavior changes with no obviously reason, we will get the cat examined by a vet.
SimonT
Comment: https://www.care.com/c/stories/6425/why-do-female-cats-spray/
Comment: Downvoted because female cats do maintain territory.
Comment: They may "maintain" territory but they do not "spray" as does a male cat. It is one thing for a cat to decide that other cats are violating their territory, it is another to mark territory as a male does.

Do spayed cats still spray?


How do you properly connect 3 x solid 2.5mm wires to a 4mm stranded wire?

Question: I have a single 4mm stranded wire I want to connect to 3 x 2.5mm solid wires. At the moment I've simply wound them around each other temporarily and sealed with electrical tape - but how is it done securely?
Answer: Is this for AC wiring (more permanent house wiring, that needs to meet code, or for something else?
If I were you, I would look into wire nuts, they may be able to get it done the cheapest/most effective.
Also check out the splices used in this question about grounding Grounding wires
Answer: Alway trun off the power.
I use Klein Linemans/Pliers to twist the solid wires together, making sure that all the plastic covering of the wires line up. Next I strip the stranded wire, a little longer then the solid wire, and that the plastic covering of the wire lines up and twist the stranded wire around the solid wire with the pliers. Next using the plier I cut the tip of the new bundle wires, making sure to cut all of the wires, making a good bond. Lastly I wire nut them all together and pull on the stranded wire to make sure that is under the wire nut and does not come out. If the stranded comes out, repeat proccess until it is all secure under the wire nut. No copper should be showing once the wire nut is installed.
Comment: @Tester101, I've only seen "acceptable, but not required", but I haven't used a large array of brands. Do some brands specifically state not to pre-twist?
Comment: Agree with @mjohns, I have NEVER seen a wire nut package that disallows or even discourages pre-twisting.  Are wire nuts even allowed/used/common where the OP lives?
Comment: @mjohns You're correct.  Thought I saw "*do not pretwist*" on the packaging, but it does say "*pretwisting acceptable, but not required.*".
Answer: You can buy connectors made specifically to join stranded and unstranded wires
For example Wago  lighting connectors

can be used in nearly all electrical connections where a connection between solid and fine-stranded conductors is required for household and similar purposes in buildings. Applications can be, for example, automated blinds or awnings, window or bathroom fans, boiler controller, tight connections of electrical devices with stranded conductors, circulating pumps etc.

There are also lever-action clamping connectors that allow solid, stranded and fine-stranded wires to be connected:
For example Wago 221 series

Other connector manufacturers exist.


local osm/nominatim install

Question: I am newbie to osm/nominatim. I set up everything correctly and loaded Florida pbf data and geocode /searches were working fine. Today I added data for Mississipi using the setup.php script with --import option and looks like the data got loaded with no errors. However I am not able to geocode any of the mississipi addresses. The old Florida addresses still geocode fine. What am I missing? What should I do after loading new osm states data? I must be missing a simple step. I am happy to post additional information as needed.
Answer: A quick internet search for "nominatim add new country" shows several hits that lead finally to help.osm.org with this question:
import-more-osm-files-in-to-nominatim
Please tell us about success or failure.
In case that you already followed exactly this instruction, examine your import log files.

local osm/nominatim install


What does "commercial open source" mean for web apps?

Question: When I was looking some web apps they said our apps are "commercial open source". I understand "open source" but what is "commercial open source" what kind of license they are using?
Answer: "Commercial Open Source" software is released under an Open Source licence and accompanied by additional (and often optional) paid services for people who want them.
Many commercial organisations are built around Open Source software; they give the software itself away and offer paid services in support. For example:

Canonical give the Ubuntu OS away under an Open Source licence, but offer paid enterprise and engineering support.
Automattic give the WordPress CMS away, but offer paid blog hosting and add-on services.

In both of these cases, the "commercial" part of "commercial open source" is a reference to the add-on services and not the software licence itself. That said, it's important to read, understand, and ask questions about the licences for any products you use.
Answer: Without you saying just who they are I can't tell what license they are using. However it is possible for commercial and open source to go together. Open source means you can see the source code. They could make their money out of supporting the product, or maybe hosting it for you. That's the model that Red Hat use.


Why does My HP printer not work with the new version of Ubuntu 12.04?

Question: Ever since I upgraded to the newest version of Ubuntu (12.04) I've had several issues with my HP Deskjet 6300 All In One fax/scanner/printer.
The fax and scanner work fine but the printer does not.  Most often, I can print the first page of a document but then it freezes into the second page.
Answer: Try installing the HPLIP from Ubuntu Software center.
HPLIP (Hewlett-Packard Linux Imaging & Printing) is an HP-developed solution for printing, scanning, and faxing with HP inkjet and laser based printers in Linux. The HPLIP project provides printing support for 2,201 printer models, including Deskjet, Officejet, Photosmart, PSC (Print Scan Copy), Business Inkjet, LaserJet, Edgeline MFP, and LaserJet MFP. (Note: Not all models are currently supported See Supported Printers for more information.)


Traveling to pick someone up and returning on the same flight

Question: My question is, Can i purchase a round trip flight to fly and pick up another person and return on the same flight with that person? I have children that aren't able to fly alone. My plan is to buy a round trip for all of us but i'll be flying to pick them up at the airport and have them return with me. im not sure if thats possible to do.
Answer: No, you cannot be on the same reservation as your children if you intend to fly out and return (AAA-BBB-AAA), but they will only accompany you on the return (BBB-AAA).
If a passenger misses any segment of a flight itinerary, all subsequent segments are forfeit. Since your children did not fly AAA-BBB, they would not be allowed to fly BBB-AAA. The reservation system will have canceled the tickets automatically.
You can, of course, purchase separate tickets, a round-trip AAA-BBB-AAA for yourself, and a one-way BBB-AAA for the children. You can further call the airline and ask that the two records be linked, so that if there are complications with either, the airline agent knows to check both reservations. This will also entail a little more effort for coordinating seats and boarding groups as well.
Answer: Sure, this has been done.  It's not anything really special.
You book at round trip, say LHR-LAX-LHR.  You book the kids a one-way on the same LAX-LHR flight as you.
Depending on the airline, you may be able to link the reservations so any Agent who assists you will see you are traveling with other passengers.
Also, presuming you want to sit with the kids, you may, depending on the ticket class and your status with that airline, have to pay a fee to select seats together.
Basically, there's nothing stopping you from doing this, it just take a bit more coordination.
Comment: @Aganju No, I did not miss that.  I was describing that OP did not need to book r/t tickets for the kids.  choster make the same point in their Answer.
Comment: your first 'no problem ' is missing that he planned to buy two round trips- that will not work. you say so in the details, but that's not what he was planning


What happens when you apply full cyclic + collective?

Question: Can a helicopter apply full cyclic and then full collective at the same time? Would'nt the blades on one side (opposite of the intended tilt direction) have already maxed their aoa, resulting in a net dissapearence of dissymmetry of lift, with the effect equal to just applying full collective? Or does full collective + cyclic result in even greater aoa (the inputs add up)?
Comment: Full cyclic in which direction? the side of retracting blade?
Answer: Multiple questions here. Assuming by full cyclic you mean pushing the cyclic to a mechanical stop while pulling full collective to the mechanical stop, the answer is yes, at least for the Bell 206, a very common turbine helicopter in use worldwide. There are no restrictions with regards to full flight control inputs. At stabilized hover on a no wind day there is no appreciable dissymmetry of lift as aerodynamically, there is no advancing or retreating blade. If you push the cyclic straight and full forward, mechanically tilting the rotor disc, the instant you move forward you now have dissymmetry of lift between the advancing and retreating blades
Answer: Yes it is possible to apply both max collective and max cyclic.
The three actuators that move the swashplate obviously have limited range of motion - what happens if some of the range is consumed by cyclic stick deflection, and collective action will consume more than the remaining actuator range. Is how I now understand your question.
In larger helicopters, the control mixer is designed with the following priority:

Collective: the power handle.
Pedals: the anti-spin device, also for when you need to apply more power.
Cyclic: for reaching your destination.

Collective and pedals have major safety related functions.
How the priority is implemented depends on the size of the helicopter, larger ones have irreversible boost actuators between control and swashplate, and are designed such that at the cyclic travel stops move as a function of collective/pedals. The stick travel limits - with the stick inside the limits there is no effect with boost on, with the cyclic fully extended it will come back a bit at full collective.
Smaller heli's without irreversible boost will act like a lever, with collective or pedal at one end and the cyclic at the other. The lever arm will favour the collective/pedal end.


Can only access boot and RECOVERY from SD card reader

Question: Recently, I accidentally screwed up /etc/passwd/ and I thought that I could use an sd card reader. Turns out, I can only access boot and RECOVERY. The computer we are using is a Mac. Is this the only folders the sd card allows us to access, and how do you get into etc?
Comment: You can mount the ext4 filesystem, but you need some additional program, explanation can be found here https://apple.stackexchange.com/questions/29842/how-can-i-mount-an-ext4-file-system-on-os-x
Comment: @MatsK That link MAY have worked in 2011, but SIP prevents this from working.
Answer: The boot directory is formatted with the FAT file system.  I guess RECOVERY is as well.  That means the contents are readable and writable by Windows, Macs, Linux as they all support FAT.
The other directories will be formatted as ext4 which is a Linux file system.  You will probably need to find (i.e. web search) an add-on to allow this file system to be read by non-Linux systems.
Answer: The simple answer is you Can't - it used to be possible with 3rd party add-on, but since Apple introduced SIP all the external programs fail.
Your best bet is to use a live Linux CD or similar.
You can boot the Pi into the root shell and fix/change password
See
https://raspberrypi.stackexchange.com/a/15601/8697
or
https://raspberrypi.stackexchange.com/a/50467/8697
I should add that there is NO REASON to edit <code>/etc/passwd</code>
Comment: Hey, for what it's worth Paragon ExtFS for Mac 11 (or the 10-day trial of it) works for me to read/write the ext4 root partition on macOS 10.13 High Sierra. Though I'm sure plenty of the alternative programs are now broken as you say.


Did the Rosato Brothers kill Peter Clemenza?

Question: When Fredo and Pentangeli meet in Nevada in The Godfather Part II, they talk about Clemenza's death. Willi Cicci says that was no heart attack followed by Pentangeli saying that is the reason for him to visit Michael. When later he meets Mike, he goes on to complain about the Rosato Brothers stepping over their territory. Could the two be related?
Comment: https://godfather.fandom.com/wiki/Peter_Clemenza#Death
Answer: Probably not.
Interestingly Cicci's line about it not being a heart attack does not appear in several drafts of the script.
2nd Draft 24th September 1973

<code>          PENTANGELI
  You remember Willy Cicci, don't
  you, Freddie?  We was all together
  with the old man Clemenza in
  Brooklyn... before...uh...

          FREDO
  We were all upset about that.

          PENTANGELI
  That's what I'm here to talk to
  your brother about.  What's with
  him, I got to get a letter of
  introduction to have a 'sitdown'?
</code>

A similarly dated version

<code>      PENTANGELI
   Sure, Pete Clemenza died of a heart
  attack, but the Rosato Brothers
  gave it to him.

     MICHAEL
 We were all heartbroken at the
 news; but that wasn't cause to
 start a war.
</code>

This version which does not appear in the movie at least has the implication that the stress of dealing with the brothers caused the heart attack.
In light of Michaels conversation with Pentagelli the idea that the Rosato's were directly involved in Clemeza's death does not really hold up. Frank isn't going to war with the Rosato brother because they killed Clemenza but because they are infringing in his territory. If the brothers had killed Clemenza I think it likely that THAT would swing Michael to Frankie's side and it would have been mentioned.


Two different keys decrypting same content

Question: is there some generally available algorithm which will encrypt a short string and generate two unique keys so that any of the two can be used to decrypt the message again? It doesn't has to be "super secure".
Comment: Usually this is enabled by encrypting a random data key with two user specific keys, and then encrypting the message with the data key. You then add the encrypted (wrapped) keys to the ciphertext
Comment: ... *include* the keys with the ciphertext, not add in the mathematical sense of course.
Answer: Most public key encryption schemes, such as PGP, support this.
When you are encrypting  a message to Bob, in fact you are encrypting the message with a random key using a symmetric cipher, then including the key encrypted to the public key of Bob.
$$E_{\text{PK}}(\mathit{Bob}, \mathit{key}) \Vert E_{\text{Symmetric}}(\mathit{key}, \mathit{message})$$
where $\Vert$ denotes concatenation.
If you encrypt the message to Alice and Bob, you are encrypting the same random key to each of their public keys:
$$E_{\text{PK}}(\mathit{Alice}, \mathit{key}) \Vert E_{\text{PK}}(\mathit{Bob}, \mathit{key}) \Vert E_{\text{Symmetric}}(\mathit{key}, \mathit{message})$$
Each of them can decrypt the message.
Comment: Small note: usually direct binary concatenation is not used. PGP for instance specifies a *container format* which can list the public keys that were used to (indirectly) encrypt the message.
Comment: However this is not scalable to N participant since the message will have to grow as well rendering it untransferable anymore (I know the OP asked for only 2, but that's good to remember)
Comment: @xryl669 **it does scale**. Linearly to the number of participants, _independent of the message size_. Sending a 1GB file to a couple of people may take 1 GB plus 1KB, and encrypting for 100 users instead 1GB 50KB. The OP wanted to encrypt a "short string", so in such case the benefits may be dwarfed by the overhead of Public Key encryption, but as you see, it excels with large files.
Answer: You can do this for any encryption. Simply encrypt the secret message with a random key. Then encrypt two copies of the random key, one with Alice's key, and one with Bob's.
Keep it simple :)
Answer: A totally different approach is given in the following paper A Simple Public-Key Cryptosystem with a Double Trapdoor Decryption Mechanism and its
Applications (pdf) where a double trapdoor is used to give two different and indipendent private key.
The first secret key is given by the knowledge of the (secret) factorisation of an RSA-like integer $N$; the second secret key is given by the knowledge of the (secret) discrete logarithm of a public element.
Answer: The typical process is to encrypt the message using a separate data key, as suggested in Maarten Bodewes comments.  It is then trivial to encrypt this key twice, once using each of the keys you plan on handing out, and concatenating those two encrypted keys to the message.  There are potentially more optimal approaches, such as the one dddavidee suggests, but this approach has one big advantage: its simple.  It is trivial to analyze the security of this process because it works for any arbitrary encryption methodology.  Use whatever encryption you are comfortable with!  The message is secure as long as neither encrypted copy of the key is cracked (and as long as you properly disposed of the key when you were done encrypting, of course!), and it is secure to the level of security afforded by the encryption you used on the data in the first place.
The more specialized algorithms prove to be more useful in shared secret situations, such as "Any 3 of 7 keys, brought together, needs to be sufficient to decode the message, but no 2 keys can do so."  More exotic situations like that call for algorithms like those from Rivest's "How to Share a Secret."
Answer: I'd like to add Shamir's secret scheme here too.
Basically, you'd encode your message using this scheme. Then you can create as many different key as you want to decode it.
This is usually used with two or more part for decoding, but nothing prevents you from using only one part here.
Compared to Ángel solution, the message does not grow depending on the number of participants/recipients, which is a very nice property to have.


Word that means to "get something good but loses something else good in return"

Question: I was at the optical store getting a new pair of glasses and lens. Since I have a somewhat high prescription, when selecting the features for the lenses I asked the clerk whether there is an option where the lenses can be made thinner than the regular lenses with the same prescription and she said yes, those are the high-index lenses and they cost a little bit more. Then I asked her since these lenses are thinner thus better, will it lose quality in other areas such as clarity, impact resistance, etc.. I feel the way I asked this is somewhat wordy and I wonder if there's an expression that means what I'm trying to say. An expression that describes the fact of getting something that improves its quality, but will in turn cause the lost of quality in something else sort of like a balance, I guess similar to the word sacrifice? But using sacrifice doesn't seem that correct in this context.
Comment: I have a rather strong prescription and I got some very excellent thinner high-index plastic lenses and the only thing I sacrificed was a little extra money.  Clarity, break-resistance, durability of these lenses were actually better in all respects than the lower-index plastic lenses (or worse, glass).  The trade-off, more expense, was well worth it!  I love these new lenses!
Comment: To get a better value in one, you need to ***compromise*** on another. "His goal was to run a successful business without compromising his principles." (http://dictionary.cambridge.org/dictionary/business-english/compromise_2)
Answer: In my humble opinion, the word "trade-off" is most appropriate here.  Sacrifice suggests loss, not gain.  You would have to use both "sacrifice" and "gain" to obtain the meaning that "trade-off" provides in one package.
You could then ask:
"What are the trade-offs?" rather than "What do I sacrifice for these gains?"
Comment: or "are there trade-offs for this thinness" works as well?
Comment: Of course!  It's a marvelous word.
Comment: drat. I was looking for that word :)
Comment: Yes, I saw the two responses that came before me and marveled that neither of you came up with it before me.  Sometimes it is _my_ chance to shine.  Usually I get there too late, more's the pity.
Answer: To sacrifice resistance for thinness is correct English.
Sacrifice food for weight loss
Sacrifice salary for job safety
I sacrificed stability for lightness when I chose my sunglasses
You gained thinner lenses at the cost of impact resistance
Are there any disadvantages to these thinner lenses?
Comment: I prefer your last suggestion but you forgot to put "disadvantages" in italics. (I didn't see it the first time.)
Answer: This is similar to "negative externalities". These are basically things that are inherently included in any given action that are detrimental. Usually they are something that should not be ignored, but are at first.
For example, lets say everybody really wants a big Wal-mart to be built in their city, because it is cheaper and faster. At first the idea is great, however, a negative externality may be that people who own small businesses may be pushed out, and then they are worse-off than they were before.
I really love this word, it is the perfect thing to use in this type of situation. Also remember that there can be positive externalities as well! :)
Answer: Sacrifice works. Maybe trade, exchange and forego too?

To trade resistance for thinness?
To exchange resistance for thinness.
To forego resistance in favour of thinness.


sharepoint 2013 contact web part display

Question: Is it possible to alter the contact web part to display the text below the image?  I have tried editing the web-part but there doesn't seem to be anywhere I can change this.  I was expecting to be able to 'float' the image but this doesn't seem to be possible.
Answer: A javascript solution is possible. Use the below javascript code in a content editor web part on the page.
$(".ms-descriptiontext").parent().parent().parent().append("
"+$(".ms-descriptiontext").text()+"
")
$(".ms-descriptiontext").hide();

You can replace ".ms-descriptiontext" with any other selector.


How to replace placeholder inside page design while sending personalize outbound Email

Question: We are using SDL 2013 sp1 with outbound email functionality.We recently implement a feature in our website where replying on any user comment we are sending the confirmation email to the comment owner.The email has some personalize information like comment and other data which is coming from database right now we are putting some placeholder in email page design and we are replacing this placeholder by manipulating EML file generated from CMS. Is there any way to replace this placeholder before Tridion generate EML file for each contact.
Answer: The main challenge with this is the context: when the Page is rendered for the confirmation e-mail, you don't know which Contact it is rending for. That information is only available when the Mailer service customizes the output for the Contact (i.e. replaces the placeholders with the actual data).
In short, until there is an event system available for Audience Manager, the current solution of modifying the e-mails before they are sent out is perfectly sensible.
Answer:
EML file generated from CMS

You do know that it is your template that generates this file, right? Tridion executes a template that generates the eml files, and chances are, you are using placeholders in there too. I'd recommend looking into the documentation for Outbound Email, and finding out the code for your email templates so they can be adapted.
edit: words, tone & English


What do I substitute for Greek yogurt in a pizza dough?

Question: The two ingredient pizza dough recipe calls for 1 cup of Greek Yogurt and 1-1 1/2 self rising flour. I can't find 'Greek Yogurt' where I live. Can I use 'natural yogurt'? Or whatever.
Comment: possible duplicate of [Substitutions for greek yogurt?](http://cooking.stackexchange.com/questions/18218/substitutions-for-greek-yogurt)
Comment: Greek yogurt is typically thicker than natural yogurt, you may not get a thick enough result.
Comment: This question is about substituting in dough, while the other is about a sauce, so I think it's not quite a duplicate. You can get away with a lot more in sauces than you can in baked goods.
Answer: You can make your own version of Greek yogurt and it will be even better than what you buy in the stores.  What you need to do is buy "plain unflavored yogurt", preferably full fat or whole milk.  Then get a cheese cloth, and put the yogurt into the cheese cloth that is covering a bowl (please make sure the cheese cloth or a very thin cotton type wash cloth not (like a bath towel) but very smooth like a bed sheet, is secured over a bowl so that the yogurt can drain and the cloth will stay in place. It will take an hour or maybe two or even three, but the water will come out of the yogurt and it will be thicker and richer.  I think the water that comes out is called whey.  Preferably buy a middle eastern brand of yogurt, or an Armenian or even Russian brand.  There is something different in those brands that tastes a little bit better, especially if you get the water out, Mountain High is also good.  You can also buy something called "lebni" but that is a different product of yogurt, similar process, but if you try what I say, it will work fine.  If you do this with nonfat or lowfat, it is ok also, but we prefer the whole milk style and my friends and family do not like the Greek yogurt at all.  Funny, my Greek friends don't care for Greek yogurt either. We find Greek yogurt has more of a cloudy taste rather than a crispier creamier fresher taste and not so heavy and old as Greek yogurt.  Good Luck
Comment: What we Americans call "Greek Yogurt" is called "strained Yogurt" by about everyone else: https://en.wikipedia.org/wiki/Strained_yogurt
user33210 has given a good summary of how to make the stuff from regular yogurt. Here's a website with pictures and everything: How to Strain Yogurt: http://toriavey.com/how-to/2011/08/how-to-strain-yogurt/
Answer: The point of the yogurt in this recipe is both flavor and for the acid in the yogurt to react with the leavening agents in the self-rising flour (usually baking powder) so that the dough will rise.
Greek-style yogurt is regular yogurt that is strained to remove most of the liquid (yes, it is whey) and you can do this yourself the way user33210 instructs. You want a texture like a very soft cheese. You'll need about 2 c regular yogurt to end up with 1 c of Greek-style strained yogurt.
The flavor of the resulting strained yogurt will depend on the yogurt you start with and how you handle it while straining it.
If you strain it in the refrigerator it will stay unchanged, if you strain it outside the refrigerator it will tend to become more sour as the yogurt bacteria become more active.
Actual Greek yogurt from Greece doesn't taste exactly the same as Greek-style yogurt from the US, but the difference probably doesn't matter for this recipe. Yogurt from different countries use slightly different bacteria cultures and also may tend to be milder or more sour, thicker or thinner styles. The sourness will affect the taste of your resulting dough if it is extremely sour.
I find purchased Greek yogurt and American yogurt are both on the mild side, although I've had homestyle yogurt in Greece that was stronger. If it is an American recipe it is probably expecting a mild-flavored strained yogurt.


How do I determine my flat-footed and touch AC?

Question: How do I figure out what my flat-footed and touch AC should be? I looked in the index, but it just takes me to a page that has a description. I looked in the glossary, and that just gives a description as well.
Comment: Silver, are there other players you are going to be playing with? Certainly your Dungeon Master can give you more in-depth and personable advice.
Comment: Dont have one yet...My mom offered, but my books are at my dads... She doesnt remember much cause the last time she played was about fifteen yrs ago
Answer: When you are flat-footed, you lose your dexterity bonus to armor class as well as any Dodge bonus. So use the same calculation you would use for your normal armor class but don't include any bonuses from dexterity or dodge.
Against touch attacks, you lose any bonuses from armor, shield, and natural armor, but retain bonuses from dexterity, deflection, dodge, etc.
Comment: ty so much!!!!!


Can't make Koji Work on A Centos6 server

Question: I setup the koji build environment in a Centos6 Machine server as suggested by the documentation (http://fedoraproject.org/wiki/Koji/ServerHowTo).
I could properly access the Koji Web using HTTP, yet I'm facing an SSL certificate trouble when switching to HTTPS:
Client Browser error produced by Mozilla FireFox:
SSL peer was unable to negotiate an acceptable set of security parameters. (Error code: ssl_error_handshake_failure_alert)

Having enabled two admin users, I get a Koji specific error when running the command:
su kojiman; koji call getLoggedInUser

Errors under : kojiman:
Error: [('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')]

#

su kojiadmin; koji call getLoggedInUser
Errors under: kojiadmin
Error: [('SSL routines', 'SSL3_READ_BYTES', 'sslv3 alert bad certificate'), ('SSL routines', 'SSL3_WRITE_BYTES', 'ssl handshake failure')]

While in httpd ssl log I have the following:

############################"

SSL errors:
[Wed Feb 05 18:37:28 2014] [error] [client 220.127.116.11] Certificate Verification: Error (19): self signed certificate in certificate chain
[Wed Feb 05 18:44:06 2014] [warn] RSA server certificate CommonName (CN) `kojihub' does NOT match server name!?
[Wed Feb 05 18:44:06 2014] [warn] RSA server certificate CommonName (CN) `kojihub' does NOT match server name!?

When I test the certificate I get with openSSL:
openssl s_client -connect localhost:443 -tls1 -CAfile /etc/pki/koji/kojihub.pem

I indeed get:
verify error:num=20:unable to get local issuer certificate
verify error:num=27:certificate not trusted
verify error:num=21:unable to verify the first certificate

verify return:1
139736479307592:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:s3_pkt.c:1256:SSL alert number 40
139736479307592:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshake failure:s3_pkt.c:596:
Verify return code: 21 (unable to verify the first certificate)

Answer: The kojihub and kojiweb certificates must have their CN set to the fully qualified domain name of each respective server. This was in the documentation:

Two of the certificates (kojihub and kojiweb) are used as server side certificates that authenticate the server to the client. For this reason, you want the common name on both of those certs to be the fully qualified domain name of the web server they are running on so that clients don't complain about the common name and the server not being the same. You can set the OU for these two certificates to be kojihub and kojiweb for identification purposes.


Lunacy diagnosis plus a number - what does it mean?

Question: One of my ancestors was a patient at Herrison Hospital, Dorset, in 1911. Looking at the census records for the hospital, alongside the word "Lunatic" is a number.  In his case it is 43, and other patients have various numbers like 66, 28, 61, 30, 86 etc.  They are not the patients' ages but does anyone know what these numbers reference?
Thank you.
Comment: Welcome to G&FH.SE, Grania. And that's an impressive start - your question made it to the site's "Hot Questions" list, and nearly 1000 people have viewed it so far!
Answer: According to www.1911census.org.uk, the information recorded for individuals included:

Infirmity, one of deaf, dumb, blind, lunatic, imbecile or feeble minded. The age at which the "infirmity came on" was also required.

I've cropped out a section from one page of the 1911 census for Herrison Hospital to illustrate this:

All of the "codes" in the infirmity column are lower than the number in the corresponding age column. A brief look through other pages suggests that this pattern persists through the data set. So these numbers are likely the age that "infirmity" started or was diagnosed, as stated in the link above.


How do Red Herrings work?

Question: The more distractions you have in your narrative, the fresher the plot/character twist. They were used in 'The Da Vinci Code' and the Harry Potter series, to keep the audiences focussed on a different 'conclusion'.
How are they done, exactly?
Answer: Stories run on anticipation. A reader keeps reading because the anticipate that certain things are going to happen, and that we are making progress towards those things happening. By and large, the reader reads on because they anticipate the enjoyment of watching those thing happen, and thus enjoy the anticipation itself. When the reader finds a story boring it is because they don't anticipate anything happening that is likely to interest them.
Good writing, therefore, is about creating and maintaining that sense of anticipation and then following through and delivering what was anticipated.
A red herring creates a false anticipation. It suggests that A is going to happen, but B happens instead. There is no special technique for creating red herrings. You simply tell the story as if it were leading up to A happening. But then you twist the story and have B happen instead.
The perils of red herrings should be obvious. If the reader is anticipating A, and their pleasure in reading depends on the anticipation that A will happen, then the sudden discovery that A is not going to happen can come as a great disappointment and can lead them to stop reading and give the book a one star review on Amazon.
For the red herring (which is to say, the plot twist) to work, the reader who was expecting A has to be delighted to find that B happens instead. If you lead them to anticipate hamburger and then serve them steak, you will have some happy readers. If you lead them to anticipate steak and then serve them tofu, you will have some very unhappy readers.
Comment: +1. Just one note: 'delighted' needn't be a positive emotion in this case. It can well be an "oh shite" reaction, the reader much  more scared, for example, when B happens than they were when they expected A. In the right genres, the reader would be "delighted" with you creating a frightening situation, or a heartbreaking one, etc.
Comment: Agreed. Or rather, perhaps, the reader may take delight in tragedy as much as in comedy. After all, why read tragedies at all unless there is some form of delight in them? This is perhaps on of the oddest things about humans. We like sad songs. Somehow they make us feel better. Perhaps simply because they make us feel less alone in our sadness, and there is delight in that.
Comment: I don't know that I agree with you in all cases, there are stories I have read without any anticipation of any particular event, or even an anticipation of understanding the events that do occur, the _Cryptononicon_ for example. Usually these are stories by authors I have previous experience of so you could argue that I anticipate enjoying the story but that doesn't help a red herring function any at all.
Answer: Surprising, yet inevitable
The perfect plot twist should be one that the readers do not expect, but makes them feel that the plot makes more sense happening this way than if it happened any other way.  A good example is the scene at Mt. Doom in Lord of the Rings.
(I realize it's Lord of the Rings, but I'm spoilering it anyways)

 Nobody expects the heroes to overcome all of their trials and tribulations only to have their willpower fail at the last critical moment.  But considering how worn down Frodo is and how powerful the Ring has become, it makes perfect sense for him to succumb at that moment.

 And Gollum's intervention wraps up the theme from the very beginning of the series about whether or not Bilbo's mercy in not killing Gollum was the right choice or not, and gives a satisfying conclusion to Gollum's character arc.

For red herrings, this has two parts.  It means that what actually happens must make more sense than what the readers expected would happen.  And the clues that misled the readers must have a satisfying explanation for their presence.
For example, in the first Harry Potter novel

 The reveal that Quirrel is the villain explains a number of details - his presence at the Leaky Cauldron, his discovery of the troll on Halloween, and his abrupt personality shift after his trip to Albania.

  Additionally, the clues regarding Snape's intentions are explained by his attempts to head off Quirrel's plan, and his genuine dislike of Harry.

The trick is to hold back some of the necessary information without letting the readers know that there is a gap in the readers' knowledge, while at the same time dropping clues to what's actually going on without drawing any attention to the significance of those clues.
No twist will surprise everyone
Because a proper twist needs to be an entwined part of the story, no twist is going to surprise everyone.  That's okay.  The satisfaction of being able to correctly predict an unexpected event is generally just as fulfilling as the surprise of not predicting it.
Don't let the twist itself make or break your story.  It's the consequences of the twist that are important rather than the surprise itself.
To use the first Harry Potter as an example again

 The twist itself was that it was Quirrel, rather than Snape, who was evil.  The consequences were that Voldemort was present right there on the back of Quirrel's head, and that Snape was not a generically evil minion but a significantly deeper and more complex character.
Comment: "Nobody expects the heroes to overcome all of their trials and tribulations only to have their willpower fail at the last critical moment." Actually, those of us versed in Catholic theology would expect exactly this. This is a very Catholic moment. As sinners we cannot overcome evil by our own will or our own strength. It must be through a species of diving intervention, merited, if it can be merited at all, by love and mercy, in this case the mercy shown to Golem. Note the same motif in LWW: the witch cannot be overcome by human effort alone. It requires the sacrifice of God (Aslan).
Comment: That's a good point.  Although in this case it required the sacrifice of Gollum :D.  I've added more thoughts to my answer.
Comment: @Mark Baker It's definitely a typo, but I'm thoroughly enjoying the picture of overcoming evil by 'diving intervention'. Very apropos to Lord of the Rings, and perhaps explaining why it's such a popular Olympic sport ;)

How do Red Herrings work?


How do I answer interview questions about overcoming difficulties?

Question: When you are asked "what is the most difficult project? and how did you overcome the difficulties", what is the expected answer for this?
Comment: see also: [How to answer critical non technical questions in an interview](http://workplace.stackexchange.com/questions/8911/how-to-answer-critical-non-technical-questions-in-an-interview)
Answer: You are expected to tell the interviewer about the most challenging project you have worked on and how you overcame the challenges presented in it.
Comment: how to define the "challenging"?
Comment: Least easy.  The project that required you to develop your skills the most.
Comment: @Sihan - You could ask the interviewer to define challenging, but based on the tasks you're given, you should be able to define that for yourself.
Answer: The keys would be how well can you give the context of what was the project, what made it hard and what did you learn from it among other things.
The interviewer is seeing whether or not you'd speak negatively about the project or a past employer, how well do you know your weaknesses, what have you done about them and how would you handle this situation should it happen again in the future. There are more than a few mines you could hit here that lower your chances of getting the job.
Answer: When you are asked:

What is the most difficult project? How did you overcome the difficulties

They are really asking:

What is your process in dealing with challenges/issues

And, typically, what they are looking for is someone who can isolate, identify, and then solve problems. Ultimately, it doesn't matter how big of a difficulty you had with any particular project, but the process of how you overcame that difficulty.
Also, it does matter what kind of challenge it was - if you're looking at a team leader or manager role, it might be better to talk about a people issue rather than technical - "working on x, and one of our developers wasn't quite meshing with the rest of the team and it put our delivery at risk. So I took him aside and offered to mentor him, which he accepted, and within a week his productivity improved and the team delivered on time and we all got a bonus."
If you're looking at a developer or architect role, then highlight something more technical.
Answer: What would be a good answer to this is going to vary greatly depending on the seniority of the postion you are talking about and the needs of the particular position for that particular company. But in general they are looking to see how you deal with challenges and what your technical abilities really are. So the expectation is going to vary based on your own experience level  or claimed experience. For instance, suppose I see a resume that claims lots of different knowledge and says all sorts of exciting things the person did, but in answer to this question, he describes how he once had to create an Access form that used a data lookup. In this case, his claimed experience is out of synch with what he said was actually a difficult project. You would be amazed at the number of people who claim to be really experienced but who can't describe anything challenging they have actually done. This question helps weed out the resume liars.
If it is an entry level postion talking about your most challenging class project or some work you did as an intern or even a personal project realting to your profession would be fine. Talk about what made it challenging, how you solved the problems of the project and what you learned from it.
After entry level, the expectation would be to discuss a work-related problem. If you have 3 years of work experience I don't want to hear about how hard your C# class was. If you are looking for a journeyman level, I would try to describe a project that shows you are ready to move up from entry level.
If the job is senior level, I would expect the challenge to be more than something technically difficult, but something technically difficult that had some elements of soft skills as well such as project management, dealing with difficult people, pushing back requirements that were inadequate, etc. At the senior level, technical skills are only 30-40% of the job in my experience.
Comment: ^This ... When I'm interviewing someone I'm primarily interested in hearing/seeing how they approach an issue/roadblock. And I think you're spot on in saying that the more senior the candidate [meaning they're looking to be hired for a senior level position] the more I want the see/hear them demonstrate their approach to non-hard-technical issues like managing projects/priorities, dealing with scope creep and inadequate requirements, difficult customers [internal and/or external], unrealistic timelines ...


Backstab outlet with one wire screwed in?

Question: I'm replacing an outlet in my bedroom, and as soon as I opened it up I noticed there is the normal bare ground wire, two pairs of wires going into a backstab outlet, and then a single wire connected by screw. This is not connected to any switch or light or anything. The new outlet is not a backstab, got it from Wal-Mart. My question is, how should I hook this up? I'm assuming i can't connect two wires to one screw. Also there are three white wires and two black, one of the three white wires is the one on the side. Thabks for any help.
Comment: Can you post a picture?
Comment: Is the single wire connected to the side screw capped off with a Wire nut or tape?  you say it is not connected to anything.  Is it just a short stubby piece of wire that's dangling free in the box?  If it is not connected to anything then it serves no purpose  that I can think of.
Answer: You should use either side-screws, or backstabs, but not both at once.  And you should never use backstabs, according to many of us!  I just had to deal with a broken switch where the backstab was the core cause.
If you really need to connect 3 wires, you can pigtail.
Or, consider the $3 "screw-and-clamp" types such as Leviton that are sold at home-improvement stores and electrical supply.   They look like backstabs except the holes are directly aligned with the screws.  Aside from using the screws the normal way, you can screw down to clamp 1 or 2 wires in the holes behind the screw. So with two screws, you can connect up to 4 wires per side.


No views_per_day in /info route?

Question: I'm not particularly crying over it, just curious why the views_per_day field was dropped?
Answer: View data isn't stored in a way that makes "views over time" easy to calculate, nor is the final result reliable.
Given the move away from views elsewhere in the API (dropping sorts, fields, etc. ; for similar reasons) it seemed appropriate to drop the field from /info.
Comment: @George, ah thanks for reminding me about that. I thought the spec was on the private beta announcement, I forgot it was "draft".
Comment: Is there any suggested workaround or alternative? This is the most interesting stat for us over on travel.SE

No views_per_day in /info route?