Information Technology
Switcha över en fil till branch i subversion
1) Skapa en branch, t ex genom att skapa ett bibliotek någonstans på hårddisken och sedan importera det:
jorgen@computer:~$ mkdir jm20091111
jorgen@computer:~$ svn import jm20091111 https://svn.someserver/some.project/branches/
Committed revision 2683.
2) Gå till det bibliotek någonstans din utcheckade trunk, där filen som man vill jobba på i en branch ligger, Och kopiera över filen till branchen:
svn cp trickyModule.py https://svn.someserver/some.
3) Filen på disken på din dator är nu fortfarande i trunk, men man kan switcha över till kopian. Normalt jobbar switch på ett helt bibliotek, men man kan lägga på ett optional andra argument om man bara vill switcha en fil:
svn switch https://svn.someserver/some.
4) Kolla status:
svn st
S trickyModule.py
S betyder väl "switched" får man gissa. Alla ändringar i denna fil blir nu på commit skickade till den nya branchen (har kollat)
Run a plone zexp imported into a fresh Data.fs
Summary: You can't. The server will give an error. The trick is to create a bogus site in the new Zope server. This somehow modifies Zope, from what I have read on the Internet, the acl_users folder in the Zope root.
One of my hobby projects was not on our backup bandwagon, so when I accidentally corrupted Data.fs by overwriting it (the tar command is very picky it turns out about not mixing up source and destination file names) I was out of remedies. But luckily enough I had made a "site.zexp" a few days ago by exporting the site from within the Zope ZMI.
So, just delete the old Data.fs completely, start up the server and import the zexp. That works, but you cannot view any pages, you get AttributeError: getGroups . Googling I found a posting by Andreas Jung. Jung doesn't explicitly say it but writes:
Problem solved. The behavior is caused by the stupid expectation of Plone
that the root acl_users folder having been replaced with its own
implementation while creating a new site
...and from there it was possible to deduce that creating a new bogus site from within the ZMI should do the trick. And this can be done after the import.
Make rdiff-backup use a different port for ssh
Summary:
rdiff-backup --remote-schema "ssh -C -p9222 %s rdiff-backup --server"
username@remoteserver::/path_to/filestobackup
/path_to/backedupfiles
...worked for me, to backup a remote server via a non standard ssh port (9222 in the above example). Note the double quotes around the string following --remote-schema. All examples I could find on the Internet used single quotes, and using rdiff-backup 1.2.8 between two CentOS 5 machines, this did not work.
Get Spotify working with PulseAudio on Ubuntu Linux
I had problems getting Spotify to work under Ubuntu and Wine, with a Microsoft LifeChat LX-3000 headset. The sound chopped 2-3 times per second.
Using OSS and normal Wine worked fine with the internal sound card of the laptop, but not with the USB headset.
I found this discussion thread and tried different remedies. The one that worked was Neil Wilson's fork of Wine, WinePulse, with support for PulseAudio.
You can update your system with unsupported packages from this untrusted PPA by adding ppa:neil-aldur/ppa to your system's Software Sources. Not using Ubuntu 9.10 (karmic)?
Läs mer: Release Packages : Neil Wilson
Brian Eno om slutet på musikindustri-eran
"I think records were just a little bubble through time and those who made a living from them for a while were lucky. There is no reason why anyone should have made so much money from selling records except that everything was right for this period of time. I always knew it would run out sooner or later. It couldn't last, and now it's running out. I don't particularly care that it is and like the way things are going. The record age was just a blip. It was a bit like if you had a source of whale blubber in the 1840s and it could be used as fuel. Before gas came along, if you traded in whale blubber, you were the richest man on Earth. Then gas came along and you'd be stuck with your whale blubber. Sorry mate – history's moving along. Recorded music equals whale blubber. Eventually, something else will replace it."
Läs mer: On gospel, Abba and the death of the record: an audience with Brian Eno | Interview | Music | The Observer
Harvard: IT gör inte 4000 sjukhus effektivare
När man inför ett IT-system, eller byter till ett nytt IT-system, så är det lätt hänt att man cementerar dåliga arbetsvanor och strukturer genom att stadfästa dem i programkod. Dessutom kan sidoeffekter av datoriseringen öka kostnaderna. Datorer är inflexibla jämfört med människor och mycket möda kan spillas på att jobba runt dem. Jag tror detta är orsakerna till att Harvard Medical School i en rapport kommit fram till att IT-system inte varit kostnadseffktiva i vården i snitt, sett över 4000 amerikanska sjukhus.
The recently released study evaluated data on 4,000 hospitals in the U.S over a four-year period and found that the immense cost of installing and running hospital IT systems is greater than any expected cost savings. And much of the software being written for use in clinics is aimed at administrators, not doctors, nurses and lab workers. The study comes as the federal government prepares to begin dispensing $19 billion in incentives for the health industry to roll out electronic health records systems. Beginning in 2011, the Health Information Technology for Economic and Clinical Health (HITECH) Act will provide incentive payments of up to $64,000 for each physician who deploys an electronic health records system and uses it effectively.
Läs mer: Harvard study: Computers don't save hospitals money
Undrar vad .se:s DNS-fel kostat i Sverige?
Under senkvällen har det varit svårt att komma in på svenska sajter, fortfarande (01:00) kan jag t ex inte komma in på dustin.se eller ticketbox.se. Båda sajterna lever ju på online-handel så där måste en rejäl förlust ha gjorts, och om man sedan räknar in alla andra sajter som slutar på .se och som varit svåråtkomliga så blir det nog en rund summa. Men man får väl se det från den ljusa sidan, det är ju inte som när sidekickanvändarna (en smartphone) på T-Mobiles nät i USA fick reda på att alla deras data är raderad. Permanent. Ingen backup. Det kördes på Micosoft Danger-plattformen (som egentligen inte är så microsoftig utan inköpt). Man men tycker kanske att namnet Danger var lite väl välfunnet givet utvecklingen.
Och när jag nu ska pinga in denna bloggpost till Twingly så kommer jag inte åt twingly.se!
– Det måste ha kommit igenom en bugg i vårt system som ledde till att vi skickade ut felaktig information. Vi såg det på en gång, säger Danny Aerts, vd för .SE, till TT sent på måndagskvällen. Han säger att felet inträffade vid 22-tiden. Och det ledde direkt till stora svårigheter att komma in på webbsidor där adressen slutar med .se.
Läs mer: Stora internetproblem för Sverige - DN.se
Well, this is shaping up to be one of the biggest disasters in the history of cloud computing, and certainly the largest blow to Danger and the Sidekick platform: T-Mobile's now reporting that personal data stored on Sidekicks has "almost certainly has been lost as a result of a server failure at Microsoft/Danger."
Läs mer: T-Mobile: we probably lost all your Sidekick data
Av okänd anledning lades det till ett extra.se i slutet på webbadresserna. - Vi vet inte hur det här kunde inträffa, men det ska vi utreda, säger Danny Aerts.
Läs mer: Stora internetproblem för Sverige | Inrikes | SvD
Play .3gp mobile phone video files with sound on Ubuntu
3gp files are video files used by many mobile phones. It is notoriously difficult to get this to work on Linux, especially completely "free" Linuxes, due to restrictions on the amr format used for the sound.
This guide is for Ubuntu 9.04, may work on other versions. There may be extraneous steps here below.
1. Add medibuntu to your list of repositories. Follow the guide here.
2. Start Synaptic. Reload the sources on Synaptic
3. Quit synaptic
4. Rebuild the text index of Synaptic so that it can find the new packages (cred goes here):
sudo update-apt-xapian-index
5. Start synaptic again
6. Uninstall mplayer if it is already installed
7. Install w32 codecs
8. Install the following codecs:

