Wednesday, January 18, 2012

Online course links

X-ray, CT

MRI

Multi-modal
Anatomy guides (well, not for the course...)
Everything

 

Saturday, December 24, 2011

GoDaddy & SOPA

GoDaddy is foolish for supporting SOPA.  Gotta change to a new provider, e.g. http://www.hostgator.com/

Monday, November 21, 2011

LDAP on debian

Well, here is the starting point
http://research.partners.org/wiki/index.php/Active_Directory_on_Unix

But that doesn't quite work.  What is the difference between using ldap:// and ldaps://?  My opensuse box uses ldaps://, which seems to work ok.  But the debian instructions say use ldap://.

Debian has a very useful resource here.

http://www.debian-administration.org/articles/585

If I do "ldapsearch -x", this works using ldap://, but I get an error message "...a successful bind must be completed on the connection."  Possibly this is answered here:

http://forums.techarena.in/active-directory/662084-2.htm

See also this:

http://www.openldap.org/doc/admin24/appendix-common-errors.html

Eventually I learned the reason I get the error about "...a successful bind must be completed on the connection." is that I forgot to use a user name.  For example, the following works:

ldapsearch -v -D 'cn=myuser,cn=users,dc=example,dc=org' -H ldap://ldap.example.org -b dc=example,dc=org -W -x

This even works without "-x" option, which is good news.  But I still get the following error:

$ id myuser
id: myuser: No such user

Aha!  I got it.  I had mistakenly installed "nslcd, libnss-ldap, libpam-ldapd" instead of "nslcd, libnss-ldapd, libpam-ldapd"

How to restrict access to which LDAP users can log in?  See, for example:

http://linux.web.cern.ch/linux/docs/account-mgmt.shtml

The secret was to change the user names into the "filter shadow" line, like this:

filter shadow (!(cn=usr1)(cn=usr2))

Thursday, November 10, 2011

Pulse audio glitches again

Maybe it's not pulse, but usually it is.  Time to debug the problem

$ cat /proc/asound/cards
  0 [SB             ]: HDA-Intel - HDA ATI SB
                      HDA ATI SB at 0xfe8f4000 irq 16
 1 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xfe9ec000 irq 44

Not sure what it really means.  Phonon can be configured to use either of them, but they both skip.  My device is some kind of "on motherboard" thing.

$ lspci -v

00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)
        Subsystem: Dell Device 02e2
        Flags: bus master, slow devsel, latency 64, IRQ 16
        Memory at fe8f4000 (64-bit, non-prefetchable) [size=16K]
        Capabilities:
        Kernel driver in use: snd_hda_intel

01:00.1 Audio device: ATI Technologies Inc RV710/730
        Subsystem: PC Partner Limited R700 Audio Device [Radeon HD 4000 Series]
        Flags: bus master, fast devsel, latency 0, IRQ 44
        Memory at fe9ec000 (64-bit, non-prefetchable) [size=16K]
        Capabilities:
        Kernel driver in use: snd_hda_intel

