I'm building a portable speaker using a PAM8403 amp, 3.7v battery, and a battery charging module, all powered by USB input. What I want to do is be able to switch between   1) charging the battery from USB input  2) Power amp just from 3.7v battery.  3) power amp just from USB input(So when it is plugged into the wall it runs 5v. to the amp and gives it more power than when running off the battery).  I can't figure out how to do this without using switch for the battery, the power input, and to turn it all on and off. so many switches would be very user friendly. Is there a way to do this with less switches?
I am doing a project where my electronics runs on 5V which I wanted to power from a 7.2v lipo regulated down to that voltage. I'd really like to include the opportunity to charge the lipo without removing it from the project. What kind of circuit/components do I need to do it properly?  Say, would putting a battery charging ic at the battery's terminals in parallel to my system be enough to achieve what I need?
How to check the count of .txt files in a folder (dir command)? How can use dir command to check how many .txt files there are in a folder (for example,  C:\Temp\)? Get the exact time for a remote server I have an excel file with 2 attribute columns, 1-feature info 2-Number of color (RGB) that the current feature should be symbolize. This file file can be joined with the layer using the "feature info" field which is unique (join by attribute table). So i have as attribute the color number attribute for every polygon feature.  How can  i use this this information to symbolize every feature with their attributed color already imported from the excel sheet? Reward for Passing Review tests? Just wanted to see what the community thought of adding a reward to passing the review tests? Maybe a 1 point reward?  I know seeing the tests in the review area has helped me be extra careful when reviewing, but I thought perhaps a little boost in incentive would be cool. If G is a group of order n=35, then it is cyclic I've been asked to prove this.   In class we proved this when $n=15$, but our approached seemed unnecessarily complicated to me. We invoked Sylow's theorems, normalizers, etc. I've looked online and found other examples of this approach.    I wonder if it is actually unnecessary, or if there is something wrong with the following proof:   If $|G|=35=5\cdot7$ , then by Cauchy's theorem, there exist $x,y \in G$ such that $o(x)=5$, $o(y)=7$. The order of the product $xy$ is then $\text{lcm}(5,7)=35$. Since we've found an element of $G$ of order 35, we conclude that $G$ is cyclic.   Thanks. Whether the players killed a mage and got his spellbook(s) or they met with a nice wizard who let him or her learn a spell from his spellbook, can a player prepare a spell from a spellbook that isn't his or hers?  I'm asking because the PHB p. 114 says:     [...] Preparing a new list of wizard spells requires time spent studying your spellbook and memorizing the incantations and gestures you must make to cast the spell: at least 1 minute per spell level for each spell on your list.    emphasis mine   Further, the block on the left as a Copying a Spell into the Book ("the" Book as in "your" Book, since it appears in the block titled Your Spellbook), which explains how you can copy a spell from one book to another, assuming the book is from a stranger, it cost more and takes more time. It actually says:     [...] deciphering the unique system of notation used by the system of notation of the wizard who wrote it. [...]   It continues saying that you have to learn the various parts of the spell (verbose, material, gesture.)  This makes it sounds like a wizard would have a really hard time to prepare a spell from another's spellbook. Is that the case? Slow Network Printing over OpenVPN / Windows Server 2008 Our setup is as follows:  Two offices (A and B) connected with OpenVPN Access Server.  One Windows Server 2008 R2 Standard    Housed in remote datacenter. Terminals at both offices connect through RDP in order to use a particular piece of software concurrently. Network Connected printers (Deployed with GPO) that are connected to separate terminals at each office (and shared) are used with this software to print things throughout the day.   We are experiencing extremely slow printing times.  Opening printer properties can take 30-60 seconds and printing times range from 30-180 seconds with no apparent reason.  File sizes remain &lt; 1mb.  This happens with each of our printers.  All different models.  The server massively underutilized with a 6-core AMD, 16GB ram, 4x 120GB SSDs, and a 100 megabit port.  Our VPN does not seem to be a bottleneck either.  I've been attempting to find ways to increase print speed.  So far no success.  What can you advise? Setting background-image using jQuery CSS property Redirect to SSL only if browser supports SNI Why can't I copy a 7 GB file to an external USB HD with 120 GB free? How to peel hard boiled eggs easily? This is one of the most annoying duties in the kitchen, for me.  What are yours tips and tricks to peel hard boiled eggs easily? I got a integrated GD, which is Intel, and another discrete GD, AMD Radeon 6490 HD I am using ubuntu 11.10  1st, when I boot into Windows, my GD is indeed AMD Radeon 6490 HD, but when I boot into Ubuntu, it shows that I have AMD Radeon 6470 instead.  2nd, I try most methods only to install driver for my AMD/ATI graphic card. First by jockey(fail, boot with unity 2D instead) and install manually (fail, boot into blank screen).   3rd, I give up using the AMD/ATI graphic card. Then I got a new problem. Both my graphic cards are powered on on startup, which causes my laptop to over heat.   I view the content of /sys/kernel/debug/vgaswitcheroo/switch  0:DIS: :Pwr:0000:01:00.0 1:IGD:+:Pwr:0000:00:02.0   Then I switch off IGD using echo OFF &gt; /sys/kernel/debug/vgaswitcheroo/switch and I get  0:DIS: :Off:0000:01:00.0 1:IGD:+:Pwr:0000:00:02.0   But after I reboot, the discrete graphic card is powered on again. How to solve this? Word for sentences that make sense when read backwards? Is there a word for sentences that make sense when read normally or backwards (not necessarily by reversing the words)? Example:     "Are you as bored as I am?" If $x_1,x_2,\ldots,x_n$ are the roots for $1+x+x^2+\ldots+x^n=0$, find the value of $\frac{1}{x_1-1}+\frac{1}{x_2-1}+\ldots+\frac{1}{x_n-1}$ Let $x_1,x_2,\ldots,x_n$ be the roots for $1+x+x^2+\ldots+x^n=0$. Find the value of   $$P(1)=\frac{1}{x_1-1}+\frac{1}{x_2-1}+\ldots+\frac{1}{x_n-1}$$   Source: IME entrance exam (Military Institute of Engineering, Brazil), date not provided (possibly from the 1950s)  My attempt: Developing expression $P(1)$, replacing the 1 by $x$, follows $$P(x)=\frac{(x_2-x)\cdots (x_n-x)+\ldots+(x_1-x)\cdots (x_{n-1}-x)}{(x_1-x)(x_2-x)\cdots (x_n-x)}$$    As $x_1,x_2,\ldots,x_n$ are the roots, it must be true that   $$Q(x)=(x-x_1)\cdots(x-x_n)=1+x+x^2+\ldots+x^n$$ and  $$Q(1)=(1-x_1)\cdots(1-x_n)=n+1$$ Therefore the denominator of $P(1)$ is  $$(-1)^{n} (n+1).$$ But I could not find a way to simplify the numerator.  Another fact that is probably useful is that  $$1+x^{n+1}=(1-x)(x^n+x^{n-1}+\ldots+x+1)$$ with roots that are 1 in addition of the given roots $x_1,x_2,\ldots,x_n$ for the original equation, that is  $$x_k=\text{cis}(\frac{2k\pi}{n+1}),\ \ k=1,\ldots,n.$$  This is as far as I could go...    Hints and full answers are welcomed. Install Microsoft Office Pro 2010 on Ubuntu 13.04 Change Windows 7/8/10 system language - welcome screen, login, etc How to make a Rigid Body fall off a conveyor belt? I've created conveyor belt and and two objects with rigid body physics. But the first object won't fall and second object falls backwards.  How can I fix it? Proper Installation of Kali linux tools in Ubuntu I think everyone has known - we need to install katoolin to use Kali Linux Tools on Ubuntu. Before did anything I had looked through the internet and also found out these solutions: ,   So here are my steps:  apt-get install git git clone https://github.com/LionSec/katoolin.git &amp;&amp; cp katoolin/katoolin.py /usr/bin/katoolin chmod +x  /usr/bin/katoolin sudo katoolin   Then, to add Kali Linux repositories and update them, I selected option 1 from the katoolin Menu  Then, to view the available categories and install all available tools, I selected option 2 from the main menu of katoolin and then pressed 0.   But after that I got this:    What do you want to do ?>    1) Add Kali repositories & Update  2) View Categories 3) Install classicmenu indicator 4) Install Kali menu 5) Help   kat > 2  ************************** All Categories **************************  1) Information Gathering                      8) Exploitation Tools 2) Vulnerability Analysis                     9) Forensics Tools 3) Wireless Attacks                           10) Stress Testing 4) Web Applications                           11) Password Attacks 5) Sniffing & Spoofing                        12) Reverse Engineering 6) Maintaining Access                         13) Hardware Hacking 7) Reporting Tools                            14) Extra  0) All   Select a category or press (0) to install all Kali linux tools .  Furthermore, I got an error in Software Updater - it didn't let me do anything. Ubuntu just hung up. I solved this problem by deleting kali linux repositories in katoolin and then in Software Updater.  Does anyone know how to install Kali Linux tools in Ubuntu 16.04 in a proper way? "going to" vs "will" How do I diagnose the source of focus problem in a camera? Probably a novice question, but how do I correctly diagnose from a photo for what reason that camera wasn't able to focus properly?  It can be any 1 of the following   Unsteady hand Lens issue Metering Re-Calibration required in camera or ...   Is there a set of unsaid protocols that needs to be followed by a photographer?  Goal is to get a sharp and crisp image prior to editing.  [PS: I own a Nikon D5200.]