I am trying to figure out how do I get the 4 digits each time when I loop back for the data given below  li = ['1','1','7','1','2','1','1','4','1','6','7','8','1','8','1','0','1','B','1','N','1','Y','1','T','1','O']   as the output:  1171 2114 1678 1810 1B1N Y1T1   Can Anyone help me out please?  Answer I suppose is like this  list=['1','2','3','4','5','6','5','4','7','8','9','1','0','6','4','3','4','5','4','7','8','9','0'] j=0 for i in len(list):      if i%4==0:          print("\n")      print(list[i],end=' ')
I have a Python script which takes as input a list of integers, which I need to work with four integers at a time.  Unfortunately, I don't have control of the input, or I'd have it passed in as a list of four-element tuples.  Currently, I'm iterating over it this way: for i in range(0, len(ints), 4):     # dummy op for example code     foo += ints[i] * ints[i + 1] + ints[i + 2] * ints[i + 3]  It looks a lot like &quot;C-think&quot;, though, which makes me suspect there's a more pythonic way of dealing with this situation.  The list is discarded after iterating, so it needn't be preserved.  Perhaps something like this would be better? while ints:     foo += ints[0] * ints[1] + ints[2] * ints[3]     ints[0:4] = []  Still doesn't quite &quot;feel&quot; right, though.  :-/ Related question:
Does anybody know how to make a 'always-on-bottom'-windows, or a window pinned to the desktop? It should receive focus and mouseclicks, but should stay at the bottom of the Z-order. It would also be great if it could stay on the desktop even when user do a minimize all or show desktop operation.  Both delphi and c# solutions (or partial solutions/hints) would be great. How to control internet access for each program? I would like to use a software to control which program may connect to the internet. I know that this behaviour is associated with the word "firewall", but some Linux users are very upset if somebody demands a Personal Firewall. I don't want to upset you by demand such a program. I don't want to "secure ports" or other stuff a Personal Firewall promises on Windows. I looked into iptables but it does not fit my requirements.  I saw an excellent answer here () but it's very uncomfortable to set this up.  Is there a software that asks for each program if it may access the internet? Where can I find other RPG players? Can I get SSD rw performance while keeing data security if I combine SSD & HDD in btrfs RAID1 I have 2 storage devices; classical slow HDD (750GB, /dev/sda) and faster SSD (128GB, /dev/sdb). Currently I have installed Ubuntu &amp; Mint on same btrfs partition on SSD (/dev/sdb5). My btrfs pool consists of /dev/sdb5.  What I want to achieve is data replication on HDD while keeping SSD performance: Something like this:  For read case it would be ideal for procedure to go like this:   read from SSD check checksum if it verifies.. awesome, give me the data if not, fetch data from HDD and perform error correction through duplicate data   I'd manually run (some tool I'm not sure which one... btrfs check --repair perhaps?) every month or so to check HDD checksums and correct them via SSD data against bitrot.  For write case:   write to SSD sync to HDD when write requirements are low, thus not slowing down the system.   Is this possible and how would I do it?  Bottom line is, I like btrfs and would like it to duplicate data across HDD &amp; SSD drive automatically while keeping SSD excellent performance.   Using SSD as write cache is not an option since it's missing data duplication and security. I would like to take a picture of a street during the day to depict how much traffic and cars there are on the street.  Is there anyway to do this with a long exposure photograph?  I have a Nikon D90 and I set the f stop down to 1/16 (the lowest of my lens) and set the time to 2 seconds. Doing this, the exposure is almost saturated when taken around 5pm with the sun setting behind a tree. Doing this, the cars passing by were very hard to make out against the stationary background, being visible as a blur in the color of the car.  Perhaps this is not possible and I should just do this at night where the cars lights are much brighter than the background.  Please suggest how else I might depict the traffic in a photograph?  Are daytime long exposure photographs even possible? Read from location on console C# Suppose $\displaystyle a_n=\frac{1}{(\text{log}2)^p+(\text{log3})^p+...+(\text{log}n)^p}$ for $n\geq 2$ and $p&gt;0$. For which values of $p$ does $\sum_{n=2}^\infty a_n$ converge?  So, when $p\leq 1$, $\displaystyle a_n\geq \frac{1}{(n-1)(\text{log}n)^p}$ for $n\geq 2$. Let $\displaystyle b_n=\frac{1}{(n-1)(\text{log}n)^p}$. Then $\sum b_n$ diverges since $p\leq 1$. Therefore by comparison test $\sum a_n$ diverges when $p\leq 1$.  When $p&gt;1$, $\displaystyle a_n\leq \frac{1}{(\text{log}n)^p}$. Let $\displaystyle c_n= \frac{1}{(\text{log}n)^p}$. If $\sum c_n$ converges then I will win. But now I am stuck. Is $\sum c_n$ converges? Then how can I prove it? If not how can I conclude the state of convergence of $\sum a_n$ for $p&gt;1$?   Can anybody please help? Invertibility of the Product of Two Matrices I have shown that if two $n\times n$ matrices $A$ and $B$ are invertible, then $AB$ is also invertible. I am having problems though with showing that $(AB)^{-1}=B^{-1} A^{-1}$. I thought of using their left-multiplication transformations but it seems that this is only associative and not commutative so I can reverse $L_A L_B$ Does the rotation of the earth dramatically affect airplane flight time? Say I'm flying from Sydney, to Los Angeles (S2LA), back to Sydney (LA2S).  During S2LA, travelling with the rotation of the earth, would the flight time be longer than LA2S on account of Los Angeles turning/moving away from our position?  Or, in the opposite direction, would the flight to Sydney be faster since the Earth turns underneath us and moves Sydney closer?  ===   Please ignore jet stream effects and all other variables; this is a control case in an ideal environment. By "dramatically" I suppose I mean a delay of 1 hour or more. I have seen this many times, a question is being asked because a previous, duplicate question was asked and answered a few years ago and has no longer relevant answers.  The  is to edit the old question, or add new answers to it, but it is not always happening.  I was wondering, should I still mark it as duplicate and vote to close it? Or just leave it as is? I try to prove the following formula:  $$n!=\prod_{k=1}^n \operatorname{lcm}(1,2,...,\lfloor n/k \rfloor)$$  I noticed that  $\upsilon_{p}(\operatorname{lcm}(1,2,...,\lfloor n/k \rfloor)) = s$ iff $\lfloor n/(p^{s+1}) \rfloor &lt; k \leq \lfloor n/(p^{s}) \rfloor $ What do the numbers in a man page mean? So, for example, when I type man ls I see LS(1). But if I type man apachectl I see APACHECTL(8) and if I type man cd I end up with cd(n).  I'm wondering what the significance of the numbers in the parentheses are, if they have any. In the paper "Beautiful Code Compelling Evidence", by J.R. Heard -- Code is formated in a particular way which includes margin comments. I am looking for a way to do this as I think it is a very clear way to comment comment code in a literate programming style. How can I detect if I'm in a subshell? Intuition behind $k$-algebra, $k$-algebra morphisms? What is the historic present tense? I learned that the historical present may be used to create an effect of immediacy in narratives. I have a question about the historic present tense. Why don't we use the progressive tense instead of the simple present tense?   ※My English skill is poor, so my question might sound rude. But I don't mean to offend anyone. I'd be glad if someone could reply to my question. The dock doesn't work correctly after I enter my password, either. I am trying to use the AwesomeCV template () for creating a CV using TexMaker 5.0.3 with XeLaTex. However, I am not able to get this to work as I get the following error messages:    Does anyone know what the source of problem might be and how to solve it?  Thanks a lot in advance,  Cheers Tool to create text files from a template I have to regularly create 100+ text files from templates. I currently use an overly complicated shell script. I think there is a smarter way to handle this, but I don't know how.  I have a "database" :  # outputfile      template            data1   data2    data3 first.txt         $template_main      $text1  abcd     1234 second.txt        $template_main      $text2  efgh     5678 third.txt         $template_other     $text1  ij       90   And a configuration file :  template_main=main.txt template_other=other.txt text1=whatever text2=blah   The templates are text files with placeholders like %%data2%% (the placeholder form can be changed).  Does someone know a tool to automate this better than with a complicated shell script ? How do I change permissions on a FAT32 formatted drive?