My 2018 MacBook Pro is connected to external displays and peripherals via a Thunderbolt 3 dock.  When I step away from my desk I lock the computer by pressing ctrl+cmd+Q on my external keyboard.  This works as expected, kicking the system back to the lock screen.  However, after a few minutes of this state, the system goes to sleep, turning off the screen and requiring time to become interactive again after jabbing the power button.  How can I prevent the laptop from going to sleep once locked if connected to power? The most important aspect of this is that Touch ID stays active, so I can instantly resume work at my desk with a single touch of the sensor.
I tried control+shift+power button as well as command+shift+power button. Neither seem to work.
How can I create a progress bar with bash?  This is my script :  #!/bin/bash  pass='number1 number12 number13 number14 number15 number16'  chk='number14'  for i in $pass ; do    if [ "$i" == "$chk" ]; then      echo ' Found ^_^'    else      echo 'loading 50%'    fi  done   I want to replace echo 'loading 50%' with anything to create an progress bar. If a,b,c,d are positive integers with a sum of 63, what is the maximum value of ab + bc + cd ? (By using calculus to solve it)) If $a,b,c,d$ are positive integers with    $$a+b+c+d=63,$$   what is the maximum value of $$ab+bc+cd?$$   I treated this as an optimization problem and tried to solve it but I did not make any progress. Why was River Song so slow? Duplicates in sendable DE for MobileConnect Make a momentary switch control a toggle What are the simplest, cheapest, smallest ways to make a momentary switch produce a 2-state toggling output (latching momentary switch)?  In other words, the output is continuously low, and when you momentarily press the button/tact switch, the output changes to continuously high, and then when you press it again, it switches back to low. How does Linux handle multiple consecutive path separators (/home////username///file)? I want to programmatically create a site using custom web templates in sharepoint 2010.  In 2007 I used to get a   SPWebTemplate template = site.GetCustomWebTemplates(LCID)[number];   and used this SPWebTemplate in  SPWeb newSite = web.Webs.Add(url, title, description, LCID, template, true, false);   This worked quite well for 2007. But in 2010 the site templates are saved into the solution store  SPSite.Solutions   which only returns SPUserSolution objects and not SPWebTemplates.  So my question is: How can I programmatically create sites using the site templates from the solution store.    UPDATE: I tried to use  SPWeb newSite = web.Webs.Add(url, title, desc, LCID, templateName, true, false);   where templateName is a string like '{Template-GUID}#TemplateName', but it still does not work. It throws the following error:  Critical error: File or arguments not valid for site template '{4a2d8952-a0af-49a6-8f55-46a59c8d68a2}#CustomerSiteTemplate'. Parameter name: WebTemplate    Any other ideas how to create a site based on a SPWebTemplate? Something small goes wrong, and this triggers something slightly bigger, which triggers something slightly bigger, and so on and so forth until you end up with a chain of problems of increasing severity until it ends in catastrophy.  Something like the old saying "for want of a nail the battle was lost", only highlighting that each intermediate issue was a problem in its own right, not just a stepping-stone to the final disaster.  Is there a common word/phrase that specifically describes this? I'm thinking "cascade of ever-increasing problems", but this seems clumsy, and I suspect there might already be a neat word or expression that covers it. Reason for LCM of all numbers from 1 .. n equals roughly $e^n$ I computed the LCM for all natural numbers from 1 up to a limit $n$ and plotted the result over $n$.  Due to the fast-raising numbers, I plotted the logarithm of the result and was surprised to find a (more or less) identity curve ($x=y$).  In other words, $LCM(1, 2, 3, ..., n)$ appears to be roughly the value $e^n$.  Is a there a simple explanation on why this is so?  $LCM(a, b, c, …)$ shall be defined as the least common multiple of all arguments $a, b, c, …$ Split comma-separated strings in a column into separate rows Is there a description of Stack Exchange/Stack Overflow sites? How to include SVG diagrams in LaTeX? I'm making all my diagrams in SVG format using Inkscape and then I export them to some other format (e.g. PDF, EPS or PNG). I wrote a short script that does this for me automatically, but I'd like to avoid this step, if possible --- sometimes the conversion from SVG converts the text labels into vectors, and that's annoying. Hence the question:  Is there a way to include SVG diagrams directly without conversion to an intermediate format?  Package suggestions, or instructions for specific LaTeX distribution are welcome. Tips and personal experience on which tools you have found to be working reliably would be also appreciated. Where does gravity get its energy from? I would like to know where gravity gets its energy to attract physical bodies?  I know that the law of conservation states that total energy of an isolated system cannot change. So gravity has to be getting its energy from somewhere, or else things like hydropower plants wouldn't be able to turn the power of the falling water into a spinning rotor.  Just to be clear, Lets create an example:  Lets say we have two objects with equal mass close to each other. So gravity does its job and it pulls each other closer, this gets turned into kinetic energy. This is where I'm lost. According to the law of conservation energy can't be created or destroyed and the kinetic energy comes from the gravitational pull so where does the gravitational pull gets its energy.  If that energy isn't being recycled from some where else then that means you have just created energy, therefore breaking the law of conservation. Adding multiple jars to classpath on commandline On exactly what criteria is the Electorate badge awarded? There is a badge named Electorate which is going to be awarded on "Voted on 600 questions and 25% or more of total votes are on questions". Can somebody explain this to me?  Voted on 600 Question and 25% are on Question? is this  means   Voted on 600 Posts and 25% are on Question  Can't SO place some easy text or Definitions for average users? Early 90s mecha anime where the mecha was like Voltron in that each pilot controlled a portion of the mecha that would merge into a bigger mecha I'm trying to find an anime movie I watched when I was younger; I believe I first watched it in 90/91. The story revolved around the recruitment and training of a group that would pilot a mecha that was similar to Voltron in that each pilot controlled a portion of the mecha that would merge into a bigger mecha. Points that I remember:   Started on Earth Program was government funded One of the pilots was related to the creator of the program, I think a female Mecha had chain weapon and a sword that was summoned from it's superhero-like chest icon. Killing blow was an m or w shape Ended with father/creator of mecha? being kidnapped by the aliens and used as human shield to deter attack on alien vessel Dependency problem with mysql-server-core-5.5 When I start the Ubuntu software centre, it says I cannot do anything until the package catalog is repaired. However, repairing fails.  I ran sudo apt-get -f install and found the problem to be:  mysql-server-5.5 depends on mysql-server-core-5.5 (= 5.5.24-0ubuntu0.12.04.1); however:   Version of mysql-server-core-5.5 on system is 5.5.28-0ubuntu0.12.04.2.   So, the question is, how do I install that version and resolve the dependency problem? How to make program autostart only in GNOME I use both GNOME and KDE SC. In GNOME, I use Docky but I do not use it with KDE. So, I would like Docky to start up only when I login into GNOME not KDE. In KDE, there is an option to make a program autostart only in KDE. But I cannot find any such option in GNOME.    How can I do this?    Thanks in advance. Is there a way to take a mesh, cut it with seams or sharp edges and flatten it, so that the faces stay the same shape and size?  Making paper models is one aspect, where you could use that technique.  No, I'm afraid SZ0Return is not going to do it properly.  And misusing the UV-unwrap is only a last option.    Note, while it's an option to revert to Blender 2.49 which had a script to do this, I'd like a solution that I can use inside the current workspace. prints out a lot of very detailed protocol statistics like number of TCP reset messages received or number of ICMP "echo request" messages sent or number of packets dropped because of a missing route.  When in Linux netstat is considered deprecated at nowadays, then is there an alternative?  Statistics provided by ss -s are superficial compared to the ones provided by netstat.