Pinning down why the Pi won't boot

Question: As a new user, I have followed the instructions with my kit and after installing Raspbian from a pre-loaded card the Pi shut down. I reformatted the card as per instructions on the Raspberry Pi site and redownloaded the OS. That installation went well but won't reboot.
Have no idea what is wrong, what I may be doing wrong, or whether  the thing is borked. HDMI monitor was functioning during the install process.
Red LED on constant
Green LED flickers 3 times sometimes, stays on sometimes and refuses to glow at all sometimes. So it's hard as a newbie to work out.
Comment: Most problems seem to be poor power supply. Try the suggestions in http://elinux.org/R-Pi_Troubleshooting#Power_.2F_Start-up
Comment: I totally agree with you that boot process is pretty much silent and very hard to debug... It took me a bit to figure out that without SD card with fat32 boot partition, my screen doesn't even start to tell me "no OS found" (I thought cable is corrupt) or some description of what is wrong. It may be something else than power supply, just raspberry isn't very descriptive when it comes to boot issues... I was myself having troubles with SD card (random IO errors and kernel panics) and got it fixed when I instead installed raspbian to USB disk
Answer: I've seen too many people here with problems like this, who claim to be doing everything right, and still their new pi won't boot or won't boot consistently and perhaps even randomly corrupts the SD card. I don't believe they are all fools or liars.  There are apparently 40,000 pis a week being made, and we get a question like this at least once every week or so, I think.
A while ago I ran across this thread, where someone claims:

Recently I purchased a Raspberry board labeled Made in China and I
  have already one board labeled Made in UK. [...] My old SD card
  image used for Raspberry Pi is not working with the new one.

If a card works in one rev. A pi but not in another, the second pi is broken.  Of course, it could be faulty anyway, even if it is made in the UK.  The Chinese ones (which are no longer being produced) have a black headphone jack, the UK ones are powder blue.
There is so much material already online about creating and using the SD card -- and it is very simple -- I do not see a point in repeating it here.  If it doesn't work, it doesn't work.
You could obviously try another SD card to rule that out, etc.  The way I would deal with this, if you decide it is the pi, and you can afford the $50, is to order another one, possibly from a distributor that only does the British ones (Farnell/Element 14).  If you can't get either of them to work, either you are really unlucky or doing something wrong.  But if one works and the other doesn't, you have a pretty good claim to send one of them back.
Comment: I guess it depends where you got the card.  If you are in doubt about it, put it into another linux system and run `e2fsck` on the second partition and `fsck -t vfat` on the first one. If that works, the card is fine.  WRT HDMI, it's never been a problem for me (using either a Samsung TV or a Philips monitor).  The pi is a great little device, but I imagine getting a bum one is very off-putting.
Comment: Re, moving production to the UK indicated a problem in China: Normally, I'd agree but I seem to recall that the Raspberry Pi Foundation always intended to manufacture in the UK (for altruistic reasons around kick-starting the UK tech industry) but was unable to meet its price point with UK production in the early days. Now that there are so many more RasPis, the volume allows for costs to drop and production to move to Wales (not England!)
Comment: I can confirm that it's a UK model but the 'Raspberry Pi PSU' is made in China. Added to all this woe is that I've also read that 30% of all Sandisk SD cards are fake and that the Pi is fussy about the HDMI it runs. I don't have access to a multimeter to test the voltage, nor another monitor, nor a spare SD card at present. Luckily this is a project not something I would depend on.
Comment: +1 for interesting discovery about where they are being made, why and when they moved etc...
Comment: BTW my Pi is made in UK and I am having some troubles with SD card as well, but no so big that it would "damage the card" or something, just random kernel IO errors, might be even kernel problem
Comment: @MarkWilson You're right, that was a bit frivolous.  I've removed a few paragraphs.
Answer: Thanks for the replies. It turns out I was doing everything right. I borrowed a known working Pi and everything about my setup worked fine, leads, power, card, wifi etc.....
After sending it back to the suppliers twice and getting back without any appreciable difference I went for the faulty goods route and was refunded.
I've since bought from another supplier and the new one works.........just as expected.
So, in summary, it wasn't me, it was bad Pi.
Onwards and upwards
Answer: Your Raspberry Pi might not broken. Sometimes they have problems with SD Cards or in my case a problem with a µSD adapter (in my case Samsung). Also saw one adapter with the raspberry logo on it won't boot.
Best thing to try is to borrow some SD cards to try the newest RPi image. If all the cards do not work (please use a freshly downloaded image) it might have some other problems such as a weak power adapter (try 1A at least) or USB devices leech too much power.
Comment: I had this problem. A microSD adapter worked with with my Mac but not with the pi. A different one worked with my pi but not my Mac.
Answer: i do suggest it is a hardware problem, because there is no fix in software until now. please see http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=57125&start=225 in addition. furthermore, similar (hard to distinguish) problems can be observed with SDHC cards and over/underclocking, please see http://elinux.org/index.php?title=RPiconfig&section=14|SD#SD_Card_Usage_with_Overclocking.
personally, i have one model A (no "made in china" signing) showing the "runs only NOOBS for a few boots" issue while three B models are working flawlessly. i tried all the known and esoteric approaches to get the A one fixed without being lucky so far.
Answer: Hi I had the same problem and was due to a FAULTY POWER SUPPLY delivering more voltage than necessary.
Sorry for my poor English.

Pinning down why the Pi won't boot


Identifying the number of bonding and lone pairs without a dot and cross diagram

Question: I've just learned how to predict the shapes of molecules in class today using VSEPR theory.
I would like to ask is there anyway to find the number of bond pairs and lone pairs without drawing a dot-and-cross diagram?
Comment: I assume you're using VSEPR theory to predict the shapes?
Comment: Yeap. I'm using VSEPR @bon
Comment: @Mathxx  number of bond pairs and lone pairs for atom, molecule or what? Also drawing a dot-and-cross diagram is only for very basic training imo, it's not a real tool or sth imo
Answer: There is a simple, four-step calculation that you can perform:

count the valence electrons the atoms you are bonding have.
count the number of valence electrons the atoms would like to have for a noble gas' valence shell. (i.e. eight for everything main group, two for hydrogen.)
substract $2.-1.$, i.e. the first (existing) from the second (desired). This is your number of bonding electrons. Divide by two for bonding electron pairs.
substract $1.-3.$, i.e. the third (bonding) from the first (existing). This is your number of free electrons. Divide by two for lone pairs.

Using a simple example such as sulphur dioxide:

$6\ (\ce{S}) + 2 \cdot 6\ (\ce{2 O}) = 18$
$8\ (\ce{S}) + 2 \cdot 8\ (\ce{2 O}) = 24$
$24 - 18 = 6$, i.e. three bonding electron pairs.
$18 - 6 = 12$ i.e. six lone pairs.

Unfortunately, that by itself does not allow you to write the structure; you need to know which element is in the centre and how they are connected. Here, we have a central sulphur bonded to two oxygens. The final result is:
$$\ce{O=S+-O-}$$
With two lone pairs on the left-hand oxygen, one on the sulphur and three on the right hand oxygen. The formal charges are important.
Answer:
Let the number of total valence electrons, including charges (ions) be ($V$).
The number of total electrons required to complete octet/duplet is given by ($T$) = $(2 × \ number \ of \ H \ atoms) + (8 × \ number \ of \ other \ atoms)$
The number of bonding electrons is given by $B = (T-V)$
The number of bonds  is given by =  $\dfrac{B}{2}$ $=$ $\dfrac{(T−V)}{2}$
The number of unshared electrons is given by $N = (V – B)$
The number of lone pairs is given by = $\dfrac{N}{2} = \dfrac{(V – B)}{2}  $
Answer: There is a very simple way to do it, but it is not recommended at all.
Also there are a lot of assumptions in this method.

Detect the central atom along with the peripheral atoms.
For Example:- In Methane, the Carbon atom is the central atom.

Count the valance electrons of the central atom and the peripheral atoms.
Exception: For Hydrogen , using "1" won't yield results. So specifically for Hydrogen use "7". This is one of the assumptions we have to make.

Divide the above value obtained by 8. The quotient gives the value of the number of sigma bond pairs and the remainder divided by 2 gives the number of lone pairs.

Explanation:
The number of valance electrons counted divided by 8 will give the number of sigma bonds formed. This is just like counting the number of atoms which are getting complete octets, i.e. forming sigma bonds to get octet complete and becoming stable. The remainder is the no. of non bonded electrons, which when divided by 2 gives the number of lone pairs.
Example:
In Sulfur tetrafluoride:
Number of Valence electrons$$1\times(6)+4\times(7)=34$$
No. Of Bond Pairs$$\frac{34}{8}=4$$
No. Of Lone Pairs$$\frac{34\%8}{2}=1$$
To be very clear, this method is not fool proof. It is just a workaround to save time if you do not want to make the structures as it works on majority of compounds.


How to revive a stored car?

Question: A 2010 Corolla was sitting idle for a year; before that it was running fine. Naturally, the battery is dead. What should I do, besides replacing battery and washing the spider webs off? Also, can I jump start and drive to the mechanic on a dead battery?
Comment: If it had no major problems before, jumping the battery should be the only thing you need to do to get it running. Maybe change the oil as it might decompose over time. Maybe check the tires for flat spots and dry cracks
Comment: Depending upon how crufty the interior got during its year in time-out, you may want to hire a detailer to give it a good, solid cleaning.
Answer: Mechanically it's probably fine, other than checking the fluids and maybe pouring some fresh fuel into the tank replacing the battery is likely all you have to do, other than giving it a really good inspection to make sure there aren't animals nesting in it somewhere.

How to revive a stored car?


How to install the mullvard VPN on ubuntu

Question: Those are the steps to install MUllvard open vpn

1- Using NetworkManager on Ubuntu 16.04 or newer
2- Open a terminal and issue sudo apt-get install openvpn network-manager-openvpn network-manager-openvpn-gnome.
3- In a browser, navigate to our Configuration files page.
4- Fill out the form. Under Platform, Android needs to be selected.
5-Click Download to save the configuration file.
6-Click on the Network icon.
7-Click on VPN-Connections > Configure VPN.
8-Click on Add.
9-Select Import a saved vpn configuration.
10-Navigate to where you saved the downloaded file, select it and then click open.
11-In the user name field, enter your Mullvad account number.
12-In the password field, enter "m".
13-Click Save.
14-Issue sudo nano -w /etc/NetworkManager/NetworkManager.conf and change "dns=dnsmasq" to "#dns=dnsmasq", then save.
15-Issue sudo service network-manager restart in a terminal.
16-Click on Network icon > VPN Connections > Mullvad_xx ("xx" is the country you selected to connect).

My question is, what is that 14th step?
Comment: Download and install official Mullvad app it works fine https://mullvad.net/en/download/linux/
Answer: I am not sure what you really need - but you asked about step 14
This instructs you to use an editor (suggested: nano) to edit the file /etc/NetworkManager/NetworkManager.conf for which you need root permissions (therefore sudo is used).
What you should do in that file: find a line
dns=dnsmasq

