Get form:

var oForm = document.getElementById('project-ae');

Browse through elements of a form:

          for (i = oForm.cost_object_category_id.options.length-1; i >= 0; i--) {
                oForm.cost_object_category_id.remove(i);
            }

Check existence of element:

if (document.getElementById("sideBarTab") != null) {
...
}

Get element:

document.getElementById('slave_content').style.visibility='visible';

Get element attribute:

document.getElementById('sidebar').getAttribute('savedHeight')

Inserting elements:

var node_insert_after=document.getElementById("slave");
var node_to_move=document.getElementById("fullwidth-list");
document.getElementById("monitor_frame").insertBefore(node_to_move, node_insert_after.nextSibling);

Get value of a drop down in a form:

var oForm = document.getElementById(‘project-ae’);
var company_id = oForm.elements["company_id"].options[oForm.elements["company_id"].selectedIndex].value;

Tausende von Ingenieuren beschäftigen sich mit dem Problem des Vibrierens im Auto verursacht durch den Verbrennungsmotor.
Ein Elektromotor hat dieses Problem praktisch nicht. – Wie sieht Dein Job in 10 Jahren aus?

Professionelle Intelligenz | Gunter Dueck auf der x mess from managementx on Vimeo.

The Flinch – But what if danger is exactly what you need?

http://www.amazon.com/The-Flinch-ebook/dp/B0062Q7S3S/ref=sr_1_4?s=digital-text&ie=UTF8&qid=1323208767&sr=1-4

Get ancestor:
select tree_ancestor_key('1000000000000000111010101100110000000000000000000000000100001001', 1);

Get level:
select tree_level('1000000000000000111010101100110000000000000000000000000100001001');

Get direct parent:

select
parent.project_id
from
im_projects parent,
im_projects child
where child.project_id = :project_id and
tree_ancestor_key(child.tree_sortkey, tree_level(child.tree_sortkey)-1) = parent.tree_sortkey

Links:
Using tree_sortkey for hierarchical queries in Postgres
OpenACS Doku: Hierarchical data

Prerequisites:

  • Make sure that user who runs nsd has write permissions of folder the PID is written to.
  • Existence of /etc/init.d/aolserver4-projop (see Ubuntu installer script on http://www.project-open.org)

a) Install monit
b) Adjust /etc/monit/monitrc
c) Create /etc/monit/conf.d/aolserver.monitrc

check process aolserver4-projop with pidfile /usr/lib/aolserver4/log/nspid.projop
      start program "/etc/init.d/aolserver4-projop start"
      stop program "/etc/init.d/aolserver4-projop stop"

d) Adjust /etc/default/monit:

startup=1

e) start

sudo /etc/init.d/monit start

Installation von PostgreSQL 8.2 from source:

psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket “/var/run/postgresql/.s.PGSQL.5432″?

http://askubuntu.com/questions/50621/cannot-connect-to-postgresql-on-port-5432

I would guess that the server is actually listening on the socket /tmp/.s.PGSQL.5432 rather than the /var/run/postgresql/.s.PGSQL.5432 that your client is attempting to connect to. This is a typical problem when using hand-compiled or third-party PostgreSQL packages on Debian or Ubuntu, because the source default for the Unix-domain socket directory is /tmp but the Debian packaging changes it to /var/run/postgresql.

Configure internet access (Minimal install VM images)

Setting WM Player

Set Network Connection of VM to: Bridged

In some cases you need to set the keyboard:

loadkeys de/es/fr ...

If you copied a VM you need to delete:

/etc/udev/rules.d/70-persistent-net.rules

and reboot:

reboot

Check if

ls /sys/class/net

list now eth0

Settings in VM

/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=localhost.localdomain
GATEWAY=192.168.1.1

/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT="yes"
BOOTPROTO="static"
IPADDR="192.168.1.39"
NETMASK="255.255.255.0"

/etc/resolv.conf
nameserver 192.168.1.1

Open Port 22:
iptables -A INPUT -p tcp --dport 22 -j ACCEPT

add /etc/init/aolserver.conf

# AOLServer

start on started sshd
stop on runlevel [016]

respawn
exec su -c "/usr/local/aolserver451/bin/nsd-postgres  -it /web/projop/etc/config.tcl" projop
initctl reload-configuration
initctl start aolserver

tcl: Continue line using backslash

Make sure there’s no backspace after the backslash !

OpenACS: Watch packages

  • AOLServer restart sets back watches
  • CVS settings (watch) could lead to additional dirs Base/Baseserv containing a second version of lib files

pgsql

# select project_id from im_projects where parent_id = NULL;
 project_id
------------
(0 rows)

# select project_id from im_projects where parent_id IS NULL;
 project_id
