One problem I encountered using a branch from a refactored project was the following error when merging from the trunk:
$ pwd
myProjectBranch
$ svn merge http://myServer/svn/stijn/myProject/trunk
Cannot replace a directory from within.
To illustrate the problem we assume the following:
If you refactored enough the problem above will show up when doing:
$ pwd
myProjectBranch
$ svn merge http://myServer/svn/stijn/myProject/trunk
Cannot replace a directory from within.
The reason is that the merge operation tries to apply all diffs between revisions 0 and 200 to the branch. As there are files or directories that have disappeared or have been moved the problem arises when trying to apply these diffs to the branch.
The problem is to tell Subversion to ignore all diffs between 0 an the moment the copy was made (revision 150) as these were already applied when the branch was created. To do this one could manually edit all svn propedit svn:mergeinfo subversion properties. A better way to do this is using the following
$ svn merge http://myServer/svn/stijn/myProject/trunk -r1:150 --record-only
$ svn commit -m "Tricked subversion into ignoring all diffs between \\
1 and 150 (creation of branch) when merging"
An even better way is to directly do this after creation of the branch.
]]>svn status. To achieve this we use the propedit command,
$ svn propedit svn:ignore .
This open your favorite editor and allows you add a list of files and directories to ignore. Wildcards can also be used. A typical file looks like this,
changeLog.txt
Doc
*kdev*
Where in my case the first is my change log file, the next is the Doxygen directory and the last uses * wildcards to ignore anything used by KDevelop. The same is possible for any subdirectory,
$ svn propedit svn:ignore subdir
To see which properties are attached to a directory use,
$ svn proplist .
or
$ svn proplist -v
where the -v option shows the content of each property in the list.
It can be useful to keep track of what you change in a log file. To commit later using this file (which I conveniently added to the ignore list) we use,
$ svn commit -F changeLog.txt
Another useful feature is the use of diff for patching files using the patch program. This is possible since diff outputs unified diff format. For instance to examine the changes made to file between the last committed version (HEAD) and the version just before this file was last changed (PREV) we use,
$ svn diff -r HEAD:PREV myFile.txt
if we now write the output to a patchfile,
$ svn diff -r HEAD:PREV hritProcessing.cpp > patchMyFile.patch
we can examine and modify the patch and then apply it using, (-i works from an input file),
$ patch -i myFile.txt
as usual after this check if the patch worked using you usual tools.
]]>
sudo postfix start
Then set your mail client to use,
localhost
or 127.0.0.1 as SMTP server to send email.
To stop the SMTP server (to avoid any malicious use) type,
sudo postfix stop
]]>For ease of use I put an alias in my .bashrc file:
alias cloc="/SomePath/cloc-1.51.pl"
running CLOC on my current project yields:
$ cloc myProject
9 text files.
9 unique files.
41 files ignored.
http://cloc.sourceforge.net v 1.51 T=0.5 s (16.0 files/s, 9016.0 lines/s)
------------------------------------------------------------------
Language files blank comment code
------------------------------------------------------------------
C++ 3 614 772 1801
C/C++ Header 2 211 281 592
make 1 28 28 82
C 2 30 14 55
------------------------------------------------------------------
SUM: 8 883 1095 2530
How about that huge amount of documentation (seen as comments). ![]()
matamala
Rambla Catalunya 13
08007 Barcelona
A nice modern style tapas bar / restaurant. One of my favorite places in Barcelona.
ELJ APO NES & BAR LOBO
Pintor Fortuny 3
08001 Barcelona
Another nice modern style tapas bar (BAR LOBO) with a nice terras located very close to the ramblas. If I am in Barcelona I for a longer period I go there more than once. Nice to start having a few wines at the terras and letting it flow into dinner or lunch.
On the top floor is ELJ APO NES which is a tapas/japanese fusion restauant. Extremly nice.
this last one also exists at a second place,
ELJ APO NES
Pasaje de la Concepcion 2
08008 Barcelona
CARMELITAS
Doctor Dou, 1 / Carme, 42
08001 Barcelona
Nice place with cheap lunch.
Flamant
C Enric Granados, 23
08007 Barcelona
A very nice catalan/french style restaurant. Very nice and not too expensive. We had our first wedding anniversary there. Take a look at the cava they offer.
Cargol Treu Banya
Plaza Dr. Letamendi, 27
08031 Barcelona
Extremely nice to go eat caracoles but (maybe go check it out and write me an email) closed.
As a last tip (the delicatessen shop where I got it ice cold is listed below) is to fetch a bottle of Duran Cava and drink it in nice company in one of the parks in Barcelona.
Colmado Quilez
Rambla Catalunya, 63
08007 Barcelona
In essence, the public key is like a personal locked backdoor on the remote machine and the private key is the key to open the lock. In this example the remote machine is called remotehost and the local machine localhost.
First we generate a key pair. For this we use,
user@localhost$ ssh-keygen -t dsa -b 1024 -f ~/.ssh/identity
this generates a 1024-bit DSA key pair called identity and identity.pub in the .ssh directory. This should be sufficiently safe for everyone (I once figured out why but forgot to write it down ;-). If you want no passphrase just leave it empty.
Now we put the public key on the remote machine,
user@localhost$ scp ~/.ssh/identity.pub user@remotehost:
Now login to the remote machine,
user@localhost$ ssh user@remotehost:
and add it to the authorized_keys list,
user@remotehost$ cat ~/identity.pub >> ~/.ssh/authorized_keys
user@remotehost$ rm ~/identity.pub
Voila, you can now login to the remote host without password.
identity to id_dsa or id_rsa.$ chmod 600 identity for safety
/etc/ssh/sshd_config
by adding following lines:
RSAAuthentication yes
PubkeyAuthentication yes
Then reload your configuration,
# /etc/init.d/ssh reload
For ease of use we can add shortcuts to ~/.ssh/config.
Host remotehost
hostname remotehost
user remoteuser
Port 10001
]]>Visual Guide to Version Control
It uses Subversion for the examples.
]]>/Applications/Utilities/) and create partitions on your USB stick. I chose for one partition in FAT32 to transport data and a second one to make backups. Note: the backups partition will be encrypted.
Step 2: Download TrueCrypt
Step 3: Open TrueCrypt and go trough the following steps:
Step 3: Open TrueCrypt (unless it was already open).
Step 4: Now our volume has name “untitled” and Mac OS X extended formatting. We want to give it a name and Mac OS extended, case sensitive,
/Applications/Utilities/ )Step 5: We now have an encrypted volume “TC”.
Step 6: You can mount and dismount the volume “TC” with TrueCrypt.
Step 7: I then use a script like this to do my backups:
#!/bin/bash
echo "execute: chmod 777 /Volumes/TC/.Trashes"
chmod 777 /Volumes/Rhea/.Trashes
echo "starting synchronization of all files in "\
"/Users/stijn/ to /Volumes/TC"
wait
rsync -av --delete --progress --exclude 'Library/Caches' \
--exclude 'Library/PubSub' /Users/stijn/ /Volumes/TC
wait
touch /Volumes/TC/.Trashes
echo "synchronisation done"
]]>- Get MPlayer OSX Extended which is really great and provides easily the best GUI. However, for some reason the command-line version embedded in it seems not to work. And since the GUI lacks subtitle controls beyond ordinary loading (delay,scaling,…) I needed the command-line version.
- This guy provides Unoffical MPlayer OS X SVN Builds which is very nice AND the command line version of this works!
To use the command line tool we first add a symbolic link to /usr/local/bin/:
$ sudo ln -s /Applications/MPlayer\ OSX.app/\
Contents/Resources/External_Binaries/\
mplayer.app/Contents/MacOS/mplayer\
/usr/local/bin/
now you can test if it works:
$ mplayer movie.avi
Now if you want subtitles using a command like:
$ mplayer -sub sub.srt movie.avi
this does not work since it cannot find the appropriate font ~/.mplayer/subfont.ttf. The solution is straightforward. First go to /Library/Fonts/ pick an appropriate font (I took Trebuchet MS Bold which seems ok) and drop it in ~/.mplayer/ and rename it to subfont.ttf .
This should now work using appropriate scaling:
$ mplayer -subfont-text-scale 3 -sub sub.srt movie.avi
Optional, add this line to your ~/.bashrc:
alias mplayer='mplayer -subfont-text-scale 3'
Now to use delays we hit:
$ mplayer -sub mov.srt mov.avi -subdelay 1
]]>As I am already familliar with a huge part of the field I have no idea on how good an introduction it is. But in my opinion it is probably not the best “first” book on mathematical finance but absolutely worth reading for someone starting in this field.
For me it consolidated and deepened my knowledge in a few ways:
- It gave me some extra intuition on a lot of the material covered.
- It allowed me to rethink and test my understanding of some topics
- It also lead to some interesting discussions with other people in our quant unit.