How to prevent use of default constructor?
Hide parameterless constructor on struct
Transpose of inverse vs inverse of transpose How to enable numlock at boot time for login screen? I am trying to force numlock to be on upon initial boot at the login screen on Ubuntu 12.04. The only solutions I have found so far switch numlock on only after initial login.  I'm looking to force numlock to be on when the login screen is displayed, and before the user has logged in. Can anyone assist? Minimum eigenvalue and singular value of a square matrix How to show that the relationship $\left | \lambda_{min} \right | \geq \sigma_{min}$ holds between the minimum eigenvalue and singular value of a square matrix $A \in \mathbb{C}^{n \times n}$? Why are extra dimensions necessary? Some theories have more than 4 dimensions of spacetime. But we only observe 4 spacetime dimensions in the real world, cf. e.g.  Phys.SE post.   Why are the theories (e.g. string theory) that require more dimensions taken seriously by scientists?  Is there any proof that these extra dimensions exist? Is there a simple layman's explanation for the need [or strong hint] for extra dimensions? How to mount a remote (over SSH) directory to be available like a local directory (incl. in shell, not just in Gnome)? Can't redirect cut output Evaluating the integral $\int_0^\infty \frac{\sin x} x \,\mathrm dx = \frac \pi 2$? A famous exercise which one encounters while doing Complex Analysis (Residue theory) is to prove that the given integral: $$\int\limits_0^\infty \frac{\sin x} x \,\mathrm  dx = \frac \pi 2$$ Well, can anyone prove this without using Residue theory?  I actually thought of using the series representation of $\sin x$: $$\int\limits_0^\infty \frac{\sin x} x \, dx = \lim\limits_{n \to \infty} \int\limits_0^n \frac{1}{t} \left( t - \frac{t^3}{3!} + \frac{t^5}{5!} + \cdots \right) \,\mathrm  dt$$ but I don't see how $\pi$ comes here, since we need the answer to be equal to $\dfrac{\pi}{2}$. How to get relative path from absolute path There's a part in my apps that displays the file path loaded by the user through OpenFileDialog. It's taking up too much space to display the whole path, but I don't want to display only the filename as it might be ambiguous. So I would prefer to show the file path relative to the assembly/exe directory.  For example, the assembly resides at C:\Program Files\Dummy Folder\MyProgram and the file at C:\Program Files\Dummy Folder\MyProgram\Data\datafile1.dat then I would like it to show .\Data\datafile1.dat. If the file is in C:\Program Files\Dummy Folder\datafile1.dat, then I would want ..\datafile1.dat. But if the file is at the root directory or 1 directory below root, then display the full path.   What solution would you recommend? Regex?  Basically I want to display useful file path info without taking too much screen space.  EDIT: Just to clarify a little bit more. The purpose of this solution is to help user or myself knowing which file did I loaded last and roughly from which directory was it from. I'm using a readonly textbox to display the path. Most of the time, the file path is much longer than the display space of the textbox. The path is supposed to be informative but not important enough as to take up more screen space.  Alex Brault comment was good, so is Jonathan Leffler. The Win32 function provided by DavidK only help with part of the problem, not the whole of it, but thanks anyway. As for James Newton-King solution, I'll give it a try later when I'm free. Javascript mechanism to autoscroll to the bottom of a growing page? iOS 11-13 - unable to paste into comments I got the following problem: Right now I am checking my equations, which are usually written in align. This looks great in most of the cases, but sometimes the pagebreaks are weird, ie there is a lot of vertical whitespace left (like 2.5cm) at the end of a page. I made the following MWE to illustrate this.  \documentclass[a4paper, 12pt, headsepline]{scrreprt} \usepackage[onehalfspacing]{setspace} \usepackage{amsmath, amssymb, mathtools} \usepackage{mathptmx} \usepackage[a4paper]{geometry} \geometry{left=2cm,right=5cm,top=2cm,bottom=2cm} % \usepackage{lipsum} %\lipsum \usepackage[pangram]{blindtext}  \begin{document} \Blindtext[1][3]%1 paragraph, 3 pangrams \begin{align} X_{t+1} &amp;=  \frac{X_{t+1}+X_{t+1}}{Y_t}  \label{eq:1}  \intertext{Solving...:} \notag  X_{t}  &amp;=  \frac{X_{t+1}+X_{t+1}}{Y_{t+1}} \notag \\ \intertext{Solving further...:} \notag  % ===PAGEBREAK HERE: 2nd page begins=== &amp;= \frac{X_{t+1}+X_{t+1}}{Y_t} +  \frac{X_{t+1}+X_{t+1}}{Y_t}  \notag \\ &amp;= \frac{X_{t+1}+X_{t+1}}{Y_t}...  \notag \\ \intertext{Solving further...:} &amp; = \frac{X_{t+1}+X_{t+1}}{Y_t}  \notag \end{align}  \end{document}   In the MWE, the first 'Solving further' should be on the first page instead (to save space and it would also look better I guess?). The position where I would like the pagebreak to be is also marked as a comment in the MWE.  My question is first on a general basis: Which is the best environment to achieve multiple line equations, which can be aligned as in align, and to save space at the same time? Or to be more precise: If possible, I'd like to stick with align and adapt the pagebreaks only if necessary.  Thanks! How do you implement Coroutines in C++ I have to prove that a function $f:]0,1] \rightarrow \Bbb R$ : $$ f(x) = \begin{cases} \frac1q,  &amp; \text{if $x \in \Bbb Q$  with $ x=\frac{p}q$ for $p,q \in \Bbb N$ coprime} \\ 0, &amp; \text{if $x \notin \Bbb Q $} \end{cases} $$  is discontinuous in every point $x \in \ ]0,1] \cap\Bbb Q$.  And then to consider $x \in \ ]0,1] \backslash \Bbb Q$ and prove that it is continuous.  For now I learned different ways to prove continuity (epsilon-delta, sequences), but I'm never sure what would be better to use in each different case.  I wanted to prove the discontinuity by using sequences: $$\forall x_n \quad x_n\rightarrow a \quad \Rightarrow \quad f(x_n) \rightarrow f(a)$$  I tried creating a sequence $ x_n=\frac1n + a$, we know it converges to $a$ but $f(x_n)\ $ doesn't  converges to $\ f(a)$ because there would still be some points not in our set (irrational numbers that creates gaps).  But I don't think it works, so I'm asking you if you could help me solving the two questions. Are +1/+1 counters different from +1/+1 effects? Difference between declaring variables before or in loop? I have always wondered if, in general, declaring a throw-away variable before a loop, as opposed to repeatedly inside the loop, makes any (performance) difference?  A (quite pointless) example in Java:  a) declaration before loop:  double intermediateResult; for(int i=0; i &lt; 1000; i++){     intermediateResult = i;     System.out.println(intermediateResult); }   b) declaration (repeatedly) inside loop:  for(int i=0; i &lt; 1000; i++){     double intermediateResult = i;     System.out.println(intermediateResult); }   Which one is better, a or b?   I suspect that repeated variable declaration (example b) creates more overhead in theory, but that compilers are smart enough so that it doesn't matter. Example b has the advantage of being more compact and limiting the scope of the variable to where it is used. Still, I tend to code according example a.  Edit: I am especially interested in the Java case. Lock in mysql database Why are map tiles being repeated? Using MapServer and Openlayers Problem I have: map tiles from my layer are being repeated.  Shapefile is projection 3059. I have specified 3059 is in the mapfile and also when creating map object.  I know OpenLayers.Layer.WMS is recommended, but when I use it I only see empty map. When I use OpenLayers.Layer.MapServer, map is displayed (and tiles are repeated), so I'm using that for now.  My layer (EPSG:3059) looks like this    Versions: Openlayers 2.13.1 MapServer 6.0.3  WMS Server mapfile:  MAP     NAME country_map     STATUS ON     SIZE 800 500     EXTENT 313187.4 146161.56 766469.92 470367.64     UNITS METERS     SHAPEPATH "shapefiles"     IMAGECOLOR 155 155 155      WEB         TEMPLATE "template.html"         IMAGEPATH "C:/MS4W/ms4w/apache/htdocs/gis/output/"         IMAGEURL "/gis/output/"          METADATA             "wms_title"             "MapServer + Openlayers"             "wms_onlineresource"    "http://localhost:1025/cgi-bin/mapserv.exe?map=C:\MS4W\ms4w\Apache\htdocs\gis\mapfile2.map"             "wms_enable_request"    "*"             "wms_srs"               "EPSG:3059"         END     END      PROJECTION         "init=epsg:3059"     END  # example layer     LAYER     METADATA         "wms_title"             "lat_rob_region"     END     NAME "lat_rob_region"     DATA lat_rob_region     STATUS ON     TYPE POLYGON         CLASS             NAME "lat_rob_region"             STYLE                 COLOR 0 255 0             END         END     END END   Javascript:  var lon = 25; var lat = 57; var zoom = 5; var map, layer1;  function init() {     map = new OpenLayers.Map( 'map',{displayProjection: new OpenLayers.Projection("EPSG:3059")} );      layer1 = new OpenLayers.Layer.MapServer( "Country map",              "http://localhost:1025/cgi-bin/mapserv.exe?map=C:/MS4W/ms4w/Apache/htdocs/gis/mapfile2.map", {layers: 'lat_rob_region'},             {gutter: 15},{srs: 'EPSG:3059'});     map.addLayer(layer1);      map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);     map.addControl( new OpenLayers.Control.LayerSwitcher() ); } How to fully backup non-rooted devices? I know I'm asking for the close-to-impossible -- as a real full-backup certainly requires root permissions. But still there are many folks around not wanting to root their devices -- afraid of voiding their warranties or bricking their devices, or just not having their devices supported by any rooting method.  I also know there were a lot of questions asked already on this topic, and I checked all of them having the backup tag -- none covers the entire topic, all just have pieces, and especially people new to Android (but other non-power-users as well) would have a hard time figuring out the best way.  So I want a detailed canonical answer to the question:  Not involving root-solutions, how to achieve a backup as close as possible to a full backup?  Please do not give simple one-liner answers like "Use app xyz [full-stop]." If mentioning an app (and I doubt a single app would be the answer here), include what parts are covered by it -- as well as ideas on how to fill the gaps it leaves. (And to make it absolutely clear: I know the first thing coming to mind is Titanium Backup -- I use it myself, but this does not apply here: This question is strictly about methods for non-rooted devices!) Moreover, the answer should be as generic as possible in terms of applying to a wide range of devices (i.e. it should not be restricted to one device or manufacturer).  I already mentioned having investigated all questions here tagged backup. These will certainly be helpful providing details for answers here, so I will list up the topmost ones concerning my question:            All these provide some details for my question (so feel free to get inspired by them) -- but I feel there are still details missing. Also it would be helpful to have a summary -- say, an answer including the full description of "the maximum possible".  A last criterium: While I'd consider cloud-based solutions legit, I'd favour local solutions. If you can provide both: all the better. But some people value privacy quite high (I'm one of them), and thus would not trust their data to some cloud service.    Thanks to Ryan, we now have a solution for a really complete backup of all apps and their data -- which I didn't dare to hope for! The only disadvantage: His solution only works for less than 10% of all Android users; namely those whose devices are running at least with Android 4.x.  So again, I ask the close-to-impossible: Any solutions applicable at least on Gingerbread (2.3.x) or, better, even Froyo (2.2.x) -- so they cover the majority of current devices? These solutions may involve multiple tools (try to keep it as simple as possible though; think of your mother to follow your instructions ;)  And keep in mind: NO ROOT!    To further motivate high-quality answers (and hopefully avoid low-quality ones), I will be a harsh one here: As I rarely do, I will down-vote answers not fitting the mentioned criteria on one end -- but on the other end, I will setup a bounty for the best answer (which cannot be done immediately, but earliest after 2 days). Determining if trees within forest gaps are clustered using R? Transfer from JFK Terminal 2 to Terminal 4 I have family who does not speak English.  They are changing planes in JFK Airport and will most likely be transferring from Terminal 2 (Delta) to Terminal 4 (China Southern Airlines).  At first I thought that directing them to use the Airtrain would be best.  However, in doing more reading my understanding is that the Airtrain would mean they would need to go through security again.  I found this on Delta's site:   If they use the JITNEY Shuttle to change from Terminal 2 to Terminal 4, does that mean they would not need to re-clear Security?  Edit: They are flying TO China. They are going from Tampa -> NY JFK -> China.