and put a # at the beginning, which "comments out" the line so that the instruction/option is switched off. In this case this prevents the DNS-resolver from asking/using the service dnsmasq.
 the switch -w tells nano to not insert extra line breaks into the file. See man (1) nano (which you can see by typing man nano).


How to make emacs minibuffer vertical?

Question: I Want to make the emacs minibuffer (where we type emacs command) vertical.
Just the way we open a window by using
C-x 3

Is there a way to do this?
Comment: Really? :(   Is any emacs developer willing to add this functionality?   :p
Comment: You might want to get in touch with the emacs developers and tell them that you want this feature, we do not develop for Ubuntu we only help in solving issues with Ubuntu. This is a community of users, we aren't developers.
Answer:
Normally, each frame has its own minibuffer window at the bottom, which is used whenever that frame is selected. If the frame has a minibuffer, you can get it with minibuffer-window.

Well, apparently there's a way. Creating a dedicated minibuffer frame using the oneonone. This method didn't work how I was expecting on Emacs 24 where I tried as the 1on1-emacs. You need to load hexrgb.el first, otherwise it will not work. This is how it's shown:

As can be seen, it opens a new frame for completions, and for the minibuffer. I haven't figured out why when I switch to the minibuffer it doesn't change the scope to the minibuffer frame and instead tries to reuse the one that I have below. Maybe I'm not using the correct libraries but at least is the start.
Then I used instead a new minibuffer window. The usability of the new minibuffer window was rather null, since I had two minibuffers (and haven't found a way to remove the original) and the auto-completition was done in the main frame instead of the minibuffer frame.
This is the farest I went:
(setq default-minibuffer-frame
      (make-frame
       '((name . "minibuffer")
         (width . 20)
         (height . 80)
         (minibuffer . only)
         (top . 0)
         (right . 0)
         )))
(setq-default mode-line-format nil)

Comment: I agree with you, it's probably not doable as a window inside the existing frame. As a separate frame, though, it shouldn't be problematic, Emacs has supported having a dedicated minibuffer frame since the last millennium. What do you mean by "didn't work"? What did you try?
Comment: @Gilles I tried again but with `load-file` instead of just dropping the thing in a path (the previous problem was "Cannot open load file: hexrgb"). Now it loads, but is not the expected behavior. When I use `M-x 1on1-emacs` it just open a new window with the minibuffer, but doesn't remove the minibuffer of the main frame (same as the previous solution) and whenever I press `M-x` it doesn't change the scope.
Answer: As the Commentary in file oneonone.el says, just put this in your ~/.emacs:
 (require 'oneonone)
 (1on1-emacs)

You can also invoke 1on1-emacs from the command line:
 runemacs -l "oneonone.el" -f "1on1-emacs"

(You might need to provide an absolute file name for runemacs or oneonone.el, depending on your directory etc.)
If you call 1on1-emacs any other way than during startup, it will be too late, as Emacs will have already created another minibuffer in its initial frame.  That's the behavior you describe above.
Tip: If you use a 3rd-party library, it never hurts to look in the source-code Commentary for installation/startup instructions.  ;-)

To respond to the original question: if you want a minibuffer that is to the side of some other buffer, then no, it is not possible in the same frame, AFAIK.  But yes, you can use a standalone minibuffer for that, i.e., a separate minibuffer frame.  And yes, oneonone.el lets you do that --- just customize the position and size of the minibuffer frame using the options in the library.
That said, I do not see why anyone would want a minibuffer on the side.  Keep in mind that text is written horizontally.  So it generally makes sense to have a window/frame that is used for typed input and displayed output message (echo area) to be wider than it is tall, not tall and narrow.

How to make emacs minibuffer vertical?


evaluate double integral of exponential function

Question: I encounter some problem while evaluating this double integral.
I have tried to use u-substitution and i keep using integration by parts but the equation becomes longer and longer.
I found out that $$e^{-u^2}$$ is not an elementary function and if I want to integrate(indefinite integral) this, the result will be sqrt pi.(which is gaussian integral). inside the textbook I couldnt find any example similar to this. But I found examples online which most of them only dealing with one integral, this one is double integral. Could you point out on how can I evaluate this double integral? Thank you.
$$\int_0^{1/2} \int_0^y e^{-(1-2x)^2} dxdy + \int_{1/2}^1\int_0^{1-y} e^{-(1-2x)^2}dxdy $$
Comment: Have you tried changing the order of integration?
Answer: We can change the order of integration (See Fubini's Theorem) to arrive at
$$\begin{align}
\int_0^{1/2} \int_0^y e^{-(1-2x)^2} \,dx\,dy&=\int_0^{1/2} \int_x^{1/2} e^{-(1-2x)^2} \,dy\,dx\\\\
&=\int_0^{1/2}(1/2-x)e^{-(1-2x)^2}\,dx\\\\
&=\frac12\int_0^{1/2}(1-2x)e^{-(1-2x)^2}\,dx
\end{align}$$
And similarly for the second integral
$$\begin{align}
\int_{1/2}^1 \int_0^{1-y} e^{-(1-2x)^2} \,dx\,dy&=\int_0^{1/2} \int_{1/2}^{1-x} e^{-(1-2x)^2} \,dy\,dx\\\\
&=\int_0^{1/2}(1/2-x)e^{-(1-2x)^2}\,dx\\\\
&=\frac12\int_0^{1/2}(1-2x)e^{-(1-2x)^2}\,dx
\end{align}$$
Can you finish?
Comment: thank you for your reply.Yes! my answer is 1/4(e^-1 + 1) at the final. not sure if it is correct answer, coz i do not have answer sheet. I was about to ask you about my range is correct or not for the second part of the equation. sorry for late reply coz it took me some time to solve it. it was so kind of you, thank you so much for editing again the answer, thanks to your first part I get the same second part as yours!! am so glad. i spent so many hours on this before. thank you really!!
Comment: @cookick Well, you very welcome.  And I'm pleased to hear that you have it now!  -Mark ... P.S. The final answer is $\frac{1}{4}(1-e^{-1})$.
Comment: yes i will up vote the answer once i accumulate enough reputation points ~ btw thanks for the final answer, I forgot the minus@@. Thank you!
Comment: You're welcome again!


Will my game work if its from Austraila to SA?

Question: Hello My aunty lives in Austraila and she wants to buy me the Sims 4. Now I live in south Africa and she is not sure if it will work! Thank you!
Comment: Work in what way?  Can you install Origin?
Answer: If your aunt will buy you the game, she will either get:

The boxed retail version, from a shop for example. These boxes contain the CD, but also a keycode. This keycode can be then reedemed on the Origin Store using your account.
Buy the keycode from an online site like gamersgate or greenmangaming
Buy the game while using your Origin account from the Origin Store. That will link the game to your account permanently.

All of the options above require you to have a valid and new game keycode or to be logged in with your account, so yes you should be able to play it fine.
I bought the game at a reduced price from the official Mexican Origin store from a PC in Europe. It works perfectly and once registered to my origin account, I was able to install it from Origin (in english even).
Keep in mind: if you buy a game from a country that had the game censored in any way (such as Half-Life or Fallout: New Vegas in Germany) you'll get the censored version even if you will play it in some other country with no censored restrictions.
Answer: EA's Terms and Conditions don't say anything about the game being restricted by region, and, according to an entry on EA's help forum, you should be able to play it without a problem.


What is distillation in Neural Network?

Question: Distillation seems to be a general technique to reduce the size of NLP/NN models. Can anyone help me to understand intuition and how does it work?
Answer: Someone, such as Albert Einstein, spends his/her entire life coming up with a solution to a problem, such as Special Relativity. Then within a single class, maybe an hour and a half, a teacher teaches you and you now have the same knowledge. That's basically what happens in distilling knowledge. The teacher model does the hard work by learning the relationship between inputs and outputs. The student model learns that relationship from the teacher network. A prime example is DeiT in which the authors trained vision transformer with CNN teacher and achieved competitive performance with the original vision transformer  ViT that needed about 300M images for pretraining.
Answer: Distillation (sometimes also called knowledge distillation or teacher-student training) is the technique of 'distilling' knowledge from a large neural network into a smaller neural network, generally allowing you achieve a similar performance (i.e. accuracy wise) with a smaller network. An example of such a model would be the DistilBERT model, which uses distilled knowledge from the BERT model.
The way this technique works is that you have two models, one being the large model (also called teacher model) and a smaller model (also called the student model). During the training phase the student model tries to predict values and changes its weights based on a loss which combines both the error of the prediction of the student model and the error between the prediction of the teacher model and student model. The idea is that in this way the teacher model helps guide the student model to make the correct predictions.
Some additional links with additional info on knowledge distillation are this documentation page from the Distiller package and this practical example from Weights & Biases.

What is distillation in Neural Network?


How can I get a display name from the view ID and display ID?

Question: I can load a view with $view = Views::getView('my_view_id');, but how do I use that object to load the display_title or say an array containing information including the display name?
Note: This is not to be confused with loading the display's title that might be used when printing the view, as there's a method for that (getTitle()).
Answer: After reading throug the docs (https://api.drupal.org/api/drupal/core!modules!views!src!ViewExecutable.php/class/ViewExecutable/8), I tried the following (which worked):
$view = \Drupal\views\Views::getView('your_view_id');
$view->setDisplay('your_display_id');
$displayObj = $view->getDisplay();
//$displayPluginTitle = $displayObj->pluginTitle()->render();
//$displayTitle = $displayObj->getOption('title');
$displayName = $displayObj->display['display_title'];

N.B.1: I use the render function on a TranslatableMarkup object, this is what the pluginTitle function returns. It could be possible to use other functions there, like, e.g. getUntranslatedString
N.B.2: I misunderstood the OP. :-) Commented out the faulty part of the code, which returns the display plugin's title, and not the display's title as requested.
N.B.3: I misunderstood the OP. AGAIN! :-) Commented out the faulty part of the code, which returns the title of the display, and not the display's name as requested. To my defense, that property is labeled 'Display name' and its name 'display_title' (as was mentioned in the OP).
Screenshot from Views example:

And a test script that gets the title of the display (with the output):

Cheers!
Comment: Darn I was missing the last line...thanks for that. I'm currently getting the annotated title for my custom display plugin, so perhaps I'm missing some setting in my display plugin.
Comment: Hey there. So, what do you get exactly? What do you mean the annotated title? From the pluginTitle function, I got a TranslatableMarkup object, are you getting something else there?
Comment: I have a custom views display plugin as described here: https://api.drupal.org/api/drupal/core%21modules%21views%21src%21Plugin%21views%21display%21DisplayPluginInterface.php/group/views_display_plugins/8.  It is annotated with @ViewsDisplay, which includes a title. That title is what I am getting back with the last line.
Comment: Your own implementation I reckon. Have you implemented/overriden the pluginTitle function then?
Comment: Correct it's a custom implementation, but no I did not implement/override pluginTitle()
Comment: I tried this for a view with two block displays, and indeed I got the annotation title "Block" instead of the custom display titles provided to each block display.
Comment: Got it! Updating my answer!
Comment: Hmm now I'm getting an empty string. Again tried it with my custom display type and the blocks displays.
Comment: Note I am indeed getting a valid Drupal\views\Plugin\views\display\Block object from `$displayObj = $view->getDisplay();` that includes the object Drupal\webprofiler\Views\TraceableViewExecutable, which in turn includes the display titles.
Comment: Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/38169/discussion-between-stefanos-petrakis-and-webdrips).
Answer: The following code depends on the ctools_views module.
$view = \Drupal\views\Views::getView('your_view_id');
$view->setDisplay('your_display_id');
$displayObj = $view->getDisplay();
$displayName = $displayObj->display['display_title'];

