Cool software I just found that someone recommended.

“ClipboardPath” software adds a new command “Copy Path to Clipboard” to the context menu for files and folders. Pasting the complete filename or foldername into any dialog or editor is just a mouse click away. You always get the full path. This software is free for end users.

If you’re any sort of Windows geek, you’ll find this indispensible.

http://stefan.bertels.org/en/clipboardpath

Pastebin.com

November 25, 2010

People who read this blog probably need to share bits of source code or other text on a regular basis, eh?

I just stumbled upon the Pastebin.com site, which lets anyone share chunks of text, then provide a link so others can access it.  Most clippings are shared publicly and have no identifying information.  You can also create private text clips or create folders for sharing multiple chunks privately, though the protection is limited to those who know the name of your private folder, so very weak!

It’s ad-supported, searchable and even provides an API for posting (anyone interested in building an Apex application to create and share a private folder???).  It has a syntax-formatter to highlight your source for a variety of languages.

There’s not much to it, but it definitely fills a need.  While I was looking it over (on Thanksgiving Day), dozens of people were adding new clippings every few minutes.  Though many of them are just posts of BitTorrent download sites for various search phrases (e.g. Harry Potter Goblets of Fire), so I doubt anyone would want to spend time searching the archives for other people’s clippings.

A friend dropped me a line saying her Apex app’s Interactive Report wasn’t working for her users anymore and she asked if I knew what could cause it.  She said it worked for her in the Apex development environment, but not outside.  I talked her into giving me an account on her Apex workspace and started digging through it.

For me in the developer environment, it wouldn’t do any of the JSON updates, like search for text, filter, change columns, sort, etc. – all the cool things we love about IRs.  I’d seen this before, but it’d been so long I’d forgotten.  I finally dug into the page template and noticed that there wasn’t much inclusion of external CSS going on and when I added that in, the report worked.  So I sent her that as “fixed!”  I couldn’t figure out how this application could have worked before, but had stopped!

Unfortunately, she wrote back saying that didn’t do it for someone running outside the development environment!  Aaagh!

But I love a good challenge, so I dug back in.  I got another session going in another browser so it was outside Apex’s environment.  I noticed a difference between the two user sessions, that in the Development Environment, it showed my username on the top of the page, but not when I wasn’t.  That was the hint I needed!  It reminded me that the Interactive Reports store your queries by the APP_USER name into the database.  No user name, no interactivity!

It turned out that this was a new application, she was using a custom authentication method that was new to her and she wasn’t setting the APP_USER value!

I’d used this same custom authentication method and found I needed to call

APEX_CUSTOM_AUTH.SET_USER(p_user => 'some custom value');

in the Post section of the authentication method.

Once that was set, everything worked great.

It was only after I told my friend the solution that she said that this was a new application she was building.  Oops!  If she’d said that up front, I might have figured out what was wrong sooner!  :-/

