Content By Query – Search for nulls

•February 22, 2011 • Leave a Comment

Content by query is such a handy tool.  I can find ANYTHING!  Documents added only that last month?  Easy.  Comments that have been approved?  Easy.  Posts that haven’t yet been tagged?  Um . . .

I couldn’t seem to find an “official” way to solve this problem, but I discovered a hack for it.  If you need to search for a field that is null or blank, search for a condition in that field that can’t possibly be true.  For example, the value is both greater than and less than 0.  Suddenly, you’ll be presented with a result full of blank values in that field 🙂

Works great if you need to create a web part listing things that are missing information.

Note that this is for Sharepoint 2010, I haven’t tried it in 2007.

Advertisements

Memorial Day

•June 1, 2010 • Leave a Comment

Yesterday was Memorial Day.  A day for sober reflection, for appreciation of the people that have sacrificed for us.

Whether or not you agree with the current state of affairs, we owe those that have served in the past – and those currently serving – some appreciation.  Their reasons don’t matter.  The wars they did or didn’t participate in don’t matter.  It’s a hard life that requires a lot of sacrifice, particularly for those with families.  Everyone benefits from the service of others, they are the reason other people currently have the ability to choose not to join the military.

I was on a plane yesterday.  At the end of the flight, the attendants were kind enough to ask that everyone remain seated to allow current and former military to deplane first.  I was in the back of the plane.  I counted.  Six people stayed in their seats.

Happy Ada Lovelace Day!

•March 23, 2010 • Leave a Comment

24 Mar is Ada Lovelace day.  Ada was a programmer back in the days that a computer still referred to a person.  She was such a huge influence on computer science that one of the first programming languages was named after her.

Who are your female influences in science and technology?

I have always admired Eileen Collins, the first female pilot and then commander of a space shuttle.

Beatrix Potter theorized that antibiotic properties in lichen helped them fight disease.  She theorized that lichen were made up of a symbiotic relationship between algae and fungi.  She wrote a paper on the subject which was not well received, and eventually withdrawn.  Decades later, scientists proved that she was correct.

Hong Kong

•February 25, 2010 • 2 Comments

My first day in Hong Kong was really fun!

I began the day on a quest for congee.  I picked 3-4 restaurants at random, but none had it.  In the last one, I pointed to some noodle soup a girl next to me was eating, and said I wanted that.  It turned out to be cow stomach noodle soup, and it was wonderful!  The beef broth was rich, the stomach tender.  The bowl was so big that I couldn’t finish it.

After breakfast, it was time to do some wandering.  I picked up a sim card for US$7 with more minutes than I usually use in two months.  The alleys are really fun to walk through, vendors have stalls out all along the walls, and cars aren’t allowed through.  I noticed after a while that there were shop doors behind the vendors, two layers of shopping!  I found a place that sells designer underwear, and a place that sells toddler sized wetsuits.  I found a tiny shop that sold durian chips.  I followed some drums to a lion dance in front of the Rolex store!

I returned from my walk to find that Kathy had returned, and wanted to take me on a mini-tour of the area.  She showed me where to get congee and where the immigration building was.  We picked up some sandwiches to eat on the waterfront. 

As pretty as the waterfront was during the day, I returned to see what it looked like after dark.  It was a place transformed!  The usual city haze combined with the large amount of light in the city means it’s never really dark here.  My camera couldn’t deal with the weird light levels, the place was absolutely beautiful.  Colored light designs dart around on many of the buildings, tracing out patterns, flowers, words, and celebrations of the year of the tiger.  Many of the designs moved, changed, shifted around.  The flower pattern building that I was unable to capture seemed to have flowers growing, changing in color, and having their petals blown away.

