I have a list of strings that I want to format into a list of dates, before getting the max date time.  The list looks like:  StrList = ['date_range Date Posted: Thu, 08 11 2018 12:12:55 GMT',  'date_range Date Posted: Thu, 08 11 2018 10:53:49 GMT',  'date_range Date Posted: Thu, 08 11 2018 09:55:08 GMT',  'date_range Date Posted: Wed, 07 11 2018 14:23:56 GMT',  'date_range Date Posted: Wed, 07 11 2018 14:23:12 GMT',  'date_range Date Posted: Wed, 07 11 2018 09:07:47 GMT',  'date_range Date Posted: Tue, 06 11 2018 11:44:51 GMT',  'date_range Date Posted: Mon, 05 11 2018 16:17:51 GMT',  'date_range Date Posted: Mon, 05 11 2018 14:07:41 GMT',  'date_range Date Posted: Mon, 05 11 2018 14:03:19 GMT',  'date_range Date Posted: Mon, 05 11 2018 13:07:10 GMT',  'date_range Date Posted: Mon, 05 11 2018 13:05:56 GMT',  'date_range Date Posted: Mon, 05 11 2018 11:41:31 GMT']   I want to get a list that contains only the extracted date and time part of each list element and then subsequently find the maximum of the date times of all the elements.  E.g. Desired output:   DateList = ['08-11-2018 12:12:55',  '08-11-2018 10:53:49 GMT',  '08-11-2018 09:55:08 GMT',  '07-11-2018 14:23:56 GMT',  '07-11-2018 14:23:12 GMT',  '07-11-2018 09:07:47 GMT',  '06-11-2018 11:44:51 GMT',  '05-11-2018 16:17:51 GMT',  '05-11-2018 14:07:41 GMT',  '05-11-2018 14:03:19 GMT',  '05-11-2018 13:07:10 GMT',  '05-11-2018 13:05:56 GMT',  '05-11-2018 11:41:31 GMT']   Then the final step will be to get the maximum date time which in this case will be:  MaxDate = 08-11-2018 12:12:55   Any help will be appreciated.
I've got a huge list of date-times like this as strings:  Jun 1 2005  1:33PM Aug 28 1999 12:00AM   I'm going to be shoving these back into proper datetime fields in a database so I need to magic them into real datetime objects.   This is going through Django's ORM so I can't use SQL to do the conversion on insert.
Privilege banner buggy? Or am I just confused? On the main Stack Overflow site, I arrived and had a banner: "Congrats, you've gained the privilege – create wiki posts and 3 other privileges" This confuses me, because I only see two privileges listed at 100%. Is the banner just buggy?  Or is there a better place to see my privileges that the page linked to by that banner? /etc/sysctl.conf doesn't persist after reboot Core Data - Storing Images (iPhone) My apache2 configuration is problematic: I've two website on a server:   domain1.tdl domain2.tdl   One of them (domain2.tdl) must be and is accessible on port 443 (with SSL). All domains must be and are accessible by port 80. But when we try to access to domain1.tdl on port 443 the domain2.tdl files are display. So, on port 443, domain2.tdl is accessible by domain1.tdl and domain2.tdl. I don't want it !  My configuration:  domain1.tdl:  &lt;VirtualHost *:80&gt;   DocumentRoot /home/sites/domain1.tdl/www   ServerName domain1.tdl   ServerAlias www.domain1.tdl   ServerAdmin xxx@mail.com   RewriteEngine on   &lt;Directory "/home/sites/domain1.tdl/www"&gt;     AllowOverride All     allow from all     Options -Indexes   &lt;/Directory&gt; &lt;/VirtualHost&gt;  &lt;VirtualHost *:443&gt;   DocumentRoot /home/sites/domain1.tdl/www   ServerName domain1.tdl   ServerAlias www.domain1.tdl   ServerAdmin xxx@mail.com   RewriteEngine on   &lt;Directory "/home/sites/domain1.tdl/www"&gt;     AllowOverride All     allow from all     Options -Indexes &lt;/Directory&gt;   domain2.tdl:  &lt;VirtualHost *:80&gt;   DocumentRoot "/home/sites/domain2.tdl/web"   ServerName domain2.tdl   ErrorLog /var/log/apache2/site/error_domain2.tdl.log                 CustomLog /var/log/apache2/site/access_domain2.tdl.log combined   &lt;Directory "/home/sites/domain2.tdl/web"&gt;     allow from all     Options -Indexes   &lt;/Directory&gt;   ServerAlias www.domain2.tdl &lt;/VirtualHost&gt;  &lt;VirtualHost domain2.tdl:443&gt;   DocumentRoot "/home/sites/domain2.tdl/web"   ServerName domain2.tdl   ErrorLog /var/log/apache2/site/error_domain2.tdl.log   CustomLog /var/log/apache2/site/access_domain2.tdl.log combined    SSLEngine on   SSLCertificateFile /etc/ssl/private/domain2.tdl/domain2.tdl.crt   SSLCertificateKeyFile /etc/ssl/private/domain2.tdl/domain2.tdl.key   SSLCACertificateFile /etc/ssl/private/domain2.tdl/GandiStandardSSLCA.pem   SSLVerifyClient None    &lt;Directory "/home/sites/domain2.tdl/web"&gt;     allow from all     Options -Indexes   &lt;/Directory&gt;   ServerAlias www.domain2.tdl &lt;/VirtualHost&gt; If you cast Polymorph on a non beast creature then cast Awaken on their beast form how much carries over after polymorph ends?  Polymorph does not give any explicit information on what happens to your statistics when the polymorph ends:     The transformation lasts for the duration, or [drops to 0 hp]. [...] The target's game statistics, including mental ability scores, are replaced by the statistics of the chosen beast.  (Basic Rules, pg. 266)   So this leaves ambiguity when game statistics are altered during polymorph,   The charm effect of Awaken seems pretty clear from the  and reinforced by the specific wording referring to the target as a beast or plant during effects and a creature afterwards:     The awakened beast or plant is charmed by you [longer than polymorph.] When the charmed condition ends, the awakened creature chooses [...] (Basic Rules, pg. 216)   The other two effects of awakening (other than making a plant mobile) are less clear-cut:     The target gains an Intelligence of 10. The target also gains the ability to speak one language you know.  (Basic Rules, pg. 216)   I would guess the modification to intelligence would apply to the beast's stats and therefore end with polymorph.     as being independent of creature statistics and act more as the character's experience. I'd argue the experience of a stranger turning you into a mouse, then gifting you the ability - as a mouse - to speak a language you have never used before would be an experience you couldn't lose I'm not sure if the language and intelligence granted from awakening should remain linked.    These are two examples I can see this having significant impact on my campaign:   Meet an NPC I don't share a language with, Polymorph them then Awaken their beast form so they can speak my language. Can I now communicate with them when they turn back?  If their original intelligence was higher then 10 is it reduced to 10? Say I use find familiar to get an owl (classified as a fey) familiar, then polymorph it to an owl (classified as a beast) so my druid friend can cast Awaken on it, does my familiar keep an intelligence of 10 and/or the ability to speak?   So after reverting from an awoken polymorphed state would you keep the 10 intelligence and a new language, only the new language, or not keep either? Make grub keep its default boot under kernel updates I dual-boot my machine and I want it to default to boot into windows so that whenever I restart the machine remotely from my home it will be able to get back into Windows (instead of Ubuntu).  The problem is that every time Ubuntu upgrades the kernel, I have to reset the default boot item of grub back to windows. This is because the grub menu loader uses positions i.e. 6 for default OS to boot. And when Ubuntu installs a new kernel it changes that order.  I am looking for a way to configure grub to remember its default boot item under kernel updates. A case of optional “that”: “check the” vs. “check that the” Consider the following use case:   Please check the username and password are correct. Please check that the username and password are correct.   In this case, I would say that that is required because it feels more natural to me and so the flow is better. However, is the lack of that wrong in this case?  The question boils down to: when is that optional? See . A quick summary:   That is optional if the pronoun is the object. That is required if the pronoun is the subject.   I think that we fall into the second case: that is required because the relative pronoun is the subject. But I'm not sure if I'm interpreting these rules correctly. Can someone please advise? cant install or remove anything on 18.04 cause of DPKG error In a complex vector space, $\langle Tx,x \rangle=0 \implies T = 0$ What does ` (backquote/backtick) mean in commands? Why I have this error when I try to install this old blog on my local webserver? I am pretty new to WP (I came from Joomla) and I am finding some difficulties trying to put on my local web server an old backup of a website (made using WP 3.5)  I have performed the following operation:  1) I have put the website backup into a directory named blog into my Apache www directory on my Ubuntu local system.  2) Then I have put the database backup on my MySql local server  3) Finally I have change the values in the wp-config.php file to use my local DB  The problem is that when I try to open the URL to see the website I see noting (a white screen)  Into the Apache log file (/var/log/apache2/error.log) I found the following errors messages:  [Fri Jan 10 22:04:50 2014] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch configured -- resuming normal operations [Fri Jan 10 22:05:08 2014] [error] [client 127.0.0.1] PHP Warning:  require_once(/var/www/blog/wp-load.php): failed to open stream: No such file or directory in /var/www/blog/wp-blog-header.php on line 12 [Fri Jan 10 22:05:08 2014] [error] [client 127.0.0.1] PHP Fatal error:  require_once(): Failed opening required '/var/www/blog/wp-load.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/blog/wp-blog-header.php on line 12 [Fri Jan 10 22:38:37 2014] [error] [client 127.0.0.1] PHP Warning:  require_once(/var/www/blog/wp-load.php): failed to open stream: No such file or directory in /var/www/blog/wp-blog-header.php on line 12 [Fri Jan 10 22:38:37 2014] [error] [client 127.0.0.1] PHP Fatal error:  require_once(): Failed opening required '/var/www/blog/wp-load.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/blog/wp-blog-header.php on line 12 [Fri Jan 10 22:38:38 2014] [error] [client 127.0.0.1] PHP Warning:  require_once(/var/www/blog/wp-load.php): failed to open stream: No such file or directory in /var/www/blog/wp-blog-header.php on line 12 [Fri Jan 10 22:38:38 2014] [error] [client 127.0.0.1] PHP Fatal error:  require_once(): Failed opening required '/var/www/blog/wp-load.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/blog/wp-blog-header.php on line 12 [Fri Jan 10 22:38:39 2014] [error] [client 127.0.0.1] PHP Warning:  require_once(/var/www/blog/wp-load.php): failed to open stream: No such file or directory in /var/www/blog/wp-blog-header.php on line 12 [Fri Jan 10 22:38:39 2014] [error] [client 127.0.0.1] PHP Fatal error:  require_once(): Failed opening required '/var/www/blog/wp-load.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/blog/wp-blog-header.php on line 12 [Fri Jan 10 22:38:40 2014] [error] [client 127.0.0.1] PHP Warning:  require_once(/var/www/blog/wp-load.php): failed to open stream: No such file or directory in /var/www/blog/wp-blog-header.php on line 12 [Fri Jan 10 22:38:40 2014] [error] [client 127.0.0.1] PHP Fatal error:  require_once(): Failed opening required '/var/www/blog/wp-load.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/blog/wp-blog-header.php on line 12   Why? what could be the problem? How can I try to solve it?  Tnx  Andrea dimension of a subspace spanned by two subspaces If $M$ and $ N$ be the subspaces of a vector space $V$ then prove that  $(\dim M) + (\dim N) = (\dim M+N) + (\dim M \cap N)$. I just started real analysis.  I don't have a background in proofs or logic, simply calculus.  So I'm trying to learn more about proofs--so forgive the basic question, please.  How do you go about proving this theorem: If $a$ and $b$ are any numbers, then there is one and only one number $x$ such that $a + x=b$.  This number is given by $x=b+(-a)$.  First part of the proof I understand--it's simple.  We simply use some axioms and do the following:  $a+b-a=b$, which of course is true.  This is just true from plugging in the $b+(-a)$ for $x$.  But how about the uniqueness issue?  In my text, it says:  $$(a+x)+(-a)=b+(-a) x=b+(-a)$$  How does this prove uniqueness?  Is this equation essentially saying that the ONLY possible value of $x$ is expressed by $b+(-a)$?  How would I have known to set this up as part of the proof if I was asked to prove something is unique?  Sorry for the basic question--have to start somewhere. Forced to Quit PhD although the hard and proved work I am a first year Ph. D student, and I have been working on a new topic of research.  I worked day and night to prove something new and verified it. I began my Ph. D while my supervisor was on travel, but he returned before I had been here for long.  When he returned, he told me we have to stop and not continue without any reasonable reasons.  After a few months he began treating me poorly---always belittling and underestimating---although I got two grants from a top conference, made videos and podcasts, and constantly received praise for my good work and personality.    It seems that I have been treated as a competitor, not a collaborator.  Although agreeing with my approaches in private, my supervisor said false words to the committee to take the decision and stop my Ph. D work!  It is not surprising, as there was another former senior Ph. D student who I met on campus, who was not allowed to defend his Ph. D: this same supervisor claimed he was not able to finish his dissertation although he had published in a peer reviewed journal and having citation as well, it was scary and not familiar.  In front of committee, he lied, and said something without proving. I asked if he can make a detailed constructive criticism, but he could not.  All I can say that they are a gang literally, and he said words that show that he is jealous and doesn't want to see me having self confidence in my self. I know no one will believe me, but this is the truth.  Honestly, I am distressed and I'm losing sleep.  I had this dream where there were many people who saw me fail.  All things considered, I don't know whether what happened is good or bad, and I definitely don't know what I should do next!  I would be grateful for your advice and whether there is someone has encountered any similar situation. See permissions for new files on a given directory I don't understand how my Linux machine is operating on new files.   I have an Amazon Linux AMI (RHEL based distro) and when I execute umask I get 0002, so I get whenever I create new stuff other users won't get write access.  But then I go to my home directory and I type:  $ mkdir myDir $ touch myDir/myFile $ ls -l | grep myDir   and I get  drwxrwxr-x 2 myself myself 4096 May 11 22:37 myDir   and for the folder:  $ ls -l myDir -rw-rw-r-- 1 myself myself 0 May 11 22:37 myFile   So apparently there's more going on there then my umask, since myFile permissions are more restrictive than just write protection.  Digging deeper, if I try:  $ sudo touch /var/run/myPidFile.pid $ ls -l /var/run/ | grep myPidFile.pid -rw-r--r-- 1 root    root       0 May 11 22:42 myPidFile.pid   So myPidFile.pid gets a much more restrictive default permission, under /var/run then myFile gets under my home folder.  We could blame the root umask but if I run umask under root I get 0022 which is indeed more restrictive then my user's 0002 umask but still doesn't explain how the execution bit permission isn't set.  So how can I understand a folder's default permission on Linux? I have a SQL Server instance that has a linked server to an Oracle server. There is a table on the Oracle server called PersonOptions which contains the following data:  ╔══════════╦══════════╗ ║ PersonID ║ OptionID ║ ╠══════════╬══════════╣ ║        1 ║ A        ║ ║        1 ║ B        ║ ║        2 ║ C        ║ ║        3 ║ B        ║ ║        4 ║ A        ║ ║        4 ║ C        ║ ╚══════════╩══════════╝   I need to pivot that data so the results are:  ╔══════════╦═════════╦══════════╦══════════╗ ║ PersonID ║ OptionA ║ Option B ║ Option C ║ ╠══════════╬═════════╬══════════╬══════════╣ ║        1 ║       1 ║        1 ║          ║ ║        2 ║         ║          ║        1 ║ ║        3 ║         ║        1 ║          ║ ║        4 ║       1 ║          ║        1 ║ ╚══════════╩═════════╩══════════╩══════════╝   Any suggestions? I am using ECIES (Cryptobox as poncho pointed out) for public key encryption with ECC between Alice and Bob with secret/public keys $(a,A)$ and $(b,B)$ respectively. So Alice encrypts to Bob with  $$ Encrypt(aB,Message) $$  Additionally I would like to encrypt some of Alice's data such that only she can decrypt it. Is it safe to use ECIES to compute a shared secret from Alice's secret and public key as in  $$ Encrypt(aA,Message) $$  I know I could randomly generate a public key, but then I would have to store this key somewhere which I would like to avoid. Carrying confidential corporate data into US on laptop/Drive/device - how to prevent data theft? If I travel to the US and had privacy concerns (for instance may be I was afraid that a rogue customs official may steal said data) what is the current recommended best practice to avoid this? 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? line segment joining two centers of circles is perpendicular to line segment joining two intersection point of the circles