How do I lower the amps without tampering with the voltage? I have old speakers and decided to make them useful again by making then battery powered but I am new to this so I'm not 100% sure on what to do. In the speakers there is a small transformer which converts the 230 volts to 12 volts and 1.2 amps but I have two 12 volt 4.5 amp batteries which I am going to use in parrellel so that I get a longer battery life. This means I will have 9 amps coming from the batteries but I don't know how to reduce the amps without interfering with the voltage. Thank you in advance.
Choosing power supply, how to get the voltage and current ratings? 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 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} I have just booted my clean Ubuntu 18.04 LTS VM and tried to install some application with sudo apt install.  But got error message:     E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)       E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?   What process created the /var/lib/dpkg/lock-frontend file in Ubuntu? How to gently stop it and take manual control on APT? On my homepage, I'm using this method to hide my email from spam bots:  &lt;a href="admin [at] example.com"    rel="nofollow"    onclick="this.href='mailto:' + 'admin' + '@' + 'example.com'"&gt;Contact me&lt;/a&gt;   What do you think about it? Is it effective? What other methods do you know or use? I've got a secondary harddrive (a separate physical device, not a logical partition) specifically dedicated for the Virtual Memory paging file.  The drive is 3.5x larger than my RAM, so it's plenty large.  When I configure Windows 7's virtual memory to put the paging file on this second harddrive and not the same drive as the operating system, I'm warned,     If you disable the paging file or set the initial size to less than 800 megabytes and a system error occurs, Windows might not record details that could help identify the problem. Do you want to continue?   So in other words, if I get a Blue Screen of Death, I won't be able to investigate why, just because I put my paging file at a more efficient location.  The best explanation I can find from searching the web is that Windows just doesn't want to make error dumps on a drive separate from the operating system location.  Can anybody give me a less nonsense explanation for this?  I don't want to have to tell Windows, "Sure, go ahead and continue managing a paging file on the primary drive," just so I can get a debug dump, as that totally defeats the purpose of a physically separated paging file.  Is there a workaround to having my paging file on a separate drive and still get error dumps? I run processing.run(&quot;native:buffer&quot;) and from newly created vector I get all features and export them to string using QgsJsonExporter(). My problem is that newly created vector gives new IDs to all features and they aren't equal to attribute ID's values. And after exporting them to GeoJSON using QgsJsonExporter() I get GeoJSON features with identifiers. However I can solve this by declaring processing.run(&quot;native:buffer&quot;) algorithm OUTPUT to .geosjon file and opening it afterwards. Is there a way that I can get GeoJSON string without IDs without having to save OUTPUT to .geojson and reading it to string afterwards. vl = QgsVectorLayer(sys.argv[1],&quot;mygeojson&quot;,&quot;ogr&quot;)  def runProcessingNativeBuffer(inputGeoJson, distance):     processing.algorithmHelp(&quot;native:buffer&quot;)     return processing.run(&quot;native:buffer&quot;,                          {'INPUT': inputGeoJson,                           'DISTANCE': distance, 'SEGMENTS': 5,                           'END_CAP_STYLE': 0, 'JOIN_STYLE': 0,                           'MITER_LIMIT': 2, 'DISSOLVE': False,                           'OUTPUT': &quot;TEMPORARY_OUTPUT&quot;})  ats = runProcessingNativeBuffer(vl, sys.argv[2])  vl1=ats['OUTPUT']  features = vl1.getFeatures() exporter = QgsJsonExporter() print(&quot;GEOJSON&quot;,exporter.exportFeatures(features))  IDs in properties are fine I don't need additional IDs in &quot;features&quot; Is Morocco currently safe to visit despite the Ebola outbreak? I'm travelling to Morocco over the Easter period, and while I am aware that the current Ebola outbreak is mainly in Guinea, Liberia and Mali, and would have to cross the Sahara to get to Morocco, is it wise for me to go to Morocco at this time?  What are some basic precautions I can take in the case that the Ebola virus travels to Morocco? I am on Ubuntu and I have forgotten the password for my Gnome Keyring (yes, stupid me, I know). Any way I can get it back? I have already looked at , but it says it's not possible if my home directory is encrypted and unfortunately my home directory is encrypted. How do I get a block with data to place myself? Are you looking for how to use /setblock with blocks with data? See .  How do I get a block with data in my inventory so I can place it myself? In Java Edition, these commands work: give @s chest{BlockEntityTag:{Items:[{id:&quot;diamond&quot;,count:10b}]}} give @s sign{BlockEntityTag:{Text1:&quot;{\&quot;text\&quot;:\&quot;foo\&quot;,\&quot;bold\&quot;:true}&quot;}}  How can I do this in Bedrock Edition, where there is no access to NBT tags from commands? How can I use Netflix on Ubuntu? My PC (Lenovo Ideapad z580) is overheating while running Ubuntu GNOME 16.04 LTS.  $ uname -a Linux Mahadev 4.4.0-72-generic #93-Ubuntu SMP Fri Mar 31 14:07:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux  $ lspci -nnk|grep -A2 VGA 00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09)   Subsystem: Lenovo 3rd Gen Core processor Graphics Controller [17aa:3977]   Kernel driver in use: i915   $ sensors acpitz-virtual-0 Adapter: Virtual device temp1:        +52.0°C  (crit = +104.0°C)  coretemp-isa-0000 Adapter: ISA adapter Physical id 0:  +54.0°C  (high = +72.0°C, crit = +90.0°C) Core 0:         +54.0°C  (high = +72.0°C, crit = +90.0°C) Core 1:         +54.0°C  (high = +72.0°C, crit = +90.0°C)  update vivek@Mahadev:~$ stress -t 300 -c $(getconf _NPROCESSORS_ONLN) &amp;&amp;  sensors stress: info: [4408] dispatching hogs: 4 cpu, 0 io, 0 vm, 0 hdd stress: info: [4408] successful run completed in 300s acpitz-virtual-0 Adapter: Virtual device temp1:        +73.0°C  (crit = +104.0°C)  coretemp-isa-0000 Adapter: ISA adapter Physical id 0:  +72.0°C  (high = +72.0°C, crit = +90.0°C) Core 0:         +69.0°C  (high = +72.0°C, crit = +90.0°C) Core 1:         +72.0°C  (high = +72.0°C, crit = +90.0°C)  update     vivek@Mahadev:~$ sudo lshw -C cpu     [sudo] password for vivek:    *-cpu                             description: CPU         product: Intel(R) Core(TM) i3-3110M CPU @ 2.40GHz         vendor: Intel Corp.        physical id: 0        bus info: cpu@0        version: Intel(R) Core(TM) i3-3110M CPU @ 2.40GHz        serial: To Be Filled By O.E.M.        slot: CPU Socket - U3E1        size: 1302MHz        capacity: 2400MHz        width: 64 bits        clock: 100MHz        capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr  pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx  fxsr sse sse2 ss ht tm pbe syscall nx rdtscp constant_tsc arch_perfmon  pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni    pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid    sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer xsave avx f16c lahf_lm    epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt     dtherm arat pln pts cpufreq           configuration: cores=2 enabledcores=2 threads=4  Update This time I edited the sensors , htop command result in image. It's getting overheated, my laptop is getting hang cause of overheating, please watch and reply. Thanks. Flames with no gravity? I was watching  today, and noticed this: in some moment the space station changed orbit and the people inside experienced zero-gravity. At that moment, a candlestick passed floating in the air, with the candles burning ().   But in our environment the flames go upward because the hot air is less dense, and that effect should disappear when no gravity is present, am I right? How would a candle flame look then? [[ 0*10%300 ]] works on AIX 6.1 but not on AIX 7.1 (ksh) With no good reason I had a look at my computer's storage going on the apple and About this Mac. Here is the display:    The pink bar doesn't make much sense. It obviously does not represent the 80.67GB of free storage. Two sections correspond to pink; "Photos" and "Backups". I obviously don't have 140.76TB of backups. And probably not on this computer that has only 320GB of storage.  What is going on here? Idiom: People caring about minor stuff while something terrible is happening Imagine a situation in which the whole place is on fire, a bomb is about to explode, everyone is running for their lives and someone is checking his looks on the mirror... pretty inappropriate for the situation, don't you think? I'm looking for an idiom or colloquial/slang/informal expression to describe such an indifferent stance. Not able to install Win Xp on Lenovo Ideapad z570 I want to install Win Xp on my Ideapad Z 570 laptop but i always get blue screen with message with some drive related problem which asks me to run CHKDSK command. I tried with that but no luck. Is there any way i can install Win Xp with SP 2 ?  Edit: i searched across the sites and came to know there could be some Compatibility problems, and i could fix it by setting HDD mode to IDE; will it solve the problem? Why should the interface for a Java class be preferred? I'm writing a linguistics paper that uses a large amount of linguistic examples from a wide variety of languages, using the gb4e package. I want to be able to label each example with information about the language it comes from, as I've seen in some texts, sort of like this:   Language (family, citation, etc.)      (1) example text          glosses        'translation'    gb4e is great at formatting the examples themselves, but I can't seem to get the label placed where I want it, that is, placed immediately before the example and without an indent. Here's some example code:  \documentclass{article} \usepackage{gb4e} \usepackage{lipsum}  \begin{document} \lipsum[2]  Hungarian (Finn-Ugric, \emph{reference})   \begin{exe}   \ex \gll    J\'anos h\'aza\\               John house.his\\       \glt    `John's house'   \end{exe}  \lipsum[3] \end{document}   If the label text is outside the exe environment, it's treated like a regular paragraph, but if I try to put it inside, it gives me an error. How can I make it look the way I want? I've looked at other packages that do numbered examples, but they don't seem to have solutions either, and they also don't have the same functionality as gb4e that I need.  Any help would be greatly appreciated. Generate random numbers uniformly over an entire range I need to generate random numbers within a specified interval, [max;min].  Also, the random numbers should be uniformly distributed over the interval, not located to a particular point.  Currenly I am generating as:  for(int i=0; i&lt;6; i++) {     DWORD random = rand()%(max-min+1) + min; }   From my tests, random numbers are generated around one point only.  Example min = 3604607; max = 7654607;   Random numbers generated:  3631594 3609293 3630000 3628441 3636376 3621404   From answers below: OK, RAND_MAX is 32767. I am on C++ Windows platform. Is there any other method to generate random numbers with a uniform distribution? Add the ability to add "top questions" to Careers 2.0 Profile Allow me to add my own "top questions" too! I know, I know, the site should be more heavily weighted to answering, but sometimes, how and what people ask is important too! For example I recently asked  which I think is a fairly good question. Clearly I'm going to avoid questions where I've asked something very simple, but I know of a user or two who are implementing their own C standard libraries and the depth of those questions is important/ought to be on show.  Of course, the argument I can just look at their profile holds, but that awesome q/a might have been from a year or so ago in which case finding it is difficult. In 2018, Kyle Reese (a normal civilian who wasn't part of Resistance) was on the top in the hit list of Skynet. It means that Skynet of that time had information from future about Kyle Reese being father of future leader of human resistance. Right?  Why didn't Skynet kill Kyle Reese instantly after his detection kicking John Connor out of existence?