
I am going to Desktop Summit. Actually, I have already arrived in Berlin.
At the summit, I will mostly follow the Platform track (Rm2002) and then try to participate in BoFs.

#!/usr/bin/python
import urllib2
import sys
import socket
def download(url, fname):
net = urllib2.urlopen(url)
f = open(fname, "wb")
while True:
data = net.read(4096)
if not data:
break
f.write(data)
net.close()
f.close()
if __name__ == "__main__":
if len(sys.argv) != 3:
print "Usage: download.py URL filename"
url = sys.argv[1]
fname = sys.argv[2]
socket.setdefaulttimeout(30)
download(url, fname)
def download(url, fname):
net = urllib2.urlopen(url)
contentlen = net.info().get("Content-Length", "")
f = open(fname, "wb")
datalen = 0
while True:
data = net.read(4096)
if not data:
break
f.write(data)
datalen += len(data)
net.close()
f.close()
try:
contentlen = int(contentlen)
except ValueError:
contentlen = None
if contentlen is not None and contentlen != datalen:
raise urllib2.URLError("Incomplete download")
[Unit] Description=Virtual Distributed Ethernet [Service] ExecStart=/usr/bin/vde_switch --tap tap0 --mode 0660 \ --dirmode 0750 --group qemu [Install] WantedBy=multi-user.target
[Unit] Description=Virtual Distributed Ethernet [Service] Type=forking # The PID file is optional, but recommended in the manpage # "so that systemd can identify the main process of the daemon" PIDFile=/var/run/vde.pid ExecStart=/usr/bin/vde_switch --tap tap0 --mode 0660 \ --dirmode 0750 --group qemu \ --daemon --pidfile /var/run/vde.pid [Install] WantedBy=multi-user.target
[Unit] Description=Virtual Distributed Ethernet After=syslog.target [Service] Type=forking PIDFile=/var/run/vde.pid ExecStart=/usr/bin/vde_switch --tap tap0 --mode 0660 \ --dirmode 0750 --group qemu \ --daemon --pidfile /var/run/vde.pid Restart=on-abort [Install] WantedBy=multi-user.target
home ~ # systemctl start vde.service
home ~ # systemctl status vde.service
vde.service - Virtual Distributed Ethernet
Loaded: loaded (/etc/systemd/system/vde.service)
Active: active (running) since Tue, 04 Jan 2011 22:08:10 +0500;
15s ago
Process: 31434 (/usr/bin/vde_switch --tap tap0...,
code=exited, status=0/SUCCESS)
Main PID: 31435 (vde_switch)
CGroup: name=systemd:/system/vde.service
└ 31435 /usr/bin/vde_switch --tap tap0...
home ~ # kill -SEGV 31435
home ~ # systemctl status vde.service
vde.service - Virtual Distributed Ethernet
Loaded: loaded (/etc/systemd/system/vde.service)
Active: failed since Tue, 04 Jan 2011 22:11:27 +0500;
4s ago
Process: 31503 (/usr/bin/vde_switch --tap tap0...,
code=exited, status=0/SUCCESS)
Main PID: 31504 (code=exited, status=1/FAILURE)
CGroup: name=systemd:/system/vde.service
Jan 4 22:11:27 home vde_switch[31504]: Error in pidfile creation: File exists
[Unit] Description=Virtual Distributed Ethernet After=syslog.target [Service] Type=forking PIDFile=/var/run/vde.pid # Note the -f: don't fail if there is no PID file ExecStartPre=/bin/rm -f /var/run/vde.pid ExecStart=/usr/bin/vde_switch --tap tap0 --mode 0660 \ --dirmode 0750 --group qemu \ --daemon --pidfile /var/run/vde.pid Restart=on-abort [Install] WantedBy=multi-user.target
[Unit] Description=Virtual Distributed Ethernet After=syslog.target [Service] Type=forking ExecStart=/usr/bin/vde_switch --tap tap0 --mode 0660 \ --dirmode 0750 --group qemu \ --daemon Restart=on-abort [Install] WantedBy=multi-user.target
# load the tun module
VDE_MODPROBE_TUN="yes"
# virtual tap networking device to be used for vde
VDE_TAP="tap0"
# mode and group for the socket
VDE_SOCK_CHMOD="770"
VDE_SOCK_CHOWN=":qemu"
# This is the actual options string passed to VDE.
# Change this at your own risk.
VDE_OPTS="--tap ${VDE_TAP} -daemon"
VDE_OPTS="--tap tap0 --mode 0660 --dirmode 0750 --group qemu"
[Unit] Description=Virtual Distributed Ethernet After=syslog.target [Service] Type=forking EnvironmentFile=/etc/conf.d/vde2 ExecStart=/usr/bin/vde_switch --daemon $VDE_OPTS Restart=on-abort [Install] WantedBy=multi-user.target
VDE_OPTS=--tap tap0 --mode 0660 --dirmode 0750 --group qemu
domain members.linode.com search members.linode.com nameserver 109.74.194.20 nameserver 109.74.192.20 nameserver 109.74.193.20
mysql> create table test (field float);
mysql> insert into test(field) values(0.3);
mysql> select * from test;
+-------+
| field |
+-------+
| 0.3 |
+-------+
1 row in set (0.00 sec)
mysql> select * from test where field = 0.3;
Empty set (0.00 sec)
mysql> select cast(field as decimal(15,15)) from test; +-------------------------------+ | cast(field as decimal(15,15)) | +-------------------------------+ | 0.300000011920929 | +-------------------------------+ 1 row in set (0.00 sec) mysql> select cast(0.3 as decimal(15,15)); +-----------------------------+ | cast(0.3 as decimal(15,15)) | +-----------------------------+ | 0.300000000000000 | +-----------------------------+ 1 row in set (0.00 sec)
A[N] = sentinel;
index = 0;
while (A[index + 1] <= X)
++index;
int bit = N >> 1; /* N is a power of two */
index = 0;
while (bit != 0) {
if (A[index + bit] <= X)
index += bit;
bit >>= 1;
}