To get the display title only requires the following code.
$view = \Drupal\views\Views::getView('your_view_id');
$view->setDisplay('your_display_id');
$displayName = $view->getTitle();


Relationships and Intimacy

Question: A girl (21) recently confessed her love for me, and she's a nice girl, but she's not a virgin.  I approach all possible romantic relationships very seriously with the intent of marriage, and I don't know whether I should proceed here.  She's started becoming more religious, but I don't know if it's for me or for G-d.  What are the Halachik ramifications for her? what does the tradition say regarding these kinds of matters? What do secular studies say about these kinds of marriages? There's a certain amount of disgust in knowing that another man (that she wasn't married to) has been in her, is that warranted/reasonable? Is that a reason to reject her?  I need advice and wisdom regarding this, thank you whoever takes the time to answer this.
Comment: See the sidebar: "Like any library, Mi Yodeya offers tons of great information, but *does not offer personalized, professional advice,* and does not take the place of seeking such advice [from your rabbi](http://judaism.stackexchange.com/q/9146)."
Comment: If you're turning to the interwebs for advice — this is not the place. There are various other online ask-a-rabbi's that offer advice. One such option is instaRabbi. Best of luck
Comment: See also https://judaism.stackexchange.com/q/34341/21
Comment: Welcome to MiYodeya "Ben" and thanks for this first question. Your question is likely to be closed closed because this site is not a good place for personal questions. Those should be asked to a rabbi well-versed in the relevant laws who will ask questions on context and personal specifics to come to a good answer. This site can't substitute for this. Please don't let this deter you from coming back to learn with us. Also can I recommend you take the [tour](https://judaism.stackexchange.com/tour) to get a sense of how the site works?
Answer: Sounds like this couple needs to talk to a competent rabbi, and probably a relationship therapist.
Let's call this three issues:
A.) There's a mismatch between the religious upbringing of the pair.
Just something they need to be aware of, and plan through. If one says but that's how my very-kosher family always did it, what will the other say? Is one of them currently at a different level of observance? How do they intend to navigate such issues?
B.) It's possible one side is taking on more religious practice solely out of interest in the partner.
I mean there's no law about this, but if it's not sincere, that's just not a recipe for a good relationship. These conversations come up a lot with conversions; one rabbi heard a woman say "I came to Judaism through my boyfriend, not because of my boyfriend"; he felt that was reasonable. A conversion beit din would typically ask -- suppose the Jewish partner suddenly wasn't in the picture; would you continue your interest in Judaism?
C.) One side's been "a good teenager", while the other hasn't.
Really it's about what the couple works out for themselves. There's no "thou shalt / thou shalt not" about this. (Unless he's a kohen and she had a non-Jewish boyfriend...). If one side really can't get over this, then it's not a good match because they can't get over it. If they can, that's fine too. There are plenty of solidly happy, religious couples where one had less-religious past, and all that it entails. Okay at some point if everything proceeds, there will be questions about exactly what wording to put in the ketubah, and then what exactly should be pronounced out-loud ... but those are details that can be worked out.

Relationships and Intimacy


Effect of electron discrete nature on current density

Question: Coulomb's law states that the current that flows through a wire is proportional to the applied voltage. For sure there are many physical effects (linear and non-linear) that participates in the voltage-current relation making this law valid only in ideal systems. I'm familiar with many of them, for example the temperature coefficient of a material. But I never heard of any effect that suggests the current density is somehow affected by the fact that electrons are discrete entities. I mean, my common sense says the higher the current density the higher the probability of electrons interacting to each other which could lead to a higher resistance and eventual saturation. Am I making any sense here? Does such behavior happen?
Comment: Yes. Current density and its effect on "collisions" (interactions) is related to resistance somehow. https://en.wikipedia.org/wiki/Drude_model See also https://physics.stackexchange.com/questions/108045/if-the-current-is-increased-is-there-more-charge-flowing-or-is-it-moving-quicke
Answer: Current through a cross section is
$$I = \int_A \left(\sigma \vec{E} + \varepsilon \frac{\partial \vec{E}}{\partial t}\right) \cdot \mathrm{d}\vec{A}$$
The first term in the sum is for conductors, their conductance sigma is that high the second term does not matter. You can't "saturate" conductors electrically. Before that happens, you saturate them magnetically. (But that's another story.)
The second term in the sum is for isolators. Their sigma is so tiny it does matter. It's the dielectric displacement current. You can see the dielectric constant epsilon and the change of the electric field over time rather than the electric field matters.
If you have boundaries, the electron work function on the conductor also matters. This is e.g. important for tubes, but also for semiconductors.
Comment: Hello Janka, tks for all these great information, but I'm afraid that doesn't quite answer my question. My question is about current density being or not (and why not) affected by electron interference with each other
Comment: In that case, you'll have to consult the magnetic equation. It isn't about single electrons then, but about the magnetic field the current creates as a whole. That one hinders **the rate** current may rise or fall. Inverse to the dielectric. It doesn't put a limit on the current itself. Static magnetic fields do nothing to static current in a non-moving conductor. (Again, they do something in isolators and semiconductors, that's where it gets interesting.)
Comment: So your question is put wrongly. It's the lack of moveable electrons that makes things interesting. Not the surplus.
Answer: I'm a logic designer and not a circuit designer, but when I think of the discrete nature of electrons I think of the opposite... Low current regime, not high current.
For an extreme example, consider a circuit with a current of 1 attoamp. That's about 10 electrons per second. How many electrons in a microsecond? Probably 0. Maybe 1. Very unlikely to get 2. That's an unrealistically small current, but this effect happens in picoamp circuits too. This is the famous "shot noise".
It may have an effect on high power circuits too, I don't know. But definitely low power.


Loading SQL tables using Entity Framework

Question: I want to use Entity Framework to a load a number of sql tables into memory from my c# app before performing some work on them and sending changes back to the database. I only want to hit the database once when I load the data and once more when I update changes. Should I load the tables into a dataset or is there a better way to achieve this?
Answer: Turn off lazy loading or use Include() to specify related entities that should be loading in a single query.
If you're using CTP5 look here: http://blogs.msdn.com/b/adonet/archive/2011/01/31/using-dbcontext-in-ef-feature-ctp5-part-6-loading-related-entities.aspx
Answer: In such case you can't use entity framework. Entity framework will hit database for once for loading each table (unless there are relations which can load all tables in single query as @Jakub suggested) and it will hit database for each performed change. EF doesn't have command batching and each modified, inserted or deleted entity will cause separate roundtrip to DB.


Is an attacker looking at encrypted non-boot partition able to tell if this is VeraCrypt, TrueCrypt or DiskCryptor?

Question: In theory an encrypted partition WITH encrypted partition header as created by mentioned encryption software, should be nearly random-looking.
But maybe there are some clues, like offsets, double backup data.
This question is important, because I want to know if revealing that a specific disk has been encrypted with one of those software is lowering the security and attacker's effort or not. One also wouldn't want to potentially make an attacker weary by giving him false or vague information which he could prove to be false.
Answer: No.
An attacker can not distinguish between VeraCrypt and TrueCrypt.
The reason for this is that they both share the volume format and guarantee a completely random looking container.
Concerning DiskCryptor, which seems to be an earlier fork of TrueCrypt, it looks like the header is also random-looking. The only difference may be measured if the drive is mounted, as the size of the volume, as TrueCrypt uses larger headers than DiskCryptor.
So by an offline attack no difference can be measured.
Comment: ...and (not to be obvious, I just never checked) VeraCrypt appears to be a later fork of TrueCrypt: http://www.esecurityplanet.com/open-source-security/veracrypt-a-worthy-truecrypt-alternative.html


No Load & No Transaction Fee, are there any hidden costs?

Question: E*Trade offers some mutual fund trades with No Load & No Transaction fee's.  Are there any hidden costs?  Or down the road when I pull my money out can I be assured that I am privy to all the money and there are no extra fees?
Comment: Well, E.Trade _might_ change its fee structure in the future and start charging for selling your mutual fund shares, or the mutual fund may be charging redemption fees for early withdrawals. For example, several Vanguard funds charge a 1% fee if shares are sold within 12 months of purchase. The Vanguard funds that _you_ own might not have such fees now, but may institute such fees in the future. E*Trade will pass these fees on to you.
Answer: You do realize that the fund will have management expenses that are likely already factored into the NAV and that when you sell, the NAV will not yet be known, right? There are often fees to run a mutual fund that may be taken as part of managing the fund that are already factored into the Net Asset Value(NAV) of the shares that would be my caution as well as possible fee changes as Dilip Sarwate notes in a comment.

Expense ratios are standard for mutual funds, yes. Individual stocks that represent corporations not structured as a mutual fund don't declare a ratio of how much are their costs, e.g. Apple or Google may well invest in numerous other companies but the costs of making those investments won't be well detailed though these companies do have non-investment operations of course. Don't forget to read the fund's prospectus as sometimes a fund will have other fees like account maintenance fees that may be taken out of distributions as well as being aware of how taxes will be handled as you don't specify what kind of account these purchases are being done using.
Comment: Thank you, I am just learning.  So I just read that is also an Expense Ratio which come out of your stock every year.  Are Expense Ratios pretty much a standard for all stocks?


need to dig in narrow rocky land

Question: We have very rocky land and need to dig about 3 feet (by 2 feet) next to the garage/home wall.  Is there a special equipment that will do the job without damaging the home's walls?
Thanks
Answer: It's called a pick and a shovel. Should take an hour or three. I own a backhoe - I don't try to get close to my foundation walls with it - that's inviting disaster. P&S is also inexpensive and can get anywhere, unlike equipment.
If you mean "solid rock" the answer is a bit different, clarify if that's the case. For rocky dirt (or any dirt) loosen with pick (and/or digging bar), remove with shovel.

need to dig in narrow rocky land


Equals operator for zeros (BigDecimal / Double) in Java

Question: A few interesting observations w.r.t equals operator on 0 and 0.0

new Double(0.0).equals(0) returns false, while new Double(0.0).equals(0.0) returns true.
BigDecimal.ZERO.equals(BigDecimal.valueOf(0.0)) returns false, while BigDecimal.ZERO.equals(BigDecimal.valueOf(0)) returns true.