------------
      35116
      35417
(2 rows)


Location AOLServer:
./usr/local/aolserver451

Location tcl:
./usr/local/aolserver451/

----------------------------------------------------------------

export NS=/usr/local/aolserver451
export PG=/usr/lib/postgresql/8.2/

# Begin Compiling
echo Installing TCL 8.5.6
cd /usr/local/src/tcl8.5.6/unix
./configure --prefix=/usr/local/aolserver451/lib/tcl856 --with-encoding utf-8 --enable-threads --enable-symbols --enable-shared
make
make install
echo Installed TCL

echo Installing AOL Server
cd /usr/local/src/aolserver-4.5.1
./configure --prefix=/usr/local/aolserver451 --with-tcl=/usr/local/aolserver451/lib/tcl856/lib --enable-threads --enable-symbols
/usr/local/aolserver45/bin/tclsh8.4 nsconfig.tcl -debug -install /usr/local/aolserver451
make
make install
echo Installed AOL Server

echo Compiling other required modules
cd /usr/local/src/aolserver-4.5.1/nscache
make install NSHOME=/usr/local/aolserver451
echo Installed nscache

cd /usr/local/src/aolserver-4.5.1/nssha1
make install NSHOME=/usr/local/aolserver451
echo Installed nssha1

#cd /usr/local/src/aolserver-4.5.1/nsopenssl
#sudo make install OPENSSL=/usr/lib AOLSERVER=/usr/lib/aolserver4

cd /usr/local/src/aolserver-4.5.1/nspostgres
# make install POSTGRES=SEPARATELY PGINC=/usr/include/postgresql PGLIB=/var/lib/postgresql/8.2/main ACS=1 AOLSERVER=/usr/lib/aolserver4
# make install POSTGRES=SEPARATELY PGINC=/usr/include/postgresql PGLIB=/usr/lib/pgsql/ ACS=1 AOLSERVER=/usr/local/aolserver451
make install POSTGRES=SEPARATELY PGINC=/usr/local/pgsql/include/ PGLIB=/usr/local/src/aolserver-4.5.1/postgresql-8.2.19/src/interfaces/libpq ACS=1 AOLSERVER=/usr/local/aolserver451

make install POSTGRES=SEPARATELY PGINC=/usr/local/pgsql/include/ PGLIB=/usr/local/pgsql/lib ACS=1 AOLSERVER=/usr/local/aolserver451

cd /usr/local/src
tar xzvf tcllib-1.11.1.tar.gz
cd tcllib-1.11.1
./configure --prefix=/usr/local/aolserver451
make install
echo Installed TCL Lib

cd /usr/local/src/
tar xzvf xotcl-1.6.2.tar.gz
cd xotcl-1.6.2
./configure --enable-threads --enable-symbols --prefix=/usr/local/aolserver451 --exec-prefix=/usr/local/aolserver451 --with-tcl=/usr/local/aolserver451/lib/tcl856/lib
make
make install
echo Installed XOTcl

cd /usr/local/src/aolserver-4.5.1/tdom/unix
../configure --enable-threads --disable-tdomalloc --prefix=/usr/local/aolserver451 --exec-prefix=/usr/local/aolserver451 --with-aolserver=/usr/local/aolserver451 --with-tcl=/usr/local/aolserver451/lib/tcl856/lib
make install
echo Installed TDom

————————
Backup
————————
/etc/init.d/pound /etc/init.d/pound.bak
/etc/pound.cfg /etc/pound.cfg.bak

————————
Download 2.5
————————
wget http://www.invoca.ch/pub/packages/pound/RPMS/ils-5/SRPMS/pound-2.5-6.el5.src.rpm

————————
rebuild:
————————
cd /usr/src/redhat/SPECS
rpmbuild -bb package.spec

————————
Resolve dependencies:
————————
openssl-devel is needed by pound-2.5-6.i386
pcre-devel is needed by pound-2.5-6.i386

yum install …

————————
rebuild – 2nd try:
————————
rpmbuild –rebuild pound-2.5-6.el5.src.rpm

————————
Set up RPM rollback
————————

/etc/yum.conf add the line:
tsflags=repackage

/etc/rpm/macros add the line:
(create this file if it doesnt exist)
%_repackage_all_erasures 1

WATCH OUT:

————————
Remove pound 2.2
————————

(Note: Updating package [rpm -Uvh pound-2.5-6.i386.rpm ] resulted in two pound procesees )

Find package name [rpm -qa | grep -i pound ]
Delete package:
rpm -e pound-2.2-1.el5.rf

————————
Install pound 2.5
————————
cd /usr/src/redhat/RPMS/i386/
rpm -ivvh pound-2.5-6.i386.rpm

————————
Start pound
————————