I was pointed to the cool rsync-backup script which uses cygwin's rsync and hardlinks in NTFS to provide a method for incremental backups which is probably the best I have seen so far. Basically, the effect is as follows: Whenever you backup your data to the backup location (which is somewhere on an NTFS drive), the only actual data that will be copied is for the files that have changed since the last backup. Nevertheless, there will be a new folder in your backup location which contains all files and folders you just backed up. Just: Those that did not change have not been copied, they have just been hardlinked to the old files instead. Now here comes the best part: The actual contents of a file with more than one hardlink to it are deleted only after the last link to it has been removed. Thus, you can delete old backups and the only data that will actually be deleted is the old data, the data that changed in later backups. Now, I modified the script slightly to better suit my needs. First of all, I only back up a single folder. If you want to backup multiple folders to a single location, move along. This is not for you. Use the original rsync-backup if you wish. Mine is different. Do you want to know more?


If you want to go from 32 to 64 bit [Cygwin](http://www.cygwin.com) but keep all the packages ((At least those that are available.)), you might find yourself in a spot where you would like to export the list of cygwin packages and also be able to install cygwin with all these packages again. I will tell you how. Open your Cygwin shell and enter
grep " 1$" /etc/setup/installed.db | awk '{print $1}' > packagelist
This will dump a list of all *selected* packages and is the kind contribution of Yamakuzure-san. Earlier, I had proposed the following command:
cygcheck -c -d | sed -e "1,2d" -e 's/ .*$//' > packagelist
which will simply dump a list of *installed* packages, including all the dependencies (possibly cluttering up your cygwin backup file). In the comments below you'll see that my command worked better in one case. If you decide to try both, leave a comment about how they performed for you. To install Cygwin 64 from such a package file, download [setup-x86_64](http://cygwin.com/setup-x86_64.exe). Of course, this will also work with the old [setup-x86.exe](http://cygwin.com/setup-x86.exe) if you are reading this just for the sake backing up your cygwin install configuration. Execute the installer with the command line parameters
./setup-x86_64 -P `awk 'NR==1{printf $1}{printf ",%s", $1}' packagelist`
The **awk** command reads your file and turns it into a comma-separated list, then this string is passed as the argument to the **-P** option of the installer. It may not be documented with great detail in the [Cygwin installer command-line options](http://cygwin.com/faq/faq.html#faq.setup.cli), but CSV is exactly what the **-P** option expects. Since you might want to use **cygcheck** to backup your cygwin-install, you might not have **awk** and a bash shell at your disposal at the time of install. However, you should certainly have some kind of python installed already. Here is a python script that will read your packages correctly and install cygwin with them selected:
from urllib import request
import sys, getopt, subprocess
build = 'x86'
packagefile = 'packagelist'
opts, args = getopt.getopt(sys.argv[1:],'',['64','packages='])
for o,a in opts:
    if o == '--64': build = 'x86_64'
    if o == '--packages':
        packagefile = a
setupfile = "setup-%s.exe" % build
packages = ','.join([ x.strip() for x in open(packagefile).readlines()])
r = request.urlopen("http://cygwin.com/%s" % setupfile)
open(setupfile,'wb').write(r.read())
subprocess.call([setupfile, '-P', packages ])
In fact, it first downloads the current setup executable from the cygwin server and then launches it. It accepts the option --64 to install 64 bit cygwin and the option --packages=packagelist to select a file with a list of packages.


I need to compute the meet of two partitions $\lambda=(\lambda_1,\ldots,\lambda_r)$ and $\mu=(\mu_1,\ldots,\mu_s)$ with respect to the dominance order. It's not a difficult thing to do and might be considered an oddity by most of you, but that doesn't bother me. Do you want to know more?


I recently bought an Android phone. I do not want to give anyone my calendar data. However, I want to synchronize my calendar across devices. So I did it. Do you want to know how I did it?


I was cleaning up my LaTeX header and re-coded some macros to suit my needs better. I have always had a macro called \of which takes one parameter. It used to be the very simple macro
\newcommand{\of}[1]{\left(#1\right)}
However, I sometimes want to specify the size of the brackets explicitly, so I wanted to add an optional argument to this macro such that \of[big]{\sum} will expand to \bigl(\sum\bigr). Sometimes I even want it not to do any resizing of the brackets at all. The correct way to do this is is \csname and \endcsname which allows you to delay expansion of a macro. Inside a macro definition, the command
\newcommand{\ar}[1]{\csname#1arrow\endcsname}
will be such that \ar{right} is first made into \rightarrow and then expanded. We will use that to make \bigl and \bigr out of the argument big, for instance. Do you want to know more?


Nikolai asked me how to open a Python interpreter prompt from the console with a certain module already imported. For the record, the Python command line switches tell us that python -i -m module is the way to start the prompt and load module.py. That made me wonder whether I can stuff it all into one batch file, and I came up with the following test.bat:
REM = '''
@COPY %0.bat %0.py
@python %0.py
@DEL %0.py 
@goto :eof ::'''
del REM
for k in range(70):
    print(k)
That script will ignore the first line because it is a comment, then copy itself to test.py, then launch python with this argument. Afterwards, test.py is deleted and the script terminates without looking at any of the following lines. Note that :: is yet another way to comment in Batch. Python, however, will see a script where the variable REM is defined as a multi-line string and deleted right after that. After this little stub, you can put any python code you want. Well. I thought it was funky.


I have found and quickly begun to love a wonderful piece of software called TeXStudio. It's an open source LaTeX editor with preview pane and the preview is for the actual PDF document, not yet another buggy DVI viewer that fails to display your TiKzPictures correctly. It's available on all platforms. You have to seriously work through the (advanced) options and set it up to your liking ((This will most likely include shutting off all of the autocomplete features because they might otherwise drive you insane.)) , but I must say that this is probably the best LaTeX editor I have ever seen. Most prominently, it allowed me to switch all my projects to UTF-8 for the first time, because you can set file encoding in a comfortable way. It also does a good job at detecting UTF-8 and if everything fails, you can use the special comment !TeX encoding = UTF-8. Citing french papers has become slightly less of a torment.


I was talking to this fellow mathematician, and told him how for my very personal taste, the research in algebraic geometry has sailed a bit too far ashore from the original question that motivated the subject: A classification for the solutions of polynomial equations. I told him that most of the heavy machinery in algebraic geometry can be given very good intuition - however, most courses neglect to do so. Anyways, he was clearly amused and not quite in belief of my radical position that unconditional and solitary abstraction isn't the only way to do algebraic geometry. He teased me to then tell him what an *»ample«* line bundle was, without talking about tensor powers or commutative diagrams. So, that's the reason for this post. I answered that ample line bundles are precisely those that induce finite morphisms to projective space, but I couldn't remember where I knew it from. I searched through all the major literature and could not find a reference until someone on Mathoverflow helped me out. Since I complained so much about how noone ever gives intuition to these kinds of concepts in algebraic geometry, I decided I'd blog a bit about line bundles and how you should think about them. Do you want to know more?


It would be beneficial to have your eMail-Address on your homepage when you want to give people the opportunity to contact you. In my case, I actually want to give people that opportunity ((That does not go without saying: In some cases it is very important to discourage people from contacting you directly. For instance, it could be that you are usually not the right person to ask, but you get flooded with requests that you have to manually redirect elsewhere: It would be better if people got discouraged from contacting you while finding it very easy to contact the person that can actually help them.)). However, we all know that there are villains out there who harvest emails from websites in order to sell them to spammers. Hence, you would want to obfuscate your eMail-Address in such a way that it cannot be read from the HTML source code of the website easily. It goes without saying that naive obfuscation techniques like mymail(at)domain(dot)com are beaten more easily by machines than by people, and the more creative you get with your substitutions, the easier the machines can do it and the less easy your customers can. Images are the end of that line of thought, the point where a user has no chance at all other than to copy your eMail address letter by letter from an image which could still theoretically be OCR'd by a decent program. Therefore, Javascript methods to encode and on-the-fly decode the eMail address ((Famous enodings are ROT13, Base64, etcetera.)) seemed like the best choice to me for a long while. It is harder to run a Javascript interpreter than simple regular expressions for the email harvester, but to a user there is no difference: The browser already comes equipped with Javascript. At this point, some people get cranky that everything should work also without Javascript, and I can understand that. However, the main reason for me to abandon the Javascript method was simple necessity: I have to publish my eMail on the homepage of a university, which is managed from within a complex CMS, and the system would not allow me to use Javascript. This makes a lot of sense, you don't want every user of a large webportal to be able to stick whatever Javascript they like into the page, that stuff can make everything go to hell. This blog post is one among many advertising the capability of unicode to display letters from right to left. However, seriously, how difficult do you think it is for an email harvester to check for reversed email addresses as well? I would suppose it's more or less just a matter of checking for the reversed regular expression, too. Easy prey, if you ask me. But I had an idea! Do you want to know what that idea was?


If you happen to be in Berlin, you can get 30 minutes of free WiFi in quite a lot of places from a KabelDeutschland™ HotSpot. Unfortunately, each connecting device gets only 30 minutes of free internet per day. On a completely unrelated note, I will talk about changing the MAC address of your WiFi card in Windows 7. I must, again, emphasize the fact that these two topics are in no way related. Do you want to know more?


My colleague and me were confronted with a question concerning the introductory chapter of a text on algebraic geometry. The scenario of a plane curve $C=Z(f)\subseteq \mathbb A_{\Bbbk}^2$ over a field $\Bbbk$ is considered, for a nonconstant polynomial $f\in\Bbbk[x,y]$. It was stated that the function field $\mathbb K:=\mathrm{Quot}(\Bbbk[x,y]/\langle f\rangle)$ is obviously of transcendence degree $1$ over $\Bbbk$ because $f(x,y)=0$ is a new relation between $x$ and $y$. The prerequisites to this text are basic undergraduate knowledge of algebra and topology. The question was about the obviousness of the above statement. We came up with a proof that only really requires some linear algebra. I found it rather cute. Do you want to see it?


This glab post is essentially about running a certain shell command remotely on multiple systems within a network that has been set up for public-key authentication. It's a standard task for experienced system administrators I am sure, but for me it was a little adventure in bash scripting — and I wanted to share it with you. Do you want to know more?


I wrote a little text that outlines why vector bundles and locally free sheaves are the same thing. This approach is very messy with a lot of gluing, mostly because I did not look at Exercise II.5.18 in Hartshorne right away. The construction given there is much more canonical and preferable over mine. However, I decided to put this online simply because it is different and personally, it gave me a better feeling for why the two notions coincide.