<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8736456097716443793</id><updated>2012-01-19T12:07:38.285-08:00</updated><category term='Linux / Unix'/><category term='fun'/><category term='UCM'/><category term='ldap'/><category term='Database'/><category term='Javascript / AJAX'/><category term='pl/sql and sql'/><category term='Web'/><title type='text'>The Oracle Mack</title><subtitle type='html'>Tech Trips.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://oramack.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://oramack.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>faomac</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>17</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8736456097716443793.post-7230760704203197987</id><published>2011-08-04T01:17:00.000-07:00</published><updated>2011-08-04T01:48:53.912-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pl/sql and sql'/><title type='text'>SQL: date datatypes &amp; milliseconds</title><content type='html'>This morning I was playing with dates while executing an anonymous plslq block from a java class. My goal was to trace the execution time of a class... including milliseconds.&lt;br /&gt;&lt;br /&gt;The well known SYSDATE use the "DATE" datatype but from oracle 9i we can use SYSTIMESTAMP (using "TIMESTAMP" datatype):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SELECT &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   to_char(sysdate, 'YYYY:MM:DD:HH24:MI:SS') &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  ,to_char(systimestamp, 'YYYY:MM:DD:HH24:MI:SS.FF6')&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;FROM dual&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;when using TIMESTAMP the comparison can be made through TO_TIMESTAMP (or TO_TIMESTAMP_TZ if having more than one zone field, TZ_OFFSET for getting the region time delay)&lt;br /&gt;&lt;br /&gt;so... why we still have to use sysdate?&lt;br /&gt;Because we can configure what is returned from the SYSDATE function modifing the "fixed_date" init parameter; I found it very usefull when testing application that are date-related.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ALTER SYSTEM SET FIXED_DATE = '2011-01-01-00:00:01';&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;System altered.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;select sysdate from dual;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SYSDATE&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;-----------&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;01-JAN-2011&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;select systimestamp from dual;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SYSTIMESTAMP&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;08-JUL-2011 11.05.02.298000 AM&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8736456097716443793-7230760704203197987?l=oramack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oramack.blogspot.com/feeds/7230760704203197987/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8736456097716443793&amp;postID=7230760704203197987' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/7230760704203197987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/7230760704203197987'/><link rel='alternate' type='text/html' href='http://oramack.blogspot.com/2011/08/sql-date-datatypes-milliseconds.html' title='SQL: date datatypes &amp; milliseconds'/><author><name>faomac</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8736456097716443793.post-2672646952274301883</id><published>2011-06-15T04:07:00.000-07:00</published><updated>2011-06-15T04:21:28.595-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><title type='text'>Adobe LiveCycle vs. Chrome</title><content type='html'>While developing a new UCM service showing an in-line view of some loaded PDF documents, I discovered that Chrome uses the "Chrome PDF Viewer" proprietary plugin.&lt;br /&gt;&lt;br /&gt;My goal was to force the official Adobe plugin for viewing my LiveCycle encrypted PDF.&lt;br /&gt;Here's what I've done:&lt;br /&gt;- open chrome;&lt;br /&gt;- in the Chrome address bar, type "chrome://plugins";&lt;br /&gt;- click "Disable" on the "Chrome PDF Viewer" plugin;&lt;br /&gt;- close chrome;&lt;br /&gt;- install Acrobat reader 10.1 (the only version i found fully functional with Chrome and LiveCycle);&lt;br /&gt;- open chrome;&lt;br /&gt;- enable the "Adobe Acrobat - Version: 10.1.X.X" plugin ("chrome://plugins");&lt;br /&gt;&lt;br /&gt;done.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8736456097716443793-2672646952274301883?l=oramack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oramack.blogspot.com/feeds/2672646952274301883/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8736456097716443793&amp;postID=2672646952274301883' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/2672646952274301883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/2672646952274301883'/><link rel='alternate' type='text/html' href='http://oramack.blogspot.com/2011/06/adobe-livecycle-vs-chrome.html' title='Adobe LiveCycle vs. Chrome'/><author><name>faomac</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8736456097716443793.post-8752489951371083585</id><published>2011-03-21T05:44:00.000-07:00</published><updated>2011-03-21T05:50:48.569-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><title type='text'>Quarantine JDeveloper?</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-yidxcfh_4KI/TYdI_MfJPWI/AAAAAAAAAE8/IiR4qQElOa8/s1600/40ine.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 227px;" src="http://3.bp.blogspot.com/-yidxcfh_4KI/TYdI_MfJPWI/AAAAAAAAAE8/IiR4qQElOa8/s320/40ine.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5586514113297202530" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Funny... AVG finds Jdev contains a malware!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8736456097716443793-8752489951371083585?l=oramack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oramack.blogspot.com/feeds/8752489951371083585/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8736456097716443793&amp;postID=8752489951371083585' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/8752489951371083585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/8752489951371083585'/><link rel='alternate' type='text/html' href='http://oramack.blogspot.com/2011/03/quarantine-jdeveloper.html' title='Quarantine JDeveloper?'/><author><name>faomac</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-yidxcfh_4KI/TYdI_MfJPWI/AAAAAAAAAE8/IiR4qQElOa8/s72-c/40ine.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8736456097716443793.post-8742289119802560105</id><published>2011-02-25T15:43:00.000-08:00</published><updated>2011-02-25T15:57:39.785-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UCM'/><title type='text'>UCM: default datepicker with idoc</title><content type='html'>If you need to include a datepicker in a page template or in an hcsp and you won't use jquery, you can use the default UCM calendar with datepicker.&lt;br /&gt;Check the following code as an example:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;FROM:&amp;lt;input type="text" id="calendarFrom" /&amp;gt;&lt;br /&gt;&amp;lt;img onClick="javascript:  pucToggleCalendar('calendarFrom');" border="0" style="cursor: pointer; cursor:hand; vertical-align: middle;" src="images/PopUpCalendar/calendar.png"/&amp;gt;&lt;br /&gt;&lt;br /&gt;TO:&amp;lt;input type="text" id="calendarTo"&amp;gt;&lt;br /&gt;&amp;lt;img onClick="javascript:  pucToggleCalendar('calendarTo');" border="0" style="cursor: pointer; cursor:hand; vertical-align: middle;" src="images/PopUpCalendar/calendar.png"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;pucCreateCalendar({ id: "calendarFrom",caption: "From date"}, "calendarFrom");&lt;br /&gt;pucCreateCalendar({ id: "calendarTo",caption: "To date"}, "calendarTo");&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Pay attention to include "&lt;b&gt;std_checkin_html_head_declarations&lt;/b&gt;" in your template ; the static javascript code (with the "&lt;span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: Verdana, Arial, sans-serif; font-size: 13px; line-height: 16px; "&gt;pucToggleCalendar" function&lt;/span&gt;) used to create the popup is included in that resource:&lt;br /&gt;&lt;br /&gt;&amp;lt;$include std_checkin_html_head_declarations$&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8736456097716443793-8742289119802560105?l=oramack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oramack.blogspot.com/feeds/8742289119802560105/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8736456097716443793&amp;postID=8742289119802560105' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/8742289119802560105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/8742289119802560105'/><link rel='alternate' type='text/html' href='http://oramack.blogspot.com/2011/02/ucm-default-datepicker-with-idoc.html' title='UCM: default datepicker with idoc'/><author><name>faomac</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8736456097716443793.post-267374777160920364</id><published>2011-02-25T14:49:00.000-08:00</published><updated>2011-02-25T15:54:19.901-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux / Unix'/><title type='text'>Linux: boot with terminal</title><content type='html'>I've just finished installing "stuff" on a VM with Oracle Enterprise Linux and I need to configure the machine without the resource consuming X11 automatically loaded at startup.&lt;br /&gt;&lt;br /&gt;The Linux boot process has six states of operation of which "0" is the shutdown state and "3" and above are fully operational with all essential processes running for user interaction. The init process is the last step of the boot procedure and it is identified by process with id=1; Init is responsible for starting system processes as defined in the "/etc/inittab" file.&lt;br /&gt;&lt;br /&gt;Editing the inittab file, I changed the default line:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new'; "&gt;id:5:initdefault:&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;with the following:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new'; "&gt;   id:3:initdefault:&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;Here there are the available states:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;0  halt system (loaded the /etc/rc.d/rc0.d/ library)&lt;br /&gt;1  single user (/etc/rc.d/rc1.d/)&lt;br /&gt;2  multiuser with no network (...2.d)&lt;br /&gt;3  terminal&lt;br /&gt;4  reserved for local use&lt;br /&gt;5  X11 GUI mode&lt;br /&gt;6  reboot&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After startup type "starx" or "init 5" to enter X11.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8736456097716443793-267374777160920364?l=oramack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oramack.blogspot.com/feeds/267374777160920364/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8736456097716443793&amp;postID=267374777160920364' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/267374777160920364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/267374777160920364'/><link rel='alternate' type='text/html' href='http://oramack.blogspot.com/2011/02/linux-boot-with-terminal.html' title='Linux: boot with terminal'/><author><name>faomac</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8736456097716443793.post-5614119331371425114</id><published>2011-02-06T08:26:00.000-08:00</published><updated>2011-02-06T08:38:59.761-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ldap'/><title type='text'>WLS: embedded LDAP client access</title><content type='html'>To view the entries of the embedded LDAP server through an LDAP client browser, first of all you have to change the embedded LDAP credentials:&lt;br /&gt;&lt;br /&gt;1. Access WLS admin console&lt;br /&gt;2. Expand the Domain node.&lt;br /&gt;3. Select the Security--&gt;Embedded LDAP tab.&lt;br /&gt;4. Change the Credential attribute from its generated value to a new password&lt;br /&gt;5. Click SAVE.&lt;br /&gt;6. At last, reboot WebLogic Server.&lt;br /&gt;&lt;br /&gt;Now configure a new connection in the LDAP browser (as a suggestion, I use Apache Directory Studio based on Eclipse).&lt;br /&gt;&lt;br /&gt;Use the http server port 7001 (7002 if SSL is being used), "dc=[UCM_DOMAIN_NAME]" as the base dn, cn=Admin as the ldap administration user with the newly created password.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8736456097716443793-5614119331371425114?l=oramack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oramack.blogspot.com/feeds/5614119331371425114/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8736456097716443793&amp;postID=5614119331371425114' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/5614119331371425114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/5614119331371425114'/><link rel='alternate' type='text/html' href='http://oramack.blogspot.com/2011/02/wls-embedded-ldap-client-access.html' title='WLS: embedded LDAP client access'/><author><name>faomac</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8736456097716443793.post-4035556128649752310</id><published>2010-04-08T09:08:00.000-07:00</published><updated>2010-04-08T09:10:01.925-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UCM'/><title type='text'>UCM: Rules and Profiles metadata</title><content type='html'>UCM do not store metadata of Rules and Profiles. To obtain those information you need to use IdcServices (or parse the rules/profiles HDA files).&lt;br /&gt;&lt;br /&gt;Following a list of sample URLs:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;All  profiles:&lt;br /&gt;&lt;br /&gt;http://HOSTNAME:PORT/idc/idcplg?IdcService=GET_DOCPROFILES&amp;IsSoap=1&lt;br /&gt;&lt;br /&gt;Rules vs single Profile:&lt;br /&gt;&lt;br /&gt;http://HOSTNAME:PORT/idc/idcplg?IdcService=GET_DOCPROFILE&amp;dpName=PROFILE_NAME&amp;IsSoap=1&lt;br /&gt;&lt;br /&gt;All rules:&lt;br /&gt;&lt;br /&gt;http://HOSTNAME:PORT/idc/idcplg?IdcService=GET_DOCRULES&amp;IsSoap=1&lt;br /&gt;&lt;br /&gt;Attributes of a single rule:&lt;br /&gt;&lt;br /&gt;http://HOSTNAME:PORT/idc/idcplg?IdcService=GET_DOCRULE&amp;dpRuleName=RULE_NAME&amp;IsSoap=1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8736456097716443793-4035556128649752310?l=oramack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oramack.blogspot.com/feeds/4035556128649752310/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8736456097716443793&amp;postID=4035556128649752310' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/4035556128649752310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/4035556128649752310'/><link rel='alternate' type='text/html' href='http://oramack.blogspot.com/2010/04/ucm-rules-and-profiles-metadata.html' title='UCM: Rules and Profiles metadata'/><author><name>faomac</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8736456097716443793.post-6288825932116817215</id><published>2010-04-08T09:03:00.000-07:00</published><updated>2010-04-08T09:07:24.085-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UCM'/><title type='text'>UCM: Modify the check-in menu</title><content type='html'>To modify the "New check in" menu structure in UCM you have to customize the dynamic include "custom_finish_layout_init" using component wizard.&lt;br /&gt;&lt;br /&gt;After creating the new resource and the new include use the javascript "&lt;strong&gt;navBuilder&lt;/strong&gt;" object to modify the structure of the menu; use "navBuilder.getNodeById("NEW_CHECK_IN").childNodes" method to search the leafs of the node.&lt;br /&gt;&lt;br /&gt;The leaf IDs of the new check in menu are usually named "&lt;strong&gt;MY_PERSONAL_CHECKINS_[n]&lt;/strong&gt;" (with n starting from 0).&lt;br /&gt;&lt;br /&gt;&lt;div class="graydiv" style="overflow: scroll; height: 200px;"&gt;&lt;br /&gt;&lt;$include super.custom_finish_layout_init$&gt;&lt;br /&gt;APChilds = new Array();&lt;br /&gt;ARChilds = new Array();&lt;br /&gt;var children = navBuilder.getNodeById("NEW_CHECK_IN").childNodes;&lt;br /&gt;for (var i = 0; i &lt; children.length; i++)&lt;br /&gt;{&lt;br /&gt;  TEXT =  children[i].getAttribute("label") ;  &lt;br /&gt;  if (TEXT.match(/\bAR\b/i) != null) &lt;br /&gt;  {     arrLength =ARChilds.push(children[i].getAttribute("id"));  } &lt;br /&gt;  if (TEXT.match(/\bAP\b/i) != null) {  &lt;br /&gt;        arrLength =APChilds.push(children[i].getAttribute("id"));  }}&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Then you can add new nodes or collections using:&lt;br /&gt;&lt;br /&gt;navBuilder.addChildNodeTo("NEW_CHECK_IN","collection","id==ACCOUNT_PAYABLES","label==Account payables","url==");&lt;br /&gt;&lt;br /&gt;navBuilder.addChildNodeTo("NEW_CHECK_IN","item","id==ACCOUNT_PAYABLES","label==Account payables","url==http://oramack.blogspot.com");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If trying to add a new collection you can choose the position of the leaf specifying the sibling node:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;navBuilder.addPrevSiblingNodeTo("MY_PERSONAL_CHECKINS_0","collection","id==ACCOUNT_RECEIVABLES","label==&lt;$lc("wwACCOUNT_RECEIVABLES")$&gt;","url==");&lt;br /&gt;&lt;br /&gt;navBuilder.addPrevSiblingNodeTo("MY_PERSONAL_CHECKINS_0","collection","id==ACCOUNT_PAYABLES","label==&lt;$lc("wwACCOUNT_PAYABLES")$&gt;","url==");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;then move check in profile into the newly created collections:&lt;br /&gt;&lt;br /&gt;&lt;div class="graydiv" style="overflow: scroll; height: 200px;"&gt;&lt;br /&gt;i=0; &lt;br /&gt;while(i&lt;ARChilds.length) {&lt;br /&gt;  navBuilder.moveItemInto("ACCOUNT_RECEIVABLES",ARChilds[i]); i++; &lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;i=0; &lt;br /&gt;while(i&lt;APChilds.length) { &lt;br /&gt;  navBuilder.moveItemInto("ACCOUNT_PAYABLES",APChilds[i]); i++;&lt;br /&gt;  }&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Note: use the IDOC function "lc" for getting translation; example: &lt;$lc("wwACCOUNT_RECEIVABLES")$&gt;&lt;br /&gt;&lt;br /&gt;Here is the include full code:&lt;br /&gt;&lt;br /&gt;&lt;div class="graydiv" style="overflow: scroll; height: 200px;"&gt;&lt;br /&gt;&lt;$include super.custom_finish_layout_init$&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;APChilds = new Array();&lt;br /&gt;ARChilds = new Array();&lt;br /&gt;&lt;br /&gt;var children = navBuilder.getNodeById("NEW_CHECK_IN").childNodes;&lt;br /&gt;for (var i = 0; i &lt; children.length; i++)&lt;br /&gt;{ &lt;br /&gt; TEXT =  children[i].getAttribute("label") ;&lt;br /&gt;  if (TEXT.match(/\bAR\b/i) != null) {&lt;br /&gt;     arrLength =ARChilds.push(children[i].getAttribute("id"));&lt;br /&gt;  }&lt;br /&gt;  if (TEXT.match(/\bAP\b/i) != null) {&lt;br /&gt;     arrLength =APChilds.push(children[i].getAttribute("id"));&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;navBuilder.addPrevSiblingNodeTo("MY_PERSONAL_CHECKINS_0","collection","id==ACCOUNT_RECEIVABLES","label==&lt;$lc("wwACCOUNT_RECEIVABLES")$&gt;","url==");&lt;br /&gt;navBuilder.addPrevSiblingNodeTo("MY_PERSONAL_CHECKINS_0","collection","id==ACCOUNT_PAYABLES","label==&lt;$lc("wwACCOUNT_PAYABLES")$&gt;","url==");&lt;br /&gt;&lt;br /&gt;i=0; &lt;br /&gt;while(i&lt;ARChilds.length) {&lt;br /&gt;  navBuilder.moveItemInto("ACCOUNT_RECEIVABLES",ARChilds[i]); i++; &lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;i=0; &lt;br /&gt;while(i&lt;APChilds.length) { &lt;br /&gt;  navBuilder.moveItemInto("ACCOUNT_PAYABLES",APChilds[i]); i++;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8736456097716443793-6288825932116817215?l=oramack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oramack.blogspot.com/feeds/6288825932116817215/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8736456097716443793&amp;postID=6288825932116817215' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/6288825932116817215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/6288825932116817215'/><link rel='alternate' type='text/html' href='http://oramack.blogspot.com/2010/04/ucm-modify-check-in-menu.html' title='UCM: Modify the check-in menu'/><author><name>faomac</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8736456097716443793.post-6628833653535662617</id><published>2009-10-14T03:24:00.000-07:00</published><updated>2010-03-09T01:34:10.775-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux / Unix'/><title type='text'>Search inside files</title><content type='html'>In order to search for a specific text pattern inside every file in every subdirectory of a given path in linux you can do:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;span style="font-weight: bold;"&gt;grep -r "&lt;text&gt;text_2_search" *&lt;/text&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;"-r" stands for "recursive."&lt;br /&gt;Note that with "zgrep" util you can search recursively inside a .zip or .tar.gz file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8736456097716443793-6628833653535662617?l=oramack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oramack.blogspot.com/feeds/6628833653535662617/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8736456097716443793&amp;postID=6628833653535662617' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/6628833653535662617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/6628833653535662617'/><link rel='alternate' type='text/html' href='http://oramack.blogspot.com/2009/10/search-inside-files.html' title='Search inside files'/><author><name>faomac</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8736456097716443793.post-1050202712873823863</id><published>2009-10-14T03:01:00.000-07:00</published><updated>2009-10-14T03:14:37.703-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux / Unix'/><title type='text'>Linux resize screen resolution with xrandr</title><content type='html'>You can quickly resize the screen resolution using "xrandr" utility (/usr/bin/xrandr).&lt;br /&gt;&lt;br /&gt;with &lt;span style="font-weight: bold;"&gt;xrandr -q&lt;/span&gt; you can see all the available resolutions&lt;br /&gt;&lt;br /&gt;Input&lt;span style="font-weight: bold;"&gt; xrandr -s&lt;/span&gt;  (size) to dynamically resize screen; for example:&lt;br /&gt;&lt;br /&gt; &lt;span style="font-weight: bold;"&gt;xrandr -s 1440x900&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8736456097716443793-1050202712873823863?l=oramack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oramack.blogspot.com/feeds/1050202712873823863/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8736456097716443793&amp;postID=1050202712873823863' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/1050202712873823863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/1050202712873823863'/><link rel='alternate' type='text/html' href='http://oramack.blogspot.com/2009/10/linux-resize-screen-resolution-with.html' title='Linux resize screen resolution with xrandr'/><author><name>faomac</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8736456097716443793.post-8299241887944276024</id><published>2008-04-09T03:18:00.000-07:00</published><updated>2008-04-22T12:28:04.875-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Database'/><title type='text'>Oracle DB: Cold backup</title><content type='html'>A cold backup is a phisical backup and is done with the database in a shutdown state (not available to users).&lt;br /&gt;The datafiles do not change during the copy so the database is in sync upon restore.&lt;br /&gt;&lt;br /&gt;First of all, you need to shutdown your instance:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;export TNS_ADMIN=/export/opt/oracle/8.1.7/network/admin&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;export ORACLE_SID=some_sid&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;export ORACLE_HOME=/export/opt/oracle/8.1.7&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;DT=`date +%Y.%m.%d`&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;PFILE=/export/opt/oracle/8.1.7/dbs/init$ORACLE_SID.ora&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;echo Backup for $DT&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;echo Selecting the files that must be backed up....&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;/export/opt/oracle/8.1.7/bin/sqlplus -S '/ as sysdba' [minor][minor]eofsql&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;set termout off&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;set pages 0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;set lines 120&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;set feedback off&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;set trimspool on&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;spool files.2.backup&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;select name   from v$datafile;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;select name   from v$controlfile;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;select member from v$logfile;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;select '$PFILE' from dual;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;spool off&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;shutdown immediate&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;exit;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;EOFSQL&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;then you should "tar" your datafiles, controlfiles and logfiles (so called "image copy"):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;tar cfv - -I files.2.backup | gzip | rsh -l some_user some_host "cat - &gt; /path/to/destdir/backup-$DT.tar.gz"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;or you can direclty tar a folder; the following is an example on linux:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;tar -zcvf ASRAC_20080409_00.tar.gz ASRAC /hera01/app/oracle/oradata/ASRAC&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;finally startup you instance:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;/export/opt/oracle/8.1.7/bin/sqlplus -S '/ as sysdba' [minor][minor]eofsql&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;startup pfile=$PFILE&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;exit;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;EOFSQL&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8736456097716443793-8299241887944276024?l=oramack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oramack.blogspot.com/feeds/8299241887944276024/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8736456097716443793&amp;postID=8299241887944276024' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/8299241887944276024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/8299241887944276024'/><link rel='alternate' type='text/html' href='http://oramack.blogspot.com/2008/04/oracle-db-cold-backup.html' title='Oracle DB: Cold backup'/><author><name>faomac</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8736456097716443793.post-7861846438065271270</id><published>2008-03-27T07:57:00.000-07:00</published><updated>2008-03-27T07:58:58.380-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux / Unix'/><title type='text'>LSOF: Who's doing what</title><content type='html'>Sometimes i got problems on identifing what kind of thing is doing a specified process.&lt;br /&gt;First of all, you need to identify your process in "ps -efl" list.&lt;br /&gt;&lt;br /&gt;To learn what program is listening on wich port:&lt;br /&gt;&lt;br /&gt;    netstat -tlnp&lt;br /&gt;&lt;br /&gt;You can also identify processes using files or sockets:&lt;br /&gt;&lt;br /&gt;    fuser [FILENAME]&lt;br /&gt;&lt;br /&gt;now check if you have LSOF utility on you machine.&lt;br /&gt;&lt;br /&gt;    locate lsof&lt;br /&gt;&lt;br /&gt;probably you will find it under "/usr/sbin/lsof".&lt;br /&gt;LSOF (LiSt Open Files) is a useful and powerful tool that will show you opened files.&lt;br /&gt;&lt;br /&gt;When lsof is called without parameters, it will show all the files opened by any processes.&lt;br /&gt;&lt;br /&gt;    lsof | nl&lt;br /&gt;&lt;br /&gt;Other examples on who is using the apache executable file, /etc/passwd, what files are opened on device /dev/hda6 or who's accessing /dev/cdrom:&lt;br /&gt;&lt;br /&gt;    lsof `which apache2`&lt;br /&gt;    lsof /etc/passwd&lt;br /&gt;    lsof /dev/hda6&lt;br /&gt;    lsof /dev/cdrom&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What process IDs are using the apache binary, and only the PID?&lt;br /&gt;&lt;br /&gt;    lsof -t `which apache2`&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;what files are opened by processes whose names starts by "k" (klogd, kswapd...) and bash?&lt;br /&gt;&lt;br /&gt;    lsof -c k&lt;br /&gt;    lsof -c bash&lt;br /&gt;&lt;br /&gt;what files are opened by init?&lt;br /&gt;&lt;br /&gt;    lsof -c init&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;what files are opened by processes whose names starts by "courier", but exclude those whose owner is the user "mack"?&lt;br /&gt;&lt;br /&gt;    lsof -c courier -u ^mack&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;processes opened by user apache and user mack:&lt;br /&gt;&lt;br /&gt;    lsof -u apache,mack&lt;br /&gt;&lt;br /&gt;Show what files are using the process whose PID is 30297:&lt;br /&gt;&lt;br /&gt;    lsof +p 30297&lt;br /&gt;&lt;br /&gt;Search for all opened instances of directory /tmp and all the files and directories it contains:&lt;br /&gt;&lt;br /&gt;    lsof +D /tmp&lt;br /&gt;&lt;br /&gt;List all opened internet sockets and sockets related to port 80:&lt;br /&gt;&lt;br /&gt;    lsof -i&lt;br /&gt;    lsof -i :80&lt;br /&gt;&lt;br /&gt;List all opened Internet and UNIX domain files:&lt;br /&gt;&lt;br /&gt;    lsof -i -U&lt;br /&gt;&lt;br /&gt;Show us what process(es) has an UDP connection opened to or from the host www.akadia.com at port 123 (ntp):&lt;br /&gt;&lt;br /&gt;    lsof -iUDP@www.akadia.com:123&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(about LSOF: http://www.akadia.com/services/lsof_intro.html)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8736456097716443793-7861846438065271270?l=oramack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oramack.blogspot.com/feeds/7861846438065271270/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8736456097716443793&amp;postID=7861846438065271270' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/7861846438065271270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/7861846438065271270'/><link rel='alternate' type='text/html' href='http://oramack.blogspot.com/2008/03/lsof-who-is-doing-what.html' title='LSOF: Who&apos;s doing what'/><author><name>faomac</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8736456097716443793.post-2885138199649593959</id><published>2008-03-26T07:17:00.000-07:00</published><updated>2008-03-26T07:25:55.709-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ldap'/><title type='text'>Ldapsearch and LDIF files in OID</title><content type='html'>The ldapsearch utility tool comes with every common LDAP library and allows a command-line user to run queries against LDAP directories.&lt;br /&gt;&lt;br /&gt;Using Oracle OID ldap you can find the utility under "$OID_HOME/bin/ldapsearch" and the following is the syntax:&lt;br /&gt;&lt;br /&gt;ldapsearch -h oid_hostname&lt;br /&gt;-D "binddn"&lt;br /&gt;-w password&lt;br /&gt;[-Y "proxy_dn"]&lt;br /&gt;[-p ldap_port]&lt;br /&gt;[-V ldap_version]&lt;br /&gt;-b "basedn"&lt;br /&gt;{-s base|one|sub}&lt;br /&gt;{"filter_string" [attributes]|-f input_file}&lt;br /&gt;[-A]&lt;br /&gt;[-a never|always|search|find]&lt;br /&gt;[-F separator]&lt;br /&gt;[-S] [-R] [-i 1|0] [-t] [-u] [-L|-X] [-B] [-M] [-v] [-n]&lt;br /&gt;[-l time_limit]&lt;br /&gt;[-z size_limit]&lt;br /&gt;[-O ref_hop_limit]&lt;br /&gt;[-U SSL_auth_mode {-W wallet_location -P wallet_password}]&lt;br /&gt;[-d debug_level]&lt;br /&gt;[-E character_set]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(details here: http://download.oracle.com/docs/cd/B14099_19/idmanage.1012/b15883/syntax_datamngmnt013.htm)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here some example on using this utility.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[Performing a simple subtree search]&lt;br /&gt;&lt;br /&gt;ldapsearch -p 389 -h myhost -b "c=US" -s sub -v "cn=John*"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[The following example retrieves only the distinguished name along with the surname (sn) and description (description) attribute values]&lt;br /&gt;&lt;br /&gt;ldapsearch -p 389 -h myhost -b "c=US" -s sub -v "cn=Person*" dn sn description&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[search for all_groups starting on a given DN]&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ldapsearch \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-h hostname \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-p 3060 \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-D cn=adminuser \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-w password \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-b 'cn=Groups,dc=organizazion,dc=com' \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-s sub objectclass=orclgroup 'cn=*'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[search for users in a given DN]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ldapsearch \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-h hostname \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-p 3060 \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-D cn=adminuser \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-w password \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-b 'cn=GRP_ITA_TPM_VIW,cn=portal.id_install,cn=groups,dc=organization,dc=com' \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-s sub objectclass=orclgroup \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;uniquemember&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You can generate an LDIF file from an ldapsearch.&lt;br /&gt;The LDAP Data Interchange Format (LDIF) is a standard plain text data interchange format for representing LDAP directory content and update requests.&lt;br /&gt;For example, i can search for all groups with name starting with FBK,DOC,GRP,ORG a generate a file:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ldapsearch \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-h hostname \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-p 3060 \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-D cn=adminuser \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-w password \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-b 'cn=portal.id_install,cn=Groups,dc=organization,dc=com' \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-s sub \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;"(&amp;amp;(objectclass=orclgroup)(|(cn=FBK*)(cn=DOC*)(cn=GRP*)(cn=ORG*)))" \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;dn &gt; all_grp.ldif&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Optionally i can clear the file and consider only the rows i need:&lt;br /&gt;&lt;br /&gt;cat all_grp.ldif |grep cn &gt; t1.txt&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;and then import the LDIF file on a target LDAP:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ldapadd \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-h targethost \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-p 13060 \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-D cn=adminuser \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-w password \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-f ./t1.ldif&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8736456097716443793-2885138199649593959?l=oramack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oramack.blogspot.com/feeds/2885138199649593959/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8736456097716443793&amp;postID=2885138199649593959' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/2885138199649593959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/2885138199649593959'/><link rel='alternate' type='text/html' href='http://oramack.blogspot.com/2008/03/ldapsearch-utility-tool-comes-with.html' title='Ldapsearch and LDIF files in OID'/><author><name>faomac</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8736456097716443793.post-1301001476307656638</id><published>2008-03-26T06:53:00.000-07:00</published><updated>2008-03-26T07:26:45.248-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pl/sql and sql'/><title type='text'>Case statement in SQL and PL/SQL</title><content type='html'>The following as examples using SIMPLE and SEARCHED CASE statement in pl/sql.&lt;br /&gt;Simple CASE:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;text := case n&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;          when 1 then one&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;          when 2 then two&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;          when 3 then three&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;          else        other&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;        end case;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Searched CASE:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;text := case&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;          when n = 1               then one&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;          when n = 2               then two&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;          when n = 3               then three&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;          when ( n &gt; 3 and n &lt;&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;          else                          other&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;        end;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Exception handling:&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;  case&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;    when p = 1 then Action1;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;    when r = 2 then Action2;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;    when q &gt; 1 then Action3;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;  end case;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;exception&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;  when case_not_found&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In SQL, you can also have SIMPLE and SEARCHED case.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;SELECT last_name, commission_pct,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;  (CASE commission_pct&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;    WHEN 0.1 THEN ‘Low’&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;    WHEN 0.15 THEN ‘Average’&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;    WHEN 0.2 THEN ‘High’&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;    ELSE ‘N/A’&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;  END ) Commission&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;FROM employees ORDER BY last_name;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;SELECT last_name, job_id, salary,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;  (CASE&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;    WHEN job_id LIKE 'SA_MAN' AND salary &lt;&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;    WHEN job_id LIKE 'SA_MAN' AND salary &gt;= 12000 THEN '15%'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;    WHEN job_id LIKE 'IT_PROG' AND salary &lt;&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;    WHEN job_id LIKE 'IT_PROG' AND salary &gt;= 9000 THEN '12%'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;    ELSE 'NOT APPLICABLE'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;  END ) Raise&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;FROM employees;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8736456097716443793-1301001476307656638?l=oramack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oramack.blogspot.com/feeds/1301001476307656638/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8736456097716443793&amp;postID=1301001476307656638' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/1301001476307656638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/1301001476307656638'/><link rel='alternate' type='text/html' href='http://oramack.blogspot.com/2008/03/case-statement-in-sql-and-plsql.html' title='Case statement in SQL and PL/SQL'/><author><name>faomac</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8736456097716443793.post-7051967807749327309</id><published>2008-03-07T09:24:00.000-08:00</published><updated>2008-04-22T12:32:25.116-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript / AJAX'/><title type='text'>Disable Ctrl-N</title><content type='html'>Here is a simple way to disable CTRL-N in Javascript.&lt;br /&gt;&lt;br /&gt;&lt;div class="graydiv" style="overflow: scroll; height: 200px;"&gt;&lt;br /&gt;&lt;br /&gt;document.onkeydown = function(){&lt;br /&gt;if ((event.keyCode == 78) &amp;amp;&amp;amp; (event.ctrlKey)){&lt;br /&gt;//alert ("No new window")&lt;br /&gt;event.cancelBubble = true;&lt;br /&gt;event.returnValue = false;&lt;br /&gt;event.keyCode = false;&lt;br /&gt;return false;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8736456097716443793-7051967807749327309?l=oramack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oramack.blogspot.com/feeds/7051967807749327309/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8736456097716443793&amp;postID=7051967807749327309' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/7051967807749327309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/7051967807749327309'/><link rel='alternate' type='text/html' href='http://oramack.blogspot.com/2008/03/disable-ctrl-n.html' title='Disable Ctrl-N'/><author><name>faomac</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8736456097716443793.post-1164650204226128724</id><published>2008-03-07T09:23:00.000-08:00</published><updated>2008-04-22T12:33:57.151-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript / AJAX'/><title type='text'>No right click</title><content type='html'>Here is a simple way to disable right-click in Javascript.&lt;br /&gt;&lt;br /&gt;&lt;div class="graydiv" style="overflow: scroll; height: 200px;"&gt;&lt;br /&gt;&lt;br /&gt;var message="";&lt;br /&gt;///////////////////////////////////&lt;br /&gt;function clickIE() {if (document.all) {(message);return false;}}&lt;br /&gt;function clickNS(e) {if&lt;br /&gt;(document.layers||(document.getElementById&amp;amp;&amp;amp;!document.all)) {&lt;br /&gt;if (e.which==2||e.which==3) {(message);return false;}}}&lt;br /&gt;if (document.layers)&lt;br /&gt;{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}&lt;br /&gt;else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}&lt;br /&gt;&lt;br /&gt;document.oncontextmenu=new Function("return false")&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8736456097716443793-1164650204226128724?l=oramack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oramack.blogspot.com/feeds/1164650204226128724/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8736456097716443793&amp;postID=1164650204226128724' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/1164650204226128724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/1164650204226128724'/><link rel='alternate' type='text/html' href='http://oramack.blogspot.com/2008/03/no-right-click.html' title='No right click'/><author><name>faomac</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8736456097716443793.post-2339127839685133687</id><published>2008-03-05T12:06:00.000-08:00</published><updated>2008-04-22T12:33:17.905-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript / AJAX'/><title type='text'>JSON</title><content type='html'>JSON (JavaScript Object Notation) is a format used for transmitting structured data over a network connection in a process called serialization. Its main application is in Ajax web application programming, where it serves as an alternative to the traditional use of XML.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;JSON's basic types are&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Number (integer, real, or floating point)&lt;/li&gt;&lt;li&gt;String (double-quoted Unicode with backslash escapement)&lt;/li&gt;&lt;li&gt;Boolean (true and false)&lt;/li&gt;&lt;li&gt;Array (an ordered sequence of values, comma-separated and enclosed in square brackets)&lt;/li&gt;&lt;li&gt;Object (collection of key/value pairs, comma-separated and enclosed in curly brackets)&lt;/li&gt;&lt;li&gt;null&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;The following example shows the JSON representation of an object that describes a person. The object has string fields for first name and last name, contains an object representing the person's address, and contains a list of phone numbers (an array).&lt;br /&gt;&lt;br /&gt;&lt;div class="graydiv" style="overflow: scroll; height: 200px;"&gt;&lt;br /&gt;{&lt;br /&gt;    "firstName": "John",&lt;br /&gt;    "lastName": "Smith",&lt;br /&gt;    "address": {&lt;br /&gt;        "streetAddress": "21 2nd Street",&lt;br /&gt;        "city": "New York",&lt;br /&gt;        "state": "NY",&lt;br /&gt;        "postalCode": 10021&lt;br /&gt;    },&lt;br /&gt;    "phoneNumbers": [&lt;br /&gt;        "212 732-1234",&lt;br /&gt;        "646 123-4567"&lt;br /&gt;    ]&lt;br /&gt;}&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The following Javascript code shows how the client can use an XMLHttpRequest to request an object in JSON format from the server. (The server-side programming is omitted; it has to be set up to respond to requests at url with a JSON-formatted string.)&lt;br /&gt;&lt;br /&gt;&lt;div class="graydiv" style="overflow: scroll; height: 200px;"&gt;&lt;br /&gt;var the_object;&lt;br /&gt;var http_request = new XMLHttpRequest();&lt;br /&gt;http_request.open( "GET", url, true );&lt;br /&gt;http_request.onreadystatechange = function () {&lt;br /&gt;   if ( http_request.readyState == 4 ) {&lt;br /&gt;       if ( http_request.status == 200 ) {&lt;br /&gt;           the_object = eval( "(" + http_request.responseText + ")" );&lt;br /&gt;       } else {&lt;br /&gt;           alert( "There was a problem with the URL." );&lt;br /&gt;       }&lt;br /&gt;       http_request = null;&lt;br /&gt;   }&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;More info at http://www.json.org&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8736456097716443793-2339127839685133687?l=oramack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oramack.blogspot.com/feeds/2339127839685133687/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8736456097716443793&amp;postID=2339127839685133687' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/2339127839685133687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8736456097716443793/posts/default/2339127839685133687'/><link rel='alternate' type='text/html' href='http://oramack.blogspot.com/2008/03/json.html' title='JSON'/><author><name>faomac</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
