So I was forced to work with old technology and got stuck. With flexbox this wouldn't have been an issue, but I can't seem to get it right without it. Here is an example of what I want:    It's supposed to be straight forward, but being accustomed to flexbox made me a cave animal when it comes to old ways of aligning. Here is what I tried based on suggestions online, but the box and text still aren't aligned vertically. Can someone save me? (the green border is for better showing if it is centered)   &lt;div style="display: table; height: 30px; overflow: hidden; border:1px solid green;"&gt; &lt;div style="display: table-cell; vertical-align: middle;"&gt; test &lt;span style="display:inline-block; width:30px;height: 30px; margin: 0 5px; border: 1px solid #eee;"&gt;&lt;/span&gt; test2 &lt;/div&gt; &lt;/div&gt;
I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers? &lt;div id=&quot;header&quot;&gt;   &lt;img src=&quot;..&quot; &gt;&lt;/img&gt;   &lt;h1&gt;testing...&lt;/h1&gt;   &lt;img src=&quot;...&quot;&gt;&lt;/img&gt; &lt;/div&gt;
What should my Objective-C singleton look like? My singleton accessor method is usually some variant of:  static MyClass *gInstance = NULL;  + (MyClass *)instance {     @synchronized(self)     {         if (gInstance == NULL)             gInstance = [[self alloc] init];     }      return(gInstance); }   What could I be doing to improve this? If a commutative ring is semiprime and its prime ideals are maximal then it is von Neumann regular (absolutely flat). If a commutative ring is semiprime and its prime ideals are maximal then it is von Neumann regular (absolutely flat).  The converse, although not immediately apparent, can be proven quite easily. But I've been stuck on this one for awhile.  I found that Bourbaki has a question in his treatise on commutative algebra, namely: if all points in Spec(A) are closed (ie. prime ideals are maximal) then A/R (where R is the nilradical) is von Neumann regular (absolutely flat). If this can be proven, the above statement follows immediately since the nilradical of a semiprime ring 0?  Ideas?   Ps: this is my first time posting a question so apologies for any formatting issues. Correct interpretation of a "double-negative" in American Pop Culture (i.e. "I ain't afraid of no ghost!") In JavaScript, the "this" operator can refer to different things under different scenarios.   Typically in a method within a JavaScript "object", it refers to the current object.  But when used as a callback, it becomes a reference to the calling object.  I have found that this causes problems in code, because if you use a method within a JavaScript "object" as a callback function you can't tell whether "this" refers to the current "object" or whether "this" refers to the calling object.  Can someone clarify usage and best practices regarding how to get around this problem?     function TestObject() {             TestObject.prototype.firstMethod = function(){                       this.callback();                       YAHOO.util.Connect.asyncRequest(method, uri, callBack);              }              TestObject.prototype.callBack = function(o){               // do something with "this"               //when method is called directly, "this" resolves to the current object               //when invoked by the asyncRequest callback, "this" is not the current object               //what design patterns can make this consistent?               this.secondMethod();             }             TestObject.prototype.secondMethod = function() {              alert('test');             }         } How to serve static files in Flask I need to extrude a circular shape from a surface that's basically just a grid of quads. What's the best practice to do this without screwing up the topology too much?  I basically want to have a circular face I can extrude, in order to have a cylinder like protuberance on the object, something like this: Even when /tmp has no file called something, searching for it with find will return 0:    $ find /tmp -name something    $ echo $?   0   How can I get a non-zero exit status when find does not find anything? How do I execute PHP that is stored in a MySQL database? I'm trying to write a page that calls PHP that's stored in a MySQL database. The page that is stored in the MySQL database contains PHP (and HTML) code which I want to run on page load.  How could I go about doing this? I have an expression for a covariance matrix $C$ in terms of the indices $i$ and $j$.  In this way I can analytically calculate the elements of my covariance matrix, however when I try to invert $C$ matlab gives a warning about the matrix being close to singular.  The inversion therefore doesn't work, by which I mean the multiplying $C$ by the inverse given i do not get the identity.  I have tried calculating the pseudo inverse but this also does not work.  I have also tried adding a small constant along the diagonal but again the results do not work.  In general I'm working with matrices of dimension 1200 but I will give low dimensional example matrix that has the same properties, i.e. the matrices are symmetric about the diagonal and the anti-diagonal     19.9939  19.9954  19.9958  19.9951  19.9933  19.9905  19.9865    19.9954  19.9973  19.9981  19.9978  19.9965  19.9940  19.9905    19.9958  19.9981  19.9993  19.9995  19.9985  19.9965  19.9933    19.9951  19.9978  19.9995  20.0000  19.9995  19.9978  19.9951    19.9933  19.9965  19.9985  19.9995  19.9993  19.9981  19.9958    19.9905  19.9940  19.9965  19.9978  19.9981  19.9973  19.9954    19.9865  19.9905  19.9933  19.9951  19.9958  19.9954  19.9939   As mentioned in the title the matrix isn't positive, however the the negative eigenvalues are very small suggesting that the matrix is not positive only due to machine precision.  The negative eigenvalues are $-1.4048e-14$ and $-2.4571e-15$.  How can I go about inverting these matrices? How to create a generic array in Java? I recently got a new router, a DRL-600L Router from D-Link, and was setting up some filters to block out certain websites.  One problem I am having is blocking out addresses that use https instead of http.  For example, I'm trying to block out Facebook, because Facebook.   So far, the filter filters http://www.facebook.com perfectly fine, but for the url https://www.facebook.com, it won't block that.  How can I block those kinds of websites? 1-1 correspondence between [0,1] and [0,1) What is the difference between a field and a property? In C#, what makes a field different from a property, and when should a field be used instead of a property? Two different solutions to integral What does [t] and [ht] mean? I would appreciate if someone could tell me difference between [t] and [ht] in the following example? I don't see a difference in the output pdf file.  \begin{figure}[ht] ... \end{figure}   and  \begin{figure}[t] ... \end{figure} Convert 12-hour date/time to 24-hour date/time I have a tab delimited file where each record has a timestamp field in 12-hour format:     mm/dd/yyyy hh:mm:ss [AM|PM].   I need to quickly convert these fields to 24-hour time:     mm/dd/yyyy HH:mm:ss.   What would be the best way to do this? I'm running on a Windows platform, but I have access to sed, awk, perl, python, and tcl in addition to the usual Windows tools. I am creating a GUI frontend for the Eve Online API in Python.  I have successfully pulled the XML data from their server.  I am trying to grab the value from a node called "name":  from xml.dom.minidom import parse dom = parse("C:\\eve.xml") name = dom.getElementsByTagName('name') print name   This seems to find the node, but the output is below:  [&lt;DOM Element: name at 0x11e6d28&gt;]   How could I get it to print the value of the node? MacOS High Sierra: An error occurred while verifying firmware Proving the countability of algebraic numbers I am trying to prove that algebraic numbers are countably infinite, and I have a hint to use: after fixing the degree of the polynomial, consider summing the absolute values of its integer coefficients, and setting the sum less than or equal to $m$, for each $m \in \mathbb{N}$. I am also allowed to use the fact that every polynomial has a finite number of roots. I am not sure where to begin... Perhaps after fixing the degree of the polynomials, I could try enumerating them, and after proving countability of the set that contains the roots of all polynomials of a certain degree, I could state that the union of infinitely many ($\bigcup_{n=1}^{\infty}$, $n \in \mathbb{N}$) countably infinite sets is countable, and thus the algebraic numbers are countably infinite, too, but I am not sure if this is a good approach/how to enumerate the polynomials. Thanks! Openlayers using Google Maps as base layer: possible to zoom out farther than max extent? See attached picture. This is how it is when the page loads. I'm currently using  map.zoomToMaxExtent();     Everything is working pretty well but I'd like to zoom out more/see the whole world using OSM/Google Map Layers: is this even possible?  Note that the zoom bar on the left is set to the lowest bar when the page loads (if you can't see the map well, just right click the image and paste into a new browser tab).   This  but even when I do MIN_ZOOM_LEVEL that doesn't do much.  Also note I am not setting any bounds, extents, or resolutions. Toying with those did not seem to do the trick either.   Any input is appreciated.   Edit: here's a codeshare if you want to take a look:   UPDATE:  This is not perfected yet (and it makes me think something may be wrong with my OL code itself) but currently I am using this   var extent = new OpenLayers.Bounds(-1.32,81.71,-1.18,-61.80).transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:3857"));   I tried   var extent = new OpenLayers.Bounds(-20037508.34279,-10018754.17139,20037508.34279,10018754.17139);   (both with and without transform) but this did not do anything.   UPDATE 2:   wrapDateLine: false works fine for now: can zoom out farther, pan around, etc etc.  Now I would like to cut off everything to the left of the date line on the left side of the map (the 'first' portion), and cut off everything to the right of the date line on the right side of the map (the '3rd' portion) WHILE still keeping the map full screen. I've tried bounds, resolutions, but no go. Is this even feasible?  Something like this but it should take up the full screen: possible to do? See below: