Sunday, November 25, 2012

oracle ucm

  • Runs oracle db 11g XE on 10.10.1.158:1521. 
    • sudo /etc/init.d/oracle-xe start
    • netstat -anpt | grep 1521 to verify listener
    • put the following into .bashrc

      • . /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh
      • ORACLE_SID=XE
    • sqlplus 
      • use TNS defined in $ORACLE_HOME/network/admin/tnsnames.ora
      • sqlplus system/oracle or sqlplus dev_ocs/oracle 
        • select * from global_name (for db)
        • show user
  • creates a doamin ucm_domain
  • starts wls admin server: startWeblogic.sh
  • starts wls managed server for cs: startManagedLogic.sh UCM_server1 http://localhost:7001/


Friday, November 2, 2012

python for loop, iterator, iterable, generator


For Loop
 When Python executes the for loop, it first invokes the __iter__() method of the container to get the iterator of the container. It then repeatedly calls the next() method (__next__() method in Python 3.x) of the iterator until the iterator raises a StopIteration exception. Once the exception is raised, the for loop ends.

Generators can be thought of as resumable functions