Wasn't Harry's father just like Draco?

Question: Throughout the series Harry keeps thinking of Snape as a villain partly because Snape holds a grudge against Harry because his father picked on him as a kid. Snape repeatedly gets onto Harry because he is acting just like his father which Harry feels pride at. However in the flashback scenes in the book Harry's father and friends are shown pretty much mercilessly picking on Snape for no real reason in much the same way that Draco Malfoy later picks on
Harry. Is there ever any other flashbacks or mentions of Harry's father when he was a student that doesn't show him as anything but a mischievous bully?
Comment: Actually, keep in mind that Draco initially wanted to be friends with Harry.  He only started persecuting Harry after Harry snubbed and insulted him. I don't think James ever gave Snape the chance that Draco offered Harry.
Comment: Can you please clarify - when you said "Is there ever any other flashbacks or mentions of Harry's father when he was a student that doesn't show him as anything but a mischievous bully?", are you asking for flashbacks that **contradict** the fact that he was a bully, or merely flashbacks that show him doing things OTHER than bullying (meaning, he was a bully, but he also liked to paint pretty pictures in free time when there was nobody around to bully).
Comment: @DVK No I simply meant what Martha pointed out that the main flashback we see is from Snape's point of view which I'm not sure if that colors the events remembered or not. Since there seems to be nothing else to compare it against I would say that looking into someones memories is the same as watching a video. But if there was another flashback that showed James sticking up for someone (even Lupin before they were friends) then there might be another reason for why he was picking on Snape (other than to get Lily's attention)
Comment: There are MANY mentions of Harry's father being a good person, but not so many (if any) flash-backs!
Comment: Draco does have that whole neo-nazi anti-muggle thing going on, too..... and a desire to serve Valdermort.
Answer: TL;DR:
The ONLY two redeeming things stated about James before his last year was that

He always hated the Dark Arts. Everything else - 100% - confirmed that he was just as much a conceited bully as Malfoy.

And Snape was just this little oddball who was up to his eyes in the Dark Arts, and James — whatever else he may have appeared to you, Harry — always hated the Dark Arts.'

He was a loyal friend. After all, he learned how to become Animagus to help Lupin.

Long version
Yes, James was a piece of work.

'I would, I just don't want you chucked back in Azkaban!' said Harry.
  There was a pause in which Sirius looked out of the fire at Harry, a crease between his sunken eyes.
  'You're less like your father than I thought,' he said finally, a definite coolness in his voice. 'The risk would've been what made it fun for James.'

In other words, James would have done something for enjoyment, and not care if his best friend was sent to Azkaban!

'Me too,' said James. He put his hand in his pocket and took out a struggling Golden Snitch.
  'Where'd you get that?'
  'Nicked it,' said James casually.

Stealing school property, too. Nice.

Your question is actually explored in the books, where Harry - after seeing Snape's memories - struggles with the idea.

Harry tried to make a case for Snape having deserved what he had suffered at James's hands: but hadn't Lily asked, 'What's he done to you?' And hadn't James replied, 'It's more the fact that he exists, if you know what I mean.' Hadn't James started it all simply because Sirius had said he was bored?
  .
  Harry remembered Lupin saying back in Grimmauld Place that Dumbledore had made him prefect in the hope that he would be able to exercise some control over James and Sirius . . . but in the Pensieve, he had sat there and let it all happen . . .
  .
  Harry kept reminding himself that Lily had intervened; his mother had been decent. Yet, the memory of the look on her face as she had shouted at James disturbed him quite as much as anything else; she had clearly loathed James, and Harry simply could not understand how they could have ended up married. Once or twice he even wondered whether James had forced her into it . . .

--
Harry tried to question Sirius about it in OoP. Basically, both Lupin AND Sirius confirm the pattern, though they see it as a more harmless youthful horsing around (especially Sirius, who was himself the same, and didn't have Harry's experience of what it's like to BE bullied).
According to them, James only became less of a bully when he changed in his senior year - either due to maturing, or beneficial influence of his feelings for Lily, or responsibilities of Head Boy office.

When he had finished, neither Sirius nor Lupin spoke for a moment. Then Lupin said quietly, 'I wouldn't like you to judge your father on what you saw there, Harry. He was only fifteen — '
  'I'm fifteen' said Harry heatedly.
  'Look, Harry' said Sirius placatingly, 'James and Snape hated each other from the moment they set eyes on each other, it was just one of those things, you can understand that, can't you? I think James was everything Snape wanted to be — he was popular, he was good at Quidditch — good at pretty much everything. And Snape was just this little oddball who was up to his eyes in the Dark Arts, and James — whatever else he may have appeared to you, Harry — always hated the Dark Arts.'
  'Yeah,' said Harry, 'but he just attacked Snape for no good reason, just because — well, just because you said you were bored,' he finished, with a slightly apologetic note in his voice.
  'I'm not proud of it,' said Sirius quickly.
  Lupin looked sideways at Sirius, then said, 'Look, Harry, what you've got to understand is that your father and Sirius were the best in the school at whatever they did — everyone thought they were the height of cool — if they sometimes got a bit carried away — '
  'If we were sometimes arrogant little berks, you mean,' said Sirius.
  Lupin smiled.
  'He kept messing up his hair,' said Harry in a pained voice.
  Sirius and Lupin laughed.
  'I'd forgotten he used to do that,' said Sirius affectionately.
  'Was he playing with the Snitch?' said Lupin eagerly.
  'Yeah,' said Harry, watching uncomprehendingly as Sirius and Lupin beamed reminiscently.  'Well . . . I thought he was a bit of an idiot.'
  'Of course he was a bit of an idiot!' said Sirius bracingly, 'we were all idiots! Well — not Moony so much,' he said fairly, looking at Lupin.
  But Lupin shook his head. 'Did I ever tell you to lay off Snape?' he said. 'Did I ever have the guts to tell you I thought you were out of order?'
  'Yeah, well,' said Sirius, 'you made us feel ashamed of ourselves sometimes . . . that was something . ..'
'She started going out with him in seventh year,' said Lupin.
  'Once James had deflated his head a bit,' said Sirius.
'And stopped hexing people just for the fun of it,' said Lupin.
Sirius frowned at Harry, who was still looking unconvinced.
  'Look,' he said, 'your father was the best friend I ever had and he was a good person. A lot of people are idiots at the age of fifteen.
  He grew out of it.'
Comment: "He grew out of it" also sounds similar to Draco by the end of the series
Comment: @Izkata - Draco didn't "grow out of it". He got the &*(% beat out of him, both literally and figuratively speaking, to mellow him out some.
Comment: @Martha Though even just the facts do sound a lot like abuse, and it seems from the quotes that even Lupin felt they went too far.
Comment: @DVK, yeah, but they dismissed many of Harry's objections: they remembered the same general facts, but not the same attitudes/interpretations. Part of that could just be that they were also idiotic 15-year-olds at the time, but then, so was Snape. My point is, we shouldn't take Snape's point of view as the unvarnished truth: things that he interpreted as abuse may have been intended as nothing of the sort, etc.
Comment: I think an important point to remember is that almost everything that Harry sees of his father is from Snape's point of view. Memories are tricky; they're never unbiased.
Comment: "He always hated the Dark Arts" isn't also much of a redemption. None other than Albus Dumbledore himself had once an attraction towards the Dark Arts, and the Dark wizard Grindlewald himself! Simply hating the Dark Arts alone, I do not think is a redeeming factor.
Comment: @Martha Yeah that is partly why I asked. I just didn't want to affect any answers by putting that down. But it sticks out as the only flashbacks he sees and Lupin and Sirius seem to agree with what happened although they don't see as harmful I think that perspective comes from Harry.
Comment: @Martha - see my answer. 100% of what Harry saw was confirmed by Sirius/Remus
Comment: @DVK-on-Ahch-To Getting the &*(% beat out of you when you truly deserve it can trigger some growth. It doesn't work for everyone but it seems to have helped Draco in the end.
Comment: @Readin - that wasn't the reason for Draco's growth
Comment: I had to downvote. I find your quotes and many of your points very useful, but I also conclude the overall answer is wrong. Straight off the bat, your tl;dr says he only had two redeeming qualities. Well I can think of more, and one of them is actually heralded: his respect for life. Secondly, I think [Slytherincess](https://scifi.stackexchange.com/questions/13052/wasnt-harrys-father-just-like-draco/13067#13067) shows a number of differences between Draco and James, and answers the OP's desire for flashbacks or mentions of James where he was not being a mischievous bully.
Answer: Your question is: Is there ever any other flashbacks or mentions of Harry's father when he was a student that doesn't show him as anything but a mischievous bully?
Yes, there are.
In Deathly Hallows, while looking through Sirius's bedroom, Harry finds a photograph of the Marauders as Hogwarts students stuck to the wall, with Peter, James, Sirius, and Remus smiling and just looking happy and friendly.
In Order of the Phoenix, in the chapter Snape's Worst Memory -- which contains the bullying scenes -- we first encounter James taking his Defense Against the Dark Arts O.W.L. and he turns around in his seat and gives Sirius a smile and a thumbs-up. James is shown tracing Lily's initials on his parchment; James later asks Lily to go out with him, so we know he likes Lily as he's writing her initials. Then James messes around and plays with a Snitch in a show-off way, which, while perhaps off-putting, is not mean, cruel, or bullying.
Most importantly, as a student, James saves Snape's life when Sirius lures Snape down into the tunnel leading from the Whomping Willow to the Shrieking Shack, where Remus is in full werewolf form. Snape likely would have been killed if James had not have intervened, as much as James hated Snape and Snape hated James.
Furthermore, J.K. Rowling has said that James felt somewhat threatened by Lily's friendship with Snape, and that this influenced his bullying behavior toward Snape:

Jaclyn: Did Lily ever have feelings back for Snape?
J.K. Rowling: Yes. She might even have grown to love him romantically -- she certainly loved him as a friend -- if he had not loved Dark Magic so much, and been drawn to such loathesome people and acts. Potterforums.com

There are several examples of James having an inherently good character post-Hogwarts, as well.
In Philosopher's Stone, Hagrid recounts James and Lily Potter with full affection:

'Now, yer mum an' dad were as good a witch an' wizard as I ever knew. Head Boy an' Girl at Hogwarts in their day! Suppose the myst'ry is why You-Know-Who never tried to get 'em on his
  side before ... probably knew they were too close ter Dumbledore ter want anythin' ter do with the Dark Side.
  [SNIP]
  'Sorry,' he said. 'But it's that sad – knew yer mum an' dad, an' nicer people yeh couldn't find – anyway –
Philosopher's Stone - page 45 - British hardcover

In Philosopher's Stone, Hagrid gives Harry a photograph album full of pictures of James and Lily, and in each photograph James and Lily are smiling and happy:

It seemed to be a handsome, leather-covered book. Harry opened it curiously. It was full of wizard photographs. Smiling and waving at him from every page were his mother and father.
  'Sent owls off ter all yer parents' old school friends, askin' fer photos ... Knew yeh didn' have any ... D'yeh like it?'
  Harry couldn't speak, but Hagrid understood.
Philosopher's Stone - page 220 - British hardcover

In Goblet of Fire, Voldemort recounts James Potter:

"Very good," said Voldemort softly, and as he raised his wand the pressure bearing down upon Harry lifted too. "And now you face me, like a man . . . straight-backed and proud, the way your father died. . . .
Goblet of Fire - page 660 - US Hardcover

In Goblet of Fire, the echo-like, shadowy figures of James and Lily Potter emerge from Voldemort's wand during Priori Incantatem and, combined with the figures of Cedric Diggory, Frank Bryce, and Bertha Jorkins, James included, rush at Voldemort, obscuring his vision so Harry can get back to the Triwizard Cup/Portkey.
In Deathly Hallows, Harry finds a picture of himself as a baby (the picture is in Sirius's bedroom, torn in half by Snape, the latter who kept the portion showing Lily and discarded the half with James and Harry), flying around on a toy broomstick, around James' legs, and James is playfully trying to catch Harry.
J.K. Rowling makes some generalized comments on James, which demonstrate he had, overall, good character:

Information on the original Order members was also revealed during tonight's event [J.K. Rowling at Carnegie Hall 10.20.07]. Jo related the fact that Remus Lupin, prior to the third book, was unemployable because he was a werewolf and upon his graduation from Hogwarts along with James and Lily, was supported by James using their own money. In addition to this she shed more light on the early days of the Order, saying James, Sirius, Remus and Lily were full time Order members. "Full Time Fighters," as Jo put it.
Comment: The thing about the pictures, they were of James and Lily when they were older I believe. Also I doubt friends would send bad pictures to their son Harry knowing that it's probably the first time he's seen them. Also James saving Snape could have been just as much because he didn't want Lupin to get in trouble. It's pretty clear that Harry's dad was a decent man but as a teen there isn't much to suggest he wasn't a bully. Seems to me he was a bored trouble maker who straightened his ways for Lily.
Comment: @Slytherincess I really didn't have my mind made up. I was actually hoping that there might be something said in an interview or in another book that showed James Potter as a teen in a different light. J.K. writes him as basically a jock that picks on a nerdy kid but then as an adult he's a model citizen. Which does happen all the time in life but it's always struck me as strange and makes me feel that Harry was more like Snape than James.
Comment: @Kevin - fully agree on James saving Snape. He wasn't doing it out of altruism and good nature.
Comment: @KevinHowell -- It seems like you had your mind made up about James as a bully before you asked the question. :)
Comment: @DVK - Regardless of James' intentions or feelings toward Snape when he saved Snape, it was still the right thing for James to do. :)
Comment: @Slytherincess Well, all the above does show that James was a good person, more so after Hogwarts. But the question is, was he AS good, or great, as most the people's mention of James Potter seems to be? Hagrid in SS makes us feel as if James Potter was a legendary Wizard, but was he actually so? Lupin makes us feel that James (and Sirius) were the best-in-their year, but were they? Snape and Lily seemed to be more skilled students in their year. Was James a legendary Wizard like Dumbledore, Gryffindor, Merlin?
Comment: @Kevin - Harry WAS more like Snape (or, at least, Lupin) than James.
Answer: I agree with the poster who acknowledges that both Snape and James were bullies, but I don't think they were "equals".
Keep in mind that James was a bully who had everything handed to him -- wealth, family love, good looks, skill at sports, and later on a heroic reputation (which may have been overinflated as it seems he engaged in many heroics to seek thrills. Even saving Snape from Lupin seems tainted by the fact that he indirectly helped create the very circumstances -- forming the Marauders, allowing Sirius to see it was "okay" to give Snape a hard time -- that led to Snape being almost killed in the first place. Had James saved Snape from a random accident -- like near drowning -- I would have seen him in a more heroic light, but as it is I can't help but feel that James' act was motivated at worst by a fear of having his own culpability in the act exposed and at best by a sense of guilt that his friends had nearly killed Snape).
Snape, on the other hand, had absolutely nothing handed to him. He grew up in poverty, had a possibly abusive father, was socially awkward and sickly-looking, and was frequently teased by others (not just James). He was a brilliant, gifted student, but there's no mention that any of his gifts were recognized by either students or teachers when he was a boy (in contrast to James who was idolized for his sports hero status). Frankly, the only ray of light in Snape's life was Lily -- and one can argue that while James didn't exactly steal her away from Snape, he did play a key role in ending their friendship.
Remember, JK Rowling has stated in interviews that much of James' bullying was influenced by the envy he had for Snape and Lily's friendship -- which is why he liked publicly humiliating Snape in front of Lily. And while Snape, in a fit of anger and humiliation, did call Lily a "Mudblood" (an act which he himself deemed unforgivable) does anyone really think he would call his best friend that if James hadn't completely mortified him first in front of the whole school?
This, to me, is why Snape -- although no less a bully than James -- is still a much more sympathetic character than James. Put another way -- Snape had every excuse to become a bully and chose to become one, making him a weak man. But James had every excuse NOT to become a bully, and still chose to become one -- making him a weaker man.
Curiously, upon re-reading the books, I came across a passage where Dumbledore compared James and Snape's rivalry to Draco and Harry's. Initially, most readers probably assumed Snape was like Draco -- but after reading the entire series, it's clear that it was James who had more in common with the pampered, arrogant Draco while Snape was more like Harry (often looked with suspicion for his connection to Slytherin/Voldemort, a frequent underdog, and yet one who wouldn't take abuse lying down).
Moreover, while Snape never completely outgrew his bullying ways, JK did show some clear growth and a surprising amount of decency within his character. Despite the fact that he lost everything that mattered to him and was essentially a shell of a man after Lily's death, he still drew strength from his love for her and endured years of hardship to honor her memory. Being a spy for Dumbledore and having to surround himself with people who would likely kill him if they knew his true allegiance isn't fun at all (can you imagine James allowing himself to be hated in order to take down Voldemort?) but Snape puts himself through this hell for years, realizing (correctly) that he'll be killed before his mission is over. Even at the moment of his death, Snape has every reason to believe that, although Harry will know the truth, Severus Snape will still go down in history as the villain who killed Dumbledore and allied himself with Voldemort. That's a terrible thing to live with -- but Snape willingly allows himself to be despised even to the people he's trying to protect. In a way, Snape probably sees this as a just penance he needs to go through for all of his past sins -- a strange act of contrition perhaps, but an act of contrition regardless.
Now let's look at James. According to the books, James was likely at his worst during his fifth year. Then a couple years pass and just like that he somehow manages to "deflate his head" and become someone Lily wants to date and eventually marry (although he's still hexing and bullying Snape behind her back). While many people feel he just somehow magically "grew up" I don't buy it. People don't just change for no reason -- they need some type of motivation, large or small. The problem is we never see what motivates this change -- all we see is what we assume is a different James Potter at 21 who heroically sacrifices himself for his wife and son (a decent act to be sure, but I actually think Snape, even at that stage of his life, would have gladly sacrificed himself for Lily (if not James and Harry) if he were in the same situation).
At worst, I can only suppose that James, still lusting after Lily, became canny enough to fool her into thinking he had "deflated his head" (while he still hexed Snape and went on joy rides with Sirius behind her back -- basically being the same obnoxious jerk he was at 15, albeit it with more discretion)
At best... it's possible that James changed when he first met Voldemort. Remember, it's mentioned that James survived encounters with Voldemort at least twice before he managed to kill him. Coming face-to-face with such real evil could have shocked James into realizing what unbridled arrogance and unrestrained bullying could do, and forced him to take a hard look at himself. Had Lily been there when this happened (remember she survived early encounters with Voldemort herself) it's possible that this could have been the point where she saw James in a new light.
In other words, if heroes are defined by their villains, it can be argued that James NEEDED Voldemort to become the decent man who would sacrifice himself for his family.
But whether this truly happened or not, we can also say with absolute certainty that SNAPE was changed by his own dealings with Voldemort -- knowing your former master murdered the love of your life can give you a real good reason to turn away from being a Death Eater and try to become a braver -- if not kinder -- man.
(BTW Snape fans should definitely check out the fan fics "Second Start" by 8thweasleykid or "His Greatest Wish" by AndromedaMarine on fanfiction.net. Both stories examine what could have happened if Snape was given the chance to relive his life again -- and show that not only did he not repeat his former mistakes but that he also became a genuinely decent man and healer, showing he did learn and grow from his mistakes. Fan fic I know, but I honestly feel this is how Snape would have ended up if given this opportunity).
Comment: Well said! That is probably the best analysis I've read yet on James' and Snape's motives.
Comment: Dude. Yes. That was amazing. This needs more votes.
Answer: From what we are told, although Dumbledore says that James was to Snape as Draco is to Harry, James was considerably worse than Draco.  On Pottermore Rowling describes James's and Sirius's treatment of Snape as "relentless bullying", whereas Draco's behaviour to Harry is more like persistent needling.
We see that James started picking on Snape without provocation, as soon as he met him, just because he wanted to be in Slytherin, whereas Draco's problem with Harry was that Harry had rejected him (with whatever good reasons).  Rowling has said that James's motivation for the bullying was partly sexual jealousy.  She compares James with Dudley by giving Dudley a side-kick called Piers (an old form of Peter) who is described as rat-like and who helps him to bully his victims.  James saves Snape's life and then goes right back to attacking him without provocation, which suggests either a spectacular lack of finer feelings or that he saved Snape in part because he didn't want to lose his chew toy.
We also see from Filch's records and from comments made by Lily and Remus that James liked to hex random people just because he could, and JKR wrote a little prequel for charity, which showed James and Sirius in the summer between their 6th and 7th years at Hogwarts, already Order members and fighting Death Eaters, but taking time off to bully and jeer at two inoffensive Muggle policemen, just because they can.
James is especially disturbing because he seems to have a great sense of entitlement - he feels he has a right to do what he likes to other people and they aren't allowed even to protest.  He attacks Snape out of sexual jealousy and just because "he exists", then punishes him for daring to protest.  He then threatens to punish Lily - "Don't make me hex you" - for trying to protect her friend.  This is a classic abuser's attitude - I'm going to hurt you but you made me do it.  He effectively tries to hold Snape hostage to force Lily to date him against her will, and later he does date her but deceives her and continues to hex Snape behind her back.  His behaviour to Lily - threatening her, trying to force her to go out with him regardless of her own wishes, deceiving her - suggests that he might well become an abusive and/or unfaithful husband.
However, we aren't told all that much about him.  Many people seem to have liked him, so he probably had virtues which we just haven't been shown.
The idea that Snape disliked Harry because of his resemblance to James is a bit of a red herring, anyway.  Dumbledore says so - but JKR makes it clear she means us to understand that Dumbledore is very dishonest, because in Beedle she quotes Dumbledore on the need to treat the truth with caution, in the context of an essay supposedly written by Dumbledore in which he is presenting himself as not being one of the people who believe that the Deathly Hallows are real, written at a time when he had the wand, could lay his hand on the cloak at any time and was hot on the trial of the ring.
Harry is an appallingly bad student in Snape's class - an arrogant, chippy boy who lies, cheats and steals and is careless of other students' safety, and who also feels a bit like the Dark Lord (Snape doesn't know about the Horcrux, but can probably sense it) and is a Parselmouth.  That he also looks like the bully who made Snape's life a misery just makes Snape more sensitive to the very real annoyances which Harry presents.
Answer: I think James & Snape were two sides of the same coin to be frank: both were bullies. The Princes Tale in DH shows us that Snape picked on Petunia, Lily's friend, Mary McDonald and other muggleborns (aside from Lily).
James bullied Snape and other Slytherins. The difference is that James GREW out of his bullying nature long before he graduated Hogwarts by the sounds of it. Snape transferred his bullying onto innocent children which is in my book unforgivable. James & Snape were 15, so they were equals, whereas Snape bullied those half his age when he's an adult.
Also, regardless of James' reasons for saving Snape, would Snape have done the same thing for James had he been in that position? No I don't think so. Whatever James was at 15, he was an all round decent bloke who died at the age of 21 for his wife and son.
Answer: I feel that James was more mischievous than a full on bully. Yes he teased Snape a lot and did publicly humiliate him, but only because he had reasons to. He didn't really like Snape because James was against the Dark Arts-he saw it as something that's not right or moral to him, so he bullied Snape because he was only a mischievous 15 year old kid who couldn't really come up with a smarter, restrained "adult" way to confront him. I suppose that was his way of wanting to bring justice. James did prove that he is a good individual, he did stick by his friends and never spread Lupin's secret. He would be a huge jerk in school, but never to his friends. Also, when Sirius' prank had gone too far, James himself was the one who saved Snape from Lupin. He disliked Snape, but would never think of taking a life.
I love the way that J.K. Rowling teaches people not to judge them fully by what they seem; they are either in the gray area or misunderstood.
In Malfoy's case, he was not as loyal to his companions as James was. He would push them around to help him carry out his dirty work. He treated his friends Crabbe and Goyle like total idiots. He cared more about power than friendship, while James DID care much more about friendship and his naive view of morality. Malfoy was very cowardly; he had always been one who played a yes boy for the sake of fear and his family name. I feel that if he were in James' place, he would have never stuck by Lupin at all.

Wasn't Harry's father just like Draco?


org-mode export to html php code

Question: I'm want to export php code snippets to html in org-mode.  But as you see signs : '$' and '->' are highlighted by black color which looks terrible. Is it a some kind of error?
Btw. is there any themes for highlighting code exported by org-mode?
Comment: There is a chance that your theme sets the background color, you can investigate it with `describe-char`.
Comment: I already tried with (fresh start) no config file. Just emacs26.1 and htmlize package. It was the same.
Comment: @DoMiNeLa10 you were right. Once again I started with fresh install and it was the dark theme.
Answer: The issue is probably caused by your theme, which sets the background color for these syntaxes. The easiest way to check whether that's the case is to put the point on an offending character in the buffer, and typing M-x describe-char. If the cause turns out to be the background color, it will be listed in face properties. The reason why it's visible in HTML is because Emacs doesn't set the background color of code blocks in HTML export.
You can verify whether the default theme works properly by starting Emacs with no init file (emacs -Q) and loading just the bare minimum (without your theme) to verify that things work properly without it.
Comment: It drives me nuts. I was trying to change it in describe-char menu, but it dosen't work. Those elements: '$' '->' always innherit background from theme. How I can turn it off ?
Comment: You could try looking whether your theme defines background for some syntaxes or something like that.
Comment: Finally with your help I removed that background. As you said @DoMiNeLa10 `describe-char` then  (php-variable-sigil org-block) -> Face: php-variable-sigil (sample) (customize this face) and have to unchecked Inherit from PHP Mode.
I was wondering why precise those two signs: '$' and '->' inherit from PHP Mode? Do you think it is some kind of bug? Maybe I should fix this in the PHP Mode package?

org-mode export to html php code


How to make female chest look bigger?

Question: When photographing women they often want the chest to appear as big as possible. I tried with light coming from different positions but was not satisfied with the results. Are there any tricks to achieve this?
Comment: If the model is dressed, have your model use a push up bra or a "balconette" bra; you could apply real make up to the cleavage to create some shadows that will make the breasts appear larger.
Comment: I think that the answer depends a lot on what the model wants. Does she want to help staging a picture with prominent breasts? Or does she feel that wearing a push-up or makeup is a "fake" but still wants you to make her breasts appear bigger than they are in reality?
Comment: IWarp seems to be promising, e.g. see [this video](http://www.youtube.com/watch?v=2ZOE0vsBm5w).
Comment: @rumtscho your point is absolutely right but my question was not bound to a specific model. It rather aimed to generally collect techniques to achive the enlargement effect and then to choose from this toolbox depending on the respective situation.
Comment: Another option is to explain to her that big chest is not necessarily good. ;D
Comment: Honestly I wouldn't do much when actually capturing the image, instead I would take this task to Photoshop and use the liquify tool which excels at this very task.
Comment: actually i dont use photoshop because i am on linux all the time. Is there some free gimp plugin for example that could be recommended ?
Answer: Firstly, you should pose your model. There are ways to accentuate parts of the body naturally.  Try posing her arms so that they squeeze the bosom.  Another option then is to break all the rules of portrait photography, and instead of using a long lens (that flattens features) use a wider angle (around 24-35mm on full frame maybe) and get closer!  By getting closer you will bring the features (in this case, bosom) that are in the center of the frame, out, in a more 3D fashion.  You may need to angle upwards a little to see her face too.
Experiment with pose, wider focal length, and your own positioning to see how they affect your images.
Comment: And if your wide angle lens demonstrates barrel distortion, don't correct it! In fact, use pincushion correction whether the lens demonstrates it or not. It will make the center of the frame look larger.
Comment: +1 thank you, i will try all of that next time. I just want to wait for a few more answers.
Answer: Tilting forward may help, if you can use those types of poses.
Also, if you can use angle light, or angled behind lights, the shadows will accentuate the bosom. However, getting this right may be tricky, because the face may need different lighting, or will show bad face texture or shadows. So you will have to have her turn the head to a different direction where it is also being lit well.
Also, Photoshop, e.g. Liquify helps. :-)
And finally: clothes help, too, see this picture.
Answer: A wide angle lens might help, but do not angle the lens upwards - a shot up the nostrils is not very pleasing.
While not a shooting technique, you could increase the bosom size while editing the picture.
Also poses, where the model leans slightly towards the photographer help, and the model should push out her bosom (make a hollow back). Ask your model to present her bosom - you as the photographer have to help her find a good pose.
If the model is dressed you can use clothing to emphasize bosom size: clothing should be tight fitting - some checkered patterns emohasize the bosom. If you can print on clothing you could print a pattern where the squares where the bosom will be are slightly larger than elsewhere - this will look like the bosom is pulling at the fabric.
Answer: I assume you mean their bosom, not their chests?
Firstly, some reactions to other answers: I would be careful about wider angle lenses as it makes them look less attractive in general.
Poses and clothing can do a lot. And using a model with a bigger bosom helps a lot, too. However, post editing is often applied in the professional world. In Photoshop, liquify can be used, and some free software has similar tools. That type is most often seen used to thin the chins and waistlines of the models (there's a wide range of videos showing how to make a Jane Doe look like a "supermodel" - often used by women on facebook to fight low self-esteem).
I once made a video on how to use that kind of tool in the opposite way.
And used it to show that the pick for wonder woman isn't so bad as people claim (includes bosom enlargement, but it is a bit roughly done - I made it for a nerd page as a joke):
Answer: What used to be a common pose for this that others haven't mentioned yet is: lying on the stomach and shoulders up at < 45 degree angle on elbows, similar to an upward-facing dog yoga position, but much less pronounced, while on the beach wearing a bikini. This allows gravity to bring out the bosom.
As for clothing, push-ups aren't always a great idea, as they can accentuate the area under the bosom, making the belly look abnormally tall. Instead, a sweater can be a great idea, as it can add volume to the entire bosom area.
For those that are already full in the bosom, a snug t-shirt can be a great idea. This does not expose the bosom, and yet accentuates it. For examples, look at pictures and posing on popular t-shirt stores online.
You can also do side-shots, etc. but that starts to really depend on the model, as front vs. side both may look fine, or one may be better than the other.
Answer: another way i found that works great is "dodge and burn" in post-production.
a video with application on this topic is the following ( unfortunately in german, but the images speak for themselves ): http://www.youtube.com/watch?v=HMz1CDbKfys
the relevant part begins at 5:00

How to make female chest look bigger?


What are the advantages of doing accounting on your personal finances?

Question: What are the advantages of keeping track of your personal finances? Is it only worthwhile if I earn "enough"? Why should I bother?
Comment: Are you asking about the advantages of using software vs. not using software?  Are you asking about true double-entry accounting methods vs. simpler methods?  Or are you asking about the advantages of keeping track of your personal finance transactions at all vs. not?
Comment: After I started tracking and categorizing all of my income and expenses using software, I found that despite no conscious, intentional change in my behavior, spending or saving habits, I was more prosperous.
Comment: Removed the stuff about software; not so important. I was wondering about "at all". But comments about double-entry vs. simpler methods are appreciated, if you/the answerer thinks it's necessary.
Comment: The term you are looking for is 'budgeting'. Looking online (or on this site) will find you many additional resources in addition to what Ben has provided below.
Comment: @Grade'Eh'Bacon: Isn't there a difference between "budgeting" and keeping track of your finances? I thought the former involves you setting aside budgets for things you want to do (e.g. up to $N for food this month, $M for clothes, etc.), whereas the OP seems to be asking about being aware of what's happening to his money (looking at his statements, not spending more than he has, trying to keep money aside as a safety net, etc.)? I feel like you could do either without doing the other, and the former seems to be much less necessary than the latter if you're living relatively comfortably.
Comment: Would you say online budgeting apps are worth it, like [Mint](https://mint.intuit.com/)? I'm concerned with handing over all my financial info
Answer: In my opinion, every person, regardless of his or her situation, should be keeping track of their personal finances.  In addition, I believe that everyone, regardless of their situation, should have some sort of budget/spending plan.
For many people, it is tempting to ignore the details of their finances and not worry about it.  After all, the bank knows how much money I have, right?  I get a statement from them each month that shows what I have spent, and I can always go to the bank's website and find out how much money I have, right?  Unfortunately, this type of thinking can lead to several different problems.

Overspending.  In olden days, it was difficult to spend more money than you had.  Most purchases were made in cash, so if your wallet had cash in it, you could spend it, and when your wallet was empty, you were required to stop spending.  In this age of credit and electronic transactions, this is no longer the case.  It is extremely easy to spend money that you don't yet have, and find yourself in debt.  Debt, of course, leads to interest charges and future burdens.
Unpreparedness for the future.  Without a plan, it is difficult to know if you have saved up enough for large future expenses.  Will you have enough money to pay the water bill that only shows up once every three months or the property tax bill that only shows up once a year?  Will you have enough money to pay to fix your car when it breaks?  Will you have enough money to replace your car when it is time?  How about helping out your kids with college tuition, or funding your retirement?  Without a plan, all of these are very difficult to manage without proper accounting.
Anxiety.  Not having a clear picture of your finances can lead to anxiety.  This can happen whether or not you are actually overspending, and whether or not you have enough saved up to cover future expenses, because you simply don't know if you have adequately covered your situation or not.  Making a plan and doing the accounting necessary to ensure you are following your plan can take the worry out of your finances.
Fear of spending.  There was an interesting question from a user last year who was not at all in trouble with his finances, yet was always afraid to spend any money, because he didn't have a budget/spending plan in place.  If you spend money on a vacation, are you putting your property tax bill in jeopardy?  With a good budget in place, you can know for sure whether or not you will have enough money to pay your future expenses and can spend on something else today.

This can all be done with or without the aid of software, but like many things, a computer makes the job easier.  A good personal finance program will do two things:

Keeps track of your spending and balances, apart from your bank.  The bank can only show you things that have cleared the bank.  If you set up future payments (outside of the bank), or you write a check that has not been cashed yet, or you spend money on a credit card and have not paid the bill yet, these will not be reflected in your bank balance online.  However, if you manually enter these things into your own personal finance program, you can see how much money you actually have available to spend.
Lets you plan for future spending.  The spending plan, or budget, lets you assign a job to every dollar that you own.  By doing this, you won't spend rent money at the bar, and you won't spend the car insurance money on a vacation.

I've written before about the details on how some of these software packages work.  To answer your question about double-entry accounting: Some software packages do use true double-entry accounting (GnuCash, Ledger) and some do not (YNAB, EveryDollar, Mvelopes).  In my opinion, double-entry accounting is an unnecessary complication for personal finances.  If you don't already know what double-entry accounting is, stick with one of the simpler solutions.
Comment: This actually says pretty much everything I was trying to say with my answer, but better. One thing I would suggest adding, though, is that it's even *more* important to keep track of your finances when you don't make a lot of money, because in that situation, even a reasonably small unexpected expense could cause serious financial problems. Someone who has good finances and is making $100,000 a year can probably wing a $1,000 unplanned expense without much trouble and without resorting to debt, but someone who makes $25,000 a year is going to be hard pressed to find $1,000 quickly.
Comment: @MichaelKjörling Agreed.  For someone with a low income, items 1 & 2 above will happen before long.  Those that have a large income and are naturally low spenders can get away without planning for a lot longer.  However, they will still have trouble with items 3 & 4.
Comment: _**Overspending.** In olden days, it was difficult to spend more money than you had."_   Even so, it was still easy to spend what you had (men drinking their wages on payday, for example, or women buying "pretty clothes") before the rent was due.
Comment: As long as one earns significantly more than he spends I don't see the point of going through this. 1/ is moot. 2/ can be done easily by transferring leftover money into another account every month in case something goes bad. 3/ and 4/ is about personal philosophy and should be dealt with through introspection. I have never done any budgeting for my self and am still alive at 32, with enough money on the side whenever problems come...
Answer: Everyone should keep track of what they spend. When you see how much you are spending on each category of expense, you can make good decisions about how much your life is improved by something vs. how much you spend on that thing.
Everyone makes better decisions when they are informed by accurate information about those decisions. There's no reason why personal finances are different from any other decision you make in life. This remains true whether you make very little or very much. Some people define rich as being able to live on less money than you earn.
Answer: I recently made the switch to keeping track of my finance (Because I found an app that does almost everything for me).
Before, my situation was fairly simple:

I had more money than I spent
I tended not to spend much anyway.

I was unable to come up with a clear picture of how much I was spending vs saving (altho I had a rough idea).
Now I here is what it changes:

I can compare wether I spent a lot this month or not. (Spoiler: it's 1. Rent 2. Food)
I know exactly how much I am saving, every month.

What I can do now:

I know how to increase my savings (be more careful doing grocery shopping, find a new home).
Once I come up with an investment plan, I know how much I can allocate to this (useful if you must make fixed payments)
I can project myself in the future and forecast how much I will have in a few years. Useful if I want to know when would be the right time to buy a house.

Is it useful ?
Since I don't actually need to save more than I do (I am already saving 60-75% of my income), 1) isn't important.
Since I don't have any visibility on my personal situation within a few years, 2) and 3) are not important.
Conclusion:
Since I don't actually spend any time building theses informations I am happy to use this app. It's kind of fun.
If I did'nt had that tool... It would be a waste of time for me.
Depends on your situation ?
Nb: the app is Moneytree. Works only in Japan.
Comment: For me it used to be 1/ food 2/ rent. Good ramen are so cheap in Japan I guess! About your savings, you would know how much you are able to save every month just by comparing your balances. That's enough information for me as I don't want to plan my life away anyway.
Comment: @Shautieh My previous bank wouldn't even offer that option... And yes ramen are cheap, but the delta probably comes mostly from the rent being expensive.


Does the first precept require me to check the shower for bugs and make sure to remove all of the bugs before using it?

Question: I recently noticed that perhaps fewer than 10 bugs seem to be in my shower.  I can try to remove all of the bugs from the shower before using it so that they don't get washed away and killed.  However, some of the bugs are very small and hard to see, so I can't be sure I can remove all of them.  Also, even if I remove all of the bugs in the shower, it is possible bugs will return, so I don't know if I need to check the shower for bugs before each time that I use it.
Answer:
I recently noticed that perhaps fewer than 10 bugs seem to be in my shower.

The reason many bugs show up in one place is usually due to that place having "things" that attract them, whether it's smell, shed skin cells (as their food source), humidity (their suitable dwelling environment), etc. So, instead of doing it the hard way, try tackling the issue at its root cause, try to keep the shower clean, free of residues, or humidity, etc. after you've finished using the shower, and you won't have to worry much about those bugs the next time you use it.
Answer: The intention is important as outlined in the story below.

The Story of Thera Cakkhupala
While residing at the Jetavana monastery in Savatthi, the Buddha
uttered Verse (1) of this book, with reference to Cakkhupala, a blind
thera.On one occasion, Thera Cakkhupala came to pay homage to the Buddha at the Jetavana monastery. One night, while pacing up and down in meditation, the thera accidentally stepped on some insects. In the morning, some bhikkhus visiting the thera found the dead insects. They thought ill of the thera and reported the matter to the Buddha. The Buddha asked them whether they had seen the thera killing the insects. When they answered in the negative, the Buddha said, "Just as you had not seen him killing, so also he had not seen those living insects. Besides, as the thera had already attained arahatship he could have no intention of killing and so was quite innocent."

May you find peace! With metta :)
source: http://www.tipitaka.net/tipitaka/dhp/verseload.php?verse=001
Comment: Well in the case of Arahat Chakkulapa, there was no bad kamma because he was already an Arahat. But anyone who isn't an Arahat still gains bad kamma even if you do not volitionally kill a being. Although the bad kamma is very less when compared to intentional killing.


What can a site visitor do with a 777 file on my web server?

Question: Sometimes I prefer working with text files instead of database as I can later manually edit the file content.
Imagine I have created a text file blacklist and chmodded it to 777. Let's say it is accessible at http://example.com/settings/blacklist.csv. This effectively gives read/write/execute to the whole world, doesn't it? What can a normal user do with that file other than reading its content? Is this a security threat for my site and its content? Will any normal web viewer or someone else other than SSH user (or machine user) modify the file content?
Comment: If your intention is to give read access to everybody why do you give them write and execution permissions at all?
Comment: What is *"a normal user"* ? Someone visiting the website or some other local user on a server with shared hosting?
Comment: "Sometimes I prefer working with text files instead of database as I can later manually edit the file content" - this is already setting of major alarm bells. Do you believe that everyone else has been getting it wrong for nearly 50 years?
Comment: I give it 777 this so my php scripts can easily modify it. Maybe I only need 766. Don't I?
Comment: A normal user I mean someone visiting the website. Thanks for pointing this. The title was confusing.
Comment: @codezombie Don't. Just... don't.
Answer: Servers are not written in a way to automatically modify a file just with a simple POST or PATCH method, a security feature, to be sure, so 777's biggest threat is that it does expose read-access to potentially sensitive data. Depending on the server configuration, a 777 file could also be executable, though most server configurations limit execution to "bin" directories as an additional safety feature (e.g. "cgi-bin"). Without ftp, ssh, telnet, etc access, the file is still effectively read-only.
That said, you shouldn't rely on this, and always make sure you chmod your files correctly to avoid any potential complications. The security implications are directly related to the values inside the file, of course. If it's just a list of blacklisted IP addresses, probably harmless, but if it has server configuration values, passwords, etc, that would be an obvious security concern.

In summary, 777 by itself is "mostly harmless," but it really depends on the purpose of the file as to the importance you should place on protecting the file.
Answer: In a world where locks would be unbreakable, no one would have more than one on their house main door. Unfortunately...
IT world is not really different. Your OS and server software should not allow a client user to do more than is expected. But there can be security or implementation flaws causing unexpected behaviour...
That is the reason why good security practices recommend to set up more than one defense line, and to observe the least privilege rule: if a permission is not required for the system to work, it should be removed. That way, even if the protection offered by the server software is broken, the one offered by the file permissions still prevent an attacker to do (too) bad things.
There are indeed real use cases for 777 files, but using that when it is not required is bad because it unnecessarily lowers the global protection level of the system.


What screen vertical resolution should I cater for on non-phone browsers?

Question: What's the base height in pixels that I should be aiming for on my website/web application?
Answer: I don't think there's a 'one size fits all' answer unfortunately.
I believe you have to look at your target audience and do a best-guess for the screen resolutions to target.
For example, if you are writing an app to be used on desktop machines in your office, you can take a look at what resolution most people are using, probably somewhere between 1024x768 and 1280x1024 and then account for other windows, or the start menu etc. and go for that.
On the other hand, if you anticipate this app being used mostly on mobile browsers then you will have a much different set of resolutions to target.
If your website is lucky enough to have thousands of users that view it on all sorts of screens and resolutions etc, that's great! because its successful, but with that success means more testing of various resolutions will be required to maintain and grow that success.
Bottom line, target the resolutions that will satisfy the majority of your user base, and test the others accordingly.
Comment: Just wait a year and it may change. LOL
Answer: I would say 600x800, since that will allow users to have multiple windows open and not have to scroll.  But of course the 800 can be higher/lower, but I think that 600 should be the max
Answer: For a long time (at least in web years), the question of screen resolution was straightforward: what monitor size is the average user going to have.
That's how sites went from targeting 640x480 to 1024x768. The problem is that at that plateau, this simple formula completely broke down.
Today, between iPads and iPhones, Android phones and netbooks, huge monitors, etc. the sizes are all over the place and not everyone runs their browsers at full screen. So, just because I'm writing this on a 24" monitor that does 2048x1152, doesn't mean the browser window that this site has available is that size, much less even that height.
What I'm seeing a lot is people settling in at something like 950 or so for width for non-phone browsers and betting on getting at least 600 pixels for height. Then a second, mobile version that's less "fixed" in size for phones, etc.
Answer: I usually consider the first 600px above the fold.
Studies have shown that most people don't mind vertical scrolling while horizontal scrolling drives them mad. So don;t kill yourself with height issues.
sorry I couldn't find the actual article I read and quote it for you
Comment: I agree with the scrolling point. Mouses don't have horizontal scrolling wheels.


Does the Buddha like dogs?

Question: I am not a buddhist but I have a friend who is. He dislikes dogs and I have questioned him as to whether he is a true Buddhist. I believe that the Buddha is peaceful and nature loving, and so would love dogs.
Comment: You tagged this [tag:buddha-nature] like the famous koan. Was than intentional? An important part of the question? Alternatively the [tag:the-buddha] tag (added later) might be for if you were asking about the historical Buddha.
Comment: If he is a Buddhist, tell him to keep aware of dog. That goes for everyone.
Answer: The Buddha taught 'birth' with an 'animal' state of mind is a state of woe (beset by chronic suffering) or lower state of 'existence' (being).
The Lokapala Sutta states that people who do not have moral shame (human conscience) and fear of wrongdoing (compassion for self & others) will behave like dogs & thus not have the bright principles that protect, respect & honor the world.
The Kukkuravatika Sutta explains people behaving like dogs will lead those people to the company of dogs; but if it does not, it will lead to hell. This is why we can observe in society like-minded immoral people who create cliques where they keep eachother's company but, eventually, they turn on each other.
For example, recently my neighbour's dog killed their pet cat. While pet dogs & cats can live harmoniously & friendly with each other, if the dog or cat is emotional, it will act without conscience & concern for the other pet. This is similar to people who are killed by their pet lion, snake or crocodile who they mistakenly thought was loyal & tame.
Dogs can be very loyal to their human masters that feed them but they also bark at strangers & fight a lot, particularly about sex & territory.
In Western countries, dogs are generally desexed thus do not have normal sex lives. However, in non-Western countries, this does not generally occur and one can witness male dogs literally bite each other to shreds over sex during the mating season.
Many people also behave like this, such as politicians & those in government, who tear each other to shreds, stab each other in the back & start horrible wars merely for the purpose of (imperialistic) territory, power & empire building.
Thus, the Buddha may have shown unconditional love to all living creatures but this does not mean he encouraged all of their behaviours.
Answer: <code>Mata yatha niyam puttam
Ayusa eka-putta-manu rakkhe
Evampi sabba-bhutesu
Manasam-bhavaye apari-manam
</code>
Quoted from Karaniya Metta Sutta  Here it's meaning.
<code>    Even as a mother protects with her life Her child, her only child,
    So with a boundless heart Should one cherish all living beings;
    Radiating kindness over the entire world: Spreading upwards to the skies,
    And downwards to the depths; Outwards and unbounded,
    Freed from hatred and ill-will.
</code>
So definitely Buddha shows unconditional kindness and love to every living things including trees.
but Buddha never force any one to do as he said , it is his/her choice,  So if some one want to dislike dogs or like dogs that is personal, So if Buddha liked dogs that is not a reason for a follower to love dogs. Buddha only showing a way, we are the ones who deciding how much faster we are going that way and how much percent we acquire. That is the Freedom of Buddhism. It's well explained in
Kalama Sutta
Answer: You tagged this question buddha-nature -- I'm not sure if that tag is relevant.
There's a famous koan about a dog and "Buddha-nature" -- see Joshu's Dog -- which this question reminds me of.
Maybe we're not supposed to discuss koans on this site, but I think the phrase "Buddha-nature" means "has potential to become Buddha" ... so this question combined with this tag, together, confuse me a bit.
Ignoring the tag and taking the question at face-value: if you were asking about the historical Buddha ... I get an impression of the Buddha's character, from reading suttas in the Pali canon, e.g. as follows.
You wrote, "I believe that the Buddha is peaceful and nature loving, and so would love dogs" and I think that's more or less true.
A bit more precisely, one of the aspects of being "peaceful" is being "non-violent" or "harmless". I find it incongruous to imagine the Buddha wanting to kick a dog, for example. Living in the forest, monks were meant to coexist harmlessly with animals -- see for example Ahi Sutta: A Snake.
When you mention "love", some more precise definitions of the orthodox-Buddhist kinds of love are found in descriptions of the four Brahma-viharas, which are often translated as "compassion", "goodwill", "empathetic kindness", and "equanimity" (described on Wikipedia, on "Access to Insight", and in many topics on this site like maybe this one for example). I suppose the Buddha would be compassionate to all beings (including dogs) -- see for example this verse from the Dhammapada:

He who seeks his own happiness by oppressing others, who also desire to have happiness, will not find happiness in his next existence

Note that this is "not oppressing" others, that's not exactly the same as "being attached" to others ... and the word "love" often conventionally implies a form of attachment (e.g. if "I love my dog" then perhaps I am sentimentally attached to it). But the Buddha maybe wasn't sentimental about love -- this answer about choosing a marriage partner, for example, suggests a fairly clear-eyed assessment of their abilities and nature -- and the suttas are full of warning about attachment leading to suffering.
So though it may be true to say that the Buddha would "love dogs", I think that shouldn't be understood as saying that he was "a stereotypical dog person", who might seek to follow dogs or etc.
Answer: Buddha loved all the animal (can see to eye & cannot see to eye) in the world not only dogs. for examples like "Alcoholic Elephant Nalagiri". before become Buddha prince siddartha save's a swan life hunted by Devadaththa.. these are few examples..you can see so many examples in the net about this. any way lord Buddha loves Humans & Animals in equal & same way..
Answer: It is not only the Buddha but even his disciples liked dogs and all other animals. Here is a story about how a bhikku practiced giving when he didn't have anything. It is about a Bhikkhu who once happened to eat his meal under a tree. By the time he finished eating his meal, a hungry dog who didn't have anything to eat in few days after giving birth to its puppies came to him. Thero then put his finger in his throat and made him vomit. That dog then ate that vomit/food and quenched its hunger.
Many are the instances where the Buddha took examples of animals to drive a point across. The following is one such interesting parable from Samyutta Nikaya to bring to light the teaching of attachment, revulsion and detachment. The parable states :

"Suppose, brethren, a man catches six animals of diverse range and diverse pasturage, and tethers them with a stout rope. He catches a snake and tethers it with a stout rope; also a crocodile, a bird, a dog, a jackal, and a monkey; he tethers them with a stout rope. Having done so, brethren, he ties them together with a knot in the middle and sets them going. Now brethren, these six animals of diverse range and diverse pasturage would struggle to be off each one to his own range and pasture. The Snake would struggle, thinking I will enter the anthill. The crocodile I 'll enter the water, the bird I will mount into the air, the dog I 'll enter the village, the jackal would think I 'll go to charnel-field and the monkey would think I'll be off to the forest."1 (Six animals are six sense bases).
"… The same parable is continued to bring out the roles of the six senses with reference to the six animals. It says when those six hungry animals grew weary while they are tethered they would follow after the one of them that was stronger and they would conform to that one; thus they would become subject to him even so of the six senses."

With reference to a Dog, the following is a story that Thanissaro Bhikku once shared in one of his Dhamma discussions:

"There's a story they tell in Thailand of a dog who was changed into a prince. A princess met him, fell in love with him, and prevailed on her parents to let her marry him even though they didn't know him. He looked like a prince, acted like a prince, but they didn't know what kingdom he came from. But she was really in love with him, so she convinced her parents that he was a good prince worthy of being her husband. Yet this prince, even though he looked like a prince on the outside, still had the passions of a dog. One day the princess found him in the bathroom eating shit out of the toilet, as dogs do in Thailand. So of course he was thrown out of the palace. Went back to his life as a dog."
Answer: In a Dhamma Sermon I listened to, Venerable Rajagiriye Ariyagñña Thero said that the Buddha has also advised not to keep pets, as it increases attachment and their death leads to the sorrow of the owner.
Comment: @ChrisW No Ven. Ariyagñña quoted it saying that Lord Buddha said it. He did not mention the particular Sutta nor did he mention when/where it was told.
Comment: Hi Dan! If you could share with us the source of that claim, that will help others to have a better understanding about this issue. Kind regards!
Comment: @BrianDíazFlores It was actually from a Dhamma Sermon I listened to by Venerable. Rajagiriye Ariyagñña Thero.
Comment: So it was Ven. Ariyagñña who advised that -- the answer is not directly quoting Buddha, e.g. from a sutta?
Answer: buddha loved all animals and all humans  -  the thing is  you dont have to pet an animal to love it
i dont pet cows and chickens but im still vegan   - so he dosnt have to like petting them as long as his not hating them
Answer: Buddha overcame "like" and "don't like". You can be Buddhist even when you struggle with that yourself.

Does the Buddha like dogs?


"Very not fair" vs "not very fair" which is correct

Question: I was in a situation where I wanted to let the other person know that whatever they said was not fair to me or to the point we were discussing so I used "This is not very fair" and then realised may be I was wrong in terms of sentence usage. Please suggest which one should be used.
Comment: You are correct.That's not fair , or not very fair.
Answer: The phrase you used was the correct one.
Further explanation -- 'not very fair' and 'very not fair' are both understandable to native speakers. The first is grammatically correct and isn't as strong an objection.
The second isn't grammatically correct, but sometimes used to emphasize how much you disagree with it. The grammatically correct phrasing for 'not fair' is generally 'unfair'.

Parent: "You have been playing with the new toy for over an hour. It's time for your twin to play with it for an hour. I think that's fair."
  Child: "That's very NOT fair!"
Comment: ... you are right, but maybe write out a complete example sentence?
Answer: Both of your variants

not very fair
  very not fair

are understandable to mean someone is not being reasonable.
However, from my experience (this is a disclaimer), a difference might be that

unfair
  not fair
  not very fair
  completely unfair

implies levels or degrees or unfairness, which gets used by AmE speakers, whereas when a BrE speaker says

That is not fair!

the understanding is that culturally it's binary, since something either is fair or it is not fair.
It can be followed by

That is not fair!
  That is just not on!

So, to me, very not fair, sounds possibly BrE. "Very" also emphasises the "not fairness" aspect.
Comment: I don't have a clue about BrE or AME speakers. Could you just post some info?
Comment: Any source on the cultural difference there? I've never heard about that before.
Comment: In the US, "fairness" is used more "mechanically" (if I may say that) in the distribution and application of law. "Equality" is used more in the US, "The Equal Rights Amendment", "All [men] are created equal...", "people get their fair share", "the rules of the game are fair" as examples.  In the UK, they have "[The Great British Fairness Debate](http://befair.fairtrade.org.uk)" and "Fairness Commissions" in local authorities.  In the US, I have heard it said "That's kind of fair." or maybe "That's kind of the same." but not "That's kind of equal."  (cont)
Comment: In the UK "fair", "equal", and "same" are also not equivalent.  Possibly UK "fair" is more similar to US "justice".  In the US "justice" is binary, as is "fair" in the UK, at least that's what I've found.


Is Arduino Keyboard in Single User Mode Possible?

Question: Has anyone had success using the keyboard functionality of any arduino in single user mode of mac computers? I would like to inject keystrokes in single user mode, and have been unsuccessful with the atmega32u4.
Comment: Does it work in normal user mode? Are you using a Leonardo?
Comment: Yes, it works in single use mode. It is a Micro/Leonardo clone.
Comment: It works in Single user mode? I thought that it was in Single user mode that you were having problems. Now I am confused
Answer: OS X requires a "Boot Interface" compatible HID profile for a keyboard to work in single user mode (it has only loaded very rudimentary drivers by that point).  The Arduino doesn't provide that interface, so can only work with the more advanced drivers the OS provides once booted.
You can try setting the "boot interface" flag to 1 in the interface subclass (here, I think, changing HID_SUBCLASS_NONE to HID_SUBCLASS_BOOT_INTERFACE) though I have no clue what the actual effect of that will be given that it's a composite device that may or may not conform to the boot interface standard.
Comment: Thanks for the suggestion. I tried this and saw no difference in behavior.
Comment: Ah well - then the answer is probably "no"...
Comment: Do you think it has to do with the board I'm using or the fact that I'm trying to do it on a mac?
Comment: It's a combination of the two. The Mac has specific requirements (the same requirements as a PC when in the BIOS), and the Arduino's USB software doesn't meet those requirements. There may be a better board for the job that has a better USB stack, but I don't know of one off hand.
Answer: I have found the solution to my problem. The issue is that the presence of both the usb device and serial port causes issue in single user mode. For the keyboard to work properly, the serial port must be disabled. This means that reflashing the micro requires pulling the reset pin low twice quickly for the port to show up again. Here is an example of how to remove the serial port:
https://github.com/gdsports/usb-metamorph/tree/master/USBSerPassThruLine


On their U.S. release date, what time of day are movies first shown?

Question: When a date is provided for a US release, does it mean it will be released first thing that morning (matinee) or evening?
Comment: I always thought that movies are released in the morning show......but then I have been wrong!
Answer: This really depends on the film.
The average film that doesn't get a hyped release will show its first screenings, generally between 10 am and 12 pm (noon), whenever the theater opens and schedules the screenings.
The new blockbuster release, though, generally includes screenings at midnight on Thursday night (assuming the release date is set for Friday).
The only restriction is that the film can't be shown before its specific release date (usually a Friday)... usually... that seems to be changing of late.
In the industry's ever increasing need to extend their opening weekend box office numbers, screenings have started to spill over into Thursday evenings.
For example, with Avengers: The Age of Ultron it has screenings on Thursday, April 30th (official release date May 1st) as early as 4 pm (the earliest in the image below are for 7 pm but there are some at 4 farther down the page if it shows you the same info)!
Comment: I have seen release day of Wednesday and Monday too in Fandango
Comment: @AnkitSharma Yes, but that's not the question. In those cases, that's the actual release date, not an early release... except possibly in the case of Thanksgiving release films... but even then, the release date is for Thursday, not for Friday, so the Wednesday early screenings make sense following this guideline. I'd guess that 90% or more of major films are set to be released on Fridays.
Answer: Theater employee here. I worked in the projection booth of my local theater from 2007 to 2011, and currently help out with marketing efforts since 2013. I'm friends with two GMs for the chain I work for and work aquaintences with a third, so I've had lots of observations and discussions in this area.
The typical release day for movies in the US is on Friday. Weekends play big in the US, with lots of people looking to go out and do something. Summer this is especially true as kids are out of school, and there are usually no big sporting events going on. Fall is different because Friday nights are usually used for high school football in most cities, but movies will still generally come out on Fridays.
The first showings on Friday can typically happen as early as 10AM, maybe sooner, but this can change depending on the time of the year. Summer you'll usually see 10AM screenings, but they may be for movies that have been out for a while, or they may be for the newest movie(s) to come out that week. Weekdays they may start a little closer to noon, especially during the school year. Showtimes are determined by a contract agreement between the corporate office for the theater chain and the studio releasing the film. They agree to how many showings each day for the next week, and sometimes for how many weeks a movie will run as a bare minimum, with the option to extend of the theater wishes. The rates each entity gets as far as ticket sales are also negotiated. Newer digital projectors actually give studios the ability to limit how early and late a given film can be started, and even how many times it can be run during the day.
However, sometimes this typical release day will change, and for certain reasons.
The next typical release day for a movie is a Wednesday. This is usually used when:

The weekend after contains a big holiday in which many Americans typically travel or spend time with family, such as Independence Day, Memorial Day, or Labor Day.
There's a holiday that falls on a Thursday, such as Thanksgiving. Most big releases for the week of Thanksgiving tend to hit on Wednesday so they're ready in time for the holiday weekend, and because Friday is the first day of the Christmas shopping season (referred to as Black Friday), so lots of people are distracted elsewhere.
The studio may release a bit earlier to try and get the jump on a bigger movie it has to contend with. This is rare, but it happens.

Even then, some movies have released on Tuesdays, Thursdays, even Mondays. These are a lot rarer in the US, but they do happen, and often for the same reasons cited above.
As Catija points out, sometimes movies have show times the Thursday evening before the Friday they're officially premiering on. This isn't moving the release date up, they're simply seen as early screenings, and are generally not counted in the opening weekend gross. Even midnight screenings are usually not tallied in the opening weekend gross, and are often considered as a separate metric with its own rankings.
The reason for early releases, as in before midnight of the official day of release, is a bit manifold.

Studios know when movies will have huge audiences that want to see the film as early as possible, so they allow for screenings in the evening the day before official release as a way to appease the more hardcore fanbase. These early screenings are sometimes made into big events by theaters to cater specifically to fans of the franchise the film is for. My theater went all out for the final Harry Potter film, with lots of custom decorations, games, events, tons of things.
Theaters likely also played a role in allowing for Thursday evening early screenings as opposed to midnight Friday screenings. Simply put, a lot of theater employees tend to be high school students, and US labor laws have very strict rules regarding how many hours these employees may work, as well as how late. Generally anyone age 17 and under can't legally work past 10:30PM in my state, while 18 year olds still in high school can usually only work as late as 12:30AM. This left us needing to find college students who could work that late, or relying more on management to handle things past those hours. Letting theaters hold 8PM screenings, for example, lets them have early showings for dedicated fans while not stretching themselves too thin on staff to accomodate later showings. This is a more recent phenomenon, and the earliest movie I recall Thursday evening screenings occurring was the first Transformers movie back in 2007.
Comment: I gave a downvote for some inaccuracies in this answer. First, studios do not generally care how many showtimes a movie gets, so long as it gets as many showtimes as other movies in the theater (or more, in the case of a big release). Second, almost every movie is allowed to be played starting Thursday the night before. In fact, it's so rare to have one that is limited to Friday that we are told when we *cannot* show them on Thursday as opposed to when we can. Some of the money and economic aspects of your answer are possibilities but honestly never things I've had to worry about.
Comment: Thursday grosses are rolled into Friday's numbers from a reporting standpoint. And studios do issue keys saying when you can start and dictating when you are done showing a movie, but they don't have precise control in between. Our keys always open up 1-2 days before the official release and run to 3am the day following our end of run.
Comment: @theMayer Keep in mind that I when I wrote this answer, I was basing it on how things were handled in the pre-digital age, from my time as a projectionist from 2007 to 2011, so 6 to 11 years ago. Further, it's possible you work for a different chain than I did, and could be subject to different/more lenient rules. The chain I worked for pales in comparison to the likes of AMC and some others. They're not small, but not huge either.
Comment: I've been in the business for quite some time, and it's never worked as-described. Granted, early premiere shows on Thursday are a relatively new thing, but even midnight show grosses were always reported on the Friday numbers.  It's still inaccurate today, so I recommend you update it to be more accurate if you can.  Pre-digital, you could show the movie as soon as you put it together, and could keep showing it until you took it apart and shipped it back. Of course, there were legal ramifications of doing so...
Answer: The release date for movies varies. Over the last 30 years-most were released on Wednesdays, with official release dates set for Friday. Star Wars movies got a 12:01am showing, with all other movies released here in Missorui/KC area getting a mantinee showtime at 10:05am(Theaters open at 10 or 11 out here). If a movie is actually held til Friday release, the first showing again is at the opening of the theater-10/11am.
To answer your question, it is always the earliest in the day that the movie is released. 12:01 am when they were open the night before, or 10:00 am when they open for the new day.


How to create a "smart" checklist in excel or google sheets?

Question: We have a need to create a template checklist for our workflow and at a past job we had a template checklist that had various tabs for each process of the workshare that needed to be complete. For instance, that job was GIS related and each tab of the checklist contained what "theme" (ie, layer of the map) of the production mapping process needed to be complete before starting on the next theme. Each theme of the checklist was a tab that contained rows of things that needed to be complete for that theme and contributed to an overall percent complete that was tracked throughout each tab in the checklist. When a task was completed for that tab, we initialed a box, the percentage was updated, and we moved on to the next task. The first tab was always the same and would shape how the rest of the checklist was formatted based off of answers given to yes and no questions or from a series of dropdown menus.
What I'm really asking here is can all of this be completed through what is available in regular excel without needing to download other extensions? Can I make a look up table or a flow chart of some sort to model out the rest of the checklist? If so, where and how can this be completed within excel?
Answer: Are you looking for formula which counts percentage of checked items on all tabs? If yes, then here is an exemplar google spreadsheet for you. You can add new tabs and just modify formula correspondingly.


What would the economy of a global power look like?

Question: If all modern day countries on Earth today decided to merge into a single unified power, what would its economy look like? Because there are no more independent nations, I imagine that changes the way wealth circulates around. Would a world government's economy be better than the global economy today?
Answer: It depends
Would this world government look more like the USA?  Or North Korea?  There's a big difference between the two.
If we assume that such a government would look most like Europe, then that's your answer.  The world economy would look much like Europe's.  Some states would do great.  Others would struggle, the way Greece is now.
Note that the world government would not have to unify things like regulation and minimum wages.  Europe has different minimum wages by country.  Also look at the US example.  There is a federal minimum wage of \$7.25 with state and local minimum wages as high as \$15.
It's also not evident that it will be the first world nations that will struggle under such a system.  Note that in Europe, it is Greece, not Germany, that is having trouble with a single currency.
It's not that hard to recall currency.  Since most currency flows through a bank deposit at least once a year, you can recall currency by simply asking banks to accept the currency item but not give it out.  It's also worth noting that bills need to be replaced every few years anyway.
United World
If we start with a government like the US, then we should realize that we have some challenges.  Initially expect the global government to do very little while the "country" governments still do most everything.
Over time, there will be a lot of pressure from the less successful areas to get more subsidy from the more successful areas.  Since India has more people than the US and Europe combined, India can outvote them in the global equivalent of the House of Representatives.  And in the global Senate, the twenty Central American countries would outvote the US and Canada unless they break up into separate states and provinces for Senate representation.  In case of breakup, there are fifty-four African nations that would outvote the US states while the Central American countries would outvote Canada's provinces.  Europe already has a mix of rich and poor countries.
The hope would be that the poor countries would become rich, but it seems just as likely that this would make the rich countries poor.  The world GDP per capita is roughly a third of the US GDP per capita, so even distribution without increased production would make the US a lot poorer.
Comment: In my mind the world government which emerges would be similar to the United State's governmental structure. I don't think Europe accurately describes what I have in mind as the European states only give up a small fraction of their rights and do not have a central government above them.
Comment: @Kublai, the EU is indeed "a central government above" the individual nations.  Its laws take precedence over local laws.  It is true that it is less centralized than the U.S. though.
Answer: All the third world countries would benefit incredibly and the first world countries would start having very hard times.
These two worlds have to merge into one, becoming an average of it all (or less than average to adjust for logistics and losses involved in moving all the riches to the poorer parts).
Currency should be merged into a single kind, but it would most likely take many years. It would be easiest and cheapest to replace all the various existing currencies with a global digital credit type of currency (but not bitcoin). It would be more solid to back the digital credit with real gold, but who knows what they will do, maybe back it with oil? (probably not). Hacking attempts would be rampant at first, but eventually security will be good enough to prevent most hackers. Attempting to replace ALL physical currencies with another physical currency would be a tremendous effort with enormous costs.
There would still be corruption locally in all the places that are likely to have it, but it may be easier to find and eliminate than before, assuming the higher levels of government are making it one of their goals to eliminate corruption.
It would take many years, but eventually we would either run out of resources from all the waste and already declining resource availability and fail horribly, or find a way to work together efficiently and make it work by discovering fusion (or other source of power) and conquering our solar system to become the next level of civilization (probably need a dyson sphere-like thing). It most likely would not be sustainable for us to average out our "wealth" over all the countries, but I think it would be more sustainable to have all the wealthy countries heavily assist in the growth of the poorer areas. The divisions of countries help us to more easily manage resources and logistics and these divisions will most likely still exist in some form or shape.
Answer: In many ways finance and money in general would be simplified.
 1. Fiscal and Monetary policy would have to merge.
 2. Certain concepts would cease to exist such as Forex trading and currency exchange.
 3. Accounting would be much more simplified as the rules are the same
   for everyone across the globe.
 4. Outsourcing would cease to exist. If it's one government, everyone works in the same country. Furthermore, everywhere would have the same minimum wage. There would be no advantage to shifting jobs to China or India from the US or Europe as they would be making the same amount.
Answer: Like mentioned by WeekzGod, one advantage to this system is the fact that everyone, everywhere receives the same minimum wage (assuming there is one omnipotent world government). However, this means that poorer regions of the world that are not as socially and economically developed, may increase the price of basic necessities in other richer regions. There would be no need to change currency but on the other hand, it would take FOREVER to recall a defective coin or something. There's also the fact that if these regions are isolated from each other, a loaf of bread that costs 5 currency in one region could cost 40 in another, so in a way, these would still be similar to local currencies.


Windshield vent

Question: I just bloody spilled a full medium cup of hot chocolate down my 2002 bmw sport station wagons windshield vent. What do I do to clean and what should I look out for damage? Help me please. I am not sure as of what to expect.  Thanks
Comment: Welcome to Motor Vehicle Maintenance & Repair! I don't know how BMW's are put together, but will bet you're going to be looking at a complete tear down of the HVAC ducting to get it completely clean. This would be a *very* daunting job even for the experienced. Not a lot of fun. Sorry for chocolate mess ... it has to suck.
Comment: Doubt it damaged anything, enjoy the smell for a while then forget it.
Answer: A 2002 BMW is a nice classic car. Unfortunately you will have to start dismantling the dashboard starting from the top piece. Usually it's phillips screws, some under little moveable covers. Find a service manual or a Tubevideo. After the top piece is off, you will see the defroster tubes zigzig down toward the heater box.
Push some paper towels in to absorb liquid. Then wiggle out the pipes for thorough cleaning. Those pieces may have a staple where they join, otherwise tape or press-fit. Re-assemble without the staple, just add bits of duct tape to secure each joint.
You may have to remove a couple of vacuum hoses or wiring conectors. Mark the locations before you remove them. Vacuum hoses need a twist, and connectors usually have a push-lever on the side. Use an egg carton to organize the different screws. You mostly want to remove all trace of the hot chocolate before it gets sticky and smelly. If the fluid goes deeper use paper towels followed by wet wipes.
Comment: The mention of "station wagon" has me thinking the "2002" refers to the model year rather than the designation (they didn't do a "wagon" of the 2002) but this answer still applies in general and is a good answer!

Windshield vent


What are some scientific breakthroughs that have been done during jail time?

Question: I am looking for examples of scientific breakthroughs that have been made within the confines of a prison cell.
Comment: Do mathematical breakthroughs count?
Comment: From http://hsm.stackexchange.com/questions/322/how-did-prisoners-of-war-discover-scientific-breakthroughs-while-interned/328#328 Mulutin Milankovic was a First World War prisoner of war at the time of this discovery.
He eponymously discovered the Milankovich cycles which cause cyclic climate variation due to factors such as precession of the earths axis and the elliptical nature of its orbit.
Comment: See Chandler Davis, here: https://mathoverflow.net/a/384267/454  I don't know what was the paper in question, whether it was a "breakthrough".
Comment: @Superbest yes maths count.
Comment: Not exactly during jail time but Lev Landau was extracted from a Soviet prison with the condition that he solved the problem describing superfluidity, which he did in less than a year.
Answer: Andre Weil's work on zeta functions of algebraic curves over finite fields.
Andre Weil was one of the most famous mathematicians of the last century. He also was a pacifist, and when WWII approached, he left France to visit....Soviet Union:-)
After Soviet Union, he visited Finland... just few days before Soviet Union attacked it.
He was arrested by the Finns, as a Soviet spy with the nickname "Bourbaki".
It did not help his case that he had a full suitcase of papers signed "Nicolas Bourbaki",
and written in some mysterious code. In view of the quick Russian offense they decided to execute him by shooting...
Fortunately for Weil, the great Finnish mathematician Nevanlinna (who was socializing with highest Finnish officials) met the security chief in a party. The security chief told
Nevanlinna that they caught a Russian spy whose name is Andre Weil, and this guy says that he knows Professor Nevanlinna personally! Nevanlinna confirmed that Weil is a harmless mathematician. And recommended to deport him to France.
So Weil was deported to his native country and put to prison as a deserter....
He spent his time in prison until the Germans defeated France and released him
(as a French deserter. Probably they did not notice that he was also a Jew).
Anyway, after many adventures, Weil made his way to the US. In his memoirs he says that the work that he did in the French prison was his best. And that at a later age he even considered, instead of writing a grant application, to ask to put him to a prison... perhaps he would do a work of similar quality:-)
All this is from Weil's memoirs "The apprenticeship of a mathematician", Translated from the 1991 French original by Jennifer Gage. Birkhäuser Verlag, Basel, 1992.
The work he did in prison was truly revolutionary.
Answer: The French mathematician André Weil was imprisoned for failure to report for duty for a spell in 1940. It is said that "While in jail for six months at Rouen, he proved the Riemann hypothesis for curves over finite fields." Nowlan. He is said to have sent a 14 page letter to his sister from prison with some groundbreaking ideas on "Analogy in Mathematics". That letter is reprinted in the AMS article A 1940 Letter of
André Weil on Analogy
in Mathematics (trans. Krieger) with some introduction. Some more discussion on the contents and importance of this letter are here. Sources and stories abound online, and they largely seem to corroborate.
That seems to be a real solid example. I found several lesser examples of great scientific works, or accounts of Mathematicians and Scientists either writing something great or continuing with some great work. While these may not fit the request as straightforward as the Weil story, I believe they are worth noting nonetheless:

It is said about Galois that "During his imprisonment, he continued developing his mathematical ideas." Galois.
Galileo wrote what is said to be his greatest work Two New Sciences Galileo while in prison.
Bertrand Russell wrote Introduction to Mathematical Philosophy while in prison Russell.
Jean Leray is said to have done seminal work on topology while in prison.
Comment: Galileo was indeed not in a jail cell. He was under house arrest. I will call that confinement to his house. If I were confined to my house (for the rest of my life) I would personally feel confined. Call that a weaker example. As for Galois, it is true that we do not know exactly what specific work he did while in prison, just that he did work. He was pretty young, and I suspect he did something interesting. Call that another weaker example. Nice anecdotes at any rate.
Comment: Galileo was not really in prison. This was a sort of "home arrest", but he was in no way confined. It is not clear when exactly Galois did his work, while in prison or not. Leray was in a POW concentration camp, and indeed did some work there.
Answer: Another famous and really unique case was Andre Bloch, another great French mathematician of 20-s century. He was drafted to WW I when he was a student (or maybe just graduated). He was severely wounded at his head (he fell from an artillery observation tower when it was hit).
After a hospital and a honorable discharge he lived with his relatives. One morning he killed all of them during the breakfast (his uncle, aunt and several more relatives).
It was decided that a war hero should not stand a trial during the war and he was confined in a mental asylum for the rest of his life. He died in his asylum in 1948.
During his stay in the asylum he worked and published many papers which revolutionized the subject of Complex Analysis. He is still remembered for the "Bloch's Principle", "Bloch Constant," "Bloch functions" and "Bloch's conjecture" (see Wikipedia).
Comment: I am not against referring to Wikipedia. I am only against copying and pasting from it. Everyone can look at Wikipedia herself, if you tell what to look for.
Comment: Why is it that you're against Wikipedia [here](http://meta.hsm.stackexchange.com/questions/95/answers-in-wikipedia) but okay with it here?
Answer: A fairly comprehensive treatment of Jean Leray's work as a prisoner of war can be found in this paper.
Among the citations you can see the rather famous Course d'algèbre topologique enseigné
en captivité ("A course in algebraic topology taught in prison").
Comment: I think you mean "prisoner of war" instead of "prisoner of work."
Answer: I'm going to interpret "jail" and "prison" as including house arrest and concentration camps.
Ibn al-Haytham wrote his Book of Optics (in seven volumes) while under house arrest.  He

was kept under house arrest [by Fatimid Caliph al-Hakim] from 1011 until al-Hakim's death in 1021.  During this time, he wrote his influential Book of Optics and continued to write further treatises on astronomy, geometry, number theory, optics and natural philosophy.

Jakow Trachtenberg created the Trachtenberg System for quick mental arithmetic calculation while in a concentration camp.

After the Russian Revolutions of 1917, Trachtenberg fled to Germany where he became critical of Nazi policies.  He was imprisoned in a Nazi concentration camp during World War II.  He developed his system of mental arithmetic during his imprisonment.
Answer: Jean-Victor Poncelet was a prisoner of war in Russia in the years 1812–1814, and wrote Traité des propriétés projectives des figures there. This was an important work in projective geometry. More info on http://en.wikipedia.org/wiki/Jean-Victor_Poncelet
Answer: Jean Leray, a French mathematician, was a prisoner-of-war in Edelbach, Austria from 1940-45. He concealed his expertise in differential equations for fear he might be put in the service of the Nazi war work and hence concentrated on more theoretical topics, in this case, algebraic topology. His work was innovative in sheaf theory and laid the foundations for what is known as spectral sequences.
The Leray spectral sequence is named in his honour and was actually introduced by him in 1946. Today, it's now seen as a special case of the Grothendieck spectral sequence and which shows its seminal importance. It is important in the study of cohomology and sheaf theory was a strong motivation for Topos theory.
Answer: As a Jew, Hungarian mathematician Pál Turán was forced to work in a brick factory during WW2. He asked a problem now known as Turán's brick factory problem which is considered as creation of a new field in combinatorics and graph theory: Extremal combinatorics.