Then, I read a web page that suggests deleting the ~/.pulse directory, and so I did.  And it fixed it!  But only until the next reboot.

    Saturday, October 08, 2011

    Haiku stuff

    Gnome-terminal problems (again)

    Sigh...looks like gnome-terminal bug came back:

    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=631116

    1) The problem is probably related to an incompatibility with SCIM.  Disabling SCIM (using im-config) solves the problem.  See also:

    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632094

    2) Probably the answer is to switch from SCIM to IBus.

    http://en.wikipedia.org/wiki/Intelligent_Input_Bus

    3) Gnome-terminal has its own special way of setting an input method: using a right-click menu (wtf??)

    http://superuser.com/questions/109554/removing-scim-input-method-as-default-from-gnome-terminal

    Maybe you can set it to XIM and then use SCIM.

    Sunday, October 02, 2011

    JPOP resources

    A big thanks to these web sites for preserving our cultural heritage.

    http://www.otonomai.net
    http://mlbeto1169.blogspot.com/
    http://www.dimazdizon.com/category/japan/

    Sunday, September 11, 2011

    Virtualbox + windows 98

    This turned out to be trickier than I thought.  Virutalbox is not well optimized for windows 98.  Here are some tricks:

    http://forums.virtualbox.org/viewtopic.php?t=9918

    Saturday, September 10, 2011

    glib.GError: Unrecognized image file format

    Deluge crashes with this error.  How boring.

    The fix is to edit common.py as described by brianbrian

    http://ubuntuforums.org/archive/index.php/t-1063483.html

    Sunday, August 21, 2011

    Freshmeat review 2011-08-21 to 2011-07-24

    Eliot - scrabble game
    http://freshmeat.net/projects/eliot

    Potrace - bitmap tracing code
    http://freshmeat.net/projects/potrace

    Cinelerra - audio/video production system
    http://freshmeat.net/projects/cinelerra

    OpenMP Template Library - parallel STL implementation
    http://freshmeat.net/projects/omptl

    Tuesday, August 09, 2011

    Starview KVM sticky key problem

    After moving my office, I started having trouble with my Starview KVM.  It is a problem I vaguely remember having some years ago after it first arrived, and then I worked around the problem.  But now, after putting my computer together again, it came back.

    The problem is that sometimes, a letter will stick, and get repeated.  Like thisssssssssssss. 

    It seems to be a firmware bug.  According to Mike, you can fix it by installing new firmware.

    http://www.newegg.com/Product/Product.aspx?Item=N82E16817707139

    Now, after reading his posts, I understand how I solved it before.  There are dedicated keyboard mouse ports on the starview, but you can also plug your keyboard & mouse to the general purpose ports.  The general purpose ports don't have this problem.

    Saturday, August 06, 2011

    Friday, July 08, 2011

    Installing W7 SP1

    I'm trying to install W7 SP1 on Snowball.  The error message is:

    <put error message here>

    The problem is apparently that w7 requires access to boot manager (formerly boot.ini) to install SP1.

    http://forums.opensuse.org/english/get-technical-help-here/how-faq-forums/unreviewed-how-faq/454535-opensuse-dual-booting-windows-7-loading-service-pack-1-windows-7-a.html

    Wednesday, July 06, 2011

    GUI testing

    Sikuli - GUI testing tool
    http://sikuli.org/

    Wednesday, June 29, 2011

    GMER

    A rootkit detection program for windows

    http://www.gmer.net/

    Tuesday, June 28, 2011

    *** VTE ***: Failed to load terminal capabilities from '/etc/termcap'

    Solution:

    sudo ln -s /usr/share/vte/termcap-0.0/xterm /usr/share/vte/termcap/xterm

    https://bugs.launchpad.net/ubuntu/+source/vte/+bug/140011

    Saturday, June 18, 2011

    Monday, June 13, 2011

    Freshmeat review 2011-06-13 to 2011-05-22

    World War vi - Side-scrolling game
    http://freshmeat.net/projects/wordwarvi

    JShot - One-step screen capture, annotate and upload
    http://freshmeat.net/projects/jshot

    Freeberb3 - Sound processing library
    http://freshmeat.net/projects/freeverb3

    Turious - TBS game
    http://freshmeat.net/projects/turious

    Morituri - CD ripper
    http://freshmeat.net/projects/morituri

    Naev - Space trading game
    http://freshmeat.net/projects/naev


    OCE - 3D computer aided design (CAD)
    http://freshmeat.net/projects/oce

    Cottage - graphics and sound engine for HTML5 games
    http://freshmeat.net/projects/cottage



    Sunday, June 12, 2011

    TPS in octave

    I was crying.  Needed some plots of TPS in 1D.  Gints Jekabson comes to the rescue!

    http://www.cs.rtu.lv/jekabsons/regression.html

    Monday, June 06, 2011

    Finding extra files in your svn directory

    Always I forget to do this before running "make package_source".

    $ svn status

    Sunday, June 05, 2011

    Build debian package: take 2

    This is my interpretation of http://debian-med.alioth.debian.org/docs/policy.html

    When everything is correct, you should be able to do this:
    1. cd plastimatch/trunk
    2. uscan --force-download
    3. svn-buildpackage -rfakeroot -uc -us
    However, while you are debugging, the above workflow is perhaps cumbersome if you are maintaining the source package.  It would require you to update e.g. the source tarball.  Instead, you can do this:
    1. cd source-dir
    2. debuild -j4 -i -us -uc -b
    3. debuild -j4 -i -us -uc -S
    Note that the last one doesn't work if the debian subdirectory in the source directory is a symlink.  You need to actually make a copy.
    1. cd source-dir
    2. cp -r ../trunk/debian .
    If you just want to run lintian, you can do this:
    1. lintian -b ./plastimatch_1.5.0-1_amd64.deb
    2. lintian ./plastimatch_1.5.0-1_source.changes
    When you are messing around with cmake settings and get-orig-source, you can use the following workflow:
    1. make new upstream tarball (don't forget to use pristine source directory -- cmake will include everythign)
    2. link upstream tarball to debian upstream tarball
    3. run get-orig-source
    For me, the following commands implement the above idea
    1. cd build/plastimatch-pristine
    2. make package_source
    3. cp plastimatch-1.5.0-beta.2493-Source.tar.bz2 ~/debian-med/packages/plastimatch
    4. cd ~/debian-med/packages/plastimatch
    5. ln -s plastimatch-1.5.0-beta.2493-Source.tar.bz2 plastimatch-1.5.0.orig.tar.bz2
    6. cd trunk
    7. debian/get-orig-source
    To test the package dependencies, you need a "clean pbuilder environment".  Do this:
    1. sudo pbuilder create
    2. sudo pbuilder --update
    3. sudo pbuilder --build foo_version.dsc
    The first time you do it, you need to do a few more steps.  See the debian policy document for details (http://www.debian.org/doc/manuals/maint-guide/build.en.html  See specifically section 6.4).

    Saturday, May 14, 2011

    Friday, May 06, 2011

    IHE-RO

    The IHE-RO documentation is somewhat elusive. 

    The technical framework web page has 3 documents.

    http://www.ihe.net/Technical_Framework/index.cfm

    And there are several more documents on the wiki

    http://wiki.ihe.net/index.php?title=Radiation_Oncology

    Also there are things like that have no links to them:

    http://wiki.ihe.net/index.php?title=File:IHE-RO_Dose_Compositing_Supplement_v1.0-TI.pdf&oldid=41224

    Sunday, March 20, 2011

    Chromaprint

    This looks very cool.  A new audio fingerprinting app.

    http://forums.musicbrainz.org/viewtopic.php?id=2432

    Thursday, March 10, 2011

    Recording playback

    I can't seem to record playback in either Win 7 or Linux

    Win 7
    • There is no option for stereo mix in my recording device properties
    • My hardware is Dell Inspiron Desktop 546MT, Via 1708S
    • I have updated my driver to Dell's latest version (R237832.exe, 10/25/2009)

    Friday, December 31, 2010

    Compiler list

    An excellent resource for compilers.

    http://www.math.utah.edu/faq/compilers/compilers.html

    Configuring Amarok with my Sansa Fuze

    Apparently Amarok can copy files to the FUZE.  The trick is the little unlabeled button on the FUZE bar of the Amarok collection list.

    http://www.goodbyemicrosoft.net/news.php?item.615.2

    Thursday, December 30, 2010

    Machine learning

    After my frustration with LIBSVM, I decided to look into other methods.  Weka suggests that PLS works well for my problem.  But anyway, I need to find a good package (weka is java therefore unsuitable).

    http://www.support-vector-machines.org/SVM_soft.html
    http://www.linux.org/docs/ldp/howto/AI-Alife-HOWTO-2.html
    http://torch5.sourceforge.net/
    http://mloss.org/software/
    https://spreadsheets.google.com/ccc?key=0Aunb9cCVAP6NdDVBMzY1TjdPcmx4ei1EeUZNNGtKUHc&hl=en#gid=0


    Reviews.

    Weka
    Very good for exploring data.  I found several good algorithms (mostly linear algorithms such as PLS).  However, not a final solution because it is written in Java.

    LIBSVM
    Performs poorly on my data.

    LIBLinear
    Not yet benchmarked.

    Waffles
    This will be good, but currently doesn't compile due to being 64-bit clean (gcc 4.5).

    dlib
    Looks promising.  There is no benchmarking tool (?)

    Shark
    Looks promising.  Not yet benchmarked.

    Shogun
    I previously reviewed this, using the Octave plugin.  However, I don't remember the results.  Need to re-benchmark.

    Thursday, November 25, 2010

    Another jpop site

    Seems to have downloadable music: http://www.nautiljon.com/

    Sunday, November 14, 2010

    Workarounds for github unreliability

    Recently looking at how to handle github unreliability problems.  This will probably involve creating a mirror site.

    MIght be possible using a "post-receive hook"

    http://help.github.com/post-receive-hooks/


    Monday, August 30, 2010

    Lame settings for transcoding voice

    Here is a reasonably good setting for low quality voice

    lame -a -m s -b 16 test.wav test.mp3

    See also

    http://www.hydrogenaudio.org/forums/index.php?showtopic=3270



    Tuesday, August 17, 2010

    Saving gmail messages

    I needed to re-compose a file which was split into 7 parts and sent to my gmail account.  Strangely, you cannot do this through the web interface -- instead you have to set up POP3 or IMAP to do this (!).  While trending on this idea, I learned that you can access Yahoo! mail through POP3 too, using the YPOPs! application.

    http://ypopsemail.com/

    Out of sight!

    But anyway, back to gmail.  I enabled POP3 (actually it was already enabled), and set up Claws to retrieve.  There is some complicated-looking instructions in the Claws help pages:

    http://www.claws-mail.org/faq/index.php/Installation_and_Configuration#Does_Claws_Mail_work_with_Gmail_accounts.3F


    Well, actually that part is not so complicated, but the part about effectively using gmail tags is.  The thing is, if you don't do that correctly, all of your "archive"d emails get thrown in your inbox together with everything else.

    Sunday, August 08, 2010

    Zerogsound

    Wow, excellent work by Zero G Sound to preserve our folk music heritage. 

    http://zerogsound.blogspot.com/

    Tuesday, July 27, 2010

    Saturday, July 24, 2010

    Grub error: symbol grub_xputs not found

    Yet another bad version of Grub got pushed to Debian testing.  Those guys really are not doing QA properly.  Anyway, the error message appears before the grub screen starts, and looks like this:
    Grub error: The symbol grub_xputs not found
    grub rescue>
    Apparently grub is confused because I have 2 hard disks (duh...).  You can read many bug reports about this, and it is still not solved after most of a year.  For example
    The solution is to burn a live cd (I use USB for this), and fix.  Here is the solution details, and it works quite well:


    Sunday, July 11, 2010

    American Buddha Online Library

    When you have a little free time, the following is a good read.

    http://www.american-buddha.com/

    Wednesday, June 16, 2010

    Perl30Ex.dll + IIS

    POST isn't working with Perl30Ex.dll.  Here is what I've checked:
    1. Check install, permissions, etc (everything seems configured correctly)
      http://blogs.iis.net/wadeh/archive/2009/04/13/running-perl-on-iis-7.aspx
    2. Look through CGI doc, try different options (no apparent effect)
      http://perldoc.perl.org/CGI.html
    3. Enable failed request tracking (no failures logged)
      http://mvolo.com/blogs/serverside/archive/2007/07/26/Troubleshoot-IIS7-errors-like-a-pro.aspx
    4. Compare source pages between working (apache) and non-working (iis) systems
      They are the same
    5. Disable windows authentication in IIS

    Saturday, June 12, 2010

    Radeon+Debian (again)

    This morning's update of Debian testing borked my X again.  If I try to run startx, the system hangs (black screen, unresponsive (?) keyboard).  Luckily, when booting from an older kernel, X seems to run fine.

    Here is my card:
    gsharp@wormwood:~$ lspci -v |grep VGA
    01:00.0 VGA compatible controller: ATI Technologies Inc RV710 [Radeon HD 4350] (prog-if 00 [VGA controller])

    Here are the pertinent bits from /var/log/Xorg.0.log

    Older kernel (working):
    (II) [KMS] Kernel modesetting enabled.
    (WW) Falling back to old probe method for vesa
    (WW) Falling back to old probe method for fbdev
    (II) LoadModule: "fbdevhw"
    (II) Loading /usr/lib/xorg/modules/linux/libfbdevhw.so
    (II) Module fbdevhw: vendor="X.Org Foundation"
            compiled for 1.7.7, module version = 0.0.2
            ABI class: X.Org Video Driver, version 6.0
    (II) RADEON(0): Creating default Display subsection in Screen section
            "Default Screen" for depth/fbbpp 24/32
    (==) RADEON(0): Depth 24, (--) framebuffer bpp 32
    (II) RADEON(0): Pixel depth = 24 bits stored in 4 bytes (32 bpp pixmaps)

    Newer kernel (not working):
    (II) Primary Device is: PCI 01@00:00:0
    (II) [KMS] drm report modesetting isn't supported.
    (WW) Falling back to old probe method for vesa
    (WW) Falling back to old probe method for fbdev
    (II) Loading sub module "fbdevhw"
    (II) LoadModule: "fbdevhw"
    (II) Loading /usr/lib/xorg/modules/linux/libfbdevhw.so
    (II) Module fbdevhw: vendor="X.Org Foundation"
            compiled for 1.7.7, module version = 0.0.2
            ABI class: X.Org Video Driver, version 6.0
    (EE) open /dev/fb0: No such file or directory
    (II) RADEON(0): TOTO SAYS 00000000fe9f0000
    (II) RADEON(0): MMIO registers at 0x00000000fe9f0000: size 64KB

    (II) RADEON(0): PCI bus 1 card 0 func 0
    (II) RADEON(0): Creating default Display subsection in Screen section
            "Default Screen" for depth/fbbpp 24/32
    ...
    (EE) RADEON(0): Timeout trying to update memory controller settings !
    (EE) RADEON(0): You will probably crash now ...
    (EE) RADEON(0): Timeout trying to update memory controller settings !
    (EE) RADEON(0): You will probably crash now ...
    ...
    The new (not working) kernel goes on and loads module "vgahw" as well, which the older (working) kernel doesn't.

    Originally, I had these three packages installed:
    xserver-xorg-video-ati
    xserver-xorg-video-radeon
    xserver-xorg-video-radeonhd
    So I removed the radeon one (presumably not needed for my card?):
    apt-get remove xserver-xorg-video-radeon
    This worked (in the sense that I get video), but didn't work (in the sense that X reverted to VESA).  The Xorg.log yields:
    (II) LoadModule: "ati"
    (WW) Warning, couldn't open module ati
    (II) UnloadModule: "ati"
    (EE) Failed to load module "ati" (module does not exist, 0)
    So, I manually add radeonhd to the /etc/X11/xorg.conf
    Section "Device"
        Identifier     "Device0"
        Driver         "radeonhd"
    EndSection
    However, this causes X not to start with the following error:
    (II) [DRM] Kernel mode setting enabled
    (EE) FATAL: RadeonHD presently does not work with kernel modesetting (KMS).
    Please disable KMS in your kernel.
    (II) UnloadModule: "radeonhd"
    (EE) Screen(s) found, but none have a usable configuration.
    Apparently the best way to deal with this is to tell the kernel to disable kernel modesetting, by adding radeon.modeset=0 (or is it radeonhd.modeset ??).  See e.g. this link: http://lists.opensuse.org/radeonhd/2009-11/msg00175.html

    To test this, I need to reboot, and specify the kernel parameters to grub.  This method is described in this link http://grumpymole.blogspot.com/2007/05/ubuntu-how-to-edit-grub-boot-parameters.html:
    • Press "Esc" to intercept boot countdown
    • Go to the grub menu entry
    • Press 'e' to start editing.
    • Scroll down to the "linux..." line. Add "radeon.modeset=0" to the end.  (Yes, radeon, not radeonhd).
    • Press CTRL-x to boot using that kernel and those parameters.
    The method for making these changes permanent are not well described, but here is how to do it:
    • Edit /etc/default/grub
    • Change GRUB_CMDLINE_LINUX to include "radeon.modeset=0"
    • grub-mkconfig -o /boot/grub/grub.cfg
    • grub-install /dev/sdb (or whichever drive has the relevant MBR)
    http://forum.nginx.org/read.php?26,90217,90217
    References:
    http://wiki.debian.org/AtiHowTo
    http://www.x.org/wiki/radeonhd
















    Friday, June 11, 2010

    Cluster file synchronization

    I like unison well enough, but maybe something better needed for the cluster.  For example csync2.  Look at the post by Vitek, with his recommendations:

    http://pooteeweet.org/blog/0/909#m909

    Wednesday, June 09, 2010

    kondemand problem

    I am getting sluggish performance out of twofish, with the following output from top.  Sometimes %si (software interrupts) goes very high, though it is not shown in the current top dump.
    top - 18:21:05 up 35 days,  3:30,  1 user,  load average: 0.71, 0.48, 0.39
    Tasks: 250 total,   1 running, 249 sleeping,   0 stopped,   0 zombie
    Cpu(s):  0.0%us,  0.0%sy,  0.0%ni, 99.7%id,  0.0%wa,  0.0%hi,  0.3%si,  0.0%st
    Mem:  20557640k total,   865564k used, 19692076k free,   159480k buffers
    Swap: 23446828k total,        0k used, 23446828k free,   532112k cached

      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    13359 gcs6      20   0 51564 3560 2560 R   18  0.0   0:03.12 top
       93 root      15  -5     0    0    0 S    2  0.0 305:29.57 kondemand/5
     4168 root      20   0  8908  504  376 S    2  0.0 199:42.04 irqbalance
       95 root      15  -5     0    0    0 S    2  0.0 303:43.57 kondemand/7
       50 root      15  -5     0    0    0 S    1  0.0 217:07.99 events/15
       99 root      15  -5     0    0    0 S    1  0.0 306:53.07 kondemand/11
      101 root      15  -5     0    0    0 S    1  0.0 332:41.09 kondemand/13
       89 root      15  -5     0    0    0 S    1  0.0 308:02.11 kondemand/1
       91 root      15  -5     0    0    0 S    1  0.0 319:29.00 kondemand/3
     4750 root      20   0 14608  632  476 S    1  0.0   2:11.19 cron

    Not sure the problem, but I will like to try upgrading the kernel.  It seems there are 3 different kernel revisions in the 4 machines.

    Sunday, June 06, 2010

    id3 tools on linux

    Ugh. Every time I need to debug ID3 tags, I have to sort through a bunch of buggy, obsolete id3 tools.  Well, this time I'll try to take notes.

    Here are the ones in Debian (starting with command line tools):

    id3
    http://code.google.com/p/id3/

    Completely useless (id3v1 only).

    id3tool
    http://nekohako.xware.cx/id3tool/
    Completely useless (id3v1 only).


    id3v2
    http://id3v2.sourceforge.net/

    Mostly useless.  Does not, for example, show encoding information.

    mp3diags
    http://mp3diags.sourceforge.net/
    Nice program.  Wish it would give more information about encoding.

    Monday, May 24, 2010

    Setting up NFS with a firewall

    The below post explains how to do this for CentOS (the relevant post is the one by MensaWater).  It works great!  Thanks MensaWater.  :)

    http://www.linuxquestions.org/questions/linux-networking-3/help-nfs-error-no-route-to-host-341562/page2.html

    The relevant text-mode firewall configuration tool is called system-config-securitylevel.  You can use spaces to separate the "other ports" that you need to add.

    For NFS4, the following post looks useful:

    http://blog.laimbock.com/2009/05/21/nfsv4-on-centos-53-and-fedora-11/

    Wednesday, May 05, 2010

    Sudo + ssh

    It can be done.  The first step is to do the ssh-agent and ssh-add stuff.

    http://www.sudo.ws/pipermail/sudo-users/2003-April/001477.html
    http://mah.everybody.org/docs/ssh

    Then the second piece of the puzzle is to do ssh -t so you can answer the sudo prompt properly.  But you need to "prime" sudo, so it caches your password.  See comment by crashingdaily in the following post:

    http://crashingdaily.wordpress.com/2007/06/29/rsync-and-sudo-over-ssh/

    Thursday, April 01, 2010

    BFGS notes

    In addition to the wikipedia articles, I found these nice notes:

    http://www.math.mtu.edu/~msgocken/ma5630spring2003/lectures.html

    http://www.math.mtu.edu/~msgocken/ma5630spring2003/lectures/

    Also these:

    http://www.srl.gatech.edu/education/ME6103/Quasi-Newton.ppt

    This looks really hands on:

    http://hal3.name/docs/daume04cg-bfgs.pdf


    A nice looking implementation.  Also, check references on this one, esp. for line search code:

    http://www.chokkan.org/software/liblbfgs/

    Matlab implementations of several optimizers:

    http://www4.ncsu.edu/~ctk/matlab_darts.html

    Another lbfgs implementation:

    http://www.cs.umd.edu/~oleary/LBFGS/

    Another paper describing LBFGS

    http://www.fs.utm.my/matematika/images/stories/matematika/200117103.pdf


    A survey of truncated newton methods

    http://iris.gmu.edu/~snash/nash/assets/TN_Survey/tn_survey.html

    Saturday, March 13, 2010

    Dicom test files

    Optimizer summary

    L-BFGS-B license

    I was poking around with the L-BFGS-B optimizer, which is used by plastimatch (also ITK).  I discovered it is GPL licensed, (and/or covered by ACM license):

    http://www.eecs.northwestern.edu/~nocedal/lbfgsb.html
    http://www.acm.org/publications/policies/softwarecrnotice

    I wonder if the license changed.  For example SciPy uses under a different license:

    http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.fmin_l_bfgs_b.html

    The SciPy list has a discussion of alternate optimizers of this class.

    http://osdir.com/ml/python.scientific.devel/2004-04/msg00005.html

    See also this regarding GSL routines.

    http://www.mail-archive.com/help-gsl@gnu.org/msg00603.html

    String libraries redux

    Well, the string library stuff is coming up again.  For my C++ code, I'm interested in what can be done better than std::string.  E.g. is CBstring better?  There are some comparisons by the authors:
    As far as it goes, Matthew Wilson's code looks interesting too:

    Monday, March 08, 2010

    Monte Carlo codes

    Monte Carlo codes: MCNPX, DPM, PENELOPE, etc

    GEANT4
    Here is the site for MCNPX
    Not sure where I can download DPM. Here is an old version
    Penelope. It is hard to find as well. But eventually I found it.
    VMC++. Apparently it is proprietary

    Sunday, March 07, 2010

    Smart pointers

    Plastimatch would benefit from smart pointers (or GC).  There are a couple of places in the code where logic must swap around data between containers, and do bookkeeping because the containers own the data.

    Here are some implementations of smart pointers:
    It would seem that smart pointers require C++.  Using C is too cumbersome (though possible, see earlier post).

    I'm slightly concerned about the loss of performance in naive reference
    counted smart pointers.  See for example this description:

    http://c2.com/cgi/wiki?ReferenceCounting

    Saturday, March 06, 2010

    New crop of blogging sites

    Here is what scribefire 3.5 supports.  These are APIs, not sites.
    • Wordpress
    • Movable Type
    • Drupal
    • Textpattern
    • Roller
    • MetaWeblog API
    • Blogger
    • Tumblr
    My current dissatisfaction with blogger is that you can only edit the 25 most recent posts.  This makes it difficult to update/merge older entries.

    From the w.blogger site, here are a slightly dated list of blog sites.

    Sunday, February 14, 2010

    Radeon + debian 2.0

    Still having problems with my ATI Radeon HD 4350 on linux.  The card has a RV710 (according to lspci), which means it should be supported by the debian radeonhd package.

    I try to delete xserver-xorg-video-radeon (it is presumably unneeded).  But when I do that, X fails to start.

    Thursday, February 11, 2010

    PDF markup and review

    Here are the contenders:
    • flpsed
    • scribus
    • pdfedit
    • Xournal

    Saturday, January 23, 2010

    DKMS autoload fails for fglrx (ATI proprietary driver)

    This message flashes on the screen at boot time, after the latest debian kernel update.  Unfortunately it doesn't appear in the log anywhere.I suppose the solution is to patch the driver like the following link. 
    http://lkml.org/lkml/2009/10/12/255
    In more detail, go to directory
    /usr/src/fglrx-8.681
    Edit the file kcl_io.c, and add the following line
    #include .
    Then run the following:
    sudo dkms build -m fglrx -v 8.681

    Friday, January 22, 2010

    Xsession: Login for (user) is disabled

    After upgrading my kernel, I got the error message, and X would not allow me to run a session.
    Xsession: Login for (user) is disabled
    This is fixed by editing /etc/shells, and adding a line for the LDAP-specified shell (in my case, /bin/PHSshell).

    http://www.linuxquestions.org/questions/susenovell-60/xsession-login-for-someuser-is-disabled.-369654/

    Monday, December 28, 2009

    LDAP + Kerberos

    I get an error like this:
    gcs6@gelato:/etc> ldapwhoami
    SASL/GSSAPI authentication started
    ldap_sasl_interactive_bind_s: Local error (-2)

    Not yet completely fixed, but looks like you need to do both of the following:

    http://research.imb.uq.edu.au/~l.rathbone/ldap/gssapi.shtml
    http://www.linuxquestions.org/questions/linux-networking-3/kerberos-kinit-reply-did-not-match-expectations-445698/

    Wednesday, December 23, 2009

    Setting up a new subversion repository

    1. Edit /etc/httpd/conf.d
      Add section where "Location" is the name of the module
      Set "SVNPath" as appropriate
      Set "AuthUserFile" to name of a new file
    2. Create password file, such as /var/www/svnusers-name-of-project
      For each user, add password such as:
      sudo htpasswd -m svnusers-name-of-project new-user
      (Actually, maybe the -m is not desired?)
    3. Create the archive:
      cd /home/subversion/repos/
      sudo svnadmin create name-of-project
      sudo chown -R apache.apache name-of-project
    4. Restart apache
      (If you don't do this, you get the dreaded "200 OK" error)
      In Centos, do this:  sudo /sbin/service httpd restart

    Tuesday, December 22, 2009

    Some RT links

    I'm looking for the definitions of machine coordinate system IEC 61217.  This doesn't seem to be available in any of the web pages.  Here is the reference for the spec:

    International Electrotechnical Commission, IEC 61217: Radiotherapy Equipment—Coordinates, Movements and Scales ~International Electrotechnical Commission, Geneva, 1996.

    Best reference I could find is the AAPM task group report.

    http://www.aapm.org/pubs/reports/OR_01.pdf

    What is IEC 60601-2-11?

    Medical electrical equipment - Part 2-11: Particular requirements for
    the safety and essential performance of gamma beam therapy equipment

    Short but useful link.  Describes IEC 61217 patient coordinates...
    http://atc.wustl.edu/home/news/2004_dicom_workshop/WRB2004%20Image%20IODs%20v3.pdf

    Good tutorial for DicomRT
    http://www.sgsmp.ch/dicom/germond.pdf

    NA-MIC kit test-based programming hints

    Saturday, December 19, 2009

    Strain

    First, basic description here.  For the moment, we are interested in the term "epsion_ij", which is Cauchy's strain tensor.  There is a simplified version (see Wikipedia page), in which the cross terms are neglected.  Consider only this one.
    http://www.efunda.com/formulae/solid_mechanics/mat_mechanics/strain.cfm
    http://en.wikipedia.org/wiki/Infinitesimal_strain_theory
    http://en.wikipedia.org/wiki/Hooke%27s_law
    http://en.wikipedia.org/wiki/Lam%C3%A9_parameters
    Regularization based on strain is described here:
    ftp://ftp.math.ucla.edu/pub/camreport/cam08-27.pdf


    Sunday, December 13, 2009

    libtool hangs

    I got this problem when building streamripper.  I guess it is because of the old configure script in libmad.  The workaround is to add the following line to the libtool script (after it is generated), after the line ECHO="echo":
    echo="echo"
    Here is the original poster who found the workaround:
    http://lists.opensuse.org/opensuse-bugs/2009-01/msg02935.html
    Still need to find a real fix for this.


    Saturday, December 05, 2009

    _CRTDBG_MAP_ALLOC

    Looks like the microsoft compiler has a tool for debugging memory leaks.
    http://msdn.microsoft.com/en-us/library/e5ewb1h3(VS.80).aspx

    Sunday, November 29, 2009

    Virtual box and debian

    Goal:  Virtualbox + solaris + X on debian.  There seem to be no "uber-newbie" tutorials out there.
    http://forums.virtualbox.org/viewtopic.php?f=7&t=5634
    This is not virtualbox related, but looks interesting:
    http://simh.trailing-edge.com/

    Friday, November 27, 2009

    Turning off autoplay for Debian

    When I pop in a CD on my debian box, it fires up Sound Juicer.  Yuck.  So, I removed Sound Juicer.  But now it fires up something else!  How to disable this puppy?  There are three possibilities discussed in various web pages:
    1. System -> Preferences -> Removable drives and media
    2. Applications -> System tools -> Configuration editor -> Apps -> Nautilus -> Preferences
    3. Desktop -> Gnome -> volume_manager
    It seems #2 is the correct option.  See also this site, for information how to do #2 by the command line.
    http://www.fedoraforum.org/forum/showthread.php?p=1266047

    Thursday, November 26, 2009

    Scheduling library

    This may be useful for streamripper
    http://freshmeat.net/projects/libscheduler

    Wednesday, November 18, 2009

    USB mounting on OpenSUSE

    This is an example of how to mount the usb stick on OpenSUSE.  Why doesn't it automount?  Even debian does.
    http://www.suseblog.com/quick-usb-stick-mounting-tip-for-suse-linux

    Sunday, November 15, 2009

    OpenCL segmentation faults on linux

    Ripping on linux

    I've been looking around for CD ripping solution for linux.  Look no further than "The Art of the Rip":

    https://thomas.apestaart.org/thomas/trac/wiki/DAD/Rip

    Name lookup with WINS on linux

    Go into the file nsswitch.conf located at /etc/nsswitch.conf. Find the Line "hosts: files dns". It's missing wins so make it like this "hosts: files dns wins". Then you can ping by NetBIOS name.

    http://www.linuxquestions.org/questions/susenovell-60/enabling-wins-lookup-463012/

    You need to install /lib/libnss_wins.so, which is in the winbind package.

    What does [NOTFOUND=return] in nsswitch.conf mean? Briefly, [NOTFOUND=return] means that the name service whose entry it follows should be considered authoritative (so that if it's up and it says such a name doesn't exist, believe it and return instead of continuing to hunt for an answer).

    http://www.unixguide.net/sun/faq/4.03.shtml

    Apparently this change requires a reboot (!) as well:

    http://docs.hp.com/en/5992-0715/ch06s01.html

    ScribeFire

    Welcome to the 21st century, Greg.  ScribeFire is a Firefox plugin for doing blogging, which is already much better than the web interface.

    https://addons.mozilla.org/en-US/firefox/addon/1730

    It even lets me edit previous posts which I made using the web interface.

    By default, it adds tracking cookies to your web site.  Probably you want to turn these off:

    http://blog.coldtobi.de/1_coldtobis_blog/archive/242_scribefire_inserts_zemanta_web_bug.html

    Horrible default colors for ls

    Solution (debian):

    1) dircolors --print-database > ~/.dircolors
    2) Add the following line to .bashrc
      eval `dircolors $HOME/dircolors`

    Also, note the problem with ls hanging on orphan references:

    http://blog.wompom.org/index.php/2008/01/26/ls-color-considered-harmful/

    Enable Quick Launch in Windows 7

    Friday, November 13, 2009

    Boot configuration data store could not be opened

    Tried to set up dual boot on my brand new Windows 7 partition. The new way to do this is to use a utility called bcdedit. For example:

    http://www.iceflatline.com/2009/09/how-to-dual-boot-windows-7-and-linux-using-bcdedit/

    However, I got the error "boot configuration data store could not be opened". This is solved using the following method:

    http://social.answers.microsoft.com/Forums/en-US/w7install/thread/a9ce0d39-e13c-4b77-982f-66aff94e5d17

    Sunday, November 01, 2009

    Searching for mp3

    Got this from slashdot. Best meta-torrent sites.

    http://netforbeginners.about.com/od/peersharing/f/torrentsearch.htm

    On google you can do this:

    "artist name" intitle:index.of mp3 -html -htm -php -asp -txt -pls

    What does the . do?  Match a single character?

    Wednesday, October 21, 2009

    Emacs development tools

    Ran across CEDET while looking for the matlab editor settings. Looks interesting.

    http://cedet.sourceforge.net/

    Sunday, October 04, 2009

    Levenberg-Marquardt Code

    Ran across this on freshmeat, might be worth a look.

    http://www.ics.forth.gr/~lourakis/levmar/

    The lecture notes also worth a look.

    http://www.imm.dtu.dk/pubdb/views/edoc_download.php/3215/pdf/imm3215.pdf

    Saturday, October 03, 2009

    Jack in debian

    Rosegarden fails with message "Failed to connect to JACK audio server". So, need to start jack. Jack fails with message "JACK is running in realtime mode, but you are not allowed to use realtime scheduling." I guess JACK ignores the fact that I unchecked "Realtime" option in the setup window. Oh well. Guess it really wants realtime (lame). Probably it's just a bug in the Qt gui rather than a Jack bug, because I see the -L flag is not actually sent on the jackd command line.

    Anyway, I run sudo dpkg-reconfigure jackd, and tell it to use realtime priorities. This doesn't seem do anything at all.

    Next, I do what Jack suggests, and edit /etc/security/limits.conf
    @audio          -       rtprio          100<br />@audio          -       nice            -10<br />
    This didn't do it for me though. Maybe I have to reboot? Yep, that solves this problem. Probably I could have restarted pam, but I had no patience for sidetrack on this issue.

    Also, I get a warning from Jack that I need to set the maximum locked memory. How much is a good value? I just try the recommended value.
    @audio          -       memlock 240144<br />
    Next, I get an error message:
    ALSA: final selected sample format for capture: 16bit little-endian<br />ALSA: cannot set period size to 1024 frames for capture<br />ALSA: cannot configure capture channel<br />cannot load driver module alsa<br />
    Turns out that my card doesn't like 1024 frames per capture. Change this using qjackctl. 512 is OK? Well OK!
    ALSA: final selected sample format for capture: 16bit little-endian<br />ALSA: use 2 periods for capture<br />ALSA: cannot set hardware parameters for capture<br />ALSA: cannot configure capture channel<br />
    Hm, not so clear what this means. Google is utterly without comment. However, I found if I change the input channels from (default) to 2, this error message is cleared.

    All is not well however. Starting Jack from qjackctl causes the program to freeze, and I have to kill it. Starting it from command line and starting rosegarden yields the following:
    gsharp@stonesmith:~$ /usr/bin/jackd -dalsa -dhw:0 -r44100 -p512 -n2 -S -i2<br />no message buffer overruns<br />jackd 0.116.2<br />Copyright 2001-2005 Paul Davis and others.<br />jackd comes with ABSOLUTELY NO WARRANTY<br />This is free software, and you are welcome to redistribute it<br />under certain conditions; see the file COPYING for details<br />JACK compiled with System V SHM support.<br />loading driver ..<br />apparent rate = 44100<br />creating alsa driver ... hw:0|hw:0|512|2|44100|2|0|nomon|swmeter|-|16bit<br />control device hw:0<br />configuring for 44100Hz, period = 512 frames (11.6 ms), buffer = 2 periods<br />ALSA: final selected sample format for capture: 16bit little-endian<br />ALSA: use 2 periods for capture<br />ALSA: final selected sample format for playback: 16bit little-endian<br />ALSA: use 2 periods for playback<br />jackd watchdog: timeout - killing jackd<br />

    In addition to jack dying, rosegarden complains about the lack of an RT timer, suggesting sudo modprobe snd-rtctimer.

    Wednesday, September 30, 2009

    Linux software raid

    Most of what you need is on the Linux Raid wiki.
    http://linux-raid.osdl.org/index.php/Linux_Raid
    However, you also need to know that the initial mdadm command puts the raid in read-only mode. To fix this, you need to need to do something like "mdadm --readwrite /dev/md10"
    http://linux.derkeiler.com/Newsgroups/comp.os.linux.misc/2007-11/msg00012.html
    Here is what I did:
    /sbin/mdadm --create --verbose /dev/md20 --level=mirror --raid-devices=2 /dev/sdc /dev/sdd
    /sbin/mdadm --monitor /dev/md20
    I don't know what monitor does. In another terminal I did this:
    /sbin/mdadm --readwrite /dev/md20
    This changes the status from paused to resync.
    gcs6@gelato:> cat /proc/mdstat

    md20 : active (auto-read-only) raid1 sdd[1] sdc[0]
    488386496 blocks [2/2] [UU]
    resync=PENDING
    md10 : active raid1 sda10[0] sdb10[1]
    441072512 blocks [2/2] [UU]

    gcs6@gelato:> /sbin/mdadm --readwrite /dev/md20
    gcs6@gelato:> cat /proc/mdstat

    Personalities : [raid0] [raid1] [raid6] [raid5] [raid4]
    md20 : active raid1 sdd[1] sdc[0]
    488386496 blocks [2/2] [UU]
    [>....................] resync = 3.8% (18745664/488386496) finish=123.0min speed=63594K/sec
    md10 : active raid1 sda10[0] sdb10[1]
    441072512 blocks [2/2] [UU]

    OK. Time to make the file system. I choose reiserfs, because that's what OpenSUSE came with on my other disks. The wiki page says I can do this while it resyncs, so that is what I did.
    /sbin/mkfs.reiserfs -b 4096 /dev/md20
    Add entry to fstab, mount, and good to go!

    When I rebooted a few months later, I found that my raid was gone!  Here is how I recovered:
    /sbin/mdadm -A /dev/md20 --scan
    mount -t reiserfs /dev/md20 /scratch1
    Looks like it is OK.  Whew!  Also, I added the following line to /etc/mdadm.conf.  Maybe it is necessary? 
    ARRAY /dev/md20 level=1 num-devices=2 devices=/dev/sdc,/dev/sdd

    Tuesday, September 22, 2009

    The system cannot execute the specified program

    The solution (in cases where the C++ redistributable cannot be installed) is to either remove the manifest, or include a private manifest.

    http://msdn.microsoft.com/en-us/library/ms235342%28VS.80%29.aspx

    The private manifest includes the manifest file itself, as well as the DLL's in the assembly. You plop them into the same directory as the executable. The format of the manifest file should exactly match the manifest in, for example, c:\windows\WinSxS\manifests.

    Friday, September 18, 2009

    OCR Software

    I'm in the market for an OCR software that can handle Japanese. Freshmeat and other sources yield the following choices (as of Sep 18, 2009):

    Engines
    Front-ends
    • YAGF (Cuneiform front-end) - last update Aug 2009
    • ocrodjvu (OCRopus front end) - last update Mar 2009
    • Kooka (GOCR/Orcad front end) - last update Jul 2007
    Misc
    Notes:
    • Tesseract: unlikely to be usable for asian languages (see this page)
    • Gocr: no information, does not look promising
    • OCRopus: no known solution (see this page)
    • Orcad: no information, does not look promising
    • Cuneiform: apparently not (see this page, and this page)
    Look like the only choice is NHocr. Very interesting...