Looks like the string comparison is being done in both the cases. Could anyone throw some light on this.
Thanks.
Answer: BigDecimal 'equals' compares the value and the scale. If you only want to compare values (0 == 0.0) you should use compareTo:
BigDecimal.ZERO.compareTo(BigDecimal.valueOf(0.0)) == 0 //true
BigDecimal.ZERO.compareTo(BigDecimal.valueOf(0)) == 0 //true

See the javadoc.
As for the Double comparison, as explained by other answers, you are comparing a Double with an Integer in new Double(0.0).equals(0), which returns false because the objects have different types. For reference, the code for the equals method in JDK 7 is:
public boolean equals(Object obj) {
    return (obj instanceof Double)
           && (doubleToLongBits(((Double)obj).value) ==
                  doubleToLongBits(value));
}

In your case, (obj instanceof Double) is false.
Answer:
The 0 in your first expression is interpreted as an int, which may be autoboxed into an Integer, but not to a Double. So the type of the two is different, hence they are not equal. OTOH 0.0 is a double, which is autoboxed into a Double, so the two operands are deemed equal.
BigDecimals also contain a scale (i.e. number of digits to the right of the decimal separator dot). BigDecimal.ZERO has the value of "0", so its scale is 0. Hence it is not equal to "0.0", whose scale is 1.
If you want to compare values, use BigDecimal.compareTo:
BigDecimal.ZERO.compareTo(BigDecimal.valueOf(0.0)) == 0
BigDecimal.ZERO.compareTo(BigDecimal.valueOf(0)) == 0

Answer: new Double(0.0).equals(0); //false

as the argument you passed is integer. and the equels() in Double class checks whether the argument is od instance Double or not using instance of operator.
The Double's equals() method.
if (!(argument instanceof Double))
  return false;

The argument you passed is integer, which is not instance of Double, so it returns false.
Answer: new Double(0.0).equals(0) is actually boxed as something like this:
new Double(0.0).equals(Integer.valueOf(0))

Double.equals(...) will never return true unless given another Double instance.
Answer: new Double(0.0).equals(0)

This line compares a double value of 0 (which is not exact zero) with integer of 0.
BigDecimal.ZERO.equals(BigDecimal.valueOf(0.0))

BigDecimal will compare the scale length in the equals operation.
Answer: For performance considerations BigDecimal, BigInteger caches small values
0 to 15 in case of BigDecimal (without fractions)
BigDecimal.ZERO  will be    new BigDecimal(BigInteger.ZERO, 0,  0, 1)
& valueOf method typically picks up from cache for 0 to 15 :)
Answer: please try doublevalue instead of compareto if you feel is not as beautiful and readable as or simply need an alternative like below:

BigDecimal a = new BigDecimal("0.00");
BigDecimal b = new BigDecimal("0.0");
BigDecimal c = new BigDecimal("0");

if(a.doubleValue()==BigDecimal.ZERO.doubleValue()) {
System.out.println("a equals");
}

if(b.doubleValue()==BigDecimal.ZERO.doubleValue()) {
System.out.println("b equals");
}

if(c.doubleValue()==BigDecimal.ZERO.doubleValue()) {
System.out.println("c equals");
}

Comment: Transforming a BigDecimal to a double might result in loss of precision and a non-zero but close to zero BigDecimal turned into a Double might become 0. You should compare using the `compareTo` method in BigDecimal


How do I accept an answer on Stack Overflow?

Question: I have an accept rate of 0, but I don't see any button in my view of Stack Overflow that would allow me to accept an answer.
Answer: There's a 'check' thing (like a v) next to the answers which you can click on. When it turns green it means you accepted that answer.
Quoting this from jjnguy from another, similar thread:
Answer: To the left of each answer, there should be a large outline of a check symbol.  Logged in as the person who posted the question, you can click on that check, and it will turn green. That indicates that you have accepted the answer to which the check mark pertains.
Clicking on another transparent check will undo your previous acceptance and reassign it.


How can I query the Log on as user of a Windows service using the command line?

Question: Currently sc query shows service name, display name and other attributes of the services installed on my box. However it does not tell me what the Log on as setting is. How can I get this information using the command line?
Comment: Unless you are running SQL server or Exchange, all your services are going to be running either NetworkService, LocalService or LocalSystem.  It isn't necessary to learn the differences to them, but if you really really want to, technet would be the place to start.
Answer: You can use "WMIC" (WMI Command Line Interface) for this:
wmic service where name="Power" get StartName

StartName
LocalSystem
Here's an example for a different service:
wmic service where name="RpcSS" get StartName

StartName
NT AUTHORITY\NetworkService
Answer: sc query queries the current state; use sc qc to read the configuration.

C:\>sc qc messenger
[SC] GetServiceConfig SUCCESS

SERVICE_NAME: messenger
        TYPE               : 20  WIN32_SHARE_PROCESS
        START_TYPE         : 4   DISABLED
        ERROR_CONTROL      : 1   NORMAL
        BINARY_PATH_NAME   : C:\WINDOWS\system32\svchost.exe -k netsvcs
        LOAD_ORDER_GROUP   :
        TAG                : 0
        DISPLAY_NAME       : Messenger
        DEPENDENCIES       : LanmanWorkstation
                           : NetBIOS
                           : PlugPlay
                           : RpcSS
        SERVICE_START_NAME : LocalSystem


Evaluating Ancestry DNA match to clarify Half Sibling relationships?

Question: I did the Ancestry DNA an had a match of 1671 to a person I did not know. My sister did the test and matched him at 1251. My father believes he has a son he does not know and the stories seem to add up. My question is, from everything I have read my sister's numbers should be higher in order for him to be a half sibling.
Answer: I am assuming that you and your sister match as expected, as either paternal half-siblings or full siblings.
According to the data that Blaine Bettinger has gathered through his Shared cM Project, yes, the shared DNA between your sister and your potential new half-brother falls outside the range for a half-brother: Shared cM Project for 1251 cM. However, if you look at that page, it lists a 28.26% probability for some additional potential relationships, including half-sibling. This potential relationship comes with the following note:

this relationship has a positive probability for 1251cM in thednageek's table of probabilities, but falls outside the bounds of the recorded cM range (99th percentile)

You can read more about this in thednageek's post The Limits of Predicting Relationships Using DNA.
I think the best next step would be to ask your father to do a DNA test. Then you'd get a solid answer about how your father and this unknown person are related.


I got my printer working. How do I figure out what I did right, so I can reproduce it?

Question: I was doing all this different stuff (adding/removing PPAs, installing/uninstalling software), trying to get my printer to work. I want to find out what I did right, so that I can do it again, and, more importantly, so that other people can do it. How do I figure out what I did right?
Comment: Err... start for telling us what you did.
Comment: I added and removed a bunch of PPAs. The last three things I ran were:
`sudo apt-get install printer-driver-gutenprint`
`sudo restart cups`
`sudo apt-get install cups-backend-bjnp`
Comment: Can you edit your question instead and add that information?
Answer: If you used the command line, then you can see the last entered commands in the .bash_history file located at your home folder (~).

I can't think in something else right now. If you know more, feel free to add it here


Is it important for an International Student to arrive in the airport near to his university?

Question: Would arriving in an airport that is not near to my University cause any problems at airport?I am getting a Cheap Flight this way.
Comment: Did you add in the cost of ground transport?
Comment: Most people don't choose their connections and gateways solely on proximity; immigration officials understand this. Whether your arrival is suspicious or not would likely be up to the judgment of the immigration officer, and so your question is probably unanswerable here. I'll say this: if you're headed for St. Andrew's, sure, it's reasonable to fly into Glasgow or even London instead of Dundee or Edinburgh. But if you're arriving in the UK on a flight to Belfast, I'd expect some thorough questioning.
Comment: I did add ground transport cost.I am thinking about arriving at Edinburgh instead of Manchester.
Comment: Price isn't everything. You haven't said where you're university is, but assuming it's Manchester, you need to consider the availability of  transport from Edinburgh. If your flight arrives late there might not be a train that day so you'd need an overnight stay. Services can be limited with COVID19 restrictions, so you might not get a seat on the train you want. If your flight is delayed what happens if you miss your booked train? I'm not saying  you shouldn't pick the cheapest flight, but just be aware of the possible issues with onward travel.
Comment: If you're proposing to do this journal shortly then you may also need to consider that Scotland has different criteria on if you need to self isolate then England. Although I don't know if you'd be allowed to travel from Scotland to England if required to self isolate in Scotland (but not England)
Answer: When I started studying at a university in Birmingham, I flew from Toronto to Edinburgh because the flight + train was significantly cheaper than flying into other closer airports. They asked me which school I was studying at, and it didn't seem to faze them that it was 300 miles away.

As an aside, I'm not even sure they would know which university one is studying at without asking or doing some database querying. The UK Entry Clearance in my passport doesn't have the institution's name on it, nor does the confirmation page from the Home Office (remember to bring this!), nor does my BRP. They all bear an alphanumeric code that's associated with my CAS number (Confirmation of Acceptance of Studies), but I'm not sure whether their systems immediately indicate "studying at University of X".
Answer: Probably not.
If they ask you about it, just tell them it's cheaper (including ground transport) from when you are flying from.
Have with you all necessary documents, visa, ...  including university admissions documents.
Answer: Because you clear immigration at your first landing in the US it is absolutely normal that people immigrate at an airport nowhere near their final destination. They will probably ask you what your final destination is but as long as you know how you are getting there it will be no problem.


Self adjoint operator

Question: I am looking in the space of test functions $ \{f \in C^\infty|f^{(n)}(a)=f^{(n)}(b)=0\};n \in \mathbb{N}_0\} $whether the n-th derivative is a self adjoint operator. the dot product is given by $(f,g)=\int_a^b f(x)g(x) dx$. I was able to show it for even n that the n-th derivative is self adjoint, just by doing integration by parts but for odd n this does not work as integration by parts would give me a minus sign here. Unfortunately I am neither able to produce a counterexample nor am I able to show that the derivative is self adjoint, which I highly doubt.
Comment: What Hilbert space are you working over? This really is the key to whether or not $D^n$ is self-adjoint for $n$ even; in the case that $n$ is odd, $D^n$ of course cannot possibly be self-adjoint for any relevant choice of Hilbert space, given that it isn't even symmetric.
Comment: How do you show that it is not symmetric for n odd in the space of test functions?
Comment: Integration by parts gives you a minus sign, doesn't it?
Answer: You already know the answer: derivatives of odd orders are anti-symmetric, not symmetric. But if you want a concrete example, take something like $f(x)=(x-a)^{2n+1}(b-x)^{2n+1}$ and $g=f^{(n)}$. (Check that these functions satisfy the boundary conditions). Then $\int_a^b f^{(n)}g>0$ and $\int_a^b fg^{(n)}=-\int_a^b f^{(n)}g<0$, so these integrals are not equal.
Answer: There are a number of comments which might be appropriate here.  Firstly, the general rule of thumb is that you require $n$ boundary conditions to specify a self-adjoint operator for a differential operator of order $n$ (in the sense of unbounded operators in Hilbert space), not the $2 n$ given  here.  In fact, if one considers the formal differential operator of differentiating $2 n$ times rather than $n$ times, then it is essentially self-adjoint in your Hilbert space if one imposes the boundary conditions $f^{(n)}(a)=f^{(n)}(b)=0$ for $n$ even between $0$ and $2n-2$.  This is a significant example---the corresponding eivenvectors are the functions $\sin n x$ and the expansion by eigenvectors is just the Fourier Sine expansion (we assume that $a=0$ and $b= \pi$  to simplify the  notation).  In order to obtain a genuinely self-adjoint operator one has to be more careful about the domain of definition (e.g., by using distributions or Sobolev spaces).  A very thorough  acount of the hard analysis  involved in this and in many of the important Sturm-Liouville problems which arise in classical mathematical physics can be found in Hans Triebel's text "Hoehere Analysis (an english translation "Higher Analysis" is available).

