I have a list of Objects: [variable , variable , variable , ...] which each have an array called domain. As example: variable.domain = ["aa" , "bbb" , "c" , "dddd"]. I need this variable list sorted by the size of the domain arrays.  How can i sort this list using .sort() or .sorted() ?
I've got a list of Python objects that I'd like to sort by an attribute of the objects themselves.  The list looks like:  &gt;&gt;&gt; ut [&lt;Tag: 128&gt;, &lt;Tag: 2008&gt;, &lt;Tag: &lt;&gt;, &lt;Tag: actionscript&gt;, &lt;Tag: addresses&gt;,  &lt;Tag: aes&gt;, &lt;Tag: ajax&gt; ...]   Each object has a count:  &gt;&gt;&gt; ut[1].count 1L   I need to sort the list by number of counts descending.  I've seen several methods for this, but I'm looking for best practice in Python.
How can I get the active screen dimensions? Windows License stored in UEFI/BIOS Since Windows 10 (or earlier?). It has become standard to store the license product key in the UEFI/BIOS.  I am in the market for buying a new (custom build, individual parts) PC with a new Windows 10 License.  However I was wondering (and can't find clear information on this subject). What the differences between the licenses are when it comes to OEM and Retail.  If in the far future I were to sell this PC:   Would the license (whether OEM or Retail), be stored in the UEFI/BIOS, where it could be used by the new owner? If so, can I remove the license key from the UEFI/BIOS?   I want to know this because I don't want to buy Windows 10 every single time I buy a new PC (since no new versions of Windows will be created, only updates). I have a .net client application which is connected to a remote database. Is it safe to keep a single connection open for the lifetime of the client (hours)? Does the answer hold if I have multiple (10 or 100) clients running? Are there rules for creating level 0 characters? Are there rules for creating level 0 characters in 5e? I've been running a campaign where the players begin sub-standard and 1st Level characters are generated in-game as the story unfolds. I just made them all begin with a couple of hp and 9's across the board for ability scores (since I wanted them at a disadvantage compared to the average human, and to fail at a generic DC10 task more often than succeed).  It was a real grind, with many opportunities for TPK (total party kill) when faced with even a single challenge rating 1/2 adversary (obviously I fudged the dice a little to prevent this). Are there published rules for this?  If there aren’t published rules for this, has anyone tried doing something like this? Any first hand experience on how it has played out would be welcome. When I launch certain programs from the command line like eclipse and document viewer in 11.10 it spews a load of information that seems inconsequential.   Also when they are run in the background they sometimes continue to produce output to the terminal which I am currently working on, which is irritating.  I would like them just launch and keep the background stuff in the background. My reasoning is that if you launch these programs through the GUI (eg double clicking on an icon) these messages are never shown to me, so I don't need them in the command line. Antonym of "phobia" If a phobia is to have an irrational fear of something, what is the word for having an irrational affinity for something?  For example a numerologist may fear the number 13, but be attracted to (or even have a love for) the number 8. (Some would say this is irrational.) Trying to remember a book that had people (I think they turned white?) segregated into a compound How does quantum trapping with diamagnets work? I just saw  demonstration by someone from a Tel Aviv University lab.  What they achieved there is mind blowing. I myself own a levitron that uses the Hall effect to levitate a magnet, the problem with that is the magnet must always be flat facing the Hall effect base, any unbalance will wreck the levitation. But in the case of the video you can see that he isn't constrained by such things, the disk can levitate and stay still at whatever angle and orientation. Instead of being levitated, the disk is simply being held still.   How does this happen? He referred to this as quantum trapping, but I've little idea about what that is....  Also, what material is the base in these demos? Is the circular track in the demonstration magnetic? I assume this is so. Is there any conceivable way for this technology to make objects levitate on any surface? Insect identification - Is this a bedbug? This bug was found on a couch in . The couch, and the two beds in the room show no signs of other bugs. Is this a bed bug that I should worry about or something harmless? It was slightly larger than a common tick. Does one work in or on an aeroplane? In an exam paper, there was a picture of an air stewardess in the aeroplane serving passengers. One of my pupils wrote the following:      The air stewardess works on an aeroplane.    Shouldn't it be the air stewardess works in an aeroplane? What is the best way of searching the whole classpath for an annotated class?  I'm doing a library and I want to allow the users to annotate their classes, so when the Web application starts I need to scan the whole classpath for certain annotation.  Do you know a library or a Java facility to do this?  Edit: I'm thinking about something like the new functionality for Java EE 5 Web Services or EJB's. You annotate your class with @WebService or @EJB and the system finds these classes while loading so they are accessible remotely. U.s. boiler / Burnham boiler alterations i have a 203ncl-tei2 boiler installed in danvers Massachusetts. Regular elevation. This boiler also has a failed tejurland (universal control) powerventer motor on it that is only humming, not spinning. Looked for a dead animal, or nest and checked for free spinning of the squirrel cage it was fine. Its installed 3 feet from outside wall on the verticle, (installed wrong also has 2 seperate 90° bends after the venter, not my issue but may have caused the motor to fail). Ontop of the boiler we have a factory automatic damper assy.   So the 2nd part of the problem is I noticed the tei in the model number and assumed this ment i should expect to see a tejurland "universal" power venter installed and i do. I assume because its a universal control unit thats where they went wrong. This unit is atleast 200$ cheaper here than the model burnham uses.  I call burnham and ask what the original power venter model number is and they tell me what some pros may already know, (i didnt), that the tei2 is actually (t)taco, (el)elivation, (2) 2 is 2,000 ft  .Note:he was not.100% sure about the el. He was definetly sure PV would be in the model number and it was not tejurland. There is no chimney on this house, never was. Power venter wall thimble outside is very old definetly older than the 1 year old motor that failed. Burnham also said this is not a boiler that can be converted to a powerventer which is sometging i do not understand. He said if it does not have pv in the model number it should not have one. I have in the past converted a boiler with a factory reccomended power venter after a customer lost the chimney. I called and got lucky they had a option for it. I do not remember manufacturer but do remember also seeing it in the install manual as an addendum or seperate manual.  Is this a fact?   Anyone have experience with this?   What are the ramifications of an elevated boiler installed at sea level?   If i can not find another awnser, i will havemto tell customer they need a new boiler or i will have to walk away.   Why do they not just make an orifice kit for elevated boilers to work properly at higher elevations? Is it because they have to add another section to the boiler so it can put out the same  b.t.u.?  I know there is a reason. Seems like smaller orifice would fix the air fuel ratio along with a regulator adjustment. Its to simple of an awnser knowing that manufacturers make a complete different boiler for higher elevations.   ! Has anyone had success recovering deleted files from an ext4 partition? I've tried various utilities, but none have worked yet. I'd be grateful if someone can share a success story! How to make DNS server propagate faster if you are a site owner? It's often the case that I want to change name servers because my site is messed up.  Well, it takes a very long time for the name server to propagate.  Is there something in DNS, or registrar or anything I can do to speed that up.  Flushing my dns server using  and it rarely works Determinant of a specially structured matrix ($a$'s on the diagonal, all other entries equal to $b$) I have the following $n\times n$ matrix:  $$A=\begin{bmatrix} a &amp; b &amp; \ldots &amp; b\\ b &amp; a &amp; \ldots &amp; b\\ \vdots &amp; \vdots &amp; \ddots &amp; \vdots\\ b &amp; b &amp; \ldots &amp; a\end{bmatrix}$$  where $0 &lt; b &lt; a$.  I am interested in the expression for the determinant $\det[A]$ in terms of $a$, $b$ and $n$.  This seems like a trivial problem, as the matrix $A$ has such a nice structure, but my linear algebra skills are pretty rusty and I can't figure it out.  Any help would be appreciated. Why doesn't Ubuntu ship an application, or the latest versions of some applications? What reasons are there for applications in Ubuntu not being the most up-to-date, and why are some applications not available, in its  repositories? What happens when a Wizard loses Intelligence after preparing his spells? A Wizard prepares a number of spells equal to his Wizard level + his Intelligence modifier.  But what happens if he loses Intelligence (the most obvious way I can think of is unattuning to a Headband of intellect and having a base Intelligence score of less than 18) after preparing his spells? Does he...   Lose access to the first [INT mod lost] spells he prepared? Lose access to the last [INT mod lost] spells he prepared? Randomly lose access to [INT mod lost] of the spells he prepared? Keep access to all his prepared spells (but will be able to prepare fewer spells after his next long rest, unless he regains the lost intelligence)? Why does \cal{M}_n give “M>”? Why does \cal{M}_n give “M>” in parts of my LaTeX file and works correctly in other parts? How often is the Golden Ratio actually used in modern design? The  is the stuff of legend () and is . My question is two-fold, really: Is the Golden Ratio really a good tool used in modern design (defined here as 20th century on forward), and if so, how often is it used outside of the aforementioned known uses?  EDIT: To @e100's first comment, examples of modern use of the Golden Ratio would be a great thing to add here if there any documented or arguably conclusive uses of it. What potions actually grant fame or glory, or put a stopper in death? Are there any? ‘You are here to learn the subtle science and exact art of potionmaking,’ [Snape] began. He spoke in barely more than a whisper, but they caught every word – like Professor McGonagall, Snape had the gift of keeping a class silent without effort. ‘As there is little foolish wand-waving here, many of you will hardly believe this is magic. I don’t expect you will really understand the beauty of the softly simmering cauldron with its shimmering fumes, the delicate power of liquids that creep through human veins, bewitching the mind, ensnaring the senses ... I can teach you how to bottle fame, brew glory, even stopper death – if you aren’t as big a bunch of dunderheads as I usually have to teach.’&#185;   Philosopher's Stone - page 102 - Bloomsbury - chapter 8, The Potions Master   Are there any canon potions that actually grant fame or glory, or stopper death? I'm looking for specific canon-based answers from sources such as the Harry Potter books, interviews with J.K. Rowling, or information from Pottermore. Maybe because it's early I'm overlooking the obvious, but offhand I can't think of any canon potions that fit this criteria exactly.   &#185;I edited in the entire paragraph that I can teach you how to bottle fame, brew glory, even stopper death comes from for clarity. Hopefully this will be helpful and provide a better context for the comment in question.