Simon Richter: o_O
Norbert, I'm not entirely confident you'd be able to reliably restore a database from such a backup, unless the database had a QUIESCE command that would be called before the snapshot is taken.
Norbert, I'm not entirely confident you'd be able to reliably restore a database from such a backup, unless the database had a QUIESCE command that would be called before the snapshot is taken.
The ProTour may be over, but there’s coverage of the category 1.1 race from Firenza-Pistoia on RAI Tre from 16:55-17:25 CET (free-to-air 13e), repeated
Someone gave me an MP3 player. He did so for somewhat devious reasons, but
that's outside the scope of this post. It is a SanDisk Sansa stop thinking
of pulp fantasy and it has roughly 500 gigs too little storage space. The
FAQ
says such cute things as
The original firmware is recommended for charging at this time, and
Rockbox does not currently provide either functionality so you will need to
continue using the original firmware (for now) in MSC (UMS) mode to add
music to the Sansa.
Please don't tell my Sansa about this FAQ because it thinks that both of
those claims are false.
I want my newfangled device to participate in the spyware fiesta known
as last.fm, and
Rockbox has an option for supporting that;
if you turn it on, it fills a /.scrobbler.log file with tab-delimited
lines for your parsing pleasure.
Rather than download additional software to cope with my new lifestyle,
I whipped up the following script (released under the gnocchi-ng license)
which converts the log to something you can just stuff into your
~/.zomg/cache file and send up to the submission server at your next
appropriate invocation of zomg.
I'm afraid you'll have to handle any timestamp sorting by hand, but if you
script it, be a dear and implement some kind of cache file locking.
#!/bin/zsh
# Copyright (C) 2007 Clint Adams. All rights reserved.
# This program has no name and is released under the terms of
# the gnocchi-ng license.
audioscrobbler_urlencode()
if (( $+options[multibyte] )); then
setopt localoptions extendedglob nomultibyte
else
setopt localoptions extendedglob
fi
input=( $ (s::)1 )
print -- $ (j::)input/(#b)([^A-Za-z0-9_.!~*\'\(\)-])/%$(([##16]#match))
audioscrobbler_constructquery()
local sid="$1"
local artist=$(audioscrobbler_urlencode "$2")
local track=$(audioscrobbler_urlencode "$3")
local album=$(audioscrobbler_urlencode "$4")
local mbid=$(audioscrobbler_urlencode "$5")
local length=$(audioscrobbler_urlencode "$6")
local ttime=$(audioscrobbler_urlencode "$7")
local source="$8"
local tracknum="$9"
reply=("&s=$ sid " "&a[0]=$ artist &t[0]=$ track &i[0]=$ ttime &o[0]=$ source &r[0]=&l[0]=$ length &b[0]=$ album &n[0]=$ tracknum &m[0]=$ mbid "$'\0')
while read -r line
do
local -a field
field=($ (ps:\t:)"$ line " )
if [[ $field[6] == L ]]; then
audioscrobbler_constructquery "" "$field[1]" "$field[3]" "$field[2]" "" "$field[5]" "$field[7]" P "$field[4]"
print "$reply[2]"
fi
done <<(grep -v '^#' .scrobbler.log)

Jonathan Schwartz: “[L]ater this week, we’re going to use our defensive portfolio to respond to Network Appliance, filing a comprehensive reciprocal suit. As a part of this suit, we are requesting a permanent injunction to remove all of their filer products from the marketplace, and are examining the original NFS license - on which Network Appliance was started. By opting to litigate vs. innovate, they are disrupting their customers and employees across the world.
“In addition to seeking the removal of their products from the marketplace, we will be going after sizable monetary damages. And I am committing that Sun will donate half of those proceeds to the leading institutions promoting free software and patent reform (in specific, The Software Freedom Law Center and the Peer to Patent initiative), and to the legal defense of free software innovators. We will continue to fund the aggressive reexamination of spurious patents used against the community (which we’ve been doing behind the scenes on behalf of several open source innovators). Whatever’s left over will fuel a venture fund fostering innovation in the free software community.”
Bravo.
Been a bit busy for the last week or so. Apologies to those who were waiting for other things but I've been dedicating my time to Emdebian in preparation for CELF in Linz, Austria which is now less than a week away./usr/share/consolefonts/default8x16.psf.gz. When I started using X routinely I missed it quite a lot. Mostly that was because I used BitchX, and BitchX is written for an IBM437 code page set of line drawing characters. So I opened up that console font in xmbdfed and converted it to a PCF file. If you have Debian’s BitchX package installed, you’ve got a copy of this work in /usr/share/fonts/X11/misc/default8x16.pcf.gz.
So I’ve done the same trick again. Here’s the steps I followed:
RSet (Relevance Set) The Relevance Set (RSet) is the set of documents which have been marked by the user as relevant. They can be used to suggest terms that the user may want to add to the query (these terms form an ESet), and also to adjust term weights to reorder query results. ESet (Expand Set) The Expand Set (ESet) is a ranked list of terms that could be used to expand the original query. These terms are those which are statistically good differentiators between relevant and non-relevant documents.What I'm doing now is: after printing the normal result, I build an rset with all the results. For better results one can ask the user to pick the results they like (make a GUI with that: it should rock!), but starting with the top results in the RSet is a good enough default:
# Now, we ask Xapian what are the terms in the index that are most relevant to # this search. This can be used to suggest to the user the most useful ways of # refining the search. # Select the first 10 documents as the key ones to use to compute relevant # terms (matches is the mset returned by a normal query) rset = xapian.RSet() for m in matches: rset.add_document(m[xapian.MSET_DID])
# This is the "Expansion set" for the search: the 10 most relevant terms eset = enquire.get_eset(10, rset) # Print it out. Note that some terms have a prefix from the database: can we # filter them out? Indeed: Xapian allow to give a filter to get_eset. # Read on... print print "Terms that could improve the search:", print ", ".join(["%s (%.2f%%)" % (res.term, res.weight) for res in eset])
class Filter(xapian.ExpandDecider): def __call__(self, term): "Return true if we want the term, else false" return term[:2] == "XT"
get_eset like above, but adding the filter, to show only a
suggestion of tags:
# This is the "Expansion set" for the search: the 10 most relevant terms that # match the filter eset = enquire.get_eset(10, rset, Filter()) # Print out the resulting tags print print "Tags that could improve the search:", print ", ".join(["%s (%.2f%%)" % (res.term[2:], res.weight) for res in eset]) sys.exit(0)
axi-query-expand.py --type=gui image editor
axi-query-expand.py --type=cmdline image editor
axi-query-expand.py --type=game image editor
you will see that as the results change, the suggestions change as well.
I'm happy to see that Xapian often suggests tags: this means that tags are
useful discriminators in search results, and that all the work done on Debtags
has been a good work.
Notice that the suggestions change as you change any of the terms, the custom
filter, and the tags you put in the search. Try to imagine how such a thing
could improve Synaptic. What if I told you that Xapian is fast enough that all
of this can happen live while you type?
Next in the series: searching for similar packages.
A while back I posted about a couple of my irritations with GNU Screen.
One of my irritations was the failure to reattach to sessions by name, if common prefixes were in use. For example with the following two (detached) sessions:
There are screens on:
24419.abc (Detached)
24395.abcd (Detached)
2 Sockets in /var/run/screen/S-skx.
The naive "screen -R abc" fails.
Yesterday whilst looking over the screen bug list I came up with a patch. It isn't ideal as it introduces a new failure case, but I believe it is a step in the right direction and better than the current situation. See attachment to #361274 for the code.
Also I patched screen so that #330036 is now fixed, and the blankerprg primitive works as expected.
Finally I closed #317450 (with a version) as it has been fixed since Etch.
Fun stuff.
In the spirit of completeness I should say I had a stab at #447210 which is tilde (~) expansion in the chdir primitive, but gave up after a while as the code got too messy even for me.
The trivial s/~/getenv("HOME")/ approach works fine for the simple case, but dealing with the expansion of strings such as ~foo/bar/ gets messy quickly. I can offer my patch if there is any interest though as a stop-gap measure.
Now I'm almost tempted to look over another package's bugs, but I think I'd rather eat pie & drink beer...
must. stop. talking. about. pies.
Update: Patch for tilde expansion submitted to #447210 - tested and seemed to cover all cases. Now time for beer!
GNU Screen rocks, in general, but recently I've been using it a lot for custom applications and have discovered a pair of annoying bugs.
If you're not familiar with it then please read this GNU Screen tutorial - it really is worth getting to know!
Anyway onto the bugs:
screen -S foo [detach] screen -S foo2 [detach]At this point you should have two screen sessions "foo" and "foo2". You should be able to attach to them by running "screen -R foo" or "screen -R foo2". Lets try that:
skx@vain:~$ screen -R foo
There are several suitable screens on:
22317.foo (Detached)
22342.foo2 (Detached)
Type "screen [-d] -r [pid.]tty.host" to resume one of them.
Even though foo should be sufficient to identify a unique screen, the first one, it doesn't let you attach. Nasty.
(Yes, you can attach to it if you use the number/number+name:
screen -R 22317.fooThe second issue is related. Create a screen session with "screen -S 222". Now try to attach to it with "screen -R 222" - instead of attaching it gives you a brand new screen. Ugh.
Both Sky and Setanta have had complaints
upheld against their adverts by
ASA
this week. Sky for misleading criticism
of Virgin Media's new-customer offers
(Sky runs new-customers offers too)
and Setanta for misleading advertising of
their Premiership football package
(or formally,
Sky's "ad breached CAP Code clauses 3.1 (Substantiation), 7.1 (Truthfulness), 15.1 (Prices) and 18.1 (Comparisons)"
and
Setanta's "ad breached CAP Code clause 7.1 (Truthfulness)"
).
But it's more interesting to look at who
made the complaints:-
"Sky TV believed the [Setanta] ad was misleading"but
"one complainant who was already a Sky customer"and
"an existing customer"were among the five complaints about Sky's ad. Sky's biggest critics seem to be their own customers. That's gotta hurt.
You know the problem? Something happens, and all your systems go
down—scheduled or otherwise. When you boot them up, one box is
faster than the other; and as a result, some network mounts don't really
work correctly. While this doesn't really happen at work, I've seen it
after a power failure at home.
I thought this was a feature that Windows had but Linux
doesn't. I really should've known better...
wouter@country:~$ mount /dev/hda5 on / type ext3 (rw,errors=remount-ro,commit=0) tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)(...)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev) automount(pid15173) on /autofs type autofs (rw,fd=5,pgrp=15173,minproto=2,maxproto=4) wouter@country:~$ ls /mnt/stuff(lots of private data snipped...)
wouter@country:~$ mount /dev/hda5 on / type ext3 (rw,errors=remount-ro,commit=0) tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)(...)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev) automount(pid15173) on /autofs type autofs (rw,fd=5,pgrp=15173,minproto=2,maxproto=4) goa:/stuff on /autofs/stuff type nfs (rw,addr=192.168.119.23)And after I wait a minute, that last line is gone. Automounters are cool. And not too hard to set up, either, if only a bit confusing at first. My /etc/auto.master contains the following (not counting commented-out examples):
/autofs /etc/auto.autofs --timeout=60I then need to have a directory /autofs, on which the automounter mounts a special filesystem if it's started; this is the "automount" in the above mount output. The autofs needs a second automounter map, which looks like this in my case:
cdrom -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom stuff -fstype=nfs goa:/stuff camerab -fstype=vfat,ro,umask=133,dmask=22 :/dev/disk/by-id/usb-GENERIC_USB_Storage-SDC_200606191719424ND-0:1-part1 floppy -fstype=auto :/dev/disk/by-id/usb-Y-E_DATA_USB_Floppy_DriveOccasionally, yes, from the above lines it can be inferred that this indeed also works for my USB floppy drive, my multicardreader, and my CD-ROM drive. Finally, I need a symlink into the automount filesystem, like so:
wouter@country:~$ ls -l /mnt/stuff lrwxrwxrwx 1 root root 13 2007-10-23 19:21 /mnt/stuff -> /autofs/stuffet voila: if I now try to access anything below /autofs/stuff, the automounter kicks in, transparently mounts the filesystem, and without any further delay or ado, I can get at my files. Well—unless the server is down, that is.
Belatedly,
as promised, here are the questions from
the floor at
last week's half-year meeting of the Co-operative Group Kennet and Avon area.
All errors and omissions are mine, of course.
You cannot store a CComPtr inside an STL list. You can, however, wrap it in a struct, and store that in the list.
Careful study of the error message led to the conclusion that apparently some STL implementations frown upon classes that provide an unary operator&.
Next.