Self adjoint operator


Marginal and Average costs for constant returns to scale production function being constant

Question: Suppose that we are dealing with a production function $q = f(k,l)$, of inputs capital and labor. If this function exhibits constant returns to scale then I know that both the marginal cost and average cost functions $C(q)$ are equal and constant for each of the inputs and the total. i.e:
$$\frac{\partial C(q)}{\partial q} = \frac{C(q)}{q}$$This means that the contingent demand for labor and capital must be  linear in $q$. Why is this is case mathematically and what is the economic interpretation?
Comment: Hi! What do you mean by "*what is the economic interpretation*"? Do you understand what "linear in $q$" means?
Comment: I get the economic interpretation that the marginal and average costs increase at a constant rate with respect to q, which makes sense for constant returns to scale. So I guess I just wanted to have a mathematical proof.
Answer: Constant returns to scale (CRS) means that for any positive real number $a$
$$
f(a \cdot k,a \cdot l) = a \cdot f(k,l).
$$
Let us assume that industry wants to produce one unit of output. Then they face the unit cost minimization problem
$$
\min_{k,l} \ r \cdot k + w \cdot l
$$
s.t.
$$
1 = f(k,l).
$$
Suppose this problem is solved by a pair $(k^*,l^*)$. If we consider the general cost minimization problem
$$
\min_{k,l} \ r \cdot k + w \cdot l
$$
s.t.
$$
q = f(k,l),
$$
the pair $(q \cdot k^*,q \cdot l^*)$ has to be an optimal solution because of CRS.

Proof.
The pair $(k^*,l^*)$ was optimal for the unit cost minimization problem, thus for all pairs $(k',l')$ where
$1 = f(k', l')$, we have
$$
r \cdot k^* + w \cdot l^* \leq r \cdot k' + w \cdot l'.
$$
Now let us move on to the general cost minimization problem where the constraint is
$$
q = f(k,l).
$$
For any feasible pair $(\hat{k},\hat{l})$, define
$$
k' = \frac{\hat{k}}{q} \\ l' = \frac{\hat{l}}{q}.
$$
Because of CRS, this new pair $(k',l')$ produces exactly one unit of output, thus we know that
$$
r \cdot k^* + w \cdot l^* \leq r \cdot k' + w \cdot l'.
$$
holds. Multiplying this by $q$ we have
$$
r \cdot q \cdot k^* + w \cdot q \cdot  l^*
\leq
r \cdot q \cdot k' + w \cdot q \cdot l'
=
r \cdot \hat{k} + w \cdot \hat{l}.
$$
Again because of CRS, the pair $(q \cdot k^*,q \cdot l^*)$ results in $q$ units of output. Thus we have seen that $(q \cdot k^*,q \cdot l^*)$ is a feasible solution that costs no more than any other pair $(\hat{k},\hat{l})$, making $(q \cdot k^*,q \cdot l^*)$ an optimal solution to the general cost minimization problem. QED

The solution to the cost minimization problem shows the demanded/used amount of  capital and labor, thus these are indeed linear in $q$.


Standard deviation exceeds maximum value

Question: I am trying to plot data that only has two possible values – 1 (present) or 0 (absent)  – clearly not a normal distribution. The max value could be 1, but my standard deviation bars go to 1.3, which is impossible. I tried increasing the sample size, but the max column value + standard deviation are still 1.3. Is it OK to manipulate my graph and cap my column bars off at 1 since it is not possible to have a sample value larger than 1?
Comment: What "standard deviation bars" are you  talking about? What are you doing? What sort of graph? What are you trying to show?
Comment: Define exactly what these "standard deviation bars" are giving, please. I suspect their definition (whatever it is) makes the value not "impossible", and you're simply plotting something other than your present needs.
Comment: See the wikipedia page and search here for binomial distribution.
Answer: What you have is a binomial distribution. The mean of your 0's and 1's is the proportion of 1's. The standard deviation is $\sqrt{p (1-p)}$, and the standard error is $\sqrt{\frac{p (1-p)}{n}}$ where $n$ is the number of samples. If you're trying to figure out a 95% confidence interval on the proportion (the mean), that would be $\pm 1.96 {\sqrt{\frac{p (1-p)}{n}}}$.
The maximum value of the proportion is 1, but that would only be the case when every sample point is equal to 1, and in that case, the standard deviation would be 0.
Comment: @Andre The *data* have a Binomial$(1,p)$ distribution while a particular *statistic*--their sum--has a Binomial$(n,p)$ distribution. To that extent the language in this answer is correct. It also contains a lot of relevant information--thank you, Sofia! In its present form it falls a little short of addressing the question, though. It should be pointed out that because $\sqrt{p(1-p)}\le 1/2$ and $p+\sqrt{p(1-p)}$ never exceeds $1.20711$, the "standard deviation bars" of the question cannot possibly extend to $1.3$. Thus *we need clarification from the OP* in order to develop good answers.


Check the singularity of the function at $z = 0$

Question: Consider the function $f(z) = Sin\left(\frac{1}{cos(1/z)}\right)$, the point $z = 0$

a removale singularity
a pole
an essesntial singularity
a non isolated singularity

Since $Cos(\frac{1}{z})$ = $1- \frac{1}{2z^2}+\frac{1}{4!z^4} - ..........$
$$ = (1-y), where\ \ y=\frac{1}{2z^2}+\frac{1}{4!z^4} - ..........$$
Thus $Sin\left(\frac{1}{1-y}\right) = Sin(1+y+y^2 +y^3+.......)$ = $\sum_{-\infty} ^{\infty}$$ a_n z^n$, thus $z=0$ is an issolated singularity.
Please check my solution is right or not. Also I want to know that how to check an non- isolated singularity
Answer: Take any neighborhood $U$ of $0$. Then there is a $k \in \mathbb{N}$ such that $\frac{1}{(2k+1)\pi}$ is in $U.$ Then $f(z)$ has a singularity at each of these points.


Why can't I access my mongodb running in a docker container in Azure web apps?

Question: I want to run a mongodb docker image from dockerhub for example mongo:3.6 or mongo:4.1 in an Azure Web App but I can't access it from outside.
According to the Azure logs the docker container starts fine and the logs say:
docker run -d -p 29794:27017 --name mytestapp -e WEBSITE_SITE_NAME=mytestapp -e WEBSITE_AUTH_ENABLED=False -e PORT=27017 -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=mytestappurl -e WEBSITE_INSTANCE_ID=xxx -e HTTP_LOGGING_ENABLED=1 mongo:4.1
2019-06-15 19:42:49.831 INFO  - Container mytestapp for site mytestapp initialized successfully and is ready to serve requests.

As far as I understood so far Azure Web App Service only supports port 80 and 443 for inbound traffic and maps the internal port (in the case of the mongodb: 27017) to port 80 or 443, depending on SSL or not.
When I access my web app via browser and port 80 I get the message
It looks like you are trying to access MongoDB over HTTP on the native driver port.

which says the service is somehow accessible and is waiting for requests on port 80 but when I try to connect via mongo, for example:
mongo -host mytestappurl -port "80"  -username "root" -passwort "myrootpw" --verbose

I get
creating new connection to:mytestappurl:80
D NETWORK  [js] connected to server to:mytestappurl:80
I NETWORK  [js] recv(): message msgLen 1347703880 is invalid. Min 16 Max: 48000000

and so on. I also tried to set the key/value pair WEBSITES_PORT=27017 in the Azure App settings but without success. The same setup runs fine locally and I can access the mongodb as expected.
Answer: You can access your database using Robomongo or any other similar app, use the Ip and port you have to create a new connection.


How to write a hello world add-in for Win 7 Media Center

Question: I want to write a simple hello world add in for Media Center on Windows 7, but I am having problems finding up to date functional documentation.  I found this page: http://blogs.msdn.com/b/mcreasy/archive/2004/10/12/241449.aspx which looks to be exactly what I need.  I implemented it and some of the interfaces it references are marked as obsolete, and even so when I try to launch it in media center is just pops up a dialog saying "unable to launch addin"
I updated the namespace interfaces from using Microsoft.MediaCenter.AddIn to using Microsoft.MediaCenter.Hosting which looks to be the up to date namespace according to the sdk docs, but I still have the same problem.
registering the assembly with the gac and with RegisterMCEApp both are successful, and I have unregistered and registered from both places in between builds.
I strongly signed the assembly with a .snk file and got the public key token to update the registration.xml
Can anyone either tell me what I am doing wrong or direct me to some up to date tutorial /docs?
Here is the little bit of code I have:
<code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.MediaCenter.Hosting;

namespace MCPluginTakeTwo
{
    public class HelloWorldAddIn: MarshalByRefObject, IAddInModule, IAddInEntryPoint
    {
        public void Initialize(Dictionary<string, object> appInfo, Dictionary<string, object> entryPointInfo)
        {

        }

        public void Uninitialize()
        {

        }

        public void Launch(AddInHost host)
        {
        }
    }
}
</code>
Answer: Maybe looking at some open source mc plugins would help.
Answer: Here's another getting started tutorial, with some tips for getting started with Visual Studio 2010 (because the SDK only comes with VS 2008 templates).
http://david.gardiner.net.au/2010/10/writing-media-center-application-in.html


Dynamically Filter data in a DataGrid

