Printing a block of elements in a list
How do you split a list into evenly sized chunks?
Why did the slaver in Astapor think Daenerys wouldn't do exactly what she did? Spoilers! (do I have to even say that here?)  I recently rewatched the episode of Game of Thrones where Daenerys is in Astapor. She makes the deal with the master slaver guy, where she trades him one of her dragons for 8,000 of his very tough slaves. I immediately thought this was stupid for two reasons:   Why would he think the dragon would immediately obey him rather than her? Maybe he doesn't quite believe the 'Mother of Dragons' lore, but it's still basically a pet at the very least. This one isn't as bad though, as... Why would he possibly think she wouldn't betray him and use her freshly bought slaves to take back her dragon? He just traded her literally all his slaves and he has not been kind to her so far. He has motivation to not go back on the deal -- he's running a business, basically... but she has no reason not to.   I guess you could argue that he was blinded by greed, but I think that would be poor writing -- he's in a vicious trade, I can't imagine he would've survived long thinking so naively.  Does anyone have a good explanation? Looks like there is something wrong with reputation calculation:        +2*5 -6*2 = -2...   why there is +6 in reputation popup?  As @Catija said in comment calculation is OK in the profile:        Perhaps the issue is in the top-bar. $-1$ is a quadratic residue modulo $p$ if and only if $p\equiv 1\pmod{4}$ I came across this problem and I believe Lagrange's theorem is the key to its solution.  The question is:     Let $p$ be an odd prime. Prove that there is some integer $x$ such that $x^2 \equiv −1 \pmod p$ if and only if $p \equiv 1 \pmod 4$.   I appreciate any help.  Thanks. I'm taking my first crack at  with jQuery. I'm getting my data onto my page, but I'm having some trouble with the JSON data that is returned for Date data types. Basically, I'm getting a string back that looks like this:  /Date(1224043200000)/   From someone totally new to JSON - How do I format this to a short date format? Should this be handled somewhere in the jQuery code? I've tried the jQuery.UI.datepicker plugin using $.datepicker.formatDate() without any success.  FYI: Here's the solution I came up with using a combination of the answers here:  function getMismatch(id) {   $.getJSON("Main.aspx?Callback=GetMismatch",     { MismatchId: id },      function (result) {       $("#AuthMerchId").text(result.AuthorizationMerchantId);       $("#SttlMerchId").text(result.SettlementMerchantId);       $("#CreateDate").text(formatJSONDate(Date(result.AppendDts)));       $("#ExpireDate").text(formatJSONDate(Date(result.ExpiresDts)));       $("#LastUpdate").text(formatJSONDate(Date(result.LastUpdateDts)));       $("#LastUpdatedBy").text(result.LastUpdateNt);       $("#ProcessIn").text(result.ProcessIn);     }   );    return false; }  function formatJSONDate(jsonDate) {   var newDate = dateFormat(jsonDate, "mm/dd/yyyy");   return newDate; }   This solution got my object from the callback method and displayed the dates on the page properly using the date format library. In my situation, it's for a local build/staging server running ubuntu server. Things I'd like to know are:  Why I should/shouldn't use LVM?  What problems might it cause in terms of either regular server operation or things I might want to do later? (ex. partitioning)  Why I should/shouldn't use encrypted LVM instead of LVM?  What problems might encrypted LVM cause in terms of either regular server operation or things I might want to do later? (ex. partitioning) When to use "If I was" vs. "If I were"? MacOS High Sierra: An error occurred while verifying firmware 32-Bit UEFI Boot Support 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. What do they do with all the plates and cups in Star Trek? NVMe PCIe x4 SSD on M.2 PCIe x2 slot? i'm about to get a new SSD for my PC, and before spending the money i have some doubts about my decision i would like to clarify First, my mobo is a B450 Aorus Pro Wifi, it has 2 M.2 slots, one of them full length (22110) compatible with PCIe 3.0 x4 and the other one standard length (2280) and support only for PCIe 3.0 x2 About the drive, i'm aiming for a 1tb XPG SX8200 Pro , which is a PCIe 3.0x4 SSD My first M.2 slot is already taken by the main SSD, which i use for the OS and other stuff, i can't really use it. Will a PCIe x4 SSD work on a PCIe x2 slot? How much performance will be lost if it does? Will it be worth it? Why does latex stretch small sections across the whole page vertically? Is B1 visa in perfect condition valid on old damaged passport? I got my US B1 visa last month on my Indian passport. Someone in my family wrote a phone number on one of the blank page of my passport. As my passport is damaged now, can I travel with my current passport to US or I should apply for new passport? Also, will B1 visa be valid on old damaged passport if I get new passport? Suppose all the Associated Primes are Minimal. Let $R$ be a commutative Noetherian ring with unit and let $I$ be a fixed ideal. I am sorry if the following turns out to be a very silly question.  1) Suppose $\operatorname{Ass}(R/I)$ are all minimal, then what can we say about $R/I$?  One conclusion is that $I$ has a unique primary decomposition. If $R/I$ is CM, then $\operatorname{Ass}(R/I)$ are all minimal, but I don't think the converse is true. Can someone provide a counterexample?  2) Suppose $\operatorname{Ass}(R/I)$ are all minimal and have the same height. I still dont think we can conclude that $R/I$ is CM. Can someone provide a counterexample? Theorem 2.1.6 of Bruns and Herzog, CM Rings, gives a result in this direction but it needs additional hypothesis. It says that if every ideal $I$ is generated by height $I$ elements and $\operatorname{Ass}(R/I)$ are all minimal, then $R$ is CM.  It would be nice if someone can say something nice about the ring in the special situation described in 1) and 2).  Thanks. Good reading on the Keldysh formalism I'd like some suggestions for good reading materials on the Keldysh formalism in the condensed matter physics community. I'm familiar with the imaginary time, coherent state, and path integral formalisms, but lately, I've been seeing Keldysh more and more in papers. My understanding is that it is superior to the imaginary time formalism at least in that one can evaluate non-equilibrium expectations. How am I supposed to install El Capitan on a new SSD without recovery partition? Let $A,B \in \mathbb{M}_n (\mathbb{C})$. If $A^2B + BA^2 = 2ABA$ then exist $k \in \mathbb{N}$ where $(AB-BA)^k = 0$.  I tried solve with minimal polynomial, but I did not have much effect. Proof using Prüfer encoding The question is as below:      Show that each vertex $v$ of a tree $T$ appears $deg(v)-1$ times in the Prüfer encoding of $T$, where $deg(v)$ is the degree of $v$ in $T$.   For this, I think there are 3 scenarios a leaf should be considered for: (1) when it is a leaf as part of a tree; (2) a leaf that has been discarded; (3) the remaining edge. I feel like this will result in a short proof which is only two (or so) statements long, but at the same time, feel it is too simple.   EDIT: I've had a look at this again and narrowed it down to 2 cases:   Case 1: The vertex $v$ in question has $deg(v)\ge2$. $v$ then loses its neighbours as the algorithm is applied repeatedly until $v$ becomes a leaf itseelf. At this point, $v$ is attached to another neighbour, leaving an edge. This means the algorithm can no longer be applied and we have obtained the final Prüfer Encoding for the tree $T$.  Case 2: The vertex $v$ has $deg(v)\ge 2$. It loses its neighbours as the algorithm is applied repeatedly but is deleted itself at some point in the process.   Have I gone about this wrong?  Thank you. I am asking this question from an educational/hacking point of view, (I wouldn't really want to code like this).  Is it possible to implement a while loop only using C preprocessor directives. I understand that macros cannot be expanded recursively, so how would this be accomplished? How is the electostatic field propagated by the vacuum? How does a charge feel the presence of another charge when there is NOTHING between them? Is the word "vacuum" equal to "nothing"? Imagine two charges of opposite sign, far from one another in vacuum, and moving with constant velocity - s.t. none radiates energy, none emits photons. At some time though, the course of their movement brings them closer. They begin to accelerate toward one another. How do they feel the presence of one another? During their constant movement no photons are emitted, no "information" spreads in the universe about their presence.