Consolidated latex code My latex document consists of hundreds of TeX files that are loaded by the main file using the \input command. I need to submit the TeX code to the publisher of a scientific journal for publishing. Is there a way of running the original TeX file, loading all the \input's and produce one TeX file with the code loaded by \input in the file?
Replace \input{fileX} by the content of fileX automatically Suppose I have a document with multiple include or input statements  \input{fileA} \input{fileB}   etc.   Is there an easy way to generate a single .tex file where \input{fileA} is replaced by the actual content of fileA etc. without copying it manually?
I'd like to be able to decompose a concave mesh into a set of convex meshes for 2 reasons:   Transparent rendering Physics shapes   Is there an algorithm that takes a set of triangles (concave) as input and outputs a number of sets of triangles (convex)?  I'd like it to not fill in the holes between parts of the original mesh.  I've already come across a small idea: find all the concave edges, and split the meshes along the edge loops.  Am I on the right track?  How could I implement this? I have a list of dictionaries and want each item to be sorted by a specific value. Take into consideration the list: [{'name':'Homer', 'age':39}, {'name':'Bart', 'age':10}]  When sorted by name, it should become: [{'name':'Bart', 'age':10}, {'name':'Homer', 'age':39}] Show all inbox items (notifications) in app The SE app currently only shows some inbox items:   Answers Comments Chats   When I see those I assume I'm all caught up, but it turns out there are more on the web which aren't displayed in the app:   Bounty expiration Elections Edits on your own posts Maybe others?   I was about to tag this  but realized it's probably intentional.  I imagine the reason for not showing them is because they're not something you can act on from within the app. Bounties can't be offered or awarded1 and elections can't be voted on.  But then again chats can't be replied to either. Badge descriptions can't be viewed (on the Achievements side). Selecting those launches the browser. Why then shouldn't bounties or elections launch the browser too? Hiding them just means I'll miss it if I haven't visited in browser recently.  1 Though accepting answers does award the bounty Best lens for taking pictures of surfers I'm just trying to decide which new lens to get. I need to take surf and windsurf photos from onshore. Sometimes 300 mm is enough but there are many times they are too far away. I have a sigma 70-300 but I need something better, if the light is not perfect it doesn't give me the sharpness I hope for. I can not afford the 400L 2.8 of course, so I'm trying to choose between the Canon EF 100-400L, Canon EF 70-300L (which I heard is far better than the base one), or Sigma 50-500. My body is a canon 600D. Print total free memory from `free -m` free -m currently puts out something like this.     I would like to know using grep/awk how we can get the total free amount. i.e. 9083 Let $T:V\to V$ be a linear map, where $V$ is an inner product space. Given $T^2=\frac{T+T^*}{2}$, prove that $T$ is normal and that $T=T^2$. Let $T:V\to V$ be a linear map, where $V$ is a finite-dimensional inner product space. Given $T^2=\frac{T+T^{*}}{2}$, I would like to prove that $T$ is normal and that $T=T^2$. The first part, to prove that $T$ is normal, is quite easy: from $T^2=\frac{T+T^{*}}{2}$ we'll have $\,T^{*}=2T^2 - T$, and as $TT^{*} = 2T^3 -T^2 = T^{*}T$. Now, I need to prove that $T=T^*$, then $T = T^2$ is immediate. I have been thinking about this question for some days and I can't figure out in what technique to prove that $T = T^{*}$. Bootstrap dropdown sub menu missing Different ways to prove there are infinitely many primes? How to list the properties of a JavaScript object? Say I create an object thus:  var myObject =         {"ircEvent": "PRIVMSG", "method": "newURI", "regex": "^http://.*"};   What is the best way to retrieve a list of the property names? i.e. I would like to end up with some variable 'keys' such that:  keys == ["ircEvent", "method", "regex"] Display lines in last 10 minutes with specific pattern in logs I need to display lines with Error occurred in last 10 minutes of a log file.   Aug 26 10:50:42 Normal line. Aug 26 10:51:23 Normal line. Aug 26 10:55:33 Error line. Aug 26 10:56:45 Normal line. Aug 26 10:58:12 Error line. Aug 26 11:02:31 Normal line. Aug 26 11:03:32 Normal line. Aug 26 11:04:11 Normal line.   Suppose above sample of log file. I want to display only following two lines  Aug 26 10:55:33 Error line. Aug 26 10:58:12 Error line.   I am using AIX. PHP: How do I loop through every XML file in a directory? Efficiency of a heat pump water heater during the winter In my understanding, heat pump water heaters pump energy from the room around the water tank into the water.  Clearly, this must be energy efficient in the summer time, especially if I am using AC anyway. The heat pump water heater may actually cool the house a bit.  However, in the winter time the savings are not so obvious. If I am using a heater to heat the home, including the water tank room, then I don't see how there can be any savings. Instead of generating heat using a coil in the water, I generate heat in another area of the house which gets pumped into the water. A joule is a joule and I need to get it from somewhere. It seems to me that if I am actively heating the house, and lets assume everything is electric, then a heat pump water heater cannot be more efficient than a traditional one.  Am I missing something in the winter case? Sending Email via gmail smtp server in JAVA Make hyperref take pdfinfo from \title and \author I once read about an option for hyperref that automatically takes the info provided via the standard \author and \title, and puts it into the pdfinfo. Now I want to implement it in my template and can't find it anywhere in the hyperref manual nor anywhere else.  Did I dream about this or can someone help me out here?  (A similar, but more general question: ) How to change background and maintain realistic effect? I have like 30 different photos to process like this, but I want to know key things to maintain realistic photo by changing it's background, or maybe just modify background so it would be more pleasing to eye.(If you know tutorial related to my problem, please do provide it to me)  Here is the photo:   Here is my step 2:   Here is background:   Here is the result:   As you can see, it isn't any close to realistic feel. I fooled around with levels, but all I got was this and still it doesn't feels right.  First try:   Second try:   Update  Different background: How do I use sudo to redirect output to a location I don't have permission to write to? Convince grep to output all lines, not just those with matches Say I have the following file:  $ cat test  test line 1 test line 2 line without the search word another line without it test line 3 with two test words test line 4   By default, grep returns each line that contains the search term:  $ grep test test  test line 1 test line 2 test line 3 with two test words test line 4   Passing the --color parameter to grep will make it highlight the portion of the line that matches the search expression, but it still only returns lines that contain the expression. Is there a way to get grep to output every line in the source file, but highlight the matches?  My current terrible hack to accomplish this (at least on files that don't have 10000+ consecutive lines with no matches) is:  $ grep -B 9999 -A 9999 test test     If grep can't accomplish this, is there another command-line tool that offers the same functionality? I've fiddled with , but it doesn't seem to have an option for it either. A key doubt about the resultant of two polynomials and their common zero locus Is floating point math broken? Consider the following code:   0.1 + 0.2 == 0.3  -&gt;  false   0.1 + 0.2         -&gt;  0.30000000000000004   Why do these inaccuracies happen? Distance Between Two Points in Matlab