Question: I have a ComboBox with the values "open", "closed". According to values changed in the ComboBox, I want to change the DataGrid to display either "open " or "closed" values. How can I do this?
Answer: Your DataGrid can be bound to a DataView. Create different DataViews depending upon the Selected item in the DropDownList (here's an article on how to retrieve the selected item).
Fill a DataTable with your data. Derive different DataViews for the combo states. When the combo changes (enable AutoPostback), select the appropriate DataView and Bind the DataGrid.
Answer: You could use RowFilter property of a DataView object binded to the DataGrid.
Answer: You can use any of the *DataSource controls and add a control parameter with the ID of the combobox. Turn on autopostback for the combo, and asp.net will automatically call the object datasource with the new open/closed value.

Dynamically Filter data in a DataGrid


Why did S&P 500 recover ≥ 50% before it nose-dived in 1929, 1987, 2008?

Question: Why did S&P 500 recover $\ge 50\%$ before it nose-dived in 1929, 1987, 2008?

This question needs details or clarity.

Fizz commented and corrected me, so Fizz understood my question? What "details" or "clarity" would you like?
Answer: I can't answer for the other users. My feeling as to why this question was closed is that it would end up being too speculative and/or broad.
You are basically asking for users to speculate over the movement of the entire S&P 500, and it's not clear exactly what you are looking for. Your question asks specifically, "Can economics explain them [the charts]?" What part of economics are you looking to for an explanation?
Are you asking if some generic asset pricing model that tries to predict the up and down movements of a given stock index? Are you asking if behavioral models for asset bubbles are part of the reason for the "dead cat bounce"? Are you asking for us to analyze employment, monetary policy, or any other number of factors that could have caused a temporary uptick in the index price before coming back down? Are you asking for us to compare these particular years that you picked out (1929, 1987, 2008) to other recession years where maybe this sort of pattern did not hold?
I could go on. The point is--especially with macroeconomic questions--you have to have a well-defined, answerable question. It's not enough for users to understand what you are currently asking. Simply asking basically, "what does ' ' ' ' 'economics' ' ' ' ' have to say about this particular phenomena which I see a pattern in for some years" is not a well defined question for this site.
For better or for worse, this site is not like a forum where through discussion we can mold or shape a concrete question for you. If you have a topic of interest, treat asking questions about it almost like a research question. Narrow the scope down to something manageable. As is, there's plenty of directions someone could take your very broad question to try to explain this price movement. But the question is what are you looking at?
It may be a tall order to ask this of newer students or laypeople. I think sometimes the community will overlook some lack of clarity for idiosyncratic reasons for their sake. But generally speaking, the community tends to want more effort than, "here is an observation that may or may not be a regular pattern, can someone explain it to me". Do not take this personally. I think your question could probably be salvaged into something quite engaging. It just needs some more focus.


Is there any chance to use Ubuntu with a live USB pen drive on my MacBook Pro 2018 with touchbar?

Question: I have followed correctly the tutorial about flashing ubuntu on a usb stick with mac os. I can run the operating system but, obviously, nothing works. Can I install driver for trackpad and keyboard?
Answer: A Google Search for this problem revealed a kernel patch has been published for the Touchbar. However, patching the kernel used in a LiveUSB is highly problematic, and you would be better off installing Ubuntu into the USB as if you were installing to an SSD, from a different LiveUSB, then patching the kernel on the non-Live USB.


How to export and import taxonomies (category, tag and/or custom taxonomy) and their terms

Question: I want to export all Wordpress categories (no posts, just categories) from one blog to another. How can I do that ?
Comment: Have you tried accessing Manage>Export from the blog's Admin panel.
Comment: There is no Manage menu, there is only Tools/Export menu but it doens't allow me to export categories only
Comment: Sorry for that, I read that from a blog online.  Could you do that from the database level?
Comment: If you need a simple effort, try **Export Categories** plugin. https://wordpress.org/plugins/export-categories/
Answer: This answer is essentially the same as Ünsal's, but I'd like to elaborate a bit because despite being right his answer didn't help me (I was just trying to remember what I'd done in the past, I should have read his more carefully and I would have figured it out, but I think for others a full description would be useful).
To export the full category hierarchy you need to export "All Content"
Any other option won't give you the full data (e.g. exporting a post with all categories tagged mostly works, but you lose all parentage/hierarchy data about taxonomies that are hierarchical).
When you export "All Content" the resulting file has a section with data about your terms. If you look through the file it should be easy enough to find, after authors and before "items" (i.e. posts).
You can just import this and delete content if that's an option*
Importing the full file will replicate the taxonomy hierarchy perfectly, but also obviously import all the pages and posts too. If there aren't too many than consider just deleting them by hand. It won't take that long if you do it bulk and there are less than hundreds (remember you can use Screen Options on the Edit Posts screen to show more than the default and thus bulk edit more at a time).
If you have too much content to remove it all then you need to edit the WXR file by hand to remove everything but the terms you want to keep.
Editing the WXR file to remove content
This can be a bit tricky but really if you look at the contents of the file it's not that hard to figure out what each element does. XML is like HTML with tags, so the main thing to be careful of is that you don't delete a closing tag while leaving the opening tag etc.
You'll find that there are 1-3 types of term definitions in the WXR, one type for Categories, one for "tags" and one for "terms". "Custom taxonomies" use terms while old-fashioned categories and tags have their own special format.
CATEGORY EXAMPLE
<wp:category><wp:term_id>8880</wp:term_id><wp:category_nicename>runner-up-proposals</wp:category_nicename><wp:category_parent>second-round-proposals</wp:category_parent><wp:cat_name><![CDATA[Runner-up Proposals]]></wp:cat_name></wp:category>

TAG EXAMPLE
<wp:tag><wp:term_id>122</wp:term_id><wp:tag_slug>ave-maria</wp:tag_slug><wp:tag_name><![CDATA[Ave Maria]]></wp:tag_name></wp:tag>

CUSTOM TAXONOMY TERM EXAMPLE
<wp:term><wp:term_id>8579</wp:term_id><wp:term_taxonomy>gv_tools</wp:term_taxonomy><wp:term_slug>digital-video</wp:term_slug><wp:term_parent></wp:term_parent><wp:term_name><![CDATA[Digital Video]]></wp:term_name></wp:term>

So what you want to do is remove all content other than these category/tag/term tags from the WXR file. Namely wp:author tags that come before and the many item tags that come after. Most importantly: Don't remove the closing /channel and /rss tags at the bottom! Without them the XML won't validate.
OBVIOUSLY you will test the results of importing your edited file before using it on a live website. Try importing it into a fresh install locally and see if it fails completely, then check the categories listing screen in wp-admin and make sure everything is exactly as you expected.
Good luck!
Comment: Note that this will not add a hierarchy to categories that have already been created. It will only assign parent categories to subcategories that don't already exist.
Answer: I solved this problem with 2 queries.
This is not the best way I suppose, but for sure not the safest.
Furthermore it assumes that you are working on the same database (if this is not the case you can easily export the query and then import into another db).
I've used it on an empty wordpress installation:
1 - Import the category's terms:
INSERT INTO newwp_terms
SELECT te.*
  FROM oldwp_terms te
  JOIN oldwp_term_taxonomy ta
    ON te.term_id = ta.term_id
 WHERE ta.taxonomy = 'category'
 ;

2 - Import categories relationships and descriptions
INSERT INTO newwp_term_taxonomy
SELECT term_taxonomy_id,term_id,taxonomy,description,parent,0
  FROM oldwp_term_taxonomy ta
  WHERE ta.term_taxonomy_id IN
          (
           SELECT ta2.term_taxonomy_id
             FROM oldwp_terms te
             JOIN oldwp_term_taxonomy ta2
               ON te.term_id = ta2.term_id
            WHERE ta.taxonomy = 'category'
         )
  ;

[A]nyway newwp_ refers to table into which you want to import while oldwp_ refers to source table
Answer: You cant export only categories (or taxonomies generally). Just export all content with Tools/Export and you can delete content except categories from xml.
Answer: What is your end goal here? Just to get a list of categories from one blog to another? Or, are you trying to move all of the content wihtin a category or categories to another WordPress install?
It kinda ugly, but you could export all content, then just delete the content within the categories or delete the categories that you don't want. It would probably be one of the quicker ways to your goal.
Answer: If you have access to the database tables you can do a mysql dump export of the wp_term_relationships, wp_term_taxonomy, wp_terms tables and import those into the new wordpress installation.  I just did this between two WP installs with over 300 categories and it worked fine.
Comment: thanks, this worked well on my end.
Answer: After daunting research and trying a lot of plugins, unfortunately, no one worked for me even, but I got lucky afterward when I came across a plugin that hasn't been updated in years but did work for me.
The plugin's name's :
WP Export Categories & Taxonomies
By timersys
Answer: I haven't been a coder for a while, so I found this simple way to get all the tags from a Wordpress website. Go to Posts >Tags and click and drag to select all the tags and other info. Copy and paste into an excel doc or spreadsheet program; the data will separate into several columns. The sixth column (slug) will have the tag separated from all the other data on the page. To remove the hyphens, just do a find/replace hyphens for single spaces. You may have several pages of tags, but it won't even take that long. I drop it into an AI program to remove extra hard returns or alphabetize if I add new ones. I do this to gather resources for SEO work. Certainly this is not a coder's answer, but I did find this thread needing the same answer, so in case someone like me finds this, I hope it helps!


Why is there no standardized size for violas?

Question: Unlike other string instruments, there is no standard size for violas. Is there a particular reason why for violas?
Comment: Interesting...TIL there's no standard size for violas!
Comment: Maybe, because there is no standard size for viola players, and the instrument is close to the practical size limit for playing it like a large violin, instead of like a very small cello.
Comment: There's no standard size for any string instrument, tho' violins may be the closest.  There are plenty of different "4/4" cello sizes.
Answer: There are standard sizes for Violas, mostly in the modern, mass-manufactured market. In the U.S. they are sized in inches, and have half-inch sizes available, starting at around 11 inches and going up to 17 inches. The size choice is based on the player's arm length, and you generally go for the largest size that is comfortable to play.
You will see more variation in handmade Violas than violins however. Like the violins, there are certain antique models that current models are fashioned after.  For example, you often see violins modeled after certain Stradivarius' instruments.  The classic makers experimented somewhat, and there is some variation in the instruments even with a single maker over the course of their making instruments.
With the violas you see a wider variation among the historical makers' models in size and dimensions, so modern patterns based on them will also have more variation. There also seem to be more makers that are copied than the violins, thus more sizes and shapes.
The size of the Viola is a trade-off also, making them smaller than they should be for optimal tone in order to increase play-ability.  Some dimensional changes are made to to the sizes to help get better tone in the smaller size.


Adobe Premier Pro CS6 crashes at startup

Question: I installed Adobe Premier Pro CS6 on Macbook Pro running 10.6.8 and keep getting error message (see screenshot). I have installed several other CS6 apps and they all worked, or worked after installing updates. Has anyone experienced a similar issue or know a solution? I have seen many reports of crashes once running but none upon startup.
Comment: have you tried fixing the permissions on your home folder?
Comment: @BroScience, I repaired permissions but still get same error message.
Comment: by chance are you also using VMWare Fusion? I have the same problem and suspect Fusion has changed the folder permissions, making me hesitant to change them back for fear of breaking Fusion.
Answer: I had a similar issue.  My Adobe Premiere Pro CS6 crashed, displaying a message that Adobe Premiere stopped working.
After checking all other things, I realized it was a graphics card issue. I am using a Dell laptop with AMD graphics card.  What fixed it for me:
First step, install Dell video drivers from their site and also install AMD autodetect, which detects your driver and downloads required updates. You need both Dell and AMD drivers.
Once it is done, at the startup you can see the GFX icon there change performance settings from balanced to high quality.


