PyOhio: photos plz

Catherine | Jul 28, 2010 16:15 +0000
We have 138 PyOhio registrants so far - that's greater than the total number of attendees last year. I'm excited!

Is there a shutterbug in the house? I'm always envious of the photos taken at some conferences, like this one of Python core sprinters at EuroPython. (Hi, guys! Our contribu-palooza-ers will be joining you soon!) I want to join the fun. Our PyOhio attendees are just as pretty as any of them!

So if you enjoy taking pictures, and you're coming to PyOhio (and who wouldn't?), please don't forget your camera! Get some group shots, and let me know about them afterward. Thanks!

See you Saturday!

In case you don’t know, SQL*loader exit codes have changed

Byte64 | Jul 28, 2010 09:20 +0000
Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.A quick posting to report that, for some (good?) reason, Oracle decided to change the values behind the so-called exit codes that SQL*Loader returns upon exit on the Windows platform.Interestingly enough, this change is actually "documented" because comparing the two pages in the "Utilities

6 Interesting Things You May Have Missed on 2010-07-28

Eddie Awad | Jul 28, 2010 08:03 +0000
  • On July 27, Oracle completed the migration of all non-obsolete content from developers.sun.com, java.sun.com, and BigAdmin to a completely re-architected, re-designed Oracle Technology Network site. This site – which offers different entry points for Java Developers, Database Admins and Developers, System Admins and Developers, and Architects – reflects the full diversity of this huge technical end-user community.
  • Larry Ellison, founder and chief executive of software maker Oracle Corp., topped the list of best-paid executives of public companies during the past decade, receiving $1.84 billion in compensation, according to a Wall Street Journal analysis of CEO pay.
  • Code reviews are very important in any software project. More often only "superficial" reviews happen, the types where you get review comments like, "You know the documentation for that method doesn't have the version number", or "this variable is unused", etc. Although this is an essential part of any code review, it doesn't cover the subtle aspects of a real code review. It takes more than just a static code analyzer to perform a good code review. In this article the author shares a few points on how to make code reviews really effective.
  • Before there were VPNs, there was ssh. And when you don’t have access to your VPN or can’t set one up, you can still get most of the functionality over ssh.
  • Firebug is one of the most famous extension for the Firefox web browser. In the past years, the functionalities offered by this plugin alone sold Firefox as the platform for web development over Internet Explorer (besides the respect of W3C standards that characterized Firefox). Then, Chrome had not been invented yet and when it was released, it incorporated some of the innovations of Firebug like a functional JavaScript console.
  • Partition Alignment, Choosing a file system, Optimizing ext3, Enabling Huge Pages, Using Async and Direct IO, Tuning Swapping Priority and more.

Related articles:

7 Links Challenge – My Turn

I read about an interesting challenge on ProBlogger, Take the 7 Link Challenge Today #7links. It's really interesting in that it digs up some of my favorite posts as well as me picking a favorite from an external blog. The rules are simple. I pick 7 blog entries and link to them but I have to follow certain guidelines.

Methods, questions and answers.

Gary Myers | Jul 27, 2010 20:45 +0000
Today is one of those days when you've got a couple of recent blog posts which intersect beautifully.

Cary Millsap is here discussing why the right method is more important than the right answer.
Steven Feuerstein inadvertently opened up a can of worms regarding the seemingly simple task of extracting a list of a user's tables from the data dictionary.

The fallout from Steven's question in the PL/SQL Challenge is that the term 'table' is fuzzy and has become fuzzier over the years. Views, object tables, XML tables, Materialized Views, tables that have been dropped but are sitting in the recyclebin. The various answers (except for one) offered for that question in the PL/SQL all worked in SOME circumstances, but not necessarily all circumstances.

You can appreciate the confusion if you have had to explain to someone that, if you grant privileges on a procedure, the data dictionary shows that in USER_TAB_PRIVS.

Personally, I'm more attracted to DBMS_METADATA.GET_DDL these days. I just wish there was a (built-in) function that took the object name (and optionally schema) and worked out the object type for itself.

Anyway, the only thing I can add to the discussion is that testing is the process of proving that your method is applicable to a defined set of situations. The wider the testing, the more situations you can be confident of being addressed successfully.

In pure mathematics and some scientific disciplines, you can devise theoretical proofs that prove the wider applicability of a method without individual testing. That's harder in implementation. Maths can prove that multiply X by two, then divide by two, you get X as the result. In a physical implementation, you might have to deal with rounding imprecision or maximum permitted values or buffer overflows....

