how to use notepad++ for indenting ant file
How To Auto-Format / Indent XML/HTML in Notepad++
SQLite - UPSERT *not* INSERT or REPLACE Is there some clever way to do this in SQLite that I have not thought of? Basically I want to update three out of four columns if the record exists, If it does not exists I want to INSERT the record with the default (NUL) value for the fourth column. The ID is a primary key so there will only ever be one record to UPSERT. (I am trying to avoid the overhead of SELECT in order to determine if I need to UPDATE or INSERT obviously) Suggestions?  I cannot confirm that Syntax on the SQLite site for TABLE CREATE. I have not built a demo to test it, but it doesn't seem to be supported. If it was, I have three columns so it would actually look like: CREATE TABLE table1(      id INTEGER PRIMARY KEY ON CONFLICT REPLACE,      Blob1 BLOB ON CONFLICT REPLACE,      Blob2 BLOB ON CONFLICT REPLACE,      Blob3 BLOB  );  but the first two blobs will not cause a conflict, only the ID would So I assume Blob1 and Blob2 would not be replaced (as desired)  UPDATEs in SQLite when binding data are a complete transaction, meaning Each sent row to be updated requires:  Prepare/Bind/Step/Finalize statements unlike the INSERT which allows the use of the reset function The life of a statement object goes something like this:  Create the object using sqlite3_prepare_v2() Bind values to host parameters using sqlite3_bind_ interfaces. Run the SQL by calling sqlite3_step() Reset the statement using sqlite3_reset() then go back to step 2 and repeat. Destroy the statement object using sqlite3_finalize().  UPDATE I am guessing is slow compared to INSERT, but how does it compare to SELECT using the Primary key? Perhaps I should use the select to read the 4th column (Blob3) and then use REPLACE to write a new record blending the original 4th Column with the new data for the first 3 columns? Resize image proportionally with CSS? Would someone give a thorough explanation of 1.14 Minecraft's /data modify? Okay, so I've been searching all over the internet for an explanation of data modify ever since I heard Sethbling passively mention it in one of his videos. The only  thing I could find on it was the wiki and the update log for the 1.14 snapshot. So, I checked these, and they hardly explained it at all. I can get /data modify block 123 20 123... and that's as far as I get.  Minecraft wiki does not at all define clearly what  is (the thing meant to go after coords), nor does it specify what each operation does to what. Operations include (without explanation, and excluding set (which it does explain)): append, insert, merge, and prepend. Then, it has from|value as the next option, which aren't explained either. After this, it just has block/entity and coords/id. So, I know the format (mostly), but I haven't the slightest idea what any of it means. And nothing I've seen on the internet even mentions the command save for Minecraft wiki itself.  Please explain if you know what data modify is. Thanks! laptop fails to suspend or hibernate (wakes up after 2-5 seconds without user interaction) If $\alpha$ is a real root of the equation   $$x^5-x^3+x-2=0$$   find the value of $\lfloor {\alpha}^6 \rfloor$.      This one totally stumped me. We are asked to calculate $\lfloor {\alpha}^6 \rfloor$ without actually calculating the root or using wolfram alpha or any other calculator. I found that the above equation has only one real root by sketching its graph using calculus. I was also able to use the intermediate value theorem to conclude that $1&lt;\alpha&lt;2$ , but this is of little use while calculating $\lfloor {\alpha}^6 \rfloor$. Please help! Which are the non Schengen countries that allow entry for Schengen visa holders? There are countries in the Balkan area that allow entry if you have a Schengen visa but am not able find a definite list of all those countries. Knowing that will save me getting a visa for all those countries when I do my mega Euro trip. Can someone please give me the prerequisites and mathematics required for string theory? Are there some good references to study it, both online and in a book? Please consider I am a newbie in string theory, and only about up to the level explained in Hawking's Brief History of Time and Penrose's Road to Reality. I would prefer something which does not omit rigor, but builds it up.Also, are there good online lectures on this?  (I have covered most of GR, but I am not really comfortable with advanced Quantum mechanics. I have studied QM only from Griffith's book, and a few McGraw hill lecture notes.) Six simple tips to get Stack Overflow reputation fast What is a good algorithm for estimating the median of a huge read-once data set? How can I install Ubuntu on a headless machine? I have a headless storage server with preconfigured Windows Home Server. How can I install Ubuntu without a display?  Do I have to build a custom install flash drive? If so, what would be the basic procedure? Is there a program (like unetbootin) to do this? How do you prove the  from statistical mechanics? To prove entropy will only increase with time? How to prove? Please guide. Is it possible to Pivot data using LINQ? I am wondering if it is possible to use LINQ to pivot data from the following layout:  CustID | OrderDate | Qty 1      | 1/1/2008  | 100 2      | 1/2/2008  | 200 1      | 2/2/2008  | 350 2      | 2/28/2008 | 221 1      | 3/12/2008 | 250 2      | 3/15/2008 | 2150   into something like this:  CustID  | Jan- 2008 | Feb- 2008 | Mar - 2008 | 1       | 100       | 350       |  250 2       | 200       | 221       | 2150 I make homemade cayenne pepper sauce every year. I do add some liquid pectin to slightly thicken it so it will stick to food rather than roll off. After a month or so on the shelf it seems to separate a bit. What can I add to this so that it won't or is there a method I can do to stop this. We are slowly working our way into marketing this product down the line and this won't work for that reason. We are using a water bath canning method, vinegar based, no sugar added. Label equations arbitrarily When I have equations, as in  \begin{equation} ... \end{equation}   Can I arbitrarily assign the numbers to the equations? Instead of the usual order (1), (2), (3), ..., I'd like something like (1), (2.1), (2.2), (2.3), (3.1), (3.2), (4), ... How do I use SSMS to compare Database 1 Table 1 against Database 2 Table 1? I have two databases - Database1 and Database2.  Both databases contain a table that has similar structure, exemplified as follows:   =========================================================================================== | ID | Name | PhoneNoFormat | DialingCountryCode | InternationalDialingCode | InternetTLD | =========================================================================================== |    |      |               |                    |                          |             | ===========================================================================================   However, due to some reason, (a) one of the tables in one of the databases has data that is not exactly the same as (b) that contained in the other table in the another database.  So, how can I compare Database1.Table1 against Database2.Table1?  I tried using the following query, but nothing happened so was wondering if I have to rewrite it:  SELECT MIN(TableName) as TableName,        ID,        Name,        PhoneNoFormat,        DialingCountryCode,        InternationalDialingCode,        InternetTLD  FROM  (    SELECT  'Table A' as TableName,           A.ID,           A.Name,           A.PhoneNoFormat,           A.DialingCountryCode,           A.InternationalDialingCode,           A.InternetTLD    FROM [D:\DATABASE1.MDF].[dbo].[Table1] AS A    UNION ALL    SELECT 'Table B' as TableName,          B.ID, B.Name,          B.PhoneNoFormat,          B.DialingCountryCode,          B.InternationalDialingCode,          B.InternetTLD    FROM [D:\DATABASE2.MDF].[dbo].[Table1] AS B  ) tmp  GROUP BY ID, Name, PhoneNoFormat, DialingCountryCode, InternationalDialingCode, InternetTLD  HAVING COUNT(*) = 1  ORDER BY ID How to remove film from stainless steel pan I have an unsightly film around my stainless pan as shown here:    What is causing this to happen?  And how can I remove the film? I have soaked it in soapy water, scraped it with a plastic scraper, and run it in the dishwasher several times, but I can't seem to get rid of the film.   UPDATE: the pan is an All-Clad stainless, fully-clad frypan: How to make a circular array using offset object as center? LSOpenURLsWithRole() failed with error -10810 - Downloaded app does not start I'm trying to run an application downloaded from the internet (e.g., Jabref) but it seems that it fails silently. When I try to open it by double clicking it, nothing happens. When I use the terminal I get the following message:     LSOpenURLsWithRole() failed with error -10810 for the file .../xxxx.app   I tried several suggestions that I found here like changing permissions and modifying the Info.plist file, but nothing works.  Because it's a Java application, I tried to run it through terminal using      java -cp "CLASSPATH" MAINCLASS    and it works fine.  Just to mention that I get this error not only with this app, but for a few other applications.  Thanks in advance. Proof of $\int_0^\infty \left(\frac{\sin x}{x}\right)^2 \mathrm dx=\frac{\pi}{2}.$ I am looking for a short proof that $$\int_0^\infty \left(\frac{\sin x}{x}\right)^2 \mathrm dx=\frac{\pi}{2}.$$ What do you think?  It is kind of amazing that $$\int_0^\infty \frac{\sin x}{x} \mathrm dx$$ is also $\frac{\pi}{2}.$ Many proofs of this latter one are already in this . The following code gives me an error:  \documentclass[12pt]{article} \usepackage[margin=2cm]{geometry} \usepackage [english]{babel} \usepackage{amsmath, amssymb} \usepackage{enumitem, array} \begin{document} {\begin{minipage}[t]{\textwidth} \begin{enumerate}[label=(\roman*)] {\setlength\itemindent{10pt}\item  \begin{equation*} \begin{array}{&gt;{\centering\arraybackslash}m{1.5cm}&gt;{\centering\arraybackslash}m{1.5cm}&gt;{\centering\arraybackslash}m{1.5cm}&gt;{\centering\arraybackslash}m{1.5cm}&gt;{\centering\arraybackslash}m{1.5cm}}  \hline x &amp; l_{[x]} &amp; d_{[x]} &amp; l_{x+1} &amp; \mathring{e}_{[x]} \\ \hline \end{array} \end{equation*}} \end{enumerate} \end{minipage}} \end{document}   Note: for various reasons, I have to keep minipage there. For some reason, this code gives me an error when it compiles. It gives the following output:     The errors either say there is a } missing or a $ missing. My eyes don't see such a thing!