.NET Web Browser Control - SaveAs Event

Question: Does anybody know if you can access the SaevFileDialog control that's used by the WebBrowser control? Once somebody saves the webpage being displayed I need to catch where the files have been created; however I can't seem to find any events/members that allow me access to that information.
Answer: I'm pretty sure that you cannot access the Save As dialog that is provided by the WebBrowser control.
I'm not sure if you're writing a WinForms application or an ASP.Net application, but since you're using a WebBrowser control, I'm assuming that you're writing a WinForms application in which you want to show some HTML content.
In this case, if I wanted the end user to save to a specific location on their disk, I would provide my own Save button and in the button's Click event, I would read the text of the HTML displayed in the browser control (which can be done easily) and pass it to a System.IO.StreamWriter to save the contents to that file.
If you want to have the customers select where to save, then use a SaveFileDialog of your own in the button's Click event.
Comment: I thought about doing that; the problem is that I need to save all of the images as the standard webbrowser save dialog saves them; it seems a bit of a shame to have to  reproduce functionality that already exists simply because the webbrowser control doesn't allow access to its dialog events.
Answer: I agree with the first post in that you should create your own save button and stream the html document to file. This provides much more control. Alternatively, you can use WATIN for all sorts of cool stuff, including managing file download dialog boxes and events.

.NET Web Browser Control - SaveAs Event


First Explicit Irreducible Representations

Question: Although the classification of simple Lie Algebras and their representations is fully understood, I wonder whether there is some book with exhaustive tables describing explicit irreducible representations in low dimensions. For instance, it would be very helpful for me to know which are the first irreducible representations of $\mathfrak{so}(7)$ and $\mathfrak{so}(8)$ (up to dimension 30, say).
Comment: How would the "induced by" be continued?
Comment: What sort of description are you looking for?
Comment: @TobiasKildetoft Something like '$\mathfrak{so}(7)$: In dim. 1, just the trivial representation. In dim. 7, we have 3 (say) inequivalent representations induced by...'.
Comment: @TobiasKildetoft Well, only if it may be easily described. Vincent's proposal is quite the approach i was looking for.
Answer: If all you really want to know are the irreducible representations of ${\frak{so}}(7)$ and ${\frak{so}}(8)$ up to dimension $30$, I can save you the trouble of looking up these tables:
For ${\frak{so}}(7)$, there are the following irreducible representations with dimensions below $30$:

$\mathbb{R}^1$ (the trivial representation)
$\mathbb{R}^7$ (the 'vector' or 'standard' representation)
$\mathbb{R}^8$ (the 'spinor' representation)
$\mathbb{R}^{21}$ (the 'adjoint' representation, i.e., 7-by-7 skew-symmetric matrices)
$\mathbb{R}^{27}$ (the traceless symmetric 7-by-7 matrices, i.e., $S^2_0(\mathbb{R}^7)$)

Of course, you probably really also want a couple more, such as

$\mathbb{R}^{35}$  (traceless symmetric 8-by-8 matrices, i.e., $S^2_0(\mathbb{R}^8)$; also equals $\Lambda^3(\mathbb{R}^7)$)
$\mathbb{R}^{48}$  (the 'other' irreducible component in $\mathbb{R}^7\otimes \mathbb{R}^8 \simeq \mathbb{R}^8 \oplus \mathbb{R}^{48}$)

For ${\frak{so}}(8)$, there are the following irreducible representations with dimensions below $30$:

$\mathbb{R}^1$ (the trivial representation)
$V = \mathbb{R}^8$ (the 'vector' or 'standard' representation)
$S_+ = \mathbb{R}^8$ (the 'plus spinor' representation)
$S_- = \mathbb{R}^8$ (the 'minus spinor' representation))
$\Lambda^2(V) = \Lambda^2(S_+) = \Lambda^2(S_-) = \mathbb{R}^{28}$ (the skew-symmetric 8-by-8 matrices)

But, you might want a few more, such as

$S^2_0(V) = \mathbb{R}^{35}$ (traceless symmetric 8-by-8 matrices)
$S^2_0(S_+) = \mathbb{R}^{35}$ (traceless symmetric 'plus spinor' squares)
$S^2_0(S_-) = \mathbb{R}^{35}$ (traceless symmetric 'minus spinor' squares)

(Note that $\Lambda^4(V) = \Lambda^4_+(V)\oplus \Lambda^4_-(V)
= S^2_0(S_+)\oplus S^2_0(S_-)$, while $\Lambda^4(S_+) = S^2_0(S_-)\oplus S^2_0(V)$, etc.)

$\Lambda^3(V) = \mathbb{R}^{56}$ (vector $3$-forms = 'other' component in $S_+\otimes S_- = V \oplus \Lambda^3(V)$)
$\Lambda^3(S_+) = \mathbb{R}^{56}$ (plus spinor $3$-forms = 'other' component in $S_-\otimes V = S_+ \oplus \Lambda^3(S_+)$)
$\Lambda^3(S_-) = \mathbb{R}^{56}$ (minus spinor $3$-forms = 'other' component in $S_+\otimes V = S_- \oplus \Lambda^3(S_-)$)