Oracle Portal

MAhmad | Jul 27, 2010 02:16 +0000

Hi Experts,

I’m planning to install Oracle Portal. My pc OS is windows Vista and has oracle10g installed.

Can anyone help tell some information about the guidelines on how to install this software and other system requirements? Where I can find all the required software to download?

Please tell me software installations sequence and important steps.

Thanks so much for your kind instruction.

Regards
M Ahmad

Ultimate Oracle source collection: part II, Siebel

The second in the ‘ultimate collection’ series is full of Siebel (re)sources. Note, that you might need an Metalink/Oracle Support account for some links! Links by Oracle self: The Complete CRM Blog: THE place to find out what’s new and what’s happening with the Oracle CRM product line. Siebel Customer Relationship Management (CRM) Applications: General [...] Related posts:
  1. Ultimate Oracle source collection: part I, PeopleSoft
  2. BI Publisher, the report generating tool for Siebel CRM
  3. Oracle goes Web 2.0

APEX 4.0 Plugin: Watermark


This simple plugin for APEX 4.0 shows some text inside an item. Usually a watermark is used to give the user extra information to assist with filling out a Form. Creating this plugin was more a learning experience than anything else. If you just want the plugin than follow this link to download it. If you want to go through the same learning experience I went through while creating this plugin, than keep reading.

Most of the APEX 4 Plugin tutorials that I encountered are structured like "click here", "copy this". To me this doesn't aid in my understanding of the plugin mechanism. Needless to say that plugin tutorials written for APEX 4 EA (Early Adapter) are less effective, since the interface for creating plugin has changed. Currently the only way to learn how to create a plugin is going through someone else's plugin code and try to figure out what it is they did. Which can be quite challenging.
Enough for the rant. Time to get back to work.
Step 1. Download the jQuery plugin.
For this plugin, I used the Watermark jQuery plugin. On this page you can also see how the plugin should be used.
Step 2. Create a new plugin in APEX
Go to the Shared Components of your application and choose "Plug-ins" in the "User Interface" section.

On the Plugin overview page, click the CREATE button. Fill out the "Name" and "Internal Name" items, choose "Item" for Type and click the CREATE button. Why click the button now? Well, it turns out that the type of plugin can reveal extra properties on this page. So, if you're follow other "click here - copy this"-tutorials make sure to click the CREATE button after you filled out the name, internal and type.

  • Name: Watermark

  • Internal Name: nl.amis.watermark

  • Type: Item


Step 3: Upload the javascript library
To upload the javascript, go to the files section of the plugin edit/create form, and follow the wizard to upload the javascript file. As easy as that. Why do you need to do this? The plugin contains all necessary information to be exported into other applications. As this plugin needs the javascript library, include it with the plugin.
Step 4: Custom Attributes
What do you need to define the watermark? First of all some text, because that is the text that will be shown as the watermark. Second, the plugin allows you to define your own color instead of the standard light grey.
Go to the section labelled "Custom Attributes" and create two attributes:
First:

  • Scope: component

  • Display sequence: 10

  • Label: Watermark

  • Type: Text

  • Required: Yes

  • Help Text: The text that you want to appear as a Watermark in the item.


Second:

  • Scope: component

  • Display sequence: 20

  • Label: Color

  • Type: Text

  • Required: No

  • Default Value: #369

  • Help Text: The color of the Watermark. Default is #369, which is a light grey.


Why do you need to do this? You need to create some attributes to define the appearance of the plugin, in this case the text and the color of the text, giving some flexibility to the plugin.
Step 5: Create a Render function
The Render function is the code that generates the plugin on the form. What it needs to render is determined by the type of plugin, in this case an Input item. The signature of the render function looks like this

function <name of function> (
p_item in apex_plugin.t_page_item,
p_plugin in apex_plugin.t_plugin,
p_value in varchar2,
p_is_readonly in boolean,
p_is_printer_friendly in boolean )
return apex_plugin.t_page_item_render_result

Tip: To get the signature of the render function, click on the "Render Function Name" in the Callback section of the Plugin create/edit page.
In order for the plugin to render correctly, you need to adhere to this signature.

Using the HTP package, it's fairly easy to create an Input item.
What you need to construct is something like this

sys.htp.p ('<input type="text" name="'||l_name
||'" id="'||p_item.name||'" '
||'value="'||l_value
||'" size="'||p_item.element_width
||'" '||'maxlength="'||p_item.element_max_length
||'" '||p_item.element_attributes||' />');

Watch for the quotes and double quotes!

