Persistent memoized functions
Saving memoization to disk
Prevent Windows 7 from sleep + power button hook I'm used to not shutdown Windows but to sleeping it. I set up power button (PB) action to do it. When I want to shutdown I must go to start -> Shutdown. That's OK.  Now I think of a mechanism that will be hooked up to a PB. Should be started after I press PB but before OS will go to sleep. Something that will check few conditions (i.e. running backup, running AV scan, ...) and if true (something is running) prevent go to sleep.  Optionally: It would be nice to start the same "mechanism" before restart and shutdown (invoked not only from Start menu, but also by other software (i.e. installers) but with option to allow some sources (i.e. UPS software)  Generally: How to run something after PowerButton but before Sleeping. How to code (C#.NET, vbs, batch (preferred)) sleep prevention (cancellation). I would like to . Apparently this is possible as of Minecraft 1.4.2, so how do I do it? Word to describe using sarcasm or a similar approach to lead someone to recognise their own mistake In the past month, I've been really busy with the university and stuff, and I don't sleep as much as I used to. I usually sleep 4-5 hours a night.  I haven't been doing that extensively ( I always kept a good sleeping routine), but can the lack of sleep affect my health on the long term ? Finding the search terms behind 'not provided' Does python have the ability to create dynamic keywords?  For example:  qset.filter(min_price__usd__range=(min_price, max_price))   I want to be able to change the usd part based on a selected currency. Getting the class name of an instance? How do I find out a name of class that created an instance of an object in Python if the function I am doing this from is the base class of which the class of the instance has been derived?  Was thinking maybe  might have helped me out here, but it doesn't seem to give me what I want. And short of parsing the __class__ member, I'm not sure how to get at this information. Prove convergence of the sequence $(z_1+z_2+\cdots + z_n)/n$ of Cesaro means "Was" or "were" for "half a dozen" In Microsoft Word, the following sentence is flagged.  It tells me to use "was" instead of "were"     There were half a dozen books strewn about the floor.   I would think that you would use "were" since it's a quantity more than one.  You wouldn't say, "There was twelve books strewn about the floor."  Does the use of the "half" modify it somehow? Why is $\alpha \rightarrow \forall x(\alpha)$ not generally correct in first-order logic? Why is $\alpha \rightarrow \forall x(\alpha)$ not generally correct in first-order logic?  i.e., when there are free occurrences of $x$ in $\alpha$, and, on the same point, why is the formula scheme correct when there are no free occurrences of $x$ in $\alpha$? How do I handle casting a spell with a cost of X when the casting cost is reduced? Display the Number of Comment Upvotes In Recent Activity Pages It would be helpful if we could see the number of upvotes cast for our comments, or other people's comments in response to us directly in the user profile in either the activity tab or the response tab respectively. It should be quite easy to implement (e.g. sharing a single partial view for displaying comments).  It could be useful, since we can evaluate the legitimacy of the comment and address horrible mistakes sooner. I need to host several Apache virtual hosts with SSL from a single IP.  Now - I understand that because SSL wraps around the HTTP request, there's no way to know which host is being requested until a public key has been sent to the client first. This essentially breaks the possibility of SSL virtual hosts using a standard SSL certificate.  I have obtained a Unified Communications Certificate (UCC), otherwise known as a Subject Alternative Name (SAN) certificate. This allows me to serve the same certificate for multiple domains.  I would like this to be the certificate served by Apache for any SSL request - and then have Apache resolve the virtual host as usual, once the encryption has been established.  How should I configure Apache for this? I have tried to research how this can be done, but all I can find are quotes which say that it is possible, but no specifics:    wiki.apache.org/httpd/NameBasedSSLVHostsWithSNI     While Apache can renegotiate the SSL   connection later after seeing the   hostname in the request (and does),   that's too late to pick the right   server certificate to use to match the   request hostname during the initial   handshake, resulting in browser   warnings/errors about certificates   having the wrong hostname in them.   serverfault.com/questions/48334/apache-virtual-hosts-with-ssl     Incidentally, it is possible to have   multiple SSL-secured named virtual   hosts on a single IP address - I do it   on my website - but it produces all   sorts of warnings in the Apache logs,   and certificate warnings in the   browser. I certainly wouldn't   recommend it for a production site   that needs to look clean.   -David Jul 31 at 4:58   www.digicert.com/subject-alternative-name.htm     Virtual Host Multiple SSL sites on a single   IP address. Hosting multiple   SSL-enabled sites on a single server   typically requires a unique IP address   per site, but a certificate with   Subject Alternative Names can solve   this problem. Microsoft IIS 6 and   Apache are both able to Virtual Host   HTTPS sites using Unified   Communications SSL, also known as SAN   certificates.     Please help. I created a new profile for gnome-terminal and I can switch between &quot;Implicit&quot; profile and the new created profile as you can see in the below image:  Now I wonder how can I switch between profiles using a command-line/script or maybe using a shortcut for this.  Note: Solutions like: gnome-terminal --tab-with-profile=Implicit &amp;&amp; exit   are excluded because I prefer not to close and open another terminal or get another terminal window in this process of changing the profile. Probability associated with experiencing all outcomes how I can draw an skew cylinder (rotate around x axis) and fill it (in 3D tikz)? Why are doctors addressed as Mr. in the UK? In the US most physicians, surgeons and dentists are addressed as "doctor". Very few other professionals receive the same title.  In the UK, however, surgeons and dentists seem to prefer to be referred to as Mr. If that is true, why?  And who is addressed as Dr. in the UK?  Those who hold doctoral degrees only? Schrödingers MySQL table: exists, yet it does not MacBook Pro stuck in gray screen when booting I've got a Late-2011 15" MacBook Pro stuck in the gray screen when booting AFTER login. I've tried removing the drive (it's non-retina) and booting from a working bootable Yosemite installer, no luck. (it sees the startup USB drive, the progress bar progresses, but stuck at the gray screen again even without a drive.  Tried NVRAM reset (cmd option P R), it has reset (the login sound's volume changed) but nothing changed.  Tried holding D on startup, AHT doesn't start, instead, it tries to boot into the OS.  Tried Cmd V, it sometimes works and displays the verbose output, sometimes, it acts like I haven't even pressed. Again, stuck after login.  Tried booting again from USB, I select USB (after seeing both drives correctly), but no luck, it's also stuck.  I've stumbled upon this:    I've tried booting into single user mode with Cmd S, it worked ONCE, I've disabled the graphics extensions just as shown at that post, restarted, but again, nothing changed.  More weirdly, now the Cmd S doesn't work either. It just takes me to login screen without showing the terminal, just as I haven't pressed anything.  Why would this happen? Why would a Mac refuse to enter hardware test mode, single user mode, or refuse to boot from a working bootable Yosemite drive both with or without the main drive installed?  UPDATE: I've run the AHT and got an error:  4MEM/66/40000000: 0x84e0ec98  It looks like a memory issue, but I'm not sure.   UPDATE 2: I've tried reinserting the RAMs and the the problem is not reported anymore. However, the Mac still won't boot. How to add a matrix to a LaTeX document How do we add a matrix to a LaTeX document?