Thursday, November 30, 2017

colloquial language - About cutting the sentences short


I've been told during my Japanese classes, and I've also observed in anime and Japanese dramas & movies, that sometimes when talking Japanese people tend to stop halfway and omit the end of sentence especially when the sentence has some negative connotation (e.g refusal etc). For example:



鈴木: これをもっと安くしませんかねえ。
田中: それはちょっと。。


Suzuki: kore wo motto yasuku shimasen ka nee.
Tanaka: sore ha chotto ..



Another example:




鈴木: ブラウンさんの日本語はなかなか上手ですねえ。
ブラウン: いや、私はまだまだ。。


Suzuki: buraun-san no nihongo ha naka naka jouzu desu nee.
Brown: iya, watashi ha mada mada ..



So is there a cultural reason for this behavior? What is term for it? And how should non-Japanese interpret or react if our questions or invitations are replied with such responses?


Meta note: I notice myself that the last question is a bit subjective. Should we or should we not allow this kind of subjective questions in Japanese SE?



Answer



Omission of syntax to allow the user to infer meaning (for politeness or whatever reason) is one of the many characteristics of Japanese. What remains unsaid is often stronger than what is actually said. The Japanese abhor "spelling things out" for you, because it is not "harmonious" and puts them in a position of having to be direct. If you've read こころ by 夏目漱石, you may recall a passage where the narrator feels revulsion for a Westerner he met, in part because the man does not understand the Japanese feeling that what can be said in a look may be vulgar to put into words, etc



kanji - Meaning of font variation in the case of the character 賭


Some Kanji characters are written slightly differently in the Mincho/Gothic typefaces or handwriting. Ones that come to mind are 令、心, and these have been discussed before [1]. This font-dependent variation is consistent when the character occurs as a sub-element of another character (e.g. as in 冷).


Today, I encountered the character 賭 (as in 賭け, 賭博) that looks like it's consists of the sub-elements 貝 and 者. Interestingly, the Mincho font on my machine puts one extra stroke on the top right of the 日 on the right hand side.


I was puzzled because the character 者 by itself doesn't show this variation. Thoughts?


[1] Why are there two versions of the kanji for 冷?



Answer



In fact, the 者 character has the dot in the Kangxi dictionary. This variant is coded in Unicode as 者 and is etymologically the older one.


It is worth pointing out that 賭 was only added to the Jōyō kanji list in 2010. Computer fonts usually use traditional (= Kangxi) shapes for characters not on the list; cf Asahi characters and extended shinjitai. Curiously, if you look at the official list, they explicitly say (p. 3) that this variation is permitted for 賭:



付  情報機器に搭載されている印刷文字字体の関係で、本表の通用字体とは異なる字体(通用字体の「頰・賭・剝」に対する「頬・賭・剥」など)を使用することは差し支えない。




See also p. 9.


orthography - 有り難う vs 有難う — Is this the same word?


Do both these words mean "thank you"? If both mean thank you why are they spelled differently? Is one more formal than the other?



Answer



Both are different spellings of ありがとう, neither is more formal, although all three spellings may be differentiated by frequency (see below).


ありがとう "thank you" may be derived from ありがたい through sound change; ありがたい is a compound of 有る and 難い.



In forming compounds, the first verb conjugates to the ren'yōkei (= "masu-stem"). In compound verbs, like 有り得る or 押し付ける, this is usually all that happens, but for other compounds the okurigana (hiragana part of the verb) are sometimes omitted, so both 有難い and 有り難い are possible ways of writing the same word. (Here り is the okurigana of 有り.)


There are many other such examples:



  • 受け付け = 受付け = 受付 "reception"

  • 乗り物 = 乗物 "vehicle"


ありがとう is usually written in hiragana nowadays, but it may be written with kanji, like you suggest.