In the code above there is a reference to a local variable, named "l_name". In order to get the name attribute of the input item, you need to call the Apex_Plugin package:

l_name := apex_plugin.get_input_name_for_page_item (false);

The APEX_PLUGIN is actually a synonym for the WWV_FLOW_PLUGIN package. Reading the note from the package specification shows that you need this function before using the HTP package:

--==============================================================================
-- Returns the name attribute which has to be used for a HTML input element if
-- you want that the value of the element is stored in session state when the
-- page is submitted. If you have a HTML input element which returns multiple
-- values (eg. select list with multiple="multiple") you have
-- to set p_is_multi_value.
-- Note: This function has to be called before you write something to the
-- HTTP buffer with HTP.P(RN)
--==============================================================================
function get_input_name_for_page_item (
p_is_multi_value in boolean )
return varchar2;


Two more things to do in constructing the rendering function, include the javascript library and write the jQuery code to "attach" the watermark to the item.
Including the javascript library is as easy as calling a package,...

apex_javascript.add_library (p_name => 'jquery.watermarkinput'
,p_directory => p_plugin.file_prefix
,p_version => null
);

Note: Don not include the extension of the javascript library. In other words: omit the ".js" extension.
"Attaching" (by lack of better term) the watermark to the item, we need to refer to the documentation that goes with the Watermark plugin. This is what the render function needs to generate as "on Load" code:

jQuery(function($){
$("#suffix").Watermark("Suffix","#369");
});

Using the Apex_Javascript package allows you to add this code to the "document ready" function. If you are not familiar with this term, forget about it. Just remember that the jQuery code is executed after the page is shown and all good things happen there. Want to know more? Google: "jQuery document ready" and you will find lots of tutorials on using this function.
The only thing we need to generate is the line which starts with the dollar ($) sign.
Something like this:

apex_javascript.add_onload_code (p_code =>
'$("#'||p_item.name||'").Watermark("'||l_watermark||'","'||l_color||'");'
);

Watch those quotes and double quotation marks again.

Now the complete rendering function looks like this, including some debug information. Notice the use of the Custom Attributes (defined as p_item.attribute_01 and p_item.attribute_02):

function render_watermark (p_item in apex_plugin.t_page_item
,p_plugin in apex_plugin.t_plugin
,p_value in varchar2
,p_is_readonly in boolean
,p_is_printer_friendly in boolean
)
return apex_plugin.t_page_item_render_result
is
l_value varchar2(32767) := sys.htf.escape_sc (p_value);
l_name varchar2(30);
l_watermark apex_application_page_items.attribute_01%type := p_item.attribute_01;
l_color apex_application_page_items.attribute_02%type := coalesce (p_item.attribute_02, '#369');
retval apex_plugin.t_page_item_render_result;
begin
if apex_application.g_debug
then
apex_plugin_util.debug_page_item (p_plugin => p_plugin
,p_page_item => p_item
);
end if;
l_name := apex_plugin.get_input_name_for_page_item (false);
if p_is_readonly or p_is_printer_friendly
then
if p_is_readonly and not p_is_printer_friendly
then
sys.htp.p ('<input type="hidden" name="'||l_name||'" '||
'id="'||p_item.name||'" value="'||l_value||'" />'
);
end if;
sys.htp.p ('<span id="'||p_item.name||'_DISPLAY" '||
coalesce (p_item.element_attributes, 'class="display_only"')||
'>'||l_value||''
);
else
sys.htp.p ('<input type="text" name="'||l_name||'" id="'||p_item.name||'" '||
'value="'||l_value||'" size="'||p_item.element_width||'" '||
'maxlength="'||p_item.element_max_length||'" '||
p_item.element_attributes||' />');
apex_javascript.add_library (p_name => 'jquery.watermarkinput'
,p_directory => p_plugin.file_prefix
,p_version => null
);
apex_javascript.add_onload_code (p_code =>
'$("#'||p_item.name||'").Watermark("'||l_watermark||'","'||l_color||'");'
);
end if;
return retval;
end render_watermark;

I also set some standard attributes as depicted below.

Step 6: Validation
Now we are almost done. You could try it out now. But there is a catch,... What do you think gets stored in the database if you don't enter a value for the item? Exactly, the watermark text that you provide. In order to prevent that from happening, I searched for ways to use the functionality that the Watermark plugin provides.

function UseData(){
$.Watermark.HideAll();
//Do Stuff
$.Watermark.ShowAll();
}