That should be enough to get you started, including knowing the irreducible decompositions of the exterior powers of the three $8$-dimensional representations.
The next smallest irreducible has dimension 112.
Comment: @SaalHardali:  Yes, that was from memory.  From time to time, I've had to use details of the representation theory of these two algebras in my work in differential geometry, and the above are some of the facts about them that I learned and have found useful again and again.
Comment: Thank you very much, really. There is a big effort in your answer, and for sure it will be most helpful for me. Thanks!!
Comment: @Robert Bryant Was this from the top of your head? If not where can one find this kind of data. I know where to find tables which give dimensions and weights but this kind of data (i.e. using as much linear algebraic operations $\bigwedge^n, S^n$ decomposition of these etc...$ is much more helpful from a theoretical perspective. The only way I had success with aquiring such descriptions was by computing by myself small examples.
Comment: it should be straight forward to automate finding such expressions : GAP for example can construct all these representations explicitly and can give decompositions of symmetric and exterior products..
Answer: I think "Group Theory for Unified Model Building" by R. Slansky qualifies. As the title suggests it is written with an application in physics (beyond my understanding) in mind, but the tables are very useful for purely mathematical purposes as well. (Disclaimer: it is quite some years ago that I last read it.)
Answer: Besides Slansky's paper (1981) there are also

Tits, Jacques
Tabellen zu den einfachen Lie Gruppen und ihren Darstellungen (1967);
McKay, W. G.; Patera, J.
Tables of dimensions, indices, and branching rules for representations of simple Lie algebras (1981);
McKay, W. G.; Patera, J.; Rand, D. W.
Tables of representations of simple Lie algebras. Vol. I.
Exceptional simple Lie algebras (1990).


College tuition Discrimination based on family income

Question: Why can a college charge higher tuition rates for rich kids vs poor or middle class kids? Isn't this discrimination based on family income? A rich person pays the same amount as a poor person when it comes to purchasing anything but that is not the case when it comes to college tuition.
Comment: @Nij:Some institutions grant aid or scholarships directly, and refer to it  as lowering the price. Harvard, for example, says on the affordability section of their website that  "If your family's income is less than $65,000, you'll pay nothing."(Direct quote).
Comment: Are you in the USA?  Here, rich people aren't a protected class and can be discriminated against.  I guess that's also why rich people get to pay more in taxes.
Comment: Evidence of the presumptive in the question would be advisable. I have never seen a tertiary institution apply means-testing to determine the tuition costs.
Answer: In the US at least, discrimination is legal (and sometimes even required) unless it is discrimination against specific, protected characteristics, and even then it is sometimes allowable if it is "necessary".
Income, whether of an individual or that individual's family, is not in any list of protected characteristics. As such, discrimination upon it is fully legal.
Answer: Technically, they charge a lower rate to certain means-qualified students, by offering assistance to those with an income below some number. This is legal because it hasn't been made illegal. In general, anyone if free to give assistance to someone on the basis of income. The closest you can get, in the US, to laws prohibiting discrimination based on income is some states have law against discrimination based on source (not level) of income, e.g. RCW 59.18.255.


Is there a generalization of Borel-Weil-Bott theorem for not completely reducible vector bundles?

Question: Let G be simple algebraic group, P its parabolic subgroup. Then the category of G-equivariant vector bundles on G/P is equivalent to the category of representations of P. Borel-Weil-Bott tells us how to compute cohomology of the bundles corresponding to irreducible representations of P, and so also of the bundles corresponding to completely reducible representations of P.
But some important G-equivariant bundles on G/P are not completely reducible, for example the tangent bundle of $\operatorname{SO}(2n+1)/P_i$, where $P_i$ is the i-th maximal parabolic subgroup of $\operatorname{SO}(2n+1)$. So my question is: is there a way to compute cohomology of such bundles?
Maybe there exists some class of groups including parabolic subgroups of reductive groups and some class of representations of such groups which is larger than completely reducible representations but still manageable?
Comment: Try to look at the classical papers by Kostant (http://www.math.tamu.edu/~jml/kostant61.pdf) especially the second one.
Answer: I'm not aware of any generalization that is strong enough to compute the cohomology of such bundles completely, but you can at least use the Borel--Weil--Bott theorem to get some vanishing results. This was already done by Bott in his 1957 Annals paper to show that the cohomology of the tangent bundle $T$ of $G/P$ vanishes in degree > 0. The first step of this computation is to note that the action of $P$ on the tangent space at $P/P$ can be identified, as a $P$-module, with $\mathfrak g/ \mathfrak p$ (with $P$ acting via Ad). Consequently, the short exact sequence of $P$-modules
$$ 0 \to \mathfrak p \to \mathfrak g \to \mathfrak g / \mathfrak p \to 0 $$
yields a short exact sequence of $G$-equivariant vector bundles
$$ 0 \to G \times_P \ \mathfrak p \to G \times_P \ \mathfrak g \to T \to 0 $$
on $G/P$. The middle bundle is trivial, and so we get an isomorphism $H^q(G/P, T) \cong H^{q+1}(G/P, G \times_P \ \mathfrak p)$ for all $q>0$.
It remains to compute $H^\ast(G/P, G \times_P \ \mathfrak p)$. For this, a vanishing result of the Borel--Weil--Bott type is useful. This result states that if you have a $G$-equivariant vector bundle $\mathcal V = G \times_P V$ on $G/P$ then $H^q(G/P, \mathcal V) = 0$ unless $q$ is equal to the index of some nonsingular $\mu + \rho$, where $\mu$ is one of the highest weights of $V$.
For the details, you can either try Bott's original paper, or checkout section 11 of this paper of Dennis Snow. Another paper of potential interest is

P.A. Griffiths, Some geometric and analytic properties of homogeneous complex manifolds. I. Sheaves and cohomology, Acta Math. 110 (1963), 115–155.
Answer: I have dealt with this situation many times, and as far as I can tell, you just need to chase some long exact sequences (or spectral sequences if you want).
There is a paper by Ottaviani and Rubei http://arxiv.org/abs/math/0403307 that translates the problem of calculating cohomology of a homogeneous bundle (when the base space is a Hermitian symmetric variety) into doing some calculations over some quiver with relations. I was never able to actually use this to get an answer, but it may be interesting for you.


How can I lose 100 pounds?

Question: Is there a FREE 1200 to 1400 calorie diet plan that has regular food (like normal food you buy in a local store) with no Hummas or Lamb or soy beans, something like eggs bread beans and rice burgers fruits that kind of food nothing fansy. It there a step by step day by day for 21 days straight diet menu that I can just praint out buy the food at my local Walmart and just do the 21 day 1200 to 1400 calorie diet until I lose the 100 pounds
Answer: Here's the deal, losing 100 pounds is a wholesale lifestyle change.  Now I personally paid for help, as I needed that accountability and someone to help troubleshoot when the weight wasn't coming off that week.  If you check out my profile, you'll find a bit about my story and where I went to lose weight.  However, while the principles I learned there will also work for you, the supplements that are part of that program don't apply to your wishes.
If you want to succeed, then you need to learn how to manipulate your pancreas.  That is the one thing that has been proven to work time and time again.  Essentially, low carb/high protein (in proportions) is the quickest way to safely lose weight.  Unfortunately you aren't going to find something so simple as what you are asking for.
If you are serious about losing weight (without exercise):

Get someone to hold your feet to the fire.  Your willpower alone is too weak, and the very act of someone reviewing your food diary will help you say "no" to foods you would normally say yes to.
Read nutrition labels, you will need to shop differently.
Find out how much body fat you have (even a rough estimate will work).  This is what you will use to track progress.
You need to eat 0.5g protein for every pound of lean mass you have.  Lean mass is how much you would weigh without the fat.  Whole protein sources here, like meat (chicken, lean beef, pork chop, fish [best source right there])
You will need to eat 4 servings of green vegetables a day.  You want the carb count to be low.
Choose how serious you are going to be: go in to ketosis or a slower route.  To go in to ketosis you can not have any more than 40g of carbs a day.  While you are losing weight you want to cut carbs as much as possible.
Ketosis will be quicker, but the protein is that much more important.  In fact you may want to temporarily increase the amount of protein you are eating to protect your muscles and organs.  If you skimp on protein your body will convert the muscle mass and organs to blood sugar--and that will slow your metabolism down requiring even deeper calorie deficits to compensate.  Protein is a non-negotiable part of ketogenic diets.

Get used to serving sizes like this:

2 whole eggs at a meal
7oz seafood (fish, lobster, etc.)
5oz land meat (chicken, beef, lamb, etc.)

Get used to saying "Don't finish it in butter" when you go out.  Get used to saying no to carbs until you reach your goal weight.
I've answered why this works several times before.  If you go to my profile and look at the answers I've given, you'll understand a whole lot more.
Comment: +1 upvote for I like your clear enlightening explanation, thanks! I lost 37kg this past year, so that needs about 8kg more additional weight to answer this Question, not to mention I can't explain as good as yours unless I allocate much more time to put my diet **practice** into _words_. What I remember is I only use corn oil to eat fried food twice a week maximum, each serving only 1-2 tea spoon. Now I can add some of your recipe to my recipe to try. I just love varieties.
Answer: Here is a brief summary of a diet plan http://www.fourhourworkweek.com/blog/2007/04/06/how-to-lose-20-lbs-of-fat-in-30-days-without-doing-any-exercise/ it's not so much about restricting calories as it is upping your protein intake, and cutting out other various food types.  It's very simple and easy to follow, but it can get plain eating the same things over and over if you don't spice it up some.  Theres probably plenty of other posts about it with more detailed instructions if you google the slow carb diet.  Or if your interested you could get the book on amazon.  It's worked for me.

How can I lose 100 pounds?


Will two coherent sources of orthogonal polarization angle form the known interference pattern or there will be difference?

Question: if i have a laser beam then i split it into two beams with ratio 1 : 1 then i take one of them to  change its polarization angle (90) degree by passing it through an optically active substance then we make an interference between them both,  does the interference pattern change
what i really want to understand in the above problem is.. when the two beams are  orthogonally polarized when they meet, the two electric fields (of the light beams) will be perpendicular to each other and so the magnetic fields, how can the electric field interfere with the magnetic field?
Comment: Related: https://physics.stackexchange.com/questions/195110/interference-of-beams-with-different-polarizations, and I thought we had a more exact duplicate, but it didn't turn up in my search.
Answer: In a typical double slit experiment set up, you will probably not see an interference pattern, the intensity you see on the screen will be roughly the sum of the intensities due to individual beams.
The details of the intensity pattern on a screen will depend on your setup: how far away you are from the slits, their spacing, even what the slits are made of if your screen is very close to the slits.
The intensity of on the screen is proportional to the component of the average Poynting vector normal to the screen. For harmonic waves, the Poynting vector is
$$ \vec{S} =\frac{1}{2} \vec{E} \times \vec{H}^* = \frac{1}{2} (\vec{E}_1 + \vec{E}_2) \times (\vec{H}^*_1 + \vec{H}^*_2) = \frac{1}{2} \vec{E}_1 \times \vec{H}^*_1 + \frac{1}{2} \vec{E}_2 \times \vec{H}^*_2 + \frac{1}{2} \vec{E}_1 \times \vec{H}^*_2 + \frac{1}{2} \vec{E}_2 \times \vec{H}^*_1 $$
$$ = \vec{S}_1 + \vec{S}_2 + \frac{1}{2} \vec{E}_1 \times \vec{H}^*_2 + \frac{1}{2} \vec{E}_2 \times \vec{H}^*_1 $$
where $\vec{S}_1$ and $\vec{S}_2$ are the Poynting vectors due to individual slits. The cross terms are the tricky part.
If the screen is far away from the slits, then the waves are very well approximated by TEM waves, meaning $\vec{E}$ and $\vec{H}$ due to each source are orthogonal. For each source, we can write
$$ \vec{H}=\frac{1}{\eta}(\hat{n}\times\vec{E}) $$
where $\eta = \sqrt{\mu/\epsilon}$ is known as the wave impedance of the propagation medium and $ \hat{n} $ is the unit normal vector along the direction of propagation. Using vector identities, the first cross term is
$$ \frac{1}{2} \vec{E}_1 \times \vec{H}^*_2 = \frac{1}{2\eta^*} \vec{E}_1 \times (\hat{n}_2\times\vec{E}_2^*) = \frac{1}{2\eta^*} (\vec{E}_1·\vec{E}_2^*) \hat{n}_2 + \frac{1}{2\eta^*} (\vec{E}_1·\hat{n}_2) \vec{E}_2^*. $$
The first term is zero since the E-fields are orthogonal. Adding the second cross term, the total Poynting vector is
$$ \vec{S}=\vec{S}_1 + \vec{S}_2 + \frac{1}{2\eta^*} (\vec{E}_1·\hat{n}_2) \vec{E}_2^* + \frac{1}{2\eta^*} (\vec{E}_2·\hat{n}_1) \vec{E}_1^* $$
If $\hat{N}$ is the unit vector normal to the screen (pointing into the screen), the brightness on the screen is proportional to
$$\textrm{Re}(\vec{S}·\hat{N}) = \textrm{Re}(\vec{S}_1·\hat{N}) + \textrm{Re}(\vec{S}_2·\hat{N}) + \textrm{Re}\left[\frac{1}{2\eta^*} (\vec{E}_1·\hat{n}_2) (\vec{E}_2·\hat{N})^* + \frac{1}{2\eta^*} (\vec{E}_2·\hat{n}_1) (\vec{E}_1·\hat{N})^*\right]. $$
For a distant screen, near the center of the intensity pattern, the unit normals $\hat{n}_1$ and $\hat{n}_2$ are approximately the same, with the angle between them roughly equal to the angular separation of the two slits as seen from the screen. This means the factors $\vec{E}_1·\hat{n}_2$ and $\vec{E}_2·\hat{n}_1$ are close to $\vec{E}_1·\hat{n}_1 = \vec{E}_2·\hat{n}_2 = 0$, so the dot products contribute a factor no more than $|\sin(\Delta\theta)|$ where $\Delta\theta$ is this angular separation. Furthermore, the E-fields are roughly orthogonal to the screen, with the angle between the E-fields and $\hat{N}$ no more different from $90^\circ$ than $90^\circ \pm \theta$, where $\theta$ is the angular distance of the point on the screen from the center of the screen, as viewed from the slits, so these dot products contribute a factor no more than $|\sin(\theta)|$. Consequently, the intensity pattern can be expressed as
$$ I=I_1 + I_2 + I_{cross}, $$
with
$$ |I_{cross}| \le 2\sqrt{I_1 I_2} |\sin(\theta)| |\sin(\Delta\theta)|. $$
In most double slit setups, $|\sin(\Delta\theta)\sin(\theta)|$ will be so small that you can safely assume you will not see an interference pattern.
Comment: Its not clear whether the question refers to double slit or possibly some kind of interferometer in her/his setup. We know that in the EM field, EM waves must superimpose as observations show beams do not "interfere" with each other when crossed for example.
Comment: In the classical world we say there is "interference" when we see a dark (or bright spot) on a screen, but we also know that interference in the dark spots would be a violation of energy conservation.  There are mounds and mounds of papers thru the early 1900s and education that tries to explain this classically, but it is not until we understand the wave function of light that we realize dark spots are where there is no energy or no photons as pathways here are not allowed.
Answer: There will be an interference pattern, but not a visible interference pattern.
This is easily demonstrated: place a polarizing filter in the region where the two beams overlap, and a visible fringe pattern will appear downstream within that region.
If a polarization-sensitive recording material is placed in the region of overlap, a hologram will be recorded in the form of planes of equal birefringence -- instead of the usual form which is planes of equal refractive index or of equal absorption.
Answer: No, in this situation there will be no interference pattern. Changing the relative phase between those two polarizations (which is what happens when you look at different points on the screen) will change the resulting polarization from diagonal to circular to antidiagonal and back to circular, but it won't affect the intensity.
Answer: In the typical 2 slit interference experiment the interference is old classical thinking.  The modern explanation is not interference but that the pattern is formed by allowed paths ( n wavelength multiples) the dark areas have no photons present and the bright spots have many photons.  Thus polarizing the beam has no effect.
Comment: Classical electrodynamics is certainly capable of predicting/explaining the outcome of such an experiment, except possibly at extremely low intensities. The claim that changing the polarization of one of the beams has no effect on the outcome is also incorrect, whether you use quantum mechanics or not. Photons are "polarized": in this case the optical mode of interest that photons occupy is the one in the form of the superposition of two cross-polarized fields. This is a different problem than if these fields had the same polarization.
Comment: The question itself is a little confusing as written, my interpretation is to take the simple double slit experiment and illuminate it with polarized light and then add a second polarized source at 90 degrees to the first of equal intensity.  There will be no observed difference in the pattern accept that it is twice as bright.