Problem:list of elements, one is unique, others always in pairs, find unique
python color.py nbNodes nbEdges dotFileName
Observer sniffing a particular attribute from Observable class. This little spy is notified every time watched attribute is changing its value.
Observers are hold in weakref.WeakValueDictionary to avoid crashes in case they would disappear (i.e. being collected and deleted by gc). And here is the source code:
sudo yum install yum install mesa-dri-drivers-experimental xorg-x11-drv-nouveau \
compiz-fusion compiz-fusion-extras compiz-fusion-extras-gnome \
compizconfig-backend-gconf compizconfig-python \
emerald emerald-themes fusion-icon fusion-icon-qt \
libcompizconfig protobuf
Name: whatever, Fusion Icon
Application: fusion-icon --force
#
# Example configuration to enable HTTP access for a directory
# containing Subversion repositories, "/var/www/svn". Each repository
# must be both:
#
# a) readable and writable by the 'apache' user, and
#
# b) labelled with the 'http_sys_content_rw_t' context if using
# SELinux
#
#
# To create a new repository "http://localhost/repos/stuff" using
# this configuration, run as root:
#
# # cd /var/www/svn
# # svnadmin create stuff
# # chown -R apache.apache stuff
# # chcon -R -t http_sys_content_t stuff
chcon -R -t http_sys_content_rw_t stuff
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
<Location /repos>
DAV svn
SVNParentPath /var/www/svn
AuthzSVNAccessFile /var/svn/svnauth
SSLRequireSSL
Order deny,allow
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /var/svn/passwd
Require valid-user
</Location>
## logger for svn: /var/log/httpd/svn_log
CustomLog logs/svn_log "%t %u %{SVN-ACTION}e" env=SVN-ACTION
# for 1st user we're creating a file (-c) and choose MD5 encryption (-m)
sudo htpasswd -cm /var/svn/passwd cibak
New password: xxxxx
Retype new password: xxxxx
Adding password for user cibak
# all the others users only added with the same encryption
sudo htpasswd -m /var/svn/passwd jack
...
...
sudo chcon -t httpd_sys_content_t /var/svn/passwd
sudo svnadmin create /var/www/svn/myrepo
sudo chown -R apache:apache /var/www/svn/myrepo
sudo chcon -R -t http_sys_content_rw_t /var/www/svn/myrepo
# cibak has read-write rights to the whole repository, jack could only read
[myrepo:/]
cibak = rw
jack = r
# but jack is able to write in his own directory
[myrepo:/jack]
jack = rw
sudo chcon -t httpd_sys_content_t /var/svn/svnauth
sudo /etc/init.d/./httpd restart