[Another non-Apex post...  Sorry to those who subscribe to my blog for Apex stuff.  I haven't been working on it much lately, except to check out 4.0EA, which is looking great!]

On to the subject at hand… MobileNoter allows you to sync selected OneNote notebooks (2007 or 2010, though they only recommend 2007) to your iPhone.  They offer a WiFi-only version and a “Cloud” version for syncing via iPhone cell signal.  I’ve only checked out the WiFi version for a few minutes, but what I see has impressed me.

Once you’ve downloaded the Windows client and installed the iPhone client, you run the Windows client setup feature to choose which notebooks you want to sync.  They have to be currently open in OneNote (i.e. on OneNote’s list of notebooks), though OneNote itself doesn’t have to be open to set up or sync.  Then you set up syncing on the iPhone, telling it which iPhone on your local WiFi network is you.  It provides a passcode, which you plug into the Windows client (it prompts you on Windows).  That provides the secure handshaking.

Then just sync!  The first one will take a little while, depending on how big your notebooks are.  After that, sync is pretty quick.  As far as I can tell from the pages it said it was trying to re-sync, it only checks those pages you visited in MobileNoter.  Currently there’s a limit on the maximum page size of 5Mb, though their blog says they’ll be removing that in version 1.3, which they hope to release at the end of March.

How’s it look?

The quality of the OneNote renditions in MN is very impressive to my eyes.  Pages look great, with all the images, tables, fonts, links, etc.  All images are brought over beautifully.  Links to external sites work about as you’d expect, they open MN’s internal browser or you can copy the URL to open in the browser of your choice.  Unfortunately, internal links don’t work at all, so clicking on a link between ON pages just sits there.

What about updating your ON notes?  Sadly, your notebooks are read-only at the moment, though they say that’s in the plans for the future.  The only nod to updating is the ability to create text-only notes in MN, which then sync to a newly-created ON notebook back on your PC.  But it’s something.  Check out their blog for their Roadmap to the Future.

Options

There aren’t too many, but one looks pretty good.  You can have it combine your Sections and Pages together, so you you can view a section by flipping sequentially through pages via previous and next buttons at the bottom of the screen.  That cuts down on navigating up/down within a section to look through all the pages by choosing from the list of page titles.  It’s not perfect, but it gives you a slightly different way to get around.

Price

  • $10 for the WiFi edition (increasing to $13 on 3/7).
  • Cloud edition subscription – 3 months for $5, 1 year for $15

I think the price is pretty reasonable and I was happy to pay it to get my OneNotes viewable on my iPod Touch.

Cloud

Note, the “Cloud” version that lets you sync via cellular to your iPhone works a bit differently.  Their website says they have to suck your ON notebooks up into their Cloud storage on their website, which then gets beamed to your iPhone.  This version has a subscription fee because you’re storing data on their servers.  Right now it’s 3 months for $5, 1 year for $15, though I think the price will go up a little shortly.

Version: 1.0

Finally, since this is version 1.0 software (even though they did a pretty long beta-testing), I see at least one quirk.  After I sync, it looks like MN’s Windows client becomes a minimized window that sits on your screen.  If you close it, it quits the application.  Minimizing it does nothing.  I don’t know why it hangs around instead of closing to the system tray automatically.  Also, there’s a sync option in the Windows MN client (in your system tray), but that only relates to the Cloud edition.  If I’ve registered for the WiFi edition, I don’t understand why they still show this option.  Maybe because I just installed it, so the Cloud edition is still running in trial mode?

Conclusions

I’m pretty impressed with this first version.  I’ll give them 3.5 stars for the functionality they provide and the current implementation.  Once they work out the quirks in this release, it’ll be a 4-star application in my book.  Add the ability to edit your OneNotes directly, and it’s clearly 5 stars.

All I can say is Wow!

That’s it.  Nothing more here…

Read the rest of this entry »

PL/SQL Unit Testing package

September 29, 2009

I could have sworn I’d posted this a long time ago, but I can’t find it here.

An Apex friend mentioned his interest in a simple unit test package for Oracle PL/SQL.  I shamelessly copied and simplified a unit-testing framework that Steven Feuerstein published years ago.  His package was quite good and offered lots more features.  But the installation was the antithesis of light-weight and it was a pain to support in our (somewhat unique) environment.  The commercial version he developed for Quest is that much and more.

I simplified Feuerstein original version so that:

  • It runs in our environment,
  • The unit test scripts are fairly readable,
  • It covered the basic unit tests I need for my work,
  • Minimal test suite set up,
  • Easily add more tests as the new function progressed
  • Easily comment out obsolete tests that aren’t supported later in the development,
  • Minimal overhead means the test scripts run fast,
  • The code_tester package is extensible.

Disadvantages from the commercial package that Quest sells (developed by Feuerstein):

  • It ain’t GUI
  • Scripts are not modular, so it can get tedious when they get very large.

The attached zip file contains 2 files:

  • The code_tester package itself (only 933 lines)
  • test code_tester.sql – a sample test script that shows the various features in use (53 lines)

Usage

  1. Compile the package,
  2. Run the test code_tester script in your Oracle development tool of choice.  (I’m a fan of Allround Automations’ PL/SQL Developer, but it works fine in SQL*plus.)
  3. Most of the tests are set up to succeed.  Change one so it will fail.  For example, change:
code_tester.ge('5 >= 5', 5, 5);

to:

code_tester.ge('5 >= 5', 5, 500);

It shows you which test(s) failed.  You can increase the amount of information reported, such as list the tests that passed as well as failed, count of failures, etc.

Output looks like:

FAILED    Test 'Value vs NULL, NULL NOT okay'  NULL NOT GREATER THAN 99999999
FAILED    Test 'Value vs NULL, NULL NOT okay'  NULL NOT GREATER THAN 29-SEP-2009 14:30:51
.
Total Successes: 19    Total Failures: 2
.
>  FFFFFFF   AA     III  L      U     U RRRRR   EEEEEEE
>  F        A  A     I   L      U     U R    R  E
>  F       A    A    I   L      U     U R     R E
>  F      A      A   I   L      U     U R     R E
>  FFFF   A      A   I   L      U     U RRRRRR  EEEE
>  F      AAAAAAAA   I   L      U     U R   R   E
>  F      A      A   I   L      U     U R    R  E
>  F      A      A   I   L       U   U  R     R E
>  F      A      A  III  LLLLLLL  UUU   R     R EEEEEEE
.

Though I haven’t enhanced this in a long time, I would welcome enhancements, feedback, suggestions, etc.  Obviously I have very little (to none) time to support this, but I’ll try to help where possible.

Download the zip file

Enjoy,

Stew

This is the main map from their home page.  You can click on the icons under the text to see hover text, then click again to jump to that page, which is an additional concept map.  I like that you can sort of read them as English sentences, while still retaining the relationships of a diagram.

Main page of CmapTools site

Main page of CmapTools site

It looks pretty cool, though I’d think it would be slow to develop each map.  Much slower than a mindmap for example.  But I think having a tool to create these diagrams would be very helpful, especially when they get large and you want to be able to drill down into sub-concepts.

Update: April 16, 2009 – I found and fixed a bug in how it handled the contains clause in the filters.  Stupid me, I’d used contains in other flavors of SQL so never bothered to confirm that Oracle SQL supports it!

Sorry about that!!!

The purpose of this package is to grab the user’s current Filters and Searches and recreate them in a WHERE clause, so I could do some external reporting.  A couple other people have shown me their solutions to this but this is my original work (with a hint from Anton and Shunt).

The little bit extra mine adds that I haven’t seen elsewhere is that it supports User-Saved Reports.  So if a user clicks the report tab for one of their saved reports and possibly customizes it, my routine can figure that out and recreate their current query.

It also supports the user typing a value into the Search box, which Apex matches against all text and numeric fields currently displayed.  That was an amusing trick!  If you care, you can view the query that IR generates by using Debug mode.

What this code does not support is a sort order, since my external report tool has a fixed sort.  Shunt did something that works with sort orders that you should check out here:

http://simonhunt.blogspot.com/2009/02/next-and-previous-from-interactive.html

If you compare how others handled the various filter options (IN, CONTAINS, etc) versus how I did it, I think you’ll prefer their method.  I know I did, and wished I could have figured it out when I was writing this!  :-/

From the IR report page (e.g. 2), you add the following Javascript to the Page HTML Header:

<script language="JavaScript" type="text/javascript">
function SaveAndRunReport() {
     popUp2('f?p=&APP_ID.:7:&SESSION.:new_request:NO::'+
            'P7_IR_REPORT_ID:'+$v('apexir_report_id'), 1024, 768);
}
</script>

You can certainly make a simpler call, mine just happens to use a pop-up page.

In the target page,  (e.g. 7), you can display the WHERE clause by creating an item computed with the following SQL query:

SELECT apex_ir_query.ir_query_where(:APP_ID,
           2,
           :SESSION,
           :P 7_IR_REPORT_ID) FROM DUAL;

Here’s the package.  It’s hosted on MediaFire, so you’ll have to live with the ads.

Let me know if you find it useful or have suggestions to offer.

- Stew

Is there some reason that my Parent tabs don’t display in the order of their sequence in the Development environment?

For example, here’s what the users see with the sequences:

Tabs as displayed in my application

But here’s what I see in the Development page.

Tabs in Development

I find this pretty confusing, anyone else?

I realize that you can have multiple tab sets (which confuses me even further at times!) but these are all in the same tab set.

Apex Training days

November 12, 2008

We’re bringing an Apex trainer to campus for the next 3 days to get everybody (15 of us including a few managers auditing?) rolling with their Intro to Apex.

Anton from Concept 2 Consulting is coming up from the Boston area.  We’ve talked with him enough already that he should know pretty well what we’re after.  I’ll be sitting in the back listening for gems and connecting information that I haven’t already learned and trying not to act like a know-it-all!

Really, I’ll try.  But I’m currently developing on my fourth Apex application and working my way through John Scott and Scott Spendolini’s mid-level book “Pro Oracle Application Express” (which is pretty good so far).

Follow

Get every new post delivered to your Inbox.