I stopped by the red light district on my way back to the apartment, which Kathy had assured me was perfectly safe.  She was right. Young women in sparse clothing and big black boots hang out in front of strip clubs – they ignored me.  In between strip clubs were regular clubs and bars, I looked up to locate some Gwen Stefani music to see an English pub.  There were nice bars with well-dressed westerners sipping martinis.  I found a pizza place, a tapas place, and a very busy place selling kebabs.  It didn’t take me long to realize that I was underdressed for this area in my slacks and t-shirt.  It was getting late, so I decided to return another night in more appropriate attire.

Random Acts of Thoughtfulness

•January 12, 2010 • Leave a Comment

To the girl that snubbed out her cigarette half a block away from the bus stop: I saw you.  Thank you.  It’s considerate people like you that make living in Seattle so pleasant.

To the girl walking with you that continued smoking while standing in front of the bus stop, just outside the closed bus door: I saw you, too.  Your smoke will drift inside the bus when the door opens, and make the ride unpleasant for non-smoking riders for hours.  Anyone walking by that bus stop or having to stand next to you will have to breathe your second hand smoke as the wind continues to shift to and fro.

Plone Migrator is … Gone?

•June 17, 2009 • 11 Comments

Update: I’ve submitted a tutorial for review in the Plone docs.

I’ve been going through the process of moving some local packages into the collective.  In the process of doing so, I’ve changed the names of the packages to make them more general-use friendly.  Now that I’m done with that, the plan was to write some migrations to move the existing objects over to the collective types.

I get working on my migration, using Martin’s helpful guide, and am faced with this:

ImportError: No module named migrator

Well, that’s weird, I must have a broken package.  I go look in the Products.ATContentTypes.migration package, and there is indeed no file called migrator.  Delete the package and run buildout again, still not there.

Googling around points me at the new transmogrifier package, which looks like it will fit my needs nicely.  After working with it a couple of weeks, I can say that I just don’t have the time to figure out how to make this work right now.  I can see that it’s going to be a great package, but I’m on a time crunch here.

More looking, and I happen upon a plone news update on the plone.de site that says, “Removed the migration tool. Upgrades are handled by GenericSetup alone.”  So far, I’ve come upon this slideshow from Six Feet Up explaining upgrades in GenericSetup.  Please, someone tell me if I’m on the wrong track or if you know of a step-by-step tutorial on upgrades.  I feel like I should be done with this by now, but I keep starting over.

This is not Prom

•June 16, 2009 • 2 Comments

DancersOne of the places that I go dancing tends to be … difficult … sometimes.  People tend to dance only with people that they know, and I sometimes only know one or two people.  (Yes, I know that I should make friends, but the leads are out dancing most of the time.  I do make friends with follows.)

I had a couple of not very good dances initially.  One that from first few steps, I recognized as a student of one of the local schools – I have a hard time dancing with students from that school.  I’m not especially skilled in the far-away nuevo style, but can usually get by with a good lead.  These students and their teacher, however, do this style with little or no connection, and I end up feeling thrown around, as was the case here.  The next was with someone that I had danced with before, but had gotten considerably worse in the six months since I had last danced with him.  “I can’t tell what foot you’re on.”  Indeed.

I don’t think of myself as a tango snob, I usually dance with one or two beginners, and often enjoy such dances because they are having so much fun.  Beginners bring fresh energy to a room.

By the time I was asked again, I was eager enough to accept a dance with someone that had just come in, and hadn’t yet observed dancing with anyone.  This guy had clearly not had even one lesson.  He seemed to think he was at prom, just stood there and rocked back and forth.  He put his hand lower than he should have.  When he did make a movement that I thought was a step, his leg was in the way, and I clipped my toe with a heel.  I went and sat down after one song, and he followed me.  He sat down next to me, and put his hand on the back of my chair.  He proceeded to sit there through the rest of the tanda talking about foot massage and asking if I had a boyfriend.  He asked me to dance again at each following song, and I turned him down each time.  I tried to watch the other couples dancing, but had a hard time concentrating.  Finally, he appeared to get bored, got up abruptly, and walked off without a word.

So, good readers, what should I have done?  This is a combination of the baby-sitter and perv types.  I had already walked off the floor, but this was apparently not enough.