Here are the frequencies of the different spellings (from Balanced Corpus of Contemporary Written Japanese, via http://nlb.ninjal.ac.jp and http://www.kotonoha.gr.jp/shonagon)


ありがたい 1987 (74%)
有難い   350 (13%)

有り難い  343 (13%)
有りがたい 17 ( 1%)

ありがとう 7090 (93%)
有難う   420 ( 6%)
有り難う  102 ( 1%)
有りがとう 2 ( 0%)

受付    3916 (85%)
受け付け  633 (14%)

受付け   34 ( 1%)
うけつけ  3 ( 0%)
受け付   1 ( 0%)

乗り物   470 (79%)
乗物    95 (16%)
のりもの  16 ( 3%)
乗りもの  12 ( 2%)

As you can see, 有難う is about four times as common as 有り難う, but ありがとう is by far the most common.



Rendering an appositive "which" clause in Japanese


I've been writing little news pieces lately for practice, and I'm presently hung up on this passage. I'm trying to express the idea "This decision caused many protests, which have remained peaceful thus far." I could split these clauses into two sentences and have an easy time of it, but I've been trying to dig up some information on how I could actually convey that "which" appositive relationship.


I had a look at this excellent discussion, but I don't think the examples provided address my usage case, because the closest equivalency I can draw to those would involve changing the sentence to "This decision cause many protests which are peaceful," or "many peaceful protests," and I specifically want to retain the indication that the protests are ongoing and that their remaining peaceful is not a certainty.


I'd field some guesses, but I've come up short on any material that gets any closer to discussing what I have in mind, so I'm at a loss.



Answer



Your original text seems to be an instance of a very English way of sentence-building, which adds comments as appositive afterthoughts. This sort of idea is often hard to transplant into Japanese, because the language doesn't have any postmodifing (i.e. adding adjectives after) mechanism. It is often separated or linked by conjunctions, like multiple sentences.


So a possible translation is:




この決定は多くの抗議活動を巻き起こしたが、それらは今のところ平和裡に行われている。



But if I'm allowed to translate freely, I'd reword it as:



この決定は多くの抗議活動を巻き起こしたが、現時点で暴動には発展していない。
This decision caused many protests, but they have not exploded into violence thus far.



greetings - What does うぃーす mean?


What does うぃーす exactly mean? (I vaguely hear it when people greet each other.) How is it different from other greetings?


Is it correct to write it as うぃす too?


How to properly type it on a Macbook? The い is a smaller font, and I don't know how to type ー.




Answer



"うぃーす" is a ultra-shortened greetings of, maybe おはようございます or something. "おっす" is one of the variations. Although the etymology is not clear, these are used in several ways.




  1. A sluggish, slow "うぃーっす" is a greeting used between young, mainly male, close friends. I think this is what @Sjiveru described, as something like "yo". People use this when they feel pronouncing "おはよう(ございます)" is too long and bothering.




  2. A short, vigorous, strong "うぃっす!" or "おっす!" can be a polite greeting in certain sport clubs/teams. You may be safe to say "うぃっす!" even to your seniors or advisers (But this greatly depends on the team you belong to). In such cases, the strength of your greetings determines the level politeness rather than what is actually said as a word. I think people use this because pronouncing "おはようございます" is too complicated to say out loudly. This is also something repeated almost meaninglessly in response to someone's speech, like "yes (sir)."





I can't say "うぃす" is incorrect, especially when it's used in the second situation. This is a shortened/altered form, so basically you can write this in whatever way you like. But "うぃーっす", "うぃーす" or "うぃっす" is more common.


sexuality - Is it considered a good thing that Lot's daughters slept with their father?


In Bereishis 19:30-38 the story is told how the 2 daughters of Lot thought (for whatever reason) that they should sleep with their father. From the psukim themselves, it is unclear whether or not what they did is a positive thing. Are there sources that make it clear how to relate to what they did?



Answer



There is a certain amount of ambiguity here.


On the one hand, we see that our Sages praise the daughters of Lot, and especially the elder daughter who took the initiative.


Nazir 23a:




אלא משל ללוט ושתי בנותיו עמו הן שנתכוונו לשם מצוה וצדיקים ילכו בם הוא שנתכוין לשם עבירה ופושעים יכשלו בם


Rather, it is comparable to Lot and his two daughters, who were with him. They, who intended to engage in sexual intercourse with him for the sake of a mitzva, as they thought that the entire world was destroyed and wished to preserve the human race, are described in the first part of the verse: “And the just walk in them.” He who intended to act for the sake of a transgression is described by the last part: “But transgressors stumble over them.”


(Translation and elucidation courtesy of sefaria.org)



Nazir 23b:



א"ר חייא בר אבין א"ר יהושע בן קרחה לעולם יקדים אדם לדבר מצוה שבשכר לילה אחת שקדמתה בכירה לצעירה זכתה וקדמה ארבעה דורות בישראל למלכו':‏


Rabbi Ḥiyya bar Avin said that Rabbi Yehoshua ben Korḥa said: A person should always come first with regard to a matter of a mitzva, as in reward of the one night that the elder daughter of Lot preceded the younger for the sake of a mitzva, she merited to precede the younger daughter by four generations to the monarchy of the Jewish people. The descendants of Ruth the Moabite ruled over the Jewish people for four generations: Obed, Yishai, David, and Solomon, before the reign of Solomon’s son Rehoboam, whose mother was Naamah the Ammonite.


(Translation and elucidation courtesy of sefaria.org)




On the other hand, our Sages castigate them for their lack of shame, especially the elder who was more brazen.


Bamidbar Rabbah 20:



וַיְהִי מִמָּחֳרָת וַתֹּאמֶר הַבְּכִירָה אֶל הַצְּעִירָה הֵן שָׁכַבְתִּי אֱמֶשׁ, לִמְּדַתָּה אֲחוֹתָהּ, וּלְפִיכָךְ חָסַךְ הַכָּתוּב עַל הַצְּעִירָה וְלֹא פֵּרְשָׁהּ, אֶלָּא (בראשית יט, לה): וַתִּשְׁכַּב עִמּוֹ, וּבַגְּדוֹלָה כְּתִיב (בראשית יט, לג): וַתִּשְׁכַּב אֶת אָבִיהָ.‏


"And it was the next day and the elder said to the younger, behold last night I slept etc." She taught her sister, therefore the verse took pity on the younger daughter and was not explicit, rather writing, "And she slept with him", as opposed to the older daughter, where it writes, "And she slept with her father."



Nazir 23b:



א"ר חייא בר אבא א"ר יוחנן מנין שאין הקב"ה מקפח אפי' שכר שיחה נאה דאילו בכירה דקריתיה מואב א"ל רחמנא (דברים ב, ט) אל תצר את מואב ואל תתגר בם מלחמה מלחמה הוא דלא אבל צעורי צערינן ואילו צעירה דקריתיה בן עמי אמר ליה (דברים ב, יט) אל תצורם ואל תתגר בם אפילו צעורי לא תצערינן כלל


Rabbi Ḥiyya bar Abba said that Rabbi Yoḥanan said: From where is it derived that the Holy One, Blessed be He, does not deprive one of even the reward for proper speech, i.e., for speaking in a refined manner? As while there is the case of Lot’s elder daughter, who called her son Moab [mo’av], which alludes to his shameful origins, as me’av means: From father, and the Merciful One says to Moses: “Do not besiege Moab, nor contend with them in war” (Deuteronomy 2:9), which indicates: It is war that is not permitted; however, with regard to harassing, the Jews were permitted to harass them. And while there is the case of Lot’s younger daughter, who called her son Ben-Ami, son of my people, without explicitly mentioning her father. With regard to her descendants, God said to Moses: “Do not harass them, nor contend with them” (Deuteronomy 2:19), which means even as far as harassing is concerned, you may not harass them at all.



(Translation and elucidation courtesy of sefaria.org)



history - How old is the Earth?


There are few versions of the age of the Earth Wikipedia Article but they seem to be mostly (all?) from christian interpretations. Are there estimations from the Tanakh, with Jewish interpretations?


This question is asking for a religious answer, without regard to scientific evidence or lack of same.




amines - Acid in Imine Formation


Why is a strong acid like $\ce{H2SO4}$ used for imine formation here instead of a weaker acid like TsOH? I thought that if the pH was too low, the amine molecule would get protonated to an ammonium, which are not nucleophilic? enter image description here




Wednesday, November 29, 2017

physical chemistry - What is the difference between Molecularity and Order Of Reaction?


In the field of Chemical Kinetics, terms like Molecularity and Order Of Reaction are often used. I am a bit confused between these two terms.


Can someone explain to me about these two terms and their origins?



Answer



In fact, molecularity and order of reaction are identical if the reaction is elementary. They may become different when the reaction is complex and has a mechanism.


The molecularity of a reaction is defined as the number of molecules or ions that participate in the rate determining step. A mechanism in which two reacting species combine in the transition state of the rate-determining step is called bimolecular. If a single species makes up the transition state, the reaction would be called unimolecular. The relatively improbable case of three independent species coming together in the transition state would be called termolecular.


The order of a reaction is an experimentally derived number. Let's consider the general reaction: $\ce{A + B-> C + D}$ The reaction rate$=\ce{k[A]^n.[B]^m}$ where the rate constant $k$ is a proportionality constant that reflects the nature of the reaction, $\ce{[A]}$ is the concentration of reactant $\ce{A}$, $\ce{[B]}$ is the concentration of reactant $\ce{B}$, and $n$ & $m$ are the exponents used to fit the rate equation to the experimental data. Chemists refer to the sum $n + m $ as the kinetic order of a reaction.


In a simple bimolecular reaction $n$ and $m$ would both be $1$, and the reaction would be termed second order, supporting a mechanism in which a molecule of reactant $\ce{A}$ and one of $\ce{B}$ are incorporated in the transition state of the rate-determining step. A bimolecular reaction in which two molecules of reactant $\ce{A}$ (and no $\ce{B}$) are present in the transition state would be expected to give a kinetic equation in which $n=2$ and $m=0$ (also second order).


Ionic or covalent bond


Which bond is stronger, ionic or covalent? I have a lot of confusion about this.




sources mekorot - Where does Chassam Soffer say Hillel needed a job


I recall seeing a Chassam Soffer who explained that Hillel Hazakein was allowed to lead a life of poverty for Torah only as long as he had no children. Up untill then it was a lifestyle that his wife agreed to, but once he had children he couldn't force that lifestyle on them and he would have had to provide them with a normal life.



Where is this? I've been searching desperately to find it again, but I can't.



Answer



You may be referring to the Chidushei Chasam Sofer on Bava Basra 57b. The gemara there states as follows:



בעא מיניה ר' יוחנן מרבי בנאה... שלחן של ת"ח כיצד שני שלישי גדיל ושליש גלאי ועליו קערות וירק וטבעתו מבחוץ והא תניא טבעתו מבפנים לא קשיא הא דאיכא ינוקא הא דליכא ינוקא ואי בעית אימא הא והא דליכא ינוקא ולא קשיא הא דאיכא שמעא הא דליכא שמעא ואי בעית אימא הא והא דאיכא שמעא ולא קשיא הא ביממא הא בליליא



Soncino translation:



R. Johanan asked R. Bana'ah13... How should the table of a talmid hakam be laid? He replied: Two-thirds should be covered with a cloth and the other third should be uncovered for putting the dishes and vegetables on;17 and the ring18 should be outside.19 But has it not been taught that the ring should be inside?20 — There is no contradiction. In one case [we suppose] there is a child at the table,21 and in the other that there is no child. Or if you like I can say [that in both cases [we suppose] there is no child, and still there is no contradiction: in one case [we suppose] there is a waiter at table22 and in the other there is no waiter.23 Or if you like I can say that in both cases [we suppose] there is a waiter, and still there is no contradiction; in the one case we refer to the day24 and in the other to the night.


13 Having mentioned R. Bana'ah the text adduces a number of his sayings and doings. ... 17 So that they should not dirty the cloth. According to some, the bare space was to be in the middle. 18 By which the table-top was hung up when not in use. 19 I.e., on the bare part. 20 I.e., the part near the guests. 21 And then it should be outside, because otherwise the child may play with it and upset the table. 22 And it should be inside, because if it is outside, it may get in his way. 23 And it should be outside, so as not to get in the way of the company. 24 When the waiter can avoid it, and therefore the convenience of the company can be consulted by having it outside.




The Chasam Sofer (here) interprets this passage homiletically:



ואמר בשולחן של ת"ח שטבעתו שהשולחן תלוי בו מבפנים או מבחוץ היינו שפרנסתו מעצמו היינו מבפנים או מבחוץ והא בלית לי' ינוקא רק הוא בעצמו כן עשה הלל משתכר בטערפיק ונדחק ביגיע כפו ולא פנה חוץ להזמין לו פרנסה והיינו בדלית לי' ינוקא. אך בדאית ליה ינוקא ורוצה לגדלם לתורה ועבודה א"א בזה אלא טבעתו מבחוץ. והא דאית שמעא כשמעון אחי עזרי' והא ביממא פי' שאותו הנותן נותנו בעין יפה ושמח שזכה לכך כדכתי' שמח זבולון בצאתך שזכית שיששכר באהלך אבל אי נותן בעין רע ות"ח שנהנה ממנו מתבייש כסומך על שלחן אחרי' שהעולם חשך בעדו והיינו בליליא לא יקבע טבעתו בחוץ אלא יפשוט נבלה בשוק ולא יצטריך ללחום לחם רע עין.



Translation:



And when R' Bana'a says regarding the table of a Torah scholar that the ring of the table hangs in it1 from the inside or the outside, this means that the livelihood that the Torah scholar provides can be from the inside or the outside. And this applies when he has no children, and it is just himself. This is what Hillel did; he earned a tarf'ik2 daily, and he made a meager livelihood by the toil of his hands. He did not turn outward [to others] to provide an income for him.


And this applies when one does not have children. However, when he does have children, and he wishes to raise them in Torah and divine service,3 it is impossible to conduct one's livelihood this way. Rather, "his ring is from the outside."


Regarding "if he has an attendant" ("שמעא"), this refers to a situation like that of Shim'on the brother of 'Azarya.4



And regarding "if it is during the day," the explanation is that the person who gives the scholar financial support should give it graciously and rejoice that he merited the opportunity to do so, as the verse states (D'varim 33:18), "Rejoice, Zevulun, in your expeditions," for you have merited to have "Yissachar in your tents".5


But if the benefactor gives begrudgingly, and the Torah scholar benefits from him, the scholar will be embarrassed like one who relies for his sustenance on the table of others, for the world will have become dark for him.6 And this is the meaning of, "At night, he should not set his ring on the outside." Rather, he should flay carcasses in the marketplace7 rather than need to be sustained from the bread of a begrudging eye.





1 "תלוי בו", which could also be translated as "dependent on him."


2 A טרפעיק coin is worth half of a dinar (K'subos 64a, "מאי טרפעיקין אמר רב ששת אסתירא וכמה אסתירא פלגא דזוזא"). Hillel used half of that daily income to support himself and his household ("וחציו לפרנסתו ולפרנסת אנשי ביתו", Yoma 35b). Apparently, the Chasam Sofer assumes either that Hillel's "household" did not yet include children or that Hillel did not adhere to the lesson that the Chasam Sofer reads into R' Bana'a's words.


3 Alternatively, perhaps this could be translated as "raise them to study Torah and work for a living."


4 Shim'on was a tanna whose Torah study was supported financially by his brother 'Azarya (Sota 21a, Rashi s.v. "שמעון אחי עזריה"). Hillel on the other hand, did not accept financial assistance from his brother Shevna (or Shachna). It seems that the reason Hillel did not accept is that Shevna wanted a share in Torah study that Hillel had already accomplished prior to the arrangement (ibid., "לסוף א"ל תא נערוב וליפלוג"). However, see Maharsha (ad loc.) who indicates that Hillel behaved more meritoriously than Shim'on and R' Yochanan d'vei N'si'a because he did not accept money from others to allow him to learn Torah.


5 See B'reishis Rabba 72:5 and 99:9 and Vayikra Rabba 25:1.


6 Cf. 'Avoda Zara 8a, "ת"ר לפי שראה אדם הראשון יום שמתמעט והולך אמר אוי לי שמא בשביל שסרחתי עולם חשוך בעדי וחוזר לתוהו ובוהו" ("Woe is me! Perhaps because I sinned, the world has become dark for me").



7 See P'sachim 113a, "פשוט נבילתא בשוקא ושקיל אגרא ולא תימא כהנא אנא וגברא רבא אנא וסניא בי מלתא" ("Flay a carcass in the marketplace and take a salary, and don't say, 'I am a Kohein, and I am a great person, and the matter offends me!'"). In perhaps a double entendre, "פשוט נבילתא בשוקא ושקיל אגרא" may also be translated as, "Put your body out in the marketplace, and earn a salary."


parshanut torah comment - Yocheved is the daughter of who?


So Yocheved, as it is known, is the wife of Amram,mother of Moshe Rabbeinu, Aharon HaCohen, and Miriam the prophetess, peace be on them. And Yocheved, like Amram, is from the Tribe of Levi.


Amram is the son of Kehas. But who is Yocheved's father? I know that most people say that she is the daughter of Laivi, and thus the aunt of Amram, I most definitely think this cannot be the case. Because the Torah She-baal peh` states that Amram was one of the four people who never sinned in their life, and the Yisroelim were in only obligated in the Noachide Laws (and I'm guessing they also held on to other traditions, you know, from their forefathers) and one of the Noachide laws (#4 to be exact) is that incest is not permitted.


So, if Yocheved is the aunt of Amram, then Amram would have been doing a Aveirah for quite some time, and thus makes the account that he never sinned questionable, which is not true.



Also when it says that she is a daughter of Levi, it could mean granddaughter, because a granddaughter can be considered a daughter in the Hebrew language. So she is either the daughter of Gershon, an unknown son of Laivi, or Merari, so which one is it?




etymology - How did やわらかい gain its い?


As we know, there is a class of adjectives that end in 〜らか: 滑【なめ】らか, 明【あき】らか, 清【きよ】らか, 安【やす】らか, etc.


やわらか (柔らか or 軟らか) is also in this class of adjectives. However, it can also be written as the イ-adjective やわらかい. So when and how did this adjective pick up an い to become a separate イ-adjective?



Can this be done arbitrarily with any of the 〜らか class adjectives? Like 滑【なめ】らかい, 明【あき】らかい, 清【きよ】らかい, 安【やす】らかい. My gut feeling is that it cannot, but only because those forms sound strange to me. If it cannot arbitrarily be done, are there any other 〜らか class adjectives that can take on the extra い?




image processing - How to get a top view using open cv?


I have a situation where i need to extract the top view of a road from the 'skewed' view I get from a cc camera located on some roadside tree. I would like to do this using OpenCV, but since I'm very new to image processing and really don't know what approach to take, please provide me any sort of guidance on how to approach the problem.




Answer



I am not giving you a complete algorithm here, but since I worked on a similar project, I can give you some hints and tips.


First of all, changing an image taken from one perspective to a different one relatively easy only for planar surfaces. E.g., you have an image of a tall building with a road, and since buildings are usually build vertical in the air and roads tend to be flat on the ground, the planes of the building and the road are perpendicular. Now, if you want to get an image where you are looking straight in to the building (e.g. building plane parallel to image plane), you have two options:



  • either transform the image so that the building plane is the way you want it, and disregard the rest of the image (road plane will not be correctly transformed)

  • in addition to transforming the building plane, calculate and perform a transformation on the image part representing the road plane, and somehow stitch them together.


The transformation that allows you to "change" the perspective is called the planar perspective transformation or homography. A homography represents a (mathematical) connection between two images of a same object taken from different perspective, e.g. allows you to calculate the unknown image coordinates of a point in space in one of the images from known image coordinates of the same point in the image with a different perspective.


To be able to calculate a homography, you need to know four pairs of corresponding points. In case of bad camera, you will also have to take care of the camera intrinsic parameters. A very good post on this can be found here.


Now, if you really want to do it properly, you should understand all the terms I used up until now really well before doing anything else. That said, I have been working on a fairly large project, and some parts required to transform images of a road taken from a moving car in to images taken from the bird's perspective, which is what you want to do now. The project was dealing with various road signalization, traffic signs and road markings. Useful references would be:




This should give you all the material you need to get what you want to do. Good luck, it took us a while.


Histogram and binary image in opencv?




I would like to compute how many zeros and ones (e.i. 255) in a binary image. The following code to generate a binary image by using Matlab.


I = imread('images.jpg');
level = graythresh(I);
BW = im2bw(I, level);
imshow(BW)
imwrite(BW, 'img.jpg');

This is my C++ code.


#include 
#include

#include
#include
#include

std::map computeHistogram(const cv::Mat& image)
{
std::map histogram;

for ( int row = 0; row < image.rows; ++row)
{

for ( int col = 0; col < image.cols; ++col)
{
++histogram[(int)image.at(row, col)];

}
}

return histogram;
}


void printHistogram(const std::map& histogram)
{
std::map::const_iterator histogram_iter;
std::cout << "\n------------------\n";
for( histogram_iter = histogram.begin(); histogram_iter != histogram.end(); ++histogram_iter)
{
std::cout << std::setw(5) << histogram_iter->first << " : " << histogram_iter->second << "\n";
}
std::cout << "------------------\n";
}


int main(int argc, char **argv)
{
cv::Mat img = cv::imread("img.jpg", CV_BGR2GRAY);
printHistogram(computeHistogram(img));
return 0;
}

This is what I got


------------------

0 : 11451
1 : 590
2 : 602
3 : 498
4 : 428
5 : 376
6 : 387
7 : 349
8 : 314
9 : 278

10 : 229
11 : 206
12 : 212
13 : 159
14 : 142
15 : 112
16 : 106
17 : 96
18 : 86
19 : 54

20 : 44
21 : 37
22 : 26
23 : 26
24 : 14
25 : 14
26 : 10
27 : 4
28 : 7
29 : 8

30 : 2
32 : 7
33 : 2
34 : 3
36 : 2
37 : 4
38 : 1
211 : 1
216 : 1
217 : 1

219 : 4
220 : 2
221 : 2
223 : 3
224 : 5
225 : 2
226 : 4
227 : 4
228 : 5
229 : 8

230 : 15
231 : 19
232 : 22
233 : 25
234 : 36
235 : 21
236 : 54
237 : 54
238 : 64
239 : 93

240 : 113
241 : 111
242 : 127
243 : 163
244 : 193
245 : 182
246 : 202
247 : 218
248 : 263
249 : 289

250 : 291
251 : 301
252 : 403
253 : 458
254 : 469
255 : 29211
------------------

Is this right? What I'm expecting is the number of 0s and 255s.



Answer




The answer is posted as a reply to Otsu's method problem? . So it is now a duplicate I guess.


hashkafah philosophy - Is there any difference between Jewish G-d and Muslim G-d?



Do Jews and Muslims worship the same G-d? If so, do they understand G-d the same way? As a related point, is there any linguistic or theological connection between "Allah" and "Eloha" (or "Elohim")? Please explain.




children parenting - Can a grandparent name a child differently than the parents?


We all know that Moshe Rabeinu had 7 names and was called Moshe which was the name Basya gave him. Recently I was in a Shul and there was a fellow there that had a grandaughter the previous week. The child was named by the parents however the grandfather was unhappy with the name they gave. (I do not recommend that anyone should do this.) The grandfather wanted an Aliyah and wanted to give a different name. The Gabbai smartly forgot to give the grandfather an Aliyah and avoided the unhealthy consequences of doing this.


My question is - does it work? Suppose the grandparent gave a different name than the parents or anyone else for that matter does this child now have additional names?




Tuesday, November 28, 2017

product recommendation - Buying a Shulchan Aruch


I am looking to purchase a new Shulchan Aruch to be used as a reference set. I am having trouble finding reviews online (about which I am not so surprised).


Can anyone recommend a set of Shulchan Aruch, based on personal experience, which satisfies the following guidelines:




  • Clear print: type-set laser-printed pages, not photocopies.

  • Sources: A reasonable amount of in-line sourcing of externally cited material

  • Strong binding: Binding is reinforced and does not fall off through normal use

  • Edited: Is not full of typos, and perhaps even has sourced corrections based on external sources.


Note: I cannot afford a Ferrari, nor can I afford a Friedman Shulchan Aruch.


Thank you!




grammar - Adjectives functioning both as イ- and ナ-adjective


This question has made me think about the class of adjectives, which can function both as イ- and as ナ-adjective, e.g.


大きい   大きな
小さい 小さな
真っ白い 真っ白な (etc.)
細かい 細かな
暖かい 暖かな
四角い 四角な (etc.)

柔らかい 柔らかな

In my (non-)answer to the question, I mentioned that the difference of やわらかい and やわらかな is very subtle at best.


I am wondering, can this maybe explained in more generality? What are the differences in the word pairs above?



Answer



After some research, there seems to be little difference in meaning. In some situations, maybe ease of pronunciation is more of a guide than nuance of meaning. For example, in the Balanced Corpus of Contemporary Written Japanese (BCCWJ, 少納言), we have


大きな木  154 results
大きい木 12 results

(But 木 is clearly no abstract concept.)



However, my question stated that 大きい etc. can be used as both イ- and ナ-adjective, which seems to be only half of the truth as 大き shouldn't be considered a ナ-adjective, even though it can modify nouns as 大きな.


For example, 大き cannot be inflected, to form an adverb (cf. 静か → 静かに.)


Rather 大きな belongs to the class of [連体詞]{れんたいし} (Rikaichan calls this pre-noun adjectival or adnominal adjective, a better name would be adnoun).


連体詞 are words which cannot inflect and must modify a noun (or pronoun), e.g.



この、その、あの、……


おかしな、大きな、小さな、……



as in




このやり方は一番よい。


こうするのが一番よい。



or



空におかしな形の雲が浮かんでいる。


空に変な形の雲が浮かんでいる。



These 連体詞 seem to come in 4-5 varieties (depending on the book you read):




「~の」の形・・・この、その、あの、どの、ほんの


「~な」の形・・・大きな、小さな、おかしな、いろんな


「~た、~だ」の形・・・たいした、たった、とんだ、ばかげた


「~る」の形・・・ある、あらゆる、いわゆる、さる、きたる、いかなる、堂々たる


「~が」の形・・・わが



All this information is a summary of this site. I hope someone will find it useful.


This should also shed some grammatical light on this and this question.


In an after-thought as to why 小さい時 cannot be 小さな時 is that 小さな is a 連体詞 and must modify a (pro)noun and thus forces the meaning small time, rather than allowing for the interpretation as a sentence in which the (omitted) subject was small, which is usually translated with a relative clause, i.e. the time, when I was small or just when I was small.


So, the general rule seems to be that one can choose either one of the word pair, but when choosing the one ending in な, one chooses to modify directly the noun which must follow it and disallows constructions with relative clauses.



E.g. compare



山の大きい街 vs. 山の大きな街.



The former can mean a city with a big mountain, whereas the latter is necessarily a big city situated on a mountain. (One can probably come up with better examples.)


fft - Question about convolution in time and frequency domain


My question is about the number of data points when doing a convolution (or correlation) in the the time or frequency domain. let's say we have two signals, $a(t)$ and $b(t)$ each of length $16$. When we do the convolution as follows:



$$c(t) =a(t)\star b(t)$$


$c(t)$ consists of $31$ points, right? Now if we transform these into $A(f) = \mathrm{FFT}(a(t))$ and $B(f) = \mathrm{FFT}(b(t))$, $A(f)$ and $B(f)$ each consist of $16$ points still, were the first half is a mirror of the second half. The convolution is just a multiplication in the frequency domain:


$$C(f) = A(f)\cdot B(f)$$


I believe $C(f)$ should be $16$ points. I'm fine with that much, but if we transform $C(f)$ back to the time domain, doesn't $c(t)$ end up having $16$ points?


I'm sure I'm just not thinking correctly about this. Thanks for any clarification!



Answer



Normally, the variables $t$ and $f$ are used for continuous time and frequency. But from your question I understand that you're talking about discrete time and frequency, and their relation via the Discrete Fourier Transform (DFT).


If you have discrete-time sequences $a[n]$ and $b[n]$ and their DFTs $A[k]$ and $B[k]$, then the DFT of the linear convolution $c[n]=a[n]\star b[n]$ is NOT equal to $A[k]\cdot B[k]$. The product of the DFTs corresponds to circular (or cyclic) convolution in the time domain.


The linear convolution of two $16$-point sequences has indeed $2\cdot 16-1=31$ points, whereas the circular convolution of two $16$-point sequences also has $16$ points.


halacha - Badikas Chamatz in courtyards of cities today


Shulchan Aruch HaRav says:



קרקעית החצר אין צריך בדיקה לפי שעורבין ושאר עופות מצויין שם והם אוכלים כל חמץ שנופל ואפילו אם ידוע לו שיש שם בחצר ודאי חמץ אין צריך ליטלו משם בשעת בדיקת ליל י"ד ואפילו לכתחלה יכול להשליך חמץ לחצר קודם שתגיע שעה ששית וכשתגיע שעה ששית ילך לראות החמץ בחצר ואם עדיין הוא מונח שם שלא אכלוהו העורבים חייב לבערו מן העולם לגמרי מיד שיראנו כמו שיתבאר בסימן תמ"ה


ואין חוששין שמא ישכח לילך ולראותו כשתגיע שעה ששית שאף אם ישכח עליו אין כאן איסור שבודאי נטלוהו העורבין קודם שהגיע שעה ששית והוליכוהו למקום שבאו משם



In summary: Courtyard land does not require Bedikas Chametz because it is a certainty that birds or other animals ate it, and one can even throw Chametz there erev Pesach in the morning.


In contemporary urban settings, while there are birds, they are not so thorough about eating things. See of example this picture of a New York street:


Image of Pidgin next to Chametz



Those who live around there will tell you that that kind of thing will stay around a while.


Note 1: This may be a function of the Chametz more than the birds, as processed foods seem less popular. Drop grass seeds and they are gone in a few hours.


Note 2: The particular picture is in a Makom Hefker - the public street, not a backyard, but the birds are not more active in back yards.


So the question is: in such a setting are there additional requirements for Bedikas Chametz in courtyards and/or limitations on throwing chametz into them?




food - Why would a product be "only for cooking and pureeing"?


A recent OU kashrut alert that I found on Kashrut.com says:



Kirkland Nature's Three Berries: Rader Farms, Inc.: This product bears a Half-Moon K symbol and should be used only for cooking and pureeing.



Why would cooking or pureeing be OK but other uses (presumably raw snacking) be not OK?



Answer




My guess is that it's a bug issue. Yuck.


If one bug was pureed (or cooked, assuming cooking breaks apart the bug) with several cups of berries, the ground-up bug is nullified ("batel") 1:60 by volume and you can eat the puree. This minute quantity of non-kosher ingredient, which isn't a flavoring, coloring, stabilizer, or enzyme, is not a problem.


However, as long as the bug remains whole, there's the rule that complete organisms ("berya") don't get nullified in large mixtures. There's a chance if you snacked raw that you'd consume a whole bug, hence a problem.


While we're on yuck factors -- there are notes online from Rabbi Tendler's lecture that the carp and whitefish back in Eastern Europe often contained parasitic worms. If you wanted to eat whitefish filet, you had to break apart the flesh to find the worms (which is what Rabbi Moshe Feinstein did). Conveniently, if you grind everything up and make gefilte fish, no more whole organisms, no problem.


blessing - Why are there two different forms of the mitzvah brachot ("l-" and "al")?


Some mitzvah brachot are of the form ...vitzivanu "l'X" ("to X", infinitive verb), and others are of the form "al X" ("upon X", gerundive verb). I particularly noticed this during Sukkot with two similar ones in proximity; it's "likro et hahallel" but "al mikra megillah" (which led me in a roundabout way to ask this question). Why the difference?


I first thought that it might be the difference between something we do actively (we all say hallel) and something we experience more passively (most of us don't personally read the megillah; someone does on our behalf), but that doesn't work -- "al netilat (yadayim, lulav)" and "al achilat (matzah, maror)" are counter-examples. The difference also doesn't seem to be d'oraita versus d'rabbanan; both forms show up in both categories.


Is there significance, or in each case did the rabbis just choose between two equally-appropriate formulations and it doesn't mean anything more than that?



Answer



The Avudraham discusses this at length. He brings several different classification methods offered by different people. It seems that each classification method covers a large percentage of the cases, but there are some exceptions. The Abudraham then discusses some of the exceptions.





  1. First he brings the opinion of Rabbeinu Tam (brought in yydl's answer):




    • If the mitzvah is (completely) done right away, we say "Al". Some examples:



      • על אכילת מ צ ה .

      • על אכילת מ ר ו ר

      • על מקרא מגלה.





    • If the mitzvah requires some waiting before it is done (i.e. the single action does not complete the mitzvah), you say "L'". Some examples:



      • ‫‫לישב בסוכה‬

      • ‫ לשמוע קול שופר‬(There are pauses before it's done)

      • Hallel (You need to wait for people to respond)





    • Furthermore, Rabbeinu Tam offers another reason why Hallel is "L'Kro" and not "Al Mikrat Hallel" (or some variation). Any Mitzvah that is not a constant obligation you do not say "Al". Since we are commanded to say Hallel after surviving any calamity (as opposed to specific times) it is not considered a constant obligation.



      • The Abudraham does not like this answer, saying that this classification doesn't seem to have any logic behind it, and most of the reasons given for the exceptions seem a little weak. He also brings cases that contradict Rebbeinu Tam's classification system.






  2. Then he brings the Rambam (Berachot 11:15), who makes the following distinctions. The Rambam holds that the blessing may change depending on who is saying it:





    • If you (a) do the mitzvah for yourself and (b) it is an obligation, you say "L'", otherwise you say "Al". For example:



      • Circumcision

      • Making a fence around a roof




    • If you do those same Mitzvot as an emissary for someone else, you would say "Al





    • If you are doing a mitzvah for yourself and others:



      • If it is an optional Mitzvah, you say "Al" - e.g. Eiruv

      • If it is an obligatory mitzvah, you say "L'" - e.g. Shofar




    • If it is an optional mitzvah, you say "Al", whether you are doing it yourself or not. For example: Shechita





    • If the blessing precedes the action, you say "L'". The the action precedes the blessing you say "Al". For Example:



      • Since just picking up the Arba Minim fulfills your obligation, you say "Al Netilat Lulav". If you say the blessing before you pick up the Minim, you say "Litol Lulav"




    • (The Ra'avad questions the Rambam's classification. Among the distinctions he offers and ultimately rejects is the distinction between Rabinical and Biblical commandments. The Raavad also brings cases that don't conform to the Rambam's classification system)







  3. Abudraham the brings another opinion he does not name. It appears to be the Riva mentioned in @msh10's answer.



    • If the Mitzvah (a) can be done by proxy (shliach), and (b) will be done in the future (L'Habah) you say "Al"

    • If the Mitzvah (a) can not be done by proxy (shliach), and (b) will be done in the future (L'Habah) you say "L'"

    • If the Mitzvah (a) can be done by proxy (shliach), and (b) was done in the past (L'She'avar) you say "L'"


    • If the Mitzvah (a) can not be done by proxy (shliach), and (b) was done in the past (L'She'avar) you say "Al"





    • The exceptions are then discussed.








So, with regards to the Sukkot we say "Al Netilat Lulav", but say "Leisheiv BaSukkah":




  • According to Rabbienu Tam, the mitzvah of Lulav is over as soon as you pick up the lulav, but the mitzvah of sitting in a Sukkah extends.

  • According to the Rambam, both Sukkah and Lulav are Mitzvot you are personally obligated to do, but as soon as you pick up the Lulav you've fulfilled your obligation, so you say "Al Netilat Lulav", but if you say the blessing before you pick it up you say "LiTol Lulav"

  • According to the third opinion, you say "Leishev BaSukah" since the mitzvah can't be done by proxy and the main mitzvah is eating and drinking in the Sukkah, which is done after the blessing. The blessing on the Lulav on the other hand, is only done after you've already picked it up (thus fulfilling your obligation), and thus you say "Al Netilat Lulav"



water - Electrolysis of Beer


Electrolysis of water, means that the water is separated into hydrogen and oxygen. As beer also includes water, I initially thought electrolysis of beer would cause the water to separate, and the hydrogen and oxygen given off gas, leaving behind a higher concentrate alcohol.


However then realise that ethanol is also in beer (and is what makes you drunk it seems), and like water has an OH bond, so would the electrolysis also cause that to break?


(also does the rest of the molecule affect the strength of the OH bond, either stronger or weaker?)





grammar - より not used for comparing?


The title of a piano arrangement of a Touhou song (Hakurei Reimu's Theme) is:



「東方永夜抄 - Imperishable Night.」 より 博麗霊夢のテーム




(Question) What does より do in the title?


If it were to mean "from the game "Imperishable Night"", would から be just as suitable?



Answer



より as well as から means 'from'. This is the primary meaning. Many languages use the word corresponding to 'from' for introducing the standard for a comparative. It is the comparative usage that is the derived meaning.


word choice - What's the difference among [停]{と}める、[止]{と}める、 and [留]{と}める?



How are they different in meaning and usage? I also would like to see samples of how each can be used in a sentence.




halacha - What is the source that Parshas Parah is from the Torah?


I have read in many places that Parah could be a bliblical requirement to read.


Why is that? Zachor makes sense (as it says so in the Torah here). Why Parah?



Answer



The Beit Yosef in OC 685 quotes Tosfot who says that Parashiyot Zachor and Parah are Biblical requirements. However, our versions of Tosfot do not have anywhere that Parah is Biblical. The Mishna Berura OC 685 sk 15 writes that most Achronim agree that Parah is not a Biblical requirement. So we really don't know what source Tosfot had in mind (assuming the Beit Yosef's version didn't have a scribal error, which is possible).


EDIT: The Aruch HaShulchan (OC 685:7) suggests the following possibility for the source. In Parashat Parah the pasuk says (Numbers 19:10):




וְהָיְתָה לִבְנֵי יִשְׂרָאֵל וְלַגֵּר הַגָּר בְּתוֹכָם לְחֻקַּת עוֹלָם
...and it shall be unto the children of Israel, and unto the stranger that sojourneth among them, for a statute for ever.



The sifra derives from here that the ashes remain effective even nowadays without the Temple. However, later on the pasuk repeats (Numbers 19:21):



וְהָיְתָה לָהֶם לְחֻקַּת עוֹלָם
And it shall be a perpetual statute unto them.



The Aruch HaShulchan posits that this extra occurrence of the phrase comes to teach that one should be involved even without the ashes by learning these verses which we do by reading them publicly once a year.



Again, this is all speculation because we don't have an original derivation (as I explained above).


Step response overshoot in IIR filters


Is there an analytic expression by which it is possible to calculate overshoot of step-response of second order IIR digital filter? I have tried to search through Mitra's signal processing book and through some other materials, but wasn't able to find it.



Answer



For the general second order section (biquad)


$H(z) = \frac{b_0 + b_1 z^{-1} + b_2 z^{-2}}{1 + a_1 z^{-1} + a_2 z^{-2}} = b_0\frac{(1-qz^{-1})(1-\bar{q}^{-1}z^{-1})}{(1-pz^{-1})(1-\bar{p}^{-1}z^{-1})}$


with a pair of complex conjugate zeros ($q,\bar{q}, q=R_qe^{j\theta_q}$) and poles ($p,\bar{p}, p=R_pe^{j\theta_p}$) the step response $s(n)$, if put on this form


$s(n) = a_{\infty}(1+d(n))$


where $a_{\infty}$ is the steady-state response and $d(n)$ the transient response, is governed by


$a_{\infty} = \frac{1-2R_q\cos(\theta_q)+R_q^2}{1-2R_p\cos(\theta_p)+R_p^2}$


$d(n) = K(\lambda_1\sin(\theta_p[n+1]) + \lambda_{-1}\sin(\theta_p[n-1]) - \lambda_{2}\sin(\theta_p[n+2])-\lambda_{0}\sin(\theta_pn))$



with


$K = \frac{R_p^n}{\sin(\theta_p)(1-2R_q\cos(\theta_q) + R_q^2)}$


$\lambda_{-1} = R_q^2, \quad \lambda_{0} = 2R_qR_p\cos(\theta_q)+R_q^2R_p^{-1}, \quad \lambda_{1} = 2R_q\cos(\theta_q)+R_p^2, \quad \lambda_{2} = R_p$


If there are no zeros,


$\lambda_{-1} = 0, \quad \lambda_{0} = 0, \quad \lambda_{1} = R_p^2, \quad \lambda_{2} = R_p, \quad K=\frac{R_p^n}{\sin(\theta_p)}$


and the expression for $d(n)$ reduces to the expression provided in the other post.


If the independent variable $n$ is treated at continuous, the letter $t$ is used instead of $n$, then the value of $t$ that maximizes $d(t)$ can be found. It is given by


$t_{max} = \frac{1}{\theta_p}\left( \tan^{-1}(-\frac{\ln(R_p)\sin(\theta_p)(\lambda_1-\lambda_{-1}) - \lambda_2\ln(R_p)\sin(2\theta_p) + \lambda_1\theta_p\cos(\theta_p) + \lambda_{-1}\theta_p\cos(\theta_p)-\lambda_2\theta_p\cos(2\theta_p) - \lambda_0\theta_p}{\ln(R_p)\cos(\theta_p)(\lambda_1+\lambda_{-1}) - \lambda_2\ln(R_p)\cos(2\theta_p) - \lambda_1\theta_p\sin(\theta_p) + \lambda_{-1}\theta_p\sin(\theta_p)\lambda_2\theta_p\sin(2\theta_p) - \lambda_0\ln(R_p)}) - k\pi\right)$


The value of $t_{max}$ can then be rounded towards nearest integer and used in the response for $d(n)$. In the expression for $t_{max}$, the value of $k$ must be chosen such that $t_{max}$ is in range $0\leq t_{max} \leq \frac{\pi}{\theta_p}$ and it must be verified that $t_{max}$ is a maximum and not a minimum.


For the all pole case this plot illustrates the maximum overshoot as function of pole radius and angle.



enter image description here


Monday, November 27, 2017

halacha - What constitutes a shinui?


I was recently taught the concept of a shinui to be "something done in a way that is unusual compared to the norm in one's area of residence", with respect to the permissibility of actions done on Shabbat and Yom Tov.


My question is "what constitutes the norm"? What if 51% of people do something one way and 49% of people do it another way? Furthermore, what constitutes one's "area of residence" in this matter? Is one's "area of residence" confined to one's home, neighborhood, city, country, state, continent, planet?




reading comprehension - What does 斜めに流すこと mean?


I have problems with understanding a particular line from a Japanese novel and need some help. The scene is about a little girl practicing her sword skills with her father. Just before the line I had problem with, the girl was parrying a diagonal slash from her father (対敵の振り下ろす袈裟切りの一刀に立ち向かう).



Then comes this line: 成長途上の体で受けきるには荷が勝ちすぎる一撃を、しかし少女は全身のバネを駆使して斜めに流すことによって凌ぎ切った。


My problem is identifying what 「斜めに流すこと」 is referring to?




  1. Is it referring to the diagonal slash? (that is to say, 'as a result of the slash being diagonal, the girl was able to deftly use the elasticity of her whole body to stop it')




  2. Or is it referring to the stance the girl is taking?





My current belief is (1), but I'm not sure.


Thanks in advance.




beit din court - History of Capital Punishment


When is the most recent documented occurrence in Jewish history of a beit din carrying out the death penalty? Or if historical documentation is lacking, when is the most recent time in Jewish history that capital punishment could plausibly have occurred? Also, are there perhaps more recent times when a beit din gave a death sentence but did not have the ability to carry it out?


Note: The execution of Adolf Eichmann does not count for this question, as this was not a religious court.



Answer



Technically, jutky is correct: once the Great Sanhedrin moved out of their office in the Beis Hamikdash, forty years before it was destroyed, capital punishment was no longer carried out. (Shabbos 15a, et al)


That said, we do find sporadic cases where a beis din executed someone judicially in later times. One is in Sanhedrin 52b, where a kohen's daughter who committed adultery was executed by burning (as per Lev. 21:9), though Rav Yosef there points out that this was in fact the wrong thing to do.


The Rosh, in his responsa (17:8), discusses a case where the beis din of Cordova wanted to execute someone for blaspheming G-d, and asked him whether this was the correct thing to do. He writes:



הפלאתם לשאלני בדיני נפשות כי בכל הארצות ששמעתי עליהם אין דנין דיני נפשות לולי פה בארץ ספרד ותמהתי מאד בבאי הלום איך היו דנין דיני נפשות בלא סנהדרין ואמרו לי כי הורמנא דמלכא הוא. וגם העדה שופטים להציל כי כמה דמים היו נשפכים יותר אם היו נדונים ע"י גוים והנחתי להם כמנהג' אבל מעולם לא הסכמתי עמהם על איבוד נפש


"You surprise me by asking about a capital case. In all of the countries that I have heard of they do not judge capital cases, except here in Spain. When I arrived here I was most astonished how they could judge such cases without a Sanhedrin; I was told that this is by permission of the king, and also that the beis din's judgment saves lives, since much more blood would be spilled were they [Jews accused of crimes] to be judged by non-Jews. So I allowed them to continue their custom; but I have never agreed with them about taking life."




Though in this case he tells them that because of the severity of the sin - indeed, the non-Jewish authorities also treated such actions harshly - they could go ahead and do whatever they see fit (his own recommendation was to remove the fellow's tongue).


The testimony mentioned in this responsum is dated "Sunday, 16 Adar, 1358 according to the non-Jewish count" - which I believe refers to the Spanish Era, since the Rosh was no longer living in 1358 CE. This would place the event in 1321. So we see that at least as late as that date, batei din in Spain were carrying out judicial executions.


halacha - How should an employer respond to a government policy requiring abortion coverage?


There is a recent controversy in the United States regarding whether the Federal government can compel employers, including religious employers, to pay for contraception. Although this may not be objectionable to most religious Jews, who do not consider contraception to be equivalent to abortion, Catholics (who do consider it to be abortion) have objected to the new law rather vociferously.


What if some future policy would require employers to pay for actual abortions, by whatever definition would be considered as prohibited halachically?


How would a religious Jewish employer be required, by Jewish law, to respond to such a law? Is it permissible to subsidize someone else's transgression of such a grave prohibition? If such a law were to come into effect, would a Jewish school be required to either violate the law or shut down the school?



Answer



An employer is paying the premiums on an employee's insurance policy, which will then pay the medical expenses incurred by the employee committing a halachically-unacceptable act. With respect to "Lifnei Iver" or "placing a stumbling block before the blind," there are multiple mitigating factors:



  1. The prohibited act may never happen. The employee may never need to get an abortion.

  2. Even if the insurance policy didn't cover it, the employee may have paid for the abortion herself (see A"Z 6b re: "two sides of the river").

  3. If the employer wouldn't pay for the premiums, the employee can still obtain employment by another employer who will pay for it.


  4. It is "lifnei dLifnei," or it is causing one to stumble by causing another to stumble. This is not prohibited by Lifnei Iver (see A"Z 14a, and Tos. A"Z 15b).


With respect to "mesaya" or "facilitating sin", consider the payment of wages themselves. Say the employer knows that the employee will use the money for illicit acts. May the employer pay her wages? It doesn't seem logical that this should be considered "facilitating sin". It is too indirect.


halacha - Designating Muktzeh items before Shabbos/Shabbat for personal use


Can one designate any normally muktzeh item for Shabbat/Shabbos or Yom Tov personal use, like rocks, animals, etc, thus making it not muktzeh?


The question essentially is: can one avoid the prohibition of muktzeh through the legal loophole of designating items for actual use, even in cases where all opinions hold it is the highest level of muktzeh or even in a case where the Rabbis made a "lo plug" prohibition on a particular case of muktzeh (e.g. animals according to some Rishonim).




death - Is there a source that the Messiah can die and return?


Is there a source in Judaism that indicates that Moshiach (Ben David, not Ben Yosef) will die before having fulfilled his role and then return to posthumously achieve it?




gentiles - V'ahavta l're'eicha kamocha -- re'eicha velo akum?



Do any rabbinical sources hold that the commandment in Leviticus 19:18 to love one's neighbour as oneself (ואהבת לרעך כמוך) applies to non-Jews as well as Jews?



Answer



Although the term רעך (your fellow/neighbor, friend) is generally understood as applying strictly to one's fellow Jew, R' David Sears brings a number of sources related to loving every one, including one which see a broader application of this verse in his book Compassion for Humanity in the Jewish Tradition:



Love for one's neighbor means that we should love all people no matter to which nation they belong or what language they speak. For all men are created in the Divine image and all engage in improving civilization...Our love of humanity should take no exception to any nation or individual....Therefore, not only does [love of one's fellow] apply to the Jewish people but to all mankind. We should love all nations and include all peoples in this universal principle, "the stranger and the native son" alike, all who inhabit the earth. Let every man strive for the benefit of his fellow, in a spirit of mutuality, whether in physical concerns or in financial matters, for the collective good and for the improvement of society. Loving one's neighbor means that we should befriend all human beings. (Rabbi Pinchas Eliyahu of Vilna, Sefer HaBris, sect. II, discourse 13)."(page 6 and 7)



He subsequently relates a story about Rabbi Pinchas of Koretz who was very pleased when presented with a sefer teaching this idea, presumably the aforementioned Sefer HaBris.


grammar - Meaning of verb-てまで


I've seen from this link and other sources that verb-てまで means "to the point of verb" or "to the extent of verb". But I can't make this work in the phrase below.



必死で努力してまでほめられるの...


being praised to the point of being frantic and making effort.




From the context I think it should be talking about being frantic and making effort so that he can get praise.


Is there another interpretation of verb-てまで that makes more sense here?



Answer



To approach it from a different angle, it may be useful to know that 〜してまで is about weighing the worth of actions. Often the whole construct is negated, meaning that Y is not worth X:



[X してまで Y する] 〜ない
Y is not worth doing X






Breakdown: Negated example



お金を払ってまで食べようとは思わない
I don't feel like eating it to the extent of paying money.



You're actually weighing two things, and saying that 食べる is not worth お金を払う:



[お金を払う してまで 食べる] 〜ようとは思わない






Breakdown: Non-negated example



命をかけてまで助けてくれた
They saved me, to the point of risking their life.



Here, the rescuer weighed the two things, and decided that 助ける was worth 命をかける:



[命をかける してまで 助ける] 〜してくれた






必死で努力してまでほめられる


I'm not sure about the context of the ellipsis in your example, but even from that stub you can parse the overall sentiment as:



ほめられる is not worth 必死で努力する



The ellipsis could signify a question (Is getting praise worth making a frantic effort…?), or disapproval (Wow, making a frantic effort for praise…). Or it could actually be a non-negated statement, like “必死で努力してまでほめられるのが好き!” (I like getting praise so much that it is worth a frantic effort!).


word choice - Is there a difference between ほんとう (hontō) and ほんと うに (hontō-ni) when used alone as interjection or question?


As the equivalent of Enlgish "Oh really?" / "Yes really." as lone utterances I seem to hear both "本当" (hontō) and "本当に" (hontō-ni) in Japanese - is there a difference?


It seems that hontō is a noun and -ni changes it into an adverb but that this doesn't really matter for the purpose of such simple utterances. Am I thinking along the right lines?



Answer



There is no difference in utterances for both words, if you speak those alone.


But if you add some words after that, you might need to use "本当に~" to get correct grammar.


time - Eternal Gehinom



The talmud in Rosh Hashana 17a lists some sins which warrant eternal gehinom.


Is this to be taken literally? Or perhaps it means a very long time or until the end of this world?




Sunday, November 26, 2017

physical chemistry - How can two electrons lie together in an orbital?


Two electron of opposite spin can lie in a single orbital.. But what about the electron-electron repulsion. Okay! I got that the nuclear charge rather the large Z-effective overcome this repulsion by pulling them together towards the nucleus.


One thing more turned out in mind that it may be the attraction of the two unlike pole of the magnet developed due to opposite spin of the electrons of an orbital, which may be reason for the two opposite spin electron lying in an orbital..


Am I right ?




When you combine adjectives with the て-form does it imply a relationship between them?


For example, if I said...



きれいで静かな町




Does that mean there's a relationship between きれい and 静か (like the relationship that happens when you combine two verbs with the て-form)? Or do the two adjectives work totally separately like in english (a tall, serious man)?



Answer



Yes, the two work separately. There is no relationship between them. When you combine adjectives with the て-form, you are just linking them, so the meaning is "beautiful and quiet town".


Hydrogen as a fuel really worth it?


Is hydrogen good to be used in cars? How much of traveling can a car do with medium sized balloon filled with hydrogen? Is it worth it?



Answer



Hydrogen escapes from vessels more readily than just about any other gas. All of the schemes to store hydrogen seem unwieldy. High pressure, low temperature, or hydrides. I've seen NH3-BH3 proposed as a way to store hydrogen. A good way to store hydrogen might be methanol.


Generating the hydrogen takes energy in the first place which factors in to the question of whether or not it is worth it.


grammar - What makes に基づいて instead of に応じて the correct choice for this question?



I'm working on some example questions from my grammar textbook. One of them I listed below:



 税金はこの表(  )計算されています。


 ア)につれて イ)に応じて ウ)に比べて エ)に基づいて



I'm unsure why 「に基づいて」is the only correct answer. What is the reason that 「に応じて」is inappropriate?



Answer



に応じて means "in response to", "being adopted to", "proportional to (in the non-technical sense)", and does not fit the expected meaning. に基づいて means " based on", and fits the meaning.


equilibrium - How to calculate the equivalent mass of Na2S2O3?



Let us consider the following reaction


$$\ce{I2 + 2 Na2S2O3 -> 2 NaI + Na2S4O6}$$


Now, in order to calculate the equivalent mass of $\ce{Na2S2O3}$, first I need to calculate it's $n$-factor which turns out to be $0.5$ because the oxidation state of $\ce{S}$ in $\ce{Na2S2O3}$ is $+2$ whereas in $\ce{Na2S4O6}$ it is $+2.5$.And the $n$-factor of $\ce{I2}$ is $1$. So, the equivalent mass of $\ce{Na2S2O3}$ is


$$\frac{\text{molecular mass}}{0.5}$$ And Iam confused with the following half-reactions: $$\ce{I2 +2e->2I-}$$ $$\ce{2S2O3^{2-}->S4O6^{2-} +2e}$$ I appreciate any help in order to solve a problem using milliequivalents?





physical chemistry - Significance of Temperature in Gibbs Free Energy


Why is it important to know the temperature of both reactants and products of a reaction in order to determine change in the Gibbs free energy of the reaction?


Is it because temperature has an effect on both enthalpy and entropy? Or is it because of some other reason I am missing?


Any help on this would be great. Thanks!



Answer



Change in the Gibbs free energy ($\Delta$$\ce{G}$) of a reaction at any temperature can be determined by the equation <$$\ce{$\Delta$G = $\Delta$G^0 + RTlnQ_c (Q_p if the reactants and products are gaseous)}$$ Here, $\Delta$$\ce{G^0}$ is the standard Gibbs-free energy change of the reaction which is determined by,$$\ce{$\Delta$G^0 = $\Sigma$a_iG^0_i_{products} - $\Sigma$b_iG^0_i_{reactants}}$$ where $\ce{a_i}$s and $\ce{b_i}$s are proper stoichiometric coefficients. Now, $\ce{G^0}$ of products or reactants are determined by producing 1 mole of ech of them from their corresponding constituting elements in their standard states and at a FIXED TEMPERATURE(generally at $\ce{298.15K}$). So, $\ce{$\Delta$G^0}$ is determined also at that particular temperature,So, it is independent of Temperature.
But,when we have to calculate $\ce{$\Delta$G}$ for any reaction at any temperature($T$) by the above given relationship , we have to know the temperature of the reaction condition as you can see clearly, $\ce{$\Delta$G}$ is directly dependent on $\ce T$.

That's why, it's important to know the temperature.


Saturday, November 25, 2017

physical chemistry - Why can't helium be solidified at 'ordinary' pressures?


According to the UC Davis ChemWiki Chemistry of Helium, helium has a comparatively unusual property, specifically:



Helium is the only element that cannot be solidified by lowering the temperature at ordinary pressures.



'Ordinary' referring to standard air pressure (1 atmosphere). In order to solidify, there needs to be a corresponding pressure increase, with a projected density of:




$0.187 \pm 0.009~\mathrm{g~mL^{-1}}$ at $0~\mathrm{K}$ and $25~\mathrm{bar}$.



So why can't helium be solidified at 'ordinary' pressures?



Answer



When the temperature of helium gas is decreased to about 5.2 K, a phase transition to ordinary liquid helium ($\ce{He}$ I) occurs. The behavior of this liquid phase is normal and identical to any other liquid phase.


As temperature is decreased more (at moderate pressures), helium does not solidify. In fact, it undergoes a phase change to a second liquid phase known as $\ce{He}$ II at a temperature of approximately 2.17 K. As shown in the phase diagram below, the $\ce{He}$ II phase persists until absolute zero. Due to quantum effects, $\ce{He}$ II has remarkably unique properties. It is considered a superfluid.


enter image description here


For more details, please click here. Pressure is required to produce solid helium (25 atmospheres or more), because of the small mass and extremely weak forces between the helium atoms.


words - Can 連れていく be used with someone with a higher social status?



Every dictionary I've found says that 連れていく{つれていく} should only be used to mean leading someone of a lower social status. While my research and experience has found this to be true in most cases, I've found a few sentences that seem to break this rule, particularly someone bringing their parents to either a vacation or the hospital. For example:



両親を旅行に連れていく
親を病院に連れていく



My theory is that it actually applies to anyone of a lower social status or anyone in your social circle- someone that you're familiar with. But I can't figure it out, because it's actually kind of hard to find any examples of bringing anyone of a higher social status, like your boss, somewhere.


Is it correct to say that this verb can only be used to bring those of a lower social status? If it is, why are the above examples correct?



Answer



As far as honorific speech is concerned, your own parents are not any higher than yourself in status. You treat them as your equals when speaking to a third party. If you have been taught otherwise somewhere, it is indeed unfortunate. That is why you must say 「[親]{おや}を~~に[連]{つ}れていく」, instead of saying it using a "better" verb that will be introduced below.


If, however, you are taking another person's parents (outside of your family), your teacher, your customer, etc. to a place, then you will use 「~~を~~にお連れする」. Using 「連れていく」 in these cases will make one a very poor keigo-user (and in the business world, you will be called out).



Point is it does not matter how much you personally respect and admire your parents. That is your business and it is cool. You just do not elevate them as objects of respect when speaking to a third party about them in keigo. This is extremely important and is surely a weak point for many Japanese-learners.



「[両親]{りょうしん}を[旅行]{りょこう}に連れていく」


「親を[病院]{びょういん}に連れていく」



Both phrases above are perfect (because the speakers are not elevating their parents in status).


Again, you should never, ever replace 「連れていく」 by 「お連れする」 in the phrases above. That would be "trying to" speak politely and failing miserably. "Comical" is how that would sound to native speakers.


「連れていく」 is for people lower or equal in status, not just lower as you stated. Your family members are your equals in the keigo world.


「お連れする」 is for people higher in status. In reality, however, the politer speakers use it even when talking about taking a stranger somewhere if the stranger is not way younger than themselves. But they sure will not use it for their parents or grand-parents because they know they should not.


Why is the 2s orbital lower in energy than the 2p orbital when the electrons in 2s are usually farther from the nucleus?


Diagram of P orbital vs. S orbital distance from nucleus


My chemistry book explains that even though electrons in the $\mathrm{2p}$ orbital are closer to the nucleus on average, electrons from the $\mathrm{2s}$ orbital spend a very short time very close to the nucleus (penetration), so it has a lower energy. Why does this tiny amount of time spent close to the nucleus make such a big difference? It seems like it should be the average distance that matters, not the smallest distance achieved at any one point, in determining stability. What makes that momentary drop in energy so important that it is outweighs all the time spent farther away from the nucleus with a higher energy?




halacha - Is it ok for spouses to touch in public?


Are spouses allowed to touch one another in public (when the wife is not a niddah) or is this a violation of tzniut? I am asking specifically regarding touch that is not in any way sexual or even affectionate.



Answer



BS"D



According to RaMBaM one should speak as little as possible to ones wife in public under the bounds of modest behavior, and from what I have learned, corresponding with my Mori's as well as students of Rav QafiH, it is not far off to render if speaking is to be avoided so, too, is touching.


"The guiding rule is that he should speak only words of wisdom or in connection with acts of kindness and the like. He should not speak to a woman in the marketplace, even if she be his wife, or his sister, or his daughter." Hilkhoth De'oth 5:13 (7 in the Vilna)


This should be obvious but this also indicates a conduct non-sexual in nature, due to the examples given of one's sister and daughter. But as far an actual statement in halakha that says one may not on the grounds of ssniuth, I know of none. Seems it would be a stringency fitting of a talmid hhakham.


orthography - Is the "wa-particle" in katakana ワ or ハ?


Is the "wa-particle" in katakana ワ or ハ?


(Just a quick question - I think I have seen both used, but if ワ is correct then I have just seen the results of a computer o/p automatically using ハ)



Answer



ハ for the topic particle. There's no difference from hiragana.


grammar - Missing particle after など in article about new technologies to monitor employees


I'm reading this article about new technologies that are getting introduced to monitor employees.


I am unsure about the following sentence. I do not understand why there isn't a particle or something like it between the など and the 230. Is this a typo or what is intended here?



ソフトウェアをつくっている会社など230の会社が新しい技術を紹介しています


My Translation: 230 companies are introducing new technologies, where these companies and similar places are producing software





Answer



In Nominal apposition in Japanese (2004), Rumiko Sode calls this など an "exemplifier", and considers this construction a type of apposition in which one noun phrase restates a subset of another.


Basically, you've got two noun phrases next to each other:



N1などN2



Which expresses that N1 is included within N2. In other words, N1 is a restatement of part of N2. It could be translated in various ways depending on context. For example:



秋田犬など大型犬に最近人気がある。

Recently, Akitas and other large-breed dogs are becoming popular.



Here, 大型犬 includes 秋田犬 as a subset or an example, and the noun phrases are linked together by など. Nothing is missing between them.


Likewise, in your example:



ソフトウェアをつくっている会社など230の会社が新しい技術を紹介しています。



The larger set is 230の会社, and ソフトウェアをつくっている会社 is some subset of those 230 companies.


halacha - Can a Jew buy non-kosher food for a gentile?


If a Jew is entertaining non-Jews in a business setting is he allowed to buy them non-kosher food in a non-kosher restaurant?




everyday chemistry - Is it safe to store muriatic acid, hydrogen peroxide and acetone?


I am recently getting into PCB etching. So I use 10 M HCL solution, 3% hydrogen peroxide mixed in 1:1 ratio for my etchent. Currently, I am storing my HCL and hydrogen peroxide in my shed which can vary in temperature from -10 degrees Celsius to 25 degrees Celsius. The shed is outside my house. I also store my etchent next to HCL and hydrogen peroxide in the shed as well. Will it be safe to store all of these three chemicals inside a shed?


I do have metal tools in there but I don't care if it rusts. I am just afraid of hydrogen gas that might form because of HCL fumes. Also, I store my acetone indoor inside a plastic container because I heard that its flash point is -20 degrees Celsius. I don't want it to spontaneously catch on fire if I did store it in the shed. So are these storing method adequate or do I need more precautions.




Friday, November 24, 2017

jewish books - Halacha of Shechita


Which Sefer or Sefarim is/are used in practical application of Shechita? General Halacha follows the שלחן ערוך, but does it in all areas?



Answer



In America, the custom is as the custom of Europe -- to use the sefer שמלה חדשה, written by Rabbi Alexander Sender Schor (1673-1737), even though on occasion he will disagree with the שלחן ערוך. Rabbi Schor also wrote תבואת שור (an explanation to Simlah Chadasha) and בכור שור, a commentary on Shas.


(see מטה אשר [commentary to שמלה חדשה] in 1:4, especially what he quotes from the דרכי תשובה)


I had heard that the custom in Israel is to use the בית דוד, though some commenters on this answer had heard otherwise.


stroke order - Is there an "official" font or other writing standard that should be used when teaching kanji?


I'm working on an Android app that will help people learn Japanese kanji using a flash-card style study system. As part of this app, I need to show kanji on the screen both in plain-text form, and also possibly animations of the stroke order.


The problem is that the default system font used in Android, Roboto, doesn't look much like handwritten Japanese. It is very square, and lacks the "hooks" and variations in thickness that I usually see in handwritten kanji. Not only that, but there are some kanji in the font that are drawn in what I am told is a Chinese variant of the writing, that might not reflect the way the kanji is drawn in Japan.


So, I'd like to use a different font in my app to produce the flash cards and animations. The question is: which one? There are a number of fonts on my PC that I could potentially use (for example SimSun, Yu Mincho, or Kozuka), but I'm not sure which of them, if any, would be best. I was wondering, does the Japanese government or education system provide any guidelines or official standards that apply to what fonts should be used when teaching kanji? If so, do you know where I can find them? If not, is there a font you would recommend as a good foundation for learning kanji?



Answer



The font you're looking for is 教科書体【きょうかしょたい】. It is based on how people handwrite kanji.


Textbooks for elementary school students are printed with this font family. After graduating from elementary schools, 明朝体 is primarily used.


The following article explains why 教科書体 is better than 明朝 or ゴシック family, for learners.



http://www.mitsumura-tosho.co.jp/kyokasyo/syogaku/kokugo/qanda/number/02.asp


Thursday, November 23, 2017

tefilla - Cut-off birkat hamazon


As a complement to this question on Shortened Birkat Hamazon, I would like to better understand the practice I saw of stopping Birkat Hamazon after the fourth blessing on Shabbat and not saying the Harachamans and the closing text.


I believe it comes from the idea one should not make specific asks on Shabbat although others are saying that asks as part of an organized prayer are all right.



  • Where is this custom coming from?

  • How widepread is it?

  • Are there communities where it is the norm and rabbanim supporting it?




colloquial language - Is 「やってもた」 the same as 「やってしまった」? What is the grammatical rule behind this?



I have recently seen 「やってもた」 used in a Japanese conversation, I don't remember the context exactly, but it was something like:



久々にやってもた。



After asking my Japanese friend, it turns out to be some kind of Osaka-ben expression used instead of 「やってしまった」, where the 「も」 stands for 「しまう」. My friend couldn't give me another use of this so I'm here asking two questions:




  1. Is my explanation of 「やってもた」 accurate?





  2. Can we extract from this example a generic grammatical rule that can be applied to most situation?




I seek to learn Osaka-ben and I'm trying to replace my old habits, so I would be very grateful if you can provide some external resources about this or at least mention your sources.



Answer



1) It is "やってもうた" or "やってしもた".
2) The form "もうた" or "しもた" are shortened forms of "しもうた". The (auxiliary) verb "しまう" has a stem ending with the glide "w": "simaw-", and underwent different developments in Kansai and Kantoo regarding inflection. In Kantoo, the "w" was interpreted as a consonant, and was used to trigger gemination (a.k.a. [促]{そく}[音]{おん}[便]{びん}) in past tense:



simaw-ta → simatta




On the other hand, in Kansai, the "w" (back glide) was turned into "u" (high back vowel), and then underwent further change of vowels (k.a. ウ音便):



simaw-ta → simauta → simouta



If you are expecting external materials on these sound changes, you may want to study about ウ音便 and 促音便.


PTIJ: Perl Programming in the Torah




According to Rav xkcd (an oft quoted authority in Bam), the universe was written in perl. Since the Torah is the blueprint of creation, it follows that it must contain a Perl Programming manual. Where is it?






Answer



Other sources (alluded to in the first three panels) suggest Lisp is the language of the universe, but those must be dismissed as defaming the Creator:



How sweet are Your words to my palate,
more than honey to my mouth!
Psalm 119:103




No, the language of the universe is not spoken with a speech impediment nor does it require counting parentheses.


Hashem looked into the Torah and created the universe. Therefore, the language of the universe is the Tanakh.



Tanakh is an acronym of the first Hebrew letter of each of the Masoretic Text's three traditional subdivisions: Torah ("Teaching", also known as the Five Books of Moses), Nevi'im ("Prophets") and Ketuvim ("Writings")—hence TaNaKh.



What are those three divisions in English?



  • Prophets

  • Writings (or Readings)

  • Law



Adding a vowel we get:



PeRL



Therefore: Perl == Tanakh == the language of creation.


kibbud av veim honoring - Honor parents who want you to violate halacha?


Suppose a parent feels very strongly against a certain aspect of halacha, for whatever reason. What would be an appropriate way to follow halacha while maintaining kibbud av v'eim?



Answer



I'm going to echo Menachem's answer but go one step further. I have learned on many occasions that it isn't that one is required to follow Halachah despite the apparent conflict with Kibbud Av VaEim. It is, rather, that there is no Kibbud in this case. In other words, it's not a conflict. The instant that a parent's desires rise to conflict with a point of Halachah, the requirement for Kibbud falls away.


Having said that, I understand your desire not to upset your parents in any case, and my advice would be to explain to them that [Halachah X] is just what we do, and that you hope they will respect your choices.


digital communications - Understanding the Matched Filter

I have a question about matched filtering. Does the matched filter maximise the SNR at the moment of decision only? As far as I understand, ...