Is it possible to "shut off" battery charging in OSX with an application rather then physically. Could this be done with AppleScript (I doubt it) or will need to be obj-c cocoa application? Essentially my idea is an app that'll shut off the charger when requirements are met (like the computer is in sleep mode, or the battery hasn't been drained in a few days)
From the pmset man page:     POWER SOURCE ARGUMENTS      -g with a 'batt' or 'ps' argument will show the state of all attached power sources.      […] Certain Apple battery calibration tools may temporarily disable   battery charging, even though your Apple portable is plugged into AC   power.      Such tools will never surprise you with this behavior; you will know   it's happening. This state will be reflected in an additional line of   output to 'batt' or 'ps' readings, including the pid of the app   inducing this behavior.       'ChargeInhibit':    1432    So, does any piece of publicly available software exist to force the battery not to charge?
What does "overfull hbox" mean? (Why is there a black mark at the end of a line?) I often see output from TeX with the warning overfull hbox, badness 10000. What does this message mean? I try to solve this problem. I seems to come close to the end but I can't get the conclusion. Can someone help me complete my proof. Thanks          Show that the polynomial $h(x) = (x-1)(x-2)\cdots(x-n) + 1$ is irreducible over $\mathbb Z$ for all $n\ge1$ and $ n\ne4$.      Suppose $h(x) = f(x) g(x)$, then we must have $f(i)g(i) = 1$ for all $i = 1,2,...n$. So both $f(i)$ and $g(i)$ are $1$ or $-1$. In either case, $m(x) = f(x) - g(x)$ has degree smaller than $n$ and have $n$ different roots ($1,2,...,n$). So we must have $m(x) = 0$. Then $h(x) = f(x)^{2}$. So $n$ must be even. Let $n = 2k$. Because $f(x)$ has degree $k$, there are $k$ values from $\{1,2,...,2k\}$ at which $f(x)$ is $1$ and $k$ values at which $f(x)$ is $-1$.  This is where I got stuck. Hope some one can help me solve this. Thanks. What are a few examples of noncyclic finite groups? I just want to make sure that every group $\mathbb{Z}_n$ for any $n$ is cyclic. Further, every group of prime order is cyclic because it is isomorphic to $\mathbb{Z}_p$. I think I have a handle on that, but what other finite groups are there that aren't cyclic? In particular, I'm looking for examples that aren't direct products of groups, just simply groups like $\mathbb{Z}_n$, not $\mathbb{Z}_a \times \mathbb{Z}_b$, etc. It is possible to migrate a question from one Stack Exchange site to another by closing, but if I have a question that I think is on-topic for multiple Stack Exchange sites, is it OK to post it on both (multipost)?   For example, I have a question that's earned me the tumbleweed badge on SO and I'm not sure what the best thing to do with it is. It's about a web server so it might be answerable on Server Fault but it's really more of a programming thing, hence the posting the question on Stack Overflow.    Is there any way to make the question visible on multiple sites (crosspost) and then accept the answer wherever it came from? How do the tens­es and as­pects in English cor­re­spond tem­po­ral­ly to one an­oth­er? $(m, m+2)$ is twin prime, iff $4((m-1)! + 1) \equiv -m \pmod {m(m+2)}$ The Wiki page on  says     The pair $(m, m+2)$ is twin prime, iff $4((m-1)! + 1) \equiv -m \pmod {m(m+2)}$.   This is obviously connected to Wilson's Theorem. Can anybody provide a proof for that, along the lines of thought given here, ? Create an instance of an object from a String in Dart? Specifying geography with cardinal directions So here in America we are in "the West".  Would this become "the Western world" or "the western world? "  I'll assume the same applies to "the East" (Asia). There are  with not having ftp and telnet present in 10.13 now as per Apple's dictate.  Has anyone found a solid way to bring BSD ftp and telnet back to macOS vs using inetutils? How to best encapsulate monetary values in a database g++ undefined reference with a shared library How can I vertically align entries in my acronyms' list? I use the Glossaries package to generate it. Here is MWE:  % !TeX program = xelatex % !TeX encoding = utf-8 % !TeX spellcheck = ru_RU  \documentclass[12pt, a4paper]{article}  \usepackage{polyglossia} \setdefaultlanguage{russian} \setmainfont[Ligatures=TeX]{Times New Roman}  \usepackage[xindy={glsnumbers=false}, nonumberlist, nopostdot, nogroupskip]{glossaries} %\setglossarystyle{super} % uncomment for style "super" \makeglossaries  \begin{document}  \newacronym{bam}{ДАП}{Двунаправленная Ассоциативная Память} \newacronym{ai}{ИИ}{Искусственный Интеллект} \newacronym{am}{АП}{Ассоциативная Память} \newacronym{ann}{ИНС}{Искусственная Нейронная Сеть} \newacronym{an}{ИН}{Искусственный Нейрон} \newacronym{it}{ИТ}{Информационные Технологии} \glsaddall  \printglossaries  \end{document}   With the default style I have the following:  As you can see, the long names are not vertically aligned. What I want can be achieved with the    \setglossarystyle{super}   But it this case, short names lose the BOLDness, some small horizontal indent appears and the spacing between lines becomes smaller:  where RED is some extra indent, which I don't need. Thank you for your answers! How to decide if an effect is magical for Magic Resistance? Some creatures have Magic Resistance:     The [...] has advantage on saving throws against spells and other magical effects.   We know from  that this works against Turn Undead, but does it work against Stunning Strike, Death Strike, Fey Presence, etc? How do we decide? We've tried this a few times. First time we used an old ceramic container and it started sheding on the inside and ruined it. Next time we used a new metal garbage can with one of those super sized 10 gallon zip lock bags as a liner. It went rank very quickly. This could have been due to our packing though. Before we get into this again, what is you recommendation for a good container? I hate the thought of plastics but it seems it might just be the best choice as long as it's made for food storage. I accidentally opened Orca Screen Reader from the Dash when I was trying to open Screenshot. Now everything I type or click on is spoken out loud.  How do I make it stop?  For reference, here is a screenshot of Orca Screen Reader running: "Can not setup lock file:/tmp/g2ipmsg.lock errno : -11 (Resource temporarily unavailable)" I installed IP Messenger (GNOME 2) from Ubuntu software center but its not working. It's always showing an error message on Ubuntu 12.04.  FileName:ipmsg.c Function:create_lock_file Line:157 Can not setup lock file:/tmp/g2ipmsg.lock errno : -11 (Resource temporarily unavailable) HDD SMART interpretation - Possible impending drive failure I've just had an issue pop up related to my drives.  First things first, I was working in my case when I clumsily shifted the foot of the case off of my desk. Case shifted and hit the desk somewhat hard, but only fell an inch or two. It had been properly shut down so this may not have anything to do with the issue.  After booting up, I noticed that when playing a video from my F: Drive (Seagate), it produced a whine, almost a chirping sound coming from the hard drive bay. I think I may have heard this before the drop, but quieter.  Fearing impending failure I downloaded GSmartControl and inspected the drive information. The Seagate drive displayed a high Raw Read Error Rate, as well as a high Seek Error Rate.  I've read some of these values can be high on Seagate drives from the start. This drive is about 6 months old and the producer of the noise.  I also checked my Toshiba drive, which came with a refurbished prebuilt I bought about a year ago. It showed more normal SMART data, but displayed some concerning statistics (2 "Mechanical Start Failures" and 2 "Reported Uncorrectable Errors").  Both of the drives passed the basic SMART test, but the noise was quite alarming. It would stop as soon as a paused the video and start right up again as soon as I resumed playing.  Here is an album with 3 photos of the SMART data, the Seagate did not display statistics.  Could I please have help interpreting the SMART data, and whether this may indicate an impending failure?   Thank you for your time.   Here are images of the SMART data. How to solve ~(P → Q) : P & ~Q by natural deduction? I'm trying to solve the following by natural deduction:  ~(P → Q) : P &amp; ~Q  It's a trivial problem if identities are used, as can be seen by the following:   {1}      1.   ~(P → Q)                    Prem. {1}      2.   ~(~P ∨ Q)                   1 Mat. Impl. {1}      3.   ~~P & ~Q                    2 De Morgan's {1}      4.   P & ~Q                      3 DNE   Starting from step 2 of the previous proof, it's also fairly straightforward to reach a conclusion using natural deduction; i.e. starting from ~(~P ∨ Q), which is an identity of ~(P → Q):  ~(~P ∨ Q) :  P &amp; ~Q   {1}      1.   ~(~P ∨ Q)                   Prem. {2}      2.   ~P                          Assum. {2}      3.   ~P ∨ Q                      2 ∨I {1,2}    4.   ~(~P ∨ Q) & (~P ∨ Q)        1,3 &I {1}      5.   P                           2,4 RAA {6}      6.   Q                           Assum. {6}      7.   ~P ∨ Q                      6 ∨I {1,6}    8.   ~(~P ∨ Q) & (~P ∨ Q)        1,7 &I {1}      9.   ~Q                          6,8 RAA {1}      10.  P & ~Q                      5,9 &I   I also found that it's fairly easy to conclude ~Q:   {1}      1.   ~(P → Q)                    Prem. {2}      2.   Q                           Assum. {3}      3.   P                           Assum. {2,3}    4.   P & Q                       2,3 &I {2,3}    5.   Q                           4 &E {2}      6.   P → Q                       3,5 CP {1,2}    7.   ~(P → Q) & (P → Q)          1,6 &I {1}      8.   ~Q                          2,7 RAA ... {1,2}    12.  P & ~Q   In spite of how easy it looks, I can't figure out how to do it. I believe it can be done in 12 steps. Thanks! UnboundLocalError on local variable when reassigned after first use Automatically make various multiple stroke colour the same as various underlying fill colours. I have auto traced a photograph in illustrator - its got thousands of vectors once I expand it and illustrator has converted each of them to a filled colour - I want to now trace the edges of them with a grungy brush but using the underlying fill colour. Where in illustrator can I stroke or outline these fills using the underlying colour - surely this is something that the program automatically does?   I've found this script online but don't know how to implement it. I'm new to this so any help appreciated. Many thanks.   James   var idoc = app.activeDocument;   var sel = idoc.selection;    for (i=0; i&lt;sel.length; i++) {       var ipath = sel[i];       ipath.stroked = true;       ipath.strokeColor = ipath.fillColor;   }