But was unable to find the correct location where to add this. So I decided to implement a "validation" function.
In the Callback section, where you also specify the render function, add a validation function - in this case call it "validate_watermark".
The function is not really a validation functionality, the only thing that it does is set the session state for the item to NULL - only when the value of the item is equal to the watermark text.

function validate_watermark (p_item in apex_plugin.t_page_item
,p_plugin in apex_plugin.t_plugin
,p_value in varchar2
)
return apex_plugin.t_page_item_validation_result
is
retval apex_plugin.t_page_item_validation_result;
l_watermark apex_application_page_items.attribute_01%type := p_item.attribute_01;
begin
if apex_application.g_debug
then
apex_plugin_util.debug_page_item (p_plugin => p_plugin
,p_page_item => p_item
);
end if;
if p_value = l_watermark
then
-- Set session state to NULL for the item
apex_util.set_session_state(p_item.name, null);
end if;
return retval;
end validate_watermark;


Creating a simple plugin like this one is not very hard. Writing this blog took a lot more time than creating the actual plugin. The hardest part was trying to figure out what exactly is needed to render the item and how to fit the jQuery samples in the PL/SQL code.

Links
Watermark by Josh Bush (Digital Bush)
Easy reference for HTML Color Codes
A lot more plugins for APEX
jQuery homepage

Where’s Waldo?

oraclenerd | Jul 24, 2010 22:37 +0000
The oraclenerd edition.

I think this is the longest stint I have gone without posting since I started, almost 3 weeks now.

It's not that I don't have anything to say...you know better than that. I've actually been super busy.

I've been in Chicago (Rosemont actually) for the past 2 weeks and will be there for the next 4. This follows 8 weeks at home. I guess it all evens out in the end. The client has been awesome in regards to my travel, knowing our situation with Kate, and I'm very appreciative of this...but it's crunch time and I probably should be on-site.

I did 90% of the metadata work, bringing in a colleague late in the game to help offload some of the work. This also means I am at the center of just about every question about the data. I've had a lot of help, especially from some new team members (client side) who came from the DW world. Their research and knowledge of the systems has helped me out tremendously.

Just about any work I do I do at night, when it's quiet. In the office, I am rarely at my desk...which is another reason I have been so quiet here and on Twitter. I do have a cool new phone, the HTC Incredible, but I've hardly learned how to use that thing yet. After lunch on Wednesday...well, actually, during lunch on Wednesday, I was on a conference call on APEX and SSO (yes, outside my current job duties, but I love APEX so want to see it successful) walking back to the office. That led me to hitting up David Peake, the Principal Product Manager for APEX (who lives just 1.5 hours from Chicago) who then pointed me towards Anton Nielsen of C2Consulting for his knowledge in implementing SSO with APEX. I finally passed on Anton's name to the client as I didn't want to be a bottleneck.

The next 3 hours I found myself in meetings or at someone's desk answering questions. I finally sat down at 4. It's fun interacting, but exhausting.

Oh, and the client has definitely learned that they shouldn't let me out of my cage too often. After 8 weeks at home, I was a chatterbox.

Anyway, the initial deployment is on Monday and we will be rolling out fixes shortly after that. Not the ideal of course, but it is what it is.

Hopefully soon, I'll be able to post something informative or at least somewhat interesting. I did finish up my NQQuery.log parser, I just haven't had a chance to do anything with it yet.

Maintenance of the ARIS models and objects.

It is just important to maintain the ARIS models and objects in the right way. This maintenance in the different projects and environments is simple when everybody knows the way he must work. A good explanation to the designers and control of the recommended activities by the architect or the BPM department is necessary. In [...] Related posts:
  1. Implementing ARIS, some tips and tricks.
  2. Is ARIS the perfect tool for Process modeling?
  3. How to connect a PeopleSoft schema to ODI

Oracle OpenWorld/JavaOne/Oracle Develop 2010

The OOW 2010 schedule builder is up and ready to run. It's pretty cool. You can do various searches for sessions, vendors, exhibits, etc. You can also find content by user tagging. Something I would like to get a look at is the recommendation engine that's using Oracle Data Mining.

Business and IT, Everything is Entangled

BrainString

Opening up all cliches on Business and IT alignment. Yesterday, I had a discussion on how IT really could solve business problems. One of the statements that came by was that we simply needed to listen to the business in order to understand what IT has to do. This is, in my opinion, a bit too simplistic.

In the past few years we learned that IT and Business aren’t two different parts of an enterprise. Business processes are not just supported by Information Technology, but IT became part of the workflow of most organizations. Therefore the ‘you ask, we deliver’ mentality is not effective anymore. And therefore Business and IT ‘alignment’ is not a goal anymore. We need to entangle, fuse and combine.

