Python List of dates between x and z (dd//mm/year)
How to print a date in a regular format?
My Ubuntu 16.04 keeps disconnecting from the Wi-Fi (eduroam). Why? I haven't noticed any pattern and I'm sure the Wi-Fi works perfectly because I have no problems with the same computer using Windows 10. The Wi-Fi doesn't turn off though, it simply disconnects from the network and reconnects after about a couple of minutes.  I ran this and got:  lspci -knn | grep Net -A2 03:00.0 Network controller [0280]: Qualcomm Atheros AR9462 Wireless Network Adapter [168c:0034] (rev 01) Subsystem: AzureWave AR9462 Wireless Network Adapter [1a3b:2234] Kernel driver in use: ath9k Kernel modules: ath9k   Also running dmesg  Among the many messages the last one is:  [ 3818.806656] wlp3s0: Limiting TX power to 5 dBm as advertised by 00:23:eb:39:28:21   Any idea why this is happening?  Thank you. Why and how is the speed of light in vacuum constant, i.e., independent of reference frame? I was told that the Galilean relative velocity rule does not apply to the speed of light. No matter how fast two objects are moving, the speed of light will remain same for both of them.   How and why is this possible?   Also, why can't anything travel faster than light? I want to perform performance testing on my test server.  How can I capture workload from production and replay on my test server?   Basically I'm looking for detailed steps so that I can replay the workload from production to my test environment. How do I include a custom class file in a module? In Drupal 7 module development, I could include a custom inc, api, or php class file using the  directive in the module.info file or the drupal_load_included() function.   With D8 using PSR, what is the proper way to package up a "plain ole PHP object" and reference it in DefaultController.php? Think something like: $a = new POPO();.  Is just giving the PHP file containing the class a namespace sufficient? How does the controller (or module in general) know to reference or scan for that class? Requesting raw data from previously published research Prove that: area of triangle $S_{ABC}=p \cdot R$, where p is half perimeter of triangle $DEF$ Prove that: area of triangle $S_{ABC}=p \cdot R$, where p is half perimeter of triangle $DEF$. $AD,CF, BE$ are altitudes. Is there a simple way? Viewer-independent copyable spaces at the beginning of a line? I need to include a couple of Python code listings, where the indentation of the lines (using some number of spaces) is significant. I would like for the code listings to be copyable, so the spaces at the beginning of the line need to be be copied along with the text.  This question has been asked in various ways before (e.g. , or ). Those questions focus on making line numbers uncopyable, though.  Making the spaces at the beginning of a line copyable seems to be harder: "I am not sure it is possible to specify in the PDF (at least in a viewer-independent way) that the indentation should be copied too" (). At , Philippe Goutet suggests a solution (turning the spaces into visible spaces, and coloring them in the background color so that they appear invisible) that works using Acrobat Reader, but not all readers. He says "It works under Acrobat Reader and it's extremely pleasant to be able to quickly copy/paste code without problem (perhaps the problem can be circumvented by writing direct PDF code to tell that it's a space, I've never had the time to try)".  Is it possible to produce a PDF with a code listing with copyable real spaces at the beginning of a line?  Minimal example: The line return x should start with four spaces.  \documentclass{article}  \begin{document} \begin{verbatim} def myfunction(x):     return x \end{verbatim} \end{document}   I know that I could attach the code to the PDF as a file, but that's not what I want. Theorem environment with hanging indentation I would like to define a theorem environment with custom layout. In particular, I want the body of the theorem to be indented, like this  Text body. Text body. Text body.  Theorem 1 (Pythagoras).     Let a,b,c the sides of a rectangular triangle.     Without loss of generality, we assume that  a&lt;b&lt;c .     Then, the following equality holds:            a^2 + b^2 = c^2  More text. And even more text.   This is similar to the quote environment, I believe.  How can I do this?  Preferably, I would like to use the existing \newtheorem command, but that's not mandatory. How to print a date in a regular format? This is my code:  import datetime today = datetime.date.today() print(today)   This prints: 2008-11-22 which is exactly what I want.  But, I have a list I'm appending this to and then suddenly everything goes "wonky". Here is the code:  import datetime mylist = [] today = datetime.date.today() mylist.append(today) print(mylist)   This prints the following:   [datetime.date(2008, 11, 22)]   How can I get just a simple date like 2008-11-22? File Save dialog unreadable I just updated my iMac to Mojave, and am still trying to setup my preferences.  I tried dark mode, but did not like it (half of me apps seem to ignore it anyway).  I switched to light mode, but this too has problems. The File Save dialog shows a list of Directories and existing files, but the latter are very light grey, almost indistinguishable from the background.    I have searched the Preferences menu, but can't seem to find any setting to set normal contrast levels like in High Sierra. System.FinalException: Record is read-only: Trigger.updateCompetitors: line 24 I am writing a trigger to get all the Opportunity competitors into a field on Opportunity, however, getting an error while testing it.  Error: updateCompetitors: execution of AfterUpdate caused by: System.FinalException: Record is read-only: Trigger.updateCompetitors: line 24  Can you please check the below code and suggest me what's wrong with this?  trigger updateCompetitors on Opportunity(after insert, after update){    List&lt;Opportunity&gt; OppIds = new List&lt;Opportunity&gt;();     for (Opportunity opp: trigger.new){         OppIds.add(opp);     }  List&lt;OpportunityCompetitor&gt; oppComps = new List&lt;OpportunityCompetitor&gt;();  oppComps= [select id, CompetitorName, Strengths, Weaknesses from OpportunityCompetitor where OpportunityId in: Trigger.newMap.keySet()];  List&lt;Opportunity&gt; OppstoUpdate = new List&lt;Opportunity&gt;();   for (Opportunity opp: OppIds){     String allcomps = null;      if( oppComps.size()&gt;0 ) {       for (integer i = 0; i &lt; oppComps.size(); i++){          allcomps = allcomps + oppComps[i].CompetitorName+',';       }     }    opp.OpportunityCompetitors__c = allcomps;    OppstoUpdate.add(opp);  }    update OppstoUpdate; } I have a strange issue with Windows 10  When I open .nef files they load fine. However after a second or two the contrast changes noticeably. I tried Windows 10 Photos and Picasa Image Viewer.   What am I trying to accomplish? I just want to open files quickly to check for focus and composition before importing into Lightroom  Lightroom does not have this issue   Here is the example opening with Windows 10 Photos    And here is after a second when it 'fully' loads    Picasa Photo Viewer after it loads a bit. It initially opens fine but then it goes all purple How to replace a video on YouTube UK coastline shapefile? SQL Server Escape an Underscore How do I escape the underscore character?  I am writing something like the following where clause and want to be able to find actual entries with _d at the end.  Where Username Like '%_d' How do I use the Cherokee keyboard layout to type English characters? Wow, I've really done it this time. I've locked myself out of my machine.  In preparing for a Cherokee language course, I added the Cherokee keyboard layout to my options. However, I was unable to generate any Cherokee characters by selecting that input device.  I found an article on the web which instructed me to use the dpkg-reconfigure keyboard-configuration command in a terminal.  Once I did that, I rebooted as instructed. Once I was presented with the login screen, I entered my password as usual only for it to fail.  After failing a few times, I gave my attention to what is usually a mundane exercise (i.e., logging in).  While I carefully entered my password, each time, I get the message, "Sorry that didn't work..."  So, I brought up the onscreen keyboard... But the password box displays an asterisk for only the first character of my password.  I attempted to use the direct Unicode input method (ctrl-shift-Uxxxx) but the Cherokee keyboard has no "U" key.  Can anyone please help me troubleshoot this? How do I fix this "E: Type '*' is not known on line * in source list ..." update error? Every once in a while I see users having issues to update due to errors like this:  E:Type 'ain' is not known on line 1 in source list /etc/apt/sources.list.d/some-ppa.list'   with varying types/line numbers/source list files (often after removing a PPA).  How can such an error be fixed? How do I restart the SSH service? Proof by Induction for inequality, $\sum_{k=1}^nk^{-2}\lt2-(1/n)$ Let $n$ be a positive natural number, $n\ge 2$. Then $\displaystyle\sum_{k=1}^n \frac{1}{k^2} \lt 2 - \frac{1}{n}.$   The basis step was easy but could someone give me a hint in the right direction as to how to do the induction step?  I tried this:  $\displaystyle\sum_{k=1}^k \frac{1}{k^2} + \frac{1}{(k + 1)^2} \lt 2 - \frac{1}{k + 1}$  But it's getting me nowhere or I am doing something wrong. I am no expert so a clear explanation would be appreciated. Thanks. Add Appendix with correct page to ToC