Deleting duplicate Outlook Contacts

30 Jun 2008 In: Tools

Just found an awesome tip via Lifehacker on the site tech-recipies. I had set up my mom’s computer to sync her phone and her Outlook and of course something went screwy and she ended up with duplicate contacts of every contact. This tip was a lifesaver as it allowed me to quickly and easily delete all of the duplicates while maintaining her original list!

Read the article for a more in depth approach including screenshots, but the basic steps are

  1. Switch to ‘Phone List’ view on the Contact screen
  2. Add the ‘Created’ column to the view and sort by it
  3. Delete all the contacts that were created on a later date

Of course it’s more sophisticated than that, but that’s the basic idea. Anyway, saved me a bunch of time.

Get your wireframe up quickly

3 Jun 2008 In: Design

The nice folks at Yahoo have released an incredible resource for anyone looking to get a web application out the door. The Yahoo! Design Stencil Kit version 1.0 (catchy name too) has been released in a number of different formats. This will let anyone quickly mockup a web page digitally using a number of standard controls. And best of all the whole thing is licensed under a Creative Commons Attributions 2.5 License which lets any one to share and remix the work as long as they give attribution.

stencil_illustration

Displaying the SQL from a Query

30 May 2008 In: ColdFusion, SQL

Ray Camden has put up a very nice post about pulling the actual text of a ColdFusion query. I’ve been playing around with ColdFusion 8 in my dev environment and one of the things I miss most when going back to a 7 server is the text of the SQL in the <cfdump> for the query.

Go read the article for a more thorough explanation bust basically there are two ways to see the text of a query.

  1. Add the ‘result=yourstruct’ attribute to your query tag and a bunch of meta data about the query will be put in yourstruct
  2. Call the function getMetaData() on the query and you’ll get a bunch of information about the column names and types of the query

The full article explains a lot more about the two approaches. This is a great tip especially when you don’t have access to a server’s administration application.

Google’s new AJAX Libraries API

28 May 2008 In: JavaScript

Yesterday Google announced that they are going to serve up some of the top JavaScript libraries on its own content delivery network. This allows developers to hand off the responsibilities of storing and caching these libraries to Google. In the announcement Dion Almaer listed several benefits to having Google host these files:

  • “Developers won’t have to worry about getting caching setup correctly, as we will do that for you
  • If another application uses the same library (much more likely), they there is a much better chance that it will be already caching on the users machine
  • The network and bandwidth of the users systems will not be taxed.”

They currently are hosting five of the more popular libraries jQuery, prototype, script.aculo.us, MooTools and dojo. Depending on how you call the library you can get a specific version or just the most recently available one. If this convention catches on then potential when a new person enters your site they may already have the library cached from a visit to another site.

There are two ways to access the libraries at Google. First, you can access them using the standard <script src=”..”> tag. So to include jQuery you would include the following line in your page:

<script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js”></script>

Second, you can use Google’s own AJAX API Loader. Here’s the example from the site:

<script src=”http://www.google.com/jsapi”></script>
<script>
// Load jQuery
google.load(”jquery”, “1″);

// on page load complete, fire off a jQuery json-p query
// against Google web search
google.setOnLoadCallback(function() {
$.getJSON(”http://ajax.googleapis.com/ajax/services/search/web?q=google&;v=1.0&;callback=?”,

// on search completion, process the results
function (data) {
if (data.responseDate.results &&
data.responseDate.results.length>0) {
renderResults(data.responseDate.results);
}
});
});
</script>

There is a full set of usage guidelines on the documentation site which further explain how to use the loader. You can specify to what level of the version you want of the library (”1″, “1.1″, or “1.1.2″) and the loader will return the most relevant version.

This is a nice validation of the usefulness of frameworks in developing and will help remove some barriers of entry to site creation. I’m excited to give this a try in my next project. One thing to note though, is the files are hosted at an outside site. Now Google is in the business of continuous uptime, but on the off chance that the service goes down your site could go down with it. Also developers on internal company projects may not be able to access an outside service which would also invalidate this method.

Removing an Oracle Job

27 May 2008 In: SQL

I’m just getting started in the world of Oracle Jobs, but here’s a nice little tip I had to look up today. You can stop a job by calling the REMOVE(job_id) function of the DBMS_JOB package. Notice there is no ‘S’ after DBMS_JOB, a minor mistake that I already made today.

So if I have a job 10045 and would like to get rid of it I would call:

begin
DBMS_JOB.REMOVE(10045);
end;

Also, too check get an idea of how much longer an existing job has to run you can query the session table:

SELECT round(sofar*100 / totalwork) as percent_done,
       round((totalwork - sofar) * (((last_update_time - start_time) *
       24*60)/sofar)) as min_remaining,
       round(elapsed_seconds/60) as elapsed_time
FROM v$session_longops a
WHERE SID = {the SID running the job}

You can find the SID of the running job using the following query:

select * from v$session
where status=‘ACTIVE’

And look for the username that is running the query.

This is very elementary stuff that a lot of programmers probably already know, but still worth mentioning. I’ve also been doing some work the the DBMS_APPLICATION_INFO package which lets your application update its status for others to see.

Finding out what’s eating your disk space

22 May 2008 In: Tools

Today my computer slowed down to a crawl. I decided to open the Computer window and see what my disks were looking like. My C: drive was down to 300MB (not GB) free! Not a good state to be in. I’ve tried to be really careful about keeping my large files off this drive so I was very confused what was going on. Now rather than click on each folder to find out its properties I did a little googling and found the program WinDirStat. http://windirstat.info/

Short story: This is an awesome program and helped me free up 35GB.

Long story: I was able to find a program whose temp folder wasn’t getting cleaned up resulting in a lot of extra junk. There is no way I could have found this poking around (it was in a pretty obscure location) but it showed up right away in WinDirStat. And best of all the price is right! Free.

Check it out for yourself.

image

Code Style test

15 May 2008 In: Site News
this.itemDataTable.subscribe("rowMouseoverEvent", this.itemDataTable.onEventHighlightRow);
this.itemDataTable.subscribe("rowMouseoutEvent", this.itemDataTable.onEventUnhighlightRow);
this.itemDataTable.subscribe("rowClickEvent", this.itemDataTable.onEventSelectRow);
this.itemDataTable.subscribe("rowSelectEvent", function(oArgs){
    this.clearTextSelection();
});

Hello World

6 May 2008 In: Site News

I’m going to start writing some technical stuff here. It should all be related to Coldfusion, Java, Medical Informatics and other such stuff, but who knows how well I’ll stay on target.

About this blog

My name is Dan Cramer. I’ve been working at TheraDoc for the past 4 years as a Software Developer. Most recently I’ve been doing a lot of application development using ColdFusion, ColdBox, jQuery, YUI and a bunch of other stuff. This notebook has been setup to document the stuff that I find so that 2 months(weeks) down the road when I forget what I’ve done, I can come back and look at it. And if it helps someone else in the process, then that’s just gravy.

Twitter: dancramer

  • Home from the Camping trip.Baby screaming all night? check. Barfing in the morning? check. Wonderful experience for the whole family? Check.

Free Zoo Day 007Photo SafariGavin's First BirthdayTammy's Trip to California 009Tammy's Trip to California 008Tammy's Trip to California 007Tammy's Trip to California 006Tammy's Trip to California 005