(some of these might be overkill, for example the dev libs, but at this step I wasn't sure if any later step would entail compilation))
9. Install mplayer again
10. install smplayer (a GUI front end to mplayer)
11. Navigate to your 3gp file in Gnome, right click it and select to Open it with SMPlayer
12. Now there should be sound
Clone & max out resolution on both screen-projector in Linux
Summary: Use
sudo xrandr --output VGA --pos 0x0
If your projector is called VGA. Read on for more detailed info
How to clone your screen with a projector, when they have different resolutions
I have a Dell vostro 1015 laptop with a resolution of 1366x768 pixels, and an Epson Emp-tw420 projector with a resolution of 1280x720 pixels. I run Ubuntu 9.04. Problem is when I hold a presentation I want to clone the screen of the laptop to the projector, and a negotiation starts and I end up with a measly 1024x768 on both screens. This is the highest resolution that both screens support. It is a waste of pixels especially on the projector's side.
The solution is to tell Ubuntu to have both screens active side by side (or one above the other), and set the maximum resolution of each and then use the xrandr utility to set both screen to start at the the top left (0x0).
If you type xrandr in a terminal you will get information on both screens and one will have an offset, expressed something like:
VGA connected 1280x720+1366x0
In this case VGA is the name it has given to my projector, 1280x720 is the resolution and 1366x0 is the offset of the screen. the trick is to move the offset to 0x0 so that the screens show the same thing. You do this if your projector is called VGA with:
sudo xrandr --output VGA --pos 0x0
So now I have the same output on both screens at full resolution. The projector does not show the rightmost 86 pixels and the lowermost 48 pixels of the laptop's screen. But that is quite OK as long as I do not need to run in 1024x768.
You could probably achieve this in xorg. conf but the above command is convenient as is. I had to manually set the aspect ratio to wide on the Epson projector afterwards.
Review Dell Vostro 1015
Summary
The Dell Vostro 1015 is a capable machine with
- a good screen
- good battery life (according to Dell, not according to me, if you get the small battery)
- good connectivity
- a good webcam
- a good price,
... but is somewhat let down by its substandard keyboard and touchpad.
Keyboard and touchpad
+

The keyboard is the part of the 1015 that I least agree with so far. It flexes in the middle a bit, mushy in feel, but the tops of the keys are spaced ok with a gap in between them. The Pg Up and Pg Down keys are awkwardly placed; they are in a column with Home above and End below them. I would have preferred them to be positioned left and right of the up arrow key instead. Keys are a bit unresponsive and some key presses of mine are not recorded as I type if I type with a light touch. No back lighting of the keys.

The touchpad is too small and has a scroll function along the right and bottom edges that I don't agree with. This scroll functionality can be shut off in the OS, but I would have preferred the scroll strips to be separated from the touch pad, and in the best of worlds, I would like to do apple style finger combinations on the touch pad.
Update: I have just enabled software in Ubuntu Linux on the machine, that allows multi touch with two finger scrolling, yay!.
Connectivity 



- Bluetooth
- 4 USB ports
- VGA
- Wireless
- Gbit Ethernet
- 56K modem
- IEE1394 (Firewire)
- ExpressCard slot
...are all Included but no HDMI, and the wireless does not handle 802.11n draft. There is also a built in web cam with a generous 2mpix resolution, and it gives sharp video. 4 star rating due to inclusion of Firewire and Bluetooth on such a cheap laptop and a decent resolution on the web cam.
Ports 


Left hand side ports: VGA (outside of picture), Ethernet and two of the USB ports. The ExpressCard port cover has the blue LEDs for power, networking. Bluetooth and hard disk activity shining through it from the front. BTW manufacturers, go back to red LEDs, they are much less intrusive in the dark
There are no connectors on the back side. Instead they are on the left, right and front edges which I believe is par for the course nowadays. Placing them along both sides means you get locked in by cables while sitting. As an example the power cord is on the right hand side and the Ethernet cord on the left hand side. So when you stand up, lifting the laptop out of your lap, you're trapped. If the VGA port on the left hand side traded places with the power connector's, 90% of the time you could have all cables on the left hand side only. The sound connectors are in the front which means when connected, the cable connectors poke into your belly.
Screen 

+
The only reliable high contrast screen laptop manufacturers are Apple and Sony, but Dell often has very good brightness and contrast on their laptops (see notebookcheck.net). The screen of the 1015 is bright, but I suspect the contrast is just OK. The vertical viewing angle is narrow. Contrast trick: tilting the screen slightly away seems at least subjectively to increase contrast and there is enough brightness anyway. The screen is not blank but instead has a matte surface, so no glare from light sources behind you. The screen is fairly low resolution at 1280x800 1366x768. The store where I bought it lists the resolution as 1280x800 on their site, but the xrandr program on my machine reports it to be 1366x768 pixels. This gives it a 16:9 aspect ratio, which is the HDTV aspect ratio.
Battery life ?
According to Dell it has a good battery life, but on Ubuntu Linux I get about 90 minutes which is not so good. That is with the 4 cell battery and with full backlighting and WiFi and Bluetooth switched on, no DVD activity. Linux is known to be much worse at power consumption so possibly the battery life would be better under Windows, something I have not tried. The Linux program dmidecode reports the battery to have a 22Wh capacity which is kind of on the low side for a battery in a laptop. Dell Sweden does not carry the 1015 at all, Dell UK carries it but not the batteries, but on the Dell US site one can see that the 6 cell battery at 48Wh, has more than double the capacity of the 4 cell. Some versions odf the 1015 ship with a 6 cell battery.
Verdict
It is cheap, especially with a low end processor like the Celeron-equipped one that I bought. If you tolerate the keyboard and touchpad it is a good buy.
I got mine pre-built from a third party since I needed it urgently and there was a significant difference in price in that store up to the C2D. Had I had the time to order one custom built directly from Dell it would have been with a C2D and bigger battery. Actually after looking at the Swedish Dell store I see that they do not carry the 1015. How odd. Dell UK seems to carry it and judging from the hits on this article my guess it is also available in Germany, Poland and India (but I haven't checked).
Had I gone with the more expensive pre-built C2D I probably would have been irritated with the mushy keyboard for the price so I made the right call. Again for the price the screen is quite good. I have had it a week now, and so far it delivers for the price. The Celeron model I got was as noted pre-built and has the small 4-cell battery and I have not had time to check how long the battery lasts on Windows (I am chiefly running Linux on it which may shorten battery life compared to Windows).