How to compare all list itetms in Python shortest
Check if all elements in a list are identical
How to break multi digit number into separate digits in VHDL? I found the method .But I do not know how to perform this in VHDL. Let a fixed point number (12 downto -19) like 3456.478396 I need break this number entirely into separate numbers 3456.478396 --> 3,  4, 5,  6,  (dot) ,  4,  7,  8,  3,  9,  6...  into 11 integer type variables. How to perform this in VHDL?  signal example : sfixed(4 downto -4); --'example' contains 9.75 then it is storage as "01001.1100". --simply example ="10011100". --10011100 --&gt; integer 156   How to get back original 9.75 number from 156 to separate into single digits?  I USED,  library ieee; library ieee_proposed; use ieee.std_logic_1164.all; use ieee.numeric_std.all; use ieee_proposed.float_pkg.ALL; use ieee_proposed.fixed_pkg.ALL; use ieee_proposed.fixed_float_types.ALL; In Ubuntu, I want to scroll up while a command is running in my terminal window and generates new output (the command that is running is rspec). I can scroll up, but each time rspec generates a new line of console output, it throws me back down to the bottom. Is there a way to scroll all the way up? I'm using terminator on Linux Mint/Ubuntu 12.04 LTS. I found a possible workaround.  says that with stty ixon  you can turn on &quot;XON/XOFF flow control for terminal output. Being able to pause output by typing ^S and resume it by typing ^Q [...]&quot; This it not totally what I wanted though, without having to pause the output (and maybe wondering when forgetting to turn it on again), I thought there might be a simple modifier key like shft-alt with mouse wheel scroll-up. Are there better solutions? How to remove a vector QgsVectorLayer from QGIS python plugin I managed to add QgsVectorLayer in QGIS through a python plugin, for example:  vl = self.iface.addVectorLayer(uri.uri(), layerName, self.dbConn.getProviderName())   But how can I remove it? I have downloaded and installed the newest  for my Windows 7 (64-bit OS), but when I want to install 64-bit Linux, the New->Create Virtual Machine only displays 32-bit option, no 64-bit option. Could anyone give any clues about this issue? Thanks very much in advance! Why did my windshield freeze instantaneously? Instantiate TinyMCE via JS ( rather than PHP/wp_editor ) In Assa Auerbach's book (Ref. 1), he gave an argument saying that in the normal process of path integral, we lose information about ordering of operators by ignoring the discontinuous path.   What did he want to say? I don't think there is any problem related to the ordering of operators.  References:   Assa Auerbach, Interacting Electrons and Quantum Magnetism, p.102, just below eq. (10.6). https:// search results appearing on Google for purely http:// site I started weeding through my site's search results from Google today, using a site: search, to determine if there are any links that cause 404s and thus need redirecting. To my amazement I noticed numerous https:// results relating to various pages. My site doesn't have a SSL certificate, doesn't serve such pages, doesn't internally link to https:// pages, doesn't include any such files in its sitemap.xml and, for all of these, never has.  I decided to do a Google search for https://&lt;my site&gt; and found one site that incorrectly refers to the root of my site with a https:// prefix - I will try to contact them to get them to correct this.  I'm not sure however how Googlebot managed to index the non-root files as https://. I can't find any external links to them and surely, without certification, Googlebot should have stalled at the first request?  I've just added the following lines to the site's .htaccess (although the surfer still has to navigate through the browser's "This site is a security risk. Abandon hope all ye who enter here!" message(s) first to get there):  RewriteEngine On RewriteCond %{HTTPS} on RewriteRule ^(.*)$ http://www.&lt;my site&gt;.org/$1 [R=301,L]    replacing &lt;my site&gt; with my domain name.   My big question is this though - I would like to use the Google Webmaster Tools Remove URLs feature to remove the https:// pages from the index. Can I be guaranteed that this will only remove the https:// versions of each relevant page and not the valid http:// versions?  My thanks to anyone who can help me out with this particular question and the issue in general. How do I disable client side decoration globally in GNOME? I'm using Ubuntu GNOME 17.04. One encounters client side decoration (CSD) as most of the official GNOME applications (Nautilus, gedit, Evince etc.) use  (a combined title bar and toolbar, see linked screenshots) whereas other applications don't. This feature is disabled in Unity, all the applications use traditional separate title bars.  Screenshots (from ):     Nautilus with GtkHeaderBar   Nautilus without GtkHeaderBar     For consistency I want to disable GtkHeaderBars globally (in all the applications using it) and use separate title bars. Is there a way to achieve that?  I have heard of gtk3-nocsd package, but couldn't make it work with GNOME for all the applications. I'm planning a trip to recover a motorcycle from a distant city. The ideal trip would be flying to that location and coming back riding the bike, but that would require me to transport my riding gear with me in the plane: Leathers, boots, gloves, back protector and crash helmet.  All this is bulky and expensive stuff, and a crash helmet may be damaged if dropped or hit hard.   I don't expect any airline to allow me a crash helmet as hand luggage; and wearing it all the time is out of the question :-)   To complicate things, I would be coming back riding the bike, so any hard suitcase would have to be left behind.   How do people normally transport that kind of stuff? Why does the following code does'nt work when i am using PDFLaTeX or just LaTeX ? I tried it in different editors as well.  This is the code   $\{f^'_n\}$   Surprisingly it works on Math.SE site What form of the verb is used with compound subjects containing "or"? Finding descendants of British great grand uncle who emigrated to Australia? From  I have received the information of the person with the possibility of great-grandfather.   However, I have a bigger problem from here which is whether he really is my great-grandfather because there was a brother to him in the information.   If I can find his brother's descendants, then I may be able to learn the kinship with DNA testing.   How can I find the living descendants of this great grand uncle?  I was born and grew up in Japan where research is easy for me but I do not know the best way in Britain and Australia.  C.Z.Ede is the name of the candidate for my great-grandfather and his information can be found at   There is also a Mr Peter Zohrab site () which mentions "Sydney Cuthbert Ede, Eagleville Station, Talbotville, Victoria, Australia".  Mr Peter Zohrab from that site suggested that I look for descendants of Sydney Cuthbert Ede in Australia or New Zealand. However, I have not yet found any. I am also inquiring at the church in which he was baptized. Is the Macbook 12 inch's USB-C charger interchangeable with other USB-C chargers or devices? If there is only the Macbook 12 inch USB-C charger nearby, can it be used to charge other USB-C devices, such as any Android phones that also use USB-C? (will it be "too powerful" and damage other devices?)  Vice versa, if there is a Quick Charge 2.0 or 3.0 USB-C charger from other devices nearby, can it be used to charge the Macbook 12 inch?  The main concern is about whether it could damage the device or battery. Evaluating the infinite product $\prod\limits_{k=2}^\infty \left ( 1-\frac1{k^2}\right)$ Evaluate the infinite product $$\lim_{ n\rightarrow\infty }\prod_{k=2}^{n}\left ( 1-\frac{1}{k^2} \right ).$$  I can't see anything in this limit , so help me please. I have developed some custom DAO-like classes to meet some very specialized requirements for my project that is a server-side process that does not run inside any kind of framework.    The solution works great except that every time a new request is made, I open a new connection via MySQLdb.connect.    What is the best "drop in" solution to switch this over to using connection pooling in python?  I am imagining something like the commons DBCP solution for Java.    The process is long running and has many threads that need to make requests, but not all at the same time... specifically they do quite a lot of work before brief bursts of writing out a chunk of their results.  Edited to add: After some more searching I found  which looks decent, but as I'm relatively new to python I guess I just want to make sure I'm not missing a more obvious/more idiomatic/better solution. throwing exceptions out of a destructor Most people say never throw an exception out of a destructor - doing so results in undefined behavior. Stroustrup makes the point that "the vector destructor explicitly invokes the destructor for every element. This implies that if an element destructor throws, the vector destruction fails... There is really no good way to protect against exceptions thrown from destructors, so the library makes no guarantees if an element destructor throws" (from Appendix E3.2).   seems to say otherwise - that throwing destructors are more or less okay.  So my question is this - if throwing from a destructor results in undefined behavior, how do you handle errors that occur during a destructor?  If an error occurs during a cleanup operation, do you just ignore it? If it is an error that can potentially be handled up the stack but not right in the destructor, doesn't it make sense to throw an exception out of the destructor?  Obviously these kinds of errors are rare, but possible. I would like to know if there is some way to share a variable or an object between two or more Servlets, I mean some "standard" way. I suppose that this is not a good practice but is a easier way to build a prototype.  I don't know if it depends on the technologies used, but I'll use Tomcat 5.5    I want to share a Vector of objects of a simple class (just public attributes, strings, ints, etc). My intention is to have a static data like in a DB, obviously it will be lost when the Tomcat is stopped. (it's just for Testing) Find the image of (1,1,1) by T I took this photo of the blood moon this morning and I am finding many of my photos, especially landscape photos, have a significant lack of clarity. I'm not looking for a photo critique because I know this particular photo is crap. I'm looking to identify my source of failure to nail a significantly clear photo.     Setup  Canon EOS 70D with a 100-300 telephoto lens (I'm sorry I don't know the exact model. It's from Canon but not one of their professional quality lenses.)   Aperture: f/5.6 Shutter: 1 sec. ISO: 1000 Focal Length: 300mm Metering mode: Spot White Balance: I manually set the WB to 5500 kelvin, it looked fine in live view. Focus Mode: Manual Drive: 2 sec timer delay   Mounted on a decently stable tripod  Process  I turn on live view, and square up the target in the display. I then set my focal length, focus in using live view, adjust the focus as sharp as possible and take the pic. I've noticed that in this case, the picture was incredibly grainy, which doesn't translate to the final photo, but wonder if it has anything to do with it.  This particular shoot I found it difficult to balance out the variables with a dark sky and a moving moon that starts blurring after 1-2 seconds of exposure, which is why I had the aperture wide open and the ISO cranked up.  I can't tell where I'm failing:  Equipment:  The 70d takes great photos but the telephoto is not great when it's totally zoomed in. My wallet doesn't hold enough cash for a motorized mount to track objects in the sky.  Circumstance: I've seen great photos of the moon with the use of a camera and a tripod, so I know this is possible. Although, I keep seeing pictures of this big gorgeous moon over the landscape, and when I use my wide-angle, the moon shows up as a dot. What the hell are people doing to get the moon so big?  Beginner skill level: I know this is the biggest culprit, but being the beginner, I'm unable to know where to adjust.