OK. So I am developing a simple stand alone device. It has a sensor module that takes in 12V and another PCB that takes in anywhere from 5V to 12V.  Now, I am running this entire device using Mains supply. My Question is, is there a way, wherein, the device will automatically Switch to a battery supply when the Mains supply fails?  I have read on this topic a little bit and have come across devices called Power Path Controllers.  Will a simple Relay also do? I attach the Common terminal to the Input of my circuit. Like the diagram shown below.  Might that work? Any advises?  I need this switching to happen automatically. Without any human interference. Also, it would be an additional positive if my microprocessor could tell which supply is giving power.
I've found several answers on switching between an Adapter and a Battery. But I need to autmoatically switch between two batteries. One of them is 'hotplugable'.  Problem: I've got a Solarcell which charges a ~16000mAh Li-Ion battery (BATa). Once in a while, the Solarcell doesn't manage to charge the battery enough. It's crucial that I have 3.0 to 4.1 Volts on my VSYS but the voltage will drop below this value if the Solarcell wasn't able to do its job (cloudy weather, vulcano eruption [joke], dirty cells, etc).  My Plan: I've come up with the idea to feed the VSYS with a additional, hotplugable backup battery (BATb) which does get connected to VSYS if BATa drops below ~3.1v.  So basically I need a Low-Voltage-Cutoff (using a Z-Diode with a Mosfet?) which, when cutoff happens, opens another Mosfet..?         &ndash; Schematic created using   I'm not sure about the selection of M2 and how to wire it, so it will be conductive if M1 won't forward power anymore.  And I know about another electrical problem: Just using a Z-Diode (D1) with M1 will render M1 to something like a resistor, not a switch. I've read, that I could use something like a Shut Reference (i.e. TI's TL43xx). Again I'm not sure how to chose the correct one and how to wire it.
Can I tap a creature with summoning sickness to pay "tap an untapped creature you control" costs? I have a  on the battlefield and I played a vampire earlier this turn. Can I tap both to transform Chosen of Markov even though I just played the vampire?  Extra Example: I play  to put two 1/1 white bird tokens into play. Can I now tap a both of them and another creature I control to pay Battle Screech's flashback cost of tapping three white creatures?   Obviously these creatures couldn't use any tap abilities until my next turn, but since the tapping is coming from a different source, I figured the situation might be different. states that the relationship between current ( I ) voltage ( V ) and resistance ( R ) is  $$I = \frac{V}{R}$$  However  cause the resistance of a material to go to zero, and as I understand it, as $R \to 0$, $I \to \infty$. Does this present a problem for Ohm's law? How to move Ubuntu to an SSD My current situation is:   One hard disk Dual boot Ubuntu 11.04 and Windows 7. Partitions:  100MB Windows System thingy 144GB Main Windows 160GB Ubuntu 4GB Swap 12GB System Restore stuff    Now I want to install an 80GB SSD and move Ubuntu to it. AFAIK I need to:   Shrink the 160GB Ubuntu partition to 80GB Copy it over to the SSD Change fstab to mount the SSD as /   How do I do the second? And what do I need to do about Grub? I know that if the moment generating function of two distribution converges to the same function then the two distribution converges in CDF. But how can we prove this thing explicitly ? Object appears smoothed after rendering but not in viewport If $S_n$ has cyclic subgroups of these orders or not? This question was asked in my quiz and I am having difficulties in solving it .  Question : For a positive integer $n$ , let $S_n$ denote permutation group on $n$ symbols. Choose correct statements from below. (a) For a positive integer $n$ and for every $m$ with $1\leq m \leq n , S_n $ has a cyclic subgroup of order $m$; (b) For every positive integer $n$ and for every $m$ with $n&lt;m &lt;n!$, $S_n$ has a cyclic subgroup of order $m$; (c) There exists positive integers $n$ and $m$ with $n&lt;m&lt;n!$ such that $S_n$ has a cyclic subgroup of order $m$; (d) For every positive integer $n$ and for every group $G$ of order $n$, $G$ is isomorphic to a subgroup of order $S_n$ .  Attempt: (a) is true as I can choose an element of length $m$ which will generate cyclic subgroup of order $m$. (b) Choose $n=4$ and $m=19$ to contradict (b). (c) I dont know if there can be found any such case and if yes how to do so . (d) I dont know about it . kindly tell. Answer:   A,C,D are true I have made a fancy title page using titleformat and tikz, but I now face the following problem. The \chaptertitlename command returns \chaptername or \appendixname. I would like to spread the letters of the text returned by \chaptertitlename to a given length.  For example I would like to be able to call: \mycommand{\chaptertitlename}{3cm} in order to space the letters of \chaptertitlename on a total length of 3cm. How to do that ?  EDIT: This example illustrates a nearly working thing:  \documentclass[11pt]{article} \usepackage{fontspec} \newcommand{\spreadletters}[2]{\makebox[#2][s]{#1}}  \begin{document} \spreadletters{m y w o r d}{3cm} \end{document}   How to convert myword to m y w o r d ?  EDIT 2: Can someone explain me why the first work and not the second one (and how to make it work) ?  \documentclass[11pt]{book} \usepackage{fontspec} \usepackage{seqsplit} \usepackage[explicit]{titlesec}  \newcommand{\spreadletters}[2]{\makebox[#2][s]{\seqsplit{#1}}}  \begin{document} \chapter{First} \spreadletters{myword}{10cm} \linebreak % This is working \spreadletters{\chaptertitlename}{10cm} % This is not working \end{document} Recommendations for good Newtonian mechanics and kinematics books What software is used to generate the reputation graphs on Stack Exchange? I'm particularly interested in the zooming functionality which is done very well. Were these graphs generated using off the shelf software or were they coded from scratch? The [ifs] tag is used for 2 separate things I think  might correspond to IBM's  according to this .   But currently out of the 27 question tagged with , most of it have to do with the 's "Internal Field Separator".  What should be done here?   create a new tag for "Internal Field Separator" e.g. , and keep the IBM's under ? create a new tag for "Integrated File System" e.g. , and keep the other one under ? just remove the  tag from the  questions? Hello,  I'm getting this error every time when I boot my computer. My Ubuntu installation is fresh and I was got a few error on last step while install Ubuntu (because i have problem with my CDROM driver). Anyway, installation is continued .   For example when i tried to open ADDITIONAL DRIVER and LANGUAGE SUPPORT (on System Settings) nothing happened, it's not opening.  When i try this in terminal gnome-language-selector i'm getting this error  Traceback (most recent call last):   File "/usr/bin/gnome-language-selector", line 8, in &lt;module&gt;     from LanguageSelector.gtk.GtkLanguageSelector import GtkLanguageSelector   File "/usr/lib/python2.7/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", line 34, in &lt;module&gt;     from aptdaemon.gtk3widgets import AptProgressDialog   File "/usr/lib/python2.7/dist-packages/aptdaemon/gtk3widgets.py", line 61, in &lt;module&gt;     class AptStatusIcon(Gtk.Image):   File "/usr/lib/python2.7/dist-packages/aptdaemon/gtk3widgets.py", line 66, in AptStatusIcon     def __init__(self, transaction=None, size=Gtk.IconSize.DIALOG): AttributeError: type object 'GtkIconSize' has no attribute 'DIALOG'   Also getting this error for jockey-gtk  Traceback (most recent call last):   File "/usr/bin/jockey-gtk", line 418, in &lt;module&gt;     sys.exit(u.run())   File "/usr/lib/python2.7/dist-packages/jockey/ui.py", line 461, in run     self.ui_show_main()   File "/usr/bin/jockey-gtk", line 81, in ui_show_main     col_icon.set_sizing(Gtk.TreeViewColumnSizing.AUTOSIZE) AttributeError: type object 'GtkTreeViewColumnSizing' has no attribute 'AUTOSIZE'   I'm worrying about are there any lack . I don't know what's wrong with my installation.  Are there any way, check my installation (packages, files etc..) . Portrait for phone, landscape for Tablet (Android-Layout) I just upgraded my texlive distribution and can no longer insert space in table rows using \\[x pt] syntax when colortbl is loaded.  It seems that recent changes to array.sty might be the problem as this is the only package to change recently.  Can anyone suggest a workaround?  MWE  \listfiles \documentclass{article} \usepackage{colortbl} \begin{document} \begin{tabular}{l}   \hline   No space below with \texttt{colortbl.sty} loaded. \\[10mm]   \hline \end{tabular} \end{document}   File versions in use:   article.cls    2014/09/29 v1.4h Standard LaTeX document class   size10.clo    2014/09/29 v1.4h Standard LaTeX file (size option) colortbl.sty    2012/02/13 v1.0a Color table columns (DPC)    array.sty    2018/04/07 v2.4g Tabular extension package (FMi)    color.sty    2016/07/10 v1.1e Standard LaTeX Color (DPC)    color.cfg    2016/01/02 v1.6 sample color configuration   pdftex.def    2018/01/08 v1.0l Graphics/color driver for pdftex Rough Smart objects problem in Photoshop I am using Adobe CC(2015) latest version and the behaviour of the smart objects isn't normal. When I paste a vector from Illustrator to Photoshop, the vector looks low quality or rough.   ORIGINAL  IN PHOTOSHOP   However, if I click over the smart object layer(in Photoshop)and this is opened in Illustrator, the vectors looks as the original one.   VECTOR OPENED IN ILLUSTRATOR FROM PHOTOSHOP SMART OBJECT   How can I solve this? The canonical way to return multiple values in languages that support it is often . Option: Using a tuple Consider this trivial example: def f(x):   y0 = x + 1   y1 = x * 3   y2 = y0 ** y3   return (y0, y1, y2)  However, this quickly gets problematic as the number of values returned increases. What if you want to return four or five values? Sure, you could keep tupling them, but it gets easy to forget which value is where. It's also rather ugly to unpack them wherever you want to receive them. Option: Using a dictionary The next logical step seems to be to introduce some sort of 'record notation'. In Python, the obvious way to do this is by means of a dict. Consider the following: def g(x):   y0 = x + 1   y1 = x * 3   y2 = y0 ** y3   return {'y0': y0, 'y1': y1 ,'y2': y2}  (Just to be clear, y0, y1, and y2 are just meant as abstract identifiers. As pointed out, in practice you'd use meaningful identifiers.) Now, we have a mechanism whereby we can project out a particular member of the returned object. For example, result['y0']  Option: Using a class However, there is another option. We could instead return a specialized structure. I've framed this in the context of Python, but I'm sure it applies to other languages as well. Indeed, if you were working in C this might very well be your only option. Here goes: class ReturnValue:   def __init__(self, y0, y1, y2):      self.y0 = y0      self.y1 = y1      self.y2 = y2  def g(x):   y0 = x + 1   y1 = x * 3   y2 = y0 ** y3   return ReturnValue(y0, y1, y2)  In Python the previous two are perhaps very similar in terms of plumbing - after all { y0, y1, y2 } just end up being entries in the internal __dict__ of the ReturnValue. There is one additional feature provided by Python though for tiny objects, the __slots__ attribute. The class could be expressed as: class ReturnValue(object):   __slots__ = [&quot;y0&quot;, &quot;y1&quot;, &quot;y2&quot;]   def __init__(self, y0, y1, y2):      self.y0 = y0      self.y1 = y1      self.y2 = y2  From the :  The __slots__ declaration takes a sequence of instance variables and reserves just enough space in each instance to hold a value for each variable. Space is saved because __dict__ is not created for each instance.  Option: Using a  (Python 3.7+) Using Python 3.7's new dataclasses, return a class with automatically added special methods, typing and other useful tools: @dataclass class Returnvalue:     y0: int     y1: float     y3: int  def total_cost(x):     y0 = x + 1     y1 = x * 3     y2 = y0 ** y3     return ReturnValue(y0, y1, y2)  Option: Using a list Another suggestion which I'd overlooked comes from Bill the Lizard: def h(x):   result = [x + 1]   result.append(x * 3)   result.append(y0 ** y3)   return result  This is my least favorite method though. I suppose I'm tainted by exposure to Haskell, but the idea of mixed-type lists has always felt uncomfortable to me. In this particular example the list is -not- mixed type, but it conceivably could be. A list used in this way really doesn't gain anything with respect to the tuple as far as I can tell. The only real difference between lists and tuples in Python is that lists are , whereas tuples are not. I personally tend to carry over the conventions from functional programming: use lists for any number of elements of the same type, and tuples for a fixed number of elements of predetermined types. Question After the lengthy preamble, comes the inevitable question. Which method (do you think) is best? Let $R=\mathbb{Z}\left[\sqrt{−5}\right]$. Let $I=\left(2,1+\sqrt{−5}\right)$. Show $I^2 = (2)$ in $R$. I don't know how to solve this problem. I tried to write out the sum of products in the definition of products of ideals, but that doesn't seem to lead anywhere. When should I use an em-dash, an en-dash, and a hyphen? I generally know how to use a hyphen, but when should I use an en-dash (–) instead of an em-dash, or when should I use a hyphen (-) instead of an em-dash (—)? Difference between  and How can I convert the binary string $x_bin="0001001100101" to its numeric value $x_num=613 in Perl? Why are bash tests so picky about whitespace?