I often see power adapters indicating 5V 900mA (or) 5V 1000mA or sometimes 5V 3.4 A. Obviously they are converting current coming from 220V/110V source to 5V DC using some step down converter. But how do they know the amount of current that can be given by them ? i.e., 0.9 A or 1 A or 3.4 A etc.. What I mean is, based on Ohms law ( V=IR) the current is dependent on V and R where V is step down voltage given by adapter ( lets say 5 V in this case). However R is dependent on the circuit that is going to be connected to the battery or charger. The circuit may have higher or lower resistance and accordingly the current would vary. So then what is the meaning of the current notation mentioned on the chargers ? Is it the max current ?  If that is the maximum current in Amps that charger/battery can deliver does it mean that the resistance of the charger circuit is lets say 5V / 1 A = 5 Ohms ?  I know this is a very basic question. Appreciate your patience.
Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.
I read that     A typical stream cipher encrypts plaintext one byte at a time, although a stream cipher may be designed to operate on one bit at a time or on units larger than a byte at a time.   (Source: , William Stallings.)  A block cipher encrypts one block at a time. The block may be of size one byte or more or less. That means we can also encrypt a block of one byte by help of a stream cipher as a stream.  So, what exactly is the difference between a stream cipher and a block cipher? Powershell auto complete settings. I was wondering if there was anyway to change the way the current powershell autocomplete works. I have been using bash and had changed them to offer a few features that I'd like in my powershell experience.   Currently powershell as I'm writing a command with a folder it will tab autocomplete and also cycle through my folders. This works how I like but one feature that I miss is using partial matching of a command and hitting the up key and it would find that command that matches the rest of what I do.   So Id write 'echo test'  Then id write other commands and try 'ec' and tap up and 'echo test' would complete and not the last command I typed  Just wondering if there is anyway anyway to get this back? How can I improve Light Armor as an Archer? I play as an archer, which means sneaking and killing foes off at long range. Problem is, once a creature gets too close to me, I am in a world of troubles. (A random dragon encounter is fair game if I can snipe it off, but a random bear encounter is the thing I fear mostly. Three strikes of such a vicious beast and I drop dead.)  At short range, I use a one-hand sword with shield, but I do not want to put much perks into those skills, as I want to be a sneaky archer first.  Which leaves Light Armor. But to get certain perks I need some skill points, e.g., 30 points are required for the "Custom Fit"- and 40 for "Agile Defender 2/5"-perk. Yet I have no clue how to accumulate those points.  Many enemies won't even see me, so I seldom will be hit. Getting hits means getting skills point. Letting some enemies come close to me and let me hit me on purpose sometimes helps, but since I cannot stand much damage I mostly die erasing any hard earned process.  So is there a teacher for Light Armor like there is for other skills? And if not, how should I go on to improve the Light Armor skill? $c\mid a,b\iff c\mid\gcd(a,b)$ [GCD Universal Property] If $c$ is a common divisor of $a$ and $b$ then $c$ divides the greatest common divisor of $a$ and $b$.  What can we use to prove this? How do I execute the following shell command using the Python  module?  echo "input data" | awk -f script.awk | sort &gt; outfile.txt   The input data will come from a string, so I don't actually need echo.  I've got this far, can anyone explain how I get it to pipe through sort too?  p_awk = subprocess.Popen(["awk","-f","script.awk"],                           stdin=subprocess.PIPE,                           stdout=file("outfile.txt", "w")) p_awk.communicate( "input data" )   UPDATE:  Note that while the accepted answer below doesn't actually answer the question as asked, I believe S.Lott is right and it's better to avoid having to solve that problem in the first place! Show that any set in a metric space can be written as the intersection of open sets What is the C# equivalent of NaN or IsNumeric? What is the most efficient way of testing an input string whether it contains a numeric value (or conversely Not A Number)? I guess I can use Double.Parse or a regex (see below) but I was wondering if there is some built in way to do this, such as javascript's NaN() or IsNumeric() (was that VB, I can't remember?).  public static bool IsNumeric(this string value) {     return Regex.IsMatch(value, "^\\d+$"); } Give an example of three positive integers m, n, and r What sort of cheat sheets for a new DM lead to a better flowing 5e game of Dungeons and Dragons? The question is, what elements on a DM screen are essential? I'm new at playing and DMing, altough a lot of experience watching games, just got a group to play with now. Started with the starter set in 5E and the Lost Mine of Phandelver adventure, however I've noticed the game can come to a stop when checking the rules or how to do something, while getting the books and stuff like that. So I thought to make a DM screen with some cheat sheets, of the most usual things new players, and new DM's have doubts on, and how to make the game flow well without long rule-checking breaks. What are the essential things to have on that screen? So far this is what I found  but not sure if it has all I need or so much stuff that'll also make the game stop a lot while cheking it out. A two column loop with one lead post I got a loop from internet (I forgot the site) for two column post view. It has a nice CSS for it too. But skipping that for the question now.  &lt;?php $counter = 1; ?&gt;                  &lt;?php query_posts( 'cat=3&amp;showposts=6' ); //Find whether the catID is 3 ?&gt;             &lt;?php while ( have_posts() ) : the_post() ?&gt;                   &lt;?php /* Two Column Support get class */ ?&gt;              &lt;?php $class = ( $counter % 2  ? ' one' : '' ) ?&gt;                  &lt;?php /* Two Column output open the div class */ ?&gt;              &lt;div class="column&lt;?php echo $class;// echo $first; ?&gt;"&gt;              &lt;?php news_format(); ?&gt;             &lt;/div&gt; &lt;!-- End Two Column Support close div class --&gt; &lt;?php $counter++; //Update counter ?&gt;   It printed my posts into 2 columns like:  ========= | 1 | 2 | --------- | 3 | 4 | --------- | 5 | 6 | =========  It's fine. But I want to print it like this:  ========= |   1   | --------- | 2 | 3 | --------- | 4 | 5 | --------- | 6 | 7 | =========  What the modification I need to do? I can't pass any custom limit into the WordPress' custom loop &lt;?php while ( have_posts() ) : the_post() ?&gt;. It's for a custom theme. I did it, but the problem is, it's showing like:  ========= |   1   | --------- | 1 | 2 | --------- | 3 | 4 | --------- | 5 | 6 | =========   is my whole bunch of code. JavaScript curry: what are the practical applications? I don’t think I’ve grokked currying yet. I understand what it does, and how to do it. I just can’t think of a situation I would use it.  Where are you using currying in JavaScript (or where are the main libraries using it)? DOM manipulation or general application development examples welcome.   mentions animation. Functions like slideUp, fadeIn take an element as an arguments and are normally a curried function returning the high order function with the default “animation function” built-in. Why is that better than just applying the higher-up function with some defaults?  Are there any drawbacks to using it?  As requested here are some good resources on JavaScript currying:    Crockford, Douglas (2008) JavaScript: The Good Parts  (Takes a detour into ML so skip the whole section from “A crash course in ML” and start again at “How to write curried JavaScript”)    (Mr. Resig on the money as per usual)    I’ll add more as they crop up in the comments.    So, according to the answers, currying and partial application in general are convenience techniques.  If you are frequently “refining” a high-level function by calling it with same configuration, you can curry (or use Resig’s partial) the higher-level function to create simple, concise helper methods. How to keep Blender from adding frame numbers to output filename? How to calculate the resistance of a complicated circuit? I learned in high school the basic rules of how to compute resistance between two points, given a network of resistors.  You try to rearrange the circuit so into parallel parts and series parts, then compute the resistance of each piece individually using those rules, until you're left with just one number, and you're done.  Maybe I explained that poorly, so consider the following schematic:         &ndash; Schematic created using   Sorry it's so large, that seems to be the default.  Anyway, it's easy to compute the resistance from A to D (regardless of the values of the all the resistors)- A-B-D, A-D, and A-C-D are all series connections (easy to compute) then you combine them with the parallel formula and you're set.  But!  How do you compute the resistance from B to C?  There seem like lots of possible ways to think about it, and they all generate different answers.  I've left the specific numbers off the diagram because this isn't homework and I don't care about the answer specifically, I just want to understand the principles involved and how to solve the problem.  Any help, or links to especially readable guides, would be very much appreciated. Output two sided, but only on recto page -- occasional images on verso I am preparing a thesis. In order to reduce the number of physical sheets of paper, I need to print certain figures/tables on the verso side. However the university regs state that, while figs/tables may appear on the verso, the body text must appear on the recto side.  I would like to therefore output the vast bulk of the work on the recto page, but with occasional verso pages. Ideally they would be numbered as a "subpage" of the preceeding recto page (e.g. 131, 131a, 132...) or similar.  The approach which I will tentatively adopt is to use a "twoside" flag, then have "empty" and non-numbered verso pages until a page with content is required.   I'm sure I'm not the first person to have had a similar issue, but am unable to imagine other ways of posing the question. How do I ensure that figures appear in the section they're associated with? Often floats may land quite a bit later in the document than the point they are created, sometimes after a section break.  Is there a way to force a new section to start on a new page, after any unplaced floats? Trying to keep track of the updates to all the great, user-developed add-ons is fairly frustrating (at least for me). Is there currently a centralized resource where all these amazing add-ons are kept and updated in one location?  If there isn't such a resource, would it be possible to have blender query the collection of installed add-ins and then iterate through on-line references looking at version #'s for add-ins?  Since, as far as I know, it hasn't been done...I have to ask if there are any major flaws in the concept. Of course, in my dream scenario, there would be a "voting" front-end that would allow users to see what the most popular and useful add-ons are and where you don't have to read pages (and pages) of threads. I see that there a number of questions (, , , , ) on best practices, none of them answer the issue I am going to talk about.  We all need to prepare large documents (or slides) from time-to-time. And once you have reached a certain number of pages, you find that compiling the whole document takes a substantial time, which you need to do to check that the part you have written is error free, specially if it contains a number of images.   To circumvent the situation, I have used the following practices over years to keep compile time at minimum.   Divide the document in to many chapters: The chapters are put in separate files. Only the one I am working one is uncommented.  \documentclass{book}  \begin{document}  %\input {chapterone.tex} \input {chaptertwo.tex} %\input {chapterthree.tex} %\input {chapterfour.tex}  \end{document}    The above technique can also be used for \include.   Keep a preamble replica of the main file in a temporary file (build file): I use this technique when I am preparing a presentation with many slides, say a hundred. Prepare a main file, copy it to another build file. Delete everything between  \begin{document} and \end{document} in the build file. Prepare a slide (or a group of slides) in the build file. Cut and paste the contents between \begin{document} and \end{document} in the build file to relevant location in the main file only when satisfied with the output (image locations, overfull boxes etc.)     We can hear your inputs about the best practices you practice when a you are preparing a document or presentation from scratch.    Now, I have failed to find a good answer in the case when you have finished the whole document or presentation and now you need tweaking the small things, may be edit a text here, add an image there. What will be your best practice?  Perhaps, again keeping only one chapter uncommented will be usable here. But what about large presentations? May be adding a \end{document} just after the point-of-change will be beneficial, but only if you can put that before midpoint of the file.  Commenting a part of the file will also work, but that is error-prone, at least for me. Is there a difference between Therefor and Therefore? Replace Line Breaks in a String C# How can I replace Line Breaks within a string in C#? Fourier Series for $|\cos(x)|$