Alignment still gives us the thought that Business and IT are two completely different things. This is no longer the case. IT became part of the Business. And only when this principle is understood, IT can become a driving force within (and not behind) any organization. As discussed in previous posts, this is the new vision of the CTO.

New technologies like BPM, SOA and other middleware solutions are based on this principle. But not always implemented. When integration of different ‘silos’ in organizations becomes pure technical, success is a guess. Determining the success factors for the entire organization (both for the Business as well as IT) is critical.

What do you think? And can you give me an example of projects in the IT domain where the success factor is a lottery?

Ultimate Oracle source collection: part I, PeopleSoft

Although there is much information available online about Oracle products, it’s shattered all over the internet and Google will help you only to a certain point. So we’ve put together a list of some fine resources for your daily PeopleSoft, E-Business Suite and Siebel needs. This ‘ultimate collection’ is the first one a series of [...] Related posts:
  1. Ultimate Oracle source collection: part II, Siebel
  2. Release Value Proposition for PeopleTools 8.51
  3. PeopleSoft upgrade: a job well done!

Use of v$archived_log and v$log_history on Physical Standby

Anand | Jul 21, 2010 09:02 +0000
This blog entry is about the use of v$archived_log and v$log_history views on the standby database, which many of you would be aware of, and few like me mite not. Till now i always used the below sql to check the last “applied” archived log on the standby, which had almost given me the correct

Agility and Analysis

Lewi | Jul 20, 2010 06:35 +0000

As developers, analysts, adminstrators, etc, I think most of us tend towards perfectionism. We want to do the job right and we want to do the job right the first time around.

Agility means being able to move forward with less than perfect information. Sometimes it means moving forward with information that is known to incomplete or even potentially inaccurate.

So what does that mean for analysis? Analysis, by definition, is the separation of… Read the rest!

Modeling Address Types

In my previous post on Modeling Addresses, we worked through a logical model where we normalized out the parts of an address that are important to us. Now we want to model how we would attach those addresses to a person. We aren't going to cover the person entity this time. We'll save that for the future. For now we are just going to say we have a default person entity that contains a first name and a last name.

3.0 Sneak Peek #1

Kris Rice | Jul 16, 2010 23:07 +0000
 Ever tinker with SQL to get the best plan possible but have to track what changed by flipping screens or not sure what session stats change due to the new plan ?  Here's the feature for you.  It highlights what changed in the tree as well as shows all the session stats that change from one plan to the next.  As with all things this is work-in-progress and subject to change. This is an

The PL/SQL Challenge effect

Rob van Wijk | Jul 16, 2010 07:20 +0000
In Google Analytics I noticed a strange peak in my page visits. On a normal weekday when I haven't posted something new, approximately 200 people visit one or more blogposts here. But on Thursday July 8, there were 299. When zooming in on that day, I noticed that my blogpost about SAVE EXCEPTIONS was visited 101 times, where 5 or 10 per day is normal for that blogpost. When something like this

Modeling Addresses

I am going to be working mostly in a logical model and showing a potential physical representation of that model at times. I'm not going to be strict about the terms I use and I won't be digging into the meaning behind the concepts, per se. My brain doesn't work like that when I'm working and this is really to show how my brain works, and what I'm thinking about, when I do this kind of work. I will put some conceptual stuff in the first logical model and I will put some physical stuff in the logical model; it's just the way I work.

PyOhio

Catherine | Jul 16, 2010 03:14 +0000
PyOhio staff badge
We are 15 days from the third PyOhio, and I am so excited... My first hope for PyOhio was that it would become a little slice of PyCon-ish goodness in our region... we've definitely accomplished that. This year we're adding on some very serious sprinting that, I think, will make PyOhio an important part of the Python scene not just here, but worldwide.
  • The Android Scripting Workshop has the potential to make Python-lovers of a whole new class of people who wouldn't even call themselves programmers (yet)... people who love their powerful Android phones and will love them even more once they learn the power of scripting on them. One question I'd like your advice on: how do we let these people know about the workshop? They're not reading my blog, after all...
  • The Contribu-palooza is a set of linked events (a classic talk, a "Teach Me" talk, and a big fat sprint) designed to make you into a contributor to the Python language, starting from nothing - we supply the motivation, the skills, and then the hands-on practice. I'd like to see this produce both an immediate new set of Python contributors (including me) and a new way of bringing contributors in.

I hope to see you there!