I'm trying to design a raspberry pi HAT prototype and I came across this circuit below. I'm not familiar with power electronics but i'm curious of what this circuit is trying to accomplish. Any help would be appreciated. Thanks   Image of schematics
The Raspberry Pi B+ models have a protection circuit between the USB connector and the 5V net on the board.  They recommend putting a similar protection circuity on a Pi HAT before 'backpowering' the pi through its GPIO header along with a polyfuse.  I understand why this is the recommendation, but I'd like to understand more about how this circuit works.  I did some searching before posting this question and found information on using a MOSFET as a low voltage drop diode, but they all had the gate wired directly to ground without the pair of PNP's and the resistors.  What are they doing for this circuit?  Also, is this primarily using the body diode?  In which case, what's the relevant info on the datasheet that qualifies DMG2305UX for this application?  In the other circuits I found, it appeared low Rdson and Vgsth compatible with the circuit seemed like the relevant characteristics.
"He was telling me that he is going..." vs. "He told me that he is going..." LM393 voltage comparator is not working Parsing JSON from URL Any reason to have a strong user password? I recently decided to change my (very) strong user password to something trivial.  This was mostly to eliminate frustration with typing a long password each time I sudo or whatever.  My question is, is there any reason to have a strong user password? considering that most services which I run on my box do not use PAM for auth:   apache2 - uses .htpasswd for access   sshd - only private keys allowed   transmissiond - uses its own http auth   mpd - uses its own auth   samba - limited to LAN   Physical access to the box is out of the question. How to find the build / version of Windows 10 During the beta of Windows 10 it was hard know what version you were running unless it had it posted to the desktop. Once that wasn't there - how do you tell what version / build you are running?   This will become more of an issue as Microsoft starts releasing more builds with the new update mechanism. Suppose you do bad in undergraduate school in say computer science. But you do very well in a masters program in computer science. If you want to apply to a PhD program in computer science, will the masters degree grades offset the undergraduate degree grades? "This one is" OR "This is" I have seen people using "This one is Daddy's" with the word "one" before a form of the verb be. I am confused about which is more accurate, to use:     This is Daddy's.   or     This one is Daddy's.   Hope you can address my concerns, thank you. Short story about survivors on Earth after the atmosphere has frozen This is a short story I read maybe in the '80s.  Earth has been thrown away from the Sun, probably due to a very large object passing through the Solar System, and the atmosphere has frozen in layers. There is a small family - father, mother, two children, who live in a room they have made airtight by hanging many layers of material to slow the loss of air. They keep warm with a 'camp-fire'. The father goes out every day in a suit of some sort to find food and mine frozen oxygen. It ends when they are found by another, larger group of survivors.  Does anybody know the title and author? I've tried different ways to install iTunes, but to no avail. I tried with Wine, but it didn't work. Is it possible to have iTunes on Ubuntu? If the $n^{th}$ partial sum of a series $\sum a_n$ is $S_n = \dfrac{n-1}{n+1}$, find $a_n$ and the sum.  By definition,  the sum of the series is the $\lim n\to\infty$ of it's $n^{th}$ partial sum.  $$\text{ Sum = } \lim_{n\to\infty} = \dfrac{n-1}{n+1} = 1$$  I am asked to find $a_n$. How do I do this? What is the procedure? I have a quite wide monitor and it's quite annoying to see the login dialog in the login screen on the far left side of my screen. I literally have to turn my head around to look at it!  Is there a way to center the login dialog? Can “whose” refer to an inanimate object? Custom unique constraint, only enforced if one column has a specific value Is volunteer work allowed in the US while visiting under the VWP or a B1/B2 visa? I am going to Santa Monica for 4 weeks to polish my English in July and would like to volunteer at the Planetary Society located in Pasadena.  I am a Swiss citizen and have a biometric passport. However, I don't have any special visa, as there is no visa needed for the school I am attending and using the Visa Waiver Program, I am allowed to stay up to 90 days in the US.  Am I allowed to do volunteer work during my stay? Should we MAC-then-encrypt or encrypt-then-MAC? Most of the time, when some data must be encrypted, it must also be protected with a , because encryption protects only against passive attackers. There are some nifty encryption modes which include a MAC (, ...) but let's assume that we are doing old-style crypto, so we have a standalone encryption method (e.g. AES with CBC chaining and PKCS#5 padding) and a standalone MAC (e.g.  with SHA-256). How should we assemble the encryption and the MAC?   MAC-then-Encrypt: Compute the MAC on the cleartext, append it to the data, and then encrypt the whole? (That's what  does) Encrypt-and-MAC: Compute the MAC on the cleartext, encrypt the cleartext, and then append the MAC at the end of the ciphertext? (That's what SSH does) Encrypt-then-MAC: Encrypt the cleartext, then compute the MAC on the ciphertext, and append it to the ciphertext? (In that case, we do not forget to include the initialization vector (IV) and the encryption method identifier into the MACed data.)   The first two options are often called "MAC-then-encrypt" while the third is "encrypt-then-MAC". What are the arguments for or against either? How can I get grub2 to boot a different option only on the next boot? Bash scripts ran from from gnome/nautilus don't have environment variables In my ~/.bashrc and ~/.profile I have some variables set to some filepaths:  export MY_VAR1="/path/to/somewhere"   In my ~/bin/ (which is added to my PATH) I have a few scripts that rely on those variables being set.  If I run those commands from the terminal, they work as expected.  However, if I try to double click on a script in Nautilus and run it, it runs as if those variables were not set.  Same thing happens if I add one of the scripts to Gnome's "Startup Applications" using the GUI utility or if I add them to the Gnome menu using the "Main Menu" GUI utility.  I would've thought that since I included these variables in my ~/.profile, which is run at login that gnome and nautilus and processes spawned by them would have access to those variables.  Both Gnome and Nautilus are run under my login user. All my scripts in ~/bin have the bash shebang at the top.  I am new to bash scripting, sorry if I am missing something obvious. I am using Debian Wheezy and Gnome3. Are there any stats about the percentage of close reasons used to close questions   Successfully (preferably, based on the number of closed questions) Unsuccessfully (alternatively, the total percentags of close votes cast by users)   ?   Is there any way to get this from the query explorer? How do I get rid of my bounty? I accidentally killed a noble, now every guard wants to kill me. Is there any way I can get rid of the bounty? MacBook [Pro] - how many displays, what resolution/frequency?